{"version":3,"file":"app-page.runtime.dev.js","sources":["webpack://next/webpack/runtime/create_fake_namespace_object","webpack://next/webpack/runtime/require_chunk_loading","webpack://next/./src/build/webpack/alias/react-dom-server.js","webpack://next/./dist/compiled/@edge-runtime/cookies/index.js","webpack://next/./dist/compiled/busboy/index.js","webpack://next/./dist/compiled/bytes/index.js","webpack://next/./dist/compiled/cookie/index.js","webpack://next/./dist/compiled/p-queue/index.js","webpack://next/./dist/compiled/path-to-regexp/index.js","webpack://next/./dist/compiled/react-dom/cjs/react-dom-server.node.development.js","webpack://next/./dist/compiled/react-dom/cjs/react-dom.development.js","webpack://next/./dist/compiled/react-dom/index.js","webpack://next/./dist/compiled/react-dom/static.node.js","webpack://next/./dist/compiled/react-is/cjs/react-is.development.js","webpack://next/./dist/compiled/react-is/index.js","webpack://next/./dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js","webpack://next/./dist/compiled/react-server-dom-webpack/client.node.js","webpack://next/./dist/compiled/react/cjs/react-compiler-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-dev-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react.development.js","webpack://next/./dist/compiled/react/compiler-runtime.js","webpack://next/./dist/compiled/react/index.js","webpack://next/./dist/compiled/react/jsx-dev-runtime.js","webpack://next/./dist/compiled/react/jsx-runtime.js","webpack://next/./dist/compiled/safe-stable-stringify/index.js","webpack://next/./dist/compiled/string-hash/index.js","webpack://next/./dist/compiled/strip-ansi/index.js","webpack://next/./src/lib/picocolors.ts","webpack://next/./src/build/output/log.ts","webpack://next/./src/client/app-call-server.ts","webpack://next/./src/client/app-find-source-map-url.ts","webpack://next/./src/client/components/app-router-headers.ts","webpack://next/./src/client/add-base-path.ts","webpack://next/./src/client/normalize-trailing-slash.ts","webpack://next/./src/client/components/app-router-utils.ts","webpack://next/./src/client/components/router-reducer/reducers/server-action-reducer.ts","webpack://next/./src/client/components/router-transition.ts","webpack://next/./src/client/components/app-router-instance.ts","webpack://next/./src/client/components/segment-cache/prefetch.ts","webpack://next/./src/client/components/builtin/error-styles.tsx","webpack://next/./src/client/components/builtin/global-error.tsx","webpack://next/./src/client/components/http-access-fallback/error-boundary.tsx","webpack://next/./src/client/components/dev-root-http-access-fallback-boundary.tsx","webpack://next/./src/client/components/error-boundary.tsx","webpack://next/./src/client/components/handle-isr-error.tsx","webpack://next/./src/client/components/http-access-fallback/http-access-fallback.ts","webpack://next/./src/client/components/instant-samples.ts","webpack://next/./src/client/components/is-next-router-error.ts","webpack://next/./src/client/components/links.ts","webpack://next/./src/client/components/match-segments.ts","webpack://next/./src/client/components/nav-failure-handler.ts","webpack://next/./src/client/components/navigation-devtools.ts","webpack://next/./src/client/components/navigation-untracked.ts","webpack://next/./src/client/components/not-found.ts","webpack://next/./src/client/components/offline.ts","webpack://next/./src/client/components/readonly-url-search-params.ts","webpack://next/./src/client/components/redirect-error.ts","webpack://next/./src/client/components/redirect-status-code.ts","webpack://next/./src/client/components/redirect.ts","webpack://next/./src/client/components/router-reducer/compute-changed-path.ts","webpack://next/./src/client/components/router-reducer/create-href-from-url.ts","webpack://next/./src/client/components/router-reducer/fetch-server-response.ts","webpack://next/./src/client/components/router-reducer/ppr-navigations.ts","webpack://next/./src/client/components/router-reducer/is-navigating-to-new-root-layout.ts","webpack://next/./src/client/components/router-reducer/reducers/committed-state.ts","webpack://next/./src/client/components/router-reducer/reducers/has-interception-route-in-current-tree.ts","webpack://next/./src/client/components/router-reducer/reducers/hmr-refresh-reducer.ts","webpack://next/./src/client/components/router-reducer/reducers/navigate-reducer.ts","webpack://next/./src/client/components/router-reducer/reducers/refresh-reducer.ts","webpack://next/./src/client/components/router-reducer/router-reducer-types.ts","webpack://next/./src/client/components/router-reducer/set-cache-busting-search-param.ts","webpack://next/./src/client/components/segment-cache/bfcache.ts","webpack://next/./src/client/components/segment-cache/cache-key.ts","webpack://next/./src/client/components/segment-cache/cache-map.ts","webpack://next/./src/client/components/segment-cache/cache.ts","webpack://next/./src/shared/lib/segment-cache/vary-params-decoding.ts","webpack://next/./src/client/components/segment-cache/fetch.ts","webpack://next/./src/client/components/segment-cache/lru.ts","webpack://next/./src/client/components/segment-cache/navigation-testing-lock.ts","webpack://next/./src/client/components/segment-cache/navigation.ts","webpack://next/./src/client/components/segment-cache/optimistic-routes.ts","webpack://next/./src/client/components/segment-cache/scheduler.ts","webpack://next/./src/client/components/segment-cache/types.ts","webpack://next/./src/client/components/segment-cache/vary-path.ts","webpack://next/./src/client/components/unrecognized-action-error.ts","webpack://next/./src/client/components/use-action-queue.ts","webpack://next/./src/client/components/use-offline.tsx","webpack://next/./src/client/dev/debug-channel.ts","webpack://next/./src/server/dev/hot-reloader-types.ts","webpack://next/./src/shared/lib/format-webpack-messages.ts","webpack://next/./src/client/dev/hot-reloader/shared.ts","webpack://next/./src/next-devtools/userspace/app/terminal-logging-config.ts","webpack://next/./src/next-devtools/shared/console-error.ts","webpack://next/./src/next-devtools/userspace/app/errors/stitched-error.ts","webpack://next/./src/shared/lib/error-source.ts","webpack://next/./src/next-devtools/shared/forward-logs-shared.ts","webpack://next/./src/next-devtools/userspace/app/forward-logs-utils.ts","webpack://next/./src/next-devtools/userspace/app/forward-logs.ts","webpack://next/./src/next-devtools/userspace/app/errors/use-error-handler.ts","webpack://next/./src/next-devtools/userspace/app/errors/replay-ssr-only-errors.tsx","webpack://next/./src/client/dev/runtime-error-handler.ts","webpack://next/./src/next-devtools/userspace/app/app-dev-overlay-error-boundary.tsx","webpack://next/./src/next-devtools/userspace/app/segment-explorer-node.tsx","webpack://next/./src/client/dev/hot-reloader/app/web-socket.ts","webpack://next/./src/client/dev/report-hmr-latency.ts","webpack://next/./src/client/dev/hot-reloader/app/hot-reloader-app.tsx","webpack://next/./src/client/flight-data-helpers.ts","webpack://next/./src/client/has-base-path.ts","webpack://next/./src/client/lib/javascript-url.ts","webpack://next/./src/client/navigation-build-id.ts","webpack://next/./src/client/remove-base-path.ts","webpack://next/./src/client/route-params.ts","webpack://next/./src/lib/constants.ts","webpack://next/./src/lib/detached-promise.ts","webpack://next/./src/lib/format-dynamic-import-path.ts","webpack://next/./src/lib/is-error.ts","webpack://next/./src/lib/scheduler.ts","webpack://next/./src/next-devtools/userspace/use-app-dev-rendering-indicator.tsx","webpack://next/./src/server/after/after-context.ts","webpack://next/./src/server/api-utils/index.ts","webpack://next/./src/server/api-utils/node/try-get-preview-data.ts","webpack://next/./src/server/app-render/app-render-prerender-utils.ts","webpack://next/./src/server/app-render/async-local-storage.ts","webpack://next/./src/server/app-render/debug-channel-server.web.ts","webpack://next/./src/server/app-render/debug-channel-server.node.ts","webpack://next/./src/server/app-render/instant-validation/instant-samples.ts","webpack://next/./src/server/app-render/instant-validation/instant-validation-error.ts","webpack://next/./src/server/app-render/manifests-singleton.ts","webpack://next/./src/server/stream-utils/node-buffered-transform-stream.ts","webpack://next/./src/server/app-render/stream-ops.web.ts","webpack://next/./src/server/app-render/stream-ops.node.ts","webpack://next/./src/server/app-render/use-flight-response.tsx","webpack://next/./src/server/crypto-utils.ts","webpack://next/./src/server/lib/cache-handlers/default.ts","webpack://next/./src/server/lib/lru-cache.ts","webpack://next/./src/server/lib/node-fs-methods.ts","webpack://next/./src/server/lib/router-utils/is-postpone.ts","webpack://next/./src/server/lib/source-maps.ts","webpack://next/./src/server/lib/trace/constants.ts","webpack://next/./src/server/lib/trace/request-insights-identity.ts","webpack://next/./src/shared/lib/request-insights.ts","webpack://next/./src/server/lib/trace/request-insights.ts","webpack://next/./src/server/lib/trace/span-store.ts","webpack://next/./src/server/node-environment-extensions/process-error-handlers.ts","webpack://next/./src/server/revalidation-utils.ts","webpack://next/./src/server/route-modules/app-page/vendored/ssr/entrypoints.ts","webpack://next/./src/server/stream-utils/encoded-tags.ts","webpack://next/./src/server/stream-utils/node-web-streams-helper.ts","webpack://next/./src/server/stream-utils/uint8array-helpers.ts","webpack://next/./src/server/use-cache/clone-cache-entry.ts","webpack://next/./src/server/use-cache/constants.ts","webpack://next/./src/server/use-cache/handlers.ts","webpack://next/./src/server/use-cache/tiered-cache-handler.ts","webpack://next/./src/server/web/spec-extension/adapters/headers.ts","webpack://next/./src/server/web/spec-extension/adapters/reflect.ts","webpack://next/./src/server/web/spec-extension/adapters/request-cookies.ts","webpack://next/./src/shared/lib/action-revalidation-kind.ts","webpack://next/./src/shared/lib/app-router-context.shared-runtime.ts","webpack://next/./src/shared/lib/app-router-types.ts","webpack://next/./src/shared/lib/deployment-id.ts","webpack://next/./src/shared/lib/errors/constants.ts","webpack://next/./src/shared/lib/hash.ts","webpack://next/./src/shared/lib/head-manager-context.shared-runtime.ts","webpack://next/./src/shared/lib/hooks-client-context.shared-runtime.ts","webpack://next/./src/shared/lib/htmlescape.ts","webpack://next/./src/shared/lib/instant-messages.ts","webpack://next/./src/shared/lib/invariant-error.ts","webpack://next/./src/shared/lib/is-plain-object.ts","webpack://next/./src/shared/lib/is-thenable.ts","webpack://next/./src/shared/lib/isomorphic/path.js","webpack://next/./src/shared/lib/modern-browserslist-target.js","webpack://next/./src/shared/lib/page-path/ensure-leading-slash.ts","webpack://next/./src/shared/lib/promise-with-resolvers.ts","webpack://next/./src/shared/lib/router/utils/add-path-prefix.ts","webpack://next/./src/shared/lib/router/utils/app-paths.ts","webpack://next/./src/shared/lib/router/utils/cache-busting-search-param.ts","webpack://next/./src/shared/lib/router/utils/get-segment-param.tsx","webpack://next/./src/shared/lib/router/utils/interception-routes.ts","webpack://next/./src/shared/lib/router/utils/html-bots.ts","webpack://next/./src/shared/lib/router/utils/is-bot.ts","webpack://next/./src/shared/lib/router/utils/parse-path.ts","webpack://next/./src/shared/lib/router/utils/parse-relative-url.ts","webpack://next/./src/shared/lib/router/utils/path-has-prefix.ts","webpack://next/./src/shared/lib/router/utils/querystring.ts","webpack://next/./src/shared/lib/router/utils/remove-path-prefix.ts","webpack://next/./src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://next/./src/shared/lib/segment-cache/segment-value-encoding.ts","webpack://next/./src/shared/lib/segment.ts","webpack://next/./src/shared/lib/server-reference-info.ts","webpack://next/./src/shared/lib/utils.ts","webpack://next/./src/shared/lib/utils/reflect-utils.ts","webpack://next/./src/shared/lib/utils/warn-once.ts","webpack://next/./dist/compiled/react-dom/cjs/react-dom.react-server.development.js","webpack://next/./dist/compiled/react-dom/react-dom.react-server.js","webpack://next/./dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js","webpack://next/./dist/compiled/react-server-dom-webpack/server.node.js","webpack://next/./dist/compiled/react-server-dom-webpack/static.node.js","webpack://next/./dist/compiled/react/cjs/react-jsx-dev-runtime.react-server.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-runtime.react-server.development.js","webpack://next/./dist/compiled/react/cjs/react.react-server.development.js","webpack://next/./dist/compiled/react/jsx-dev-runtime.react-server.js","webpack://next/./dist/compiled/react/jsx-runtime.react-server.js","webpack://next/./dist/compiled/react/react.react-server.js","webpack://next/./src/server/route-modules/app-page/vendored/rsc/entrypoints.ts","webpack://next/./dist/compiled/nanoid/index.cjs","webpack://next/./dist/compiled/superstruct/index.cjs","webpack://next/webpack/runtime/compat_get_default_export","webpack://next/webpack/runtime/define_property_getters","webpack://next/webpack/runtime/ensure_chunk","webpack://next/webpack/runtime/esm_module_decorator","webpack://next/webpack/runtime/get javascript chunk filename","webpack://next/webpack/runtime/get_full_hash","webpack://next/webpack/runtime/has_own_property","webpack://next/webpack/runtime/make_namespace_object","webpack://next/webpack/runtime/node_module_decorator","webpack://next/./src/server/app-render/stream-ops.ts","webpack://next/./src/server/lib/trace/local-span-recorder.ts","webpack://next/./src/client/components/app-router.tsx","webpack://next/./src/server/app-render/debug-channel-server.ts","webpack://next/./src/server/route-modules/app-page/module.ts","webpack://next/./src/server/app-render/staged-rendering.ts","webpack://next/./src/server/app-render/dynamic-rendering.ts","webpack://next/./src/server/response-cache/types.ts","webpack://next/./src/server/route-kind.ts","webpack://next/./src/server/app-render/postponed-state.ts","webpack://next/./src/server/app-render/prospective-render-utils.ts","webpack://next/./src/server/app-render/instant-validation/instant-config.tsx","webpack://next/./src/server/request-meta.ts","webpack://next/./src/shared/lib/router/utils/is-dynamic.ts","webpack://next/./src/shared/lib/page-path/normalize-page-path.ts","webpack://next/./src/server/get-page-files.ts","webpack://next/./src/shared/lib/entry-constants.ts","webpack://next/./src/server/web/utils.ts","webpack://next/./src/shared/lib/i18n/detect-domain-locale.ts","webpack://next/./src/shared/lib/router/utils/add-path-suffix.ts","webpack://next/./src/shared/lib/get-hostname.ts","webpack://next/./src/shared/lib/i18n/normalize-locale-path.ts","webpack://next/./src/server/web/next-url.ts","webpack://next/./src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://next/./src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://next/./src/shared/lib/router/utils/add-locale.ts","webpack://next/./src/server/web/spec-extension/request.ts","webpack://next/./src/server/web/spec-extension/adapters/next-request.ts","webpack://next/./src/server/client-component-renderer-logger.ts","webpack://next/./src/server/pipe-readable.ts","webpack://next/./src/server/render-result.ts","webpack://next/./src/server/app-render/instant-test-bootstrap.ts","webpack://next/./src/server/internal-utils.ts","webpack://next/./src/lib/metadata/metadata-context.tsx","webpack://next/./src/server/async-storage/draft-mode-provider.ts","webpack://next/./src/server/async-storage/request-store.ts","webpack://next/./src/server/lib/lazy-result.ts","webpack://next/./src/server/app-render/dev-validation-events.ts","webpack://next/./src/server/app-render/dev-validation-worker-globals.ts","webpack://next/./src/server/app-render/dev-validation-worker-snapshot.ts","webpack://next/./src/server/lib/encode-header-safe.ts","webpack://next/./src/server/lib/implicit-tags.ts","webpack://next/./src/server/app-render/flight-render-result.ts","webpack://next/./src/lib/format-server-error.ts","webpack://next/./src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://next/./src/client/components/hooks-server-context.ts","webpack://next/./src/client/components/static-generation-bailout.ts","webpack://next/./src/server/dynamic-rendering-utils.ts","webpack://next/./src/lib/framework/boundary-constants.tsx","webpack://next/./src/server/app-render/blocking-route-messages.ts","webpack://next/./src/server/app-render/instant-validation/boundary-tracking.tsx","webpack://next/./src/lib/error-telemetry-utils.ts","webpack://next/./src/server/app-render/react-large-shell-error.ts","webpack://next/./src/server/app-render/create-error-handler.tsx","webpack://next/./src/server/app-render/get-short-dynamic-param-type.tsx","webpack://next/./src/server/app-render/get-script-nonce-from-header.tsx","webpack://next/./src/server/app-render/types.ts","webpack://next/./src/server/app-render/create-flight-router-state-from-loader-tree.ts","webpack://next/./src/server/lib/server-ipc/utils.ts","webpack://next/./src/server/lib/server-action-request-meta.ts","webpack://next/./src/server/app-render/segment-explorer-path.ts","webpack://next/./src/server/app-render/action-handler.ts","webpack://next/./src/server/app-render/csrf-protection.ts","webpack://next/./src/shared/lib/server-inserted-html.shared-runtime.tsx","webpack://next/./src/server/app-render/server-inserted-html.tsx","webpack://next/./src/shared/lib/encode-uri-path.ts","webpack://next/./src/server/app-render/required-scripts.tsx","webpack://next/./src/server/app-render/make-get-server-inserted-html.tsx","webpack://next/./src/server/app-render/get-css-inlined-link-tags.tsx","webpack://next/./src/server/app-render/get-preloadable-fonts.tsx","webpack://next/./src/server/app-render/has-loading-component-in-tree.tsx","webpack://next/./src/lib/client-and-server-references.ts","webpack://next/./src/server/lib/app-dir-module.ts","webpack://next/./src/server/app-render/interop-default.ts","webpack://next/./src/shared/lib/router/utils/parse-loader-tree.ts","webpack://next/./src/server/app-render/get-asset-query-string.ts","webpack://next/./src/server/app-render/render-css-resource.tsx","webpack://next/./src/server/app-render/create-component-styles-and-scripts.tsx","webpack://next/./src/server/app-render/get-layer-assets.tsx","webpack://next/./src/server/lib/clone-response.ts","webpack://next/./src/lib/batcher.ts","webpack://next/./src/server/response-cache/utils.ts","webpack://next/./src/server/response-cache/index.ts","webpack://next/./src/server/lib/patch-fetch.ts","webpack://next/./src/server/app-render/vary-params.ts","webpack://next/./src/server/app-render/create-component-tree.tsx","webpack://next/./src/client/components/builtin/default.tsx","webpack://next/./src/server/app-render/walk-tree-with-flight-router-state.tsx","webpack://next/./src/shared/lib/router/routes/app.ts","webpack://next/./src/shared/lib/router/utils/interception-prefix-from-param-type.ts","webpack://next/./src/shared/lib/router/utils/resolve-param-value.ts","webpack://next/./src/shared/lib/router/utils/get-dynamic-param.ts","webpack://next/./src/server/resume-data-cache/cache-store.ts","webpack://next/./src/server/app-render/encryption-utils.ts","webpack://next/./src/server/resume-data-cache/resume-data-cache.ts","webpack://next/./src/server/app-render/dev-validation-scheduler.ts","webpack://next/./src/client/components/app-router-announcer.tsx","webpack://next/./src/client/components/forbidden.ts","webpack://next/./src/client/components/unauthorized.ts","webpack://next/./src/client/components/navigation.ts","webpack://next/./src/client/components/redirect-boundary.tsx","webpack://next/./src/client/components/router-reducer/create-router-cache-key.ts","webpack://next/./src/client/components/unresolved-thenable.ts","webpack://next/./src/client/components/errors/graceful-degrade-boundary.tsx","webpack://next/./src/client/components/errors/root-error-boundary.tsx","webpack://next/./src/lib/framework/boundary-components.tsx","webpack://next/./src/client/components/router-reducer/reducers/find-head-in-cache.ts","webpack://next/./src/client/components/router-reducer/create-initial-router-state.ts","webpack://next/./src/server/app-render/app-render-scheduling.ts","webpack://next/./src/server/app-render/app-render-render-utils.ts","webpack://next/./src/server/app-render/cache-signal.ts","webpack://next/./src/server/lib/trace/utils.ts","webpack://next/./src/server/app-render/stale-time.ts","webpack://next/./src/server/app-render/metadata-insertion/create-server-inserted-metadata.tsx","webpack://next/./src/shared/lib/escape-regexp.ts","webpack://next/./src/shared/lib/router/utils/route-regex.ts","webpack://next/./src/lib/route-pattern-normalizer.ts","webpack://next/./src/shared/lib/router/utils/route-match-utils.ts","webpack://next/./src/shared/lib/router/utils/route-matcher.ts","webpack://next/./src/shared/lib/router/utils/prepare-destination.ts","webpack://next/./src/server/lib/decode-query-path-parameter.ts","webpack://next/./src/lib/url.ts","webpack://next/./src/shared/lib/router/utils/format-url.ts","webpack://next/./src/server/server-utils.ts","webpack://next/./src/shared/lib/image-config.ts","webpack://next/./src/shared/lib/image-config-context.shared-runtime.ts","webpack://next/./src/server/app-render/instant-validation/stream-utils.ts","webpack://next/./src/server/app-render/app-render.tsx","webpack://next/./src/server/instrumentation/utils.ts","webpack://next/./src/server/base-http/helpers.ts","webpack://next/./src/server/lib/is-rsc-request.ts","webpack://next/./src/server/app-render/parse-and-validate-flight-router-state.tsx","webpack://next/./src/server/async-storage/work-store.ts","webpack://next/./src/server/lib/params-utils.ts","webpack://next/./src/server/app-render/wait-for-response.ts","webpack://next/./src/server/request/fallback-params.ts","webpack://next/./src/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.ts","webpack://next/./src/build/static-paths/utils.ts","webpack://next/./src/shared/lib/constants.ts","webpack://next/./src/shared/lib/page-path/normalize-data-path.ts","webpack://next/./src/server/lib/patch-set-header.ts","webpack://next/./src/lib/metadata/is-metadata-route.ts","webpack://next/./src/lib/multi-file-writer.ts","webpack://next/./src/server/lib/incremental-cache/file-system-cache.ts","webpack://next/./src/server/lib/to-route.ts","webpack://next/./src/server/lib/incremental-cache/index.ts","webpack://next/./src/server/lib/router-utils/router-server-context.ts","webpack://next/./src/lib/is-interception-route-rewrite.ts","webpack://next/./src/server/route-modules/route-module.ts","webpack://next/./src/lib/is-app-route-route.ts","webpack://next/./src/shared/lib/page-path/normalize-path-sep.ts","webpack://next/./src/shared/lib/router/utils/path-match.ts","webpack://next/./src/server/api-utils/get-cookie-parser.ts","webpack://next/./src/shared/lib/router/utils/parse-url.ts","webpack://next/./src/server/lib/router-utils/decode-path-params.ts","webpack://next/./src/shared/lib/router/utils/escape-path-delimiters.ts","webpack://next/./src/shared/lib/router-context.shared-runtime.ts","webpack://next/./src/server/route-modules/app-page/helpers/prerender-manifest-matcher.ts","webpack://next/./src/server/normalizers/request/suffix.ts","webpack://next/./src/server/normalizers/request/rsc.ts","webpack://next/./src/server/normalizers/request/segment-prefix-rsc.ts","webpack://next/./src/server/route-modules/app-page/normalize-request-url.ts"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n  __webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => { def[key] = () => (value[key]) });\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var installedChunks = {\"app-page\": 1,};\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nvar installChunk = (chunk) => {\n\tvar moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor (var moduleId in moreModules) {\n\t\tif (__webpack_require__.o(moreModules, moduleId)) {\n\t\t __webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif (runtime) runtime(__webpack_require__);\n\tfor (var i = 0; i < chunkIds.length; i++) installedChunks[chunkIds[i]] = 1;\n\t\n};// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif (!installedChunks[chunkId]) {\n\t\tif (true) {\n\t\t\tinstallChunk(require(\"./\" + __webpack_require__.u(chunkId)));\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};","const ERROR_MESSAGE =\n  'Internal Error: do not use legacy react-dom/server APIs. If you encountered this error, please open an issue on the Next.js repo.'\n\nfunction error() {\n  throw new Error(ERROR_MESSAGE)\n}\n\nvar b\nif (process.env.NEXT_RUNTIME === 'nodejs') {\n  if (process.env.NODE_ENV === 'production') {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.node.production.js')\n  } else {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.node.development.js')\n  }\n} else {\n  if (process.env.NODE_ENV === 'production') {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.js')\n  } else {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.development.js')\n  }\n}\n\nexports.version = b.version\nexports.renderToReadableStream = b.renderToReadableStream\nexports.renderToString = error\nexports.renderToStaticMarkup = error\nif (b.resume) {\n  exports.resume = b.resume\n}\nif (b.renderToPipeableStream) {\n  exports.renderToPipeableStream = b.renderToPipeableStream\n}\nif (b.resumeToPipeableStream) {\n  exports.resumeToPipeableStream = b.resumeToPipeableStream\n}\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  RequestCookies: () => RequestCookies,\n  ResponseCookies: () => ResponseCookies,\n  parseCookie: () => parseCookie,\n  parseSetCookie: () => parseSetCookie,\n  stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n  var _a;\n  const attrs = [\n    \"path\" in c && c.path && `Path=${c.path}`,\n    \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n    \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n    \"domain\" in c && c.domain && `Domain=${c.domain}`,\n    \"secure\" in c && c.secure && \"Secure\",\n    \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n    \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n    \"partitioned\" in c && c.partitioned && \"Partitioned\",\n    \"priority\" in c && c.priority && `Priority=${c.priority}`\n  ].filter(Boolean);\n  const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n  return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n  const map = /* @__PURE__ */ new Map();\n  for (const pair of cookie.split(/; */)) {\n    if (!pair)\n      continue;\n    const splitAt = pair.indexOf(\"=\");\n    if (splitAt === -1) {\n      map.set(pair, \"true\");\n      continue;\n    }\n    const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n    try {\n      map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n    } catch {\n    }\n  }\n  return map;\n}\nfunction parseSetCookie(setCookie) {\n  if (!setCookie) {\n    return void 0;\n  }\n  const [[name, value], ...attributes] = parseCookie(setCookie);\n  const {\n    domain,\n    expires,\n    httponly,\n    maxage,\n    path,\n    samesite,\n    secure,\n    partitioned,\n    priority\n  } = Object.fromEntries(\n    attributes.map(([key, value2]) => [\n      key.toLowerCase().replace(/-/g, \"\"),\n      value2\n    ])\n  );\n  const cookie = {\n    name,\n    value: decodeURIComponent(value),\n    domain,\n    ...expires && { expires: new Date(expires) },\n    ...httponly && { httpOnly: true },\n    ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n    path,\n    ...samesite && { sameSite: parseSameSite(samesite) },\n    ...secure && { secure: true },\n    ...priority && { priority: parsePriority(priority) },\n    ...partitioned && { partitioned: true }\n  };\n  return compact(cookie);\n}\nfunction compact(t) {\n  const newT = {};\n  for (const key in t) {\n    if (t[key]) {\n      newT[key] = t[key];\n    }\n  }\n  return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n  string = string.toLowerCase();\n  return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n  string = string.toLowerCase();\n  return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n  if (!cookiesString)\n    return [];\n  var cookiesStrings = [];\n  var pos = 0;\n  var start;\n  var ch;\n  var lastComma;\n  var nextStart;\n  var cookiesSeparatorFound;\n  function skipWhitespace() {\n    while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n      pos += 1;\n    }\n    return pos < cookiesString.length;\n  }\n  function notSpecialChar() {\n    ch = cookiesString.charAt(pos);\n    return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n  }\n  while (pos < cookiesString.length) {\n    start = pos;\n    cookiesSeparatorFound = false;\n    while (skipWhitespace()) {\n      ch = cookiesString.charAt(pos);\n      if (ch === \",\") {\n        lastComma = pos;\n        pos += 1;\n        skipWhitespace();\n        nextStart = pos;\n        while (pos < cookiesString.length && notSpecialChar()) {\n          pos += 1;\n        }\n        if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n          cookiesSeparatorFound = true;\n          pos = nextStart;\n          cookiesStrings.push(cookiesString.substring(start, lastComma));\n          start = pos;\n        } else {\n          pos = lastComma + 1;\n        }\n      } else {\n        pos += 1;\n      }\n    }\n    if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n      cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n    }\n  }\n  return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n  constructor(requestHeaders) {\n    /** @internal */\n    this._parsed = /* @__PURE__ */ new Map();\n    this._headers = requestHeaders;\n    const header = requestHeaders.get(\"cookie\");\n    if (header) {\n      const parsed = parseCookie(header);\n      for (const [name, value] of parsed) {\n        this._parsed.set(name, { name, value });\n      }\n    }\n  }\n  [Symbol.iterator]() {\n    return this._parsed[Symbol.iterator]();\n  }\n  /**\n   * The amount of cookies received from the client\n   */\n  get size() {\n    return this._parsed.size;\n  }\n  get(...args) {\n    const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n    return this._parsed.get(name);\n  }\n  getAll(...args) {\n    var _a;\n    const all = Array.from(this._parsed);\n    if (!args.length) {\n      return all.map(([_, value]) => value);\n    }\n    const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n    return all.filter(([n]) => n === name).map(([_, value]) => value);\n  }\n  has(name) {\n    return this._parsed.has(name);\n  }\n  set(...args) {\n    const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n    const map = this._parsed;\n    map.set(name, { name, value });\n    this._headers.set(\n      \"cookie\",\n      Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n    );\n    return this;\n  }\n  /**\n   * Delete the cookies matching the passed name or names in the request.\n   */\n  delete(names) {\n    const map = this._parsed;\n    const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n    this._headers.set(\n      \"cookie\",\n      Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n    );\n    return result;\n  }\n  /**\n   * Delete all the cookies in the cookies in the request.\n   */\n  clear() {\n    this.delete(Array.from(this._parsed.keys()));\n    return this;\n  }\n  /**\n   * Format the cookies in the request as a string for logging\n   */\n  [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n    return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n  }\n  toString() {\n    return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n  }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n  constructor(responseHeaders) {\n    /** @internal */\n    this._parsed = /* @__PURE__ */ new Map();\n    var _a, _b, _c;\n    this._headers = responseHeaders;\n    const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n    const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n    for (const cookieString of cookieStrings) {\n      const parsed = parseSetCookie(cookieString);\n      if (parsed)\n        this._parsed.set(parsed.name, parsed);\n    }\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n   */\n  get(...args) {\n    const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n    return this._parsed.get(key);\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n   */\n  getAll(...args) {\n    var _a;\n    const all = Array.from(this._parsed.values());\n    if (!args.length) {\n      return all;\n    }\n    const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n    return all.filter((c) => c.name === key);\n  }\n  has(name) {\n    return this._parsed.has(name);\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n   */\n  set(...args) {\n    const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n    const map = this._parsed;\n    map.set(name, normalizeCookie({ name, value, ...cookie }));\n    replace(map, this._headers);\n    return this;\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n   */\n  delete(...args) {\n    const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n    return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n  }\n  [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n    return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n  }\n  toString() {\n    return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n  }\n};\nfunction replace(bag, headers) {\n  headers.delete(\"set-cookie\");\n  for (const [, value] of bag) {\n    const serialized = stringifyCookie(value);\n    headers.append(\"set-cookie\", serialized);\n  }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n  if (typeof cookie.expires === \"number\") {\n    cookie.expires = new Date(cookie.expires);\n  }\n  if (cookie.maxAge) {\n    cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n  }\n  if (cookie.path === null || cookie.path === void 0) {\n    cookie.path = \"/\";\n  }\n  return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  RequestCookies,\n  ResponseCookies,\n  parseCookie,\n  parseSetCookie,\n  stringifyCookie\n});\n","(function(){\"use strict\";var e={810:function(e,t,i){const{parseContentType:s}=i(827);function getInstance(e){const t=e.headers;const i=s(t[\"content-type\"]);if(!i)throw new Error(\"Malformed content type\");for(const s of r){const r=s.detect(i);if(!r)continue;const n={limits:e.limits,headers:t,conType:i,highWaterMark:undefined,fileHwm:undefined,defCharset:undefined,defParamCharset:undefined,preservePath:false};if(e.highWaterMark)n.highWaterMark=e.highWaterMark;if(e.fileHwm)n.fileHwm=e.fileHwm;n.defCharset=e.defCharset;n.defParamCharset=e.defParamCharset;n.preservePath=e.preservePath;return new s(n)}throw new Error(`Unsupported content type: ${t[\"content-type\"]}`)}const r=[i(336),i(183)].filter((function(e){return typeof e.detect===\"function\"}));e.exports=e=>{if(typeof e!==\"object\"||e===null)e={};if(typeof e.headers!==\"object\"||e.headers===null||typeof e.headers[\"content-type\"]!==\"string\"){throw new Error(\"Missing Content-Type\")}return getInstance(e)}},336:function(e,t,i){const{Readable:s,Writable:r}=i(203);const n=i(667);const{basename:a,convertToUTF8:o,getDecoder:f,parseContentType:l,parseDisposition:c}=i(827);const h=Buffer.from(\"\\r\\n\");const u=Buffer.from(\"\\r\");const d=Buffer.from(\"-\");function noop(){}const _=2e3;const b=16*1024;const p=0;const y=1;const m=2;class HeaderParser{constructor(e){this.header=Object.create(null);this.pairCount=0;this.byteCount=0;this.state=p;this.name=\"\";this.value=\"\";this.crlf=0;this.cb=e}reset(){this.header=Object.create(null);this.pairCount=0;this.byteCount=0;this.state=p;this.name=\"\";this.value=\"\";this.crlf=0}push(e,t,i){let s=t;while(t<i){switch(this.state){case p:{let r=false;for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(g[i]!==1){if(i!==58)return-1;this.name+=e.latin1Slice(s,t);if(this.name.length===0)return-1;++t;r=true;this.state=y;break}}if(!r){this.name+=e.latin1Slice(s,t);break}}case y:{let r=false;for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(i!==32&&i!==9){s=t;r=true;this.state=m;break}}if(!r)break}case m:switch(this.crlf){case 0:for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(w[i]!==1){if(i!==13)return-1;++this.crlf;break}}this.value+=e.latin1Slice(s,t++);break;case 1:if(this.byteCount===b)return-1;++this.byteCount;if(e[t++]!==10)return-1;++this.crlf;break;case 2:{if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(i===32||i===9){s=t;this.crlf=0}else{if(++this.pairCount<_){this.name=this.name.toLowerCase();if(this.header[this.name]===undefined)this.header[this.name]=[this.value];else this.header[this.name].push(this.value)}if(i===13){++this.crlf;++t}else{s=t;this.crlf=0;this.state=p;this.name=\"\";this.value=\"\"}}break}case 3:{if(this.byteCount===b)return-1;++this.byteCount;if(e[t++]!==10)return-1;const i=this.header;this.reset();this.cb(i);return t}}break}}return t}}class FileStream extends s{constructor(e,t){super(e);this.truncated=false;this._readcb=null;this.once(\"end\",(()=>{this._read();if(--t._fileEndsLeft===0&&t._finalcb){const e=t._finalcb;t._finalcb=null;process.nextTick(e)}}))}_read(e){const t=this._readcb;if(t){this._readcb=null;t()}}}const k={push:(e,t)=>{},destroy:()=>{}};function callAndUnsetCb(e,t){const i=e._writecb;e._writecb=null;if(t)e.destroy(t);else if(i)i()}function nullDecoder(e,t){return e}class Multipart extends r{constructor(e){const t={autoDestroy:true,emitClose:true,highWaterMark:typeof e.highWaterMark===\"number\"?e.highWaterMark:undefined};super(t);if(!e.conType.params||typeof e.conType.params.boundary!==\"string\")throw new Error(\"Multipart: Boundary not found\");const i=e.conType.params.boundary;const s=typeof e.defParamCharset===\"string\"&&e.defParamCharset?f(e.defParamCharset):nullDecoder;const r=e.defCharset||\"utf8\";const _=e.preservePath;const b={autoDestroy:true,emitClose:true,highWaterMark:typeof e.fileHwm===\"number\"?e.fileHwm:undefined};const p=e.limits;const y=p&&typeof p.fieldSize===\"number\"?p.fieldSize:1*1024*1024;const m=p&&typeof p.fileSize===\"number\"?p.fileSize:Infinity;const g=p&&typeof p.files===\"number\"?p.files:Infinity;const w=p&&typeof p.fields===\"number\"?p.fields:Infinity;const C=p&&typeof p.parts===\"number\"?p.parts:Infinity;let S=-1;let P=0;let T=0;let v=false;this._fileEndsLeft=0;this._fileStream=undefined;this._complete=false;let x=0;let z;let B=0;let E;let M;let L;let A;let K=false;let D=false;let U=false;this._hparser=null;const V=new HeaderParser((e=>{this._hparser=null;v=false;L=\"text/plain\";E=r;M=\"7bit\";A=undefined;K=false;let t;if(!e[\"content-disposition\"]){v=true;return}const i=c(e[\"content-disposition\"][0],s);if(!i||i.type!==\"form-data\"){v=true;return}if(i.params){if(i.params.name)A=i.params.name;if(i.params[\"filename*\"])t=i.params[\"filename*\"];else if(i.params.filename)t=i.params.filename;if(t!==undefined&&!_)t=a(t)}if(e[\"content-type\"]){const t=l(e[\"content-type\"][0]);if(t){L=`${t.type}/${t.subtype}`;if(t.params&&typeof t.params.charset===\"string\")E=t.params.charset.toLowerCase()}}if(e[\"content-transfer-encoding\"])M=e[\"content-transfer-encoding\"][0].toLowerCase();if(L===\"application/octet-stream\"||t!==undefined){if(T===g){if(!D){D=true;this.emit(\"filesLimit\")}v=true;return}++T;if(this.listenerCount(\"file\")===0){v=true;return}x=0;this._fileStream=new FileStream(b,this);++this._fileEndsLeft;this.emit(\"file\",A,this._fileStream,{filename:t,encoding:M,mimeType:L})}else{if(P===w){if(!U){U=true;this.emit(\"fieldsLimit\")}v=true;return}++P;if(this.listenerCount(\"field\")===0){v=true;return}z=[];B=0}}));let W=0;const ssCb=(e,t,i,s,r)=>{e:while(t){if(this._hparser!==null){const e=this._hparser.push(t,i,s);if(e===-1){this._hparser=null;V.reset();this.emit(\"error\",new Error(\"Malformed part header\"));break}i=e}if(i===s)break;if(W!==0){if(W===1){switch(t[i]){case 45:W=2;++i;break;case 13:W=3;++i;break;default:W=0}if(i===s)return}if(W===2){W=0;if(t[i]===45){this._complete=true;this._bparser=k;return}const e=this._writecb;this._writecb=noop;ssCb(false,d,0,1,false);this._writecb=e}else if(W===3){W=0;if(t[i]===10){++i;if(S>=C)break;this._hparser=V;if(i===s)break;continue e}else{const e=this._writecb;this._writecb=noop;ssCb(false,u,0,1,false);this._writecb=e}}}if(!v){if(this._fileStream){let e;const n=Math.min(s-i,m-x);if(!r){e=Buffer.allocUnsafe(n);t.copy(e,0,i,i+n)}else{e=t.slice(i,i+n)}x+=e.length;if(x===m){if(e.length>0)this._fileStream.push(e);this._fileStream.emit(\"limit\");this._fileStream.truncated=true;v=true}else if(!this._fileStream.push(e)){if(this._writecb)this._fileStream._readcb=this._writecb;this._writecb=null}}else if(z!==undefined){let e;const n=Math.min(s-i,y-B);if(!r){e=Buffer.allocUnsafe(n);t.copy(e,0,i,i+n)}else{e=t.slice(i,i+n)}B+=n;z.push(e);if(B===y){v=true;K=true}}}break}if(e){W=1;if(this._fileStream){this._fileStream.push(null);this._fileStream=null}else if(z!==undefined){let e;switch(z.length){case 0:e=\"\";break;case 1:e=o(z[0],E,0);break;default:e=o(Buffer.concat(z,B),E,0)}z=undefined;B=0;this.emit(\"field\",A,e,{nameTruncated:false,valueTruncated:K,encoding:M,mimeType:L})}if(++S===C)this.emit(\"partsLimit\")}};this._bparser=new n(`\\r\\n--${i}`,ssCb);this._writecb=null;this._finalcb=null;this.write(h)}static detect(e){return e.type===\"multipart\"&&e.subtype===\"form-data\"}_write(e,t,i){this._writecb=i;this._bparser.push(e,0);if(this._writecb)callAndUnsetCb(this)}_destroy(e,t){this._hparser=null;this._bparser=k;if(!e)e=checkEndState(this);const i=this._fileStream;if(i){this._fileStream=null;i.destroy(e)}t(e)}_final(e){this._bparser.destroy();if(!this._complete)return e(new Error(\"Unexpected end of form\"));if(this._fileEndsLeft)this._finalcb=finalcb.bind(null,this,e);else finalcb(this,e)}}function finalcb(e,t,i){if(i)return t(i);i=checkEndState(e);t(i)}function checkEndState(e){if(e._hparser)return new Error(\"Malformed part header\");const t=e._fileStream;if(t){e._fileStream=null;t.destroy(new Error(\"Unexpected end of file\"))}if(!e._complete)return new Error(\"Unexpected end of form\")}const g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];const w=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];e.exports=Multipart},183:function(e,t,i){const{Writable:s}=i(203);const{getDecoder:r}=i(827);class URLEncoded extends s{constructor(e){const t={autoDestroy:true,emitClose:true,highWaterMark:typeof e.highWaterMark===\"number\"?e.highWaterMark:undefined};super(t);let i=e.defCharset||\"utf8\";if(e.conType.params&&typeof e.conType.params.charset===\"string\")i=e.conType.params.charset;this.charset=i;const s=e.limits;this.fieldSizeLimit=s&&typeof s.fieldSize===\"number\"?s.fieldSize:1*1024*1024;this.fieldsLimit=s&&typeof s.fields===\"number\"?s.fields:Infinity;this.fieldNameSizeLimit=s&&typeof s.fieldNameSize===\"number\"?s.fieldNameSize:100;this._inKey=true;this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;this._fields=0;this._key=\"\";this._val=\"\";this._byte=-2;this._lastPos=0;this._encode=0;this._decoder=r(i)}static detect(e){return e.type===\"application\"&&e.subtype===\"x-www-form-urlencoded\"}_write(e,t,i){if(this._fields>=this.fieldsLimit)return i();let s=0;const r=e.length;this._lastPos=0;if(this._byte!==-2){s=readPctEnc(this,e,s,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();if(this._inKey)++this._bytesKey;else++this._bytesVal}e:while(s<r){if(this._inKey){s=skipKeyBytes(this,e,s,r);while(s<r){switch(e[s]){case 61:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._key=this._decoder(this._key,this._encode);this._encode=0;this._inKey=false;continue e;case 38:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._key=this._decoder(this._key,this._encode);this._encode=0;if(this._bytesKey>0){this.emit(\"field\",this._key,\"\",{nameTruncated:this._keyTrunc,valueTruncated:false,encoding:this.charset,mimeType:\"text/plain\"})}this._key=\"\";this._val=\"\";this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;if(++this._fields>=this.fieldsLimit){this.emit(\"fieldsLimit\");return i()}continue;case 43:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._key+=\" \";this._lastPos=s+1;break;case 37:if(this._encode===0)this._encode=1;if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=s+1;this._byte=-1;s=readPctEnc(this,e,s+1,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();++this._bytesKey;s=skipKeyBytes(this,e,s,r);continue}++s;++this._bytesKey;s=skipKeyBytes(this,e,s,r)}if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s)}else{s=skipValBytes(this,e,s,r);while(s<r){switch(e[s]){case 38:if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._inKey=true;this._val=this._decoder(this._val,this._encode);this._encode=0;if(this._bytesKey>0||this._bytesVal>0){this.emit(\"field\",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:\"text/plain\"})}this._key=\"\";this._val=\"\";this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;if(++this._fields>=this.fieldsLimit){this.emit(\"fieldsLimit\");return i()}continue e;case 43:if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._val+=\" \";this._lastPos=s+1;break;case 37:if(this._encode===0)this._encode=1;if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._lastPos=s+1;this._byte=-1;s=readPctEnc(this,e,s+1,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();++this._bytesVal;s=skipValBytes(this,e,s,r);continue}++s;++this._bytesVal;s=skipValBytes(this,e,s,r)}if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s)}}i()}_final(e){if(this._byte!==-2)return e(new Error(\"Malformed urlencoded form\"));if(!this._inKey||this._bytesKey>0||this._bytesVal>0){if(this._inKey)this._key=this._decoder(this._key,this._encode);else this._val=this._decoder(this._val,this._encode);this.emit(\"field\",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:\"text/plain\"})}e()}}function readPctEnc(e,t,i,s){if(i>=s)return s;if(e._byte===-1){const r=n[t[i++]];if(r===-1)return-1;if(r>=8)e._encode=2;if(i<s){const s=n[t[i++]];if(s===-1)return-1;if(e._inKey)e._key+=String.fromCharCode((r<<4)+s);else e._val+=String.fromCharCode((r<<4)+s);e._byte=-2;e._lastPos=i}else{e._byte=r}}else{const s=n[t[i++]];if(s===-1)return-1;if(e._inKey)e._key+=String.fromCharCode((e._byte<<4)+s);else e._val+=String.fromCharCode((e._byte<<4)+s);e._byte=-2;e._lastPos=i}return i}function skipKeyBytes(e,t,i,s){if(e._bytesKey>e.fieldNameSizeLimit){if(!e._keyTrunc){if(e._lastPos<i)e._key+=t.latin1Slice(e._lastPos,i-1)}e._keyTrunc=true;for(;i<s;++i){const s=t[i];if(s===61||s===38)break;++e._bytesKey}e._lastPos=i}return i}function skipValBytes(e,t,i,s){if(e._bytesVal>e.fieldSizeLimit){if(!e._valTrunc){if(e._lastPos<i)e._val+=t.latin1Slice(e._lastPos,i-1)}e._valTrunc=true;for(;i<s;++i){if(t[i]===38)break;++e._bytesVal}e._lastPos=i}return i}const n=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports=URLEncoded},827:function(e){function parseContentType(e){if(e.length===0)return;const t=Object.create(null);let s=0;for(;s<e.length;++s){const t=e.charCodeAt(s);if(i[t]!==1){if(t!==47||s===0)return;break}}if(s===e.length)return;const r=e.slice(0,s).toLowerCase();const n=++s;for(;s<e.length;++s){const r=e.charCodeAt(s);if(i[r]!==1){if(s===n)return;if(parseContentTypeParams(e,s,t)===undefined)return;break}}if(s===n)return;const a=e.slice(n,s).toLowerCase();return{type:r,subtype:a,params:t}}function parseContentTypeParams(e,t,r){while(t<e.length){for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)break;if(e.charCodeAt(t++)!==59)return;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)return;let n;const a=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(s!==61)return;break}}if(t===e.length)return;n=e.slice(a,t);++t;if(t===e.length)return;let o=\"\";let f;if(e.charCodeAt(t)===34){f=++t;let i=false;for(;t<e.length;++t){const r=e.charCodeAt(t);if(r===92){if(i){f=t;i=false}else{o+=e.slice(f,t);i=true}continue}if(r===34){if(i){f=t;i=false;continue}o+=e.slice(f,t);break}if(i){f=t-1;i=false}if(s[r]!==1)return}if(t===e.length)return;++t}else{f=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(t===f)return;break}}o=e.slice(f,t)}n=n.toLowerCase();if(r[n]===undefined)r[n]=o}return r}function parseDisposition(e,t){if(e.length===0)return;const s=Object.create(null);let r=0;for(;r<e.length;++r){const n=e.charCodeAt(r);if(i[n]!==1){if(parseDispositionParams(e,r,s,t)===undefined)return;break}}const n=e.slice(0,r).toLowerCase();return{type:n,params:s}}function parseDispositionParams(e,t,o,f){while(t<e.length){for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)break;if(e.charCodeAt(t++)!==59)return;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)return;let l;const c=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(s===61)break;return}}if(t===e.length)return;let h=\"\";let u;let d;l=e.slice(c,t);if(l.charCodeAt(l.length-1)===42){const i=++t;for(;t<e.length;++t){const i=e.charCodeAt(t);if(r[i]!==1){if(i!==39)return;break}}if(t===e.length)return;d=e.slice(i,t);++t;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i===39)break}if(t===e.length)return;++t;if(t===e.length)return;u=t;let s=0;for(;t<e.length;++t){const i=e.charCodeAt(t);if(n[i]!==1){if(i===37){let i;let r;if(t+2<e.length&&(i=a[e.charCodeAt(t+1)])!==-1&&(r=a[e.charCodeAt(t+2)])!==-1){const n=(i<<4)+r;h+=e.slice(u,t);h+=String.fromCharCode(n);t+=2;u=t+1;if(n>=128)s=2;else if(s===0)s=1;continue}return}break}}h+=e.slice(u,t);h=convertToUTF8(h,d,s);if(h===undefined)return}else{++t;if(t===e.length)return;if(e.charCodeAt(t)===34){u=++t;let i=false;for(;t<e.length;++t){const r=e.charCodeAt(t);if(r===92){if(i){u=t;i=false}else{h+=e.slice(u,t);i=true}continue}if(r===34){if(i){u=t;i=false;continue}h+=e.slice(u,t);break}if(i){u=t-1;i=false}if(s[r]!==1)return}if(t===e.length)return;++t}else{u=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(t===u)return;break}}h=e.slice(u,t)}h=f(h,2);if(h===undefined)return}l=l.toLowerCase();if(o[l]===undefined)o[l]=h}return o}function getDecoder(e){let i;while(true){switch(e){case\"utf-8\":case\"utf8\":return t.utf8;case\"latin1\":case\"ascii\":case\"us-ascii\":case\"iso-8859-1\":case\"iso8859-1\":case\"iso88591\":case\"iso_8859-1\":case\"windows-1252\":case\"iso_8859-1:1987\":case\"cp1252\":case\"x-cp1252\":return t.latin1;case\"utf16le\":case\"utf-16le\":case\"ucs2\":case\"ucs-2\":return t.utf16le;case\"base64\":return t.base64;default:if(i===undefined){i=true;e=e.toLowerCase();continue}return t.other.bind(e)}}}const t={utf8:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\"){if(t<2)return e;e=Buffer.from(e,\"latin1\")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")return e;return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");try{const t=new TextDecoder(this);return t.decode(e)}catch{}}};function convertToUTF8(e,t,i){const s=getDecoder(t);if(s)return s(e,i)}function basename(e){if(typeof e!==\"string\")return\"\";for(let t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===\"..\"||e===\".\"?\"\":e}}return e===\"..\"||e===\".\"?\"\":e}const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];const s=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports={basename:basename,convertToUTF8:convertToUTF8,getDecoder:getDecoder,parseContentType:parseContentType,parseDisposition:parseDisposition}},667:function(e){function memcmp(e,t,i,s,r){for(let n=0;n<r;++n){if(e[t+n]!==i[s+n])return false}return true}class SBMH{constructor(e,t){if(typeof t!==\"function\")throw new Error(\"Missing match callback\");if(typeof e===\"string\")e=Buffer.from(e);else if(!Buffer.isBuffer(e))throw new Error(`Expected Buffer for needle, got ${typeof e}`);const i=e.length;this.maxMatches=Infinity;this.matches=0;this._cb=t;this._lookbehindSize=0;this._needle=e;this._bufPos=0;this._lookbehind=Buffer.allocUnsafe(i);this._occ=[i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i];if(i>1){for(let t=0;t<i-1;++t)this._occ[e[t]]=i-1-t}}reset(){this.matches=0;this._lookbehindSize=0;this._bufPos=0}push(e,t){let i;if(!Buffer.isBuffer(e))e=Buffer.from(e,\"latin1\");const s=e.length;this._bufPos=t||0;while(i!==s&&this.matches<this.maxMatches)i=feed(this,e);return i}destroy(){const e=this._lookbehindSize;if(e)this._cb(false,this._lookbehind,0,e,false);this.reset()}}function feed(e,t){const i=t.length;const s=e._needle;const r=s.length;let n=-e._lookbehindSize;const a=r-1;const o=s[a];const f=i-r;const l=e._occ;const c=e._lookbehind;if(n<0){while(n<0&&n<=f){const i=n+a;const s=i<0?c[e._lookbehindSize+i]:t[i];if(s===o&&matchNeedle(e,t,n,a)){e._lookbehindSize=0;++e.matches;if(n>-e._lookbehindSize)e._cb(true,c,0,e._lookbehindSize+n,false);else e._cb(true,undefined,0,0,true);return e._bufPos=n+r}n+=l[s]}while(n<0&&!matchNeedle(e,t,n,i-n))++n;if(n<0){const s=e._lookbehindSize+n;if(s>0){e._cb(false,c,0,s,false)}e._lookbehindSize-=s;c.copy(c,0,s,e._lookbehindSize);c.set(t,e._lookbehindSize);e._lookbehindSize+=i;e._bufPos=i;return i}e._cb(false,c,0,e._lookbehindSize,false);e._lookbehindSize=0}n+=e._bufPos;const h=s[0];while(n<=f){const i=t[n+a];if(i===o&&t[n]===h&&memcmp(s,0,t,n,a)){++e.matches;if(n>0)e._cb(true,t,e._bufPos,n,true);else e._cb(true,undefined,0,0,true);return e._bufPos=n+r}n+=l[i]}while(n<i){if(t[n]!==h||!memcmp(t,n,s,0,i-n)){++n;continue}t.copy(c,0,n,i);e._lookbehindSize=i-n;break}if(n>0)e._cb(false,t,e._bufPos,n<i?n:i,true);e._bufPos=i;return i}function matchNeedle(e,t,i,s){const r=e._lookbehind;const n=e._lookbehindSize;const a=e._needle;for(let e=0;e<s;++e,++i){const s=i<0?r[n+i]:t[i];if(s!==a[e])return false}return true}e.exports=SBMH},203:function(e){e.exports=require(\"stream\")}};var t={};function __nccwpck_require__(i){var s=t[i];if(s!==undefined){return s.exports}var r=t[i]={exports:{}};var n=true;try{e[i].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete t[i]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var i=__nccwpck_require__(810);module.exports=i})();","(()=>{\"use strict\";var e={86:e=>{\n/*!\n * bytes\n * Copyright(c) 2012-2014 TJ Holowaychuk\n * Copyright(c) 2015 Jed Watson\n * MIT Licensed\n */\ne.exports=bytes;e.exports.format=format;e.exports.parse=parse;var r=/\\B(?=(\\d{3})+(?!\\d))/g;var a=/(?:\\.0*|(\\.[^0]+)0+)$/;var t={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)};var i=/^((-|\\+)?(\\d+(?:\\.\\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes(e,r){if(typeof e===\"string\"){return parse(e)}if(typeof e===\"number\"){return format(e,r)}return null}function format(e,i){if(!Number.isFinite(e)){return null}var n=Math.abs(e);var o=i&&i.thousandsSeparator||\"\";var s=i&&i.unitSeparator||\"\";var f=i&&i.decimalPlaces!==undefined?i.decimalPlaces:2;var u=Boolean(i&&i.fixedDecimals);var p=i&&i.unit||\"\";if(!p||!t[p.toLowerCase()]){if(n>=t.pb){p=\"PB\"}else if(n>=t.tb){p=\"TB\"}else if(n>=t.gb){p=\"GB\"}else if(n>=t.mb){p=\"MB\"}else if(n>=t.kb){p=\"KB\"}else{p=\"B\"}}var b=e/t[p.toLowerCase()];var l=b.toFixed(f);if(!u){l=l.replace(a,\"$1\")}if(o){l=l.split(\".\").map((function(e,a){return a===0?e.replace(r,o):e})).join(\".\")}return l+s+p}function parse(e){if(typeof e===\"number\"&&!isNaN(e)){return e}if(typeof e!==\"string\"){return null}var r=i.exec(e);var a;var n=\"b\";if(!r){a=parseInt(e,10);n=\"b\"}else{a=parseFloat(r[1]);n=r[4].toLowerCase()}return Math.floor(t[n]*a)}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var i=r[a]={exports:{}};var n=true;try{e[a](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete r[a]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(86);module.exports=a})();","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p<o.length;p++){var f=o[p];var u=f.indexOf(\"=\");if(u<0){continue}var v=f.substr(0,u).trim();var c=f.substr(++u,f.length).trim();if('\"'==c[0]){c=c.slice(1,-1)}if(undefined==t[v]){t[v]=tryDecode(c,s)}}return t}function serialize(e,r,i){var a=i||{};var o=a.encode||t;if(typeof o!==\"function\"){throw new TypeError(\"option encode is invalid\")}if(!n.test(e)){throw new TypeError(\"argument name is invalid\")}var s=o(r);if(s&&!n.test(s)){throw new TypeError(\"argument val is invalid\")}var p=e+\"=\"+s;if(null!=a.maxAge){var f=a.maxAge-0;if(isNaN(f)||!isFinite(f)){throw new TypeError(\"option maxAge is invalid\")}p+=\"; Max-Age=\"+Math.floor(f)}if(a.domain){if(!n.test(a.domain)){throw new TypeError(\"option domain is invalid\")}p+=\"; Domain=\"+a.domain}if(a.path){if(!n.test(a.path)){throw new TypeError(\"option path is invalid\")}p+=\"; Path=\"+a.path}if(a.expires){if(typeof a.expires.toUTCString!==\"function\"){throw new TypeError(\"option expires is invalid\")}p+=\"; Expires=\"+a.expires.toUTCString()}if(a.httpOnly){p+=\"; HttpOnly\"}if(a.secure){p+=\"; Secure\"}if(a.sameSite){var u=typeof a.sameSite===\"string\"?a.sameSite.toLowerCase():a.sameSite;switch(u){case true:p+=\"; SameSite=Strict\";break;case\"lax\":p+=\"; SameSite=Lax\";break;case\"strict\":p+=\"; SameSite=Strict\";break;case\"none\":p+=\"; SameSite=None\";break;default:throw new TypeError(\"option sameSite is invalid\")}}return p}function tryDecode(e,r){try{return r(e)}catch(r){return e}}})();module.exports=e})();","(()=>{\"use strict\";var e={234:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++){o[i]=r[i].fn}return o};EventEmitter.prototype.listenerCount=function listenerCount(e){var t=n?n+e:e,r=this._events[t];if(!r)return 0;if(r.fn)return 1;return r.length};EventEmitter.prototype.emit=function emit(e,t,r,i,s,o){var u=n?n+e:e;if(!this._events[u])return false;var a=this._events[u],l=arguments.length,c,h;if(a.fn){if(a.once)this.removeListener(e,a.fn,undefined,true);switch(l){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,t),true;case 3:return a.fn.call(a.context,t,r),true;case 4:return a.fn.call(a.context,t,r,i),true;case 5:return a.fn.call(a.context,t,r,i,s),true;case 6:return a.fn.call(a.context,t,r,i,s,o),true}for(h=1,c=new Array(l-1);h<l;h++){c[h-1]=arguments[h]}a.fn.apply(a.context,c)}else{var _=a.length,f;for(h=0;h<_;h++){if(a[h].once)this.removeListener(e,a[h].fn,undefined,true);switch(l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,t);break;case 3:a[h].fn.call(a[h].context,t,r);break;case 4:a[h].fn.call(a[h].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++){c[f-1]=arguments[f]}a[h].fn.apply(a[h].context,c)}}}return true};EventEmitter.prototype.on=function on(e,t,n){return addListener(this,e,t,n,false)};EventEmitter.prototype.once=function once(e,t,n){return addListener(this,e,t,n,true)};EventEmitter.prototype.removeListener=function removeListener(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t){clearEvent(this,s);return this}var o=this._events[s];if(o.fn){if(o.fn===t&&(!i||o.once)&&(!r||o.context===r)){clearEvent(this,s)}}else{for(var u=0,a=[],l=o.length;u<l;u++){if(o[u].fn!==t||i&&!o[u].once||r&&o[u].context!==r){a.push(o[u])}}if(a.length)this._events[s]=a.length===1?a[0]:a;else clearEvent(this,s)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t;if(e){t=n?n+e:e;if(this._events[t])clearEvent(this,t)}else{this._events=new Events;this._eventsCount=0}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.addListener=EventEmitter.prototype.on;EventEmitter.prefixed=n;EventEmitter.EventEmitter=EventEmitter;if(true){e.exports=EventEmitter}},274:e=>{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},294:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},838:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(294);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},138:(e,t,n)=>{const r=n(274);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(234);const r=__nccwpck_require__(138);const i=__nccwpck_require__(838);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--;this._tryToStartAnother();this.emit(\"next\")}_resolvePromises(){this._resolveEmpty();this._resolveEmpty=empty;if(this._pendingCount===0){this._resolveIdle();this._resolveIdle=empty;this.emit(\"idle\")}}_onResumeInterval(){this._onInterval();this._initializeIntervalIfNeeded();this._timeoutId=undefined}_isIntervalPaused(){const e=Date.now();if(this._intervalId===undefined){const t=this._intervalEnd-e;if(t<0){this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}else{if(this._timeoutId===undefined){this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e[\"default\"]=PQueue})();module.exports=n})();","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var n=e;Object.defineProperty(n,\"__esModule\",{value:true});n.pathToRegexp=n.tokensToRegexp=n.regexpToFunction=n.match=n.tokensToFunction=n.compile=n.parse=void 0;function lexer(e){var n=[];var r=0;while(r<e.length){var t=e[r];if(t===\"*\"||t===\"+\"||t===\"?\"){n.push({type:\"MODIFIER\",index:r,value:e[r++]});continue}if(t===\"\\\\\"){n.push({type:\"ESCAPED_CHAR\",index:r++,value:e[r++]});continue}if(t===\"{\"){n.push({type:\"OPEN\",index:r,value:e[r++]});continue}if(t===\"}\"){n.push({type:\"CLOSE\",index:r,value:e[r++]});continue}if(t===\":\"){var a=\"\";var i=r+1;while(i<e.length){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError(\"Missing parameter name at \".concat(r));n.push({type:\"NAME\",index:r,value:a});r=i;continue}if(t===\"(\"){var c=1;var f=\"\";var i=r+1;if(e[i]===\"?\"){throw new TypeError('Pattern cannot start with \"?\" at '.concat(i))}while(i<e.length){if(e[i]===\"\\\\\"){f+=e[i++]+e[i++];continue}if(e[i]===\")\"){c--;if(c===0){i++;break}}else if(e[i]===\"(\"){c++;if(e[i+1]!==\"?\"){throw new TypeError(\"Capturing groups are not allowed at \".concat(i))}}f+=e[i++]}if(c)throw new TypeError(\"Unbalanced pattern at \".concat(r));if(!f)throw new TypeError(\"Missing pattern at \".concat(r));n.push({type:\"PATTERN\",index:r,value:f});r=i;continue}n.push({type:\"CHAR\",index:r,value:e[r++]})}n.push({type:\"END\",index:r,value:\"\"});return n}function parse(e,n){if(n===void 0){n={}}var r=lexer(e);var t=n.prefixes,a=t===void 0?\"./\":t,i=n.delimiter,o=i===void 0?\"/#?\":i;var c=[];var f=0;var u=0;var p=\"\";var tryConsume=function(e){if(u<r.length&&r[u].type===e)return r[u++].value};var mustConsume=function(e){var n=tryConsume(e);if(n!==undefined)return n;var t=r[u],a=t.type,i=t.index;throw new TypeError(\"Unexpected \".concat(a,\" at \").concat(i,\", expected \").concat(e))};var consumeText=function(){var e=\"\";var n;while(n=tryConsume(\"CHAR\")||tryConsume(\"ESCAPED_CHAR\")){e+=n}return e};var isSafe=function(e){for(var n=0,r=o;n<r.length;n++){var t=r[n];if(e.indexOf(t)>-1)return true}return false};var safePattern=function(e){var n=c[c.length-1];var r=e||(n&&typeof n===\"string\"?n:\"\");if(n&&!r){throw new TypeError('Must have text between two parameters, missing text after \"'.concat(n.name,'\"'))}if(!r||isSafe(r))return\"[^\".concat(escapeString(o),\"]+?\");return\"(?:(?!\".concat(escapeString(r),\")[^\").concat(escapeString(o),\"])+?\")};while(u<r.length){var v=tryConsume(\"CHAR\");var s=tryConsume(\"NAME\");var d=tryConsume(\"PATTERN\");if(s||d){var g=v||\"\";if(a.indexOf(g)===-1){p+=g;g=\"\"}if(p){c.push(p);p=\"\"}c.push({name:s||f++,prefix:g,suffix:\"\",pattern:d||safePattern(g),modifier:tryConsume(\"MODIFIER\")||\"\"});continue}var x=v||tryConsume(\"ESCAPED_CHAR\");if(x){p+=x;continue}if(p){c.push(p);p=\"\"}var h=tryConsume(\"OPEN\");if(h){var g=consumeText();var l=tryConsume(\"NAME\")||\"\";var m=tryConsume(\"PATTERN\")||\"\";var T=consumeText();mustConsume(\"CLOSE\");c.push({name:l||(m?f++:\"\"),pattern:l&&!m?safePattern(g):m,prefix:g,suffix:T,modifier:tryConsume(\"MODIFIER\")||\"\"});continue}mustConsume(\"END\")}return c}n.parse=parse;function compile(e,n){return tokensToFunction(parse(e,n),n)}n.compile=compile;function tokensToFunction(e,n){if(n===void 0){n={}}var r=flags(n);var t=n.encode,a=t===void 0?function(e){return e}:t,i=n.validate,o=i===void 0?true:i;var c=e.map((function(e){if(typeof e===\"object\"){return new RegExp(\"^(?:\".concat(e.pattern,\")$\"),r)}}));return function(n){var r=\"\";for(var t=0;t<e.length;t++){var i=e[t];if(typeof i===\"string\"){r+=i;continue}var f=n?n[i.name]:undefined;var u=i.modifier===\"?\"||i.modifier===\"*\";var p=i.modifier===\"*\"||i.modifier===\"+\";if(Array.isArray(f)){if(!p){throw new TypeError('Expected \"'.concat(i.name,'\" to not repeat, but got an array'))}if(f.length===0){if(u)continue;throw new TypeError('Expected \"'.concat(i.name,'\" to not be empty'))}for(var v=0;v<f.length;v++){var s=a(f[v],i);if(o&&!c[t].test(s)){throw new TypeError('Expected all \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix}continue}if(typeof f===\"string\"||typeof f===\"number\"){var s=a(String(f),i);if(o&&!c[t].test(s)){throw new TypeError('Expected \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix;continue}if(u)continue;var d=p?\"an array\":\"a string\";throw new TypeError('Expected \"'.concat(i.name,'\" to be ').concat(d))}return r}}n.tokensToFunction=tokensToFunction;function match(e,n){var r=[];var t=pathToRegexp(e,r,n);return regexpToFunction(t,r,n)}n.match=match;function regexpToFunction(e,n,r){if(r===void 0){r={}}var t=r.decode,a=t===void 0?function(e){return e}:t;return function(r){var t=e.exec(r);if(!t)return false;var i=t[0],o=t.index;var c=Object.create(null);var _loop_1=function(e){if(t[e]===undefined)return\"continue\";var r=n[e-1];if(r.modifier===\"*\"||r.modifier===\"+\"){c[r.name]=t[e].split(r.prefix+r.suffix).map((function(e){return a(e,r)}))}else{c[r.name]=a(t[e],r)}};for(var f=1;f<t.length;f++){_loop_1(f)}return{path:i,index:o,params:c}}}n.regexpToFunction=regexpToFunction;function escapeString(e){return e.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g,\"\\\\$1\")}function flags(e){return e&&e.sensitive?\"\":\"i\"}function regexpToRegexp(e,n){if(!n)return e;var r=/\\((?:\\?<(.*?)>)?(?!\\?)/g;var t=0;var a=r.exec(e.source);while(a){n.push({name:a[1]||t++,prefix:\"\",suffix:\"\",modifier:\"\",pattern:\"\"});a=r.exec(e.source)}return e}function arrayToRegexp(e,n,r){var t=e.map((function(e){return pathToRegexp(e,n,r).source}));return new RegExp(\"(?:\".concat(t.join(\"|\"),\")\"),flags(r))}function stringToRegexp(e,n,r){return tokensToRegexp(parse(e,r),n,r)}function tokensToRegexp(e,n,r){if(r===void 0){r={}}var t=r.strict,a=t===void 0?false:t,i=r.start,o=i===void 0?true:i,c=r.end,f=c===void 0?true:c,u=r.encode,p=u===void 0?function(e){return e}:u,v=r.delimiter,s=v===void 0?\"/#?\":v,d=r.endsWith,g=d===void 0?\"\":d;var x=\"[\".concat(escapeString(g),\"]|$\");var h=\"[\".concat(escapeString(s),\"]\");var l=o?\"^\":\"\";for(var m=0,T=e;m<T.length;m++){var E=T[m];if(typeof E===\"string\"){l+=escapeString(p(E))}else{var w=escapeString(p(E.prefix));var y=escapeString(p(E.suffix));if(E.pattern){if(n)n.push(E);if(w||y){if(E.modifier===\"+\"||E.modifier===\"*\"){var R=E.modifier===\"*\"?\"?\":\"\";l+=\"(?:\".concat(w,\"((?:\").concat(E.pattern,\")(?:\").concat(y).concat(w,\"(?:\").concat(E.pattern,\"))*)\").concat(y,\")\").concat(R)}else{l+=\"(?:\".concat(w,\"(\").concat(E.pattern,\")\").concat(y,\")\").concat(E.modifier)}}else{if(E.modifier===\"+\"||E.modifier===\"*\"){throw new TypeError('Can not repeat \"'.concat(E.name,'\" without a prefix and suffix'))}l+=\"(\".concat(E.pattern,\")\").concat(E.modifier)}}else{l+=\"(?:\".concat(w).concat(y,\")\").concat(E.modifier)}}}if(f){if(!a)l+=\"\".concat(h,\"?\");l+=!r.endsWith?\"$\":\"(?=\".concat(x,\")\")}else{var A=e[e.length-1];var _=typeof A===\"string\"?h.indexOf(A[A.length-1])>-1:A===undefined;if(!a){l+=\"(?:\".concat(h,\"(?=\").concat(x,\"))?\")}if(!_){l+=\"(?=\".concat(h,\"|\").concat(x,\")\")}}return new RegExp(l,flags(r))}n.tokensToRegexp=tokensToRegexp;function pathToRegexp(e,n,r){if(e instanceof RegExp)return regexpToRegexp(e,n);if(Array.isArray(e))return arrayToRegexp(e,n,r);return stringToRegexp(e,n,r)}n.pathToRegexp=pathToRegexp})();module.exports=e})();","/**\n * @license React\n * react-dom-server.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function styleReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\73 \" : \"\\\\53 \") + suffix;\n    }\n    function scriptReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function flushBuffered(destination) {\n      \"function\" === typeof destination.flush && destination.flush();\n    }\n    function writeChunk(destination, chunk) {\n      if (\"string\" === typeof chunk) {\n        if (0 !== chunk.length)\n          if (4096 < 3 * chunk.length)\n            0 < writtenBytes &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0)),\n              writeToDestination(destination, chunk);\n          else {\n            var target = currentView;\n            0 < writtenBytes && (target = currentView.subarray(writtenBytes));\n            target = textEncoder.encodeInto(chunk, target);\n            var read = target.read;\n            writtenBytes += target.written;\n            read < chunk.length &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = textEncoder.encodeInto(\n                chunk.slice(read),\n                currentView\n              ).written));\n            4096 === writtenBytes &&\n              (writeToDestination(destination, currentView),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0));\n          }\n      } else\n        0 !== chunk.byteLength &&\n          (4096 < chunk.byteLength\n            ? (0 < writtenBytes &&\n                (writeToDestination(\n                  destination,\n                  currentView.subarray(0, writtenBytes)\n                ),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              writeToDestination(destination, chunk))\n            : ((target = currentView.length - writtenBytes),\n              target < chunk.byteLength &&\n                (0 === target\n                  ? writeToDestination(destination, currentView)\n                  : (currentView.set(chunk.subarray(0, target), writtenBytes),\n                    (writtenBytes += target),\n                    writeToDestination(destination, currentView),\n                    (chunk = chunk.subarray(target))),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              currentView.set(chunk, writtenBytes),\n              (writtenBytes += chunk.byteLength),\n              4096 === writtenBytes &&\n                (writeToDestination(destination, currentView),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0))));\n    }\n    function writeToDestination(destination, view) {\n      destination = destination.write(view);\n      destinationHasCapacity$1 = destinationHasCapacity$1 && destination;\n    }\n    function writeChunkAndReturn(destination, chunk) {\n      writeChunk(destination, chunk);\n      return destinationHasCapacity$1;\n    }\n    function completeWriting(destination) {\n      currentView &&\n        0 < writtenBytes &&\n        destination.write(currentView.subarray(0, writtenBytes));\n      currentView = null;\n      writtenBytes = 0;\n      destinationHasCapacity$1 = !0;\n    }\n    function stringToPrecomputedChunk(content) {\n      content = textEncoder.encode(content);\n      4096 < content.byteLength &&\n        console.error(\n          \"precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.\"\n        );\n      return content;\n    }\n    function byteLengthOfChunk(chunk) {\n      return \"string\" === typeof chunk\n        ? Buffer.byteLength(chunk, \"utf8\")\n        : chunk.byteLength;\n    }\n    function typeName(value) {\n      return (\n        (\"function\" === typeof Symbol &&\n          Symbol.toStringTag &&\n          value[Symbol.toStringTag]) ||\n        value.constructor.name ||\n        \"Object\"\n      );\n    }\n    function willCoercionThrow(value) {\n      try {\n        return testStringCoercion(value), !1;\n      } catch (e) {\n        return !0;\n      }\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkAttributeStringCoercion(value, attributeName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            attributeName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkCSSPropertyStringCoercion(value, propName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            propName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkHtmlStringCoercion(value) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.\",\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function isAttributeNameSafe(attributeName) {\n      if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n        return !0;\n      if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))\n        return !1;\n      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n        return (validatedAttributeNameCache[attributeName] = !0);\n      illegalAttributeNameCache[attributeName] = !0;\n      console.error(\"Invalid attribute name: `%s`\", attributeName);\n      return !1;\n    }\n    function checkControlledValueProps(tagName, props) {\n      hasReadOnlyValue[props.type] ||\n        props.onChange ||\n        props.onInput ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.value ||\n        (\"select\" === tagName\n          ? console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.\"\n            )\n          : console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"\n            ));\n      props.onChange ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.checked ||\n        console.error(\n          \"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\"\n        );\n    }\n    function validateProperty$1(tagName, name) {\n      if (\n        hasOwnProperty.call(warnedProperties$1, name) &&\n        warnedProperties$1[name]\n      )\n        return !0;\n      if (rARIACamel$1.test(name)) {\n        tagName = \"aria-\" + name.slice(4).toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.\",\n              name\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n        if (name !== tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. Did you mean `%s`?\",\n              name,\n              tagName\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n      }\n      if (rARIA$1.test(name)) {\n        tagName = name.toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName) return (warnedProperties$1[name] = !0), !1;\n        name !== tagName &&\n          (console.error(\n            \"Unknown ARIA attribute `%s`. Did you mean `%s`?\",\n            name,\n            tagName\n          ),\n          (warnedProperties$1[name] = !0));\n      }\n      return !0;\n    }\n    function validateProperties$2(type, props) {\n      var invalidProps = [],\n        key;\n      for (key in props)\n        validateProperty$1(type, key) || invalidProps.push(key);\n      props = invalidProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === invalidProps.length\n        ? console.error(\n            \"Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          )\n        : 1 < invalidProps.length &&\n          console.error(\n            \"Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          );\n    }\n    function validateProperty(tagName, name, value, eventRegistry) {\n      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])\n        return !0;\n      var lowerCasedName = name.toLowerCase();\n      if (\"onfocusin\" === lowerCasedName || \"onfocusout\" === lowerCasedName)\n        return (\n          console.error(\n            \"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"function\" === typeof value &&\n        ((\"form\" === tagName && \"action\" === name) ||\n          (\"input\" === tagName && \"formAction\" === name) ||\n          (\"button\" === tagName && \"formAction\" === name))\n      )\n        return !0;\n      if (null != eventRegistry) {\n        tagName = eventRegistry.possibleRegistrationNames;\n        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))\n          return !0;\n        eventRegistry = tagName.hasOwnProperty(lowerCasedName)\n          ? tagName[lowerCasedName]\n          : null;\n        if (null != eventRegistry)\n          return (\n            console.error(\n              \"Invalid event handler property `%s`. Did you mean `%s`?\",\n              name,\n              eventRegistry\n            ),\n            (warnedProperties[name] = !0)\n          );\n        if (EVENT_NAME_REGEX.test(name))\n          return (\n            console.error(\n              \"Unknown event handler property `%s`. It will be ignored.\",\n              name\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (EVENT_NAME_REGEX.test(name))\n        return (\n          INVALID_EVENT_NAME_REGEX.test(name) &&\n            console.error(\n              \"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.\",\n              name\n            ),\n          (warnedProperties[name] = !0)\n        );\n      if (rARIA.test(name) || rARIACamel.test(name)) return !0;\n      if (\"innerhtml\" === lowerCasedName)\n        return (\n          console.error(\n            \"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"aria\" === lowerCasedName)\n        return (\n          console.error(\n            \"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"is\" === lowerCasedName &&\n        null !== value &&\n        void 0 !== value &&\n        \"string\" !== typeof value\n      )\n        return (\n          console.error(\n            \"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.\",\n            typeof value\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"number\" === typeof value && isNaN(value))\n        return (\n          console.error(\n            \"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.\",\n            name\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n        if (\n          ((lowerCasedName = possibleStandardNames[lowerCasedName]),\n          lowerCasedName !== name)\n        )\n          return (\n            console.error(\n              \"Invalid DOM property `%s`. Did you mean `%s`?\",\n              name,\n              lowerCasedName\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (name !== lowerCasedName)\n        return (\n          console.error(\n            \"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\",\n            name,\n            lowerCasedName\n          ),\n          (warnedProperties[name] = !0)\n        );\n      switch (name) {\n        case \"dangerouslySetInnerHTML\":\n        case \"children\":\n        case \"style\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          return !0;\n        case \"innerText\":\n        case \"textContent\":\n          return !0;\n      }\n      switch (typeof value) {\n        case \"boolean\":\n          switch (name) {\n            case \"autoFocus\":\n            case \"checked\":\n            case \"multiple\":\n            case \"muted\":\n            case \"selected\":\n            case \"contentEditable\":\n            case \"spellCheck\":\n            case \"draggable\":\n            case \"value\":\n            case \"autoReverse\":\n            case \"externalResourcesRequired\":\n            case \"focusable\":\n            case \"preserveAlpha\":\n            case \"allowFullScreen\":\n            case \"async\":\n            case \"autoPlay\":\n            case \"controls\":\n            case \"credentialless\":\n            case \"default\":\n            case \"defer\":\n            case \"disabled\":\n            case \"disablePictureInPicture\":\n            case \"disableRemotePlayback\":\n            case \"formNoValidate\":\n            case \"hidden\":\n            case \"loop\":\n            case \"noModule\":\n            case \"noValidate\":\n            case \"open\":\n            case \"playsInline\":\n            case \"readOnly\":\n            case \"required\":\n            case \"reversed\":\n            case \"scoped\":\n            case \"seamless\":\n            case \"itemScope\":\n            case \"capture\":\n            case \"download\":\n            case \"inert\":\n              return !0;\n            default:\n              lowerCasedName = name.toLowerCase().slice(0, 5);\n              if (\"data-\" === lowerCasedName || \"aria-\" === lowerCasedName)\n                return !0;\n              value\n                ? console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name\n                  )\n                : console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name,\n                    name,\n                    name\n                  );\n              return (warnedProperties[name] = !0);\n          }\n        case \"function\":\n        case \"symbol\":\n          return (warnedProperties[name] = !0), !1;\n        case \"string\":\n          if (\"false\" === value || \"true\" === value) {\n            switch (name) {\n              case \"checked\":\n              case \"selected\":\n              case \"multiple\":\n              case \"muted\":\n              case \"allowFullScreen\":\n              case \"async\":\n              case \"autoPlay\":\n              case \"controls\":\n              case \"credentialless\":\n              case \"default\":\n              case \"defer\":\n              case \"disabled\":\n              case \"disablePictureInPicture\":\n              case \"disableRemotePlayback\":\n              case \"formNoValidate\":\n              case \"hidden\":\n              case \"loop\":\n              case \"noModule\":\n              case \"noValidate\":\n              case \"open\":\n              case \"playsInline\":\n              case \"readOnly\":\n              case \"required\":\n              case \"reversed\":\n              case \"scoped\":\n              case \"seamless\":\n              case \"itemScope\":\n              case \"inert\":\n                break;\n              default:\n                return !0;\n            }\n            console.error(\n              \"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?\",\n              value,\n              name,\n              \"false\" === value\n                ? \"The browser will interpret it as a truthy value.\"\n                : 'Although this works, it will not work as expected if you pass the string \"false\".',\n              name,\n              value\n            );\n            warnedProperties[name] = !0;\n          }\n      }\n      return !0;\n    }\n    function warnUnknownProperties(type, props, eventRegistry) {\n      var unknownProps = [],\n        key;\n      for (key in props)\n        validateProperty(type, key, props[key], eventRegistry) ||\n          unknownProps.push(key);\n      props = unknownProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === unknownProps.length\n        ? console.error(\n            \"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          )\n        : 1 < unknownProps.length &&\n          console.error(\n            \"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          );\n    }\n    function camelize(string) {\n      return string.replace(hyphenPattern, function (_, character) {\n        return character.toUpperCase();\n      });\n    }\n    function escapeTextForBrowser(text) {\n      if (\n        \"boolean\" === typeof text ||\n        \"number\" === typeof text ||\n        \"bigint\" === typeof text\n      )\n        return \"\" + text;\n      checkHtmlStringCoercion(text);\n      text = \"\" + text;\n      var match = matchHtmlRegExp.exec(text);\n      if (match) {\n        var html = \"\",\n          index,\n          lastIndex = 0;\n        for (index = match.index; index < text.length; index++) {\n          switch (text.charCodeAt(index)) {\n            case 34:\n              match = \"&quot;\";\n              break;\n            case 38:\n              match = \"&amp;\";\n              break;\n            case 39:\n              match = \"&#x27;\";\n              break;\n            case 60:\n              match = \"&lt;\";\n              break;\n            case 62:\n              match = \"&gt;\";\n              break;\n            default:\n              continue;\n          }\n          lastIndex !== index && (html += text.slice(lastIndex, index));\n          lastIndex = index + 1;\n          html += match;\n        }\n        text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;\n      }\n      return text;\n    }\n    function sanitizeURL(url) {\n      return isJavaScriptProtocol.test(\"\" + url)\n        ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n        : url;\n    }\n    function escapeEntireInlineScriptContent(scriptText) {\n      checkHtmlStringCoercion(scriptText);\n      return (\"\" + scriptText).replace(scriptRegex, scriptReplacer);\n    }\n    function createRenderState(\n      resumableState,\n      nonce,\n      externalRuntimeConfig,\n      importMap,\n      onHeaders,\n      maxHeadersLength\n    ) {\n      externalRuntimeConfig =\n        \"string\" === typeof nonce ? nonce : nonce && nonce.script;\n      var inlineScriptWithNonce =\n          void 0 === externalRuntimeConfig\n            ? startInlineScript\n            : stringToPrecomputedChunk(\n                '<script nonce=\"' +\n                  escapeTextForBrowser(externalRuntimeConfig) +\n                  '\"'\n              ),\n        nonceStyle = \"string\" === typeof nonce ? void 0 : nonce && nonce.style,\n        inlineStyleWithNonce =\n          void 0 === nonceStyle\n            ? startInlineStyle\n            : stringToPrecomputedChunk(\n                '<style nonce=\"' + escapeTextForBrowser(nonceStyle) + '\"'\n              ),\n        idPrefix = resumableState.idPrefix,\n        bootstrapChunks = [],\n        bootstrapScriptContent = resumableState.bootstrapScriptContent,\n        bootstrapScripts = resumableState.bootstrapScripts,\n        bootstrapModules = resumableState.bootstrapModules;\n      void 0 !== bootstrapScriptContent &&\n        (bootstrapChunks.push(inlineScriptWithNonce),\n        pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n        bootstrapChunks.push(\n          endOfStartTag,\n          escapeEntireInlineScriptContent(bootstrapScriptContent),\n          endInlineScript\n        ));\n      bootstrapScriptContent = [];\n      void 0 !== importMap &&\n        (bootstrapScriptContent.push(importMapScriptStart),\n        bootstrapScriptContent.push(\n          escapeEntireInlineScriptContent(JSON.stringify(importMap))\n        ),\n        bootstrapScriptContent.push(importMapScriptEnd));\n      onHeaders &&\n        \"number\" === typeof maxHeadersLength &&\n        0 >= maxHeadersLength &&\n        console.error(\n          \"React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.\",\n          0 === maxHeadersLength ? \"zero\" : maxHeadersLength\n        );\n      importMap = onHeaders\n        ? {\n            preconnects: \"\",\n            fontPreloads: \"\",\n            highImagePreloads: \"\",\n            remainingCapacity:\n              2 +\n              (\"number\" === typeof maxHeadersLength ? maxHeadersLength : 2e3)\n          }\n        : null;\n      onHeaders = {\n        placeholderPrefix: stringToPrecomputedChunk(idPrefix + \"P:\"),\n        segmentPrefix: stringToPrecomputedChunk(idPrefix + \"S:\"),\n        boundaryPrefix: stringToPrecomputedChunk(idPrefix + \"B:\"),\n        startInlineScript: inlineScriptWithNonce,\n        startInlineStyle: inlineStyleWithNonce,\n        preamble: createPreambleState(),\n        externalRuntimeScript: null,\n        bootstrapChunks: bootstrapChunks,\n        importMapChunks: bootstrapScriptContent,\n        onHeaders: onHeaders,\n        headers: importMap,\n        resets: {\n          font: {},\n          dns: {},\n          connect: { default: {}, anonymous: {}, credentials: {} },\n          image: {},\n          style: {}\n        },\n        charsetChunks: [],\n        viewportChunks: [],\n        hoistableChunks: [],\n        preconnects: new Set(),\n        fontPreloads: new Set(),\n        highImagePreloads: new Set(),\n        styles: new Map(),\n        bootstrapScripts: new Set(),\n        scripts: new Set(),\n        bulkPreloads: new Set(),\n        preloads: {\n          images: new Map(),\n          stylesheets: new Map(),\n          scripts: new Map(),\n          moduleScripts: new Map()\n        },\n        nonce: { script: externalRuntimeConfig, style: nonceStyle },\n        hoistableState: null,\n        stylesToHoist: !1\n      };\n      if (void 0 !== bootstrapScripts)\n        for (importMap = 0; importMap < bootstrapScripts.length; importMap++)\n          (maxHeadersLength = bootstrapScripts[importMap]),\n            (inlineStyleWithNonce = nonceStyle = void 0),\n            (idPrefix = {\n              rel: \"preload\",\n              as: \"script\",\n              fetchPriority: \"low\",\n              nonce: nonce\n            }),\n            \"string\" === typeof maxHeadersLength\n              ? (idPrefix.href = inlineScriptWithNonce = maxHeadersLength)\n              : ((idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src),\n                (idPrefix.integrity = inlineStyleWithNonce =\n                  \"string\" === typeof maxHeadersLength.integrity\n                    ? maxHeadersLength.integrity\n                    : void 0),\n                (idPrefix.crossOrigin = nonceStyle =\n                  \"string\" === typeof maxHeadersLength ||\n                  null == maxHeadersLength.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === maxHeadersLength.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              inlineScriptWithNonce,\n              idPrefix\n            ),\n            bootstrapChunks.push(\n              startScriptSrc,\n              escapeTextForBrowser(inlineScriptWithNonce),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                escapeTextForBrowser(externalRuntimeConfig),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineStyleWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                escapeTextForBrowser(inlineStyleWithNonce),\n                attributeEnd\n              ),\n            \"string\" === typeof nonceStyle &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                escapeTextForBrowser(nonceStyle),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      if (void 0 !== bootstrapModules)\n        for (nonce = 0; nonce < bootstrapModules.length; nonce++)\n          (bootstrapScripts = bootstrapModules[nonce]),\n            (inlineScriptWithNonce = maxHeadersLength = void 0),\n            (nonceStyle = {\n              rel: \"modulepreload\",\n              fetchPriority: \"low\",\n              nonce: externalRuntimeConfig\n            }),\n            \"string\" === typeof bootstrapScripts\n              ? (nonceStyle.href = importMap = bootstrapScripts)\n              : ((nonceStyle.href = importMap = bootstrapScripts.src),\n                (nonceStyle.integrity = inlineScriptWithNonce =\n                  \"string\" === typeof bootstrapScripts.integrity\n                    ? bootstrapScripts.integrity\n                    : void 0),\n                (nonceStyle.crossOrigin = maxHeadersLength =\n                  \"string\" === typeof bootstrapScripts ||\n                  null == bootstrapScripts.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === bootstrapScripts.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              importMap,\n              nonceStyle\n            ),\n            bootstrapChunks.push(\n              startModuleSrc,\n              escapeTextForBrowser(importMap),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                escapeTextForBrowser(externalRuntimeConfig),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineScriptWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                escapeTextForBrowser(inlineScriptWithNonce),\n                attributeEnd\n              ),\n            \"string\" === typeof maxHeadersLength &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                escapeTextForBrowser(maxHeadersLength),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      return onHeaders;\n    }\n    function createResumableState(\n      identifierPrefix,\n      externalRuntimeConfig,\n      bootstrapScriptContent,\n      bootstrapScripts,\n      bootstrapModules\n    ) {\n      return {\n        idPrefix: void 0 === identifierPrefix ? \"\" : identifierPrefix,\n        nextFormID: 0,\n        streamingFormat: 0,\n        bootstrapScriptContent: bootstrapScriptContent,\n        bootstrapScripts: bootstrapScripts,\n        bootstrapModules: bootstrapModules,\n        instructions: NothingSent,\n        hasBody: !1,\n        hasHtml: !1,\n        unknownResources: {},\n        dnsResources: {},\n        connectResources: { default: {}, anonymous: {}, credentials: {} },\n        imageResources: {},\n        styleResources: {},\n        scriptResources: {},\n        moduleUnknownResources: {},\n        moduleScriptResources: {}\n      };\n    }\n    function createPreambleState() {\n      return { htmlChunks: null, headChunks: null, bodyChunks: null };\n    }\n    function createFormatContext(\n      insertionMode,\n      selectedValue,\n      tagScope,\n      viewTransition\n    ) {\n      return {\n        insertionMode: insertionMode,\n        selectedValue: selectedValue,\n        tagScope: tagScope,\n        viewTransition: viewTransition\n      };\n    }\n    function createRootFormatContext(namespaceURI) {\n      return createFormatContext(\n        \"http://www.w3.org/2000/svg\" === namespaceURI\n          ? SVG_MODE\n          : \"http://www.w3.org/1998/Math/MathML\" === namespaceURI\n            ? MATHML_MODE\n            : ROOT_HTML_MODE,\n        null,\n        0,\n        null\n      );\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      var subtreeScope = parentContext.tagScope & -25;\n      switch (type) {\n        case \"noscript\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);\n        case \"select\":\n          return createFormatContext(\n            HTML_MODE,\n            null != props.value ? props.value : props.defaultValue,\n            subtreeScope,\n            null\n          );\n        case \"svg\":\n          return createFormatContext(SVG_MODE, null, subtreeScope, null);\n        case \"picture\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);\n        case \"math\":\n          return createFormatContext(MATHML_MODE, null, subtreeScope, null);\n        case \"foreignObject\":\n          return createFormatContext(HTML_MODE, null, subtreeScope, null);\n        case \"table\":\n          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);\n        case \"thead\":\n        case \"tbody\":\n        case \"tfoot\":\n          return createFormatContext(\n            HTML_TABLE_BODY_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"colgroup\":\n          return createFormatContext(\n            HTML_COLGROUP_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"tr\":\n          return createFormatContext(\n            HTML_TABLE_ROW_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"head\":\n          if (parentContext.insertionMode < HTML_MODE)\n            return createFormatContext(\n              HTML_HEAD_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n          break;\n        case \"html\":\n          if (parentContext.insertionMode === ROOT_HTML_MODE)\n            return createFormatContext(\n              HTML_HTML_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n      }\n      return parentContext.insertionMode >= HTML_TABLE_MODE ||\n        parentContext.insertionMode < HTML_MODE\n        ? createFormatContext(HTML_MODE, null, subtreeScope, null)\n        : null !== parentContext.viewTransition ||\n            parentContext.tagScope !== subtreeScope\n          ? createFormatContext(\n              parentContext.insertionMode,\n              parentContext.selectedValue,\n              subtreeScope,\n              null\n            )\n          : parentContext;\n    }\n    function getSuspenseViewTransition(parentViewTransition) {\n      return null === parentViewTransition\n        ? null\n        : {\n            update: parentViewTransition.update,\n            enter: \"none\",\n            exit: \"none\",\n            share: parentViewTransition.update,\n            parentEnter: \"none\",\n            parentExit: \"none\",\n            name: parentViewTransition.autoName,\n            autoName: parentViewTransition.autoName,\n            nameIdx: 0\n          };\n    }\n    function getSuspenseFallbackFormatContext(resumableState, parentContext) {\n      parentContext.tagScope & 32 &&\n        (resumableState.instructions |= NeedUpgradeToViewTransitions);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        parentContext.tagScope | 12,\n        getSuspenseViewTransition(parentContext.viewTransition)\n      );\n    }\n    function getSuspenseContentFormatContext(resumableState, parentContext) {\n      resumableState = getSuspenseViewTransition(parentContext.viewTransition);\n      var subtreeScope = parentContext.tagScope | 16;\n      null !== resumableState &&\n        \"none\" !== resumableState.share &&\n        (subtreeScope |= 64);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        subtreeScope,\n        resumableState\n      );\n    }\n    function makeId(resumableState, treeId, localId) {\n      resumableState = \"_\" + resumableState.idPrefix + \"R_\" + treeId;\n      0 < localId && (resumableState += \"H\" + localId.toString(32));\n      return resumableState + \"_\";\n    }\n    function pushTextInstance(target, text, renderState, textEmbedded) {\n      if (\"\" === text) return textEmbedded;\n      textEmbedded && target.push(textSeparator);\n      target.push(escapeTextForBrowser(text));\n      return !0;\n    }\n    function pushViewTransitionAttributes(target, formatContext) {\n      formatContext = formatContext.viewTransition;\n      null !== formatContext &&\n        (\"auto\" !== formatContext.name &&\n          (pushStringAttribute(\n            target,\n            \"vt-name\",\n            0 === formatContext.nameIdx\n              ? formatContext.name\n              : formatContext.name + \"_\" + formatContext.nameIdx\n          ),\n          formatContext.nameIdx++),\n        pushStringAttribute(target, \"vt-update\", formatContext.update),\n        \"none\" !== formatContext.enter &&\n          pushStringAttribute(target, \"vt-enter\", formatContext.enter),\n        \"none\" !== formatContext.exit &&\n          pushStringAttribute(target, \"vt-exit\", formatContext.exit),\n        \"none\" !== formatContext.share &&\n          pushStringAttribute(target, \"vt-share\", formatContext.share));\n    }\n    function pushStyleAttribute(target, style) {\n      if (\"object\" !== typeof style)\n        throw Error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      var isFirst = !0,\n        styleName;\n      for (styleName in style)\n        if (hasOwnProperty.call(style, styleName)) {\n          var styleValue = style[styleName];\n          if (\n            null != styleValue &&\n            \"boolean\" !== typeof styleValue &&\n            \"\" !== styleValue\n          ) {\n            if (0 === styleName.indexOf(\"--\")) {\n              var nameChunk = escapeTextForBrowser(styleName);\n              checkCSSPropertyStringCoercion(styleValue, styleName);\n              styleValue = escapeTextForBrowser((\"\" + styleValue).trim());\n            } else {\n              nameChunk = styleName;\n              var value = styleValue;\n              if (-1 < nameChunk.indexOf(\"-\")) {\n                var name = nameChunk;\n                (warnedStyleNames.hasOwnProperty(name) &&\n                  warnedStyleNames[name]) ||\n                  ((warnedStyleNames[name] = !0),\n                  console.error(\n                    \"Unsupported style property %s. Did you mean %s?\",\n                    name,\n                    camelize(name.replace(msPattern$1, \"ms-\"))\n                  ));\n              } else if (badVendoredStyleNamePattern.test(nameChunk))\n                (name = nameChunk),\n                  (warnedStyleNames.hasOwnProperty(name) &&\n                    warnedStyleNames[name]) ||\n                    ((warnedStyleNames[name] = !0),\n                    console.error(\n                      \"Unsupported vendor-prefixed style property %s. Did you mean %s?\",\n                      name,\n                      name.charAt(0).toUpperCase() + name.slice(1)\n                    ));\n              else if (badStyleValueWithSemicolonPattern.test(value)) {\n                name = nameChunk;\n                var value$jscomp$0 = value;\n                (warnedStyleValues.hasOwnProperty(value$jscomp$0) &&\n                  warnedStyleValues[value$jscomp$0]) ||\n                  ((warnedStyleValues[value$jscomp$0] = !0),\n                  console.error(\n                    'Style property values shouldn\\'t contain a semicolon. Try \"%s: %s\" instead.',\n                    name,\n                    value$jscomp$0.replace(\n                      badStyleValueWithSemicolonPattern,\n                      \"\"\n                    )\n                  ));\n              }\n              \"number\" === typeof value &&\n                (isNaN(value)\n                  ? warnedForNaNValue ||\n                    ((warnedForNaNValue = !0),\n                    console.error(\n                      \"`NaN` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    ))\n                  : isFinite(value) ||\n                    warnedForInfinityValue ||\n                    ((warnedForInfinityValue = !0),\n                    console.error(\n                      \"`Infinity` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    )));\n              nameChunk = styleName;\n              value = styleNameCache.get(nameChunk);\n              void 0 !== value\n                ? (nameChunk = value)\n                : ((value = stringToPrecomputedChunk(\n                    escapeTextForBrowser(\n                      nameChunk\n                        .replace(uppercasePattern, \"-$1\")\n                        .toLowerCase()\n                        .replace(msPattern, \"-ms-\")\n                    )\n                  )),\n                  styleNameCache.set(nameChunk, value),\n                  (nameChunk = value));\n              \"number\" === typeof styleValue\n                ? (styleValue =\n                    0 === styleValue || unitlessNumbers.has(styleName)\n                      ? \"\" + styleValue\n                      : styleValue + \"px\")\n                : (checkCSSPropertyStringCoercion(styleValue, styleName),\n                  (styleValue = escapeTextForBrowser(\n                    (\"\" + styleValue).trim()\n                  )));\n            }\n            isFirst\n              ? ((isFirst = !1),\n                target.push(\n                  styleAttributeStart,\n                  nameChunk,\n                  styleAssign,\n                  styleValue\n                ))\n              : target.push(styleSeparator, nameChunk, styleAssign, styleValue);\n          }\n        }\n      isFirst || target.push(attributeEnd);\n    }\n    function pushBooleanAttribute(target, name, value) {\n      value &&\n        \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        target.push(attributeSeparator, name, attributeEmptyString);\n    }\n    function pushStringAttribute(target, name, value) {\n      \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        \"boolean\" !== typeof value &&\n        target.push(\n          attributeSeparator,\n          name,\n          attributeAssign,\n          escapeTextForBrowser(value),\n          attributeEnd\n        );\n    }\n    function pushAdditionalFormField(value, key) {\n      this.push(startHiddenInputChunk);\n      validateAdditionalFormField(value);\n      pushStringAttribute(this, \"name\", key);\n      pushStringAttribute(this, \"value\", value);\n      this.push(endOfStartTagSelfClosing);\n    }\n    function validateAdditionalFormField(value) {\n      if (\"string\" !== typeof value)\n        throw Error(\n          \"File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.\"\n        );\n    }\n    function getCustomFormFields(resumableState, formAction) {\n      if (\"function\" === typeof formAction.$$FORM_ACTION) {\n        var id = resumableState.nextFormID++;\n        resumableState = resumableState.idPrefix + id;\n        try {\n          var customFields = formAction.$$FORM_ACTION(resumableState);\n          if (customFields) {\n            var formData = customFields.data;\n            null != formData && formData.forEach(validateAdditionalFormField);\n          }\n          return customFields;\n        } catch (x) {\n          if (\n            \"object\" === typeof x &&\n            null !== x &&\n            \"function\" === typeof x.then\n          )\n            throw x;\n          console.error(\n            \"Failed to serialize an action for progressive enhancement:\\n%s\",\n            x\n          );\n        }\n      }\n      return null;\n    }\n    function pushFormActionAttribute(\n      target,\n      resumableState,\n      renderState,\n      formAction,\n      formEncType,\n      formMethod,\n      formTarget,\n      name\n    ) {\n      var formData = null;\n      if (\"function\" === typeof formAction) {\n        null === name ||\n          didWarnFormActionName ||\n          ((didWarnFormActionName = !0),\n          console.error(\n            'Cannot specify a \"name\" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'\n          ));\n        (null === formEncType && null === formMethod) ||\n          didWarnFormActionMethod ||\n          ((didWarnFormActionMethod = !0),\n          console.error(\n            \"Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.\"\n          ));\n        null === formTarget ||\n          didWarnFormActionTarget ||\n          ((didWarnFormActionTarget = !0),\n          console.error(\n            \"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.\"\n          ));\n        var customFields = getCustomFormFields(resumableState, formAction);\n        null !== customFields\n          ? ((name = customFields.name),\n            (formAction = customFields.action || \"\"),\n            (formEncType = customFields.encType),\n            (formMethod = customFields.method),\n            (formTarget = customFields.target),\n            (formData = customFields.data))\n          : (target.push(\n              attributeSeparator,\n              \"formAction\",\n              attributeAssign,\n              actionJavaScriptURL,\n              attributeEnd\n            ),\n            (formTarget = formMethod = formEncType = formAction = name = null),\n            injectFormReplayingRuntime(resumableState, renderState));\n      }\n      null != name && pushAttribute(target, \"name\", name);\n      null != formAction && pushAttribute(target, \"formAction\", formAction);\n      null != formEncType && pushAttribute(target, \"formEncType\", formEncType);\n      null != formMethod && pushAttribute(target, \"formMethod\", formMethod);\n      null != formTarget && pushAttribute(target, \"formTarget\", formTarget);\n      return formData;\n    }\n    function pushAttribute(target, name, value) {\n      switch (name) {\n        case \"className\":\n          pushStringAttribute(target, \"class\", value);\n          break;\n        case \"tabIndex\":\n          pushStringAttribute(target, \"tabindex\", value);\n          break;\n        case \"dir\":\n        case \"role\":\n        case \"viewBox\":\n        case \"width\":\n        case \"height\":\n          pushStringAttribute(target, name, value);\n          break;\n        case \"style\":\n          pushStyleAttribute(target, value);\n          break;\n        case \"src\":\n        case \"href\":\n          if (\"\" === value) {\n            \"src\" === name\n              ? console.error(\n                  'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                )\n              : console.error(\n                  'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                );\n            break;\n          }\n        case \"action\":\n        case \"formAction\":\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            name,\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"ref\":\n          break;\n        case \"autoFocus\":\n        case \"multiple\":\n        case \"muted\":\n          pushBooleanAttribute(target, name.toLowerCase(), value);\n          break;\n        case \"xlinkHref\":\n          if (\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            \"xlink:href\",\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"contentEditable\":\n        case \"spellCheck\":\n        case \"draggable\":\n        case \"value\":\n        case \"autoReverse\":\n        case \"externalResourcesRequired\":\n        case \"focusable\":\n        case \"preserveAlpha\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"inert\":\n          \"\" !== value ||\n            didWarnForNewBooleanPropsWithEmptyValue[name] ||\n            ((didWarnForNewBooleanPropsWithEmptyValue[name] = !0),\n            console.error(\n              \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n              name\n            ));\n        case \"allowFullScreen\":\n        case \"async\":\n        case \"autoPlay\":\n        case \"controls\":\n        case \"credentialless\":\n        case \"default\":\n        case \"defer\":\n        case \"disabled\":\n        case \"disablePictureInPicture\":\n        case \"disableRemotePlayback\":\n        case \"formNoValidate\":\n        case \"hidden\":\n        case \"loop\":\n        case \"noModule\":\n        case \"noValidate\":\n        case \"open\":\n        case \"playsInline\":\n        case \"readOnly\":\n        case \"required\":\n        case \"reversed\":\n        case \"scoped\":\n        case \"seamless\":\n        case \"itemScope\":\n          value &&\n            \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(attributeSeparator, name, attributeEmptyString);\n          break;\n        case \"capture\":\n        case \"download\":\n          !0 === value\n            ? target.push(attributeSeparator, name, attributeEmptyString)\n            : !1 !== value &&\n              \"function\" !== typeof value &&\n              \"symbol\" !== typeof value &&\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n          break;\n        case \"cols\":\n        case \"rows\":\n        case \"size\":\n        case \"span\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            !isNaN(value) &&\n            1 <= value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"rowSpan\":\n        case \"start\":\n          \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            isNaN(value) ||\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"xlinkActuate\":\n          pushStringAttribute(target, \"xlink:actuate\", value);\n          break;\n        case \"xlinkArcrole\":\n          pushStringAttribute(target, \"xlink:arcrole\", value);\n          break;\n        case \"xlinkRole\":\n          pushStringAttribute(target, \"xlink:role\", value);\n          break;\n        case \"xlinkShow\":\n          pushStringAttribute(target, \"xlink:show\", value);\n          break;\n        case \"xlinkTitle\":\n          pushStringAttribute(target, \"xlink:title\", value);\n          break;\n        case \"xlinkType\":\n          pushStringAttribute(target, \"xlink:type\", value);\n          break;\n        case \"xmlBase\":\n          pushStringAttribute(target, \"xml:base\", value);\n          break;\n        case \"xmlLang\":\n          pushStringAttribute(target, \"xml:lang\", value);\n          break;\n        case \"xmlSpace\":\n          pushStringAttribute(target, \"xml:space\", value);\n          break;\n        default:\n          if (\n            !(2 < name.length) ||\n            (\"o\" !== name[0] && \"O\" !== name[0]) ||\n            (\"n\" !== name[1] && \"N\" !== name[1])\n          )\n            if (\n              ((name = aliases.get(name) || name), isAttributeNameSafe(name))\n            ) {\n              switch (typeof value) {\n                case \"function\":\n                case \"symbol\":\n                  return;\n                case \"boolean\":\n                  var prefix = name.toLowerCase().slice(0, 5);\n                  if (\"data-\" !== prefix && \"aria-\" !== prefix) return;\n              }\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n            }\n      }\n    }\n    function pushInnerHTML(target, innerHTML, children) {\n      if (null != innerHTML) {\n        if (null != children)\n          throw Error(\n            \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n          );\n        if (\"object\" !== typeof innerHTML || !(\"__html\" in innerHTML))\n          throw Error(\n            \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n          );\n        innerHTML = innerHTML.__html;\n        null !== innerHTML &&\n          void 0 !== innerHTML &&\n          (checkHtmlStringCoercion(innerHTML), target.push(\"\" + innerHTML));\n      }\n    }\n    function checkSelectProp(props, propName) {\n      var value = props[propName];\n      null != value &&\n        ((value = isArrayImpl(value)),\n        props.multiple && !value\n          ? console.error(\n              \"The `%s` prop supplied to <select> must be an array if `multiple` is true.\",\n              propName\n            )\n          : !props.multiple &&\n            value &&\n            console.error(\n              \"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.\",\n              propName\n            ));\n    }\n    function flattenOptionChildren(children) {\n      var content = \"\";\n      React.Children.forEach(children, function (child) {\n        null != child &&\n          ((content += child),\n          didWarnInvalidOptionChildren ||\n            \"string\" === typeof child ||\n            \"number\" === typeof child ||\n            \"bigint\" === typeof child ||\n            ((didWarnInvalidOptionChildren = !0),\n            console.error(\n              \"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.\"\n            )));\n      });\n      return content;\n    }\n    function injectFormReplayingRuntime(resumableState, renderState) {\n      if ((resumableState.instructions & 16) === NothingSent) {\n        resumableState.instructions |= 16;\n        var preamble = renderState.preamble,\n          bootstrapChunks = renderState.bootstrapChunks;\n        (preamble.htmlChunks || preamble.headChunks) &&\n        0 === bootstrapChunks.length\n          ? (bootstrapChunks.push(renderState.startInlineScript),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            ))\n          : bootstrapChunks.unshift(\n              renderState.startInlineScript,\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            );\n      }\n    }\n    function pushLinkImpl(target, props) {\n      target.push(startChunkForTag(\"link\"));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function escapeStyleTextContent(styleText) {\n      checkHtmlStringCoercion(styleText);\n      return (\"\" + styleText).replace(styleRegex, styleReplacer);\n    }\n    function pushSelfClosing(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  tag +\n                    \" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function pushTitleImpl(target, props) {\n      target.push(startChunkForTag(\"title\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      props = Array.isArray(children)\n        ? 2 > children.length\n          ? children[0]\n          : null\n        : children;\n      \"function\" !== typeof props &&\n        \"symbol\" !== typeof props &&\n        null !== props &&\n        void 0 !== props &&\n        target.push(escapeTextForBrowser(\"\" + props));\n      pushInnerHTML(target, innerHTML, children);\n      target.push(endChunkForTag(\"title\"));\n      return null;\n    }\n    function pushScriptImpl(target, props) {\n      target.push(startChunkForTag(\"script\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      null != children &&\n        \"string\" !== typeof children &&\n        ((props =\n          \"number\" === typeof children\n            ? \"a number for children\"\n            : Array.isArray(children)\n              ? \"an array for children\"\n              : \"something unexpected for children\"),\n        console.error(\n          \"A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.\",\n          props\n        ));\n      pushInnerHTML(target, innerHTML, children);\n      \"string\" === typeof children &&\n        target.push(escapeEntireInlineScriptContent(children));\n      target.push(endChunkForTag(\"script\"));\n      return null;\n    }\n    function pushStartSingletonElement(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return tag;\n    }\n    function pushStartGenericElement(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return \"string\" === typeof tag\n        ? (target.push(escapeTextForBrowser(tag)), null)\n        : tag;\n    }\n    function startChunkForTag(tag) {\n      var tagStartChunk = validatedTagCache.get(tag);\n      if (void 0 === tagStartChunk) {\n        if (!VALID_TAG_REGEX.test(tag)) throw Error(\"Invalid tag: \" + tag);\n        tagStartChunk = stringToPrecomputedChunk(\"<\" + tag);\n        validatedTagCache.set(tag, tagStartChunk);\n      }\n      return tagStartChunk;\n    }\n    function pushStartInstance(\n      target$jscomp$0,\n      type,\n      props,\n      resumableState,\n      renderState,\n      preambleState,\n      hoistableState,\n      formatContext,\n      textEmbedded\n    ) {\n      validateProperties$2(type, props);\n      (\"input\" !== type && \"textarea\" !== type && \"select\" !== type) ||\n        null == props ||\n        null !== props.value ||\n        didWarnValueNull ||\n        ((didWarnValueNull = !0),\n        \"select\" === type && props.multiple\n          ? console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.\",\n              type\n            )\n          : console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.\",\n              type\n            ));\n      b: if (-1 === type.indexOf(\"-\")) var JSCompiler_inline_result = !1;\n      else\n        switch (type) {\n          case \"annotation-xml\":\n          case \"color-profile\":\n          case \"font-face\":\n          case \"font-face-src\":\n          case \"font-face-uri\":\n          case \"font-face-format\":\n          case \"font-face-name\":\n          case \"missing-glyph\":\n            JSCompiler_inline_result = !1;\n            break b;\n          default:\n            JSCompiler_inline_result = !0;\n        }\n      JSCompiler_inline_result ||\n        \"string\" === typeof props.is ||\n        warnUnknownProperties(type, props, null);\n      !props.suppressContentEditableWarning &&\n        props.contentEditable &&\n        null != props.children &&\n        console.error(\n          \"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.\"\n        );\n      formatContext.insertionMode !== SVG_MODE &&\n        formatContext.insertionMode !== MATHML_MODE &&\n        -1 === type.indexOf(\"-\") &&\n        type.toLowerCase() !== type &&\n        console.error(\n          \"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.\",\n          type\n        );\n      switch (type) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n          break;\n        case \"a\":\n          target$jscomp$0.push(startChunkForTag(\"a\"));\n          var children = null,\n            innerHTML = null,\n            propKey;\n          for (propKey in props)\n            if (hasOwnProperty.call(props, propKey)) {\n              var propValue = props[propKey];\n              if (null != propValue)\n                switch (propKey) {\n                  case \"children\":\n                    children = propValue;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML = propValue;\n                    break;\n                  case \"href\":\n                    \"\" === propValue\n                      ? pushStringAttribute(target$jscomp$0, \"href\", \"\")\n                      : pushAttribute(target$jscomp$0, propKey, propValue);\n                    break;\n                  default:\n                    pushAttribute(target$jscomp$0, propKey, propValue);\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML, children);\n          if (\"string\" === typeof children) {\n            target$jscomp$0.push(escapeTextForBrowser(children));\n            var JSCompiler_inline_result$jscomp$0 = null;\n          } else JSCompiler_inline_result$jscomp$0 = children;\n          return JSCompiler_inline_result$jscomp$0;\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          checkSelectProp(props, \"value\");\n          checkSelectProp(props, \"defaultValue\");\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultSelectValue ||\n            (console.error(\n              \"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultSelectValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"select\"));\n          var children$jscomp$0 = null,\n            innerHTML$jscomp$0 = null,\n            propKey$jscomp$0;\n          for (propKey$jscomp$0 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$0)) {\n              var propValue$jscomp$0 = props[propKey$jscomp$0];\n              if (null != propValue$jscomp$0)\n                switch (propKey$jscomp$0) {\n                  case \"children\":\n                    children$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"defaultValue\":\n                  case \"value\":\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$0,\n                      propValue$jscomp$0\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);\n          return children$jscomp$0;\n        case \"option\":\n          var selectedValue = formatContext.selectedValue;\n          target$jscomp$0.push(startChunkForTag(\"option\"));\n          var children$jscomp$1 = null,\n            value = null,\n            selected = null,\n            innerHTML$jscomp$1 = null,\n            propKey$jscomp$1;\n          for (propKey$jscomp$1 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$1)) {\n              var propValue$jscomp$1 = props[propKey$jscomp$1];\n              if (null != propValue$jscomp$1)\n                switch (propKey$jscomp$1) {\n                  case \"children\":\n                    children$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"selected\":\n                    selected = propValue$jscomp$1;\n                    didWarnSelectedSetOnOption ||\n                      (console.error(\n                        \"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.\"\n                      ),\n                      (didWarnSelectedSetOnOption = !0));\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"value\":\n                    value = propValue$jscomp$1;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$1,\n                      propValue$jscomp$1\n                    );\n                }\n            }\n          if (null != selectedValue) {\n            if (null !== value) {\n              checkAttributeStringCoercion(value, \"value\");\n              var stringValue = \"\" + value;\n            } else\n              null === innerHTML$jscomp$1 ||\n                didWarnInvalidOptionInnerHTML ||\n                ((didWarnInvalidOptionInnerHTML = !0),\n                console.error(\n                  \"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\"\n                )),\n                (stringValue = flattenOptionChildren(children$jscomp$1));\n            if (isArrayImpl(selectedValue))\n              for (var i = 0; i < selectedValue.length; i++) {\n                if (\n                  (checkAttributeStringCoercion(selectedValue[i], \"value\"),\n                  \"\" + selectedValue[i] === stringValue)\n                ) {\n                  target$jscomp$0.push(selectedMarkerAttribute);\n                  break;\n                }\n              }\n            else\n              checkAttributeStringCoercion(selectedValue, \"select.value\"),\n                \"\" + selectedValue === stringValue &&\n                  target$jscomp$0.push(selectedMarkerAttribute);\n          } else selected && target$jscomp$0.push(selectedMarkerAttribute);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);\n          return children$jscomp$1;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props);\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultTextareaValue ||\n            (console.error(\n              \"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultTextareaValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"textarea\"));\n          var value$jscomp$0 = null,\n            defaultValue = null,\n            children$jscomp$2 = null,\n            propKey$jscomp$2;\n          for (propKey$jscomp$2 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$2)) {\n              var propValue$jscomp$2 = props[propKey$jscomp$2];\n              if (null != propValue$jscomp$2)\n                switch (propKey$jscomp$2) {\n                  case \"children\":\n                    children$jscomp$2 = propValue$jscomp$2;\n                    break;\n                  case \"value\":\n                    value$jscomp$0 = propValue$jscomp$2;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue = propValue$jscomp$2;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$2,\n                      propValue$jscomp$2\n                    );\n                }\n            }\n          null === value$jscomp$0 &&\n            null !== defaultValue &&\n            (value$jscomp$0 = defaultValue);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != children$jscomp$2) {\n            console.error(\n              \"Use the `defaultValue` or `value` props instead of setting children on <textarea>.\"\n            );\n            if (null != value$jscomp$0)\n              throw Error(\n                \"If you supply `defaultValue` on a <textarea>, do not pass children.\"\n              );\n            if (isArrayImpl(children$jscomp$2)) {\n              if (1 < children$jscomp$2.length)\n                throw Error(\"<textarea> can only have at most one child.\");\n              checkHtmlStringCoercion(children$jscomp$2[0]);\n              value$jscomp$0 = \"\" + children$jscomp$2[0];\n            }\n            checkHtmlStringCoercion(children$jscomp$2);\n            value$jscomp$0 = \"\" + children$jscomp$2;\n          }\n          \"string\" === typeof value$jscomp$0 &&\n            \"\\n\" === value$jscomp$0[0] &&\n            target$jscomp$0.push(leadingNewline);\n          null !== value$jscomp$0 &&\n            (checkAttributeStringCoercion(value$jscomp$0, \"value\"),\n            target$jscomp$0.push(escapeTextForBrowser(\"\" + value$jscomp$0)));\n          return null;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          target$jscomp$0.push(startChunkForTag(\"input\"));\n          var name = null,\n            formAction = null,\n            formEncType = null,\n            formMethod = null,\n            formTarget = null,\n            value$jscomp$1 = null,\n            defaultValue$jscomp$0 = null,\n            checked = null,\n            defaultChecked = null,\n            propKey$jscomp$3;\n          for (propKey$jscomp$3 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$3)) {\n              var propValue$jscomp$3 = props[propKey$jscomp$3];\n              if (null != propValue$jscomp$3)\n                switch (propKey$jscomp$3) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  case \"name\":\n                    name = propValue$jscomp$3;\n                    break;\n                  case \"formAction\":\n                    formAction = propValue$jscomp$3;\n                    break;\n                  case \"formEncType\":\n                    formEncType = propValue$jscomp$3;\n                    break;\n                  case \"formMethod\":\n                    formMethod = propValue$jscomp$3;\n                    break;\n                  case \"formTarget\":\n                    formTarget = propValue$jscomp$3;\n                    break;\n                  case \"defaultChecked\":\n                    defaultChecked = propValue$jscomp$3;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue$jscomp$0 = propValue$jscomp$3;\n                    break;\n                  case \"checked\":\n                    checked = propValue$jscomp$3;\n                    break;\n                  case \"value\":\n                    value$jscomp$1 = propValue$jscomp$3;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$3,\n                      propValue$jscomp$3\n                    );\n                }\n            }\n          null === formAction ||\n            \"image\" === props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'An input can only specify a formAction along with type=\"submit\" or type=\"image\".'\n            ));\n          var formData = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction,\n            formEncType,\n            formMethod,\n            formTarget,\n            name\n          );\n          null === checked ||\n            null === defaultChecked ||\n            didWarnDefaultChecked ||\n            (console.error(\n              \"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultChecked = !0));\n          null === value$jscomp$1 ||\n            null === defaultValue$jscomp$0 ||\n            didWarnDefaultInputValue ||\n            (console.error(\n              \"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultInputValue = !0));\n          null !== checked\n            ? pushBooleanAttribute(target$jscomp$0, \"checked\", checked)\n            : null !== defaultChecked &&\n              pushBooleanAttribute(target$jscomp$0, \"checked\", defaultChecked);\n          null !== value$jscomp$1\n            ? pushAttribute(target$jscomp$0, \"value\", value$jscomp$1)\n            : null !== defaultValue$jscomp$0 &&\n              pushAttribute(target$jscomp$0, \"value\", defaultValue$jscomp$0);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTagSelfClosing);\n          null != formData &&\n            formData.forEach(pushAdditionalFormField, target$jscomp$0);\n          return null;\n        case \"button\":\n          target$jscomp$0.push(startChunkForTag(\"button\"));\n          var children$jscomp$3 = null,\n            innerHTML$jscomp$2 = null,\n            name$jscomp$0 = null,\n            formAction$jscomp$0 = null,\n            formEncType$jscomp$0 = null,\n            formMethod$jscomp$0 = null,\n            formTarget$jscomp$0 = null,\n            propKey$jscomp$4;\n          for (propKey$jscomp$4 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$4)) {\n              var propValue$jscomp$4 = props[propKey$jscomp$4];\n              if (null != propValue$jscomp$4)\n                switch (propKey$jscomp$4) {\n                  case \"children\":\n                    children$jscomp$3 = propValue$jscomp$4;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$2 = propValue$jscomp$4;\n                    break;\n                  case \"name\":\n                    name$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formAction\":\n                    formAction$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formEncType\":\n                    formEncType$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formMethod\":\n                    formMethod$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formTarget\":\n                    formTarget$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$4,\n                      propValue$jscomp$4\n                    );\n                }\n            }\n          null === formAction$jscomp$0 ||\n            null == props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'A button can only specify a formAction along with type=\"submit\" or no type.'\n            ));\n          var formData$jscomp$0 = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction$jscomp$0,\n            formEncType$jscomp$0,\n            formMethod$jscomp$0,\n            formTarget$jscomp$0,\n            name$jscomp$0\n          );\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          null != formData$jscomp$0 &&\n            formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);\n          if (\"string\" === typeof children$jscomp$3) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));\n            var JSCompiler_inline_result$jscomp$1 = null;\n          } else JSCompiler_inline_result$jscomp$1 = children$jscomp$3;\n          return JSCompiler_inline_result$jscomp$1;\n        case \"form\":\n          target$jscomp$0.push(startChunkForTag(\"form\"));\n          var children$jscomp$4 = null,\n            innerHTML$jscomp$3 = null,\n            formAction$jscomp$1 = null,\n            formEncType$jscomp$1 = null,\n            formMethod$jscomp$1 = null,\n            formTarget$jscomp$1 = null,\n            propKey$jscomp$5;\n          for (propKey$jscomp$5 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$5)) {\n              var propValue$jscomp$5 = props[propKey$jscomp$5];\n              if (null != propValue$jscomp$5)\n                switch (propKey$jscomp$5) {\n                  case \"children\":\n                    children$jscomp$4 = propValue$jscomp$5;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$3 = propValue$jscomp$5;\n                    break;\n                  case \"action\":\n                    formAction$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"encType\":\n                    formEncType$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"method\":\n                    formMethod$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"target\":\n                    formTarget$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$5,\n                      propValue$jscomp$5\n                    );\n                }\n            }\n          var formData$jscomp$1 = null,\n            formActionName = null;\n          if (\"function\" === typeof formAction$jscomp$1) {\n            (null === formEncType$jscomp$1 && null === formMethod$jscomp$1) ||\n              didWarnFormActionMethod ||\n              ((didWarnFormActionMethod = !0),\n              console.error(\n                \"Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.\"\n              ));\n            null === formTarget$jscomp$1 ||\n              didWarnFormActionTarget ||\n              ((didWarnFormActionTarget = !0),\n              console.error(\n                \"Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.\"\n              ));\n            var customFields = getCustomFormFields(\n              resumableState,\n              formAction$jscomp$1\n            );\n            null !== customFields\n              ? ((formAction$jscomp$1 = customFields.action || \"\"),\n                (formEncType$jscomp$1 = customFields.encType),\n                (formMethod$jscomp$1 = customFields.method),\n                (formTarget$jscomp$1 = customFields.target),\n                (formData$jscomp$1 = customFields.data),\n                (formActionName = customFields.name))\n              : (target$jscomp$0.push(\n                  attributeSeparator,\n                  \"action\",\n                  attributeAssign,\n                  actionJavaScriptURL,\n                  attributeEnd\n                ),\n                (formTarget$jscomp$1 =\n                  formMethod$jscomp$1 =\n                  formEncType$jscomp$1 =\n                  formAction$jscomp$1 =\n                    null),\n                injectFormReplayingRuntime(resumableState, renderState));\n          }\n          null != formAction$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"action\", formAction$jscomp$1);\n          null != formEncType$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"encType\", formEncType$jscomp$1);\n          null != formMethod$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"method\", formMethod$jscomp$1);\n          null != formTarget$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"target\", formTarget$jscomp$1);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          null !== formActionName &&\n            (target$jscomp$0.push(startHiddenInputChunk),\n            pushStringAttribute(target$jscomp$0, \"name\", formActionName),\n            target$jscomp$0.push(endOfStartTagSelfClosing),\n            null != formData$jscomp$1 &&\n              formData$jscomp$1.forEach(\n                pushAdditionalFormField,\n                target$jscomp$0\n              ));\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);\n          if (\"string\" === typeof children$jscomp$4) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));\n            var JSCompiler_inline_result$jscomp$2 = null;\n          } else JSCompiler_inline_result$jscomp$2 = children$jscomp$4;\n          return JSCompiler_inline_result$jscomp$2;\n        case \"menuitem\":\n          target$jscomp$0.push(startChunkForTag(\"menuitem\"));\n          for (var propKey$jscomp$6 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$6)) {\n              var propValue$jscomp$6 = props[propKey$jscomp$6];\n              if (null != propValue$jscomp$6)\n                switch (propKey$jscomp$6) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"menuitems cannot have `children` nor `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$6,\n                      propValue$jscomp$6\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          return null;\n        case \"object\":\n          target$jscomp$0.push(startChunkForTag(\"object\"));\n          var children$jscomp$5 = null,\n            innerHTML$jscomp$4 = null,\n            propKey$jscomp$7;\n          for (propKey$jscomp$7 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$7)) {\n              var propValue$jscomp$7 = props[propKey$jscomp$7];\n              if (null != propValue$jscomp$7)\n                switch (propKey$jscomp$7) {\n                  case \"children\":\n                    children$jscomp$5 = propValue$jscomp$7;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$4 = propValue$jscomp$7;\n                    break;\n                  case \"data\":\n                    checkAttributeStringCoercion(propValue$jscomp$7, \"data\");\n                    var sanitizedValue = sanitizeURL(\"\" + propValue$jscomp$7);\n                    if (\"\" === sanitizedValue) {\n                      console.error(\n                        'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                        propKey$jscomp$7,\n                        propKey$jscomp$7\n                      );\n                      break;\n                    }\n                    target$jscomp$0.push(\n                      attributeSeparator,\n                      \"data\",\n                      attributeAssign,\n                      escapeTextForBrowser(sanitizedValue),\n                      attributeEnd\n                    );\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$7,\n                      propValue$jscomp$7\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);\n          if (\"string\" === typeof children$jscomp$5) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));\n            var JSCompiler_inline_result$jscomp$3 = null;\n          } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;\n          return JSCompiler_inline_result$jscomp$3;\n        case \"title\":\n          var noscriptTagInScope = formatContext.tagScope & 1,\n            isFallback = formatContext.tagScope & 4;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$6 = props.children,\n              child = Array.isArray(children$jscomp$6)\n                ? 2 > children$jscomp$6.length\n                  ? children$jscomp$6[0]\n                  : null\n                : children$jscomp$6;\n            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length\n              ? console.error(\n                  \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.\",\n                  children$jscomp$6.length\n                )\n              : \"function\" === typeof child || \"symbol\" === typeof child\n                ? console.error(\n                    \"React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.\",\n                    \"function\" === typeof child ? \"a Function\" : \"a Sybmol\"\n                  )\n                : child &&\n                  child.toString === {}.toString &&\n                  (null != child.$$typeof\n                    ? console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.\"\n                      )\n                    : console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.\"\n                      ));\n          }\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(\n              target$jscomp$0,\n              props\n            );\n          else\n            isFallback\n              ? (JSCompiler_inline_result$jscomp$4 = null)\n              : (pushTitleImpl(renderState.hoistableChunks, props),\n                (JSCompiler_inline_result$jscomp$4 = void 0));\n          return JSCompiler_inline_result$jscomp$4;\n        case \"link\":\n          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,\n            isFallback$jscomp$0 = formatContext.tagScope & 4,\n            rel = props.rel,\n            href = props.href,\n            precedence = props.precedence;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$0 ||\n            null != props.itemProp ||\n            \"string\" !== typeof rel ||\n            \"string\" !== typeof href ||\n            \"\" === href\n          ) {\n            \"stylesheet\" === rel &&\n              \"string\" === typeof props.precedence &&\n              ((\"string\" === typeof href && href) ||\n                console.error(\n                  'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',\n                  null === href\n                    ? \"`null`\"\n                    : void 0 === href\n                      ? \"`undefined`\"\n                      : \"\" === href\n                        ? \"an empty string\"\n                        : 'something with type \"' + typeof href + '\"'\n                ));\n            pushLinkImpl(target$jscomp$0, props);\n            var JSCompiler_inline_result$jscomp$5 = null;\n          } else if (\"stylesheet\" === props.rel)\n            if (\n              \"string\" !== typeof precedence ||\n              null != props.disabled ||\n              props.onLoad ||\n              props.onError\n            ) {\n              if (\"string\" === typeof precedence)\n                if (null != props.disabled)\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'\n                  );\n                else if (props.onLoad || props.onError) {\n                  var propDescription =\n                    props.onLoad && props.onError\n                      ? \"`onLoad` and `onError` props\"\n                      : props.onLoad\n                        ? \"`onLoad` prop\"\n                        : \"`onError` prop\";\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',\n                    propDescription,\n                    propDescription\n                  );\n                }\n              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                target$jscomp$0,\n                props\n              );\n            } else {\n              var styleQueue = renderState.styles.get(precedence),\n                resourceState = resumableState.styleResources.hasOwnProperty(\n                  href\n                )\n                  ? resumableState.styleResources[href]\n                  : void 0;\n              if (resourceState !== EXISTS) {\n                resumableState.styleResources[href] = EXISTS;\n                styleQueue ||\n                  ((styleQueue = {\n                    precedence: escapeTextForBrowser(precedence),\n                    rules: [],\n                    hrefs: [],\n                    sheets: new Map()\n                  }),\n                  renderState.styles.set(precedence, styleQueue));\n                var resource = {\n                  state: PENDING$1,\n                  props: assign({}, props, {\n                    \"data-precedence\": props.precedence,\n                    precedence: null\n                  })\n                };\n                if (resourceState) {\n                  2 === resourceState.length &&\n                    adoptPreloadCredentials(resource.props, resourceState);\n                  var preloadResource =\n                    renderState.preloads.stylesheets.get(href);\n                  preloadResource && 0 < preloadResource.length\n                    ? (preloadResource.length = 0)\n                    : (resource.state = PRELOADED);\n                }\n                styleQueue.sheets.set(href, resource);\n                hoistableState && hoistableState.stylesheets.add(resource);\n              } else if (styleQueue) {\n                var _resource = styleQueue.sheets.get(href);\n                _resource &&\n                  hoistableState &&\n                  hoistableState.stylesheets.add(_resource);\n              }\n              textEmbedded && target$jscomp$0.push(textSeparator);\n              JSCompiler_inline_result$jscomp$5 = null;\n            }\n          else\n            props.onLoad || props.onError\n              ? (JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                  target$jscomp$0,\n                  props\n                ))\n              : (textEmbedded && target$jscomp$0.push(textSeparator),\n                (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0\n                  ? null\n                  : pushLinkImpl(renderState.hoistableChunks, props)));\n          return JSCompiler_inline_result$jscomp$5;\n        case \"script\":\n          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,\n            asyncProp = props.async;\n          if (\n            \"string\" !== typeof props.src ||\n            !props.src ||\n            !asyncProp ||\n            \"function\" === typeof asyncProp ||\n            \"symbol\" === typeof asyncProp ||\n            props.onLoad ||\n            props.onError ||\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$1 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(\n              target$jscomp$0,\n              props\n            );\n          else {\n            var key = props.src;\n            if (\"module\" === props.type) {\n              var resources = resumableState.moduleScriptResources;\n              var preloads = renderState.preloads.moduleScripts;\n            } else\n              (resources = resumableState.scriptResources),\n                (preloads = renderState.preloads.scripts);\n            var resourceState$jscomp$0 = resources.hasOwnProperty(key)\n              ? resources[key]\n              : void 0;\n            if (resourceState$jscomp$0 !== EXISTS) {\n              resources[key] = EXISTS;\n              var scriptProps = props;\n              if (resourceState$jscomp$0) {\n                2 === resourceState$jscomp$0.length &&\n                  ((scriptProps = assign({}, props)),\n                  adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));\n                var preloadResource$jscomp$0 = preloads.get(key);\n                preloadResource$jscomp$0 &&\n                  (preloadResource$jscomp$0.length = 0);\n              }\n              var resource$jscomp$0 = [];\n              renderState.scripts.add(resource$jscomp$0);\n              pushScriptImpl(resource$jscomp$0, scriptProps);\n            }\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$6 = null;\n          }\n          return JSCompiler_inline_result$jscomp$6;\n        case \"style\":\n          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$7 = props.children,\n              child$jscomp$0 = Array.isArray(children$jscomp$7)\n                ? 2 > children$jscomp$7.length\n                  ? children$jscomp$7[0]\n                  : null\n                : children$jscomp$7;\n            (\"function\" === typeof child$jscomp$0 ||\n              \"symbol\" === typeof child$jscomp$0 ||\n              Array.isArray(child$jscomp$0)) &&\n              console.error(\n                \"React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.\",\n                \"function\" === typeof child$jscomp$0\n                  ? \"a Function\"\n                  : \"symbol\" === typeof child$jscomp$0\n                    ? \"a Sybmol\"\n                    : \"an Array\"\n              );\n          }\n          var precedence$jscomp$0 = props.precedence,\n            href$jscomp$0 = props.href,\n            nonce = props.nonce;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$2 ||\n            null != props.itemProp ||\n            \"string\" !== typeof precedence$jscomp$0 ||\n            \"string\" !== typeof href$jscomp$0 ||\n            \"\" === href$jscomp$0\n          ) {\n            target$jscomp$0.push(startChunkForTag(\"style\"));\n            var children$jscomp$8 = null,\n              innerHTML$jscomp$5 = null,\n              propKey$jscomp$8;\n            for (propKey$jscomp$8 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$8)) {\n                var propValue$jscomp$8 = props[propKey$jscomp$8];\n                if (null != propValue$jscomp$8)\n                  switch (propKey$jscomp$8) {\n                    case \"children\":\n                      children$jscomp$8 = propValue$jscomp$8;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$5 = propValue$jscomp$8;\n                      break;\n                    default:\n                      pushAttribute(\n                        target$jscomp$0,\n                        propKey$jscomp$8,\n                        propValue$jscomp$8\n                      );\n                  }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            var child$jscomp$1 = Array.isArray(children$jscomp$8)\n              ? 2 > children$jscomp$8.length\n                ? children$jscomp$8[0]\n                : null\n              : children$jscomp$8;\n            \"function\" !== typeof child$jscomp$1 &&\n              \"symbol\" !== typeof child$jscomp$1 &&\n              null !== child$jscomp$1 &&\n              void 0 !== child$jscomp$1 &&\n              target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$5,\n              children$jscomp$8\n            );\n            target$jscomp$0.push(endChunkForTag(\"style\"));\n            var JSCompiler_inline_result$jscomp$7 = null;\n          } else {\n            href$jscomp$0.includes(\" \") &&\n              console.error(\n                'React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".',\n                href$jscomp$0\n              );\n            var styleQueue$jscomp$0 =\n                renderState.styles.get(precedence$jscomp$0),\n              resourceState$jscomp$1 =\n                resumableState.styleResources.hasOwnProperty(href$jscomp$0)\n                  ? resumableState.styleResources[href$jscomp$0]\n                  : void 0;\n            if (resourceState$jscomp$1 !== EXISTS) {\n              resumableState.styleResources[href$jscomp$0] = EXISTS;\n              resourceState$jscomp$1 &&\n                console.error(\n                  'React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.',\n                  href$jscomp$0\n                );\n              styleQueue$jscomp$0 ||\n                ((styleQueue$jscomp$0 = {\n                  precedence: escapeTextForBrowser(precedence$jscomp$0),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(\n                  precedence$jscomp$0,\n                  styleQueue$jscomp$0\n                ));\n              var nonceStyle = renderState.nonce.style;\n              if (nonceStyle && nonceStyle !== nonce)\n                console.error(\n                  'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce \"%s\" that was included with this render.',\n                  precedence$jscomp$0,\n                  nonce,\n                  nonceStyle\n                );\n              else {\n                !nonceStyle &&\n                  nonce &&\n                  console.error(\n                    'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',\n                    precedence$jscomp$0,\n                    nonce\n                  );\n                styleQueue$jscomp$0.hrefs.push(\n                  escapeTextForBrowser(href$jscomp$0)\n                );\n                var target = styleQueue$jscomp$0.rules,\n                  children$jscomp$9 = null,\n                  innerHTML$jscomp$6 = null,\n                  propKey$jscomp$9;\n                for (propKey$jscomp$9 in props)\n                  if (hasOwnProperty.call(props, propKey$jscomp$9)) {\n                    var propValue$jscomp$9 = props[propKey$jscomp$9];\n                    if (null != propValue$jscomp$9)\n                      switch (propKey$jscomp$9) {\n                        case \"children\":\n                          children$jscomp$9 = propValue$jscomp$9;\n                          break;\n                        case \"dangerouslySetInnerHTML\":\n                          innerHTML$jscomp$6 = propValue$jscomp$9;\n                      }\n                  }\n                var child$jscomp$2 = Array.isArray(children$jscomp$9)\n                  ? 2 > children$jscomp$9.length\n                    ? children$jscomp$9[0]\n                    : null\n                  : children$jscomp$9;\n                \"function\" !== typeof child$jscomp$2 &&\n                  \"symbol\" !== typeof child$jscomp$2 &&\n                  null !== child$jscomp$2 &&\n                  void 0 !== child$jscomp$2 &&\n                  target.push(escapeStyleTextContent(child$jscomp$2));\n                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);\n              }\n            }\n            styleQueue$jscomp$0 &&\n              hoistableState &&\n              hoistableState.styles.add(styleQueue$jscomp$0);\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$7 = void 0;\n          }\n          return JSCompiler_inline_result$jscomp$7;\n        case \"meta\":\n          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,\n            isFallback$jscomp$1 = formatContext.tagScope & 4;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$3 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(\n              target$jscomp$0,\n              props,\n              \"meta\",\n              formatContext\n            );\n          else\n            textEmbedded && target$jscomp$0.push(textSeparator),\n              (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1\n                ? null\n                : \"string\" === typeof props.charSet\n                  ? pushSelfClosing(\n                      renderState.charsetChunks,\n                      props,\n                      \"meta\",\n                      formatContext\n                    )\n                  : \"viewport\" === props.name\n                    ? pushSelfClosing(\n                        renderState.viewportChunks,\n                        props,\n                        \"meta\",\n                        formatContext\n                      )\n                    : pushSelfClosing(\n                        renderState.hoistableChunks,\n                        props,\n                        \"meta\",\n                        formatContext\n                      ));\n          return JSCompiler_inline_result$jscomp$8;\n        case \"listing\":\n        case \"pre\":\n          target$jscomp$0.push(startChunkForTag(type));\n          var children$jscomp$10 = null,\n            innerHTML$jscomp$7 = null,\n            propKey$jscomp$10;\n          for (propKey$jscomp$10 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$10)) {\n              var propValue$jscomp$10 = props[propKey$jscomp$10];\n              if (null != propValue$jscomp$10)\n                switch (propKey$jscomp$10) {\n                  case \"children\":\n                    children$jscomp$10 = propValue$jscomp$10;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$7 = propValue$jscomp$10;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$10,\n                      propValue$jscomp$10\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != innerHTML$jscomp$7) {\n            if (null != children$jscomp$10)\n              throw Error(\n                \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n              );\n            if (\n              \"object\" !== typeof innerHTML$jscomp$7 ||\n              !(\"__html\" in innerHTML$jscomp$7)\n            )\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            var html = innerHTML$jscomp$7.__html;\n            null !== html &&\n              void 0 !== html &&\n              (\"string\" === typeof html && 0 < html.length && \"\\n\" === html[0]\n                ? target$jscomp$0.push(leadingNewline, html)\n                : (checkHtmlStringCoercion(html),\n                  target$jscomp$0.push(\"\" + html)));\n          }\n          \"string\" === typeof children$jscomp$10 &&\n            \"\\n\" === children$jscomp$10[0] &&\n            target$jscomp$0.push(leadingNewline);\n          return children$jscomp$10;\n        case \"img\":\n          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,\n            src = props.src,\n            srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!src && !srcSet) ||\n              (\"string\" !== typeof src && null != src) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              pictureOrNoScriptTagInScope\n            ) &&\n            (\"string\" !== typeof src ||\n              \":\" !== src[4] ||\n              (\"d\" !== src[0] && \"D\" !== src[0]) ||\n              (\"a\" !== src[1] && \"A\" !== src[1]) ||\n              (\"t\" !== src[2] && \"T\" !== src[2]) ||\n              (\"a\" !== src[3] && \"A\" !== src[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            null !== hoistableState &&\n              formatContext.tagScope & 64 &&\n              (hoistableState.suspenseyImages = !0);\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0,\n              key$jscomp$0 = srcSet ? srcSet + \"\\n\" + (sizes || \"\") : src,\n              promotablePreloads = renderState.preloads.images,\n              resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);\n            if (resource$jscomp$1) {\n              if (\n                \"high\" === props.fetchPriority ||\n                10 > renderState.highImagePreloads.size\n              )\n                promotablePreloads.delete(key$jscomp$0),\n                  renderState.highImagePreloads.add(resource$jscomp$1);\n            } else if (\n              !resumableState.imageResources.hasOwnProperty(key$jscomp$0)\n            ) {\n              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;\n              var input = props.crossOrigin;\n              var crossOrigin =\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0;\n              var headers = renderState.headers,\n                header;\n              headers &&\n              0 < headers.remainingCapacity &&\n              \"string\" !== typeof props.srcSet &&\n              (\"high\" === props.fetchPriority ||\n                500 > headers.highImagePreloads.length) &&\n              ((header = getPreloadAsHeader(src, \"image\", {\n                imageSrcSet: props.srcSet,\n                imageSizes: props.sizes,\n                crossOrigin: crossOrigin,\n                integrity: props.integrity,\n                nonce: props.nonce,\n                type: props.type,\n                fetchPriority: props.fetchPriority,\n                referrerPolicy: props.referrerPolicy\n              })),\n              0 <= (headers.remainingCapacity -= header.length + 2))\n                ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),\n                  headers.highImagePreloads &&\n                    (headers.highImagePreloads += \", \"),\n                  (headers.highImagePreloads += header))\n                : ((resource$jscomp$1 = []),\n                  pushLinkImpl(resource$jscomp$1, {\n                    rel: \"preload\",\n                    as: \"image\",\n                    href: srcSet ? void 0 : src,\n                    imageSrcSet: srcSet,\n                    imageSizes: sizes,\n                    crossOrigin: crossOrigin,\n                    integrity: props.integrity,\n                    type: props.type,\n                    fetchPriority: props.fetchPriority,\n                    referrerPolicy: props.referrerPolicy\n                  }),\n                  \"high\" === props.fetchPriority ||\n                  10 > renderState.highImagePreloads.size\n                    ? renderState.highImagePreloads.add(resource$jscomp$1)\n                    : (renderState.bulkPreloads.add(resource$jscomp$1),\n                      promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));\n            }\n          }\n          return pushSelfClosing(target$jscomp$0, props, \"img\", formatContext);\n        case \"base\":\n        case \"area\":\n        case \"br\":\n        case \"col\":\n        case \"embed\":\n        case \"hr\":\n        case \"keygen\":\n        case \"param\":\n        case \"source\":\n        case \"track\":\n        case \"wbr\":\n          return pushSelfClosing(target$jscomp$0, props, type, formatContext);\n        case \"annotation-xml\":\n        case \"color-profile\":\n        case \"font-face\":\n        case \"font-face-src\":\n        case \"font-face-uri\":\n        case \"font-face-format\":\n        case \"font-face-name\":\n        case \"missing-glyph\":\n          break;\n        case \"head\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble = preambleState || renderState.preamble;\n            if (preamble.headChunks)\n              throw Error(\"The `<head>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(headPreambleContributionChunk);\n            preamble.headChunks = [];\n            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(\n              preamble.headChunks,\n              props,\n              \"head\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"head\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$9;\n        case \"body\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble$jscomp$0 = preambleState || renderState.preamble;\n            if (preamble$jscomp$0.bodyChunks)\n              throw Error(\"The `<body>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(bodyPreambleContributionChunk);\n            preamble$jscomp$0.bodyChunks = [];\n            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(\n              preamble$jscomp$0.bodyChunks,\n              props,\n              \"body\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"body\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$10;\n        case \"html\":\n          if (formatContext.insertionMode === ROOT_HTML_MODE) {\n            var preamble$jscomp$1 = preambleState || renderState.preamble;\n            if (preamble$jscomp$1.htmlChunks)\n              throw Error(\"The `<html>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(htmlPreambleContributionChunk);\n            preamble$jscomp$1.htmlChunks = [doctypeChunk];\n            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(\n              preamble$jscomp$1.htmlChunks,\n              props,\n              \"html\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"html\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$11;\n        default:\n          if (-1 !== type.indexOf(\"-\")) {\n            target$jscomp$0.push(startChunkForTag(type));\n            var children$jscomp$11 = null,\n              innerHTML$jscomp$8 = null,\n              propKey$jscomp$11;\n            for (propKey$jscomp$11 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$11)) {\n                var propValue$jscomp$11 = props[propKey$jscomp$11];\n                if (null != propValue$jscomp$11) {\n                  var attributeName = propKey$jscomp$11;\n                  switch (propKey$jscomp$11) {\n                    case \"children\":\n                      children$jscomp$11 = propValue$jscomp$11;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$8 = propValue$jscomp$11;\n                      break;\n                    case \"style\":\n                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);\n                      break;\n                    case \"suppressContentEditableWarning\":\n                    case \"suppressHydrationWarning\":\n                    case \"ref\":\n                      break;\n                    case \"className\":\n                      attributeName = \"class\";\n                    default:\n                      if (\n                        isAttributeNameSafe(propKey$jscomp$11) &&\n                        \"function\" !== typeof propValue$jscomp$11 &&\n                        \"symbol\" !== typeof propValue$jscomp$11 &&\n                        !1 !== propValue$jscomp$11\n                      ) {\n                        if (!0 === propValue$jscomp$11)\n                          propValue$jscomp$11 = \"\";\n                        else if (\"object\" === typeof propValue$jscomp$11)\n                          continue;\n                        target$jscomp$0.push(\n                          attributeSeparator,\n                          attributeName,\n                          attributeAssign,\n                          escapeTextForBrowser(propValue$jscomp$11),\n                          attributeEnd\n                        );\n                      }\n                  }\n                }\n              }\n            pushViewTransitionAttributes(target$jscomp$0, formatContext);\n            target$jscomp$0.push(endOfStartTag);\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$8,\n              children$jscomp$11\n            );\n            return children$jscomp$11;\n          }\n      }\n      return pushStartGenericElement(\n        target$jscomp$0,\n        props,\n        type,\n        formatContext\n      );\n    }\n    function endChunkForTag(tag) {\n      var chunk = endTagCache.get(tag);\n      void 0 === chunk &&\n        ((chunk = stringToPrecomputedChunk(\"</\" + tag + \">\")),\n        endTagCache.set(tag, chunk));\n      return chunk;\n    }\n    function hoistPreambleState(renderState, preambleState) {\n      renderState = renderState.preamble;\n      null === renderState.htmlChunks &&\n        preambleState.htmlChunks &&\n        (renderState.htmlChunks = preambleState.htmlChunks);\n      null === renderState.headChunks &&\n        preambleState.headChunks &&\n        (renderState.headChunks = preambleState.headChunks);\n      null === renderState.bodyChunks &&\n        preambleState.bodyChunks &&\n        (renderState.bodyChunks = preambleState.bodyChunks);\n    }\n    function writeBootstrap(destination, renderState) {\n      renderState = renderState.bootstrapChunks;\n      for (var i = 0; i < renderState.length - 1; i++)\n        writeChunk(destination, renderState[i]);\n      return i < renderState.length\n        ? ((i = renderState[i]),\n          (renderState.length = 0),\n          writeChunkAndReturn(destination, i))\n        : !0;\n    }\n    function writeStartPendingSuspenseBoundary(destination, renderState, id) {\n      writeChunk(destination, startPendingSuspenseBoundary1);\n      if (null === id)\n        throw Error(\n          \"An ID must have been assigned before we can complete the boundary.\"\n        );\n      writeChunk(destination, renderState.boundaryPrefix);\n      writeChunk(destination, id.toString(16));\n      return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n    }\n    function writeStartSegment(destination, renderState, formatContext, id) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return (\n            writeChunk(destination, startSegmentHTML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentHTML2)\n          );\n        case SVG_MODE:\n          return (\n            writeChunk(destination, startSegmentSVG),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentSVG2)\n          );\n        case MATHML_MODE:\n          return (\n            writeChunk(destination, startSegmentMathML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentMathML2)\n          );\n        case HTML_TABLE_MODE:\n          return (\n            writeChunk(destination, startSegmentTable),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTable2)\n          );\n        case HTML_TABLE_BODY_MODE:\n          return (\n            writeChunk(destination, startSegmentTableBody),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTableBody2)\n          );\n        case HTML_TABLE_ROW_MODE:\n          return (\n            writeChunk(destination, startSegmentTableRow),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTableRow2)\n          );\n        case HTML_COLGROUP_MODE:\n          return (\n            writeChunk(destination, startSegmentColGroup),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentColGroup2)\n          );\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function writeEndSegment(destination, formatContext) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return writeChunkAndReturn(destination, endSegmentHTML);\n        case SVG_MODE:\n          return writeChunkAndReturn(destination, endSegmentSVG);\n        case MATHML_MODE:\n          return writeChunkAndReturn(destination, endSegmentMathML);\n        case HTML_TABLE_MODE:\n          return writeChunkAndReturn(destination, endSegmentTable);\n        case HTML_TABLE_BODY_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableBody);\n        case HTML_TABLE_ROW_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableRow);\n        case HTML_COLGROUP_MODE:\n          return writeChunkAndReturn(destination, endSegmentColGroup);\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function escapeJSStringsForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInInstructionScripts,\n        function (match) {\n          switch (match) {\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function escapeJSObjectForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInScripts,\n        function (match) {\n          switch (match) {\n            case \"&\":\n              return \"\\\\u0026\";\n            case \">\":\n              return \"\\\\u003e\";\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function flushStyleTagsLateForBoundary(styleQueue) {\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      0 < rules.length &&\n        0 === hrefs.length &&\n        console.error(\n          \"React expected to have at least one href for an a hoistable style but found none. This is a bug in React.\"\n        );\n      var i = 0;\n      if (hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, lateStyleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        for (\n          writeChunk(this, lateStyleTagResourceOpen2);\n          i < hrefs.length - 1;\n          i++\n        )\n          writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);\n        writeChunk(this, hrefs[i]);\n        writeChunk(this, lateStyleTagResourceOpen3);\n        for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);\n        destinationHasCapacity = writeChunkAndReturn(\n          this,\n          lateStyleTagTemplateClose\n        );\n        currentlyRenderingBoundaryHasStylesToHoist = !0;\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function hasStylesToHoist(stylesheet) {\n      return stylesheet.state !== PREAMBLE\n        ? (currentlyRenderingBoundaryHasStylesToHoist = !0)\n        : !1;\n    }\n    function writeHoistablesForBoundary(\n      destination,\n      hoistableState,\n      renderState\n    ) {\n      currentlyRenderingBoundaryHasStylesToHoist = !1;\n      destinationHasCapacity = !0;\n      currentlyFlushingRenderState = renderState;\n      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);\n      currentlyFlushingRenderState = null;\n      hoistableState.stylesheets.forEach(hasStylesToHoist);\n      currentlyRenderingBoundaryHasStylesToHoist &&\n        (renderState.stylesToHoist = !0);\n      return destinationHasCapacity;\n    }\n    function flushResource(resource) {\n      for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);\n      resource.length = 0;\n    }\n    function flushStyleInPreamble(stylesheet) {\n      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n      for (var i = 0; i < stylesheetFlushingQueue.length; i++)\n        writeChunk(this, stylesheetFlushingQueue[i]);\n      stylesheetFlushingQueue.length = 0;\n      stylesheet.state = PREAMBLE;\n    }\n    function flushStylesInPreamble(styleQueue) {\n      var hasStylesheets = 0 < styleQueue.sheets.size;\n      styleQueue.sheets.forEach(flushStyleInPreamble, this);\n      styleQueue.sheets.clear();\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      if (!hasStylesheets || hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, styleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        styleQueue = 0;\n        if (hrefs.length) {\n          for (\n            writeChunk(this, styleTagResourceOpen2);\n            styleQueue < hrefs.length - 1;\n            styleQueue++\n          )\n            writeChunk(this, hrefs[styleQueue]),\n              writeChunk(this, spaceSeparator);\n          writeChunk(this, hrefs[styleQueue]);\n        }\n        writeChunk(this, styleTagResourceOpen3);\n        for (styleQueue = 0; styleQueue < rules.length; styleQueue++)\n          writeChunk(this, rules[styleQueue]);\n        writeChunk(this, styleTagResourceClose);\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function preloadLateStyle(stylesheet) {\n      if (stylesheet.state === PENDING$1) {\n        stylesheet.state = PRELOADED;\n        var props = stylesheet.props;\n        pushLinkImpl(stylesheetFlushingQueue, {\n          rel: \"preload\",\n          as: \"style\",\n          href: stylesheet.props.href,\n          crossOrigin: props.crossOrigin,\n          fetchPriority: props.fetchPriority,\n          integrity: props.integrity,\n          media: props.media,\n          hrefLang: props.hrefLang,\n          referrerPolicy: props.referrerPolicy\n        });\n        for (\n          stylesheet = 0;\n          stylesheet < stylesheetFlushingQueue.length;\n          stylesheet++\n        )\n          writeChunk(this, stylesheetFlushingQueue[stylesheet]);\n        stylesheetFlushingQueue.length = 0;\n      }\n    }\n    function preloadLateStyles(styleQueue) {\n      styleQueue.sheets.forEach(preloadLateStyle, this);\n      styleQueue.sheets.clear();\n    }\n    function pushCompletedShellIdAttribute(target, resumableState) {\n      (resumableState.instructions & SentCompletedShellId) === NothingSent &&\n        ((resumableState.instructions |= SentCompletedShellId),\n        target.push(\n          completedShellIdAttributeStart,\n          escapeTextForBrowser(\"_\" + resumableState.idPrefix + \"R_\"),\n          attributeEnd\n        ));\n    }\n    function writeStyleResourceDependenciesInJS(destination, hoistableState) {\n      writeChunk(destination, arrayFirstOpenBracket);\n      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n      hoistableState.stylesheets.forEach(function (resource) {\n        if (resource.state !== PREAMBLE)\n          if (resource.state === LATE)\n            writeChunk(destination, nextArrayOpenBrackChunk),\n              (resource = resource.props.href),\n              checkAttributeStringCoercion(resource, \"href\"),\n              writeChunk(\n                destination,\n                escapeJSObjectForInstructionScripts(\"\" + resource)\n              ),\n              writeChunk(destination, arrayCloseBracket),\n              (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);\n          else {\n            writeChunk(destination, nextArrayOpenBrackChunk);\n            var precedence = resource.props[\"data-precedence\"],\n              props = resource.props,\n              coercedHref = sanitizeURL(\"\" + resource.props.href);\n            writeChunk(\n              destination,\n              escapeJSObjectForInstructionScripts(coercedHref)\n            );\n            checkAttributeStringCoercion(precedence, \"precedence\");\n            precedence = \"\" + precedence;\n            writeChunk(destination, arrayInterstitial);\n            writeChunk(\n              destination,\n              escapeJSObjectForInstructionScripts(precedence)\n            );\n            for (var propKey in props)\n              if (\n                hasOwnProperty.call(props, propKey) &&\n                ((precedence = props[propKey]), null != precedence)\n              )\n                switch (propKey) {\n                  case \"href\":\n                  case \"rel\":\n                  case \"precedence\":\n                  case \"data-precedence\":\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    writeStyleResourceAttributeInJS(\n                      destination,\n                      propKey,\n                      precedence\n                    );\n                }\n            writeChunk(destination, arrayCloseBracket);\n            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n            resource.state = LATE;\n          }\n      });\n      writeChunk(destination, arrayCloseBracket);\n    }\n    function writeStyleResourceAttributeInJS(destination, name, value) {\n      var attributeName = name.toLowerCase();\n      switch (typeof value) {\n        case \"function\":\n        case \"symbol\":\n          return;\n      }\n      switch (name) {\n        case \"innerHTML\":\n        case \"dangerouslySetInnerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"style\":\n        case \"ref\":\n          return;\n        case \"className\":\n          attributeName = \"class\";\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        case \"hidden\":\n          if (!1 === value) return;\n          name = \"\";\n          break;\n        case \"src\":\n        case \"href\":\n          value = sanitizeURL(value);\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        default:\n          if (\n            (2 < name.length &&\n              (\"o\" === name[0] || \"O\" === name[0]) &&\n              (\"n\" === name[1] || \"N\" === name[1])) ||\n            !isAttributeNameSafe(name)\n          )\n            return;\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n      }\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(\n        destination,\n        escapeJSObjectForInstructionScripts(attributeName)\n      );\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(destination, escapeJSObjectForInstructionScripts(name));\n    }\n    function createHoistableState() {\n      return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };\n    }\n    function preloadBootstrapScriptOrModule(\n      resumableState,\n      renderState,\n      href,\n      props\n    ) {\n      (resumableState.scriptResources.hasOwnProperty(href) ||\n        resumableState.moduleScriptResources.hasOwnProperty(href)) &&\n        console.error(\n          'Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue',\n          href\n        );\n      resumableState.scriptResources[href] = EXISTS;\n      resumableState.moduleScriptResources[href] = EXISTS;\n      resumableState = [];\n      pushLinkImpl(resumableState, props);\n      renderState.bootstrapScripts.add(resumableState);\n    }\n    function adoptPreloadCredentials(target, preloadState) {\n      null == target.crossOrigin && (target.crossOrigin = preloadState[0]);\n      null == target.integrity && (target.integrity = preloadState[1]);\n    }\n    function getPreloadAsHeader(href, as, params) {\n      href = escapeHrefForLinkHeaderURLContext(href);\n      as = escapeStringForLinkHeaderQuotedParamValueContext(as, \"as\");\n      as = \"<\" + href + '>; rel=preload; as=\"' + as + '\"';\n      for (var paramName in params)\n        hasOwnProperty.call(params, paramName) &&\n          ((href = params[paramName]),\n          \"string\" === typeof href &&\n            (as +=\n              \"; \" +\n              paramName.toLowerCase() +\n              '=\"' +\n              escapeStringForLinkHeaderQuotedParamValueContext(\n                href,\n                paramName\n              ) +\n              '\"'));\n      return as;\n    }\n    function escapeHrefForLinkHeaderURLContext(hrefInput) {\n      checkAttributeStringCoercion(hrefInput, \"href\");\n      return (\"\" + hrefInput).replace(\n        regexForHrefInLinkHeaderURLContext,\n        escapeHrefForLinkHeaderURLContextReplacer\n      );\n    }\n    function escapeHrefForLinkHeaderURLContextReplacer(match) {\n      switch (match) {\n        case \"<\":\n          return \"%3C\";\n        case \">\":\n          return \"%3E\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n      willCoercionThrow(value) &&\n        (console.error(\n          \"The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          name,\n          typeName(value)\n        ),\n        testStringCoercion(value));\n      return (\"\" + value).replace(\n        regexForLinkHeaderQuotedParamValueContext,\n        escapeStringForLinkHeaderQuotedParamValueContextReplacer\n      );\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n      switch (match) {\n        case '\"':\n          return \"%22\";\n        case \"'\":\n          return \"%27\";\n        case \";\":\n          return \"%3B\";\n        case \",\":\n          return \"%2C\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function hoistStyleQueueDependency(styleQueue) {\n      this.styles.add(styleQueue);\n    }\n    function hoistStylesheetDependency(stylesheet) {\n      this.stylesheets.add(stylesheet);\n    }\n    function hoistHoistables(parentState, childState) {\n      childState.styles.forEach(hoistStyleQueueDependency, parentState);\n      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n      childState.suspenseyImages && (parentState.suspenseyImages = !0);\n    }\n    function hasSuspenseyContent(hoistableState, flushingInShell) {\n      return flushingInShell\n        ? hoistableState.suspenseyImages\n        : 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function popToNearestCommonAncestor(prev, next) {\n      if (prev !== next) {\n        prev.context._currentValue = prev.parentValue;\n        prev = prev.parent;\n        var parentNext = next.parent;\n        if (null === prev) {\n          if (null !== parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n        } else {\n          if (null === parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n          popToNearestCommonAncestor(prev, parentNext);\n        }\n        next.context._currentValue = next.value;\n      }\n    }\n    function popAllPrevious(prev) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      null !== prev && popAllPrevious(prev);\n    }\n    function pushAllNext(next) {\n      var parentNext = next.parent;\n      null !== parentNext && pushAllNext(parentNext);\n      next.context._currentValue = next.value;\n    }\n    function popPreviousToCommonLevel(prev, next) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      if (null === prev)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === next.depth\n        ? popToNearestCommonAncestor(prev, next)\n        : popPreviousToCommonLevel(prev, next);\n    }\n    function popNextToCommonLevel(prev, next) {\n      var parentNext = next.parent;\n      if (null === parentNext)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === parentNext.depth\n        ? popToNearestCommonAncestor(prev, parentNext)\n        : popNextToCommonLevel(prev, parentNext);\n      next.context._currentValue = next.value;\n    }\n    function switchContext(newSnapshot) {\n      var prev = currentActiveSnapshot;\n      prev !== newSnapshot &&\n        (null === prev\n          ? pushAllNext(newSnapshot)\n          : null === newSnapshot\n            ? popAllPrevious(prev)\n            : prev.depth === newSnapshot.depth\n              ? popToNearestCommonAncestor(prev, newSnapshot)\n              : prev.depth > newSnapshot.depth\n                ? popPreviousToCommonLevel(prev, newSnapshot)\n                : popNextToCommonLevel(prev, newSnapshot),\n        (currentActiveSnapshot = newSnapshot));\n    }\n    function warnOnInvalidCallback(callback) {\n      if (null !== callback && \"function\" !== typeof callback) {\n        var key = String(callback);\n        didWarnOnInvalidCallback.has(key) ||\n          (didWarnOnInvalidCallback.add(key),\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ));\n      }\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          getComponentNameFromType(publicInstance)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnAboutNoopUpdateForComponent[warningKey] ||\n        (console.error(\n          \"Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.\\n\\nPlease check the code for the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnAboutNoopUpdateForComponent[warningKey] = !0));\n    }\n    function getTreeId(context) {\n      var overflow = context.overflow;\n      context = context.id;\n      return (\n        (context & ~(1 << (32 - clz32(context) - 1))).toString(32) + overflow\n      );\n    }\n    function pushTreeContext(baseContext, totalChildren, index) {\n      var baseIdWithLeadingBit = baseContext.id;\n      baseContext = baseContext.overflow;\n      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n      baseIdWithLeadingBit &= ~(1 << baseLength);\n      index += 1;\n      var length = 32 - clz32(totalChildren) + baseLength;\n      if (30 < length) {\n        var numberOfOverflowBits = baseLength - (baseLength % 5);\n        length = (\n          baseIdWithLeadingBit &\n          ((1 << numberOfOverflowBits) - 1)\n        ).toString(32);\n        baseIdWithLeadingBit >>= numberOfOverflowBits;\n        baseLength -= numberOfOverflowBits;\n        return {\n          id:\n            (1 << (32 - clz32(totalChildren) + baseLength)) |\n            (index << baseLength) |\n            baseIdWithLeadingBit,\n          overflow: length + baseContext\n        };\n      }\n      return {\n        id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,\n        overflow: baseContext\n      };\n    }\n    function clz32Fallback(x) {\n      x >>>= 0;\n      return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n    }\n    function noop() {}\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? thenableState.push(thenable)\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          thenableState = thenable.reason;\n          if (void 0 === thenableState && !(\"reason\" in thenable))\n            throw Error(\n              \"A rejected Promise was passed to React without a `reason` property. React threw a generic error from where the Promise was used to assist in identifying the problematic Promise. Make sure that instrumented Promises correctly set the `reason` property when setting `status` to `'rejected'`.\"\n            );\n          throw thenableState;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          shouldCaptureSuspendedCallSite && captureSuspendedCallSite();\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function captureSuspendedCallSite() {\n      var currentTask = currentTaskInDEV;\n      if (null === currentTask)\n        throw Error(\n          \"Expected to have a current task when tracking a suspend call site. This is a bug in React.\"\n        );\n      var currentComponentStack = currentTask.componentStack;\n      if (null === currentComponentStack)\n        throw Error(\n          \"Expected to have a component stack on the current task when tracking a suspended call site. This is a bug in React.\"\n        );\n      suspendedCallSiteStack = {\n        parent: currentComponentStack.parent,\n        type: currentComponentStack.type,\n        owner: currentComponentStack.owner,\n        stack: Error(\"react-stack-top-frame\")\n      };\n      suspendedCallSiteDebugTask = currentTask.debugTask;\n    }\n    function ensureSuspendableThenableStateDEV(thenableState) {\n      var lastThenable = thenableState[thenableState.length - 1];\n      switch (lastThenable.status) {\n        case \"fulfilled\":\n          var previousThenableValue = lastThenable.value,\n            previousThenableThen = lastThenable.then.bind(lastThenable);\n          delete lastThenable.value;\n          delete lastThenable.status;\n          lastThenable.then = noop;\n          return function () {\n            lastThenable.then = previousThenableThen;\n            lastThenable.value = previousThenableValue;\n            lastThenable.status = \"fulfilled\";\n          };\n        case \"rejected\":\n          var previousThenableReason = lastThenable.reason,\n            _previousThenableThen = lastThenable.then.bind(lastThenable);\n          delete lastThenable.reason;\n          delete lastThenable.status;\n          lastThenable.then = noop;\n          return function () {\n            lastThenable.then = _previousThenableThen;\n            lastThenable.reason = previousThenableReason;\n            lastThenable.status = \"rejected\";\n          };\n      }\n      return noop;\n    }\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    function createFatalRecoverableError(recoverable) {\n      return Error(\n        \"The server render could not complete because client rendering was requested outside a Suspense boundary. See this error's cause for additional details.\",\n        { cause: recoverable }\n      );\n    }\n    function resolveCurrentlyRenderingComponent() {\n      if (null === currentlyRenderingComponent)\n        throw Error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\"\n        );\n      return currentlyRenderingComponent;\n    }\n    function createHook() {\n      if (0 < numberOfReRenders)\n        throw Error(\"Rendered more hooks than during the previous render\");\n      return { memoizedState: null, queue: null, next: null };\n    }\n    function createWorkInProgressHook() {\n      null === workInProgressHook\n        ? null === firstWorkInProgressHook\n          ? ((isReRender = !1),\n            (firstWorkInProgressHook = workInProgressHook = createHook()))\n          : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))\n        : null === workInProgressHook.next\n          ? ((isReRender = !1),\n            (workInProgressHook = workInProgressHook.next = createHook()))\n          : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));\n      return workInProgressHook;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState;\n      thenableState = null;\n      return state;\n    }\n    function resetHooksState() {\n      isInHookUserCodeInDev = !1;\n      currentlyRenderingKeyPath =\n        currentlyRenderingRequest =\n        currentlyRenderingTask =\n        currentlyRenderingComponent =\n          null;\n      didScheduleRenderPhaseUpdate = !1;\n      firstWorkInProgressHook = null;\n      numberOfReRenders = 0;\n      workInProgressHook = renderPhaseUpdates = null;\n    }\n    function readContext(context) {\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n        );\n      return context._currentValue;\n    }\n    function basicStateReducer(state, action) {\n      return \"function\" === typeof action ? action(state) : action;\n    }\n    function useReducer(reducer, initialArg, init) {\n      reducer !== basicStateReducer && (currentHookNameInDev = \"useReducer\");\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      if (isReRender) {\n        init = workInProgressHook.queue;\n        initialArg = init.dispatch;\n        if (null !== renderPhaseUpdates) {\n          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init);\n          if (void 0 !== firstRenderPhaseUpdate) {\n            renderPhaseUpdates.delete(init);\n            init = workInProgressHook.memoizedState;\n            do {\n              var action = firstRenderPhaseUpdate.action;\n              isInHookUserCodeInDev = !0;\n              init = reducer(init, action);\n              isInHookUserCodeInDev = !1;\n              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;\n            } while (null !== firstRenderPhaseUpdate);\n            workInProgressHook.memoizedState = init;\n            return [init, initialArg];\n          }\n        }\n        return [workInProgressHook.memoizedState, initialArg];\n      }\n      isInHookUserCodeInDev = !0;\n      reducer =\n        reducer === basicStateReducer\n          ? \"function\" === typeof initialArg\n            ? initialArg()\n            : initialArg\n          : void 0 !== init\n            ? init(initialArg)\n            : initialArg;\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = reducer;\n      reducer = workInProgressHook.queue = { last: null, dispatch: null };\n      reducer = reducer.dispatch = dispatchAction.bind(\n        null,\n        currentlyRenderingComponent,\n        reducer\n      );\n      return [workInProgressHook.memoizedState, reducer];\n    }\n    function useMemo(nextCreate, deps) {\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      if (null !== workInProgressHook) {\n        var prevState = workInProgressHook.memoizedState;\n        if (null !== prevState && null !== deps) {\n          a: {\n            var JSCompiler_inline_result = prevState[1];\n            if (null === JSCompiler_inline_result)\n              console.error(\n                \"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",\n                currentHookNameInDev\n              ),\n                (JSCompiler_inline_result = !1);\n            else {\n              deps.length !== JSCompiler_inline_result.length &&\n                console.error(\n                  \"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\\n\\nPrevious: %s\\nIncoming: %s\",\n                  currentHookNameInDev,\n                  \"[\" + deps.join(\", \") + \"]\",\n                  \"[\" + JSCompiler_inline_result.join(\", \") + \"]\"\n                );\n              for (\n                var i = 0;\n                i < JSCompiler_inline_result.length && i < deps.length;\n                i++\n              )\n                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {\n                  JSCompiler_inline_result = !1;\n                  break a;\n                }\n              JSCompiler_inline_result = !0;\n            }\n          }\n          if (JSCompiler_inline_result) return prevState[0];\n        }\n      }\n      isInHookUserCodeInDev = !0;\n      nextCreate = nextCreate();\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = [nextCreate, deps];\n      return nextCreate;\n    }\n    function dispatchAction(componentIdentity, queue, action) {\n      if (25 <= numberOfReRenders)\n        throw Error(\n          \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n        );\n      if (componentIdentity === currentlyRenderingComponent)\n        if (\n          ((didScheduleRenderPhaseUpdate = !0),\n          (componentIdentity = { action: action, next: null }),\n          null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),\n          (action = renderPhaseUpdates.get(queue)),\n          void 0 === action)\n        )\n          renderPhaseUpdates.set(queue, componentIdentity);\n        else {\n          for (queue = action; null !== queue.next; ) queue = queue.next;\n          queue.next = componentIdentity;\n        }\n    }\n    function throwOnUseEffectEventCall() {\n      throw Error(\n        \"A function wrapped in useEffectEvent can't be called during rendering.\"\n      );\n    }\n    function unsupportedStartTransition() {\n      throw Error(\"startTransition cannot be called during server rendering.\");\n    }\n    function unsupportedSetOptimisticState() {\n      throw Error(\"Cannot update optimistic state while rendering.\");\n    }\n    function createPostbackActionStateKey(\n      permalink,\n      componentKeyPath,\n      hookIndex\n    ) {\n      if (void 0 !== permalink) return \"p\" + permalink;\n      permalink = JSON.stringify([componentKeyPath, null, hookIndex]);\n      componentKeyPath = crypto.createHash(\"md5\");\n      componentKeyPath.update(permalink);\n      return \"k\" + componentKeyPath.digest(\"hex\");\n    }\n    function useActionState(action, initialState, permalink) {\n      resolveCurrentlyRenderingComponent();\n      var actionStateHookIndex = actionStateCounter++,\n        request = currentlyRenderingRequest;\n      if (\"function\" === typeof action.$$FORM_ACTION) {\n        var nextPostbackStateKey = null,\n          componentKeyPath = currentlyRenderingKeyPath;\n        request = request.formState;\n        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n        if (null !== request && \"function\" === typeof isSignatureEqual) {\n          var postbackKey = request[1];\n          isSignatureEqual.call(action, request[2], request[3]) &&\n            ((nextPostbackStateKey = createPostbackActionStateKey(\n              permalink,\n              componentKeyPath,\n              actionStateHookIndex\n            )),\n            postbackKey === nextPostbackStateKey &&\n              ((actionStateMatchingIndex = actionStateHookIndex),\n              (initialState = request[0])));\n        }\n        var boundAction = action.bind(null, initialState);\n        action = function (payload) {\n          boundAction(payload);\n        };\n        \"function\" === typeof boundAction.$$FORM_ACTION &&\n          (action.$$FORM_ACTION = function (prefix) {\n            prefix = boundAction.$$FORM_ACTION(prefix);\n            void 0 !== permalink &&\n              (checkAttributeStringCoercion(permalink, \"target\"),\n              (permalink += \"\"),\n              (prefix.action = permalink));\n            var formData = prefix.data;\n            formData &&\n              (null === nextPostbackStateKey &&\n                (nextPostbackStateKey = createPostbackActionStateKey(\n                  permalink,\n                  componentKeyPath,\n                  actionStateHookIndex\n                )),\n              formData.append(\"$ACTION_KEY\", nextPostbackStateKey));\n            return prefix;\n          });\n        return [initialState, action, !1];\n      }\n      var _boundAction = action.bind(null, initialState);\n      return [\n        initialState,\n        function (payload) {\n          _boundAction(payload);\n        },\n        !1\n      ];\n    }\n    function unwrapThenable(thenable) {\n      var index = thenableIndexCounter;\n      thenableIndexCounter += 1;\n      null === thenableState && (thenableState = []);\n      return trackUsedThenable(thenableState, thenable, index);\n    }\n    function unsupportedRefresh() {\n      throw Error(\"Cache cannot be refreshed during server rendering.\");\n    }\n    function disabledLog() {}\n    function disableLogs() {\n      if (0 === disabledDepth) {\n        prevLog = console.log;\n        prevInfo = console.info;\n        prevWarn = console.warn;\n        prevError = console.error;\n        prevGroup = console.group;\n        prevGroupCollapsed = console.groupCollapsed;\n        prevGroupEnd = console.groupEnd;\n        var props = {\n          configurable: !0,\n          enumerable: !0,\n          value: disabledLog,\n          writable: !0\n        };\n        Object.defineProperties(console, {\n          info: props,\n          log: props,\n          warn: props,\n          error: props,\n          group: props,\n          groupCollapsed: props,\n          groupEnd: props\n        });\n      }\n      disabledDepth++;\n    }\n    function reenableLogs() {\n      disabledDepth--;\n      if (0 === disabledDepth) {\n        var props = { configurable: !0, enumerable: !0, writable: !0 };\n        Object.defineProperties(console, {\n          log: assign({}, props, { value: prevLog }),\n          info: assign({}, props, { value: prevInfo }),\n          warn: assign({}, props, { value: prevWarn }),\n          error: assign({}, props, { value: prevError }),\n          group: assign({}, props, { value: prevGroup }),\n          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n          groupEnd: assign({}, props, { value: prevGroupEnd })\n        });\n      }\n      0 > disabledDepth &&\n        console.error(\n          \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function formatOwnerStack(error) {\n      var prevPrepareStackTrace = Error.prepareStackTrace;\n      Error.prepareStackTrace = prepareStackTrace;\n      error = error.stack;\n      Error.prepareStackTrace = prevPrepareStackTrace;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      prevPrepareStackTrace = error.indexOf(\"\\n\");\n      -1 !== prevPrepareStackTrace &&\n        (error = error.slice(prevPrepareStackTrace + 1));\n      prevPrepareStackTrace = error.indexOf(\"react_stack_bottom_frame\");\n      -1 !== prevPrepareStackTrace &&\n        (prevPrepareStackTrace = error.lastIndexOf(\n          \"\\n\",\n          prevPrepareStackTrace\n        ));\n      if (-1 !== prevPrepareStackTrace)\n        error = error.slice(0, prevPrepareStackTrace);\n      else return \"\";\n      return error;\n    }\n    function describeBuiltInComponentFrame(name) {\n      if (void 0 === prefix)\n        try {\n          throw Error();\n        } catch (x) {\n          var match = x.stack.trim().match(/\\n( *(at )?)/);\n          prefix = (match && match[1]) || \"\";\n          suffix =\n            -1 < x.stack.indexOf(\"\\n    at\")\n              ? \" (<anonymous>)\"\n              : -1 < x.stack.indexOf(\"@\")\n                ? \"@unknown:0:0\"\n                : \"\";\n        }\n      return \"\\n\" + prefix + name + suffix;\n    }\n    function describeNativeComponentFrame(fn, construct) {\n      if (!fn || reentry) return \"\";\n      var frame = componentFrameCache.get(fn);\n      if (void 0 !== frame) return frame;\n      reentry = !0;\n      frame = Error.prepareStackTrace;\n      Error.prepareStackTrace = prepareStackTrace;\n      var previousDispatcher = null;\n      previousDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = null;\n      disableLogs();\n      try {\n        var RunInRootFrame = {\n          DetermineComponentFrameRoot: function () {\n            try {\n              if (construct) {\n                var Fake = function () {\n                  throw Error();\n                };\n                Object.defineProperty(Fake.prototype, \"props\", {\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                if (\"object\" === typeof Reflect && Reflect.construct) {\n                  try {\n                    Reflect.construct(Fake, []);\n                  } catch (x) {\n                    var control = x;\n                  }\n                  Reflect.construct(fn, [], Fake);\n                } else {\n                  try {\n                    Fake.call();\n                  } catch (x$0) {\n                    control = x$0;\n                  }\n                  Fake = !1;\n                  try {\n                    var prevProps = Object.getOwnPropertyDescriptor(\n                      fn.prototype,\n                      \"props\"\n                    );\n                    Object.defineProperty(fn.prototype, \"props\", {\n                      configurable: !0,\n                      set: function () {\n                        throw Error();\n                      }\n                    });\n                    Fake = !0;\n                    new fn();\n                  } finally {\n                    Fake &&\n                      (void 0 !== prevProps\n                        ? Object.defineProperty(\n                            fn.prototype,\n                            \"props\",\n                            prevProps\n                          )\n                        : delete fn.prototype.props);\n                  }\n                }\n              } else {\n                try {\n                  throw Error();\n                } catch (x$1) {\n                  control = x$1;\n                }\n                (Fake = fn()) &&\n                  \"function\" === typeof Fake.catch &&\n                  Fake.catch(function () {});\n              }\n            } catch (sample) {\n              if (sample && control && \"string\" === typeof sample.stack)\n                return [sample.stack, control.stack];\n            }\n            return [null, null];\n          }\n        };\n        RunInRootFrame.DetermineComponentFrameRoot.displayName =\n          \"DetermineComponentFrameRoot\";\n        var namePropDescriptor = Object.getOwnPropertyDescriptor(\n          RunInRootFrame.DetermineComponentFrameRoot,\n          \"name\"\n        );\n        namePropDescriptor &&\n          namePropDescriptor.configurable &&\n          Object.defineProperty(\n            RunInRootFrame.DetermineComponentFrameRoot,\n            \"name\",\n            { value: \"DetermineComponentFrameRoot\" }\n          );\n        var _RunInRootFrame$Deter =\n            RunInRootFrame.DetermineComponentFrameRoot(),\n          sampleStack = _RunInRootFrame$Deter[0],\n          controlStack = _RunInRootFrame$Deter[1];\n        if (sampleStack && controlStack) {\n          var sampleLines = sampleStack.split(\"\\n\"),\n            controlLines = controlStack.split(\"\\n\");\n          for (\n            _RunInRootFrame$Deter = namePropDescriptor = 0;\n            namePropDescriptor < sampleLines.length &&\n            !sampleLines[namePropDescriptor].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            namePropDescriptor++;\n          for (\n            ;\n            _RunInRootFrame$Deter < controlLines.length &&\n            !controlLines[_RunInRootFrame$Deter].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            _RunInRootFrame$Deter++;\n          if (\n            namePropDescriptor === sampleLines.length ||\n            _RunInRootFrame$Deter === controlLines.length\n          )\n            for (\n              namePropDescriptor = sampleLines.length - 1,\n                _RunInRootFrame$Deter = controlLines.length - 1;\n              1 <= namePropDescriptor &&\n              0 <= _RunInRootFrame$Deter &&\n              sampleLines[namePropDescriptor] !==\n                controlLines[_RunInRootFrame$Deter];\n\n            )\n              _RunInRootFrame$Deter--;\n          for (\n            ;\n            1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n            namePropDescriptor--, _RunInRootFrame$Deter--\n          )\n            if (\n              sampleLines[namePropDescriptor] !==\n              controlLines[_RunInRootFrame$Deter]\n            ) {\n              if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n                do\n                  if (\n                    (namePropDescriptor--,\n                    _RunInRootFrame$Deter--,\n                    0 > _RunInRootFrame$Deter ||\n                      sampleLines[namePropDescriptor] !==\n                        controlLines[_RunInRootFrame$Deter])\n                  ) {\n                    var _frame =\n                      \"\\n\" +\n                      sampleLines[namePropDescriptor].replace(\n                        \" at new \",\n                        \" at \"\n                      );\n                    fn.displayName &&\n                      _frame.includes(\"<anonymous>\") &&\n                      (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n                    \"function\" === typeof fn &&\n                      componentFrameCache.set(fn, _frame);\n                    return _frame;\n                  }\n                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n              }\n              break;\n            }\n        }\n      } finally {\n        (reentry = !1),\n          (ReactSharedInternals.H = previousDispatcher),\n          reenableLogs(),\n          (Error.prepareStackTrace = frame);\n      }\n      sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(sampleLines)\n        : \"\";\n      \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n      return sampleLines;\n    }\n    function describeComponentStackByType(type) {\n      if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n      if (\"function\" === typeof type)\n        return type.prototype && type.prototype.isReactComponent\n          ? describeNativeComponentFrame(type, !0)\n          : describeNativeComponentFrame(type, !1);\n      if (\"object\" === typeof type && null !== type) {\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeNativeComponentFrame(type.render, !1);\n          case REACT_MEMO_TYPE:\n            return describeNativeComponentFrame(type.type, !1);\n          case REACT_LAZY_TYPE:\n            var lazyComponent = type,\n              payload = lazyComponent._payload;\n            lazyComponent = lazyComponent._init;\n            try {\n              type = lazyComponent(payload);\n            } catch (x) {\n              return describeBuiltInComponentFrame(\"Lazy\");\n            }\n            return describeComponentStackByType(type);\n        }\n        if (\"string\" === typeof type.name) {\n          a: {\n            payload = type.name;\n            lazyComponent = type.env;\n            type = type.debugLocation;\n            if (null != type) {\n              type = formatOwnerStack(type);\n              var idx = type.lastIndexOf(\"\\n\");\n              type = -1 === idx ? type : type.slice(idx + 1);\n              if (-1 !== type.indexOf(payload)) {\n                payload = \"\\n\" + type;\n                break a;\n              }\n            }\n            payload = describeBuiltInComponentFrame(\n              payload + (lazyComponent ? \" [\" + lazyComponent + \"]\" : \"\")\n            );\n          }\n          return payload;\n        }\n      }\n      switch (type) {\n        case REACT_SUSPENSE_LIST_TYPE:\n          return describeBuiltInComponentFrame(\"SuspenseList\");\n        case REACT_SUSPENSE_TYPE:\n          return describeBuiltInComponentFrame(\"Suspense\");\n        case REACT_VIEW_TRANSITION_TYPE:\n          return describeBuiltInComponentFrame(\"ViewTransition\");\n      }\n      return \"\";\n    }\n    function getViewTransitionClassName(defaultClass, eventClass) {\n      defaultClass =\n        null == defaultClass || \"string\" === typeof defaultClass\n          ? defaultClass\n          : defaultClass.default;\n      eventClass =\n        null == eventClass || \"string\" === typeof eventClass\n          ? eventClass\n          : eventClass.default;\n      return null == eventClass\n        ? \"auto\" === defaultClass\n          ? null\n          : defaultClass\n        : \"auto\" === eventClass\n          ? null\n          : eventClass;\n    }\n    function resetOwnerStackLimit() {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n    }\n    function isEligibleForOutlining(request, boundary) {\n      return (\n        (500 < boundary.byteSize ||\n          hasSuspenseyContent(boundary.contentState, !1) ||\n          boundary.defer) &&\n        null === boundary.preamble\n      );\n    }\n    function defaultErrorHandler(error) {\n      if (\n        \"object\" === typeof error &&\n        null !== error &&\n        \"string\" === typeof error.environmentName\n      ) {\n        var JSCompiler_inline_result = error.environmentName;\n        error = [error].slice(0);\n        \"string\" === typeof error[0]\n          ? error.splice(\n              0,\n              1,\n              \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c \" + error[0],\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            )\n          : error.splice(\n              0,\n              0,\n              \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\",\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            );\n        error.unshift(console);\n        JSCompiler_inline_result = bind.apply(console.error, error);\n        JSCompiler_inline_result();\n      } else console.error(error);\n      return null;\n    }\n    function RequestInstance(\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      formState\n    ) {\n      var abortSet = new Set();\n      this.destination = null;\n      this.flushScheduled = !1;\n      this.resumableState = resumableState;\n      this.renderState = renderState;\n      this.rootFormatContext = rootFormatContext;\n      this.progressiveChunkSize =\n        void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;\n      this.status = 10;\n      this.fatalError = null;\n      this.aborted = !1;\n      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;\n      this.completedPreambleSegments = this.completedRootSegment = null;\n      this.byteSize = 0;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = [];\n      this.currentTask = null;\n      this.clientRenderedBoundaries = [];\n      this.completedBoundaries = [];\n      this.partialBoundaries = [];\n      this.postponedState = this.trackedPostpones = null;\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onAllReady = void 0 === onAllReady ? noop : onAllReady;\n      this.onShellReady = void 0 === onShellReady ? noop : onShellReady;\n      this.onShellError = void 0 === onShellError ? noop : onShellError;\n      this.onFatalError = void 0 === onFatalError ? noop : onFatalError;\n      this.formState = void 0 === formState ? null : formState;\n      this.didWarnForKey = null;\n    }\n    function createRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      formState\n    ) {\n      resetOwnerStackLimit();\n      resumableState = new RequestInstance(\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        formState\n      );\n      renderState = createPendingSegment(\n        resumableState,\n        0,\n        null,\n        rootFormatContext,\n        !1,\n        !1\n      );\n      renderState.parentFlushed = !0;\n      children = createRenderTask(\n        resumableState,\n        null,\n        children,\n        -1,\n        null,\n        renderState,\n        null,\n        null,\n        resumableState.abortableTasks,\n        null,\n        rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      resumableState.pingedTasks.push(children);\n      return resumableState;\n    }\n    function createPrerenderRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      children = createRequest(\n        children,\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        void 0\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function resumeRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      resetOwnerStackLimit();\n      renderState = new RequestInstance(\n        postponedState.resumableState,\n        renderState,\n        postponedState.rootFormatContext,\n        postponedState.progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        null\n      );\n      renderState.nextSegmentId = postponedState.nextSegmentId;\n      if (\"number\" === typeof postponedState.replaySlots)\n        return (\n          (onError = createPendingSegment(\n            renderState,\n            0,\n            null,\n            postponedState.rootFormatContext,\n            !1,\n            !1\n          )),\n          (onError.parentFlushed = !0),\n          (children = createRenderTask(\n            renderState,\n            null,\n            children,\n            -1,\n            null,\n            onError,\n            null,\n            null,\n            renderState.abortableTasks,\n            null,\n            postponedState.rootFormatContext,\n            null,\n            emptyTreeContext,\n            null,\n            null,\n            emptyContextObject,\n            null\n          )),\n          pushComponentStack(children),\n          renderState.pingedTasks.push(children),\n          renderState\n        );\n      children = createReplayTask(\n        renderState,\n        null,\n        {\n          nodes: postponedState.replayNodes,\n          slots: postponedState.replaySlots,\n          pendingTasks: 0\n        },\n        children,\n        -1,\n        null,\n        null,\n        renderState.abortableTasks,\n        null,\n        postponedState.rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      renderState.pingedTasks.push(children);\n      return renderState;\n    }\n    function resumeAndPrerenderRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      children = resumeRequest(\n        children,\n        postponedState,\n        renderState,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function resolveRequest() {\n      if (currentRequest) return currentRequest;\n      var store = requestStorage.getStore();\n      return store ? store : null;\n    }\n    function pingTask(request, task) {\n      request.pingedTasks.push(task);\n      1 === request.pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        null !== request.trackedPostpones || 10 === request.status\n          ? scheduleMicrotask(function () {\n              return performWork(request);\n            })\n          : setImmediate(function () {\n              return performWork(request);\n            }));\n    }\n    function createSuspenseBoundary(\n      request,\n      row,\n      fallbackAbortableTasks,\n      preamble,\n      defer\n    ) {\n      fallbackAbortableTasks = {\n        status: PENDING,\n        rootSegmentID: -1,\n        parentFlushed: !1,\n        pendingTasks: 0,\n        row: row,\n        completedSegments: [],\n        byteSize: 0,\n        defer: defer,\n        fallbackAbortableTasks: fallbackAbortableTasks,\n        errorDigest: null,\n        contentState: createHoistableState(),\n        fallbackState: createHoistableState(),\n        preamble: preamble,\n        tracked: null,\n        errorMessage: null,\n        errorStack: null,\n        errorComponentStack: null\n      };\n      null !== row &&\n        (row.pendingTasks++,\n        (preamble = row.boundaries),\n        null !== preamble &&\n          (request.allPendingTasks++,\n          fallbackAbortableTasks.pendingTasks++,\n          preamble.push(fallbackAbortableTasks)),\n        (request = row.inheritedHoistables),\n        null !== request &&\n          hoistHoistables(fallbackAbortableTasks.contentState, request));\n      return fallbackAbortableTasks;\n    }\n    function createRenderTask(\n      request,\n      thenableState,\n      node,\n      childIndex,\n      blockedBoundary,\n      blockedSegment,\n      blockedPreamble,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      var task$jscomp$0 = {\n        replay: null,\n        node: node,\n        childIndex: childIndex,\n        ping: {\n          resolve: function () {\n            return pingTask(request, task$jscomp$0);\n          },\n          reject: function (error) {\n            var task = task$jscomp$0;\n            request.aborted\n              ? task.abortSet.delete(task) &&\n                finishAbortedTaskDEV(task, request, error)\n              : pingTask(request, task);\n          }\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: blockedSegment,\n        blockedPreamble: blockedPreamble,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task$jscomp$0.debugTask = debugTask;\n      abortSet.add(task$jscomp$0);\n      return task$jscomp$0;\n    }\n    function createReplayTask(\n      request,\n      thenableState,\n      replay,\n      node,\n      childIndex,\n      blockedBoundary,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      replay.pendingTasks++;\n      var task$jscomp$0 = {\n        replay: replay,\n        node: node,\n        childIndex: childIndex,\n        ping: {\n          resolve: function () {\n            return pingTask(request, task$jscomp$0);\n          },\n          reject: function (error) {\n            var task = task$jscomp$0;\n            request.aborted\n              ? task.abortSet.delete(task) &&\n                finishAbortedTaskDEV(task, request, error)\n              : pingTask(request, task);\n          }\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: null,\n        blockedPreamble: null,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task$jscomp$0.debugTask = debugTask;\n      abortSet.add(task$jscomp$0);\n      return task$jscomp$0;\n    }\n    function createPendingSegment(\n      request,\n      index,\n      boundary,\n      parentFormatContext,\n      lastPushedText,\n      textEmbedded\n    ) {\n      return {\n        status: PENDING,\n        parentFlushed: !1,\n        id: -1,\n        index: index,\n        chunks: [],\n        children: [],\n        preambleChildren: [],\n        parentFormatContext: parentFormatContext,\n        boundary: boundary,\n        lastPushedText: lastPushedText,\n        textEmbedded: textEmbedded\n      };\n    }\n    function getCurrentStackInDEV() {\n      if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)\n        return \"\";\n      var componentStack = currentTaskInDEV.componentStack;\n      try {\n        var info = \"\";\n        if (\"string\" === typeof componentStack.type)\n          info += describeBuiltInComponentFrame(componentStack.type);\n        else if (\"function\" === typeof componentStack.type) {\n          if (!componentStack.owner) {\n            var JSCompiler_temp_const = info,\n              fn = componentStack.type,\n              name = fn ? fn.displayName || fn.name : \"\";\n            var JSCompiler_inline_result = name\n              ? describeBuiltInComponentFrame(name)\n              : \"\";\n            info = JSCompiler_temp_const + JSCompiler_inline_result;\n          }\n        } else\n          componentStack.owner ||\n            (info += describeComponentStackByType(componentStack.type));\n        for (; componentStack; )\n          (JSCompiler_temp_const = null),\n            null != componentStack.debugStack\n              ? (JSCompiler_temp_const = formatOwnerStack(\n                  componentStack.debugStack\n                ))\n              : ((JSCompiler_inline_result = componentStack),\n                null != JSCompiler_inline_result.stack &&\n                  (JSCompiler_temp_const =\n                    \"string\" !== typeof JSCompiler_inline_result.stack\n                      ? (JSCompiler_inline_result.stack = formatOwnerStack(\n                          JSCompiler_inline_result.stack\n                        ))\n                      : JSCompiler_inline_result.stack)),\n            (componentStack = componentStack.owner) &&\n              JSCompiler_temp_const &&\n              (info += \"\\n\" + JSCompiler_temp_const);\n        var JSCompiler_inline_result$jscomp$0 = info;\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function pushHaltedAwaitOnComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = debugInfo.length - 1; 0 <= i; i--) {\n          var info = debugInfo[i];\n          if (null != info.awaited) {\n            var bestStack = null == info.debugStack ? info.awaited : info;\n            if (void 0 !== bestStack.debugStack) {\n              task.componentStack = {\n                parent: task.componentStack,\n                type: info,\n                owner: bestStack.owner,\n                stack: bestStack.debugStack\n              };\n              task.debugTask = bestStack.debugTask;\n              break;\n            }\n          }\n        }\n    }\n    function pushSuspendedCallSiteOnComponentStack(request, task) {\n      shouldCaptureSuspendedCallSite = !0;\n      var restoreThenableState = ensureSuspendableThenableStateDEV(\n        task.thenableState\n      );\n      try {\n        var prevStatus = request.status,\n          prevAborted = request.aborted;\n        request.status = 14;\n        request.aborted = !1;\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request.resumableState;\n        switchContext(task.context);\n        var prevTaskInDEV = currentTaskInDEV;\n        currentTaskInDEV = task;\n        try {\n          retryNode(request, task);\n        } catch (x) {\n          resetHooksState();\n        } finally {\n          (currentTaskInDEV = prevTaskInDEV),\n            (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest),\n            (request.status = prevStatus),\n            (request.aborted = prevAborted);\n        }\n      } finally {\n        restoreThenableState(), (shouldCaptureSuspendedCallSite = !1);\n      }\n      null === suspendedCallSiteStack\n        ? (request = null)\n        : ((request = suspendedCallSiteStack), (suspendedCallSiteStack = null));\n      null === suspendedCallSiteDebugTask\n        ? (restoreThenableState = null)\n        : ((restoreThenableState = suspendedCallSiteDebugTask),\n          (suspendedCallSiteDebugTask = null));\n      null !== request &&\n        (task.componentStack = {\n          owner: task.componentStack,\n          parent: request.parent,\n          stack: request.stack,\n          type: request.type\n        });\n      task.debugTask = restoreThenableState;\n    }\n    function pushServerComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = 0; i < debugInfo.length; i++) {\n          var componentInfo = debugInfo[i];\n          \"string\" === typeof componentInfo.name &&\n            void 0 !== componentInfo.debugStack &&\n            ((task.componentStack = {\n              parent: task.componentStack,\n              type: componentInfo,\n              owner: componentInfo.owner,\n              stack: componentInfo.debugStack\n            }),\n            (task.debugTask = componentInfo.debugTask));\n        }\n    }\n    function pushComponentStack(task) {\n      var node = task.node;\n      if (\"object\" === typeof node && null !== node)\n        switch (node.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var type = node.type,\n              owner = node._owner,\n              stack = node._debugStack;\n            pushServerComponentStack(task, node._debugInfo);\n            task.debugTask = node._debugTask;\n            task.componentStack = {\n              parent: task.componentStack,\n              type: type,\n              owner: owner,\n              stack: stack\n            };\n            break;\n          case REACT_LAZY_TYPE:\n            pushServerComponentStack(task, node._debugInfo);\n            break;\n          default:\n            \"function\" === typeof node.then &&\n              pushServerComponentStack(task, node._debugInfo);\n        }\n    }\n    function replaceSuspenseComponentStackWithSuspenseFallbackStack(\n      componentStack\n    ) {\n      return null === componentStack\n        ? null\n        : {\n            parent: componentStack.parent,\n            type: \"Suspense Fallback\",\n            owner: componentStack.owner,\n            stack: componentStack.stack\n          };\n    }\n    function getThrownInfo(node$jscomp$0) {\n      var errorInfo = {};\n      node$jscomp$0 &&\n        Object.defineProperty(errorInfo, \"componentStack\", {\n          configurable: !0,\n          enumerable: !0,\n          get: function () {\n            try {\n              var info = \"\",\n                node = node$jscomp$0;\n              do\n                (info += describeComponentStackByType(node.type)),\n                  (node = node.parent);\n              while (node);\n              var stack = info;\n            } catch (x) {\n              stack = \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n            }\n            Object.defineProperty(errorInfo, \"componentStack\", {\n              value: stack\n            });\n            return stack;\n          }\n        });\n      return errorInfo;\n    }\n    function encodeErrorForBoundary(\n      boundary,\n      digest,\n      error,\n      thrownInfo,\n      wasAborted\n    ) {\n      boundary.errorDigest = digest;\n      error === RecoverableException\n        ? (boundary.errorMessage = wasAborted\n            ? \"Switched to client rendering because the server render was aborted with a request to render on the client.\"\n            : \"Switched to client rendering because a component requested it.\")\n        : (error instanceof Error\n            ? ((digest = String(error.message)), (error = String(error.stack)))\n            : ((digest =\n                \"object\" === typeof error && null !== error\n                  ? describeObjectForErrorMessage(error)\n                  : String(error)),\n              (error = null)),\n          (wasAborted = wasAborted\n            ? \"Switched to client rendering because the server rendering aborted due to:\\n\\n\"\n            : \"Switched to client rendering because the server rendering errored:\\n\\n\"),\n          (boundary.errorMessage = wasAborted + digest),\n          (boundary.errorStack = null !== error ? wasAborted + error : null));\n      boundary.errorComponentStack = thrownInfo.componentStack;\n    }\n    function logRecoverableError(request, error, errorInfo, debugTask) {\n      if (error === RecoverableException)\n        return (suspendedRecoverableError = null), REACT_RECOVERABLE_DIGEST;\n      request = request.onError;\n      error = debugTask\n        ? debugTask.run(request.bind(null, error, errorInfo))\n        : request(error, errorInfo);\n      if (null != error && \"string\" !== typeof error)\n        console.error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead',\n          typeof error\n        );\n      else return \"\" === error ? void 0 : error;\n    }\n    function fatalError(request, error, errorInfo, debugTask) {\n      errorInfo = request.onShellError;\n      var onFatalError = request.onFatalError,\n        shellComplete = 0 === request.pendingRootTasks;\n      debugTask\n        ? (shellComplete || debugTask.run(errorInfo.bind(null, error)),\n          debugTask.run(onFatalError.bind(null, error)))\n        : (shellComplete || errorInfo(error), onFatalError(error));\n      null !== request.destination\n        ? ((request.status = CLOSED), request.destination.destroy(error))\n        : ((request.status = 12), (request.fatalError = error));\n    }\n    function finishSuspenseListRow(request, row) {\n      unblockSuspenseListRow(request, row.next, row.hoistables);\n    }\n    function unblockSuspenseListRow(\n      request,\n      unblockedRow,\n      inheritedHoistables\n    ) {\n      for (; null !== unblockedRow; ) {\n        null !== inheritedHoistables &&\n          (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),\n          (unblockedRow.inheritedHoistables = inheritedHoistables));\n        var unblockedBoundaries = unblockedRow.boundaries;\n        if (null !== unblockedBoundaries) {\n          unblockedRow.boundaries = null;\n          for (var i = 0; i < unblockedBoundaries.length; i++) {\n            var unblockedBoundary = unblockedBoundaries[i];\n            null !== inheritedHoistables &&\n              hoistHoistables(\n                unblockedBoundary.contentState,\n                inheritedHoistables\n              );\n            finishedTask(request, unblockedBoundary, null, null);\n          }\n        }\n        unblockedRow.pendingTasks--;\n        if (0 < unblockedRow.pendingTasks) break;\n        inheritedHoistables = unblockedRow.hoistables;\n        unblockedRow = unblockedRow.next;\n      }\n    }\n    function tryToResolveTogetherRow(request, togetherRow) {\n      var boundaries = togetherRow.boundaries;\n      if (\n        null !== boundaries &&\n        togetherRow.pendingTasks === boundaries.length\n      ) {\n        for (\n          var allCompleteAndInlinable = !0, i = 0;\n          i < boundaries.length;\n          i++\n        ) {\n          var rowBoundary = boundaries[i];\n          if (\n            1 !== rowBoundary.pendingTasks ||\n            rowBoundary.parentFlushed ||\n            isEligibleForOutlining(request, rowBoundary)\n          ) {\n            allCompleteAndInlinable = !1;\n            break;\n          }\n        }\n        allCompleteAndInlinable &&\n          unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);\n      }\n    }\n    function createSuspenseListRow(previousRow) {\n      var newRow = {\n        pendingTasks: 1,\n        boundaries: null,\n        hoistables: createHoistableState(),\n        inheritedHoistables: null,\n        together: !1,\n        next: null\n      };\n      null !== previousRow &&\n        0 < previousRow.pendingTasks &&\n        (newRow.pendingTasks++,\n        (newRow.boundaries = []),\n        (previousRow.next = newRow));\n      return newRow;\n    }\n    function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {\n      var prevKeyPath = task.keyPath,\n        prevTreeContext = task.treeContext,\n        prevRow = task.row,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node.props.children._debugInfo);\n      task.keyPath = keyPath;\n      keyPath = rows.length;\n      var previousSuspenseListRow = null;\n      if (null !== task.replay) {\n        var resumeSlots = task.replay.slots;\n        if (null !== resumeSlots && \"object\" === typeof resumeSlots)\n          for (var n = 0; n < keyPath; n++) {\n            var i =\n                \"backwards\" !== revealOrder &&\n                \"unstable_legacy-backwards\" !== revealOrder\n                  ? n\n                  : keyPath - 1 - n,\n              node = rows[i];\n            task.row = previousSuspenseListRow = createSuspenseListRow(\n              previousSuspenseListRow\n            );\n            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n            var resumeSegmentID = resumeSlots[i];\n            \"number\" === typeof resumeSegmentID\n              ? (resumeNode(request, task, resumeSegmentID, node, i),\n                delete resumeSlots[i])\n              : renderNode(request, task, node, i);\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n          }\n        else\n          for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)\n            (n =\n              \"backwards\" !== revealOrder &&\n              \"unstable_legacy-backwards\" !== revealOrder\n                ? resumeSlots\n                : keyPath - 1 - resumeSlots),\n              (i = rows[n]),\n              warnForMissingKey(request, task, i),\n              (task.row = previousSuspenseListRow =\n                createSuspenseListRow(previousSuspenseListRow)),\n              (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),\n              renderNode(request, task, i, n),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n      } else if (\n        \"backwards\" !== revealOrder &&\n        \"unstable_legacy-backwards\" !== revealOrder\n      )\n        for (revealOrder = 0; revealOrder < keyPath; revealOrder++)\n          (resumeSlots = rows[revealOrder]),\n            warnForMissingKey(request, task, resumeSlots),\n            (task.row = previousSuspenseListRow =\n              createSuspenseListRow(previousSuspenseListRow)),\n            (task.treeContext = pushTreeContext(\n              prevTreeContext,\n              keyPath,\n              revealOrder\n            )),\n            renderNode(request, task, resumeSlots, revealOrder),\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n      else {\n        resumeSlots = task.blockedSegment;\n        n = resumeSlots.children.length;\n        i = resumeSlots.chunks.length;\n        for (node = 0; node < keyPath; node++) {\n          resumeSegmentID =\n            \"unstable_legacy-backwards\" === revealOrder\n              ? keyPath - 1 - node\n              : node;\n          var _node3 = rows[resumeSegmentID];\n          task.row = previousSuspenseListRow = createSuspenseListRow(\n            previousSuspenseListRow\n          );\n          task.treeContext = pushTreeContext(\n            prevTreeContext,\n            keyPath,\n            resumeSegmentID\n          );\n          var newSegment = createPendingSegment(\n            request,\n            i,\n            null,\n            task.formatContext,\n            0 === resumeSegmentID ? resumeSlots.lastPushedText : !0,\n            !0\n          );\n          resumeSlots.children.splice(n, 0, newSegment);\n          task.blockedSegment = newSegment;\n          warnForMissingKey(request, task, _node3);\n          try {\n            renderNode(request, task, _node3, resumeSegmentID),\n              newSegment.lastPushedText &&\n                newSegment.textEmbedded &&\n                newSegment.chunks.push(textSeparator),\n              (newSegment.status = COMPLETED),\n              finishedSegment(request, task.blockedBoundary, newSegment),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n          } catch (thrownValue) {\n            throw (\n              ((newSegment.status = request.aborted ? ABORTED : ERRORED),\n              thrownValue)\n            );\n          }\n        }\n        task.blockedSegment = resumeSlots;\n        resumeSlots.lastPushedText = !1;\n      }\n      null !== prevRow &&\n        null !== previousSuspenseListRow &&\n        0 < previousSuspenseListRow.pendingTasks &&\n        (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));\n      task.treeContext = prevTreeContext;\n      task.row = prevRow;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function renderWithHooks(\n      request,\n      task,\n      keyPath,\n      Component,\n      props,\n      secondArg\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      currentlyRenderingComponent = {};\n      currentlyRenderingTask = task;\n      currentlyRenderingRequest = request;\n      currentlyRenderingKeyPath = keyPath;\n      isInHookUserCodeInDev = !1;\n      actionStateCounter = localIdCounter = 0;\n      actionStateMatchingIndex = -1;\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      for (\n        request = callComponentInDEV(Component, props, secondArg);\n        didScheduleRenderPhaseUpdate;\n\n      )\n        (didScheduleRenderPhaseUpdate = !1),\n          (actionStateCounter = localIdCounter = 0),\n          (actionStateMatchingIndex = -1),\n          (thenableIndexCounter = 0),\n          (numberOfReRenders += 1),\n          (workInProgressHook = null),\n          (request = Component(props, secondArg));\n      resetHooksState();\n      return request;\n    }\n    function finishFunctionComponent(\n      request,\n      task,\n      keyPath,\n      children,\n      hasId,\n      actionStateCount,\n      actionStateMatchingIndex\n    ) {\n      var didEmitActionStateMarkers = !1;\n      if (0 !== actionStateCount && null !== request.formState) {\n        var segment = task.blockedSegment;\n        if (null !== segment) {\n          didEmitActionStateMarkers = !0;\n          segment = segment.chunks;\n          for (var i = 0; i < actionStateCount; i++)\n            i === actionStateMatchingIndex\n              ? segment.push(formStateMarkerIsMatching)\n              : segment.push(formStateMarkerIsNotMatching);\n        }\n      }\n      actionStateCount = task.keyPath;\n      task.keyPath = keyPath;\n      hasId\n        ? ((keyPath = task.treeContext),\n          (task.treeContext = pushTreeContext(keyPath, 1, 0)),\n          renderNode(request, task, children, -1),\n          (task.treeContext = keyPath))\n        : didEmitActionStateMarkers\n          ? renderNode(request, task, children, -1)\n          : renderNodeDestructive(request, task, children, -1);\n      task.keyPath = actionStateCount;\n    }\n    function renderElement(request, task, keyPath, type, props, ref) {\n      if (\"function\" === typeof type)\n        if (type.prototype && type.prototype.isReactComponent) {\n          var newProps = props;\n          if (\"ref\" in props) {\n            newProps = {};\n            for (var propName in props)\n              \"ref\" !== propName && (newProps[propName] = props[propName]);\n          }\n          var defaultProps = type.defaultProps;\n          if (defaultProps) {\n            newProps === props && (newProps = assign({}, newProps, props));\n            for (var _propName in defaultProps)\n              void 0 === newProps[_propName] &&\n                (newProps[_propName] = defaultProps[_propName]);\n          }\n          var resolvedProps = newProps;\n          var context = emptyContextObject,\n            contextType = type.contextType;\n          if (\n            \"contextType\" in type &&\n            null !== contextType &&\n            (void 0 === contextType ||\n              contextType.$$typeof !== REACT_CONTEXT_TYPE) &&\n            !didWarnAboutInvalidateContextType.has(type)\n          ) {\n            didWarnAboutInvalidateContextType.add(type);\n            var addendum =\n              void 0 === contextType\n                ? \" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\"\n                : \"object\" !== typeof contextType\n                  ? \" However, it is set to a \" + typeof contextType + \".\"\n                  : contextType.$$typeof === REACT_CONSUMER_TYPE\n                    ? \" Did you accidentally pass the Context.Consumer instead?\"\n                    : \" However, it is set to an object with keys {\" +\n                      Object.keys(contextType).join(\", \") +\n                      \"}.\";\n            console.error(\n              \"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",\n              getComponentNameFromType(type) || \"Component\",\n              addendum\n            );\n          }\n          \"object\" === typeof contextType &&\n            null !== contextType &&\n            (context = contextType._currentValue);\n          var instance = new type(resolvedProps, context);\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps &&\n            (null === instance.state || void 0 === instance.state)\n          ) {\n            var componentName = getComponentNameFromType(type) || \"Component\";\n            didWarnAboutUninitializedState.has(componentName) ||\n              (didWarnAboutUninitializedState.add(componentName),\n              console.error(\n                \"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",\n                componentName,\n                null === instance.state ? \"null\" : \"undefined\",\n                componentName\n              ));\n          }\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps ||\n            \"function\" === typeof instance.getSnapshotBeforeUpdate\n          ) {\n            var foundWillMountName = null,\n              foundWillReceivePropsName = null,\n              foundWillUpdateName = null;\n            \"function\" === typeof instance.componentWillMount &&\n            !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ? (foundWillMountName = \"componentWillMount\")\n              : \"function\" === typeof instance.UNSAFE_componentWillMount &&\n                (foundWillMountName = \"UNSAFE_componentWillMount\");\n            \"function\" === typeof instance.componentWillReceiveProps &&\n            !0 !==\n              instance.componentWillReceiveProps.__suppressDeprecationWarning\n              ? (foundWillReceivePropsName = \"componentWillReceiveProps\")\n              : \"function\" ===\n                  typeof instance.UNSAFE_componentWillReceiveProps &&\n                (foundWillReceivePropsName =\n                  \"UNSAFE_componentWillReceiveProps\");\n            \"function\" === typeof instance.componentWillUpdate &&\n            !0 !== instance.componentWillUpdate.__suppressDeprecationWarning\n              ? (foundWillUpdateName = \"componentWillUpdate\")\n              : \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n                (foundWillUpdateName = \"UNSAFE_componentWillUpdate\");\n            if (\n              null !== foundWillMountName ||\n              null !== foundWillReceivePropsName ||\n              null !== foundWillUpdateName\n            ) {\n              var _componentName =\n                  getComponentNameFromType(type) || \"Component\",\n                newApiName =\n                  \"function\" === typeof type.getDerivedStateFromProps\n                    ? \"getDerivedStateFromProps()\"\n                    : \"getSnapshotBeforeUpdate()\";\n              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) ||\n                (didWarnAboutLegacyLifecyclesAndDerivedState.add(\n                  _componentName\n                ),\n                console.error(\n                  \"Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\nhttps://react.dev/link/unsafe-component-lifecycles\",\n                  _componentName,\n                  newApiName,\n                  null !== foundWillMountName\n                    ? \"\\n  \" + foundWillMountName\n                    : \"\",\n                  null !== foundWillReceivePropsName\n                    ? \"\\n  \" + foundWillReceivePropsName\n                    : \"\",\n                  null !== foundWillUpdateName\n                    ? \"\\n  \" + foundWillUpdateName\n                    : \"\"\n                ));\n            }\n          }\n          var name = getComponentNameFromType(type) || \"Component\";\n          instance.render ||\n            (type.prototype && \"function\" === typeof type.prototype.render\n              ? console.error(\n                  \"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",\n                  name\n                )\n              : console.error(\n                  \"No `render` method found on the %s instance: you may have forgotten to define `render`.\",\n                  name\n                ));\n          !instance.getInitialState ||\n            instance.getInitialState.isReactClassApproved ||\n            instance.state ||\n            console.error(\n              \"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",\n              name\n            );\n          instance.getDefaultProps &&\n            !instance.getDefaultProps.isReactClassApproved &&\n            console.error(\n              \"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",\n              name\n            );\n          instance.contextType &&\n            console.error(\n              \"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",\n              name\n            );\n          type.childContextTypes &&\n            !didWarnAboutChildContextTypes.has(type) &&\n            (didWarnAboutChildContextTypes.add(type),\n            console.error(\n              \"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          type.contextTypes &&\n            !didWarnAboutContextTypes$1.has(type) &&\n            (didWarnAboutContextTypes$1.add(type),\n            console.error(\n              \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          \"function\" === typeof instance.componentShouldUpdate &&\n            console.error(\n              \"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",\n              name\n            );\n          type.prototype &&\n            type.prototype.isPureReactComponent &&\n            \"undefined\" !== typeof instance.shouldComponentUpdate &&\n            console.error(\n              \"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",\n              getComponentNameFromType(type) || \"A pure component\"\n            );\n          \"function\" === typeof instance.componentDidUnmount &&\n            console.error(\n              \"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",\n              name\n            );\n          \"function\" === typeof instance.componentDidReceiveProps &&\n            console.error(\n              \"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",\n              name\n            );\n          \"function\" === typeof instance.componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",\n              name\n            );\n          \"function\" === typeof instance.UNSAFE_componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",\n              name\n            );\n          var hasMutatedProps = instance.props !== resolvedProps;\n          void 0 !== instance.props &&\n            hasMutatedProps &&\n            console.error(\n              \"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",\n              name\n            );\n          instance.defaultProps &&\n            console.error(\n              \"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",\n              name,\n              name\n            );\n          \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n            \"function\" === typeof instance.componentDidUpdate ||\n            didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type) ||\n            (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",\n              getComponentNameFromType(type)\n            ));\n          \"function\" === typeof instance.getDerivedStateFromProps &&\n            console.error(\n              \"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof instance.getDerivedStateFromError &&\n            console.error(\n              \"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof type.getSnapshotBeforeUpdate &&\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",\n              name\n            );\n          var state = instance.state;\n          state &&\n            (\"object\" !== typeof state || isArrayImpl(state)) &&\n            console.error(\"%s.state: must be set to an object or null\", name);\n          \"function\" === typeof instance.getChildContext &&\n            \"object\" !== typeof type.childContextTypes &&\n            console.error(\n              \"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",\n              name\n            );\n          var initialState = void 0 !== instance.state ? instance.state : null;\n          instance.updater = classComponentUpdater;\n          instance.props = resolvedProps;\n          instance.state = initialState;\n          var internalInstance = { queue: [], replace: !1 };\n          instance._reactInternals = internalInstance;\n          var contextType$jscomp$0 = type.contextType;\n          instance.context =\n            \"object\" === typeof contextType$jscomp$0 &&\n            null !== contextType$jscomp$0\n              ? contextType$jscomp$0._currentValue\n              : emptyContextObject;\n          if (instance.state === resolvedProps) {\n            var componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Component\";\n            didWarnAboutDirectlyAssigningPropsToState.has(\n              componentName$jscomp$0\n            ) ||\n              (didWarnAboutDirectlyAssigningPropsToState.add(\n                componentName$jscomp$0\n              ),\n              console.error(\n                \"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",\n                componentName$jscomp$0\n              ));\n          }\n          var getDerivedStateFromProps = type.getDerivedStateFromProps;\n          if (\"function\" === typeof getDerivedStateFromProps) {\n            var partialState = getDerivedStateFromProps(\n              resolvedProps,\n              initialState\n            );\n            if (void 0 === partialState) {\n              var componentName$jscomp$1 =\n                getComponentNameFromType(type) || \"Component\";\n              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) ||\n                (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),\n                console.error(\n                  \"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",\n                  componentName$jscomp$1\n                ));\n            }\n            var JSCompiler_inline_result =\n              null === partialState || void 0 === partialState\n                ? initialState\n                : assign({}, initialState, partialState);\n            instance.state = JSCompiler_inline_result;\n          }\n          if (\n            \"function\" !== typeof type.getDerivedStateFromProps &&\n            \"function\" !== typeof instance.getSnapshotBeforeUpdate &&\n            (\"function\" === typeof instance.UNSAFE_componentWillMount ||\n              \"function\" === typeof instance.componentWillMount)\n          ) {\n            var oldState = instance.state;\n            if (\"function\" === typeof instance.componentWillMount) {\n              if (\n                !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ) {\n                var componentName$jscomp$2 =\n                  getComponentNameFromType(type) || \"Unknown\";\n                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] ||\n                  (console.warn(\n                    \"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\\n\\nPlease update the following components: %s\",\n                    componentName$jscomp$2\n                  ),\n                  (didWarnAboutDeprecatedWillMount[componentName$jscomp$2] =\n                    !0));\n              }\n              instance.componentWillMount();\n            }\n            \"function\" === typeof instance.UNSAFE_componentWillMount &&\n              instance.UNSAFE_componentWillMount();\n            oldState !== instance.state &&\n              (console.error(\n                \"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n                getComponentNameFromType(type) || \"Component\"\n              ),\n              classComponentUpdater.enqueueReplaceState(\n                instance,\n                instance.state,\n                null\n              ));\n            if (\n              null !== internalInstance.queue &&\n              0 < internalInstance.queue.length\n            ) {\n              var oldQueue = internalInstance.queue,\n                oldReplace = internalInstance.replace;\n              internalInstance.queue = null;\n              internalInstance.replace = !1;\n              if (oldReplace && 1 === oldQueue.length)\n                instance.state = oldQueue[0];\n              else {\n                for (\n                  var nextState = oldReplace ? oldQueue[0] : instance.state,\n                    dontMutate = !0,\n                    i = oldReplace ? 1 : 0;\n                  i < oldQueue.length;\n                  i++\n                ) {\n                  var partial = oldQueue[i],\n                    partialState$jscomp$0 =\n                      \"function\" === typeof partial\n                        ? partial.call(\n                            instance,\n                            nextState,\n                            resolvedProps,\n                            void 0\n                          )\n                        : partial;\n                  null != partialState$jscomp$0 &&\n                    (dontMutate\n                      ? ((dontMutate = !1),\n                        (nextState = assign(\n                          {},\n                          nextState,\n                          partialState$jscomp$0\n                        )))\n                      : assign(nextState, partialState$jscomp$0));\n                }\n                instance.state = nextState;\n              }\n            } else internalInstance.queue = null;\n          }\n          var nextChildren = callRenderInDEV(instance);\n          if (request.aborted) throw null;\n          instance.props !== resolvedProps &&\n            (didWarnAboutReassigningProps ||\n              console.error(\n                \"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",\n                getComponentNameFromType(type) || \"a component\"\n              ),\n            (didWarnAboutReassigningProps = !0));\n          var prevKeyPath = task.keyPath;\n          task.keyPath = keyPath;\n          renderNodeDestructive(request, task, nextChildren, -1);\n          task.keyPath = prevKeyPath;\n        } else {\n          if (type.prototype && \"function\" === typeof type.prototype.render) {\n            var componentName$jscomp$3 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutBadClass[componentName$jscomp$3] ||\n              (console.error(\n                \"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",\n                componentName$jscomp$3,\n                componentName$jscomp$3\n              ),\n              (didWarnAboutBadClass[componentName$jscomp$3] = !0));\n          }\n          var value = renderWithHooks(\n            request,\n            task,\n            keyPath,\n            type,\n            props,\n            void 0\n          );\n          if (request.aborted) throw null;\n          var hasId = 0 !== localIdCounter,\n            actionStateCount = actionStateCounter,\n            actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;\n          if (type.contextTypes) {\n            var _componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypes[_componentName$jscomp$0] ||\n              ((didWarnAboutContextTypes[_componentName$jscomp$0] = !0),\n              console.error(\n                \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",\n                _componentName$jscomp$0\n              ));\n          }\n          type &&\n            type.childContextTypes &&\n            console.error(\n              \"childContextTypes cannot be defined on a function component.\\n  %s.childContextTypes = ...\",\n              type.displayName || type.name || \"Component\"\n            );\n          if (\"function\" === typeof type.getDerivedStateFromProps) {\n            var componentName$jscomp$4 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutGetDerivedStateOnFunctionComponent[\n              componentName$jscomp$4\n            ] ||\n              (console.error(\n                \"%s: Function components do not support getDerivedStateFromProps.\",\n                componentName$jscomp$4\n              ),\n              (didWarnAboutGetDerivedStateOnFunctionComponent[\n                componentName$jscomp$4\n              ] = !0));\n          }\n          if (\n            \"object\" === typeof type.contextType &&\n            null !== type.contextType\n          ) {\n            var _componentName2 = getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||\n              (console.error(\n                \"%s: Function components do not support contextType.\",\n                _componentName2\n              ),\n              (didWarnAboutContextTypeOnFunctionComponent[_componentName2] =\n                !0));\n          }\n          finishFunctionComponent(\n            request,\n            task,\n            keyPath,\n            value,\n            hasId,\n            actionStateCount,\n            actionStateMatchingIndex$jscomp$0\n          );\n        }\n      else if (\"string\" === typeof type) {\n        var segment = task.blockedSegment;\n        if (null === segment) {\n          var children = props.children,\n            prevContext = task.formatContext,\n            prevKeyPath$jscomp$0 = task.keyPath;\n          task.formatContext = getChildFormatContext(prevContext, type, props);\n          task.keyPath = keyPath;\n          renderNode(request, task, children, -1);\n          task.formatContext = prevContext;\n          task.keyPath = prevKeyPath$jscomp$0;\n        } else {\n          var _children = pushStartInstance(\n            segment.chunks,\n            type,\n            props,\n            request.resumableState,\n            request.renderState,\n            task.blockedPreamble,\n            task.hoistableState,\n            task.formatContext,\n            segment.lastPushedText\n          );\n          segment.lastPushedText = !1;\n          var _prevContext2 = task.formatContext,\n            _prevKeyPath3 = task.keyPath;\n          task.keyPath = keyPath;\n          if (\n            (task.formatContext = getChildFormatContext(\n              _prevContext2,\n              type,\n              props\n            )).insertionMode === HTML_HEAD_MODE\n          ) {\n            var preambleSegment = createPendingSegment(\n              request,\n              0,\n              null,\n              task.formatContext,\n              !1,\n              !1\n            );\n            segment.preambleChildren.push(preambleSegment);\n            task.blockedSegment = preambleSegment;\n            try {\n              renderNode(request, task, _children, -1),\n                preambleSegment.lastPushedText &&\n                  preambleSegment.textEmbedded &&\n                  preambleSegment.chunks.push(textSeparator),\n                (preambleSegment.status = COMPLETED),\n                finishedSegment(request, task.blockedBoundary, preambleSegment);\n            } finally {\n              task.blockedSegment = segment;\n            }\n          } else renderNode(request, task, _children, -1);\n          task.formatContext = _prevContext2;\n          task.keyPath = _prevKeyPath3;\n          a: {\n            var target = segment.chunks,\n              resumableState = request.resumableState;\n            switch (type) {\n              case \"title\":\n              case \"style\":\n              case \"script\":\n              case \"area\":\n              case \"base\":\n              case \"br\":\n              case \"col\":\n              case \"embed\":\n              case \"hr\":\n              case \"img\":\n              case \"input\":\n              case \"keygen\":\n              case \"link\":\n              case \"meta\":\n              case \"param\":\n              case \"source\":\n              case \"track\":\n              case \"wbr\":\n                break a;\n              case \"body\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {\n                  resumableState.hasBody = !0;\n                  break a;\n                }\n                break;\n              case \"html\":\n                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {\n                  resumableState.hasHtml = !0;\n                  break a;\n                }\n                break;\n              case \"head\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;\n            }\n            target.push(endChunkForTag(type));\n          }\n          segment.lastPushedText = !1;\n        }\n      } else {\n        switch (type) {\n          case REACT_LEGACY_HIDDEN_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_FRAGMENT_TYPE:\n            var prevKeyPath$jscomp$1 = task.keyPath;\n            task.keyPath = keyPath;\n            renderNodeDestructive(request, task, props.children, -1);\n            task.keyPath = prevKeyPath$jscomp$1;\n            return;\n          case REACT_ACTIVITY_TYPE:\n            var segment$jscomp$0 = task.blockedSegment;\n            if (null === segment$jscomp$0) {\n              if (\"hidden\" !== props.mode) {\n                var prevKeyPath$jscomp$2 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNode(request, task, props.children, -1);\n                task.keyPath = prevKeyPath$jscomp$2;\n              }\n            } else if (\"hidden\" !== props.mode) {\n              segment$jscomp$0.chunks.push(startActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n              var _prevKeyPath4 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNode(request, task, props.children, -1);\n              task.keyPath = _prevKeyPath4;\n              segment$jscomp$0.chunks.push(endActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n            }\n            return;\n          case REACT_SUSPENSE_LIST_TYPE:\n            a: {\n              var children$jscomp$0 = props.children,\n                revealOrder = props.revealOrder;\n              if (\"independent\" !== revealOrder && \"together\" !== revealOrder) {\n                if (isArrayImpl(children$jscomp$0)) {\n                  renderSuspenseListRows(\n                    request,\n                    task,\n                    keyPath,\n                    children$jscomp$0,\n                    revealOrder\n                  );\n                  break a;\n                }\n                var iteratorFn = getIteratorFn(children$jscomp$0);\n                if (iteratorFn) {\n                  var iterator = iteratorFn.call(children$jscomp$0);\n                  if (iterator) {\n                    validateIterable(\n                      task,\n                      children$jscomp$0,\n                      -1,\n                      iterator,\n                      iteratorFn\n                    );\n                    var step = iterator.next();\n                    if (!step.done) {\n                      var rows = [];\n                      do rows.push(step.value), (step = iterator.next());\n                      while (!step.done);\n                      renderSuspenseListRows(\n                        request,\n                        task,\n                        keyPath,\n                        children$jscomp$0,\n                        revealOrder\n                      );\n                    }\n                    break a;\n                  }\n                }\n              }\n              if (\"together\" === revealOrder) {\n                var _prevKeyPath2 = task.keyPath,\n                  prevRow = task.row,\n                  newRow = (task.row = createSuspenseListRow(null));\n                newRow.boundaries = [];\n                newRow.together = !0;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                0 === --newRow.pendingTasks &&\n                  finishSuspenseListRow(request, newRow);\n                task.keyPath = _prevKeyPath2;\n                task.row = prevRow;\n                null !== prevRow &&\n                  0 < newRow.pendingTasks &&\n                  (prevRow.pendingTasks++, (newRow.next = prevRow));\n              } else {\n                var prevKeyPath$jscomp$3 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                task.keyPath = prevKeyPath$jscomp$3;\n              }\n            }\n            return;\n          case REACT_VIEW_TRANSITION_TYPE:\n            var prevContext$jscomp$0 = task.formatContext,\n              prevKeyPath$jscomp$4 = task.keyPath;\n            var resumableState$jscomp$0 = request.resumableState;\n            if (null != props.name && \"auto\" !== props.name)\n              var autoName = props.name;\n            else {\n              var treeId = getTreeId(task.treeContext);\n              autoName = makeId(resumableState$jscomp$0, treeId, 0);\n            }\n            var resumableState$jscomp$1 = request.resumableState,\n              update = getViewTransitionClassName(props.default, props.update),\n              enter = getViewTransitionClassName(props.default, props.enter),\n              exit = getViewTransitionClassName(props.default, props.exit),\n              share = getViewTransitionClassName(props.default, props.share),\n              name$jscomp$0 = props.name,\n              autoName$jscomp$0 = autoName;\n            null == update && (update = \"auto\");\n            null == enter && (enter = \"auto\");\n            null == exit && (exit = \"auto\");\n            if (null == name$jscomp$0) {\n              var parentViewTransition = prevContext$jscomp$0.viewTransition;\n              null !== parentViewTransition\n                ? ((name$jscomp$0 = parentViewTransition.name),\n                  (share = parentViewTransition.share))\n                : ((name$jscomp$0 = \"auto\"), (share = \"none\"));\n            } else\n              null == share && (share = \"auto\"),\n                prevContext$jscomp$0.tagScope & 4 &&\n                  (resumableState$jscomp$1.instructions |=\n                    NeedUpgradeToViewTransitions);\n            prevContext$jscomp$0.tagScope & 8\n              ? (resumableState$jscomp$1.instructions |=\n                  NeedUpgradeToViewTransitions)\n              : (exit = \"none\");\n            prevContext$jscomp$0.tagScope & 16\n              ? (resumableState$jscomp$1.instructions |=\n                  NeedUpgradeToViewTransitions)\n              : (enter = \"none\");\n            var viewTransition = {\n                update: update,\n                enter: enter,\n                exit: exit,\n                share: share,\n                parentEnter: \"none\",\n                parentExit: \"none\",\n                name: name$jscomp$0,\n                autoName: autoName$jscomp$0,\n                nameIdx: 0\n              },\n              subtreeScope = prevContext$jscomp$0.tagScope & -25;\n            subtreeScope =\n              \"none\" !== update ? subtreeScope | 32 : subtreeScope & -33;\n            \"none\" !== enter && (subtreeScope |= 64);\n            var JSCompiler_inline_result$jscomp$0 = createFormatContext(\n              prevContext$jscomp$0.insertionMode,\n              prevContext$jscomp$0.selectedValue,\n              subtreeScope,\n              viewTransition\n            );\n            task.formatContext = JSCompiler_inline_result$jscomp$0;\n            task.keyPath = keyPath;\n            if (null != props.name && \"auto\" !== props.name)\n              renderNodeDestructive(request, task, props.children, -1);\n            else {\n              var prevTreeContext = task.treeContext;\n              task.treeContext = pushTreeContext(prevTreeContext, 1, 0);\n              renderNode(request, task, props.children, -1);\n              task.treeContext = prevTreeContext;\n            }\n            task.formatContext = prevContext$jscomp$0;\n            task.keyPath = prevKeyPath$jscomp$4;\n            return;\n          case REACT_SCOPE_TYPE:\n            throw Error(\n              \"ReactDOMServer does not yet support scope components.\"\n            );\n          case REACT_SUSPENSE_TYPE:\n            a: if (null !== task.replay) {\n              var _prevKeyPath = task.keyPath,\n                _prevContext = task.formatContext,\n                _prevRow = task.row;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                _prevContext\n              );\n              task.row = null;\n              var _content = props.children;\n              try {\n                renderNode(request, task, _content, -1);\n              } finally {\n                (task.keyPath = _prevKeyPath),\n                  (task.formatContext = _prevContext),\n                  (task.row = _prevRow);\n              }\n            } else {\n              var prevKeyPath$jscomp$5 = task.keyPath,\n                prevContext$jscomp$1 = task.formatContext,\n                prevRow$jscomp$0 = task.row,\n                parentBoundary = task.blockedBoundary,\n                parentPreamble = task.blockedPreamble,\n                parentHoistableState = task.hoistableState,\n                parentSegment = task.blockedSegment,\n                fallback = props.fallback,\n                content = props.children,\n                fallbackAbortSet = new Set(),\n                newBoundary = createSuspenseBoundary(\n                  request,\n                  task.row,\n                  fallbackAbortSet,\n                  task.formatContext.insertionMode < HTML_MODE\n                    ? {\n                        content: createPreambleState(),\n                        fallback: createPreambleState()\n                      }\n                    : null,\n                  !1\n                ),\n                boundarySegment = createPendingSegment(\n                  request,\n                  parentSegment.chunks.length,\n                  newBoundary,\n                  task.formatContext,\n                  !1,\n                  !1\n                );\n              parentSegment.children.push(boundarySegment);\n              parentSegment.lastPushedText = !1;\n              var contentRootSegment = createPendingSegment(\n                request,\n                0,\n                null,\n                task.formatContext,\n                !1,\n                !1\n              );\n              contentRootSegment.parentFlushed = !0;\n              var trackedPostpones = request.trackedPostpones;\n              if (null !== trackedPostpones) {\n                var suspenseComponentStack = task.componentStack,\n                  fallbackKeyPath = [\n                    keyPath[0],\n                    \"Suspense Fallback\",\n                    keyPath[2]\n                  ];\n                if (null !== trackedPostpones) {\n                  var fallbackReplayNode = [\n                    fallbackKeyPath[1],\n                    fallbackKeyPath[2],\n                    [],\n                    null\n                  ];\n                  trackedPostpones.workingMap.set(\n                    fallbackKeyPath,\n                    fallbackReplayNode\n                  );\n                  newBoundary.tracked = {\n                    contentKeyPath: keyPath,\n                    fallbackNode: fallbackReplayNode\n                  };\n                }\n                task.blockedSegment = boundarySegment;\n                task.blockedPreamble =\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.fallback;\n                task.keyPath = fallbackKeyPath;\n                task.formatContext = getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$1\n                );\n                task.componentStack =\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    suspenseComponentStack\n                  );\n                try {\n                  renderNode(request, task, fallback, -1),\n                    boundarySegment.lastPushedText &&\n                      boundarySegment.textEmbedded &&\n                      boundarySegment.chunks.push(textSeparator),\n                    (boundarySegment.status = COMPLETED),\n                    finishedSegment(request, parentBoundary, boundarySegment);\n                } catch (thrownValue) {\n                  throw (\n                    ((boundarySegment.status = request.aborted\n                      ? ABORTED\n                      : ERRORED),\n                    thrownValue)\n                  );\n                } finally {\n                  (task.blockedSegment = parentSegment),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.keyPath = prevKeyPath$jscomp$5),\n                    (task.formatContext = prevContext$jscomp$1);\n                }\n                var suspendedPrimaryTask = createRenderTask(\n                  request,\n                  null,\n                  content,\n                  -1,\n                  newBoundary,\n                  contentRootSegment,\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.content,\n                  newBoundary.contentState,\n                  task.abortSet,\n                  keyPath,\n                  getSuspenseContentFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  null,\n                  suspenseComponentStack,\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedPrimaryTask);\n                request.pingedTasks.push(suspendedPrimaryTask);\n              } else {\n                task.blockedBoundary = newBoundary;\n                task.blockedPreamble =\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.content;\n                task.hoistableState = newBoundary.contentState;\n                task.blockedSegment = contentRootSegment;\n                task.keyPath = keyPath;\n                task.formatContext = getSuspenseContentFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$1\n                );\n                task.row = null;\n                try {\n                  if (\n                    (renderNode(request, task, content, -1),\n                    contentRootSegment.lastPushedText &&\n                      contentRootSegment.textEmbedded &&\n                      contentRootSegment.chunks.push(textSeparator),\n                    (contentRootSegment.status = COMPLETED),\n                    finishedSegment(request, newBoundary, contentRootSegment),\n                    queueCompletedSegment(newBoundary, contentRootSegment),\n                    0 === newBoundary.pendingTasks &&\n                      newBoundary.status === PENDING)\n                  ) {\n                    if (\n                      ((newBoundary.status = COMPLETED),\n                      !isEligibleForOutlining(request, newBoundary))\n                    ) {\n                      null !== prevRow$jscomp$0 &&\n                        0 === --prevRow$jscomp$0.pendingTasks &&\n                        finishSuspenseListRow(request, prevRow$jscomp$0);\n                      0 === request.pendingRootTasks &&\n                        task.blockedPreamble &&\n                        preparePreamble(request);\n                      break a;\n                    }\n                  } else\n                    null !== prevRow$jscomp$0 &&\n                      prevRow$jscomp$0.together &&\n                      tryToResolveTogetherRow(request, prevRow$jscomp$0);\n                } catch (thrownValue$2) {\n                  newBoundary.status = CLIENT_RENDERED;\n                  if (request.aborted) {\n                    contentRootSegment.status = ABORTED;\n                    var error = request.fatalError;\n                  } else\n                    (contentRootSegment.status = ERRORED),\n                      (error = thrownValue$2);\n                  var thrownInfo = getThrownInfo(task.componentStack),\n                    errorDigest = logRecoverableError(\n                      request,\n                      error,\n                      thrownInfo,\n                      task.debugTask\n                    );\n                  encodeErrorForBoundary(\n                    newBoundary,\n                    errorDigest,\n                    error,\n                    thrownInfo,\n                    !1\n                  );\n                  untrackBoundary(request, newBoundary);\n                } finally {\n                  (task.blockedBoundary = parentBoundary),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.hoistableState = parentHoistableState),\n                    (task.blockedSegment = parentSegment),\n                    (task.keyPath = prevKeyPath$jscomp$5),\n                    (task.formatContext = prevContext$jscomp$1),\n                    (task.row = prevRow$jscomp$0);\n                }\n                var suspendedFallbackTask = createRenderTask(\n                  request,\n                  null,\n                  fallback,\n                  -1,\n                  parentBoundary,\n                  boundarySegment,\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.fallback,\n                  newBoundary.fallbackState,\n                  fallbackAbortSet,\n                  [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                  getSuspenseFallbackFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  task.row,\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    task.componentStack\n                  ),\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedFallbackTask);\n                request.pingedTasks.push(suspendedFallbackTask);\n              }\n            }\n            return;\n        }\n        if (\"object\" === typeof type && null !== type)\n          switch (type.$$typeof) {\n            case REACT_FORWARD_REF_TYPE:\n              if (\"ref\" in props) {\n                var propsWithoutRef = {};\n                for (var key in props)\n                  \"ref\" !== key && (propsWithoutRef[key] = props[key]);\n              } else propsWithoutRef = props;\n              var children$jscomp$1 = renderWithHooks(\n                request,\n                task,\n                keyPath,\n                type.render,\n                propsWithoutRef,\n                ref\n              );\n              finishFunctionComponent(\n                request,\n                task,\n                keyPath,\n                children$jscomp$1,\n                0 !== localIdCounter,\n                actionStateCounter,\n                actionStateMatchingIndex\n              );\n              return;\n            case REACT_MEMO_TYPE:\n              renderElement(request, task, keyPath, type.type, props, ref);\n              return;\n            case REACT_CONTEXT_TYPE:\n              var value$jscomp$0 = props.value,\n                children$jscomp$2 = props.children;\n              var prevSnapshot = task.context;\n              var prevKeyPath$jscomp$6 = task.keyPath;\n              var prevValue = type._currentValue;\n              type._currentValue = value$jscomp$0;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var prevNode = currentActiveSnapshot,\n                newNode = {\n                  parent: prevNode,\n                  depth: null === prevNode ? 0 : prevNode.depth + 1,\n                  context: type,\n                  parentValue: prevValue,\n                  value: value$jscomp$0\n                };\n              currentActiveSnapshot = newNode;\n              task.context = newNode;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, children$jscomp$2, -1);\n              var prevSnapshot$jscomp$0 = currentActiveSnapshot;\n              if (null === prevSnapshot$jscomp$0)\n                throw Error(\n                  \"Tried to pop a Context at the root of the app. This is a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context !== type &&\n                console.error(\n                  \"The parent context is not the expected context. This is probably a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context._currentValue =\n                prevSnapshot$jscomp$0.parentValue;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var JSCompiler_inline_result$jscomp$1 = (currentActiveSnapshot =\n                prevSnapshot$jscomp$0.parent);\n              task.context = JSCompiler_inline_result$jscomp$1;\n              task.keyPath = prevKeyPath$jscomp$6;\n              prevSnapshot !== task.context &&\n                console.error(\n                  \"Popping the context provider did not return back to the original snapshot. This is a bug in React.\"\n                );\n              return;\n            case REACT_CONSUMER_TYPE:\n              var context$jscomp$0 = type._context,\n                render = props.children;\n              \"function\" !== typeof render &&\n                console.error(\n                  \"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"\n                );\n              var newChildren = render(context$jscomp$0._currentValue),\n                prevKeyPath$jscomp$7 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, newChildren, -1);\n              task.keyPath = prevKeyPath$jscomp$7;\n              return;\n            case REACT_LAZY_TYPE:\n              var Component = callLazyInitInDEV(type);\n              if (request.aborted) throw null;\n              renderElement(request, task, keyPath, Component, props, ref);\n              return;\n          }\n        var info = \"\";\n        if (\n          void 0 === type ||\n          (\"object\" === typeof type &&\n            null !== type &&\n            0 === Object.keys(type).length)\n        )\n          info +=\n            \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n        throw Error(\n          \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n            ((null == type ? type : typeof type) + \".\" + info)\n        );\n      }\n    }\n    function resumeNode(request, task, segmentId, node, childIndex) {\n      var prevReplay = task.replay,\n        blockedBoundary = task.blockedBoundary,\n        resumedSegment = createPendingSegment(\n          request,\n          0,\n          null,\n          task.formatContext,\n          !1,\n          !1\n        );\n      resumedSegment.id = segmentId;\n      resumedSegment.parentFlushed = !0;\n      try {\n        (task.replay = null),\n          (task.blockedSegment = resumedSegment),\n          renderNode(request, task, node, childIndex),\n          (resumedSegment.status = COMPLETED),\n          finishedSegment(request, blockedBoundary, resumedSegment),\n          null === blockedBoundary\n            ? (request.completedRootSegment = resumedSegment)\n            : (queueCompletedSegment(blockedBoundary, resumedSegment),\n              blockedBoundary.parentFlushed &&\n                request.partialBoundaries.push(blockedBoundary));\n      } finally {\n        (task.replay = prevReplay), (task.blockedSegment = null);\n      }\n    }\n    function replayElement(\n      request,\n      task,\n      keyPath,\n      name,\n      keyOrIndex,\n      childIndex,\n      type,\n      props,\n      ref,\n      replay\n    ) {\n      childIndex = replay.nodes;\n      for (var i = 0; i < childIndex.length; i++) {\n        var node = childIndex[i];\n        if (keyOrIndex === node[1]) {\n          if (4 === node.length) {\n            if (null !== name && name !== node[0])\n              throw Error(\n                \"Expected the resume to render <\" +\n                  node[0] +\n                  \"> in this slot but instead it rendered <\" +\n                  name +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            var childNodes = node[2],\n              childSlots = node[3],\n              currentNode = task.node;\n            task.replay = {\n              nodes: childNodes,\n              slots: childSlots,\n              pendingTasks: 1\n            };\n            try {\n              renderElement(request, task, keyPath, type, props, ref);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException ||\n                  \"function\" === typeof x.then ||\n                  \"Maximum call stack size exceeded\" === x.message)\n              )\n                throw (\n                  (task.node === currentNode\n                    ? (task.replay = replay)\n                    : childIndex.splice(i, 1),\n                  x)\n                );\n              task.replay.pendingTasks--;\n              keyPath = getThrownInfo(task.componentStack);\n              props = request;\n              currentNode = task.blockedBoundary;\n              request = request.aborted ? request.fatalError : x;\n              type = logRecoverableError(\n                props,\n                request,\n                keyPath,\n                task.debugTask\n              );\n              abortRemainingReplayNodes(\n                props,\n                currentNode,\n                childNodes,\n                childSlots,\n                request,\n                type,\n                keyPath,\n                !1\n              );\n            }\n            task.replay = replay;\n          } else {\n            if (type !== REACT_SUSPENSE_TYPE)\n              throw Error(\n                \"Expected the resume to render <Suspense> in this slot but instead it rendered <\" +\n                  (getComponentNameFromType(type) || \"Unknown\") +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            a: {\n              replay = request;\n              request = keyPath;\n              keyPath = node[5];\n              type = node[2];\n              ref = node[3];\n              name = null === node[4] ? [] : node[4][2];\n              node = null === node[4] ? null : node[4][3];\n              keyOrIndex = task.keyPath;\n              var prevContext = task.formatContext,\n                prevRow = task.row,\n                previousReplaySet = task.replay,\n                parentBoundary = task.blockedBoundary,\n                parentHoistableState = task.hoistableState,\n                content = props.children;\n              props = props.fallback;\n              var fallbackAbortSet = new Set(),\n                resumedBoundary = createSuspenseBoundary(\n                  replay,\n                  task.row,\n                  fallbackAbortSet,\n                  task.formatContext.insertionMode < HTML_MODE\n                    ? {\n                        content: createPreambleState(),\n                        fallback: createPreambleState()\n                      }\n                    : null,\n                  !1\n                );\n              resumedBoundary.parentFlushed = !0;\n              resumedBoundary.rootSegmentID = keyPath;\n              task.blockedBoundary = resumedBoundary;\n              task.hoistableState = resumedBoundary.contentState;\n              task.keyPath = request;\n              task.formatContext = getSuspenseContentFormatContext(\n                replay.resumableState,\n                prevContext\n              );\n              task.row = null;\n              task.replay = { nodes: type, slots: ref, pendingTasks: 1 };\n              try {\n                renderNode(replay, task, content, -1);\n                if (\n                  1 === task.replay.pendingTasks &&\n                  0 < task.replay.nodes.length\n                )\n                  throw Error(\n                    \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                  );\n                task.replay.pendingTasks--;\n                if (\n                  0 === resumedBoundary.pendingTasks &&\n                  resumedBoundary.status === PENDING\n                ) {\n                  resumedBoundary.status = COMPLETED;\n                  replay.completedBoundaries.push(resumedBoundary);\n                  break a;\n                }\n              } catch (thrownValue) {\n                (resumedBoundary.status = CLIENT_RENDERED),\n                  (childNodes = replay.aborted\n                    ? replay.fatalError\n                    : thrownValue),\n                  (childSlots = getThrownInfo(task.componentStack)),\n                  (currentNode = logRecoverableError(\n                    replay,\n                    childNodes,\n                    childSlots,\n                    task.debugTask\n                  )),\n                  encodeErrorForBoundary(\n                    resumedBoundary,\n                    currentNode,\n                    childNodes,\n                    childSlots,\n                    !1\n                  ),\n                  task.replay.pendingTasks--,\n                  replay.clientRenderedBoundaries.push(resumedBoundary);\n              } finally {\n                (task.blockedBoundary = parentBoundary),\n                  (task.hoistableState = parentHoistableState),\n                  (task.replay = previousReplaySet),\n                  (task.keyPath = keyOrIndex),\n                  (task.formatContext = prevContext),\n                  (task.row = prevRow);\n              }\n              props = createReplayTask(\n                replay,\n                null,\n                { nodes: name, slots: node, pendingTasks: 0 },\n                props,\n                -1,\n                parentBoundary,\n                resumedBoundary.fallbackState,\n                fallbackAbortSet,\n                [request[0], \"Suspense Fallback\", request[2]],\n                getSuspenseFallbackFormatContext(\n                  replay.resumableState,\n                  task.formatContext\n                ),\n                task.context,\n                task.treeContext,\n                task.row,\n                replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                  task.componentStack\n                ),\n                emptyContextObject,\n                task.debugTask\n              );\n              pushComponentStack(props);\n              replay.pingedTasks.push(props);\n            }\n          }\n          childIndex.splice(i, 1);\n          break;\n        }\n      }\n    }\n    function validateIterable(\n      task,\n      iterable,\n      childIndex,\n      iterator,\n      iteratorFn\n    ) {\n      if (iterator === iterable) {\n        if (\n          -1 !== childIndex ||\n          null === task.componentStack ||\n          \"function\" !== typeof task.componentStack.type ||\n          \"[object GeneratorFunction]\" !==\n            Object.prototype.toString.call(task.componentStack.type) ||\n          \"[object Generator]\" !== Object.prototype.toString.call(iterator)\n        )\n          didWarnAboutGenerators ||\n            console.error(\n              \"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"\n            ),\n            (didWarnAboutGenerators = !0);\n      } else\n        iterable.entries !== iteratorFn ||\n          didWarnAboutMaps ||\n          (console.error(\n            \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n          ),\n          (didWarnAboutMaps = !0));\n    }\n    function renderNodeDestructive(request, task, node, childIndex) {\n      null !== task.replay && \"number\" === typeof task.replay.slots\n        ? resumeNode(request, task, task.replay.slots, node, childIndex)\n        : ((task.node = node),\n          (task.childIndex = childIndex),\n          (node = task.componentStack),\n          (childIndex = task.debugTask),\n          pushComponentStack(task),\n          retryNode(request, task),\n          (task.componentStack = node),\n          (task.debugTask = childIndex));\n    }\n    function retryNode(request, task) {\n      var node = task.node,\n        childIndex = task.childIndex;\n      if (null !== node) {\n        if (\"object\" === typeof node) {\n          switch (node.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              var type = node.type,\n                key = node.key;\n              node = node.props;\n              var refProp = node.ref;\n              refProp = void 0 !== refProp ? refProp : null;\n              var debugTask = task.debugTask,\n                name = getComponentNameFromType(type);\n              key =\n                null == key || key === REACT_OPTIMISTIC_KEY\n                  ? -1 === childIndex\n                    ? 0\n                    : childIndex\n                  : key;\n              var keyPath = [task.keyPath, name, key];\n              null !== task.replay\n                ? debugTask\n                  ? debugTask.run(\n                      replayElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        name,\n                        key,\n                        childIndex,\n                        type,\n                        node,\n                        refProp,\n                        task.replay\n                      )\n                    )\n                  : replayElement(\n                      request,\n                      task,\n                      keyPath,\n                      name,\n                      key,\n                      childIndex,\n                      type,\n                      node,\n                      refProp,\n                      task.replay\n                    )\n                : debugTask\n                  ? debugTask.run(\n                      renderElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        type,\n                        node,\n                        refProp\n                      )\n                    )\n                  : renderElement(request, task, keyPath, type, node, refProp);\n              return;\n            case REACT_PORTAL_TYPE:\n              throw Error(\n                \"Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.\"\n              );\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(node);\n              if (request.aborted) throw null;\n              renderNodeDestructive(request, task, type, childIndex);\n              return;\n          }\n          if (isArrayImpl(node)) {\n            renderChildrenArray(request, task, node, childIndex);\n            return;\n          }\n          if ((key = getIteratorFn(node)))\n            if ((type = key.call(node))) {\n              validateIterable(task, node, childIndex, type, key);\n              node = type.next();\n              if (!node.done) {\n                key = [];\n                do key.push(node.value), (node = type.next());\n                while (!node.done);\n                renderChildrenArray(request, task, key, childIndex);\n              }\n              return;\n            }\n          if (\"function\" === typeof node.then)\n            return (\n              (task.thenableState = null),\n              renderNodeDestructive(\n                request,\n                task,\n                unwrapThenable(node),\n                childIndex\n              )\n            );\n          if (node.$$typeof === REACT_CONTEXT_TYPE)\n            return renderNodeDestructive(\n              request,\n              task,\n              node._currentValue,\n              childIndex\n            );\n          request = Object.prototype.toString.call(node);\n          throw Error(\n            \"Objects are not valid as a React child (found: \" +\n              (\"[object Object]\" === request\n                ? \"object with keys {\" + Object.keys(node).join(\", \") + \"}\"\n                : request) +\n              \"). If you meant to render a collection of children, use an array instead.\"\n          );\n        }\n        \"string\" === typeof node\n          ? ((task = task.blockedSegment),\n            null !== task &&\n              (task.lastPushedText = pushTextInstance(\n                task.chunks,\n                node,\n                request.renderState,\n                task.lastPushedText\n              )))\n          : \"number\" === typeof node || \"bigint\" === typeof node\n            ? ((task = task.blockedSegment),\n              null !== task &&\n                (task.lastPushedText = pushTextInstance(\n                  task.chunks,\n                  \"\" + node,\n                  request.renderState,\n                  task.lastPushedText\n                )))\n            : (\"function\" === typeof node &&\n                ((request = node.displayName || node.name || \"Component\"),\n                console.error(\n                  \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\",\n                  request,\n                  request\n                )),\n              \"symbol\" === typeof node &&\n                console.error(\n                  \"Symbols are not valid as a React child.\\n  %s\",\n                  String(node)\n                ));\n      }\n    }\n    function warnForMissingKey(request, task, child) {\n      if (\n        null !== child &&\n        \"object\" === typeof child &&\n        (child.$$typeof === REACT_ELEMENT_TYPE ||\n          child.$$typeof === REACT_PORTAL_TYPE) &&\n        child._store &&\n        ((!child._store.validated && null == child.key) ||\n          2 === child._store.validated)\n      ) {\n        if (\"object\" !== typeof child._store)\n          throw Error(\n            \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        child._store.validated = 1;\n        var didWarnForKey = request.didWarnForKey;\n        null == didWarnForKey &&\n          (didWarnForKey = request.didWarnForKey = new WeakSet());\n        request = task.componentStack;\n        if (null !== request && !didWarnForKey.has(request)) {\n          didWarnForKey.add(request);\n          var componentName = getComponentNameFromType(child.type);\n          didWarnForKey = child._owner;\n          var parentOwner = request.owner;\n          request = \"\";\n          if (parentOwner && \"undefined\" !== typeof parentOwner.type) {\n            var name = getComponentNameFromType(parentOwner.type);\n            name &&\n              (request = \"\\n\\nCheck the render method of `\" + name + \"`.\");\n          }\n          request ||\n            (componentName &&\n              (request =\n                \"\\n\\nCheck the top-level render call using <\" +\n                componentName +\n                \">.\"));\n          componentName = \"\";\n          null != didWarnForKey &&\n            parentOwner !== didWarnForKey &&\n            ((parentOwner = null),\n            \"undefined\" !== typeof didWarnForKey.type\n              ? (parentOwner = getComponentNameFromType(didWarnForKey.type))\n              : \"string\" === typeof didWarnForKey.name &&\n                (parentOwner = didWarnForKey.name),\n            parentOwner &&\n              (componentName =\n                \" It was passed a child from \" + parentOwner + \".\"));\n          didWarnForKey = task.componentStack;\n          task.componentStack = {\n            parent: task.componentStack,\n            type: child.type,\n            owner: child._owner,\n            stack: child._debugStack\n          };\n          console.error(\n            'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n            request,\n            componentName\n          );\n          task.componentStack = didWarnForKey;\n        }\n      }\n    }\n    function renderChildrenArray(request, task, children, childIndex) {\n      var prevKeyPath = task.keyPath,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node._debugInfo);\n      if (\n        -1 !== childIndex &&\n        ((task.keyPath = [task.keyPath, \"Fragment\", childIndex]),\n        null !== task.replay)\n      ) {\n        for (\n          var replay = task.replay, replayNodes = replay.nodes, j = 0;\n          j < replayNodes.length;\n          j++\n        ) {\n          var node = replayNodes[j];\n          if (node[1] === childIndex) {\n            childIndex = node[2];\n            var childSlots = node[3];\n            task.replay = {\n              nodes: childIndex,\n              slots: childSlots,\n              pendingTasks: 1\n            };\n            try {\n              renderChildrenArray(request, task, children, -1);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw x;\n              task.replay.pendingTasks--;\n              var thrownInfo = getThrownInfo(task.componentStack);\n              children = request;\n              node = task.blockedBoundary;\n              request = request.aborted ? request.fatalError : x;\n              var errorDigest = logRecoverableError(\n                children,\n                request,\n                thrownInfo,\n                task.debugTask\n              );\n              abortRemainingReplayNodes(\n                children,\n                node,\n                childIndex,\n                childSlots,\n                request,\n                errorDigest,\n                thrownInfo,\n                !1\n              );\n            }\n            task.replay = replay;\n            replayNodes.splice(j, 1);\n            break;\n          }\n        }\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      replay = task.treeContext;\n      replayNodes = children.length;\n      if (\n        null !== task.replay &&\n        ((j = task.replay.slots), null !== j && \"object\" === typeof j)\n      ) {\n        for (node = 0; node < replayNodes; node++)\n          (childIndex = children[node]),\n            (task.treeContext = pushTreeContext(replay, replayNodes, node)),\n            (childSlots = j[node]),\n            \"number\" === typeof childSlots\n              ? (resumeNode(request, task, childSlots, childIndex, node),\n                delete j[node])\n              : renderNode(request, task, childIndex, node);\n        task.treeContext = replay;\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      for (j = 0; j < replayNodes; j++)\n        (node = children[j]),\n          warnForMissingKey(request, task, node),\n          (task.treeContext = pushTreeContext(replay, replayNodes, j)),\n          renderNode(request, task, node, j);\n      task.treeContext = replay;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function trackPostponedBoundary(request, trackedPostpones, boundary) {\n      boundary.status = POSTPONED;\n      boundary.rootSegmentID = request.nextSegmentId++;\n      var tracked = boundary.tracked;\n      if (null === tracked)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      request = tracked.contentKeyPath;\n      if (null === request)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      tracked = tracked.fallbackNode;\n      var children = [],\n        boundaryNode = trackedPostpones.workingMap.get(request);\n      if (void 0 === boundaryNode)\n        return (\n          (boundary = [\n            request[1],\n            request[2],\n            children,\n            null,\n            tracked,\n            boundary.rootSegmentID\n          ]),\n          trackedPostpones.workingMap.set(request, boundary),\n          addToReplayParent(boundary, request[0], trackedPostpones),\n          boundary\n        );\n      boundaryNode[4] = tracked;\n      boundaryNode[5] = boundary.rootSegmentID;\n      return boundaryNode;\n    }\n    function trackPostpone(request, trackedPostpones, task, segment) {\n      segment.status = POSTPONED;\n      var keyPath = task.keyPath,\n        boundary = task.blockedBoundary;\n      if (null === boundary)\n        (segment.id = request.nextSegmentId++),\n          (trackedPostpones.rootSlots = segment.id),\n          null !== request.completedRootSegment &&\n            (request.completedRootSegment.status = POSTPONED);\n      else {\n        if (null !== boundary && boundary.status === PENDING) {\n          var boundaryNode = trackPostponedBoundary(\n            request,\n            trackedPostpones,\n            boundary\n          );\n          if (\n            null !== boundary.tracked &&\n            boundary.tracked.contentKeyPath === keyPath &&\n            -1 === task.childIndex\n          ) {\n            -1 === segment.id &&\n              (segment.id = segment.parentFlushed\n                ? boundary.rootSegmentID\n                : request.nextSegmentId++);\n            boundaryNode[3] = segment.id;\n            return;\n          }\n        }\n        -1 === segment.id &&\n          (segment.id =\n            segment.parentFlushed && null !== boundary\n              ? boundary.rootSegmentID\n              : request.nextSegmentId++);\n        if (-1 === task.childIndex)\n          null === keyPath\n            ? (trackedPostpones.rootSlots = segment.id)\n            : ((task = trackedPostpones.workingMap.get(keyPath)),\n              void 0 === task\n                ? ((task = [keyPath[1], keyPath[2], [], segment.id]),\n                  addToReplayParent(task, keyPath[0], trackedPostpones))\n                : (task[3] = segment.id));\n        else {\n          if (null === keyPath)\n            if (((request = trackedPostpones.rootSlots), null === request))\n              request = trackedPostpones.rootSlots = {};\n            else {\n              if (\"number\" === typeof request)\n                throw Error(\n                  \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n                );\n            }\n          else if (\n            ((boundary = trackedPostpones.workingMap),\n            (boundaryNode = boundary.get(keyPath)),\n            void 0 === boundaryNode)\n          )\n            (request = {}),\n              (boundaryNode = [keyPath[1], keyPath[2], [], request]),\n              boundary.set(keyPath, boundaryNode),\n              addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);\n          else if (((request = boundaryNode[3]), null === request))\n            request = boundaryNode[3] = {};\n          else if (\"number\" === typeof request)\n            throw Error(\n              \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n            );\n          request[task.childIndex] = segment.id;\n        }\n      }\n    }\n    function untrackBoundary(request, boundary) {\n      request = request.trackedPostpones;\n      null !== request &&\n        ((boundary = boundary.tracked),\n        null !== boundary &&\n          ((boundary = boundary.contentKeyPath),\n          null !== boundary &&\n            ((request = request.workingMap.get(boundary)),\n            void 0 !== request &&\n              ((request.length = 4), (request[2] = []), (request[3] = null)))));\n    }\n    function spawnNewSuspendedReplayTask(request, task, thenableState) {\n      return createReplayTask(\n        request,\n        thenableState,\n        task.replay,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function spawnNewSuspendedRenderTask(request, task, thenableState) {\n      var segment = task.blockedSegment,\n        newSegment = createPendingSegment(\n          request,\n          segment.chunks.length,\n          null,\n          task.formatContext,\n          segment.lastPushedText,\n          !0\n        );\n      segment.children.push(newSegment);\n      segment.lastPushedText = !1;\n      return createRenderTask(\n        request,\n        thenableState,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        newSegment,\n        task.blockedPreamble,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function renderNode(request, task, node, childIndex) {\n      var previousFormatContext = task.formatContext,\n        previousContext = task.context,\n        previousKeyPath = task.keyPath,\n        previousTreeContext = task.treeContext,\n        previousComponentStack = task.componentStack,\n        previousDebugTask = task.debugTask,\n        segment = task.blockedSegment;\n      if (null === segment) {\n        segment = task.replay;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue) {\n          if (\n            (resetHooksState(),\n            (node =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue),\n            !request.aborted && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              childIndex =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedReplayTask(\n                request,\n                task,\n                childIndex\n              ).ping;\n              node.then(request.resolve, request.reject);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              node =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              node = spawnNewSuspendedReplayTask(request, task, node);\n              request.pingedTasks.push(node);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      } else {\n        var childrenLength = segment.children.length,\n          chunkLength = segment.chunks.length;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue$3) {\n          if (\n            (resetHooksState(),\n            (segment.children.length = childrenLength),\n            (segment.chunks.length = chunkLength),\n            (node =\n              thrownValue$3 === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue$3),\n            !request.aborted && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              segment = node;\n              node =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedRenderTask(request, task, node).ping;\n              segment.then(request.resolve, request.reject);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              segment =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              segment = spawnNewSuspendedRenderTask(request, task, segment);\n              request.pingedTasks.push(segment);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      }\n      task.formatContext = previousFormatContext;\n      task.context = previousContext;\n      task.keyPath = previousKeyPath;\n      task.treeContext = previousTreeContext;\n      switchContext(previousContext);\n      throw node;\n    }\n    function abortTaskSoft(task) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      null !== segment &&\n        ((segment.status = ABORTED),\n        finishedTask(this, boundary, task.row, segment));\n    }\n    function abortRemainingReplayNodes(\n      request$jscomp$0,\n      boundary,\n      nodes,\n      slots,\n      error$jscomp$0,\n      errorDigest$jscomp$0,\n      errorInfo$jscomp$0,\n      aborted\n    ) {\n      for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        if (4 === node.length)\n          abortRemainingReplayNodes(\n            request$jscomp$0,\n            boundary,\n            node[2],\n            node[3],\n            error$jscomp$0,\n            errorDigest$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          );\n        else {\n          var request = request$jscomp$0;\n          node = node[5];\n          var error = error$jscomp$0,\n            errorDigest = errorDigest$jscomp$0,\n            errorInfo = errorInfo$jscomp$0,\n            wasAborted = aborted,\n            resumedBoundary = createSuspenseBoundary(\n              request,\n              null,\n              new Set(),\n              null,\n              !1\n            );\n          resumedBoundary.parentFlushed = !0;\n          resumedBoundary.rootSegmentID = node;\n          resumedBoundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(\n            resumedBoundary,\n            errorDigest,\n            error,\n            errorInfo,\n            wasAborted\n          );\n          resumedBoundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(resumedBoundary);\n        }\n      }\n      nodes.length = 0;\n      if (null !== slots) {\n        if (null === boundary)\n          throw Error(\n            \"We should not have any resumable nodes in the shell. This is a bug in React.\"\n          );\n        boundary.status !== CLIENT_RENDERED &&\n          ((boundary.status = CLIENT_RENDERED),\n          encodeErrorForBoundary(\n            boundary,\n            errorDigest$jscomp$0,\n            error$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          ),\n          boundary.parentFlushed &&\n            request$jscomp$0.clientRenderedBoundaries.push(boundary));\n        if (\"object\" === typeof slots)\n          for (var index in slots) delete slots[index];\n      }\n    }\n    function abortTask(task, request) {\n      if (task !== request.currentTask) {\n        var boundary = task.blockedBoundary,\n          segment = task.blockedSegment;\n        null !== segment && (segment.status = ABORTED);\n        segment = task.node;\n        if (null !== segment && \"object\" === typeof segment) {\n          for (\n            var debugInfo = segment._debugInfo;\n            \"object\" === typeof segment &&\n            null !== segment &&\n            segment.$$typeof === REACT_LAZY_TYPE;\n\n          ) {\n            var payload = segment._payload;\n            if (\"fulfilled\" === payload.status) segment = payload.value;\n            else break;\n          }\n          \"object\" === typeof segment &&\n            null !== segment &&\n            (isArrayImpl(segment) ||\n              \"function\" === typeof segment[ASYNC_ITERATOR] ||\n              segment.$$typeof === REACT_ELEMENT_TYPE ||\n              segment.$$typeof === REACT_LAZY_TYPE) &&\n            isArrayImpl(segment._debugInfo) &&\n            (debugInfo = segment._debugInfo);\n          pushHaltedAwaitOnComponentStack(task, debugInfo);\n          null !== task.thenableState &&\n            pushSuspendedCallSiteOnComponentStack(request, task);\n        }\n        null !== boundary &&\n          boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n            return abortTask(fallbackTask, request);\n          });\n      }\n    }\n    function finishAbortedTask(task, request, error) {\n      if (task !== request.currentTask) {\n        var boundary = task.blockedBoundary,\n          segment = task.blockedSegment;\n        if (null === segment || segment.status === ABORTED) {\n          var errorInfo = getThrownInfo(task.componentStack),\n            isRecoverableAbort =\n              \"object\" === typeof error &&\n              null !== error &&\n              error.$$typeof === REACT_RECOVERABLE_TYPE;\n          if (null === boundary) {\n            boundary = task.replay;\n            if (null === boundary) {\n              isRecoverableAbort ||\n              null === request.trackedPostpones ||\n              null === segment\n                ? isRecoverableAbort\n                  ? ((boundary = createFatalRecoverableError(error)),\n                    logRecoverableError(\n                      request,\n                      boundary,\n                      errorInfo,\n                      task.debugTask\n                    ),\n                    12 !== request.status &&\n                      request.status !== CLOSED &&\n                      fatalError(request, boundary, errorInfo, task.debugTask))\n                  : (logRecoverableError(\n                      request,\n                      error,\n                      errorInfo,\n                      task.debugTask\n                    ),\n                    12 !== request.status &&\n                      request.status !== CLOSED &&\n                      fatalError(request, error, errorInfo, task.debugTask))\n                : ((boundary = request.trackedPostpones),\n                  logRecoverableError(\n                    request,\n                    error,\n                    errorInfo,\n                    task.debugTask\n                  ),\n                  trackPostpone(request, boundary, task, segment),\n                  finishedTask(request, null, task.row, segment));\n              return;\n            }\n            12 !== request.status &&\n              request.status !== CLOSED &&\n              (boundary.pendingTasks--,\n              0 === boundary.pendingTasks &&\n                0 < boundary.nodes.length &&\n                (isRecoverableAbort\n                  ? ((segment = REACT_RECOVERABLE_DIGEST),\n                    (isRecoverableAbort = RecoverableException))\n                  : ((segment = logRecoverableError(\n                      request,\n                      error,\n                      errorInfo,\n                      null\n                    )),\n                    (isRecoverableAbort = error)),\n                abortRemainingReplayNodes(\n                  request,\n                  null,\n                  boundary.nodes,\n                  boundary.slots,\n                  isRecoverableAbort,\n                  segment,\n                  errorInfo,\n                  !0\n                )),\n              request.pendingRootTasks--,\n              0 === request.pendingRootTasks && completeShell(request));\n          } else {\n            var _trackedPostpones = request.trackedPostpones;\n            if (boundary.status !== CLIENT_RENDERED) {\n              if (\n                !isRecoverableAbort &&\n                null !== _trackedPostpones &&\n                null !== segment\n              )\n                return (\n                  logRecoverableError(\n                    request,\n                    error,\n                    errorInfo,\n                    task.debugTask\n                  ),\n                  trackPostpone(request, _trackedPostpones, task, segment),\n                  boundary.fallbackAbortableTasks.forEach(\n                    function (fallbackTask) {\n                      return finishAbortedTask(fallbackTask, request, error);\n                    }\n                  ),\n                  boundary.fallbackAbortableTasks.clear(),\n                  finishedTask(request, boundary, task.row, segment)\n                );\n              boundary.status = CLIENT_RENDERED;\n              segment = isRecoverableAbort\n                ? REACT_RECOVERABLE_DIGEST\n                : logRecoverableError(\n                    request,\n                    error,\n                    errorInfo,\n                    task.debugTask\n                  );\n              encodeErrorForBoundary(\n                boundary,\n                segment,\n                isRecoverableAbort ? RecoverableException : error,\n                errorInfo,\n                !0\n              );\n              untrackBoundary(request, boundary);\n              boundary.parentFlushed &&\n                request.clientRenderedBoundaries.push(boundary);\n            }\n            boundary.pendingTasks--;\n            errorInfo = boundary.row;\n            null !== errorInfo &&\n              0 === --errorInfo.pendingTasks &&\n              finishSuspenseListRow(request, errorInfo);\n            boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n              return finishAbortedTask(fallbackTask, request, error);\n            });\n            boundary.fallbackAbortableTasks.clear();\n          }\n          task = task.row;\n          null !== task &&\n            0 === --task.pendingTasks &&\n            finishSuspenseListRow(request, task);\n          request.allPendingTasks--;\n          0 === request.allPendingTasks && completeAll(request);\n        }\n      }\n    }\n    function finishAbortedTaskDEV(task, request, error) {\n      var prevTaskInDEV = currentTaskInDEV,\n        prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n      currentTaskInDEV = task;\n      ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n      try {\n        finishAbortedTask(task, request, error);\n      } finally {\n        (currentTaskInDEV = prevTaskInDEV),\n          (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl);\n      }\n    }\n    function abortTaskDEV(task, request) {\n      var prevTaskInDEV = currentTaskInDEV,\n        prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n      currentTaskInDEV = task;\n      ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n      try {\n        abortTask(task, request);\n      } finally {\n        (currentTaskInDEV = prevTaskInDEV),\n          (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl);\n      }\n    }\n    function safelyEmitEarlyPreloads(request, shellComplete) {\n      try {\n        var renderState = request.renderState,\n          onHeaders = renderState.onHeaders;\n        if (onHeaders) {\n          var headers = renderState.headers;\n          if (headers) {\n            renderState.headers = null;\n            var linkHeader = headers.preconnects;\n            headers.fontPreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.fontPreloads));\n            headers.highImagePreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.highImagePreloads));\n            if (!shellComplete) {\n              var queueIter = renderState.styles.values(),\n                queueStep = queueIter.next();\n              b: for (\n                ;\n                0 < headers.remainingCapacity && !queueStep.done;\n                queueStep = queueIter.next()\n              )\n                for (\n                  var sheetIter = queueStep.value.sheets.values(),\n                    sheetStep = sheetIter.next();\n                  0 < headers.remainingCapacity && !sheetStep.done;\n                  sheetStep = sheetIter.next()\n                ) {\n                  var sheet = sheetStep.value,\n                    props = sheet.props,\n                    key = props.href,\n                    props$jscomp$0 = sheet.props;\n                  var header = getPreloadAsHeader(\n                    props$jscomp$0.href,\n                    \"style\",\n                    {\n                      crossOrigin: props$jscomp$0.crossOrigin,\n                      integrity: props$jscomp$0.integrity,\n                      nonce: props$jscomp$0.nonce,\n                      type: props$jscomp$0.type,\n                      fetchPriority: props$jscomp$0.fetchPriority,\n                      referrerPolicy: props$jscomp$0.referrerPolicy,\n                      media: props$jscomp$0.media\n                    }\n                  );\n                  if (0 <= (headers.remainingCapacity -= header.length + 2))\n                    (renderState.resets.style[key] = PRELOAD_NO_CREDS),\n                      linkHeader && (linkHeader += \", \"),\n                      (linkHeader += header),\n                      (renderState.resets.style[key] =\n                        \"string\" === typeof props.crossOrigin ||\n                        \"string\" === typeof props.integrity\n                          ? [props.crossOrigin, props.integrity]\n                          : PRELOAD_NO_CREDS);\n                  else break b;\n                }\n            }\n            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});\n          }\n        }\n      } catch (error) {\n        logRecoverableError(request, error, {}, null);\n      }\n    }\n    function completeShell(request) {\n      null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);\n      null === request.trackedPostpones && preparePreamble(request);\n      request = request.onShellReady;\n      request();\n    }\n    function completeAll(request) {\n      safelyEmitEarlyPreloads(\n        request,\n        null === request.trackedPostpones\n          ? !0\n          : null === request.completedRootSegment ||\n              request.completedRootSegment.status !== POSTPONED\n      );\n      preparePreamble(request);\n      request = request.onAllReady;\n      request();\n    }\n    function queueCompletedSegment(boundary, segment) {\n      if (\n        0 === segment.chunks.length &&\n        1 === segment.children.length &&\n        null === segment.children[0].boundary &&\n        -1 === segment.children[0].id\n      ) {\n        var childSegment = segment.children[0];\n        childSegment.id = segment.id;\n        childSegment.parentFlushed = !0;\n        (childSegment.status !== COMPLETED &&\n          childSegment.status !== ABORTED &&\n          childSegment.status !== ERRORED) ||\n          queueCompletedSegment(boundary, childSegment);\n      } else boundary.completedSegments.push(segment);\n    }\n    function finishedSegment(request, boundary, segment) {\n      if (null !== byteLengthOfChunk) {\n        segment = segment.chunks;\n        for (var segmentByteSize = 0, i = 0; i < segment.length; i++)\n          segmentByteSize += byteLengthOfChunk(segment[i]);\n        null === boundary\n          ? (request.byteSize += segmentByteSize)\n          : (boundary.byteSize += segmentByteSize);\n      }\n    }\n    function finishedTask(request, boundary, row, segment) {\n      null !== row &&\n        (0 === --row.pendingTasks\n          ? finishSuspenseListRow(request, row)\n          : row.together && tryToResolveTogetherRow(request, row));\n      request.allPendingTasks--;\n      if (null === boundary) {\n        if (null !== segment && segment.parentFlushed) {\n          if (null !== request.completedRootSegment)\n            throw Error(\n              \"There can only be one root segment. This is a bug in React.\"\n            );\n          request.completedRootSegment = segment;\n        }\n        request.pendingRootTasks--;\n        0 === request.pendingRootTasks && completeShell(request);\n      } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))\n        if (0 === boundary.pendingTasks)\n          if (\n            (boundary.status === PENDING && (boundary.status = COMPLETED),\n            null !== segment &&\n              segment.parentFlushed &&\n              (segment.status === COMPLETED || segment.status === ABORTED) &&\n              queueCompletedSegment(boundary, segment),\n            boundary.parentFlushed &&\n              request.completedBoundaries.push(boundary),\n            boundary.status === COMPLETED)\n          )\n            (row = boundary.row),\n              null !== row &&\n                hoistHoistables(row.hoistables, boundary.contentState),\n              isEligibleForOutlining(request, boundary) ||\n                (request.allPendingTasks++,\n                boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),\n                boundary.fallbackAbortableTasks.clear(),\n                null !== row &&\n                  0 === --row.pendingTasks &&\n                  finishSuspenseListRow(request, row),\n                request.allPendingTasks--),\n              0 === request.pendingRootTasks &&\n                null === request.trackedPostpones &&\n                null !== boundary.preamble &&\n                preparePreamble(request);\n          else {\n            if (\n              boundary.status === POSTPONED &&\n              ((boundary = boundary.row), null !== boundary)\n            ) {\n              if (null !== request.trackedPostpones) {\n                row = request.trackedPostpones;\n                var postponedRow = boundary.next;\n                if (\n                  null !== postponedRow &&\n                  ((segment = postponedRow.boundaries), null !== segment)\n                )\n                  for (\n                    postponedRow.boundaries = null, postponedRow = 0;\n                    postponedRow < segment.length;\n                    postponedRow++\n                  ) {\n                    var postponedBoundary = segment[postponedRow];\n                    trackPostponedBoundary(request, row, postponedBoundary);\n                    finishedTask(request, postponedBoundary, null, null);\n                  }\n              }\n              request.allPendingTasks++;\n              0 === --boundary.pendingTasks &&\n                finishSuspenseListRow(request, boundary);\n              request.allPendingTasks--;\n            }\n          }\n        else\n          null === segment ||\n            !segment.parentFlushed ||\n            (segment.status !== COMPLETED && segment.status !== ABORTED) ||\n            (queueCompletedSegment(boundary, segment),\n            1 === boundary.completedSegments.length &&\n              boundary.parentFlushed &&\n              request.partialBoundaries.push(boundary)),\n            (boundary = boundary.row),\n            null !== boundary &&\n              boundary.together &&\n              tryToResolveTogetherRow(request, boundary);\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function performWork(request$jscomp$1) {\n      if (!(request$jscomp$1.aborted || 11 < request$jscomp$1.status)) {\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request$jscomp$1;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request$jscomp$1.resumableState;\n        try {\n          var pingedTasks = request$jscomp$1.pingedTasks,\n            i;\n          for (i = 0; i < pingedTasks.length; i++) {\n            var request = request$jscomp$1,\n              task = pingedTasks[i],\n              segment = task.blockedSegment;\n            if (null === segment)\n              a: {\n                var prevTaskInDEV = void 0,\n                  task$jscomp$0 = task;\n                if (0 !== task$jscomp$0.replay.pendingTasks) {\n                  var prevTask = request.currentTask;\n                  request.currentTask = task$jscomp$0;\n                  switchContext(task$jscomp$0.context);\n                  prevTaskInDEV = currentTaskInDEV;\n                  currentTaskInDEV = task$jscomp$0;\n                  var startNode = task$jscomp$0.node;\n                  try {\n                    \"number\" === typeof task$jscomp$0.replay.slots\n                      ? resumeNode(\n                          request,\n                          task$jscomp$0,\n                          task$jscomp$0.replay.slots,\n                          task$jscomp$0.node,\n                          task$jscomp$0.childIndex\n                        )\n                      : retryNode(request, task$jscomp$0);\n                    if (\n                      1 === task$jscomp$0.replay.pendingTasks &&\n                      0 < task$jscomp$0.replay.nodes.length\n                    )\n                      throw Error(\n                        \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                      );\n                    task$jscomp$0.replay.pendingTasks--;\n                    task$jscomp$0.abortSet.delete(task$jscomp$0);\n                    finishedTask(\n                      request,\n                      task$jscomp$0.blockedBoundary,\n                      task$jscomp$0.row,\n                      null\n                    );\n                  } catch (thrownValue) {\n                    resetHooksState();\n                    var x =\n                      thrownValue === SuspenseException\n                        ? getSuspendedThenable()\n                        : thrownValue;\n                    if (request.aborted) {\n                      thrownValue === SuspenseException &&\n                        (task$jscomp$0.thenableState =\n                          getThenableStateAfterSuspending());\n                      request.currentTask = prevTask;\n                      var request$jscomp$0 = request;\n                      abortTaskDEV(task$jscomp$0, request$jscomp$0);\n                      task$jscomp$0.abortSet.delete(task$jscomp$0);\n                      finishAbortedTaskDEV(\n                        task$jscomp$0,\n                        request$jscomp$0,\n                        request$jscomp$0.fatalError\n                      );\n                    } else {\n                      if (\"object\" === typeof x && null !== x) {\n                        if (\"function\" === typeof x.then) {\n                          var ping = task$jscomp$0.ping;\n                          x.then(ping.resolve, ping.reject);\n                          task$jscomp$0.thenableState =\n                            thrownValue === SuspenseException\n                              ? getThenableStateAfterSuspending()\n                              : null;\n                          break a;\n                        }\n                        if (\n                          \"Maximum call stack size exceeded\" === x.message &&\n                          task$jscomp$0.node !== startNode\n                        ) {\n                          task$jscomp$0.thenableState = null;\n                          request.pingedTasks.push(task$jscomp$0);\n                          break a;\n                        }\n                      }\n                      task$jscomp$0.replay.pendingTasks--;\n                      task$jscomp$0.abortSet.delete(task$jscomp$0);\n                      var errorInfo = getThrownInfo(\n                        task$jscomp$0.componentStack\n                      );\n                      request$jscomp$0 = request;\n                      var boundary = task$jscomp$0.blockedBoundary,\n                        error$jscomp$0 = request.aborted\n                          ? request.fatalError\n                          : x,\n                        errorInfo$jscomp$0 = errorInfo,\n                        replayNodes = task$jscomp$0.replay.nodes,\n                        resumeSlots = task$jscomp$0.replay.slots,\n                        errorDigest = logRecoverableError(\n                          request$jscomp$0,\n                          error$jscomp$0,\n                          errorInfo$jscomp$0,\n                          task$jscomp$0.debugTask\n                        );\n                      abortRemainingReplayNodes(\n                        request$jscomp$0,\n                        boundary,\n                        replayNodes,\n                        resumeSlots,\n                        error$jscomp$0,\n                        errorDigest,\n                        errorInfo$jscomp$0,\n                        !1\n                      );\n                      request.pendingRootTasks--;\n                      0 === request.pendingRootTasks && completeShell(request);\n                      request.allPendingTasks--;\n                      0 === request.allPendingTasks && completeAll(request);\n                    }\n                  } finally {\n                    (request.currentTask = prevTask),\n                      (currentTaskInDEV = prevTaskInDEV);\n                  }\n                }\n              }\n            else\n              a: if (\n                ((prevTaskInDEV = void 0),\n                (task$jscomp$0 = task),\n                (request$jscomp$0 = segment),\n                request$jscomp$0.status === PENDING)\n              ) {\n                var prevTask$jscomp$0 = request.currentTask;\n                request.currentTask = task$jscomp$0;\n                switchContext(task$jscomp$0.context);\n                prevTaskInDEV = currentTaskInDEV;\n                currentTaskInDEV = task$jscomp$0;\n                var childrenLength = request$jscomp$0.children.length,\n                  chunkLength = request$jscomp$0.chunks.length,\n                  startNode$jscomp$0 = task$jscomp$0.node;\n                try {\n                  retryNode(request, task$jscomp$0),\n                    request$jscomp$0.lastPushedText &&\n                      request$jscomp$0.textEmbedded &&\n                      request$jscomp$0.chunks.push(textSeparator),\n                    task$jscomp$0.abortSet.delete(task$jscomp$0),\n                    (request$jscomp$0.status = COMPLETED),\n                    finishedSegment(\n                      request,\n                      task$jscomp$0.blockedBoundary,\n                      request$jscomp$0\n                    ),\n                    finishedTask(\n                      request,\n                      task$jscomp$0.blockedBoundary,\n                      task$jscomp$0.row,\n                      request$jscomp$0\n                    );\n                } catch (thrownValue) {\n                  resetHooksState();\n                  request$jscomp$0.children.length = childrenLength;\n                  request$jscomp$0.chunks.length = chunkLength;\n                  var x$jscomp$0 =\n                    thrownValue === SuspenseException\n                      ? getSuspendedThenable()\n                      : thrownValue;\n                  if (request.aborted)\n                    thrownValue === SuspenseException &&\n                      (task$jscomp$0.thenableState =\n                        getThenableStateAfterSuspending()),\n                      (request.currentTask = prevTask$jscomp$0),\n                      (request$jscomp$0 = request),\n                      abortTaskDEV(task$jscomp$0, request$jscomp$0),\n                      task$jscomp$0.abortSet.delete(task$jscomp$0),\n                      finishAbortedTaskDEV(\n                        task$jscomp$0,\n                        request$jscomp$0,\n                        request$jscomp$0.fatalError\n                      );\n                  else {\n                    if (\"object\" === typeof x$jscomp$0 && null !== x$jscomp$0) {\n                      if (\"function\" === typeof x$jscomp$0.then) {\n                        request$jscomp$0.status = PENDING;\n                        task$jscomp$0.thenableState =\n                          thrownValue === SuspenseException\n                            ? getThenableStateAfterSuspending()\n                            : null;\n                        var ping$jscomp$0 = task$jscomp$0.ping;\n                        x$jscomp$0.then(\n                          ping$jscomp$0.resolve,\n                          ping$jscomp$0.reject\n                        );\n                        break a;\n                      }\n                      if (\n                        \"Maximum call stack size exceeded\" ===\n                          x$jscomp$0.message &&\n                        task$jscomp$0.node !== startNode$jscomp$0\n                      ) {\n                        request$jscomp$0.status = PENDING;\n                        task$jscomp$0.thenableState = null;\n                        request.pingedTasks.push(task$jscomp$0);\n                        break a;\n                      }\n                    }\n                    var errorInfo$jscomp$1 = getThrownInfo(\n                      task$jscomp$0.componentStack\n                    );\n                    task$jscomp$0.abortSet.delete(task$jscomp$0);\n                    request$jscomp$0.status = ERRORED;\n                    var boundary$jscomp$0 = task$jscomp$0.blockedBoundary,\n                      row = task$jscomp$0.row,\n                      debugTask = task$jscomp$0.debugTask;\n                    null !== row &&\n                      0 === --row.pendingTasks &&\n                      finishSuspenseListRow(request, row);\n                    request.allPendingTasks--;\n                    if (null === boundary$jscomp$0)\n                      if (x$jscomp$0 === RecoverableException) {\n                        if (null === suspendedRecoverableError)\n                          throw Error(\n                            \"Expected a suspended recoverable. This is a bug in React. Please file an issue.\"\n                          );\n                        task$jscomp$0 = suspendedRecoverableError;\n                        suspendedRecoverableError = null;\n                        var useError = task$jscomp$0;\n                        logRecoverableError(\n                          request,\n                          useError,\n                          errorInfo$jscomp$1,\n                          debugTask\n                        );\n                        fatalError(\n                          request,\n                          useError,\n                          errorInfo$jscomp$1,\n                          debugTask\n                        );\n                      } else\n                        logRecoverableError(\n                          request,\n                          x$jscomp$0,\n                          errorInfo$jscomp$1,\n                          debugTask\n                        ),\n                          fatalError(\n                            request,\n                            x$jscomp$0,\n                            errorInfo$jscomp$1,\n                            debugTask\n                          );\n                    else {\n                      var errorDigest$jscomp$0 = logRecoverableError(\n                        request,\n                        x$jscomp$0,\n                        errorInfo$jscomp$1,\n                        debugTask\n                      );\n                      boundary$jscomp$0.pendingTasks--;\n                      if (boundary$jscomp$0.status !== CLIENT_RENDERED) {\n                        boundary$jscomp$0.status = CLIENT_RENDERED;\n                        encodeErrorForBoundary(\n                          boundary$jscomp$0,\n                          errorDigest$jscomp$0,\n                          x$jscomp$0,\n                          errorInfo$jscomp$1,\n                          !1\n                        );\n                        untrackBoundary(request, boundary$jscomp$0);\n                        var boundaryRow = boundary$jscomp$0.row;\n                        null !== boundaryRow &&\n                          (request.allPendingTasks++,\n                          0 === --boundaryRow.pendingTasks &&\n                            finishSuspenseListRow(request, boundaryRow),\n                          request.allPendingTasks--);\n                        boundary$jscomp$0.parentFlushed &&\n                          request.clientRenderedBoundaries.push(\n                            boundary$jscomp$0\n                          );\n                        0 === request.pendingRootTasks &&\n                          null === request.trackedPostpones &&\n                          null !== boundary$jscomp$0.preamble &&\n                          preparePreamble(request);\n                      }\n                      0 === request.allPendingTasks && completeAll(request);\n                    }\n                  }\n                } finally {\n                  (request.currentTask = prevTask$jscomp$0),\n                    (currentTaskInDEV = prevTaskInDEV);\n                }\n              }\n          }\n          pingedTasks.splice(0, i);\n          null !== request$jscomp$1.destination &&\n            flushCompletedQueues(\n              request$jscomp$1,\n              request$jscomp$1.destination\n            );\n        } catch (error) {\n          (pingedTasks = {}),\n            logRecoverableError(request$jscomp$1, error, pingedTasks, null),\n            fatalError(request$jscomp$1, error, pingedTasks, null);\n        } finally {\n          (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest);\n        }\n      }\n    }\n    function preparePreambleFromSubtree(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      segment.preambleChildren.length &&\n        collectedPreambleSegments.push(segment.preambleChildren);\n      for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)\n        pendingPreambles =\n          preparePreambleFromSegment(\n            request,\n            segment.children[i],\n            collectedPreambleSegments\n          ) || pendingPreambles;\n      return pendingPreambles;\n    }\n    function preparePreambleFromSegment(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return preparePreambleFromSubtree(\n          request,\n          segment,\n          collectedPreambleSegments\n        );\n      var preamble = boundary.preamble;\n      if (null === preamble) return !1;\n      switch (boundary.status) {\n        case COMPLETED:\n          hoistPreambleState(request.renderState, preamble.content);\n          request.byteSize += boundary.byteSize;\n          segment = boundary.completedSegments[0];\n          if (!segment)\n            throw Error(\n              \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n            );\n          return preparePreambleFromSubtree(\n            request,\n            segment,\n            collectedPreambleSegments\n          );\n        case POSTPONED:\n          if (null !== request.trackedPostpones) return !0;\n        case CLIENT_RENDERED:\n          if (segment.status === COMPLETED)\n            return (\n              hoistPreambleState(request.renderState, preamble.fallback),\n              preparePreambleFromSubtree(\n                request,\n                segment,\n                collectedPreambleSegments\n              )\n            );\n        default:\n          return !0;\n      }\n    }\n    function preparePreamble(request) {\n      if (\n        request.completedRootSegment &&\n        null === request.completedPreambleSegments\n      ) {\n        var collectedPreambleSegments = [],\n          originalRequestByteSize = request.byteSize,\n          hasPendingPreambles = preparePreambleFromSegment(\n            request,\n            request.completedRootSegment,\n            collectedPreambleSegments\n          ),\n          preamble = request.renderState.preamble;\n        !1 === hasPendingPreambles ||\n        (preamble.headChunks && preamble.bodyChunks)\n          ? (request.completedPreambleSegments = collectedPreambleSegments)\n          : (request.byteSize = originalRequestByteSize);\n      }\n    }\n    function flushSubtree(request, destination, segment, hoistableState) {\n      segment.parentFlushed = !0;\n      switch (segment.status) {\n        case PENDING:\n          segment.id = request.nextSegmentId++;\n        case POSTPONED:\n          return (\n            (hoistableState = segment.id),\n            (segment.lastPushedText = !1),\n            (segment.textEmbedded = !1),\n            (request = request.renderState),\n            writeChunk(destination, placeholder1),\n            writeChunk(destination, request.placeholderPrefix),\n            (request = hoistableState.toString(16)),\n            writeChunk(destination, request),\n            writeChunkAndReturn(destination, placeholder2)\n          );\n        case COMPLETED:\n          segment.status = FLUSHED;\n          var r = !0,\n            chunks = segment.chunks,\n            chunkIdx = 0;\n          segment = segment.children;\n          for (var childIdx = 0; childIdx < segment.length; childIdx++) {\n            for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)\n              writeChunk(destination, chunks[chunkIdx]);\n            r = flushSegment(request, destination, r, hoistableState);\n          }\n          for (; chunkIdx < chunks.length - 1; chunkIdx++)\n            writeChunk(destination, chunks[chunkIdx]);\n          chunkIdx < chunks.length &&\n            (r = writeChunkAndReturn(destination, chunks[chunkIdx]));\n          return r;\n        case ABORTED:\n          return !0;\n        default:\n          throw Error(\n            \"Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.\"\n          );\n      }\n    }\n    function flushSegment(request, destination, segment, hoistableState) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return flushSubtree(request, destination, segment, hoistableState);\n      segment.boundary = null;\n      boundary.parentFlushed = !0;\n      if (boundary.status === CLIENT_RENDERED) {\n        var row = boundary.row;\n        null !== row &&\n          0 === --row.pendingTasks &&\n          finishSuspenseListRow(request, row);\n        row = boundary.errorDigest;\n        var errorMessage = boundary.errorMessage,\n          errorStack = boundary.errorStack;\n        boundary = boundary.errorComponentStack;\n        writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n        writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n        null != row &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),\n          writeChunk(destination, escapeTextForBrowser(row)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorMessage &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1B),\n          writeChunk(destination, escapeTextForBrowser(errorMessage)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorStack &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1C),\n          writeChunk(destination, escapeTextForBrowser(errorStack)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        boundary &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1D),\n          writeChunk(destination, escapeTextForBrowser(boundary)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n        flushSubtree(request, destination, segment, hoistableState);\n      } else if (boundary.status !== COMPLETED)\n        boundary.status === PENDING &&\n          (boundary.rootSegmentID = request.nextSegmentId++),\n          0 < boundary.completedSegments.length &&\n            request.partialBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          hoistableState &&\n            hoistHoistables(hoistableState, boundary.fallbackState),\n          flushSubtree(request, destination, segment, hoistableState);\n      else if (\n        !flushingPartialBoundaries &&\n        isEligibleForOutlining(request, boundary) &&\n        (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||\n          hasSuspenseyContent(boundary.contentState, flushingShell) ||\n          boundary.defer)\n      )\n        (boundary.rootSegmentID = request.nextSegmentId++),\n          request.completedBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          flushSubtree(request, destination, segment, hoistableState);\n      else {\n        flushedByteSize += boundary.byteSize;\n        hoistableState &&\n          hoistHoistables(hoistableState, boundary.contentState);\n        segment = boundary.row;\n        null !== segment &&\n          isEligibleForOutlining(request, boundary) &&\n          0 === --segment.pendingTasks &&\n          finishSuspenseListRow(request, segment);\n        writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n        segment = boundary.completedSegments;\n        if (1 !== segment.length)\n          throw Error(\n            \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n          );\n        flushSegment(request, destination, segment[0], hoistableState);\n      }\n      return writeChunkAndReturn(destination, endSuspenseBoundary);\n    }\n    function flushSegmentContainer(\n      request,\n      destination,\n      segment,\n      hoistableState\n    ) {\n      writeStartSegment(\n        destination,\n        request.renderState,\n        segment.parentFormatContext,\n        segment.id\n      );\n      flushSegment(request, destination, segment, hoistableState);\n      return writeEndSegment(destination, segment.parentFormatContext);\n    }\n    function flushCompletedBoundary(request, destination, boundary) {\n      flushedByteSize = boundary.byteSize;\n      for (\n        var completedSegments = boundary.completedSegments, i = 0;\n        i < completedSegments.length;\n        i++\n      )\n        flushPartiallyCompletedSegment(\n          request,\n          destination,\n          boundary,\n          completedSegments[i]\n        );\n      completedSegments.length = 0;\n      completedSegments = boundary.row;\n      null !== completedSegments &&\n        isEligibleForOutlining(request, boundary) &&\n        0 === --completedSegments.pendingTasks &&\n        finishSuspenseListRow(request, completedSegments);\n      writeHoistablesForBoundary(\n        destination,\n        boundary.contentState,\n        request.renderState\n      );\n      completedSegments = request.resumableState;\n      request = request.renderState;\n      i = boundary.rootSegmentID;\n      boundary = boundary.contentState;\n      var requiresStyleInsertion = request.stylesToHoist,\n        requiresViewTransitions =\n          (completedSegments.instructions & NeedUpgradeToViewTransitions) !==\n          NothingSent;\n      request.stylesToHoist = !1;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      requiresStyleInsertion\n        ? ((completedSegments.instructions & SentClientRenderFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentClientRenderFunction),\n            writeChunk(destination, clientRenderScriptFunctionOnly)),\n          (completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          requiresViewTransitions &&\n            (completedSegments.instructions & SentUpgradeToViewTransitions) ===\n              NothingSent &&\n            ((completedSegments.instructions |= SentUpgradeToViewTransitions),\n            writeChunk(\n              destination,\n              completeBoundaryUpgradeToViewTransitionsInstruction\n            )),\n          (completedSegments.instructions & SentStyleInsertionFunction) ===\n          NothingSent\n            ? ((completedSegments.instructions |= SentStyleInsertionFunction),\n              writeChunk(\n                destination,\n                completeBoundaryWithStylesScript1FullPartial\n              ))\n            : writeChunk(destination, completeBoundaryWithStylesScript1Partial))\n        : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          requiresViewTransitions &&\n            (completedSegments.instructions & SentUpgradeToViewTransitions) ===\n              NothingSent &&\n            ((completedSegments.instructions |= SentUpgradeToViewTransitions),\n            writeChunk(\n              destination,\n              completeBoundaryUpgradeToViewTransitionsInstruction\n            )),\n          writeChunk(destination, completeBoundaryScript1Partial));\n      completedSegments = i.toString(16);\n      writeChunk(destination, request.boundaryPrefix);\n      writeChunk(destination, completedSegments);\n      writeChunk(destination, completeBoundaryScript2);\n      writeChunk(destination, request.segmentPrefix);\n      writeChunk(destination, completedSegments);\n      requiresStyleInsertion\n        ? (writeChunk(destination, completeBoundaryScript3a),\n          writeStyleResourceDependenciesInJS(destination, boundary))\n        : writeChunk(destination, completeBoundaryScript3b);\n      boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);\n      return writeBootstrap(destination, request) && boundary;\n    }\n    function flushPartiallyCompletedSegment(\n      request,\n      destination,\n      boundary,\n      segment\n    ) {\n      if (segment.status === FLUSHED) return !0;\n      var hoistableState = boundary.contentState,\n        segmentID = segment.id;\n      if (-1 === segmentID) {\n        if (-1 === (segment.id = boundary.rootSegmentID))\n          throw Error(\n            \"A root segment ID must have been assigned by now. This is a bug in React.\"\n          );\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      }\n      if (segmentID === boundary.rootSegmentID)\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      flushSegmentContainer(request, destination, segment, hoistableState);\n      boundary = request.resumableState;\n      request = request.renderState;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent\n        ? ((boundary.instructions |= SentCompleteSegmentFunction),\n          writeChunk(destination, completeSegmentScript1Full))\n        : writeChunk(destination, completeSegmentScript1Partial);\n      writeChunk(destination, request.segmentPrefix);\n      segmentID = segmentID.toString(16);\n      writeChunk(destination, segmentID);\n      writeChunk(destination, completeSegmentScript2);\n      writeChunk(destination, request.placeholderPrefix);\n      writeChunk(destination, segmentID);\n      destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);\n      return destination;\n    }\n    function flushCompletedQueues(request, destination) {\n      currentView = new Uint8Array(4096);\n      writtenBytes = 0;\n      destinationHasCapacity$1 = !0;\n      try {\n        if (!(0 < request.pendingRootTasks)) {\n          var i,\n            completedRootSegment = request.completedRootSegment;\n          if (null !== completedRootSegment) {\n            if (completedRootSegment.status === POSTPONED) return;\n            var completedPreambleSegments = request.completedPreambleSegments;\n            if (null === completedPreambleSegments) return;\n            flushedByteSize = request.byteSize;\n            var resumableState = request.resumableState,\n              renderState = request.renderState,\n              preamble = renderState.preamble,\n              htmlChunks = preamble.htmlChunks,\n              headChunks = preamble.headChunks,\n              i$jscomp$0;\n            if (htmlChunks) {\n              for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)\n                writeChunk(destination, htmlChunks[i$jscomp$0]);\n              if (headChunks)\n                for (\n                  i$jscomp$0 = 0;\n                  i$jscomp$0 < headChunks.length;\n                  i$jscomp$0++\n                )\n                  writeChunk(destination, headChunks[i$jscomp$0]);\n              else\n                writeChunk(destination, startChunkForTag(\"head\")),\n                  writeChunk(destination, endOfStartTag);\n            } else if (headChunks)\n              for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)\n                writeChunk(destination, headChunks[i$jscomp$0]);\n            var charsetChunks = renderState.charsetChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < charsetChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, charsetChunks[i$jscomp$0]);\n            charsetChunks.length = 0;\n            renderState.preconnects.forEach(flushResource, destination);\n            renderState.preconnects.clear();\n            var viewportChunks = renderState.viewportChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < viewportChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, viewportChunks[i$jscomp$0]);\n            viewportChunks.length = 0;\n            renderState.fontPreloads.forEach(flushResource, destination);\n            renderState.fontPreloads.clear();\n            renderState.highImagePreloads.forEach(flushResource, destination);\n            renderState.highImagePreloads.clear();\n            currentlyFlushingRenderState = renderState;\n            renderState.styles.forEach(flushStylesInPreamble, destination);\n            currentlyFlushingRenderState = null;\n            var importMapChunks = renderState.importMapChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < importMapChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, importMapChunks[i$jscomp$0]);\n            importMapChunks.length = 0;\n            renderState.bootstrapScripts.forEach(flushResource, destination);\n            renderState.scripts.forEach(flushResource, destination);\n            renderState.scripts.clear();\n            renderState.bulkPreloads.forEach(flushResource, destination);\n            renderState.bulkPreloads.clear();\n            htmlChunks ||\n              headChunks ||\n              (resumableState.instructions |= SentCompletedShellId);\n            var hoistableChunks = renderState.hoistableChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < hoistableChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, hoistableChunks[i$jscomp$0]);\n            for (\n              resumableState = hoistableChunks.length = 0;\n              resumableState < completedPreambleSegments.length;\n              resumableState++\n            ) {\n              var segments = completedPreambleSegments[resumableState];\n              for (\n                renderState = 0;\n                renderState < segments.length;\n                renderState++\n              )\n                flushSegment(request, destination, segments[renderState], null);\n            }\n            var preamble$jscomp$0 = request.renderState.preamble,\n              headChunks$jscomp$0 = preamble$jscomp$0.headChunks;\n            (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&\n              writeChunk(destination, endChunkForTag(\"head\"));\n            var bodyChunks = preamble$jscomp$0.bodyChunks;\n            if (bodyChunks)\n              for (\n                completedPreambleSegments = 0;\n                completedPreambleSegments < bodyChunks.length;\n                completedPreambleSegments++\n              )\n                writeChunk(destination, bodyChunks[completedPreambleSegments]);\n            flushingShell = !0;\n            flushSegment(request, destination, completedRootSegment, null);\n            flushingShell = !1;\n            request.completedRootSegment = null;\n            var renderState$jscomp$0 = request.renderState;\n            if (\n              0 !== request.allPendingTasks ||\n              0 !== request.clientRenderedBoundaries.length ||\n              0 !== request.completedBoundaries.length ||\n              (null !== request.trackedPostpones &&\n                (0 !== request.trackedPostpones.rootNodes.length ||\n                  null !== request.trackedPostpones.rootSlots))\n            ) {\n              var resumableState$jscomp$0 = request.resumableState;\n              if (\n                (resumableState$jscomp$0.instructions & SentMarkShellTime) ===\n                NothingSent\n              ) {\n                resumableState$jscomp$0.instructions |= SentMarkShellTime;\n                writeChunk(destination, renderState$jscomp$0.startInlineScript);\n                if (\n                  (resumableState$jscomp$0.instructions &\n                    SentCompletedShellId) ===\n                  NothingSent\n                ) {\n                  resumableState$jscomp$0.instructions |= SentCompletedShellId;\n                  var shellId = \"_\" + resumableState$jscomp$0.idPrefix + \"R_\";\n                  writeChunk(destination, completedShellIdAttributeStart);\n                  writeChunk(destination, escapeTextForBrowser(shellId));\n                  writeChunk(destination, attributeEnd);\n                }\n                writeChunk(destination, endOfStartTag);\n                writeChunk(destination, shellTimeRuntimeScript);\n                writeChunkAndReturn(destination, endInlineScript);\n              }\n            }\n            writeBootstrap(destination, renderState$jscomp$0);\n          }\n          var renderState$jscomp$1 = request.renderState;\n          completedRootSegment = 0;\n          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < viewportChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              viewportChunks$jscomp$0[completedRootSegment]\n            );\n          viewportChunks$jscomp$0.length = 0;\n          renderState$jscomp$1.preconnects.forEach(flushResource, destination);\n          renderState$jscomp$1.preconnects.clear();\n          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.fontPreloads.clear();\n          renderState$jscomp$1.highImagePreloads.forEach(\n            flushResource,\n            destination\n          );\n          renderState$jscomp$1.highImagePreloads.clear();\n          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);\n          renderState$jscomp$1.scripts.forEach(flushResource, destination);\n          renderState$jscomp$1.scripts.clear();\n          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.bulkPreloads.clear();\n          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < hoistableChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              hoistableChunks$jscomp$0[completedRootSegment]\n            );\n          hoistableChunks$jscomp$0.length = 0;\n          var clientRenderedBoundaries = request.clientRenderedBoundaries;\n          for (i = 0; i < clientRenderedBoundaries.length; i++) {\n            var boundary = clientRenderedBoundaries[i];\n            renderState$jscomp$1 = destination;\n            var resumableState$jscomp$1 = request.resumableState,\n              renderState$jscomp$2 = request.renderState,\n              id = boundary.rootSegmentID,\n              errorDigest = boundary.errorDigest,\n              errorMessage = boundary.errorMessage,\n              errorStack = boundary.errorStack,\n              errorComponentStack = boundary.errorComponentStack;\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.startInlineScript\n            );\n            writeChunk(renderState$jscomp$1, endOfStartTag);\n            (resumableState$jscomp$1.instructions &\n              SentClientRenderFunction) ===\n            NothingSent\n              ? ((resumableState$jscomp$1.instructions |=\n                  SentClientRenderFunction),\n                writeChunk(renderState$jscomp$1, clientRenderScript1Full))\n              : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.boundaryPrefix\n            );\n            writeChunk(renderState$jscomp$1, id.toString(16));\n            writeChunk(renderState$jscomp$1, clientRenderScript1A);\n            if (\n              null != errorDigest ||\n              errorMessage ||\n              errorStack ||\n              errorComponentStack\n            )\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                null == errorDigest\n                  ? writeChunk(\n                      renderState$jscomp$1,\n                      clientRenderErrorScriptNull\n                    )\n                  : writeChunk(\n                      renderState$jscomp$1,\n                      escapeJSStringsForInstructionScripts(errorDigest)\n                    );\n            if (errorMessage || errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  escapeJSStringsForInstructionScripts(errorMessage || \"\")\n                );\n            if (errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  escapeJSStringsForInstructionScripts(errorStack || \"\")\n                );\n            errorComponentStack &&\n              (writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n              writeChunk(\n                renderState$jscomp$1,\n                escapeJSStringsForInstructionScripts(errorComponentStack)\n              ));\n            var JSCompiler_inline_result = writeChunkAndReturn(\n              renderState$jscomp$1,\n              clientRenderScriptEnd\n            );\n            if (!JSCompiler_inline_result) {\n              request.destination = null;\n              i++;\n              clientRenderedBoundaries.splice(0, i);\n              return;\n            }\n          }\n          clientRenderedBoundaries.splice(0, i);\n          var completedBoundaries = request.completedBoundaries;\n          for (i = 0; i < completedBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(\n                request,\n                destination,\n                completedBoundaries[i]\n              )\n            ) {\n              request.destination = null;\n              i++;\n              completedBoundaries.splice(0, i);\n              return;\n            }\n          completedBoundaries.splice(0, i);\n          completeWriting(destination);\n          currentView = new Uint8Array(4096);\n          writtenBytes = 0;\n          flushingPartialBoundaries = destinationHasCapacity$1 = !0;\n          var partialBoundaries = request.partialBoundaries;\n          for (i = 0; i < partialBoundaries.length; i++) {\n            a: {\n              clientRenderedBoundaries = request;\n              boundary = destination;\n              var boundary$jscomp$0 = partialBoundaries[i];\n              flushedByteSize = boundary$jscomp$0.byteSize;\n              var completedSegments = boundary$jscomp$0.completedSegments;\n              for (\n                JSCompiler_inline_result = 0;\n                JSCompiler_inline_result < completedSegments.length;\n                JSCompiler_inline_result++\n              )\n                if (\n                  !flushPartiallyCompletedSegment(\n                    clientRenderedBoundaries,\n                    boundary,\n                    boundary$jscomp$0,\n                    completedSegments[JSCompiler_inline_result]\n                  )\n                ) {\n                  JSCompiler_inline_result++;\n                  completedSegments.splice(0, JSCompiler_inline_result);\n                  var JSCompiler_inline_result$jscomp$0 = !1;\n                  break a;\n                }\n              completedSegments.splice(0, JSCompiler_inline_result);\n              var row = boundary$jscomp$0.row;\n              null !== row &&\n                row.together &&\n                1 === boundary$jscomp$0.pendingTasks &&\n                (1 === row.pendingTasks\n                  ? unblockSuspenseListRow(\n                      clientRenderedBoundaries,\n                      row,\n                      row.hoistables\n                    )\n                  : row.pendingTasks--);\n              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(\n                boundary,\n                boundary$jscomp$0.contentState,\n                clientRenderedBoundaries.renderState\n              );\n            }\n            if (!JSCompiler_inline_result$jscomp$0) {\n              request.destination = null;\n              i++;\n              partialBoundaries.splice(0, i);\n              return;\n            }\n          }\n          partialBoundaries.splice(0, i);\n          flushingPartialBoundaries = !1;\n          var largeBoundaries = request.completedBoundaries;\n          for (i = 0; i < largeBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(request, destination, largeBoundaries[i])\n            ) {\n              request.destination = null;\n              i++;\n              largeBoundaries.splice(0, i);\n              return;\n            }\n          largeBoundaries.splice(0, i);\n        }\n      } finally {\n        (flushingPartialBoundaries = !1),\n          (i = request.postponedState),\n          null !== i && (i.nextSegmentId = request.nextSegmentId),\n          0 === request.allPendingTasks &&\n          0 === request.clientRenderedBoundaries.length &&\n          0 === request.completedBoundaries.length\n            ? ((request.flushScheduled = !1),\n              (i = request.resumableState),\n              i.hasBody && writeChunk(destination, endChunkForTag(\"body\")),\n              i.hasHtml && writeChunk(destination, endChunkForTag(\"html\")),\n              completeWriting(destination),\n              flushBuffered(destination),\n              0 !== request.abortableTasks.size &&\n                console.error(\n                  \"There was still abortable task at the root when we closed. This is a bug in React.\"\n                ),\n              (request.status = CLOSED),\n              destination.end(),\n              (request.destination = null))\n            : (completeWriting(destination), flushBuffered(destination));\n      }\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      scheduleMicrotask(function () {\n        return requestStorage.run(request, performWork, request);\n      });\n      setImmediate(function () {\n        10 === request.status && (request.status = 11);\n        null === request.trackedPostpones &&\n          requestStorage.run(\n            request,\n            enqueueEarlyPreloadsAfterInitialWork,\n            request\n          );\n      });\n    }\n    function enqueueEarlyPreloadsAfterInitialWork(request) {\n      safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);\n    }\n    function enqueueFlush(request) {\n      !1 === request.flushScheduled &&\n        0 === request.pingedTasks.length &&\n        null !== request.destination &&\n        ((request.flushScheduled = !0),\n        setImmediate(function () {\n          var destination = request.destination;\n          destination\n            ? flushCompletedQueues(request, destination)\n            : (request.flushScheduled = !1);\n        }));\n    }\n    function startFlowing(request, destination) {\n      if (12 === request.status)\n        (request.status = CLOSED), destination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedQueues(request, destination);\n        } catch (error) {\n          (destination = {}),\n            logRecoverableError(request, error, destination, null),\n            fatalError(request, error, destination, null);\n        }\n      }\n    }\n    function finishAbort(request, abortableTasks) {\n      try {\n        if (0 < abortableTasks.size) {\n          var error = request.fatalError;\n          abortableTasks.forEach(function (task) {\n            return finishAbortedTaskDEV(task, request, error);\n          });\n          abortableTasks.clear();\n        }\n        null !== request.destination &&\n          flushCompletedQueues(request, request.destination);\n      } catch (error$4) {\n        (abortableTasks = {}),\n          logRecoverableError(request, error$4, abortableTasks, null),\n          fatalError(request, error$4, abortableTasks, null);\n      }\n    }\n    function abort(request, reason) {\n      if (\n        !(request.aborted || (11 !== request.status && 10 !== request.status))\n      ) {\n        request.aborted = !0;\n        request.fatalError =\n          void 0 === reason\n            ? Error(\"The render was aborted by the server without a reason.\")\n            : \"object\" === typeof reason &&\n                null !== reason &&\n                \"function\" === typeof reason.then\n              ? Error(\"The render was aborted by the server with a promise.\")\n              : reason;\n        var abortableTasks = request.abortableTasks;\n        abortableTasks.forEach(function (task) {\n          return abortTaskDEV(task, request);\n        });\n        setImmediate(function () {\n          return finishAbort(request, abortableTasks);\n        });\n      }\n    }\n    function addToReplayParent(node, parentKeyPath, trackedPostpones) {\n      if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);\n      else {\n        var workingMap = trackedPostpones.workingMap,\n          parentNode = workingMap.get(parentKeyPath);\n        void 0 === parentNode &&\n          ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),\n          workingMap.set(parentKeyPath, parentNode),\n          addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));\n        parentNode[2].push(node);\n      }\n    }\n    function getPostponedState(request) {\n      var trackedPostpones = request.trackedPostpones;\n      if (\n        null === trackedPostpones ||\n        (0 === trackedPostpones.rootNodes.length &&\n          null === trackedPostpones.rootSlots)\n      )\n        return (request.trackedPostpones = null);\n      var hasFlushableShell =\n        null === request.completedRootSegment ||\n        (request.completedRootSegment.status !== POSTPONED &&\n          null !== request.completedPreambleSegments);\n      if (hasFlushableShell) {\n        var nextSegmentId = request.nextSegmentId;\n        var replaySlots = trackedPostpones.rootSlots;\n        var resumableState = request.resumableState;\n        resumableState.bootstrapScriptContent = void 0;\n        resumableState.bootstrapScripts = void 0;\n        resumableState.bootstrapModules = void 0;\n      } else {\n        nextSegmentId = 0;\n        replaySlots = -1;\n        resumableState = request.resumableState;\n        var renderState = request.renderState;\n        resumableState.nextFormID = 0;\n        resumableState.hasBody = !1;\n        resumableState.hasHtml = !1;\n        resumableState.unknownResources = { font: renderState.resets.font };\n        resumableState.dnsResources = renderState.resets.dns;\n        resumableState.connectResources = renderState.resets.connect;\n        resumableState.imageResources = renderState.resets.image;\n        resumableState.styleResources = renderState.resets.style;\n        resumableState.scriptResources = {};\n        resumableState.moduleUnknownResources = {};\n        resumableState.moduleScriptResources = {};\n        resumableState.instructions = NothingSent;\n      }\n      trackedPostpones = {\n        nextSegmentId: nextSegmentId,\n        rootFormatContext: request.rootFormatContext,\n        progressiveChunkSize: request.progressiveChunkSize,\n        resumableState: request.resumableState,\n        replayNodes: trackedPostpones.rootNodes,\n        replaySlots: replaySlots\n      };\n      hasFlushableShell && (request.postponedState = trackedPostpones);\n      return trackedPostpones;\n    }\n    function ensureCorrectIsomorphicReactVersion() {\n      var isomorphicReactPackageVersion = React.version;\n      if (\"19.3.0-canary-cbb046ab-20260731\" !== isomorphicReactPackageVersion)\n        throw Error(\n          'Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\\n  - react:      ' +\n            (isomorphicReactPackageVersion +\n              \"\\n  - react-dom:  19.3.0-canary-cbb046ab-20260731\\nLearn more: https://react.dev/warnings/version-mismatch\")\n        );\n    }\n    function createDrainHandler(destination, request) {\n      return function () {\n        return startFlowing(request, destination);\n      };\n    }\n    function createCancelHandler(request, reason) {\n      return function () {\n        request.destination = null;\n        abort(request, Error(reason));\n      };\n    }\n    function createRequestImpl(children, options) {\n      var resumableState = createResumableState(\n        options ? options.identifierPrefix : void 0,\n        options ? options.unstable_externalRuntimeSrc : void 0,\n        options ? options.bootstrapScriptContent : void 0,\n        options ? options.bootstrapScripts : void 0,\n        options ? options.bootstrapModules : void 0\n      );\n      return createRequest(\n        children,\n        resumableState,\n        createRenderState(\n          resumableState,\n          options ? options.nonce : void 0,\n          options ? options.unstable_externalRuntimeSrc : void 0,\n          options ? options.importMap : void 0,\n          options ? options.onHeaders : void 0,\n          options ? options.maxHeadersLength : void 0\n        ),\n        createRootFormatContext(options ? options.namespaceURI : void 0),\n        options ? options.progressiveChunkSize : void 0,\n        options ? options.onError : void 0,\n        options ? options.onAllReady : void 0,\n        options ? options.onShellReady : void 0,\n        options ? options.onShellError : void 0,\n        void 0,\n        options ? options.formState : void 0\n      );\n    }\n    function createFakeWritableFromReadableStreamController$1(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function resumeRequestImpl(children, postponedState, options) {\n      return resumeRequest(\n        children,\n        postponedState,\n        createRenderState(\n          postponedState.resumableState,\n          options ? options.nonce : void 0,\n          void 0,\n          void 0,\n          void 0,\n          void 0\n        ),\n        options ? options.onError : void 0,\n        options ? options.onAllReady : void 0,\n        options ? options.onShellReady : void 0,\n        options ? options.onShellError : void 0,\n        void 0\n      );\n    }\n    function createFakeWritableFromReadableStreamController(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function createFakeWritableFromReadable(readable) {\n      return {\n        write: function (chunk) {\n          return readable.push(chunk);\n        },\n        end: function () {\n          readable.push(null);\n        },\n        destroy: function (error) {\n          readable.destroy(error);\n        }\n      };\n    }\n    var util = require(\"util\"),\n      crypto = require(\"crypto\"),\n      async_hooks = require(\"async_hooks\"),\n      React = require(\"next/dist/compiled/react\"),\n      ReactDOM = require(\"next/dist/compiled/react-dom\"),\n      stream = require(\"stream\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_SCOPE_TYPE = Symbol.for(\"react.scope\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_LEGACY_HIDDEN_TYPE = Symbol.for(\"react.legacy_hidden\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      isArrayImpl = Array.isArray,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      scheduleMicrotask = queueMicrotask,\n      currentView = null,\n      writtenBytes = 0,\n      destinationHasCapacity$1 = !0,\n      textEncoder = new util.TextEncoder(),\n      assign = Object.assign,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n        \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      illegalAttributeNameCache = {},\n      validatedAttributeNameCache = {},\n      unitlessNumbers = new Set(\n        \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n          \" \"\n        )\n      ),\n      aliases = new Map([\n        [\"acceptCharset\", \"accept-charset\"],\n        [\"htmlFor\", \"for\"],\n        [\"httpEquiv\", \"http-equiv\"],\n        [\"crossOrigin\", \"crossorigin\"],\n        [\"accentHeight\", \"accent-height\"],\n        [\"alignmentBaseline\", \"alignment-baseline\"],\n        [\"arabicForm\", \"arabic-form\"],\n        [\"baselineShift\", \"baseline-shift\"],\n        [\"capHeight\", \"cap-height\"],\n        [\"clipPath\", \"clip-path\"],\n        [\"clipRule\", \"clip-rule\"],\n        [\"colorInterpolation\", \"color-interpolation\"],\n        [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n        [\"colorProfile\", \"color-profile\"],\n        [\"colorRendering\", \"color-rendering\"],\n        [\"dominantBaseline\", \"dominant-baseline\"],\n        [\"enableBackground\", \"enable-background\"],\n        [\"fillOpacity\", \"fill-opacity\"],\n        [\"fillRule\", \"fill-rule\"],\n        [\"floodColor\", \"flood-color\"],\n        [\"floodOpacity\", \"flood-opacity\"],\n        [\"fontFamily\", \"font-family\"],\n        [\"fontSize\", \"font-size\"],\n        [\"fontSizeAdjust\", \"font-size-adjust\"],\n        [\"fontStretch\", \"font-stretch\"],\n        [\"fontStyle\", \"font-style\"],\n        [\"fontVariant\", \"font-variant\"],\n        [\"fontWeight\", \"font-weight\"],\n        [\"glyphName\", \"glyph-name\"],\n        [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n        [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n        [\"horizAdvX\", \"horiz-adv-x\"],\n        [\"horizOriginX\", \"horiz-origin-x\"],\n        [\"imageRendering\", \"image-rendering\"],\n        [\"letterSpacing\", \"letter-spacing\"],\n        [\"lightingColor\", \"lighting-color\"],\n        [\"markerEnd\", \"marker-end\"],\n        [\"markerMid\", \"marker-mid\"],\n        [\"markerStart\", \"marker-start\"],\n        [\"maskType\", \"mask-type\"],\n        [\"overlinePosition\", \"overline-position\"],\n        [\"overlineThickness\", \"overline-thickness\"],\n        [\"paintOrder\", \"paint-order\"],\n        [\"panose-1\", \"panose-1\"],\n        [\"pointerEvents\", \"pointer-events\"],\n        [\"renderingIntent\", \"rendering-intent\"],\n        [\"shapeRendering\", \"shape-rendering\"],\n        [\"stopColor\", \"stop-color\"],\n        [\"stopOpacity\", \"stop-opacity\"],\n        [\"strikethroughPosition\", \"strikethrough-position\"],\n        [\"strikethroughThickness\", \"strikethrough-thickness\"],\n        [\"strokeDasharray\", \"stroke-dasharray\"],\n        [\"strokeDashoffset\", \"stroke-dashoffset\"],\n        [\"strokeLinecap\", \"stroke-linecap\"],\n        [\"strokeLinejoin\", \"stroke-linejoin\"],\n        [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n        [\"strokeOpacity\", \"stroke-opacity\"],\n        [\"strokeWidth\", \"stroke-width\"],\n        [\"textAnchor\", \"text-anchor\"],\n        [\"textDecoration\", \"text-decoration\"],\n        [\"textRendering\", \"text-rendering\"],\n        [\"transformOrigin\", \"transform-origin\"],\n        [\"underlinePosition\", \"underline-position\"],\n        [\"underlineThickness\", \"underline-thickness\"],\n        [\"unicodeBidi\", \"unicode-bidi\"],\n        [\"unicodeRange\", \"unicode-range\"],\n        [\"unitsPerEm\", \"units-per-em\"],\n        [\"vAlphabetic\", \"v-alphabetic\"],\n        [\"vHanging\", \"v-hanging\"],\n        [\"vIdeographic\", \"v-ideographic\"],\n        [\"vMathematical\", \"v-mathematical\"],\n        [\"vectorEffect\", \"vector-effect\"],\n        [\"vertAdvY\", \"vert-adv-y\"],\n        [\"vertOriginX\", \"vert-origin-x\"],\n        [\"vertOriginY\", \"vert-origin-y\"],\n        [\"wordSpacing\", \"word-spacing\"],\n        [\"writingMode\", \"writing-mode\"],\n        [\"xmlnsXlink\", \"xmlns:xlink\"],\n        [\"xHeight\", \"x-height\"]\n      ]),\n      hasReadOnlyValue = {\n        button: !0,\n        checkbox: !0,\n        image: !0,\n        hidden: !0,\n        radio: !0,\n        reset: !0,\n        submit: !0\n      },\n      ariaProperties = {\n        \"aria-current\": 0,\n        \"aria-description\": 0,\n        \"aria-details\": 0,\n        \"aria-disabled\": 0,\n        \"aria-hidden\": 0,\n        \"aria-invalid\": 0,\n        \"aria-keyshortcuts\": 0,\n        \"aria-label\": 0,\n        \"aria-roledescription\": 0,\n        \"aria-autocomplete\": 0,\n        \"aria-checked\": 0,\n        \"aria-expanded\": 0,\n        \"aria-haspopup\": 0,\n        \"aria-level\": 0,\n        \"aria-modal\": 0,\n        \"aria-multiline\": 0,\n        \"aria-multiselectable\": 0,\n        \"aria-orientation\": 0,\n        \"aria-placeholder\": 0,\n        \"aria-pressed\": 0,\n        \"aria-readonly\": 0,\n        \"aria-required\": 0,\n        \"aria-selected\": 0,\n        \"aria-sort\": 0,\n        \"aria-valuemax\": 0,\n        \"aria-valuemin\": 0,\n        \"aria-valuenow\": 0,\n        \"aria-valuetext\": 0,\n        \"aria-atomic\": 0,\n        \"aria-busy\": 0,\n        \"aria-live\": 0,\n        \"aria-relevant\": 0,\n        \"aria-dropeffect\": 0,\n        \"aria-grabbed\": 0,\n        \"aria-activedescendant\": 0,\n        \"aria-colcount\": 0,\n        \"aria-colindex\": 0,\n        \"aria-colspan\": 0,\n        \"aria-controls\": 0,\n        \"aria-describedby\": 0,\n        \"aria-errormessage\": 0,\n        \"aria-flowto\": 0,\n        \"aria-labelledby\": 0,\n        \"aria-owns\": 0,\n        \"aria-posinset\": 0,\n        \"aria-rowcount\": 0,\n        \"aria-rowindex\": 0,\n        \"aria-rowspan\": 0,\n        \"aria-setsize\": 0,\n        \"aria-braillelabel\": 0,\n        \"aria-brailleroledescription\": 0,\n        \"aria-colindextext\": 0,\n        \"aria-rowindextext\": 0\n      },\n      warnedProperties$1 = {},\n      rARIA$1 = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel$1 = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      didWarnValueNull = !1,\n      possibleStandardNames = {\n        accept: \"accept\",\n        acceptcharset: \"acceptCharset\",\n        \"accept-charset\": \"acceptCharset\",\n        accesskey: \"accessKey\",\n        action: \"action\",\n        allowfullscreen: \"allowFullScreen\",\n        alt: \"alt\",\n        as: \"as\",\n        async: \"async\",\n        autocapitalize: \"autoCapitalize\",\n        autocomplete: \"autoComplete\",\n        autocorrect: \"autoCorrect\",\n        autofocus: \"autoFocus\",\n        autoplay: \"autoPlay\",\n        autosave: \"autoSave\",\n        capture: \"capture\",\n        cellpadding: \"cellPadding\",\n        cellspacing: \"cellSpacing\",\n        challenge: \"challenge\",\n        charset: \"charSet\",\n        checked: \"checked\",\n        children: \"children\",\n        cite: \"cite\",\n        class: \"className\",\n        classid: \"classID\",\n        classname: \"className\",\n        cols: \"cols\",\n        colspan: \"colSpan\",\n        content: \"content\",\n        contenteditable: \"contentEditable\",\n        contextmenu: \"contextMenu\",\n        controls: \"controls\",\n        controlslist: \"controlsList\",\n        coords: \"coords\",\n        credentialless: \"credentialless\",\n        crossorigin: \"crossOrigin\",\n        dangerouslysetinnerhtml: \"dangerouslySetInnerHTML\",\n        data: \"data\",\n        datetime: \"dateTime\",\n        default: \"default\",\n        defaultchecked: \"defaultChecked\",\n        defaultvalue: \"defaultValue\",\n        defer: \"defer\",\n        dir: \"dir\",\n        disabled: \"disabled\",\n        disablepictureinpicture: \"disablePictureInPicture\",\n        disableremoteplayback: \"disableRemotePlayback\",\n        download: \"download\",\n        draggable: \"draggable\",\n        enctype: \"encType\",\n        enterkeyhint: \"enterKeyHint\",\n        fetchpriority: \"fetchPriority\",\n        for: \"htmlFor\",\n        form: \"form\",\n        formmethod: \"formMethod\",\n        formaction: \"formAction\",\n        formenctype: \"formEncType\",\n        formnovalidate: \"formNoValidate\",\n        formtarget: \"formTarget\",\n        frameborder: \"frameBorder\",\n        headers: \"headers\",\n        height: \"height\",\n        hidden: \"hidden\",\n        high: \"high\",\n        href: \"href\",\n        hreflang: \"hrefLang\",\n        htmlfor: \"htmlFor\",\n        httpequiv: \"httpEquiv\",\n        \"http-equiv\": \"httpEquiv\",\n        icon: \"icon\",\n        id: \"id\",\n        imagesizes: \"imageSizes\",\n        imagesrcset: \"imageSrcSet\",\n        inert: \"inert\",\n        innerhtml: \"innerHTML\",\n        inputmode: \"inputMode\",\n        integrity: \"integrity\",\n        is: \"is\",\n        itemid: \"itemID\",\n        itemprop: \"itemProp\",\n        itemref: \"itemRef\",\n        itemscope: \"itemScope\",\n        itemtype: \"itemType\",\n        keyparams: \"keyParams\",\n        keytype: \"keyType\",\n        kind: \"kind\",\n        label: \"label\",\n        lang: \"lang\",\n        list: \"list\",\n        loop: \"loop\",\n        low: \"low\",\n        manifest: \"manifest\",\n        marginwidth: \"marginWidth\",\n        marginheight: \"marginHeight\",\n        max: \"max\",\n        maxlength: \"maxLength\",\n        media: \"media\",\n        mediagroup: \"mediaGroup\",\n        method: \"method\",\n        min: \"min\",\n        minlength: \"minLength\",\n        multiple: \"multiple\",\n        muted: \"muted\",\n        name: \"name\",\n        nomodule: \"noModule\",\n        nonce: \"nonce\",\n        novalidate: \"noValidate\",\n        open: \"open\",\n        optimum: \"optimum\",\n        pattern: \"pattern\",\n        placeholder: \"placeholder\",\n        playsinline: \"playsInline\",\n        poster: \"poster\",\n        preload: \"preload\",\n        profile: \"profile\",\n        radiogroup: \"radioGroup\",\n        readonly: \"readOnly\",\n        referrerpolicy: \"referrerPolicy\",\n        rel: \"rel\",\n        required: \"required\",\n        reversed: \"reversed\",\n        role: \"role\",\n        rows: \"rows\",\n        rowspan: \"rowSpan\",\n        sandbox: \"sandbox\",\n        scope: \"scope\",\n        scoped: \"scoped\",\n        scrolling: \"scrolling\",\n        seamless: \"seamless\",\n        selected: \"selected\",\n        shape: \"shape\",\n        size: \"size\",\n        sizes: \"sizes\",\n        span: \"span\",\n        spellcheck: \"spellCheck\",\n        src: \"src\",\n        srcdoc: \"srcDoc\",\n        srclang: \"srcLang\",\n        srcset: \"srcSet\",\n        start: \"start\",\n        step: \"step\",\n        style: \"style\",\n        summary: \"summary\",\n        tabindex: \"tabIndex\",\n        target: \"target\",\n        title: \"title\",\n        type: \"type\",\n        usemap: \"useMap\",\n        value: \"value\",\n        width: \"width\",\n        wmode: \"wmode\",\n        wrap: \"wrap\",\n        about: \"about\",\n        accentheight: \"accentHeight\",\n        \"accent-height\": \"accentHeight\",\n        accumulate: \"accumulate\",\n        additive: \"additive\",\n        alignmentbaseline: \"alignmentBaseline\",\n        \"alignment-baseline\": \"alignmentBaseline\",\n        allowreorder: \"allowReorder\",\n        alphabetic: \"alphabetic\",\n        amplitude: \"amplitude\",\n        arabicform: \"arabicForm\",\n        \"arabic-form\": \"arabicForm\",\n        ascent: \"ascent\",\n        attributename: \"attributeName\",\n        attributetype: \"attributeType\",\n        autoreverse: \"autoReverse\",\n        azimuth: \"azimuth\",\n        basefrequency: \"baseFrequency\",\n        baselineshift: \"baselineShift\",\n        \"baseline-shift\": \"baselineShift\",\n        baseprofile: \"baseProfile\",\n        bbox: \"bbox\",\n        begin: \"begin\",\n        bias: \"bias\",\n        by: \"by\",\n        calcmode: \"calcMode\",\n        capheight: \"capHeight\",\n        \"cap-height\": \"capHeight\",\n        clip: \"clip\",\n        clippath: \"clipPath\",\n        \"clip-path\": \"clipPath\",\n        clippathunits: \"clipPathUnits\",\n        cliprule: \"clipRule\",\n        \"clip-rule\": \"clipRule\",\n        color: \"color\",\n        colorinterpolation: \"colorInterpolation\",\n        \"color-interpolation\": \"colorInterpolation\",\n        colorinterpolationfilters: \"colorInterpolationFilters\",\n        \"color-interpolation-filters\": \"colorInterpolationFilters\",\n        colorprofile: \"colorProfile\",\n        \"color-profile\": \"colorProfile\",\n        colorrendering: \"colorRendering\",\n        \"color-rendering\": \"colorRendering\",\n        contentscripttype: \"contentScriptType\",\n        contentstyletype: \"contentStyleType\",\n        cursor: \"cursor\",\n        cx: \"cx\",\n        cy: \"cy\",\n        d: \"d\",\n        datatype: \"datatype\",\n        decelerate: \"decelerate\",\n        descent: \"descent\",\n        diffuseconstant: \"diffuseConstant\",\n        direction: \"direction\",\n        display: \"display\",\n        divisor: \"divisor\",\n        dominantbaseline: \"dominantBaseline\",\n        \"dominant-baseline\": \"dominantBaseline\",\n        dur: \"dur\",\n        dx: \"dx\",\n        dy: \"dy\",\n        edgemode: \"edgeMode\",\n        elevation: \"elevation\",\n        enablebackground: \"enableBackground\",\n        \"enable-background\": \"enableBackground\",\n        end: \"end\",\n        exponent: \"exponent\",\n        externalresourcesrequired: \"externalResourcesRequired\",\n        fill: \"fill\",\n        fillopacity: \"fillOpacity\",\n        \"fill-opacity\": \"fillOpacity\",\n        fillrule: \"fillRule\",\n        \"fill-rule\": \"fillRule\",\n        filter: \"filter\",\n        filterres: \"filterRes\",\n        filterunits: \"filterUnits\",\n        floodopacity: \"floodOpacity\",\n        \"flood-opacity\": \"floodOpacity\",\n        floodcolor: \"floodColor\",\n        \"flood-color\": \"floodColor\",\n        focusable: \"focusable\",\n        fontfamily: \"fontFamily\",\n        \"font-family\": \"fontFamily\",\n        fontsize: \"fontSize\",\n        \"font-size\": \"fontSize\",\n        fontsizeadjust: \"fontSizeAdjust\",\n        \"font-size-adjust\": \"fontSizeAdjust\",\n        fontstretch: \"fontStretch\",\n        \"font-stretch\": \"fontStretch\",\n        fontstyle: \"fontStyle\",\n        \"font-style\": \"fontStyle\",\n        fontvariant: \"fontVariant\",\n        \"font-variant\": \"fontVariant\",\n        fontweight: \"fontWeight\",\n        \"font-weight\": \"fontWeight\",\n        format: \"format\",\n        from: \"from\",\n        fx: \"fx\",\n        fy: \"fy\",\n        g1: \"g1\",\n        g2: \"g2\",\n        glyphname: \"glyphName\",\n        \"glyph-name\": \"glyphName\",\n        glyphorientationhorizontal: \"glyphOrientationHorizontal\",\n        \"glyph-orientation-horizontal\": \"glyphOrientationHorizontal\",\n        glyphorientationvertical: \"glyphOrientationVertical\",\n        \"glyph-orientation-vertical\": \"glyphOrientationVertical\",\n        glyphref: \"glyphRef\",\n        gradienttransform: \"gradientTransform\",\n        gradientunits: \"gradientUnits\",\n        hanging: \"hanging\",\n        horizadvx: \"horizAdvX\",\n        \"horiz-adv-x\": \"horizAdvX\",\n        horizoriginx: \"horizOriginX\",\n        \"horiz-origin-x\": \"horizOriginX\",\n        ideographic: \"ideographic\",\n        imagerendering: \"imageRendering\",\n        \"image-rendering\": \"imageRendering\",\n        in2: \"in2\",\n        in: \"in\",\n        inlist: \"inlist\",\n        intercept: \"intercept\",\n        k1: \"k1\",\n        k2: \"k2\",\n        k3: \"k3\",\n        k4: \"k4\",\n        k: \"k\",\n        kernelmatrix: \"kernelMatrix\",\n        kernelunitlength: \"kernelUnitLength\",\n        kerning: \"kerning\",\n        keypoints: \"keyPoints\",\n        keysplines: \"keySplines\",\n        keytimes: \"keyTimes\",\n        lengthadjust: \"lengthAdjust\",\n        letterspacing: \"letterSpacing\",\n        \"letter-spacing\": \"letterSpacing\",\n        lightingcolor: \"lightingColor\",\n        \"lighting-color\": \"lightingColor\",\n        limitingconeangle: \"limitingConeAngle\",\n        local: \"local\",\n        markerend: \"markerEnd\",\n        \"marker-end\": \"markerEnd\",\n        markerheight: \"markerHeight\",\n        markermid: \"markerMid\",\n        \"marker-mid\": \"markerMid\",\n        markerstart: \"markerStart\",\n        \"marker-start\": \"markerStart\",\n        markerunits: \"markerUnits\",\n        markerwidth: \"markerWidth\",\n        mask: \"mask\",\n        maskcontentunits: \"maskContentUnits\",\n        masktype: \"maskType\",\n        maskunits: \"maskUnits\",\n        mathematical: \"mathematical\",\n        mode: \"mode\",\n        numoctaves: \"numOctaves\",\n        offset: \"offset\",\n        opacity: \"opacity\",\n        operator: \"operator\",\n        order: \"order\",\n        orient: \"orient\",\n        orientation: \"orientation\",\n        origin: \"origin\",\n        overflow: \"overflow\",\n        overlineposition: \"overlinePosition\",\n        \"overline-position\": \"overlinePosition\",\n        overlinethickness: \"overlineThickness\",\n        \"overline-thickness\": \"overlineThickness\",\n        paintorder: \"paintOrder\",\n        \"paint-order\": \"paintOrder\",\n        panose1: \"panose1\",\n        \"panose-1\": \"panose1\",\n        pathlength: \"pathLength\",\n        patterncontentunits: \"patternContentUnits\",\n        patterntransform: \"patternTransform\",\n        patternunits: \"patternUnits\",\n        pointerevents: \"pointerEvents\",\n        \"pointer-events\": \"pointerEvents\",\n        points: \"points\",\n        pointsatx: \"pointsAtX\",\n        pointsaty: \"pointsAtY\",\n        pointsatz: \"pointsAtZ\",\n        popover: \"popover\",\n        popovertarget: \"popoverTarget\",\n        popovertargetaction: \"popoverTargetAction\",\n        prefix: \"prefix\",\n        preservealpha: \"preserveAlpha\",\n        preserveaspectratio: \"preserveAspectRatio\",\n        primitiveunits: \"primitiveUnits\",\n        property: \"property\",\n        r: \"r\",\n        radius: \"radius\",\n        refx: \"refX\",\n        refy: \"refY\",\n        renderingintent: \"renderingIntent\",\n        \"rendering-intent\": \"renderingIntent\",\n        repeatcount: \"repeatCount\",\n        repeatdur: \"repeatDur\",\n        requiredextensions: \"requiredExtensions\",\n        requiredfeatures: \"requiredFeatures\",\n        resource: \"resource\",\n        restart: \"restart\",\n        result: \"result\",\n        results: \"results\",\n        rotate: \"rotate\",\n        rx: \"rx\",\n        ry: \"ry\",\n        scale: \"scale\",\n        security: \"security\",\n        seed: \"seed\",\n        shaperendering: \"shapeRendering\",\n        \"shape-rendering\": \"shapeRendering\",\n        slope: \"slope\",\n        spacing: \"spacing\",\n        specularconstant: \"specularConstant\",\n        specularexponent: \"specularExponent\",\n        speed: \"speed\",\n        spreadmethod: \"spreadMethod\",\n        startoffset: \"startOffset\",\n        stddeviation: \"stdDeviation\",\n        stemh: \"stemh\",\n        stemv: \"stemv\",\n        stitchtiles: \"stitchTiles\",\n        stopcolor: \"stopColor\",\n        \"stop-color\": \"stopColor\",\n        stopopacity: \"stopOpacity\",\n        \"stop-opacity\": \"stopOpacity\",\n        strikethroughposition: \"strikethroughPosition\",\n        \"strikethrough-position\": \"strikethroughPosition\",\n        strikethroughthickness: \"strikethroughThickness\",\n        \"strikethrough-thickness\": \"strikethroughThickness\",\n        string: \"string\",\n        stroke: \"stroke\",\n        strokedasharray: \"strokeDasharray\",\n        \"stroke-dasharray\": \"strokeDasharray\",\n        strokedashoffset: \"strokeDashoffset\",\n        \"stroke-dashoffset\": \"strokeDashoffset\",\n        strokelinecap: \"strokeLinecap\",\n        \"stroke-linecap\": \"strokeLinecap\",\n        strokelinejoin: \"strokeLinejoin\",\n        \"stroke-linejoin\": \"strokeLinejoin\",\n        strokemiterlimit: \"strokeMiterlimit\",\n        \"stroke-miterlimit\": \"strokeMiterlimit\",\n        strokewidth: \"strokeWidth\",\n        \"stroke-width\": \"strokeWidth\",\n        strokeopacity: \"strokeOpacity\",\n        \"stroke-opacity\": \"strokeOpacity\",\n        suppresscontenteditablewarning: \"suppressContentEditableWarning\",\n        suppresshydrationwarning: \"suppressHydrationWarning\",\n        surfacescale: \"surfaceScale\",\n        systemlanguage: \"systemLanguage\",\n        tablevalues: \"tableValues\",\n        targetx: \"targetX\",\n        targety: \"targetY\",\n        textanchor: \"textAnchor\",\n        \"text-anchor\": \"textAnchor\",\n        textdecoration: \"textDecoration\",\n        \"text-decoration\": \"textDecoration\",\n        textlength: \"textLength\",\n        textrendering: \"textRendering\",\n        \"text-rendering\": \"textRendering\",\n        to: \"to\",\n        transform: \"transform\",\n        transformorigin: \"transformOrigin\",\n        \"transform-origin\": \"transformOrigin\",\n        typeof: \"typeof\",\n        u1: \"u1\",\n        u2: \"u2\",\n        underlineposition: \"underlinePosition\",\n        \"underline-position\": \"underlinePosition\",\n        underlinethickness: \"underlineThickness\",\n        \"underline-thickness\": \"underlineThickness\",\n        unicode: \"unicode\",\n        unicodebidi: \"unicodeBidi\",\n        \"unicode-bidi\": \"unicodeBidi\",\n        unicoderange: \"unicodeRange\",\n        \"unicode-range\": \"unicodeRange\",\n        unitsperem: \"unitsPerEm\",\n        \"units-per-em\": \"unitsPerEm\",\n        unselectable: \"unselectable\",\n        valphabetic: \"vAlphabetic\",\n        \"v-alphabetic\": \"vAlphabetic\",\n        values: \"values\",\n        vectoreffect: \"vectorEffect\",\n        \"vector-effect\": \"vectorEffect\",\n        version: \"version\",\n        vertadvy: \"vertAdvY\",\n        \"vert-adv-y\": \"vertAdvY\",\n        vertoriginx: \"vertOriginX\",\n        \"vert-origin-x\": \"vertOriginX\",\n        vertoriginy: \"vertOriginY\",\n        \"vert-origin-y\": \"vertOriginY\",\n        vhanging: \"vHanging\",\n        \"v-hanging\": \"vHanging\",\n        videographic: \"vIdeographic\",\n        \"v-ideographic\": \"vIdeographic\",\n        viewbox: \"viewBox\",\n        viewtarget: \"viewTarget\",\n        visibility: \"visibility\",\n        vmathematical: \"vMathematical\",\n        \"v-mathematical\": \"vMathematical\",\n        vocab: \"vocab\",\n        widths: \"widths\",\n        wordspacing: \"wordSpacing\",\n        \"word-spacing\": \"wordSpacing\",\n        writingmode: \"writingMode\",\n        \"writing-mode\": \"writingMode\",\n        x1: \"x1\",\n        x2: \"x2\",\n        x: \"x\",\n        xchannelselector: \"xChannelSelector\",\n        xheight: \"xHeight\",\n        \"x-height\": \"xHeight\",\n        xlinkactuate: \"xlinkActuate\",\n        \"xlink:actuate\": \"xlinkActuate\",\n        xlinkarcrole: \"xlinkArcrole\",\n        \"xlink:arcrole\": \"xlinkArcrole\",\n        xlinkhref: \"xlinkHref\",\n        \"xlink:href\": \"xlinkHref\",\n        xlinkrole: \"xlinkRole\",\n        \"xlink:role\": \"xlinkRole\",\n        xlinkshow: \"xlinkShow\",\n        \"xlink:show\": \"xlinkShow\",\n        xlinktitle: \"xlinkTitle\",\n        \"xlink:title\": \"xlinkTitle\",\n        xlinktype: \"xlinkType\",\n        \"xlink:type\": \"xlinkType\",\n        xmlbase: \"xmlBase\",\n        \"xml:base\": \"xmlBase\",\n        xmllang: \"xmlLang\",\n        \"xml:lang\": \"xmlLang\",\n        xmlns: \"xmlns\",\n        \"xml:space\": \"xmlSpace\",\n        xmlnsxlink: \"xmlnsXlink\",\n        \"xmlns:xlink\": \"xmlnsXlink\",\n        xmlspace: \"xmlSpace\",\n        y1: \"y1\",\n        y2: \"y2\",\n        y: \"y\",\n        ychannelselector: \"yChannelSelector\",\n        z: \"z\",\n        zoomandpan: \"zoomAndPan\"\n      },\n      warnedProperties = {},\n      EVENT_NAME_REGEX = /^on./,\n      INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,\n      rARIA = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,\n      msPattern$1 = /^-ms-/,\n      hyphenPattern = /-(.)/g,\n      badStyleValueWithSemicolonPattern = /;\\s*$/,\n      warnedStyleNames = {},\n      warnedStyleValues = {},\n      warnedForNaNValue = !1,\n      warnedForInfinityValue = !1,\n      matchHtmlRegExp = /[\"'&<>]/,\n      uppercasePattern = /([A-Z])/g,\n      msPattern = /^ms-/,\n      isJavaScriptProtocol =\n        /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      NotPending = Object.freeze({\n        pending: !1,\n        data: null,\n        method: null,\n        action: null\n      }),\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            if (!resumableState.dnsResources.hasOwnProperty(href)) {\n              resumableState.dnsResources[href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              )\n                JSCompiler_temp =\n                  ((header =\n                    \"<\" +\n                    escapeHrefForLinkHeaderURLContext(href) +\n                    \">; rel=dns-prefetch\"),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              JSCompiler_temp\n                ? ((renderState.resets.dns[href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((header = []),\n                  pushLinkImpl(header, { href: href, rel: \"dns-prefetch\" }),\n                  renderState.preconnects.add(header));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.D(href);\n      },\n      C: function (href, crossOrigin) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            var bucket =\n              \"use-credentials\" === crossOrigin\n                ? \"credentials\"\n                : \"string\" === typeof crossOrigin\n                  ? \"anonymous\"\n                  : \"default\";\n            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {\n              resumableState.connectResources[bucket][href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              ) {\n                JSCompiler_temp =\n                  \"<\" +\n                  escapeHrefForLinkHeaderURLContext(href) +\n                  \">; rel=preconnect\";\n                if (\"string\" === typeof crossOrigin) {\n                  var escapedCrossOrigin =\n                    escapeStringForLinkHeaderQuotedParamValueContext(\n                      crossOrigin,\n                      \"crossOrigin\"\n                    );\n                  JSCompiler_temp +=\n                    '; crossorigin=\"' + escapedCrossOrigin + '\"';\n                }\n                JSCompiler_temp =\n                  ((header = JSCompiler_temp),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              }\n              JSCompiler_temp\n                ? ((renderState.resets.connect[bucket][href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((bucket = []),\n                  pushLinkImpl(bucket, {\n                    rel: \"preconnect\",\n                    href: href,\n                    crossOrigin: crossOrigin\n                  }),\n                  renderState.preconnects.add(bucket));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.C(href, crossOrigin);\n      },\n      L: function (href, as, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (as && href) {\n            switch (as) {\n              case \"image\":\n                if (options) {\n                  var imageSrcSet = options.imageSrcSet;\n                  var imageSizes = options.imageSizes;\n                  var fetchPriority = options.fetchPriority;\n                }\n                var key = imageSrcSet\n                  ? imageSrcSet + \"\\n\" + (imageSizes || \"\")\n                  : href;\n                if (resumableState.imageResources.hasOwnProperty(key)) return;\n                resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n                resumableState = renderState.headers;\n                var header;\n                resumableState &&\n                0 < resumableState.remainingCapacity &&\n                \"string\" !== typeof imageSrcSet &&\n                \"high\" === fetchPriority &&\n                ((header = getPreloadAsHeader(href, as, options)),\n                0 <= (resumableState.remainingCapacity -= header.length + 2))\n                  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),\n                    resumableState.highImagePreloads &&\n                      (resumableState.highImagePreloads += \", \"),\n                    (resumableState.highImagePreloads += header))\n                  : ((resumableState = []),\n                    pushLinkImpl(\n                      resumableState,\n                      assign(\n                        {\n                          rel: \"preload\",\n                          href: imageSrcSet ? void 0 : href,\n                          as: as\n                        },\n                        options\n                      )\n                    ),\n                    \"high\" === fetchPriority\n                      ? renderState.highImagePreloads.add(resumableState)\n                      : (renderState.bulkPreloads.add(resumableState),\n                        renderState.preloads.images.set(key, resumableState)));\n                break;\n              case \"style\":\n                if (resumableState.styleResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.styleResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.stylesheets.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                break;\n              case \"script\":\n                if (resumableState.scriptResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                renderState.preloads.scripts.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.scriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                break;\n              default:\n                if (resumableState.unknownResources.hasOwnProperty(as)) {\n                  if (\n                    ((imageSrcSet = resumableState.unknownResources[as]),\n                    imageSrcSet.hasOwnProperty(href))\n                  )\n                    return;\n                } else\n                  (imageSrcSet = {}),\n                    (resumableState.unknownResources[as] = imageSrcSet);\n                imageSrcSet[href] = PRELOAD_NO_CREDS;\n                if (\n                  (resumableState = renderState.headers) &&\n                  0 < resumableState.remainingCapacity &&\n                  \"font\" === as &&\n                  ((key = getPreloadAsHeader(href, as, options)),\n                  0 <= (resumableState.remainingCapacity -= key.length + 2))\n                )\n                  (renderState.resets.font[href] = PRELOAD_NO_CREDS),\n                    resumableState.fontPreloads &&\n                      (resumableState.fontPreloads += \", \"),\n                    (resumableState.fontPreloads += key);\n                else\n                  switch (\n                    ((resumableState = []),\n                    (href = assign(\n                      { rel: \"preload\", href: href, as: as },\n                      options\n                    )),\n                    pushLinkImpl(resumableState, href),\n                    as)\n                  ) {\n                    case \"font\":\n                      renderState.fontPreloads.add(resumableState);\n                      break;\n                    default:\n                      renderState.bulkPreloads.add(resumableState);\n                  }\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.L(href, as, options);\n      },\n      m: function (href, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            var as =\n              options && \"string\" === typeof options.as ? options.as : \"script\";\n            switch (as) {\n              case \"script\":\n                if (resumableState.moduleScriptResources.hasOwnProperty(href))\n                  return;\n                as = [];\n                resumableState.moduleScriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.moduleScripts.set(href, as);\n                break;\n              default:\n                if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {\n                  var resources = resumableState.moduleUnknownResources[as];\n                  if (resources.hasOwnProperty(href)) return;\n                } else\n                  (resources = {}),\n                    (resumableState.moduleUnknownResources[as] = resources);\n                as = [];\n                resources[href] = PRELOAD_NO_CREDS;\n            }\n            pushLinkImpl(\n              as,\n              assign({ rel: \"modulepreload\", href: href }, options)\n            );\n            renderState.bulkPreloads.add(as);\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.m(href, options);\n      },\n      X: function (src, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState = resumableState.scriptResources.hasOwnProperty(\n              src\n            )\n              ? resumableState.scriptResources[src]\n              : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.scriptResources[src] = EXISTS),\n              (options = assign({ src: src, async: !0 }, options)),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.scripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.X(src, options);\n      },\n      S: function (href, precedence, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            precedence = precedence || \"default\";\n            var styleQueue = renderState.styles.get(precedence),\n              resourceState = resumableState.styleResources.hasOwnProperty(href)\n                ? resumableState.styleResources[href]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.styleResources[href] = EXISTS),\n              styleQueue ||\n                ((styleQueue = {\n                  precedence: escapeTextForBrowser(precedence),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(precedence, styleQueue)),\n              (precedence = {\n                state: PENDING$1,\n                props: assign(\n                  {\n                    rel: \"stylesheet\",\n                    href: href,\n                    \"data-precedence\": precedence\n                  },\n                  options\n                )\n              }),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(precedence.props, resourceState),\n                (renderState = renderState.preloads.stylesheets.get(href)) &&\n                0 < renderState.length\n                  ? (renderState.length = 0)\n                  : (precedence.state = PRELOADED)),\n              styleQueue.sheets.set(href, precedence),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.S(href, precedence, options);\n      },\n      M: function (src, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState =\n              resumableState.moduleScriptResources.hasOwnProperty(src)\n                ? resumableState.moduleScriptResources[src]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.moduleScriptResources[src] = EXISTS),\n              (options = assign(\n                { src: src, type: \"module\", async: !0 },\n                options\n              )),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.moduleScripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.M(src, options);\n      }\n    };\n    var NothingSent = 0,\n      SentCompleteSegmentFunction = 1,\n      SentCompleteBoundaryFunction = 2,\n      SentClientRenderFunction = 4,\n      SentStyleInsertionFunction = 8,\n      SentCompletedShellId = 32,\n      SentMarkShellTime = 64,\n      NeedUpgradeToViewTransitions = 128,\n      SentUpgradeToViewTransitions = 256,\n      EXISTS = null,\n      PRELOAD_NO_CREDS = [];\n    Object.freeze(PRELOAD_NO_CREDS);\n    var currentlyFlushingRenderState = null;\n    stringToPrecomputedChunk('\"></template>');\n    var startInlineScript = stringToPrecomputedChunk(\"<script\"),\n      endInlineScript = stringToPrecomputedChunk(\"\\x3c/script>\"),\n      startScriptSrc = stringToPrecomputedChunk('<script src=\"'),\n      startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"'),\n      scriptNonce = stringToPrecomputedChunk(' nonce=\"'),\n      scriptIntegirty = stringToPrecomputedChunk(' integrity=\"'),\n      scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin=\"'),\n      endAsyncScript = stringToPrecomputedChunk(' async=\"\">\\x3c/script>'),\n      startInlineStyle = stringToPrecomputedChunk(\"<style\"),\n      scriptRegex = /(<\\/|<)(s)(cript)/gi,\n      importMapScriptStart = stringToPrecomputedChunk(\n        '<script type=\"importmap\">'\n      ),\n      importMapScriptEnd = stringToPrecomputedChunk(\"\\x3c/script>\");\n    var didWarnForNewBooleanPropsWithEmptyValue = {};\n    var ROOT_HTML_MODE = 0,\n      HTML_HTML_MODE = 1,\n      HTML_MODE = 2,\n      HTML_HEAD_MODE = 3,\n      SVG_MODE = 4,\n      MATHML_MODE = 5,\n      HTML_TABLE_MODE = 6,\n      HTML_TABLE_BODY_MODE = 7,\n      HTML_TABLE_ROW_MODE = 8,\n      HTML_COLGROUP_MODE = 9,\n      textSeparator = stringToPrecomputedChunk(\"\\x3c!-- --\\x3e\"),\n      styleNameCache = new Map(),\n      styleAttributeStart = stringToPrecomputedChunk(' style=\"'),\n      styleAssign = stringToPrecomputedChunk(\":\"),\n      styleSeparator = stringToPrecomputedChunk(\";\"),\n      attributeSeparator = stringToPrecomputedChunk(\" \"),\n      attributeAssign = stringToPrecomputedChunk('=\"'),\n      attributeEnd = stringToPrecomputedChunk('\"'),\n      attributeEmptyString = stringToPrecomputedChunk('=\"\"'),\n      actionJavaScriptURL = stringToPrecomputedChunk(\n        escapeTextForBrowser(\n          \"javascript:throw new Error('React form unexpectedly submitted.')\"\n        )\n      ),\n      startHiddenInputChunk = stringToPrecomputedChunk('<input type=\"hidden\"'),\n      endOfStartTag = stringToPrecomputedChunk(\">\"),\n      endOfStartTagSelfClosing = stringToPrecomputedChunk(\"/>\"),\n      didWarnDefaultInputValue = !1,\n      didWarnDefaultChecked = !1,\n      didWarnDefaultSelectValue = !1,\n      didWarnDefaultTextareaValue = !1,\n      didWarnInvalidOptionChildren = !1,\n      didWarnInvalidOptionInnerHTML = !1,\n      didWarnSelectedSetOnOption = !1,\n      didWarnFormActionType = !1,\n      didWarnFormActionName = !1,\n      didWarnFormActionTarget = !1,\n      didWarnFormActionMethod = !1,\n      selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"'),\n      formReplayingRuntimeScript = stringToPrecomputedChunk(\n        'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(c=f,e=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});'\n      ),\n      formStateMarkerIsMatching = stringToPrecomputedChunk(\"\\x3c!--F!--\\x3e\"),\n      formStateMarkerIsNotMatching = stringToPrecomputedChunk(\"\\x3c!--F--\\x3e\"),\n      styleRegex = /(<\\/|<)(s)(tyle)/gi,\n      headPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--head--\\x3e\"),\n      bodyPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--body--\\x3e\"),\n      htmlPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--html--\\x3e\"),\n      leadingNewline = stringToPrecomputedChunk(\"\\n\"),\n      VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,\n      validatedTagCache = new Map(),\n      doctypeChunk = stringToPrecomputedChunk(\"<!DOCTYPE html>\"),\n      endTagCache = new Map(),\n      shellTimeRuntimeScript = stringToPrecomputedChunk(\n        \"requestAnimationFrame(function(){$RT=performance.now()});\"\n      ),\n      placeholder1 = stringToPrecomputedChunk('<template id=\"'),\n      placeholder2 = stringToPrecomputedChunk('\"></template>'),\n      startActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--&--\\x3e\"),\n      endActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--/&--\\x3e\"),\n      startCompletedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$--\\x3e\"),\n      startPendingSuspenseBoundary1 = stringToPrecomputedChunk(\n        '\\x3c!--$?--\\x3e<template id=\"'\n      ),\n      startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>'),\n      startClientRenderedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$!--\\x3e\"),\n      endSuspenseBoundary = stringToPrecomputedChunk(\"\\x3c!--/$--\\x3e\"),\n      clientRenderedSuspenseBoundaryError1 =\n        stringToPrecomputedChunk(\"<template\"),\n      clientRenderedSuspenseBoundaryErrorAttrInterstitial =\n        stringToPrecomputedChunk('\"'),\n      clientRenderedSuspenseBoundaryError1A =\n        stringToPrecomputedChunk(' data-dgst=\"'),\n      clientRenderedSuspenseBoundaryError1B =\n        stringToPrecomputedChunk(' data-msg=\"'),\n      clientRenderedSuspenseBoundaryError1C =\n        stringToPrecomputedChunk(' data-stck=\"'),\n      clientRenderedSuspenseBoundaryError1D =\n        stringToPrecomputedChunk(' data-cstck=\"'),\n      clientRenderedSuspenseBoundaryError2 =\n        stringToPrecomputedChunk(\"></template>\"),\n      startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"'),\n      startSegmentHTML2 = stringToPrecomputedChunk('\">'),\n      endSegmentHTML = stringToPrecomputedChunk(\"</div>\"),\n      startSegmentSVG = stringToPrecomputedChunk(\n        '<svg aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentSVG2 = stringToPrecomputedChunk('\">'),\n      endSegmentSVG = stringToPrecomputedChunk(\"</svg>\"),\n      startSegmentMathML = stringToPrecomputedChunk(\n        '<math aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentMathML2 = stringToPrecomputedChunk('\">'),\n      endSegmentMathML = stringToPrecomputedChunk(\"</math>\"),\n      startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"'),\n      startSegmentTable2 = stringToPrecomputedChunk('\">'),\n      endSegmentTable = stringToPrecomputedChunk(\"</table>\"),\n      startSegmentTableBody = stringToPrecomputedChunk(\n        '<table hidden><tbody id=\"'\n      ),\n      startSegmentTableBody2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableBody = stringToPrecomputedChunk(\"</tbody></table>\"),\n      startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"'),\n      startSegmentTableRow2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableRow = stringToPrecomputedChunk(\"</tr></table>\"),\n      startSegmentColGroup = stringToPrecomputedChunk(\n        '<table hidden><colgroup id=\"'\n      ),\n      startSegmentColGroup2 = stringToPrecomputedChunk('\">'),\n      endSegmentColGroup = stringToPrecomputedChunk(\"</colgroup></table>\"),\n      completeSegmentScript1Full = stringToPrecomputedChunk(\n        '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS(\"'\n      ),\n      completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"'),\n      completeSegmentScript2 = stringToPrecomputedChunk('\",\"'),\n      completeSegmentScriptEnd = stringToPrecomputedChunk('\")\\x3c/script>');\n    stringToPrecomputedChunk('<template data-rsi=\"\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-pid=\"');\n    var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(\n        '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d||\"/&\"===d)if(0===h)break;else h--;else\"$\"!==d&&\"$?\"!==d&&\"$~\"!==d&&\"$!\"!==d&&\"&\"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data=\"$\";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data=\"$~\",$RB.push(a,b),2===$RB.length&&(\"number\"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'\n      ),\n      completeBoundaryUpgradeToViewTransitionsInstruction =\n        '$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),\"auto\"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute(\"vt-name\"))||(a=\"_T_\"+N++ +\"_\"),a=CSS.escape(a)!==a?\"r-\"+btoa(a).replace(/=/g,\"\"):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll(\"[vt-share]\"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute(\"vt-name\"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if(\"/$\"===t)if(0===f)break;else f--;else\"$\"!==t&&\"$?\"!==t&&\"$~\"!==t&&\"$!\"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute(\"vt-name\"),y=m.get(E);h(d,y?\"vt-share\":\"vt-exit\");y&&(h(y,\"vt-share\"),m.set(E,null));for(var F=d.querySelectorAll(\"[vt-share]\"),\\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute(\"vt-name\"),I=m.get(H);I&&(h(G,\"vt-share\"),h(I,\"vt-share\"),m.set(H,null))}var J=d.querySelectorAll(\"[vt-parent-exit]\");for(d=0;d<J.length;d++)h(J[d],\"vt-parent-exit\")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute(\"vt-name\"))&&h(n,\"vt-enter\");var L=n.querySelectorAll(\"[vt-parent-enter]\");for(b=0;b<L.length;b++)h(L[b],\"vt-parent-enter\");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute(\"vt-update\");\\nM&&\"none\"!==M&&!l.includes(p)&&h(p,\"vt-update\");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&\"none\"!==b.getAttribute(\"vt-update\"));u.push.apply(u,K.querySelectorAll(\\'img[src]:not([loading=\"lazy\"])\\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener(\"load\",r);w.g.addEventListener(\"error\",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];\"\"===c.getAttribute(\"style\")&&c.removeAttribute(\"style\")}});\\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);',\n      completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"'),\n      completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(\n        '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=e[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&$RM.set(b.getAttribute(\"href\"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement(\"link\");a.href=d;a.rel=\\n\"stylesheet\";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute(\"media\");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\\n\"$~\";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,\"CSS failed to load\"))};$RR(\"'\n      ),\n      completeBoundaryWithStylesScript1Partial =\n        stringToPrecomputedChunk('$RR(\"'),\n      completeBoundaryScript2 = stringToPrecomputedChunk('\",\"'),\n      completeBoundaryScript3a = stringToPrecomputedChunk('\",'),\n      completeBoundaryScript3b = stringToPrecomputedChunk('\"'),\n      completeBoundaryScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rci=\"\" data-bid=\"');\n    stringToPrecomputedChunk('<template data-rri=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-sty=\"');\n    var clientRenderScriptFunctionOnly = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'\n      ),\n      clientRenderScript1Full = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX(\"'\n      ),\n      clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"'),\n      clientRenderScript1A = stringToPrecomputedChunk('\"'),\n      clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(\",\"),\n      clientRenderErrorScriptNull = stringToPrecomputedChunk(\"null\"),\n      clientRenderScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rxi=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-dgst=\"');\n    stringToPrecomputedChunk('\" data-msg=\"');\n    stringToPrecomputedChunk('\" data-stck=\"');\n    stringToPrecomputedChunk('\" data-cstck=\"');\n    var regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g,\n      regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g,\n      lateStyleTagResourceOpen1 = stringToPrecomputedChunk(\n        ' media=\"not all\" data-precedence=\"'\n      ),\n      lateStyleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      lateStyleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      lateStyleTagTemplateClose = stringToPrecomputedChunk(\"</style>\"),\n      currentlyRenderingBoundaryHasStylesToHoist = !1,\n      destinationHasCapacity = !0,\n      stylesheetFlushingQueue = [],\n      styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence=\"'),\n      styleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      spaceSeparator = stringToPrecomputedChunk(\" \"),\n      styleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      styleTagResourceClose = stringToPrecomputedChunk(\"</style>\");\n    stringToPrecomputedChunk('<link rel=\"expect\" href=\"#');\n    stringToPrecomputedChunk('\" blocking=\"render\"/>');\n    var completedShellIdAttributeStart = stringToPrecomputedChunk(' id=\"'),\n      arrayFirstOpenBracket = stringToPrecomputedChunk(\"[\"),\n      arraySubsequentOpenBracket = stringToPrecomputedChunk(\",[\"),\n      arrayInterstitial = stringToPrecomputedChunk(\",\"),\n      arrayCloseBracket = stringToPrecomputedChunk(\"]\"),\n      PENDING$1 = 0,\n      PRELOADED = 1,\n      PREAMBLE = 2,\n      LATE = 3,\n      regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g,\n      regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g,\n      bind = Function.prototype.bind,\n      requestStorage = new async_hooks.AsyncLocalStorage(),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      emptyContextObject = {};\n    Object.freeze(emptyContextObject);\n    var rendererSigil = {};\n    var currentActiveSnapshot = null,\n      didWarnAboutNoopUpdateForComponent = {},\n      didWarnAboutDeprecatedWillMount = {};\n    var didWarnAboutUninitializedState = new Set();\n    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n    var didWarnAboutDirectlyAssigningPropsToState = new Set();\n    var didWarnAboutUndefinedDerivedState = new Set();\n    var didWarnAboutContextTypes$1 = new Set();\n    var didWarnAboutChildContextTypes = new Set();\n    var didWarnAboutInvalidateContextType = new Set();\n    var didWarnOnInvalidCallback = new Set();\n    var classComponentUpdater = {\n        enqueueSetState: function (inst, payload, callback) {\n          var internals = inst._reactInternals;\n          null === internals.queue\n            ? warnNoop(inst, \"setState\")\n            : (internals.queue.push(payload),\n              void 0 !== callback &&\n                null !== callback &&\n                warnOnInvalidCallback(callback));\n        },\n        enqueueReplaceState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          inst.replace = !0;\n          inst.queue = [payload];\n          void 0 !== callback &&\n            null !== callback &&\n            warnOnInvalidCallback(callback);\n        },\n        enqueueForceUpdate: function (inst, callback) {\n          null === inst._reactInternals.queue\n            ? warnNoop(inst, \"forceUpdate\")\n            : void 0 !== callback &&\n              null !== callback &&\n              warnOnInvalidCallback(callback);\n        }\n      },\n      emptyTreeContext = { id: 1, overflow: \"\" },\n      clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n      log = Math.log,\n      LN2 = Math.LN2,\n      currentTaskInDEV = null,\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      shouldCaptureSuspendedCallSite = !1,\n      suspendedCallSiteStack = null,\n      suspendedCallSiteDebugTask = null,\n      objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      currentlyRenderingComponent = null,\n      currentlyRenderingTask = null,\n      currentlyRenderingRequest = null,\n      currentlyRenderingKeyPath = null,\n      firstWorkInProgressHook = null,\n      workInProgressHook = null,\n      isReRender = !1,\n      didScheduleRenderPhaseUpdate = !1,\n      localIdCounter = 0,\n      actionStateCounter = 0,\n      actionStateMatchingIndex = -1,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      RecoverableException = Error(\n        \"Recoverable Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render so a downstream renderer can recover it. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\"\n      ),\n      suspendedRecoverableError = null,\n      renderPhaseUpdates = null,\n      numberOfReRenders = 0,\n      isInHookUserCodeInDev = !1,\n      currentHookNameInDev,\n      HooksDispatcher = {\n        readContext: readContext,\n        use: function (usable) {\n          if (null !== usable && \"object\" === typeof usable) {\n            if (\"function\" === typeof usable.then)\n              return unwrapThenable(usable);\n            if (usable.$$typeof === REACT_RECOVERABLE_TYPE)\n              throw (\n                ((suspendedRecoverableError =\n                  createFatalRecoverableError(usable)),\n                RecoverableException)\n              );\n            if (usable.$$typeof === REACT_CONTEXT_TYPE)\n              return readContext(usable);\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useContext: function (context) {\n          currentHookNameInDev = \"useContext\";\n          resolveCurrentlyRenderingComponent();\n          return context._currentValue;\n        },\n        useMemo: useMemo,\n        useReducer: useReducer,\n        useRef: function (initialValue) {\n          currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n          workInProgressHook = createWorkInProgressHook();\n          var previousRef = workInProgressHook.memoizedState;\n          return null === previousRef\n            ? ((initialValue = { current: initialValue }),\n              Object.seal(initialValue),\n              (workInProgressHook.memoizedState = initialValue))\n            : previousRef;\n        },\n        useState: function (initialState) {\n          currentHookNameInDev = \"useState\";\n          return useReducer(basicStateReducer, initialState);\n        },\n        useInsertionEffect: noop,\n        useLayoutEffect: noop,\n        useCallback: function (callback, deps) {\n          return useMemo(function () {\n            return callback;\n          }, deps);\n        },\n        useImperativeHandle: noop,\n        useEffect: noop,\n        useDebugValue: noop,\n        useDeferredValue: function (value, initialValue) {\n          resolveCurrentlyRenderingComponent();\n          return void 0 !== initialValue ? initialValue : value;\n        },\n        useTransition: function () {\n          resolveCurrentlyRenderingComponent();\n          return [!1, unsupportedStartTransition];\n        },\n        useId: function () {\n          var treeId = getTreeId(currentlyRenderingTask.treeContext),\n            resumableState = currentResumableState;\n          if (null === resumableState)\n            throw Error(\n              \"Invalid hook call. Hooks can only be called inside of the body of a function component.\"\n            );\n          var localId = localIdCounter++;\n          return makeId(resumableState, treeId, localId);\n        },\n        useSyncExternalStore: function (\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        ) {\n          if (void 0 === getServerSnapshot)\n            throw Error(\n              \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n            );\n          return getServerSnapshot();\n        },\n        useOptimistic: function (passthrough) {\n          resolveCurrentlyRenderingComponent();\n          return [passthrough, unsupportedSetOptimisticState];\n        },\n        useActionState: useActionState,\n        useFormState: useActionState,\n        useHostTransitionStatus: function () {\n          resolveCurrentlyRenderingComponent();\n          return NotPending;\n        },\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: function () {\n          return throwOnUseEffectEventCall;\n        }\n      },\n      currentResumableState = null,\n      DefaultAsyncDispatcher = {\n        getCacheForType: function () {\n          throw Error(\"Not implemented.\");\n        },\n        cacheSignal: function () {\n          throw Error(\"Not implemented.\");\n        },\n        getOwner: function () {\n          return null === currentTaskInDEV\n            ? null\n            : currentTaskInDEV.componentStack;\n        }\n      },\n      disabledDepth = 0,\n      prevLog,\n      prevInfo,\n      prevWarn,\n      prevError,\n      prevGroup,\n      prevGroupCollapsed,\n      prevGroupEnd;\n    disabledLog.__reactDisabledLog = !0;\n    var prefix,\n      suffix,\n      reentry = !1;\n    var componentFrameCache = new (\n      \"function\" === typeof WeakMap ? WeakMap : Map\n    )();\n    var callComponent = {\n        react_stack_bottom_frame: function (Component, props, secondArg) {\n          return Component(props, secondArg);\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callRender = {\n        react_stack_bottom_frame: function (instance) {\n          return instance.render();\n        }\n      },\n      callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var REACT_RECOVERABLE_DIGEST = \"\",\n      CLIENT_RENDERED = 4,\n      PENDING = 0,\n      COMPLETED = 1,\n      FLUSHED = 2,\n      ABORTED = 3,\n      ERRORED = 4,\n      POSTPONED = 5,\n      CLOSED = 13,\n      currentRequest = null,\n      didWarnAboutBadClass = {},\n      didWarnAboutContextTypes = {},\n      didWarnAboutContextTypeOnFunctionComponent = {},\n      didWarnAboutGetDerivedStateOnFunctionComponent = {},\n      didWarnAboutReassigningProps = !1,\n      didWarnAboutGenerators = !1,\n      didWarnAboutMaps = !1,\n      flushedByteSize = 0,\n      flushingPartialBoundaries = !1,\n      flushingShell = !1;\n    ensureCorrectIsomorphicReactVersion();\n    ensureCorrectIsomorphicReactVersion();\n    exports.prerender = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resources = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createPrerenderRequest(\n            children,\n            resources,\n            createRenderState(\n              resources,\n              void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream = {\n                postponed: getPostponedState(request),\n                prelude: stream\n              };\n              resolve(stream);\n            },\n            void 0,\n            void 0,\n            reject\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.prerenderToNodeStream = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var resumableState = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createPrerenderRequest(\n            children,\n            resumableState,\n            createRenderState(\n              resumableState,\n              void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              options ? options.onHeaders : void 0,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            function () {\n              var readable = new stream.Readable({\n                  read: function () {\n                    startFlowing(request, writable);\n                  }\n                }),\n                writable = createFakeWritableFromReadable(readable);\n              readable = {\n                postponed: getPostponedState(request),\n                prelude: readable\n              };\n              resolve(readable);\n            },\n            void 0,\n            void 0,\n            reject\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.renderToPipeableStream = function (children, options) {\n      var request = createRequestImpl(children, options),\n        hasStartedFlowing = !1;\n      startWork(request);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          safelyEmitEarlyPreloads(\n            request,\n            null === request.trackedPostpones\n              ? 0 === request.pendingRootTasks\n              : null === request.completedRootSegment\n                ? 0 === request.pendingRootTasks\n                : request.completedRootSegment.status !== POSTPONED\n          );\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          destination.on(\n            \"close\",\n            createCancelHandler(request, \"The destination stream closed early.\")\n          );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.renderToReadableStream = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resumableState = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createRequest(\n            children,\n            resumableState,\n            createRenderState(\n              resumableState,\n              options ? options.nonce : void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController$1(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError,\n            options ? options.formState : void 0\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resume = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          request = resumeRequest(\n            children,\n            postponedState,\n            createRenderState(\n              postponedState.resumableState,\n              options ? options.nonce : void 0,\n              void 0,\n              void 0,\n              void 0,\n              void 0\n            ),\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController$1(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeAndPrerender = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var request = resumeAndPrerenderRequest(\n          children,\n          postponedState,\n          createRenderState(\n            postponedState.resumableState,\n            void 0,\n            void 0,\n            void 0,\n            void 0,\n            void 0\n          ),\n          options ? options.onError : void 0,\n          function () {\n            var writable,\n              stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  start: function (controller) {\n                    writable =\n                      createFakeWritableFromReadableStreamController(\n                        controller\n                      );\n                  },\n                  pull: function () {\n                    startFlowing(request, writable);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n            stream = { postponed: getPostponedState(request), prelude: stream };\n            resolve(stream);\n          },\n          void 0,\n          void 0,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeAndPrerenderToNodeStream = function (\n      children,\n      postponedState,\n      options\n    ) {\n      return new Promise(function (resolve, reject) {\n        var request = resumeAndPrerenderRequest(\n          children,\n          postponedState,\n          createRenderState(\n            postponedState.resumableState,\n            void 0,\n            void 0,\n            void 0,\n            void 0,\n            void 0\n          ),\n          options ? options.onError : void 0,\n          function () {\n            var readable = new stream.Readable({\n                read: function () {\n                  startFlowing(request, writable);\n                }\n              }),\n              writable = createFakeWritableFromReadable(readable);\n            readable = {\n              postponed: getPostponedState(request),\n              prelude: readable\n            };\n            resolve(readable);\n          },\n          void 0,\n          void 0,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeToPipeableStream = function (\n      children,\n      postponedState,\n      options\n    ) {\n      var request = resumeRequestImpl(children, postponedState, options),\n        hasStartedFlowing = !1;\n      startWork(request);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          destination.on(\n            \"close\",\n            createCancelHandler(request, \"The destination stream closed early.\")\n          );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.version = \"19.3.0-canary-cbb046ab-20260731\";\n  })();\n","/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function createPortal$1(children, containerInfo, implementation) {\n      var key =\n        3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n      if (null == key) key = null;\n      else if (key === REACT_OPTIMISTIC_KEY) key = REACT_OPTIMISTIC_KEY;\n      else {\n        try {\n          testStringCoercion(key);\n          var JSCompiler_inline_result = !1;\n        } catch (e) {\n          JSCompiler_inline_result = !0;\n        }\n        JSCompiler_inline_result &&\n          (console.error(\n            \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            (\"function\" === typeof Symbol &&\n              Symbol.toStringTag &&\n              key[Symbol.toStringTag]) ||\n              key.constructor.name ||\n              \"Object\"\n          ),\n          testStringCoercion(key));\n        key = \"\" + key;\n      }\n      return {\n        $$typeof: REACT_PORTAL_TYPE,\n        key: key,\n        children: children,\n        containerInfo: containerInfo,\n        implementation: implementation\n      };\n    }\n    function getCrossOriginStringAs(as, input) {\n      if (\"font\" === as) return \"\";\n      if (\"string\" === typeof input)\n        return \"use-credentials\" === input ? input : \"\";\n    }\n    function getValueDescriptorExpectingObjectForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : 'something with type \"' + typeof thing + '\"';\n    }\n    function getValueDescriptorExpectingEnumForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : \"string\" === typeof thing\n              ? JSON.stringify(thing)\n              : \"number\" === typeof thing\n                ? \"`\" + thing + \"`\"\n                : 'something with type \"' + typeof thing + '\"';\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var React = require(\"next/dist/compiled/react\"),\n      Internals = {\n        d: {\n          f: noop,\n          r: function () {\n            throw Error(\n              \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n            );\n          },\n          D: noop,\n          C: noop,\n          L: noop,\n          m: noop,\n          X: noop,\n          S: noop,\n          M: noop\n        },\n        p: 0,\n        findDOMNode: null\n      },\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n      );\n    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      Internals;\n    exports.browser = function () {\n      var recoverable = Error(\n        \"Recoverable Exception: This is not a real error! It's an implementation detail of `use(browser())` to defer rendering to the browser. `use(browser())` can only be used inside a `<Suspense>` boundary. If a server render errors with this as its cause, the component that called `use(browser())` does not have a `<Suspense>` boundary above it.\"\n      );\n      Object.defineProperty(recoverable, \"$$typeof\", {\n        value: REACT_RECOVERABLE_TYPE\n      });\n      return recoverable;\n    };\n    exports.createPortal = function (children, container) {\n      var key =\n        2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n      if (\n        !container ||\n        (1 !== container.nodeType &&\n          9 !== container.nodeType &&\n          11 !== container.nodeType)\n      )\n        throw Error(\"Target container is not a DOM element.\");\n      return createPortal$1(children, container, null, key);\n    };\n    exports.flushSync = function (fn) {\n      var previousTransition = ReactSharedInternals.T,\n        previousUpdatePriority = Internals.p;\n      try {\n        if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n          return fn();\n      } finally {\n        (ReactSharedInternals.T = previousTransition),\n          (Internals.p = previousUpdatePriority),\n          Internals.d.f() &&\n            console.error(\n              \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n            );\n      }\n    };\n    exports.preconnect = function (href, options) {\n      \"string\" === typeof href && href\n        ? null != options && \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : null != options &&\n            \"string\" !== typeof options.crossOrigin &&\n            console.error(\n              \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n              getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n            )\n        : console.error(\n            \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      \"string\" === typeof href &&\n        (options\n          ? ((options = options.crossOrigin),\n            (options =\n              \"string\" === typeof options\n                ? \"use-credentials\" === options\n                  ? options\n                  : \"\"\n                : void 0))\n          : (options = null),\n        Internals.d.C(href, options));\n    };\n    exports.prefetchDNS = function (href) {\n      if (\"string\" !== typeof href || !href)\n        console.error(\n          \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n          getValueDescriptorExpectingObjectForWarning(href)\n        );\n      else if (1 < arguments.length) {\n        var options = arguments[1];\n        \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n          ? console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            );\n      }\n      \"string\" === typeof href && Internals.d.D(href);\n    };\n    exports.preinit = function (href, options) {\n      \"string\" === typeof href && href\n        ? null == options || \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : \"style\" !== options.as &&\n            \"script\" !== options.as &&\n            console.error(\n              'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n              getValueDescriptorExpectingEnumForWarning(options.as)\n            )\n        : console.error(\n            \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      if (\n        \"string\" === typeof href &&\n        options &&\n        \"string\" === typeof options.as\n      ) {\n        var as = options.as,\n          crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n          integrity =\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          fetchPriority =\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0;\n        \"style\" === as\n          ? Internals.d.S(\n              href,\n              \"string\" === typeof options.precedence\n                ? options.precedence\n                : void 0,\n              {\n                crossOrigin: crossOrigin,\n                integrity: integrity,\n                fetchPriority: fetchPriority\n              }\n            )\n          : \"script\" === as &&\n            Internals.d.X(href, {\n              crossOrigin: crossOrigin,\n              integrity: integrity,\n              fetchPriority: fetchPriority,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n            });\n      }\n    };\n    exports.preinitModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"script\" !== options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingEnumForWarning(options.as) +\n            \".\");\n      if (encountered)\n        console.error(\n          \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n          encountered\n        );\n      else\n        switch (\n          ((encountered =\n            options && \"string\" === typeof options.as ? options.as : \"script\"),\n          encountered)\n        ) {\n          case \"script\":\n            break;\n          default:\n            (encountered =\n              getValueDescriptorExpectingEnumForWarning(encountered)),\n              console.error(\n                'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n                encountered,\n                href\n              );\n        }\n      if (\"string\" === typeof href)\n        if (\"object\" === typeof options && null !== options) {\n          if (null == options.as || \"script\" === options.as)\n            (encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n              Internals.d.M(href, {\n                crossOrigin: encountered,\n                integrity:\n                  \"string\" === typeof options.integrity\n                    ? options.integrity\n                    : void 0,\n                nonce:\n                  \"string\" === typeof options.nonce ? options.nonce : void 0,\n                fetchPriority:\n                  \"string\" === typeof options.fetchPriority\n                    ? options.fetchPriority\n                    : void 0\n              });\n        } else null == options && Internals.d.M(href);\n    };\n    exports.preload = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      null == options || \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : (\"string\" === typeof options.as && options.as) ||\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      if (\n        \"string\" === typeof href &&\n        \"object\" === typeof options &&\n        null !== options &&\n        \"string\" === typeof options.as\n      ) {\n        encountered = options.as;\n        var crossOrigin = getCrossOriginStringAs(\n          encountered,\n          options.crossOrigin\n        );\n        Internals.d.L(href, encountered, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          type: \"string\" === typeof options.type ? options.type : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0,\n          referrerPolicy:\n            \"string\" === typeof options.referrerPolicy\n              ? options.referrerPolicy\n              : void 0,\n          imageSrcSet:\n            \"string\" === typeof options.imageSrcSet\n              ? options.imageSrcSet\n              : void 0,\n          imageSizes:\n            \"string\" === typeof options.imageSizes\n              ? options.imageSizes\n              : void 0,\n          media: \"string\" === typeof options.media ? options.media : void 0\n        });\n      }\n    };\n    exports.preloadModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"string\" !== typeof options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      \"string\" === typeof href &&\n        (options\n          ? ((encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n            Internals.d.m(href, {\n              as:\n                \"string\" === typeof options.as && \"script\" !== options.as\n                  ? options.as\n                  : void 0,\n              crossOrigin: encountered,\n              integrity:\n                \"string\" === typeof options.integrity\n                  ? options.integrity\n                  : void 0,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n              fetchPriority:\n                \"string\" === typeof options.fetchPriority\n                  ? options.fetchPriority\n                  : void 0\n            }))\n          : Internals.d.m(href));\n    };\n    exports.requestFormReset = function (form) {\n      Internals.d.r(form);\n    };\n    exports.unstable_batchedUpdates = function (fn, a) {\n      return fn(a);\n    };\n    exports.useFormState = function (action, initialState, permalink) {\n      return resolveDispatcher().useFormState(action, initialState, permalink);\n    };\n    exports.useFormStatus = function () {\n      return resolveDispatcher().useHostTransitionStatus();\n    };\n    exports.version = \"19.3.0-canary-cbb046ab-20260731\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n","'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-dom-server.node.production.js');\n} else {\n  s = require('./cjs/react-dom-server.node.development.js');\n}\n\nexports.version = s.version;\nexports.prerenderToNodeStream = s.prerenderToNodeStream;\nexports.prerender = s.prerender;\nexports.resumeAndPrerenderToNodeStream = s.resumeAndPrerenderToNodeStream;\nexports.resumeAndPrerender = s.resumeAndPrerender;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function typeOf(object) {\n      if (\"object\" === typeof object && null !== object) {\n        var $$typeof = object.$$typeof;\n        switch ($$typeof) {\n          case REACT_ELEMENT_TYPE:\n            switch (((object = object.type), object)) {\n              case REACT_FRAGMENT_TYPE:\n              case REACT_PROFILER_TYPE:\n              case REACT_STRICT_MODE_TYPE:\n              case REACT_SUSPENSE_TYPE:\n              case REACT_SUSPENSE_LIST_TYPE:\n              case REACT_VIEW_TRANSITION_TYPE:\n                return object;\n              default:\n                switch (((object = object && object.$$typeof), object)) {\n                  case REACT_CONTEXT_TYPE:\n                  case REACT_FORWARD_REF_TYPE:\n                  case REACT_LAZY_TYPE:\n                  case REACT_MEMO_TYPE:\n                    return object;\n                  case REACT_CONSUMER_TYPE:\n                    return object;\n                  default:\n                    return $$typeof;\n                }\n            }\n          case REACT_PORTAL_TYPE:\n            return $$typeof;\n        }\n      }\n    }\n    var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\n    exports.ContextConsumer = REACT_CONSUMER_TYPE;\n    exports.ContextProvider = REACT_CONTEXT_TYPE;\n    exports.Element = REACT_ELEMENT_TYPE;\n    exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Lazy = REACT_LAZY_TYPE;\n    exports.Memo = REACT_MEMO_TYPE;\n    exports.Portal = REACT_PORTAL_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n    exports.isContextConsumer = function (object) {\n      return typeOf(object) === REACT_CONSUMER_TYPE;\n    };\n    exports.isContextProvider = function (object) {\n      return typeOf(object) === REACT_CONTEXT_TYPE;\n    };\n    exports.isElement = function (object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    };\n    exports.isForwardRef = function (object) {\n      return typeOf(object) === REACT_FORWARD_REF_TYPE;\n    };\n    exports.isFragment = function (object) {\n      return typeOf(object) === REACT_FRAGMENT_TYPE;\n    };\n    exports.isLazy = function (object) {\n      return typeOf(object) === REACT_LAZY_TYPE;\n    };\n    exports.isMemo = function (object) {\n      return typeOf(object) === REACT_MEMO_TYPE;\n    };\n    exports.isPortal = function (object) {\n      return typeOf(object) === REACT_PORTAL_TYPE;\n    };\n    exports.isProfiler = function (object) {\n      return typeOf(object) === REACT_PROFILER_TYPE;\n    };\n    exports.isStrictMode = function (object) {\n      return typeOf(object) === REACT_STRICT_MODE_TYPE;\n    };\n    exports.isSuspense = function (object) {\n      return typeOf(object) === REACT_SUSPENSE_TYPE;\n    };\n    exports.isSuspenseList = function (object) {\n      return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n    };\n    exports.isValidElementType = function (type) {\n      return \"string\" === typeof type ||\n        \"function\" === typeof type ||\n        type === REACT_FRAGMENT_TYPE ||\n        type === REACT_PROFILER_TYPE ||\n        type === REACT_STRICT_MODE_TYPE ||\n        type === REACT_SUSPENSE_TYPE ||\n        type === REACT_SUSPENSE_LIST_TYPE ||\n        type === REACT_VIEW_TRANSITION_TYPE ||\n        (\"object\" === typeof type &&\n          null !== type &&\n          (type.$$typeof === REACT_LAZY_TYPE ||\n            type.$$typeof === REACT_MEMO_TYPE ||\n            type.$$typeof === REACT_CONTEXT_TYPE ||\n            type.$$typeof === REACT_CONSUMER_TYPE ||\n            type.$$typeof === REACT_FORWARD_REF_TYPE ||\n            type.$$typeof === REACT_CLIENT_REFERENCE ||\n            void 0 !== type.getModuleId))\n        ? !0\n        : !1;\n    };\n    exports.typeOf = typeOf;\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack-client.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function checkEvalAvailabilityOnceDev() {\n      if (!hasConfirmedEval) {\n        hasConfirmedEval = !0;\n        try {\n          (0, eval)(\"null\");\n        } catch ($jscomp$unused$catch) {\n          console.error(\n            \"eval() is not supported in this environment. This can happen if you started the Node.js process with --disallow-code-generation-from-strings, or if `eval` was patched by other means. React requires eval() in development mode for various debugging features like reconstructing callstacks from a different environment.\\nReact will never use eval() in production mode\"\n          );\n        }\n      }\n    }\n    function resolveClientReference(bundlerConfig, metadata) {\n      if (bundlerConfig) {\n        var moduleExports = bundlerConfig[metadata[0]];\n        if ((bundlerConfig = moduleExports && moduleExports[metadata[2]]))\n          moduleExports = bundlerConfig.name;\n        else {\n          bundlerConfig = moduleExports && moduleExports[\"*\"];\n          if (!bundlerConfig)\n            throw Error(\n              'Could not find the module \"' +\n                metadata[0] +\n                '\" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.'\n            );\n          moduleExports = metadata[2];\n        }\n        return 4 === metadata.length\n          ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1]\n          : [bundlerConfig.id, bundlerConfig.chunks, moduleExports];\n      }\n      return metadata;\n    }\n    function resolveServerReference(bundlerConfig, id) {\n      var name = \"\",\n        resolvedModuleData = bundlerConfig[id];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = id.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = id.slice(idx + 1)),\n          (resolvedModuleData = bundlerConfig[id.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              id +\n              '\" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      return resolvedModuleData.async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function requireAsyncModule(id) {\n      var promise = globalThis.__next_require__(id);\n      if (\"function\" !== typeof promise.then || \"fulfilled\" === promise.status)\n        return null;\n      promise.then(\n        function (value) {\n          promise.status = \"fulfilled\";\n          promise.value = value;\n        },\n        function (reason) {\n          promise.status = \"rejected\";\n          promise.reason = reason;\n        }\n      );\n      return promise;\n    }\n    function ignoreReject() {}\n    function preloadModule(metadata) {\n      for (\n        var chunks = metadata[1], promises = [], i = 0;\n        i < chunks.length;\n\n      ) {\n        var chunkId = chunks[i++];\n        chunks[i++];\n        var entry = chunkCache.get(chunkId);\n        if (void 0 === entry) {\n          entry = __webpack_chunk_load__(chunkId);\n          promises.push(entry);\n          var resolve = chunkCache.set.bind(chunkCache, chunkId, null);\n          entry.then(resolve, ignoreReject);\n          chunkCache.set(chunkId, entry);\n        } else null !== entry && promises.push(entry);\n      }\n      return 4 === metadata.length\n        ? 0 === promises.length\n          ? requireAsyncModule(metadata[0])\n          : Promise.all(promises).then(function () {\n              return requireAsyncModule(metadata[0]);\n            })\n        : 0 < promises.length\n          ? Promise.all(promises)\n          : null;\n    }\n    function requireModule(metadata) {\n      var moduleExports = globalThis.__next_require__(metadata[0]);\n      if (4 === metadata.length && \"function\" === typeof moduleExports.then)\n        if (\"fulfilled\" === moduleExports.status)\n          moduleExports = moduleExports.value;\n        else throw moduleExports.reason;\n      if (\"*\" === metadata[2]) return moduleExports;\n      if (\"\" === metadata[2])\n        return moduleExports.__esModule ? moduleExports.default : moduleExports;\n      if (hasOwnProperty.call(moduleExports, metadata[2]))\n        return moduleExports[metadata[2]];\n    }\n    function prepareDestinationWithChunks(\n      moduleLoading,\n      chunks,\n      nonce$jscomp$0\n    ) {\n      if (null !== moduleLoading)\n        for (var i = 1; i < chunks.length; i += 2) {\n          var nonce = nonce$jscomp$0,\n            JSCompiler_temp_const = ReactDOMSharedInternals.d,\n            JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X,\n            JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i];\n          var JSCompiler_inline_result = moduleLoading.crossOrigin;\n          JSCompiler_inline_result =\n            \"string\" === typeof JSCompiler_inline_result\n              ? \"use-credentials\" === JSCompiler_inline_result\n                ? JSCompiler_inline_result\n                : \"\"\n              : void 0;\n          JSCompiler_temp_const$jscomp$0.call(\n            JSCompiler_temp_const,\n            JSCompiler_temp_const$jscomp$1,\n            {\n              crossOrigin: JSCompiler_inline_result,\n              integrity: void 0,\n              fetchPriority: void 0,\n              nonce: nonce\n            }\n          );\n        }\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function isObjectPrototype(object) {\n      if (!object) return !1;\n      var ObjectPrototype = Object.prototype;\n      if (object === ObjectPrototype) return !0;\n      if (getPrototypeOf(object)) return !1;\n      object = Object.getOwnPropertyNames(object);\n      for (var i = 0; i < object.length; i++)\n        if (!(object[i] in ObjectPrototype)) return !1;\n      return !0;\n    }\n    function isSimpleObject(object) {\n      if (!isObjectPrototype(getPrototypeOf(object))) return !1;\n      for (\n        var names = Object.getOwnPropertyNames(object), i = 0;\n        i < names.length;\n        i++\n      ) {\n        var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);\n        if (\n          !descriptor ||\n          (!descriptor.enumerable &&\n            ((\"key\" !== names[i] && \"ref\" !== names[i]) ||\n              \"function\" !== typeof descriptor.get))\n        )\n          return !1;\n      }\n      return !0;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function serializeNumber(number) {\n      return Number.isFinite(number)\n        ? 0 === number && -Infinity === 1 / number\n          ? \"$-0\"\n          : number\n        : Infinity === number\n          ? \"$Infinity\"\n          : -Infinity === number\n            ? \"$-Infinity\"\n            : \"$NaN\";\n    }\n    function processReply(\n      root,\n      formFieldPrefix,\n      temporaryReferences,\n      resolve,\n      reject\n    ) {\n      function serializeTypedArray(tag, typedArray) {\n        typedArray = new Blob([\n          new Uint8Array(\n            typedArray.buffer,\n            typedArray.byteOffset,\n            typedArray.byteLength\n          )\n        ]);\n        var blobId = nextPartId++;\n        null === formData && (formData = new FormData());\n        formData.append(formFieldPrefix + blobId, typedArray);\n        return \"$\" + tag + blobId.toString(16);\n      }\n      function serializeBinaryReader(reader) {\n        function progress(entry) {\n          entry.done\n            ? ((entry = nextPartId++),\n              data.append(formFieldPrefix + entry, new Blob(buffer)),\n              data.append(\n                formFieldPrefix + streamId,\n                '\"$o' + entry.toString(16) + '\"'\n              ),\n              data.append(formFieldPrefix + streamId, \"C\"),\n              pendingParts--,\n              0 === pendingParts && resolve(data))\n            : (buffer.push(entry.value),\n              reader.read(new Uint8Array(1024)).then(progress, reject));\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++,\n          buffer = [];\n        reader.read(new Uint8Array(1024)).then(progress, reject);\n        return \"$r\" + streamId.toString(16);\n      }\n      function serializeReader(reader) {\n        function progress(entry) {\n          if (entry.done)\n            data.append(formFieldPrefix + streamId, \"C\"),\n              pendingParts--,\n              0 === pendingParts && resolve(data);\n          else\n            try {\n              var partJSON = JSON.stringify(entry.value, resolveToJSON);\n              data.append(formFieldPrefix + streamId, partJSON);\n              reader.read().then(progress, reject);\n            } catch (x) {\n              reject(x);\n            }\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++;\n        reader.read().then(progress, reject);\n        return \"$R\" + streamId.toString(16);\n      }\n      function serializeReadableStream(stream) {\n        try {\n          var binaryReader = stream.getReader({ mode: \"byob\" });\n        } catch (x) {\n          return serializeReader(stream.getReader());\n        }\n        return serializeBinaryReader(binaryReader);\n      }\n      function serializeAsyncIterable(iterable, iterator) {\n        function progress(entry) {\n          if (entry.done) {\n            if (void 0 === entry.value)\n              data.append(formFieldPrefix + streamId, \"C\");\n            else\n              try {\n                var partJSON = JSON.stringify(entry.value, resolveToJSON);\n                data.append(formFieldPrefix + streamId, \"C\" + partJSON);\n              } catch (x) {\n                reject(x);\n                return;\n              }\n            pendingParts--;\n            0 === pendingParts && resolve(data);\n          } else\n            try {\n              var _partJSON = JSON.stringify(entry.value, resolveToJSON);\n              data.append(formFieldPrefix + streamId, _partJSON);\n              iterator.next().then(progress, reject);\n            } catch (x$0) {\n              reject(x$0);\n            }\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++;\n        iterable = iterable === iterator;\n        iterator.next().then(progress, reject);\n        return \"$\" + (iterable ? \"x\" : \"X\") + streamId.toString(16);\n      }\n      function resolveToJSON(key, value) {\n        \"__proto__\" === key &&\n          console.error(\n            \"Expected not to serialize an object with own property `__proto__`. When parsed this property will be omitted.%s\",\n            describeObjectForErrorMessage(this, key)\n          );\n        var originalValue = this[key];\n        \"object\" !== typeof originalValue ||\n          originalValue === value ||\n          originalValue instanceof Date ||\n          (\"Object\" !== objectName(originalValue)\n            ? console.error(\n                \"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s\",\n                objectName(originalValue),\n                describeObjectForErrorMessage(this, key)\n              )\n            : console.error(\n                \"Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s\",\n                describeObjectForErrorMessage(this, key)\n              ));\n        if (null === value) return null;\n        if (\"object\" === typeof value) {\n          switch (value.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              if (void 0 !== temporaryReferences && -1 === key.indexOf(\":\")) {\n                var parentReference = writtenObjects.get(this);\n                if (void 0 !== parentReference)\n                  return (\n                    temporaryReferences.set(parentReference + \":\" + key, value),\n                    \"$T\"\n                  );\n              }\n              if (void 0 !== temporaryReferences && modelRoot === value)\n                return (modelRoot = null), \"$T\";\n              throw Error(\n                \"React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.\" +\n                  describeObjectForErrorMessage(this, key)\n              );\n            case REACT_LAZY_TYPE:\n              originalValue = value._payload;\n              var init = value._init;\n              null === formData && (formData = new FormData());\n              pendingParts++;\n              try {\n                parentReference = init(originalValue);\n                var lazyId = nextPartId++,\n                  partJSON = serializeModel(parentReference, lazyId);\n                formData.append(formFieldPrefix + lazyId, partJSON);\n                return \"$\" + lazyId.toString(16);\n              } catch (x) {\n                if (\n                  \"object\" === typeof x &&\n                  null !== x &&\n                  \"function\" === typeof x.then\n                ) {\n                  pendingParts++;\n                  var _lazyId = nextPartId++;\n                  parentReference = function () {\n                    try {\n                      var _partJSON2 = serializeModel(value, _lazyId),\n                        _data = formData;\n                      _data.append(formFieldPrefix + _lazyId, _partJSON2);\n                      pendingParts--;\n                      0 === pendingParts && resolve(_data);\n                    } catch (reason) {\n                      reject(reason);\n                    }\n                  };\n                  x.then(parentReference, parentReference);\n                  return \"$\" + _lazyId.toString(16);\n                }\n                reject(x);\n                return null;\n              } finally {\n                pendingParts--;\n              }\n          }\n          parentReference = writtenObjects.get(value);\n          if (\"function\" === typeof value.then) {\n            if (void 0 !== parentReference)\n              if (modelRoot === value) modelRoot = null;\n              else return parentReference;\n            null === formData && (formData = new FormData());\n            pendingParts++;\n            var promiseId = nextPartId++;\n            key = \"$@\" + promiseId.toString(16);\n            writtenObjects.set(value, key);\n            value.then(function (partValue) {\n              try {\n                var previousReference = writtenObjects.get(partValue);\n                var _partJSON3 =\n                  void 0 !== previousReference\n                    ? JSON.stringify(previousReference)\n                    : serializeModel(partValue, promiseId);\n                partValue = formData;\n                partValue.append(formFieldPrefix + promiseId, _partJSON3);\n                pendingParts--;\n                0 === pendingParts && resolve(partValue);\n              } catch (reason) {\n                reject(reason);\n              }\n            }, reject);\n            return key;\n          }\n          if (void 0 !== parentReference)\n            if (modelRoot === value) modelRoot = null;\n            else return parentReference;\n          else\n            -1 === key.indexOf(\":\") &&\n              ((parentReference = writtenObjects.get(this)),\n              void 0 !== parentReference &&\n                ((parentReference = parentReference + \":\" + key),\n                writtenObjects.set(value, parentReference),\n                void 0 !== temporaryReferences &&\n                  temporaryReferences.set(parentReference, value)));\n          if (isArrayImpl(value)) return value;\n          if (value instanceof FormData) {\n            null === formData && (formData = new FormData());\n            var _data3 = formData;\n            key = nextPartId++;\n            var prefix = formFieldPrefix + \"_\" + key + \"_\";\n            value.forEach(function (originalValue, originalKey) {\n              _data3.append(prefix + originalKey, originalValue);\n            });\n            return \"$K\" + key.toString(16);\n          }\n          if (value instanceof Map)\n            return (\n              (key = nextPartId++),\n              (parentReference = serializeModel(Array.from(value), key)),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + key, parentReference),\n              \"$Q\" + key.toString(16)\n            );\n          if (value instanceof Set)\n            return (\n              (key = nextPartId++),\n              (parentReference = serializeModel(Array.from(value), key)),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + key, parentReference),\n              \"$W\" + key.toString(16)\n            );\n          if (value instanceof ArrayBuffer)\n            return (\n              (key = new Blob([value])),\n              (parentReference = nextPartId++),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + parentReference, key),\n              \"$A\" + parentReference.toString(16)\n            );\n          if (value instanceof Int8Array)\n            return serializeTypedArray(\"O\", value);\n          if (value instanceof Uint8Array)\n            return serializeTypedArray(\"o\", value);\n          if (value instanceof Uint8ClampedArray)\n            return serializeTypedArray(\"U\", value);\n          if (value instanceof Int16Array)\n            return serializeTypedArray(\"S\", value);\n          if (value instanceof Uint16Array)\n            return serializeTypedArray(\"s\", value);\n          if (value instanceof Int32Array)\n            return serializeTypedArray(\"L\", value);\n          if (value instanceof Uint32Array)\n            return serializeTypedArray(\"l\", value);\n          if (value instanceof Float32Array)\n            return serializeTypedArray(\"G\", value);\n          if (value instanceof Float64Array)\n            return serializeTypedArray(\"g\", value);\n          if (value instanceof BigInt64Array)\n            return serializeTypedArray(\"M\", value);\n          if (value instanceof BigUint64Array)\n            return serializeTypedArray(\"m\", value);\n          if (value instanceof DataView) return serializeTypedArray(\"V\", value);\n          if (\"function\" === typeof Blob && value instanceof Blob)\n            return (\n              null === formData && (formData = new FormData()),\n              (key = nextPartId++),\n              formData.append(formFieldPrefix + key, value),\n              \"$B\" + key.toString(16)\n            );\n          if ((parentReference = getIteratorFn(value)))\n            return (\n              (parentReference = parentReference.call(value)),\n              parentReference === value\n                ? ((key = nextPartId++),\n                  (parentReference = serializeModel(\n                    Array.from(parentReference),\n                    key\n                  )),\n                  null === formData && (formData = new FormData()),\n                  formData.append(formFieldPrefix + key, parentReference),\n                  \"$i\" + key.toString(16))\n                : Array.from(parentReference)\n            );\n          if (\n            \"function\" === typeof ReadableStream &&\n            value instanceof ReadableStream\n          )\n            return serializeReadableStream(value);\n          parentReference = value[ASYNC_ITERATOR];\n          if (\"function\" === typeof parentReference)\n            return serializeAsyncIterable(value, parentReference.call(value));\n          parentReference = getPrototypeOf(value);\n          if (\n            parentReference !== ObjectPrototype$1 &&\n            (null === parentReference ||\n              null !== getPrototypeOf(parentReference))\n          ) {\n            if (void 0 === temporaryReferences)\n              throw Error(\n                \"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported.\" +\n                  describeObjectForErrorMessage(this, key)\n              );\n            return \"$T\";\n          }\n          value.$$typeof === REACT_CONTEXT_TYPE\n            ? console.error(\n                \"React Context Providers cannot be passed to Server Functions from the Client.%s\",\n                describeObjectForErrorMessage(this, key)\n              )\n            : \"Object\" !== objectName(value)\n              ? console.error(\n                  \"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s\",\n                  objectName(value),\n                  describeObjectForErrorMessage(this, key)\n                )\n              : isSimpleObject(value)\n                ? Object.getOwnPropertySymbols &&\n                  ((parentReference = Object.getOwnPropertySymbols(value)),\n                  0 < parentReference.length &&\n                    console.error(\n                      \"Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s\",\n                      parentReference[0].description,\n                      describeObjectForErrorMessage(this, key)\n                    ))\n                : console.error(\n                    \"Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s\",\n                    describeObjectForErrorMessage(this, key)\n                  );\n          return value;\n        }\n        if (\"string\" === typeof value) {\n          if (\"Z\" === value[value.length - 1] && this[key] instanceof Date)\n            return \"$D\" + value;\n          key = \"$\" === value[0] ? \"$\" + value : value;\n          return key;\n        }\n        if (\"boolean\" === typeof value) return value;\n        if (\"number\" === typeof value) return serializeNumber(value);\n        if (\"undefined\" === typeof value) return \"$undefined\";\n        if (\"function\" === typeof value) {\n          parentReference = knownServerReferences.get(value);\n          if (void 0 !== parentReference) {\n            key = writtenObjects.get(value);\n            if (void 0 !== key) return key;\n            key = JSON.stringify(\n              { id: parentReference.id, bound: parentReference.bound },\n              resolveToJSON\n            );\n            null === formData && (formData = new FormData());\n            parentReference = nextPartId++;\n            formData.set(formFieldPrefix + parentReference, key);\n            key = \"$h\" + parentReference.toString(16);\n            writtenObjects.set(value, key);\n            return key;\n          }\n          if (\n            void 0 !== temporaryReferences &&\n            -1 === key.indexOf(\":\") &&\n            ((parentReference = writtenObjects.get(this)),\n            void 0 !== parentReference)\n          )\n            return (\n              temporaryReferences.set(parentReference + \":\" + key, value), \"$T\"\n            );\n          throw Error(\n            \"Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.\"\n          );\n        }\n        if (\"symbol\" === typeof value) {\n          if (\n            void 0 !== temporaryReferences &&\n            -1 === key.indexOf(\":\") &&\n            ((parentReference = writtenObjects.get(this)),\n            void 0 !== parentReference)\n          )\n            return (\n              temporaryReferences.set(parentReference + \":\" + key, value), \"$T\"\n            );\n          throw Error(\n            \"Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.\" +\n              describeObjectForErrorMessage(this, key)\n          );\n        }\n        if (\"bigint\" === typeof value) return \"$n\" + value.toString(10);\n        throw Error(\n          \"Type \" +\n            typeof value +\n            \" is not supported as an argument to a Server Function.\"\n        );\n      }\n      function serializeModel(model, id) {\n        \"object\" === typeof model &&\n          null !== model &&\n          ((id = \"$\" + id.toString(16)),\n          writtenObjects.set(model, id),\n          void 0 !== temporaryReferences && temporaryReferences.set(id, model));\n        modelRoot = model;\n        return JSON.stringify(model, resolveToJSON);\n      }\n      var nextPartId = 1,\n        pendingParts = 0,\n        formData = null,\n        writtenObjects = new WeakMap(),\n        modelRoot = root;\n      checkEvalAvailabilityOnceDev();\n      var json = serializeModel(root, 0);\n      null === formData\n        ? resolve(json)\n        : (formData.set(formFieldPrefix + \"0\", json),\n          0 === pendingParts && resolve(formData));\n      return function () {\n        0 < pendingParts &&\n          ((pendingParts = 0),\n          null === formData ? resolve(json) : resolve(formData));\n      };\n    }\n    function encodeFormData(reference) {\n      var resolve,\n        reject,\n        thenable = new Promise(function (res, rej) {\n          resolve = res;\n          reject = rej;\n        });\n      processReply(\n        reference,\n        \"\",\n        void 0,\n        function (body) {\n          if (\"string\" === typeof body) {\n            var data = new FormData();\n            data.append(\"0\", body);\n            body = data;\n          }\n          thenable.status = \"fulfilled\";\n          thenable.value = body;\n          resolve(body);\n        },\n        function (e) {\n          thenable.status = \"rejected\";\n          thenable.reason = e;\n          reject(e);\n        }\n      );\n      return thenable;\n    }\n    function defaultEncodeFormAction(identifierPrefix) {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure)\n        throw Error(\n          \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n        );\n      var data = null;\n      if (null !== referenceClosure.bound) {\n        data = boundCache.get(referenceClosure);\n        data ||\n          ((data = encodeFormData({\n            id: referenceClosure.id,\n            bound: referenceClosure.bound\n          })),\n          boundCache.set(referenceClosure, data));\n        if (\"rejected\" === data.status) throw data.reason;\n        if (\"fulfilled\" !== data.status) throw data;\n        referenceClosure = data.value;\n        var prefixedData = new FormData();\n        referenceClosure.forEach(function (value, key) {\n          prefixedData.append(\"$ACTION_\" + identifierPrefix + \":\" + key, value);\n        });\n        data = prefixedData;\n        referenceClosure = \"$ACTION_REF_\" + identifierPrefix;\n      } else referenceClosure = \"$ACTION_ID_\" + referenceClosure.id;\n      return {\n        name: referenceClosure,\n        method: \"POST\",\n        encType: \"multipart/form-data\",\n        data: data\n      };\n    }\n    function isSignatureEqual(referenceId, numberOfBoundArgs) {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure)\n        throw Error(\n          \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n        );\n      if (referenceClosure.id !== referenceId) return !1;\n      var boundPromise = referenceClosure.bound;\n      if (null === boundPromise) return 0 === numberOfBoundArgs;\n      switch (boundPromise.status) {\n        case \"fulfilled\":\n          return boundPromise.value.length === numberOfBoundArgs;\n        case \"pending\":\n          throw boundPromise;\n        case \"rejected\":\n          throw boundPromise.reason;\n        default:\n          throw (\n            (\"string\" !== typeof boundPromise.status &&\n              ((boundPromise.status = \"pending\"),\n              boundPromise.then(\n                function (boundArgs) {\n                  boundPromise.status = \"fulfilled\";\n                  boundPromise.value = boundArgs;\n                },\n                function (error) {\n                  boundPromise.status = \"rejected\";\n                  boundPromise.reason = error;\n                }\n              )),\n            boundPromise)\n          );\n      }\n    }\n    function createFakeServerFunction(\n      name,\n      filename,\n      sourceMap,\n      line,\n      col,\n      environmentName,\n      innerFunction\n    ) {\n      name || (name = \"<anonymous>\");\n      var encodedName = JSON.stringify(name);\n      1 >= line\n        ? ((line = encodedName.length + 7),\n          (col =\n            \"s=>({\" +\n            encodedName +\n            \" \".repeat(col < line ? 0 : col - line) +\n            \":(...args) => s(...args)})\\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */\"))\n        : (col =\n            \"/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */\" +\n            \"\\n\".repeat(line - 2) +\n            \"server=>({\" +\n            encodedName +\n            \":\\n\" +\n            \" \".repeat(1 > col ? 0 : col - 1) +\n            \"(...args) => server(...args)})\");\n      filename.startsWith(\"/\") && (filename = \"file://\" + filename);\n      sourceMap\n        ? ((col +=\n            \"\\n//# sourceURL=about://React/\" +\n            encodeURIComponent(environmentName) +\n            \"/\" +\n            encodeURI(filename) +\n            \"?s\" +\n            fakeServerFunctionIdx++),\n          (col += \"\\n//# sourceMappingURL=\" + sourceMap))\n        : filename && (col += \"\\n//# sourceURL=\" + filename);\n      try {\n        return (0, eval)(col)(innerFunction)[name];\n      } catch (x) {\n        return innerFunction;\n      }\n    }\n    function registerBoundServerReference(\n      reference,\n      id,\n      bound,\n      encodeFormAction\n    ) {\n      knownServerReferences.has(reference) ||\n        (knownServerReferences.set(reference, {\n          id: id,\n          originalBind: reference.bind,\n          bound: bound\n        }),\n        Object.defineProperties(reference, {\n          $$FORM_ACTION: {\n            value:\n              void 0 === encodeFormAction\n                ? defaultEncodeFormAction\n                : function () {\n                    var referenceClosure = knownServerReferences.get(this);\n                    if (!referenceClosure)\n                      throw Error(\n                        \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n                      );\n                    var boundPromise = referenceClosure.bound;\n                    null === boundPromise &&\n                      (boundPromise = Promise.resolve([]));\n                    return encodeFormAction(referenceClosure.id, boundPromise);\n                  }\n          },\n          $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },\n          bind: { value: bind }\n        }));\n    }\n    function bind() {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure) return FunctionBind.apply(this, arguments);\n      var newFn = referenceClosure.originalBind.apply(this, arguments);\n      null != arguments[0] &&\n        console.error(\n          'Cannot bind \"this\" of a Server Action. Pass null or undefined as the first argument to .bind().'\n        );\n      var args = ArraySlice.call(arguments, 1),\n        boundPromise = null;\n      boundPromise =\n        null !== referenceClosure.bound\n          ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) {\n              return boundArgs.concat(args);\n            })\n          : Promise.resolve(args);\n      knownServerReferences.set(newFn, {\n        id: referenceClosure.id,\n        originalBind: newFn.bind,\n        bound: boundPromise\n      });\n      Object.defineProperties(newFn, {\n        $$FORM_ACTION: { value: this.$$FORM_ACTION },\n        $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },\n        bind: { value: bind }\n      });\n      return newFn;\n    }\n    function createBoundServerReference(\n      metaData,\n      callServer,\n      encodeFormAction,\n      findSourceMapURL\n    ) {\n      function action() {\n        var args = Array.prototype.slice.call(arguments);\n        return bound\n          ? \"fulfilled\" === bound.status\n            ? callServer(id, bound.value.concat(args))\n            : Promise.resolve(bound).then(function (boundArgs) {\n                return callServer(id, boundArgs.concat(args));\n              })\n          : callServer(id, args);\n      }\n      var id = metaData.id,\n        bound = metaData.bound,\n        location = metaData.location;\n      if (location) {\n        var functionName = metaData.name || \"\",\n          filename = location[1],\n          line = location[2];\n        location = location[3];\n        metaData = metaData.env || \"Server\";\n        findSourceMapURL =\n          null == findSourceMapURL\n            ? null\n            : findSourceMapURL(filename, metaData);\n        action = createFakeServerFunction(\n          functionName,\n          filename,\n          findSourceMapURL,\n          line,\n          location,\n          metaData,\n          action\n        );\n      }\n      registerBoundServerReference(action, id, bound, encodeFormAction);\n      return action;\n    }\n    function parseStackLocation(error) {\n      error = error.stack;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      var endOfFirst = error.indexOf(\"\\n\");\n      if (-1 !== endOfFirst) {\n        var endOfSecond = error.indexOf(\"\\n\", endOfFirst + 1);\n        endOfFirst =\n          -1 === endOfSecond\n            ? error.slice(endOfFirst + 1)\n            : error.slice(endOfFirst + 1, endOfSecond);\n      } else endOfFirst = error;\n      error = v8FrameRegExp.exec(endOfFirst);\n      if (\n        !error &&\n        ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error)\n      )\n        return null;\n      endOfFirst = error[1] || \"\";\n      \"<anonymous>\" === endOfFirst && (endOfFirst = \"\");\n      endOfSecond = error[2] || error[5] || \"\";\n      \"<anonymous>\" === endOfSecond && (endOfSecond = \"\");\n      return [\n        endOfFirst,\n        endOfSecond,\n        +(error[3] || error[6]),\n        +(error[4] || error[7])\n      ];\n    }\n    function createServerReference$1(\n      id,\n      callServer,\n      encodeFormAction,\n      findSourceMapURL,\n      functionName\n    ) {\n      function action() {\n        var args = Array.prototype.slice.call(arguments);\n        return callServer(id, args);\n      }\n      var location = parseStackLocation(Error(\"react-stack-top-frame\"));\n      if (null !== location) {\n        var filename = location[1],\n          line = location[2];\n        location = location[3];\n        findSourceMapURL =\n          null == findSourceMapURL\n            ? null\n            : findSourceMapURL(filename, \"Client\");\n        action = createFakeServerFunction(\n          functionName || \"\",\n          filename,\n          findSourceMapURL,\n          line,\n          location,\n          \"Client\",\n          action\n        );\n      }\n      registerBoundServerReference(action, id, null, encodeFormAction);\n      return action;\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getArrayKind(array) {\n      for (var kind = 0, i = 0; i < array.length && 100 > i; i++) {\n        var value = array[i];\n        if (\"object\" === typeof value && null !== value)\n          if (\n            isArrayImpl(value) &&\n            2 === value.length &&\n            \"string\" === typeof value[0]\n          ) {\n            if (0 !== kind && 3 !== kind) return 1;\n            kind = 3;\n          } else return 1;\n        else {\n          if (\n            \"function\" === typeof value ||\n            (\"string\" === typeof value && 50 < value.length) ||\n            (0 !== kind && 2 !== kind) ||\n            \"bigint\" === typeof value\n          )\n            return 1;\n          kind = 2;\n        }\n      }\n      return kind;\n    }\n    function addObjectToProperties(object, properties, indent, prefix) {\n      if (!ArrayBuffer.isView(object)) {\n        var addedProperties = 0,\n          key;\n        for (key in object)\n          if (\n            hasOwnProperty.call(object, key) &&\n            \"_\" !== key[0] &&\n            (addedProperties++,\n            addValueToProperties(key, object[key], properties, indent, prefix),\n            100 <= addedProperties)\n          ) {\n            properties.push([\n              prefix +\n                \"\\u00a0\\u00a0\".repeat(indent) +\n                \"Only 100 properties are shown. React will not log more properties of this object.\",\n              \"\"\n            ]);\n            break;\n          }\n      }\n    }\n    function addValueToProperties(\n      propertyName,\n      value,\n      properties,\n      indent,\n      prefix\n    ) {\n      switch (typeof value) {\n        case \"object\":\n          if (null === value) {\n            value = \"null\";\n            break;\n          } else {\n            if (\n              (\"$$typeof\" in value && hasOwnProperty.call(value, \"$$typeof\")\n                ? value.$$typeof\n                : void 0) === REACT_ELEMENT_TYPE\n            ) {\n              var typeName = getComponentNameFromType(value.type) || \"\\u2026\",\n                key = value.key;\n              value = value.props;\n              var propsKeys = Object.keys(value),\n                propsLength = propsKeys.length;\n              if (null == key && 0 === propsLength) {\n                value = \"<\" + typeName + \" />\";\n                break;\n              }\n              if (\n                3 > indent ||\n                (1 === propsLength &&\n                  \"children\" === propsKeys[0] &&\n                  null == key)\n              ) {\n                value = \"<\" + typeName + \" \\u2026 />\";\n                break;\n              }\n              properties.push([\n                prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"<\" + typeName\n              ]);\n              null !== key &&\n                addValueToProperties(\n                  \"key\",\n                  key,\n                  properties,\n                  indent + 1,\n                  prefix\n                );\n              propertyName = !1;\n              key = 0;\n              for (var propKey in value)\n                if (\n                  (key++,\n                  \"children\" === propKey\n                    ? null != value.children &&\n                      (!isArrayImpl(value.children) ||\n                        0 < value.children.length) &&\n                      (propertyName = !0)\n                    : hasOwnProperty.call(value, propKey) &&\n                      \"_\" !== propKey[0] &&\n                      addValueToProperties(\n                        propKey,\n                        value[propKey],\n                        properties,\n                        indent + 1,\n                        prefix\n                      ),\n                  100 <= key)\n                )\n                  break;\n              properties.push([\n                \"\",\n                propertyName ? \">\\u2026</\" + typeName + \">\" : \"/>\"\n              ]);\n              return;\n            }\n            typeName = Object.prototype.toString.call(value);\n            typeName = typeName.slice(8, typeName.length - 1);\n            if (ArrayBuffer.isView(value)) {\n              value = value.length;\n              value =\n                \"number\" === typeof value\n                  ? typeName + \"(\" + value + \")\"\n                  : typeName;\n              break;\n            }\n            if (\"Array\" === typeName)\n              if (\n                ((propKey = 100 < value.length),\n                (key = getArrayKind(value)),\n                2 === key || 0 === key)\n              ) {\n                value = JSON.stringify(\n                  propKey ? value.slice(0, 100).concat(\"\\u2026\") : value\n                );\n                break;\n              } else if (3 === key) {\n                properties.push([\n                  prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                  \"\"\n                ]);\n                for (\n                  propertyName = 0;\n                  propertyName < value.length && 100 > propertyName;\n                  propertyName++\n                )\n                  (typeName = value[propertyName]),\n                    addValueToProperties(\n                      typeName[0],\n                      typeName[1],\n                      properties,\n                      indent + 1,\n                      prefix\n                    );\n                propKey &&\n                  addValueToProperties(\n                    (100).toString(),\n                    \"\\u2026\",\n                    properties,\n                    indent + 1,\n                    prefix\n                  );\n                return;\n              }\n            if (\"Promise\" === typeName) {\n              if (\"fulfilled\" === value.status) {\n                if (\n                  ((typeName = properties.length),\n                  addValueToProperties(\n                    propertyName,\n                    value.value,\n                    properties,\n                    indent,\n                    prefix\n                  ),\n                  properties.length > typeName)\n                ) {\n                  properties = properties[typeName];\n                  properties[1] =\n                    \"Promise<\" + (properties[1] || \"Object\") + \">\";\n                  return;\n                }\n              } else if (\n                \"rejected\" === value.status &&\n                ((typeName = properties.length),\n                addValueToProperties(\n                  propertyName,\n                  value.reason,\n                  properties,\n                  indent,\n                  prefix\n                ),\n                properties.length > typeName)\n              ) {\n                properties = properties[typeName];\n                properties[1] = \"Rejected Promise<\" + properties[1] + \">\";\n                return;\n              }\n              properties.push([\n                \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"Promise\"\n              ]);\n              return;\n            }\n            \"Object\" === typeName &&\n              (propKey = Object.getPrototypeOf(value)) &&\n              \"function\" === typeof propKey.constructor &&\n              (typeName = propKey.constructor.name);\n            properties.push([\n              prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n              \"Object\" === typeName ? (3 > indent ? \"\" : \"\\u2026\") : typeName\n            ]);\n            3 > indent &&\n              addObjectToProperties(value, properties, indent + 1, prefix);\n            return;\n          }\n        case \"function\":\n          value = value.name;\n          value =\n            \"\" === value || \"string\" !== typeof value\n              ? \"() => {}\"\n              : value + \"() {}\";\n          break;\n        case \"string\":\n          value =\n            \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\" ===\n            value\n              ? \"\\u2026\"\n              : JSON.stringify(\n                  1024 <= value.length ? value.slice(0, 1023) + \"\\u2026\" : value\n                );\n          break;\n        case \"undefined\":\n          value = \"undefined\";\n          break;\n        case \"boolean\":\n          value = value ? \"true\" : \"false\";\n          break;\n        default:\n          value = String(value);\n      }\n      properties.push([\n        prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n        value\n      ]);\n    }\n    function getIODescription(value) {\n      try {\n        switch (typeof value) {\n          case \"function\":\n            return value.name || \"\";\n          case \"object\":\n            if (null === value) return \"\";\n            if (value instanceof Error) return String(value.message);\n            if (\"string\" === typeof value.url) return value.url;\n            if (\"string\" === typeof value.href) return value.href;\n            if (\"string\" === typeof value.src) return value.src;\n            if (\"string\" === typeof value.currentSrc) return value.currentSrc;\n            if (\"string\" === typeof value.command) return value.command;\n            if (\n              \"object\" === typeof value.request &&\n              null !== value.request &&\n              \"string\" === typeof value.request.url\n            )\n              return value.request.url;\n            if (\n              \"object\" === typeof value.response &&\n              null !== value.response &&\n              \"string\" === typeof value.response.url\n            )\n              return value.response.url;\n            if (\n              \"string\" === typeof value.id ||\n              \"number\" === typeof value.id ||\n              \"bigint\" === typeof value.id\n            )\n              return String(value.id);\n            if (\"string\" === typeof value.name) return value.name;\n            var str = value.toString();\n            return str.startsWith(\"[object \") ||\n              5 > str.length ||\n              500 < str.length\n              ? \"\"\n              : str;\n          case \"string\":\n            return 5 > value.length || 500 < value.length ? \"\" : value;\n          case \"number\":\n          case \"bigint\":\n            return String(value);\n          default:\n            return \"\";\n        }\n      } catch (x) {\n        return \"\";\n      }\n    }\n    function markAllTracksInOrder() {\n      supportsUserTiming &&\n        (console.timeStamp(\n          \"Server Requests Track\",\n          0.001,\n          0.001,\n          \"Server Requests \\u269b\",\n          void 0,\n          \"primary-light\"\n        ),\n        console.timeStamp(\n          \"Server Components Track\",\n          0.001,\n          0.001,\n          \"Primary\",\n          \"Server Components \\u269b\",\n          \"primary-light\"\n        ));\n    }\n    function getIOColor(functionName) {\n      switch (functionName.charCodeAt(0) % 3) {\n        case 0:\n          return \"tertiary-light\";\n        case 1:\n          return \"tertiary\";\n        default:\n          return \"tertiary-dark\";\n      }\n    }\n    function getIOLongName(ioInfo, description, env, rootEnv) {\n      ioInfo = ioInfo.name;\n      description =\n        \"\" === description ? ioInfo : ioInfo + \" (\" + description + \")\";\n      return env === rootEnv || void 0 === env\n        ? description\n        : description + \" [\" + env + \"]\";\n    }\n    function getIOShortName(ioInfo, description, env, rootEnv) {\n      ioInfo = ioInfo.name;\n      env = env === rootEnv || void 0 === env ? \"\" : \" [\" + env + \"]\";\n      var desc = \"\";\n      rootEnv = 30 - ioInfo.length - env.length;\n      if (1 < rootEnv) {\n        var l = description.length;\n        if (0 < l && l <= rootEnv) desc = \" (\" + description + \")\";\n        else if (\n          description.startsWith(\"http://\") ||\n          description.startsWith(\"https://\") ||\n          description.startsWith(\"/\")\n        ) {\n          var queryIdx = description.indexOf(\"?\");\n          -1 === queryIdx && (queryIdx = description.length);\n          47 === description.charCodeAt(queryIdx - 1) && queryIdx--;\n          desc = description.lastIndexOf(\"/\", queryIdx - 1);\n          queryIdx - desc < rootEnv\n            ? (desc = \" (\\u2026\" + description.slice(desc, queryIdx) + \")\")\n            : ((l = description.slice(desc, desc + rootEnv / 2)),\n              (description = description.slice(\n                queryIdx - rootEnv / 2,\n                queryIdx\n              )),\n              (desc =\n                \" (\" +\n                (0 < desc ? \"\\u2026\" : \"\") +\n                l +\n                \"\\u2026\" +\n                description +\n                \")\"));\n        }\n      }\n      return ioInfo + desc + env;\n    }\n    function logComponentAwait(\n      asyncInfo,\n      trackIdx,\n      startTime,\n      endTime,\n      rootEnv,\n      value\n    ) {\n      if (supportsUserTiming && 0 < endTime) {\n        var description = getIODescription(value),\n          name = getIOShortName(\n            asyncInfo.awaited,\n            description,\n            asyncInfo.env,\n            rootEnv\n          ),\n          entryName = \"await \" + name;\n        name = getIOColor(name);\n        var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask;\n        if (debugTask) {\n          var properties = [];\n          \"object\" === typeof value && null !== value\n            ? addObjectToProperties(value, properties, 0, \"\")\n            : void 0 !== value &&\n              addValueToProperties(\"awaited value\", value, properties, 0, \"\");\n          asyncInfo = getIOLongName(\n            asyncInfo.awaited,\n            description,\n            asyncInfo.env,\n            rootEnv\n          );\n          debugTask.run(\n            performance.measure.bind(performance, entryName, {\n              start: 0 > startTime ? 0 : startTime,\n              end: endTime,\n              detail: {\n                devtools: {\n                  color: name,\n                  track: trackNames[trackIdx],\n                  trackGroup: \"Server Components \\u269b\",\n                  properties: properties,\n                  tooltipText: asyncInfo\n                }\n              }\n            })\n          );\n          performance.clearMeasures(entryName);\n        } else\n          console.timeStamp(\n            entryName,\n            0 > startTime ? 0 : startTime,\n            endTime,\n            trackNames[trackIdx],\n            \"Server Components \\u269b\",\n            name\n          );\n      }\n    }\n    function logIOInfoErrored(ioInfo, rootEnv, error) {\n      var startTime = ioInfo.start,\n        endTime = ioInfo.end;\n      if (supportsUserTiming && 0 <= endTime) {\n        var description = getIODescription(error),\n          entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),\n          debugTask = ioInfo.debugTask;\n        entryName = \"\\u200b\" + entryName;\n        debugTask\n          ? ((error = [\n              [\n                \"rejected with\",\n                \"object\" === typeof error &&\n                null !== error &&\n                \"string\" === typeof error.message\n                  ? String(error.message)\n                  : String(error)\n              ]\n            ]),\n            (ioInfo =\n              getIOLongName(ioInfo, description, ioInfo.env, rootEnv) +\n              \" Rejected\"),\n            debugTask.run(\n              performance.measure.bind(performance, entryName, {\n                start: 0 > startTime ? 0 : startTime,\n                end: endTime,\n                detail: {\n                  devtools: {\n                    color: \"error\",\n                    track: \"Server Requests \\u269b\",\n                    properties: error,\n                    tooltipText: ioInfo\n                  }\n                }\n              })\n            ),\n            performance.clearMeasures(entryName))\n          : console.timeStamp(\n              entryName,\n              0 > startTime ? 0 : startTime,\n              endTime,\n              \"Server Requests \\u269b\",\n              void 0,\n              \"error\"\n            );\n      }\n    }\n    function logIOInfo(ioInfo, rootEnv, value) {\n      var startTime = ioInfo.start,\n        endTime = ioInfo.end;\n      if (supportsUserTiming && 0 <= endTime) {\n        var description = getIODescription(value),\n          entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),\n          color = getIOColor(entryName),\n          debugTask = ioInfo.debugTask;\n        entryName = \"\\u200b\" + entryName;\n        if (debugTask) {\n          var properties = [];\n          \"object\" === typeof value && null !== value\n            ? addObjectToProperties(value, properties, 0, \"\")\n            : void 0 !== value &&\n              addValueToProperties(\"Resolved\", value, properties, 0, \"\");\n          ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv);\n          debugTask.run(\n            performance.measure.bind(performance, entryName, {\n              start: 0 > startTime ? 0 : startTime,\n              end: endTime,\n              detail: {\n                devtools: {\n                  color: color,\n                  track: \"Server Requests \\u269b\",\n                  properties: properties,\n                  tooltipText: ioInfo\n                }\n              }\n            })\n          );\n          performance.clearMeasures(entryName);\n        } else\n          console.timeStamp(\n            entryName,\n            0 > startTime ? 0 : startTime,\n            endTime,\n            \"Server Requests \\u269b\",\n            void 0,\n            color\n          );\n      }\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function ReactPromise(status, value, reason) {\n      this.status = status;\n      this.value = value;\n      this.reason = reason;\n      this._children = [];\n      this._debugChunk = null;\n      this._debugInfo = [];\n    }\n    function hasGCedResponse(weakResponse) {\n      return void 0 === weakResponse.weak.deref();\n    }\n    function unwrapWeakResponse(weakResponse) {\n      weakResponse = weakResponse.weak.deref();\n      if (void 0 === weakResponse)\n        throw Error(\n          \"We did not expect to receive new data after GC:ing the response.\"\n        );\n      return weakResponse;\n    }\n    function closeDebugChannel(debugChannel) {\n      debugChannel.callback && debugChannel.callback(\"\");\n    }\n    function readChunk(chunk) {\n      switch (chunk.status) {\n        case \"resolved_model\":\n          initializeModelChunk(chunk);\n          break;\n        case \"resolved_module\":\n          initializeModuleChunk(chunk);\n      }\n      switch (chunk.status) {\n        case \"fulfilled\":\n          return chunk.value;\n        case \"pending\":\n        case \"blocked\":\n        case \"halted\":\n          throw chunk;\n        default:\n          throw chunk.reason;\n      }\n    }\n    function getRoot(weakResponse) {\n      weakResponse = unwrapWeakResponse(weakResponse);\n      return getChunk(weakResponse, 0);\n    }\n    function createPendingChunk(response) {\n      0 === response._pendingChunks++ &&\n        ((response._weakResponse.response = response),\n        null !== response._pendingInitialRender &&\n          (clearTimeout(response._pendingInitialRender),\n          (response._pendingInitialRender = null)));\n      return new ReactPromise(\"pending\", null, null);\n    }\n    function releasePendingChunk(response, chunk) {\n      \"pending\" === chunk.status &&\n        0 === --response._pendingChunks &&\n        ((response._weakResponse.response = null),\n        (response._pendingInitialRender = setTimeout(\n          flushInitialRenderPerformance.bind(null, response),\n          100\n        )));\n    }\n    function filterDebugInfo(response, value) {\n      if (null !== response._debugEndTime) {\n        response = response._debugEndTime - performance.timeOrigin;\n        for (var debugInfo = [], i = 0; i < value._debugInfo.length; i++) {\n          var info = value._debugInfo[i];\n          if (\"number\" === typeof info.time && info.time > response) break;\n          debugInfo.push(info);\n        }\n        value._debugInfo = debugInfo;\n      }\n    }\n    function moveDebugInfoFromChunkToInnerValue(chunk, value) {\n      value = resolveLazy(value);\n      \"object\" !== typeof value ||\n        null === value ||\n        (!isArrayImpl(value) &&\n          \"function\" !== typeof value[ASYNC_ITERATOR] &&\n          value.$$typeof !== REACT_ELEMENT_TYPE &&\n          value.$$typeof !== REACT_LAZY_TYPE) ||\n        ((chunk = chunk._debugInfo.splice(0)),\n        isArrayImpl(value._debugInfo)\n          ? value._debugInfo.unshift.apply(value._debugInfo, chunk)\n          : Object.isFrozen(value) ||\n            Object.defineProperty(value, \"_debugInfo\", {\n              configurable: !1,\n              enumerable: !1,\n              writable: !0,\n              value: chunk\n            }));\n    }\n    function wakeChunk(response, listeners, value, chunk) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(value)\n          : fulfillReference(response, listener, value, chunk);\n      }\n      filterDebugInfo(response, chunk);\n      moveDebugInfoFromChunkToInnerValue(chunk, value);\n    }\n    function rejectChunk(response, listeners, error) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(error)\n          : rejectReference(response, listener.handler, error);\n      }\n    }\n    function resolveBlockedCycle(resolvedChunk, reference) {\n      var referencedChunk = reference.handler.chunk;\n      if (null === referencedChunk) return null;\n      if (referencedChunk === resolvedChunk) return reference.handler;\n      reference = referencedChunk.value;\n      if (null !== reference)\n        for (\n          referencedChunk = 0;\n          referencedChunk < reference.length;\n          referencedChunk++\n        ) {\n          var listener = reference[referencedChunk];\n          if (\n            \"function\" !== typeof listener &&\n            ((listener = resolveBlockedCycle(resolvedChunk, listener)),\n            null !== listener)\n          )\n            return listener;\n        }\n      return null;\n    }\n    function wakeChunkIfInitialized(\n      response,\n      chunk,\n      resolveListeners,\n      rejectListeners\n    ) {\n      switch (chunk.status) {\n        case \"fulfilled\":\n          wakeChunk(response, resolveListeners, chunk.value, chunk);\n          break;\n        case \"blocked\":\n          for (var i = 0; i < resolveListeners.length; i++) {\n            var listener = resolveListeners[i];\n            if (\"function\" !== typeof listener) {\n              var cyclicHandler = resolveBlockedCycle(chunk, listener);\n              if (null !== cyclicHandler)\n                switch (\n                  (fulfillReference(\n                    response,\n                    listener,\n                    cyclicHandler.value,\n                    chunk\n                  ),\n                  resolveListeners.splice(i, 1),\n                  i--,\n                  null !== rejectListeners &&\n                    ((listener = rejectListeners.indexOf(listener)),\n                    -1 !== listener && rejectListeners.splice(listener, 1)),\n                  chunk.status)\n                ) {\n                  case \"fulfilled\":\n                    wakeChunk(response, resolveListeners, chunk.value, chunk);\n                    return;\n                  case \"rejected\":\n                    null !== rejectListeners &&\n                      rejectChunk(response, rejectListeners, chunk.reason);\n                    return;\n                }\n            }\n          }\n        case \"pending\":\n          if (chunk.value)\n            for (response = 0; response < resolveListeners.length; response++)\n              chunk.value.push(resolveListeners[response]);\n          else chunk.value = resolveListeners;\n          if (chunk.reason) {\n            if (rejectListeners)\n              for (\n                resolveListeners = 0;\n                resolveListeners < rejectListeners.length;\n                resolveListeners++\n              )\n                chunk.reason.push(rejectListeners[resolveListeners]);\n          } else chunk.reason = rejectListeners;\n          break;\n        case \"rejected\":\n          rejectListeners &&\n            rejectChunk(response, rejectListeners, chunk.reason);\n      }\n    }\n    function triggerErrorOnChunk(response, chunk, error) {\n      if (\"pending\" !== chunk.status && \"blocked\" !== chunk.status)\n        chunk.reason.error(error);\n      else {\n        releasePendingChunk(response, chunk);\n        var listeners = chunk.reason;\n        if (\"pending\" === chunk.status && null != chunk._debugChunk) {\n          var prevHandler = initializingHandler,\n            prevChunk = initializingChunk;\n          initializingHandler = null;\n          chunk.status = \"blocked\";\n          chunk.value = null;\n          chunk.reason = null;\n          initializingChunk = chunk;\n          try {\n            initializeDebugChunk(response, chunk);\n          } finally {\n            (initializingHandler = prevHandler),\n              (initializingChunk = prevChunk);\n          }\n        }\n        chunk.status = \"rejected\";\n        chunk.reason = error;\n        a: if (null !== response._debugEndTime)\n          for (\n            prevHandler = response._debugEndTime - performance.timeOrigin,\n              chunk = chunk._debugInfo,\n              prevChunk = 0;\n            prevChunk < chunk.length;\n            prevChunk++\n          ) {\n            var info = chunk[prevChunk];\n            if (\"number\" === typeof info.time && info.time > prevHandler) {\n              chunk.length = prevChunk;\n              break a;\n            }\n          }\n        null !== listeners && rejectChunk(response, listeners, error);\n      }\n    }\n    function createResolvedModelChunk(response, value) {\n      return new ReactPromise(\"resolved_model\", value, response);\n    }\n    function createResolvedIteratorResultChunk(response, value, done) {\n      return new ReactPromise(\n        \"resolved_model\",\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        response\n      );\n    }\n    function resolveIteratorResultChunk(response, chunk, value, done) {\n      resolveModelChunk(\n        response,\n        chunk,\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\"\n      );\n    }\n    function resolveModelChunk(response, chunk, value) {\n      if (\"pending\" !== chunk.status) chunk.reason.enqueueModel(value);\n      else {\n        releasePendingChunk(response, chunk);\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_model\";\n        chunk.value = value;\n        chunk.reason = response;\n        null !== resolveListeners &&\n          (initializeModelChunk(chunk),\n          wakeChunkIfInitialized(\n            response,\n            chunk,\n            resolveListeners,\n            rejectListeners\n          ));\n      }\n    }\n    function resolveModuleChunk(response, chunk, value) {\n      if (\"pending\" === chunk.status || \"blocked\" === chunk.status) {\n        releasePendingChunk(response, chunk);\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_module\";\n        chunk.value = value;\n        chunk.reason = null;\n        value = [];\n        null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value);\n        null !== resolveListeners &&\n          (initializeModuleChunk(chunk),\n          wakeChunkIfInitialized(\n            response,\n            chunk,\n            resolveListeners,\n            rejectListeners\n          ));\n      }\n    }\n    function initializeDebugChunk(response, chunk) {\n      var debugChunk = chunk._debugChunk;\n      if (null !== debugChunk) {\n        var debugInfo = chunk._debugInfo,\n          prevIsInitializingDebugInfo = isInitializingDebugInfo;\n        isInitializingDebugInfo = !0;\n        try {\n          if (\"resolved_model\" === debugChunk.status) {\n            for (\n              var idx = debugInfo.length, c = debugChunk._debugChunk;\n              null !== c;\n\n            )\n              \"fulfilled\" !== c.status && idx++, (c = c._debugChunk);\n            initializeModelChunk(debugChunk);\n            switch (debugChunk.status) {\n              case \"fulfilled\":\n                debugInfo[idx] = initializeDebugInfo(\n                  response,\n                  debugChunk.value\n                );\n                break;\n              case \"blocked\":\n              case \"pending\":\n                waitForReference(\n                  debugChunk,\n                  debugInfo,\n                  \"\" + idx,\n                  response,\n                  initializeDebugInfo,\n                  [\"\"],\n                  !0\n                );\n                break;\n              default:\n                throw debugChunk.reason;\n            }\n          } else\n            switch (debugChunk.status) {\n              case \"fulfilled\":\n                break;\n              case \"blocked\":\n              case \"pending\":\n                waitForReference(\n                  debugChunk,\n                  {},\n                  \"debug\",\n                  response,\n                  initializeDebugInfo,\n                  [\"\"],\n                  !0\n                );\n                break;\n              default:\n                throw debugChunk.reason;\n            }\n        } catch (error) {\n          triggerErrorOnChunk(response, chunk, error);\n        } finally {\n          isInitializingDebugInfo = prevIsInitializingDebugInfo;\n        }\n      }\n    }\n    function initializeModelChunk(chunk) {\n      var prevHandler = initializingHandler,\n        prevChunk = initializingChunk;\n      initializingHandler = null;\n      var resolvedModel = chunk.value,\n        response = chunk.reason;\n      chunk.status = \"blocked\";\n      chunk.value = null;\n      chunk.reason = null;\n      initializingChunk = chunk;\n      initializeDebugChunk(response, chunk);\n      try {\n        var value = parseModel(response, resolvedModel),\n          resolveListeners = chunk.value;\n        if (null !== resolveListeners)\n          for (\n            chunk.value = null, chunk.reason = null, resolvedModel = 0;\n            resolvedModel < resolveListeners.length;\n            resolvedModel++\n          ) {\n            var listener = resolveListeners[resolvedModel];\n            \"function\" === typeof listener\n              ? listener(value)\n              : fulfillReference(response, listener, value, chunk);\n          }\n        if (null !== initializingHandler) {\n          if (initializingHandler.errored) throw initializingHandler.reason;\n          if (0 < initializingHandler.deps) {\n            initializingHandler.value = value;\n            initializingHandler.chunk = chunk;\n            return;\n          }\n        }\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = null;\n        filterDebugInfo(response, chunk);\n        moveDebugInfoFromChunkToInnerValue(chunk, value);\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      } finally {\n        (initializingHandler = prevHandler), (initializingChunk = prevChunk);\n      }\n    }\n    function initializeModuleChunk(chunk) {\n      try {\n        var value = requireModule(chunk.value);\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = null;\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      }\n    }\n    function reportGlobalError(weakResponse, error) {\n      if (!hasGCedResponse(weakResponse)) {\n        var response = unwrapWeakResponse(weakResponse);\n        response._closed = !0;\n        response._closedReason = error;\n        response._chunks.forEach(function (chunk) {\n          \"pending\" === chunk.status\n            ? triggerErrorOnChunk(response, chunk, error)\n            : \"fulfilled\" === chunk.status &&\n              null !== chunk.reason &&\n              chunk.reason.error(error);\n        });\n        weakResponse = response._debugChannel;\n        void 0 !== weakResponse &&\n          (closeDebugChannel(weakResponse),\n          (response._debugChannel = void 0),\n          null !== debugChannelRegistry &&\n            debugChannelRegistry.unregister(response));\n      }\n    }\n    function nullRefGetter() {\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\"function\" === typeof type) return '\"use client\"';\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return type._init === readChunk ? '\"use client\"' : \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function initializeElement(response, element, lazyNode) {\n      var stack = element._debugStack,\n        owner = element._owner;\n      null === owner && (element._owner = response._debugRootOwner);\n      var env = response._rootEnvironmentName;\n      null !== owner && null != owner.env && (env = owner.env);\n      var normalizedStackTrace = null;\n      null === owner && null != response._debugRootStack\n        ? (normalizedStackTrace = response._debugRootStack)\n        : null !== stack &&\n          (normalizedStackTrace = createFakeJSXCallStackInDEV(\n            response,\n            stack,\n            env\n          ));\n      element._debugStack = normalizedStackTrace;\n      normalizedStackTrace = null;\n      supportsCreateTask &&\n        null !== stack &&\n        ((normalizedStackTrace = console.createTask.bind(\n          console,\n          getTaskName(element.type)\n        )),\n        (stack = buildFakeCallStack(\n          response,\n          stack,\n          env,\n          !1,\n          normalizedStackTrace\n        )),\n        (env = null === owner ? null : initializeFakeTask(response, owner)),\n        null === env\n          ? ((env = response._debugRootTask),\n            (normalizedStackTrace = null != env ? env.run(stack) : stack()))\n          : (normalizedStackTrace = env.run(stack)));\n      element._debugTask = normalizedStackTrace;\n      null !== owner && initializeFakeStack(response, owner);\n      null !== lazyNode &&\n        (lazyNode._store &&\n          lazyNode._store.validated &&\n          !element._store.validated &&\n          (element._store.validated = lazyNode._store.validated),\n        \"fulfilled\" === lazyNode._payload.status &&\n          lazyNode._debugInfo &&\n          ((response = lazyNode._debugInfo.splice(0)),\n          element._debugInfo\n            ? element._debugInfo.unshift.apply(element._debugInfo, response)\n            : Object.defineProperty(element, \"_debugInfo\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: response\n              })));\n      Object.freeze(element.props);\n    }\n    function createLazyChunkWrapper(chunk, validated) {\n      var lazyType = {\n        $$typeof: REACT_LAZY_TYPE,\n        _payload: chunk,\n        _init: readChunk\n      };\n      lazyType._debugInfo = chunk._debugInfo;\n      lazyType._store = { validated: validated };\n      return lazyType;\n    }\n    function getChunk(response, id) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk ||\n        (response._closed\n          ? response._allowPartialStream\n            ? ((response = chunk = createPendingChunk(response)),\n              (response.status = \"halted\"),\n              (response.value = null),\n              (response.reason = null))\n            : (chunk = new ReactPromise(\n                \"rejected\",\n                null,\n                response._closedReason\n              ))\n          : (chunk = createPendingChunk(response)),\n        chunks.set(id, chunk));\n      return chunk;\n    }\n    function fulfillReference(response, reference, value, fulfilledChunk) {\n      var handler = reference.handler,\n        parentObject = reference.parentObject,\n        key = reference.key,\n        map = reference.map,\n        path = reference.path;\n      try {\n        for (var i = 1; i < path.length; i++) {\n          for (\n            ;\n            \"object\" === typeof value &&\n            null !== value &&\n            value.$$typeof === REACT_LAZY_TYPE;\n\n          ) {\n            var referencedChunk = value._payload;\n            if (referencedChunk === handler.chunk) value = handler.value;\n            else {\n              switch (referencedChunk.status) {\n                case \"resolved_model\":\n                  initializeModelChunk(referencedChunk);\n                  break;\n                case \"resolved_module\":\n                  initializeModuleChunk(referencedChunk);\n              }\n              switch (referencedChunk.status) {\n                case \"fulfilled\":\n                  value = referencedChunk.value;\n                  continue;\n                case \"blocked\":\n                  var cyclicHandler = resolveBlockedCycle(\n                    referencedChunk,\n                    reference\n                  );\n                  if (null !== cyclicHandler) {\n                    value = cyclicHandler.value;\n                    continue;\n                  }\n                case \"pending\":\n                  path.splice(0, i - 1);\n                  null === referencedChunk.value\n                    ? (referencedChunk.value = [reference])\n                    : referencedChunk.value.push(reference);\n                  null === referencedChunk.reason\n                    ? (referencedChunk.reason = [reference])\n                    : referencedChunk.reason.push(reference);\n                  return;\n                case \"halted\":\n                  return;\n                default:\n                  rejectReference(\n                    response,\n                    reference.handler,\n                    referencedChunk.reason\n                  );\n                  return;\n              }\n            }\n          }\n          var name = path[i];\n          if (\n            \"object\" === typeof value &&\n            null !== value &&\n            hasOwnProperty.call(value, name)\n          )\n            value = value[name];\n          else throw Error(\"Invalid reference.\");\n        }\n        for (\n          ;\n          \"object\" === typeof value &&\n          null !== value &&\n          value.$$typeof === REACT_LAZY_TYPE;\n\n        ) {\n          var _referencedChunk = value._payload;\n          if (_referencedChunk === handler.chunk) value = handler.value;\n          else {\n            switch (_referencedChunk.status) {\n              case \"resolved_model\":\n                initializeModelChunk(_referencedChunk);\n                break;\n              case \"resolved_module\":\n                initializeModuleChunk(_referencedChunk);\n            }\n            switch (_referencedChunk.status) {\n              case \"fulfilled\":\n                value = _referencedChunk.value;\n                continue;\n            }\n            break;\n          }\n        }\n        var mappedValue = map(response, value, parentObject, key);\n        \"__proto__\" !== key && (parentObject[key] = mappedValue);\n        \"\" === key && null === handler.value && (handler.value = mappedValue);\n        if (\n          parentObject[0] === REACT_ELEMENT_TYPE &&\n          \"object\" === typeof handler.value &&\n          null !== handler.value &&\n          handler.value.$$typeof === REACT_ELEMENT_TYPE\n        ) {\n          var element = handler.value;\n          switch (key) {\n            case \"3\":\n              transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n              element.props = mappedValue;\n              break;\n            case \"4\":\n              element._owner = mappedValue;\n              break;\n            case \"5\":\n              element._debugStack = mappedValue;\n              break;\n            default:\n              transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n          }\n        } else\n          reference.isDebug ||\n            transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n      } catch (error) {\n        rejectReference(response, reference.handler, error);\n        return;\n      }\n      handler.deps--;\n      0 === handler.deps &&\n        ((reference = handler.chunk),\n        null !== reference &&\n          \"blocked\" === reference.status &&\n          ((value = reference.value),\n          (reference.status = \"fulfilled\"),\n          (reference.value = handler.value),\n          (reference.reason = handler.reason),\n          null !== value\n            ? wakeChunk(response, value, handler.value, reference)\n            : ((handler = handler.value),\n              filterDebugInfo(response, reference),\n              moveDebugInfoFromChunkToInnerValue(reference, handler))));\n    }\n    function rejectReference(response, handler, error) {\n      if (!handler.errored) {\n        var blockedValue = handler.value;\n        handler.errored = !0;\n        handler.value = null;\n        handler.reason = error;\n        handler = handler.chunk;\n        if (null !== handler && \"blocked\" === handler.status) {\n          if (\n            \"object\" === typeof blockedValue &&\n            null !== blockedValue &&\n            blockedValue.$$typeof === REACT_ELEMENT_TYPE\n          ) {\n            var erroredComponent = {\n              name: getComponentNameFromType(blockedValue.type) || \"\",\n              owner: blockedValue._owner\n            };\n            erroredComponent.debugStack = blockedValue._debugStack;\n            supportsCreateTask &&\n              (erroredComponent.debugTask = blockedValue._debugTask);\n            handler._debugInfo.push(erroredComponent);\n          }\n          triggerErrorOnChunk(response, handler, error);\n        }\n      }\n    }\n    function waitForReference(\n      referencedChunk,\n      parentObject,\n      key,\n      response,\n      map,\n      path,\n      isAwaitingDebugInfo\n    ) {\n      if (\n        !(\n          (void 0 !== response._debugChannel &&\n            response._debugChannel.hasReadable) ||\n          \"pending\" !== referencedChunk.status ||\n          parentObject[0] !== REACT_ELEMENT_TYPE ||\n          (\"4\" !== key && \"5\" !== key)\n        )\n      )\n        return null;\n      initializingHandler\n        ? ((response = initializingHandler), response.deps++)\n        : (response = initializingHandler =\n            {\n              parent: null,\n              chunk: null,\n              value: null,\n              reason: null,\n              deps: 1,\n              errored: !1\n            });\n      parentObject = {\n        handler: response,\n        parentObject: parentObject,\n        key: key,\n        map: map,\n        path: path\n      };\n      parentObject.isDebug = isAwaitingDebugInfo;\n      null === referencedChunk.value\n        ? (referencedChunk.value = [parentObject])\n        : referencedChunk.value.push(parentObject);\n      null === referencedChunk.reason\n        ? (referencedChunk.reason = [parentObject])\n        : referencedChunk.reason.push(parentObject);\n      return null;\n    }\n    function loadServerReference(response, metaData, parentObject, key) {\n      if (!response._serverReferenceConfig)\n        return createBoundServerReference(\n          metaData,\n          response._callServer,\n          response._encodeFormAction,\n          response._debugFindSourceMapURL\n        );\n      var serverReference = resolveServerReference(\n          response._serverReferenceConfig,\n          metaData.id\n        ),\n        promise = preloadModule(serverReference);\n      if (promise)\n        metaData.bound && (promise = Promise.all([promise, metaData.bound]));\n      else if (metaData.bound) promise = Promise.resolve(metaData.bound);\n      else\n        return (\n          (promise = requireModule(serverReference)),\n          registerBoundServerReference(\n            promise,\n            metaData.id,\n            metaData.bound,\n            response._encodeFormAction\n          ),\n          promise\n        );\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          parent: null,\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      promise.then(\n        function () {\n          var resolvedValue = requireModule(serverReference);\n          if (metaData.bound) {\n            var boundArgs = metaData.bound.value.slice(0);\n            boundArgs.unshift(null);\n            resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs);\n          }\n          registerBoundServerReference(\n            resolvedValue,\n            metaData.id,\n            metaData.bound,\n            response._encodeFormAction\n          );\n          \"__proto__\" !== key && (parentObject[key] = resolvedValue);\n          \"\" === key &&\n            null === handler.value &&\n            (handler.value = resolvedValue);\n          if (\n            parentObject[0] === REACT_ELEMENT_TYPE &&\n            \"object\" === typeof handler.value &&\n            null !== handler.value &&\n            handler.value.$$typeof === REACT_ELEMENT_TYPE\n          )\n            switch (((boundArgs = handler.value), key)) {\n              case \"3\":\n                boundArgs.props = resolvedValue;\n                break;\n              case \"4\":\n                boundArgs._owner = resolvedValue;\n            }\n          handler.deps--;\n          0 === handler.deps &&\n            ((resolvedValue = handler.chunk),\n            null !== resolvedValue &&\n              \"blocked\" === resolvedValue.status &&\n              ((boundArgs = resolvedValue.value),\n              (resolvedValue.status = \"fulfilled\"),\n              (resolvedValue.value = handler.value),\n              (resolvedValue.reason = null),\n              null !== boundArgs\n                ? wakeChunk(response, boundArgs, handler.value, resolvedValue)\n                : ((boundArgs = handler.value),\n                  filterDebugInfo(response, resolvedValue),\n                  moveDebugInfoFromChunkToInnerValue(\n                    resolvedValue,\n                    boundArgs\n                  ))));\n        },\n        function (error) {\n          if (!handler.errored) {\n            var blockedValue = handler.value;\n            handler.errored = !0;\n            handler.value = null;\n            handler.reason = error;\n            var chunk = handler.chunk;\n            if (null !== chunk && \"blocked\" === chunk.status) {\n              if (\n                \"object\" === typeof blockedValue &&\n                null !== blockedValue &&\n                blockedValue.$$typeof === REACT_ELEMENT_TYPE\n              ) {\n                var erroredComponent = {\n                  name: getComponentNameFromType(blockedValue.type) || \"\",\n                  owner: blockedValue._owner\n                };\n                erroredComponent.debugStack = blockedValue._debugStack;\n                supportsCreateTask &&\n                  (erroredComponent.debugTask = blockedValue._debugTask);\n                chunk._debugInfo.push(erroredComponent);\n              }\n              triggerErrorOnChunk(response, chunk, error);\n            }\n          }\n        }\n      );\n      return null;\n    }\n    function resolveLazy(value) {\n      for (\n        ;\n        \"object\" === typeof value &&\n        null !== value &&\n        value.$$typeof === REACT_LAZY_TYPE;\n\n      ) {\n        var payload = value._payload;\n        if (\"fulfilled\" === payload.status) value = payload.value;\n        else break;\n      }\n      return value;\n    }\n    function transferReferencedDebugInfo(parentChunk, referencedChunk) {\n      if (null !== parentChunk) {\n        referencedChunk = referencedChunk._debugInfo;\n        parentChunk = parentChunk._debugInfo;\n        for (var i = 0; i < referencedChunk.length; ++i) {\n          var debugInfoEntry = referencedChunk[i];\n          null == debugInfoEntry.name && parentChunk.push(debugInfoEntry);\n        }\n      }\n    }\n    function getOutlinedModel(response, reference, parentObject, key, map) {\n      var path = reference.split(\":\");\n      reference = parseInt(path[0], 16);\n      reference = getChunk(response, reference);\n      null !== initializingChunk &&\n        isArrayImpl(initializingChunk._children) &&\n        initializingChunk._children.push(reference);\n      switch (reference.status) {\n        case \"resolved_model\":\n          initializeModelChunk(reference);\n          break;\n        case \"resolved_module\":\n          initializeModuleChunk(reference);\n      }\n      switch (reference.status) {\n        case \"fulfilled\":\n          for (var value = reference.value, i = 1; i < path.length; i++) {\n            for (\n              ;\n              \"object\" === typeof value &&\n              null !== value &&\n              value.$$typeof === REACT_LAZY_TYPE;\n\n            ) {\n              value = value._payload;\n              switch (value.status) {\n                case \"resolved_model\":\n                  initializeModelChunk(value);\n                  break;\n                case \"resolved_module\":\n                  initializeModuleChunk(value);\n              }\n              switch (value.status) {\n                case \"fulfilled\":\n                  value = value.value;\n                  break;\n                case \"blocked\":\n                case \"pending\":\n                  return waitForReference(\n                    value,\n                    parentObject,\n                    key,\n                    response,\n                    map,\n                    path.slice(i - 1),\n                    isInitializingDebugInfo\n                  );\n                case \"halted\":\n                  return (\n                    initializingHandler\n                      ? ((parentObject = initializingHandler),\n                        parentObject.deps++)\n                      : (initializingHandler = {\n                          parent: null,\n                          chunk: null,\n                          value: null,\n                          reason: null,\n                          deps: 1,\n                          errored: !1\n                        }),\n                    null\n                  );\n                default:\n                  return (\n                    initializingHandler\n                      ? ((initializingHandler.errored = !0),\n                        (initializingHandler.value = null),\n                        (initializingHandler.reason = value.reason))\n                      : (initializingHandler = {\n                          parent: null,\n                          chunk: null,\n                          value: null,\n                          reason: value.reason,\n                          deps: 0,\n                          errored: !0\n                        }),\n                    null\n                  );\n              }\n            }\n            var name = path[i];\n            if (\n              \"object\" !== typeof value ||\n              null === value ||\n              (getPrototypeOf(value) !== ObjectPrototype &&\n                getPrototypeOf(value) !== ArrayPrototype) ||\n              !hasOwnProperty.call(value, name)\n            )\n              throw Error(\"Invalid reference.\");\n            value = value[name];\n          }\n          for (\n            ;\n            \"object\" === typeof value &&\n            null !== value &&\n            value.$$typeof === REACT_LAZY_TYPE;\n\n          ) {\n            path = value._payload;\n            switch (path.status) {\n              case \"resolved_model\":\n                initializeModelChunk(path);\n                break;\n              case \"resolved_module\":\n                initializeModuleChunk(path);\n            }\n            switch (path.status) {\n              case \"fulfilled\":\n                value = path.value;\n                continue;\n            }\n            break;\n          }\n          response = map(response, value, parentObject, key);\n          if (\n            parentObject[0] !== REACT_ELEMENT_TYPE ||\n            (\"4\" !== key && \"5\" !== key)\n          )\n            isInitializingDebugInfo ||\n              transferReferencedDebugInfo(initializingChunk, reference);\n          return response;\n        case \"pending\":\n        case \"blocked\":\n          return waitForReference(\n            reference,\n            parentObject,\n            key,\n            response,\n            map,\n            path,\n            isInitializingDebugInfo\n          );\n        case \"halted\":\n          return (\n            initializingHandler\n              ? ((parentObject = initializingHandler), parentObject.deps++)\n              : (initializingHandler = {\n                  parent: null,\n                  chunk: null,\n                  value: null,\n                  reason: null,\n                  deps: 1,\n                  errored: !1\n                }),\n            null\n          );\n        default:\n          return (\n            initializingHandler\n              ? ((initializingHandler.errored = !0),\n                (initializingHandler.value = null),\n                (initializingHandler.reason = reference.reason))\n              : (initializingHandler = {\n                  parent: null,\n                  chunk: null,\n                  value: null,\n                  reason: reference.reason,\n                  deps: 0,\n                  errored: !0\n                }),\n            null\n          );\n      }\n    }\n    function createMap(response, model) {\n      return new Map(model);\n    }\n    function createSet(response, model) {\n      return new Set(model);\n    }\n    function createBlob(response, model) {\n      return new Blob(model.slice(1), { type: model[0] });\n    }\n    function createFormData(response, model) {\n      response = new FormData();\n      for (var i = 0; i < model.length; i++)\n        response.append(model[i][0], model[i][1]);\n      return response;\n    }\n    function applyConstructor(response, model, parentObject) {\n      Object.setPrototypeOf(parentObject, model.prototype);\n    }\n    function defineLazyGetter(response, chunk, parentObject, key) {\n      \"__proto__\" !== key &&\n        Object.defineProperty(parentObject, key, {\n          get: function () {\n            \"resolved_model\" === chunk.status && initializeModelChunk(chunk);\n            switch (chunk.status) {\n              case \"fulfilled\":\n                return chunk.value;\n              case \"rejected\":\n                throw chunk.reason;\n            }\n            return \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\";\n          },\n          set: function () {},\n          enumerable: !0,\n          configurable: !1\n        });\n      return null;\n    }\n    function extractIterator(response, model) {\n      return model[Symbol.iterator]();\n    }\n    function createModel(response, model) {\n      return model;\n    }\n    function getInferredFunctionApproximate(code) {\n      code = code.startsWith(\"Object.defineProperty(\")\n        ? code.slice(22)\n        : code.startsWith(\"(\")\n          ? code.slice(1)\n          : code;\n      if (code.startsWith(\"async function\")) {\n        var idx = code.indexOf(\"(\", 14);\n        if (-1 !== idx)\n          return (\n            (code = code.slice(14, idx).trim()),\n            (0, eval)(\"({\" + JSON.stringify(code) + \":async function(){}})\")[\n              code\n            ]\n          );\n      } else if (code.startsWith(\"function\")) {\n        if (((idx = code.indexOf(\"(\", 8)), -1 !== idx))\n          return (\n            (code = code.slice(8, idx).trim()),\n            (0, eval)(\"({\" + JSON.stringify(code) + \":function(){}})\")[code]\n          );\n      } else if (\n        code.startsWith(\"class\") &&\n        ((idx = code.indexOf(\"{\", 5)), -1 !== idx)\n      )\n        return (\n          (code = code.slice(5, idx).trim()),\n          (0, eval)(\"({\" + JSON.stringify(code) + \":class{}})\")[code]\n        );\n      return function () {};\n    }\n    function parseModelString(response, parentObject, key, value) {\n      if (\"$\" === value[0]) {\n        if (\"$\" === value)\n          return (\n            null !== initializingHandler &&\n              \"0\" === key &&\n              (initializingHandler = {\n                parent: initializingHandler,\n                chunk: null,\n                value: null,\n                reason: null,\n                deps: 0,\n                errored: !1\n              }),\n            REACT_ELEMENT_TYPE\n          );\n        switch (value[1]) {\n          case \"$\":\n            return value.slice(1);\n          case \"L\":\n            return (\n              (parentObject = parseInt(value.slice(2), 16)),\n              (response = getChunk(response, parentObject)),\n              null !== initializingChunk &&\n                isArrayImpl(initializingChunk._children) &&\n                initializingChunk._children.push(response),\n              createLazyChunkWrapper(response, 0)\n            );\n          case \"@\":\n            return (\n              (parentObject = parseInt(value.slice(2), 16)),\n              (response = getChunk(response, parentObject)),\n              null !== initializingChunk &&\n                isArrayImpl(initializingChunk._children) &&\n                initializingChunk._children.push(response),\n              response\n            );\n          case \"S\":\n            return Symbol.for(value.slice(2));\n          case \"h\":\n            var ref = value.slice(2);\n            return getOutlinedModel(\n              response,\n              ref,\n              parentObject,\n              key,\n              loadServerReference\n            );\n          case \"T\":\n            parentObject = \"$\" + value.slice(2);\n            response = response._tempRefs;\n            if (null == response)\n              throw Error(\n                \"Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.\"\n              );\n            return response.get(parentObject);\n          case \"Q\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createMap)\n            );\n          case \"W\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createSet)\n            );\n          case \"B\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createBlob)\n            );\n          case \"K\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createFormData)\n            );\n          case \"Z\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                resolveErrorDev\n              )\n            );\n          case \"i\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                extractIterator\n              )\n            );\n          case \"I\":\n            return Infinity;\n          case \"-\":\n            return \"$-0\" === value ? -0 : -Infinity;\n          case \"N\":\n            return NaN;\n          case \"u\":\n            return;\n          case \"D\":\n            return new Date(Date.parse(value.slice(2)));\n          case \"n\":\n            return BigInt(value.slice(2));\n          case \"P\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                applyConstructor\n              )\n            );\n          case \"E\":\n            response = value.slice(2);\n            try {\n              if (!mightHaveStaticConstructor.test(response))\n                return (0, eval)(response);\n            } catch (x) {}\n            try {\n              if (\n                ((ref = getInferredFunctionApproximate(response)),\n                response.startsWith(\"Object.defineProperty(\"))\n              ) {\n                var idx = response.lastIndexOf(',\"name\",{value:\"');\n                if (-1 !== idx) {\n                  var name = JSON.parse(\n                    response.slice(idx + 16 - 1, response.length - 2)\n                  );\n                  Object.defineProperty(ref, \"name\", { value: name });\n                }\n              }\n            } catch (_) {\n              ref = function () {};\n            }\n            return ref;\n          case \"Y\":\n            if (\n              2 < value.length &&\n              (ref = response._debugChannel && response._debugChannel.callback)\n            ) {\n              if (\"@\" === value[2])\n                return (\n                  (parentObject = value.slice(3)),\n                  (key = parseInt(parentObject, 16)),\n                  response._chunks.has(key) || ref(\"P:\" + parentObject),\n                  getChunk(response, key)\n                );\n              value = value.slice(2);\n              idx = parseInt(value, 16);\n              response._chunks.has(idx) || ref(\"Q:\" + value);\n              ref = getChunk(response, idx);\n              return \"fulfilled\" === ref.status\n                ? ref.value\n                : defineLazyGetter(response, ref, parentObject, key);\n            }\n            \"__proto__\" !== key &&\n              Object.defineProperty(parentObject, key, {\n                get: function () {\n                  return \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\";\n                },\n                set: function () {},\n                enumerable: !0,\n                configurable: !1\n              });\n            return null;\n          default:\n            return (\n              (ref = value.slice(1)),\n              getOutlinedModel(response, ref, parentObject, key, createModel)\n            );\n        }\n      }\n      return value;\n    }\n    function missingCall() {\n      throw Error(\n        'Trying to call a function from \"use server\" but the callServer option was not implemented in your router runtime.'\n      );\n    }\n    function markIOStarted() {\n      this._debugIOStarted = !0;\n    }\n    function ResponseInstance(\n      bundlerConfig,\n      serverReferenceConfig,\n      moduleLoading,\n      callServer,\n      encodeFormAction,\n      nonce,\n      temporaryReferences,\n      allowPartialStream,\n      findSourceMapURL,\n      replayConsole,\n      environmentName,\n      debugStartTime,\n      debugEndTime,\n      debugChannel\n    ) {\n      var chunks = new Map();\n      this._bundlerConfig = bundlerConfig;\n      this._serverReferenceConfig = serverReferenceConfig;\n      this._moduleLoading = moduleLoading;\n      this._callServer = void 0 !== callServer ? callServer : missingCall;\n      this._encodeFormAction = encodeFormAction;\n      this._nonce = nonce;\n      this._chunks = chunks;\n      this._stringDecoder = new util.TextDecoder();\n      this._closed = !1;\n      this._closedReason = null;\n      this._allowPartialStream = allowPartialStream;\n      this._tempRefs = temporaryReferences;\n      this._timeOrigin = 0;\n      this._pendingInitialRender = null;\n      this._pendingChunks = 0;\n      this._weakResponse = { weak: new WeakRef(this), response: this };\n      this._debugRootOwner = bundlerConfig =\n        void 0 === ReactSharedInteralsServer ||\n        null === ReactSharedInteralsServer.A\n          ? null\n          : ReactSharedInteralsServer.A.getOwner();\n      this._debugRootStack =\n        null !== bundlerConfig ? Error(\"react-stack-top-frame\") : null;\n      environmentName = void 0 === environmentName ? \"Server\" : environmentName;\n      supportsCreateTask &&\n        (this._debugRootTask = console.createTask(\n          '\"use ' + environmentName.toLowerCase() + '\"'\n        ));\n      this._debugStartTime =\n        null == debugStartTime ? performance.now() : debugStartTime;\n      this._debugIOStarted = !1;\n      setTimeout(markIOStarted.bind(this), 0);\n      this._debugEndTime = void 0 === debugEndTime ? null : debugEndTime;\n      this._debugFindSourceMapURL = findSourceMapURL;\n      this._debugChannel = debugChannel;\n      this._blockedConsole = null;\n      this._replayConsole = replayConsole;\n      this._rootEnvironmentName = environmentName;\n      debugChannel &&\n        (null === debugChannelRegistry\n          ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0))\n          : debugChannelRegistry.register(this, debugChannel, this));\n      replayConsole && markAllTracksInOrder();\n    }\n    function createResponse(\n      bundlerConfig,\n      serverReferenceConfig,\n      moduleLoading,\n      callServer,\n      encodeFormAction,\n      nonce,\n      temporaryReferences,\n      allowPartialStream,\n      findSourceMapURL,\n      replayConsole,\n      environmentName,\n      debugStartTime,\n      debugEndTime,\n      debugChannel\n    ) {\n      checkEvalAvailabilityOnceDev();\n      bundlerConfig = new ResponseInstance(\n        bundlerConfig,\n        serverReferenceConfig,\n        moduleLoading,\n        callServer,\n        encodeFormAction,\n        nonce,\n        temporaryReferences,\n        allowPartialStream,\n        findSourceMapURL,\n        replayConsole,\n        environmentName,\n        debugStartTime,\n        debugEndTime,\n        debugChannel\n      )._weakResponse;\n      return bundlerConfig;\n    }\n    function createStreamState(weakResponse, streamDebugValue) {\n      var streamState = {\n        _rowState: 0,\n        _rowID: 0,\n        _rowTag: 0,\n        _rowLength: 0,\n        _buffer: []\n      };\n      weakResponse = unwrapWeakResponse(weakResponse);\n      var debugValuePromise = Promise.resolve(streamDebugValue);\n      debugValuePromise.status = \"fulfilled\";\n      debugValuePromise.value = streamDebugValue;\n      streamState._debugInfo = {\n        name: \"rsc stream\",\n        start: weakResponse._debugStartTime,\n        end: weakResponse._debugStartTime,\n        byteSize: 0,\n        value: debugValuePromise,\n        owner: weakResponse._debugRootOwner,\n        debugStack: weakResponse._debugRootStack,\n        debugTask: weakResponse._debugRootTask\n      };\n      streamState._debugTargetChunkSize = MIN_CHUNK_SIZE;\n      return streamState;\n    }\n    function incrementChunkDebugInfo(streamState, chunkLength) {\n      var debugInfo = streamState._debugInfo,\n        endTime = performance.now(),\n        previousEndTime = debugInfo.end;\n      chunkLength = debugInfo.byteSize + chunkLength;\n      chunkLength > streamState._debugTargetChunkSize ||\n      endTime > previousEndTime + 10\n        ? ((streamState._debugInfo = {\n            name: debugInfo.name,\n            start: debugInfo.start,\n            end: endTime,\n            byteSize: chunkLength,\n            value: debugInfo.value,\n            owner: debugInfo.owner,\n            debugStack: debugInfo.debugStack,\n            debugTask: debugInfo.debugTask\n          }),\n          (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE))\n        : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength));\n    }\n    function addAsyncInfo(chunk, asyncInfo) {\n      var value = resolveLazy(chunk.value);\n      \"object\" !== typeof value ||\n      null === value ||\n      (!isArrayImpl(value) &&\n        \"function\" !== typeof value[ASYNC_ITERATOR] &&\n        value.$$typeof !== REACT_ELEMENT_TYPE &&\n        value.$$typeof !== REACT_LAZY_TYPE)\n        ? chunk._debugInfo.push(asyncInfo)\n        : isArrayImpl(value._debugInfo)\n          ? value._debugInfo.push(asyncInfo)\n          : Object.isFrozen(value) ||\n            Object.defineProperty(value, \"_debugInfo\", {\n              configurable: !1,\n              enumerable: !1,\n              writable: !0,\n              value: [asyncInfo]\n            });\n    }\n    function resolveChunkDebugInfo(response, streamState, chunk) {\n      response._debugIOStarted &&\n        ((response = { awaited: streamState._debugInfo }),\n        \"pending\" === chunk.status || \"blocked\" === chunk.status\n          ? ((response = addAsyncInfo.bind(null, chunk, response)),\n            chunk.then(response, response))\n          : addAsyncInfo(chunk, response));\n    }\n    function resolveBuffer(response, id, buffer, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk && \"pending\" !== chunk.status\n        ? chunk.reason.enqueueValue(buffer)\n        : (chunk && releasePendingChunk(response, chunk),\n          (buffer = new ReactPromise(\"fulfilled\", buffer, null)),\n          resolveChunkDebugInfo(response, streamState, buffer),\n          chunks.set(id, buffer));\n    }\n    function resolveModule(response, id, model, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      model = parseModel(response, model);\n      var clientReference = resolveClientReference(\n        response._bundlerConfig,\n        model\n      );\n      prepareDestinationWithChunks(\n        response._moduleLoading,\n        model[1],\n        response._nonce\n      );\n      if ((model = preloadModule(clientReference))) {\n        if (chunk) {\n          releasePendingChunk(response, chunk);\n          var blockedChunk = chunk;\n          blockedChunk.status = \"blocked\";\n        } else\n          (blockedChunk = new ReactPromise(\"blocked\", null, null)),\n            chunks.set(id, blockedChunk);\n        resolveChunkDebugInfo(response, streamState, blockedChunk);\n        model.then(\n          function () {\n            return resolveModuleChunk(response, blockedChunk, clientReference);\n          },\n          function (error) {\n            return triggerErrorOnChunk(response, blockedChunk, error);\n          }\n        );\n      } else\n        chunk\n          ? (resolveChunkDebugInfo(response, streamState, chunk),\n            resolveModuleChunk(response, chunk, clientReference))\n          : ((chunk = new ReactPromise(\n              \"resolved_module\",\n              clientReference,\n              null\n            )),\n            resolveChunkDebugInfo(response, streamState, chunk),\n            chunks.set(id, chunk));\n    }\n    function resolveStream(response, id, stream, controller, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      if (chunk) {\n        if (\n          (resolveChunkDebugInfo(response, streamState, chunk),\n          \"pending\" === chunk.status)\n        ) {\n          id = chunk.value;\n          if (null != chunk._debugChunk) {\n            streamState = initializingHandler;\n            chunks = initializingChunk;\n            initializingHandler = null;\n            chunk.status = \"blocked\";\n            chunk.value = null;\n            chunk.reason = null;\n            initializingChunk = chunk;\n            try {\n              if (\n                (initializeDebugChunk(response, chunk),\n                null !== initializingHandler &&\n                  !initializingHandler.errored &&\n                  0 < initializingHandler.deps)\n              ) {\n                initializingHandler.value = stream;\n                initializingHandler.reason = controller;\n                initializingHandler.chunk = chunk;\n                return;\n              }\n            } finally {\n              (initializingHandler = streamState), (initializingChunk = chunks);\n            }\n          }\n          chunk.status = \"fulfilled\";\n          chunk.value = stream;\n          chunk.reason = controller;\n          null !== id\n            ? wakeChunk(response, id, chunk.value, chunk)\n            : (filterDebugInfo(response, chunk),\n              moveDebugInfoFromChunkToInnerValue(chunk, stream));\n        }\n      } else\n        0 === response._pendingChunks++ &&\n          (response._weakResponse.response = response),\n          (stream = new ReactPromise(\"fulfilled\", stream, controller)),\n          resolveChunkDebugInfo(response, streamState, stream),\n          chunks.set(id, stream);\n    }\n    function startReadableStream(response, id, type, streamState) {\n      var controller = null,\n        closed = !1;\n      type = new ReadableStream({\n        type: type,\n        start: function (c) {\n          controller = c;\n        }\n      });\n      var previousBlockedChunk = null;\n      resolveStream(\n        response,\n        id,\n        type,\n        {\n          enqueueValue: function (value) {\n            null === previousBlockedChunk\n              ? controller.enqueue(value)\n              : previousBlockedChunk.then(function () {\n                  controller.enqueue(value);\n                });\n          },\n          enqueueModel: function (json) {\n            if (null === previousBlockedChunk) {\n              var chunk = createResolvedModelChunk(response, json);\n              initializeModelChunk(chunk);\n              \"fulfilled\" === chunk.status\n                ? controller.enqueue(chunk.value)\n                : (chunk.then(\n                    function (v) {\n                      return controller.enqueue(v);\n                    },\n                    function (e) {\n                      return controller.error(e);\n                    }\n                  ),\n                  (previousBlockedChunk = chunk));\n            } else {\n              chunk = previousBlockedChunk;\n              var _chunk3 = createPendingChunk(response);\n              _chunk3.then(\n                function (v) {\n                  return controller.enqueue(v);\n                },\n                function (e) {\n                  return controller.error(e);\n                }\n              );\n              previousBlockedChunk = _chunk3;\n              chunk.then(function () {\n                previousBlockedChunk === _chunk3 &&\n                  (previousBlockedChunk = null);\n                resolveModelChunk(response, _chunk3, json);\n              });\n            }\n          },\n          close: function () {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.close();\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.close();\n                });\n              }\n          },\n          error: function (error) {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.error(error);\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.error(error);\n                });\n              }\n          }\n        },\n        streamState\n      );\n    }\n    function asyncIterator() {\n      return this;\n    }\n    function createIterator(next) {\n      next = { next: next };\n      next[ASYNC_ITERATOR] = asyncIterator;\n      return next;\n    }\n    function startAsyncIterable(response, id, iterator, streamState) {\n      var buffer = [],\n        closed = !1,\n        nextWriteIndex = 0,\n        iterable = {};\n      iterable[ASYNC_ITERATOR] = function () {\n        var nextReadIndex = 0;\n        return createIterator(function (arg) {\n          if (void 0 !== arg)\n            throw Error(\n              \"Values cannot be passed to next() of AsyncIterables passed to Client Components.\"\n            );\n          if (nextReadIndex === buffer.length) {\n            if (closed)\n              return new ReactPromise(\n                \"fulfilled\",\n                { done: !0, value: void 0 },\n                null\n              );\n            buffer[nextReadIndex] = createPendingChunk(response);\n          }\n          return buffer[nextReadIndex++];\n        });\n      };\n      resolveStream(\n        response,\n        id,\n        iterator ? iterable[ASYNC_ITERATOR]() : iterable,\n        {\n          enqueueValue: function (value) {\n            if (nextWriteIndex === buffer.length)\n              buffer[nextWriteIndex] = new ReactPromise(\n                \"fulfilled\",\n                { done: !1, value: value },\n                null\n              );\n            else {\n              var chunk = buffer[nextWriteIndex],\n                resolveListeners = chunk.value,\n                rejectListeners = chunk.reason;\n              chunk.status = \"fulfilled\";\n              chunk.value = { done: !1, value: value };\n              chunk.reason = null;\n              null !== resolveListeners &&\n                wakeChunkIfInitialized(\n                  response,\n                  chunk,\n                  resolveListeners,\n                  rejectListeners\n                );\n            }\n            nextWriteIndex++;\n          },\n          enqueueModel: function (value) {\n            nextWriteIndex === buffer.length\n              ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                  response,\n                  value,\n                  !1\n                ))\n              : resolveIteratorResultChunk(\n                  response,\n                  buffer[nextWriteIndex],\n                  value,\n                  !1\n                );\n            nextWriteIndex++;\n          },\n          close: function (value) {\n            if (!closed)\n              for (\n                closed = !0,\n                  nextWriteIndex === buffer.length\n                    ? (buffer[nextWriteIndex] =\n                        createResolvedIteratorResultChunk(response, value, !0))\n                    : resolveIteratorResultChunk(\n                        response,\n                        buffer[nextWriteIndex],\n                        value,\n                        !0\n                      ),\n                  nextWriteIndex++;\n                nextWriteIndex < buffer.length;\n\n              )\n                resolveIteratorResultChunk(\n                  response,\n                  buffer[nextWriteIndex++],\n                  '\"$undefined\"',\n                  !0\n                );\n          },\n          error: function (error) {\n            if (!closed)\n              for (\n                closed = !0,\n                  nextWriteIndex === buffer.length &&\n                    (buffer[nextWriteIndex] = createPendingChunk(response));\n                nextWriteIndex < buffer.length;\n\n              )\n                triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);\n          }\n        },\n        streamState\n      );\n    }\n    function resolveErrorDev(response, errorInfo) {\n      var name = errorInfo.name,\n        message = errorInfo.message,\n        stack = errorInfo.stack,\n        env = errorInfo.env,\n        errorOptions =\n          \"cause\" in errorInfo\n            ? {\n                cause: reviveModel(\n                  response,\n                  errorInfo.cause,\n                  errorInfo,\n                  \"cause\"\n                )\n              }\n            : void 0,\n        isAggregateError =\n          \"undefined\" !== typeof AggregateError && \"errors\" in errorInfo,\n        revivedErrors = isAggregateError\n          ? reviveModel(response, errorInfo.errors, errorInfo, \"errors\")\n          : null;\n      message = buildFakeCallStack(\n        response,\n        stack,\n        env,\n        !1,\n        isAggregateError\n          ? AggregateError.bind(\n              null,\n              revivedErrors,\n              message ||\n                \"An error occurred in the Server Components render but no message was provided\",\n              errorOptions\n            )\n          : Error.bind(\n              null,\n              message ||\n                \"An error occurred in the Server Components render but no message was provided\",\n              errorOptions\n            )\n      );\n      stack = null;\n      null != errorInfo.owner &&\n        ((errorInfo = errorInfo.owner.slice(1)),\n        (errorInfo = getOutlinedModel(\n          response,\n          errorInfo,\n          {},\n          \"\",\n          createModel\n        )),\n        null !== errorInfo &&\n          (stack = initializeFakeTask(response, errorInfo)));\n      null === stack\n        ? ((response = getRootTask(response, env)),\n          (response = null != response ? response.run(message) : message()))\n        : (response = stack.run(message));\n      response.name = name;\n      response.environmentName = env;\n      return response;\n    }\n    function createFakeFunction(\n      name,\n      filename,\n      sourceMap,\n      line,\n      col,\n      enclosingLine,\n      enclosingCol,\n      environmentName\n    ) {\n      name || (name = \"<anonymous>\");\n      var encodedName = JSON.stringify(name);\n      1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--;\n      1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--;\n      1 > line ? (line = 0) : line--;\n      1 > col ? (col = 0) : col--;\n      if (\n        line < enclosingLine ||\n        (line === enclosingLine && col < enclosingCol)\n      )\n        enclosingCol = enclosingLine = 0;\n      1 > line\n        ? ((line = encodedName.length + 3),\n          (enclosingCol -= line),\n          0 > enclosingCol && (enclosingCol = 0),\n          (col = col - enclosingCol - line - 3),\n          0 > col && (col = 0),\n          (encodedName =\n            \"({\" +\n            encodedName +\n            \":\" +\n            \" \".repeat(enclosingCol) +\n            \"_=>\" +\n            \" \".repeat(col) +\n            \"_()})\"))\n        : 1 > enclosingLine\n          ? ((enclosingCol -= encodedName.length + 3),\n            0 > enclosingCol && (enclosingCol = 0),\n            (encodedName =\n              \"({\" +\n              encodedName +\n              \":\" +\n              \" \".repeat(enclosingCol) +\n              \"_=>\" +\n              \"\\n\".repeat(line - enclosingLine) +\n              \" \".repeat(col) +\n              \"_()})\"))\n          : enclosingLine === line\n            ? ((col = col - enclosingCol - 3),\n              0 > col && (col = 0),\n              (encodedName =\n                \"\\n\".repeat(enclosingLine - 1) +\n                \"({\" +\n                encodedName +\n                \":\\n\" +\n                \" \".repeat(enclosingCol) +\n                \"_=>\" +\n                \" \".repeat(col) +\n                \"_()})\"))\n            : (encodedName =\n                \"\\n\".repeat(enclosingLine - 1) +\n                \"({\" +\n                encodedName +\n                \":\\n\" +\n                \" \".repeat(enclosingCol) +\n                \"_=>\" +\n                \"\\n\".repeat(line - enclosingLine) +\n                \" \".repeat(col) +\n                \"_()})\");\n      encodedName =\n        1 > enclosingLine\n          ? encodedName +\n            \"\\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */\"\n          : \"/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */\" +\n            encodedName;\n      filename.startsWith(\"/\") && (filename = \"file://\" + filename);\n      sourceMap\n        ? ((encodedName +=\n            \"\\n//# sourceURL=about://React/\" +\n            encodeURIComponent(environmentName) +\n            \"/\" +\n            encodeURI(filename) +\n            \"?\" +\n            fakeFunctionIdx++),\n          (encodedName += \"\\n//# sourceMappingURL=\" + sourceMap))\n        : (encodedName = filename\n            ? encodedName + (\"\\n//# sourceURL=\" + encodeURI(filename))\n            : encodedName + \"\\n//# sourceURL=<anonymous>\");\n      try {\n        var fn = (0, eval)(encodedName)[name];\n      } catch (x) {\n        (fn = function (_) {\n          return _();\n        }),\n          Object.defineProperty(fn, \"name\", { value: name });\n      }\n      return fn;\n    }\n    function buildFakeCallStack(\n      response,\n      stack,\n      environmentName,\n      useEnclosingLine,\n      innerCall\n    ) {\n      for (var i = 0; i < stack.length; i++) {\n        var frame = stack[i],\n          frameKey =\n            frame.join(\"-\") +\n            \"-\" +\n            environmentName +\n            (useEnclosingLine ? \"-e\" : \"-n\"),\n          fn = fakeFunctionCache.get(frameKey);\n        if (void 0 === fn) {\n          fn = frame[0];\n          var filename = frame[1],\n            line = frame[2],\n            col = frame[3],\n            enclosingLine = frame[4];\n          frame = frame[5];\n          var findSourceMapURL = response._debugFindSourceMapURL;\n          findSourceMapURL = findSourceMapURL\n            ? findSourceMapURL(filename, environmentName)\n            : null;\n          fn = createFakeFunction(\n            fn,\n            filename,\n            findSourceMapURL,\n            line,\n            col,\n            useEnclosingLine ? line : enclosingLine,\n            useEnclosingLine ? col : frame,\n            environmentName\n          );\n          fakeFunctionCache.set(frameKey, fn);\n        }\n        innerCall = fn.bind(null, innerCall);\n      }\n      return innerCall;\n    }\n    function getRootTask(response, childEnvironmentName) {\n      var rootTask = response._debugRootTask;\n      return rootTask\n        ? response._rootEnvironmentName !== childEnvironmentName\n          ? ((response = console.createTask.bind(\n              console,\n              '\"use ' + childEnvironmentName.toLowerCase() + '\"'\n            )),\n            rootTask.run(response))\n          : rootTask\n        : null;\n    }\n    function initializeFakeTask(response, debugInfo) {\n      if (!supportsCreateTask || null == debugInfo.stack) return null;\n      var cachedEntry = debugInfo.debugTask;\n      if (void 0 !== cachedEntry) return cachedEntry;\n      var useEnclosingLine = void 0 === debugInfo.key,\n        stack = debugInfo.stack,\n        env =\n          null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env;\n      cachedEntry =\n        null == debugInfo.owner || null == debugInfo.owner.env\n          ? response._rootEnvironmentName\n          : debugInfo.owner.env;\n      var ownerTask =\n        null == debugInfo.owner\n          ? null\n          : initializeFakeTask(response, debugInfo.owner);\n      env =\n        env !== cachedEntry\n          ? '\"use ' + env.toLowerCase() + '\"'\n          : void 0 !== debugInfo.key\n            ? \"<\" + (debugInfo.name || \"...\") + \">\"\n            : void 0 !== debugInfo.name\n              ? debugInfo.name || \"unknown\"\n              : \"await \" + (debugInfo.awaited.name || \"unknown\");\n      env = console.createTask.bind(console, env);\n      useEnclosingLine = buildFakeCallStack(\n        response,\n        stack,\n        cachedEntry,\n        useEnclosingLine,\n        env\n      );\n      null === ownerTask\n        ? ((response = getRootTask(response, cachedEntry)),\n          (response =\n            null != response\n              ? response.run(useEnclosingLine)\n              : useEnclosingLine()))\n        : (response = ownerTask.run(useEnclosingLine));\n      return (debugInfo.debugTask = response);\n    }\n    function fakeJSXCallSite() {\n      var previousStackTraceLimit = Error.stackTraceLimit;\n      Error.stackTraceLimit = ownerStackTraceLimit;\n      var error = Error(\"react-stack-top-frame\");\n      Error.stackTraceLimit = previousStackTraceLimit;\n      return error;\n    }\n    function initializeFakeStack(response, debugInfo) {\n      if (void 0 === debugInfo.debugStack) {\n        null != debugInfo.stack &&\n          (debugInfo.debugStack = createFakeJSXCallStackInDEV(\n            response,\n            debugInfo.stack,\n            null == debugInfo.env ? \"\" : debugInfo.env\n          ));\n        var owner = debugInfo.owner;\n        null != owner &&\n          (initializeFakeStack(response, owner),\n          void 0 === owner.debugLocation &&\n            null != debugInfo.debugStack &&\n            (owner.debugLocation = debugInfo.debugStack));\n      }\n    }\n    function initializeDebugInfo(response, debugInfo) {\n      void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo);\n      if (null == debugInfo.owner && null != response._debugRootOwner) {\n        var _componentInfoOrAsyncInfo = debugInfo;\n        _componentInfoOrAsyncInfo.owner = response._debugRootOwner;\n        _componentInfoOrAsyncInfo.stack = null;\n        _componentInfoOrAsyncInfo.debugStack = response._debugRootStack;\n        _componentInfoOrAsyncInfo.debugTask = response._debugRootTask;\n      } else\n        void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo);\n      \"number\" === typeof debugInfo.time &&\n        (debugInfo = { time: debugInfo.time + response._timeOrigin });\n      return debugInfo;\n    }\n    function getCurrentStackInDEV() {\n      var owner = currentOwnerInDEV;\n      if (null === owner) return \"\";\n      try {\n        var info = \"\";\n        if (owner.owner || \"string\" !== typeof owner.name) {\n          for (; owner; ) {\n            var ownerStack = owner.debugStack;\n            if (null != ownerStack) {\n              if ((owner = owner.owner)) {\n                var JSCompiler_temp_const = info;\n                var error = ownerStack,\n                  prevPrepareStackTrace = Error.prepareStackTrace;\n                Error.prepareStackTrace = prepareStackTrace;\n                var stack = error.stack;\n                Error.prepareStackTrace = prevPrepareStackTrace;\n                stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n                  (stack = stack.slice(29));\n                var idx = stack.indexOf(\"\\n\");\n                -1 !== idx && (stack = stack.slice(idx + 1));\n                idx = stack.indexOf(\"react_stack_bottom_frame\");\n                -1 !== idx && (idx = stack.lastIndexOf(\"\\n\", idx));\n                var JSCompiler_inline_result =\n                  -1 !== idx ? (stack = stack.slice(0, idx)) : \"\";\n                info =\n                  JSCompiler_temp_const + (\"\\n\" + JSCompiler_inline_result);\n              }\n            } else break;\n          }\n          var JSCompiler_inline_result$jscomp$0 = info;\n        } else {\n          JSCompiler_temp_const = owner.name;\n          if (void 0 === prefix)\n            try {\n              throw Error();\n            } catch (x) {\n              (prefix =\n                ((error = x.stack.trim().match(/\\n( *(at )?)/)) && error[1]) ||\n                \"\"),\n                (suffix =\n                  -1 < x.stack.indexOf(\"\\n    at\")\n                    ? \" (<anonymous>)\"\n                    : -1 < x.stack.indexOf(\"@\")\n                      ? \"@unknown:0:0\"\n                      : \"\");\n            }\n          JSCompiler_inline_result$jscomp$0 =\n            \"\\n\" + prefix + JSCompiler_temp_const + suffix;\n        }\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function resolveConsoleEntry(response, json) {\n      if (response._replayConsole) {\n        var blockedChunk = response._blockedConsole;\n        if (null == blockedChunk)\n          (blockedChunk = createResolvedModelChunk(response, json)),\n            initializeModelChunk(blockedChunk),\n            \"fulfilled\" === blockedChunk.status\n              ? replayConsoleWithCallStackInDEV(response, blockedChunk.value)\n              : (blockedChunk.then(\n                  function (v) {\n                    return replayConsoleWithCallStackInDEV(response, v);\n                  },\n                  function () {}\n                ),\n                (response._blockedConsole = blockedChunk));\n        else {\n          var _chunk4 = createPendingChunk(response);\n          _chunk4.then(\n            function (v) {\n              return replayConsoleWithCallStackInDEV(response, v);\n            },\n            function () {}\n          );\n          response._blockedConsole = _chunk4;\n          var unblock = function () {\n            response._blockedConsole === _chunk4 &&\n              (response._blockedConsole = null);\n            resolveModelChunk(response, _chunk4, json);\n          };\n          blockedChunk.then(unblock, unblock);\n        }\n      }\n    }\n    function initializeIOInfo(response, ioInfo) {\n      void 0 !== ioInfo.stack &&\n        (initializeFakeTask(response, ioInfo),\n        initializeFakeStack(response, ioInfo));\n      ioInfo.start += response._timeOrigin;\n      ioInfo.end += response._timeOrigin;\n      if (response._replayConsole) {\n        response = response._rootEnvironmentName;\n        var promise = ioInfo.value;\n        if (promise)\n          switch (promise.status) {\n            case \"fulfilled\":\n              logIOInfo(ioInfo, response, promise.value);\n              break;\n            case \"rejected\":\n              logIOInfoErrored(ioInfo, response, promise.reason);\n              break;\n            default:\n              promise.then(\n                logIOInfo.bind(null, ioInfo, response),\n                logIOInfoErrored.bind(null, ioInfo, response)\n              );\n          }\n        else logIOInfo(ioInfo, response, void 0);\n      }\n    }\n    function resolveIOInfo(response, id, model) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id),\n        prevIsInitializingDebugInfo = isInitializingDebugInfo;\n      isInitializingDebugInfo = !0;\n      try {\n        chunk\n          ? (resolveModelChunk(response, chunk, model),\n            \"resolved_model\" === chunk.status && initializeModelChunk(chunk))\n          : ((chunk = createResolvedModelChunk(response, model)),\n            chunks.set(id, chunk),\n            initializeModelChunk(chunk));\n      } finally {\n        isInitializingDebugInfo = prevIsInitializingDebugInfo;\n      }\n      \"fulfilled\" === chunk.status\n        ? initializeIOInfo(response, chunk.value)\n        : chunk.then(\n            function (v) {\n              initializeIOInfo(response, v);\n            },\n            function () {}\n          );\n    }\n    function mergeBuffer(buffer, lastChunk) {\n      for (\n        var l = buffer.length, byteLength = lastChunk.length, i = 0;\n        i < l;\n        i++\n      )\n        byteLength += buffer[i].byteLength;\n      byteLength = new Uint8Array(byteLength);\n      for (var _i3 = (i = 0); _i3 < l; _i3++) {\n        var chunk = buffer[_i3];\n        byteLength.set(chunk, i);\n        i += chunk.byteLength;\n      }\n      byteLength.set(lastChunk, i);\n      return byteLength;\n    }\n    function resolveTypedArray(\n      response,\n      id,\n      buffer,\n      lastChunk,\n      constructor,\n      bytesPerElement,\n      streamState\n    ) {\n      buffer =\n        0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement\n          ? lastChunk\n          : mergeBuffer(buffer, lastChunk);\n      constructor = new constructor(\n        buffer.buffer,\n        buffer.byteOffset,\n        buffer.byteLength / bytesPerElement\n      );\n      resolveBuffer(response, id, constructor, streamState);\n    }\n    function flushComponentPerformance(\n      response$jscomp$0,\n      root,\n      trackIdx$jscomp$6,\n      trackTime,\n      parentEndTime\n    ) {\n      if (!isArrayImpl(root._children)) {\n        var previousResult = root._children,\n          previousEndTime = previousResult.endTime;\n        if (\n          -Infinity < parentEndTime &&\n          parentEndTime < previousEndTime &&\n          null !== previousResult.component\n        ) {\n          var componentInfo = previousResult.component,\n            trackIdx = trackIdx$jscomp$6,\n            startTime = parentEndTime;\n          if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) {\n            var color =\n                componentInfo.env === response$jscomp$0._rootEnvironmentName\n                  ? \"primary-light\"\n                  : \"secondary-light\",\n              entryName = componentInfo.name + \" [deduped]\",\n              debugTask = componentInfo.debugTask;\n            debugTask\n              ? debugTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    entryName,\n                    0 > startTime ? 0 : startTime,\n                    previousEndTime,\n                    trackNames[trackIdx],\n                    \"Server Components \\u269b\",\n                    color\n                  )\n                )\n              : console.timeStamp(\n                  entryName,\n                  0 > startTime ? 0 : startTime,\n                  previousEndTime,\n                  trackNames[trackIdx],\n                  \"Server Components \\u269b\",\n                  color\n                );\n          }\n        }\n        previousResult.track = trackIdx$jscomp$6;\n        return previousResult;\n      }\n      var children = root._children;\n      var debugInfo = root._debugInfo;\n      if (0 === debugInfo.length && \"fulfilled\" === root.status) {\n        var resolvedValue = resolveLazy(root.value);\n        \"object\" === typeof resolvedValue &&\n          null !== resolvedValue &&\n          (isArrayImpl(resolvedValue) ||\n            \"function\" === typeof resolvedValue[ASYNC_ITERATOR] ||\n            resolvedValue.$$typeof === REACT_ELEMENT_TYPE ||\n            resolvedValue.$$typeof === REACT_LAZY_TYPE) &&\n          isArrayImpl(resolvedValue._debugInfo) &&\n          (debugInfo = resolvedValue._debugInfo);\n      }\n      if (debugInfo) {\n        for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) {\n          var info = debugInfo[i];\n          \"number\" === typeof info.time && (startTime$jscomp$0 = info.time);\n          if (\"string\" === typeof info.name) {\n            startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++;\n            trackTime = startTime$jscomp$0;\n            break;\n          }\n        }\n        for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) {\n          var _info = debugInfo[_i4];\n          if (\"number\" === typeof _info.time && _info.time > parentEndTime) {\n            parentEndTime = _info.time;\n            break;\n          }\n        }\n      }\n      var result = {\n        track: trackIdx$jscomp$6,\n        endTime: -Infinity,\n        component: null\n      };\n      root._children = result;\n      for (\n        var childrenEndTime = -Infinity,\n          childTrackIdx = trackIdx$jscomp$6,\n          childTrackTime = trackTime,\n          _i5 = 0;\n        _i5 < children.length;\n        _i5++\n      ) {\n        var childResult = flushComponentPerformance(\n          response$jscomp$0,\n          children[_i5],\n          childTrackIdx,\n          childTrackTime,\n          parentEndTime\n        );\n        null !== childResult.component &&\n          (result.component = childResult.component);\n        childTrackIdx = childResult.track;\n        var childEndTime = childResult.endTime;\n        childEndTime > childTrackTime && (childTrackTime = childEndTime);\n        childEndTime > childrenEndTime && (childrenEndTime = childEndTime);\n      }\n      if (debugInfo)\n        for (\n          var componentEndTime = 0,\n            isLastComponent = !0,\n            endTime = -1,\n            endTimeIdx = -1,\n            _i6 = debugInfo.length - 1;\n          0 <= _i6;\n          _i6--\n        ) {\n          var _info2 = debugInfo[_i6];\n          if (\"number\" === typeof _info2.time) {\n            0 === componentEndTime && (componentEndTime = _info2.time);\n            var time = _info2.time;\n            if (-1 < endTimeIdx)\n              for (var j = endTimeIdx - 1; j > _i6; j--) {\n                var candidateInfo = debugInfo[j];\n                if (\"string\" === typeof candidateInfo.name) {\n                  componentEndTime > childrenEndTime &&\n                    (childrenEndTime = componentEndTime);\n                  var componentInfo$jscomp$0 = candidateInfo,\n                    response = response$jscomp$0,\n                    componentInfo$jscomp$1 = componentInfo$jscomp$0,\n                    trackIdx$jscomp$0 = trackIdx$jscomp$6,\n                    startTime$jscomp$1 = time,\n                    componentEndTime$jscomp$0 = componentEndTime,\n                    childrenEndTime$jscomp$0 = childrenEndTime;\n                  if (\n                    isLastComponent &&\n                    \"rejected\" === root.status &&\n                    root.reason !== response._closedReason\n                  ) {\n                    var componentInfo$jscomp$2 = componentInfo$jscomp$1,\n                      trackIdx$jscomp$1 = trackIdx$jscomp$0,\n                      startTime$jscomp$2 = startTime$jscomp$1,\n                      childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0,\n                      error = root.reason;\n                    if (supportsUserTiming) {\n                      var env = componentInfo$jscomp$2.env,\n                        name = componentInfo$jscomp$2.name,\n                        entryName$jscomp$0 =\n                          env === response._rootEnvironmentName ||\n                          void 0 === env\n                            ? name\n                            : name + \" [\" + env + \"]\",\n                        measureName = \"\\u200b\" + entryName$jscomp$0,\n                        properties = [\n                          [\n                            \"Error\",\n                            \"object\" === typeof error &&\n                            null !== error &&\n                            \"string\" === typeof error.message\n                              ? String(error.message)\n                              : String(error)\n                          ]\n                        ];\n                      null != componentInfo$jscomp$2.key &&\n                        addValueToProperties(\n                          \"key\",\n                          componentInfo$jscomp$2.key,\n                          properties,\n                          0,\n                          \"\"\n                        );\n                      null != componentInfo$jscomp$2.props &&\n                        addObjectToProperties(\n                          componentInfo$jscomp$2.props,\n                          properties,\n                          0,\n                          \"\"\n                        );\n                      performance.measure(measureName, {\n                        start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2,\n                        end: childrenEndTime$jscomp$1,\n                        detail: {\n                          devtools: {\n                            color: \"error\",\n                            track: trackNames[trackIdx$jscomp$1],\n                            trackGroup: \"Server Components \\u269b\",\n                            tooltipText: entryName$jscomp$0 + \" Errored\",\n                            properties: properties\n                          }\n                        }\n                      });\n                      performance.clearMeasures(measureName);\n                    }\n                  } else {\n                    var componentInfo$jscomp$3 = componentInfo$jscomp$1,\n                      trackIdx$jscomp$2 = trackIdx$jscomp$0,\n                      startTime$jscomp$3 = startTime$jscomp$1,\n                      childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0;\n                    if (\n                      supportsUserTiming &&\n                      0 <= childrenEndTime$jscomp$2 &&\n                      10 > trackIdx$jscomp$2\n                    ) {\n                      var env$jscomp$0 = componentInfo$jscomp$3.env,\n                        name$jscomp$0 = componentInfo$jscomp$3.name,\n                        isPrimaryEnv =\n                          env$jscomp$0 === response._rootEnvironmentName,\n                        selfTime =\n                          componentEndTime$jscomp$0 - startTime$jscomp$3,\n                        color$jscomp$0 =\n                          0.5 > selfTime\n                            ? isPrimaryEnv\n                              ? \"primary-light\"\n                              : \"secondary-light\"\n                            : 50 > selfTime\n                              ? isPrimaryEnv\n                                ? \"primary\"\n                                : \"secondary\"\n                              : 500 > selfTime\n                                ? isPrimaryEnv\n                                  ? \"primary-dark\"\n                                  : \"secondary-dark\"\n                                : \"error\",\n                        debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask,\n                        measureName$jscomp$0 =\n                          \"\\u200b\" +\n                          (isPrimaryEnv || void 0 === env$jscomp$0\n                            ? name$jscomp$0\n                            : name$jscomp$0 + \" [\" + env$jscomp$0 + \"]\");\n                      if (debugTask$jscomp$0) {\n                        var properties$jscomp$0 = [];\n                        null != componentInfo$jscomp$3.key &&\n                          addValueToProperties(\n                            \"key\",\n                            componentInfo$jscomp$3.key,\n                            properties$jscomp$0,\n                            0,\n                            \"\"\n                          );\n                        null != componentInfo$jscomp$3.props &&\n                          addObjectToProperties(\n                            componentInfo$jscomp$3.props,\n                            properties$jscomp$0,\n                            0,\n                            \"\"\n                          );\n                        debugTask$jscomp$0.run(\n                          performance.measure.bind(\n                            performance,\n                            measureName$jscomp$0,\n                            {\n                              start:\n                                0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,\n                              end: childrenEndTime$jscomp$2,\n                              detail: {\n                                devtools: {\n                                  color: color$jscomp$0,\n                                  track: trackNames[trackIdx$jscomp$2],\n                                  trackGroup: \"Server Components \\u269b\",\n                                  properties: properties$jscomp$0\n                                }\n                              }\n                            }\n                          )\n                        );\n                        performance.clearMeasures(measureName$jscomp$0);\n                      } else\n                        console.timeStamp(\n                          measureName$jscomp$0,\n                          0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,\n                          childrenEndTime$jscomp$2,\n                          trackNames[trackIdx$jscomp$2],\n                          \"Server Components \\u269b\",\n                          color$jscomp$0\n                        );\n                    }\n                  }\n                  componentEndTime = time;\n                  result.component = componentInfo$jscomp$0;\n                  isLastComponent = !1;\n                } else if (\n                  candidateInfo.awaited &&\n                  null != candidateInfo.awaited.env\n                ) {\n                  endTime > childrenEndTime && (childrenEndTime = endTime);\n                  var asyncInfo = candidateInfo,\n                    env$jscomp$1 = response$jscomp$0._rootEnvironmentName,\n                    promise = asyncInfo.awaited.value;\n                  if (promise) {\n                    var thenable = promise;\n                    switch (thenable.status) {\n                      case \"fulfilled\":\n                        logComponentAwait(\n                          asyncInfo,\n                          trackIdx$jscomp$6,\n                          time,\n                          endTime,\n                          env$jscomp$1,\n                          thenable.value\n                        );\n                        break;\n                      case \"rejected\":\n                        var asyncInfo$jscomp$0 = asyncInfo,\n                          trackIdx$jscomp$3 = trackIdx$jscomp$6,\n                          startTime$jscomp$4 = time,\n                          endTime$jscomp$0 = endTime,\n                          rootEnv = env$jscomp$1,\n                          error$jscomp$0 = thenable.reason;\n                        if (supportsUserTiming && 0 < endTime$jscomp$0) {\n                          var description = getIODescription(error$jscomp$0),\n                            entryName$jscomp$1 =\n                              \"await \" +\n                              getIOShortName(\n                                asyncInfo$jscomp$0.awaited,\n                                description,\n                                asyncInfo$jscomp$0.env,\n                                rootEnv\n                              ),\n                            debugTask$jscomp$1 =\n                              asyncInfo$jscomp$0.debugTask ||\n                              asyncInfo$jscomp$0.awaited.debugTask;\n                          if (debugTask$jscomp$1) {\n                            var properties$jscomp$1 = [\n                                [\n                                  \"Rejected\",\n                                  \"object\" === typeof error$jscomp$0 &&\n                                  null !== error$jscomp$0 &&\n                                  \"string\" === typeof error$jscomp$0.message\n                                    ? String(error$jscomp$0.message)\n                                    : String(error$jscomp$0)\n                                ]\n                              ],\n                              tooltipText =\n                                getIOLongName(\n                                  asyncInfo$jscomp$0.awaited,\n                                  description,\n                                  asyncInfo$jscomp$0.env,\n                                  rootEnv\n                                ) + \" Rejected\";\n                            debugTask$jscomp$1.run(\n                              performance.measure.bind(\n                                performance,\n                                entryName$jscomp$1,\n                                {\n                                  start:\n                                    0 > startTime$jscomp$4\n                                      ? 0\n                                      : startTime$jscomp$4,\n                                  end: endTime$jscomp$0,\n                                  detail: {\n                                    devtools: {\n                                      color: \"error\",\n                                      track: trackNames[trackIdx$jscomp$3],\n                                      trackGroup: \"Server Components \\u269b\",\n                                      properties: properties$jscomp$1,\n                                      tooltipText: tooltipText\n                                    }\n                                  }\n                                }\n                              )\n                            );\n                            performance.clearMeasures(entryName$jscomp$1);\n                          } else\n                            console.timeStamp(\n                              entryName$jscomp$1,\n                              0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4,\n                              endTime$jscomp$0,\n                              trackNames[trackIdx$jscomp$3],\n                              \"Server Components \\u269b\",\n                              \"error\"\n                            );\n                        }\n                        break;\n                      default:\n                        logComponentAwait(\n                          asyncInfo,\n                          trackIdx$jscomp$6,\n                          time,\n                          endTime,\n                          env$jscomp$1,\n                          void 0\n                        );\n                    }\n                  } else\n                    logComponentAwait(\n                      asyncInfo,\n                      trackIdx$jscomp$6,\n                      time,\n                      endTime,\n                      env$jscomp$1,\n                      void 0\n                    );\n                }\n              }\n            else {\n              endTime = time;\n              for (var _j = debugInfo.length - 1; _j > _i6; _j--) {\n                var _candidateInfo = debugInfo[_j];\n                if (\"string\" === typeof _candidateInfo.name) {\n                  componentEndTime > childrenEndTime &&\n                    (childrenEndTime = componentEndTime);\n                  var _componentInfo = _candidateInfo,\n                    _env = response$jscomp$0._rootEnvironmentName,\n                    componentInfo$jscomp$4 = _componentInfo,\n                    trackIdx$jscomp$4 = trackIdx$jscomp$6,\n                    startTime$jscomp$5 = time,\n                    childrenEndTime$jscomp$3 = childrenEndTime;\n                  if (supportsUserTiming) {\n                    var env$jscomp$2 = componentInfo$jscomp$4.env,\n                      name$jscomp$1 = componentInfo$jscomp$4.name,\n                      entryName$jscomp$2 =\n                        env$jscomp$2 === _env || void 0 === env$jscomp$2\n                          ? name$jscomp$1\n                          : name$jscomp$1 + \" [\" + env$jscomp$2 + \"]\",\n                      measureName$jscomp$1 = \"\\u200b\" + entryName$jscomp$2,\n                      properties$jscomp$2 = [\n                        [\n                          \"Aborted\",\n                          \"The stream was aborted before this Component finished rendering.\"\n                        ]\n                      ];\n                    null != componentInfo$jscomp$4.key &&\n                      addValueToProperties(\n                        \"key\",\n                        componentInfo$jscomp$4.key,\n                        properties$jscomp$2,\n                        0,\n                        \"\"\n                      );\n                    null != componentInfo$jscomp$4.props &&\n                      addObjectToProperties(\n                        componentInfo$jscomp$4.props,\n                        properties$jscomp$2,\n                        0,\n                        \"\"\n                      );\n                    performance.measure(measureName$jscomp$1, {\n                      start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5,\n                      end: childrenEndTime$jscomp$3,\n                      detail: {\n                        devtools: {\n                          color: \"warning\",\n                          track: trackNames[trackIdx$jscomp$4],\n                          trackGroup: \"Server Components \\u269b\",\n                          tooltipText: entryName$jscomp$2 + \" Aborted\",\n                          properties: properties$jscomp$2\n                        }\n                      }\n                    });\n                    performance.clearMeasures(measureName$jscomp$1);\n                  }\n                  componentEndTime = time;\n                  result.component = _componentInfo;\n                  isLastComponent = !1;\n                } else if (\n                  _candidateInfo.awaited &&\n                  null != _candidateInfo.awaited.env\n                ) {\n                  var _asyncInfo = _candidateInfo,\n                    _env2 = response$jscomp$0._rootEnvironmentName;\n                  _asyncInfo.awaited.end > endTime &&\n                    (endTime = _asyncInfo.awaited.end);\n                  endTime > childrenEndTime && (childrenEndTime = endTime);\n                  var asyncInfo$jscomp$1 = _asyncInfo,\n                    trackIdx$jscomp$5 = trackIdx$jscomp$6,\n                    startTime$jscomp$6 = time,\n                    endTime$jscomp$1 = endTime,\n                    rootEnv$jscomp$0 = _env2;\n                  if (supportsUserTiming && 0 < endTime$jscomp$1) {\n                    var entryName$jscomp$3 =\n                        \"await \" +\n                        getIOShortName(\n                          asyncInfo$jscomp$1.awaited,\n                          \"\",\n                          asyncInfo$jscomp$1.env,\n                          rootEnv$jscomp$0\n                        ),\n                      debugTask$jscomp$2 =\n                        asyncInfo$jscomp$1.debugTask ||\n                        asyncInfo$jscomp$1.awaited.debugTask;\n                    if (debugTask$jscomp$2) {\n                      var tooltipText$jscomp$0 =\n                        getIOLongName(\n                          asyncInfo$jscomp$1.awaited,\n                          \"\",\n                          asyncInfo$jscomp$1.env,\n                          rootEnv$jscomp$0\n                        ) + \" Aborted\";\n                      debugTask$jscomp$2.run(\n                        performance.measure.bind(\n                          performance,\n                          entryName$jscomp$3,\n                          {\n                            start:\n                              0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,\n                            end: endTime$jscomp$1,\n                            detail: {\n                              devtools: {\n                                color: \"warning\",\n                                track: trackNames[trackIdx$jscomp$5],\n                                trackGroup: \"Server Components \\u269b\",\n                                properties: [\n                                  [\n                                    \"Aborted\",\n                                    \"The stream was aborted before this Promise resolved.\"\n                                  ]\n                                ],\n                                tooltipText: tooltipText$jscomp$0\n                              }\n                            }\n                          }\n                        )\n                      );\n                      performance.clearMeasures(entryName$jscomp$3);\n                    } else\n                      console.timeStamp(\n                        entryName$jscomp$3,\n                        0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,\n                        endTime$jscomp$1,\n                        trackNames[trackIdx$jscomp$5],\n                        \"Server Components \\u269b\",\n                        \"warning\"\n                      );\n                  }\n                }\n              }\n            }\n            endTime = time;\n            endTimeIdx = _i6;\n          }\n        }\n      result.endTime = childrenEndTime;\n      return result;\n    }\n    function flushInitialRenderPerformance(response) {\n      if (response._replayConsole) {\n        var rootChunk = getChunk(response, 0);\n        isArrayImpl(rootChunk._children) &&\n          (markAllTracksInOrder(),\n          flushComponentPerformance(\n            response,\n            rootChunk,\n            0,\n            -Infinity,\n            -Infinity\n          ));\n      }\n    }\n    function processFullBinaryRow(\n      response,\n      streamState,\n      id,\n      tag,\n      buffer,\n      chunk\n    ) {\n      switch (tag) {\n        case 65:\n          resolveBuffer(\n            response,\n            id,\n            mergeBuffer(buffer, chunk).buffer,\n            streamState\n          );\n          return;\n        case 79:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int8Array,\n            1,\n            streamState\n          );\n          return;\n        case 111:\n          resolveBuffer(\n            response,\n            id,\n            0 === buffer.length ? chunk : mergeBuffer(buffer, chunk),\n            streamState\n          );\n          return;\n        case 85:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint8ClampedArray,\n            1,\n            streamState\n          );\n          return;\n        case 83:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int16Array,\n            2,\n            streamState\n          );\n          return;\n        case 115:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint16Array,\n            2,\n            streamState\n          );\n          return;\n        case 76:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int32Array,\n            4,\n            streamState\n          );\n          return;\n        case 108:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint32Array,\n            4,\n            streamState\n          );\n          return;\n        case 71:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Float32Array,\n            4,\n            streamState\n          );\n          return;\n        case 103:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Float64Array,\n            8,\n            streamState\n          );\n          return;\n        case 77:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            BigInt64Array,\n            8,\n            streamState\n          );\n          return;\n        case 109:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            BigUint64Array,\n            8,\n            streamState\n          );\n          return;\n        case 86:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            DataView,\n            1,\n            streamState\n          );\n          return;\n      }\n      for (\n        var stringDecoder = response._stringDecoder, row = \"\", i = 0;\n        i < buffer.length;\n        i++\n      )\n        row += stringDecoder.decode(buffer[i], decoderOptions);\n      row += stringDecoder.decode(chunk);\n      processFullStringRow(response, streamState, id, tag, row);\n    }\n    function processFullStringRow(response, streamState, id, tag, row) {\n      switch (tag) {\n        case 73:\n          resolveModule(response, id, row, streamState);\n          break;\n        case 72:\n          id = row[0];\n          streamState = row.slice(1);\n          response = parseModel(response, streamState);\n          streamState = ReactDOMSharedInternals.d;\n          switch (id) {\n            case \"D\":\n              streamState.D(response);\n              break;\n            case \"C\":\n              \"string\" === typeof response\n                ? streamState.C(response)\n                : streamState.C(response[0], response[1]);\n              break;\n            case \"L\":\n              id = response[0];\n              row = response[1];\n              3 === response.length\n                ? streamState.L(id, row, response[2])\n                : streamState.L(id, row);\n              break;\n            case \"m\":\n              \"string\" === typeof response\n                ? streamState.m(response)\n                : streamState.m(response[0], response[1]);\n              break;\n            case \"X\":\n              \"string\" === typeof response\n                ? streamState.X(response)\n                : streamState.X(response[0], response[1]);\n              break;\n            case \"S\":\n              \"string\" === typeof response\n                ? streamState.S(response)\n                : streamState.S(\n                    response[0],\n                    0 === response[1] ? void 0 : response[1],\n                    3 === response.length ? response[2] : void 0\n                  );\n              break;\n            case \"M\":\n              \"string\" === typeof response\n                ? streamState.M(response)\n                : streamState.M(response[0], response[1]);\n          }\n          break;\n        case 69:\n          tag = response._chunks;\n          var chunk = tag.get(id);\n          row = JSON.parse(row);\n          var error = resolveErrorDev(response, row);\n          error.digest = row.digest;\n          chunk\n            ? (resolveChunkDebugInfo(response, streamState, chunk),\n              triggerErrorOnChunk(response, chunk, error))\n            : ((row = new ReactPromise(\"rejected\", null, error)),\n              resolveChunkDebugInfo(response, streamState, row),\n              tag.set(id, row));\n          break;\n        case 84:\n          tag = response._chunks;\n          (chunk = tag.get(id)) && \"pending\" !== chunk.status\n            ? chunk.reason.enqueueValue(row)\n            : (chunk && releasePendingChunk(response, chunk),\n              (row = new ReactPromise(\"fulfilled\", row, null)),\n              resolveChunkDebugInfo(response, streamState, row),\n              tag.set(id, row));\n          break;\n        case 78:\n          response._timeOrigin = +row - performance.timeOrigin;\n          break;\n        case 68:\n          id = getChunk(response, id);\n          \"fulfilled\" !== id.status &&\n            \"rejected\" !== id.status &&\n            \"halted\" !== id.status &&\n            \"blocked\" !== id.status &&\n            \"resolved_module\" !== id.status &&\n            ((streamState = id._debugChunk),\n            (tag = createResolvedModelChunk(response, row)),\n            (tag._debugChunk = streamState),\n            (id._debugChunk = tag),\n            initializeDebugChunk(response, id),\n            \"blocked\" !== tag.status ||\n              (void 0 !== response._debugChannel &&\n                response._debugChannel.hasReadable) ||\n              '\"' !== row[0] ||\n              \"$\" !== row[1] ||\n              ((streamState = row.slice(2, row.length - 1).split(\":\")),\n              (streamState = parseInt(streamState[0], 16)),\n              \"pending\" === getChunk(response, streamState).status &&\n                (id._debugChunk = null)));\n          break;\n        case 74:\n          resolveIOInfo(response, id, row);\n          break;\n        case 87:\n          resolveConsoleEntry(response, row);\n          break;\n        case 82:\n          startReadableStream(response, id, void 0, streamState);\n          break;\n        case 114:\n          startReadableStream(response, id, \"bytes\", streamState);\n          break;\n        case 88:\n          startAsyncIterable(response, id, !1, streamState);\n          break;\n        case 120:\n          startAsyncIterable(response, id, !0, streamState);\n          break;\n        case 67:\n          (id = response._chunks.get(id)) &&\n            \"fulfilled\" === id.status &&\n            (0 === --response._pendingChunks &&\n              (response._weakResponse.response = null),\n            id.reason.close(\"\" === row ? '\"$undefined\"' : row));\n          break;\n        default:\n          if (\"\" === row) {\n            if (\n              ((streamState = response._chunks),\n              (row = streamState.get(id)) ||\n                streamState.set(id, (row = createPendingChunk(response))),\n              \"pending\" === row.status || \"blocked\" === row.status)\n            )\n              releasePendingChunk(response, row),\n                (response = row),\n                (response.status = \"halted\"),\n                (response.value = null),\n                (response.reason = null);\n          } else\n            (tag = response._chunks),\n              (chunk = tag.get(id))\n                ? (resolveChunkDebugInfo(response, streamState, chunk),\n                  resolveModelChunk(response, chunk, row))\n                : ((row = createResolvedModelChunk(response, row)),\n                  resolveChunkDebugInfo(response, streamState, row),\n                  tag.set(id, row));\n      }\n    }\n    function processBinaryChunk(weakResponse, streamState, chunk) {\n      if (!hasGCedResponse(weakResponse)) {\n        weakResponse = unwrapWeakResponse(weakResponse);\n        var i = 0,\n          rowState = streamState._rowState,\n          rowID = streamState._rowID,\n          rowTag = streamState._rowTag,\n          rowLength = streamState._rowLength,\n          buffer = streamState._buffer,\n          chunkLength = chunk.length;\n        for (\n          incrementChunkDebugInfo(streamState, chunkLength);\n          i < chunkLength;\n\n        ) {\n          var lastIdx = -1;\n          switch (rowState) {\n            case 0:\n              lastIdx = chunk[i++];\n              58 === lastIdx\n                ? (rowState = 1)\n                : (rowID =\n                    (rowID << 4) |\n                    (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n              continue;\n            case 1:\n              rowState = chunk[i];\n              84 === rowState ||\n              65 === rowState ||\n              79 === rowState ||\n              111 === rowState ||\n              98 === rowState ||\n              85 === rowState ||\n              83 === rowState ||\n              115 === rowState ||\n              76 === rowState ||\n              108 === rowState ||\n              71 === rowState ||\n              103 === rowState ||\n              77 === rowState ||\n              109 === rowState ||\n              86 === rowState\n                ? ((rowTag = rowState), (rowState = 2), i++)\n                : (64 < rowState && 91 > rowState) ||\n                    35 === rowState ||\n                    114 === rowState ||\n                    120 === rowState\n                  ? ((rowTag = rowState), (rowState = 3), i++)\n                  : ((rowTag = 0), (rowState = 3));\n              continue;\n            case 2:\n              lastIdx = chunk[i++];\n              44 === lastIdx\n                ? (rowState = 4)\n                : (rowLength =\n                    (rowLength << 4) |\n                    (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n              continue;\n            case 3:\n              lastIdx = chunk.indexOf(10, i);\n              break;\n            case 4:\n              (lastIdx = i + rowLength),\n                lastIdx > chunk.length && (lastIdx = -1);\n          }\n          var offset = chunk.byteOffset + i;\n          if (-1 < lastIdx)\n            (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),\n              98 === rowTag\n                ? resolveBuffer(\n                    weakResponse,\n                    rowID,\n                    lastIdx === chunkLength ? rowLength : rowLength.slice(),\n                    streamState\n                  )\n                : processFullBinaryRow(\n                    weakResponse,\n                    streamState,\n                    rowID,\n                    rowTag,\n                    buffer,\n                    rowLength\n                  ),\n              (i = lastIdx),\n              3 === rowState && i++,\n              (rowLength = rowID = rowTag = rowState = 0),\n              (buffer.length = 0);\n          else {\n            chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);\n            98 === rowTag\n              ? ((rowLength -= chunk.byteLength),\n                resolveBuffer(weakResponse, rowID, chunk, streamState))\n              : (buffer.push(chunk), (rowLength -= chunk.byteLength));\n            break;\n          }\n        }\n        streamState._rowState = rowState;\n        streamState._rowID = rowID;\n        streamState._rowTag = rowTag;\n        streamState._rowLength = rowLength;\n      }\n    }\n    function parseModel(response, json) {\n      json = JSON.parse(json);\n      return reviveModel(response, json, { \"\": json }, \"\");\n    }\n    function reviveModel(response, value, parentObject, key) {\n      if (\"string\" === typeof value)\n        return \"$\" === value[0]\n          ? parseModelString(response, parentObject, key, value)\n          : value;\n      if (\"object\" !== typeof value || null === value) return value;\n      if (isArrayImpl(value)) {\n        for (var i = 0; i < value.length; i++)\n          value[i] = reviveModel(response, value[i], value, \"\" + i);\n        if (value[0] === REACT_ELEMENT_TYPE) {\n          if (value[0] === REACT_ELEMENT_TYPE)\n            b: {\n              key = value[4];\n              parentObject = value[5];\n              i = value[6];\n              value = {\n                $$typeof: REACT_ELEMENT_TYPE,\n                type: value[1],\n                key: value[2],\n                props: value[3],\n                _owner: void 0 === key ? null : key\n              };\n              Object.defineProperty(value, \"ref\", {\n                enumerable: !1,\n                get: nullRefGetter\n              });\n              value._store = {};\n              Object.defineProperty(value._store, \"validated\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: i\n              });\n              Object.defineProperty(value, \"_debugInfo\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: null\n              });\n              Object.defineProperty(value, \"_debugStack\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: void 0 === parentObject ? null : parentObject\n              });\n              Object.defineProperty(value, \"_debugTask\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: null\n              });\n              if (null !== initializingHandler) {\n                key = initializingHandler;\n                initializingHandler = key.parent;\n                if (key.errored) {\n                  parentObject = new ReactPromise(\"rejected\", null, key.reason);\n                  initializeElement(response, value, null);\n                  response = {\n                    name: getComponentNameFromType(value.type) || \"\",\n                    owner: value._owner\n                  };\n                  response.debugStack = value._debugStack;\n                  supportsCreateTask && (response.debugTask = value._debugTask);\n                  parentObject._debugInfo = [response];\n                  response = createLazyChunkWrapper(parentObject, i);\n                  break b;\n                }\n                if (0 < key.deps) {\n                  parentObject = new ReactPromise(\"blocked\", null, null);\n                  key.value = value;\n                  key.chunk = parentObject;\n                  i = createLazyChunkWrapper(parentObject, i);\n                  response = initializeElement.bind(null, response, value, i);\n                  parentObject.then(response, response);\n                  response = i;\n                  break b;\n                }\n              }\n              initializeElement(response, value, null);\n              response = value;\n            }\n          else response = value;\n          return response;\n        }\n        return value;\n      }\n      for (i in value)\n        hasOwnProperty.call(value, i) &&\n          (\"__proto__\" === i\n            ? delete value[i]\n            : ((parentObject = reviveModel(response, value[i], value, i)),\n              void 0 !== parentObject\n                ? (value[i] = parentObject)\n                : delete value[i]));\n      return value;\n    }\n    function close(weakResponse) {\n      if (!hasGCedResponse(weakResponse)) {\n        var response = unwrapWeakResponse(weakResponse);\n        response._allowPartialStream\n          ? ((response._closed = !0),\n            response._chunks.forEach(function (chunk) {\n              \"pending\" === chunk.status\n                ? (releasePendingChunk(response, chunk),\n                  (chunk.status = \"halted\"),\n                  (chunk.value = null),\n                  (chunk.reason = null))\n                : \"fulfilled\" === chunk.status &&\n                  null !== chunk.reason &&\n                  chunk.reason.close('\"$undefined\"');\n            }),\n            (weakResponse = response._debugChannel),\n            void 0 !== weakResponse &&\n              (closeDebugChannel(weakResponse),\n              (response._debugChannel = void 0),\n              null !== debugChannelRegistry &&\n                debugChannelRegistry.unregister(response)))\n          : reportGlobalError(weakResponse, Error(\"Connection closed.\"));\n      }\n    }\n    function noServerCall$1() {\n      throw Error(\n        \"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.\"\n      );\n    }\n    function createResponseFromOptions(options) {\n      return createResponse(\n        options.serverConsumerManifest.moduleMap,\n        options.serverConsumerManifest.serverModuleMap,\n        options.serverConsumerManifest.moduleLoading,\n        noServerCall$1,\n        options.encodeFormAction,\n        \"string\" === typeof options.nonce ? options.nonce : void 0,\n        options && options.temporaryReferences\n          ? options.temporaryReferences\n          : void 0,\n        options && options.unstable_allowPartialStream\n          ? options.unstable_allowPartialStream\n          : !1,\n        options && options.findSourceMapURL ? options.findSourceMapURL : void 0,\n        options ? !0 === options.replayConsoleLogs : !1,\n        options && options.environmentName ? options.environmentName : void 0,\n        options && null != options.startTime ? options.startTime : void 0,\n        options && null != options.endTime ? options.endTime : void 0,\n        options && void 0 !== options.debugChannel\n          ? {\n              hasReadable: void 0 !== options.debugChannel.readable,\n              callback: null\n            }\n          : void 0\n      );\n    }\n    function startReadingFromStream$1(response, stream, onDone, debugValue) {\n      function progress(_ref) {\n        var value = _ref.value;\n        if (_ref.done) return onDone();\n        processBinaryChunk(response, streamState, value);\n        return reader.read().then(progress).catch(error);\n      }\n      function error(e) {\n        reportGlobalError(response, e);\n      }\n      var streamState = createStreamState(response, debugValue),\n        reader = stream.getReader();\n      reader.read().then(progress).catch(error);\n    }\n    function noServerCall() {\n      throw Error(\n        \"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.\"\n      );\n    }\n    function startReadingFromStream(response$jscomp$0, stream, onEnd) {\n      var streamState = createStreamState(response$jscomp$0, stream);\n      stream.on(\"data\", function (chunk) {\n        if (\"string\" === typeof chunk) {\n          if (!hasGCedResponse(response$jscomp$0)) {\n            var response = unwrapWeakResponse(response$jscomp$0),\n              i = 0,\n              rowState = streamState._rowState,\n              rowID = streamState._rowID,\n              rowTag = streamState._rowTag,\n              rowLength = streamState._rowLength,\n              buffer = streamState._buffer,\n              chunkLength = chunk.length;\n            for (\n              incrementChunkDebugInfo(streamState, chunkLength);\n              i < chunkLength;\n\n            ) {\n              var lastIdx = -1;\n              switch (rowState) {\n                case 0:\n                  lastIdx = chunk.charCodeAt(i++);\n                  58 === lastIdx\n                    ? (rowState = 1)\n                    : (rowID =\n                        (rowID << 4) |\n                        (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n                  continue;\n                case 1:\n                  rowState = chunk.charCodeAt(i);\n                  84 === rowState ||\n                  65 === rowState ||\n                  79 === rowState ||\n                  111 === rowState ||\n                  85 === rowState ||\n                  83 === rowState ||\n                  115 === rowState ||\n                  76 === rowState ||\n                  108 === rowState ||\n                  71 === rowState ||\n                  103 === rowState ||\n                  77 === rowState ||\n                  109 === rowState ||\n                  86 === rowState\n                    ? ((rowTag = rowState), (rowState = 2), i++)\n                    : (64 < rowState && 91 > rowState) ||\n                        114 === rowState ||\n                        120 === rowState\n                      ? ((rowTag = rowState), (rowState = 3), i++)\n                      : ((rowTag = 0), (rowState = 3));\n                  continue;\n                case 2:\n                  lastIdx = chunk.charCodeAt(i++);\n                  44 === lastIdx\n                    ? (rowState = 4)\n                    : (rowLength =\n                        (rowLength << 4) |\n                        (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n                  continue;\n                case 3:\n                  lastIdx = chunk.indexOf(\"\\n\", i);\n                  break;\n                case 4:\n                  if (84 !== rowTag)\n                    throw Error(\n                      \"Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams.\"\n                    );\n                  if (rowLength < chunk.length || chunk.length > 3 * rowLength)\n                    throw Error(\n                      \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                    );\n                  lastIdx = chunk.length;\n              }\n              if (-1 < lastIdx) {\n                if (0 < buffer.length)\n                  throw Error(\n                    \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                  );\n                i = chunk.slice(i, lastIdx);\n                processFullStringRow(response, streamState, rowID, rowTag, i);\n                i = lastIdx;\n                3 === rowState && i++;\n                rowLength = rowID = rowTag = rowState = 0;\n                buffer.length = 0;\n              } else if (chunk.length !== i)\n                throw Error(\n                  \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                );\n            }\n            streamState._rowState = rowState;\n            streamState._rowID = rowID;\n            streamState._rowTag = rowTag;\n            streamState._rowLength = rowLength;\n          }\n        } else processBinaryChunk(response$jscomp$0, streamState, chunk);\n      });\n      stream.on(\"error\", function (error) {\n        reportGlobalError(response$jscomp$0, error);\n      });\n      stream.on(\"end\", onEnd);\n    }\n    var util = require(\"util\"),\n      ReactDOM = require(\"react-dom\"),\n      React = require(\"react\"),\n      decoderOptions = { stream: !0 },\n      bind$1 = Function.prototype.bind,\n      hasConfirmedEval = !1,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      chunkCache = new Map(),\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      isArrayImpl = Array.isArray,\n      getPrototypeOf = Object.getPrototypeOf,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      ObjectPrototype$1 = Object.prototype,\n      knownServerReferences = new WeakMap(),\n      boundCache = new WeakMap(),\n      fakeServerFunctionIdx = 0,\n      FunctionBind = Function.prototype.bind,\n      ArraySlice = Array.prototype.slice,\n      v8FrameRegExp =\n        /^ {3} at (?:(.+) \\((.+):(\\d+):(\\d+)\\)|(?:async )?(.+):(\\d+):(\\d+))$/,\n      jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\\d+):(\\d+)/,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      supportsUserTiming =\n        \"undefined\" !== typeof console &&\n        \"function\" === typeof console.timeStamp &&\n        \"undefined\" !== typeof performance &&\n        \"function\" === typeof performance.measure,\n      trackNames =\n        \"Primary Parallel Parallel\\u200b Parallel\\u200b\\u200b Parallel\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\".split(\n          \" \"\n        ),\n      prefix,\n      suffix;\n    new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n    var ReactSharedInteralsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ||\n        ReactSharedInteralsServer,\n      ObjectPrototype = Object.prototype,\n      ArrayPrototype = Array.prototype;\n    ReactPromise.prototype = Object.create(Promise.prototype);\n    Object.defineProperty(ReactPromise.prototype, \"then\", {\n      writable: !0,\n      enumerable: !0,\n      configurable: !0,\n      value: function (resolve, reject) {\n        var _this = this;\n        switch (this.status) {\n          case \"resolved_model\":\n            initializeModelChunk(this);\n            break;\n          case \"resolved_module\":\n            initializeModuleChunk(this);\n        }\n        var resolveCallback = resolve,\n          rejectCallback = reject,\n          wrapperPromise = new Promise(function (res, rej) {\n            resolve = function (value) {\n              wrapperPromise._debugInfo = _this._debugInfo;\n              res(value);\n            };\n            reject = function (reason) {\n              wrapperPromise._debugInfo = _this._debugInfo;\n              rej(reason);\n            };\n          });\n        wrapperPromise.then(resolveCallback, rejectCallback);\n        switch (this.status) {\n          case \"fulfilled\":\n            \"function\" === typeof resolve && resolve(this.value);\n            break;\n          case \"pending\":\n          case \"blocked\":\n            \"function\" === typeof resolve &&\n              (null === this.value && (this.value = []),\n              this.value.push(resolve));\n            \"function\" === typeof reject &&\n              (null === this.reason && (this.reason = []),\n              this.reason.push(reject));\n            break;\n          case \"halted\":\n            break;\n          default:\n            \"function\" === typeof reject && reject(this.reason);\n        }\n      }\n    });\n    var debugChannelRegistry =\n        \"function\" === typeof FinalizationRegistry\n          ? new FinalizationRegistry(closeDebugChannel)\n          : null,\n      initializingHandler = null,\n      initializingChunk = null,\n      isInitializingDebugInfo = !1,\n      mightHaveStaticConstructor = /\\bclass\\b.*\\bstatic\\b/,\n      MIN_CHUNK_SIZE = 65536,\n      supportsCreateTask = !!console.createTask,\n      fakeFunctionCache = new Map(),\n      fakeFunctionIdx = 0,\n      createFakeJSXCallStack = {\n        react_stack_bottom_frame: function (response, stack, environmentName) {\n          return buildFakeCallStack(\n            response,\n            stack,\n            environmentName,\n            !1,\n            fakeJSXCallSite\n          )();\n        }\n      },\n      createFakeJSXCallStackInDEV =\n        createFakeJSXCallStack.react_stack_bottom_frame.bind(\n          createFakeJSXCallStack\n        ),\n      ownerStackTraceLimit = 10,\n      currentOwnerInDEV = null,\n      replayConsoleWithCallStack = {\n        react_stack_bottom_frame: function (response, payload) {\n          var methodName = payload[0],\n            stackTrace = payload[1],\n            owner = payload[2],\n            env = payload[3];\n          payload = payload.slice(4);\n          var prevStack = ReactSharedInternals.getCurrentStack;\n          ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n          currentOwnerInDEV = null === owner ? response._debugRootOwner : owner;\n          try {\n            a: {\n              var offset = 0;\n              switch (methodName) {\n                case \"dir\":\n                case \"dirxml\":\n                case \"groupEnd\":\n                case \"table\":\n                  var JSCompiler_inline_result = bind$1.apply(\n                    console[methodName],\n                    [console].concat(payload)\n                  );\n                  break a;\n                case \"assert\":\n                  offset = 1;\n              }\n              var newArgs = payload.slice(0);\n              \"string\" === typeof newArgs[offset]\n                ? newArgs.splice(\n                    offset,\n                    1,\n                    \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c \" + newArgs[offset],\n                    \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n                    \" \" + env + \" \",\n                    \"\"\n                  )\n                : newArgs.splice(\n                    offset,\n                    0,\n                    \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\",\n                    \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n                    \" \" + env + \" \",\n                    \"\"\n                  );\n              newArgs.unshift(console);\n              JSCompiler_inline_result = bind$1.apply(\n                console[methodName],\n                newArgs\n              );\n            }\n            var callStack = buildFakeCallStack(\n              response,\n              stackTrace,\n              env,\n              !1,\n              JSCompiler_inline_result\n            );\n            if (null != owner) {\n              var task = initializeFakeTask(response, owner);\n              initializeFakeStack(response, owner);\n              if (null !== task) {\n                task.run(callStack);\n                return;\n              }\n            }\n            var rootTask = getRootTask(response, env);\n            null != rootTask ? rootTask.run(callStack) : callStack();\n          } finally {\n            (currentOwnerInDEV = null),\n              (ReactSharedInternals.getCurrentStack = prevStack);\n          }\n        }\n      },\n      replayConsoleWithCallStackInDEV =\n        replayConsoleWithCallStack.react_stack_bottom_frame.bind(\n          replayConsoleWithCallStack\n        );\n    exports.createFromFetch = function (promiseForResponse, options) {\n      var response = createResponseFromOptions(options);\n      promiseForResponse.then(\n        function (r) {\n          if (\n            options &&\n            options.debugChannel &&\n            options.debugChannel.readable\n          ) {\n            var streamDoneCount = 0,\n              handleDone = function () {\n                2 === ++streamDoneCount && close(response);\n              };\n            startReadingFromStream$1(\n              response,\n              options.debugChannel.readable,\n              handleDone\n            );\n            startReadingFromStream$1(response, r.body, handleDone, r);\n          } else\n            startReadingFromStream$1(\n              response,\n              r.body,\n              close.bind(null, response),\n              r\n            );\n        },\n        function (e) {\n          reportGlobalError(response, e);\n        }\n      );\n      return getRoot(response);\n    };\n    exports.createFromNodeStream = function (\n      stream,\n      serverConsumerManifest,\n      options\n    ) {\n      var response = createResponse(\n        serverConsumerManifest.moduleMap,\n        serverConsumerManifest.serverModuleMap,\n        serverConsumerManifest.moduleLoading,\n        noServerCall,\n        options ? options.encodeFormAction : void 0,\n        options && \"string\" === typeof options.nonce ? options.nonce : void 0,\n        void 0,\n        options && options.unstable_allowPartialStream\n          ? options.unstable_allowPartialStream\n          : !1,\n        options && options.findSourceMapURL ? options.findSourceMapURL : void 0,\n        options ? !0 === options.replayConsoleLogs : !1,\n        options && options.environmentName ? options.environmentName : void 0,\n        options && null != options.startTime ? options.startTime : void 0,\n        options && null != options.endTime ? options.endTime : void 0,\n        options && void 0 !== options.debugChannel\n          ? { hasReadable: !0, callback: null }\n          : void 0\n      );\n      if (options && options.debugChannel) {\n        var streamEndedCount = 0;\n        serverConsumerManifest = function () {\n          2 === ++streamEndedCount && close(response);\n        };\n        startReadingFromStream(\n          response,\n          options.debugChannel,\n          serverConsumerManifest\n        );\n        startReadingFromStream(response, stream, serverConsumerManifest);\n      } else\n        startReadingFromStream(response, stream, close.bind(null, response));\n      return getRoot(response);\n    };\n    exports.createFromReadableStream = function (stream, options) {\n      var response = createResponseFromOptions(options);\n      if (options && options.debugChannel && options.debugChannel.readable) {\n        var streamDoneCount = 0,\n          handleDone = function () {\n            2 === ++streamDoneCount && close(response);\n          };\n        startReadingFromStream$1(\n          response,\n          options.debugChannel.readable,\n          handleDone\n        );\n        startReadingFromStream$1(response, stream, handleDone, stream);\n      } else\n        startReadingFromStream$1(\n          response,\n          stream,\n          close.bind(null, response),\n          stream\n        );\n      return getRoot(response);\n    };\n    exports.createServerReference = function (id) {\n      return createServerReference$1(id, noServerCall$1);\n    };\n    exports.createTemporaryReferenceSet = function () {\n      return new Map();\n    };\n    exports.encodeReply = function (value, options) {\n      return new Promise(function (resolve, reject) {\n        var abort = processReply(\n          value,\n          \"\",\n          options && options.temporaryReferences\n            ? options.temporaryReferences\n            : void 0,\n          resolve,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(signal.reason);\n          else {\n            var listener = function () {\n              abort(signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n      });\n    };\n    exports.registerServerReference = function (\n      reference,\n      id,\n      encodeFormAction\n    ) {\n      registerBoundServerReference(reference, id, null, encodeFormAction);\n      return reference;\n    };\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-server-dom-webpack-client.node.production.js');\n} else {\n  module.exports = require('./cjs/react-server-dom-webpack-client.node.development.js');\n}\n","/**\n * @license React\n * react-compiler-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    var ReactSharedInternals =\n      require(\"next/dist/compiled/react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    exports.c = function (size) {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher.useMemoCache(size);\n    };\n  })();\n","/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function defineDeprecationWarning(methodName, info) {\n      Object.defineProperty(Component.prototype, methodName, {\n        get: function () {\n          console.warn(\n            \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n            info[0],\n            info[1]\n          );\n        }\n      });\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          (publicInstance.displayName || publicInstance.name)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnStateUpdateForUnmountedComponent[warningKey] ||\n        (console.error(\n          \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n    }\n    function Component(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function ComponentDummy() {}\n    function PureComponent(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function cloneAndReplaceKey(oldElement, newKey) {\n      newKey = ReactElement(\n        oldElement.type,\n        newKey,\n        oldElement.props,\n        oldElement._owner,\n        oldElement._debugStack,\n        oldElement._debugTask\n      );\n      oldElement._store &&\n        (newKey._store.validated = oldElement._store.validated);\n      return newKey;\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    function escape(key) {\n      var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n      return (\n        \"$\" +\n        key.replace(/[=:]/g, function (match) {\n          return escaperLookup[match];\n        })\n      );\n    }\n    function getElementKey(element, index) {\n      return \"object\" === typeof element &&\n        null !== element &&\n        null != element.key\n        ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n        : index.toString(36);\n    }\n    function resolveThenable(thenable) {\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          switch (\n            (\"string\" === typeof thenable.status\n              ? thenable.then(noop, noop)\n              : ((thenable.status = \"pending\"),\n                thenable.then(\n                  function (fulfilledValue) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"fulfilled\"),\n                      (thenable.value = fulfilledValue));\n                  },\n                  function (error) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"rejected\"),\n                      (thenable.reason = error));\n                  }\n                )),\n            thenable.status)\n          ) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n      }\n      throw thenable;\n    }\n    function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n      var type = typeof children;\n      if (\"undefined\" === type || \"boolean\" === type) children = null;\n      var invokeCallback = !1;\n      if (null === children) invokeCallback = !0;\n      else\n        switch (type) {\n          case \"bigint\":\n          case \"string\":\n          case \"number\":\n            invokeCallback = !0;\n            break;\n          case \"object\":\n            switch (children.$$typeof) {\n              case REACT_ELEMENT_TYPE:\n              case REACT_PORTAL_TYPE:\n                invokeCallback = !0;\n                break;\n              case REACT_LAZY_TYPE:\n                return (\n                  (invokeCallback = children._init),\n                  mapIntoArray(\n                    invokeCallback(children._payload),\n                    array,\n                    escapedPrefix,\n                    nameSoFar,\n                    callback\n                  )\n                );\n            }\n        }\n      if (invokeCallback) {\n        invokeCallback = children;\n        callback = callback(invokeCallback);\n        var childKey =\n          \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n        isArrayImpl(callback)\n          ? ((escapedPrefix = \"\"),\n            null != childKey &&\n              (escapedPrefix =\n                childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n            mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n              return c;\n            }))\n          : null != callback &&\n            (isValidElement(callback) &&\n              (null != callback.key &&\n                ((invokeCallback && invokeCallback.key === callback.key) ||\n                  checkKeyStringCoercion(callback.key)),\n              (escapedPrefix = cloneAndReplaceKey(\n                callback,\n                escapedPrefix +\n                  (null == callback.key ||\n                  (invokeCallback && invokeCallback.key === callback.key)\n                    ? \"\"\n                    : (\"\" + callback.key).replace(\n                        userProvidedKeyEscapeRegex,\n                        \"$&/\"\n                      ) + \"/\") +\n                  childKey\n              )),\n              \"\" !== nameSoFar &&\n                null != invokeCallback &&\n                isValidElement(invokeCallback) &&\n                null == invokeCallback.key &&\n                invokeCallback._store &&\n                !invokeCallback._store.validated &&\n                (escapedPrefix._store.validated = 2),\n              (callback = escapedPrefix)),\n            array.push(callback));\n        return 1;\n      }\n      invokeCallback = 0;\n      childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n      if (isArrayImpl(children))\n        for (var i = 0; i < children.length; i++)\n          (nameSoFar = children[i]),\n            (type = childKey + getElementKey(nameSoFar, i)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n        for (\n          i === children.entries &&\n            (didWarnAboutMaps ||\n              console.warn(\n                \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n              ),\n            (didWarnAboutMaps = !0)),\n            children = i.call(children),\n            i = 0;\n          !(nameSoFar = children.next()).done;\n\n        )\n          (nameSoFar = nameSoFar.value),\n            (type = childKey + getElementKey(nameSoFar, i++)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (\"object\" === type) {\n        if (\"function\" === typeof children.then)\n          return mapIntoArray(\n            resolveThenable(children),\n            array,\n            escapedPrefix,\n            nameSoFar,\n            callback\n          );\n        array = String(children);\n        throw Error(\n          \"Objects are not valid as a React child (found: \" +\n            (\"[object Object]\" === array\n              ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n              : array) +\n            \"). If you meant to render a collection of children, use an array instead.\"\n        );\n      }\n      return invokeCallback;\n    }\n    function mapChildren(children, func, context) {\n      if (null == children) return children;\n      var result = [],\n        count = 0;\n      mapIntoArray(children, result, \"\", \"\", function (child) {\n        return func.call(context, child, count++);\n      });\n      return result;\n    }\n    function lazyInitializer(payload) {\n      if (-1 === payload._status) {\n        var resolveDebugValue = null,\n          rejectDebugValue = null,\n          ioInfo = payload._ioInfo;\n        null != ioInfo &&\n          ((ioInfo.start = ioInfo.end = performance.now()),\n          (ioInfo.value = new Promise(function (resolve, reject) {\n            resolveDebugValue = resolve;\n            rejectDebugValue = reject;\n          })));\n        ioInfo = payload._result;\n        var thenable = ioInfo();\n        thenable.then(\n          function (moduleObject) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 1;\n              payload._result = moduleObject;\n              var _ioInfo = payload._ioInfo;\n              if (null != _ioInfo) {\n                _ioInfo.end = performance.now();\n                var debugValue =\n                  null == moduleObject ? void 0 : moduleObject.default;\n                resolveDebugValue(debugValue);\n                _ioInfo.value.status = \"fulfilled\";\n                _ioInfo.value.value = debugValue;\n              }\n              void 0 === thenable.status &&\n                ((thenable.status = \"fulfilled\"),\n                (thenable.value = moduleObject));\n            }\n          },\n          function (error) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 2;\n              payload._result = error;\n              var _ioInfo2 = payload._ioInfo;\n              null != _ioInfo2 &&\n                ((_ioInfo2.end = performance.now()),\n                _ioInfo2.value.then(noop, noop),\n                rejectDebugValue(error),\n                (_ioInfo2.value.status = \"rejected\"),\n                (_ioInfo2.value.reason = error));\n              void 0 === thenable.status &&\n                ((thenable.status = \"rejected\"), (thenable.reason = error));\n            }\n          }\n        );\n        ioInfo = payload._ioInfo;\n        if (null != ioInfo) {\n          var displayName = thenable.displayName;\n          \"string\" === typeof displayName && (ioInfo.name = displayName);\n        }\n        -1 === payload._status &&\n          ((payload._status = 0), (payload._result = thenable));\n      }\n      if (1 === payload._status)\n        return (\n          (ioInfo = payload._result),\n          void 0 === ioInfo &&\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n              ioInfo\n            ),\n          \"default\" in ioInfo ||\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\",\n              ioInfo\n            ),\n          ioInfo.default\n        );\n      throw payload._result;\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    function releaseAsyncTransition() {\n      ReactSharedInternals.asyncTransitions--;\n    }\n    function startTransition(scope) {\n      var prevTransition = ReactSharedInternals.T,\n        currentTransition = {};\n      currentTransition.types =\n        null !== prevTransition ? prevTransition.types : null;\n      currentTransition._updatedFibers = new Set();\n      ReactSharedInternals.T = currentTransition;\n      try {\n        var returnValue = scope(),\n          onStartTransitionFinish = ReactSharedInternals.S;\n        null !== onStartTransitionFinish &&\n          onStartTransitionFinish(currentTransition, returnValue);\n        \"object\" === typeof returnValue &&\n          null !== returnValue &&\n          \"function\" === typeof returnValue.then &&\n          (ReactSharedInternals.asyncTransitions++,\n          returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n          returnValue.then(noop, reportGlobalError));\n      } catch (error) {\n        reportGlobalError(error);\n      } finally {\n        null === prevTransition &&\n          currentTransition._updatedFibers &&\n          ((scope = currentTransition._updatedFibers.size),\n          currentTransition._updatedFibers.clear(),\n          10 < scope &&\n            console.warn(\n              \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n            )),\n          null !== prevTransition &&\n            null !== currentTransition.types &&\n            (null !== prevTransition.types &&\n              prevTransition.types !== currentTransition.types &&\n              console.error(\n                \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n              ),\n            (prevTransition.types = currentTransition.types)),\n          (ReactSharedInternals.T = prevTransition);\n      }\n    }\n    function addTransitionType(type) {\n      var transition = ReactSharedInternals.T;\n      if (null !== transition) {\n        var transitionTypes = transition.types;\n        null === transitionTypes\n          ? (transition.types = [type])\n          : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n      } else\n        0 === ReactSharedInternals.asyncTransitions &&\n          console.error(\n            \"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition.\"\n          ),\n          startTransition(addTransitionType.bind(null, type));\n    }\n    function enqueueTask(task) {\n      if (null === enqueueTaskImpl)\n        try {\n          var requireString = (\"require\" + Math.random()).slice(0, 7);\n          enqueueTaskImpl = (module && module[requireString]).call(\n            module,\n            \"timers\"\n          ).setImmediate;\n        } catch (_err) {\n          enqueueTaskImpl = function (callback) {\n            !1 === didWarnAboutMessageChannel &&\n              ((didWarnAboutMessageChannel = !0),\n              \"undefined\" === typeof MessageChannel &&\n                console.error(\n                  \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n                ));\n            var channel = new MessageChannel();\n            channel.port1.onmessage = callback;\n            channel.port2.postMessage(void 0);\n          };\n        }\n      return enqueueTaskImpl(task);\n    }\n    function aggregateErrors(errors) {\n      return 1 < errors.length && \"function\" === typeof AggregateError\n        ? new AggregateError(errors)\n        : errors[0];\n    }\n    function popActScope(prevActQueue, prevActScopeDepth) {\n      prevActScopeDepth !== actScopeDepth - 1 &&\n        console.error(\n          \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n        );\n      actScopeDepth = prevActScopeDepth;\n    }\n    function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n      var queue = ReactSharedInternals.actQueue;\n      if (null !== queue)\n        if (0 !== queue.length)\n          try {\n            flushActQueue(queue);\n            enqueueTask(function () {\n              return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            });\n            return;\n          } catch (error) {\n            ReactSharedInternals.thrownErrors.push(error);\n          }\n        else ReactSharedInternals.actQueue = null;\n      0 < ReactSharedInternals.thrownErrors.length\n        ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          reject(queue))\n        : resolve(returnValue);\n    }\n    function flushActQueue(queue) {\n      if (!isFlushing) {\n        isFlushing = !0;\n        var i = 0;\n        try {\n          for (; i < queue.length; i++) {\n            var callback = queue[i];\n            do {\n              ReactSharedInternals.didUsePromise = !1;\n              var continuation = callback(!1);\n              if (null !== continuation) {\n                if (ReactSharedInternals.didUsePromise) {\n                  queue[i] = callback;\n                  queue.splice(0, i);\n                  return;\n                }\n                callback = continuation;\n              } else break;\n            } while (1);\n          }\n          queue.length = 0;\n        } catch (error) {\n          queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n        } finally {\n          isFlushing = !1;\n        }\n      }\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      didWarnStateUpdateForUnmountedComponent = {},\n      ReactNoopUpdateQueue = {\n        isMounted: function () {\n          return !1;\n        },\n        enqueueForceUpdate: function (publicInstance) {\n          warnNoop(publicInstance, \"forceUpdate\");\n        },\n        enqueueReplaceState: function (publicInstance) {\n          warnNoop(publicInstance, \"replaceState\");\n        },\n        enqueueSetState: function (publicInstance) {\n          warnNoop(publicInstance, \"setState\");\n        }\n      },\n      assign = Object.assign,\n      emptyObject = {};\n    Object.freeze(emptyObject);\n    Component.prototype.isReactComponent = {};\n    Component.prototype.setState = function (partialState, callback) {\n      if (\n        \"object\" !== typeof partialState &&\n        \"function\" !== typeof partialState &&\n        null != partialState\n      )\n        throw Error(\n          \"takes an object of state variables to update or a function which returns an object of state variables.\"\n        );\n      this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n    };\n    Component.prototype.forceUpdate = function (callback) {\n      this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n    };\n    var deprecatedAPIs = {\n      isMounted: [\n        \"isMounted\",\n        \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n      ],\n      replaceState: [\n        \"replaceState\",\n        \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n      ]\n    };\n    for (fnName in deprecatedAPIs)\n      deprecatedAPIs.hasOwnProperty(fnName) &&\n        defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n    ComponentDummy.prototype = Component.prototype;\n    deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n    deprecatedAPIs.constructor = PureComponent;\n    assign(deprecatedAPIs, Component.prototype);\n    deprecatedAPIs.isPureReactComponent = !0;\n    var isArrayImpl = Array.isArray,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals = {\n        H: null,\n        A: null,\n        T: null,\n        S: null,\n        actQueue: null,\n        asyncTransitions: 0,\n        isBatchingLegacy: !1,\n        didScheduleLegacyUpdate: !1,\n        didUsePromise: !1,\n        thrownErrors: [],\n        getCurrentStack: null,\n        recentlyCreatedOwnerStacks: 0\n      },\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    deprecatedAPIs = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n      deprecatedAPIs,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutMaps = !1,\n      userProvidedKeyEscapeRegex = /\\/+/g,\n      reportGlobalError =\n        \"function\" === typeof reportError\n          ? reportError\n          : function (error) {\n              if (\n                \"object\" === typeof window &&\n                \"function\" === typeof window.ErrorEvent\n              ) {\n                var event = new window.ErrorEvent(\"error\", {\n                  bubbles: !0,\n                  cancelable: !0,\n                  message:\n                    \"object\" === typeof error &&\n                    null !== error &&\n                    \"string\" === typeof error.message\n                      ? String(error.message)\n                      : String(error),\n                  error: error\n                });\n                if (!window.dispatchEvent(event)) return;\n              } else if (\n                \"object\" === typeof process &&\n                \"function\" === typeof process.emit\n              ) {\n                process.emit(\"uncaughtException\", error);\n                return;\n              }\n              console.error(error);\n            },\n      didWarnAboutMessageChannel = !1,\n      enqueueTaskImpl = null,\n      actScopeDepth = 0,\n      didWarnNoAwaitAct = !1,\n      isFlushing = !1,\n      queueSeveralMicrotasks =\n        \"function\" === typeof queueMicrotask\n          ? function (callback) {\n              queueMicrotask(function () {\n                return queueMicrotask(callback);\n              });\n            }\n          : enqueueTask;\n    deprecatedAPIs = Object.freeze({\n      __proto__: null,\n      c: function (size) {\n        return resolveDispatcher().useMemoCache(size);\n      }\n    });\n    var fnName = {\n      map: mapChildren,\n      forEach: function (children, forEachFunc, forEachContext) {\n        mapChildren(\n          children,\n          function () {\n            forEachFunc.apply(this, arguments);\n          },\n          forEachContext\n        );\n      },\n      count: function (children) {\n        var n = 0;\n        mapChildren(children, function () {\n          n++;\n        });\n        return n;\n      },\n      toArray: function (children) {\n        return (\n          mapChildren(children, function (child) {\n            return child;\n          }) || []\n        );\n      },\n      only: function (children) {\n        if (!isValidElement(children))\n          throw Error(\n            \"React.Children.only expected to receive a single React element child.\"\n          );\n        return children;\n      }\n    };\n    exports.Activity = REACT_ACTIVITY_TYPE;\n    exports.Children = fnName;\n    exports.Component = Component;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.PureComponent = PureComponent;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n    exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      ReactSharedInternals;\n    exports.__COMPILER_RUNTIME = deprecatedAPIs;\n    exports.act = function (callback) {\n      var prevActQueue = ReactSharedInternals.actQueue,\n        prevActScopeDepth = actScopeDepth;\n      actScopeDepth++;\n      var queue = (ReactSharedInternals.actQueue =\n          null !== prevActQueue ? prevActQueue : []),\n        didAwaitActCall = !1;\n      try {\n        var result = callback();\n      } catch (error) {\n        ReactSharedInternals.thrownErrors.push(error);\n      }\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          (popActScope(prevActQueue, prevActScopeDepth),\n          (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      if (\n        null !== result &&\n        \"object\" === typeof result &&\n        \"function\" === typeof result.then\n      ) {\n        var thenable = result;\n        queueSeveralMicrotasks(function () {\n          didAwaitActCall ||\n            didWarnNoAwaitAct ||\n            ((didWarnNoAwaitAct = !0),\n            console.error(\n              \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n            ));\n        });\n        return {\n          then: function (resolve, reject) {\n            didAwaitActCall = !0;\n            thenable.then(\n              function (returnValue) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                if (0 === prevActScopeDepth) {\n                  try {\n                    flushActQueue(queue),\n                      enqueueTask(function () {\n                        return recursivelyFlushAsyncActWork(\n                          returnValue,\n                          resolve,\n                          reject\n                        );\n                      });\n                  } catch (error$0) {\n                    ReactSharedInternals.thrownErrors.push(error$0);\n                  }\n                  if (0 < ReactSharedInternals.thrownErrors.length) {\n                    var _thrownError = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    );\n                    ReactSharedInternals.thrownErrors.length = 0;\n                    reject(_thrownError);\n                  }\n                } else resolve(returnValue);\n              },\n              function (error) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                0 < ReactSharedInternals.thrownErrors.length\n                  ? ((error = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    )),\n                    (ReactSharedInternals.thrownErrors.length = 0),\n                    reject(error))\n                  : reject(error);\n              }\n            );\n          }\n        };\n      }\n      var returnValue$jscomp$0 = result;\n      popActScope(prevActQueue, prevActScopeDepth);\n      0 === prevActScopeDepth &&\n        (flushActQueue(queue),\n        0 !== queue.length &&\n          queueSeveralMicrotasks(function () {\n            didAwaitActCall ||\n              didWarnNoAwaitAct ||\n              ((didWarnNoAwaitAct = !0),\n              console.error(\n                \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n              ));\n          }),\n        (ReactSharedInternals.actQueue = null));\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      return {\n        then: function (resolve, reject) {\n          didAwaitActCall = !0;\n          0 === prevActScopeDepth\n            ? ((ReactSharedInternals.actQueue = queue),\n              enqueueTask(function () {\n                return recursivelyFlushAsyncActWork(\n                  returnValue$jscomp$0,\n                  resolve,\n                  reject\n                );\n              }))\n            : resolve(returnValue$jscomp$0);\n        }\n      };\n    };\n    exports.addTransitionType = addTransitionType;\n    exports.cache = function (fn) {\n      return function () {\n        return fn.apply(null, arguments);\n      };\n    };\n    exports.cacheSignal = function () {\n      return null;\n    };\n    exports.captureOwnerStack = function () {\n      var getCurrentStack = ReactSharedInternals.getCurrentStack;\n      return null === getCurrentStack ? null : getCurrentStack();\n    };\n    exports.cloneElement = function (element, config, children) {\n      if (null === element || void 0 === element)\n        throw Error(\n          \"The argument must be a React element, but you passed \" +\n            element +\n            \".\"\n        );\n      var props = assign({}, element.props),\n        key = element.key,\n        owner = element._owner;\n      if (null != config) {\n        var JSCompiler_inline_result;\n        a: {\n          if (\n            hasOwnProperty.call(config, \"ref\") &&\n            (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n              config,\n              \"ref\"\n            ).get) &&\n            JSCompiler_inline_result.isReactWarning\n          ) {\n            JSCompiler_inline_result = !1;\n            break a;\n          }\n          JSCompiler_inline_result = void 0 !== config.ref;\n        }\n        JSCompiler_inline_result && (owner = getOwner());\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n        for (propName in config)\n          !hasOwnProperty.call(config, propName) ||\n            \"key\" === propName ||\n            \"__self\" === propName ||\n            \"__source\" === propName ||\n            (\"ref\" === propName && void 0 === config.ref) ||\n            (props[propName] = config[propName]);\n      }\n      var propName = arguments.length - 2;\n      if (1 === propName) props.children = children;\n      else if (1 < propName) {\n        JSCompiler_inline_result = Array(propName);\n        for (var i = 0; i < propName; i++)\n          JSCompiler_inline_result[i] = arguments[i + 2];\n        props.children = JSCompiler_inline_result;\n      }\n      props = ReactElement(\n        element.type,\n        key,\n        props,\n        owner,\n        element._debugStack,\n        element._debugTask\n      );\n      for (key = 2; key < arguments.length; key++)\n        validateChildKeys(arguments[key]);\n      return props;\n    };\n    exports.createContext = function (defaultValue) {\n      defaultValue = {\n        $$typeof: REACT_CONTEXT_TYPE,\n        _currentValue: defaultValue,\n        _currentValue2: defaultValue,\n        _threadCount: 0,\n        Provider: null,\n        Consumer: null\n      };\n      defaultValue.Provider = defaultValue;\n      defaultValue.Consumer = {\n        $$typeof: REACT_CONSUMER_TYPE,\n        _context: defaultValue\n      };\n      defaultValue._currentRenderer = null;\n      defaultValue._currentRenderer2 = null;\n      return defaultValue;\n    };\n    exports.createElement = function (type, config, children) {\n      for (var i = 2; i < arguments.length; i++)\n        validateChildKeys(arguments[i]);\n      var propName;\n      i = {};\n      var key = null;\n      if (null != config)\n        for (propName in (didWarnAboutOldJSXRuntime ||\n          !(\"__self\" in config) ||\n          \"key\" in config ||\n          ((didWarnAboutOldJSXRuntime = !0),\n          console.warn(\n            \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n          )),\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n        config))\n          hasOwnProperty.call(config, propName) &&\n            \"key\" !== propName &&\n            \"__self\" !== propName &&\n            \"__source\" !== propName &&\n            (i[propName] = config[propName]);\n      var childrenLength = arguments.length - 2;\n      if (1 === childrenLength) i.children = children;\n      else if (1 < childrenLength) {\n        for (\n          var childArray = Array(childrenLength), _i = 0;\n          _i < childrenLength;\n          _i++\n        )\n          childArray[_i] = arguments[_i + 2];\n        Object.freeze && Object.freeze(childArray);\n        i.children = childArray;\n      }\n      if (type && type.defaultProps)\n        for (propName in ((childrenLength = type.defaultProps), childrenLength))\n          void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n      key &&\n        defineKeyPropWarningGetter(\n          i,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n        ? ((childArray = Error.stackTraceLimit),\n          (Error.stackTraceLimit = 10),\n          (childrenLength = Error(\"react-stack-top-frame\")),\n          (Error.stackTraceLimit = childArray))\n        : (childrenLength = unknownOwnerDebugStack);\n      return ReactElement(\n        type,\n        key,\n        i,\n        getOwner(),\n        childrenLength,\n        propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.createRef = function () {\n      var refObject = { current: null };\n      Object.seal(refObject);\n      return refObject;\n    };\n    exports.forwardRef = function (render) {\n      null != render && render.$$typeof === REACT_MEMO_TYPE\n        ? console.error(\n            \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n          )\n        : \"function\" !== typeof render\n          ? console.error(\n              \"forwardRef requires a render function but was given %s.\",\n              null === render ? \"null\" : typeof render\n            )\n          : 0 !== render.length &&\n            2 !== render.length &&\n            console.error(\n              \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n              1 === render.length\n                ? \"Did you forget to use the ref parameter?\"\n                : \"Any additional parameter will be undefined.\"\n            );\n      null != render &&\n        null != render.defaultProps &&\n        console.error(\n          \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n        );\n      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n        ownName;\n      Object.defineProperty(elementType, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          render.name ||\n            render.displayName ||\n            (Object.defineProperty(render, \"name\", { value: name }),\n            (render.displayName = name));\n        }\n      });\n      return elementType;\n    };\n    exports.isValidElement = isValidElement;\n    exports.lazy = function (ctor) {\n      ctor = { _status: -1, _result: ctor };\n      var lazyType = {\n          $$typeof: REACT_LAZY_TYPE,\n          _payload: ctor,\n          _init: lazyInitializer\n        },\n        ioInfo = {\n          name: \"lazy\",\n          start: -1,\n          end: -1,\n          value: null,\n          owner: null,\n          debugStack: Error(\"react-stack-top-frame\"),\n          debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n        };\n      ctor._ioInfo = ioInfo;\n      lazyType._debugInfo = [{ awaited: ioInfo }];\n      return lazyType;\n    };\n    exports.memo = function (type, compare) {\n      null == type &&\n        console.error(\n          \"memo: The first argument must be a component. Instead received: %s\",\n          null === type ? \"null\" : typeof type\n        );\n      compare = {\n        $$typeof: REACT_MEMO_TYPE,\n        type: type,\n        compare: void 0 === compare ? null : compare\n      };\n      var ownName;\n      Object.defineProperty(compare, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          type.name ||\n            type.displayName ||\n            (Object.defineProperty(type, \"name\", { value: name }),\n            (type.displayName = name));\n        }\n      });\n      return compare;\n    };\n    exports.startTransition = startTransition;\n    exports.unstable_useCacheRefresh = function () {\n      return resolveDispatcher().useCacheRefresh();\n    };\n    exports.use = function (usable) {\n      return resolveDispatcher().use(usable);\n    };\n    exports.useActionState = function (action, initialState, permalink) {\n      return resolveDispatcher().useActionState(\n        action,\n        initialState,\n        permalink\n      );\n    };\n    exports.useCallback = function (callback, deps) {\n      return resolveDispatcher().useCallback(callback, deps);\n    };\n    exports.useContext = function (Context) {\n      var dispatcher = resolveDispatcher();\n      Context.$$typeof === REACT_CONSUMER_TYPE &&\n        console.error(\n          \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n        );\n      return dispatcher.useContext(Context);\n    };\n    exports.useDebugValue = function (value, formatterFn) {\n      return resolveDispatcher().useDebugValue(value, formatterFn);\n    };\n    exports.useDeferredValue = function (value, initialValue) {\n      return resolveDispatcher().useDeferredValue(value, initialValue);\n    };\n    exports.useEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useEffect(create, deps);\n    };\n    exports.useEffectEvent = function (callback) {\n      return resolveDispatcher().useEffectEvent(callback);\n    };\n    exports.useId = function () {\n      return resolveDispatcher().useId();\n    };\n    exports.useImperativeHandle = function (ref, create, deps) {\n      return resolveDispatcher().useImperativeHandle(ref, create, deps);\n    };\n    exports.useInsertionEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useInsertionEffect(create, deps);\n    };\n    exports.useLayoutEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useLayoutEffect(create, deps);\n    };\n    exports.useMemo = function (create, deps) {\n      return resolveDispatcher().useMemo(create, deps);\n    };\n    exports.useOptimistic = function (passthrough, reducer) {\n      return resolveDispatcher().useOptimistic(passthrough, reducer);\n    };\n    exports.useReducer = function (reducer, initialArg, init) {\n      return resolveDispatcher().useReducer(reducer, initialArg, init);\n    };\n    exports.useRef = function (initialValue) {\n      return resolveDispatcher().useRef(initialValue);\n    };\n    exports.useState = function (initialState) {\n      return resolveDispatcher().useState(initialState);\n    };\n    exports.useSyncExternalStore = function (\n      subscribe,\n      getSnapshot,\n      getServerSnapshot\n    ) {\n      return resolveDispatcher().useSyncExternalStore(\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      );\n    };\n    exports.useTransition = function () {\n      return resolveDispatcher().useTransition();\n    };\n    exports.version = \"19.3.0-canary-cbb046ab-20260731\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-compiler-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-compiler-runtime.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-dev-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","(function(){\"use strict\";var e={450:function(e,t){const{hasOwnProperty:n}=Object.prototype;const r=configure();r.configure=configure;r.stringify=r;r.default=r;t.stringify=r;t.configure=configure;e.exports=r;const i=/[\\u0000-\\u001f\\u0022\\u005c\\ud800-\\udfff]/;function strEscape(e){if(e.length<5e3&&!i.test(e)){return`\"${e}\"`}return JSON.stringify(e)}function sort(e,t){if(e.length>200||t){return e.sort(t)}for(let t=1;t<e.length;t++){const n=e[t];let r=t;while(r!==0&&e[r-1]>n){e[r]=e[r-1];r--}e[r]=n}return e}const f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function isTypedArrayWithEntries(e){return f.call(e)!==undefined&&e.length!==0}function stringifyTypedArray(e,t,n){if(e.length<n){n=e.length}const r=t===\",\"?\"\":\" \";let i=`\"0\":${r}${e[0]}`;for(let f=1;f<n;f++){i+=`${t}\"${f}\":${r}${e[f]}`}return i}function getCircularValueOption(e){if(n.call(e,\"circularValue\")){const t=e.circularValue;if(typeof t===\"string\"){return`\"${t}\"`}if(t==null){return t}if(t===Error||t===TypeError){return{toString(){throw new TypeError(\"Converting circular structure to JSON\")}}}throw new TypeError('The \"circularValue\" argument must be of type string or the value null or undefined')}return'\"[Circular]\"'}function getDeterministicOption(e){let t;if(n.call(e,\"deterministic\")){t=e.deterministic;if(typeof t!==\"boolean\"&&typeof t!==\"function\"){throw new TypeError('The \"deterministic\" argument must be of type boolean or comparator function')}}return t===undefined?true:t}function getBooleanOption(e,t){let r;if(n.call(e,t)){r=e[t];if(typeof r!==\"boolean\"){throw new TypeError(`The \"${t}\" argument must be of type boolean`)}}return r===undefined?true:r}function getPositiveIntegerOption(e,t){let r;if(n.call(e,t)){r=e[t];if(typeof r!==\"number\"){throw new TypeError(`The \"${t}\" argument must be of type number`)}if(!Number.isInteger(r)){throw new TypeError(`The \"${t}\" argument must be an integer`)}if(r<1){throw new RangeError(`The \"${t}\" argument must be >= 1`)}}return r===undefined?Infinity:r}function getItemCount(e){if(e===1){return\"1 item\"}return`${e} items`}function getUniqueReplacerSet(e){const t=new Set;for(const n of e){if(typeof n===\"string\"||typeof n===\"number\"){t.add(String(n))}}return t}function getStrictOption(e){if(n.call(e,\"strict\")){const t=e.strict;if(typeof t!==\"boolean\"){throw new TypeError('The \"strict\" argument must be of type boolean')}if(t){return e=>{let t=`Object can not safely be stringified. Received type ${typeof e}`;if(typeof e!==\"function\")t+=` (${e.toString()})`;throw new Error(t)}}}}function configure(e){e={...e};const t=getStrictOption(e);if(t){if(e.bigint===undefined){e.bigint=false}if(!(\"circularValue\"in e)){e.circularValue=Error}}const n=getCircularValueOption(e);const r=getBooleanOption(e,\"bigint\");const i=getDeterministicOption(e);const f=typeof i===\"function\"?i:undefined;const u=getPositiveIntegerOption(e,\"maximumDepth\");const o=getPositiveIntegerOption(e,\"maximumBreadth\");function stringifyFnReplacer(e,s,l,c,a,g){let p=s[e];if(typeof p===\"object\"&&p!==null&&typeof p.toJSON===\"function\"){p=p.toJSON(e)}p=c.call(s,e,p);switch(typeof p){case\"string\":return strEscape(p);case\"object\":{if(p===null){return\"null\"}if(l.indexOf(p)!==-1){return n}let e=\"\";let t=\",\";const r=g;if(Array.isArray(p)){if(p.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(p);if(a!==\"\"){g+=a;e+=`\\n${g}`;t=`,\\n${g}`}const n=Math.min(p.length,o);let i=0;for(;i<n-1;i++){const n=stringifyFnReplacer(String(i),p,l,c,a,g);e+=n!==undefined?n:\"null\";e+=t}const f=stringifyFnReplacer(String(i),p,l,c,a,g);e+=f!==undefined?f:\"null\";if(p.length-1>o){const n=p.length-o-1;e+=`${t}\"... ${getItemCount(n)} not stringified\"`}if(a!==\"\"){e+=`\\n${r}`}l.pop();return`[${e}]`}let s=Object.keys(p);const y=s.length;if(y===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}let d=\"\";let h=\"\";if(a!==\"\"){g+=a;t=`,\\n${g}`;d=\" \"}const $=Math.min(y,o);if(i&&!isTypedArrayWithEntries(p)){s=sort(s,f)}l.push(p);for(let n=0;n<$;n++){const r=s[n];const i=stringifyFnReplacer(r,p,l,c,a,g);if(i!==undefined){e+=`${h}${strEscape(r)}:${d}${i}`;h=t}}if(y>o){const n=y-o;e+=`${h}\"...\":${d}\"${getItemCount(n)} not stringified\"`;h=t}if(a!==\"\"&&h.length>1){e=`\\n${g}${e}\\n${r}`}l.pop();return`{${e}}`}case\"number\":return isFinite(p)?String(p):t?t(p):\"null\";case\"boolean\":return p===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(p)}default:return t?t(p):undefined}}function stringifyArrayReplacer(e,i,f,s,l,c){if(typeof i===\"object\"&&i!==null&&typeof i.toJSON===\"function\"){i=i.toJSON(e)}switch(typeof i){case\"string\":return strEscape(i);case\"object\":{if(i===null){return\"null\"}if(f.indexOf(i)!==-1){return n}const e=c;let t=\"\";let r=\",\";if(Array.isArray(i)){if(i.length===0){return\"[]\"}if(u<f.length+1){return'\"[Array]\"'}f.push(i);if(l!==\"\"){c+=l;t+=`\\n${c}`;r=`,\\n${c}`}const n=Math.min(i.length,o);let a=0;for(;a<n-1;a++){const e=stringifyArrayReplacer(String(a),i[a],f,s,l,c);t+=e!==undefined?e:\"null\";t+=r}const g=stringifyArrayReplacer(String(a),i[a],f,s,l,c);t+=g!==undefined?g:\"null\";if(i.length-1>o){const e=i.length-o-1;t+=`${r}\"... ${getItemCount(e)} not stringified\"`}if(l!==\"\"){t+=`\\n${e}`}f.pop();return`[${t}]`}f.push(i);let a=\"\";if(l!==\"\"){c+=l;r=`,\\n${c}`;a=\" \"}let g=\"\";for(const e of s){const n=stringifyArrayReplacer(e,i[e],f,s,l,c);if(n!==undefined){t+=`${g}${strEscape(e)}:${a}${n}`;g=r}}if(l!==\"\"&&g.length>1){t=`\\n${c}${t}\\n${e}`}f.pop();return`{${t}}`}case\"number\":return isFinite(i)?String(i):t?t(i):\"null\";case\"boolean\":return i===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(i)}default:return t?t(i):undefined}}function stringifyIndent(e,s,l,c,a){switch(typeof s){case\"string\":return strEscape(s);case\"object\":{if(s===null){return\"null\"}if(typeof s.toJSON===\"function\"){s=s.toJSON(e);if(typeof s!==\"object\"){return stringifyIndent(e,s,l,c,a)}if(s===null){return\"null\"}}if(l.indexOf(s)!==-1){return n}const t=a;if(Array.isArray(s)){if(s.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(s);a+=c;let e=`\\n${a}`;const n=`,\\n${a}`;const r=Math.min(s.length,o);let i=0;for(;i<r-1;i++){const t=stringifyIndent(String(i),s[i],l,c,a);e+=t!==undefined?t:\"null\";e+=n}const f=stringifyIndent(String(i),s[i],l,c,a);e+=f!==undefined?f:\"null\";if(s.length-1>o){const t=s.length-o-1;e+=`${n}\"... ${getItemCount(t)} not stringified\"`}e+=`\\n${t}`;l.pop();return`[${e}]`}let r=Object.keys(s);const g=r.length;if(g===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}a+=c;const p=`,\\n${a}`;let y=\"\";let d=\"\";let h=Math.min(g,o);if(isTypedArrayWithEntries(s)){y+=stringifyTypedArray(s,p,o);r=r.slice(s.length);h-=s.length;d=p}if(i){r=sort(r,f)}l.push(s);for(let e=0;e<h;e++){const t=r[e];const n=stringifyIndent(t,s[t],l,c,a);if(n!==undefined){y+=`${d}${strEscape(t)}: ${n}`;d=p}}if(g>o){const e=g-o;y+=`${d}\"...\": \"${getItemCount(e)} not stringified\"`;d=p}if(d!==\"\"){y=`\\n${a}${y}\\n${t}`}l.pop();return`{${y}}`}case\"number\":return isFinite(s)?String(s):t?t(s):\"null\";case\"boolean\":return s===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(s)}default:return t?t(s):undefined}}function stringifySimple(e,s,l){switch(typeof s){case\"string\":return strEscape(s);case\"object\":{if(s===null){return\"null\"}if(typeof s.toJSON===\"function\"){s=s.toJSON(e);if(typeof s!==\"object\"){return stringifySimple(e,s,l)}if(s===null){return\"null\"}}if(l.indexOf(s)!==-1){return n}let t=\"\";const r=s.length!==undefined;if(r&&Array.isArray(s)){if(s.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(s);const e=Math.min(s.length,o);let n=0;for(;n<e-1;n++){const e=stringifySimple(String(n),s[n],l);t+=e!==undefined?e:\"null\";t+=\",\"}const r=stringifySimple(String(n),s[n],l);t+=r!==undefined?r:\"null\";if(s.length-1>o){const e=s.length-o-1;t+=`,\"... ${getItemCount(e)} not stringified\"`}l.pop();return`[${t}]`}let c=Object.keys(s);const a=c.length;if(a===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}let g=\"\";let p=Math.min(a,o);if(r&&isTypedArrayWithEntries(s)){t+=stringifyTypedArray(s,\",\",o);c=c.slice(s.length);p-=s.length;g=\",\"}if(i){c=sort(c,f)}l.push(s);for(let e=0;e<p;e++){const n=c[e];const r=stringifySimple(n,s[n],l);if(r!==undefined){t+=`${g}${strEscape(n)}:${r}`;g=\",\"}}if(a>o){const e=a-o;t+=`${g}\"...\":\"${getItemCount(e)} not stringified\"`}l.pop();return`{${t}}`}case\"number\":return isFinite(s)?String(s):t?t(s):\"null\";case\"boolean\":return s===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(s)}default:return t?t(s):undefined}}function stringify(e,t,n){if(arguments.length>1){let r=\"\";if(typeof n===\"number\"){r=\" \".repeat(Math.min(n,10))}else if(typeof n===\"string\"){r=n.slice(0,10)}if(t!=null){if(typeof t===\"function\"){return stringifyFnReplacer(\"\",{\"\":e},[],t,r,\"\")}if(Array.isArray(t)){return stringifyArrayReplacer(\"\",e,[],getUniqueReplacerSet(t),r,\"\")}}if(r.length!==0){return stringifyIndent(\"\",e,[],r,\"\")}}return stringifySimple(\"\",e,[])}return stringify}}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var f=true;try{e[n](i,i.exports,__nccwpck_require__);f=false}finally{if(f)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n=__nccwpck_require__(450);module.exports=n})();","(()=>{\"use strict\";var e={36:e=>{function hash(e){var r=5381,_=e.length;while(_){r=r*33^e.charCodeAt(--_)}return r>>>0}e.exports=hash}};var r={};function __nccwpck_require__(_){var a=r[_];if(a!==undefined){return a.exports}var t=r[_]={exports:{}};var i=true;try{e[_](t,t.exports,__nccwpck_require__);i=false}finally{if(i)delete r[_]}return t.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var _=__nccwpck_require__(36);module.exports=_})();","(()=>{\"use strict\";var e={371:e=>{e.exports=({onlyFirst:e=false}={})=>{const r=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(r,e?undefined:\"g\")}},173:(e,r,_)=>{const t=_(371);e.exports=e=>typeof e===\"string\"?e.replace(t(),\"\"):e}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var n=true;try{e[_](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[_]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var _=__nccwpck_require__(173);module.exports=_})();","// ISC License\n\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n//\n// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1\n\nconst { env, stdout } = globalThis?.process ?? {}\n\nconst enabled =\n  env &&\n  !env.NO_COLOR &&\n  (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))\n\nconst replaceClose = (\n  str: string,\n  close: string,\n  replace: string,\n  index: number\n): string => {\n  const start = str.substring(0, index) + replace\n  const end = str.substring(index + close.length)\n  const nextIndex = end.indexOf(close)\n  return ~nextIndex\n    ? start + replaceClose(end, close, replace, nextIndex)\n    : start + end\n}\n\nconst formatter = (open: string, close: string, replace = open) => {\n  if (!enabled) return String\n  return (input: string) => {\n    const string = '' + input\n    const index = string.indexOf(close, open.length)\n    return ~index\n      ? open + replaceClose(string, close, replace, index) + close\n      : open + string + close\n  }\n}\n\nexport const reset = enabled ? (s: string) => `\\x1b[0m${s}\\x1b[0m` : String\nexport const bold = formatter('\\x1b[1m', '\\x1b[22m', '\\x1b[22m\\x1b[1m')\nexport const dim = formatter('\\x1b[2m', '\\x1b[22m', '\\x1b[22m\\x1b[2m')\nexport const italic = formatter('\\x1b[3m', '\\x1b[23m')\nexport const underline = formatter('\\x1b[4m', '\\x1b[24m')\nexport const inverse = formatter('\\x1b[7m', '\\x1b[27m')\nexport const hidden = formatter('\\x1b[8m', '\\x1b[28m')\nexport const strikethrough = formatter('\\x1b[9m', '\\x1b[29m')\nexport const black = formatter('\\x1b[30m', '\\x1b[39m')\nexport const red = formatter('\\x1b[31m', '\\x1b[39m')\nexport const green = formatter('\\x1b[32m', '\\x1b[39m')\nexport const yellow = formatter('\\x1b[33m', '\\x1b[39m')\nexport const blue = formatter('\\x1b[34m', '\\x1b[39m')\nexport const magenta = formatter('\\x1b[35m', '\\x1b[39m')\nexport const purple = formatter('\\x1b[38;2;173;127;168m', '\\x1b[39m')\nexport const cyan = formatter('\\x1b[36m', '\\x1b[39m')\nexport const white = formatter('\\x1b[37m', '\\x1b[39m')\nexport const gray = formatter('\\x1b[90m', '\\x1b[39m')\nexport const bgBlack = formatter('\\x1b[40m', '\\x1b[49m')\nexport const bgRed = formatter('\\x1b[41m', '\\x1b[49m')\nexport const bgGreen = formatter('\\x1b[42m', '\\x1b[49m')\nexport const bgYellow = formatter('\\x1b[43m', '\\x1b[49m')\nexport const bgBlue = formatter('\\x1b[44m', '\\x1b[49m')\nexport const bgMagenta = formatter('\\x1b[45m', '\\x1b[49m')\nexport const bgCyan = formatter('\\x1b[46m', '\\x1b[49m')\nexport const bgWhite = formatter('\\x1b[47m', '\\x1b[49m')\n","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'\nimport { LRUCache } from '../../server/lib/lru-cache'\n\nexport const prefixes = {\n  wait: white(bold('○')),\n  error: red(bold('⨯')),\n  warn: yellow(bold('⚠')),\n  ready: '▲', // no color\n  info: white(bold(' ')),\n  event: green(bold('✓')),\n  trace: magenta(bold('»')),\n} as const\n\nconst LOGGING_METHOD = {\n  log: 'log',\n  warn: 'warn',\n  error: 'error',\n} as const\n\nfunction prefixedLog(prefixType: keyof typeof prefixes, ...message: any[]) {\n  if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n    message.shift()\n  }\n\n  const consoleMethod: keyof typeof LOGGING_METHOD =\n    prefixType in LOGGING_METHOD\n      ? LOGGING_METHOD[prefixType as keyof typeof LOGGING_METHOD]\n      : 'log'\n\n  const prefix = prefixes[prefixType]\n  // If there's no message, don't print the prefix but a new line\n  if (message.length === 0) {\n    console[consoleMethod]('')\n  } else {\n    // Ensure if there's ANSI escape codes it's concatenated into one string.\n    // Chrome DevTool can only handle color if it's in one string.\n    if (message.length === 1 && typeof message[0] === 'string') {\n      console[consoleMethod](prefix + ' ' + message[0])\n    } else {\n      console[consoleMethod](prefix, ...message)\n    }\n  }\n}\n\nexport function bootstrap(message: string) {\n  console.log(message)\n}\n\nexport function wait(...message: any[]) {\n  prefixedLog('wait', ...message)\n}\n\nexport function error(...message: any[]) {\n  prefixedLog('error', ...message)\n}\n\nexport function warn(...message: any[]) {\n  prefixedLog('warn', ...message)\n}\n\nexport function ready(...message: any[]) {\n  prefixedLog('ready', ...message)\n}\n\nexport function info(...message: any[]) {\n  prefixedLog('info', ...message)\n}\n\nexport function event(...message: any[]) {\n  prefixedLog('event', ...message)\n}\n\nexport function trace(...message: any[]) {\n  prefixedLog('trace', ...message)\n}\n\nconst warnOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function warnOnce(...message: any[]) {\n  const key = message.join(' ')\n  if (!warnOnceCache.has(key)) {\n    warnOnceCache.set(key, key)\n    warn(...message)\n  }\n}\n\nconst errorOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function errorOnce(...message: any[]) {\n  const key = message.join(' ')\n  if (!errorOnceCache.has(key)) {\n    errorOnceCache.set(key, key)\n    error(...message)\n  }\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n  return new Promise((resolve, reject) => {\n    startTransition(() => {\n      dispatchAppRouterAction({\n        type: ACTION_SERVER_ACTION,\n        actionId,\n        actionArgs,\n        resolve,\n        reject,\n      })\n    })\n  })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n  // Source maps are only served by the dev server.\n  process.env.__NEXT_DEV_SERVER\n    ? function findSourceMapURL(filename: string): string | null {\n        if (filename === '') {\n          return null\n        }\n\n        if (\n          filename.startsWith(document.location.origin) &&\n          filename.includes('/_next/static')\n        ) {\n          // This is a request for a client chunk. This can only happen when\n          // using Turbopack. In this case, since we control how those source\n          // maps are generated, we can safely assume that the sourceMappingURL\n          // is relative to the filename, with an added `.map` extension. The\n          // browser can just request this file, and it gets served through the\n          // normal dev server, without the need to route this through\n          // the `/__nextjs_source-map` dev middleware.\n          return `${filename}.map`\n        }\n\n        const url = new URL(pathname, document.location.origin)\n        url.searchParams.set('filename', filename)\n\n        return url.href\n      }\n    : undefined\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n  'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\n// Cookie for the Instant Navigation Testing API. Sent automatically with all\n// requests while a navigation lock is held; the server uses its presence to\n// render only the shell. Not exposed in production builds by default.\nexport const NEXT_INSTANT_TEST_COOKIE =\n  'next-instant-navigation-testing' as const\n\nexport const FLIGHT_HEADERS = [\n  RSC_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n  return normalizePathTrailingSlash(\n    process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n      ? path\n      : addPathPrefix(path, basePath)\n  )\n}\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n  // 47 is the char code for '/'\n  if (path.charCodeAt(0) !== 47 || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  if (process.env.__NEXT_TRAILING_SLASH) {\n    if (/\\.[^/]+\\/?$/.test(pathname)) {\n      return `${removeTrailingSlash(pathname)}${query}${hash}`\n    } else if (pathname.endsWith('/')) {\n      return `${pathname}${query}${hash}`\n    } else {\n      return `${pathname}/${query}${hash}`\n    }\n  }\n\n  return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { isBot } from '../../shared/lib/router/utils/is-bot'\nimport { addBasePath } from '../add-base-path'\n\nexport function isExternalURL(url: URL) {\n  return url.origin !== window.location.origin\n}\n\n/**\n * Given a link href, constructs the URL that should be prefetched. Returns null\n * in cases where prefetching should be disabled, like external URLs, or\n * during development.\n * @param href The href passed to <Link>, router.prefetch(), or similar\n * @returns A URL object to prefetch, or null if prefetching should be disabled\n */\nexport function createPrefetchURL(href: string): URL | null {\n  // Don't prefetch for bots as they don't navigate.\n  if (isBot(window.navigator.userAgent)) {\n    return null\n  }\n\n  let url: URL\n  try {\n    url = new URL(addBasePath(href), window.location.href)\n  } catch (_) {\n    // TODO: Does this need to throw or can we just console.error instead? Does\n    // anyone rely on this throwing? (Seems unlikely.)\n    throw new Error(\n      `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n    )\n  }\n\n  // Don't prefetch during development (improves compilation performance)\n  if (process.env.NODE_ENV === 'development') {\n    return null\n  }\n\n  // External urls can't be prefetched in the same way.\n  if (isExternalURL(url)) {\n    return null\n  }\n\n  return url\n}\n","import type {\n  ActionFlightResponse,\n  ActionResult,\n} from '../../../../shared/lib/app-router-types'\nimport { callServer } from '../../../app-call-server'\nimport { findSourceMapURL } from '../../../app-find-source-map-url'\nimport {\n  ACTION_HEADER,\n  NEXT_ACTION_NOT_FOUND_HEADER,\n  NEXT_IS_PRERENDER_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n} from '../../app-router-headers'\nimport { UnrecognizedActionError } from '../../unrecognized-action-error'\nimport { fetch } from '../../segment-cache/fetch'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n  createFromFetch as createFromFetchBrowser,\n  createTemporaryReferenceSet,\n  encodeReply,\n} from 'react-server-dom-webpack/client'\n\nimport type {\n  ReadonlyReducerState,\n  ReducerState,\n  ServerActionAction,\n} from '../router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer-types'\nimport { assignLocation } from '../../../assign-location'\nimport { createHrefFromUrl } from '../create-href-from-url'\nimport { hasInterceptionRouteInCurrentTree } from './has-interception-route-in-current-tree'\nimport {\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n  type NormalizedFlightData,\n} from '../../../flight-data-helpers'\nimport { getRedirectError } from '../../redirect'\nimport type { RedirectType } from '../../redirect-error'\nimport { removeBasePath } from '../../../remove-base-path'\nimport { hasBasePath } from '../../../has-base-path'\nimport {\n  extractInfoFromServerReferenceId,\n  omitUnusedArgs,\n} from '../../../../shared/lib/server-reference-info'\nimport {\n  invalidateEntirePrefetchCache,\n  segmentCacheMap,\n} from '../../segment-cache/cache'\nimport { startRevalidationCooldown } from '../../segment-cache/scheduler'\nimport { getDeploymentId } from '../../../../shared/lib/deployment-id'\nimport { getNavigationBuildId } from '../../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../../lib/constants'\nimport {\n  completeHardNavigation,\n  convertServerPatchToFullTree,\n  navigateToKnownRoute,\n  navigate,\n} from '../../segment-cache/navigation'\nimport { discoverKnownRoute } from '../../segment-cache/optimistic-routes'\nimport type { NormalizedSearch } from '../../segment-cache/cache-key'\nimport {\n  ActionDidNotRevalidate,\n  ActionDidRevalidateDynamicOnly,\n  ActionDidRevalidateStaticAndDynamic,\n  type ActionRevalidationKind,\n} from '../../../../shared/lib/action-revalidation-kind'\nimport { isExternalURL } from '../../app-router-utils'\nimport { FreshnessPolicy, getCurrentNavigationLock } from '../ppr-navigations'\nimport { processFetch } from '../fetch-server-response'\nimport {\n  invalidateBfCache,\n  UnknownDynamicStaleTime,\n} from '../../segment-cache/bfcache'\n\nconst createFromFetch =\n  createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n  | typeof import('../../../dev/debug-channel').createDebugChannel\n  | undefined\n\nif (process.env.__NEXT_DEV_SERVER && process.env.__NEXT_REACT_DEBUG_CHANNEL) {\n  createDebugChannel = (\n    require('../../../dev/debug-channel') as typeof import('../../../dev/debug-channel')\n  ).createDebugChannel\n}\n\n// TODO: Refactor to be a discriminated union. Or just get rid of it;\n// fetchServerAction only has one caller, no reason this intermediate type has\n// to exist.\ntype FetchServerActionResult = {\n  redirectLocation: URL | undefined\n  redirectType: RedirectType | undefined\n  revalidationKind: ActionRevalidationKind\n  actionResult: ActionResult | undefined\n  actionFlightData: NormalizedFlightData[] | string | undefined\n  actionFlightDataRenderedSearch: NormalizedSearch | undefined\n  isPrerender: boolean\n  couldBeIntercepted: boolean\n}\n\nasync function fetchServerAction(\n  state: ReadonlyReducerState,\n  nextUrl: ReadonlyReducerState['nextUrl'],\n  action: ServerActionAction\n): Promise<FetchServerActionResult> {\n  const { actionId, actionArgs } = action\n  const temporaryReferences = createTemporaryReferenceSet()\n  const info = extractInfoFromServerReferenceId(actionId)\n  const usedArgs = omitUnusedArgs(actionArgs, info)\n  const body = await encodeReply(usedArgs, { temporaryReferences })\n\n  const headers: Record<string, string> = {\n    Accept: RSC_CONTENT_TYPE_HEADER,\n    [ACTION_HEADER]: actionId,\n    [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n      state.tree\n    ),\n  }\n\n  const deploymentId = getDeploymentId()\n  if (deploymentId) {\n    headers['x-deployment-id'] = deploymentId\n  }\n\n  if (nextUrl) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    if (self.__next_r) {\n      headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n    }\n\n    // Create a new request ID for the server action request. The server uses\n    // this to tag debug information sent via WebSocket to the client, which\n    // then routes those chunks to the debug channel associated with this ID.\n    headers[NEXT_REQUEST_ID_HEADER] = crypto\n      .getRandomValues(new Uint32Array(1))[0]\n      .toString(16)\n  }\n\n  let res: Response\n  try {\n    res = await fetch(state.canonicalUrl, { method: 'POST', headers, body })\n    // If the fetch succeeds while we're in the offline state, notify the\n    // offline module so it can short-circuit the polling loop.\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { notifyOnline } =\n        require('../../offline') as typeof import('../../offline')\n      notifyOnline()\n    }\n  } catch (err) {\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { checkOfflineError, getOffline, waitForConnection } =\n        require('../../offline') as typeof import('../../offline')\n      if (checkOfflineError(err)) {\n        // It's safe to replay the action because the fetch rejection\n        // means the request never reached the server — there are no\n        // side effects to duplicate.\n        const offline = getOffline()\n        if (offline !== null) {\n          await waitForConnection(offline)\n        }\n        return fetchServerAction(state, nextUrl, action)\n      }\n    }\n    throw err\n  }\n\n  // Handle server actions that the server didn't recognize.\n  const unrecognizedActionHeader = res.headers.get(NEXT_ACTION_NOT_FOUND_HEADER)\n  if (unrecognizedActionHeader === '1') {\n    throw new UnrecognizedActionError(\n      `Server Action \"${actionId}\" was not found on the server. \\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n    )\n  }\n\n  const redirectHeader = res.headers.get('x-action-redirect')\n  const [location, _redirectType] = redirectHeader?.split(';') || []\n  let redirectType: RedirectType | undefined\n  switch (_redirectType) {\n    case 'push':\n      redirectType = 'push'\n      break\n    case 'replace':\n      redirectType = 'replace'\n      break\n    default:\n      redirectType = undefined\n  }\n\n  const isPrerender = !!res.headers.get(NEXT_IS_PRERENDER_HEADER)\n\n  let revalidationKind: ActionRevalidationKind = ActionDidNotRevalidate\n  try {\n    const revalidationHeader = res.headers.get('x-action-revalidated')\n    if (revalidationHeader) {\n      const parsedKind = JSON.parse(revalidationHeader)\n      if (\n        parsedKind === ActionDidRevalidateStaticAndDynamic ||\n        parsedKind === ActionDidRevalidateDynamicOnly\n      ) {\n        revalidationKind = parsedKind\n      }\n    }\n  } catch {}\n\n  const redirectLocation = location\n    ? assignLocation(\n        location,\n        new URL(state.canonicalUrl, window.location.href)\n      )\n    : undefined\n\n  const contentType = res.headers.get('content-type')\n  const isRscResponse = !!(\n    contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n  )\n\n  // Handle invalid server action responses.\n  // A valid response must have `content-type: text/x-component`, unless it's an external redirect.\n  // (external redirects have an 'x-action-redirect' header, but the body is an empty 'text/plain')\n  if (!isRscResponse && !redirectLocation) {\n    // The server can respond with a text/plain error message, but we'll fallback to something generic\n    // if there isn't one.\n    const message =\n      res.status >= 400 && contentType === 'text/plain'\n        ? await res.text()\n        : 'An unexpected response was received from the server.'\n\n    throw new Error(message)\n  }\n\n  let actionResult: FetchServerActionResult['actionResult']\n  let actionFlightData: FetchServerActionResult['actionFlightData']\n  let actionFlightDataRenderedSearch: FetchServerActionResult['actionFlightDataRenderedSearch']\n  let couldBeIntercepted: boolean = false\n\n  if (isRscResponse) {\n    // Server action redirect responses carry the Flight data of the redirect\n    // target, which may be prerendered with a completeness marker byte\n    // prepended. Strip it before passing to Flight.\n    const responsePromise = redirectLocation\n      ? processFetch(res).then(({ response: r }) => r)\n      : Promise.resolve(res)\n\n    const response: ActionFlightResponse = await createFromFetch(\n      responsePromise,\n      {\n        callServer,\n        findSourceMapURL,\n        temporaryReferences,\n        debugChannel: createDebugChannel && createDebugChannel(headers),\n      }\n    )\n\n    // An internal redirect can send an RSC response, but does not have a useful `actionResult`.\n    actionResult = redirectLocation ? undefined : response.a\n    couldBeIntercepted = response.i\n\n    // Check if the response build ID matches the client build ID.\n    // In a multi-zone setup, when a server action triggers a redirect,\n    // the server pre-fetches the redirect target as RSC. If the redirect\n    // target is served by a different Next.js zone (different build), the\n    // pre-fetched RSC data will have a foreign build ID. We must discard\n    // the flight data in that case so the redirect triggers an MPA\n    // navigation (full page load) instead of trying to apply the foreign\n    // RSC payload — which would result in a blank page.\n    const responseBuildId =\n      res.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? response.b\n    if (\n      responseBuildId !== undefined &&\n      responseBuildId !== getNavigationBuildId()\n    ) {\n      // Build ID mismatch — discard the flight data. The redirect will\n      // still be processed, and the absence of flight data will cause an\n      // MPA navigation via completeHardNavigation().\n    } else {\n      const maybeFlightData = normalizeFlightData(response.f)\n      if (maybeFlightData !== '') {\n        actionFlightData = maybeFlightData\n        actionFlightDataRenderedSearch = response.q as NormalizedSearch\n      }\n    }\n  } else {\n    // An external redirect doesn't contain RSC data.\n    actionResult = undefined\n    actionFlightData = undefined\n    actionFlightDataRenderedSearch = undefined\n  }\n\n  return {\n    actionResult,\n    actionFlightData,\n    actionFlightDataRenderedSearch,\n    redirectLocation,\n    redirectType,\n    revalidationKind,\n    isPrerender,\n    couldBeIntercepted,\n  }\n}\n\n/*\n * This reducer is responsible for calling the server action and processing any side-effects from the server action.\n * It does not mutate the state by itself but rather delegates to other reducers to do the actual mutation.\n */\nexport function serverActionReducer(\n  state: ReadonlyReducerState,\n  action: ServerActionAction\n): ReducerState {\n  const { resolve, reject } = action\n\n  // only pass along the `nextUrl` param (used for interception routes) if the current route was intercepted.\n  // If the route has been intercepted, the action should be as well.\n  // Otherwise the server action might be intercepted with the wrong action id\n  // (ie, one that corresponds with the intercepted route)\n  const nextUrl =\n    // We always send the last next-url, not the current when\n    // performing a dynamic request. This is because we update\n    // the next-url after a navigation, but we want the same\n    // interception route to be matched that used the last\n    // next-url.\n    (state.previousNextUrl || state.nextUrl) &&\n    hasInterceptionRouteInCurrentTree(state.tree)\n      ? state.previousNextUrl || state.nextUrl\n      : null\n\n  return fetchServerAction(state, nextUrl, action).then(\n    async ({\n      revalidationKind,\n      actionResult,\n      actionFlightData: flightData,\n      actionFlightDataRenderedSearch: flightDataRenderedSearch,\n      redirectLocation,\n      redirectType,\n      isPrerender,\n      couldBeIntercepted,\n    }) => {\n      if (revalidationKind !== ActionDidNotRevalidate) {\n        // There was either a revalidation or a refresh, or maybe both.\n\n        // Evict the BFCache, which may contain dynamic data.\n        invalidateBfCache()\n\n        // Store whether this action triggered any revalidation\n        // The action queue will use this information to potentially\n        // trigger a refresh action if the action was discarded\n        // (ie, due to a navigation, before the action completed)\n        action.didRevalidate = true\n\n        // If there was a revalidation, evict the prefetch cache.\n        // TODO: Evict only segments with matching tags and/or paths.\n        // TODO: We should only invalidate the route cache if cookies were\n        // mutated, since route trees may vary based on cookies. For now we\n        // invalidate both caches until we have a way to detect cookie\n        // mutations on the client.\n        if (revalidationKind === ActionDidRevalidateStaticAndDynamic) {\n          invalidateEntirePrefetchCache(nextUrl, state.tree)\n        }\n\n        // Start a cooldown before re-prefetching to allow CDN cache\n        // propagation.\n        startRevalidationCooldown()\n      }\n\n      const navigateType = redirectType || 'push'\n\n      if (redirectLocation !== undefined) {\n        // If the action triggered a redirect, the action promise will be rejected with\n        // a redirect so that it's handled by RedirectBoundary as we won't have a valid\n        // action result to resolve the promise with. This will effectively reset the state of\n        // the component that called the action as the error boundary will remount the tree.\n        // The status code doesn't matter here as the action handler will have already sent\n        // a response with the correct status code.\n\n        if (isExternalURL(redirectLocation)) {\n          // External redirect. Triggers an MPA navigation.\n          const redirectHref = redirectLocation.href\n          const redirectError = createRedirectErrorForAction(\n            redirectHref,\n            navigateType\n          )\n          reject(redirectError)\n          return completeHardNavigation(state, redirectLocation, navigateType)\n        } else {\n          // Internal redirect. Triggers an SPA navigation.\n          const redirectWithBasepath = createHrefFromUrl(\n            redirectLocation,\n            false\n          )\n          const redirectHref = hasBasePath(redirectWithBasepath)\n            ? removeBasePath(redirectWithBasepath)\n            : redirectWithBasepath\n          const redirectError = createRedirectErrorForAction(\n            redirectHref,\n            navigateType\n          )\n          reject(redirectError)\n        }\n      } else {\n        // If there's no redirect, resolve the action with the result.\n        resolve(actionResult)\n      }\n\n      // Check if we can bail out without updating any state.\n      if (\n        // Did the action trigger a redirect?\n        redirectLocation === undefined &&\n        // Did the action revalidate any data?\n        revalidationKind === ActionDidNotRevalidate &&\n        // Did the server render new data?\n        flightData === undefined\n      ) {\n        // The action did not trigger any revalidations or redirects. No\n        // navigation is required.\n        return state\n      }\n\n      if (flightData === undefined && redirectLocation !== undefined) {\n        // The server redirected, but did not send any Flight data. This implies\n        // an external redirect.\n        // TODO: We should refactor the action response type to be more explicit\n        // about the various response types.\n        return completeHardNavigation(state, redirectLocation, navigateType)\n      }\n\n      if (typeof flightData === 'string') {\n        // If the flight data is just a string, something earlier in the\n        // response handling triggered an external redirect.\n        return completeHardNavigation(\n          state,\n          new URL(flightData, location.origin),\n          navigateType\n        )\n      }\n\n      // The action triggered a navigation — either a redirect, a revalidation,\n      // or both.\n\n      // If there was no redirect, then the target URL is the same as the\n      // current URL.\n      const currentUrl = new URL(state.canonicalUrl, location.origin)\n      const currentRenderedSearch = state.renderedSearch\n      const redirectUrl =\n        redirectLocation !== undefined ? redirectLocation : currentUrl\n      const currentFlightRouterState = state.tree\n      const scrollBehavior = ScrollBehavior.Default\n\n      // If the action triggered a revalidation of the cache, we should also\n      // refresh all the dynamic data.\n      const freshnessPolicy =\n        revalidationKind === ActionDidNotRevalidate\n          ? FreshnessPolicy.Default\n          : FreshnessPolicy.RefreshAll\n\n      // The server may have sent back new data. If so, we will perform a\n      // \"seeded\" navigation that uses the data from the response.\n      // TODO: Currently the server always renders from the root in\n      // response to a Server Action. In the case of a normal redirect\n      // with no revalidation, it should skip over the shared layouts.\n      if (flightData !== undefined && flightDataRenderedSearch !== undefined) {\n        // The server sent back new route data as part of the response. We\n        // will use this to render the new page. If this happens to be only a\n        // subset of the data needed to render the new page, we'll initiate a\n        // new fetch, like we would for a normal navigation.\n        const redirectCanonicalUrl = createHrefFromUrl(redirectUrl)\n        const now = Date.now()\n        // TODO: Store the dynamic stale time on the top-level state so it's\n        // known during restores and refreshes.\n        const redirectSeed = convertServerPatchToFullTree(\n          now,\n          currentFlightRouterState,\n          flightData,\n          flightDataRenderedSearch,\n          UnknownDynamicStaleTime\n        )\n\n        // Learn the route pattern so we can predict it for future navigations.\n        const metadataVaryPath = redirectSeed.metadataVaryPath\n        if (metadataVaryPath !== null) {\n          discoverKnownRoute(\n            now,\n            redirectUrl.pathname,\n            redirectUrl.search as NormalizedSearch,\n            nextUrl,\n            null, // No pending entry\n            redirectSeed.routeTree,\n            metadataVaryPath,\n            couldBeIntercepted,\n            redirectCanonicalUrl,\n            isPrerender,\n            false // hasDynamicRewrite\n          )\n        }\n        const navigationLock = getCurrentNavigationLock()\n\n        return navigateToKnownRoute(\n          now,\n          state,\n          redirectUrl,\n          redirectCanonicalUrl,\n          redirectSeed,\n          currentUrl,\n          currentRenderedSearch,\n          state.cache,\n          currentFlightRouterState,\n          freshnessPolicy,\n          nextUrl,\n          scrollBehavior,\n          navigateType,\n          navigationLock,\n          // A server-action redirect navigation is bound to the shared map.\n          segmentCacheMap,\n          null,\n          // Server action redirects don't use route prediction - we already\n          // have the route tree from the server response. If a mismatch occurs\n          // during dynamic data fetch, the retry handler will traverse the\n          // known route tree to mark the entry as having a dynamic rewrite.\n          null,\n          // Not an HMR refresh, so there's no request generation to cancel.\n          undefined\n        )\n      }\n\n      // The server did not send back new data. We'll perform a regular, non-\n      // seeded navigation — effectively the same as <Link> or router.push().\n      return navigate(\n        state,\n        redirectUrl,\n        currentUrl,\n        currentRenderedSearch,\n        state.cache,\n        currentFlightRouterState,\n        nextUrl,\n        freshnessPolicy,\n        scrollBehavior,\n        navigateType\n      )\n    },\n    (e: any) => {\n      // When the server action is rejected we don't update the state and instead call the reject handler of the promise.\n      reject(e)\n\n      return state\n    }\n  )\n}\n\nfunction createRedirectErrorForAction(\n  redirectHref: string,\n  resolvedRedirectType: RedirectType\n) {\n  const redirectError = getRedirectError(redirectHref, resolvedRedirectType)\n  // We mark the error as handled because we don't want the redirect to be tried later by\n  // the RedirectBoundary, in case the user goes back and `Activity` triggers the redirect\n  // again, as it's run within an effect.\n  // We don't actually need the RedirectBoundary to do a router.push because we already\n  // have all the necessary RSC data to render the new page within a single roundtrip.\n  ;(redirectError as any).handled = true\n  return redirectError\n}\n","import type {\n  FlightRouterState,\n  Segment,\n} from '../../shared/lib/app-router-types'\nimport {\n  DEFAULT_SEGMENT_KEY,\n  isGroupSegment,\n  NOT_FOUND_SEGMENT_KEY,\n} from '../../shared/lib/segment'\nimport { segmentToSourcePagePathname } from './router-reducer/compute-changed-path'\nimport type {\n  ClientInstrumentationHooks,\n  ClientInstrumentationModules,\n  RouterTransitionPrefetchIntent,\n  RouterTransitionType,\n} from '../router-transition-types'\n\nlet instrumentationModules: readonly ClientInstrumentationHooks[] = []\nlet nextTransitionId = 0\n\nexport function initializeRouterTransitionModules(\n  modules: ClientInstrumentationModules\n): void {\n  instrumentationModules = modules.filter(\n    (module): module is ClientInstrumentationHooks => module != null\n  )\n}\n\nfunction callHooks(invoke: (hooks: ClientInstrumentationHooks) => void): void {\n  for (const hooks of instrumentationModules) {\n    try {\n      invoke(hooks)\n    } catch (error) {\n      console.error(\n        'An instrumentation-client router transition hook failed',\n        error\n      )\n    }\n  }\n}\n\nfunction timestamp(): number {\n  return performance.timeOrigin + performance.now()\n}\n\nexport function startRouterTransition(\n  url: string,\n  type: RouterTransitionType,\n  fromTree: FlightRouterState,\n  prefetchIntent: RouterTransitionPrefetchIntent | null\n): void {\n  // Positive flag check so the instrumentation-only path is removed by DCE when disabled.\n  if (process.env.__NEXT_INSTRUMENTATION_CLIENT_ROUTER_TRANSITION_EVENTS) {\n    if (\n      !instrumentationModules.some(\n        (hooks) => typeof hooks.onRouterTransitionStart === 'function'\n      )\n    ) {\n      return\n    }\n\n    const id = `${Date.now().toString(36)}-${(++nextTransitionId).toString(36)}`\n\n    callHooks((hooks) =>\n      hooks.onRouterTransitionStart?.(url, type, {\n        id,\n        timestamp: timestamp(),\n        fromRoutes: getActiveRoutePaths(fromTree),\n        prefetchIntent,\n      })\n    )\n  } else {\n    callHooks((hooks) => hooks.onRouterTransitionStart?.(url, type, null))\n  }\n}\n\nfunction classifySegment(segment: Segment): {\n  path: string | null\n  isPage: boolean\n} {\n  const sourceSegment = segmentToSourcePagePathname(segment)\n  if (sourceSegment === 'page') {\n    return { path: null, isPage: true }\n  }\n  if (\n    sourceSegment === '' ||\n    sourceSegment === '(__SLOT__)' ||\n    isGroupSegment(sourceSegment)\n  ) {\n    return { path: null, isPage: false }\n  }\n  if (sourceSegment === DEFAULT_SEGMENT_KEY) {\n    return { path: 'default', isPage: false }\n  }\n  if (sourceSegment === NOT_FOUND_SEGMENT_KEY) {\n    return { path: '_not-found', isPage: false }\n  }\n  return { path: sourceSegment, isPage: false }\n}\n\nfunction getActiveRoutePaths(tree: FlightRouterState): string[] {\n  const routes: Array<{ path: string; primary: boolean }> = []\n\n  function visit(\n    node: FlightRouterState,\n    segments: string[],\n    primary: boolean\n  ): void {\n    const segment = classifySegment(node[0])\n    const nextSegments =\n      segment.path === null ? segments : [...segments, segment.path]\n    const parallelRoutes = node[1]\n    const keys = Object.keys(parallelRoutes)\n\n    if (keys.length === 0 || segment.isPage) {\n      routes.push({\n        path: `/${nextSegments.join('/')}`,\n        primary,\n      })\n      return\n    }\n\n    if (parallelRoutes.children !== undefined) {\n      visit(parallelRoutes.children, nextSegments, primary)\n    }\n\n    for (const key of keys.sort()) {\n      if (key === 'children') {\n        continue\n      }\n      visit(parallelRoutes[key], [...nextSegments, `@${key}`], false)\n    }\n  }\n\n  visit(tree, [], true)\n  return routes\n    .sort((a, b) => {\n      if (a.primary !== b.primary) {\n        return a.primary ? -1 : 1\n      }\n      return a.path.localeCompare(b.path)\n    })\n    .map((route) => route.path)\n}\n","import {\n  type AppRouterState,\n  type ReducerActions,\n  type ReducerState,\n  ACTION_REFRESH,\n  ACTION_SERVER_ACTION,\n  ACTION_NAVIGATE,\n  ACTION_RESTORE,\n  type NavigateAction,\n  ACTION_HMR_REFRESH,\n  PrefetchKind,\n  ScrollBehavior,\n  type AppHistoryState,\n} from './router-reducer/router-reducer-types'\nimport { reducer } from './router-reducer/router-reducer'\nimport { addTransitionType, startTransition } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n} from './segment-cache/types'\nimport { prefetch as prefetchWithSegmentCache } from './segment-cache/prefetch'\nimport { navigate } from './segment-cache/navigation'\nimport {\n  dispatchAppRouterAction,\n  dispatchGestureState,\n} from './use-action-queue'\nimport { resetKnownRoutes } from './segment-cache/optimistic-routes'\nimport { FreshnessPolicy } from './router-reducer/ppr-navigations'\nimport { addBasePath } from '../add-base-path'\nimport { isExternalURL } from './app-router-utils'\nimport type {\n  AppRouterInstance,\n  NavigateOptions,\n  PrefetchOptions,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { setLinkForCurrentNavigation, type LinkInstance } from './links'\nimport type { RouterTransitionPrefetchIntent } from '../router-transition-types'\nimport type { GlobalErrorComponent } from './builtin/global-error'\nimport { isJavaScriptURLString } from '../lib/javascript-url'\nimport { startRouterTransition } from './router-transition'\n\nexport type DispatchStatePromise = React.Dispatch<ReducerState>\n\nexport type AppRouterActionQueue = {\n  state: AppRouterState\n  dispatch: (payload: ReducerActions, setState: DispatchStatePromise) => void\n  action: (state: AppRouterState, action: ReducerActions) => ReducerState\n\n  pending: ActionQueueNode | null\n  needsRefresh?: boolean\n  last: ActionQueueNode | null\n}\n\nexport type GlobalErrorState = [\n  GlobalError: GlobalErrorComponent,\n  styles: React.ReactNode,\n]\n\nexport type ActionQueueNode = {\n  payload: ReducerActions\n  next: ActionQueueNode | null\n  resolve: (value: ReducerState) => void\n  reject: (err: Error) => void\n  discarded?: boolean\n}\n\nfunction runRemainingActions(\n  actionQueue: AppRouterActionQueue,\n  settledAction: ActionQueueNode,\n  setState: DispatchStatePromise\n) {\n  // Only advance the queue if the settled action is still at its head. If a\n  // navigation discarded this action, the navigation took its place and is\n  // still in flight — starting the next queued action now would run it\n  // against router state that doesn't include the navigation yet.\n  if (actionQueue.pending === settledAction) {\n    actionQueue.pending = settledAction.next\n    if (actionQueue.pending !== null) {\n      runAction({\n        actionQueue,\n        action: actionQueue.pending,\n        setState,\n      })\n      return\n    }\n  }\n\n  if (actionQueue.pending === null && actionQueue.needsRefresh) {\n    // The queue is idle; flush the refresh requested by a discarded server\n    // action that revalidated data.\n    actionQueue.needsRefresh = false\n    actionQueue.dispatch({ type: ACTION_REFRESH }, setState)\n  }\n}\n\nasync function runAction({\n  actionQueue,\n  action,\n  setState,\n}: {\n  actionQueue: AppRouterActionQueue\n  action: ActionQueueNode\n  setState: DispatchStatePromise\n}) {\n  const prevState = actionQueue.state\n\n  actionQueue.pending = action\n\n  const payload = action.payload\n  const actionResult = actionQueue.action(prevState, payload)\n\n  function handleResult(nextState: AppRouterState) {\n    // if we discarded this action, the state should also be discarded\n    if (action.discarded) {\n      // Check if the discarded server action revalidated data\n      if (\n        action.payload.type === ACTION_SERVER_ACTION &&\n        action.payload.didRevalidate\n      ) {\n        // The server action was discarded but it revalidated data,\n        // mark that we need to refresh after all actions complete\n        actionQueue.needsRefresh = true\n      }\n      // This can't advance the queue (this action is no longer its head), but\n      // if the queue has already drained, it flushes the refresh now.\n      runRemainingActions(actionQueue, action, setState)\n      return\n    }\n\n    actionQueue.state = nextState\n\n    runRemainingActions(actionQueue, action, setState)\n    action.resolve(nextState)\n  }\n\n  // if the action is a promise, set up a callback to resolve it\n  if (isThenable(actionResult)) {\n    actionResult.then(handleResult, (err) => {\n      runRemainingActions(actionQueue, action, setState)\n      action.reject(err)\n    })\n  } else {\n    handleResult(actionResult)\n  }\n}\n\nfunction dispatchAction(\n  actionQueue: AppRouterActionQueue,\n  payload: ReducerActions,\n  setState: DispatchStatePromise\n) {\n  let resolvers: {\n    resolve: (value: ReducerState) => void\n    reject: (reason: any) => void\n  } = { resolve: setState, reject: () => {} }\n\n  // most of the action types are async with the exception of restore\n  // it's important that restore is handled quickly since it's fired on the popstate event\n  // and we don't want to add any delay on a back/forward nav\n  // this only creates a promise for the async actions\n  if (payload.type !== ACTION_RESTORE) {\n    // Create the promise and assign the resolvers to the object.\n    const deferredPromise = new Promise<AppRouterState>((resolve, reject) => {\n      resolvers = { resolve, reject }\n    })\n\n    startTransition(() => {\n      // we immediately notify React of the pending promise -- the resolver is attached to the action node\n      // and will be called when the associated action promise resolves\n      setState(deferredPromise)\n    })\n  }\n\n  const newAction: ActionQueueNode = {\n    payload,\n    next: null,\n    resolve: resolvers.resolve,\n    reject: resolvers.reject,\n  }\n\n  // Check if the queue is empty\n  if (actionQueue.pending === null) {\n    // The queue is empty, so add the action and start it immediately\n    // Mark this action as the last in the queue\n    actionQueue.last = newAction\n\n    runAction({\n      actionQueue,\n      action: newAction,\n      setState,\n    })\n  } else if (\n    payload.type === ACTION_NAVIGATE ||\n    payload.type === ACTION_RESTORE\n  ) {\n    // Navigations (including back/forward) take priority over any pending actions.\n    // Mark the pending action as discarded (so the state is never applied) and start the navigation action immediately.\n    actionQueue.pending.discarded = true\n\n    // The rest of the current queue should still execute after this navigation.\n    // (Note that it can't contain any earlier navigations, because we always put those into `actionQueue.pending` by calling `runAction`)\n    newAction.next = actionQueue.pending.next\n\n    if (actionQueue.last === actionQueue.pending) {\n      actionQueue.last = newAction\n    }\n\n    runAction({\n      actionQueue,\n      action: newAction,\n      setState,\n    })\n  } else {\n    // The queue is not empty, so add the action to the end of the queue\n    // It will be started by runRemainingActions after the previous action finishes\n    if (actionQueue.last !== null) {\n      actionQueue.last.next = newAction\n    }\n    actionQueue.last = newAction\n  }\n}\n\nlet globalActionQueue: AppRouterActionQueue | null = null\n\nexport function createMutableActionQueue(\n  initialState: AppRouterState\n): AppRouterActionQueue {\n  const actionQueue: AppRouterActionQueue = {\n    state: initialState,\n    dispatch: (payload: ReducerActions, setState: DispatchStatePromise) =>\n      dispatchAction(actionQueue, payload, setState),\n    action: async (state: AppRouterState, action: ReducerActions) => {\n      const result = reducer(state, action)\n      return result\n    },\n    pending: null,\n    last: null,\n  }\n\n  if (typeof window !== 'undefined') {\n    // The action queue is lazily created on hydration, but after that point\n    // it doesn't change. So we can store it in a global rather than pass\n    // it around everywhere via props/context.\n    if (globalActionQueue !== null) {\n      throw new Error(\n        'Internal Next.js Error: createMutableActionQueue was called more ' +\n          'than once'\n      )\n    }\n    globalActionQueue = actionQueue\n  }\n\n  return actionQueue\n}\n\nexport function getCurrentAppRouterState(): AppRouterState | null {\n  return globalActionQueue !== null ? globalActionQueue.state : null\n}\n\nfunction getAppRouterActionQueue(): AppRouterActionQueue {\n  if (globalActionQueue === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  return globalActionQueue\n}\n\nexport function dispatchNavigateAction(\n  href: string,\n  navigateType: NavigateAction['navigateType'],\n  scrollBehavior: ScrollBehavior,\n  linkInstanceRef: LinkInstance | null,\n  transitionTypes: string[] | undefined,\n  prefetchIntent: RouterTransitionPrefetchIntent | null\n): void {\n  // TODO: This stuff could just go into the reducer. Leaving as-is for now\n  // since we're about to rewrite all the router reducer stuff anyway.\n\n  if (transitionTypes) {\n    for (const type of transitionTypes) {\n      addTransitionType(type)\n    }\n  }\n\n  const url = new URL(addBasePath(href), location.href)\n  if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n    window.next.__pendingUrl = url\n  }\n\n  setLinkForCurrentNavigation(linkInstanceRef)\n  startRouterTransition(\n    href,\n    navigateType,\n    getAppRouterActionQueue().state.tree,\n    prefetchIntent\n  )\n\n  dispatchAppRouterAction({\n    type: ACTION_NAVIGATE,\n    url,\n    isExternalUrl: isExternalURL(url),\n    locationSearch: location.search,\n    scrollBehavior,\n    navigateType,\n  })\n}\n\nexport function dispatchTraverseAction(\n  href: string,\n  historyState: AppHistoryState | undefined\n) {\n  startRouterTransition(\n    href,\n    'traverse',\n    getAppRouterActionQueue().state.tree,\n    null\n  )\n  dispatchAppRouterAction({\n    type: ACTION_RESTORE,\n    url: new URL(href),\n    historyState,\n  })\n}\n\n/**\n * (Experimental) Perform a gesture navigation. This dispatches through React's\n * useOptimistic instead of the main action queue, allowing the state to be\n * shown during a gesture transition and discarded when the canonical navigation\n * completes.\n *\n * Only available when experimental.gestureTransition is enabled.\n */\nfunction gesturePush(href: string, options?: NavigateOptions): void {\n  if (process.env.__NEXT_GESTURE_TRANSITION) {\n    // TODO: Trigger a prefetch so the cache starts populating if there isn't\n    // already a prefetch for this route.\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n\n    const state = getCurrentAppRouterState()\n    if (state === null) {\n      return\n    }\n    const url = new URL(addBasePath(href), location.href)\n    if (isExternalURL(url)) {\n      return\n    }\n\n    // Fork the router state for the duration of the gesture transition.\n    const currentUrl = new URL(state.canonicalUrl, location.href)\n    const scrollBehavior =\n      options?.scroll === false\n        ? ScrollBehavior.NoScroll\n        : ScrollBehavior.Default\n    // This is a special freshness policy that prevents dynamic requests from\n    // being spawned. During the gesture, we should only show the cached\n    // prefetched UI, not dynamic data.\n    // TODO: In the case of navigations to an unknown route, this will still\n    // end up performing a dynamic request. The plan is to do prefetch instead.\n    // There's a separate TODO for this.\n    const freshnessPolicy = FreshnessPolicy.Gesture\n    const forkedGestureState = navigate(\n      state,\n      url,\n      currentUrl,\n      state.renderedSearch,\n      state.cache,\n      state.tree,\n      state.nextUrl,\n      freshnessPolicy,\n      scrollBehavior,\n      'push'\n    )\n    dispatchGestureState(forkedGestureState)\n  }\n}\n\n// Tracks the newest HMR refresh generation so that a newer refresh can abort\n// the request of the one it supersedes. Development only.\nlet activeHmrRefreshController: AbortController | null = null\n\n/**\n * The app router that is exposed through `useRouter`. These are public API\n * methods. Internal Next.js code should call the lower level methods directly\n * (although there's lots of existing code that doesn't do that).\n */\nexport const publicAppRouterInstance: AppRouterInstance = {\n  back: () => window.history.back(),\n  forward: () => window.history.forward(),\n  prefetch:\n    // Unlike the old implementation, the Segment Cache doesn't store its\n    // data in the router reducer state; it writes into a global mutable\n    // cache. So we don't need to dispatch an action.\n    (href: string, options?: PrefetchOptions) => {\n      if (isJavaScriptURLString(href)) {\n        throw new Error(\n          'Next.js has blocked a javascript: URL as a security precaution.'\n        )\n      }\n      const actionQueue = getAppRouterActionQueue()\n      const prefetchKind = options?.kind ?? PrefetchKind.AUTO\n\n      // We don't currently offer a way to issue a runtime prefetch via `router.prefetch()`.\n      // This will be possible when we update its API to not take a PrefetchKind.\n      let fetchStrategy: PrefetchTaskFetchStrategy\n      switch (prefetchKind) {\n        case PrefetchKind.AUTO: {\n          // We default to PPR. We'll discover whether or not the route supports it with the initial prefetch.\n          fetchStrategy = FetchStrategy.PPR\n          break\n        }\n        case PrefetchKind.FULL: {\n          fetchStrategy = FetchStrategy.Full\n          break\n        }\n        default: {\n          prefetchKind satisfies never\n          // Despite typescript thinking that this can't happen,\n          // we might get an unexpected value from user code.\n          // We don't know what they want, but we know they want a prefetch,\n          // so use the default.\n          fetchStrategy = FetchStrategy.PPR\n        }\n      }\n\n      prefetchWithSegmentCache(\n        href,\n        actionQueue.state.nextUrl,\n        actionQueue.state.tree,\n        fetchStrategy,\n        options?.onInvalidate ?? null\n      )\n    },\n  replace: (href: string, options?: NavigateOptions) => {\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n    startTransition(() => {\n      dispatchNavigateAction(\n        href,\n        'replace',\n        options?.scroll === false\n          ? ScrollBehavior.NoScroll\n          : ScrollBehavior.Default,\n        null,\n        options?.transitionTypes,\n        null\n      )\n    })\n  },\n  push: (href: string, options?: NavigateOptions) => {\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n    startTransition(() => {\n      dispatchNavigateAction(\n        href,\n        'push',\n        options?.scroll === false\n          ? ScrollBehavior.NoScroll\n          : ScrollBehavior.Default,\n        null,\n        options?.transitionTypes,\n        null\n      )\n    })\n  },\n  refresh: () => {\n    startTransition(() => {\n      dispatchAppRouterAction({\n        type: ACTION_REFRESH,\n      })\n    })\n  },\n  hmrRefresh: () => {\n    if (process.env.NODE_ENV !== 'development') {\n      throw new Error(\n        'hmrRefresh can only be used in development mode. Please use refresh instead.'\n      )\n    } else {\n      // Reset the known routes table so that route predictions are cleared\n      // when routes change during development.\n      resetKnownRoutes()\n      let signal: AbortSignal | undefined\n      if (process.env.__NEXT_SERVER_COMPONENTS_HMR_CANCELLATION) {\n        // Abort the superseded generation before scheduling the new one, so its\n        // request is torn down as early as possible. Halting (not rejecting)\n        // makes the abort safe regardless of order.\n        activeHmrRefreshController?.abort()\n        activeHmrRefreshController = new AbortController()\n        signal = activeHmrRefreshController.signal\n      }\n      startTransition(() => {\n        dispatchAppRouterAction({\n          type: ACTION_HMR_REFRESH,\n          signal,\n        })\n      })\n    }\n  },\n  // Default value. Each route segment provides its own value at runtime. Refer\n  // to `useRouter()`.\n  bfcacheId: '0',\n}\n\n// Conditionally add experimental_gesturePush when gestureTransition is enabled\nif (process.env.__NEXT_GESTURE_TRANSITION) {\n  ;(publicAppRouterInstance as any).experimental_gesturePush = gesturePush\n}\n\n// Exists for debugging purposes. Don't use in application code.\nif (typeof window !== 'undefined' && window.next) {\n  window.next.router = publicAppRouterInstance\n}\n","import type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { createPrefetchURL } from '../app-router-utils'\nimport { createCacheKey } from './cache-key'\nimport { schedulePrefetchTask } from './scheduler'\nimport { PrefetchPriority, type PrefetchTaskFetchStrategy } from './types'\n\n/**\n * Entrypoint for prefetching a URL into the Segment Cache.\n * @param href - The URL to prefetch. Typically this will come from a <Link>,\n * or router.prefetch. It must be validated before we attempt to prefetch it.\n * @param nextUrl - A special header used by the server for interception routes.\n * Roughly corresponds to the current URL.\n * @param treeAtTimeOfPrefetch - The FlightRouterState at the time the prefetch\n * was requested. This is only used when PPR is disabled.\n * @param fetchStrategy - Whether to prefetch dynamic data, in addition to\n * static data. This is used by `<Link prefetch={true}>`.\n * @param onInvalidate - A callback that will be called when the prefetch cache\n * When called, it signals to the listener that the data associated with the\n * prefetch may have been invalidated from the cache. This is not a live\n * subscription — it's called at most once per `prefetch` call. The only\n * supported use case is to trigger a new prefetch inside the listener, if\n * desired. It also may be called even in cases where the associated data is\n * still cached. Prefetching is a poll-based (pull) operation, not an event-\n * based (push) one. Rather than subscribe to specific cache entries, you\n * occasionally poll the prefetch cache to check if anything is missing.\n */\nexport function prefetch(\n  href: string,\n  nextUrl: string | null,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  onInvalidate: null | (() => void)\n) {\n  const url = createPrefetchURL(href)\n  if (url === null) {\n    // This href should not be prefetched.\n    return\n  }\n  const cacheKey = createCacheKey(url.href, nextUrl)\n  schedulePrefetchTask(\n    cacheKey,\n    treeAtTimeOfPrefetch,\n    fetchStrategy,\n    PrefetchPriority.Default,\n    onInvalidate,\n    null // navigationLockPrefetch\n  )\n}\n","import React from 'react'\n\nexport const errorStyles = {\n  container: {\n    fontFamily:\n      'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n    height: '100vh',\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n  },\n  card: {\n    marginTop: '-32px',\n    maxWidth: '325px',\n    padding: '32px 28px',\n    textAlign: 'left' as const,\n  },\n  icon: {\n    marginBottom: '24px',\n  },\n  title: {\n    fontSize: '24px',\n    fontWeight: 500,\n    letterSpacing: '-0.02em',\n    lineHeight: '32px',\n    margin: '0 0 12px 0',\n    color: 'var(--next-error-title)',\n  },\n  message: {\n    fontSize: '14px',\n    fontWeight: 400,\n    lineHeight: '21px',\n    margin: '0 0 20px 0',\n    color: 'var(--next-error-message)',\n  },\n  form: {\n    margin: 0,\n  },\n  buttonGroup: {\n    display: 'flex',\n    gap: '8px',\n    alignItems: 'center',\n  },\n  button: {\n    display: 'inline-flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    height: '32px',\n    padding: '0 12px',\n    fontSize: '14px',\n    fontWeight: 500,\n    lineHeight: '20px',\n    borderRadius: '6px',\n    cursor: 'pointer',\n    color: 'var(--next-error-btn-text)',\n    background: 'var(--next-error-btn-bg)',\n    border: 'var(--next-error-btn-border)',\n  },\n  buttonSecondary: {\n    display: 'inline-flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    height: '32px',\n    padding: '0 12px',\n    fontSize: '14px',\n    fontWeight: 500,\n    lineHeight: '20px',\n    borderRadius: '6px',\n    cursor: 'pointer',\n    color: 'var(--next-error-btn-secondary-text)',\n    background: 'var(--next-error-btn-secondary-bg)',\n    border: 'var(--next-error-btn-secondary-border)',\n  },\n  digestFooter: {\n    position: 'fixed' as const,\n    bottom: '32px',\n    left: '0',\n    right: '0',\n    textAlign: 'center' as const,\n    fontFamily:\n      'ui-monospace,SFMono-Regular,\"SF Mono\",Menlo,Consolas,monospace',\n    fontSize: '12px',\n    lineHeight: '18px',\n    fontWeight: 400,\n    margin: '0',\n    color: 'var(--next-error-digest)',\n  },\n} as const\n\nexport const errorThemeCss = `\n:root {\n  --next-error-bg: #fff;\n  --next-error-text: #171717;\n  --next-error-title: #171717;\n  --next-error-message: #171717;\n  --next-error-digest: #666666;\n  --next-error-btn-text: #fff;\n  --next-error-btn-bg: #171717;\n  --next-error-btn-border: none;\n  --next-error-btn-secondary-text: #171717;\n  --next-error-btn-secondary-bg: transparent;\n  --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);\n}\n@media (prefers-color-scheme: dark) {\n  :root {\n    --next-error-bg: #0a0a0a;\n    --next-error-text: #ededed;\n    --next-error-title: #ededed;\n    --next-error-message: #ededed;\n    --next-error-digest: #a0a0a0;\n    --next-error-btn-text: #0a0a0a;\n    --next-error-btn-bg: #ededed;\n    --next-error-btn-border: none;\n    --next-error-btn-secondary-text: #ededed;\n    --next-error-btn-secondary-bg: transparent;\n    --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);\n  }\n}\nbody { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\n`.replace(/\\n\\s*/g, '')\n\nexport function WarningIcon() {\n  return (\n    <svg\n      width=\"32\"\n      height=\"32\"\n      viewBox=\"-0.2 -1.5 32 32\"\n      fill=\"none\"\n      style={errorStyles.icon}\n    >\n      <path\n        d=\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\"\n        fill=\"var(--next-error-title)\"\n      />\n    </svg>\n  )\n}\n","'use client'\n\nimport React from 'react'\nimport { handleISRError } from '../handle-isr-error'\nimport { errorStyles, errorThemeCss, WarningIcon } from './error-styles'\n\nexport type GlobalErrorComponent = React.ComponentType<{\n  error: any\n  reset: () => void\n  retry: () => void\n}>\n\nfunction DefaultGlobalError({ error }: { error: any }) {\n  const digest: string | undefined = error?.digest\n  const isServerError = !!digest\n\n  const message = isServerError\n    ? 'A server error occurred. Reload to try again.'\n    : 'Reload to try again, or go back.'\n\n  handleISRError({ error })\n\n  return (\n    <html id=\"__next_error__\">\n      <head>\n        <style dangerouslySetInnerHTML={{ __html: errorThemeCss }} />\n      </head>\n      <body>\n        <div style={errorStyles.container}>\n          <div style={errorStyles.card}>\n            <WarningIcon />\n            <h1 style={errorStyles.title}>This page couldn&#x2019;t load</h1>\n            <p style={errorStyles.message}>{message}</p>\n            <div style={errorStyles.buttonGroup}>\n              <form style={errorStyles.form}>\n                <button type=\"submit\" style={errorStyles.button}>\n                  Reload\n                </button>\n              </form>\n              {!isServerError && (\n                <button\n                  type=\"button\"\n                  style={errorStyles.buttonSecondary}\n                  onClick={() => {\n                    if (window.history.length > 1) {\n                      window.history.back()\n                    } else {\n                      window.location.href = '/'\n                    }\n                  }}\n                >\n                  Back\n                </button>\n              )}\n            </div>\n          </div>\n        </div>\n        {digest && <p style={errorStyles.digestFooter}>ERROR {digest}</p>}\n      </body>\n    </html>\n  )\n}\n\n// Exported so that the import signature in the loaders can be identical to user\n// supplied custom global error signatures.\nexport default DefaultGlobalError\n","'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n  HTTPAccessErrorStatus,\n  getAccessFallbackHTTPStatus,\n  getAccessFallbackErrorTypeByStatus,\n  isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n  notFound?: React.ReactNode\n  forbidden?: React.ReactNode\n  unauthorized?: React.ReactNode\n  // TODO: Make this required once `React.createElement` understands that positional args go into children\n  children?: React.ReactNode\n  missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n  extends HTTPAccessFallbackBoundaryProps {\n  pathname: string | null\n  missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n  triggeredStatus: number | undefined\n  previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n  HTTPAccessFallbackErrorBoundaryProps,\n  HTTPAccessBoundaryState\n> {\n  constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n    super(props)\n    this.state = {\n      triggeredStatus: undefined,\n      previousPathname: props.pathname,\n    }\n  }\n\n  componentDidCatch(): void {\n    if (\n      process.env.NODE_ENV === 'development' &&\n      this.props.missingSlots &&\n      this.props.missingSlots.size > 0 &&\n      // A missing children slot is the typical not-found case, so no need to warn\n      !this.props.missingSlots.has('children')\n    ) {\n      const { warnOnce } =\n        require('../../../shared/lib/utils/warn-once') as typeof import('../../../shared/lib/utils/warn-once')\n      let warningMessage =\n        'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n        'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n      const formattedSlots = Array.from(this.props.missingSlots)\n        .sort((a, b) => a.localeCompare(b))\n        .map((slot) => `@${slot}`)\n        .join(', ')\n\n      warningMessage += 'Missing slots: ' + formattedSlots\n\n      warnOnce(warningMessage)\n    }\n  }\n\n  static getDerivedStateFromError(error: unknown) {\n    if (isHTTPAccessFallbackError(error)) {\n      const httpStatus = getAccessFallbackHTTPStatus(error)\n      return {\n        triggeredStatus: httpStatus,\n      }\n    }\n    // Re-throw if error is not for 404\n    throw error\n  }\n\n  static getDerivedStateFromProps(\n    props: HTTPAccessFallbackErrorBoundaryProps,\n    state: HTTPAccessBoundaryState\n  ): HTTPAccessBoundaryState | null {\n    /**\n     * Handles reset of the error boundary when a navigation happens.\n     * Ensures the error boundary does not stay enabled when navigating to a new page.\n     * Approach of setState in render is safe as it checks the previous pathname and then overrides\n     * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n     */\n    if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n      return {\n        triggeredStatus: undefined,\n        previousPathname: props.pathname,\n      }\n    }\n    return {\n      triggeredStatus: state.triggeredStatus,\n      previousPathname: props.pathname,\n    }\n  }\n\n  render() {\n    const { notFound, forbidden, unauthorized, children } = this.props\n    const { triggeredStatus } = this.state\n    const errorComponents = {\n      [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n      [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n      [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n    }\n\n    if (triggeredStatus) {\n      const isNotFound =\n        triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n      const isForbidden =\n        triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n      const isUnauthorized =\n        triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n      // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n      if (!(isNotFound || isForbidden || isUnauthorized)) {\n        return children\n      }\n\n      return (\n        <>\n          <meta name=\"robots\" content=\"noindex\" />\n          {process.env.NODE_ENV === 'development' && (\n            <meta\n              name=\"boundary-next-error\"\n              content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n            />\n          )}\n          {errorComponents[triggeredStatus]}\n        </>\n      )\n    }\n\n    return children\n  }\n}\n\nexport function HTTPAccessFallbackBoundary({\n  notFound,\n  forbidden,\n  unauthorized,\n  children,\n}: HTTPAccessFallbackBoundaryProps) {\n  // When we're rendering the missing params shell, this will return null. This\n  // is because we won't be rendering any not found boundaries or error\n  // boundaries for the missing params shell. When this runs on the client\n  // (where these error can occur), we will get the correct pathname.\n  const pathname = useUntrackedPathname()\n  const missingSlots = useContext(MissingSlotContext)\n  const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n  if (hasErrorFallback) {\n    return (\n      <HTTPAccessFallbackErrorBoundary\n        pathname={pathname}\n        notFound={notFound}\n        forbidden={forbidden}\n        unauthorized={unauthorized}\n        missingSlots={missingSlots}\n      >\n        {children}\n      </HTTPAccessFallbackErrorBoundary>\n    )\n  }\n\n  return <>{children}</>\n}\n","'use client'\n\nimport React from 'react'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\n\n// TODO: error on using forbidden and unauthorized in root layout\nexport function bailOnRootNotFound() {\n  throw new Error('notFound() is not allowed to use in root layout')\n}\n\nfunction NotAllowedRootHTTPFallbackError() {\n  bailOnRootNotFound()\n  return null\n}\n\nexport function DevRootHTTPAccessFallbackBoundary({\n  children,\n}: {\n  children: React.ReactNode\n}) {\n  return (\n    <HTTPAccessFallbackBoundary notFound={<NotAllowedRootHTTPFallbackError />}>\n      {children}\n    </HTTPAccessFallbackBoundary>\n  )\n}\n","'use client'\n\nimport React, { startTransition, type JSX } from 'react'\nimport { useUntrackedPathname } from './navigation-untracked'\nimport { isNextRouterError } from './is-next-router-error'\nimport { handleHardNavError } from './nav-failure-handler'\nimport { handleISRError } from './handle-isr-error'\nimport { isBot } from '../../shared/lib/router/utils/is-bot'\nimport {\n  AppRouterContext,\n  type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\n\nconst isBotUserAgent =\n  typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport type ErrorInfo = {\n  error: unknown\n  reset: () => void\n  retry: () => void\n}\n\nexport type ErrorComponent = React.ComponentType<ErrorInfo>\n\nexport interface ErrorBoundaryProps {\n  children?: React.ReactNode\n  errorComponent: ErrorComponent | undefined\n  errorStyles?: React.ReactNode | undefined\n  errorScripts?: React.ReactNode | undefined\n}\n\ninterface ErrorBoundaryHandlerProps extends ErrorBoundaryProps {\n  pathname: string | null\n  errorComponent: ErrorComponent\n}\n\ninterface ErrorBoundaryHandlerState {\n  error: null | { thrownValue: unknown }\n  previousPathname: string | null\n}\n\nexport class ErrorBoundaryHandler extends React.Component<\n  ErrorBoundaryHandlerProps,\n  ErrorBoundaryHandlerState\n> {\n  static contextType = AppRouterContext\n  declare context: AppRouterInstance | null\n\n  constructor(props: ErrorBoundaryHandlerProps) {\n    super(props)\n    this.state = {\n      error: null,\n      previousPathname: this.props.pathname,\n    }\n  }\n\n  static getDerivedStateFromError(\n    thrownValue: unknown\n  ): Partial<ErrorBoundaryHandlerState> {\n    if (isNextRouterError(thrownValue)) {\n      // Re-throw if an expected internal Next.js router error occurs\n      // this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)\n      throw thrownValue\n    }\n\n    return { error: { thrownValue } }\n  }\n\n  static getDerivedStateFromProps(\n    props: ErrorBoundaryHandlerProps,\n    state: ErrorBoundaryHandlerState\n  ): ErrorBoundaryHandlerState | null {\n    const { error } = state\n\n    // if we encounter an error while\n    // a navigation is pending we shouldn't render\n    // the error boundary and instead should fallback\n    // to a hard navigation to attempt recovering\n    if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n      if (error && handleHardNavError(error.thrownValue)) {\n        // clear error so we don't render anything\n        return {\n          error: null,\n          previousPathname: props.pathname,\n        }\n      }\n    }\n\n    /**\n     * Handles reset of the error boundary when a navigation happens.\n     * Ensures the error boundary does not stay enabled when navigating to a new page.\n     * Approach of setState in render is safe as it checks the previous pathname and then overrides\n     * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n     */\n    if (props.pathname !== state.previousPathname && state.error) {\n      return {\n        error: null,\n        previousPathname: props.pathname,\n      }\n    }\n    return {\n      error: state.error,\n      previousPathname: props.pathname,\n    }\n  }\n\n  reset = () => {\n    this.setState({ error: null })\n  }\n\n  retry = () => {\n    startTransition(() => {\n      this.context?.refresh()\n      this.reset()\n    })\n  }\n\n  // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n  render(): React.ReactNode {\n    //When it's bot request, segment level error boundary will keep rendering the children,\n    // the final error will be caught by the root error boundary and determine wether need to apply graceful degrade.\n    if (this.state.error && !isBotUserAgent) {\n      const thrownValue = this.state.error.thrownValue\n      handleISRError({ error: thrownValue })\n\n      return (\n        <>\n          {this.props.errorStyles}\n          {this.props.errorScripts}\n          <this.props.errorComponent\n            // TODO(NAR-804): Docs say this is an Error object, but we don't guarantee that\n            error={thrownValue}\n            reset={this.reset}\n            retry={this.retry}\n          />\n        </>\n      )\n    }\n\n    return this.props.children\n  }\n}\n\n/**\n * Handles errors through `getDerivedStateFromError`.\n * Renders the provided error component and provides a way to `reset` the error boundary state.\n */\n\n/**\n * Renders error boundary with the provided \"errorComponent\" property as the fallback.\n * If no \"errorComponent\" property is provided it renders the children without an error boundary.\n */\nexport function ErrorBoundary({\n  errorComponent,\n  errorStyles,\n  errorScripts,\n  children,\n}: ErrorBoundaryProps & {\n  children: React.ReactNode\n}): JSX.Element {\n  // When we're rendering the missing params shell, this will return null. This\n  // is because we won't be rendering any not found boundaries or error\n  // boundaries for the missing params shell. When this runs on the client\n  // (where these errors can occur), we will get the correct pathname.\n  const pathname = useUntrackedPathname()\n\n  if (errorComponent) {\n    return (\n      <ErrorBoundaryHandler\n        pathname={pathname}\n        errorComponent={errorComponent}\n        errorStyles={errorStyles}\n        errorScripts={errorScripts}\n      >\n        {children}\n      </ErrorBoundaryHandler>\n    )\n  }\n\n  return <>{children}</>\n}\n","import { workAsyncStorage } from './server-async-storage'\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function handleISRError({ error }: { error: any }) {\n  if (workAsyncStorage) {\n    const store = workAsyncStorage.getStore()\n    if (store?.isStaticGeneration) {\n      if (error) {\n        console.error(error)\n      }\n      throw error\n    }\n  }\n}\n","export const HTTPAccessErrorStatus = {\n  NOT_FOUND: 404,\n  FORBIDDEN: 403,\n  UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n  digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n  error: unknown\n): error is HTTPAccessFallbackError {\n  if (\n    typeof error !== 'object' ||\n    error === null ||\n    !('digest' in error) ||\n    typeof error.digest !== 'string'\n  ) {\n    return false\n  }\n  const [prefix, httpStatus] = error.digest.split(';')\n\n  return (\n    prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n    ALLOWED_CODES.has(Number(httpStatus))\n  )\n}\n\nexport function getAccessFallbackHTTPStatus(\n  error: HTTPAccessFallbackError\n): number {\n  const httpStatus = error.digest.split(';')[1]\n  return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n  status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n  switch (status) {\n    case 401:\n      return 'unauthorized'\n    case 403:\n      return 'forbidden'\n    case 404:\n      return 'not-found'\n    default:\n      return\n  }\n}\n","import type { Params } from '../../server/request/params'\nimport type { ReadonlyURLSearchParams } from './readonly-url-search-params'\nimport { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'\nimport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nimport {\n  createExhaustiveParamsProxy,\n  createExhaustiveURLSearchParamsProxy,\n  trackMissingSampleErrorAndThrow,\n} from '../../server/app-render/instant-validation/instant-samples'\nimport { InstantValidationError } from '../../server/app-render/instant-validation/instant-validation-error'\n\nexport function instrumentParamsForClientValidation<TPArams extends Params>(\n  underlyingParams: TPArams\n): TPArams {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const declaredKeys = new Set(\n            Object.keys(workUnitStore.validationSamples.params ?? {})\n          )\n          return createExhaustiveParamsProxy(\n            underlyingParams,\n            declaredKeys,\n            workStore.route\n          )\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return underlyingParams\n}\n\nexport function expectCompleteParamsInClientValidation(\n  expression: string\n): void {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const fallbackParams = workUnitStore.fallbackRouteParams\n          if (fallbackParams && fallbackParams.size > 0) {\n            const missingParams = Array.from(fallbackParams.keys())\n            trackMissingSampleErrorAndThrow(\n              new InstantValidationError(\n                `Route \"${workStore.route}\" called ${expression} but param${missingParams.length > 1 ? 's' : ''} ${missingParams.map((p) => `\"${p}\"`).join(', ')} ${missingParams.length > 1 ? 'are' : 'is'} not defined in the \\`unstable_samples\\` of \\`instant\\`. ` +\n                  `${expression} requires all route params to be provided.`\n              )\n            )\n          }\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\nexport function instrumentSearchParamsForClientValidation(\n  underlyingSearchParams: ReadonlyURLSearchParams\n): ReadonlyURLSearchParams {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const declaredKeys = new Set(\n            Object.keys(workUnitStore.validationSamples.searchParams ?? {})\n          )\n          return createExhaustiveURLSearchParamsProxy(\n            underlyingSearchParams,\n            declaredKeys,\n            workStore.route\n          )\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return underlyingSearchParams\n}\n","import {\n  isHTTPAccessFallbackError,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n  error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n  return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n  PrefetchPriority,\n} from './segment-cache/types'\nimport { createCacheKey } from './segment-cache/cache-key'\nimport {\n  type PrefetchTask,\n  schedulePrefetchTask as scheduleSegmentPrefetchTask,\n  cancelPrefetchTask,\n  reschedulePrefetchTask,\n  isPrefetchTaskDirty,\n} from './segment-cache/scheduler'\nimport { startTransition } from 'react'\n\ntype LinkElement = HTMLAnchorElement | SVGAElement\n\ntype Element = LinkElement | HTMLFormElement\n\n// Properties that are shared between Link and Form instances. We use the same\n// shape for both to prevent a polymorphic de-opt in the VM.\ntype LinkOrFormInstanceShared = {\n  router: AppRouterInstance\n  fetchStrategy: PrefetchTaskFetchStrategy\n\n  isVisible: boolean\n\n  // The most recently initiated prefetch task. It may or may not have\n  // already completed. The same prefetch task object can be reused across\n  // multiple prefetches of the same link.\n  prefetchTask: PrefetchTask | null\n}\n\nexport type FormInstance = LinkOrFormInstanceShared & {\n  prefetchHref: string\n  setOptimisticLinkStatus: null\n}\n\ntype PrefetchableLinkInstance = LinkOrFormInstanceShared & {\n  // In dev, the Owner Stack captured at the time this Link was rendered, for\n  // configurations where a warning might later fire.\n  // `undefined` means we opted out of capturing the stack.\n  // If you issue a warning, handle the `undefined` case separately\n  // so it's clear in the logs when a warning is missing its source location.\n  // A warning with an undefined ownerStack is considered a bug though so make\n  // sure reaching the log site is a subset of codepaths that lead to capturing\n  // the stack\n  ownerStack: string | null | undefined\n  prefetchHref: string\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {\n  ownerStack: string | null | undefined\n  prefetchHref: null\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype PrefetchableInstance = PrefetchableLinkInstance | FormInstance\n\nexport type LinkInstance =\n  | PrefetchableLinkInstance\n  | NonPrefetchableLinkInstance\n\n// Tracks the most recently navigated link instance. When null, indicates\n// the current navigation was not initiated by a link click.\nlet linkForMostRecentNavigation: LinkInstance | null = null\n\n// Status object indicating link is pending\nexport const PENDING_LINK_STATUS = { pending: true }\n\n// Status object indicating link is idle\nexport const IDLE_LINK_STATUS = { pending: false }\n\n// Updates the loading state when navigating between links\n// - Resets the previous link's loading state\n// - Sets the new link's loading state\n// - Updates tracking of current navigation\nexport function setLinkForCurrentNavigation(link: LinkInstance | null) {\n  startTransition(() => {\n    linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS)\n    link?.setOptimisticLinkStatus(PENDING_LINK_STATUS)\n    linkForMostRecentNavigation = link\n  })\n}\n\n// Unmounts the current link instance from navigation tracking\nexport function unmountLinkForCurrentNavigation(link: LinkInstance) {\n  if (linkForMostRecentNavigation === link) {\n    linkForMostRecentNavigation = null\n  }\n}\n\n/**\n * Returns the link instance that initiated the most recent navigation.\n * Returns null if the navigation was not initiated by a link click.\n *\n * Used by the Instant Navigation Testing API in dev mode to match the\n * fetch strategy of the link during cache-miss navigations.\n */\nexport function getLinkForCurrentNavigation(): LinkInstance | null {\n  return linkForMostRecentNavigation\n}\n\n// Use a WeakMap to associate a Link instance with its DOM element. This is\n// used by the IntersectionObserver to track the link's visibility.\nconst prefetchable:\n  | WeakMap<Element, PrefetchableInstance>\n  | Map<Element, PrefetchableInstance> =\n  typeof WeakMap === 'function' ? new WeakMap() : new Map()\n\n// A Set of the currently visible links. We re-prefetch visible links after a\n// cache invalidation, or when the current URL changes. It's a separate data\n// structure from the WeakMap above because only the visible links need to\n// be enumerated.\nconst prefetchableAndVisible: Set<PrefetchableInstance> = new Set()\n\n// A single IntersectionObserver instance shared by all <Link> components.\nconst observer: IntersectionObserver | null =\n  typeof IntersectionObserver === 'function'\n    ? new IntersectionObserver(handleIntersect, {\n        rootMargin: '200px',\n      })\n    : null\n\nfunction observeVisibility(element: Element, instance: PrefetchableInstance) {\n  const existingInstance = prefetchable.get(element)\n  if (existingInstance !== undefined) {\n    // This shouldn't happen because each <Link> component should have its own\n    // anchor tag instance, but it's defensive coding to avoid a memory leak in\n    // case there's a logical error somewhere else.\n    unmountPrefetchableInstance(element)\n  }\n  // Only track prefetchable links that have a valid prefetch URL\n  prefetchable.set(element, instance)\n  if (observer !== null) {\n    observer.observe(element)\n  }\n}\n\nfunction coercePrefetchableUrl(href: string): URL | null {\n  if (typeof window !== 'undefined') {\n    const { createPrefetchURL } =\n      // TODO(browser-variant): migrate to a .ts/.browser.ts split so the browser bundle drops the server branch; see scripts/generate-browser-variant-aliases.mjs\n      // ast-grep-ignore: no-typeof-window-require\n      require('./app-router-utils') as typeof import('./app-router-utils')\n\n    try {\n      return createPrefetchURL(href)\n    } catch {\n      // createPrefetchURL sometimes throws an error if an invalid URL is\n      // provided, though I'm not sure if it's actually necessary.\n      // TODO: Consider removing the throw from the inner function, or change it\n      // to reportError. Or maybe the error isn't even necessary for automatic\n      // prefetches, just navigations.\n      const reportErrorFn =\n        typeof reportError === 'function' ? reportError : console.error\n      reportErrorFn(\n        `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n      )\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nexport function mountLinkInstance(\n  element: LinkElement,\n  href: string,\n  router: AppRouterInstance,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  prefetchEnabled: boolean,\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void,\n  ownerStack: string | null | undefined\n): LinkInstance {\n  if (prefetchEnabled) {\n    const prefetchURL = coercePrefetchableUrl(href)\n    if (prefetchURL !== null) {\n      const instance: PrefetchableLinkInstance = {\n        router,\n        fetchStrategy,\n        isVisible: false,\n        prefetchTask: null,\n        prefetchHref: prefetchURL.href,\n        setOptimisticLinkStatus,\n        ownerStack,\n      }\n      // We only observe the link's visibility if it's prefetchable. For\n      // example, this excludes links to external URLs.\n      observeVisibility(element, instance)\n      return instance\n    }\n  }\n  // If the link is not prefetchable, we still create an instance so we can\n  // track its optimistic state (i.e. useLinkStatus).\n  const instance: NonPrefetchableLinkInstance = {\n    router,\n    fetchStrategy,\n    isVisible: false,\n    prefetchTask: null,\n    prefetchHref: null,\n    setOptimisticLinkStatus,\n    ownerStack,\n  }\n  return instance\n}\n\nexport function mountFormInstance(\n  element: HTMLFormElement,\n  href: string,\n  router: AppRouterInstance,\n  fetchStrategy: PrefetchTaskFetchStrategy\n): void {\n  const prefetchURL = coercePrefetchableUrl(href)\n  if (prefetchURL === null) {\n    // This href is not prefetchable, so we don't track it.\n    // TODO: We currently observe/unobserve a form every time its href changes.\n    // For Links, this isn't a big deal because the href doesn't usually change,\n    // but for forms it's extremely common. We should optimize this.\n    return\n  }\n  const instance: FormInstance = {\n    router,\n    fetchStrategy,\n    isVisible: false,\n    prefetchTask: null,\n    prefetchHref: prefetchURL.href,\n    setOptimisticLinkStatus: null,\n  }\n  observeVisibility(element, instance)\n}\n\nexport function unmountPrefetchableInstance(element: Element) {\n  const instance = prefetchable.get(element)\n  if (instance !== undefined) {\n    prefetchable.delete(element)\n    prefetchableAndVisible.delete(instance)\n    const prefetchTask = instance.prefetchTask\n    if (prefetchTask !== null) {\n      cancelPrefetchTask(prefetchTask)\n    }\n  }\n  if (observer !== null) {\n    observer.unobserve(element)\n  }\n}\n\nfunction handleIntersect(entries: Array<IntersectionObserverEntry>) {\n  // Process the entries in reverse order. The prefetch scheduler assigns the\n  // highest priority to the most recently scheduled task, so whichever link we\n  // schedule *last* wins. When multiple links enter the viewport at once (e.g.\n  // on initial load), the observer reports them in document order, so iterating\n  // in reverse means the link nearest the top of the document is scheduled last\n  // and therefore prioritized. The topmost link isn't guaranteed to be the most\n  // important, but as a default heuristic it's more reasonable than prioritizing\n  // whichever link happens to be lowest in the document.\n  for (let i = entries.length - 1; i >= 0; i--) {\n    const entry = entries[i]\n    // Some extremely old browsers or polyfills don't reliably support\n    // isIntersecting so we check intersectionRatio instead. (Do we care? Not\n    // really. But whatever this is fine.)\n    const isVisible = entry.intersectionRatio > 0\n    onLinkVisibilityChanged(entry.target as HTMLAnchorElement, isVisible)\n  }\n}\n\nexport function onLinkVisibilityChanged(element: Element, isVisible: boolean) {\n  if (process.env.NODE_ENV !== 'production') {\n    // Prefetching on viewport is disabled in development for performance\n    // reasons, because it requires compiling the target page.\n    // TODO: Investigate re-enabling this.\n    return\n  }\n\n  const instance = prefetchable.get(element)\n  if (instance === undefined) {\n    return\n  }\n\n  instance.isVisible = isVisible\n  if (isVisible) {\n    prefetchableAndVisible.add(instance)\n  } else {\n    prefetchableAndVisible.delete(instance)\n  }\n  rescheduleLinkPrefetch(instance, PrefetchPriority.Default)\n}\n\nexport function onNavigationIntent(\n  element: HTMLAnchorElement | SVGAElement,\n  unstable_upgradeToDynamicPrefetch: boolean\n) {\n  const instance = prefetchable.get(element)\n  if (instance === undefined) {\n    return\n  }\n  // Prefetch the link on hover/touchstart.\n  if (instance !== undefined) {\n    if (\n      process.env.__NEXT_DYNAMIC_ON_HOVER &&\n      unstable_upgradeToDynamicPrefetch\n    ) {\n      // Switch to a full prefetch\n      instance.fetchStrategy = FetchStrategy.Full\n    }\n    rescheduleLinkPrefetch(instance, PrefetchPriority.Intent)\n  }\n}\n\nfunction rescheduleLinkPrefetch(\n  instance: PrefetchableInstance,\n  priority: PrefetchPriority.Default | PrefetchPriority.Intent\n) {\n  // Ensures that app-router-instance is not compiled in the server bundle\n  if (typeof window !== 'undefined') {\n    const existingPrefetchTask = instance.prefetchTask\n\n    if (!instance.isVisible) {\n      // Cancel any in-progress prefetch task. (If it already finished then this\n      // is a no-op.)\n      if (existingPrefetchTask !== null) {\n        cancelPrefetchTask(existingPrefetchTask)\n      }\n      // We don't need to reset the prefetchTask to null upon cancellation; an\n      // old task object can be rescheduled with reschedulePrefetchTask. This is a\n      // micro-optimization but also makes the code simpler (don't need to\n      // worry about whether an old task object is stale).\n      return\n    }\n\n    const { getCurrentAppRouterState } =\n      // TODO(browser-variant): migrate to a .ts/.browser.ts split so the browser bundle drops the server branch; see scripts/generate-browser-variant-aliases.mjs\n      // ast-grep-ignore: no-typeof-window-require\n      require('./app-router-instance') as typeof import('./app-router-instance')\n\n    const appRouterState = getCurrentAppRouterState()\n    if (appRouterState !== null) {\n      const treeAtTimeOfPrefetch = appRouterState.tree\n      if (existingPrefetchTask === null) {\n        // Initiate a prefetch task.\n        const nextUrl = appRouterState.nextUrl\n        const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n        instance.prefetchTask = scheduleSegmentPrefetchTask(\n          cacheKey,\n          treeAtTimeOfPrefetch,\n          instance.fetchStrategy,\n          priority,\n          null,\n          null // navigationLockPrefetch\n        )\n      } else {\n        // We already have an old task object that we can reschedule. This is\n        // effectively the same as canceling the old task and creating a new one.\n        reschedulePrefetchTask(\n          existingPrefetchTask,\n          treeAtTimeOfPrefetch,\n          instance.fetchStrategy,\n          priority\n        )\n      }\n    }\n  }\n}\n\nexport function pingVisibleLinks(\n  nextUrl: string | null,\n  tree: FlightRouterState\n) {\n  // For each currently visible link, cancel the existing prefetch task (if it\n  // exists) and schedule a new one. This is effectively the same as if all the\n  // visible links left and then re-entered the viewport.\n  //\n  // This is called when the Next-Url or the base tree changes, since those\n  // may affect the result of a prefetch task. It's also called after a\n  // cache invalidation.\n  for (const instance of prefetchableAndVisible) {\n    const task = instance.prefetchTask\n    if (task !== null && !isPrefetchTaskDirty(task, nextUrl, tree)) {\n      // The cache has not been invalidated, and none of the inputs have\n      // changed. Bail out.\n      continue\n    }\n    // Something changed. Cancel the existing prefetch task and schedule a\n    // new one.\n    if (task !== null) {\n      cancelPrefetchTask(task)\n    }\n    const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n    instance.prefetchTask = scheduleSegmentPrefetchTask(\n      cacheKey,\n      tree,\n      instance.fetchStrategy,\n      PrefetchPriority.Default,\n      null,\n      null // navigationLockPrefetch\n    )\n  }\n}\n","import type { Segment } from '../../shared/lib/app-router-types'\n\nexport const matchSegment = (\n  existingSegment: Segment,\n  segment: Segment\n): boolean => {\n  // segment is either Array or string\n  if (typeof existingSegment === 'string') {\n    if (typeof segment === 'string') {\n      // Common case: segment is just a string\n      return existingSegment === segment\n    }\n    return false\n  }\n\n  if (typeof segment === 'string') {\n    return false\n  }\n  return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]\n}\n","import { useEffect } from 'react'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\n\nexport function handleHardNavError(error: unknown): boolean {\n  if (\n    typeof window !== 'undefined' &&\n    window.next.__pendingUrl &&\n    createHrefFromUrl(new URL(window.location.href)) !==\n      createHrefFromUrl(window.next.__pendingUrl)\n  ) {\n    console.error(\n      `Error occurred during navigation, falling back to hard navigation`,\n      error\n    )\n    window.location.href = window.next.__pendingUrl.toString()\n    return true\n  }\n  return false\n}\n\nexport function useNavFailureHandler() {\n  if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n    // this if is only for DCE of the feature flag not conditional\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      const uncaughtExceptionHandler = (\n        evt: ErrorEvent | PromiseRejectionEvent\n      ) => {\n        const error = 'reason' in evt ? evt.reason : evt.error\n        // if we have an unhandled exception/rejection during\n        // a navigation we fall back to a hard navigation to\n        // attempt recovering to a good state\n        handleHardNavError(error)\n      }\n      window.addEventListener('unhandledrejection', uncaughtExceptionHandler)\n      window.addEventListener('error', uncaughtExceptionHandler)\n      return () => {\n        window.removeEventListener('error', uncaughtExceptionHandler)\n        window.removeEventListener(\n          'unhandledrejection',\n          uncaughtExceptionHandler\n        )\n      }\n    }, [])\n  }\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { Params } from '../../server/request/params'\nimport {\n  createDevToolsInstrumentedPromise,\n  ReadonlyURLSearchParams,\n  type InstrumentedPromise,\n  type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n  computeSelectedLayoutSegment,\n  getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\n/**\n * Promises are cached by tree to ensure stability across suspense retries.\n */\ntype LayoutSegmentPromisesCache = {\n  selectedLayoutSegmentPromises: Map<string, InstrumentedPromise<string | null>>\n  selectedLayoutSegmentsPromises: Map<string, InstrumentedPromise<string[]>>\n}\n\nconst layoutSegmentPromisesCache = new WeakMap<\n  FlightRouterState,\n  LayoutSegmentPromisesCache\n>()\n\n/**\n * Creates instrumented promises for layout segment hooks at a given tree level.\n * This is dev-only code for React Suspense DevTools instrumentation.\n */\nfunction createLayoutSegmentPromises(\n  tree: FlightRouterState\n): LayoutSegmentPromisesCache | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  // Check if we already have cached promises for this tree\n  const cached = layoutSegmentPromisesCache.get(tree)\n  if (cached) {\n    return cached\n  }\n\n  // Create new promises and cache them\n  const segmentPromises = new Map<string, InstrumentedPromise<string | null>>()\n  const segmentsPromises = new Map<string, InstrumentedPromise<string[]>>()\n\n  const parallelRoutes = tree[1]\n  for (const parallelRouteKey of Object.keys(parallelRoutes)) {\n    const segments = getSelectedLayoutSegmentPath(tree, parallelRouteKey)\n\n    // Use the shared logic to compute the segment value\n    const segment = computeSelectedLayoutSegment(segments, parallelRouteKey)\n\n    segmentPromises.set(\n      parallelRouteKey,\n      createDevToolsInstrumentedPromise('useSelectedLayoutSegment', segment)\n    )\n    segmentsPromises.set(\n      parallelRouteKey,\n      createDevToolsInstrumentedPromise('useSelectedLayoutSegments', segments)\n    )\n  }\n\n  const result: LayoutSegmentPromisesCache = {\n    selectedLayoutSegmentPromises: segmentPromises,\n    selectedLayoutSegmentsPromises: segmentsPromises,\n  }\n\n  // Cache the result for future renders\n  layoutSegmentPromisesCache.set(tree, result)\n\n  return result\n}\n\nconst rootNavigationPromisesCache = new WeakMap<\n  FlightRouterState,\n  Map<string, NavigationPromises>\n>()\n\n/**\n * Creates instrumented navigation promises for the root app-router.\n */\nexport function createRootNavigationPromises(\n  tree: FlightRouterState,\n  pathname: string,\n  searchParams: URLSearchParams,\n  pathParams: Params\n): NavigationPromises | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  // Create stable cache keys from the values\n  const searchParamsString = searchParams.toString()\n  const pathParamsString = JSON.stringify(pathParams)\n  const cacheKey = `${pathname}:${searchParamsString}:${pathParamsString}`\n\n  // Get or create the cache for this tree\n  let treeCache = rootNavigationPromisesCache.get(tree)\n  if (!treeCache) {\n    treeCache = new Map<string, NavigationPromises>()\n    rootNavigationPromisesCache.set(tree, treeCache)\n  }\n\n  // Check if we have cached promises for this combination\n  const cached = treeCache.get(cacheKey)\n  if (cached) {\n    return cached\n  }\n\n  const readonlySearchParams = new ReadonlyURLSearchParams(searchParams)\n\n  const layoutSegmentPromises = createLayoutSegmentPromises(tree)\n\n  const promises: NavigationPromises = {\n    pathname: createDevToolsInstrumentedPromise('usePathname', pathname),\n    searchParams: createDevToolsInstrumentedPromise(\n      'useSearchParams',\n      readonlySearchParams\n    ),\n    params: createDevToolsInstrumentedPromise('useParams', pathParams),\n    ...layoutSegmentPromises,\n  }\n\n  treeCache.set(cacheKey, promises)\n\n  return promises\n}\n\nconst nestedLayoutPromisesCache = new WeakMap<\n  FlightRouterState,\n  Map<NavigationPromises | null, NavigationPromises>\n>()\n\n/**\n * Creates merged navigation promises for nested layouts.\n * Merges parent promises with layout-specific segment promises.\n */\nexport function createNestedLayoutNavigationPromises(\n  tree: FlightRouterState,\n  parentNavPromises: NavigationPromises | null\n): NavigationPromises | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  const parallelRoutes = tree[1]\n  const parallelRouteKeys = Object.keys(parallelRoutes)\n\n  // Only create promises if there are parallel routes at this level\n  if (parallelRouteKeys.length === 0) {\n    return null\n  }\n\n  // Get or create the cache for this tree\n  let treeCache = nestedLayoutPromisesCache.get(tree)\n  if (!treeCache) {\n    treeCache = new Map<NavigationPromises | null, NavigationPromises>()\n    nestedLayoutPromisesCache.set(tree, treeCache)\n  }\n\n  // Check if we have cached promises for this parent combination\n  const cached = treeCache.get(parentNavPromises)\n  if (cached) {\n    return cached\n  }\n\n  // Create merged promises\n  const layoutSegmentPromises = createLayoutSegmentPromises(tree)\n  const promises: NavigationPromises = {\n    ...parentNavPromises!,\n    ...layoutSegmentPromises,\n  }\n\n  treeCache.set(parentNavPromises, promises)\n\n  return promises\n}\n","import { useContext } from 'react'\nimport { PathnameContext } from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { workUnitAsyncStorage } from './server-async-storage'\n\n/**\n * This checks to see if the current render has any unknown route parameters that\n * would cause the pathname to be dynamic. It's used to trigger a different\n * render path in the error boundary.\n *\n * @returns true if there are any unknown route parameters, false otherwise\n */\nfunction hasFallbackRouteParams(): boolean {\n  // The AsyncLocalStorage module is kept out of the client bundle via the\n  // `./server-async-storage` browser alias; the guard ensures the stub is never\n  // dereferenced in the browser.\n  if (typeof window === 'undefined') {\n    const workUnitStore = workUnitAsyncStorage.getStore()\n    if (!workUnitStore) return false\n\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n      case 'prerender-ppr':\n      case 'validation-client':\n        const fallbackParams = workUnitStore.fallbackRouteParams\n        return fallbackParams ? fallbackParams.size > 0 : false\n      case 'prerender-legacy':\n      case 'request':\n      case 'prerender-runtime':\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n\n    return false\n  }\n\n  return false\n}\n\n/**\n * This returns a `null` value if there are any unknown route parameters, and\n * otherwise returns the pathname from the context. This is an alternative to\n * `usePathname` that is used in the error boundary to avoid rendering the\n * error boundary when there are unknown route parameters. This doesn't throw\n * when accessed with unknown route parameters.\n *\n * @returns\n *\n * @internal\n */\nexport function useUntrackedPathname(): string | null {\n  // If there are any unknown route parameters we would typically throw\n  // an error, but this internal method allows us to return a null value instead\n  // for components that do not propagate the pathname to the static shell (like\n  // the error boundary).\n  if (hasFallbackRouteParams()) {\n    return null\n  }\n\n  // This shouldn't cause any issues related to conditional rendering because\n  // the environment will be consistent for the render.\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useContext(PathnameContext)\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n/**\n * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)\n * within a route segment as well as inject a tag.\n *\n * `notFound()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a `<meta name=\"robots\" content=\"noindex\" />` meta tag and set the status code to 404.\n * - In a Route Handler or Server Action, it will serve a 404 to the caller.\n *\n * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`\n\nexport function notFound(): never {\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n\n  throw error\n}\n","/**\n * Centralized offline detection, state management, and retry logic.\n *\n * This module tracks whether the app is offline and provides primitives for\n * retrying failed network requests. It is designed to be extended in the\n * future — e.g., instrumenting module chunk loading, Flight chunk resolution,\n * or eventually being promoted to a React-level feature.\n *\n * All stateful behavior (event listeners, polling, state tracking) only runs\n * in the browser. On the server and during hydration, getOffline() always\n * returns false.\n *\n * ## Known limitation: queued fetches\n *\n * When the user navigates multiple times while offline, each navigation queues\n * a separate fetch that blocks on waitForConnection(). When connectivity is\n * restored, all of them resume and retry simultaneously.\n *\n * Future mitigations:\n * - Stale cache access (PR 3): offline navigations will reuse back-forward\n *   cache entries, so most navigations won't issue new fetches at all. This is\n *   the primary shield against duplicate requests.\n * - Fetch cancellation: on router.refresh(), we could abort pending blocked\n *   fetches since refresh invalidates all dynamic caches.\n */\n\n// Backoff delays for the polling loop: 500ms → 1s → 2s → 3s (cap)\n\n// Timeout for the HEAD connectivity check. If the request doesn't resolve\n// within this window, we assume we're still offline. 200ms is more than enough\n// — network errors reject almost instantly.\nconst CONNECTIVITY_CHECK_TIMEOUT_MS = 200\n\nimport { pingPrefetchScheduler } from './segment-cache/scheduler'\nimport { fetch } from './segment-cache/fetch'\nimport { RSC_HEADER } from './app-router-headers'\nimport { dispatchOfflineChange } from './use-offline'\n\nexport type OfflineState = {\n  promise: Promise<void>\n  resolve: () => void\n  timeoutHandle: ReturnType<typeof setTimeout> | null\n  backoffStep: number\n}\n\nlet offlineState: OfflineState | null = null\n\n/**\n * Returns true if the error from a fetch() rejection indicates a network\n * failure (as opposed to an intentional abort or timeout). If it is a\n * network error, also starts the connectivity polling loop.\n *\n * - AbortError: the request was intentionally canceled via AbortSignal\n * - TimeoutError: AbortSignal.timeout() expired — could be a slow server,\n *   not necessarily offline\n */\nexport function checkOfflineError(err: unknown): boolean {\n  if (err instanceof DOMException) {\n    if (err.name === 'AbortError' || err.name === 'TimeoutError') {\n      return false\n    }\n  }\n  notifyOffline()\n  return true\n}\n\n/**\n * Returns whether the app is currently considered offline (i.e., a\n * connectivity polling loop is active). Always returns false on the\n * server and during hydration.\n */\nexport function getOffline(): OfflineState | null {\n  return offlineState\n}\n\n/**\n * Enters the offline state if not already in it, and starts the\n * connectivity polling loop.\n */\nfunction notifyOffline(): OfflineState {\n  if (offlineState !== null) {\n    return offlineState\n  }\n  let resolve: () => void\n  const promise = new Promise<void>((r) => {\n    resolve = r\n  })\n  offlineState = {\n    promise,\n    resolve: resolve!,\n    timeoutHandle: null,\n    backoffStep: 0,\n  }\n  dispatchOfflineChange(true)\n  checkConnectivity(offlineState)\n  return offlineState\n}\n\n/**\n * Call this when any network request succeeds while we're in the offline state.\n * If a polling loop is active, this short-circuits it — no need to wait for\n * the next HEAD check if we already know we're back online.\n */\nexport function notifyOnline(): void {\n  if (offlineState === null) {\n    return\n  }\n  if (offlineState.timeoutHandle !== null) {\n    clearTimeout(offlineState.timeoutHandle)\n  }\n  const resolve = offlineState.resolve\n  offlineState = null\n  resolve()\n  dispatchOfflineChange(false)\n  pingPrefetchScheduler()\n}\n\n/**\n * Does a HEAD request to confirm connectivity, then either resolves the\n * offline state or schedules the next check with backoff.\n */\nasync function checkConnectivity(state: OfflineState): Promise<void> {\n  // Cancel any previously scheduled check so we don't end up with\n  // parallel polling loops.\n  if (state.timeoutHandle !== null) {\n    clearTimeout(state.timeoutHandle)\n    state.timeoutHandle = null\n  }\n\n  const controller = new AbortController()\n  const timeoutId = setTimeout(\n    () => controller.abort(),\n    CONNECTIVITY_CHECK_TIMEOUT_MS\n  )\n  try {\n    // HEAD request to the current page with the RSC header, so we're\n    // testing connectivity to the same endpoint that navigations use.\n    await fetch(location.href, {\n      method: 'HEAD',\n      headers: { [RSC_HEADER]: '1' },\n      signal: controller.signal,\n    })\n    clearTimeout(timeoutId)\n    // If the fetch didn't throw, we're back online.\n    notifyOnline()\n  } catch (err) {\n    // If the error is from our own timeout abort, that actually means\n    // the request went out and is waiting for a response — i.e., we're\n    // back online. A truly offline request fails almost instantly (well\n    // within the 200ms timeout).\n    if (err instanceof DOMException && err.name === 'AbortError') {\n      clearTimeout(timeoutId)\n      notifyOnline()\n      return\n    }\n    // Network error — still offline. Schedule the next check with backoff.\n    const delay =\n      state.backoffStep === 0\n        ? 500\n        : state.backoffStep === 1\n          ? 1000\n          : state.backoffStep === 2\n            ? 2000\n            : 3000\n    state.backoffStep++\n    state.timeoutHandle = setTimeout(() => checkConnectivity(state), delay)\n  }\n}\n\n/**\n * Returns a promise that resolves when connectivity is restored.\n */\nexport function waitForConnection(state: OfflineState) {\n  return state.promise\n}\n\nfunction pingOfflineState() {\n  if (offlineState !== null) {\n    checkConnectivity(offlineState)\n  }\n}\n\n// Set up browser event listeners for proactive offline detection.\nif (typeof window !== 'undefined') {\n  window.addEventListener('offline', notifyOffline)\n  window.addEventListener('online', pingOfflineState)\n}\n","/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n  constructor() {\n    super(\n      'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n    )\n  }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  append() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  delete() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  set() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  sort() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n  digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n  if (\n    typeof error !== 'object' ||\n    error === null ||\n    !('digest' in error) ||\n    typeof error.digest !== 'string'\n  ) {\n    return false\n  }\n\n  const digest = error.digest.split(';')\n  const [errorCode, type] = digest\n  const destination = digest.slice(2, -2).join(';')\n  const status = digest.at(-2)\n\n  const statusCode = Number(status)\n\n  return (\n    errorCode === REDIRECT_ERROR_CODE &&\n    (type === 'replace' || type === 'push') &&\n    typeof destination === 'string' &&\n    !isNaN(statusCode) &&\n    statusCode in RedirectStatusCode\n  )\n}\n","export enum RedirectStatusCode {\n  SeeOther = 303,\n  TemporaryRedirect = 307,\n  PermanentRedirect = 308,\n}\n","import { RedirectStatusCode } from './redirect-status-code'\nimport {\n  type RedirectType,\n  type RedirectError,\n  isRedirectError,\n  REDIRECT_ERROR_CODE,\n} from './redirect-error'\nimport { actionAsyncStorage } from './server-async-storage'\n\nexport function getRedirectError(\n  url: string,\n  type: RedirectType,\n  statusCode: RedirectStatusCode = RedirectStatusCode.TemporaryRedirect\n): RedirectError {\n  const error = new Error(REDIRECT_ERROR_CODE) as RedirectError\n  error.digest = `${REDIRECT_ERROR_CODE};${type};${url};${statusCode};`\n  return error\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler, it will serve a 307 to the caller.\n * - In a Server Action, it will perform a client-side navigation when JavaScript is available or serve a 303 for a progressive enhancement form submission.\n * - In a Server Action, type defaults to 'push' and 'replace' elsewhere.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function redirect(\n  /** The URL to redirect to */\n  url: string,\n  type?: RedirectType\n): never {\n  type ??= actionAsyncStorage?.getStore()?.isAction ? 'push' : 'replace'\n\n  throw getRedirectError(url, type, RedirectStatusCode.TemporaryRedirect)\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler, it will serve a 308 to the caller.\n * - In a Server Action, it will perform a client-side navigation when JavaScript is available or serve a 303 for a progressive enhancement form submission.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function permanentRedirect(\n  /** The URL to redirect to */\n  url: string,\n  type: RedirectType = 'replace'\n): never {\n  throw getRedirectError(url, type, RedirectStatusCode.PermanentRedirect)\n}\n\n/**\n * Returns the encoded URL from the error if it's a RedirectError, null\n * otherwise. Note that this does not validate the URL returned.\n *\n * @param error the error that may be a redirect error\n * @return the url if the error was a redirect error\n */\nexport function getURLFromRedirectError(error: RedirectError): string\nexport function getURLFromRedirectError(error: unknown): string | null {\n  if (!isRedirectError(error)) return null\n\n  // Slices off the beginning of the digest that contains the code and the\n  // separating ';'.\n  return error.digest.split(';').slice(2, -2).join(';')\n}\n\nexport function getRedirectTypeFromError(error: RedirectError): RedirectType {\n  if (!isRedirectError(error)) {\n    throw new Error('Not a redirect error')\n  }\n\n  return error.digest.split(';', 2)[1] as RedirectType\n}\n\nexport function getRedirectStatusCodeFromError(error: RedirectError): number {\n  if (!isRedirectError(error)) {\n    throw new Error('Not a redirect error')\n  }\n\n  return Number(error.digest.split(';').at(-2))\n}\n","import type {\n  FlightRouterState,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport { INTERCEPTION_ROUTE_MARKERS } from '../../../shared/lib/router/utils/interception-routes'\nimport type { Params } from '../../../server/request/params'\nimport {\n  isGroupSegment,\n  DEFAULT_SEGMENT_KEY,\n  PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\n\nconst removeLeadingSlash = (segment: string): string => {\n  return segment[0] === '/' ? segment.slice(1) : segment\n}\n\nconst segmentToPathname = (segment: Segment): string => {\n  if (typeof segment === 'string') {\n    // 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page\n    // if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.\n    if (segment === 'children') return ''\n\n    return segment\n  }\n\n  return segment[1]\n}\n\nexport const segmentToSourcePagePathname = (segment: Segment): string => {\n  if (typeof segment === 'string') {\n    if (segment === 'children') return ''\n    if (segment.startsWith(PAGE_SEGMENT_KEY)) return 'page'\n    return segment\n  }\n\n  const [paramName, , dynamicParamType] = segment\n\n  switch (dynamicParamType) {\n    case 'c':\n      return `[...${paramName}]`\n    case 'ci(..)(..)':\n      return `(..)(..)[...${paramName}]`\n    case 'ci(.)':\n      return `(.)[...${paramName}]`\n    case 'ci(..)':\n      return `(..)[...${paramName}]`\n    case 'ci(...)':\n      return `(...)[...${paramName}]`\n    case 'oc':\n      return `[[...${paramName}]]`\n    case 'd':\n      return `[${paramName}]`\n    case 'di(..)(..)':\n      return `(..)(..)[${paramName}]`\n    case 'di(.)':\n      return `(.)[${paramName}]`\n    case 'di(..)':\n      return `(..)[${paramName}]`\n    case 'di(...)':\n      return `(...)[${paramName}]`\n    default:\n      dynamicParamType satisfies never\n      return `[${paramName}]`\n  }\n}\n\nfunction normalizeSegments(segments: string[]): string {\n  return (\n    segments.reduce((acc, segment) => {\n      segment = removeLeadingSlash(segment)\n      if (segment === '' || isGroupSegment(segment)) {\n        return acc\n      }\n\n      return `${acc}/${segment}`\n    }, '') || '/'\n  )\n}\n\nexport function extractPathFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string | undefined {\n  const segment = Array.isArray(flightRouterState[0])\n    ? flightRouterState[0][1]\n    : flightRouterState[0]\n\n  if (\n    segment === DEFAULT_SEGMENT_KEY ||\n    INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m))\n  )\n    return undefined\n\n  if (segment.startsWith(PAGE_SEGMENT_KEY)) return ''\n\n  const segments = [segmentToPathname(segment)]\n  const parallelRoutes = flightRouterState[1] ?? {}\n\n  const childrenPath = parallelRoutes.children\n    ? extractPathFromFlightRouterState(parallelRoutes.children)\n    : undefined\n\n  if (childrenPath !== undefined) {\n    segments.push(childrenPath)\n  } else {\n    for (const [key, value] of Object.entries(parallelRoutes)) {\n      if (key === 'children') continue\n\n      const childPath = extractPathFromFlightRouterState(value)\n\n      if (childPath !== undefined) {\n        segments.push(childPath)\n      }\n    }\n  }\n\n  return normalizeSegments(segments)\n}\n\nfunction extractSourcePageSegmentsFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string[] | undefined {\n  const segment = segmentToSourcePagePathname(flightRouterState[0])\n\n  if (segment === DEFAULT_SEGMENT_KEY) {\n    return undefined\n  }\n\n  if (segment === 'page') {\n    return [segment]\n  }\n\n  const parallelRoutes = flightRouterState[1] ?? {}\n\n  const childrenPath = parallelRoutes.children\n    ? extractSourcePageSegmentsFromFlightRouterState(parallelRoutes.children)\n    : undefined\n\n  if (childrenPath !== undefined) {\n    return segment === ''\n      ? childrenPath\n      : [removeLeadingSlash(segment), ...childrenPath]\n  }\n\n  for (const [key, value] of Object.entries(parallelRoutes)) {\n    if (key === 'children') continue\n\n    const childPath = extractSourcePageSegmentsFromFlightRouterState(value)\n\n    if (childPath !== undefined) {\n      return segment === ''\n        ? childPath\n        : [removeLeadingSlash(segment), ...childPath]\n    }\n  }\n\n  return undefined\n}\n\nexport function extractSourcePageFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string | undefined {\n  const sourcePageSegments =\n    extractSourcePageSegmentsFromFlightRouterState(flightRouterState)\n\n  return sourcePageSegments ? `/${sourcePageSegments.join('/')}` : undefined\n}\n\nfunction computeChangedPathImpl(\n  treeA: FlightRouterState,\n  treeB: FlightRouterState\n): string | null {\n  const [segmentA, parallelRoutesA] = treeA\n  const [segmentB, parallelRoutesB] = treeB\n\n  const normalizedSegmentA = segmentToPathname(segmentA)\n  const normalizedSegmentB = segmentToPathname(segmentB)\n\n  if (\n    INTERCEPTION_ROUTE_MARKERS.some(\n      (m) =>\n        normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m)\n    )\n  ) {\n    return ''\n  }\n\n  if (!matchSegment(segmentA, segmentB)) {\n    // once we find where the tree changed, we compute the rest of the path by traversing the tree\n    return extractPathFromFlightRouterState(treeB) ?? ''\n  }\n\n  for (const parallelRouterKey in parallelRoutesA) {\n    if (parallelRoutesB[parallelRouterKey]) {\n      const changedPath = computeChangedPathImpl(\n        parallelRoutesA[parallelRouterKey],\n        parallelRoutesB[parallelRouterKey]\n      )\n      if (changedPath !== null) {\n        return `${segmentToPathname(segmentB)}/${changedPath}`\n      }\n    }\n  }\n\n  return null\n}\n\nexport function computeChangedPath(\n  treeA: FlightRouterState,\n  treeB: FlightRouterState\n): string | null {\n  const changedPath = computeChangedPathImpl(treeA, treeB)\n\n  if (changedPath == null || changedPath === '/') {\n    return changedPath\n  }\n\n  // lightweight normalization to remove route groups\n  return normalizeSegments(changedPath.split('/'))\n}\n\n/**\n * Recursively extracts dynamic parameters from FlightRouterState.\n */\nexport function getSelectedParams(\n  currentTree: FlightRouterState,\n  params: Params = {}\n): Params {\n  const parallelRoutes = currentTree[1]\n\n  for (const parallelRoute of Object.values(parallelRoutes)) {\n    const segment = parallelRoute[0]\n    const isDynamicParameter = Array.isArray(segment)\n    const segmentValue = isDynamicParameter ? segment[1] : segment\n    if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) continue\n\n    // Ensure catchAll and optional catchall are turned into an array\n    const isCatchAll =\n      isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc')\n\n    if (isCatchAll) {\n      params[segment[0]] = segment[1].split('/')\n    } else if (isDynamicParameter) {\n      params[segment[0]] = segment[1]\n    }\n\n    params = getSelectedParams(parallelRoute, params)\n  }\n\n  return params\n}\n","export function createHrefFromUrl(\n  url: Pick<URL, 'pathname' | 'search' | 'hash'>,\n  includeHash: boolean = true\n): string {\n  return url.pathname + url.search + (includeHash ? url.hash : '')\n}\n","'use client'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n  createFromReadableStream as createFromReadableStreamBrowser,\n  createFromFetch as createFromFetchBrowser,\n} from 'react-server-dom-webpack/client'\n\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { fetch } from '../segment-cache/fetch'\nimport type {\n  FlightRouterState,\n  InitialRSCPayload,\n  NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\n\nimport {\n  type NEXT_ROUTER_PREFETCH_HEADER,\n  type NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_RSC_UNION_QUERY,\n  NEXT_URL,\n  RSC_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_DID_POSTPONE_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n} from '../app-router-headers'\nimport { callServer } from '../../app-call-server'\nimport { findSourceMapURL } from '../../app-find-source-map-url'\nimport {\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n  type NormalizedFlightData,\n} from '../../flight-data-helpers'\nimport { setCacheBustingSearchParam } from './set-cache-busting-search-param'\nimport { urlToUrlWithoutFlightMarker } from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport { getDeploymentId } from '../../../shared/lib/deployment-id'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport {\n  stripIsPartialByte,\n  createNonTaskyPrefetchResponseStream,\n} from '../segment-cache/cache'\nimport { UnknownDynamicStaleTime } from '../segment-cache/bfcache'\n\nconst createFromReadableStream =\n  createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\nconst createFromFetch =\n  createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n  | typeof import('../../dev/debug-channel').createDebugChannel\n  | undefined\n\nif (process.env.__NEXT_DEV_SERVER && process.env.__NEXT_REACT_DEBUG_CHANNEL) {\n  createDebugChannel = (\n    require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')\n  ).createDebugChannel\n}\n\nexport interface FetchServerResponseOptions {\n  readonly flightRouterState: FlightRouterState\n  readonly nextUrl: string | null\n  readonly isHmrRefresh?: boolean\n  readonly signal?: AbortSignal\n}\n\nexport type StaticStageData<\n  T extends\n    | NavigationFlightResponse\n    | InitialRSCPayload = NavigationFlightResponse,\n> = {\n  readonly response: T\n  readonly isResponsePartial: boolean\n}\n\ntype SpaFetchServerResponseResult = {\n  flightData: NormalizedFlightData[]\n  canonicalUrl: URL\n  renderedSearch: NormalizedSearch\n  couldBeIntercepted: boolean\n  supportsPerSegmentPrefetching: boolean\n  postponed: boolean\n  dynamicStaleTime: number\n  staticStageData: StaticStageData | null\n  runtimePrefetchStream: ReadableStream<Uint8Array> | null\n  responseHeaders: Headers\n  debugInfo: Array<any> | null\n  /**\n   * Dev only: resolves once the server has flushed the shell-stage content to\n   * the stream (or earlier, on a cache miss). The navigation defers revealing\n   * the response (resolving its deferred RSCs) until this settles, so React\n   * doesn't render a boundary's children before their row has been decoded and\n   * commit a premature Suspense fallback. `null` outside the streaming dev\n   * render.\n   */\n  revealAfter: Promise<void> | null\n}\n\ntype MpaFetchServerResponseResult = string\n\nexport type FetchServerResponseResult =\n  | MpaFetchServerResponseResult\n  | SpaFetchServerResponseResult\n\nexport type RequestHeaders = {\n  [RSC_HEADER]?: '1'\n  [NEXT_ROUTER_STATE_TREE_HEADER]?: string\n  [NEXT_URL]?: string\n  [NEXT_ROUTER_PREFETCH_HEADER]?: '1' | '2' | '3'\n  [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]?: string\n  'x-deployment-id'?: string\n  [NEXT_HMR_REFRESH_HEADER]?: '1'\n  // A header that is only added in test mode to assert on fetch priority\n  'Next-Test-Fetch-Priority'?: RequestInit['priority']\n  [NEXT_HTML_REQUEST_ID_HEADER]?: string // dev-only\n  [NEXT_REQUEST_ID_HEADER]?: string // dev-only\n}\n\nfunction doMpaNavigation(url: string): FetchServerResponseResult {\n  return urlToUrlWithoutFlightMarker(new URL(url, location.origin)).toString()\n}\n\nlet isPageUnloading = false\n\nif (typeof window !== 'undefined') {\n  // Track when the page is unloading, e.g. due to reloading the page or\n  // performing hard navigations. This allows us to suppress error logging when\n  // the browser cancels in-flight requests during page unload.\n  window.addEventListener('pagehide', () => {\n    isPageUnloading = true\n  })\n\n  // Reset the flag on pageshow, e.g. when navigating back and the JavaScript\n  // execution context is restored by the browser.\n  window.addEventListener('pageshow', () => {\n    isPageUnloading = false\n  })\n}\n\n/**\n * Fetch the flight data for the provided url. Takes in the current router state\n * to decide what to render server-side.\n */\nexport async function fetchServerResponse(\n  url: URL,\n  options: FetchServerResponseOptions\n): Promise<FetchServerResponseResult> {\n  const { flightRouterState, nextUrl } = options\n\n  const headers: RequestHeaders = {\n    // Enable flight response\n    [RSC_HEADER]: '1',\n    // Provide the current router state\n    [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n      flightRouterState,\n      options.isHmrRefresh\n    ),\n  }\n\n  if (process.env.NODE_ENV === 'development' && options.isHmrRefresh) {\n    headers[NEXT_HMR_REFRESH_HEADER] = '1'\n  }\n\n  if (nextUrl) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  // In static export mode, we need to modify the URL to request the .txt file,\n  // but we should preserve the original URL for the canonical URL and error handling.\n  const originalUrl = url\n\n  try {\n    if (process.env.NODE_ENV === 'production') {\n      if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n        // In \"output: export\" mode, we can't rely on headers to distinguish\n        // between HTML and RSC requests. Instead, we append an extra prefix\n        // to the request.\n        url = new URL(url)\n        if (url.pathname.endsWith('/')) {\n          url.pathname += 'index.txt'\n        } else {\n          url.pathname += '.txt'\n        }\n      }\n    }\n\n    // Typically, during a navigation, we decode the response using Flight's\n    // `createFromFetch` API, which accepts a `fetch` promise.\n    // TODO: Remove this check once the old PPR flag is removed\n    const isLegacyPPR =\n      process.env.__NEXT_PPR && !process.env.__NEXT_CACHE_COMPONENTS\n    const shouldImmediatelyDecode = !isLegacyPPR\n    const res = await createFetch<NavigationFlightResponse>(\n      url,\n      headers,\n      'auto',\n      shouldImmediatelyDecode,\n      options.signal\n    )\n\n    // If the fetch succeeds while we're in the offline state, notify the\n    // offline module so it can short-circuit the polling loop.\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { notifyOnline } =\n        require('../offline') as typeof import('../offline')\n      notifyOnline()\n    }\n\n    const responseUrl = urlToUrlWithoutFlightMarker(new URL(res.url))\n    const canonicalUrl = res.redirected ? responseUrl : originalUrl\n\n    const contentType = res.headers.get('content-type') || ''\n    const interception = !!res.headers.get('vary')?.includes(NEXT_URL)\n    const postponed = !!res.headers.get(NEXT_DID_POSTPONE_HEADER)\n    let isFlightResponse = contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n\n    if (process.env.NODE_ENV === 'production') {\n      if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n        if (!isFlightResponse) {\n          isFlightResponse = contentType.startsWith('text/plain')\n        }\n      }\n    }\n\n    // If fetch returns something different than flight response handle it like a mpa navigation\n    // If the fetch was not 200, we also handle it like a mpa navigation\n    if (!isFlightResponse || !res.ok || !res.body) {\n      // in case the original URL came with a hash, preserve it before redirecting to the new URL\n      if (url.hash) {\n        responseUrl.hash = url.hash\n      }\n\n      return doMpaNavigation(responseUrl.toString())\n    }\n\n    // We may navigate to a page that requires a different Webpack runtime.\n    // In prod, every page will have the same Webpack runtime.\n    // In dev, the Webpack runtime is minimal for each page.\n    // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page.\n    // TODO: This needs to happen in the Flight Client.\n    // Or Webpack needs to include the runtime update in the Flight response as\n    // a blocking script.\n    if (process.env.NODE_ENV !== 'production' && !process.env.TURBOPACK) {\n      await (\n        require('../../dev/hot-reloader/app/hot-reloader-app') as typeof import('../../dev/hot-reloader/app/hot-reloader-app')\n      ).waitForWebpackRuntimeHotUpdate()\n    }\n\n    let flightResponsePromise = res.flightResponsePromise\n    if (flightResponsePromise === null) {\n      // Typically, `createFetch` would have already started decoding the\n      // Flight response. If it hasn't, though, we need to decode it now.\n      // TODO: This should only be reachable if legacy PPR is enabled (i.e. PPR\n      // without Cache Components). Remove this branch once legacy PPR\n      // is deleted.\n      flightResponsePromise =\n        createFromNextReadableStream<NavigationFlightResponse>(\n          res.body,\n          headers,\n          { allowPartialStream: postponed }\n        )\n    }\n\n    const [flightResponse, cacheData] = await Promise.all([\n      flightResponsePromise,\n      res.cacheData,\n    ])\n\n    if (\n      (res.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? flightResponse.b) !==\n      getNavigationBuildId()\n    ) {\n      // The server build does not match the client build.\n      return doMpaNavigation(res.url)\n    }\n\n    const normalizedFlightData = normalizeFlightData(flightResponse.f)\n    if (typeof normalizedFlightData === 'string') {\n      return doMpaNavigation(normalizedFlightData)\n    }\n\n    const staticStageData =\n      cacheData !== null\n        ? await resolveStaticStageData(cacheData, flightResponse, headers)\n        : null\n\n    return {\n      flightData: normalizedFlightData,\n      canonicalUrl: canonicalUrl,\n      // TODO: We should be able to read this from the rewrite header, not the\n      // Flight response. Theoretically they should always agree, but there are\n      // currently some cases where it's incorrect for interception routes. We\n      // can always trust the value in the response body. However, per-segment\n      // prefetch responses don't embed the value in the body; they rely on the\n      // header alone. So we need to investigate why the header is sometimes\n      // wrong for interception routes.\n      renderedSearch: flightResponse.q as NormalizedSearch,\n      couldBeIntercepted: interception,\n      supportsPerSegmentPrefetching: flightResponse.S,\n      postponed,\n      // The dynamicStaleTime is only present in the response body when\n      // a page exports unstable_dynamicStaleTime and this is a dynamic render.\n      // When absent (UnknownDynamicStaleTime), the client falls back to the\n      // global DYNAMIC_STALETIME_MS. The value is in seconds.\n      dynamicStaleTime: flightResponse.d ?? UnknownDynamicStaleTime,\n      staticStageData,\n      runtimePrefetchStream: flightResponse.p ?? null,\n      responseHeaders: res.headers,\n      debugInfo: flightResponsePromise._debugInfo ?? null,\n      revealAfter: flightResponse._revealAfter ?? null,\n    }\n  } catch (err) {\n    if (options.signal?.aborted) {\n      // A newer HMR refresh superseded this one and aborted its request.\n      // Rethrow so the caller treats it as canceled, rather than logging a\n      // failure or falling back to an MPA navigation.\n      throw err\n    }\n\n    // If the fetch rejected due to a network error, wait for connectivity\n    // to be restored and then retry. checkOfflineError returns true for\n    // network errors (and starts the polling loop); returns false for\n    // intentional aborts/timeouts, which fall through to the MPA fallback.\n    //\n    // Note: when the user navigates multiple times while offline, each\n    // navigation queues a separate retry here. Once connectivity returns,\n    // all pending retries resume simultaneously. This is mitigated in PR 3\n    // by reusing back-forward cache entries during offline navigation, which\n    // avoids issuing new fetches in the first place.\n    if (process.env.__NEXT_USE_OFFLINE && !isPageUnloading) {\n      const { checkOfflineError, getOffline, waitForConnection } =\n        require('../offline') as typeof import('../offline')\n      if (checkOfflineError(err)) {\n        const offline = getOffline()\n        if (offline !== null) {\n          await waitForConnection(offline)\n        }\n        return fetchServerResponse(url, options)\n      }\n    }\n\n    if (!isPageUnloading) {\n      console.error(\n        `Failed to fetch RSC payload for ${originalUrl}. Falling back to browser navigation.`,\n        err\n      )\n    }\n\n    // If fetch fails handle it like a mpa navigation\n    // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.\n    // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.\n    return originalUrl.toString()\n  }\n}\n\n// This is a subset of the standard Response type. We use a custom type for\n// this so we can limit which details about the response leak into the rest of\n// the codebase. For example, there's some custom logic for manually following\n// redirects, so \"redirected\" in this type could be a composite of multiple\n// browser fetch calls; however, this fact should not leak to the caller.\nexport type RSCResponse<T> = {\n  ok: boolean\n  redirected: boolean\n  headers: Headers\n  body: ReadableStream<Uint8Array> | null\n  status: number\n  url: string\n  flightResponsePromise: (Promise<T> & { _debugInfo?: Array<any> }) | null\n  cacheData: Promise<FetchResponseCacheData | null>\n}\n\ntype FetchResponseCacheData = {\n  isResponsePartial: boolean\n  // Separate clones of the response body for stage extraction. The static\n  // stage and shell stage are extracted from independent reads, so each\n  // needs its own ReadableStream. Both are derived from a chain of `tee()`\n  // calls in `processFetch`.\n  staticBodyClone?: ReadableStream<Uint8Array>\n  shellBodyClone?: ReadableStream<Uint8Array>\n}\n\n/**\n * Strips the leading isPartial byte from an RSC navigation response and\n * clones the body for segment cache extraction.\n *\n * When cache components is enabled, the server prepends a single byte:\n * '~' (0x7e) for partial, '#' (0x23) for complete. This must be stripped\n * before Flight decoding because it's not valid RSC data. The body is\n * cloned before Flight can consume it so the clone is available for later use.\n *\n * When cache components is disabled, returns the original response with\n * cacheData: null.\n */\nexport async function processFetch(response: Response): Promise<{\n  response: Response\n  cacheData: FetchResponseCacheData | null\n}> {\n  if (process.env.__NEXT_CACHE_COMPONENTS) {\n    if (!response.body) {\n      throw new InvariantError(\n        'Expected RSC navigation response to have a body'\n      )\n    }\n\n    const { stream, isPartial } = await stripIsPartialByte(response.body)\n\n    let responseStream: ReadableStream<Uint8Array>\n    let cacheData: FetchResponseCacheData\n\n    if (process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS) {\n      // Three readers needed: the main Flight decoder, the static-stage\n      // extractor, and the shell-stage extractor. Tee twice.\n      const [stream1, rest] = stream.tee()\n      const [staticBodyClone, shellBodyClone] = rest.tee()\n      responseStream = stream1\n      cacheData = {\n        isResponsePartial: isPartial,\n        staticBodyClone,\n        shellBodyClone,\n      }\n    } else {\n      responseStream = stream\n      cacheData = { isResponsePartial: isPartial }\n    }\n\n    const strippedResponse = new Response(responseStream, {\n      headers: response.headers,\n      status: response.status,\n      statusText: response.statusText,\n    })\n\n    // The Response constructor doesn't preserve `url` or `redirected` from\n    // the original. We need both: `url` for React DevTools and `redirected`\n    // for the redirect replay logic below.\n    Object.defineProperty(strippedResponse, 'url', { value: response.url })\n    Object.defineProperty(strippedResponse, 'redirected', {\n      value: response.redirected,\n    })\n\n    return { response: strippedResponse, cacheData }\n  }\n\n  return { response, cacheData: null }\n}\n\n/**\n * Resolves the static stage response from the raw `processFetch` outputs and\n * the decoded flight response, for writing into the segment cache.\n *\n * - Fully static: use the decoded flight response as-is, no truncation needed.\n * - Not fully static + `l` field: truncate the body clone at the static stage\n *   byte boundary and decode.\n * - Otherwise: no cache-worthy data.\n */\nexport async function resolveStaticStageData<\n  T extends NavigationFlightResponse | InitialRSCPayload,\n>(\n  cacheData: FetchResponseCacheData,\n  flightResponse: T,\n  headers: RequestHeaders | undefined\n): Promise<StaticStageData<T> | null> {\n  const { isResponsePartial, staticBodyClone } = cacheData\n\n  if (staticBodyClone) {\n    if (!isResponsePartial) {\n      // Fully static — cache the entire decoded response as-is.\n      staticBodyClone.cancel()\n\n      return { response: flightResponse, isResponsePartial: false }\n    }\n\n    if (flightResponse.l !== undefined) {\n      // Partially static — truncate the body clone at the byte boundary and\n      // decode it.\n      const staticStageByteLength = await flightResponse.l\n      const response = await decodeStageUntilBoundary<T>(\n        staticBodyClone,\n        staticStageByteLength,\n        headers\n      )\n\n      return { response, isResponsePartial: true }\n    }\n\n    // No caching — cancel the unused clone.\n    staticBodyClone.cancel()\n  }\n\n  return null\n}\n\n/**\n * Resolves the shell stage of a prerender response, performing a separate\n * Flight decode of the byte prefix when the shell differs from the main\n * response. Returns null when no separate decode is needed:\n *\n * - `a === undefined`: server didn't emit shell stage info.\n * - `a` resolves to `null`: the shell IS the main response — the caller can\n *   reuse the existing decoded `flightResponse` if it needs a shell payload.\n *\n * Returns the decoded shell payload when `a` resolves to a number, i.e.\n * the shell is a strict prefix of the response and requires a separate\n * decode at that byte boundary.\n */\nexport async function resolveShellStageData<\n  T extends NavigationFlightResponse | InitialRSCPayload,\n>(\n  cacheData: FetchResponseCacheData,\n  flightResponse: T,\n  headers: RequestHeaders | undefined\n): Promise<T | null> {\n  const { shellBodyClone } = cacheData\n\n  if (!shellBodyClone) {\n    return null\n  }\n\n  if (flightResponse.a === undefined) {\n    shellBodyClone.cancel()\n    return null\n  }\n\n  const shellByteLength = await flightResponse.a\n  if (shellByteLength === null) {\n    // Shell == main response — caller reuses the existing flightResponse.\n    shellBodyClone.cancel()\n    return null\n  }\n\n  return decodeStageUntilBoundary<T>(shellBodyClone, shellByteLength, headers)\n}\n\n/**\n * Truncates and buffers a Flight stream clone at the given byte boundary and\n * decodes the prefix as a Flight payload. Used by the static-stage and\n * shell-stage extraction helpers.\n */\nexport async function decodeStageUntilBoundary<T>(\n  responseBodyClone: ReadableStream<Uint8Array>,\n  byteLength: number,\n  headers: RequestHeaders | undefined\n): Promise<T> {\n  const { buffer } = await createNonTaskyPrefetchResponseStream(\n    responseBodyClone,\n    byteLength\n  )\n  return decodeBufferedStage<T>(buffer, headers)\n}\n\n/**\n * Decodes already-buffered Flight response bytes as a stage payload. The\n * bytes are delivered to Flight as a single chunk so all rows are processed\n * synchronously in one call — required for the thenable-status reads that\n * scope a response's late-resolving metadata (vary params, isPartial, ...)\n * to this decode.\n */\nexport function decodeBufferedStage<T>(\n  buffer: Uint8Array,\n  headers: RequestHeaders | undefined\n): Promise<T> {\n  const stream = new ReadableStream<Uint8Array>({\n    start(controller) {\n      controller.enqueue(buffer)\n      controller.close()\n    },\n  })\n  return createFromNextReadableStream<T>(stream, headers, {\n    allowPartialStream: true,\n  })\n}\n\n// When an HMR refresh can be superseded, we decode its Flight response through\n// a wrapper stream we can close on abort. Closing the stream (rather than\n// letting the aborted fetch error it) makes React's Flight client mark\n// unresolved rows as halted: they suspend during render instead of rejecting,\n// so a superseded request never surfaces an error on an already-committed tree.\n// Because the stream is closed, there's also no unclosed-stream GC-root leak\n// (see #89610). The wrapper is created synchronously here so that the decode\n// starts at the same point `createFromNextFetch` would, preserving the\n// server-latency debug timing.\nfunction createHaltingFlightResponse<T>(\n  fetchPromise: Promise<Response>,\n  headers: RequestHeaders,\n  signal: AbortSignal\n): Promise<T> & { _debugInfo?: Array<any> } {\n  let closed = false\n  let reader: ReadableStreamDefaultReader<Uint8Array> | null = null\n  const wrapper = new ReadableStream<Uint8Array>({\n    start(controller) {\n      const onAbort = () => {\n        closed = true\n        try {\n          controller.close()\n        } catch {\n          // The controller may already be closed; nothing to do.\n        }\n        if (reader !== null) {\n          reader.cancel().catch(() => {})\n        }\n      }\n      if (signal.aborted) {\n        onAbort()\n      } else {\n        signal.addEventListener('abort', onAbort, { once: true })\n      }\n    },\n    async pull(controller) {\n      if (closed) {\n        return\n      }\n      if (reader === null) {\n        let response: Response\n        try {\n          response = await fetchPromise\n        } catch (err) {\n          // We don't inspect `err`. If the request was superseded, `onAbort`\n          // already ran synchronously (abort listeners fire during\n          // `signal.abort()`, before this rejection microtask), so `closed` is\n          // true and the controller is already closed — erroring it would\n          // throw, and a superseded request's failure is moot regardless of its\n          // cause. Only a genuine, non-superseded failure reaches here with\n          // `closed` still false; that is the case we surface.\n          if (!closed) {\n            controller.error(err)\n          }\n          return\n        }\n        if (closed) {\n          // Aborted while awaiting the response. The `fetch` abort tears down\n          // an in-flight request, but if it had already completed we still hold\n          // an unread body; release it so it isn't left dangling.\n          response.body?.cancel().catch(() => {})\n          return\n        }\n        const body = response.body\n        if (body === null) {\n          controller.close()\n          return\n        }\n        reader = body.getReader()\n      }\n      try {\n        const { done, value } = await reader.read()\n        if (closed) {\n          return\n        }\n        if (done) {\n          controller.close()\n        } else {\n          controller.enqueue(value)\n        }\n      } catch (err) {\n        // Same as the fetch catch above: once superseded (`closed`) the\n        // controller is already closed and the outcome is moot, so we swallow\n        // the rejection unconditionally; only a real, non-superseded read\n        // failure (`closed` still false) is surfaced.\n        if (!closed) {\n          controller.error(err)\n        }\n      }\n    },\n  })\n\n  // React attaches `_debugInfo` to the returned promise at runtime.\n  return createFromNextReadableStream<T>(wrapper, headers, {\n    allowPartialStream: true,\n  }) as Promise<T> & { _debugInfo?: Array<any> }\n}\n\n// Selects the Flight decode strategy: a halting wrapper for cancellable HMR\n// refreshes, otherwise the standard fetch-based decode. Gated to the dev server\n// (where HMR runs) so the wrapper is eliminated from production and\n// `--debug-prerender` bundles regardless of the flag.\nfunction decodeFlightResponse<T>(\n  fetchPromise: Promise<Response>,\n  headers: RequestHeaders,\n  signal: AbortSignal | undefined\n): Promise<T> & { _debugInfo?: Array<any> } {\n  if (\n    process.env.__NEXT_DEV_SERVER &&\n    process.env.__NEXT_SERVER_COMPONENTS_HMR_CANCELLATION &&\n    signal\n  ) {\n    return createHaltingFlightResponse<T>(fetchPromise, headers, signal)\n  }\n  return createFromNextFetch<T>(fetchPromise, headers)\n}\n\nexport async function createFetch<T>(\n  url: URL,\n  headers: RequestHeaders,\n  fetchPriority: 'auto' | 'high' | 'low' | null,\n  shouldImmediatelyDecode: boolean,\n  signal?: AbortSignal\n): Promise<RSCResponse<T>> {\n  // TODO: In output: \"export\" mode, the headers do nothing. Omit them (and the\n  // cache busting search param) from the request so they're\n  // maximally cacheable.\n\n  if (process.env.__NEXT_TEST_MODE && fetchPriority !== null) {\n    headers['Next-Test-Fetch-Priority'] = fetchPriority\n  }\n\n  const deploymentId = getDeploymentId()\n  if (deploymentId) {\n    headers['x-deployment-id'] = deploymentId\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    if (self.__next_r) {\n      headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n    }\n\n    // Create a new request ID for the server action request. The server uses\n    // this to tag debug information sent via WebSocket to the client, which\n    // then routes those chunks to the debug channel associated with this ID.\n    headers[NEXT_REQUEST_ID_HEADER] = crypto\n      .getRandomValues(new Uint32Array(1))[0]\n      .toString(16)\n  }\n\n  const fetchOptions: RequestInit = {\n    // Backwards compat for older browsers. `same-origin` is the default in modern browsers.\n    credentials: 'same-origin',\n    headers,\n    priority: fetchPriority || undefined,\n    signal,\n  }\n  // `fetchUrl` is slightly different from `url` because we add a cache-busting\n  // search param to it. This should not leak outside of this function, so we\n  // track them separately.\n  let fetchUrl = new URL(url)\n  await setCacheBustingSearchParam(fetchUrl, headers)\n  let processed = fetch(fetchUrl, fetchOptions).then(processFetch)\n  let fetchPromise = processed.then(({ response }) => response)\n\n  // Immediately pass the fetch promise to the Flight client so that the debug\n  // info includes the latency from the client to the server. The internal timer\n  // in React starts as soon as `createFromFetch` is called.\n  //\n  // The only case where we don't do this is during a prefetch, because a\n  // top-level prefetch response never blocks a navigation; if it hasn't already\n  // been written into the cache by the time the navigation happens, the router\n  // will go straight to a dynamic request.\n  let flightResponsePromise = shouldImmediatelyDecode\n    ? decodeFlightResponse<T>(fetchPromise, headers, signal)\n    : null\n  let browserResponse = await fetchPromise\n\n  // If the server responds with a redirect (e.g. 307), and the redirected\n  // location does not contain the cache busting search param set in the\n  // original request, the response is likely invalid — when following the\n  // redirect, the browser forwards the request headers, but since the cache\n  // busting search param is missing, the server will reject the request due to\n  // a mismatch.\n  //\n  // Ideally, we would be able to intercept the redirect response and perform it\n  // manually, instead of letting the browser automatically follow it, but this\n  // is not allowed by the fetch API.\n  //\n  // So instead, we must \"replay\" the redirect by fetching the new location\n  // again, but this time we'll append the cache busting search param to prevent\n  // a mismatch.\n  //\n  // TODO: We can optimize Next.js's built-in middleware APIs by returning a\n  // custom status code, to prevent the browser from automatically following it.\n  //\n  // This does not affect Server Action-based redirects; those are encoded\n  // differently, as part of the Flight body. It only affects redirects that\n  // occur in a middleware or a third-party proxy.\n\n  let redirected = browserResponse.redirected\n  if (process.env.__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS) {\n    // This is to prevent a redirect loop. Same limit used by Chrome.\n    const MAX_REDIRECTS = 20\n    for (let n = 0; n < MAX_REDIRECTS; n++) {\n      if (!browserResponse.redirected) {\n        // The server did not perform a redirect.\n        break\n      }\n      const responseUrl = new URL(browserResponse.url, fetchUrl)\n      if (responseUrl.origin !== fetchUrl.origin) {\n        // The server redirected to an external URL. The rest of the logic below\n        // is not relevant, because it only applies to internal redirects.\n        break\n      }\n      if (\n        responseUrl.searchParams.get(NEXT_RSC_UNION_QUERY) ===\n        fetchUrl.searchParams.get(NEXT_RSC_UNION_QUERY)\n      ) {\n        // The redirected URL already includes the cache busting search param.\n        // This was probably intentional. Regardless, there's no reason to\n        // issue another request to this URL because it already has the param\n        // value that we would have added below.\n        break\n      }\n      // The RSC request was redirected. Assume the response is invalid.\n      //\n      // Append the cache busting search param to the redirected URL and\n      // fetch again.\n      // TODO: We should abort the previous request.\n      fetchUrl = new URL(responseUrl)\n      await setCacheBustingSearchParam(fetchUrl, headers)\n      processed = fetch(fetchUrl, fetchOptions).then(processFetch)\n      fetchPromise = processed.then(({ response }) => response)\n      flightResponsePromise = shouldImmediatelyDecode\n        ? decodeFlightResponse<T>(fetchPromise, headers, signal)\n        : null\n      browserResponse = await fetchPromise\n      // We just performed a manual redirect, so this is now true.\n      redirected = true\n    }\n  }\n\n  // Remove the cache busting search param from the response URL, to prevent it\n  // from leaking outside of this function.\n  const responseUrl = new URL(browserResponse.url, fetchUrl)\n  responseUrl.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  const rscResponse: RSCResponse<T> = {\n    url: responseUrl.href,\n\n    // This is true if any redirects occurred, either automatically by the\n    // browser, or manually by us. So it's different from\n    // `browserResponse.redirected`, which only tells us whether the browser\n    // followed a redirect, and only for the last response in the chain.\n    redirected,\n\n    // These can be copied from the last browser response we received. We\n    // intentionally only expose the subset of fields that are actually used\n    // elsewhere in the codebase.\n    ok: browserResponse.ok,\n    headers: browserResponse.headers,\n    body: browserResponse.body,\n    status: browserResponse.status,\n\n    // This is the exact promise returned by `createFromFetch`. It contains\n    // debug information that we need to transfer to any derived promises that\n    // are later rendered by React.\n    flightResponsePromise: flightResponsePromise,\n\n    cacheData: processed.then(({ cacheData }) => cacheData),\n  }\n\n  return rscResponse\n}\n\nexport function createFromNextReadableStream<T>(\n  flightStream: ReadableStream<Uint8Array>,\n  requestHeaders: RequestHeaders | undefined,\n  options?: { allowPartialStream?: boolean }\n): Promise<T> {\n  return createFromReadableStream(flightStream, {\n    callServer,\n    findSourceMapURL,\n    debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n    unstable_allowPartialStream: options?.allowPartialStream,\n  })\n}\n\nfunction createFromNextFetch<T>(\n  promiseForResponse: Promise<Response>,\n  requestHeaders: RequestHeaders\n): Promise<T> & { _debugInfo?: Array<any> } {\n  return createFromFetch(promiseForResponse, {\n    callServer,\n    findSourceMapURL,\n    debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n  })\n}\n","import type {\n  CacheNodeSeedData,\n  FlightRouterState,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData, ScrollRef } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport {\n  PAGE_SEGMENT_KEY,\n  DEFAULT_SEGMENT_KEY,\n  NOT_FOUND_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { fetchServerResponse } from './fetch-server-response'\nimport { dispatchAppRouterAction } from '../use-action-queue'\nimport {\n  ACTION_SERVER_PATCH,\n  type ServerPatchAction,\n} from './router-reducer-types'\nimport { isNavigatingToNewRootLayout } from './is-navigating-to-new-root-layout'\nimport { getLastCommittedTree } from './reducers/committed-state'\nimport {\n  convertServerPatchToFullTree,\n  type NavigationSeed,\n} from '../segment-cache/navigation'\nimport {\n  segmentCacheMap,\n  type SegmentCacheEntry,\n  type RouteTree,\n  type RefreshState,\n  type FulfilledRouteCacheEntry,\n  convertReusedFlightRouterStateToRouteTree,\n  readSegmentCacheEntryForNavigation,\n  waitForSegmentCacheEntry,\n  markRouteEntryAsDynamicRewrite,\n  invalidateRouteCacheEntries,\n  resolveStaleAt,\n  writePrerenderResponseIntoCache,\n  processRuntimePrefetchStream,\n  writeDynamicRenderResponseIntoCache,\n  EntryStatus,\n} from '../segment-cache/cache'\nimport { FetchStrategy } from '../segment-cache/types'\nimport { discoverKnownRoute } from '../segment-cache/optimistic-routes'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport { urlSearchParamsToParsedUrlQuery } from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport type { CacheMap } from '../segment-cache/cache-map'\nimport {\n  getRenderedSearchFromVaryPath,\n  type PageVaryPath,\n} from '../segment-cache/vary-path'\nimport {\n  readFromBFCache,\n  readFromBFCacheDuringRegularNavigation,\n  writeToBFCache,\n  writeHeadToBFCache,\n  updateBFCacheEntryStaleAt,\n  computeDynamicStaleAt,\n} from '../segment-cache/bfcache'\n\n// This is yet another tree type that is used to track pending promises that\n// need to be fulfilled once the dynamic data is received. The terminal nodes of\n// this tree represent the new Cache Node trees that were created during this\n// request. We can't use the Cache Node tree or Route State tree directly\n// because those include reused nodes, too. This tree is discarded as soon as\n// the navigation response is received.\nexport type NavigationTask = {\n  status: NavigationTaskStatus\n  // The router state that corresponds to the tree that this Task represents.\n  route: FlightRouterState\n  // The CacheNode that corresponds to the tree that this Task represents.\n  node: CacheNode\n  // The tree sent to the server during the dynamic request. If all the segments\n  // are static, then this will be null, and no server request is required.\n  // Otherwise, this is the same as `route`, except with the `refetch` marker\n  // set on the top-most segment that needs to be fetched.\n  dynamicRequestTree: FlightRouterState | null\n  // The URL that should be used to fetch the dynamic data. This is only set\n  // when the segment cannot be refetched from the current route, because it's\n  // part of a \"default\" parallel slot that was reused during a navigation.\n  refreshState: RefreshState | null\n  children: Map<string, NavigationTask> | null\n}\n\nexport const enum FreshnessPolicy {\n  Default,\n  Hydration,\n  HistoryTraversal,\n  RefreshAll,\n  HMRRefresh,\n  Gesture,\n}\n\nconst enum NavigationTaskStatus {\n  Pending,\n  Fulfilled,\n  Rejected,\n}\n\n/**\n * When a NavigationTask finishes, there may or may not be data still missing,\n * necessitating a retry.\n */\nconst enum NavigationTaskExitStatus {\n  /**\n   * The request was superseded by a newer navigation and aborted. No retry is\n   * needed; the newer request owns the tree from here.\n   */\n  Canceled = -1,\n  /**\n   * No additional navigation is required.\n   */\n  Done = 0,\n  /**\n   * Some data failed to load, presumably due to a route tree mismatch. Perform\n   * a soft retry to reload the entire tree (re-fetching the dynamic data).\n   */\n  SoftRetry = 1,\n  /**\n   * Some data failed to load in an unrecoverable way, e.g. in an inactive\n   * parallel route. Fall back to a hard (MPA-style) retry.\n   */\n  HardRetry = 2,\n  /**\n   * The route tree matched, but the request was redirected, so the navigation\n   * committed the wrong canonical URL. The route cache is no longer reliable\n   * (the redirect implies a server change the prediction couldn't account for),\n   * so we re-resolve the route — but the data we already received is correct, so\n   * the retry reuses it instead of re-fetching.\n   */\n  RedirectRetry = 3,\n}\n\nexport type NavigationRequestAccumulation = {\n  separateRefreshUrls: Set<string> | null\n  /**\n   * Set when a navigation creates new leaf segments that should be\n   * scrolled to. Stays null when no new segments are created (e.g.\n   * during a refresh where the route structure didn't change).\n   */\n  scrollRef: ScrollRef | null\n}\n\n/**\n * A locked navigation's withheld-data gate, for the Instant Navigation Testing\n * API. Captured — as an immutable promise — when the navigation begins (via\n * `beginLockedNavigation`) or when router work spawns a dynamic write outside\n * a navigation (via `getCurrentNavigationLock`), and threaded to the write,\n * which awaits it before applying dynamic data. Resolves when a newer locked\n * navigation begins or the lock is released. Because the capture happens at\n * spawn time, a newer navigation's rollover releases this write rather than\n * re-gating it. Threaded as `NavigationLock | null`; null whenever the testing\n * API is not active.\n */\nexport type NavigationLock = Promise<void>\n\nconst noop = () => {}\n\nexport function createInitialCacheNodeForHydration(\n  navigatedAt: number,\n  initialTree: RouteTree,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData,\n  seedDynamicStaleAt: number\n): NavigationTask {\n  // Create the initial cache node tree, using the data embedded into the\n  // HTML document.\n  const accumulation: NavigationRequestAccumulation = {\n    separateRefreshUrls: null,\n    scrollRef: null,\n  }\n  const restrictToShell = false\n  const task = createCacheNodeOnNavigation(\n    navigatedAt,\n    initialTree,\n    null,\n    FreshnessPolicy.Hydration,\n    seedData,\n    seedHead,\n    seedDynamicStaleAt,\n    false,\n    accumulation,\n    // Hydration is bound to the shared map.\n    segmentCacheMap,\n    restrictToShell\n  )\n  return task\n}\n\n// Creates a new Cache Node tree (i.e. copy-on-write) that represents the\n// optimistic result of a navigation, using both the current Cache Node tree and\n// data that was prefetched prior to navigation.\n//\n// At the moment we call this function, we haven't yet received the navigation\n// response from the server. It could send back something completely different\n// from the tree that was prefetched — due to rewrites, default routes, parallel\n// routes, etc.\n//\n// But in most cases, it will return the same tree that we prefetched, just with\n// the dynamic holes filled in. So we optimistically assume this will happen,\n// and accept that the real result could be arbitrarily different.\n//\n// We'll reuse anything that was already in the previous tree, since that's what\n// the server does.\n//\n// New segments (ones that don't appear in the old tree) are assigned an\n// unresolved promise. The data for these promises will be fulfilled later, when\n// the navigation response is received.\n//\n// The tree can be rendered immediately after it is created (that's why this is\n// a synchronous function). Any new trees that do not have prefetch data will\n// suspend during rendering, until the dynamic data streams in.\n//\n// Returns a Task object, which contains both the updated Cache Node and a path\n// to the pending subtrees that need to be resolved by the navigation response.\n//\n// A return value of `null` means there were no changes, and the previous tree\n// can be reused without initiating a server request.\nexport function startPPRNavigation(\n  navigatedAt: number,\n  oldUrl: URL,\n  oldRenderedSearch: string,\n  oldCacheNode: CacheNode | null,\n  oldRouterState: FlightRouterState,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  isSamePageNavigation: boolean,\n  accumulation: NavigationRequestAccumulation,\n  // The segment cache map this navigation is bound to: a locked navigation's\n  // driving-task map, or the shared map. See `segmentCacheMap` in cache.ts.\n  map: CacheMap<SegmentCacheEntry>,\n  // Instant Navigation Testing API only — restricts segment reads to shell\n  // entries. Always false outside the testing API. See navigation-testing-lock.\n  restrictToShell: boolean\n): NavigationTask | null {\n  const parentNeedsDynamicRequest = false\n  const parentRefreshState = null\n  const oldRootRefreshState: RefreshState = {\n    canonicalUrl: createHrefFromUrl(oldUrl),\n    renderedSearch: oldRenderedSearch as NormalizedSearch,\n  }\n  return updateCacheNodeOnNavigation(\n    navigatedAt,\n    oldUrl,\n    oldCacheNode !== null ? oldCacheNode : undefined,\n    oldRouterState,\n    newRouteTree,\n    newMetadataVaryPath,\n    freshness,\n    seedData,\n    seedHead,\n    seedDynamicStaleAt,\n    isSamePageNavigation,\n    parentNeedsDynamicRequest,\n    oldRootRefreshState,\n    parentRefreshState,\n    accumulation,\n    map,\n    restrictToShell\n  )\n}\n\nfunction updateCacheNodeOnNavigation(\n  navigatedAt: number,\n  oldUrl: URL,\n  oldCacheNode: CacheNode | void,\n  oldRouterState: FlightRouterState,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  isSamePageNavigation: boolean,\n  parentNeedsDynamicRequest: boolean,\n  oldRootRefreshState: RefreshState,\n  parentRefreshState: RefreshState | null,\n  accumulation: NavigationRequestAccumulation,\n  map: CacheMap<SegmentCacheEntry>,\n  // Instant Navigation Testing API only — restricts segment reads to shell\n  // entries. Always false outside the testing API. See navigation-testing-lock.\n  restrictToShell: boolean\n): NavigationTask | null {\n  // Check if this segment matches the one in the previous route. A\n  // search-param-only difference at a page segment falls through to the\n  // matched branch — the CacheNode is rebuilt (so data refetches), but the\n  // bfcacheId carries forward as if the segment had matched.\n  const oldSegment = oldRouterState[0]\n  const newSegment = createSegmentFromRouteTree(newRouteTree)\n  const segmentMatchKind = compareSegments(newSegment, oldSegment)\n  if (segmentMatchKind === SegmentMatchKind.Change) {\n    // This segment does not match the previous route. We're now entering the\n    // new part of the target route. Switch to the \"create\" path.\n    if (\n      // Check if the route tree changed before we reached a layout. (The\n      // highest-level layout in a route tree is referred to as the \"root\"\n      // layout.) This could mean that we're navigating between two different\n      // root layouts. When this happens, we perform a full-page (MPA-style)\n      // navigation.\n      //\n      // However, the algorithm for deciding where to start rendering a route\n      // (i.e. the one performed in order to reach this function) is stricter\n      // than the one used to detect a change in the root layout. So just\n      // because we're re-rendering a segment outside of the root layout does\n      // not mean we should trigger a full-page navigation.\n      //\n      // Specifically, we handle dynamic parameters differently: two segments\n      // are considered the same even if their parameter values are different.\n      //\n      // Refer to isNavigatingToNewRootLayout for details.\n      //\n      // Note that we only have to perform this extra traversal if this changed\n      // segment is still at or above the root layout (IsRootLayoutOrAbove);\n      // once we've descended past the root layout, a segment change can't alter\n      // the root layout. We also only need to compare the subtree that is not\n      // shared. In the common case, this branch is skipped completely.\n      ((newRouteTree.prefetchHints & PrefetchHint.IsRootLayoutOrAbove) !== 0 &&\n        isNavigatingToNewRootLayout(oldRouterState, newRouteTree)) ||\n      // The global Not Found route (app/global-not-found.tsx) is a special\n      // case, because it acts like a root layout, but in the router tree, it\n      // is rendered in the same position as app/layout.tsx.\n      //\n      // Any navigation to the global Not Found route should trigger a\n      // full-page navigation.\n      //\n      // TODO: We should probably model this by changing the key of the root\n      // segment when this happens. Then the root layout check would work\n      // as expected, without a special case.\n      newSegment === NOT_FOUND_SEGMENT_KEY\n    ) {\n      return null\n    }\n    return createCacheNodeOnNavigation(\n      navigatedAt,\n      newRouteTree,\n      newMetadataVaryPath,\n      freshness,\n      seedData,\n      seedHead,\n      seedDynamicStaleAt,\n      parentNeedsDynamicRequest,\n      accumulation,\n      map,\n      restrictToShell\n    )\n  }\n\n  const newSlots = newRouteTree.slots\n  const oldRouterStateChildren = oldRouterState[1]\n  const seedDataChildren = seedData !== null ? seedData[1] : null\n\n  let shouldRefreshDynamicData: boolean = false\n  switch (freshness) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.HistoryTraversal:\n    case FreshnessPolicy.Hydration:\n    case FreshnessPolicy.Gesture:\n      shouldRefreshDynamicData = false\n      break\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      shouldRefreshDynamicData = true\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n\n  // TODO: We're not consistent about how we do this check. Some places\n  // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to\n  // check if there any any children, which is why I'm doing it here. We\n  // should probably encode an empty children set as `null` though. Either\n  // way, we should update all the checks to be consistent.\n  const isLeafSegment = newSlots === null\n\n  // Get the data for this segment. Since it was part of the previous route,\n  // usually we just clone the data from the old CacheNode. However, during a\n  // refresh or a revalidation, there won't be any existing CacheNode. So we\n  // may need to consult the prefetch cache, like we would for a new segment.\n  let newCacheNode: CacheNode\n  let needsDynamicRequest: boolean\n  if (\n    oldCacheNode !== undefined &&\n    !shouldRefreshDynamicData &&\n    // During a same-page navigation, we always refetch the page segments\n    !(isLeafSegment && isSamePageNavigation) &&\n    // A search-param-only change is treated as a refresh of the page segment.\n    // The internal cache key of the data is different, but the identity of\n    // the node in the route tree is the same.\n    segmentMatchKind !== SegmentMatchKind.SearchParamOnlyChange\n  ) {\n    // Reuse the existing CacheNode\n    const dropPrefetchRsc = false\n    newCacheNode = reuseSharedCacheNode(dropPrefetchRsc, oldCacheNode)\n    needsDynamicRequest = false\n  } else {\n    // If this is part of a refresh, ignore the existing CacheNode and create a\n    // new one.\n    const seedRsc = seedData !== null ? seedData[0] : null\n    const result = createCacheNodeForSegment(\n      navigatedAt,\n      newRouteTree,\n      seedRsc,\n      newMetadataVaryPath,\n      seedHead,\n      freshness,\n      seedDynamicStaleAt,\n      // Carry forward the existing bfcacheId when there's a prior CacheNode:\n      // even though the data is being refreshed, the state identity of the\n      // route hasn't changed. Otherwise (no prior node) mint a fresh one.\n      oldCacheNode !== undefined\n        ? oldCacheNode.bfcacheId\n        : generateBFCacheId(freshness),\n      map,\n      restrictToShell\n    )\n    newCacheNode = result.cacheNode\n    needsDynamicRequest = result.needsDynamicRequest\n\n    // Scroll handling\n    if (\n      isLeafSegment &&\n      segmentMatchKind === SegmentMatchKind.SearchParamOnlyChange\n    ) {\n      // Special case: A search param change mostly acts the same as a\n      // refresh, except it does trigger a scroll.\n      accumulateScrollRef(freshness, newCacheNode, accumulation)\n    } else {\n      // Normal case: This is a refresh of an existing segment. Carry forward\n      // the old node's scrollRef. This preserves scroll intent when a prior\n      // navigation's CacheNode is replaced by a refresh before the scroll\n      // handler has had a chance to fire — e.g. when router.push() and\n      // router.refresh() are called in the same startTransition batch.\n      if (oldCacheNode !== undefined) {\n        newCacheNode.scrollRef = oldCacheNode.scrollRef\n      }\n    }\n  }\n\n  // During a refresh navigation, there's a special case that happens when\n  // entering a \"default\" slot. The default slot may not be part of the\n  // current route; it may have been reused from an older route. If so,\n  // we need to fetch its data from the old route's URL rather than current\n  // route's URL. Keep track of this as we traverse the tree.\n  const maybeRefreshState = newRouteTree.refreshState\n  const refreshState =\n    maybeRefreshState !== undefined && maybeRefreshState !== null\n      ? // This segment is not present in the current route. Track its\n        // refresh URL as we continue traversing the tree.\n        maybeRefreshState\n      : // Inherit the refresh URL from the parent.\n        parentRefreshState\n\n  // If this segment itself needs to fetch new data from the server, then by\n  // definition it is being refreshed. Track its refresh URL so we know which\n  // URL to request the data from.\n  if (needsDynamicRequest && refreshState !== null) {\n    accumulateRefreshUrl(accumulation, refreshState)\n  }\n\n  // As we diff the trees, we may sometimes modify (copy-on-write, not mutate)\n  // the Route Tree that was returned by the server — for example, in the case\n  // of default parallel routes, we preserve the currently active segment. To\n  // avoid mutating the original tree, we clone the router state children along\n  // the return path.\n  let patchedRouterStateChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n  let taskChildren = null\n\n  // Most navigations require a request to fetch additional data from the\n  // server, either because the data was not already prefetched, or because the\n  // target route contains dynamic data that cannot be prefetched.\n  //\n  // However, if the target route is fully static, and it's already completely\n  // loaded into the segment cache, then we can skip the server request.\n  //\n  // This starts off as `false`, and is set to `true` if any of the child\n  // routes requires a dynamic request.\n  let childNeedsDynamicRequest = false\n  // As we traverse the children, we'll construct a FlightRouterState that can\n  // be sent to the server to request the dynamic data. If it turns out that\n  // nothing in the subtree is dynamic (i.e. childNeedsDynamicRequest is false\n  // at the end), then this will be discarded.\n  // TODO: We can probably optimize the format of this data structure to only\n  // include paths that are dynamic. Instead of reusing the\n  // FlightRouterState type.\n  let dynamicRequestTreeChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n\n  let newCacheNodeSlots: Record<string, CacheNode> | null = null\n  if (newSlots !== null) {\n    const oldCacheNodeSlots =\n      oldCacheNode !== undefined ? oldCacheNode.slots : null\n\n    newCacheNode.slots = newCacheNodeSlots = {}\n    taskChildren = new Map()\n    for (let [parallelRouteKey, newRouteTreeChild] of newSlots) {\n      const oldRouterStateChild: FlightRouterState | void =\n        oldRouterStateChildren[parallelRouteKey]\n      if (oldRouterStateChild === undefined) {\n        // This should never happen, but if it does, it suggests a malformed\n        // server response. Trigger a full-page navigation.\n        return null\n      }\n\n      let seedDataChild: CacheNodeSeedData | void | null =\n        seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n      const oldSegmentChild = oldRouterStateChild[0]\n      let newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild)\n      let seedHeadChild = seedHead\n      if (\n        // Skip this branch during a history traversal. We restore the tree that\n        // was stashed in the history entry as-is.\n        freshness !== FreshnessPolicy.HistoryTraversal &&\n        newSegmentChild === DEFAULT_SEGMENT_KEY &&\n        oldSegmentChild !== DEFAULT_SEGMENT_KEY\n      ) {\n        // This is a \"default\" segment. These are never sent by the server during\n        // a soft navigation; instead, the client reuses whatever segment was\n        // already active in that slot on the previous route.\n        newRouteTreeChild = reuseActiveSegmentInDefaultSlot(\n          newRouteTree,\n          parallelRouteKey,\n          oldRootRefreshState,\n          oldRouterStateChild\n        )\n        newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild)\n\n        // Since we're switching to a different route tree, these are no\n        // longer valid, because they correspond to the outer tree.\n        seedDataChild = null\n        seedHeadChild = null\n      }\n\n      const oldCacheNodeChild =\n        oldCacheNodeSlots !== null\n          ? oldCacheNodeSlots[parallelRouteKey]\n          : undefined\n\n      const taskChild = updateCacheNodeOnNavigation(\n        navigatedAt,\n        oldUrl,\n        oldCacheNodeChild,\n        oldRouterStateChild,\n        newRouteTreeChild,\n        newMetadataVaryPath,\n        freshness,\n        seedDataChild ?? null,\n        seedHeadChild,\n        seedDynamicStaleAt,\n        isSamePageNavigation,\n        parentNeedsDynamicRequest || needsDynamicRequest,\n        oldRootRefreshState,\n        refreshState,\n        accumulation,\n        map,\n        restrictToShell\n      )\n\n      if (taskChild === null) {\n        // One of the child tasks discovered a change to the root layout.\n        // Immediately unwind from this recursive traversal. This will trigger a\n        // full-page navigation.\n        return null\n      }\n\n      // Recursively propagate up the child tasks.\n      taskChildren.set(parallelRouteKey, taskChild)\n      newCacheNodeSlots[parallelRouteKey] = taskChild.node\n\n      // The child tree's route state may be different from the prefetched\n      // route sent by the server. We need to clone it as we traverse back up\n      // the tree.\n      const taskChildRoute = taskChild.route\n      patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n      const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n      if (dynamicRequestTreeChild !== null) {\n        // Something in the child tree is dynamic.\n        childNeedsDynamicRequest = true\n        dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n      } else {\n        dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n      }\n    }\n  }\n\n  const newFlightRouterState: FlightRouterState = [\n    createSegmentFromRouteTree(newRouteTree),\n    patchedRouterStateChildren,\n    refreshState !== null\n      ? [refreshState.canonicalUrl, refreshState.renderedSearch]\n      : null,\n    null,\n    newRouteTree.prefetchHints,\n  ]\n\n  return {\n    status: needsDynamicRequest\n      ? NavigationTaskStatus.Pending\n      : NavigationTaskStatus.Fulfilled,\n    route: newFlightRouterState,\n    node: newCacheNode,\n    dynamicRequestTree: createDynamicRequestTree(\n      newFlightRouterState,\n      dynamicRequestTreeChildren,\n      needsDynamicRequest,\n      childNeedsDynamicRequest,\n      parentNeedsDynamicRequest\n    ),\n    refreshState,\n    children: taskChildren,\n  }\n}\n\n/**\n * Assigns a ScrollRef to a new leaf CacheNode so the scroll handler\n * knows to scroll to it after navigation. All leaves in the same\n * navigation share the same ScrollRef — the first segment to scroll\n * consumes it, preventing others from also scrolling.\n *\n * This is only called inside `createCacheNodeOnNavigation`, which only\n * runs when segments diverge from the previous route. So for a refresh\n * where the route structure stays the same, segments match, the update\n * path is taken, and this function is never called — no scroll ref is\n * assigned. A scroll ref is only assigned when the route actually\n * changed (e.g. a redirect, or a dynamic condition on the server that\n * produces a different route).\n *\n * Skipped during hydration (initial render should not scroll) and\n * history traversal (scroll restoration is handled separately).\n */\nfunction accumulateScrollRef(\n  freshness: FreshnessPolicy,\n  cacheNode: CacheNode,\n  accumulation: NavigationRequestAccumulation\n): void {\n  switch (freshness) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.Gesture:\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      if (accumulation.scrollRef === null) {\n        accumulation.scrollRef = { current: true }\n      }\n      cacheNode.scrollRef = accumulation.scrollRef\n      break\n    case FreshnessPolicy.Hydration:\n      // Initial render — no scroll.\n      break\n    case FreshnessPolicy.HistoryTraversal:\n      // Back/forward — scroll restoration is handled separately.\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n}\n\nfunction createCacheNodeOnNavigation(\n  navigatedAt: number,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  parentNeedsDynamicRequest: boolean,\n  accumulation: NavigationRequestAccumulation,\n  map: CacheMap<SegmentCacheEntry>,\n  // Instant Navigation Testing API only — restricts segment reads to shell\n  // entries. Always false outside the testing API. See navigation-testing-lock.\n  restrictToShell: boolean\n): NavigationTask {\n  // Same traversal as updateCacheNodeNavigation, but simpler. We switch to this\n  // path once we reach the part of the tree that was not in the previous route.\n  // We don't need to diff against the old tree, we just need to create a new\n  // one. We also don't need to worry about any refresh-related logic.\n  //\n  // For the most part, this is a subset of updateCacheNodeOnNavigation, so any\n  // change that happens in this function likely needs to be applied to that\n  // one, too. However there are some places where the behavior intentionally\n  // diverges, which is why we keep them separate.\n\n  const newSegment = createSegmentFromRouteTree(newRouteTree)\n\n  const newSlots = newRouteTree.slots\n  const seedDataChildren = seedData !== null ? seedData[1] : null\n\n  const seedRsc = seedData !== null ? seedData[0] : null\n  const result = createCacheNodeForSegment(\n    navigatedAt,\n    newRouteTree,\n    seedRsc,\n    newMetadataVaryPath,\n    seedHead,\n    freshness,\n    seedDynamicStaleAt,\n    // This segment was not part of the previous route, so mint a fresh\n    // bfcacheId.\n    generateBFCacheId(freshness),\n    map,\n    restrictToShell\n  )\n  const newCacheNode = result.cacheNode\n  const needsDynamicRequest = result.needsDynamicRequest\n\n  const isLeafSegment = newSlots === null\n  if (isLeafSegment) {\n    accumulateScrollRef(freshness, newCacheNode, accumulation)\n  }\n\n  let patchedRouterStateChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n  let taskChildren = null\n\n  let childNeedsDynamicRequest = false\n  let dynamicRequestTreeChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n\n  let newCacheNodeSlots: Record<string, CacheNode> | null = null\n  if (newSlots !== null) {\n    newCacheNode.slots = newCacheNodeSlots = {}\n    taskChildren = new Map()\n    for (const [parallelRouteKey, newRouteTreeChild] of newSlots) {\n      const seedDataChild: CacheNodeSeedData | void | null =\n        seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n      const taskChild = createCacheNodeOnNavigation(\n        navigatedAt,\n        newRouteTreeChild,\n        newMetadataVaryPath,\n        freshness,\n        seedDataChild ?? null,\n        seedHead,\n        seedDynamicStaleAt,\n        parentNeedsDynamicRequest || needsDynamicRequest,\n        accumulation,\n        map,\n        restrictToShell\n      )\n\n      taskChildren.set(parallelRouteKey, taskChild)\n      newCacheNodeSlots[parallelRouteKey] = taskChild.node\n\n      const taskChildRoute = taskChild.route\n      patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n      const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n      if (dynamicRequestTreeChild !== null) {\n        childNeedsDynamicRequest = true\n        dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n      } else {\n        dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n      }\n    }\n  }\n\n  const newFlightRouterState: FlightRouterState = [\n    newSegment,\n    patchedRouterStateChildren,\n    null,\n    null,\n    newRouteTree.prefetchHints,\n  ]\n\n  return {\n    status: needsDynamicRequest\n      ? NavigationTaskStatus.Pending\n      : NavigationTaskStatus.Fulfilled,\n    route: newFlightRouterState,\n    node: newCacheNode,\n    dynamicRequestTree: createDynamicRequestTree(\n      newFlightRouterState,\n      dynamicRequestTreeChildren,\n      needsDynamicRequest,\n      childNeedsDynamicRequest,\n      parentNeedsDynamicRequest\n    ),\n    // This route is not part of the current tree, so there's no reason to\n    // track the refresh URL.\n    refreshState: null,\n    children: taskChildren,\n  }\n}\n\nfunction createSegmentFromRouteTree(newRouteTree: RouteTree): Segment {\n  if (newRouteTree.isPage) {\n    // In a dynamic server response, the server embeds the search params into\n    // the segment key, but in a static one it's omitted. The client handles\n    // this inconsistency by adding the search params back right at the end.\n    //\n    // TODO: The only thing this is used for is to create a cache key for\n    // ChildSegmentMap. But we already track the `renderedSearch` everywhere as\n    // part of the varyPath. The plan is get rid of ChildSegmentMap and\n    // store the page data in a CacheMap using the varyPath, like we do\n    // for prefetches. Then we can remove it from the segment key.\n    //\n    // As an incremental step, we can grab the search params from the varyPath.\n    const renderedSearch = getRenderedSearchFromVaryPath(newRouteTree.varyPath)\n    if (renderedSearch === null) {\n      return PAGE_SEGMENT_KEY\n    }\n    // This is based on equivalent logic in addSearchParamsIfPageSegment, used\n    // on the server.\n    const stringifiedQuery = JSON.stringify(\n      urlSearchParamsToParsedUrlQuery(new URLSearchParams(renderedSearch))\n    )\n    return stringifiedQuery !== '{}'\n      ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n      : PAGE_SEGMENT_KEY\n  }\n  return newRouteTree.segment\n}\n\nfunction patchRouterStateWithNewChildren(\n  baseRouterState: FlightRouterState,\n  newChildren: { [parallelRouteKey: string]: FlightRouterState }\n): FlightRouterState {\n  const clone: FlightRouterState = [baseRouterState[0], newChildren]\n  // Based on equivalent logic in apply-router-state-patch-to-tree, but should\n  // confirm whether we need to copy all of these fields. Not sure the server\n  // ever sends, e.g. the refetch marker.\n  if (2 in baseRouterState) {\n    clone[2] = baseRouterState[2]\n  }\n  if (3 in baseRouterState) {\n    clone[3] = baseRouterState[3]\n  }\n  if (4 in baseRouterState) {\n    clone[4] = baseRouterState[4]\n  }\n  return clone\n}\n\nfunction createDynamicRequestTree(\n  newRouterState: FlightRouterState,\n  dynamicRequestTreeChildren: Record<string, FlightRouterState>,\n  needsDynamicRequest: boolean,\n  childNeedsDynamicRequest: boolean,\n  parentNeedsDynamicRequest: boolean\n): FlightRouterState | null {\n  // Create a FlightRouterState that instructs the server how to render the\n  // requested segment.\n  //\n  // Or, if neither this segment nor any of the children require a new data,\n  // then we return `null` to skip the request.\n  let dynamicRequestTree: FlightRouterState | null = null\n  if (needsDynamicRequest) {\n    dynamicRequestTree = patchRouterStateWithNewChildren(\n      newRouterState,\n      dynamicRequestTreeChildren\n    )\n    // The \"refetch\" marker is set on the top-most segment that requires new\n    // data. We can omit it if a parent was already marked.\n    if (!parentNeedsDynamicRequest) {\n      dynamicRequestTree[3] = 'refetch'\n    }\n  } else if (childNeedsDynamicRequest) {\n    // This segment does not request new data, but at least one of its\n    // children does.\n    dynamicRequestTree = patchRouterStateWithNewChildren(\n      newRouterState,\n      dynamicRequestTreeChildren\n    )\n  } else {\n    dynamicRequestTree = null\n  }\n  return dynamicRequestTree\n}\n\nfunction accumulateRefreshUrl(\n  accumulation: NavigationRequestAccumulation,\n  refreshState: RefreshState\n) {\n  // This is a refresh navigation, and we're inside a \"default\" slot that's\n  // not part of the current route; it was reused from an older route. In\n  // order to get fresh data for this reused route, we need to issue a\n  // separate request using the old route's URL.\n  //\n  // Track these extra URLs in the accumulated result. Later, we'll construct\n  // an appropriate request for each unique URL in the final set. The reason\n  // we don't do it immediately here is so we can deduplicate multiple\n  // instances of the same URL into a single request. See\n  // listenForDynamicRequest for more details.\n  const refreshUrl = refreshState.canonicalUrl\n  const separateRefreshUrls = accumulation.separateRefreshUrls\n  if (separateRefreshUrls === null) {\n    accumulation.separateRefreshUrls = new Set([refreshUrl])\n  } else {\n    separateRefreshUrls.add(refreshUrl)\n  }\n}\n\nfunction reuseActiveSegmentInDefaultSlot(\n  parentRouteTree: RouteTree,\n  parallelRouteKey: string,\n  oldRootRefreshState: RefreshState,\n  oldRouterState: FlightRouterState\n): RouteTree {\n  // This is a \"default\" segment. These are never sent by the server during a\n  // soft navigation; instead, the client reuses whatever segment was already\n  // active in that slot on the previous route. This means if we later need to\n  // refresh the segment, it will have to be refetched from the previous route's\n  // URL. We store it in the Flight Router State.\n\n  let reusedUrl: string\n  let reusedRenderedSearch: NormalizedSearch\n  const oldRefreshState = oldRouterState[2]\n  if (oldRefreshState !== undefined && oldRefreshState !== null) {\n    // This segment was already reused from an even older route. Keep its\n    // existing URL and refresh state.\n    reusedUrl = oldRefreshState[0]\n    reusedRenderedSearch = oldRefreshState[1] as NormalizedSearch\n  } else {\n    // Since this route didn't already have a refresh state, it must have been\n    // reachable from the root of the old route. So we use the refresh state\n    // that represents the old route.\n    reusedUrl = oldRootRefreshState.canonicalUrl\n    reusedRenderedSearch = oldRootRefreshState.renderedSearch\n  }\n\n  const acc = { metadataVaryPath: null, treeDivergedFromBase: false }\n  const reusedRouteTree = convertReusedFlightRouterStateToRouteTree(\n    parentRouteTree,\n    parallelRouteKey,\n    oldRouterState,\n    reusedRenderedSearch,\n    acc\n  )\n  reusedRouteTree.refreshState = {\n    canonicalUrl: reusedUrl,\n    renderedSearch: reusedRenderedSearch,\n  }\n  return reusedRouteTree\n}\n\nfunction reuseSharedCacheNode(\n  dropPrefetchRsc: boolean,\n  existingCacheNode: CacheNode\n): CacheNode {\n  // Clone the CacheNode that was already present in the previous tree.\n  // Carry forward the scrollRef so scroll intent from a prior navigation\n  // survives tree rebuilds (e.g. push + refresh in the same batch).\n  // Carry forward the bfcacheId so shared-layout segments retain stable\n  // identity across navigations.\n  return createCacheNode(\n    existingCacheNode.rsc,\n    dropPrefetchRsc ? null : existingCacheNode.prefetchRsc,\n    existingCacheNode.head,\n    dropPrefetchRsc ? null : existingCacheNode.prefetchHead,\n    existingCacheNode.bfcacheId,\n    existingCacheNode.scrollRef\n  )\n}\n\nfunction createCacheNodeForSegment(\n  now: number,\n  tree: RouteTree,\n  seedRsc: React.ReactNode | null,\n  metadataVaryPath: PageVaryPath | null,\n  seedHead: HeadData | null,\n  freshness: FreshnessPolicy,\n  dynamicStaleAt: number,\n  bfcacheId: number,\n  map: CacheMap<SegmentCacheEntry>,\n  // Instant Navigation Testing API only — restricts segment reads to shell\n  // entries. Always false outside the testing API. See navigation-testing-lock.\n  restrictToShell: boolean\n): { cacheNode: CacheNode; needsDynamicRequest: boolean } {\n  // Construct a new CacheNode using data from the BFCache, the client's\n  // Segment Cache, or seeded from a server response.\n  //\n  // If there's a cache miss, or if we only have a partial hit, we'll render\n  // the partial state immediately, and spawn a request to the server to fill\n  // in the missing data.\n  //\n  // If the segment is fully cached on the client already, we can omit this\n  // segment from the server request.\n  //\n  // If we already have a dynamic data response associated with this navigation,\n  // as in the case of a Server Action-initiated redirect or refresh, we may\n  // also be able to use that data without spawning a new request. (This is\n  // referred to as the \"seed\" data.)\n\n  const isPage = tree.isPage\n\n  // During certain kinds of navigations, we may be able to render from\n  // the BFCache.\n  switch (freshness) {\n    case FreshnessPolicy.Default: {\n      // Check BFCache during regular navigations. The entry's staleAt\n      // determines whether it's still fresh. This is used when\n      // staleTimes.dynamic is configured globally or when a page exports\n      // unstable_dynamicStaleTime for per-page control.\n      const bfcacheEntry = readFromBFCacheDuringRegularNavigation(\n        now,\n        tree.varyPath\n      )\n      if (bfcacheEntry !== null) {\n        // A regular navigation that happens to read cached data is still a\n        // fresh navigation, so we use the caller-supplied bfcacheId — the\n        // BFCacheEntry's id is only restored on history-traversal\n        // navigations.\n        return {\n          cacheNode: createCacheNode(\n            bfcacheEntry.rsc,\n            bfcacheEntry.prefetchRsc,\n            bfcacheEntry.head,\n            bfcacheEntry.prefetchHead,\n            bfcacheId\n          ),\n          needsDynamicRequest: false,\n        }\n      }\n      break\n    }\n    case FreshnessPolicy.Hydration: {\n      // This is not related to the BFCache but it is a special case.\n      //\n      // We should never spawn network requests during hydration. We must treat\n      // the initial payload as authoritative, because the initial page load is\n      // used as a last-ditch mechanism for recovering the app.\n      //\n      // This is also an important safety check because if this leaks into the\n      // server rendering path (which theoretically it never should because the\n      // server payload should be consistent), the server would hang because these\n      // promises would never resolve.\n      //\n      // TODO: There is an existing case where the global \"not found\" boundary\n      // triggers this path. But it does render correctly despite that. That's an\n      // unusual render path so it's not surprising, but we should look into\n      // modeling it in a more consistent way. See also the /_notFound special\n      // case in updateCacheNodeOnNavigation.\n      const rsc = seedRsc\n      const prefetchRsc = null\n      const head = isPage ? seedHead : null\n      const prefetchHead = null\n      writeToBFCache(\n        now,\n        tree.varyPath,\n        rsc,\n        prefetchRsc,\n        head,\n        prefetchHead,\n        dynamicStaleAt,\n        bfcacheId\n      )\n      if (isPage && metadataVaryPath !== null) {\n        writeHeadToBFCache(\n          now,\n          metadataVaryPath,\n          head,\n          prefetchHead,\n          dynamicStaleAt,\n          bfcacheId\n        )\n      }\n      return {\n        cacheNode: createCacheNode(\n          rsc,\n          prefetchRsc,\n          head,\n          prefetchHead,\n          bfcacheId\n        ),\n        needsDynamicRequest: false,\n      }\n    }\n    case FreshnessPolicy.HistoryTraversal:\n      const bfcacheEntry = readFromBFCache(tree.varyPath)\n      if (bfcacheEntry !== null) {\n        // Only show prefetched data if the dynamic data is still pending. This\n        // avoids a flash back to the prefetch state in a case where it's highly\n        // likely to have already streamed in.\n        //\n        // Tehnically, what we're actually checking is whether the dynamic\n        // network response was received. But since it's a streaming response,\n        // this does not mean that all the dynamic data has fully streamed in.\n        // It just means that _some_ of the dynamic data was received. But as a\n        // heuristic, we assume that the rest dynamic data will stream in\n        // quickly, so it's still better to skip the prefetch state.\n        const oldRsc = bfcacheEntry.rsc\n        const oldRscDidResolve =\n          !isDeferredRsc(oldRsc) || oldRsc.status !== 'pending'\n        const dropPrefetchRsc = oldRscDidResolve\n        // Restore the bfcacheId from the cached entry so that back/forward\n        // navigations preserve the original id, regardless of whether\n        // `cacheComponents` Activity preservation is enabled.\n        return {\n          cacheNode: createCacheNode(\n            bfcacheEntry.rsc,\n            dropPrefetchRsc ? null : bfcacheEntry.prefetchRsc,\n            bfcacheEntry.head,\n            dropPrefetchRsc ? null : bfcacheEntry.prefetchHead,\n            bfcacheEntry.bfcacheId\n          ),\n          needsDynamicRequest: false,\n        }\n      }\n      break\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n    case FreshnessPolicy.Gesture:\n      // Don't consult the BFCache.\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n\n  let cachedRsc: React.ReactNode | null = null\n  let isCachedRscPartial: boolean = true\n\n  const segmentEntry = readSegmentCacheEntryForNavigation(\n    now,\n    map,\n    tree.varyPath,\n    restrictToShell\n  )\n  if (segmentEntry !== null) {\n    switch (segmentEntry.status) {\n      case EntryStatus.Fulfilled: {\n        // Happy path: a cache hit\n        cachedRsc = segmentEntry.rsc\n        isCachedRscPartial = segmentEntry.isPartial\n        break\n      }\n      case EntryStatus.Pending: {\n        // We haven't received data for this segment yet, but there's already\n        // an in-progress request. Since it's extremely likely to arrive\n        // before the dynamic data response, we might as well use it.\n        const promiseForFulfilledEntry = waitForSegmentCacheEntry(segmentEntry)\n        cachedRsc = promiseForFulfilledEntry.then((entry) =>\n          entry !== null ? entry.rsc : null\n        )\n        // Because the request is still pending, we typically don't know yet\n        // whether the response will be partial. We shouldn't skip this segment\n        // during the dynamic navigation request. Otherwise, we might need to\n        // do yet another request to fill in the remaining data, creating\n        // a waterfall.\n        //\n        // The one exception is if this segment is being fetched with via\n        // prefetch={true} (i.e. the \"force stale\" or \"full\" strategy). If so,\n        // we can assume the response will be full. This field is set to `false`\n        // for such segments.\n        isCachedRscPartial = segmentEntry.isPartial\n        break\n      }\n      case EntryStatus.Empty:\n      case EntryStatus.Rejected: {\n        break\n      }\n      default: {\n        segmentEntry satisfies never\n        break\n      }\n    }\n  }\n\n  // Now combine the cached data with the seed data to determine what we can\n  // render immediately, versus what needs to stream in later.\n\n  // A partial state to show immediately while we wait for the final data to\n  // arrive. If `rsc` is already a complete value (not partial), or if we\n  // don't have any useful partial state, this will be `null`.\n  let prefetchRsc: React.ReactNode | null\n  // The final, resolved segment data. If the data is missing, this will be a\n  // promise that resolves to the eventual data. A resolved value of `null`\n  // means the data failed to load; the LayoutRouter will suspend indefinitely\n  // until the router updates again (refer to finishNavigationTask).\n  let rsc: React.ReactNode | null\n  let doesSegmentNeedDynamicRequest: boolean\n\n  if (seedRsc !== null) {\n    // We already have a dynamic server response for this segment.\n    if (isCachedRscPartial) {\n      // The seed data may still be streaming in, so it's worth showing the\n      // partial cached state in the meantime.\n      prefetchRsc = cachedRsc\n      rsc = seedRsc\n    } else {\n      // We already have a completely cached segment. Ignore the seed data,\n      // which may still be streaming in. This shouldn't happen in the normal\n      // case because the client will inform the server which segments are\n      // already fully cached, and the server will skip rendering them.\n      prefetchRsc = null\n      rsc = cachedRsc\n    }\n    doesSegmentNeedDynamicRequest = false\n  } else {\n    if (isCachedRscPartial) {\n      // The cached data contains dynamic holes, or it's missing entirely. We'll\n      // show the partial state immediately (if available), and stream in the\n      // final data.\n      //\n      // Create a pending promise that we can later write to when the\n      // data arrives from the server.\n      prefetchRsc = cachedRsc\n      rsc = createDeferredRsc()\n    } else {\n      // The data is fully cached.\n      prefetchRsc = null\n      rsc = cachedRsc\n    }\n    doesSegmentNeedDynamicRequest = isCachedRscPartial\n  }\n\n  // If this is a page segment, we need to do the same for the head. This\n  // follows analogous logic to the segment data above.\n  // TODO: We don't need to store the head on the page segment's CacheNode; we\n  // can lift it to the main state object. Then we can also delete\n  // findHeadCache.\n\n  let prefetchHead: HeadData | null = null\n  let head: React.ReactNode | null = null\n  let doesHeadNeedDynamicRequest: boolean = isPage\n\n  if (isPage) {\n    let cachedHead: HeadData | null = null\n    let isCachedHeadPartial: boolean = true\n    if (metadataVaryPath !== null) {\n      const metadataEntry = readSegmentCacheEntryForNavigation(\n        now,\n        map,\n        metadataVaryPath,\n        restrictToShell\n      )\n      if (metadataEntry !== null) {\n        switch (metadataEntry.status) {\n          case EntryStatus.Fulfilled: {\n            cachedHead = metadataEntry.rsc\n            isCachedHeadPartial = metadataEntry.isPartial\n            break\n          }\n          case EntryStatus.Pending: {\n            cachedHead = waitForSegmentCacheEntry(metadataEntry).then(\n              (entry) => (entry !== null ? entry.rsc : null)\n            )\n            isCachedHeadPartial = metadataEntry.isPartial\n            break\n          }\n          case EntryStatus.Empty:\n          case EntryStatus.Rejected: {\n            break\n          }\n          default: {\n            metadataEntry satisfies never\n            break\n          }\n        }\n      }\n    }\n\n    if (process.env.__NEXT_OPTIMISTIC_ROUTING && isCachedHeadPartial) {\n      // TODO: When optimistic routing is enabled, don't block on waiting for\n      // the viewport to resolve. This is a temporary workaround until Vary\n      // Params are tracked when rendering the metadata. We'll fix it before\n      // this feature is stable. However, it's not a critical issue because 1)\n      // it will stream in eventually anyway 2) metadata is wrapped in an\n      // internal Suspense boundary, so is always non-blocking; this only\n      // affects the viewport node, which is meant to blocking, however... 3)\n      // before Segment Cache landed this wasn't always the case, anyway, so\n      // it's unlikely that many people are relying on this behavior. Still,\n      // will be fixed before stable. It's the very next step in the sequence of\n      // work on this project.\n      //\n      // This line of code works because the App Router treats `null` as\n      // \"no renderable head available\", rather than an empty head. React treats\n      // an empty string as empty.\n      cachedHead = ''\n    }\n\n    if (seedHead !== null) {\n      if (isCachedHeadPartial) {\n        prefetchHead = cachedHead\n        head = seedHead\n      } else {\n        prefetchHead = null\n        head = cachedHead\n      }\n      doesHeadNeedDynamicRequest = false\n    } else {\n      if (isCachedHeadPartial) {\n        prefetchHead = cachedHead\n        head = createDeferredRsc()\n      } else {\n        prefetchHead = null\n        head = cachedHead\n      }\n      doesHeadNeedDynamicRequest = isCachedHeadPartial\n    }\n  }\n\n  // Now that we're creating a new segment, write its data to the BFCache. A\n  // subsequent back/forward navigation will reuse this same data, until or\n  // unless it's cleared by a refresh/revalidation.\n  //\n  // Skip BFCache writes for optimistic navigations since they are transient\n  // and will be replaced by the canonical navigation.\n  if (freshness !== FreshnessPolicy.Gesture) {\n    writeToBFCache(\n      now,\n      tree.varyPath,\n      rsc,\n      prefetchRsc,\n      head,\n      prefetchHead,\n      dynamicStaleAt,\n      bfcacheId\n    )\n    if (isPage && metadataVaryPath !== null) {\n      writeHeadToBFCache(\n        now,\n        metadataVaryPath,\n        head,\n        prefetchHead,\n        dynamicStaleAt,\n        bfcacheId\n      )\n    }\n  }\n\n  return {\n    cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId),\n    // TODO: We should store this field on the CacheNode itself. I think we can\n    // probably unify NavigationTask, CacheNode, and DeferredRsc into a\n    // single type. Or at least CacheNode and DeferredRsc.\n    needsDynamicRequest:\n      doesSegmentNeedDynamicRequest || doesHeadNeedDynamicRequest,\n  }\n}\n\nfunction createCacheNode(\n  rsc: React.ReactNode | null,\n  prefetchRsc: React.ReactNode | null,\n  head: React.ReactNode | null,\n  prefetchHead: HeadData | null,\n  bfcacheId: number,\n  scrollRef: ScrollRef | null = null\n): CacheNode {\n  return {\n    rsc,\n    prefetchRsc,\n    head,\n    prefetchHead,\n    slots: null,\n    scrollRef,\n    bfcacheId,\n  }\n}\n\n// Globally-unique counter for fresh bfcacheIds. Incremented every time a new\n// CacheNode is created on the client. The id surfaces to user code as a\n// string via `useRouter().bfcacheId`.\nlet nextBFCacheId = 0\n\nfunction generateBFCacheId(freshness: FreshnessPolicy): number {\n  // Server-side rendering and the initial client-side hydration tree both\n  // use a fixed sentinel so they reconcile cleanly across hydration. The\n  // counter only advances on real client-side navigations after hydration.\n  if (typeof window === 'undefined') return 0\n  if (freshness === FreshnessPolicy.Hydration) return 0\n  return ++nextBFCacheId\n}\n\nconst enum SegmentMatchKind {\n  // Two segments are equivalent: the CacheNode can be reused as-is.\n  Match,\n  // The segments differ in the parts that determine the route (segment kind,\n  // dynamic param value, etc.). The CacheNode must be created fresh.\n  Change,\n  // Two page segments differ only in their search params. Conceptually this\n  // is a refresh of the current page rather than a navigation to a new\n  // route — search params don't contribute to the LayoutRouter state key,\n  // and they shouldn't change the bfcacheId either. The CacheNode is rebuilt\n  // (so data refetches) but the bfcacheId carries forward.\n  SearchParamOnlyChange,\n}\n\nfunction compareSegments(\n  newSegment: Segment,\n  oldSegment: Segment\n): SegmentMatchKind {\n  if (matchSegment(newSegment, oldSegment)) {\n    return SegmentMatchKind.Match\n  }\n  if (\n    typeof newSegment === 'string' &&\n    typeof oldSegment === 'string' &&\n    newSegment.startsWith(PAGE_SEGMENT_KEY) &&\n    oldSegment.startsWith(PAGE_SEGMENT_KEY)\n  ) {\n    return SegmentMatchKind.SearchParamOnlyChange\n  }\n  return SegmentMatchKind.Change\n}\n\n// Represents whether the previuos navigation resulted in a route tree mismatch.\n// A mismatch results in a refresh of the page. If there are two successive\n// mismatches, we will fall back to an MPA navigation, to prevent a retry loop.\nlet previousNavigationDidMismatch = false\n\n// Writes a dynamic server response into the tree created by\n// updateCacheNodeOnNavigation. All pending promises that were spawned by the\n// navigation will be resolved, either with dynamic data from the server, or\n// `null` to indicate that the data is missing.\n//\n// A `null` value will trigger a lazy fetch during render, which will then patch\n// up the tree using the same mechanism as the non-PPR implementation\n// (serverPatchReducer).\n//\n// Usually, the server will respond with exactly the subset of data that we're\n// waiting for — everything below the nearest shared layout. But technically,\n// the server can return anything it wants.\n//\n// This does _not_ create a new tree; it modifies the existing one in place.\n// Which means it must follow the Suspense rules of cache safety.\nexport function spawnDynamicRequests(\n  task: NavigationTask,\n  primaryUrl: URL,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  accumulation: NavigationRequestAccumulation,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. Passed through so it can be marked as having a dynamic rewrite\n  // if the server returns a different pathname than expected (indicating\n  // dynamic rewrite behavior that varies by param value).\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  // The original navigation's push/replace intent. Threaded through to the\n  // server-patch retry logic so it can inherit the intent if the original\n  // transition hasn't committed yet.\n  navigateType: 'push' | 'replace',\n  navigationLock: NavigationLock | null,\n  // The segment cache map this navigation is bound to. See `segmentCacheMap`\n  // in cache.ts.\n  map: CacheMap<SegmentCacheEntry>,\n  signal: AbortSignal | undefined\n): void {\n  const dynamicRequestTree = task.dynamicRequestTree\n  if (dynamicRequestTree === null) {\n    // This navigation was fully cached. There are no dynamic requests to spawn.\n    previousNavigationDidMismatch = false\n    return\n  }\n\n  // This is intentionally not an async function to discourage the caller from\n  // awaiting the result. Any subsequent async operations spawned by this\n  // function should result in a separate navigation task, rather than\n  // block the original one.\n  //\n  // In this function we spawn (but do not await) all the network requests that\n  // block the navigation, and collect the promises. The next function,\n  // `finishNavigationTask`, can await the promises in any order without\n  // accidentally introducing a network waterfall.\n  const primaryRequestPromise = fetchMissingDynamicData(\n    task,\n    dynamicRequestTree,\n    primaryUrl,\n    nextUrl,\n    freshnessPolicy,\n    routeCacheEntry,\n    navigationLock,\n    map,\n    signal\n  )\n\n  const separateRefreshUrls = accumulation.separateRefreshUrls\n  let refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null = null\n  if (separateRefreshUrls !== null) {\n    // There are multiple URLs that we need to request the data from. This\n    // happens when a \"default\" parallel route slot is present in the tree, and\n    // its data cannot be fetched from the current route. We need to split the\n    // combined dynamic request tree into separate requests per URL.\n\n    // TODO: Create a scoped dynamic request tree that omits anything that\n    // is not relevant to the given URL. Without doing this, the server may\n    // sometimes render more data than necessary; this is not a regression\n    // compared to the pre-Segment Cache implementation, though, just an\n    // optimization we can make in the future.\n\n    // Construct a request tree for each additional refresh URL. This will\n    // prune away everything except the parts of the tree that match the\n    // given refresh URL.\n    refreshRequestPromises = []\n    const canonicalUrl = createHrefFromUrl(primaryUrl)\n    for (const refreshUrl of separateRefreshUrls) {\n      if (refreshUrl === canonicalUrl) {\n        // We already initiated a request for the this URL, above. Skip it.\n        // TODO: This only happens because the main URL is not tracked as\n        // part of the separateRefreshURLs set. There's probably a better way\n        // to structure this so this case doesn't happen.\n        continue\n      }\n      // TODO: Create a scoped dynamic request tree that omits anything that\n      // is not relevant to the given URL. Without doing this, the server may\n      // sometimes render more data than necessary; this is not a regression\n      // compared to the pre-Segment Cache implementation, though, just an\n      // optimization we can make in the future.\n      // const scopedDynamicRequestTree = splitTaskByURL(task, refreshUrl)\n      const scopedDynamicRequestTree = dynamicRequestTree\n      if (scopedDynamicRequestTree !== null) {\n        refreshRequestPromises.push(\n          fetchMissingDynamicData(\n            task,\n            scopedDynamicRequestTree,\n            new URL(refreshUrl, location.origin),\n            // TODO: Just noticed that this should actually the Next-Url at the\n            // time the refresh URL was set, not the current Next-Url. Need to\n            // start tracking this alongside the refresh URL. In the meantime,\n            // if a refresh fails due to a mismatch, it will trigger a\n            // hard refresh.\n            nextUrl,\n            freshnessPolicy,\n            routeCacheEntry,\n            navigationLock,\n            map,\n            signal\n          )\n        )\n      }\n    }\n  }\n\n  // Further async operations are moved into this separate function to\n  // discourage sequential network requests.\n  const voidPromise = finishNavigationTask(\n    task,\n    nextUrl,\n    primaryRequestPromise,\n    refreshRequestPromises,\n    routeCacheEntry,\n    navigateType\n  )\n  // `finishNavigationTask` is responsible for error handling, so we can attach\n  // noop callbacks to this promise.\n  voidPromise.then(noop, noop)\n}\n\nasync function finishNavigationTask(\n  task: NavigationTask,\n  nextUrl: string | null,\n  primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n  refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null,\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  navigateType: 'push' | 'replace'\n): Promise<void> {\n  // Wait for all the requests to finish, or for the first one to fail.\n  let exitStatus = await waitForRequestsToFinish(\n    primaryRequestPromise,\n    refreshRequestPromises\n  )\n\n  // Once the all the requests have finished, check the tree for any remaining\n  // pending tasks. If anything is still pending, it means the server response\n  // does not match the client, and we must refresh to get back to a consistent\n  // state. We can skip this step if we already detected a mismatch during the\n  // first phase; it doesn't matter in that case because we're going to refresh\n  // the whole tree regardless.\n  if (exitStatus === NavigationTaskExitStatus.Done) {\n    exitStatus = abortRemainingPendingTasks(task, null, null)\n  }\n\n  switch (exitStatus) {\n    case NavigationTaskExitStatus.Canceled: {\n      // This navigation was superseded and its request aborted. Its cache nodes\n      // may already be reused by the newer navigation, so leave them untouched\n      // for the newer request to fulfill. If the tree was abandoned entirely,\n      // it can be garbage collected along with its unresolved promises. We do\n      // not retry or hard-navigate.\n      return\n    }\n    case NavigationTaskExitStatus.Done: {\n      // The task has completely finished. There's no missing data. Exit.\n      previousNavigationDidMismatch = false\n      return\n    }\n    case NavigationTaskExitStatus.SoftRetry: {\n      // Some data failed to finish loading. Trigger a soft retry that re-fetches\n      // the tree's dynamic data.\n      // TODO: As an extra precaution against soft retry loops, consider\n      // tracking whether a navigation was itself triggered by a retry. If two\n      // happen in a row, fall back to a hard retry.\n      const isHardRetry = false\n      const primaryRequestResult = await primaryRequestPromise\n      dispatchRetryDueToTreeMismatch(\n        isHardRetry,\n        primaryRequestResult.url,\n        nextUrl,\n        primaryRequestResult.seed,\n        task.route,\n        routeCacheEntry,\n        navigateType,\n        FreshnessPolicy.RefreshAll\n      )\n      return\n    }\n    case NavigationTaskExitStatus.RedirectRetry: {\n      // The route matched, but the request was redirected, so we committed the\n      // wrong canonical URL. Re-resolve the route to invalidate the now-stale\n      // route cache and correct the URL — but reuse the data we already received\n      // (HistoryTraversal) instead of re-fetching it. See issue #95195.\n      const isHardRetry = false\n      const primaryRequestResult = await primaryRequestPromise\n      dispatchRetryDueToTreeMismatch(\n        isHardRetry,\n        primaryRequestResult.url,\n        nextUrl,\n        primaryRequestResult.seed,\n        task.route,\n        routeCacheEntry,\n        navigateType,\n        FreshnessPolicy.HistoryTraversal\n      )\n      return\n    }\n    case NavigationTaskExitStatus.HardRetry: {\n      // Some data failed to finish loading in a non-recoverable way, such as a\n      // network error. Trigger an MPA navigation.\n      //\n      // Hard navigating/refreshing is how we prevent an infinite retry loop\n      // caused by a network error — when the network fails, we fall back to the\n      // browser behavior for offline navigations. In the future, Next.js may\n      // introduce its own custom handling of offline navigations, but that\n      // doesn't exist yet.\n      const isHardRetry = true\n      const primaryRequestResult = await primaryRequestPromise\n      dispatchRetryDueToTreeMismatch(\n        isHardRetry,\n        primaryRequestResult.url,\n        nextUrl,\n        primaryRequestResult.seed,\n        task.route,\n        routeCacheEntry,\n        navigateType,\n        FreshnessPolicy.RefreshAll\n      )\n      return\n    }\n    default: {\n      return exitStatus satisfies never\n    }\n  }\n}\n\nfunction waitForRequestsToFinish(\n  primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n  refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null\n) {\n  // Custom async combinator logic. This could be replaced by Promise.any but\n  // we don't assume that's available.\n  //\n  // Each promise resolves once the server responsds and the data is written\n  // into the CacheNode tree. Resolve the combined promise once all the\n  // requests finish.\n  //\n  // Or, resolve as soon as one of the requests fails, without waiting for the\n  // others to finish.\n  return new Promise<NavigationTaskExitStatus>((resolve) => {\n    const onFulfill = (result: { exitStatus: NavigationTaskExitStatus }) => {\n      if (result.exitStatus === NavigationTaskExitStatus.Done) {\n        remainingCount--\n        if (remainingCount === 0) {\n          // All the requests finished successfully.\n          resolve(NavigationTaskExitStatus.Done)\n        }\n      } else {\n        // One of the requests failed. Exit with a failing status.\n        // NOTE: It's possible for one of the requests to fail with SoftRetry\n        // and a later one to fail with HardRetry. In this case, we choose to\n        // retry immediately, rather than delay the retry until all the requests\n        // finish. If it fails again, we will hard retry on the next\n        // attempt, anyway.\n        resolve(result.exitStatus)\n      }\n    }\n    // onReject shouldn't ever be called because fetchMissingDynamicData's\n    // entire body is wrapped in a try/catch. This is just defensive.\n    const onReject = () => resolve(NavigationTaskExitStatus.HardRetry)\n\n    // Attach the listeners to the promises.\n    let remainingCount = 1\n    primaryRequestPromise.then(onFulfill, onReject)\n    if (refreshRequestPromises !== null) {\n      remainingCount += refreshRequestPromises.length\n      refreshRequestPromises.forEach((refreshRequestPromise) =>\n        refreshRequestPromise.then(onFulfill, onReject)\n      )\n    }\n  })\n}\n\nfunction dispatchRetryDueToTreeMismatch(\n  isHardRetry: boolean,\n  retryUrl: URL,\n  retryNextUrl: string | null,\n  seed: NavigationSeed | null,\n  baseTree: FlightRouterState,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. If the navigation results in a mismatch, we mark it as having\n  // a dynamic rewrite so future predictions bail out.\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  // The original navigation's push/replace intent.\n  originalNavigateType: 'push' | 'replace',\n  // Freshness policy for the retry navigation. `RefreshAll` re-fetches the\n  // tree's dynamic data (used for genuine tree mismatches). `HistoryTraversal`\n  // reuses the data already in the tree (used when only the URL needs\n  // correcting after a redirect).\n  retryFreshnessPolicy:\n    | FreshnessPolicy.RefreshAll\n    | FreshnessPolicy.HistoryTraversal\n) {\n  // If the navigation used a route prediction, mark it as having a dynamic\n  // rewrite since it resulted in a mismatch.\n  if (routeCacheEntry !== null) {\n    markRouteEntryAsDynamicRewrite(routeCacheEntry)\n  } else if (seed !== null) {\n    // Even without a direct reference to the route cache entry, we can still\n    // mark the route as having a dynamic rewrite by traversing the known route\n    // tree. This handles cases where the navigation didn't originate from a\n    // route prediction, but still needs to mark the pattern.\n    const metadataVaryPath = seed.metadataVaryPath\n    if (metadataVaryPath !== null) {\n      const now = Date.now()\n      discoverKnownRoute(\n        now,\n        retryUrl.pathname,\n        retryUrl.search as NormalizedSearch,\n        retryNextUrl,\n        null,\n        seed.routeTree,\n        metadataVaryPath,\n        false, // couldBeIntercepted - doesn't matter, we're just marking hasDynamicRewrite\n        createHrefFromUrl(retryUrl),\n        false, // supportsPerSegmentPrefetching - doesn't matter, we're just marking hasDynamicRewrite\n        true // hasDynamicRewrite\n      )\n    }\n  }\n\n  // Invalidate all route cache entries. Other entries may have been derived\n  // from the template before we knew it had a dynamic rewrite. This also\n  // triggers re-prefetching of visible links.\n  invalidateRouteCacheEntries(retryNextUrl, baseTree)\n\n  // If this is the second time in a row that a navigation resulted in a\n  // mismatch, fall back to a hard (MPA) refresh.\n  isHardRetry = isHardRetry || previousNavigationDidMismatch\n  previousNavigationDidMismatch = true\n\n  // If the original navigation hasn't committed to the browser history yet\n  // (the transition suspended before React committed), inherit its push/replace\n  // intent. Otherwise, the pushState already ran, so use 'replace' to avoid\n  // creating a duplicate history entry.\n  //\n  // This works because React entangles the retry's state update with the\n  // original pending transition — they commit together as a single batch,\n  // so the navigate type from the retry is what HistoryUpdater ultimately sees.\n  //\n  // TODO: Ideally this check would happen right before we schedule the React\n  // update (i.e., closer to where the action is dispatched into the queue),\n  // not here where the action is constructed. But the current action queue\n  // doesn't provide a natural place for that. Revisit when we refactor the\n  // action queue into a more reactive navigation model.\n  const lastCommitted = getLastCommittedTree()\n  const retryNavigateType: 'push' | 'replace' =\n    lastCommitted !== null && baseTree !== lastCommitted\n      ? originalNavigateType\n      : 'replace'\n\n  const retryAction: ServerPatchAction = {\n    type: ACTION_SERVER_PATCH,\n    previousTree: baseTree,\n    url: retryUrl,\n    nextUrl: retryNextUrl,\n    seed,\n    mpa: isHardRetry,\n    navigateType: retryNavigateType,\n    freshnessPolicy: retryFreshnessPolicy,\n  }\n  dispatchAppRouterAction(retryAction)\n}\n\nasync function fetchMissingDynamicData(\n  task: NavigationTask,\n  dynamicRequestTree: FlightRouterState,\n  url: URL,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  navigationLock: NavigationLock | null,\n  map: CacheMap<SegmentCacheEntry>,\n  signal: AbortSignal | undefined\n): Promise<{\n  exitStatus: NavigationTaskExitStatus\n  url: URL\n  seed: NavigationSeed | null\n}> {\n  try {\n    const result = await fetchServerResponse(url, {\n      flightRouterState: dynamicRequestTree,\n      nextUrl,\n      isHmrRefresh: freshnessPolicy === FreshnessPolicy.HMRRefresh,\n      signal,\n    })\n    if (typeof result === 'string') {\n      // fetchServerResponse will return an href to indicate that the SPA\n      // navigation failed. For example, if the server triggered a hard\n      // redirect, or the fetch request errored. Initiate an MPA navigation\n      // to the given href.\n      return {\n        exitStatus: NavigationTaskExitStatus.HardRetry,\n        url: new URL(result, location.origin),\n        seed: null,\n      }\n    }\n    const now = Date.now()\n\n    const seed = convertServerPatchToFullTree(\n      now,\n      task.route,\n      result.flightData,\n      result.renderedSearch,\n      result.dynamicStaleTime\n    )\n\n    // If the navigation lock is active, wait for it to be released before\n    // writing the dynamic data. This allows tests to assert on the prefetched\n    // UI state.\n    if (process.env.__NEXT_EXPOSE_TESTING_API && navigationLock !== null) {\n      await navigationLock\n    }\n\n    // TODO: Implement Shell extraction as part of Cached Navigations.\n    // Intentionally holding off on doing this until we decide how the Cached\n    // Navigations behavior should work in combination with App Shells.\n    if (routeCacheEntry !== null && result.staticStageData !== null) {\n      const { response: staticStageResponse, isResponsePartial } =\n        result.staticStageData\n\n      resolveStaleAt(now, staticStageResponse.s)\n        .then((staleAt) => {\n          const buildId =\n            result.responseHeaders.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n            staticStageResponse.b\n\n          writePrerenderResponseIntoCache(\n            now,\n            FetchStrategy.PPR,\n            staticStageResponse.f,\n            buildId,\n            staticStageResponse.h,\n            staticStageResponse.r ?? null,\n            staleAt,\n            dynamicRequestTree,\n            result.renderedSearch,\n            isResponsePartial,\n            map\n          )\n        })\n        .catch(() => {\n          // The static stage processing failed. Not fatal — the navigation\n          // completed normally, we just won't write into the cache.\n        })\n    }\n\n    if (routeCacheEntry !== null && result.runtimePrefetchStream !== null) {\n      processRuntimePrefetchStream(\n        now,\n        result.runtimePrefetchStream,\n        dynamicRequestTree,\n        result.renderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              now,\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.rootVaryParamsIterable,\n              processed.staleAt,\n              processed.navigationSeed,\n              null,\n              map\n            )\n          }\n        })\n        .catch(() => {\n          // The runtime prefetch cache write failed. Not fatal — the\n          // navigation completed normally, we just won't cache runtime data.\n        })\n    }\n\n    // result.dynamicStaleTime is in seconds (from the server's `d` field).\n    // Convert to an absolute timestamp using the centralized helper.\n    const dynamicStaleAt = computeDynamicStaleAt(now, result.dynamicStaleTime)\n\n    const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(\n      task,\n      seed.routeTree,\n      seed.data,\n      seed.head,\n      dynamicStaleAt,\n      result.debugInfo,\n      result.revealAfter\n    )\n\n    const resolvedUrl = new URL(result.canonicalUrl, location.origin)\n\n    // Decide whether the navigation needs to be retried.\n    //\n    // - A tree mismatch (unknown parallel route) means the data is incomplete,\n    //   so we soft-retry and re-fetch the whole tree.\n    // - Otherwise, the navigation committed the canonical URL from the route\n    //   cache entry it used (a prediction or prefetch). If the request resolved\n    //   to a *different* canonical URL — e.g. a middleware/proxy redirect the\n    //   prediction didn't account for — then the committed URL is wrong and the\n    //   route cache it came from is no longer reliable (the redirect implies a\n    //   server change the prediction couldn't know about, like logging in or\n    //   out). We re-resolve the route to invalidate the stale cache and correct\n    //   the browser URL, reusing the data we just received rather than\n    //   re-fetching it. When the entry already reflects the redirect (e.g. a\n    //   prefetch that followed it), the committed URL matches and no retry is\n    //   needed. See issue #95195.\n    let didCommitWrongUrl = false\n    if (routeCacheEntry !== null) {\n      const committedUrl = new URL(\n        routeCacheEntry.canonicalUrl,\n        location.origin\n      )\n      didCommitWrongUrl =\n        committedUrl.pathname !== resolvedUrl.pathname ||\n        committedUrl.search !== resolvedUrl.search\n    }\n\n    const exitStatus = didReceiveUnknownParallelRoute\n      ? NavigationTaskExitStatus.SoftRetry\n      : didCommitWrongUrl\n        ? NavigationTaskExitStatus.RedirectRetry\n        : NavigationTaskExitStatus.Done\n\n    return {\n      exitStatus,\n      url: resolvedUrl,\n      seed,\n    }\n  } catch {\n    if (signal?.aborted) {\n      // A newer HMR refresh superseded this one and aborted its request. Treat\n      // it as canceled rather than a failure, so we don't retry or\n      // hard-navigate.\n      return {\n        exitStatus: NavigationTaskExitStatus.Canceled,\n        url,\n        seed: null,\n      }\n    }\n\n    // This shouldn't happen because fetchServerResponse's entire body is\n    // wrapped in a try/catch. If it does, though, it implies the server failed\n    // to respond with any tree at all. So we must fall back to a hard retry.\n    return {\n      exitStatus: NavigationTaskExitStatus.HardRetry,\n      url: url,\n      seed: null,\n    }\n  }\n}\n\nfunction writeDynamicDataIntoNavigationTask(\n  task: NavigationTask,\n  serverRouteTree: RouteTree,\n  dynamicData: CacheNodeSeedData | null,\n  dynamicHead: HeadData,\n  dynamicStaleAt: number,\n  debugInfo: Array<any> | null,\n  revealAfter: Promise<void> | null\n): boolean {\n  if (task.status === NavigationTaskStatus.Pending && dynamicData !== null) {\n    task.status = NavigationTaskStatus.Fulfilled\n    finishPendingCacheNode(\n      task.node,\n      dynamicData,\n      dynamicHead,\n      debugInfo,\n      revealAfter\n    )\n\n    // Update the BFCache entry's staleAt for this segment with the value\n    // from the dynamic response. This applies the per-page\n    // unstable_dynamicStaleTime if set, or the default DYNAMIC_STALETIME_MS.\n    // We only update segments that received dynamic data — static segments\n    // are unaffected.\n    updateBFCacheEntryStaleAt(serverRouteTree.varyPath, dynamicStaleAt)\n  }\n\n  const taskChildren = task.children\n  const serverChildren = serverRouteTree.slots\n  const dynamicDataChildren = dynamicData !== null ? dynamicData[1] : null\n\n  // Detect whether the server sends a parallel route slot that the client\n  // doesn't know about.\n  let didReceiveUnknownParallelRoute = false\n\n  if (taskChildren !== null) {\n    if (serverChildren !== null) {\n      for (const [parallelRouteKey, serverRouteTreeChild] of serverChildren) {\n        const dynamicDataChild: CacheNodeSeedData | null | void =\n          dynamicDataChildren !== null\n            ? dynamicDataChildren[parallelRouteKey]\n            : null\n\n        const taskChild = taskChildren.get(parallelRouteKey)\n        if (taskChild === undefined) {\n          // The server sent a child segment that the client doesn't know about.\n          //\n          // When we receive an unknown parallel route, we must consider it a\n          // mismatch. This is unlike the case where the segment itself\n          // mismatches, because multiple routes can be active simultaneously.\n          // But a given layout should never have a mismatching set of\n          // child slots.\n          //\n          // Theoretically, this should only happen in development during an HMR\n          // refresh, because the set of parallel routes for a layout does not\n          // change over the lifetime of a build/deployment. In production, we\n          // should have already mismatched on either the build id or the segment\n          // path. But as an extra precaution, we validate in prod, too.\n          didReceiveUnknownParallelRoute = true\n        } else {\n          const taskSegment = taskChild.route[0]\n          const serverSegment = createSegmentFromRouteTree(serverRouteTreeChild)\n          if (\n            matchSegment(serverSegment, taskSegment) &&\n            dynamicDataChild !== null &&\n            dynamicDataChild !== undefined\n          ) {\n            // Found a match for this task. Keep traversing down the task tree.\n            const childDidReceiveUnknownParallelRoute =\n              writeDynamicDataIntoNavigationTask(\n                taskChild,\n                serverRouteTreeChild,\n                dynamicDataChild,\n                dynamicHead,\n                dynamicStaleAt,\n                debugInfo,\n                revealAfter\n              )\n            if (childDidReceiveUnknownParallelRoute) {\n              didReceiveUnknownParallelRoute = true\n            }\n          }\n        }\n      }\n    } else {\n      if (serverChildren !== null) {\n        // The server sent a child segment that the client doesn't know about.\n        didReceiveUnknownParallelRoute = true\n      }\n    }\n  }\n\n  return didReceiveUnknownParallelRoute\n}\n\nfunction finishPendingCacheNode(\n  cacheNode: CacheNode,\n  dynamicData: CacheNodeSeedData,\n  dynamicHead: HeadData,\n  debugInfo: Array<any> | null,\n  revealAfter: Promise<void> | null\n): void {\n  // Writes a dynamic response into an existing Cache Node tree. This does _not_\n  // create a new tree, it updates the existing tree in-place. So it must follow\n  // the Suspense rules of cache safety — it can resolve pending promises, but\n  // it cannot overwrite existing data. It can add segments to the tree (because\n  // a missing segment will cause the layout router to suspend).\n  // but it cannot delete them.\n  //\n  // We must resolve every promise in the tree, or else it will suspend\n  // indefinitely. If we did not receive data for a segment, we will resolve its\n  // data promise to `null` to trigger a lazy fetch during render.\n\n  // Use the dynamic data from the server to fulfill the deferred RSC promise\n  // on the Cache Node.\n  const rsc = cacheNode.rsc\n  const dynamicSegmentData = dynamicData[0]\n\n  if (dynamicSegmentData === null) {\n    // This is an empty CacheNode; this particular server request did not\n    // render this segment. There may be a separate pending request that will,\n    // though, so we won't abort the task until all pending requests finish.\n    return\n  }\n\n  if (rsc === null) {\n    // This is a lazy cache node. We can overwrite it. This is only safe\n    // because we know that the LayoutRouter suspends if `rsc` is `null`.\n    cacheNode.rsc = dynamicSegmentData\n  } else if (isDeferredRsc(rsc)) {\n    // This is a deferred RSC promise. We can fulfill it with the data we just\n    // received from the server. If it was already resolved by a different\n    // navigation, then this does nothing because we can't overwrite data.\n    //\n    // In the streaming dev render, defer the fill until `revealAfter` settles,\n    // so React doesn't render the boundary's children before their row has been\n    // decoded (otherwise it suspends on the still-pending children and commits\n    // a premature fallback). Outside that render `revealAfter` is null and we\n    // resolve immediately.\n    if (revealAfter !== null) {\n      const resolveRsc = () => rsc.resolve(dynamicSegmentData, debugInfo)\n      // Use the same callback for both outcomes: we don't expect `revealAfter`\n      // to reject, but if it ever did (e.g. a connection drop mid-stream) we'd\n      // still want to resolve the RSC.\n      revealAfter.then(resolveRsc, resolveRsc)\n    } else {\n      rsc.resolve(dynamicSegmentData, debugInfo)\n    }\n  } else {\n    // This is not a deferred RSC promise, nor is it empty, so it must have\n    // been populated by a different navigation. We must not overwrite it.\n  }\n\n  // Check if this is a leaf segment. If so, it will have a `head` property with\n  // a pending promise that needs to be resolved with the dynamic head from\n  // the server.\n  const head = cacheNode.head\n  if (isDeferredRsc(head)) {\n    head.resolve(dynamicHead, debugInfo)\n  }\n}\n\nfunction abortRemainingPendingTasks(\n  task: NavigationTask,\n  error: any,\n  debugInfo: Array<any> | null\n): NavigationTaskExitStatus {\n  let exitStatus\n  if (task.status === NavigationTaskStatus.Pending) {\n    // The data for this segment is still missing.\n    task.status = NavigationTaskStatus.Rejected\n    abortPendingCacheNode(task.node, error, debugInfo)\n\n    // If the server failed to fulfill the data for this segment, it implies\n    // that the route tree received from the server mismatched the tree that\n    // was previously prefetched.\n    //\n    // In an app with fully static routes and no proxy-driven redirects or\n    // rewrites, this should never happen, because the route for a URL would\n    // always be the same across multiple requests. So, this implies that some\n    // runtime routing condition changed, likely in a proxy, without being\n    // pushed to the client.\n    //\n    // When this happens, we treat this the same as a refresh(). The entire\n    // tree will be re-rendered from the root.\n    if (task.refreshState === null) {\n      // Trigger a \"soft\" refresh. Essentially the same as calling `refresh()`\n      // in a Server Action.\n      exitStatus = NavigationTaskExitStatus.SoftRetry\n    } else {\n      // The mismatch was discovered inside an inactive parallel route. This\n      // implies the inactive parallel route is no longer reachable at the URL\n      // that originally rendered it. Fall back to an MPA refresh.\n      // TODO: An alternative could be to trigger a soft refresh but to _not_\n      // re-use the inactive parallel routes this time. Similar to what would\n      // happen if were to do a hard refrehs, but without the HTML page.\n      exitStatus = NavigationTaskExitStatus.HardRetry\n    }\n  } else {\n    // This segment finished. (An error here is treated as Done because they are\n    // surfaced to the application during render.)\n    exitStatus = NavigationTaskExitStatus.Done\n  }\n\n  const taskChildren = task.children\n  if (taskChildren !== null) {\n    for (const [, taskChild] of taskChildren) {\n      const childExitStatus = abortRemainingPendingTasks(\n        taskChild,\n        error,\n        debugInfo\n      )\n      // Propagate the exit status up the tree. The statuses are ordered by\n      // their precedence.\n      if (childExitStatus > exitStatus) {\n        exitStatus = childExitStatus\n      }\n    }\n  }\n\n  return exitStatus\n}\n\nfunction abortPendingCacheNode(\n  cacheNode: CacheNode,\n  error: any,\n  debugInfo: Array<any> | null\n): void {\n  const rsc = cacheNode.rsc\n  if (isDeferredRsc(rsc)) {\n    if (error === null) {\n      // This will trigger a lazy fetch during render.\n      rsc.resolve(null, debugInfo)\n    } else {\n      // This will trigger an error during rendering.\n      rsc.reject(error, debugInfo)\n    }\n  }\n\n  // Check if this is a leaf segment. If so, it will have a `head` property with\n  // a pending promise that needs to be resolved. If an error was provided, we\n  // will not resolve it with an error, since this is rendered at the root of\n  // the app. We want the segment to error, not the entire app.\n  const head = cacheNode.head\n  if (isDeferredRsc(head)) {\n    head.resolve(null, debugInfo)\n  }\n}\n\nconst DEFERRED = Symbol()\n\ntype PendingDeferredRsc<T> = Promise<T> & {\n  status: 'pending'\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype FulfilledDeferredRsc<T> = Promise<T> & {\n  status: 'fulfilled'\n  value: T\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype RejectedDeferredRsc<T> = Promise<T> & {\n  status: 'rejected'\n  reason: any\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype DeferredRsc<T extends React.ReactNode = React.ReactNode> =\n  | PendingDeferredRsc<T>\n  | FulfilledDeferredRsc<T>\n  | RejectedDeferredRsc<T>\n\n// This type exists to distinguish a DeferredRsc from a Flight promise. It's a\n// compromise to avoid adding an extra field on every Cache Node, which would be\n// awkward because the pre-PPR parts of codebase would need to account for it,\n// too. We can remove it once type Cache Node type is more settled.\nexport function isDeferredRsc(value: any): value is DeferredRsc {\n  return value && typeof value === 'object' && value.tag === DEFERRED\n}\n\nfunction createDeferredRsc<\n  T extends React.ReactNode = React.ReactNode,\n>(): PendingDeferredRsc<T> {\n  // Create an unresolved promise that represents data derived from a Flight\n  // response. The promise will be resolved later as soon as we start receiving\n  // data from the server, i.e. as soon as the Flight client decodes and returns\n  // the top-level response object.\n\n  // The `_debugInfo` field contains profiling information. Promises that are\n  // created by Flight already have this info added by React; for any derived\n  // promise created by the router, we need to transfer the Flight debug info\n  // onto the derived promise.\n  //\n  // The debug info represents the latency between the start of the navigation\n  // and the start of rendering. (It does not represent the time it takes for\n  // whole stream to finish.)\n  const debugInfo: Array<any> = []\n\n  let resolve: any\n  let reject: any\n  const pendingRsc = new Promise<T>((res, rej) => {\n    resolve = res\n    reject = rej\n  }) as PendingDeferredRsc<T>\n  pendingRsc.status = 'pending'\n  pendingRsc.resolve = (value: T, responseDebugInfo: Array<any> | null) => {\n    if (pendingRsc.status === 'pending') {\n      const fulfilledRsc: FulfilledDeferredRsc<T> = pendingRsc as any\n      fulfilledRsc.status = 'fulfilled'\n      fulfilledRsc.value = value\n      if (responseDebugInfo !== null) {\n        // Transfer the debug info to the derived promise.\n        debugInfo.push.apply(debugInfo, responseDebugInfo)\n      }\n      resolve(value)\n    }\n  }\n  pendingRsc.reject = (error: any, responseDebugInfo: Array<any> | null) => {\n    if (pendingRsc.status === 'pending') {\n      const rejectedRsc: RejectedDeferredRsc<T> = pendingRsc as any\n      rejectedRsc.status = 'rejected'\n      rejectedRsc.reason = error\n      if (responseDebugInfo !== null) {\n        // Transfer the debug info to the derived promise.\n        debugInfo.push.apply(debugInfo, responseDebugInfo)\n      }\n      reject(error)\n    }\n  }\n  pendingRsc.tag = DEFERRED\n  pendingRsc._debugInfo = debugInfo\n\n  return pendingRsc\n}\n\n/**\n * Helper for the Instant Navigation Testing API. Captures the withheld-data\n * gate of the locked navigation that is current when router work spawns a\n * dynamic write, so the write awaits that same gate even if a newer locked\n * navigation rolls the lock over before its response is applied.\n *\n * Not exposed in production builds by default.\n */\nexport function getCurrentNavigationLock(): NavigationLock | null {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { getCurrentNavigationGate } =\n      require('../segment-cache/navigation-testing-lock') as typeof import('../segment-cache/navigation-testing-lock')\n    return getCurrentNavigationGate()\n  }\n  return null\n}\n\n/**\n * Helper for the Instant Navigation Testing API. Signals that a new locked\n * navigation is beginning: force-resolves the previous locked navigation's\n * withheld-data gate (without ending the scope) and returns a fresh gate for\n * this navigation, which the caller threads to its dynamic-data write. See\n * `beginLockedNavigation` in `navigation-testing-lock`.\n *\n * Not exposed in production builds by default.\n */\nexport function beginLockedNavigation(): NavigationLock | null {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { beginLockedNavigation: begin } =\n      require('../segment-cache/navigation-testing-lock') as typeof import('../segment-cache/navigation-testing-lock')\n    return begin()\n  }\n  return null\n}\n\n/**\n * Helper for the Instant Navigation Testing API. Called during a history\n * traversal: resets the testing lock to a fresh pending scope, releasing any\n * withheld data from prior navigations. See `resetNavigationLockToPending` in\n * `navigation-testing-lock`.\n */\nexport function resetNavigationLockToPending(): void {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { resetNavigationLockToPending: reset } =\n      require('../segment-cache/navigation-testing-lock') as typeof import('../segment-cache/navigation-testing-lock')\n    reset()\n  }\n}\n","import type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport type { RouteTree } from '../segment-cache/cache'\n\nexport function isNavigatingToNewRootLayout(\n  currentTree: FlightRouterState,\n  nextTree: RouteTree\n): boolean {\n  // Decides whether navigating from currentTree to nextTree crosses into a\n  // different root layout, which requires a full-page (MPA-style) navigation.\n  //\n  // The \"root layout\" is the highest-level layout in the tree. The segments at\n  // or above it form the \"root layout prefix\", which the server marks with the\n  // IsRootLayoutOrAbove hint. Two routes share a root layout iff their root\n  // layout prefixes are structurally identical — same segments (ignoring\n  // dynamic param *values*) for the same depth. So we walk the prefix in\n  // lockstep and report a change as soon as the prefixes diverge.\n  const currentInPrefix =\n    ((currentTree[4] ?? 0) & PrefetchHint.IsRootLayoutOrAbove) !== 0\n  const nextInPrefix =\n    (nextTree.prefetchHints & PrefetchHint.IsRootLayoutOrAbove) !== 0\n\n  // Both trees have descended past the root layout with everything above\n  // matching — same root layout.\n  if (!currentInPrefix && !nextInPrefix) {\n    return false\n  }\n\n  // One tree's root layout prefix is deeper than the other's, so the root\n  // layout boundary moved — it must have changed.\n  // E.g. /[lang]/layout.js -> /[lang]/[region]/layout.js\n  if (currentInPrefix !== nextInPrefix) {\n    return true\n  }\n\n  // Both segments are still inside the root layout prefix. They must match.\n  // Compare dynamic param name and type but ignore the value: different values\n  // (e.g. /[name] for slug1 vs slug2) still resolve to the same /[name]/layout.\n  // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js: (group1) changed\n  // to (group2) inside the prefix, so the root layout changed.\n  const currentTreeSegment = currentTree[0]\n  const nextTreeSegment = nextTree.segment\n  if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {\n    if (\n      currentTreeSegment[0] !== nextTreeSegment[0] ||\n      currentTreeSegment[2] !== nextTreeSegment[2]\n    ) {\n      return true\n    }\n  } else if (currentTreeSegment !== nextTreeSegment) {\n    return true\n  }\n\n  // Keep walking the prefix. (Above the root layout there is only a `children`\n  // slot, but we traverse all slots defensively.)\n  const slots = nextTree.slots\n  const currentTreeChildren = currentTree[1]\n  if (slots !== null) {\n    for (const [slot, nextTreeChild] of slots) {\n      const currentTreeChild = currentTreeChildren[slot]\n      if (\n        currentTreeChild === undefined ||\n        isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild)\n      ) {\n        return true\n      }\n    }\n  }\n  return false\n}\n","import type { FlightRouterState } from '../../../../shared/lib/app-router-types'\n\n// The tree from the last state that was committed to the browser history\n// (i.e., the last state for which HistoryUpdater's useInsertionEffect ran).\n// This lets the server-patch reducer distinguish between retrying a\n// navigation that already pushed a history entry vs one whose transition\n// suspended and never committed.\n//\n// Currently only used by the server-patch retry logic, but this module is a\n// stepping stone toward a broader refactor of the navigation queue. The\n// existing AppRouter action queue will eventually be replaced by a more\n// reactive model that explicitly tracks pending vs committed navigation\n// state. This file will likely evolve into (or be subsumed by) that new\n// implementation.\nlet lastCommittedTree: FlightRouterState | null = null\n\nexport function getLastCommittedTree(): FlightRouterState | null {\n  return lastCommittedTree\n}\n\nexport function setLastCommittedTree(tree: FlightRouterState): void {\n  lastCommittedTree = tree\n}\n","import type { FlightRouterState } from '../../../../shared/lib/app-router-types'\nimport { isInterceptionRouteAppPath } from '../../../../shared/lib/router/utils/interception-routes'\n\nexport function hasInterceptionRouteInCurrentTree([\n  segment,\n  parallelRoutes,\n]: FlightRouterState): boolean {\n  // If we have a dynamic segment, it's marked as an interception route by the presence of the `i` suffix.\n  if (\n    Array.isArray(segment) &&\n    (segment[2] === 'di(..)(..)' ||\n      segment[2] === 'ci(..)(..)' ||\n      segment[2] === 'di(.)' ||\n      segment[2] === 'ci(.)' ||\n      segment[2] === 'di(..)' ||\n      segment[2] === 'ci(..)' ||\n      segment[2] === 'di(...)' ||\n      segment[2] === 'ci(...)')\n  ) {\n    return true\n  }\n\n  // If segment is not an array, apply the existing string-based check\n  if (typeof segment === 'string' && isInterceptionRouteAppPath(segment)) {\n    return true\n  }\n\n  // Iterate through parallelRoutes if they exist\n  if (parallelRoutes) {\n    for (const key in parallelRoutes) {\n      if (hasInterceptionRouteInCurrentTree(parallelRoutes[key])) {\n        return true\n      }\n    }\n  }\n\n  return false\n}\n","import type {\n  HmrRefreshAction,\n  ReadonlyReducerState,\n  ReducerState,\n} from '../router-reducer-types'\nimport { refreshDynamicData } from './refresh-reducer'\nimport { FreshnessPolicy } from '../ppr-navigations'\n\nexport function hmrRefreshReducer(\n  state: ReadonlyReducerState,\n  action: HmrRefreshAction\n): ReducerState {\n  // HMR actions may wait behind a Server Action in the router queue. If a newer\n  // generation superseded this one before it started, don't install a refresh\n  // tree whose request is already canceled.\n  if (action.signal?.aborted) {\n    return state\n  }\n\n  return refreshDynamicData(state, FreshnessPolicy.HMRRefresh, action.signal)\n}\n","import type {\n  NavigateAction,\n  ReadonlyReducerState,\n  ReducerState,\n} from '../router-reducer-types'\n\nimport {\n  completeHardNavigation,\n  navigate as navigateUsingSegmentCache,\n} from '../../segment-cache/navigation'\nimport { getStaleTimeMs } from '../../segment-cache/cache'\nimport { FreshnessPolicy } from '../ppr-navigations'\n\n// These values are set by `define-env-plugin` (based on `nextConfig.experimental.staleTimes`)\n// and default to 5 minutes (static) / 0 seconds (dynamic)\nexport const DYNAMIC_STALETIME_MS =\n  Number(process.env.__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME) * 1000\n\nexport const STATIC_STALETIME_MS = getStaleTimeMs(\n  Number(process.env.__NEXT_CLIENT_ROUTER_STATIC_STALETIME)\n)\n\nexport function navigateReducer(\n  state: ReadonlyReducerState,\n  action: NavigateAction\n): ReducerState {\n  const { url, isExternalUrl, navigateType, scrollBehavior } = action\n\n  if (isExternalUrl) {\n    return completeHardNavigation(state, url, navigateType)\n  }\n\n  // Handles case where `<meta http-equiv=\"refresh\">` tag is present,\n  // which will trigger an MPA navigation.\n  if (document.getElementById('__next-page-redirect')) {\n    return completeHardNavigation(state, url, navigateType)\n  }\n\n  // Temporary glue code between the router reducer and the new navigation\n  // implementation. Eventually we'll rewrite the router reducer to a\n  // state machine.\n  const currentUrl = new URL(state.canonicalUrl, location.origin)\n  const currentRenderedSearch = state.renderedSearch\n  return navigateUsingSegmentCache(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    state.cache,\n    state.tree,\n    state.nextUrl,\n    FreshnessPolicy.Default,\n    scrollBehavior,\n    navigateType\n  )\n}\n","import type {\n  ReadonlyReducerState,\n  ReducerState,\n  RefreshAction,\n} from '../router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer-types'\nimport {\n  convertServerPatchToFullTree,\n  navigateToKnownRoute,\n} from '../../segment-cache/navigation'\nimport {\n  invalidateSegmentCacheEntries,\n  segmentCacheMap,\n} from '../../segment-cache/cache'\nimport { hasInterceptionRouteInCurrentTree } from './has-interception-route-in-current-tree'\nimport { FreshnessPolicy, getCurrentNavigationLock } from '../ppr-navigations'\nimport {\n  invalidateBfCache,\n  UnknownDynamicStaleTime,\n} from '../../segment-cache/bfcache'\n\nexport function refreshReducer(\n  state: ReadonlyReducerState,\n  action: RefreshAction\n): ReducerState {\n  // During a refresh, we invalidate the segment cache but not the route cache.\n  // The route cache contains the tree structure (which segments exist at a\n  // given URL) which doesn't change during a refresh. The segment cache\n  // contains the actual RSC data which needs to be re-fetched.\n  //\n  // The Instant Navigation Testing API can bypass cache invalidation to\n  // preserve prefetched data when refreshing after an MPA navigation. This is\n  // only used for testing and is not exposed in production builds by default.\n  const bypassCacheInvalidation =\n    process.env.__NEXT_EXPOSE_TESTING_API && action.bypassCacheInvalidation\n  if (!bypassCacheInvalidation) {\n    const currentNextUrl = state.nextUrl\n    const currentRouterState = state.tree\n    invalidateSegmentCacheEntries(currentNextUrl, currentRouterState)\n  }\n  // A full refresh has no HMR generation to cancel.\n  return refreshDynamicData(state, FreshnessPolicy.RefreshAll, undefined)\n}\n\nexport function refreshDynamicData(\n  state: ReadonlyReducerState,\n  freshnessPolicy: FreshnessPolicy.RefreshAll | FreshnessPolicy.HMRRefresh,\n  signal: AbortSignal | undefined\n): ReducerState {\n  // During a refresh, invalidate the BFCache, which may contain dynamic data.\n  invalidateBfCache()\n\n  const currentNextUrl = state.nextUrl\n\n  // We always send the last next-url, not the current when performing a dynamic\n  // request. This is because we update the next-url after a navigation, but we\n  // want the same interception route to be matched that used the last next-url.\n  const nextUrlForRefresh = hasInterceptionRouteInCurrentTree(state.tree)\n    ? state.previousNextUrl || currentNextUrl\n    : null\n\n  // A refresh is modeled as a navigation to the current URL, but where any\n  // existing dynamic data (including in shared layouts) is re-fetched.\n  const currentCanonicalUrl = state.canonicalUrl\n  const currentUrl = new URL(currentCanonicalUrl, location.origin)\n  const currentRenderedSearch = state.renderedSearch\n  const currentFlightRouterState = state.tree\n  const scrollBehavior = ScrollBehavior.NoScroll\n  const navigationLock = getCurrentNavigationLock()\n\n  // Create a NavigationSeed from the current FlightRouterState.\n  // TODO: Eventually we will store this type directly on the state object\n  // instead of reconstructing it on demand. Part of a larger series of\n  // refactors to unify the various tree types that the client deals with.\n  const now = Date.now()\n  // TODO: Store the dynamic stale time on the top-level state so it's known\n  // during restores and refreshes.\n  const refreshSeed = convertServerPatchToFullTree(\n    now,\n    currentFlightRouterState,\n    null,\n    currentRenderedSearch,\n    UnknownDynamicStaleTime\n  )\n\n  // If the previous navigation hasn't pushed its history entry yet (React\n  // hasn't committed its state), this refresh may commit in its place, so it\n  // takes over the push. If the navigation does commit first, HistoryUpdater\n  // sees that the URL already matches and replaces instead.\n  const navigateType = state.pushRef.pendingPush ? 'push' : 'replace'\n  return navigateToKnownRoute(\n    now,\n    state,\n    currentUrl,\n    currentCanonicalUrl,\n    refreshSeed,\n    currentUrl,\n    currentRenderedSearch,\n    state.cache,\n    currentFlightRouterState,\n    freshnessPolicy,\n    nextUrlForRefresh,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    // A refresh is bound to the shared map.\n    segmentCacheMap,\n    null,\n    // Refresh navigations don't use route prediction, so there's no route\n    // cache entry to mark as having a dynamic rewrite on mismatch. If a\n    // mismatch occurs, the retry handler will traverse the known route tree\n    // to find and mark the entry.\n    null,\n    signal\n  )\n}\n","import type { CacheNode, ScrollRef } from '../../../shared/lib/app-router-types'\nimport type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\nimport type { FreshnessPolicy } from './ppr-navigations'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n  navigatedAt,\n  previousTree,\n  serverResponse,\n}: {\n  navigatedAt: number\n  previousTree: FlightRouterState\n  serverResponse: FetchServerResponseResult\n}) => void\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n  type: typeof ACTION_REFRESH\n  /**\n   * Bypass invalidating the segment cache. Used by the Instant Navigation\n   * Testing API to preserve prefetched data when refreshing after an MPA\n   * navigation. Not exposed in production builds by default.\n   */\n  bypassCacheInvalidation?: boolean\n}\n\nexport interface HmrRefreshAction {\n  type: typeof ACTION_HMR_REFRESH\n  signal?: AbortSignal\n}\n\nexport type ServerActionDispatcher = (\n  args: Omit<\n    ServerActionAction,\n    'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n  >\n) => void\n\nexport interface ServerActionAction {\n  type: typeof ACTION_SERVER_ACTION\n  actionId: string\n  actionArgs: any[]\n  resolve: (value: any) => void\n  reject: (reason?: any) => void\n  didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n *  - Apply router state tree from prefetch\n *  - Apply Flight data from prefetch to the cache\n *  - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n *  - Check if hard navigation is needed\n *    - Hard navigation happens when a dynamic parameter below the common layout changed\n *    - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n *    - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n *  - If hard navigation is not needed\n *    - The cache is reused\n *    - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n *  - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n *    - Flight data is fetched in the reducer (suspends the reducer)\n *    - Router state tree is created based on Flight data\n *    - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n  type: typeof ACTION_NAVIGATE\n  url: URL\n  isExternalUrl: boolean\n  locationSearch: Location['search']\n  navigateType: 'push' | 'replace'\n  scrollBehavior: ScrollBehavior\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n  type: typeof ACTION_RESTORE\n  url: URL\n  historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n  tree: FlightRouterState\n  renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n  type: typeof ACTION_SERVER_PATCH\n  previousTree: FlightRouterState\n  url: URL\n  nextUrl: string | null\n  seed: NavigationSeed | null\n  mpa: boolean\n  navigateType: 'push' | 'replace'\n  /**\n   * Freshness policy for the retry navigation. `RefreshAll` re-fetches the\n   * tree's dynamic data (genuine tree mismatch). `HistoryTraversal` reuses the\n   * data already in the tree (when only the URL needs correcting after a\n   * redirect).\n   */\n  freshnessPolicy: FreshnessPolicy.RefreshAll | FreshnessPolicy.HistoryTraversal\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n  AUTO = 'auto',\n  FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n  /**\n   * If the app-router should push a new history entry in app-router's useEffect()\n   */\n  pendingPush: boolean\n  /**\n   * Multi-page navigation through location.href.\n   */\n  mpaNavigation: boolean\n  /**\n   * Skip applying the router state to the browser history state.\n   */\n  preserveCustomHistoryState: boolean\n}\n\n/**\n * Controls the scroll behavior for a navigation.\n */\nexport const enum ScrollBehavior {\n  /** Use per-node ScrollRef to decide whether to scroll. */\n  Default = 0,\n  /** Suppress scroll entirely (e.g. scroll={false} on Link or router.push). */\n  NoScroll = 1,\n}\n\nexport type FocusAndScrollRef = {\n  /**\n   * The scroll ref from the most recent navigation. Set to whatever was\n   * accumulated during tree construction (or null if nothing was\n   * accumulated). On the next navigation, if new scroll targets are\n   * created, the previous scrollRef is invalidated by setting\n   * `current = false`.\n   */\n  scrollRef: ScrollRef | null\n  /**\n   * When true, the scroll handler uses `focusAndScrollRef.scrollRef`\n   * for every segment regardless of per-node state. Used for hash-only\n   * navigations where every segment should be treated as a scroll\n   * target. When false, the handler checks `cacheNode.scrollRef`\n   * instead (per-node), so only segments that actually navigated scroll.\n   */\n  forceScroll: boolean\n  /**\n   * The hash fragment that should be scrolled to.\n   */\n  hashFragment: string | null\n  /**\n   * If only the URLs hash fragment changed\n   */\n  onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n  /**\n   * The router state, this is written into the history state in app-router using replaceState/pushState.\n   * - Has to be serializable as it is written into the history state.\n   * - Holds which segments and parallel routes are shown on the screen.\n   */\n  tree: FlightRouterState\n  /**\n   * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n   * It also holds in-progress data requests.\n   */\n  cache: CacheNode\n  /**\n   * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n   */\n  pushRef: PushRef\n  /**\n   * Decides if the update should apply scroll and focus management.\n   */\n  focusAndScrollRef: FocusAndScrollRef\n  /**\n   * The canonical url that is pushed/replaced.\n   * - This is the url you see in the browser.\n   */\n  canonicalUrl: string\n\n  /**\n   * The search query observed by the server during rendering. This may be\n   * different from the canonical URL's search query if the server performed\n   * a rewrite. Even though a client component won't observe this (unless it\n   * were passed from a Server component), the client router needs to know this\n   * so it can properly cache segment data; it'ss part of a page segment's\n   * cache key.\n   */\n  renderedSearch: string\n\n  /**\n   * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n   */\n  nextUrl: string | null\n\n  /**\n   * The previous next-url that was used previous to a dynamic navigation.\n   */\n  previousNextUrl: string | null\n\n  debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n  | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n  | AppRouterState\nexport type ReducerActions = Readonly<\n  | RefreshAction\n  | NavigateAction\n  | RestoreAction\n  | ServerPatchAction\n  | HmrRefreshAction\n  | ServerActionAction\n>\n","'use client'\n\nimport {\n  computeCacheBustingSearchParam,\n  computeLegacyCacheBustingSearchParam,\n} from '../../../shared/lib/router/utils/cache-busting-search-param'\nimport {\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  NEXT_RSC_UNION_QUERY,\n} from '../app-router-headers'\nimport type { RequestHeaders } from './fetch-server-response'\n\nasync function computeClientCacheBustingSearchParam(\n  headers: RequestHeaders\n): Promise<string> {\n  if (typeof globalThis.crypto?.subtle?.digest === 'function') {\n    return computeCacheBustingSearchParam(\n      headers[NEXT_ROUTER_PREFETCH_HEADER],\n      headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n      headers[NEXT_ROUTER_STATE_TREE_HEADER],\n      headers[NEXT_URL]\n    )\n  }\n\n  return computeLegacyCacheBustingSearchParam(\n    headers[NEXT_ROUTER_PREFETCH_HEADER],\n    headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n    headers[NEXT_ROUTER_STATE_TREE_HEADER],\n    headers[NEXT_URL]\n  )\n}\n\n/**\n * Mutates the provided URL by adding a cache-busting search parameter for CDNs that don't\n * support custom headers. This helps avoid caching conflicts by making each request unique.\n *\n * Rather than relying on the Vary header which some CDNs ignore, we append a search param\n * to create a unique URL that forces a fresh request.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * Note: This function mutates the input URL directly and resolves once the\n * cache-busting value has been computed and applied.\n *\n * TODO: Since we need to use a search param anyway, we could simplify by removing the custom\n * headers approach entirely and just use search params.\n */\nexport const setCacheBustingSearchParam = async (\n  url: URL,\n  headers: RequestHeaders\n): Promise<void> => {\n  const uniqueCacheKey = await computeClientCacheBustingSearchParam(headers)\n  setCacheBustingSearchParamWithHash(url, uniqueCacheKey)\n}\n\n/**\n * Sets a cache-busting search parameter on a URL using a provided hash value.\n *\n * This function performs the same logic as `setCacheBustingSearchParam` but accepts\n * a pre-computed hash instead of computing it from headers.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * hash: \"abc123\"\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * If the hash is empty, we will set `_rsc` search param without a value.\n * Like this: https://example.com/path?query=1&_rsc\n *\n * Note: This function mutates the input URL directly and does not return anything.\n */\nexport const setCacheBustingSearchParamWithHash = (\n  url: URL,\n  hash: string\n): void => {\n  /**\n   * Note that we intentionally do not use `url.searchParams.set` here:\n   *\n   * const url = new URL('https://example.com/search?q=custom%20spacing');\n   * url.searchParams.set('_rsc', 'abc123');\n   * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123\n   *                                                                             ^ <--- this is causing confusion\n   * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but\n   * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom\n   * logic below.\n   */\n  const existingSearch = url.search\n  const rawQuery = existingSearch.startsWith('?')\n    ? existingSearch.slice(1)\n    : existingSearch\n\n  // Always remove any existing cache busting param and add a fresh one to ensure\n  // we have the correct value based on current request headers\n  const pairs = rawQuery\n    .split('&')\n    .filter((pair) => pair && !pair.startsWith(`${NEXT_RSC_UNION_QUERY}=`))\n\n  if (hash.length > 0) {\n    pairs.push(`${NEXT_RSC_UNION_QUERY}=${hash}`)\n  } else {\n    pairs.push(`${NEXT_RSC_UNION_QUERY}`)\n  }\n  url.search = pairs.length ? `?${pairs.join('&')}` : ''\n}\n","import { DYNAMIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport type { SegmentVaryPath } from './vary-path'\n\n/**\n * Sentinel value indicating that no per-page dynamic stale time was provided.\n * When this is the dynamicStaleTime, the default DYNAMIC_STALETIME_MS is used.\n */\nexport const UnknownDynamicStaleTime = -1\n\n/**\n * Converts a dynamic stale time (in seconds, as sent by the server in the `d`\n * field of the Flight response) to an absolute staleAt timestamp. When the\n * value is unknown, falls back to the global DYNAMIC_STALETIME_MS.\n */\nexport function computeDynamicStaleAt(\n  now: number,\n  dynamicStaleTimeSeconds: number\n): number {\n  return dynamicStaleTimeSeconds !== UnknownDynamicStaleTime\n    ? now + dynamicStaleTimeSeconds * 1000\n    : now + DYNAMIC_STALETIME_MS\n}\nimport {\n  setInCacheMap,\n  getFromCacheMap,\n  EntryStatus,\n  type UnknownMapEntry,\n  type CacheMap,\n  createCacheMap,\n} from './cache-map'\n\nexport type BFCacheEntry = {\n  rsc: React.ReactNode | null\n  prefetchRsc: React.ReactNode | null\n  head: React.ReactNode | null\n  prefetchHead: React.ReactNode | null\n\n  // The bfcacheId of the CacheNode that wrote this entry. Restored on\n  // history-traversal navigations so that `useRouter().bfcacheId` is stable\n  // across back/forward, even without `cacheComponents` Activity preservation.\n  bfcacheId: number\n\n  ref: UnknownMapEntry | null\n  size: number\n  // The time at which this data was received. Used to compute the stale time\n  // for dynamic prefetches (which use STATIC_STALETIME_MS instead of\n  // DYNAMIC_STALETIME_MS). Stored explicitly because staleAt may be\n  // overridden by a per-page unstable_dynamicStaleTime, which would break\n  // any reverse calculation from staleAt.\n  navigatedAt: number\n  staleAt: number\n  version: number\n  // A BFCacheEntry always represents a completed navigation, so the status is\n  // always Fulfilled. The field exists so that BFCacheEntry conforms to the\n  // MapValue protocol.\n  status: EntryStatus.Fulfilled\n}\n\nconst bfcacheMap: CacheMap<BFCacheEntry> = createCacheMap()\n\nlet currentBfCacheVersion = 0\n\nexport function invalidateBfCache(): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n  currentBfCacheVersion++\n}\n\nexport function writeToBFCache(\n  now: number,\n  varyPath: SegmentVaryPath,\n  rsc: React.ReactNode,\n  prefetchRsc: React.ReactNode,\n  head: React.ReactNode,\n  prefetchHead: React.ReactNode,\n  dynamicStaleAt: number,\n  bfcacheId: number\n): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  const entry: BFCacheEntry = {\n    rsc,\n    prefetchRsc,\n\n    // TODO: These fields will be removed from both BFCacheEntry and\n    // SegmentCacheEntry. The head has its own separate cache entry.\n    head,\n    prefetchHead,\n\n    bfcacheId,\n\n    ref: null,\n    // TODO: This is just a heuristic. Getting the actual size of the segment\n    // isn't feasible because it's part of a larger streaming response. The\n    // LRU will still evict it, we just won't have a fully accurate total\n    // LRU size. However, we'll probably remove the size tracking from the LRU\n    // entirely and use memory pressure events instead.\n    size: 100,\n\n    navigatedAt: now,\n\n    // A back/forward navigation will disregard the stale time. This field is\n    // only relevant when staleTimes.dynamic is enabled or unstable_dynamicStaleTime\n    // is exported by a page.\n    staleAt: dynamicStaleAt,\n    version: currentBfCacheVersion,\n    status: EntryStatus.Fulfilled,\n  }\n  const isRevalidation = false\n  setInCacheMap(bfcacheMap, varyPath, entry, isRevalidation)\n}\n\nexport function writeHeadToBFCache(\n  now: number,\n  varyPath: SegmentVaryPath,\n  head: React.ReactNode,\n  prefetchHead: React.ReactNode,\n  dynamicStaleAt: number,\n  bfcacheId: number\n): void {\n  // Read the special \"segment\" that represents the head data.\n  writeToBFCache(\n    now,\n    varyPath,\n    head,\n    prefetchHead,\n    null,\n    null,\n    dynamicStaleAt,\n    bfcacheId\n  )\n}\n\n/**\n * Update the staleAt of an existing BFCache entry. Used after a dynamic\n * response arrives with a per-page stale time from `unstable_dynamicStaleTime`.\n * The per-page value is authoritative — it overrides whatever staleAt was set\n * by the default DYNAMIC_STALETIME_MS.\n */\nexport function updateBFCacheEntryStaleAt(\n  varyPath: SegmentVaryPath,\n  newStaleAt: number\n): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n  const isRevalidation = false\n  // Read with staleness bypass (-1) so we can update even stale entries\n  const entry = getFromCacheMap(\n    -1,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation,\n    false\n  )\n  if (entry !== null) {\n    entry.staleAt = newStaleAt\n  }\n}\n\nexport function readFromBFCache(\n  varyPath: SegmentVaryPath\n): BFCacheEntry | null {\n  if (typeof window === 'undefined') {\n    return null\n  }\n  const isRevalidation = false\n  return getFromCacheMap(\n    // During a back/forward navigation, it doesn't matter how stale the data\n    // might be. Pass -1 instead of the actual current time to bypass\n    // staleness checks.\n    -1,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation,\n    false\n  )\n}\n\nexport function readFromBFCacheDuringRegularNavigation(\n  now: number,\n  varyPath: SegmentVaryPath\n): BFCacheEntry | null {\n  if (typeof window === 'undefined') {\n    return null\n  }\n  const isRevalidation = false\n  return getFromCacheMap(\n    now,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation,\n    false\n  )\n}\n","// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\n// Only functions in this module should be allowed to create CacheKeys.\nexport type NormalizedPathname = Opaque<'NormalizedPathname', string>\nexport type NormalizedSearch = Opaque<'NormalizedSearch', string>\nexport type NormalizedNextUrl = Opaque<'NormalizedNextUrl', string>\n\nexport type RouteCacheKey = Opaque<\n  'RouteCacheKey',\n  {\n    pathname: NormalizedPathname\n    search: NormalizedSearch\n    nextUrl: NormalizedNextUrl | null\n\n    // TODO: Eventually the dynamic params will be added here, too.\n  }\n>\n\nexport function createCacheKey(\n  originalHref: string,\n  nextUrl: string | null\n): RouteCacheKey {\n  const originalUrl = new URL(originalHref)\n  const cacheKey = {\n    pathname: originalUrl.pathname as NormalizedPathname,\n    search: originalUrl.search as NormalizedSearch,\n    nextUrl: nextUrl as NormalizedNextUrl | null,\n  } as RouteCacheKey\n  return cacheKey\n}\n\n/**\n * Splits a pathname into its non-empty parts. Equivalent to\n * `pathname.split('/').filter((p) => p !== '')` — empty tokens produced by\n * leading, trailing, or consecutive slashes are skipped.\n *\n * We use a manual loop instead of `split` + `filter` because\n * `String.prototype.split` can return arrays with either the packed or holey\n * elements kind depending on internal fast paths, and `filter`/`slice`\n * propagate the kind. Mixing holey and packed arrays at the same call sites\n * makes downstream array method loads (`slice`, `join`, `length`) polymorphic\n * and causes repeated \"wrong map\" deoptimizations in hot route-matching code.\n * Pushing into an array literal guarantees a packed elements kind.\n */\nexport function splitPathnameIntoParts(pathname: string): Array<string> {\n  const parts: Array<string> = []\n  let start = 0\n  for (let i = 0; i < pathname.length; i++) {\n    if (pathname.charCodeAt(i) === 47 /* '/' */) {\n      if (i > start) {\n        parts.push(pathname.slice(start, i))\n      }\n      start = i + 1\n    }\n  }\n  if (start < pathname.length) {\n    parts.push(pathname.slice(start))\n  }\n  return parts\n}\n","import type { VaryPath } from './vary-path'\nimport { lruPut, updateLruSize, deleteFromLru } from './lru'\n\n/**\n * A specialized data type for storing multi-key cache entries.\n *\n * The basic structure is a map whose keys are tuples, called the keypath.\n * When querying the cache, keypaths are compared per-element.\n *\n * Example:\n *   set(map, ['https://localhost', 'foo/bar/baz'], 'yay');\n *   get(map, ['https://localhost', 'foo/bar/baz']) -> 'yay'\n *\n * NOTE: Array syntax is used in these examples for illustration purposes, but\n * in reality the paths are lists.\n * \n * The parts of the keypath represent the different inputs that contribute\n * to the entry value. To illustrate, if you were to use this data type to store\n * HTTP responses, the keypath would include the URL and everything listed by\n * the Vary header.\n * \n * See vary-path.ts for more details.\n *\n * The order of elements in a keypath must be consistent between lookups to\n * be considered the same, but besides that, the order of the keys is not\n * semantically meaningful.\n *\n * Keypaths may include a special kind of key called Fallback. When an entry is\n * stored with Fallback as part of its keypath, it means that the entry does not\n * vary by that key. When querying the cache, if an exact match is not found for\n * a keypath, the cache will check for a Fallback match instead. Each element of\n * the keypath may have a Fallback, so retrieval is an O(n ^ 2) operation, but\n * it's expected that keypaths are relatively short.\n *\n * Example:\n *   set(cacheMap, ['store', 'product', 1], PRODUCT_PAGE_1);\n *   set(cacheMap, ['store', 'product', Fallback], GENERIC_PRODUCT_PAGE);\n *\n *   // Exact match\n *   get(cacheMap, ['store', 'product', 1]) -> PRODUCT_PAGE_1\n *\n *   // Fallback match\n *   get(cacheMap, ['store', 'product', 2]) -> GENERIC_PRODUCT_PAGE\n *\n * Because we have the Fallback mechanism, we can impose a constraint that\n * regular JS maps do not have: a value cannot be stored at multiple keypaths\n * simultaneously. These cases should be expressed with Fallback keys instead.\n *\n * Additionally, because values only exist at a single keypath at a time, we\n * can optimize successive lookups by caching the internal map entry on the\n * value itself, using the `ref` field. This is especially useful because it\n * lets us skip the O(n ^ 2) lookup that occurs when Fallback entries\n * are present.\n *\n\n * How to decide if stuff belongs in here, or in cache.ts?\n * -------------------------------------------------------\n * \n * Anything to do with retrival, lifetimes, or eviction needs to go in this\n * module because it affects the fallback algorithm. For example, when\n * performing a lookup, if an entry is stale, it needs to be treated as\n * semantically equivalent to if the entry was not present at all.\n * \n * If there's logic that's not related to the fallback algorithm, though, we\n * should prefer to put it in cache.ts.\n */\n\n/**\n * Tracks the status of a cache entry as it progresses from no data (Empty),\n * waiting for server data (Pending), and finished (either Fulfilled or\n * Rejected depending on the response from the server.\n *\n * This is defined here, rather than in cache.ts, because cache-map.ts needs to\n * inspect the status when performing a `onlyMatchFulfilled` lookup.\n */\nexport const enum EntryStatus {\n  Empty = 0,\n  Pending = 1,\n  Fulfilled = 2,\n  Rejected = 3,\n}\n\n// The protocol that values must implement. In practice, the only types that\n// we ever actually deal with in this module are RouteCacheEntry,\n// SegmentCacheEntry, and BFCacheEntry; this is just to keep track of the\n// coupling so we don't leak concerns between the modules unnecessarily.\nexport interface MapValue {\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n  status: EntryStatus\n}\n\n/**\n * Represents a node in the cache map and LRU.\n * MapEntry<V> structurally satisfies this interface for any V extends MapValue.\n *\n * The LRU can contain entries of different value types\n * (e.g., both RouteCacheEntry and SegmentCacheEntry). This interface captures\n * the common structure needed for cache map and LRU operations without\n * requiring knowledge of the specific value type.\n */\nexport interface MapEntry<V extends MapValue> {\n  // Cache map structure fields\n  parent: MapEntry<V> | null\n  key: unknown\n  map: Map<unknown, MapEntry<V>> | null\n  value: V | null\n\n  // LRU linked list fields\n  prev: MapEntry<V> | null\n  next: MapEntry<V> | null\n  size: number\n}\n\n/**\n * A looser type for MapEntry\n * This allows the LRU to work with entries of different\n * value types while still providing type safety.\n *\n * The `map` field lets Map<unknown, MapEntry<V>> be assignable to this\n * type since we're only reading from the map, not inserting into it.\n */\nexport type UnknownMapEntry = {\n  parent: UnknownMapEntry | null\n  key: unknown\n  map: Pick<Map<unknown, UnknownMapEntry>, 'get' | 'delete' | 'size'> | null\n  value: MapValue | null\n\n  prev: UnknownMapEntry | null\n  next: UnknownMapEntry | null\n  size: number\n}\n\n// The CacheMap type is just the root entry of the map.\nexport type CacheMap<V extends MapValue> = MapEntry<V>\n\nexport type FallbackType = { __brand: 'Fallback' }\nexport const Fallback = {} as FallbackType\n\n// This is a special internal key that is used for \"revalidation\" entries. It's\n// an implementation detail that shouldn't leak outside of this module.\nconst Revalidation = {}\n\nexport function createCacheMap<V extends MapValue>(): CacheMap<V> {\n  const cacheMap: MapEntry<V> = {\n    parent: null,\n    key: null,\n    value: null,\n    map: null,\n\n    // LRU-related fields\n    prev: null,\n    next: null,\n    size: 0,\n  }\n  return cacheMap\n}\n\nfunction getOrInitialize<V extends MapValue>(\n  cacheMap: CacheMap<V>,\n  keys: VaryPath,\n  isRevalidation: boolean\n): MapEntry<V> {\n  // Go through each level of keys until we find the entry that matches, or\n  // create a new entry if one doesn't exist.\n  //\n  // This function will only return entries that match the keypath _exactly_.\n  // Unlike getWithFallback, it will not access fallback entries unless it's\n  // explicitly part of the keypath.\n  let entry = cacheMap\n  let remainingKeys: VaryPath | null = keys\n  let key: unknown | null = null\n  while (true) {\n    const previousKey = key\n    if (remainingKeys !== null) {\n      key = remainingKeys.value\n      remainingKeys = remainingKeys.parent\n    } else if (isRevalidation && previousKey !== Revalidation) {\n      // During a revalidation, we append an internal \"Revalidation\" key to\n      // the end of the keypath. The \"normal\" entry is its parent.\n\n      // However, if the parent entry is currently empty, we don't need to store\n      // this as a revalidation entry. Just insert the revalidation into the\n      // normal slot.\n      if (entry.value === null) {\n        return entry\n      }\n\n      // Otheriwse, create a child entry.\n      key = Revalidation\n    } else {\n      // There are no more keys. This is the terminal entry.\n      break\n    }\n\n    let map = entry.map\n    if (map !== null) {\n      const existingEntry = map.get(key)\n      if (existingEntry !== undefined) {\n        // Found a match. Keep going.\n        entry = existingEntry\n        continue\n      }\n    } else {\n      map = new Map()\n      entry.map = map\n    }\n    // No entry exists yet at this level. Create a new one.\n    const newEntry: MapEntry<V> = {\n      parent: entry,\n      key,\n      value: null,\n      map: null,\n\n      // LRU-related fields\n      prev: null,\n      next: null,\n      size: 0,\n    }\n    map.set(key, newEntry)\n    entry = newEntry\n  }\n\n  return entry\n}\n\nexport function getFromCacheMap<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  rootEntry: CacheMap<V>,\n  keys: VaryPath,\n  isRevalidation: boolean,\n  // When true, terminal entries whose status is not Fulfilled are skipped, so\n  // the lookup falls through to a less-specific Fallback entry. Use this\n  // during a navigation to prefer a Fulfilled shell entry over a more-specific\n  // Pending entry that may still be in-flight. Callers that want to also\n  // accept non-Fulfilled entries should perform a second lookup with this set\n  // to false.\n  onlyMatchFulfilled: boolean\n): V | null {\n  const entry = getEntryWithFallbackImpl(\n    now,\n    currentCacheVersion,\n    rootEntry,\n    keys,\n    isRevalidation,\n    0,\n    onlyMatchFulfilled\n  )\n  if (entry === null || entry.value === null) {\n    return null\n  }\n  // This is an LRU access. Move the entry to the front of the list.\n  lruPut(entry)\n  return entry.value\n}\n\nexport function isValueExpired(\n  now: number,\n  currentCacheVersion: number,\n  value: MapValue\n): boolean {\n  return value.staleAt <= now || value.version < currentCacheVersion\n}\n\nfunction lazilyEvictIfNeeded<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  entry: MapEntry<V>,\n  onlyMatchFulfilled: boolean\n) {\n  // We have a matching entry, but before we can return it, we need to check if\n  // it's still fresh. Otherwise it should be treated the same as a cache miss.\n\n  if (entry.value === null) {\n    // This entry has no value, so there's nothing to evict.\n    return entry\n  }\n\n  const value = entry.value\n  if (isValueExpired(now, currentCacheVersion, value)) {\n    // The value expired. Lazily evict it from the cache, and return null. This\n    // is conceptually the same as a cache miss.\n    deleteMapEntry(entry)\n    return null\n  }\n\n  if (onlyMatchFulfilled && value.status !== EntryStatus.Fulfilled) {\n    // The entry is fresh but is not Fulfilled. Treat as a non-match so the\n    // recursion can continue and try a Fallback entry.\n    return null\n  }\n\n  // The matched entry has not expired. Return it.\n  return entry\n}\n\nfunction getEntryWithFallbackImpl<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  entry: MapEntry<V>,\n  keys: VaryPath | null,\n  isRevalidation: boolean,\n  previousKey: unknown | null,\n  onlyMatchFulfilled: boolean\n): MapEntry<V> | null {\n  // This is similar to getExactEntry, but if an exact match is not found for\n  // a key, it will return the fallback entry instead. This is recursive at\n  // every level, e.g. an entry with keypath [a, Fallback, c, Fallback] is\n  // valid match for [a, b, c, d].\n  //\n  // It will return the most specific match available.\n  //\n  // When `onlyMatchFulfilled` is true, terminal entries that aren't Fulfilled\n  // are treated as non-matches, so the recursion will continue searching for\n  // a Fallback match. See getFromCacheMap for the rationale.\n  let key\n  let remainingKeys: VaryPath | null\n  if (keys !== null) {\n    key = keys.value\n    remainingKeys = keys.parent\n  } else if (isRevalidation && previousKey !== Revalidation) {\n    // During a revalidation, we append an internal \"Revalidation\" key to\n    // the end of the keypath.\n    key = Revalidation\n    remainingKeys = null\n  } else {\n    // There are no more keys. This is the terminal entry.\n    return lazilyEvictIfNeeded(\n      now,\n      currentCacheVersion,\n      entry,\n      onlyMatchFulfilled\n    )\n  }\n  const map = entry.map\n  if (map !== null) {\n    const existingEntry = map.get(key)\n    if (existingEntry !== undefined) {\n      // Found an exact match for this key. Keep searching.\n      const result = getEntryWithFallbackImpl(\n        now,\n        currentCacheVersion,\n        existingEntry,\n        remainingKeys,\n        isRevalidation,\n        key,\n        onlyMatchFulfilled\n      )\n      if (result !== null) {\n        return result\n      }\n    }\n    // No match found for this key. Check if there's a fallback.\n    const fallbackEntry = map.get(Fallback)\n    if (fallbackEntry !== undefined) {\n      // Found a fallback for this key. Keep searching.\n      return getEntryWithFallbackImpl(\n        now,\n        currentCacheVersion,\n        fallbackEntry,\n        remainingKeys,\n        isRevalidation,\n        key,\n        onlyMatchFulfilled\n      )\n    }\n  }\n  return null\n}\n\nexport function setInCacheMap<V extends MapValue>(\n  cacheMap: CacheMap<V>,\n  keys: VaryPath,\n  value: V,\n  isRevalidation: boolean\n): void {\n  // Add a value to the map at the given keypath. If the value is already\n  // part of the map, it's removed from its previous keypath. (NOTE: This is\n  // unlike a regular JS map, but the behavior is intentional.)\n  const entry = getOrInitialize(cacheMap, keys, isRevalidation)\n  setMapEntryValue(entry, value)\n\n  // This is an LRU access. Move the entry to the front of the list.\n  lruPut(entry)\n  updateLruSize(entry, value.size)\n}\n\nfunction setMapEntryValue(entry: UnknownMapEntry, value: MapValue): void {\n  if (entry.value !== null) {\n    // There's already a value at the given keypath. Disconnect the old value\n    // from the map. We're not calling `deleteMapEntry` here because the\n    // entry itself is still in the map. We just want to overwrite its value.\n    dropRef(entry.value)\n    entry.value = null\n  }\n\n  // This value may already be in the map at a different keypath.\n  // Grab a reference before we overwrite it.\n  const oldEntry = value.ref\n\n  entry.value = value\n  value.ref = entry\n\n  updateLruSize(entry, value.size)\n\n  if (oldEntry !== null && oldEntry !== entry && oldEntry.value === value) {\n    // This value is already in the map at a different keypath in the map.\n    // Values only exist at a single keypath at a time. Remove it from the\n    // previous keypath.\n    //\n    // Note that only the internal map entry is garbage collected; we don't\n    // call `dropRef` here because it's still in the map, just\n    // at a new keypath (the one we just set, above).\n    deleteMapEntry(oldEntry)\n  }\n}\n\nexport function deleteFromCacheMap(value: MapValue): void {\n  const entry = value.ref\n  if (entry === null) {\n    // This value is not a member of any map.\n    return\n  }\n\n  dropRef(value)\n  deleteMapEntry(entry)\n}\n\nfunction dropRef(value: MapValue): void {\n  // Drop the value from the map by setting its `ref` backpointer to\n  // null. This is a separate operation from `deleteMapEntry` because when\n  // re-keying a value we need to be able to delete the old, internal map\n  // entry without garbage collecting the value itself.\n  value.ref = null\n}\n\nexport function deleteMapEntry(entry: UnknownMapEntry): void {\n  // Delete the entry from the cache.\n  entry.value = null\n\n  deleteFromLru(entry)\n\n  // Check if we can garbage collect the entry.\n  const map = entry.map\n  if (map === null) {\n    // Since this entry has no value, and also no child entries, we can\n    // garbage collect it. Remove it from its parent, and keep garbage\n    // collecting the parents until we reach a non-empty entry.\n    let parent = entry.parent\n    let key = entry.key\n    while (parent !== null) {\n      const parentMap = parent.map\n      if (parentMap !== null) {\n        parentMap.delete(key)\n        if (parentMap.size === 0) {\n          // We just removed the last entry in the parent map.\n          parent.map = null\n          if (parent.value === null) {\n            // The parent node has no child entries, nor does it have a value\n            // on itself. It can be garbage collected. Keep going.\n            key = parent.key\n            parent = parent.parent\n            continue\n          }\n        }\n      }\n      // The parent is not empty. Stop garbage collecting.\n      break\n    }\n  } else {\n    // Check if there's a revalidating entry. If so, promote it to a\n    // \"normal\" entry, since the normal one was just deleted.\n    const revalidatingEntry = map.get(Revalidation)\n    if (revalidatingEntry !== undefined && revalidatingEntry.value !== null) {\n      setMapEntryValue(entry, revalidatingEntry.value)\n    }\n  }\n}\n\nexport function setSizeInCacheMap<V extends MapValue>(\n  value: V,\n  size: number\n): void {\n  const entry = value.ref\n  if (entry === null) {\n    // This value is not a member of any map.\n    return\n  }\n  // Except during initialization (when the size is set to 0), this is the only\n  // place the `size` field should be updated, to ensure it's in sync with the\n  // the LRU.\n  value.size = size\n  updateLruSize(entry, size)\n}\n","import type {\n  TreePrefetch,\n  RootTreePrefetch,\n  SegmentPrefetchResponse,\n} from '../../../server/app-render/collect-segment-data'\nimport type {\n  CacheNodeSeedData,\n  FlightData,\n  Segment as FlightRouterStateSegment,\n} from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport {\n  readVaryParams,\n  type VaryParams,\n  type VaryParamsIterable,\n} from '../../../shared/lib/segment-cache/vary-params-decoding'\nimport {\n  NEXT_DID_POSTPONE_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STALE_TIME_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_CONTENT_TYPE_HEADER,\n  RSC_HEADER,\n} from '../app-router-headers'\nimport {\n  createFetch,\n  createFromNextReadableStream,\n  decodeBufferedStage,\n  resolveShellStageData,\n  type RSCResponse,\n  type RequestHeaders,\n} from '../router-reducer/fetch-server-response'\nimport { fetch } from './fetch'\nimport {\n  pingPrefetchTask,\n  isPrefetchTaskDirty,\n  type PrefetchTask,\n  type PrefetchSubtaskResult,\n} from './scheduler'\nimport {\n  type RouteVaryPath,\n  type SegmentVaryPath,\n  type PartialSegmentVaryPath,\n  getRouteVaryPath,\n  getFulfilledRouteVaryPath,\n  getFulfilledSegmentVaryPath,\n  getSegmentVaryPathForRequest,\n  getShellSegmentVaryPath,\n  appendLayoutVaryPath,\n  finalizeLayoutVaryPath,\n  finalizePageVaryPath,\n  clonePageVaryPathWithNewSearchParams,\n  type PageVaryPath,\n  type LayoutVaryPath,\n  finalizeMetadataVaryPath,\n  getPartialPageVaryPath,\n  getPartialLayoutVaryPath,\n  getRenderedSearchFromVaryPath,\n} from './vary-path'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n  NormalizedNextUrl,\n  RouteCacheKey,\n} from './cache-key'\nimport { createCacheKey as createPrefetchRequestKey } from './cache-key'\nimport { splitPathnameIntoParts } from './cache-key'\nimport {\n  doesStaticSegmentAppearInURL,\n  getCacheKeyForDynamicParam,\n  getRenderedPathname,\n  getRenderedSearch,\n  parseDynamicParamFromURLPart,\n} from '../../route-params'\nimport {\n  createCacheMap,\n  getFromCacheMap,\n  setInCacheMap,\n  setSizeInCacheMap,\n  deleteFromCacheMap,\n  isValueExpired,\n  EntryStatus,\n  type CacheMap,\n  type UnknownMapEntry,\n} from './cache-map'\nexport { EntryStatus } from './cache-map'\nimport {\n  appendSegmentRequestKeyPart,\n  convertSegmentPathToStaticExportFilename,\n  createSegmentRequestKeyPart,\n  HEAD_REQUEST_KEY,\n  ROOT_SEGMENT_REQUEST_KEY,\n  type SegmentRequestKey,\n} from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport type {\n  FlightRouterState,\n  NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\nimport {\n  type NormalizedFlightData,\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n} from '../../flight-data-helpers'\nimport { STATIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport { pingVisibleLinks } from '../links'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\nimport { FetchStrategy } from './types'\nimport { createPromiseWithResolvers } from '../../../shared/lib/promise-with-resolvers'\nimport { readFromBFCache, UnknownDynamicStaleTime } from './bfcache'\nimport { discoverKnownRoute, matchKnownRoute } from './optimistic-routes'\nimport { convertServerPatchToFullTree, type NavigationSeed } from './navigation'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\n\n/**\n * Ensures a minimum stale time of 30s to avoid issues where the server sends a too\n * short-lived stale time, which would prevent anything from being prefetched.\n */\nexport function getStaleTimeMs(staleTimeSeconds: number): number {\n  return Math.max(staleTimeSeconds, 30) * 1000\n}\n\n// A note on async/await when working in the prefetch cache:\n//\n// Most async operations in the prefetch cache should *not* use async/await,\n// Instead, spawn a subtask that writes the results to a cache entry, and attach\n// a \"ping\" listener to notify the prefetch queue to try again.\n//\n// The reason is we need to be able to access the segment cache and traverse its\n// data structures synchronously. For example, if there's a synchronous update\n// we can take an immediate snapshot of the cache to produce something we can\n// render. Limiting the use of async/await also makes it easier to avoid race\n// conditions, which is especially important because is cache is mutable.\n//\n// Another reason is that while we're performing async work, it's possible for\n// existing entries to become stale, or for Link prefetches to be removed from\n// the queue. For optimal scheduling, we need to be able to \"cancel\" subtasks\n// that are no longer needed. So, when a segment is received from the server, we\n// restart from the root of the tree that's being prefetched, to confirm all the\n// parent segments are still cached. If the segment is no longer reachable from\n// the root, then it's effectively canceled. This is similar to the design of\n// Rust Futures, or React Suspense.\n\ntype RouteTreeShared = {\n  requestKey: SegmentRequestKey\n  // TODO: Remove the `segment` field, now that it can be reconstructed\n  // from `param`.\n  segment: FlightRouterStateSegment\n  // The vary path used to key this segment's App Shell entry: the segment's\n  // vary path with every non-root param replaced with Fallback (see\n  // getShellSegmentVaryPath). Precomputed once during tree construction so we\n  // don't have to recompute it on every shell request.\n  shellVaryPath: SegmentVaryPath\n  refreshState: RefreshState | null\n  // Keyed by parallel route slot name. Stored as a Map rather than a plain\n  // object because slot names are app-defined; with a plain object, every\n  // distinct combination of slot names creates a different hidden class,\n  // making keyed access to the slots megamorphic.\n  slots: null | Map<string, RouteTree>\n  // Bitmask of PrefetchHint flags. Encodes route structure metadata:\n  // root layout, loading boundaries, instant configs, and runtime prefetch\n  // hints.\n  prefetchHints: number\n}\n\nexport type RefreshState = {\n  canonicalUrl: string\n  renderedSearch: NormalizedSearch\n}\n\ntype LayoutRouteTree = RouteTreeShared & {\n  isPage: false\n  varyPath: LayoutVaryPath\n}\n\ntype PageRouteTree = RouteTreeShared & {\n  isPage: true\n  varyPath: PageVaryPath\n}\n\nexport type RouteTree = LayoutRouteTree | PageRouteTree\n\ntype RouteCacheEntryShared = {\n  // This is false only if we're certain the route cannot be intercepted. It's\n  // true in all other cases, including on initialization when we haven't yet\n  // received a response from the server.\n  couldBeIntercepted: boolean\n\n  // When true, this entry should not be used as a template for route\n  // prediction. Set when we discover that the URL was rewritten by middleware\n  // to a different route structure (e.g., /foo was rewritten to /bar). Since\n  // rewrite behavior can vary by param value, we can't safely predict the\n  // route structure for other URLs matching this pattern.\n  //\n  // This is declared on every entry variant (not just fulfilled entries) so\n  // that all RouteCacheEntry objects share a single hidden class; it is\n  // pre-initialized to `false` when the entry is created and only meaningful\n  // once the entry is fulfilled.\n  hasDynamicRewrite: boolean\n\n  // Map-related fields.\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n}\n\nexport type PendingRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Empty | EntryStatus.Pending\n  blockedTasks: Set<PrefetchTask> | null\n  canonicalUrl: null\n  renderedSearch: null\n  tree: null\n  metadata: null\n  supportsPerSegmentPrefetching: false\n}\n\ntype RejectedRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Rejected\n  blockedTasks: Set<PrefetchTask> | null\n  canonicalUrl: null\n  renderedSearch: null\n  tree: null\n  metadata: null\n  supportsPerSegmentPrefetching: boolean\n}\n\nexport type FulfilledRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Fulfilled\n  blockedTasks: null\n  canonicalUrl: string\n  renderedSearch: NormalizedSearch\n  tree: RouteTree\n  metadata: RouteTree\n  supportsPerSegmentPrefetching: boolean\n}\n\nexport type RouteCacheEntry =\n  | PendingRouteCacheEntry\n  | FulfilledRouteCacheEntry\n  | RejectedRouteCacheEntry\n\ntype SegmentCacheEntryShared = {\n  /**\n   * The fetch strategy this entry's content EFFECTIVELY corresponds to,\n   * which may be deeper than the strategy that requested it: an entry is\n   * recorded at the tier of the payload that fully satisfied it (e.g. a\n   * shell-spawned entry fulfilled by a response whose shell IS the full\n   * response is recorded at the full tier, while still keyed at the shell\n   * vary path — valid precisely because the variants coincide). Compared\n   * via `canNewFetchStrategyProvideMoreContent` to decide whether a new\n   * request could yield more content than what's already cached.\n   *\n   * \"Effectively\" spans both of the tier axes, static-vs-runtime included: a\n   * static response that accessed no runtime data is as complete as a runtime\n   * response of the same variant, so it records the RUNTIME tier (see\n   * `recordedFetchStrategy` in writeSegmentBundleResponse). That is what lets\n   * \"would a runtime request return more?\" be answered by comparing tiers,\n   * with no separate per-entry signal — the question the scheduler asks in\n   * `wouldRuntimeRequestProvideMore`.\n   */\n  fetchStrategy: FetchStrategy\n\n  /**\n   * True if this entry was fulfilled from a fallback shell response (the page\n   * had not yet been prerendered with concrete params). The scheduler uses\n   * this to retry the static prefetch, since a more complete version may\n   * become available once the server's background regeneration finishes.\n   *\n   * Distinct from `isPartial`: a fully-prerendered PPR page can have partial\n   * segments that should NOT be retried. See `SegmentPrefetchResponse`.\n   */\n  isUpgradeableISRFallback: boolean\n\n  // Map-related fields.\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n}\n\nexport type EmptySegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Empty\n  blockedTasks: Set<PrefetchTask> | null\n  rsc: null\n  isPartial: true\n  promise: null\n}\n\nexport type PendingSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Pending\n  blockedTasks: Set<PrefetchTask> | null\n  rsc: null\n  isPartial: boolean\n  promise: null | PromiseWithResolvers<FulfilledSegmentCacheEntry | null>\n}\n\ntype RejectedSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Rejected\n  blockedTasks: Set<PrefetchTask> | null\n  rsc: null\n  isPartial: true\n  promise: null\n}\n\nexport type FulfilledSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Fulfilled\n  blockedTasks: null\n  rsc: React.ReactNode | null\n  isPartial: boolean\n  promise: null\n}\n\nexport type SegmentCacheEntry =\n  | EmptySegmentCacheEntry\n  | PendingSegmentCacheEntry\n  | RejectedSegmentCacheEntry\n  | FulfilledSegmentCacheEntry\n\nexport type NonEmptySegmentCacheEntry = Exclude<\n  SegmentCacheEntry,\n  EmptySegmentCacheEntry\n>\n\n/**\n * A linked list of segment cache entries to fulfill from a single prefetch\n * response. The head is the requested segment; subsequent nodes are parent\n * segments whose data is bundled into the same response by the server.\n *\n * When segments are not bundled, the list has a single node. The list\n * maps 1:1 to the data array in the SegmentPrefetchResponse the server returns.\n */\nexport type SegmentBundle = {\n  // Null when the segment has prefetching disabled entirely\n  // (prefetch: 'force-disabled' / instant = false; Partial Prefetching\n  // segments have static data and occupy a real node). The bundle chain\n  // passes through it but no cache entry is created.\n  tree: RouteTree | null\n  entry: SegmentCacheEntry | null\n  parent: SegmentBundle | null\n}\n\nconst isOutputExportMode =\n  process.env.NODE_ENV === 'production' &&\n  process.env.__NEXT_CONFIG_OUTPUT === 'export'\n\nexport const MetadataOnlyRequestTree: FlightRouterState = [\n  '',\n  {},\n  null,\n  'metadata-only',\n]\n\nconst routeCacheMap: CacheMap<RouteCacheEntry> = createCacheMap()\n\n/**\n * The shared segment cache map. Segment cache functions do not access this\n * ambiently — every unit of work is bound to a map when it is created, and\n * reads and writes receive that map explicitly:\n *\n * - A prefetch task captures its map when it is scheduled\n *   (`PrefetchTask.segmentCacheMap` in scheduler.ts). Almost always this one;\n *   a task scheduled while the Instant Navigation Testing lock is held gets\n *   the lock scope's private map instead (which starts empty and is discarded\n *   at release), so a locked navigation observes only data fetched under the\n *   lock — never a stale entry left in the shared cache by an earlier\n *   navigation, prefetch, or scope.\n * - A locked navigation inherits the map of the prefetch task that drives it\n *   (see `ensurePrefetchThenNavigate` in navigation.ts).\n * - Everything else — unlocked navigations, hydration, and router work that\n *   is not a captured navigation (refreshes, history-traversal restores,\n *   server-action redirects, server patches) — uses this shared map\n *   directly, even while a lock is held.\n *\n * Binding at creation means a task queued before a lock scope begins never\n * leaks entries into the scope's map (or reads out of it), and a scope task's\n * late responses never leak into the shared map.\n */\nexport const segmentCacheMap: CacheMap<SegmentCacheEntry> = createCacheMap()\n\n// All invalidation listeners for the whole cache are tracked in single set.\n// Since we don't yet support tag or path-based invalidation, there's no point\n// tracking them any more granularly than this. Once we add granular\n// invalidation, that may change, though generally the model is to just notify\n// the listeners and allow the caller to poll the prefetch cache with a new\n// prefetch task if desired.\nlet invalidationListeners: Set<PrefetchTask> | null = null\n\n// Incrementing counters used to track cache invalidations. Route and segment\n// caches have separate versions so they can be invalidated independently.\n// Invalidation does not eagerly evict anything from the cache; entries are\n// lazily evicted when read.\nlet currentRouteCacheVersion = 0\nlet currentSegmentCacheVersion = 0\n\nexport function getCurrentRouteCacheVersion(): number {\n  return currentRouteCacheVersion\n}\n\nexport function getCurrentSegmentCacheVersion(): number {\n  return currentSegmentCacheVersion\n}\n\n/**\n * Invalidates all prefetch cache entries (both route and segment caches).\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateEntirePrefetchCache(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentRouteCacheVersion++\n  currentSegmentCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\n/**\n * Invalidates all route cache entries. Route entries contain the tree structure\n * (which segments exist at a given URL) but not the segment data itself.\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateRouteCacheEntries(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentRouteCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\n/**\n * Invalidates all segment cache entries. Segment entries contain the actual\n * RSC data for each segment.\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateSegmentCacheEntries(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentSegmentCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\nfunction attachInvalidationListener(task: PrefetchTask): void {\n  // This function is called whenever a prefetch task reads a cache entry. If\n  // the task has an onInvalidate function associated with it — i.e. the one\n  // optionally passed to router.prefetch(onInvalidate) — then we attach that\n  // listener to the every cache entry that the task reads. Then, if an entry\n  // is invalidated, we call the function.\n  if (task.onInvalidate !== null) {\n    if (invalidationListeners === null) {\n      invalidationListeners = new Set([task])\n    } else {\n      invalidationListeners.add(task)\n    }\n  }\n}\n\nfunction notifyInvalidationListener(task: PrefetchTask): void {\n  const onInvalidate = task.onInvalidate\n  if (onInvalidate !== null) {\n    // Clear the callback from the task object to guarantee it's not called more\n    // than once.\n    task.onInvalidate = null\n\n    // This is a user-space function, so we must wrap in try/catch.\n    try {\n      onInvalidate()\n    } catch (error) {\n      if (typeof reportError === 'function') {\n        reportError(error)\n      } else {\n        console.error(error)\n      }\n    }\n  }\n}\n\nexport function pingInvalidationListeners(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  // The rough equivalent of pingVisibleLinks, but for onInvalidate callbacks.\n  // This is called when the Next-Url or the base tree changes, since those\n  // may affect the result of a prefetch task. It's also called after a\n  // cache invalidation.\n  if (invalidationListeners !== null) {\n    const tasks = invalidationListeners\n    invalidationListeners = null\n    for (const task of tasks) {\n      if (isPrefetchTaskDirty(task, nextUrl, tree)) {\n        notifyInvalidationListener(task)\n      }\n    }\n  }\n}\n\nexport function readRouteCacheEntry(\n  now: number,\n  key: RouteCacheKey\n): RouteCacheEntry | null {\n  const varyPath: RouteVaryPath = getRouteVaryPath(\n    key.pathname,\n    key.search,\n    key.nextUrl\n  )\n  const isRevalidation = false\n  const existingEntry = getFromCacheMap(\n    now,\n    getCurrentRouteCacheVersion(),\n    routeCacheMap,\n    varyPath,\n    isRevalidation,\n    false\n  )\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n\n  // No cache hit. Attempt to construct from template using the new\n  // optimistic routing mechanism (pattern-based matching).\n  if (process.env.__NEXT_OPTIMISTIC_ROUTING) {\n    return matchKnownRoute(now, key.pathname, key.search)\n  }\n\n  return null\n}\n\n/**\n * Reads the cache entry for a segment during a navigation. Unlike a plain\n * lookup, prefers a Fulfilled entry over a more-specific Pending or Rejected\n * entry: during a navigation, a less-specific shell entry (e.g. params ->\n * Fallback) should be rendered immediately rather than blocking on a\n * more-specific Pending entry that may still be in-flight.\n *\n * Performs up to two lookups:\n *  1. An `onlyMatchFulfilled` lookup that walks past Pending/Rejected entries\n *     at more-specific keypaths to find a Fulfilled fallback (e.g. a cached\n *     shell).\n *  2. If no Fulfilled entry is found, a regular lookup that returns the most\n *     specific match regardless of status.\n */\nexport function readSegmentCacheEntryForNavigation(\n  now: number,\n  // The map the navigation is bound to: a locked navigation's driving-task\n  // map, or the shared map otherwise.\n  map: CacheMap<SegmentCacheEntry>,\n  varyPath: SegmentVaryPath,\n  restrictToShell: boolean = false\n): SegmentCacheEntry | null {\n  const isRevalidation = false\n\n  let lookupVaryPath = varyPath\n  if (process.env.__NEXT_EXPOSE_TESTING_API && restrictToShell) {\n    // Instant Navigation Testing API: we're navigating to a link that 1) has\n    // Partial Prefetching enabled, and 2) does not have a prefetch prop set.\n    // Only the shell may render, not anything that varies on concrete route\n    // params.\n    lookupVaryPath = getShellSegmentVaryPath(varyPath)\n  }\n\n  // Prefer a Fulfilled entry (e.g. a cached shell) over a more-specific\n  // Pending/Rejected one so it renders immediately instead of blocking on an\n  // in-flight entry.\n  const fulfilled = getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    map,\n    lookupVaryPath,\n    isRevalidation,\n    true\n  )\n  if (fulfilled !== null) {\n    return fulfilled\n  }\n  return getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    map,\n    lookupVaryPath,\n    isRevalidation,\n    false\n  )\n}\n\nfunction readRevalidatingSegmentCacheEntry(\n  now: number,\n  map: CacheMap<SegmentCacheEntry>,\n  varyPath: SegmentVaryPath\n): SegmentCacheEntry | null {\n  const isRevalidation = true\n  return getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    map,\n    varyPath,\n    isRevalidation,\n    false\n  )\n}\n\nexport function waitForSegmentCacheEntry(\n  pendingEntry: PendingSegmentCacheEntry\n): Promise<FulfilledSegmentCacheEntry | null> {\n  // Because the entry is pending, there's already a in-progress request.\n  // Attach a promise to the entry that will resolve when the server responds.\n  let promiseWithResolvers = pendingEntry.promise\n  if (promiseWithResolvers === null) {\n    promiseWithResolvers = pendingEntry.promise =\n      createPromiseWithResolvers<FulfilledSegmentCacheEntry | null>()\n  } else {\n    // There's already a promise we can use\n  }\n  return promiseWithResolvers.promise\n}\n\nfunction createDetachedRouteCacheEntry(): PendingRouteCacheEntry {\n  return {\n    canonicalUrl: null,\n    status: EntryStatus.Empty,\n    blockedTasks: null,\n    tree: null,\n    metadata: null,\n    // This is initialized to true because we don't know yet whether the route\n    // could be intercepted. It's only set to false once we receive a response\n    // from the server.\n    couldBeIntercepted: true,\n    // Similarly, we don't yet know if the route supports PPR.\n    supportsPerSegmentPrefetching: false,\n    hasDynamicRewrite: false,\n    renderedSearch: null,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    // Since this is an empty entry, there's no reason to ever evict it. It will\n    // be updated when the data is populated.\n    staleAt: Infinity,\n    version: getCurrentRouteCacheVersion(),\n  }\n}\n\n/**\n * Checks if an entry for a route exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateRouteCacheEntry(\n  now: number,\n  task: PrefetchTask,\n  key: RouteCacheKey\n): RouteCacheEntry {\n  attachInvalidationListener(task)\n\n  const existingEntry = readRouteCacheEntry(now, key)\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  // Create a pending entry and add it to the cache.\n  const pendingEntry = createDetachedRouteCacheEntry()\n  const varyPath: RouteVaryPath = getRouteVaryPath(\n    key.pathname,\n    key.search,\n    key.nextUrl\n  )\n  const isRevalidation = false\n  setInCacheMap(routeCacheMap, varyPath, pendingEntry, isRevalidation)\n  return pendingEntry\n}\n\n// TODO: This function predates the new optimisticRouting feature and will be\n// removed once optimisticRouting is stable. The new mechanism (matchKnownRoute)\n// handles search param variations more robustly as part of the general route\n// prediction system. This fallback remains for when optimisticRouting is\n// disabled (staticChildren is null).\nexport function deprecated_requestOptimisticRouteCacheEntry(\n  now: number,\n  requestedUrl: URL,\n  nextUrl: string | null\n): FulfilledRouteCacheEntry | null {\n  // This function is called during a navigation when there was no matching\n  // route tree in the prefetch cache. Before de-opting to a blocking,\n  // unprefetched navigation, we will first attempt to construct an \"optimistic\"\n  // route tree by checking the cache for similar routes.\n  //\n  // Check if there's a route with the same pathname, but with different\n  // search params. We can then base our optimistic route tree on this entry.\n  //\n  // Conceptually, we are simulating what would happen if we did perform a\n  // prefetch the requested URL, under the assumption that the server will\n  // not redirect or rewrite the request in a different manner than the\n  // base route tree. This assumption might not hold, in which case we'll have\n  // to recover when we perform the dynamic navigation request. However, this\n  // is what would happen if a route were dynamically rewritten/redirected\n  // in between the prefetch and the navigation. So the logic needs to exist\n  // to handle this case regardless.\n\n  // Look for a route with the same pathname, but with an empty search string.\n  // TODO: There's nothing inherently special about the empty search string;\n  // it's chosen somewhat arbitrarily, with the rationale that it's the most\n  // likely one to exist. But we should update this to match _any_ search\n  // string. The plan is to generalize this logic alongside other improvements\n  // related to \"fallback\" cache entries.\n  const requestedSearch = requestedUrl.search as NormalizedSearch\n  if (requestedSearch === '') {\n    // The caller would have already checked if a route with an empty search\n    // string is in the cache. So we can bail out here.\n    return null\n  }\n  const urlWithoutSearchParams = new URL(requestedUrl)\n  urlWithoutSearchParams.search = ''\n  const routeWithNoSearchParams = readRouteCacheEntry(\n    now,\n    createPrefetchRequestKey(urlWithoutSearchParams.href, nextUrl)\n  )\n\n  if (\n    routeWithNoSearchParams === null ||\n    routeWithNoSearchParams.status !== EntryStatus.Fulfilled\n  ) {\n    // Bail out of constructing an optimistic route tree. This will result in\n    // a blocking, unprefetched navigation.\n    return null\n  }\n\n  // Now we have a base route tree we can \"patch\" with our optimistic values.\n\n  // Optimistically assume that redirects for the requested pathname do\n  // not vary on the search string. Therefore, if the base route was\n  // redirected to a different search string, then the optimistic route\n  // should be redirected to the same search string. Otherwise, we use\n  // the requested search string.\n  const canonicalUrlForRouteWithNoSearchParams = new URL(\n    routeWithNoSearchParams.canonicalUrl,\n    requestedUrl.origin\n  )\n  const optimisticCanonicalSearch =\n    canonicalUrlForRouteWithNoSearchParams.search !== ''\n      ? // Base route was redirected. Reuse the same redirected search string.\n        canonicalUrlForRouteWithNoSearchParams.search\n      : requestedSearch\n\n  // Similarly, optimistically assume that rewrites for the requested\n  // pathname do not vary on the search string. Therefore, if the base\n  // route was rewritten to a different search string, then the optimistic\n  // route should be rewritten to the same search string. Otherwise, we use\n  // the requested search string.\n  const optimisticRenderedSearch =\n    routeWithNoSearchParams.renderedSearch !== ''\n      ? // Base route was rewritten. Reuse the same rewritten search string.\n        routeWithNoSearchParams.renderedSearch\n      : requestedSearch\n\n  const optimisticUrl = new URL(\n    routeWithNoSearchParams.canonicalUrl,\n    location.origin\n  )\n  optimisticUrl.search = optimisticCanonicalSearch\n  const optimisticCanonicalUrl = createHrefFromUrl(optimisticUrl)\n\n  const optimisticRouteTree = deprecated_createOptimisticRouteTree(\n    routeWithNoSearchParams.tree,\n    optimisticRenderedSearch\n  )\n  const optimisticMetadataTree = deprecated_createOptimisticRouteTree(\n    routeWithNoSearchParams.metadata,\n    optimisticRenderedSearch\n  )\n\n  // Clone the base route tree, and override the relevant fields with our\n  // optimistic values.\n  const optimisticEntry: FulfilledRouteCacheEntry = {\n    canonicalUrl: optimisticCanonicalUrl,\n\n    status: EntryStatus.Fulfilled,\n    // This isn't cloned because it's instance-specific\n    blockedTasks: null,\n    tree: optimisticRouteTree,\n    metadata: optimisticMetadataTree,\n    couldBeIntercepted: routeWithNoSearchParams.couldBeIntercepted,\n    supportsPerSegmentPrefetching:\n      routeWithNoSearchParams.supportsPerSegmentPrefetching,\n    hasDynamicRewrite: routeWithNoSearchParams.hasDynamicRewrite,\n\n    // Override the rendered search with the optimistic value.\n    renderedSearch: optimisticRenderedSearch,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    staleAt: routeWithNoSearchParams.staleAt,\n    version: routeWithNoSearchParams.version,\n  }\n\n  // Do not insert this entry into the cache. It only exists so we can\n  // perform the current navigation. Just return it to the caller.\n  return optimisticEntry\n}\n\nfunction deprecated_createOptimisticRouteTree(\n  tree: RouteTree,\n  newRenderedSearch: NormalizedSearch\n): RouteTree {\n  // Create a new route tree that identical to the original one except for\n  // the rendered search string, which is contained in the vary path.\n\n  let clonedSlots: Map<string, RouteTree> | null = null\n  const originalSlots = tree.slots\n  if (originalSlots !== null) {\n    clonedSlots = new Map()\n    for (const [parallelRouteKey, childTree] of originalSlots) {\n      clonedSlots.set(\n        parallelRouteKey,\n        deprecated_createOptimisticRouteTree(childTree, newRenderedSearch)\n      )\n    }\n  }\n\n  // We only need to clone the vary path if the route is a page.\n  if (tree.isPage) {\n    // The shell vary path Fallbacks search params, so it's unaffected by the\n    // new rendered search and can be reused as-is.\n    return {\n      requestKey: tree.requestKey,\n      segment: tree.segment,\n      shellVaryPath: tree.shellVaryPath,\n      refreshState: tree.refreshState,\n      varyPath: clonePageVaryPathWithNewSearchParams(\n        tree.varyPath,\n        newRenderedSearch\n      ),\n      isPage: true,\n      slots: clonedSlots,\n\n      prefetchHints: tree.prefetchHints,\n    }\n  }\n\n  return {\n    requestKey: tree.requestKey,\n    segment: tree.segment,\n    shellVaryPath: tree.shellVaryPath,\n    refreshState: tree.refreshState,\n    varyPath: tree.varyPath,\n    isPage: false,\n    slots: clonedSlots,\n    prefetchHints: tree.prefetchHints,\n  }\n}\n\n/**\n * Checks if an entry for a segment exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateSegmentCacheEntry(\n  now: number,\n  // The map the calling task operates in (`PrefetchTask.segmentCacheMap`,\n  // captured when the task was scheduled).\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentCacheEntry {\n  const existingEntry = getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    map,\n    tree.varyPath,\n    false,\n    false\n  )\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  return insertEmptySegmentCacheEntry(now, map, fetchStrategy, tree)\n}\n\n/**\n * Creates an empty segment cache entry and inserts it into the cache, keyed\n * at the vary path a request made with the given fetch strategy is stored\n * under. The stale time is set to a default value; the actual stale time will\n * be set when the entry is fulfilled with data from the server response.\n */\nfunction insertEmptySegmentCacheEntry(\n  now: number,\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): EmptySegmentCacheEntry {\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const emptyEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = false\n  setInCacheMap(map, varyPathForRequest, emptyEntry, isRevalidation)\n  return emptyEntry\n}\n\nexport function readOrCreateRevalidatingSegmentEntry(\n  now: number,\n  // The map the calling task operates in (`PrefetchTask.segmentCacheMap`).\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentCacheEntry {\n  // This function is called when we've already confirmed that a particular\n  // segment is cached, but we want to perform another request anyway in case it\n  // returns more complete and/or fresher data than we already have. The logic\n  // for deciding whether to replace the existing entry is handled elsewhere;\n  // this function just handles retrieving a cache entry that we can use to\n  // track the revalidation.\n  //\n  // The reason revalidations are stored in the cache is because we need to be\n  // able to dedupe multiple revalidation requests. The reason they have to be\n  // handled specially is because we shouldn't overwrite a \"normal\" entry if\n  // one exists at the same keypath. So, for each internal cache location, there\n  // is a special \"revalidation\" slot that is used solely for this purpose.\n  //\n  // You can think of it as if all the revalidation entries were stored in a\n  // separate cache map from the canonical entries, and then transfered to the\n  // canonical cache map once the request is complete — this isn't how it's\n  // actually implemented, since it's more efficient to store them in the same\n  // data structure as the normal entries, but that's how it's modeled\n  // conceptually.\n\n  // TODO: Once we implement Fallback behavior for params, where an entry is\n  // re-keyed based on response information, we'll need to account for the\n  // possibility that the keypath of the previous entry is more generic than\n  // the keypath of the revalidating entry. In other words, the server could\n  // return a less generic entry upon revalidation. For now, though, this isn't\n  // a concern because the keypath is based solely on the prefetch strategy,\n  // not on data contained in the response.\n  const existingEntry = readRevalidatingSegmentCacheEntry(\n    now,\n    map,\n    tree.varyPath\n  )\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  // Create a pending entry and add it to the cache. The stale time is set to a\n  // default value; the actual stale time will be set when the entry is\n  // fulfilled with data from the server response.\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const pendingEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = true\n  setInCacheMap(map, varyPathForRequest, pendingEntry, isRevalidation)\n  return pendingEntry\n}\n\nexport function overwriteRevalidatingSegmentCacheEntry(\n  now: number,\n  // The map the calling task operates in (`PrefetchTask.segmentCacheMap`).\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n) {\n  // This function is called when we've already decided to replace an existing\n  // revalidation entry. Create a new entry and write it into the cache,\n  // overwriting the previous value. The stale time is set to a default value;\n  // the actual stale time will be set when the entry is fulfilled with data\n  // from the server response.\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const pendingEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = true\n  setInCacheMap(map, varyPathForRequest, pendingEntry, isRevalidation)\n  return pendingEntry\n}\n\n/**\n * Whether an existing cache entry is preferred over an incoming candidate —\n * i.e. the candidate does NOT supersede it. (On an exact tie — same fetch\n * strategy, same partialness — this returns false, so the candidate replaces\n * the existing entry.) This is the precedence rule used both when deciding\n * whether an upsert may replace the entry at its own keypath, and when\n * deciding whether an entry at a more specific keypath may be evicted because\n * it shadows a just-inserted candidate (see `evictShadowingSegmentEntries`).\n *\n * Note that \"less/more specific\" in the comments below refers to fetch\n * strategy content tiers (how much content a strategy can produce), not the\n * vary-path specificity the eviction docs are concerned with.\n */\nfunction isExistingSegmentEntryPreferred(\n  existingEntry: SegmentCacheEntry,\n  candidateEntry: SegmentCacheEntry\n): boolean {\n  return (\n    // We fetched the new segment using a different, less specific fetch\n    // strategy than the segment we already have in the cache, so it can't\n    // have more content.\n    (candidateEntry.fetchStrategy !== existingEntry.fetchStrategy &&\n      !canNewFetchStrategyProvideMoreContent(\n        existingEntry.fetchStrategy,\n        candidateEntry.fetchStrategy\n      )) ||\n    // The existing entry isn't partial, but the new one is.\n    // (TODO: can this be true if `candidateEntry.fetchStrategy >= existingEntry.fetchStrategy`?)\n    (!existingEntry.isPartial && candidateEntry.isPartial)\n  )\n}\n\nexport function upsertSegmentEntry(\n  now: number,\n  // The map the whole upsert (existing-entry read, insert, shadow eviction)\n  // operates in. Prefetch response-write paths pass the spawning task's map\n  // (`PrefetchTask.segmentCacheMap`), so a response that lands after a\n  // testing-lock scope boundary still writes into the map its entries\n  // live in.\n  map: CacheMap<SegmentCacheEntry>,\n  varyPath: SegmentVaryPath,\n  candidateEntry: SegmentCacheEntry,\n  // The fully concrete vary path a read for this segment position resolves\n  // against (all concrete param values, i.e. `tree.varyPath`) — the most\n  // specific path a read would use. Note this is the opposite of the\n  // generalized keying path that `getSegmentVaryPathForRequest` computes.\n  // Used to detect and evict stale entries at more specific keypaths that\n  // would otherwise shadow the candidate. Pass null when there's no request\n  // context; the shadow check is skipped.\n  lookupVaryPath: SegmentVaryPath | null\n): SegmentCacheEntry | null {\n  // We have a new entry that has not yet been inserted into the cache. Before\n  // we do so, we need to confirm whether it takes precedence over the existing\n  // entry (if one exists).\n  // TODO: We should not upsert an entry if its key was invalidated in the time\n  // since the request was made. We can do that by passing the \"owner\" entry to\n  // this function and confirming it's the same as `existingEntry`.\n\n  if (isValueExpired(now, getCurrentSegmentCacheVersion(), candidateEntry)) {\n    // The entry is expired. We cannot upsert it.\n    return null\n  }\n\n  const existingEntry = getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    map,\n    varyPath,\n    false,\n    false\n  )\n  if (existingEntry !== null) {\n    // Don't replace a more specific segment with a less-specific one. A case where this\n    // might happen is if the existing segment was fetched via\n    // `<Link prefetch={true}>`.\n    if (isExistingSegmentEntryPreferred(existingEntry, candidateEntry)) {\n      // The candidate does not supersede the existing entry. Leave the\n      // existing entry in place and discard the candidate by not inserting it.\n      //\n      // We must not mutate the candidate here (e.g. downgrade it to Rejected or\n      // null out its `rsc`). The caller does not transfer exclusive ownership\n      // of it: it may already have been fulfilled, resolving its promise to a\n      // waiter that holds the entry and reads `rsc` off it later. A navigation\n      // seed is such a waiter, via `waitForSegmentCacheEntry`. Nulling `rsc`\n      // after the fact resolves that read to `null`, so the waiter loses the\n      // data it was about to render. Declining to insert it is enough: the\n      // existing entry stays canonical, and the candidate keeps its valid (if\n      // less complete) data for any waiter that already took it.\n      return null\n    }\n\n    // Ping any tasks blocked on the existing entry before replacing it so they\n    // re-run and pick up the new entry. Without this, tasks waiting on the\n    // existing Empty/Pending entry would be stranded — the new fulfilled\n    // candidate has no blockedTasks of its own.\n    if (\n      existingEntry.status === EntryStatus.Empty ||\n      existingEntry.status === EntryStatus.Pending\n    ) {\n      pingBlockedTasks(existingEntry)\n    }\n\n    // Replace the existing entry by writing the candidate over its keypath\n    // below (the same mechanism `overwriteRevalidatingSegmentCacheEntry`\n    // uses). We intentionally do NOT call `deleteFromCacheMap` first: deleting\n    // vacates the canonical slot, and `deleteMapEntry` promotes a pending\n    // Revalidation-slot entry into the vacated slot — which the immediate\n    // insert below would then silently overwrite. The in-flight revalidation\n    // would vanish from the map, so the next scheduler pass would find an\n    // empty revalidation slot and spawn a duplicate request instead of\n    // deduping against it. Replacing in place never vacates the slot, so\n    // promotion never runs and the pending revalidating entry stays in its\n    // Revalidation slot where `readOrCreateRevalidatingSegmentEntry`'s dedupe\n    // finds it.\n    //\n    // The displaced entry's map/LRU accounting is handled by the replacement\n    // itself: `setMapEntryValue` drops the displaced value's `ref` and\n    // `updateLruSize` swaps its size for the candidate's, which is exactly\n    // what delete-then-insert did.\n  }\n\n  const isRevalidation = false\n  setInCacheMap(map, varyPath, candidateEntry, isRevalidation)\n\n  if (lookupVaryPath !== null) {\n    evictShadowingSegmentEntries(now, map, lookupVaryPath, candidateEntry)\n  }\n\n  return candidateEntry\n}\n\n/**\n * Evicts stale entries at more specific keypaths that shadow a just-inserted\n * candidate entry.\n *\n * A response can be written to the cache at a MORE GENERIC vary path than the\n * path the request was issued against — for example, the server may report\n * that a segment doesn't vary on a param, so the entry is re-keyed with that\n * param as Fallback. Meanwhile, an older, less useful entry can exist at a\n * more specific path within the same fallback chain — for example, a partial\n * shell entry keyed with root params concrete (see\n * `getShellSegmentVaryPath`). Because segment lookup is\n * most-specific-match-wins, every subsequent read at the concrete request\n * path keeps returning the stale specific entry, and the more complete\n * generic entry is unreachable from that URL. That both wastes the completed\n * request and can loop: a prefetch task that revalidated the segment reads\n * back the same stale entry, decides it needs to revalidate again, and\n * repeats forever.\n *\n * The upsert is the one moment we know the ordering between the two entries:\n * the candidate was produced by a request for this segment position, and\n * `lookupVaryPath` is the fully concrete path a read for that position\n * resolves against, so any entry that a read at that path would return in the\n * candidate's stead is directly comparable to it. If such an entry is settled\n * and the candidate supersedes it — under the same precedence rules the\n * upsert applies at its own keypath — we know we never want to match against\n * it again, so delete it, making the candidate reachable.\n *\n * Non-settled entries are never evicted here: a Pending entry is owned by an\n * in-flight request that will settle it, and an Empty entry is a placeholder\n * that a scheduler pass may still claim and upgrade.\n */\nfunction evictShadowingSegmentEntries(\n  now: number,\n  map: CacheMap<SegmentCacheEntry>,\n  lookupVaryPath: SegmentVaryPath,\n  candidateEntry: SegmentCacheEntry\n): void {\n  // There can in principle be multiple shadowing entries at successively less\n  // specific keypaths, so loop until the read returns the candidate (or an\n  // entry we don't supersede). Each iteration re-reads and re-checks from\n  // scratch (in part because `deleteFromCacheMap` can promote a settled\n  // Revalidation-slot value into the just-vacated slot, surfacing a new entry\n  // at the same keypath). Each iteration deletes an entry from the map, so\n  // the loop terminates naturally; the bound is defensive, and 32 is far\n  // beyond any real fallback chain, which is bounded by the vary\n  // path's length.\n  for (let i = 0; i < 32; i++) {\n    const shadowEntry = getFromCacheMap(\n      now,\n      getCurrentSegmentCacheVersion(),\n      map,\n      lookupVaryPath,\n      false,\n      false\n    )\n    if (shadowEntry === null || shadowEntry === candidateEntry) {\n      // The candidate is reachable from the lookup path (or the read missed\n      // entirely, e.g. because the candidate expired). Done.\n      return\n    }\n    if (\n      shadowEntry.status !== EntryStatus.Fulfilled &&\n      shadowEntry.status !== EntryStatus.Rejected\n    ) {\n      // Only settled entries may be evicted. A Pending entry is held by an\n      // in-flight request and will settle on its own.\n      return\n    }\n    if (isExistingSegmentEntryPreferred(shadowEntry, candidateEntry)) {\n      // The shadowing entry is preferred over the candidate (e.g. it's a\n      // complete entry fetched with a more specific strategy). Leave it —\n      // reads at this path should keep matching it.\n      return\n    }\n    // The candidate supersedes the shadowing entry. Evict it. Settled entries\n    // shouldn't have blocked tasks (Fulfilled always has `blockedTasks:\n    // null`, and Rejected entries were pinged at rejection), but ping\n    // defensively before deleting, matching the upsert-evict pattern above.\n    pingBlockedTasks(shadowEntry)\n    deleteFromCacheMap(shadowEntry)\n  }\n}\n\nexport function createDetachedSegmentCacheEntry(\n  now: number\n): EmptySegmentCacheEntry {\n  // Default stale time for pending segment cache entries. The actual stale time\n  // is set when the entry is fulfilled with data from the server response.\n  const staleAt = now + 30 * 1000\n  const emptyEntry: EmptySegmentCacheEntry = {\n    status: EntryStatus.Empty,\n    blockedTasks: null,\n    // Default to assuming the fetch strategy will be PPR. This will be updated\n    // when a fetch is actually initiated.\n    fetchStrategy: FetchStrategy.PPR,\n    rsc: null,\n    isPartial: true,\n    isUpgradeableISRFallback: false,\n    promise: null,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    staleAt,\n    version: 0,\n  }\n  return emptyEntry\n}\n\nexport function upgradeToPendingSegment(\n  emptyEntry: EmptySegmentCacheEntry,\n  fetchStrategy: FetchStrategy\n): PendingSegmentCacheEntry {\n  const pendingEntry: PendingSegmentCacheEntry = emptyEntry as any\n  pendingEntry.status = EntryStatus.Pending\n  pendingEntry.fetchStrategy = fetchStrategy\n\n  if (fetchStrategy === FetchStrategy.Full) {\n    // We can assume the response will contain the full segment data. Set this\n    // to false so we know it's OK to omit this segment from any navigation\n    // requests that may happen while the data is still pending.\n    pendingEntry.isPartial = false\n  }\n\n  // Set the version here, since this is right before the request is initiated.\n  // The next time the segment cache version is incremented, the entry will\n  // effectively be evicted. This happens before initiating the request, rather\n  // than when receiving the response, because it's guaranteed to happen\n  // before the data is read on the server.\n  pendingEntry.version = getCurrentSegmentCacheVersion()\n\n  return pendingEntry\n}\n\nexport function attemptToFulfillDynamicSegmentFromBFCache(\n  now: number,\n  segment: EmptySegmentCacheEntry,\n  tree: RouteTree\n): FulfilledSegmentCacheEntry | null {\n  // Attempts to fulfill an empty segment cache entry using data from the\n  // bfcache. This is only valid during a Full prefetch (i.e. one that includes\n  // dynamic data), because the bfcache stores data from navigations which\n  // always include dynamic data.\n\n  // We always use the canonical vary path when checking the bfcache. This is\n  // the same operation we'd use to access the cache during a\n  // regular navigation.\n  const varyPath = tree.varyPath\n\n  // Read from the BFCache without expiring it (pass -1). We check freshness\n  // ourselves using navigatedAt, because the BFCache's staleAt may have been\n  // overridden by a per-page unstable_dynamicStaleTime and can't be used to\n  // derive the original request time.\n  const bfcacheEntry = readFromBFCache(varyPath)\n  if (bfcacheEntry !== null) {\n    // The stale time for dynamic prefetches (default: 5 mins) is different\n    // from the stale time for regular navigations (default: 0 secs). Use\n    // navigatedAt to compute the correct expiry for prefetch purposes.\n    const dynamicPrefetchStaleAt =\n      bfcacheEntry.navigatedAt + STATIC_STALETIME_MS\n    if (now > dynamicPrefetchStaleAt) {\n      return null\n    }\n\n    const pendingSegment = upgradeToPendingSegment(segment, FetchStrategy.Full)\n    const isPartial = false\n    return fulfillSegmentCacheEntry(\n      pendingSegment,\n      bfcacheEntry.rsc,\n      dynamicPrefetchStaleAt,\n      isPartial,\n      // bfcache data is concrete, never an ISR fallback.\n      false,\n      FetchStrategy.Full\n    )\n  }\n  return null\n}\n\n/**\n * Attempts to replace an existing segment cache entry with data from the\n * bfcache. Unlike `attemptToFulfillDynamicSegmentFromBFCache` (which fills an\n * empty entry), this creates a new entry and upserts it, so it works even when\n * the segment is already fulfilled.\n */\nexport function attemptToUpgradeSegmentFromBFCache(\n  now: number,\n  // The map the calling task operates in (`PrefetchTask.segmentCacheMap`).\n  map: CacheMap<SegmentCacheEntry>,\n  tree: RouteTree\n): FulfilledSegmentCacheEntry | null {\n  const varyPath = tree.varyPath\n  const bfcacheEntry = readFromBFCache(varyPath)\n  if (bfcacheEntry !== null) {\n    const dynamicPrefetchStaleAt =\n      bfcacheEntry.navigatedAt + STATIC_STALETIME_MS\n    if (now > dynamicPrefetchStaleAt) {\n      return null\n    }\n    const pendingSegment = upgradeToPendingSegment(\n      createDetachedSegmentCacheEntry(now),\n      FetchStrategy.Full\n    )\n    const isPartial = false\n    const newEntry = fulfillSegmentCacheEntry(\n      pendingSegment,\n      bfcacheEntry.rsc,\n      dynamicPrefetchStaleAt,\n      isPartial,\n      // bfcache data is concrete, never an ISR fallback.\n      false,\n      FetchStrategy.Full\n    )\n    const segmentVaryPath = getSegmentVaryPathForRequest(\n      FetchStrategy.Full,\n      tree\n    )\n    const upserted = upsertSegmentEntry(\n      now,\n      map,\n      segmentVaryPath,\n      newEntry,\n      // The concrete lookup path this BFCache upgrade applies to. (In\n      // practice a Full request path is already fully concrete, so nothing\n      // can shadow the new entry and the shadow check is a no-op.)\n      tree.varyPath\n    )\n    if (upserted !== null && upserted.status === EntryStatus.Fulfilled) {\n      return upserted\n    }\n  }\n  return null\n}\n\nfunction pingBlockedTasks(entry: {\n  blockedTasks: Set<PrefetchTask> | null\n}): void {\n  const blockedTasks = entry.blockedTasks\n  if (blockedTasks !== null) {\n    for (const task of blockedTasks) {\n      pingPrefetchTask(task)\n    }\n    entry.blockedTasks = null\n  }\n}\n\nexport function createMetadataRouteTree(\n  metadataVaryPath: PageVaryPath\n): RouteTree {\n  // The Head is not actually part of the route tree, but other than that, it's\n  // fetched and cached like a segment. Some functions expect a RouteTree\n  // object, so rather than fork the logic in all those places, we use this\n  // \"fake\" one.\n  const metadata: RouteTree = {\n    requestKey: HEAD_REQUEST_KEY,\n    segment: HEAD_REQUEST_KEY,\n    shellVaryPath: getShellSegmentVaryPath(metadataVaryPath),\n    refreshState: null,\n    varyPath: metadataVaryPath,\n    // The metadata isn't really a \"page\" (though it isn't really a \"segment\"\n    // either) but for the purposes of how this field is used, it behaves like\n    // one. If this logic ever gets more complex we can change this to an enum.\n    isPage: true,\n    slots: null,\n    prefetchHints: 0,\n  }\n  return metadata\n}\n\nexport function fulfillRouteCacheEntry(\n  now: number,\n  entry: PendingRouteCacheEntry,\n  tree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean\n): FulfilledRouteCacheEntry {\n  // Get the rendered search from the vary path\n  const renderedSearch =\n    getRenderedSearchFromVaryPath(metadataVaryPath) ?? ('' as NormalizedSearch)\n  const fulfilledEntry: FulfilledRouteCacheEntry = entry as any\n  fulfilledEntry.status = EntryStatus.Fulfilled\n  fulfilledEntry.tree = tree\n  fulfilledEntry.metadata = createMetadataRouteTree(metadataVaryPath)\n  // Route structure is essentially static — it only changes on deploy.\n  // Always use the static stale time.\n  // NOTE: An exception is rewrites/redirects in middleware or proxy, which can\n  // change routes dynamically. We have other strategies for handling those.\n  //\n  // If the route tree has stale inlining hints (e.g. the initial RSC payload\n  // for a build-time static page, generated before collectPrefetchHints ran),\n  // immediately expire the entry so it gets re-fetched with correct hints.\n  // The segment data itself is still valid — only the route tree (which\n  // contains the hint bits) needs to be re-fetched.\n  if (tree.prefetchHints & PrefetchHint.InliningHintsStale) {\n    fulfilledEntry.staleAt = -1\n  } else {\n    fulfilledEntry.staleAt = now + STATIC_STALETIME_MS\n  }\n  fulfilledEntry.couldBeIntercepted = couldBeIntercepted\n  fulfilledEntry.canonicalUrl = canonicalUrl\n  fulfilledEntry.renderedSearch = renderedSearch\n  fulfilledEntry.supportsPerSegmentPrefetching = supportsPerSegmentPrefetching\n  fulfilledEntry.hasDynamicRewrite = false\n  pingBlockedTasks(entry)\n  return fulfilledEntry\n}\n\nexport function writeRouteIntoCache(\n  now: number,\n  pathname: NormalizedPathname,\n  search: NormalizedSearch,\n  nextUrl: string | null,\n  tree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean\n): FulfilledRouteCacheEntry {\n  const pendingEntry = createDetachedRouteCacheEntry()\n  const fulfilledEntry = fulfillRouteCacheEntry(\n    now,\n    pendingEntry,\n    tree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    supportsPerSegmentPrefetching\n  )\n  const varyPath = getFulfilledRouteVaryPath(\n    pathname,\n    search,\n    nextUrl as NormalizedNextUrl | null,\n    couldBeIntercepted\n  )\n  const isRevalidation = false\n  setInCacheMap(routeCacheMap, varyPath, fulfilledEntry, isRevalidation)\n  return fulfilledEntry\n}\n\n/**\n * Marks a route cache entry as having a dynamic rewrite. Called when we\n * discover that a route pattern has dynamic rewrite behavior - i.e., we used\n * an optimistic route tree for prediction, but the server responded with a\n * different rendered pathname.\n *\n * Once marked, attempts to use this entry as a template for prediction will\n * bail out to server resolution.\n */\nexport function markRouteEntryAsDynamicRewrite(\n  entry: FulfilledRouteCacheEntry\n): void {\n  entry.hasDynamicRewrite = true\n  // Note: The caller is responsible for also calling invalidateRouteCacheEntries\n  // to invalidate other entries that may have been derived from this template\n  // before we knew it had a dynamic rewrite.\n}\n\nfunction fulfillSegmentCacheEntry(\n  segmentCacheEntry: PendingSegmentCacheEntry,\n  rsc: React.ReactNode,\n  staleAt: number,\n  isPartial: boolean,\n  // Only static (per-segment PPR) responses can be ISR fallbacks; all other\n  // callers pass false. Always assigned (even when false) so that re-fulfilling\n  // a previously-fallback entry with a concrete response clears the flag and\n  // ends the retry loop.\n  isUpgradeableISRFallback: boolean,\n  // The strategy tier describing the CONTENT this entry is fulfilled with —\n  // which comes from the response, not the tier the entry was requested at.\n  // Usually the two agree, but when a response's shell payload IS the full\n  // response (no shell/full split), shell-spawned entries are fulfilled with\n  // full-tier content and recorded as such (see the promotion in\n  // writeSegmentBundleResponse). Always assigned, replacing\n  // the spawn-time strategy set by upgradeToPendingSegment; the write walks'\n  // matching and keying decisions all happen against the spawn-time\n  // strategy, before fulfillment, so they are unaffected. See\n  // SegmentCacheEntryShared['fetchStrategy'].\n  fetchStrategy: FetchStrategy\n): FulfilledSegmentCacheEntry {\n  const fulfilledEntry: FulfilledSegmentCacheEntry = segmentCacheEntry as any\n  fulfilledEntry.status = EntryStatus.Fulfilled\n  fulfilledEntry.rsc = rsc\n  fulfilledEntry.staleAt = staleAt\n  fulfilledEntry.isPartial = isPartial\n  fulfilledEntry.isUpgradeableISRFallback = isUpgradeableISRFallback\n  fulfilledEntry.fetchStrategy = fetchStrategy\n  // Resolve any listeners that were waiting for this data.\n  if (segmentCacheEntry.promise !== null) {\n    segmentCacheEntry.promise.resolve(fulfilledEntry)\n    // Free the promise for garbage collection.\n    fulfilledEntry.promise = null\n  }\n  pingBlockedTasks(segmentCacheEntry)\n  return fulfilledEntry\n}\n\nfunction rejectRouteCacheEntry(\n  entry: PendingRouteCacheEntry,\n  staleAt: number\n): void {\n  const rejectedEntry: RejectedRouteCacheEntry = entry as any\n  rejectedEntry.status = EntryStatus.Rejected\n  rejectedEntry.staleAt = staleAt\n  pingBlockedTasks(entry)\n}\n\nfunction rejectSegmentCacheEntry(\n  entry: PendingSegmentCacheEntry,\n  staleAt: number\n): void {\n  const rejectedEntry: RejectedSegmentCacheEntry = entry as any\n  rejectedEntry.status = EntryStatus.Rejected\n  rejectedEntry.staleAt = staleAt\n  if (entry.promise !== null) {\n    // NOTE: We don't currently propagate the reason the prefetch was canceled\n    // but we could by accepting a `reason` argument.\n    entry.promise.resolve(null)\n    entry.promise = null\n  }\n  pingBlockedTasks(entry)\n}\n\ntype RouteTreeAccumulator = {\n  metadataVaryPath: PageVaryPath | null\n  // Whether the decoded tree's segment identities diverged from the base\n  // tree it was overlaid onto. See NavigationSeed.treeDivergedFromBase.\n  treeDivergedFromBase: boolean\n}\n\nfunction convertRootTreePrefetchToRouteTree(\n  rootTree: RootTreePrefetch,\n  renderedPathname: string,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n) {\n  // Remove trailing and leading slashes\n  const pathnameParts = splitPathnameIntoParts(renderedPathname)\n  const index = 0\n  const rootSegment = ROOT_SEGMENT_REQUEST_KEY\n  return convertTreePrefetchToRouteTree(\n    rootTree.tree,\n    rootSegment,\n    null,\n    ROOT_SEGMENT_REQUEST_KEY,\n    pathnameParts,\n    index,\n    renderedSearch,\n    acc\n  )\n}\n\nfunction convertTreePrefetchToRouteTree(\n  prefetch: TreePrefetch,\n  segment: FlightRouterStateSegment,\n  partialVaryPath: PartialSegmentVaryPath | null,\n  requestKey: SegmentRequestKey,\n  pathnameParts: Array<string>,\n  pathnamePartsIndex: number,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  // Converts the route tree sent by the server into the format used by the\n  // cache. The cached version of the tree includes additional fields, such as a\n  // cache key for each segment. Since this is frequently accessed, we compute\n  // it once instead of on every access. This same cache key is also used to\n  // request the segment from the server.\n\n  let slots: Map<string, RouteTree> | null = null\n  let isPage: boolean\n  let varyPath: SegmentVaryPath\n  const prefetchSlots = prefetch.slots\n  if (prefetchSlots !== null) {\n    isPage = false\n    varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n\n    slots = new Map()\n    for (let parallelRouteKey in prefetchSlots) {\n      const childPrefetch = prefetchSlots[parallelRouteKey]\n      const childSegmentName = childPrefetch.name\n      const childParam = childPrefetch.param\n\n      let childDoesAppearInURL: boolean\n      let childSegment: FlightRouterStateSegment\n      let childPartialVaryPath: PartialSegmentVaryPath | null\n      if (childParam !== null) {\n        // This segment is parameterized. Get the param from the pathname.\n        const childParamValue = parseDynamicParamFromURLPart(\n          childParam.type,\n          pathnameParts,\n          pathnamePartsIndex\n        )\n\n        // Assign a cache key to the segment, based on the param value. In the\n        // pre-Segment Cache implementation, the server computes this and sends\n        // it in the body of the response. In the Segment Cache implementation,\n        // the server sends an empty string and we fill it in here.\n\n        // TODO: We're intentionally not adding the search param to page\n        // segments here; it's tracked separately and added back during a read.\n        // This would clearer if we waited to construct the segment until it's\n        // read from the cache, since that's effectively what we're\n        // doing anyway.\n        const childParamKey =\n          // The server omits this field from the prefetch response when\n          // cacheComponents is enabled.\n          childParam.key !== null\n            ? childParam.key\n            : // If no param key was sent, use the value parsed on the client.\n              getCacheKeyForDynamicParam(\n                childParamValue,\n                '' as NormalizedSearch\n              )\n\n        childPartialVaryPath = appendLayoutVaryPath(\n          partialVaryPath,\n          childParamKey,\n          childSegmentName,\n          // The child's param is a root param iff the child segment is at or\n          // above the root layout, which the server marks directly.\n          (childPrefetch.prefetchHints & PrefetchHint.IsRootLayoutOrAbove) !== 0\n        )\n        childSegment = [\n          childSegmentName,\n          childParamKey,\n          childParam.type,\n          childParam.siblings,\n        ]\n        childDoesAppearInURL = true\n      } else {\n        // This segment does not have a param. Inherit the partial vary path of\n        // the parent.\n        childPartialVaryPath = partialVaryPath\n        childSegment = childSegmentName\n        childDoesAppearInURL = doesStaticSegmentAppearInURL(childSegmentName)\n      }\n\n      // Only increment the index if the segment appears in the URL. If it's a\n      // \"virtual\" segment, like a route group, it remains the same.\n      const childPathnamePartsIndex = childDoesAppearInURL\n        ? pathnamePartsIndex + 1\n        : pathnamePartsIndex\n\n      const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n      const childRequestKey = appendSegmentRequestKeyPart(\n        requestKey,\n        parallelRouteKey,\n        childRequestKeyPart\n      )\n      slots.set(\n        parallelRouteKey,\n        convertTreePrefetchToRouteTree(\n          childPrefetch,\n          childSegment,\n          childPartialVaryPath,\n          childRequestKey,\n          pathnameParts,\n          childPathnamePartsIndex,\n          renderedSearch,\n          acc\n        )\n      )\n    }\n  } else {\n    if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n      // This is a page segment.\n      isPage = true\n      varyPath = finalizePageVaryPath(\n        requestKey,\n        renderedSearch,\n        partialVaryPath\n      )\n      // The metadata \"segment\" is not part the route tree, but it has the same\n      // conceptual params as a page segment. Write the vary path into the\n      // accumulator object. If there are multiple parallel pages, we use the\n      // first one. Which page we choose is arbitrary as long as it's\n      // consistently the same one every time every time. See\n      // finalizeMetadataVaryPath for more details.\n      if (acc.metadataVaryPath === null) {\n        acc.metadataVaryPath = finalizeMetadataVaryPath(\n          requestKey,\n          renderedSearch,\n          partialVaryPath\n        )\n      }\n    } else {\n      // This is a layout segment.\n      isPage = false\n      varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    }\n  }\n\n  return {\n    requestKey,\n    segment,\n    shellVaryPath: getShellSegmentVaryPath(varyPath),\n    refreshState: null,\n    // TODO: Cheating the type system here a bit because TypeScript can't tell\n    // that the type of isPage and varyPath are consistent. The fix would be to\n    // create separate constructors and call the appropriate one from each of\n    // the branches above. Just seems a bit overkill only for one field so I'll\n    // leave it as-is for now. If isPage were wrong it would break the behavior\n    // and we'd catch it quickly, anyway.\n    varyPath: varyPath as any,\n    isPage: isPage as boolean as any,\n    slots,\n    prefetchHints: prefetch.prefetchHints,\n  }\n}\n\nexport function convertRootFlightRouterStateToRouteTree(\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  return convertFlightRouterStateToRouteTree(\n    flightRouterState,\n    ROOT_SEGMENT_REQUEST_KEY,\n    null,\n    renderedSearch,\n    acc\n  )\n}\n\nexport function convertReusedFlightRouterStateToRouteTree(\n  parentRouteTree: RouteTree,\n  parallelRouteKey: string,\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n) {\n  // Create a RouteTree for a FlightRouterState that was reused from an older\n  // route. This happens during a navigation when a parallel route slot does not\n  // match the target route; we reuse whatever slot was already active.\n\n  // Unlike a FlightRouterState, the RouteTree type contains backreferences to\n  // the parent segments. Append the vary path to the parent's vary path.\n  const parentPartialVaryPath = parentRouteTree.isPage\n    ? getPartialPageVaryPath(parentRouteTree.varyPath)\n    : getPartialLayoutVaryPath(parentRouteTree.varyPath)\n  const segment = flightRouterState[0]\n  // And the request key.\n  const parentRequestKey = parentRouteTree.requestKey\n  const requestKeyPart = createSegmentRequestKeyPart(segment)\n  const requestKey = appendSegmentRequestKeyPart(\n    parentRequestKey,\n    parallelRouteKey,\n    requestKeyPart\n  )\n  return convertFlightRouterStateToRouteTree(\n    flightRouterState,\n    requestKey,\n    parentPartialVaryPath,\n    renderedSearch,\n    acc\n  )\n}\n\nfunction convertFlightRouterStateToRouteTree(\n  flightRouterState: FlightRouterState,\n  requestKey: SegmentRequestKey,\n  parentPartialVaryPath: PartialSegmentVaryPath | null,\n  parentRenderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  const originalSegment = flightRouterState[0]\n\n  // This segment's param (if any) is a root param iff the segment is at or\n  // above the root layout, which the server marks directly.\n  const isRootParam =\n    ((flightRouterState[4] ?? 0) & PrefetchHint.IsRootLayoutOrAbove) !== 0\n\n  // If the FlightRouterState has a refresh state, then this segment is part of\n  // an inactive parallel route. It has a different rendered search query than\n  // the outer parent route. In order to construct the inactive route correctly,\n  // we must restore the query that was originally used to render it.\n  const compressedRefreshState = flightRouterState[2] ?? null\n  const refreshState =\n    compressedRefreshState !== null\n      ? {\n          canonicalUrl: compressedRefreshState[0] as string,\n          renderedSearch: compressedRefreshState[1] as NormalizedSearch,\n        }\n      : null\n  const renderedSearch =\n    refreshState !== null ? refreshState.renderedSearch : parentRenderedSearch\n\n  let segment: FlightRouterStateSegment\n  let partialVaryPath: PartialSegmentVaryPath | null\n  let isPage: boolean\n  let varyPath: SegmentVaryPath\n  if (Array.isArray(originalSegment)) {\n    isPage = false\n    const paramCacheKey = originalSegment[1]\n    const paramName = originalSegment[0]\n    partialVaryPath = appendLayoutVaryPath(\n      parentPartialVaryPath,\n      paramCacheKey,\n      paramName,\n      isRootParam\n    )\n    varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    segment = originalSegment\n  } else {\n    // This segment does not have a param. Inherit the partial vary path of\n    // the parent.\n    partialVaryPath = parentPartialVaryPath\n    if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n      // This is a page segment.\n      isPage = true\n\n      // The navigation implementation expects the search params to be included\n      // in the segment. However, in the case of a static response, the search\n      // params are omitted. So the client needs to add them back in when reading\n      // from the Segment Cache.\n      //\n      // For consistency, we'll do this for dynamic responses, too.\n      //\n      // TODO: We should move search params out of FlightRouterState and handle\n      // them entirely on the client, similar to our plan for dynamic params.\n      segment = PAGE_SEGMENT_KEY\n      varyPath = finalizePageVaryPath(\n        requestKey,\n        renderedSearch,\n        partialVaryPath\n      )\n      // The metadata \"segment\" is not part the route tree, but it has the same\n      // conceptual params as a page segment. Write the vary path into the\n      // accumulator object. If there are multiple parallel pages, we use the\n      // first one. Which page we choose is arbitrary as long as it's\n      // consistently the same one every time every time. See\n      // finalizeMetadataVaryPath for more details.\n      if (acc.metadataVaryPath === null) {\n        acc.metadataVaryPath = finalizeMetadataVaryPath(\n          requestKey,\n          renderedSearch,\n          partialVaryPath\n        )\n      }\n    } else {\n      // This is a layout segment.\n      isPage = false\n      segment = originalSegment\n      varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    }\n  }\n\n  let slots: Map<string, RouteTree> | null = null\n\n  const parallelRoutes = flightRouterState[1]\n  for (let parallelRouteKey in parallelRoutes) {\n    const childRouterState = parallelRoutes[parallelRouteKey]\n    const childSegment = childRouterState[0]\n    // TODO: Eventually, the param values will not be included in the response\n    // from the server. We'll instead fill them in on the client by parsing\n    // the URL. This is where we'll do that.\n    const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n    const childRequestKey = appendSegmentRequestKeyPart(\n      requestKey,\n      parallelRouteKey,\n      childRequestKeyPart\n    )\n    const childTree = convertFlightRouterStateToRouteTree(\n      childRouterState,\n      childRequestKey,\n      partialVaryPath,\n      renderedSearch,\n      acc\n    )\n    if (slots === null) {\n      slots = new Map()\n    }\n    slots.set(parallelRouteKey, childTree)\n  }\n\n  return {\n    requestKey,\n    segment,\n    shellVaryPath: getShellSegmentVaryPath(varyPath),\n    refreshState,\n    // TODO: Cheating the type system here a bit because TypeScript can't tell\n    // that the type of isPage and varyPath are consistent. The fix would be to\n    // create separate constructors and call the appropriate one from each of\n    // the branches above. Just seems a bit overkill only for one field so I'll\n    // leave it as-is for now. If isPage were wrong it would break the behavior\n    // and we'd catch it quickly, anyway.\n    varyPath: varyPath as any,\n    isPage: isPage as boolean as any,\n    slots,\n    prefetchHints: flightRouterState[4] ?? 0,\n  }\n}\n\nexport function convertRouteTreeToFlightRouterState(\n  routeTree: RouteTree\n): FlightRouterState {\n  const parallelRoutes: Record<string, FlightRouterState> = {}\n  const slots = routeTree.slots\n  if (slots !== null) {\n    for (const [parallelRouteKey, childTree] of slots) {\n      parallelRoutes[parallelRouteKey] =\n        convertRouteTreeToFlightRouterState(childTree)\n    }\n  }\n  const flightRouterState: FlightRouterState = [\n    routeTree.segment,\n    parallelRoutes,\n    null,\n    null,\n  ]\n  if (routeTree.prefetchHints !== 0) {\n    flightRouterState[4] = routeTree.prefetchHints\n  }\n  return flightRouterState\n}\n\nexport async function fetchRouteOnCacheMiss(\n  entry: PendingRouteCacheEntry,\n  key: RouteCacheKey,\n  // The spawning task's `PrefetchTask.segmentCacheMap`, for the legacy\n  // branch that writes segment data included in the tree response.\n  map: CacheMap<SegmentCacheEntry>\n): Promise<PrefetchSubtaskResult<null> | null> {\n  // This function is allowed to use async/await because it contains the actual\n  // fetch that gets issued on a cache miss. Notice it writes the result to the\n  // cache entry directly, rather than return data that is then written by\n  // the caller.\n  const pathname = key.pathname\n  const search = key.search\n  const nextUrl = key.nextUrl\n  const segmentPath = '/_tree' as SegmentRequestKey\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n    [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: segmentPath,\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  try {\n    const url = new URL(pathname + search, location.origin)\n    let response\n    let urlAfterRedirects\n    if (isOutputExportMode) {\n      // In output: \"export\" mode, we can't use headers to request a particular\n      // segment. Instead, we encode the extra request information into the URL.\n      // This is not part of the \"public\" interface of the app; it's an internal\n      // Next.js implementation detail that the app developer should not need to\n      // concern themselves with.\n      //\n      // For example, to request a segment:\n      //\n      //   Path passed to <Link>:   /path/to/page\n      //   Path passed to fetch:    /path/to/page/__next-segments/_tree\n      //\n      //   (This is not the exact protocol, just an illustration.)\n      //\n      // Before we do that, though, we need to account for redirects. Even in\n      // output: \"export\" mode, a proxy might redirect the page to a different\n      // location, but we shouldn't assume or expect that they also redirect all\n      // the segment files, too.\n      //\n      // To check whether the page is redirected, previously we perform a range\n      // request of 64 bytes of the HTML document to check if the target page\n      // is part of this app (by checking if build id matches). Only if the target\n      // page is part of this app do we determine the final canonical URL.\n      //\n      // However, as mentioned in https://github.com/vercel/next.js/pull/85903,\n      // some popular static hosting providers (like Cloudflare Pages or Render.com)\n      // do not support range requests, in the worst case, the entire HTML instead\n      // of 64 bytes could be returned, which is wasteful.\n      //\n      // So instead, we drops the check for build id here, and simply perform\n      // a HEAD request to rejects 1xx/4xx/5xx responses, and then determine the\n      // final URL after redirects.\n      //\n      // NOTE: We could embed the route tree into the HTML document, to avoid\n      // a second request. We're not doing that currently because it would make\n      // the HTML document larger and affect normal page loads.\n      const headResponse = await fetch(url, {\n        method: 'HEAD',\n      })\n      if (headResponse.status < 200 || headResponse.status >= 400) {\n        // The target page responded w/o a successful status code\n        // Could be a WAF serving a 403, or a 5xx from a backend\n        //\n        // Note that we can't use headResponse.ok here, because\n        // Response#ok returns `false` with 3xx responses.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      urlAfterRedirects = headResponse.redirected\n        ? new URL(headResponse.url)\n        : url\n\n      response = await fetchPrefetchResponse(\n        addSegmentPathToUrlInOutputExportMode(urlAfterRedirects, segmentPath),\n        headers\n      )\n    } else {\n      // \"Server\" mode. We can use request headers instead of the pathname.\n      // TODO: The eventual plan is to get rid of our custom request headers and\n      // encode everything into the URL, using a similar strategy to the\n      // \"output: export\" block above.\n      response = await fetchPrefetchResponse(url, headers)\n      urlAfterRedirects =\n        response !== null && response.redirected ? new URL(response.url) : url\n    }\n\n    if (!response || !response.ok || !response.body) {\n      // Server responded with an error, or with a miss. We should still cache\n      // the response, but we can try again after 10 seconds.\n      rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // TODO: The canonical URL is the href without the origin. I think\n    // historically the reason for this is because the initial canonical URL\n    // gets passed as a prop to the top-level React component, which means it\n    // needs to be computed during SSR. If it were to include the origin, it\n    // would need to always be same as location.origin on the client, to prevent\n    // a hydration mismatch. To sidestep this complexity, we omit the origin.\n    //\n    // However, since this is neither a native URL object nor a fully qualified\n    // URL string, we need to be careful about how we use it. To prevent subtle\n    // mistakes, we should create a special type for it, instead of just string.\n    // Or, we should just use a (readonly) URL object instead. The type of the\n    // prop that we pass to seed the initial state does not need to be the same\n    // type as the state itself.\n    const canonicalUrl = createHrefFromUrl(urlAfterRedirects)\n\n    // Check whether the response varies based on the Next-Url header.\n    const varyHeader = response.headers.get('vary')\n    const couldBeIntercepted =\n      varyHeader !== null && varyHeader.includes(NEXT_URL)\n\n    // TODO: The `closed` promise was originally used to track when a streaming\n    // network connection closes, so the scheduler could limit concurrent\n    // connections. Now that prefetch responses are buffered, `closed` is\n    // resolved immediately after buffering — before the outer function even\n    // returns. This mechanism is only still meaningful for dynamic (Full)\n    // prefetches, which use incremental streaming. Consider removing the\n    // `closed` plumbing for buffered prefetch paths.\n    const closed = createPromiseWithResolvers<void>()\n\n    // This checks whether the response was served from the per-segment cache,\n    // rather than the old prefetching flow. If it fails, it implies that PPR\n    // is disabled on this route.\n    const routeIsPPREnabled =\n      response.headers.get(NEXT_DID_POSTPONE_HEADER) === '2' ||\n      // In output: \"export\" mode, we can't rely on response headers. But if we\n      // receive a well-formed response, we can assume it's a static response,\n      // because all data is static in this mode.\n      isOutputExportMode\n\n    if (routeIsPPREnabled) {\n      const { stream: prefetchStream, size: responseSize } =\n        await createNonTaskyPrefetchResponseStream(response.body)\n      closed.resolve()\n      setSizeInCacheMap(entry, responseSize)\n      const serverData = await createFromNextReadableStream<RootTreePrefetch>(\n        prefetchStream,\n        headers,\n        { allowPartialStream: true }\n      )\n\n      if (\n        (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n          serverData.buildId) !== getNavigationBuildId()\n      ) {\n        // The server build does not match the client. Treat as a 404. During\n        // an actual navigation, the router will trigger an MPA navigation.\n        // TODO: We should cache the fact that this is an MPA navigation.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      // Get the params that were used to render the target page. These may\n      // be different from the params in the request URL, if the page\n      // was rewritten.\n      const renderedPathname = getRenderedPathname(response)\n      const renderedSearch = getRenderedSearch(response)\n\n      // Convert the server-sent data into the RouteTree format used by the\n      // client cache.\n      //\n      // During this traversal, we accumulate additional data into this\n      // \"accumulator\" object.\n      const acc: RouteTreeAccumulator = {\n        metadataVaryPath: null,\n        treeDivergedFromBase: false,\n      }\n      const routeTree = convertRootTreePrefetchToRouteTree(\n        serverData,\n        renderedPathname,\n        renderedSearch,\n        acc\n      )\n      const metadataVaryPath = acc.metadataVaryPath\n      if (metadataVaryPath === null) {\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      discoverKnownRoute(\n        Date.now(),\n        pathname,\n        search,\n        nextUrl,\n        entry,\n        routeTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        routeIsPPREnabled,\n        false // hasDynamicRewrite\n      )\n    } else {\n      // PPR is not enabled for this route. The server responds with a\n      // different format (FlightRouterState) that we need to convert.\n      // TODO: We will unify the responses eventually. I'm keeping the types\n      // separate for now because FlightRouterState has so many\n      // overloaded concerns.\n      const { stream: prefetchStream, size: responseSize } =\n        await createNonTaskyPrefetchResponseStream(response.body)\n      closed.resolve()\n      setSizeInCacheMap(entry, responseSize)\n      const serverData =\n        await createFromNextReadableStream<NavigationFlightResponse>(\n          prefetchStream,\n          headers,\n          { allowPartialStream: true }\n        )\n\n      if (\n        (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n          serverData.b) !== getNavigationBuildId()\n      ) {\n        // The server build does not match the client. Treat as a 404. During\n        // an actual navigation, the router will trigger an MPA navigation.\n        // TODO: We should cache the fact that this is an MPA navigation.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      // Read head vary params synchronously (unioning in the response-level\n      // root params). Individual segments carry their own iterables in\n      // CacheNodeSeedData; the root iterable is threaded down so each segment\n      // unions it too.\n      const headVaryParams = readVaryParams(serverData.h, serverData.r)\n      writeDynamicTreeResponseIntoCache(\n        Date.now(),\n        // The non-PPR response format is what we'd get if we prefetched these segments\n        // using the LoadingBoundary fetch strategy, so mark their cache entries accordingly.\n        FetchStrategy.LoadingBoundary,\n        response as RSCResponse<NavigationFlightResponse>,\n        serverData,\n        entry,\n        couldBeIntercepted,\n        canonicalUrl,\n        routeIsPPREnabled,\n        headVaryParams,\n        serverData.r ?? null,\n        pathname,\n        search,\n        nextUrl,\n        map\n      )\n    }\n\n    if (!couldBeIntercepted) {\n      // This route will never be intercepted. So we can use this entry for all\n      // requests to this route, regardless of the Next-Url header. This works\n      // because when reading the cache we always check for a valid\n      // non-intercepted entry first.\n\n      // Re-key the entry. The `set` implementation handles removing it from\n      // its previous position in the cache. We don't need to do anything to\n      // update the LRU, because the entry is already in it.\n      // TODO: Treat this as an upsert — should check if an entry already\n      // exists at the new keypath, and if so, whether we should keep that\n      // one instead.\n      const fulfilledVaryPath: RouteVaryPath = getFulfilledRouteVaryPath(\n        pathname,\n        search,\n        nextUrl,\n        couldBeIntercepted\n      )\n      const isRevalidation = false\n      setInCacheMap(routeCacheMap, fulfilledVaryPath, entry, isRevalidation)\n    }\n    // Return a promise that resolves when the network connection closes, so\n    // the scheduler can track the number of concurrent network connections.\n    return { value: null, closed: closed.promise }\n  } catch (error) {\n    // Either the connection itself failed, or something bad happened while\n    // decoding the response. If we're offline, reject with staleAt=-1 so the\n    // entry immediately expires and gets retried once the scheduler is\n    // re-pinged after connectivity is restored.\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { checkOfflineError } =\n        require('../offline') as typeof import('../offline')\n      if (checkOfflineError(error)) {\n        // Unlike navigations and server actions, prefetches don't await\n        // waitForConnection — they just reject the cache entry with an\n        // immediate expiration so it gets retried once the scheduler is\n        // re-pinged after connectivity is restored.\n        rejectRouteCacheEntry(entry, -1)\n        return null\n      }\n    }\n    rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\nfunction rejectRemainingSegmentsInBundle(\n  entries: SegmentBundle,\n  staleAt: number\n): void {\n  let node: SegmentBundle | null = entries\n  while (node !== null) {\n    if (node.entry !== null && node.entry.status === EntryStatus.Pending) {\n      rejectSegmentCacheEntry(node.entry as PendingSegmentCacheEntry, staleAt)\n    }\n    node = node.parent\n  }\n}\n\n// When a static (per-segment PPR) prefetch receives an upgradeable fallback\n// shell, the localized retry loop re-issues the same fetch after this delay to\n// pick up the concrete version once the server's background regeneration\n// finishes.\nconst FALLBACK_RETRY_DELAY_MS = 2000\n\n// Maximum number of fallback retries per task, to avoid looping indefinitely\n// if the server keeps returning a fallback (e.g. misconfiguration).\nconst MAX_FALLBACK_RETRIES = 3\n\nexport async function fetchSegmentsOnCacheMiss(\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree,\n  segments: SegmentBundle,\n  segmentCount: number,\n  // Which walk spawned the bundle's entries. The request on the wire is\n  // identical either way; this only decides which payload of the response\n  // fulfills the entries.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): Promise<PrefetchSubtaskResult<null> | null> {\n  // This function is allowed to use async/await because it contains the actual\n  // fetch that gets issued on a cache miss. Notice it writes the result to the\n  // cache entry directly, rather than return data that is then written by\n  // the caller.\n  //\n  // Segment fetches are non-blocking so we don't need to ping the scheduler\n  // on completion.\n  let result\n  try {\n    result = await fetchSegmentsOnCacheMissImpl(route, routeKey, tree)\n  } catch (error) {\n    // The connection failed, or the response couldn't be decoded. Reject the\n    // pending entries so they don't stay Pending forever, and get retried once\n    // the entry expires. If we're offline, expire immediately (-1) so the entry\n    // is re-fetched once the scheduler is re-pinged on reconnect; otherwise\n    // apply a 10s backoff. (Unlike navigations and server actions, prefetches\n    // don't await `waitForConnection`.)\n    let staleAt = Date.now() + 10 * 1000\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { checkOfflineError } =\n        require('../offline') as typeof import('../offline')\n      if (checkOfflineError(error)) {\n        staleAt = -1\n      }\n    }\n    rejectRemainingSegmentsInBundle(segments, staleAt)\n    return null\n  }\n\n  if (result === null) {\n    // The response was fetched but isn't usable yet (server error/miss, empty\n    // data, or a build-id mismatch — the server may be transiently unready).\n    // Reject with a short backoff so the entries are retried soon.\n    rejectRemainingSegmentsInBundle(segments, Date.now() + 10 * 1000)\n    return null\n  }\n\n  const { serverResponse, shellResponse, responseSize, closed } = result\n  const now = Date.now()\n\n  writeSegmentBundleResponseVariants(\n    task.segmentCacheMap,\n    serverResponse,\n    shellResponse,\n    responseSize,\n    segments,\n    segmentCount,\n    now,\n    fetchStrategy\n  )\n\n  // If the server served an upgradeable fallback shell, drive a localized\n  // retry loop to pick up the concrete version once the server's background\n  // regeneration finishes. Only the first such response per task starts a loop\n  // (`fallbackRetryStatus === Empty`); once it leaves Empty, no second loop is\n  // started — sibling bundle responses that also got a fallback don't, and\n  // neither does a re-hover.\n  if (\n    serverResponse.isUpgradeableISRFallback &&\n    task.fallbackRetryStatus === EntryStatus.Empty &&\n    !task.isCanceled\n  ) {\n    task.fallbackRetryStatus = EntryStatus.Pending\n    // Fire-and-forget: the loop drives itself via timers and pings the task\n    // on success.\n    void retryUpgradeableFallbackPrefetch(\n      task,\n      route,\n      routeKey,\n      tree,\n      segments,\n      segmentCount,\n      fetchStrategy\n    )\n  }\n\n  return {\n    value: null,\n    closed,\n  }\n}\n\n/**\n * Issues a single segment-bundle prefetch request, validates it, and decodes\n * the response. Returns the decoded response (see the return type below)\n * on success, or `null` if the response was fetched but isn't usable yet\n * (server error/miss, empty data, or a build-id mismatch — the server may be\n * transiently unready, so it's worth retrying). THROWS if the connection failed\n * or the response couldn't be decoded; re-issuing the identical request won't\n * fix that, so callers should give up rather than retry.\n *\n * This deliberately does NOT touch the cache — it neither writes the decoded\n * segments nor rejects entries. The caller decides what to do with the result:\n * write it (`fetchSegmentsOnCacheMiss`) or ignore it and try again (the retry\n * loop). Calling this again with the same arguments reproduces the exact same\n * request.\n */\nasync function fetchSegmentsOnCacheMissImpl(\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree\n): Promise<{\n  serverResponse: SegmentPrefetchResponse\n  responseSize: number\n  // The shell payload of the response: `serverResponse` itself when the\n  // shell IS the full response (a fully static page — callers compare by\n  // reference), a second decode of the same bytes truncated at the shell\n  // byte boundary when the shell is a strict prefix, or `null` when no\n  // shell exists.\n  shellResponse: SegmentPrefetchResponse | null\n  closed: Promise<void>\n} | null> {\n  // Use the canonical URL to request the segment, not the original URL. These\n  // are usually the same, but the canonical URL will be different if the route\n  // tree response was redirected. To avoid an extra waterfall on every segment\n  // request, we pass the redirected URL instead of the original one.\n  const url = new URL(route.canonicalUrl, location.origin)\n  const nextUrl = routeKey.nextUrl\n\n  const requestKey = tree.requestKey\n  const normalizedRequestKey =\n    requestKey === ROOT_SEGMENT_REQUEST_KEY\n      ? // The root segment is a special case. To simplify the server-side\n        // handling of these requests, we encode the root segment path as\n        // `_index` instead of as an empty string. This should be treated as\n        // an implementation detail and not as a stable part of the protocol.\n        // It just needs to match the equivalent logic that happens when\n        // prerendering the responses. It should not leak outside of Next.js.\n        ('/_index' as SegmentRequestKey)\n      : requestKey\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n    [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: normalizedRequestKey,\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  const requestUrl = isOutputExportMode\n    ? // In output: \"export\" mode, we need to add the segment path to the URL.\n      addSegmentPathToUrlInOutputExportMode(url, normalizedRequestKey)\n    : url\n\n  const response = await fetchPrefetchResponse(requestUrl, headers)\n  if (\n    !response ||\n    !response.ok ||\n    // This checks whether the response was served from the per-segment cache,\n    // rather than the old prefetching flow. If it fails, it implies that PPR\n    // is disabled on this route. Theoretically this should never happen\n    // because we only issue requests for segments once we've verified that\n    // the route supports PPR.\n    (response.headers.get(NEXT_DID_POSTPONE_HEADER) !== '2' &&\n      // In output: \"export\" mode, we can't rely on response headers. But if\n      // we receive a well-formed response, we can assume it's a static\n      // response, because all data is static in this mode.\n      !isOutputExportMode) ||\n    !response.body\n  ) {\n    // Server responded with an error or a miss — fetched but not usable.\n    return null\n  }\n\n  // See TODO in fetchRouteOnCacheMiss about removing `closed` for\n  // buffered prefetch paths.\n  const closed = createPromiseWithResolvers<void>()\n\n  const {\n    stream: prefetchStream,\n    size: responseSize,\n    buffer,\n  } = await createNonTaskyPrefetchResponseStream(response.body)\n  closed.resolve()\n\n  // Parse the response. Always a SegmentPrefetchResponse with a build ID and a\n  // data array. A connection drop or malformed stream throws here, which\n  // propagates to the caller as a non-retryable failure.\n  const serverResponse =\n    await createFromNextReadableStream<SegmentPrefetchResponse>(\n      prefetchStream,\n      headers,\n      { allowPartialStream: true }\n    )\n\n  if (serverResponse.data.length === 0) {\n    return null\n  }\n  if (\n    (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n      serverResponse.buildId) !== getNavigationBuildId()\n  ) {\n    // The server build does not match the client. Treat as a 404. During\n    // an actual navigation, the router will trigger an MPA navigation.\n    return null\n  }\n\n  // Extract the shell payload, if the response carries a distinct one\n  // (positive shell byte offset): decode the buffered bytes a SECOND time,\n  // truncated at the boundary. The truncation is what produces the shell\n  // variant: each segment's param-dependent rows land past the boundary and\n  // decode as still-pending, which renders as the param fallback. It also\n  // rewinds the response's signals — `needsRuntimeRequest` and `isPartial`\n  // fulfillments past the boundary read as pending in this decode, so a\n  // post-shell runtime-data access doesn't mark the shell variant itself as\n  // needing a runtime request.\n  // (The offset is never legitimately pending or 0 in this decode: the full\n  // buffer is present, and the server only ever emits a positive offset or\n  // null. Reading 0 — the default for an unfulfilled `a` — therefore means a\n  // bug in Next.js itself, and is handled like an error: the response is\n  // treated as carrying no shell, and the scheduler skips the affected\n  // segments rather than falling back to a runtime request — see the\n  // `shellResponse === null` handling in writeSegmentBundleResponseVariants.\n  // Failing in that direction costs a shell prefetch but never leaks\n  // post-shell content into shell positions.)\n  const shellOffset = readFulfilledValue(serverResponse.a, 0)\n  let shellResponse: SegmentPrefetchResponse | null\n  if (shellOffset === null) {\n    shellResponse = serverResponse\n  } else if (shellOffset === 0) {\n    shellResponse = null\n  } else {\n    try {\n      shellResponse = await decodeBufferedStage<SegmentPrefetchResponse>(\n        buffer.subarray(0, shellOffset),\n        headers\n      )\n    } catch {\n      // The truncated prefix couldn't be decoded. Treat it as if no shell\n      // exists; the full payload is still usable. (For a StaticShell-spawned\n      // bundle this means the spawned entries are rejected — the scheduler\n      // then skips them rather than issuing a runtime substitute; see the\n      // no-shell branch in fetchSegmentsOnCacheMiss.)\n      shellResponse = null\n    }\n  }\n\n  return {\n    serverResponse,\n    responseSize,\n    shellResponse,\n    closed: closed.promise,\n  }\n}\n\n/**\n * Writes every payload of a parsed segment-bundle response into the cache.\n * The bundle's entries are fulfilled by the payload matching the walk that\n * spawned them; the other payload, when distinct, is written with a detached\n * copy of the bundle. The full payload is written first so the shell write's\n * shadow eviction sees the fresh concrete entry.\n *\n * Shared by the initial fetch (`fetchSegmentsOnCacheMiss`) and the localized\n * fallback-retry loop. The retry's bundle entries are already settled, so\n * for that caller every write is a detached upsert and the rejection below\n * is a no-op (it only touches Pending entries).\n */\nfunction writeSegmentBundleResponseVariants(\n  // The map the bundle's entries live in (pinned when the request was\n  // spawned).\n  map: CacheMap<SegmentCacheEntry>,\n  serverResponse: SegmentPrefetchResponse,\n  shellResponse: SegmentPrefetchResponse | null,\n  responseSize: number,\n  segments: SegmentBundle,\n  segmentCount: number,\n  now: number,\n  // Which walk spawned the bundle's entries; decides which payload fulfills\n  // them. See fetchSegmentsOnCacheMiss.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): void {\n  if (fetchStrategy === FetchStrategy.StaticShell) {\n    if (shellResponse !== serverResponse) {\n      writeSegmentBundleResponse(\n        map,\n        serverResponse,\n        responseSize,\n        detachEntriesFromSegmentBundle(segments),\n        segmentCount,\n        now,\n        FetchStrategy.PPR,\n        FetchStrategy.PPR\n      )\n    }\n    if (shellResponse === null) {\n      // No shell exists. Reject the spawned entries so the task isn't\n      // stranded blocking on them. Note the scheduler does NOT fall back to\n      // a runtime request for rejected segments — it skips them outright (see\n      // the Rejected case in pingSegmentBundle in scheduler.ts), so these\n      // segments get no shell prefetch and no runtime substitute until the\n      // rejection's backoff expires.\n      rejectRemainingSegmentsInBundle(segments, now + 10 * 1000)\n    } else {\n      writeSegmentBundleResponse(\n        map,\n        shellResponse,\n        responseSize,\n        segments,\n        segmentCount,\n        now,\n        FetchStrategy.StaticShell,\n        // When the shell IS the full response (no shell/full split), the\n        // entries this write fulfills carry full-tier content, so PPR is the\n        // strategy that describes it.\n        shellResponse === serverResponse\n          ? FetchStrategy.PPR\n          : FetchStrategy.StaticShell\n      )\n    }\n  } else {\n    writeSegmentBundleResponse(\n      map,\n      serverResponse,\n      responseSize,\n      segments,\n      segmentCount,\n      now,\n      FetchStrategy.PPR,\n      FetchStrategy.PPR\n    )\n    if (shellResponse !== null && shellResponse !== serverResponse) {\n      writeSegmentBundleResponse(\n        map,\n        shellResponse,\n        responseSize,\n        detachEntriesFromSegmentBundle(segments),\n        segmentCount,\n        now,\n        FetchStrategy.StaticShell,\n        FetchStrategy.StaticShell\n      )\n    }\n  }\n}\n\n/**\n * Writes one payload of a parsed segment-bundle response into the cache:\n * distributes the response size across the bundle, then walks the segments\n * list and the response's `data` array in parallel, fulfilling/upserting\n * each entry. Any segments the server didn't return are rejected so they\n * don't stay Pending forever.\n *\n * `fetchStrategy` says which of the response's payloads this call is\n * writing — StaticShell for the shell payload, PPR for the full payload —\n * which determines the vary paths the entries are keyed at.\n *\n * The walk fulfills any Pending entry in `segments`, so the caller must\n * pass the bundle only to the walk matching the entries' own strategy, and\n * a detached copy to the other. In particular, fulfilling a spawned\n * StaticShell entry with the concrete payload would leak param-dependent\n * content into shell positions: during a navigation, a pending entry can be\n * rendered as a promise that resolves to its eventual value.\n *\n * Shared by the initial fetch and the localized fallback-retry loop (which\n * re-issues the same request and upserts the upgraded result here).\n */\nfunction writeSegmentBundleResponse(\n  map: CacheMap<SegmentCacheEntry>,\n  serverResponse: SegmentPrefetchResponse,\n  responseSize: number,\n  segments: SegmentBundle,\n  segmentCount: number,\n  now: number,\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell,\n  // The strategy tier that describes this payload's CONTENT, recorded on\n  // the entries it fulfills. Differs from `fetchStrategy` (which drives\n  // matching and keying) in one case: a StaticShell write whose payload IS\n  // the full response (no shell/full split) records PPR — see\n  // writeSegmentBundleResponseVariants.\n  payloadFetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): void {\n  // Distribute the response size evenly across all segments in the bundle.\n  // (When a response produces two payload writes, each write distributes the\n  // full response size — intentionally double-charging the LRU for one wire\n  // response, since it produced two live entries per segment.)\n  const averageSize = responseSize / segmentCount\n  let sizeNode: SegmentBundle | null = segments\n  while (sizeNode !== null) {\n    if (sizeNode.entry !== null) {\n      setSizeInCacheMap(sizeNode.entry, averageSize)\n    }\n    sizeNode = sizeNode.parent\n  }\n\n  const serverDataArray = serverResponse.data\n\n  // True if the server served an upgradeable fallback shell (page not yet\n  // prerendered with concrete params, but the route can be upgraded). Applies\n  // to the whole response and is recorded on each fulfilled entry.\n  const responseIsUpgradeableISRFallback =\n    serverResponse.isUpgradeableISRFallback\n\n  // Whether the render that produced this payload accessed runtime data\n  // (page-global; combined with each segment's `isPartial` below to decide\n  // the tier each entry records). Read from THIS decode's thenable status,\n  // which scopes it to the payload being written — see\n  // `SegmentPrefetchResponse['needsRuntimeRequest']` for the encoding.\n  //\n  // Reading it from the same decode that produced the entry's data is what\n  // makes the answer rewindable: a truncated shell decode reads a post-shell\n  // runtime access as pending, i.e. `false`, because the shell variant itself\n  // doesn't need that data.\n  //\n  // It is load-bearing in one direction only. A false `true` costs a wasted\n  // runtime request; a false `false` would record too high a tier and skip a\n  // runtime request that had more content.\n  const responseNeedsRuntimeRequest = readFulfilledValue(\n    serverResponse.needsRuntimeRequest,\n    false\n  )\n\n  let node: SegmentBundle | null = segments\n  let dataIndex = 0\n  while (node !== null && dataIndex < serverDataArray.length) {\n    const data = serverDataArray[dataIndex]\n\n    // Null data means this segment has prefetching disabled\n    // (prefetch: 'force-disabled' — Partial Prefetching segments have static\n    // data, so the server emits a real slot for them). Skip it without\n    // creating a cache entry.\n    if (data === null || node.tree === null) {\n      // The server's and the client's prefetch-disabled hints normally agree,\n      // so there shouldn't be a spawned entry for a segment the server\n      // skipped. But if they disagree, a Pending entry that a task blocked on\n      // would otherwise never settle, stranding the task forever. Settle\n      // it defensively.\n      if (node.entry !== null && node.entry.status === EntryStatus.Pending) {\n        rejectSegmentCacheEntry(\n          node.entry as PendingSegmentCacheEntry,\n          now + 10 * 1000\n        )\n      }\n      node = node.parent\n      dataIndex++\n      continue\n    }\n\n    // The segment's late-resolving metadata can be read synchronously\n    // because the payload was fully buffered before it was decoded (and, for\n    // a truncated shell decode, delivered as a single chunk).\n    const entryStaleAt = readFulfilledStaleAt(now, data.staleTime)\n    // Root params are emitted once at the top level of the response and\n    // unioned into each segment's set here, same as for a route-level\n    // response.\n    const varyParams = readVaryParams(\n      data.varyParams,\n      serverResponse.rootVaryParams\n    )\n    const isPartial = readFulfilledIsPartial(data.isPartial)\n\n    // A runtime prefetch can only provide more content than this entry if the\n    // render accessed runtime data AND this particular segment has holes — a\n    // fully static segment gains nothing from a runtime request no matter\n    // what the page accessed.\n    const needsRuntimeRequest = responseNeedsRuntimeRequest && isPartial\n\n    // An entry records the tier of the content that actually satisfied it,\n    // which spans both axes: shell-vs-concrete AND static-vs-runtime.\n    //\n    // When this payload fully satisfied the segment — no runtime request\n    // needed — the content is as complete as a RUNTIME response of the same\n    // variant would have been, so it records that runtime tier. That's what\n    // lets the scheduler decide \"would a runtime request return more?\" by\n    // comparing tiers alone, with no separate signal to consult.\n    //\n    // Otherwise the content is only as complete as the static tier it was\n    // requested at, so a follow-up runtime request can still supersede it.\n    const recordedFetchStrategy = !needsRuntimeRequest\n      ? payloadFetchStrategy === FetchStrategy.StaticShell\n        ? FetchStrategy.RuntimeShell\n        : FetchStrategy.PPRRuntime\n      : fetchStrategy\n\n    // Key the entry by which params the server said this segment depends on.\n    // Reusing one copy across param values is the point of the shell, but it\n    // requires knowing the content doesn't depend on those params, and the\n    // server's report is the direct evidence of that.\n    //\n    // Without that report, assume every param varies. The exception is a\n    // shell variant, which reduces param-dependent content to param\n    // fallbacks, so it really is good for any value of them.\n    const payloadVaryPath =\n      process.env.__NEXT_VARY_PARAMS && varyParams !== null\n        ? getFulfilledSegmentVaryPath(node.tree.varyPath, varyParams)\n        : getSegmentVaryPathForRequest(payloadFetchStrategy, node.tree)\n\n    const nodeEntry = node.entry\n    if (nodeEntry !== null && nodeEntry.status === EntryStatus.Pending) {\n      // We own this entry — fulfill it directly.\n      const fulfilledEntry = fulfillSegmentCacheEntry(\n        nodeEntry as PendingSegmentCacheEntry,\n        data.rsc,\n        entryStaleAt,\n        isPartial,\n        responseIsUpgradeableISRFallback,\n        recordedFetchStrategy\n      )\n      // Move the entry to that key. This is load-bearing rather than a no-op:\n      // a task spawns its entries before it knows what the response will\n      // contain, so the key it guessed can be more reusable than the response\n      // turned out to deserve.\n      //\n      // Pass the concrete lookup path — the most specific path a read for\n      // this segment position would use — so that if the entry lands at a\n      // more generic key, a stale entry at a more specific one can't shadow\n      // it. See evictShadowingSegmentEntries. The upsert (rather than a bare\n      // set) applies the usual precedence rules, so a concurrent task's more\n      // complete response already in this slot isn't downgraded.\n      upsertSegmentEntry(\n        now,\n        map,\n        payloadVaryPath,\n        fulfilledEntry,\n        node.tree.varyPath\n      )\n    } else {\n      // We don't own this entry. Create a detached entry and attempt to\n      // upsert it into this payload's slot.\n      const detachedEntry = createDetachedSegmentCacheEntry(now)\n      const fulfilledEntry = fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(detachedEntry, fetchStrategy),\n        data.rsc,\n        entryStaleAt,\n        isPartial,\n        responseIsUpgradeableISRFallback,\n        recordedFetchStrategy\n      )\n      upsertSegmentEntry(\n        now,\n        map,\n        payloadVaryPath,\n        fulfilledEntry,\n        node.tree.varyPath\n      )\n    }\n\n    node = node.parent\n    dataIndex++\n  }\n\n  // If the server returned fewer segments than expected, reject any\n  // remaining pending entries so they don't stay Pending forever.\n  if (node !== null) {\n    rejectRemainingSegmentsInBundle(node, now + 10 * 1000)\n  }\n}\n\n/**\n * Clones a SegmentBundle chain with every `entry` removed, so a write walk\n * over it is pure detached upserts. Used for the payload that does NOT\n * match the bundle's spawned entries (see writeSegmentBundleResponse).\n */\nfunction detachEntriesFromSegmentBundle(\n  segments: SegmentBundle\n): SegmentBundle {\n  const head: SegmentBundle = {\n    tree: segments.tree,\n    entry: null,\n    parent: null,\n  }\n  let clonedTail = head\n  let node = segments.parent\n  while (node !== null) {\n    const clonedNode: SegmentBundle = {\n      tree: node.tree,\n      entry: null,\n      parent: null,\n    }\n    clonedTail.parent = clonedNode\n    clonedTail = clonedNode\n    node = node.parent\n  }\n  return head\n}\n\n// TODO: Consolidate the read* helpers below with the ones in\n// vary-params-decoding — they all perform a version of the same synchronous\n// read of a buffered decode's late-resolving values.\n\n/**\n * Reads a segment's partialness from its `isPartial` promise. (Unlike the\n * values read via `readFulfilledValue` below, the fulfillment value here is\n * void — partialness is encoded as the ABSENCE of a fulfillment.) The server\n * fulfills it only for a fully-static segment and leaves it pending for a\n * partial one (see `SegmentPrefetch['isPartial']`), so partial == not\n * fulfilled. The read is synchronous because the response is fully buffered\n * before it's decoded, so a fulfillment is already visible on the thenable's\n * status — the same trick `readVaryParams` uses for the vary params iterables.\n */\nfunction readFulfilledIsPartial(isPartial: Promise<void>): boolean {\n  const thenable = isPartial as PromiseLike<void> & { status?: string }\n  // Force Flight to unwrap a received-but-not-yet-settled row. A pending row,\n  // or a truncated shell decode whose fulfillment landed past the boundary,\n  // stays non-fulfilled — read as partial, which is correct either way.\n  thenable.then(noop, noop)\n  return thenable.status !== 'fulfilled'\n}\n\n/**\n * Reads a late-resolving value off a fully-buffered decode's thenable status,\n * using the same trick as above. Returns `valueIfUnresolved` for a row that\n * is pending or absent in this decode — e.g. one whose fulfillment landed\n * past a truncated shell decode's boundary. That's what scopes a response's\n * late-resolving signals to the payload being decoded.\n */\nfunction readFulfilledValue<T>(\n  valueFromServer: Promise<T>,\n  valueIfUnresolved: T\n): T {\n  const thenable = valueFromServer as PromiseLike<T> & {\n    status?: string\n    value?: T\n  }\n  // Force Flight to unwrap a received-but-not-yet-settled row.\n  thenable.then(noop, noop)\n  if (thenable.status === 'fulfilled' && thenable.value !== undefined) {\n    return thenable.value\n  }\n  return valueIfUnresolved\n}\n\n/**\n * Reads a stale-at time from the staleTime async iterable of a fully-buffered\n * response — segment bundles and stage decodes, which go through\n * `createNonTaskyPrefetchResponseStream`. Because the bytes are all present,\n * each yielded value is already visible on its chunk's thenable status (the\n * same trick `readVaryParams` uses), so this drains synchronously and takes\n * the last value (the final staleTime, as `resolveStaleAt` does for the\n * async case). A missing iterable, or a truncated shell decode whose value\n * landed past the boundary, reads as absent and falls back to the static\n * stale time.\n *\n * For the one response kind that isn't buffered when read — a dynamic `Full`\n * response (fetchStrategy.Full with Partial Prefetching disabled) — use\n * `resolveStaleAt` instead, since its values aren't materialized synchronously.\n */\nfunction readFulfilledStaleAt(\n  now: number,\n  staleTime: AsyncIterable<number> | undefined\n): number {\n  if (staleTime === undefined) {\n    return now + STATIC_STALETIME_MS\n  }\n  const iterator = staleTime[Symbol.asyncIterator]()\n  let staleTimeSeconds: number | undefined\n  while (true) {\n    const chunk = iterator.next() as PromiseLike<IteratorResult<number>> & {\n      status?: string\n      value?: IteratorResult<number>\n    }\n    chunk.then(noop, noop)\n    if (chunk.status !== 'fulfilled' || chunk.value === undefined) {\n      break\n    }\n    if (chunk.value.done) {\n      break\n    }\n    staleTimeSeconds = chunk.value.value\n  }\n  if (staleTimeSeconds === undefined || isNaN(staleTimeSeconds)) {\n    return now + STATIC_STALETIME_MS\n  }\n  return now + getStaleTimeMs(staleTimeSeconds)\n}\n\nconst noop = () => {}\n\n/**\n * The localized retry loop for an upgradeable fallback shell. Re-issues the\n * exact same segment-bundle request (via `fetchSegmentsOnCacheMissImpl`) up to\n * MAX_FALLBACK_RETRIES times, FALLBACK_RETRY_DELAY_MS apart, until the server\n * returns the concrete (upgraded) version. On success it upserts the upgraded\n * segments (so they aren't re-fetched) and pings the task, so the task's\n * *other* fallback segments get re-attempted. If every attempt is still a\n * fallback (or fails), it gives up.\n *\n * A loop runs at most once per task, ever (the caller gates on\n * `fallbackRetryStatus === Empty`, set to `Pending` before this runs and never\n * reset to `Empty`). The sleep timer is never `clearTimeout`-ed, so the awaited\n * sleep always settles; the loop simply checks `isCanceled` after waking and\n * bails if the task was canceled in the meantime. On success the status becomes\n * `Fulfilled`; on any non-success exit (exhausted retries, fetch error, or\n * cancel) it becomes `Rejected`.\n */\nasync function retryUpgradeableFallbackPrefetch(\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree,\n  segments: SegmentBundle,\n  segmentCount: number,\n  // The strategy the initial fetch wrote its payloads with; the upgraded\n  // result is written through the same payload fork so the same cache slots\n  // (including the shell paths) are upgraded.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): Promise<void> {\n  for (let attempt = 0; attempt < MAX_FALLBACK_RETRIES; attempt++) {\n    await new Promise<void>((resolve) =>\n      setTimeout(resolve, FALLBACK_RETRY_DELAY_MS)\n    )\n    if (task.isCanceled) {\n      break\n    }\n\n    let result\n    try {\n      result = await fetchSegmentsOnCacheMissImpl(route, routeKey, tree)\n    } catch {\n      // A hard failure (connection dropped, or the response couldn't be\n      // decoded). Re-issuing the identical request won't fix it, so give up.\n      break\n    }\n    if (task.isCanceled) {\n      break\n    }\n    if (result === null) {\n      // Got a response that wasn't usable yet (the server hasn't finished\n      // regenerating). Try again, or give up once the budget is exhausted.\n      continue\n    }\n    if (result.serverResponse.isUpgradeableISRFallback) {\n      // Still a fallback shell — the server hasn't finished regenerating yet.\n      continue\n    }\n\n    // Success: the server returned the concrete (upgraded) version. Write it\n    // back through the same payload fork as the initial fetch, so every slot\n    // the initial fetch wrote — including the shell paths, even when the\n    // upgraded response is fully static (shell === full) — is upgraded. The\n    // bundle's entries were already settled by the initial fetch, so every\n    // write is a detached upsert that replaces the fallback. Mark the loop\n    // fulfilled and ping the task; its other fallback segments are now\n    // allowed to revalidate.\n    const { serverResponse, shellResponse, responseSize } = result\n    const now = Date.now()\n    writeSegmentBundleResponseVariants(\n      task.segmentCacheMap,\n      serverResponse,\n      shellResponse,\n      responseSize,\n      segments,\n      segmentCount,\n      now,\n      fetchStrategy\n    )\n    task.fallbackRetryStatus = EntryStatus.Fulfilled\n    pingPrefetchTask(task)\n    return\n  }\n\n  // The loop finished without success (exhausted its retries, broke out on a\n  // fetch error, or the task was canceled). It won't run again for this task.\n  task.fallbackRetryStatus = EntryStatus.Rejected\n}\n\n// TODO: The inlined prefetch flow below is temporary. Eventually, inlining\n// will be the default behavior controlled by a size heuristic rather than a\n// boolean flag. At that point, the per-segment and inlined fetch paths will\n// merge, and these separate functions will be removed.\n//\nexport async function fetchSegmentPrefetchesUsingDynamicRequest(\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n    | FetchStrategy.Full,\n  dynamicRequestTree: FlightRouterState,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): Promise<PrefetchSubtaskResult<null> | null> {\n  const key = task.key\n  const url = new URL(route.canonicalUrl, location.origin)\n  const nextUrl = key.nextUrl\n\n  if (\n    spawnedEntries.size === 1 &&\n    spawnedEntries.has(route.metadata.requestKey)\n  ) {\n    // The only thing pending is the head. Instruct the server to\n    // skip over everything else.\n    // TODO: Lift this logic into the caller. Or perhaps unify the\n    // \"request tree\" and the spawnedEntries into the same type so they are\n    // guaranteed to always been in sync.\n    dynamicRequestTree = MetadataOnlyRequestTree\n  }\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_STATE_TREE_HEADER]:\n      prepareFlightRouterStateForRequest(dynamicRequestTree),\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n  switch (fetchStrategy) {\n    case FetchStrategy.Full: {\n      // We omit the prefetch header from a full prefetch because it's essentially\n      // just a navigation request that happens ahead of time — it should include\n      // all the same data in the response.\n      break\n    }\n    case FetchStrategy.PPRRuntime: {\n      headers[NEXT_ROUTER_PREFETCH_HEADER] = '2'\n      break\n    }\n    case FetchStrategy.RuntimeShell: {\n      headers[NEXT_ROUTER_PREFETCH_HEADER] = '3'\n      break\n    }\n    case FetchStrategy.LoadingBoundary: {\n      headers[NEXT_ROUTER_PREFETCH_HEADER] = '1'\n      break\n    }\n    default: {\n      fetchStrategy satisfies never\n    }\n  }\n\n  try {\n    const response = await fetchPrefetchResponse(url, headers)\n    if (!response || !response.ok || !response.body) {\n      // Server responded with an error, or with a miss. We should still cache\n      // the response, but we can try again after 10 seconds.\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    const renderedSearch = getRenderedSearch(response)\n    if (renderedSearch !== route.renderedSearch) {\n      // The search params that were used to render the target page are\n      // different from the search params in the request URL. This only happens\n      // when there's a dynamic rewrite in between the tree prefetch and the\n      // data prefetch.\n      // TODO: For now, since this is an edge case, we reject the prefetch, but\n      // the proper way to handle this is to evict the stale route tree entry\n      // then fill the cache with the new response.\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // Track when the network connection closes. Only meaningful for Full\n    // (dynamic) prefetches which use incremental streaming. For buffered\n    // paths, this is resolved immediately — see TODO in fetchRouteOnCacheMiss.\n    const closed = createPromiseWithResolvers<void>()\n\n    let fulfilledEntries: Array<FulfilledSegmentCacheEntry> | null = null\n    let prefetchStream: ReadableStream<Uint8Array>\n    let bufferedResponseSize: number | null = null\n    if (fetchStrategy === FetchStrategy.Full) {\n      // Full prefetches are dynamic responses stored in the prefetch cache.\n      // They don't carry vary params or other cache metadata, so there's no\n      // need to buffer them. Use the incremental version to allow data to be\n      // processed as it arrives.\n      prefetchStream = createIncrementalPrefetchResponseStream(\n        response.body,\n        closed.resolve,\n        function onResponseSizeUpdate(totalBytesReceivedSoFar) {\n          // When processing a dynamic response, we don't know how large each\n          // individual segment is, so approximate by assigning each segment\n          // the average of the total response size.\n          if (fulfilledEntries === null) {\n            // Haven't received enough data yet to know which segments\n            // were included.\n            return\n          }\n          const averageSize = totalBytesReceivedSoFar / fulfilledEntries.length\n          for (const entry of fulfilledEntries) {\n            setSizeInCacheMap(entry, averageSize)\n          }\n        }\n      )\n    } else {\n      const { stream, size } = await createNonTaskyPrefetchResponseStream(\n        response.body\n      )\n      closed.resolve()\n      prefetchStream = stream\n      bufferedResponseSize = size\n    }\n\n    const [serverData, cacheData] = await Promise.all([\n      createFromNextReadableStream<NavigationFlightResponse>(\n        prefetchStream,\n        headers,\n        { allowPartialStream: true }\n      ),\n      response.cacheData,\n    ])\n\n    const now = Date.now()\n    const staleAt = await resolveStaleAt(now, serverData.s, response)\n    const buildId =\n      response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? serverData.b\n\n    // Check if a reusable App Shell can be extracted from the main response.\n    let serverDataThatSatisfiesSpawnedEntries: NavigationFlightResponse\n    // The shell and full response have independent stale times. Track the\n    // staleAt that corresponds to whatever payload the spawned entries get\n    // filled with below.\n    let staleAtForSpawnedEntries = staleAt\n    if (cacheData === null) {\n      // No shell can be extracted without cache metadata (only present when\n      // Cached Navigations is enabled). For routes without a distinct App Shell\n      // the extraction below is a no-op anyway (`resolveShellStageData` returns\n      // null), so this just short-circuits that case.\n      serverDataThatSatisfiesSpawnedEntries = serverData\n    } else {\n      const shellStageData = await resolveShellStageData(\n        cacheData,\n        serverData,\n        headers\n      )\n      if (shellStageData === null) {\n        // No App Shell can be extracted. This usually means the entire response\n        // _is_ the App Shell. The other possibility (for now, until the feature\n        // is fully stabilized) is that App Shells are not yet enabled. Either\n        // way, there's nothing extra for us to do: fulfill the pending entries\n        // using the response from the server.\n        serverDataThatSatisfiesSpawnedEntries = serverData\n      } else {\n        // Successfully extracted an App Shell that is a subset of the main\n        // response. Depending on the type of prefetch this is, we need to\n        // decide whether to fulfill the pending entries with the shell or with\n        // the entire response. In either scenario, we'll be inserting _both_\n        // versions of the response into the cache; the extra logic is only\n        // here so that we don't fulfill pending shell entries with something\n        // that's more concrete than what they expect.\n        // TODO: The only reason this matters is because during a navigation,\n        // if a segment is still pending, we render a promise that resolves to\n        // the eventual value of that segment. But that means we cannot\n        // eventually resolve that segment to something more concrete than what\n        // was already requested. Hence the extra logic here. A cleaner way to\n        // model this, though, is whenever we render a promise that resolves to\n        // the result of a pending entry, do one additional cache look-up right\n        // after the promise resolves, to ensure we never get a mismatching\n        // entry. Leaving this for a follow up.\n        // shellStageData is a fully-buffered stage decode, so read staleTime\n        // synchronously off the thenable status.\n        const shellStaleAt = readFulfilledStaleAt(now, shellStageData.s)\n        if (fetchStrategy === FetchStrategy.RuntimeShell) {\n          // This is a Shell prefetch, so the pending entries must be fulfilled\n          // with the shell.\n          serverDataThatSatisfiesSpawnedEntries = shellStageData\n          staleAtForSpawnedEntries = shellStaleAt\n\n          // Separately, we'll also cache the entire response, by upserting it\n          // into the cache.\n          writePrerenderResponseIntoCache(\n            now,\n            FetchStrategy.PPR,\n            serverData.f,\n            buildId,\n            serverData.h,\n            serverData.r ?? null,\n            staleAt,\n            dynamicRequestTree,\n            renderedSearch,\n            cacheData.isResponsePartial,\n            task.segmentCacheMap\n          )\n        } else {\n          // This is _not_ a Shell prefetch, so the pending entries should be\n          // fulfilled with the entire response.\n          serverDataThatSatisfiesSpawnedEntries = serverData\n\n          // Additionally, we might as well upsert the extracted Shell into the\n          // cache, too.\n\n          // `shellStageData` is only provided in cases where the shell is\n          // different from the main response. If they are equivalent, this\n          // branch is skipped. So it follows that any shell data reaches\n          // this path must be partial -- it does not represent the entire\n          // UI of the target page.\n          const isShellStagePartial = true\n          writePrerenderResponseIntoCache(\n            now,\n            FetchStrategy.RuntimeShell,\n            shellStageData.f,\n            buildId,\n            shellStageData.h,\n            shellStageData.r ?? null,\n            shellStaleAt,\n            dynamicRequestTree,\n            renderedSearch,\n            isShellStagePartial,\n            task.segmentCacheMap\n          )\n        }\n      }\n    }\n\n    // Read head vary params synchronously (unioning in the response-level root\n    // params). Individual segments carry their own iterables in\n    // CacheNodeSeedData; the root iterable is threaded down so each segment\n    // unions it too.\n    const rootVaryParamsIterable =\n      serverDataThatSatisfiesSpawnedEntries.r ?? null\n    const headVaryParams = readVaryParams(\n      serverDataThatSatisfiesSpawnedEntries.h,\n      rootVaryParamsIterable\n    )\n\n    // PPRRuntime and RuntimeShell prefetches are partial when the server\n    // marks the response as '~' (Partial). RuntimeShell additionally omits\n    // every dynamic suspense boundary below the App Shell, so its segments\n    // are always partial regardless of what the server marker says.\n    // Full/LoadingBoundary prefetches are always complete.\n    const isResponsePartial =\n      fetchStrategy === FetchStrategy.RuntimeShell ||\n      (fetchStrategy === FetchStrategy.PPRRuntime &&\n        (cacheData?.isResponsePartial ?? false))\n\n    const flightDatas = normalizeFlightData(\n      serverDataThatSatisfiesSpawnedEntries.f\n    )\n    if (typeof flightDatas === 'string') {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n    const navigationSeed = convertServerPatchToFullTree(\n      now,\n      dynamicRequestTree,\n      flightDatas,\n      renderedSearch,\n      // Not needed for prefetch responses; pass unknown to use the default.\n      UnknownDynamicStaleTime\n    )\n\n    if (\n      navigationSeed.treeDivergedFromBase &&\n      // A head-only request uses the MetadataOnlyRequestTree stub rather than\n      // a tree derived from the route entry, so divergence from it carries\n      // no signal.\n      // TODO: This special case goes away once convertServerPatchToFullTree\n      // diffs against the base RouteTree (route.tree) instead of the\n      // request tree.\n      dynamicRequestTree !== MetadataOnlyRequestTree\n    ) {\n      // The server rendered a different route tree than the one we requested:\n      // the URL has a rewrite that behaves dynamically, so the params baked\n      // into the request are wrong and the server can never fulfill it. Mark\n      // the route entry — which doubles as the stored prediction pattern, so\n      // this also disables a bad prediction (see matchKnownRoute) that would\n      // otherwise be re-derived on every retry — and invalidate entries that\n      // were derived from it. This mirrors dispatchRetryDueToTreeMismatch on\n      // the navigation path. It can't loop: the refetched route entry is\n      // built from the server's response, so it only mismatches again if the\n      // rewrite's behavior changes again.\n      markRouteEntryAsDynamicRewrite(route)\n      invalidateRouteCacheEntries(key.nextUrl, task.treeAtTimeOfPrefetch)\n      // Reject with an immediate expiration instead of the usual backoff: the\n      // invalidation above triggers a re-prefetch, which per the above does\n      // not loop.\n      // TODO: Consider also bounding retries with a counter on the task\n      // object, so a prefetch that repeatedly fails to settle backs off\n      // regardless of the reason.\n      rejectSegmentEntriesIfStillPending(spawnedEntries, -1)\n      return null\n    }\n\n    // Aside from writing the data into the cache, this function also returns\n    // the entries that were fulfilled, so we can streamingly update their sizes\n    // in the LRU as more data comes in.\n    fulfilledEntries = writeDynamicRenderResponseIntoCache(\n      now,\n      fetchStrategy,\n      flightDatas,\n      buildId,\n      isResponsePartial,\n      headVaryParams,\n      rootVaryParamsIterable,\n      staleAtForSpawnedEntries,\n      navigationSeed,\n      spawnedEntries,\n      task.segmentCacheMap\n    )\n\n    // For buffered responses, update LRU sizes now that we know which\n    // entries were fulfilled.\n    if (\n      bufferedResponseSize !== null &&\n      fulfilledEntries !== null &&\n      fulfilledEntries.length > 0\n    ) {\n      const averageSize = bufferedResponseSize / fulfilledEntries.length\n      for (const entry of fulfilledEntries) {\n        setSizeInCacheMap(entry, averageSize)\n      }\n    }\n\n    // Return a promise that resolves when the network connection closes, so\n    // the scheduler can track the number of concurrent network connections.\n    return { value: null, closed: closed.promise }\n  } catch (error) {\n    if (process.env.__NEXT_USE_OFFLINE) {\n      const { checkOfflineError } =\n        require('../offline') as typeof import('../offline')\n      if (checkOfflineError(error)) {\n        // Unlike navigations and server actions, prefetches don't await\n        // waitForConnection — they just reject the cache entry with an\n        // immediate expiration so it gets retried once the scheduler is\n        // re-pinged after connectivity is restored.\n        rejectSegmentEntriesIfStillPending(spawnedEntries, -1)\n        return null\n      }\n    }\n    rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\nfunction writeDynamicTreeResponseIntoCache(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  response: RSCResponse<NavigationFlightResponse>,\n  serverData: NavigationFlightResponse,\n  entry: PendingRouteCacheEntry,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  routeIsPPREnabled: boolean,\n  headVaryParams: VaryParams | null,\n  rootVaryParamsIterable: VaryParamsIterable | null,\n  originalPathname: string,\n  originalSearch: NormalizedSearch,\n  nextUrl: string | null,\n  // The spawning task's `PrefetchTask.segmentCacheMap`.\n  map: CacheMap<SegmentCacheEntry>\n): void {\n  const renderedSearch = getRenderedSearch(response)\n\n  const normalizedFlightDataResult = normalizeFlightData(serverData.f)\n  if (\n    // A string result means navigating to this route will result in an\n    // MPA navigation.\n    typeof normalizedFlightDataResult === 'string' ||\n    normalizedFlightDataResult.length !== 1\n  ) {\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n  const flightData = normalizedFlightDataResult[0]\n  if (!flightData.isRootRender) {\n    // Unexpected response format.\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n\n  const flightRouterState = flightData.tree\n  // If the response was postponed, segments may contain dynamic holes.\n  // The head has its own partiality flag (flightDataEntry.isHeadPartial)\n  // which is handled separately in writeDynamicRenderResponseIntoCache.\n  const isResponsePartial =\n    response.headers.get(NEXT_DID_POSTPONE_HEADER) === '1'\n\n  // Convert the server-sent data into the RouteTree format used by the\n  // client cache.\n  //\n  // During this traversal, we accumulate additional data into this\n  // \"accumulator\" object.\n  const acc: RouteTreeAccumulator = {\n    metadataVaryPath: null,\n    treeDivergedFromBase: false,\n  }\n  const routeTree = convertRootFlightRouterStateToRouteTree(\n    flightRouterState,\n    renderedSearch,\n    acc\n  )\n  const metadataVaryPath = acc.metadataVaryPath\n  if (metadataVaryPath === null) {\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n\n  discoverKnownRoute(\n    now,\n    originalPathname,\n    originalSearch,\n    nextUrl,\n    entry,\n    routeTree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    routeIsPPREnabled,\n    false // hasDynamicRewrite\n  )\n\n  // If the server sent segment data as part of the response, we should write\n  // it into the cache to prevent a second, redundant prefetch request.\n  // TODO: This is a leftover branch from before Client Segment Cache was\n  // enabled everywhere. Tree prefetches should never include segment data.  We\n  // can delete it. Leaving for a subsequent PR.\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    flightRouterState,\n    normalizedFlightDataResult,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n  const buildId =\n    response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? serverData.b\n  writeDynamicRenderResponseIntoCache(\n    now,\n    fetchStrategy,\n    normalizedFlightDataResult,\n    buildId,\n    isResponsePartial,\n    headVaryParams,\n    rootVaryParamsIterable,\n    getStaleAtFromHeader(now, response),\n    navigationSeed,\n    null,\n    map\n  )\n}\n\nfunction rejectSegmentEntriesIfStillPending(\n  entries: Map<SegmentRequestKey, SegmentCacheEntry>,\n  staleAt: number\n): Array<FulfilledSegmentCacheEntry> {\n  const fulfilledEntries = []\n  for (const entry of entries.values()) {\n    if (entry.status === EntryStatus.Pending) {\n      rejectSegmentCacheEntry(entry, staleAt)\n    } else if (entry.status === EntryStatus.Fulfilled) {\n      fulfilledEntries.push(entry)\n    }\n  }\n  return fulfilledEntries\n}\n\nexport function writeDynamicRenderResponseIntoCache(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n    | FetchStrategy.Full,\n  flightDatas: NormalizedFlightData[],\n  buildId: string | undefined,\n  isResponsePartial: boolean,\n  headVaryParams: VaryParams | null,\n  rootVaryParamsIterable: VaryParamsIterable | null,\n  staleAt: number,\n  navigationSeed: NavigationSeed,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry> | null,\n  // The map the work that spawned this response's request is bound to: the\n  // spawning task's `PrefetchTask.segmentCacheMap` for prefetches, the\n  // navigation's map for navigation-side writes. Binding the write to the\n  // requesting work means a response that lands after a testing-lock scope\n  // boundary still writes into the map its entries live in.\n  map: CacheMap<SegmentCacheEntry>\n): Array<FulfilledSegmentCacheEntry> | null {\n  if (buildId && buildId !== getNavigationBuildId()) {\n    // The server build does not match the client. Treat as a 404. During\n    // an actual navigation, the router will trigger an MPA navigation.\n    if (spawnedEntries !== null) {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n    }\n    return null\n  }\n\n  const routeTree = navigationSeed.routeTree\n  const metadataTree =\n    navigationSeed.metadataVaryPath !== null\n      ? createMetadataRouteTree(navigationSeed.metadataVaryPath)\n      : null\n\n  for (const flightDataEntry of flightDatas) {\n    const seedData = flightDataEntry.seedData\n    if (seedData !== null) {\n      // The data sent by the server represents only a subtree of the app. We\n      // need to find the part of the task tree that matches the response.\n      //\n      // segmentPath represents the parent path of subtree. It's a repeating\n      // pattern of parallel route key and segment:\n      //\n      //   [string, Segment, string, Segment, string, Segment, ...]\n      const segmentPath = flightDataEntry.segmentPath\n      let tree = routeTree\n      for (let i = 0; i < segmentPath.length; i += 2) {\n        const parallelRouteKey: string = segmentPath[i]\n        const childTree = tree?.slots?.get(parallelRouteKey)\n        if (childTree !== undefined) {\n          tree = childTree\n        } else {\n          if (spawnedEntries !== null) {\n            rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n          }\n          return null\n        }\n      }\n\n      writeSeedDataIntoCache(\n        now,\n        // A response write is bound to the map its entries live in (the\n        // spawning task's `PrefetchTask.segmentCacheMap`).\n        map,\n        fetchStrategy,\n        tree,\n        staleAt,\n        seedData,\n        isResponsePartial,\n        rootVaryParamsIterable,\n        spawnedEntries\n      )\n    }\n\n    const head = flightDataEntry.head\n    if (head !== null && metadataTree !== null) {\n      // When Cache Components is enabled, the server's `isHeadPartial` flag\n      // (isPossiblyPartialHead in app-render.tsx) is unreliable: it's computed\n      // before the head is serialized, so it's conservatively `true` for every\n      // statically-generated PPR page — even pages whose head is actually\n      // complete — and it's `false` for runtime/dynamic responses whose head is\n      // actually partial (e.g. a route with an async `generateMetadata`). So we\n      // ignore it and derive the head's partiality from whether the response\n      // itself was partial, exactly as we do for segments (see\n      // `writeSeedDataIntoCache`). A non-partial response carries a complete\n      // head; a partial (postponed) one does not.\n      //\n      // Without Cache Components, the server sends the correct isHeadPartial.\n      const isHeadPartial = process.env.__NEXT_CACHE_COMPONENTS\n        ? isResponsePartial\n        : flightDataEntry.isHeadPartial\n\n      fulfillEntrySpawnedByRuntimePrefetch(\n        now,\n        // A response write is bound to the map its entries live in (the\n        // spawning task's `PrefetchTask.segmentCacheMap`).\n        map,\n        fetchStrategy,\n        head,\n        isHeadPartial,\n        staleAt,\n        // For head entries, use the head-specific vary params passed as\n        // parameter.\n        headVaryParams,\n        metadataTree,\n        spawnedEntries\n      )\n    }\n  }\n  // Any entry that's still pending was intentionally not rendered by the\n  // server, because it was inside the loading boundary. Mark them as rejected\n  // so we know not to fetch them again.\n  // TODO: If PPR is enabled on some routes but not others, then it's possible\n  // that a different page is able to do a per-segment prefetch of one of the\n  // segments we're marking as rejected here. We should mark on the segment\n  // somehow that the reason for the rejection is because of a non-PPR prefetch.\n  // That way a per-segment prefetch knows to disregard the rejection.\n  if (spawnedEntries !== null) {\n    const fulfilledEntries = rejectSegmentEntriesIfStillPending(\n      spawnedEntries,\n      now + 10 * 1000\n    )\n    return fulfilledEntries\n  }\n  return null\n}\n\nfunction writeSeedDataIntoCache(\n  now: number,\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n    | FetchStrategy.Full,\n  tree: RouteTree,\n  staleAt: number,\n  seedData: CacheNodeSeedData,\n  isResponsePartial: boolean,\n  rootVaryParamsIterable: VaryParamsIterable | null,\n  entriesOwnedByCurrentTask: Map<\n    SegmentRequestKey,\n    PendingSegmentCacheEntry\n  > | null\n) {\n  // This function is used to write the result of a runtime server request\n  // (CacheNodeSeedData) into the prefetch cache.\n  const rsc = seedData[0]\n  const isPartial = rsc === null || isResponsePartial\n  // Each segment carries its own vary params iterable in the seed data, which\n  // drains to the set of params the segment accessed during render. A null\n  // iterable means tracking was not enabled (not a prerender). readVaryParams\n  // unions in the response-level root params.\n  const varyParams = readVaryParams(seedData[4], rootVaryParamsIterable)\n  fulfillEntrySpawnedByRuntimePrefetch(\n    now,\n    // A response write is bound to the map its entries live in (the spawning\n    // task's `PrefetchTask.segmentCacheMap`).\n    map,\n    fetchStrategy,\n    rsc,\n    isPartial,\n    staleAt,\n    varyParams,\n    tree,\n    entriesOwnedByCurrentTask\n  )\n\n  // Recursively write the child data into the cache.\n  const slots = tree.slots\n  if (slots !== null) {\n    const seedDataChildren = seedData[1]\n    for (const [parallelRouteKey, childTree] of slots) {\n      const childSeedData: CacheNodeSeedData | null | void =\n        seedDataChildren[parallelRouteKey]\n      if (childSeedData !== null && childSeedData !== undefined) {\n        writeSeedDataIntoCache(\n          now,\n          map,\n          fetchStrategy,\n          childTree,\n          staleAt,\n          childSeedData,\n          isResponsePartial,\n          rootVaryParamsIterable,\n          entriesOwnedByCurrentTask\n        )\n      }\n    }\n  }\n}\n\nfunction fulfillEntrySpawnedByRuntimePrefetch(\n  now: number,\n  map: CacheMap<SegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n    | FetchStrategy.Full,\n  rsc: React.ReactNode,\n  isPartial: boolean,\n  staleAt: number,\n  segmentVaryParams: Set<string> | null,\n  tree: RouteTree,\n  entriesOwnedByCurrentTask: Map<\n    SegmentRequestKey,\n    PendingSegmentCacheEntry\n  > | null\n) {\n  // Decide whether to re-key the entry under a more generic vary path based on\n  // which params the segment actually depends on.\n  //\n  // Skip re-keying for Full prefetches: as of today, `varyParams` tracking only\n  // works within the static stage portion of a response. A Full prefetch\n  // response covers all stages, and we can't track params during the dynamic\n  // stage without dead-locking the Flight stream, so the server-reported set is\n  // incomplete and can't be trusted for the full response. Re-keying with an\n  // untrustworthy set could replace concrete params with Fallback and let\n  // unrelated URLs read each other's content from the cache.\n  //\n  // For RuntimeShell prefetches, always re-key to the precomputed shell vary\n  // path. A shell entry is spawned at a concrete param path but is reusable\n  // across all of them; tree.shellVaryPath (root-param values kept, every other\n  // param replaced with Fallback) is exactly the path that shell reads look it\n  // up under.\n  let fulfilledVaryPath: SegmentVaryPath | null = null\n  if (process.env.__NEXT_VARY_PARAMS) {\n    if (fetchStrategy === FetchStrategy.RuntimeShell) {\n      fulfilledVaryPath = tree.shellVaryPath\n    } else if (\n      fetchStrategy !== FetchStrategy.Full &&\n      segmentVaryParams !== null\n    ) {\n      fulfilledVaryPath = getFulfilledSegmentVaryPath(\n        tree.varyPath,\n        segmentVaryParams\n      )\n    }\n  }\n\n  // We should only write into cache entries that are owned by us. Or create\n  // a new one and write into that. We must never write over an entry that was\n  // created by a different task, because that causes data races.\n  const ownedEntry =\n    entriesOwnedByCurrentTask !== null\n      ? entriesOwnedByCurrentTask.get(tree.requestKey)\n      : undefined\n  if (ownedEntry !== undefined) {\n    const fulfilledEntry = fulfillSegmentCacheEntry(\n      ownedEntry,\n      rsc,\n      staleAt,\n      isPartial,\n      // Dynamic-request (Full/Runtime) responses are not ISR fallbacks.\n      false,\n      fetchStrategy\n    )\n    // Re-key the entry at its canonical path. When `varyParams` produced a\n    // generalized path above, use that; otherwise fall back to the request's\n    // own keying (this is load-bearing for entries spawned as revalidations:\n    // without the re-key they'd stay in their Revalidation slot forever,\n    // invisible to canonical reads, and the partial entry that prompted the\n    // revalidation would keep serving navigations). Full responses are\n    // excluded, matching the varyParams re-key: they're spawned as canonical\n    // entries at their final path, and their vary tracking can't be trusted\n    // for re-keying (see the fulfilledVaryPath derivation above).\n    const canonicalVaryPath =\n      fulfilledVaryPath !== null\n        ? fulfilledVaryPath\n        : fetchStrategy !== FetchStrategy.Full\n          ? getSegmentVaryPathForRequest(fetchStrategy, tree)\n          : null\n    if (canonicalVaryPath !== null) {\n      const isRevalidation = false\n      setInCacheMap(map, canonicalVaryPath, fulfilledEntry, isRevalidation)\n      // The re-key moved the entry to a more generic path (and, for a spawned\n      // revalidation, vacated its Revalidation slot). A stale settled entry\n      // at a more specific path — e.g. the partial entry that prompted the\n      // revalidation — would shadow every read at the concrete lookup path,\n      // causing the scheduler to keep re-reading the stale entry and respawn\n      // the revalidation forever. Evict it so the fulfilled entry is\n      // reachable. See evictShadowingSegmentEntries.\n      evictShadowingSegmentEntries(now, map, tree.varyPath, fulfilledEntry)\n    }\n  } else {\n    // There's no matching entry. Attempt to create a new one.\n    let possiblyNewEntry: SegmentCacheEntry | null = getFromCacheMap(\n      now,\n      getCurrentSegmentCacheVersion(),\n      map,\n      tree.varyPath,\n      false,\n      false\n    )\n    if (possiblyNewEntry === null) {\n      possiblyNewEntry = insertEmptySegmentCacheEntry(\n        now,\n        map,\n        fetchStrategy,\n        tree\n      )\n    }\n    if (possiblyNewEntry.status === EntryStatus.Empty) {\n      // Confirmed this is a new entry. We can fulfill it.\n      const newEntry = possiblyNewEntry\n      const fulfilledEntry = fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(newEntry, fetchStrategy),\n        rsc,\n        staleAt,\n        isPartial,\n        // Dynamic-request (Full/Runtime) responses are not ISR fallbacks.\n        false,\n        fetchStrategy\n      )\n      if (fulfilledVaryPath !== null) {\n        const isRevalidation = false\n        setInCacheMap(map, fulfilledVaryPath, fulfilledEntry, isRevalidation)\n        // Same as the owned-entry re-key above. Usually the entry really is\n        // new — the read a moment ago returned nothing at the concrete lookup\n        // path, so nothing can shadow it and this is a no-op — but this\n        // branch also claims a pre-existing Empty entry, and re-keying that\n        // away can expose a stale settled entry at an intermediate path.\n        evictShadowingSegmentEntries(now, map, tree.varyPath, fulfilledEntry)\n      }\n    } else {\n      // There was already an entry in the cache. But we may be able to\n      // replace it with the new one from the server.\n      const newEntry = fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(\n          createDetachedSegmentCacheEntry(now),\n          fetchStrategy\n        ),\n        rsc,\n        staleAt,\n        isPartial,\n        // Dynamic-request (Full/Runtime) responses are not ISR fallbacks.\n        false,\n        fetchStrategy\n      )\n      const varyPath =\n        fulfilledVaryPath !== null\n          ? fulfilledVaryPath\n          : getSegmentVaryPathForRequest(fetchStrategy, tree)\n      // Pass the concrete lookup path so that if the entry was re-keyed to\n      // a more generic path, any stale settled entry at a more specific path\n      // that would shadow it is evicted (the upsert handles this; the other\n      // branches above call evictShadowingSegmentEntries themselves).\n      upsertSegmentEntry(now, map, varyPath, newEntry, tree.varyPath)\n    }\n  }\n}\n\nasync function fetchPrefetchResponse<T>(\n  url: URL,\n  headers: RequestHeaders\n): Promise<RSCResponse<T> | null> {\n  const fetchPriority = 'low'\n  // When issuing a prefetch request, don't immediately decode the response; we\n  // use the lower level `createFromResponse` API instead because we need to do\n  // some extra processing of the response stream. See\n  // `createNonTaskyPrefetchResponseStream` for more details.\n  const shouldImmediatelyDecode = false\n  const response = await createFetch<T>(\n    url,\n    headers,\n    fetchPriority,\n    shouldImmediatelyDecode\n  )\n  if (!response.ok) {\n    return null\n  }\n\n  // Check the content type\n  if (isOutputExportMode) {\n    // In output: \"export\" mode, we relaxed about the content type, since it's\n    // not Next.js that's serving the response. If the status is OK, assume the\n    // response is valid. If it's not a valid response, the Flight client won't\n    // be able to decode it, and we'll treat it as a miss.\n  } else {\n    const contentType = response.headers.get('content-type')\n    const isFlightResponse =\n      contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n    if (!isFlightResponse) {\n      return null\n    }\n  }\n  return response\n}\n\nexport async function createNonTaskyPrefetchResponseStream(\n  body: ReadableStream<Uint8Array>,\n  byteLimit?: number\n): Promise<{\n  stream: ReadableStream<Uint8Array>\n  size: number\n  // The materialized response bytes backing `stream`. Exposed so callers that\n  // need to decode the same response a second time (e.g. the static App Shell\n  // extraction, which re-decodes a truncated prefix of the buffer) don't have\n  // to buffer the body twice. Most callers only use `stream` and `size`.\n  buffer: Uint8Array\n}> {\n  // Buffer the entire response before passing it to the Flight client. This\n  // ensures that when Flight processes the stream, all model data is available\n  // synchronously. This is important for readVaryParams, which synchronously\n  // checks the thenable status — if data arrived in multiple network chunks,\n  // the thenables might not yet be fulfilled.\n  //\n  // TODO: There are too many intermediate stream transformations in the\n  // prefetch response pipeline (e.g. stripIsPartialByte, this function).\n  // These could all be consolidated into a single transformation. Refactor\n  // once the cached navigations experiment lands.\n  //\n  // Read the response from the network, optionally truncating at byteLimit.\n  const reader = body.getReader()\n  const chunks: Uint8Array[] = []\n  let size = 0\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) break\n    if (byteLimit !== undefined && size + value.byteLength >= byteLimit) {\n      const remaining = byteLimit - size\n      if (remaining > 0) {\n        chunks.push(\n          value.byteLength > remaining ? value.subarray(0, remaining) : value\n        )\n        size += remaining\n      }\n      reader.cancel()\n      break\n    }\n    chunks.push(value)\n    size += value.byteLength\n  }\n  // Concatenate into a single chunk so that Flight's processBinaryChunk\n  // processes all rows synchronously in one call. Multiple chunks would not\n  // be sufficient: even though reader.read() resolves as a microtask for\n  // already-enqueued data, the `await` continuation from\n  // createFromReadableStream can interleave between chunks. If the root\n  // model row isn't the first row (e.g. outlined values come first), the\n  // PromiseResolveThenableJob from `await` can cause the root to initialize\n  // eagerly, scheduling the continuation before remaining chunks (including\n  // promise value rows) are processed. A single chunk avoids this.\n  let buffer: Uint8Array\n  if (chunks.length === 1) {\n    buffer = chunks[0]\n  } else if (chunks.length > 1) {\n    buffer = new Uint8Array(size)\n    let offset = 0\n    for (const chunk of chunks) {\n      buffer.set(chunk, offset)\n      offset += chunk.byteLength\n    }\n  } else {\n    buffer = new Uint8Array(0)\n  }\n  const stream = new ReadableStream<Uint8Array>({\n    start(controller) {\n      controller.enqueue(buffer)\n      controller.close()\n    },\n  })\n  return { stream, size, buffer }\n}\n\n/**\n * Creates a streaming (non-buffered) prefetch response stream for dynamic/Full\n * prefetches. These are essentially dynamic responses that get stored in the\n * prefetch cache — they don't carry vary params or other cache metadata that\n * requires synchronous thenable resolution, so there's no need to buffer them.\n * They should continue to stream so consumers can process data as it arrives.\n */\nfunction createIncrementalPrefetchResponseStream(\n  originalFlightStream: ReadableStream<Uint8Array>,\n  onStreamClose: () => void,\n  onResponseSizeUpdate: (size: number) => void\n): ReadableStream<Uint8Array> {\n  // While processing the original stream, we incrementally update the size\n  // of the cache entry in the LRU.\n  let totalByteLength = 0\n  const reader = originalFlightStream.getReader()\n  return new ReadableStream({\n    async pull(controller) {\n      while (true) {\n        const { done, value } = await reader.read()\n        if (!done) {\n          // Pass to the target stream and keep consuming the Flight response\n          // from the server.\n          controller.enqueue(value)\n\n          // Incrementally update the size of the cache entry in the LRU.\n          totalByteLength += value.byteLength\n          onResponseSizeUpdate(totalByteLength)\n          continue\n        }\n        controller.close()\n        onStreamClose()\n        return\n      }\n    },\n  })\n}\n\nfunction addSegmentPathToUrlInOutputExportMode(\n  url: URL,\n  segmentPath: SegmentRequestKey\n): URL {\n  if (isOutputExportMode) {\n    // In output: \"export\" mode, we cannot use a header to encode the segment\n    // path. Instead, we append it to the end of the pathname.\n    const staticUrl = new URL(url)\n    const routeDir = staticUrl.pathname.endsWith('/')\n      ? staticUrl.pathname.slice(0, -1)\n      : staticUrl.pathname\n    const staticExportFilename =\n      convertSegmentPathToStaticExportFilename(segmentPath)\n    staticUrl.pathname = `${routeDir}/${staticExportFilename}`\n    return staticUrl\n  }\n  return url\n}\n\n/**\n * Checks whether the new fetch strategy is likely to provide more content than the old one.\n *\n * Generally, when an app uses dynamic data, a \"more specific\" fetch strategy is expected to provide more content:\n * - `LoadingBoundary` only provides static layouts\n * - `StaticShell` provides the App Shell variant extracted from a static response —\n *   param-dependent content reduced to pending fallbacks, and never any content that\n *   depends on session data (cookies, headers)\n * - `RuntimeShell` provides the App Shell rendered by a runtime request, which can\n *   additionally include shell content that depends on session data\n * - `PPR` can provide shells for each segment (even for segments that use dynamic data),\n *   including prerendered param-dependent content at concrete paths\n * - `PPRRuntime` can additionally include content that uses searchParams, params, or cookies\n * - `Full` includes all the content, even if it uses dynamic data\n *\n * However, it's possible that a more specific fetch strategy *won't* give us more content if:\n * - a segment is fully static\n *   (then, `PPR`/`PPRRuntime`/`Full` will all yield equivalent results)\n * - providing searchParams/params/cookies doesn't reveal any more content, e.g. because of an `await connection()`\n *   (then, `PPR` and `PPRRuntime` will yield equivalent results, only `Full` will give us more)\n * Because of this, when comparing two segments, we should also check if the existing segment is partial.\n * If it's not partial, then there's no need to prefetch it again, even using a \"more specific\" strategy.\n * There's currently no way to know if `PPRRuntime` will yield more data that `PPR`, so we have to assume it will.\n *\n * Also note that, in practice, we don't expect to be comparing `LoadingBoundary` to `PPR`/`PPRRuntime`,\n * because a non-PPR-enabled route wouldn't ever use the latter strategies. It might however use `Full`.\n */\nexport function canNewFetchStrategyProvideMoreContent(\n  currentStrategy: FetchStrategy,\n  newStrategy: FetchStrategy\n): boolean {\n  return currentStrategy < newStrategy\n}\n\nfunction getStaleAtFromHeader(\n  now: number,\n  response: RSCResponse<unknown>\n): number {\n  const staleTimeSeconds = parseInt(\n    response.headers.get(NEXT_ROUTER_STALE_TIME_HEADER) ?? '',\n    10\n  )\n\n  const staleTimeMs = !isNaN(staleTimeSeconds)\n    ? getStaleTimeMs(staleTimeSeconds)\n    : STATIC_STALETIME_MS\n\n  return now + staleTimeMs\n}\n\n/**\n * Reads a stale-at time by `await`ing the staleTime async iterable (last\n * yielded value wins) and, if a `response` is given and the iterable yields\n * nothing, falling back to the `Next-Router-Stale-Time` header.\n *\n * The async form is required for the two things `readFulfilledStaleAt` can't\n * do: the header fallback, and reading a dynamic `Full` response\n * (fetchStrategy.Full with Partial Prefetching disabled) — the one response\n * kind that isn't buffered before it's read, so its iterable values must be\n * awaited rather than drained synchronously off their thenable status.\n *\n * Buffered responses (static PPR, runtime prefetch, stage decodes) don't need\n * the async form: segment bundles and the shell-stage decode already read\n * staleTime synchronously via `readFulfilledStaleAt`, and the remaining\n * buffered callers here could be moved to it too.\n */\nexport async function resolveStaleAt(\n  now: number,\n  staleTimeIterable: AsyncIterable<number> | undefined,\n  response?: RSCResponse<unknown>\n): Promise<number> {\n  if (staleTimeIterable !== undefined) {\n    // Iterate the async iterable and take the last yielded value. The server\n    // yields updated staleTime values during the render; the last one is the\n    // final staleTime.\n    let staleTimeSeconds: number | undefined\n    for await (const value of staleTimeIterable) {\n      staleTimeSeconds = value\n    }\n\n    if (staleTimeSeconds !== undefined) {\n      const staleTimeMs = isNaN(staleTimeSeconds)\n        ? STATIC_STALETIME_MS\n        : getStaleTimeMs(staleTimeSeconds)\n\n      return now + staleTimeMs\n    }\n  }\n\n  if (response !== undefined) {\n    return getStaleAtFromHeader(now, response)\n  }\n\n  return now + STATIC_STALETIME_MS\n}\n\n/**\n * Writes a prerender response into the segment cache at the vary path\n * determined by `fetchStrategy`. Default segments are skipped (by\n * `writeSeedDataIntoCache`) to avoid caching fallback content that would\n * block refreshes from overwriting with dynamic data.\n */\nexport function writePrerenderResponseIntoCache(\n  now: number,\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.RuntimeShell,\n  flightData: FlightData,\n  buildId: string | undefined,\n  headVaryParamsIterable: VaryParamsIterable | null,\n  rootVaryParamsIterable: VaryParamsIterable | null,\n  staleAt: number,\n  baseTree: FlightRouterState,\n  renderedSearch: string,\n  isResponsePartial: boolean,\n  // The map the work that spawned this response's request is bound to. See\n  // writeDynamicRenderResponseIntoCache.\n  map: CacheMap<SegmentCacheEntry>\n): void {\n  // Root params are emitted once at the top level; readVaryParams unions them\n  // into the head, and they're threaded down to each segment below.\n  const headVaryParams = readVaryParams(\n    headVaryParamsIterable,\n    rootVaryParamsIterable\n  )\n\n  const flightDatas = normalizeFlightData(flightData)\n  if (typeof flightDatas === 'string') {\n    return\n  }\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    baseTree,\n    flightDatas,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n  writeDynamicRenderResponseIntoCache(\n    now,\n    fetchStrategy,\n    flightDatas,\n    buildId,\n    isResponsePartial,\n    headVaryParams,\n    rootVaryParamsIterable,\n    staleAt,\n    navigationSeed,\n    null, // spawnedEntries — no pre-created entries; will create or upsert\n    map\n  )\n}\n\n/**\n * Decodes an embedded runtime prefetch Flight stream, normalizes the flight\n * data, and derives a `NavigationSeed` from the base tree.\n *\n * Returns `null` if the response triggers an MPA navigation.\n */\nexport async function processRuntimePrefetchStream(\n  now: number,\n  runtimePrefetchStream: ReadableStream<Uint8Array>,\n  baseTree: FlightRouterState,\n  renderedSearch: string\n): Promise<{\n  flightDatas: NormalizedFlightData[]\n  navigationSeed: NavigationSeed\n  buildId: string | undefined\n  isResponsePartial: boolean\n  headVaryParams: VaryParams | null\n  rootVaryParamsIterable: VaryParamsIterable | null\n  staleAt: number\n} | null> {\n  const { stream, isPartial } = await stripIsPartialByte(runtimePrefetchStream)\n\n  const serverData =\n    await createFromNextReadableStream<NavigationFlightResponse>(\n      stream,\n      undefined,\n      { allowPartialStream: true }\n    )\n\n  // Root params are emitted once at the top level; readVaryParams unions them\n  // into the head, and we return the iterable so the caller can union it into\n  // each segment too.\n  const rootVaryParamsIterable = serverData.r ?? null\n  const headVaryParams = readVaryParams(serverData.h, rootVaryParamsIterable)\n\n  const staleAt = await resolveStaleAt(now, serverData.s)\n\n  const flightDatas = normalizeFlightData(serverData.f)\n  if (typeof flightDatas === 'string') {\n    return null\n  }\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    baseTree,\n    flightDatas,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n\n  return {\n    flightDatas,\n    navigationSeed,\n    buildId: serverData.b,\n    isResponsePartial: isPartial,\n    headVaryParams,\n    rootVaryParamsIterable,\n    staleAt,\n  }\n}\n\n/**\n * Strips the leading isPartial byte from an RSC response stream.\n *\n * The server prepends a single byte: '~' (0x7e) for partial, '#' (0x23) for\n * complete. These bytes cannot appear as the first byte of a valid RSC Flight\n * response (Flight rows start with a hex digit or ':').\n *\n * If the first byte is not a recognized marker, the stream is returned intact\n * and `isPartial` is determined by the cachedNavigations experimental flag.\n */\nexport async function stripIsPartialByte(\n  stream: ReadableStream<Uint8Array>\n): Promise<{ stream: ReadableStream<Uint8Array>; isPartial: boolean }> {\n  // When there is no recognized marker byte, the fallback depends on whether\n  // Cached Navigations is enabled. When enabled, dynamic navigation responses\n  // don't have a marker but may contain dynamic holes, so they are treated as\n  // partial. When disabled, unmarked responses are treated as non-partial.\n  const defaultIsPartial = !!process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS\n\n  const reader = stream.getReader()\n  const { done, value } = await reader.read()\n\n  if (done || !value || value.byteLength === 0) {\n    return {\n      stream: new ReadableStream({ start: (c) => c.close() }),\n      isPartial: defaultIsPartial,\n    }\n  }\n\n  const firstByte = value[0]\n  const hasMarker = firstByte === 0x23 || firstByte === 0x7e\n  const isPartial = hasMarker ? firstByte === 0x7e : defaultIsPartial\n\n  const remainder = hasMarker\n    ? value.byteLength > 1\n      ? value.subarray(1)\n      : null\n    : value\n\n  return {\n    isPartial,\n    stream: new ReadableStream<Uint8Array>({\n      start(controller) {\n        if (remainder) {\n          controller.enqueue(remainder)\n        }\n      },\n      async pull(controller) {\n        const result = await reader.read()\n        if (result.done) {\n          controller.close()\n        } else {\n          controller.enqueue(result.value)\n        }\n      },\n    }),\n  }\n}\n","/**\n * Vary Params Decoding\n *\n * This module is shared between server and client.\n */\n\nexport type VaryParams = Set<string>\n\n/**\n * Vary params are serialized into the Flight stream as an\n * `AsyncIterable<string>` that yields each accessed param name exactly once\n * (the server dedupes before emitting). Because each access is flushed into the\n * stream as it happens, there's no step at the end of the render that has to\n * run for the client to read anything. If a prerender is aborted by sync I/O,\n * the params yielded before the abort are already in the stream, and they're\n * exactly the params the partial response actually depends on.\n *\n * Root params are NOT included in a segment's own iterable. They're emitted\n * once at the top level of the response (as a separate iterable) and unioned in\n * by `readVaryParams`, because root params can be accessed at any point during\n * the render — folding them into every segment would otherwise require a merge\n * once the whole render is complete.\n */\nexport type VaryParamsIterable = AsyncIterable<string>\n\n/**\n * A Flight \"chunk\": when an `AsyncIterable` arrives over a fully-buffered Flight\n * stream, each `iterator.next()` returns one of these instead of a native\n * Promise. It follows the React thenable protocol — once `status` is\n * `'fulfilled'`, `value` (the `IteratorResult`) can be read synchronously.\n */\ntype IteratorResultChunk = PromiseLike<IteratorResult<string>> & {\n  status?: 'pending' | 'resolved_model' | 'fulfilled' | 'rejected' | string\n  value?: IteratorResult<string>\n}\n\n/**\n * Synchronously drains a vary params `AsyncIterable`, adding each yielded name\n * to `target`.\n *\n * By the time this runs (on the client, or in collectSegmentData), the Flight\n * stream has been fully buffered, so every yielded value is already\n * materialized and can be read without awaiting. We force each iterator result\n * to resolve synchronously using the same `.then(noop)` trick React uses\n * internally, then read its `status`/`value` directly.\n *\n * We add \"every param yielded up to the point the stream suspends\": a\n * normally-closed iterable drains fully, while one left hanging (a sync-I/O\n * abort, or a `close()` whose row hasn't flushed yet) drains to the prefix\n * already in the stream. Both are correct — a segment's param accesses are all\n * flushed as they happen during its render, so the prefix is exactly the set\n * the response depends on. We therefore never need the terminating `done` row\n * to be present; it's only stream hygiene.\n */\nfunction drainVaryParams(\n  iterable: VaryParamsIterable,\n  target: VaryParams\n): void {\n  const iterator = iterable[Symbol.asyncIterator]()\n  while (true) {\n    const chunk = iterator.next() as IteratorResultChunk\n    // Attach a no-op listener to force Flight to synchronously resolve the\n    // chunk. A freshly-arrived result may be in an intermediate\n    // 'resolved_model' state (data received but not unwrapped); calling\n    // .then() transitions it to 'fulfilled', making the value available\n    // synchronously. (A native Promise has no `status` and simply reads as\n    // not-fulfilled below, so this can never hang.)\n    chunk.then(noop, noop)\n    if (chunk.status !== 'fulfilled' || chunk.value === undefined) {\n      // The stream suspended here. Everything yielded before this point has\n      // already been added.\n      return\n    }\n    const step = chunk.value\n    if (step.done) {\n      return\n    }\n    target.add(step.value)\n  }\n}\n\n/**\n * Reads a segment's (or the head's) vary params, unioning in the response-level\n * root params.\n *\n * Root params are emitted once at the top level rather than folded into every\n * segment by the server, so every read recombines them here — building the\n * merge into the read means a caller can't forget it, and it's done in a single\n * pass with no intermediate set.\n *\n * Returns null (\"unknown\", key on all params) unless BOTH iterables are\n * present. A null/absent `iterable` means the segment's own tracking wasn't\n * enabled (e.g. not a prerender). A null/absent `rootIterable` means root\n * params weren't tracked — and since a segment's own iterable never includes\n * root params (those are accessed in layouts above it), narrowing on the\n * segment set alone would wrongly assume no root params were accessed. In\n * either case we stay conservative.\n *\n * When both are present each is authoritative even when it drains to the empty\n * set — a tracked segment that read no params, with no root params accessed,\n * can be shared across all param values.\n */\nexport function readVaryParams(\n  iterable: VaryParamsIterable | null | undefined,\n  rootIterable: VaryParamsIterable | null | undefined\n): VaryParams | null {\n  if (\n    iterable === null ||\n    iterable === undefined ||\n    rootIterable === null ||\n    rootIterable === undefined\n  ) {\n    return null\n  }\n  const varyParams: VaryParams = new Set()\n  drainVaryParams(iterable, varyParams)\n  drainVaryParams(rootIterable, varyParams)\n  return varyParams\n}\n\nconst noop = () => {}\n","import { getPreLockFetch } from './navigation-testing-lock'\n\n/**\n * Internal `fetch` used by the Next.js client router.\n *\n * When the Instant Navigation Testing API is enabled, the navigation lock may\n * install a blocking override on `window.fetch` for the duration of a lock\n * scope. To let internal fetches bypass the lock, callers go through a wrapper\n * that falls back to the pre-lock fetch captured at lock-acquire time.\n *\n * When the testing API is not enabled, this calls window.fetch directly.\n */\nfunction fetchInternal(\n  input: RequestInfo | URL,\n  init?: RequestInit\n): Promise<Response> {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const preLockFetch = getPreLockFetch()\n    if (preLockFetch !== null) {\n      return preLockFetch(input, init)\n    }\n  }\n  return fetch(input, init)\n}\n\nexport { fetchInternal as fetch }\n","import { deleteMapEntry } from './cache-map'\nimport type { UnknownMapEntry } from './cache-map'\nimport { pingPrefetchScheduler } from './scheduler'\n\n// We use an LRU for memory management. We must update this whenever we add or\n// remove a new cache entry, or when an entry changes size.\n\nlet head: UnknownMapEntry | null = null\nlet lruSize: number = 0\n\n// TODO: I chose the max size somewhat arbitrarily. Consider setting this based\n// on navigator.deviceMemory, or some other heuristic. We should make this\n// customizable via the Next.js config, too.\nconst maxLruSize = 50 * 1024 * 1024 // 50 MB\n\nexport function lruPut(node: UnknownMapEntry) {\n  if (head === node) {\n    // Already at the head\n    return\n  }\n  const prev = node.prev\n  const next = node.next\n  if (next === null || prev === null) {\n    // This is an insertion\n    lruSize += node.size\n    // Whenever we add an entry, we need to check if we've exceeded the\n    // max size. We don't evict entries immediately; they're evicted later in\n    // an asynchronous task.\n    ensureCleanupIsScheduled()\n  } else {\n    // This is a move. Remove from its current position.\n    prev.next = next\n    next.prev = prev\n  }\n\n  // Move to the front of the list\n  if (head === null) {\n    // This is the first entry\n    node.prev = node\n    node.next = node\n  } else {\n    // Add to the front of the list\n    const tail = head.prev\n    node.prev = tail\n    // In practice, this is never null, but that isn't encoded in the type\n    if (tail !== null) {\n      tail.next = node\n    }\n    node.next = head\n    head.prev = node\n  }\n  head = node\n}\n\nexport function updateLruSize(node: UnknownMapEntry, newNodeSize: number) {\n  // This is a separate function from `put` so that we can resize the entry\n  // regardless of whether it's currently being tracked by the LRU.\n  const prevNodeSize = node.size\n  node.size = newNodeSize\n  if (node.next === null) {\n    // This entry is not currently being tracked by the LRU.\n    return\n  }\n  // Update the total LRU size\n  lruSize = lruSize - prevNodeSize + newNodeSize\n  ensureCleanupIsScheduled()\n}\n\nexport function deleteFromLru(deleted: UnknownMapEntry) {\n  const next = deleted.next\n  const prev = deleted.prev\n  if (next !== null && prev !== null) {\n    lruSize -= deleted.size\n\n    deleted.next = null\n    deleted.prev = null\n\n    // Remove from the list\n    if (head === deleted) {\n      // Update the head\n      if (next === head) {\n        // This was the last entry\n        head = null\n      } else {\n        head = next\n        prev.next = next\n        next.prev = prev\n      }\n    } else {\n      prev.next = next\n      next.prev = prev\n    }\n  } else {\n    // Already deleted\n  }\n}\n\nfunction ensureCleanupIsScheduled() {\n  if (lruSize <= maxLruSize) {\n    return\n  }\n\n  // To schedule cleanup, ping the prefetch scheduler. At the end of its work\n  // loop, once there are no queued tasks and no in-progress requests, it will\n  // call cleanup().\n  pingPrefetchScheduler()\n}\n\nexport function cleanup() {\n  if (lruSize <= maxLruSize) {\n    return\n  }\n\n  // Evict entries until we're at 90% capacity. We can assume this won't\n  // infinite loop because even if `maxLruSize` were 0, eventually\n  // `deleteFromLru` sets `head` to `null` when we run out entries.\n  const ninetyPercentMax = maxLruSize * 0.9\n  while (lruSize > ninetyPercentMax && head !== null) {\n    const tail = head.prev\n    // In practice, this is never null, but that isn't encoded in the type\n    if (tail !== null) {\n      // Delete the entry from the map. In turn, this will remove it from\n      // the LRU.\n      deleteMapEntry(tail)\n    }\n  }\n}\n","/**\n * Navigation lock for the Instant Navigation Testing API.\n *\n * Manages the in-memory lock (a promise) that gates dynamic data writes\n * during instant navigation captures, and owns all cookie state\n * transitions (pending → captured-MPA, pending → captured-SPA).\n *\n * External actors (Playwright, devtools) set [0] to start a lock scope\n * and delete the cookie to end one. Next.js writes captured values.\n * The CookieStore handler distinguishes them by value: pending = external,\n * captured = self-write (ignored).\n *\n * This module assumes the Instant Navigation Testing API is enabled. When it\n * is disabled, the bundler resolves this module to\n * `./navigation-testing-lock.disabled` instead (see\n * `create-compiler-aliases.ts` for webpack and\n * `crates/next-core/src/next_import_map.rs` for Turbopack), so none of this\n * code ships in the browser bundle.\n */\n\nimport {\n  PrefetchHint,\n  type FlightRouterState,\n  type InstantCookie,\n} from '../../../shared/lib/app-router-types'\nimport { NEXT_INSTANT_TEST_COOKIE } from '../app-router-headers'\nimport { refreshOnInstantNavigationUnlock } from '../use-action-queue'\nimport { subtreeHasSpeculativePrefetch } from './scheduler'\nimport type { SegmentCacheEntry } from './cache'\nimport { createCacheMap, type CacheMap } from './cache-map'\nimport type { FetchStrategy } from './types'\n\ntype InstantNavCookieState = 'empty' | 'pending' | 'mpa' | 'spa'\n\nfunction parseCookieValue(raw: string): InstantNavCookieState {\n  if (raw === '') {\n    return 'empty'\n  }\n  try {\n    const parsed = JSON.parse(raw)\n    if (Array.isArray(parsed)) {\n      if (parsed.length >= 3) {\n        const rawState = parsed[2]\n        return rawState === null ? 'mpa' : 'spa'\n      }\n    }\n  } catch {}\n  return 'pending'\n}\n\nfunction writeDocumentCookie(\n  value: InstantCookie,\n  options: { domain?: string | null; path?: string | null }\n): void {\n  if (typeof document === 'undefined') {\n    return\n  }\n  let cookie = `${NEXT_INSTANT_TEST_COOKIE}=${JSON.stringify(value)}; Path=${\n    options.path ?? '/'\n  }`\n  if (options.domain) {\n    cookie += `; Domain=${options.domain}`\n  }\n  document.cookie = cookie\n}\n\nfunction writeCookieValue(value: InstantCookie): void {\n  if (typeof cookieStore === 'undefined') {\n    return\n  }\n  // Read the existing cookie to preserve its attributes (domain, path), then\n  // write back with the new value. This updates the same cookie entry that the\n  // external actor created, regardless of how it was scoped. The read goes\n  // through `cookieStore.get` because `document.cookie` exposes only names and\n  // values, not the domain/path we need to preserve. The write goes through\n  // document.cookie because WebKit exposes Cookie Store on localhost but does\n  // not commit cookies written through cookieStore.set() there.\n  //\n  // Capture the current lockState and compare it in the callback so we only\n  // write if the lock we observed at call time is still held. This guards\n  // against two races: (a) the scope ended between get and set (lockState is\n  // now null), and (b) the scope ended and a new one was acquired in the same\n  // gap (lockState is a different object). In either case we must not write —\n  // doing so would leak stale state into the next scope or outlive the current\n  // one. It cannot close one window, though: the callback can run after an\n  // external delete but before the deleted-event handler nulls lockState, so\n  // the guard still passes and we resurrect the cookie. The deleted handler\n  // clears any such entry once the lock is released (see the `event.deleted`\n  // loop below).\n  const lockAtCall = lockState\n  cookieStore.get(NEXT_INSTANT_TEST_COOKIE).then((existing: any) => {\n    if (existing && lockState === lockAtCall && lockAtCall !== null) {\n      writeDocumentCookie(value, existing)\n    }\n  })\n}\n\n/**\n * The \"wait for the locked navigation's prefetch to fulfill\" state for a single\n * locked navigation. `promise` resolves when the driving prefetch task\n * completes — which the scheduler only allows after a full pass has observed\n * every segment response it cares about (see `blockTaskOnPendingResponse` in\n * scheduler.ts) — so the navigation reads present data rather than a\n * still-in-flight entry. Owned by the prefetch task (one per navigation, so\n * successive navigations in a scope resolve independently) and also tracked\n * in `NavigationLockState.activePrefetches` so the lock can force-resolve any\n * that are still pending when it's released.\n */\nexport type NavigationLockPrefetch = {\n  promise: Promise<void>\n  resolve: () => void\n}\n\nexport type NavigationLockState = {\n  // Resolves when the lock is released (the testing scope ends). Out-of-band\n  // user fetches blocked by `globalFetchOverride` wait on this so they dispatch\n  // only once the scope ends. (A locked navigation's *withheld dynamic write*\n  // waits on `currentNavigation` instead — see below.)\n  released: Promise<void>\n  resolveReleased: () => void\n  // The pre-lock `window.fetch`, captured at `acquireLock` time and\n  // restored at `releaseLock`. Internal Next.js code reads this via\n  // `getPreLockFetch` to bypass the override we install on `window.fetch`\n  // during a lock scope.\n  fetch: typeof fetch\n  // Every prefetch-completion state for this scope that hasn't resolved yet.\n  // A prefetch removes itself when its driving task completes; on release, any\n  // still here are force-resolved so no navigation hangs waiting on a prefetch\n  // that the scope ended before it could finish.\n  activePrefetches: Set<NavigationLockPrefetch>\n  // The scope's private segment cache. Prefetch tasks scheduled while the\n  // lock is held are bound to this map instead of the shared one, and a\n  // locked navigation inherits the map of the task that drives it (see\n  // `segmentCacheMap` in cache.ts). It starts empty, so each instant()\n  // navigation observes only data fetched under the lock — a \"clean read\" —\n  // and never matches a stale entry left in the shared cache by an earlier\n  // navigation, prefetch, or scope. Discarded when the lock is released; its\n  // entries are reclaimed by the LRU under memory pressure.\n  segmentCacheMap: CacheMap<SegmentCacheEntry>\n  // The withheld-data gate for the current locked navigation. A locked\n  // navigation's dynamic write waits on this rather than on the scope-wide\n  // `released`. Each navigation captures the promise when it begins (via\n  // `beginLockedNavigation` or `getCurrentNavigationGate`) and awaits that\n  // immutable snapshot, never this mutable field. `beginLockedNavigation`\n  // rolls the field over on each new locked navigation: it resolves the\n  // current promise — so the *previous* navigation's withheld data is written\n  // out and the cache nodes it produced stop holding pending deferred promises\n  // that a reused shared segment would otherwise suspend on — then installs a\n  // fresh one. `releaseLock` resolves it too. Net effect: only the most recent\n  // navigation's data stays withheld; a new navigation always releases the\n  // previous one.\n  currentNavigation: Promise<void>\n  resolveCurrentNavigation: () => void\n}\n\nlet lockState: NavigationLockState | null = null\n\nexport function getPreLockFetch(): typeof fetch | null {\n  return lockState !== null ? lockState.fetch : null\n}\n\n/**\n * Creates the \"wait for prefetch to fulfill\" state for one locked navigation,\n * registers it on the current lock, and returns it (the caller stores it on the\n * prefetch task and awaits `.promise`). Returns null if no lock is held.\n * Resolved by the scheduler via `resolveNavigationLockPrefetch` when the\n * driving prefetch task completes.\n */\nexport function beginNavigationLockPrefetch(): NavigationLockPrefetch | null {\n  if (lockState !== null) {\n    let resolve: () => void\n    const promise = new Promise<void>((r) => {\n      resolve = r\n    })\n    const prefetch: NavigationLockPrefetch = {\n      promise,\n      resolve: resolve!,\n    }\n    lockState.activePrefetches.add(prefetch)\n    return prefetch\n  }\n  return null\n}\n\n/**\n * Returns the current lock scope's private segment cache map, or null when no\n * lock is held. See `NavigationLockState.segmentCacheMap`.\n */\nexport function getNavigationLockSegmentCacheMap(): CacheMap<SegmentCacheEntry> | null {\n  return lockState !== null ? lockState.segmentCacheMap : null\n}\n\n/**\n * Called by the scheduler when the locked-navigation prefetch task completes.\n * A task only completes after a full pass observed every segment response it\n * cares about, so the data the navigation will read has settled by this\n * point. Unregisters from the lock (if still held) and resolves. Resolving is\n * idempotent, so it's safe even if the lock already force-resolved this on\n * release.\n */\nexport function resolveNavigationLockPrefetch(\n  prefetch: NavigationLockPrefetch\n): void {\n  if (lockState !== null) {\n    lockState.activePrefetches.delete(prefetch)\n  }\n  prefetch.resolve()\n}\n\nfunction acquireLock(): void {\n  if (lockState !== null) {\n    return\n  }\n  let resolveReleased: () => void\n  const released = new Promise<void>((r) => {\n    resolveReleased = r\n  })\n  let resolveCurrentNavigation: () => void\n  const currentNavigation = new Promise<void>((r) => {\n    resolveCurrentNavigation = r\n  })\n  lockState = {\n    released,\n    resolveReleased: resolveReleased!,\n    fetch: window.fetch,\n    activePrefetches: new Set(),\n    segmentCacheMap: createCacheMap(),\n    currentNavigation,\n    resolveCurrentNavigation: resolveCurrentNavigation!,\n  }\n\n  // Install the fetch blocker. We only intercept `window.fetch` for the\n  // duration of the lock so that — outside of a testing scope — user-\n  // installed overrides of `window.fetch` are untouched.\n  window.fetch = globalFetchOverride\n}\n\nfunction releaseLock(): void {\n  if (lockState === null) {\n    return\n  }\n  // Restore the pre-lock `window.fetch` before resolving the lock promise\n  // so any fetches queued on the promise see the restored fetch.\n  window.fetch = lockState.fetch\n  const { resolveReleased, activePrefetches, resolveCurrentNavigation } =\n    lockState\n  lockState = null\n  // Force-resolve every prefetch that hasn't finished, so a navigation still\n  // waiting on one doesn't hang now that the scope is ending.\n  for (const prefetch of activePrefetches) {\n    prefetch.resolve()\n  }\n  // Resolve the current locked navigation's withheld-data gate, so its gated\n  // dynamic write unblocks now that the scope is ending.\n  resolveCurrentNavigation()\n  // Resolve the release promise so blocked out-of-band fetches dispatch too.\n  resolveReleased()\n}\n\n/**\n * Called when a new locked navigation begins (from `navigate` while the lock is\n * held). Rolls over the lock's withheld-data gate: it resolves the current\n * `currentNavigation` promise — so the *previous* locked navigation's withheld\n * dynamic write proceeds and the cache nodes it produced stop holding pending\n * deferred `rsc` promises that a reused shared segment in this navigation would\n * otherwise suspend on — then installs a fresh promise for this navigation.\n * Only the most recent navigation's data stays withheld; a new navigation\n * always releases the previous one. Returns this navigation's gate — the\n * immutable promise its dynamic write awaits — or null when no lock is held.\n *\n * This is the testing-lock behavior for repeated navigations while paused. It\n * is not a principled fix for the underlying `useDeferredValue`/reuse-suspend\n * behavior; it just ensures that, under the lock, a reused segment never\n * carries a still-pending deferred `rsc` from an earlier navigation.\n */\nexport function beginLockedNavigation(): Promise<void> | null {\n  if (lockState === null) {\n    return null\n  }\n  // Release the previous locked navigation's withheld data, then roll over to a\n  // fresh gate for this navigation — all without ending the scope.\n  lockState.resolveCurrentNavigation()\n  let resolveCurrentNavigation: () => void\n  const currentNavigation = new Promise<void>((r) => {\n    resolveCurrentNavigation = r\n  })\n  lockState.currentNavigation = currentNavigation\n  lockState.resolveCurrentNavigation = resolveCurrentNavigation!\n  return currentNavigation\n}\n\n/**\n * Called when the router applies a history traversal (Back/Forward restore) while\n * the testing lock is active. A traversal is not a capture — the mental model is\n * that history entries are already cached — so it must not participate in the\n * current capture. Instead it resets the lock to a fresh pending scope:\n *\n * - `releaseLock` flushes every still-withheld write from prior forward\n *   navigations, so the pages you navigated away from finish streaming.\n * - `acquireLock` immediately re-arms a fresh pending scope (no gap where the\n *   lock or fetch blocker is down).\n * - the cookie flips from the captured state back to pending.\n *\n * The traversal's own dynamic requests are spawned ungated by the caller (see\n * `restore-reducer`), so they render from cache or fetch normally rather than\n * being withheld.\n */\nexport function resetNavigationLockToPending(): void {\n  if (lockState === null || typeof document === 'undefined') {\n    return\n  }\n  releaseLock()\n  acquireLock()\n  writeCookieValue([0, `c${Math.random()}`])\n}\n\n/**\n * Returns true if the request targets a dev-server endpoint — one of the\n * hot-reloader middleware routes (error overlay, source maps, launch-editor,\n * devtools). They all share the `/__nextjs_` path prefix and are always\n * requested root-relative on the same origin.\n */\nfunction isDevServerRequest(input: RequestInfo | URL): boolean {\n  let url: URL\n  try {\n    url = new URL(\n      typeof input === 'string'\n        ? input\n        : input instanceof URL\n          ? input\n          : input.url,\n      window.location.href\n    )\n  } catch {\n    return false\n  }\n  return (\n    url.origin === window.location.origin &&\n    url.pathname.startsWith('/__nextjs_')\n  )\n}\n\n/**\n * Global fetch override\n *\n * While the navigation lock is active, we install this as `window.fetch` so\n * out-of-band client-side fetches (e.g. `fetch('/api/data')` inside a\n * useEffect) are blocked until the lock is released. Next.js internals\n * bypass the override by importing `fetch` from `./fetch`, which reads the\n * captured pre-lock fetch via `getPreLockFetch`.\n *\n * NOTE: This override only affects environments where the Instant Navigation\n * Testing API is enabled. It has no impact on live production behavior.\n */\nfunction globalFetchOverride(\n  input: RequestInfo | URL,\n  init?: RequestInit\n): Promise<Response> {\n  if (lockState === null) {\n    // Lock is not active. Fall through to the global fetch — we reach this\n    // only if a caller captured a reference to this function during a lock\n    // scope and invoked it after release.\n    return fetch(input, init)\n  }\n  if (process.env.__NEXT_DEV_SERVER && isDevServerRequest(input)) {\n    // Dev-server requests must not be gated on the testing lock — blocking\n    // them would break the error overlay, source maps, and devtools for the\n    // whole scope. Dispatch immediately through the pre-lock fetch. Copy to a\n    // local so the call doesn't bind `this` to the lock state object (native\n    // fetch throws \"Illegal invocation\" for a foreign receiver).\n    const preLockFetch = lockState.fetch\n    return preLockFetch(input, init)\n  }\n  // Block user-initiated fetches until the lock is released, then dispatch\n  // through the fetch captured at acquire time. Reading from `lockState`\n  // (rather than `window.fetch`) pins to the capture even if `window.fetch`\n  // is reassigned after release.\n  const currentLock = lockState\n  return currentLock.released.then(() => {\n    const preLockFetch = currentLock.fetch\n    return preLockFetch(input, init)\n  })\n}\n\n/**\n * Sets up the cookie-based lock. Handles the initial page load state and\n * registers a CookieStore listener for runtime changes.\n *\n * Called once during page initialization from app-globals.ts.\n */\nexport function startListeningForInstantNavigationCookie(): void {\n  // If the server served a shell, this is an MPA page load\n  // while the lock is held. Transition to captured-MPA and acquire.\n  if (self.__next_instant_test) {\n    if (typeof cookieStore !== 'undefined') {\n      // If the cookie was already cleared during the MPA page\n      // transition, reload to get the full dynamic page.\n      cookieStore.get(NEXT_INSTANT_TEST_COOKIE).then((cookie: any) => {\n        if (!cookie) {\n          window.location.reload()\n        }\n      })\n    }\n\n    // Acquire the lock before writing the cookie. writeCookieValue's\n    // guard requires lockState to be non-null at call time (so a stale\n    // write can't outlive its scope). On a fresh page load that scope\n    // is the one we're about to establish, so we have to establish it\n    // first.\n    acquireLock()\n    writeCookieValue([1, `c${Math.random()}`, null])\n  }\n\n  if (typeof cookieStore === 'undefined') {\n    return\n  }\n\n  cookieStore.addEventListener('change', (event: CookieChangeEvent) => {\n    for (const cookie of event.changed) {\n      if (cookie.name === NEXT_INSTANT_TEST_COOKIE) {\n        const state = parseCookieValue(cookie.value ?? '')\n\n        if (state === 'pending') {\n          // External actor starting a new lock scope.\n          if (lockState !== null) {\n            // This can be the delayed CookieStore event for the pending\n            // cookie that was already observed synchronously from\n            // document.cookie. Keep the existing lock identity so work that\n            // captured it keeps waiting on the same promise.\n            return\n          }\n          acquireLock()\n        }\n        // Captured value (our own transition) or empty. Ignore.\n        return\n      }\n    }\n\n    for (const cookie of event.deleted) {\n      if (cookie.name === NEXT_INSTANT_TEST_COOKIE) {\n        if (lockState === null) {\n          // Either no lock is active, or this is the re-entrant change event\n          // from the defensive clear below (which runs after releaseLock).\n          // Nothing to release either way.\n          return\n        }\n        releaseLock()\n        // A captured write from this page's bootstrap can resurrect the\n        // cookie in the narrow gap between the external delete and this\n        // handler: writeCookieValue's guard only rejects the write once the\n        // lock is torn down, which happens here. Now that the lock is\n        // released, no further captured write can re-add the cookie, so clear\n        // any entry that was resurrected in that gap. Otherwise an unlock\n        // that falls back to a hard reload (when the shell has not yet\n        // hydrated) would carry the stale cookie, be served the shell again,\n        // and re-enter instant mode with no scope left to release it.\n        if (typeof document !== 'undefined') {\n          document.cookie = `${NEXT_INSTANT_TEST_COOKIE}=; Path=/; Max-Age=0`\n        }\n        refreshOnInstantNavigationUnlock()\n        return\n      }\n    }\n  })\n}\n\n/**\n * Transitions the cookie from pending to captured-SPA once the prefetch resolves\n * and the navigation is known to be an SPA.\n */\nexport function updateCapturedSPAToTree(\n  fromTree: FlightRouterState,\n  toTree: FlightRouterState\n): void {\n  writeCookieValue([1, `c${Math.random()}`, { from: fromTree, to: toTree }])\n}\n\n/**\n * Returns true if the navigation lock is currently active.\n */\nexport function isNavigationLocked(): boolean {\n  if (lockState !== null) {\n    return true\n  }\n\n  // If `lockState` is null, fall back to reading the test cookie\n  // synchronously from `document.cookie`. This accounts for a small race\n  // between `cookieStore.set(...)` and its corresponding `change` event.\n  // During that gap `lockState` is still null even though the cookie\n  // indicates a new lock scope is starting.\n  if (typeof document === 'undefined') {\n    return false\n  }\n  const allCookies = document.cookie\n  if (!allCookies.includes(NEXT_INSTANT_TEST_COOKIE)) {\n    // Fast bail-out: in almost every navigation the test cookie is not\n    // set at all.\n    return false\n  }\n  const target = NEXT_INSTANT_TEST_COOKIE + '='\n  for (const segment of allCookies.split(';')) {\n    const trimmed = segment.trim()\n    if (\n      trimmed.startsWith(target) &&\n      parseCookieValue(trimmed.slice(target.length)) === 'pending'\n    ) {\n      // The cookie was set by an external actor but the change event was not\n      // yet dispatched. Acquire the lock synchronously.\n      acquireLock()\n      return true\n    }\n  }\n  return false\n}\n\n/**\n * Returns the current locked navigation's withheld-data gate — the same\n * immutable promise `beginLockedNavigation` handed that navigation — or null\n * when no lock is held. For router work that spawns a dynamic write without\n * beginning a navigation of its own (refreshes, server actions, server\n * patches): it gates behind the navigation that is current when it spawns, so\n * the next locked navigation (or unlock) releases it.\n */\nexport function getCurrentNavigationGate(): Promise<void> | null {\n  return lockState !== null ? lockState.currentNavigation : null\n}\n\n/**\n * Decides whether segment reads during a navigation should be restricted to\n * shell entries (every param substituted with Fallback) rather than matching\n * entries that vary on concrete route params.\n *\n * The testing tools (Navigation Inspector, instant()) simulate what a user\n * would see with a warm cache. When the lock is held, partial prefetching is\n * enabled for the target route, and no whole-route (\"speculative\") prefetch\n * would have been made, only the shell is prefetched — so that's all a\n * navigation should be allowed to match. A speculative prefetch happens for a\n * `<Link prefetch={true}>` or an eagerly-prefetched subtree, in which case the\n * concrete-param entry is genuinely warm and may be matched.\n *\n * Always returns false outside the testing API, via the aliased\n * `navigation-testing-lock.disabled` module.\n */\nexport function shouldRestrictNavigationToShell(\n  rootPrefetchHints: number,\n  linkFetchStrategy: FetchStrategy\n): boolean {\n  return (\n    isNavigationLocked() &&\n    (rootPrefetchHints & PrefetchHint.SubtreeHasPartialPrefetching) !== 0 &&\n    !subtreeHasSpeculativePrefetch(linkFetchStrategy, rootPrefetchHints)\n  )\n}\n","import type {\n  CacheNodeSeedData,\n  FlightRouterState,\n  FlightSegmentPath,\n  ScrollRef,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData } from '../../../shared/lib/app-router-types'\nimport {\n  PrefetchHint,\n  SubtreePrefetchHints,\n  propagateSubtreeBits,\n} from '../../../shared/lib/app-router-types'\nimport type { NormalizedFlightData } from '../../flight-data-helpers'\nimport { fetchServerResponse } from '../router-reducer/fetch-server-response'\nimport {\n  startPPRNavigation,\n  spawnDynamicRequests,\n  FreshnessPolicy,\n  beginLockedNavigation,\n  type NavigationLock,\n  type NavigationRequestAccumulation,\n} from '../router-reducer/ppr-navigations'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport {\n  EntryStatus,\n  segmentCacheMap,\n  type SegmentCacheEntry,\n  readRouteCacheEntry,\n  deprecated_requestOptimisticRouteCacheEntry,\n  convertRootFlightRouterStateToRouteTree,\n  resolveStaleAt,\n  writePrerenderResponseIntoCache,\n  processRuntimePrefetchStream,\n  writeDynamicRenderResponseIntoCache,\n  type RouteTree,\n  type FulfilledRouteCacheEntry,\n} from './cache'\nimport { discoverKnownRoute } from './optimistic-routes'\nimport { createCacheKey, type NormalizedSearch } from './cache-key'\nimport type { CacheMap } from './cache-map'\nimport { schedulePrefetchTask } from './scheduler'\nimport { PrefetchPriority, FetchStrategy } from './types'\nimport { getLinkForCurrentNavigation } from '../links'\nimport type { PageVaryPath } from './vary-path'\nimport type { AppRouterState } from '../router-reducer/router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer/router-reducer-types'\nimport { computeChangedPath } from '../router-reducer/compute-changed-path'\nimport { isJavaScriptURLString } from '../../lib/javascript-url'\nimport { UnknownDynamicStaleTime, computeDynamicStaleAt } from './bfcache'\nimport { createLinkPrefetchPartialError } from '../../../shared/lib/instant-messages'\nimport { matchSegment } from '../match-segments'\nimport {\n  DEFAULT_SEGMENT_KEY,\n  PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\n\n/**\n * Navigate to a new URL, using the Segment Cache to construct a response.\n *\n * To allow for synchronous navigations whenever possible, this is not an async\n * function. It returns a promise only if there's no matching prefetch in\n * the cache. Otherwise it returns an immediate result and uses Suspense/RSC to\n * stream in any missing data.\n */\nexport function navigate(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace'\n): AppRouterState | Promise<AppRouterState> {\n  let navigationLock: NavigationLock | null = null\n\n  // Instant Navigation Testing API: when the lock is active, ensure a\n  // prefetch task has been initiated before proceeding with the navigation.\n  // This guarantees that segment data requests are at least pending, even\n  // for routes that already have a cached route tree. Without this, the\n  // shell might be incomplete because some segments were never\n  // requested.\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { isNavigationLocked } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    if (isNavigationLocked()) {\n      // Signal that a new locked navigation is starting. This force-resolves the\n      // previous locked navigation's withheld data (so a reused shared segment\n      // no longer carries a pending deferred rsc) and returns this navigation's\n      // own withheld-data gate.\n      navigationLock = beginLockedNavigation()\n      return ensurePrefetchThenNavigate(\n        state,\n        url,\n        currentUrl,\n        currentRenderedSearch,\n        currentCacheNode,\n        currentFlightRouterState,\n        nextUrl,\n        freshnessPolicy,\n        scrollBehavior,\n        navigateType,\n        navigationLock\n      )\n    }\n  }\n\n  return navigateImpl(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    nextUrl,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    // An unlocked navigation is bound to the shared map.\n    segmentCacheMap\n  )\n}\n\nfunction navigateImpl(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  navigationLock: NavigationLock | null,\n  // The segment cache map this navigation is bound to: a locked navigation's\n  // driving-task map, or the shared map. See `segmentCacheMap` in cache.ts.\n  map: CacheMap<SegmentCacheEntry>\n): AppRouterState | Promise<AppRouterState> {\n  const now = Date.now()\n  const href = url.href\n\n  const cacheKey = createCacheKey(href, nextUrl)\n  const route = readRouteCacheEntry(now, cacheKey)\n  if (route !== null && route.status === EntryStatus.Fulfilled) {\n    // We have a matching prefetch.\n    return navigateUsingPrefetchedRouteTree(\n      now,\n      state,\n      url,\n      currentUrl,\n      currentRenderedSearch,\n      nextUrl,\n      currentCacheNode,\n      currentFlightRouterState,\n      freshnessPolicy,\n      scrollBehavior,\n      navigateType,\n      route,\n      navigationLock,\n      map\n    )\n  }\n\n  // There was no matching route tree in the cache. Let's see if we can\n  // construct an \"optimistic\" route tree using the deprecated search-params\n  // based matching. This is only used when the new optimisticRouting flag is\n  // disabled.\n  //\n  // Do not construct an optimistic route tree if there was a cache hit, but\n  // the entry has a rejected status, since it may have been rejected due to a\n  // rewrite or redirect based on the search params.\n  //\n  // TODO: There are multiple reasons a prefetch might be rejected; we should\n  // track them explicitly and choose what to do here based on that.\n  if (!process.env.__NEXT_OPTIMISTIC_ROUTING) {\n    if (route === null || route.status !== EntryStatus.Rejected) {\n      const optimisticRoute = deprecated_requestOptimisticRouteCacheEntry(\n        now,\n        url,\n        nextUrl\n      )\n      if (optimisticRoute !== null) {\n        // We have an optimistic route tree. Proceed with the normal flow.\n        return navigateUsingPrefetchedRouteTree(\n          now,\n          state,\n          url,\n          currentUrl,\n          currentRenderedSearch,\n          nextUrl,\n          currentCacheNode,\n          currentFlightRouterState,\n          freshnessPolicy,\n          scrollBehavior,\n          navigateType,\n          optimisticRoute,\n          navigationLock,\n          map\n        )\n      }\n    }\n  }\n\n  // There's no matching prefetch for this route in the cache. We must lazily\n  // fetch it from the server before we can perform the navigation.\n  //\n  // TODO: If this is a gesture navigation, instead of performing a\n  // dynamic request, we should do a runtime prefetch.\n  return navigateToUnknownRoute(\n    now,\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    nextUrl,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    map\n  ).catch(() => {\n    // If the navigation fails, return the current state\n    return state\n  })\n}\n\nexport function navigateToKnownRoute(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  canonicalUrl: string,\n  navigationSeed: NavigationSeed,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  nextUrl: string | null,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  navigationLock: NavigationLock | null,\n  // The segment cache map this navigation is bound to: a locked navigation's\n  // driving-task map, or the shared map. See `segmentCacheMap` in cache.ts.\n  map: CacheMap<SegmentCacheEntry>,\n  debugInfo: Array<unknown> | null,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. Passed through so it can be marked as having a dynamic rewrite\n  // if the server returns a different pathname (indicating dynamic rewrite\n  // behavior).\n  //\n  // When null, the navigation did not use route prediction - either because\n  // the route was already fully cached, or it's a navigation that doesn't\n  // involve prediction (refresh, history traversal, server action, etc.).\n  // In these cases, if a mismatch occurs, we still mark the route as having a\n  // dynamic rewrite by traversing the known route tree (see\n  // dispatchRetryDueToTreeMismatch).\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  signal: AbortSignal | undefined\n): AppRouterState {\n  // A version of navigate() that accepts the target route tree as an argument\n  // rather than reading it from the prefetch cache.\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    process.env.__NEXT_CACHE_COMPONENTS\n  ) {\n    // Warn when navigating via a `<Link prefetch={true}>` to a route that has\n    // not opted into Partial Prefetching. Such a link does a legacy \"full\"\n    // prefetch that includes the route's dynamic data, defeating the\n    // static/dynamic split that Cache Components provides.\n    //\n    // This runs at navigation time (rather than prefetch time) so that, in dev\n    // where we don't prefetch, the warning only appears when you actually\n    // navigate to the route — existing apps with many `prefetch={true}` links\n    // aren't flooded with warnings the moment they enable Cache Components.\n    //\n    // The warning is suppressed if any segment on the target route exports\n    // `instant = false`, which is the explicit API for opting a route out of\n    // this validation.\n    const link = getLinkForCurrentNavigation()\n    if (\n      link !== null &&\n      link.fetchStrategy === FetchStrategy.Full &&\n      (navigationSeed.routeTree.prefetchHints &\n        (PrefetchHint.SubtreeHasPartialPrefetching |\n          PrefetchHint.SubtreeHasInstantFalse)) ===\n        0\n    ) {\n      const error = createLinkPrefetchPartialError(url.pathname)\n      const ownerStack = 'ownerStack' in link ? link.ownerStack : undefined\n      if (ownerStack === undefined) {\n        console.error(\n          '' +\n            'Cannot associate the \"prefetch={true}\" warning with a specific <Link> making it harder to find the cause of the following warning. ' +\n            'This is a bug in Next.js.'\n        )\n      } else if (ownerStack !== null) {\n        // Replace the (useless) stack captured at the throw site — which\n        // points into router internals — with the Owner Stack captured when\n        // the <Link> rendered. That way the dev overlay associates this\n        // warning with the JSX that created the link, not with\n        // navigation.ts.\n        error.stack = `${error.name}: ${error.message}${ownerStack}`\n      }\n      console.error(error)\n    }\n  }\n\n  // Instant Navigation Testing API: when the lock is held, restrict segment\n  // reads to shell entries if the target route would only have prefetched\n  // its shell.\n  let restrictToShell = false\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { shouldRestrictNavigationToShell } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    const link = getLinkForCurrentNavigation()\n    restrictToShell = shouldRestrictNavigationToShell(\n      navigationSeed.routeTree.prefetchHints,\n      link !== null ? link.fetchStrategy : FetchStrategy.PPR\n    )\n  }\n\n  const accumulation: NavigationRequestAccumulation = {\n    separateRefreshUrls: null,\n    scrollRef: null,\n  }\n  // We special case navigations to the exact same URL as the current location.\n  // It's a common UI pattern for apps to refresh when you click a link to the\n  // current page. So when this happens, we refresh the dynamic data in the page\n  // segments.\n  //\n  // Note that this does not apply if the any part of the hash or search query\n  // has changed. This might feel a bit weird but it makes more sense when you\n  // consider that the way to trigger this behavior is to click the same link\n  // multiple times.\n  //\n  // TODO: We should probably refresh the *entire* route when this case occurs,\n  // not just the page segments. Essentially treating it the same as a refresh()\n  // triggered by an action, which is the more explicit way of modeling the UI\n  // pattern described above.\n  //\n  // Also note that this only refreshes the dynamic data, not static/ cached\n  // data. If the page segment is fully static and prefetched, the request is\n  // skipped. (This is also how refresh() works.)\n  const isSamePageNavigation = url.href === currentUrl.href\n  const task = startPPRNavigation(\n    now,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    navigationSeed.routeTree,\n    navigationSeed.metadataVaryPath,\n    freshnessPolicy,\n    navigationSeed.data,\n    navigationSeed.head,\n    navigationSeed.dynamicStaleAt,\n    isSamePageNavigation,\n    accumulation,\n    map,\n    restrictToShell\n  )\n  if (task !== null) {\n    if (freshnessPolicy !== FreshnessPolicy.Gesture) {\n      spawnDynamicRequests(\n        task,\n        url,\n        nextUrl,\n        freshnessPolicy,\n        accumulation,\n        routeCacheEntry,\n        navigateType,\n        navigationLock,\n        map,\n        signal\n      )\n    }\n    return completeSoftNavigation(\n      state,\n      url,\n      nextUrl,\n      task.route,\n      task.node,\n      navigationSeed.renderedSearch,\n      canonicalUrl,\n      navigateType,\n      scrollBehavior,\n      accumulation.scrollRef,\n      debugInfo\n    )\n  }\n  // Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.\n  return completeHardNavigation(state, url, navigateType)\n}\n\nfunction navigateUsingPrefetchedRouteTree(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  nextUrl: string | null,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  route: FulfilledRouteCacheEntry,\n  navigationLock: NavigationLock | null,\n  map: CacheMap<SegmentCacheEntry>\n): AppRouterState {\n  const routeTree = route.tree\n  const canonicalUrl = route.canonicalUrl + url.hash\n  const renderedSearch = route.renderedSearch\n  const prefetchSeed: NavigationSeed = {\n    renderedSearch,\n    routeTree,\n    metadataVaryPath: route.metadata.varyPath as any,\n    data: null,\n    head: null,\n    dynamicStaleAt: computeDynamicStaleAt(now, UnknownDynamicStaleTime),\n    // Not derived from a server response; no base to diverge from.\n    treeDivergedFromBase: false,\n  }\n  return navigateToKnownRoute(\n    now,\n    state,\n    url,\n    canonicalUrl,\n    prefetchSeed,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    nextUrl,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    map,\n    null,\n    route,\n    // Not an HMR refresh, so there's no request generation to cancel.\n    undefined\n  )\n}\n\n// Used to request all the dynamic data for a route, rather than just a subset,\n// e.g. during a refresh or a revalidation. Typically this gets constructed\n// during the normal flow when diffing the route tree, but for an unprefetched\n// navigation, where we don't know the structure of the target route, we use\n// this instead.\nconst DynamicRequestTreeForEntireRoute: FlightRouterState = [\n  '',\n  {},\n  null,\n  'refetch',\n]\n\nasync function navigateToUnknownRoute(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  nextUrl: string | null,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  navigationLock: NavigationLock | null,\n  map: CacheMap<SegmentCacheEntry>\n): Promise<AppRouterState> {\n  // Runs when a navigation happens but there's no cached prefetch we can use.\n  // Don't bother to wait for a prefetch response; go straight to a full\n  // navigation that contains both static and dynamic data in a single stream.\n  // (This is unlike the old navigation implementation, which instead blocks\n  // the dynamic request until a prefetch request is received.)\n  //\n  // To avoid duplication of logic, we're going to pretend that the tree\n  // returned by the dynamic request is, in fact, a prefetch tree. Then we can\n  // use the same server response to write the actual data into the CacheNode\n  // tree. So it's the same flow as the \"happy path\" (prefetch, then\n  // navigation), except we use a single server response for both stages.\n\n  let dynamicRequestTree: FlightRouterState\n  switch (freshnessPolicy) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.HistoryTraversal:\n    case FreshnessPolicy.Gesture:\n      dynamicRequestTree = currentFlightRouterState\n      break\n    case FreshnessPolicy.Hydration: // <- shouldn't happen during client nav\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      dynamicRequestTree = DynamicRequestTreeForEntireRoute\n      break\n    default:\n      freshnessPolicy satisfies never\n      dynamicRequestTree = currentFlightRouterState\n      break\n  }\n\n  const promiseForDynamicServerResponse = fetchServerResponse(url, {\n    flightRouterState: dynamicRequestTree,\n    nextUrl,\n  })\n  const result = await promiseForDynamicServerResponse\n  if (typeof result === 'string') {\n    // This is an MPA navigation.\n    const redirectUrl = new URL(result, location.origin)\n    return completeHardNavigation(state, redirectUrl, navigateType)\n  }\n\n  const {\n    flightData,\n    canonicalUrl,\n    renderedSearch,\n    couldBeIntercepted,\n    supportsPerSegmentPrefetching,\n    dynamicStaleTime,\n    staticStageData,\n    runtimePrefetchStream,\n    responseHeaders,\n    debugInfo,\n  } = result\n\n  // Since the response format of dynamic requests and prefetches is slightly\n  // different, we'll need to massage the data a bit. Create FlightRouterState\n  // tree that simulates what we'd receive as the result of a prefetch.\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    currentFlightRouterState,\n    flightData,\n    renderedSearch,\n    dynamicStaleTime\n  )\n\n  // Learn the route pattern so we can predict it for future navigations.\n  // hasDynamicRewrite is false because this is a fresh navigation to an\n  // unknown route - any rewrite detection happens during the traversal inside\n  // discoverKnownRoute. The hasDynamicRewrite param is only set to true when\n  // retrying after a tree mismatch (see dispatchRetryDueToTreeMismatch).\n  const metadataVaryPath = navigationSeed.metadataVaryPath\n  if (metadataVaryPath !== null) {\n    discoverKnownRoute(\n      now,\n      url.pathname,\n      url.search as NormalizedSearch,\n      nextUrl,\n      null, // No pending entry\n      navigationSeed.routeTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      // Store a hashless canonical URL: the entry is shared across hashes, and\n      // a later same-route hash nav appends `url.hash` to it.\n      createHrefFromUrl(canonicalUrl, false),\n      supportsPerSegmentPrefetching,\n      false // hasDynamicRewrite - not a retry, rewrite detection happens during traversal\n    )\n\n    if (staticStageData !== null) {\n      const { response: staticStageResponse, isResponsePartial } =\n        staticStageData\n\n      // Write the static stage of the response into the segment cache so that\n      // subsequent navigations can serve cached static segments instantly.\n      resolveStaleAt(now, staticStageResponse.s)\n        .then((staleAt) => {\n          const buildId =\n            responseHeaders.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n            staticStageResponse.b\n\n          // TODO: Implement Shell extraction as part of Cached Navigations.\n          // Intentionally holding off on doing this until we decide how the\n          // Cached Navigations behavior should work in combination with App\n          // Shells.\n          writePrerenderResponseIntoCache(\n            now,\n            FetchStrategy.PPR,\n            staticStageResponse.f,\n            buildId,\n            staticStageResponse.h,\n            staticStageResponse.r ?? null,\n            staleAt,\n            currentFlightRouterState,\n            renderedSearch,\n            isResponsePartial,\n            map\n          )\n        })\n        .catch(() => {\n          // The static stage processing failed. Not fatal — the navigation\n          // completed normally, we just won't write into the cache.\n        })\n    }\n\n    if (runtimePrefetchStream !== null) {\n      processRuntimePrefetchStream(\n        now,\n        runtimePrefetchStream,\n        currentFlightRouterState,\n        renderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              now,\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.rootVaryParamsIterable,\n              processed.staleAt,\n              processed.navigationSeed,\n              null,\n              map\n            )\n          }\n        })\n        .catch(() => {\n          // The runtime prefetch cache write failed. Not fatal — the\n          // navigation completed normally, we just won't cache runtime data.\n        })\n    }\n  }\n\n  // In the streaming dev render, this single response's seed content may still\n  // be streaming when we build the tree below. An unknown-route navigation\n  // places that content inline (it has no prior cache entry, so the server\n  // sends a full seed rather than the dynamic-only delta a known route gets),\n  // and that inline content is not gated like a known route's deferred RSCs. So\n  // React could read a still-pending chunk and flash a Suspense fallback\n  // (wanted on a cold cache, but not on a warm one). Wait for the shell to\n  // flush (`revealAfter`) first, so the inline seed content is decoded by the\n  // time React reads it, the same way the known-route path gates its deferred\n  // RSCs. `revealAfter` is null outside the streaming dev render. On a cache\n  // miss it resolves early, so the cold-cache fallback is still shown.\n  if (result.revealAfter !== null) {\n    await result.revealAfter\n  }\n\n  return navigateToKnownRoute(\n    now,\n    state,\n    url,\n    createHrefFromUrl(canonicalUrl),\n    navigationSeed,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    nextUrl,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    map,\n    debugInfo,\n    // Unknown route navigations don't use route prediction - the route tree\n    // came directly from the server. If a mismatch occurs during dynamic data\n    // fetch, the retry handler will traverse the known route tree to mark the\n    // entry as having a dynamic rewrite.\n    null,\n    // Not an HMR refresh, so there's no request generation to cancel.\n    undefined\n  )\n}\n\nexport function completeHardNavigation(\n  state: AppRouterState,\n  url: URL,\n  navigateType: 'push' | 'replace'\n): AppRouterState {\n  if (isJavaScriptURLString(url.href)) {\n    console.error(\n      'Next.js has blocked a javascript: URL as a security precaution.'\n    )\n    return state\n  }\n  const newState: AppRouterState = {\n    canonicalUrl:\n      url.origin === location.origin ? createHrefFromUrl(url) : url.href,\n    pushRef: {\n      pendingPush: navigateType === 'push',\n      mpaNavigation: true,\n      preserveCustomHistoryState: false,\n    },\n    // TODO: None of the rest of these values are consistent with the incoming\n    // navigation. We rely on the fact that AppRouter will suspend and trigger\n    // a hard navigation before it accesses any of these values. But instead\n    // we should trigger the hard navigation and blocking any subsequent\n    // router updates without updating React.\n    renderedSearch: state.renderedSearch,\n    focusAndScrollRef: state.focusAndScrollRef,\n    cache: state.cache,\n    tree: state.tree,\n    nextUrl: state.nextUrl,\n    previousNextUrl: state.previousNextUrl,\n    debugInfo: null,\n  }\n  return newState\n}\n\nexport function completeSoftNavigation(\n  oldState: AppRouterState,\n  url: URL,\n  referringNextUrl: string | null,\n  tree: FlightRouterState,\n  cache: CacheNode,\n  renderedSearch: string,\n  canonicalUrl: string,\n  navigateType: 'push' | 'replace',\n  scrollBehavior: ScrollBehavior,\n  scrollRef: ScrollRef | null,\n  collectedDebugInfo: Array<unknown> | null\n) {\n  // The \"Next-Url\" is a special representation of the URL that Next.js\n  // uses to implement interception routes.\n  // TODO: Get rid of this extra traversal by computing this during the\n  // same traversal that computes the tree itself. We should also figure out\n  // what is the minimum information needed for the server to correctly\n  // intercept the route.\n  const changedPath = computeChangedPath(oldState.tree, tree)\n  const nextUrlForNewRoute = changedPath ? changedPath : oldState.nextUrl\n\n  // This value is stored on the state as `previousNextUrl`; the naming is\n  // confusing. What it represents is the \"Next-Url\" header that was used to\n  // fetch the incoming route. It's essentially the refererer URL, but in a\n  // Next.js specific format. During refreshes, this is sent back to the server\n  // instead of the current route's \"Next-Url\" so that the same interception\n  // logic is applied as during the original navigation.\n  const previousNextUrl = referringNextUrl\n\n  // Check if the only thing that changed was the hash fragment.\n  const oldUrl = new URL(oldState.canonicalUrl, url)\n  const onlyHashChange =\n    // We don't need to compare the origins, because client-driven\n    // navigations are always same-origin.\n    url.pathname === oldUrl.pathname &&\n    url.search === oldUrl.search &&\n    url.hash !== oldUrl.hash\n\n  // Determine whether and how the page should scroll after this\n  // navigation.\n  //\n  // By default, we scroll to the segments that were navigated to — i.e.\n  // segments in the new part of the route, as opposed to shared segments\n  // that were already part of the previous route. All newly navigated\n  // segments share a single ScrollRef. When they mount, the first one\n  // to mount initiates the scroll. They share a ref so that only one\n  // scroll happens per navigation.\n  //\n  // If a subsequent navigation produces new segments, those supersede\n  // any pending scroll from the previous navigation by invalidating its\n  // ScrollRef. If a navigation doesn't produce any new segments (e.g.\n  // a refresh where the route structure didn't change), any pending\n  // scrolls from previous navigations are unaffected.\n  //\n  // The branches below handle special cases layered on top of this\n  // default model.\n  let activeScrollRef: ScrollRef | null\n  let forceScroll: boolean\n  if (scrollBehavior === ScrollBehavior.NoScroll) {\n    // The user explicitly opted out of scrolling (e.g. scroll={false}\n    // on a Link or router.push).\n    //\n    // If this navigation created new scroll targets (scrollRef !== null),\n    // neutralize them. If it didn't, any prior scroll targets carried\n    // forward on the cache nodes via reuseSharedCacheNode remain active.\n    if (scrollRef !== null) {\n      scrollRef.current = false\n    }\n    activeScrollRef = oldState.focusAndScrollRef.scrollRef\n    forceScroll = false\n  } else if (onlyHashChange) {\n    // Hash-only navigations should scroll regardless of per-node state.\n    // Create a fresh ref so the first segment to scroll consumes it.\n    //\n    // Invalidate any scroll ref from a prior navigation that hasn't\n    // been consumed yet.\n    const oldScrollRef = oldState.focusAndScrollRef.scrollRef\n    if (oldScrollRef !== null) {\n      oldScrollRef.current = false\n    }\n    // Also invalidate any per-node refs that were accumulated during\n    // this navigation's tree construction — the hash-only ref\n    // supersedes them.\n    if (scrollRef !== null) {\n      scrollRef.current = false\n    }\n    activeScrollRef = { current: true }\n    forceScroll = true\n  } else {\n    // Default case. Use the accumulated scrollRef (may be null if no\n    // new segments were created). The handler checks per-node refs, so\n    // unchanged parallel route slots won't scroll.\n    activeScrollRef = scrollRef\n\n    // If this navigation created new scroll targets, invalidate any\n    // pending scroll from a previous navigation.\n    if (scrollRef !== null) {\n      const oldScrollRef = oldState.focusAndScrollRef.scrollRef\n      if (oldScrollRef !== null) {\n        oldScrollRef.current = false\n      }\n    }\n    forceScroll = false\n  }\n\n  const newState: AppRouterState = {\n    canonicalUrl,\n    renderedSearch,\n    pushRef: {\n      pendingPush: navigateType === 'push',\n      mpaNavigation: false,\n      preserveCustomHistoryState: false,\n    },\n    focusAndScrollRef: {\n      scrollRef: activeScrollRef,\n      forceScroll,\n      onlyHashChange,\n      hashFragment:\n        // Remove leading # and decode hash to make non-latin hashes work.\n        //\n        // Empty hash should trigger default behavior of scrolling layout into\n        // view. #top is handled in layout-router.\n        //\n        // Refer to `ScrollAndFocusHandler` for details on how this is used.\n        scrollBehavior !== ScrollBehavior.NoScroll && url.hash !== ''\n          ? decodeURIComponent(url.hash.slice(1))\n          : oldState.focusAndScrollRef.hashFragment,\n    },\n    cache,\n    tree,\n    nextUrl: nextUrlForNewRoute,\n    previousNextUrl,\n    debugInfo: collectedDebugInfo,\n  }\n  return newState\n}\n\nexport function completeTraverseNavigation(\n  state: AppRouterState,\n  url: URL,\n  renderedSearch: string,\n  cache: CacheNode,\n  tree: FlightRouterState,\n  nextUrl: string | null\n) {\n  return {\n    // Set canonical url\n    canonicalUrl: createHrefFromUrl(url),\n    renderedSearch,\n    pushRef: {\n      pendingPush: false,\n      mpaNavigation: false,\n      // Ensures that the custom history state that was set is preserved when applying this update.\n      preserveCustomHistoryState: true,\n    },\n    focusAndScrollRef: state.focusAndScrollRef,\n    cache,\n    // Restore provided tree\n    tree,\n    nextUrl,\n    // TODO: We need to restore previousNextUrl, too, which represents the\n    // Next-Url that was used to fetch the data. Anywhere we fetch using the\n    // canonical URL, there should be a corresponding Next-Url.\n    previousNextUrl: null,\n    debugInfo: null,\n  }\n}\n\n// TODO: The rest of this file is related to converting the server response into\n// the data structures used by the client. Probably should move to a\n// separate module.\n\nexport type NavigationSeed = {\n  renderedSearch: string\n  routeTree: RouteTree\n  metadataVaryPath: PageVaryPath | null\n  data: CacheNodeSeedData | null\n  head: HeadData | null\n  dynamicStaleAt: number\n  // Whether the response rendered a segment whose identity differs from the\n  // base tree's at the same position (inactive parallel route branches are\n  // expected to differ and don't count). Only meaningful when the base is a\n  // request tree derived from a cached route entry, as during a prefetch:\n  // divergence then means the entry doesn't describe what the server renders\n  // — the URL has a rewrite that behaves dynamically (see\n  // fetchSegmentPrefetchesUsingDynamicRequest). During a navigation the base\n  // is the current page's tree, so divergence carries no signal. False when\n  // there was no base to compare against.\n  treeDivergedFromBase: boolean\n}\n\nexport function convertServerPatchToFullTree(\n  now: number,\n  currentTree: FlightRouterState,\n  flightData: Array<NormalizedFlightData> | null,\n  renderedSearch: string,\n  dynamicStaleTimeSeconds: number\n): NavigationSeed {\n  // During a client navigation or prefetch, the server sends back only a patch\n  // for the parts of the tree that have changed.\n  //\n  // This applies the patch to the base tree to create a full representation of\n  // the resulting tree.\n  //\n  // The return type includes a full FlightRouterState tree and a full\n  // CacheNodeSeedData tree. (Conceptually these are the same tree, and should\n  // eventually be unified, but there's still lots of existing code that\n  // operates on FlightRouterState trees alone without the CacheNodeSeedData.)\n  //\n  // TODO: This similar to what apply-router-state-patch-to-tree does. It\n  // will eventually fully replace it. We should get rid of all the remaining\n  // places where we iterate over the server patch format. This should also\n  // eventually replace normalizeFlightData.\n\n  let baseTree: FlightRouterState = currentTree\n  let baseData: CacheNodeSeedData | null = null\n  let head: HeadData | null = null\n  // Whether any patch rendered a segment whose identity differs from the base\n  // (request) tree at the same position. See NavigationSeed.treeDivergedFromBase.\n  // Compared against the original `currentTree`, not the progressively-merged\n  // `baseTree`, so each patch is checked against what was actually requested.\n  let treeDivergedFromBase = false\n  if (flightData !== null) {\n    for (const {\n      segmentPath,\n      tree: treePatch,\n      seedData: dataPatch,\n      head: headPatch,\n    } of flightData) {\n      if (!treeDivergedFromBase) {\n        treeDivergedFromBase = didServerPatchDivergeFromBase(\n          currentTree,\n          segmentPath,\n          treePatch\n        )\n      }\n      const result = convertServerPatchToFullTreeImpl(\n        baseTree,\n        baseData,\n        treePatch,\n        dataPatch,\n        segmentPath,\n        renderedSearch,\n        0\n      )\n      baseTree = result.tree\n      baseData = result.data\n      // This is the same for all patches per response, so just pick an\n      // arbitrary one\n      head = headPatch\n    }\n  }\n\n  const finalFlightRouterState = baseTree\n\n  // Convert the final FlightRouterState into a RouteTree type.\n  //\n  // TODO: Eventually, FlightRouterState will evolve to being a transport format\n  // only. The RouteTree type will become the main type used for dealing with\n  // routes on the client, and we'll store it in the state directly.\n  const acc = { metadataVaryPath: null, treeDivergedFromBase: false }\n  const routeTree = convertRootFlightRouterStateToRouteTree(\n    finalFlightRouterState,\n    renderedSearch as NormalizedSearch,\n    acc\n  )\n\n  return {\n    routeTree,\n    metadataVaryPath: acc.metadataVaryPath,\n    data: baseData,\n    renderedSearch,\n    head,\n    dynamicStaleAt: computeDynamicStaleAt(now, dynamicStaleTimeSeconds),\n    treeDivergedFromBase,\n  }\n}\n\n// Whether a server patch's rendered tree diverges in segment identity from the\n// base (request) tree it was applied to. Mirrors the comparison performed while\n// decoding a server response in newer versions of the client (see\n// NavigationSeed.treeDivergedFromBase). Divergence means the server rendered a\n// different route than the one we requested — e.g. a URL rewrite that behaves\n// dynamically — so a prefetch built from the base tree can never be fulfilled.\n//\n// The base-tree descent mirrors convertServerPatchToFullTreeImpl: segmentPath\n// is a repeating [parallelRouteKey, segment, ...] pattern; segmentPath[i] keys\n// into the children, segmentPath[i + 1] is the server's segment at that\n// position.\nfunction didServerPatchDivergeFromBase(\n  currentTree: FlightRouterState,\n  segmentPath: FlightSegmentPath,\n  treePatch: FlightRouterState\n): boolean {\n  let baseNode: FlightRouterState = currentTree\n  for (let i = 0; i + 1 < segmentPath.length; i += 2) {\n    const parallelRouteKey: string = segmentPath[i]\n    const serverSegment: Segment = segmentPath[i + 1]\n    const childBase: FlightRouterState | undefined =\n      baseNode[1][parallelRouteKey]\n    if (childBase === undefined) {\n      // The base tree doesn't have this branch. Unless the server merely\n      // filled it with a default, the trees have different structures.\n      return serverSegment !== DEFAULT_SEGMENT_KEY\n    }\n    if (segmentIdentityDivergesFromBase(serverSegment, childBase[0])) {\n      return true\n    }\n    baseNode = childBase\n  }\n  return detectTreeDivergenceFromBase(treePatch, baseNode)\n}\n\n// Recursively compares a server-rendered subtree against the base subtree at\n// the same position. Inactive parallel route branches — which carry a refresh\n// state in the base — are expected to differ and are skipped.\nfunction detectTreeDivergenceFromBase(\n  serverNode: FlightRouterState,\n  baseNode: FlightRouterState\n): boolean {\n  if (segmentIdentityDivergesFromBase(serverNode[0], baseNode[0])) {\n    return true\n  }\n  const serverChildren = serverNode[1]\n  const baseChildren = baseNode[1]\n  for (const parallelRouteKey in serverChildren) {\n    const childServer = serverChildren[parallelRouteKey]\n    const childBase = baseChildren[parallelRouteKey]\n    if (childBase === undefined) {\n      // A slot the base tree doesn't have. Unless the server merely filled it\n      // with a default, the trees have different structures.\n      if (childServer[0] !== DEFAULT_SEGMENT_KEY) {\n        return true\n      }\n    } else if ((childBase[2] ?? null) !== null) {\n      // The base branch carries a refresh state: an inactive parallel route\n      // reused from a different route (e.g. a \"default\" slot). The server's\n      // answer is expected to differ, so skip the branch.\n    } else if (detectTreeDivergenceFromBase(childServer, childBase)) {\n      return true\n    }\n  }\n  return false\n}\n\n// Whether two segments at the same position claim different identities. Page\n// segments match modulo embedded search params (validated separately, see\n// getRenderedSearch), and a default filled in by the server is not a claim\n// about the position's identity.\nfunction segmentIdentityDivergesFromBase(\n  serverSegment: Segment,\n  baseSegment: Segment\n): boolean {\n  if (\n    typeof serverSegment === 'string' &&\n    typeof baseSegment === 'string' &&\n    serverSegment.startsWith(PAGE_SEGMENT_KEY) &&\n    baseSegment.startsWith(PAGE_SEGMENT_KEY)\n  ) {\n    return false\n  }\n  if (serverSegment === DEFAULT_SEGMENT_KEY) {\n    return false\n  }\n  return !matchSegment(baseSegment, serverSegment)\n}\n\nfunction convertServerPatchToFullTreeImpl(\n  baseRouterState: FlightRouterState,\n  baseData: CacheNodeSeedData | null,\n  treePatch: FlightRouterState,\n  dataPatch: CacheNodeSeedData | null,\n  segmentPath: FlightSegmentPath,\n  renderedSearch: string,\n  index: number\n): { tree: FlightRouterState; data: CacheNodeSeedData | null } {\n  if (index === segmentPath.length) {\n    // We reached the part of the tree that we need to patch.\n    return {\n      tree: treePatch,\n      data: dataPatch,\n    }\n  }\n\n  // segmentPath represents the parent path of subtree. It's a repeating\n  // pattern of parallel route key and segment:\n  //\n  //   [string, Segment, string, Segment, string, Segment, ...]\n  //\n  // This path tells us which part of the base tree to apply the tree patch.\n  //\n  // NOTE: We receive the FlightRouterState patch in the same request as the\n  // seed data patch. Therefore we don't need to worry about diffing the segment\n  // values; we can assume the server sent us a correct result.\n  const updatedParallelRouteKey: string = segmentPath[index]\n  // const segment: Segment = segmentPath[index + 1] <-- Not used, see note above\n\n  const baseTreeChildren = baseRouterState[1]\n  const baseSeedDataChildren = baseData !== null ? baseData[1] : null\n  const newTreeChildren: Record<string, FlightRouterState> = {}\n  const newSeedDataChildren: Record<string, CacheNodeSeedData | null> = {}\n  for (const parallelRouteKey in baseTreeChildren) {\n    const childBaseRouterState = baseTreeChildren[parallelRouteKey]\n    const childBaseSeedData =\n      baseSeedDataChildren !== null\n        ? (baseSeedDataChildren[parallelRouteKey] ?? null)\n        : null\n    if (parallelRouteKey === updatedParallelRouteKey) {\n      const result = convertServerPatchToFullTreeImpl(\n        childBaseRouterState,\n        childBaseSeedData,\n        treePatch,\n        dataPatch,\n        segmentPath,\n        renderedSearch,\n        // Advance the index by two and keep cloning until we reach\n        // the end of the segment path.\n        index + 2\n      )\n\n      newTreeChildren[parallelRouteKey] = result.tree\n      newSeedDataChildren[parallelRouteKey] = result.data\n    } else {\n      // This child is not being patched. Copy it over as-is.\n      newTreeChildren[parallelRouteKey] = childBaseRouterState\n      newSeedDataChildren[parallelRouteKey] = childBaseSeedData\n    }\n  }\n\n  let clonedTree: FlightRouterState\n  let clonedSeedData: CacheNodeSeedData\n  // Clone all the fields except the children.\n\n  // Clone the FlightRouterState tree. Based on equivalent logic in\n  // apply-router-state-patch-to-tree, but should confirm whether we need to\n  // copy all of these fields. Not sure the server ever sends, e.g. the\n  // refetch marker.\n  clonedTree = [baseRouterState[0], newTreeChildren]\n  if (2 in baseRouterState) {\n    const compressedRefreshState = baseRouterState[2]\n    if (\n      compressedRefreshState !== undefined &&\n      compressedRefreshState !== null\n    ) {\n      // Since this part of the tree was patched with new data, any parent\n      // refresh states should be updated to reflect the new rendered search\n      // value. (The refresh state acts like a \"context provider\".) All pages\n      // within the same server response share the same renderedSearch value,\n      // but the same RouteTree could be composed from multiple different\n      // routes, and multiple responses.\n      clonedTree[2] = [compressedRefreshState[0], renderedSearch]\n    }\n  }\n  if (3 in baseRouterState) {\n    clonedTree[3] = baseRouterState[3]\n  }\n  // Recompute the propagated \"subtree\" prefetch hints for this segment. Mirrors\n  // the propagation done on the server in\n  // createFlightRouterStateFromLoaderTree.\n  let prefetchHints = (baseRouterState[4] ?? 0) & ~SubtreePrefetchHints\n  for (const parallelRouteKey in newTreeChildren) {\n    const childHints = newTreeChildren[parallelRouteKey][4]\n    if (childHints !== undefined) {\n      prefetchHints = propagateSubtreeBits(prefetchHints, childHints)\n    }\n  }\n  if (prefetchHints !== 0) {\n    clonedTree[4] = prefetchHints\n  }\n\n  // Clone the CacheNodeSeedData tree.\n  const isEmptySeedDataPartial = true\n  clonedSeedData = [\n    null,\n    newSeedDataChildren,\n    null,\n    isEmptySeedDataPartial,\n    null,\n  ]\n\n  return {\n    tree: clonedTree,\n    data: clonedSeedData,\n  }\n}\n\n/**\n * Instant Navigation Testing API: ensures a prefetch task has been initiated\n * and completed before proceeding with the navigation. This guarantees that\n * segment data requests are at least pending, even for routes whose route\n * tree is already cached.\n *\n * After the prefetch completes, delegates to the normal navigation flow.\n */\nasync function ensurePrefetchThenNavigate(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  navigationLock: NavigationLock | null\n): Promise<AppRouterState> {\n  const link = getLinkForCurrentNavigation()\n  const fetchStrategy = link !== null ? link.fetchStrategy : FetchStrategy.PPR\n\n  const cacheKey = createCacheKey(url.href, nextUrl)\n\n  // Create this navigation's \"wait for prefetch to fulfill\" state and schedule\n  // the prefetch as a locked-navigation prefetch. The prefetch's promise\n  // resolves when the task completes — after every segment response the task\n  // cares about has settled — so the navigation below reads present data\n  // rather than a still-in-flight entry.\n  const { beginNavigationLockPrefetch } =\n    require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n  const navigationLockPrefetch = beginNavigationLockPrefetch()\n  const prefetchTask = schedulePrefetchTask(\n    cacheKey,\n    currentFlightRouterState,\n    fetchStrategy,\n    PrefetchPriority.Default,\n    null, // onInvalidate\n    navigationLockPrefetch\n  )\n  if (navigationLockPrefetch !== null) {\n    await navigationLockPrefetch.promise\n  }\n\n  // Prefetch is complete. Proceed with the normal navigation flow, which\n  // will now find the route in the cache. The navigation inherits the map of\n  // the prefetch task that drives it: the task was scheduled inside the lock\n  // scope, so this is the scope's private map, and the navigation reads only\n  // data fetched under the lock.\n  const result = await navigateImpl(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    nextUrl,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType,\n    navigationLock,\n    prefetchTask.segmentCacheMap\n  )\n\n  // Only transition to captured-SPA once the navigation is known to be an SPA.\n  // If the result is an MPA navigation, leave the cookie pending and let the new\n  // document load transition it to captured-MPA.\n  if (!result.pushRef.mpaNavigation) {\n    const { updateCapturedSPAToTree } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    updateCapturedSPAToTree(currentFlightRouterState, result.tree)\n  }\n\n  return result\n}\n","/**\n * Optimistic Routing (Known Routes)\n *\n * This module enables the client to predict route structure for URLs that\n * haven't been prefetched yet, based on previously learned route patterns.\n * When successful, this allows skipping the route tree prefetch request\n * entirely.\n *\n * The core idea is that many URLs map to the same route structure. For example,\n * /blog/post-1 and /blog/post-2 both resolve to /blog/[slug]. Once we've\n * prefetched one, we can predict the structure of the other.\n *\n * However, we can't always make this prediction. Static siblings (like\n * /blog/featured alongside /blog/[slug]) have different route structures.\n * When we learn a dynamic route, we also learn its static siblings so we\n * know when NOT to apply the prediction.\n *\n * Main entry points:\n *\n * 1. discoverKnownRoute: Called after receiving a route tree from the server.\n *    Traverses the route tree, compares URL parts to segments, and populates\n *    the known route tree if they match. Routes are always inserted into the\n *    cache.\n *\n * 2. matchKnownRoute: Called when looking up a route with no cache entry.\n *    Matches the candidate URL against learned patterns. Returns a synthetic\n *    cache entry if successful, or null to fall back to server resolution.\n *\n * Rewrite detection happens during traversal: if a URL path part doesn't match\n * the corresponding route segment, we stop populating the known route tree\n * (since the mapping is incorrect) but still insert the route into the cache.\n *\n * The known route tree is append-only with no eviction. Route patterns are\n * derived from the filesystem, so they don't become stale within a session.\n * Cache invalidation on deploy clears everything anyway.\n *\n * Current limitations (deopt to server resolution):\n * - Rewrites: Detected during traversal (tree not populated, but route cached)\n * - Intercepted routes: The route tree varies by referrer (Next-Url header),\n *   so we can't predict the correct structure from the URL alone. Patterns are\n *   still stored during discovery (so the trie stays populated for non-\n *   intercepted siblings), but matching bails out when the pattern is marked\n *   as interceptable.\n */\n\nimport type { DynamicParamTypesShort } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport type { RouteTree, FulfilledRouteCacheEntry } from './cache'\nimport {\n  EntryStatus,\n  writeRouteIntoCache,\n  fulfillRouteCacheEntry,\n  getCurrentRouteCacheVersion,\n  type PendingRouteCacheEntry,\n  createMetadataRouteTree,\n} from './cache'\nimport { isValueExpired } from './cache-map'\nimport {\n  canonicalizeURLPart,\n  doesStaticSegmentAppearInURL,\n} from '../../route-params'\nimport type { NormalizedPathname, NormalizedSearch } from './cache-key'\nimport { splitPathnameIntoParts } from './cache-key'\nimport {\n  appendLayoutVaryPath,\n  finalizeLayoutVaryPath,\n  finalizePageVaryPath,\n  finalizeMetadataVaryPath,\n  getShellSegmentVaryPath,\n  type PartialSegmentVaryPath,\n  type PageVaryPath,\n} from './vary-path'\n\n/**\n * The known route tree is analogous to a route table. A different routing\n * implementation might use regexes or URLPattern; ours uses a trie indexed\n * by URL path segments.\n *\n * Each node (KnownRoutePart) represents a position in the URL and can have:\n * - staticChildren: Map of literal segments to child nodes\n * - dynamicChild: A single dynamic segment node ([slug], [...params], etc.)\n * - pattern: A cache entry template for routes that terminate here\n *\n * This tree only contains segments that correspond to actual filesystem routes.\n * Route groups like (marketing) and parallel routes like @modal are not\n * included since they don't appear in URLs. Similarly, if a URL is rewritten\n * to a different filesystem path, the original URL segments don't appear here\n * — only the resolved filesystem route structure is stored.\n *\n * Example tree after learning /blog/[slug], /blog/featured, and /about:\n *\n *   ├── about\n *   └── blog\n *       ├── featured\n *       └── [slug]\n *\n * When matching /blog/hello:\n *   1. \"blog\" matches static child\n *   2. \"hello\" doesn't match \"featured\", falls through to [slug]\n *   3. Returns [slug]'s pattern with resolved param { slug: \"hello\" }\n */\ntype KnownRoutePartBase = {\n  // Known static paths at this level. The null vs Map distinction is\n  // semantically meaningful:\n  // - null: Static siblings are UNKNOWN at this level (e.g., webpack dev mode\n  //   where routes are compiled on-demand). If there's a dynamicChild, we\n  //   can't safely match it because the URL might be an unknown static sibling.\n  // - Map (even if empty): Static siblings are KNOWN. We can safely match a\n  //   dynamicChild if the URL doesn't match any entry in the Map.\n  staticChildren: Map<string, KnownRoutePart> | null\n\n  // The cache entry that serves as a pattern for this route.\n  // When a URL matches, we clone this and substitute param values.\n  // null means we know this path exists (from static siblings) but haven't\n  // learned its structure yet.\n  pattern: FulfilledRouteCacheEntry | null\n\n  // True when parallel route branches disagree about the dynamic segment at\n  // this level — different param name or type, e.g. an @modal/[...catchAll]\n  // slot alongside [username]. The trie can only model one dynamic child per\n  // level, so prediction below this level would bind one branch's URL parts\n  // to another branch's params. Once set, discovery stops storing patterns\n  // beneath this level and matching bails out to server resolution.\n  //\n  // TODO: Consider including conflicting sibling dynamic params in the route\n  // tree, like we do for static siblings, and attempting to match both.\n  hasConflictingDynamicChildren: boolean\n\n  // TODO: For prefix rewrite support. When true, this part may not appear in\n  // the candidate URL because it was injected by a rewrite. Today, discovery\n  // refuses to store a pattern for such routes (see the cache key comparison\n  // in discoverKnownRoutePart); this field would let them be predicted.\n  // mayBeSkippedInURL: boolean\n}\n\n// The dynamic child fields are structured as a union so that narrowing on\n// dynamicChild also narrows dynamicChildParamName and dynamicChildParamType.\ntype KnownRoutePartWithoutDynamicChild = KnownRoutePartBase & {\n  dynamicChild: null\n  dynamicChildParamName: null\n  dynamicChildParamType: null\n}\n\ntype KnownRoutePartWithDynamicChild = KnownRoutePartBase & {\n  dynamicChild: KnownRoutePart\n  dynamicChildParamName: string\n  dynamicChildParamType: DynamicParamTypesShort\n}\n\ntype KnownRoutePart =\n  | KnownRoutePartWithoutDynamicChild\n  | KnownRoutePartWithDynamicChild\n\n/**\n * Param values extracted during URL matching. Used to reify the template.\n * Values are always strings: catch-all [...param] and optional catch-all\n * [[...param]] values are joined with '/' at the time they're resolved, which\n * matches how the rest of the system models catch-all cache keys (an empty\n * optional catch-all is the empty string). Keeping a single value type keeps\n * reads of this map monomorphic.\n */\ntype ResolvedParams = Map<string, string>\n\n/**\n * Read the pattern from a KnownRoutePart, evicting it if expired.\n *\n * This prevents stale patterns (e.g. from InliningHintsStale route entries\n * with staleAt = -1) from being cloned into synthetic entries indefinitely.\n * Once evicted, the pattern slot can be repopulated by the next\n * discoverKnownRoute call with a fresh entry from a /_tree response.\n */\nfunction readPattern(\n  now: number,\n  part: KnownRoutePart\n): FulfilledRouteCacheEntry | null {\n  const pattern = part.pattern\n  if (pattern === null) {\n    return null\n  }\n  if (isValueExpired(now, getCurrentRouteCacheVersion(), pattern)) {\n    // The pattern is expired. Null it out so the slot can be repopulated.\n    part.pattern = null\n    return null\n  }\n  return pattern\n}\n\nfunction createEmptyPart(): KnownRoutePart {\n  return {\n    staticChildren: null,\n    dynamicChild: null,\n    dynamicChildParamName: null,\n    dynamicChildParamType: null,\n    pattern: null,\n    hasConflictingDynamicChildren: false,\n  }\n}\n\n// The root of the known route tree.\nlet knownRouteTreeRoot: KnownRoutePart = createEmptyPart()\n\n/**\n * Learns a route pattern from a server response and inserts it into the cache.\n *\n * Called after receiving a route tree from the server (initial load, navigation,\n * or prefetch). Traverses the route tree, compares URL parts to segments, and\n * populates the known route tree if they match. Routes are always inserted into\n * the cache regardless of whether the URL matches the route structure.\n *\n * When pendingEntry is provided, it's fulfilled and used. When null, an entry\n * is created and inserted into the route cache map.\n *\n * When hasDynamicRewrite is true, the route entry is marked as having a\n * dynamic rewrite, which prevents it from being used as a template for future\n * predictions. This is set when we detect a mismatch between what we predicted\n * and what the server returned.\n *\n * Returns the fulfilled route cache entry.\n */\nexport function discoverKnownRoute(\n  now: number,\n  pathname: string,\n  search: NormalizedSearch,\n  nextUrl: string | null,\n  pendingEntry: PendingRouteCacheEntry | null,\n  routeTree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean,\n  hasDynamicRewrite: boolean\n): FulfilledRouteCacheEntry {\n  const tree = routeTree\n\n  const pathnameParts = splitPathnameIntoParts(pathname)\n\n  if (pendingEntry !== null) {\n    // Fulfill the pending entry first\n    const fulfilledEntry = fulfillRouteCacheEntry(\n      now,\n      pendingEntry,\n      tree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n    if (hasDynamicRewrite) {\n      fulfilledEntry.hasDynamicRewrite = true\n    }\n    // Populate the known route tree (handles rewrite detection internally).\n    // The entry is already in the cache; this just stores it as a pattern\n    // if the URL matches the route structure.\n    discoverKnownRoutePart(\n      knownRouteTreeRoot,\n      tree,\n      pathnameParts,\n      0,\n      fulfilledEntry,\n      now,\n      pathname,\n      search,\n      nextUrl,\n      tree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching,\n      hasDynamicRewrite\n    )\n    return fulfilledEntry\n  }\n\n  // No pending entry - discoverKnownRoutePart will create one and insert it\n  // into the cache, or return an existing pattern if one exists.\n  return discoverKnownRoutePart(\n    knownRouteTreeRoot,\n    tree,\n    pathnameParts,\n    0,\n    null,\n    now,\n    pathname,\n    search,\n    nextUrl,\n    tree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    supportsPerSegmentPrefetching,\n    hasDynamicRewrite\n  )\n}\n\n/**\n * Bail out of populating the known route tree when discovery detects that the\n * URL doesn't match the route structure (a rewrite). The route entry is still\n * inserted into the cache for direct lookup — we just don't store it as a\n * pattern, since the URL and the tree describe different shapes.\n */\nfunction handleMismatchDueToRewrite(\n  existingEntry: FulfilledRouteCacheEntry | null,\n  now: number,\n  pathname: string,\n  search: NormalizedSearch,\n  nextUrl: string | null,\n  fullTree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean\n): FulfilledRouteCacheEntry {\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  return writeRouteIntoCache(\n    now,\n    pathname as NormalizedPathname,\n    search,\n    nextUrl,\n    fullTree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    supportsPerSegmentPrefetching\n  )\n}\n\n/**\n * Gets or creates the dynamic child node for a KnownRoutePart. A node can\n * have at most one dynamic child. Sibling filesystem routes can't declare two\n * different params at the same level, but parallel route branches can (e.g.\n * @modal/[...catchAll] alongside [username]) — the caller detects that case\n * and marks the level as conflicted instead of calling this.\n */\nfunction discoverDynamicChild(\n  part: KnownRoutePart,\n  paramName: string,\n  paramType: DynamicParamTypesShort\n): KnownRoutePart {\n  if (part.dynamicChild !== null) {\n    return part.dynamicChild\n  }\n  const newChild = createEmptyPart()\n  // Type assertion needed because we're converting from \"without\" to \"with\"\n  // dynamic child variant.\n  const mutablePart = part as unknown as KnownRoutePartWithDynamicChild\n  mutablePart.dynamicChild = newChild\n  mutablePart.dynamicChildParamName = paramName\n  mutablePart.dynamicChildParamType = paramType\n  return newChild\n}\n\n/**\n * Recursive workhorse for discoverKnownRoute.\n *\n * Walks the route tree and URL parts in parallel, building out the known\n * route tree as it goes. At each step:\n * 1. Determines if the current segment appears in the URL (dynamic/static)\n * 2. Validates URL matches route structure (detects rewrites)\n * 3. Creates/updates the corresponding KnownRoutePart node\n * 4. Records static siblings for future matching\n * 5. Recurses into child slots (parallel routes)\n *\n * If a URL/route mismatch is detected (rewrite), we stop building the known\n * route tree but still cache the route entry for direct lookup.\n */\nfunction discoverKnownRoutePart(\n  parentKnownRoutePart: KnownRoutePart,\n  routeTree: RouteTree,\n  pathnameParts: readonly string[],\n  partIndex: number,\n  existingEntry: FulfilledRouteCacheEntry | null,\n  // These are passed through unchanged for entry creation at the leaf\n  now: number,\n  pathname: string,\n  search: NormalizedSearch,\n  nextUrl: string | null,\n  fullTree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean,\n  hasDynamicRewrite: boolean\n): FulfilledRouteCacheEntry {\n  const segment = routeTree.segment\n  const urlPart =\n    partIndex < pathnameParts.length ? pathnameParts[partIndex] : null\n\n  let knownRoutePart: KnownRoutePart = parentKnownRoutePart\n  let nextPartIndex = partIndex\n\n  if (typeof segment === 'string') {\n    if (doesStaticSegmentAppearInURL(segment)) {\n      // A visible static segment must consume exactly one URL part that\n      // equals the segment. If the URL is exhausted or the URL part doesn't\n      // match, the URL doesn't fit the route shape — the response was\n      // rewrite-affected. Bail out.\n      if (urlPart === null || urlPart !== segment) {\n        return handleMismatchDueToRewrite(\n          existingEntry,\n          now,\n          pathname,\n          search,\n          nextUrl,\n          fullTree,\n          metadataVaryPath,\n          couldBeIntercepted,\n          canonicalUrl,\n          supportsPerSegmentPrefetching\n        )\n      }\n\n      if (parentKnownRoutePart.staticChildren === null) {\n        parentKnownRoutePart.staticChildren = new Map()\n      }\n      let existingChild = parentKnownRoutePart.staticChildren.get(urlPart)\n      if (existingChild === undefined) {\n        existingChild = createEmptyPart()\n        parentKnownRoutePart.staticChildren.set(urlPart, existingChild)\n      }\n      knownRoutePart = existingChild\n\n      // Advance to next URL part.\n      nextPartIndex = partIndex + 1\n    }\n    // else: Transparent segment (route group, __PAGE__, etc.)\n    // Stay at the same known route part, don't advance URL parts\n  } else {\n    // Dynamic segment tuple: [paramName, paramCacheKey, paramType, staticSiblings]\n    const paramName: string = segment[0]\n    const paramCacheKey: string = segment[1]\n    const paramType: DynamicParamTypesShort = segment[2]\n    const staticSiblings: readonly string[] | null = segment[3]\n\n    if (paramType !== 'oc' && urlPart === null) {\n      // Every dynamic segment except the optional catch-all (`[[...param]]`)\n      // must consume at least one URL part at runtime. If discovery reached\n      // this segment with no URL parts left to consume, the URL doesn't fit\n      // the route shape — the response was rewrite-affected. Bail out.\n      return handleMismatchDueToRewrite(\n        existingEntry,\n        now,\n        pathname,\n        search,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching\n      )\n    }\n\n    if (\n      staticSiblings !== null &&\n      urlPart !== null &&\n      staticSiblings.includes(urlPart)\n    ) {\n      // The route tree says this is a dynamic sibling, but the canonical URL\n      // is a known static sibling. This is a mismatch.\n      return handleMismatchDueToRewrite(\n        existingEntry,\n        now,\n        pathname,\n        search,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching\n      )\n    }\n\n    // The param's cache key holds the value parsed from the *rendered*\n    // pathname. If the URL part(s) this segment would consume don't equal\n    // that value, the response was rewrite-affected in a way that shifts\n    // which URL part maps to which segment (e.g. a proxy injected a leading\n    // locale segment). A static segment catches this above by failing to\n    // match its URL part; a dynamic segment consumes whatever part is in\n    // front of it, so compare against the rendered value instead. Bail out.\n    switch (paramType) {\n      case 'd': {\n        // Canonicalize the URL part to the same encoded form the server used\n        // for the cache key.\n        if (\n          urlPart !== null &&\n          canonicalizeURLPart(urlPart) !== paramCacheKey\n        ) {\n          return handleMismatchDueToRewrite(\n            existingEntry,\n            now,\n            pathname,\n            search,\n            nextUrl,\n            fullTree,\n            metadataVaryPath,\n            couldBeIntercepted,\n            canonicalUrl,\n            supportsPerSegmentPrefetching\n          )\n        }\n        break\n      }\n      case 'c':\n      case 'oc': {\n        // Catch-alls consume every remaining URL part; their cache keys are\n        // the rendered parts joined with '/' (empty string for an empty\n        // optional catch-all). Comparing the joined remainder also catches a\n        // rewrite that appended segments the URL doesn't have.\n        const joinedRemainingParts = pathnameParts\n          .slice(partIndex)\n          .map(canonicalizeURLPart)\n          .join('/')\n        if (joinedRemainingParts !== paramCacheKey) {\n          return handleMismatchDueToRewrite(\n            existingEntry,\n            now,\n            pathname,\n            search,\n            nextUrl,\n            fullTree,\n            metadataVaryPath,\n            couldBeIntercepted,\n            canonicalUrl,\n            supportsPerSegmentPrefetching\n          )\n        }\n        break\n      }\n      case 'ci(..)(..)':\n      case 'ci(.)':\n      case 'ci(..)':\n      case 'ci(...)':\n      case 'di(..)(..)':\n      case 'di(.)':\n      case 'di(..)':\n      case 'di(...)':\n        // Interception params embed relative markers in their values, and\n        // patterns containing them are never used for prediction anyway (see\n        // matchKnownRoutePart), so skip the comparison.\n        break\n      default:\n        paramType satisfies never\n    }\n\n    if (\n      parentKnownRoutePart.hasConflictingDynamicChildren ||\n      (parentKnownRoutePart.dynamicChild !== null &&\n        (parentKnownRoutePart.dynamicChildParamName !== paramName ||\n          parentKnownRoutePart.dynamicChildParamType !== paramType))\n    ) {\n      // A different parallel route branch already claimed the dynamic child\n      // at this level with a different param. Mark the level as conflicted\n      // so matching bails out, and don't store a pattern via this branch.\n      parentKnownRoutePart.hasConflictingDynamicChildren = true\n      return handleMismatchDueToRewrite(\n        existingEntry,\n        now,\n        pathname,\n        search,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching\n      )\n    }\n\n    // URL matches route structure. Build the known route tree.\n    knownRoutePart = discoverDynamicChild(\n      parentKnownRoutePart,\n      paramName,\n      paramType\n    )\n\n    // Record static siblings as placeholder parts.\n    // IMPORTANT: We use the null vs Map distinction to track whether\n    // siblings are known at this level:\n    // - staticChildren: null = siblings unknown (can't safely match dynamic)\n    // - staticChildren: Map = siblings known (even if empty)\n    // This matters in dev mode where webpack may not know all siblings yet.\n    if (staticSiblings !== null) {\n      // Siblings are known - ensure we have a Map (even if empty)\n      if (parentKnownRoutePart.staticChildren === null) {\n        parentKnownRoutePart.staticChildren = new Map()\n      }\n      for (const sibling of staticSiblings) {\n        if (!parentKnownRoutePart.staticChildren.has(sibling)) {\n          parentKnownRoutePart.staticChildren.set(sibling, createEmptyPart())\n        }\n      }\n    }\n\n    // Advance to next URL part. Catch-all segments (`[...param]` and\n    // `[[...param]]`) absorb every remaining URL part at runtime (see\n    // `matchKnownRoutePart`, which slices the rest of `pathnameParts`).\n    if (paramType === 'c' || paramType === 'oc') {\n      nextPartIndex = pathnameParts.length\n    } else {\n      nextPartIndex = partIndex + 1\n    }\n  }\n\n  // Recurse into child routes. A route tree can have multiple parallel routes\n  // (e.g., @modal alongside children). Each parallel route is a separate\n  // branch, but they all share the same URL - we just need to traverse all\n  // branches to build out the known route tree.\n  const slots = routeTree.slots\n  let resultFromChildren: FulfilledRouteCacheEntry | null = null\n  if (slots !== null) {\n    for (const childRouteTree of slots.values()) {\n      // Skip branches with refreshState set - these were reused from a\n      // different route (e.g., a \"default\" parallel slot) and don't represent\n      // the actual route structure for this URL.\n      if (childRouteTree.refreshState !== null) {\n        continue\n      }\n      const result = discoverKnownRoutePart(\n        knownRoutePart,\n        childRouteTree,\n        pathnameParts,\n        nextPartIndex,\n        existingEntry,\n        now,\n        pathname,\n        search,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching,\n        hasDynamicRewrite\n      )\n      // All parallel route branches share the same URL, so they should all\n      // reach compatible leaf nodes. We capture any result.\n      resultFromChildren = result\n    }\n    if (resultFromChildren !== null) {\n      return resultFromChildren\n    }\n    // Defensive fallback: no children returned a result. This shouldn't happen\n    // for valid route trees, but handle it gracefully.\n    return handleMismatchDueToRewrite(\n      existingEntry,\n      now,\n      pathname,\n      search,\n      nextUrl,\n      fullTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n  }\n\n  // Reached a page node (`__PAGE__` leaf). If there are still URL parts\n  // left to consume, the route tree is shorter than the URL, which means\n  // the URL doesn't match the route structure (likely a rewrite).\n  if (nextPartIndex < pathnameParts.length) {\n    return handleMismatchDueToRewrite(\n      existingEntry,\n      now,\n      pathname,\n      search,\n      nextUrl,\n      fullTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n  }\n\n  // Reached a page node. Create/get the route cache entry and store as a\n  // pattern. First, check if there's already a pattern for this route.\n  const existingPattern = readPattern(now, knownRoutePart)\n  if (existingPattern !== null) {\n    // If this route has a dynamic rewrite, mark the existing pattern.\n    if (hasDynamicRewrite) {\n      existingPattern.hasDynamicRewrite = true\n    }\n    return existingPattern\n  }\n\n  // Get or create the entry\n  let entry: FulfilledRouteCacheEntry\n  if (existingEntry !== null) {\n    // Already have a fulfilled entry, use it directly. It's already in the\n    // route cache map.\n    entry = existingEntry\n  } else {\n    // Create the entry and insert it into the route cache map.\n    entry = writeRouteIntoCache(\n      now,\n      pathname as NormalizedPathname,\n      search,\n      nextUrl,\n      fullTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n  }\n\n  if (hasDynamicRewrite) {\n    entry.hasDynamicRewrite = true\n  }\n\n  // Store as pattern\n  knownRoutePart.pattern = entry\n  return entry\n}\n\n/**\n * Attempts to match a URL against learned route patterns.\n *\n * Returns a synthetic FulfilledRouteCacheEntry if the URL matches a known\n * pattern, or null if no match is found (fall back to server resolution).\n */\nexport function matchKnownRoute(\n  now: number,\n  pathname: string,\n  search: NormalizedSearch\n): FulfilledRouteCacheEntry | null {\n  const pathnameParts = splitPathnameIntoParts(pathname)\n  const resolvedParams: ResolvedParams = new Map()\n  const match = matchKnownRoutePart(\n    now,\n    knownRouteTreeRoot,\n    pathnameParts,\n    0,\n    resolvedParams\n  )\n\n  if (match === null) {\n    return null\n  }\n\n  const matchedPart = match.part\n  const pattern = match.pattern\n\n  // If the pattern could be intercepted, we can't safely use it for prediction.\n  // Interception routes resolve to different route trees depending on the\n  // referrer (the Next-Url header), which means the same URL can map to\n  // different page components depending on where the navigation originated.\n  // Since the known route tree only stores a single pattern per URL shape, we\n  // can't distinguish between the intercepted and non-intercepted cases, so we\n  // bail out to server resolution.\n  //\n  // TODO: We could store interception behavior in the known route tree itself\n  // (e.g., which segments use interception markers and what they resolve to).\n  // With enough information embedded in the trie, we could match interception\n  // routes entirely on the client without a server round-trip.\n  if (pattern.couldBeIntercepted) {\n    return null\n  }\n\n  // \"Reify\" the pattern: clone the template tree with concrete param values.\n  // This substitutes resolved params (e.g., slug: \"hello\") into dynamic\n  // segments and recomputes vary paths for correct segment cache keying.\n  const acc: ReifyAccumulator = { metadataVaryPath: null }\n  const reifiedTree = reifyRouteTree(\n    pattern.tree,\n    resolvedParams,\n    search,\n    null, // Start with null partial vary path at the root\n    acc\n  )\n\n  // The metadata tree is a flat page node without the intermediate layout\n  // structure. Clone it with the updated metadata vary path collected during\n  // the main tree traversal.\n  const metadataVaryPath = acc.metadataVaryPath\n  if (metadataVaryPath === null) {\n    // This shouldn't be reachable for a valid route tree.\n    return null\n  }\n  const reifiedMetadata = createMetadataRouteTree(metadataVaryPath)\n\n  // Create a synthetic (predicted) entry and store it as the new pattern.\n  //\n  // Why replace the pattern? We intentionally update the pattern with this\n  // synthetic entry so that if our prediction was wrong (server returns a\n  // different pathname due to dynamic rewrite), the entry gets marked with\n  // hasDynamicRewrite. Future predictions for this route will see the flag\n  // and bail out to server resolution instead of making the same mistake.\n  const syntheticEntry: FulfilledRouteCacheEntry = {\n    canonicalUrl: pathname + search,\n    status: EntryStatus.Fulfilled,\n    blockedTasks: null,\n    tree: reifiedTree,\n    metadata: reifiedMetadata,\n    couldBeIntercepted: pattern.couldBeIntercepted,\n    supportsPerSegmentPrefetching: pattern.supportsPerSegmentPrefetching,\n    hasDynamicRewrite: false,\n    renderedSearch: search,\n    ref: null,\n    size: pattern.size,\n    staleAt: pattern.staleAt,\n    version: pattern.version,\n  }\n\n  matchedPart.pattern = syntheticEntry\n\n  return syntheticEntry\n}\n\n/**\n * Result of a successful match: the matched tree node and its pattern.\n * We return both because the caller needs to update the pattern after\n * creating a synthetic entry (for dynamic rewrite detection).\n */\ntype KnownRouteMatch = {\n  part: KnownRoutePart\n  pattern: FulfilledRouteCacheEntry\n} | null\n\n/**\n * Recursively matches a URL against the known route tree.\n *\n * Matching priority (most specific first):\n * 1. Static children - exact path segment match\n * 2. Dynamic child - [param], [...param], [[...param]]\n * 3. Direct pattern - when no more URL parts remain\n *\n * Collects resolved param values in resolvedParams as it traverses.\n * Returns null if no match found (caller should fall back to server).\n */\nfunction matchKnownRoutePart(\n  now: number,\n  part: KnownRoutePart,\n  pathnameParts: string[],\n  partIndex: number,\n  resolvedParams: ResolvedParams\n): KnownRouteMatch {\n  const urlPart =\n    partIndex < pathnameParts.length ? pathnameParts[partIndex] : null\n\n  // If staticChildren is null, we don't know what static routes exist at this\n  // level. This happens in webpack dev mode where routes are compiled\n  // on-demand. We can't safely match a dynamicChild because the URL part might\n  // be a static sibling we haven't discovered yet. Example: We know\n  // /blog/[slug] exists, but haven't compiled /blog/featured. A request for\n  // /blog/featured would incorrectly match /blog/[slug].\n  if (part.staticChildren === null) {\n    // The only safe match is a direct pattern when no URL parts remain.\n    if (urlPart === null) {\n      const pattern = readPattern(now, part)\n      if (pattern !== null && !pattern.hasDynamicRewrite) {\n        return { part, pattern }\n      }\n    }\n    return null\n  }\n\n  // Static children take priority over dynamic. This ensures /blog/featured\n  // matches its own route rather than /blog/[slug].\n  if (urlPart !== null) {\n    const staticChild = part.staticChildren.get(urlPart)\n    if (staticChild !== undefined) {\n      // Check if this is an \"unknown\" placeholder part. These are created when\n      // we learn about static siblings (from the route tree's staticSiblings\n      // field) but haven't prefetched them yet. We know the path exists but\n      // don't know its structure, so we can't predict it.\n      if (\n        staticChild.pattern === null &&\n        staticChild.dynamicChild === null &&\n        staticChild.staticChildren === null\n      ) {\n        // Bail out - server must resolve this route.\n        return null\n      }\n      const match = matchKnownRoutePart(\n        now,\n        staticChild,\n        pathnameParts,\n        partIndex + 1,\n        resolvedParams\n      )\n      if (match !== null) {\n        return match\n      }\n      // Static child is a real node (not a placeholder) but its subtree\n      // didn't match the remaining URL parts. This means the route exists\n      // in the static subtree but hasn't been fully discovered yet. Do not\n      // fall through to try the dynamic child — the static match is\n      // authoritative. Bail out to server resolution.\n      return null\n    }\n  }\n\n  // Try dynamic child. Skip it entirely if parallel route branches disagree\n  // about the dynamic segment at this level — any pattern stored beneath it\n  // was learned under a conflicting model.\n  if (part.dynamicChild !== null && !part.hasConflictingDynamicChildren) {\n    const dynamicPart = part.dynamicChild\n    const paramName = part.dynamicChildParamName\n    const paramType = part.dynamicChildParamType\n    const dynamicPattern = readPattern(now, dynamicPart)\n\n    switch (paramType) {\n      case 'c':\n        // Required catch-all [...param]: consumes 1+ URL parts\n        if (\n          dynamicPattern !== null &&\n          !dynamicPattern.hasDynamicRewrite &&\n          urlPart !== null\n        ) {\n          resolvedParams.set(\n            paramName,\n            pathnameParts.slice(partIndex).join('/')\n          )\n          return { part: dynamicPart, pattern: dynamicPattern }\n        }\n        break\n      case 'oc': {\n        // Optional catch-all [[...param]]: consumes 0+ URL parts\n        if (dynamicPattern !== null && !dynamicPattern.hasDynamicRewrite) {\n          if (urlPart !== null) {\n            resolvedParams.set(\n              paramName,\n              pathnameParts.slice(partIndex).join('/')\n            )\n            return { part: dynamicPart, pattern: dynamicPattern }\n          }\n          // urlPart is null - can match with zero parts, but a direct pattern\n          // (e.g., page.tsx alongside [[...param]]) takes precedence.\n          const directPattern = readPattern(now, part)\n          if (directPattern === null || directPattern.hasDynamicRewrite) {\n            resolvedParams.set(paramName, '')\n            return { part: dynamicPart, pattern: dynamicPattern }\n          }\n        }\n        break\n      }\n      case 'd':\n        // Regular dynamic [param]: consumes exactly 1 URL part.\n        // Unlike catch-all which terminates here, regular dynamic must\n        // continue recursing to find the leaf pattern.\n        if (urlPart !== null) {\n          resolvedParams.set(paramName, urlPart)\n          return matchKnownRoutePart(\n            now,\n            dynamicPart,\n            pathnameParts,\n            partIndex + 1,\n            resolvedParams\n          )\n        }\n        break\n      // Intercepted routes use relative path markers like (.), (..), (...)\n      // Their behavior depends on navigation context (soft vs hard nav),\n      // so we can't predict them client-side. Defer to server.\n      case 'ci(..)(..)':\n      case 'ci(.)':\n      case 'ci(..)':\n      case 'ci(...)':\n      case 'di(..)(..)':\n      case 'di(.)':\n      case 'di(..)':\n      case 'di(...)':\n        return null\n      default:\n        paramType satisfies never\n    }\n  }\n\n  // No children matched. If we've consumed all URL parts, check for a direct\n  // pattern at this node (the route terminates here).\n  if (urlPart === null) {\n    const pattern = readPattern(now, part)\n    if (pattern !== null && !pattern.hasDynamicRewrite) {\n      return { part, pattern }\n    }\n  }\n\n  return null\n}\n\n/**\n * Accumulator for collecting data during reifyRouteTree traversal.\n * metadataVaryPath is collected from the first page node encountered\n * (parallel routes may have multiple pages, but metadata uses the first).\n */\ntype ReifyAccumulator = {\n  metadataVaryPath: PageVaryPath | null\n}\n\n/**\n * \"Reify\" means to make concrete - we take an abstract pattern (the template\n * route tree) and produce a concrete instance with actual param values.\n *\n * This function clones a RouteTree, substituting dynamic segment values from\n * resolvedParams and computing new vary paths. The vary path encodes param\n * values so segment cache entries can be correctly keyed.\n *\n * Example: Pattern for /blog/[slug] with resolvedParams { slug: \"hello\" }\n * produces a tree where segment [slug] has cacheKey \"hello\".\n */\nfunction reifyRouteTree(\n  pattern: RouteTree,\n  resolvedParams: ResolvedParams,\n  search: NormalizedSearch,\n  parentPartialVaryPath: PartialSegmentVaryPath | null,\n  acc: ReifyAccumulator\n): RouteTree {\n  const originalSegment = pattern.segment\n\n  // This segment's param (if any) is a root param iff the segment is at or\n  // above the root layout, which the server marks directly.\n  const isRootParam =\n    (pattern.prefetchHints & PrefetchHint.IsRootLayoutOrAbove) !== 0\n\n  let newSegment = originalSegment\n  let partialVaryPath: PartialSegmentVaryPath | null\n\n  if (typeof originalSegment !== 'string') {\n    // Dynamic segment: compute new cache key and append to partial vary path\n    const paramName = originalSegment[0]\n    const paramType = originalSegment[2]\n    const staticSiblings = originalSegment[3]\n    const newValue = resolvedParams.get(paramName)\n    if (newValue !== undefined) {\n      // Catch-all values are already joined into a single string when they're\n      // resolved in matchKnownRoutePart, so the value can be used directly.\n      const newCacheKey = newValue\n      newSegment = [paramName, newCacheKey, paramType, staticSiblings]\n      partialVaryPath = appendLayoutVaryPath(\n        parentPartialVaryPath,\n        newCacheKey,\n        paramName,\n        isRootParam\n      )\n    } else {\n      // Param not found in resolvedParams - keep original and inherit partial\n      // TODO: This should never happen. Bail out with null.\n      partialVaryPath = parentPartialVaryPath\n    }\n  } else {\n    // Static segment: inherit partial vary path from parent\n    partialVaryPath = parentPartialVaryPath\n  }\n\n  // Recurse into children with the (possibly updated) partial vary path\n  let newSlots: Map<string, RouteTree> | null = null\n  const patternSlots = pattern.slots\n  if (patternSlots !== null) {\n    newSlots = new Map()\n    for (const [key, childPattern] of patternSlots) {\n      newSlots.set(\n        key,\n        reifyRouteTree(\n          childPattern,\n          resolvedParams,\n          search,\n          partialVaryPath,\n          acc\n        )\n      )\n    }\n  }\n\n  if (pattern.isPage) {\n    // Page segment: finalize with search params\n    const newVaryPath = finalizePageVaryPath(\n      pattern.requestKey,\n      search,\n      partialVaryPath\n    )\n    // Collect metadata vary path (first page wins, same as original algorithm)\n    if (acc.metadataVaryPath === null) {\n      acc.metadataVaryPath = finalizeMetadataVaryPath(\n        pattern.requestKey,\n        search,\n        partialVaryPath\n      )\n    }\n    return {\n      requestKey: pattern.requestKey,\n      segment: newSegment,\n      shellVaryPath: getShellSegmentVaryPath(newVaryPath),\n      refreshState: pattern.refreshState,\n      varyPath: newVaryPath,\n      isPage: true,\n      slots: newSlots,\n      prefetchHints: pattern.prefetchHints,\n    }\n  } else {\n    // Layout segment: finalize without search params\n    const newVaryPath = finalizeLayoutVaryPath(\n      pattern.requestKey,\n      partialVaryPath\n    )\n    return {\n      requestKey: pattern.requestKey,\n      segment: newSegment,\n      shellVaryPath: getShellSegmentVaryPath(newVaryPath),\n      refreshState: pattern.refreshState,\n      varyPath: newVaryPath,\n      isPage: false,\n      slots: newSlots,\n      prefetchHints: pattern.prefetchHints,\n    }\n  }\n}\n\n/**\n * Resets the known route tree. Called during development when routes may\n * change due to hot reloading.\n */\nexport function resetKnownRoutes(): void {\n  knownRouteTreeRoot = createEmptyPart()\n}\n","import type {\n  FlightRouterState,\n  Segment as FlightRouterStateSegment,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport {\n  PrefetchHint,\n  StaticPrefetchDisabled,\n} from '../../../shared/lib/app-router-types'\nimport { matchSegment } from '../match-segments'\nimport {\n  readOrCreateRouteCacheEntry,\n  readRouteCacheEntry,\n  readOrCreateSegmentCacheEntry,\n  fetchRouteOnCacheMiss,\n  fetchSegmentsOnCacheMiss,\n  EntryStatus,\n  type FulfilledRouteCacheEntry,\n  type RouteCacheEntry,\n  type RouteTree,\n  fetchSegmentPrefetchesUsingDynamicRequest,\n  type PendingSegmentCacheEntry,\n  type SegmentCacheEntry,\n  type SegmentBundle,\n  convertRouteTreeToFlightRouterState,\n  readOrCreateRevalidatingSegmentEntry,\n  upgradeToPendingSegment,\n  overwriteRevalidatingSegmentCacheEntry,\n  canNewFetchStrategyProvideMoreContent,\n  attemptToFulfillDynamicSegmentFromBFCache,\n  attemptToUpgradeSegmentFromBFCache,\n} from './cache'\nimport type { RouteCacheKey } from './cache-key'\nimport { createCacheKey } from './cache-key'\nimport { urlSearchParamsToParsedUrlQuery } from '../../route-params'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n  PrefetchPriority,\n} from './types'\nimport {\n  segmentCacheMap,\n  getCurrentRouteCacheVersion,\n  getCurrentSegmentCacheVersion,\n} from './cache'\nimport type { CacheMap } from './cache-map'\nimport type { NavigationLockPrefetch } from './navigation-testing-lock'\nimport {\n  addSearchParamsIfPageSegment,\n  PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport type { SegmentRequestKey } from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport { cleanup } from './lru'\n\nconst scheduleMicrotask =\n  typeof queueMicrotask === 'function'\n    ? queueMicrotask\n    : (fn: () => unknown) =>\n        Promise.resolve()\n          .then(fn)\n          .catch((error) =>\n            setTimeout(() => {\n              throw error\n            })\n          )\n\nexport type PrefetchTask = {\n  key: RouteCacheKey\n\n  /**\n   * The FlightRouterState at the time the task was initiated. This is needed\n   * when falling back to the non-PPR behavior, which only prefetches up to\n   * the first loading boundary.\n   */\n  treeAtTimeOfPrefetch: FlightRouterState\n\n  /**\n   * The cache versions at the time the task was initiated. Used to determine\n   * if the cache was invalidated since the task was initiated. Route and\n   * segment caches have separate versions so they can be invalidated\n   * independently.\n   */\n  routeCacheVersion: number\n  segmentCacheVersion: number\n\n  /**\n   * The segment cache map this task operates in, captured when the task was\n   * scheduled. Every segment read the task performs and every write its\n   * responses perform target this map. Almost always the shared map; a task\n   * scheduled while the Instant Navigation Testing lock is held gets the\n   * lock scope's private map instead. Binding the map to the task means\n   * tasks queued before a lock scope never leak entries into (or read out\n   * of) the scope's map, and a scope task's late responses never leak into\n   * the shared map. See `segmentCacheMap` in cache.ts.\n   */\n  segmentCacheMap: CacheMap<SegmentCacheEntry>\n\n  /**\n   * Whether to prefetch dynamic data, in addition to static data. This is\n   * used by `<Link prefetch={true}>`.\n   *\n   * Note that a task with `FetchStrategy.PPR` might need to use\n   * `FetchStrategy.LoadingBoundary` instead if we find out that a route\n   * does not support PPR after doing the initial route prefetch.\n   */\n  fetchStrategy: PrefetchTaskFetchStrategy\n\n  /**\n   * sortId is an incrementing counter\n   *\n   * Newer prefetches are prioritized over older ones, so that as new links\n   * enter the viewport, they are not starved by older links that are no\n   * longer relevant. In the future, we can add additional prioritization\n   * heuristics, like removing prefetches once a link leaves the viewport.\n   *\n   * The sortId is assigned when the prefetch is initiated, and reassigned if\n   * the same task is prefetched again (effectively bumping it to the top of\n   * the queue).\n   *\n   * TODO: We can add additional fields here to indicate what kind of prefetch\n   * it is. For example, was it initiated by a link? Or was it an imperative\n   * call? If it was initiated by a link, we can remove it from the queue when\n   * the link leaves the viewport, but if it was an imperative call, then we\n   * should keep it in the queue until it's fulfilled.\n   *\n   * We can also add priority levels. For example, hovering over a link could\n   * increase the priority of its prefetch.\n   */\n  sortId: number\n\n  /**\n   * The priority of the task. Like sortId, this affects the task's position in\n   * the queue, so it must never be updated without resifting the heap.\n   */\n  priority: PrefetchPriority\n\n  /**\n   * The phase of the task. Tasks are split into multiple phases so that their\n   * priority can be adjusted based on what kind of work they're doing.\n   * Concretely, prefetching the route tree is higher priority than prefetching\n   * segment data.\n   */\n  phase: PrefetchPhase\n\n  /**\n   * These fields are temporary state for tracking the currently running task.\n   * They are reset after each iteration of the task queue.\n   */\n  hasBackgroundWork: boolean\n  /**\n   * Set during a pass when the task spawned a segment request, or encountered\n   * one that was already in flight (a Pending entry) — i.e. a response the\n   * pass cares about but hasn't received yet. The task blocks instead of\n   * advancing, and is re-pinged as each awaited entry settles; see\n   * blockTaskOnPendingResponse for the full rationale. Each ping re-runs a\n   * full traversal for the task, so expect roughly one re-pass per settling\n   * entry. Re-runs don't re-spawn revalidations: when a completed\n   * revalidation was re-keyed, its upsert evicts any superseded entry that\n   * would shadow it (see upsertSegmentEntry in cache.ts), and when its upsert\n   * was declined, the settled entry left in the revalidation slot dedupes\n   * further attempts (see pingFullSegmentRevalidation).\n   */\n  hasPendingResponses: boolean\n  spawnedRuntimePrefetches: Set<SegmentRequestKey> | null\n\n  /**\n   * True if the prefetch was cancelled.\n   */\n  isCanceled: boolean\n\n  /**\n   * Tracks whether the task has attempted to upgrade a fallback ISR response\n   * to one based on concrete params.\n   *\n   * When the server serves an upgradeable fallback shell (the page hadn't been\n   * prerendered with concrete params yet, but the route can be upgraded), we\n   * poll the server a few times until the upgrade is complete, or until we\n   * reach a limit and give up.\n   *\n   * - `Empty`: no loop has run yet.\n   * - `Pending`: a loop is currently running.\n   * - `Fulfilled`: a loop completed and obtained the upgraded version.\n   * - `Rejected`: a loop ran but gave up (exhausted its retries, hit an error,\n   *   or the task was canceled).\n   *\n   * To prevent against unbounded upgrade attempts, the loop is only attempted\n   * once per task, even a Link's prefetch is rescheduled many times.\n   */\n  fallbackRetryStatus: EntryStatus\n\n  /**\n   * The callback passed to `router.prefetch`, if given.\n   */\n  onInvalidate: null | (() => void)\n\n  /**\n   * The index of the task in the heap's backing array. Used to efficiently\n   * change the priority of a task by re-sifting it, which requires knowing\n   * where it is in the array. This is only used internally by the heap\n   * algorithm. The naive alternative is indexOf every time a task is queued,\n   * which has O(n) complexity.\n   *\n   * We also use this field to check whether a task is currently in the queue.\n   */\n  _heapIndex: number\n\n  /**\n   * Instant Navigation Testing API only. Non-null when this prefetch task drives\n   * a locked navigation (the `ensurePrefetchThenNavigate` path). Holds that\n   * navigation's \"wait for prefetch to fulfill\" state, resolved when the task\n   * completes. See navigation-testing-lock.ts.\n   */\n  _navigationLockPrefetch?: NavigationLockPrefetch | null\n}\n\nconst enum PrefetchTaskExitStatus {\n  /**\n   * The task yielded because there are too many requests in progress.\n   */\n  InProgress,\n\n  /**\n   * The task is blocked. It needs more data before it can proceed.\n   */\n  Blocked,\n\n  /**\n   * There's nothing left to prefetch.\n   */\n  Done,\n}\n\n/**\n * Prefetch tasks are processed in phases so that high-leverage work runs\n * before per-link work:\n *\n * - RouteTree: fetch the route's tree structure.\n * - Shell: fetch the route's reusable App Shell (param-free loading state),\n *   if the route can produce one and the feature is enabled. Bounded by\n *   filesystem-route count, not link count — so all Shell prefetches across\n *   queued tasks complete before any Speculative prefetch runs, because\n *   shell responses are shared across every navigation to the same route.\n * - Speculative: fetch the route's concrete per-link segment data.\n *\n * Higher numbers run earlier (matches heap-sort convention).\n */\nconst enum PrefetchPhase {\n  RouteTree = 2,\n  Shell = 1,\n  Speculative = 0,\n}\n\nexport type PrefetchSubtaskResult<T> = {\n  /**\n   * A promise that resolves when the network connection is closed.\n   */\n  closed: Promise<void>\n  value: T\n}\n\nconst taskHeap: Array<PrefetchTask> = []\n\nlet inProgressRequests = 0\n\nlet sortIdCounter = 0\nlet didScheduleMicrotask = false\n\n// The most recently hovered (or touched, etc) link, i.e. the most recent task\n// scheduled at Intent priority. There's only ever a single task at Intent\n// priority at a time. We reserve special network bandwidth for this task only.\nlet mostRecentlyHoveredLink: PrefetchTask | null = null\n\n// CDN cache propagation delay after revalidation (in milliseconds)\nconst REVALIDATION_COOLDOWN_MS = 300\n\n// Timeout handle for the revalidation cooldown. When non-null, prefetch\n// requests are blocked to allow CDN cache propagation.\nlet revalidationCooldownTimeoutHandle: ReturnType<typeof setTimeout> | null =\n  null\n\n/**\n * Called by the cache when revalidation occurs. Starts a cooldown period\n * during which prefetch requests are blocked to allow CDN cache propagation.\n */\nexport function startRevalidationCooldown(): void {\n  // Clear any existing timeout in case multiple revalidations happen\n  // in quick succession.\n  if (revalidationCooldownTimeoutHandle !== null) {\n    clearTimeout(revalidationCooldownTimeoutHandle)\n  }\n\n  // Schedule the cooldown to expire after the delay.\n  revalidationCooldownTimeoutHandle = setTimeout(() => {\n    revalidationCooldownTimeoutHandle = null\n    // Retry the prefetch queue now that the cooldown has expired.\n    pingPrefetchScheduler()\n  }, REVALIDATION_COOLDOWN_MS)\n}\n\nexport type IncludeDynamicData = null | 'full' | 'dynamic'\n\n/**\n * Initiates a prefetch task for the given URL. If a prefetch for the same URL\n * is already in progress, this will bump it to the top of the queue.\n *\n * This is not a user-facing function. By the time this is called, the href is\n * expected to be validated and normalized.\n *\n * @param key The RouteCacheKey to prefetch.\n * @param treeAtTimeOfPrefetch The app's current FlightRouterState\n * @param fetchStrategy Whether to prefetch dynamic data, in addition to\n * static data. This is used by `<Link prefetch={true}>`.\n * @param navigationLockPrefetch Testing API only. Non-null when this prefetch\n * drives a locked navigation (from `ensurePrefetchThenNavigate`); carries that\n * navigation's \"wait for prefetch to fulfill\" state. Null otherwise.\n */\nexport function schedulePrefetchTask(\n  key: RouteCacheKey,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  priority: PrefetchPriority,\n  onInvalidate: null | (() => void),\n  navigationLockPrefetch: NavigationLockPrefetch | null\n): PrefetchTask {\n  // Bind the task to the segment cache map that is active right now: the\n  // shared map, unless the Instant Navigation Testing lock is held, in which\n  // case the task gets the lock scope's private map. This is the single\n  // place work is bound to a map based on lock state — everything downstream\n  // receives the map explicitly. See `segmentCacheMap` in cache.ts.\n  let taskSegmentCacheMap = segmentCacheMap\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { getNavigationLockSegmentCacheMap } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    const lockMap = getNavigationLockSegmentCacheMap()\n    if (lockMap !== null) {\n      taskSegmentCacheMap = lockMap\n    }\n  }\n\n  // Spawn a new prefetch task\n  const task: PrefetchTask = {\n    key,\n    treeAtTimeOfPrefetch,\n    routeCacheVersion: getCurrentRouteCacheVersion(),\n    segmentCacheVersion: getCurrentSegmentCacheVersion(),\n    segmentCacheMap: taskSegmentCacheMap,\n    priority,\n    phase: PrefetchPhase.RouteTree,\n    hasBackgroundWork: false,\n    hasPendingResponses: false,\n    spawnedRuntimePrefetches: null,\n    fetchStrategy,\n    sortId: sortIdCounter++,\n    isCanceled: false,\n    fallbackRetryStatus: EntryStatus.Empty,\n    onInvalidate,\n    _heapIndex: -1,\n  }\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    task._navigationLockPrefetch = navigationLockPrefetch\n  }\n\n  trackMostRecentlyHoveredLink(task)\n\n  heapPush(taskHeap, task)\n\n  // Schedule an async task to process the queue.\n  //\n  // The main reason we process the queue in an async task is for batching.\n  // It's common for a single JS task/event to trigger multiple prefetches.\n  // By deferring to a microtask, we only process the queue once per JS task.\n  // If they have different priorities, it also ensures they are processed in\n  // the optimal order.\n  pingPrefetchScheduler()\n\n  return task\n}\n\nexport function cancelPrefetchTask(task: PrefetchTask): void {\n  // Remove the prefetch task from the queue. If the task already completed,\n  // then this is a no-op.\n  //\n  // We must also explicitly mark the task as canceled so that a blocked task\n  // does not get added back to the queue when it's pinged by the network.\n  task.isCanceled = true\n  // A running fallback-retry loop notices `isCanceled` when it next wakes and\n  // bails (settling its status to Rejected), so there's nothing to clean up here.\n  heapDelete(taskHeap, task)\n}\n\nexport function reschedulePrefetchTask(\n  task: PrefetchTask,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  priority: PrefetchPriority\n): void {\n  // Bump the prefetch task to the top of the queue, as if it were a fresh\n  // task. This is essentially the same as canceling the task and scheduling\n  // a new one, except it reuses the original object.\n  //\n  // The primary use case is to increase the priority of a Link-initated\n  // prefetch on hover.\n\n  // Un-cancel the task, in case it was previously canceled.\n  task.isCanceled = false\n  task.phase = PrefetchPhase.RouteTree\n\n  // Note: fallback-retry state is deliberately NOT reset here. A retry loop runs\n  // at most once per task, even across reschedules, so a re-hover never starts a\n  // second loop. A loop already running simply continues (it only stops on\n  // cancel); `fallbackRetryStatus` never returns to `Empty` once it leaves it.\n\n  // Assign a new sort ID to move it ahead of all other tasks at the same\n  // priority level. (Higher sort IDs are processed first.)\n  task.sortId = sortIdCounter++\n  task.priority =\n    // If this task is the most recently hovered link, maintain its\n    // Intent priority, even if the rescheduled priority is lower.\n    task === mostRecentlyHoveredLink ? PrefetchPriority.Intent : priority\n\n  task.treeAtTimeOfPrefetch = treeAtTimeOfPrefetch\n  task.fetchStrategy = fetchStrategy\n\n  trackMostRecentlyHoveredLink(task)\n\n  if (task._heapIndex !== -1) {\n    // The task is already in the queue.\n    heapResift(taskHeap, task)\n  } else {\n    heapPush(taskHeap, task)\n  }\n  pingPrefetchScheduler()\n}\n\nexport function isPrefetchTaskDirty(\n  task: PrefetchTask,\n  nextUrl: string | null,\n  tree: FlightRouterState\n): boolean {\n  // This is used to quickly bail out of a prefetch task if the result is\n  // guaranteed to not have changed since the task was initiated. This is\n  // strictly an optimization — theoretically, if it always returned true, no\n  // behavior should change because a full prefetch task will effectively\n  // perform the same checks.\n  return (\n    task.routeCacheVersion !== getCurrentRouteCacheVersion() ||\n    task.segmentCacheVersion !== getCurrentSegmentCacheVersion() ||\n    task.treeAtTimeOfPrefetch !== tree ||\n    task.key.nextUrl !== nextUrl\n  )\n}\n\nfunction trackMostRecentlyHoveredLink(task: PrefetchTask) {\n  // Track the mostly recently hovered link, i.e. the most recently scheduled\n  // task at Intent priority. There must only be one such task at a time.\n  if (\n    task.priority === PrefetchPriority.Intent &&\n    task !== mostRecentlyHoveredLink\n  ) {\n    if (mostRecentlyHoveredLink !== null) {\n      // Bump the previously hovered link's priority down to Default.\n      if (mostRecentlyHoveredLink.priority !== PrefetchPriority.Background) {\n        mostRecentlyHoveredLink.priority = PrefetchPriority.Default\n        heapResift(taskHeap, mostRecentlyHoveredLink)\n      }\n    }\n    mostRecentlyHoveredLink = task\n  }\n}\n\nexport function pingPrefetchScheduler() {\n  if (didScheduleMicrotask) {\n    // Already scheduled a task to process the queue\n    return\n  }\n  didScheduleMicrotask = true\n  scheduleMicrotask(processQueueInMicrotask)\n}\n\n/**\n * Checks if we've exceeded the maximum number of concurrent prefetch requests,\n * to avoid saturating the browser's internal network queue. This is a\n * cooperative limit — prefetch tasks should check this before issuing\n * new requests.\n *\n * Also checks if we're within the revalidation cooldown window, during which\n * prefetch requests are delayed to allow CDN cache propagation.\n */\nfunction hasNetworkBandwidth(task: PrefetchTask): boolean {\n  // When offline, don't issue any prefetch requests. The scheduler will be\n  // re-pinged when connectivity is restored.\n  if (process.env.__NEXT_USE_OFFLINE) {\n    const { getOffline } = require('../offline') as typeof import('../offline')\n    if (getOffline()) {\n      return false\n    }\n  }\n\n  // Check if we're within the revalidation cooldown window\n  if (revalidationCooldownTimeoutHandle !== null) {\n    // We're within the cooldown window. Return false to prevent prefetching.\n    // When the cooldown expires, the timeout will call ensureWorkIsScheduled()\n    // to retry the queue.\n    return false\n  }\n\n  // TODO: Also check if there's an in-progress navigation. We should never\n  // add prefetch requests to the network queue if an actual navigation is\n  // taking place, to ensure there's sufficient bandwidth for render-blocking\n  // data and resources.\n\n  // TODO: Consider reserving some amount of bandwidth for static prefetches.\n\n  if (task.priority === PrefetchPriority.Intent) {\n    // The most recently hovered link is allowed to exceed the default limit.\n    //\n    // The goal is to always have enough bandwidth to start a new prefetch\n    // request when hovering over a link.\n    //\n    // However, because we don't abort in-progress requests, it's still possible\n    // we'll run out of bandwidth. When links are hovered in quick succession,\n    // there could be multiple hover requests running simultaneously.\n    return inProgressRequests < 12\n  }\n\n  // The default limit is lower than the limit for a hovered link.\n  return inProgressRequests < 4\n}\n\nfunction spawnPrefetchSubtask<T>(\n  prefetchSubtask: Promise<PrefetchSubtaskResult<T> | null>\n): Promise<T | null> {\n  // When the scheduler spawns an async task, we don't await its result.\n  // Instead, the async task writes its result directly into the cache, then\n  // pings the scheduler to continue.\n  //\n  // We process server responses streamingly, so the prefetch subtask will\n  // likely resolve before we're finished receiving all the data. The subtask\n  // result includes a promise that resolves once the network connection is\n  // closed. The scheduler uses this to control network bandwidth by tracking\n  // and limiting the number of concurrent requests.\n  inProgressRequests++\n  return prefetchSubtask.then((result) => {\n    if (result === null) {\n      // The prefetch task errored before it could start processing the\n      // network stream. Assume the connection is closed.\n      onPrefetchConnectionClosed()\n      return null\n    }\n    // Wait for the connection to close before freeing up more bandwidth.\n    result.closed.then(onPrefetchConnectionClosed)\n    return result.value\n  })\n}\n\nfunction onPrefetchConnectionClosed(): void {\n  inProgressRequests--\n\n  // Notify the scheduler that we have more bandwidth, and can continue\n  // processing tasks.\n  pingPrefetchScheduler()\n}\n\n/**\n * Notify the scheduler that we've received new data for an in-progress\n * prefetch. The corresponding task will be added back to the queue (unless the\n * task has been canceled in the meantime).\n */\nexport function pingPrefetchTask(task: PrefetchTask) {\n  // \"Ping\" a prefetch that's already in progress to notify it of new data.\n  if (\n    // Check if prefetch was canceled.\n    task.isCanceled ||\n    // Check if prefetch is already queued.\n    task._heapIndex !== -1\n  ) {\n    return\n  }\n  // Add the task back to the queue.\n  heapPush(taskHeap, task)\n  pingPrefetchScheduler()\n}\n\nfunction processQueueInMicrotask() {\n  didScheduleMicrotask = false\n\n  // We aim to minimize how often we read the current time. Since nearly all\n  // functions in the prefetch scheduler are synchronous, we can read the time\n  // once and pass it as an argument wherever it's needed.\n  const now = Date.now()\n\n  // Process the task queue until we run out of network bandwidth.\n  let task = heapPeek(taskHeap)\n  while (task !== null && hasNetworkBandwidth(task)) {\n    task.routeCacheVersion = getCurrentRouteCacheVersion()\n    task.segmentCacheVersion = getCurrentSegmentCacheVersion()\n\n    const exitStatus = pingRoute(now, task)\n\n    // These fields are only valid for a single \"pass\" — one pingRoute\n    // invocation for a task, which is what the comments here also call an\n    // attempt or an iteration. Reset them after each iteration of the\n    // task queue.\n    const hasBackgroundWork = task.hasBackgroundWork\n    task.hasBackgroundWork = false\n    task.hasPendingResponses = false\n    task.spawnedRuntimePrefetches = null\n\n    switch (exitStatus) {\n      case PrefetchTaskExitStatus.InProgress:\n        // The task yielded because there are too many requests in progress.\n        // Stop processing tasks until we have more bandwidth.\n        return\n      case PrefetchTaskExitStatus.Blocked:\n        // The task is blocked. It needs more data before it can proceed.\n        // Keep the task out of the queue until the server responds.\n        heapPop(taskHeap)\n        // Continue to the next task\n        task = heapPeek(taskHeap)\n        continue\n      case PrefetchTaskExitStatus.Done:\n        if (task.phase === PrefetchPhase.RouteTree) {\n          // Finished prefetching the route tree. The two-phase (Shell then\n          // Speculative) flow only applies to routes that have opted into\n          // Partial Prefetching — either globally via the `partialPrefetching`\n          // config or per segment (`prefetch: 'partial'` or\n          // `'unstable_eager'`), all surfaced as the\n          // `SubtreeHasPartialPrefetching` hint on the route tree. Every other\n          // route skips the Shell phase and goes straight to Speculative.\n          //\n          // The route entry is fulfilled at this point (the RouteTree phase\n          // just completed), so its prefetch hints are available.\n          const route = readRouteCacheEntry(now, task.key)\n          const routeHasPartialPrefetching =\n            route !== null &&\n            route.status === EntryStatus.Fulfilled &&\n            (route.tree.prefetchHints &\n              PrefetchHint.SubtreeHasPartialPrefetching) !==\n              0\n          task.phase = routeHasPartialPrefetching\n            ? PrefetchPhase.Shell\n            : PrefetchPhase.Speculative\n          heapResift(taskHeap, task)\n        } else if (task.phase === PrefetchPhase.Shell) {\n          // Shell phase complete — a Done exit means the pass observed every\n          // response it cares about (otherwise it would have exited Blocked;\n          // see hasPendingResponses). Always advance to Speculative regardless\n          // of whether Shell-phase work fired — Speculative is responsible\n          // for the per-link concrete work and runs even on routes whose\n          // shell phase was a no-op.\n          task.phase = PrefetchPhase.Speculative\n          heapResift(taskHeap, task)\n        } else if (hasBackgroundWork) {\n          // The task spawned additional background work. Reschedule the task\n          // at background priority.\n          task.priority = PrefetchPriority.Background\n          heapResift(taskHeap, task)\n        } else {\n          // The prefetch is complete. Continue to the next task.\n          //\n          // Completion is terminal in the normal flow: a task only completes\n          // after a full pass observed every response it cares about. In rare\n          // cases, though, a task can complete while still registered on an\n          // entry from an earlier pass whose subtree the final pass no longer\n          // reached; when that entry later settles, it re-pings the completed\n          // task. The re-run is a harmless idempotent no-op, but any\n          // per-completion side effect added here must be idempotent or\n          // once-guarded — in particular, the navigation-lock release below\n          // must not fire twice (hence the nulling).\n          if (\n            process.env.__NEXT_EXPOSE_TESTING_API &&\n            task._navigationLockPrefetch != null\n          ) {\n            // This locked-navigation prefetch is complete: the final pass\n            // observed every segment response it cares about, so the data the\n            // navigation will read has settled. Resolve the prefetch's\n            // promise (awaited by `ensurePrefetchThenNavigate`) so the\n            // navigation proceeds against present data rather than a\n            // still-in-flight entry.\n            const { resolveNavigationLockPrefetch } =\n              require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n            resolveNavigationLockPrefetch(task._navigationLockPrefetch)\n            // Release at most once per task: a stale registration from an\n            // earlier pass can re-ping a completed task (see above), so it can\n            // pass through here again.\n            task._navigationLockPrefetch = null\n          }\n          heapPop(taskHeap)\n        }\n        task = heapPeek(taskHeap)\n        continue\n      default:\n        exitStatus satisfies never\n    }\n  }\n\n  // Run LRU cleanup only when the scheduler is fully idle: no queued tasks and\n  // no in-progress requests. At that point, all active prefetch tasks have\n  // finished reading from the cache (moving recently used entries to the front\n  // of the list), so only genuinely stale data gets evicted.\n  if (task === null && inProgressRequests === 0) {\n    cleanup()\n  }\n}\n\n/**\n * Check this during a prefetch task to determine if background work can be\n * performed. If so, it evaluates to `true`. Otherwise, it returns `false`,\n * while also scheduling a background task to run later. Usage:\n *\n * @example\n * if (background(task)) {\n *   // Perform background-pri work\n * }\n *\n * TODO: Model \"background\" as a phase (like Shell / Speculative) rather\n * than as a priority. Conceptually it's the same pattern: defer work\n * until a later pass over the task. The current priority-based encoding\n * predates the phase model and could be unified.\n */\nfunction background(task: PrefetchTask): boolean {\n  if (task.priority === PrefetchPriority.Background) {\n    return true\n  }\n  task.hasBackgroundWork = true\n  return false\n}\n\nfunction pingRoute(\n  now: number,\n  task: PrefetchTask\n):\n  | PrefetchTaskExitStatus.InProgress\n  | PrefetchTaskExitStatus.Blocked\n  | PrefetchTaskExitStatus.Done {\n  const key = task.key\n  const route = readOrCreateRouteCacheEntry(now, task, key)\n  const exitStatus = pingRootRouteTree(now, task, route)\n\n  if (exitStatus !== PrefetchTaskExitStatus.InProgress && key.search !== '') {\n    // If the URL has a non-empty search string, also prefetch the pathname\n    // without the search string. We use the searchless route tree as a base for\n    // optimistic routing; see requestOptimisticRouteCacheEntry for details.\n    //\n    // Note that we don't need to prefetch any of the segment data. Just the\n    // route tree.\n    //\n    // TODO: This is a temporary solution; the plan is to replace this by adding\n    // a wildcard lookup method to the TupleMap implementation. This is\n    // non-trivial to implement because it needs to account for things like\n    // fallback route entries, hence this temporary workaround.\n    const url = new URL(key.pathname, location.origin)\n    const keyWithoutSearch = createCacheKey(url.href, key.nextUrl)\n    const routeWithoutSearch = readOrCreateRouteCacheEntry(\n      now,\n      task,\n      keyWithoutSearch\n    )\n    switch (routeWithoutSearch.status) {\n      case EntryStatus.Empty: {\n        if (background(task)) {\n          routeWithoutSearch.status = EntryStatus.Pending\n          spawnPrefetchSubtask(\n            fetchRouteOnCacheMiss(\n              routeWithoutSearch,\n              keyWithoutSearch,\n              task.segmentCacheMap\n            )\n          )\n        }\n        break\n      }\n      case EntryStatus.Pending:\n      case EntryStatus.Fulfilled:\n      case EntryStatus.Rejected: {\n        // Either the route tree is already cached, or there's already a\n        // request in progress. Since we don't need to fetch any segment data\n        // for this route, there's nothing left to do.\n        break\n      }\n      default:\n        routeWithoutSearch satisfies never\n    }\n  }\n\n  if (exitStatus === PrefetchTaskExitStatus.Done && task.hasPendingResponses) {\n    // The pass traversed the whole tree, but some segment responses haven't\n    // arrived yet, so the current phase isn't actually complete. Block until\n    // they do (see blockTaskOnPendingResponse for the full rationale).\n    return PrefetchTaskExitStatus.Blocked\n  }\n\n  return exitStatus\n}\n\nfunction pingRootRouteTree(\n  now: number,\n  task: PrefetchTask,\n  route: RouteCacheEntry\n):\n  | PrefetchTaskExitStatus.InProgress\n  | PrefetchTaskExitStatus.Blocked\n  | PrefetchTaskExitStatus.Done {\n  switch (route.status) {\n    case EntryStatus.Empty: {\n      // Route is not yet cached, and there's no request already in progress.\n      // Spawn a task to request the route, load it into the cache, and ping\n      // the task to continue.\n\n      // TODO: There are multiple strategies in the <Link> API for prefetching\n      // a route. Currently we've only implemented the main one: per-segment,\n      // static-data only.\n      //\n      // There's also `<Link prefetch={true}>`\n      // which prefetch both static *and* dynamic data.\n      // Similarly, we need to fallback to the old, per-page\n      // behavior if PPR is disabled for a route (via the incremental opt-in).\n      //\n      // Those cases will be handled here.\n      spawnPrefetchSubtask(\n        fetchRouteOnCacheMiss(route, task.key, task.segmentCacheMap)\n      )\n\n      // If the request takes longer than a minute, a subsequent request should\n      // retry instead of waiting for this one. When the response is received,\n      // this value will be replaced by a new value based on the stale time sent\n      // from the server.\n      // TODO: We should probably also manually abort the fetch task, to reclaim\n      // server bandwidth.\n      route.staleAt = now + 60 * 1000\n\n      // Upgrade to Pending so we know there's already a request in progress\n      route.status = EntryStatus.Pending\n\n      // Intentional fallthrough to the Pending branch\n    }\n    case EntryStatus.Pending: {\n      // Still pending. We can't start prefetching the segments until the route\n      // tree has loaded. Add the task to the set of blocked tasks so that it\n      // is notified when the route tree is ready.\n      const blockedTasks = route.blockedTasks\n      if (blockedTasks === null) {\n        route.blockedTasks = new Set([task])\n      } else {\n        blockedTasks.add(task)\n      }\n      return PrefetchTaskExitStatus.Blocked\n    }\n    case EntryStatus.Rejected: {\n      // Route tree failed to load. Treat as a 404.\n      return PrefetchTaskExitStatus.Done\n    }\n    case EntryStatus.Fulfilled: {\n      if (task.phase === PrefetchPhase.RouteTree) {\n        // Do not prefetch segment data during the route tree phase.\n        return PrefetchTaskExitStatus.Done\n      }\n      // Recursively fill in the segment tree.\n      if (!hasNetworkBandwidth(task)) {\n        // Stop prefetching segments until there's more bandwidth.\n        return PrefetchTaskExitStatus.InProgress\n      }\n      const tree = route.tree\n\n      // A task's fetch strategy gets set to `PPR` for any \"auto\" prefetch.\n      // If it turned out that the route isn't PPR-enabled, we need to use `LoadingBoundary` instead.\n      // We don't need to do this for runtime prefetches, because those are only available in\n      // `cacheComponents`, where every route is PPR.\n      let fetchStrategy: FetchStrategy\n      if (tree.prefetchHints & PrefetchHint.SubtreeHasPartialPrefetching) {\n        // If Partial Prefetching is enabled anywhere on the target route,\n        // ignore the fetch strategy and switch to unified strategy used by\n        // Cache Components (called `PPR` for now, will likely be renamed).\n        //\n        // In practice, this just means that a \"full\" prefetch (<Link\n        // prefetch={true}>) has no effect. You're meant to use Runtime\n        // Prefetching instead — that's the new pattern that replaces\n        // prefetch={true}.\n        //\n        // The reason we check for the Partial Prefetching opt-in rather than\n        // the `cacheComponents` flag is to support incremental adoption.\n        // `prefetch={true}` will continue to work until you opt into\n        // Partial Prefetching.\n        fetchStrategy = FetchStrategy.PPR\n      } else if (task.fetchStrategy === FetchStrategy.PPR) {\n        fetchStrategy = route.supportsPerSegmentPrefetching\n          ? FetchStrategy.PPR\n          : FetchStrategy.LoadingBoundary\n      } else {\n        fetchStrategy = task.fetchStrategy\n      }\n\n      switch (fetchStrategy) {\n        case FetchStrategy.PPR: {\n          // For Cache Components pages, each segment may be prefetched\n          // statically or using a runtime request, based on various\n          // configurations and heuristics. We'll do this in two passes: first\n          // traverse the tree and perform all the static prefetches.\n          //\n          // Then, if there are any segments that need a runtime request,\n          // do another pass to perform a runtime prefetch.\n\n          // Derive the static walk's parameters once per pass; the walk\n          // functions below receive them as arguments and are phase-agnostic.\n          // During the Shell phase the walk targets the App Shell variant of\n          // each segment (keyed at the shell vary paths); otherwise it's the\n          // ordinary per-segment static strategy. This is the only place the\n          // phase is consulted — everything below keys off the strategy.\n          const staticWalkStrategy =\n            task.phase === PrefetchPhase.Shell\n              ? FetchStrategy.StaticShell\n              : FetchStrategy.PPR\n\n          if (\n            staticWalkStrategy === FetchStrategy.PPR &&\n            !subtreeHasSpeculativePrefetch(\n              task.fetchStrategy,\n              tree.prefetchHints\n            )\n          ) {\n            // Nothing in the target route needs to be speculatively prefetched.\n            // Bail out. (A PPR walk is the Speculative pass; same check as\n            // the per-subtree bail in pingNewPartOfCacheComponentsTree.)\n            return PrefetchTaskExitStatus.Done\n          }\n\n          pingStaticHead(now, task, route, staticWalkStrategy)\n\n          const exitStatus = pingSharedPartOfCacheComponentsTree(\n            now,\n            task,\n            route,\n            task.treeAtTimeOfPrefetch,\n            tree,\n            null,\n            staticWalkStrategy\n          )\n          if (exitStatus === PrefetchTaskExitStatus.InProgress) {\n            // Child yielded without finishing.\n            return PrefetchTaskExitStatus.InProgress\n          }\n\n          // We may need to do a runtime prefetch for one or more segments.\n          // Before checking, we can do some fast checks to bail out of this\n          // branch early.\n          //\n          // Runtime prefetches are only issued for walks that require runtime\n          // completeness — the same per-pass predicate that produced the\n          // deopt registrations during the traversal above; see the decision\n          // point in pingNewPartOfCacheComponentsTree. Which segments\n          // actually need a runtime request — registered directly, or only\n          // as the fallback after an insufficient static attempt — was\n          // decided there.\n          if (walkRequiresRuntimeCompleteness(staticWalkStrategy, route)) {\n            const runtimeStrategy =\n              staticWalkStrategy === FetchStrategy.StaticShell\n                ? FetchStrategy.RuntimeShell\n                : FetchStrategy.PPRRuntime\n\n            // spawnedRuntimePrefetches was populated during the traversal\n            // above: every subtree in the new part of the tree that needs a\n            // runtime prefetch — plus, during the Shell phase, the head, if\n            // its static attempt was insufficient (see above).\n            //\n            // If it's null, nothing in the new part of the tree is a candidate\n            // for runtime prefetching, and we don't fetch the head, either —\n            // the head is runtime prefetched only if one of the segments is.\n            const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches\n            if (spawnedRuntimePrefetches !== null) {\n              const spawnedEntries = new Map<\n                SegmentRequestKey,\n                PendingSegmentCacheEntry\n              >()\n              pingRuntimeHead(now, task, route, spawnedEntries, runtimeStrategy)\n              const requestTree = pingRuntimePrefetches(\n                now,\n                task,\n                route,\n                tree,\n                spawnedRuntimePrefetches,\n                spawnedEntries,\n                runtimeStrategy\n              )\n              if (spawnedEntries.size > 0) {\n                spawnPrefetchSubtask(\n                  fetchSegmentPrefetchesUsingDynamicRequest(\n                    task,\n                    route,\n                    runtimeStrategy,\n                    requestTree,\n                    spawnedEntries\n                  )\n                )\n              }\n            }\n          }\n\n          return PrefetchTaskExitStatus.Done\n        }\n        case FetchStrategy.Full:\n        case FetchStrategy.PPRRuntime:\n        case FetchStrategy.LoadingBoundary: {\n          if (task.phase === PrefetchPhase.Shell) {\n            // Shell phase only does work on routes that use the PPR strategy\n            // (Cache Components routes). Other strategies are Shell no-ops\n            // and fall through to Speculative.\n            return PrefetchTaskExitStatus.Done\n          }\n          // Prefetch multiple segments using a single dynamic request.\n          // TODO: We can consolidate this branch with previous one by modeling\n          // it as if the first segment in the new tree has runtime prefetching\n          // enabled. Will do this as a follow-up refactor. Might want to remove\n          // the special metatdata case below first. In the meantime, it's not\n          // really that much duplication, just would be nice to remove one of\n          // these codepaths.\n          const spawnedEntries = new Map<\n            SegmentRequestKey,\n            PendingSegmentCacheEntry\n          >()\n          pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy)\n          const dynamicRequestTree = diffRouteTreeAgainstCurrent(\n            now,\n            task,\n            route,\n            task.treeAtTimeOfPrefetch,\n            tree,\n            spawnedEntries,\n            fetchStrategy\n          )\n          let needsDynamicRequest = spawnedEntries.size > 0\n          if (needsDynamicRequest) {\n            spawnPrefetchSubtask(\n              fetchSegmentPrefetchesUsingDynamicRequest(\n                task,\n                route,\n                fetchStrategy,\n                dynamicRequestTree,\n                spawnedEntries\n              )\n            )\n          }\n          return PrefetchTaskExitStatus.Done\n        }\n        default:\n          fetchStrategy satisfies never\n      }\n      break\n    }\n    default: {\n      route satisfies never\n    }\n  }\n  return PrefetchTaskExitStatus.Done\n}\n\n/**\n * Prefetches the Head data for a page (metadata, viewport). The Head is not\n * really a route segment, in the sense that it doesn't appear in the route\n * tree, but we store it in the cache as if it were, using a special key.\n *\n * Symmetric with the per-segment decision point in\n * pingNewPartOfCacheComponentsTree: the head deopts to the runtime prefetch\n * path either when it requires runtime completeness and no static attempt is\n * happening, or when a fulfilled static head entry reported that a runtime\n * request would return more content than the entry contains. Deopting\n * registers the head under its metadata request key, which makes the runtime\n * gate in pingRootRouteTree fire even when every tree segment was\n * sufficient; pingRuntimeHead performs the actual head work.\n */\nfunction pingStaticHead(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  // The per-pass static walk strategy; see pingRootRouteTree where\n  // it's derived.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): void {\n  // The head is subject to the same per-pass runtime-completeness contract\n  // as the route's segments: during an App Shell walk, and during any walk\n  // of a Partial Prefetching route, the head needs a response at least as\n  // complete as a runtime one.\n  const headRequiresRuntimeCompleteness = walkRequiresRuntimeCompleteness(\n    fetchStrategy,\n    route\n  )\n  if (\n    headRequiresRuntimeCompleteness &&\n    // The head is not a tree node — it hangs off the route root — so the\n    // static-attempt hint is read from the root's node. (Segments read the\n    // bit from their own node; see the decision point in\n    // pingNewPartOfCacheComponentsTree.)\n    (route.tree.prefetchHints & PrefetchHint.ShouldAttemptStaticPrefetch) === 0\n  ) {\n    // No static attempt: the head arrives via the runtime request instead.\n    addSpawnedRuntimePrefetch(task, route.metadata.requestKey)\n    return\n  }\n\n  if (\n    // If the head was inlined into a page's bundle (HeadOutlined is NOT set\n    // on the root), skip the standalone fetch — the head data will arrive\n    // as part of that page's response, and its runtime-completeness signal\n    // is carried by that page's own entries.\n    process.env.__NEXT_PREFETCH_INLINING &&\n    !(route.tree.prefetchHints & PrefetchHint.HeadOutlined)\n  ) {\n    return\n  }\n\n  const segments: SegmentBundle = {\n    tree: route.metadata,\n    entry: readOrCreateSegmentCacheEntry(\n      now,\n      task.segmentCacheMap,\n      fetchStrategy,\n      route.metadata\n    ),\n    parent: null,\n  }\n  const needsRuntimeRequest = pingSegmentBundle(\n    now,\n    task,\n    route,\n    task.key,\n    route.metadata,\n    segments,\n    fetchStrategy,\n    true\n  )\n  if (headRequiresRuntimeCompleteness && needsRuntimeRequest) {\n    // The static attempt was insufficient for the head. Deopt to a\n    // runtime prefetch. (Outside of runtime-completeness contexts the\n    // head's signal is unused — a partial static head is filled in by the\n    // navigation-time request, as with any other static segment.)\n    addSpawnedRuntimePrefetch(task, route.metadata.requestKey)\n  }\n}\n\n/**\n * Whether the task needs a cache entry at least as complete as a runtime\n * response for every segment it walks before the prefetch counts as done.\n * Runtime completeness is the universal contract for Partial Prefetching,\n * so the predicate is per pass, not per segment:\n *\n * - Every walk of a route that opts into Partial Prefetching (any segment\n *   with a partial-prefetching config, or the global `partialPrefetching`\n *   flag — both surfaced as SubtreeHasPartialPrefetching on the route\n *   root), in both the Shell and Speculative phases.\n * - Every App Shell (StaticShell) walk, because the App Shell must be\n *   reusable across all params by definition. (In practice this is implied\n *   by the first case — the Shell phase only runs for Partial Prefetching\n *   routes.)\n *\n * Routes without Partial Prefetching keep the static-only contract: their\n * walks prefetch static data and partial entries are acceptable — the\n * dynamic holes are filled by the navigation-time request.\n *\n * Note that on a Partial Prefetching route, non-eager subtrees are still\n * skipped by the Speculative pass of a default (auto) link — eagerness is\n * unaffected by this predicate. But every segment the pass DOES walk (eager\n * segments, and everything on a `prefetch={true}` walk) is held to the\n * runtime-completeness contract. The contract is affordable because most\n * routes carry the ShouldAttemptStaticPrefetch hint: their segments are\n * prefetched statically and the responses' own sufficiency signal makes a\n * runtime request rare. On a hint-unset route, a walked segment deopts\n * directly to the batched runtime request — which then serves the segment's\n * whole subtree, so navigations into it are complete without a\n * navigation-time request.\n *\n * This is also the gate for the batched runtime request at the end of\n * pingRootRouteTree; requiring runtime completeness does not itself mean a\n * runtime request is issued for a given segment — see the decision point in\n * pingNewPartOfCacheComponentsTree.\n */\nfunction walkRequiresRuntimeCompleteness(\n  staticWalkStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell,\n  route: FulfilledRouteCacheEntry\n): boolean {\n  return (\n    staticWalkStrategy === FetchStrategy.StaticShell ||\n    (route.tree.prefetchHints & PrefetchHint.SubtreeHasPartialPrefetching) !== 0\n  )\n}\n\n/**\n * The runtime counterpart of a pass's static walk strategy: the strategy the\n * batched runtime request uses if this walk deopts. Each phase has exactly one\n * — the Shell phase escalates to a runtime App Shell, the Speculative phase to\n * a per-link concrete runtime prefetch.\n */\nfunction getRuntimeStrategyForWalk(\n  staticWalkStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): FetchStrategy.RuntimeShell | FetchStrategy.PPRRuntime {\n  return staticWalkStrategy === FetchStrategy.StaticShell\n    ? FetchStrategy.RuntimeShell\n    : FetchStrategy.PPRRuntime\n}\n\n/**\n * Whether this phase's runtime request would return more content for a\n * fulfilled entry than the entry already holds.\n *\n * An entry records the tier its CONTENT achieved, not the one it was requested\n * at, and that tier spans both axes — so a static response that needed no\n * runtime data records the runtime counterpart of its own variant (see\n * `recordedFetchStrategy` in cache.ts). That makes this a pure tier\n * comparison: an entry at or above the phase's runtime tier has nothing to\n * gain from it.\n */\nfunction wouldRuntimeRequestProvideMore(\n  entry: SegmentCacheEntry,\n  staticWalkStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): boolean {\n  return canNewFetchStrategyProvideMoreContent(\n    entry.fetchStrategy,\n    getRuntimeStrategyForWalk(staticWalkStrategy)\n  )\n}\n\n/**\n * Register a subtree root (or the head's metadata key) for the batched\n * runtime request issued by the gate at the end of pingRootRouteTree.\n */\nfunction addSpawnedRuntimePrefetch(\n  task: PrefetchTask,\n  requestKey: SegmentRequestKey\n): void {\n  if (task.spawnedRuntimePrefetches === null) {\n    task.spawnedRuntimePrefetches = new Set([requestKey])\n  } else {\n    task.spawnedRuntimePrefetches.add(requestKey)\n  }\n}\n\nfunction pingRuntimeHead(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n    | FetchStrategy.LoadingBoundary\n): void {\n  pingRouteTreeAndIncludeDynamicData(\n    now,\n    task,\n    route,\n    route.metadata,\n    false,\n    spawnedEntries,\n    // When prefetching the head, there's no difference between Full\n    // and LoadingBoundary\n    fetchStrategy === FetchStrategy.LoadingBoundary\n      ? FetchStrategy.Full\n      : fetchStrategy\n  )\n}\n\n// TODO: Rename dynamic -> runtime throughout this module\n\nfunction pingSharedPartOfCacheComponentsTree(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  oldTree: FlightRouterState,\n  newTree: RouteTree,\n  parentBundle: SegmentBundle | null,\n  // The per-pass static walk strategy; see pingRootRouteTree where\n  // it's derived.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): PrefetchTaskExitStatus.InProgress | PrefetchTaskExitStatus.Done {\n  // When Cache Components is enabled (or PPR, or a fully static route when PPR\n  // is disabled; those cases are treated equivalently to Cache Components), we\n  // start by prefetching each segment individually. Once we reach the \"new\"\n  // part of the tree — the part that doesn't exist on the current page — we\n  // may choose to switch to a runtime prefetch instead, based on the\n  // information sent by the server in the route tree.\n  //\n  // The traversal starts in the \"shared\" part of the tree. Once we reach the\n  // \"new\" part of the tree, we switch to a different traversal,\n  // pingNewPartOfCacheComponentsTree.\n\n  // The shared part of the tree always performs the ordinary static (PPR)\n  // prefetch, regardless of phase. Phase-specific strategies — the runtime\n  // shell request and the Shell phase's StaticShell walk — apply only to the\n  // new part of the tree, so the per-pass walk strategy is irrelevant here.\n  // (The needs-runtime signal is ignored: shared segments are already\n  // rendered on the current page, so a runtime prefetch has nothing to add.)\n  const bundleInProgress = accumulateSegmentBundle(\n    now,\n    task,\n    route,\n    newTree,\n    parentBundle,\n    FetchStrategy.PPR,\n    true\n  ).bundle\n\n  // Recursively ping the children.\n  const oldTreeChildren = oldTree[1]\n  const newTreeChildren = newTree.slots\n  if (newTreeChildren !== null) {\n    for (const [parallelRouteKey, newTreeChild] of newTreeChildren) {\n      if (!hasNetworkBandwidth(task)) {\n        // Stop prefetching segments until there's more bandwidth.\n        return PrefetchTaskExitStatus.InProgress\n      }\n      const newTreeChildSegment = newTreeChild.segment\n      const oldTreeChild: FlightRouterState | void =\n        oldTreeChildren[parallelRouteKey]\n      const oldTreeChildSegment: FlightRouterStateSegment | void =\n        oldTreeChild?.[0]\n      // Only pass the bundle to the child that accepts it. A parent is\n      // only ever bundled into one child.\n      const bundleForChild =\n        process.env.__NEXT_PREFETCH_INLINING &&\n        bundleInProgress !== null &&\n        newTreeChild.prefetchHints & PrefetchHint.ParentInlinedIntoSelf\n          ? bundleInProgress\n          : null\n      let childExitStatus\n      if (\n        oldTreeChildSegment !== undefined &&\n        doesCurrentSegmentMatchCachedSegment(\n          route,\n          newTreeChildSegment,\n          oldTreeChildSegment\n        )\n      ) {\n        // We're still in the \"shared\" part of the tree.\n        childExitStatus = pingSharedPartOfCacheComponentsTree(\n          now,\n          task,\n          route,\n          oldTreeChild,\n          newTreeChild,\n          bundleForChild,\n          fetchStrategy\n        )\n      } else {\n        // We've entered the \"new\" part of the tree. Switch\n        // traversal functions.\n        //\n        // Bundle chains must not cross the strategy boundary: the shared\n        // part walks at PPR while a Shell-phase new part walks at\n        // StaticShell, and a chain spanning both would fulfill the shared\n        // parent's concrete-path entry with shell-variant data. Nor may we\n        // finish the chain by fetching the new-part child at PPR here —\n        // that would prefetch new-part segments at the concrete tier\n        // during the Shell phase, which only the Speculative phase is\n        // allowed to do. So drop the bundle instead, exactly like the\n        // Speculative walk's subtree bail does when a chain crosses into a\n        // subtree it skips: nothing in a dropped chain was upgraded to\n        // Pending, so no entry is stranded, and the inlined shared data is\n        // fetched by the Speculative pass whenever its walk of the new\n        // part permits the child fetch.\n        const bundleForNewPart =\n          fetchStrategy === FetchStrategy.StaticShell ? null : bundleForChild\n        childExitStatus = pingNewPartOfCacheComponentsTree(\n          now,\n          task,\n          route,\n          newTreeChild,\n          bundleForNewPart,\n          fetchStrategy\n        )\n      }\n      if (childExitStatus === PrefetchTaskExitStatus.InProgress) {\n        // Child yielded without finishing.\n        return PrefetchTaskExitStatus.InProgress\n      }\n    }\n  }\n\n  return PrefetchTaskExitStatus.Done\n}\n\nfunction pingNewPartOfCacheComponentsTree(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  parentBundle: SegmentBundle | null,\n  // The per-pass static walk strategy; see pingRootRouteTree where\n  // it's derived.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): PrefetchTaskExitStatus.InProgress | PrefetchTaskExitStatus.Done {\n  // We're now prefetching in the \"new\" part of the tree, the part that\n  // doesn't exist on the current page. (In other words, we're deeper than\n  // the shared layouts.) Segments in here default to being prefetched\n  // statically, at the per-pass strategy derived in pingRootRouteTree.\n  //\n  // When the walk requires runtime completeness — an entry at least as\n  // complete as a runtime response for every segment before the prefetch\n  // can complete (see walkRequiresRuntimeCompleteness) — this function is\n  // also the per-segment decision point. If the segment's node carries the\n  // ShouldAttemptStaticPrefetch hint (the build-time prerender accessed no\n  // runtime data), its subtree is prefetched statically first,\n  // and the responses themselves decide whether that was enough: every\n  // fulfilled entry carries a needsRuntimeRequest signal. Pending responses\n  // block the task, so the attempt is serial, never raced: static attempt →\n  // observe → runtime only if needed. Without the hint, the segment deopts\n  // directly. Deopting registers the segment's request key in\n  // spawnedRuntimePrefetches; the runtime gate at the end of\n  // pingRootRouteTree issues a single batched runtime request for\n  // everything that accumulated, and that request re-fetches the whole\n  // subtree, so the walk stops descending at a deopt.\n  //\n  // Outside a runtime-completeness walk the same needsRuntimeRequest signal\n  // is routine and ignored — any partial entry of a page that accesses\n  // runtime data carries it, and the dynamic holes are filled by the\n  // navigation-time request.\n\n  if (\n    // Only the Speculative pass skips subtrees with nothing to speculatively\n    // prefetch. (It's also the only pass that walks at FetchStrategy.PPR;\n    // the Shell phase walks at StaticShell and covers the whole new tree.)\n    fetchStrategy === FetchStrategy.PPR &&\n    !subtreeHasSpeculativePrefetch(task.fetchStrategy, tree.prefetchHints)\n  ) {\n    // Nothing in the new part of the tree needs to be speculatively prefetched.\n    // Bail out.\n    return PrefetchTaskExitStatus.Done\n  }\n\n  // Constant for the whole pass; recomputed here only because the walk is\n  // recursive and the check is cheap.\n  const segmentRequiresRuntimeCompleteness = walkRequiresRuntimeCompleteness(\n    fetchStrategy,\n    route\n  )\n  // TODO: The static-attempt hint reflects the build-time prerender's whole\n  // runtime-data tracking, so a page that always accesses\n  // runtime data after the shell stage never attempts a static prefetch —\n  // even though its shell variant is rewindable at the shell boundary and\n  // perfectly reusable. The server could emit a second bit derived from the\n  // shell-stage value (\"a static SHELL attempt is worthwhile even though\n  // the page accesses runtime data post-shell\") to let such pages attempt\n  // static, too.\n  // A force-disabled segment deliberately does NOT deopt here: disabling\n  // prefetch is passive. It never initiates a request — its accumulation\n  // below contributes nothing — and must never be the reason a runtime\n  // prefetch spawns, though it may ride along in a runtime response issued\n  // on another segment's behalf.\n  const attemptStaticPrefetchOfSegment =\n    (tree.prefetchHints & PrefetchHint.ShouldAttemptStaticPrefetch) !== 0\n\n  if (segmentRequiresRuntimeCompleteness && !attemptStaticPrefetchOfSegment) {\n    // Deopt directly to a runtime prefetch, without a static attempt.\n    addSpawnedRuntimePrefetch(task, tree.requestKey)\n    // If there's a pending static bundle from a parent, we need to finish\n    // prefetching it before bailing out to runtime prefetching.\n    if (parentBundle !== null) {\n      finishStaticBundleOnRuntimeBailout(\n        now,\n        task,\n        route,\n        tree,\n        parentBundle,\n        fetchStrategy\n      )\n    }\n    return PrefetchTaskExitStatus.Done\n  }\n\n  // Prefetch this segment and its subtree statically, using the normal\n  // static bundling walk.\n  const accumulation = accumulateSegmentBundle(\n    now,\n    task,\n    route,\n    tree,\n    parentBundle,\n    fetchStrategy,\n    true\n  )\n  const bundleInProgress = accumulation.bundle\n\n  if (segmentRequiresRuntimeCompleteness && accumulation.needsRuntimeRequest) {\n    // The static attempt for this segment was insufficient. Stop the walk\n    // and deopt — the runtime prefetch covers the whole subtree. (Unlike the\n    // direct deopt above, any open bundle is dropped rather than finished: a\n    // fulfilled InlinedIntoChild node can report a true signal while its\n    // chain is still open. That's safe — nothing in an un-pinged chain was\n    // upgraded to Pending, so no entry is stranded blocking the task, and\n    // Empty entries in the dropped chain are re-fetched by a later pass.)\n    addSpawnedRuntimePrefetch(task, tree.requestKey)\n    return PrefetchTaskExitStatus.Done\n  }\n\n  if (tree.slots !== null) {\n    if (!hasNetworkBandwidth(task)) {\n      // Stop prefetching segments until there's more bandwidth.\n      return PrefetchTaskExitStatus.InProgress\n    }\n    // Recursively ping the children.\n    for (const childTree of tree.slots.values()) {\n      // Only pass the bundle to the child that accepts it. A parent is\n      // only ever bundled into one child.\n      const bundleForChild =\n        process.env.__NEXT_PREFETCH_INLINING &&\n        bundleInProgress !== null &&\n        childTree.prefetchHints & PrefetchHint.ParentInlinedIntoSelf\n          ? bundleInProgress\n          : null\n      const childResult = pingNewPartOfCacheComponentsTree(\n        now,\n        task,\n        route,\n        childTree,\n        bundleForChild,\n        fetchStrategy\n      )\n      if (childResult === PrefetchTaskExitStatus.InProgress) {\n        // Child yielded without finishing.\n        return PrefetchTaskExitStatus.InProgress\n      }\n    }\n  }\n\n  // The static attempt was sufficient for this segment (each child is its\n  // own decision point) — or parts of it are still in flight, in which case\n  // the task is blocked and the decision re-runs against the received\n  // responses.\n  return PrefetchTaskExitStatus.Done\n}\n\nfunction diffRouteTreeAgainstCurrent(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  oldTree: FlightRouterState,\n  newTree: RouteTree,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.LoadingBoundary\n): FlightRouterState {\n  // This is a single recursive traversal that does multiple things:\n  // - Finds the parts of the target route (newTree) that are not part of\n  //   of the current page (oldTree) by diffing them, using the same algorithm\n  //   as a real navigation.\n  // - Constructs a request tree (FlightRouterState) that describes which\n  //   segments need to be prefetched and which ones are already cached.\n  // - Creates a set of pending cache entries for the segments that need to\n  //   be prefetched, so that a subsequent prefetch task does not request the\n  //   same segments again.\n  const oldTreeChildren = oldTree[1]\n  const newTreeChildren = newTree.slots\n  let requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (newTreeChildren !== null) {\n    for (const [parallelRouteKey, newTreeChild] of newTreeChildren) {\n      const newTreeChildSegment = newTreeChild.segment\n      const oldTreeChild: FlightRouterState | void =\n        oldTreeChildren[parallelRouteKey]\n      const oldTreeChildSegment: FlightRouterStateSegment | void =\n        oldTreeChild?.[0]\n      if (\n        oldTreeChildSegment !== undefined &&\n        doesCurrentSegmentMatchCachedSegment(\n          route,\n          newTreeChildSegment,\n          oldTreeChildSegment\n        )\n      ) {\n        // This segment is already part of the current route. Keep traversing.\n        const requestTreeChild = diffRouteTreeAgainstCurrent(\n          now,\n          task,\n          route,\n          oldTreeChild,\n          newTreeChild,\n          spawnedEntries,\n          fetchStrategy\n        )\n        requestTreeChildren[parallelRouteKey] = requestTreeChild\n      } else {\n        // This segment is not part of the current route. We're entering a\n        // part of the tree that we need to prefetch (unless everything is\n        // already cached).\n        switch (fetchStrategy) {\n          case FetchStrategy.LoadingBoundary: {\n            // When PPR is disabled, we can't prefetch per segment. We must\n            // fallback to the old prefetch behavior and send a dynamic request.\n            // Only routes that include a loading boundary can be prefetched in\n            // this way.\n            //\n            // This is simlar to a \"full\" prefetch, but we're much more\n            // conservative about which segments to include in the request.\n            //\n            // The server will only render up to the first loading boundary\n            // inside new part of the tree. If there's no loading boundary\n            // anywhere in the tree, the server will never return any data, so\n            // we can skip the request.\n            const subtreeHasLoadingBoundary =\n              (newTreeChild.prefetchHints &\n                (PrefetchHint.SegmentHasLoadingBoundary |\n                  PrefetchHint.SubtreeHasLoadingBoundary)) !==\n              0\n            const requestTreeChild = subtreeHasLoadingBoundary\n              ? pingPPRDisabledRouteTreeUpToLoadingBoundary(\n                  now,\n                  task,\n                  route,\n                  newTreeChild,\n                  null,\n                  spawnedEntries\n                )\n              : // There's no loading boundary within this tree. Bail out.\n                convertRouteTreeToFlightRouterState(newTreeChild)\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          case FetchStrategy.PPRRuntime: {\n            // This is a runtime prefetch. Fetch all cacheable data in the tree,\n            // not just the static PPR shell.\n            const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n              now,\n              task,\n              route,\n              newTreeChild,\n              false,\n              spawnedEntries,\n              fetchStrategy\n            )\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          case FetchStrategy.Full: {\n            // This is a \"full\" prefetch. Fetch all the data in the tree, both\n            // static and dynamic. We issue roughly the same request that we\n            // would during a real navigation. The goal is that once the\n            // navigation occurs, the router should not have to fetch any\n            // additional data.\n            //\n            // Although the response will include dynamic data, opting into a\n            // Full prefetch — via <Link prefetch={true}> — implicitly\n            // instructs the cache to treat the response as \"static\", or non-\n            // dynamic, since the whole point is to cache it for\n            // future navigations.\n            //\n            // Construct a tree (currently a FlightRouterState) that represents\n            // which segments need to be prefetched and which ones are already\n            // cached. If the tree is empty, then we can exit. Otherwise, we'll\n            // send the request tree to the server and use the response to\n            // populate the segment cache.\n            const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n              now,\n              task,\n              route,\n              newTreeChild,\n              false,\n              spawnedEntries,\n              fetchStrategy\n            )\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          default:\n            fetchStrategy satisfies never\n        }\n      }\n    }\n  }\n  const requestTree: FlightRouterState = [\n    newTree.segment,\n    requestTreeChildren,\n    null,\n    null,\n  ]\n  if (newTree.prefetchHints !== 0) {\n    requestTree[4] = newTree.prefetchHints\n  }\n  return requestTree\n}\n\nfunction pingPPRDisabledRouteTreeUpToLoadingBoundary(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  refetchMarkerContext: 'refetch' | 'inside-shared-layout' | null,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): FlightRouterState {\n  // This function is similar to pingRouteTreeAndIncludeDynamicData, except the\n  // server is only going to return a minimal loading state — it will stop\n  // rendering at the first loading boundary. Whereas a Full prefetch is\n  // intentionally aggressive and tries to pretfetch all the data that will be\n  // needed for a navigation, a LoadingBoundary prefetch is much more\n  // conservative. For example, it will omit from the request tree any segment\n  // that is already cached, regardles of whether it's partial or full. By\n  // contrast, a Full prefetch will refetch partial segments.\n\n  // \"inside-shared-layout\" tells the server where to start looking for a\n  // loading boundary.\n  let refetchMarker: 'refetch' | 'inside-shared-layout' | null =\n    refetchMarkerContext === null ? 'inside-shared-layout' : null\n\n  const segment = readOrCreateSegmentCacheEntry(\n    now,\n    task.segmentCacheMap,\n    task.fetchStrategy,\n    tree\n  )\n  switch (segment.status) {\n    case EntryStatus.Empty: {\n      // This segment is not cached. Add a refetch marker so the server knows\n      // to start rendering here.\n      // TODO: Instead of a \"refetch\" marker, we could just omit this subtree's\n      // FlightRouterState from the request tree. I think this would probably\n      // already work even without any updates to the server. For consistency,\n      // though, I'll send the full tree and we'll look into this later as part\n      // of a larger redesign of the request protocol.\n\n      // Add the pending cache entry to the result map.\n      const pendingSegment = upgradeToPendingSegment(\n        segment,\n        // Set the fetch strategy to LoadingBoundary to indicate that the server\n        // might not include it in the pending response. If another route is able\n        // to issue a per-segment request, we'll do that in the background.\n        FetchStrategy.LoadingBoundary\n      )\n      spawnedEntries.set(tree.requestKey, pendingSegment)\n      // The pass blocks on every request it spawns, not just requests it\n      // finds already in flight.\n      blockTaskOnPendingResponse(task, pendingSegment)\n      if (refetchMarkerContext !== 'refetch') {\n        refetchMarker = refetchMarkerContext = 'refetch'\n      } else {\n        // There's already a parent with a refetch marker, so we don't need\n        // to add another one.\n      }\n      break\n    }\n    case EntryStatus.Fulfilled: {\n      // The segment is already cached.\n      const segmentHasLoadingBoundary =\n        (tree.prefetchHints & PrefetchHint.SegmentHasLoadingBoundary) !== 0\n      if (segmentHasLoadingBoundary) {\n        // This segment has a loading boundary, which means the server won't\n        // render its children. So there's nothing left to prefetch along this\n        // path. We can bail out.\n        return convertRouteTreeToFlightRouterState(tree)\n      }\n      // NOTE: If the cached segment were fetched using PPR, then it might be\n      // partial. We could get a more complete version of the segment by\n      // including it in this non-PPR request.\n      //\n      // We're intentionally choosing not to, though, because it's generally\n      // better to avoid doing a full prefetch whenever possible.\n      break\n    }\n    case EntryStatus.Pending: {\n      // There's another prefetch currently in progress. Don't add the refetch\n      // marker yet, so the server knows it can skip rendering this segment.\n      // The pass still depends on the in-flight response, so wait for it\n      // before the phase can complete.\n      blockTaskOnPendingResponse(task, segment)\n      break\n    }\n    case EntryStatus.Rejected: {\n      // The segment failed to load, or the server intentionally omitted it\n      // from a response (both are encoded as Rejected). Skip it and keep\n      // prefetching the rest of the tree; the entry's staleAt governs when it\n      // may be retried. Don't register the task on the rejected entry —\n      // nothing ever pings a Rejected entry.\n      break\n    }\n    default:\n      segment satisfies never\n  }\n  const requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (tree.slots !== null) {\n    for (const [parallelRouteKey, childTree] of tree.slots) {\n      requestTreeChildren[parallelRouteKey] =\n        pingPPRDisabledRouteTreeUpToLoadingBoundary(\n          now,\n          task,\n          route,\n          childTree,\n          refetchMarkerContext,\n          spawnedEntries\n        )\n    }\n  }\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    refetchMarker,\n  ]\n  if (tree.prefetchHints !== 0) {\n    requestTree[4] = tree.prefetchHints\n  }\n  return requestTree\n}\n\n/**\n * Called during a pass when a segment's response hasn't been received yet —\n * whether the request was just spawned by this pass or was already in flight.\n * Marks the task as blocked: a phase only completes once a full pass observes\n * every segment response it cares about, because later decisions (like\n * whether a segment needs a follow-up runtime request) are made against the\n * contents of those responses, and a phase may need to restart its work based\n * on what they contain. The task is re-pinged (via pingBlockedTasks in\n * cache.ts) when the entry resolves, re-running the pass against the\n * received data. Only a pass that observes every response may advance the\n * phase or complete the task.\n *\n * Never call this for an entry that's already Rejected — nothing ever pings\n * a Rejected entry, so registering on one would strand the task. A rejected\n * segment is simply skipped: the pass keeps prefetching the rest of the tree\n * without it.\n */\nfunction blockTaskOnPendingResponse(\n  task: PrefetchTask,\n  segment: { blockedTasks: Set<PrefetchTask> | null }\n): void {\n  // This state is reset after each iteration of the task queue. We use it to\n  // inform the scheduler that the task is blocked.\n  task.hasPendingResponses = true\n  // Add the task to this segment's blocked tasks, so it can be rescheduled\n  // once the segment finishes loading.\n  if (segment.blockedTasks === null) {\n    segment.blockedTasks = new Set([task])\n  } else {\n    segment.blockedTasks.add(task)\n  }\n}\n\nfunction pingRouteTreeAndIncludeDynamicData(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  isInsideRefetchingParent: boolean,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n): FlightRouterState {\n  // The tree we're constructing is the same shape as the tree we're navigating\n  // to. But even though this is a \"new\" tree, some of the individual segments\n  // may be cached as a result of other route prefetches.\n  //\n  // So we need to find the first uncached segment along each path add an\n  // explicit \"refetch\" marker so the server knows where to start rendering.\n  // Once the server starts rendering along a path, it keeps rendering the\n  // entire subtree.\n  const segment = readOrCreateSegmentCacheEntry(\n    now,\n    task.segmentCacheMap,\n    // Note that `fetchStrategy` might be different from `task.fetchStrategy`,\n    // and we have to use the former here.\n    // We can have a task with `FetchStrategy.PPR` where some of its segments are configured to\n    // always use runtime prefetching (via `export const prefetch`), and those should check for\n    // entries that include search params.\n    fetchStrategy,\n    tree\n  )\n\n  let spawnedSegment: PendingSegmentCacheEntry | null = null\n\n  switch (segment.status) {\n    case EntryStatus.Empty: {\n      // This segment is not cached.\n      if (fetchStrategy === FetchStrategy.Full) {\n        // Check if there's a matching entry in the bfcache. If so, fulfill the\n        // segment using the bfcache entry instead of issuing a new request.\n        const fulfilled = attemptToFulfillDynamicSegmentFromBFCache(\n          now,\n          segment,\n          tree\n        )\n        if (fulfilled !== null) {\n          break\n        }\n      }\n      // Include it in the request.\n      spawnedSegment = upgradeToPendingSegment(segment, fetchStrategy)\n      break\n    }\n    case EntryStatus.Fulfilled: {\n      // The segment is already cached.\n      if (\n        segment.isPartial &&\n        canNewFetchStrategyProvideMoreContent(\n          segment.fetchStrategy,\n          fetchStrategy\n        )\n      ) {\n        // The cached segment contains dynamic holes, and was prefetched using a\n        // less specific strategy than the current one. This means we're in one\n        // of these cases:\n        //   - we have a static prefetch, and we're doing a runtime prefetch\n        //   - we have a static or runtime prefetch, and we're doing a Full\n        //     prefetch (or a navigation).\n        // In either case, we need to include it in the request to get a more\n        // specific (or full) version. However, if there's a non-stale bfcache\n        // entry from a previous navigation, prefer that over making a new\n        // request.\n        if (fetchStrategy === FetchStrategy.Full) {\n          const fulfilled = attemptToUpgradeSegmentFromBFCache(\n            now,\n            task.segmentCacheMap,\n            tree\n          )\n          if (fulfilled !== null) {\n            break\n          }\n        }\n        spawnedSegment = pingFullSegmentRevalidation(\n          now,\n          task,\n          tree,\n          fetchStrategy\n        )\n      }\n      break\n    }\n    case EntryStatus.Pending:\n    case EntryStatus.Rejected: {\n      // There's either another prefetch currently in progress, or the previous\n      // attempt failed. If the new strategy can provide more content, fetch it again.\n      if (\n        canNewFetchStrategyProvideMoreContent(\n          segment.fetchStrategy,\n          fetchStrategy\n        )\n      ) {\n        spawnedSegment = pingFullSegmentRevalidation(\n          now,\n          task,\n          tree,\n          fetchStrategy\n        )\n      }\n      if (segment.status === EntryStatus.Pending) {\n        // A response for this segment is still in flight. The pass must\n        // observe it before the phase can complete.\n        blockTaskOnPendingResponse(task, segment)\n      } else {\n        // The segment failed to load, or the server intentionally omitted it\n        // from a response (both are encoded as Rejected). Skip it and keep\n        // prefetching the rest of the tree; the entry's staleAt governs when\n        // it may be retried. Don't register the task on the rejected entry —\n        // nothing ever pings a Rejected entry.\n        //\n        // TODO: The cache encodes real failures and intentional server\n        // omissions identically (both Rejected); with per-segment skipping\n        // this has no task-lifecycle consequence, but distinguishing them\n        // could still be useful someday.\n      }\n      break\n    }\n    default:\n      segment satisfies never\n  }\n\n  if (spawnedSegment !== null) {\n    // A pass must observe the response for every request it spawns before\n    // its phase can complete — not just requests it finds already in flight.\n    // Block on the entry we just spawned; the task is re-pinged when it's\n    // fulfilled or rejected.\n    blockTaskOnPendingResponse(task, spawnedSegment)\n  }\n\n  const requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (tree.slots !== null) {\n    for (const [parallelRouteKey, childTree] of tree.slots) {\n      requestTreeChildren[parallelRouteKey] =\n        pingRouteTreeAndIncludeDynamicData(\n          now,\n          task,\n          route,\n          childTree,\n          isInsideRefetchingParent || spawnedSegment !== null,\n          spawnedEntries,\n          fetchStrategy\n        )\n    }\n  }\n\n  if (spawnedSegment !== null) {\n    // Add the pending entry to the result map.\n    spawnedEntries.set(tree.requestKey, spawnedSegment)\n  }\n\n  // Don't bother to add a refetch marker if one is already present in a parent.\n  const refetchMarker =\n    !isInsideRefetchingParent && spawnedSegment !== null ? 'refetch' : null\n\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    refetchMarker,\n  ]\n  if (tree.prefetchHints !== 0) {\n    requestTree[4] = tree.prefetchHints\n  }\n  return requestTree\n}\n\nfunction pingRuntimePrefetches(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  spawnedRuntimePrefetches: Set<SegmentRequestKey>,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy: FetchStrategy.PPRRuntime | FetchStrategy.RuntimeShell\n): FlightRouterState {\n  // Construct a request tree (FlightRouterState) for a runtime prefetch. If\n  // a segment is part of the runtime prefetch, the tree is constructed by\n  // diffing against what's already in the prefetch cache. Otherwise, we send\n  // a regular FlightRouterState with no special markers.\n  //\n  // See pingRouteTreeAndIncludeDynamicData for details.\n  if (spawnedRuntimePrefetches.has(tree.requestKey)) {\n    // This segment needs a runtime prefetch.\n    return pingRouteTreeAndIncludeDynamicData(\n      now,\n      task,\n      route,\n      tree,\n      false,\n      spawnedEntries,\n      fetchStrategy\n    )\n  }\n  let requestTreeChildren: Record<string, FlightRouterState> = {}\n  const slots = tree.slots\n  if (slots !== null) {\n    for (const [parallelRouteKey, childTree] of slots) {\n      requestTreeChildren[parallelRouteKey] = pingRuntimePrefetches(\n        now,\n        task,\n        route,\n        childTree,\n        spawnedRuntimePrefetches,\n        spawnedEntries,\n        fetchStrategy\n      )\n    }\n  }\n\n  // This segment is not part of the runtime prefetch. Clone the base tree.\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    null,\n  ]\n  if (tree.prefetchHints !== 0) {\n    requestTree[4] = tree.prefetchHints\n  }\n  return requestTree\n}\n\n/**\n * Walk a SegmentBundle, apply status-based logic to each entry, and if any\n * entries need data, spawn a single fetch request for the whole bundle.\n *\n * Returns true if a fulfilled entry in the bundle reported that a runtime\n * request would return more content than the entry contains\n * (needsRuntimeRequest, derived at write time from the response that\n * produced the entry). The callers surface this signal to the per-segment\n * decision point in pingNewPartOfCacheComponentsTree (and its analog for\n * the head in pingStaticHead), which uses it during a static attempt to\n * decide whether to fall back to a runtime prefetch.\n */\nfunction pingSegmentBundle(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree,\n  segments: SegmentBundle,\n  // Per-pass static walk strategy; see pingRootRouteTree where it's derived.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell,\n  // False when finishing an open bundle chain on a runtime-prefetch bailout\n  // (finishStaticBundleOnRuntimeBailout). The finish exists only to fetch\n  // data the batched runtime request won't cover — Empty entries in the\n  // chain — so it must not spawn revalidations over entries that are\n  // already settled or in flight: the chain's terminal segments are inside\n  // the deopted subtree, and re-fetching their static bundle would at best\n  // duplicate the runtime request and at worst replace a runtime-complete\n  // entry (e.g. a runtime App Shell) with a less complete static fallback\n  // response.\n  spawnRevalidations: boolean\n): boolean {\n  let segmentCount = 0\n  let needsFetch = false\n  let needsRuntimeRequest = false\n  let node: SegmentBundle | null = segments\n  while (node !== null) {\n    segmentCount++\n    const nodeEntry = node.entry\n    const nodeTree = node.tree\n    if (nodeEntry === null || nodeTree === null) {\n      node = node.parent\n      continue\n    }\n    switch (nodeEntry.status) {\n      case EntryStatus.Empty:\n        upgradeToPendingSegment(nodeEntry, fetchStrategy)\n        needsFetch = true\n        // The pass blocks on every request it spawns, not just requests it\n        // finds already in flight.\n        blockTaskOnPendingResponse(task, nodeEntry)\n        break\n      case EntryStatus.Pending:\n        if (\n          spawnRevalidations &&\n          // During a static shell attempt, never spawn revalidations — just\n          // wait for the in-flight response (blocked below); its sufficiency\n          // is checked on the re-run pass.\n          fetchStrategy === FetchStrategy.PPR &&\n          canNewFetchStrategyProvideMoreContent(\n            nodeEntry.fetchStrategy,\n            fetchStrategy\n          )\n        ) {\n          const revalidatingEntry = readOrCreateRevalidatingSegmentEntry(\n            now,\n            task.segmentCacheMap,\n            fetchStrategy,\n            nodeTree\n          )\n          if (revalidatingEntry.status === EntryStatus.Empty) {\n            upgradeToPendingSegment(revalidatingEntry, fetchStrategy)\n            node.entry = revalidatingEntry\n            needsFetch = true\n            // Block on the revalidation request we just spawned, in\n            // addition to the original in-flight entry (blocked below).\n            blockTaskOnPendingResponse(task, revalidatingEntry)\n          } else {\n            node.entry = null\n          }\n        } else {\n          node.entry = null\n        }\n        blockTaskOnPendingResponse(task, nodeEntry)\n        break\n      case EntryStatus.Rejected:\n        if (\n          spawnRevalidations &&\n          // During a static shell attempt, a rejected entry is skipped\n          // outright: no retry revalidation, and — deliberately — no runtime\n          // fallback either (per-segment rejection semantics; the entry's\n          // staleAt governs when it may be retried). Note that the cache\n          // path encodes \"no shell exists\" (a static response whose shell\n          // byte offset is 0, i.e. the page wasn't produced by staged\n          // rendering) as a rejection too, so such segments get no shell\n          // prefetch at all — an edge that shouldn't occur for hint-set\n          // Cache Components routes.\n          fetchStrategy === FetchStrategy.PPR &&\n          canNewFetchStrategyProvideMoreContent(\n            nodeEntry.fetchStrategy,\n            fetchStrategy\n          )\n        ) {\n          const revalidatingEntry = readOrCreateRevalidatingSegmentEntry(\n            now,\n            task.segmentCacheMap,\n            fetchStrategy,\n            nodeTree\n          )\n          if (revalidatingEntry.status === EntryStatus.Empty) {\n            upgradeToPendingSegment(revalidatingEntry, fetchStrategy)\n            node.entry = revalidatingEntry\n            needsFetch = true\n            // Block on the retry revalidation we just spawned, like any\n            // other pending response. If the retry succeeds, its upsert\n            // evicts the rejected entry (see evictShadowingSegmentEntries\n            // in cache.ts) and the re-run pass reads the healed data. If it\n            // rejects too, the re-run observes a settled revalidation and\n            // moves on.\n            blockTaskOnPendingResponse(task, revalidatingEntry)\n          } else {\n            node.entry = null\n          }\n        } else {\n          node.entry = null\n        }\n        // The segment failed to load, or the server intentionally omitted it\n        // from a response (both are encoded as Rejected). Skip it and keep\n        // prefetching the rest of the bundle; the entry's staleAt governs\n        // when it may be retried. Don't register the task on the rejected\n        // entry itself — nothing ever pings a Rejected entry.\n        break\n      case EntryStatus.Fulfilled: {\n        const runtimeWouldProvideMore = wouldRuntimeRequestProvideMore(\n          nodeEntry,\n          fetchStrategy\n        )\n        if (runtimeWouldProvideMore) {\n          // A runtime request would return more content for this segment\n          // than the entry contains. Surface it via the return value, so the\n          // caller can deopt this subtree to a runtime prefetch.\n          needsRuntimeRequest = true\n        }\n\n        // For entries below this phase's tier, upgrade during the phase\n        // itself — no background deferral, since the whole point of the\n        // Speculative phase is to bring the cache up to the\n        // per-link-concrete tier. `isPartial` ensures a complete entry isn't\n        // re-fetched.\n        //\n        // Exception: when a runtime request would return more AND this walk\n        // permits one, skip the static path entirely. The runtime request\n        // covers this segment and supersedes anything a static fetch could\n        // add, so a static upgrade would at best duplicate it — delivering\n        // the same content twice — and at worst replace runtime content with\n        // static content.\n        //\n        // When no runtime request is permitted, the signal is irrelevant:\n        // nothing can act on it, so it must not suppress the static upgrade.\n        // That's what keeps a link prefetching static content on top of a\n        // cached shell.\n        const willBeSupersededByRuntimeRequest =\n          runtimeWouldProvideMore &&\n          walkRequiresRuntimeCompleteness(fetchStrategy, route)\n\n        // Check if we should attempt to upgrade a fallback ISR response to\n        // a concrete version.\n        const isUpgradeableISRFallbackRetry =\n          nodeEntry.isUpgradeableISRFallback &&\n          // If the status is empty, then we haven't yet attempted to upgrade\n          // the fallback.\n          //\n          // If the status is fulfilled, then the fallback was\n          // successfully upgraded to a concrete version.\n          //\n          // Do not attempt to upgrade if the status is Pending or Rejected.\n          (task.fallbackRetryStatus === EntryStatus.Empty ||\n            task.fallbackRetryStatus === EntryStatus.Fulfilled)\n\n        if (\n          spawnRevalidations &&\n          !willBeSupersededByRuntimeRequest &&\n          ((nodeEntry.isPartial &&\n            canNewFetchStrategyProvideMoreContent(\n              nodeEntry.fetchStrategy,\n              fetchStrategy\n            )) ||\n            isUpgradeableISRFallbackRetry)\n        ) {\n          const revalidatingEntry = readOrCreateRevalidatingSegmentEntry(\n            now,\n            task.segmentCacheMap,\n            fetchStrategy,\n            nodeTree\n          )\n          if (revalidatingEntry.status === EntryStatus.Empty) {\n            upgradeToPendingSegment(revalidatingEntry, fetchStrategy)\n            node.entry = revalidatingEntry\n            needsFetch = true\n            // The pass blocks on every request it spawns, including\n            // revalidations of an already-fulfilled entry.\n            blockTaskOnPendingResponse(task, revalidatingEntry)\n          } else {\n            // A non-empty revalidating entry means a request is already in\n            // flight (or recently settled), so we dedupe and don't issue a\n            // competing one — including for ISR-fallback upgrades, which then\n            // share the same revalidation across tasks.\n            node.entry = null\n            if (revalidatingEntry.status === EntryStatus.Pending) {\n              // The deduped-against revalidation is still in flight, and this\n              // pass depends on its response. Wait for it before the phase\n              // can complete. (A settled revalidation we chose not to use\n              // needs no waiting and is not a prefetch failure — the base\n              // entry here is already Fulfilled.)\n              blockTaskOnPendingResponse(task, revalidatingEntry)\n            }\n          }\n        } else {\n          node.entry = null\n        }\n        break\n      }\n      default:\n        nodeEntry satisfies never\n    }\n    node = node.parent\n  }\n  if (needsFetch) {\n    spawnPrefetchSubtask(\n      fetchSegmentsOnCacheMiss(\n        task,\n        route,\n        routeKey,\n        tree,\n        segments,\n        segmentCount,\n        fetchStrategy\n      )\n    )\n  }\n  return needsRuntimeRequest\n}\n\n/**\n * During the tree walk, decide whether this segment should be added to the\n * in-progress bundle (if it has InlinedIntoChild) or finalize the bundle\n * and ping it, triggering a fetch if any of its entries need data (if it\n * doesn't). Returns the updated bundle to pass to children (null if the\n * bundle was finalized here), along with the needs-runtime signal from the\n * bundle ping, if one happened (always false otherwise).\n */\nfunction accumulateSegmentBundle(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  parentBundle: SegmentBundle | null,\n  // Per-pass static walk strategy; see pingRootRouteTree where it's derived.\n  // PPR for the normal static bundling walk; StaticShell during the Shell\n  // phase's static App Shell attempt, whose entries are keyed at the shell\n  // vary paths.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell,\n  // False when finishing a chain on a runtime-prefetch bailout; see\n  // pingSegmentBundle.\n  spawnRevalidations: boolean\n): { bundle: SegmentBundle | null; needsRuntimeRequest: boolean } {\n  // Prefetching is disabled for this segment (prefetch: 'force-disabled'):\n  // the server emits null for its slot, and it participates in the bundle\n  // chain with null tree/entry so the null-slot positions line up.\n  // (Partial Prefetching segments are NOT in this mask — the server emits\n  // static data for them unconditionally.) Intentionally not gated by the\n  // prefetch inlining flag: we never statically prefetch unprefetchable\n  // segments.\n  if (tree.prefetchHints & StaticPrefetchDisabled) {\n    return {\n      bundle: { tree: null, entry: null, parent: parentBundle },\n      needsRuntimeRequest: false,\n    }\n  }\n\n  const segment = readOrCreateSegmentCacheEntry(\n    now,\n    task.segmentCacheMap,\n    fetchStrategy,\n    tree\n  )\n\n  if (\n    process.env.__NEXT_PREFETCH_INLINING &&\n    tree.prefetchHints & PrefetchHint.InlinedIntoChild\n  ) {\n    if (segment.status === EntryStatus.Pending) {\n      // The chain this entry joins may be dropped before it's ever pinged\n      // (see the drop sites in pingNewPartOfCacheComponentsTree), and only\n      // the ping blocks on Pending entries. Register on the in-flight\n      // response at read time instead, so the pass observes it before the\n      // phase can complete even if the chain is dropped. When the chain does\n      // get pinged, the ping's own registration dedupes against this one.\n      blockTaskOnPendingResponse(task, segment)\n    }\n    return {\n      bundle: { tree, entry: segment, parent: parentBundle },\n      // No bundle ping happens here, but the node's own entry may already be\n      // fulfilled and insufficient. Report that signal directly: the chain\n      // ping only reaches the terminal descendant, and if that descendant is\n      // itself a decision point it consumes the signal for its own subtree,\n      // leaving this ancestor's insufficiency invisible to the decision\n      // point above it.\n      needsRuntimeRequest:\n        segment.status === EntryStatus.Fulfilled &&\n        wouldRuntimeRequestProvideMore(segment, fetchStrategy),\n    }\n  }\n\n  // Not bundled. Build a single-node bundle and ping it. If this page\n  // accepts the head (HeadInlinedIntoSelf), prepend the head's cache entry\n  // to the bundle.\n  let effectiveParent: SegmentBundle | null = parentBundle\n  if (\n    process.env.__NEXT_PREFETCH_INLINING &&\n    tree.prefetchHints & PrefetchHint.HeadInlinedIntoSelf\n  ) {\n    effectiveParent = {\n      tree: route.metadata,\n      entry: readOrCreateSegmentCacheEntry(\n        now,\n        task.segmentCacheMap,\n        fetchStrategy,\n        route.metadata\n      ),\n      parent: parentBundle,\n    }\n  }\n\n  const segments: SegmentBundle = {\n    tree,\n    entry: segment,\n    parent: effectiveParent,\n  }\n\n  const needsRuntimeRequest = pingSegmentBundle(\n    now,\n    task,\n    route,\n    task.key,\n    tree,\n    segments,\n    fetchStrategy,\n    spawnRevalidations\n  )\n  return { bundle: null, needsRuntimeRequest }\n}\n\nfunction finishStaticBundleOnRuntimeBailout(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  parentBundle: SegmentBundle,\n  // The same static walk strategy the parent bundle was accumulated with.\n  // Any needs-runtime signal from finishing the bundle is dropped: the\n  // caller is already deopting this subtree to a runtime prefetch.\n  fetchStrategy: FetchStrategy.PPR | FetchStrategy.StaticShell\n): void {\n  const bundle = accumulateSegmentBundle(\n    now,\n    task,\n    route,\n    tree,\n    parentBundle,\n    fetchStrategy,\n    // The batched runtime request covers the deopted subtree; only fetch\n    // Empty entries the chain would otherwise strand — never spawn\n    // revalidations over settled or in-flight ones. See pingSegmentBundle.\n    false\n  ).bundle\n  if (bundle === null) {\n    return\n  }\n  if (tree.slots !== null) {\n    for (const childTree of tree.slots.values()) {\n      if (childTree.prefetchHints & PrefetchHint.ParentInlinedIntoSelf) {\n        finishStaticBundleOnRuntimeBailout(\n          now,\n          task,\n          route,\n          childTree,\n          bundle,\n          fetchStrategy\n        )\n        return\n      }\n    }\n  }\n}\n\nfunction pingFullSegmentRevalidation(\n  now: number,\n  task: PrefetchTask,\n  tree: RouteTree,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.RuntimeShell\n): PendingSegmentCacheEntry | null {\n  const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(\n    now,\n    task.segmentCacheMap,\n    fetchStrategy,\n    tree\n  )\n  if (revalidatingSegment.status === EntryStatus.Empty) {\n    // During a Full/PPRRuntime prefetch, a single dynamic request is made for all the\n    // segments that we need. So we don't initiate a request here directly. By\n    // returning a pending entry from this function, it signals to the caller\n    // that this segment should be included in the request that's sent to\n    // the server.\n    const pendingSegment = upgradeToPendingSegment(\n      revalidatingSegment,\n      fetchStrategy\n    )\n    // The upsert is handled by fulfillEntrySpawnedByRuntimePrefetch\n    // when the dynamic prefetch response is written into the cache.\n    return pendingSegment\n  } else {\n    // There's already a revalidation in progress.\n    const nonEmptyRevalidatingSegment = revalidatingSegment\n    if (\n      canNewFetchStrategyProvideMoreContent(\n        nonEmptyRevalidatingSegment.fetchStrategy,\n        fetchStrategy\n      )\n    ) {\n      // The existing revalidation was fetched using a less specific strategy.\n      // Reset it and start a new revalidation.\n      const emptySegment = overwriteRevalidatingSegmentCacheEntry(\n        now,\n        task.segmentCacheMap,\n        fetchStrategy,\n        tree\n      )\n      const pendingSegment = upgradeToPendingSegment(\n        emptySegment,\n        fetchStrategy\n      )\n      // The upsert is handled by fulfillEntrySpawnedByRuntimePrefetch\n      // when the dynamic prefetch response is written into the cache.\n      return pendingSegment\n    }\n    switch (nonEmptyRevalidatingSegment.status) {\n      case EntryStatus.Pending:\n        // There's already an in-progress prefetch that includes this segment.\n        // The pass needs the contents of that response, too. Wait for it\n        // before the phase can complete.\n        blockTaskOnPendingResponse(task, nonEmptyRevalidatingSegment)\n        return null\n      case EntryStatus.Fulfilled:\n      case EntryStatus.Rejected:\n        // A previous revalidation attempt finished, but we chose not to replace\n        // the existing entry in the cache. Don't try again until or unless the\n        // revalidation entry expires.\n        return null\n      default:\n        nonEmptyRevalidatingSegment satisfies never\n        return null\n    }\n  }\n}\n\nfunction doesCurrentSegmentMatchCachedSegment(\n  route: FulfilledRouteCacheEntry,\n  currentSegment: Segment,\n  cachedSegment: Segment\n): boolean {\n  if (cachedSegment === PAGE_SEGMENT_KEY) {\n    // In the FlightRouterState stored by the router, the page segment has the\n    // rendered search params appended to the name of the segment. In the\n    // prefetch cache, however, this is stored separately. So, when comparing\n    // the router's current FlightRouterState to the cached FlightRouterState,\n    // we need to make sure we compare both parts of the segment.\n    // TODO: This is not modeled clearly. We use the same type,\n    // FlightRouterState, for both the CacheNode tree _and_ the prefetch cache\n    // _and_ the server response format, when conceptually those are three\n    // different things and treated in different ways. We should encode more of\n    // this information into the type design so mistakes are less likely.\n    return (\n      currentSegment ===\n      addSearchParamsIfPageSegment(\n        PAGE_SEGMENT_KEY,\n        urlSearchParamsToParsedUrlQuery(\n          new URLSearchParams(route.renderedSearch)\n        )\n      )\n    )\n  }\n  // Non-page segments are compared using the same function as the server\n  return matchSegment(cachedSegment, currentSegment)\n}\n\n/**\n * Decides whether to skip the speculative prefetch of a subtree. Usually we\n * only perform a speculative prefetch if the Link's prefetch prop is set to\n * true. However, we also will do a speculative prefetch if the prefetching\n * mode of the segment is set to \"unstable_eager\".\n */\nexport function subtreeHasSpeculativePrefetch(\n  fetchStrategy: FetchStrategy,\n  prefetchHints: number\n): boolean {\n  return (\n    // Check if this is a \"full\" prefetch (<Link prefetch={true}>).\n    fetchStrategy === FetchStrategy.Full ||\n    // Check if something in this subtree is configured to be eagerly\n    // prefetched at the route level. Segments that don't opt into Partial\n    // Prefetching are marked eager, so a route without any Partial Prefetching\n    // still speculatively prefetches everything.\n    (prefetchHints & PrefetchHint.SubtreeHasEagerPrefetch) !== 0\n  )\n}\n\n// -----------------------------------------------------------------------------\n// The remainder of the module is a MinHeap implementation. Try not to put any\n// logic below here unless it's related to the heap algorithm. We can extract\n// this to a separate module if/when we need multiple kinds of heaps.\n// -----------------------------------------------------------------------------\n\nfunction compareQueuePriority(a: PrefetchTask, b: PrefetchTask) {\n  // Since the queue is a MinHeap, this should return a positive number if b is\n  // higher priority than a, and a negative number if a is higher priority\n  // than b.\n\n  // `priority` is an integer, where higher numbers are higher priority.\n  const priorityDiff = b.priority - a.priority\n  if (priorityDiff !== 0) {\n    return priorityDiff\n  }\n\n  // If the priority is the same, check which phase the prefetch is in — is it\n  // prefetching the route tree, or the segments? Route trees are prioritized.\n  const phaseDiff = b.phase - a.phase\n  if (phaseDiff !== 0) {\n    return phaseDiff\n  }\n\n  // Finally, check the insertion order. `sortId` is an incrementing counter\n  // assigned to prefetches. We want to process the newest prefetches first.\n  return b.sortId - a.sortId\n}\n\nfunction heapPush(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = heap.length\n  heap.push(node)\n  node._heapIndex = index\n  heapSiftUp(heap, node, index)\n}\n\nfunction heapPeek(heap: Array<PrefetchTask>): PrefetchTask | null {\n  return heap.length === 0 ? null : heap[0]\n}\n\nfunction heapPop(heap: Array<PrefetchTask>): PrefetchTask | null {\n  if (heap.length === 0) {\n    return null\n  }\n  const first = heap[0]\n  first._heapIndex = -1\n  const last = heap.pop() as PrefetchTask\n  if (last !== first) {\n    heap[0] = last\n    last._heapIndex = 0\n    heapSiftDown(heap, last, 0)\n  }\n  return first\n}\n\nfunction heapDelete(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = node._heapIndex\n  if (index !== -1) {\n    node._heapIndex = -1\n    if (heap.length !== 0) {\n      const last = heap.pop() as PrefetchTask\n      if (last !== node) {\n        heap[index] = last\n        last._heapIndex = index\n        heapSiftDown(heap, last, index)\n      }\n    }\n  }\n}\n\nfunction heapResift(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = node._heapIndex\n  if (index !== -1) {\n    if (index === 0) {\n      heapSiftDown(heap, node, 0)\n    } else {\n      const parentIndex = (index - 1) >>> 1\n      const parent = heap[parentIndex]\n      if (compareQueuePriority(parent, node) > 0) {\n        // The parent is larger. Sift up.\n        heapSiftUp(heap, node, index)\n      } else {\n        // The parent is smaller (or equal). Sift down.\n        heapSiftDown(heap, node, index)\n      }\n    }\n  }\n}\n\nfunction heapSiftUp(\n  heap: Array<PrefetchTask>,\n  node: PrefetchTask,\n  i: number\n): void {\n  let index = i\n  while (index > 0) {\n    const parentIndex = (index - 1) >>> 1\n    const parent = heap[parentIndex]\n    if (compareQueuePriority(parent, node) > 0) {\n      // The parent is larger. Swap positions.\n      heap[parentIndex] = node\n      node._heapIndex = parentIndex\n      heap[index] = parent\n      parent._heapIndex = index\n\n      index = parentIndex\n    } else {\n      // The parent is smaller. Exit.\n      return\n    }\n  }\n}\n\nfunction heapSiftDown(\n  heap: Array<PrefetchTask>,\n  node: PrefetchTask,\n  i: number\n): void {\n  let index = i\n  const length = heap.length\n  const halfLength = length >>> 1\n  while (index < halfLength) {\n    const leftIndex = (index + 1) * 2 - 1\n    const left = heap[leftIndex]\n    const rightIndex = leftIndex + 1\n    const right = heap[rightIndex]\n\n    // If the left or right node is smaller, swap with the smaller of those.\n    if (compareQueuePriority(left, node) < 0) {\n      if (rightIndex < length && compareQueuePriority(right, left) < 0) {\n        heap[index] = right\n        right._heapIndex = index\n        heap[rightIndex] = node\n        node._heapIndex = rightIndex\n\n        index = rightIndex\n      } else {\n        heap[index] = left\n        left._heapIndex = index\n        heap[leftIndex] = node\n        node._heapIndex = leftIndex\n\n        index = leftIndex\n      }\n    } else if (rightIndex < length && compareQueuePriority(right, node) < 0) {\n      heap[index] = right\n      right._heapIndex = index\n      heap[rightIndex] = node\n      node._heapIndex = rightIndex\n\n      index = rightIndex\n    } else {\n      // Neither child is smaller. Exit.\n      return\n    }\n  }\n}\n","/**\n * Shared types and constants for the Segment Cache.\n */\n\nexport const enum NavigationResultTag {\n  MPA,\n  Success,\n  NoOp,\n  Async,\n}\n\n/**\n * The priority of the prefetch task. Higher numbers are higher priority.\n */\nexport const enum PrefetchPriority {\n  /**\n   * Assigned to the most recently hovered/touched link. Special network\n   * bandwidth is reserved for this task only. There's only ever one Intent-\n   * priority task at a time; when a new Intent task is scheduled, the previous\n   * one is bumped down to Default.\n   */\n  Intent = 2,\n  /**\n   * The default priority for prefetch tasks.\n   */\n  Default = 1,\n  /**\n   * Assigned to tasks when they spawn non-blocking background work, like\n   * revalidating a partially cached entry to see if more data is available.\n   */\n  Background = 0,\n}\n\nexport const enum FetchStrategy {\n  // Deliberately ordered so we can easily compare two segments\n  // and determine if one segment is \"more specific\" than another\n  // (i.e. if it's likely that it contains more data). See\n  // canNewFetchStrategyProvideMoreContent in cache.ts for what each tier can\n  // contain relative to the others.\n  //\n  // These numeric values are client-internal and never cross the wire — the\n  // `next-router-prefetch` request header values are mapped explicitly in\n  // fetchSegmentPrefetchesUsingDynamicRequest (cache.ts) — so the members can\n  // be renumbered freely as long as the relative order is preserved.\n  LoadingBoundary = 0,\n  // The App Shell variant extracted from a static per-segment prefetch\n  // response: every segment's param-dependent content is reduced to pending\n  // references that render as the param fallback. Less complete than\n  // RuntimeShell — a static response can't include content that depends on\n  // session data (cookies, headers) — and less complete than PPR at concrete\n  // paths, which includes prerendered param-dependent content.\n  StaticShell = 1,\n  RuntimeShell = 2,\n  PPR = 3,\n  PPRRuntime = 4,\n  Full = 5,\n}\n\n/**\n * A subset of fetch strategies used for prefetch tasks.\n * A prefetch task can't know if it should use `PPR` or `LoadingBoundary`\n * until we complete the initial tree prefetch request, so we use `PPR` to signal both cases\n * and adjust it based on the route when actually fetching.\n * */\nexport type PrefetchTaskFetchStrategy =\n  | FetchStrategy.PPR\n  | FetchStrategy.PPRRuntime\n  | FetchStrategy.Full\n","import { FetchStrategy } from './types'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n  NormalizedNextUrl,\n} from './cache-key'\nimport type { RouteTree } from './cache'\nimport { Fallback, type FallbackType } from './cache-map'\nimport { HEAD_REQUEST_KEY } from '../../../shared/lib/segment-cache/segment-value-encoding'\n\ntype Opaque<T, K> = T & { __brand: K }\n\n/**\n * A linked-list of all the params (or other param-like) inputs that a cache\n * entry may vary by. This is used by the CacheMap module to reuse cache entries\n * across different param values. If a param has a value of Fallback, it means\n * the cache entry is reusable for all possible values of that param. See\n * cache-map.ts for details.\n *\n * A segment's vary path is a pure function of a segment's position in a\n * particular route tree and the (post-rewrite) URL that is being queried. More\n * concretely, successive queries of the cache for the same segment always use\n * the same vary path.\n *\n * A route's vary path is simpler: it's comprised of the pathname, search\n * string, and Next-URL header.\n */\nexport type VaryPath = {\n  /**\n   * Identifies which param this vary path node corresponds to. Used by\n   * getFulfilledSegmentVaryPath to determine which params to replace with\n   * Fallback based on the varyParams set from the server.\n   *\n   * - For path params: the param name (e.g., 'slug')\n   * - For search params: '?'\n   * - For non-param nodes (request keys, etc.): null\n   */\n  id: string | null\n  value: string | null | FallbackType\n  /**\n   * Whether this node corresponds to a root param — a path param at or above\n   * the application's root layout. Root params may appear in the App Shell, so\n   * the shell vary path keeps their concrete value instead of replacing it with\n   * Fallback. See getShellSegmentVaryPath. Only ever true on path param nodes;\n   * false for structural and search param nodes.\n   *\n   * Always a boolean (never undefined) so that every VaryPath node shares a\n   * single hidden class, keeping the cache hot paths monomorphic.\n   */\n  isRootParam: boolean\n  parent: VaryPath | null\n}\n\n// Because it's so important for vary paths to line up across cache accesses,\n// we use opaque type aliases to ensure these are only created within\n// this module.\n\n// requestKey -> searchParams -> nextUrl\nexport type RouteVaryPath = Opaque<\n  {\n    id: null\n    value: NormalizedPathname\n    isRootParam: false\n    parent: {\n      id: '?'\n      value: NormalizedSearch\n      isRootParam: false\n      parent: {\n        id: null\n        value: NormalizedNextUrl | null | FallbackType\n        isRootParam: false\n        parent: null\n      }\n    }\n  },\n  'RouteVaryPath'\n>\n\n// requestKey -> pathParams\nexport type LayoutVaryPath = Opaque<\n  {\n    id: null\n    value: string\n    isRootParam: false\n    parent: PartialSegmentVaryPath | null\n  },\n  'LayoutVaryPath'\n>\n\n// requestKey -> searchParams -> pathParams\nexport type PageVaryPath = Opaque<\n  {\n    id: null\n    value: string\n    isRootParam: false\n    parent: {\n      id: '?'\n      value: NormalizedSearch | FallbackType\n      isRootParam: false\n      parent: PartialSegmentVaryPath | null\n    }\n  },\n  'PageVaryPath'\n>\n\nexport type SegmentVaryPath = LayoutVaryPath | PageVaryPath\n\n// Intermediate type used when building a vary path during a recursive traversal\n// of the route tree.\nexport type PartialSegmentVaryPath = Opaque<VaryPath, 'PartialSegmentVaryPath'>\n\nexport function getRouteVaryPath(\n  pathname: NormalizedPathname,\n  search: NormalizedSearch,\n  nextUrl: NormalizedNextUrl | null\n): RouteVaryPath {\n  // requestKey -> searchParams -> nextUrl\n  const varyPath: VaryPath = {\n    id: null,\n    value: pathname,\n    isRootParam: false,\n    parent: {\n      id: '?',\n      value: search,\n      isRootParam: false,\n      parent: {\n        id: null,\n        value: nextUrl,\n        isRootParam: false,\n        parent: null,\n      },\n    },\n  }\n  return varyPath as RouteVaryPath\n}\n\nexport function getFulfilledRouteVaryPath(\n  pathname: NormalizedPathname,\n  search: NormalizedSearch,\n  nextUrl: NormalizedNextUrl | null,\n  couldBeIntercepted: boolean\n): RouteVaryPath {\n  // This is called when a route's data is fulfilled. The cache entry will be\n  // re-keyed based on which inputs the response varies by.\n  // requestKey -> searchParams -> nextUrl\n  const varyPath: VaryPath = {\n    id: null,\n    value: pathname,\n    isRootParam: false,\n    parent: {\n      id: '?',\n      value: search,\n      isRootParam: false,\n      parent: {\n        id: null,\n        value: couldBeIntercepted ? nextUrl : Fallback,\n        isRootParam: false,\n        parent: null,\n      },\n    },\n  }\n  return varyPath as RouteVaryPath\n}\n\nexport function appendLayoutVaryPath(\n  parentPath: PartialSegmentVaryPath | null,\n  cacheKey: string,\n  paramName: string,\n  isRootParam: boolean\n): PartialSegmentVaryPath {\n  const varyPathPart: VaryPath = {\n    id: paramName,\n    value: cacheKey,\n    isRootParam,\n    parent: parentPath,\n  }\n  return varyPathPart as PartialSegmentVaryPath\n}\n\nexport function finalizeLayoutVaryPath(\n  requestKey: string,\n  varyPath: PartialSegmentVaryPath | null\n): LayoutVaryPath {\n  const layoutVaryPath: VaryPath = {\n    id: null,\n    value: requestKey,\n    isRootParam: false,\n    parent: varyPath,\n  }\n  return layoutVaryPath as LayoutVaryPath\n}\n\nexport function getPartialLayoutVaryPath(\n  finalizedVaryPath: LayoutVaryPath\n): PartialSegmentVaryPath | null {\n  // This is the inverse of finalizeLayoutVaryPath.\n  return finalizedVaryPath.parent\n}\n\nexport function finalizePageVaryPath(\n  requestKey: string,\n  renderedSearch: NormalizedSearch,\n  varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n  // Unlike layouts, a page segment's vary path also includes the search string.\n  // requestKey -> searchParams -> pathParams\n  const pageVaryPath: VaryPath = {\n    id: null,\n    value: requestKey,\n    isRootParam: false,\n    parent: {\n      id: '?',\n      value: renderedSearch,\n      isRootParam: false,\n      parent: varyPath,\n    },\n  }\n  return pageVaryPath as PageVaryPath\n}\n\nexport function getPartialPageVaryPath(\n  finalizedVaryPath: PageVaryPath\n): PartialSegmentVaryPath | null {\n  // This is the inverse of finalizePageVaryPath.\n  return finalizedVaryPath.parent.parent\n}\n\nexport function finalizeMetadataVaryPath(\n  pageRequestKey: string,\n  renderedSearch: NormalizedSearch,\n  varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n  // The metadata \"segment\" is not a real segment because it doesn't exist in\n  // the normal structure of the route tree, but in terms of caching, it\n  // behaves like a page segment because it varies by all the same params as\n  // a page.\n  //\n  // To keep the protocol for querying the server simple, the request key for\n  // the metadata does not include any path information. It's unnecessary from\n  // the server's perspective, because unlike page segments, there's only one\n  // metadata response per URL, i.e. there's no need to distinguish multiple\n  // parallel pages.\n  //\n  // However, this means the metadata request key is insufficient for\n  // caching the the metadata in the client cache, because on the client we\n  // use the request key to distinguish the metadata entry from all other\n  // page's metadata entries.\n  //\n  // So instead we create a simulated request key based on the page segment.\n  // Conceptually this is equivalent to the request key the server would have\n  // assigned the metadata segment if it treated it as part of the actual\n  // route structure.\n\n  // If there are multiple parallel pages, we use whichever is the first one.\n  // This is fine because the only difference between request keys for\n  // different parallel pages are things like route groups and parallel\n  // route slots. As long as it's always the same one, it doesn't matter.\n  const pageVaryPath: VaryPath = {\n    id: null,\n    // Append the actual metadata request key to the page request key. Note\n    // that we're not using a separate vary path part; it's unnecessary because\n    // these are not conceptually separate inputs.\n    value: pageRequestKey + HEAD_REQUEST_KEY,\n    isRootParam: false,\n    parent: {\n      id: '?',\n      value: renderedSearch,\n      isRootParam: false,\n      parent: varyPath,\n    },\n  }\n  return pageVaryPath as PageVaryPath\n}\n\nexport function getSegmentVaryPathForRequest(\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentVaryPath {\n  // This is used for storing pending requests in the cache. We want to choose\n  // the most generic vary path based on the strategy used to fetch it, i.e.\n  // static/PPR versus runtime prefetching, so that it can be reused as much\n  // as possible.\n  //\n  // We may be able to re-key the response to something even more generic once\n  // we receive it — for example, if the server tells us that the response\n  // doesn't vary on a particular param — but even before we send the request,\n  // we know some params are reusable based on the fetch strategy alone. For\n  // example, a static prefetch will never vary on search params.\n  //\n  // The original vary path with all the params filled in is stored on the\n  // route tree object. We will clone this one to create a new vary path\n  // where certain params are replaced with Fallback.\n  //\n  // This result of this function is not stored anywhere. It's only used to\n  // access the cache a single time.\n  //\n  // TODO: Rather than create a new list object just to access the cache, the\n  // plan is to add the concept of a \"vary mask\". This will represent all the\n  // params that can be treated as Fallback. (Or perhaps the inverse.)\n  const originalVaryPath = tree.varyPath\n\n  if (\n    fetchStrategy === FetchStrategy.RuntimeShell ||\n    fetchStrategy === FetchStrategy.StaticShell\n  ) {\n    // Both shell strategies produce the App Shell variant of a segment —\n    // RuntimeShell via a runtime render with non-root params omitted,\n    // StaticShell by truncating a static per-segment response at the shell\n    // byte boundary. Either way, the resulting entry is reusable across all\n    // concrete values of the non-root params, so we key it at the precomputed\n    // shell vary path (every non-root param substituted with Fallback; root\n    // params keep their concrete value).\n    return tree.shellVaryPath\n  }\n\n  // Only page segments (and the special \"metadata\" segment, which is treated\n  // like a page segment for the purposes of caching) may contain search\n  // params. There's no reason to include them in the vary path otherwise.\n  if (tree.isPage) {\n    // Only a runtime prefetch will include search params in the vary path.\n    // Static prefetches never include search params, so they can be reused\n    // across all possible search param values.\n    const doesVaryOnSearchParams =\n      fetchStrategy === FetchStrategy.Full ||\n      fetchStrategy === FetchStrategy.PPRRuntime\n\n    if (!doesVaryOnSearchParams) {\n      // The response from the the server will not vary on search params. Clone\n      // the end of the original vary path to replace the search params\n      // with Fallback.\n      //\n      // requestKey -> searchParams -> pathParams\n      //               ^ This part gets replaced with Fallback\n      const searchParamsVaryPath = (originalVaryPath as PageVaryPath).parent\n      const pathParamsVaryPath = searchParamsVaryPath.parent\n      const patchedVaryPath: VaryPath = {\n        id: null,\n        value: originalVaryPath.value,\n        isRootParam: false,\n        parent: {\n          id: '?',\n          value: Fallback,\n          isRootParam: false,\n          parent: pathParamsVaryPath,\n        },\n      }\n      return patchedVaryPath as SegmentVaryPath\n    }\n  }\n\n  // The request does vary on search params. We don't need to modify anything.\n  return originalVaryPath as SegmentVaryPath\n}\n\nexport function clonePageVaryPathWithNewSearchParams(\n  originalVaryPath: PageVaryPath,\n  newSearch: NormalizedSearch\n): PageVaryPath {\n  // requestKey -> searchParams -> pathParams\n  //               ^ This part gets replaced with newSearch\n  const searchParamsVaryPath = originalVaryPath.parent\n  const clonedVaryPath: VaryPath = {\n    id: null,\n    value: originalVaryPath.value,\n    isRootParam: false,\n    parent: {\n      id: '?',\n      value: newSearch,\n      isRootParam: false,\n      parent: searchParamsVaryPath.parent,\n    },\n  }\n  return clonedVaryPath as PageVaryPath\n}\n\nexport function getRenderedSearchFromVaryPath(\n  varyPath: PageVaryPath\n): NormalizedSearch | null {\n  const searchParams = varyPath.parent.value\n  return typeof searchParams === 'string'\n    ? (searchParams as NormalizedSearch)\n    : null\n}\n\nexport function getFulfilledSegmentVaryPath(\n  original: VaryPath,\n  varyParams: Set<string>\n): SegmentVaryPath {\n  // Re-keys a segment's vary path based on which params the segment actually\n  // depends on. Params that are NOT in the varyParams set are replaced with\n  // Fallback, allowing the cache entry to be reused across different values of\n  // those params.\n\n  // This is called when a segment is fulfilled with data from the server. The\n  // varyParams set comes from the server and indicates which params were\n  // accessed during rendering.\n  const clone: VaryPath = {\n    id: original.id,\n    // If the id is null, this node is not a param (e.g., it's a request key).\n    // If the id is in the varyParams set, keep the original value.\n    // Otherwise, replace with Fallback to make it reusable.\n    value:\n      original.id === null || varyParams.has(original.id)\n        ? original.value\n        : Fallback,\n    isRootParam: original.isRootParam,\n    parent:\n      original.parent === null\n        ? null\n        : getFulfilledSegmentVaryPath(original.parent, varyParams),\n  }\n  return clone as SegmentVaryPath\n}\n\nexport function getShellSegmentVaryPath(original: VaryPath): SegmentVaryPath {\n  // Re-keys a segment's vary path to identify the \"App Shell\" entry for this\n  // segment position — a reusable loading state that can be served for any\n  // concrete navigation to this segment. The shell is rendered with params\n  // omitted, with one exception: root params (path params at or above the root\n  // layout) may be accessed during the shell render, so the shell varies on\n  // them. Accordingly, we keep the concrete value of structural nodes (request\n  // keys, etc.) and root param nodes, and replace every other param node (non-\n  // root path params and search params) with Fallback.\n  const clone: VaryPath = {\n    id: original.id,\n    value:\n      original.id === null || original.isRootParam === true\n        ? original.value\n        : Fallback,\n    isRootParam: original.isRootParam,\n    parent:\n      original.parent === null\n        ? null\n        : getShellSegmentVaryPath(original.parent),\n  }\n  return clone as SegmentVaryPath\n}\n","export class UnrecognizedActionError extends Error {\n  constructor(...args: ConstructorParameters<typeof Error>) {\n    super(...args)\n    this.name = 'UnrecognizedActionError'\n  }\n}\n\n/**\n * Check whether a server action call failed because the server action was not recognized by the server.\n * This can happen if the client and the server are not from the same deployment.\n *\n * Example usage:\n * ```ts\n * try {\n *   await myServerAction();\n * } catch (err) {\n *   if (unstable_isUnrecognizedActionError(err)) {\n *     // The client is from a different deployment than the server.\n *     // Reloading the page will fix this mismatch.\n *     window.alert(\"Please refresh the page and try again\");\n *     return;\n *   }\n * }\n * ```\n * */\nexport function unstable_isUnrecognizedActionError(\n  error: unknown\n): error is UnrecognizedActionError {\n  return !!(\n    error &&\n    typeof error === 'object' &&\n    error instanceof UnrecognizedActionError\n  )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo, useOptimistic } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport {\n  ACTION_REFRESH,\n  type AppRouterState,\n  type ReducerActions,\n  type ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\n/**\n * Called when the instant navigation test lock is released. If the router\n * is initialized, dispatches a soft refresh to fetch dynamic data. If not\n * (e.g. the lock was released before hydration finished), falls back to a\n * hard reload.\n */\nexport function refreshOnInstantNavigationUnlock() {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    if (dispatch !== null) {\n      dispatch({ type: ACTION_REFRESH, bypassCacheInvalidation: true })\n    } else {\n      window.location.reload()\n    }\n  }\n}\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n  if (dispatch === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  dispatch(action)\n}\n\n// Optimistic state setter for experimental_gesturePush. Only should be used\n// during a gesture transition.\nlet setGestureRouterState: ((state: ReducerState) => void) | null = null\n\nexport function dispatchGestureState(state: ReducerState) {\n  if (setGestureRouterState === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  setGestureRouterState(state)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n  Promise<AppRouterState>,\n  Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n  actionQueue: AppRouterActionQueue\n): AppRouterState {\n  const [canonicalState, setState] = React.useState<ReducerState>(\n    actionQueue.state\n  )\n\n  // Wrap the canonical state in useOptimistic to support\n  // experimental_gesturePush. During a gesture transition, this returns a fork\n  // of the router state that represents the eventual target if/when the gesture\n  // completes. Otherwise it returns the canonical state.\n  const [state, setGesture] = useOptimistic(canonicalState)\n  if (typeof window !== 'undefined') {\n    setGestureRouterState = setGesture\n  }\n\n  // Because of a known issue that requires to decode Flight streams inside the\n  // render phase, we have to be a bit clever and assign the dispatch method to\n  // a module-level variable upon initialization. The useState hook in this\n  // module only exists to synchronize state that lives outside of React.\n  // Ideally, what we'd do instead is pass the state as a prop to root.render;\n  // this is conceptually how we're modeling the app router state, despite the\n  // weird implementation details.\n  let nextDispatch: Dispatch<ReducerActions>\n\n  if (process.env.NODE_ENV !== 'production') {\n    const { useAppDevRenderingIndicator } =\n      require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n    nextDispatch = (action: ReducerActions) => {\n      appDevRenderingIndicator(() => {\n        actionQueue.dispatch(action, setState)\n      })\n    }\n  } else {\n    nextDispatch = (action: ReducerActions) =>\n      actionQueue.dispatch(action, setState)\n  }\n\n  if (typeof window !== 'undefined') {\n    dispatch = nextDispatch\n  }\n\n  // When navigating to a non-prefetched route, then App Router state will be\n  // blocked until the server responds. We need to transfer the `_debugInfo`\n  // from the underlying Flight response onto the top-level promise that is\n  // passed to React (via `use`) so that the latency is accurately represented\n  // in the React DevTools.\n  const stateWithDebugInfo = useMemo(() => {\n    if (!__DEV__) {\n      return state\n    }\n\n    if (isThenable(state)) {\n      // useMemo can't be used to cache a Promise since the memoized value is thrown\n      // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n      let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n      if (promiseWithDebugInfo === undefined) {\n        const debugInfo: Array<unknown> = []\n        promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n          if (asyncState.debugInfo !== null) {\n            debugInfo.push(...asyncState.debugInfo)\n          }\n          return asyncState\n        }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n        promiseWithDebugInfo._debugInfo = debugInfo\n\n        promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n      }\n\n      return promiseWithDebugInfo\n    }\n    return state\n  }, [state])\n\n  return isThenable(stateWithDebugInfo)\n    ? use(stateWithDebugInfo)\n    : stateWithDebugInfo\n}\n","'use client'\n\nimport React, {\n  createContext,\n  useContext,\n  useState,\n  useOptimistic,\n  startTransition,\n} from 'react'\n\nconst OfflineContext = createContext<boolean>(false)\n\n// Module-level reference to the optimistic setter. Assigned inside the\n// provider component on every render. Called by the offline module\n// (via dispatchOfflineChange) to update the React tree.\nlet setOptimistic: ((value: boolean) => void) | null = null\nlet setCanonical: ((value: boolean) => void) | null = null\n\n/**\n * Called by the offline module when the offline state changes.\n * Dispatches into React via startTransition + useOptimistic.\n */\nexport function dispatchOfflineChange(isOffline: boolean): void {\n  const canonical = setCanonical\n  const optimistic = setOptimistic\n  if (canonical === null || optimistic === null) {\n    return\n  }\n  startTransition(() => {\n    canonical(isOffline)\n    optimistic(isOffline)\n  })\n}\n\nexport function OfflineProvider({ children }: { children: React.ReactNode }) {\n  const [canonicalOffline, setCanonicalOffline] = useState(false)\n  const [isOffline, setOptimisticOffline] = useOptimistic(canonicalOffline)\n\n  setOptimistic = setOptimisticOffline\n  setCanonical = setCanonicalOffline\n\n  return (\n    <OfflineContext.Provider value={isOffline}>\n      {children}\n    </OfflineContext.Provider>\n  )\n}\n\n/**\n * Returns whether the app is currently offline.\n * Returns `false` during SSR and hydration.\n */\nexport function useOffline(): boolean {\n  return useContext(OfflineContext)\n}\n","import { NEXT_REQUEST_ID_HEADER } from '../components/app-router-headers'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport interface DebugChannelReadableWriterPair {\n  /**\n   * The remaining, not-yet-handed-out copy of the request's debug stream. A\n   * request can be decoded more than once (the primary decode plus any stage\n   * extractions that re-parse a slice of the same response, see\n   * `decodeStageUntilBoundary`), and each decode needs its own reader. Every\n   * time a consumer asks for the readable we tee it and reassign this field to\n   * the remainder, so each consumer gets an independent branch. The remainder\n   * is only ever tee'd again, never read directly, so it retains every chunk\n   * from the start and replays the full stream into each new branch.\n   */\n  readable: ReadableStream<Uint8Array>\n  readonly writer: WritableStreamDefaultWriter<Uint8Array>\n}\n\nconst pairs = new Map<string, DebugChannelReadableWriterPair>()\n\n/**\n * Upper bound on the number of in-memory debug-channel pairs we retain, evicted\n * least-recently-used, bounding the live per-request map.\n *\n * A pair must outlive its stream's close so a late decode of the same response\n * (the primary decode plus stage extractions via `decodeStageUntilBoundary`,\n * which can run after the channel closed over the WebSocket) still finds the\n * buffered data. The cap only needs to exceed the pairs live or recently closed\n * at once (bounded by how many prefetch/navigation requests are in flight\n * together), so a few dozen leaves ample headroom even for the segment-heavy\n * bursts the Instant Navs DevTools capture can produce.\n */\nconst MAX_DEBUG_CHANNEL_PAIRS = 64\n\nconst DB_NAME = '__next_debug_channel'\nconst STORE_NAME = 'channels'\nconst CREATED_AT_INDEX = 'createdAt'\n/**\n * Upper bound on persisted document debug channels in IndexedDB (one per\n * document, kept for HTTP-cache restore), evicted oldest-first.\n */\nconst MAX_PERSISTED_DOCUMENT_CHANNELS = 10\n\ninterface DebugChannelEntry {\n  readonly requestId: string\n  readonly createdAt: number\n  readonly chunks: Uint8Array[]\n}\n\nfunction openDebugChannelDB(): Promise<IDBDatabase> {\n  return new Promise((resolve, reject) => {\n    const openRequest = indexedDB.open(DB_NAME, 1)\n    openRequest.onupgradeneeded = () => {\n      const store = openRequest.result.createObjectStore(STORE_NAME, {\n        keyPath: 'requestId',\n      })\n      store.createIndex(CREATED_AT_INDEX, 'createdAt')\n    }\n    openRequest.onsuccess = () => resolve(openRequest.result)\n    openRequest.onerror = () => reject(openRequest.error)\n    openRequest.onblocked = () => reject(openRequest.error)\n  })\n}\n\n/**\n * Resolves on the next idle period via `requestIdleCallback`, falling back to a\n * `setTimeout` where `requestIdleCallback` is unavailable.\n */\nfunction whenIdle(): Promise<void> {\n  return new Promise((resolve) => {\n    if (typeof requestIdleCallback === 'function') {\n      requestIdleCallback(() => resolve())\n    } else {\n      setTimeout(resolve, 0)\n    }\n  })\n}\n\nasync function persistDebugChannelToIndexedDB(\n  requestId: string,\n  chunks: Uint8Array[]\n): Promise<void> {\n  let db: IDBDatabase\n  try {\n    db = await openDebugChannelDB()\n  } catch (error) {\n    console.debug('Failed to open debug channel IndexedDB for write', error)\n    return\n  }\n\n  try {\n    await new Promise<void>((resolve, reject) => {\n      const transaction = db.transaction(STORE_NAME, 'readwrite')\n      const store = transaction.objectStore(STORE_NAME)\n\n      store.put({\n        requestId,\n        createdAt: Date.now(),\n        chunks,\n      } satisfies DebugChannelEntry)\n\n      // Prune oldest entries beyond the cap to bound storage growth across tabs\n      // and/or page loads. The createdAt index gives ordered traversal without\n      // scanning, and the cursor deletes commit atomically with the put above.\n      const countReq = store.count()\n      countReq.onsuccess = () => {\n        let entriesToDelete = countReq.result - MAX_PERSISTED_DOCUMENT_CHANNELS\n        if (entriesToDelete <= 0) {\n          return\n        }\n        const cursorReq = store.index(CREATED_AT_INDEX).openCursor()\n        cursorReq.onsuccess = () => {\n          const cursor = cursorReq.result\n          if (!cursor || entriesToDelete === 0) {\n            return\n          }\n          cursor.delete()\n          entriesToDelete--\n          cursor.continue()\n        }\n      }\n\n      transaction.oncomplete = () => {\n        if (process.env.__NEXT_TEST_MODE) {\n          // Test-only flag, set once this document's debug channel entry is\n          // durably committed. Persistence is deferred to an idle callback and\n          // the IndexedDB write is async, so this flag lets e2e tests await\n          // persistence deterministically — coupling only to \"an entry was\n          // persisted\" and not to how or where it is stored. It resets\n          // naturally on each navigation since every document gets a fresh\n          // window. The local cast keeps the augmentation out of the shipped\n          // declaration files.\n          ;(\n            self as { __NEXT_DEBUG_CHANNEL_PERSISTED?: boolean }\n          ).__NEXT_DEBUG_CHANNEL_PERSISTED = true\n        }\n        resolve()\n      }\n      transaction.onerror = () => reject(transaction.error)\n      transaction.onabort = () => reject(transaction.error)\n    })\n  } catch (error) {\n    // Best-effort: if persistence fails (quota, transaction abort, etc.), an\n    // HTTP cache restore will fall back to location.reload() since no entry\n    // will be found.\n    console.debug('Failed to write debug channel entry to IndexedDB', error)\n  } finally {\n    db.close()\n  }\n}\nfunction restoreDebugChannelFromIndexedDB(\n  requestId: string\n): ReadableStream<Uint8Array> {\n  return new ReadableStream<Uint8Array>({\n    async start(controller) {\n      let entry: DebugChannelEntry | undefined\n\n      try {\n        const db = await openDebugChannelDB()\n        try {\n          entry = await new Promise((resolve, reject) => {\n            const tx = db.transaction(STORE_NAME, 'readonly')\n            const store = tx.objectStore(STORE_NAME)\n            const getReq: IDBRequest<DebugChannelEntry | undefined> =\n              store.get(requestId)\n            getReq.onsuccess = () => resolve(getReq.result)\n            getReq.onerror = () => reject(getReq.error)\n          })\n        } finally {\n          db.close()\n        }\n      } catch (error) {\n        // Treat any IDB failure as \"no entry\" and fall through to reload.\n        console.debug(\n          'Failed to read debug channel entry from IndexedDB',\n          error\n        )\n      }\n\n      if (!entry) {\n        // Debug channel can't be restored — missing debug chunks would block\n        // hydration. Force a fresh page load from the server. Leave the stream\n        // parked (no enqueue, no close) so the Flight client stays put until\n        // the reload tears the document down, instead of synchronously erroring\n        // with \"Connection closed.\".\n        location.reload()\n        return\n      }\n\n      for (const chunk of entry.chunks) {\n        controller.enqueue(chunk)\n      }\n      controller.close()\n    },\n  })\n}\n\nconst enum ExecTimeCacheDecision {\n  /**\n   * The HTML document was served from the browser's cache; replay the\n   * previously persisted chunks instead of waiting for the WebSocket-backed\n   * channel.\n   */\n  CacheRestore,\n\n  /**\n   * The HTML document came fresh from the server. The live WebSocket-backed\n   * channel will deliver the debug chunks.\n   */\n  FreshResponse,\n\n  /**\n   * Can't tell from the navigation entry as it stands now. Caller should defer\n   * to `pageshow` and re-check there with `wasServedFromCacheAtPageshow`.\n   */\n  Undecided,\n}\n\n/**\n * Decide at script-execution time whether the document was served from the\n * browser's cache or freshly fetched from the server. `type === 'back_forward'`\n * alone isn't enough: a back/forward navigation can also be a fresh server\n * re-fetch when the HTTP cache entry was evicted (long-lived tab, storage\n * pressure, manual cache clear), and treating that as a cache restore would\n * trigger an unnecessary `location.reload()` when no persisted chunks are\n * found.\n */\nfunction wasServedFromCacheKnownAtExec(\n  entry: NavigationEntry | undefined\n): ExecTimeCacheDecision {\n  if (!entry) {\n    return ExecTimeCacheDecision.FreshResponse\n  }\n\n  // Safari tab-duplication cache restore: type='navigate' paired with\n  // responseStart=0 (no first-body-byte over the network) and a non-zero\n  // responseEnd. Fresh navigations always have responseStart > 0.\n  if (\n    entry.type === 'navigate' &&\n    entry.responseStart === 0 &&\n    entry.responseEnd > 0\n  ) {\n    return ExecTimeCacheDecision.CacheRestore\n  }\n\n  // Every remaining cache-restore signal requires a back/forward navigation.\n  // (bfcache restores don't re-execute scripts and never reach this code.)\n  if (entry.type !== 'back_forward') {\n    return ExecTimeCacheDecision.FreshResponse\n  }\n\n  // Chrome ≥109 and Safari ≥17 populate `deliveryType` at exec time even when\n  // the size fields aren't filled in yet. This is the only exec-time fast path\n  // for real Safari ≥17 cache restores (Safari leaves encodedBodySize at 0 at\n  // exec).\n  if (entry.deliveryType === 'cache') {\n    return ExecTimeCacheDecision.CacheRestore\n  }\n\n  // Chrome and Firefox publish an HTTP cache restore as transferSize=0 (no\n  // bytes over the wire) plus a non-zero cached body size at exec time.\n  if (entry.transferSize === 0 && entry.encodedBodySize > 0) {\n    return ExecTimeCacheDecision.CacheRestore\n  }\n\n  // No body bytes measured yet. Either the response is still streaming, or\n  // WebKit is reporting transferSize=0 and encodedBodySize=0 at exec time\n  // regardless of whether the document was cached or re-fetched. Defer to\n  // `pageshow` where the two cases become distinguishable.\n  if (entry.encodedBodySize === 0) {\n    return ExecTimeCacheDecision.Undecided\n  }\n\n  // Body bytes already measured at exec time with no other cache signal: a\n  // re-fetched back-nav whose response happened to complete before our script\n  // ran. The deferred branch above would have caught the same case if the\n  // response had still been streaming.\n  return ExecTimeCacheDecision.FreshResponse\n}\n\n/**\n * Re-check the cache-restore decision at `pageshow`, when every browser has\n * populated the navigation-entry size fields. Only called when\n * `wasServedFromCacheKnownAtExec` returned `ExecTimeCacheDecision.Undecided`.\n */\nfunction wasServedFromCacheAtPageshow(\n  entry: NavigationEntry | undefined\n): boolean {\n  if (!entry) {\n    return false\n  }\n\n  // Safari tab-duplication signature; see the matching branch in\n  // `wasServedFromCacheKnownAtExec`.\n  if (\n    entry.type === 'navigate' &&\n    entry.responseStart === 0 &&\n    entry.responseEnd > 0\n  ) {\n    return true\n  }\n\n  // A back/forward navigation where at least one of the size fields is zero\n  // means the body didn't come over the wire. Browsers signal a cache restore\n  // differently — Chrome/Firefox zero `transferSize` and keep a non-zero cached\n  // `encodedBodySize`; Safari does the inverse with a small `transferSize`\n  // (header overhead) and `encodedBodySize=0`; WebKit under Playwright zeros\n  // both. A fresh re-fetch populates both with the response size.\n  return (\n    entry.type === 'back_forward' &&\n    (entry.transferSize === 0 || entry.encodedBodySize === 0)\n  )\n}\n\n/**\n * The DOM lib's `PerformanceNavigationTiming` doesn't include the\n * `deliveryType` property yet, even though it's shipped in Chrome ≥109,\n * Firefox ≥115, and Safari ≥17. See\n * https://w3c.github.io/navigation-timing/#dom-performancenavigationtiming-deliverytype.\n */\ntype NavigationEntry = PerformanceNavigationTiming & {\n  readonly deliveryType?: string\n}\n\nfunction getNavigationEntry(): NavigationEntry | undefined {\n  try {\n    return performance.getEntriesByType('navigation')[0] as\n      | NavigationEntry\n      | undefined\n  } catch {\n    return undefined\n  }\n}\n\n/**\n * Reclaim the least-recently-used debug-channel pairs once the map exceeds\n * `MAX_DEBUG_CHANNEL_PAIRS`. The map is iterated in insertion order and we\n * re-insert entries on access (see\n * `getOrCreateDebugChannelReadableWriterPair`), so the least-recently-used\n * pairs sit at the front. Evicting only ever affects future lookups for that\n * request id; consumers that already hold a tee branch keep reading\n * independently of the map.\n */\nfunction evictExcessDebugChannelPairs(): void {\n  while (pairs.size > MAX_DEBUG_CHANNEL_PAIRS) {\n    const oldestRequestId = pairs.keys().next().value\n    if (oldestRequestId === undefined) {\n      break\n    }\n    pairs.delete(oldestRequestId)\n  }\n}\n\nexport function getOrCreateDebugChannelReadableWriterPair(\n  requestId: string\n): DebugChannelReadableWriterPair {\n  const existingPair = pairs.get(requestId)\n  if (existingPair) {\n    // Refresh the LRU recency of an already-known channel by re-inserting it at\n    // the most-recent position, so a channel that's still being written to or\n    // read from isn't evicted while a late consumer (e.g. a stage re-decode of\n    // the same response) still needs it.\n    pairs.delete(requestId)\n    pairs.set(requestId, existingPair)\n    return existingPair\n  }\n\n  // Buffer chunks only for the initial document's debug channel, not for\n  // client-side navigation requests. Persisted to IndexedDB once complete so it\n  // can be restored when the browser serves the page from HTTP cache\n  // (back-forward navigation, tab duplication, etc.).\n  const chunks: Uint8Array[] | null = requestId === self.__next_r ? [] : null\n\n  const { readable, writable } = new TransformStream<Uint8Array, Uint8Array>({\n    transform(chunk, controller) {\n      if (chunks) {\n        chunks.push(chunk.slice())\n      }\n      controller.enqueue(chunk)\n    },\n  })\n\n  const pair: DebugChannelReadableWriterPair = {\n    readable,\n    writer: writable.getWriter(),\n  }\n  pairs.set(requestId, pair)\n  // Retain the pair past its stream's close (see MAX_DEBUG_CHANNEL_PAIRS) and\n  // bound the map by reclaiming the least-recently-used.\n  evictExcessDebugChannelPairs()\n\n  pair.writer.closed\n    .then(async () => {\n      if (!chunks) {\n        return\n      }\n      // The initial document's debug stream closes while hydration is still\n      // running, so persisting here would steal main-thread time from it. Wait\n      // for genuine idle (no timeout): persistence is best-effort, so if the\n      // page never idles before navigation we skip it and a later restore falls\n      // back to a reload, rather than forcing a blocking write.\n      await whenIdle()\n      await persistDebugChannelToIndexedDB(requestId, chunks)\n    })\n    .catch((error) => {\n      // writer.closed rejected (e.g., stream aborted), nothing to persist.\n      console.debug('Debug channel writer closed with error', error)\n    })\n    .finally(() => {\n      // Keep the now-closed pair in the map so late decodes of this request\n      // still resolve against its buffered stream; it's reclaimed later by LRU\n      // eviction. Release the IndexedDB staging buffer now that it's persisted.\n      if (chunks) {\n        chunks.length = 0\n      }\n    })\n\n  return pair\n}\n\nexport function createDebugChannel(\n  requestHeaders: Record<string, string> | undefined\n): {\n  writable?: WritableStream\n  readable?: ReadableStream\n} {\n  let requestId: string | undefined\n\n  if (requestHeaders) {\n    requestId = requestHeaders[NEXT_REQUEST_ID_HEADER] ?? undefined\n\n    if (!requestId) {\n      throw new InvariantError(\n        `Expected a ${JSON.stringify(NEXT_REQUEST_ID_HEADER)} request header.`\n      )\n    }\n  } else {\n    requestId = self.__next_r\n\n    if (!requestId) {\n      throw new InvariantError(\n        `Expected a request ID to be defined for the document via self.__next_r.`\n      )\n    }\n  }\n\n  // Only attempt to restore the IndexedDB debug channel entry for the\n  // initial document load (no request headers). Client-side navigations pass\n  // request headers and should always use the WebSocket-backed debug channel.\n  if (!requestHeaders) {\n    switch (wasServedFromCacheKnownAtExec(getNavigationEntry())) {\n      case ExecTimeCacheDecision.CacheRestore:\n        return { readable: restoreDebugChannelOrReload(requestId) }\n      case ExecTimeCacheDecision.Undecided:\n        // Body bytes haven't been measured on the navigation entry yet. Suspend\n        // the stream until pageshow, re-check there, then source from the\n        // persisted chunks or the WebSocket-backed pair accordingly.\n        return { readable: createDeferredDebugChannelReadable(requestId) }\n      case ExecTimeCacheDecision.FreshResponse:\n        // Fall through to the shared WebSocket-backed channel below.\n        break\n    }\n  }\n\n  const pair = getOrCreateDebugChannelReadableWriterPair(requestId)\n  // Hand out a fresh tee branch per consumer and keep the remainder for the\n  // next one (see the `readable` field doc above).\n  const [branch, rest] = pair.readable.tee()\n  pair.readable = rest\n\n  return { readable: branch }\n}\n\n/**\n * Try to restore the debug channel from the persisted chunks. If none are\n * found, force a fresh page load.\n */\nfunction restoreDebugChannelOrReload(\n  requestId: string\n): ReadableStream<Uint8Array> {\n  const readable = restoreDebugChannelFromIndexedDB(requestId)\n\n  if (readable) {\n    return readable\n  }\n\n  // No persisted entry. Typically this happens when the HTTP cache held the\n  // HTML but the persisted entry was never written, or was overwritten by a\n  // newer document in this tab.\n  location.reload()\n\n  // Never-closing stream. Keeps the Flight client suspended until the reload\n  // tears the document down, instead of letting it synchronously error with\n  // \"Connection closed.\".\n  return new ReadableStream<Uint8Array>()\n}\n\n/**\n * Used when `wasServedFromCacheKnownAtExec` returns\n * `ExecTimeCacheDecision.Undecided`. Waits for `pageshow`, re-runs the check,\n * and forwards data from either the persisted chunks or the WebSocket.\n */\nfunction createDeferredDebugChannelReadable(\n  requestId: string\n): ReadableStream<Uint8Array> {\n  return new ReadableStream<Uint8Array>({\n    async start(controller) {\n      // By `pageshow` every browser has populated the navigation-entry size\n      // fields, so the re-check below is unambiguous.\n      await new Promise<void>((resolve) => {\n        window.addEventListener('pageshow', () => resolve(), { once: true })\n      })\n\n      const source = wasServedFromCacheAtPageshow(getNavigationEntry())\n        ? restoreDebugChannelOrReload(requestId)\n        : getOrCreateDebugChannelReadableWriterPair(requestId).readable\n\n      const reader = source.getReader()\n      try {\n        while (true) {\n          const { done, value } = await reader.read()\n          if (done) {\n            controller.close()\n            return\n          }\n          controller.enqueue(value)\n        }\n      } catch (error) {\n        controller.error(error)\n      } finally {\n        reader.releaseLock()\n      }\n    },\n  })\n}\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { UrlObject } from 'url'\nimport type { Duplex } from 'stream'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type getBaseWebpackConfig from '../../build/webpack-config'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport type { Project, Update as TurbopackUpdate } from '../../build/swc/types'\nimport type { VersionInfo } from './parse-version-info'\nimport type { DebugInfo } from '../../next-devtools/shared/types'\nimport type { DevIndicatorServerState } from './dev-indicator-server-state'\nimport type {\n  CacheIndicatorState,\n  ServerCacheStatus,\n} from '../../next-devtools/dev-overlay/cache-indicator'\nimport type { DevToolsConfig } from '../../next-devtools/dev-overlay/shared'\nimport type {\n  RequestInsight,\n  RequestInsightsSnapshot,\n} from '../../next-devtools/shared/request-insights'\nimport type { ReactDebugChannelForBrowser } from './debug-channel'\nimport type { AnyStream } from '../app-render/stream-ops'\n\nexport const enum HMR_MESSAGE_SENT_TO_BROWSER {\n  // JSON messages:\n  ADDED_PAGE = 'addedPage',\n  REMOVED_PAGE = 'removedPage',\n  RELOAD_PAGE = 'reloadPage',\n  SERVER_COMPONENT_CHANGES = 'serverComponentChanges',\n  STATIC_PARAMS_CHANGED = 'staticParamsChanged',\n  MIDDLEWARE_CHANGES = 'middlewareChanges',\n  CLIENT_CHANGES = 'clientChanges',\n  SERVER_ONLY_CHANGES = 'serverOnlyChanges',\n  SYNC = 'sync',\n  BUILT = 'built',\n  BUILDING = 'building',\n  DEV_PAGES_MANIFEST_UPDATE = 'devPagesManifestUpdate',\n  TURBOPACK_MESSAGE = 'turbopack-message',\n  SERVER_ERROR = 'serverError',\n  TURBOPACK_CONNECTED = 'turbopack-connected',\n  ISR_MANIFEST = 'isrManifest',\n  CACHE_INDICATOR = 'cacheIndicator',\n  DEV_INDICATOR = 'devIndicator',\n  DEVTOOLS_CONFIG = 'devtoolsConfig',\n  REQUEST_CURRENT_ERROR_STATE = 'requestCurrentErrorState',\n  REQUEST_PAGE_METADATA = 'requestPageMetadata',\n  REQUEST_INSIGHTS_UPDATE = 'requestInsightsUpdate',\n\n  // Binary messages:\n  REACT_DEBUG_CHUNK = 0,\n  ERRORS_TO_SHOW_IN_BROWSER = 1,\n}\n\nexport const enum HMR_MESSAGE_SENT_TO_SERVER {\n  // JSON messages:\n  MCP_ERROR_STATE_RESPONSE = 'mcp-error-state-response',\n  MCP_PAGE_METADATA_RESPONSE = 'mcp-page-metadata-response',\n  PING = 'ping',\n}\n\nexport interface ServerErrorMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ERROR\n  errorJSON: string\n}\n\nexport interface TurbopackMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE\n  data: TurbopackUpdate | TurbopackUpdate[]\n}\n\nexport interface BuildingMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.BUILDING\n}\n\nexport interface CompilationError {\n  moduleName?: string\n  message: string\n  details?: string\n  moduleTrace?: Array<{ moduleName?: string }>\n  stack?: string\n}\n\nexport interface SyncMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SYNC\n  hash: string\n  errors: ReadonlyArray<CompilationError>\n  warnings: ReadonlyArray<CompilationError>\n  versionInfo: VersionInfo\n  updatedModules?: ReadonlyArray<string>\n  debug?: DebugInfo\n  devIndicator: DevIndicatorServerState\n  devToolsConfig?: DevToolsConfig\n  requestInsights?: RequestInsightsSnapshot\n}\n\nexport interface BuiltMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.BUILT\n  hash: string\n  errors: ReadonlyArray<CompilationError>\n  warnings: ReadonlyArray<CompilationError>\n  updatedModules?: ReadonlyArray<string>\n}\n\nexport interface AddedPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ADDED_PAGE\n  data: [page: string | null]\n}\n\nexport interface RemovedPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REMOVED_PAGE\n  data: [page: string | null]\n}\n\nexport interface ReloadPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.RELOAD_PAGE\n  data: string\n}\n\nexport interface ServerComponentChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES\n}\n\n/**\n * Sent in dev when a route's set of statically-known params changed, e.g.\n * because `generateStaticParams` was added, removed, or edited.\n */\nexport interface StaticParamsChangedMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.STATIC_PARAMS_CHANGED\n}\n\nexport interface MiddlewareChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.MIDDLEWARE_CHANGES\n}\n\nexport interface ClientChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.CLIENT_CHANGES\n}\n\nexport interface ServerOnlyChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ONLY_CHANGES\n  pages: ReadonlyArray<string>\n}\n\nexport interface DevPagesManifestUpdateMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE\n  data: [\n    {\n      devPagesManifest: true\n    },\n  ]\n}\n\nexport interface TurbopackConnectedMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n  data: { sessionId: number }\n}\n\nexport interface AppIsrManifestMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ISR_MANIFEST\n  data: Record<string, boolean>\n}\n\nexport interface DevToolsConfigMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG\n  data: DevToolsConfig\n}\n\nexport interface ReactDebugChunkMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK\n  requestId: string\n  /**\n   * A null chunk signals to the browser that no more chunks will be sent.\n   */\n  chunk: Uint8Array | null\n}\n\nexport interface ErrorsToShowInBrowserMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER\n  serializedErrors: Uint8Array\n}\n\nexport interface RequestCurrentErrorStateMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_CURRENT_ERROR_STATE\n  requestId: string\n}\n\nexport interface RequestPageMetadataMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_PAGE_METADATA\n  requestId: string\n}\n\nexport interface CacheIndicatorMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.CACHE_INDICATOR\n  state: CacheIndicatorState\n}\n\nexport interface RequestInsightsUpdateMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_INSIGHTS_UPDATE\n  insight: RequestInsight\n}\n\nexport type HmrMessageSentToBrowser =\n  | TurbopackMessage\n  | TurbopackConnectedMessage\n  | BuildingMessage\n  | SyncMessage\n  | BuiltMessage\n  | AddedPageMessage\n  | RemovedPageMessage\n  | ReloadPageMessage\n  | ServerComponentChangesMessage\n  | StaticParamsChangedMessage\n  | ClientChangesMessage\n  | MiddlewareChangesMessage\n  | ServerOnlyChangesMessage\n  | DevPagesManifestUpdateMessage\n  | ServerErrorMessage\n  | AppIsrManifestMessage\n  | DevToolsConfigMessage\n  | ErrorsToShowInBrowserMessage\n  | ReactDebugChunkMessage\n  | RequestCurrentErrorStateMessage\n  | RequestPageMetadataMessage\n  | CacheIndicatorMessage\n  | RequestInsightsUpdateMessage\n\nexport type BinaryHmrMessageSentToBrowser = Extract<\n  HmrMessageSentToBrowser,\n  { type: number }\n>\n\nexport type TurbopackMessageSentToBrowser =\n  | {\n      type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE\n      data: any\n    }\n  | {\n      type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n      data: { sessionId: number }\n    }\n\nexport interface NextJsHotReloaderInterface {\n  turbopackProject?: Project\n  activeWebpackConfigs?: Array<Awaited<ReturnType<typeof getBaseWebpackConfig>>>\n  serverStats: webpack.Stats | null\n  edgeServerStats: webpack.Stats | null\n  run(\n    req: IncomingMessage,\n    res: ServerResponse,\n    parsedUrl: UrlObject\n  ): Promise<{ finished?: true }>\n\n  setHmrServerError(error: Error | null): void\n  clearHmrServerError(): void\n  start(): Promise<void>\n  send(action: HmrMessageSentToBrowser): void\n  /**\n   * Send the given action only to legacy clients, i.e. Pages Router clients,\n   * and App Router clients that don't have Cache Components enabled.\n   */\n  sendToLegacyClients(action: HmrMessageSentToBrowser): void\n  /**\n   * The hash of the most recent server component change, or `undefined` if no\n   * server component change has occurred yet. In dev, this is included in `\"use\n   * cache\"` cache keys so that cached entries are revalidated after an edit,\n   * for every client, regardless of whether it runs the HMR client.\n   */\n  getServerComponentsHmrRefreshHash(): string | undefined\n  setCacheStatus(status: ServerCacheStatus, htmlRequestId: string): void\n  setReactDebugChannel(\n    debugChannel: ReactDebugChannelForBrowser,\n    htmlRequestId: string,\n    requestId: string\n  ): void\n  sendErrorsToBrowser(errorsRscStream: AnyStream, htmlRequestId: string): void\n  getCompilationErrors(page: string): Promise<any[]>\n  onHMR(\n    req: IncomingMessage,\n    _socket: Duplex,\n    head: Buffer,\n    onUpgrade: (\n      client: { send(data: string): void },\n      context: { isLegacyClient: boolean }\n    ) => void\n  ): void\n  invalidate({\n    reloadAfterInvalidation,\n  }: {\n    reloadAfterInvalidation: boolean\n  }): Promise<void> | void\n  buildFallbackError(): Promise<void>\n  ensurePage({\n    page,\n    clientOnly,\n    appPaths,\n    definition,\n    isApp,\n    url,\n    subscribeToChanges,\n  }: {\n    page: string\n    clientOnly: boolean\n    appPaths?: ReadonlyArray<string> | null\n    isApp?: boolean\n    definition?: RouteDefinition\n    url?: string\n    /**\n     * Whether to wire HMR change subscriptions for the compiled entry.\n     * Defaults to true (the dev server uses these to push updates to\n     * connected browsers). Pass false for one-shot compilations (e.g.\n     * the `compile_route` MCP tool) where there is no client to receive\n     * HMR updates — without this, repeated calls leak subscriptions that\n     * keep firing on every file change for the life of the dev server.\n     */\n    subscribeToChanges?: boolean\n  }): Promise<void>\n  close(): void\n}\n","/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n  '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n  return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n  message: any,\n  verbose?: boolean,\n  importTraceNote?: boolean\n) {\n  // TODO: Replace this once webpack 5 is stable\n  if (typeof message === 'object' && message.message) {\n    let filteredModuleTrace =\n      message.moduleTrace &&\n      message.moduleTrace.filter(\n        (trace: any) =>\n          !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n            trace.originName\n          )\n      )\n\n    let body = message.message\n    const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n    if (breakingChangeIndex >= 0) {\n      body = body.slice(0, breakingChangeIndex)\n    }\n\n    // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n    // fall back to moduleIdentifier as a workaround\n    if (\n      process.env.NEXT_RSPACK &&\n      !message.moduleName &&\n      !message.file &&\n      message.moduleIdentifier\n    ) {\n      const parts = message.moduleIdentifier.split('!')\n      message.moduleName = parts[parts.length - 1]\n    }\n\n    message =\n      (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n      (message.file ? stripAnsi(message.file) + '\\n' : '') +\n      body +\n      (message.details && verbose ? '\\n' + message.details : '') +\n      (filteredModuleTrace && filteredModuleTrace.length\n        ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n          filteredModuleTrace\n            .map((trace: any) => `\\n${trace.moduleName}`)\n            .join('')\n        : '') +\n      (message.stack && verbose ? '\\n' + message.stack : '')\n  }\n  let lines = message.split('\\n')\n\n  // Extract loader paths from Webpack-added headers and move them to end.\n  // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n  // The header line is removed and the path is appended at the end as:\n  //   \"  (from ./loaders/foo-loader.js)\"\n  // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n  const loaderPaths: string[] = []\n  lines = lines.filter((line: string) => {\n    const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n    if (match) {\n      loaderPaths.push(match[1])\n      return false\n    }\n    return true\n  })\n\n  // Transform parsing error into syntax error\n  // TODO: move this to our ESLint formatter?\n  lines = lines.map((line: string) => {\n    const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n      line\n    )\n    if (!parsingError) {\n      return line\n    }\n    const [, errorLine, errorColumn, errorMessage] = parsingError\n    return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n  })\n\n  message = lines.join('\\n')\n  // Smoosh syntax errors (commonly found in CSS)\n  message = message.replace(\n    /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n    `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n  )\n  // Clean up export errors\n  message = message.replace(\n    /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$1' is not exported from '$2'.`\n  )\n  message = message.replace(\n    /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n  )\n  message = message.replace(\n    /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n  )\n  lines = message.split('\\n')\n\n  // Remove leading newline\n  if (lines.length > 2 && lines[1].trim() === '') {\n    lines.splice(1, 1)\n  }\n\n  // Cleans up verbose \"module not found\" messages for files and packages.\n  if (lines[1] && lines[1].startsWith('Module not found: ')) {\n    lines = [\n      lines[0],\n      lines[1]\n        .replace('Error: ', '')\n        .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n      ...lines.slice(2),\n    ]\n  }\n\n  // Add helpful message for users trying to use Sass for the first time\n  if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n    // ./file.module.scss (<<loader info>>) => ./file.module.scss\n    const firstLine = lines[0].split('!')\n    lines[0] = firstLine[firstLine.length - 1]\n\n    lines[1] =\n      \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n    lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n    lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n    // dispose of unhelpful stack trace\n    lines = lines.slice(0, 2)\n    hadMissingSassError = true\n  } else if (\n    hadMissingSassError &&\n    message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n  ) {\n    // dispose of unhelpful stack trace following missing sass module\n    lines = []\n  }\n\n  if (!verbose) {\n    message = lines.join('\\n')\n    // Internal stacks are generally useless so we strip them... with the\n    // exception of stacks containing `webpack:` because they're normally\n    // from user code generated by Webpack. For more information see\n    // https://github.com/facebook/create-react-app/pull/1050\n    message = message.replace(\n      /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n      ''\n    ) // at ... ...:x:y\n    message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n    message = message.replace(\n      /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n      ''\n    )\n\n    lines = message.split('\\n')\n  }\n\n  // Append loader paths at the end (before any remaining stack trace)\n  if (loaderPaths.length > 0) {\n    for (const loaderPath of loaderPaths) {\n      // Don't show internal Next.js loader paths — they're noise for users\n      if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n        lines.push(`  (from ${loaderPath})`)\n      }\n    }\n  }\n\n  // Remove duplicated newlines\n  lines = (lines as string[]).filter(\n    (line, index, arr) =>\n      index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n  )\n\n  // Reassemble the message\n  message = lines.join('\\n')\n  return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n  const formattedErrors = json.errors.map((message: any) => {\n    const isUnknownNextFontError = message.message.includes(\n      'An error occurred in `next/font`.'\n    )\n    return formatMessage(message, isUnknownNextFontError || verbose)\n  })\n  const formattedWarnings = json.warnings.map((message: any) => {\n    return formatMessage(message, verbose)\n  })\n\n  // Reorder errors to put the most relevant ones first.\n  let reactServerComponentsError = -1\n\n  for (let i = 0; i < formattedErrors.length; i++) {\n    const error = formattedErrors[i]\n    if (error.includes('ReactServerComponentsError')) {\n      reactServerComponentsError = i\n      break\n    }\n  }\n\n  // Move the reactServerComponentsError to the top if it exists\n  if (reactServerComponentsError !== -1) {\n    const error = formattedErrors.splice(reactServerComponentsError, 1)\n    formattedErrors.unshift(error[0])\n  }\n\n  const result = {\n    ...json,\n    errors: formattedErrors,\n    warnings: formattedWarnings,\n  }\n  if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n    // If there are any syntax errors, show just them.\n    result.errors = result.errors.filter(isLikelyASyntaxError)\n    result.warnings = []\n  }\n  return result\n}\n","import type { HmrMessageSentToBrowser } from '../../../server/dev/hot-reloader-types'\n\nexport const REACT_REFRESH_FULL_RELOAD =\n  '[Fast Refresh] performing full reload\\n\\n' +\n  \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" +\n  'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n' +\n  'Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n' +\n  'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n' +\n  'Fast Refresh requires at least one parent function component in your React tree.'\n\nexport const REACT_REFRESH_FULL_RELOAD_FROM_ERROR =\n  '[Fast Refresh] performing full reload because your application had an unrecoverable error'\n\nexport function reportInvalidHmrMessage(\n  message: HmrMessageSentToBrowser | MessageEvent<unknown>,\n  err: unknown\n) {\n  console.warn(\n    '[HMR] Invalid message: ' +\n      JSON.stringify(message) +\n      '\\n' +\n      ((err instanceof Error && err?.stack) || '')\n  )\n}\n","export function getTerminalLoggingConfig():\n  | false\n  | boolean\n  | {\n      depthLimit?: number\n      edgeLimit?: number\n      showSourceLocation?: boolean\n    } {\n  try {\n    return JSON.parse(\n      process.env.__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL || 'false'\n    )\n  } catch {\n    return false\n  }\n}\n\nexport function getIsTerminalLoggingEnabled(): boolean {\n  const config = getTerminalLoggingConfig()\n  return Boolean(config)\n}\n","// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.\nconst digestSym = Symbol.for('next.console.error.digest')\n\n// Represent non Error shape unhandled promise rejections or console.error errors.\n// Those errors will be captured and displayed in Error Overlay.\ntype ConsoleError = Error & {\n  [digestSym]: 'NEXT_CONSOLE_ERROR'\n  environmentName: string\n}\n\nexport function createConsoleError(\n  message: string | Error,\n  environmentName?: string | null\n): ConsoleError {\n  const error = (\n    typeof message === 'string' ? new Error(message) : message\n  ) as ConsoleError\n  error[digestSym] = 'NEXT_CONSOLE_ERROR'\n\n  if (environmentName && !error.environmentName) {\n    error.environmentName = environmentName\n  }\n\n  return error\n}\n\nexport const isConsoleError = (error: any): error is ConsoleError => {\n  return error && error[digestSym] === 'NEXT_CONSOLE_ERROR'\n}\n","import React from 'react'\nimport isError from '../../../../lib/is-error'\n\nconst ownerStacks = new WeakMap<Error, string | null>()\n\nexport function getOwnerStack(error: Error): string | null | undefined {\n  return ownerStacks.get(error)\n}\nexport function setOwnerStack(error: Error, stack: string | null) {\n  ownerStacks.set(error, stack)\n}\n\nexport function coerceError(value: unknown): Error {\n  return isError(value) ? value : new Error('' + value)\n}\n\nexport function setOwnerStackIfAvailable(error: Error): void {\n  // React 18 and prod does not have `captureOwnerStack`\n  if ('captureOwnerStack' in React) {\n    const ownerStack = React.captureOwnerStack()\n    // Only set if we captured a valid owner stack, or if none exists yet.\n    // This prevents overwriting a valid owner stack captured earlier\n    // (e.g., in onRecoverableError) with null captured later.\n    if (ownerStack || !ownerStacks.has(error)) {\n      setOwnerStack(error, ownerStack)\n    }\n  }\n}\n\nexport function decorateDevError(thrownValue: unknown) {\n  const error = coerceError(thrownValue)\n  setOwnerStackIfAvailable(error)\n  return error\n}\n","const symbolError = Symbol.for('NextjsError')\n\nexport function getErrorSource(error: Error): 'server' | 'edge-server' | null {\n  return (error as any)[symbolError] || null\n}\n\nexport type ErrorSourceType = 'edge-server' | 'server'\n\nexport function decorateServerError(error: Error, type: ErrorSourceType) {\n  Object.defineProperty(error, symbolError, {\n    writable: false,\n    enumerable: false,\n    configurable: false,\n    value: type,\n  })\n}\n","export type LogMethod =\n  | 'log'\n  | 'info'\n  | 'debug'\n  | 'table'\n  | 'error'\n  | 'assert'\n  | 'dir'\n  | 'dirxml'\n  | 'group'\n  | 'groupCollapsed'\n  | 'groupEnd'\n  | 'trace'\n  | 'warn'\n\nexport type ConsoleEntry<T> = {\n  kind: 'console'\n  method: LogMethod\n  consoleMethodStack: string | null\n  args: Array<\n    | {\n        kind: 'arg'\n        data: T\n      }\n    | {\n        kind: 'formatted-error-arg'\n        prefix: string\n        stack: string\n      }\n  >\n}\n\nexport type ConsoleErrorEntry<T> = {\n  kind: 'any-logged-error'\n  method: 'error'\n  consoleErrorStack: string\n  args: Array<\n    | {\n        kind: 'arg'\n        data: T\n        isRejectionMessage?: boolean\n      }\n    | {\n        kind: 'formatted-error-arg'\n        prefix: string\n        stack: string | null\n      }\n  >\n}\n\nexport type FormattedErrorEntry = {\n  kind: 'formatted-error'\n  prefix: string\n  stack: string\n  method: 'error'\n}\n\nexport type ClientLogEntry =\n  | ConsoleEntry<unknown>\n  | ConsoleErrorEntry<unknown>\n  | FormattedErrorEntry\nexport type ServerLogEntry =\n  | ConsoleEntry<string>\n  | ConsoleErrorEntry<string>\n  | FormattedErrorEntry\n\nexport const UNDEFINED_MARKER = '__next_tagged_undefined'\n\nconst alreadyLoggedOnServerSymbol = Symbol('nextAlreadyLoggedOnServer')\n\n/**\n * Marks an error that originated on the server and was already logged there.\n * Such errors are also sent to the browser, where they get logged to the\n * browser console and shown in the dev overlay. This marker lets the\n * browser-to-terminal log forwarding skip them, so they aren't replayed back to\n * the CLI as duplicates.\n */\nexport function markErrorAsAlreadyLoggedOnServer(error: object): void {\n  Object.defineProperty(error, alreadyLoggedOnServerSymbol, {\n    value: true,\n    enumerable: false,\n    configurable: true,\n  })\n}\n\nexport function wasErrorAlreadyLoggedOnServer(value: unknown): boolean {\n  return (\n    typeof value === 'object' &&\n    value !== null &&\n    (value as Record<symbol, unknown>)[alreadyLoggedOnServerSymbol] === true\n  )\n}\n\n// Based on https://github.com/facebook/react/blob/28dc0776be2e1370fe217549d32aee2519f0cf05/packages/react-server/src/ReactFlightServer.js#L248\nexport function patchConsoleMethod<T extends keyof Console>(\n  methodName: T,\n  wrapper: (\n    methodName: T,\n    ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n  ) => void\n): () => void {\n  const descriptor = Object.getOwnPropertyDescriptor(console, methodName)\n  if (\n    descriptor &&\n    (descriptor.configurable || descriptor.writable) &&\n    typeof descriptor.value === 'function'\n  ) {\n    const originalMethod = descriptor.value as Console[T] extends (\n      ...args: any[]\n    ) => any\n      ? Console[T]\n      : never\n    const originalName = Object.getOwnPropertyDescriptor(originalMethod, 'name')\n    const wrapperMethod = function (\n      this: typeof console,\n      ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n    ) {\n      wrapper(methodName, ...args)\n\n      originalMethod.apply(this, args)\n    }\n    if (originalName) {\n      Object.defineProperty(wrapperMethod, 'name', originalName)\n    }\n    Object.defineProperty(console, methodName, {\n      value: wrapperMethod,\n    })\n\n    return () => {\n      Object.defineProperty(console, methodName, {\n        value: originalMethod,\n        writable: descriptor.writable,\n        configurable: descriptor.configurable,\n      })\n    }\n  }\n\n  return () => {}\n}\n","import { configure } from 'next/dist/compiled/safe-stable-stringify'\nimport { getTerminalLoggingConfig } from './terminal-logging-config'\nimport { UNDEFINED_MARKER } from '../../shared/forward-logs-shared'\n\nconst terminalLoggingConfig = getTerminalLoggingConfig()\n\nconst PROMISE_MARKER = 'Promise {}'\nconst UNAVAILABLE_MARKER = '[Unable to view]'\n\nconst maximumDepth =\n  typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit\n    ? terminalLoggingConfig.depthLimit\n    : 5\nconst maximumBreadth =\n  typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit\n    ? terminalLoggingConfig.edgeLimit\n    : 100\n\nexport const safeStringifyWithDepth = configure({\n  maximumDepth,\n  maximumBreadth,\n})\n\n/**\n * allows us to:\n * - revive the undefined log in the server as it would look in the browser\n * - not read/attempt to serialize promises (next will console error if you do that, and will cause this program to infinitely recurse)\n * - if we read a proxy that throws (no way to detect if something is a proxy), explain to the user we can't read this data\n */\nexport function preLogSerializationClone<T>(\n  value: T,\n  seen = new WeakMap()\n): any {\n  if (value === undefined) return UNDEFINED_MARKER\n  if (value === null || typeof value !== 'object') return value\n  if (seen.has(value as object)) return seen.get(value as object)\n\n  try {\n    Object.keys(value as object)\n  } catch {\n    return UNAVAILABLE_MARKER\n  }\n\n  try {\n    if (typeof (value as any).then === 'function') return PROMISE_MARKER\n  } catch {\n    return UNAVAILABLE_MARKER\n  }\n\n  if (Array.isArray(value)) {\n    const out: any[] = []\n    seen.set(value, out)\n    for (const item of value) {\n      try {\n        out.push(preLogSerializationClone(item, seen))\n      } catch {\n        out.push(UNAVAILABLE_MARKER)\n      }\n    }\n    return out\n  }\n\n  const proto = Object.getPrototypeOf(value)\n  if (proto === Object.prototype || proto === null) {\n    const out: Record<string, unknown> = {}\n    seen.set(value as object, out)\n    for (const key of Object.keys(value as object)) {\n      try {\n        out[key] = preLogSerializationClone((value as any)[key], seen)\n      } catch {\n        out[key] = UNAVAILABLE_MARKER\n      }\n    }\n    return out\n  }\n\n  return Object.prototype.toString.call(value)\n}\n\n// only safe if passed safeClone data\nexport const logStringify = (data: unknown): string => {\n  try {\n    const result = safeStringifyWithDepth(data)\n    return result ?? `\"${UNAVAILABLE_MARKER}\"`\n  } catch {\n    return `\"${UNAVAILABLE_MARKER}\"`\n  }\n}\n","import { getErrorSource } from '../../../shared/lib/error-source'\nimport { getIsTerminalLoggingEnabled } from './terminal-logging-config'\nimport {\n  type ConsoleEntry,\n  type ConsoleErrorEntry,\n  type FormattedErrorEntry,\n  type ClientLogEntry,\n  type LogMethod,\n  patchConsoleMethod,\n  wasErrorAlreadyLoggedOnServer,\n} from '../../shared/forward-logs-shared'\nimport { preLogSerializationClone, logStringify } from './forward-logs-utils'\nimport { getOwnerStack } from './errors/stitched-error'\n\nconst isTerminalLoggingEnabled = getIsTerminalLoggingEnabled()\nconst shouldForwardLogs =\n  isTerminalLoggingEnabled || !!process.env.__NEXT_MCP_SERVER\n\nconst methods: Array<LogMethod> = [\n  'log',\n  'info',\n  'warn',\n  'debug',\n  'table',\n  'assert',\n  'dir',\n  'dirxml',\n  'group',\n  'groupCollapsed',\n  'groupEnd',\n  'trace',\n]\n\nconst afterThisFrame = (cb: () => void) => {\n  let timeout: ReturnType<typeof setTimeout> | undefined\n\n  const rafId = requestAnimationFrame(() => {\n    timeout = setTimeout(() => {\n      cb()\n    })\n  })\n\n  return () => {\n    cancelAnimationFrame(rafId)\n    clearTimeout(timeout)\n  }\n}\n\nlet isPatched = false\n\nconst serializeEntries = (entries: Array<ClientLogEntry>) =>\n  entries.map((clientEntry) => {\n    switch (clientEntry.kind) {\n      case 'any-logged-error':\n      case 'console': {\n        return {\n          ...clientEntry,\n          args: clientEntry.args.map(stringifyUserArg),\n        }\n      }\n      case 'formatted-error': {\n        return clientEntry\n      }\n      default: {\n        return null!\n      }\n    }\n  })\n\nconst flushBufferedEntries = (socket: WebSocket) => {\n  if (logQueue.entries.length === 0) {\n    return\n  }\n\n  const payload = JSON.stringify({\n    event: 'browser-logs',\n    entries: serializeEntries(logQueue.entries),\n    router: logQueue.router,\n    // needed for source mapping, we just assign the sourceType from the last error for the whole batch\n    sourceType: logQueue.sourceType,\n  })\n\n  socket.send(payload)\n  logQueue.entries = []\n  logQueue.sourceType = undefined\n}\n\n// Combined state and public API\nexport const logQueue: {\n  entries: Array<ClientLogEntry>\n  onSocketReady: (socket: WebSocket) => void\n  flushScheduled: boolean\n  socket: WebSocket | null\n  cancelFlush: (() => void) | null\n  sourceType?: 'server' | 'edge-server'\n  router: 'app' | 'pages' | null\n  scheduleLogSend: (entry: ClientLogEntry) => void\n} = {\n  entries: [],\n  flushScheduled: false,\n  cancelFlush: null,\n  socket: null,\n  sourceType: undefined,\n  router: null,\n  scheduleLogSend: (entry: ClientLogEntry) => {\n    logQueue.entries.push(entry)\n    if (logQueue.flushScheduled) {\n      return\n    }\n    // safe to deref and use in setTimeout closure since we cancel on new socket\n    const socket = logQueue.socket\n    if (!socket) {\n      return\n    }\n\n    // we probably dont need this\n    logQueue.flushScheduled = true\n\n    // non blocking log flush, runs at most once per frame\n    logQueue.cancelFlush = afterThisFrame(() => {\n      logQueue.flushScheduled = false\n\n      // just incase\n      try {\n        flushBufferedEntries(socket)\n      } catch {\n        // error (make sure u don't infinite loop)\n        /* noop */\n      }\n    })\n  },\n  onSocketReady: (socket: WebSocket) => {\n    // When MCP or terminal logging is enabled, we enable the socket connection,\n    // otherwise it will not proceed.\n    if (!shouldForwardLogs) {\n      return\n    }\n    if (socket.readyState !== WebSocket.OPEN) {\n      // invariant\n      return\n    }\n\n    // incase an existing timeout was going to run with a stale socket\n    logQueue.cancelFlush?.()\n    logQueue.socket = socket\n\n    try {\n      flushBufferedEntries(socket)\n    } catch {\n      /** noop just incase */\n    }\n  },\n}\n\nconst stringifyUserArg = (\n  arg:\n    | {\n        kind: 'arg'\n        data: unknown\n      }\n    | {\n        kind: 'formatted-error-arg'\n      }\n) => {\n  if (arg.kind !== 'arg') {\n    return arg\n  }\n  return {\n    ...arg,\n    data: logStringify(arg.data),\n  }\n}\n\nconst createErrorArg = (error: Error) => {\n  return {\n    kind: 'formatted-error-arg' as const,\n    prefix: error.message ? `${error.name}: ${error.message}` : `${error.name}`,\n    stack: getErrorStackWithOwnerStack(error),\n  }\n}\n\nconst createLogEntry = (level: LogMethod, args: any[]) => {\n  if (!shouldForwardLogs) {\n    return\n  }\n\n  // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n  // error capture stack trace maybe\n  const stack = getErrorStack(new Error())\n  const stackLines = stack?.split('\\n')\n  const cleanStack = stackLines?.slice(3).join('\\n') // this is probably ignored anyways\n  const entry: ConsoleEntry<unknown> = {\n    kind: 'console',\n    consoleMethodStack: cleanStack ?? null, // depending on browser we might not have stack\n    method: level,\n    args: args.map((arg) => {\n      if (arg instanceof Error) {\n        return createErrorArg(arg)\n      }\n      return {\n        kind: 'arg',\n        data: preLogSerializationClone(arg),\n      }\n    }),\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nexport const forwardErrorLog = (args: any[]) => {\n  // Skip React server replayed logs - they were already logged on the server\n  if (isReactServerReplayedLog(args)) {\n    return\n  }\n\n  if (!shouldForwardLogs) {\n    return\n  }\n\n  const errorObjects = args.filter((arg) => arg instanceof Error)\n  const first = errorObjects.at(0)\n  // Skip errors that originated on the server and were already logged there\n  // (e.g. Cache Components validation errors that are also sent to the browser\n  // to show in the dev overlay). Forwarding them back would duplicate them in\n  // the terminal.\n  if (first && wasErrorAlreadyLoggedOnServer(first)) {\n    return\n  }\n  if (first) {\n    const source = getErrorSource(first)\n    if (source) {\n      logQueue.sourceType = source\n    }\n  }\n  /**\n   * browser shows stack regardless of type of data passed to console.error, so we should do the same\n   *\n   * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n   */\n  const stack = getErrorStack(new Error())\n  const stackLines = stack?.split('\\n')\n  const cleanStack = stackLines?.slice(3).join('\\n')\n\n  const entry: ConsoleErrorEntry<unknown> = {\n    kind: 'any-logged-error',\n    method: 'error',\n    consoleErrorStack: cleanStack ?? '',\n    args: args.map((arg) => {\n      if (arg instanceof Error) {\n        return createErrorArg(arg)\n      }\n      return {\n        kind: 'arg',\n        data: preLogSerializationClone(arg),\n      }\n    }),\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst createUncaughtErrorEntry = (\n  errorName: string,\n  errorMessage: string,\n  fullStack: string\n) => {\n  const entry: FormattedErrorEntry = {\n    kind: 'formatted-error',\n    prefix: `Uncaught ${errorName}: ${errorMessage}`,\n    stack: fullStack,\n    method: 'error',\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst getErrorStack = (error: Error) => {\n  return error.stack || ''\n}\n\n// Get error stack with owner stack appended for source mapping on the server\nconst getErrorStackWithOwnerStack = (error: Error) => {\n  const errorStack = getErrorStack(error)\n  const ownerStack = getOwnerStack(error)\n  return ownerStack ? `${errorStack}\\n${ownerStack}` : errorStack\n}\n\nexport function logUnhandledRejection(reason: unknown) {\n  if (!shouldForwardLogs) {\n    return\n  }\n\n  if (reason instanceof Error) {\n    createUnhandledRejectionErrorEntry(\n      reason,\n      getErrorStackWithOwnerStack(reason)\n    )\n    return\n  }\n  createUnhandledRejectionNonErrorEntry(reason)\n}\n\nconst createUnhandledRejectionErrorEntry = (\n  error: Error,\n  fullStack: string\n) => {\n  const source = getErrorSource(error)\n  if (source) {\n    logQueue.sourceType = source\n  }\n\n  const entry: ClientLogEntry = {\n    kind: 'formatted-error',\n    prefix: `⨯ unhandledRejection: ${error.name}: ${error.message}`,\n    stack: fullStack,\n    method: 'error',\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst createUnhandledRejectionNonErrorEntry = (reason: unknown) => {\n  const entry: ClientLogEntry = {\n    kind: 'any-logged-error',\n    // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless\n    consoleErrorStack: '',\n    method: 'error',\n    args: [\n      {\n        kind: 'arg',\n        data: `⨯ unhandledRejection:`,\n        isRejectionMessage: true,\n      },\n      {\n        kind: 'arg',\n        data: preLogSerializationClone(reason),\n      },\n    ],\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst isHMR = (args: any[]) => {\n  const firstArg = args[0]\n  if (typeof firstArg !== 'string') {\n    return false\n  }\n  if (firstArg.startsWith('[Fast Refresh]')) {\n    return true\n  }\n\n  if (firstArg.startsWith('[HMR]')) {\n    return true\n  }\n\n  return false\n}\n\n/**\n * Matches the format of logs arguments React replayed from the RSC.\n */\nconst isReactServerReplayedLog = (args: any[]) => {\n  if (args.length < 3) {\n    return false\n  }\n\n  const [format, styles, label] = args\n\n  if (\n    typeof format !== 'string' ||\n    typeof styles !== 'string' ||\n    typeof label !== 'string'\n  ) {\n    return false\n  }\n\n  return format.startsWith('%c%s%c') && styles.includes('background:')\n}\n\nexport function forwardUnhandledError(error: Error) {\n  if (!shouldForwardLogs) {\n    return\n  }\n\n  createUncaughtErrorEntry(\n    error.name,\n    error.message,\n    getErrorStackWithOwnerStack(error)\n  )\n}\n\n// TODO: this router check is brittle, we need to update based on the current router the user is using\nexport const initializeDebugLogForwarding = (router: 'app' | 'pages'): void => {\n  // probably don't need this\n  if (isPatched) {\n    return\n  }\n  // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  // better to be safe than sorry\n  try {\n    methods.forEach((method) =>\n      patchConsoleMethod(method, (_, ...args) => {\n        if (isHMR(args)) {\n          return\n        }\n        if (isReactServerReplayedLog(args)) {\n          return\n        }\n        createLogEntry(method, args)\n      })\n    )\n  } catch {}\n  logQueue.router = router\n  isPatched = true\n}\n","import { useEffect } from 'react'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport {\n  formatConsoleArgs,\n  parseConsoleArgs,\n} from '../../../../client/lib/console'\nimport isError from '../../../../lib/is-error'\nimport { createConsoleError } from '../../../shared/console-error'\nimport { coerceError, setOwnerStackIfAvailable } from './stitched-error'\nimport { forwardUnhandledError, logUnhandledRejection } from '../forward-logs'\n\nconst queueMicroTask =\n  globalThis.queueMicrotask || ((cb: () => void) => Promise.resolve().then(cb))\n\ntype ErrorHandler = (error: Error) => void\n\nconst errorQueue: Array<Error> = []\nconst errorHandlers: Array<ErrorHandler> = []\nconst rejectionQueue: Array<Error> = []\nconst rejectionHandlers: Array<ErrorHandler> = []\n\nexport function handleConsoleError(\n  originError: unknown,\n  consoleErrorArgs: any[]\n) {\n  let error: Error\n  const { environmentName } = parseConsoleArgs(consoleErrorArgs)\n  if (isError(originError)) {\n    error = createConsoleError(originError, environmentName)\n  } else {\n    error = createConsoleError(\n      formatConsoleArgs(consoleErrorArgs),\n      environmentName\n    )\n  }\n  setOwnerStackIfAvailable(error)\n\n  errorQueue.push(error)\n  for (const handler of errorHandlers) {\n    // Delayed the error being passed to React Dev Overlay,\n    // avoid the state being synchronously updated in the component.\n    queueMicroTask(() => {\n      handler(error)\n    })\n  }\n}\n\nexport function handleClientError(error: Error) {\n  errorQueue.push(error)\n  for (const handler of errorHandlers) {\n    // Delayed the error being passed to React Dev Overlay,\n    // avoid the state being synchronously updated in the component.\n    queueMicroTask(() => {\n      handler(error)\n    })\n  }\n}\n\nexport function useErrorHandler(\n  handleOnUnhandledError: ErrorHandler,\n  handleOnUnhandledRejection: ErrorHandler\n) {\n  useEffect(() => {\n    // Handle queued errors.\n    errorQueue.forEach(handleOnUnhandledError)\n    rejectionQueue.forEach(handleOnUnhandledRejection)\n\n    // Listen to new errors.\n    errorHandlers.push(handleOnUnhandledError)\n    rejectionHandlers.push(handleOnUnhandledRejection)\n\n    return () => {\n      // Remove listeners.\n      errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1)\n      rejectionHandlers.splice(\n        rejectionHandlers.indexOf(handleOnUnhandledRejection),\n        1\n      )\n\n      // Reset error queues.\n      errorQueue.splice(0, errorQueue.length)\n      rejectionQueue.splice(0, rejectionQueue.length)\n    }\n  }, [handleOnUnhandledError, handleOnUnhandledRejection])\n}\n\nfunction onUnhandledError(event: WindowEventMap['error']): void | boolean {\n  const thrownValue: unknown = event.error\n  if (isNextRouterError(thrownValue)) {\n    event.preventDefault()\n    return false\n  }\n  // When there's an error property present, we log the error to error overlay.\n  // Otherwise we don't do anything as it's not logging in the console either.\n  if (thrownValue) {\n    const error = coerceError(thrownValue)\n    setOwnerStackIfAvailable(error)\n    handleClientError(error)\n    forwardUnhandledError(error)\n  }\n}\n\nfunction onUnhandledRejection(ev: WindowEventMap['unhandledrejection']): void {\n  const reason: unknown = ev?.reason\n  if (isNextRouterError(reason)) {\n    ev.preventDefault()\n    return\n  }\n\n  const error = coerceError(reason)\n  setOwnerStackIfAvailable(error)\n\n  rejectionQueue.push(error)\n  for (const handler of rejectionHandlers) {\n    handler(error)\n  }\n\n  logUnhandledRejection(reason)\n}\n\nexport function handleGlobalErrors() {\n  if (typeof window !== 'undefined') {\n    try {\n      // Increase the number of stack frames on the client\n      Error.stackTraceLimit = 50\n    } catch {}\n\n    window.addEventListener('error', onUnhandledError)\n    window.addEventListener('unhandledrejection', onUnhandledRejection)\n  }\n}\n","import { useEffect } from 'react'\nimport { handleClientError } from './use-error-handler'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../../../shared/lib/errors/constants'\n\nfunction readSsrError(): (Error & { digest?: string }) | null {\n  if (typeof document === 'undefined') {\n    return null\n  }\n\n  const ssrErrorTemplateTag = document.querySelector(\n    'template[data-next-error-message]'\n  )\n  if (ssrErrorTemplateTag) {\n    const message: string = ssrErrorTemplateTag.getAttribute(\n      'data-next-error-message'\n    )!\n    const stack = ssrErrorTemplateTag.getAttribute('data-next-error-stack')\n    const digest = ssrErrorTemplateTag.getAttribute('data-next-error-digest')\n    const error = new Error(message)\n    if (digest) {\n      ;(error as any).digest = digest\n    }\n    // Skip Next.js SSR'd internal errors that which will be handled by the error boundaries.\n    if (isNextRouterError(error)) {\n      return null\n    }\n    error.stack = stack || ''\n    return error\n  }\n\n  return null\n}\n\n/**\n * Needs to be in the same error boundary as the shell.\n * If it commits, we know we recovered from an SSR error.\n * If it doesn't commit, we errored again and React will take care of error reporting.\n */\nexport function ReplaySsrOnlyErrors({\n  onBlockingError,\n}: {\n  onBlockingError: () => void\n}) {\n  if (process.env.NODE_ENV !== 'production') {\n    // Need to read during render. The attributes will be gone after commit.\n    const ssrError = readSsrError()\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      if (ssrError !== null) {\n        // TODO(veil): Include original Owner Stack (NDX-905)\n        // TODO(veil): Mark as recoverable error\n        // TODO(veil): console.error\n        handleClientError(ssrError)\n\n        // If it's missing root tags, we can't recover, make it blocking.\n        if (ssrError.digest === MISSING_ROOT_TAGS_ERROR) {\n          onBlockingError()\n        }\n      }\n    }, [ssrError, onBlockingError])\n  }\n\n  return null\n}\n","export const RuntimeErrorHandler = {\n  hadRuntimeError: false,\n}\n","import React, { PureComponent, startTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { RuntimeErrorHandler } from '../../../client/dev/runtime-error-handler'\nimport { ErrorBoundary } from '../../../client/components/error-boundary'\nimport DefaultGlobalError from '../../../client/components/builtin/global-error'\nimport type { GlobalErrorState } from '../../../client/components/app-router-instance'\nimport { SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE } from './segment-explorer-node'\nimport {\n  AppRouterContext,\n  type AppRouterInstance,\n} from '../../../shared/lib/app-router-context.shared-runtime'\nimport isError from '../../../lib/is-error'\n\ntype AppDevOverlayErrorBoundaryProps = {\n  children: React.ReactNode\n  globalError: GlobalErrorState\n}\n\ntype AppDevOverlayErrorBoundaryState = {\n  error: null | { thrownValue: unknown }\n}\n\nfunction ErroredHtml({\n  globalError: [GlobalError, globalErrorStyles],\n  thrownValue,\n  reset,\n  retry,\n}: {\n  globalError: GlobalErrorState\n  thrownValue: unknown\n  reset: () => void\n  retry: () => void\n}) {\n  return (\n    <ErrorBoundary errorComponent={DefaultGlobalError}>\n      {globalErrorStyles}\n      <GlobalError error={thrownValue} reset={reset} retry={retry} />\n    </ErrorBoundary>\n  )\n}\n\nexport class AppDevOverlayErrorBoundary extends PureComponent<\n  AppDevOverlayErrorBoundaryProps,\n  AppDevOverlayErrorBoundaryState\n> {\n  static contextType = AppRouterContext\n  declare context: AppRouterInstance | null\n\n  state: AppDevOverlayErrorBoundaryState = {\n    error: null,\n  }\n\n  static getDerivedStateFromError(\n    thrownValue: Error\n  ): Partial<AppDevOverlayErrorBoundaryState> {\n    RuntimeErrorHandler.hadRuntimeError = true\n\n    return {\n      error: { thrownValue },\n    }\n  }\n\n  componentDidCatch(err: unknown) {\n    if (\n      process.env.NODE_ENV === 'development' &&\n      isError(err) &&\n      err.message === SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE\n    ) {\n      return\n    }\n    dispatcher.openErrorOverlay()\n  }\n\n  retry = () => {\n    startTransition(() => {\n      this.context?.refresh()\n      this.reset()\n    })\n  }\n\n  reset = () => {\n    this.setState({ error: null })\n  }\n\n  render() {\n    const { children, globalError } = this.props\n    const { error } = this.state\n\n    if (error !== null) {\n      const thrownValue = error.thrownValue\n      return (\n        <ErroredHtml\n          globalError={globalError}\n          thrownValue={thrownValue}\n          reset={this.reset}\n          retry={this.retry}\n        />\n      )\n    }\n\n    return children\n  }\n}\n","'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n  useState,\n  createContext,\n  useContext,\n  use,\n  useMemo,\n  useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n  | 'not-found'\n  | 'error'\n  | 'loading'\n  | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n  'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n  type: string\n  pagePath: string\n  boundaryType: string | null\n  setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n  type,\n  pagePath,\n}: {\n  type: string\n  pagePath: string\n}): React.ReactNode {\n  const { boundaryType, setBoundaryType } = useSegmentState()\n  const nodeState: SegmentNodeState = useMemo(() => {\n    return {\n      type,\n      pagePath,\n      boundaryType,\n      setBoundaryType,\n    }\n  }, [type, pagePath, boundaryType, setBoundaryType])\n\n  // Use `useLayoutEffect` to ensure the state is updated during suspense.\n  // `useEffect` won't work as the state is preserved during suspense.\n  useLayoutEffect(() => {\n    dispatcher.segmentExplorerNodeAdd(nodeState)\n    return () => {\n      dispatcher.segmentExplorerNodeRemove(nodeState)\n    }\n  }, [nodeState])\n\n  return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n  notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n  throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n  use(forever)\n  return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n  const { tree } = useContext(GlobalLayoutRouterContext)\n  useLayoutEffect(() => {\n    dispatcher.segmentExplorerUpdateRouteState(page, tree)\n    return () => {\n      dispatcher.segmentExplorerUpdateRouteState('', null)\n    }\n  }, [page, tree])\n  return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n  const { boundaryType } = useSegmentState()\n  let segmentNode: React.ReactNode = null\n  if (boundaryType === 'loading') {\n    segmentNode = <LoadingSegmentNode />\n  } else if (boundaryType === 'not-found') {\n    segmentNode = <NotFoundSegmentNode />\n  } else if (boundaryType === 'error') {\n    segmentNode = <ErrorSegmentNode />\n  }\n  return segmentNode\n}\n\nexport function SegmentViewNode({\n  type,\n  pagePath,\n  children,\n}: {\n  type: string\n  pagePath: string\n  children?: ReactNode\n}): React.ReactNode {\n  const segmentNode = (\n    <SegmentTrieNode key={type} type={type} pagePath={pagePath} />\n  )\n\n  return (\n    <>\n      {segmentNode}\n      {children}\n    </>\n  )\n}\n\nconst SegmentStateContext = createContext<{\n  boundaryType: SegmentBoundaryType | null\n  setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n  boundaryType: null,\n  setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n  const [boundaryType, setBoundaryType] = useState<SegmentBoundaryType | null>(\n    null\n  )\n\n  const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n  const reloadBoundary = useCallback(\n    () => setErrorBoundaryKey((prev) => prev + 1),\n    []\n  )\n\n  const setBoundaryTypeAndReload = useCallback(\n    (type: SegmentBoundaryType | null) => {\n      if (type === null) {\n        reloadBoundary()\n      }\n      setBoundaryType(type)\n    },\n    [reloadBoundary]\n  )\n\n  return (\n    <SegmentStateContext.Provider\n      key={errorBoundaryKey}\n      value={{\n        boundaryType,\n        setBoundaryType: setBoundaryTypeAndReload,\n      }}\n    >\n      {children}\n    </SegmentStateContext.Provider>\n  )\n}\n\nexport function useSegmentState() {\n  return useContext(SegmentStateContext)\n}\n","import { useContext, useEffect } from 'react'\nimport { GlobalLayoutRouterContext } from '../../../../shared/lib/app-router-context.shared-runtime'\nimport { getSocketUrl } from '../get-socket-url'\nimport {\n  HMR_MESSAGE_SENT_TO_BROWSER,\n  type HmrMessageSentToBrowser,\n  type TurbopackMessageSentToBrowser,\n} from '../../../../server/dev/hot-reloader-types'\nimport { reportInvalidHmrMessage } from '../shared'\nimport {\n  performFullReload,\n  processMessage,\n  type StaticIndicatorState,\n} from './hot-reloader-app'\nimport { logQueue } from '../../../../next-devtools/userspace/app/forward-logs'\nimport { InvariantError } from '../../../../shared/lib/invariant-error'\nimport { WEB_SOCKET_MAX_RECONNECTIONS } from '../../../../lib/constants'\n\nlet reconnections = 0\nlet reloading = false\nlet serverSessionId: number | null = null\nlet mostRecentCompilationHash: string | null = null\n\nexport function createWebSocket(\n  assetPrefix: string,\n  staticIndicatorState: StaticIndicatorState\n) {\n  if (!self.__next_r) {\n    throw new InvariantError(\n      `Expected a request ID to be defined for the document via self.__next_r.`\n    )\n  }\n\n  let webSocket: WebSocket\n  let timer: ReturnType<typeof setTimeout>\n\n  const sendMessage = (data: string) => {\n    if (webSocket && webSocket.readyState === webSocket.OPEN) {\n      webSocket.send(data)\n    }\n  }\n\n  const processTurbopackMessage = createProcessTurbopackMessage(sendMessage)\n\n  function init() {\n    if (webSocket) {\n      webSocket.close()\n    }\n\n    const newWebSocket = new window.WebSocket(\n      `${getSocketUrl(assetPrefix)}/_next/hmr?id=${self.__next_r}`\n    )\n\n    newWebSocket.binaryType = 'arraybuffer'\n\n    function handleOnline() {\n      logQueue.onSocketReady(newWebSocket)\n\n      reconnections = 0\n      window.console.log('[HMR] connected')\n    }\n\n    function handleMessage(event: MessageEvent) {\n      // While the page is reloading, don't respond to any more messages.\n      if (reloading) {\n        return\n      }\n\n      try {\n        const message: HmrMessageSentToBrowser =\n          event.data instanceof ArrayBuffer\n            ? parseBinaryMessage(event.data)\n            : JSON.parse(event.data)\n\n        // Check for server restart in Turbopack mode\n        if (message.type === HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED) {\n          if (\n            serverSessionId !== null &&\n            serverSessionId !== message.data.sessionId\n          ) {\n            // Either the server's session id has changed and it's a new server, or\n            // it's been too long since we disconnected and we should reload the page.\n            window.location.reload()\n            reloading = true\n            return\n          }\n          serverSessionId = message.data.sessionId\n        }\n\n        // Track webpack compilation hash for server restart detection\n        if (\n          message.type === HMR_MESSAGE_SENT_TO_BROWSER.SYNC &&\n          'hash' in message\n        ) {\n          // If we had previously reconnected and the hash changed, the server may have restarted\n          if (\n            mostRecentCompilationHash !== null &&\n            mostRecentCompilationHash !== message.hash\n          ) {\n            window.location.reload()\n            reloading = true\n            return\n          }\n          mostRecentCompilationHash = message.hash\n        }\n\n        processMessage(\n          message,\n          sendMessage,\n          processTurbopackMessage,\n          staticIndicatorState\n        )\n      } catch (err: unknown) {\n        reportInvalidHmrMessage(event, err)\n      }\n    }\n\n    function handleDisconnect() {\n      newWebSocket.onerror = null\n      newWebSocket.onclose = null\n      newWebSocket.close()\n      reconnections++\n\n      // After WEB_SOCKET_MAX_RECONNECTIONS reconnects we'll want to reload the page as it indicates the dev server is no longer running.\n      if (reconnections > WEB_SOCKET_MAX_RECONNECTIONS) {\n        reloading = true\n        window.location.reload()\n        return\n      }\n\n      clearTimeout(timer)\n      // Try again after 5 seconds\n      timer = setTimeout(init, reconnections > 5 ? 5000 : 1000)\n    }\n\n    newWebSocket.onopen = handleOnline\n    newWebSocket.onerror = handleDisconnect\n    newWebSocket.onclose = handleDisconnect\n    newWebSocket.onmessage = handleMessage\n\n    webSocket = newWebSocket\n    return newWebSocket\n  }\n\n  function handleVisibilityChange() {\n    if (\n      document.visibilityState === 'visible' &&\n      webSocket.readyState !== WebSocket.OPEN\n    ) {\n      reconnections = 0\n      clearTimeout(timer)\n      init()\n    }\n  }\n\n  function handleOnlineEvent() {\n    if (webSocket.readyState !== WebSocket.OPEN) {\n      reconnections = 0\n      clearTimeout(timer)\n      init()\n    }\n  }\n\n  document.addEventListener('visibilitychange', handleVisibilityChange)\n  window.addEventListener('online', handleOnlineEvent)\n\n  return init()\n}\n\nexport function createProcessTurbopackMessage(\n  sendMessage: (data: string) => void\n): (msg: TurbopackMessageSentToBrowser) => void {\n  if (!process.env.TURBOPACK) {\n    return () => {}\n  }\n\n  let queue: TurbopackMessageSentToBrowser[] = []\n  let callback: ((msg: TurbopackMessageSentToBrowser) => void) | undefined\n\n  const processTurbopackMessage = (msg: TurbopackMessageSentToBrowser) => {\n    if (callback) {\n      callback(msg)\n    } else {\n      queue.push(msg)\n    }\n  }\n\n  import(\n    // @ts-expect-error requires \"moduleResolution\": \"node16\" in tsconfig.json and not .ts extension\n    '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts'\n  ).then(({ connect }) => {\n    connect({\n      addMessageListener(cb: (msg: TurbopackMessageSentToBrowser) => void) {\n        callback = cb\n\n        // Replay all Turbopack messages before we were able to establish the HMR client.\n        for (const msg of queue) {\n          cb(msg)\n        }\n        queue.length = 0\n      },\n      sendMessage,\n      onUpdateError: (err: unknown) => performFullReload(err, sendMessage),\n    })\n  })\n\n  return processTurbopackMessage\n}\n\nexport function useWebSocketPing(webSocket: WebSocket | undefined) {\n  const { tree } = useContext(GlobalLayoutRouterContext)\n\n  useEffect(() => {\n    if (!webSocket) {\n      throw new InvariantError('Expected webSocket to be defined in dev mode.')\n    }\n\n    // Never send pings when using Turbopack as it's not used.\n    // Pings were originally used to keep track of active routes in on-demand-entries with webpack.\n    if (process.env.TURBOPACK) {\n      return\n    }\n\n    // Taken from on-demand-entries-client.js\n    const interval = setInterval(() => {\n      if (webSocket.readyState === webSocket.OPEN) {\n        webSocket.send(\n          JSON.stringify({\n            event: 'ping',\n            tree,\n            appDirRoute: true,\n          })\n        )\n      }\n    }, 2500)\n    return () => clearInterval(interval)\n  }, [tree, webSocket])\n}\n\nconst textDecoder = new TextDecoder()\n\nfunction parseBinaryMessage(data: ArrayBuffer): HmrMessageSentToBrowser {\n  assertByteLength(data, 1)\n  const view = new DataView(data)\n  const messageType = view.getUint8(0)\n\n  switch (messageType) {\n    case HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER: {\n      const serializedErrors = new Uint8Array(data, 1)\n\n      return {\n        type: HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER,\n        serializedErrors,\n      }\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK: {\n      assertByteLength(data, 2)\n      const requestIdLength = view.getUint8(1)\n      assertByteLength(data, 2 + requestIdLength)\n\n      const requestId = textDecoder.decode(\n        new Uint8Array(data, 2, requestIdLength)\n      )\n\n      const chunk =\n        data.byteLength > 2 + requestIdLength\n          ? new Uint8Array(data, 2 + requestIdLength)\n          : null\n\n      return {\n        type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK,\n        requestId,\n        chunk,\n      }\n    }\n    default: {\n      throw new InvariantError(\n        `Invalid binary HMR message of type ${messageType}`\n      )\n    }\n  }\n}\n\nfunction assertByteLength(data: ArrayBuffer, expectedLength: number) {\n  if (data.byteLength < expectedLength) {\n    throw new InvariantError(\n      `Invalid binary HMR message: insufficient data (expected ${expectedLength} bytes, got ${data.byteLength})`\n    )\n  }\n}\n","declare global {\n  interface Window {\n    __NEXT_HMR_LATENCY_CB: ((latencyMs: number) => void) | undefined\n  }\n}\n\n/**\n * Logs information about a completed HMR to the console, the server (via a\n * `client-hmr-latency` event), and to `self.__NEXT_HMR_LATENCY_CB` (a debugging\n * hook).\n *\n * @param hasUpdate Set this to `false` to avoid reporting the HMR event via a\n *   `client-hmr-latency` event or to `self.__NEXT_HMR_LATENCY_CB`. Used by\n *   turbopack when we must report a message to the browser console (because we\n *   already logged a \"rebuilding\" message), but it's not a real HMR, so we\n *   don't want to impact our telemetry.\n */\nexport default function reportHmrLatency(\n  sendMessage: (message: string) => void,\n  updatedModules: ReadonlyArray<string | number>,\n  startMsSinceEpoch: number,\n  endMsSinceEpoch: number,\n  hasUpdate: boolean = true\n) {\n  const latencyMs = endMsSinceEpoch - startMsSinceEpoch\n  console.log(`[Fast Refresh] done in ${latencyMs}ms`)\n  if (!hasUpdate) {\n    return\n  }\n  sendMessage(\n    JSON.stringify({\n      event: 'client-hmr-latency',\n      id: window.__nextDevClientId,\n      startTime: startMsSinceEpoch,\n      endTime: endMsSinceEpoch,\n      page: window.location.pathname,\n      updatedModules,\n      // Whether the page (tab) was hidden at the time the event occurred.\n      // This can impact the accuracy of the event's timing.\n      isPageHidden: document.visibilityState === 'hidden',\n    })\n  )\n  if (self.__NEXT_HMR_LATENCY_CB) {\n    self.__NEXT_HMR_LATENCY_CB(latencyMs)\n  }\n}\n","/// <reference types=\"webpack/module.d.ts\" />\n\nimport type { ReactNode } from 'react'\nimport { useEffect, startTransition } from 'react'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport formatWebpackMessages from '../../../../shared/lib/format-webpack-messages'\nimport {\n  REACT_REFRESH_FULL_RELOAD,\n  REACT_REFRESH_FULL_RELOAD_FROM_ERROR,\n} from '../shared'\nimport {\n  dispatcher,\n  getSerializedOverlayState,\n  getSegmentTrieData,\n} from 'next/dist/compiled/next-devtools'\nimport { ReplaySsrOnlyErrors } from '../../../../next-devtools/userspace/app/errors/replay-ssr-only-errors'\nimport { AppDevOverlayErrorBoundary } from '../../../../next-devtools/userspace/app/app-dev-overlay-error-boundary'\nimport { useErrorHandler } from '../../../../next-devtools/userspace/app/errors/use-error-handler'\nimport { RuntimeErrorHandler } from '../../runtime-error-handler'\nimport { useWebSocketPing } from './web-socket'\nimport {\n  HMR_MESSAGE_SENT_TO_BROWSER,\n  HMR_MESSAGE_SENT_TO_SERVER,\n} from '../../../../server/dev/hot-reloader-types'\nimport type {\n  HmrMessageSentToBrowser,\n  TurbopackMessageSentToBrowser,\n} from '../../../../server/dev/hot-reloader-types'\nimport type { McpErrorStateResponse } from '../../../../shared/lib/mcp-error-types'\nimport type { McpPageMetadataResponse } from '../../../../shared/lib/mcp-page-metadata-types'\nimport { useUntrackedPathname } from '../../../components/navigation-untracked'\nimport reportHmrLatency from '../../report-hmr-latency'\nimport { TurbopackHmr } from '../turbopack-hot-reloader-common'\nimport {\n  publicAppRouterInstance,\n  type GlobalErrorState,\n} from '../../../components/app-router-instance'\nimport { InvariantError } from '../../../../shared/lib/invariant-error'\nimport { markErrorAsAlreadyLoggedOnServer } from '../../../../next-devtools/shared/forward-logs-shared'\nimport { getOrCreateDebugChannelReadableWriterPair } from '../../debug-channel'\n// TODO: Explicitly import from client.browser (doesn't work with Webpack).\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream as createFromReadableStreamBrowser } from 'react-server-dom-webpack/client'\nimport { findSourceMapURL } from '../../../app-find-source-map-url'\n\nexport interface StaticIndicatorState {\n  pathname: string | null\n  appIsrManifest: Record<string, boolean> | null\n}\n\nconst createFromReadableStream =\n  createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\n\nlet mostRecentCompilationHash: any = null\n// The dev client id is only read by the browser-side HMR websocket connection.\n// Compute it only in the browser: there is no client during SSR, and calling\n// `Math.random()`/`Date.now()` at module scope would be tracked as sync IO by\n// Cache Components and advance the render stage.\nlet __nextDevClientId =\n  typeof window !== 'undefined'\n    ? Math.round(Math.random() * 100 + Date.now())\n    : 0\nlet reloading = false\nlet webpackStartMsSinceEpoch: number | null = null\nconst turbopackHmr: TurbopackHmr | null = process.env.TURBOPACK\n  ? new TurbopackHmr()\n  : null\n\nlet pendingHotUpdateWebpack = Promise.resolve()\nlet resolvePendingHotUpdateWebpack: () => void = () => {}\nfunction setPendingHotUpdateWebpack() {\n  pendingHotUpdateWebpack = new Promise((resolve) => {\n    resolvePendingHotUpdateWebpack = () => {\n      resolve()\n    }\n  })\n}\n\nexport function waitForWebpackRuntimeHotUpdate() {\n  return pendingHotUpdateWebpack\n}\n\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash: string) {\n  // Update last known compilation hash.\n  mostRecentCompilationHash = hash\n}\n\n/**\n * Is there a newer version of this code available?\n * For webpack: Check if the hash changed compared to __webpack_hash__\n * For Turbopack: Always true because it doesn't have __webpack_hash__\n */\nfunction isUpdateAvailable() {\n  if (process.env.TURBOPACK) {\n    return true\n  }\n\n  /* globals __webpack_hash__ */\n  // __webpack_hash__ is the hash of the current compilation.\n  // It's a global variable injected by Webpack.\n  return mostRecentCompilationHash !== __webpack_hash__\n}\n\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n  return module.hot.status() === 'idle'\n}\nfunction afterApplyUpdates(fn: any) {\n  if (canApplyUpdates()) {\n    fn()\n  } else {\n    function handler(status: any) {\n      if (status === 'idle') {\n        module.hot.removeStatusHandler(handler)\n        fn()\n      }\n    }\n    module.hot.addStatusHandler(handler)\n  }\n}\n\nexport function performFullReload(\n  err: any,\n  sendMessage: (data: string) => void\n) {\n  const stackTrace =\n    err &&\n    ((err.stack && err.stack.split('\\n').slice(0, 5).join('\\n')) ||\n      err.message ||\n      err + '')\n\n  sendMessage(\n    JSON.stringify({\n      event: 'client-full-reload',\n      stackTrace,\n      hadRuntimeError: !!RuntimeErrorHandler.hadRuntimeError,\n      dependencyChain: err ? err.dependencyChain : undefined,\n    })\n  )\n\n  if (reloading) return\n  reloading = true\n  window.location.reload()\n}\n\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdatesWebpack(sendMessage: (message: string) => void) {\n  if (!isUpdateAvailable() || !canApplyUpdates()) {\n    resolvePendingHotUpdateWebpack()\n    dispatcher.onBuildOk()\n    reportHmrLatency(sendMessage, [], webpackStartMsSinceEpoch!, Date.now())\n    return\n  }\n\n  function handleApplyUpdates(\n    err: any,\n    updatedModules: (string | number)[] | null\n  ) {\n    if (err || RuntimeErrorHandler.hadRuntimeError || updatedModules == null) {\n      if (err) {\n        console.warn(REACT_REFRESH_FULL_RELOAD)\n      } else if (RuntimeErrorHandler.hadRuntimeError) {\n        console.warn(REACT_REFRESH_FULL_RELOAD_FROM_ERROR)\n      }\n      performFullReload(err, sendMessage)\n      return\n    }\n\n    dispatcher.onBuildOk()\n\n    if (isUpdateAvailable()) {\n      // While we were updating, there was a new update! Do it again.\n      tryApplyUpdatesWebpack(sendMessage)\n      return\n    }\n\n    dispatcher.onRefresh()\n    resolvePendingHotUpdateWebpack()\n    reportHmrLatency(\n      sendMessage,\n      updatedModules,\n      webpackStartMsSinceEpoch!,\n      Date.now()\n    )\n\n    if (process.env.__NEXT_TEST_MODE) {\n      afterApplyUpdates(() => {\n        if (self.__NEXT_HMR_CB) {\n          self.__NEXT_HMR_CB()\n          self.__NEXT_HMR_CB = null\n        }\n      })\n    }\n  }\n\n  // https://webpack.js.org/api/hot-module-replacement/#check\n  module.hot\n    .check(/* autoApply */ false)\n    .then((updatedModules: (string | number)[] | null) => {\n      if (updatedModules == null) {\n        return null\n      }\n\n      // We should always handle an update, even if updatedModules is empty (but\n      // non-null) for any reason. That's what webpack would normally do:\n      // https://github.com/webpack/webpack/blob/3aa6b6bc3a64/lib/hmr/HotModuleReplacement.runtime.js#L296-L298\n      dispatcher.onBeforeRefresh()\n      // https://webpack.js.org/api/hot-module-replacement/#apply\n      return module.hot.apply()\n    })\n    .then(\n      (updatedModules: (string | number)[] | null) => {\n        handleApplyUpdates(null, updatedModules)\n      },\n      (err: any) => {\n        handleApplyUpdates(err, null)\n      }\n    )\n}\n\n/** Handles messages from the server for the App Router. */\nexport function processMessage(\n  message: HmrMessageSentToBrowser,\n  sendMessage: (message: string) => void,\n  processTurbopackMessage: (msg: TurbopackMessageSentToBrowser) => void,\n  staticIndicatorState: StaticIndicatorState\n) {\n  function handleErrors(errors: ReadonlyArray<unknown>) {\n    // \"Massage\" webpack messages.\n    const formatted = formatWebpackMessages({\n      errors: errors,\n      warnings: [],\n    })\n\n    // Only show the first error.\n    dispatcher.onBuildError(formatted.errors[0])\n\n    // Also log them to the console.\n    for (let i = 0; i < formatted.errors.length; i++) {\n      console.error(stripAnsi(formatted.errors[i]))\n    }\n\n    // Do not attempt to reload now.\n    // We will reload on next success instead.\n    if (process.env.__NEXT_TEST_MODE) {\n      if (self.__NEXT_HMR_CB) {\n        self.__NEXT_HMR_CB(formatted.errors[0])\n        self.__NEXT_HMR_CB = null\n      }\n    }\n  }\n\n  function handleHotUpdate() {\n    if (process.env.TURBOPACK) {\n      const hmrUpdate = turbopackHmr!.onBuilt()\n      if (hmrUpdate != null) {\n        reportHmrLatency(\n          sendMessage,\n          [...hmrUpdate.updatedModules],\n          hmrUpdate.startMsSinceEpoch,\n          hmrUpdate.endMsSinceEpoch,\n          // suppress the `client-hmr-latency` event if the update was a no-op:\n          hmrUpdate.hasUpdates\n        )\n      }\n      dispatcher.onBuildOk()\n    } else {\n      tryApplyUpdatesWebpack(sendMessage)\n    }\n  }\n\n  switch (message.type) {\n    case HMR_MESSAGE_SENT_TO_BROWSER.ISR_MANIFEST: {\n      if (process.env.__NEXT_DEV_INDICATOR) {\n        staticIndicatorState.appIsrManifest = message.data\n\n        // Handle the initial static indicator status on receiving the ISR\n        // manifest. Navigation is handled in an effect inside HotReload for\n        // pathname changes as we'll receive the updated manifest before\n        // usePathname triggers for a new value.\n\n        const isStatic = staticIndicatorState.pathname\n          ? message.data[staticIndicatorState.pathname]\n          : undefined\n\n        dispatcher.onStaticIndicator(\n          isStatic === undefined ? 'pending' : isStatic ? 'static' : 'dynamic'\n        )\n      }\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.BUILDING: {\n      dispatcher.buildingIndicatorShow()\n\n      if (process.env.TURBOPACK) {\n        turbopackHmr!.onBuilding()\n      } else {\n        webpackStartMsSinceEpoch = Date.now()\n        setPendingHotUpdateWebpack()\n        console.log('[Fast Refresh] rebuilding')\n      }\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.BUILT:\n    case HMR_MESSAGE_SENT_TO_BROWSER.SYNC: {\n      dispatcher.buildingIndicatorHide()\n\n      if (message.hash) {\n        handleAvailableHash(message.hash)\n      }\n\n      const { errors, warnings } = message\n\n      // Is undefined when it's a 'built' event\n      if ('versionInfo' in message)\n        dispatcher.onVersionInfo(message.versionInfo)\n      if ('debug' in message && message.debug)\n        dispatcher.onDebugInfo(message.debug)\n      if ('devIndicator' in message)\n        dispatcher.onDevIndicator(message.devIndicator)\n      if ('devToolsConfig' in message)\n        dispatcher.onDevToolsConfig(message.devToolsConfig)\n      if ('requestInsights' in message && message.requestInsights)\n        dispatcher.onRequestInsightsSnapshot(message.requestInsights)\n\n      const hasErrors = Boolean(errors && errors.length)\n      // Compilation with errors (e.g. syntax error or missing modules).\n      if (hasErrors) {\n        sendMessage(\n          JSON.stringify({\n            event: 'client-error',\n            errorCount: errors.length,\n            clientId: __nextDevClientId,\n          })\n        )\n\n        handleErrors(errors)\n        return\n      }\n\n      const hasWarnings = Boolean(warnings && warnings.length)\n      if (hasWarnings) {\n        sendMessage(\n          JSON.stringify({\n            event: 'client-warning',\n            warningCount: warnings.length,\n            clientId: __nextDevClientId,\n          })\n        )\n\n        // Print warnings to the console.\n        const formattedMessages = formatWebpackMessages({\n          warnings: warnings,\n          errors: [],\n        })\n\n        for (let i = 0; i < formattedMessages.warnings.length; i++) {\n          if (i === 5) {\n            console.warn(\n              'There were more warnings in other files.\\n' +\n                'You can find a complete log in the terminal.'\n            )\n            break\n          }\n          console.warn(stripAnsi(formattedMessages.warnings[i]))\n        }\n\n        // No early return here as we need to apply modules in the same way between warnings only and compiles without warnings\n      }\n\n      sendMessage(\n        JSON.stringify({\n          event: 'client-success',\n          clientId: __nextDevClientId,\n        })\n      )\n\n      if (message.type === HMR_MESSAGE_SENT_TO_BROWSER.BUILT) {\n        handleHotUpdate()\n      }\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED: {\n      processTurbopackMessage({\n        type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED,\n        data: {\n          sessionId: message.data.sessionId,\n        },\n      })\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE: {\n      turbopackHmr!.onTurbopackMessage(message)\n      dispatcher.onBeforeRefresh()\n      processTurbopackMessage({\n        type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE,\n        data: message.data,\n      })\n      if (RuntimeErrorHandler.hadRuntimeError) {\n        console.warn(REACT_REFRESH_FULL_RELOAD_FROM_ERROR)\n        performFullReload(null, sendMessage)\n      }\n      dispatcher.onRefresh()\n      break\n    }\n    // TODO-APP: make server component change more granular\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES: {\n      turbopackHmr?.onServerComponentChanges()\n      sendMessage(\n        JSON.stringify({\n          event: 'server-component-reload-page',\n          clientId: __nextDevClientId,\n        })\n      )\n\n      if (\n        RuntimeErrorHandler.hadRuntimeError ||\n        document.documentElement.id === '__next_error__'\n      ) {\n        if (reloading) return\n        reloading = true\n        return window.location.reload()\n      }\n\n      startTransition(() => {\n        publicAppRouterInstance.hmrRefresh()\n        dispatcher.onRefresh()\n      })\n\n      if (process.env.__NEXT_TEST_MODE) {\n        if (self.__NEXT_HMR_CB) {\n          self.__NEXT_HMR_CB()\n          self.__NEXT_HMR_CB = null\n        }\n      }\n\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.STATIC_PARAMS_CHANGED: {\n      // Re-fetch the current router tree so the render picks up the new set of\n      // statically-known params (and thus the fresh `fallbackParams`). Unlike\n      // `SERVER_COMPONENT_CHANGES` this does not store an HMR refresh hash, so\n      // it doesn't invalidate `\"use cache\"` entries.\n      if (\n        RuntimeErrorHandler.hadRuntimeError ||\n        document.documentElement.id === '__next_error__'\n      ) {\n        if (reloading) return\n        reloading = true\n        return window.location.reload()\n      }\n\n      startTransition(() => {\n        publicAppRouterInstance.hmrRefresh()\n        dispatcher.onRefresh()\n      })\n\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.RELOAD_PAGE: {\n      turbopackHmr?.onReloadPage()\n      sendMessage(\n        JSON.stringify({\n          event: 'client-reload-page',\n          clientId: __nextDevClientId,\n        })\n      )\n      if (reloading) return\n      reloading = true\n      return window.location.reload()\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.ADDED_PAGE:\n    case HMR_MESSAGE_SENT_TO_BROWSER.REMOVED_PAGE: {\n      turbopackHmr?.onPageAddRemove()\n      // TODO-APP: potentially only refresh if the currently viewed page was added/removed.\n      return publicAppRouterInstance.hmrRefresh()\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ERROR: {\n      const { errorJSON } = message\n      if (errorJSON) {\n        const errorObject = JSON.parse(errorJSON)\n        const error = new Error(errorObject.message)\n        error.stack = errorObject.stack\n        handleErrors([error])\n      }\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE: {\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG: {\n      dispatcher.onDevToolsConfig(message.data)\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_INSIGHTS_UPDATE: {\n      dispatcher.onRequestInsightsUpdate(message.insight)\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK: {\n      const { requestId, chunk } = message\n      const { writer } = getOrCreateDebugChannelReadableWriterPair(requestId)\n\n      if (chunk) {\n        writer.ready.then(() => writer.write(chunk)).catch(console.error)\n      } else {\n        // A null chunk signals that no more chunks will be sent, which allows\n        // us to close the writer.\n        // TODO: Revisit this cleanup logic when we integrate the return channel\n        // that keeps the connection open to be able to lazily retrieve debug\n        // objects.\n        writer.ready.then(() => writer.close()).catch(console.error)\n      }\n\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_CURRENT_ERROR_STATE: {\n      const errorState = getSerializedOverlayState()\n      const response: McpErrorStateResponse = {\n        event: HMR_MESSAGE_SENT_TO_SERVER.MCP_ERROR_STATE_RESPONSE,\n        requestId: message.requestId,\n        errorState,\n        url: window.location.href,\n      }\n      sendMessage(JSON.stringify(response))\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_PAGE_METADATA: {\n      const segmentTrieData = getSegmentTrieData()\n      const response: McpPageMetadataResponse = {\n        event: HMR_MESSAGE_SENT_TO_SERVER.MCP_PAGE_METADATA_RESPONSE,\n        requestId: message.requestId,\n        segmentTrieData,\n        url: window.location.href,\n      }\n      sendMessage(JSON.stringify(response))\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.CACHE_INDICATOR: {\n      dispatcher.onCacheIndicator(message.state)\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER: {\n      createFromReadableStream<{\n        errors: Error[]\n        errorCodes: Map<Error, string>\n      }>(\n        new ReadableStream({\n          start(controller) {\n            controller.enqueue(message.serializedErrors)\n            controller.close()\n          },\n        }),\n        { findSourceMapURL }\n      ).then(\n        ({ errors, errorCodes }) => {\n          for (const error of errors) {\n            const code = errorCodes.get(error)\n            if (code !== undefined) {\n              Object.defineProperty(error, '__NEXT_ERROR_CODE', {\n                value: code,\n                enumerable: false,\n                configurable: true,\n              })\n            }\n            // These errors originated on the server and were already logged\n            // there. Mark them so the browser-to-terminal log forwarding\n            // doesn't replay them back to the CLI as duplicates.\n            markErrorAsAlreadyLoggedOnServer(error)\n            console.error(error)\n          }\n        },\n        (err) => {\n          console.error(\n            new Error('Failed to deserialize errors.', { cause: err })\n          )\n        }\n      )\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.MIDDLEWARE_CHANGES:\n    case HMR_MESSAGE_SENT_TO_BROWSER.CLIENT_CHANGES:\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ONLY_CHANGES:\n      // These action types are handled in src/client/page-bootstrap.ts\n      break\n    default: {\n      message satisfies never\n    }\n  }\n}\n\nexport default function HotReload({\n  children,\n  globalError,\n  webSocket,\n  staticIndicatorState,\n}: {\n  children: ReactNode\n  globalError: GlobalErrorState\n  webSocket: WebSocket | undefined\n  staticIndicatorState: StaticIndicatorState | undefined\n}) {\n  useErrorHandler(dispatcher.onUnhandledError, dispatcher.onUnhandledRejection)\n  useWebSocketPing(webSocket)\n\n  // We don't want access of the pathname for the dev tools to trigger a dynamic\n  // access (as the dev overlay will never be present in production).\n  const pathname = useUntrackedPathname()\n\n  if (process.env.__NEXT_DEV_INDICATOR) {\n    // this conditional is only for dead-code elimination which\n    // isn't a runtime conditional only build-time so ignore hooks rule\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      if (!staticIndicatorState) {\n        throw new InvariantError(\n          'Expected staticIndicatorState to be defined in dev mode.'\n        )\n      }\n\n      staticIndicatorState.pathname = pathname\n\n      if (staticIndicatorState.appIsrManifest) {\n        const isStatic = pathname\n          ? staticIndicatorState.appIsrManifest[pathname]\n          : undefined\n\n        dispatcher.onStaticIndicator(\n          isStatic === undefined ? 'pending' : isStatic ? 'static' : 'dynamic'\n        )\n      }\n    }, [pathname, staticIndicatorState])\n  }\n\n  return (\n    <AppDevOverlayErrorBoundary globalError={globalError}>\n      <ReplaySsrOnlyErrors onBlockingError={dispatcher.openErrorOverlay} />\n      {children}\n    </AppDevOverlayErrorBoundary>\n  )\n}\n","import type {\n  CacheNodeSeedData,\n  FlightData,\n  FlightDataPath,\n  FlightRouterState,\n  FlightSegmentPath,\n  Segment,\n  HeadData,\n  InitialRSCPayload,\n} from '../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../shared/lib/segment'\nimport type { NormalizedSearch } from './components/segment-cache/cache-key'\nimport {\n  getCacheKeyForDynamicParam,\n  parseDynamicParamFromURLPart,\n  doesStaticSegmentAppearInURL,\n  getRenderedPathname,\n  getRenderedSearch,\n} from './route-params'\nimport { createHrefFromUrl } from './components/router-reducer/create-href-from-url'\n\nexport type NormalizedFlightData = {\n  /**\n   * The full `FlightSegmentPath` inclusive of the final `Segment`\n   */\n  segmentPath: FlightSegmentPath\n  /**\n   * The `FlightSegmentPath` exclusive of the final `Segment`\n   */\n  pathToSegment: FlightSegmentPath\n  segment: Segment\n  tree: FlightRouterState\n  seedData: CacheNodeSeedData | null\n  head: HeadData\n  isHeadPartial: boolean\n  isRootRender: boolean\n}\n\n// TODO: We should only have to export `normalizeFlightData`, however because the initial flight data\n// that gets passed to `createInitialRouterState` doesn't conform to the `FlightDataPath` type (it's missing the root segment)\n// we're currently exporting it so we can use it directly. This should be fixed as part of the unification of\n// the different ways we express `FlightSegmentPath`.\nexport function getFlightDataPartsFromPath(\n  flightDataPath: FlightDataPath\n): NormalizedFlightData {\n  // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].\n  const flightDataPathLength = 4\n  // tree, seedData, and head are *always* the last three items in the `FlightDataPath`.\n  const [tree, seedData, head, isHeadPartial] =\n    flightDataPath.slice(-flightDataPathLength)\n  // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.\n  const segmentPath = flightDataPath.slice(0, -flightDataPathLength)\n\n  return {\n    // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment (\"\")\n    // to the start of the segment path in some places which makes it hard to use solely the segment path.\n    // Look for \"// TODO-APP: remove ''\" in the codebase.\n    pathToSegment: segmentPath.slice(0, -1),\n    segmentPath,\n    // if the `FlightDataPath` corresponds with the root, there'll be no segment path,\n    // in which case we default to ''.\n    segment: segmentPath[segmentPath.length - 1] ?? '',\n    tree,\n    seedData,\n    head,\n    isHeadPartial,\n    isRootRender: flightDataPath.length === flightDataPathLength,\n  }\n}\n\nexport function createInitialRSCPayloadFromFallbackPrerender(\n  response: Response,\n  fallbackInitialRSCPayload: InitialRSCPayload\n): InitialRSCPayload {\n  // This is a static fallback page. In order to hydrate the page, we need to\n  // parse the client params from the URL, but to account for the possibility\n  // that the page was rewritten, we need to check the response headers\n  // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since\n  // we can't access the headers of the initial document response, the client\n  // performs a fetch request to the current location. Since it's possible that\n  // the fetch request will be dynamically rewritten to a different path than\n  // the initial document, this fetch request delivers _all_ the hydration data\n  // for the page; it was not inlined into the document, like it normally\n  // would be.\n  //\n  // TODO: Consider treating the case where fetch is rewritten to a different\n  // path from the document as a special deopt case. We should optimistically\n  // assume this won't happen, inline the data into the document, and perform\n  // a minimal request (like a HEAD or range request) to verify that the\n  // response matches. Tricky to get right because we need to account for\n  // all the different deployment environments we support, like output:\n  // \"export\" mode, where we currently don't assume that custom response\n  // headers are present.\n\n  // Patch the Flight data sent by the server with the correct params parsed\n  // from the URL + response object.\n  const renderedPathname = getRenderedPathname(response)\n  const renderedSearch = getRenderedSearch(response)\n  const canonicalUrl = createHrefFromUrl(new URL(location.href))\n  const originalFlightDataPath = fallbackInitialRSCPayload.f[0]\n  const originalFlightRouterState = originalFlightDataPath[0]\n  const payload: InitialRSCPayload = {\n    c: canonicalUrl.split('/'),\n    q: renderedSearch,\n    i: fallbackInitialRSCPayload.i,\n    f: [\n      [\n        fillInFallbackFlightRouterState(\n          originalFlightRouterState,\n          renderedPathname,\n          renderedSearch as NormalizedSearch\n        ),\n        originalFlightDataPath[1],\n        originalFlightDataPath[2],\n        // isHeadPartial. Previously this incorrectly passed the head itself\n        // (index 2), which is truthy, so the head was always treated\n        // as partial.\n        originalFlightDataPath[3],\n      ],\n    ],\n    m: fallbackInitialRSCPayload.m,\n    G: fallbackInitialRSCPayload.G,\n    S: fallbackInitialRSCPayload.S,\n    h: fallbackInitialRSCPayload.h,\n  }\n  if (fallbackInitialRSCPayload.b) {\n    payload.b = fallbackInitialRSCPayload.b\n  }\n  return payload\n}\n\nfunction fillInFallbackFlightRouterState(\n  flightRouterState: FlightRouterState,\n  renderedPathname: string,\n  renderedSearch: NormalizedSearch\n): FlightRouterState {\n  const pathnameParts = renderedPathname.split('/').filter((p) => p !== '')\n  const index = 0\n  return fillInFallbackFlightRouterStateImpl(\n    flightRouterState,\n    renderedSearch,\n    pathnameParts,\n    index\n  )\n}\n\nfunction fillInFallbackFlightRouterStateImpl(\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  pathnameParts: Array<string>,\n  pathnamePartsIndex: number\n): FlightRouterState {\n  const originalSegment = flightRouterState[0]\n  let newSegment: Segment\n  let doesAppearInURL: boolean\n  if (typeof originalSegment === 'string') {\n    newSegment = originalSegment\n    doesAppearInURL = doesStaticSegmentAppearInURL(originalSegment)\n  } else {\n    const paramName = originalSegment[0]\n    const paramType = originalSegment[2]\n    const staticSiblings = originalSegment[3]\n    const paramValue = parseDynamicParamFromURLPart(\n      paramType,\n      pathnameParts,\n      pathnamePartsIndex\n    )\n    const cacheKey = getCacheKeyForDynamicParam(paramValue, renderedSearch)\n    newSegment = [paramName, cacheKey, paramType, staticSiblings]\n    doesAppearInURL = true\n  }\n\n  // Only increment the index if the segment appears in the URL. If it's a\n  // \"virtual\" segment, like a route group, it remains the same.\n  const childPathnamePartsIndex = doesAppearInURL\n    ? pathnamePartsIndex + 1\n    : pathnamePartsIndex\n\n  const children = flightRouterState[1]\n  const newChildren: { [key: string]: FlightRouterState } = {}\n  for (let key in children) {\n    const childFlightRouterState = children[key]\n    newChildren[key] = fillInFallbackFlightRouterStateImpl(\n      childFlightRouterState,\n      renderedSearch,\n      pathnameParts,\n      childPathnamePartsIndex\n    )\n  }\n\n  const newState: FlightRouterState = [\n    newSegment,\n    newChildren,\n    null,\n    flightRouterState[3],\n    flightRouterState[4],\n  ]\n  return newState\n}\n\nexport function getNextFlightSegmentPath(\n  flightSegmentPath: FlightSegmentPath\n): FlightSegmentPath {\n  // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items\n  // to get the next segment path.\n  return flightSegmentPath.slice(2)\n}\n\nexport function normalizeFlightData(\n  flightData: FlightData\n): NormalizedFlightData[] | string {\n  // FlightData can be a string when the server didn't respond with a proper flight response,\n  // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation.\n  if (typeof flightData === 'string') {\n    return flightData\n  }\n\n  return flightData.map((flightDataPath) =>\n    getFlightDataPartsFromPath(flightDataPath)\n  )\n}\n\n/**\n * This function is used to prepare the flight router state for the request.\n * It removes markers that are not needed by the server, and are purely used\n * for stashing state on the client.\n * @param flightRouterState - The flight router state to prepare.\n * @param isHmrRefresh - Whether this is an HMR refresh request.\n * @returns The prepared flight router state.\n */\nexport function prepareFlightRouterStateForRequest(\n  flightRouterState: FlightRouterState,\n  isHmrRefresh?: boolean\n): string {\n  // HMR requests need the complete, unmodified state for proper functionality\n  if (isHmrRefresh) {\n    return encodeURIComponent(JSON.stringify(flightRouterState))\n  }\n\n  return encodeURIComponent(\n    JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))\n  )\n}\n\n/**\n * Recursively strips client-only data from FlightRouterState while preserving\n * server-needed information for proper rendering decisions.\n */\nfunction stripClientOnlyDataFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): FlightRouterState {\n  const [\n    segment,\n    parallelRoutes,\n    _refreshState, // Intentionally unused - URLs are client-only\n    refreshMarker,\n    prefetchHints,\n  ] = flightRouterState\n\n  // Strip client-only data from the segment\n  const cleanedSegment = stripClientOnlyDataFromSegment(segment)\n\n  // Recursively process parallel routes\n  const cleanedParallelRoutes: { [key: string]: FlightRouterState } = {}\n  for (const [key, childState] of Object.entries(parallelRoutes)) {\n    cleanedParallelRoutes[key] =\n      stripClientOnlyDataFromFlightRouterState(childState)\n  }\n\n  const result: FlightRouterState = [cleanedSegment, cleanedParallelRoutes]\n  if (refreshMarker) {\n    result[2] = null // null slightly more compact than undefined\n    result[3] = refreshMarker\n  }\n\n  // Append optional fields if present\n  if (prefetchHints !== undefined) {\n    result[4] = prefetchHints\n  }\n\n  // Everything else is used only by the client and is not needed for requests.\n  return result\n}\n\n/**\n * Strips client-only data from segments:\n * - Search parameters from __PAGE__ segments\n * - staticSiblings from dynamic segment tuples (only needed for client-side\n *   prefetch reuse decisions)\n */\nfunction stripClientOnlyDataFromSegment(segment: Segment): Segment {\n  if (typeof segment === 'string') {\n    // Strip search params from __PAGE__ segments\n    if (segment.startsWith(PAGE_SEGMENT_KEY + '?')) {\n      return PAGE_SEGMENT_KEY\n    }\n    return segment\n  }\n  // Dynamic segment tuple: [paramName, paramCacheKey, paramType, staticSiblings]\n  // Strip staticSiblings (4th element) since server doesn't need it\n  const [paramName, paramCacheKey, paramType] = segment\n  return [paramName, paramCacheKey, paramType, null]\n}\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n  return pathHasPrefix(path, basePath)\n}\n","// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n  // eslint-disable-next-line no-control-regex\n  /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n  return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n","// This gets assigned as a side-effect during app initialization. Because it\n// represents the build used to create the JS bundle, it should never change\n// after being set, so we store it in a global variable.\n//\n// When performing RSC requests, if the incoming data has a different build ID,\n// we perform an MPA navigation/refresh to load the updated build and ensure\n// that the client and server in sync.\n//\n// Starts as an empty string. In practice, because setNavigationBuildId is called during initialization\n// before hydration starts, this will always get reassigned to the actual ID before it's ever needed\n// by a navigation. If for some reasons it didn't, due to a bug or race condition, then on\n// navigation the build comparision would fail and trigger an MPA navigation.\n//\n// Note that this can also be initialized with the deployment id instead (if available). So it's not\n// the same as \"the build id\", but we are running out of alternative names for \"build id or\n// deployment id\".\nlet globalBuildId: string = ''\n\nexport function setNavigationBuildId(buildId: string) {\n  globalBuildId = buildId\n}\n\nexport function getNavigationBuildId(): string {\n  return globalBuildId\n}\n","import { hasBasePath } from './has-base-path'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function removeBasePath(path: string): string {\n  if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {\n    if (!hasBasePath(path)) {\n      return path\n    }\n  }\n\n  // Can't trim the basePath if it has zero length!\n  if (basePath.length === 0) return path\n\n  path = path.slice(basePath.length)\n  if (!path.startsWith('/')) path = `/${path}`\n  return path\n}\n","import type { DynamicParamTypesShort } from '../shared/lib/app-router-types'\nimport {\n  addSearchParamsIfPageSegment,\n  DEFAULT_SEGMENT_KEY,\n  PAGE_SEGMENT_KEY,\n} from '../shared/lib/segment'\nimport { ROOT_SEGMENT_REQUEST_KEY } from '../shared/lib/segment-cache/segment-value-encoding'\nimport {\n  NEXT_REWRITTEN_PATH_HEADER,\n  NEXT_REWRITTEN_QUERY_HEADER,\n  NEXT_RSC_UNION_QUERY,\n} from './components/app-router-headers'\nimport { hasBasePath } from './has-base-path'\nimport { removeBasePath } from './remove-base-path'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n} from './components/segment-cache/cache-key'\nimport type { RSCResponse } from './components/router-reducer/fetch-server-response'\nimport type { ParsedUrlQuery } from 'querystring'\n\nexport type RouteParamValue = string | Array<string> | null\n\nexport function getRenderedSearch(\n  response: RSCResponse<unknown> | Response\n): NormalizedSearch {\n  // If the server performed a rewrite, the search params used to render the\n  // page will be different from the params in the request URL. In this case,\n  // the response will include a header that gives the rewritten search query.\n  const rewrittenQuery = response.headers.get(NEXT_REWRITTEN_QUERY_HEADER)\n  if (rewrittenQuery !== null) {\n    return (\n      rewrittenQuery === '' ? '' : '?' + rewrittenQuery\n    ) as NormalizedSearch\n  }\n  // If the header is not present, there was no rewrite, so we use the search\n  // query of the response URL.\n  return urlToUrlWithoutFlightMarker(new URL(response.url))\n    .search as NormalizedSearch\n}\n\nexport function getRenderedPathname(\n  response: RSCResponse<unknown> | Response\n): NormalizedPathname {\n  // If the server performed a rewrite, the pathname used to render the\n  // page will be different from the pathname in the request URL. In this case,\n  // the response will include a header that gives the rewritten pathname.\n  const rewrittenPath = response.headers.get(NEXT_REWRITTEN_PATH_HEADER)\n  if (rewrittenPath !== null) {\n    return rewrittenPath as NormalizedPathname\n  }\n\n  const pathname = urlToUrlWithoutFlightMarker(new URL(response.url)).pathname\n  return (\n    hasBasePath(pathname) ? removeBasePath(pathname) : pathname\n  ) as NormalizedPathname\n}\n\n// Pathname parts come from `URL.pathname.split('/')`, so they are already\n// in the encoded form the URL parser produces. The server-side equivalent\n// (`get-dynamic-param.ts`) starts from a decoded param value and applies\n// `encodeURIComponent` once. The two encodings are not the same — for\n// example, the URL parser leaves `,` and `:` untouched while\n// `encodeURIComponent` percent-encodes them. To produce the same canonical\n// form on the client (and avoid double-encoding `%xx` sequences such as\n// `%2F` → `%252F`), we decode the URL part first and re-encode it.\nexport function canonicalizeURLPart(part: string): string {\n  try {\n    return encodeURIComponent(decodeURIComponent(part))\n  } catch {\n    // `decodeURIComponent` throws on malformed sequences. Fall back to the\n    // already-encoded form rather than failing the navigation.\n    return part\n  }\n}\n\nexport function parseDynamicParamFromURLPart(\n  paramType: DynamicParamTypesShort,\n  pathnameParts: Array<string>,\n  partIndex: number\n): RouteParamValue {\n  // This needs to match the behavior in get-dynamic-param.ts.\n  switch (paramType) {\n    // Catchalls\n    case 'c': {\n      // Catchalls receive all the remaining URL parts. If there are no\n      // remaining pathname parts, return an empty array.\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s) => canonicalizeURLPart(s))\n        : []\n    }\n    // Catchall intercepted\n    case 'ci(..)(..)':\n    case 'ci(.)':\n    case 'ci(..)':\n    case 'ci(...)': {\n      const prefix = paramType.length - 2\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s, i) => {\n            if (i === 0) {\n              return canonicalizeURLPart(s.slice(prefix))\n            }\n\n            return canonicalizeURLPart(s)\n          })\n        : []\n    }\n    // Optional catchalls\n    case 'oc': {\n      // Optional catchalls receive all the remaining URL parts, unless this is\n      // the end of the pathname, in which case they return null.\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s) => canonicalizeURLPart(s))\n        : null\n    }\n    // Dynamic\n    case 'd': {\n      if (partIndex >= pathnameParts.length) {\n        // The route tree expected there to be more parts in the URL than there\n        // actually are. This could happen if the x-nextjs-rewritten-path header\n        // is incorrectly set, or potentially due to bug in Next.js. TODO:\n        // Should this be a hard error? During a prefetch, we can just abort.\n        // During a client navigation, we could trigger a hard refresh. But if\n        // it happens during initial render, we don't really have any\n        // recovery options.\n        return ''\n      }\n      return canonicalizeURLPart(pathnameParts[partIndex])\n    }\n    // Dynamic intercepted\n    case 'di(..)(..)':\n    case 'di(.)':\n    case 'di(..)':\n    case 'di(...)': {\n      const prefix = paramType.length - 2\n      if (partIndex >= pathnameParts.length) {\n        // The route tree expected there to be more parts in the URL than there\n        // actually are. This could happen if the x-nextjs-rewritten-path header\n        // is incorrectly set, or potentially due to bug in Next.js. TODO:\n        // Should this be a hard error? During a prefetch, we can just abort.\n        // During a client navigation, we could trigger a hard refresh. But if\n        // it happens during initial render, we don't really have any\n        // recovery options.\n        return ''\n      }\n\n      return canonicalizeURLPart(pathnameParts[partIndex].slice(prefix))\n    }\n    default:\n      paramType satisfies never\n      return ''\n  }\n}\n\nexport function doesStaticSegmentAppearInURL(segment: string): boolean {\n  // This is not a parameterized segment; however, we need to determine\n  // whether or not this segment appears in the URL. For example, this route\n  // groups do not appear in the URL, so they should be skipped. Any other\n  // special cases must be handled here.\n  // TODO: Consider encoding this directly into the router tree instead of\n  // inferring it on the client based on the segment type. Something like\n  // a `doesAppearInURL` flag in FlightRouterState.\n  if (\n    segment === ROOT_SEGMENT_REQUEST_KEY ||\n    // For some reason, the loader tree sometimes includes extra __PAGE__\n    // \"layouts\" when part of a parallel route. But it's not a leaf node.\n    // Otherwise, we wouldn't need this special case because pages are\n    // always leaf nodes.\n    // TODO: Investigate why the loader produces these fake page segments.\n    segment.startsWith(PAGE_SEGMENT_KEY) ||\n    // Route groups.\n    (segment[0] === '(' && segment.endsWith(')')) ||\n    segment === DEFAULT_SEGMENT_KEY ||\n    segment === '/_not-found'\n  ) {\n    return false\n  } else {\n    // All other segment types appear in the URL\n    return true\n  }\n}\n\nexport function getCacheKeyForDynamicParam(\n  paramValue: RouteParamValue,\n  renderedSearch: NormalizedSearch\n): string {\n  // This needs to match the logic in get-dynamic-param.ts, until we're able to\n  // unify the various implementations so that these are always computed on\n  // the client.\n  if (typeof paramValue === 'string') {\n    // TODO: Refactor or remove this helper function to accept a string rather\n    // than the whole segment type. Also we can probably just append the\n    // search string instead of turning it into JSON.\n    const pageSegmentWithSearchParams = addSearchParamsIfPageSegment(\n      paramValue,\n      urlSearchParamsToParsedUrlQuery(new URLSearchParams(renderedSearch))\n    ) as string\n    return pageSegmentWithSearchParams\n  } else if (paramValue === null) {\n    return ''\n  } else {\n    return paramValue.join('/')\n  }\n}\n\nexport function urlToUrlWithoutFlightMarker(url: URL): URL {\n  const urlWithoutFlightParameters = new URL(url)\n  urlWithoutFlightParameters.searchParams.delete(NEXT_RSC_UNION_QUERY)\n  if (process.env.NODE_ENV === 'production') {\n    if (\n      process.env.__NEXT_CONFIG_OUTPUT === 'export' &&\n      urlWithoutFlightParameters.pathname.endsWith('.txt')\n    ) {\n      const { pathname } = urlWithoutFlightParameters\n      const length = pathname.endsWith('/index.txt') ? 10 : 4\n      // Slice off `/index.txt` or `.txt` from the end of the pathname\n      urlWithoutFlightParameters.pathname = pathname.slice(0, -length)\n    }\n  }\n  return urlWithoutFlightParameters\n}\n\nexport function getParamValueFromCacheKey(\n  paramCacheKey: string,\n  paramType: DynamicParamTypesShort\n) {\n  // Turn the cache key string sent by the server (as part of FlightRouterState)\n  // into a value that can be passed to `useParams` and client components.\n  const isCatchAll = paramType === 'c' || paramType === 'oc'\n  if (isCatchAll) {\n    // Catch-all param keys are a concatenation of the path segments.\n    // See equivalent logic in `getSelectedParams`.\n    // TODO: We should just pass the array directly, rather than concatenate\n    // it to a string and then split it back to an array. It needs to be an\n    // array in some places, like when passing a key React, but we can convert\n    // it at runtime in those places.\n    return paramCacheKey.split('/')\n  }\n  return paramCacheKey\n}\n\nexport function urlSearchParamsToParsedUrlQuery(\n  searchParams: URLSearchParams\n): ParsedUrlQuery {\n  // Converts a URLSearchParams object to the same type used by the server when\n  // creating search params props, i.e. the type returned by Node's\n  // \"querystring\" module.\n  const result: ParsedUrlQuery = {}\n  for (const [key, value] of searchParams.entries()) {\n    if (result[key] === undefined) {\n      result[key] = value\n    } else if (Array.isArray(result[key])) {\n      result[key].push(value)\n    } else {\n      result[key] = [result[key], value]\n    }\n  }\n  return result\n}\n","import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n  'x-prerender-revalidate-if-generated'\n\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n  'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\nexport const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\nexport const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_'\n\n// in seconds\nexport const CACHE_ONE_YEAR_SECONDS = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy'\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n  'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n  'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n  'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n  'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n  'The `unstable_revalidate` property is available for general use.\\n' +\n  'Please use `revalidate` instead.'\n\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`\n\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`\n\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`\n\nexport const ESLINT_DEFAULT_DIRS = ['app', 'pages', 'components', 'lib', 'src']\n\nexport const SERVER_RUNTIME: Record<string, ServerRuntime> = {\n  edge: 'edge',\n  experimentalEdge: 'experimental-edge',\n  nodejs: 'nodejs',\n}\n\nexport const WEB_SOCKET_MAX_RECONNECTIONS = 12\n\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */\nconst WEBPACK_LAYERS_NAMES = {\n  /**\n   * The layer for the shared code between the client and server bundles.\n   */\n  shared: 'shared',\n  /**\n   * The layer for server-only runtime and picking up `react-server` export conditions.\n   * Including app router RSC pages and app router custom routes and metadata routes.\n   */\n  reactServerComponents: 'rsc',\n  /**\n   * Server Side Rendering layer for app (ssr).\n   */\n  serverSideRendering: 'ssr',\n  /**\n   * The browser client bundle layer for actions.\n   */\n  actionBrowser: 'action-browser',\n  /**\n   * The Node.js bundle layer for the API routes.\n   */\n  apiNode: 'api-node',\n  /**\n   * The Edge Lite bundle layer for the API routes.\n   */\n  apiEdge: 'api-edge',\n  /**\n   * The layer for the middleware code.\n   */\n  middleware: 'middleware',\n  /**\n   * The layer for the instrumentation hooks.\n   */\n  instrument: 'instrument',\n  /**\n   * The layer for assets on the edge.\n   */\n  edgeAsset: 'edge-asset',\n  /**\n   * The browser client bundle layer for App directory.\n   */\n  appPagesBrowser: 'app-pages-browser',\n  /**\n   * The browser client bundle layer for Pages directory.\n   */\n  pagesDirBrowser: 'pages-dir-browser',\n  /**\n   * The Edge Lite bundle layer for Pages directory.\n   */\n  pagesDirEdge: 'pages-dir-edge',\n  /**\n   * The Node.js bundle layer for Pages directory.\n   */\n  pagesDirNode: 'pages-dir-node',\n} as const\n\nexport type WebpackLayerName =\n  (typeof WEBPACK_LAYERS_NAMES)[keyof typeof WEBPACK_LAYERS_NAMES]\n\nconst WEBPACK_LAYERS = {\n  ...WEBPACK_LAYERS_NAMES,\n  GROUP: {\n    builtinReact: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n    ],\n    serverOnly: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n      WEBPACK_LAYERS_NAMES.instrument,\n      WEBPACK_LAYERS_NAMES.middleware,\n    ],\n    neutralTarget: [\n      // pages api\n      WEBPACK_LAYERS_NAMES.apiNode,\n      WEBPACK_LAYERS_NAMES.apiEdge,\n    ],\n    clientOnly: [\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n    ],\n    bundled: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n      WEBPACK_LAYERS_NAMES.shared,\n      WEBPACK_LAYERS_NAMES.instrument,\n      WEBPACK_LAYERS_NAMES.middleware,\n    ],\n    appPages: [\n      // app router pages and layouts\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n    ],\n  },\n}\n\nconst WEBPACK_RESOURCE_QUERIES = {\n  edgeSSREntry: '__next_edge_ssr_entry__',\n  metadata: '__next_metadata__',\n  metadataRoute: '__next_metadata_route__',\n  metadataImageMeta: '__next_metadata_image_meta__',\n}\n\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }\n","/**\n * A `Promise.withResolvers` implementation that exposes the `resolve` and\n * `reject` functions on a `Promise`.\n *\n * @see https://tc39.es/proposal-promise-with-resolvers/\n */\nexport class DetachedPromise<T = any> {\n  public readonly resolve: (value: T | PromiseLike<T>) => void\n  public readonly reject: (reason: any) => void\n  public readonly promise: Promise<T>\n\n  constructor() {\n    let resolve: (value: T | PromiseLike<T>) => void\n    let reject: (reason: any) => void\n\n    // Create the promise and assign the resolvers to the object.\n    this.promise = new Promise<T>((res, rej) => {\n      resolve = res\n      reject = rej\n    })\n\n    // We know that resolvers is defined because the Promise constructor runs\n    // synchronously.\n    this.resolve = resolve!\n    this.reject = reject!\n  }\n}\n","import path from 'path'\nimport { pathToFileURL, fileURLToPath } from 'url'\n\n/**\n * Converts a cache handler path to a filesystem path.\n * ESM's import.meta.resolve() returns file:// URLs which break when concatenated\n * with .next/ or used with path.join/path.relative.\n * @param filePath - Absolute path, relative path, or file:// URL (e.g. from import.meta.resolve)\n * @returns A filesystem path suitable for path operations\n */\nexport function resolveCacheHandlerPathToFilesystem(filePath: string): string {\n  if (filePath.startsWith('file://')) {\n    return fileURLToPath(filePath)\n  }\n  return filePath\n}\n\n/**\n * The path for a dynamic route must be URLs with a valid scheme.\n *\n * When an absolute Windows path is passed to it, it interprets the beginning of the path as a protocol (`C:`).\n * Therefore, it is important to always construct a complete path.\n * @param dir File directory\n * @param filePath Absolute or relative path, or file:// URL (e.g. from import.meta.resolve)\n */\nexport const formatDynamicImportPath = (dir: string, filePath: string) => {\n  const resolvedFilePath = resolveCacheHandlerPathToFilesystem(filePath)\n\n  const absoluteFilePath = path.isAbsolute(resolvedFilePath)\n    ? resolvedFilePath\n    : path.join(dir, resolvedFilePath)\n  const formattedFilePath = pathToFileURL(absoluteFilePath).toString()\n\n  return formattedFilePath\n}\n","import { isPlainObject } from '../shared/lib/is-plain-object'\n\n// We allow some additional attached properties for Next.js errors\nexport interface NextError extends Error {\n  type?: string\n  page?: string\n  code?: string | number\n  cancelled?: boolean\n  digest?: string\n}\n\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */\nfunction safeStringifyLite(obj: any) {\n  const seen = new WeakSet()\n\n  return JSON.stringify(obj, (_key, value) => {\n    // If value is an object and already seen, replace with \"[Circular]\"\n    if (typeof value === 'object' && value !== null) {\n      if (seen.has(value)) {\n        return '[Circular]'\n      }\n      seen.add(value)\n    }\n    return value\n  })\n}\n\n/**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */\nexport default function isError(err: unknown): err is NextError {\n  return (\n    typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n  )\n}\n\nexport function getProperError(err: unknown): Error {\n  if (isError(err)) {\n    return err\n  }\n\n  if (process.env.NODE_ENV === 'development') {\n    // provide better error for case where `throw undefined`\n    // is called in development\n    if (typeof err === 'undefined') {\n      return new Error(\n        'An undefined error was thrown, ' +\n          'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n      )\n    }\n\n    if (err === null) {\n      return new Error(\n        'A null error was thrown, ' +\n          'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n      )\n    }\n  }\n\n  return new Error(isPlainObject(err) ? safeStringifyLite(err) : err + '')\n}\n","export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n  // We use Promise.resolve().then() here so that the operation is scheduled at\n  // the end of the promise job queue, we then add it to the next process tick\n  // to ensure it's evaluated afterwards.\n  //\n  // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n  //\n  Promise.resolve().then(() => {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      setTimeout(cb, 0)\n    } else {\n      process.nextTick(cb)\n    }\n  })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    setTimeout(cb, 0)\n  } else {\n    setImmediate(cb)\n  }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n  return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    return new Promise((r) => setTimeout(r, 0))\n  } else {\n    return new Promise((r) => setImmediate(r))\n  }\n}\n","'use client'\n\nimport { useEffect, useTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\n\nexport const useAppDevRenderingIndicator = () => {\n  const [isPending, startTransition] = useTransition()\n\n  useEffect(() => {\n    if (isPending) {\n      dispatcher.renderingIndicatorShow()\n    } else {\n      dispatcher.renderingIndicatorHide()\n    }\n  }, [isPending])\n\n  return startTransition\n}\n","import PromiseQueue from 'next/dist/compiled/p-queue'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AfterCallback, AfterTask } from './after'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { withExecuteRevalidates } from '../revalidation-utils'\nimport { bindSnapshot } from '../app-render/async-local-storage'\nimport type { WorkUnitStore } from '../app-render/work-unit-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport { scheduleImmediate } from '../../lib/scheduler'\n\nexport type AfterContextOpts = {\n  waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n  onClose: RequestLifecycleOpts['onClose']\n  onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n}\n\nexport class AfterContext {\n  private waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n  private onClose: RequestLifecycleOpts['onClose']\n  private onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n\n  private isRequestClosed: boolean = false\n  private initialOnCloseError: null | { error: unknown } = null\n\n  private runCallbacksOnClosePromise: Promise<void> | undefined\n  private callbackQueue: PromiseQueue\n  private workUnitStores = new Set<WorkUnitStore>()\n\n  constructor({ waitUntil, onClose, onTaskError }: AfterContextOpts) {\n    this.waitUntil = waitUntil\n    this.onClose = onClose\n    this.onTaskError = onTaskError\n\n    this.callbackQueue = new PromiseQueue()\n    this.callbackQueue.pause()\n\n    try {\n      onClose(() => {\n        this.isRequestClosed = true\n\n        // TODO(after): it's not ideal that we'll only switch the `phase` of a WorkUnitStore\n        // if `after()` was called inside it. We should probably track this whenever a store is created\n        for (const workUnitStore of this.workUnitStores) {\n          workUnitStore.phase = 'after'\n        }\n      })\n    } catch (err) {\n      // If onClose is broken, report errors lazily, when after() is called.\n      this.initialOnCloseError = { error: err }\n    }\n  }\n\n  public after(task: AfterTask, workUnitStore: WorkUnitStore): void {\n    if (this.initialOnCloseError) {\n      throw new InvariantError(\n        `An onClose call failed, which means after() can't work correctly.`,\n        { cause: this.initialOnCloseError.error }\n      )\n    }\n\n    // Save the workUnitStore so we can switch its phase later.\n    this.workUnitStores.add(workUnitStore)\n\n    if (isThenable(task)) {\n      this.addThenable(task)\n    } else if (typeof task === 'function') {\n      // TODO(after): implement tracing\n      this.addCallback(task, workUnitStore)\n    } else {\n      throw new Error('`after()`: Argument must be a promise or a function')\n    }\n  }\n\n  private addThenable(thenable: PromiseLike<any>) {\n    if (!this.waitUntil) {\n      errorWaitUntilNotAvailable()\n    }\n    this.waitUntil(\n      new Promise<void>((resolve) => {\n        thenable.then(\n          () => {\n            resolve()\n          },\n          (error) => {\n            resolve()\n            this.reportTaskError('promise', error)\n          }\n        )\n      })\n    )\n  }\n\n  private addCallback(callback: AfterCallback, workUnitStore: WorkUnitStore) {\n    // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n    if (!this.waitUntil) {\n      errorWaitUntilNotAvailable()\n    }\n\n    const afterTaskStore = afterTaskAsyncStorage.getStore()\n\n    // This is used for checking if request APIs can be called inside `after`.\n    // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n    // not the current phase (which might be \"after\" if we're in a nested after).\n    // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n    const rootTaskSpawnPhase = afterTaskStore\n      ? afterTaskStore.rootTaskSpawnPhase // nested after\n      : workUnitStore.phase // topmost after\n\n    // this should only happen once.\n    if (!this.runCallbacksOnClosePromise) {\n      this.runCallbacksOnClosePromise = this.runCallbacksOnClose()\n      this.waitUntil(this.runCallbacksOnClosePromise)\n    }\n\n    // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n    // We do this because we want all of these to be equivalent in every regard except timing:\n    //   after(() => x())\n    //   after(x())\n    //   await x()\n    const wrappedCallback = bindSnapshot(\n      // WARNING: Don't make this a named function. It must be anonymous.\n      // See: https://github.com/facebook/react/pull/34911\n      async () => {\n        try {\n          await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, () =>\n            callback()\n          )\n        } catch (error) {\n          this.reportTaskError('function', error)\n        }\n      }\n    )\n\n    this.callbackQueue.add(wrappedCallback)\n  }\n\n  private async runCallbacksOnClose() {\n    if (!this.isRequestClosed) {\n      await new Promise<void>((resolve) => this.onClose(resolve))\n    } else {\n      // The request is already closed.\n      // Avoid running the callbacks too quickly to prevent userspace from\n      // e.g. relying on `after` being microtasky somewhere.\n      await new Promise<void>((resolve) => scheduleImmediate(resolve))\n    }\n    return this.runCallbacks()\n  }\n\n  private async runCallbacks(): Promise<void> {\n    if (this.callbackQueue.size === 0) return\n\n    const workStore = workAsyncStorage.getStore()\n    if (!workStore) {\n      throw new InvariantError('Missing workStore in AfterContext.runCallbacks')\n    }\n\n    return withExecuteRevalidates(workStore, () => {\n      this.callbackQueue.start()\n      return this.callbackQueue.onIdle()\n    })\n  }\n\n  private reportTaskError(taskKind: 'promise' | 'function', error: unknown) {\n    // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n    // TODO(after): should we log this if we have a onTaskError callback?\n    console.error(\n      taskKind === 'promise'\n        ? `A promise passed to \\`after()\\` rejected:`\n        : `An error occurred in a function passed to \\`after()\\`:`,\n      error\n    )\n    if (this.onTaskError) {\n      // this is very defensive, but we really don't want anything to blow up in an error handler\n      try {\n        this.onTaskError?.(error)\n      } catch (handlerError) {\n        console.error(\n          new InvariantError(\n            '`onTaskError` threw while handling an error thrown from an `after` task',\n            {\n              cause: handlerError,\n            }\n          )\n        )\n      }\n    }\n  }\n}\n\nfunction errorWaitUntilNotAvailable(): never {\n  throw new Error(\n    '`after()` will not work correctly, because `waitUntil` is not available in the current environment.'\n  )\n}\n","import type { IncomingHttpHeaders, IncomingMessage } from 'http'\nimport type { CookieSerializeOptions } from 'next/dist/compiled/cookie'\nimport type { NextApiResponse } from '../../shared/lib/utils'\n\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport {\n  PRERENDER_REVALIDATE_HEADER,\n  PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER,\n} from '../../lib/constants'\nimport { getTracer } from '../lib/trace/tracer'\nimport { NodeSpan } from '../lib/trace/constants'\n\nexport type NextApiRequestCookies = Partial<{ [key: string]: string }>\nexport type NextApiRequestQuery = Partial<{ [key: string]: string | string[] }>\n\nexport type __ApiPreviewProps = {\n  previewModeId: string\n  previewModeEncryptionKey: string\n  previewModeSigningKey: string\n}\n\nexport function wrapApiHandler<T extends (...args: any[]) => any>(\n  page: string,\n  handler: T\n): T {\n  return ((...args) => {\n    getTracer().setRootSpanAttribute('next.route', page)\n    // Call API route method\n    return getTracer().trace(\n      NodeSpan.runHandler,\n      {\n        spanName: `executing api route (pages) ${page}`,\n      },\n      () => handler(...args)\n    )\n  }) as T\n}\n\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */\nexport function sendStatusCode(\n  res: NextApiResponse,\n  statusCode: number\n): NextApiResponse<any> {\n  res.statusCode = statusCode\n  return res\n}\n\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */\nexport function redirect(\n  res: NextApiResponse,\n  statusOrUrl: string | number,\n  url?: string\n): NextApiResponse<any> {\n  if (typeof statusOrUrl === 'string') {\n    url = statusOrUrl\n    statusOrUrl = 307\n  }\n  if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n    throw new Error(\n      `Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`\n    )\n  }\n  res.writeHead(statusOrUrl, { Location: url })\n  res.write(url)\n  res.end()\n  return res\n}\n\nexport function checkIsOnDemandRevalidate(\n  rawHeaders: Headers | IncomingHttpHeaders,\n  previewProps: __ApiPreviewProps\n): {\n  isOnDemandRevalidate: boolean\n  revalidateOnlyGenerated: boolean\n} {\n  // Headers is a plain object for Node.js, Headers object in Edge runtime\n  if (typeof rawHeaders.get === 'function') {\n    const headers = HeadersAdapter.from(rawHeaders)\n\n    const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER)\n    const isOnDemandRevalidate = previewModeId === previewProps.previewModeId\n\n    const revalidateOnlyGenerated = headers.has(\n      PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER\n    )\n\n    return { isOnDemandRevalidate, revalidateOnlyGenerated }\n  }\n\n  const headers = rawHeaders as IncomingHttpHeaders\n\n  const previewModeId = headers[PRERENDER_REVALIDATE_HEADER]\n  const isOnDemandRevalidate = previewModeId === previewProps.previewModeId\n\n  const revalidateOnlyGenerated = headers.hasOwnProperty(\n    PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER\n  )\n\n  return { isOnDemandRevalidate, revalidateOnlyGenerated }\n}\n\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`\n\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024\n\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA)\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS)\n\nexport function clearPreviewData<T>(\n  res: NextApiResponse<T>,\n  options: {\n    path?: string\n  } = {}\n): NextApiResponse<T> {\n  if (SYMBOL_CLEARED_COOKIES in res) {\n    return res\n  }\n\n  const { serialize } =\n    require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n  const previous = res.getHeader('Set-Cookie')\n  res.setHeader(`Set-Cookie`, [\n    ...(typeof previous === 'string'\n      ? [previous]\n      : Array.isArray(previous)\n        ? previous\n        : []),\n    serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n      // To delete a cookie, set `expires` to a date in the past:\n      // https://tools.ietf.org/html/rfc6265#section-4.1.1\n      // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n      expires: new Date(0),\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      ...(options.path !== undefined\n        ? ({ path: options.path } as CookieSerializeOptions)\n        : undefined),\n    }),\n    serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n      // To delete a cookie, set `expires` to a date in the past:\n      // https://tools.ietf.org/html/rfc6265#section-4.1.1\n      // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n      expires: new Date(0),\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      ...(options.path !== undefined\n        ? ({ path: options.path } as CookieSerializeOptions)\n        : undefined),\n    }),\n  ])\n\n  Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n    value: true,\n    enumerable: false,\n  })\n  return res\n}\n\n/**\n * Custom error class\n */\nexport class ApiError extends Error {\n  readonly statusCode: number\n\n  constructor(statusCode: number, message: string) {\n    super(message)\n    this.statusCode = statusCode\n  }\n}\n\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */\nexport function sendError(\n  res: NextApiResponse,\n  statusCode: number,\n  message: string\n): void {\n  res.statusCode = statusCode\n  res.statusMessage = message\n  res.end(message)\n}\n\ninterface LazyProps {\n  req: IncomingMessage\n}\n\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */\nexport function setLazyProp<T>(\n  { req }: LazyProps,\n  prop: string,\n  getter: () => T\n): void {\n  const opts = { configurable: true, enumerable: true }\n  const optsReset = { ...opts, writable: true }\n\n  Object.defineProperty(req, prop, {\n    ...opts,\n    get: () => {\n      const value = getter()\n      // we set the property on the object to avoid recalculating it\n      Object.defineProperty(req, prop, { ...optsReset, value })\n      return value\n    },\n    set: (value) => {\n      Object.defineProperty(req, prop, { ...optsReset, value })\n    },\n  })\n}\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextApiResponse } from '../../../shared/lib/utils'\nimport { checkIsOnDemandRevalidate } from '../.'\nimport type { __ApiPreviewProps } from '../.'\nimport type { BaseNextRequest, BaseNextResponse } from '../../base-http'\nimport type { PreviewData } from '../../../types'\n\nimport {\n  clearPreviewData,\n  COOKIE_NAME_PRERENDER_BYPASS,\n  COOKIE_NAME_PRERENDER_DATA,\n  SYMBOL_PREVIEW_DATA,\n} from '../index'\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\n\nexport function tryGetPreviewData(\n  req: IncomingMessage | BaseNextRequest | Request,\n  res: ServerResponse | BaseNextResponse,\n  options: __ApiPreviewProps,\n  multiZoneDraftMode: boolean\n): PreviewData {\n  // if an On-Demand revalidation is being done preview mode\n  // is disabled\n  if (\n    options &&\n    checkIsOnDemandRevalidate(req.headers, options).isOnDemandRevalidate\n  ) {\n    return false\n  }\n\n  // Read cached preview data if present\n  // TODO: use request metadata instead of a symbol\n  if (SYMBOL_PREVIEW_DATA in req) {\n    return (req as any)[SYMBOL_PREVIEW_DATA] as any\n  }\n\n  const headers = HeadersAdapter.from(req.headers)\n  const cookies = new RequestCookies(headers)\n\n  const previewModeId = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)?.value\n  const tokenPreviewData = cookies.get(COOKIE_NAME_PRERENDER_DATA)?.value\n  const isValidPreviewModeId =\n    previewModeId === options.previewModeId ||\n    // In dev mode, the cookie can be the actual hash value preview id but the\n    // preview props can still be `development-id`.\n    (process.env.NODE_ENV !== 'production' &&\n      options.previewModeId === 'development-id')\n\n  // Case: preview mode cookie set but data cookie is not set\n  if (previewModeId && !tokenPreviewData && isValidPreviewModeId) {\n    // This is \"Draft Mode\" which doesn't use\n    // previewData, so we return an empty object\n    // for backwards compat with \"Preview Mode\".\n    const data = {}\n    Object.defineProperty(req, SYMBOL_PREVIEW_DATA, {\n      value: data,\n      enumerable: false,\n    })\n    return data\n  }\n\n  // Case: neither cookie is set.\n  if (!previewModeId && !tokenPreviewData) {\n    return false\n  }\n\n  // Case: one cookie is set, but not the other.\n  if (!previewModeId || !tokenPreviewData) {\n    if (!multiZoneDraftMode) {\n      clearPreviewData(res as NextApiResponse)\n    }\n    return false\n  }\n\n  // Case: preview session is for an old build.\n  if (previewModeId !== options.previewModeId) {\n    if (!multiZoneDraftMode) {\n      clearPreviewData(res as NextApiResponse)\n    }\n    return false\n  }\n\n  let encryptedPreviewData: {\n    data: string\n  }\n  try {\n    const jsonwebtoken =\n      require('next/dist/compiled/jsonwebtoken') as typeof import('next/dist/compiled/jsonwebtoken')\n    encryptedPreviewData = jsonwebtoken.verify(\n      tokenPreviewData,\n      options.previewModeSigningKey\n    ) as typeof encryptedPreviewData\n  } catch {\n    // TODO: warn\n    clearPreviewData(res as NextApiResponse)\n    return false\n  }\n\n  const { decryptWithSecret } =\n    require('../../crypto-utils') as typeof import('../../crypto-utils')\n  const decryptedPreviewData = decryptWithSecret(\n    Buffer.from(options.previewModeEncryptionKey),\n    encryptedPreviewData.data\n  )\n\n  try {\n    // TODO: strict runtime type checking\n    const data = JSON.parse(decryptedPreviewData)\n    // Cache lookup\n    Object.defineProperty(req, SYMBOL_PREVIEW_DATA, {\n      value: data,\n      enumerable: false,\n    })\n    return data\n  } catch {\n    return false\n  }\n}\n","import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type AnyStream = ReadableStream<Uint8Array> | Readable\n\nfunction isWebStream(stream: AnyStream): stream is ReadableStream<Uint8Array> {\n  return typeof (stream as ReadableStream).tee === 'function'\n}\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n  private _stream: null | AnyStream\n  private _replayable: ReplayableNodeStream | null\n\n  constructor(stream: AnyStream) {\n    if (process.env.__NEXT_USE_NODE_STREAMS && !isWebStream(stream)) {\n      this._stream = null\n      this._replayable = new ReplayableNodeStream(stream as Readable)\n    } else {\n      this._stream = stream\n      this._replayable = null\n    }\n  }\n\n  tee(): AnyStream {\n    if (this._replayable) {\n      return this._replayable.createReplayStream()\n    }\n\n    if (this._stream === null) {\n      throw new Error(\n        'Cannot tee a ReactServerResult that has already been consumed'\n      )\n    }\n    if (isWebStream(this._stream)) {\n      const tee = this._stream.tee()\n      this._stream = tee[0]\n      return tee[1]\n    }\n\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      throw new InvariantError(\n        'Node.js Readable cannot be teed in the edge runtime'\n      )\n    } else {\n      let Readable: typeof import('node:stream').Readable\n      if (process.env.TURBOPACK) {\n        Readable = (require('node:stream') as typeof import('node:stream'))\n          .Readable\n      } else {\n        Readable = (\n          __non_webpack_require__('node:stream') as typeof import('node:stream')\n        ).Readable\n      }\n      const webStream = Readable.toWeb(\n        this._stream\n      ) as ReadableStream<Uint8Array>\n      const tee = webStream.tee()\n      this._stream = Readable.fromWeb(\n        tee[0] as import('stream/web').ReadableStream\n      )\n      return Readable.fromWeb(tee[1] as import('stream/web').ReadableStream)\n    }\n  }\n\n  consume(): AnyStream {\n    if (this._replayable) {\n      const stream = this._replayable.createReplayStream()\n      this._replayable.dispose()\n      this._replayable = null\n      return stream\n    }\n\n    if (this._stream === null) {\n      throw new Error(\n        'Cannot consume a ReactServerResult that has already been consumed'\n      )\n    }\n    const stream = this._stream\n    this._stream = null\n    return stream\n  }\n}\n\ntype ReplayableStreamSubscriber = {\n  onChunk: (chunk: Uint8Array) => void\n  onEnd: () => void\n  onError: (err: Error) => void\n}\n\n/**\n * Buffers all chunks from a Node.js Readable stream and allows creating new\n * Readable streams that replay the buffered chunks plus any subsequent chunks\n * from the source. Multiple replay streams can be created independently.\n */\nexport class ReplayableNodeStream {\n  private _chunks: Array<Uint8Array> | null\n  private _done: boolean\n  private _error: Error | null\n  private _subscribers: Set<ReplayableStreamSubscriber>\n\n  constructor(stream: Readable) {\n    this._chunks = []\n    this._done = false\n    this._error = null\n    this._subscribers = new Set()\n\n    stream.on('data', (chunk: Buffer | Uint8Array) => {\n      const buf = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk)\n      if (this._chunks !== null) {\n        this._chunks.push(buf)\n      }\n      for (const sub of this._subscribers) {\n        sub.onChunk(buf)\n      }\n    })\n\n    stream.on('end', () => {\n      this._done = true\n      for (const sub of this._subscribers) {\n        sub.onEnd()\n      }\n      this._subscribers.clear()\n    })\n\n    stream.on('error', (err: Error) => {\n      this._error = err\n      for (const sub of this._subscribers) {\n        sub.onError(err)\n      }\n      this._subscribers.clear()\n    })\n  }\n\n  /**\n   * Creates a new Node.js Readable stream that first emits all buffered chunks,\n   * then forwards any new chunks from the source as they arrive.\n   *\n   * Buffered chunks are delivered via _read() (pull-based) rather than pushed\n   * eagerly. This is critical because createReplayStream() is called outside\n   * of AsyncLocalStorage context, and eagerly pushing chunks triggers internal\n   * Node.js stream scheduling (process.nextTick for maybeReadMore) that\n   * captures the empty ALS context. By deferring to _read(), chunks are only\n   * delivered when the consumer reads, which happens inside the correct ALS\n   * scope (e.g. during Fizz's performWork).\n   */\n  createReplayStream(): Readable {\n    if (this._chunks === null) {\n      throw new InvariantError(\n        'Cannot create a replay stream after the ReplayableNodeStream has been disposed.'\n      )\n    }\n\n    let ReadableCtor: typeof import('node:stream').Readable\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      throw new InvariantError(\n        'Node.js Readable cannot be teed in the edge runtime'\n      )\n    } else {\n      if (\n        process.env.__NEXT_BUNDLER === 'Webpack' ||\n        process.env.__NEXT_BUNDLER === 'Rspack'\n      ) {\n        ReadableCtor = (\n          __non_webpack_require__('node:stream') as typeof import('node:stream')\n        ).Readable\n      } else {\n        ReadableCtor = (require('node:stream') as typeof import('node:stream'))\n          .Readable\n      }\n    }\n\n    const bufferedChunks = this._chunks.slice()\n    let bufferIndex = 0\n    let bufferDrained = false\n    const isDone = this._done\n    const sourceError = this._error\n\n    const stream = new ReadableCtor({\n      read() {\n        if (!bufferDrained) {\n          bufferDrained = true\n          for (let i = bufferIndex; i < bufferedChunks.length; i++) {\n            this.push(bufferedChunks[i])\n          }\n          bufferIndex = bufferedChunks.length\n          if (isDone) {\n            this.push(null)\n          }\n        }\n      },\n    })\n\n    if (sourceError) {\n      stream.destroy(sourceError)\n      return stream\n    }\n\n    if (isDone) {\n      return stream\n    }\n\n    const subscriber: ReplayableStreamSubscriber = {\n      onChunk: (chunk) => {\n        stream.push(chunk)\n      },\n      onEnd: () => {\n        stream.push(null)\n      },\n      onError: (err) => {\n        stream.destroy(err)\n      },\n    }\n    this._subscribers.add(subscriber)\n\n    stream.on('close', () => {\n      this._subscribers.delete(subscriber)\n    })\n\n    return stream\n  }\n\n  /**\n   * Clears the buffered chunks and all subscriber references. After calling\n   * this, no new replay streams can be created.\n   */\n  dispose(): void {\n    this._chunks = null\n  }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n  prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n  underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n  const chunks: Array<Uint8Array> = []\n  const { prelude } = await underlying\n  const reader = prelude.getReader()\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      return new ReactServerPrerenderResult(chunks)\n    } else {\n      chunks.push(value)\n    }\n  }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n  underlying: AnyStream\n): Promise<ReactServerPrerenderResult> {\n  const chunks: Array<Uint8Array> = []\n\n  if (isWebStream(underlying)) {\n    const reader = underlying.getReader()\n    while (true) {\n      const { done, value } = await reader.read()\n      if (done) {\n        break\n      } else {\n        chunks.push(value)\n      }\n    }\n  } else {\n    for await (const chunk of underlying) {\n      chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk))\n    }\n  }\n\n  return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n  private _chunks: null | Array<Uint8Array>\n\n  private assertChunks(expression: string): Array<Uint8Array> {\n    if (this._chunks === null) {\n      throw new InvariantError(\n        `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n      )\n    }\n    return this._chunks\n  }\n\n  private consumeChunks(expression: string): Array<Uint8Array> {\n    const chunks = this.assertChunks(expression)\n    this.consume()\n    return chunks\n  }\n\n  consume(): void {\n    this._chunks = null\n  }\n\n  constructor(chunks: Array<Uint8Array>) {\n    this._chunks = chunks\n  }\n\n  asChunks(): Array<Uint8Array> {\n    const chunks = this.assertChunks('asChunks()')\n    return chunks\n  }\n\n  asUnclosingStream(): ReadableStream<Uint8Array> {\n    const chunks = this.assertChunks('asUnclosingStream()')\n    return createUnclosingStream(chunks)\n  }\n\n  consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n    const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n    return createUnclosingStream(chunks)\n  }\n\n  asStream(): ReadableStream<Uint8Array> {\n    const chunks = this.assertChunks('asStream()')\n    return createClosingStream(chunks)\n  }\n\n  consumeAsStream(): ReadableStream<Uint8Array> {\n    const chunks = this.consumeChunks('consumeAsStream()')\n    return createClosingStream(chunks)\n  }\n}\n\nfunction createUnclosingStream(\n  chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n  let i = 0\n  return new ReadableStream({\n    async pull(controller) {\n      if (i < chunks.length) {\n        controller.enqueue(chunks[i++])\n      }\n      // we intentionally keep the stream open. The consumer will clear\n      // out chunks once finished and the remaining memory will be GC'd\n      // when this object goes out of scope\n    },\n  })\n}\n\nfunction createClosingStream(\n  chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n  let i = 0\n  return new ReadableStream({\n    async pull(controller) {\n      if (i < chunks.length) {\n        controller.enqueue(chunks[i++])\n      } else {\n        controller.close()\n      }\n    },\n  })\n}\n\nexport async function processPrelude(\n  unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n  const [prelude, peek] = unprocessedPrelude.tee()\n\n  const reader = peek.getReader()\n  const firstResult = await reader.read()\n  reader.cancel()\n\n  const preludeIsEmpty = firstResult.done === true\n\n  return { prelude, preludeIsEmpty }\n}\n","import type { AsyncLocalStorage } from 'async_hooks'\n\nconst sharedAsyncLocalStorageNotAvailableError = new Error(\n  'Invariant: AsyncLocalStorage accessed in runtime where it is not available'\n)\n\nclass FakeAsyncLocalStorage<Store extends {}>\n  implements AsyncLocalStorage<Store>\n{\n  disable(): void {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  getStore(): Store | undefined {\n    // This fake implementation of AsyncLocalStorage always returns `undefined`.\n    return undefined\n  }\n\n  run<R>(): R {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  exit<R>(): R {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  enterWith(): void {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  static bind<T>(fn: T): T {\n    return fn\n  }\n}\n\nconst maybeGlobalAsyncLocalStorage =\n  typeof globalThis !== 'undefined' && (globalThis as any).AsyncLocalStorage\n\nexport function createAsyncLocalStorage<\n  Store extends {},\n>(): AsyncLocalStorage<Store> {\n  if (maybeGlobalAsyncLocalStorage) {\n    return new maybeGlobalAsyncLocalStorage()\n  }\n  return new FakeAsyncLocalStorage()\n}\n\nexport function bindSnapshot<T>(\n  // WARNING: Don't pass a named function to this argument! See: https://github.com/facebook/react/pull/34911\n  fn: T\n): T {\n  if (maybeGlobalAsyncLocalStorage) {\n    return maybeGlobalAsyncLocalStorage.bind(fn)\n  }\n  return FakeAsyncLocalStorage.bind(fn)\n}\n\nexport function createSnapshot(): <R, TArgs extends any[]>(\n  fn: (...args: TArgs) => R,\n  ...args: TArgs\n) => R {\n  if (maybeGlobalAsyncLocalStorage) {\n    return maybeGlobalAsyncLocalStorage.snapshot()\n  }\n  return function (fn: any, ...args: any[]) {\n    return fn(...args)\n  }\n}\n","/**\n * Web debug channel implementation.\n * Loaded by debug-channel-server.ts.\n */\n\nimport type { AnyStream } from './app-render-prerender-utils'\n\nexport type DebugChannelPair = {\n  serverSide: DebugChannelServer\n  clientSide: DebugChannelClient\n}\n\nexport type DebugChannelServer = any\n\ntype DebugChannelClient = {\n  readable: AnyStream\n}\n\n/**\n * Creates a debug channel using web WritableStream/ReadableStream.\n * Use with renderToWebFlightStream (React's renderToReadableStream),\n * which expects debugChannel = { writable: WritableStream }.\n */\nexport function createWebDebugChannel(): DebugChannelPair {\n  let readableController: ReadableStreamDefaultController | undefined\n\n  const clientSideReadable = new ReadableStream<Uint8Array>({\n    start(controller) {\n      readableController = controller\n    },\n  })\n\n  return {\n    serverSide: {\n      writable: new WritableStream<Uint8Array>({\n        write(chunk) {\n          readableController?.enqueue(chunk)\n        },\n        close() {\n          readableController?.close()\n        },\n        abort(err) {\n          readableController?.error(err)\n        },\n      }),\n    },\n    clientSide: { readable: clientSideReadable },\n  }\n}\n\n/**\n * Creates a debug channel using Node.js streams.\n * Use with renderToNodeFlightStream (React's renderToPipeableStream),\n * which expects debugChannel to be a Node.js stream with a .write() method.\n */\nexport function createNodeDebugChannel(): never {\n  throw new Error('not implemented')\n}\n","/**\n * Node debug channel implementation.\n * Loaded by debug-channel-server.ts when __NEXT_USE_NODE_STREAMS is enabled.\n */\n\nimport { PassThrough, Writable, type Readable } from 'node:stream'\nimport type { DebugChannelServer } from './debug-channel-server.web'\n\nexport { createWebDebugChannel } from './debug-channel-server.web'\n\n/**\n * Node variant: identical to `DebugChannelPair` except the client-side readable\n * is narrowed to a Node `Readable`, so node call sites can consume it (e.g.\n * `new ReplayableNodeStream(...)`) without casting `AnyStream` down.\n */\nexport type NodeDebugChannelPair = {\n  serverSide: DebugChannelServer\n  clientSide: { readable: Readable }\n}\n\n/**\n * Creates a debug channel using Node.js streams.\n * Use with renderToNodeFlightStream (React's renderToPipeableStream),\n * which expects debugChannel to be a Node.js stream with a .write() method.\n */\nexport function createNodeDebugChannel(): NodeDebugChannelPair {\n  // The readable side is a PassThrough that the client reads from. The\n  // server-side write target is a separate, write-only Writable that forwards\n  // into it rather than the PassThrough itself: React's renderToPipeableStream\n  // detects `.read()` on the debug channel and would enter bidirectional mode,\n  // reading its own output back as commands.\n  //\n  // The forwarding must use `passthrough.write()` / `passthrough.end()`, not\n  // `passthrough.push()` / `passthrough.push(null)`. A PassThrough is a Duplex;\n  // pushing `null` ends only its readable half and leaves the writable half\n  // open (`writableEnded` stays false). If the readable is consumed via\n  // `Readable.toWeb()`, that web stream never closes while the PassThrough's\n  // writable half is still open — so the debug channel would never close on the\n  // client. Ending it via `passthrough.end()` closes both halves and the close\n  // propagates.\n  const passthrough = new PassThrough()\n\n  const writable = new Writable({\n    write(chunk, encoding, callback) {\n      passthrough.write(chunk, encoding, callback)\n    },\n    final(callback) {\n      passthrough.end(callback)\n    },\n  })\n\n  return {\n    serverSide: writable,\n    clientSide: { readable: passthrough },\n  }\n}\n","import type { InstantSample } from '../../../build/segment-config/app/app-segment-config'\nimport type { ReadonlyRequestCookies } from '../../web/spec-extension/adapters/request-cookies'\nimport type { ReadonlyHeaders } from '../../web/spec-extension/adapters/headers'\nimport type { DraftModeProvider } from '../../async-storage/draft-mode-provider'\nimport type { Params } from '../../request/params'\n\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { RequestCookiesAdapter } from '../../web/spec-extension/adapters/request-cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\nimport type { SearchParams } from '../../request/search-params'\nimport { getSegmentParam } from '../../../shared/lib/router/utils/get-segment-param'\nimport { parseRelativeUrl } from '../../../shared/lib/router/utils/parse-relative-url'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { InstantValidationError } from './instant-validation-error'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\nimport { wellKnownProperties } from '../../../shared/lib/utils/reflect-utils'\nimport type { WorkStore } from '../work-async-storage.external'\n\nexport type InstantValidationSampleTracking = {\n  // TODO(instant-validation-build): track which samples config we used and attribute errors\n  missingSampleErrors: InstantValidationError[]\n}\n\nexport function createValidationSampleTracking(): InstantValidationSampleTracking {\n  return {\n    missingSampleErrors: [],\n  }\n}\n\nfunction getExpectedSampleTracking(): InstantValidationSampleTracking {\n  let validationSampleTracking: InstantValidationSampleTracking | null = null\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'request':\n      case 'validation-client':\n        // TODO(instant-validation-build): do we need any special handling for caches?\n        validationSampleTracking =\n          workUnitStore.validationSampleTracking ?? null\n        break\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender-client':\n      case 'prerender':\n      case 'prerender-runtime':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  if (!validationSampleTracking) {\n    throw new InvariantError(\n      'Expected to have a workUnitStore that provides validationSampleTracking'\n    )\n  }\n  return validationSampleTracking\n}\n\nexport function trackMissingSampleError(error: InstantValidationError): void {\n  const validationSampleTracking = getExpectedSampleTracking()\n  validationSampleTracking.missingSampleErrors.push(error)\n}\n\nexport function trackMissingSampleErrorAndThrow(\n  error: InstantValidationError\n): never {\n  // TODO(instant-validation-build): this should abort the render\n  trackMissingSampleError(error)\n  throw error\n}\n\n/**\n * Creates ReadonlyRequestCookies from sample cookie data.\n * Accessing a cookie not declared in the sample will throw an error.\n * Cookies with `value: null` are declared (allowed to access) but return no value.\n */\nexport function createCookiesFromSample(\n  sampleCookies: InstantSample['cookies'],\n  route: string\n): ReadonlyRequestCookies {\n  const declaredNames = new Set<string>()\n\n  const cookies = new RequestCookies(new Headers())\n  if (sampleCookies) {\n    for (const cookie of sampleCookies) {\n      declaredNames.add(cookie.name)\n      if (cookie.value !== null) {\n        cookies.set(cookie.name, cookie.value)\n      }\n    }\n  }\n\n  const sealed = RequestCookiesAdapter.seal(cookies)\n\n  return new Proxy(sealed, {\n    get(target, prop, receiver) {\n      if (prop === 'has') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const wrappedMethod: typeof originalMethod = function (name) {\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingCookieSampleError(route, name)\n            )\n          }\n          return originalMethod.call(target, name)\n        }\n        return wrappedMethod\n      }\n      if (prop === 'get') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const wrappedMethod: typeof originalMethod = function (nameOrCookie) {\n          let name: string\n          if (typeof nameOrCookie === 'string') {\n            name = nameOrCookie\n          } else if (\n            nameOrCookie &&\n            typeof nameOrCookie === 'object' &&\n            typeof nameOrCookie.name === 'string'\n          ) {\n            name = nameOrCookie.name\n          } else {\n            // This is an invalid input. Pass it through to the original method so it can error.\n            return originalMethod.call(target, nameOrCookie)\n          }\n\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingCookieSampleError(route, name)\n            )\n          }\n          return originalMethod.call(target, name)\n        }\n        return wrappedMethod\n      }\n\n      // TODO(instant-validation-build): what should getAll do?\n      // Maybe we should only allow it if there's an array (possibly empty?)\n\n      return Reflect.get(target, prop, receiver)\n    },\n  })\n}\n\nfunction createMissingCookieSampleError(\n  route: string,\n  name: string\n): InstantValidationError {\n  return new InstantValidationError(\n    `Route \"${route}\" accessed cookie \"${name}\" which is not defined in the \\`unstable_samples\\` ` +\n      `of \\`instant\\`. Add it to the sample's \\`cookies\\` array, ` +\n      `or \\`{ name: \"${name}\", value: null }\\` if it should be absent.`\n  )\n}\n\n/**\n * Creates ReadonlyHeaders from sample header data.\n * Accessing a header not declared in the sample will throw an error.\n * Headers with `value: null` are declared (allowed to access) but return null.\n */\nexport function createHeadersFromSample(\n  rawSampleHeaders: InstantSample['headers'],\n  sampleCookies: InstantSample['cookies'],\n  route: string\n): ReadonlyHeaders {\n  // If we have cookie samples, add a `cookie` header to match.\n  // Accessing it will be implicitly allowed by the proxy --\n  // if the user defined some cookies, accessing the \"cookie\" header is also fine.\n  const sampleHeaders = rawSampleHeaders ? [...rawSampleHeaders] : []\n  if (sampleHeaders.find(([name]) => name.toLowerCase() === 'cookie')) {\n    throw new InstantValidationError(\n      'Invalid sample: Defining cookies via a \"cookie\" header is not supported. Use `cookies: [{ name: ..., value: ... }]` instead.'\n    )\n  }\n  if (sampleCookies) {\n    const cookieHeaderValue = sampleCookies.toString()\n    sampleHeaders.push([\n      'cookie',\n      // if the `cookies` samples were empty, or they were all `null`, then we have no cookies,\n      // and the header isn't present, but should remains readable, so we set it to null.\n      cookieHeaderValue !== '' ? cookieHeaderValue : null,\n    ])\n  }\n\n  const declaredNames = new Set<string>()\n  const headersInit: Record<string, string> = {}\n\n  for (const [name, value] of sampleHeaders) {\n    declaredNames.add(name.toLowerCase())\n    if (value !== null) {\n      headersInit[name.toLowerCase()] = value\n    }\n  }\n\n  const sealed = HeadersAdapter.seal(HeadersAdapter.from(headersInit))\n\n  return new Proxy(sealed, {\n    get(target, prop, receiver) {\n      if (prop === 'get' || prop === 'has') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const patchedMethod: typeof originalMethod = function (rawName) {\n          const name = rawName.toLowerCase()\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              new InstantValidationError(\n                `Route \"${route}\" accessed header \"${name}\" which is not defined in the \\`unstable_samples\\` ` +\n                  `of \\`instant\\`. Add it to the sample's \\`headers\\` array, ` +\n                  `or \\`[\"${name}\", null]\\` if it should be absent.`\n              )\n            )\n          }\n          // typescript can't reconcile a union of functions with a union of return types,\n          // so we have to cast the original return type away\n          return (originalMethod as (...args: any[]) => any).call(target, name)\n        }\n        return patchedMethod\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n  })\n}\n\n/**\n * Creates a DraftModeProvider that always returns isEnabled: false.\n */\nexport function createDraftModeForValidation(): DraftModeProvider {\n  // Create a minimal DraftModeProvider-compatible object\n  // that always reports draft mode as disabled.\n  //\n  // private properties that can't be set from outside the class.\n  return {\n    get isEnabled() {\n      return false\n    },\n    enable() {\n      throw new Error(\n        'Draft mode cannot be enabled during build-time instant validation.'\n      )\n    },\n    disable() {\n      throw new Error(\n        'Draft mode cannot be disabled during build-time instant validation.'\n      )\n    },\n  } as Partial<DraftModeProvider> as DraftModeProvider\n}\n\n/**\n * Creates params wrapped with an exhaustive proxy.\n * Accessing a param not declared in the sample will throw an error.\n */\nexport function createExhaustiveParamsProxy<TParams extends Params>(\n  underlyingParams: TParams,\n  declaredParamNames: Set<string>,\n  route: string\n): TParams {\n  return new Proxy(underlyingParams, {\n    get(target, prop, receiver) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        // Only error when accessing a param that is part of the route but wasn't provided.\n        // accessing properties that aren't expected to be a valid param value is fine.\n        prop in underlyingParams &&\n        !declaredParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          new InstantValidationError(\n            `Route \"${route}\" accessed param \"${prop}\" which is not defined in the \\`unstable_samples\\` ` +\n              `of \\`instant\\`. Add it to the sample's \\`params\\` object.`\n          )\n        )\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n    // We don't need to override `has` or `ownKeys`.\n    // the shape of the params object is determined by the routing structure\n    // and independent of the samples. We only need to instrument accessing the values.\n  })\n}\n\n/**\n * Creates searchParams wrapped with an exhaustive proxy.\n * Accessing a searchParam not declared in the sample will throw an error.\n * A searchParam with `value: undefined` means \"declared but absent\" (allowed to access, returns undefined).\n */\nexport function createExhaustiveSearchParamsProxy(\n  searchParams: SearchParams,\n  declaredSearchParamNames: Set<string>,\n  route: string\n): SearchParams {\n  return new Proxy(searchParams, {\n    get(target, prop, receiver) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        !declaredSearchParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          createMissingSearchParamSampleError(route, prop)\n        )\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n    has(target, prop) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        !declaredSearchParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          createMissingSearchParamSampleError(route, prop)\n        )\n      }\n      return Reflect.has(target, prop)\n    },\n  })\n}\n\n/**\n * Wraps a URLSearchParams (or subclass like ReadonlyURLSearchParams) with an\n * exhaustive proxy. Accessing a search param not declared in the sample via\n * get/getAll/has will throw an error.\n */\nexport function createExhaustiveURLSearchParamsProxy<T extends URLSearchParams>(\n  searchParams: T,\n  declaredSearchParamNames: Set<string>,\n  route: string\n): T {\n  return new Proxy(searchParams, {\n    get(target, prop, receiver) {\n      // Intercept method calls that access specific param names\n      if (prop === 'get' || prop === 'getAll' || prop === 'has') {\n        const originalMathod = Reflect.get(target, prop, receiver)\n        return (name: string) => {\n          if (typeof name === 'string' && !declaredSearchParamNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingSearchParamSampleError(route, name)\n            )\n          }\n          return (originalMathod as (...args: any[]) => any).call(target, name)\n        }\n      }\n      const value = Reflect.get(target, prop, receiver)\n      // Prevent `TypeError: Value of \"this\" must be of type URLSearchParams` for methods\n      if (typeof value === 'function' && !Object.hasOwn(target, prop)) {\n        return value.bind(target)\n      }\n      return value\n    },\n  })\n}\n\nfunction createMissingSearchParamSampleError(\n  route: string,\n  name: string\n): InstantValidationError {\n  return new InstantValidationError(\n    `Route \"${route}\" accessed searchParam \"${name}\" which is not defined in the \\`unstable_samples\\` ` +\n      `of \\`instant\\`. Add it to the sample's \\`searchParams\\` object, ` +\n      `or \\`{ \"${name}\": null }\\` if it should be absent.`\n  )\n}\n\nexport function createRelativeURLFromSamples(\n  route: string,\n  sampleParams: InstantSample['params'],\n  sampleSearchParams: InstantSample['searchParams']\n) {\n  // Build searchParams query object and URL search string from sample\n  const pathname = createPathnameFromRouteAndSampleParams(\n    route,\n    sampleParams ?? {}\n  )\n\n  let search = ''\n  if (sampleSearchParams) {\n    const qs = createURLSearchParamsFromSample(sampleSearchParams).toString()\n    if (qs) {\n      search = '?' + qs\n    }\n  }\n\n  return parseRelativeUrl(pathname + search, undefined, true)\n}\n\nfunction createURLSearchParamsFromSample(\n  sampleSearchParams: InstantSample['searchParams']\n) {\n  const result = new URLSearchParams()\n  if (sampleSearchParams) {\n    for (const [key, value] of Object.entries(sampleSearchParams)) {\n      if (value === null || value === undefined) continue\n      if (Array.isArray(value)) {\n        for (const v of value) {\n          result.append(key, v)\n        }\n      } else {\n        result.set(key, value)\n      }\n    }\n  }\n  return result\n}\n\n/**\n * Substitute sample params into `workStore.route` to create a plausible pathname.\n * TODO(instant-validation-build): this logic is somewhat hacky and likely incomplete,\n * but it should be good enough for some initial testing.\n */\nfunction createPathnameFromRouteAndSampleParams(route: string, params: Params) {\n  let interpolatedSegments: string[] = []\n  const rawSegments = route.split('/')\n  for (const rawSegment of rawSegments) {\n    const param = getSegmentParam(rawSegment)\n    if (param) {\n      switch (param.paramType) {\n        case 'catchall':\n        case 'optional-catchall': {\n          let paramValue = params[param.paramName]\n          if (paramValue === undefined) {\n            // The value for the param was not provided. `usePathname` will detect this and throw\n            // before this can surface to userspace. Use `[...NAME]` as a placeholder for the param value\n            // in case it pops up somewhere unexpectedly.\n            paramValue = [rawSegment]\n          } else if (!Array.isArray(paramValue)) {\n            // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be an array of strings, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(\n            ...paramValue.map((v) => encodeURIComponent(v))\n          )\n          break\n        }\n        case 'dynamic': {\n          let paramValue = params[param.paramName]\n          if (paramValue === undefined) {\n            // The value for the param was not provided. `usePathname` will detect this and throw\n            // before this can surface to userspace. Use `[NAME]` as a placeholder for the param value\n            // in case it pops up somewhere unexpectedly.\n            paramValue = rawSegment\n          } else if (typeof paramValue !== 'string') {\n            // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be a string, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(encodeURIComponent(paramValue))\n          break\n        }\n        case 'catchall-intercepted-(..)(..)':\n        case 'catchall-intercepted-(.)':\n        case 'catchall-intercepted-(..)':\n        case 'catchall-intercepted-(...)':\n        case 'dynamic-intercepted-(..)(..)':\n        case 'dynamic-intercepted-(.)':\n        case 'dynamic-intercepted-(..)':\n        case 'dynamic-intercepted-(...)': {\n          // TODO(instant-validation-build): i don't know how these are supposed to work, or if we can even get them here\n          throw new InvariantError(\n            'Not implemented: Validation of interception routes'\n          )\n        }\n        default: {\n          param.paramType satisfies never\n        }\n      }\n    } else {\n      interpolatedSegments.push(rawSegment)\n    }\n  }\n  return interpolatedSegments.join('/')\n}\n\nexport function assertRootParamInSamples(\n  workStore: WorkStore,\n  sampleParams: Params | undefined,\n  paramName: string\n) {\n  if (sampleParams && paramName in sampleParams) {\n    // The param is defined in the samples.\n  } else {\n    const route = workStore.route\n    trackMissingSampleErrorAndThrow(\n      new InstantValidationError(\n        `Route \"${route}\" accessed root param \"${paramName}\" which is not defined in the \\`unstable_samples\\` ` +\n          `of \\`instant\\`. Add it to the sample's \\`params\\` object.`\n      )\n    )\n  }\n}\n","const INSTANT_VALIDATION_ERROR_DIGEST = 'INSTANT_VALIDATION_ERROR'\n\n/** Check if an error is an exhaustive samples validation error (by digest). */\nexport function isInstantValidationError(\n  err: unknown\n): err is InstantValidationError {\n  return !!(\n    err &&\n    typeof err === 'object' &&\n    err instanceof Error &&\n    (err as any).digest === INSTANT_VALIDATION_ERROR_DIGEST\n  )\n}\n\nexport class InstantValidationError extends Error {\n  digest = INSTANT_VALIDATION_ERROR_DIGEST\n}\n","import type { ActionManifest } from '../../build/webpack/plugins/flight-client-entry-plugin'\nimport type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'\nimport { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'\nimport { mightBeServerReferenceId } from '../../shared/lib/server-reference-info'\nimport { wellKnownProperties } from '../../shared/lib/utils/reflect-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\nexport interface ServerModuleMap {\n  readonly [name: string]: {\n    readonly id: string | number\n    readonly name: string\n    readonly chunks: Readonly<Array<string>> // currently not used\n    readonly async?: boolean\n  }\n}\n\nexport function getActionNotFoundError(actionId: string | null): Error {\n  return new Error(\n    `Failed to find Server Action${actionId ? ` \"${actionId}\"` : ''}. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n  )\n}\n\nexport function getInvalidServerReferenceIdError(id: string): Error {\n  // `id` is arbitrary client-provided input. Unlike the not-found case, it has\n  // not passed the length gate and can reach this error via a malformed server\n  // reference in an action payload, so it may be of any length and contain\n  // control characters. `JSON.stringify` escapes newlines and quotes so it\n  // can't forge log lines, and truncating overly long ids prevents log\n  // flooding. Ids at or below the cap are logged in full so that we only add an\n  // ellipsis to ids that are meaningfully longer than the truncated length.\n  const encoded = JSON.stringify(\n    id.length > MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH\n      ? id.slice(0, TRUNCATED_SERVER_REFERENCE_ID_LENGTH) + '…'\n      : id\n  )\n\n  return new Error(\n    `The Server Reference ID did not match the expected format. Received ${encoded}.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n  )\n}\n\n// Ids at or below the cap are logged in full. Longer ids are truncated to the\n// shorter length and marked with an ellipsis, so the cap leaves headroom over\n// the truncated length rather than ellipsizing ids that are barely too long.\nconst MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH = 100\nconst TRUNCATED_SERVER_REFERENCE_ID_LENGTH = 90\n\n// This is a global singleton that is, among other things, also used to\n// encode/decode bound args of server function closures. This can't be using a\n// AsyncLocalStorage as it might happen at the module level.\nconst MANIFESTS_SINGLETON = Symbol.for('next.server.manifests')\n\ninterface RegisteredClientReferenceManifest {\n  /**\n   * The page the manifest was registered with. Routes are normalized app paths,\n   * which is lossy (route groups, parallel slots and the trailing `/page` are\n   * stripped), so this is kept alongside for consumers that need to address the\n   * manifest on disk again rather than reversing the normalization.\n   */\n  readonly page: string\n  readonly clientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n}\n\ninterface ManifestsSingleton {\n  readonly clientReferenceManifestsPerRoute: Map<\n    string,\n    RegisteredClientReferenceManifest\n  >\n  readonly proxiedClientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n  serverActionsManifest: DeepReadonly<ActionManifest>\n  serverModuleMap: ServerModuleMap\n}\n\ntype GlobalThisWithManifests = typeof globalThis & {\n  [MANIFESTS_SINGLETON]?: ManifestsSingleton\n}\n\ntype ClientReferenceManifestMappingProp =\n  | 'clientModules'\n  | 'rscModuleMapping'\n  | 'edgeRscModuleMapping'\n  | 'ssrModuleMapping'\n  | 'edgeSSRModuleMapping'\n\nconst globalThisWithManifests = globalThis as GlobalThisWithManifests\n\nfunction createProxiedClientReferenceManifest(\n  clientReferenceManifestsPerRoute: Map<\n    string,\n    RegisteredClientReferenceManifest\n  >\n): DeepReadonly<ClientReferenceManifest> {\n  const createMappingProxy = (prop: ClientReferenceManifestMappingProp) => {\n    return new Proxy(\n      {},\n      {\n        get(_, id: string) {\n          const workStore = workAsyncStorage.getStore()\n\n          if (workStore) {\n            const currentManifest = clientReferenceManifestsPerRoute.get(\n              workStore.route\n            )?.clientReferenceManifest\n\n            if (currentManifest?.[prop][id]) {\n              return currentManifest[prop][id]\n            }\n\n            // In development, we also check all other manifests to see if the\n            // module exists there. This is to support a scenario where React's\n            // I/O tracking (dev-only) creates a connection from one page to\n            // another through an emitted async I/O node that references client\n            // components from the other page, e.g. in owner props.\n            // TODO: Maybe we need to add a `debugBundlerConfig` option to React\n            // to avoid this workaround. The current workaround has the\n            // disadvantage that one might accidentally or intentionally share\n            // client references across pages (e.g. by storing them in a global\n            // variable), which would then only be caught in production.\n            if (process.env.NODE_ENV !== 'production') {\n              for (const [\n                route,\n                { page, clientReferenceManifest },\n              ] of clientReferenceManifestsPerRoute) {\n                if (route === workStore.route) {\n                  continue\n                }\n\n                const entry = clientReferenceManifest[prop][id]\n\n                if (entry !== undefined) {\n                  if (process.env.__NEXT_DEV_SERVER) {\n                    // The dev validation worker rebuilds this registry in its\n                    // own thread, seeded with only the route it validates, so\n                    // it has to be told which other manifests it needs.\n                    workStore.additionalClientReferenceManifestPages ??=\n                      new Set()\n                    workStore.additionalClientReferenceManifestPages.add(page)\n                  }\n\n                  return entry\n                }\n              }\n            }\n          } else {\n            // If there's no work store defined, we can assume that a client\n            // reference manifest is needed during module evaluation, e.g. to\n            // create a server function using a higher-order function. This\n            // might also use client components which need to be serialized by\n            // Flight, and therefore client references need to be resolvable. In\n            // that case we search all page manifests to find the module.\n            for (const {\n              clientReferenceManifest,\n            } of clientReferenceManifestsPerRoute.values()) {\n              const entry = clientReferenceManifest[prop][id]\n\n              if (entry !== undefined) {\n                return entry\n              }\n            }\n          }\n\n          return undefined\n        },\n      }\n    )\n  }\n\n  const mappingProxies = new Map<\n    ClientReferenceManifestMappingProp,\n    ReturnType<typeof createMappingProxy>\n  >()\n\n  return new Proxy(\n    {},\n    {\n      get(_, prop) {\n        const workStore = workAsyncStorage.getStore()\n\n        switch (prop) {\n          case 'moduleLoading':\n          case 'entryCSSFiles':\n          case 'entryJSFiles': {\n            if (!workStore) {\n              throw new InvariantError(\n                `Cannot access \"${prop}\" without a work store.`\n              )\n            }\n\n            const registeredManifest = clientReferenceManifestsPerRoute.get(\n              workStore.route\n            )\n\n            if (!registeredManifest) {\n              throw new InvariantError(\n                `The client reference manifest for route \"${workStore.route}\" does not exist.`\n              )\n            }\n\n            return registeredManifest.clientReferenceManifest[prop]\n          }\n          case 'clientModules':\n          case 'rscModuleMapping':\n          case 'edgeRscModuleMapping':\n          case 'ssrModuleMapping':\n          case 'edgeSSRModuleMapping': {\n            let proxy = mappingProxies.get(prop)\n\n            if (!proxy) {\n              proxy = createMappingProxy(prop)\n              mappingProxies.set(prop, proxy)\n            }\n\n            return proxy\n          }\n          default: {\n            throw new InvariantError(\n              `This is a proxied client reference manifest. The property \"${String(prop)}\" is not handled.`\n            )\n          }\n        }\n      },\n    }\n  ) as DeepReadonly<ClientReferenceManifest>\n}\n\n/**\n * This function creates a Flight-acceptable server module map proxy from our\n * Server Reference Manifest similar to our client module map. This is because\n * our manifest contains a lot of internal Next.js data that are relevant to the\n * runtime, workers, etc. that React doesn't need to know.\n */\nfunction createServerModuleMap(): ServerModuleMap {\n  return new Proxy(Object.create(null) as ServerModuleMap, {\n    get: (target, id: string | symbol, receiver) => {\n      // React's debug serialization can probe the module map like a plain object.\n      // These probes are not server reference lookups.\n      if (typeof id !== 'string') {\n        return Reflect.get(target, id, receiver)\n      }\n\n      if (wellKnownProperties.has(id)) {\n        return Reflect.get(target, id, receiver)\n      }\n\n      if (!mightBeServerReferenceId(id)) {\n        throw getInvalidServerReferenceIdError(id)\n      }\n\n      const workers =\n        getServerActionsManifest()[\n          process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n        ]?.[id]?.workers\n\n      if (!workers) {\n        throw getActionNotFoundError(id)\n      }\n\n      const workStore = workAsyncStorage.getStore()\n\n      let workerEntry: { moduleId: string | number; async: boolean } | undefined\n\n      if (workStore) {\n        workerEntry = workers[normalizeWorkerPageName(workStore.page)]\n      } else {\n        // If there's no work store defined, we can assume that a server\n        // module map is needed during module evaluation, e.g. to create a\n        // server action using a higher-order function. Therefore it should be\n        // safe to return any entry from the manifest that matches the action\n        // ID. They all refer to the same module ID, which must also exist in\n        // the current page bundle. TODO: This is currently not guaranteed in\n        // Turbopack, and needs to be fixed.\n        workerEntry = Object.values(workers).at(0)\n      }\n\n      if (!workerEntry) {\n        throw getActionNotFoundError(id)\n      }\n\n      const { moduleId, async } = workerEntry\n\n      return { id: moduleId, name: id, chunks: [], async }\n    },\n  })\n}\n\n/**\n * The flight entry loader keys actions by bundlePath. bundlePath corresponds\n * with the relative path (including 'app') to the page entrypoint.\n */\nfunction normalizeWorkerPageName(pageName: string) {\n  if (pathHasPrefix(pageName, 'app')) {\n    return pageName\n  }\n\n  return 'app' + pageName\n}\n\n/**\n * Converts a bundlePath (relative path to the entrypoint) to a routable page\n * name.\n */\nfunction denormalizeWorkerPageName(bundlePath: string) {\n  return normalizeAppPath(removePathPrefix(bundlePath, 'app'))\n}\n\n/**\n * Checks if the requested action has a worker for the current page.\n * If not, it returns the first worker that has a handler for the action.\n */\nexport function selectWorkerForForwarding(\n  actionId: string,\n  pageName: string\n): string | undefined {\n  const serverActionsManifest = getServerActionsManifest()\n  const workers =\n    serverActionsManifest[\n      process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n    ][actionId]?.workers\n\n  // There are no workers to handle this action, nothing to forward to.\n  if (!workers) {\n    return\n  }\n\n  // If there is an entry for the current page, we don't need to forward.\n  if (workers[normalizeWorkerPageName(pageName)]) {\n    return\n  }\n\n  // Otherwise, grab the first worker that has a handler for this action id.\n  return denormalizeWorkerPageName(Object.keys(workers)[0])\n}\n\nexport function setManifestsSingleton({\n  page,\n  clientReferenceManifest,\n  serverActionsManifest: rawServerActionsManifest,\n}: {\n  page: string\n  clientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n  serverActionsManifest: DeepReadonly<ActionManifest>\n}) {\n  const existingSingleton = globalThisWithManifests[MANIFESTS_SINGLETON]\n  const route = normalizeAppPath(page)\n\n  const serverActionsManifest: DeepReadonly<ActionManifest> = {\n    encryptionKey: rawServerActionsManifest.encryptionKey,\n    // Use null-prototypes for the action objects to prevent prototype pollution\n    // from affecting action ID lookups.\n    node: Object.assign(Object.create(null), rawServerActionsManifest.node),\n    edge: Object.assign(Object.create(null), rawServerActionsManifest.edge),\n  }\n\n  if (existingSingleton) {\n    existingSingleton.clientReferenceManifestsPerRoute.set(route, {\n      page,\n      clientReferenceManifest,\n    })\n\n    existingSingleton.serverActionsManifest = serverActionsManifest\n  } else {\n    const clientReferenceManifestsPerRoute = new Map<\n      string,\n      RegisteredClientReferenceManifest\n    >([[route, { page, clientReferenceManifest }]])\n\n    const proxiedClientReferenceManifest = createProxiedClientReferenceManifest(\n      clientReferenceManifestsPerRoute\n    )\n\n    globalThisWithManifests[MANIFESTS_SINGLETON] = {\n      clientReferenceManifestsPerRoute,\n      proxiedClientReferenceManifest,\n      serverActionsManifest,\n      serverModuleMap: createServerModuleMap(),\n    }\n  }\n}\n\nfunction getManifestsSingleton(): ManifestsSingleton {\n  const manifestSingleton = globalThisWithManifests[MANIFESTS_SINGLETON]\n\n  if (!manifestSingleton) {\n    throw new InvariantError('The manifests singleton was not initialized.')\n  }\n\n  return manifestSingleton\n}\n\nexport function getClientReferenceManifest(): DeepReadonly<ClientReferenceManifest> {\n  return getManifestsSingleton().proxiedClientReferenceManifest\n}\n\nexport function getServerActionsManifest(): DeepReadonly<ActionManifest> {\n  return getManifestsSingleton().serverActionsManifest\n}\n\nexport function getServerModuleMap() {\n  return getManifestsSingleton().serverModuleMap\n}\n","import { Transform } from 'node:stream'\n\n/**\n * Node.js `Transform` that coalesces chunks written in the same microtask into\n * a single `Uint8Array` before pushing downstream, flushing synchronously once\n * the buffer reaches `maxBufferByteLength` (default: never, i.e.\n * microtask-only).\n *\n * This lives in its own module, separate from `stream-ops.node`, so that\n * consumers outside the render layer (e.g. the dev server's React debug\n * channel) can batch Node streams without pulling in `stream-ops.node`'s\n * `react-dom/server` and `react-dom/static` imports. Those resolve to the\n * vendored React only inside aliased app bundles; loaded from the unaliased\n * dev-server runtime they resolve to the app's installed React, which on React\n * 18 has no `react-dom/static` export.\n */\nexport function createNodeBufferedTransformStream(\n  maxBufferByteLength: number = Infinity\n): Transform {\n  let bufferedChunks: Array<Uint8Array> = []\n  let bufferByteLength = 0\n  let flushScheduled = false\n\n  function flushBuffered(stream: Transform): void {\n    if (bufferedChunks.length === 0) return\n\n    const merged = new Uint8Array(bufferByteLength)\n    let copiedBytes = 0\n    for (let i = 0; i < bufferedChunks.length; i++) {\n      const bufferedChunk = bufferedChunks[i]\n      merged.set(bufferedChunk, copiedBytes)\n      copiedBytes += bufferedChunk.byteLength\n    }\n    bufferedChunks.length = 0\n    bufferByteLength = 0\n    stream.push(merged)\n  }\n\n  return new Transform({\n    transform(chunk, _encoding, callback) {\n      bufferedChunks.push(chunk)\n      bufferByteLength += chunk.byteLength\n\n      if (bufferByteLength >= maxBufferByteLength) {\n        flushBuffered(this)\n      } else if (!flushScheduled) {\n        flushScheduled = true\n        queueMicrotask(() => {\n          flushScheduled = false\n          flushBuffered(this)\n        })\n      }\n      callback()\n    },\n    flush(callback) {\n      flushBuffered(this)\n      callback()\n    },\n  })\n}\n","/**\n * Web stream operations for the rendering pipeline.\n * Loaded by stream-ops.ts when __NEXT_USE_NODE_STREAMS is false, such as edge\n * bundles where Node.js streams are unavailable.\n *\n * AnyStream = AnyStreamType so the exported type surface matches stream-ops.node.ts,\n * allowing the switcher to assign either module without `as unknown as`.\n */\n\nimport type { PostponedState, PrerenderOptions } from 'react-dom/static'\nimport { resume, renderToReadableStream } from 'react-dom/server'\nimport { prerender } from 'react-dom/static'\nimport type { renderToReadableStream as flightRenderToReadableStream } from 'react-server-dom-webpack/server'\n\nimport {\n  renderToInitialFizzStream,\n  streamToString as webStreamToString,\n  createRuntimePrefetchTransformStream,\n  continueFizzStream as webContinueFizzStream,\n  continueStaticPrerender as webContinueStaticPrerender,\n  continueDynamicPrerender as webContinueDynamicPrerender,\n  continueStaticFallbackPrerender as webContinueStaticFallbackPrerender,\n  continueDynamicHTMLResume as webContinueDynamicHTMLResume,\n  streamToBuffer as webStreamToBuffer,\n  chainStreams as webChainStreams,\n  createDocumentClosingStream as webCreateDocumentClosingStream,\n} from '../stream-utils/node-web-streams-helper'\nimport { createInlinedDataReadableStream } from './use-flight-response'\nimport { processPrelude as webProcessPrelude } from './app-render-prerender-utils'\nimport type { AnyStream as AnyStreamType } from './app-render-prerender-utils'\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\ntype FlightRenderToReadableStream = typeof flightRenderToReadableStream\n\nexport type AnyStream = AnyStreamType\n\nexport type ContinueStreamSharedOptions = {\n  deploymentId: string | undefined\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n}\n\nexport type ContinueFizzStreamOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream | undefined\n  isStaticGeneration: boolean\n  allReady?: Promise<void>\n  validateRootLayout?: boolean\n  suffix?: string\n}\n\nexport type ContinueStaticPrerenderOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream\n}\n\nexport type ContinueDynamicHTMLResumeOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream\n  delayDataUntilFirstHtmlChunk: boolean\n}\n\nexport type FlightComponentMod = {\n  renderToReadableStream: FlightRenderToReadableStream\n}\n\nexport type ServerPrerenderComponentMod = {\n  prerender: (...args: any[]) => Promise<any>\n}\n\nexport type FlightPayload = Parameters<FlightRenderToReadableStream>[0]\nexport type FlightClientModules = Parameters<FlightRenderToReadableStream>[1]\n\n/**\n * The options our Flight render wrappers accept, taken from React's Flight\n * `renderToReadableStream`. `signal` aborts the render: the Web wrapper passes\n * it straight to `renderToReadableStream`, while the Node wrapper aborts the\n * pipeable returned by `renderToPipeableStream` (which has no `signal` option)\n * when it fires.\n */\nexport type FlightRenderOptions = NonNullable<\n  Parameters<FlightRenderToReadableStream>[2]\n>\n\nexport type FizzStreamResult = {\n  stream: AnyStream\n  allReady: Promise<void>\n  abort?: (reason?: unknown) => void\n}\n\n// ---------------------------------------------------------------------------\n// Continue function wrappers\n// Thin wrappers that accept AnyStream and narrow to\n// ReadableStream<Uint8Array> internally for the web helper functions.\n// ---------------------------------------------------------------------------\n\nexport function continueFizzStream(\n  renderStream: AnyStream,\n  opts: ContinueFizzStreamOptions\n): Promise<AnyStream> {\n  return webContinueFizzStream(\n    renderStream as ReadableStream<Uint8Array> as any,\n    {\n      ...opts,\n      inlinedDataStream: opts.inlinedDataStream as\n        | ReadableStream<Uint8Array>\n        | undefined,\n    }\n  )\n}\n\nexport async function continueStaticPrerender(\n  prerenderStream: AnyStream,\n  opts: ContinueStaticPrerenderOptions\n): Promise<AnyStream> {\n  return webContinueStaticPrerender(\n    prerenderStream as ReadableStream<Uint8Array>,\n    {\n      ...opts,\n      inlinedDataStream: opts.inlinedDataStream as ReadableStream<Uint8Array>,\n    }\n  )\n}\n\nexport async function continueDynamicPrerender(\n  prerenderStream: AnyStream,\n  opts: {\n    getServerInsertedHTML: () => Promise<string>\n    getServerInsertedMetadata: () => Promise<string>\n    deploymentId: string | undefined\n  }\n): Promise<AnyStream> {\n  return webContinueDynamicPrerender(\n    prerenderStream as ReadableStream<Uint8Array>,\n    opts\n  )\n}\n\nexport async function continueStaticFallbackPrerender(\n  prerenderStream: AnyStream,\n  opts: ContinueStaticPrerenderOptions\n): Promise<AnyStream> {\n  return webContinueStaticFallbackPrerender(\n    prerenderStream as ReadableStream<Uint8Array>,\n    {\n      ...opts,\n      inlinedDataStream: opts.inlinedDataStream as ReadableStream<Uint8Array>,\n    }\n  )\n}\n\nexport async function continueDynamicHTMLResumeWeb(\n  renderStream: AnyStream,\n  opts: ContinueDynamicHTMLResumeOptions\n): Promise<AnyStream> {\n  return webContinueDynamicHTMLResume(\n    renderStream as ReadableStream<Uint8Array>,\n    {\n      ...opts,\n      inlinedDataStream: opts.inlinedDataStream as ReadableStream<Uint8Array>,\n    }\n  )\n}\n\nexport function continueDynamicHTMLResumeNode(\n  _renderStream: AnyStream,\n  _opts: ContinueDynamicHTMLResumeOptions\n): Promise<AnyStream> {\n  throw new Error('not implemented')\n}\n\nexport async function streamToBuffer(stream: AnyStream): Promise<Buffer> {\n  return webStreamToBuffer(stream as ReadableStream<Uint8Array>)\n}\n\nexport function chainStreams(...streams: AnyStream[]): AnyStream {\n  return webChainStreams(...(streams as ReadableStream<Uint8Array>[]))\n}\n\nexport function createDocumentClosingStream(): AnyStream {\n  return webCreateDocumentClosingStream()\n}\n\nexport async function processPrelude(\n  unprocessedPrelude: AnyStream\n): Promise<{ prelude: AnyStream; preludeIsEmpty: boolean }> {\n  return webProcessPrelude(unprocessedPrelude as ReadableStream<Uint8Array>)\n}\n\n// ---------------------------------------------------------------------------\n// Composed helpers\n// ---------------------------------------------------------------------------\n\nexport function createWebInlinedDataStream(\n  source: AnyStream,\n  nonce: string | undefined,\n  formState: unknown | null\n): AnyStream {\n  return createInlinedDataReadableStream(\n    source as ReadableStream<Uint8Array>,\n    nonce,\n    formState\n  )\n}\n\nexport function createNodeInlinedDataStream(\n  _source: AnyStream,\n  _nonce: string | undefined,\n  _formState: unknown | null\n): AnyStream {\n  throw new Error('not implemented')\n}\n\nexport function createPendingStream(): AnyStream {\n  return new ReadableStream<Uint8Array>()\n}\n\nexport function createOnHeadersCallback(\n  appendHeader: (key: string, value: string) => void\n): NonNullable<PrerenderOptions['onHeaders']> {\n  return (headers: Headers) => {\n    headers.forEach((value, key) => {\n      appendHeader(key, value)\n    })\n  }\n}\n\nexport async function resumeAndAbort(\n  element: React.ReactElement,\n  postponed: PostponedState | null,\n  opts: Parameters<typeof resume>[2] & { nonce?: string }\n): Promise<AnyStream> {\n  return resume(\n    element,\n    postponed as PostponedState,\n    opts as Parameters<typeof resume>[2]\n  )\n}\n\nexport function renderToNodeFlightStream(\n  _ComponentMod: FlightComponentMod,\n  _payload: FlightPayload,\n  _clientModules: FlightClientModules,\n  _opts: FlightRenderOptions\n): AnyStream {\n  throw new Error('not implemented')\n}\n\nexport function renderToWebFlightStream(\n  ComponentMod: FlightComponentMod,\n  payload: FlightPayload,\n  clientModules: FlightClientModules,\n  opts: FlightRenderOptions\n): AnyStream {\n  return ComponentMod.renderToReadableStream(payload, clientModules, opts)\n}\n\nexport async function streamToString(stream: AnyStream): Promise<string> {\n  return webStreamToString(stream as ReadableStream<Uint8Array>)\n}\n\nexport async function renderToWebFizzStream(\n  element: React.ReactElement,\n  streamOptions: any,\n  _options?: { waitForAllReady?: boolean }\n): Promise<FizzStreamResult> {\n  const stream = await renderToInitialFizzStream({\n    ReactDOMServer: { renderToReadableStream },\n    element,\n    streamOptions,\n  })\n  return { stream, allReady: stream.allReady, abort: undefined }\n}\n\nexport async function renderToNodeFizzStream(\n  _element: React.ReactElement,\n  _streamOptions: any,\n  _options?: { waitForAllReady?: boolean }\n): Promise<FizzStreamResult> {\n  throw new Error('Not implemented')\n}\n\nexport async function resumeToFizzStream(\n  element: React.ReactElement,\n  postponedState: PostponedState,\n  streamOptions: any\n): Promise<FizzStreamResult> {\n  const stream = await resume(element, postponedState, streamOptions)\n  return { stream, allReady: stream.allReady, abort: undefined }\n}\n\nexport function getServerPrerender(\n  ComponentMod: ServerPrerenderComponentMod\n): (...args: any[]) => any {\n  return ComponentMod.prerender\n}\n\nexport const getClientPrerender: typeof import('react-dom/static').prerender =\n  prerender\n\nexport function pipeRuntimePrefetchTransform(\n  stream: AnyStream,\n  sentinel: number,\n  isPartial: boolean,\n  staleTime: number\n): AnyStream {\n  return (stream as ReadableStream<Uint8Array>).pipeThrough(\n    createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime)\n  )\n}\n\nexport function teeStream(stream: AnyStream): [AnyStream, AnyStream] {\n  return (stream as ReadableStream<Uint8Array>).tee()\n}\n","/**\n * Node.js stream operations for the rendering pipeline.\n * Loaded by stream-ops.ts when process.env.__NEXT_USE_NODE_STREAMS is true.\n *\n * AnyStream = AnyStreamType so the exported type surface matches stream-ops.web.ts,\n * allowing the switcher to assign either module without casts.\n * Rendering uses pipeable APIs; continue functions wrap the existing web\n * transforms via Readable.fromWeb() on their output.\n */\n\nimport type { PostponedState, PrerenderOptions } from 'react-dom/static'\nimport {\n  renderToPipeableStream,\n  resumeToPipeableStream,\n} from 'react-dom/server'\nimport { prerender } from 'react-dom/static'\nimport { PassThrough, Readable, Transform } from 'node:stream'\nimport { isUtf8 } from 'node:buffer'\n\nimport {\n  continueStaticPrerender as webContinueStaticPrerender,\n  continueDynamicPrerender as webContinueDynamicPrerender,\n  continueStaticFallbackPrerender as webContinueStaticFallbackPrerender,\n  continueDynamicHTMLResume as webContinueDynamicHTMLResume,\n  streamToBuffer as webStreamToBuffer,\n  streamToString as webStreamToString,\n  createDocumentClosingStream as webCreateDocumentClosingStream,\n  createRuntimePrefetchTransformStream,\n  CLOSE_TAG,\n} from '../stream-utils/node-web-streams-helper'\nimport { indexOfUint8Array } from '../stream-utils/uint8array-helpers'\nimport { ENCODED_TAGS } from '../stream-utils/encoded-tags'\nimport { createNodeBufferedTransformStream } from '../stream-utils/node-buffered-transform-stream'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants'\nimport {\n  htmlEscapeAttributeString,\n  htmlEscapeJsonString,\n} from '../../shared/lib/htmlescape'\nimport { createInlinedDataReadableStream } from './use-flight-response'\nimport {\n  ReplayableNodeStream,\n  type AnyStream as AnyStreamType,\n} from './app-render-prerender-utils'\nimport { DetachedPromise } from '../../lib/detached-promise'\nimport { getTracer } from '../lib/trace/tracer'\nimport { AppRenderSpan } from '../lib/trace/constants'\nimport {\n  atLeastOneTask,\n  waitAtLeastOneReactRenderTask,\n} from '../../lib/scheduler'\nimport type {\n  FlightPayload,\n  FlightClientModules,\n  FlightRenderOptions,\n} from './stream-ops.web'\n\n// ---------------------------------------------------------------------------\n// Re-export shared types from the web module\n// ---------------------------------------------------------------------------\n\nexport type {\n  ContinueStreamSharedOptions,\n  ContinueFizzStreamOptions,\n  ContinueStaticPrerenderOptions,\n  ContinueDynamicHTMLResumeOptions,\n  ServerPrerenderComponentMod,\n  FlightPayload,\n  FlightClientModules,\n  FlightRenderOptions,\n} from './stream-ops.web'\n\n// ---------------------------------------------------------------------------\n// AnyStream matches stream-ops.web.ts so both modules have the same type surface\n// ---------------------------------------------------------------------------\n\nexport type AnyStream = AnyStreamType\n\nexport type FlightComponentMod = {\n  renderToReadableStream: (\n    model: any,\n    webpackMap: any,\n    options?: any\n  ) => ReadableStream<Uint8Array>\n  renderToPipeableStream?: (\n    model: any,\n    webpackMap: any,\n    options?: any\n  ) => {\n    pipe<Writable extends NodeJS.WritableStream>(\n      destination: Writable\n    ): Writable\n    abort(reason?: unknown): void\n  }\n}\n\nexport type FizzStreamResult = {\n  stream: AnyStream\n  allReady: Promise<void>\n  abort?: (reason?: unknown) => void\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\ntype WebReadableStream = import('stream/web').ReadableStream\n\nfunction nodeReadableToWebReadableStream(\n  stream: Readable | ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n  if (stream instanceof ReadableStream) {\n    return stream\n  }\n  // Readable.toWeb returns stream/web ReadableStream which is structurally\n  // identical to the global ReadableStream<Uint8Array>.\n  return Readable.toWeb(stream) as unknown as ReadableStream<Uint8Array>\n}\n\nfunction webToReadable(\n  stream: ReadableStream<Uint8Array> | Readable\n): Readable {\n  if (stream instanceof Readable) {\n    return stream\n  }\n  return Readable.fromWeb(stream as WebReadableStream)\n}\n\n// ---------------------------------------------------------------------------\n// Flight data injection – Node.js Transform that passes HTML chunks through\n// while pulling from a separate data stream and interleaving its chunks.\n// ---------------------------------------------------------------------------\n\nfunction createFlightDataInjectionTransform(\n  dataStream: Readable,\n  delayDataUntilFirstHtmlChunk: boolean\n): Transform {\n  let htmlStreamFinished = false\n  let pull: Promise<void> | null = null\n  let donePulling = false\n\n  function startOrContinuePulling(target: Transform) {\n    if (!pull) {\n      pull = startPulling(target)\n    }\n    return pull\n  }\n\n  async function startPulling(target: Transform) {\n    if (delayDataUntilFirstHtmlChunk) {\n      // Buffer the inlined data stream until we've left the current Task so\n      // it's inserted after flushing the shell.\n      await atLeastOneTask()\n    }\n\n    try {\n      const iterator = dataStream[Symbol.asyncIterator]()\n      while (true) {\n        const { done, value } = await iterator.next()\n        if (done) {\n          donePulling = true\n          return\n        }\n\n        // Prioritize HTML over RSC data: the SSR render produces HTML from\n        // the same RSC stream, so yield a task to let HTML flush first.\n        if (!delayDataUntilFirstHtmlChunk && !htmlStreamFinished) {\n          await atLeastOneTask()\n        }\n        target.push(value)\n      }\n    } catch (err) {\n      target.destroy(err as Error)\n    }\n  }\n\n  const nodeTransform = new Transform({\n    transform(chunk, _encoding, callback) {\n      this.push(chunk)\n      if (delayDataUntilFirstHtmlChunk) {\n        startOrContinuePulling(this)\n      }\n      callback()\n    },\n    flush(callback) {\n      htmlStreamFinished = true\n      if (donePulling) {\n        callback()\n        return\n      }\n      startOrContinuePulling(this).then(\n        () => callback(),\n        (err) => callback(err as Error)\n      )\n    },\n  })\n\n  if (!delayDataUntilFirstHtmlChunk) {\n    startOrContinuePulling(nodeTransform)\n  }\n\n  return nodeTransform\n}\n\n// ---------------------------------------------------------------------------\n// Head insertion – Node.js Transform that inserts server-generated HTML\n// (e.g. <script>, <style>) right before </head>, or prepends it if no\n// </head> tag is found (PPR resume case).\n// ---------------------------------------------------------------------------\n\nfunction createHeadInsertionTransform(\n  insert: () => Promise<string>\n): Transform {\n  let inserted = false\n  let hasBytes = false\n\n  return new Transform({\n    async transform(chunk, _encoding, callback) {\n      hasBytes = true\n\n      try {\n        const insertion = await insert()\n        if (inserted) {\n          if (insertion) {\n            this.push(Buffer.from(insertion))\n          }\n          this.push(chunk)\n        } else {\n          const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n          if (index !== -1) {\n            if (insertion) {\n              const encodedInsertion = Buffer.from(insertion)\n              const merged = Buffer.allocUnsafe(\n                chunk.length + encodedInsertion.length\n              )\n              merged.set(chunk.slice(0, index))\n              merged.set(encodedInsertion, index)\n              merged.set(chunk.slice(index), index + encodedInsertion.length)\n              this.push(merged)\n            } else {\n              this.push(chunk)\n            }\n            inserted = true\n          } else {\n            if (insertion) {\n              this.push(Buffer.from(insertion))\n            }\n            this.push(chunk)\n            inserted = true\n          }\n        }\n        callback()\n      } catch (err) {\n        callback(err as Error)\n      }\n    },\n    async flush(callback) {\n      try {\n        if (hasBytes) {\n          const insertion = await insert()\n          if (insertion) {\n            this.push(Buffer.from(insertion))\n          }\n        }\n        callback()\n      } catch (err) {\n        callback(err as Error)\n      }\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// Metadata transform – Node.js Transform that finds the «nxt-icon» meta mark\n// and replaces it with a script tag (or removes it if inside <head>).\n// ---------------------------------------------------------------------------\n\nfunction createMetadataTransform(\n  insert: () => Promise<string> | string\n): Transform {\n  let chunkIndex = -1\n  let isMarkRemoved = false\n\n  return new Transform({\n    async transform(chunk, _encoding, callback) {\n      let iconMarkIndex = -1\n      let closedHeadIndex = -1\n      chunkIndex++\n\n      if (isMarkRemoved) {\n        this.push(chunk)\n        callback()\n        return\n      }\n\n      try {\n        let iconMarkLength = 0\n        iconMarkIndex = indexOfUint8Array(chunk, ENCODED_TAGS.META.ICON_MARK)\n        if (iconMarkIndex === -1) {\n          this.push(chunk)\n          callback()\n          return\n        }\n\n        iconMarkLength = ENCODED_TAGS.META.ICON_MARK.length\n        if (chunk[iconMarkIndex + iconMarkLength] === 47) {\n          iconMarkLength += 2\n        } else {\n          iconMarkLength++\n        }\n\n        if (chunkIndex === 0) {\n          closedHeadIndex = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n          if (iconMarkIndex < closedHeadIndex) {\n            const replaced = Buffer.allocUnsafe(chunk.length - iconMarkLength)\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex\n            )\n            chunk = replaced\n          } else {\n            const insertion = await insert()\n            const encodedInsertion = Buffer.from(insertion)\n            const insertionLength = encodedInsertion.length\n            const replaced = Buffer.allocUnsafe(\n              chunk.length - iconMarkLength + insertionLength\n            )\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(encodedInsertion, iconMarkIndex)\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex + insertionLength\n            )\n            chunk = replaced\n          }\n          isMarkRemoved = true\n        } else {\n          const insertion = await insert()\n          const encodedInsertion = Buffer.from(insertion)\n          const insertionLength = encodedInsertion.length\n          const replaced = Buffer.allocUnsafe(\n            chunk.length - iconMarkLength + insertionLength\n          )\n          replaced.set(chunk.subarray(0, iconMarkIndex))\n          replaced.set(encodedInsertion, iconMarkIndex)\n          replaced.set(\n            chunk.subarray(iconMarkIndex + iconMarkLength),\n            iconMarkIndex + insertionLength\n          )\n          chunk = replaced\n          isMarkRemoved = true\n        }\n        this.push(chunk)\n        callback()\n      } catch (err) {\n        callback(err as Error)\n      }\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// Deferred suffix – Node.js Transform that appends a suffix string after the\n// first HTML chunk, deferring via queueMicrotask so the chunk flushes first.\n// ---------------------------------------------------------------------------\n\nfunction createDeferredSuffixTransform(suffix: string): Transform {\n  let flushed = false\n  const encodedSuffix = Buffer.from(suffix)\n\n  return new Transform({\n    transform(chunk, _encoding, callback) {\n      this.push(chunk)\n\n      if (!flushed) {\n        flushed = true\n        queueMicrotask(() => {\n          this.push(encodedSuffix)\n        })\n      }\n      callback()\n    },\n    flush(callback) {\n      if (!flushed) {\n        this.push(encodedSuffix)\n      }\n      callback()\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// Move suffix – Node.js Transform that strips </body></html> from its\n// original position and re-appends it at the very end of the stream, so any\n// content injected after the suffix still appears before the closing tags.\n// ---------------------------------------------------------------------------\n\nfunction createMoveSuffixTransform(): Transform {\n  let foundSuffix = false\n\n  return new Transform({\n    transform(chunk, _encoding, callback) {\n      if (foundSuffix) {\n        this.push(chunk)\n        callback()\n        return\n      }\n\n      const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n      if (index > -1) {\n        foundSuffix = true\n\n        if (chunk.length === ENCODED_TAGS.CLOSED.BODY_AND_HTML.length) {\n          callback()\n          return\n        }\n\n        const before = chunk.slice(0, index)\n        this.push(before)\n\n        if (chunk.length > ENCODED_TAGS.CLOSED.BODY_AND_HTML.length + index) {\n          const after = chunk.slice(\n            index + ENCODED_TAGS.CLOSED.BODY_AND_HTML.length\n          )\n          this.push(after)\n        }\n      } else {\n        this.push(chunk)\n      }\n      callback()\n    },\n    flush(callback) {\n      this.push(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n      callback()\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// data-dpl-id insertion – Node.js Transform that inserts a `data-dpl-id`\n// attribute on the opening <html tag for deployment identification.\n// ---------------------------------------------------------------------------\n\nfunction createHtmlDataDplIdTransform(dplId: string): Transform {\n  let didTransform = false\n\n  return new Transform({\n    transform(chunk, _encoding, callback) {\n      if (didTransform) {\n        this.push(chunk)\n        callback()\n        return\n      }\n\n      const htmlTagIndex = indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML)\n      if (htmlTagIndex === -1) {\n        this.push(chunk)\n        callback()\n        return\n      }\n\n      const insertionPoint = htmlTagIndex + ENCODED_TAGS.OPENING.HTML.length\n      const encodedAttribute = Buffer.from(` data-dpl-id=\"${dplId}\"`)\n      const modified = Buffer.allocUnsafe(\n        chunk.length + encodedAttribute.length\n      )\n\n      modified.set(chunk.subarray(0, insertionPoint))\n      modified.set(encodedAttribute, insertionPoint)\n      modified.set(\n        chunk.subarray(insertionPoint),\n        insertionPoint + encodedAttribute.length\n      )\n\n      this.push(modified)\n      didTransform = true\n      callback()\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// Root layout validator – Node.js Transform that checks whether <html> and\n// <body> tags are present in the streamed output.  Dev-only; appends an\n// error template when tags are missing so the error overlay can display it.\n// ---------------------------------------------------------------------------\n\nfunction createRootLayoutValidatorTransform(): Transform {\n  let foundHtml = false\n  let foundBody = false\n\n  return new Transform({\n    transform(chunk, _encoding, callback) {\n      if (\n        !foundHtml &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML) > -1\n      ) {\n        foundHtml = true\n      }\n      if (\n        !foundBody &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.BODY) > -1\n      ) {\n        foundBody = true\n      }\n      this.push(chunk)\n      callback()\n    },\n    flush(callback) {\n      const missingTags: ('html' | 'body')[] = []\n      if (!foundHtml) missingTags.push('html')\n      if (!foundBody) missingTags.push('body')\n\n      if (missingTags.length) {\n        this.push(\n          Buffer.from(\n            `<html id=\"__next_error__\">\n            <template\n              data-next-error-message=\"Missing ${missingTags\n                .map((c) => `<${c}>`)\n                .join(\n                  missingTags.length > 1 ? ' and ' : ''\n                )} tags in the root layout.\\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags\"\n              data-next-error-digest=\"${MISSING_ROOT_TAGS_ERROR}\"\n              data-next-error-stack=\"\"\n            ></template>\n          `\n          )\n        )\n      }\n      callback()\n    },\n  })\n}\n\n// ---------------------------------------------------------------------------\n// Rendering functions (output Node Readable natively via PassThrough)\n// ---------------------------------------------------------------------------\n\nexport { renderToWebFlightStream } from './stream-ops.web'\n\nexport function renderToNodeFlightStream(\n  ComponentMod: FlightComponentMod,\n  payload: FlightPayload,\n  clientModules: FlightClientModules,\n  opts: FlightRenderOptions\n): AnyStream {\n  if (!ComponentMod.renderToPipeableStream) {\n    throw new Error('renderToPipeableStream is not implemented')\n  }\n\n  // `renderToPipeableStream` has no `signal` option (unlike the Web\n  // `renderToReadableStream`), so pull `signal` out of the options and abort\n  // the returned pipeable ourselves when it fires. We drop the listener when\n  // the passthrough closes so a finished render's `pipeable` isn't retained by\n  // the request signal, which can outlive it.\n  const { signal, ...renderOptions } = opts ?? {}\n\n  const pt = new PassThrough()\n  const pipeable = ComponentMod.renderToPipeableStream!(\n    payload,\n    clientModules,\n    renderOptions\n  )\n  pipeable.pipe(pt)\n\n  if (signal) {\n    if (signal.aborted) {\n      pipeable.abort(signal.reason)\n    } else {\n      const onAbort = () => pipeable.abort(signal.reason)\n      signal.addEventListener('abort', onAbort, { once: true })\n      pt.on('close', () => signal.removeEventListener('abort', onAbort))\n    }\n  }\n\n  return pt\n}\n\nexport { renderToWebFizzStream } from './stream-ops.web'\n\nexport async function renderToNodeFizzStream(\n  element: React.ReactElement,\n  streamOptions: any,\n  options?: { waitForAllReady?: boolean }\n): Promise<FizzStreamResult> {\n  const pt = new PassThrough()\n  const shellReady = new DetachedPromise<void>()\n  const allReady = new DetachedPromise<void>()\n  const deferPipe = options?.waitForAllReady === true\n\n  const pipeable = getTracer().trace(AppRenderSpan.renderToReadableStream, () =>\n    renderToPipeableStream(element, {\n      ...streamOptions,\n      onHeaders: streamOptions?.onHeaders,\n      onShellReady() {\n        streamOptions?.onShellReady?.()\n        shellReady.resolve()\n      },\n      onShellError(error: unknown) {\n        streamOptions?.onShellError?.(error)\n        shellReady.reject(error)\n      },\n      onAllReady() {\n        streamOptions?.onAllReady?.()\n        if (deferPipe) {\n          pipeable.pipe(pt)\n        }\n        allReady.resolve()\n      },\n      onError: streamOptions?.onError,\n    })\n  )\n\n  await getTracer().trace(\n    AppRenderSpan.waitShellReady,\n    () => shellReady.promise\n  )\n\n  if (!deferPipe) {\n    await waitAtLeastOneReactRenderTask()\n    pipeable.pipe(pt)\n  }\n\n  return {\n    stream: pt,\n    allReady: allReady.promise,\n    abort: (reason?: unknown) => pipeable.abort(reason),\n  }\n}\n\nexport async function resumeToFizzStream(\n  element: React.ReactElement,\n  postponedState: PostponedState,\n  streamOptions: any,\n  runInContext?: <T>(fn: () => T) => T\n): Promise<FizzStreamResult> {\n  const run: <T>(fn: () => T) => T = runInContext ?? ((fn) => fn())\n\n  const pt = new PassThrough()\n  const shellReady = new DetachedPromise<void>()\n  const allReady = new DetachedPromise<void>()\n\n  const pipeable = await run(() =>\n    resumeToPipeableStream(element, postponedState, {\n      ...streamOptions,\n      onShellReady() {\n        streamOptions?.onShellReady?.()\n        shellReady.resolve()\n      },\n      onShellError(error: unknown) {\n        streamOptions?.onShellError?.(error)\n        shellReady.reject(error)\n      },\n      onAllReady() {\n        streamOptions?.onAllReady?.()\n        allReady.resolve()\n      },\n    })\n  )\n\n  pipeable.pipe(pt)\n  await shellReady.promise\n\n  return {\n    stream: pt,\n    allReady: allReady.promise,\n    abort: (reason?: unknown) => pipeable.abort(reason),\n  }\n}\n\nexport async function resumeAndAbort(\n  element: React.ReactElement,\n  postponed: PostponedState | null,\n  opts: any\n): Promise<AnyStream> {\n  const pt = new PassThrough()\n  const pipeable = await resumeToPipeableStream(\n    element,\n    postponed as PostponedState,\n    opts\n  )\n  pipeable.pipe(pt)\n  pipeable.abort(opts?.signal?.reason)\n  return pt\n}\n\n// ---------------------------------------------------------------------------\n// Continue function wrappers\n// Bridge Node Readable → web, apply existing web transforms, Readable.fromWeb()\n// ---------------------------------------------------------------------------\n\nexport async function continueFizzStream(\n  renderStream: AnyStream,\n  {\n    suffix,\n    inlinedDataStream,\n    isStaticGeneration,\n    allReady,\n    deploymentId,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    validateRootLayout,\n  }: import('./stream-ops.web').ContinueFizzStreamOptions\n): Promise<Readable> {\n  // Suffix itself might contain close tags at the end, so we need to split it.\n  const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null\n\n  if (isStaticGeneration) {\n    if (allReady) {\n      await allReady\n    }\n  } else {\n    // Otherwise, we want to make sure Fizz is done with all microtasky work\n    // before we start pulling the stream and cause a flush.\n    await waitAtLeastOneReactRenderTask()\n  }\n\n  // Pipe the render stream through Node.js Transforms:\n  // 1. Buffer – coalesces chunks written in the same microtask into one Uint8Array\n  // 2. Flight data injection – interleaves RSC data chunks with the HTML stream\n  // 3. Head insertion – inserts server-generated HTML before </head>\n  const buffered = createNodeBufferedTransformStream()\n  webToReadable(renderStream).pipe(buffered)\n\n  let source: Readable = buffered\n\n  if (deploymentId) {\n    const dplId = createHtmlDataDplIdTransform(deploymentId)\n    source.pipe(dplId)\n    source = dplId\n  }\n\n  // Metadata (icon mark replacement)\n  const metadata = createMetadataTransform(getServerInsertedMetadata)\n  source.pipe(metadata)\n  source = metadata\n\n  // Insert suffix content\n  if (suffixUnclosed != null && suffixUnclosed.length > 0) {\n    const deferredSuffix = createDeferredSuffixTransform(suffixUnclosed)\n    source.pipe(deferredSuffix)\n    source = deferredSuffix\n  }\n\n  // Flight data injection – interleaves RSC data chunks with the HTML stream\n  if (inlinedDataStream) {\n    const flightInjection = createFlightDataInjectionTransform(\n      webToReadable(inlinedDataStream),\n      true\n    )\n    source.pipe(flightInjection)\n    source = flightInjection\n  }\n\n  if (validateRootLayout) {\n    const rootLayoutValidator = createRootLayoutValidatorTransform()\n    source.pipe(rootLayoutValidator)\n    source = rootLayoutValidator\n  }\n\n  // Close tags should always be deferred to the end\n  const moveSuffix = createMoveSuffixTransform()\n  source.pipe(moveSuffix)\n  source = moveSuffix\n\n  // Head insertion – inserts server-generated HTML before </head>\n  const headInsertion = createHeadInsertionTransform(getServerInsertedHTML)\n  source.pipe(headInsertion)\n  source = headInsertion\n\n  return source\n}\n\nexport async function continueStaticPrerender(\n  prerenderStream: AnyStream,\n  opts: import('./stream-ops.web').ContinueStaticPrerenderOptions\n): Promise<AnyStream> {\n  const webResult = await webContinueStaticPrerender(\n    nodeReadableToWebReadableStream(prerenderStream),\n    {\n      ...opts,\n      inlinedDataStream: nodeReadableToWebReadableStream(\n        opts.inlinedDataStream\n      ),\n    }\n  )\n  return webToReadable(webResult)\n}\n\nexport async function continueDynamicPrerender(\n  prerenderStream: AnyStream,\n  opts: {\n    getServerInsertedHTML: () => Promise<string>\n    getServerInsertedMetadata: () => Promise<string>\n    deploymentId: string | undefined\n  }\n): Promise<AnyStream> {\n  const webResult = await webContinueDynamicPrerender(\n    nodeReadableToWebReadableStream(prerenderStream),\n    opts\n  )\n  return webToReadable(webResult)\n}\n\nexport async function continueStaticFallbackPrerender(\n  prerenderStream: AnyStream,\n  opts: import('./stream-ops.web').ContinueStaticPrerenderOptions\n): Promise<AnyStream> {\n  const webResult = await webContinueStaticFallbackPrerender(\n    nodeReadableToWebReadableStream(prerenderStream),\n    {\n      ...opts,\n      inlinedDataStream: nodeReadableToWebReadableStream(\n        opts.inlinedDataStream\n      ),\n    }\n  )\n  return webToReadable(webResult)\n}\n\nexport async function continueDynamicHTMLResumeNode(\n  renderStream: AnyStream,\n  {\n    delayDataUntilFirstHtmlChunk,\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: import('./stream-ops.web').ContinueDynamicHTMLResumeOptions\n): Promise<AnyStream> {\n  await waitAtLeastOneReactRenderTask()\n\n  const buffered = createNodeBufferedTransformStream()\n  webToReadable(renderStream).pipe(buffered)\n\n  let source: Readable = buffered\n\n  if (deploymentId) {\n    const dplId = createHtmlDataDplIdTransform(deploymentId)\n    source.pipe(dplId)\n    source = dplId\n  }\n\n  const headInsertion = createHeadInsertionTransform(getServerInsertedHTML)\n  source.pipe(headInsertion)\n  source = headInsertion\n\n  const metadata = createMetadataTransform(getServerInsertedMetadata)\n  source.pipe(metadata)\n  source = metadata\n\n  const flightInjection = createFlightDataInjectionTransform(\n    webToReadable(inlinedDataStream),\n    delayDataUntilFirstHtmlChunk\n  )\n  source.pipe(flightInjection)\n  source = flightInjection\n\n  const moveSuffix = createMoveSuffixTransform()\n  source.pipe(moveSuffix)\n  source = moveSuffix\n\n  return source\n}\n\nexport async function continueDynamicHTMLResumeWeb(\n  renderStream: AnyStream,\n  opts: import('./stream-ops.web').ContinueDynamicHTMLResumeOptions\n): Promise<AnyStream> {\n  const webResult = await webContinueDynamicHTMLResume(\n    nodeReadableToWebReadableStream(renderStream),\n    {\n      ...opts,\n      inlinedDataStream: nodeReadableToWebReadableStream(\n        opts.inlinedDataStream\n      ),\n    }\n  )\n  return webToReadable(webResult)\n}\n\n// ---------------------------------------------------------------------------\n// Utility functions (Node-native)\n// ---------------------------------------------------------------------------\n\nexport function chainStreams(...streams: AnyStream[]): AnyStream {\n  if (streams.length === 0) {\n    const pt = new PassThrough()\n    pt.end()\n    return pt\n  }\n\n  if (streams.length === 1) {\n    return streams[0]\n  }\n\n  const out = new PassThrough()\n  let i = 0\n\n  function pipeNext() {\n    if (i >= streams.length) {\n      out.end()\n      return\n    }\n    const current = webToReadable(streams[i++])\n    current.pipe(out, { end: false })\n    current.on('end', pipeNext)\n    current.on('error', (err) => out.destroy(err))\n  }\n\n  pipeNext()\n  return out\n}\n\nexport async function streamToBuffer(stream: AnyStream): Promise<Buffer> {\n  return webStreamToBuffer(nodeReadableToWebReadableStream(stream))\n}\n\nexport async function streamToString(stream: AnyStream): Promise<string> {\n  return webStreamToString(nodeReadableToWebReadableStream(stream))\n}\n\nexport function createWebInlinedDataStream(\n  source: AnyStream,\n  nonce: string | undefined,\n  formState: unknown | null\n): AnyStream {\n  const webSource = nodeReadableToWebReadableStream(source)\n  const webResult = createInlinedDataReadableStream(webSource, nonce, formState)\n  return webToReadable(webResult)\n}\n\nexport function createNodeInlinedDataStream(\n  source: AnyStream,\n  nonce: string | undefined,\n  formState: unknown | null\n): AnyStream {\n  const startScriptTag = nonce\n    ? `<script nonce=\"${htmlEscapeAttributeString(nonce)}\">`\n    : '<script>'\n\n  const dataStream = webToReadable(source)\n  const pt = new PassThrough()\n\n  // Write initial bootstrap instructions\n  let scriptContents = `(self.__next_f=self.__next_f||[]).push(${htmlEscapeJsonString(\n    JSON.stringify([INLINE_FLIGHT_PAYLOAD_BOOTSTRAP])\n  )})`\n  if (formState != null) {\n    scriptContents += `;self.__next_f.push(${htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_FORM_STATE, formState])\n    )})`\n  }\n  pt.push(Buffer.from(`${startScriptTag}${scriptContents}</script>`))\n\n  // Pull from the flight data stream and wrap each chunk in a <script> tag\n  pullFlightData(dataStream, pt, startScriptTag)\n\n  return pt\n}\n\nconst INLINE_FLIGHT_PAYLOAD_BOOTSTRAP = 0\nconst INLINE_FLIGHT_PAYLOAD_DATA = 1\nconst INLINE_FLIGHT_PAYLOAD_FORM_STATE = 2\nconst INLINE_FLIGHT_PAYLOAD_BINARY = 3\n\nasync function pullFlightData(\n  dataStream: Readable,\n  output: PassThrough,\n  startScriptTag: string\n): Promise<void> {\n  function waitForReadableOrEnd(): Promise<void> {\n    if (dataStream.readableLength > 0 || dataStream.readableEnded) {\n      return Promise.resolve()\n    }\n    return new Promise<void>((resolve, reject) => {\n      function cleanup() {\n        dataStream.removeListener('readable', onDone)\n        dataStream.removeListener('end', onDone)\n        dataStream.removeListener('error', onError)\n      }\n      function onDone() {\n        cleanup()\n        resolve()\n      }\n      function onError(err: Error) {\n        cleanup()\n        reject(err)\n      }\n      dataStream.on('readable', onDone)\n      dataStream.on('end', onDone)\n      dataStream.on('error', onError)\n    })\n  }\n\n  try {\n    while (true) {\n      const chunk: Buffer | null = dataStream.read()\n      if (chunk !== null) {\n        let htmlInlinedData: string\n        if (isUtf8(chunk)) {\n          const decodedString = chunk.toString('utf-8')\n          htmlInlinedData = htmlEscapeJsonString(\n            JSON.stringify([INLINE_FLIGHT_PAYLOAD_DATA, decodedString])\n          )\n        } else {\n          const base64 = Buffer.from(\n            chunk.buffer,\n            chunk.byteOffset,\n            chunk.byteLength\n          ).toString('base64')\n          htmlInlinedData = htmlEscapeJsonString(\n            JSON.stringify([INLINE_FLIGHT_PAYLOAD_BINARY, base64])\n          )\n        }\n        output.push(\n          Buffer.from(\n            `${startScriptTag}self.__next_f.push(${htmlInlinedData})</script>`\n          )\n        )\n        continue\n      }\n\n      if (dataStream.readableEnded) {\n        output.end()\n        return\n      }\n\n      await waitForReadableOrEnd()\n    }\n  } catch (err) {\n    output.destroy(err as Error)\n  }\n}\n\nexport function createPendingStream(): AnyStream {\n  return new PassThrough()\n}\n\nexport function createDocumentClosingStream(): AnyStream {\n  const webStream = webCreateDocumentClosingStream()\n  return webToReadable(webStream)\n}\n\nexport function createOnHeadersCallback(\n  appendHeader: (key: string, value: string) => void\n): NonNullable<PrerenderOptions['onHeaders']> {\n  return (headers: Headers) => {\n    headers.forEach((value, key) => {\n      appendHeader(key, value)\n    })\n  }\n}\n\nexport function pipeRuntimePrefetchTransform(\n  stream: AnyStream,\n  sentinel: number,\n  isPartial: boolean,\n  staleTime: number\n): AnyStream {\n  const webStream = nodeReadableToWebReadableStream(stream)\n  const transformed = webStream.pipeThrough(\n    createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime)\n  )\n  return webToReadable(transformed)\n}\n\n// ---------------------------------------------------------------------------\n// Re-exports (no stream involvement, identical to web)\n// ---------------------------------------------------------------------------\n\nexport async function processPrelude(unprocessedPrelude: AnyStream) {\n  const [prelude, peek] =\n    nodeReadableToWebReadableStream(unprocessedPrelude).tee()\n\n  const reader = peek.getReader()\n  const firstResult = await reader.read()\n  reader.cancel()\n\n  return {\n    prelude: webToReadable(prelude) as AnyStream,\n    preludeIsEmpty: firstResult.done === true,\n  }\n}\n\nexport function getServerPrerender(ComponentMod: {\n  prerender: (...args: any[]) => Promise<any>\n}): (...args: any[]) => any {\n  return ComponentMod.prerender\n}\n\nexport const getClientPrerender: typeof import('react-dom/static').prerender =\n  prerender\n\n// Node counterpart of the web `teeStream`. Like the web version it assumes the\n// stream type matching its build — here a Node `Readable` — and fans out\n// through `ReplayableNodeStream`. Need three or more consumers from one source?\n// Use `ReplayableNodeStream` directly (N `createReplayStream()` calls) to avoid\n// nesting tees.\nexport function teeStream(stream: AnyStream): [AnyStream, AnyStream] {\n  const replayable = new ReplayableNodeStream(stream as Readable)\n  return [replayable.createReplayStream(), replayable.createReplayStream()]\n}\n","import type { BinaryStreamOf } from './app-render'\nimport type { Readable } from 'node:stream'\n\nimport {\n  htmlEscapeAttributeString,\n  htmlEscapeJsonString,\n} from '../../shared/lib/htmlescape'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { getClientReferenceManifest } from './manifests-singleton'\n\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n\nconst INLINE_FLIGHT_PAYLOAD_BOOTSTRAP = 0\nconst INLINE_FLIGHT_PAYLOAD_DATA = 1\nconst INLINE_FLIGHT_PAYLOAD_FORM_STATE = 2\nconst INLINE_FLIGHT_PAYLOAD_BINARY = 3\n\nconst flightResponses = new WeakMap<\n  Readable | BinaryStreamOf<any>,\n  Promise<any>\n>()\nconst encoder = new TextEncoder()\n\nconst findSourceMapURL =\n  process.env.NODE_ENV !== 'production'\n    ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n        .findSourceMapURLDEV\n    : undefined\n\n/**\n * Render Flight stream.\n * This is only used for renderToHTML, the Flight response does not need additional wrappers.\n */\nexport function getFlightStream<T>(\n  flightStream: Readable | BinaryStreamOf<T>,\n  debugStream: Readable | ReadableStream<Uint8Array> | undefined,\n  debugEndTime: number | undefined,\n  nonce: string | undefined\n): Promise<T> {\n  const response = flightResponses.get(flightStream)\n\n  if (response) {\n    return response\n  }\n\n  const { moduleLoading, edgeSSRModuleMapping, ssrModuleMapping } =\n    getClientReferenceManifest()\n\n  let newResponse: Promise<T>\n  if (flightStream instanceof ReadableStream) {\n    // The types of flightStream and debugStream should match.\n    if (debugStream && !(debugStream instanceof ReadableStream)) {\n      throw new InvariantError('Expected debug stream to be a ReadableStream')\n    }\n\n    // react-server-dom-webpack/client.edge must not be hoisted for require cache clearing to work correctly\n    const { createFromReadableStream } =\n      // eslint-disable-next-line import/no-extraneous-dependencies\n      require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n\n    newResponse = createFromReadableStream<T>(flightStream, {\n      findSourceMapURL,\n      serverConsumerManifest: {\n        moduleLoading,\n        moduleMap: isEdgeRuntime ? edgeSSRModuleMapping : ssrModuleMapping,\n        serverModuleMap: null,\n      },\n      nonce,\n      debugChannel: debugStream ? { readable: debugStream } : undefined,\n      endTime: debugEndTime,\n    })\n  } else {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      throw new InvariantError(\n        'getFlightStream should always receive a ReadableStream when using the edge runtime'\n      )\n    } else {\n      const { Readable } =\n        require('node:stream') as typeof import('node:stream')\n\n      // Convert debug stream to Readable if it's a ReadableStream.\n      // When __NEXT_USE_NODE_STREAMS is enabled, the debug channel produces\n      // Node Readables natively. Otherwise, it produces web ReadableStreams.\n      let nodeDebugStream: Readable | undefined\n      if (debugStream) {\n        if (debugStream instanceof Readable) {\n          nodeDebugStream = debugStream\n        } else {\n          type WebReadableStream = import('stream/web').ReadableStream\n          nodeDebugStream = Readable.fromWeb(debugStream as WebReadableStream)\n        }\n      }\n\n      // react-server-dom-webpack/client.edge must not be hoisted for require cache clearing to work correctly\n      const { createFromNodeStream } =\n        // eslint-disable-next-line import/no-extraneous-dependencies\n        require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n\n      newResponse = createFromNodeStream<T>(\n        flightStream,\n        {\n          moduleLoading,\n          moduleMap: isEdgeRuntime ? edgeSSRModuleMapping : ssrModuleMapping,\n          serverModuleMap: null,\n        },\n        {\n          findSourceMapURL,\n          nonce,\n          debugChannel: nodeDebugStream,\n          endTime: debugEndTime,\n        }\n      )\n    }\n  }\n\n  // Edge pages are never prerendered so they necessarily cannot have a workUnitStore type\n  // that requires the nextTick behavior. This is why it is safe to access a node only API here\n  if (process.env.NEXT_RUNTIME !== 'edge') {\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (!workUnitStore) {\n      throw new InvariantError('Expected workUnitAsyncStorage to have a store.')\n    }\n\n    switch (workUnitStore.type) {\n      case 'prerender-client':\n      case 'validation-client':\n        const responseOnNextTick = new Promise<T>((resolve) => {\n          process.nextTick(() => {\n            resolve(newResponse)\n          })\n        })\n        flightResponses.set(flightStream, responseOnNextTick)\n        return responseOnNextTick\n      case 'prerender':\n      case 'prerender-runtime':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n\n  flightResponses.set(flightStream, newResponse)\n\n  return newResponse\n}\n\n/**\n * Creates a ReadableStream provides inline script tag chunks for writing hydration\n * data to the client outside the React render itself.\n *\n * @param flightStream The RSC render stream\n * @param nonce optionally a nonce used during this particular render\n * @param formState optionally the formState used with this particular render\n * @returns a ReadableStream without the complete property. This signifies a lazy ReadableStream\n */\nexport function createInlinedDataReadableStream(\n  flightStream: ReadableStream<Uint8Array>,\n  nonce: string | undefined,\n  formState: unknown | null\n): ReadableStream<Uint8Array> {\n  const startScriptTag = nonce\n    ? `<script nonce=\"${htmlEscapeAttributeString(nonce)}\">`\n    : '<script>'\n\n  const flightReader = flightStream.getReader()\n  const decoder = new TextDecoder('utf-8', { fatal: true })\n\n  const readable = new ReadableStream({\n    type: 'bytes',\n    start(controller) {\n      try {\n        writeInitialInstructions(controller, startScriptTag, formState)\n      } catch (error) {\n        // during encoding or enqueueing forward the error downstream\n        controller.error(error)\n      }\n    },\n    async pull(controller) {\n      try {\n        const { done, value } = await flightReader.read()\n\n        if (value) {\n          try {\n            const decodedString = decoder.decode(value, { stream: !done })\n\n            // The chunk cannot be decoded as valid UTF-8 string as it might\n            // have arbitrary binary data.\n            writeFlightDataInstruction(\n              controller,\n              startScriptTag,\n              decodedString\n            )\n          } catch {\n            // The chunk cannot be decoded as valid UTF-8 string.\n            writeFlightDataInstruction(controller, startScriptTag, value)\n          }\n        }\n\n        if (done) {\n          controller.close()\n        }\n      } catch (error) {\n        // There was a problem in the upstream reader or during decoding or enqueuing\n        // forward the error downstream\n        controller.error(error)\n      }\n    },\n  })\n\n  return readable\n}\n\nfunction writeInitialInstructions(\n  controller: ReadableStreamDefaultController,\n  scriptStart: string,\n  formState: unknown | null\n) {\n  let scriptContents = `(self.__next_f=self.__next_f||[]).push(${htmlEscapeJsonString(\n    JSON.stringify([INLINE_FLIGHT_PAYLOAD_BOOTSTRAP])\n  )})`\n\n  if (formState != null) {\n    scriptContents += `;self.__next_f.push(${htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_FORM_STATE, formState])\n    )})`\n  }\n\n  controller.enqueue(encoder.encode(`${scriptStart}${scriptContents}</script>`))\n}\n\nfunction writeFlightDataInstruction(\n  controller: ReadableStreamDefaultController,\n  scriptStart: string,\n  chunk: string | Uint8Array\n) {\n  let htmlInlinedData: string\n\n  if (typeof chunk === 'string') {\n    htmlInlinedData = htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_DATA, chunk])\n    )\n  } else {\n    // The chunk cannot be embedded as a UTF-8 string in the script tag.\n    // Instead let's inline it in base64.\n    // Credits to Devon Govett (devongovett) for the technique.\n    // https://github.com/devongovett/rsc-html-stream\n    const base64 =\n      typeof Buffer !== 'undefined'\n        ? Buffer.from(\n            chunk.buffer,\n            chunk.byteOffset,\n            chunk.byteLength\n          ).toString('base64')\n        : btoa(String.fromCodePoint(...chunk))\n    htmlInlinedData = htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_BINARY, base64])\n    )\n  }\n\n  controller.enqueue(\n    encoder.encode(\n      `${scriptStart}self.__next_f.push(${htmlInlinedData})</script>`\n    )\n  )\n}\n","import crypto from 'crypto'\n\n// Background:\n// https://security.stackexchange.com/questions/184305/why-would-i-ever-use-aes-256-cbc-if-aes-256-gcm-is-more-secure\n\nconst CIPHER_ALGORITHM = `aes-256-gcm`,\n  CIPHER_KEY_LENGTH = 32, // https://stackoverflow.com/a/28307668/4397028\n  CIPHER_IV_LENGTH = 16, // https://stackoverflow.com/a/28307668/4397028\n  CIPHER_TAG_LENGTH = 16,\n  CIPHER_SALT_LENGTH = 64\n\nconst PBKDF2_ITERATIONS = 100_000 // https://support.1password.com/pbkdf2/\n\nexport function encryptWithSecret(secret: Buffer, data: string): string {\n  const iv = crypto.randomBytes(CIPHER_IV_LENGTH)\n  const salt = crypto.randomBytes(CIPHER_SALT_LENGTH)\n\n  // https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n  const key = crypto.pbkdf2Sync(\n    secret,\n    salt,\n    PBKDF2_ITERATIONS,\n    CIPHER_KEY_LENGTH,\n    `sha512`\n  )\n\n  const cipher = crypto.createCipheriv(CIPHER_ALGORITHM, key, iv)\n  const encrypted = Buffer.concat([cipher.update(data, `utf8`), cipher.final()])\n\n  // https://nodejs.org/api/crypto.html#crypto_cipher_getauthtag\n  const tag = cipher.getAuthTag()\n\n  return Buffer.concat([\n    // Data as required by:\n    // Salt for Key: https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n    // IV: https://nodejs.org/api/crypto.html#crypto_class_decipher\n    // Tag: https://nodejs.org/api/crypto.html#crypto_decipher_setauthtag_buffer\n    salt,\n    iv,\n    tag,\n    encrypted,\n  ]).toString(`hex`)\n}\n\nexport function decryptWithSecret(\n  secret: Buffer,\n  encryptedData: string\n): string {\n  const buffer = Buffer.from(encryptedData, `hex`)\n\n  const salt = buffer.slice(0, CIPHER_SALT_LENGTH)\n  const iv = buffer.slice(\n    CIPHER_SALT_LENGTH,\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH\n  )\n  const tag = buffer.slice(\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH,\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH + CIPHER_TAG_LENGTH\n  )\n  const encrypted = buffer.slice(\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH + CIPHER_TAG_LENGTH\n  )\n\n  // https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n  const key = crypto.pbkdf2Sync(\n    secret,\n    salt,\n    PBKDF2_ITERATIONS,\n    CIPHER_KEY_LENGTH,\n    `sha512`\n  )\n\n  const decipher = crypto.createDecipheriv(CIPHER_ALGORITHM, key, iv)\n  decipher.setAuthTag(tag)\n\n  return decipher.update(encrypted) + decipher.final(`utf8`)\n}\n","/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n *\n * The dev server (`next dev`) is the exception: to keep reloads fast it serves\n * stale entries until they expire, relying on the wrapper's\n * stale-while-revalidate path to warm a fresh entry in the background. See\n * `get` for where this branches.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandler } from './types'\nimport {\n  areTagsExpired,\n  areTagsStale,\n  tagsManifest,\n  type TagManifestEntry,\n} from '../incremental-cache/tags-manifest.external'\nimport { MIN_PRERENDERABLE_EXPIRE } from '../../use-cache/constants'\n\ntype PrivateCacheEntry = {\n  entry: CacheEntry\n\n  // For the default cache we store errored cache\n  // entries and allow them to be used up to 3 times\n  // after that we want to dispose it and try for fresh\n\n  // If an entry is errored we return no entry\n  // three times so that we retry hitting origin (MISS)\n  // and then if it still fails to set after the third we\n  // return the errored content and use expiration of\n  // Math.min(30, entry.expiration)\n  isErrored: boolean\n  errorRetryCount: number\n\n  // compute size on set since we need to read size\n  // of the ReadableStream for LRU evicting\n  size: number\n}\n\nexport function createDefaultCacheHandler(maxSize: number): CacheHandler {\n  // If the max size is 0, return a cache handler that doesn't cache anything,\n  // this avoids an unnecessary LRUCache instance and potential memory\n  // allocation.\n  if (maxSize === 0) {\n    return {\n      get: () => Promise.resolve(undefined),\n      set: () => Promise.resolve(),\n      refreshTags: () => Promise.resolve(),\n      getExpiration: () => Promise.resolve(0),\n      updateTags: () => Promise.resolve(),\n    }\n  }\n\n  const memoryCache = new LRUCache<PrivateCacheEntry>(\n    maxSize,\n    (entry, cacheKey) => entry.size + cacheKey.length\n  )\n  const pendingSets = new Map<string, Promise<void>>()\n\n  const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n    ? console.debug.bind(console, 'DefaultCacheHandler:')\n    : undefined\n\n  return {\n    async get(cacheKey) {\n      const pendingPromise = pendingSets.get(cacheKey)\n\n      if (pendingPromise) {\n        debug?.('get', cacheKey, 'pending')\n        await pendingPromise\n      }\n\n      const privateEntry = memoryCache.get(cacheKey)\n\n      if (!privateEntry) {\n        debug?.('get', cacheKey, 'not found')\n        return undefined\n      }\n\n      const entry = privateEntry.entry\n\n      // A negative `expire` is an eviction sentinel: the tiered cache handler\n      // (dev-only) marks a front entry for deletion by overwriting it with a\n      // negative `expire`, since the cache-handler interface has no per-key\n      // delete. Treat it as missing here, independently of the minimum\n      // retention below (which would otherwise keep it alive). This is distinct\n      // from `revalidate = -1` below, which keeps serving the entry but forces\n      // a revalidation.\n      if (entry.expire < 0) {\n        debug?.('get', cacheKey, 'evicted')\n        return undefined\n      }\n\n      // The dev server serves stale entries until they expire (see the file\n      // overview); production drops them once past the revalidate time. In dev,\n      // an entry is retained for at least `MIN_PRERENDERABLE_EXPIRE` so that\n      // entries with a short `expire` (for example a `cacheLife({ expire: 0 })`\n      // client-only cache) still linger long enough that a reload hits the\n      // cache. That minimum is the same threshold below which the \"use cache\"\n      // wrapper treats an entry as dynamic, so it only extends the retention of\n      // entries that are dynamic anyway. It affects retention only; the\n      // returned entry keeps its real `expire`, so staging decisions are\n      // unchanged.\n      const maxAgeSeconds = process.env.__NEXT_DEV_SERVER\n        ? Math.max(entry.expire, MIN_PRERENDERABLE_EXPIRE)\n        : entry.revalidate\n\n      if (\n        performance.timeOrigin + performance.now() >\n        entry.timestamp + maxAgeSeconds * 1000\n      ) {\n        debug?.('get', cacheKey, 'expired')\n\n        return undefined\n      }\n\n      let revalidate = entry.revalidate\n\n      if (areTagsExpired(entry.tags, entry.timestamp)) {\n        debug?.('get', cacheKey, 'had expired tag')\n        return undefined\n      }\n\n      if (areTagsStale(entry.tags, entry.timestamp)) {\n        debug?.('get', cacheKey, 'had stale tag')\n        revalidate = -1\n      }\n\n      const [returnStream, newSaved] = entry.value.tee()\n      entry.value = newSaved\n\n      debug?.('get', cacheKey, 'found', {\n        tags: entry.tags,\n        timestamp: entry.timestamp,\n        expire: entry.expire,\n        revalidate,\n      })\n\n      return {\n        ...entry,\n        revalidate,\n        value: returnStream,\n      }\n    },\n\n    async set(cacheKey, pendingEntry) {\n      debug?.('set', cacheKey, 'start')\n\n      let resolvePending: () => void = () => {}\n      const pendingPromise = new Promise<void>((resolve) => {\n        resolvePending = resolve\n      })\n      pendingSets.set(cacheKey, pendingPromise)\n\n      const entry = await pendingEntry\n\n      let size = 0\n\n      try {\n        // In production an `expire: 0` entry is dynamic: the \"use cache\"\n        // wrapper regenerates it on every read instead of serving the stored\n        // copy, so persisting it would be a wasted write of a value that is\n        // never served back. Skip storing it so the next read is a plain miss.\n        // The dev server keeps it, because its minimum retention serves the\n        // previously cached value across reloads. The `finally` below still\n        // resolves the pending set.\n        if (!process.env.__NEXT_DEV_SERVER && entry.expire === 0) {\n          debug?.('set', cacheKey, 'skipped dynamic entry')\n          return\n        }\n\n        const [value, clonedValue] = entry.value.tee()\n        entry.value = value\n        const reader = clonedValue.getReader()\n\n        for (let chunk; !(chunk = await reader.read()).done; ) {\n          size += Buffer.from(chunk.value).byteLength\n        }\n\n        memoryCache.set(cacheKey, {\n          entry,\n          isErrored: false,\n          errorRetryCount: 0,\n          size,\n        })\n\n        debug?.('set', cacheKey, 'done')\n      } catch (err) {\n        // TODO: store partial buffer with error after we retry 3 times\n        debug?.('set', cacheKey, 'failed', err)\n      } finally {\n        resolvePending()\n        pendingSets.delete(cacheKey)\n      }\n    },\n\n    async refreshTags() {\n      // Nothing to do for an in-memory cache handler.\n    },\n\n    async getExpiration(tags) {\n      const expirations = tags.map((tag) => {\n        const entry = tagsManifest.get(tag)\n        if (!entry) return 0\n        // Return the most recent timestamp (either expired or stale)\n        return entry.expired || 0\n      })\n\n      const expiration = Math.max(...expirations, 0)\n\n      debug?.('getExpiration', { tags, expiration })\n\n      return expiration\n    },\n\n    async updateTags(tags, durations) {\n      const now = Math.round(performance.timeOrigin + performance.now())\n      debug?.('updateTags', { tags, timestamp: now })\n\n      for (const tag of tags) {\n        // TODO: update file-system-cache?\n        const existingEntry = tagsManifest.get(tag) || {}\n\n        if (durations) {\n          // Use provided durations directly\n          const updates: TagManifestEntry = { ...existingEntry }\n\n          // mark as stale immediately\n          updates.stale = now\n\n          if (durations.expire !== undefined) {\n            updates.expired = now + durations.expire * 1000 // Convert seconds to ms\n          }\n\n          tagsManifest.set(tag, updates)\n        } else {\n          // Update expired field for immediate expiration (default behavior when no durations provided)\n          tagsManifest.set(tag, { ...existingEntry, expired: now })\n        }\n      }\n    },\n  }\n}\n","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */\nclass LRUNode<T> {\n  public readonly key: string\n  public data: T\n  public size: number\n  public prev: LRUNode<T> | SentinelNode<T> | null = null\n  public next: LRUNode<T> | SentinelNode<T> | null = null\n\n  constructor(key: string, data: T, size: number) {\n    this.key = key\n    this.data = data\n    this.size = size\n  }\n}\n\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */\nclass SentinelNode<T> {\n  public prev: LRUNode<T> | SentinelNode<T> | null = null\n  public next: LRUNode<T> | SentinelNode<T> | null = null\n}\n\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */\nexport class LRUCache<T> {\n  private readonly cache: Map<string, LRUNode<T>> = new Map()\n  private readonly head: SentinelNode<T>\n  private readonly tail: SentinelNode<T>\n  private totalSize: number = 0\n  private readonly maxSize: number\n  private readonly calculateSize:\n    | ((value: T, key: string) => number)\n    | undefined\n  private readonly onEvict: ((key: string, value: T) => void) | undefined\n\n  constructor(\n    maxSize: number,\n    calculateSize?: (value: T, key: string) => number,\n    onEvict?: (key: string, value: T) => void\n  ) {\n    this.maxSize = maxSize\n    this.calculateSize = calculateSize\n    this.onEvict = onEvict\n\n    // Create sentinel nodes to simplify doubly-linked list operations\n    // HEAD <-> TAIL (empty list)\n    this.head = new SentinelNode<T>()\n    this.tail = new SentinelNode<T>()\n    this.head.next = this.tail\n    this.tail.prev = this.head\n  }\n\n  /**\n   * Adds a node immediately after the head (marks as most recently used).\n   * Used when inserting new items or when an item is accessed.\n   * PRECONDITION: node must be disconnected (prev/next should be null)\n   */\n  private addToHead(node: LRUNode<T>): void {\n    node.prev = this.head\n    node.next = this.head.next\n    // head.next is always non-null (points to tail or another node)\n    this.head.next!.prev = node\n    this.head.next = node\n  }\n\n  /**\n   * Removes a node from its current position in the doubly-linked list.\n   * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n   * PRECONDITION: node must be connected (prev/next are non-null)\n   */\n  private removeNode(node: LRUNode<T>): void {\n    // Connected nodes always have non-null prev/next\n    node.prev!.next = node.next\n    node.next!.prev = node.prev\n  }\n\n  /**\n   * Moves an existing node to the head position (marks as most recently used).\n   * This is the core LRU operation - accessed items become most recent.\n   */\n  private moveToHead(node: LRUNode<T>): void {\n    this.removeNode(node)\n    this.addToHead(node)\n  }\n\n  /**\n   * Removes and returns the least recently used node (the one before tail).\n   * This is called during eviction when the cache exceeds capacity.\n   * PRECONDITION: cache is not empty (ensured by caller)\n   */\n  private removeTail(): LRUNode<T> {\n    const lastNode = this.tail.prev as LRUNode<T>\n    // tail.prev is always non-null and always LRUNode when cache is not empty\n    this.removeNode(lastNode)\n    return lastNode\n  }\n\n  /**\n   * Sets a key-value pair in the cache.\n   * If the key exists, updates the value and moves to head.\n   * If new, adds at head and evicts from tail if necessary.\n   *\n   * Time Complexity:\n   * - O(1) for uniform item sizes\n   * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n   */\n  public set(key: string, value: T): boolean {\n    const size = this.calculateSize?.(value, key) ?? 1\n    if (size <= 0) {\n      throw new Error(\n        `LRUCache: calculateSize returned ${size}, but size must be > 0. ` +\n          `Items with size 0 would never be evicted, causing unbounded cache growth.`\n      )\n    }\n    if (size > this.maxSize) {\n      console.warn('Single item size exceeds maxSize')\n      return false\n    }\n\n    const existing = this.cache.get(key)\n    if (existing) {\n      // Update existing node: adjust size and move to head (most recent)\n      existing.data = value\n      this.totalSize = this.totalSize - existing.size + size\n      existing.size = size\n      this.moveToHead(existing)\n    } else {\n      // Add new node at head (most recent position)\n      const newNode = new LRUNode(key, value, size)\n      this.cache.set(key, newNode)\n      this.addToHead(newNode)\n      this.totalSize += size\n    }\n\n    // Evict least recently used items until under capacity\n    while (this.totalSize > this.maxSize && this.cache.size > 0) {\n      const tail = this.removeTail()\n      this.cache.delete(tail.key)\n      this.totalSize -= tail.size\n      this.onEvict?.(tail.key, tail.data)\n    }\n\n    return true\n  }\n\n  /**\n   * Checks if a key exists in the cache.\n   * This is a pure query operation - does NOT update LRU order.\n   *\n   * Time Complexity: O(1)\n   */\n  public has(key: string): boolean {\n    return this.cache.has(key)\n  }\n\n  /**\n   * Retrieves a value by key and marks it as most recently used.\n   * Moving to head maintains the LRU property for future evictions.\n   *\n   * Time Complexity: O(1)\n   */\n  public get(key: string): T | undefined {\n    const node = this.cache.get(key)\n    if (!node) return undefined\n\n    // Mark as most recently used by moving to head\n    this.moveToHead(node)\n\n    return node.data\n  }\n\n  /**\n   * Returns an iterator over the cache entries. The order is outputted in the\n   * order of most recently used to least recently used.\n   */\n  public *[Symbol.iterator](): IterableIterator<[string, T]> {\n    let current = this.head.next\n    while (current && current !== this.tail) {\n      // Between head and tail, current is always LRUNode\n      const node = current as LRUNode<T>\n      yield [node.key, node.data]\n      current = current.next\n    }\n  }\n\n  /**\n   * Removes a specific key from the cache.\n   * Updates both the hash map and doubly-linked list.\n   *\n   * Note: This is an explicit removal and does NOT trigger the `onEvict`\n   * callback. Use this for intentional deletions where eviction tracking\n   * is not needed.\n   *\n   * Time Complexity: O(1)\n   */\n  public remove(key: string): void {\n    const node = this.cache.get(key)\n    if (!node) return\n\n    this.removeNode(node)\n    this.cache.delete(key)\n    this.totalSize -= node.size\n  }\n\n  /**\n   * Returns the number of items in the cache.\n   */\n  public get size(): number {\n    return this.cache.size\n  }\n\n  /**\n   * Returns the current total size of all cached items.\n   * This uses the custom size calculation if provided.\n   */\n  public get currentSize(): number {\n    return this.totalSize\n  }\n}\n","import type { CacheFs } from '../../shared/lib/utils'\n\nimport fs from 'fs'\n\nexport const nodeFs: CacheFs = {\n  existsSync: fs.existsSync,\n  readFile: fs.promises.readFile,\n  readFileSync: fs.readFileSync,\n  writeFile: (f, d) => fs.promises.writeFile(f, d),\n  mkdir: (dir) => fs.promises.mkdir(dir, { recursive: true }),\n  stat: (f) => fs.promises.stat(f),\n}\n","const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone')\n\nexport function isPostpone(error: any): boolean {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    error.$$typeof === REACT_POSTPONE_TYPE\n  )\n}\n","import type { SourceMap } from 'module'\nimport { LRUCache } from './lru-cache'\n\nfunction noSourceMap(): SourceMap | undefined {\n  return undefined\n}\n\n// Edge runtime does not implement `module`\nconst findSourceMap =\n  process.env.NEXT_RUNTIME === 'edge'\n    ? noSourceMap\n    : (require('module') as typeof import('module')).findSourceMap\n\n/**\n * https://tc39.es/source-map/#index-map\n */\ninterface IndexSourceMapSection {\n  offset: {\n    line: number\n    column: number\n  }\n  map: BasicSourceMapPayload\n}\n\n// TODO(veil): Upstream types\n/** https://tc39.es/ecma426/#sec-index-source-map */\ninterface IndexSourceMap {\n  version: number\n  file: string\n  sections: IndexSourceMapSection[]\n}\n\n/** https://tc39.es/ecma426/#sec-source-map-format */\nexport interface BasicSourceMapPayload {\n  version: number\n  // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n  /** WARNING: `file` is optional. */\n  file: string\n  sourceRoot?: string\n  // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n  /** WARNING: `sources[number]` can be `null`. */\n  sources: Array<string>\n  names: Array<string>\n  mappings: string\n  ignoreList?: number[]\n}\n\nexport type ModernSourceMapPayload = BasicSourceMapPayload | IndexSourceMap\n\n// `SourceMap#payload` deep-clones the payload on every access — expensive\n// for large chunk maps — so the clone is shared per `SourceMap` instance,\n// which Node.js memoizes per script.\nconst sourceMapPayloads = new WeakMap<SourceMap, ModernSourceMapPayload>()\n\n/**\n * Like `module.findSourceMap`, but returns the source map's payload without\n * cloning it on every call. Callers must not mutate the returned payload.\n * Throws like `module.findSourceMap` does on invalid source maps.\n */\nexport function findSourceMapPayload(\n  sourceURL: string\n): ModernSourceMapPayload | undefined {\n  const sourceMap = findSourceMap(sourceURL)\n  if (sourceMap === undefined) {\n    return undefined\n  }\n  let payload = sourceMapPayloads.get(sourceMap)\n  if (payload === undefined) {\n    payload = sourceMap.payload as ModernSourceMapPayload\n    sourceMapPayloads.set(sourceMap, payload)\n  }\n  return payload\n}\n\nexport function sourceMapIgnoreListsEverything(\n  sourceMap: BasicSourceMapPayload\n): boolean {\n  return (\n    sourceMap.ignoreList !== undefined &&\n    sourceMap.sources.length === sourceMap.ignoreList.length\n  )\n}\n\n/**\n * Finds the sourcemap payload applicable to a given frame.\n * Equal to the input unless an Index Source Map is used.\n * @param line0 - The line number of the frame, 0-based.\n * @param column0 - The column number of the frame, 0-based.\n */\nexport function findApplicableSourceMapPayload(\n  line0: number,\n  column0: number,\n  payload: ModernSourceMapPayload\n): BasicSourceMapPayload | undefined {\n  if ('sections' in payload) {\n    if (payload.sections.length === 0) {\n      return undefined\n    }\n\n    // Sections must not overlap and must be sorted: https://tc39.es/source-map/#section-object\n    // Therefore the last section that has an offset less than or equal to the frame is the applicable one.\n    const sections = payload.sections\n    let left = 0\n    let right = sections.length - 1\n    let result: IndexSourceMapSection | null = null\n\n    while (left <= right) {\n      // fast Math.floor\n      const middle = ~~((left + right) / 2)\n      const section = sections[middle]\n      const offset = section.offset\n\n      if (\n        offset.line < line0 ||\n        (offset.line === line0 && offset.column <= column0)\n      ) {\n        result = section\n        left = middle + 1\n      } else {\n        right = middle - 1\n      }\n    }\n\n    return result === null ? undefined : result.map\n  } else {\n    return payload\n  }\n}\n\nconst didWarnAboutInvalidSourceMapDEV = new Set<string>()\n\nexport function filterStackFrameDEV(\n  sourceURL: string,\n  functionName: string,\n  line1: number,\n  column1: number\n): boolean {\n  if (sourceURL === '') {\n    // The default implementation filters out <anonymous> stack frames\n    // but we want to retain them because current Server Components and\n    // built-in Components in parent stacks don't have source location.\n    // Filter out frames that show up in Promises to get good names in React's\n    // Server Request track until we come up with a better heuristic.\n    return functionName !== 'new Promise'\n  }\n  if (sourceURL.startsWith('node:') || sourceURL.includes('node_modules')) {\n    return false\n  }\n  try {\n    // Node.js loads source maps eagerly so this call is cheap.\n    // TODO: ESM sourcemaps are O(1) but CommonJS sourcemaps are O(Number of CJS modules).\n    // Make sure this doesn't adversely affect performance when CJS is used by Next.js.\n    const payload = findSourceMapPayload(sourceURL)\n    if (payload === undefined) {\n      // No source map associated.\n      return true\n    }\n    const sourceMapPayload = findApplicableSourceMapPayload(\n      line1 - 1,\n      column1 - 1,\n      payload\n    )\n    if (sourceMapPayload === undefined) {\n      // No source map section applicable to the frame.\n      return true\n    }\n    return !sourceMapIgnoreListsEverything(sourceMapPayload)\n  } catch (cause) {\n    if (process.env.NODE_ENV !== 'production') {\n      // TODO: Share cache with patch-error-inspect\n      if (!didWarnAboutInvalidSourceMapDEV.has(sourceURL)) {\n        didWarnAboutInvalidSourceMapDEV.add(sourceURL)\n        // We should not log an actual error instance here because that will re-enter\n        // this codepath during error inspection and could lead to infinite recursion.\n        console.error(\n          `${sourceURL}: Invalid source map. Only conformant source maps can be used to filter stack frames. Cause: ${cause}`\n        )\n      }\n    }\n\n    return true\n  }\n}\n\n// `scriptNameOrSourceURL` is what React forwards from the stack frame: the\n// script's `getScriptNameOrSourceURL()`, which for the server chunks we can\n// map is an absolute filesystem path, not a URL. The returned value is the\n// source map's URL (`file:` or `data:`).\ntype FindSourceMapURL = (scriptNameOrSourceURL: string) => string | null\n// Find the URL of a source map using the bundler's API.\n// Shared via `globalThis` because this module is compiled both into the server\n// runtime bundles (which call `findSourceMapURLDEV`) and into `next/dist/server`\n// (where the dev server registers the implementation), and each copy has its own\n// module state.\nconst bundlerFindSourceMapURLSymbol = Symbol.for(\n  'next.server.bundlerFindSourceMapURL'\n)\n\nexport function setBundlerFindSourceMapURLImplementation(\n  findSourceMapURLImplementation: FindSourceMapURL\n): void {\n  ;(globalThis as any)[bundlerFindSourceMapURLSymbol] =\n    findSourceMapURLImplementation\n}\n\nfunction bundlerFindSourceMapURL(scriptNameOrSourceURL: string): string | null {\n  const implementation: FindSourceMapURL | undefined = (globalThis as any)[\n    bundlerFindSourceMapURLSymbol\n  ]\n  return implementation === undefined\n    ? null\n    : implementation(scriptNameOrSourceURL)\n}\n\nconst invalidSourceMap = Symbol('invalid-source-map')\nconst sourceMapURLs = new LRUCache<string | typeof invalidSourceMap>(\n  512 * 1024 * 1024,\n  (url, sourceURL) =>\n    sourceURL.length +\n    (url === invalidSourceMap\n      ? // Guestimate a small source map so invalid entries don't fill the cache.\n        8 * 1024\n      : // these URLs contain only ASCII characters so .length is equal to Buffer.byteLength\n        url.length)\n)\nexport function findSourceMapURLDEV(\n  scriptNameOrSourceURL: string\n): string | null {\n  try {\n    const bundlerSourceMapURL = bundlerFindSourceMapURL(scriptNameOrSourceURL)\n    if (bundlerSourceMapURL !== null) {\n      return bundlerSourceMapURL\n    }\n  } catch (cause) {\n    console.error(\n      `${scriptNameOrSourceURL}: Failed to find the source map URL. Cause: ${cause}`\n    )\n  }\n\n  // No bundler implementation (e.g. Webpack): inline the source map Node.js\n  // knows as a `data:` URL.\n  let sourceMapURL = sourceMapURLs.get(scriptNameOrSourceURL)\n  if (sourceMapURL === undefined) {\n    let sourceMapPayload: ModernSourceMapPayload | undefined\n    try {\n      sourceMapPayload = findSourceMapPayload(scriptNameOrSourceURL)\n    } catch (cause) {\n      console.error(\n        `${scriptNameOrSourceURL}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${cause}`\n      )\n    }\n\n    if (sourceMapPayload === undefined) {\n      sourceMapURL = invalidSourceMap\n    } else {\n      // TODO: Might be more efficient to extract the relevant section from Index Maps.\n      // Unclear if that search is worth the smaller payload we have to stringify.\n      const sourceMapJSON = JSON.stringify(sourceMapPayload)\n      const sourceMapURLData = Buffer.from(sourceMapJSON, 'utf8').toString(\n        'base64'\n      )\n      sourceMapURL = `data:application/json;base64,${sourceMapURLData}`\n    }\n\n    sourceMapURLs.set(scriptNameOrSourceURL, sourceMapURL)\n  }\n\n  return sourceMapURL === invalidSourceMap ? null : sourceMapURL\n}\n\nexport function devirtualizeReactServerURL(sourceURL: string): string {\n  if (sourceURL.startsWith('about://React/')) {\n    // about://React/Server/file://<filename>?42 => file://<filename>\n    const envIdx = sourceURL.indexOf('/', 'about://React/'.length)\n    const suffixIdx = sourceURL.lastIndexOf('?')\n    if (envIdx > -1 && suffixIdx > -1) {\n      return decodeURI(sourceURL.slice(envIdx + 1, suffixIdx))\n    }\n  }\n  return sourceURL\n}\n\nfunction isAnonymousFrameLikelyJSNative(methodName: string): boolean {\n  // Anonymous frames can also be produced in React parent stacks either from\n  // host components or Server Components. We don't want to ignore those.\n  // This could hide user-space methods that are named like native JS methods but\n  // should you really do that?\n  return (\n    // e.g. JSON.parse\n    methodName.startsWith('JSON.') ||\n    // E.g. Promise.withResolves\n    methodName.startsWith('Function.') ||\n    // various JS built-ins\n    methodName.startsWith('Promise.') ||\n    methodName.startsWith('Array.') ||\n    methodName.startsWith('Set.') ||\n    methodName.startsWith('Map.')\n  )\n}\n\nexport function ignoreListAnonymousStackFramesIfSandwiched<Frame>(\n  frames: Frame[],\n  isAnonymousFrame: (frame: Frame) => boolean,\n  isIgnoredFrame: (frame: Frame) => boolean,\n  getMethodName: (frame: Frame) => string,\n  /** only passes frames for which `isAnonymousFrame` and their method is a native JS method or `isIgnoredFrame` return true */\n  ignoreFrame: (frame: Frame) => void\n): void {\n  for (let i = 1; i < frames.length; i++) {\n    const currentFrame = frames[i]\n    if (\n      !(\n        isAnonymousFrame(currentFrame) &&\n        isAnonymousFrameLikelyJSNative(getMethodName(currentFrame))\n      )\n    ) {\n      continue\n    }\n\n    const previousFrameIsIgnored = isIgnoredFrame(frames[i - 1])\n    if (previousFrameIsIgnored && i < frames.length - 1) {\n      let ignoreSandwich = false\n      let j = i + 1\n      for (j; j < frames.length; j++) {\n        const nextFrame = frames[j]\n        const nextFrameIsAnonymous =\n          isAnonymousFrame(nextFrame) &&\n          isAnonymousFrameLikelyJSNative(getMethodName(nextFrame))\n        if (nextFrameIsAnonymous) {\n          continue\n        }\n\n        const nextFrameIsIgnored = isIgnoredFrame(nextFrame)\n        if (nextFrameIsIgnored) {\n          ignoreSandwich = true\n          break\n        }\n      }\n\n      if (ignoreSandwich) {\n        for (i; i < j; i++) {\n          ignoreFrame(frames[i])\n        }\n      }\n    }\n  }\n}\n","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/\n\n// eslint typescript has a bug with TS enums\n\nenum BaseServerSpan {\n  handleRequest = 'BaseServer.handleRequest',\n  run = 'BaseServer.run',\n  pipe = 'BaseServer.pipe',\n  getStaticHTML = 'BaseServer.getStaticHTML',\n  render = 'BaseServer.render',\n  renderToResponseWithComponents = 'BaseServer.renderToResponseWithComponents',\n  renderToResponse = 'BaseServer.renderToResponse',\n  renderToHTML = 'BaseServer.renderToHTML',\n  renderError = 'BaseServer.renderError',\n  renderErrorToResponse = 'BaseServer.renderErrorToResponse',\n  renderErrorToHTML = 'BaseServer.renderErrorToHTML',\n  render404 = 'BaseServer.render404',\n}\n\nenum LoadComponentsSpan {\n  loadDefaultErrorComponents = 'LoadComponents.loadDefaultErrorComponents',\n  loadComponents = 'LoadComponents.loadComponents',\n}\n\nenum NextServerSpan {\n  getRequestHandler = 'NextServer.getRequestHandler',\n  getRequestHandlerWithMetadata = 'NextServer.getRequestHandlerWithMetadata',\n  getServer = 'NextServer.getServer',\n  getServerRequestHandler = 'NextServer.getServerRequestHandler',\n  createServer = 'createServer.createServer',\n}\n\nenum NextNodeServerSpan {\n  compression = 'NextNodeServer.compression',\n  getBuildId = 'NextNodeServer.getBuildId',\n  createComponentTree = 'NextNodeServer.createComponentTree',\n  clientComponentLoading = 'NextNodeServer.clientComponentLoading',\n  getLayoutOrPageModule = 'NextNodeServer.getLayoutOrPageModule',\n  generateStaticRoutes = 'NextNodeServer.generateStaticRoutes',\n  generateFsStaticRoutes = 'NextNodeServer.generateFsStaticRoutes',\n  generatePublicRoutes = 'NextNodeServer.generatePublicRoutes',\n  generateImageRoutes = 'NextNodeServer.generateImageRoutes.route',\n  sendRenderResult = 'NextNodeServer.sendRenderResult',\n  proxyRequest = 'NextNodeServer.proxyRequest',\n  runApi = 'NextNodeServer.runApi',\n  render = 'NextNodeServer.render',\n  renderHTML = 'NextNodeServer.renderHTML',\n  imageOptimizer = 'NextNodeServer.imageOptimizer',\n  getPagePath = 'NextNodeServer.getPagePath',\n  getRoutesManifest = 'NextNodeServer.getRoutesManifest',\n  findPageComponents = 'NextNodeServer.findPageComponents',\n  getFontManifest = 'NextNodeServer.getFontManifest',\n  getServerComponentManifest = 'NextNodeServer.getServerComponentManifest',\n  getRequestHandler = 'NextNodeServer.getRequestHandler',\n  renderToHTML = 'NextNodeServer.renderToHTML',\n  renderError = 'NextNodeServer.renderError',\n  renderErrorToHTML = 'NextNodeServer.renderErrorToHTML',\n  render404 = 'NextNodeServer.render404',\n  startResponse = 'NextNodeServer.startResponse',\n\n  // nested inner span, does not require parent scope name\n  route = 'route',\n  onProxyReq = 'onProxyReq',\n  apiResolver = 'apiResolver',\n  internalFetch = 'internalFetch',\n}\n\nenum StartServerSpan {\n  startServer = 'startServer.startServer',\n}\n\nenum RenderSpan {\n  getServerSideProps = 'Render.getServerSideProps',\n  getStaticProps = 'Render.getStaticProps',\n  renderToString = 'Render.renderToString',\n  renderDocument = 'Render.renderDocument',\n  createBodyResult = 'Render.createBodyResult',\n}\n\nenum AppRenderSpan {\n  renderToString = 'AppRender.renderToString',\n  renderToReadableStream = 'AppRender.renderToReadableStream',\n  getBodyResult = 'AppRender.getBodyResult',\n  fetch = 'AppRender.fetch',\n  waitShellReady = 'AppRender.waitShellReady',\n  renderToNodeFizzStream = 'AppRender.renderToNodeFizzStream',\n  instantInsights = 'AppRender.instantInsights',\n  instantInsightsPrepareValidation = 'AppRender.instantInsights.prepareValidation',\n  instantInsightsRunValidation = 'AppRender.instantInsights.runValidation',\n}\n\nenum RouterSpan {\n  executeRoute = 'Router.executeRoute',\n}\n\nenum NodeSpan {\n  runHandler = 'Node.runHandler',\n}\n\nenum AppRouteRouteHandlersSpan {\n  runHandler = 'AppRouteRouteHandlers.runHandler',\n}\n\nenum ResolveMetadataSpan {\n  generateMetadata = 'ResolveMetadata.generateMetadata',\n  generateViewport = 'ResolveMetadata.generateViewport',\n}\n\nenum MiddlewareSpan {\n  execute = 'Middleware.execute',\n}\n\ntype SpanTypes =\n  | `${BaseServerSpan}`\n  | `${LoadComponentsSpan}`\n  | `${NextServerSpan}`\n  | `${StartServerSpan}`\n  | `${NextNodeServerSpan}`\n  | `${RenderSpan}`\n  | `${RouterSpan}`\n  | `${AppRenderSpan}`\n  | `${NodeSpan}`\n  | `${AppRouteRouteHandlersSpan}`\n  | `${ResolveMetadataSpan}`\n  | `${MiddlewareSpan}`\n\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n  MiddlewareSpan.execute,\n  BaseServerSpan.handleRequest,\n  RenderSpan.getServerSideProps,\n  RenderSpan.getStaticProps,\n  AppRenderSpan.fetch,\n  AppRenderSpan.getBodyResult,\n  RenderSpan.renderDocument,\n  NodeSpan.runHandler,\n  AppRouteRouteHandlersSpan.runHandler,\n  ResolveMetadataSpan.generateMetadata,\n  ResolveMetadataSpan.generateViewport,\n  NextNodeServerSpan.createComponentTree,\n  NextNodeServerSpan.findPageComponents,\n  NextNodeServerSpan.getLayoutOrPageModule,\n  NextNodeServerSpan.startResponse,\n  NextNodeServerSpan.clientComponentLoading,\n])\n\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n  NextNodeServerSpan.findPageComponents,\n  NextNodeServerSpan.createComponentTree,\n  NextNodeServerSpan.clientComponentLoading,\n])\n\nexport {\n  BaseServerSpan,\n  LoadComponentsSpan,\n  NextServerSpan,\n  NextNodeServerSpan,\n  StartServerSpan,\n  RenderSpan,\n  RouterSpan,\n  AppRenderSpan,\n  NodeSpan,\n  AppRouteRouteHandlersSpan,\n  ResolveMetadataSpan,\n  MiddlewareSpan,\n}\n\nexport type { SpanTypes }\n","import type { AsyncLocalStorage } from 'async_hooks'\nimport type { RequestInsightKind } from '../../../next-devtools/shared/request-insights'\nimport { createAsyncLocalStorage } from '../../app-render/async-local-storage'\n\nexport type RequestInsightsIdentity = {\n  requestId: string\n  kind?: RequestInsightKind\n  htmlRequestId: string\n  url: string | undefined\n}\n\n// This storage covers the part of BaseServer request handling that runs before\n// App Render creates workAsyncStorage. Once available, workStore remains the\n// primary identity source for locally recorded spans.\nconst REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY = Symbol.for(\n  '@next/request-insights-identity-storage'\n)\n\nfunction getRequestInsightsIdentityStorage(): AsyncLocalStorage<RequestInsightsIdentity> {\n  const globalStore = globalThis as typeof globalThis & {\n    [REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY]?: AsyncLocalStorage<RequestInsightsIdentity>\n  }\n\n  return (globalStore[REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY] ??=\n    createAsyncLocalStorage())\n}\n\nexport function runWithRequestInsightsIdentity<T>(\n  identity: RequestInsightsIdentity,\n  fn: () => T\n): T {\n  return getRequestInsightsIdentityStorage().run(identity, fn)\n}\n\nexport function getRequestInsightsIdentity():\n  | RequestInsightsIdentity\n  | undefined {\n  return getRequestInsightsIdentityStorage().getStore()\n}\n","export type RequestInsightKind = 'request' | 'instant-insights'\n\nexport type RequestInsightIdentity = {\n  requestId: string\n  kind?: RequestInsightKind\n}\n\nexport function getRequestInsightKind(\n  insight: Pick<RequestInsightIdentity, 'kind'>\n): RequestInsightKind {\n  return insight.kind ?? 'request'\n}\n\nexport function getRequestInsightKey(insight: RequestInsightIdentity): string {\n  return `${getRequestInsightKind(insight)}:${insight.requestId}`\n}\n","import type { AttributeValue } from 'next/dist/compiled/@opentelemetry/api'\nimport type {\n  RequestInsight,\n  RequestInsightFetch,\n  RequestInsightsSnapshot,\n} from '../../../next-devtools/shared/request-insights'\nimport type { RequestInsightKind } from '../../../shared/lib/request-insights'\nimport {\n  getRequestInsightKey,\n  getRequestInsightKind,\n} from '../../../shared/lib/request-insights'\nimport type { SpanStoreRecord } from './span-store'\nexport { isRequestInsightsEnabled } from './span-store'\n\nconst MAX_REQUEST_INSIGHTS = 100\nconst REQUEST_INSIGHTS_STORE_KEY = Symbol.for('@next/request-insights-store')\nconst CLIENT_COMPONENT_LOADING_SPAN_TYPE =\n  'NextNodeServer.clientComponentLoading'\n\ntype RequestInsightsListener = (insight: RequestInsight) => void\ntype RequestInsightIdentity = {\n  requestId?: string\n  kind?: RequestInsightKind\n  htmlRequestId?: string\n  route?: string\n  url?: string\n}\n\nconst REDACTED_VALUE = 'redacted'\nconst SAFE_SPAN_ATTRIBUTE_KEYS = new Set([\n  'http.method',\n  'http.route',\n  'http.status_code',\n  'http.url',\n  'net.peer.name',\n  'net.peer.port',\n  'next.fetch.cache_reason',\n  'next.fetch.cache_status',\n  'next.fetch.idx',\n  'next.route',\n  'next.rsc',\n  'next.segment',\n  'next.span_category',\n  'next.span_name',\n  'next.span_type',\n])\nconst SENSITIVE_PARAM_NAME_RE =\n  /(?:^|[_-])(?:access[_-]?token|api[_-]?key|auth|authorization|code|cookie|credential|id[_-]?token|jwt|key|password|secret|session|signature|sig|token)(?:$|[_-])/i\n\nclass InMemoryRequestInsightsStore {\n  private readonly requests = new Map<string, RequestInsight>()\n  private readonly requestTimings = new Map<\n    string,\n    { startTime: number; durationMs: number }\n  >()\n  private readonly requestOrder: string[] = []\n  private readonly listeners = new Set<RequestInsightsListener>()\n\n  recordSpan(span: SpanStoreRecord): void {\n    if (!span.requestId) {\n      return\n    }\n\n    const insight = this.getOrCreateRequest(\n      {\n        requestId: span.requestId,\n        kind: span.requestInsightKind,\n        htmlRequestId: span.htmlRequestId,\n        route: span.route,\n        url: span.url,\n      },\n      span.startTime ?? span.timestamp\n    )\n\n    const spanStartTime = span.startTime ?? span.timestamp\n    insight.htmlRequestId = span.htmlRequestId ?? insight.htmlRequestId\n    insight.route = insight.route ?? span.route\n    insight.url = insight.url ?? sanitizeUrl(span.url)\n    this.updateTiming(\n      insight,\n      spanStartTime,\n      span.durationMs,\n      span.attributes?.['next.span_type'] === 'BaseServer.handleRequest'\n    )\n    insight.status =\n      insight.status === 'error' || span.status === 'error'\n        ? 'error'\n        : span.status === 'ok'\n          ? 'ok'\n          : insight.status\n\n    insight.spans.push({\n      name: span.name,\n      startTime: spanStartTime,\n      durationMs: span.durationMs,\n      status: span.status,\n      traceId: span.traceId,\n      spanId: span.spanId,\n      parentSpanId: span.parentSpanId,\n      attributes: sanitizeSpanAttributes(span.attributes),\n      links: sanitizeSpanLinks(span.links),\n      events: sanitizeSpanEvents(span.events),\n      error: span.error,\n    })\n\n    const fetch = getFetchInsight(span)\n    if (fetch) {\n      this.recordFetchForInsight(insight, fetch)\n    }\n\n    this.notify(insight)\n  }\n\n  recordFetch(identity: RequestInsightIdentity, fetch: RequestInsightFetch) {\n    if (!identity.requestId) {\n      return\n    }\n\n    const fetchStartTime = fetch.startTime ?? getCurrentTimestamp()\n    const insight = this.getOrCreateRequest(identity, fetchStartTime)\n    this.updateTiming(insight, fetchStartTime, fetch.durationMs, false)\n    this.recordFetchForInsight(insight, sanitizeFetchInsight(fetch))\n    this.notify(insight)\n  }\n\n  getSnapshot(): RequestInsightsSnapshot {\n    return {\n      requests: this.requestOrder\n        .map((insightKey) => this.requests.get(insightKey))\n        .filter((request): request is RequestInsight => request !== undefined),\n    }\n  }\n\n  subscribe(listener: RequestInsightsListener): () => void {\n    this.listeners.add(listener)\n    return () => {\n      this.listeners.delete(listener)\n    }\n  }\n\n  clear(): void {\n    this.requests.clear()\n    this.requestTimings.clear()\n    this.requestOrder.length = 0\n  }\n\n  private updateTiming(\n    insight: RequestInsight,\n    startTime: number,\n    durationMs: number | undefined,\n    isRequestSpan: boolean\n  ): void {\n    const insightKey = getRequestInsightKey(insight)\n    if (isRequestSpan && durationMs !== undefined) {\n      const requestTiming = { startTime, durationMs }\n      this.requestTimings.set(insightKey, requestTiming)\n      insight.startTime = requestTiming.startTime\n      insight.durationMs = requestTiming.durationMs\n      return\n    }\n\n    const requestTiming = this.requestTimings.get(insightKey)\n    if (requestTiming) {\n      insight.startTime = requestTiming.startTime\n      insight.durationMs = requestTiming.durationMs\n      return\n    }\n\n    const endTime = startTime + (durationMs ?? 0)\n    const requestEndTime = insight.startTime + (insight.durationMs ?? 0)\n    insight.startTime = Math.min(insight.startTime, startTime)\n    insight.durationMs = Math.max(requestEndTime, endTime) - insight.startTime\n  }\n\n  private notify(insight: RequestInsight): void {\n    for (const listener of this.listeners) {\n      listener(insight)\n    }\n  }\n\n  private getOrCreateRequest(\n    identity: RequestInsightIdentity,\n    startTime: number\n  ): RequestInsight {\n    const requestId = identity.requestId!\n    const insightKey = getRequestInsightKey({\n      requestId,\n      kind: identity.kind,\n    })\n    let insight = this.requests.get(insightKey)\n\n    if (!insight) {\n      insight = {\n        requestId,\n        kind: getRequestInsightKind(identity),\n        htmlRequestId: identity.htmlRequestId ?? requestId,\n        route: identity.route,\n        url: sanitizeUrl(identity.url),\n        startTime,\n        status: 'pending',\n        spans: [],\n        fetches: [],\n      }\n      this.requests.set(insightKey, insight)\n      this.requestOrder.push(insightKey)\n      this.trim()\n    }\n\n    insight.htmlRequestId = identity.htmlRequestId ?? insight.htmlRequestId\n    insight.route = insight.route ?? identity.route\n    insight.url = insight.url ?? sanitizeUrl(identity.url)\n    insight.startTime = Math.min(insight.startTime, startTime)\n\n    return insight\n  }\n\n  private recordFetchForInsight(\n    insight: RequestInsight,\n    fetch: RequestInsightFetch\n  ): void {\n    if (\n      insight.fetches.some(\n        (existingFetch) =>\n          existingFetch.url === fetch.url &&\n          (existingFetch.index !== undefined && fetch.index !== undefined\n            ? existingFetch.index === fetch.index\n            : existingFetch.startTime === fetch.startTime)\n      )\n    ) {\n      return\n    }\n\n    insight.fetches.push(sanitizeFetchInsight(fetch))\n  }\n\n  private trim(): void {\n    while (this.requestOrder.length > MAX_REQUEST_INSIGHTS) {\n      const insightKey = this.requestOrder.shift()\n      if (insightKey) {\n        this.requests.delete(insightKey)\n        this.requestTimings.delete(insightKey)\n      }\n    }\n  }\n}\n\nexport function recordRequestInsightSpan(span: SpanStoreRecord): void {\n  if (\n    span.attributes?.['next.span_type'] === CLIENT_COMPONENT_LOADING_SPAN_TYPE\n  ) {\n    return\n  }\n\n  getRequestInsightsStore().recordSpan(span)\n}\n\nexport function recordRequestInsightFetch(\n  identity: RequestInsightIdentity,\n  fetch: RequestInsightFetch\n): void {\n  getRequestInsightsStore().recordFetch(identity, fetch)\n}\n\nexport function getRequestInsightsSnapshot(): RequestInsightsSnapshot {\n  return getRequestInsightsStore().getSnapshot()\n}\n\nexport function subscribeRequestInsights(\n  listener: RequestInsightsListener\n): () => void {\n  return getRequestInsightsStore().subscribe(listener)\n}\n\nexport function clearRequestInsightsForTest(): void {\n  getRequestInsightsStore().clear()\n}\n\nfunction getRequestInsightsStore(): InMemoryRequestInsightsStore {\n  const globalStore = globalThis as typeof globalThis & {\n    [REQUEST_INSIGHTS_STORE_KEY]?: InMemoryRequestInsightsStore\n  }\n\n  return (globalStore[REQUEST_INSIGHTS_STORE_KEY] ??=\n    new InMemoryRequestInsightsStore())\n}\n\nfunction getFetchInsight(span: SpanStoreRecord): RequestInsightFetch | null {\n  const attributes = span.attributes\n\n  if (!attributes || attributes['next.span_type'] !== 'AppRender.fetch') {\n    return null\n  }\n\n  return {\n    url: sanitizeUrl(getStringAttribute(attributes['http.url']) ?? span.url),\n    method: getStringAttribute(attributes['http.method']),\n    statusCode: getNumberAttribute(attributes['http.status_code']),\n    startTime: span.startTime ?? span.timestamp,\n    durationMs: span.durationMs,\n    cacheStatus: getStringAttribute(attributes['next.fetch.cache_status']),\n    cacheReason: getStringAttribute(attributes['next.fetch.cache_reason']),\n    index: getNumberAttribute(attributes['next.fetch.idx']),\n  }\n}\n\nfunction sanitizeFetchInsight(fetch: RequestInsightFetch): RequestInsightFetch {\n  return {\n    ...fetch,\n    url: sanitizeUrl(fetch.url),\n  }\n}\n\nfunction getCurrentTimestamp(): number {\n  return performance.timeOrigin + performance.now()\n}\n\nfunction sanitizeSpanAttributes(\n  attributes: SpanStoreRecord['attributes']\n): SpanStoreRecord['attributes'] {\n  if (!attributes) {\n    return undefined\n  }\n\n  const sanitized: NonNullable<SpanStoreRecord['attributes']> = {}\n  for (const [key, value] of Object.entries(attributes)) {\n    if (!SAFE_SPAN_ATTRIBUTE_KEYS.has(key)) {\n      continue\n    }\n\n    sanitized[key] = key === 'http.url' ? sanitizeUrlAttribute(value) : value\n  }\n\n  return Object.keys(sanitized).length > 0 ? sanitized : undefined\n}\n\nfunction sanitizeSpanEvents(\n  events: SpanStoreRecord['events']\n): SpanStoreRecord['events'] {\n  return events?.map((event) => ({\n    ...event,\n    attributes: sanitizeSpanAttributes(event.attributes),\n  }))\n}\n\nfunction sanitizeSpanLinks(\n  links: SpanStoreRecord['links']\n): SpanStoreRecord['links'] {\n  return links?.map((link) => ({\n    ...link,\n    attributes: sanitizeSpanAttributes(link.attributes),\n  }))\n}\n\nfunction sanitizeUrlAttribute(value: AttributeValue): AttributeValue {\n  return typeof value === 'string' ? (sanitizeUrl(value) ?? '') : value\n}\n\nfunction sanitizeUrl(value: string | undefined): string | undefined {\n  if (!value) {\n    return value\n  }\n\n  const isRelativeUrl = value.startsWith('/')\n\n  try {\n    const url = isRelativeUrl ? new URL(value, 'http://n') : new URL(value)\n\n    url.username = ''\n    url.password = ''\n\n    for (const name of Array.from(url.searchParams.keys())) {\n      if (SENSITIVE_PARAM_NAME_RE.test(name)) {\n        url.searchParams.set(name, REDACTED_VALUE)\n      }\n    }\n\n    return isRelativeUrl ? `${url.pathname}${url.search}${url.hash}` : url.href\n  } catch {\n    return value\n  }\n}\n\nfunction getStringAttribute(value: AttributeValue | undefined) {\n  return typeof value === 'string' ? value : undefined\n}\n\nfunction getNumberAttribute(value: AttributeValue | undefined) {\n  return typeof value === 'number' ? value : undefined\n}\n","import type { AttributeValue } from 'next/dist/compiled/@opentelemetry/api'\nimport type { RequestInsightKind } from '../../../next-devtools/shared/request-insights'\n\nexport type SpanStoreAttributes = Record<string, AttributeValue>\n\nexport type SpanStoreLink = {\n  traceId: string\n  spanId: string\n  attributes?: SpanStoreAttributes\n}\n\nexport type SpanStoreEvent = {\n  name: string\n  timestamp: number\n  attributes?: SpanStoreAttributes\n}\n\nexport type SpanStoreRecord = {\n  name: string\n  timestamp: number\n  startTime?: number\n  durationMs?: number\n  status?: 'ok' | 'error'\n  traceId?: string\n  spanId?: string\n  parentSpanId?: string\n  requestId?: string\n  requestInsightKind?: RequestInsightKind\n  htmlRequestId?: string\n  route?: string\n  url?: string\n  attributes?: SpanStoreAttributes\n  links?: SpanStoreLink[]\n  events?: SpanStoreEvent[]\n  error?: {\n    type?: string\n    message?: string\n  }\n}\n\ntype SpanRecorderForTest = (span: SpanStoreRecord) => void\n\nlet spanRecorderForTest: SpanRecorderForTest | undefined\n\nexport function recordSpan(record: Omit<SpanStoreRecord, 'timestamp'>): void {\n  if (!isLocalSpanRecordingEnabled()) {\n    return\n  }\n\n  const spanRecord: SpanStoreRecord = {\n    timestamp: getCurrentTimestamp(),\n    ...record,\n  }\n\n  spanRecorderForTest?.(spanRecord)\n\n  if (isRequestInsightsEnabled() && spanRecord.requestId) {\n    const { recordRequestInsightSpan } =\n      require('./request-insights') as typeof import('./request-insights')\n    recordRequestInsightSpan(spanRecord)\n  }\n}\n\nexport function setSpanRecorderForTest(\n  recorder: SpanRecorderForTest | undefined\n): void {\n  spanRecorderForTest = recorder\n}\n\nexport function isLocalSpanRecordingEnabled(): boolean {\n  if (!process.env.__NEXT_DEV_SERVER) {\n    return false\n  }\n\n  return spanRecorderForTest !== undefined || isRequestInsightsEnabled()\n}\n\nexport function isRequestInsightsEnabled(): boolean {\n  if (!process.env.__NEXT_DEV_SERVER) {\n    return false\n  }\n\n  const value = process.env.__NEXT_REQUEST_INSIGHTS\n  return isEnabledEnvValue(value)\n}\n\nfunction isEnabledEnvValue(value: string | undefined): boolean {\n  return value === '1' || value === 'true' || (value as unknown) === true\n}\n\nfunction getCurrentTimestamp(): number {\n  return performance.timeOrigin + performance.now()\n}\n","import { isPostpone } from '../lib/router-utils/is-postpone'\nimport * as Log from '../../build/output/log'\n\nlet _global = globalThis as typeof globalThis & {\n  nextInitializedProcessErrorHandlers?: boolean\n  [UNHANDLED_REJECTION_LISTENER_KEY]?: NodeJS.UnhandledRejectionListener\n}\n\n// The listener function is shared via globalThis so that multiple copies of\n// this module (e.g. in the pre-compiled server bundle and in a route module\n// bundle) still register and detect a single listener instance.\nconst UNHANDLED_REJECTION_LISTENER_KEY = Symbol.for(\n  'next.unhandledRejectionListener'\n)\n\nfunction unhandledRejectionListener(reason: unknown) {\n  if (isPostpone(reason)) {\n    // React postpones that are unhandled might end up logged here but they're\n    // not really errors. They're just part of rendering.\n    return\n  }\n  // Immediately log the error.\n  // TODO: Ideally, if we knew that this error was triggered by application\n  // code, we would suppress it entirely without logging. We can't reliably\n  // detect all of these, but when cacheComponents is enabled, we could suppress\n  // at least some of them by waiting to log the error until after all in-\n  // progress renders have completed. Then, only log errors for which there\n  // was not a corresponding \"rejectionHandled\" event.\n  Log.error('unhandledRejection:', reason)\n}\n\n/**\n * Checks if the Next.js unhandled rejection listener is currently attached.\n * This queries the actual process listeners instead of relying on a module\n * global, so it stays accurate even if the listener was removed externally,\n * e.g. via `process.removeAllListeners('unhandledRejection')`.\n */\nexport function isUnhandledRejectionListenerRegistered(): boolean {\n  const listener = _global[UNHANDLED_REJECTION_LISTENER_KEY]\n\n  return (\n    listener !== undefined &&\n    process.listeners('unhandledRejection').includes(listener)\n  )\n}\n\n/**\n * Registers the Next.js unhandled rejection listener, which logs unhandled\n * rejections (except React postpones) and prevents them from crashing the\n * process. Safe to call unconditionally: if the listener is already attached,\n * this is a no-op, so it never registers a duplicate.\n */\nexport function registerUnhandledRejectionListener(): void {\n  if (isUnhandledRejectionListenerRegistered()) {\n    return\n  }\n\n  const listener = (_global[UNHANDLED_REJECTION_LISTENER_KEY] ??=\n    unhandledRejectionListener)\n\n  process.on('unhandledRejection', listener)\n}\n\nexport function installProcessErrorHandlers(\n  shouldRemoveUncaughtErrorAndRejectionListeners: boolean\n) {\n  if (!_global.nextInitializedProcessErrorHandlers) {\n    _global.nextInitializedProcessErrorHandlers = true\n    // The conventional wisdom of Node.js and other runtimes is to treat\n    // unhandled errors as fatal and exit the process.\n    //\n    // But Next.js is not a generic JS runtime — it's a specialized runtime for\n    // React Server Components.\n    //\n    // Many unhandled rejections are due to the late-awaiting pattern for\n    // prefetching data. In Next.js it's OK to call an async function without\n    // immediately awaiting it, to start the request as soon as possible\n    // without blocking unncessarily on the result. These can end up\n    // triggering an \"unhandledRejection\" if it later turns out that the\n    // data is not needed to render the page. Example:\n    //\n    //     const promise = fetchData()\n    //     const shouldShow = await checkCondition()\n    //     if (shouldShow) {\n    //       return <Component promise={promise} />\n    //     }\n    //\n    // In this example, `fetchData` is called immediately to start the request\n    // as soon as possible, but if `shouldShow` is false, then it will be\n    // discarded without unwrapping its result. If it errors, it will trigger\n    // an \"unhandledRejection\" event.\n    //\n    // Ideally, we would suppress these rejections completely without warning,\n    // because we don't consider them real errors. (TODO: Currently we do warn.)\n    //\n    // But regardless of whether we do or don't warn, we definitely shouldn't\n    // crash the entire process.\n    //\n    // Even a \"legit\" unhandled error unrelated to prefetching shouldn't\n    // prevent the rest of the page from rendering.\n    //\n    // So, we're going to intentionally override the default error handling\n    // behavior of the outer JS runtime to be more forgiving\n\n    // Remove any existing \"unhandledRejection\" and \"uncaughtException\" handlers.\n    // This is gated behind an experimental flag until we've considered the impact\n    // in various deployment environments. It's possible this may always need to\n    // be configurable.\n    if (shouldRemoveUncaughtErrorAndRejectionListeners) {\n      process.removeAllListeners('uncaughtException')\n      process.removeAllListeners('unhandledRejection')\n    }\n\n    process.on('rejectionHandled', () => {\n      // TODO: See note in the unhandledRejection listener above. In the\n      // future, we may use the \"rejectionHandled\" event to de-queue an error\n      // from being logged.\n    })\n\n    // Unhandled exceptions are errors triggered by non-async functions, so this\n    // is unrelated to the late-awaiting pattern. However, for similar reasons,\n    // we still shouldn't crash the process. Just log it.\n    process.on('uncaughtException', (reason: unknown) => {\n      if (isPostpone(reason)) {\n        return\n      }\n      console.error(reason)\n    })\n  }\n\n  // Register the listener unconditionally, and not only during the guarded\n  // initialization above: a previous registration may have been undone by the\n  // `removeAllListeners` call of a later `installProcessErrorHandlers` call\n  // (or by external code), and registering is a no-op if the listener is\n  // still attached.\n  registerUnhandledRejectionListener()\n}\n","import type { WorkStore } from './app-render/work-async-storage.external'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport { getCacheHandlers } from './use-cache/handlers'\n\n/** Run a callback, and execute any *new* revalidations added during its runtime. */\nexport async function withExecuteRevalidates<T>(\n  store: WorkStore | undefined,\n  callback: () => Promise<T>\n): Promise<T> {\n  if (!store) {\n    return callback()\n  }\n  // If we executed any revalidates during the request, then we don't want to execute them again.\n  // save the state so we can check if anything changed after we're done running callbacks.\n  const savedRevalidationState = cloneRevalidationState(store)\n  try {\n    return await callback()\n  } finally {\n    // Check if we have any new revalidates, and if so, wait until they are all resolved.\n    const newRevalidates = diffRevalidationState(\n      savedRevalidationState,\n      cloneRevalidationState(store)\n    )\n    await executeRevalidates(store, newRevalidates)\n  }\n}\n\ntype RevalidationState = Required<\n  Pick<\n    WorkStore,\n    'pendingRevalidatedTags' | 'pendingRevalidates' | 'pendingRevalidateWrites'\n  >\n>\n\nfunction cloneRevalidationState(store: WorkStore): RevalidationState {\n  return {\n    pendingRevalidatedTags: store.pendingRevalidatedTags\n      ? [...store.pendingRevalidatedTags]\n      : [],\n    pendingRevalidates: { ...store.pendingRevalidates },\n    pendingRevalidateWrites: store.pendingRevalidateWrites\n      ? [...store.pendingRevalidateWrites]\n      : [],\n  }\n}\n\nfunction diffRevalidationState(\n  prev: RevalidationState,\n  curr: RevalidationState\n): RevalidationState {\n  const prevTagsWithProfile = new Set(\n    prev.pendingRevalidatedTags.map((item) => {\n      const profileKey =\n        typeof item.profile === 'object'\n          ? JSON.stringify(item.profile)\n          : item.profile || ''\n      return `${item.tag}:${profileKey}`\n    })\n  )\n  const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites)\n  return {\n    pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((item) => {\n      const profileKey =\n        typeof item.profile === 'object'\n          ? JSON.stringify(item.profile)\n          : item.profile || ''\n      return !prevTagsWithProfile.has(`${item.tag}:${profileKey}`)\n    }),\n    pendingRevalidates: Object.fromEntries(\n      Object.entries(curr.pendingRevalidates).filter(\n        ([key]) => !(key in prev.pendingRevalidates)\n      )\n    ),\n    pendingRevalidateWrites: curr.pendingRevalidateWrites.filter(\n      (promise) => !prevRevalidateWrites.has(promise)\n    ),\n  }\n}\n\nasync function revalidateTags(\n  tagsWithProfile: Array<{\n    tag: string\n    profile?: string | { expire?: number }\n  }>,\n  incrementalCache: IncrementalCache | undefined,\n  workStore?: WorkStore\n): Promise<void> {\n  if (tagsWithProfile.length === 0) {\n    return\n  }\n\n  const handlers = getCacheHandlers()\n  const promises: Promise<void>[] = []\n\n  // Group tags by profile for batch processing\n  const tagsByProfile = new Map<\n    | string\n    | { stale?: number; revalidate?: number; expire?: number }\n    | undefined,\n    string[]\n  >()\n\n  for (const item of tagsWithProfile) {\n    const profile = item.profile\n    // Find existing profile by comparing values\n    let existingKey = undefined\n    for (const [key] of tagsByProfile) {\n      if (\n        typeof key === 'string' &&\n        typeof profile === 'string' &&\n        key === profile\n      ) {\n        existingKey = key\n        break\n      }\n      if (\n        typeof key === 'object' &&\n        typeof profile === 'object' &&\n        JSON.stringify(key) === JSON.stringify(profile)\n      ) {\n        existingKey = key\n        break\n      }\n      if (key === profile) {\n        existingKey = key\n        break\n      }\n    }\n\n    const profileKey = existingKey || profile\n    if (!tagsByProfile.has(profileKey)) {\n      tagsByProfile.set(profileKey, [])\n    }\n    tagsByProfile.get(profileKey)!.push(item.tag)\n  }\n\n  // Process each profile group\n  for (const [profile, tagsForProfile] of tagsByProfile) {\n    // Look up the cache profile from workStore if available\n    let durations: { expire?: number } | undefined\n\n    if (profile) {\n      let cacheLife:\n        | { stale?: number; revalidate?: number; expire?: number }\n        | undefined\n\n      if (typeof profile === 'object') {\n        // Profile is already a cacheLife configuration object\n        cacheLife = profile\n      } else if (typeof profile === 'string') {\n        // Profile is a string key, look it up in workStore\n        cacheLife = workStore?.cacheLifeProfiles[profile]\n\n        if (!cacheLife) {\n          throw new Error(\n            `Invalid profile provided \"${profile}\" must be configured under cacheLife in next.config or be \"max\"`\n          )\n        }\n      }\n\n      if (cacheLife) {\n        durations = {\n          expire: cacheLife.expire,\n        }\n      }\n    }\n    // If profile is not found and not 'max', durations will be undefined\n    // which will trigger immediate expiration in the cache handler\n\n    for (const handler of handlers || []) {\n      if (profile) {\n        promises.push(handler.updateTags?.(tagsForProfile, durations))\n      } else {\n        promises.push(handler.updateTags?.(tagsForProfile))\n      }\n    }\n\n    if (incrementalCache) {\n      promises.push(incrementalCache.revalidateTag(tagsForProfile, durations))\n    }\n  }\n\n  await Promise.all(promises)\n}\n\nexport function executeRevalidates(\n  workStore: WorkStore,\n  state?: RevalidationState\n): false | Promise<void> {\n  const promises: Promise<unknown>[] = []\n\n  const pendingRevalidatedTags =\n    state?.pendingRevalidatedTags ?? workStore.pendingRevalidatedTags ?? []\n\n  if (pendingRevalidatedTags.length > 0) {\n    promises.push(\n      revalidateTags(\n        pendingRevalidatedTags,\n        workStore.incrementalCache,\n        workStore\n      )\n    )\n  }\n\n  const pendingRevalidates = Object.values(\n    state?.pendingRevalidates ?? workStore.pendingRevalidates ?? {}\n  )\n\n  promises.push(...pendingRevalidates)\n\n  const pendingRevalidateWrites =\n    state?.pendingRevalidateWrites ?? workStore.pendingRevalidateWrites ?? []\n\n  promises.push(...pendingRevalidateWrites)\n\n  if (promises.length === 0) {\n    return false\n  }\n\n  return Promise.all(promises).then(() => undefined)\n}\n","import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport * as ReactJsxDevRuntime from 'react/jsx-dev-runtime'\nimport * as ReactJsxRuntime from 'react/jsx-runtime'\nimport * as ReactCompilerRuntime from 'react/compiler-runtime'\n\nimport * as ReactDOMServer from 'react-dom/server'\n\nfunction getAltProxyForBindingsDEV(\n  type: 'Turbopack' | 'Webpack',\n  pkg: 'react-server-dom-turbopack/client' | 'react-server-dom-webpack/client'\n) {\n  if (process.env.NODE_ENV === 'development') {\n    const altType = type === 'Turbopack' ? 'Webpack' : 'Turbopack'\n    const altPkg = pkg.replace(new RegExp(type, 'gi'), altType.toLowerCase())\n\n    return new Proxy(\n      {},\n      {\n        get(_, prop: string) {\n          throw new Error(\n            `Expected to use ${type} bindings (${pkg}) for React but the current process is referencing '${prop}' from the ${altType} bindings (${altPkg}). This is likely a bug in our integration of the Next.js server runtime.`\n          )\n        },\n      }\n    )\n  }\n}\n\nlet ReactServerDOMTurbopackClient, ReactServerDOMWebpackClient\nif (process.env.TURBOPACK) {\n  ReactServerDOMTurbopackClient =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/client') as typeof import('react-server-dom-turbopack/client')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackClient = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/client'\n    )\n  }\n} else {\n  ReactServerDOMWebpackClient =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackClient = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/client'\n    )\n  }\n}\n\nexport {\n  React,\n  ReactJsxDevRuntime,\n  ReactJsxRuntime,\n  ReactCompilerRuntime,\n  ReactDOM,\n  ReactDOMServer,\n  ReactServerDOMTurbopackClient,\n  ReactServerDOMWebpackClient,\n}\n","export const ENCODED_TAGS = {\n  // opening tags do not have the closing `>` since they can contain other attributes such as `<body className=''>`\n  OPENING: {\n    // <html\n    HTML: new Uint8Array([60, 104, 116, 109, 108]),\n    // <head\n    HEAD: new Uint8Array([60, 104, 101, 97, 100]),\n    // <body\n    BODY: new Uint8Array([60, 98, 111, 100, 121]),\n  },\n  CLOSED: {\n    // </head>\n    HEAD: new Uint8Array([60, 47, 104, 101, 97, 100, 62]),\n    // </body>\n    BODY: new Uint8Array([60, 47, 98, 111, 100, 121, 62]),\n    // </html>\n    HTML: new Uint8Array([60, 47, 104, 116, 109, 108, 62]),\n    // </body></html>\n    BODY_AND_HTML: new Uint8Array([\n      60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62,\n    ]),\n  },\n  META: {\n    // Only the match the prefix cause the suffix can be different wether it's xml compatible or not \">\" or \"/>\"\n    // <meta name=\"«nxt-icon»\"\n    // This is a special mark that will be replaced by the icon insertion script tag.\n    ICON_MARK: new Uint8Array([\n      60, 109, 101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 194, 171, 110, 120,\n      116, 45, 105, 99, 111, 110, 194, 187, 34,\n    ]),\n  },\n} as const\n","import type { ReactDOMServerReadableStream } from 'react-dom/server'\nimport { getTracer } from '../lib/trace/tracer'\nimport { AppRenderSpan } from '../lib/trace/constants'\nimport { DetachedPromise } from '../../lib/detached-promise'\nimport {\n  scheduleImmediate,\n  atLeastOneTask,\n  waitAtLeastOneReactRenderTask,\n} from '../../lib/scheduler'\nimport { ENCODED_TAGS } from './encoded-tags'\nimport {\n  indexOfUint8Array,\n  isEquivalentUint8Arrays,\n  removeFromUint8Array,\n} from './uint8array-helpers'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants'\nimport {\n  RSC_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_RSC_UNION_QUERY,\n} from '../../client/components/app-router-headers'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\nimport type { AnyStream } from '../app-render/stream-ops'\n\nfunction voidCatch() {\n  // this catcher is designed to be used with pipeTo where we expect the underlying\n  // pipe implementation to forward errors but we don't want the pipeTo promise to reject\n  // and be unhandled\n}\n\n// We can share the same encoder instance everywhere\n// Notably we cannot do the same for TextDecoder because it is stateful\n// when handling streaming data\nconst encoder = new TextEncoder()\n\nexport function chainStreams<T>(\n  ...streams: ReadableStream<T>[]\n): ReadableStream<T> {\n  // If we have no streams, return an empty stream. This behavior is\n  // intentional as we're now providing the `RenderResult.EMPTY` value.\n  if (streams.length === 0) {\n    return new ReadableStream<T>({\n      start(controller) {\n        controller.close()\n      },\n    })\n  }\n\n  // If we only have 1 stream we fast path it by returning just this stream\n  if (streams.length === 1) {\n    return streams[0]\n  }\n\n  const { readable, writable } = new TransformStream()\n\n  // We always initiate pipeTo immediately. We know we have at least 2 streams\n  // so we need to avoid closing the writable when this one finishes.\n  let promise = streams[0].pipeTo(writable, { preventClose: true })\n\n  let i = 1\n  for (; i < streams.length - 1; i++) {\n    const nextStream = streams[i]\n    promise = promise.then(() =>\n      nextStream.pipeTo(writable, { preventClose: true })\n    )\n  }\n\n  // We can omit the length check because we halted before the last stream and there\n  // is at least two streams so the lastStream here will always be defined\n  const lastStream = streams[i]\n  promise = promise.then(() => lastStream.pipeTo(writable))\n\n  // Catch any errors from the streams and ignore them, they will be handled\n  // by whatever is consuming the readable stream.\n  promise.catch(voidCatch)\n\n  return readable\n}\n\nexport function streamFromString(str: string): ReadableStream<Uint8Array> {\n  return new ReadableStream({\n    start(controller) {\n      controller.enqueue(encoder.encode(str))\n      controller.close()\n    },\n  })\n}\n\nexport function streamFromBuffer(chunk: Buffer): ReadableStream<Uint8Array> {\n  return new ReadableStream({\n    start(controller) {\n      controller.enqueue(chunk)\n      controller.close()\n    },\n  })\n}\n\nasync function streamToChunks(\n  stream: ReadableStream<Uint8Array>\n): Promise<Array<Uint8Array>> {\n  const reader = stream.getReader()\n  const chunks: Array<Uint8Array> = []\n\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      break\n    }\n\n    chunks.push(value)\n  }\n\n  return chunks\n}\n\nfunction concatUint8Arrays(chunks: Array<Uint8Array>): Uint8Array {\n  const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0)\n  const result = new Uint8Array(totalLength)\n  let offset = 0\n  for (const chunk of chunks) {\n    result.set(chunk, offset)\n    offset += chunk.length\n  }\n  return result\n}\n\nexport async function webstreamToUint8Array(\n  stream: ReadableStream<Uint8Array>\n): Promise<Uint8Array> {\n  return concatUint8Arrays(await streamToChunks(stream))\n}\n\nfunction webToReadable(\n  stream: ReadableStream<Uint8Array> | import('node:stream').Readable\n): import('node:stream').Readable {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new Error('webToReadable cannot be used in the edge runtime')\n  } else {\n    let Readable: typeof import('node:stream').Readable\n    if (process.env.TURBOPACK) {\n      Readable = (require('node:stream') as typeof import('node:stream'))\n        .Readable\n    } else if (\n      process.env.__NEXT_BUNDLER === 'Webpack' ||\n      process.env.__NEXT_BUNDLER === 'Rspack'\n    ) {\n      Readable = (\n        __non_webpack_require__('node:stream') as typeof import('node:stream')\n      ).Readable\n    } else {\n      Readable = (require('node:stream') as typeof import('node:stream'))\n        .Readable\n    }\n    if (stream instanceof Readable) {\n      return stream\n    }\n    return Readable.fromWeb(stream as import('stream/web').ReadableStream)\n  }\n}\n\nexport async function nodestreamToUint8Array(\n  stream: AnyStream\n): Promise<Uint8Array> {\n  const chunks: Buffer[] = []\n  for await (const chunk of webToReadable(stream)) {\n    chunks.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk)\n  }\n  return Buffer.concat(chunks)\n}\n\nexport async function streamToUint8Array(stream: AnyStream) {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    // Edge runtime always uses web streams\n    return webstreamToUint8Array(stream as ReadableStream<Uint8Array>)\n  } else {\n    let Readable: typeof import('node:stream').Readable\n    if (process.env.TURBOPACK) {\n      Readable = (require('node:stream') as typeof import('node:stream'))\n        .Readable\n    } else if (\n      process.env.__NEXT_BUNDLER === 'Webpack' ||\n      process.env.__NEXT_BUNDLER === 'Rspack'\n    ) {\n      Readable = (\n        __non_webpack_require__('node:stream') as typeof import('node:stream')\n      ).Readable\n    } else {\n      Readable = (require('node:stream') as typeof import('node:stream'))\n        .Readable\n    }\n\n    if (stream instanceof Readable) {\n      return nodestreamToUint8Array(stream)\n    }\n\n    return webstreamToUint8Array(stream)\n  }\n}\n\nexport async function streamToBuffer(\n  stream: ReadableStream<Uint8Array>\n): Promise<Buffer> {\n  return Buffer.concat(await streamToChunks(stream))\n}\n\nexport async function streamToString(\n  stream: ReadableStream<Uint8Array>,\n  signal?: AbortSignal\n): Promise<string> {\n  const decoder = new TextDecoder('utf-8', { fatal: true })\n  let string = ''\n\n  for await (const chunk of stream) {\n    if (signal?.aborted) {\n      return string\n    }\n\n    string += decoder.decode(chunk, { stream: true })\n  }\n\n  string += decoder.decode()\n\n  return string\n}\n\nexport type BufferedTransformOptions = {\n  /**\n   * Flush synchronously once the buffer reaches this many bytes.\n   */\n  readonly maxBufferByteLength?: number\n}\n\nexport function createBufferedTransformStream(\n  options: BufferedTransformOptions = {}\n): TransformStream<Uint8Array, Uint8Array> {\n  const { maxBufferByteLength = Infinity } = options\n\n  let bufferedChunks: Array<Uint8Array> = []\n  let bufferByteLength: number = 0\n  let pending: DetachedPromise<void> | undefined\n\n  const flush = (controller: TransformStreamDefaultController) => {\n    try {\n      if (bufferedChunks.length === 0) {\n        return\n      }\n\n      const chunk = new Uint8Array(bufferByteLength)\n      let copiedBytes = 0\n\n      for (let i = 0; i < bufferedChunks.length; i++) {\n        const bufferedChunk = bufferedChunks[i]\n        chunk.set(bufferedChunk, copiedBytes)\n        copiedBytes += bufferedChunk.byteLength\n      }\n      // We just wrote all the buffered chunks so we need to reset the bufferedChunks array\n      // and our bufferByteLength to prepare for the next round of buffered chunks\n      bufferedChunks.length = 0\n      bufferByteLength = 0\n      controller.enqueue(chunk)\n    } catch {\n      // If an error occurs while enqueuing, it can't be due to this\n      // transformer. It's most likely caused by the controller having been\n      // errored (for example, if the stream was cancelled).\n    }\n  }\n\n  const scheduleFlush = (controller: TransformStreamDefaultController) => {\n    if (pending) {\n      return\n    }\n\n    const detached = new DetachedPromise<void>()\n    pending = detached\n\n    scheduleImmediate(() => {\n      try {\n        flush(controller)\n      } finally {\n        pending = undefined\n        detached.resolve()\n      }\n    })\n  }\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      // Combine the previous buffer with the new chunk.\n      bufferedChunks.push(chunk)\n      bufferByteLength += chunk.byteLength\n\n      if (bufferByteLength >= maxBufferByteLength) {\n        flush(controller)\n      } else {\n        scheduleFlush(controller)\n      }\n    },\n    flush() {\n      return pending?.promise\n    },\n  })\n}\n\n// TODO this is currently unused but once we add proper output:export support, it needs to be\n// revisited. See https://github.com/vercel/next.js/pull/89478 for more details\n//\n// function createPrefetchCommentStream(\n//   isBuildTimePrerendering: boolean,\n//   buildId: string\n// ): TransformStream<Uint8Array, Uint8Array> {\n//   // Insert an extra comment at the beginning of the HTML document. This must\n//   // come after the DOCTYPE, which is inserted by React.\n//   //\n//   // The first chunk sent by React will contain the doctype. After that, we can\n//   // pass through the rest of the chunks as-is.\n//   let didTransformFirstChunk = false\n//   return new TransformStream({\n//     transform(chunk, controller) {\n//       if (isBuildTimePrerendering && !didTransformFirstChunk) {\n//         didTransformFirstChunk = true\n//         const decoder = new TextDecoder('utf-8', { fatal: true })\n//         const chunkStr = decoder.decode(chunk, {\n//           stream: true,\n//         })\n//         const updatedChunkStr = insertBuildIdComment(chunkStr, buildId)\n//         controller.enqueue(encoder.encode(updatedChunkStr))\n//         return\n//       }\n//       controller.enqueue(chunk)\n//     },\n//   })\n// }\n\nexport function renderToInitialFizzStream({\n  ReactDOMServer,\n  element,\n  streamOptions,\n}: {\n  ReactDOMServer: {\n    renderToReadableStream: typeof import('react-dom/server').renderToReadableStream\n  }\n  element: React.ReactElement\n  streamOptions?: Parameters<typeof ReactDOMServer.renderToReadableStream>[1]\n}): Promise<ReactDOMServerReadableStream> {\n  return getTracer().trace(AppRenderSpan.renderToReadableStream, async () =>\n    ReactDOMServer.renderToReadableStream(element, streamOptions)\n  )\n}\n\nexport function createMetadataTransformStream(\n  insert: () => Promise<string> | string\n): TransformStream<Uint8Array, Uint8Array> {\n  let chunkIndex = -1\n  let isMarkRemoved = false\n\n  return new TransformStream({\n    async transform(chunk, controller) {\n      let iconMarkIndex = -1\n      let closedHeadIndex = -1\n      chunkIndex++\n\n      if (isMarkRemoved) {\n        controller.enqueue(chunk)\n        return\n      }\n      let iconMarkLength = 0\n      // Only search for the closed head tag once\n      if (iconMarkIndex === -1) {\n        iconMarkIndex = indexOfUint8Array(chunk, ENCODED_TAGS.META.ICON_MARK)\n        if (iconMarkIndex === -1) {\n          controller.enqueue(chunk)\n          return\n        } else {\n          // When we found the `<meta name=\"«nxt-icon»\"` tag prefix, we will remove it from the chunk.\n          // Its close tag could either be `/>` or `>`, checking the next char to ensure we cover both cases.\n          iconMarkLength = ENCODED_TAGS.META.ICON_MARK.length\n          // Check if next char is /, this is for xml mode.\n          if (chunk[iconMarkIndex + iconMarkLength] === 47) {\n            iconMarkLength += 2\n          } else {\n            // The last char is `>`\n            iconMarkLength++\n          }\n        }\n      }\n\n      // Check if icon mark is inside <head> tag in the first chunk.\n      if (chunkIndex === 0) {\n        closedHeadIndex = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n        if (iconMarkIndex !== -1) {\n          // The mark icon is located in the 1st chunk before the head tag.\n          // We do not need to insert the script tag in this case because it's in the head.\n          // Just remove the icon mark from the chunk.\n          if (iconMarkIndex < closedHeadIndex) {\n            const replaced = new Uint8Array(chunk.length - iconMarkLength)\n\n            // Remove the icon mark from the chunk.\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex\n            )\n            chunk = replaced\n          } else {\n            // The icon mark is after the head tag, replace and insert the script tag at that position.\n            const insertion = await insert()\n            const encodedInsertion = encoder.encode(insertion)\n            const insertionLength = encodedInsertion.length\n            const replaced = new Uint8Array(\n              chunk.length - iconMarkLength + insertionLength\n            )\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(encodedInsertion, iconMarkIndex)\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex + insertionLength\n            )\n            chunk = replaced\n          }\n          isMarkRemoved = true\n        }\n        // If there's no icon mark located, it will be handled later when if present in the following chunks.\n      } else {\n        // When it's appeared in the following chunks, we'll need to\n        // remove the mark and then insert the script tag at that position.\n        const insertion = await insert()\n        const encodedInsertion = encoder.encode(insertion)\n        const insertionLength = encodedInsertion.length\n        // Replace the icon mark with the hoist script or empty string.\n        const replaced = new Uint8Array(\n          chunk.length - iconMarkLength + insertionLength\n        )\n        // Set the first part of the chunk, before the icon mark.\n        replaced.set(chunk.subarray(0, iconMarkIndex))\n        // Set the insertion after the icon mark.\n        replaced.set(encodedInsertion, iconMarkIndex)\n\n        // Set the rest of the chunk after the icon mark.\n        replaced.set(\n          chunk.subarray(iconMarkIndex + iconMarkLength),\n          iconMarkIndex + insertionLength\n        )\n        chunk = replaced\n        isMarkRemoved = true\n      }\n      controller.enqueue(chunk)\n    },\n  })\n}\n\nexport function createHeadInsertionTransformStream(\n  insert: () => Promise<string>\n): TransformStream<Uint8Array, Uint8Array> {\n  let inserted = false\n\n  // We need to track if this transform saw any bytes because if it didn't\n  // we won't want to insert any server HTML at all\n  let hasBytes = false\n\n  return new TransformStream({\n    async transform(chunk, controller) {\n      hasBytes = true\n\n      const insertion = await insert()\n      if (inserted) {\n        if (insertion) {\n          const encodedInsertion = encoder.encode(insertion)\n          controller.enqueue(encodedInsertion)\n        }\n        controller.enqueue(chunk)\n      } else {\n        // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n        const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n        // In fully static rendering or non PPR rendering cases:\n        // `/head>` will always be found in the chunk in first chunk rendering.\n        if (index !== -1) {\n          if (insertion) {\n            const encodedInsertion = encoder.encode(insertion)\n            // Get the total count of the bytes in the chunk and the insertion\n            // e.g.\n            // chunk = <head><meta charset=\"utf-8\"></head>\n            // insertion = <script>...</script>\n            // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n            const insertedHeadContent = new Uint8Array(\n              chunk.length + encodedInsertion.length\n            )\n            // Append the first part of the chunk, before the head tag\n            insertedHeadContent.set(chunk.slice(0, index))\n            // Append the server inserted content\n            insertedHeadContent.set(encodedInsertion, index)\n            // Append the rest of the chunk\n            insertedHeadContent.set(\n              chunk.slice(index),\n              index + encodedInsertion.length\n            )\n            controller.enqueue(insertedHeadContent)\n          } else {\n            controller.enqueue(chunk)\n          }\n          inserted = true\n        } else {\n          // This will happens in PPR rendering during next start, when the page is partially rendered.\n          // When the page resumes, the head tag will be found in the middle of the chunk.\n          // Where we just need to append the insertion and chunk to the current stream.\n          // e.g.\n          // PPR-static: <head>...</head><body> [ resume content ] </body>\n          // PPR-resume: [ insertion ] [ rest content ]\n          if (insertion) {\n            controller.enqueue(encoder.encode(insertion))\n          }\n          controller.enqueue(chunk)\n          inserted = true\n        }\n      }\n    },\n    async flush(controller) {\n      // Check before closing if there's anything remaining to insert.\n      if (hasBytes) {\n        const insertion = await insert()\n        if (insertion) {\n          controller.enqueue(encoder.encode(insertion))\n        }\n      }\n    },\n  })\n}\n\nasync function createClientResumeScriptInsertionTransformStream(): Promise<\n  TransformStream<Uint8Array, Uint8Array>\n> {\n  const segmentPath = '/_full'\n  const cacheBustingHeader = await computeCacheBustingSearchParam(\n    '1', //            headers[NEXT_ROUTER_PREFETCH_HEADER]\n    '/_full', //       headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]\n    undefined, //      headers[NEXT_ROUTER_STATE_TREE_HEADER]\n    undefined //       headers[NEXT_URL]\n  )\n  const searchStr = `${NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`\n  const NEXT_CLIENT_RESUME_SCRIPT = `<script>__NEXT_CLIENT_RESUME=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${RSC_HEADER}': '1','${NEXT_ROUTER_PREFETCH_HEADER}': '1','${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}': '${segmentPath}'}})</script>`\n\n  let didAlreadyInsert = false\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (didAlreadyInsert) {\n        // Already inserted the script into the head. Pass through.\n        controller.enqueue(chunk)\n        return\n      }\n      // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n      const headClosingTagIndex = indexOfUint8Array(\n        chunk,\n        ENCODED_TAGS.CLOSED.HEAD\n      )\n\n      if (headClosingTagIndex === -1) {\n        // In fully static rendering or non PPR rendering cases:\n        // `/head>` will always be found in the chunk in first chunk rendering.\n        controller.enqueue(chunk)\n        return\n      }\n\n      const encodedInsertion = encoder.encode(NEXT_CLIENT_RESUME_SCRIPT)\n      // Get the total count of the bytes in the chunk and the insertion\n      // e.g.\n      // chunk = <head><meta charset=\"utf-8\"></head>\n      // insertion = <script>...</script>\n      // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n      const insertedHeadContent = new Uint8Array(\n        chunk.length + encodedInsertion.length\n      )\n      // Append the first part of the chunk, before the head tag\n      insertedHeadContent.set(chunk.slice(0, headClosingTagIndex))\n      // Append the server inserted content\n      insertedHeadContent.set(encodedInsertion, headClosingTagIndex)\n      // Append the rest of the chunk\n      insertedHeadContent.set(\n        chunk.slice(headClosingTagIndex),\n        headClosingTagIndex + encodedInsertion.length\n      )\n\n      controller.enqueue(insertedHeadContent)\n      didAlreadyInsert = true\n    },\n  })\n}\n\n// Suffix after main body content - scripts before </body>,\n// but wait for the major chunks to be enqueued.\nexport function createDeferredSuffixStream(\n  suffix: string\n): TransformStream<Uint8Array, Uint8Array> {\n  let flushed = false\n  let pending: DetachedPromise<void> | undefined\n\n  const flush = (controller: TransformStreamDefaultController) => {\n    const detached = new DetachedPromise<void>()\n    pending = detached\n\n    scheduleImmediate(() => {\n      try {\n        controller.enqueue(encoder.encode(suffix))\n      } catch {\n        // If an error occurs while enqueuing it can't be due to this\n        // transformers fault. It's likely due to the controller being\n        // errored due to the stream being cancelled.\n      } finally {\n        pending = undefined\n        detached.resolve()\n      }\n    })\n  }\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      controller.enqueue(chunk)\n\n      // If we've already flushed, we're done.\n      if (flushed) return\n\n      // Schedule the flush to happen.\n      flushed = true\n      flush(controller)\n    },\n    flush(controller) {\n      if (pending) return pending.promise\n      if (flushed) return\n\n      // Flush now.\n      controller.enqueue(encoder.encode(suffix))\n    },\n  })\n}\n\nexport function createFlightDataInjectionTransformStream(\n  stream: ReadableStream<Uint8Array>,\n  delayDataUntilFirstHtmlChunk: boolean\n): TransformStream<Uint8Array, Uint8Array> {\n  let htmlStreamFinished = false\n\n  let pull: Promise<void> | null = null\n  let donePulling = false\n\n  function startOrContinuePulling(\n    controller: TransformStreamDefaultController\n  ) {\n    if (!pull) {\n      pull = startPulling(controller)\n    }\n    return pull\n  }\n\n  async function startPulling(controller: TransformStreamDefaultController) {\n    const reader = stream.getReader()\n\n    if (delayDataUntilFirstHtmlChunk) {\n      // NOTE: streaming flush\n      // We are buffering here for the inlined data stream because the\n      // \"shell\" stream might be chunkenized again by the underlying stream\n      // implementation, e.g. with a specific high-water mark. To ensure it's\n      // the safe timing to pipe the data stream, this extra tick is\n      // necessary.\n\n      // We don't start reading until we've left the current Task to ensure\n      // that it's inserted after flushing the shell. Note that this implementation\n      // might get stale if impl details of Fizz change in the future.\n      await atLeastOneTask()\n    }\n\n    try {\n      while (true) {\n        const { done, value } = await reader.read()\n        if (done) {\n          donePulling = true\n          return\n        }\n\n        // We want to prioritize HTML over RSC data.\n        // The SSR render is based on the same RSC stream, so when we get a new RSC chunk,\n        // we're likely to produce an HTML chunk as well, so give it a chance to flush first.\n        if (!delayDataUntilFirstHtmlChunk && !htmlStreamFinished) {\n          await atLeastOneTask()\n        }\n        controller.enqueue(value)\n      }\n    } catch (err) {\n      controller.error(err)\n    }\n  }\n\n  return new TransformStream({\n    start(controller) {\n      if (!delayDataUntilFirstHtmlChunk) {\n        startOrContinuePulling(controller)\n      }\n    },\n    transform(chunk, controller) {\n      controller.enqueue(chunk)\n\n      // Start the streaming if it hasn't already been started yet.\n      if (delayDataUntilFirstHtmlChunk) {\n        startOrContinuePulling(controller)\n      }\n    },\n    flush(controller) {\n      htmlStreamFinished = true\n      if (donePulling) {\n        return\n      }\n      return startOrContinuePulling(controller)\n    },\n  })\n}\n\nexport const CLOSE_TAG = '</body></html>'\n\n/**\n * This transform stream moves the suffix to the end of the stream, so results\n * like `</body></html><script>...</script>` will be transformed to\n * `<script>...</script></body></html>`.\n */\nexport function createMoveSuffixStream(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  let foundSuffix = false\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (foundSuffix) {\n        return controller.enqueue(chunk)\n      }\n\n      const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n      if (index > -1) {\n        foundSuffix = true\n\n        // If the whole chunk is the suffix, then don't write anything, it will\n        // be written in the flush.\n        if (chunk.length === ENCODED_TAGS.CLOSED.BODY_AND_HTML.length) {\n          return\n        }\n\n        // Write out the part before the suffix.\n        const before = chunk.slice(0, index)\n        controller.enqueue(before)\n\n        // In the case where the suffix is in the middle of the chunk, we need\n        // to split the chunk into two parts.\n        if (chunk.length > ENCODED_TAGS.CLOSED.BODY_AND_HTML.length + index) {\n          // Write out the part after the suffix.\n          const after = chunk.slice(\n            index + ENCODED_TAGS.CLOSED.BODY_AND_HTML.length\n          )\n          controller.enqueue(after)\n        }\n      } else {\n        controller.enqueue(chunk)\n      }\n    },\n    flush(controller) {\n      // Even if we didn't find the suffix, the HTML is not valid if we don't\n      // add it, so insert it at the end.\n      controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n    },\n  })\n}\n\nfunction createStripDocumentClosingTagsTransform(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  return new TransformStream({\n    transform(chunk, controller) {\n      // We rely on the assumption that chunks will never break across a code unit.\n      // This is reasonable because we currently concat all of React's output from a single\n      // flush into one chunk before streaming it forward which means the chunk will represent\n      // a single coherent utf-8 string. This is not safe to use if we change our streaming to no\n      // longer do this large buffered chunk\n      if (\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML) ||\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) ||\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)\n      ) {\n        // the entire chunk is the closing tags; return without enqueueing anything.\n        return\n      }\n\n      // We assume these tags will go at together at the end of the document and that\n      // they won't appear anywhere else in the document. This is not really a safe assumption\n      // but until we revamp our streaming infra this is a performant way to string the tags\n      chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)\n      chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)\n\n      controller.enqueue(chunk)\n    },\n  })\n}\n\nexport function createHtmlDataDplIdTransformStream(\n  dplId: string\n): TransformStream<Uint8Array, Uint8Array> {\n  let didTransform = false\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (didTransform) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      const htmlTagIndex = indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML)\n      if (htmlTagIndex === -1) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      // Insert the data-dpl-id attribute right after \"<html \"\n      const insertionPoint = htmlTagIndex + ENCODED_TAGS.OPENING.HTML.length\n      const attribute = ` data-dpl-id=\"${dplId}\"`\n      const encodedAttribute = encoder.encode(attribute)\n      const modifiedChunk = new Uint8Array(\n        chunk.length + encodedAttribute.length\n      )\n\n      // Copy everything before the insertion point\n      modifiedChunk.set(chunk.subarray(0, insertionPoint))\n      // Insert the attribute\n      modifiedChunk.set(encodedAttribute, insertionPoint)\n      // Copy everything after\n      modifiedChunk.set(\n        chunk.subarray(insertionPoint),\n        insertionPoint + encodedAttribute.length\n      )\n\n      controller.enqueue(modifiedChunk)\n      didTransform = true\n    },\n  })\n}\n\n/*\n * Checks if the root layout is missing the html or body tags\n * and if so, it will inject a script tag to throw an error in the browser, showing the user\n * the error message in the error overlay.\n */\nexport function createRootLayoutValidatorStream(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  let foundHtml = false\n  let foundBody = false\n  return new TransformStream({\n    async transform(chunk, controller) {\n      // Peek into the streamed chunk to see if the tags are present.\n      if (\n        !foundHtml &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML) > -1\n      ) {\n        foundHtml = true\n      }\n\n      if (\n        !foundBody &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.BODY) > -1\n      ) {\n        foundBody = true\n      }\n\n      controller.enqueue(chunk)\n    },\n    flush(controller) {\n      const missingTags: ('html' | 'body')[] = []\n      if (!foundHtml) missingTags.push('html')\n      if (!foundBody) missingTags.push('body')\n\n      if (!missingTags.length) return\n\n      controller.enqueue(\n        encoder.encode(\n          `<html id=\"__next_error__\">\n            <template\n              data-next-error-message=\"Missing ${missingTags\n                .map((c) => `<${c}>`)\n                .join(\n                  missingTags.length > 1 ? ' and ' : ''\n                )} tags in the root layout.\\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags\"\n              data-next-error-digest=\"${MISSING_ROOT_TAGS_ERROR}\"\n              data-next-error-stack=\"\"\n            ></template>\n          `\n        )\n      )\n    },\n  })\n}\n\nexport function chainTransformers<T>(\n  readable: ReadableStream<T>,\n  transformers: ReadonlyArray<TransformStream<T, T> | null>\n): ReadableStream<T> {\n  let stream = readable\n  for (const transformer of transformers) {\n    if (!transformer) continue\n\n    stream = stream.pipeThrough(transformer)\n  }\n  return stream\n}\n\nexport type ContinueStreamOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array> | undefined\n  isStaticGeneration: boolean\n  deploymentId: string | undefined\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  validateRootLayout?: boolean\n  /**\n   * Suffix to inject after the buffered data, but before the close tags.\n   */\n  suffix?: string | undefined\n}\n\nexport async function continueFizzStream(\n  renderStream: ReactDOMServerReadableStream,\n  {\n    suffix,\n    inlinedDataStream,\n    isStaticGeneration,\n    deploymentId,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    validateRootLayout,\n  }: ContinueStreamOptions\n): Promise<ReadableStream<Uint8Array>> {\n  // Suffix itself might contain close tags at the end, so we need to split it.\n  const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null\n\n  if (isStaticGeneration) {\n    // If we're generating static HTML we need to wait for it to resolve before continuing.\n    await renderStream.allReady\n  } else {\n    // Otherwise, we want to make sure Fizz is done with all microtasky work\n    // before we start pulling the stream and cause a flush.\n    await waitAtLeastOneReactRenderTask()\n  }\n\n  return chainTransformers(renderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n\n    // Insert suffix content\n    suffixUnclosed != null && suffixUnclosed.length > 0\n      ? createDeferredSuffixStream(suffixUnclosed)\n      : null,\n\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    inlinedDataStream\n      ? createFlightDataInjectionTransformStream(inlinedDataStream, true)\n      : null,\n\n    // Validate the root layout for missing html or body tags\n    validateRootLayout ? createRootLayoutValidatorStream() : null,\n\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n\n    // Special head insertions\n    // TODO-APP: Insert server side html to end of head in app layout rendering, to avoid\n    // hydration errors. Remove this once it's ready to be handled by react itself.\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n  ])\n}\n\ntype ContinueDynamicPrerenderOptions = {\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  deploymentId: string | undefined\n}\n\nexport async function continueDynamicPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueDynamicPrerenderOptions\n) {\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    createStripDocumentClosingTagsTransform(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n  ])\n}\n\ntype ContinueStaticPrerenderOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array>\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  deploymentId: string | undefined\n}\n\nexport async function continueStaticPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueStaticPrerenderOptions\n) {\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Add build id comment to start of the HTML document (in export mode)\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(inlinedDataStream, true),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\nexport async function continueStaticFallbackPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueStaticPrerenderOptions\n) {\n  // Same as `continueStaticPrerender`, but also inserts an additional script\n  // to instruct the client to start fetching the hydration data as early\n  // as possible.\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Insert the client resume script into the head\n    await createClientResumeScriptInsertionTransformStream(),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(inlinedDataStream, true),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\ntype ContinueResumeOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array>\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  delayDataUntilFirstHtmlChunk: boolean\n  deploymentId: string | undefined\n}\n\nexport async function continueDynamicHTMLResume(\n  renderStream: ReadableStream<Uint8Array>,\n  {\n    delayDataUntilFirstHtmlChunk,\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueResumeOptions\n) {\n  return chainTransformers(renderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(\n      inlinedDataStream,\n      delayDataUntilFirstHtmlChunk\n    ),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\nexport function createDocumentClosingStream(): ReadableStream<Uint8Array> {\n  return streamFromString(CLOSE_TAG)\n}\n\n// ---------------------------------------------------------------------------\n// Runtime prefetch transform (Web streams)\n// ---------------------------------------------------------------------------\n\n/**\n * Web TransformStream that replaces the runtime prefetch sentinel in an RSC\n * payload stream: `[<sentinel>]` -> `[<isPartial>,<staleTime>]`.\n *\n * This is the web equivalent of createRuntimePrefetchNodeTransform\n * in node-stream-helpers.ts.\n */\nexport function createRuntimePrefetchTransformStream(\n  sentinel: number,\n  isPartial: boolean,\n  staleTime: number\n): TransformStream<Uint8Array, Uint8Array> {\n  const enc = new TextEncoder()\n\n  // Search for: [<sentinel>]\n  // Replace with: [<isPartial>,<staleTime>]\n  const search = enc.encode(`[${sentinel}]`)\n  const first = search[0]\n  const replace = enc.encode(`[${isPartial},${staleTime}]`)\n  const searchLen = search.length\n\n  let currentChunk: Uint8Array | null = null\n  let found = false\n\n  function processChunk(\n    controller: TransformStreamDefaultController<Uint8Array>,\n    nextChunk: null | Uint8Array\n  ) {\n    if (found) {\n      if (nextChunk) {\n        controller.enqueue(nextChunk)\n      }\n      return\n    }\n\n    if (currentChunk) {\n      // We can't search past the index that can contain a full match\n      let exclusiveUpperBound = currentChunk.length - (searchLen - 1)\n      if (nextChunk) {\n        // If we have any overflow bytes we can search up to the chunk's final byte\n        exclusiveUpperBound += Math.min(nextChunk.length, searchLen - 1)\n      }\n      if (exclusiveUpperBound < 1) {\n        // we can't match the current chunk.\n        controller.enqueue(currentChunk)\n        currentChunk = nextChunk // advance so we don't process this chunk again\n        return\n      }\n\n      let currentIndex = currentChunk.indexOf(first)\n\n      // check the current candidate match if it is within the bounds of our search space for the currentChunk\n      candidateLoop: while (\n        -1 < currentIndex &&\n        currentIndex < exclusiveUpperBound\n      ) {\n        // We already know index 0 matches because we used indexOf to find the candidateIndex so we start at index 1\n        let matchIndex = 1\n        while (matchIndex < searchLen) {\n          const candidateIndex = currentIndex + matchIndex\n          const candidateValue =\n            candidateIndex < currentChunk.length\n              ? currentChunk[candidateIndex]\n              : // if we ever hit this condition it is because there is a nextChunk we can read from\n                nextChunk![candidateIndex - currentChunk.length]\n          if (candidateValue !== search[matchIndex]) {\n            // No match, reset and continue the search from the next position\n            currentIndex = currentChunk.indexOf(first, currentIndex + 1)\n            continue candidateLoop\n          }\n          matchIndex++\n        }\n        // We found a complete match. currentIndex is our starting point to replace the value.\n        found = true\n        // enqueue everything up to the match\n        controller.enqueue(currentChunk.subarray(0, currentIndex))\n        // enqueue the replacement value\n        controller.enqueue(replace)\n        // If there are bytes in the currentChunk after the match enqueue them\n        if (currentIndex + searchLen < currentChunk.length) {\n          controller.enqueue(currentChunk.slice(currentIndex + searchLen))\n        }\n        // If we have a next chunk we enqueue it now\n        if (nextChunk) {\n          // if replacement spills over to the next chunk we first exclude the replaced bytes\n          const overflowBytes = currentIndex + searchLen - currentChunk.length\n          const truncatedChunk =\n            overflowBytes > 0 ? nextChunk!.subarray(overflowBytes) : nextChunk\n          controller.enqueue(truncatedChunk)\n        }\n        // We are now in found mode and don't need to track currentChunk anymore\n        currentChunk = null\n        return\n      }\n      // No match found in this chunk, emit it and wait for the next one\n      controller.enqueue(currentChunk)\n    }\n\n    // Advance to the next chunk\n    currentChunk = nextChunk\n  }\n\n  return new TransformStream<Uint8Array, Uint8Array>({\n    transform(chunk, controller) {\n      processChunk(controller, chunk)\n    },\n    flush(controller) {\n      processChunk(controller, null)\n    },\n  })\n}\n","/**\n * Find the starting index of Uint8Array `b` within Uint8Array `a`.\n */\nexport function indexOfUint8Array(a: Uint8Array, b: Uint8Array) {\n  if (b.length === 0) return 0\n  if (a.length === 0 || b.length > a.length) return -1\n\n  // Use Node's native implementation when available.\n  if (typeof Buffer !== 'undefined') {\n    const haystack = Buffer.isBuffer(a)\n      ? a\n      : Buffer.from(a.buffer, a.byteOffset, a.byteLength)\n    return haystack.indexOf(b)\n  }\n\n  // start iterating through `a`\n  for (let i = 0; i <= a.length - b.length; i++) {\n    let completeMatch = true\n    // from index `i`, iterate through `b` and check for mismatch\n    for (let j = 0; j < b.length; j++) {\n      // if the values do not match, then this isn't a complete match, exit `b` iteration early and iterate to next index of `a`.\n      if (a[i + j] !== b[j]) {\n        completeMatch = false\n        break\n      }\n    }\n\n    if (completeMatch) {\n      return i\n    }\n  }\n\n  return -1\n}\n\n/**\n * Check if two Uint8Arrays are strictly equivalent.\n */\nexport function isEquivalentUint8Arrays(a: Uint8Array, b: Uint8Array) {\n  if (a.length !== b.length) return false\n\n  for (let i = 0; i < a.length; i++) {\n    if (a[i] !== b[i]) return false\n  }\n\n  return true\n}\n\n/**\n * Remove Uint8Array `b` from Uint8Array `a`.\n *\n * If `b` is not in `a`, `a` is returned unchanged.\n *\n * Otherwise, the function returns a new Uint8Array instance with size `a.length - b.length`\n */\nexport function removeFromUint8Array(a: Uint8Array, b: Uint8Array) {\n  const tagIndex = indexOfUint8Array(a, b)\n  if (tagIndex === 0) return a.subarray(b.length)\n  if (tagIndex > -1) {\n    const removed = new Uint8Array(a.length - b.length)\n    removed.set(a.subarray(0, tagIndex))\n    removed.set(a.subarray(tagIndex + b.length), tagIndex)\n    return removed\n  } else {\n    return a\n  }\n}\n","import type { CacheEntry } from '../lib/cache-handlers/types'\n\n/**\n * Tees a cache entry's single-use value stream into two independent entries.\n * The original entry is mutated to hold one branch of the tee, and a clone is\n * returned holding the other, so both can be consumed independently.\n */\nexport function cloneCacheEntry(entry: CacheEntry): [CacheEntry, CacheEntry] {\n  const [streamA, streamB] = entry.value.tee()\n  entry.value = streamA\n  const clonedEntry: CacheEntry = {\n    value: streamB,\n    timestamp: entry.timestamp,\n    revalidate: entry.revalidate,\n    expire: entry.expire,\n    stale: entry.stale,\n    tags: entry.tags,\n  }\n  return [entry, clonedEntry]\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\n\nexport const MIN_PRERENDERABLE_EXPIRE = 300 // 5 minutes\nexport const MIN_PREFETCHABLE_STALE = 30 // 30 seconds\nexport const MIN_SHELL_STALE = 300 // 5 minutes\n\nif (process.env.NODE_ENV !== 'production') {\n  if (MIN_PREFETCHABLE_STALE > MIN_SHELL_STALE) {\n    throw new InvariantError(\n      'MIN_PREFETCHABLE_STALE must not exceed MIN_SHELL_STALE.'\n    )\n  }\n}\n","import { createDefaultCacheHandler } from '../lib/cache-handlers/default'\nimport type { CacheHandler } from '../lib/cache-handlers/types'\nimport {\n  createTieredCacheHandler,\n  type CacheReadWriteHandler,\n} from './tiered-cache-handler'\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n  ? (message: string, ...args: any[]) => {\n      console.log(`use-cache: ${message}`, ...args)\n    }\n  : undefined\n\nconst handlersSymbol = Symbol.for('@next/cache-handlers')\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map')\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set')\nconst privateHandlerSymbol = Symbol.for('@next/cache-handlers-private')\nconst builtInHandlersSymbol = Symbol.for('@next/cache-handlers-built-in')\nconst devFrontHandlersSymbol = Symbol.for('@next/cache-handlers-dev-fronts')\nconst devTieredHandlersSymbol = Symbol.for('@next/cache-handlers-dev-tiered')\nconst memoryCacheDisabledSymbol = Symbol.for(\n  '@next/cache-handlers-memory-disabled'\n)\n\n/**\n * The in-memory size used for the dev-only built-in handlers (the private\n * handler, the size-0 replacement, and the per-kind front handlers for custom\n * kinds). Mirrors the framework default so `cacheMaxMemorySize: 0` does not\n * disable caching in development.\n */\nconst DEV_MEMORY_CACHE_SIZE = 50 * 1024 * 1024\n\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */\nconst reference: typeof globalThis & {\n  [handlersSymbol]?: {\n    RemoteCache?: CacheHandler\n    DefaultCache?: CacheHandler\n  }\n  [handlersMapSymbol]?: Map<string, CacheHandler>\n  [handlersSetSymbol]?: Set<CacheHandler>\n  [builtInHandlersSymbol]?: Set<CacheHandler>\n  // DEV-only\n  [privateHandlerSymbol]?: CacheHandler\n  [devFrontHandlersSymbol]?: Map<string, CacheHandler>\n  [devTieredHandlersSymbol]?: Map<string, CacheReadWriteHandler>\n  [memoryCacheDisabledSymbol]?: boolean\n} = globalThis\n\n/**\n * Initialize the cache handlers.\n * @param cacheMaxMemorySize - The maximum memory size of the cache in bytes, if\n *  not provided, the default memory size will be used.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */\nexport function initializeCacheHandlers(cacheMaxMemorySize: number): boolean {\n  // If the cache handlers have already been initialized, don't do it again.\n  if (reference[handlersMapSymbol]) {\n    debug?.('cache handlers already initialized')\n    return false\n  }\n\n  debug?.('initializing cache handlers')\n  const handlersMap = new Map<string, CacheHandler>()\n  reference[handlersMapSymbol] = handlersMap\n  const builtInHandlers = new Set<CacheHandler>()\n  reference[builtInHandlersSymbol] = builtInHandlers\n\n  // In development, `cacheMaxMemorySize: 0` would make the built-in default\n  // handler a no-op, so every reload would miss. Use a real in-memory size\n  // instead so dev stays fast; the \"use cache\" wrapper forces a dynamic cache\n  // life for this case so it still behaves close to \"no cache\" (serve stale,\n  // regenerate in the background). Production keeps the no-op handler.\n  const builtInSize =\n    process.env.__NEXT_DEV_SERVER && cacheMaxMemorySize === 0\n      ? DEV_MEMORY_CACHE_SIZE\n      : cacheMaxMemorySize\n\n  // Initialize the cache from the symbol contents first.\n  if (reference[handlersSymbol]) {\n    let fallback: CacheHandler\n    if (reference[handlersSymbol].DefaultCache) {\n      debug?.('setting \"default\" cache handler from symbol')\n      fallback = reference[handlersSymbol].DefaultCache\n    } else {\n      debug?.('setting \"default\" cache handler from default')\n      fallback = createDefaultCacheHandler(builtInSize)\n      builtInHandlers.add(fallback)\n    }\n\n    handlersMap.set('default', fallback)\n\n    if (reference[handlersSymbol].RemoteCache) {\n      debug?.('setting \"remote\" cache handler from symbol')\n      handlersMap.set('remote', reference[handlersSymbol].RemoteCache)\n    } else {\n      debug?.('setting \"remote\" cache handler from default')\n      handlersMap.set('remote', fallback)\n    }\n  } else {\n    const handler = createDefaultCacheHandler(builtInSize)\n    builtInHandlers.add(handler)\n\n    debug?.('setting \"default\" cache handler from default')\n    handlersMap.set('default', handler)\n    debug?.('setting \"remote\" cache handler from default')\n    handlersMap.set('remote', handler)\n  }\n\n  // Create a set of the cache handlers.\n  reference[handlersSetSymbol] = new Set(handlersMap.values())\n\n  // In development we add dedicated built-in in-memory handlers so that reloads\n  // are fast. These are always built-in handlers, never a user-configured one,\n  // and are gated on the dev server so production behaves exactly as\n  // configured.\n  if (process.env.__NEXT_DEV_SERVER) {\n    reference[memoryCacheDisabledSymbol] = cacheMaxMemorySize === 0\n\n    // Private caches are persisted here so reloads are fast. Private entries\n    // can hold data specific to the incoming request (for example, derived from\n    // its cookies or headers), so this is never the user-configured `default`\n    // alias. Sized so it still caches under `cacheMaxMemorySize: 0` (otherwise\n    // it would become the no-op stub and private reloads would miss).\n    reference[privateHandlerSymbol] = createDefaultCacheHandler(\n      DEV_MEMORY_CACHE_SIZE\n    )\n\n    // Built-in front handlers, one per custom kind, and the tiered handlers\n    // that place a front in front of a (possibly slow or remote) backing\n    // handler so cache hits resolve in a microtask, are both created per kind\n    // in `setCacheHandler`.\n    reference[devFrontHandlersSymbol] = new Map()\n    reference[devTieredHandlersSymbol] = new Map()\n  }\n\n  return true\n}\n\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandler(kind: string): CacheHandler | undefined {\n  // This should never be called before initializeCacheHandlers.\n  if (!reference[handlersMapSymbol]) {\n    throw new Error('Cache handlers not initialized')\n  }\n\n  return reference[handlersMapSymbol].get(kind)\n}\n\n/**\n * Get the dedicated in-memory cache handler that persists private caches in\n * development. Returns `undefined` outside the dev server, where private caches\n * must not be persisted. This is intentionally not part of the kind-keyed\n * handlers map so that it can never be replaced by a user-configured handler.\n */\nexport function getPrivateCacheHandler(): CacheHandler | undefined {\n  // This should never be called before initializeCacheHandlers.\n  if (!reference[handlersMapSymbol]) {\n    throw new Error('Cache handlers not initialized')\n  }\n\n  return reference[privateHandlerSymbol]\n}\n\n/**\n * Whether the in-memory cache is disabled (`cacheMaxMemorySize: 0`). Dev-only\n * signal used to force a dynamic cache life so that the size-0 case still\n * serves stale and regenerates in the background. Always `false` in production.\n */\nexport function isMemoryCacheDisabled(): boolean {\n  return reference[memoryCacheDisabledSymbol] ?? false\n}\n\n/**\n * Whether `kind` is backed by a real user-configured handler rather than the\n * built-in in-memory default. Such a handler may be slow or remote, so in\n * development a built-in front handler is placed in front of it (see\n * `getDevTieredCacheHandler`) to keep cache hits microtask-fast. The presence\n * of a dev front handler is the signal, since front handlers are created\n * exactly for user-registered kinds. Always `false` in production.\n */\nexport function isCustomCacheHandler(kind: string): boolean {\n  if (!process.env.__NEXT_DEV_SERVER) {\n    return false\n  }\n\n  return reference[devFrontHandlersSymbol]?.has(kind) ?? false\n}\n\n/**\n * Whether `kind` resolves to one of the in-memory handlers that\n * `initializeCacheHandlers` constructs itself, rather than one supplied by the\n * platform through the `@next/cache-handlers` global or by `cacheHandlers`\n * config. Reads from a built-in handler are map lookups, so repeating one\n * within a request costs nothing; reads from a supplied handler may be a\n * network round trip. Unlike `isCustomCacheHandler`, this holds in production.\n *\n * Tracking the instances rather than the kinds is what keeps aliasing correct:\n * self-hosted, `remote` resolves to the same handler as `default` and so\n * reports as built-in, while a platform-supplied `remote` does not.\n */\nexport function isBuiltInCacheHandler(kind: string): boolean {\n  const handler = reference[handlersMapSymbol]?.get(kind)\n\n  return (\n    handler !== undefined &&\n    Boolean(reference[builtInHandlersSymbol]?.has(handler))\n  )\n}\n\n/**\n * Get the dev-only tiered cache handler for a custom `kind`: a fast built-in\n * in-memory front handler in front of the user-configured backing handler, so\n * cache hits resolve in a microtask. Returns `undefined` if there is none (a\n * built-in kind, or production).\n */\nexport function getDevTieredCacheHandler(\n  kind: string\n): CacheReadWriteHandler | undefined {\n  if (!process.env.__NEXT_DEV_SERVER) {\n    return undefined\n  }\n\n  return reference[devTieredHandlersSymbol]?.get(kind)\n}\n\n/**\n * Get an iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */\nexport function getCacheHandlers(): IterableIterator<CacheHandler> | undefined {\n  const handlersSet = reference[handlersSetSymbol]\n  if (!handlersSet) {\n    return undefined\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    return iterateCacheHandlersWithDevBuiltIns(handlersSet)\n  }\n\n  return handlersSet.values()\n}\n\n/**\n * Yields the registered handlers plus the dev-only built-in handlers (the\n * private handler and the per-kind front handlers). The built-in handlers are\n * not part of the registered set, but tag operations must still reach them:\n * their `updateTags` writes the shared tags manifest that their `get` consults,\n * so `revalidateTag` can invalidate their entries.\n */\nfunction* iterateCacheHandlersWithDevBuiltIns(\n  handlersSet: Set<CacheHandler>\n): IterableIterator<CacheHandler> {\n  yield* handlersSet\n\n  const privateHandler = reference[privateHandlerSymbol]\n  if (privateHandler) {\n    yield privateHandler\n  }\n\n  const devFrontHandlers = reference[devFrontHandlersSymbol]\n  if (devFrontHandlers) {\n    yield* devFrontHandlers.values()\n  }\n}\n\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandlerEntries():\n  | IterableIterator<[string, CacheHandler]>\n  | undefined {\n  const handlersMap = reference[handlersMapSymbol]\n  if (!handlersMap) {\n    return undefined\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    return iterateCacheHandlerEntriesWithDevBuiltIns(handlersMap)\n  }\n\n  return handlersMap.entries()\n}\n\n/**\n * Yields the registered entries plus the dev-only private handler under its\n * kind, so that per-kind tag operations (`refreshTags` / `getExpiration` for\n * implicit tags) apply to private entries. Custom-kind front handlers are\n * intentionally omitted: the backing handler (already in the map) is\n * authoritative for that kind's `getExpiration`, and a front entry is discarded\n * via that same value.\n */\nfunction* iterateCacheHandlerEntriesWithDevBuiltIns(\n  handlersMap: Map<string, CacheHandler>\n): IterableIterator<[string, CacheHandler]> {\n  yield* handlersMap.entries()\n\n  const privateHandler = reference[privateHandlerSymbol]\n  if (privateHandler) {\n    const privateEntry: [string, CacheHandler] = ['private', privateHandler]\n    yield privateEntry\n  }\n}\n\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */\nexport function setCacheHandler(\n  kind: string,\n  cacheHandler: CacheHandler\n): void {\n  // This should never be called before initializeCacheHandlers.\n  if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n    throw new Error('Cache handlers not initialized')\n  }\n\n  debug?.('setting cache handler for \"%s\"', kind)\n  reference[handlersMapSymbol].set(kind, cacheHandler)\n  reference[handlersSetSymbol].add(cacheHandler)\n\n  // A user-configured handler may be slow or remote. In development, give it a\n  // dedicated built-in in-memory front handler so cache hits resolve in a\n  // microtask, and pair the two into a tiered handler the wrapper reads\n  // through. Both are created alongside registration so their lifecycle matches\n  // the backing handler's, and the front handler's presence is the signal that\n  // this kind is backed by a real handler (see `isCustomCacheHandler`). Being a\n  // built-in default handler, the front inherits the dev minimum retention, so\n  // a short-`expire` value still hits the front instead of falling through to\n  // the slow backing on every read.\n  if (process.env.__NEXT_DEV_SERVER) {\n    const frontHandler = createDefaultCacheHandler(DEV_MEMORY_CACHE_SIZE)\n    reference[devFrontHandlersSymbol]?.set(kind, frontHandler)\n    reference[devTieredHandlersSymbol]?.set(\n      kind,\n      createTieredCacheHandler(frontHandler, cacheHandler)\n    )\n  }\n}\n","import type { CacheEntry, CacheHandler } from '../lib/cache-handlers/types'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { cloneCacheEntry } from './clone-cache-entry'\n\n/**\n * The subset of the cache-handler interface used on the per-invocation\n * read/write path in the \"use cache\" wrapper. Tag operations are intentionally\n * excluded: they are applied to the front and backing handlers individually by\n * the registry iterators (`getCacheHandlers` / `getCacheHandlerEntries`), never\n * through this composite, so the composite is never registered.\n */\nexport type CacheReadWriteHandler = Pick<CacheHandler, 'get' | 'set'>\n\n/**\n * Development-only. Puts a fast built-in in-memory `front` handler in front of\n * a slower or persistent user-configured `backing` handler. Its only job is to\n * guarantee that cache hits resolve in a microtask (so they aren't counted as\n * cache misses at a staged-render boundary, which would otherwise surface a\n * cold cache indicator), while keeping the front in sync with the backing.\n *\n * It implements only `get` and `set` because that is all the wrapper calls on\n * its handler. Regeneration is never done here; this only reads, mirrors, and\n * writes through.\n *\n * The handler is a per-kind singleton (the front and backing are both shared),\n * so its in-flight map can serialize background front syncs for a key across\n * concurrent reads, running them one at a time instead of in parallel.\n */\nexport function createTieredCacheHandler(\n  front: CacheHandler,\n  backing: CacheHandler\n): CacheReadWriteHandler {\n  // Holds the in-flight (or chained) background sync per key, so a sync for a\n  // key runs after any earlier one for that key rather than in parallel.\n  const inFlightSyncs = new Map<string, Promise<void>>()\n\n  function scheduleBackgroundSync(\n    cacheKey: string,\n    sync: () => Promise<void>\n  ): void {\n    // Serialize syncs per key: chain this one after any in-flight sync rather\n    // than running a second in parallel. The trailing sync still re-reads the\n    // backing, so the front converges to the latest state; a later read is\n    // never dropped in favor of an earlier, possibly stale, in-flight read.\n    const previous = inFlightSyncs.get(cacheKey)\n\n    let pending: Promise<void>\n    if (previous) {\n      pending = previous.then(sync)\n    } else {\n      pending = sync()\n    }\n\n    pending = pending.finally(() => {\n      if (inFlightSyncs.get(cacheKey) === pending) {\n        inFlightSyncs.delete(cacheKey)\n      }\n    })\n\n    inFlightSyncs.set(cacheKey, pending)\n\n    // Register the sync on the current request's revalidation writes so it is\n    // awaited rather than left untracked. Reading the work store here (rather\n    // than capturing it at construction) is what lets the handler be a shared\n    // singleton; `get` always runs within the request's async context, so the\n    // store is present.\n    const workStore = workAsyncStorage.getStore()\n    if (workStore) {\n      workStore.pendingRevalidateWrites ??= []\n      workStore.pendingRevalidateWrites.push(pending)\n    }\n  }\n\n  return {\n    async get(cacheKey, softTags) {\n      const frontEntry = await front.get(cacheKey, softTags)\n\n      if (frontEntry) {\n        // Cache hit: serve immediately (in a microtask). A background reconcile\n        // keeps the front in sync with the backing for the next read;\n        // reconciles for the same key are serialized, so concurrent cache hits\n        // don't hit the backing in parallel.\n        scheduleBackgroundSync(cacheKey, () =>\n          reconcileFrontFromBacking(\n            front,\n            backing,\n            cacheKey,\n            softTags,\n            frontEntry\n          )\n        )\n\n        return frontEntry\n      }\n\n      // Cold or evicted front entry: we pay the backing latency here (this is a\n      // read that may legitimately surface a cold cache indicator). A miss\n      // returns undefined and the \"use cache\" wrapper generates the entry and\n      // writes it through both tiers via `set`.\n      const backingEntry = await backing.get(cacheKey, softTags)\n\n      if (!backingEntry) {\n        return undefined\n      }\n\n      // Mirror this freshly read backing entry into the front so the next read\n      // hits it. The mirror is serialized per key: if a sync is already\n      // running, this chains after it, so the front converges to this read even\n      // if the backing changed since that sync started.\n      const [servedEntry, mirroredEntry] = cloneCacheEntry(backingEntry)\n      scheduleBackgroundSync(cacheKey, () =>\n        mirrorIntoFront(front, cacheKey, mirroredEntry)\n      )\n\n      return servedEntry\n    },\n\n    async set(cacheKey, pendingEntry) {\n      // Write through to both tiers. The entry's value stream is single-use, so\n      // tee it into one entry per tier.\n      const entry = await pendingEntry\n      const [frontEntry, backingEntry] = cloneCacheEntry(entry)\n\n      await Promise.all([\n        front.set(cacheKey, Promise.resolve(frontEntry)),\n        backing.set(cacheKey, Promise.resolve(backingEntry)),\n      ])\n    },\n  }\n}\n\n/**\n * After serving a cache hit from the front, consult the backing and mirror a\n * newer entry into the front for the next read. Runs in the background;\n * failures are non-fatal.\n */\nasync function reconcileFrontFromBacking(\n  front: CacheHandler,\n  backing: CacheHandler,\n  cacheKey: string,\n  softTags: string[],\n  frontEntry: CacheEntry\n): Promise<void> {\n  try {\n    const backingEntry = await backing.get(cacheKey, softTags)\n\n    if (!backingEntry) {\n      // The backing no longer has this entry (it was purged out-of-band). The\n      // cache-handler interface has no per-key delete, so evict the front entry\n      // by overwriting it with an already-expired copy: the next read sees a\n      // front miss, falls through to the (also empty) backing, and the wrapper\n      // regenerates. The entry we just served was the last stale read.\n      await front.set(cacheKey, Promise.resolve(toExpiredEntry(frontEntry)))\n\n      return\n    }\n\n    if (backingEntry.timestamp > frontEntry.timestamp) {\n      await front.set(cacheKey, Promise.resolve(backingEntry))\n    } else {\n      // The front is already up to date, so the backing entry goes unused.\n      // Release its stream without awaiting: a teed stream's `cancel()` only\n      // settles once the sibling branch (retained by the backing handler) is\n      // also cancelled, so awaiting it here would hang the reconcile.\n      void backingEntry.value.cancel()\n    }\n  } catch {\n    // Background warming; failures are non-fatal.\n  }\n}\n\n/**\n * Mirror a backing entry into the front.\n */\nasync function mirrorIntoFront(\n  front: CacheHandler,\n  cacheKey: string,\n  entry: CacheEntry\n): Promise<void> {\n  try {\n    await front.set(cacheKey, Promise.resolve(entry))\n  } catch {\n    // Background warming; failures are non-fatal.\n  }\n}\n\n/**\n * Build an already-expired copy of an entry, used to evict it from the front\n * handler (which has no per-key delete) once the backing no longer has it. The\n * default handler treats a negative `expire` as an eviction sentinel and\n * reports the entry as missing on the next read. A negative `expire` is used\n * rather than `0` because the dev front handler enforces a minimum retention,\n * so a `0` `expire` would be kept alive by that minimum instead of evicted. The\n * value is never read once the entry is evicted, but it must carry at least one\n * byte because the built-in LRU cache refuses to store size-0 entries.\n */\nfunction toExpiredEntry(entry: CacheEntry): CacheEntry {\n  return {\n    ...entry,\n    expire: -1,\n    value: new ReadableStream({\n      start(controller) {\n        controller.enqueue(new Uint8Array(1))\n        controller.close()\n      },\n    }),\n  }\n}\n","import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n  constructor() {\n    super(\n      'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n    )\n  }\n\n  public static callable() {\n    throw new ReadonlyHeadersError()\n  }\n}\n\nexport type ReadonlyHeaders = Headers & {\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  append(...args: any[]): void\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  set(...args: any[]): void\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  delete(...args: any[]): void\n}\n\n/**\n * The read methods that a sealed view provides itself instead of forwarding to\n * the underlying `Headers`. Deriving the type from `Headers` keeps the\n * implementations in step with the platform signatures.\n */\ntype SealedHeaderMethods = Pick<\n  Headers,\n  | 'get'\n  | 'has'\n  | 'getSetCookie'\n  | 'keys'\n  | 'values'\n  | 'entries'\n  | 'forEach'\n  | typeof Symbol.iterator\n>\n\n/**\n * Builds the read methods for a sealed view that exposes all of `target`.\n */\nfunction createPassThroughMethods(\n  target: Headers,\n  sealed: ReadonlyHeaders\n): SealedHeaderMethods {\n  return {\n    get: target.get.bind(target),\n    has: target.has.bind(target),\n    getSetCookie: target.getSetCookie.bind(target),\n    keys: target.keys.bind(target),\n    values: target.values.bind(target),\n    entries: target.entries.bind(target),\n    [Symbol.iterator]: target[Symbol.iterator].bind(target),\n    // The native method passes the unsealed target as the callback's `parent`\n    // argument. That is a mutable handle on the underlying headers. Pass the\n    // sealed view instead.\n    forEach(callbackfn, thisArg) {\n      for (const [name, value] of target.entries()) {\n        callbackfn.call(thisArg, value, name, sealed)\n      }\n    },\n  }\n}\n\n/**\n * Builds the read methods for a sealed view that omits the header names matched\n * by `isHidden`.\n */\nfunction createHidingMethods(\n  target: Headers,\n  sealed: ReadonlyHeaders,\n  isHidden: (name: string) => boolean\n): SealedHeaderMethods {\n  function* entries(): HeadersIterator<[string, string]> {\n    for (const entry of target.entries()) {\n      if (!isHidden(entry[0])) {\n        yield entry\n      }\n    }\n  }\n\n  return {\n    entries,\n    [Symbol.iterator]: entries,\n    get: (name) => (isHidden(name) ? null : target.get(name)),\n    has: (name) => (isHidden(name) ? false : target.has(name)),\n    getSetCookie: () => (isHidden('set-cookie') ? [] : target.getSetCookie()),\n    *keys(): HeadersIterator<string> {\n      for (const name of target.keys()) {\n        if (!isHidden(name)) {\n          yield name\n        }\n      }\n    },\n    *values(): HeadersIterator<string> {\n      for (const [, value] of entries()) {\n        yield value\n      }\n    },\n    // The native method passes the unsealed target as the callback's `parent`\n    // argument. That is a mutable handle on the underlying headers. Pass the\n    // sealed view instead.\n    forEach(callbackfn, thisArg) {\n      for (const [name, value] of entries()) {\n        callbackfn.call(thisArg, value, name, sealed)\n      }\n    },\n  }\n}\n\nexport class HeadersAdapter extends Headers {\n  private readonly headers: IncomingHttpHeaders\n\n  constructor(headers: IncomingHttpHeaders) {\n    // We've already overridden the methods that would be called, so we're just\n    // calling the super constructor to ensure that the instanceof check works.\n    super()\n\n    this.headers = new Proxy(headers, {\n      get(target, prop, receiver) {\n        // Because this is just an object, we expect that all \"get\" operations\n        // are for properties. If it's a \"get\" for a symbol, we'll just return\n        // the symbol.\n        if (typeof prop === 'symbol') {\n          return ReflectAdapter.get(target, prop, receiver)\n        }\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return undefined.\n        if (typeof original === 'undefined') return\n\n        // If the original casing exists, return the value.\n        return ReflectAdapter.get(target, original, receiver)\n      },\n      set(target, prop, value, receiver) {\n        if (typeof prop === 'symbol') {\n          return ReflectAdapter.set(target, prop, value, receiver)\n        }\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, use the prop as the key.\n        return ReflectAdapter.set(target, original ?? prop, value, receiver)\n      },\n      has(target, prop) {\n        if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return false.\n        if (typeof original === 'undefined') return false\n\n        // If the original casing exists, return true.\n        return ReflectAdapter.has(target, original)\n      },\n      deleteProperty(target, prop) {\n        if (typeof prop === 'symbol')\n          return ReflectAdapter.deleteProperty(target, prop)\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return true.\n        if (typeof original === 'undefined') return true\n\n        // If the original casing exists, delete the property.\n        return ReflectAdapter.deleteProperty(target, original)\n      },\n    })\n  }\n\n  /**\n   * Seals a Headers instance to prevent modification by throwing an error when\n   * any mutating method is called.\n   *\n   * The sealed view stays live. Later writes to `headers` remain visible\n   * through it.\n   *\n   * `hidden` omits the given header names from every read operation (`get`,\n   * `has`, `getSetCookie`, `forEach`, and iteration). The names must be\n   * lowercase. The underlying headers are neither copied nor mutated, so hidden\n   * headers remain available to the framework.\n   */\n  public static seal(\n    headers: Headers,\n    hidden?: ReadonlySet<string>\n  ): ReadonlyHeaders {\n    const isHidden =\n      hidden && hidden.size > 0\n        ? (name: string): boolean => hidden.has(name.toLowerCase())\n        : null\n\n    // The methods are built once per sealed view and reused, so repeated access\n    // returns the same function instead of a fresh closure. They are assigned\n    // after the proxy exists because `forEach` hands the proxy to its callback.\n    // Creating the proxy runs no trap, so nothing can read them before then.\n    let methods: SealedHeaderMethods\n\n    const sealed: ReadonlyHeaders = new Proxy<ReadonlyHeaders>(headers, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          case 'append':\n          case 'delete':\n          case 'set':\n            return ReadonlyHeadersError.callable\n          case Symbol.iterator:\n            return methods[Symbol.iterator]\n          case 'get':\n          case 'has':\n          case 'getSetCookie':\n          case 'keys':\n          case 'values':\n          case 'entries':\n          case 'forEach':\n            return methods[prop]\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n\n    methods = isHidden\n      ? createHidingMethods(headers, sealed, isHidden)\n      : createPassThroughMethods(headers, sealed)\n\n    return sealed\n  }\n\n  /**\n   * @param headers\n   * @returns A fresh object identity backed by the original value\n   */\n  public static fresh(headers: ReadonlyHeaders): ReadonlyHeaders {\n    return new Proxy<ReadonlyHeaders>(headers, {\n      get(target, prop, receiver) {\n        return ReflectAdapter.get(target, prop, receiver)\n      },\n    })\n  }\n\n  /**\n   * Merges a header value into a string. This stores multiple values as an\n   * array, so we need to merge them into a string.\n   *\n   * @param value a header value\n   * @returns a merged header value (a string)\n   */\n  private merge(value: string | string[]): string {\n    if (Array.isArray(value)) return value.join(', ')\n\n    return value\n  }\n\n  /**\n   * Creates a Headers instance from a plain object or a Headers instance.\n   *\n   * @param headers a plain object or a Headers instance\n   * @returns a headers instance\n   */\n  public static from(headers: IncomingHttpHeaders | Headers): Headers {\n    if (headers instanceof Headers) return headers\n\n    return new HeadersAdapter(headers)\n  }\n\n  public append(name: string, value: string): void {\n    const existing = this.headers[name]\n    if (typeof existing === 'string') {\n      this.headers[name] = [existing, value]\n    } else if (Array.isArray(existing)) {\n      existing.push(value)\n    } else {\n      this.headers[name] = value\n    }\n  }\n\n  public delete(name: string): void {\n    delete this.headers[name]\n  }\n\n  public get(name: string): string | null {\n    const value = this.headers[name]\n    if (typeof value !== 'undefined') return this.merge(value)\n\n    return null\n  }\n\n  public has(name: string): boolean {\n    return typeof this.headers[name] !== 'undefined'\n  }\n\n  public set(name: string, value: string): void {\n    this.headers[name] = value\n  }\n\n  public forEach(\n    callbackfn: (value: string, name: string, parent: Headers) => void,\n    thisArg?: any\n  ): void {\n    for (const [name, value] of this.entries()) {\n      callbackfn.call(thisArg, value, name, this)\n    }\n  }\n\n  public *entries(): HeadersIterator<[string, string]> {\n    for (const key of Object.keys(this.headers)) {\n      const name = key.toLowerCase()\n      // We assert here that this is a string because we got it from the\n      // Object.keys() call above.\n      const value = this.get(name) as string\n\n      yield [name, value] as [string, string]\n    }\n  }\n\n  public *keys(): HeadersIterator<string> {\n    for (const key of Object.keys(this.headers)) {\n      const name = key.toLowerCase()\n      yield name\n    }\n  }\n\n  public *values(): HeadersIterator<string> {\n    for (const key of Object.keys(this.headers)) {\n      // We assert here that this is a string because we got it from the\n      // Object.keys() call above.\n      const value = this.get(key) as string\n\n      yield value\n    }\n  }\n\n  public [Symbol.iterator](): HeadersIterator<[string, string]> {\n    return this.entries()\n  }\n}\n","export class ReflectAdapter {\n  static get<T extends object>(\n    target: T,\n    prop: string | symbol,\n    receiver: unknown\n  ): any {\n    const value = Reflect.get(target, prop, receiver)\n    if (typeof value === 'function') {\n      return value.bind(target)\n    }\n\n    return value\n  }\n\n  static set<T extends object>(\n    target: T,\n    prop: string | symbol,\n    value: any,\n    receiver: any\n  ): boolean {\n    return Reflect.set(target, prop, value, receiver)\n  }\n\n  static has<T extends object>(target: T, prop: string | symbol): boolean {\n    return Reflect.has(target, prop)\n  }\n\n  static deleteProperty<T extends object>(\n    target: T,\n    prop: string | symbol\n  ): boolean {\n    return Reflect.deleteProperty(target, prop)\n  }\n}\n","import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n  constructor() {\n    super(\n      'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n    )\n  }\n\n  public static callable() {\n    throw new ReadonlyRequestCookiesError()\n  }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n  RequestCookies,\n  'set' | 'clear' | 'delete'\n> &\n  Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n  public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n    return new Proxy(cookies as any, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          case 'clear':\n          case 'delete':\n          case 'set':\n            return ReadonlyRequestCookiesError.callable\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n  }\n\n  /**\n   * @param cookies\n   * @returns A fresh object identity backed by the original value\n   */\n  public static fresh(cookies: ReadonlyRequestCookies): ReadonlyRequestCookies {\n    return new Proxy(cookies, {\n      get(target, prop, receiver) {\n        return ReflectAdapter.get(target, prop, receiver)\n      },\n    })\n  }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n  cookies: ResponseCookies\n): ResponseCookie[] {\n  const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n    SYMBOL_MODIFY_COOKIE_VALUES\n  ]\n  if (!modified || !Array.isArray(modified) || modified.length === 0) {\n    return []\n  }\n\n  return modified\n}\n\ntype SetCookieArgs =\n  | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n  | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n  headers: Headers,\n  mutableCookies: ResponseCookies\n): boolean {\n  const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n  if (modifiedCookieValues.length === 0) {\n    return false\n  }\n\n  // Return a new response that extends the response with\n  // the modified cookies as fallbacks. `res` cookies\n  // will still take precedence.\n  const resCookies = new ResponseCookies(headers)\n  const returnedCookies = resCookies.getAll()\n\n  // Set the modified cookies as fallbacks.\n  for (const cookie of modifiedCookieValues) {\n    resCookies.set(cookie)\n  }\n\n  // Set the original cookies as the final values.\n  for (const cookie of returnedCookies) {\n    resCookies.set(cookie)\n  }\n\n  return true\n}\n\ntype ResponseCookie = NonNullable<\n  ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n  public static wrap(\n    cookies: RequestCookies,\n    onUpdateCookies?: (cookies: string[]) => void\n  ): ResponseCookies {\n    const responseCookies = new ResponseCookies(new Headers())\n    for (const cookie of cookies.getAll()) {\n      responseCookies.set(cookie)\n    }\n\n    let modifiedValues: ResponseCookie[] = []\n    const modifiedCookies = new Set<string>()\n    const updateResponseCookies = () => {\n      // TODO-APP: change method of getting workStore\n      const workStore = workAsyncStorage.getStore()\n      if (workStore) {\n        workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n      }\n\n      const allCookies = responseCookies.getAll()\n      modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n      if (onUpdateCookies) {\n        const serializedCookies: string[] = []\n        for (const cookie of modifiedValues) {\n          const tempCookies = new ResponseCookies(new Headers())\n          tempCookies.set(cookie)\n          serializedCookies.push(tempCookies.toString())\n        }\n\n        onUpdateCookies(serializedCookies)\n      }\n    }\n\n    const wrappedCookies = new Proxy(responseCookies, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          // A special symbol to get the modified cookie values\n          case SYMBOL_MODIFY_COOKIE_VALUES:\n            return modifiedValues\n\n          // TODO: Throw error if trying to set a cookie after the response\n          // headers have been set.\n          case 'delete':\n            return function (...args: [string] | [ResponseCookie]) {\n              modifiedCookies.add(\n                typeof args[0] === 'string' ? args[0] : args[0].name\n              )\n              try {\n                target.delete(...args)\n                return wrappedCookies\n              } finally {\n                updateResponseCookies()\n              }\n            }\n          case 'set':\n            return function (...args: SetCookieArgs) {\n              modifiedCookies.add(\n                typeof args[0] === 'string' ? args[0] : args[0].name\n              )\n              try {\n                target.set(...args)\n                return wrappedCookies\n              } finally {\n                updateResponseCookies()\n              }\n            }\n\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n\n    return wrappedCookies\n  }\n}\n\nexport function createCookiesWithMutableAccessCheck(\n  requestStore: RequestStore\n): ResponseCookies {\n  const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n    get(target, prop, receiver) {\n      switch (prop) {\n        case 'delete':\n          return function (...args: [string] | [ResponseCookie]) {\n            ensureCookiesAreStillMutable(requestStore, 'cookies().delete')\n            target.delete(...args)\n            return wrappedCookies\n          }\n        case 'set':\n          return function (...args: SetCookieArgs) {\n            ensureCookiesAreStillMutable(requestStore, 'cookies().set')\n            target.set(...args)\n            return wrappedCookies\n          }\n\n        default:\n          return ReflectAdapter.get(target, prop, receiver)\n      }\n    },\n  })\n  return wrappedCookies\n}\n\nexport function areCookiesMutableInCurrentPhase(requestStore: RequestStore) {\n  return requestStore.phase === 'action'\n}\n\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n *   'render' -> 'after'\n *   'action' -> 'render'\n * */\nfunction ensureCookiesAreStillMutable(\n  requestStore: RequestStore,\n  _callingExpression: string\n) {\n  if (!areCookiesMutableInCurrentPhase(requestStore)) {\n    // TODO: maybe we can give a more precise error message based on callingExpression?\n    throw new ReadonlyRequestCookiesError()\n  }\n}\n\nexport function responseCookiesToRequestCookies(\n  responseCookies: ResponseCookies\n): RequestCookies {\n  const requestCookies = new RequestCookies(new Headers())\n  for (const cookie of responseCookies.getAll()) {\n    requestCookies.set(cookie)\n  }\n  return requestCookies\n}\n","export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n","'use client'\n\nimport type {\n  FocusAndScrollRef,\n  PrefetchKind,\n} from '../../client/components/router-reducer/router-reducer-types'\nimport type { Params } from '../../server/request/params'\nimport type {\n  FlightRouterState,\n  FlightSegmentPath,\n  CacheNode,\n  LoadingModuleData,\n} from './app-router-types'\nimport React from 'react'\n\nexport interface NavigateOptions {\n  scroll?: boolean\n  /**\n   * Transition types to apply when navigating. These types are passed to\n   * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n   * inside the navigation transition, enabling\n   * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n   * to apply different animations based on the type of navigation.\n   */\n  transitionTypes?: string[]\n}\n\nexport interface PrefetchOptions {\n  kind: PrefetchKind\n  onInvalidate?: () => void\n}\n\nexport interface AppRouterInstance {\n  /**\n   * Navigate to the previous history entry.\n   */\n  back(): void\n  /**\n   * Navigate to the next history entry.\n   */\n  forward(): void\n  /**\n   * Refresh the current page.\n   */\n  refresh(): void\n  /**\n   * Refresh the current page. Use in development only.\n   * @internal\n   */\n  hmrRefresh(): void\n  /**\n   * Navigate to the provided href.\n   * Pushes a new history entry.\n   */\n  push(href: string, options?: NavigateOptions): void\n  /**\n   * Navigate to the provided href.\n   * Replaces the current history entry.\n   */\n  replace(href: string, options?: NavigateOptions): void\n  /**\n   * Prefetch the provided href.\n   */\n  prefetch(href: string, options?: PrefetchOptions): void\n  /**\n   * Perform a gesture navigation using prefetched data.\n   * Only available when experimental.gestureTransition is enabled.\n   * @experimental\n   */\n  experimental_gesturePush?(href: string, options?: NavigateOptions): void\n  /**\n   * An opaque string identifier scoped to the current route segment.\n   *\n   * Changes when the surrounding segment is freshly created by a push or\n   * replace navigation. Stays the same for back/forward navigations,\n   * `router.refresh()`, and search-param/hash-only changes.\n   *\n   * Intended to be passed to a React `key` to opt out of state preservation\n   * on fresh navigations:\n   *\n   * ```tsx\n   * <form key={useRouter().bfcacheId}>\n   * ```\n   *\n   * In most cases, prefer resetting state explicitly in an event handler, or\n   * deriving a key from your data (e.g. a draft id from the server). Use\n   * `bfcacheId` only when those patterns aren't a fit.\n   */\n  bfcacheId: string\n}\n\nexport const AppRouterContext = React.createContext<AppRouterInstance | null>(\n  null\n)\nexport const LayoutRouterContext = React.createContext<{\n  parentTree: FlightRouterState\n  parentCacheNode: CacheNode\n  parentSegmentPath: FlightSegmentPath | null\n  parentParams: Params\n  parentLoadingData: LoadingModuleData | null\n  debugNameContext: string\n  url: string\n  isActive: boolean\n} | null>(null)\n\nexport const GlobalLayoutRouterContext = React.createContext<{\n  tree: FlightRouterState\n  focusAndScrollRef: FocusAndScrollRef\n  nextUrl: string | null\n  previousNextUrl: string | null\n}>(null as any)\n\nexport const TemplateContext = React.createContext<React.ReactNode>(null as any)\n\nif (process.env.NODE_ENV !== 'production') {\n  AppRouterContext.displayName = 'AppRouterContext'\n  LayoutRouterContext.displayName = 'LayoutRouterContext'\n  GlobalLayoutRouterContext.displayName = 'GlobalLayoutRouterContext'\n  TemplateContext.displayName = 'TemplateContext'\n}\n\nexport const MissingSlotContext = React.createContext<Set<string>>(new Set())\n","/**\n * App Router types - Client-safe types for the Next.js App Router\n *\n * This file contains type definitions that can be safely imported\n * by both client-side and server-side code without circular dependencies.\n */\n\nimport type React from 'react'\n\nexport type LoadingModuleData =\n  | [React.JSX.Element, React.ReactNode, React.ReactNode]\n  | null\n\nimport type { VaryParamsIterable } from './segment-cache/vary-params-decoding'\n\n/** viewport metadata node */\nexport type HeadData = React.ReactNode\n\n/**\n * Cache node used in app-router / layout-router.\n */\n\nexport type CacheNode = {\n  /**\n   * When rsc is not null, it represents the RSC data for the\n   * corresponding segment.\n   *\n   * `null` is a valid React Node but because segment data is always a\n   * <LayoutRouter> component, we can use `null` to represent empty. When it is\n   * null, it represents missing data, and rendering should suspend.\n   */\n  rsc: React.ReactNode\n\n  /**\n   * Represents a static version of the segment that can be shown immediately,\n   * and may or may not contain dynamic holes. It's prefetched before a\n   * navigation occurs.\n   *\n   * During rendering, we will choose whether to render `rsc` or `prefetchRsc`\n   * with `useDeferredValue`. As with the `rsc` field, a value of `null` means\n   * no value was provided. In this case, the LayoutRouter will go straight to\n   * rendering the `rsc` value; if that one is also missing, it will suspend and\n   * trigger a lazy fetch.\n   */\n  prefetchRsc: React.ReactNode\n\n  prefetchHead: HeadData | null\n\n  head: HeadData\n\n  slots: Record<string, CacheNode> | null\n\n  /**\n   * A shared mutable ref that tracks whether this segment should be scrolled\n   * to. All new segments created during a single navigation share the same\n   * ref. When any segment's scroll handler fires, it sets `current` to\n   * `false` so no other segment scrolls for the same navigation.\n   *\n   * `null` means this segment is not a scroll target (e.g., a reused shared\n   * layout segment).\n   */\n  scrollRef: ScrollRef | null\n\n  /**\n   * Globally-unique identifier minted from a monotonic counter when the\n   * CacheNode is freshly created. Surfaced to user code as a string via\n   * `useRouter().bfcacheId` and intended to be used as a React `key` to\n   * opt out of Activity-based state preservation on fresh navigations.\n   *\n   * Preserved when the CacheNode is reused (shared layouts, refresh,\n   * search/hash-only navigations) or restored from the BFCache during a\n   * back/forward navigation.\n   */\n  bfcacheId: number\n}\n\n/**\n * A mutable ref shared across all new segments created during a single\n * navigation. Used to ensure that only one segment scrolls per navigation.\n */\nexport type ScrollRef = { current: boolean }\n\nexport type DynamicParamTypes =\n  | 'catchall'\n  | 'catchall-intercepted-(..)(..)'\n  | 'catchall-intercepted-(.)'\n  | 'catchall-intercepted-(..)'\n  | 'catchall-intercepted-(...)'\n  | 'optional-catchall'\n  | 'dynamic'\n  | 'dynamic-intercepted-(..)(..)'\n  | 'dynamic-intercepted-(.)'\n  | 'dynamic-intercepted-(..)'\n  | 'dynamic-intercepted-(...)'\n\nexport type DynamicParamTypesShort =\n  | 'c'\n  | 'ci(..)(..)'\n  | 'ci(.)'\n  | 'ci(..)'\n  | 'ci(...)'\n  | 'oc'\n  | 'd'\n  | 'di(..)(..)'\n  | 'di(.)'\n  | 'di(..)'\n  | 'di(...)'\n\n// The tuple form of a segment, used for dynamic route params\nexport type DynamicSegmentTuple = [\n  // Param name\n  paramName: string,\n  // Param cache key (almost the same as the value, but arrays are\n  // concatenated into strings)\n  // TODO: We should change this to just be the value. Currently we convert\n  // it back to a value when passing to useParams. It only needs to be\n  // a string when converted to a a cache key, but that doesn't mean we\n  // need to store it as that representation.\n  paramCacheKey: string,\n  // Dynamic param type\n  dynamicParamType: DynamicParamTypesShort,\n  // Static sibling segments at the same URL level. Used by the client\n  // router to determine if a prefetch can be reused when navigating to\n  // a static sibling of a dynamic route. For example, if the route is\n  // /products/[id] and there's also /products/sale, then staticSiblings\n  // would be ['sale']. null means the siblings are unknown (e.g. in\n  // webpack dev mode).\n  staticSiblings: readonly string[] | null,\n]\n\nexport type Segment = string | DynamicSegmentTuple\n\n/**\n * Router state\n */\nexport type FlightRouterState = [\n  segment: Segment,\n  parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },\n  refreshState?: CompressedRefreshState | null,\n  /**\n   * - \"refetch\" is used during a request to inform the server where rendering\n   *   should start from.\n   *\n   * - \"inside-shared-layout\" is used during a prefetch request to inform the\n   *   server that even if the segment matches, it should be treated as if it's\n   *   within the \"new\" part of a navigation — inside the shared layout. If\n   *   the segment doesn't match, then it has no effect, since it would be\n   *   treated as new regardless. If it does match, though, the server does not\n   *   need to render it, because the client already has it.\n   *\n   * - \"metadata-only\" instructs the server to skip rendering the segments and\n   *   only send the head data.\n   *\n   *   A bit confusing, but that's because it has only one extremely narrow use\n   *   case — during a non-PPR prefetch, the server uses it to find the first\n   *   loading boundary beneath a shared layout.\n   *\n   *   TODO: We should rethink the protocol for dynamic requests. It might not\n   *   make sense for the client to send a FlightRouterState, since this type is\n   *   overloaded with concerns.\n   */\n  refresh?: 'refetch' | 'inside-shared-layout' | 'metadata-only' | null,\n  /**\n   * Bitmask of PrefetchHint flags. Encodes route structure metadata:\n   * root layout, loading boundaries, instant configs, and prefetch strategy\n   * hints. Only set when non-zero.\n   */\n  prefetchHints?: number,\n]\n\n/**\n * When rendering a parallel route, some of the parallel paths may not match\n * the current URL. In that case, the Next client has to render something,\n * so it will render whichever was the last route to match that slot. We use\n * this type to track when this has happened. It's a tuple of the original\n * URL that was used to fetch the segment, and the (possibly rewritten) search\n * query that was rendered by the server. The URL is needed when performing\n * a refresh of the segment, and the search query is needed for looking up\n * matching entries in the segment cache.\n */\nexport type CompressedRefreshState = [url: string, renderedSearch: string]\n\nexport const enum PrefetchHint {\n  // NOTE: The 0b00001 bit was previously HasRuntimePrefetch (prefetch:\n  // 'allow-runtime'). Partial Prefetching now implies runtime completeness\n  // for every segment, so the bit was removed. Do not reuse it without\n  // considering caches populated by older builds.\n\n  // This segment or one of its descendants opts into Partial Prefetching, i.e.\n  // uses the two-phase (Shell then Speculative) prefetch flow. Set when\n  // `prefetch` is 'partial' or 'unstable_eager' (including the defaults\n  // implied by the global `partialPrefetching` config). Propagates upward so\n  // the root segment reflects the entire subtree.\n  //\n  // Partial Prefetching segments require RUNTIME COMPLETENESS: a prefetch\n  // isn't considered done for such a segment until an entry at least as\n  // complete as a runtime response exists. This does NOT mean the segment\n  // lacks static data — the server emits static data unconditionally, and the\n  // scheduler may attempt a static prefetch first (per\n  // ShouldAttemptStaticPrefetch), issuing the runtime request only if the\n  // static response's own `needsRuntimeRequest` signal says it would\n  // return more.\n  SubtreeHasPartialPrefetching = 0b00010,\n  // This segment itself has a loading.tsx boundary.\n  SegmentHasLoadingBoundary = 0b00100,\n  // A descendant segment (but not this one) has a loading.tsx boundary.\n  // Propagates upward so the root reflects the entire subtree.\n  SubtreeHasLoadingBoundary = 0b01000,\n  // This segment is at or above the application's root layout — the root layout\n  // segment itself and all of its ancestors. A dynamic param in one of these\n  // segments is a \"root param\".\n  IsRootLayoutOrAbove = 0b10000,\n  // This segment's response includes its parent's data inlined into it.\n  // Set at build time by the segment size measurement pass.\n  ParentInlinedIntoSelf = 0b100000,\n  // This segment's data is inlined into one of its children — don't fetch\n  // it separately. Set at build time by the segment size measurement pass.\n  InlinedIntoChild = 0b1000000,\n  // On a __PAGE__: this page's response includes the head (metadata/viewport)\n  // at the end of its SegmentPrefetch[] array.\n  HeadInlinedIntoSelf = 0b10000000,\n  // On the root hint node: the head was NOT inlined into any page — fetch\n  // it separately. Absence of this bit means the head is bundled into a page.\n  HeadOutlined = 0b100000000,\n  // The inlining hints in this tree may be stale because the tree was\n  // generated before collectPrefetchHints ran (e.g. the initial RSC payload\n  // for a fully static page at build time). When writing this tree into the\n  // cache, the route entry should be immediately expired so it gets\n  // re-fetched with correct hints. Only set during build-time prerendering,\n  // never at runtime.\n  InliningHintsStale = 0b1000000000,\n  // This segment has prefetch = 'force-disabled'. The opt-out is passive\n  // and applies to this segment only: it never INITIATES a prefetch — no\n  // static data is emitted or fetched, and it's never the reason a runtime\n  // prefetch spawns — but it may ride along in a runtime response issued on\n  // another segment's behalf. Descendants prefetch normally.\n  //\n  // TODO: Also set as an internal fallback when the prefetch hints manifest\n  // is unavailable (see #91407 mitigations), which only means \"no static\n  // prefetch data exists\" — not a user opt-out. Split the fallback into its\n  // own bit so the two intents can diverge.\n  PrefetchDisabled = 0b10000000000,\n  // NOTE: The 0b100000000000 bit was previously SubtreeHasRuntimePrefetch.\n  // Partial Prefetching now implies runtime completeness for every segment\n  // (see SubtreeHasPartialPrefetching), so the bit was removed. Do not reuse\n  // it without considering caches populated by older builds.\n\n  // This segment or one of its descendants prefetches \"eagerly\" — i.e. its\n  // effective prefetch strategy is anything other than 'partial'. Used by\n  // App Shells: a non-eager subtree relies on the shared app shell and skips\n  // its Speculative prefetch. Propagates upward so the root reflects the\n  // entire subtree.\n  SubtreeHasEagerPrefetch = 0b1000000000000,\n  // This segment or one of its descendants exports `instant = false`,\n  // explicitly opting out of Partial Prefetching. Propagates upward so the root\n  // reflects the entire subtree. Used only to suppress the dev-time\n  // `<Link prefetch={true}>` warning — unlike PrefetchDisabled, it has no effect\n  // on the actual prefetch behavior.\n  SubtreeHasInstantFalse = 0b10000000000000,\n  // The client should attempt a static prefetch for this route: the\n  // build-time prerender did not access any runtime data (cookies, headers,\n  // searchParams, ...), so a static prefetch is expected to be as complete\n  // as a runtime one. A fallback-param access only unsets the bit when the\n  // route can never be upgraded from a fallback to a concrete prerender —\n  // on an upgradeable route, ISR later produces the concrete prerender a\n  // static attempt would hit (until then, the static responses' own\n  // signal reports the insufficiency per response). Purely advisory, and\n  // both error directions are safe: if set when a runtime request is\n  // actually needed, that same response-level signal (the load-bearing\n  // `needsRuntimeRequest` promise combined with each segment's `isPartial`)\n  // directs the client to follow up — the cost is a wasted static attempt.\n  // If unset when static would have sufficed, the client goes straight to a\n  // runtime prefetch, which is a superset of the static response — the cost\n  // is only reduced cacheability. Like the other bits, this one is computed\n  // once per build and stays constant for the build's lifetime; it rides\n  // the prefetch-hints manifest into every response that carries hints —\n  // `/_tree` prefetch responses and the FlightRouterState of dynamic\n  // navigations alike. (Routes missing from the manifest — see the #91407\n  // fallbacks — simply never carry it.) Set on every node of the tree, but\n  // does not propagate.\n  ShouldAttemptStaticPrefetch = 0b100000000000000,\n}\n\n/**\n * Bitmask for checking whether a segment's static prefetch is skipped — i.e.\n * the server emits no static data for it (its slot in a segment bundle is\n * null, and it participates in the bundle chain only as a pass-through) and\n * the client never issues a static request for it.\n *\n * Static prefetching is disabled ONLY by `prefetch: 'force-disabled'`\n * (PrefetchDisabled). Notably, Partial Prefetching segments DO have static\n * data even though they require runtime completeness: the server emits it\n * unconditionally — it can't be gated on the ShouldAttemptStaticPrefetch\n * hint, because null-slot positions in segment bundles must be deterministic\n * from build-time config. A runtime request may still be needed for the\n * segment, but the scheduler may attempt a static prefetch first (per the\n * ShouldAttemptStaticPrefetch hint) and skip the runtime request if the\n * static response proves sufficient.\n *\n * Usage: `(hints & StaticPrefetchDisabled) !== 0`\n */\nexport const StaticPrefetchDisabled = PrefetchHint.PrefetchDisabled\n\n/**\n * The subset of PrefetchHint bits that propagate upward from a child segment to\n * its ancestors (as opposed to segment-local bits like SegmentHasLoadingBoundary\n * or IsRootLayoutOrAbove). Used to clear stale propagated bits before re-deriving them\n * from a node's children.\n */\nexport const SubtreePrefetchHints =\n  PrefetchHint.SubtreeHasPartialPrefetching |\n  PrefetchHint.SubtreeHasLoadingBoundary |\n  PrefetchHint.SubtreeHasInstantFalse |\n  PrefetchHint.SubtreeHasEagerPrefetch\n\n/**\n * Folds a child segment's prefetch hints into its parent's, propagating the\n * \"subtree\" flags. A child's segment-local flag (e.g. it has a loading\n * boundary) becomes the corresponding \"subtree\" flag on the parent, so the\n * root segment ends up reflecting the entire subtree.\n *\n * Used wherever a route tree is assembled bottom-up: on the server when building\n * a prefetch tree (createFlightRouterStateFromLoaderTree) and on the client when\n * merging a navigation patch into the existing tree (convertServerPatchToFullTree).\n * Keep these in sync by routing both through this helper.\n */\nexport function propagateSubtreeBits(\n  parentHints: number,\n  childHints: number\n): number {\n  if (childHints & PrefetchHint.SubtreeHasPartialPrefetching) {\n    parentHints |= PrefetchHint.SubtreeHasPartialPrefetching\n  }\n  // A child with a loading boundary (directly, or anywhere in its subtree) makes\n  // this a SubtreeHasLoadingBoundary on the parent.\n  if (\n    childHints &\n    (PrefetchHint.SegmentHasLoadingBoundary |\n      PrefetchHint.SubtreeHasLoadingBoundary)\n  ) {\n    parentHints |= PrefetchHint.SubtreeHasLoadingBoundary\n  }\n  // And for eager prefetch. The bit is set directly on each eager segment, so\n  // there's no separate segment-local flag — propagate it as-is.\n  if (childHints & PrefetchHint.SubtreeHasEagerPrefetch) {\n    parentHints |= PrefetchHint.SubtreeHasEagerPrefetch\n  }\n  // And for `instant = false`. Like eager prefetch, the bit is set directly on\n  // each opted-out segment, so propagate it as-is.\n  if (childHints & PrefetchHint.SubtreeHasInstantFalse) {\n    parentHints |= PrefetchHint.SubtreeHasInstantFalse\n  }\n  return parentHints\n}\n\n/**\n * Individual Flight response path\n */\nexport type FlightSegmentPath =\n  // Uses `any` as repeating pattern can't be typed.\n  | any[]\n  // Looks somewhat like this\n  | [\n      segment: Segment,\n      parallelRouterKey: string,\n      segment: Segment,\n      parallelRouterKey: string,\n      segment: Segment,\n      parallelRouterKey: string,\n    ]\n\n/**\n * Represents a tree of segments and the Flight data (i.e. React nodes) that\n * correspond to each one. The tree is isomorphic to the FlightRouterState;\n * however in the future we want to be able to fetch arbitrary partial segments\n * without having to fetch all its children. So this response format will\n * likely change.\n */\nexport type CacheNodeSeedData = [\n  node: React.ReactNode | null,\n  parallelRoutes: {\n    [parallelRouterKey: string]: CacheNodeSeedData | null\n  },\n  // TODO: This field is no longer used. Remove it.\n  loading: null,\n  isPartial: boolean,\n  /**\n   * An AsyncIterable that yields the route params this segment accessed during\n   * server rendering (one name per yield, deduped). Used by the client router\n   * to determine cache key specificity - segments that only access certain\n   * params can be reused across navigations where unaccessed params change.\n   *\n   * Does NOT include root params; those are emitted once at the top level of\n   * the response (see `r` on the payload) and unioned in by the consumer.\n   *\n   * - null: tracking was not enabled for this render (e.g., not a prerender).\n   *   Treat conservatively - assume all params vary.\n   * - Drains to empty Set: segment accesses no params (e.g., client components,\n   *   or server components that don't read params). Can be shared across all\n   *   param values.\n   * - Drains to non-empty Set: segment depends on those params. Can only reuse\n   *   when those specific params match.\n   */\n  varyParams: VaryParamsIterable | null,\n]\n\nexport type FlightDataSegment = [\n  /* segment of the rendered slice: */ Segment,\n  /* treePatch */ FlightRouterState,\n  /* cacheNodeSeedData */ CacheNodeSeedData | null, // Can be null during prefetch if there's no loading component\n  /* head: viewport */ HeadData,\n  /* isHeadPartial */ boolean,\n]\n\nexport type FlightDataPath =\n  // Uses `any` as repeating pattern can't be typed.\n  | any[]\n  // Looks somewhat like this\n  | [\n      // Holds full path to the segment.\n      ...FlightSegmentPath[],\n      ...FlightDataSegment,\n    ]\n\n/**\n * The Flight response data\n */\nexport type FlightData = Array<FlightDataPath> | string\n\n/**\n * Per-route prefetch hints computed at build time. Mirrors the shape of the\n * loader tree so hints can be traversed in parallel during router state\n * creation. Each node stores a bitmask of PrefetchHint flags\n * (ParentInlinedIntoSelf, InlinedIntoChild) computed by the segment size\n * measurement pass.\n *\n * Persisted to prefetch-hints.json as Record<string, PrefetchHints> (keyed\n * by route pattern) and loaded at server startup.\n */\nexport type PrefetchHints = {\n  /** Bitmask of PrefetchHint flags for this segment. */\n  hints: number\n  /** Child hint nodes, keyed by parallel route key. */\n  slots: Record<string, PrefetchHints> | null\n}\n\nexport type ActionResult = Promise<any>\n\nexport type InitialRSCPayload = {\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** initialCanonicalUrlParts */\n  c: string[]\n  /** initialRenderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n  /** initialFlightData */\n  f: FlightDataPath[]\n  /** missingSlots */\n  m: Set<string> | undefined\n  /** GlobalError */\n  G: [React.ComponentType<any>, React.ReactNode | undefined]\n  /** supportsPerSegmentPrefetching */\n  S: boolean\n  /**\n   * headVaryParams - vary params for the head (metadata) of the response.\n   * Does not include root params (see `r`).\n   */\n  h: VaryParamsIterable | null\n  /**\n   * rootVaryParams - the root params accessed anywhere in the response, emitted\n   * once. The client unions these into the head and every segment's vary\n   * params, rather than the server folding them into each set.\n   */\n  r?: VaryParamsIterable\n  /** staleTime in seconds - Only present when Cache Components is enabled. */\n  s?: AsyncIterable<number>\n  /**\n   * runtimeDataAccessed — whether the render has accessed a data source that\n   * hangs during a static prerender but would resolve during a runtime\n   * prerender (cookies, headers, fallback params, searchParams, ...). The\n   * flag is monotonic (false → true, at most once), so it's encoded as a\n   * promise: resolved `true` at the moment of first access — the fulfillment\n   * row's position in the stream records the stage the access happened in —\n   * or resolved `false` when the prerender completes without one, a row that\n   * lands past every stage boundary. A truncated (shell) decode therefore\n   * reads the answer as of the shell stage: fulfilled `true` iff the access\n   * happened during a stage it includes, pending (⇒ no access) otherwise.\n   * Unlike an async iterable, a pending promise costs Flight no abort\n   * listener on the render. Used when generating per-segment prefetch\n   * responses (forwarded as the response-level `needsRuntimeRequest`).\n   * The build-constant `PrefetchHint.ShouldAttemptStaticPrefetch` is\n   * tracked directly on the prerender store instead (its\n   * `shouldAttemptStaticPrefetch` cell) — it needs neither stream\n   * positioning nor this flag's param/non-param blindness. Only present\n   * for static prerenders when Cache Components is enabled.\n   */\n  u?: Promise<boolean>\n  /** staticStageByteLength - Resolves when the static stage ends. */\n  l?: Promise<number>\n  /**\n   * shellByteLength - Resolves when the shell stage ends.\n   * If it resolves to null, then the shell is the same as the main response.\n   * */\n  a?: Promise<number | null>\n  /** runtimePrefetchStream — Embedded runtime prefetch Flight stream. */\n  p?: ReadableStream<Uint8Array>\n  /**\n   * dynamicStaleTime — Per-page BFCache stale time in seconds, from\n   * `unstable_dynamicStaleTime`. Only included for dynamic renders. Controls\n   * how long the client router cache retains dynamic navigation data. This is\n   * distinct from the `s` field, which controls segment cache (prefetch)\n   * staleness.\n   */\n  d?: number\n  /**\n   * revealAfter (dev only). Resolves once the server has flushed the\n   * shell-stage content to the stream (static shell, or runtime-prefetchable\n   * shell for runtime-prefetch routes), or earlier on a cache miss. The client\n   * decodes this from the payload and defers resolving the response's deferred\n   * RSCs on it, so a boundary's children aren't revealed before their row has\n   * been decoded (which would flush a premature Suspense fallback). Its\n   * resolution row follows the children's row in the payload, so the children\n   * are decoded by the time the client unblocks. The HTML render gates on the\n   * same signal server-side instead of reading this field.\n   */\n  _revealAfter?: Promise<void>\n}\n\n// Response from `createFromFetch` for normal rendering\nexport type NavigationFlightResponse = {\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** flightData */\n  f: FlightData\n  /** supportsPerSegmentPrefetching */\n  S: boolean\n  /** renderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n  /** staleTime - Only present in dynamic runtime prefetch responses. */\n  s?: AsyncIterable<number>\n  /** staticStageByteLength - Resolves when the static stage ends. */\n  l?: Promise<number>\n  /**\n   * shellByteLength - Resolves when the shell stage ends.\n   * If it resolves to null, then the shell is the same as the main response.\n   * */\n  a?: Promise<number | null>\n  /**\n   * shellUsedSessionData - true if resolving session data\n   * unblocked new content in the shell.\n   * NOTE: only use this in runtime/session prefetch requests\n   * where we have a proper session shell.\n   * */\n  u?: Promise<boolean>\n  /** headVaryParams. Does not include root params (see `r`). */\n  h: VaryParamsIterable | null\n  /**\n   * rootVaryParams - the root params accessed anywhere in the response, emitted\n   * once. The client unions these into the head and every segment's vary\n   * params.\n   */\n  r?: VaryParamsIterable\n  /** runtimePrefetchStream — Embedded runtime prefetch Flight stream. */\n  p?: ReadableStream<Uint8Array>\n  /**\n   * dynamicStaleTime — Per-page BFCache stale time in seconds, from\n   * `unstable_dynamicStaleTime`. Only included for dynamic renders. Controls\n   * how long the client router cache retains dynamic navigation data. This is\n   * distinct from the `s` field, which controls segment cache (prefetch)\n   * staleness.\n   */\n  d?: number\n  /**\n   * revealAfter (dev only). Resolves once the server has flushed the\n   * shell-stage content to the stream (static shell, or runtime-prefetchable\n   * shell for runtime-prefetch routes), or earlier on a cache miss. The client\n   * decodes this from the payload and defers resolving the response's deferred\n   * RSCs on it, so a boundary's children aren't revealed before their row has\n   * been decoded (which would flush a premature Suspense fallback). Its\n   * resolution row follows the children's row in the payload, so the children\n   * are decoded by the time the client unblocks. The HTML render gates on the\n   * same signal server-side instead of reading this field.\n   */\n  _revealAfter?: Promise<void>\n}\n\n// Response from `createFromFetch` for server actions. Action's flight data can be null\nexport type ActionFlightResponse = {\n  /** actionResult */\n  a: ActionResult\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** flightData */\n  f: FlightData\n  /** renderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n}\n\nexport type RSCPayload =\n  | InitialRSCPayload\n  | NavigationFlightResponse\n  | ActionFlightResponse\n\nexport type InstantCookie =\n  // pending (waiting to capture)\n  | [captured: 0, id: string]\n  // captured MPA page load\n  | [captured: 1, id: string, state: null]\n  // captured SPA navigation (from/to route trees)\n  | [\n      captured: 1,\n      id: string,\n      state: { from: FlightRouterState; to: FlightRouterState | null },\n    ]\n","let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n  deploymentId = document.documentElement.dataset.dplId\n  // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n  // HTML only), React isn't aware of it at all.\n  delete document.documentElement.dataset.dplId\n} else {\n  // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n  // Server side: left as is or replaced with a string or replaced with false\n  deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n  return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n  let id = getDeploymentId()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n\nexport function getAssetToken(): string | undefined {\n  return process.env.NEXT_SUPPORTS_IMMUTABLE_ASSETS\n    ? undefined\n    : process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n  let id = getAssetToken()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n","export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS'\n","// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n  let hash = 5381\n  for (let i = 0; i < str.length; i++) {\n    const char = str.charCodeAt(i)\n    hash = ((hash << 5) + hash + char) & 0xffffffff\n  }\n  return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n  return djb2Hash(str).toString(36).slice(0, 5)\n}\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n  updateHead?: (state: any) => void\n  mountedInstances?: any\n  updateScripts?: (state: any) => void\n  scripts?: any\n  getIsSsr?: () => boolean\n\n  // Used in app directory, to render script tags as server components.\n  appDir?: boolean\n  nonce?: string\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n  HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","'use client'\n\nimport { createContext } from 'react'\nimport type { Params } from '../../server/request/params'\nimport { ReadonlyURLSearchParams } from '../../client/components/readonly-url-search-params'\n\nexport const SearchParamsContext = createContext<URLSearchParams | null>(null)\nexport const PathnameContext = createContext<string | null>(null)\nexport const PathParamsContext = createContext<Params | null>(null)\n\n// Dev-only context for Suspense DevTools instrumentation\n// These promises are used to track navigation hook usage in React DevTools\nexport type InstrumentedPromise<T> = Promise<T> & {\n  status: 'fulfilled'\n  value: T\n  displayName: string\n}\n\nexport type NavigationPromises = {\n  pathname: InstrumentedPromise<string>\n  searchParams: InstrumentedPromise<ReadonlyURLSearchParams>\n  params: InstrumentedPromise<Params>\n  // Layout segment hooks (updated at each layout boundary)\n  selectedLayoutSegmentPromises?: Map<\n    string,\n    InstrumentedPromise<string | null>\n  >\n  selectedLayoutSegmentsPromises?: Map<string, InstrumentedPromise<string[]>>\n}\n\nexport const NavigationPromisesContext =\n  createContext<NavigationPromises | null>(null)\n\n// Creates an instrumented promise for Suspense DevTools\n// These promises are always fulfilled and exist purely for\n// tracking in React's Suspense DevTools.\nexport function createDevToolsInstrumentedPromise<T>(\n  displayName: string,\n  value: T\n): InstrumentedPromise<T> {\n  const promise = Promise.resolve(value) as InstrumentedPromise<T>\n  promise.status = 'fulfilled'\n  promise.value = value\n  promise.displayName = `${displayName} (SSR)`\n  return promise\n}\n\nexport { ReadonlyURLSearchParams }\n\nif (process.env.NODE_ENV !== 'production') {\n  SearchParamsContext.displayName = 'SearchParamsContext'\n  PathnameContext.displayName = 'PathnameContext'\n  PathParamsContext.displayName = 'PathParamsContext'\n  NavigationPromisesContext.displayName = 'NavigationPromisesContext'\n}\n","// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: { [match: string]: string } = {\n  '&': '\\\\u0026',\n  '>': '\\\\u003e',\n  '<': '\\\\u003c',\n  '\\u2028': '\\\\u2028',\n  '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nconst ATTRIBUTE_ESCAPE_LOOKUP: { [match: string]: string } = {\n  '&': '&amp;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n  '<': '&lt;',\n  '>': '&gt;',\n}\n\nconst ATTRIBUTE_ESCAPE_REGEX = /[&\"'<>]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n  return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match])\n}\n\nexport function htmlEscapeAttributeString(str: string): string {\n  return str.replace(\n    ATTRIBUTE_ESCAPE_REGEX,\n    (match) => ATTRIBUTE_ESCAPE_LOOKUP[match]\n  )\n}\n","export function createUnrenderedSegmentError(\n  route: string,\n  missingFiles: readonly string[]\n): Error {\n  let message = `Route \"${route}\": Could not validate that a segment in your UI has instant navigation.`\n  if (missingFiles.length > 0) {\n    const label =\n      missingFiles.length === 1 ? 'Dropped segment' : 'Dropped segments'\n    message +=\n      `\\n\\nThis segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.` +\n      `\\n\\n${label}:\\n${missingFiles.map((p) => `  ${p}`).join('\\n')}` +\n      `\\n\\nWays to fix this:` +\n      `\\n  - [render] Render the dropped segment` +\n      `\\n  - [ignore] Set \\`export const instant = false\\` to opt the dropped segment out of instant-navigation validation` +\n      `\\n\\nLearn more: https://nextjs.org/docs/messages/instant-unrendered-segment`\n  }\n  return new Error(message)\n}\n\nexport function createLinkPrefetchPartialError(pathname: string): Error {\n  return new Error(\n    `Next.js encountered dynamic data during prefetching for \"${pathname}\".\\n\\n` +\n      `This will lead to slower, more expensive prefetches.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [upgrade] Opt into Partial Prefetching by exporting \\`const prefetch = 'partial'\\` from the page or layout, or by setting \\`partialPrefetching: true\\` in next.config to opt the whole app in\\n` +\n      `  - [disable] Remove \\`prefetch={true}\\` from the <Link> to use the default prefetch\\n` +\n      `  - [ignore] Set \\`export const instant = false\\` to opt the route out of instant-navigation validation\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`\n  )\n}\n","export class InvariantError extends Error {\n  constructor(message: string, options?: ErrorOptions) {\n    super(\n      `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n      options\n    )\n    this.name = 'InvariantError'\n  }\n}\n","export function getObjectClassLabel(value: any): string {\n  return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n  if (getObjectClassLabel(value) !== '[object Object]') {\n    return false\n  }\n\n  const prototype = Object.getPrototypeOf(value)\n\n  /**\n   * this used to be previously:\n   *\n   * `return prototype === null || prototype === Object.prototype`\n   *\n   * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n   *\n   * It was changed to the current implementation since it's resilient to serialization.\n   */\n  return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n  promise: Promise<T> | T\n): promise is Promise<T> {\n  return (\n    promise !== null &&\n    typeof promise === 'object' &&\n    'then' in promise &&\n    typeof promise.then === 'function'\n  )\n}\n","/**\n * This module is for next.js server internal usage of path module.\n * It will use native path module for nodejs runtime.\n * It will use path-browserify polyfill for edge runtime.\n */\nlet path\n\nif (process.env.NEXT_RUNTIME === 'edge') {\n  path = require('next/dist/compiled/path-browserify')\n} else {\n  path = require('path')\n}\n\nmodule.exports = path\n","// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.\n// Keep file changes in sync with the corresponding `.d.ts` files.\n\n/**\n * These are the minimum browser versions that we consider \"modern\" and thus compile for by default.\n * This list was generated using `pnpm browserslist \"baseline widely available\"` on 2025-10-01.\n */\nconst MODERN_BROWSERSLIST_TARGET = [\n  'chrome 111',\n  'edge 111',\n  'firefox 111',\n  'safari 16.4',\n]\n\nmodule.exports = MODERN_BROWSERSLIST_TARGET\n","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n  return path.startsWith('/') ? path : `/${path}`\n}\n","export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n  // Shim of Stage 4 Promise.withResolvers proposal\n  let resolve: (value: T | PromiseLike<T>) => void\n  let reject: (reason: any) => void\n  const promise = new Promise<T>((res, rej) => {\n    resolve = res\n    reject = rej\n  })\n  return { resolve: resolve!, reject: reject!, promise }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n  if (!path.startsWith('/') || !prefix) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  return `${prefix}${pathname}${query}${hash}`\n}\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n  return ensureLeadingSlash(\n    route.split('/').reduce((pathname, segment, index, segments) => {\n      // Empty segments are ignored.\n      if (!segment) {\n        return pathname\n      }\n\n      // Groups are ignored.\n      if (isGroupSegment(segment)) {\n        return pathname\n      }\n\n      // Parallel segments are ignored.\n      if (segment[0] === '@') {\n        return pathname\n      }\n\n      // The last segment (if it's a leaf) should be ignored.\n      if (\n        (segment === 'page' || segment === 'route') &&\n        index === segments.length - 1\n      ) {\n        return pathname\n      }\n\n      return `${pathname}/${segment}`\n    }, '')\n  )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n  const aHasSlot = a.includes('/@')\n  const bHasSlot = b.includes('/@')\n  if (aHasSlot && !bHasSlot) return -1\n  if (!aHasSlot && bHasSlot) return 1\n  return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n  return url.replace(\n    /\\.rsc($|\\?)/,\n    // $1 ensures `?` is preserved\n    '$1'\n  )\n}\n","import { hexHash } from '../../hash'\n\nconst CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12\nconst textEncoder = new TextEncoder()\n\nfunction encodeCacheBustingSearchParam(bytes: Uint8Array): string {\n  let binary = ''\n  for (let i = 0; i < bytes.length; i++) {\n    binary += String.fromCharCode(bytes[i])\n  }\n\n  return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\nfunction normalizeCacheBustingInput(\n  value: string | string[] | undefined\n): string {\n  if (value === undefined) {\n    return '0'\n  }\n  return Array.isArray(value) ? value.join(',') : value\n}\n\nfunction createCacheBustingSearchParamInput(\n  prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n  segmentPrefetchHeader: string | string[] | undefined,\n  stateTreeHeader: string | string[] | undefined,\n  nextUrlHeader: string | string[] | undefined\n): string | null {\n  if (\n    (prefetchHeader === undefined || prefetchHeader === '0') &&\n    segmentPrefetchHeader === undefined &&\n    stateTreeHeader === undefined &&\n    nextUrlHeader === undefined\n  ) {\n    return null\n  }\n\n  return [\n    prefetchHeader ?? '0',\n    normalizeCacheBustingInput(segmentPrefetchHeader),\n    normalizeCacheBustingInput(stateTreeHeader),\n    normalizeCacheBustingInput(nextUrlHeader),\n  ].join(',')\n}\n\nasync function computeCacheBustingSearchParamFromInput(\n  input: string\n): Promise<string> {\n  // Truncate SHA-256 to 96 bits to keep `_rsc` compact\n  const digest = await globalThis.crypto.subtle.digest(\n    'SHA-256',\n    textEncoder.encode(input)\n  )\n  return encodeCacheBustingSearchParam(\n    new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES)\n  )\n}\n\nexport async function computeCacheBustingSearchParam(\n  prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n  segmentPrefetchHeader: string | string[] | undefined,\n  stateTreeHeader: string | string[] | undefined,\n  nextUrlHeader: string | string[] | undefined\n): Promise<string> {\n  const input = createCacheBustingSearchParamInput(\n    prefetchHeader,\n    segmentPrefetchHeader,\n    stateTreeHeader,\n    nextUrlHeader\n  )\n  if (input === null) {\n    return ''\n  }\n\n  return computeCacheBustingSearchParamFromInput(input)\n}\n\nexport function computeLegacyCacheBustingSearchParam(\n  prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n  segmentPrefetchHeader: string | string[] | undefined,\n  stateTreeHeader: string | string[] | undefined,\n  nextUrlHeader: string | string[] | undefined\n): string {\n  const input = createCacheBustingSearchParamInput(\n    prefetchHeader,\n    segmentPrefetchHeader,\n    stateTreeHeader,\n    nextUrlHeader\n  )\n  if (input === null) {\n    return ''\n  }\n\n  return hexHash(input)\n}\n","import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n  paramName: string\n  paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n  const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n    segment.startsWith(marker)\n  )\n\n  // if an interception marker is part of the path segment, we need to jump ahead\n  // to the relevant portion for param parsing\n  if (interceptionMarker) {\n    segment = segment.slice(interceptionMarker.length)\n  }\n\n  if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n    return {\n      // TODO-APP: Optional catchall does not currently work with parallel routes,\n      // so for now aren't handling a potential interception marker.\n      paramType: 'optional-catchall',\n      paramName: segment.slice(5, -2),\n    }\n  }\n\n  if (segment.startsWith('[...') && segment.endsWith(']')) {\n    return {\n      paramType: interceptionMarker\n        ? `catchall-intercepted-${interceptionMarker}`\n        : 'catchall',\n      paramName: segment.slice(4, -1),\n    }\n  }\n\n  if (segment.startsWith('[') && segment.endsWith(']')) {\n    return {\n      paramType: interceptionMarker\n        ? `dynamic-intercepted-${interceptionMarker}`\n        : 'dynamic',\n      paramName: segment.slice(1, -1),\n    }\n  }\n\n  return null\n}\n\nexport function isCatchAll(\n  type: DynamicParamTypes\n): type is\n  | 'catchall'\n  | 'catchall-intercepted-(..)(..)'\n  | 'catchall-intercepted-(.)'\n  | 'catchall-intercepted-(..)'\n  | 'catchall-intercepted-(...)'\n  | 'optional-catchall' {\n  return (\n    type === 'catchall' ||\n    type === 'catchall-intercepted-(..)(..)' ||\n    type === 'catchall-intercepted-(.)' ||\n    type === 'catchall-intercepted-(..)' ||\n    type === 'catchall-intercepted-(...)' ||\n    type === 'optional-catchall'\n  )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n  repeat: boolean\n  optional: boolean\n} {\n  let repeat = false\n  let optional = false\n\n  switch (paramType) {\n    case 'catchall':\n    case 'catchall-intercepted-(..)(..)':\n    case 'catchall-intercepted-(.)':\n    case 'catchall-intercepted-(..)':\n    case 'catchall-intercepted-(...)':\n      repeat = true\n      break\n    case 'optional-catchall':\n      repeat = true\n      optional = true\n      break\n    case 'dynamic':\n    case 'dynamic-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(.)':\n    case 'dynamic-intercepted-(..)':\n    case 'dynamic-intercepted-(...)':\n      break\n    default:\n      paramType satisfies never\n  }\n\n  return { repeat, optional }\n}\n","import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n  '(..)(..)',\n  '(.)',\n  '(..)',\n  '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n  // TODO-APP: add more serious validation\n  return (\n    path\n      .split('/')\n      .find((segment) =>\n        INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n      ) !== undefined\n  )\n}\n\ntype InterceptionRouteInformation = {\n  /**\n   * The intercepting route. This is the route that is being intercepted or the\n   * route that the user was coming from. This is matched by the Next-Url\n   * header.\n   */\n  interceptingRoute: string\n\n  /**\n   * The intercepted route. This is the route that is being intercepted or the\n   * route that the user is going to. This is matched by the request pathname.\n   */\n  interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n  path: string\n): InterceptionRouteInformation {\n  let interceptingRoute: string | undefined\n  let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n  let interceptedRoute: string | undefined\n\n  for (const segment of path.split('/')) {\n    marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n    if (marker) {\n      ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n      break\n    }\n  }\n\n  if (!interceptingRoute || !marker || !interceptedRoute) {\n    throw new Error(\n      `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n    )\n  }\n\n  interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n  switch (marker) {\n    case '(.)':\n      // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n      if (interceptingRoute === '/') {\n        interceptedRoute = `/${interceptedRoute}`\n      } else {\n        interceptedRoute = interceptingRoute + '/' + interceptedRoute\n      }\n      break\n    case '(..)':\n      // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n      if (interceptingRoute === '/') {\n        throw new Error(\n          `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n        )\n      }\n      interceptedRoute = interceptingRoute\n        .split('/')\n        .slice(0, -1)\n        .concat(interceptedRoute)\n        .join('/')\n      break\n    case '(...)':\n      // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n      interceptedRoute = '/' + interceptedRoute\n      break\n    case '(..)(..)':\n      // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n      const splitInterceptingRoute = interceptingRoute.split('/')\n      if (splitInterceptingRoute.length <= 2) {\n        throw new Error(\n          `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n        )\n      }\n\n      interceptedRoute = splitInterceptingRoute\n        .slice(0, -2)\n        .concat(interceptedRoute)\n        .join('/')\n      break\n    default:\n      throw new Error('Invariant: unexpected marker')\n  }\n\n  return { interceptingRoute, interceptedRoute }\n}\n","// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n  /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n","import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n  return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n  return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n  return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n  if (isDomBotUA(userAgent)) {\n    return 'dom'\n  }\n  if (isHtmlLimitedBotUA(userAgent)) {\n    return 'html'\n  }\n  return undefined\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n  const hashIndex = path.indexOf('#')\n  const queryIndex = path.indexOf('?')\n  const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n  if (hasQuery || hashIndex > -1) {\n    return {\n      pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n      query: hasQuery\n        ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n        : '',\n      hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n    }\n  }\n\n  return { pathname: path, query: '', hash: '' }\n}\n","import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n  auth: string | null\n  hash: string\n  host: string | null\n  hostname: string | null\n  href: string\n  pathname: string\n  port: string | null\n  protocol: string | null\n  query: ParsedUrlQuery\n  search: string\n  slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n  url: string,\n  base?: string,\n  parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n  url: string,\n  base: string | undefined,\n  parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n  url: string,\n  base?: string,\n  parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n  const globalBase = new URL(\n    typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n  )\n\n  const resolvedBase = base\n    ? new URL(base, globalBase)\n    : url.startsWith('.')\n      ? new URL(\n          typeof window === 'undefined' ? 'http://n' : window.location.href\n        )\n      : globalBase\n\n  const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n    '/'\n  )\n    ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n      // See https://nodejs.org/api/http.html#messageurl\n      // Not using `origin` to support other protocols\n      new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n    : new URL(url, resolvedBase)\n\n  if (origin !== globalBase.origin) {\n    throw new Error(`invariant: invalid relative URL, router received ${url}`)\n  }\n\n  return {\n    auth: null,\n    host: null,\n    hostname: null,\n    pathname,\n    port: null,\n    protocol: null,\n    query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n    search,\n    hash,\n    href: href.slice(origin.length),\n    // We don't know for relative URLs at this point since we set a custom, internal\n    // base that isn't surfaced to users.\n    slashes: null,\n  }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n  if (typeof path !== 'string') {\n    return false\n  }\n\n  const { pathname } = parsePath(path)\n  return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n  searchParams: URLSearchParams\n): ParsedUrlQuery {\n  const query: ParsedUrlQuery = {}\n  for (const [key, value] of searchParams.entries()) {\n    const existing = query[key]\n    if (typeof existing === 'undefined') {\n      query[key] = value\n    } else if (Array.isArray(existing)) {\n      existing.push(value)\n    } else {\n      query[key] = [existing, value]\n    }\n  }\n  return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n  if (typeof param === 'string') {\n    return param\n  }\n\n  if (\n    (typeof param === 'number' && !isNaN(param)) ||\n    typeof param === 'boolean'\n  ) {\n    return String(param)\n  } else {\n    return ''\n  }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n  const searchParams = new URLSearchParams()\n  for (const [key, value] of Object.entries(query)) {\n    if (Array.isArray(value)) {\n      for (const item of value) {\n        searchParams.append(key, stringifyUrlQueryParam(item))\n      }\n    } else {\n      searchParams.set(key, stringifyUrlQueryParam(value))\n    }\n  }\n  return searchParams\n}\n\nexport function assign(\n  target: URLSearchParams,\n  ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n  for (const searchParams of searchParamsList) {\n    for (const key of searchParams.keys()) {\n      target.delete(key)\n    }\n\n    for (const [key, value] of searchParams.entries()) {\n      target.append(key, value)\n    }\n  }\n\n  return target\n}\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n  // If the path doesn't start with the prefix we can return it as is. This\n  // protects us from situations where the prefix is a substring of the path\n  // prefix such as:\n  //\n  // For prefix: /blog\n  //\n  //   /blog -> true\n  //   /blog/ -> true\n  //   /blog/1 -> true\n  //   /blogging -> false\n  //   /blogging/ -> false\n  //   /blogging/1 -> false\n  if (!pathHasPrefix(path, prefix)) {\n    return path\n  }\n\n  // Remove the prefix from the path via slicing.\n  const withoutPrefix = path.slice(prefix.length)\n\n  // If the path without the prefix starts with a `/` we can return it as is.\n  if (withoutPrefix.startsWith('/')) {\n    return withoutPrefix\n  }\n\n  // If the path without the prefix doesn't start with a `/` we need to add it\n  // back to the path to make sure it's a valid path.\n  return `/${withoutPrefix}`\n}\n","/**\n * Removes the trailing slash for a given route or page path. Examples:\n *   - `/foo/bar/` -> `/foo/bar`\n *   - `/foo/bar` -> `/foo/bar`\n *\n * Uses charCodeAt (47 === '/') instead of regex to avoid the overhead of\n * compiling and executing a RegExp on every call (~3-5x faster).\n */\nexport function removeTrailingSlash(route: string) {\n  return route.charCodeAt(route.length - 1) === 47 && route.length > 1\n    ? route.slice(0, -1)\n    : route\n}\n","import { PAGE_SEGMENT_KEY } from '../segment'\nimport type { Segment as FlightRouterStateSegment } from '../app-router-types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type SegmentRequestKeyPart = Opaque<'SegmentRequestKeyPart', string>\nexport type SegmentRequestKey = Opaque<'SegmentRequestKey', string>\n\nexport const ROOT_SEGMENT_REQUEST_KEY = '' as SegmentRequestKey\n\nexport const HEAD_REQUEST_KEY = '/_head' as SegmentRequestKey\n\nexport function createSegmentRequestKeyPart(\n  segment: FlightRouterStateSegment\n): SegmentRequestKeyPart {\n  if (typeof segment === 'string') {\n    if (segment.startsWith(PAGE_SEGMENT_KEY)) {\n      // The Flight Router State type sometimes includes the search params in\n      // the page segment. However, the Segment Cache tracks this as a separate\n      // key. So, we strip the search params here, and then add them back when\n      // the cache entry is turned back into a FlightRouterState. This is an\n      // unfortunate consequence of the FlightRouteState being used both as a\n      // transport type and as a cache key; we'll address this once more of the\n      // Segment Cache implementation has settled.\n      // TODO: We should hoist the search params out of the FlightRouterState\n      // type entirely, This is our plan for dynamic route params, too.\n      return PAGE_SEGMENT_KEY as SegmentRequestKeyPart\n    }\n    const safeName =\n      // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n      // But params typically don't include the leading slash. We should use\n      // a different encoding to avoid this special case.\n      segment === '/_not-found'\n        ? '_not-found'\n        : encodeToFilesystemAndURLSafeString(segment)\n    // Since this is not a dynamic segment, it's fully encoded. It does not\n    // need to be \"hydrated\" with a param value.\n    return safeName as SegmentRequestKeyPart\n  }\n\n  const name = segment[0]\n  const paramType = segment[2]\n  const safeName = encodeToFilesystemAndURLSafeString(name)\n\n  const encodedName = '$' + paramType + '$' + safeName\n  return encodedName as SegmentRequestKeyPart\n}\n\nexport function appendSegmentRequestKeyPart(\n  parentRequestKey: SegmentRequestKey,\n  parallelRouteKey: string,\n  childRequestKeyPart: SegmentRequestKeyPart\n): SegmentRequestKey {\n  // Aside from being filesystem safe, segment keys are also designed so that\n  // each segment and parallel route creates its own subdirectory. Roughly in\n  // the same shape as the source app directory. This is mostly just for easier\n  // debugging (you can open up the build folder and navigate the output); if\n  // we wanted to do we could just use a flat structure.\n\n  // Omit the parallel route key for children, since this is the most\n  // common case. Saves some bytes (and it's what the app directory does).\n  const slotKey =\n    parallelRouteKey === 'children'\n      ? childRequestKeyPart\n      : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`\n  return (parentRequestKey + '/' + slotKey) as SegmentRequestKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n  if (simpleParamValueRegex.test(value)) {\n    return value\n  }\n  // If there are any unsafe characters, base64url-encode the entire value.\n  // We also add a ! prefix so it doesn't collide with the simple case.\n  const base64url = btoa(value)\n    .replace(/\\+/g, '-') // Replace '+' with '-'\n    .replace(/\\//g, '_') // Replace '/' with '_'\n    .replace(/=+$/, '') // Remove trailing '='\n  return '!' + base64url\n}\n\nexport function convertSegmentPathToStaticExportFilename(\n  segmentPath: string\n): string {\n  return `__next${segmentPath.replace(/\\//g, '.')}.txt`\n}\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n  return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n  // Use array[0] for performant purpose\n  return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n  return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n  segment: Segment,\n  searchParams: Record<string, string | string[] | undefined>\n) {\n  const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n  if (isPageSegment) {\n    const stringifiedQuery = JSON.stringify(searchParams)\n    return stringifiedQuery !== '{}'\n      ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n      : PAGE_SEGMENT_KEY\n  }\n\n  return segment\n}\n\nexport function computeSelectedLayoutSegment(\n  segments: string[] | null,\n  parallelRouteKey: string\n): string | null {\n  if (!segments || segments.length === 0) {\n    return null\n  }\n\n  // For 'children', use first segment; for other parallel routes, use last segment\n  const rawSegment =\n    parallelRouteKey === 'children'\n      ? segments[0]\n      : segments[segments.length - 1]\n\n  // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n  // Returning an internal value like `__DEFAULT__` would be confusing\n  return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n  tree: FlightRouterState,\n  parallelRouteKey: string,\n  first = true,\n  segmentPath: string[] = []\n): string[] {\n  let node: FlightRouterState\n  if (first) {\n    // Use the provided parallel route key on the first parallel route\n    node = tree[1][parallelRouteKey]\n  } else {\n    // After first parallel route prefer children, if there's no children pick the first parallel route.\n    const parallelRoutes = tree[1]\n    node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n  }\n\n  if (!node) return segmentPath\n  const segment = node[0]\n\n  let segmentValue = getSegmentValue(segment)\n\n  if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n    return segmentPath\n  }\n\n  segmentPath.push(segmentValue)\n\n  return getSelectedLayoutSegmentPath(\n    node,\n    parallelRouteKey,\n    false,\n    segmentPath\n  )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","export interface ServerReferenceInfo {\n  type: 'server-action' | 'use-cache'\n  usedArgs: [boolean, boolean, boolean, boolean, boolean, boolean]\n  hasRestArgs: boolean\n}\n\nexport const SERVER_REFERENCE_ID_LENGTH = 42\n\nexport function mightBeServerReferenceId(id: string): boolean {\n  return id.length === SERVER_REFERENCE_ID_LENGTH\n}\n\n/**\n * Extracts info about the server reference for the given server reference ID by\n * parsing the first byte of the hex-encoded ID.\n *\n * ```\n * Bit positions: [7]      [6] [5] [4] [3] [2] [1]  [0]\n * Bits:          typeBit  argMask                  restArgs\n * ```\n *\n * If the `typeBit` is `1` the server reference represents a `\"use cache\"`\n * function, otherwise a server action.\n *\n * The `argMask` encodes whether the function uses the argument at the\n * respective position.\n *\n * The `restArgs` bit indicates whether the function uses a rest parameter. It's\n * also set to 1 if the function has more than 6 args.\n *\n * @param id hex-encoded server reference ID\n */\nexport function extractInfoFromServerReferenceId(\n  id: string\n): ServerReferenceInfo {\n  const infoByte = parseInt(id.slice(0, 2), 16)\n  const typeBit = (infoByte >> 7) & 0x1\n  const argMask = (infoByte >> 1) & 0x3f\n  const restArgs = infoByte & 0x1\n  const usedArgs = Array(6)\n\n  for (let index = 0; index < 6; index++) {\n    const bitPosition = 5 - index\n    const bit = (argMask >> bitPosition) & 0x1\n    usedArgs[index] = bit === 1\n  }\n\n  return {\n    type: typeBit === 1 ? 'use-cache' : 'server-action',\n    usedArgs: usedArgs as [\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n    ],\n    hasRestArgs: restArgs === 1,\n  }\n}\n\n/**\n * Creates a sparse array containing only the used arguments based on the\n * provided action info.\n */\nexport function omitUnusedArgs(\n  args: unknown[],\n  info: ServerReferenceInfo\n): unknown[] {\n  const filteredArgs = new Array(args.length)\n  let length = 0\n\n  for (let index = 0; index < args.length; index++) {\n    if (\n      (index < 6 && info.usedArgs[index]) ||\n      // This assumes that the server reference info byte has the restArgs bit\n      // set to 1 if there are more than 6 args.\n      (index >= 6 && info.hasRestArgs)\n    ) {\n      filteredArgs[index] = args[index]\n      length = index + 1\n    }\n  }\n\n  // Trim trailing unused args from the array.\n  filteredArgs.length = length\n\n  return filteredArgs\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n  Context extends BaseContext = NextPageContext,\n  InitialProps = {},\n  Props = {},\n> = ComponentType<Props> & {\n  /**\n   * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n   * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n   * @param context Context of `page`\n   */\n  getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n  DocumentContext,\n  DocumentInitialProps,\n  DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n  AppContextType,\n  P,\n  AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n  AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n  id: string\n  startTime: number\n  value: number\n  attribution?: { [key: string]: unknown }\n} & (\n  | {\n      label: 'web-vital'\n      name: (typeof WEB_VITALS)[number]\n    }\n  | {\n      label: 'custom'\n      name:\n        | 'Next.js-hydration'\n        | 'Next.js-route-change-to-render'\n        | 'Next.js-render'\n    }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n  | {\n      enhanceApp?: Enhancer<AppType>\n      enhanceComponent?: Enhancer<NextComponentType>\n    }\n  | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n  html: string\n  head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n  options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n  res?: ServerResponse\n  [k: string]: any\n}\n\nexport type NEXT_DATA = {\n  props: Record<string, any>\n  page: string\n  query: ParsedUrlQuery\n  buildId: string\n  assetPrefix?: string\n  nextExport?: boolean\n  autoExport?: boolean\n  isFallback?: boolean\n  isExperimentalCompile?: boolean\n  dynamicIds?: (string | number)[]\n  err?: Error & {\n    statusCode?: number\n    source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n    __NEXT_ERROR_CODE?: string\n  }\n  gsp?: boolean\n  gssp?: boolean\n  customServer?: boolean\n  gip?: boolean\n  appGip?: boolean\n  locale?: string\n  locales?: readonly string[]\n  defaultLocale?: string\n  domainLocales?: readonly DomainLocale[]\n  scriptLoader?: any[]\n  isPreview?: boolean\n  notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n  /**\n   * Error object if encountered during rendering\n   */\n  err?: (Error & { statusCode?: number }) | null\n  /**\n   * `HTTP` request object.\n   */\n  req?: IncomingMessage\n  /**\n   * `HTTP` response object.\n   */\n  res?: ServerResponse\n  /**\n   * Path section of `URL`.\n   */\n  pathname: string\n  /**\n   * Query string section of `URL` parsed as an object.\n   */\n  query: ParsedUrlQuery\n  /**\n   * `String` of the actual path including query.\n   */\n  asPath?: string\n  /**\n   * The currently active locale\n   */\n  locale?: string\n  /**\n   * All configured locales\n   */\n  locales?: readonly string[]\n  /**\n   * The configured default locale\n   */\n  defaultLocale?: string\n  /**\n   * `Component` the tree of the App to use if needing to render separately\n   */\n  AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n  Component: NextComponentType<NextPageContext>\n  AppTree: AppTreeType\n  ctx: NextPageContext\n  router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n  pageProps: PageProps\n}\n\nexport type AppPropsType<\n  Router extends NextRouter = NextRouter,\n  PageProps = {},\n> = AppInitialProps<PageProps> & {\n  Component: NextComponentType<NextPageContext, any, any>\n  router: Router\n  __N_SSG?: boolean\n  __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n  renderPage: RenderPage\n  defaultGetInitialProps(\n    ctx: DocumentContext,\n    options?: { nonce?: string }\n  ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n  styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n  /**\n   * Object of `query` values from url\n   */\n  query: Partial<{\n    [key: string]: string | string[]\n  }>\n  /**\n   * Object of `cookies` from header\n   */\n  cookies: Partial<{\n    [key: string]: string\n  }>\n\n  body: any\n\n  env: Env\n\n  draftMode?: boolean\n\n  preview?: boolean\n  /**\n   * Preview data set on the request, if any\n   * */\n  previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n  /**\n   * Send data `any` data in response\n   */\n  send: Send<Data>\n  /**\n   * Send data `json` data in response\n   */\n  json: Send<Data>\n  status: (statusCode: number) => NextApiResponse<Data>\n  redirect(url: string): NextApiResponse<Data>\n  redirect(status: number, url: string): NextApiResponse<Data>\n\n  /**\n   * Set draft mode\n   */\n  setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n  /**\n   * Set preview data for Next.js' prerender mode\n   */\n  setPreviewData: (\n    data: object | string,\n    options?: {\n      /**\n       * Specifies the number (in seconds) for the preview session to last for.\n       * The given number will be converted to an integer by rounding down.\n       * By default, no maximum age is set and the preview session finishes\n       * when the client shuts down (browser is closed).\n       */\n      maxAge?: number\n      /**\n       * Specifies the path for the preview session to work under. By default,\n       * the path is considered the \"default path\", i.e., any pages under \"/\".\n       */\n      path?: string\n    }\n  ) => NextApiResponse<Data>\n\n  /**\n   * Clear preview data for Next.js' prerender mode\n   */\n  clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n  /**\n   * Revalidate a specific page and regenerate it using On-Demand Incremental\n   * Static Regeneration.\n   * The path should be an actual path, not a rewritten path. E.g. for\n   * \"/blog/[slug]\" this should be \"/blog/post-1\".\n   * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n   */\n  revalidate: (\n    urlPath: string,\n    opts?: {\n      unstable_onlyGenerated?: boolean\n    }\n  ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n  req: NextApiRequest,\n  res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n  fn: T\n): T {\n  let used = false\n  let result: ReturnType<T>\n\n  return ((...args: any[]) => {\n    if (!used) {\n      used = true\n      result = fn(...args)\n    }\n    return result\n  }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => {\n  // Fast path: an absolute URL must start with a letter (the scheme).\n  // Check for a-z and A-Z without the cost of the regex.\n  const c = url.charCodeAt(0)\n  const isLetter =\n    (c >= 65 /* A */ && c <= 90) /* Z */ ||\n    (c >= 97 /* a */ && c <= 122) /* z */\n  if (!isLetter) {\n    return false\n  }\n\n  return ABSOLUTE_URL_REGEX.test(url)\n}\n\nexport function getLocationOrigin() {\n  const { protocol, hostname, port } = window.location\n  return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n  const { href } = window.location\n  const origin = getLocationOrigin()\n  return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n  return typeof Component === 'string'\n    ? Component\n    : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n  return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n  const urlParts = url.split('?')\n  const urlNoQuery = urlParts[0]\n\n  return (\n    urlNoQuery\n      // first we replace any non-encoded backslashes with forward\n      // then normalize repeated forward slashes\n      .replace(/\\\\/g, '/')\n      .replace(/\\/\\/+/g, '/') +\n    (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n  )\n}\n\nexport async function loadGetInitialProps<\n  C extends BaseContext,\n  IP = {},\n  P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n  if (process.env.NODE_ENV !== 'production') {\n    if (App.prototype?.getInitialProps) {\n      const message = `\"${getDisplayName(\n        App\n      )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n      throw new Error(message)\n    }\n  }\n  // when called from _app `ctx` is nested in `ctx`\n  const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n  if (!App.getInitialProps) {\n    if (ctx.ctx && ctx.Component) {\n      // @ts-ignore pageProps default\n      return {\n        pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n      }\n    }\n    return {} as IP\n  }\n\n  const props = await App.getInitialProps(ctx)\n\n  if (res && isResSent(res)) {\n    return props\n  }\n\n  if (!props) {\n    const message = `\"${getDisplayName(\n      App\n    )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n    throw new Error(message)\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (Object.keys(props).length === 0 && !ctx.ctx) {\n      console.warn(\n        `${getDisplayName(\n          App\n        )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n      )\n    }\n  }\n\n  return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n  SP &&\n  (['mark', 'measure', 'getEntriesByName'] as const).every(\n    (method) => typeof performance[method] === 'function'\n  )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n  code: string\n\n  constructor(page: string) {\n    super()\n    this.code = 'ENOENT'\n    this.name = 'PageNotFoundError'\n    this.message = `Cannot find module for page: ${page}`\n  }\n}\n\nexport class MissingStaticPage extends Error {\n  constructor(page: string, message: string) {\n    super()\n    this.message = `Failed to load static file for page: ${page} ${message}`\n  }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n  code: string\n  constructor() {\n    super()\n    this.code = 'ENOENT'\n    this.message = `Cannot find the middleware module`\n  }\n}\n\nexport interface CacheFs {\n  existsSync: typeof fs.existsSync\n  readFile: typeof fs.promises.readFile\n  readFileSync: typeof fs.readFileSync\n  writeFile(f: string, d: any): Promise<void>\n  mkdir(dir: string): Promise<void | string>\n  stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n  return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n  if (isDefinitelyAValidIdentifier.test(prop)) {\n    return `\\`${target}.${prop}\\``\n  }\n  return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n  target: string,\n  prop: string\n) {\n  const stringifiedProp = JSON.stringify(prop)\n  return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toString',\n  'valueOf',\n  'toLocaleString',\n\n  // Promise prototype\n  'then',\n  'catch',\n  'finally',\n\n  // React Promise extension\n  'status',\n  // 'value',\n  // 'error',\n\n  // React introspection\n  'displayName',\n  '_debugInfo',\n\n  // Common tested properties\n  'toJSON',\n  '$$typeof',\n  '__esModule',\n\n  // Tested by flight when checking for iterables\n  '@@iterator',\n])\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n  const warnings = new Set<string>()\n  warnOnce = (msg: string) => {\n    if (!warnings.has(msg)) {\n      console.warn(msg)\n    }\n    warnings.add(msg)\n  }\n}\n\nexport { warnOnce }\n","/**\n * @license React\n * react-dom.react-server.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function getCrossOriginStringAs(as, input) {\n      if (\"font\" === as) return \"\";\n      if (\"string\" === typeof input)\n        return \"use-credentials\" === input ? input : \"\";\n    }\n    function getValueDescriptorExpectingObjectForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : 'something with type \"' + typeof thing + '\"';\n    }\n    function getValueDescriptorExpectingEnumForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : \"string\" === typeof thing\n              ? JSON.stringify(thing)\n              : \"number\" === typeof thing\n                ? \"`\" + thing + \"`\"\n                : 'something with type \"' + typeof thing + '\"';\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      Internals = {\n        d: {\n          f: noop,\n          r: function () {\n            throw Error(\n              \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n            );\n          },\n          D: noop,\n          C: noop,\n          L: noop,\n          m: noop,\n          X: noop,\n          S: noop,\n          M: noop\n        },\n        p: 0,\n        findDOMNode: null\n      };\n    if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n      );\n    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      Internals;\n    exports.preconnect = function (href, options) {\n      \"string\" === typeof href && href\n        ? null != options && \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : null != options &&\n            \"string\" !== typeof options.crossOrigin &&\n            console.error(\n              \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n              getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n            )\n        : console.error(\n            \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      \"string\" === typeof href &&\n        (options\n          ? ((options = options.crossOrigin),\n            (options =\n              \"string\" === typeof options\n                ? \"use-credentials\" === options\n                  ? options\n                  : \"\"\n                : void 0))\n          : (options = null),\n        Internals.d.C(href, options));\n    };\n    exports.prefetchDNS = function (href) {\n      if (\"string\" !== typeof href || !href)\n        console.error(\n          \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n          getValueDescriptorExpectingObjectForWarning(href)\n        );\n      else if (1 < arguments.length) {\n        var options = arguments[1];\n        \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n          ? console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            );\n      }\n      \"string\" === typeof href && Internals.d.D(href);\n    };\n    exports.preinit = function (href, options) {\n      \"string\" === typeof href && href\n        ? null == options || \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : \"style\" !== options.as &&\n            \"script\" !== options.as &&\n            console.error(\n              'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n              getValueDescriptorExpectingEnumForWarning(options.as)\n            )\n        : console.error(\n            \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      if (\n        \"string\" === typeof href &&\n        options &&\n        \"string\" === typeof options.as\n      ) {\n        var as = options.as,\n          crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n          integrity =\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          fetchPriority =\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0;\n        \"style\" === as\n          ? Internals.d.S(\n              href,\n              \"string\" === typeof options.precedence\n                ? options.precedence\n                : void 0,\n              {\n                crossOrigin: crossOrigin,\n                integrity: integrity,\n                fetchPriority: fetchPriority\n              }\n            )\n          : \"script\" === as &&\n            Internals.d.X(href, {\n              crossOrigin: crossOrigin,\n              integrity: integrity,\n              fetchPriority: fetchPriority,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n            });\n      }\n    };\n    exports.preinitModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"script\" !== options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingEnumForWarning(options.as) +\n            \".\");\n      if (encountered)\n        console.error(\n          \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n          encountered\n        );\n      else\n        switch (\n          ((encountered =\n            options && \"string\" === typeof options.as ? options.as : \"script\"),\n          encountered)\n        ) {\n          case \"script\":\n            break;\n          default:\n            (encountered =\n              getValueDescriptorExpectingEnumForWarning(encountered)),\n              console.error(\n                'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n                encountered,\n                href\n              );\n        }\n      if (\"string\" === typeof href)\n        if (\"object\" === typeof options && null !== options) {\n          if (null == options.as || \"script\" === options.as)\n            (encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n              Internals.d.M(href, {\n                crossOrigin: encountered,\n                integrity:\n                  \"string\" === typeof options.integrity\n                    ? options.integrity\n                    : void 0,\n                nonce:\n                  \"string\" === typeof options.nonce ? options.nonce : void 0,\n                fetchPriority:\n                  \"string\" === typeof options.fetchPriority\n                    ? options.fetchPriority\n                    : void 0\n              });\n        } else null == options && Internals.d.M(href);\n    };\n    exports.preload = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      null == options || \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : (\"string\" === typeof options.as && options.as) ||\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      if (\n        \"string\" === typeof href &&\n        \"object\" === typeof options &&\n        null !== options &&\n        \"string\" === typeof options.as\n      ) {\n        encountered = options.as;\n        var crossOrigin = getCrossOriginStringAs(\n          encountered,\n          options.crossOrigin\n        );\n        Internals.d.L(href, encountered, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          type: \"string\" === typeof options.type ? options.type : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0,\n          referrerPolicy:\n            \"string\" === typeof options.referrerPolicy\n              ? options.referrerPolicy\n              : void 0,\n          imageSrcSet:\n            \"string\" === typeof options.imageSrcSet\n              ? options.imageSrcSet\n              : void 0,\n          imageSizes:\n            \"string\" === typeof options.imageSizes\n              ? options.imageSizes\n              : void 0,\n          media: \"string\" === typeof options.media ? options.media : void 0\n        });\n      }\n    };\n    exports.preloadModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"string\" !== typeof options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      \"string\" === typeof href &&\n        (options\n          ? ((encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n            Internals.d.m(href, {\n              as:\n                \"string\" === typeof options.as && \"script\" !== options.as\n                  ? options.as\n                  : void 0,\n              crossOrigin: encountered,\n              integrity:\n                \"string\" === typeof options.integrity\n                  ? options.integrity\n                  : void 0,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n              fetchPriority:\n                \"string\" === typeof options.fetchPriority\n                  ? options.fetchPriority\n                  : void 0\n            }))\n          : Internals.d.m(href));\n    };\n    exports.version = \"19.3.0-canary-cbb046ab-20260731\";\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-dom.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-dom.react-server.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack-server.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function voidHandler() {}\n    function noop() {}\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function flushBuffered(destination) {\n      \"function\" === typeof destination.flush && destination.flush();\n    }\n    function writeChunk(destination, chunk) {\n      if (\"string\" === typeof chunk) {\n        if (0 !== chunk.length)\n          if (4096 < 3 * chunk.length)\n            0 < writtenBytes &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0)),\n              writeToDestination(destination, chunk);\n          else {\n            var target = currentView;\n            0 < writtenBytes && (target = currentView.subarray(writtenBytes));\n            target = textEncoder.encodeInto(chunk, target);\n            var read = target.read;\n            writtenBytes += target.written;\n            read < chunk.length &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = textEncoder.encodeInto(\n                chunk.slice(read),\n                currentView\n              ).written));\n            4096 === writtenBytes &&\n              (writeToDestination(destination, currentView),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0));\n          }\n      } else\n        0 !== chunk.byteLength &&\n          (4096 < chunk.byteLength\n            ? (0 < writtenBytes &&\n                (writeToDestination(\n                  destination,\n                  currentView.subarray(0, writtenBytes)\n                ),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              writeToDestination(destination, chunk))\n            : ((target = currentView.length - writtenBytes),\n              target < chunk.byteLength &&\n                (0 === target\n                  ? writeToDestination(destination, currentView)\n                  : (currentView.set(chunk.subarray(0, target), writtenBytes),\n                    (writtenBytes += target),\n                    writeToDestination(destination, currentView),\n                    (chunk = chunk.subarray(target))),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              currentView.set(chunk, writtenBytes),\n              (writtenBytes += chunk.byteLength),\n              4096 === writtenBytes &&\n                (writeToDestination(destination, currentView),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0))));\n    }\n    function writeToDestination(destination, view) {\n      destination = destination.write(view);\n      destinationHasCapacity = destinationHasCapacity && destination;\n    }\n    function writeChunkAndReturn(destination, chunk) {\n      writeChunk(destination, chunk);\n      return destinationHasCapacity;\n    }\n    function completeWriting(destination) {\n      currentView &&\n        0 < writtenBytes &&\n        destination.write(currentView.subarray(0, writtenBytes));\n      currentView = null;\n      writtenBytes = 0;\n      destinationHasCapacity = !0;\n    }\n    function byteLengthOfChunk(chunk) {\n      return \"string\" === typeof chunk\n        ? Buffer.byteLength(chunk, \"utf8\")\n        : chunk.byteLength;\n    }\n    function isClientReference(reference) {\n      return reference.$$typeof === CLIENT_REFERENCE_TAG$1;\n    }\n    function registerClientReferenceImpl(proxyImplementation, id, async) {\n      return Object.defineProperties(proxyImplementation, {\n        $$typeof: { value: CLIENT_REFERENCE_TAG$1 },\n        $$id: { value: id },\n        $$async: { value: async }\n      });\n    }\n    function bind() {\n      var newFn = FunctionBind.apply(this, arguments);\n      if (this.$$typeof === SERVER_REFERENCE_TAG) {\n        null != arguments[0] &&\n          console.error(\n            'Cannot bind \"this\" of a Server Action. Pass null or undefined as the first argument to .bind().'\n          );\n        var args = ArraySlice.call(arguments, 1),\n          $$typeof = { value: SERVER_REFERENCE_TAG },\n          $$id = { value: this.$$id };\n        args = { value: this.$$bound ? this.$$bound.concat(args) : args };\n        return Object.defineProperties(newFn, {\n          $$typeof: $$typeof,\n          $$id: $$id,\n          $$bound: args,\n          $$location: { value: this.$$location, configurable: !0 },\n          bind: { value: bind, configurable: !0 }\n        });\n      }\n      return newFn;\n    }\n    function getReference(target, name) {\n      switch (name) {\n        case \"$$typeof\":\n          return target.$$typeof;\n        case \"$$id\":\n          return target.$$id;\n        case \"$$async\":\n          return target.$$async;\n        case \"name\":\n          return target.name;\n        case \"defaultProps\":\n          return;\n        case \"_debugInfo\":\n          return;\n        case \"toJSON\":\n          return;\n        case Symbol.toPrimitive:\n          return Object.prototype[Symbol.toPrimitive];\n        case Symbol.toStringTag:\n          return Object.prototype[Symbol.toStringTag];\n        case \"__esModule\":\n          var moduleId = target.$$id;\n          target.default = registerClientReferenceImpl(\n            function () {\n              throw Error(\n                \"Attempted to call the default export of \" +\n                  moduleId +\n                  \" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n              );\n            },\n            target.$$id + \"#\",\n            target.$$async\n          );\n          return !0;\n        case \"then\":\n          if (target.then) return target.then;\n          if (target.$$async) return;\n          var clientReference = registerClientReferenceImpl(\n              {},\n              target.$$id,\n              !0\n            ),\n            proxy = new Proxy(clientReference, proxyHandlers$1);\n          target.status = \"fulfilled\";\n          target.value = proxy;\n          return (target.then = registerClientReferenceImpl(\n            function (resolve) {\n              return Promise.resolve(resolve(proxy));\n            },\n            target.$$id + \"#then\",\n            !1\n          ));\n      }\n      if (\"symbol\" === typeof name)\n        throw Error(\n          \"Cannot read Symbol exports. Only named exports are supported on a client module imported on the server.\"\n        );\n      clientReference = target[name];\n      clientReference ||\n        ((clientReference = registerClientReferenceImpl(\n          function () {\n            throw Error(\n              \"Attempted to call \" +\n                String(name) +\n                \"() from the server but \" +\n                String(name) +\n                \" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n            );\n          },\n          target.$$id + \"#\" + name,\n          target.$$async\n        )),\n        Object.defineProperty(clientReference, \"name\", { value: name }),\n        (clientReference = target[name] =\n          new Proxy(clientReference, deepProxyHandlers)));\n      return clientReference;\n    }\n    function resolveClientReferenceMetadata(config, clientReference) {\n      var modulePath = clientReference.$$id,\n        name = \"\",\n        resolvedModuleData = config[modulePath];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = modulePath.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = modulePath.slice(idx + 1)),\n          (resolvedModuleData = config[modulePath.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              modulePath +\n              '\" in the React Client Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      if (!0 === resolvedModuleData.async && !0 === clientReference.$$async)\n        throw Error(\n          'The module \"' +\n            modulePath +\n            '\" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.'\n        );\n      return !0 === resolvedModuleData.async || !0 === clientReference.$$async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function preload(href, as, options) {\n      if (\"string\" === typeof href) {\n        var request = resolveRequest();\n        if (request) {\n          var hints = request.hints,\n            key = \"L\";\n          if (\"image\" === as && options) {\n            var imageSrcSet = options.imageSrcSet,\n              imageSizes = options.imageSizes,\n              uniquePart = \"\";\n            \"string\" === typeof imageSrcSet && \"\" !== imageSrcSet\n              ? ((uniquePart += \"[\" + imageSrcSet + \"]\"),\n                \"string\" === typeof imageSizes &&\n                  (uniquePart += \"[\" + imageSizes + \"]\"))\n              : (uniquePart += \"[][]\" + href);\n            key += \"[image]\" + uniquePart;\n          } else key += \"[\" + as + \"]\" + href;\n          hints.has(key) ||\n            (hints.add(key),\n            (options = trimOptions(options))\n              ? emitHint(request, \"L\", [href, as, options])\n              : emitHint(request, \"L\", [href, as]));\n        } else previousDispatcher.L(href, as, options);\n      }\n    }\n    function preloadModule$1(href, options) {\n      if (\"string\" === typeof href) {\n        var request = resolveRequest();\n        if (request) {\n          var hints = request.hints,\n            key = \"m|\" + href;\n          if (hints.has(key)) return;\n          hints.add(key);\n          return (options = trimOptions(options))\n            ? emitHint(request, \"m\", [href, options])\n            : emitHint(request, \"m\", href);\n        }\n        previousDispatcher.m(href, options);\n      }\n    }\n    function trimOptions(options) {\n      if (null == options) return null;\n      var hasProperties = !1,\n        trimmed = {},\n        key;\n      for (key in options)\n        null != options[key] &&\n          ((hasProperties = !0), (trimmed[key] = options[key]));\n      return hasProperties ? trimmed : null;\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      switch (type) {\n        case \"img\":\n          type = props.src;\n          var srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!type && !srcSet) ||\n              (\"string\" !== typeof type && null != type) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              parentContext & 3\n            ) &&\n            (\"string\" !== typeof type ||\n              \":\" !== type[4] ||\n              (\"d\" !== type[0] && \"D\" !== type[0]) ||\n              (\"a\" !== type[1] && \"A\" !== type[1]) ||\n              (\"t\" !== type[2] && \"T\" !== type[2]) ||\n              (\"a\" !== type[3] && \"A\" !== type[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0;\n            var input = props.crossOrigin;\n            preload(type || \"\", \"image\", {\n              imageSrcSet: srcSet,\n              imageSizes: sizes,\n              crossOrigin:\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0,\n              integrity: props.integrity,\n              type: props.type,\n              fetchPriority: props.fetchPriority,\n              referrerPolicy: props.referrerPolicy\n            });\n          }\n          return parentContext;\n        case \"link\":\n          type = props.rel;\n          srcSet = props.href;\n          if (\n            !(\n              parentContext & 1 ||\n              null != props.itemProp ||\n              \"string\" !== typeof type ||\n              \"string\" !== typeof srcSet ||\n              \"\" === srcSet\n            )\n          )\n            switch (type) {\n              case \"preload\":\n                preload(srcSet, props.as, {\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce,\n                  type: props.type,\n                  fetchPriority: props.fetchPriority,\n                  referrerPolicy: props.referrerPolicy,\n                  imageSrcSet: props.imageSrcSet,\n                  imageSizes: props.imageSizes,\n                  media: props.media\n                });\n                break;\n              case \"modulepreload\":\n                preloadModule$1(srcSet, {\n                  as: props.as,\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce\n                });\n                break;\n              case \"stylesheet\":\n                preload(srcSet, \"style\", {\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce,\n                  type: props.type,\n                  fetchPriority: props.fetchPriority,\n                  referrerPolicy: props.referrerPolicy,\n                  media: props.media\n                });\n            }\n          return parentContext;\n        case \"picture\":\n          return parentContext | 2;\n        case \"noscript\":\n          return parentContext | 1;\n        default:\n          return parentContext;\n      }\n    }\n    function resolveOwner() {\n      if (currentOwner) return currentOwner;\n      var owner = componentStorage.getStore();\n      return owner ? owner : null;\n    }\n    function resolvePromiseOrAwaitNode(unresolvedNode, endTime) {\n      unresolvedNode.tag = 3 === unresolvedNode.tag ? 1 : 2;\n      unresolvedNode.end = endTime;\n      return unresolvedNode;\n    }\n    function getAsyncSequenceFromPromise(promise) {\n      try {\n        var asyncId = getAsyncId.call(promise);\n      } catch (x) {}\n      if (void 0 === asyncId) return null;\n      promise = pendingOperations.get(asyncId);\n      return void 0 === promise ? null : promise;\n    }\n    function collectStackTracePrivate(error, structuredStackTrace) {\n      error = [];\n      for (var i = framesToSkip; i < structuredStackTrace.length; i++) {\n        var callSite = structuredStackTrace[i],\n          name = callSite.getFunctionName() || \"<anonymous>\";\n        if (name.includes(\"react_stack_bottom_frame\")) break;\n        else if (callSite.isNative())\n          (callSite = callSite.isAsync()),\n            error.push([name, \"\", 0, 0, 0, 0, callSite]);\n        else {\n          if (callSite.isConstructor()) name = \"new \" + name;\n          else if (!callSite.isToplevel()) {\n            var callSite$jscomp$0 = callSite;\n            name = callSite$jscomp$0.getTypeName();\n            var methodName = callSite$jscomp$0.getMethodName();\n            callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();\n            var result = \"\";\n            callSite$jscomp$0\n              ? (name &&\n                  identifierRegExp.test(callSite$jscomp$0) &&\n                  callSite$jscomp$0 !== name &&\n                  (result += name + \".\"),\n                (result += callSite$jscomp$0),\n                !methodName ||\n                  callSite$jscomp$0 === methodName ||\n                  callSite$jscomp$0.endsWith(\".\" + methodName) ||\n                  callSite$jscomp$0.endsWith(\" \" + methodName) ||\n                  (result += \" [as \" + methodName + \"]\"))\n              : (name && (result += name + \".\"),\n                (result = methodName\n                  ? result + methodName\n                  : result + \"<anonymous>\"));\n            name = result;\n          }\n          \"<anonymous>\" === name && (name = \"\");\n          methodName = callSite.getScriptNameOrSourceURL() || \"<anonymous>\";\n          \"<anonymous>\" === methodName &&\n            ((methodName = \"\"),\n            callSite.isEval() &&\n              (callSite$jscomp$0 = callSite.getEvalOrigin()) &&\n              (methodName = callSite$jscomp$0.toString() + \", <anonymous>\"));\n          callSite$jscomp$0 = callSite.getLineNumber() || 0;\n          result = callSite.getColumnNumber() || 0;\n          var enclosingLine =\n              \"function\" === typeof callSite.getEnclosingLineNumber\n                ? callSite.getEnclosingLineNumber() || 0\n                : 0,\n            enclosingCol =\n              \"function\" === typeof callSite.getEnclosingColumnNumber\n                ? callSite.getEnclosingColumnNumber() || 0\n                : 0;\n          callSite = callSite.isAsync();\n          error.push([\n            name,\n            methodName,\n            callSite$jscomp$0,\n            result,\n            enclosingLine,\n            enclosingCol,\n            callSite\n          ]);\n        }\n      }\n      collectedStackTrace = error;\n      return \"\";\n    }\n    function collectStackTrace(error, structuredStackTrace) {\n      collectStackTracePrivate(error, structuredStackTrace);\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function parseStackTracePrivate(error, skipFrames) {\n      collectedStackTrace = null;\n      framesToSkip = skipFrames;\n      skipFrames = Error.prepareStackTrace;\n      Error.prepareStackTrace = collectStackTracePrivate;\n      try {\n        if (\"\" !== error.stack) return null;\n      } finally {\n        Error.prepareStackTrace = skipFrames;\n      }\n      return collectedStackTrace;\n    }\n    function parseStackTrace(error, skipFrames) {\n      var existing = stackTraceCache.get(error);\n      if (void 0 !== existing) return existing;\n      collectedStackTrace = null;\n      framesToSkip = skipFrames;\n      existing = Error.prepareStackTrace;\n      Error.prepareStackTrace = collectStackTrace;\n      try {\n        var stack = String(error.stack);\n      } finally {\n        Error.prepareStackTrace = existing;\n      }\n      if (null !== collectedStackTrace)\n        return (\n          (stack = collectedStackTrace),\n          (collectedStackTrace = null),\n          stackTraceCache.set(error, stack),\n          stack\n        );\n      stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (stack = stack.slice(29));\n      existing = stack.indexOf(\"react_stack_bottom_frame\");\n      -1 !== existing && (existing = stack.lastIndexOf(\"\\n\", existing));\n      -1 !== existing && (stack = stack.slice(0, existing));\n      stack = stack.split(\"\\n\");\n      for (existing = []; skipFrames < stack.length; skipFrames++) {\n        var parsed = frameRegExp.exec(stack[skipFrames]);\n        if (parsed) {\n          var name = parsed[1] || \"\",\n            isAsync = \"async \" === parsed[8];\n          \"<anonymous>\" === name\n            ? (name = \"\")\n            : name.startsWith(\"async \") &&\n              ((name = name.slice(5)), (isAsync = !0));\n          var filename = parsed[2] || parsed[5] || \"\";\n          \"<anonymous>\" === filename && (filename = \"\");\n          existing.push([\n            name,\n            filename,\n            +(parsed[3] || parsed[6]),\n            +(parsed[4] || parsed[7]),\n            0,\n            0,\n            isAsync\n          ]);\n        }\n      }\n      stackTraceCache.set(error, existing);\n      return existing;\n    }\n    function createTemporaryReference(temporaryReferences, id) {\n      var reference = Object.defineProperties(\n        function () {\n          throw Error(\n            \"Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n          );\n        },\n        { $$typeof: { value: TEMPORARY_REFERENCE_TAG } }\n      );\n      reference = new Proxy(reference, proxyHandlers);\n      temporaryReferences.set(reference, id);\n      return reference;\n    }\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? (thenableState.push(thenable),\n          (thenableState._stacks || (thenableState._stacks = [])).push(Error()))\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          thenableState = thenable.reason;\n          if (void 0 === thenableState && !(\"reason\" in thenable))\n            throw Error(\n              \"A rejected Promise was passed to React without a `reason` property. React threw a generic error from where the Promise was used to assist in identifying the problematic Promise. Make sure that instrumented Promises correctly set the `reason` property when setting `status` to `'rejected'`.\"\n            );\n          throw thenableState;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState || [];\n      state._componentDebugInfo = currentComponentDebugInfo;\n      thenableState = currentComponentDebugInfo = null;\n      return state;\n    }\n    function unsupportedHook() {\n      throw Error(\"This Hook is not supported in Server Components.\");\n    }\n    function unsupportedRefresh() {\n      throw Error(\n        \"Refreshing the cache is not supported in Server Components.\"\n      );\n    }\n    function unsupportedContext() {\n      throw Error(\"Cannot read a Client Context from a Server Component.\");\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function resetOwnerStackLimit() {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n    }\n    function isObjectPrototype(object) {\n      if (!object) return !1;\n      var ObjectPrototype = Object.prototype;\n      if (object === ObjectPrototype) return !0;\n      if (getPrototypeOf(object)) return !1;\n      object = Object.getOwnPropertyNames(object);\n      for (var i = 0; i < object.length; i++)\n        if (!(object[i] in ObjectPrototype)) return !1;\n      return !0;\n    }\n    function isGetter(object, name) {\n      if (object === Object.prototype || null === object) return !1;\n      var descriptor = Object.getOwnPropertyDescriptor(object, name);\n      return void 0 === descriptor\n        ? isGetter(getPrototypeOf(object), name)\n        : \"function\" === typeof descriptor.get;\n    }\n    function isSimpleObject(object) {\n      if (!isObjectPrototype(getPrototypeOf(object))) return !1;\n      for (\n        var names = Object.getOwnPropertyNames(object), i = 0;\n        i < names.length;\n        i++\n      ) {\n        var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);\n        if (\n          !descriptor ||\n          (!descriptor.enumerable &&\n            ((\"key\" !== names[i] && \"ref\" !== names[i]) ||\n              \"function\" !== typeof descriptor.get))\n        )\n          return !1;\n      }\n      return !0;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function defaultFilterStackFrame(filename) {\n      return (\n        \"\" !== filename &&\n        !filename.startsWith(\"node:\") &&\n        !filename.includes(\"node_modules\")\n      );\n    }\n    function devirtualizeURL(url) {\n      if (url.startsWith(\"about://React/\")) {\n        var envIdx = url.indexOf(\"/\", 14),\n          suffixIdx = url.lastIndexOf(\"?\");\n        if (-1 < envIdx && -1 < suffixIdx)\n          return decodeURI(url.slice(envIdx + 1, suffixIdx));\n      }\n      return url;\n    }\n    function isPromiseCreationInternal(url, functionName) {\n      if (\"node:internal/async_hooks\" === url) return !0;\n      if (\"\" !== url) return !1;\n      switch (functionName) {\n        case \"new Promise\":\n        case \"Function.withResolvers\":\n        case \"Promise.withResolvers\":\n        case \"Function.reject\":\n        case \"Promise.reject\":\n        case \"Function.resolve\":\n        case \"Promise.resolve\":\n        case \"Function.all\":\n        case \"Promise.all\":\n        case \"Function.allSettled\":\n        case \"Promise.allSettled\":\n        case \"Function.race\":\n        case \"Promise.race\":\n        case \"Function.try\":\n        case \"Promise.try\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function filterStackTrace(request, stack) {\n      request = request.filterStackFrame;\n      for (var filteredStack = [], i = 0; i < stack.length; i++) {\n        var callsite = stack[i],\n          functionName = callsite[0],\n          url = devirtualizeURL(callsite[1]);\n        request(url, functionName, callsite[2], callsite[3]) &&\n          ((callsite = callsite.slice(0)),\n          (callsite[1] = url),\n          filteredStack.push(callsite));\n      }\n      return filteredStack;\n    }\n    function hasUnfilteredFrame(request, stack) {\n      request = request.filterStackFrame;\n      for (var i = 0; i < stack.length; i++) {\n        var callsite = stack[i],\n          functionName = callsite[0],\n          url = devirtualizeURL(callsite[1]),\n          lineNumber = callsite[2],\n          columnNumber = callsite[3];\n        if (\n          !callsite[6] &&\n          request(url, functionName, lineNumber, columnNumber) &&\n          \"\" !== url\n        )\n          return !0;\n      }\n      return !1;\n    }\n    function isPromiseAwaitInternal(url, functionName) {\n      if (\"node:internal/async_hooks\" === url) return !0;\n      if (\"\" !== url) return !1;\n      switch (functionName) {\n        case \"Promise.then\":\n        case \"Promise.catch\":\n        case \"Promise.finally\":\n        case \"Function.reject\":\n        case \"Promise.reject\":\n        case \"Function.resolve\":\n        case \"Promise.resolve\":\n        case \"Function.all\":\n        case \"Promise.all\":\n        case \"Function.allSettled\":\n        case \"Promise.allSettled\":\n        case \"Function.any\":\n        case \"Promise.any\":\n        case \"Function.race\":\n        case \"Promise.race\":\n        case \"Function.try\":\n        case \"Promise.try\":\n        case \"Function.withResolvers\":\n        case \"Promise.withResolvers\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function isAwaitInUserspace(request, stack) {\n      for (\n        var firstFrame = 0;\n        stack.length > firstFrame &&\n        isPromiseAwaitInternal(stack[firstFrame][1], stack[firstFrame][0]);\n\n      )\n        firstFrame++;\n      if (stack.length > firstFrame) {\n        request = request.filterStackFrame;\n        stack = stack[firstFrame];\n        firstFrame = stack[0];\n        var url = devirtualizeURL(stack[1]);\n        return request(url, firstFrame, stack[2], stack[3]) && \"\" !== url;\n      }\n      return !1;\n    }\n    function patchConsole(consoleInst, methodName) {\n      var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);\n      if (\n        descriptor &&\n        (descriptor.configurable || descriptor.writable) &&\n        \"function\" === typeof descriptor.value\n      ) {\n        var originalMethod = descriptor.value;\n        descriptor = Object.getOwnPropertyDescriptor(originalMethod, \"name\");\n        var wrapperMethod = function () {\n          var request = resolveRequest();\n          if ((\"assert\" !== methodName || !arguments[0]) && null !== request) {\n            var stack = filterStackTrace(\n              request,\n              parseStackTracePrivate(Error(\"react-stack-top-frame\"), 1) || []\n            );\n            request.pendingDebugChunks++;\n            var owner = resolveOwner(),\n              args = Array.from(arguments);\n            a: {\n              var env = 0;\n              switch (methodName) {\n                case \"dir\":\n                case \"dirxml\":\n                case \"groupEnd\":\n                case \"table\":\n                  env = null;\n                  break a;\n                case \"assert\":\n                  env = 1;\n              }\n              var format = args[env],\n                style = args[env + 1],\n                badge = args[env + 2];\n              \"string\" === typeof format &&\n              format.startsWith(\"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\") &&\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\" ===\n                style &&\n              \"string\" === typeof badge\n                ? ((format = format.slice(18)),\n                  \" \" === format[0] && (format = format.slice(1)),\n                  args.splice(env, 4, format),\n                  (env = badge.slice(1, badge.length - 1)))\n                : (env = null);\n            }\n            null === env && (env = (0, request.environmentName)());\n            null != owner && outlineComponentInfo(request, owner);\n            badge = [methodName, stack, owner, env];\n            badge.push.apply(badge, args);\n            args = serializeDebugModel(\n              request,\n              (null === request.deferredDebugObjects ? 500 : 10) + stack.length,\n              badge\n            );\n            \"[\" !== args[0] &&\n              (args = serializeDebugModel(request, 10 + stack.length, [\n                methodName,\n                stack,\n                owner,\n                env,\n                \"Unknown Value: React could not send it from the server.\"\n              ]));\n            request.completedDebugChunks.push(\":W\" + args + \"\\n\");\n          }\n          return originalMethod.apply(this, arguments);\n        };\n        descriptor && Object.defineProperty(wrapperMethod, \"name\", descriptor);\n        Object.defineProperty(consoleInst, methodName, {\n          value: wrapperMethod\n        });\n      }\n    }\n    function getCurrentStackInDEV() {\n      var owner = resolveOwner();\n      if (null === owner) return \"\";\n      try {\n        var info = \"\";\n        if (owner.owner || \"string\" !== typeof owner.name) {\n          for (; owner; ) {\n            var ownerStack = owner.debugStack;\n            if (null != ownerStack) {\n              if ((owner = owner.owner)) {\n                var JSCompiler_temp_const = info;\n                var error = ownerStack,\n                  prevPrepareStackTrace = Error.prepareStackTrace;\n                Error.prepareStackTrace = prepareStackTrace;\n                var stack = error.stack;\n                Error.prepareStackTrace = prevPrepareStackTrace;\n                stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n                  (stack = stack.slice(29));\n                var idx = stack.indexOf(\"\\n\");\n                -1 !== idx && (stack = stack.slice(idx + 1));\n                idx = stack.indexOf(\"react_stack_bottom_frame\");\n                -1 !== idx && (idx = stack.lastIndexOf(\"\\n\", idx));\n                var JSCompiler_inline_result =\n                  -1 !== idx ? (stack = stack.slice(0, idx)) : \"\";\n                info =\n                  JSCompiler_temp_const + (\"\\n\" + JSCompiler_inline_result);\n              }\n            } else break;\n          }\n          var JSCompiler_inline_result$jscomp$0 = info;\n        } else {\n          JSCompiler_temp_const = owner.name;\n          if (void 0 === prefix)\n            try {\n              throw Error();\n            } catch (x) {\n              (prefix =\n                ((error = x.stack.trim().match(/\\n( *(at )?)/)) && error[1]) ||\n                \"\"),\n                (suffix =\n                  -1 < x.stack.indexOf(\"\\n    at\")\n                    ? \" (<anonymous>)\"\n                    : -1 < x.stack.indexOf(\"@\")\n                      ? \"@unknown:0:0\"\n                      : \"\");\n            }\n          JSCompiler_inline_result$jscomp$0 =\n            \"\\n\" + prefix + JSCompiler_temp_const + suffix;\n        }\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function defaultErrorHandler(error) {\n      console.error(error);\n    }\n    function RequestInstance(\n      type,\n      model,\n      bundlerConfig,\n      onError,\n      onAllReady,\n      onFatalError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      if (\n        null !== ReactSharedInternalsServer.A &&\n        ReactSharedInternalsServer.A !== DefaultAsyncDispatcher\n      )\n        throw Error(\n          \"Currently React only supports one RSC renderer at a time.\"\n        );\n      ReactSharedInternalsServer.A = DefaultAsyncDispatcher;\n      ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV;\n      var abortSet = new Set(),\n        pingedTasks = [],\n        hints = new Set();\n      this.type = type;\n      this.status = OPENING;\n      this.flushScheduled = !1;\n      this.destination = this.fatalError = null;\n      this.bundlerConfig = bundlerConfig;\n      this.cache = new Map();\n      this.cacheController = new AbortController();\n      this.pendingChunks = this.nextChunkId = 0;\n      this.hints = hints;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = pingedTasks;\n      this.completedImportChunks = [];\n      this.completedHintChunks = [];\n      this.completedRegularChunks = [];\n      this.completedErrorChunks = [];\n      this.writtenSymbols = new Map();\n      this.writtenClientReferences = new Map();\n      this.writtenServerReferences = new Map();\n      this.writtenObjects = new WeakMap();\n      this.temporaryReferences = temporaryReferences;\n      this.identifierPrefix = identifierPrefix || \"\";\n      this.identifierCount = 1;\n      this.taintCleanupQueue = [];\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onAllReady = onAllReady;\n      this.onFatalError = onFatalError;\n      this.pendingDebugChunks = 0;\n      this.completedDebugChunks = [];\n      this.debugDestination = null;\n      this.environmentName =\n        void 0 === environmentName\n          ? function () {\n              return \"Server\";\n            }\n          : \"function\" !== typeof environmentName\n            ? function () {\n                return environmentName;\n              }\n            : environmentName;\n      this.filterStackFrame =\n        void 0 === filterStackFrame\n          ? defaultFilterStackFrame\n          : filterStackFrame;\n      this.didWarnForKey = null;\n      this.writtenDebugObjects = new WeakMap();\n      this.deferredDebugObjects = keepDebugAlive\n        ? { retained: new Map(), existing: new Map() }\n        : null;\n      type =\n        \"number\" === typeof debugStartTime\n          ? (this.timeOrigin = debugStartTime - performance.timeOrigin)\n          : (this.timeOrigin = performance.now());\n      emitTimeOriginChunk(this, type + performance.timeOrigin);\n      this.abortTime = -0;\n      model = createTask(\n        this,\n        model,\n        null,\n        !1,\n        0,\n        abortSet,\n        type,\n        null,\n        null,\n        null\n      );\n      pingedTasks.push(model);\n    }\n    function createRequest(\n      model,\n      bundlerConfig,\n      onError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      resetOwnerStackLimit();\n      return new RequestInstance(\n        20,\n        model,\n        bundlerConfig,\n        onError,\n        noop,\n        noop,\n        identifierPrefix,\n        temporaryReferences,\n        debugStartTime,\n        environmentName,\n        filterStackFrame,\n        keepDebugAlive\n      );\n    }\n    function createPrerenderRequest(\n      model,\n      bundlerConfig,\n      onAllReady,\n      onFatalError,\n      onError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      resetOwnerStackLimit();\n      return new RequestInstance(\n        PRERENDER,\n        model,\n        bundlerConfig,\n        onError,\n        onAllReady,\n        onFatalError,\n        identifierPrefix,\n        temporaryReferences,\n        debugStartTime,\n        environmentName,\n        filterStackFrame,\n        keepDebugAlive\n      );\n    }\n    function resolveRequest() {\n      if (currentRequest) return currentRequest;\n      var store = requestStorage.getStore();\n      return store ? store : null;\n    }\n    function serializeDebugThenable(request, counter, thenable) {\n      request.pendingDebugChunks++;\n      var id = request.nextChunkId++,\n        ref = \"$@\" + id.toString(16);\n      request.writtenDebugObjects.set(thenable, ref);\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return (\n            emitOutlinedDebugModelChunk(request, id, counter, thenable.value),\n            ref\n          );\n        case \"rejected\":\n          return (\n            emitErrorChunk(request, id, \"\", thenable.reason, !0, null), ref\n          );\n      }\n      if (request.status === ABORTING)\n        return emitDebugHaltChunk(request, id), ref;\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null !== deferredDebugObjects)\n        return (\n          deferredDebugObjects.retained.set(id, thenable),\n          (ref = \"$Y@\" + id.toString(16)),\n          request.writtenDebugObjects.set(thenable, ref),\n          ref\n        );\n      var cancelled = !1;\n      thenable.then(\n        function (value) {\n          cancelled ||\n            ((cancelled = !0),\n            request.status === ABORTING\n              ? emitDebugHaltChunk(request, id)\n              : (isArrayImpl(value) && 200 < value.length) ||\n                  ((value instanceof ArrayBuffer ||\n                    value instanceof Int8Array ||\n                    value instanceof Uint8Array ||\n                    value instanceof Uint8ClampedArray ||\n                    value instanceof Int16Array ||\n                    value instanceof Uint16Array ||\n                    value instanceof Int32Array ||\n                    value instanceof Uint32Array ||\n                    value instanceof Float32Array ||\n                    value instanceof Float64Array ||\n                    value instanceof BigInt64Array ||\n                    value instanceof BigUint64Array ||\n                    value instanceof DataView) &&\n                    1e3 < value.byteLength)\n                ? emitDebugHaltChunk(request, id)\n                : emitOutlinedDebugModelChunk(request, id, counter, value),\n            enqueueFlush(request));\n        },\n        function (reason) {\n          cancelled ||\n            ((cancelled = !0),\n            request.status === ABORTING\n              ? emitDebugHaltChunk(request, id)\n              : emitErrorChunk(request, id, \"\", reason, !0, null),\n            enqueueFlush(request));\n        }\n      );\n      Promise.resolve().then(function () {\n        cancelled ||\n          ((cancelled = !0),\n          emitDebugHaltChunk(request, id),\n          enqueueFlush(request),\n          (counter = request = null));\n      });\n      return ref;\n    }\n    function emitRequestedDebugThenable(request, id, counter, thenable) {\n      thenable.then(\n        function (value) {\n          request.status === ABORTING\n            ? emitDebugHaltChunk(request, id)\n            : emitOutlinedDebugModelChunk(request, id, counter, value);\n          enqueueFlush(request);\n        },\n        function (reason) {\n          request.status === ABORTING\n            ? emitDebugHaltChunk(request, id)\n            : emitErrorChunk(request, id, \"\", reason, !0, null);\n          enqueueFlush(request);\n        }\n      );\n    }\n    function serializeThenable(request, task, thenable) {\n      var newTask = createTask(\n        request,\n        thenable,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return (\n            forwardDebugInfoFromThenable(\n              request,\n              newTask,\n              thenable,\n              null,\n              null\n            ),\n            (newTask.model = thenable.value),\n            pingTask(request, newTask),\n            newTask.id\n          );\n        case \"rejected\":\n          return (\n            forwardDebugInfoFromThenable(\n              request,\n              newTask,\n              thenable,\n              null,\n              null\n            ),\n            erroredTask(request, newTask, thenable.reason),\n            newTask.id\n          );\n        default:\n          if (request.status === ABORTING)\n            return (\n              request.abortableTasks.delete(newTask),\n              request.type === PRERENDER\n                ? (haltTask(newTask), finishHaltedTask(newTask, request))\n                : ((task = request.fatalError),\n                  abortTask(newTask),\n                  finishAbortedTask(newTask, request, task)),\n              newTask.id\n            );\n          \"string\" !== typeof thenable.status &&\n            ((thenable.status = \"pending\"),\n            thenable.then(\n              function (fulfilledValue) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"fulfilled\"),\n                  (thenable.value = fulfilledValue));\n              },\n              function (error) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"rejected\"), (thenable.reason = error));\n              }\n            ));\n      }\n      thenable.then(\n        function (value) {\n          forwardDebugInfoFromCurrentContext(request, newTask, thenable);\n          newTask.model = value;\n          pingTask(request, newTask);\n        },\n        function (reason) {\n          newTask.status === PENDING$1 &&\n            ((newTask.timed = !0),\n            erroredTask(request, newTask, reason),\n            enqueueFlush(request));\n        }\n      );\n      return newTask.id;\n    }\n    function serializeReadableStream(request, task, stream) {\n      function progress(entry) {\n        if (streamTask.status === PENDING$1)\n          if (entry.done)\n            (streamTask.status = COMPLETED),\n              (entry = streamTask.id.toString(16) + \":C\\n\"),\n              request.completedRegularChunks.push(entry),\n              request.abortableTasks.delete(streamTask),\n              request.cacheController.signal.removeEventListener(\n                \"abort\",\n                abortStream\n              ),\n              enqueueFlush(request),\n              callOnAllReadyIfReady(request);\n          else\n            try {\n              request.pendingChunks++,\n                (streamTask.model = entry.value),\n                isByteStream\n                  ? emitTypedArrayChunk(\n                      request,\n                      streamTask.id,\n                      \"b\",\n                      streamTask.model,\n                      !1\n                    )\n                  : tryStreamTask(request, streamTask),\n                enqueueFlush(request),\n                reader.read().then(progress, error);\n            } catch (x$6) {\n              error(x$6);\n            }\n      }\n      function error(reason) {\n        streamTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortStream\n          ),\n          erroredTask(request, streamTask, reason),\n          enqueueFlush(request),\n          reader.cancel(reason).then(error, error));\n      }\n      function abortStream() {\n        if (streamTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortStream);\n          signal = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(streamTask),\n              haltTask(streamTask),\n              finishHaltedTask(streamTask, request))\n            : (erroredTask(request, streamTask, signal), enqueueFlush(request));\n          reader.cancel(signal).then(error, error);\n        }\n      }\n      var supportsBYOB = stream.supportsBYOB;\n      if (void 0 === supportsBYOB)\n        try {\n          stream.getReader({ mode: \"byob\" }).releaseLock(), (supportsBYOB = !0);\n        } catch (x) {\n          supportsBYOB = !1;\n        }\n      var isByteStream = supportsBYOB,\n        reader = stream.getReader(),\n        streamTask = createTask(\n          request,\n          task.model,\n          task.keyPath,\n          task.implicitSlot,\n          task.formatContext,\n          request.abortableTasks,\n          task.time,\n          task.debugOwner,\n          task.debugStack,\n          task.debugTask\n        );\n      request.pendingChunks++;\n      task =\n        streamTask.id.toString(16) + \":\" + (isByteStream ? \"r\" : \"R\") + \"\\n\";\n      request.completedRegularChunks.push(task);\n      request.cacheController.signal.addEventListener(\"abort\", abortStream);\n      reader.read().then(progress, error);\n      return serializeByValueID(streamTask.id);\n    }\n    function serializeAsyncIterable(request, task, iterable, iterator) {\n      function progress(entry) {\n        if (streamTask.status === PENDING$1)\n          if (entry.done) {\n            streamTask.status = COMPLETED;\n            if (void 0 === entry.value)\n              var endStreamRow = streamTask.id.toString(16) + \":C\\n\";\n            else\n              try {\n                var chunkId = outlineModel(request, entry.value);\n                endStreamRow =\n                  streamTask.id.toString(16) +\n                  \":C\" +\n                  stringify(serializeByValueID(chunkId)) +\n                  \"\\n\";\n              } catch (x) {\n                error(x);\n                return;\n              }\n            request.completedRegularChunks.push(endStreamRow);\n            request.abortableTasks.delete(streamTask);\n            request.cacheController.signal.removeEventListener(\n              \"abort\",\n              abortIterable\n            );\n            enqueueFlush(request);\n            callOnAllReadyIfReady(request);\n          } else\n            try {\n              (streamTask.model = entry.value),\n                request.pendingChunks++,\n                tryStreamTask(request, streamTask),\n                enqueueFlush(request),\n                callIteratorInDEV(iterator, progress, error);\n            } catch (x$7) {\n              error(x$7);\n            }\n      }\n      function error(reason) {\n        streamTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortIterable\n          ),\n          erroredTask(request, streamTask, reason),\n          enqueueFlush(request),\n          \"function\" === typeof iterator.throw &&\n            iterator.throw(reason).then(noop, noop));\n      }\n      function abortIterable() {\n        if (streamTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortIterable);\n          var reason = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(streamTask),\n              haltTask(streamTask),\n              finishHaltedTask(streamTask, request))\n            : (erroredTask(request, streamTask, signal.reason),\n              enqueueFlush(request));\n          \"function\" === typeof iterator.throw &&\n            iterator.throw(reason).then(noop, noop);\n        }\n      }\n      var isIterator = iterable === iterator,\n        streamTask = createTask(\n          request,\n          task.model,\n          task.keyPath,\n          task.implicitSlot,\n          task.formatContext,\n          request.abortableTasks,\n          task.time,\n          task.debugOwner,\n          task.debugStack,\n          task.debugTask\n        );\n      (task = iterable._debugInfo) &&\n        forwardDebugInfo(request, streamTask, task);\n      request.pendingChunks++;\n      isIterator =\n        streamTask.id.toString(16) + \":\" + (isIterator ? \"x\" : \"X\") + \"\\n\";\n      request.completedRegularChunks.push(isIterator);\n      request.cacheController.signal.addEventListener(\"abort\", abortIterable);\n      callIteratorInDEV(iterator, progress, error);\n      return serializeByValueID(streamTask.id);\n    }\n    function emitHint(request, code, model) {\n      model = stringify(model);\n      request.completedHintChunks.push(\":H\" + code + model + \"\\n\");\n      enqueueFlush(request);\n    }\n    function readThenable(thenable) {\n      if (\"fulfilled\" === thenable.status) return thenable.value;\n      if (\"rejected\" === thenable.status) throw thenable.reason;\n      throw thenable;\n    }\n    function createLazyWrapperAroundWakeable(request, task, wakeable) {\n      switch (wakeable.status) {\n        case \"fulfilled\":\n          return (\n            forwardDebugInfoFromThenable(request, task, wakeable, null, null),\n            wakeable.value\n          );\n        case \"rejected\":\n          forwardDebugInfoFromThenable(request, task, wakeable, null, null);\n          break;\n        default:\n          \"string\" !== typeof wakeable.status &&\n            ((wakeable.status = \"pending\"),\n            wakeable.then(\n              function (fulfilledValue) {\n                forwardDebugInfoFromCurrentContext(request, task, wakeable);\n                \"pending\" === wakeable.status &&\n                  ((wakeable.status = \"fulfilled\"),\n                  (wakeable.value = fulfilledValue));\n              },\n              function (error) {\n                forwardDebugInfoFromCurrentContext(request, task, wakeable);\n                \"pending\" === wakeable.status &&\n                  ((wakeable.status = \"rejected\"), (wakeable.reason = error));\n              }\n            ));\n      }\n      return {\n        $$typeof: REACT_LAZY_TYPE,\n        _payload: wakeable,\n        _init: readThenable\n      };\n    }\n    function callWithDebugContextInDEV(request, task, callback, arg) {\n      var componentDebugInfo = {\n        name: \"\",\n        env: task.environmentName,\n        key: null,\n        owner: task.debugOwner\n      };\n      componentDebugInfo.stack =\n        null === task.debugStack\n          ? null\n          : filterStackTrace(request, parseStackTrace(task.debugStack, 1));\n      componentDebugInfo.debugStack = task.debugStack;\n      request = componentDebugInfo.debugTask = task.debugTask;\n      currentOwner = componentDebugInfo;\n      try {\n        return request ? request.run(callback.bind(null, arg)) : callback(arg);\n      } finally {\n        currentOwner = null;\n      }\n    }\n    function processServerComponentReturnValue(\n      request,\n      task,\n      Component,\n      result\n    ) {\n      if (\n        \"object\" !== typeof result ||\n        null === result ||\n        isClientReference(result)\n      )\n        return result;\n      if (\"function\" === typeof result.then)\n        return (\n          result.then(function (resolvedValue) {\n            \"object\" === typeof resolvedValue &&\n              null !== resolvedValue &&\n              resolvedValue.$$typeof === REACT_ELEMENT_TYPE &&\n              (resolvedValue._store.validated = 1);\n          }, voidHandler),\n          createLazyWrapperAroundWakeable(request, task, result)\n        );\n      result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1);\n      var iteratorFn = getIteratorFn(result);\n      if (iteratorFn) {\n        var $jscomp$compprop0 = {};\n        $jscomp$compprop0 =\n          (($jscomp$compprop0[Symbol.iterator] = function () {\n            var iterator = iteratorFn.call(result);\n            iterator !== result ||\n              (\"[object GeneratorFunction]\" ===\n                Object.prototype.toString.call(Component) &&\n                \"[object Generator]\" ===\n                  Object.prototype.toString.call(result)) ||\n              callWithDebugContextInDEV(request, task, function () {\n                console.error(\n                  \"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. \"\n                );\n              });\n            return iterator;\n          }),\n          $jscomp$compprop0);\n        $jscomp$compprop0._debugInfo = result._debugInfo;\n        return $jscomp$compprop0;\n      }\n      return \"function\" !== typeof result[ASYNC_ITERATOR] ||\n        (\"function\" === typeof ReadableStream &&\n          result instanceof ReadableStream)\n        ? result\n        : (($jscomp$compprop0 = {}),\n          ($jscomp$compprop0 =\n            (($jscomp$compprop0[ASYNC_ITERATOR] = function () {\n              var iterator = result[ASYNC_ITERATOR]();\n              iterator !== result ||\n                (\"[object AsyncGeneratorFunction]\" ===\n                  Object.prototype.toString.call(Component) &&\n                  \"[object AsyncGenerator]\" ===\n                    Object.prototype.toString.call(result)) ||\n                callWithDebugContextInDEV(request, task, function () {\n                  console.error(\n                    \"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. \"\n                  );\n                });\n              return iterator;\n            }),\n            $jscomp$compprop0)),\n          ($jscomp$compprop0._debugInfo = result._debugInfo),\n          $jscomp$compprop0);\n    }\n    function renderFunctionComponent(\n      request,\n      task,\n      key,\n      Component,\n      props,\n      validated\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      if (canEmitDebugInfo)\n        if (null !== prevThenableState)\n          var componentDebugInfo = prevThenableState._componentDebugInfo;\n        else {\n          var componentDebugID = task.id;\n          componentDebugInfo = Component.displayName || Component.name || \"\";\n          var componentEnv = (0, request.environmentName)();\n          request.pendingChunks++;\n          componentDebugInfo = {\n            name: componentDebugInfo,\n            env: componentEnv,\n            key: key,\n            owner: task.debugOwner\n          };\n          componentDebugInfo.stack =\n            null === task.debugStack\n              ? null\n              : filterStackTrace(request, parseStackTrace(task.debugStack, 1));\n          componentDebugInfo.props = props;\n          componentDebugInfo.debugStack = task.debugStack;\n          componentDebugInfo.debugTask = task.debugTask;\n          outlineComponentInfo(request, componentDebugInfo);\n          advanceTaskTime(request, task, performance.now());\n          emitDebugChunk(request, componentDebugID, componentDebugInfo);\n          task.environmentName = componentEnv;\n          2 === validated &&\n            warnForMissingKey(request, key, componentDebugInfo, task.debugTask);\n        }\n      else return outlineTask(request, task);\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      currentComponentDebugInfo = componentDebugInfo;\n      props = task.debugTask\n        ? task.debugTask.run(\n            componentStorage.run.bind(\n              componentStorage,\n              componentDebugInfo,\n              callComponentInDEV,\n              Component,\n              props,\n              componentDebugInfo\n            )\n          )\n        : componentStorage.run(\n            componentDebugInfo,\n            callComponentInDEV,\n            Component,\n            props,\n            componentDebugInfo\n          );\n      if (request.status === ABORTING)\n        throw (\n          (\"object\" !== typeof props ||\n            null === props ||\n            \"function\" !== typeof props.then ||\n            isClientReference(props) ||\n            props.then(voidHandler, voidHandler),\n          null)\n        );\n      validated = thenableState;\n      if (null !== validated)\n        for (\n          prevThenableState = validated._stacks || (validated._stacks = []),\n            componentDebugID = 0;\n          componentDebugID < validated.length;\n          componentDebugID++\n        )\n          forwardDebugInfoFromThenable(\n            request,\n            task,\n            validated[componentDebugID],\n            componentDebugInfo,\n            prevThenableState[componentDebugID]\n          );\n      props = processServerComponentReturnValue(\n        request,\n        task,\n        Component,\n        props\n      );\n      task.debugOwner = componentDebugInfo;\n      task.debugStack = null;\n      task.debugTask = null;\n      Component = task.keyPath;\n      componentDebugInfo = task.implicitSlot;\n      null !== key\n        ? (task.keyPath =\n            key === REACT_OPTIMISTIC_KEY || Component === REACT_OPTIMISTIC_KEY\n              ? REACT_OPTIMISTIC_KEY\n              : null === Component\n                ? key\n                : Component + \",\" + key)\n        : null === Component && (task.implicitSlot = !0);\n      request = renderModelDestructive(request, task, emptyRoot, \"\", props);\n      task.keyPath = Component;\n      task.implicitSlot = componentDebugInfo;\n      return request;\n    }\n    function warnForMissingKey(request, key, componentDebugInfo, debugTask) {\n      function logKeyError() {\n        console.error(\n          'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n          \"\",\n          \"\"\n        );\n      }\n      key = request.didWarnForKey;\n      null == key && (key = request.didWarnForKey = new WeakSet());\n      request = componentDebugInfo.owner;\n      if (null != request) {\n        if (key.has(request)) return;\n        key.add(request);\n      }\n      debugTask\n        ? debugTask.run(\n            componentStorage.run.bind(\n              componentStorage,\n              componentDebugInfo,\n              callComponentInDEV,\n              logKeyError,\n              null,\n              componentDebugInfo\n            )\n          )\n        : componentStorage.run(\n            componentDebugInfo,\n            callComponentInDEV,\n            logKeyError,\n            null,\n            componentDebugInfo\n          );\n    }\n    function renderFragment(request, task, children) {\n      for (var i = 0; i < children.length; i++) {\n        var child = children[i];\n        null === child ||\n          \"object\" !== typeof child ||\n          child.$$typeof !== REACT_ELEMENT_TYPE ||\n          null !== child.key ||\n          child._store.validated ||\n          (child._store.validated = 2);\n      }\n      if (null !== task.keyPath)\n        return (\n          (request = [\n            REACT_ELEMENT_TYPE,\n            REACT_FRAGMENT_TYPE,\n            task.keyPath,\n            { children: children },\n            null,\n            null,\n            0\n          ]),\n          task.implicitSlot ? [request] : request\n        );\n      if ((i = children._debugInfo)) {\n        if (canEmitDebugInfo) forwardDebugInfo(request, task, i);\n        else return outlineTask(request, task);\n        children = Array.from(children);\n      }\n      return children;\n    }\n    function renderAsyncFragment(request, task, children, getAsyncIterator) {\n      if (null !== task.keyPath)\n        return (\n          (request = [\n            REACT_ELEMENT_TYPE,\n            REACT_FRAGMENT_TYPE,\n            task.keyPath,\n            { children: children },\n            null,\n            null,\n            0\n          ]),\n          task.implicitSlot ? [request] : request\n        );\n      getAsyncIterator = getAsyncIterator.call(children);\n      return serializeAsyncIterable(request, task, children, getAsyncIterator);\n    }\n    function deferTask(request, task) {\n      task = createTask(\n        request,\n        task.model,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      pingTask(request, task);\n      return serializeLazyID(task.id);\n    }\n    function outlineTask(request, task) {\n      task = createTask(\n        request,\n        task.model,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      retryTask(request, task);\n      return task.status === COMPLETED\n        ? serializeByValueID(task.id)\n        : serializeLazyID(task.id);\n    }\n    function renderElement(request, task, type, key, ref, props, validated) {\n      if (null !== ref && void 0 !== ref)\n        throw Error(\n          \"Refs cannot be used in Server Components, nor passed to Client Components.\"\n        );\n      jsxPropsParents.set(props, type);\n      \"object\" === typeof props.children &&\n        null !== props.children &&\n        jsxChildrenParents.set(props.children, type);\n      if (\n        \"function\" !== typeof type ||\n        isClientReference(type) ||\n        type.$$typeof === TEMPORARY_REFERENCE_TAG\n      ) {\n        if (type === REACT_FRAGMENT_TYPE && null === key)\n          return (\n            2 === validated &&\n              ((validated = {\n                name: \"Fragment\",\n                env: (0, request.environmentName)(),\n                key: key,\n                owner: task.debugOwner,\n                stack:\n                  null === task.debugStack\n                    ? null\n                    : filterStackTrace(\n                        request,\n                        parseStackTrace(task.debugStack, 1)\n                      ),\n                props: props,\n                debugStack: task.debugStack,\n                debugTask: task.debugTask\n              }),\n              warnForMissingKey(request, key, validated, task.debugTask)),\n            (validated = task.implicitSlot),\n            null === task.keyPath && (task.implicitSlot = !0),\n            (request = renderModelDestructive(\n              request,\n              task,\n              emptyRoot,\n              \"\",\n              props.children\n            )),\n            (task.implicitSlot = validated),\n            request\n          );\n        if (\n          null != type &&\n          \"object\" === typeof type &&\n          !isClientReference(type)\n        )\n          switch (type.$$typeof) {\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(type);\n              if (request.status === ABORTING) throw null;\n              return renderElement(\n                request,\n                task,\n                type,\n                key,\n                ref,\n                props,\n                validated\n              );\n            case REACT_FORWARD_REF_TYPE:\n              return renderFunctionComponent(\n                request,\n                task,\n                key,\n                type.render,\n                props,\n                validated\n              );\n            case REACT_MEMO_TYPE:\n              return renderElement(\n                request,\n                task,\n                type.type,\n                key,\n                ref,\n                props,\n                validated\n              );\n            case REACT_ELEMENT_TYPE:\n              type._store.validated = 1;\n          }\n        else if (\"string\" === typeof type) {\n          ref = task.formatContext;\n          var newFormatContext = getChildFormatContext(ref, type, props);\n          ref !== newFormatContext &&\n            null != props.children &&\n            outlineModelWithFormatContext(\n              request,\n              props.children,\n              newFormatContext\n            );\n        }\n      } else\n        return renderFunctionComponent(\n          request,\n          task,\n          key,\n          type,\n          props,\n          validated\n        );\n      ref = task.keyPath;\n      null === key\n        ? (key = ref)\n        : null !== ref &&\n          (key =\n            ref === REACT_OPTIMISTIC_KEY || key === REACT_OPTIMISTIC_KEY\n              ? REACT_OPTIMISTIC_KEY\n              : ref + \",\" + key);\n      newFormatContext = null;\n      ref = task.debugOwner;\n      null !== ref && outlineComponentInfo(request, ref);\n      if (null !== task.debugStack) {\n        newFormatContext = filterStackTrace(\n          request,\n          parseStackTrace(task.debugStack, 1)\n        );\n        var id = outlineDebugModel(\n          request,\n          { objectLimit: 2 * newFormatContext.length + 1 },\n          newFormatContext\n        );\n        request.writtenObjects.set(newFormatContext, serializeByValueID(id));\n      }\n      request = [\n        REACT_ELEMENT_TYPE,\n        type,\n        key,\n        props,\n        ref,\n        newFormatContext,\n        validated\n      ];\n      task = task.implicitSlot && null !== key ? [request] : request;\n      return task;\n    }\n    function visitAsyncNode(\n      request,\n      task$jscomp$0,\n      node$jscomp$0,\n      visited,\n      cutOff\n    ) {\n      for (\n        var chain = [];\n        null !== node$jscomp$0 && !visited.has(node$jscomp$0);\n\n      )\n        chain.push(node$jscomp$0), (node$jscomp$0 = node$jscomp$0.previous);\n      var previousIONode =\n        null !== node$jscomp$0 ? visited.get(node$jscomp$0) : null;\n      for (\n        node$jscomp$0 = chain.length - 1;\n        0 <= node$jscomp$0;\n        node$jscomp$0--\n      ) {\n        var n = chain[node$jscomp$0];\n        visited.set(n, null);\n        var result = request;\n        var task = task$jscomp$0,\n          node = n,\n          visited$jscomp$0 = visited,\n          cutOff$jscomp$0 = cutOff;\n        if (0 <= node.end && node.end <= result.timeOrigin) result = null;\n        else\n          switch (node.tag) {\n            case 0:\n              result = node;\n              break;\n            case 3:\n              result = previousIONode;\n              break;\n            case 1:\n              var awaited = node.awaited,\n                promise = node.promise.deref();\n              if (null !== awaited)\n                if (\n                  ((cutOff$jscomp$0 = visitAsyncNode(\n                    result,\n                    task,\n                    awaited,\n                    visited$jscomp$0,\n                    cutOff$jscomp$0\n                  )),\n                  void 0 === cutOff$jscomp$0)\n                ) {\n                  result = void 0;\n                  break;\n                } else\n                  null !== cutOff$jscomp$0\n                    ? (previousIONode =\n                        1 === cutOff$jscomp$0.tag\n                          ? cutOff$jscomp$0\n                          : (null !== node.stack &&\n                                hasUnfilteredFrame(result, node.stack)) ||\n                              (void 0 !== promise &&\n                                \"string\" === typeof promise.displayName &&\n                                (null === cutOff$jscomp$0.stack ||\n                                  !hasUnfilteredFrame(\n                                    result,\n                                    cutOff$jscomp$0.stack\n                                  )))\n                            ? node\n                            : cutOff$jscomp$0)\n                    : result.status === ABORTING &&\n                      node.start < result.abortTime &&\n                      node.end > result.abortTime &&\n                      ((null !== node.stack &&\n                        hasUnfilteredFrame(result, node.stack)) ||\n                        (void 0 !== promise &&\n                          \"string\" === typeof promise.displayName)) &&\n                      (previousIONode = node);\n              void 0 !== promise &&\n                ((node = promise._debugInfo),\n                null == node ||\n                  visited$jscomp$0.has(node) ||\n                  (visited$jscomp$0.set(node, null),\n                  forwardDebugInfo(result, task, node)));\n              result = previousIONode;\n              break;\n            case 4:\n              result = previousIONode;\n              break;\n            case 2:\n              awaited = node.awaited;\n              if (null !== awaited)\n                if (\n                  ((promise = visitAsyncNode(\n                    result,\n                    task,\n                    awaited,\n                    visited$jscomp$0,\n                    cutOff$jscomp$0\n                  )),\n                  void 0 === promise)\n                ) {\n                  result = void 0;\n                  break;\n                } else if (null !== promise) {\n                  var startTime = node.start,\n                    endTime = node.end;\n                  startTime < cutOff$jscomp$0\n                    ? ((previousIONode = promise),\n                      null !== node.stack &&\n                        isAwaitInUserspace(result, node.stack) &&\n                        void 0 !==\n                          (null === awaited.promise\n                            ? void 0\n                            : awaited.promise.deref()) &&\n                        serializeIONode(result, promise, awaited.promise))\n                    : null !== node.stack &&\n                        isAwaitInUserspace(result, node.stack)\n                      ? (result.status === ABORTING &&\n                          startTime > result.abortTime) ||\n                        (serializeIONode(result, promise, awaited.promise),\n                        visited$jscomp$0.set(promise, null),\n                        null != node.owner &&\n                          outlineComponentInfo(result, node.owner),\n                        (cutOff$jscomp$0 = (0, result.environmentName)()),\n                        advanceTaskTime(result, task, startTime),\n                        result.pendingChunks++,\n                        emitDebugChunk(result, task.id, {\n                          awaited: promise,\n                          env: cutOff$jscomp$0,\n                          owner: node.owner,\n                          stack:\n                            null === node.stack\n                              ? null\n                              : filterStackTrace(result, node.stack)\n                        }),\n                        markOperationEndTime(result, task, endTime),\n                        result.status === ABORTING && (previousIONode = void 0))\n                      : (previousIONode = promise);\n                }\n              node = node.promise.deref();\n              void 0 !== node &&\n                ((node = node._debugInfo),\n                null == node ||\n                  visited$jscomp$0.has(node) ||\n                  (visited$jscomp$0.set(node, null),\n                  forwardDebugInfo(result, task, node)));\n              result = previousIONode;\n              break;\n            default:\n              throw Error(\"Unknown AsyncSequence tag. This is a bug in React.\");\n          }\n        null !== result && visited.set(n, result);\n        if (void 0 === result) return;\n        previousIONode = result;\n      }\n      return previousIONode;\n    }\n    function emitAsyncSequence(\n      request,\n      task,\n      node,\n      alreadyForwardedDebugInfo,\n      owner,\n      stack\n    ) {\n      var visited = new Map();\n      alreadyForwardedDebugInfo && visited.set(alreadyForwardedDebugInfo, null);\n      node = visitAsyncNode(request, task, node, visited, task.time);\n      void 0 !== node &&\n        null !== node &&\n        (serializeIONode(request, node, node.promise),\n        request.pendingChunks++,\n        (alreadyForwardedDebugInfo = (0, request.environmentName)()),\n        (alreadyForwardedDebugInfo = {\n          awaited: node,\n          env: alreadyForwardedDebugInfo\n        }),\n        null === owner && null === stack\n          ? (null !== task.debugOwner &&\n              (alreadyForwardedDebugInfo.owner = task.debugOwner),\n            null !== task.debugStack &&\n              (alreadyForwardedDebugInfo.stack = filterStackTrace(\n                request,\n                parseStackTrace(task.debugStack, 1)\n              )))\n          : (null != owner && (alreadyForwardedDebugInfo.owner = owner),\n            null != stack &&\n              (alreadyForwardedDebugInfo.stack = filterStackTrace(\n                request,\n                parseStackTrace(stack, 1)\n              ))),\n        advanceTaskTime(request, task, task.time),\n        emitDebugChunk(request, task.id, alreadyForwardedDebugInfo),\n        markOperationEndTime(request, task, node.end));\n    }\n    function pingTask(request, task) {\n      task.timed = !0;\n      var pingedTasks = request.pingedTasks;\n      pingedTasks.push(task);\n      1 === pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        request.type === PRERENDER || request.status === OPENING\n          ? scheduleMicrotask(function () {\n              return performWork(request);\n            })\n          : setImmediate(function () {\n              return performWork(request);\n            }));\n    }\n    function createTask(\n      request,\n      model,\n      keyPath,\n      implicitSlot,\n      formatContext,\n      abortSet,\n      lastTimestamp,\n      debugOwner,\n      debugStack,\n      debugTask\n    ) {\n      request.pendingChunks++;\n      var id = request.nextChunkId++;\n      \"object\" !== typeof model ||\n        null === model ||\n        null !== keyPath ||\n        implicitSlot ||\n        request.writtenObjects.set(model, serializeByValueID(id));\n      var task = {\n        id: id,\n        status: PENDING$1,\n        model: model,\n        keyPath: keyPath,\n        implicitSlot: implicitSlot,\n        formatContext: formatContext,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        thenableState: null,\n        timed: !1\n      };\n      task.time = lastTimestamp;\n      task.environmentName = request.environmentName();\n      task.debugOwner = debugOwner;\n      task.debugStack = debugStack;\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function resolveModel(request, task, parent, parentPropertyName, value) {\n      var jsonValue = value;\n      null !== value &&\n        \"object\" === typeof value &&\n        \"function\" === typeof value.toJSON &&\n        (jsonValue = value.toJSON(parentPropertyName));\n      var originalValue = parent[parentPropertyName];\n      \"object\" !== typeof originalValue ||\n        originalValue === jsonValue ||\n        originalValue instanceof Date ||\n        callWithDebugContextInDEV(request, task, function () {\n          ArrayBuffer.isView(originalValue)\n            ? console.error(\n                \"Binary data with a toJSON method, such as a Node.js Buffer, is serialized through toJSON instead of as binary. Pass a Uint8Array or ArrayBuffer to send binary data.%s\",\n                describeObjectForErrorMessage(parent, parentPropertyName)\n              )\n            : \"Object\" !== objectName(originalValue)\n              ? \"string\" === typeof jsxChildrenParents.get(parent)\n                ? console.error(\n                    \"%s objects cannot be rendered as text children. Try formatting it using toString().%s\",\n                    objectName(originalValue),\n                    describeObjectForErrorMessage(parent, parentPropertyName)\n                  )\n                : console.error(\n                    \"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s\",\n                    objectName(originalValue),\n                    describeObjectForErrorMessage(parent, parentPropertyName)\n                  )\n              : console.error(\n                  \"Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s\",\n                  describeObjectForErrorMessage(parent, parentPropertyName)\n                );\n        });\n      value = renderModel(request, task, parent, parentPropertyName, jsonValue);\n      if (null === value || \"object\" !== typeof value) return value;\n      if (isArrayImpl(value)) {\n        var _resolved = [];\n        for (jsonValue = 0; jsonValue < value.length; jsonValue++)\n          _resolved[jsonValue] = resolveModel(\n            request,\n            task,\n            value,\n            \"\" + jsonValue,\n            value[jsonValue]\n          );\n        return _resolved;\n      }\n      jsonValue = {};\n      for (_resolved in value)\n        if (hasOwnProperty.call(value, _resolved)) {\n          var resolvedValue = resolveModel(\n            request,\n            task,\n            value,\n            _resolved,\n            value[_resolved]\n          );\n          _resolved === __PROTO__$1\n            ? Object.defineProperty(jsonValue, _resolved, {\n                value: resolvedValue,\n                enumerable: !0,\n                writable: !0,\n                configurable: !0\n              })\n            : (jsonValue[_resolved] = resolvedValue);\n        }\n      return jsonValue;\n    }\n    function serializeByValueID(id) {\n      return \"$\" + id.toString(16);\n    }\n    function serializeLazyID(id) {\n      return \"$L\" + id.toString(16);\n    }\n    function serializeDeferredObject(request, value) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      return null !== deferredDebugObjects\n        ? (request.pendingDebugChunks++,\n          (request = request.nextChunkId++),\n          deferredDebugObjects.existing.set(value, request),\n          deferredDebugObjects.retained.set(request, value),\n          \"$Y\" + request.toString(16))\n        : \"$Y\";\n    }\n    function serializeNumber(number) {\n      return Number.isFinite(number)\n        ? 0 === number && -Infinity === 1 / number\n          ? \"$-0\"\n          : number\n        : Infinity === number\n          ? \"$Infinity\"\n          : -Infinity === number\n            ? \"$-Infinity\"\n            : \"$NaN\";\n    }\n    function encodeReferenceChunk(request, id, reference) {\n      request = stringify(reference);\n      return id.toString(16) + \":\" + request + \"\\n\";\n    }\n    function serializeClientReference(\n      request,\n      parent,\n      parentPropertyName,\n      clientReference\n    ) {\n      var clientReferenceKey = clientReference.$$async\n          ? clientReference.$$id + \"#async\"\n          : clientReference.$$id,\n        writtenClientReferences = request.writtenClientReferences,\n        existingId = writtenClientReferences.get(clientReferenceKey);\n      if (void 0 !== existingId)\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(existingId)\n          : serializeByValueID(existingId);\n      try {\n        var clientReferenceMetadata = resolveClientReferenceMetadata(\n          request.bundlerConfig,\n          clientReference\n        );\n        request.pendingChunks++;\n        var importId = request.nextChunkId++;\n        emitImportChunk(request, importId, clientReferenceMetadata, !1);\n        writtenClientReferences.set(clientReferenceKey, importId);\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(importId)\n          : serializeByValueID(importId);\n      } catch (x) {\n        return (\n          request.pendingChunks++,\n          (parent = request.nextChunkId++),\n          (parentPropertyName = logRecoverableError(request, x, null)),\n          emitErrorChunk(request, parent, parentPropertyName, x, !1, null),\n          serializeByValueID(parent)\n        );\n      }\n    }\n    function serializeDebugClientReference(\n      request,\n      parent,\n      parentPropertyName,\n      clientReference\n    ) {\n      var existingId = request.writtenClientReferences.get(\n        clientReference.$$async\n          ? clientReference.$$id + \"#async\"\n          : clientReference.$$id\n      );\n      if (void 0 !== existingId)\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(existingId)\n          : serializeByValueID(existingId);\n      try {\n        var clientReferenceMetadata = resolveClientReferenceMetadata(\n          request.bundlerConfig,\n          clientReference\n        );\n        request.pendingDebugChunks++;\n        var importId = request.nextChunkId++;\n        emitImportChunk(request, importId, clientReferenceMetadata, !0);\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(importId)\n          : serializeByValueID(importId);\n      } catch (x) {\n        return (\n          request.pendingDebugChunks++,\n          (parent = request.nextChunkId++),\n          (parentPropertyName = logRecoverableError(request, x, null)),\n          emitErrorChunk(request, parent, parentPropertyName, x, !0, null),\n          serializeByValueID(parent)\n        );\n      }\n    }\n    function outlineModel(request, value) {\n      return outlineModelWithFormatContext(request, value, 0);\n    }\n    function outlineModelWithFormatContext(request, value, formatContext) {\n      value = createTask(\n        request,\n        value,\n        null,\n        !1,\n        formatContext,\n        request.abortableTasks,\n        performance.now(),\n        null,\n        null,\n        null\n      );\n      retryTask(request, value);\n      return value.id;\n    }\n    function serializeServerReference(request, serverReference) {\n      var writtenServerReferences = request.writtenServerReferences,\n        existingId = writtenServerReferences.get(serverReference);\n      if (void 0 !== existingId) return \"$h\" + existingId.toString(16);\n      existingId = serverReference.$$bound;\n      existingId = null === existingId ? null : Promise.resolve(existingId);\n      var id = serverReference.$$id,\n        location = null,\n        error = serverReference.$$location;\n      error &&\n        ((error = parseStackTrace(error, 1)),\n        0 < error.length &&\n          ((location = error[0]),\n          (location = [location[0], location[1], location[2], location[3]])));\n      existingId =\n        null !== location\n          ? {\n              id: id,\n              bound: existingId,\n              name:\n                \"function\" === typeof serverReference\n                  ? serverReference.name\n                  : \"\",\n              env: (0, request.environmentName)(),\n              location: location\n            }\n          : { id: id, bound: existingId };\n      request = outlineModel(request, existingId);\n      writtenServerReferences.set(serverReference, request);\n      return \"$h\" + request.toString(16);\n    }\n    function serializeLargeTextString(request, text) {\n      request.pendingChunks++;\n      var textId = request.nextChunkId++;\n      emitTextChunk(request, textId, text, !1);\n      return serializeByValueID(textId);\n    }\n    function serializeMap(request, map) {\n      map = Array.from(map);\n      return \"$Q\" + outlineModel(request, map).toString(16);\n    }\n    function serializeFormData(request, formData) {\n      formData = Array.from(formData.entries());\n      return \"$K\" + outlineModel(request, formData).toString(16);\n    }\n    function serializeSet(request, set) {\n      set = Array.from(set);\n      return \"$W\" + outlineModel(request, set).toString(16);\n    }\n    function serializeTypedArray(request, tag, typedArray) {\n      request.pendingChunks++;\n      var bufferId = request.nextChunkId++;\n      emitTypedArrayChunk(request, bufferId, tag, typedArray, !1);\n      return serializeByValueID(bufferId);\n    }\n    function serializeDebugTypedArray(request, tag, typedArray) {\n      if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray))\n        return serializeDeferredObject(request, typedArray);\n      request.pendingDebugChunks++;\n      var bufferId = request.nextChunkId++;\n      emitTypedArrayChunk(request, bufferId, tag, typedArray, !0);\n      return serializeByValueID(bufferId);\n    }\n    function serializeDebugBlob(request, blob) {\n      function progress(entry) {\n        if (entry.done)\n          emitOutlinedDebugModelChunk(\n            request,\n            id,\n            { objectLimit: model.length + 2 },\n            model\n          ),\n            enqueueFlush(request);\n        else\n          return (\n            model.push(entry.value), reader.read().then(progress).catch(error)\n          );\n      }\n      function error(reason) {\n        emitErrorChunk(request, id, \"\", reason, !0, null);\n        enqueueFlush(request);\n        reader.cancel(reason).then(noop, noop);\n      }\n      var model = [blob.type],\n        reader = blob.stream().getReader();\n      request.pendingDebugChunks++;\n      var id = request.nextChunkId++;\n      reader.read().then(progress).catch(error);\n      return \"$B\" + id.toString(16);\n    }\n    function serializeBlob(request, blob) {\n      function progress(entry) {\n        if (newTask.status === PENDING$1)\n          if (entry.done)\n            request.cacheController.signal.removeEventListener(\n              \"abort\",\n              abortBlob\n            ),\n              pingTask(request, newTask);\n          else\n            return (\n              model.push(entry.value), reader.read().then(progress).catch(error)\n            );\n      }\n      function error(reason) {\n        newTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortBlob\n          ),\n          erroredTask(request, newTask, reason),\n          enqueueFlush(request),\n          reader.cancel(reason).then(error, error));\n      }\n      function abortBlob() {\n        if (newTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortBlob);\n          signal = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(newTask),\n              haltTask(newTask),\n              finishHaltedTask(newTask, request))\n            : (erroredTask(request, newTask, signal), enqueueFlush(request));\n          reader.cancel(signal).then(error, error);\n        }\n      }\n      var model = [blob.type],\n        newTask = createTask(\n          request,\n          model,\n          null,\n          !1,\n          0,\n          request.abortableTasks,\n          performance.now(),\n          null,\n          null,\n          null\n        ),\n        reader = blob.stream().getReader();\n      request.cacheController.signal.addEventListener(\"abort\", abortBlob);\n      reader.read().then(progress).catch(error);\n      return \"$B\" + newTask.id.toString(16);\n    }\n    function renderModel(request, task, parent, key, value) {\n      serializedSize += key.length;\n      var prevKeyPath = task.keyPath,\n        prevImplicitSlot = task.implicitSlot;\n      try {\n        return renderModelDestructive(request, task, parent, key, value);\n      } catch (thrownValue) {\n        parent = task.model;\n        parent =\n          \"object\" === typeof parent &&\n          null !== parent &&\n          (parent.$$typeof === REACT_ELEMENT_TYPE ||\n            parent.$$typeof === REACT_LAZY_TYPE);\n        if (request.status === ABORTING) {\n          task.status = ABORTED;\n          if (request.type === PRERENDER)\n            return (\n              (task = request.nextChunkId++),\n              (task = parent\n                ? serializeLazyID(task)\n                : serializeByValueID(task)),\n              task\n            );\n          task = request.fatalError;\n          return parent ? serializeLazyID(task) : serializeByValueID(task);\n        }\n        key =\n          thrownValue === SuspenseException\n            ? getSuspendedThenable()\n            : thrownValue;\n        if (\n          \"object\" === typeof key &&\n          null !== key &&\n          \"function\" === typeof key.then\n        )\n          return (\n            (request = createTask(\n              request,\n              task.model,\n              task.keyPath,\n              task.implicitSlot,\n              task.formatContext,\n              request.abortableTasks,\n              task.time,\n              task.debugOwner,\n              task.debugStack,\n              task.debugTask\n            )),\n            (value = request.ping),\n            key.then(value, value),\n            (request.thenableState = getThenableStateAfterSuspending()),\n            (task.keyPath = prevKeyPath),\n            (task.implicitSlot = prevImplicitSlot),\n            parent\n              ? serializeLazyID(request.id)\n              : serializeByValueID(request.id)\n          );\n        task.keyPath = prevKeyPath;\n        task.implicitSlot = prevImplicitSlot;\n        request.pendingChunks++;\n        prevKeyPath = request.nextChunkId++;\n        prevImplicitSlot = logRecoverableError(request, key, task);\n        emitErrorChunk(\n          request,\n          prevKeyPath,\n          prevImplicitSlot,\n          key,\n          !1,\n          task.debugOwner\n        );\n        return parent\n          ? serializeLazyID(prevKeyPath)\n          : serializeByValueID(prevKeyPath);\n      }\n    }\n    function renderModelDestructive(\n      request,\n      task,\n      parent,\n      parentPropertyName,\n      value\n    ) {\n      task.model = value;\n      parentPropertyName === __PROTO__$1 &&\n        callWithDebugContextInDEV(request, task, function () {\n          console.error(\n            \"Expected not to serialize an object with own property `__proto__`. When parsed this property will be omitted.%s\",\n            describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        });\n      if (value === REACT_ELEMENT_TYPE) return \"$\";\n      if (null === value) return null;\n      if (\"object\" === typeof value) {\n        switch (value.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var elementReference = null,\n              _writtenObjects = request.writtenObjects;\n            if (null === task.keyPath && !task.implicitSlot) {\n              var _existingReference = _writtenObjects.get(value);\n              if (void 0 !== _existingReference)\n                if (modelRoot === value) modelRoot = null;\n                else return _existingReference;\n              else\n                -1 === parentPropertyName.indexOf(\":\") &&\n                  ((_existingReference = _writtenObjects.get(parent)),\n                  void 0 !== _existingReference &&\n                    ((elementReference =\n                      _existingReference + \":\" + parentPropertyName),\n                    _writtenObjects.set(value, elementReference)));\n            }\n            if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);\n            if ((_existingReference = value._debugInfo))\n              if (canEmitDebugInfo)\n                forwardDebugInfo(request, task, _existingReference);\n              else return outlineTask(request, task);\n            _existingReference = value.props;\n            var refProp = _existingReference.ref;\n            refProp = void 0 !== refProp ? refProp : null;\n            task.debugOwner = value._owner;\n            task.debugStack = value._debugStack;\n            task.debugTask = value._debugTask;\n            if (\n              void 0 === value._owner ||\n              void 0 === value._debugStack ||\n              void 0 === value._debugTask\n            ) {\n              var key = \"\";\n              null !== value.key &&\n                value.key !== REACT_OPTIMISTIC_KEY &&\n                (key = ' key=\"' + value.key + '\"');\n              console.error(\n                \"Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\\n- The element is created with a production version of React but rendered in development.\\n- The element was cloned with a custom function instead of `React.cloneElement`.\\nThe props of this element may help locate this element: %o\",\n                value.type,\n                key,\n                value.props\n              );\n            }\n            request = renderElement(\n              request,\n              task,\n              value.type,\n              value.key,\n              refProp,\n              _existingReference,\n              value._store.validated\n            );\n            \"object\" === typeof request &&\n              null !== request &&\n              null !== elementReference &&\n              (_writtenObjects.has(request) ||\n                _writtenObjects.set(request, elementReference));\n            return request;\n          case REACT_LAZY_TYPE:\n            if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);\n            task.thenableState = null;\n            elementReference = callLazyInitInDEV(value);\n            if (request.status === ABORTING) throw null;\n            if ((_writtenObjects = value._debugInfo))\n              if (canEmitDebugInfo)\n                forwardDebugInfo(request, task, _writtenObjects);\n              else return outlineTask(request, task);\n            return renderModelDestructive(\n              request,\n              task,\n              parent,\n              parentPropertyName,\n              elementReference\n            );\n          case REACT_LEGACY_ELEMENT_TYPE:\n            throw Error(\n              'A React Element from an older version of React was rendered. This is not supported. It can happen if:\\n- Multiple copies of the \"react\" package is used.\\n- A library pre-bundled an old copy of \"react\" or \"react/jsx-runtime\".\\n- A compiler tries to \"inline\" JSX instead of using the runtime.'\n            );\n        }\n        if (isClientReference(value))\n          return serializeClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((elementReference = request.temporaryReferences.get(value)),\n          void 0 !== elementReference)\n        )\n          return \"$T\" + elementReference;\n        elementReference = request.writtenObjects;\n        _writtenObjects = elementReference.get(value);\n        if (\"function\" === typeof value.then) {\n          if (void 0 !== _writtenObjects) {\n            if (null !== task.keyPath || task.implicitSlot)\n              return (\n                \"$@\" + serializeThenable(request, task, value).toString(16)\n              );\n            if (modelRoot === value) modelRoot = null;\n            else return _writtenObjects;\n          }\n          request = \"$@\" + serializeThenable(request, task, value).toString(16);\n          elementReference.set(value, request);\n          return request;\n        }\n        if (void 0 !== _writtenObjects)\n          if (modelRoot === value) {\n            if (_writtenObjects !== serializeByValueID(task.id))\n              return _writtenObjects;\n            modelRoot = null;\n          } else return _writtenObjects;\n        else if (\n          -1 === parentPropertyName.indexOf(\":\") &&\n          ((_writtenObjects = elementReference.get(parent)),\n          void 0 !== _writtenObjects)\n        ) {\n          _existingReference = parentPropertyName;\n          if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE)\n            switch (parentPropertyName) {\n              case \"1\":\n                _existingReference = \"type\";\n                break;\n              case \"2\":\n                _existingReference = \"key\";\n                break;\n              case \"3\":\n                _existingReference = \"props\";\n                break;\n              case \"4\":\n                _existingReference = \"_owner\";\n            }\n          elementReference.set(\n            value,\n            _writtenObjects + \":\" + _existingReference\n          );\n        }\n        if (isArrayImpl(value)) return renderFragment(request, task, value);\n        if (value instanceof Map) return serializeMap(request, value);\n        if (value instanceof Set) return serializeSet(request, value);\n        if (\"function\" === typeof FormData && value instanceof FormData)\n          return serializeFormData(request, value);\n        if (value instanceof Error) return serializeErrorValue(request, value);\n        if (value instanceof ArrayBuffer)\n          return serializeTypedArray(request, \"A\", new Uint8Array(value));\n        if (value instanceof Int8Array)\n          return serializeTypedArray(request, \"O\", value);\n        if (value instanceof Uint8Array)\n          return serializeTypedArray(request, \"o\", value);\n        if (value instanceof Uint8ClampedArray)\n          return serializeTypedArray(request, \"U\", value);\n        if (value instanceof Int16Array)\n          return serializeTypedArray(request, \"S\", value);\n        if (value instanceof Uint16Array)\n          return serializeTypedArray(request, \"s\", value);\n        if (value instanceof Int32Array)\n          return serializeTypedArray(request, \"L\", value);\n        if (value instanceof Uint32Array)\n          return serializeTypedArray(request, \"l\", value);\n        if (value instanceof Float32Array)\n          return serializeTypedArray(request, \"G\", value);\n        if (value instanceof Float64Array)\n          return serializeTypedArray(request, \"g\", value);\n        if (value instanceof BigInt64Array)\n          return serializeTypedArray(request, \"M\", value);\n        if (value instanceof BigUint64Array)\n          return serializeTypedArray(request, \"m\", value);\n        if (value instanceof DataView)\n          return serializeTypedArray(request, \"V\", value);\n        if (\"function\" === typeof Blob && value instanceof Blob)\n          return serializeBlob(request, value);\n        if ((elementReference = getIteratorFn(value)))\n          return (\n            (elementReference = elementReference.call(value)),\n            elementReference === value\n              ? \"$i\" +\n                outlineModel(request, Array.from(elementReference)).toString(16)\n              : renderFragment(request, task, Array.from(elementReference))\n          );\n        if (\n          \"function\" === typeof ReadableStream &&\n          value instanceof ReadableStream\n        )\n          return serializeReadableStream(request, task, value);\n        elementReference = value[ASYNC_ITERATOR];\n        if (\"function\" === typeof elementReference)\n          return renderAsyncFragment(request, task, value, elementReference);\n        if (value instanceof Date) return \"$D\" + value.toJSON();\n        elementReference = getPrototypeOf(value);\n        if (\n          elementReference !== ObjectPrototype$1 &&\n          (null === elementReference ||\n            null !== getPrototypeOf(elementReference))\n        )\n          throw Error(\n            \"Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.\" +\n              describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        if (\"Object\" !== objectName(value))\n          callWithDebugContextInDEV(request, task, function () {\n            console.error(\n              \"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s\",\n              objectName(value),\n              describeObjectForErrorMessage(parent, parentPropertyName)\n            );\n          });\n        else if (!isSimpleObject(value))\n          callWithDebugContextInDEV(request, task, function () {\n            console.error(\n              \"Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s\",\n              describeObjectForErrorMessage(parent, parentPropertyName)\n            );\n          });\n        else if (Object.getOwnPropertySymbols) {\n          var symbols = Object.getOwnPropertySymbols(value);\n          0 < symbols.length &&\n            callWithDebugContextInDEV(request, task, function () {\n              console.error(\n                \"Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s\",\n                symbols[0].description,\n                describeObjectForErrorMessage(parent, parentPropertyName)\n              );\n            });\n        }\n        return value;\n      }\n      if (\"string\" === typeof value)\n        return (\n          (serializedSize += value.length),\n          \"Z\" === value[value.length - 1] &&\n          parent[parentPropertyName] instanceof Date\n            ? \"$D\" + value\n            : 1024 <= value.length && null !== byteLengthOfChunk\n              ? serializeLargeTextString(request, value)\n              : \"$\" === value[0]\n                ? \"$\" + value\n                : value\n        );\n      if (\"boolean\" === typeof value) return value;\n      if (\"number\" === typeof value) return serializeNumber(value);\n      if (\"undefined\" === typeof value) return \"$undefined\";\n      if (\"function\" === typeof value) {\n        if (isClientReference(value))\n          return serializeClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (value.$$typeof === SERVER_REFERENCE_TAG)\n          return serializeServerReference(request, value);\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((request = request.temporaryReferences.get(value)),\n          void 0 !== request)\n        )\n          return \"$T\" + request;\n        if (value.$$typeof === TEMPORARY_REFERENCE_TAG)\n          throw Error(\n            \"Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.\"\n          );\n        if (/^on[A-Z]/.test(parentPropertyName))\n          throw Error(\n            \"Event handlers cannot be passed to Client Component props.\" +\n              describeObjectForErrorMessage(parent, parentPropertyName) +\n              \"\\nIf you need interactivity, consider converting part of this to a Client Component.\"\n          );\n        if (\n          jsxChildrenParents.has(parent) ||\n          (jsxPropsParents.has(parent) && \"children\" === parentPropertyName)\n        )\n          throw (\n            ((request = value.displayName || value.name || \"Component\"),\n            Error(\n              \"Functions are not valid as a child of Client Components. This may happen if you return \" +\n                request +\n                \" instead of <\" +\n                request +\n                \" /> from render. Or maybe you meant to call this function rather than return it.\" +\n                describeObjectForErrorMessage(parent, parentPropertyName)\n            ))\n          );\n        throw Error(\n          'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with \"use server\". Or maybe you meant to call this function rather than return it.' +\n            describeObjectForErrorMessage(parent, parentPropertyName)\n        );\n      }\n      if (\"symbol\" === typeof value) {\n        task = request.writtenSymbols;\n        elementReference = task.get(value);\n        if (void 0 !== elementReference)\n          return serializeByValueID(elementReference);\n        elementReference = value.description;\n        if (Symbol.for(elementReference) !== value)\n          throw Error(\n            \"Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(\" +\n              (value.description + \") cannot be found among global symbols.\") +\n              describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        request.pendingChunks++;\n        _writtenObjects = request.nextChunkId++;\n        emitSymbolChunk(request, _writtenObjects, elementReference);\n        task.set(value, _writtenObjects);\n        return serializeByValueID(_writtenObjects);\n      }\n      if (\"bigint\" === typeof value) return \"$n\" + value.toString(10);\n      throw Error(\n        \"Type \" +\n          typeof value +\n          \" is not supported in Client Component props.\" +\n          describeObjectForErrorMessage(parent, parentPropertyName)\n      );\n    }\n    function logRecoverableError(request, error, task) {\n      var prevRequest = currentRequest;\n      currentRequest = null;\n      try {\n        var onError = request.onError;\n        var errorDigest =\n          null !== task\n            ? requestStorage.run(\n                void 0,\n                callWithDebugContextInDEV,\n                request,\n                task,\n                onError,\n                error\n              )\n            : requestStorage.run(void 0, onError, error);\n      } finally {\n        currentRequest = prevRequest;\n      }\n      if (null != errorDigest && \"string\" !== typeof errorDigest)\n        throw Error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"' +\n            typeof errorDigest +\n            '\" instead'\n        );\n      return errorDigest || \"\";\n    }\n    function fatalError(request, error) {\n      var onFatalError = request.onFatalError;\n      onFatalError(error);\n      null !== request.destination\n        ? ((request.status = CLOSED), request.destination.destroy(error))\n        : ((request.status = CLOSING), (request.fatalError = error));\n      request.cacheController.abort(\n        Error(\"The render was aborted due to a fatal error.\", { cause: error })\n      );\n    }\n    function serializeErrorValue(request, error) {\n      var name = \"Error\",\n        env = (0, request.environmentName)();\n      try {\n        name = error.name;\n        var message = String(error.message);\n        var stack = filterStackTrace(request, parseStackTrace(error, 0));\n        var errorEnv = error.environmentName;\n        \"string\" === typeof errorEnv && (env = errorEnv);\n      } catch (x) {\n        (message =\n          \"An error occurred but serializing the error message failed.\"),\n          (stack = []);\n      }\n      name = { name: name, message: message, stack: stack, env: env };\n      \"cause\" in error &&\n        ((message = outlineModel(request, error.cause)),\n        (name.cause = serializeByValueID(message)));\n      \"undefined\" !== typeof AggregateError &&\n        error instanceof AggregateError &&\n        ((error = outlineModel(request, error.errors)),\n        (name.errors = serializeByValueID(error)));\n      return \"$Z\" + outlineModel(request, name).toString(16);\n    }\n    function emitErrorChunk(request, id, digest, error, debug, owner) {\n      var name = \"Error\",\n        env = (0, request.environmentName)(),\n        causeReference = null,\n        errorsReference = null;\n      try {\n        if (error instanceof Error) {\n          name = error.name;\n          var message = String(error.message);\n          var stack = filterStackTrace(request, parseStackTrace(error, 0));\n          var errorEnv = error.environmentName;\n          \"string\" === typeof errorEnv && (env = errorEnv);\n          if (\"cause\" in error) {\n            var cause = error.cause,\n              causeId = debug\n                ? outlineDebugModel(request, { objectLimit: 5 }, cause)\n                : outlineModel(request, cause);\n            causeReference = serializeByValueID(causeId);\n          }\n          if (\n            \"undefined\" !== typeof AggregateError &&\n            error instanceof AggregateError\n          ) {\n            var errors = error.errors,\n              errorsId = debug\n                ? outlineDebugModel(request, { objectLimit: 5 }, errors)\n                : outlineModel(request, errors);\n            errorsReference = serializeByValueID(errorsId);\n          }\n        } else\n          (message =\n            \"object\" === typeof error && null !== error\n              ? describeObjectForErrorMessage(error)\n              : String(error)),\n            (stack = []);\n      } catch (x) {\n        (message =\n          \"An error occurred but serializing the error message failed.\"),\n          (stack = []);\n      }\n      error = null == owner ? null : outlineComponentInfo(request, owner);\n      digest = {\n        digest: digest,\n        name: name,\n        message: message,\n        stack: stack,\n        env: env,\n        owner: error\n      };\n      null !== causeReference && (digest.cause = causeReference);\n      null !== errorsReference && (digest.errors = errorsReference);\n      id = id.toString(16) + \":E\" + stringify(digest) + \"\\n\";\n      debug\n        ? request.completedDebugChunks.push(id)\n        : request.completedErrorChunks.push(id);\n    }\n    function emitImportChunk(request, id, clientReferenceMetadata, debug) {\n      clientReferenceMetadata = stringify(clientReferenceMetadata);\n      id = id.toString(16) + \":I\" + clientReferenceMetadata + \"\\n\";\n      debug\n        ? request.completedDebugChunks.push(id)\n        : request.completedImportChunks.push(id);\n    }\n    function emitSymbolChunk(request, id, name) {\n      id = encodeReferenceChunk(request, id, \"$S\" + name);\n      request.completedImportChunks.push(id);\n    }\n    function emitDebugHaltChunk(request, id) {\n      id = id.toString(16) + \":\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function emitDebugChunk(request, id, debugInfo) {\n      var json = serializeDebugModel(request, 500, debugInfo);\n      null !== request.debugDestination\n        ? '\"' === json[0] && \"$\" === json[1]\n          ? ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n            request.completedRegularChunks.push(id))\n          : ((debugInfo = request.nextChunkId++),\n            (json = debugInfo.toString(16) + \":\" + json + \"\\n\"),\n            request.pendingDebugChunks++,\n            request.completedDebugChunks.push(json),\n            (id = id.toString(16) + ':D\"$' + debugInfo.toString(16) + '\"\\n'),\n            request.completedRegularChunks.push(id))\n        : ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n          request.completedRegularChunks.push(id));\n    }\n    function outlineComponentInfo(request, componentInfo) {\n      var existingRef = request.writtenDebugObjects.get(componentInfo);\n      if (void 0 !== existingRef) return existingRef;\n      null != componentInfo.owner &&\n        outlineComponentInfo(request, componentInfo.owner);\n      existingRef = 10;\n      null != componentInfo.stack &&\n        (existingRef += componentInfo.stack.length);\n      existingRef = { objectLimit: existingRef };\n      var componentDebugInfo = {\n        name: componentInfo.name,\n        key: componentInfo.key\n      };\n      null != componentInfo.env && (componentDebugInfo.env = componentInfo.env);\n      null != componentInfo.owner &&\n        (componentDebugInfo.owner = componentInfo.owner);\n      null == componentInfo.stack && null != componentInfo.debugStack\n        ? (componentDebugInfo.stack = filterStackTrace(\n            request,\n            parseStackTrace(componentInfo.debugStack, 1)\n          ))\n        : null != componentInfo.stack &&\n          (componentDebugInfo.stack = componentInfo.stack);\n      componentDebugInfo.props = componentInfo.props;\n      existingRef = outlineDebugModel(request, existingRef, componentDebugInfo);\n      existingRef = serializeByValueID(existingRef);\n      request.writtenDebugObjects.set(componentInfo, existingRef);\n      request.writtenObjects.set(componentInfo, existingRef);\n      return existingRef;\n    }\n    function emitIOInfoChunk(\n      request,\n      id,\n      name,\n      start,\n      end,\n      value,\n      env,\n      owner,\n      stack\n    ) {\n      var objectLimit = 10;\n      stack && (objectLimit += stack.length);\n      name = {\n        name: name,\n        start: start - request.timeOrigin,\n        end: end - request.timeOrigin\n      };\n      null != env && (name.env = env);\n      null != stack && (name.stack = stack);\n      null != owner && (name.owner = owner);\n      void 0 !== value && (name.value = value);\n      value = serializeDebugModel(request, objectLimit, name);\n      id = id.toString(16) + \":J\" + value + \"\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function serializeIONode(request, ioNode, promiseRef) {\n      var existingRef = request.writtenDebugObjects.get(ioNode);\n      if (void 0 !== existingRef) return existingRef;\n      existingRef = null;\n      var name = \"\";\n      if (null !== ioNode.promise) {\n        var promise = ioNode.promise.deref();\n        void 0 !== promise &&\n          \"string\" === typeof promise.displayName &&\n          (name = promise.displayName);\n      }\n      if (null !== ioNode.stack) {\n        a: {\n          existingRef = ioNode.stack;\n          for (promise = 0; promise < existingRef.length; promise++) {\n            var callsite = existingRef[promise];\n            if (!isPromiseCreationInternal(callsite[1], callsite[0])) {\n              promise = 0 < promise ? existingRef.slice(promise) : existingRef;\n              break a;\n            }\n          }\n          promise = [];\n        }\n        existingRef = filterStackTrace(request, promise);\n        if (\"\" === name) {\n          a: {\n            name = promise;\n            promise = \"\";\n            callsite = request.filterStackFrame;\n            for (var i = 0; i < name.length; i++) {\n              var callsite$jscomp$0 = name[i],\n                functionName = callsite$jscomp$0[0],\n                url = devirtualizeURL(callsite$jscomp$0[1]);\n              if (\n                callsite(\n                  url,\n                  functionName,\n                  callsite$jscomp$0[2],\n                  callsite$jscomp$0[3]\n                ) &&\n                \"\" !== url\n              ) {\n                if (\"\" === promise) {\n                  name = functionName;\n                  break a;\n                }\n                name = promise;\n                break a;\n              } else promise = functionName;\n            }\n            name = \"\";\n          }\n          name.startsWith(\"Window.\")\n            ? (name = name.slice(7))\n            : name.startsWith(\"<anonymous>.\") && (name = name.slice(7));\n        }\n      }\n      promise = ioNode.owner;\n      null != promise && outlineComponentInfo(request, promise);\n      callsite = void 0;\n      null !== promiseRef && (callsite = promiseRef.deref());\n      promiseRef = (0, request.environmentName)();\n      i = 3 === ioNode.tag ? request.abortTime : ioNode.end;\n      request.pendingDebugChunks++;\n      callsite$jscomp$0 = request.nextChunkId++;\n      emitIOInfoChunk(\n        request,\n        callsite$jscomp$0,\n        name,\n        ioNode.start,\n        i,\n        callsite,\n        promiseRef,\n        promise,\n        existingRef\n      );\n      promiseRef = serializeByValueID(callsite$jscomp$0);\n      request.writtenDebugObjects.set(ioNode, promiseRef);\n      return promiseRef;\n    }\n    function emitTypedArrayChunk(request, id, tag, typedArray, debug) {\n      debug ? request.pendingDebugChunks++ : request.pendingChunks++;\n      typedArray = new Uint8Array(\n        typedArray.buffer,\n        typedArray.byteOffset,\n        typedArray.byteLength\n      );\n      var binaryLength = typedArray.byteLength;\n      id = id.toString(16) + \":\" + tag + binaryLength.toString(16) + \",\";\n      debug\n        ? request.completedDebugChunks.push(\n            NEXT_TWO_CHUNKS_ARE_ATOMIC,\n            id,\n            typedArray\n          )\n        : request.completedRegularChunks.push(\n            NEXT_TWO_CHUNKS_ARE_ATOMIC,\n            id,\n            typedArray\n          );\n    }\n    function emitTextChunk(request, id, text, debug) {\n      if (null === byteLengthOfChunk)\n        throw Error(\n          \"Existence of byteLengthOfChunk should have already been checked. This is a bug in React.\"\n        );\n      debug ? request.pendingDebugChunks++ : request.pendingChunks++;\n      var binaryLength = byteLengthOfChunk(text);\n      id = id.toString(16) + \":T\" + binaryLength.toString(16) + \",\";\n      debug\n        ? request.completedDebugChunks.push(\n            NEXT_TWO_CHUNKS_ARE_ATOMIC,\n            id,\n            text\n          )\n        : request.completedRegularChunks.push(\n            NEXT_TWO_CHUNKS_ARE_ATOMIC,\n            id,\n            text\n          );\n    }\n    function renderDebugModel(\n      request,\n      counter,\n      parent,\n      parentPropertyName,\n      value\n    ) {\n      if (null === value) return null;\n      if (value === REACT_ELEMENT_TYPE) return \"$\";\n      if (\"object\" === typeof value) {\n        if (isClientReference(value))\n          return serializeDebugClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (value.$$typeof === CONSTRUCTOR_MARKER) {\n          value = value.constructor;\n          var ref = request.writtenDebugObjects.get(value);\n          void 0 === ref &&\n            ((request = outlineDebugModel(request, counter, value)),\n            (ref = serializeByValueID(request)));\n          return \"$P\" + ref.slice(1);\n        }\n        if (void 0 !== request.temporaryReferences) {\n          var tempRef = request.temporaryReferences.get(value);\n          if (void 0 !== tempRef) return \"$T\" + tempRef;\n        }\n        tempRef = request.writtenDebugObjects;\n        var existingDebugReference = tempRef.get(value);\n        if (void 0 !== existingDebugReference)\n          if (debugModelRoot === value) debugModelRoot = null;\n          else return existingDebugReference;\n        else if (-1 === parentPropertyName.indexOf(\":\"))\n          if (\n            ((existingDebugReference = tempRef.get(parent)),\n            void 0 !== existingDebugReference)\n          ) {\n            if (0 >= counter.objectLimit && !doNotLimit.has(value))\n              return serializeDeferredObject(request, value);\n            var propertyName = parentPropertyName;\n            if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE)\n              switch (parentPropertyName) {\n                case \"1\":\n                  propertyName = \"type\";\n                  break;\n                case \"2\":\n                  propertyName = \"key\";\n                  break;\n                case \"3\":\n                  propertyName = \"props\";\n                  break;\n                case \"4\":\n                  propertyName = \"_owner\";\n              }\n            tempRef.set(value, existingDebugReference + \":\" + propertyName);\n          } else if (debugNoOutline !== value) {\n            if (\"function\" === typeof value.then)\n              return serializeDebugThenable(request, counter, value);\n            request = outlineDebugModel(request, counter, value);\n            return serializeByValueID(request);\n          }\n        parent = request.writtenObjects.get(value);\n        if (void 0 !== parent) return parent;\n        if (0 >= counter.objectLimit && !doNotLimit.has(value))\n          return serializeDeferredObject(request, value);\n        counter.objectLimit--;\n        parent = request.deferredDebugObjects;\n        if (\n          null !== parent &&\n          ((parentPropertyName = parent.existing.get(value)),\n          void 0 !== parentPropertyName)\n        )\n          return (\n            parent.existing.delete(value),\n            parent.retained.delete(parentPropertyName),\n            emitOutlinedDebugModelChunk(\n              request,\n              parentPropertyName,\n              counter,\n              value\n            ),\n            serializeByValueID(parentPropertyName)\n          );\n        switch (value.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            null != value._owner && outlineComponentInfo(request, value._owner);\n            \"object\" === typeof value.type &&\n              null !== value.type &&\n              doNotLimit.add(value.type);\n            \"object\" === typeof value.key &&\n              null !== value.key &&\n              doNotLimit.add(value.key);\n            doNotLimit.add(value.props);\n            null !== value._owner && doNotLimit.add(value._owner);\n            counter = null;\n            if (null != value._debugStack)\n              for (\n                counter = filterStackTrace(\n                  request,\n                  parseStackTrace(value._debugStack, 1)\n                ),\n                  doNotLimit.add(counter),\n                  request = 0;\n                request < counter.length;\n                request++\n              )\n                doNotLimit.add(counter[request]);\n            return [\n              REACT_ELEMENT_TYPE,\n              value.type,\n              value.key,\n              value.props,\n              value._owner,\n              counter,\n              value._store.validated\n            ];\n          case REACT_LAZY_TYPE:\n            value = value._payload;\n            if (null !== value && \"object\" === typeof value) {\n              switch (value._status) {\n                case 1:\n                  return (\n                    (request = outlineDebugModel(\n                      request,\n                      counter,\n                      value._result\n                    )),\n                    serializeLazyID(request)\n                  );\n                case 2:\n                  return (\n                    (counter = request.nextChunkId++),\n                    emitErrorChunk(\n                      request,\n                      counter,\n                      \"\",\n                      value._result,\n                      !0,\n                      null\n                    ),\n                    serializeLazyID(counter)\n                  );\n              }\n              switch (value.status) {\n                case \"fulfilled\":\n                  return (\n                    (request = outlineDebugModel(\n                      request,\n                      counter,\n                      value.value\n                    )),\n                    serializeLazyID(request)\n                  );\n                case \"rejected\":\n                  return (\n                    (counter = request.nextChunkId++),\n                    emitErrorChunk(\n                      request,\n                      counter,\n                      \"\",\n                      value.reason,\n                      !0,\n                      null\n                    ),\n                    serializeLazyID(counter)\n                  );\n              }\n            }\n            request.pendingDebugChunks++;\n            value = request.nextChunkId++;\n            emitDebugHaltChunk(request, value);\n            return serializeLazyID(value);\n        }\n        if (\"function\" === typeof value.then)\n          return serializeDebugThenable(request, counter, value);\n        if (isArrayImpl(value))\n          return 200 < value.length && !doNotLimit.has(value)\n            ? serializeDeferredObject(request, value)\n            : value;\n        if (value instanceof Date) return \"$D\" + value.toJSON();\n        if (value instanceof Map) {\n          value = Array.from(value);\n          counter.objectLimit++;\n          for (ref = 0; ref < value.length; ref++) {\n            var entry = value[ref];\n            doNotLimit.add(entry);\n            var key = entry[0];\n            entry = entry[1];\n            \"object\" === typeof key && null !== key && doNotLimit.add(key);\n            \"object\" === typeof entry &&\n              null !== entry &&\n              doNotLimit.add(entry);\n          }\n          return \"$Q\" + outlineDebugModel(request, counter, value).toString(16);\n        }\n        if (value instanceof Set) {\n          value = Array.from(value);\n          counter.objectLimit++;\n          for (ref = 0; ref < value.length; ref++)\n            (key = value[ref]),\n              \"object\" === typeof key && null !== key && doNotLimit.add(key);\n          return \"$W\" + outlineDebugModel(request, counter, value).toString(16);\n        }\n        if (\"function\" === typeof FormData && value instanceof FormData)\n          return (\n            (value = Array.from(value.entries())),\n            \"$K\" +\n              outlineDebugModel(\n                request,\n                { objectLimit: 2 * value.length + 1 },\n                value\n              ).toString(16)\n          );\n        if (value instanceof Error) {\n          var name = \"Error\";\n          parent = (0, request.environmentName)();\n          try {\n            (name = value.name),\n              (key = String(value.message)),\n              (ref = filterStackTrace(request, parseStackTrace(value, 0))),\n              (entry = value.environmentName),\n              \"string\" === typeof entry && (parent = entry);\n          } catch (x) {\n            (key =\n              \"An error occurred but serializing the error message failed.\"),\n              (ref = []);\n          }\n          key = { name: name, message: key, stack: ref, env: parent };\n          \"cause\" in value &&\n            (counter.objectLimit--,\n            (entry = outlineDebugModel(request, counter, value.cause)),\n            (key.cause = serializeByValueID(entry)));\n          \"undefined\" !== typeof AggregateError &&\n            value instanceof AggregateError &&\n            (counter.objectLimit--,\n            (value = outlineDebugModel(request, counter, value.errors)),\n            (key.errors = serializeByValueID(value)));\n          request =\n            \"$Z\" +\n            outlineDebugModel(\n              request,\n              { objectLimit: 2 * ref.length + 1 },\n              key\n            ).toString(16);\n          return request;\n        }\n        if (value instanceof ArrayBuffer)\n          return serializeDebugTypedArray(request, \"A\", new Uint8Array(value));\n        if (value instanceof Int8Array)\n          return serializeDebugTypedArray(request, \"O\", value);\n        if (value instanceof Uint8Array)\n          return serializeDebugTypedArray(request, \"o\", value);\n        if (value instanceof Uint8ClampedArray)\n          return serializeDebugTypedArray(request, \"U\", value);\n        if (value instanceof Int16Array)\n          return serializeDebugTypedArray(request, \"S\", value);\n        if (value instanceof Uint16Array)\n          return serializeDebugTypedArray(request, \"s\", value);\n        if (value instanceof Int32Array)\n          return serializeDebugTypedArray(request, \"L\", value);\n        if (value instanceof Uint32Array)\n          return serializeDebugTypedArray(request, \"l\", value);\n        if (value instanceof Float32Array)\n          return serializeDebugTypedArray(request, \"G\", value);\n        if (value instanceof Float64Array)\n          return serializeDebugTypedArray(request, \"g\", value);\n        if (value instanceof BigInt64Array)\n          return serializeDebugTypedArray(request, \"M\", value);\n        if (value instanceof BigUint64Array)\n          return serializeDebugTypedArray(request, \"m\", value);\n        if (value instanceof DataView)\n          return serializeDebugTypedArray(request, \"V\", value);\n        if (\"function\" === typeof Blob && value instanceof Blob)\n          return serializeDebugBlob(request, value);\n        if (getIteratorFn(value)) return Array.from(value);\n        request = getPrototypeOf(value);\n        if (request !== ObjectPrototype$1 && null !== request) {\n          counter = Object.create(null);\n          for (name in value)\n            if (hasOwnProperty.call(value, name) || isGetter(request, name))\n              counter[name] = value[name];\n          ref = request.constructor;\n          \"function\" !== typeof ref ||\n            ref.prototype !== request ||\n            hasOwnProperty.call(value, \"\") ||\n            isGetter(request, \"\") ||\n            (counter[\"\"] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref });\n          return counter;\n        }\n        return value;\n      }\n      if (\"string\" === typeof value) {\n        if (1e6 < value.length)\n          return (\n            \"This string of length \" +\n            value.length +\n            \" has been omitted by React to avoid sending too much data from the server.\"\n          );\n        if (1024 <= value.length) {\n          if (0 >= counter.objectLimit)\n            return serializeDeferredObject(request, value);\n          counter.objectLimit--;\n          request.pendingDebugChunks++;\n          counter = request.nextChunkId++;\n          emitTextChunk(request, counter, value, !0);\n          return serializeByValueID(counter);\n        }\n        return \"$\" === value[0] ? \"$\" + value : value;\n      }\n      if (\"boolean\" === typeof value) return value;\n      if (\"number\" === typeof value) return serializeNumber(value);\n      if (\"undefined\" === typeof value) return \"$undefined\";\n      if (\"function\" === typeof value) {\n        if (isClientReference(value))\n          return serializeDebugClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((counter = request.temporaryReferences.get(value)),\n          void 0 !== counter)\n        )\n          return \"$T\" + counter;\n        counter = request.writtenDebugObjects;\n        ref = counter.get(value);\n        if (void 0 !== ref) return ref;\n        ref = Function.prototype.toString.call(value);\n        key = value.name;\n        key =\n          \"$E\" +\n          (\"string\" === typeof key\n            ? \"Object.defineProperty(\" +\n              ref +\n              ',\"name\",{value:' +\n              JSON.stringify(key) +\n              \"})\"\n            : \"(\" + ref + \")\");\n        request.pendingDebugChunks++;\n        ref = request.nextChunkId++;\n        key = encodeReferenceChunk(request, ref, key);\n        request.completedDebugChunks.push(key);\n        request = serializeByValueID(ref);\n        counter.set(value, request);\n        return request;\n      }\n      if (\"symbol\" === typeof value) {\n        counter = request.writtenSymbols.get(value);\n        if (void 0 !== counter) return serializeByValueID(counter);\n        value = value.description;\n        request.pendingChunks++;\n        counter = request.nextChunkId++;\n        emitSymbolChunk(request, counter, value);\n        return serializeByValueID(counter);\n      }\n      return \"bigint\" === typeof value\n        ? \"$n\" + value.toString(10)\n        : \"unknown type \" + typeof value;\n    }\n    function serializeDebugModel(request, objectLimit, model) {\n      function replacer(parentPropertyName) {\n        try {\n          return renderDebugModel(\n            request,\n            counter,\n            this,\n            parentPropertyName,\n            this[parentPropertyName]\n          );\n        } catch (x) {\n          return (\n            \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n          );\n        }\n      }\n      var counter = { objectLimit: objectLimit };\n      objectLimit = debugNoOutline;\n      debugNoOutline = model;\n      try {\n        return stringify(model, replacer);\n      } catch (x) {\n        return stringify(\n          \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n        );\n      } finally {\n        debugNoOutline = objectLimit;\n      }\n    }\n    function emitOutlinedDebugModelChunk(request, id, counter, model) {\n      function replacer(parentPropertyName) {\n        try {\n          return renderDebugModel(\n            request,\n            counter,\n            this,\n            parentPropertyName,\n            this[parentPropertyName]\n          );\n        } catch (x) {\n          return (\n            \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n          );\n        }\n      }\n      \"object\" === typeof model && null !== model && doNotLimit.add(model);\n      var prevModelRoot = debugModelRoot;\n      debugModelRoot = model;\n      \"object\" === typeof model &&\n        null !== model &&\n        request.writtenDebugObjects.set(model, serializeByValueID(id));\n      try {\n        var json = stringify(model, replacer);\n      } catch (x) {\n        json = stringify(\n          \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n        );\n      } finally {\n        debugModelRoot = prevModelRoot;\n      }\n      id = id.toString(16) + \":\" + json + \"\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function outlineDebugModel(request, counter, model) {\n      var id = request.nextChunkId++;\n      request.pendingDebugChunks++;\n      emitOutlinedDebugModelChunk(request, id, counter, model);\n      return id;\n    }\n    function emitTimeOriginChunk(request, timeOrigin) {\n      request.pendingDebugChunks++;\n      request.completedDebugChunks.push(\":N\" + timeOrigin + \"\\n\");\n    }\n    function forwardDebugInfo(request$jscomp$0, task, debugInfo) {\n      for (var id = task.id, i = 0; i < debugInfo.length; i++) {\n        var info = debugInfo[i];\n        if (\"number\" === typeof info.time)\n          markOperationEndTime(request$jscomp$0, task, info.time);\n        else if (\"string\" === typeof info.name)\n          outlineComponentInfo(request$jscomp$0, info),\n            request$jscomp$0.pendingChunks++,\n            emitDebugChunk(request$jscomp$0, id, info);\n        else if (info.awaited) {\n          var ioInfo = info.awaited;\n          if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) {\n            var request = request$jscomp$0,\n              ioInfo$jscomp$0 = ioInfo;\n            if (!request.writtenObjects.has(ioInfo$jscomp$0)) {\n              request.pendingDebugChunks++;\n              var id$jscomp$0 = request.nextChunkId++,\n                owner = ioInfo$jscomp$0.owner;\n              null != owner && outlineComponentInfo(request, owner);\n              var debugStack =\n                null == ioInfo$jscomp$0.stack &&\n                null != ioInfo$jscomp$0.debugStack\n                  ? filterStackTrace(\n                      request,\n                      parseStackTrace(ioInfo$jscomp$0.debugStack, 1)\n                    )\n                  : ioInfo$jscomp$0.stack;\n              var env = ioInfo$jscomp$0.env;\n              null == env && (env = (0, request.environmentName)());\n              emitIOInfoChunk(\n                request,\n                id$jscomp$0,\n                ioInfo$jscomp$0.name,\n                ioInfo$jscomp$0.start,\n                ioInfo$jscomp$0.end,\n                ioInfo$jscomp$0.value,\n                env,\n                owner,\n                debugStack\n              );\n              request.writtenDebugObjects.set(\n                ioInfo$jscomp$0,\n                serializeByValueID(id$jscomp$0)\n              );\n            }\n            null != info.owner &&\n              outlineComponentInfo(request$jscomp$0, info.owner);\n            debugStack =\n              null == info.stack && null != info.debugStack\n                ? filterStackTrace(\n                    request$jscomp$0,\n                    parseStackTrace(info.debugStack, 1)\n                  )\n                : info.stack;\n            ioInfo = { awaited: ioInfo };\n            ioInfo.env =\n              null != info.env\n                ? info.env\n                : (0, request$jscomp$0.environmentName)();\n            null != info.owner && (ioInfo.owner = info.owner);\n            null != debugStack && (ioInfo.stack = debugStack);\n            request$jscomp$0.pendingChunks++;\n            emitDebugChunk(request$jscomp$0, id, ioInfo);\n          }\n        } else\n          request$jscomp$0.pendingChunks++,\n            emitDebugChunk(request$jscomp$0, id, info);\n      }\n    }\n    function forwardDebugInfoFromThenable(\n      request,\n      task,\n      thenable,\n      owner,\n      stack\n    ) {\n      var debugInfo;\n      (debugInfo = thenable._debugInfo) &&\n        forwardDebugInfo(request, task, debugInfo);\n      thenable = getAsyncSequenceFromPromise(thenable);\n      null !== thenable &&\n        emitAsyncSequence(request, task, thenable, debugInfo, owner, stack);\n    }\n    function forwardDebugInfoFromCurrentContext(request, task, thenable) {\n      (thenable = thenable._debugInfo) &&\n        forwardDebugInfo(request, task, thenable);\n      var sequence = pendingOperations.get(async_hooks.executionAsyncId());\n      sequence = void 0 === sequence ? null : sequence;\n      null !== sequence &&\n        emitAsyncSequence(request, task, sequence, thenable, null, null);\n    }\n    function forwardDebugInfoFromAbortedTask(request, task) {\n      var model = task.model;\n      if (\"object\" === typeof model && null !== model) {\n        var debugInfo;\n        (debugInfo = model._debugInfo) &&\n          forwardDebugInfo(request, task, debugInfo);\n        var thenable = null;\n        \"function\" === typeof model.then\n          ? (thenable = model)\n          : model.$$typeof === REACT_LAZY_TYPE &&\n            ((model = model._payload),\n            \"function\" === typeof model.then && (thenable = model));\n        if (\n          null !== thenable &&\n          ((model = getAsyncSequenceFromPromise(thenable)), null !== model)\n        ) {\n          for (\n            thenable = model;\n            4 === thenable.tag && null !== thenable.awaited;\n\n          )\n            thenable = thenable.awaited;\n          3 === thenable.tag\n            ? (serializeIONode(request, thenable, null),\n              request.pendingChunks++,\n              (debugInfo = (0, request.environmentName)()),\n              (debugInfo = { awaited: thenable, env: debugInfo }),\n              advanceTaskTime(request, task, task.time),\n              emitDebugChunk(request, task.id, debugInfo))\n            : emitAsyncSequence(request, task, model, debugInfo, null, null);\n        }\n      }\n    }\n    function emitTimingChunk(request, id, timestamp) {\n      request.pendingChunks++;\n      var json = '{\"time\":' + (timestamp - request.timeOrigin) + \"}\";\n      null !== request.debugDestination\n        ? ((timestamp = request.nextChunkId++),\n          (json = timestamp.toString(16) + \":\" + json + \"\\n\"),\n          request.pendingDebugChunks++,\n          request.completedDebugChunks.push(json),\n          (id = id.toString(16) + ':D\"$' + timestamp.toString(16) + '\"\\n'),\n          request.completedRegularChunks.push(id))\n        : ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n          request.completedRegularChunks.push(id));\n    }\n    function advanceTaskTime(request, task, timestamp) {\n      timestamp > task.time\n        ? (emitTimingChunk(request, task.id, timestamp),\n          (task.time = timestamp))\n        : task.timed || emitTimingChunk(request, task.id, task.time);\n      task.timed = !0;\n    }\n    function markOperationEndTime(request, task, timestamp) {\n      (request.status === ABORTING && timestamp > request.abortTime) ||\n        (timestamp > task.time\n          ? (emitTimingChunk(request, task.id, timestamp),\n            (task.time = timestamp))\n          : emitTimingChunk(request, task.id, task.time));\n    }\n    function emitChunk(request, task, value) {\n      var id = task.id;\n      \"string\" === typeof value && null !== byteLengthOfChunk\n        ? emitTextChunk(request, id, value, !1)\n        : value instanceof ArrayBuffer\n          ? emitTypedArrayChunk(request, id, \"A\", new Uint8Array(value), !1)\n          : value instanceof Int8Array\n            ? emitTypedArrayChunk(request, id, \"O\", value, !1)\n            : value instanceof Uint8Array\n              ? emitTypedArrayChunk(request, id, \"o\", value, !1)\n              : value instanceof Uint8ClampedArray\n                ? emitTypedArrayChunk(request, id, \"U\", value, !1)\n                : value instanceof Int16Array\n                  ? emitTypedArrayChunk(request, id, \"S\", value, !1)\n                  : value instanceof Uint16Array\n                    ? emitTypedArrayChunk(request, id, \"s\", value, !1)\n                    : value instanceof Int32Array\n                      ? emitTypedArrayChunk(request, id, \"L\", value, !1)\n                      : value instanceof Uint32Array\n                        ? emitTypedArrayChunk(request, id, \"l\", value, !1)\n                        : value instanceof Float32Array\n                          ? emitTypedArrayChunk(request, id, \"G\", value, !1)\n                          : value instanceof Float64Array\n                            ? emitTypedArrayChunk(request, id, \"g\", value, !1)\n                            : value instanceof BigInt64Array\n                              ? emitTypedArrayChunk(request, id, \"M\", value, !1)\n                              : value instanceof BigUint64Array\n                                ? emitTypedArrayChunk(\n                                    request,\n                                    id,\n                                    \"m\",\n                                    value,\n                                    !1\n                                  )\n                                : value instanceof DataView\n                                  ? emitTypedArrayChunk(\n                                      request,\n                                      id,\n                                      \"V\",\n                                      value,\n                                      !1\n                                    )\n                                  : ((value = resolveModel(\n                                      request,\n                                      task,\n                                      { \"\": value },\n                                      \"\",\n                                      value\n                                    )),\n                                    (value = stringify(value)),\n                                    (task =\n                                      task.id.toString(16) +\n                                      \":\" +\n                                      value +\n                                      \"\\n\"),\n                                    request.completedRegularChunks.push(task));\n    }\n    function erroredTask(request, task, error) {\n      task.timed && markOperationEndTime(request, task, performance.now());\n      task.status = ERRORED$1;\n      var digest = logRecoverableError(request, error, task);\n      emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner);\n      request.abortableTasks.delete(task);\n      callOnAllReadyIfReady(request);\n    }\n    function retryTask(request, task) {\n      if (task.status === PENDING$1) {\n        var prevCanEmitDebugInfo = canEmitDebugInfo;\n        task.status = RENDERING;\n        var parentSerializedSize = serializedSize;\n        try {\n          modelRoot = task.model;\n          canEmitDebugInfo = !0;\n          var resolvedModel = renderModelDestructive(\n            request,\n            task,\n            emptyRoot,\n            \"\",\n            task.model\n          );\n          canEmitDebugInfo = !1;\n          modelRoot = resolvedModel;\n          task.keyPath = null;\n          task.implicitSlot = !1;\n          var currentEnv = (0, request.environmentName)();\n          currentEnv !== task.environmentName &&\n            (request.pendingChunks++,\n            emitDebugChunk(request, task.id, { env: currentEnv }));\n          task.timed && markOperationEndTime(request, task, performance.now());\n          if (\"object\" === typeof resolvedModel && null !== resolvedModel)\n            request.writtenObjects.set(\n              resolvedModel,\n              serializeByValueID(task.id)\n            ),\n              emitChunk(request, task, resolvedModel);\n          else {\n            var json = stringify(resolvedModel),\n              processedChunk = task.id.toString(16) + \":\" + json + \"\\n\";\n            request.completedRegularChunks.push(processedChunk);\n          }\n          task.status = COMPLETED;\n          request.abortableTasks.delete(task);\n          callOnAllReadyIfReady(request);\n        } catch (thrownValue) {\n          if (request.status === ABORTING)\n            if (\n              (request.abortableTasks.delete(task),\n              (task.status = PENDING$1),\n              request.type === PRERENDER)\n            )\n              haltTask(task), finishHaltedTask(task, request);\n            else {\n              var errorId = request.fatalError;\n              abortTask(task);\n              finishAbortedTask(task, request, errorId);\n            }\n          else {\n            var x =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue;\n            if (\n              \"object\" === typeof x &&\n              null !== x &&\n              \"function\" === typeof x.then\n            ) {\n              task.status = PENDING$1;\n              task.thenableState = getThenableStateAfterSuspending();\n              var ping = task.ping;\n              x.then(ping, ping);\n            } else erroredTask(request, task, x);\n          }\n        } finally {\n          (canEmitDebugInfo = prevCanEmitDebugInfo),\n            (serializedSize = parentSerializedSize);\n        }\n      }\n    }\n    function tryStreamTask(request, task) {\n      var prevCanEmitDebugInfo = canEmitDebugInfo;\n      canEmitDebugInfo = !1;\n      var parentSerializedSize = serializedSize;\n      try {\n        emitChunk(request, task, task.model);\n      } finally {\n        (serializedSize = parentSerializedSize),\n          (canEmitDebugInfo = prevCanEmitDebugInfo);\n      }\n    }\n    function performWork(request) {\n      pendingOperations.delete(async_hooks.executionAsyncId());\n      var prevDispatcher = ReactSharedInternalsServer.H;\n      ReactSharedInternalsServer.H = HooksDispatcher;\n      var prevRequest = currentRequest;\n      currentRequest$1 = currentRequest = request;\n      try {\n        var pingedTasks = request.pingedTasks;\n        request.pingedTasks = [];\n        for (var i = 0; i < pingedTasks.length; i++)\n          retryTask(request, pingedTasks[i]);\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      } finally {\n        (ReactSharedInternalsServer.H = prevDispatcher),\n          (currentRequest$1 = null),\n          (currentRequest = prevRequest);\n      }\n    }\n    function abortTask(task) {\n      task.status === PENDING$1 && (task.status = ABORTED);\n    }\n    function finishAbortedTask(task, request, errorId) {\n      task.status === ABORTED &&\n        (forwardDebugInfoFromAbortedTask(request, task),\n        task.timed && markOperationEndTime(request, task, request.abortTime),\n        (errorId = serializeByValueID(errorId)),\n        (task = encodeReferenceChunk(request, task.id, errorId)),\n        request.completedErrorChunks.push(task));\n    }\n    function haltTask(task) {\n      task.status === PENDING$1 && (task.status = ABORTED);\n    }\n    function finishHaltedTask(task, request) {\n      task.status === ABORTED &&\n        (forwardDebugInfoFromAbortedTask(request, task),\n        request.pendingChunks--);\n    }\n    function flushCompletedChunks(request) {\n      if (null !== request.debugDestination) {\n        var debugDestination = request.debugDestination;\n        currentView = new Uint8Array(4096);\n        writtenBytes = 0;\n        destinationHasCapacity = !0;\n        try {\n          for (\n            var debugChunks = request.completedDebugChunks, i = 0;\n            i < debugChunks.length;\n            i++\n          ) {\n            var item = debugChunks[i];\n            if (item === NEXT_TWO_CHUNKS_ARE_ATOMIC) {\n              if (i + 2 >= debugChunks.length)\n                throw Error(\n                  \"A chunk pair is incomplete. This is a bug in React.\"\n                );\n              request.pendingDebugChunks -= 2;\n              writeChunk(debugDestination, debugChunks[i + 1]);\n              writeChunk(debugDestination, debugChunks[i + 2]);\n              i += 2;\n            } else\n              request.pendingDebugChunks--, writeChunk(debugDestination, item);\n          }\n          debugChunks.splice(0, i);\n        } finally {\n          completeWriting(debugDestination);\n        }\n        flushBuffered(debugDestination);\n      }\n      debugDestination = request.destination;\n      if (null !== debugDestination) {\n        currentView = new Uint8Array(4096);\n        writtenBytes = 0;\n        destinationHasCapacity = !0;\n        try {\n          var importsChunks = request.completedImportChunks;\n          for (\n            debugChunks = 0;\n            debugChunks < importsChunks.length;\n            debugChunks++\n          )\n            if (\n              (request.pendingChunks--,\n              !writeChunkAndReturn(\n                debugDestination,\n                importsChunks[debugChunks]\n              ))\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          importsChunks.splice(0, debugChunks);\n          var hintChunks = request.completedHintChunks;\n          for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)\n            if (\n              !writeChunkAndReturn(debugDestination, hintChunks[debugChunks])\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          hintChunks.splice(0, debugChunks);\n          if (null === request.debugDestination) {\n            var _debugChunks = request.completedDebugChunks;\n            for (\n              debugChunks = 0;\n              debugChunks < _debugChunks.length;\n              debugChunks++\n            ) {\n              var _item = _debugChunks[debugChunks];\n              importsChunks = void 0;\n              if (_item === NEXT_TWO_CHUNKS_ARE_ATOMIC) {\n                if (debugChunks + 2 >= _debugChunks.length)\n                  throw Error(\n                    \"A chunk pair is incomplete. This is a bug in React.\"\n                  );\n                request.pendingDebugChunks -= 2;\n                writeChunk(debugDestination, _debugChunks[debugChunks + 1]);\n                importsChunks = writeChunkAndReturn(\n                  debugDestination,\n                  _debugChunks[debugChunks + 2]\n                );\n                debugChunks += 2;\n              } else\n                request.pendingDebugChunks--,\n                  (importsChunks = writeChunkAndReturn(\n                    debugDestination,\n                    _item\n                  ));\n              if (!importsChunks) {\n                request.destination = null;\n                debugChunks++;\n                break;\n              }\n            }\n            _debugChunks.splice(0, debugChunks);\n          }\n          var regularChunks = request.completedRegularChunks;\n          for (\n            debugChunks = 0;\n            debugChunks < regularChunks.length;\n            debugChunks++\n          ) {\n            var _item2 = regularChunks[debugChunks];\n            _debugChunks = void 0;\n            if (_item2 === NEXT_TWO_CHUNKS_ARE_ATOMIC) {\n              if (debugChunks + 2 >= regularChunks.length)\n                throw Error(\n                  \"A chunk pair is incomplete. This is a bug in React.\"\n                );\n              request.pendingChunks -= 2;\n              writeChunk(debugDestination, regularChunks[debugChunks + 1]);\n              _debugChunks = writeChunkAndReturn(\n                debugDestination,\n                regularChunks[debugChunks + 2]\n              );\n              debugChunks += 2;\n            } else\n              request.pendingChunks--,\n                (_debugChunks = writeChunkAndReturn(debugDestination, _item2));\n            if (!_debugChunks) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          }\n          regularChunks.splice(0, debugChunks);\n          var errorChunks = request.completedErrorChunks;\n          for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)\n            if (\n              (request.pendingChunks--,\n              !writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          errorChunks.splice(0, debugChunks);\n        } finally {\n          (request.flushScheduled = !1), completeWriting(debugDestination);\n        }\n        flushBuffered(debugDestination);\n      }\n      0 === request.pendingChunks &&\n        ((regularChunks = request.debugDestination),\n        0 === request.pendingDebugChunks\n          ? (null !== regularChunks &&\n              (regularChunks.end(), (request.debugDestination = null)),\n            request.status < ABORTING &&\n              request.cacheController.abort(\n                Error(\n                  \"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources.\"\n                )\n              ),\n            null !== request.destination &&\n              ((request.status = CLOSED),\n              request.destination.end(),\n              (request.destination = null)),\n            null !== request.debugDestination &&\n              (request.debugDestination.end(),\n              (request.debugDestination = null)))\n          : null !== regularChunks &&\n            null !== request.destination &&\n            ((request.status = CLOSED),\n            request.destination.end(),\n            (request.destination = null)));\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      scheduleMicrotask(function () {\n        requestStorage.run(request, performWork, request);\n      });\n      setImmediate(function () {\n        request.status === OPENING && (request.status = 11);\n      });\n    }\n    function enqueueFlush(request) {\n      !1 !== request.flushScheduled ||\n        0 !== request.pingedTasks.length ||\n        (null === request.destination && null === request.debugDestination) ||\n        ((request.flushScheduled = !0),\n        setImmediate(function () {\n          request.flushScheduled = !1;\n          flushCompletedChunks(request);\n        }));\n    }\n    function callOnAllReadyIfReady(request) {\n      0 === request.abortableTasks.size &&\n        ((request = request.onAllReady), request());\n    }\n    function startFlowing(request, destination) {\n      if (request.status === CLOSING)\n        (request.status = CLOSED), destination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedChunks(request);\n        } catch (error) {\n          logRecoverableError(request, error, null), fatalError(request, error);\n        }\n      }\n    }\n    function startFlowingDebug(request, debugDestination) {\n      if (request.status === CLOSING)\n        (request.status = CLOSED), debugDestination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.debugDestination) {\n        request.debugDestination = debugDestination;\n        try {\n          flushCompletedChunks(request);\n        } catch (error) {\n          logRecoverableError(request, error, null), fatalError(request, error);\n        }\n      }\n    }\n    function finishHalt(request, abortedTasks) {\n      try {\n        abortedTasks.forEach(function (task) {\n          return finishHaltedTask(task, request);\n        });\n        var onAllReady = request.onAllReady;\n        onAllReady();\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      }\n    }\n    function finishAbort(request, abortedTasks, errorId) {\n      try {\n        abortedTasks.forEach(function (task) {\n          return finishAbortedTask(task, request, errorId);\n        });\n        var onAllReady = request.onAllReady;\n        onAllReady();\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      }\n    }\n    function abort(request, reason) {\n      if (!(11 < request.status))\n        try {\n          request.status = ABORTING;\n          request.abortTime = performance.now();\n          request.cacheController.abort(reason);\n          var abortableTasks = request.abortableTasks;\n          if (0 < abortableTasks.size)\n            if (request.type === PRERENDER)\n              abortableTasks.forEach(function (task) {\n                return haltTask(task, request);\n              }),\n                setImmediate(function () {\n                  return finishHalt(request, abortableTasks);\n                });\n            else {\n              var error =\n                  void 0 === reason\n                    ? Error(\n                        \"The render was aborted by the server without a reason.\"\n                      )\n                    : \"object\" === typeof reason &&\n                        null !== reason &&\n                        \"function\" === typeof reason.then\n                      ? Error(\n                          \"The render was aborted by the server with a promise.\"\n                        )\n                      : reason,\n                digest = logRecoverableError(request, error, null),\n                errorId = request.nextChunkId++;\n              request.fatalError = errorId;\n              request.pendingChunks++;\n              emitErrorChunk(request, errorId, digest, error, !1, null);\n              abortableTasks.forEach(function (task) {\n                return abortTask(task, request, errorId);\n              });\n              setImmediate(function () {\n                return finishAbort(request, abortableTasks, errorId);\n              });\n            }\n          else {\n            var onAllReady = request.onAllReady;\n            onAllReady();\n            flushCompletedChunks(request);\n          }\n        } catch (error$8) {\n          logRecoverableError(request, error$8, null),\n            fatalError(request, error$8);\n        }\n    }\n    function fromHex(str) {\n      return parseInt(str, 16);\n    }\n    function resolveDebugMessage(request, message) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null === deferredDebugObjects)\n        throw Error(\n          \"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React.\"\n        );\n      if (\"\" === message) closeDebugChannel(request);\n      else {\n        var command = message.charCodeAt(0);\n        message = message.slice(2).split(\",\").map(fromHex);\n        switch (command) {\n          case 82:\n            for (command = 0; command < message.length; command++) {\n              var id = message[command],\n                retainedValue = deferredDebugObjects.retained.get(id);\n              void 0 !== retainedValue &&\n                (request.pendingDebugChunks--,\n                deferredDebugObjects.retained.delete(id),\n                deferredDebugObjects.existing.delete(retainedValue),\n                enqueueFlush(request));\n            }\n            break;\n          case 81:\n            for (command = 0; command < message.length; command++)\n              (id = message[command]),\n                (retainedValue = deferredDebugObjects.retained.get(id)),\n                void 0 !== retainedValue &&\n                  (deferredDebugObjects.retained.delete(id),\n                  deferredDebugObjects.existing.delete(retainedValue),\n                  emitOutlinedDebugModelChunk(\n                    request,\n                    id,\n                    { objectLimit: 10 },\n                    retainedValue\n                  ),\n                  enqueueFlush(request));\n            break;\n          case 80:\n            for (command = 0; command < message.length; command++)\n              (id = message[command]),\n                (retainedValue = deferredDebugObjects.retained.get(id)),\n                void 0 !== retainedValue &&\n                  (deferredDebugObjects.retained.delete(id),\n                  emitRequestedDebugThenable(\n                    request,\n                    id,\n                    { objectLimit: 10 },\n                    retainedValue\n                  ));\n            break;\n          default:\n            throw Error(\n              \"Unknown command. The debugChannel was not wired up properly.\"\n            );\n        }\n      }\n    }\n    function closeDebugChannel(request) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null === deferredDebugObjects)\n        throw Error(\n          \"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React.\"\n        );\n      deferredDebugObjects.retained.forEach(function (value, id) {\n        request.pendingDebugChunks--;\n        deferredDebugObjects.retained.delete(id);\n        deferredDebugObjects.existing.delete(value);\n      });\n      enqueueFlush(request);\n    }\n    function resolveServerReference(bundlerConfig, id) {\n      var name = \"\",\n        resolvedModuleData = bundlerConfig[id];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = id.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = id.slice(idx + 1)),\n          (resolvedModuleData = bundlerConfig[id.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              id +\n              '\" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      return resolvedModuleData.async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function requireAsyncModule(id) {\n      var promise = globalThis.__next_require__(id);\n      if (\"function\" !== typeof promise.then || \"fulfilled\" === promise.status)\n        return null;\n      promise.then(\n        function (value) {\n          promise.status = \"fulfilled\";\n          promise.value = value;\n        },\n        function (reason) {\n          promise.status = \"rejected\";\n          promise.reason = reason;\n        }\n      );\n      return promise;\n    }\n    function ignoreReject() {}\n    function preloadModule(metadata) {\n      for (\n        var chunks = metadata[1], promises = [], i = 0;\n        i < chunks.length;\n\n      ) {\n        var chunkId = chunks[i++];\n        chunks[i++];\n        var entry = chunkCache.get(chunkId);\n        if (void 0 === entry) {\n          entry = __webpack_chunk_load__(chunkId);\n          promises.push(entry);\n          var resolve = chunkCache.set.bind(chunkCache, chunkId, null);\n          entry.then(resolve, ignoreReject);\n          chunkCache.set(chunkId, entry);\n        } else null !== entry && promises.push(entry);\n      }\n      return 4 === metadata.length\n        ? 0 === promises.length\n          ? requireAsyncModule(metadata[0])\n          : Promise.all(promises).then(function () {\n              return requireAsyncModule(metadata[0]);\n            })\n        : 0 < promises.length\n          ? Promise.all(promises)\n          : null;\n    }\n    function requireModule(metadata) {\n      var moduleExports = globalThis.__next_require__(metadata[0]);\n      if (4 === metadata.length && \"function\" === typeof moduleExports.then)\n        if (\"fulfilled\" === moduleExports.status)\n          moduleExports = moduleExports.value;\n        else throw moduleExports.reason;\n      if (\"*\" === metadata[2]) return moduleExports;\n      if (\"\" === metadata[2])\n        return moduleExports.__esModule ? moduleExports.default : moduleExports;\n      if (hasOwnProperty.call(moduleExports, metadata[2]))\n        return moduleExports[metadata[2]];\n    }\n    function appendBackingEntry(backingStore, key, value) {\n      backingStore.data.append(key, value);\n      value = backingStore.keys;\n      null === value\n        ? ((backingStore.keys = Array.from(backingStore.data.keys())),\n          (backingStore.keyPointer = 0))\n        : value.push(key);\n    }\n    function ReactPromise(status, value, reason) {\n      this.status = status;\n      this.value = value;\n      this.reason = reason;\n    }\n    function wakeChunk(response, listeners, value, chunk) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(value)\n          : fulfillReference(response, listener, value, chunk.reason);\n      }\n    }\n    function rejectChunk(response, listeners, error) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(error)\n          : rejectReference(response, listener.handler, error);\n      }\n    }\n    function triggerErrorOnChunk(response, chunk, error) {\n      if (\"pending\" !== chunk.status && \"blocked\" !== chunk.status)\n        chunk.reason.error(error);\n      else {\n        var listeners = chunk.reason;\n        chunk.status = \"rejected\";\n        chunk.reason = error;\n        null !== listeners && rejectChunk(response, listeners, error);\n      }\n    }\n    function createResolvedModelChunk(response, value, id) {\n      var $jscomp$compprop2 = {};\n      return new ReactPromise(\n        \"resolved_model\",\n        value,\n        (($jscomp$compprop2.id = id),\n        ($jscomp$compprop2[RESPONSE_SYMBOL] = response),\n        $jscomp$compprop2)\n      );\n    }\n    function resolveModelChunk(response, chunk, value, id) {\n      if (\"pending\" !== chunk.status)\n        (chunk = chunk.reason),\n          \"C\" === value[0]\n            ? chunk.close(\"C\" === value ? '\"$undefined\"' : value.slice(1))\n            : chunk.enqueueModel(value);\n      else {\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_model\";\n        chunk.value = value;\n        value = {};\n        chunk.reason =\n          ((value.id = id), (value[RESPONSE_SYMBOL] = response), value);\n        if (null !== resolveListeners)\n          switch ((initializeModelChunk(chunk), chunk.status)) {\n            case \"fulfilled\":\n              wakeChunk(response, resolveListeners, chunk.value, chunk);\n              break;\n            case \"blocked\":\n            case \"pending\":\n              if (chunk.value)\n                for (\n                  response = 0;\n                  response < resolveListeners.length;\n                  response++\n                )\n                  chunk.value.push(resolveListeners[response]);\n              else chunk.value = resolveListeners;\n              if (chunk.reason) {\n                if (rejectListeners)\n                  for (\n                    resolveListeners = 0;\n                    resolveListeners < rejectListeners.length;\n                    resolveListeners++\n                  )\n                    chunk.reason.push(rejectListeners[resolveListeners]);\n              } else chunk.reason = rejectListeners;\n              break;\n            case \"rejected\":\n              rejectListeners &&\n                rejectChunk(response, rejectListeners, chunk.reason);\n          }\n      }\n    }\n    function createResolvedIteratorResultChunk(response, value, done) {\n      var $jscomp$compprop4 = {};\n      return new ReactPromise(\n        \"resolved_model\",\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        (($jscomp$compprop4.id = -1),\n        ($jscomp$compprop4[RESPONSE_SYMBOL] = response),\n        $jscomp$compprop4)\n      );\n    }\n    function resolveIteratorResultChunk(response, chunk, value, done) {\n      resolveModelChunk(\n        response,\n        chunk,\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        -1\n      );\n    }\n    function loadServerReference$1(response, metaData, parentObject, key) {\n      function reject(error) {\n        var rejectListeners = blockedPromise.reason,\n          erroredPromise = blockedPromise;\n        erroredPromise.status = \"rejected\";\n        erroredPromise.value = null;\n        erroredPromise.reason = error;\n        null !== rejectListeners &&\n          rejectChunk(response, rejectListeners, error);\n        rejectReference(response, handler, error);\n      }\n      var id = metaData.id;\n      if (\"string\" !== typeof id || \"then\" === key) return null;\n      var cachedPromise = metaData.$$promise;\n      if (void 0 !== cachedPromise) {\n        if (\"fulfilled\" === cachedPromise.status)\n          return (\n            (cachedPromise = cachedPromise.value),\n            \"__proto__\" === key ? null : (parentObject[key] = cachedPromise)\n          );\n        initializingHandler\n          ? ((id = initializingHandler), id.deps++)\n          : (id = initializingHandler =\n              { chunk: null, value: null, reason: null, deps: 1, errored: !1 });\n        cachedPromise.then(\n          resolveReference.bind(null, response, id, parentObject, key),\n          rejectReference.bind(null, response, id)\n        );\n        return null;\n      }\n      var blockedPromise = new ReactPromise(\"blocked\", null, null);\n      metaData.$$promise = blockedPromise;\n      var serverReference = resolveServerReference(response._bundlerConfig, id);\n      cachedPromise = metaData.bound;\n      if ((id = preloadModule(serverReference)))\n        cachedPromise instanceof ReactPromise &&\n          (id = Promise.all([id, cachedPromise]));\n      else if (cachedPromise instanceof ReactPromise)\n        id = Promise.resolve(cachedPromise);\n      else\n        return (\n          (cachedPromise = requireModule(serverReference)),\n          (id = blockedPromise),\n          (id.status = \"fulfilled\"),\n          (id.value = cachedPromise),\n          (id.reason = null),\n          cachedPromise\n        );\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      id.then(function () {\n        var resolvedValue = requireModule(serverReference);\n        if (metaData.bound) {\n          var promiseValue = metaData.bound.value;\n          promiseValue = isArrayImpl(promiseValue) ? promiseValue.slice(0) : [];\n          if (promiseValue.length > MAX_BOUND_ARGS) {\n            reject(\n              Error(\n                \"Server Function has too many bound arguments. Received \" +\n                  promiseValue.length +\n                  \" but the limit is \" +\n                  MAX_BOUND_ARGS +\n                  \".\"\n              )\n            );\n            return;\n          }\n          promiseValue.unshift(null);\n          resolvedValue = resolvedValue.bind.apply(resolvedValue, promiseValue);\n        }\n        promiseValue = blockedPromise.value;\n        var initializedPromise = blockedPromise;\n        initializedPromise.status = \"fulfilled\";\n        initializedPromise.value = resolvedValue;\n        initializedPromise.reason = null;\n        null !== promiseValue &&\n          wakeChunk(response, promiseValue, resolvedValue, initializedPromise);\n        resolveReference(response, handler, parentObject, key, resolvedValue);\n      }, reject);\n      return null;\n    }\n    function reviveModel(\n      response,\n      parentObj,\n      parentKey,\n      value,\n      reference,\n      arrayRoot\n    ) {\n      if (\"string\" === typeof value)\n        return parseModelString(\n          response,\n          parentObj,\n          parentKey,\n          value,\n          reference,\n          arrayRoot\n        );\n      if (\"object\" === typeof value && null !== value)\n        if (\n          (void 0 !== reference &&\n            void 0 !== response._temporaryReferences &&\n            response._temporaryReferences.set(value, reference),\n          isArrayImpl(value))\n        ) {\n          if (null === arrayRoot) {\n            var childContext = { count: 0, fork: !1 };\n            response._rootArrayContexts.set(value, childContext);\n          } else childContext = arrayRoot;\n          1 < value.length && (childContext.fork = !0);\n          bumpArrayCount(childContext, value.length + 1, response);\n          for (parentObj = 0; parentObj < value.length; parentObj++)\n            value[parentObj] = reviveModel(\n              response,\n              value,\n              \"\" + parentObj,\n              value[parentObj],\n              void 0 !== reference ? reference + \":\" + parentObj : void 0,\n              childContext\n            );\n        } else\n          for (childContext in value)\n            hasOwnProperty.call(value, childContext) &&\n              (\"__proto__\" === childContext\n                ? delete value[childContext]\n                : ((parentObj =\n                    void 0 !== reference && -1 === childContext.indexOf(\":\")\n                      ? reference + \":\" + childContext\n                      : void 0),\n                  (parentObj = reviveModel(\n                    response,\n                    value,\n                    childContext,\n                    value[childContext],\n                    parentObj,\n                    null\n                  )),\n                  void 0 !== parentObj\n                    ? (value[childContext] = parentObj)\n                    : delete value[childContext]));\n      return value;\n    }\n    function bumpArrayCount(arrayContext, slots, response) {\n      if (\n        (arrayContext.count += slots) > response._arraySizeLimit &&\n        arrayContext.fork\n      )\n        throw Error(\n          \"Maximum array nesting exceeded. Large nested arrays can be dangerous. Try adding intermediate objects.\"\n        );\n    }\n    function initializeModelChunk(chunk) {\n      var prevHandler = initializingHandler;\n      initializingHandler = null;\n      var _chunk$reason = chunk.reason,\n        response = _chunk$reason[RESPONSE_SYMBOL];\n      _chunk$reason = _chunk$reason.id;\n      _chunk$reason =\n        -1 === _chunk$reason ? void 0 : _chunk$reason.toString(16);\n      var resolvedModel = chunk.value;\n      chunk.status = \"blocked\";\n      chunk.value = null;\n      chunk.reason = null;\n      try {\n        var rawModel = JSON.parse(resolvedModel);\n        resolvedModel = { count: 0, fork: !1 };\n        var value = reviveModel(\n            response,\n            { \"\": rawModel },\n            \"\",\n            rawModel,\n            _chunk$reason,\n            resolvedModel\n          ),\n          resolveListeners = chunk.value;\n        if (null !== resolveListeners)\n          for (\n            chunk.value = null, chunk.reason = null, rawModel = 0;\n            rawModel < resolveListeners.length;\n            rawModel++\n          ) {\n            var listener = resolveListeners[rawModel];\n            \"function\" === typeof listener\n              ? listener(value)\n              : fulfillReference(response, listener, value, resolvedModel);\n          }\n        if (null !== initializingHandler) {\n          if (initializingHandler.errored) throw initializingHandler.reason;\n          if (0 < initializingHandler.deps) {\n            initializingHandler.value = value;\n            initializingHandler.reason = resolvedModel;\n            initializingHandler.chunk = chunk;\n            return;\n          }\n        }\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = resolvedModel;\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      } finally {\n        initializingHandler = prevHandler;\n      }\n    }\n    function reportGlobalError(response, error) {\n      response._closed = !0;\n      response._closedReason = error;\n      response._chunks.forEach(function (chunk) {\n        \"pending\" === chunk.status\n          ? triggerErrorOnChunk(response, chunk, error)\n          : \"fulfilled\" === chunk.status &&\n            null !== chunk.reason &&\n            ((chunk = chunk.reason),\n            \"function\" === typeof chunk.error && chunk.error(error));\n      });\n    }\n    function getChunk(response, id) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk ||\n        ((chunk = response._formData.data.get(response._prefix + id)),\n        (chunk =\n          \"string\" === typeof chunk\n            ? createResolvedModelChunk(response, chunk, id)\n            : response._closed\n              ? new ReactPromise(\"rejected\", null, response._closedReason)\n              : new ReactPromise(\"pending\", null, null)),\n        chunks.set(id, chunk));\n      return chunk;\n    }\n    function fulfillReference(response, reference, value, arrayRoot) {\n      var handler = reference.handler,\n        parentObject = reference.parentObject,\n        key = reference.key,\n        map = reference.map,\n        path = reference.path;\n      try {\n        for (\n          var localLength = 0,\n            rootArrayContexts = response._rootArrayContexts,\n            i = 1;\n          i < path.length;\n          i++\n        ) {\n          var name = path[i];\n          if (\n            \"object\" !== typeof value ||\n            null === value ||\n            (getPrototypeOf(value) !== ObjectPrototype &&\n              getPrototypeOf(value) !== ArrayPrototype) ||\n            !hasOwnProperty.call(value, name)\n          )\n            throw Error(\"Invalid reference.\");\n          value = value[name];\n          if (isArrayImpl(value))\n            (localLength = 0),\n              (arrayRoot = rootArrayContexts.get(value) || arrayRoot);\n          else if (((arrayRoot = null), \"string\" === typeof value))\n            localLength = value.length;\n          else if (\"bigint\" === typeof value) {\n            var n = Math.abs(Number(value));\n            localLength = 0 === n ? 1 : Math.floor(Math.log10(n)) + 1;\n          } else localLength = ArrayBuffer.isView(value) ? value.byteLength : 0;\n        }\n        var resolvedValue = map(response, value, parentObject, key);\n        var referenceArrayRoot = reference.arrayRoot;\n        null !== referenceArrayRoot &&\n          (null !== arrayRoot\n            ? (arrayRoot.fork && (referenceArrayRoot.fork = !0),\n              bumpArrayCount(referenceArrayRoot, arrayRoot.count, response))\n            : 0 < localLength &&\n              bumpArrayCount(referenceArrayRoot, localLength, response));\n      } catch (error) {\n        rejectReference(response, handler, error);\n        return;\n      }\n      resolveReference(response, handler, parentObject, key, resolvedValue);\n    }\n    function resolveReference(\n      response,\n      handler,\n      parentObject,\n      key,\n      resolvedValue\n    ) {\n      \"__proto__\" !== key && (parentObject[key] = resolvedValue);\n      \"\" === key && null === handler.value && (handler.value = resolvedValue);\n      handler.deps--;\n      0 === handler.deps &&\n        ((parentObject = handler.chunk),\n        null !== parentObject &&\n          \"blocked\" === parentObject.status &&\n          ((key = parentObject.value),\n          (parentObject.status = \"fulfilled\"),\n          (parentObject.value = handler.value),\n          (parentObject.reason = handler.reason),\n          null !== key &&\n            wakeChunk(response, key, handler.value, parentObject)));\n    }\n    function rejectReference(response, handler, error) {\n      handler.errored ||\n        ((handler.errored = !0),\n        (handler.value = null),\n        (handler.reason = error),\n        (handler = handler.chunk),\n        null !== handler &&\n          \"blocked\" === handler.status &&\n          triggerErrorOnChunk(response, handler, error));\n    }\n    function getOutlinedModel(\n      response,\n      reference,\n      parentObject,\n      key,\n      referenceArrayRoot,\n      map\n    ) {\n      reference = reference.split(\":\");\n      var id = parseInt(reference[0], 16),\n        chunk = getChunk(response, id);\n      switch (chunk.status) {\n        case \"resolved_model\":\n          initializeModelChunk(chunk);\n      }\n      switch (chunk.status) {\n        case \"fulfilled\":\n          id = chunk.value;\n          chunk = chunk.reason;\n          if (null !== chunk && \"error\" in chunk)\n            throw Error(\n              \"Expected an initialized chunk but got an initialized stream chunk instead. This payload may have been submitted by an older version of React.\"\n            );\n          for (\n            var localLength = 0,\n              rootArrayContexts = response._rootArrayContexts,\n              i = 1;\n            i < reference.length;\n            i++\n          ) {\n            localLength = reference[i];\n            if (\n              \"object\" !== typeof id ||\n              null === id ||\n              (getPrototypeOf(id) !== ObjectPrototype &&\n                getPrototypeOf(id) !== ArrayPrototype) ||\n              !hasOwnProperty.call(id, localLength)\n            )\n              throw Error(\"Invalid reference.\");\n            id = id[localLength];\n            isArrayImpl(id)\n              ? ((localLength = 0),\n                (chunk = rootArrayContexts.get(id) || chunk))\n              : ((chunk = null),\n                \"string\" === typeof id\n                  ? (localLength = id.length)\n                  : \"bigint\" === typeof id\n                    ? ((localLength = Math.abs(Number(id))),\n                      (localLength =\n                        0 === localLength\n                          ? 1\n                          : Math.floor(Math.log10(localLength)) + 1))\n                    : (localLength = ArrayBuffer.isView(id)\n                        ? id.byteLength\n                        : 0));\n          }\n          parentObject = map(response, id, parentObject, key);\n          null !== referenceArrayRoot &&\n            (null !== chunk\n              ? (chunk.fork && (referenceArrayRoot.fork = !0),\n                bumpArrayCount(referenceArrayRoot, chunk.count, response))\n              : 0 < localLength &&\n                bumpArrayCount(referenceArrayRoot, localLength, response));\n          return parentObject;\n        case \"blocked\":\n          return (\n            initializingHandler\n              ? ((response = initializingHandler), response.deps++)\n              : (response = initializingHandler =\n                  {\n                    chunk: null,\n                    value: null,\n                    reason: null,\n                    deps: 1,\n                    errored: !1\n                  }),\n            (referenceArrayRoot = {\n              handler: response,\n              parentObject: parentObject,\n              key: key,\n              map: map,\n              path: reference,\n              arrayRoot: referenceArrayRoot\n            }),\n            null === chunk.value\n              ? (chunk.value = [referenceArrayRoot])\n              : chunk.value.push(referenceArrayRoot),\n            null === chunk.reason\n              ? (chunk.reason = [referenceArrayRoot])\n              : chunk.reason.push(referenceArrayRoot),\n            null\n          );\n        case \"pending\":\n          throw Error(\"Invalid forward reference.\");\n        default:\n          return (\n            initializingHandler\n              ? ((initializingHandler.errored = !0),\n                (initializingHandler.value = null),\n                (initializingHandler.reason = chunk.reason))\n              : (initializingHandler = {\n                  chunk: null,\n                  value: null,\n                  reason: chunk.reason,\n                  deps: 0,\n                  errored: !0\n                }),\n            null\n          );\n      }\n    }\n    function createMap(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Map initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Map.\");\n      model.$$consumed = !0;\n      return new Map(model);\n    }\n    function createSet(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Set initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Set.\");\n      model.$$consumed = !0;\n      return new Set(model);\n    }\n    function extractIterator(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Iterator initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Iterator.\");\n      model.$$consumed = !0;\n      return model[Symbol.iterator]();\n    }\n    function createModel(response, model, parentObject, key) {\n      return \"then\" === key && \"function\" === typeof model ? null : model;\n    }\n    function parseTypedArray(\n      response,\n      reference,\n      constructor,\n      bytesPerElement,\n      parentObject,\n      parentKey,\n      referenceArrayRoot\n    ) {\n      function reject(error) {\n        if (!handler.errored) {\n          handler.errored = !0;\n          handler.value = null;\n          handler.reason = error;\n          var chunk = handler.chunk;\n          null !== chunk &&\n            \"blocked\" === chunk.status &&\n            triggerErrorOnChunk(response, chunk, error);\n        }\n      }\n      reference = parseInt(reference.slice(2), 16);\n      var key = response._prefix + reference;\n      bytesPerElement = response._chunks;\n      if (bytesPerElement.has(reference))\n        throw Error(\"Already initialized typed array.\");\n      bytesPerElement.set(\n        reference,\n        new ReactPromise(\n          \"rejected\",\n          null,\n          Error(\"Already initialized typed array.\")\n        )\n      );\n      reference = response._formData.data.get(key).arrayBuffer();\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      reference.then(function (buffer) {\n        try {\n          null !== referenceArrayRoot &&\n            bumpArrayCount(referenceArrayRoot, buffer.byteLength, response);\n          var resolvedValue =\n            constructor === ArrayBuffer ? buffer : new constructor(buffer);\n          \"__proto__\" !== key && (parentObject[parentKey] = resolvedValue);\n          \"\" === parentKey &&\n            null === handler.value &&\n            (handler.value = resolvedValue);\n        } catch (x) {\n          reject(x);\n          return;\n        }\n        handler.deps--;\n        0 === handler.deps &&\n          ((buffer = handler.chunk),\n          null !== buffer &&\n            \"blocked\" === buffer.status &&\n            ((resolvedValue = buffer.value),\n            (buffer.status = \"fulfilled\"),\n            (buffer.value = handler.value),\n            (buffer.reason = null),\n            null !== resolvedValue &&\n              wakeChunk(response, resolvedValue, handler.value, buffer)));\n      }, reject);\n      return null;\n    }\n    function resolveStream(response, id, stream, controller) {\n      var chunks = response._chunks;\n      stream = new ReactPromise(\"fulfilled\", stream, controller);\n      chunks.set(id, stream);\n      response = response._formData.data.getAll(response._prefix + id);\n      for (id = 0; id < response.length; id++)\n        (chunks = response[id]),\n          \"string\" === typeof chunks &&\n            (\"C\" === chunks[0]\n              ? controller.close(\n                  \"C\" === chunks ? '\"$undefined\"' : chunks.slice(1)\n                )\n              : controller.enqueueModel(chunks));\n    }\n    function parseReadableStream(response, reference, type) {\n      function enqueue(value) {\n        \"bytes\" !== type || ArrayBuffer.isView(value)\n          ? controller.enqueue(value)\n          : flightController.error(Error(\"Invalid data for bytes stream.\"));\n      }\n      reference = parseInt(reference.slice(2), 16);\n      if (response._chunks.has(reference))\n        throw Error(\"Already initialized stream.\");\n      var controller = null,\n        closed = !1,\n        stream = new ReadableStream({\n          type: type,\n          start: function (c) {\n            controller = c;\n          }\n        }),\n        previousBlockedChunk = null,\n        flightController = {\n          enqueueModel: function (json) {\n            if (null === previousBlockedChunk) {\n              var chunk = createResolvedModelChunk(response, json, -1);\n              initializeModelChunk(chunk);\n              \"fulfilled\" === chunk.status\n                ? enqueue(chunk.value)\n                : (chunk.then(enqueue, flightController.error),\n                  (previousBlockedChunk = chunk));\n            } else {\n              chunk = previousBlockedChunk;\n              var _chunk = new ReactPromise(\"pending\", null, null);\n              _chunk.then(enqueue, flightController.error);\n              previousBlockedChunk = _chunk;\n              chunk.then(function () {\n                previousBlockedChunk === _chunk &&\n                  (previousBlockedChunk = null);\n                resolveModelChunk(response, _chunk, json, -1);\n              });\n            }\n          },\n          close: function () {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.close();\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.close();\n                });\n              }\n          },\n          error: function (error) {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.error(error);\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.error(error);\n                });\n              }\n          }\n        };\n      resolveStream(response, reference, stream, flightController);\n      return stream;\n    }\n    function FlightIterator(next) {\n      this.next = next;\n    }\n    function parseAsyncIterable(response, reference, iterator) {\n      reference = parseInt(reference.slice(2), 16);\n      if (response._chunks.has(reference))\n        throw Error(\"Already initialized stream.\");\n      var buffer = [],\n        closed = !1,\n        nextWriteIndex = 0,\n        $jscomp$compprop5 = {};\n      $jscomp$compprop5 =\n        (($jscomp$compprop5[ASYNC_ITERATOR] = function () {\n          var nextReadIndex = 0;\n          return new FlightIterator(function (arg) {\n            if (void 0 !== arg)\n              throw Error(\n                \"Values cannot be passed to next() of AsyncIterables passed to Client Components.\"\n              );\n            if (nextReadIndex === buffer.length) {\n              if (closed)\n                return new ReactPromise(\n                  \"fulfilled\",\n                  { done: !0, value: void 0 },\n                  null\n                );\n              buffer[nextReadIndex] = new ReactPromise(\"pending\", null, null);\n            }\n            return buffer[nextReadIndex++];\n          });\n        }),\n        $jscomp$compprop5);\n      iterator = iterator\n        ? $jscomp$compprop5[ASYNC_ITERATOR]()\n        : $jscomp$compprop5;\n      resolveStream(response, reference, iterator, {\n        enqueueModel: function (value) {\n          nextWriteIndex === buffer.length\n            ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                response,\n                value,\n                !1\n              ))\n            : resolveIteratorResultChunk(\n                response,\n                buffer[nextWriteIndex],\n                value,\n                !1\n              );\n          nextWriteIndex++;\n        },\n        close: function (value) {\n          if (!closed)\n            for (\n              closed = !0,\n                nextWriteIndex === buffer.length\n                  ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                      response,\n                      value,\n                      !0\n                    ))\n                  : resolveIteratorResultChunk(\n                      response,\n                      buffer[nextWriteIndex],\n                      value,\n                      !0\n                    ),\n                nextWriteIndex++;\n              nextWriteIndex < buffer.length;\n\n            )\n              resolveIteratorResultChunk(\n                response,\n                buffer[nextWriteIndex++],\n                '\"$undefined\"',\n                !0\n              );\n        },\n        error: function (error) {\n          if (!closed)\n            for (\n              closed = !0,\n                nextWriteIndex === buffer.length &&\n                  (buffer[nextWriteIndex] = new ReactPromise(\n                    \"pending\",\n                    null,\n                    null\n                  ));\n              nextWriteIndex < buffer.length;\n\n            )\n              triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);\n        }\n      });\n      return iterator;\n    }\n    function parseModelString(response, obj, key, value, reference, arrayRoot) {\n      if (\"$\" === value[0]) {\n        switch (value[1]) {\n          case \"$\":\n            return (\n              null !== arrayRoot &&\n                bumpArrayCount(arrayRoot, value.length - 1, response),\n              value.slice(1)\n            );\n          case \"@\":\n            return (\n              (obj = parseInt(value.slice(2), 16)), getChunk(response, obj)\n            );\n          case \"h\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(\n                response,\n                arrayRoot,\n                obj,\n                key,\n                null,\n                loadServerReference$1\n              )\n            );\n          case \"T\":\n            if (\n              void 0 === reference ||\n              void 0 === response._temporaryReferences\n            )\n              throw Error(\n                \"Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.\"\n              );\n            return createTemporaryReference(\n              response._temporaryReferences,\n              reference\n            );\n          case \"Q\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(response, arrayRoot, obj, key, null, createMap)\n            );\n          case \"W\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(response, arrayRoot, obj, key, null, createSet)\n            );\n          case \"K\":\n            key = value.slice(2);\n            obj = response._prefix + \"_\";\n            key = obj + key + \"_\";\n            arrayRoot = new FormData();\n            for (response = response._formData; ; ) {\n              value = response;\n              reference = value.keys;\n              null === reference &&\n                ((reference = value.keys = Array.from(value.data.keys())),\n                (value.keyPointer = 0));\n              value = reference[value.keyPointer];\n              if (void 0 === value) break;\n              if (value.startsWith(key)) {\n                reference = response.data.getAll(value);\n                for (\n                  var referencedFormDataKey = value.slice(key.length), i = 0;\n                  i < reference.length;\n                  i++\n                )\n                  arrayRoot.append(referencedFormDataKey, reference[i]);\n                reference = response;\n                reference.data.delete(value);\n                reference.keyPointer++;\n              } else if (value.startsWith(obj)) break;\n              else response.keyPointer++;\n            }\n            return arrayRoot;\n          case \"i\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(\n                response,\n                arrayRoot,\n                obj,\n                key,\n                null,\n                extractIterator\n              )\n            );\n          case \"I\":\n            return Infinity;\n          case \"-\":\n            return \"$-0\" === value ? -0 : -Infinity;\n          case \"N\":\n            return NaN;\n          case \"u\":\n            return;\n          case \"D\":\n            return new Date(Date.parse(value.slice(2)));\n          case \"n\":\n            obj = value.slice(2);\n            if (obj.length > MAX_BIGINT_DIGITS)\n              throw Error(\n                \"BigInt is too large. Received \" +\n                  obj.length +\n                  \" digits but the limit is \" +\n                  MAX_BIGINT_DIGITS +\n                  \".\"\n              );\n            null !== arrayRoot &&\n              bumpArrayCount(arrayRoot, obj.length, response);\n            return BigInt(obj);\n          case \"A\":\n            return parseTypedArray(\n              response,\n              value,\n              ArrayBuffer,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"O\":\n            return parseTypedArray(\n              response,\n              value,\n              Int8Array,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"o\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint8Array,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"U\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint8ClampedArray,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"S\":\n            return parseTypedArray(\n              response,\n              value,\n              Int16Array,\n              2,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"s\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint16Array,\n              2,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"L\":\n            return parseTypedArray(\n              response,\n              value,\n              Int32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"l\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"G\":\n            return parseTypedArray(\n              response,\n              value,\n              Float32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"g\":\n            return parseTypedArray(\n              response,\n              value,\n              Float64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"M\":\n            return parseTypedArray(\n              response,\n              value,\n              BigInt64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"m\":\n            return parseTypedArray(\n              response,\n              value,\n              BigUint64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"V\":\n            return parseTypedArray(\n              response,\n              value,\n              DataView,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"B\":\n            obj = parseInt(value.slice(2), 16);\n            response = response._formData.data.get(response._prefix + obj);\n            if (!(response instanceof Blob))\n              throw Error(\"Referenced Blob is not a Blob.\");\n            return response;\n          case \"R\":\n            return parseReadableStream(response, value, void 0);\n          case \"r\":\n            return parseReadableStream(response, value, \"bytes\");\n          case \"X\":\n            return parseAsyncIterable(response, value, !1);\n          case \"x\":\n            return parseAsyncIterable(response, value, !0);\n        }\n        value = value.slice(1);\n        return getOutlinedModel(\n          response,\n          value,\n          obj,\n          key,\n          arrayRoot,\n          createModel\n        );\n      }\n      null !== arrayRoot && bumpArrayCount(arrayRoot, value.length, response);\n      return value;\n    }\n    function createResponse(\n      bundlerConfig,\n      formFieldPrefix,\n      temporaryReferences\n    ) {\n      var backingFormData =\n          3 < arguments.length && void 0 !== arguments[3]\n            ? arguments[3]\n            : new FormData(),\n        arraySizeLimit =\n          4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,\n        chunks = new Map();\n      return {\n        _bundlerConfig: bundlerConfig,\n        _prefix: formFieldPrefix,\n        _formData: { data: backingFormData, keyPointer: -1, keys: null },\n        _chunks: chunks,\n        _closed: !1,\n        _closedReason: null,\n        _temporaryReferences: temporaryReferences,\n        _rootArrayContexts: new WeakMap(),\n        _arraySizeLimit: arraySizeLimit\n      };\n    }\n    function resolveField(response, key, value) {\n      appendBackingEntry(response._formData, key, value);\n      var prefix = response._prefix;\n      if (key.startsWith(prefix)) {\n        var chunks = response._chunks;\n        key = +key.slice(prefix.length);\n        (chunks = chunks.get(key)) &&\n          resolveModelChunk(response, chunks, value, key);\n      }\n    }\n    function close(response) {\n      reportGlobalError(response, Error(\"Connection closed.\"));\n    }\n    function loadServerReference(bundlerConfig, metaData) {\n      var id = metaData.id;\n      if (\"string\" !== typeof id) return null;\n      var serverReference = resolveServerReference(bundlerConfig, id);\n      bundlerConfig = preloadModule(serverReference);\n      metaData = metaData.bound;\n      return metaData instanceof Promise\n        ? Promise.all([metaData, bundlerConfig]).then(function (_ref) {\n            _ref = _ref[0];\n            var fn = requireModule(serverReference);\n            if (_ref.length > MAX_BOUND_ARGS)\n              throw Error(\n                \"Server Function has too many bound arguments. Received \" +\n                  _ref.length +\n                  \" but the limit is \" +\n                  MAX_BOUND_ARGS +\n                  \".\"\n              );\n            return fn.bind.apply(fn, [null].concat(_ref));\n          })\n        : bundlerConfig\n          ? Promise.resolve(bundlerConfig).then(function () {\n              return requireModule(serverReference);\n            })\n          : Promise.resolve(requireModule(serverReference));\n    }\n    function decodeBoundActionMetaData(\n      body,\n      serverManifest,\n      formFieldPrefix,\n      arraySizeLimit\n    ) {\n      body = createResponse(\n        serverManifest,\n        formFieldPrefix,\n        void 0,\n        body,\n        arraySizeLimit\n      );\n      close(body);\n      body = getChunk(body, 0);\n      body.then(function () {});\n      if (\"fulfilled\" !== body.status) throw body.reason;\n      return body.value;\n    }\n    function createDrainHandler(destination, request) {\n      return function () {\n        return startFlowing(request, destination);\n      };\n    }\n    function createCancelHandler(request, reason) {\n      return function () {\n        request.destination = null;\n        abort(request, Error(reason));\n      };\n    }\n    function startReadingFromDebugChannelReadable(request, stream) {\n      function onData(chunk) {\n        if (\"string\" === typeof chunk) {\n          if (lastWasPartial) {\n            var JSCompiler_temp_const = stringBuffer;\n            var JSCompiler_inline_result = new Uint8Array(0);\n            JSCompiler_inline_result = stringDecoder.decode(\n              JSCompiler_inline_result\n            );\n            stringBuffer = JSCompiler_temp_const + JSCompiler_inline_result;\n            lastWasPartial = !1;\n          }\n          stringBuffer += chunk;\n        } else\n          (stringBuffer += stringDecoder.decode(chunk, decoderOptions)),\n            (lastWasPartial = !0);\n        chunk = stringBuffer.split(\"\\n\");\n        for (\n          JSCompiler_temp_const = 0;\n          JSCompiler_temp_const < chunk.length - 1;\n          JSCompiler_temp_const++\n        )\n          resolveDebugMessage(request, chunk[JSCompiler_temp_const]);\n        stringBuffer = chunk[chunk.length - 1];\n      }\n      function onError(error) {\n        abort(\n          request,\n          Error(\"Lost connection to the Debug Channel.\", { cause: error })\n        );\n      }\n      function onClose() {\n        closeDebugChannel(request);\n      }\n      var stringDecoder = new util.TextDecoder(),\n        lastWasPartial = !1,\n        stringBuffer = \"\";\n      \"function\" === typeof stream.addEventListener &&\n      \"string\" === typeof stream.binaryType\n        ? ((stream.binaryType = \"arraybuffer\"),\n          stream.addEventListener(\"message\", function (event) {\n            onData(event.data);\n          }),\n          stream.addEventListener(\"error\", function (event) {\n            onError(event.error);\n          }),\n          stream.addEventListener(\"close\", onClose))\n        : (stream.on(\"data\", onData),\n          stream.on(\"error\", onError),\n          stream.on(\"end\", onClose));\n    }\n    function createFakeWritableFromWebSocket(webSocket) {\n      return {\n        write: function (chunk) {\n          webSocket.send(chunk);\n          return !0;\n        },\n        end: function () {\n          webSocket.close();\n        },\n        destroy: function (reason) {\n          \"object\" === typeof reason &&\n            null !== reason &&\n            (reason = reason.message);\n          \"string\" === typeof reason\n            ? webSocket.close(1011, reason)\n            : webSocket.close(1011);\n        }\n      };\n    }\n    function createFakeWritableFromReadableStreamController(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function startReadingFromDebugChannelReadableStream(request, stream) {\n      function progress(_ref) {\n        var done = _ref.done,\n          buffer = _ref.value;\n        _ref = stringBuffer;\n        done\n          ? ((buffer = new Uint8Array(0)),\n            (buffer = stringDecoder.decode(buffer)))\n          : (buffer = stringDecoder.decode(buffer, decoderOptions));\n        stringBuffer = _ref + buffer;\n        _ref = stringBuffer.split(\"\\n\");\n        for (buffer = 0; buffer < _ref.length - 1; buffer++)\n          resolveDebugMessage(request, _ref[buffer]);\n        stringBuffer = _ref[_ref.length - 1];\n        if (done) closeDebugChannel(request);\n        else return reader.read().then(progress).catch(error);\n      }\n      function error(e) {\n        abort(\n          request,\n          Error(\"Lost connection to the Debug Channel.\", { cause: e })\n        );\n      }\n      var reader = stream.getReader(),\n        stringDecoder = new util.TextDecoder(),\n        stringBuffer = \"\";\n      reader.read().then(progress).catch(error);\n    }\n    function createFakeWritableFromNodeReadable(readable) {\n      return {\n        write: function (chunk) {\n          return readable.push(chunk);\n        },\n        end: function () {\n          readable.push(null);\n        },\n        destroy: function (error) {\n          readable.destroy(error);\n        }\n      };\n    }\n    var stream = require(\"stream\"),\n      util = require(\"util\");\n    require(\"crypto\");\n    var async_hooks = require(\"async_hooks\"),\n      ReactDOM = require(\"react-dom\"),\n      React = require(\"react\"),\n      REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      scheduleMicrotask = queueMicrotask,\n      currentView = null,\n      writtenBytes = 0,\n      destinationHasCapacity = !0,\n      textEncoder = new util.TextEncoder(),\n      CLIENT_REFERENCE_TAG$1 = Symbol.for(\"react.client.reference\"),\n      SERVER_REFERENCE_TAG = Symbol.for(\"react.server.reference\"),\n      FunctionBind = Function.prototype.bind,\n      ArraySlice = Array.prototype.slice,\n      serverReferenceToString = {\n        value: function () {\n          return \"function () { [omitted code] }\";\n        },\n        configurable: !0,\n        writable: !0\n      },\n      PROMISE_PROTOTYPE = Promise.prototype,\n      deepProxyHandlers = {\n        get: function (target, name, receiver) {\n          switch (name) {\n            case \"$$typeof\":\n              return target.$$typeof;\n            case \"$$id\":\n              return target.$$id;\n            case \"$$async\":\n              return target.$$async;\n            case \"name\":\n              return target.name;\n            case \"displayName\":\n              return;\n            case \"defaultProps\":\n              return;\n            case \"_debugInfo\":\n              return;\n            case \"toJSON\":\n              return;\n            case Symbol.toPrimitive:\n              return Object.prototype[Symbol.toPrimitive];\n            case Symbol.toStringTag:\n              return Object.prototype[Symbol.toStringTag];\n            case \"Provider\":\n              return receiver;\n            case \"then\":\n              throw Error(\n                \"Cannot await or return from a thenable. You cannot await a client module from a server component.\"\n              );\n          }\n          throw Error(\n            \"Cannot access \" +\n              (String(target.name) + \".\" + String(name)) +\n              \" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.\"\n          );\n        },\n        set: function () {\n          throw Error(\"Cannot assign to a client module from a server module.\");\n        }\n      },\n      proxyHandlers$1 = {\n        get: function (target, name) {\n          return getReference(target, name);\n        },\n        getOwnPropertyDescriptor: function (target, name) {\n          var descriptor = Object.getOwnPropertyDescriptor(target, name);\n          descriptor ||\n            ((descriptor = {\n              value: getReference(target, name),\n              writable: !1,\n              configurable: !1,\n              enumerable: !1\n            }),\n            Object.defineProperty(target, name, descriptor));\n          return descriptor;\n        },\n        getPrototypeOf: function () {\n          return PROMISE_PROTOTYPE;\n        },\n        set: function () {\n          throw Error(\"Cannot assign to a client module from a server module.\");\n        }\n      },\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        if (\"string\" === typeof href && href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"D|\" + href;\n            hints.has(key) || (hints.add(key), emitHint(request, \"D\", href));\n          } else previousDispatcher.D(href);\n        }\n      },\n      C: function (href, crossOrigin) {\n        if (\"string\" === typeof href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key =\n                \"C|\" +\n                (null == crossOrigin ? \"null\" : crossOrigin) +\n                \"|\" +\n                href;\n            hints.has(key) ||\n              (hints.add(key),\n              \"string\" === typeof crossOrigin\n                ? emitHint(request, \"C\", [href, crossOrigin])\n                : emitHint(request, \"C\", href));\n          } else previousDispatcher.C(href, crossOrigin);\n        }\n      },\n      L: preload,\n      m: preloadModule$1,\n      X: function (src, options) {\n        if (\"string\" === typeof src) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"X|\" + src;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"X\", [src, options])\n              : emitHint(request, \"X\", src);\n          }\n          previousDispatcher.X(src, options);\n        }\n      },\n      S: function (href, precedence, options) {\n        if (\"string\" === typeof href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"S|\" + href;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"S\", [\n                  href,\n                  \"string\" === typeof precedence ? precedence : 0,\n                  options\n                ])\n              : \"string\" === typeof precedence\n                ? emitHint(request, \"S\", [href, precedence])\n                : emitHint(request, \"S\", href);\n          }\n          previousDispatcher.S(href, precedence, options);\n        }\n      },\n      M: function (src, options) {\n        if (\"string\" === typeof src) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"M|\" + src;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"M\", [src, options])\n              : emitHint(request, \"M\", src);\n          }\n          previousDispatcher.M(src, options);\n        }\n      }\n    };\n    var currentOwner = null,\n      getAsyncId = async_hooks.AsyncResource.prototype.asyncId,\n      pendingOperations = new Map(),\n      lastRanAwait = null,\n      emptyStack = [],\n      framesToSkip = 0,\n      collectedStackTrace = null,\n      identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,\n      frameRegExp =\n        /^ {3} at (?:(.+) \\((?:(.+):(\\d+):(\\d+)|<anonymous>)\\)|(?:async )?(.+):(\\d+):(\\d+)|<anonymous>)$/,\n      stackTraceCache = new WeakMap(),\n      requestStorage = new async_hooks.AsyncLocalStorage(),\n      componentStorage = new async_hooks.AsyncLocalStorage(),\n      TEMPORARY_REFERENCE_TAG = Symbol.for(\"react.temporary.reference\"),\n      proxyHandlers = {\n        get: function (target, name, receiver) {\n          switch (name) {\n            case \"$$typeof\":\n              return target.$$typeof;\n            case \"name\":\n              return;\n            case \"displayName\":\n              return;\n            case \"defaultProps\":\n              return;\n            case \"_debugInfo\":\n              return;\n            case \"toJSON\":\n              return;\n            case Symbol.toPrimitive:\n              return Object.prototype[Symbol.toPrimitive];\n            case Symbol.toStringTag:\n              return Object.prototype[Symbol.toStringTag];\n            case \"Provider\":\n              return receiver;\n            case \"then\":\n              return;\n          }\n          throw Error(\n            \"Cannot access \" +\n              String(name) +\n              \" on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client.\"\n          );\n        },\n        set: function () {\n          throw Error(\n            \"Cannot assign to a temporary client reference from a server module.\"\n          );\n        }\n      },\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      currentRequest$1 = null,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      currentComponentDebugInfo = null,\n      HooksDispatcher = {\n        readContext: unsupportedContext,\n        use: function (usable) {\n          if (\n            (null !== usable && \"object\" === typeof usable) ||\n            \"function\" === typeof usable\n          ) {\n            if (\"function\" === typeof usable.then) {\n              var index = thenableIndexCounter;\n              thenableIndexCounter += 1;\n              null === thenableState && (thenableState = []);\n              return trackUsedThenable(thenableState, usable, index);\n            }\n            usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext();\n          }\n          if (isClientReference(usable)) {\n            if (\n              null != usable.value &&\n              usable.value.$$typeof === REACT_CONTEXT_TYPE\n            )\n              throw Error(\n                \"Cannot read a Client Context from a Server Component.\"\n              );\n            throw Error(\"Cannot use() an already resolved Client Reference.\");\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useCallback: function (callback) {\n          return callback;\n        },\n        useContext: unsupportedContext,\n        useEffect: unsupportedHook,\n        useImperativeHandle: unsupportedHook,\n        useLayoutEffect: unsupportedHook,\n        useInsertionEffect: unsupportedHook,\n        useMemo: function (nextCreate) {\n          return nextCreate();\n        },\n        useReducer: unsupportedHook,\n        useRef: unsupportedHook,\n        useState: unsupportedHook,\n        useDebugValue: function () {},\n        useDeferredValue: unsupportedHook,\n        useTransition: unsupportedHook,\n        useSyncExternalStore: unsupportedHook,\n        useId: function () {\n          if (null === currentRequest$1)\n            throw Error(\"useId can only be used while React is rendering\");\n          var id = currentRequest$1.identifierCount++;\n          return (\n            \"_\" +\n            currentRequest$1.identifierPrefix +\n            \"S_\" +\n            id.toString(32) +\n            \"_\"\n          );\n        },\n        useHostTransitionStatus: unsupportedHook,\n        useFormState: unsupportedHook,\n        useActionState: unsupportedHook,\n        useOptimistic: unsupportedHook,\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: unsupportedHook\n      },\n      DefaultAsyncDispatcher = {\n        getCacheForType: function (resourceType) {\n          var cache = (cache = resolveRequest()) ? cache.cache : new Map();\n          var entry = cache.get(resourceType);\n          void 0 === entry &&\n            ((entry = resourceType()), cache.set(resourceType, entry));\n          return entry;\n        },\n        cacheSignal: function () {\n          var request = resolveRequest();\n          return request ? request.cacheController.signal : null;\n        }\n      };\n    DefaultAsyncDispatcher.getOwner = resolveOwner;\n    var ReactSharedInternalsServer =\n      React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var prefix, suffix;\n    new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n    var lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var callComponent = {\n        react_stack_bottom_frame: function (\n          Component,\n          props,\n          componentDebugInfo\n        ) {\n          currentOwner = componentDebugInfo;\n          try {\n            return Component(props, void 0);\n          } finally {\n            currentOwner = null;\n          }\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      callIterator = {\n        react_stack_bottom_frame: function (iterator, progress, error) {\n          iterator.next().then(progress, error);\n        }\n      },\n      callIteratorInDEV =\n        callIterator.react_stack_bottom_frame.bind(callIterator),\n      isArrayImpl = Array.isArray,\n      getPrototypeOf = Object.getPrototypeOf,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      doNotLimit = new WeakSet();\n    (function () {\n      async_hooks\n        .createHook({\n          init: function (asyncId, type, triggerAsyncId, resource) {\n            var trigger = pendingOperations.get(triggerAsyncId);\n            if (\"PROMISE\" === type)\n              if (\n                ((type = async_hooks.executionAsyncId()),\n                type !== triggerAsyncId)\n              ) {\n                if (void 0 === trigger) return;\n                triggerAsyncId = null;\n                if (\n                  null === trigger.stack ||\n                  (2 !== trigger.tag && 4 !== trigger.tag)\n                ) {\n                  resource = new WeakRef(resource);\n                  var request = resolveRequest();\n                  null !== request &&\n                    ((triggerAsyncId = parseStackTracePrivate(Error(), 5)),\n                    null === triggerAsyncId ||\n                      isAwaitInUserspace(request, triggerAsyncId) ||\n                      (triggerAsyncId = null));\n                } else\n                  (triggerAsyncId = emptyStack),\n                    (resource =\n                      void 0 !== resource._debugInfo\n                        ? new WeakRef(resource)\n                        : trigger.promise);\n                type = pendingOperations.get(type);\n                trigger = {\n                  tag: 4,\n                  owner: resolveOwner(),\n                  stack: triggerAsyncId,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: resource,\n                  awaited: trigger,\n                  previous: void 0 === type ? null : type\n                };\n              } else\n                (type = resolveOwner()),\n                  (trigger = {\n                    tag: 3,\n                    owner: type,\n                    stack:\n                      null === type ? null : parseStackTracePrivate(Error(), 5),\n                    start: performance.now(),\n                    end: -1.1,\n                    promise: new WeakRef(resource),\n                    awaited: void 0 === trigger ? null : trigger,\n                    previous: null\n                  });\n            else if (\n              \"bound-anonymous-fn\" === type ||\n              \"Microtask\" === type ||\n              \"TickObject\" === type ||\n              \"Immediate\" === type\n            ) {\n              if (void 0 === trigger) return;\n            } else if (void 0 === trigger)\n              (trigger = resolveOwner()),\n                (trigger = {\n                  tag: 0,\n                  owner: trigger,\n                  stack:\n                    null === trigger\n                      ? parseStackTracePrivate(Error(), 3)\n                      : null,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: null,\n                  awaited: null,\n                  previous: null\n                });\n            else if (2 === trigger.tag || 4 === trigger.tag)\n              (resource = resolveOwner()),\n                (trigger = {\n                  tag: 0,\n                  owner: resource,\n                  stack:\n                    null === resource\n                      ? parseStackTracePrivate(Error(), 3)\n                      : null,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: null,\n                  awaited: null,\n                  previous: trigger\n                });\n            pendingOperations.set(asyncId, trigger);\n          },\n          before: function (asyncId) {\n            var node = pendingOperations.get(asyncId);\n            if (void 0 !== node)\n              switch (node.tag) {\n                case 0:\n                  lastRanAwait = null;\n                  0 > node.end\n                    ? (node.end = performance.now())\n                    : ((node = {\n                        tag: 0,\n                        owner: node.owner,\n                        stack: node.stack,\n                        start: node.start,\n                        end: performance.now(),\n                        promise: node.promise,\n                        awaited: node.awaited,\n                        previous: node.previous\n                      }),\n                      pendingOperations.set(asyncId, node));\n                  break;\n                case 4:\n                  lastRanAwait = resolvePromiseOrAwaitNode(\n                    node,\n                    performance.now()\n                  );\n                  break;\n                case 2:\n                  lastRanAwait = node;\n                  break;\n                case 3:\n                  resolvePromiseOrAwaitNode(node, performance.now()).previous =\n                    lastRanAwait;\n                  lastRanAwait = null;\n                  break;\n                default:\n                  lastRanAwait = null;\n              }\n          },\n          promiseResolve: function (asyncId) {\n            var node = pendingOperations.get(asyncId);\n            if (void 0 !== node) {\n              switch (node.tag) {\n                case 4:\n                case 3:\n                  node = resolvePromiseOrAwaitNode(node, performance.now());\n                  break;\n                case 2:\n                case 1:\n                  break;\n                default:\n                  throw Error(\n                    \"A Promise should never be an IO_NODE. This is a bug in React.\"\n                  );\n              }\n              var currentAsyncId = async_hooks.executionAsyncId();\n              asyncId !== currentAsyncId &&\n                ((asyncId = pendingOperations.get(currentAsyncId)),\n                1 === node.tag\n                  ? (node.awaited = void 0 === asyncId ? null : asyncId)\n                  : void 0 !== asyncId &&\n                    ((currentAsyncId = {\n                      tag: 2,\n                      owner: node.owner,\n                      stack: node.stack,\n                      start: node.start,\n                      end: node.end,\n                      promise: node.promise,\n                      awaited: node.awaited,\n                      previous: node.previous\n                    }),\n                    (node.start = node.end),\n                    (node.end = performance.now()),\n                    (node.previous = currentAsyncId),\n                    (node.awaited = asyncId)));\n            }\n          },\n          destroy: function (asyncId) {\n            pendingOperations.delete(asyncId);\n          }\n        })\n        .enable();\n    })();\n    \"object\" === typeof console &&\n      null !== console &&\n      (patchConsole(console, \"assert\"),\n      patchConsole(console, \"debug\"),\n      patchConsole(console, \"dir\"),\n      patchConsole(console, \"dirxml\"),\n      patchConsole(console, \"error\"),\n      patchConsole(console, \"group\"),\n      patchConsole(console, \"groupCollapsed\"),\n      patchConsole(console, \"groupEnd\"),\n      patchConsole(console, \"info\"),\n      patchConsole(console, \"log\"),\n      patchConsole(console, \"table\"),\n      patchConsole(console, \"trace\"),\n      patchConsole(console, \"warn\"));\n    var ObjectPrototype$1 = Object.prototype,\n      stringify = JSON.stringify,\n      PENDING$1 = 0,\n      COMPLETED = 1,\n      ABORTED = 3,\n      ERRORED$1 = 4,\n      RENDERING = 5,\n      __PROTO__$1 = \"__proto__\",\n      OPENING = 10,\n      ABORTING = 12,\n      CLOSING = 13,\n      CLOSED = 14,\n      PRERENDER = 21,\n      NEXT_TWO_CHUNKS_ARE_ATOMIC = Symbol(),\n      currentRequest = null,\n      canEmitDebugInfo = !1,\n      serializedSize = 0,\n      MAX_ROW_SIZE = 3200,\n      modelRoot = !1,\n      CONSTRUCTOR_MARKER = Symbol(),\n      debugModelRoot = null,\n      debugNoOutline = null,\n      emptyRoot = {},\n      decoderOptions = { stream: !0 },\n      chunkCache = new Map(),\n      RESPONSE_SYMBOL = Symbol();\n    ReactPromise.prototype = Object.create(Promise.prototype);\n    Object.defineProperty(ReactPromise.prototype, \"then\", {\n      writable: !0,\n      enumerable: !0,\n      configurable: !0,\n      value: function (resolve, reject) {\n        switch (this.status) {\n          case \"resolved_model\":\n            initializeModelChunk(this);\n        }\n        switch (this.status) {\n          case \"fulfilled\":\n            if (\"function\" === typeof resolve) {\n              for (\n                var inspectedValue = this.value,\n                  cycleProtection = 0,\n                  visited = new Set();\n                inspectedValue instanceof ReactPromise;\n\n              ) {\n                cycleProtection++;\n                if (\n                  inspectedValue === this ||\n                  visited.has(inspectedValue) ||\n                  1e3 < cycleProtection\n                ) {\n                  \"function\" === typeof reject &&\n                    reject(Error(\"Cannot have cyclic thenables.\"));\n                  return;\n                }\n                visited.add(inspectedValue);\n                if (\"fulfilled\" === inspectedValue.status)\n                  inspectedValue = inspectedValue.value;\n                else break;\n              }\n              resolve(this.value);\n            }\n            break;\n          case \"pending\":\n          case \"blocked\":\n            \"function\" === typeof resolve &&\n              (null === this.value && (this.value = []),\n              this.value.push(resolve));\n            \"function\" === typeof reject &&\n              (null === this.reason && (this.reason = []),\n              this.reason.push(reject));\n            break;\n          default:\n            \"function\" === typeof reject && reject(this.reason);\n        }\n      }\n    });\n    var ObjectPrototype = Object.prototype,\n      ArrayPrototype = Array.prototype,\n      initializingHandler = null;\n    FlightIterator.prototype = {};\n    FlightIterator.prototype[ASYNC_ITERATOR] = function () {\n      return this;\n    };\n    var MAX_BIGINT_DIGITS = 300,\n      MAX_BOUND_ARGS = 1e3;\n    exports.createClientModuleProxy = function (moduleId) {\n      moduleId = registerClientReferenceImpl({}, moduleId, !1);\n      return new Proxy(moduleId, proxyHandlers$1);\n    };\n    exports.createTemporaryReferenceSet = function () {\n      return new WeakMap();\n    };\n    exports.decodeAction = function (body, serverManifest) {\n      var formData = new FormData(),\n        maybeActionKey = null;\n      body.forEach(function (value, key) {\n        key.startsWith(\"$ACTION_\")\n          ? key.startsWith(\"$ACTION_REF_\")\n            ? (maybeActionKey = key)\n            : key.startsWith(\"$ACTION_ID_\") && (maybeActionKey = key)\n          : formData.append(key, value);\n      });\n      if (null === maybeActionKey) return null;\n      var actionKey = maybeActionKey,\n        action = null;\n      if (actionKey.startsWith(\"$ACTION_REF_\"))\n        (actionKey = \"$ACTION_\" + actionKey.slice(12) + \":\"),\n          (body = decodeBoundActionMetaData(body, serverManifest, actionKey)),\n          (action = loadServerReference(serverManifest, body));\n      else if (actionKey.startsWith(\"$ACTION_ID_\"))\n        (body = actionKey.slice(11)),\n          (action = loadServerReference(serverManifest, {\n            id: body,\n            bound: null\n          }));\n      else throw Error(\"Cannot handle action key. This is a bug in React.\");\n      return action.then(function (fn) {\n        return fn.bind(null, formData);\n      });\n    };\n    exports.decodeFormState = function (actionResult, body, serverManifest) {\n      var keyPath = body.get(\"$ACTION_KEY\");\n      if (\"string\" !== typeof keyPath) return Promise.resolve(null);\n      var actionKey = null;\n      body.forEach(function (value, key) {\n        key.startsWith(\"$ACTION_REF_\") && (actionKey = key);\n      });\n      if (null === actionKey) return Promise.resolve(null);\n      var formFieldPrefix = \"$ACTION_\" + actionKey.slice(12) + \":\";\n      body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);\n      var referenceId = body.id;\n      return Promise.resolve(body.bound).then(function (bound) {\n        return null === bound\n          ? null\n          : [actionResult, keyPath, referenceId, bound.length - 1];\n      });\n    };\n    exports.decodeReply = function (body, webpackMap, options) {\n      if (\"string\" === typeof body) {\n        var form = new FormData();\n        form.append(\"0\", body);\n        body = form;\n      }\n      body = createResponse(\n        webpackMap,\n        \"\",\n        options ? options.temporaryReferences : void 0,\n        body,\n        options ? options.arraySizeLimit : void 0\n      );\n      webpackMap = getChunk(body, 0);\n      close(body);\n      return webpackMap;\n    };\n    exports.decodeReplyFromAsyncIterable = function (\n      iterable,\n      webpackMap,\n      options\n    ) {\n      function progress(entry) {\n        if (entry.done) close(response);\n        else {\n          var _entry$value = entry.value;\n          entry = _entry$value[0];\n          _entry$value = _entry$value[1];\n          \"string\" === typeof _entry$value\n            ? resolveField(response, entry, _entry$value)\n            : appendBackingEntry(response._formData, entry, _entry$value);\n          iterator.next().then(progress, error);\n        }\n      }\n      function error(reason) {\n        reportGlobalError(response, reason);\n        \"function\" === typeof iterator.throw &&\n          iterator.throw(reason).then(noop, noop);\n      }\n      var iterator = iterable[ASYNC_ITERATOR](),\n        response = createResponse(\n          webpackMap,\n          \"\",\n          options ? options.temporaryReferences : void 0,\n          void 0,\n          options ? options.arraySizeLimit : void 0\n        );\n      iterator.next().then(progress, error);\n      return getChunk(response, 0);\n    };\n    exports.decodeReplyFromBusboy = function (\n      busboyStream,\n      webpackMap,\n      options\n    ) {\n      function flush() {\n        for (; null !== head; ) {\n          var current = head;\n          if (!current.complete) return;\n          try {\n            var response = response$jscomp$0,\n              key = current.name,\n              handle = current.file,\n              blob = new Blob(handle.chunks, { type: handle.mime }),\n              backingStore = response._formData;\n            response = key;\n            backingStore.data.append(response, blob, handle.filename);\n            var keys = backingStore.keys;\n            null === keys\n              ? ((backingStore.keys = Array.from(backingStore.data.keys())),\n                (backingStore.keyPointer = 0))\n              : keys.push(response);\n            var queuedFields = current.queuedFields;\n            if (null !== queuedFields)\n              for (response = 0; response < queuedFields.length; response += 2)\n                resolveField(\n                  response$jscomp$0,\n                  queuedFields[response],\n                  queuedFields[response + 1]\n                );\n          } catch (error) {\n            busboyStream.destroy(error);\n            return;\n          }\n          head = current.next;\n        }\n        tail = null;\n        bodyFinished && !closed && ((closed = !0), close(response$jscomp$0));\n      }\n      var response$jscomp$0 = createResponse(\n          webpackMap,\n          \"\",\n          options ? options.temporaryReferences : void 0,\n          void 0,\n          options ? options.arraySizeLimit : void 0\n        ),\n        head = null,\n        tail = null,\n        bodyFinished = !1,\n        closed = !1;\n      busboyStream.on(\"field\", function (name, value) {\n        if (null !== tail)\n          null === tail.queuedFields && (tail.queuedFields = []),\n            tail.queuedFields.push(name, value);\n        else\n          try {\n            resolveField(response$jscomp$0, name, value);\n          } catch (error) {\n            busboyStream.destroy(error);\n          }\n      });\n      busboyStream.on(\"file\", function (name, value, _ref2) {\n        var filename = _ref2.filename,\n          mimeType = _ref2.mimeType;\n        if (\"base64\" === _ref2.encoding.toLowerCase())\n          busboyStream.destroy(\n            Error(\n              \"React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it.\"\n            )\n          );\n        else {\n          var file = { chunks: [], filename: filename, mime: mimeType },\n            pendingFile = {\n              name: name,\n              file: file,\n              complete: !1,\n              queuedFields: null,\n              next: null\n            };\n          null === tail ? (head = pendingFile) : (tail.next = pendingFile);\n          tail = pendingFile;\n          value.on(\"data\", function (chunk) {\n            try {\n              file.chunks.push(chunk);\n            } catch (error) {\n              busboyStream.destroy(error);\n            }\n          });\n          value.on(\"error\", function (error) {\n            busboyStream.destroy(error);\n          });\n          value.on(\"end\", function () {\n            pendingFile.complete = !0;\n            flush();\n          });\n        }\n      });\n      busboyStream.on(\"finish\", function () {\n        bodyFinished = !0;\n        flush();\n        closed ||\n          reportGlobalError(\n            response$jscomp$0,\n            Error(\"Reply finished with incomplete file part.\")\n          );\n      });\n      busboyStream.on(\"error\", function (err) {\n        reportGlobalError(response$jscomp$0, err);\n      });\n      return getChunk(response$jscomp$0, 0);\n    };\n    exports.prerender = function (model, webpackMap, options) {\n      return new Promise(function (resolve, reject) {\n        var request = createPrerenderRequest(\n          model,\n          webpackMap,\n          function () {\n            var writable,\n              stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  start: function (controller) {\n                    writable =\n                      createFakeWritableFromReadableStreamController(\n                        controller\n                      );\n                  },\n                  pull: function () {\n                    startFlowing(request, writable);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n            resolve({ prelude: stream });\n          },\n          reject,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          !1\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.prerenderToNodeStream = function (model, webpackMap, options) {\n      return new Promise(function (resolve, reject) {\n        var request = createPrerenderRequest(\n          model,\n          webpackMap,\n          function () {\n            var readable = new stream.Readable({\n                read: function () {\n                  startFlowing(request, writable);\n                }\n              }),\n              writable = createFakeWritableFromNodeReadable(readable);\n            resolve({ prelude: readable });\n          },\n          reject,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          !1\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.registerClientReference = function (\n      proxyImplementation,\n      id,\n      exportName\n    ) {\n      return registerClientReferenceImpl(\n        proxyImplementation,\n        id + \"#\" + exportName,\n        !1\n      );\n    };\n    exports.registerServerReference = function (reference, id, exportName) {\n      return Object.defineProperties(reference, {\n        $$typeof: { value: SERVER_REFERENCE_TAG },\n        $$id: {\n          value: null === exportName ? id : id + \"#\" + exportName,\n          configurable: !0\n        },\n        $$bound: { value: null, configurable: !0 },\n        $$location: { value: Error(\"react-stack-top-frame\"), configurable: !0 },\n        bind: { value: bind, configurable: !0 },\n        toString: serverReferenceToString\n      });\n    };\n    exports.renderToPipeableStream = function (model, webpackMap, options) {\n      var debugChannel = options ? options.debugChannel : void 0,\n        debugChannelReadable =\n          void 0 === debugChannel ||\n          (\"function\" !== typeof debugChannel.read &&\n            \"number\" !== typeof debugChannel.readyState)\n            ? void 0\n            : debugChannel;\n      debugChannel =\n        void 0 !== debugChannel\n          ? \"function\" === typeof debugChannel.write\n            ? debugChannel\n            : \"function\" === typeof debugChannel.send\n              ? createFakeWritableFromWebSocket(debugChannel)\n              : void 0\n          : void 0;\n      var request = createRequest(\n          model,\n          webpackMap,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          void 0 !== debugChannelReadable\n        ),\n        hasStartedFlowing = !1;\n      startWork(request);\n      void 0 !== debugChannel && startFlowingDebug(request, debugChannel);\n      void 0 !== debugChannelReadable &&\n        startReadingFromDebugChannelReadable(request, debugChannelReadable);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          if (void 0 === debugChannelReadable)\n            destination.on(\n              \"close\",\n              createCancelHandler(\n                request,\n                \"The destination stream closed early.\"\n              )\n            );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.renderToReadableStream = function (model, webpackMap, options) {\n      var debugChannelReadable =\n          options && options.debugChannel\n            ? options.debugChannel.readable\n            : void 0,\n        debugChannelWritable =\n          options && options.debugChannel\n            ? options.debugChannel.writable\n            : void 0,\n        request = createRequest(\n          model,\n          webpackMap,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          void 0 !== debugChannelReadable\n        );\n      if (options && options.signal) {\n        var signal = options.signal;\n        if (signal.aborted) abort(request, signal.reason);\n        else {\n          var listener = function () {\n            abort(request, signal.reason);\n            signal.removeEventListener(\"abort\", listener);\n          };\n          signal.addEventListener(\"abort\", listener);\n        }\n      }\n      if (void 0 !== debugChannelWritable) {\n        var debugWritable;\n        new ReadableStream(\n          {\n            type: \"bytes\",\n            start: function (controller) {\n              debugWritable =\n                createFakeWritableFromReadableStreamController(controller);\n            },\n            pull: function () {\n              startFlowingDebug(request, debugWritable);\n            }\n          },\n          { highWaterMark: 0 }\n        ).pipeTo(debugChannelWritable);\n      }\n      void 0 !== debugChannelReadable &&\n        startReadingFromDebugChannelReadableStream(\n          request,\n          debugChannelReadable\n        );\n      var writable;\n      return new ReadableStream(\n        {\n          type: \"bytes\",\n          start: function (controller) {\n            writable =\n              createFakeWritableFromReadableStreamController(controller);\n            startWork(request);\n          },\n          pull: function () {\n            startFlowing(request, writable);\n          },\n          cancel: function (reason) {\n            request.destination = null;\n            abort(request, reason);\n          }\n        },\n        { highWaterMark: 0 }\n      );\n    };\n  })();\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-server-dom-webpack-server.node.production.js');\n} else {\n  s = require('./cjs/react-server-dom-webpack-server.node.development.js');\n}\n\nexports.renderToReadableStream = s.renderToReadableStream;\nexports.renderToPipeableStream = s.renderToPipeableStream;\nexports.decodeReply = s.decodeReply;\nexports.decodeReplyFromBusboy = s.decodeReplyFromBusboy;\nexports.decodeReplyFromAsyncIterable = s.decodeReplyFromAsyncIterable;\nexports.decodeAction = s.decodeAction;\nexports.decodeFormState = s.decodeFormState;\nexports.registerServerReference = s.registerServerReference;\nexports.registerClientReference = s.registerClientReference;\nexports.createClientModuleProxy = s.createClientModuleProxy;\nexports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-server-dom-webpack-server.node.production.js');\n} else {\n  s = require('./cjs/react-server-dom-webpack-server.node.development.js');\n}\n\nexports.prerender = s.prerender;\nexports.prerenderToNodeStream = s.prerenderToNodeStream;\n","/**\n * @license React\n * react-jsx-dev-runtime.react-server.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternalsServer.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternalsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react-jsx-runtime.react-server.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternalsServer.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternalsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react.react-server.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function cloneAndReplaceKey(oldElement, newKey) {\n      newKey = ReactElement(\n        oldElement.type,\n        newKey,\n        oldElement.props,\n        oldElement._owner,\n        oldElement._debugStack,\n        oldElement._debugTask\n      );\n      oldElement._store &&\n        (newKey._store.validated = oldElement._store.validated);\n      return newKey;\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    function escape(key) {\n      var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n      return (\n        \"$\" +\n        key.replace(/[=:]/g, function (match) {\n          return escaperLookup[match];\n        })\n      );\n    }\n    function getElementKey(element, index) {\n      return \"object\" === typeof element &&\n        null !== element &&\n        null != element.key\n        ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n        : index.toString(36);\n    }\n    function resolveThenable(thenable) {\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          switch (\n            (\"string\" === typeof thenable.status\n              ? thenable.then(noop, noop)\n              : ((thenable.status = \"pending\"),\n                thenable.then(\n                  function (fulfilledValue) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"fulfilled\"),\n                      (thenable.value = fulfilledValue));\n                  },\n                  function (error) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"rejected\"),\n                      (thenable.reason = error));\n                  }\n                )),\n            thenable.status)\n          ) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n      }\n      throw thenable;\n    }\n    function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n      var type = typeof children;\n      if (\"undefined\" === type || \"boolean\" === type) children = null;\n      var invokeCallback = !1;\n      if (null === children) invokeCallback = !0;\n      else\n        switch (type) {\n          case \"bigint\":\n          case \"string\":\n          case \"number\":\n            invokeCallback = !0;\n            break;\n          case \"object\":\n            switch (children.$$typeof) {\n              case REACT_ELEMENT_TYPE:\n              case REACT_PORTAL_TYPE:\n                invokeCallback = !0;\n                break;\n              case REACT_LAZY_TYPE:\n                return (\n                  (invokeCallback = children._init),\n                  mapIntoArray(\n                    invokeCallback(children._payload),\n                    array,\n                    escapedPrefix,\n                    nameSoFar,\n                    callback\n                  )\n                );\n            }\n        }\n      if (invokeCallback) {\n        invokeCallback = children;\n        callback = callback(invokeCallback);\n        var childKey =\n          \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n        isArrayImpl(callback)\n          ? ((escapedPrefix = \"\"),\n            null != childKey &&\n              (escapedPrefix =\n                childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n            mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n              return c;\n            }))\n          : null != callback &&\n            (isValidElement(callback) &&\n              (null != callback.key &&\n                ((invokeCallback && invokeCallback.key === callback.key) ||\n                  checkKeyStringCoercion(callback.key)),\n              (escapedPrefix = cloneAndReplaceKey(\n                callback,\n                escapedPrefix +\n                  (null == callback.key ||\n                  (invokeCallback && invokeCallback.key === callback.key)\n                    ? \"\"\n                    : (\"\" + callback.key).replace(\n                        userProvidedKeyEscapeRegex,\n                        \"$&/\"\n                      ) + \"/\") +\n                  childKey\n              )),\n              \"\" !== nameSoFar &&\n                null != invokeCallback &&\n                isValidElement(invokeCallback) &&\n                null == invokeCallback.key &&\n                invokeCallback._store &&\n                !invokeCallback._store.validated &&\n                (escapedPrefix._store.validated = 2),\n              (callback = escapedPrefix)),\n            array.push(callback));\n        return 1;\n      }\n      invokeCallback = 0;\n      childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n      if (isArrayImpl(children))\n        for (var i = 0; i < children.length; i++)\n          (nameSoFar = children[i]),\n            (type = childKey + getElementKey(nameSoFar, i)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n        for (\n          i === children.entries &&\n            (didWarnAboutMaps ||\n              console.warn(\n                \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n              ),\n            (didWarnAboutMaps = !0)),\n            children = i.call(children),\n            i = 0;\n          !(nameSoFar = children.next()).done;\n\n        )\n          (nameSoFar = nameSoFar.value),\n            (type = childKey + getElementKey(nameSoFar, i++)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (\"object\" === type) {\n        if (\"function\" === typeof children.then)\n          return mapIntoArray(\n            resolveThenable(children),\n            array,\n            escapedPrefix,\n            nameSoFar,\n            callback\n          );\n        array = String(children);\n        throw Error(\n          \"Objects are not valid as a React child (found: \" +\n            (\"[object Object]\" === array\n              ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n              : array) +\n            \"). If you meant to render a collection of children, use an array instead.\"\n        );\n      }\n      return invokeCallback;\n    }\n    function mapChildren(children, func, context) {\n      if (null == children) return children;\n      var result = [],\n        count = 0;\n      mapIntoArray(children, result, \"\", \"\", function (child) {\n        return func.call(context, child, count++);\n      });\n      return result;\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    function lazyInitializer(payload) {\n      if (-1 === payload._status) {\n        var resolveDebugValue = null,\n          rejectDebugValue = null,\n          ioInfo = payload._ioInfo;\n        null != ioInfo &&\n          ((ioInfo.start = ioInfo.end = performance.now()),\n          (ioInfo.value = new Promise(function (resolve, reject) {\n            resolveDebugValue = resolve;\n            rejectDebugValue = reject;\n          })));\n        ioInfo = payload._result;\n        var thenable = ioInfo();\n        thenable.then(\n          function (moduleObject) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 1;\n              payload._result = moduleObject;\n              var _ioInfo = payload._ioInfo;\n              if (null != _ioInfo) {\n                _ioInfo.end = performance.now();\n                var debugValue =\n                  null == moduleObject ? void 0 : moduleObject.default;\n                resolveDebugValue(debugValue);\n                _ioInfo.value.status = \"fulfilled\";\n                _ioInfo.value.value = debugValue;\n              }\n              void 0 === thenable.status &&\n                ((thenable.status = \"fulfilled\"),\n                (thenable.value = moduleObject));\n            }\n          },\n          function (error) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 2;\n              payload._result = error;\n              var _ioInfo2 = payload._ioInfo;\n              null != _ioInfo2 &&\n                ((_ioInfo2.end = performance.now()),\n                _ioInfo2.value.then(noop, noop),\n                rejectDebugValue(error),\n                (_ioInfo2.value.status = \"rejected\"),\n                (_ioInfo2.value.reason = error));\n              void 0 === thenable.status &&\n                ((thenable.status = \"rejected\"), (thenable.reason = error));\n            }\n          }\n        );\n        ioInfo = payload._ioInfo;\n        if (null != ioInfo) {\n          var displayName = thenable.displayName;\n          \"string\" === typeof displayName && (ioInfo.name = displayName);\n        }\n        -1 === payload._status &&\n          ((payload._status = 0), (payload._result = thenable));\n      }\n      if (1 === payload._status)\n        return (\n          (ioInfo = payload._result),\n          void 0 === ioInfo &&\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n              ioInfo\n            ),\n          \"default\" in ioInfo ||\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\",\n              ioInfo\n            ),\n          ioInfo.default\n        );\n      throw payload._result;\n    }\n    function createCacheRoot() {\n      return new WeakMap();\n    }\n    function createCacheNode() {\n      return { s: 0, v: void 0, o: null, p: null };\n    }\n    var ReactSharedInternals = {\n        H: null,\n        A: null,\n        getCurrentStack: null,\n        recentlyCreatedOwnerStacks: 0\n      },\n      isArrayImpl = Array.isArray,\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      assign = Object.assign,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          },\n      createFakeCallStack = {\n        react_stack_bottom_frame: function (callStackForError) {\n          return callStackForError();\n        }\n      },\n      specialPropKeyWarningShown,\n      didWarnAboutOldJSXRuntime;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack =\n      createFakeCallStack.react_stack_bottom_frame.bind(\n        createFakeCallStack,\n        UnknownOwner\n      )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutMaps = !1,\n      userProvidedKeyEscapeRegex = /\\/+/g;\n    createFakeCallStack = {\n      map: mapChildren,\n      forEach: function (children, forEachFunc, forEachContext) {\n        mapChildren(\n          children,\n          function () {\n            forEachFunc.apply(this, arguments);\n          },\n          forEachContext\n        );\n      },\n      count: function (children) {\n        var n = 0;\n        mapChildren(children, function () {\n          n++;\n        });\n        return n;\n      },\n      toArray: function (children) {\n        return (\n          mapChildren(children, function (child) {\n            return child;\n          }) || []\n        );\n      },\n      only: function (children) {\n        if (!isValidElement(children))\n          throw Error(\n            \"React.Children.only expected to receive a single React element child.\"\n          );\n        return children;\n      }\n    };\n    exports.Activity = REACT_ACTIVITY_TYPE;\n    exports.Children = createFakeCallStack;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n    exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      ReactSharedInternals;\n    exports.cache = function (fn) {\n      return function () {\n        var dispatcher = ReactSharedInternals.A;\n        if (!dispatcher) return fn.apply(null, arguments);\n        var fnMap = dispatcher.getCacheForType(createCacheRoot);\n        dispatcher = fnMap.get(fn);\n        void 0 === dispatcher &&\n          ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n        fnMap = 0;\n        for (var l = arguments.length; fnMap < l; fnMap++) {\n          var arg = arguments[fnMap];\n          if (\n            \"function\" === typeof arg ||\n            (\"object\" === typeof arg && null !== arg)\n          ) {\n            var objectCache = dispatcher.o;\n            null === objectCache &&\n              (dispatcher.o = objectCache = new WeakMap());\n            dispatcher = objectCache.get(arg);\n            void 0 === dispatcher &&\n              ((dispatcher = createCacheNode()),\n              objectCache.set(arg, dispatcher));\n          } else\n            (objectCache = dispatcher.p),\n              null === objectCache && (dispatcher.p = objectCache = new Map()),\n              (dispatcher = objectCache.get(arg)),\n              void 0 === dispatcher &&\n                ((dispatcher = createCacheNode()),\n                objectCache.set(arg, dispatcher));\n        }\n        if (1 === dispatcher.s) return dispatcher.v;\n        if (2 === dispatcher.s) throw dispatcher.v;\n        try {\n          var result = fn.apply(null, arguments);\n          fnMap = dispatcher;\n          fnMap.s = 1;\n          return (fnMap.v = result);\n        } catch (error) {\n          throw (\n            ((result = dispatcher), (result.s = 2), (result.v = error), error)\n          );\n        }\n      };\n    };\n    exports.cacheSignal = function () {\n      var dispatcher = ReactSharedInternals.A;\n      return dispatcher ? dispatcher.cacheSignal() : null;\n    };\n    exports.captureOwnerStack = function () {\n      var getCurrentStack = ReactSharedInternals.getCurrentStack;\n      return null === getCurrentStack ? null : getCurrentStack();\n    };\n    exports.cloneElement = function (element, config, children) {\n      if (null === element || void 0 === element)\n        throw Error(\n          \"The argument must be a React element, but you passed \" +\n            element +\n            \".\"\n        );\n      var props = assign({}, element.props),\n        key = element.key,\n        owner = element._owner;\n      if (null != config) {\n        var JSCompiler_inline_result;\n        a: {\n          if (\n            hasOwnProperty.call(config, \"ref\") &&\n            (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n              config,\n              \"ref\"\n            ).get) &&\n            JSCompiler_inline_result.isReactWarning\n          ) {\n            JSCompiler_inline_result = !1;\n            break a;\n          }\n          JSCompiler_inline_result = void 0 !== config.ref;\n        }\n        JSCompiler_inline_result && (owner = getOwner());\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n        for (propName in config)\n          !hasOwnProperty.call(config, propName) ||\n            \"key\" === propName ||\n            \"__self\" === propName ||\n            \"__source\" === propName ||\n            (\"ref\" === propName && void 0 === config.ref) ||\n            (props[propName] = config[propName]);\n      }\n      var propName = arguments.length - 2;\n      if (1 === propName) props.children = children;\n      else if (1 < propName) {\n        JSCompiler_inline_result = Array(propName);\n        for (var i = 0; i < propName; i++)\n          JSCompiler_inline_result[i] = arguments[i + 2];\n        props.children = JSCompiler_inline_result;\n      }\n      props = ReactElement(\n        element.type,\n        key,\n        props,\n        owner,\n        element._debugStack,\n        element._debugTask\n      );\n      for (key = 2; key < arguments.length; key++)\n        validateChildKeys(arguments[key]);\n      return props;\n    };\n    exports.createElement = function (type, config, children) {\n      for (var i = 2; i < arguments.length; i++)\n        validateChildKeys(arguments[i]);\n      var propName;\n      i = {};\n      var key = null;\n      if (null != config)\n        for (propName in (didWarnAboutOldJSXRuntime ||\n          !(\"__self\" in config) ||\n          \"key\" in config ||\n          ((didWarnAboutOldJSXRuntime = !0),\n          console.warn(\n            \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n          )),\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n        config))\n          hasOwnProperty.call(config, propName) &&\n            \"key\" !== propName &&\n            \"__self\" !== propName &&\n            \"__source\" !== propName &&\n            (i[propName] = config[propName]);\n      var childrenLength = arguments.length - 2;\n      if (1 === childrenLength) i.children = children;\n      else if (1 < childrenLength) {\n        for (\n          var childArray = Array(childrenLength), _i = 0;\n          _i < childrenLength;\n          _i++\n        )\n          childArray[_i] = arguments[_i + 2];\n        Object.freeze && Object.freeze(childArray);\n        i.children = childArray;\n      }\n      if (type && type.defaultProps)\n        for (propName in ((childrenLength = type.defaultProps), childrenLength))\n          void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n      key &&\n        defineKeyPropWarningGetter(\n          i,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n        ? ((childArray = Error.stackTraceLimit),\n          (Error.stackTraceLimit = 10),\n          (childrenLength = Error(\"react-stack-top-frame\")),\n          (Error.stackTraceLimit = childArray))\n        : (childrenLength = unknownOwnerDebugStack);\n      return ReactElement(\n        type,\n        key,\n        i,\n        getOwner(),\n        childrenLength,\n        propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.createRef = function () {\n      var refObject = { current: null };\n      Object.seal(refObject);\n      return refObject;\n    };\n    exports.forwardRef = function (render) {\n      null != render && render.$$typeof === REACT_MEMO_TYPE\n        ? console.error(\n            \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n          )\n        : \"function\" !== typeof render\n          ? console.error(\n              \"forwardRef requires a render function but was given %s.\",\n              null === render ? \"null\" : typeof render\n            )\n          : 0 !== render.length &&\n            2 !== render.length &&\n            console.error(\n              \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n              1 === render.length\n                ? \"Did you forget to use the ref parameter?\"\n                : \"Any additional parameter will be undefined.\"\n            );\n      null != render &&\n        null != render.defaultProps &&\n        console.error(\n          \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n        );\n      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n        ownName;\n      Object.defineProperty(elementType, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          render.name ||\n            render.displayName ||\n            (Object.defineProperty(render, \"name\", { value: name }),\n            (render.displayName = name));\n        }\n      });\n      return elementType;\n    };\n    exports.isValidElement = isValidElement;\n    exports.lazy = function (ctor) {\n      ctor = { _status: -1, _result: ctor };\n      var lazyType = {\n          $$typeof: REACT_LAZY_TYPE,\n          _payload: ctor,\n          _init: lazyInitializer\n        },\n        ioInfo = {\n          name: \"lazy\",\n          start: -1,\n          end: -1,\n          value: null,\n          owner: null,\n          debugStack: Error(\"react-stack-top-frame\"),\n          debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n        };\n      ctor._ioInfo = ioInfo;\n      lazyType._debugInfo = [{ awaited: ioInfo }];\n      return lazyType;\n    };\n    exports.memo = function (type, compare) {\n      null == type &&\n        console.error(\n          \"memo: The first argument must be a component. Instead received: %s\",\n          null === type ? \"null\" : typeof type\n        );\n      compare = {\n        $$typeof: REACT_MEMO_TYPE,\n        type: type,\n        compare: void 0 === compare ? null : compare\n      };\n      var ownName;\n      Object.defineProperty(compare, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          type.name ||\n            type.displayName ||\n            (Object.defineProperty(type, \"name\", { value: name }),\n            (type.displayName = name));\n        }\n      });\n      return compare;\n    };\n    exports.use = function (usable) {\n      return resolveDispatcher().use(usable);\n    };\n    exports.useCallback = function (callback, deps) {\n      return resolveDispatcher().useCallback(callback, deps);\n    };\n    exports.useDebugValue = function (value, formatterFn) {\n      return resolveDispatcher().useDebugValue(value, formatterFn);\n    };\n    exports.useId = function () {\n      return resolveDispatcher().useId();\n    };\n    exports.useMemo = function (create, deps) {\n      return resolveDispatcher().useMemo(create, deps);\n    };\n    exports.version = \"19.3.0-canary-cbb046ab-20260731\";\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-dev-runtime.react-server.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.react-server.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react.react-server.development.js');\n}\n","import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport * as ReactJsxDevRuntime from 'react/jsx-dev-runtime'\nimport * as ReactJsxRuntime from 'react/jsx-runtime'\nimport * as ReactCompilerRuntime from 'react/compiler-runtime'\n\nfunction getAltProxyForBindingsDEV(\n  type: 'Turbopack' | 'Webpack',\n  pkg:\n    | 'react-server-dom-turbopack/server'\n    | 'react-server-dom-turbopack/static'\n    | 'react-server-dom-webpack/server'\n    | 'react-server-dom-webpack/static'\n) {\n  if (process.env.NODE_ENV === 'development') {\n    const altType = type === 'Turbopack' ? 'Webpack' : 'Turbopack'\n    const altPkg = pkg.replace(new RegExp(type, 'gi'), altType.toLowerCase())\n\n    return new Proxy(\n      {},\n      {\n        get(_, prop: string) {\n          throw new Error(\n            `Expected to use ${type} bindings (${pkg}) for React but the current process is referencing '${prop}' from the ${altType} bindings (${altPkg}). This is likely a bug in our integration of the Next.js server runtime.`\n          )\n        },\n      }\n    )\n  }\n}\n\nlet ReactServerDOMTurbopackServer, ReactServerDOMWebpackServer\nlet ReactServerDOMTurbopackStatic, ReactServerDOMWebpackStatic\n\nif (process.env.TURBOPACK) {\n  ReactServerDOMTurbopackServer =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/server') as typeof import('react-server-dom-turbopack/server')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackServer = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/server'\n    )\n  }\n  ReactServerDOMTurbopackStatic =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/static') as typeof import('react-server-dom-turbopack/static')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackStatic = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/static'\n    )\n  }\n} else {\n  ReactServerDOMWebpackServer =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/server') as typeof import('react-server-dom-webpack/server')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackServer = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/server'\n    )\n  }\n  ReactServerDOMWebpackStatic =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/static') as typeof import('react-server-dom-webpack/static')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackStatic = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/static'\n    )\n  }\n}\n\nexport {\n  React,\n  ReactJsxDevRuntime,\n  ReactJsxRuntime,\n  ReactCompilerRuntime,\n  ReactDOM,\n  ReactServerDOMTurbopackServer,\n  ReactServerDOMTurbopackStatic,\n  ReactServerDOMWebpackServer,\n  ReactServerDOMWebpackStatic,\n}\n","(()=>{var e={982:e=>{\"use strict\";e.exports=require(\"crypto\")},3:(e,r,t)=>{let l=t(982);let{urlAlphabet:a}=t(885);const n=128;let _,u;let fillPool=e=>{if(!_||_.length<e){_=Buffer.allocUnsafe(e*n);l.randomFillSync(_);u=0}else if(u+e>_.length){l.randomFillSync(_);u=0}u+=e};let random=e=>{fillPool(e-=0);return _.subarray(u-e,u)};let customRandom=(e,r,t)=>{let l=(2<<31-Math.clz32(e.length-1|1))-1;let a=Math.ceil(1.6*l*r/e.length);return()=>{let n=\"\";while(true){let _=t(a);let u=a;while(u--){n+=e[_[u]&l]||\"\";if(n.length===r)return n}}}};let customAlphabet=(e,r)=>customRandom(e,r,random);let nanoid=(e=21)=>{fillPool(e-=0);let r=\"\";for(let t=u-e;t<u;t++){r+=a[_[t]&63]}return r};e.exports={nanoid:nanoid,customAlphabet:customAlphabet,customRandom:customRandom,urlAlphabet:a,random:random}},885:e=>{let r=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";e.exports={urlAlphabet:r}}};var r={};function __nccwpck_require__(t){var l=r[t];if(l!==undefined){return l.exports}var a=r[t]={exports:{}};var n=true;try{e[t](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[t]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(3);module.exports=t})();","(()=>{var e={293:function(e,t){(function(e,n){true?n(t):0})(this,(function(e){\"use strict\";class StructError extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...c}=e;const{path:o}=e;const a=o.length===0?r:`At path: ${o.join(\".\")} -- ${r}`;super(i??a);if(i!=null)this.cause=a;Object.assign(this,c);this.name=this.constructor.name;this.failures=()=>n??(n=[e,...t()])}}function isIterable(e){return isObject(e)&&typeof e[Symbol.iterator]===\"function\"}function isObject(e){return typeof e===\"object\"&&e!=null}function isPlainObject(e){if(Object.prototype.toString.call(e)!==\"[object Object]\"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function print(e){if(typeof e===\"symbol\"){return e.toString()}return typeof e===\"string\"?JSON.stringify(e):`${e}`}function shiftIterator(e){const{done:t,value:n}=e.next();return t?undefined:n}function toFailure(e,t,n,r){if(e===true){return}else if(e===false){e={}}else if(typeof e===\"string\"){e={message:e}}const{path:i,branch:c}=t;const{type:o}=n;const{refinement:a,message:s=`Expected a value of type \\`${o}\\`${a?` with refinement \\`${a}\\``:\"\"}, but received: \\`${print(r)}\\``}=e;return{value:r,type:o,refinement:a,key:i[i.length-1],path:i,branch:c,...e,message:s}}function*toFailures(e,t,n,r){if(!isIterable(e)){e=[e]}for(const i of e){const e=toFailure(i,t,n,r);if(e){yield e}}}function*run(e,t,n={}){const{path:r=[],branch:i=[e],coerce:c=false,mask:o=false}=n;const a={path:r,branch:i};if(c){e=t.coercer(e,a);if(o&&t.type!==\"type\"&&isObject(t.schema)&&isObject(e)&&!Array.isArray(e)){for(const n in e){if(t.schema[n]===undefined){delete e[n]}}}}let s=\"valid\";for(const r of t.validator(e,a)){r.explanation=n.message;s=\"not_valid\";yield[r,undefined]}for(let[u,f,l]of t.entries(e,a)){const t=run(f,l,{path:u===undefined?r:[...r,u],branch:u===undefined?i:[...i,f],coerce:c,mask:o,message:n.message});for(const n of t){if(n[0]){s=n[0].refinement!=null?\"not_refined\":\"not_valid\";yield[n[0],undefined]}else if(c){f=n[1];if(u===undefined){e=f}else if(e instanceof Map){e.set(u,f)}else if(e instanceof Set){e.add(f)}else if(isObject(e)){if(f!==undefined||u in e)e[u]=f}}}}if(s!==\"not_valid\"){for(const r of t.refiner(e,a)){r.explanation=n.message;s=\"not_refined\";yield[r,undefined]}}if(s===\"valid\"){yield[undefined,e]}}class Struct{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:c=e=>e,entries:o=function*(){}}=e;this.type=t;this.schema=n;this.entries=o;this.coercer=c;if(r){this.validator=(e,t)=>{const n=r(e,t);return toFailures(n,t,this,e)}}else{this.validator=()=>[]}if(i){this.refiner=(e,t)=>{const n=i(e,t);return toFailures(n,t,this,e)}}else{this.refiner=()=>[]}}assert(e,t){return assert(e,this,t)}create(e,t){return create(e,this,t)}is(e){return is(e,this)}mask(e,t){return mask(e,this,t)}validate(e,t={}){return validate(e,this,t)}}function assert(e,t,n){const r=validate(e,t,{message:n});if(r[0]){throw r[0]}}function create(e,t,n){const r=validate(e,t,{coerce:true,message:n});if(r[0]){throw r[0]}else{return r[1]}}function mask(e,t,n){const r=validate(e,t,{coerce:true,mask:true,message:n});if(r[0]){throw r[0]}else{return r[1]}}function is(e,t){const n=validate(e,t);return!n[0]}function validate(e,t,n={}){const r=run(e,t,n);const i=shiftIterator(r);if(i[0]){const e=new StructError(i[0],(function*(){for(const e of r){if(e[0]){yield e[0]}}}));return[e,undefined]}else{const e=i[1];return[undefined,e]}}function assign(...e){const t=e[0].type===\"type\";const n=e.map((e=>e.schema));const r=Object.assign({},...n);return t?type(r):object(r)}function define(e,t){return new Struct({type:e,schema:null,validator:t})}function deprecated(e,t){return new Struct({...e,refiner:(t,n)=>t===undefined||e.refiner(t,n),validator(n,r){if(n===undefined){return true}else{t(n,r);return e.validator(n,r)}}})}function dynamic(e){return new Struct({type:\"dynamic\",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator(t,n){const r=e(t,n);return r.validator(t,n)},coercer(t,n){const r=e(t,n);return r.coercer(t,n)},refiner(t,n){const r=e(t,n);return r.refiner(t,n)}})}function lazy(e){let t;return new Struct({type:\"lazy\",schema:null,*entries(n,r){t??(t=e());yield*t.entries(n,r)},validator(n,r){t??(t=e());return t.validator(n,r)},coercer(n,r){t??(t=e());return t.coercer(n,r)},refiner(n,r){t??(t=e());return t.refiner(n,r)}})}function omit(e,t){const{schema:n}=e;const r={...n};for(const e of t){delete r[e]}switch(e.type){case\"type\":return type(r);default:return object(r)}}function partial(e){const t=e instanceof Struct?{...e.schema}:{...e};for(const e in t){t[e]=optional(t[e])}return object(t)}function pick(e,t){const{schema:n}=e;const r={};for(const e of t){r[e]=n[e]}return object(r)}function struct(e,t){console.warn(\"superstruct@0.11 - The `struct` helper has been renamed to `define`.\");return define(e,t)}function any(){return define(\"any\",(()=>true))}function array(e){return new Struct({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t)){for(const[n,r]of t.entries()){yield[n,r,e]}}},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${print(e)}`}})}function bigint(){return define(\"bigint\",(e=>typeof e===\"bigint\"))}function boolean(){return define(\"boolean\",(e=>typeof e===\"boolean\"))}function date(){return define(\"date\",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \\`Date\\` object, but received: ${print(e)}`))}function enums(e){const t={};const n=e.map((e=>print(e))).join();for(const n of e){t[n]=n}return new Struct({type:\"enums\",schema:t,validator(t){return e.includes(t)||`Expected one of \\`${n}\\`, but received: ${print(t)}`}})}function func(){return define(\"func\",(e=>typeof e===\"function\"||`Expected a function, but received: ${print(e)}`))}function instance(e){return define(\"instance\",(t=>t instanceof e||`Expected a \\`${e.name}\\` instance, but received: ${print(t)}`))}function integer(){return define(\"integer\",(e=>typeof e===\"number\"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${print(e)}`))}function intersection(e){return new Struct({type:\"intersection\",schema:null,*entries(t,n){for(const r of e){yield*r.entries(t,n)}},*validator(t,n){for(const r of e){yield*r.validator(t,n)}},*refiner(t,n){for(const r of e){yield*r.refiner(t,n)}}})}function literal(e){const t=print(e);const n=typeof e;return new Struct({type:\"literal\",schema:n===\"string\"||n===\"number\"||n===\"boolean\"?e:null,validator(n){return n===e||`Expected the literal \\`${t}\\`, but received: ${print(n)}`}})}function map(e,t){return new Struct({type:\"map\",schema:null,*entries(n){if(e&&t&&n instanceof Map){for(const[r,i]of n.entries()){yield[r,r,e];yield[r,i,t]}}},coercer(e){return e instanceof Map?new Map(e):e},validator(e){return e instanceof Map||`Expected a \\`Map\\` object, but received: ${print(e)}`}})}function never(){return define(\"never\",(()=>false))}function nullable(e){return new Struct({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function number(){return define(\"number\",(e=>typeof e===\"number\"&&!isNaN(e)||`Expected a number, but received: ${print(e)}`))}function object(e){const t=e?Object.keys(e):[];const n=never();return new Struct({type:\"object\",schema:e?e:null,*entries(r){if(e&&isObject(r)){const i=new Set(Object.keys(r));for(const n of t){i.delete(n);yield[n,r[n],e[n]]}for(const e of i){yield[e,r[e],n]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`},coercer(e){return isObject(e)?{...e}:e}})}function optional(e){return new Struct({...e,validator:(t,n)=>t===undefined||e.validator(t,n),refiner:(t,n)=>t===undefined||e.refiner(t,n)})}function record(e,t){return new Struct({type:\"record\",schema:null,*entries(n){if(isObject(n)){for(const r in n){const i=n[r];yield[r,r,e];yield[r,i,t]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`}})}function regexp(){return define(\"regexp\",(e=>e instanceof RegExp))}function set(e){return new Struct({type:\"set\",schema:null,*entries(t){if(e&&t instanceof Set){for(const n of t){yield[n,n,e]}}},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \\`Set\\` object, but received: ${print(e)}`}})}function string(){return define(\"string\",(e=>typeof e===\"string\"||`Expected a string, but received: ${print(e)}`))}function tuple(e){const t=never();return new Struct({type:\"tuple\",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++){yield[i,n[i],e[i]||t]}}},validator(e){return Array.isArray(e)||`Expected an array, but received: ${print(e)}`}})}function type(e){const t=Object.keys(e);return new Struct({type:\"type\",schema:e,*entries(n){if(isObject(n)){for(const r of t){yield[r,n[r],e[r]]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`},coercer(e){return isObject(e)?{...e}:e}})}function union(e){const t=e.map((e=>e.type)).join(\" | \");return new Struct({type:\"union\",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:true});if(!e){return r}}return t},validator(n,r){const i=[];for(const t of e){const[...e]=run(n,t,r);const[c]=e;if(!c[0]){return[]}else{for(const[t]of e){if(t){i.push(t)}}}}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${print(n)}`,...i]}})}function unknown(){return define(\"unknown\",(()=>true))}function coerce(e,t,n){return new Struct({...e,coercer:(r,i)=>is(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}function defaulted(e,t,n={}){return coerce(e,unknown(),(e=>{const r=typeof t===\"function\"?t():t;if(e===undefined){return r}if(!n.strict&&isPlainObject(e)&&isPlainObject(r)){const t={...e};let n=false;for(const e in r){if(t[e]===undefined){t[e]=r[e];n=true}}if(n){return t}}return e}))}function trimmed(e){return coerce(e,string(),(e=>e.trim()))}function empty(e){return refine(e,\"empty\",(t=>{const n=getSize(t);return n===0||`Expected an empty ${e.type} but received one with a size of \\`${n}\\``}))}function getSize(e){if(e instanceof Map||e instanceof Set){return e.size}else{return e.length}}function max(e,t,n={}){const{exclusive:r}=n;return refine(e,\"max\",(n=>r?n<t:n<=t||`Expected a ${e.type} less than ${r?\"\":\"or equal to \"}${t} but received \\`${n}\\``))}function min(e,t,n={}){const{exclusive:r}=n;return refine(e,\"min\",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?\"\":\"or equal to \"}${t} but received \\`${n}\\``))}function nonempty(e){return refine(e,\"nonempty\",(t=>{const n=getSize(t);return n>0||`Expected a nonempty ${e.type} but received an empty one`}))}function pattern(e,t){return refine(e,\"pattern\",(n=>t.test(n)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${n}\"`))}function size(e,t,n=t){const r=`Expected a ${e.type}`;const i=t===n?`of \\`${t}\\``:`between \\`${t}\\` and \\`${n}\\``;return refine(e,\"size\",(e=>{if(typeof e===\"number\"||e instanceof Date){return t<=e&&e<=n||`${r} ${i} but received \\`${e}\\``}else if(e instanceof Map||e instanceof Set){const{size:c}=e;return t<=c&&c<=n||`${r} with a size ${i} but received one with a size of \\`${c}\\``}else{const{length:c}=e;return t<=c&&c<=n||`${r} with a length ${i} but received one with a length of \\`${c}\\``}}))}function refine(e,t,n){return new Struct({...e,*refiner(r,i){yield*e.refiner(r,i);const c=n(r,i);const o=toFailures(c,i,e,r);for(const e of o){yield{...e,refinement:t}}}})}e.Struct=Struct;e.StructError=StructError;e.any=any;e.array=array;e.assert=assert;e.assign=assign;e.bigint=bigint;e.boolean=boolean;e.coerce=coerce;e.create=create;e.date=date;e.defaulted=defaulted;e.define=define;e.deprecated=deprecated;e.dynamic=dynamic;e.empty=empty;e.enums=enums;e.func=func;e.instance=instance;e.integer=integer;e.intersection=intersection;e.is=is;e.lazy=lazy;e.literal=literal;e.map=map;e.mask=mask;e.max=max;e.min=min;e.never=never;e.nonempty=nonempty;e.nullable=nullable;e.number=number;e.object=object;e.omit=omit;e.optional=optional;e.partial=partial;e.pattern=pattern;e.pick=pick;e.record=record;e.refine=refine;e.regexp=regexp;e.set=set;e.size=size;e.string=string;e.struct=struct;e.trimmed=trimmed;e.tuple=tuple;e.type=type;e.union=union;e.unknown=unknown;e.validate=validate}))}};if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t={};e[293](0,t);module.exports=t})();","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n        if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n            Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n        }\n    }\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(\n\t\tObject.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t\t__webpack_require__.f[key](chunkId, promises);\n\t\t\treturn promises;\n\t\t}, [])\n\t);\n};","__webpack_require__.hmd = (module) => {\n  module = Object.create(module);\n  if (!module.children) module.children = [];\n  Object.defineProperty(module, 'exports', {\n      enumerable: true,\n      set: () => {\n          throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n      }\n  });\n  return module;\n};","// This function allow to reference chunks\n__webpack_require__.u = (chunkId) => {\n  // return url for filenames not based on template\n  \n  // return url for filenames based on template\n  return \"\" + chunkId + \".runtime.dev.js\"\n}","__webpack_require__.h = () => (\"9477a4ffd542ff70\")","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n  module.paths = [];\n  if (!module.children) module.children = [];\n  return module;\n};","/**\n * Compile-time switcher for stream operations.\n *\n * When __NEXT_USE_NODE_STREAMS is true, uses Node.js pipeable stream APIs.\n * Otherwise, uses web ReadableStream APIs.\n *\n * Both modules export AnyStream = AnyStreamType so their type surfaces are\n * structurally identical — no `as unknown as` cast is needed.\n */\nexport type {\n  AnyStream,\n  ContinueFizzStreamOptions,\n  ContinueStaticPrerenderOptions,\n  ContinueStreamSharedOptions,\n  ContinueDynamicHTMLResumeOptions,\n  FlightComponentMod,\n  ServerPrerenderComponentMod,\n  FlightPayload,\n  FlightClientModules,\n  FlightRenderOptions,\n  FizzStreamResult,\n} from './stream-ops.web'\n\ntype WebMod = typeof import('./stream-ops.web')\n\nlet _m: WebMod\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n  _m = require('./stream-ops.node') as typeof import('./stream-ops.node')\n} else {\n  _m = require('./stream-ops.web') as typeof import('./stream-ops.web')\n}\n\nexport const continueFizzStream = _m.continueFizzStream\nexport const continueStaticPrerender = _m.continueStaticPrerender\nexport const continueDynamicPrerender = _m.continueDynamicPrerender\nexport const continueStaticFallbackPrerender =\n  _m.continueStaticFallbackPrerender\nexport const continueDynamicHTMLResumeNode = _m.continueDynamicHTMLResumeNode\nexport const continueDynamicHTMLResumeWeb = _m.continueDynamicHTMLResumeWeb\nexport const streamToBuffer = _m.streamToBuffer\nexport const chainStreams = _m.chainStreams\nexport const createDocumentClosingStream = _m.createDocumentClosingStream\nexport const processPrelude = _m.processPrelude\nexport const createWebInlinedDataStream = _m.createWebInlinedDataStream\nexport const createNodeInlinedDataStream = _m.createNodeInlinedDataStream\nexport const createPendingStream = _m.createPendingStream\nexport const createOnHeadersCallback = _m.createOnHeadersCallback\nexport const resumeAndAbort = _m.resumeAndAbort\nexport const renderToWebFlightStream = _m.renderToWebFlightStream\nexport const renderToNodeFlightStream = _m.renderToNodeFlightStream\nexport const streamToString = _m.streamToString\nexport const renderToWebFizzStream = _m.renderToWebFizzStream\nexport const renderToNodeFizzStream = _m.renderToNodeFizzStream\nexport const resumeToFizzStream = _m.resumeToFizzStream\nexport const getServerPrerender = _m.getServerPrerender\nexport const getClientPrerender = _m.getClientPrerender\nexport const pipeRuntimePrefetchTransform = _m.pipeRuntimePrefetchTransform\nexport const teeStream = _m.teeStream\n","import type {\n  AttributeValue,\n  Span,\n  SpanOptions,\n} from 'next/dist/compiled/@opentelemetry/api'\nimport type { AsyncLocalStorage } from 'async_hooks'\nimport { SpanStatusCode } from 'next/dist/compiled/@opentelemetry/api'\nimport {\n  isLocalSpanRecordingEnabled,\n  isRequestInsightsEnabled,\n  recordSpan,\n  type SpanStoreAttributes,\n  type SpanStoreEvent,\n  type SpanStoreLink,\n} from './span-store'\nimport type { RequestInsightKind } from '../../../next-devtools/shared/request-insights'\n\nexport { isLocalSpanRecordingEnabled } from './span-store'\n\nconst TRACE_ID_HEX_LENGTH = 32\nconst SPAN_ID_HEX_LENGTH = 16\n\ntype LocalSpanAttributes = Partial<Record<string, AttributeValue | undefined>>\n\ntype LocalSpanOptions = {\n  name: string\n  attributes?: LocalSpanAttributes\n  links?: SpanOptions['links']\n  startTime?: SpanOptions['startTime']\n  traceId?: string\n  spanId?: string\n  parentSpanId?: string\n  delegateSpan?: Span\n  isolateOpenTelemetry?: boolean\n}\n\ntype TraceLocalSpanOptions = Omit<\n  LocalSpanOptions,\n  | 'traceId'\n  | 'spanId'\n  | 'parentSpanId'\n  | 'delegateSpan'\n  | 'isolateOpenTelemetry'\n> & {\n  parentSpan?: Span | null\n}\n\nlet lastLocalTraceId = 0\nlet lastLocalSpanId = 0\nlet localSpanAsyncStorage: AsyncLocalStorage<Span> | undefined\n\nconst getLocalTraceId = () =>\n  (++lastLocalTraceId).toString(16).padStart(TRACE_ID_HEX_LENGTH, '0')\n\nconst getLocalSpanId = () =>\n  (++lastLocalSpanId).toString(16).padStart(SPAN_ID_HEX_LENGTH, '0')\n\nexport function createLocalSpan({\n  name,\n  attributes,\n  links,\n  startTime,\n  traceId,\n  spanId,\n  parentSpanId,\n  delegateSpan,\n  isolateOpenTelemetry,\n}: LocalSpanOptions): Span {\n  return new LocalRecordingSpan({\n    name,\n    attributes,\n    links,\n    startTime,\n    delegateSpan,\n    traceId: traceId ?? getLocalTraceId(),\n    spanId: spanId ?? getLocalSpanId(),\n    parentSpanId,\n    requestIdentity: getCurrentRequestIdentity(),\n    isolateOpenTelemetry: isolateOpenTelemetry ?? false,\n  })\n}\n\nexport function getActiveLocalSpan(): Span | undefined {\n  return localSpanAsyncStorage?.getStore()\n}\n\nexport function isLocalRecordingSpan(span: Span): boolean {\n  return span instanceof LocalRecordingSpan\n}\n\nexport function isOpenTelemetryIsolatedSpan(span: Span): boolean {\n  return span instanceof LocalRecordingSpan && span.isOpenTelemetryIsolated()\n}\n\nexport function withLocalSpan<T>(span: Span, fn: () => T): T {\n  return getLocalSpanAsyncStorage().run(span, fn)\n}\n\n/**\n * Records an async operation without replacing or exporting through the active\n * OpenTelemetry context. Nested Next.js spans remain in the local trace.\n */\nexport async function traceLocalSpan<T>(\n  { parentSpan, ...options }: TraceLocalSpanOptions,\n  fn: () => Promise<T>\n): Promise<T> {\n  const resolvedParentSpan =\n    parentSpan === undefined ? getActiveLocalSpan() : parentSpan\n  const parentSpanContext = resolvedParentSpan?.spanContext()\n  const span = createLocalSpan({\n    ...options,\n    traceId: parentSpanContext?.traceId,\n    parentSpanId: parentSpanContext?.spanId,\n    isolateOpenTelemetry: true,\n  })\n\n  return withLocalSpan(span, async () => {\n    try {\n      return await fn()\n    } catch (err) {\n      span.recordException(err as Error)\n      span.setStatus({ code: SpanStatusCode.ERROR })\n      throw err\n    } finally {\n      span.end()\n    }\n  })\n}\n\nexport type LocalSpanRecorder = {\n  createLocalSpan: typeof createLocalSpan\n  getActiveLocalSpan: typeof getActiveLocalSpan\n  isLocalRecordingSpan: typeof isLocalRecordingSpan\n  isOpenTelemetryIsolatedSpan: typeof isOpenTelemetryIsolatedSpan\n  isLocalSpanRecordingEnabled: typeof isLocalSpanRecordingEnabled\n  isRequestInsightsEnabled: typeof isRequestInsightsEnabled\n  traceLocalSpan: typeof traceLocalSpan\n  withLocalSpan: typeof withLocalSpan\n}\n\nexport function registerLocalSpanRecorder(): void {\n  const key = Symbol.for('@next/local-span-recorder')\n  ;(\n    globalThis as typeof globalThis & {\n      [key]?: LocalSpanRecorder\n    }\n  )[key] = {\n    createLocalSpan,\n    getActiveLocalSpan,\n    isLocalRecordingSpan,\n    isOpenTelemetryIsolatedSpan,\n    isLocalSpanRecordingEnabled,\n    isRequestInsightsEnabled,\n    traceLocalSpan,\n    withLocalSpan,\n  }\n}\n\nfunction getLocalSpanAsyncStorage(): AsyncLocalStorage<Span> {\n  if (!localSpanAsyncStorage) {\n    const { createAsyncLocalStorage } =\n      require('../../app-render/async-local-storage') as typeof import('../../app-render/async-local-storage')\n    localSpanAsyncStorage = createAsyncLocalStorage()\n  }\n\n  return localSpanAsyncStorage\n}\n\ntype RequestIdentity = {\n  requestId?: string\n  requestInsightKind?: RequestInsightKind\n  htmlRequestId?: string\n  route?: string\n  url?: string\n}\n\nclass LocalRecordingSpan implements Span {\n  public name: string\n\n  private attributes: SpanStoreAttributes\n  private events: SpanStoreEvent[]\n  private readonly spanContextValue: ReturnType<Span['spanContext']>\n  private readonly openTelemetryIsolated: boolean\n  private delegateSpan?: Span\n  private links?: SpanStoreLink[]\n  private readonly parentSpanId?: string\n  private requestIdentity: RequestIdentity\n  private readonly startTime: number\n  private statusCode: number | undefined\n  private statusMessage: string | undefined\n  private exception:\n    | {\n        type?: string\n        message?: string\n      }\n    | undefined\n  private ended: boolean\n\n  constructor({\n    name,\n    attributes,\n    links,\n    startTime,\n    delegateSpan,\n    traceId,\n    spanId,\n    parentSpanId,\n    requestIdentity,\n    isolateOpenTelemetry,\n  }: {\n    name: string\n    attributes?: LocalSpanAttributes\n    links?: SpanOptions['links']\n    startTime?: SpanOptions['startTime']\n    delegateSpan?: Span\n    traceId: string\n    spanId: string\n    parentSpanId?: string\n    requestIdentity: RequestIdentity\n    isolateOpenTelemetry: boolean\n  }) {\n    this.name = name\n    this.attributes = cleanSpanStoreAttributes(attributes)\n    this.events = []\n    this.delegateSpan = delegateSpan\n    this.openTelemetryIsolated = isolateOpenTelemetry\n    this.spanContextValue = delegateSpan?.spanContext() ?? {\n      traceId,\n      spanId,\n      traceFlags: 0,\n    }\n    this.links = getSpanStoreLinks(links)\n    this.parentSpanId = parentSpanId\n    this.requestIdentity = requestIdentity\n    this.startTime = getTimestamp(startTime)\n    this.statusCode = undefined\n    this.statusMessage = undefined\n    this.exception = undefined\n    this.ended = false\n  }\n\n  spanContext(): ReturnType<Span['spanContext']> {\n    return this.spanContextValue\n  }\n\n  isOpenTelemetryIsolated(): boolean {\n    return this.openTelemetryIsolated\n  }\n\n  setAttribute(key: string, value: AttributeValue): this {\n    if (this.ended) {\n      return this\n    }\n\n    this.attributes[key] = value\n    this.delegateSpan?.setAttribute(key, value)\n    return this\n  }\n\n  setAttributes(attributes: Parameters<Span['setAttributes']>[0]): this {\n    if (this.ended) {\n      return this\n    }\n\n    // OpenTelemetry attributes may be undefined. Ignore them instead of\n    // overwriting an existing value as Object.assign would.\n    for (const key of Object.keys(attributes)) {\n      const value = attributes[key]\n      if (value !== undefined) {\n        this.attributes[key] = value\n      }\n    }\n    this.delegateSpan?.setAttributes(attributes)\n    return this\n  }\n\n  addEvent(\n    name: string,\n    attributesOrStartTime?: Parameters<Span['addEvent']>[1],\n    startTime?: Parameters<Span['addEvent']>[2]\n  ): this {\n    if (this.ended) {\n      return this\n    }\n\n    const eventTime =\n      startTime === undefined && isTimestampInput(attributesOrStartTime)\n        ? attributesOrStartTime\n        : startTime\n    this.events.push({\n      name,\n      timestamp: getTimestamp(eventTime),\n      attributes: isSpanStoreAttributes(attributesOrStartTime)\n        ? cleanSpanStoreAttributes(attributesOrStartTime)\n        : undefined,\n    })\n    this.delegateSpan?.addEvent(name, attributesOrStartTime, startTime)\n    return this\n  }\n\n  setStatus(status: Parameters<Span['setStatus']>[0]): this {\n    if (this.ended) {\n      return this\n    }\n\n    this.statusCode = status.code\n    this.statusMessage = status.message\n    this.delegateSpan?.setStatus(status)\n    return this\n  }\n\n  updateName(name: string): this {\n    if (this.ended) {\n      return this\n    }\n\n    this.name = name\n    this.delegateSpan?.updateName(name)\n    return this\n  }\n\n  end(endTime?: Parameters<Span['end']>[0]): void {\n    if (this.ended) {\n      return\n    }\n\n    this.ended = true\n    try {\n      this.delegateSpan?.end(endTime)\n    } finally {\n      try {\n        this.record(endTime)\n      } finally {\n        this.releaseReferences()\n      }\n    }\n  }\n\n  isRecording(): boolean {\n    return !this.ended\n  }\n\n  recordException(\n    exception: Parameters<Span['recordException']>[0],\n    time?: Parameters<Span['recordException']>[1]\n  ): void {\n    if (this.ended) {\n      return\n    }\n\n    this.exception = getSpanStoreException(exception)\n    this.events.push({\n      name: 'exception',\n      timestamp: getTimestamp(time),\n      attributes: getSpanStoreExceptionAttributes(this.exception),\n    })\n    this.delegateSpan?.recordException(exception, time)\n  }\n\n  private record(endTime: Parameters<Span['end']>[0]): void {\n    const recordAttributes =\n      Object.keys(this.attributes).length > 0 ? this.attributes : undefined\n\n    recordSpan({\n      name: this.name,\n      startTime: this.startTime,\n      durationMs: Math.max(0, getTimestamp(endTime) - this.startTime),\n      status: this.statusCode === SpanStatusCode.ERROR ? 'error' : 'ok',\n      traceId: this.spanContextValue.traceId,\n      spanId: this.spanContextValue.spanId,\n      parentSpanId: this.parentSpanId,\n      requestId: this.requestIdentity.requestId,\n      requestInsightKind: this.requestIdentity.requestInsightKind,\n      htmlRequestId: this.requestIdentity.htmlRequestId,\n      route:\n        getStringAttribute(recordAttributes, 'next.route') ??\n        getStringAttribute(recordAttributes, 'http.route') ??\n        this.requestIdentity.route,\n      url:\n        getStringAttribute(recordAttributes, 'http.url') ??\n        this.requestIdentity.url,\n      attributes: recordAttributes,\n      links: this.links,\n      events: this.events.length > 0 ? this.events : undefined,\n      error: this.getRecordError(),\n    })\n  }\n\n  private releaseReferences(): void {\n    // AsyncLocalStorage can keep an ended span reachable when work spawned\n    // inside the span outlives it. Keep only the immutable span context and\n    // primitive timing/identity fields needed by the Span API after end.\n    this.name = ''\n    this.attributes = {}\n    this.events = []\n    this.delegateSpan = undefined\n    this.links = undefined\n    this.requestIdentity = {}\n    this.statusMessage = undefined\n    this.exception = undefined\n  }\n\n  private getRecordError():\n    | {\n        type?: string\n        message?: string\n      }\n    | undefined {\n    if (this.exception) {\n      return this.exception\n    }\n\n    if (this.statusCode === SpanStatusCode.ERROR && this.statusMessage) {\n      return {\n        message: this.statusMessage,\n      }\n    }\n\n    return undefined\n  }\n}\n\nfunction getSpanStoreLinks(\n  links: SpanOptions['links'] | undefined\n): SpanStoreLink[] | undefined {\n  const spanStoreLinks = links?.map((link) => ({\n    traceId: link.context.traceId,\n    spanId: link.context.spanId,\n    attributes: cleanSpanStoreAttributes(link.attributes),\n  }))\n\n  return spanStoreLinks?.length ? spanStoreLinks : undefined\n}\n\nfunction cleanSpanStoreAttributes(\n  attributes:\n    | Record<string, AttributeValue | undefined>\n    | SpanStoreAttributes\n    | undefined\n): SpanStoreAttributes {\n  const cleanedAttributes: SpanStoreAttributes = {}\n  if (attributes) {\n    for (const key of Object.keys(attributes)) {\n      const value = attributes[key]\n      if (value !== undefined) {\n        cleanedAttributes[key] = value\n      }\n    }\n  }\n  return cleanedAttributes\n}\n\nfunction getTimestamp(time?: SpanOptions['startTime']): number {\n  if (time instanceof Date) {\n    return time.getTime()\n  }\n\n  if (Array.isArray(time)) {\n    return time[0] * 1000 + time[1] / 1_000_000\n  }\n\n  if (typeof time === 'number') {\n    return time < performance.timeOrigin / 2\n      ? performance.timeOrigin + time\n      : time\n  }\n\n  return performance.timeOrigin + performance.now()\n}\n\nfunction getStringAttribute(\n  attributes: SpanStoreAttributes | undefined,\n  key: string\n): string | undefined {\n  const value = attributes?.[key]\n  return typeof value === 'string' ? value : undefined\n}\n\nfunction isSpanStoreAttributes(\n  value: Parameters<Span['addEvent']>[1]\n): value is SpanStoreAttributes {\n  return (\n    typeof value === 'object' &&\n    value !== null &&\n    !Array.isArray(value) &&\n    !(value instanceof Date)\n  )\n}\n\nfunction isTimestampInput(\n  value: Parameters<Span['addEvent']>[1]\n): value is SpanOptions['startTime'] {\n  return (\n    typeof value === 'number' || Array.isArray(value) || value instanceof Date\n  )\n}\n\nfunction getSpanStoreException(\n  exception: Parameters<Span['recordException']>[0]\n):\n  | {\n      type?: string\n      message?: string\n    }\n  | undefined {\n  if (exception instanceof Error) {\n    return {\n      type: exception.name,\n      message: exception.message,\n    }\n  }\n\n  if (typeof exception === 'string') {\n    return {\n      message: exception,\n    }\n  }\n\n  if (exception && typeof exception === 'object') {\n    return {\n      type: exception.constructor?.name,\n      message: 'message' in exception ? String(exception.message) : undefined,\n    }\n  }\n\n  return undefined\n}\n\nfunction getSpanStoreExceptionAttributes(\n  exception:\n    | {\n        type?: string\n        message?: string\n      }\n    | undefined\n): SpanStoreAttributes | undefined {\n  if (!exception) {\n    return undefined\n  }\n\n  const attributes: SpanStoreAttributes = {}\n  if (exception.type !== undefined) {\n    attributes['exception.type'] = exception.type\n  }\n  if (exception.message !== undefined) {\n    attributes['exception.message'] = exception.message\n  }\n  return Object.keys(attributes).length > 0 ? attributes : undefined\n}\n\nfunction getCurrentRequestIdentity(): RequestIdentity {\n  try {\n    const { getRequestInsightsIdentity } =\n      require('./request-insights-identity') as typeof import('./request-insights-identity')\n    const { workAsyncStorage } =\n      require('../../app-render/work-async-storage.external') as typeof import('../../app-render/work-async-storage.external')\n    const { workUnitAsyncStorage } =\n      require('../../app-render/work-unit-async-storage.external') as typeof import('../../app-render/work-unit-async-storage.external')\n    const workStore = workAsyncStorage.getStore()\n    const workUnitStore = workUnitAsyncStorage.getStore()\n    const requestInsightsIdentity = getRequestInsightsIdentity()\n    const url =\n      workUnitStore && 'url' in workUnitStore ? workUnitStore.url : undefined\n\n    return {\n      requestId: requestInsightsIdentity?.requestId ?? workStore?.requestId,\n      requestInsightKind: requestInsightsIdentity?.kind,\n      htmlRequestId:\n        requestInsightsIdentity?.htmlRequestId ?? workStore?.htmlRequestId,\n      route: workStore?.route,\n      url: url ? `${url.pathname}${url.search}` : requestInsightsIdentity?.url,\n    }\n  } catch {\n    return {}\n  }\n}\n","import React, {\n  useEffect,\n  useMemo,\n  startTransition,\n  useInsertionEffect,\n  useDeferredValue,\n} from 'react'\nimport {\n  AppRouterContext,\n  LayoutRouterContext,\n  GlobalLayoutRouterContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport type { CacheNode } from '../../shared/lib/app-router-types'\nimport { ACTION_RESTORE } from './router-reducer/router-reducer-types'\nimport type {\n  AppHistoryState,\n  AppRouterState,\n} from './router-reducer/router-reducer-types'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\nimport {\n  SearchParamsContext,\n  PathnameContext,\n  PathParamsContext,\n  NavigationPromisesContext,\n  type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { dispatchAppRouterAction, useActionQueue } from './use-action-queue'\nimport { setLastCommittedTree } from './router-reducer/reducers/committed-state'\nimport { AppRouterAnnouncer } from './app-router-announcer'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { findHeadInCache } from './router-reducer/reducers/find-head-in-cache'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { removeBasePath } from '../remove-base-path'\nimport { hasBasePath } from '../has-base-path'\nimport {\n  extractSourcePageFromFlightRouterState,\n  getSelectedParams,\n} from './router-reducer/compute-changed-path'\nimport { useNavFailureHandler } from './nav-failure-handler'\nimport {\n  dispatchTraverseAction,\n  publicAppRouterInstance,\n  type AppRouterActionQueue,\n  type GlobalErrorState,\n} from './app-router-instance'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { isRedirectError } from './redirect-error'\nimport { pingVisibleLinks } from './links'\nimport RootErrorBoundary from './errors/root-error-boundary'\nimport DefaultGlobalError from './builtin/global-error'\nimport { RootLayoutBoundary } from '../../lib/framework/boundary-components'\nimport type { StaticIndicatorState } from '../dev/hot-reloader/app/hot-reloader-app'\nimport { getAssetTokenQuery } from '../../shared/lib/deployment-id'\n\nconst globalMutable: {\n  pendingMpaPath?: string\n} = {}\n\nfunction HistoryUpdater({\n  appRouterState,\n}: {\n  appRouterState: AppRouterState\n}) {\n  useInsertionEffect(() => {\n    if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n      // clear pending URL as navigation is no longer\n      // in flight\n      window.next.__pendingUrl = undefined\n    }\n\n    const { tree, pushRef, canonicalUrl, renderedSearch } = appRouterState\n\n    const appHistoryState: AppHistoryState = {\n      tree,\n      renderedSearch,\n    }\n\n    // TODO: Use Navigation API if available\n    const historyState = {\n      ...(pushRef.preserveCustomHistoryState ? window.history.state : {}),\n      // Identifier is shortened intentionally.\n      // __NA is used to identify if the history entry can be handled by the app-router.\n      // __N is used to identify if the history entry can be handled by the old router.\n      __NA: true,\n      __PRIVATE_NEXTJS_INTERNALS_TREE: appHistoryState,\n    }\n    if (\n      pushRef.pendingPush &&\n      // Skip pushing an additional history entry if the canonicalUrl is the same as the current url.\n      // This mirrors the browser behavior for normal navigation.\n      createHrefFromUrl(new URL(window.location.href)) !== canonicalUrl\n    ) {\n      // This intentionally mutates React state, pushRef is overwritten to ensure additional push/replace calls do not trigger an additional history entry.\n      pushRef.pendingPush = false\n      window.history.pushState(historyState, '', canonicalUrl)\n    } else {\n      window.history.replaceState(historyState, '', canonicalUrl)\n    }\n\n    setLastCommittedTree(tree)\n  }, [appRouterState])\n\n  useEffect(() => {\n    // The Next-Url and the base tree may affect the result of a prefetch\n    // task. Re-prefetch all visible links with the updated values. In most\n    // cases, this will not result in any new network requests, only if\n    // the prefetch result actually varies on one of these inputs.\n    pingVisibleLinks(appRouterState.nextUrl, appRouterState.tree)\n  }, [appRouterState.nextUrl, appRouterState.tree])\n\n  return null\n}\n\nfunction copyNextJsInternalHistoryState(data: any) {\n  if (data == null) data = {}\n  const currentState = window.history.state\n  const __NA = currentState?.__NA\n  if (__NA) {\n    data.__NA = __NA\n  }\n  const __PRIVATE_NEXTJS_INTERNALS_TREE =\n    currentState?.__PRIVATE_NEXTJS_INTERNALS_TREE\n  if (__PRIVATE_NEXTJS_INTERNALS_TREE) {\n    data.__PRIVATE_NEXTJS_INTERNALS_TREE = __PRIVATE_NEXTJS_INTERNALS_TREE\n  }\n\n  return data\n}\n\nfunction Head({\n  headCacheNode,\n}: {\n  headCacheNode: CacheNode | null\n}): React.ReactNode {\n  // If this segment has a `prefetchHead`, it's the statically prefetched data.\n  // We should use that on initial render instead of `head`. Then we'll switch\n  // to `head` when the dynamic response streams in.\n  const head = headCacheNode !== null ? headCacheNode.head : null\n  const prefetchHead =\n    headCacheNode !== null ? headCacheNode.prefetchHead : null\n\n  // If no prefetch data is available, then we go straight to rendering `head`.\n  const resolvedPrefetchRsc = prefetchHead !== null ? prefetchHead : head\n\n  // We use `useDeferredValue` to handle switching between the prefetched and\n  // final values. The second argument is returned on initial render, then it\n  // re-renders with the first argument.\n  return useDeferredValue(head, resolvedPrefetchRsc)\n}\n\n/**\n * The global router that wraps the application components.\n */\nfunction Router({\n  actionQueue,\n  globalError,\n  webSocket,\n  staticIndicatorState,\n}: {\n  actionQueue: AppRouterActionQueue\n  globalError: GlobalErrorState\n  webSocket: WebSocket | undefined\n  staticIndicatorState: StaticIndicatorState | undefined\n}) {\n  const state = useActionQueue(actionQueue)\n  const { canonicalUrl } = state\n  // Add memoized pathname/query for useSearchParams and usePathname.\n  const { searchParams, pathname } = useMemo(() => {\n    const url = new URL(\n      canonicalUrl,\n      typeof window === 'undefined' ? 'http://n' : window.location.href\n    )\n\n    return {\n      // This is turned into a readonly class in `useSearchParams`\n      searchParams: url.searchParams,\n      pathname: hasBasePath(url.pathname)\n        ? removeBasePath(url.pathname)\n        : url.pathname,\n    }\n  }, [canonicalUrl])\n\n  if (process.env.NODE_ENV !== 'production') {\n    const { cache, tree } = state\n\n    // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      // Add `window.nd` for debugging purposes.\n      // This is not meant for use in applications as concurrent rendering will affect the cache/tree/router.\n      // @ts-ignore this is for debugging\n      window.nd = {\n        router: publicAppRouterInstance,\n        cache,\n        tree,\n      }\n    }, [cache, tree])\n  }\n\n  useEffect(() => {\n    const sourcePage = extractSourcePageFromFlightRouterState(state.tree)\n\n    if (sourcePage !== undefined) {\n      window.next.__internal_src_page = sourcePage\n    } else {\n      delete window.next.__internal_src_page\n    }\n  }, [state.tree])\n\n  useEffect(() => {\n    // If the app is restored from bfcache, it's possible that\n    // pushRef.mpaNavigation is true, which would mean that any re-render of this component\n    // would trigger the mpa navigation logic again from the lines below.\n    // This will restore the router to the initial state in the event that the app is restored from bfcache.\n    function handlePageShow(event: PageTransitionEvent) {\n      if (\n        !event.persisted ||\n        !window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE\n      ) {\n        return\n      }\n\n      // Clear the pendingMpaPath value so that a subsequent MPA navigation to the same URL can be triggered.\n      // This is necessary because if the browser restored from bfcache, the pendingMpaPath would still be set to the value\n      // of the last MPA navigation.\n      globalMutable.pendingMpaPath = undefined\n\n      dispatchAppRouterAction({\n        type: ACTION_RESTORE,\n        url: new URL(window.location.href),\n        historyState: window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE,\n      })\n    }\n\n    window.addEventListener('pageshow', handlePageShow)\n\n    return () => {\n      window.removeEventListener('pageshow', handlePageShow)\n    }\n  }, [])\n\n  useEffect(() => {\n    // Ensure that any redirect errors that bubble up outside of the RedirectBoundary\n    // are caught and handled by the router.\n    function handleUnhandledRedirect(\n      event: ErrorEvent | PromiseRejectionEvent\n    ) {\n      const error = 'reason' in event ? event.reason : event.error\n      if (isRedirectError(error)) {\n        event.preventDefault()\n        const url = getURLFromRedirectError(error)\n        const redirectType = getRedirectTypeFromError(error)\n        // TODO: This should access the router methods directly, rather than\n        // go through the public interface.\n        if (redirectType === 'push') {\n          publicAppRouterInstance.push(url, {})\n        } else {\n          publicAppRouterInstance.replace(url, {})\n        }\n      }\n    }\n    window.addEventListener('error', handleUnhandledRedirect)\n    window.addEventListener('unhandledrejection', handleUnhandledRedirect)\n\n    return () => {\n      window.removeEventListener('error', handleUnhandledRedirect)\n      window.removeEventListener('unhandledrejection', handleUnhandledRedirect)\n    }\n  }, [])\n\n  // When mpaNavigation flag is set do a hard navigation to the new url.\n  // Infinitely suspend because we don't actually want to rerender any child\n  // components with the new URL and any entangled state updates shouldn't\n  // commit either (eg: useTransition isPending should stay true until the page\n  // unloads).\n  //\n  // This is a side effect in render. Don't try this at home, kids. It's\n  // probably safe because we know this is a singleton component and it's never\n  // in <Offscreen>. At least I hope so. (It will run twice in dev strict mode,\n  // but that's... fine?)\n  const { pushRef } = state\n  if (pushRef.mpaNavigation) {\n    // if there's a re-render, we don't want to trigger another redirect if one is already in flight to the same URL\n    if (globalMutable.pendingMpaPath !== canonicalUrl) {\n      const location = window.location\n      if (pushRef.pendingPush) {\n        location.assign(canonicalUrl)\n      } else {\n        location.replace(canonicalUrl)\n      }\n\n      globalMutable.pendingMpaPath = canonicalUrl\n    }\n    // TODO-APP: Should we listen to navigateerror here to catch failed\n    // navigations somehow? And should we call window.stop() if a SPA navigation\n    // should interrupt an MPA one?\n    // NOTE: This is intentionally using `throw` instead of `use` because we're\n    // inside an externally mutable condition (pushRef.mpaNavigation), which\n    // violates the rules of hooks.\n    throw unresolvedThenable\n  }\n\n  useEffect(() => {\n    const originalPushState = window.history.pushState.bind(window.history)\n    const originalReplaceState = window.history.replaceState.bind(\n      window.history\n    )\n\n    // Ensure the canonical URL in the Next.js Router is updated when the URL is changed so that `usePathname` and `useSearchParams` hold the pushed values.\n    const applyUrlFromHistoryPushReplace = (\n      url: string | URL | null | undefined\n    ) => {\n      const href = window.location.href\n      const appHistoryState: AppHistoryState | undefined =\n        window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE\n\n      startTransition(() => {\n        dispatchAppRouterAction({\n          type: ACTION_RESTORE,\n          url: new URL(url ?? href, href),\n          historyState: appHistoryState,\n        })\n      })\n    }\n\n    /**\n     * Patch pushState to ensure external changes to the history are reflected in the Next.js Router.\n     * Ensures Next.js internal history state is copied to the new history entry.\n     * Ensures usePathname and useSearchParams hold the newly provided url.\n     */\n    window.history.pushState = function pushState(\n      data: any,\n      _unused: string,\n      url?: string | URL | null\n    ): void {\n      // TODO: Warn when Navigation API is available (navigation.navigate() should be used)\n      // Avoid a loop when Next.js internals trigger pushState/replaceState\n      if (data?.__NA || data?._N) {\n        return originalPushState(data, _unused, url)\n      }\n\n      data = copyNextJsInternalHistoryState(data)\n\n      if (url) {\n        applyUrlFromHistoryPushReplace(url)\n      }\n\n      return originalPushState(data, _unused, url)\n    }\n\n    /**\n     * Patch replaceState to ensure external changes to the history are reflected in the Next.js Router.\n     * Ensures Next.js internal history state is copied to the new history entry.\n     * Ensures usePathname and useSearchParams hold the newly provided url.\n     */\n    window.history.replaceState = function replaceState(\n      data: any,\n      _unused: string,\n      url?: string | URL | null\n    ): void {\n      // TODO: Warn when Navigation API is available (navigation.navigate() should be used)\n      // Avoid a loop when Next.js internals trigger pushState/replaceState\n      if (data?.__NA || data?._N) {\n        return originalReplaceState(data, _unused, url)\n      }\n      data = copyNextJsInternalHistoryState(data)\n\n      if (url) {\n        applyUrlFromHistoryPushReplace(url)\n      }\n      return originalReplaceState(data, _unused, url)\n    }\n\n    /**\n     * Handle popstate event, this is used to handle back/forward in the browser.\n     * By default dispatches ACTION_RESTORE, however if the history entry was not pushed/replaced by app-router it will reload the page.\n     * That case can happen when the old router injected the history entry.\n     */\n    const onPopState = (event: PopStateEvent) => {\n      if (!event.state) {\n        // TODO-APP: this case only happens when pushState/replaceState was called outside of Next.js. It should probably reload the page in this case.\n        return\n      }\n\n      // This case happens when the history entry was pushed by the `pages` router.\n      if (!event.state.__NA) {\n        window.location.reload()\n        return\n      }\n\n      // TODO-APP: Ideally the back button should not use startTransition as it should apply the updates synchronously\n      // Without startTransition works if the cache is there for this path\n      startTransition(() => {\n        dispatchTraverseAction(\n          window.location.href,\n          event.state.__PRIVATE_NEXTJS_INTERNALS_TREE\n        )\n      })\n    }\n\n    // Register popstate event to call onPopstate.\n    window.addEventListener('popstate', onPopState)\n    return () => {\n      window.history.pushState = originalPushState\n      window.history.replaceState = originalReplaceState\n      window.removeEventListener('popstate', onPopState)\n    }\n  }, [])\n\n  const { cache, tree, nextUrl, focusAndScrollRef, previousNextUrl } = state\n\n  const matchingHead = useMemo(() => {\n    return findHeadInCache(cache, tree[1])\n  }, [cache, tree])\n\n  // Add memoized pathParams for useParams.\n  const pathParams = useMemo(() => {\n    return getSelectedParams(tree)\n  }, [tree])\n\n  // Create instrumented promises for navigation hooks (dev-only)\n  // These are specially instrumented promises to show in the Suspense DevTools\n  // Promises are cached outside of render to survive suspense retries.\n  let instrumentedNavigationPromises: NavigationPromises | null = null\n  if (process.env.NODE_ENV !== 'production') {\n    const { createRootNavigationPromises } =\n      require('./navigation-devtools') as typeof import('./navigation-devtools')\n\n    instrumentedNavigationPromises = createRootNavigationPromises(\n      tree,\n      pathname,\n      searchParams,\n      pathParams\n    )\n  }\n\n  const layoutRouterContext = useMemo(() => {\n    return {\n      parentTree: tree,\n      parentCacheNode: cache,\n      parentSegmentPath: null,\n      parentParams: {},\n      parentLoadingData: null,\n      // This is the <Activity> \"name\" that shows up in the Suspense DevTools.\n      // It represents the root of the app.\n      debugNameContext: '/',\n      // Root node always has `url`\n      // Provided in AppTreeContext to ensure it can be overwritten in layout-router\n      url: canonicalUrl,\n      // Root segment is always active\n      isActive: true,\n    }\n  }, [tree, cache, canonicalUrl])\n\n  const globalLayoutRouterContext = useMemo(() => {\n    return {\n      tree,\n      focusAndScrollRef,\n      nextUrl,\n      previousNextUrl,\n    }\n  }, [tree, focusAndScrollRef, nextUrl, previousNextUrl])\n\n  let head\n  if (matchingHead !== null) {\n    // The head is wrapped in an extra component so we can use\n    // `useDeferredValue` to swap between the prefetched and final versions of\n    // the head. (This is what LayoutRouter does for segment data, too.)\n    //\n    // The `key` is used to remount the component whenever the head moves to\n    // a different segment.\n    const [headCacheNode, headKey, headKeyWithoutSearchParams] = matchingHead\n\n    head = (\n      <Head\n        key={\n          // Necessary for PPR: omit search params from the key to match prerendered keys\n          typeof window === 'undefined' ? headKeyWithoutSearchParams : headKey\n        }\n        headCacheNode={headCacheNode}\n      />\n    )\n  } else {\n    head = null\n  }\n\n  let content = (\n    <RedirectBoundary>\n      {head}\n      {/* RootLayoutBoundary enables detection of Suspense boundaries around the root layout.\n          When users wrap their layout in <Suspense>, this creates the component stack pattern\n          \"Suspense -> RootLayoutBoundary\" which dynamic-rendering.ts uses to allow dynamic rendering. */}\n      <RootLayoutBoundary>{cache.rsc}</RootLayoutBoundary>\n      <AppRouterAnnouncer tree={tree} />\n    </RedirectBoundary>\n  )\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    // In development, we apply few error boundaries and hot-reloader:\n    // - DevRootHTTPAccessFallbackBoundary: avoid using navigation API like notFound() in root layout\n    // - HotReloader:\n    //  - hot-reload the app when the code changes\n    //  - render dev overlay\n    //  - catch runtime errors and display global-error when necessary\n    if (typeof window !== 'undefined') {\n      const { DevRootHTTPAccessFallbackBoundary } =\n        // TODO(browser-variant): migrate to a .ts/.browser.ts split so the browser bundle drops the server branch; see scripts/generate-browser-variant-aliases.mjs\n        // ast-grep-ignore: no-typeof-window-require-tsx\n        require('./dev-root-http-access-fallback-boundary') as typeof import('./dev-root-http-access-fallback-boundary')\n      content = (\n        <DevRootHTTPAccessFallbackBoundary>\n          {content}\n        </DevRootHTTPAccessFallbackBoundary>\n      )\n    }\n    const HotReloader: typeof import('../dev/hot-reloader/app/hot-reloader-app').default =\n      (\n        require('../dev/hot-reloader/app/hot-reloader-app') as typeof import('../dev/hot-reloader/app/hot-reloader-app')\n      ).default\n\n    content = (\n      <HotReloader\n        globalError={globalError}\n        webSocket={webSocket}\n        staticIndicatorState={staticIndicatorState}\n      >\n        {content}\n      </HotReloader>\n    )\n  } else {\n    content = (\n      <RootErrorBoundary\n        errorComponent={globalError[0]}\n        errorStyles={globalError[1]}\n      >\n        {content}\n      </RootErrorBoundary>\n    )\n  }\n\n  if (process.env.__NEXT_USE_OFFLINE) {\n    const { OfflineProvider } =\n      require('./use-offline') as typeof import('./use-offline')\n    content = <OfflineProvider>{content}</OfflineProvider>\n  }\n\n  return (\n    <>\n      <HistoryUpdater appRouterState={state} />\n      {process.env.TURBOPACK ? null : <RuntimeStylesForWebpack />}\n      <NavigationPromisesContext.Provider\n        value={instrumentedNavigationPromises}\n      >\n        <PathParamsContext.Provider value={pathParams}>\n          <PathnameContext.Provider value={pathname}>\n            <SearchParamsContext.Provider value={searchParams}>\n              <GlobalLayoutRouterContext.Provider\n                value={globalLayoutRouterContext}\n              >\n                {/* TODO: We should be able to remove this context. useRouter\n                    should import from app-router-instance instead. It's only\n                    necessary because useRouter is shared between Pages and\n                    App Router. We should fork that module, then remove this\n                    context provider. */}\n                <AppRouterContext.Provider value={publicAppRouterInstance}>\n                  <LayoutRouterContext.Provider value={layoutRouterContext}>\n                    {content}\n                  </LayoutRouterContext.Provider>\n                </AppRouterContext.Provider>\n              </GlobalLayoutRouterContext.Provider>\n            </SearchParamsContext.Provider>\n          </PathnameContext.Provider>\n        </PathParamsContext.Provider>\n      </NavigationPromisesContext.Provider>\n    </>\n  )\n}\n\nexport default function AppRouter({\n  actionQueue,\n  globalErrorState,\n  webSocket,\n  staticIndicatorState,\n}: {\n  actionQueue: AppRouterActionQueue\n  globalErrorState: GlobalErrorState\n  webSocket?: WebSocket\n  staticIndicatorState?: StaticIndicatorState\n}) {\n  useNavFailureHandler()\n\n  const router = (\n    <Router\n      actionQueue={actionQueue}\n      globalError={globalErrorState}\n      webSocket={webSocket}\n      staticIndicatorState={staticIndicatorState}\n    />\n  )\n\n  // At the very top level, use the default GlobalError component as the final fallback.\n  // When the app router itself fails, which means the framework itself fails, we show the default error.\n  return (\n    <RootErrorBoundary errorComponent={DefaultGlobalError}>\n      {router}\n    </RootErrorBoundary>\n  )\n}\n\nlet runtimeStyles: Set<string> | undefined\nlet runtimeStyleChanged: Set<() => void> | undefined\nif (!process.env.TURBOPACK && typeof window !== 'undefined') {\n  runtimeStyles = new Set<string>()\n  runtimeStyleChanged = new Set<() => void>()\n\n  globalThis._N_E_STYLE_LOAD = function (href: string) {\n    if (!runtimeStyles || !runtimeStyleChanged) return Promise.resolve()\n    let len = runtimeStyles.size\n    runtimeStyles.add(href)\n    if (runtimeStyles.size !== len) {\n      runtimeStyleChanged.forEach((cb) => cb())\n    }\n    // TODO figure out how to get a promise here\n    // But maybe it's not necessary as react would block rendering until it's loaded\n    return Promise.resolve()\n  }\n}\n\nfunction RuntimeStylesForWebpack() {\n  const [, forceUpdate] = React.useState(0)\n  const renderedStylesSize = runtimeStyles?.size ?? 0\n  useEffect(() => {\n    if (!runtimeStyles || !runtimeStyleChanged) return\n    const changed = () => forceUpdate((c) => c + 1)\n    runtimeStyleChanged.add(changed)\n    if (renderedStylesSize !== runtimeStyles.size) {\n      changed()\n    }\n    return () => {\n      runtimeStyleChanged.delete(changed)\n    }\n  }, [renderedStylesSize, forceUpdate])\n\n  const query = getAssetTokenQuery()\n  return [...(runtimeStyles || [])].map((href, i) => (\n    <link\n      key={i}\n      rel=\"stylesheet\"\n      href={`${href}${query}`}\n      // @ts-ignore\n      precedence=\"next\"\n      // TODO figure out crossOrigin and nonce\n      // crossOrigin={TODO}\n      // nonce={TODO}\n    />\n  ))\n}\n","/**\n * Compile-time switcher for debug channel operations.\n *\n * When __NEXT_USE_NODE_STREAMS is true, uses a Node PassThrough-based channel.\n * Otherwise, uses web WritableStream APIs.\n */\nexport type {\n  DebugChannelPair,\n  DebugChannelServer,\n} from './debug-channel-server.web'\nexport type { NodeDebugChannelPair } from './debug-channel-server.node'\nimport type { DebugChannelPair } from './debug-channel-server.web'\nimport type { NodeDebugChannelPair } from './debug-channel-server.node'\n\ntype DebugChannelMod = {\n  createWebDebugChannel: typeof import('./debug-channel-server.web').createWebDebugChannel\n  createNodeDebugChannel: typeof import('./debug-channel-server.node').createNodeDebugChannel\n}\n\nlet _m: DebugChannelMod\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n  _m =\n    require('./debug-channel-server.node') as typeof import('./debug-channel-server.node')\n} else {\n  _m =\n    require('./debug-channel-server.web') as typeof import('./debug-channel-server.web')\n}\n\nexport function createWebDebugChannel(): DebugChannelPair | undefined {\n  if (process.env.NODE_ENV === 'production') {\n    return undefined\n  }\n\n  return _m.createWebDebugChannel()\n}\n\nexport function createNodeDebugChannel(): NodeDebugChannelPair | undefined {\n  if (process.env.NODE_ENV === 'production') {\n    return undefined\n  }\n\n  return _m.createNodeDebugChannel()\n}\n","import type { AppPageRouteDefinition } from '../../route-definitions/app-page-route-definition'\nimport type RenderResult from '../../render-result'\nimport type { RenderOpts } from '../../app-render/types'\nimport { addRequestMeta, type NextParsedUrlQuery } from '../../request-meta'\nimport type { LoaderTree } from '../../lib/app-dir-module'\nimport type { PrerenderManifest } from '../../../build'\n\nimport {\n  renderToHTMLOrFlight,\n  runValidationInDevFromSnapshot,\n  type AppSharedContext,\n} from '../../app-render/app-render'\nimport type { DevValidationWorkerMessage } from '../../app-render/dev-validation-worker-globals'\nimport {\n  RouteModule,\n  type RouteModuleOptions,\n  type RouteModuleHandleContext,\n} from '../route-module'\nimport * as vendoredContexts from './vendored/contexts/entrypoints'\nimport type { BaseNextRequest, BaseNextResponse } from '../../base-http'\nimport type { ServerComponentsHmrCache } from '../../response-cache'\nimport type { OpaqueFallbackRouteParams } from '../../request/fallback-params'\nimport { PrerenderManifestMatcher } from './helpers/prerender-manifest-matcher'\nimport type { DeepReadonly } from '../../../shared/lib/deep-readonly'\nimport {\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_HEADER,\n} from '../../../client/components/app-router-headers'\nimport { isInterceptionRouteAppPath } from '../../../shared/lib/router/utils/interception-routes'\nimport { RSCPathnameNormalizer } from '../../normalizers/request/rsc'\nimport { SegmentPrefixRSCPathnameNormalizer } from '../../normalizers/request/segment-prefix-rsc'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { IncomingMessage } from 'http'\nimport {\n  applyAppPageRscRequestMetaFromHeaders,\n  normalizeAppPageRequestUrl,\n} from './normalize-request-url'\n\nlet vendoredReactRSC\nlet vendoredReactSSR\n\n// the vendored Reacts are loaded from their original source in the edge runtime\nif (process.env.NEXT_RUNTIME !== 'edge') {\n  vendoredReactRSC =\n    require('./vendored/rsc/entrypoints') as typeof import('./vendored/rsc/entrypoints')\n  vendoredReactSSR =\n    require('./vendored/ssr/entrypoints') as typeof import('./vendored/ssr/entrypoints')\n\n  // In Node environments we need to access the correct React instance from external modules such\n  // as global patches. We register the loaded React instances here.\n  const { registerServerReact, registerClientReact } =\n    require('../../runtime-reacts.external') as typeof import('../../runtime-reacts.external')\n  registerServerReact(vendoredReactRSC.React)\n  registerClientReact(vendoredReactSSR.React)\n}\n\n/**\n * The AppPageModule is the type of the module exported by the bundled app page\n * module.\n */\nexport type AppPageModule = typeof import('../../../build/templates/app-page')\n\ntype AppPageUserlandModule = {\n  /**\n   * The tree created in next-app-loader that holds component segments and modules\n   */\n  loaderTree: LoaderTree\n}\n\nexport interface AppPageRouteHandlerContext extends RouteModuleHandleContext {\n  page: string\n  query: NextParsedUrlQuery\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n  renderOpts: RenderOpts\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n  sharedContext: AppSharedContext\n}\n\nexport type AppPageRouteModuleOptions = RouteModuleOptions<\n  AppPageRouteDefinition,\n  AppPageUserlandModule\n>\n\nexport class AppPageRouteModule extends RouteModule<\n  AppPageRouteDefinition,\n  AppPageUserlandModule\n> {\n  private matchers = new WeakMap<\n    DeepReadonly<PrerenderManifest>,\n    PrerenderManifestMatcher\n  >()\n  public match(\n    pathname: string,\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n  ) {\n    // Lazily create the matcher based on the provided prerender manifest.\n    let matcher = this.matchers.get(prerenderManifest)\n    if (!matcher) {\n      matcher = new PrerenderManifestMatcher(\n        this.definition.pathname,\n        prerenderManifest\n      )\n      this.matchers.set(prerenderManifest, matcher)\n    }\n\n    // Match the pathname to the dynamic route.\n    return matcher.match(pathname)\n  }\n\n  private normalizers = {\n    rsc: new RSCPathnameNormalizer(),\n    segmentPrefetchRSC: new SegmentPrefixRSCPathnameNormalizer(),\n  }\n\n  public normalizeUrl(\n    req: IncomingMessage | BaseNextRequest,\n    parsedUrl: UrlWithParsedQuery\n  ) {\n    if (this.normalizers.segmentPrefetchRSC.match(parsedUrl.pathname || '/')) {\n      const result = this.normalizers.segmentPrefetchRSC.extract(\n        parsedUrl.pathname || '/'\n      )\n      if (!result) return false\n\n      const { originalPathname, segmentPath } = result\n      parsedUrl.pathname = originalPathname\n\n      // Mark the request as a router prefetch request.\n      req.headers[RSC_HEADER] = '1'\n      req.headers[NEXT_ROUTER_PREFETCH_HEADER] = '1'\n      req.headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] = segmentPath\n\n      addRequestMeta(req, 'isRSCRequest', true)\n      addRequestMeta(req, 'isPrefetchRSCRequest', true)\n      addRequestMeta(req, 'segmentPrefetchRSCRequest', segmentPath)\n    } else if (this.normalizers.rsc.match(parsedUrl.pathname || '/')) {\n      parsedUrl.pathname = this.normalizers.rsc.normalize(\n        parsedUrl.pathname || '/',\n        true\n      )\n\n      // Mark the request as a RSC request.\n      req.headers[RSC_HEADER] = '1'\n    } else {\n      super.normalizeUrl(req, parsedUrl)\n    }\n\n    // Minimal adapters can bypass base-server request normalization and invoke\n    // route modules directly, so derive RSC/prefetch metadata from headers.\n    applyAppPageRscRequestMetaFromHeaders(req)\n    normalizeAppPageRequestUrl(req, parsedUrl.pathname || '/')\n  }\n\n  public render(\n    req: BaseNextRequest,\n    res: BaseNextResponse,\n    context: AppPageRouteHandlerContext\n  ): Promise<RenderResult> {\n    return renderToHTMLOrFlight(\n      req,\n      res,\n      context.page,\n      context.query,\n      context.fallbackRouteParams,\n      context.renderOpts,\n      context.serverComponentsHmrCache,\n      context.sharedContext\n    )\n  }\n\n  /**\n   * Worker entry point for dev Cache Components dev validation. The dev\n   * validation worker reloads this route's module and calls this so the whole\n   * validation runs inside the app-page bundle's React instance (the same one\n   * the user's client components resolve through `componentMod`), rebuilding\n   * the render context from the transported `message`. `componentMod` is the\n   * reloaded module the worker holds; it's passed in because the route module\n   * has no back-reference to it. Returns the validation errors for the worker\n   * to serialize and the main thread to deliver to the dev overlay.\n   */\n  public runValidationInDev(\n    componentMod: AppPageModule,\n    message: DevValidationWorkerMessage,\n    abortSignal: AbortSignal\n  ): Promise<Array<unknown> | undefined> {\n    return runValidationInDevFromSnapshot(message, componentMod, abortSignal)\n  }\n\n  private pathCouldBeIntercepted(\n    resolvedPathname: string,\n    interceptionRoutePatterns: RegExp[]\n  ): boolean {\n    return (\n      isInterceptionRouteAppPath(resolvedPathname) ||\n      interceptionRoutePatterns.some((regexp) => {\n        return regexp.test(resolvedPathname)\n      })\n    )\n  }\n\n  public getVaryHeader(\n    resolvedPathname: string,\n    interceptionRoutePatterns: RegExp[]\n  ): string {\n    const baseVaryHeader = `${RSC_HEADER}, ${NEXT_ROUTER_STATE_TREE_HEADER}, ${NEXT_ROUTER_PREFETCH_HEADER}, ${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}`\n\n    if (\n      this.pathCouldBeIntercepted(resolvedPathname, interceptionRoutePatterns)\n    ) {\n      // Interception route responses can vary based on the `Next-URL` header.\n      // We use the Vary header to signal this behavior to the client to properly cache the response.\n      return `${baseVaryHeader}, ${NEXT_URL}`\n    } else {\n      // We don't need to include `Next-URL` in the Vary header for non-interception routes since it won't affect the response.\n      // We also set this header for pages to avoid caching issues when navigating between pages and app.\n      return baseVaryHeader\n    }\n  }\n}\n\nconst vendored = {\n  'react-rsc': vendoredReactRSC,\n  'react-ssr': vendoredReactSSR,\n  contexts: vendoredContexts,\n}\n\nexport { renderToHTMLOrFlight, vendored }\n\nexport default AppPageRouteModule\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n  Before = 1,\n  //\n  ShellStatic = 11,\n  Static = 13,\n  //\n  ShellRuntime = 21,\n  Runtime = 23,\n  //\n  Dynamic = 30,\n  //\n  Abandoned = 40,\n}\n\nexport type AdvanceableRenderStage = Exclude<\n  RenderStage,\n  RenderStage.Before | RenderStage.Abandoned\n>\n\nexport const RENDER_STAGE_ADVANCE_ORDER: AdvanceableRenderStage[] = [\n  RenderStage.ShellStatic,\n  RenderStage.Static,\n  //\n  RenderStage.ShellRuntime,\n  RenderStage.Runtime,\n  //\n  RenderStage.Dynamic,\n]\n\nexport function getNextStage(\n  stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>\n) {\n  return RENDER_STAGE_ADVANCE_ORDER[\n    RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1\n  ]\n}\n\nexport function isAdvanceableRenderStage(\n  stage: RenderStage\n): stage is AdvanceableRenderStage {\n  return RenderStage.Before < stage && stage <= RenderStage.Dynamic\n}\n\nexport enum SyncIOMode {\n  /** Sync IO does not error in any stage. */\n  Untracked = 1,\n  /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */\n  AllowedInRuntimeOrDynamic = 2,\n  /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */\n  AllowedInDynamic = 3,\n}\n\nexport class StagedRenderingController {\n  private abortSignal: AbortSignal | null\n  private abandonController: AbortController | null\n  private syncIOMode: SyncIOMode\n  public readonly finalStage: AdvanceableRenderStage | null\n\n  currentStage: RenderStage = RenderStage.Before\n\n  syncInterruptReason: Error | null = null\n\n  triggers: Record<AdvanceableRenderStage, StageTrigger> = {\n    [RenderStage.ShellStatic]: createStageTrigger(),\n    [RenderStage.Static]: createStageTrigger(),\n    //\n    [RenderStage.ShellRuntime]: createStageTrigger(),\n    [RenderStage.Runtime]: createStageTrigger(),\n    //\n    [RenderStage.Dynamic]: createStageTrigger(),\n  }\n\n  constructor({\n    abortSignal,\n    abandonController,\n    syncIO,\n    finalStage,\n  }: {\n    abortSignal: AbortSignal | null\n    abandonController: AbortController | null\n    syncIO: SyncIOMode\n    finalStage: AdvanceableRenderStage | null\n  }) {\n    this.abortSignal = abortSignal\n    this.abandonController = abandonController\n    this.syncIOMode = syncIO\n    this.finalStage = finalStage\n\n    if (abortSignal) {\n      abortSignal.addEventListener(\n        'abort',\n        () => {\n          // Reject all stage promises that haven't already been resolved.\n          // `cancelStageTrigger` is a noop if the trigger already resolved.\n          const { reason } = abortSignal\n          for (const trigger of Object.values(this.triggers)) {\n            cancelStageTrigger(trigger, reason)\n          }\n        },\n        { once: true }\n      )\n    }\n\n    if (abandonController) {\n      abandonController.signal.addEventListener(\n        'abort',\n        () => {\n          this.abandonRender()\n        },\n        { once: true }\n      )\n    }\n  }\n\n  onStage(stage: AdvanceableRenderStage, callback: () => void) {\n    addSyncTriggerListener(this.triggers[stage], callback)\n  }\n\n  shouldTrackSyncInterrupt(): boolean {\n    if (this.syncIOMode === SyncIOMode.Untracked) {\n      return false\n    }\n\n    switch (this.currentStage) {\n      case RenderStage.Before:\n        // If we haven't started the render yet, it can't be interrupted.\n        return false\n      case RenderStage.ShellStatic:\n      case RenderStage.Static:\n        return true\n      case RenderStage.ShellRuntime:\n      case RenderStage.Runtime: {\n        switch (this.syncIOMode) {\n          case SyncIOMode.AllowedInRuntimeOrDynamic: {\n            // Before `partialPrefetching`: Sync IO only errors in static stages.\n            return false\n          }\n          case SyncIOMode.AllowedInDynamic: {\n            return true\n          }\n        }\n        // NOT a fallthrough, but eslint doesn't understand that\n      }\n      case RenderStage.Dynamic:\n      case RenderStage.Abandoned:\n        return false\n      default:\n        this.currentStage satisfies never\n        return false\n    }\n  }\n\n  /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */\n  syncInterruptCurrentStageWithReason(reason: Error) {\n    const { currentStage } = this\n    if (\n      currentStage === RenderStage.Before ||\n      currentStage === RenderStage.Dynamic ||\n      currentStage === RenderStage.Abandoned\n    ) {\n      // Not interruptible. Defensive noop.\n      return\n    }\n\n    // If Sync IO occurs during an abandonable render, we trigger the abandon.\n    // The abandon listener will call abandonRender which advances through\n    // stages to let caches fill before marking as Abandoned.\n    if (this.abandonController) {\n      this.abandonController.abort()\n      return\n    }\n\n    if (this.abortSignal) {\n      // If this is an abortable render, we capture the interruption reason and stop advancing.\n      // We don't release any more promises.\n      // The caller is expected to abort the signal.\n      this.syncInterruptReason = reason\n      this.currentStage = RenderStage.Abandoned\n      return\n    }\n\n    // If we're in a non-abandonable & non-abortable render,\n    // we need to advance to the Dynamic stage and capture the interruption reason.\n    // (in dev, this will be the restarted render)\n    this.syncInterruptReason = reason\n    this.advanceStage(RenderStage.Dynamic)\n  }\n\n  getSyncInterruptReason() {\n    return this.syncInterruptReason\n  }\n\n  getStageEndTime(stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>) {\n    return this.triggers[getNextStage(stage)].triggeredAt ?? Infinity\n  }\n\n  private abandonRender() {\n    // In staged rendering, only the initial render is abandonable.\n    // We can abandon the initial render if\n    //   1. We notice a cache miss, and need to wait for caches to fill\n    //   2. A sync IO error occurs, and the render should be interrupted\n    //      (this might be a lazy intitialization of a module,\n    //       so we still want to restart in this case and see if it still occurs)\n    // In either case, we'll be doing another render after this one,\n    // so we only want to unblock the next stage, not Dynamic, because\n    // unblocking the dynamic stage would likely lead to wasted (uncached) IO.\n\n    const { currentStage } = this\n\n    if (currentStage === RenderStage.Before) {\n      throw new InvariantError(\n        \"A render that hasn't started yet cannot be abandoned\"\n      )\n    }\n    if (\n      currentStage === RenderStage.Dynamic ||\n      currentStage === RenderStage.Abandoned\n    ) {\n      // We shouldn't ever trigger an abandon in these. Defensive noop.\n      return\n    }\n\n    // Resolve all stages after the current one, up to runtime (excluding dynamic)\n    const nextStageIx = RENDER_STAGE_ADVANCE_ORDER.indexOf(currentStage) + 1\n    const dynamicStageIx = RENDER_STAGE_ADVANCE_ORDER.indexOf(\n      RenderStage.Dynamic\n    )\n    for (let i = nextStageIx; i < dynamicStageIx; i++) {\n      this.resolveStage(RENDER_STAGE_ADVANCE_ORDER[i])\n    }\n\n    this.currentStage = RenderStage.Abandoned\n  }\n\n  advanceStage(targetStage: AdvanceableRenderStage) {\n    if (this.finalStage !== null && targetStage > this.finalStage) {\n      throw new InvariantError(\n        `Attempted to advance to stage ${RenderStage[targetStage]} but the render is limited to ${RenderStage[this.finalStage]}`\n      )\n    }\n    const { currentStage } = this\n\n    if (\n      currentStage === RenderStage.Dynamic ||\n      currentStage === RenderStage.Abandoned\n    ) {\n      // Terminal stages, nowhere left to advance.\n      return\n    }\n\n    // If we're already at the target stage or beyond, do nothing.\n    if (targetStage <= currentStage) {\n      return\n    }\n\n    this.currentStage = targetStage\n\n    // Resolve all stages between the current stage and the target.\n    const nextStageIx =\n      currentStage === RenderStage.Before\n        ? 0\n        : RENDER_STAGE_ADVANCE_ORDER.indexOf(currentStage) + 1\n    const targetStageIx = RENDER_STAGE_ADVANCE_ORDER.indexOf(targetStage)\n    for (let i = nextStageIx; i <= targetStageIx; i++) {\n      this.resolveStage(RENDER_STAGE_ADVANCE_ORDER[i])\n    }\n  }\n\n  private resolveStage(stage: AdvanceableRenderStage) {\n    fireStageTrigger(this.triggers[stage])\n  }\n\n  private getStagePromise(stage: AdvanceableRenderStage): Promise<void> {\n    return this.triggers[stage].promise\n  }\n\n  waitForStage(stage: AdvanceableRenderStage) {\n    return this.getStagePromise(stage)\n  }\n\n  delayUntilStage<T>(\n    stage: AdvanceableRenderStage,\n    displayName: string | undefined,\n    resolvedValue: T\n  ): Promise<T> {\n    const stagePromise = this.getStagePromise(stage)\n\n    const promise =\n      process.env.NODE_ENV === 'development'\n        ? makeDevtoolsIOPromiseFromIOTrigger(\n            stagePromise,\n            displayName,\n            resolvedValue\n          )\n        : stagePromise.then(() => resolvedValue)\n\n    // Analogously to `makeDynamicHangingPromise`, we might reject this promise if the signal is invoked.\n    // (e.g. in the case where we don't want want the render to proceed to the dynamic stage and abort it).\n    // We shouldn't consider this an unhandled rejection, so we attach a noop catch handler here to suppress this warning.\n    if (this.abortSignal) {\n      promise.catch(ignoreReject)\n    }\n    return promise\n  }\n}\n\nfunction ignoreReject() {}\n\n// TODO(restart-on-cache-miss): the layering of `delayUntilStage`,\n// `makeDevtoolsIOPromiseFromIOTrigger` and and `makeDevtoolsIOAwarePromise`\n// is confusing, we should clean it up.\nfunction makeDevtoolsIOPromiseFromIOTrigger<T>(\n  ioTrigger: Promise<any>,\n  displayName: string | undefined,\n  resolvedValue: T\n): Promise<T> {\n  // If we create a `new Promise` and give it a displayName\n  // (with no userspace code above us in the stack)\n  // React Devtools will use it as the IO cause when determining \"suspended by\".\n  // In particular, it should shadow any inner IO that resolved/rejected the promise\n  // (in case of staged rendering, this will be the `setTimeout` that triggers the relevant stage)\n  const promise = new Promise<T>((resolve, reject) => {\n    ioTrigger.then(resolve.bind(null, resolvedValue), reject)\n  })\n  if (displayName !== undefined) {\n    // @ts-expect-error\n    promise.displayName = displayName\n  }\n  return promise\n}\n\ntype StageTrigger = {\n  state: 'pending' | 'triggered' | 'cancelled'\n  triggeredAt: number | null\n  promise: Promise<void>\n  _listeners: Array<() => void>\n  _resolvePromise: () => void\n  _rejectPromise: (reason: unknown) => void\n}\n\nfunction addSyncTriggerListener(trigger: StageTrigger, listener: () => void) {\n  if (trigger.state === 'pending') {\n    trigger._listeners.push(listener)\n  } else {\n    listener()\n  }\n}\n\nfunction createStageTrigger(): StageTrigger {\n  const { promise, resolve, reject } = createPromiseWithResolvers<void>()\n  return {\n    state: 'pending',\n    triggeredAt: null,\n    promise,\n    _listeners: [],\n    _resolvePromise: resolve,\n    _rejectPromise: reject,\n  }\n}\n\nfunction fireStageTrigger(trigger: StageTrigger) {\n  if (trigger.state !== 'pending') {\n    return\n  }\n  trigger.state = 'triggered'\n  trigger.triggeredAt = performance.now() + performance.timeOrigin\n  try {\n    const { _listeners: listeners } = trigger\n    for (let i = 0; i < listeners.length; i++) {\n      listeners[i]()\n    }\n    listeners.length = 0\n  } finally {\n    trigger._resolvePromise()\n  }\n}\n\nfunction cancelStageTrigger(trigger: StageTrigger, reason: unknown) {\n  if (trigger.state !== 'pending') {\n    return\n  }\n  trigger.state = 'cancelled'\n  // we didn't trigger, so don't save `triggeredAt`.\n\n  // We're not gonna fire the listeners, we may as well free them.\n  trigger._listeners.length = 0\n\n  // Suppress unhandled rejection warnings for promises that no one is awaiting.\n  trigger.promise.catch(ignoreReject)\n  trigger._rejectPromise(reason)\n}\n","/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n  WorkUnitStore,\n  PrerenderStoreLegacy,\n  PrerenderStoreModern,\n  ValidationStoreClient,\n  PrerenderStoreModernServer,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n  getStagedRenderingController,\n  throwForMissingRequestStore,\n  workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n  ClientHookDynamicError,\n  isClientHookDynamicError,\n  makeClientHookHangingPromise,\n  trackRuntimeDataAccessed,\n} from '../dynamic-rendering-utils'\nimport {\n  METADATA_BOUNDARY_NAME,\n  VIEWPORT_BOUNDARY_NAME,\n  OUTLET_BOUNDARY_NAME,\n  ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n  createRuntimeBodyError,\n  createDynamicBodyError,\n  createRuntimeBodyErrorInNavigation,\n  createDynamicBodyErrorInNavigation,\n  createDynamicOrRuntimeBodyError,\n  createRuntimeMetadataError,\n  createDynamicMetadataError,\n  createRuntimeViewportError,\n  createDynamicViewportError,\n  createDynamicOrRuntimeViewportError,\n  createDynamicOrRuntimeMetadataError,\n  logBuildDebugHint,\n  createLinkBodyErrorInNavigation,\n  createLinkMetadataError,\n  createLinkViewportError,\n} from './blocking-route-messages'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  INSTANT_VALIDATION_BOUNDARY_NAME,\n  INSTANT_SLOT_MARKER_PREFIX,\n  INSTANT_SLOT_MARKER_SUFFIX,\n} from './instant-validation/boundary-constants'\nimport {\n  type ValidationBoundaryTracking,\n  allRequiredBoundariesRendered,\n} from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n  /**\n   * If debugging, this will contain the stack trace of where the dynamic access\n   * occurred. This is used to provide more information to the user about why\n   * their page is being rendered dynamically.\n   */\n  stack?: string\n\n  /**\n   * The expression that was accessed dynamically.\n   */\n  expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n  /**\n   * When true, stack information will also be tracked during dynamic access.\n   */\n  readonly isDebugDynamicAccesses: boolean | undefined\n\n  /**\n   * The dynamic accesses that occurred during the render.\n   */\n  readonly dynamicAccesses: Array<DynamicAccess>\n\n  syncDynamicErrorWithStack: null | Error\n  syncDynamicErrorWithStackPostMicrotask: boolean\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n  hasSuspenseAboveBody: boolean\n  hasDynamicMetadata: boolean\n  dynamicMetadata: null | Error\n  hasDynamicViewport: boolean\n  hasAllowedDynamic: boolean\n  dynamicErrors: Array<Error>\n}\n\nexport function createDynamicTrackingState(\n  isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n  return {\n    isDebugDynamicAccesses,\n    dynamicAccesses: [],\n    syncDynamicErrorWithStack: null,\n    syncDynamicErrorWithStackPostMicrotask: false,\n  }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n  return {\n    hasSuspenseAboveBody: false,\n    hasDynamicMetadata: false,\n    dynamicMetadata: null,\n    hasDynamicViewport: false,\n    hasAllowedDynamic: false,\n    dynamicErrors: [],\n  }\n}\n\nfunction getPendingClientSyncDynamicError(\n  clientDynamic: DynamicTrackingState\n): null | Error {\n  return clientDynamic.syncDynamicErrorWithStackPostMicrotask\n    ? null\n    : clientDynamic.syncDynamicErrorWithStack\n}\n\nexport function getFirstDynamicReason(\n  trackingState: DynamicTrackingState\n): undefined | string {\n  return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n  store: WorkStore,\n  workUnitStore: undefined | Exclude<WorkUnitStore, PrerenderStoreModern>,\n  expression: string\n): void {\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'cache':\n      case 'unstable-cache':\n        // Inside cache scopes, marking a scope as dynamic has no effect,\n        // because the outer cache scope creates a cache boundary. This is\n        // subtly different from reading a dynamic data source, which is\n        // forbidden inside a cache scope.\n        return\n      case 'private-cache':\n        // A private cache scope is already dynamic by definition.\n        return\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'request':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n\n  // If we're forcing dynamic rendering or we're forcing static rendering, we\n  // don't need to do anything here because the entire page is already dynamic\n  // or it's static and it should not throw or postpone here.\n  if (store.forceDynamic || store.forceStatic) return\n\n  if (store.dynamicShouldError) {\n    throw new StaticGenBailoutError(\n      `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n    )\n  }\n\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender-ppr':\n        return postponeWithTracking(\n          store.route,\n          expression,\n          workUnitStore.dynamicTracking\n        )\n      case 'prerender-legacy':\n        workUnitStore.revalidate = 0\n\n        // We aren't prerendering, but we are generating a static page. We need\n        // to bail out of static generation.\n        const err = new DynamicServerError(\n          `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n        )\n        store.dynamicUsageDescription = expression\n        store.dynamicUsageStack = err.stack\n\n        throw err\n      case 'request':\n        if (process.env.NODE_ENV !== 'production') {\n          workUnitStore.usedDynamic = true\n        }\n        break\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n  expression: string,\n  store: WorkStore,\n  prerenderStore: PrerenderStoreLegacy\n): never {\n  // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n  const err = new DynamicServerError(\n    `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n  )\n\n  prerenderStore.revalidate = 0\n\n  store.dynamicUsageDescription = expression\n  store.dynamicUsageStack = err.stack\n\n  throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n  switch (workUnitStore.type) {\n    case 'cache':\n    case 'unstable-cache':\n      // Inside cache scopes, marking a scope as dynamic has no effect,\n      // because the outer cache scope creates a cache boundary. This is\n      // subtly different from reading a dynamic data source, which is\n      // forbidden inside a cache scope.\n      return\n    case 'private-cache':\n      // A private cache scope is already dynamic by definition.\n      return\n    case 'prerender':\n    case 'prerender-runtime':\n    case 'prerender-legacy':\n    case 'prerender-ppr':\n    case 'prerender-client':\n    case 'validation-client':\n    case 'generate-static-params':\n      break\n    case 'request':\n      if (process.env.NODE_ENV !== 'production') {\n        workUnitStore.usedDynamic = true\n      }\n      break\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n  route: string,\n  expression: string,\n  prerenderStore: PrerenderStoreModern\n): void {\n  const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n  const error = createPrerenderInterruptedError(reason)\n\n  prerenderStore.controller.abort(error)\n\n  const dynamicTracking = prerenderStore.dynamicTracking\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      // When we aren't debugging, we don't need to create another error for the\n      // stack trace.\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n  route: string,\n  expression: string,\n  errorWithStack: Error,\n  prerenderStore: PrerenderStoreModern\n): void {\n  const dynamicTracking = prerenderStore.dynamicTracking\n\n  if (dynamicTracking && dynamicTracking.syncDynamicErrorWithStack === null) {\n    dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n    // React completes the task that is currently rendering before scheduled\n    // abort cleanup. Client tracking can attribute the sync IO only during\n    // that current task; server tracking keeps the error regardless.\n    queueMicrotask(() => {\n      dynamicTracking.syncDynamicErrorWithStackPostMicrotask = true\n    })\n  }\n\n  abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n  route: string,\n  expression: string,\n  errorWithStack: Error,\n  prerenderStore: PrerenderStoreModern\n): never {\n  // The synchronously accessed request data would have been available during\n  // a runtime prerender, which would have rendered past this point instead of\n  // aborting — so a runtime prefetch would produce more content than this\n  // render. Record that, same as when request data access creates a hanging\n  // promise (see makeRuntimeHangingPromise). Unlike\n  // `abortOnSynchronousPlatformIOAccess`, which aborts a runtime prerender\n  // all the same and therefore must not record anything.\n  trackRuntimeDataAccessed(prerenderStore)\n\n  const prerenderSignal = prerenderStore.controller.signal\n  if (prerenderSignal.aborted === false) {\n    // TODO it would be better to move this aborted check into the callsite so we can avoid making\n    // the error object when it isn't relevant to the aborting of the prerender however\n    // since we need the throw semantics regardless of whether we abort it is easier to land\n    // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n    // to ideal implementation\n    abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n    // Preserve the exact server-side dynamic access for final validation after\n    // interrupting this render.\n    const dynamicTracking = prerenderStore.dynamicTracking\n    if (dynamicTracking) {\n      if (dynamicTracking.syncDynamicErrorWithStack === null) {\n        dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n      }\n    }\n  }\n  throw createPrerenderInterruptedError(\n    `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n  )\n}\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n  reason: string\n  route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n  const prerenderStore = workUnitAsyncStorage.getStore()\n  const dynamicTracking =\n    prerenderStore && prerenderStore.type === 'prerender-ppr'\n      ? prerenderStore.dynamicTracking\n      : null\n  postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n  route: string,\n  expression: string,\n  dynamicTracking: null | DynamicTrackingState\n): never {\n  assertPostpone()\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      // When we aren't debugging, we don't need to create another error for the\n      // stack trace.\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n\n  React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n  return (\n    `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n    `React throws this special object to indicate where. It should not be caught by ` +\n    `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n  )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n  if (\n    typeof err === 'object' &&\n    err !== null &&\n    typeof (err as any).message === 'string'\n  ) {\n    return isDynamicPostponeReason((err as any).message)\n  }\n  return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n  return (\n    reason.includes(\n      'needs to bail out of prerendering at this point because it used'\n    ) &&\n    reason.includes(\n      'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n    )\n  )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n  throw new Error(\n    'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n  )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n  const error = new Error(message)\n  ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n  return error\n}\n\ntype DigestError = Error & {\n  digest: string\n}\n\nexport function isPrerenderInterruptedError(\n  error: unknown\n): error is DigestError {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n    'name' in error &&\n    'message' in error &&\n    error instanceof Error\n  )\n}\n\nexport function accessedDynamicData(\n  dynamicAccesses: Array<DynamicAccess>\n): boolean {\n  return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n  serverDynamic: DynamicTrackingState,\n  clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n  // We mutate because we only call this once we are no longer writing\n  // to the dynamicTrackingState and it's more efficient than creating a new\n  // array.\n  serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n  return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n  dynamicAccesses: Array<DynamicAccess>\n): string[] {\n  return dynamicAccesses\n    .filter(\n      (access): access is Required<DynamicAccess> =>\n        typeof access.stack === 'string' && access.stack.length > 0\n    )\n    .map(({ expression, stack }) => {\n      stack = stack\n        .split('\\n')\n        // Remove the \"Error: \" prefix from the first line of the stack trace as\n        // well as the first 4 lines of the stack trace which is the distance\n        // from the user code and the `new Error().stack` call.\n        .slice(4)\n        .filter((line) => {\n          // Exclude Next.js internals from the stack trace.\n          if (line.includes('node_modules/next/')) {\n            return false\n          }\n\n          // Exclude anonymous functions from the stack trace.\n          if (line.includes(' (<anonymous>)')) {\n            return false\n          }\n\n          // Exclude Node.js internals from the stack trace.\n          if (line.includes(' (node:')) {\n            return false\n          }\n\n          return true\n        })\n        .join('\\n')\n      return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n    })\n}\n\nfunction assertPostpone() {\n  if (!hasPostpone) {\n    throw new Error(\n      `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n    )\n  }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n  const controller = new AbortController()\n  controller.abort(new BailoutToCSRError('Render in Browser'))\n  return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n  workUnitStore: PrerenderStoreModernServer\n): AbortSignal\nexport function createHangingInputAbortSignal(\n  workUnitStore: WorkUnitStore\n): AbortSignal | undefined\nexport function createHangingInputAbortSignal(\n  workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n  switch (workUnitStore.type) {\n    case 'prerender':\n    case 'prerender-runtime':\n      const controller = new AbortController()\n\n      if (workUnitStore.cacheSignal) {\n        // If we have a cacheSignal it means we're in a prospective render. If\n        // the input we're waiting on is coming from another cache, we do want\n        // to wait for it so that we can resolve this cache entry too.\n        workUnitStore.cacheSignal.inputReady().then(() => {\n          controller.abort()\n        })\n      } else {\n        // Otherwise we're in the final render and we should already have all\n        // our caches filled.\n        // If the prerender uses stages, we have wait until the final stage.\n        // if an input didn't resolve at that point, then we can assume it never will.\n        //\n        // We might still be waiting on some microtasks so we\n        // wait one tick before giving up. When we give up, we still want to\n        // render the content of this cache as deeply as we can so that we can\n        // suspend as deeply as possible in the tree or not at all if we don't\n        // end up waiting for the input.\n\n        const stagedRendering = getStagedRenderingController(workUnitStore)\n        if (stagedRendering && stagedRendering.finalStage !== null) {\n          stagedRendering\n            .waitForStage(stagedRendering.finalStage)\n            .then(() => scheduleOnNextTick(() => controller.abort()), noop)\n        } else {\n          scheduleOnNextTick(() => controller.abort())\n        }\n      }\n\n      return controller.signal\n    case 'prerender-client':\n    case 'validation-client':\n    case 'prerender-ppr':\n    case 'prerender-legacy':\n    case 'request':\n    case 'cache':\n    case 'private-cache':\n    case 'unstable-cache':\n    case 'generate-static-params':\n      return undefined\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nfunction noop() {}\n\nexport function annotateDynamicAccess(\n  expression: string,\n  prerenderStore: PrerenderStoreModern | ValidationStoreClient\n) {\n  const dynamicTracking = prerenderStore.dynamicTracking\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender-client': {\n        const fallbackParams = workUnitStore.fallbackRouteParams\n\n        if (fallbackParams && fallbackParams.size > 0) {\n          // We are in a prerender with cacheComponents semantics. We are going to\n          // hang here and never resolve. This will cause the currently\n          // rendering component to effectively be a dynamic hole.\n          React.use(\n            makeClientHookHangingPromise(\n              workUnitStore.renderSignal,\n              new ClientHookDynamicError(workStore.route, expression)\n            )\n          )\n        }\n        break\n      }\n      case 'prerender':\n        throw new InvariantError(\n          `\\`${expression}\\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n        )\n      case 'prerender-ppr': {\n        const fallbackParams = workUnitStore.fallbackRouteParams\n        if (fallbackParams && fallbackParams.size > 0) {\n          return postponeWithTracking(\n            workStore.route,\n            expression,\n            workUnitStore.dynamicTracking\n          )\n        }\n        break\n      }\n      case 'validation-client': {\n        // Don't check fallbackRouteParams here. We handle params that weren't\n        // provided in the samples using a proxy that throws when accessed.\n        break\n      }\n      case 'prerender-runtime':\n        throw new InvariantError(\n          `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n        )\n      case 'cache':\n      case 'private-cache':\n        throw new InvariantError(\n          `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          `\\`${expression}\\` was called in \\`generateStaticParams\\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`\n        )\n      case 'prerender-legacy':\n      case 'request':\n      case 'unstable-cache':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\nexport function useDynamicSearchParams(expression: string) {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n\n  if (!workStore) {\n    // We assume pages router context and just return\n    return\n  }\n\n  if (!workUnitStore) {\n    throwForMissingRequestStore(expression)\n  }\n\n  switch (workUnitStore.type) {\n    case 'validation-client':\n      // During instant validation we try to behave as close to client as possible,\n      // so this shouldn't hang during SSR.\n      return\n    case 'prerender-client': {\n      React.use(\n        makeClientHookHangingPromise(\n          workUnitStore.renderSignal,\n          new ClientHookDynamicError(workStore.route, expression)\n        )\n      )\n      break\n    }\n    case 'prerender-legacy':\n    case 'prerender-ppr': {\n      if (workStore.forceStatic) {\n        return\n      }\n      throw new BailoutToCSRError(expression)\n    }\n    case 'prerender':\n    case 'prerender-runtime':\n      throw new InvariantError(\n        `\\`${expression}\\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n      )\n    case 'cache':\n    case 'unstable-cache':\n    case 'private-cache':\n      throw new InvariantError(\n        `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n      )\n    case 'generate-static-params':\n      throw new InvariantError(\n        `\\`${expression}\\` was called in \\`generateStaticParams\\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`\n      )\n    case 'request':\n      return\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(<anonymous>\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n  'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n//   at Suspense (<anonymous>)\n//   at __next_root_layout_boundary__ (<anonymous>)\n//\n// Or with other components in between (but not body/html/implicit-body):\n//   at Suspense (<anonymous>)\n//   at SomeComponent (<anonymous>)\n//   at __next_root_layout_boundary__ (<anonymous>)\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n  `\\\\n\\\\s+at Suspense \\\\(<anonymous>\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(<anonymous>\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n  `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n  `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nconst hasInstantValidationBoundaryRegex = new RegExp(\n  `\\\\n\\\\s+at ${INSTANT_VALIDATION_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst slotMarkerRegex = new RegExp(\n  `\\\\n\\\\s+at ${INSTANT_SLOT_MARKER_PREFIX}(\\\\d+)${INSTANT_SLOT_MARKER_SUFFIX}[\\\\n\\\\s]`\n)\n\n/** Look up the config factory for the slot this error belongs to.\n * Checks the component stack for a slot marker (__next_instant_slot_N__)\n * and returns the config at that index. Falls back to index 0 (root\n * config) when no slot marker is found or the slot has no config. */\nfunction resolveInstantStack(\n  componentStack: string,\n  dynamicValidation: InstantValidationState\n): (() => Error) | null {\n  const { slotStacks } = dynamicValidation\n  if (slotStacks.length > 1) {\n    const match = slotMarkerRegex.exec(componentStack)\n    if (match) {\n      // Slot markers are 0-indexed in the component name but\n      // slotStacks is 1-indexed (index 0 is the root config).\n      const slotIndex = parseInt(match[1], 10) + 1\n      const slotStack = slotStacks[slotIndex]\n      if (slotStack != null) {\n        return slotStack\n      }\n    }\n  }\n  // Fall back to root config (index 0)\n  return slotStacks[0] ?? null\n}\n\n/**\n * Inspects the component stack of an outlet boundary to discover whether the\n * user placed a Suspense boundary above the document body, and records the\n * opt-in on `dynamicValidation.hasSuspenseAboveBody` if so.\n *\n * The outlet itself isn't a meaningful source of dynamic — it only resolves\n * when metadata/viewport are dynamic, which we track via their own boundaries.\n * However, the outlet renders alongside the page content, so its stack passes\n * through the user's layout chain (typically reaching into `<body>` via the\n * root layout). That makes the outlet stack our best opportunity to spot a\n * Suspense boundary above the body, even when no real body content is dynamic.\n * Without this, a route whose only dynamic source is `generateViewport()` would\n * miss the Suspense-above-body opt-in, because the viewport's stack lives in\n * the head and never sees the user's root layout.\n *\n * We deliberately only set `hasSuspenseAboveBody`, not `hasAllowedDynamic`. The\n * latter tracks whether the body has dynamic content that's been wrapped in\n * Suspense (i.e., the page is partially dynamic). The outlet rendering tells us\n * about the structural opt-in for an empty shell, not about the body being\n * partially dynamic. The distinction matters because dynamic metadata is only\n * acceptable when the page is partially dynamic (via real body holes), and we\n * don't want this outlet-based detection to mask that case.\n */\nfunction trackOutletSuspenseAboveBody(\n  componentStack: string,\n  dynamicValidation: DynamicValidationState\n): void {\n  if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    dynamicValidation.hasSuspenseAboveBody = true\n  }\n}\n\nexport function trackAllowedDynamicAccess(\n  dynamicReason: unknown,\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic)\n\n  if (hasOutletRegex.test(componentStack)) {\n    trackOutletSuspenseAboveBody(componentStack, dynamicValidation)\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    dynamicValidation.hasDynamicMetadata = true\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    dynamicValidation.hasDynamicViewport = true\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (syncDynamicError) {\n    dynamicValidation.dynamicErrors.push(syncDynamicError)\n    return\n  }\n\n  if (isClientHookDynamicError(dynamicReason)) {\n    dynamicValidation.dynamicErrors.push(\n      addErrorContext(dynamicReason, componentStack, null)\n    )\n    return\n  }\n\n  const error = addErrorContext(\n    createDynamicOrRuntimeBodyError(workStore.route),\n    componentStack,\n    null\n  )\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\nexport enum DynamicHoleKind {\n  /** We know that this hole is caused by link data. */\n  Link = 1,\n  /** We know that this hole is caused by runtime data. */\n  Runtime = 2,\n  /** We know that this hole is caused by dynamic data. */\n  Dynamic = 3,\n}\n\n/** Stores dynamic reasons used during an SSR render in instant validation. */\nexport type InstantValidationState = {\n  hasDynamicMetadata: boolean\n  hasAllowedClientDynamicAboveBoundary: boolean\n  dynamicMetadata: null | Error\n  hasDynamicViewport: boolean\n  hasAllowedDynamic: boolean\n  dynamicErrors: Array<Error>\n  validationPreventingErrors: Array<Error>\n  thrownErrorsOutsideBoundary: Array<unknown>\n  /** Per-slot config factories. Index 0 is the root config (fallback).\n   * Indices 1+ correspond to slot marker components in the tree. */\n  slotStacks: Array<(() => Error) | null>\n}\n\nexport function createInstantValidationState(\n  slotStacks: Array<(() => Error) | null>\n): InstantValidationState {\n  return {\n    hasDynamicMetadata: false,\n    hasAllowedClientDynamicAboveBoundary: false,\n    dynamicMetadata: null,\n    hasDynamicViewport: false,\n    hasAllowedDynamic: false,\n    dynamicErrors: [],\n    validationPreventingErrors: [],\n    thrownErrorsOutsideBoundary: [],\n    slotStacks,\n  }\n}\n\nexport function trackDynamicHoleInNavigation(\n  dynamicReason: unknown,\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: InstantValidationState,\n  clientDynamic: DynamicTrackingState,\n  kind: DynamicHoleKind,\n  boundaryState: ValidationBoundaryTracking\n) {\n  const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic)\n\n  if (hasOutletRegex.test(componentStack)) {\n    // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n    return\n  }\n  // Resolve the config stack for this specific error. If the error\n  // is inside a slot marker, use that slot's config. Otherwise fall\n  // back to the default.\n  const effectiveCreateInstantStack = resolveInstantStack(\n    componentStack,\n    dynamicValidation\n  )\n\n  if (hasMetadataRegex.test(componentStack)) {\n    const error = addErrorContext(\n      kind === DynamicHoleKind.Link\n        ? createLinkMetadataError(workStore.route)\n        : kind === DynamicHoleKind.Runtime\n          ? createRuntimeMetadataError(workStore.route)\n          : createDynamicMetadataError(workStore.route),\n      componentStack,\n      effectiveCreateInstantStack\n    )\n    dynamicValidation.dynamicMetadata = error\n    return\n  }\n  if (hasViewportRegex.test(componentStack)) {\n    const error = addErrorContext(\n      kind === DynamicHoleKind.Link\n        ? createLinkViewportError(workStore.route)\n        : kind === DynamicHoleKind.Runtime\n          ? createRuntimeViewportError(workStore.route)\n          : createDynamicViewportError(workStore.route),\n      componentStack,\n      effectiveCreateInstantStack\n    )\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  }\n\n  const boundaryLocation =\n    hasInstantValidationBoundaryRegex.exec(componentStack)\n  if (!boundaryLocation) {\n    // We don't see the validation boundary in the component stack,\n    // so this hole must be coming from a shared parent.\n    // Shared parents are fully resolved and don't have RSC holes,\n    // but they can still suspend in a client component during SSR.\n\n    // If we managed to render all the validation boundaries, that means\n    // that the client holes aren't blocking validation and we can disregard them.\n    // Note that we don't even care whether they have suspense or not.\n    if (allRequiredBoundariesRendered(boundaryState)) {\n      dynamicValidation.hasAllowedClientDynamicAboveBoundary = true\n      dynamicValidation.hasAllowedDynamic = true // Holes outside the boundary contribute to allowing dynamic metadata\n      return\n    } else {\n      // TODO(instant-validation) TODO(NAR-787)\n      // If shared parents blocked us from validating, we should only log\n      // the errors from the innermost (segments), i.e. omit layouts whose\n      // slots managed to render (because clearly they didn't block validation)\n      const message = `Route \"${workStore.route}\": Could not validate \\`instant\\` because a Client Component in a parent segment prevented the page from rendering.`\n      const error = addErrorContext(\n        new Error(message),\n        componentStack,\n        effectiveCreateInstantStack\n      )\n      dynamicValidation.validationPreventingErrors.push(error)\n      return\n    }\n  } else {\n    // The hole originates inside the validation boundary.\n    //\n    // Check if we have a Suspense above the hole, but below the validation boundary.\n    // If we do, then this dynamic usage wouldn't block a navigation to this subtree.\n    // Conversely, if the nearest suspense is above the validation boundary, then this subtree would block.\n    //\n    // Note that in the component stack, children come before parents.\n    //\n    // Valid:\n    //   ...\n    //   at Suspense\n    //   ...\n    //   at __next_prefetch_validation_boundary__\n    //\n    // Invalid:\n    //   ...\n    //   at __next_prefetch_validation_boundary__\n    //   ...\n    //   at Suspense\n    //\n    const suspenseLocation = hasSuspenseRegex.exec(componentStack)\n    if (suspenseLocation) {\n      if (suspenseLocation.index < boundaryLocation.index) {\n        dynamicValidation.hasAllowedDynamic = true\n        return\n      } else {\n        // invalid - fallthrough\n      }\n    }\n  }\n\n  if (syncDynamicError) {\n    if (\n      effectiveCreateInstantStack !== null &&\n      syncDynamicError.cause === undefined\n    ) {\n      syncDynamicError.cause = effectiveCreateInstantStack()\n    }\n    dynamicValidation.dynamicErrors.push(syncDynamicError)\n    return\n  }\n\n  if (isClientHookDynamicError(dynamicReason)) {\n    dynamicValidation.dynamicErrors.push(\n      addErrorContext(\n        dynamicReason,\n        componentStack,\n        effectiveCreateInstantStack\n      )\n    )\n    return\n  }\n\n  const error = addErrorContext(\n    kind === DynamicHoleKind.Link\n      ? createLinkBodyErrorInNavigation(workStore.route)\n      : kind === DynamicHoleKind.Runtime\n        ? createRuntimeBodyErrorInNavigation(workStore.route)\n        : createDynamicBodyErrorInNavigation(workStore.route),\n    componentStack,\n    effectiveCreateInstantStack\n  )\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\nexport function trackThrownErrorInNavigation(\n  workStore: WorkStore,\n  dynamicValidation: InstantValidationState,\n  thrownValue: unknown,\n  componentStack: string\n) {\n  const boundaryLocation =\n    hasInstantValidationBoundaryRegex.exec(componentStack)\n  if (!boundaryLocation) {\n    // There's no validation boundary on the component stack.\n    // This error may have blocked a boundary from rendering.\n\n    // Wrap the error to provide component context.\n    // This helps for errors from node_modules which would otherwise\n    // have no useful stack information due to ignore-listing,\n    // e.g. next/dynamic with `ssr: false`.\n    const error = addErrorContext(\n      new Error(\n        'An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.',\n        { cause: thrownValue }\n      ),\n      componentStack,\n      null\n    )\n    dynamicValidation.thrownErrorsOutsideBoundary.push(error)\n  } else {\n    // There's validation boundary on the component stack,\n    // so we know this error didn't block a validation boundary from rendering.\n    // However, this error might be hiding be hiding dynamic content that would\n    // cause validation to fail.\n    const suspenseLocation = hasSuspenseRegex.exec(componentStack)\n    if (suspenseLocation) {\n      if (suspenseLocation.index < boundaryLocation.index) {\n        // There's a Suspense below the validation boundary but above this error's location.\n        // This subtree can't fail instant validation because any potential\n        // dynamic holes would be guarded by the Suspense anyway,\n        // so we can allow this.\n        return\n      } else {\n        // invalid - fallthrough\n      }\n    }\n    const message = `Route \"${workStore.route}\": Could not validate \\`instant\\` because an error prevented the target segment from rendering.`\n    const error = addErrorContext(\n      new Error(message, { cause: thrownValue }),\n      componentStack,\n      null // TODO(instant-validation-build): conflicting use of cause\n    )\n    dynamicValidation.validationPreventingErrors.push(error)\n  }\n}\n\nexport function trackDynamicHoleInRuntimeShell(\n  dynamicReason: unknown,\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic)\n\n  if (hasOutletRegex.test(componentStack)) {\n    trackOutletSuspenseAboveBody(componentStack, dynamicValidation)\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    const error = addErrorContext(\n      createDynamicMetadataError(workStore.route),\n      componentStack,\n      null\n    )\n    dynamicValidation.dynamicMetadata = error\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    const error = addErrorContext(\n      createDynamicViewportError(workStore.route),\n      componentStack,\n      null\n    )\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (syncDynamicError) {\n    dynamicValidation.dynamicErrors.push(syncDynamicError)\n    return\n  }\n\n  if (isClientHookDynamicError(dynamicReason)) {\n    dynamicValidation.dynamicErrors.push(\n      addErrorContext(dynamicReason, componentStack, null)\n    )\n    return\n  }\n\n  const error = addErrorContext(\n    createDynamicBodyError(workStore.route),\n    componentStack,\n    null\n  )\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\nexport function trackDynamicHoleInStaticShell(\n  dynamicReason: unknown,\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic)\n\n  if (hasOutletRegex.test(componentStack)) {\n    trackOutletSuspenseAboveBody(componentStack, dynamicValidation)\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    const error = addErrorContext(\n      createRuntimeMetadataError(workStore.route),\n      componentStack,\n      null\n    )\n    dynamicValidation.dynamicMetadata = error\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    const error = addErrorContext(\n      createRuntimeViewportError(workStore.route),\n      componentStack,\n      null\n    )\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (syncDynamicError) {\n    dynamicValidation.dynamicErrors.push(syncDynamicError)\n    return\n  }\n\n  if (isClientHookDynamicError(dynamicReason)) {\n    dynamicValidation.dynamicErrors.push(\n      addErrorContext(dynamicReason, componentStack, null)\n    )\n    return\n  }\n\n  const error = addErrorContext(\n    createRuntimeBodyError(workStore.route),\n    componentStack,\n    null\n  )\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n *\n * Accepts an already-created Error so the SWC error-code plugin can see the\n * `new Error(...)` call at each call site and auto-assign error codes.\n */\nfunction addErrorContext(\n  error: Error,\n  componentStack: string,\n  createInstantStack: (() => Error) | null\n) {\n  const ownerStack =\n    process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n      ? React.captureOwnerStack()\n      : null\n\n  if (createInstantStack !== null) {\n    error.cause = createInstantStack()\n  }\n  // TODO go back to owner stack here if available. This is temporarily using componentStack to get the right\n  //\n  error.stack =\n    error.name + ': ' + error.message + (ownerStack || componentStack)\n  return error\n}\n\nexport enum PreludeState {\n  Full = 0,\n  Empty = 1,\n  Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n  workStore: WorkStore,\n  error: Error\n): void {\n  console.error(error)\n  logBuildDebugHint(workStore.route)\n}\n\nexport function throwIfSyncIOUsed(\n  workStore: WorkStore,\n  serverDynamic: DynamicTrackingState\n) {\n  if (serverDynamic.syncDynamicErrorWithStack) {\n    logDisallowedDynamicError(\n      workStore,\n      serverDynamic.syncDynamicErrorWithStack\n    )\n    throw new StaticGenBailoutError()\n  }\n}\n\nexport function throwIfDisallowedDynamic(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: DynamicValidationState,\n  serverDynamic: DynamicTrackingState,\n  allowEmptyStaticShell: boolean\n): void {\n  throwIfSyncIOUsed(workStore, serverDynamic)\n\n  // The dynamic metadata error is a mistake-detection signal. It fires when the\n  // rest of the shell is otherwise fully static apart from metadata, suggesting\n  // the dynamic data access in `generateMetadata` was probably unintentional.\n  // That condition is independent of whether the user or build phase accepted\n  // an empty shell, so we surface it before any opt-in bypass.\n  if (\n    prelude === PreludeState.Full &&\n    dynamicValidation.hasAllowedDynamic === false &&\n    dynamicValidation.hasDynamicMetadata\n  ) {\n    console.error(createDynamicOrRuntimeMetadataError(workStore.route).message)\n    throw new StaticGenBailoutError()\n  }\n\n  // Either flag expresses \"this shell is allowed to be empty/blocking\":\n  //   - `allowEmptyStaticShell` covers `instant = false` (user opt-in)\n  //     and the build-phase fallback-shell case.\n  //   - `hasSuspenseAboveBody` is the structural opt-in inside the user's root\n  //     layout.\n  // Treat them as synonyms for the purpose of bypassing shell-failure errors.\n  if (allowEmptyStaticShell || dynamicValidation.hasSuspenseAboveBody) {\n    return\n  }\n\n  if (prelude !== PreludeState.Full) {\n    // We didn't have any sync bailouts but there may be user code which\n    // blocked the root. We would have captured these during the prerender\n    // and can log them here and then terminate the build/validating render\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      for (let i = 0; i < dynamicErrors.length; i++) {\n        logDisallowedDynamicError(workStore, dynamicErrors[i])\n      }\n\n      throw new StaticGenBailoutError()\n    }\n\n    // If we got this far then the only other thing that could be blocking\n    // the root is dynamic Viewport. If this is dynamic then\n    // you need to opt into that by adding a Suspense boundary above the body\n    // to indicate your are ok with fully dynamic rendering.\n    if (dynamicValidation.hasDynamicViewport) {\n      console.error(\n        createDynamicOrRuntimeViewportError(workStore.route).message\n      )\n      throw new StaticGenBailoutError()\n    }\n\n    if (prelude === PreludeState.Empty) {\n      // If we ever get this far then we messed up the tracking of invalid dynamic.\n      // We still adhere to the constraint that you must produce a shell but invite the\n      // user to report this as a bug in Next.js.\n      console.error(\n        `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n      )\n      throw new StaticGenBailoutError()\n    }\n  }\n}\n\nexport function getStaticShellDisallowedDynamicReasons(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: DynamicValidationState,\n  allowEmptyStaticShell: boolean\n): Array<Error> {\n  // The dynamic metadata error is a mistake-detection signal. It fires when the\n  // rest of the shell is otherwise fully static apart from metadata, suggesting\n  // the dynamic data access in `generateMetadata` was probably unintentional.\n  // That condition is independent of whether the user or build phase accepted\n  // an empty shell, so we surface it before any opt-in bypass.\n  if (\n    prelude === PreludeState.Full &&\n    dynamicValidation.hasAllowedDynamic === false &&\n    dynamicValidation.dynamicErrors.length === 0 &&\n    dynamicValidation.dynamicMetadata\n  ) {\n    return [dynamicValidation.dynamicMetadata]\n  }\n\n  // Either flag expresses \"this shell is allowed to be empty/blocking\":\n  //   - `allowEmptyStaticShell` covers `instant = false` (user opt-in)\n  //     and the build-phase fallback-shell case.\n  //   - `hasSuspenseAboveBody` is the structural opt-in inside the user's root\n  //     layout.\n  // Treat them as synonyms for the purpose of bypassing shell-failure errors.\n  if (allowEmptyStaticShell || dynamicValidation.hasSuspenseAboveBody) {\n    return []\n  }\n\n  if (prelude !== PreludeState.Full) {\n    // We didn't have any sync bailouts but there may be user code which\n    // blocked the root. We would have captured these during the prerender\n    // and can log them here and then terminate the build/validating render\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (prelude === PreludeState.Empty) {\n      // If we ever get this far then we messed up the tracking of invalid dynamic.\n      // We still adhere to the constraint that you must produce a shell but invite the\n      // user to report this as a bug in Next.js.\n      return [\n        new InvariantError(\n          `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason.`\n        ),\n      ]\n    }\n  }\n  // We had a non-empty prelude and there are no dynamic holes\n  return []\n}\n\n/**\n * `errors` are validation failures that should be surfaced immediately.\n * `deferredFallback` carries a missing-boundary explanation that the caller\n * should hold back until *every* validation depth has been tried — a missing\n * boundary often just means a parent layout intentionally omitted a slot, and\n * a different depth's validation may surface a more meaningful error.\n */\nexport type NavigationValidationResult =\n  // instances that block instant navigation\n  | Array<Error>\n  // validation was blocked with zero or more reasons\n  | Error\n  | AggregateError\n\nexport function getNavigationDisallowedDynamicReasons(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: InstantValidationState,\n  validationSampleTracking: InstantValidationSampleTracking | null,\n  boundaryState: ValidationBoundaryTracking,\n  devRenderDidError: boolean\n): NavigationValidationResult {\n  // If we have errors related to missing samples, those should take precedence over everything else.\n  if (validationSampleTracking) {\n    const { missingSampleErrors } = validationSampleTracking\n    if (missingSampleErrors.length > 0) {\n      return missingSampleErrors\n    }\n  }\n\n  const { validationPreventingErrors } = dynamicValidation\n  if (validationPreventingErrors.length > 0) {\n    if (process.env.__NEXT_DEV_SERVER && devRenderDidError) {\n      // The dev render already surfaced server errors to the user.\n      // The same errors likely caused validation to be inconclusive,\n      // so reporting them again as validation failures would be noisy.\n      return []\n    }\n    return validationPreventingErrors\n  }\n\n  // NOTE: We don't care about Suspense above body here,\n  // we're only concerned with the validation boundary\n  if (prelude !== PreludeState.Full) {\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (\n      prelude === PreludeState.Empty &&\n      !dynamicValidation.hasAllowedClientDynamicAboveBoundary &&\n      allRequiredBoundariesRendered(boundaryState)\n    ) {\n      // If we ever get this far then we messed up the tracking of invalid\n      // dynamic. (When boundaries are missing the deferred fallback below\n      // will surface a more useful error.)\n      return new InvariantError(\n        `Route \"${workStore.route}\" failed to render during instant validation and Next.js was unable to determine a reason.`\n      )\n    }\n  } else {\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (\n      dynamicValidation.hasAllowedDynamic === false &&\n      dynamicValidation.dynamicMetadata\n    ) {\n      return [dynamicValidation.dynamicMetadata]\n    }\n  }\n\n  // Missing boundaries on their own aren't a strong signal — a parent\n  // layout may legitimately omit a slot. Defer this so the caller can\n  // try shallower validation depths first; if every depth comes up\n  // empty we still want to surface this so the user is made aware that\n  // validation didn't complete. When we add a markers API, the\n  // marker-based variant of this check can become strict again.\n  if (!allRequiredBoundariesRendered(boundaryState)) {\n    const { thrownErrorsOutsideBoundary } = dynamicValidation\n    const rootInstantStack = dynamicValidation.slotStacks[0]\n    if (thrownErrorsOutsideBoundary.length === 0) {\n      const missingFiles: string[] = []\n      for (const [id, filePaths] of boundaryState.requiredIds) {\n        if (!boundaryState.renderedIds.has(id)) {\n          for (const filePath of filePaths) {\n            let normalized = filePath\n              .replace(/^\\[project\\][\\\\/]?/, '')\n              .replace(process.cwd() + '/', '')\n              .replace(process.cwd() + '\\\\', '')\n            missingFiles.push(normalized)\n          }\n        }\n      }\n      missingFiles.sort()\n      return createUnrenderedSegmentError(workStore.route, missingFiles)\n    } else if (process.env.__NEXT_DEV_SERVER && devRenderDidError) {\n      // Errors outside the boundary likely blocked it from rendering,\n      // but they're already being reported to the user via the dev\n      // render. Suppress the validation failure to avoid noise.\n      return []\n    } else if (thrownErrorsOutsideBoundary.length === 1) {\n      const message = `Route \"${workStore.route}\": Could not validate \\`instant\\` because the target segment was prevented from rendering, likely due to the following error.`\n      const error = rootInstantStack !== null ? rootInstantStack() : new Error()\n      error.name = 'Error'\n      error.message = message\n      return new AggregateError([\n        error,\n        thrownErrorsOutsideBoundary[0] as Error,\n      ])\n    } else {\n      const message = `Route \"${workStore.route}\": Could not validate \\`instant\\` because the target segment was prevented from rendering, likely due to one of the following errors.`\n      const error = rootInstantStack !== null ? rootInstantStack() : new Error()\n      error.name = 'Error'\n      error.message = message\n      return new AggregateError([\n        error,\n        ...(thrownErrorsOutsideBoundary as Error[]),\n      ])\n    }\n  }\n\n  // We had a non-empty prelude and there are no dynamic holes\n  return []\n}\n","import type { OutgoingHttpHeaders } from 'http'\nimport type RenderResult from '../render-result'\nimport type { CacheControl, Revalidate } from '../lib/cache-control'\nimport type { RouteKind } from '../route-kind'\n\nexport interface ResponseCacheBase {\n  get(\n    key: string | null,\n    responseGenerator: ResponseGenerator,\n    context: {\n      isOnDemandRevalidate?: boolean\n      isPrefetch?: boolean\n      incrementalCache: IncrementalCache\n      /**\n       * This is a hint to the cache to help it determine what kind of route\n       * this is so it knows where to look up the cache entry from. If not\n       * provided it will test the filesystem to check.\n       */\n      routeKind: RouteKind\n\n      /**\n       * True if this is a fallback request.\n       */\n      isFallback?: boolean\n\n      /**\n       * True if the route is enabled for PPR.\n       */\n      isRoutePPREnabled?: boolean\n    }\n  ): Promise<ResponseCacheEntry | null>\n}\n\n// The server components HMR cache might store other data as well in the future,\n// at which point this should be refactored to a discriminated union type.\nexport interface ServerComponentsHmrCache {\n  get(key: string): CachedFetchData | undefined\n  set(key: string, data: CachedFetchData): void\n}\n\nexport type CachedFetchData = {\n  headers: Record<string, string>\n  body: string\n  url: string\n  status?: number\n}\n\nexport const enum CachedRouteKind {\n  APP_PAGE = 'APP_PAGE',\n  APP_ROUTE = 'APP_ROUTE',\n  PAGES = 'PAGES',\n  FETCH = 'FETCH',\n  REDIRECT = 'REDIRECT',\n  IMAGE = 'IMAGE',\n}\n\nexport interface CachedFetchValue {\n  kind: CachedRouteKind.FETCH\n  data: CachedFetchData\n  // tags are only present with file-system-cache\n  // fetch cache stores tags outside of cache entry\n  tags?: string[]\n  revalidate: number\n}\n\nexport interface CachedRedirectValue {\n  kind: CachedRouteKind.REDIRECT\n  props: Object\n}\n\nexport interface CachedAppPageValue {\n  kind: CachedRouteKind.APP_PAGE\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  html: RenderResult\n  rscData: Buffer | undefined\n  status: number | undefined\n  postponed: string | undefined\n  headers: OutgoingHttpHeaders | undefined\n  segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface CachedPageValue {\n  kind: CachedRouteKind.PAGES\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  html: RenderResult\n  pageData: Object\n  status: number | undefined\n  headers: OutgoingHttpHeaders | undefined\n}\n\nexport interface CachedRouteValue {\n  kind: CachedRouteKind.APP_ROUTE\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  body: Buffer\n  status: number\n  headers: OutgoingHttpHeaders\n}\n\nexport interface CachedImageValue {\n  kind: CachedRouteKind.IMAGE\n  etag: string\n  upstreamEtag: string\n  buffer: Buffer\n  extension: string\n  revalidate?: number\n  isMiss?: boolean\n  isStale?: boolean\n}\n\nexport interface IncrementalCachedAppPageValue {\n  kind: CachedRouteKind.APP_PAGE\n  // this needs to be a string since the cache expects to store\n  // the string value\n  html: string\n  rscData: Buffer | undefined\n  headers: OutgoingHttpHeaders | undefined\n  postponed: string | undefined\n  status: number | undefined\n  segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface IncrementalCachedPageValue {\n  kind: CachedRouteKind.PAGES\n  // this needs to be a string since the cache expects to store\n  // the string value\n  html: string\n  pageData: Object\n  headers: OutgoingHttpHeaders | undefined\n  status: number | undefined\n}\n\nexport interface IncrementalResponseCacheEntry {\n  cacheControl?: CacheControl\n  /**\n   * timestamp in milliseconds to revalidate after\n   */\n  revalidateAfter?: Revalidate\n  /**\n   * `-1` here dictates a blocking revalidate should be used\n   */\n  isStale?: boolean | -1\n  isMiss?: boolean\n  isFallback?: boolean\n  value: Exclude<IncrementalCacheValue, CachedFetchValue> | null\n}\n\nexport interface IncrementalFetchCacheEntry {\n  /**\n   * `-1` here dictates a blocking revalidate should be used\n   */\n  isStale?: boolean | -1\n  value: CachedFetchValue\n}\n\nexport type IncrementalCacheEntry =\n  | IncrementalResponseCacheEntry\n  | IncrementalFetchCacheEntry\n\nexport type IncrementalCacheValue =\n  | CachedRedirectValue\n  | IncrementalCachedPageValue\n  | IncrementalCachedAppPageValue\n  | CachedImageValue\n  | CachedFetchValue\n  | CachedRouteValue\n\nexport type ResponseCacheValue =\n  | CachedRedirectValue\n  | CachedPageValue\n  | CachedAppPageValue\n  | CachedImageValue\n  | CachedRouteValue\n\nexport type ResponseCacheEntry = {\n  cacheControl?: CacheControl\n  value: ResponseCacheValue | null\n  isStale?: boolean | -1\n  isMiss?: boolean\n  isFallback?: boolean\n}\n\n/**\n * @param hasResolved whether the responseGenerator has resolved it's promise\n * @param previousCacheEntry the previous cache entry if it exists or the current\n */\nexport type ResponseGenerator = (state: {\n  hasResolved: boolean\n  previousCacheEntry?: IncrementalResponseCacheEntry | null\n  isRevalidating?: boolean\n  span?: any\n\n  /**\n   * When true, this indicates that the response generator is being called in a\n   * context where the response must be generated statically.\n   *\n   * CRITICAL: This should only currently be used when revalidating due to a\n   * dynamic RSC request.\n   */\n  forceStaticRender?: boolean\n}) => Promise<ResponseCacheEntry | null>\n\nexport const enum IncrementalCacheKind {\n  APP_PAGE = 'APP_PAGE',\n  APP_ROUTE = 'APP_ROUTE',\n  PAGES = 'PAGES',\n  FETCH = 'FETCH',\n  IMAGE = 'IMAGE',\n}\n\nexport interface GetIncrementalFetchCacheContext {\n  kind: IncrementalCacheKind.FETCH\n  revalidate?: Revalidate\n  fetchUrl?: string\n  fetchIdx?: number\n  tags?: string[]\n  softTags?: string[]\n}\n\nexport interface GetIncrementalResponseCacheContext {\n  kind: Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH>\n\n  /**\n   * True if the route is enabled for PPR.\n   */\n  isRoutePPREnabled?: boolean\n\n  /**\n   * True if this is a fallback request.\n   */\n  isFallback: boolean\n}\n\nexport interface SetIncrementalFetchCacheContext {\n  fetchCache: true\n  fetchUrl?: string\n  fetchIdx?: number\n  tags?: string[]\n  isImplicitBuildTimeCache?: boolean\n}\n\nexport interface SetIncrementalResponseCacheContext {\n  fetchCache?: false\n  cacheControl?: CacheControl\n\n  /**\n   * True if the route is enabled for PPR.\n   */\n  isRoutePPREnabled?: boolean\n\n  /**\n   * True if this is a fallback request.\n   */\n  isFallback?: boolean\n}\n\nexport interface IncrementalResponseCache {\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  set(\n    key: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n}\n\nexport interface IncrementalCache extends IncrementalResponseCache {\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext\n  ): Promise<IncrementalFetchCacheEntry | null>\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  set(\n    key: string,\n    data: CachedFetchValue | null,\n    ctx: SetIncrementalFetchCacheContext\n  ): Promise<void>\n  set(\n    key: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n  revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ): Promise<void>\n}\n","export const enum RouteKind {\n  /**\n   * `PAGES` represents all the React pages that are under `pages/`.\n   */\n  PAGES = 'PAGES',\n  /**\n   * `PAGES_API` represents all the API routes under `pages/api/`.\n   */\n  PAGES_API = 'PAGES_API',\n  /**\n   * `APP_PAGE` represents all the React pages that are under `app/` with the\n   * filename of `page.{j,t}s{,x}`.\n   */\n  APP_PAGE = 'APP_PAGE',\n  /**\n   * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n   * filename of `route.{j,t}s{,x}`.\n   */\n  APP_ROUTE = 'APP_ROUTE',\n\n  /**\n   * `IMAGE` represents all the images that are generated by `next/image`.\n   */\n  IMAGE = 'IMAGE',\n}\n","import type {\n  OpaqueFallbackRouteParamEntries,\n  OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params'\nimport { getDynamicParam } from '../../shared/lib/router/utils/get-dynamic-param'\nimport type { Params } from '../request/params'\nimport {\n  createPrerenderResumeDataCache,\n  createRenderResumeDataCache,\n  type PrerenderResumeDataCache,\n  type RenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport { stringifyResumeDataCache } from '../resume-data-cache/resume-data-cache'\n\nexport enum DynamicState {\n  /**\n   * The dynamic access occurred during the RSC render phase.\n   */\n  DATA = 1,\n\n  /**\n   * The dynamic access occurred during the HTML shell render phase.\n   */\n  HTML = 2,\n}\n\n/**\n * The postponed state for dynamic data.\n */\nexport type DynamicDataPostponedState = {\n  /**\n   * The type of dynamic state.\n   */\n  readonly type: DynamicState.DATA\n\n  /**\n   * The immutable resume data cache.\n   */\n  readonly renderResumeDataCache: RenderResumeDataCache\n}\n\n/**\n * The postponed state for dynamic HTML.\n */\nexport type DynamicHTMLPostponedState = {\n  /**\n   * The type of dynamic state.\n   */\n  readonly type: DynamicState.HTML\n\n  /**\n   * The postponed data used by React.\n   */\n  readonly data: [\n    preludeState: DynamicHTMLPreludeState,\n    postponed: ReactPostponed,\n  ]\n\n  /**\n   * The immutable resume data cache.\n   */\n  readonly renderResumeDataCache: RenderResumeDataCache\n}\n\nexport const enum DynamicHTMLPreludeState {\n  Empty = 0,\n  Full = 1,\n}\n\ntype ReactPostponed = NonNullable<\n  import('react-dom/static').PrerenderResult['postponed']\n>\n\nexport type PostponedState =\n  | DynamicDataPostponedState\n  | DynamicHTMLPostponedState\n\nexport async function getDynamicHTMLPostponedState(\n  postponed: ReactPostponed,\n  preludeState: DynamicHTMLPreludeState,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  const data: DynamicHTMLPostponedState['data'] = [preludeState, postponed]\n  const dataString = JSON.stringify(data)\n\n  // If there are no fallback route params, we can just serialize the postponed\n  // state as is.\n  if (!fallbackRouteParams || fallbackRouteParams.size === 0) {\n    // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n    return `${dataString.length}:${dataString}${await stringifyResumeDataCache(\n      createRenderResumeDataCache(resumeDataCache),\n      isCacheComponentsEnabled\n    )}`\n  }\n\n  const replacements: OpaqueFallbackRouteParamEntries = Array.from(\n    fallbackRouteParams.entries()\n  )\n  const replacementsString = JSON.stringify(replacements)\n\n  // Serialized as `<replacements.length><replacements><data>`\n  const postponedString = `${replacementsString.length}${replacementsString}${dataString}`\n\n  // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n  return `${postponedString.length}:${postponedString}${await stringifyResumeDataCache(resumeDataCache, isCacheComponentsEnabled)}`\n}\n\nexport async function getDynamicDataPostponedState(\n  resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  return `4:null${await stringifyResumeDataCache(createRenderResumeDataCache(resumeDataCache), isCacheComponentsEnabled)}`\n}\n\nexport function parsePostponedState(\n  state: string,\n  interpolatedParams: Params,\n  maxPostponedStateSizeBytes: number | undefined\n): PostponedState {\n  try {\n    const postponedStringLengthMatch = state.match(/^([0-9]*):/)?.[1]\n    if (!postponedStringLengthMatch) {\n      // Do not include the raw state in the message: it can be large and may\n      // contain sensitive serialized data.\n      throw new Error(\n        'Invariant: invalid postponed state: missing length prefix'\n      )\n    }\n\n    const postponedStringLength = parseInt(postponedStringLengthMatch)\n\n    // We add a `:` to the end of the length as the first character of the\n    // postponed string is the length of the replacement entries.\n    const postponedString = state.slice(\n      postponedStringLengthMatch.length + 1,\n      postponedStringLengthMatch.length + postponedStringLength + 1\n    )\n\n    const renderResumeDataCache = createRenderResumeDataCache(\n      state.slice(\n        postponedStringLengthMatch.length + postponedStringLength + 1\n      ),\n      maxPostponedStateSizeBytes\n    )\n\n    try {\n      if (postponedString === 'null') {\n        return { type: DynamicState.DATA, renderResumeDataCache }\n      }\n\n      if (/^[0-9]/.test(postponedString)) {\n        const match = postponedString.match(/^([0-9]*)/)?.[1]\n        if (!match) {\n          throw new Error(\n            `Invariant: invalid postponed state ${JSON.stringify(postponedString)}`\n          )\n        }\n\n        // This is the length of the replacements entries.\n        const length = parseInt(match)\n        const replacements = JSON.parse(\n          postponedString.slice(\n            match.length,\n            // We then go to the end of the string.\n            match.length + length\n          )\n        ) as OpaqueFallbackRouteParamEntries\n\n        let postponed = postponedString.slice(match.length + length)\n        for (const [\n          segmentKey,\n          [searchValue, dynamicParamType],\n        ] of replacements) {\n          const {\n            treeSegment: [\n              ,\n              // This is the same value that'll be used in the postponed state\n              // as it's part of the tree data. That's why we use it as the\n              // replacement value.\n              value,\n            ],\n          } = getDynamicParam(\n            interpolatedParams,\n            segmentKey,\n            dynamicParamType,\n            null,\n            null // staticSiblings not needed for postponed state\n          )\n\n          postponed = postponed.replaceAll(searchValue, value)\n        }\n\n        return {\n          type: DynamicState.HTML,\n          data: JSON.parse(postponed),\n          renderResumeDataCache,\n        }\n      }\n\n      return {\n        type: DynamicState.HTML,\n        data: JSON.parse(postponedString),\n        renderResumeDataCache,\n      }\n    } catch (err) {\n      console.error(\n        'Failed to parse postponed state',\n        describePostponedStateParseFailure(state, err)\n      )\n      return { type: DynamicState.DATA, renderResumeDataCache }\n    }\n  } catch (err) {\n    console.error(\n      'Failed to parse postponed state',\n      describePostponedStateParseFailure(state, err)\n    )\n    return {\n      type: DynamicState.DATA,\n      renderResumeDataCache: createRenderResumeDataCache(\n        createPrerenderResumeDataCache()\n      ),\n    }\n  }\n}\n\n/**\n * Derives content-free diagnostics about a postponed state that failed to\n * parse, so the error log is actionable without exposing the (potentially\n * sensitive) serialized contents. Every field is a size, a structural flag, or\n * an error code, never the state bytes themselves.\n *\n * The serialized layout is `<N>:<postponedString><base64-deflate cache>`, so\n * these fields distinguish the failure shapes:\n * - `postponedStringComplete: false`: the declared length `N` exceeds what\n * actually arrived, i.e. the postponed string itself was truncated.\n * - `errorCode: 'Z_BUF_ERROR'` with an empty or short tail: the\n * resume-data-cache tail was truncated (ran out of input while inflating).\n * - `errorCode: 'Z_DATA_ERROR'`: the tail bytes are corrupt, not merely short.\n * - `hasLengthPrefix: false`: the body had no `<N>:` prefix at all (e.g. empty\n * or otherwise malformed input).\n */\nfunction describePostponedStateParseFailure(\n  state: string,\n  error: unknown\n): Record<string, unknown> {\n  const errnoError = error as NodeJS.ErrnoException | undefined\n  const diagnostics: Record<string, unknown> = {\n    stateLength: state.length,\n    errorName: error instanceof Error ? error.name : typeof error,\n    errorCode: errnoError?.code,\n  }\n\n  const prefixMatch = state.match(/^([0-9]+):/)\n  if (!prefixMatch) {\n    diagnostics.hasLengthPrefix = false\n    return diagnostics\n  }\n\n  const declaredPostponedLength = parseInt(prefixMatch[1], 10)\n  const tailStart = prefixMatch[0].length + declaredPostponedLength\n  const tail = state.slice(tailStart)\n\n  diagnostics.hasLengthPrefix = true\n  diagnostics.declaredPostponedLength = declaredPostponedLength\n  diagnostics.postponedStringComplete = state.length >= tailStart\n  diagnostics.resumeDataCacheTailLength = tail.length\n  diagnostics.resumeDataCacheTailIsNull = tail === 'null'\n\n  return diagnostics\n}\n\nexport function getPostponedFromState(state: DynamicHTMLPostponedState) {\n  const [preludeState, postponed] = state.data\n  return { preludeState, postponed }\n}\n\n/**\n * Cheaply determines whether a serialized postponed state represents an empty\n * HTML prelude — i.e. the static shell rendered no bytes before the first\n * dynamic hole (a blocking dynamic API at the root with no Suspense boundary\n * above it). Returns false for dynamic-data states or unparseable input.\n *\n * Unlike `parsePostponedState`, this does not interpolate fallback route params\n * or build a resume data cache: it only reads the prelude marker, which is\n * independent of param values. The Instant Navigation Testing API uses this to\n * detect the blank-document case in both dev (fresh render) and production\n * (prebuilt shell), where the marker is persisted in the postponed state.\n */\nexport function isEmptyHTMLPrelude(state: string): boolean {\n  try {\n    const lengthMatch = state.match(/^([0-9]*):/)?.[1]\n    if (!lengthMatch) {\n      return false\n    }\n\n    const length = parseInt(lengthMatch)\n    let postponedString = state.slice(\n      lengthMatch.length + 1,\n      lengthMatch.length + 1 + length\n    )\n\n    // `null` is the dynamic-data case (a full shell was produced).\n    if (postponedString === 'null') {\n      return false\n    }\n\n    // An optional `<n><replacements>` prefix carries fallback route param\n    // replacements; skip it to reach the `[preludeState, postponed]` data.\n    if (/^[0-9]/.test(postponedString)) {\n      const replacementsLengthMatch = postponedString.match(/^([0-9]*)/)?.[1]\n      if (!replacementsLengthMatch) {\n        return false\n      }\n      const replacementsLength = parseInt(replacementsLengthMatch)\n      postponedString = postponedString.slice(\n        replacementsLengthMatch.length + replacementsLength\n      )\n    }\n\n    const data = JSON.parse(postponedString)\n    return Array.isArray(data) && data[0] === DynamicHTMLPreludeState.Empty\n  } catch {\n    return false\n  }\n}\n","import { getDigestForWellKnownError } from './create-error-handler'\nimport { isReactLargeShellError } from './react-large-shell-error'\n\nexport enum Phase {\n  ProspectiveRender = 'the prospective render',\n  SegmentCollection = 'segment collection',\n  InstantValidation = 'instant validation',\n}\n\nexport function printDebugThrownValueForProspectiveRender(\n  thrownValue: unknown,\n  route: string,\n  phase: Phase\n) {\n  // We don't need to print well-known Next.js errors.\n  if (getDigestForWellKnownError(thrownValue)) {\n    return\n  }\n\n  if (isReactLargeShellError(thrownValue)) {\n    // TODO: Aggregate\n    console.error(thrownValue)\n    return undefined\n  }\n\n  let message: undefined | string\n  if (\n    typeof thrownValue === 'object' &&\n    thrownValue !== null &&\n    typeof (thrownValue as any).message === 'string'\n  ) {\n    message = (thrownValue as any).message\n    if (typeof (thrownValue as any).stack === 'string') {\n      const originalErrorStack: string = (thrownValue as any).stack\n      const stackStart = originalErrorStack.indexOf('\\n')\n      if (stackStart > -1) {\n        const error = new Error(\n          `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.\n          \nOriginal Error: ${message}`\n        )\n        error.stack =\n          'Error: ' + error.message + originalErrorStack.slice(stackStart)\n        console.error(error)\n        return\n      }\n    }\n  } else if (typeof thrownValue === 'string') {\n    message = thrownValue\n  }\n\n  if (message) {\n    console.error(`Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided.\n          \nOriginal Message: ${message}`)\n    return\n  }\n\n  console.error(\n    `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`\n  )\n  console.error(thrownValue)\n  return\n}\n","import { getLayoutOrPageModule } from '../../lib/app-dir-module'\nimport type { LoaderTree } from '../../lib/app-dir-module'\nimport { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-tree'\nimport {\n  PAGE_SEGMENT_KEY,\n  DEFAULT_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport {\n  UNDERSCORE_GLOBAL_ERROR_ROUTE,\n  UNDERSCORE_NOT_FOUND_ROUTE,\n} from '../../../shared/lib/entry-constants'\nimport type { Segment } from '../../../shared/lib/app-router-types'\nimport type {\n  AppSegmentConfig,\n  InstantSample,\n} from '../../../build/segment-config/app/app-segment-config'\nimport {\n  workAsyncStorage,\n  type WorkStore,\n} from '../work-async-storage.external'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\n\n/**\n * True when an unconfigured segment should be treated as implicitly\n * validated under a non-manual default validation level. Only page and\n * default segments qualify — layouts do not validate on their own.\n */\nexport function isImplicitValidationSegment(segment: Segment): boolean {\n  const key = typeof segment === 'string' ? segment : segment[0]\n  return (\n    key === PAGE_SEGMENT_KEY ||\n    key.startsWith(PAGE_SEGMENT_KEY) ||\n    key === DEFAULT_SEGMENT_KEY\n  )\n}\n\n/**\n * Routes for the framework-synthesized error and not-found entries. They\n * have no user-configurable escape hatch (the framework supplies the page\n * when the user hasn't), so they're excluded from implicit validation under\n * a non-manual default validation level. Even when the user provides their\n * own `global-error` or root `not-found`, these pages are special-purpose\n * error UI — opting them into validation is something the user can do\n * explicitly via `instant`.\n */\nexport function isFrameworkErrorRoute(route: string | undefined): boolean {\n  return (\n    route === UNDERSCORE_GLOBAL_ERROR_ROUTE ||\n    route === UNDERSCORE_NOT_FOUND_ROUTE\n  )\n}\n\n/**\n * Matches any `prefetch` config that enables Partial Prefetching for the\n * segment: 'partial' or 'unstable_eager'. A route with Partial Prefetching\n * enabled also runtime-caches its navigations, so this gates the runtime\n * prefetch spawn.\n */\nexport async function anySegmentHasPartialPrefetchingEnabled(\n  tree: LoaderTree\n): Promise<boolean> {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  // TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?\n  const prefetchConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).prefetch\n    : undefined\n  if (prefetchConfig === 'partial' || prefetchConfig === 'unstable_eager') {\n    return true\n  }\n\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n    const hasChildPartialPrefetching =\n      await anySegmentHasPartialPrefetchingEnabled(parallelRoute)\n    if (hasChildPartialPrefetching) {\n      return true\n    }\n  }\n\n  return false\n}\n\nexport async function isPageAllowedToBlock(tree: LoaderTree): Promise<boolean> {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  // TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).instant\n    : undefined\n\n  // If we encounter a non-false instant config before a instant=false,\n  // the page isn't allowed to block. The config expresses a requirement for\n  // instant UI, so we should make sure that a static shell exists.\n  // (even if it'd use runtime prefetching for client navs)\n  if (instantConfig !== undefined) {\n    if (instantConfig === false) {\n      return true\n    } else {\n      return false\n    }\n  }\n\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n    const subtreeIsBlocking = await isPageAllowedToBlock(parallelRoute)\n    if (subtreeIsBlocking) {\n      return true\n    }\n  }\n\n  return false\n}\n\nenum VALIDATION_LEVEL {\n  WARNING = 0,\n  ERROR = 1,\n}\n\n/**\n * Walks the loader tree and checks if any segment has an `instant` config\n * that needs validating for the given mode.\n *\n * - Explicit `instant` exports are checked against mode.\n * - Page and default segments without an explicit config get implicit\n *   validation when the default validation level applies to this mode.\n * - `unstable_disableValidation` on any segment kills validation for\n *   the whole tree.\n */\nasync function anySegmentNeedsInstantValidation(\n  rootTree: LoaderTree,\n  level: VALIDATION_LEVEL\n): Promise<boolean> {\n  const workStore = workAsyncStorage.getStore()\n  if (!workStore) {\n    throw new InvariantError(\n      'anySegmentNeedsInstantValidation must run inside a WorkStore'\n    )\n  }\n  const { validationLevel } = workStore\n\n  let baseValidationLevel: number = VALIDATION_LEVEL.WARNING\n  let manualValidation: boolean = false\n  switch (validationLevel) {\n    case 'manual-warning':\n      manualValidation = true\n    // intentional fallthrough\n    case 'warning':\n      baseValidationLevel = VALIDATION_LEVEL.WARNING\n      break\n    case 'experimental-manual-error':\n      manualValidation = true\n    // intentional fallthrough\n    case 'experimental-error':\n      baseValidationLevel = VALIDATION_LEVEL.ERROR\n      break\n    default:\n      validationLevel satisfies never\n  }\n\n  const applyDefaultValidation =\n    // We need to be validating the right level\n    level <= baseValidationLevel &&\n    // We need to not be in manual validation mode\n    !manualValidation &&\n    // We don't validate framework internal routes by default\n    !isFrameworkErrorRoute(workStore.route)\n\n  let needsValidation = false\n  let disabled = false\n\n  async function visit(tree: LoaderTree): Promise<void> {\n    if (disabled) return\n\n    const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n    const instantConfig = layoutOrPageMod\n      ? (layoutOrPageMod as AppSegmentConfig).instant\n      : undefined\n\n    if (instantConfig === false) {\n      // Explicit opt-out. Doesn't itself trigger validation.\n    } else if (instantConfig === true) {\n      // Explicit opt-in using the default level.\n      if (level <= baseValidationLevel) {\n        needsValidation = true\n      }\n    } else if (typeof instantConfig === 'object' && instantConfig !== null) {\n      if (\n        instantConfig.unstable_disableValidation === true ||\n        (level === VALIDATION_LEVEL.WARNING &&\n          instantConfig.unstable_disableDevValidation === true) ||\n        (level === VALIDATION_LEVEL.ERROR &&\n          instantConfig.unstable_disableBuildValidation === true)\n      ) {\n        disabled = true\n        return\n      }\n\n      if (instantConfig.level !== undefined) {\n        const configuredLevel =\n          instantConfig.level === 'experimental-error'\n            ? VALIDATION_LEVEL.ERROR\n            : VALIDATION_LEVEL.WARNING\n        if (level <= configuredLevel) {\n          needsValidation = true\n        }\n      } else if (level <= baseValidationLevel) {\n        needsValidation = true\n      }\n    } else if (applyDefaultValidation && isImplicitValidationSegment(tree[0])) {\n      // No explicit config. Implicit validation applies to page/default\n      // segments when the default level is active for this mode.\n      needsValidation = true\n    }\n\n    const { parallelRoutes } = parseLoaderTree(tree)\n    for (const parallelRouteKey in parallelRoutes) {\n      await visit(parallelRoutes[parallelRouteKey])\n      if (disabled) return\n    }\n  }\n\n  await visit(rootTree)\n  if (disabled) {\n    return false\n  }\n  return needsValidation\n}\n\nexport const anySegmentNeedsInstantValidationInDev = cacheScopedToWorkStore(\n  async (rootTree: LoaderTree): Promise<boolean> =>\n    anySegmentNeedsInstantValidation(rootTree, VALIDATION_LEVEL.WARNING)\n)\n\nexport const anySegmentNeedsInstantValidationInBuild = cacheScopedToWorkStore(\n  async (rootTree: LoaderTree): Promise<boolean> =>\n    anySegmentNeedsInstantValidation(rootTree, VALIDATION_LEVEL.ERROR)\n)\n\nexport const resolveInstantConfigSamplesForPage = async (\n  tree: LoaderTree\n): Promise<InstantSample[] | null> => {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).instant\n    : undefined\n\n  let samples: InstantSample[] | null = null\n  if (\n    instantConfig !== undefined &&\n    typeof instantConfig === 'object' &&\n    instantConfig.unstable_samples\n  ) {\n    samples = instantConfig.unstable_samples\n  }\n\n  // The samples from inner segments override samples from outer segments,\n  // i.e. a page overrides the samples from a layout.\n  // We do not perform any merging logic.\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    if (parallelRouteKey !== 'children') {\n      // TODO(instant-validation-build): do something with with samples from non-children slots?\n      continue\n    }\n    const childTree = parallelRoutes[parallelRouteKey]\n    const childSamples = await resolveInstantConfigSamplesForPage(childTree)\n    if (childSamples !== null) {\n      samples = childSamples\n    }\n  }\n\n  return samples\n}\n\n/**\n * A simple cache wrapper for 1-argument functions.\n * The cache will live as long as the current WorkStore,\n * i.e. it's scoped to a single request.\n */\nfunction cacheScopedToWorkStore<TArg extends WeakKey, TRes>(\n  func: (arg: TArg) => TRes\n): (arg: TArg) => TRes {\n  const resultsPerWorkStore = new WeakMap<WorkStore, WeakMap<TArg, TRes>>()\n  return (arg: TArg): TRes => {\n    const workStore = workAsyncStorage.getStore()\n    if (!workStore) {\n      throw new InvariantError(\n        `${func.name || 'cacheScopedToWorkStore callee'} must run inside a WorkStore`\n      )\n    }\n\n    let results = resultsPerWorkStore.get(workStore)\n    if (results && results.has(arg)) {\n      return results.get(arg)!\n    }\n\n    const result = func(arg)\n\n    if (!results) {\n      results = new WeakMap()\n      resultsPerWorkStore.set(workStore, results)\n    }\n    results.set(arg, result)\n\n    return result\n  }\n}\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { BaseNextRequest } from './base-http'\nimport type { CloneableBody } from './body-streams'\nimport type { RouteMatch } from './route-matches/route-match'\nimport type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\nimport type {\n  ResponseCacheEntry,\n  ServerComponentsHmrCache,\n} from './response-cache'\nimport type { PagesDevOverlayBridgeType } from '../next-devtools/userspace/pages/pages-dev-overlay-setup'\nimport type { OpaqueFallbackRouteParams } from './request/fallback-params'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport type { RevalidateFn } from './lib/router-utils/router-server-context'\nimport type { NextRequest } from './web/exports'\n\n// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta')\n\nexport type NextIncomingMessage = (\n  | BaseNextRequest\n  | IncomingMessage\n  | NextRequest\n) & {\n  [NEXT_REQUEST_META]?: RequestMeta\n}\n\n/**\n * The callback function to call when a response cache entry was generated or\n * looked up in the cache. When it returns true, the server assumes that the\n * handler has already responded to the request and will not do so itself.\n */\nexport type OnCacheEntryHandler = (\n  /**\n   * The response cache entry that was generated or looked up in the cache.\n   */\n  cacheEntry: ResponseCacheEntry,\n\n  /**\n   * The request metadata.\n   */\n  requestMeta: {\n    /**\n     * The URL that was used to make the request.\n     */\n    url: string | undefined\n  }\n) => Promise<boolean | void> | boolean | void\n\nexport interface RequestMeta {\n  /**\n   * The query that was used to make the request.\n   */\n  initQuery?: ParsedUrlQuery\n\n  /**\n   * The URL that was used to make the request.\n   */\n  initURL?: string\n\n  /**\n   * The protocol that was used to make the request.\n   */\n  initProtocol?: string\n\n  /**\n   * The body that was read from the request. This is used to allow the body to\n   * be read multiple times.\n   */\n  clonableBody?: CloneableBody\n\n  /**\n   * True when the request matched a locale domain that was configured in the\n   * next.config.js file.\n   */\n  isLocaleDomain?: boolean\n\n  /**\n   * True when the request had locale information stripped from the pathname\n   * part of the URL.\n   */\n  didStripLocale?: boolean\n\n  /**\n   * If the request had its URL rewritten, this is the pathname it was rewritten\n   * to (not a full URL, just the pathname).\n   */\n  rewrittenPathname?: string\n\n  /**\n   * The resolved pathname for the request. Dynamic route params are\n   * interpolated, the pathname is decoded, and the trailing slash is removed.\n   */\n  resolvedPathname?: string\n\n  /**\n   * The cookies that were added by middleware and were added to the response.\n   */\n  middlewareCookie?: string[]\n\n  /**\n   * The match on the request for a given route.\n   */\n  match?: RouteMatch\n\n  /**\n   * The incremental cache to use for the request.\n   */\n  incrementalCache?: IncrementalCache\n\n  /**\n   * The server components HMR cache, only for dev.\n   */\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n\n  /**\n   * The hash of the most recent server component change (dev only), set by the\n   * router-server from the hot-reloader. Included in `\"use cache\"` cache keys\n   * so that cached entries are revalidated after an edit, for every client,\n   * regardless of whether it runs the HMR client.\n   */\n  hmrRefreshHash?: string\n\n  /**\n   * Equals the segment path that was used for the prefetch RSC request.\n   */\n  segmentPrefetchRSCRequest?: string\n\n  /**\n   * True when the request is for the prefetch flight data.\n   */\n  isPrefetchRSCRequest?: true\n\n  /**\n   * True when the request is for the flight data.\n   */\n  isRSCRequest?: true\n\n  /**\n   * A search param set by the Next.js client when performing RSC requests.\n   * Because some CDNs do not vary their cache entries on our custom headers,\n   * this search param represents a hash of the header values. For any cached\n   * RSC request, we should verify that the hash matches before responding.\n   * Otherwise this can lead to cache poisoning.\n   * TODO: Consider not using custom request headers at all, and instead encode\n   * everything into the search param.\n   */\n  cacheBustingSearchParam?: string\n\n  /**\n   * True when the request is for the `/_next/data` route using the pages\n   * router.\n   */\n  isNextDataReq?: true\n\n  /**\n   * Postponed state to use for resumption. When absent, the request is not a\n   * resume request. A non-empty string contains the state to resume, while an\n   * empty string represents a resume request without postponed state and\n   * signals that the renderer should perform a full dynamic render.\n   *\n   * There are no guarantees that the page actually postponed, as verifying\n   * that would incur an additional cache lookup.\n   */\n  postponed?: string\n\n  /**\n   * The action body extracted from a server action request when the postponed\n   * state was prepended to the body by the proxy. This allows the action\n   * handler to read the action payload without re-reading the consumed stream.\n   */\n  actionBody?: Buffer\n\n  /**\n   * If provided, this will be called when a response cache entry was generated\n   * or looked up in the cache.\n   *\n   * @deprecated Use `onCacheEntryV2` instead.\n   */\n  onCacheEntry?: OnCacheEntryHandler\n\n  /**\n   * If provided, this will be called when a response cache entry was generated\n   * or looked up in the cache.\n   */\n  onCacheEntryV2?: OnCacheEntryHandler\n\n  /**\n   * The previous revalidate before rendering 404 page for notFound: true\n   */\n  notFoundRevalidate?: number | false\n\n  /**\n   * In development, the original source page that returned a 404.\n   */\n  developmentNotFoundSourcePage?: string\n\n  /**\n   * The path we routed to and should be invoked\n   */\n  invokePath?: string\n\n  /**\n   * The specific page output we should be matching\n   */\n  invokeOutput?: string\n\n  /**\n   * The status we are invoking the request with from routing\n   */\n  invokeStatus?: number\n\n  /**\n   * The routing error we are invoking with\n   */\n  invokeError?: Error\n\n  /**\n   * The query parsed for the invocation\n   */\n  invokeQuery?: Record<string, undefined | string | string[]>\n\n  /**\n   * Whether the request is a middleware invocation\n   */\n  middlewareInvoke?: boolean\n\n  /**\n   * Whether the request should render the fallback shell or not.\n   */\n  renderFallbackShell?: boolean\n\n  /**\n   * Route param keys that were explicitly resolved from partial nxtP*\n   * query params during background revalidation. Used by app-page.ts to\n   * determine which fallback params should remain deferred vs resolved\n   * in intermediate PPR shells.\n   */\n  resolvedRouteParamKeys?: Set<string>\n\n  /**\n   * Whether the request is for the custom error page.\n   */\n  customErrorRender?: true\n\n  /**\n   * Whether to bubble up the NoFallbackError to the caller when a 404 is\n   * returned.\n   */\n  bubbleNoFallback?: true\n\n  /**\n   * True when the request had locale information inferred from the default\n   * locale.\n   */\n  localeInferredFromDefault?: true\n\n  /**\n   * The locale that was inferred or explicitly set for the request.\n   */\n  locale?: string\n\n  /**\n   * The default locale that was inferred or explicitly set for the request.\n   */\n  defaultLocale?: string\n\n  /**\n   * The relative project dir the server is running in from project root\n   */\n  relativeProjectDir?: string\n\n  /**\n   * The dist directory the server is currently using\n   */\n  distDir?: string\n\n  /**\n    Optional hostname used by route handlers when constructing absolute URLs.\n    hostname: '127.0.0.1',\n   */\n  hostname?: string\n\n  /**\n   Optional internal revalidate function to avoid revalidating over the network\n   */\n  revalidate?: RevalidateFn\n\n  /**\n   Optional function to render the 404 page for pages router `notFound: true`\n   */\n  render404?: (\n    req: IncomingMessage,\n    res: ServerResponse,\n    parsedUrl?: UrlWithParsedQuery,\n    setHeaders?: boolean\n  ) => Promise<void>\n\n  /**\n   * The query after resolving routes\n   */\n  query?: ParsedUrlQuery\n\n  /**\n   * The params after resolving routes\n   */\n  params?: ParsedUrlQuery\n\n  /**\n   * ErrorOverlay component to use in development for pages router\n   */\n  PagesErrorDebug?: PagesDevOverlayBridgeType\n\n  /**\n   * Whether server is in minimal mode (this will be replaced with more\n   * specific flags in future)\n   */\n  minimalMode?: boolean\n\n  /**\n   * The fallback params for this route. In dev, used for validating prerenders.\n   * In production, used to defer params resolution during staged rendering.\n   */\n  fallbackParams?: OpaqueFallbackRouteParams\n\n  /**\n   * DEV only: Request timings in process.hrtime.bigint()\n   */\n  devRequestTimingStart?: bigint\n  devRequestTimingMiddlewareStart?: bigint\n  devRequestTimingMiddlewareEnd?: bigint\n  devRequestTimingInternalsEnd?: bigint\n\n  /**\n   * DEV only: The duration of getStaticPaths/generateStaticParams in process.hrtime.bigint()\n   */\n  devGenerateStaticParamsDuration?: bigint\n\n  /**\n   * DEV only: Server action log info to be logged after the request log\n   */\n  devServerActionLog?: {\n    functionName: string\n    args: unknown[]\n    location: string\n    duration: number\n  }\n}\n\n/**\n * Gets the request metadata. If no key is provided, the entire metadata object\n * is returned.\n *\n * @param req the request to get the metadata from\n * @param key the key to get from the metadata (optional)\n * @returns the value for the key or the entire metadata object\n */\nexport function getRequestMeta(\n  req: NextIncomingMessage,\n  key?: undefined\n): RequestMeta\nexport function getRequestMeta<K extends keyof RequestMeta>(\n  req: NextIncomingMessage,\n  key: K\n): RequestMeta[K]\nexport function getRequestMeta<K extends keyof RequestMeta>(\n  req: NextIncomingMessage,\n  key?: K\n): RequestMeta | RequestMeta[K] {\n  const meta = req[NEXT_REQUEST_META] || {}\n  return typeof key === 'string' ? meta[key] : meta\n}\n\n/**\n * Sets the request metadata.\n *\n * @param req the request to set the metadata on\n * @param meta the metadata to set\n * @returns the mutated request metadata\n */\nexport function setRequestMeta(req: NextIncomingMessage, meta: RequestMeta) {\n  req[NEXT_REQUEST_META] = meta\n  return meta\n}\n\n/**\n * Adds a value to the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to set\n * @param value the value to set\n * @returns the mutated request metadata\n */\nexport function addRequestMeta<K extends keyof RequestMeta>(\n  request: NextIncomingMessage,\n  key: K,\n  value: RequestMeta[K]\n) {\n  const meta = getRequestMeta(request)\n  meta[key] = value\n  return setRequestMeta(request, meta)\n}\n\n/**\n * Removes a key from the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to remove\n * @returns the mutated request metadata\n */\nexport function removeRequestMeta<K extends keyof RequestMeta>(\n  request: NextIncomingMessage,\n  key: K\n) {\n  const meta = getRequestMeta(request)\n  delete meta[key]\n  return setRequestMeta(request, meta)\n}\n\ntype NextQueryMetadata = {\n  /**\n   * The `_rsc` query parameter used for cache busting to ensure that the RSC\n   * requests do not get cached by the browser explicitly.\n   */\n  [NEXT_RSC_UNION_QUERY]?: string\n}\n\nexport type NextParsedUrlQuery = ParsedUrlQuery & NextQueryMetadata\n\n/**\n * subset of `url.parse` return value\n */\ninterface LegacyUrl {\n  auth?: string | null\n  hash: string | null\n  hostname: string | null\n  href: string\n  pathname: string | null\n  protocol: string | null\n  search: string | null\n  slashes: boolean | null\n  port: string | null\n  query: string | null | ParsedUrlQuery\n}\ninterface LegacyUrlWithParsedQuery extends LegacyUrl {\n  query: ParsedUrlQuery\n}\n\n// TODO: Remove in favor of WHATWG URLs\nexport interface NextUrlWithParsedQuery extends LegacyUrlWithParsedQuery {\n  query: NextParsedUrlQuery\n}\n","import {\n  extractInterceptionRouteInformation,\n  isInterceptionRouteAppPath,\n} from './interception-routes'\n\n// Identify /.*[param].*/ in route string\nconst TEST_ROUTE = /\\/[^/]*\\[[^/]+\\][^/]*(?=\\/|$)/\n\n// Identify /[param]/ in route string\nconst TEST_STRICT_ROUTE = /\\/\\[[^/]+\\](?=\\/|$)/\n\n/**\n * Check if a route is dynamic.\n *\n * @param route - The route to check.\n * @param strict - Whether to use strict mode which prohibits segments with prefixes/suffixes (default: true).\n * @returns Whether the route is dynamic.\n */\nexport function isDynamicRoute(route: string, strict: boolean = true): boolean {\n  if (isInterceptionRouteAppPath(route)) {\n    route = extractInterceptionRouteInformation(route).interceptedRoute\n  }\n\n  if (strict) {\n    return TEST_STRICT_ROUTE.test(route)\n  }\n\n  return TEST_ROUTE.test(route)\n}\n","import { ensureLeadingSlash } from './ensure-leading-slash'\nimport { isDynamicRoute } from '../router/utils'\nimport { NormalizeError } from '../utils'\n\n/**\n * Takes a page and transforms it into its file counterpart ensuring that the\n * output is normalized. Note this function is not idempotent because a page\n * `/index` can be referencing `/index/index.js` and `/index/index` could be\n * referencing `/index/index/index.js`. Examples:\n *  - `/` -> `/index`\n *  - `/index/foo` -> `/index/index/foo`\n *  - `/index` -> `/index/index`\n */\nexport function normalizePagePath(page: string): string {\n  const normalized =\n    /^\\/index(\\/|$)/.test(page) && !isDynamicRoute(page)\n      ? `/index${page}`\n      : page === '/'\n        ? '/index'\n        : ensureLeadingSlash(page)\n\n  if (process.env.NEXT_RUNTIME !== 'edge') {\n    const { posix } = require('path') as typeof import('path')\n    const resolvedPage = posix.normalize(normalized)\n    if (resolvedPage !== normalized) {\n      throw new NormalizeError(\n        `Requested and resolved page mismatch: ${normalized} ${resolvedPage}`\n      )\n    }\n  }\n\n  return normalized\n}\n","import { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-path'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\n\nexport type BuildManifest = {\n  devFiles: readonly string[]\n  polyfillFiles: readonly string[]\n  lowPriorityFiles: readonly string[]\n  rootMainFiles: readonly string[]\n  // this is a separate field for flying shuttle to allow\n  // different root main files per entries/build (ideally temporary)\n  // until we can stitch the runtime chunks together safely\n  rootMainFilesTree: { [appRoute: string]: readonly string[] }\n  pages: {\n    '/_app': readonly string[]\n    [page: string]: readonly string[]\n  }\n  // Per-page Turbopack chunk-group bootstrap params, stored as raw JSON.\n  pagesChunkGroupBootstrapParams?: { [page: string]: object }\n  // The chunk-loading global the runtime drains (default \"TURBOPACK\").\n  chunkLoadingGlobal?: string\n}\n\n/**\n * Builds inline `globalThis[<global>].push(<params>)` bootstrap content for the given\n * pages, seeding the runtime queue before the shared runtime chunk drains it. Only call\n * this for Turbopack production builds (the only builds that populate\n * `pagesChunkGroupBootstrapParams` / `chunkLoadingGlobal`). Returns undefined when none\n * of the given pages have inlined params.\n */\nexport function getTurbopackChunkGroupBootstrap(\n  paramsByPage: { [page: string]: object },\n  chunkLoadingGlobal: string,\n  pages: readonly string[]\n): string | undefined {\n  const g = JSON.stringify(chunkLoadingGlobal)\n  const statements = pages\n    .map((page) => paramsByPage[page])\n    .filter(Boolean)\n    .map(\n      (params) =>\n        `(globalThis[${g}] || (globalThis[${g}] = [])).push(${JSON.stringify(\n          params\n        )});`\n    )\n\n  return statements.length > 0 ? statements.join('\\n') : undefined\n}\n\nexport function getPageFiles(\n  buildManifest: BuildManifest,\n  page: string\n): readonly string[] {\n  const normalizedPage = denormalizePagePath(normalizePagePath(page))\n  let files = buildManifest.pages[normalizedPage]\n\n  if (!files) {\n    console.warn(\n      `Could not find files for ${normalizedPage} in .next/build-manifest.json`\n    )\n    return []\n  }\n\n  return files\n}\n","export const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found'\nexport const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error'\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`\n","import type { OutgoingHttpHeaders } from 'http'\nimport {\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../../lib/constants'\n\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */\nexport function fromNodeOutgoingHttpHeaders(\n  nodeHeaders: OutgoingHttpHeaders\n): Headers {\n  const headers = new Headers()\n  for (let [key, value] of Object.entries(nodeHeaders)) {\n    const values = Array.isArray(value) ? value : [value]\n    for (let v of values) {\n      if (typeof v === 'undefined') continue\n      if (typeof v === 'number') {\n        v = v.toString()\n      }\n\n      headers.append(key, v)\n    }\n  }\n  return headers\n}\n\n/*\n  Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n  that are within a single set-cookie field-value, such as in the Expires portion.\n  This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n  Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n  React Native's fetch does this for *every* header, including set-cookie.\n  \n  Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n  Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/\nexport function splitCookiesString(cookiesString: string) {\n  var cookiesStrings = []\n  var pos = 0\n  var start\n  var ch\n  var lastComma\n  var nextStart\n  var cookiesSeparatorFound\n\n  function skipWhitespace() {\n    while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n      pos += 1\n    }\n    return pos < cookiesString.length\n  }\n\n  function notSpecialChar() {\n    ch = cookiesString.charAt(pos)\n\n    return ch !== '=' && ch !== ';' && ch !== ','\n  }\n\n  while (pos < cookiesString.length) {\n    start = pos\n    cookiesSeparatorFound = false\n\n    while (skipWhitespace()) {\n      ch = cookiesString.charAt(pos)\n      if (ch === ',') {\n        // ',' is a cookie separator if we have later first '=', not ';' or ','\n        lastComma = pos\n        pos += 1\n\n        skipWhitespace()\n        nextStart = pos\n\n        while (pos < cookiesString.length && notSpecialChar()) {\n          pos += 1\n        }\n\n        // currently special character\n        if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n          // we found cookies separator\n          cookiesSeparatorFound = true\n          // pos is inside the next cookie, so back up and return it.\n          pos = nextStart\n          cookiesStrings.push(cookiesString.substring(start, lastComma))\n          start = pos\n        } else {\n          // in param ',' or param separator ';',\n          // we continue from that comma\n          pos = lastComma + 1\n        }\n      } else {\n        pos += 1\n      }\n    }\n\n    if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n      cookiesStrings.push(cookiesString.substring(start, cookiesString.length))\n    }\n  }\n\n  return cookiesStrings\n}\n\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */\nexport function toNodeOutgoingHttpHeaders(\n  headers: Headers\n): OutgoingHttpHeaders {\n  const nodeHeaders: OutgoingHttpHeaders = {}\n  const cookies: string[] = []\n  if (headers) {\n    for (const [key, value] of headers.entries()) {\n      if (key.toLowerCase() === 'set-cookie') {\n        // We may have gotten a comma joined string of cookies, or multiple\n        // set-cookie headers. We need to merge them into one header array\n        // to represent all the cookies.\n        cookies.push(...splitCookiesString(value))\n        nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies\n      } else {\n        nodeHeaders[key] = value\n      }\n    }\n  }\n  return nodeHeaders\n}\n\n/**\n * Validate the correctness of a user-provided URL.\n */\nexport function validateURL(url: string | URL): string {\n  try {\n    return String(new URL(String(url)))\n  } catch (error: any) {\n    throw new Error(\n      `URL is malformed \"${String(\n        url\n      )}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,\n      { cause: error }\n    )\n  }\n}\n\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */\nexport function normalizeNextQueryParam(key: string): null | string {\n  const prefixes = [NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX]\n  for (const prefix of prefixes) {\n    if (key !== prefix && key.startsWith(prefix)) {\n      return key.substring(prefix.length)\n    }\n  }\n  return null\n}\n","import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n  domainItems?: readonly DomainLocale[],\n  hostname?: string,\n  detectedLocale?: string\n) {\n  if (!domainItems) return\n\n  if (detectedLocale) {\n    detectedLocale = detectedLocale.toLowerCase()\n  }\n\n  for (const item of domainItems) {\n    // remove port if present\n    const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n    if (\n      hostname === domainHostname ||\n      detectedLocale === item.defaultLocale.toLowerCase() ||\n      item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n    ) {\n      return item\n    }\n  }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n  if (!path.startsWith('/') || !suffix) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  return `${pathname}${suffix}${query}${hash}`\n}\n","import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n  parsed: { hostname?: string | null },\n  headers?: OutgoingHttpHeaders\n): string | undefined {\n  // Get the hostname from the headers if it exists, otherwise use the parsed\n  // hostname.\n  let hostname: string\n  if (headers?.host && !Array.isArray(headers.host)) {\n    hostname = headers.host.toString().split(':', 1)[0]\n  } else if (parsed.hostname) {\n    hostname = parsed.hostname\n  } else return\n\n  return hostname.toLowerCase()\n}\n","export interface PathLocale {\n  detectedLocale?: string\n  pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n  pathname: string,\n  locales?: readonly string[]\n): PathLocale {\n  // If locales is undefined, return the pathname as is.\n  if (!locales) return { pathname }\n\n  // Get the cached lowercased locales or create a new cache entry.\n  let lowercasedLocales = cache.get(locales)\n  if (!lowercasedLocales) {\n    lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n    cache.set(locales, lowercasedLocales)\n  }\n\n  let detectedLocale: string | undefined\n\n  // The first segment will be empty, because it has a leading `/`. If\n  // there is no further segment, there is no locale (or it's the default).\n  const segments = pathname.split('/', 2)\n\n  // If there's no second segment (ie, the pathname is just `/`), there's no\n  // locale.\n  if (!segments[1]) return { pathname }\n\n  // The second segment will contain the locale part if any.\n  const segment = segments[1].toLowerCase()\n\n  // See if the segment matches one of the locales. If it doesn't, there is\n  // no locale (or it's the default).\n  const index = lowercasedLocales.indexOf(segment)\n  if (index < 0) return { pathname }\n\n  // Return the case-sensitive locale.\n  detectedLocale = locales[index]\n\n  // Remove the `/${locale}` part of the pathname.\n  pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n  return { pathname, detectedLocale }\n}\n","import type { OutgoingHttpHeaders } from 'http'\nimport type { DomainLocale, I18NConfig } from '../config-shared'\nimport type { I18NProvider } from '../lib/i18n-provider'\n\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'\n\ninterface Options {\n  base?: string | URL\n  headers?: OutgoingHttpHeaders\n  forceLocale?: boolean\n  nextConfig?: {\n    basePath?: string\n    i18n?: I18NConfig | null\n    trailingSlash?: boolean\n  }\n  i18nProvider?: I18NProvider\n}\n\nconst REGEX_LOCALHOST_HOSTNAME =\n  /^(?:127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)$/\n\nfunction parseURL(url: string | URL, base?: string | URL) {\n  const parsed = new URL(String(url), base && String(base))\n  if (REGEX_LOCALHOST_HOSTNAME.test(parsed.hostname)) {\n    parsed.hostname = 'localhost'\n  }\n  return parsed\n}\n\nconst Internal = Symbol('NextURLInternal')\n\nexport class NextURL {\n  private [Internal]: {\n    basePath: string\n    buildId?: string\n    flightSearchParameters?: Record<string, string>\n    defaultLocale?: string\n    domainLocale?: DomainLocale\n    locale?: string\n    options: Options\n    trailingSlash?: boolean\n    url: URL\n  }\n\n  constructor(input: string | URL, base?: string | URL, opts?: Options)\n  constructor(input: string | URL, opts?: Options)\n  constructor(\n    input: string | URL,\n    baseOrOpts?: string | URL | Options,\n    opts?: Options\n  ) {\n    let base: undefined | string | URL\n    let options: Options\n\n    if (\n      (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts) ||\n      typeof baseOrOpts === 'string'\n    ) {\n      base = baseOrOpts\n      options = opts || {}\n    } else {\n      options = opts || baseOrOpts || {}\n    }\n\n    this[Internal] = {\n      url: parseURL(input, base ?? options.base),\n      options: options,\n      basePath: '',\n    }\n\n    this.analyze()\n  }\n\n  private analyze() {\n    const info = getNextPathnameInfo(this[Internal].url.pathname, {\n      nextConfig: this[Internal].options.nextConfig,\n      parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n      i18nProvider: this[Internal].options.i18nProvider,\n    })\n\n    const hostname = getHostname(\n      this[Internal].url,\n      this[Internal].options.headers\n    )\n    this[Internal].domainLocale = this[Internal].options.i18nProvider\n      ? this[Internal].options.i18nProvider.detectDomainLocale(hostname)\n      : detectDomainLocale(\n          this[Internal].options.nextConfig?.i18n?.domains,\n          hostname\n        )\n\n    const defaultLocale =\n      this[Internal].domainLocale?.defaultLocale ||\n      this[Internal].options.nextConfig?.i18n?.defaultLocale\n\n    this[Internal].url.pathname = info.pathname\n    this[Internal].defaultLocale = defaultLocale\n    this[Internal].basePath = info.basePath ?? ''\n    this[Internal].buildId = info.buildId\n    this[Internal].locale = info.locale ?? defaultLocale\n    this[Internal].trailingSlash = info.trailingSlash\n  }\n\n  private formatPathname() {\n    return formatNextPathnameInfo({\n      basePath: this[Internal].basePath,\n      buildId: this[Internal].buildId,\n      defaultLocale: !this[Internal].options.forceLocale\n        ? this[Internal].defaultLocale\n        : undefined,\n      locale: this[Internal].locale,\n      pathname: this[Internal].url.pathname,\n      trailingSlash: this[Internal].trailingSlash,\n    })\n  }\n\n  private formatSearch() {\n    return this[Internal].url.search\n  }\n\n  public get buildId() {\n    return this[Internal].buildId\n  }\n\n  public set buildId(buildId: string | undefined) {\n    this[Internal].buildId = buildId\n  }\n\n  public get locale() {\n    return this[Internal].locale ?? ''\n  }\n\n  public set locale(locale: string) {\n    if (\n      !this[Internal].locale ||\n      !this[Internal].options.nextConfig?.i18n?.locales.includes(locale)\n    ) {\n      throw new TypeError(\n        `The NextURL configuration includes no locale \"${locale}\"`\n      )\n    }\n\n    this[Internal].locale = locale\n  }\n\n  get defaultLocale() {\n    return this[Internal].defaultLocale\n  }\n\n  get domainLocale() {\n    return this[Internal].domainLocale\n  }\n\n  get searchParams() {\n    return this[Internal].url.searchParams\n  }\n\n  get host() {\n    return this[Internal].url.host\n  }\n\n  set host(value: string) {\n    this[Internal].url.host = value\n  }\n\n  get hostname() {\n    return this[Internal].url.hostname\n  }\n\n  set hostname(value: string) {\n    this[Internal].url.hostname = value\n  }\n\n  get port() {\n    return this[Internal].url.port\n  }\n\n  set port(value: string) {\n    this[Internal].url.port = value\n  }\n\n  get protocol() {\n    return this[Internal].url.protocol\n  }\n\n  set protocol(value: string) {\n    this[Internal].url.protocol = value\n  }\n\n  get href() {\n    const pathname = this.formatPathname()\n    const search = this.formatSearch()\n    return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`\n  }\n\n  set href(url: string) {\n    this[Internal].url = parseURL(url)\n    this.analyze()\n  }\n\n  get origin() {\n    return this[Internal].url.origin\n  }\n\n  get pathname() {\n    return this[Internal].url.pathname\n  }\n\n  set pathname(value: string) {\n    this[Internal].url.pathname = value\n  }\n\n  get hash() {\n    return this[Internal].url.hash\n  }\n\n  set hash(value: string) {\n    this[Internal].url.hash = value\n  }\n\n  get search() {\n    return this[Internal].url.search\n  }\n\n  set search(value: string) {\n    this[Internal].url.search = value\n  }\n\n  get password() {\n    return this[Internal].url.password\n  }\n\n  set password(value: string) {\n    this[Internal].url.password = value\n  }\n\n  get username() {\n    return this[Internal].url.username\n  }\n\n  set username(value: string) {\n    this[Internal].url.username = value\n  }\n\n  get basePath() {\n    return this[Internal].basePath\n  }\n\n  set basePath(value: string) {\n    this[Internal].basePath = value.startsWith('/') ? value : `/${value}`\n  }\n\n  toString() {\n    return this.href\n  }\n\n  toJSON() {\n    return this.href\n  }\n\n  [Symbol.for('edge-runtime.inspect.custom')]() {\n    return {\n      href: this.href,\n      origin: this.origin,\n      protocol: this.protocol,\n      username: this.username,\n      password: this.password,\n      host: this.host,\n      hostname: this.hostname,\n      port: this.port,\n      pathname: this.pathname,\n      search: this.search,\n      searchParams: this.searchParams,\n      hash: this.hash,\n    }\n  }\n\n  clone() {\n    return new NextURL(String(this), this[Internal].options)\n  }\n}\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n  /**\n   * The base path in case the pathname included it.\n   */\n  basePath?: string\n  /**\n   * The buildId for when the parsed URL is a data URL. Parsing it can be\n   * disabled with the `parseData` option.\n   */\n  buildId?: string\n  /**\n   * If there was a locale in the pathname, this will hold its value.\n   */\n  locale?: string\n  /**\n   * The processed pathname without a base path, locale, or data URL elements\n   * when parsing it is enabled.\n   */\n  pathname: string\n  /**\n   * A boolean telling if the pathname had a trailingSlash. This can be only\n   * true if trailingSlash is enabled.\n   */\n  trailingSlash?: boolean\n}\n\ninterface Options {\n  /**\n   * When passed to true, this function will also parse Nextjs data URLs.\n   */\n  parseData?: boolean\n  /**\n   * A partial of the Next.js configuration to parse the URL.\n   */\n  nextConfig?: {\n    basePath?: string\n    i18n?: { locales?: readonly string[] } | null\n    trailingSlash?: boolean\n  }\n\n  /**\n   * If provided, this normalizer will be used to detect the locale instead of\n   * the default locale detection.\n   */\n  i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n  pathname: string,\n  options: Options\n): NextPathnameInfo {\n  const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n  const info: NextPathnameInfo = {\n    pathname,\n    trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n  }\n\n  if (basePath && pathHasPrefix(info.pathname, basePath)) {\n    info.pathname = removePathPrefix(info.pathname, basePath)\n    info.basePath = basePath\n  }\n  let pathnameNoDataPrefix = info.pathname\n\n  if (\n    info.pathname.startsWith('/_next/data/') &&\n    info.pathname.endsWith('.json')\n  ) {\n    const paths = info.pathname\n      .replace(/^\\/_next\\/data\\//, '')\n      .replace(/\\.json$/, '')\n      .split('/')\n\n    const buildId = paths[0]\n    info.buildId = buildId\n    pathnameNoDataPrefix =\n      paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n    // update pathname with normalized if enabled although\n    // we use normalized to populate locale info still\n    if (options.parseData === true) {\n      info.pathname = pathnameNoDataPrefix\n    }\n  }\n\n  // If provided, use the locale route normalizer to detect the locale instead\n  // of the function below.\n  if (i18n) {\n    let result = options.i18nProvider\n      ? options.i18nProvider.analyze(info.pathname)\n      : normalizeLocalePath(info.pathname, i18n.locales)\n\n    info.locale = result.detectedLocale\n    info.pathname = result.pathname ?? info.pathname\n\n    if (!result.detectedLocale && info.buildId) {\n      result = options.i18nProvider\n        ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n        : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n      if (result.detectedLocale) {\n        info.locale = result.detectedLocale\n      }\n    }\n  }\n  return info\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n  defaultLocale?: string\n  ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n  let pathname = addLocale(\n    info.pathname,\n    info.locale,\n    info.buildId ? undefined : info.defaultLocale,\n    info.ignorePrefix\n  )\n\n  if (info.buildId || !info.trailingSlash) {\n    pathname = removeTrailingSlash(pathname)\n  }\n\n  if (info.buildId) {\n    pathname = addPathSuffix(\n      addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n      info.pathname === '/' ? 'index.json' : '.json'\n    )\n  }\n\n  pathname = addPathPrefix(pathname, info.basePath)\n  return !info.buildId && info.trailingSlash\n    ? !pathname.endsWith('/')\n      ? addPathSuffix(pathname, '/')\n      : pathname\n    : removeTrailingSlash(pathname)\n}\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n  path: string,\n  locale?: string | false,\n  defaultLocale?: string,\n  ignorePrefix?: boolean\n) {\n  // If no locale was given or the locale is the default locale, we don't need\n  // to prefix the path.\n  if (!locale || locale === defaultLocale) return path\n\n  const lower = path.toLowerCase()\n\n  // If the path is an API path or the path already has the locale prefix, we\n  // don't need to prefix the path.\n  if (!ignorePrefix) {\n    if (pathHasPrefix(lower, '/api')) return path\n    if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n  }\n\n  // Add the locale prefix to the path.\n  return addPathPrefix(path, `/${locale}`)\n}\n","import type { I18NConfig } from '../../config-shared'\nimport { NextURL } from '../next-url'\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils'\nimport { RemovedUAError, RemovedPageError } from '../error'\nimport { RequestCookies } from './cookies'\n\nexport const INTERNALS = Symbol('internal request')\n\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */\nexport class NextRequest extends Request {\n  /** @internal */\n  [INTERNALS]: {\n    cookies: RequestCookies\n    url: string\n    nextUrl: NextURL\n  }\n\n  constructor(input: URL | RequestInfo, init: RequestInit = {}) {\n    const url =\n      typeof input !== 'string' && 'url' in input ? input.url : String(input)\n\n    validateURL(url)\n\n    // node Request instance requires duplex option when a body\n    // is present or it errors, we don't handle this for\n    // Request being passed in since it would have already\n    // errored if this wasn't configured\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      if (init.body && init.duplex !== 'half') {\n        init.duplex = 'half'\n      }\n    }\n\n    if (input instanceof Request) super(input, init)\n    else super(url, init)\n\n    const nextUrl = new NextURL(url, {\n      headers: toNodeOutgoingHttpHeaders(this.headers),\n      nextConfig: init.nextConfig,\n    })\n    this[INTERNALS] = {\n      cookies: new RequestCookies(this.headers),\n      nextUrl,\n      url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n        ? url\n        : nextUrl.toString(),\n    }\n  }\n\n  [Symbol.for('edge-runtime.inspect.custom')]() {\n    return {\n      cookies: this.cookies,\n      nextUrl: this.nextUrl,\n      url: this.url,\n      // rest of props come from Request\n      bodyUsed: this.bodyUsed,\n      cache: this.cache,\n      credentials: this.credentials,\n      destination: this.destination,\n      headers: Object.fromEntries(this.headers),\n      integrity: this.integrity,\n      keepalive: this.keepalive,\n      method: this.method,\n      mode: this.mode,\n      redirect: this.redirect,\n      referrer: this.referrer,\n      referrerPolicy: this.referrerPolicy,\n      signal: this.signal,\n    }\n  }\n\n  public get cookies() {\n    return this[INTERNALS].cookies\n  }\n\n  public get nextUrl() {\n    return this[INTERNALS].nextUrl\n  }\n\n  /**\n   * @deprecated\n   * `page` has been deprecated in favour of `URLPattern`.\n   * Read more: https://nextjs.org/docs/messages/middleware-request-page\n   */\n  public get page() {\n    throw new RemovedPageError()\n  }\n\n  /**\n   * @deprecated\n   * `ua` has been removed in favour of \\`userAgent\\` function.\n   * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n   */\n  public get ua() {\n    throw new RemovedUAError()\n  }\n\n  public get url() {\n    return this[INTERNALS].url\n  }\n}\n\nexport interface RequestInit extends globalThis.RequestInit {\n  nextConfig?: {\n    basePath?: string\n    i18n?: I18NConfig | null\n    trailingSlash?: boolean\n  }\n  signal?: AbortSignal\n  // see https://github.com/whatwg/fetch/pull/1457\n  duplex?: 'half'\n}\n","import type { BaseNextRequest } from '../../../base-http'\nimport type { NodeNextRequest } from '../../../base-http/node'\nimport type { WebNextRequest } from '../../../base-http/web'\nimport type { Writable } from 'node:stream'\n\nimport { getRequestMeta } from '../../../request-meta'\nimport { fromNodeOutgoingHttpHeaders } from '../../utils'\nimport { NextRequest } from '../request'\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers'\n\nexport const ResponseAbortedName = 'ResponseAborted'\nexport class ResponseAborted extends Error {\n  public readonly name = ResponseAbortedName\n}\n\n/**\n * Creates an AbortController tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * If the `close` event is fired before the `finish` event, then we'll send the\n * `abort` signal.\n */\nexport function createAbortController(response: Writable): AbortController {\n  const controller = new AbortController()\n\n  // If `finish` fires first, then `res.end()` has been called and the close is\n  // just us finishing the stream on our side. If `close` fires first, then we\n  // know the client disconnected before we finished.\n  response.once('close', () => {\n    if (response.writableFinished) return\n\n    controller.abort(new ResponseAborted())\n  })\n\n  return controller\n}\n\n/**\n * Creates an AbortSignal tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * This cannot be done with the request (IncomingMessage or Readable) because\n * the `abort` event will not fire if to data has been fully read (because that\n * will \"close\" the readable stream and nothing fires after that).\n */\nexport function signalFromNodeResponse(response: Writable): AbortSignal {\n  const { errored, destroyed } = response\n  if (errored || destroyed) {\n    return AbortSignal.abort(errored ?? new ResponseAborted())\n  }\n\n  const { signal } = createAbortController(response)\n  return signal\n}\n\nexport class NextRequestAdapter {\n  public static fromBaseNextRequest(\n    request: BaseNextRequest,\n    signal: AbortSignal\n  ): NextRequest {\n    if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME === 'edge' &&\n      isWebNextRequest(request)\n    ) {\n      return NextRequestAdapter.fromWebNextRequest(request)\n    } else if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(request)\n    ) {\n      return NextRequestAdapter.fromNodeNextRequest(request, signal)\n    } else {\n      throw new Error('Invariant: Unsupported NextRequest type')\n    }\n  }\n\n  public static fromNodeNextRequest(\n    request: NodeNextRequest,\n    signal: AbortSignal\n  ): NextRequest {\n    // HEAD and GET requests can not have a body.\n    let body: BodyInit | null = null\n    if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {\n      // @ts-expect-error - this is handled by undici, when streams/web land use it instead\n      body = request.body\n    }\n\n    let url: URL\n    if (request.url.startsWith('http')) {\n      url = new URL(request.url)\n    } else {\n      // Grab the full URL from the request metadata.\n      const base = getRequestMeta(request, 'initURL')\n      if (!base || !base.startsWith('http')) {\n        // Because the URL construction relies on the fact that the URL provided\n        // is absolute, we need to provide a base URL. We can't use the request\n        // URL because it's relative, so we use a dummy URL instead.\n        url = new URL(request.url, 'http://n')\n      } else {\n        url = new URL(request.url, base)\n      }\n    }\n\n    return new NextRequest(url, {\n      method: request.method,\n      headers: fromNodeOutgoingHttpHeaders(request.headers),\n      duplex: 'half',\n      signal,\n      // geo\n      // ip\n      // nextConfig\n\n      // body can not be passed if request was aborted\n      // or we get a Request body was disturbed error\n      ...(signal.aborted\n        ? {}\n        : {\n            body,\n          }),\n    })\n  }\n\n  public static fromWebNextRequest(request: WebNextRequest): NextRequest {\n    // HEAD and GET requests can not have a body.\n    let body: ReadableStream | null = null\n    if (request.method !== 'GET' && request.method !== 'HEAD') {\n      body = request.body\n    }\n\n    return new NextRequest(request.url, {\n      method: request.method,\n      headers: fromNodeOutgoingHttpHeaders(request.headers),\n      duplex: 'half',\n      signal: request.request.signal,\n      // geo\n      // ip\n      // nextConfig\n\n      // body can not be passed if request was aborted\n      // or we get a Request body was disturbed error\n      ...(request.request.signal.aborted\n        ? {}\n        : {\n            body,\n          }),\n    })\n  }\n}\n","import type { AppPageModule } from './route-modules/app-page/module'\n\n// Combined load times for loading client components\nlet clientComponentLoadStart = 0\nlet clientComponentLoadTimes = 0\nlet clientComponentLoadCount = 0\n\nexport function wrapClientComponentLoader(\n  ComponentMod: AppPageModule,\n  isTracingEnabled: boolean\n): AppPageModule['__next_app__'] {\n  if (\n    !('performance' in globalThis) ||\n    (!process.env.NEXT_OTEL_PERFORMANCE_PREFIX && !isTracingEnabled)\n  ) {\n    return ComponentMod.__next_app__\n  }\n\n  return {\n    require: (...args) => {\n      const startTime = performance.now()\n\n      if (clientComponentLoadStart === 0) {\n        clientComponentLoadStart = startTime\n      }\n\n      try {\n        clientComponentLoadCount += 1\n        return ComponentMod.__next_app__.require(...args)\n      } finally {\n        clientComponentLoadTimes += performance.now() - startTime\n      }\n    },\n    loadChunk: (...args) => {\n      const startTime = performance.now()\n      const result = ComponentMod.__next_app__.loadChunk(...args)\n      // Avoid wrapping `loadChunk`'s result in an extra promise in case something like React depends on its identity.\n      // We only need to know when it's settled.\n      result.finally(() => {\n        clientComponentLoadTimes += performance.now() - startTime\n      })\n      return result\n    },\n  }\n}\n\nexport function getClientComponentLoaderMetrics(\n  options: { reset?: boolean } = {}\n) {\n  const metrics =\n    clientComponentLoadStart === 0\n      ? undefined\n      : {\n          clientComponentLoadStart,\n          clientComponentLoadTimes,\n          clientComponentLoadCount,\n        }\n\n  if (options.reset) {\n    clientComponentLoadStart = 0\n    clientComponentLoadTimes = 0\n    clientComponentLoadCount = 0\n  }\n\n  return metrics\n}\n","import type { ServerResponse } from 'node:http'\nimport type { Readable } from 'node:stream'\n\nimport {\n  ResponseAbortedName,\n  createAbortController,\n} from './web/spec-extension/adapters/next-request'\nimport { DetachedPromise } from '../lib/detached-promise'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextNodeServerSpan } from './lib/trace/constants'\nimport { getClientComponentLoaderMetrics } from './client-component-renderer-logger'\n\nexport function isAbortError(e: any): e is Error & { name: 'AbortError' } {\n  return e?.name === 'AbortError' || e?.name === ResponseAbortedName\n}\n\nconst HAS_CLIENT_COMPONENT_METRICS_ENABLED =\n  'performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX\n\nfunction createWriterFromResponse(\n  res: ServerResponse,\n  waitUntilForEnd?: Promise<unknown>\n): WritableStream<Uint8Array> {\n  let started = false\n\n  // Create a promise that will resolve once the response has drained. See\n  // https://nodejs.org/api/stream.html#stream_event_drain\n  let drained = new DetachedPromise<void>()\n  function onDrain() {\n    drained.resolve()\n  }\n  res.on('drain', onDrain)\n\n  // If the finish event fires, it means we shouldn't block and wait for the\n  // drain event.\n  res.once('close', () => {\n    res.off('drain', onDrain)\n    drained.resolve()\n  })\n\n  // Create a promise that will resolve once the response has finished. See\n  // https://nodejs.org/api/http.html#event-finish_1\n  const finished = new DetachedPromise<void>()\n  res.once('finish', () => {\n    finished.resolve()\n  })\n\n  // Create a writable stream that will write to the response.\n  return new WritableStream<Uint8Array>({\n    write: async (chunk) => {\n      // You'd think we'd want to use `start` instead of placing this in `write`\n      // but this ensures that we don't actually flush the headers until we've\n      // started writing chunks.\n      if (!started) {\n        started = true\n\n        if (HAS_CLIENT_COMPONENT_METRICS_ENABLED) {\n          const metrics = getClientComponentLoaderMetrics()\n          if (metrics) {\n            performance.measure(\n              `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,\n              {\n                start: metrics.clientComponentLoadStart,\n                end:\n                  metrics.clientComponentLoadStart +\n                  metrics.clientComponentLoadTimes,\n              }\n            )\n          }\n        }\n\n        res.flushHeaders()\n        getTracer().trace(\n          NextNodeServerSpan.startResponse,\n          {\n            spanName: 'start response',\n          },\n          () => undefined\n        )\n      }\n\n      try {\n        const ok = res.write(chunk)\n\n        // Added by the `compression` middleware, this is a function that will\n        // flush the partially-compressed response to the client.\n        if ('flush' in res && typeof res.flush === 'function') {\n          res.flush()\n        }\n\n        // If the write returns false, it means there's some backpressure, so\n        // wait until it's streamed before continuing.\n        if (!ok) {\n          await drained.promise\n\n          // Reset the drained promise so that we can wait for the next drain event.\n          drained = new DetachedPromise<void>()\n        }\n      } catch (err) {\n        res.end()\n        throw new Error('failed to write chunk to response', { cause: err })\n      }\n    },\n    abort: (err) => {\n      if (res.writableFinished) return\n\n      res.destroy(err)\n    },\n    close: async () => {\n      // if a waitUntil promise was passed, wait for it to resolve before\n      // ending the response.\n      if (waitUntilForEnd) {\n        await waitUntilForEnd\n      }\n\n      if (res.writableFinished) return\n\n      res.end()\n      return finished.promise\n    },\n  })\n}\n\nexport async function pipeToNodeResponse(\n  readable: ReadableStream<Uint8Array>,\n  res: ServerResponse,\n  waitUntilForEnd?: Promise<unknown>\n) {\n  try {\n    // If the response has already errored, then just return now.\n    const { errored, destroyed } = res\n    if (errored || destroyed) return\n\n    // Create a new AbortController so that we can abort the readable if the\n    // client disconnects.\n    const controller = createAbortController(res)\n\n    const writer = createWriterFromResponse(res, waitUntilForEnd)\n\n    await readable.pipeTo(writer, { signal: controller.signal })\n  } catch (err: any) {\n    // If this isn't related to an abort error, re-throw it.\n    if (isAbortError(err)) return\n\n    throw new Error('failed to pipe response', { cause: err })\n  }\n}\n\nexport async function pipeNodeReadableToNodeResponse(\n  readable: Readable,\n  res: ServerResponse,\n  waitUntilForEnd?: Promise<unknown>\n) {\n  try {\n    const { errored, destroyed } = res\n    if (errored || destroyed) return\n\n    let started = false\n\n    const finished = new DetachedPromise<void>()\n\n    res.once('close', () => {\n      readable.destroy()\n      finished.resolve()\n    })\n\n    readable.on('data', (chunk: Buffer) => {\n      if (!started) {\n        started = true\n\n        if (\n          'performance' in globalThis &&\n          process.env.NEXT_OTEL_PERFORMANCE_PREFIX\n        ) {\n          const metrics = getClientComponentLoaderMetrics()\n          if (metrics) {\n            performance.measure(\n              `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,\n              {\n                start: metrics.clientComponentLoadStart,\n                end:\n                  metrics.clientComponentLoadStart +\n                  metrics.clientComponentLoadTimes,\n              }\n            )\n          }\n        }\n\n        res.flushHeaders()\n        getTracer().trace(\n          NextNodeServerSpan.startResponse,\n          {\n            spanName: 'start response',\n          },\n          () => undefined\n        )\n      }\n\n      const ok = res.write(chunk)\n\n      if ('flush' in res && typeof res.flush === 'function') {\n        res.flush()\n      }\n\n      if (!ok) {\n        readable.pause()\n        res.once('drain', () => {\n          readable.resume()\n        })\n      }\n    })\n\n    readable.on('end', async () => {\n      if (waitUntilForEnd) {\n        await waitUntilForEnd\n      }\n\n      if (!res.writableFinished) {\n        res.end()\n      }\n\n      finished.resolve()\n    })\n\n    readable.on('error', (err) => {\n      if (isAbortError(err)) {\n        finished.resolve()\n        return\n      }\n\n      res.destroy(err)\n      finished.resolve()\n    })\n\n    await finished.promise\n  } catch (err: any) {\n    if (isAbortError(err)) return\n\n    throw new Error('failed to pipe response', { cause: err })\n  }\n}\n","import type { OutgoingHttpHeaders, ServerResponse } from 'http'\nimport type { Readable } from 'stream'\nimport type { CacheControl } from './lib/cache-control'\nimport type { FetchMetrics } from './base-http'\nimport type { PrefetchHints } from '../shared/lib/app-router-types'\n\nimport {\n  chainStreams,\n  streamFromBuffer,\n  streamFromString,\n  streamToString,\n} from './stream-utils/node-web-streams-helper'\nimport {\n  isAbortError,\n  pipeToNodeResponse,\n  pipeNodeReadableToNodeResponse,\n} from './pipe-readable'\nimport type { RenderResumeDataCache } from './resume-data-cache/resume-data-cache'\nimport { InvariantError } from '../shared/lib/invariant-error'\nimport type {\n  HTML_CONTENT_TYPE_HEADER,\n  JSON_CONTENT_TYPE_HEADER,\n  TEXT_PLAIN_CONTENT_TYPE_HEADER,\n} from '../lib/constants'\nimport type { RSC_CONTENT_TYPE_HEADER } from '../client/components/app-router-headers'\n\ntype ContentTypeOption =\n  | typeof RSC_CONTENT_TYPE_HEADER // For App Page RSC responses\n  | typeof HTML_CONTENT_TYPE_HEADER // For App Page, Pages HTML responses\n  | typeof JSON_CONTENT_TYPE_HEADER // For API routes, Next.js data requests\n  | typeof TEXT_PLAIN_CONTENT_TYPE_HEADER // For simplified errors\n\nexport type AppPageRenderResultMetadata = {\n  flightData?: Buffer\n  cacheControl?: CacheControl\n  staticBailoutInfo?: {\n    stack?: string\n    description?: string\n  }\n\n  /**\n   * The postponed state if the render had postponed and needs to be resumed.\n   */\n  postponed?: string\n\n  /**\n   * Whether the prerender left any UI pending in a Suspense boundary. This is\n   * reported directly by React's prerender result before Next.js resumes\n   * client-only boundaries.\n   */\n  hasPendingUi?: boolean\n\n  /**\n   * The headers to set on the response that were added by the render.\n   */\n  headers?: OutgoingHttpHeaders\n  statusCode?: number\n  fetchTags?: string\n  fetchMetrics?: FetchMetrics\n\n  segmentData?: Map<string, Buffer>\n\n  /**\n   * Per-route prefetch hints computed at build time (e.g. segment inlining\n   * decisions based on gzip sizes). Written to prefetch-hints.json by the\n   * build pipeline.\n   */\n  prefetchHints?: PrefetchHints\n\n  /**\n   * In development, the resume data cache is warmed up before the render. This\n   * is attached to the metadata so that it can be used during the render. When\n   * prerendering, the filled resume data cache is also attached to the metadata\n   * so that it can be used when prerendering matching fallback shells.\n   */\n  renderResumeDataCache?: RenderResumeDataCache\n}\n\nexport type PagesRenderResultMetadata = {\n  pageData?: any\n  cacheControl?: CacheControl\n  isNotFound?: boolean\n  isRedirect?: boolean\n}\n\nexport type StaticRenderResultMetadata = {}\n\nexport type RenderResultMetadata = AppPageRenderResultMetadata &\n  PagesRenderResultMetadata &\n  StaticRenderResultMetadata\n\nexport type RenderResultResponse =\n  | ReadableStream<Uint8Array>[]\n  | ReadableStream<Uint8Array>\n  | Readable\n  | string\n  | Buffer\n  | null\n\nexport type RenderResultOptions<\n  Metadata extends RenderResultMetadata = RenderResultMetadata,\n> = {\n  contentType: ContentTypeOption | null\n  waitUntil?: Promise<unknown>\n  metadata: Metadata\n}\n\nfunction isNodeReadable(value: unknown): value is Readable {\n  return (\n    value !== null &&\n    typeof value === 'object' &&\n    typeof (value as Record<string, unknown>).pipe === 'function' &&\n    typeof (value as Record<string, unknown>).on === 'function' &&\n    !(value instanceof ReadableStream)\n  )\n}\n\nexport default class RenderResult<\n  Metadata extends RenderResultMetadata = RenderResultMetadata,\n> {\n  /**\n   * The detected content type for the response. This is used to set the\n   * `Content-Type` header.\n   */\n  public readonly contentType: ContentTypeOption | null\n\n  /**\n   * The metadata for the response. This is used to set the revalidation times\n   * and other metadata.\n   */\n  public readonly metadata: Readonly<Metadata>\n\n  /**\n   * The response itself. This can be a string, a stream, or null. If it's a\n   * string, then it's a static response. If it's a stream, then it's a\n   * dynamic response. If it's null, then the response was not found or was\n   * already sent.\n   */\n  private response: RenderResultResponse\n\n  /**\n   * A render result that represents an empty response. This is used to\n   * represent a response that was not found or was already sent.\n   */\n  public static readonly EMPTY = new RenderResult<StaticRenderResultMetadata>(\n    null,\n    { metadata: {}, contentType: null }\n  )\n\n  /**\n   * Creates a new RenderResult instance from a static response.\n   *\n   * @param value the static response value\n   * @param contentType the content type of the response\n   * @returns a new RenderResult instance\n   */\n  public static fromStatic(\n    value: string | Buffer,\n    contentType: ContentTypeOption\n  ) {\n    return new RenderResult<StaticRenderResultMetadata>(value, {\n      metadata: {},\n      contentType,\n    })\n  }\n\n  private readonly waitUntil?: Promise<unknown>\n\n  constructor(\n    response: RenderResultResponse,\n    { contentType, waitUntil, metadata }: RenderResultOptions<Metadata>\n  ) {\n    this.response = response\n    this.contentType = contentType\n    this.metadata = metadata\n    this.waitUntil = waitUntil\n  }\n\n  public assignMetadata(metadata: Metadata) {\n    Object.assign(this.metadata, metadata)\n  }\n\n  /**\n   * Returns true if the response is null. It can be null if the response was\n   * not found or was already sent.\n   */\n  public get isNull(): boolean {\n    return this.response === null\n  }\n\n  /**\n   * Returns false if the response is a string. It can be a string if the page\n   * was prerendered. If it's not, then it was generated dynamically.\n   */\n  public get isDynamic(): boolean {\n    return typeof this.response !== 'string'\n  }\n\n  /**\n   * Returns the response if it is a string. If the page was dynamic, this will\n   * return a promise if the `stream` option is true, or it will throw an error.\n   *\n   * @param stream Whether or not to return a promise if the response is dynamic\n   * @returns The response as a string\n   */\n  public toUnchunkedString(stream?: false): string\n  public toUnchunkedString(stream: true): Promise<string>\n  public toUnchunkedString(stream = false): Promise<string> | string {\n    if (this.response === null) {\n      // If the response is null, return an empty string. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return ''\n    }\n\n    if (typeof this.response !== 'string') {\n      if (!stream) {\n        throw new InvariantError(\n          'dynamic responses cannot be unchunked. This is a bug in Next.js'\n        )\n      }\n\n      return streamToString(this.readable)\n    }\n\n    return this.response\n  }\n\n  /**\n   * Returns a readable stream of the response.\n   */\n  private get readable(): ReadableStream<Uint8Array> {\n    if (this.response === null) {\n      // If the response is null, return an empty stream. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return new ReadableStream<Uint8Array>({\n        start(controller) {\n          controller.close()\n        },\n      })\n    }\n\n    if (typeof this.response === 'string') {\n      return streamFromString(this.response)\n    }\n\n    if (Buffer.isBuffer(this.response)) {\n      return streamFromBuffer(this.response)\n    }\n\n    // If the response is an array of streams, then chain them together.\n    if (Array.isArray(this.response)) {\n      return chainStreams(...this.response)\n    }\n\n    if (isNodeReadable(this.response)) {\n      if (process.env.NEXT_RUNTIME === 'edge') {\n        throw new InvariantError(\n          'Node.js Readable cannot be converted to a web stream in the edge runtime'\n        )\n      } else {\n        let Readable: typeof import('node:stream').Readable\n        if (process.env.TURBOPACK) {\n          Readable = (require('node:stream') as typeof import('node:stream'))\n            .Readable\n        } else {\n          Readable = (\n            __non_webpack_require__(\n              'node:stream'\n            ) as typeof import('node:stream')\n          ).Readable\n        }\n        return Readable.toWeb(this.response) as ReadableStream<Uint8Array>\n      }\n    }\n\n    return this.response\n  }\n\n  /**\n   * Coerces the response to an array of streams. This will convert the response\n   * to an array of streams if it is not already one.\n   *\n   * @returns An array of streams\n   */\n  private coerce(): ReadableStream<Uint8Array>[] {\n    if (this.response === null) {\n      // If the response is null, return an empty stream. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return []\n    }\n\n    if (typeof this.response === 'string') {\n      return [streamFromString(this.response)]\n    } else if (Array.isArray(this.response)) {\n      return this.response\n    } else if (Buffer.isBuffer(this.response)) {\n      return [streamFromBuffer(this.response)]\n    } else if (isNodeReadable(this.response)) {\n      if (process.env.NEXT_RUNTIME === 'edge') {\n        throw new InvariantError(\n          'Node.js Readable cannot be converted to a web stream in the edge runtime'\n        )\n      } else {\n        let Readable: typeof import('node:stream').Readable\n        if (process.env.TURBOPACK) {\n          Readable = (require('node:stream') as typeof import('node:stream'))\n            .Readable\n        } else {\n          Readable = (\n            __non_webpack_require__(\n              'node:stream'\n            ) as typeof import('node:stream')\n          ).Readable\n        }\n        return [Readable.toWeb(this.response) as ReadableStream<Uint8Array>]\n      }\n    } else {\n      return [this.response]\n    }\n  }\n\n  /**\n   * Pipes the response through a transform stream. This converts the response\n   * to a single readable stream (chaining if needed) and pipes it through the\n   * provided transform.\n   *\n   * @param transform The transform stream to pipe through\n   */\n  public pipeThrough(transform: TransformStream<Uint8Array, Uint8Array>): void {\n    this.response = this.readable.pipeThrough(transform)\n  }\n\n  /**\n   * Unshifts a new stream to the response. This will convert the response to an\n   * array of streams if it is not already one and will add the new stream to\n   * the start of the array. When this response is piped, all of the streams\n   * will be piped one after the other.\n   *\n   * @param readable The new stream to unshift\n   */\n  public unshift(readable: ReadableStream<Uint8Array>): void {\n    // Coerce the response to an array of streams.\n    this.response = this.coerce()\n\n    // Add the new stream to the start of the array.\n    this.response.unshift(readable)\n  }\n\n  /**\n   * Chains a new stream to the response. This will convert the response to an\n   * array of streams if it is not already one and will add the new stream to\n   * the end. When this response is piped, all of the streams will be piped\n   * one after the other.\n   *\n   * @param readable The new stream to chain\n   */\n  public push(readable: ReadableStream<Uint8Array>): void {\n    // Coerce the response to an array of streams.\n    this.response = this.coerce()\n\n    // Add the new stream to the end of the array.\n    this.response.push(readable)\n  }\n\n  /**\n   * Pipes the response to a writable stream. This will close/cancel the\n   * writable stream if an error is encountered. If this doesn't throw, then\n   * the writable stream will be closed or aborted.\n   *\n   * @param writable Writable stream to pipe the response to\n   */\n  public async pipeTo(writable: WritableStream<Uint8Array>): Promise<void> {\n    try {\n      await this.readable.pipeTo(writable, {\n        // We want to close the writable stream ourselves so that we can wait\n        // for the waitUntil promise to resolve before closing it. If an error\n        // is encountered, we'll abort the writable stream if we swallowed the\n        // error.\n        preventClose: true,\n      })\n\n      // If there is a waitUntil promise, wait for it to resolve before\n      // closing the writable stream.\n      if (this.waitUntil) await this.waitUntil\n\n      // Close the writable stream.\n      await writable.close()\n    } catch (err) {\n      // If this is an abort error, we should abort the writable stream (as we\n      // took ownership of it when we started piping). We don't need to re-throw\n      // because we handled the error.\n      if (isAbortError(err)) {\n        // Abort the writable stream if an error is encountered.\n        await writable.abort(err)\n\n        return\n      }\n\n      // We're not aborting the writer here as when this method throws it's not\n      // clear as to how so the caller should assume it's their responsibility\n      // to clean up the writer.\n      throw err\n    }\n  }\n\n  /**\n   * Pipes the response to a node response. This will close/cancel the node\n   * response if an error is encountered.\n   *\n   * @param res\n   */\n  public async pipeToNodeResponse(res: ServerResponse) {\n    if (\n      this.response !== null &&\n      typeof this.response !== 'string' &&\n      !Buffer.isBuffer(this.response) &&\n      !Array.isArray(this.response) &&\n      isNodeReadable(this.response)\n    ) {\n      await pipeNodeReadableToNodeResponse(this.response, res, this.waitUntil)\n      return\n    }\n    await pipeToNodeResponse(this.readable, res, this.waitUntil)\n  }\n}\n","import {\n  RSC_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_RSC_UNION_QUERY,\n  NEXT_INSTANT_TEST_COOKIE,\n} from '../../client/components/app-router-headers'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\n\n/**\n * Builds the inline bootstrap script content for the Instant Navigation Testing\n * API. It is embedded via React's `bootstrapScriptContent` into the prerendered\n * shell (and dynamic renders) so that it ends up in the cached static prelude\n * and runs before the client bootstrap module (app-index) reads\n * self.__next_instant_test as its hydration source.\n *\n * The script is cookie-guarded so it is inert unless the instant test cookie is\n * present (the prelude is shared across all requests). The fetch mirrors the\n * __NEXT_CLIENT_RESUME prefetch used for fallback routes; the instant test\n * cookie rides along on the same-origin request, so the server returns\n * static-only data, which doubles as the feature flag (truthy = instant mode).\n */\nexport async function getInstantTestBootstrapScriptContent(): Promise<string> {\n  const segmentPath = '/_full'\n  const cacheBustingHeader = await computeCacheBustingSearchParam(\n    '1',\n    segmentPath,\n    undefined,\n    undefined\n  )\n  const searchStr = `${NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`\n  return `if(document.cookie.indexOf('${NEXT_INSTANT_TEST_COOKIE}=')>-1){self.__next_instant_test=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${RSC_HEADER}':'1','${NEXT_ROUTER_PREFETCH_HEADER}':'1','${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}':'${segmentPath}'}})}`\n}\n","import type { NextParsedUrlQuery } from './request-meta'\n\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst INTERNAL_QUERY_NAMES = [NEXT_RSC_UNION_QUERY] as const\n\nexport function stripInternalQueries(query: NextParsedUrlQuery) {\n  for (const name of INTERNAL_QUERY_NAMES) {\n    delete query[name]\n  }\n}\n\nexport function stripInternalSearchParams<T extends string | URL>(url: T): T {\n  const isStringUrl = typeof url === 'string'\n  const instance = isStringUrl ? new URL(url) : (url as URL)\n\n  instance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  return (isStringUrl ? instance.toString() : instance) as T\n}\n","import type { AppRenderContext } from '../../server/app-render/app-render'\nimport type { MetadataContext } from './types/resolvers'\n\nexport function createMetadataContext(\n  renderOpts: AppRenderContext['renderOpts']\n): MetadataContext {\n  return {\n    trailingSlash: renderOpts.trailingSlash,\n    isStaticMetadataRouteFile: false,\n  }\n}\n","import type { IncomingHttpHeaders } from 'http'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\n\nimport {\n  COOKIE_NAME_PRERENDER_BYPASS,\n  checkIsOnDemandRevalidate,\n} from '../api-utils'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nexport class DraftModeProvider {\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private _isEnabled: boolean\n\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private readonly _previewModeId: string | undefined\n\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private readonly _mutableCookies: ResponseCookies\n\n  constructor(\n    previewProps: __ApiPreviewProps | undefined,\n    headers: Headers | IncomingHttpHeaders,\n    cookies: ReadonlyRequestCookies,\n    mutableCookies: ResponseCookies\n  ) {\n    // The logic for draftMode() is very similar to tryGetPreviewData()\n    // but Draft Mode does not have any data associated with it.\n    const isOnDemandRevalidate =\n      previewProps &&\n      checkIsOnDemandRevalidate(headers, previewProps).isOnDemandRevalidate\n\n    const cookieValue = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)?.value\n\n    this._isEnabled = Boolean(\n      !isOnDemandRevalidate &&\n        cookieValue &&\n        previewProps &&\n        (cookieValue === previewProps.previewModeId ||\n          // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n          (process.env.NODE_ENV !== 'production' &&\n            previewProps.previewModeId === 'development-id'))\n    )\n\n    this._previewModeId = previewProps?.previewModeId\n    this._mutableCookies = mutableCookies\n  }\n\n  get isEnabled() {\n    return this._isEnabled\n  }\n\n  enable() {\n    if (!this._previewModeId) {\n      throw new Error(\n        'Invariant: previewProps missing previewModeId this should never happen'\n      )\n    }\n\n    this._mutableCookies.set({\n      name: COOKIE_NAME_PRERENDER_BYPASS,\n      value: this._previewModeId,\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n    })\n\n    this._isEnabled = true\n  }\n\n  disable() {\n    // To delete a cookie, set `expires` to a date in the past:\n    // https://tools.ietf.org/html/rfc6265#section-4.1.1\n    // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n    this._mutableCookies.set({\n      name: COOKIE_NAME_PRERENDER_BYPASS,\n      value: '',\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      expires: new Date(0),\n    })\n\n    this._isEnabled = false\n  }\n}\n","import type { BaseNextRequest, BaseNextResponse } from '../base-http'\nimport type { IncomingHttpHeaders } from 'http'\nimport type { RequestStore } from '../app-render/work-unit-async-storage.external'\nimport type { RenderOpts } from '../app-render/types'\nimport type { NextRequest } from '../web/spec-extension/request'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nimport {\n  FLIGHT_HEADERS,\n  NEXT_HTML_REQUEST_ID_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n} from '../../client/components/app-router-headers'\nimport {\n  HeadersAdapter,\n  type ReadonlyHeaders,\n} from '../web/spec-extension/adapters/headers'\nimport {\n  MutableRequestCookiesAdapter,\n  RequestCookiesAdapter,\n  responseCookiesToRequestCookies,\n  createCookiesWithMutableAccessCheck,\n  type ReadonlyRequestCookies,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'\nimport { DraftModeProvider } from './draft-mode-provider'\nimport { splitCookiesString } from '../web/utils'\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type { ResumeDataCache } from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\n\n/**\n * Internal request headers that userland `headers()` must not expose. They stay\n * on the shared request headers for framework plumbing.\n *\n * Every internal header that the client can send must be listed here. The\n * sealed userland view reads through to the shared request headers, so an\n * omission leaks the header to userland.\n *\n * The names are lowercased because `HeadersAdapter.seal` matches them in\n * lowercase.\n */\nconst HIDDEN_REQUEST_HEADERS: ReadonlySet<string> = new Set(\n  [\n    ...FLIGHT_HEADERS,\n    // The client sends these dev-only request IDs so the server can route debug\n    // information back to the originating request. Like the flight headers,\n    // they are internal plumbing.\n    NEXT_REQUEST_ID_HEADER,\n    NEXT_HTML_REQUEST_ID_HEADER,\n  ].map((header) => header.toLowerCase())\n)\n\nfunction getHeaders(headers: Headers | IncomingHttpHeaders): ReadonlyHeaders {\n  // The sealed userland view must not copy the request headers.\n  // `HeadersAdapter.from` returns a `Headers` instance unchanged, so the view\n  // reads through to `NextRequest.headers`. A copy detaches `headers()` from\n  // the writes that Proxy makes to `NextRequest.headers` afterwards.\n  //\n  // The view must also not delete the internal headers. Because\n  // `HeadersAdapter.from` does not copy, a delete removes them from the shared\n  // `req.headers`. The dev server reads the request-id headers from the raw\n  // request again, for example when it renders a redirect target after a server\n  // action. Their removal breaks the dev debug channel routing.\n  return HeadersAdapter.seal(\n    HeadersAdapter.from(headers),\n    HIDDEN_REQUEST_HEADERS\n  )\n}\n\nfunction getMutableCookies(\n  headers: Headers | IncomingHttpHeaders,\n  onUpdateCookies?: (cookies: string[]) => void\n): ResponseCookies {\n  const cookies = new RequestCookies(HeadersAdapter.from(headers))\n  return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies)\n}\n\nexport type WrapperRenderOpts = Partial<Pick<RenderOpts, 'onUpdateCookies'>> & {\n  previewProps?: __ApiPreviewProps\n}\n\ntype RequestContext = RequestResponsePair & {\n  /**\n   * The URL of the request. This only specifies the pathname and the search\n   * part of the URL. This is only undefined when generating static paths (ie,\n   * there is no request in progress, nor do we know one).\n   */\n  url: {\n    /**\n     * The pathname of the requested URL.\n     */\n    pathname: string\n\n    /**\n     * The search part of the requested URL. If the request did not provide a\n     * search part, this will be an empty string.\n     */\n    search?: string\n  }\n  phase: RequestStore['phase']\n  renderOpts?: WrapperRenderOpts\n  isHmrRefresh?: boolean\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n  implicitTags: ImplicitTags\n}\n\ntype RequestResponsePair =\n  | { req: BaseNextRequest; res: BaseNextResponse } // for an app page\n  | { req: NextRequest; res: undefined } // in an api route or middleware\n\n/**\n * The fields the request store actually reads from `req` / `res`. Decoupling\n * the store's construction from `IncomingMessage` / `BaseNextRequest` /\n * `NextRequest` lets it be built without a real `req`/`res` (e.g. by the `'use\n * cache'` deadlock probe worker, which only has a serializable snapshot of the\n * outer request).\n */\nexport type RequestStoreInputs = {\n  phase: RequestStore['phase']\n  /**\n   * Raw headers, either as a Web `Headers` instance or Node's\n   * `IncomingHttpHeaders`.\n   */\n  headers: Headers | IncomingHttpHeaders\n  /**\n   * Called whenever userspace mutates cookies (via `cookies().set(...)` etc.).\n   * Real renders wire this to `res.setHeader('Set-Cookie', cookies)`. Pass\n   * `undefined` for callers without a response (e.g. probe workers). Cookie\n   * writes during `'render'` are still gated by\n   * `MutableRequestCookiesAdapter`'s phase guard, so leaving this off doesn't\n   * silently accept writes that would otherwise be rejected.\n   */\n  onUpdateCookies: ((cookies: string[]) => void) | undefined\n  url: { pathname: string; search?: string }\n  rootParams: Params\n  implicitTags: ImplicitTags\n  resumeDataCache: ResumeDataCache | null\n  previewProps: WrapperRenderOpts['previewProps']\n  isHmrRefresh: boolean | undefined\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n  /**\n   * The hash of the most recent server component change (dev only). Included in\n   * `\"use cache\"` cache keys so that cached entries are revalidated after an\n   * edit, for every client, regardless of whether it runs the HMR client.\n   */\n  hmrRefreshHash: string | undefined\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n}\n\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */\nfunction mergeMiddlewareCookies(\n  headers: Headers | IncomingHttpHeaders,\n  existingCookies: RequestCookies | ResponseCookies\n) {\n  // TODO: this only fires for `IncomingHttpHeaders`; `Headers` instances\n  // silently fall through (the `in` check and bracket access don't reach header\n  // values stored in internal slots). Confirm whether edge / Web `Headers`\n  // callers need this merge or already handle it elsewhere.\n  if (\n    'x-middleware-set-cookie' in headers &&\n    typeof headers['x-middleware-set-cookie'] === 'string'\n  ) {\n    const setCookieValue = headers['x-middleware-set-cookie']\n    const responseHeaders = new Headers()\n\n    for (const cookie of splitCookiesString(setCookieValue)) {\n      responseHeaders.append('set-cookie', cookie)\n    }\n\n    const responseCookies = new ResponseCookies(responseHeaders)\n\n    // Transfer cookies from ResponseCookies to RequestCookies\n    for (const cookie of responseCookies.getAll()) {\n      existingCookies.set(cookie)\n    }\n  }\n}\n\nexport function createRequestStoreForRender(\n  req: RequestContext['req'],\n  res: RequestContext['res'],\n  url: RequestContext['url'],\n  rootParams: Params,\n  implicitTags: RequestContext['implicitTags'],\n  onUpdateCookies: RenderOpts['onUpdateCookies'],\n  previewProps: WrapperRenderOpts['previewProps'],\n  isHmrRefresh: RequestContext['isHmrRefresh'],\n  serverComponentsHmrCache: RequestContext['serverComponentsHmrCache'],\n  resumeDataCache: ResumeDataCache | null,\n  fallbackParams: OpaqueFallbackRouteParams | null,\n  hmrRefreshHash: string | undefined\n): RequestStore {\n  return createRequestStore({\n    // Pages start in render phase by default\n    phase: 'render',\n    headers: req.headers,\n    onUpdateCookies:\n      onUpdateCookies ??\n      (res\n        ? (cookies: string[]) => {\n            res.setHeader('Set-Cookie', cookies)\n          }\n        : undefined),\n    url,\n    rootParams,\n    implicitTags,\n    resumeDataCache,\n    previewProps,\n    isHmrRefresh,\n    serverComponentsHmrCache,\n    hmrRefreshHash,\n    fallbackParams,\n  })\n}\n\nexport function createRequestStoreForAPI(\n  req: RequestContext['req'],\n  url: RequestContext['url'],\n  implicitTags: RequestContext['implicitTags'],\n  onUpdateCookies: RenderOpts['onUpdateCookies'],\n  previewProps: WrapperRenderOpts['previewProps'],\n  hmrRefreshHash: string | undefined\n): RequestStore {\n  return createRequestStore({\n    // API routes start in action phase by default\n    phase: 'action',\n    headers: req.headers,\n    onUpdateCookies,\n    url,\n    rootParams: {},\n    implicitTags,\n    resumeDataCache: null,\n    previewProps,\n    isHmrRefresh: false,\n    serverComponentsHmrCache: undefined,\n    hmrRefreshHash,\n    fallbackParams: null,\n  })\n}\n\n/**\n * Build a `RequestStore` from a serializable, request-shaped input. Used\n * directly by the existing `createRequestStoreForRender` /\n * `createRequestStoreForAPI` wrappers, and by side-process consumers like the\n * `'use cache'` deadlock probe worker that don't have a real `req`/`res` pair\n * but do have a forwarded snapshot of the outer request's headers etc.\n */\nexport function createRequestStore(inputs: RequestStoreInputs): RequestStore {\n  const {\n    phase,\n    headers,\n    onUpdateCookies,\n    url,\n    rootParams,\n    implicitTags,\n    resumeDataCache,\n    previewProps,\n    isHmrRefresh,\n    serverComponentsHmrCache,\n    hmrRefreshHash,\n    fallbackParams,\n  } = inputs\n\n  const cache: {\n    headers?: ReadonlyHeaders\n    cookies?: ReadonlyRequestCookies\n    mutableCookies?: ResponseCookies\n    userspaceMutableCookies?: ResponseCookies\n    draftMode?: DraftModeProvider\n  } = {}\n\n  return {\n    type: 'request',\n    phase,\n    implicitTags,\n    // Rather than just using the whole `url` here, we pull the parts we want\n    // to ensure we don't use parts of the URL that we shouldn't. This also\n    // lets us avoid requiring an empty string for `search` in the type.\n    url: { pathname: url.pathname, search: url.search ?? '' },\n    rootParams,\n    get headers() {\n      if (!cache.headers) {\n        // Seal the headers object that'll freeze out any methods that could\n        // mutate the underlying data.\n        cache.headers = getHeaders(headers)\n      }\n\n      return cache.headers\n    },\n    get cookies() {\n      if (!cache.cookies) {\n        // if middleware is setting cookie(s), then include those in\n        // the initial cached cookies so they can be read in render\n        const requestCookies = new RequestCookies(HeadersAdapter.from(headers))\n\n        mergeMiddlewareCookies(headers, requestCookies)\n\n        // Seal the cookies object that'll freeze out any methods that could\n        // mutate the underlying data.\n        cache.cookies = RequestCookiesAdapter.seal(requestCookies)\n      }\n\n      return cache.cookies\n    },\n    set cookies(value: ReadonlyRequestCookies) {\n      cache.cookies = value\n    },\n    get mutableCookies() {\n      if (!cache.mutableCookies) {\n        const mutableCookies = getMutableCookies(headers, onUpdateCookies)\n\n        mergeMiddlewareCookies(headers, mutableCookies)\n\n        cache.mutableCookies = mutableCookies\n      }\n      return cache.mutableCookies\n    },\n    get userspaceMutableCookies() {\n      if (!cache.userspaceMutableCookies) {\n        const userspaceMutableCookies =\n          createCookiesWithMutableAccessCheck(this)\n        cache.userspaceMutableCookies = userspaceMutableCookies\n      }\n      return cache.userspaceMutableCookies\n    },\n    get draftMode() {\n      if (!cache.draftMode) {\n        cache.draftMode = new DraftModeProvider(\n          previewProps,\n          headers,\n          this.cookies,\n          this.mutableCookies\n        )\n      }\n\n      return cache.draftMode\n    },\n    resumeDataCache: resumeDataCache ?? null,\n    isHmrRefresh,\n    serverComponentsHmrCache:\n      serverComponentsHmrCache ||\n      (globalThis as any).__serverComponentsHmrCache,\n    hmrRefreshHash,\n    fallbackParams,\n  }\n}\n\nexport function synchronizeMutableCookies(store: RequestStore) {\n  // TODO: does this need to update headers as well?\n  store.cookies = RequestCookiesAdapter.seal(\n    responseCookiesToRequestCookies(store.mutableCookies)\n  )\n}\n","export type LazyResult<TValue> = PromiseLike<TValue> & { value?: TValue }\nexport type ResolvedLazyResult<TValue> = PromiseLike<TValue> & { value: TValue }\n\n/**\n * Calls the given function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */\nexport function createLazyResult<TValue>(\n  fn: () => Promise<TValue> | TValue\n): LazyResult<TValue> {\n  let pendingResult: Promise<TValue> | undefined\n\n  const result: LazyResult<TValue> = {\n    then(onfulfilled, onrejected) {\n      if (!pendingResult) {\n        pendingResult = Promise.resolve(fn())\n      }\n\n      pendingResult\n        .then((value) => {\n          result.value = value\n        })\n        .catch(() => {\n          // The externally awaited result will be rejected via `onrejected`. We\n          // don't need to handle it here. But we do want to avoid an unhandled\n          // rejection.\n        })\n\n      return pendingResult.then(onfulfilled, onrejected)\n    },\n  }\n\n  return result\n}\n\nexport function isResolvedLazyResult<TValue>(\n  result: LazyResult<TValue>\n): result is ResolvedLazyResult<TValue> {\n  return result.hasOwnProperty('value')\n}\n","/**\n * The lifecycle events Cache Components validation emits so E2E tests can\n * locate the validation window in the CLI output. Each is serialized between\n * `<VALIDATION_MESSAGE>` delimiters (see `formatValidationEvent`) and parsed\n * back by the test harness. Produced by the in-process validation in\n * `app-render.tsx` (both dev and build) and by the validation worker, which is\n * why the shape lives here rather than in a single producer.\n *\n * `requestId` correlates a start with its matching end/aborted. Dev and worker\n * validation use the render's request id; build validation, which has no such\n * id, uses a stringified timestamp instead.\n */\nexport type ValidationEvent =\n  | ValidationStartEvent\n  | ValidationEndEvent\n  | ValidationAbortedEvent\n\nexport type ValidationStartEvent = {\n  type: 'validation_start'\n  requestId: string\n  url: string\n  /**\n   * Only reported for development validation.\n   */\n  responseFinished?: boolean\n}\n\nexport type ValidationEndEvent = {\n  type: 'validation_end'\n  requestId: string\n  url: string\n}\n\n/**\n * Emitted when detached validation is aborted. It can appear without a start\n * when cancellation happens before validation runs, or after a start instead of\n * an end when in-flight validation is cancelled.\n */\nexport type ValidationAbortedEvent = {\n  type: 'validation_aborted'\n  requestId: string\n  url: string\n}\n\n/**\n * Wraps a validation event in the `<VALIDATION_MESSAGE>` delimiters the test\n * harness scans for. The caller chooses the output stream (dev validation logs\n * to stdout; build validation uses stderr for deterministic ordering).\n */\nexport function formatValidationEvent(event: ValidationEvent): string {\n  return (\n    '<VALIDATION_MESSAGE>' + JSON.stringify(event) + '</VALIDATION_MESSAGE>'\n  )\n}\n","import type { Params } from '../request/params'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport type { NextParsedUrlQuery } from '../request-meta'\nimport type { PrefetchingMode } from './app-render'\nimport type { NextConfigComplete, ValidationLevel } from '../config-shared'\nimport type { ImageConfigComplete } from '../../shared/lib/image-config'\nimport type { StageEndTimes } from './instant-validation/instant-validation'\n\n/**\n * Cross-module handoff for the dev validation worker (client-module warmup,\n * static-shell validation, and instant-config validation all run on it). A\n * symbol on `globalThis` decouples the dev-server entry point (which installs\n * the jest-worker pool) from the read site in `runDevValidationInBackground`\n * inside `app-render.tsx`, avoiding a direct import of dev-only pool code from\n * the render module. When the symbol is not set (e.g. because the feature flag\n * is disabled), `getDevValidationWorker()` returns undefined and the caller\n * runs validation in process instead.\n */\nconst SYMBOL: unique symbol = Symbol.for('next.dev.validationWorker')\n\n/**\n * Per-stage RSC chunks, the serializable form of `AccumulatedStreamChunks` that\n * the worker replays. No live streams cross the boundary.\n */\nexport interface SerializedAccumulatedChunks {\n  shellStaticChunks: Uint8Array[]\n  staticChunks: Uint8Array[]\n  shellRuntimeChunks: Uint8Array[]\n  runtimeChunks: Uint8Array[]\n  dynamicChunks: Uint8Array[]\n}\n\n/**\n * Serializable view of one validation input (the shape `DevValidationInputs`\n * carries), with the live streams already drained to chunks. The stage-end\n * timings are replayed into the per-depth Flight re-encodes so the worker\n * reconstructs the same partial-stage boundaries the main render observed.\n */\nexport interface SerializedValidationInputs {\n  accumulatedChunks: SerializedAccumulatedChunks\n  debugChunks: Uint8Array[] | null\n  startTime: number\n  stageEndTimes: StageEndTimes\n}\n\n/**\n * Serializable view of the request, rebuilt into a `RequestStore` on the worker\n * so `cookies()` / `headers()` / `draftMode()` behave as in the real render.\n */\nexport interface DevValidationRequestSnapshot {\n  headers: [string, string][]\n  urlPathname: string\n  urlSearch: string\n  rootParams: Params\n  isDraftMode: boolean\n  isHmrRefresh: boolean\n  hmrRefreshHash: string | undefined\n  requestStartTime: number\n}\n\n/**\n * Everything the worker needs to rebuild the render context and inputs and run\n * `runValidationInDev`. Built on the main thread from the settled render; the\n * pool augments it with install-time fields (`distDir`, `buildId`, …).\n */\nexport interface DevValidationSnapshot {\n  page: string\n  route: string\n  requestId: string\n  responseFinished: boolean\n  prefetchMode: PrefetchingMode\n  devRenderDidError: boolean\n  nonce: string | undefined\n  query: NextParsedUrlQuery\n  request: DevValidationRequestSnapshot\n  // The interpolated route params, the routing seed the worker rebuilds\n  // `getDynamicParamFromSegment` from (together with the fallback params\n  // below).\n  interpolatedParams: Params\n  // The request's fallback params, the set `ctx.getDynamicParamFromSegment`\n  // closed over. The worker rebuilds `getDynamicParamFromSegment` from these\n  // (with `interpolatedParams` and `optimisticRouting`), so the depth-loop\n  // segment keys match the seed render's Flight. It is null for a request whose\n  // params all resolve to concrete values.\n  requestFallbackRouteParams: OpaqueFallbackRouteParams | null\n  // The validation fallback params, passed to `runValidationInDev` and its\n  // prerender stores. They mark params unknown so that accessing one during the\n  // simulated prefetch is treated as dynamic. This set may include params that\n  // `requestFallbackRouteParams` does not.\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n  optimisticRouting: boolean\n  forceStatic: boolean | undefined\n  validationLevel: ValidationLevel\n  implicitTags: string[]\n  /**\n   * Pages whose client reference manifests supplied client references to the\n   * render being validated, beyond the validated route's own manifest (see\n   * `WorkStore.additionalClientReferenceManifestPages`). The worker registers\n   * these so the same references resolve in its thread. Empty for all but the\n   * rare renders that React's I/O tracking carries a reference into.\n   */\n  additionalClientReferenceManifestPages: string[]\n  isDebugChannelEnabled: boolean\n  renderOpts: {\n    images: ImageConfigComplete\n    allowEmptyStaticShell: boolean | undefined\n  }\n  instantInputs: SerializedValidationInputs | null\n  staticInputs: SerializedValidationInputs\n}\n\n/**\n * Install-time fields the dev server's worker pool augments the snapshot with\n * so the worker can reload the route (`distDir`; `page` comes from the\n * snapshot) and rebuild the work store (`buildId`, `deploymentId`, the config\n * slice).\n */\nexport interface DevValidationInstallFields {\n  distDir: string\n  buildId: string\n  deploymentId: string\n  nextConfigSerializable: {\n    httpAgentOptions: NextConfigComplete['httpAgentOptions']\n    cacheLifeProfiles: NextConfigComplete['cacheLife']\n    useCacheTimeout: number\n    staticPageGenerationTimeout: number\n  }\n}\n\n/**\n * The full message the worker receives and forwards into the in-bundle entry:\n * the main-thread snapshot plus the pool's install-time fields.\n */\nexport type DevValidationWorkerMessage = DevValidationSnapshot &\n  DevValidationInstallFields\n\n/**\n * The RSC-encoded `{ errors, errorCodes }` Flight chunks for the dev overlay,\n * or null when validation produced no errors or was aborted. The worker also\n * logs the errors to its own stderr (piped to the parent) with code frames.\n */\nexport type DevValidationWorkerResult = Uint8Array[] | null\n\n/**\n * Worker hook installed by the dev server. Given the render snapshot and the\n * validation abort signal, runs validation on a worker thread and resolves to\n * the validation error Flight chunks to deliver on the main thread. On an abort\n * the pool relays the aborted signal to the worker thread through a shared\n * flag, so the in-flight run aborts mid-run; validation always runs as a thread\n * (never a child process), which is what makes that cross-thread abort\n * possible.\n */\nexport type DevValidationWorker = (\n  snapshot: DevValidationSnapshot,\n  validationAbortSignal: AbortSignal\n) => Promise<DevValidationWorkerResult>\n\ninterface WorkerHolder {\n  [SYMBOL]?: DevValidationWorker\n}\n\nexport function setDevValidationWorker(\n  fn: DevValidationWorker | undefined\n): void {\n  ;(globalThis as WorkerHolder)[SYMBOL] = fn\n}\n\nexport function getDevValidationWorker(): DevValidationWorker | undefined {\n  return (globalThis as WorkerHolder)[SYMBOL]\n}\n","import type { AppRenderContext, ResolvedValidationInputs } from './app-render'\nimport type { PrefetchingMode } from './app-render'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport type { AnyStream } from './stream-ops'\nimport type {\n  DevValidationSnapshot,\n  SerializedValidationInputs,\n} from './dev-validation-worker-globals'\n\nimport { isNodeNextResponse } from '../base-http/helpers'\n\n/**\n * Builds the serializable snapshot the dev validation worker needs to rebuild\n * the render context and inputs and run `runValidationInDev` on the worker\n * thread. Reads only serializable data from the settled render; the live\n * objects (`componentMod`, the async-storage stores,\n * `getDynamicParamFromSegment`) are reconstructed on the worker from this seed.\n * Draining the debug channels is async, so this returns a promise.\n */\nexport async function buildDevValidationSnapshot(\n  ctx: AppRenderContext,\n  instantInputs: ResolvedValidationInputs | null,\n  staticInputs: ResolvedValidationInputs,\n  prefetchMode: PrefetchingMode,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  devRenderDidError: boolean\n): Promise<DevValidationSnapshot> {\n  const requestStore = staticInputs.requestStore\n  const responseFinished =\n    !isNodeNextResponse(ctx.res) || ctx.res.originalResponse.writableFinished\n\n  // The instant and static inputs may share one debug channel, so drain each\n  // channel only once.\n  const chunksByChannel = new WeakMap<AnyStream, Uint8Array[]>()\n  const getDebugChunksOnce = async (\n    channel: AnyStream | undefined\n  ): Promise<Uint8Array[] | null> => {\n    if (!channel) {\n      return null\n    }\n    let chunks = chunksByChannel.get(channel)\n    if (!chunks) {\n      chunks = []\n      for await (const chunk of channel) {\n        chunks.push(chunk)\n      }\n      chunksByChannel.set(channel, chunks)\n    }\n    return chunks\n  }\n\n  const toSerializedInputs = async (\n    inputs: ResolvedValidationInputs\n  ): Promise<SerializedValidationInputs> => ({\n    accumulatedChunks: inputs.accumulatedChunks,\n    debugChunks: await getDebugChunksOnce(inputs.debugChannelClient),\n    startTime: inputs.startTime,\n    stageEndTimes: inputs.stageEndTimes,\n  })\n\n  return {\n    page: ctx.workStore.page,\n    route: ctx.workStore.route,\n    requestId: ctx.requestId,\n    responseFinished,\n    prefetchMode,\n    devRenderDidError,\n    nonce: ctx.nonce,\n    query: ctx.query,\n    request: {\n      headers: [...requestStore.headers.entries()],\n      urlPathname: requestStore.url.pathname,\n      urlSearch: requestStore.url.search,\n      rootParams: requestStore.rootParams,\n      isDraftMode: requestStore.draftMode.isEnabled,\n      isHmrRefresh: requestStore.isHmrRefresh ?? false,\n      hmrRefreshHash: requestStore.hmrRefreshHash,\n      requestStartTime: ctx.workStore.requestStartTime,\n    },\n    interpolatedParams: ctx.interpolatedParams,\n    requestFallbackRouteParams: ctx.fallbackRouteParams,\n    fallbackRouteParams,\n    optimisticRouting: ctx.renderOpts.experimental.optimisticRouting,\n    forceStatic: ctx.workStore.forceStatic,\n    validationLevel: ctx.workStore.validationLevel,\n    implicitTags: ctx.implicitTags.tags,\n    additionalClientReferenceManifestPages: ctx.workStore\n      .additionalClientReferenceManifestPages\n      ? [...ctx.workStore.additionalClientReferenceManifestPages]\n      : [],\n    isDebugChannelEnabled: !!ctx.renderOpts.setReactDebugChannel,\n    renderOpts: {\n      images: ctx.renderOpts.images,\n      allowEmptyStaticShell: ctx.renderOpts.allowEmptyStaticShell,\n    },\n    instantInputs: instantInputs\n      ? await toSerializedInputs(instantInputs)\n      : null,\n    staticInputs: await toSerializedInputs(staticInputs),\n  }\n}\n","/**\n * Percent-encode every character other than horizontal tab and printable ASCII\n * so a value can be safely serialized into an HTTP header.\n *\n * Node's `validateHeaderValue` and `fetch`'s ByteString conversion accept\n * different character ranges. Restricting values to `\\t\\x20-\\x7e` produces a\n * conservative representation that both can serialize. Characters outside a\n * transport's accepted range (Hebrew, Arabic, Chinese, emoji, …) would\n * otherwise throw `ERR_INVALID_CHAR` or a `TypeError`, which crashes ISR or\n * fails a cache read on every affected request.\n *\n * Cache tags are encoded at the public boundaries — tag construction\n * (`getImplicitTags`, `validateTags`) and invalidation input\n * (`revalidatePath`, `revalidateTag`, `updateTag`) — so storage, comparison,\n * and the wire all see the same canonical form.\n *\n * The class is narrower than either transport accepts. Everything inside it\n * passes through byte-for-byte, including `,`, `/`, `%`, `[`, `]`, `_`, `-` and\n * `\\t`, which preserves the comma-separated header format and the\n * dynamic-segment markers in derived tags (`_N_T_/[slug]/page`).\n *\n * Properties:\n * - Fast-path: input that already fits the class is returned unchanged. This\n *   makes the encoder idempotent on already-encoded `%xx` sequences.\n * - Matches *runs* of out-of-class code units so surrogate pairs (e.g. an\n *   emoji) are handed to `encodeURIComponent` as a complete code point — a\n *   per-code-unit regex would split the pair and throw `URIError`.\n */\nconst OUT_OF_CLASS_CHAR = /[^\\t\\x20-\\x7e]/\nconst OUT_OF_CLASS_RUN = /[^\\t\\x20-\\x7e]+/g\n\nexport function encodeHeaderSafe(value: string): string {\n  return OUT_OF_CLASS_CHAR.test(value)\n    ? value.replace(OUT_OF_CLASS_RUN, (run) => encodeURIComponent(run))\n    : value\n}\n","import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { encodeHeaderSafe } from './encode-header-safe'\nimport { createLazyResult, type LazyResult } from './lazy-result'\n\nexport interface ImplicitTags {\n  /**\n   * For legacy usage, the implicit tags are passed to the incremental cache\n   * handler in `get` calls.\n   */\n  readonly tags: string[]\n\n  /**\n   * Modern cache handlers don't receive implicit tags. Instead, the implicit\n   * tags' expirations are stored in the work unit store, and used to compare\n   * with a cache entry's timestamp.\n   *\n   * Note: This map contains lazy results so that we can evaluate them when the\n   * first cache entry is read. It allows us to skip fetching the expiration\n   * values if no caches are read at all.\n   */\n  readonly expirationsByCacheKind: Map<string, LazyResult<number>>\n}\n\nconst getDerivedTags = (pathname: string): string[] => {\n  const derivedTags: string[] = [`/layout`]\n\n  // we automatically add the current path segments as tags\n  // for revalidatePath handling\n  if (pathname.startsWith('/')) {\n    let end = pathname.indexOf('/', 1)\n\n    while (true) {\n      if (end === -1) {\n        end = pathname.length\n      }\n\n      let curPathname = pathname.slice(0, end)\n      if (curPathname) {\n        // all derived tags other than the page are layout tags\n        if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n          curPathname = `${curPathname}${\n            !curPathname.endsWith('/') ? '/' : ''\n          }layout`\n        }\n        derivedTags.push(curPathname)\n      }\n\n      if (end === pathname.length) {\n        break\n      }\n      end = pathname.indexOf('/', end + 1)\n    }\n  }\n  return derivedTags\n}\n\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */\nfunction createTagsExpirationsByCacheKind(\n  tags: string[]\n): Map<string, LazyResult<number>> {\n  const expirationsByCacheKind = new Map<string, LazyResult<number>>()\n  const cacheHandlers = getCacheHandlerEntries()\n\n  if (cacheHandlers) {\n    for (const [kind, cacheHandler] of cacheHandlers) {\n      if ('getExpiration' in cacheHandler) {\n        expirationsByCacheKind.set(\n          kind,\n          createLazyResult(async () => cacheHandler.getExpiration(tags))\n        )\n      }\n    }\n  }\n\n  return expirationsByCacheKind\n}\n\nexport async function getImplicitTags(\n  page: string,\n  pathname: string,\n  fallbackRouteParams: null | OpaqueFallbackRouteParams\n): Promise<ImplicitTags> {\n  const tags = new Set<string>()\n\n  // Add the derived tags from the page. Encode each tag so a non-ASCII\n  // pathname doesn't trip header validation when written to\n  // `x-next-cache-tags`. Idempotent on already-ASCII input.\n  const derivedTags = getDerivedTags(page)\n  for (let tag of derivedTags) {\n    tag = encodeHeaderSafe(`${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`)\n    tags.add(tag)\n  }\n\n  // Add the tags from the pathname. If the route has unknown params, we don't\n  // want to add the pathname as a tag, as it will be invalid.\n  if (pathname && (!fallbackRouteParams || fallbackRouteParams.size === 0)) {\n    const tag = encodeHeaderSafe(`${NEXT_CACHE_IMPLICIT_TAG_ID}${pathname}`)\n    tags.add(tag)\n  }\n\n  if (tags.has(`${NEXT_CACHE_IMPLICIT_TAG_ID}/`)) {\n    tags.add(`${NEXT_CACHE_IMPLICIT_TAG_ID}/index`)\n  }\n\n  if (tags.has(`${NEXT_CACHE_IMPLICIT_TAG_ID}/index`)) {\n    tags.add(`${NEXT_CACHE_IMPLICIT_TAG_ID}/`)\n  }\n\n  const tagsArray = Array.from(tags)\n  return {\n    tags: tagsArray,\n    expirationsByCacheKind: createTagsExpirationsByCacheKind(tagsArray),\n  }\n}\n","import { RSC_CONTENT_TYPE_HEADER } from '../../client/components/app-router-headers'\nimport RenderResult, { type RenderResultMetadata } from '../render-result'\nimport type { AnyStream } from './stream-ops'\n\n/**\n * Flight Response is always set to RSC_CONTENT_TYPE_HEADER to ensure it does not get interpreted as HTML.\n */\nexport class FlightRenderResult extends RenderResult {\n  constructor(\n    response: string | AnyStream,\n    metadata: RenderResultMetadata = {},\n    waitUntil?: Promise<unknown>\n  ) {\n    super(response, {\n      contentType: RSC_CONTENT_TYPE_HEADER,\n      metadata,\n      waitUntil,\n    })\n  }\n}\n","const invalidServerComponentReactHooks = [\n  'useDeferredValue',\n  'useEffect',\n  'useEffectEvent',\n  'useImperativeHandle',\n  'useInsertionEffect',\n  'useLayoutEffect',\n  'useReducer',\n  'useRef',\n  'useState',\n  'useSyncExternalStore',\n  'useTransition',\n  'experimental_useOptimistic',\n  'useOptimistic',\n]\n\nfunction setMessage(error: Error, message: string): void {\n  error.message = message\n  if (error.stack) {\n    const lines = error.stack.split('\\n')\n    lines[0] = message\n    error.stack = lines.join('\\n')\n  }\n}\n\n/**\n * Input:\n * Error: Something went wrong\n    at funcName (/path/to/file.js:10:5)\n    at anotherFunc (/path/to/file.js:15:10)\n \n * Output:\n    at funcName (/path/to/file.js:10:5)\n    at anotherFunc (/path/to/file.js:15:10) \n */\nexport function getStackWithoutErrorMessage(error: Error): string {\n  const stack = error.stack\n  if (!stack) return ''\n  return stack.replace(/^[^\\n]*\\n/, '')\n}\n\nexport function formatServerError(error: Error): void {\n  if (typeof error?.message !== 'string') return\n\n  if (\n    error.message.includes(\n      'Class extends value undefined is not a constructor or null'\n    )\n  ) {\n    const addedMessage =\n      'This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component'\n\n    // If this error instance already has the message, don't add it again\n    if (error.message.includes(addedMessage)) return\n\n    setMessage(\n      error,\n      `${error.message}\n\n${addedMessage}`\n    )\n    return\n  }\n\n  if (error.message.includes('createContext is not a function')) {\n    setMessage(\n      error,\n      'createContext only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component'\n    )\n    return\n  }\n\n  for (const clientHook of invalidServerComponentReactHooks) {\n    const regex = new RegExp(`\\\\b${clientHook}\\\\b.*is not a function`)\n    if (regex.test(error.message)) {\n      setMessage(\n        error,\n        `${clientHook} only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component`\n      )\n      return\n    }\n  }\n}\n","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n  public readonly digest = BAILOUT_TO_CSR\n\n  constructor(public readonly reason: string) {\n    super(`Bail out to client-side rendering: ${reason}`)\n  }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n  if (typeof err !== 'object' || err === null || !('digest' in err)) {\n    return false\n  }\n\n  return err.digest === BAILOUT_TO_CSR\n}\n","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n  digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n  constructor(public readonly description: string) {\n    super(`Dynamic server usage: ${description}`)\n  }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n  if (\n    typeof err !== 'object' ||\n    err === null ||\n    !('digest' in err) ||\n    typeof err.digest !== 'string'\n  ) {\n    return false\n  }\n\n  return err.digest === DYNAMIC_ERROR_CODE\n}\n","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n  public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n  error: unknown\n): error is StaticGenBailoutError {\n  if (typeof error !== 'object' || error === null || !('code' in error)) {\n    return false\n  }\n\n  return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n","import {\n  RenderStage,\n  type AdvanceableRenderStage,\n} from './app-render/staged-rendering'\nimport type {\n  RequestStore,\n  WorkUnitStore,\n} from './app-render/work-unit-async-storage.external'\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external'\nimport { getServerReact, getClientReact } from './runtime-reacts.external'\n\nexport function isHangingPromiseRejectionError(\n  err: unknown\n): err is HangingPromiseRejectionError {\n  if (typeof err !== 'object' || err === null || !('digest' in err)) {\n    return false\n  }\n\n  return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n  public readonly digest = HANGING_PROMISE_REJECTION\n\n  constructor(\n    public readonly route: string,\n    public readonly expression: string\n  ) {\n    super(\n      `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n    )\n  }\n}\n\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC'\n\nexport class ClientHookDynamicError extends Error {\n  public readonly digest = CLIENT_HOOK_DYNAMIC\n\n  constructor(route: string, expression: string) {\n    super(\n      `Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` +\n        `This blocks prerendering because the value is only available at runtime.\\n\\n` +\n        `Ways to fix this:\\n` +\n        `  - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` +\n        `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n        `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`\n    )\n  }\n}\n\nexport function isClientHookDynamicError(\n  err: unknown\n): err is ClientHookDynamicError {\n  if (typeof err !== 'object' || err === null || !('digest' in err)) {\n    return false\n  }\n\n  return err.digest === CLIENT_HOOK_DYNAMIC\n}\n\ntype AbortListeners = Array<() => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * Constructs a promise that never resolves, standing in for *dynamic* data:\n * data that is only available during a real dynamic request and hangs in\n * every kind of prerender — `io()`, `connection()`, uncached `fetch()`.\n *\n * This is primarily useful for cacheComponents where we use promise\n * resolution timing to determine which parts of a render can be included in a\n * prerender.\n *\n * Records nothing on the prerender store: the promise's holes are only ever\n * filled by a real dynamic request, so a runtime prefetch response would have\n * the same holes as the static one. If the data source would resolve during a\n * runtime prerender, use `makeRuntimeHangingPromise` instead.\n *\n * @internal\n */\nexport function makeDynamicHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string\n): Promise<T> {\n  return makeHangingPromiseWithError(\n    signal,\n    new HangingPromiseRejectionError(route, expression)\n  )\n}\n\nexport function makeUntrackedHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string\n): Promise<T> {\n  return makeHangingPromiseWithError(\n    signal,\n    new HangingPromiseRejectionError(route, expression)\n  )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for *runtime* data:\n * data that hangs during a static prerender but is available during a runtime\n * prerender (the kind that backs a runtime prefetch request: request data\n * like cookies and headers is available, but the render is still not a real\n * dynamic request). Examples: cookies, headers, fallback params,\n * searchParams, and cache entries that are excluded only from static\n * prerenders.\n *\n * Creating one of these during a static prerender records on the prerender\n * store that a runtime prefetch would produce more content than the static\n * response (`runtimeDataAccessed`), which the segment prefetch encoding uses\n * to tell the client whether a runtime prefetch request could be skipped.\n *\n * When unsure whether data is dynamic or runtime, prefer this method — the\n * cost of over-recording is a redundant runtime prefetch request; the cost of\n * under-recording is a permanently missing one.\n *\n * `workUnitStore` may be null ONLY when the caller tracks the access itself\n * at observation time instead of creation time. This is for promises the\n * framework creates eagerly whether or not anything reads them (e.g. the\n * `searchParams` prop constructed for every page): recording at creation\n * would mark every render. Such a caller MUST call `trackRuntimeDataAccessed`\n * from every path that observes the promise (e.g. the proxy traps for\n * `then`/`status`), against the work unit store active at access time.\n *\n * For fallback-param data — data a concrete (ISR-upgraded) prerender would\n * resolve — use `makeFallbackParamsHangingPromise` instead, so the access\n * is recorded with the right effect on the static-prefetch hint.\n *\n * @internal\n */\nexport function makeRuntimeHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string,\n  workUnitStore: WorkUnitStore | null\n): Promise<T> {\n  if (workUnitStore !== null) {\n    trackRuntimeDataAccessed(workUnitStore)\n  }\n  return makeHangingPromiseWithError(\n    signal,\n    new HangingPromiseRejectionError(route, expression)\n  )\n}\n\n/**\n * Variant of `makeRuntimeHangingPromise` for *fallback-param* data: fallback\n * route params and values derived solely from them (`params`, `rootParams`,\n * `pathname` during a fallback prerender). Like every runtime data access it\n * records the access on the prerender store's response-level flag, but its\n * effect on the build-time static-prefetch hint differs — on a\n * fallback-upgradeable route the access is transient (a concrete prerender\n * resolves it), so it leaves the hint intact. See\n * `trackFallbackParamsAccessed`.\n *\n * As with `makeRuntimeHangingPromise`, `workUnitStore` may be null ONLY when\n * the caller tracks the access itself at observation time instead of creation\n * time, by calling `trackFallbackParamsAccessed` from every path that\n * observes the promise.\n *\n * @internal\n */\nexport function makeFallbackParamsHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string,\n  workUnitStore: WorkUnitStore | null\n): Promise<T> {\n  if (workUnitStore !== null) {\n    trackFallbackParamsAccessed(workUnitStore)\n  }\n  return makeHangingPromiseWithError(\n    signal,\n    new HangingPromiseRejectionError(route, expression)\n  )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for data that is only\n * accessible in a later *stage* of rendering than this render reaches — e.g.\n * a prefetchable short-stale cache entry that's excluded from shells when the\n * render ends at the shell stage, or params during a runtime-prefetch render\n * that stops before the stage where params resolve.\n *\n * A render that runs through the later stage would include the data; in\n * particular a runtime prefetch renders through its later stages, so on a\n * static prerender store this records `runtimeDataAccessed`, same as\n * `makeRuntimeHangingPromise`.\n *\n * @internal\n */\nexport function makeStageHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string,\n  workUnitStore: WorkUnitStore\n): Promise<T> {\n  trackRuntimeDataAccessed(workUnitStore)\n  return makeHangingPromiseWithError(\n    signal,\n    new HangingPromiseRejectionError(route, expression)\n  )\n}\n\n/**\n * Records on a static prerender store that the render accessed a data source\n * which would have resolved during a runtime prerender. No-op for all other\n * store types.\n *\n * `makeRuntimeHangingPromise` and `makeStageHangingPromise` call this\n * automatically; call it directly only where the access is observed\n * separately from the promise's creation (see the null `workUnitStore` case\n * of `makeRuntimeHangingPromise`), or where the prerender is aborted\n * synchronously instead of hanging.\n *\n * For fallback-param data, use `trackFallbackParamsAccessed` instead. When\n * unsure, this is the conservative choice: it unconditionally clears the\n * static-prefetch hint.\n */\nexport function trackRuntimeDataAccessed(workUnitStore: WorkUnitStore): void {\n  trackRuntimeDataAccessedImpl(workUnitStore, false)\n}\n\n/**\n * Fallback-param variant of `trackRuntimeDataAccessed`, for accesses of\n * fallback route params and values derived solely from them. It records the\n * response-level flag all the same, but only clears the build-time\n * static-prefetch hint when the route is not fallback-upgradeable — on an\n * upgradeable route the access is transient, since ISR later produces a\n * concrete prerender that resolves it.\n */\nexport function trackFallbackParamsAccessed(\n  workUnitStore: WorkUnitStore\n): void {\n  trackRuntimeDataAccessedImpl(workUnitStore, true)\n}\n\nfunction trackRuntimeDataAccessedImpl(\n  workUnitStore: WorkUnitStore,\n  isFallbackParamAccess: boolean\n): void {\n  switch (workUnitStore.type) {\n    case 'prerender': {\n      // Response-level flag (the payload's `u`, forwarded to segment\n      // responses as `needsRuntimeRequest`): resolved for every kind of\n      // access — a pre-upgrade fallback response must keep reporting that\n      // a runtime request would return more. The fulfillment row lands at\n      // the current position in the Flight stream, which is what makes the\n      // value rewindable per stage. Promise resolution is idempotent, so\n      // repeated accesses are free.\n      workUnitStore.runtimeDataAccessed?.resolve(true)\n\n      // Hint cell (holds the build-constant\n      // PrefetchHint.ShouldAttemptStaticPrefetch value directly): a\n      // fallback-param access is transient when the route is\n      // fallback-upgradeable — ISR later produces the concrete prerender a\n      // static prefetch attempt would hit — so it leaves the hint intact.\n      // (Until that upgrade, the response-level flag above keeps directing\n      // the client to a runtime fallback; the hint only costs a wasted\n      // static attempt in the interim.) Every other access clears it.\n      const hintCell = workUnitStore.shouldAttemptStaticPrefetch\n      if (\n        hintCell !== null &&\n        (!isFallbackParamAccess || !workUnitStore.isFallbackUpgradeable)\n      ) {\n        hintCell.current = false\n      }\n      break\n    }\n    case 'prerender-client':\n    case 'prerender-ppr':\n    case 'prerender-legacy':\n    case 'prerender-runtime':\n    case 'validation-client':\n    case 'request':\n    case 'cache':\n    case 'private-cache':\n    case 'unstable-cache':\n    case 'generate-static-params':\n      // Only the modern server prerender tracks this; see the field docs on\n      // PrerenderStoreModernServer.\n      break\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nexport function makeClientHookHangingPromise<T>(\n  signal: AbortSignal,\n  error: ClientHookDynamicError\n): Promise<T> {\n  return makeHangingPromiseWithError(signal, error)\n}\n\nfunction makeHangingPromiseWithError<T>(\n  signal: AbortSignal,\n  error: Error\n): Promise<T> {\n  if (signal.aborted) {\n    return Promise.reject(error)\n  } else {\n    const hangingPromise = new Promise<T>((_, reject) => {\n      const boundRejection = reject.bind(null, error)\n      let currentListeners = abortListenersBySignal.get(signal)\n      if (currentListeners) {\n        currentListeners.push(boundRejection)\n      } else {\n        const listeners = [boundRejection]\n        abortListenersBySignal.set(signal, listeners)\n        signal.addEventListener(\n          'abort',\n          () => {\n            for (let i = 0; i < listeners.length; i++) {\n              listeners[i]()\n            }\n          },\n          { once: true }\n        )\n      }\n    })\n    // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n    // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n    // your own promise out of it you'll need to ensure you handle the error when it rejects.\n    hangingPromise.catch(ignoreReject)\n    return hangingPromise\n  }\n}\n\nfunction ignoreReject() {}\n\n/**\n * Creates a promise that will be triggered when another promise resolves.\n * It will not emit unhandled rejections, which is important if the trigger\n * is a promise that might itself get rejected (e.g. when a prerender/render\n * are aborted due to sync IO)\n */\nexport function makePromiseFromTrigger<T>(\n  trigger: Promise<any>,\n  value: T\n): Promise<T> {\n  const promise = trigger.then(() => value)\n  promise.catch(ignoreReject)\n  return promise\n}\n\nexport function makeDevtoolsIOAwarePromise<T>(\n  underlying: T,\n  requestStore: RequestStore,\n  stage: AdvanceableRenderStage\n): Promise<T> {\n  if (requestStore.stagedRendering) {\n    // We resolve each stage in a timeout, so React DevTools will pick this up as IO.\n    return requestStore.stagedRendering.delayUntilStage(\n      stage,\n      undefined,\n      underlying\n    )\n  }\n  // in React DevTools if we resolve in a setTimeout we will observe\n  // the promise resolution as something that can suspend a boundary or root.\n  return new Promise<T>((resolve) => {\n    // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n    setTimeout(() => {\n      resolve(underlying)\n    }, 0)\n  })\n}\n\nexport const RENDER_STAGES_BY_DATA_KIND = {\n  sessionData: RenderStage.ShellRuntime as const,\n  staticLinkData: RenderStage.Static as const,\n  runtimeLinkData: RenderStage.Runtime as const,\n}\n\nexport function applyOwnerStack(error: Error): Error {\n  if (process.env.NODE_ENV !== 'production') {\n    let ownerStack: string | undefined | null\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    // captureOwnerStack() returns the owner stack for the current React\n    // rendering context. Inside a cache scope this only includes the inner\n    // component tree. The outer owner stack (captured before entering the\n    // cache boundary in use-cache-wrapper.ts) is stored on the cache store.\n    // We concatenate both to get the full component tree.\n    const innerOwnerStack =\n      getClientReact()?.captureOwnerStack?.() ??\n      getServerReact()?.captureOwnerStack?.()\n\n    switch (workUnitStore?.type) {\n      case 'cache':\n      case 'private-cache':\n        ownerStack =\n          (innerOwnerStack || '') + (workUnitStore.outerOwnerStack || '') ||\n          undefined\n        break\n      case 'unstable-cache':\n      case 'request':\n      case 'prerender':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'validation-client':\n      case 'generate-static-params':\n      case undefined:\n        ownerStack = innerOwnerStack\n        break\n      default:\n        workUnitStore satisfies never\n    }\n\n    if (ownerStack) {\n      let stack = ownerStack\n\n      if (error.stack) {\n        const frames: string[] = []\n\n        for (const frame of error.stack.split('\\n').slice(1)) {\n          if (frame.includes('react_stack_bottom_frame')) {\n            break\n          }\n\n          frames.push(frame)\n        }\n\n        stack = '\\n' + frames.join('\\n') + stack\n      }\n\n      error.stack = error.name + ': ' + error.message + stack\n    }\n  }\n\n  return error\n}\n","export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n","export function createRuntimeBodyError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered runtime data during prerendering.\\n\\n` +\n      `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n  )\n}\n\nexport function createDynamicBodyError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached data during prerendering.\\n\\n` +\n      `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n  )\n}\n\nexport function createRuntimeBodyErrorInNavigation(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n` +\n      `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n  )\n}\n\nexport function createLinkBodyErrorInNavigation(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered URL data during prerendering or a navigation.\\n\\n` +\n      `\\`params\\` or \\`searchParams\\` accessed outside of \\`<Suspense>\\` may prevent the navigation from being instant, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`\n  )\n}\n\nexport function createDynamicBodyErrorInNavigation(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n` +\n      `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n  )\n}\n\n/**\n * NOTE: Prefer `createRuntimeBodyError` or `createDynamicBodyError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeBodyError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached or runtime data during prerendering.\\n\\n` +\n      `\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n      `  - [cache] For uncached data (\\`fetch\\`, database calls): cache the access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n  )\n}\n\nexport function createLinkMetadataError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered URL data in \\`generateMetadata()\\`.\\n\\n` +\n      `This route's metadata is blocked, but the rest of its content can be prefetched. \\`params\\` or \\`searchParams\\` accessed in \\`generateMetadata()\\` prevent it from being prefetched.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static metadata export instead of \\`generateMetadata()\\`\\n` +\n      `  - [dynamic] Render a marker component that calls \\`await connection()\\` inside \\`<Suspense>\\` on the page\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`\n  )\n}\n\nexport function createRuntimeMetadataError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered runtime data in \\`generateMetadata()\\`.\\n\\n` +\n      `This route's metadata is blocked, but the rest of its content can be prerendered. \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed in \\`generateMetadata()\\` cause it to run dynamically.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static metadata export instead of \\`generateMetadata()\\`\\n` +\n      `  - [dynamic] Render a marker component that calls \\`await connection()\\` inside \\`<Suspense>\\` on the page\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`\n  )\n}\n\nexport function createDynamicMetadataError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached data in \\`generateMetadata()\\`.\\n\\n` +\n      `This route's metadata is blocked, but the rest of its content can be prerendered. \\`fetch(...)\\` or \\`connection()\\` accessed in \\`generateMetadata()\\` cause it to run dynamically.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [cache] Cache the metadata with \\`\"use cache\"\\` in \\`generateMetadata()\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [dynamic] Render a marker component that calls \\`await connection()\\` inside \\`<Suspense>\\` on the page\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-dynamic`\n  )\n}\n\nexport function createLinkViewportError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered URL data in \\`generateViewport()\\`.\\n\\n` +\n      `\\`params\\` or \\`searchParams\\` in \\`generateViewport()\\` prevents the page from being prerendered, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static viewport export instead of \\`generateViewport()\\`\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`\n  )\n}\n\nexport function createRuntimeViewportError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered runtime data in \\`generateViewport()\\`.\\n\\n` +\n      `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` in \\`generateViewport()\\` prevents the page from being prerendered, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static viewport export instead of \\`generateViewport()\\`\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`\n  )\n}\n\nexport function createDynamicViewportError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached data in \\`generateViewport()\\`.\\n\\n` +\n      `\\`fetch(...)\\` or \\`connection()\\` in \\`generateViewport()\\` prevents the page from being prerendered, leading to a slower user experience.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [cache] Cache the viewport data with \\`\"use cache\"\\` in \\`generateViewport()\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-dynamic`\n  )\n}\n\n/**\n * NOTE: Prefer `createRuntimeViewportError` or `createDynamicViewportError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeViewportError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached or runtime data in \\`generateViewport()\\`.\\n\\n` +\n      `This prevents the page from being prerendered, leading to a slower user experience. Unlike metadata, viewport cannot be streamed behind \\`<Suspense>\\` because it affects the initial page load.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static viewport export instead of \\`generateViewport()\\`\\n` +\n      `  - [cache] For uncached data (\\`fetch\\`, database calls): cache the viewport with \\`\"use cache\"\\` in \\`generateViewport()\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`\n  )\n}\n\n/**\n * NOTE: Prefer `createRuntimeMetadataError` or `createDynamicMetadataError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeMetadataError(route: string): Error {\n  return new Error(\n    `Route \"${route}\": Next.js encountered uncached or runtime data in \\`generateMetadata()\\`.\\n\\n` +\n      `This route's metadata is blocked, but the rest of its content can be prerendered.\\n\\n` +\n      `Ways to fix this:\\n` +\n      `  - [static] Use a static metadata export instead of \\`generateMetadata()\\`\\n` +\n      `  - [cache] Cache the metadata with \\`\"use cache\"\\` in \\`generateMetadata()\\` (does not apply to \\`connection()\\`)\\n` +\n      `  - [dynamic] Render a marker component that calls \\`await connection()\\` inside \\`<Suspense>\\` on the page\\n\\n` +\n      `Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`\n  )\n}\n\nexport function logBuildDebugHint(route: string): void {\n  if (process.env.NODE_ENV !== 'development') {\n    console.error(\n      `To get a more detailed stack trace and pinpoint the issue, try one of the following:\\n` +\n        `  - Start the app in development mode by running \\`next dev\\`, then open \"${route}\" in your browser to investigate the error.\\n` +\n        `  - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`\n    )\n  } else if (!process.env.__NEXT_DEV_SERVER) {\n    console.error(\n      `To debug the issue, start the app in development mode by running \\`next dev\\`, then open \"${route}\" in your browser to investigate the error.`\n    )\n  }\n}\n","export type ValidationBoundaryTracking = {\n  /**\n   * Map from boundary id (the SegmentPath where a validation boundary is\n   * placed) to the file paths of modules inside that boundary's subtree.\n   * When the boundary spans multiple parallel slots, each slot contributes\n   * its own first-found module path so all unrendered segments can be\n   * reported together.\n   */\n  requiredIds: Map<string, string[]>\n  renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n  return {\n    requiredIds: new Map(),\n    renderedIds: new Set(),\n  }\n}\n\nexport function allRequiredBoundariesRendered(\n  state: ValidationBoundaryTracking\n): boolean {\n  for (const id of state.requiredIds.keys()) {\n    if (!state.renderedIds.has(id)) {\n      return false\n    }\n  }\n  return true\n}\n","const ERROR_CODE_DELIMITER = '@'\n\n/**\n * Augments the digest field of errors thrown in React Server Components (RSC) with an error code.\n * Since RSC errors can only be serialized through the digest field, this provides a way to include\n * an additional error code that can be extracted client-side via `extractNextErrorCode`.\n *\n * The error code is appended to the digest string with a semicolon separator, allowing it to be\n * parsed out later while preserving the original digest value.\n */\nexport const createDigestWithErrorCode = (\n  thrownValue: unknown,\n  originalDigest: string\n): string => {\n  if (\n    typeof thrownValue === 'object' &&\n    thrownValue !== null &&\n    '__NEXT_ERROR_CODE' in thrownValue\n  ) {\n    return `${originalDigest}${ERROR_CODE_DELIMITER}${thrownValue.__NEXT_ERROR_CODE}`\n  }\n  return originalDigest\n}\n\nexport const extractNextErrorCode = (error: unknown): string | undefined => {\n  if (\n    typeof error === 'object' &&\n    error !== null &&\n    '__NEXT_ERROR_CODE' in error &&\n    typeof error.__NEXT_ERROR_CODE === 'string'\n  ) {\n    return error.__NEXT_ERROR_CODE\n  }\n\n  if (\n    typeof error === 'object' &&\n    error !== null &&\n    'digest' in error &&\n    typeof error.digest === 'string'\n  ) {\n    const segments = error.digest.split(ERROR_CODE_DELIMITER)\n    const errorCode = segments.find((segment) => segment.startsWith('E'))\n    return errorCode\n  }\n\n  return undefined\n}\n","// TODO: isWellKnownError -> isNextInternalError\n// isReactLargeShellError -> isWarning\nexport function isReactLargeShellError(\n  error: unknown\n): error is Error & { digest?: string } {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    'message' in error &&\n    typeof error.message === 'string' &&\n    error.message.startsWith('This rendered a large document (>')\n  )\n}\n","import type { ErrorInfo } from 'react'\nimport stringHash from 'next/dist/compiled/string-hash'\n\nimport { formatServerError } from '../../lib/format-server-error'\nimport { SpanStatusCode, getTracer } from '../lib/trace/tracer'\n\nimport { isAbortError } from '../pipe-readable'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isDynamicServerError } from '../../client/components/hooks-server-context'\nimport { isNextRouterError } from '../../client/components/is-next-router-error'\nimport { isPrerenderInterruptedError } from './dynamic-rendering'\nimport { getProperError } from '../../lib/is-error'\nimport { createDigestWithErrorCode } from '../../lib/error-telemetry-utils'\nimport { isReactLargeShellError } from './react-large-shell-error'\nimport { isInstantValidationError } from './instant-validation/instant-validation-error'\n\ndeclare global {\n  var __next_log_error__: undefined | ((err: unknown) => void)\n}\n\ntype RSCErrorHandler = (err: unknown) => string | undefined\ntype SSRErrorHandler = (\n  err: unknown,\n  errorInfo?: ErrorInfo\n) => string | undefined\n\nexport type DigestedError = Error & { digest: string; environmentName?: string }\n\n/**\n * Returns a digest for well-known Next.js errors, otherwise `undefined`. If a\n * digest is returned this also means that the error does not need to be\n * reported.\n */\nexport function getDigestForWellKnownError(error: unknown): string | undefined {\n  // If we're bailing out to CSR, we don't need to log the error.\n  if (isBailoutToCSRError(error)) return error.digest\n\n  // If this is a navigation error, we don't need to log the error.\n  if (isNextRouterError(error)) return error.digest\n\n  // If this error occurs, we know that we should be stopping the static\n  // render. This is only thrown in static generation when PPR is not enabled,\n  // which causes the whole page to be marked as dynamic. We don't need to\n  // tell the user about this error, as it's not actionable.\n  if (isDynamicServerError(error)) return error.digest\n\n  // If this is a prerender interrupted error, we don't need to log the error.\n  if (isPrerenderInterruptedError(error)) return error.digest\n\n  if (isInstantValidationError(error)) return error.digest\n\n  return undefined\n}\n\nexport function createReactServerErrorHandler(\n  shouldFormatError: boolean,\n  isBuildTimePrerendering: boolean,\n  reactServerErrors: Map<string, DigestedError>,\n  onReactServerRenderError: (err: DigestedError, silenceLog: boolean) => void,\n  spanToRecordOn?: any\n): RSCErrorHandler {\n  return (thrownValue: unknown) => {\n    // If the response was closed, we don't need to log the error.\n    if (isAbortError(thrownValue)) return\n\n    const digest = getDigestForWellKnownError(thrownValue)\n\n    if (digest) {\n      return digest\n    }\n\n    if (isReactLargeShellError(thrownValue)) {\n      // TODO: Aggregate\n      console.error(thrownValue)\n      return undefined\n    }\n\n    let err = getProperError(thrownValue) as DigestedError\n    let silenceLog = false\n\n    // If the error already has a digest, respect the original digest,\n    // so it won't get re-generated into another new error.\n    if (err.digest) {\n      const originalError = reactServerErrors.get(err.digest)\n\n      if (originalError) {\n        // This error crossed a react-server boundary (e.g. from a `'use cache'`\n        // render). Reaching the handler means it surfaced (it wasn't caught in\n        // userland), so stamp the digest onto the original to mark it surfaced.\n        // If the original was recorded as `invalidDynamicUsageError` without a\n        // digest (a cache that aborted across the boundary), this is what lets\n        // the dev overlay dedup: the separate forwarding checks for that digest\n        // and skips it.\n        originalError.digest ??= err.digest\n\n        if (process.env.NODE_ENV === 'production') {\n          // In production we use the recovered original (de-obfuscated!) error\n          // for reporting, and don't log it again as it was already logged in\n          // the original environment.\n          err = originalError\n          silenceLog = true\n        }\n      }\n    } else {\n      // TODO-APP: look at using webcrypto instead of string-hash. Requires a promise to be awaited.\n      err.digest =\n        typeof thrownValue === 'string'\n          ? stringHash(thrownValue).toString()\n          : createDigestWithErrorCode(\n              err,\n              stringHash(err.message + (err.stack || '')).toString()\n            )\n    }\n\n    // @TODO by putting this here and not at the top it is possible that\n    // we don't error the build in places we actually expect to\n    if (!reactServerErrors.has(err.digest)) {\n      reactServerErrors.set(err.digest, err)\n    }\n\n    // Format server errors in development to add more helpful error messages\n    if (shouldFormatError) {\n      formatServerError(err)\n    }\n\n    // Don't log the suppressed error during export\n    if (\n      !(\n        isBuildTimePrerendering &&\n        err?.message?.includes(\n          'The specific message is omitted in production builds to avoid leaking sensitive details.'\n        )\n      )\n    ) {\n      // Record exception on the provided span if available, otherwise try active span.\n      const span = spanToRecordOn ?? getTracer().getActiveScopeSpan()\n      if (span) {\n        span.recordException(err)\n        span.setAttribute('error.type', err.name)\n        span.setStatus({\n          code: SpanStatusCode.ERROR,\n          message: err.message,\n        })\n      }\n\n      onReactServerRenderError(err, silenceLog)\n    }\n\n    return err.digest\n  }\n}\n\nexport function createHTMLErrorHandler(\n  shouldFormatError: boolean,\n  isBuildTimePrerendering: boolean,\n  reactServerErrors: Map<string, DigestedError>,\n  allCapturedErrors: Array<unknown>,\n  onHTMLRenderSSRError: (err: DigestedError, errorInfo?: ErrorInfo) => void,\n  spanToRecordOn?: any\n): SSRErrorHandler {\n  return (thrownValue: unknown, errorInfo?: ErrorInfo) => {\n    if (isReactLargeShellError(thrownValue)) {\n      // TODO: Aggregate\n      console.error(thrownValue)\n      return undefined\n    }\n\n    let isSSRError = true\n\n    allCapturedErrors.push(thrownValue)\n\n    // If the response was closed, we don't need to log the error.\n    if (isAbortError(thrownValue)) return\n\n    const digest = getDigestForWellKnownError(thrownValue)\n\n    if (digest) {\n      return digest\n    }\n\n    const err = getProperError(thrownValue) as DigestedError\n\n    // If the error already has a digest, respect the original digest,\n    // so it won't get re-generated into another new error.\n    if (err.digest) {\n      if (reactServerErrors.has(err.digest)) {\n        // This error is likely an obfuscated error from react-server.\n        // We recover the original error here.\n        thrownValue = reactServerErrors.get(err.digest)\n        isSSRError = false\n      } else {\n        // The error is not from react-server but has a digest\n        // from other means so we don't need to produce a new one\n      }\n    } else {\n      err.digest = createDigestWithErrorCode(\n        err,\n        stringHash(\n          err.message + (errorInfo?.componentStack || err.stack || '')\n        ).toString()\n      )\n    }\n\n    // Format server errors in development to add more helpful error messages\n    if (shouldFormatError) {\n      formatServerError(err)\n    }\n\n    // Don't log the suppressed error during export\n    if (\n      !(\n        isBuildTimePrerendering &&\n        err?.message?.includes(\n          'The specific message is omitted in production builds to avoid leaking sensitive details.'\n        )\n      )\n    ) {\n      // HTML errors contain RSC errors as well, filter them out before reporting\n      if (isSSRError) {\n        // Record exception on the provided span if available, otherwise try active span.\n        const span = spanToRecordOn ?? getTracer().getActiveScopeSpan()\n        if (span) {\n          span.recordException(err)\n          span.setAttribute('error.type', err.name)\n          span.setStatus({\n            code: SpanStatusCode.ERROR,\n            message: err.message,\n          })\n        }\n\n        onHTMLRenderSSRError(err, errorInfo)\n      }\n    }\n\n    return err.digest\n  }\n}\n\nexport function isUserLandError(err: any): boolean {\n  return (\n    !isAbortError(err) && !isBailoutToCSRError(err) && !isNextRouterError(err)\n  )\n}\n","import type {\n  DynamicParamTypes,\n  DynamicParamTypesShort,\n} from '../../shared/lib/app-router-types'\n\nexport const dynamicParamTypes: Record<\n  DynamicParamTypes,\n  DynamicParamTypesShort\n> = {\n  catchall: 'c',\n  'catchall-intercepted-(..)(..)': 'ci(..)(..)',\n  'catchall-intercepted-(.)': 'ci(.)',\n  'catchall-intercepted-(..)': 'ci(..)',\n  'catchall-intercepted-(...)': 'ci(...)',\n  'optional-catchall': 'oc',\n  dynamic: 'd',\n  'dynamic-intercepted-(..)(..)': 'di(..)(..)',\n  'dynamic-intercepted-(.)': 'di(.)',\n  'dynamic-intercepted-(..)': 'di(..)',\n  'dynamic-intercepted-(...)': 'di(...)',\n}\n","const CSP_NONCE_SOURCE_REGEX = /^'nonce-([A-Za-z0-9+/_-]+={0,2})'$/\n\nexport function getScriptNonceFromHeader(\n  cspHeaderValue: string\n): string | undefined {\n  const directives = cspHeaderValue\n    // Directives are split by ';'.\n    .split(';')\n    .map((directive) => directive.trim())\n\n  // First try to find the directive for the 'script-src', otherwise try to\n  // fallback to the 'default-src'.\n  const directive =\n    directives.find((dir) => dir.startsWith('script-src')) ||\n    directives.find((dir) => dir.startsWith('default-src'))\n\n  // If no directive could be found, then we're done.\n  if (!directive) {\n    return\n  }\n\n  // Extract the first valid nonce from the directive. Malformed nonces are\n  // ignored so the request can continue without a nonce instead of failing.\n  for (const source of directive.split(/\\s+/).slice(1)) {\n    const match = source.trim().match(CSP_NONCE_SOURCE_REGEX)\n\n    if (match) {\n      return match[1]\n    }\n  }\n}\n","import type { LoadComponentsReturnType } from '../load-components'\nimport type { ServerRuntime, SizeLimit } from '../../types'\nimport type {\n  ExperimentalConfig,\n  NextConfigComplete,\n  PrefetchInliningConfig,\n  ValidationLevel,\n} from '../../server/config-shared'\nimport type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport type { ImageConfigComplete } from '../../shared/lib/image-config'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nimport s from 'next/dist/compiled/superstruct'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { InstrumentationOnRequestError } from '../instrumentation/types'\nimport type { NextRequestHint } from '../web/adapter'\nimport type { BaseNextRequest } from '../base-http'\nimport type { IncomingMessage } from 'http'\nimport type { RenderResumeDataCache } from '../resume-data-cache/resume-data-cache'\nimport type { ServerCacheStatus } from '../../next-devtools/dev-overlay/cache-indicator'\nimport type { PrefetchHints } from '../../shared/lib/app-router-types'\nimport type { AnyStream } from './stream-ops'\n\nconst dynamicParamTypesSchema = s.enums([\n  'c',\n  'ci(..)(..)',\n  'ci(.)',\n  'ci(..)',\n  'ci(...)',\n  'oc',\n  'd',\n  'di(..)(..)',\n  'di(.)',\n  'di(..)',\n  'di(...)',\n])\n\nconst segmentSchema = s.union([\n  s.string(),\n\n  s.tuple([\n    // Param name\n    s.string(),\n    // Param cache key (almost the same as the value, but arrays are\n    // concatenated into strings)\n    // TODO: We should change this to just be the value. Currently we convert\n    // it back to a value when passing to useParams. It only needs to be\n    // a string when converted to a a cache key, but that doesn't mean we\n    // need to store it as that representation.\n    s.string(),\n    // Dynamic param type\n    dynamicParamTypesSchema,\n    // Static siblings at the same URL level. Used by the client router to\n    // determine if a prefetch can be reused when navigating to a static\n    // sibling of a dynamic route. null means siblings are unknown.\n    s.nullable(s.array(s.string())),\n  ]),\n])\n\n// unfortunately the tuple is not understood well by Describe so we have to\n// use any here. This does not have any impact on the runtime type since the validation\n// does work correctly.\nexport const flightRouterStateSchema: s.Describe<any> = s.tuple([\n  segmentSchema,\n  s.record(\n    s.string(),\n    s.lazy(() => flightRouterStateSchema)\n  ),\n  s.optional(s.nullable(s.tuple([s.string(), s.string()]))),\n  s.optional(\n    s.nullable(\n      s.union([\n        s.literal('refetch'),\n        s.literal('inside-shared-layout'),\n        s.literal('metadata-only'),\n      ])\n    )\n  ),\n  s.optional(s.number()),\n])\n\nexport type ServerOnInstrumentationRequestError = (\n  error: unknown,\n  // The request could be middleware, node server or web server request,\n  // we normalized them into an aligned format to `onRequestError` API later.\n  request: NextRequestHint | BaseNextRequest | IncomingMessage,\n  errorContext: Parameters<InstrumentationOnRequestError>[2],\n  silenceLog: boolean\n) => void | Promise<void>\n\nexport interface RenderOptsPartial {\n  dir?: string\n  previewProps: __ApiPreviewProps | undefined\n  err?: Error | null\n  basePath: string\n  cacheComponents: boolean\n  partialPrefetching?: NextConfigComplete['partialPrefetching']\n  validationLevel: ValidationLevel\n  trailingSlash: boolean\n  images: ImageConfigComplete\n  supportsDynamicResponse: boolean\n  runtime?: ServerRuntime\n  serverComponents?: boolean\n  enableTainting?: boolean\n  assetPrefix?: string\n  crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined\n  nextFontManifest?: DeepReadonly<NextFontManifest>\n  botType?: 'dom' | 'html' | undefined\n  serveStreamingMetadata?: boolean\n  incrementalCache?: import('../lib/incremental-cache').IncrementalCache\n  cacheLifeProfiles: import('../config-shared').ResolvedCacheLifeProfiles\n  staticPageGenerationTimeout: number\n  isOnDemandRevalidate?: boolean\n  isPossibleServerAction?: boolean\n  setCacheStatus?: (status: ServerCacheStatus, htmlRequestId: string) => void\n  setIsrStatus?: (key: string, value: boolean | undefined) => void\n  setReactDebugChannel?: (\n    debugChannel: { readable: AnyStream },\n    htmlRequestId: string,\n    requestId: string\n  ) => void\n  sendErrorsToBrowser?: (\n    errorsRscStream: AnyStream,\n    htmlRequestId: string\n  ) => void\n  isBuildTimePrerendering?: boolean\n  nextConfigOutput?: 'standalone' | 'export'\n  onInstrumentationRequestError?: ServerOnInstrumentationRequestError\n  isDraftMode?: boolean\n  onUpdateCookies?: (cookies: string[]) => void\n  loadConfig?: (\n    phase: string,\n    dir: string,\n    customConfig?: object | null,\n    rawConfig?: boolean,\n    silent?: boolean\n  ) => Promise<NextConfigComplete>\n  serverActions?: {\n    bodySizeLimit?: SizeLimit\n    allowedOrigins?: string[]\n  }\n  logServerFunctions?: boolean\n  params?: ParsedUrlQuery\n  isPrefetch?: boolean\n  htmlLimitedBots: string | undefined\n  experimental: {\n    /**\n     * When true, it indicates that the current page supports partial\n     * prerendering.\n     */\n    isRoutePPREnabled?: boolean\n    expireTime: number | undefined\n    staleTimes: ExperimentalConfig['staleTimes'] | undefined\n    clientTraceMetadata: string[] | undefined\n\n    /**\n     * The origins that are allowed to write the rewritten headers when\n     * performing a non-relative rewrite. When undefined, no non-relative\n     * rewrites will get the rewrite headers.\n     */\n    clientParamParsingOrigins: string[] | undefined\n    dynamicOnHover: boolean\n    optimisticRouting: boolean\n    inlineCss: boolean\n    prefetchInlining: PrefetchInliningConfig\n    authInterrupts: boolean\n    serverComponentsHmrCancellation?: boolean\n    useCacheTimeout: number\n    cachedNavigations: boolean\n\n    /**\n     * The maximum size (in bytes) of the postponed state body for PPR resume\n     * requests. Used to calculate decompression limits (5x this value).\n     */\n    maxPostponedStateSizeBytes: number | undefined\n\n    /**\n     * Whether the Instant Navigation Testing API is exposed (dev mode or the\n     * `exposeTestingApiInProductionBuild` flag). When true, the prerendered\n     * shell and dynamic renders embed a cookie-guarded bootstrap script that\n     * drives instant navigation tests.\n     */\n    exposeTestingApi: boolean\n  }\n  postponed?: string\n\n  /**\n   * A prefilled resume data cache. This was either generated for this page\n   * during dev warmup, or when a page with defined params was previously\n   * prerendered, and now its matching optional fallback shell is prerendered.\n   */\n  renderResumeDataCache?: RenderResumeDataCache\n\n  /**\n   * When true, the page will be rendered using the static rendering to detect\n   * any dynamic API's that would have stopped the page from being fully\n   * statically generated.\n   */\n  isDebugDynamicAccesses?: boolean\n\n  /**\n  /**\n   * The maximum length of the headers that are emitted by React and added to\n   * the response.\n   */\n  reactMaxHeadersLength: number | undefined\n\n  /**\n   * Per-route prefetch hints from prefetch-hints.json.\n   * Loaded at server startup from the build output.\n   */\n  prefetchHints?: Record<string, PrefetchHints>\n\n  isStaticGeneration?: boolean\n\n  /**\n   * When true, the page is prerendered as a fallback shell, while allowing any\n   * dynamic accesses to result in an empty shell. This is the case when there\n   * are also routes prerendered with a more complete set of params.\n   * Prerendering those routes would catch any invalid dynamic accesses.\n   */\n  allowEmptyStaticShell?: boolean\n\n  /**\n   * When true, attempt to run build-time instant validation for this prerender.\n   * Only the first prerender per page sets this, since validation uses\n   * instant.unstable_samples and is independent of actual route params.\n   */\n  runInstantValidation?: boolean\n\n  /**\n   * When true, a fallback shell produced for this render could later be\n   * upgraded to a concrete version (at least one of its fallback params is a\n   * candidate enumerated by `generateStaticParams`). Only such shells are\n   * flagged `isUpgradeableISRFallback` so the client retries the prefetch; a route that\n   * can never upgrade (no `generateStaticParams`) is left unflagged.\n   */\n  isFallbackUpgradeable?: boolean\n}\n\nexport type RenderOpts = LoadComponentsReturnType<AppPageModule> &\n  RenderOptsPartial &\n  RequestLifecycleOpts\n\nexport type PreloadCallbacks = (() => void)[]\n","import type { LoaderTree } from '../lib/app-dir-module'\nimport {\n  PrefetchHint,\n  propagateSubtreeBits,\n  type FlightRouterState,\n  type PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport type { GetDynamicParamFromSegment } from './app-render'\nimport { addSearchParamsIfPageSegment } from '../../shared/lib/segment'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\n\nasync function createFlightRouterStateFromLoaderTreeImpl(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  prefetchInliningEnabled: boolean,\n  cacheComponents: boolean,\n  partialPrefetching: boolean | 'unstable_eager' | undefined,\n  isStaticGeneration: boolean,\n  isBuildTimePrerendering: boolean,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment,\n  searchParams: any,\n  didFindRootLayout: boolean\n): Promise<FlightRouterState> {\n  const [segment, parallelRoutes, { layout, loading, page }] = loaderTree\n  const dynamicParam = getDynamicParamFromSegment(loaderTree)\n  const treeSegment = dynamicParam ? dynamicParam.treeSegment : segment\n\n  const segmentTree: FlightRouterState = [\n    addSearchParamsIfPageSegment(treeSegment, searchParams),\n    {},\n  ]\n\n  // Load the layout or page module to check its instant and prefetch\n  // configs. When a segment doesn't export prefetch, it defaults to\n  // 'partial' if the app has opted into partial prefetching globally via the\n  // `partialPrefetching` config in next.config.js.\n  const mod = layout ? await layout[0]() : page ? await page[0]() : undefined\n  const instantConfig = mod ? (mod as AppSegmentConfig).instant : undefined\n  const prefetchConfig =\n    (mod ? (mod as AppSegmentConfig).prefetch : undefined) ??\n    (partialPrefetching === 'unstable_eager'\n      ? 'unstable_eager'\n      : partialPrefetching\n        ? 'partial'\n        : undefined)\n  let prefetchHints = 0\n\n  // Union in the precomputed build-time hints (e.g. segment inlining\n  // decisions) if available. When hints are not available (e.g. dev mode or\n  // if prefetch-hints.json was not generated), we fall through and still\n  // compute the other hints below. In the future this should be a build\n  // error, but for now we gracefully degrade.\n  //\n  // TODO: Move more of the hints computation (IsRootLayoutOrAbove, instant config,\n  // loading boundary detection) into the build-time measurement step in\n  // collectPrefetchHints, so this function only needs to union the\n  // precomputed bitmask rather than re-derive hints on every render.\n  if (hintTree !== null) {\n    prefetchHints |= hintTree.hints\n  } else if (prefetchInliningEnabled) {\n    if (isBuildTimePrerendering) {\n      // Prefetch inlining is enabled but no hint tree was provided during a\n      // build-time prerender. This happens for the initial RSC payload\n      // generated before collectPrefetchHints has run. Mark so the client\n      // can expire the route cache entry and re-fetch the tree with correct\n      // hints.\n      prefetchHints |= PrefetchHint.InliningHintsStale\n    } else if (isStaticGeneration) {\n      // TODO(#91407): Temporary mitigation: when hints are missing during\n      // runtime static generation, fall back to treating every segment as\n      // unprefetchable. This currently happens for routes with\n      // `instant = false` at the root segment, which causes the prerender\n      // to run per-request instead of being cached, and the prefetch hints\n      // manifest is not available.\n      //\n      // Once that bug is fixed, this branch should become an error again —\n      // hints should always be available from the manifest during ISR.\n      prefetchHints |= PrefetchHint.PrefetchDisabled\n    } else if (cacheComponents) {\n      // At runtime with no hint tree, this is a fully dynamic route with no\n      // manifest entry. Treat every segment as unprefetchable. Do NOT set\n      // InliningHintsStale — that would cause the client to enter an\n      // infinite re-fetch loop trying to get hints that will never exist.\n      prefetchHints |= PrefetchHint.PrefetchDisabled\n    } else {\n      // Without cacheComponents, dynamic pages have no static shell so\n      // hints are never computed. Don't disable prefetching — just skip\n      // the inlining hint system and let prefetching proceed normally.\n    }\n  }\n\n  // Mark every segment at or above the root layout (i.e. until we descend past\n  // the first segment that has a layout).\n  if (!didFindRootLayout) {\n    prefetchHints |= PrefetchHint.IsRootLayoutOrAbove\n    if (typeof layout !== 'undefined') {\n      // This segment is the root layout; its descendants are below it.\n      didFindRootLayout = true\n    }\n  }\n\n  if (instantConfig === false) {\n    // The segment explicitly opts out of Partial Prefetching. We don't change\n    // the prefetch behavior, but we record it so the dev-time\n    // `<Link prefetch={true}>` warning can be suppressed for this route.\n    prefetchHints |= PrefetchHint.SubtreeHasInstantFalse\n  }\n\n  if (prefetchConfig === 'partial') {\n    prefetchHints |= PrefetchHint.SubtreeHasPartialPrefetching\n  } else if (prefetchConfig === 'unstable_eager') {\n    // Like 'partial' (uses the PPR fetch strategy) but also marks the segment\n    // as eager, so App Shells keeps prefetching it instead of relying on the\n    // shared app shell.\n    prefetchHints |=\n      PrefetchHint.SubtreeHasPartialPrefetching |\n      PrefetchHint.SubtreeHasEagerPrefetch\n  } else if (prefetchConfig === 'force-disabled') {\n    prefetchHints |= PrefetchHint.PrefetchDisabled\n  }\n\n  // Mark the segment as \"eager\" unless its effective prefetch strategy is\n  // 'partial'. 'unstable_eager' already set the bit above. Under App Shells,\n  // a subtree with no eager segment skips its Speculative prefetch and relies\n  // on the shared app shell instead.\n  if (prefetchConfig !== 'partial') {\n    prefetchHints |= PrefetchHint.SubtreeHasEagerPrefetch\n  }\n\n  // Check if this segment has a loading boundary\n  if (loading) {\n    prefetchHints |= PrefetchHint.SegmentHasLoadingBoundary\n  }\n\n  const children: FlightRouterState[1] = {}\n  for (const parallelRouteKey in parallelRoutes) {\n    // Look up the child hint node by parallel route key, traversing the\n    // hint tree in parallel with the loader tree.\n    const childHintNode = hintTree?.slots?.[parallelRouteKey] ?? null\n\n    const child = await createFlightRouterStateFromLoaderTreeImpl(\n      parallelRoutes[parallelRouteKey],\n      childHintNode,\n      prefetchInliningEnabled,\n      cacheComponents,\n      partialPrefetching,\n      isStaticGeneration,\n      isBuildTimePrerendering,\n      getDynamicParamFromSegment,\n      searchParams,\n      didFindRootLayout\n    )\n    // Propagate subtree flags from children\n    if (child[4] !== undefined) {\n      prefetchHints = propagateSubtreeBits(prefetchHints, child[4])\n    }\n    children[parallelRouteKey] = child\n  }\n  segmentTree[1] = children\n\n  if (prefetchHints !== 0) {\n    segmentTree[4] = prefetchHints\n  }\n\n  return segmentTree\n}\n\nexport async function createFlightRouterStateFromLoaderTree(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  prefetchInliningEnabled: boolean,\n  cacheComponents: boolean,\n  partialPrefetching: boolean | 'unstable_eager' | undefined,\n  isStaticGeneration: boolean,\n  isBuildTimePrerendering: boolean,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment,\n  searchParams: any,\n  // Whether a root layout was already found above this loader tree slice, so a\n  // slice that starts below the root layout doesn't mark a sub-layout as the\n  // root layout.\n  didFindRootLayout: boolean = false\n): Promise<FlightRouterState> {\n  return createFlightRouterStateFromLoaderTreeImpl(\n    loaderTree,\n    hintTree,\n    prefetchInliningEnabled,\n    cacheComponents,\n    partialPrefetching,\n    isStaticGeneration,\n    isBuildTimePrerendering,\n    getDynamicParamFromSegment,\n    searchParams,\n    didFindRootLayout\n  )\n}\n\nexport async function createRouteTreePrefetch(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  prefetchInliningEnabled: boolean,\n  cacheComponents: boolean,\n  partialPrefetching: boolean | 'unstable_eager' | undefined,\n  isStaticGeneration: boolean,\n  isBuildTimePrerendering: boolean,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment,\n  // See note on createFlightRouterStateFromLoaderTree's didFindRootLayout.\n  didFindRootLayout: boolean = false\n): Promise<FlightRouterState> {\n  // Search params should not be added to page segment's cache key during a\n  // route tree prefetch request, because they do not affect the structure of\n  // the route. The client cache has its own logic to handle search params.\n  const searchParams = {}\n  return createFlightRouterStateFromLoaderTreeImpl(\n    loaderTree,\n    hintTree,\n    prefetchInliningEnabled,\n    cacheComponents,\n    partialPrefetching,\n    isStaticGeneration,\n    isBuildTimePrerendering,\n    getDynamicParamFromSegment,\n    searchParams,\n    didFindRootLayout\n  )\n}\n","export const ipcForbiddenHeaders = [\n  'accept-encoding',\n  'keepalive',\n  'keep-alive',\n  'content-encoding',\n  'transfer-encoding',\n  // https://github.com/nodejs/undici/issues/1470\n  'connection',\n  // marked as unsupported by undici: https://github.com/nodejs/undici/blob/c83b084879fa0bb8e0469d31ec61428ac68160d5/lib/core/request.js#L354\n  'expect',\n]\n\nexport const actionsForbiddenHeaders = [\n  ...ipcForbiddenHeaders,\n  'content-length',\n  'set-cookie',\n]\n\nexport const filterReqHeaders = (\n  headers: Record<string, undefined | string | number | string[]>,\n  forbiddenHeaders: string[]\n) => {\n  // Some browsers are not matching spec and sending Content-Length: 0. This causes issues in undici\n  // https://github.com/nodejs/undici/issues/2046\n  if (headers['content-length'] && headers['content-length'] === '0') {\n    delete headers['content-length']\n  }\n\n  for (const [key, value] of Object.entries(headers)) {\n    if (\n      forbiddenHeaders.includes(key) ||\n      !(Array.isArray(value) || typeof value === 'string')\n    ) {\n      delete headers[key]\n    }\n  }\n  return headers as Record<string, undefined | string | string[]>\n}\n\n// These are headers that are only used internally and should\n// not be honored from the external request\nconst INTERNAL_HEADERS = [\n  'x-middleware-rewrite',\n  'x-middleware-redirect',\n  'x-middleware-set-cookie',\n  'x-middleware-skip',\n  'x-middleware-override-headers',\n  'x-middleware-next',\n  'x-now-route-matches',\n  'x-matched-path',\n  'x-nextjs-data',\n  'x-next-resume-state-length',\n  'next-resume',\n]\n\nexport const filterInternalHeaders = (\n  headers: Record<string, undefined | string | string[]>\n) => {\n  for (const header in headers) {\n    if (INTERNAL_HEADERS.includes(header)) {\n      delete headers[header]\n    }\n  }\n}\n","import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/exports'\nimport { ACTION_HEADER } from '../../client/components/app-router-headers'\n\nexport function getServerActionRequestMetadata(\n  req: IncomingMessage | BaseNextRequest | NextRequest\n): {\n  actionId: string | null\n  isURLEncodedAction: boolean\n  isMultipartAction: boolean\n  isFetchAction: boolean\n  isPossibleServerAction: boolean\n} {\n  let actionId: string | null\n  let contentType: string | null\n\n  if (req.headers instanceof Headers) {\n    actionId = req.headers.get(ACTION_HEADER) ?? null\n    contentType = req.headers.get('content-type')\n  } else {\n    actionId = (req.headers[ACTION_HEADER] as string) ?? null\n    contentType = req.headers['content-type'] ?? null\n  }\n\n  // We don't actually support URL encoded actions, and the action handler will bail out if it sees one.\n  // But we still want it to flow through to the action handler, to prevent changes in behavior when a regular\n  // page component tries to handle a POST.\n  const isURLEncodedAction = Boolean(\n    req.method === 'POST' && contentType === 'application/x-www-form-urlencoded'\n  )\n  const isMultipartAction = Boolean(\n    req.method === 'POST' && contentType?.startsWith('multipart/form-data')\n  )\n  const isFetchAction = Boolean(\n    actionId !== undefined &&\n      typeof actionId === 'string' &&\n      req.method === 'POST'\n  )\n\n  const isPossibleServerAction = Boolean(\n    isFetchAction || isURLEncodedAction || isMultipartAction\n  )\n\n  return {\n    actionId,\n    isURLEncodedAction,\n    isMultipartAction,\n    isFetchAction,\n    isPossibleServerAction,\n  }\n}\n\nexport function getIsPossibleServerAction(\n  req: IncomingMessage | BaseNextRequest | NextRequest\n): boolean {\n  return getServerActionRequestMetadata(req).isPossibleServerAction\n}\n","import type { LoaderTree } from '../lib/app-dir-module'\n\nexport const BUILTIN_PREFIX = '__next_builtin__'\n\nconst nextInternalPrefixRegex =\n  /^(.*[\\\\/])?next[\\\\/]dist[\\\\/]client[\\\\/]components[\\\\/]builtin[\\\\/]/\n\n/**\n * Normalize a file path to be relative to the project directory.\n * Handles Turbopack [project] prefix and monorepo setups.\n */\nexport function normalizeFilePath(\n  projectDir: string,\n  filePath: string | undefined\n): string {\n  // Turbopack project path is formed as: \"<project root>/<cwd>\".\n  // When project root is not the working directory, we can extract the relative project root path.\n  // This is mostly used for running Next.js inside a monorepo.\n  const cwd = process.env.NEXT_RUNTIME === 'edge' ? '' : process.cwd()\n  const relativeProjectRoot = projectDir.replace(cwd, '').replace(/^[\\\\/]/, '')\n\n  let relativePath = (filePath || '')\n    // remove turbopack [project] prefix\n    .replace(/^\\[project\\][\\\\/]?/, '')\n    // remove the project root from the path (absolute)\n    .replace(projectDir, '')\n    // remove cwd prefix (absolute)\n    .replace(cwd, '')\n    // normalize path separators and remove leading slash\n    .replace(/\\\\/g, '/')\n    .replace(/^\\//, '')\n\n  // remove relative project path prefix (e.g., \"test/e2e/app-dir/actions/\")\n  if (relativeProjectRoot && relativePath.startsWith(relativeProjectRoot)) {\n    relativePath = relativePath\n      .slice(relativeProjectRoot.length)\n      .replace(/^\\//, '')\n  }\n\n  // Handle case where filename is relative to a parent of projectDir\n  // (e.g., in tests where filename is \"test/tmp/next-test-XXX/app/page.js\"\n  // but projectDir is the test temp directory)\n  if (relativePath.includes('/')) {\n    const projectDirName = projectDir.split(/[\\\\/]/).pop() || ''\n    if (projectDirName) {\n      const projectDirWithSlash = projectDirName + '/'\n      const idx = relativePath.indexOf(projectDirWithSlash)\n      if (idx >= 0) {\n        relativePath = relativePath.slice(idx + projectDirWithSlash.length)\n      }\n    }\n  }\n\n  return relativePath\n}\n\nexport function normalizeConventionFilePath(\n  projectDir: string,\n  conventionPath: string | undefined\n) {\n  let relativePath = normalizeFilePath(projectDir, conventionPath)\n    // remove /(src/)?app/ dir prefix\n    .replace(/^(src\\/)?app\\//, '')\n\n  // If it's internal file only keep the filename, strip nextjs internal prefix\n  if (nextInternalPrefixRegex.test(relativePath)) {\n    relativePath = relativePath.replace(nextInternalPrefixRegex, '')\n    // Add a special prefix to let segment explorer know it's a built-in component\n    relativePath = `${BUILTIN_PREFIX}${relativePath}`\n  }\n\n  return relativePath\n}\n\n// if a filepath is a builtin file. e.g.\n// .../project/node_modules/next/dist/client/components/builtin/global-error.js -> true\n// .../project/app/global-error.js -> false\nexport const isNextjsBuiltinFilePath = (filePath: string) => {\n  return nextInternalPrefixRegex.test(filePath)\n}\n\nexport const BOUNDARY_SUFFIX = '@boundary'\nexport function normalizeBoundaryFilename(filename: string) {\n  return filename\n    .replace(new RegExp(`^${BUILTIN_PREFIX}`), '')\n    .replace(new RegExp(`${BOUNDARY_SUFFIX}$`), '')\n}\n\nexport const BOUNDARY_PREFIX = 'boundary:'\nexport function isBoundaryFile(fileType: string) {\n  return fileType.startsWith(BOUNDARY_PREFIX)\n}\n\n// if a filename is a builtin file.\n// __next_builtin__global-error.js -> true\n// page.js -> false\nexport function isBuiltinBoundaryFile(fileType: string) {\n  return fileType.startsWith(BUILTIN_PREFIX)\n}\n\nexport function getBoundaryOriginFileType(fileType: string) {\n  return fileType.replace(BOUNDARY_PREFIX, '')\n}\n\nexport function getConventionPathByType(\n  tree: LoaderTree,\n  dir: string,\n  conventionType:\n    | 'layout'\n    | 'template'\n    | 'page'\n    | 'not-found'\n    | 'error'\n    | 'loading'\n    | 'forbidden'\n    | 'unauthorized'\n    | 'defaultPage'\n    | 'global-error'\n) {\n  const modules = tree[2]\n  const conventionPath = modules[conventionType]\n    ? modules[conventionType][1]\n    : undefined\n  if (conventionPath) {\n    return normalizeConventionFilePath(dir, conventionPath)\n  }\n  return undefined\n}\n","import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'node:http'\nimport type { SizeLimit } from '../../types'\nimport type { RequestStore } from '../app-render/work-unit-async-storage.external'\nimport type { AppRenderContext, GenerateFlight } from './app-render'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { BaseNextRequest, BaseNextResponse } from '../base-http'\n\nimport {\n  RSC_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  ACTION_HEADER,\n  NEXT_ACTION_NOT_FOUND_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_URL,\n  NEXT_ACTION_REVALIDATED_HEADER,\n} from '../../client/components/app-router-headers'\nimport {\n  getAccessFallbackHTTPStatus,\n  isHTTPAccessFallbackError,\n} from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getRedirectTypeFromError,\n  getURLFromRedirectError,\n} from '../../client/components/redirect'\nimport {\n  isRedirectError,\n  type RedirectType,\n} from '../../client/components/redirect-error'\nimport RenderResult, {\n  type AppPageRenderResultMetadata,\n} from '../render-result'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { FlightRenderResult } from './flight-render-result'\nimport {\n  filterReqHeaders,\n  actionsForbiddenHeaders,\n} from '../lib/server-ipc/utils'\nimport { getModifiedCookieValues } from '../web/spec-extension/adapters/request-cookies'\n\nimport {\n  JSON_CONTENT_TYPE_HEADER,\n  NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n  NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n} from '../../lib/constants'\nimport { getServerActionRequestMetadata } from '../lib/server-action-request-meta'\nimport { isCsrfOriginAllowed } from './csrf-protection'\nimport { warn } from '../../build/output/log'\nimport { RequestCookies, ResponseCookies } from '../web/spec-extension/cookies'\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport { fromNodeOutgoingHttpHeaders } from '../web/utils'\nimport {\n  selectWorkerForForwarding,\n  type ServerModuleMap,\n  getServerActionsManifest,\n  getServerModuleMap,\n  getActionNotFoundError,\n  getInvalidServerReferenceIdError,\n} from './manifests-singleton'\nimport { isNodeNextRequest, isWebNextRequest } from '../base-http/helpers'\nimport { normalizeFilePath } from './segment-explorer-path'\nimport {\n  extractInfoFromServerReferenceId,\n  mightBeServerReferenceId,\n} from '../../shared/lib/server-reference-info'\nimport type { ServerActionLogInfo } from '../dev/server-action-logger'\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { synchronizeMutableCookies } from '../async-storage/request-store'\nimport type { TemporaryReferenceSet } from 'react-server-dom-webpack/server'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { executeRevalidates } from '../revalidation-utils'\nimport { addRequestMeta, getRequestMeta } from '../request-meta'\nimport { setCacheBustingSearchParamWithHash } from '../../client/components/router-reducer/set-cache-busting-search-param'\nimport {\n  ActionDidNotRevalidate,\n  ActionDidRevalidateStaticAndDynamic,\n} from '../../shared/lib/action-revalidation-kind'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\n\nconst INLINE_ACTION_PREFIX = '$$RSC_SERVER_ACTION_'\n\n/**\n * Checks if the app has any server actions defined in any runtime.\n */\nfunction hasServerActions() {\n  const serverActionsManifest = getServerActionsManifest()\n\n  return (\n    Object.keys(serverActionsManifest.node).length > 0 ||\n    Object.keys(serverActionsManifest.edge).length > 0\n  )\n}\n\nfunction nodeHeadersToRecord(\n  headers: IncomingHttpHeaders | OutgoingHttpHeaders\n) {\n  const record: Record<string, string> = {}\n  for (const [key, value] of Object.entries(headers)) {\n    if (value !== undefined) {\n      record[key] = Array.isArray(value) ? value.join(', ') : `${value}`\n    }\n  }\n  return record\n}\n\nfunction getForwardedHeaders(\n  req: BaseNextRequest,\n  res: BaseNextResponse\n): Headers {\n  // Get request headers and cookies\n  const requestHeaders = req.headers\n  const requestCookies = new RequestCookies(HeadersAdapter.from(requestHeaders))\n\n  // Get response headers and cookies\n  const responseHeaders = res.getHeaders()\n  const responseCookies = new ResponseCookies(\n    fromNodeOutgoingHttpHeaders(responseHeaders)\n  )\n\n  // Merge request and response headers\n  const mergedHeaders = filterReqHeaders(\n    {\n      ...nodeHeadersToRecord(requestHeaders),\n      ...nodeHeadersToRecord(responseHeaders),\n    },\n    actionsForbiddenHeaders\n  ) as Record<string, string>\n\n  // Merge cookies into requestCookies, so responseCookies always take precedence\n  // and overwrite/delete those from requestCookies.\n  responseCookies.getAll().forEach((cookie) => {\n    if (typeof cookie.value === 'undefined') {\n      requestCookies.delete(cookie.name)\n    } else {\n      requestCookies.set(cookie)\n    }\n  })\n\n  // Update the 'cookie' header with the merged cookies\n  mergedHeaders['cookie'] = requestCookies.toString()\n\n  // Remove headers that should not be forwarded\n  delete mergedHeaders['transfer-encoding']\n\n  return new Headers(mergedHeaders)\n}\n\nfunction addRevalidationHeader(\n  res: BaseNextResponse,\n  {\n    workStore,\n    requestStore,\n  }: {\n    workStore: WorkStore\n    requestStore: RequestStore\n  }\n) {\n  // If a tag was revalidated, the client router needs to invalidate all the\n  // client router cache as they may be stale. And if a path was revalidated, the\n  // client needs to invalidate all subtrees below that path.\n\n  // TODO: Currently we don't send the specific tags or paths to the client,\n  // we just send a flag indicating that all the static data on the client\n  // should be invalidated. In the future, this will likely be a Bloom filter\n  // or bitmask of some kind.\n\n  // TODO-APP: Currently the prefetch cache doesn't have subtree information,\n  // so we need to invalidate the entire cache if a path was revalidated.\n  // TODO-APP: Currently paths are treated as tags, so the second element of the tuple\n  // is always empty.\n\n  // Only count tags without a profile (updateTag) as requiring client cache invalidation\n  // Tags with a profile (revalidateTag) use stale-while-revalidate and shouldn't\n  // trigger immediate client-side cache invalidation\n  const isTagRevalidated = workStore.pendingRevalidatedTags?.some(\n    (item) => item.profile === undefined\n  )\n    ? 1\n    : 0\n  const isCookieRevalidated = getModifiedCookieValues(\n    requestStore.mutableCookies\n  ).length\n    ? 1\n    : 0\n\n  // First check if a tag, cookie, or path was revalidated.\n  if (isTagRevalidated || isCookieRevalidated) {\n    res.setHeader(\n      NEXT_ACTION_REVALIDATED_HEADER,\n      JSON.stringify(ActionDidRevalidateStaticAndDynamic)\n    )\n  } else if (\n    // Check for refresh() actions. This will invalidate only the dynamic data.\n    workStore.pathWasRevalidated !== undefined &&\n    workStore.pathWasRevalidated !== ActionDidNotRevalidate\n  ) {\n    res.setHeader(\n      NEXT_ACTION_REVALIDATED_HEADER,\n      JSON.stringify(workStore.pathWasRevalidated)\n    )\n  }\n}\n\n/**\n * Forwards a server action request to a separate worker. Used when the requested action is not available in the current worker.\n */\nasync function createForwardedActionResponse(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  host: Host,\n  workerPathname: string,\n  basePath: string\n) {\n  if (!host) {\n    throw new Error(\n      'Invariant: Missing `host` header from a forwarded Server Actions request.'\n    )\n  }\n\n  const forwardedHeaders = getForwardedHeaders(req, res)\n\n  // indicate that this action request was forwarded from another worker\n  // we use this to skip rendering the flight tree so that we don't update the UI\n  // with the response from the forwarded worker\n  forwardedHeaders.set('x-action-forwarded', '1')\n\n  // TODO: Remove __NEXT_PRIVATE_ORIGIN\n  let origin: string | undefined = process.env.__NEXT_PRIVATE_ORIGIN\n  if (origin === undefined) {\n    const initUrl = getRequestMeta(req, 'initURL')\n    if (initUrl !== undefined) {\n      try {\n        const parsedUrl = new URL(initUrl)\n        origin = parsedUrl.origin\n      } catch (error) {\n        throw new Error(\n          'Could not determine origin for forwarded Server Actions request. This can happen if port or hostname are not configured for this server.',\n          { cause: error }\n        )\n      }\n    } else {\n      throw new InvariantError('Missing initURL')\n    }\n  }\n\n  const fetchUrl = new URL(`${origin}${basePath}${workerPathname}`)\n\n  try {\n    let body: BodyInit | ReadableStream<Uint8Array> | undefined\n    if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME === 'edge' &&\n      isWebNextRequest(req)\n    ) {\n      if (!req.body) {\n        throw new Error('Invariant: missing request body.')\n      }\n\n      body = req.body\n    } else if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(req)\n    ) {\n      body = req.stream()\n    } else {\n      throw new Error('Invariant: Unknown request type.')\n    }\n\n    // Forward the request to the new worker\n    const response = await fetch(fetchUrl, {\n      method: 'POST',\n      body,\n      duplex: 'half',\n      headers: forwardedHeaders,\n      redirect: 'manual',\n      next: {\n        // @ts-ignore\n        internal: 1,\n      },\n    })\n\n    if (\n      response.headers.get('content-type')?.startsWith(RSC_CONTENT_TYPE_HEADER)\n    ) {\n      // copy the headers from the redirect response to the response we're sending\n      for (const [key, value] of response.headers) {\n        if (!actionsForbiddenHeaders.includes(key)) {\n          res.setHeader(key, value)\n        }\n      }\n\n      return new FlightRenderResult(response.body!)\n    }\n\n    // Since we aren't consuming the response body, we cancel it to avoid memory leaks\n    response.body?.cancel()\n\n    // Pass the action-not-found marker through so the client throws\n    // UnrecognizedActionError instead of a generic \"unexpected response\".\n    if (response.headers.get(NEXT_ACTION_NOT_FOUND_HEADER) === '1') {\n      res.setHeader(NEXT_ACTION_NOT_FOUND_HEADER, '1')\n      res.setHeader('content-type', 'text/plain')\n      res.statusCode = 404\n      return RenderResult.fromStatic('Server action not found.', 'text/plain')\n    }\n  } catch (err) {\n    // we couldn't stream the forwarded response, so we'll just return an empty response\n    console.error(`failed to forward action response`, err)\n  }\n\n  return RenderResult.fromStatic('{}', JSON_CONTENT_TYPE_HEADER)\n}\n\n/**\n * Returns the parsed redirect URL if we deem that it is hosted by us.\n *\n * We handle both relative and absolute redirect URLs.\n *\n * In case the redirect URL is not relative to the application we return `null`.\n */\nfunction getAppRelativeRedirectUrl(\n  basePath: string,\n  host: Host,\n  redirectUrl: string,\n  currentPathname?: string\n): URL | null {\n  if (redirectUrl.startsWith('/')) {\n    // Absolute path - just add basePath\n    return new URL(`${basePath}${redirectUrl}`, 'http://n')\n  } else if (redirectUrl.startsWith('.')) {\n    // Relative path - resolve relative to current pathname\n    let base = currentPathname || '/'\n    // Ensure the base path ends with a slash so relative resolution works correctly\n    // e.g., \"./subpage\" from \"/subdir\" should resolve to \"/subdir/subpage\"\n    // not \"/subpage\"\n    if (!base.endsWith('/')) {\n      base = base + '/'\n    }\n    const resolved = new URL(redirectUrl, `http://n${base}`)\n    // Include basePath in the final URL\n    return new URL(\n      `${basePath}${resolved.pathname}${resolved.search}${resolved.hash}`,\n      'http://n'\n    )\n  }\n\n  const parsedRedirectUrl = new URL(redirectUrl)\n\n  if (host?.value !== parsedRedirectUrl.host) {\n    return null\n  }\n\n  // At this point the hosts are the same, just confirm we\n  // are routing to a path underneath the `basePath`\n  return parsedRedirectUrl.pathname.startsWith(basePath)\n    ? parsedRedirectUrl\n    : null\n}\n\nasync function createRedirectRenderResult(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  originalHost: Host,\n  redirectUrl: string,\n  redirectType: RedirectType,\n  basePath: string,\n  workStore: WorkStore,\n  currentPathname?: string\n) {\n  res.setHeader('x-action-redirect', `${redirectUrl};${redirectType}`)\n\n  // If we're redirecting to another route of this Next.js application, we'll\n  // try to stream the response from the other worker path. When that works,\n  // we can save an extra roundtrip and avoid a full page reload.\n  // When the redirect URL starts with a `/` or is to the same host, under the\n  // `basePath` we treat it as an app-relative redirect;\n  const appRelativeRedirectUrl = getAppRelativeRedirectUrl(\n    basePath,\n    originalHost,\n    redirectUrl,\n    currentPathname\n  )\n\n  if (appRelativeRedirectUrl) {\n    if (!originalHost) {\n      throw new Error(\n        'Invariant: Missing `host` header from a forwarded Server Actions request.'\n      )\n    }\n\n    const forwardedHeaders = getForwardedHeaders(req, res)\n    forwardedHeaders.set(RSC_HEADER, '1')\n\n    // TODO: Remove __NEXT_PRIVATE_ORIGIN\n    let origin: string | undefined = process.env.__NEXT_PRIVATE_ORIGIN\n    if (origin === undefined) {\n      const initUrl = getRequestMeta(req, 'initURL')\n      if (initUrl !== undefined) {\n        try {\n          const parsedUrl = new URL(initUrl)\n\n          origin = parsedUrl.origin\n        } catch (error) {\n          throw new Error(\n            'Could not determine origin for forwarded Server Actions request. This can happen if port or hostname are not configured for this server.',\n            { cause: error }\n          )\n        }\n      } else {\n        throw new InvariantError('Missing initURL')\n      }\n    }\n\n    const fetchUrl = new URL(\n      `${origin}${appRelativeRedirectUrl.pathname}${appRelativeRedirectUrl.search}`\n    )\n\n    if (workStore.pendingRevalidatedTags) {\n      forwardedHeaders.set(\n        NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n        workStore.pendingRevalidatedTags.map((item) => item.tag).join(',')\n      )\n      forwardedHeaders.set(\n        NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n        workStore.incrementalCache?.prerenderManifest?.preview?.previewModeId ||\n          ''\n      )\n    }\n\n    // Ensures that when the path was revalidated we don't return a partial response on redirects\n    forwardedHeaders.delete(NEXT_ROUTER_STATE_TREE_HEADER)\n    // When an action follows a redirect, it's no longer handling an action: it's just a normal RSC request\n    // to the requested URL. We should remove the `next-action` header so that it's not treated as an action\n    forwardedHeaders.delete(ACTION_HEADER)\n\n    try {\n      const cacheBustingSearchParam = await computeCacheBustingSearchParam(\n        forwardedHeaders.get(NEXT_ROUTER_PREFETCH_HEADER)\n          ? ('1' as const)\n          : undefined,\n        forwardedHeaders.get(NEXT_ROUTER_SEGMENT_PREFETCH_HEADER) ?? undefined,\n        forwardedHeaders.get(NEXT_ROUTER_STATE_TREE_HEADER) ?? undefined,\n        forwardedHeaders.get(NEXT_URL) ?? undefined\n      )\n      setCacheBustingSearchParamWithHash(fetchUrl, cacheBustingSearchParam)\n\n      const response = await fetch(fetchUrl, {\n        method: 'GET',\n        headers: forwardedHeaders,\n        next: {\n          // @ts-ignore\n          internal: 1,\n        },\n      })\n\n      if (\n        response.headers\n          .get('content-type')\n          ?.startsWith(RSC_CONTENT_TYPE_HEADER)\n      ) {\n        // copy the headers from the redirect response to the response we're sending\n        for (const [key, value] of response.headers) {\n          if (!actionsForbiddenHeaders.includes(key)) {\n            res.setHeader(key, value)\n          }\n        }\n\n        return new FlightRenderResult(response.body!)\n      } else {\n        // Since we aren't consuming the response body, we cancel it to avoid memory leaks\n        response.body?.cancel()\n      }\n    } catch (err) {\n      // we couldn't stream the redirect response, so we'll just do a normal redirect\n      console.error(`failed to get redirect response`, err)\n    }\n  }\n\n  return RenderResult.EMPTY\n}\n\n// Used to compare Host header and Origin header.\nconst enum HostType {\n  XForwardedHost = 'x-forwarded-host',\n  Host = 'host',\n}\ntype Host =\n  | {\n      type: HostType.XForwardedHost\n      value: string\n    }\n  | {\n      type: HostType.Host\n      value: string\n    }\n  | undefined\n\n/**\n * Ensures the value of the header can't create long logs.\n */\nfunction limitUntrustedHeaderValueForLogs(value: string) {\n  return value.length > 100 ? value.slice(0, 100) + '...' : value\n}\n\nexport function parseHostHeader(\n  headers: IncomingHttpHeaders,\n  originDomain?: string\n) {\n  const forwardedHostHeader = headers['x-forwarded-host']\n  const forwardedHostHeaderValue =\n    forwardedHostHeader && Array.isArray(forwardedHostHeader)\n      ? forwardedHostHeader[0]\n      : forwardedHostHeader?.split(',')?.[0]?.trim()\n  const hostHeader = headers['host']\n\n  if (originDomain) {\n    return forwardedHostHeaderValue === originDomain\n      ? {\n          type: HostType.XForwardedHost,\n          value: forwardedHostHeaderValue,\n        }\n      : hostHeader === originDomain\n        ? {\n            type: HostType.Host,\n            value: hostHeader,\n          }\n        : undefined\n  }\n\n  return forwardedHostHeaderValue\n    ? {\n        type: HostType.XForwardedHost,\n        value: forwardedHostHeaderValue,\n      }\n    : hostHeader\n      ? {\n          type: HostType.Host,\n          value: hostHeader,\n        }\n      : undefined\n}\n\ntype ServerActionsConfig = {\n  bodySizeLimit?: SizeLimit\n  allowedOrigins?: string[]\n}\n\ntype HandleActionResult =\n  | {\n      /** An MPA action threw notFound(), and we need to render the appropriate HTML */\n      type: 'not-found'\n    }\n  | {\n      type: 'done'\n      result: RenderResult | undefined\n      formState?: any\n    }\n  /** The request turned out not to be a server action. */\n  | null\n\nexport async function handleAction({\n  req,\n  res,\n  ComponentMod,\n  generateFlight,\n  workStore,\n  requestStore,\n  serverActions,\n  ctx,\n  metadata,\n}: {\n  req: BaseNextRequest\n  res: BaseNextResponse\n  ComponentMod: AppPageModule\n  generateFlight: GenerateFlight\n  workStore: WorkStore\n  requestStore: RequestStore\n  serverActions?: ServerActionsConfig\n  ctx: AppRenderContext\n  metadata: AppPageRenderResultMetadata\n}): Promise<HandleActionResult> {\n  const contentType = req.headers['content-type']\n  const { page } = ctx.renderOpts\n  const serverModuleMap = getServerModuleMap()\n\n  const {\n    actionId,\n    isMultipartAction,\n    isFetchAction,\n    isURLEncodedAction,\n    isPossibleServerAction,\n  } = getServerActionRequestMetadata(req)\n\n  const handleUnrecognizedFetchAction = (err: unknown): HandleActionResult => {\n    // If the deployment doesn't have skew protection, this is expected to occasionally happen,\n    // so we use a warning instead of an error.\n    console.warn(err)\n\n    // Return an empty response with a header that the client router will interpret.\n    // We don't need to waste time encoding a flight response, and using a blank body + header\n    // means that unrecognized actions can also be handled at the infra level\n    // (i.e. without needing to invoke a lambda)\n    res.setHeader(NEXT_ACTION_NOT_FOUND_HEADER, '1')\n    res.setHeader('content-type', 'text/plain')\n    res.statusCode = 404\n    return {\n      type: 'done',\n      result: RenderResult.fromStatic('Server action not found.', 'text/plain'),\n    }\n  }\n\n  // If it can't be a Server Action, skip handling.\n  // Note that this can be a false positive -- any multipart/urlencoded POST can get us here,\n  // But won't know if it's an MPA action or not until we call `decodeAction` below.\n  if (!isPossibleServerAction) {\n    return null\n  }\n\n  // We don't currently support URL encoded actions, so we bail out early.\n  // Depending on if it's a fetch action or an MPA, we return a different response.\n  if (isURLEncodedAction) {\n    if (isFetchAction) {\n      return {\n        type: 'not-found',\n      }\n    } else {\n      // This is an MPA action, so we return null\n      return null\n    }\n  }\n\n  // If the app has no server actions at all, we can 404 early.\n  if (!hasServerActions()) {\n    const error =\n      actionId !== null && !mightBeServerReferenceId(actionId)\n        ? getInvalidServerReferenceIdError(actionId)\n        : getActionNotFoundError(actionId)\n    return handleUnrecognizedFetchAction(error)\n  }\n\n  if (workStore.isStaticGeneration) {\n    throw new Error(\n      \"Invariant: server actions can't be handled during static rendering\"\n    )\n  }\n\n  let temporaryReferences: TemporaryReferenceSet | undefined\n\n  // When running actions the default is no-store, you can still `cache: 'force-cache'`\n  workStore.fetchCache = 'default-no-store'\n\n  const originHeader = req.headers['origin']\n  const originHost =\n    typeof originHeader === 'string'\n      ? // 'null' is a valid origin e.g. from privacy-sensitive contexts like sandboxed iframes.\n        // However, these contexts can still send along credentials like cookies,\n        // so we need to check if they're allowed cross-origin requests.\n        originHeader === 'null'\n        ? 'null'\n        : new URL(originHeader).host\n      : undefined\n  const host = parseHostHeader(req.headers)\n\n  let warning: string | undefined = undefined\n\n  function warnBadServerActionRequest() {\n    if (warning) {\n      warn(warning)\n    }\n  }\n  // This is to prevent CSRF attacks. If `x-forwarded-host` is set, we need to\n  // ensure that the request is coming from the same host.\n  if (!originHost) {\n    // This is a handcrafted request without an origin or a request from an unsafe browser.\n    // We'll let this through but log a warning.\n    // We can't guard against unsafe browsers and handcrafted requests can't contain\n    // user credentials that haven't been shared willingly.\n    warning = 'Missing `origin` header from a forwarded Server Actions request.'\n  } else if (!host || originHost !== host.value) {\n    // If the customer sets a list of allowed origins, we'll allow the request.\n    // These are considered safe but might be different from forwarded host set\n    // by the infra (i.e. reverse proxies).\n    if (isCsrfOriginAllowed(originHost, serverActions?.allowedOrigins)) {\n      // Ignore it\n    } else {\n      if (host) {\n        // This seems to be an CSRF attack. We should not proceed the action.\n        console.error(\n          `\\`${\n            host.type\n          }\\` header with value \\`${limitUntrustedHeaderValueForLogs(\n            host.value\n          )}\\` does not match \\`origin\\` header with value \\`${limitUntrustedHeaderValueForLogs(\n            originHost\n          )}\\` from a forwarded Server Actions request. Aborting the action.`\n        )\n      } else {\n        // This is an attack. We should not proceed the action.\n        console.error(\n          `\\`x-forwarded-host\\` or \\`host\\` headers are not provided. One of these is needed to compare the \\`origin\\` header from a forwarded Server Actions request. Aborting the action.`\n        )\n      }\n\n      const error = new Error('Invalid Server Actions request.')\n\n      if (isFetchAction) {\n        res.statusCode = 500\n        metadata.statusCode = 500\n\n        const promise = Promise.reject(error)\n        try {\n          // we need to await the promise to trigger the rejection early\n          // so that it's already handled by the time we call\n          // the RSC runtime. Otherwise, it will throw an unhandled\n          // promise rejection error in the renderer.\n          await promise\n        } catch {\n          // swallow error, it's gonna be handled on the client\n        }\n\n        return {\n          type: 'done',\n          result: await generateFlight(req, ctx, requestStore, {\n            actionResult: promise,\n            // We didn't execute an action, so no revalidations could have\n            // occurred. We can skip rendering the page.\n            skipPageRendering: true,\n            temporaryReferences,\n          }),\n        }\n      }\n\n      throw error\n    }\n  }\n\n  // ensure we avoid caching server actions unexpectedly\n  res.setHeader(\n    'Cache-Control',\n    'no-cache, no-store, max-age=0, must-revalidate'\n  )\n\n  const actionWasForwarded = Boolean(req.headers['x-action-forwarded'])\n\n  // Only attempt to forward if this request has not already been forwarded.\n  // Otherwise middleware that rewrites the action POST can cause the receiving\n  // worker to forward again, looping indefinitely.\n  if (actionId && !actionWasForwarded) {\n    const forwardedWorker = selectWorkerForForwarding(actionId, page)\n\n    // If forwardedWorker is truthy, it means there isn't a worker for the\n    // action in the current handler, so we forward the request to a worker that\n    // has the action.\n    if (forwardedWorker) {\n      return {\n        type: 'done',\n        result: await createForwardedActionResponse(\n          req,\n          res,\n          host,\n          forwardedWorker,\n          ctx.renderOpts.basePath\n        ),\n      }\n    }\n  }\n\n  try {\n    return await actionAsyncStorage.run(\n      { isAction: true },\n      async (): Promise<HandleActionResult> => {\n        // We only use these for fetch actions -- MPA actions handle them inside `decodeAction`.\n        let actionModId: string | number | undefined\n        let boundActionArguments: unknown[] = []\n\n        const defaultBodySizeLimit = '1 MB'\n        const bodySizeLimit =\n          serverActions?.bodySizeLimit ?? defaultBodySizeLimit\n        const bodySizeLimitBytes =\n          bodySizeLimit !== defaultBodySizeLimit\n            ? (\n                require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n              ).parse(bodySizeLimit)\n            : 1024 * 1024 // 1 MB\n\n        if (\n          // The type check here ensures that `req` is correctly typed, and the\n          // environment variable check provides dead code elimination.\n          process.env.NEXT_RUNTIME === 'edge' &&\n          isWebNextRequest(req)\n        ) {\n          if (!req.body) {\n            throw new Error('invariant: Missing request body.')\n          }\n\n          // Use react-server-dom-webpack/server\n          const {\n            createTemporaryReferenceSet,\n            decodeReply,\n            decodeAction,\n            decodeFormState,\n          } = ComponentMod\n\n          temporaryReferences = createTemporaryReferenceSet()\n\n          if (isMultipartAction) {\n            // TODO-APP: Add streaming support\n            // Read the body stream with size tracking to enforce bodySizeLimitBytes.\n            // We cannot call req.request.formData() directly as that would bypass\n            // the body size limit entirely.\n            const edgeChunks: Uint8Array[] = []\n            let edgeBodySize = 0\n            const edgeReader = req.body.getReader()\n            while (true) {\n              const { done, value } = await edgeReader.read()\n              if (done) break\n              edgeBodySize += value.byteLength\n              if (edgeBodySize > bodySizeLimitBytes) {\n                const { ApiError } =\n                  require('../api-utils') as typeof import('../api-utils')\n                throw new ApiError(\n                  413,\n                  `Body exceeded ${bodySizeLimit} limit.\\n` +\n                    `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n                )\n              }\n              edgeChunks.push(value)\n            }\n            // Reconstruct a Blob from the buffered chunks and parse formData from it.\n            // Note: we must pass the original Content-Type as an explicit header\n            // rather than relying on the Blob's `type`. The Blob constructor\n            // normalizes `type` to ASCII lowercase per the File API spec, which\n            // would lowercase the multipart boundary parameter (e.g.\n            // `boundary=----WebKitFormBoundaryAbCdEf`). The body bytes contain the\n            // original mixed-case boundary delimiter, so a lowercased boundary\n            // would fail to match and `formData()` would throw. An explicit header\n            // on the Request takes precedence over the Blob's normalized type.\n            const edgeBodyBlob = new Blob(edgeChunks as BlobPart[])\n            const formData = await new Request('http://n/', {\n              method: 'POST',\n              headers: { 'content-type': req.headers['content-type'] ?? '' },\n              body: edgeBodyBlob,\n            }).formData()\n            if (isFetchAction) {\n              // A fetch action with a multipart body.\n\n              try {\n                actionModId = getActionModIdOrError(actionId, serverModuleMap)\n              } catch (err) {\n                return handleUnrecognizedFetchAction(err)\n              }\n\n              boundActionArguments = await decodeReply<unknown[]>(\n                formData,\n                serverModuleMap,\n                { temporaryReferences }\n              )\n            } else {\n              // Multipart POST, but not a fetch action.\n              // Potentially an MPA action, we have to try decoding it to check.\n              if (areAllActionIdsValid(formData, serverModuleMap) === false) {\n                // TODO: This can be from skew or manipulated input. We should handle this case\n                // more gracefully but this preserves the prior behavior where decodeAction would throw instead.\n                throw new Error(\n                  `Failed to find Server Action. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n                )\n              }\n\n              const action = await decodeAction(formData, serverModuleMap)\n              if (typeof action === 'function') {\n                // an MPA action.\n\n                // Only warn if it's a server action, otherwise skip for other post requests\n                warnBadServerActionRequest()\n\n                const { actionResult } = await executeActionAndPrepareForRender(\n                  action as () => Promise<unknown>,\n                  [],\n                  workStore,\n                  requestStore,\n                  actionWasForwarded\n                )\n\n                const formState = await decodeFormState(\n                  actionResult,\n                  formData,\n                  serverModuleMap\n                )\n\n                // Skip the fetch path.\n                // We need to render a full HTML version of the page for the response, we'll handle that in app-render.\n                return {\n                  type: 'done',\n                  result: undefined,\n                  formState,\n                }\n              } else {\n                // We couldn't decode an action, so this POST request turned out not to be a server action request.\n                return null\n              }\n            }\n          } else {\n            // POST with non-multipart body.\n\n            // If it's not multipart AND not a fetch action,\n            // then it can't be an action request.\n            if (!isFetchAction) {\n              return null\n            }\n\n            try {\n              actionModId = getActionModIdOrError(actionId, serverModuleMap)\n            } catch (err) {\n              return handleUnrecognizedFetchAction(err)\n            }\n\n            // A fetch action with a non-multipart body.\n            // In practice, this happens if `encodeReply` returned a string instead of FormData,\n            // which can happen for very simple JSON-like values that don't need multiple flight rows.\n\n            const chunks: Buffer[] = []\n            let nonMultipartBodySize = 0\n            const reader = req.body.getReader()\n            while (true) {\n              const { done, value } = await reader.read()\n              if (done) {\n                break\n              }\n\n              nonMultipartBodySize += value.byteLength\n              if (nonMultipartBodySize > bodySizeLimitBytes) {\n                const { ApiError } =\n                  require('../api-utils') as typeof import('../api-utils')\n                throw new ApiError(\n                  413,\n                  `Body exceeded ${bodySizeLimit} limit.\\n` +\n                    `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n                )\n              }\n              chunks.push(value)\n            }\n\n            const actionData = Buffer.concat(chunks).toString('utf-8')\n\n            boundActionArguments = await decodeReply<unknown[]>(\n              actionData,\n              serverModuleMap,\n              { temporaryReferences }\n            )\n          }\n        } else if (\n          // The type check here ensures that `req` is correctly typed, and the\n          // environment variable check provides dead code elimination.\n          process.env.NEXT_RUNTIME !== 'edge' &&\n          isNodeNextRequest(req)\n        ) {\n          // Use react-server-dom-webpack/server.node which supports streaming\n          const {\n            createTemporaryReferenceSet,\n            decodeReply,\n            decodeReplyFromBusboy,\n            decodeAction,\n            decodeFormState,\n          } = require(\n            `./react-server.node`\n          ) as typeof import('./react-server.node')\n\n          temporaryReferences = createTemporaryReferenceSet()\n\n          const { PassThrough, Readable, Transform } =\n            require('node:stream') as typeof import('node:stream')\n          const { pipeline } =\n            require('node:stream/promises') as typeof import('node:stream/promises')\n\n          // If actionBody was stashed in request meta (from parsing the postponed\n          // state prefix in minimal mode), use it instead of req.body\n          const actionBodyFromMeta = getRequestMeta(req, 'actionBody')\n          const body: import('node:stream').Readable = actionBodyFromMeta\n            ? Readable.from(actionBodyFromMeta)\n            : req.body\n\n          let size = 0\n          const sizeLimitTransform = new Transform({\n            transform(chunk, encoding, callback) {\n              size += Buffer.byteLength(chunk, encoding)\n              if (size > bodySizeLimitBytes) {\n                const { ApiError } =\n                  require('../api-utils') as typeof import('../api-utils')\n\n                callback(\n                  new ApiError(\n                    413,\n                    `Body exceeded ${bodySizeLimit} limit.\\n` +\n                      `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n                  )\n                )\n                return\n              }\n\n              callback(null, chunk)\n            },\n          })\n\n          if (isMultipartAction) {\n            if (isFetchAction) {\n              // A fetch action with a multipart body.\n\n              try {\n                actionModId = getActionModIdOrError(actionId, serverModuleMap)\n              } catch (err) {\n                return handleUnrecognizedFetchAction(err)\n              }\n\n              const busboy = (\n                require('next/dist/compiled/busboy') as typeof import('next/dist/compiled/busboy')\n              )({\n                defParamCharset: 'utf8',\n                headers: req.headers,\n                limits: { fieldSize: bodySizeLimitBytes },\n              })\n\n              const abortController = new AbortController()\n              try {\n                ;[, boundActionArguments] = await Promise.all([\n                  pipeline(body, sizeLimitTransform, busboy, {\n                    signal: abortController.signal,\n                  }),\n                  decodeReplyFromBusboy<unknown[]>(busboy, serverModuleMap, {\n                    temporaryReferences,\n                  }),\n                ])\n              } catch (err) {\n                abortController.abort()\n                throw err\n              }\n            } else {\n              // Multipart POST, but not a fetch action.\n              // Potentially an MPA action, we have to try decoding it to check.\n\n              const sizeLimitedBody = new PassThrough()\n\n              // React doesn't yet publish a busboy version of decodeAction\n              // so we polyfill the parsing of FormData.\n              const fakeRequest = new Request('http://localhost', {\n                method: 'POST',\n                // @ts-expect-error\n                headers: { 'Content-Type': contentType },\n                body: Readable.toWeb(\n                  sizeLimitedBody\n                ) as ReadableStream<Uint8Array>,\n                duplex: 'half',\n              })\n\n              let formData: FormData\n              const abortController = new AbortController()\n              try {\n                ;[, formData] = await Promise.all([\n                  pipeline(body, sizeLimitTransform, sizeLimitedBody, {\n                    signal: abortController.signal,\n                  }),\n                  fakeRequest.formData(),\n                ])\n              } catch (err) {\n                abortController.abort()\n                throw err\n              }\n\n              if (areAllActionIdsValid(formData, serverModuleMap) === false) {\n                // TODO: This can be from skew or manipulated input. We should handle this case\n                // more gracefully but this preserves the prior behavior where decodeAction would throw instead.\n                throw new Error(\n                  `Failed to find Server Action. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n                )\n              }\n\n              // TODO: Refactor so it is harder to accidentally decode an action before you have validated that the\n              // action referred to is available.\n              const action = await decodeAction(formData, serverModuleMap)\n              if (typeof action === 'function') {\n                // an MPA action.\n\n                // Only warn if it's a server action, otherwise skip for other post requests\n                warnBadServerActionRequest()\n\n                const { actionResult } = await executeActionAndPrepareForRender(\n                  action as () => Promise<unknown>,\n                  [],\n                  workStore,\n                  requestStore,\n                  actionWasForwarded\n                )\n\n                const formState = await decodeFormState(\n                  actionResult,\n                  formData,\n                  serverModuleMap\n                )\n\n                // Skip the fetch path.\n                // We need to render a full HTML version of the page for the response, we'll handle that in app-render.\n                return {\n                  type: 'done',\n                  result: undefined,\n                  formState,\n                }\n              } else {\n                // We couldn't decode an action, so this POST request turned out not to be a server action request.\n                return null\n              }\n            }\n          } else {\n            // POST with non-multipart body.\n\n            // If it's not multipart AND not a fetch action,\n            // then it can't be an action request.\n            if (!isFetchAction) {\n              return null\n            }\n\n            try {\n              actionModId = getActionModIdOrError(actionId, serverModuleMap)\n            } catch (err) {\n              return handleUnrecognizedFetchAction(err)\n            }\n\n            // A fetch action with a non-multipart body.\n            // In practice, this happens if `encodeReply` returned a string instead of FormData,\n            // which can happen for very simple JSON-like values that don't need multiple flight rows.\n\n            const sizeLimitedBody = new PassThrough()\n\n            const chunks: Buffer[] = []\n            await Promise.all([\n              pipeline(body, sizeLimitTransform, sizeLimitedBody),\n              (async () => {\n                for await (const chunk of sizeLimitedBody) {\n                  chunks.push(Buffer.from(chunk))\n                }\n              })(),\n            ])\n\n            const actionData = Buffer.concat(chunks).toString('utf-8')\n\n            boundActionArguments = await decodeReply<unknown[]>(\n              actionData,\n              serverModuleMap,\n              { temporaryReferences }\n            )\n          }\n        } else {\n          throw new Error('Invariant: Unknown request type.')\n        }\n\n        // actions.js\n        // app/page.js\n        //   action worker1\n        //     appRender1\n\n        // app/foo/page.js\n        //   action worker2\n        //     appRender\n\n        // / -> fire action -> POST / -> appRender1 -> modId for the action file\n        // /foo -> fire action -> POST /foo -> appRender2 -> modId for the action file\n\n        const actionMod = (await ComponentMod.__next_app__.require(\n          actionModId\n        )) as Record<string, (...args: unknown[]) => Promise<unknown>>\n        const actionHandler =\n          actionMod[\n            // `actionId` must exist if we got here, as otherwise we would have thrown an error above\n            actionId!\n          ]\n\n        // Log server action call in development when enabled\n        let logInfo: ServerActionLogInfo | null = null\n        const { type: actionType } = extractInfoFromServerReferenceId(actionId!)\n        if (\n          process.env.NODE_ENV === 'development' &&\n          ctx.renderOpts.logServerFunctions &&\n          // TODO: For now, skip logging for 'use cache' Server Functions as the\n          // output needs more work, or a different approach entirely.\n          actionType !== 'use-cache'\n        ) {\n          const serverActionsManifest = getServerActionsManifest()\n          const runtime = process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n          const actionInfo = serverActionsManifest[runtime]?.[actionId!]\n\n          if (actionInfo) {\n            const isInlineAction =\n              actionInfo.exportedName?.startsWith(INLINE_ACTION_PREFIX)\n\n            const projectDir =\n              ctx.renderOpts.dir ||\n              (process.env.NEXT_RUNTIME === 'edge' ? '' : process.cwd())\n            const location = normalizeFilePath(projectDir, actionInfo.filename)\n\n            // Format function name for display\n            let functionName: string\n            if (isInlineAction) {\n              functionName = '<inline action>'\n            } else if (actionInfo.exportedName === 'default') {\n              functionName = 'default'\n            } else {\n              functionName = actionInfo.exportedName || '<action>'\n            }\n\n            logInfo = { functionName, args: boundActionArguments, location }\n          }\n        }\n\n        const startTime = performance.now()\n        const { actionResult, skipPageRendering } =\n          await executeActionAndPrepareForRender(\n            actionHandler,\n            boundActionArguments,\n            workStore,\n            requestStore,\n            actionWasForwarded\n          ).finally(() => {\n            addRevalidationHeader(res, { workStore, requestStore })\n            if (logInfo) {\n              // Store server action log info to be logged after the request log\n              const duration = Math.round(performance.now() - startTime)\n              addRequestMeta(req, 'devServerActionLog', {\n                functionName: logInfo.functionName,\n                args: logInfo.args,\n                location: logInfo.location,\n                duration,\n              })\n            }\n          })\n\n        // For form actions, we need to continue rendering the page.\n        if (isFetchAction) {\n          // If we skip page rendering, we need to ensure pending revalidates\n          // are awaited before closing the response. Otherwise, this will be\n          // done after rendering the page.\n          const maybeRevalidatesPromise = skipPageRendering\n            ? executeRevalidates(workStore)\n            : false\n\n          return {\n            type: 'done',\n            result: await actionAsyncStorage.exit(() =>\n              generateFlight(req, ctx, requestStore, {\n                actionResult: Promise.resolve(actionResult),\n                skipPageRendering,\n                temporaryReferences,\n                waitUntil:\n                  maybeRevalidatesPromise === false\n                    ? undefined\n                    : maybeRevalidatesPromise,\n              })\n            ),\n          }\n        } else {\n          // TODO: this shouldn't be reachable, because all non-fetch codepaths return early.\n          // this will be handled in a follow-up refactor PR.\n          return null\n        }\n      }\n    )\n  } catch (err) {\n    if (isRedirectError(err)) {\n      const redirectUrl = getURLFromRedirectError(err)\n      const redirectType = getRedirectTypeFromError(err)\n\n      if (isFetchAction) {\n        // Fetch actions communicate redirects through `x-action-redirect` and\n        // can include the redirect target's Flight response in the body. Since\n        // this is not an HTTP redirect, keep the response successful.\n        res.statusCode = 200\n        metadata.statusCode = 200\n\n        return {\n          type: 'done',\n          result: await createRedirectRenderResult(\n            req,\n            res,\n            host,\n            redirectUrl,\n            redirectType,\n            ctx.renderOpts.basePath,\n            workStore,\n            requestStore.url.pathname\n          ),\n        }\n      }\n\n      // For an MPA action, the redirect doesn't need a body, just a Location header.\n      res.statusCode = RedirectStatusCode.SeeOther\n      metadata.statusCode = RedirectStatusCode.SeeOther\n      res.setHeader('Location', redirectUrl)\n      return {\n        type: 'done',\n        result: RenderResult.EMPTY,\n      }\n    } else if (isHTTPAccessFallbackError(err)) {\n      res.statusCode = getAccessFallbackHTTPStatus(err)\n      metadata.statusCode = res.statusCode\n\n      if (isFetchAction) {\n        const promise = Promise.reject(err)\n        try {\n          // we need to await the promise to trigger the rejection early\n          // so that it's already handled by the time we call\n          // the RSC runtime. Otherwise, it will throw an unhandled\n          // promise rejection error in the renderer.\n          await promise\n        } catch {\n          // swallow error, it's gonna be handled on the client\n        }\n        return {\n          type: 'done',\n          result: await generateFlight(req, ctx, requestStore, {\n            skipPageRendering: false,\n            actionResult: promise,\n            temporaryReferences,\n          }),\n        }\n      }\n\n      // For an MPA action, we need to render a HTML response. We'll handle that in app-render.\n      return {\n        type: 'not-found',\n      }\n    }\n\n    // An error that didn't come from `redirect()` or `notFound()`, likely thrown from user code\n    // (but it could also be a bug in our code!)\n\n    if (isFetchAction) {\n      // TODO: consider checking if the error is an `ApiError` and change status code\n      // so that we can respond with a 413 to requests that break the body size limit\n      // (but if we do that, we also need to make sure that whatever handles the non-fetch error path below does the same)\n      res.statusCode = 500\n      metadata.statusCode = 500\n      const promise = Promise.reject(err)\n      try {\n        // we need to await the promise to trigger the rejection early\n        // so that it's already handled by the time we call\n        // the RSC runtime. Otherwise, it will throw an unhandled\n        // promise rejection error in the renderer.\n        await promise\n      } catch {\n        // swallow error, it's gonna be handled on the client\n      }\n\n      return {\n        type: 'done',\n        result: await generateFlight(req, ctx, requestStore, {\n          actionResult: promise,\n          // If the page was not revalidated, or if the action was forwarded\n          // from another worker, we can skip rendering the page.\n          skipPageRendering:\n            workStore.pathWasRevalidated === undefined ||\n            workStore.pathWasRevalidated === ActionDidNotRevalidate ||\n            actionWasForwarded,\n          temporaryReferences,\n        }),\n      }\n    }\n\n    // For an MPA action, we need to render a HTML response. We'll rethrow the error and let it be handled above.\n    throw err\n  }\n}\n\n/**\n * Limit on the number of arguments passed to a server action. This prevents\n * stack overflow during `action.apply()` from malicious requests.\n */\nconst SERVER_ACTION_ARGS_LIMIT = 1000\n\nasync function executeActionAndPrepareForRender<\n  TFn extends (...args: any[]) => Promise<any>,\n>(\n  action: TFn,\n  args: Parameters<TFn>,\n  workStore: WorkStore,\n  requestStore: RequestStore,\n  actionWasForwarded: boolean\n): Promise<{\n  actionResult: Awaited<ReturnType<TFn>>\n  skipPageRendering: boolean\n}> {\n  requestStore.phase = 'action'\n  let skipPageRendering = actionWasForwarded\n\n  if (args.length > SERVER_ACTION_ARGS_LIMIT) {\n    throw new Error(\n      `Server Action arguments list is too long (${args.length}). Maximum allowed is ${SERVER_ACTION_ARGS_LIMIT}.`\n    )\n  }\n\n  try {\n    const actionResult = await workUnitAsyncStorage.run(requestStore, () =>\n      action.apply(null, args)\n    )\n\n    // If the page was not revalidated, or if the action was forwarded from\n    // another worker, we can skip rendering the page.\n    skipPageRendering ||=\n      workStore.pathWasRevalidated === undefined ||\n      workStore.pathWasRevalidated === ActionDidNotRevalidate\n\n    return { actionResult, skipPageRendering }\n  } finally {\n    if (!skipPageRendering) {\n      requestStore.phase = 'render'\n\n      // When we switch to the render phase, cookies() will return\n      // `workUnitStore.cookies` instead of\n      // `workUnitStore.userspaceMutableCookies`. We want the render to see any\n      // cookie writes that we performed during the action, so we need to update\n      // the immutable cookies to reflect the changes.\n      synchronizeMutableCookies(requestStore)\n\n      // The server action might have toggled draft mode, so we need to reflect\n      // that in the work store to be up-to-date for subsequent rendering.\n      workStore.isDraftMode = requestStore.draftMode.isEnabled\n\n      // If the action called revalidateTag/revalidatePath, then that might\n      // affect data used by the subsequent render, so we need to make sure all\n      // revalidations are applied before that.\n      await executeRevalidates(workStore)\n    }\n  }\n}\n\n/**\n * Attempts to find the module ID for the action from the module map. When this fails, it could be a deployment skew where\n * the action came from a different deployment. It could also simply be an invalid POST request that is not a server action.\n * In either case, we'll throw an error to be handled by the caller.\n */\nfunction getActionModIdOrError(\n  actionId: string | null,\n  serverModuleMap: ServerModuleMap\n): string | number {\n  // if we're missing the action ID header, we can't do any further processing\n  if (!actionId) {\n    throw new InvariantError(\"Missing 'next-action' header.\")\n  }\n\n  const entry = serverModuleMap[actionId]\n\n  if (entry == null) {\n    // The proxy throws for malformed IDs and IDs that are missing from the\n    // manifest. It only returns undefined when the ID collides with a\n    // well-known property name (e.g. `toString`) that the proxy excludes from\n    // server reference validation so that framework reflection probes don't\n    // throw. Next.js never produces such an ID, so this is almost certainly a\n    // probe with a known-bad ID. Repeat the manifest's throw logic here so the\n    // caller gets a diagnosable error instead of a `TypeError`.\n    throw mightBeServerReferenceId(actionId)\n      ? getActionNotFoundError(actionId)\n      : getInvalidServerReferenceIdError(actionId)\n  }\n\n  return entry.id\n}\n\nconst $ACTION_ = '$ACTION_'\nconst $ACTION_REF_ = '$ACTION_REF_'\nconst $ACTION_ID_ = '$ACTION_ID_'\n\n/**\n * This function mirrors logic inside React's decodeAction and should be kept in sync with that.\n * It pre-parses the FormData to ensure that any action IDs referred to are actual action IDs for\n * this Next.js application.\n */\nfunction areAllActionIdsValid(\n  mpaFormData: FormData,\n  serverModuleMap: ServerModuleMap\n): boolean {\n  let seenActionRefs = 0\n  let hasAtLeastOneAction = false\n  // Before we attempt to decode the payload for a possible MPA action, assert that all\n  // action IDs are valid IDs. If not we should disregard the payload\n  for (let key of mpaFormData.keys()) {\n    if (!key.startsWith($ACTION_)) {\n      // not a relevant field\n      continue\n    }\n\n    if (key.startsWith($ACTION_ID_)) {\n      // No Bound args case\n      if (isInvalidActionIdFieldName(key, serverModuleMap)) {\n        return false\n      }\n\n      hasAtLeastOneAction = true\n    } else if (key.startsWith($ACTION_REF_)) {\n      if (++seenActionRefs > 2) {\n        // We only expect to see at most 2 $ACTION_REF_ fields in the form data:\n        // one from <form action=\"...\" method=\"post\">\n        // and one from <input action=\"...\" type=\"submit\">\n        return false\n      }\n\n      // Bound args case\n      const actionDescriptorField =\n        $ACTION_ + key.slice($ACTION_REF_.length) + ':0'\n      const actionFields = mpaFormData.getAll(actionDescriptorField)\n      if (actionFields.length !== 1) {\n        return false\n      }\n      const actionField = actionFields[0]\n      if (typeof actionField !== 'string') {\n        return false\n      }\n\n      if (isInvalidStringActionDescriptor(actionField, serverModuleMap)) {\n        return false\n      }\n      hasAtLeastOneAction = true\n    }\n  }\n  return hasAtLeastOneAction\n}\n\nconst ACTION_DESCRIPTOR_ID_PREFIX = '{\"id\":\"'\nfunction isInvalidStringActionDescriptor(\n  actionDescriptor: string,\n  serverModuleMap: ServerModuleMap\n): unknown {\n  if (actionDescriptor.startsWith(ACTION_DESCRIPTOR_ID_PREFIX) === false) {\n    return true\n  }\n\n  const from = ACTION_DESCRIPTOR_ID_PREFIX.length\n  const to = actionDescriptor.indexOf('\"', from)\n  if (to === -1) {\n    return true\n  }\n\n  // We expect actionDescriptor to be '{\"id\":\"<actionId>\",...}'\n  const actionId = actionDescriptor.slice(from, to)\n  if (!mightBeServerReferenceId(actionId)) {\n    return true\n  }\n\n  const entry = serverModuleMap[actionId]\n\n  if (entry == null) {\n    return true\n  }\n\n  return false\n}\n\nfunction isInvalidActionIdFieldName(\n  actionIdFieldName: string,\n  serverModuleMap: ServerModuleMap\n): boolean {\n  // The field name must always start with $ACTION_ID_ but since it is\n  // the id is extracted from the key of the field we have already validated\n  // this before entering this function\n  const actionId = actionIdFieldName.slice($ACTION_ID_.length)\n  if (!mightBeServerReferenceId(actionId)) {\n    // this field name has too few or too many characters\n    // or it is otherwise in the wrong format\n    return true\n  }\n\n  const entry = serverModuleMap[actionId]\n\n  if (entry == null) {\n    return true\n  }\n\n  return false\n}\n","// micromatch is only available at node runtime, so it cannot be used here since the code path that calls this function\n// can be run from edge. This is a simple implementation that safely achieves the required functionality.\n// the goal is to match the functionality for remotePatterns as defined here -\n// https://nextjs.org/docs/app/api-reference/components/image#remotepatterns\n// TODO - retrofit micromatch to work in edge and use that instead\nfunction matchWildcardDomain(domain: string, pattern: string) {\n  // DNS names are case-insensitive per RFC 1035\n  // Use ASCII-only toLowerCase to avoid unicode issues\n  const normalizedDomain = domain.replace(/[A-Z]/g, (c) => c.toLowerCase())\n  const normalizedPattern = pattern.replace(/[A-Z]/g, (c) => c.toLowerCase())\n\n  const domainParts = normalizedDomain.split('.')\n  const patternParts = normalizedPattern.split('.')\n\n  if (patternParts.length < 1) {\n    // pattern is empty and therefore invalid to match against\n    return false\n  }\n\n  if (domainParts.length < patternParts.length) {\n    // domain has too few segments and thus cannot match\n    return false\n  }\n\n  // Prevent wildcards from matching entire domains (e.g. '**' or '*.com')\n  // This ensures wildcards can only match subdomains, not the main domain\n  if (\n    patternParts.length === 1 &&\n    (patternParts[0] === '*' || patternParts[0] === '**')\n  ) {\n    return false\n  }\n\n  while (patternParts.length) {\n    const patternPart = patternParts.pop()\n    const domainPart = domainParts.pop()\n\n    switch (patternPart) {\n      case '': {\n        // invalid pattern. pattern segments must be non empty\n        return false\n      }\n      case '*': {\n        // wildcard matches anything so we continue if the domain part is non-empty\n        if (domainPart) {\n          continue\n        } else {\n          return false\n        }\n      }\n      case '**': {\n        // if this is not the last item in the pattern the pattern is invalid\n        if (patternParts.length > 0) {\n          return false\n        }\n        // recursive wildcard matches anything so we terminate here if the domain part is non empty\n        return domainPart !== undefined\n      }\n      case undefined:\n      default: {\n        if (domainPart !== patternPart) {\n          return false\n        }\n      }\n    }\n  }\n\n  // We exhausted the pattern. If we also exhausted the domain we have a match\n  return domainParts.length === 0\n}\n\nexport const isCsrfOriginAllowed = (\n  originDomain: string,\n  allowedOrigins: string[] = []\n): boolean => {\n  // DNS names are case-insensitive per RFC 1035\n  // Use ASCII-only toLowerCase to avoid unicode issues\n  const normalizedOrigin = originDomain.replace(/[A-Z]/g, (c) =>\n    c.toLowerCase()\n  )\n\n  return allowedOrigins.some((allowedOrigin) => {\n    if (!allowedOrigin) return false\n\n    const normalizedAllowed = allowedOrigin.replace(/[A-Z]/g, (c) =>\n      c.toLowerCase()\n    )\n\n    return (\n      normalizedAllowed === normalizedOrigin ||\n      matchWildcardDomain(originDomain, allowedOrigin)\n    )\n  })\n}\n","'use client'\n\nimport React, { useContext } from 'react'\n\nexport type ServerInsertedHTMLHook = (callbacks: () => React.ReactNode) => void\n\n// Use `React.createContext` to avoid errors from the RSC checks because\n// it can't be imported directly in Server Components:\n//\n//   import { createContext } from 'react'\n//\n// More info: https://github.com/vercel/next.js/pull/40686\nexport const ServerInsertedHTMLContext =\n  React.createContext<ServerInsertedHTMLHook | null>(null as any)\n\nexport function useServerInsertedHTML(callback: () => React.ReactNode): void {\n  const addInsertedServerHTMLCallback = useContext(ServerInsertedHTMLContext)\n  // Should have no effects on client where there's no flush effects provider\n  if (addInsertedServerHTMLCallback) {\n    addInsertedServerHTMLCallback(callback)\n  }\n}\n","/* eslint-disable @next/internal/no-ambiguous-jsx -- whole module is used in React Client */\n// Provider for the `useServerInsertedHTML` API to register callbacks to insert\n// elements into the HTML stream.\n\nimport type { JSX, ReactNode } from 'react'\nimport * as ReactClient from 'react'\nimport { ServerInsertedHTMLContext } from '../../shared/lib/server-inserted-html.shared-runtime'\n\nexport function createServerInsertedHTML() {\n  const serverInsertedHTMLCallbacks: (() => ReactNode)[] = []\n  const addInsertedHtml = (handler: () => ReactNode) => {\n    serverInsertedHTMLCallbacks.push(handler)\n  }\n\n  return {\n    ServerInsertedHTMLProvider({ children }: { children: JSX.Element }) {\n      return (\n        <ServerInsertedHTMLContext.Provider value={addInsertedHtml}>\n          {children}\n        </ServerInsertedHTMLContext.Provider>\n      )\n    },\n    renderServerInsertedHTML() {\n      return serverInsertedHTMLCallbacks.map((callback, index) => (\n        <ReactClient.Fragment key={'__next_server_inserted__' + index}>\n          {callback()}\n        </ReactClient.Fragment>\n      ))\n    },\n  }\n}\n","export function encodeURIPath(file: string) {\n  return file\n    .split('/')\n    .map((p) => encodeURIComponent(p))\n    .join('/')\n}\n","import { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { BuildManifest } from '../get-page-files'\n\nimport ReactDOM from 'react-dom'\n\nexport function getRequiredScripts(\n  buildManifest: BuildManifest,\n  assetPrefix: string,\n  crossOrigin: undefined | '' | 'anonymous' | 'use-credentials',\n  SRIManifest: undefined | Record<string, string>,\n  qs: string,\n  nonce: string | undefined,\n  pagePath: string\n): [\n  () => void,\n  { src: string; integrity?: string; crossOrigin?: string | undefined },\n] {\n  let preinitScripts: () => void\n  let preinitScriptCommands: string[] = []\n  const bootstrapScript: {\n    src: string\n    integrity?: string\n    crossOrigin?: string | undefined\n  } = {\n    src: '',\n    crossOrigin,\n  }\n\n  const files = (\n    buildManifest.rootMainFilesTree?.[pagePath] || buildManifest.rootMainFiles\n  ).map(encodeURIPath)\n  if (files.length === 0) {\n    throw new Error(\n      'Invariant: missing bootstrap script. This is a bug in Next.js'\n    )\n  }\n  if (SRIManifest) {\n    bootstrapScript.src = `${assetPrefix}/_next/` + files[0] + qs\n    bootstrapScript.integrity = SRIManifest[files[0]]\n\n    for (let i = 1; i < files.length; i++) {\n      const src = `${assetPrefix}/_next/` + files[i] + qs\n      const integrity = SRIManifest[files[i]]\n      preinitScriptCommands.push(src, integrity)\n    }\n    preinitScripts = () => {\n      // preinitScriptCommands is a double indexed array of src/integrity pairs\n      for (let i = 0; i < preinitScriptCommands.length; i += 2) {\n        ReactDOM.preinit(preinitScriptCommands[i], {\n          as: 'script',\n          integrity: preinitScriptCommands[i + 1],\n          crossOrigin,\n          nonce,\n        })\n      }\n    }\n  } else {\n    bootstrapScript.src = `${assetPrefix}/_next/` + files[0] + qs\n\n    for (let i = 1; i < files.length; i++) {\n      const src = `${assetPrefix}/_next/` + files[i] + qs\n      preinitScriptCommands.push(src)\n    }\n    preinitScripts = () => {\n      // preinitScriptCommands is a singled indexed array of src values\n      for (let i = 0; i < preinitScriptCommands.length; i++) {\n        ReactDOM.preinit(preinitScriptCommands[i], {\n          as: 'script',\n          nonce,\n          crossOrigin,\n        })\n      }\n    }\n  }\n\n  return [preinitScripts, bootstrapScript]\n}\n","/* eslint-disable @next/internal/no-ambiguous-jsx -- whole module is used in React Client */\nimport React, { type JSX } from 'react'\nimport { isHTTPAccessFallbackError } from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getURLFromRedirectError,\n  getRedirectStatusCodeFromError,\n} from '../../client/components/redirect'\nimport { isRedirectError } from '../../client/components/redirect-error'\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport type { ClientTraceDataEntry } from '../lib/trace/tracer'\nimport {\n  renderToNodeFizzStream,\n  renderToWebFizzStream,\n  streamToString,\n} from './stream-ops'\n\nexport function makeGetServerInsertedHTML({\n  polyfills,\n  renderServerInsertedHTML,\n  serverCapturedErrors,\n  tracingMetadata,\n  basePath,\n}: {\n  polyfills: JSX.IntrinsicElements['script'][]\n  renderServerInsertedHTML: () => React.ReactNode\n  tracingMetadata: ClientTraceDataEntry[] | undefined\n  serverCapturedErrors: Array<unknown>\n  basePath: string\n}) {\n  let flushedErrorMetaTagsUntilIndex = 0\n\n  // These only need to be rendered once, they'll be set to empty arrays once flushed.\n  let polyfillTags = polyfills.map((polyfill) => {\n    return <script key={polyfill.src} {...polyfill} />\n  })\n  let traceMetaTags = (tracingMetadata || []).map(({ key, value }, index) => (\n    <meta key={`next-trace-data-${index}`} name={key} content={value} />\n  ))\n\n  return async function getServerInsertedHTML() {\n    // Loop through all the errors that have been captured but not yet\n    // flushed.\n    const errorMetaTags = []\n    while (flushedErrorMetaTagsUntilIndex < serverCapturedErrors.length) {\n      const error = serverCapturedErrors[flushedErrorMetaTagsUntilIndex]\n      flushedErrorMetaTagsUntilIndex++\n\n      if (isHTTPAccessFallbackError(error)) {\n        errorMetaTags.push(\n          <meta name=\"robots\" content=\"noindex\" key={error.digest} />,\n          process.env.NODE_ENV === 'development' ? (\n            <meta name=\"next-error\" content=\"not-found\" key=\"next-error\" />\n          ) : null\n        )\n      } else if (isRedirectError(error)) {\n        const redirectUrl = addPathPrefix(\n          getURLFromRedirectError(error),\n          basePath\n        )\n        const statusCode = getRedirectStatusCodeFromError(error)\n        const isPermanent =\n          statusCode === RedirectStatusCode.PermanentRedirect ? true : false\n        if (redirectUrl) {\n          errorMetaTags.push(\n            <meta\n              id=\"__next-page-redirect\"\n              httpEquiv=\"refresh\"\n              content={`${isPermanent ? 0 : 1};url=${redirectUrl}`}\n              key={error.digest}\n            />\n          )\n        }\n      }\n    }\n\n    const serverInsertedHTML = renderServerInsertedHTML()\n\n    // Skip React rendering if we know the content is empty.\n    if (\n      polyfillTags.length === 0 &&\n      traceMetaTags.length === 0 &&\n      errorMetaTags.length === 0 &&\n      Array.isArray(serverInsertedHTML) &&\n      serverInsertedHTML.length === 0\n    ) {\n      return ''\n    }\n\n    const { stream } = await (\n      process.env.__NEXT_USE_NODE_STREAMS\n        ? renderToNodeFizzStream\n        : renderToWebFizzStream\n    )(\n      <>\n        {polyfillTags}\n        {serverInsertedHTML}\n        {traceMetaTags}\n        {errorMetaTags}\n      </>,\n      {\n        // Larger chunk because this isn't sent over the network.\n        // Let's set it to 1MB.\n        progressiveChunkSize: 1024 * 1024,\n      }\n    )\n\n    // The polyfills and trace metadata have been flushed, so they don't need to be rendered again\n    polyfillTags = []\n    traceMetaTags = []\n\n    // There's no need to wait for the stream to be ready\n    // e.g. calling `await stream.allReady` because `streamToString` will\n    // wait and decode the stream progressively with better parallelism.\n    return streamToString(stream)\n  }\n}\n","import type { CssResource } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport { getClientReferenceManifest } from './manifests-singleton'\n\n/**\n * Get external stylesheet link hrefs based on server CSS manifest.\n */\nexport function getLinkAndScriptTags(\n  filePath: string,\n  injectedCSS: Set<string>,\n  injectedScripts: Set<string>,\n  collectNewImports?: boolean\n): { styles: ReadonlySet<CssResource>; scripts: ReadonlySet<string> } {\n  const filePathWithoutExt = filePath.replace(/\\.[^.]+$/, '')\n  const cssChunks = new Set<CssResource>()\n  const jsChunks = new Set<string>()\n  const { entryCSSFiles, entryJSFiles } = getClientReferenceManifest()\n  const cssFiles = entryCSSFiles[filePathWithoutExt]\n  const jsFiles = entryJSFiles?.[filePathWithoutExt]\n\n  if (cssFiles) {\n    for (const css of cssFiles) {\n      if (!injectedCSS.has(css.path)) {\n        if (collectNewImports) {\n          injectedCSS.add(css.path)\n        }\n        cssChunks.add(css)\n      }\n    }\n  }\n\n  if (jsFiles) {\n    for (const file of jsFiles) {\n      if (!injectedScripts.has(file)) {\n        if (collectNewImports) {\n          injectedScripts.add(file)\n        }\n        jsChunks.add(file)\n      }\n    }\n  }\n\n  return { styles: cssChunks, scripts: jsChunks }\n}\n","import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\n\n/**\n * Get hrefs for fonts to preload\n * Returns null if there are no fonts at all.\n * Returns string[] if there are fonts to preload (font paths)\n * Returns empty string[] if there are fonts but none to preload and no other fonts have been preloaded\n * Returns null if there are fonts but none to preload and at least some were previously preloaded\n */\nexport function getPreloadableFonts(\n  nextFontManifest: DeepReadonly<NextFontManifest> | undefined,\n  filePath: string | undefined,\n  injectedFontPreloadTags: Set<string>\n): string[] | null {\n  if (!nextFontManifest || !filePath) {\n    return null\n  }\n  const filepathWithoutExtension = filePath.replace(/\\.[^.]+$/, '')\n  const fontFiles = new Set<string>()\n  let foundFontUsage = false\n\n  const preloadedFontFiles = nextFontManifest.app[filepathWithoutExtension]\n  if (preloadedFontFiles) {\n    foundFontUsage = true\n    for (const fontFile of preloadedFontFiles) {\n      if (!injectedFontPreloadTags.has(fontFile)) {\n        fontFiles.add(fontFile)\n        injectedFontPreloadTags.add(fontFile)\n      }\n    }\n  }\n\n  if (fontFiles.size) {\n    return [...fontFiles].sort()\n  } else if (foundFontUsage && injectedFontPreloadTags.size === 0) {\n    return []\n  } else {\n    return null\n  }\n}\n","import type { LoaderTree } from '../lib/app-dir-module'\n\nexport function hasLoadingComponentInTree(tree: LoaderTree): boolean {\n  const [, parallelRoutes, { loading }] = tree\n\n  if (loading) {\n    return true\n  }\n\n  return Object.values(parallelRoutes).some((parallelRoute) =>\n    hasLoadingComponentInTree(parallelRoute)\n  ) as boolean\n}\n","import {\n  extractInfoFromServerReferenceId,\n  type ServerReferenceInfo,\n} from '../shared/lib/server-reference-info'\n\n// Only contains the properties we're interested in.\nexport interface ServerReference {\n  $$typeof: Symbol\n  $$id: string\n}\n\nexport type ServerFunction = ServerReference &\n  ((...args: unknown[]) => Promise<unknown>)\n\nexport function isServerReference<T>(\n  value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n  return value.$$typeof === Symbol.for('react.server.reference')\n}\n\nexport function isUseCacheFunction<T>(\n  value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n  if (!isServerReference(value)) {\n    return false\n  }\n\n  const { type } = extractInfoFromServerReferenceId(value.$$id)\n\n  return type === 'use-cache'\n}\n\nexport function getUseCacheFunctionInfo<T>(\n  value: T & Partial<ServerReference>\n): ServerReferenceInfo | null {\n  if (!isServerReference(value)) {\n    return null\n  }\n\n  const info = extractInfoFromServerReferenceId(value.$$id)\n\n  return info.type === 'use-cache' ? info : null\n}\n\nexport function isClientReference(mod: any): boolean {\n  const defaultExport = mod?.default || mod\n  return defaultExport?.$$typeof === Symbol.for('react.client.reference')\n}\n","import type { AppDirModules } from '../../build/webpack/loaders/next-app-loader'\nimport { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\n\n/**\n * LoaderTree is generated in next-app-loader.\n */\nexport type LoaderTree = [\n  segment: string,\n  parallelRoutes: { [parallelRouterKey: string]: LoaderTree },\n  modules: AppDirModules,\n  /**\n   * At build time, for each dynamic segment, we compute the list of static\n   * sibling segments that exist at the same URL path level. This is used by\n   * the client router to determine if a prefetch can be reused.\n   *\n   * For example, given the following file structure:\n   *   /app/(group1)/products/sale/page.tsx -> /products/sale\n   *   /app/(group2)/products/[id]/page.tsx -> /products/[id]\n   *\n   * The [id] segment would have staticSiblings: ['sale']\n   *\n   * This accounts for route groups, which may place sibling routes in\n   * different parts of the file system tree but at the same URL level.\n   *\n   * A value of `null` means the static siblings are unknown (e.g., in webpack\n   * dev mode where routes are compiled on-demand).\n   */\n  staticSiblings: readonly string[] | null,\n]\n\nexport async function getLayoutOrPageModule(loaderTree: LoaderTree) {\n  const { layout, page, defaultPage } = loaderTree[2]\n  const isLayout = typeof layout !== 'undefined'\n  const isPage = typeof page !== 'undefined'\n  const isDefaultPage =\n    typeof defaultPage !== 'undefined' && loaderTree[0] === DEFAULT_SEGMENT_KEY\n\n  let mod = undefined\n  let modType: 'layout' | 'page' | undefined = undefined\n  let filePath = undefined\n\n  if (isLayout) {\n    mod = await layout[0]()\n    modType = 'layout'\n    filePath = layout[1]\n  } else if (isPage) {\n    mod = await page[0]()\n    modType = 'page'\n    filePath = page[1]\n  } else if (isDefaultPage) {\n    mod = await defaultPage[0]()\n    modType = 'page'\n    filePath = defaultPage[1]\n  }\n\n  return { mod, modType, filePath }\n}\n\nexport async function getComponentTypeModule(\n  loaderTree: LoaderTree,\n  moduleType: 'layout' | 'not-found' | 'forbidden' | 'unauthorized'\n) {\n  const { [moduleType]: module } = loaderTree[2]\n  if (typeof module !== 'undefined') {\n    return await module[0]()\n  }\n  return undefined\n}\n","/**\n * Interop between \"export default\" and \"module.exports\".\n */\nexport function interopDefault(mod: any) {\n  return mod.default || mod\n}\n","import { DEFAULT_SEGMENT_KEY } from '../../segment'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\n\nexport function parseLoaderTree(tree: LoaderTree) {\n  const [segment, parallelRoutes, modules, staticSiblings] = tree\n  const { layout, template } = modules\n  let { page } = modules\n  // a __DEFAULT__ segment means that this route didn't match any of the\n  // segments in the route, so we should use the default page\n  page = segment === DEFAULT_SEGMENT_KEY ? modules.defaultPage : page\n\n  const conventionPath = layout?.[1] || template?.[1] || page?.[1]\n\n  return {\n    page,\n    segment,\n    modules,\n    /* it can be either layout / template / page */\n    conventionPath,\n    parallelRoutes,\n    staticSiblings,\n  }\n}\n","import type { AppRenderContext } from './app-render'\n\nconst isDev = process.env.NODE_ENV === 'development'\nconst isTurbopack = !!process.env.TURBOPACK\n\nexport function getAssetQueryString(\n  ctx: AppRenderContext,\n  addTimestamp: boolean\n) {\n  let qs = ''\n\n  // In development we add the request timestamp to allow react to\n  // reload assets when a new RSC response is received.\n  // Turbopack handles HMR of assets itself and react doesn't need to reload them\n  // so this approach is not needed for Turbopack.\n  const shouldAddVersion = isDev && !isTurbopack && addTimestamp\n  if (shouldAddVersion) {\n    qs += `?v=${ctx.requestTimestamp}`\n  }\n\n  if (ctx.sharedContext.clientAssetToken) {\n    qs += `${shouldAddVersion ? '&' : '?'}dpl=${ctx.sharedContext.clientAssetToken}`\n  }\n  return qs\n}\n","import type { CssResource } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport type { PreloadCallbacks } from './types'\n\n/**\n * Abstracts the rendering of CSS files based on whether they are inlined or not.\n * For inlined CSS, renders a <style> tag with the CSS content directly embedded.\n * For external CSS files, renders a <link> tag pointing to the CSS file.\n */\nexport function renderCssResource(\n  entryCssFiles: Iterable<CssResource>,\n  ctx: AppRenderContext,\n  preloadCallbacks?: PreloadCallbacks\n) {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  const elements: React.ReactNode[] = []\n  let index = 0\n  for (const entryCssFile of entryCssFiles) {\n    // `Precedence` is an opt-in signal for React to handle resource\n    // loading and deduplication, etc. It's also used as the key to sort\n    // resources so they will be injected in the correct order.\n    // During HMR, it's critical to use different `precedence` values\n    // for different stylesheets, so their order will be kept.\n    // https://github.com/facebook/react/pull/25060\n    const precedence =\n      process.env.NODE_ENV === 'development'\n        ? 'next_' + entryCssFile.path\n        : 'next'\n\n    // In dev, Safari and Firefox will cache the resource during HMR:\n    // - https://github.com/vercel/next.js/issues/5860\n    // - https://bugs.webkit.org/show_bug.cgi?id=187726\n    // Because of this, we add a `?v=` query to bypass the cache during\n    // development. We need to also make sure that the number is always\n    // increasing.\n    const fullHref = `${ctx.assetPrefix}/_next/${encodeURIPath(\n      entryCssFile.path\n    )}${getAssetQueryString(ctx, true)}`\n\n    if (entryCssFile.inlined && !ctx.parsedRequestHeaders.isRSCRequest) {\n      elements.push(\n        createElement(\n          'style',\n          {\n            key: index,\n            nonce: ctx.nonce,\n            precedence: precedence,\n            href: fullHref,\n          },\n          entryCssFile.content\n        )\n      )\n    } else {\n      preloadCallbacks?.push(() => {\n        ctx.componentMod.preloadStyle(\n          fullHref,\n          ctx.renderOpts.crossOrigin,\n          ctx.nonce\n        )\n      })\n\n      elements.push(\n        createElement('link', {\n          key: index,\n          rel: 'stylesheet',\n          href: fullHref,\n          precedence: precedence,\n          crossOrigin: ctx.renderOpts.crossOrigin,\n          nonce: ctx.nonce,\n        })\n      )\n    }\n    index++\n  }\n  return elements\n}\n","import { interopDefault } from './interop-default'\nimport { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport { renderCssResource } from './render-css-resource'\n\nexport async function createComponentStylesAndScripts({\n  filePath,\n  getComponent,\n  injectedCSS,\n  injectedJS,\n  ctx,\n}: {\n  filePath: string\n  getComponent: () => any\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  ctx: AppRenderContext\n}): Promise<[React.ComponentType<any>, React.ReactNode, React.ReactNode]> {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  const { styles: entryCssFiles, scripts: jsHrefs } = getLinkAndScriptTags(\n    filePath,\n    injectedCSS,\n    injectedJS\n  )\n\n  const styles = renderCssResource(entryCssFiles, ctx)\n\n  const scripts: React.ReactNode[] = []\n  let scriptIndex = 0\n  for (const href of jsHrefs) {\n    scripts.push(\n      createElement('script', {\n        src: `${ctx.assetPrefix}/_next/${encodeURIPath(href)}${getAssetQueryString(ctx, true)}`,\n        async: true,\n        key: `script-${scriptIndex}`,\n        nonce: ctx.nonce,\n      })\n    )\n    scriptIndex++\n  }\n\n  const Comp = interopDefault(await getComponent())\n\n  return [Comp, styles, scripts.length ? scripts : null]\n}\n","import { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport { getPreloadableFonts } from './get-preloadable-fonts'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { PreloadCallbacks } from './types'\nimport { renderCssResource } from './render-css-resource'\nconst EMPTY_SET: ReadonlySet<never> = new Set()\n\nexport function getLayerAssets({\n  ctx,\n  layoutOrPagePath,\n  injectedCSS: injectedCSSWithCurrentLayout,\n  injectedJS: injectedJSWithCurrentLayout,\n  injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n  preloadCallbacks,\n}: {\n  layoutOrPagePath: string | undefined\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n}): React.ReactNode {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  const { styles: styleTags, scripts: scriptTags } = layoutOrPagePath\n    ? getLinkAndScriptTags(\n        layoutOrPagePath,\n        injectedCSSWithCurrentLayout,\n        injectedJSWithCurrentLayout,\n        true\n      )\n    : { styles: EMPTY_SET, scripts: EMPTY_SET }\n\n  const preloadedFontFiles = layoutOrPagePath\n    ? getPreloadableFonts(\n        ctx.renderOpts.nextFontManifest,\n        layoutOrPagePath,\n        injectedFontPreloadTagsWithCurrentLayout\n      )\n    : null\n\n  if (preloadedFontFiles) {\n    if (preloadedFontFiles.length) {\n      for (let i = 0; i < preloadedFontFiles.length; i++) {\n        const fontFilename = preloadedFontFiles[i]\n        const ext = /\\.(woff|woff2|eot|ttf|otf)$/.exec(fontFilename)![1]\n        const type = `font/${ext}`\n        const href = `${ctx.assetPrefix}/_next/${encodeURIPath(fontFilename)}${getAssetQueryString(ctx, true)}`\n\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preloadFont(\n            href,\n            type,\n            ctx.renderOpts.crossOrigin,\n            ctx.nonce\n          )\n        })\n      }\n    } else {\n      try {\n        let url = new URL(ctx.assetPrefix)\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preconnect(url.origin, 'anonymous', ctx.nonce)\n        })\n      } catch (error) {\n        // assetPrefix must not be a fully qualified domain name. We assume\n        // we should preconnect to same origin instead\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preconnect('/', 'anonymous', ctx.nonce)\n        })\n      }\n    }\n  }\n\n  const styles = renderCssResource(styleTags, ctx, preloadCallbacks)\n\n  const scripts: React.ReactNode[] = []\n  let scriptIndex = 0\n  for (const href of scriptTags) {\n    const fullSrc = `${ctx.assetPrefix}/_next/${encodeURIPath(\n      href\n    )}${getAssetQueryString(ctx, true)}`\n\n    scripts.push(\n      createElement('script', {\n        src: fullSrc,\n        async: true,\n        key: `script-${scriptIndex}`,\n        nonce: ctx.nonce,\n      })\n    )\n    scriptIndex++\n  }\n\n  return styles.length || scripts.length ? [...styles, ...scripts] : null\n}\n","const noop = () => {}\n\nlet registry: FinalizationRegistry<WeakRef<ReadableStream>> | undefined\n\nif (globalThis.FinalizationRegistry) {\n  registry = new FinalizationRegistry((weakRef: WeakRef<ReadableStream>) => {\n    const stream = weakRef.deref()\n    if (stream && !stream.locked) {\n      stream.cancel('Response object has been garbage collected').then(noop)\n    }\n  })\n}\n\n/**\n * Clones a response by teeing the body so we can return two independent\n * ReadableStreams from it. This avoids the bug in the undici library around\n * response cloning.\n *\n * After cloning, the original response's body will be consumed and closed.\n *\n * @see https://github.com/vercel/next.js/pull/73274\n *\n * @param original - The original response to clone.\n * @returns A tuple containing two independent clones of the original response.\n */\nexport function cloneResponse(original: Response): [Response, Response] {\n  // If the response has no body, then we can just return the original response\n  // twice because it's immutable.\n  if (!original.body) {\n    return [original, original]\n  }\n\n  const [body1, body2] = original.body.tee()\n\n  const cloned1 = new Response(body1, {\n    status: original.status,\n    statusText: original.statusText,\n    headers: original.headers,\n  })\n\n  Object.defineProperty(cloned1, 'url', {\n    value: original.url,\n    // How the original response.url behaves\n    configurable: true,\n    enumerable: true,\n    writable: false,\n  })\n\n  const cloned2 = new Response(body2, {\n    status: original.status,\n    statusText: original.statusText,\n    headers: original.headers,\n  })\n\n  Object.defineProperty(cloned2, 'url', {\n    value: original.url,\n    // How the original response.url behaves\n    configurable: true,\n    enumerable: true,\n    writable: false,\n  })\n\n  // The Fetch Standard allows users to skip consuming the response body by\n  // relying on garbage collection to release connection resources.\n  // https://github.com/nodejs/undici?tab=readme-ov-file#garbage-collection\n  //\n  // To cancel the stream you then need to cancel both resulting branches.\n  // Teeing a stream will generally lock it for the duration, preventing other\n  // readers from locking it.\n  // https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee\n  if (registry) {\n    if (cloned1.body) {\n      registry.register(cloned1, new WeakRef(cloned1.body))\n    }\n\n    if (cloned2.body) {\n      registry.register(cloned2, new WeakRef(cloned2.body))\n    }\n  }\n\n  return [cloned1, cloned2]\n}\n","import type { SchedulerFn } from './scheduler'\n\nimport { DetachedPromise } from './detached-promise'\n\ntype CacheKeyFn<K, C extends string | number | null> = (\n  key: K\n) => PromiseLike<C> | C\n\ntype BatcherOptions<K, C extends string | number | null> = {\n  cacheKeyFn?: CacheKeyFn<K, C>\n  schedulerFn?: SchedulerFn<void>\n}\n\ntype WorkFnContext<V, K> = {\n  resolve: (value: V | PromiseLike<V>) => void\n  key: K\n}\n\ntype WorkFn<V, K> = (context: WorkFnContext<V, K>) => Promise<V>\n\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */\nexport class Batcher<K, V, C extends string | number | null> {\n  private readonly pending = new Map<C, Promise<V>>()\n\n  protected constructor(\n    private readonly cacheKeyFn?: CacheKeyFn<K, C>,\n    /**\n     * A function that will be called to schedule the wrapped function to be\n     * executed. This defaults to a function that will execute the function\n     * immediately.\n     */\n    private readonly schedulerFn: SchedulerFn<void> = (fn) => fn()\n  ) {}\n\n  /**\n   * Creates a new instance of PendingWrapper. If the key extends a string or\n   * number, the key will be used as the cache key. If the key is an object, a\n   * cache key function must be provided.\n   */\n  public static create<K extends string | number | null, V>(\n    options?: BatcherOptions<K, K>\n  ): Batcher<K, V, K>\n  public static create<K, V, C extends string | number | null>(\n    options: BatcherOptions<K, C> &\n      Required<Pick<BatcherOptions<K, C>, 'cacheKeyFn'>>\n  ): Batcher<K, V, C>\n  public static create<K, V, C extends string | number | null>(\n    options?: BatcherOptions<K, C>\n  ): Batcher<K, V, C> {\n    return new Batcher<K, V, C>(options?.cacheKeyFn, options?.schedulerFn)\n  }\n\n  /**\n   * Wraps a function in a promise that will be resolved or rejected only once\n   * for a given key. This will allow multiple calls to the function to be\n   * made, but only one will be executed at a time. The result of the first\n   * call will be returned to all callers.\n   *\n   * @param key the key to use for the cache\n   * @param fn the function to wrap\n   * @returns a promise that resolves to the result of the function\n   */\n  public async batch(key: K, fn: WorkFn<V, K>): Promise<V> {\n    const cacheKey = (this.cacheKeyFn ? await this.cacheKeyFn(key) : key) as C\n    if (cacheKey === null) {\n      return fn({ resolve: (value) => Promise.resolve(value), key })\n    }\n\n    const pending = this.pending.get(cacheKey)\n    if (pending) return pending\n\n    const { promise, resolve, reject } = new DetachedPromise<V>()\n    this.pending.set(cacheKey, promise)\n\n    this.schedulerFn(async () => {\n      try {\n        const result = await fn({ resolve, key })\n\n        // Resolving a promise multiple times is a no-op, so we can safely\n        // resolve all pending promises with the same result.\n        resolve(result)\n      } catch (err) {\n        reject(err)\n      } finally {\n        this.pending.delete(cacheKey)\n      }\n    })\n\n    return promise\n  }\n}\n","import {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedAppPageValue,\n  type CachedPageValue,\n  type IncrementalResponseCacheEntry,\n  type ResponseCacheEntry,\n} from './types'\n\nimport RenderResult from '../render-result'\nimport { RouteKind } from '../route-kind'\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants'\n\nexport async function fromResponseCacheEntry(\n  cacheEntry: ResponseCacheEntry\n): Promise<IncrementalResponseCacheEntry> {\n  return {\n    ...cacheEntry,\n    value:\n      cacheEntry.value?.kind === CachedRouteKind.PAGES\n        ? {\n            kind: CachedRouteKind.PAGES,\n            html: await cacheEntry.value.html.toUnchunkedString(true),\n            pageData: cacheEntry.value.pageData,\n            headers: cacheEntry.value.headers,\n            status: cacheEntry.value.status,\n          }\n        : cacheEntry.value?.kind === CachedRouteKind.APP_PAGE\n          ? {\n              kind: CachedRouteKind.APP_PAGE,\n              html: await cacheEntry.value.html.toUnchunkedString(true),\n              postponed: cacheEntry.value.postponed,\n              rscData: cacheEntry.value.rscData,\n              headers: cacheEntry.value.headers,\n              status: cacheEntry.value.status,\n              segmentData: cacheEntry.value.segmentData,\n            }\n          : cacheEntry.value,\n  }\n}\n\nexport async function toResponseCacheEntry(\n  response: IncrementalResponseCacheEntry | null\n): Promise<ResponseCacheEntry | null> {\n  if (!response) return null\n\n  return {\n    isMiss: response.isMiss,\n    isStale: response.isStale,\n    cacheControl: response.cacheControl,\n    isFallback: response.isFallback,\n    value:\n      response.value?.kind === CachedRouteKind.PAGES\n        ? ({\n            kind: CachedRouteKind.PAGES,\n            html: RenderResult.fromStatic(\n              response.value.html,\n              HTML_CONTENT_TYPE_HEADER\n            ),\n            pageData: response.value.pageData,\n            headers: response.value.headers,\n            status: response.value.status,\n          } satisfies CachedPageValue)\n        : response.value?.kind === CachedRouteKind.APP_PAGE\n          ? ({\n              kind: CachedRouteKind.APP_PAGE,\n              html: RenderResult.fromStatic(\n                response.value.html,\n                HTML_CONTENT_TYPE_HEADER\n              ),\n              rscData: response.value.rscData,\n              headers: response.value.headers,\n              status: response.value.status,\n              postponed: response.value.postponed,\n              segmentData: response.value.segmentData,\n            } satisfies CachedAppPageValue)\n          : response.value,\n  }\n}\n\nexport function routeKindToIncrementalCacheKind(\n  routeKind: RouteKind\n): Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH> {\n  switch (routeKind) {\n    case RouteKind.PAGES:\n      return IncrementalCacheKind.PAGES\n    case RouteKind.APP_PAGE:\n      return IncrementalCacheKind.APP_PAGE\n    case RouteKind.IMAGE:\n      return IncrementalCacheKind.IMAGE\n    case RouteKind.APP_ROUTE:\n      return IncrementalCacheKind.APP_ROUTE\n    case RouteKind.PAGES_API:\n      // Pages Router API routes are not cached in the incremental cache.\n      throw new Error(`Unexpected route kind ${routeKind}`)\n    default:\n      return routeKind satisfies never\n  }\n}\n","import type {\n  ResponseCacheEntry,\n  ResponseGenerator,\n  ResponseCacheBase,\n  IncrementalResponseCacheEntry,\n  IncrementalResponseCache,\n} from './types'\n\nimport { Batcher } from '../../lib/batcher'\nimport { LRUCache } from '../lib/lru-cache'\nimport { warnOnce } from '../../build/output/log'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport {\n  fromResponseCacheEntry,\n  routeKindToIncrementalCacheKind,\n  toResponseCacheEntry,\n} from './utils'\nimport type { RouteKind } from '../route-kind'\n\n/**\n * Parses an environment variable as a positive integer, returning the fallback\n * if the value is missing, not a number, or not positive.\n */\nfunction parsePositiveInt(\n  envValue: string | undefined,\n  fallback: number\n): number {\n  if (!envValue) return fallback\n  const parsed = parseInt(envValue, 10)\n  return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback\n}\n\n/**\n * Default TTL (in milliseconds) for minimal mode response cache entries.\n * Used for cache hit validation as a fallback for providers that don't\n * send the x-invocation-id header yet.\n *\n * 10 seconds chosen because:\n * - Long enough to dedupe rapid successive requests (e.g., page + data)\n * - Short enough to not serve stale data across unrelated requests\n *\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_TTL` environment variable.\n */\nconst DEFAULT_TTL_MS = parsePositiveInt(\n  process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,\n  10_000\n)\n\n/**\n * Default maximum number of entries in the response cache.\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE` environment variable.\n */\nconst DEFAULT_MAX_SIZE = parsePositiveInt(\n  process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,\n  150\n)\n\n/**\n * Separator used in compound cache keys to join pathname and invocationID.\n * Using null byte (\\0) since it cannot appear in valid URL paths or UUIDs.\n */\nconst KEY_SEPARATOR = '\\0'\n\n/**\n * Sentinel value used for TTL-based cache entries (when invocationID is undefined).\n * Chosen to be a clearly reserved marker for internal cache keys.\n */\nconst TTL_SENTINEL = '__ttl_sentinel__'\n\n/**\n * Entry stored in the LRU cache.\n */\ntype CacheEntry = {\n  entry: IncrementalResponseCacheEntry | null\n  /**\n   * TTL expiration timestamp in milliseconds. Used as a fallback for\n   * cache hit validation when providers don't send x-invocation-id.\n   * Memory pressure is managed by LRU eviction rather than timers.\n   */\n  expiresAt: number\n}\n\n/**\n * Creates a compound cache key from pathname and invocationID.\n */\nfunction createCacheKey(\n  pathname: string,\n  invocationID: string | undefined\n): string {\n  return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`\n}\n\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */\nfunction extractInvocationID(compoundKey: string): string | undefined {\n  const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR)\n  if (separatorIndex === -1) return undefined\n\n  const invocationID = compoundKey.slice(separatorIndex + 1)\n  return invocationID === TTL_SENTINEL ? undefined : invocationID\n}\n\nexport * from './types'\n\nexport default class ResponseCache implements ResponseCacheBase {\n  private readonly getBatcher = Batcher.create<\n    { key: string; isOnDemandRevalidate: boolean },\n    IncrementalResponseCacheEntry | null,\n    string\n  >({\n    // Ensure on-demand revalidate doesn't block normal requests, it should be\n    // safe to run an on-demand revalidate for the same key as a normal request.\n    cacheKeyFn: ({ key, isOnDemandRevalidate }) =>\n      `${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n    // We wait to do any async work until after we've added our promise to\n    // `pendingResponses` to ensure that any any other calls will reuse the\n    // same promise until we've fully finished our work.\n    schedulerFn: scheduleOnNextTick,\n  })\n\n  private readonly revalidateBatcher = Batcher.create<\n    string,\n    IncrementalResponseCacheEntry | null\n  >({\n    // We wait to do any async work until after we've added our promise to\n    // `pendingResponses` to ensure that any any other calls will reuse the\n    // same promise until we've fully finished our work.\n    schedulerFn: scheduleOnNextTick,\n  })\n\n  /**\n   * LRU cache for minimal mode using compound keys (pathname + invocationID).\n   * This allows multiple invocations to cache the same pathname without\n   * overwriting each other's entries.\n   */\n  private readonly cache: LRUCache<CacheEntry>\n\n  /**\n   * Set of invocation IDs that have had cache entries evicted.\n   * Used to detect when the cache size may be too small.\n   * Bounded to prevent memory growth.\n   */\n  private readonly evictedInvocationIDs: Set<string> = new Set()\n\n  /**\n   * The configured max size, stored for logging.\n   */\n  private readonly maxSize: number\n\n  /**\n   * The configured TTL for cache entries in milliseconds.\n   */\n  private readonly ttl: number\n\n  // we don't use minimal_mode name here as this.minimal_mode is\n  // statically replace for server runtimes but we need it to\n  // be dynamic here\n  private minimal_mode?: boolean\n\n  constructor(\n    minimal_mode: boolean,\n    maxSize: number = DEFAULT_MAX_SIZE,\n    ttl: number = DEFAULT_TTL_MS\n  ) {\n    this.minimal_mode = minimal_mode\n    this.maxSize = maxSize\n    this.ttl = ttl\n\n    // Create the LRU cache with eviction tracking\n    this.cache = new LRUCache(maxSize, undefined, (compoundKey) => {\n      const invocationID = extractInvocationID(compoundKey)\n      if (invocationID) {\n        // Bound to 100 entries to prevent unbounded memory growth.\n        // FIFO eviction is acceptable here because:\n        // 1. Invocations are short-lived (single request lifecycle), so older\n        //    invocations are unlikely to still be active after 100 newer ones\n        // 2. This warning mechanism is best-effort for developer guidance—\n        //    missing occasional eviction warnings doesn't affect correctness\n        // 3. If a long-running invocation is somehow evicted and then has\n        //    another cache entry evicted, it will simply be re-added\n        if (this.evictedInvocationIDs.size >= 100) {\n          const first = this.evictedInvocationIDs.values().next().value\n          if (first) this.evictedInvocationIDs.delete(first)\n        }\n        this.evictedInvocationIDs.add(invocationID)\n      }\n    })\n  }\n\n  /**\n   * Gets the response cache entry for the given key.\n   *\n   * @param key - The key to get the response cache entry for.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param context - The context for the get request.\n   * @returns The response cache entry.\n   */\n  public async get(\n    key: string | null,\n    responseGenerator: ResponseGenerator,\n    context: {\n      routeKind: RouteKind\n      isOnDemandRevalidate?: boolean\n      isPrefetch?: boolean\n      incrementalCache: IncrementalResponseCache\n      isRoutePPREnabled?: boolean\n      isFallback?: boolean\n      waitUntil?: (prom: Promise<any>) => void\n\n      /**\n       * The invocation ID from the infrastructure. Used to scope the\n       * in-memory cache to a single revalidation request in minimal mode.\n       */\n      invocationID?: string\n    }\n  ): Promise<ResponseCacheEntry | null> {\n    // If there is no key for the cache, we can't possibly look this up in the\n    // cache so just return the result of the response generator.\n    if (!key) {\n      return responseGenerator({\n        hasResolved: false,\n        previousCacheEntry: null,\n      })\n    }\n\n    // Check minimal mode cache before doing any other work.\n    if (this.minimal_mode) {\n      const cacheKey = createCacheKey(key, context.invocationID)\n      const cachedItem = this.cache.get(cacheKey)\n\n      if (cachedItem) {\n        // With invocationID: exact match found - always a hit\n        // With TTL mode: must check expiration\n        if (context.invocationID !== undefined) {\n          return toResponseCacheEntry(cachedItem.entry)\n        }\n\n        // TTL mode: check expiration\n        const now = Date.now()\n        if (cachedItem.expiresAt > now) {\n          return toResponseCacheEntry(cachedItem.entry)\n        }\n\n        // TTL expired - clean up\n        this.cache.remove(cacheKey)\n      }\n\n      // Warn if this invocation had entries evicted - indicates cache may be too small.\n      if (\n        context.invocationID &&\n        this.evictedInvocationIDs.has(context.invocationID)\n      ) {\n        warnOnce(\n          `Response cache entry was evicted for invocation ${context.invocationID}. ` +\n            `Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`\n        )\n      }\n    }\n\n    const {\n      incrementalCache,\n      isOnDemandRevalidate = false,\n      isFallback = false,\n      isRoutePPREnabled = false,\n      isPrefetch = false,\n      waitUntil,\n      routeKind,\n      invocationID,\n    } = context\n\n    const response = await this.getBatcher.batch(\n      { key, isOnDemandRevalidate },\n      ({ resolve }) => {\n        const promise = this.handleGet(\n          key,\n          responseGenerator,\n          {\n            incrementalCache,\n            isOnDemandRevalidate,\n            isFallback,\n            isRoutePPREnabled,\n            isPrefetch,\n            routeKind,\n            invocationID,\n          },\n          resolve\n        )\n\n        // We need to ensure background revalidates are passed to waitUntil.\n        if (waitUntil) waitUntil(promise)\n\n        return promise\n      }\n    )\n\n    if (this.minimal_mode && response?.cacheControl) {\n      const cacheKey = createCacheKey(key, invocationID)\n      this.cache.set(cacheKey, {\n        entry: response,\n        expiresAt: Date.now() + this.ttl,\n      })\n    }\n\n    return toResponseCacheEntry(response)\n  }\n\n  /**\n   * Handles the get request for the response cache.\n   *\n   * @param key - The key to get the response cache entry for.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param context - The context for the get request.\n   * @param resolve - The resolve function to use to resolve the response cache entry.\n   * @returns The response cache entry.\n   */\n  private async handleGet(\n    key: string,\n    responseGenerator: ResponseGenerator,\n    context: {\n      incrementalCache: IncrementalResponseCache\n      isOnDemandRevalidate: boolean\n      isFallback: boolean\n      isRoutePPREnabled: boolean\n      isPrefetch: boolean\n      routeKind: RouteKind\n      invocationID: string | undefined\n    },\n    resolve: (value: IncrementalResponseCacheEntry | null) => void\n  ): Promise<IncrementalResponseCacheEntry | null> {\n    let previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null =\n      null\n    let resolved = false\n\n    try {\n      // Get the previous cache entry if not in minimal mode\n      previousIncrementalCacheEntry = !this.minimal_mode\n        ? await context.incrementalCache.get(key, {\n            kind: routeKindToIncrementalCacheKind(context.routeKind),\n            isRoutePPREnabled: context.isRoutePPREnabled,\n            isFallback: context.isFallback,\n          })\n        : null\n\n      // `isStale === -1` signals that the entry is past its `expire` (either\n      // via an expired tag or, with `cacheLife({ expire })`, past the route's\n      // expire time in the prerender manifest). In that case we must NOT\n      // early-resolve with the stale value — instead we fall through to a\n      // blocking revalidation so the response returned to the user is fresh.\n      if (\n        previousIncrementalCacheEntry &&\n        !context.isOnDemandRevalidate &&\n        previousIncrementalCacheEntry.isStale !== -1\n      ) {\n        resolve(previousIncrementalCacheEntry)\n        resolved = true\n\n        if (!previousIncrementalCacheEntry.isStale || context.isPrefetch) {\n          // The cached value is still valid, so we don't need to update it yet.\n          return previousIncrementalCacheEntry\n        }\n      }\n\n      // Revalidate the cache entry.\n      //\n      // A prefetch request that missed must run its own response generator\n      // rather than joining an in-flight revalidation through the batcher. A\n      // background revalidation may be regenerating the concrete (non-fallback)\n      // entry for this route — e.g. an ISR fallback-shell upgrade scheduled by\n      // an earlier prefetch sub-request. Joining it would serve that concrete\n      // result to the prefetch instead of the fallback shell, and which segment\n      // wins would depend purely on request timing. Running the generator\n      // directly lets every prefetch segment take the same fallback-shell path,\n      // independent of any concurrent background upgrade.\n      const incrementalResponseCacheEntry =\n        context.isPrefetch && previousIncrementalCacheEntry === null\n          ? await this.handleRevalidate(\n              key,\n              context.incrementalCache,\n              context.isRoutePPREnabled,\n              context.isFallback,\n              responseGenerator,\n              previousIncrementalCacheEntry,\n              resolved\n            )\n          : await this.revalidate(\n              key,\n              context.incrementalCache,\n              context.isRoutePPREnabled,\n              context.isFallback,\n              responseGenerator,\n              previousIncrementalCacheEntry,\n              resolved\n            )\n\n      // Handle null response\n      if (!incrementalResponseCacheEntry) {\n        // Remove the cache item if it was set so we don't use it again.\n        if (this.minimal_mode) {\n          const cacheKey = createCacheKey(key, context.invocationID)\n          this.cache.remove(cacheKey)\n        }\n        return null\n      }\n\n      // Resolve for on-demand revalidation or if not already resolved\n      if (context.isOnDemandRevalidate && !resolved) {\n        return incrementalResponseCacheEntry\n      }\n\n      return incrementalResponseCacheEntry\n    } catch (err) {\n      // If we've already resolved the cache entry, we can't reject as we\n      // already resolved the cache entry so log the error here.\n      if (resolved) {\n        console.error(err)\n        return null\n      }\n\n      throw err\n    }\n  }\n\n  /**\n   * Revalidates the cache entry for the given key.\n   *\n   * @param key - The key to revalidate the cache entry for.\n   * @param incrementalCache - The incremental cache to use to revalidate the cache entry.\n   * @param isRoutePPREnabled - Whether the route is PPR enabled.\n   * @param isFallback - Whether the route is a fallback.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param previousIncrementalCacheEntry - The previous cache entry to use to revalidate the cache entry.\n   * @param hasResolved - Whether the response has been resolved.\n   * @param waitUntil - Optional function to register background work.\n   * @param invocationID - The invocation ID for cache key scoping.\n   * @returns The revalidated cache entry.\n   */\n  public async revalidate(\n    key: string,\n    incrementalCache: IncrementalResponseCache,\n    isRoutePPREnabled: boolean,\n    isFallback: boolean,\n    responseGenerator: ResponseGenerator,\n    previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n    hasResolved: boolean,\n    waitUntil?: (prom: Promise<any>) => void\n  ) {\n    return this.revalidateBatcher.batch(key, () => {\n      const promise = this.handleRevalidate(\n        key,\n        incrementalCache,\n        isRoutePPREnabled,\n        isFallback,\n        responseGenerator,\n        previousIncrementalCacheEntry,\n        hasResolved\n      )\n\n      // We need to ensure background revalidates are passed to waitUntil.\n      if (waitUntil) waitUntil(promise)\n\n      return promise\n    })\n  }\n\n  private async handleRevalidate(\n    key: string,\n    incrementalCache: IncrementalResponseCache,\n    isRoutePPREnabled: boolean,\n    isFallback: boolean,\n    responseGenerator: ResponseGenerator,\n    previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n    hasResolved: boolean\n  ) {\n    try {\n      // Generate the response cache entry using the response generator.\n      const responseCacheEntry = await responseGenerator({\n        hasResolved,\n        previousCacheEntry: previousIncrementalCacheEntry,\n        isRevalidating: true,\n      })\n      if (!responseCacheEntry) {\n        return null\n      }\n\n      // Convert the response cache entry to an incremental response cache entry.\n      const incrementalResponseCacheEntry = await fromResponseCacheEntry({\n        ...responseCacheEntry,\n        isMiss: !previousIncrementalCacheEntry,\n      })\n\n      // We want to persist the result only if it has a cache control value\n      // defined. The minimal mode LRU write is handled in get() so that\n      // every caller — including batched invocations — populates the cache.\n      if (incrementalResponseCacheEntry.cacheControl && !this.minimal_mode) {\n        await incrementalCache.set(key, incrementalResponseCacheEntry.value, {\n          cacheControl: incrementalResponseCacheEntry.cacheControl,\n          isRoutePPREnabled,\n          isFallback,\n        })\n      }\n\n      return incrementalResponseCacheEntry\n    } catch (err) {\n      // When a path is erroring we automatically re-set the existing cache\n      // with new revalidate and expire times to prevent non-stop retrying.\n      if (previousIncrementalCacheEntry?.cacheControl) {\n        const revalidate = Math.min(\n          Math.max(\n            previousIncrementalCacheEntry.cacheControl.revalidate || 3,\n            3\n          ),\n          30\n        )\n        const expire =\n          previousIncrementalCacheEntry.cacheControl.expire === undefined\n            ? undefined\n            : Math.max(\n                revalidate + 3,\n                previousIncrementalCacheEntry.cacheControl.expire\n              )\n\n        await incrementalCache.set(key, previousIncrementalCacheEntry.value, {\n          cacheControl: { revalidate: revalidate, expire: expire },\n          isRoutePPREnabled,\n          isFallback,\n        })\n      }\n\n      // We haven't resolved yet, so let's throw to indicate an error.\n      throw err\n    }\n  }\n}\n","import type {\n  WorkAsyncStorage,\n  WorkStore,\n} from '../app-render/work-async-storage.external'\n\nimport { AppRenderSpan, NextNodeServerSpan } from './trace/constants'\nimport {\n  isRequestInsightsEnabled,\n  recordRequestInsightFetch,\n} from './trace/request-insights'\nimport { getRequestInsightsIdentity } from './trace/request-insights-identity'\nimport { getTracer, SpanKind } from './trace/tracer'\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  INFINITE_CACHE,\n  NEXT_CACHE_TAG_MAX_ITEMS,\n  NEXT_CACHE_TAG_MAX_LENGTH,\n} from '../../lib/constants'\nimport { markCurrentScopeAsDynamic } from '../app-render/dynamic-rendering'\nimport { makeDynamicHangingPromise } from '../dynamic-rendering-utils'\nimport type { FetchMetric } from '../base-http'\nimport { createDedupeFetch } from './dedupe-fetch'\nimport {\n  getCacheSignal,\n  type RevalidateStore,\n  type WorkUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedFetchData,\n  type ServerComponentsHmrCache,\n  type SetIncrementalFetchCacheContext,\n} from '../response-cache'\nimport { cloneResponse } from './clone-response'\nimport type { IncrementalCache } from './incremental-cache'\nimport { RenderStage } from '../app-render/staged-rendering'\nimport { encodeHeaderSafe } from './encode-header-safe'\nimport type { Span } from './trace/tracer'\n\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n\ntype Fetcher = typeof fetch\n\ntype PatchedFetcher = Fetcher & {\n  readonly __nextPatched: true\n  readonly __nextGetStaticStore: () => WorkAsyncStorage\n  readonly _nextOriginalFetch: Fetcher\n}\n\nexport const NEXT_PATCH_SYMBOL = Symbol.for('next-patch')\n\nfunction isFetchPatched() {\n  return (globalThis as Record<symbol, unknown>)[NEXT_PATCH_SYMBOL] === true\n}\n\nexport function validateRevalidate(\n  revalidateVal: unknown,\n  route: string\n): undefined | number {\n  try {\n    let normalizedRevalidate: number | undefined = undefined\n\n    if (revalidateVal === false || revalidateVal === Infinity) {\n      // Unlike Infinity, INFINITE_CACHE survives JSON serialization (e.g. in\n      // the fetch cache).\n      normalizedRevalidate = INFINITE_CACHE\n    } else if (\n      typeof revalidateVal === 'number' &&\n      !isNaN(revalidateVal) &&\n      revalidateVal > -1\n    ) {\n      normalizedRevalidate = revalidateVal\n    } else if (typeof revalidateVal !== 'undefined') {\n      throw new Error(\n        `Invalid revalidate value \"${revalidateVal}\" on \"${route}\", must be a non-negative number or false`\n      )\n    }\n    return normalizedRevalidate\n  } catch (err: any) {\n    // handle client component error from attempting to check revalidate value\n    if (err instanceof Error && err.message.includes('Invalid revalidate')) {\n      throw err\n    }\n    return undefined\n  }\n}\n\nexport function validateTags(tags: any[], description: string) {\n  const validTags: string[] = []\n  const invalidTags: Array<{\n    tag: any\n    reason: string\n  }> = []\n\n  for (let i = 0; i < tags.length; i++) {\n    const tag = tags[i]\n\n    if (typeof tag !== 'string') {\n      invalidTags.push({ tag, reason: 'invalid type, must be a string' })\n    } else if (tag.length > NEXT_CACHE_TAG_MAX_LENGTH) {\n      invalidTags.push({\n        tag,\n        reason: `exceeded max length of ${NEXT_CACHE_TAG_MAX_LENGTH}`,\n      })\n    } else {\n      // Encode so a non-ASCII tag can be safely serialized into the\n      // `x-next-cache-tags` HTTP header without tripping Node's header\n      // validation. Length is checked on the raw input above.\n      validTags.push(encodeHeaderSafe(tag))\n    }\n\n    if (validTags.length > NEXT_CACHE_TAG_MAX_ITEMS) {\n      console.warn(\n        `Warning: exceeded max tag count for ${description}, dropped tags:`,\n        tags.slice(i).join(', ')\n      )\n      break\n    }\n  }\n\n  if (invalidTags.length > 0) {\n    console.warn(`Warning: invalid tags passed to ${description}: `)\n\n    for (const { tag, reason } of invalidTags) {\n      console.log(`tag: \"${tag}\" ${reason}`)\n    }\n  }\n  return validTags\n}\n\nfunction trackFetchMetric(\n  workStore: WorkStore,\n  span: Span | undefined,\n  ctx: Omit<FetchMetric, 'end' | 'idx'>\n) {\n  const metric = {\n    ...ctx,\n    end: performance.timeOrigin + performance.now(),\n    idx: workStore.nextFetchId || 0,\n  }\n\n  span?.setAttributes({\n    'http.status_code': metric.status,\n    'next.fetch.idx': metric.idx,\n    'next.fetch.cache_status': metric.cacheStatus,\n    'next.fetch.cache_reason': metric.cacheReason,\n  })\n\n  if (isRequestInsightsEnabled()) {\n    const requestInsightsIdentity = getRequestInsightsIdentity()\n    const requestInsightsRequestId =\n      requestInsightsIdentity?.requestId ?? workStore.requestId\n\n    if (requestInsightsRequestId) {\n      recordRequestInsightFetch(\n        {\n          requestId: requestInsightsRequestId,\n          kind: requestInsightsIdentity?.kind,\n          htmlRequestId:\n            requestInsightsIdentity?.htmlRequestId ?? workStore.htmlRequestId,\n          route: workStore.route,\n        },\n        {\n          url: metric.url,\n          method: metric.method,\n          statusCode: metric.status,\n          startTime: metric.start,\n          durationMs: metric.end - metric.start,\n          cacheStatus: metric.cacheStatus,\n          cacheReason: metric.cacheReason,\n          index: metric.idx,\n        }\n      )\n    }\n  }\n\n  if (!workStore.shouldTrackFetchMetrics) {\n    return\n  }\n\n  workStore.fetchMetrics ??= []\n\n  workStore.fetchMetrics.push(metric)\n}\n\nasync function createCachedPrerenderResponse(\n  res: Response,\n  cacheKey: string,\n  incrementalCacheContext: SetIncrementalFetchCacheContext | undefined,\n  incrementalCache: IncrementalCache,\n  revalidate: number,\n  handleUnlock: () => Promise<void> | void\n): Promise<Response> {\n  // We are prerendering at build time or revalidate time with cacheComponents so we\n  // need to buffer the response so we can guarantee it can be read in a\n  // microtask.\n  const bodyBuffer = await res.arrayBuffer()\n\n  const fetchedData = {\n    headers: Object.fromEntries(res.headers.entries()),\n    body: Buffer.from(bodyBuffer).toString('base64'),\n    status: res.status,\n    url: res.url,\n  }\n\n  // We can skip setting the serverComponentsHmrCache because we aren't in dev\n  // mode.\n\n  if (incrementalCacheContext) {\n    await incrementalCache.set(\n      cacheKey,\n      { kind: CachedRouteKind.FETCH, data: fetchedData, revalidate },\n      incrementalCacheContext\n    )\n  }\n\n  await handleUnlock()\n\n  // We return a new Response to the caller.\n  return new Response(bodyBuffer, {\n    headers: res.headers,\n    status: res.status,\n    statusText: res.statusText,\n  })\n}\n\nasync function createCachedDynamicResponse(\n  workStore: WorkStore,\n  res: Response,\n  cacheKey: string,\n  incrementalCacheContext: SetIncrementalFetchCacheContext | undefined,\n  incrementalCache: IncrementalCache,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  revalidate: number,\n  input: RequestInfo | URL,\n  handleUnlock: () => Promise<void> | void,\n  signal: AbortSignal | null\n): Promise<Response> {\n  // We're cloning the response using this utility because there exists a bug in\n  // the undici library around response cloning. See the following pull request\n  // for more details: https://github.com/vercel/next.js/pull/73274\n  const [cloned1, cloned2] = cloneResponse(res)\n\n  // We are dynamically rendering including dev mode. We want to return the\n  // response to the caller as soon as possible because it might stream over a\n  // very long time.\n  const cacheSetPromise = cloned1\n    .arrayBuffer()\n    .then(async (arrayBuffer) => {\n      const bodyBuffer = Buffer.from(arrayBuffer)\n\n      const fetchedData = {\n        headers: Object.fromEntries(cloned1.headers.entries()),\n        body: bodyBuffer.toString('base64'),\n        status: cloned1.status,\n        url: cloned1.url,\n      }\n\n      serverComponentsHmrCache?.set(cacheKey, fetchedData)\n\n      if (incrementalCacheContext) {\n        await incrementalCache.set(\n          cacheKey,\n          { kind: CachedRouteKind.FETCH, data: fetchedData, revalidate },\n          incrementalCacheContext\n        )\n      }\n    })\n    .catch((error) => {\n      // Don't warn if the request was aborted intentionally.\n      if (!signal?.aborted) {\n        console.warn(`Failed to set fetch cache`, input, error)\n      }\n    })\n    .finally(handleUnlock)\n\n  const pendingRevalidateKey = `cache-set-${cacheKey}`\n  const pendingRevalidates = (workStore.pendingRevalidates ??= {})\n\n  let pendingRevalidatePromise = Promise.resolve()\n  if (pendingRevalidateKey in pendingRevalidates) {\n    // There is already a pending revalidate entry that we need to await to\n    // avoid race conditions.\n    pendingRevalidatePromise = pendingRevalidates[pendingRevalidateKey]\n  }\n\n  pendingRevalidates[pendingRevalidateKey] = pendingRevalidatePromise\n    .then(() => cacheSetPromise)\n    .finally(() => {\n      // If the pending revalidate is not present in the store, then we have\n      // nothing to delete.\n      if (!pendingRevalidates?.[pendingRevalidateKey]) {\n        return\n      }\n\n      delete pendingRevalidates[pendingRevalidateKey]\n    })\n\n  return cloned2\n}\n\ninterface PatchableModule {\n  workAsyncStorage: WorkAsyncStorage\n  workUnitAsyncStorage: WorkUnitAsyncStorage\n}\n\nexport function createPatchedFetcher(\n  originFetch: Fetcher,\n  { workAsyncStorage, workUnitAsyncStorage }: PatchableModule\n): PatchedFetcher {\n  // Create the patched fetch function.\n  const patched = async function fetch(\n    input: RequestInfo | URL,\n    init: RequestInit | undefined\n  ): Promise<Response> {\n    let url: URL | undefined\n    try {\n      url = new URL(input instanceof Request ? input.url : input)\n      url.username = ''\n      url.password = ''\n    } catch {\n      // Error caused by malformed URL should be handled by native fetch\n      url = undefined\n    }\n    const fetchUrl = url?.href ?? ''\n    const method = init?.method?.toUpperCase() || 'GET'\n\n    // Do create a new span trace for internal fetches in the\n    // non-verbose mode.\n    const isInternal = (init?.next as any)?.internal === true\n    const hideSpan = process.env.NEXT_OTEL_FETCH_DISABLED === '1'\n    // We don't track fetch metrics for internal fetches\n    // so it's not critical that we have a start time, as it won't be recorded.\n    // This is to workaround a flaky issue where performance APIs might\n    // not be available and will require follow-up investigation.\n    const fetchStart: number | undefined = isInternal\n      ? undefined\n      : performance.timeOrigin + performance.now()\n\n    const workStore = workAsyncStorage.getStore()\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    let cacheSignal = workUnitStore ? getCacheSignal(workUnitStore) : null\n    if (cacheSignal) {\n      cacheSignal.beginRead()\n    }\n\n    const result = getTracer().trace(\n      isInternal ? NextNodeServerSpan.internalFetch : AppRenderSpan.fetch,\n      {\n        hideSpan,\n        kind: SpanKind.CLIENT,\n        spanName: ['fetch', method, fetchUrl].filter(Boolean).join(' '),\n        attributes: {\n          'http.url': fetchUrl,\n          'http.method': method,\n          'net.peer.name': url?.hostname,\n          'net.peer.port': url?.port || undefined,\n        },\n      },\n      async (span) => {\n        // If this is an internal fetch, we should not do any special treatment.\n        if (isInternal) {\n          return originFetch(input, init)\n        }\n\n        // If the workStore is not available, we can't do any\n        // special treatment of fetch, therefore fallback to the original\n        // fetch implementation.\n        if (!workStore) {\n          return originFetch(input, init)\n        }\n\n        // We should also fallback to the original fetch implementation if we\n        // are in draft mode, it does not constitute a static generation.\n        if (workStore.isDraftMode) {\n          return originFetch(input, init)\n        }\n\n        const isRequestInput =\n          input &&\n          typeof input === 'object' &&\n          typeof (input as Request).method === 'string'\n\n        // With `fetch(new Request(url), init)`, native fetch lets `init`\n        // override the base Request. Merge them into a single effective Request\n        // so cacheability, the cache key, and the upstream request all describe\n        // the same thing.\n        if (isRequestInput && init) {\n          // `next` (revalidate/tags) is Next-specific and dropped by\n          // `new Request`, so keep it on `init` and move the rest onto input.\n          const { next, ...overrides } = init\n          input = new Request(input as Request, overrides)\n          init = next ? { next } : undefined\n        }\n\n        const getRequestMeta = (field: string) => {\n          // If request input is present but init is not, retrieve from input first.\n          const value = (init as any)?.[field]\n          return value || (isRequestInput ? (input as any)[field] : null)\n        }\n\n        let finalRevalidate: number | undefined = undefined\n        const getNextField = (field: 'revalidate' | 'tags') => {\n          return typeof init?.next?.[field] !== 'undefined'\n            ? init?.next?.[field]\n            : isRequestInput\n              ? (input as any).next?.[field]\n              : undefined\n        }\n        // RequestInit doesn't keep extra fields e.g. next so it's\n        // only available if init is used separate\n        const originalFetchRevalidate = getNextField('revalidate')\n        let currentFetchRevalidate = originalFetchRevalidate\n        const tags: string[] = validateTags(\n          getNextField('tags') || [],\n          `fetch ${input.toString()}`\n        )\n\n        let revalidateStore: RevalidateStore | undefined\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'prerender':\n            case 'prerender-runtime':\n            // TODO: Stop accumulating tags in client prerender. (fallthrough)\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'cache':\n            case 'private-cache':\n              revalidateStore = workUnitStore\n              break\n            case 'request':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        if (revalidateStore) {\n          if (Array.isArray(tags)) {\n            // Collect tags onto parent caches or parent prerenders.\n            const collectedTags =\n              revalidateStore.tags ?? (revalidateStore.tags = [])\n            for (const tag of tags) {\n              if (!collectedTags.includes(tag)) {\n                collectedTags.push(tag)\n              }\n            }\n          }\n        }\n\n        const implicitTags = workUnitStore?.implicitTags\n\n        let pageFetchCacheMode = workStore.fetchCache\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'unstable-cache':\n              // Inside unstable-cache we treat it the same as force-no-store on\n              // the page.\n              pageFetchCacheMode = 'force-no-store'\n              break\n            case 'prerender':\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-runtime':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'request':\n            case 'cache':\n            case 'private-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        const isUsingNoStore = !!workStore.isUnstableNoStore\n\n        let currentFetchCacheConfig = getRequestMeta('cache')\n        let cacheReason = ''\n        let cacheWarning: string | undefined\n\n        if (\n          typeof currentFetchCacheConfig === 'string' &&\n          typeof currentFetchRevalidate !== 'undefined'\n        ) {\n          // If the revalidate value conflicts with the cache value, we should warn the user and unset the conflicting values.\n          const isConflictingRevalidate =\n            // revalidate: 0 and cache: force-cache\n            (currentFetchCacheConfig === 'force-cache' &&\n              currentFetchRevalidate === 0) ||\n            // revalidate: >0 or revalidate: false and cache: no-store\n            (currentFetchCacheConfig === 'no-store' &&\n              (currentFetchRevalidate > 0 || currentFetchRevalidate === false))\n\n          if (isConflictingRevalidate) {\n            cacheWarning = `Specified \"cache: ${currentFetchCacheConfig}\" and \"revalidate: ${currentFetchRevalidate}\", only one should be specified.`\n            currentFetchCacheConfig = undefined\n            currentFetchRevalidate = undefined\n          }\n        }\n\n        const hasExplicitFetchCacheOptOut =\n          // fetch config itself signals not to cache\n          currentFetchCacheConfig === 'no-cache' ||\n          currentFetchCacheConfig === 'no-store' ||\n          // the fetch isn't explicitly caching and the segment level cache config signals not to cache\n          // note: `pageFetchCacheMode` is also set by being in an unstable_cache context.\n          pageFetchCacheMode === 'force-no-store' ||\n          pageFetchCacheMode === 'only-no-store'\n\n        // If no explicit fetch cache mode is set, but dynamic = `force-dynamic` is set,\n        // we shouldn't consider caching the fetch. This is because the `dynamic` cache\n        // is considered a \"top-level\" cache mode, whereas something like `fetchCache` is more\n        // fine-grained. Top-level modes are responsible for setting reasonable defaults for the\n        // other configurations.\n        const noFetchConfigAndForceDynamic =\n          !pageFetchCacheMode &&\n          !currentFetchCacheConfig &&\n          !currentFetchRevalidate &&\n          workStore.forceDynamic\n\n        if (\n          // force-cache was specified without a revalidate value. We set the revalidate value to false\n          // which will signal the cache to not revalidate\n          currentFetchCacheConfig === 'force-cache' &&\n          typeof currentFetchRevalidate === 'undefined'\n        ) {\n          currentFetchRevalidate = false\n        } else if (\n          hasExplicitFetchCacheOptOut ||\n          noFetchConfigAndForceDynamic\n        ) {\n          currentFetchRevalidate = 0\n        }\n\n        if (\n          currentFetchCacheConfig === 'no-cache' ||\n          currentFetchCacheConfig === 'no-store'\n        ) {\n          cacheReason = `cache: ${currentFetchCacheConfig}`\n        }\n\n        finalRevalidate = validateRevalidate(\n          currentFetchRevalidate,\n          workStore.route\n        )\n\n        const _headers = getRequestMeta('headers')\n        const initHeaders: Headers =\n          typeof _headers?.get === 'function'\n            ? _headers\n            : new Headers(_headers || {})\n\n        const hasUnCacheableHeader =\n          initHeaders.get('authorization') || initHeaders.get('cookie')\n\n        const isUnCacheableMethod = !['get', 'head'].includes(\n          getRequestMeta('method')?.toLowerCase() || 'get'\n        )\n\n        /**\n         * We automatically disable fetch caching under the following conditions:\n         * - Fetch cache configs are not set. Specifically:\n         *    - A page fetch cache mode is not set (export const fetchCache=...)\n         *    - A fetch cache mode is not set in the fetch call (fetch(url, { cache: ... }))\n         *      or the fetch cache mode is set to 'default'\n         *    - A fetch revalidate value is not set in the fetch call (fetch(url, { revalidate: ... }))\n         * - OR the fetch comes after a configuration that triggered dynamic rendering (e.g., reading cookies())\n         *   and the fetch was considered uncacheable (e.g., POST method or has authorization headers)\n         */\n        const hasNoExplicitCacheConfig =\n          // eslint-disable-next-line eqeqeq\n          pageFetchCacheMode == undefined &&\n          // eslint-disable-next-line eqeqeq\n          (currentFetchCacheConfig == undefined ||\n            // when considering whether to opt into the default \"no-cache\" fetch semantics,\n            // a \"default\" cache config should be treated the same as no cache config\n            currentFetchCacheConfig === 'default') &&\n          // eslint-disable-next-line eqeqeq\n          currentFetchRevalidate == undefined\n\n        let autoNoCache = Boolean(\n          (hasUnCacheableHeader || isUnCacheableMethod) &&\n            revalidateStore?.revalidate === 0\n        )\n\n        let isImplicitBuildTimeCache = false\n\n        if (!autoNoCache && hasNoExplicitCacheConfig) {\n          // We don't enable automatic no-cache behavior during build-time\n          // prerendering so that we can still leverage the fetch cache between\n          // export workers.\n          if (workStore.isBuildTimePrerendering) {\n            isImplicitBuildTimeCache = true\n          } else {\n            autoNoCache = true\n          }\n        }\n\n        // If we have no cache config, and we're in Dynamic I/O prerendering,\n        // it'll be a dynamic call. We don't have to issue that dynamic call.\n        if (hasNoExplicitCacheConfig && workUnitStore !== undefined) {\n          switch (workUnitStore.type) {\n            case 'prerender':\n            case 'prerender-runtime':\n            // While we don't want to do caching in the client scope we know the\n            // fetch will be dynamic for cacheComponents so we may as well avoid the\n            // call here. (fallthrough)\n            case 'prerender-client':\n              if (cacheSignal) {\n                cacheSignal.endRead()\n                cacheSignal = null\n              }\n\n              return makeDynamicHangingPromise<Response>(\n                workUnitStore.renderSignal,\n                workStore.route,\n                'fetch()'\n              )\n            case 'validation-client':\n              break\n            case 'request':\n              if (\n                process.env.NODE_ENV === 'development' &&\n                workUnitStore.stagedRendering\n              ) {\n                if (cacheSignal) {\n                  cacheSignal.endRead()\n                  cacheSignal = null\n                }\n                await workUnitStore.stagedRendering.waitForStage(\n                  RenderStage.Dynamic\n                )\n              }\n              break\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'cache':\n            case 'private-cache':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        switch (pageFetchCacheMode) {\n          case 'force-no-store': {\n            cacheReason = 'fetchCache = force-no-store'\n            break\n          }\n          case 'only-no-store': {\n            if (\n              currentFetchCacheConfig === 'force-cache' ||\n              (typeof finalRevalidate !== 'undefined' && finalRevalidate > 0)\n            ) {\n              throw new Error(\n                `cache: 'force-cache' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-no-store'`\n              )\n            }\n            cacheReason = 'fetchCache = only-no-store'\n            break\n          }\n          case 'only-cache': {\n            if (currentFetchCacheConfig === 'no-store') {\n              throw new Error(\n                `cache: 'no-store' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-cache'`\n              )\n            }\n            break\n          }\n          case 'force-cache': {\n            if (\n              typeof currentFetchRevalidate === 'undefined' ||\n              currentFetchRevalidate === 0\n            ) {\n              cacheReason = 'fetchCache = force-cache'\n              finalRevalidate = INFINITE_CACHE\n            }\n            break\n          }\n          case 'default-cache':\n          case 'default-no-store':\n          case 'auto':\n          case undefined:\n            // sometimes we won't match the above cases. the reason we don't move\n            // everything to this switch is the use of autoNoCache which is not a fetchCacheMode\n            // I suspect this could be unified with fetchCacheMode however in which case we could\n            // simplify the switch case and ensure we have an exhaustive switch handling all modes\n            break\n          default:\n            pageFetchCacheMode satisfies never\n        }\n\n        if (typeof finalRevalidate === 'undefined') {\n          if (pageFetchCacheMode === 'default-cache' && !isUsingNoStore) {\n            finalRevalidate = INFINITE_CACHE\n            cacheReason = 'fetchCache = default-cache'\n          } else if (pageFetchCacheMode === 'default-no-store') {\n            finalRevalidate = 0\n            cacheReason = 'fetchCache = default-no-store'\n          } else if (isUsingNoStore) {\n            finalRevalidate = 0\n            cacheReason = 'noStore call'\n          } else if (autoNoCache) {\n            finalRevalidate = 0\n            cacheReason = 'auto no cache'\n          } else {\n            // TODO: should we consider this case an invariant?\n            cacheReason = 'auto cache'\n            finalRevalidate = revalidateStore\n              ? revalidateStore.revalidate\n              : INFINITE_CACHE\n          }\n        } else if (!cacheReason) {\n          cacheReason = `revalidate: ${finalRevalidate}`\n        }\n\n        if (\n          // when force static is configured we don't bail from\n          // `revalidate: 0` values\n          !(workStore.forceStatic && finalRevalidate === 0) &&\n          // we don't consider autoNoCache to switch to dynamic for ISR\n          !autoNoCache &&\n          // If the revalidate value isn't currently set or the value is less\n          // than the current revalidate value, we should update the revalidate\n          // value.\n          revalidateStore &&\n          finalRevalidate < revalidateStore.revalidate\n        ) {\n          // If we were setting the revalidate value to 0, we should try to\n          // postpone instead first.\n          if (finalRevalidate === 0) {\n            if (workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'prerender-runtime':\n                // If we're in an instant validation, a dynamic fetch won't\n                // have time to resolve during the validation prerender anyway,\n                // so we leave it hanging. This can cause false negatives in shared parents,\n                // but we accept that for now, because client data fetching is non-idiomatic.\n                // eslint-disable-next-line no-fallthrough\n                case 'validation-client':\n                  if (cacheSignal) {\n                    cacheSignal.endRead()\n                    cacheSignal = null\n                  }\n                  return makeDynamicHangingPromise<Response>(\n                    workUnitStore.renderSignal,\n                    workStore.route,\n                    'fetch()'\n                  )\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    if (cacheSignal) {\n                      cacheSignal.endRead()\n                      cacheSignal = null\n                    }\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n\n            markCurrentScopeAsDynamic(\n              workStore,\n              workUnitStore,\n              `revalidate: 0 fetch ${input} ${workStore.route}`\n            )\n          }\n\n          // We only want to set the revalidate store's revalidate time if it\n          // was explicitly set for the fetch call, i.e.\n          // originalFetchRevalidate.\n          if (revalidateStore && originalFetchRevalidate === finalRevalidate) {\n            revalidateStore.revalidate = finalRevalidate\n          }\n        }\n\n        const isCacheableRevalidate =\n          typeof finalRevalidate === 'number' && finalRevalidate > 0\n\n        let cacheKey: string | undefined\n        const { incrementalCache } = workStore\n        let isHmrRefresh = false\n        let serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'request':\n            case 'cache':\n            case 'private-cache':\n              isHmrRefresh = workUnitStore.isHmrRefresh ?? false\n              serverComponentsHmrCache = workUnitStore.serverComponentsHmrCache\n              break\n            case 'prerender':\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-runtime':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        if (\n          incrementalCache &&\n          (isCacheableRevalidate || serverComponentsHmrCache)\n        ) {\n          try {\n            cacheKey = await incrementalCache.generateCacheKey(\n              fetchUrl,\n              isRequestInput ? (input as RequestInit) : init\n            )\n          } catch (cause) {\n            console.error(`Failed to generate cache key for`, input, cause)\n          }\n        }\n\n        const fetchIdx = workStore.nextFetchId ?? 1\n        workStore.nextFetchId = fetchIdx + 1\n\n        let handleUnlock: () => Promise<void> | void = () => {}\n\n        const doOriginalFetch = async (\n          isStale?: boolean,\n          cacheReasonOverride?: string\n        ) => {\n          const requestInputFields = [\n            'cache',\n            'credentials',\n            'headers',\n            'integrity',\n            'keepalive',\n            'method',\n            'mode',\n            'redirect',\n            'referrer',\n            'referrerPolicy',\n            'window',\n            'duplex',\n\n            // don't pass through signal when revalidating\n            ...(isStale ? [] : ['signal']),\n          ]\n\n          if (isRequestInput) {\n            const reqInput: Request = input as any\n            const reqOptions: RequestInit = {\n              body: (reqInput as any)._ogBody || reqInput.body,\n            }\n\n            for (const field of requestInputFields) {\n              // @ts-expect-error custom fields\n              reqOptions[field] = reqInput[field]\n            }\n            input = new Request(reqInput.url, reqOptions)\n          } else if (init) {\n            const { _ogBody, body, signal, ...otherInput } =\n              init as RequestInit & { _ogBody?: any }\n            init = {\n              ...otherInput,\n              body: _ogBody || body,\n              signal: isStale ? undefined : signal,\n            }\n          }\n\n          // add metadata to init without editing the original\n          const clonedInit = {\n            ...init,\n            next: { ...init?.next, fetchType: 'origin', fetchIdx },\n          }\n\n          return originFetch(input, clonedInit)\n            .then(async (res) => {\n              if (!isStale && fetchStart) {\n                trackFetchMetric(workStore, span, {\n                  start: fetchStart,\n                  url: fetchUrl,\n                  cacheReason: cacheReasonOverride || cacheReason,\n                  cacheStatus:\n                    finalRevalidate === 0 || cacheReasonOverride\n                      ? 'skip'\n                      : 'miss',\n                  cacheWarning,\n                  status: res.status,\n                  method: clonedInit.method || 'GET',\n                })\n              }\n              if (\n                res.status === 200 &&\n                incrementalCache &&\n                cacheKey &&\n                (isCacheableRevalidate || serverComponentsHmrCache)\n              ) {\n                const normalizedRevalidate =\n                  finalRevalidate >= INFINITE_CACHE\n                    ? CACHE_ONE_YEAR_SECONDS\n                    : finalRevalidate\n\n                const incrementalCacheConfig:\n                  | SetIncrementalFetchCacheContext\n                  | undefined = isCacheableRevalidate\n                  ? {\n                      fetchCache: true,\n                      fetchUrl,\n                      fetchIdx,\n                      tags,\n                      isImplicitBuildTimeCache,\n                    }\n                  : undefined\n\n                switch (workUnitStore?.type) {\n                  case 'prerender':\n                  case 'prerender-client':\n                  case 'validation-client':\n                  case 'prerender-runtime':\n                    return createCachedPrerenderResponse(\n                      res,\n                      cacheKey,\n                      incrementalCacheConfig,\n                      incrementalCache,\n                      normalizedRevalidate,\n                      handleUnlock\n                    )\n                  case 'request':\n                    if (\n                      process.env.NODE_ENV === 'development' &&\n                      workUnitStore.stagedRendering &&\n                      workUnitStore.cacheSignal &&\n                      isCacheableRevalidate\n                    ) {\n                      // We're filling caches for a staged render with an\n                      // explicit cache config, so we need to wait for the\n                      // response to finish instead of streaming. For HMR-only\n                      // caching (no explicit revalidate), we fall through to\n                      // createCachedDynamicResponse which handles streaming\n                      // and abort gracefully.\n                      return createCachedPrerenderResponse(\n                        res,\n                        cacheKey,\n                        incrementalCacheConfig,\n                        incrementalCache,\n                        normalizedRevalidate,\n                        handleUnlock\n                      )\n                    }\n                  // fallthrough\n                  case 'prerender-ppr':\n                  case 'prerender-legacy':\n                  case 'cache':\n                  case 'private-cache':\n                  case 'unstable-cache':\n                  case 'generate-static-params':\n                  case undefined:\n                    return createCachedDynamicResponse(\n                      workStore,\n                      res,\n                      cacheKey,\n                      incrementalCacheConfig,\n                      incrementalCache,\n                      serverComponentsHmrCache,\n                      normalizedRevalidate,\n                      input,\n                      handleUnlock,\n                      getRequestMeta('signal')\n                    )\n                  default:\n                    workUnitStore satisfies never\n                }\n              }\n\n              // we had response that we determined shouldn't be cached so we return it\n              // and don't cache it. This also needs to unlock the cache lock we acquired.\n              await handleUnlock()\n\n              return res\n            })\n            .catch((error) => {\n              handleUnlock()\n              throw error\n            })\n        }\n\n        let cacheReasonOverride\n        let isForegroundRevalidate = false\n        let isHmrRefreshCache = false\n\n        if (cacheKey && incrementalCache) {\n          let cachedFetchData: CachedFetchData | undefined\n\n          if (isHmrRefresh && serverComponentsHmrCache) {\n            cachedFetchData = serverComponentsHmrCache.get(cacheKey)\n            isHmrRefreshCache = true\n          }\n\n          if (isCacheableRevalidate && !cachedFetchData) {\n            handleUnlock = await incrementalCache.lock(cacheKey)\n            const entry = workStore.isOnDemandRevalidate\n              ? null\n              : await incrementalCache.get(cacheKey, {\n                  kind: IncrementalCacheKind.FETCH,\n                  revalidate: finalRevalidate,\n                  fetchUrl,\n                  fetchIdx,\n                  tags,\n                  softTags: implicitTags?.tags,\n                })\n\n            if (hasNoExplicitCacheConfig && workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'validation-client':\n                case 'prerender-runtime':\n                  // We sometimes use the cache to dedupe fetches that do not\n                  // specify a cache configuration. In these cases we want to\n                  // make sure we still exclude them from prerenders if\n                  // cacheComponents is on so we introduce an artificial task boundary\n                  // here.\n                  await getTimeoutBoundary()\n                  break\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n\n            if (entry) {\n              await handleUnlock()\n            } else {\n              // in dev, incremental cache response will be null in case the browser adds `cache-control: no-cache` in the request headers\n              // TODO: it seems like we also hit this after revalidates in dev?\n              cacheReasonOverride = 'cache-control: no-cache (hard refresh)'\n            }\n\n            if (entry?.value && entry.value.kind === CachedRouteKind.FETCH) {\n              // when stale and is revalidating we wait for fresh data\n              // so the revalidated entry has the updated data\n              if (workStore.isStaticGeneration && entry.isStale) {\n                isForegroundRevalidate = true\n              } else {\n                if (entry.isStale) {\n                  workStore.pendingRevalidates ??= {}\n                  if (!workStore.pendingRevalidates[cacheKey]) {\n                    const pendingRevalidate = doOriginalFetch(true)\n                      .then(async (response) => ({\n                        body: await response.arrayBuffer(),\n                        headers: response.headers,\n                        status: response.status,\n                        statusText: response.statusText,\n                      }))\n                      .finally(() => {\n                        workStore.pendingRevalidates ??= {}\n                        delete workStore.pendingRevalidates[cacheKey || '']\n                      })\n\n                    // Attach the empty catch here so we don't get a \"unhandled\n                    // promise rejection\" warning.\n                    pendingRevalidate.catch(console.error)\n\n                    workStore.pendingRevalidates[cacheKey] = pendingRevalidate\n                  }\n                }\n\n                cachedFetchData = entry.value.data\n              }\n            }\n          }\n\n          if (cachedFetchData) {\n            if (fetchStart) {\n              trackFetchMetric(workStore, span, {\n                start: fetchStart,\n                url: fetchUrl,\n                cacheReason,\n                cacheStatus: isHmrRefreshCache ? 'hmr' : 'hit',\n                cacheWarning,\n                status: cachedFetchData.status || 200,\n                method: init?.method || 'GET',\n              })\n            }\n\n            const response = new Response(\n              Buffer.from(cachedFetchData.body, 'base64'),\n              {\n                headers: cachedFetchData.headers,\n                status: cachedFetchData.status,\n              }\n            )\n\n            Object.defineProperty(response, 'url', {\n              value: cachedFetchData.url,\n            })\n\n            return response\n          }\n        }\n\n        if (\n          (workStore.isStaticGeneration ||\n            (process.env.NODE_ENV === 'development' &&\n              process.env.__NEXT_CACHE_COMPONENTS &&\n              workUnitStore &&\n              // eslint-disable-next-line no-restricted-syntax\n              workUnitStore.type === 'request' &&\n              workUnitStore.stagedRendering)) &&\n          init &&\n          typeof init === 'object'\n        ) {\n          const { cache } = init\n\n          // Delete `cache` property as Cloudflare Workers will throw an error\n          if (isEdgeRuntime) delete init.cache\n\n          if (cache === 'no-store') {\n            // If enabled, we should bail out of static generation.\n            if (workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'prerender-runtime':\n                case 'validation-client':\n                  if (cacheSignal) {\n                    cacheSignal.endRead()\n                    cacheSignal = null\n                  }\n                  return makeDynamicHangingPromise<Response>(\n                    workUnitStore.renderSignal,\n                    workStore.route,\n                    'fetch()'\n                  )\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    if (cacheSignal) {\n                      cacheSignal.endRead()\n                      cacheSignal = null\n                    }\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n            markCurrentScopeAsDynamic(\n              workStore,\n              workUnitStore,\n              `no-store fetch ${input} ${workStore.route}`\n            )\n          }\n\n          const hasNextConfig = 'next' in init\n          const { next = {} } = init\n          if (\n            typeof next.revalidate === 'number' &&\n            revalidateStore &&\n            next.revalidate < revalidateStore.revalidate\n          ) {\n            if (next.revalidate === 0) {\n              // If enabled, we should bail out of static generation.\n              if (workUnitStore) {\n                switch (workUnitStore.type) {\n                  case 'prerender':\n                  case 'prerender-client':\n                  case 'prerender-runtime':\n                  case 'validation-client':\n                    return makeDynamicHangingPromise<Response>(\n                      workUnitStore.renderSignal,\n                      workStore.route,\n                      'fetch()'\n                    )\n                  case 'request':\n                    if (\n                      process.env.NODE_ENV === 'development' &&\n                      workUnitStore.stagedRendering\n                    ) {\n                      await workUnitStore.stagedRendering.waitForStage(\n                        RenderStage.Dynamic\n                      )\n                    }\n                    break\n                  case 'cache':\n                  case 'private-cache':\n                  case 'unstable-cache':\n                  case 'prerender-legacy':\n                  case 'prerender-ppr':\n                  case 'generate-static-params':\n                    break\n                  default:\n                    workUnitStore satisfies never\n                }\n              }\n              markCurrentScopeAsDynamic(\n                workStore,\n                workUnitStore,\n                `revalidate: 0 fetch ${input} ${workStore.route}`\n              )\n            }\n\n            if (!workStore.forceStatic || next.revalidate !== 0) {\n              revalidateStore.revalidate = next.revalidate\n            }\n          }\n          if (hasNextConfig) delete init.next\n        }\n\n        // if we are revalidating the whole page via time or on-demand and\n        // the fetch cache entry is stale we should still de-dupe the\n        // origin hit if it's a cache-able entry\n        if (cacheKey && isForegroundRevalidate) {\n          const pendingRevalidateKey = cacheKey\n          workStore.pendingRevalidates ??= {}\n          let pendingRevalidate =\n            workStore.pendingRevalidates[pendingRevalidateKey]\n\n          if (pendingRevalidate) {\n            const revalidatedResult: {\n              body: ArrayBuffer\n              headers: Headers\n              status: number\n              statusText: string\n            } = await pendingRevalidate\n            return new Response(revalidatedResult.body, {\n              headers: revalidatedResult.headers,\n              status: revalidatedResult.status,\n              statusText: revalidatedResult.statusText,\n            })\n          }\n\n          // We used to just resolve the Response and clone it however for\n          // static generation with cacheComponents we need the response to be able to\n          // be resolved in a microtask and cloning the response will never have\n          // a body that can resolve in a microtask in node (as observed through\n          // experimentation) So instead we await the body and then when it is\n          // available we construct manually cloned Response objects with the\n          // body as an ArrayBuffer. This will be resolvable in a microtask\n          // making it compatible with cacheComponents.\n          const pendingResponse = doOriginalFetch(true, cacheReasonOverride)\n            // We're cloning the response using this utility because there\n            // exists a bug in the undici library around response cloning.\n            // See the following pull request for more details:\n            // https://github.com/vercel/next.js/pull/73274\n            .then(cloneResponse)\n\n          pendingRevalidate = pendingResponse\n            .then(async (responses) => {\n              const response = responses[0]\n              return {\n                body: await response.arrayBuffer(),\n                headers: response.headers,\n                status: response.status,\n                statusText: response.statusText,\n              }\n            })\n            .finally(() => {\n              // If the pending revalidate is not present in the store, then\n              // we have nothing to delete.\n              if (!workStore.pendingRevalidates?.[pendingRevalidateKey]) {\n                return\n              }\n\n              delete workStore.pendingRevalidates[pendingRevalidateKey]\n            })\n\n          // Attach the empty catch here so we don't get a \"unhandled promise\n          // rejection\" warning\n          pendingRevalidate.catch(() => {})\n\n          workStore.pendingRevalidates[pendingRevalidateKey] = pendingRevalidate\n\n          return pendingResponse.then((responses) => responses[1])\n        } else {\n          return doOriginalFetch(false, cacheReasonOverride)\n        }\n      }\n    )\n\n    if (cacheSignal) {\n      try {\n        return await result\n      } finally {\n        if (cacheSignal) {\n          cacheSignal.endRead()\n        }\n      }\n    }\n    return result\n  }\n\n  // Attach the necessary properties to the patched fetch function.\n  // We don't use this to determine if the fetch function has been patched,\n  // but for external consumers to determine if the fetch function has been\n  // patched.\n  patched.__nextPatched = true as const\n  patched.__nextGetStaticStore = () => workAsyncStorage\n  patched._nextOriginalFetch = originFetch\n  ;(globalThis as Record<symbol, unknown>)[NEXT_PATCH_SYMBOL] = true\n\n  // Assign the function name also as a name property, so that it's preserved\n  // even when mangling is enabled.\n  Object.defineProperty(patched, 'name', { value: 'fetch', writable: false })\n\n  return patched\n}\n\n// we patch fetch to collect cache information used for\n// determining if a page is static or not\nexport function patchFetch(options: PatchableModule) {\n  // If we've already patched fetch, we should not patch it again.\n  if (isFetchPatched()) return\n\n  // Grab the original fetch function. We'll attach this so we can use it in\n  // the patched fetch function.\n  const original = createDedupeFetch(globalThis.fetch)\n\n  // Set the global fetch to the patched fetch.\n  globalThis.fetch = createPatchedFetcher(original, options)\n}\n\nlet currentTimeoutBoundary: null | Promise<void> = null\nfunction getTimeoutBoundary() {\n  if (!currentTimeoutBoundary) {\n    currentTimeoutBoundary = new Promise((r) => {\n      setTimeout(() => {\n        currentTimeoutBoundary = null\n        r()\n      }, 0)\n    })\n  }\n  return currentTimeoutBoundary\n}\n","import type { Params } from '../request/params'\nimport type { SearchParams } from '../request/search-params'\nimport {\n  getVaryParamsAccumulator,\n  workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\n\n/**\n * Accumulates vary params for a single segment (or for metadata/rootParams).\n *\n * A VaryParamsAccumulator is an `AsyncIterable<string>` that can be serialized\n * by React Flight. As params are accessed during render, each newly-seen param\n * name is `add`ed, which yields it into the Flight stream immediately. After\n * rendering, call `close()` (via `finishAccumulatingVaryParams`) to end the\n * iteration.\n *\n * Because each access is flushed into the stream as it happens, the set of\n * accessed params is built up incrementally, with no step at the end of the\n * render that has to run for the client to read anything. If the prerender is\n * aborted by sync I/O, the params yielded before the abort are already in the\n * stream — and they're exactly the params the partial response depends on.\n * This mirrors how `StaleTimeIterable` works (see stale-time.ts).\n *\n * Each name is emitted at most once: `add` dedupes against the set of\n * already-yielded names, so the stream never contains a duplicate.\n *\n * NOTE: like `StaleTimeIterable`, this supports a single concurrent iteration\n * (Flight iterates it exactly once). The shared empty singleton below is the\n * only instance referenced by more than one segment, and it only ever yields\n * \"done\", so concurrent iteration of it is safe.\n */\nexport class VaryParamsAccumulator implements AsyncIterable<string> {\n  private _resolve: ((result: IteratorResult<string>) => void) | null = null\n  private _done = false\n  private _buffer: string[] = []\n  // The set of param names already yielded. Doubles as the dedupe guard so the\n  // same name is never emitted twice.\n  private _seen: Set<string> = new Set()\n\n  /**\n   * Records that a param was accessed. Yields the name into the stream the\n   * first time it's seen; subsequent accesses of the same name are no-ops.\n   */\n  add(paramName: string): void {\n    if (this._done || this._seen.has(paramName)) {\n      return\n    }\n    this._seen.add(paramName)\n    if (this._resolve !== null) {\n      this._resolve({ value: paramName, done: false })\n      this._resolve = null\n    } else {\n      this._buffer.push(paramName)\n    }\n  }\n\n  /** Ends the iteration. Best-effort: if skipped (e.g. on a sync-I/O abort),\n   * the consumer simply reads the params yielded so far. */\n  close(): void {\n    if (this._done) {\n      return\n    }\n    this._done = true\n    if (this._resolve !== null) {\n      this._resolve({ value: undefined, done: true })\n      this._resolve = null\n    }\n  }\n\n  [Symbol.asyncIterator](): AsyncIterator<string> {\n    return {\n      next: () => {\n        if (this._buffer.length > 0) {\n          return Promise.resolve({ value: this._buffer.shift()!, done: false })\n        }\n        if (this._done) {\n          return Promise.resolve({ value: undefined, done: true })\n        }\n        return new Promise<IteratorResult<string>>((resolve) => {\n          this._resolve = resolve\n        })\n      },\n    }\n  }\n}\n\n/**\n * A mutable data structure for accumulating per-segment vary params for an\n * entire server response. It's only used during prerenders. It describes\n * metadata about the response itself.\n */\nexport type ResponseVaryParamsAccumulator = {\n  /** Vary params accumulator for metadata/viewport (the \"head\" segment) */\n  head: VaryParamsAccumulator\n  /** Vary params accumulator for root params access */\n  rootParams: VaryParamsAccumulator\n  /** Vary params accumulators for each route segment */\n  segments: Set<VaryParamsAccumulator>\n}\n\n/**\n * A singleton accumulator that's already closed with no params. Use this for\n * segments where we know upfront that no params will be accessed, such as\n * client components or segments without user code.\n *\n * Benefits:\n * - No need to accumulate or close later\n * - Resilient: reads as an empty set even if other tracking fails\n * - Memory efficient: reuses the same object\n *\n * It's never added to `ResponseVaryParamsAccumulator.segments` (callers pass it\n * directly), so `finishAccumulatingVaryParams` doesn't touch it.\n */\nexport const emptyVaryParamsAccumulator: VaryParamsAccumulator =\n  new VaryParamsAccumulator()\nemptyVaryParamsAccumulator.close()\n\nexport function createResponseVaryParamsAccumulator(): ResponseVaryParamsAccumulator {\n  // Create the head and rootParams accumulators as top-level fields.\n  // Segment accumulators are added to the segments set as they are created.\n  const head = new VaryParamsAccumulator()\n  const rootParams = new VaryParamsAccumulator()\n  const segments = new Set<VaryParamsAccumulator>()\n\n  return {\n    head,\n    rootParams,\n    segments,\n  }\n}\n\n/**\n * Allocates a new VaryParamsAccumulator and adds it to the response accumulator\n * associated with the current WorkUnitStore.\n *\n * Returns an iterable that yields the segment's vary params as they're\n * accessed. The iterable can be passed directly to React Flight for\n * serialization.\n */\nexport function createVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (!workUnitStore) {\n    return null\n  }\n  const responseAccumulator = getVaryParamsAccumulator(workUnitStore)\n  if (!responseAccumulator) {\n    return null\n  }\n  const accumulator = new VaryParamsAccumulator()\n  responseAccumulator.segments.add(accumulator)\n  return accumulator\n}\n\nexport function getMetadataVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (!workUnitStore) {\n    return null\n  }\n  return getVaryParamsAccumulator(workUnitStore)?.head ?? null\n}\n\n// The metadata and viewport are always delivered in a single payload, so they\n// don't need to be tracked separately. This may change in the future, but for\n// now this is just an alias.\nexport const getViewportVaryParamsAccumulator = getMetadataVaryParamsAccumulator\n\n/**\n * Returns the response-level root params iterable for serialization. Root\n * params are emitted once at the top level (not folded into every segment);\n * the client unions them into each segment's set.\n */\nexport function getRootParamsVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (!workUnitStore) {\n    return null\n  }\n  return getVaryParamsAccumulator(workUnitStore)?.rootParams ?? null\n}\n\n/**\n * Records that a param was accessed. Adds the param name to the accumulator.\n */\nexport function accumulateVaryParam(\n  accumulator: VaryParamsAccumulator,\n  paramName: string\n): void {\n  accumulator.add(paramName)\n}\n\n/**\n * Records a root param access.\n */\nexport function accumulateRootVaryParam(paramName: string): void {\n  const rootParamsAccumulator = getRootParamsVaryParamsAccumulator()\n  if (rootParamsAccumulator !== null) {\n    accumulateVaryParam(rootParamsAccumulator, paramName)\n  }\n}\n\nexport function createVaryingParams(\n  accumulator: VaryParamsAccumulator,\n  originalParamsObject: Params,\n  optionalCatchAllParamName: string | null\n): Params {\n  if (optionalCatchAllParamName !== null) {\n    // When there's an optional catch-all param with no value (e.g.,\n    // [[...slug]] at /), the param doesn't exist as a property on the params\n    // object. Use a Proxy to track all param access — both existing params\n    // and the missing optional param — including enumeration patterns like\n    // Object.keys(), spread, for...in, and `in` checks.\n    return new Proxy(originalParamsObject, {\n      get(target, prop, receiver) {\n        if (typeof prop === 'string') {\n          if (\n            prop === optionalCatchAllParamName ||\n            Object.prototype.hasOwnProperty.call(target, prop)\n          ) {\n            accumulateVaryParam(accumulator, prop)\n          }\n        }\n        return Reflect.get(target, prop, receiver)\n      },\n      has(target, prop) {\n        if (prop === optionalCatchAllParamName) {\n          accumulateVaryParam(accumulator, optionalCatchAllParamName)\n        }\n        return Reflect.has(target, prop)\n      },\n      ownKeys(target) {\n        // Enumerating the params object means the user's code may depend on\n        // which params are present, so conservatively track the optional\n        // param as accessed.\n        accumulateVaryParam(accumulator, optionalCatchAllParamName)\n        return Reflect.ownKeys(target)\n      },\n    })\n  }\n\n  // When there's no optional catch-all, all params exist as properties on the\n  // object, so we can use defineProperty getters instead of a Proxy. This is\n  // faster because the engine can optimize property access on regular objects\n  // more aggressively than Proxy trap calls.\n  const underlyingParamsWithVarying: Params = {}\n  for (const paramName in originalParamsObject) {\n    Object.defineProperty(underlyingParamsWithVarying, paramName, {\n      get() {\n        accumulateVaryParam(accumulator, paramName)\n        return originalParamsObject[paramName]\n      },\n      enumerable: true,\n    })\n  }\n  return underlyingParamsWithVarying\n}\n\nexport function createVaryingSearchParams(\n  accumulator: VaryParamsAccumulator,\n  originalSearchParamsObject: SearchParams\n): SearchParams {\n  // Search params have no fixed schema, so any access — missing-key reads, `in`\n  // checks, or enumeration — must register as varying. A Proxy is required\n  // (rather than per-property getters) so that enumeration of an empty\n  // searchParams object still triggers a vary. All accesses bucket into the\n  // single sentinel '?'; the segment is keyed by the whole query string.\n  // TODO: Split into per-param tracking if the cache key evolves.\n  return new Proxy(originalSearchParamsObject, {\n    get(target, prop, receiver) {\n      if (typeof prop === 'string') {\n        accumulateVaryParam(accumulator, '?')\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n    has(target, prop) {\n      if (typeof prop === 'string') {\n        accumulateVaryParam(accumulator, '?')\n      }\n      return Reflect.has(target, prop)\n    },\n    ownKeys(target) {\n      accumulateVaryParam(accumulator, '?')\n      return Reflect.ownKeys(target)\n    },\n  })\n}\n\n/**\n * Closes all accumulators in a ResponseVaryParamsAccumulator, ending their\n * iterables. Call this after rendering is complete.\n *\n * This does NOT merge root params into each segment — root params are\n * serialized separately (at the top level of the response) and unioned in by\n * the client. And it's best-effort: if it's skipped because the render was\n * aborted by sync I/O, the consumer just reads the params each iterable yielded\n * before the abort.\n *\n * If we can't track vary params (e.g., legacy prerender), simply don't call\n * this function - the client treats a missing iterable as \"unknown\" vary\n * params.\n */\nexport function finishAccumulatingVaryParams(\n  responseAccumulator: ResponseVaryParamsAccumulator\n): void {\n  responseAccumulator.head.close()\n  responseAccumulator.rootParams.close()\n  for (const segmentAccumulator of responseAccumulator.segments) {\n    segmentAccumulator.close()\n  }\n}\n","import type { ComponentType } from 'react'\nimport type {\n  CacheNodeSeedData,\n  LoadingModuleData,\n} from '../../shared/lib/app-router-types'\nimport type { PreloadCallbacks } from './types'\nimport {\n  isClientReference,\n  isUseCacheFunction,\n} from '../../lib/client-and-server-references'\nimport { getLayoutOrPageModule } from '../lib/app-dir-module'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport { interopDefault } from './interop-default'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport type { AppRenderContext, GetDynamicParamFromSegment } from './app-render'\nimport { createComponentStylesAndScripts } from './create-component-styles-and-scripts'\nimport { getLayerAssets } from './get-layer-assets'\nimport { hasLoadingComponentInTree } from './has-loading-component-in-tree'\nimport { validateRevalidate } from '../lib/patch-fetch'\nimport { PARALLEL_ROUTE_DEFAULT_PATH } from '../../client/components/builtin/default'\nimport { getTracer } from '../lib/trace/tracer'\nimport { NextNodeServerSpan } from '../lib/trace/constants'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport type { Params } from '../request/params'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport {\n  createVaryParamsAccumulator,\n  emptyVaryParamsAccumulator,\n  type VaryParamsAccumulator,\n} from './vary-params'\nimport type {\n  UseCacheLayoutProps,\n  UseCachePageProps,\n} from '../use-cache/use-cache-wrapper'\nimport { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\nimport {\n  BOUNDARY_PREFIX,\n  BOUNDARY_SUFFIX,\n  BUILTIN_PREFIX,\n  getConventionPathByType,\n  isNextjsBuiltinFilePath,\n} from './segment-explorer-path'\n\n/**\n * Use the provided loader tree to create the React Component tree.\n */\n// TODO convert these arguments to non-object form. the entrypoint doesn't need most of them\nexport function createComponentTree(props: {\n  loaderTree: LoaderTree\n  parentParams: Params\n  parentOptionalCatchAllParamName: string | null\n  parentRuntimePrefetchable: false\n  rootLayoutIncluded: boolean\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  missingSlots?: Set<string>\n  preloadCallbacks: PreloadCallbacks\n  authInterrupts: boolean\n  MetadataOutlet: ComponentType\n}): Promise<CacheNodeSeedData> {\n  return getTracer().trace(\n    NextNodeServerSpan.createComponentTree,\n    {\n      spanName: 'build component tree',\n    },\n    () => createComponentTreeInternal(props, true)\n  )\n}\n\nfunction errorMissingDefaultExport(\n  pagePath: string,\n  convention: string\n): never {\n  const normalizedPagePath = pagePath === '/' ? '' : pagePath\n  throw new Error(\n    `The default export is not a React Component in \"${normalizedPagePath}/${convention}\"`\n  )\n}\n\nconst cacheNodeKey = 'c'\n\nasync function createComponentTreeInternal(\n  {\n    loaderTree: tree,\n    parentParams,\n    parentOptionalCatchAllParamName,\n    rootLayoutIncluded,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    ctx,\n    missingSlots,\n    preloadCallbacks,\n    authInterrupts,\n    MetadataOutlet,\n  }: {\n    loaderTree: LoaderTree\n    parentParams: Params\n    parentOptionalCatchAllParamName: string | null\n    rootLayoutIncluded: boolean\n    injectedCSS: Set<string>\n    injectedJS: Set<string>\n    injectedFontPreloadTags: Set<string>\n    ctx: AppRenderContext\n    missingSlots?: Set<string>\n    preloadCallbacks: PreloadCallbacks\n    authInterrupts: boolean\n    MetadataOutlet: ComponentType | null\n  },\n  isRoot: boolean\n): Promise<CacheNodeSeedData> {\n  const {\n    renderOpts: { nextConfigOutput, experimental, cacheComponents },\n    workStore,\n    componentMod: {\n      createElement,\n      Fragment,\n      SegmentViewNode,\n      HTTPAccessFallbackBoundary,\n      LayoutRouter,\n      RenderFromTemplateContext,\n      ClientPageRoot,\n      ClientSegmentRoot,\n      createServerSearchParamsForServerPage,\n      createPrerenderSearchParamsForClientPage,\n      createServerParamsForServerSegment,\n      createPrerenderParamsForClientSegment,\n      serverHooks: { DynamicServerError },\n      Postpone,\n    },\n    pagePath,\n    getDynamicParamFromSegment,\n    isPrefetch,\n    query,\n  } = ctx\n\n  const { page, conventionPath, segment, modules, parallelRoutes } =\n    parseLoaderTree(tree)\n\n  const {\n    layout,\n    template,\n    error,\n    loading,\n    'not-found': notFound,\n    forbidden,\n    unauthorized,\n  } = modules\n\n  const injectedCSSWithCurrentLayout = new Set(injectedCSS)\n  const injectedJSWithCurrentLayout = new Set(injectedJS)\n  const injectedFontPreloadTagsWithCurrentLayout = new Set(\n    injectedFontPreloadTags\n  )\n\n  const layerAssets = getLayerAssets({\n    preloadCallbacks,\n    ctx,\n    layoutOrPagePath: conventionPath,\n    injectedCSS: injectedCSSWithCurrentLayout,\n    injectedJS: injectedJSWithCurrentLayout,\n    injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n  })\n\n  const [Template, templateStyles, templateScripts] = template\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: template[1],\n        getComponent: template[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : [Fragment]\n\n  const [ErrorComponent, errorStyles, errorScripts] = error\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: error[1],\n        getComponent: error[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const [Loading, loadingStyles, loadingScripts] = loading\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: loading[1],\n        getComponent: loading[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const isLayout = typeof layout !== 'undefined'\n  const isPage = typeof page !== 'undefined'\n  const { mod: layoutOrPageMod, modType } = await getTracer().trace(\n    NextNodeServerSpan.getLayoutOrPageModule,\n    {\n      hideSpan: !(isLayout || isPage),\n      spanName: 'resolve segment modules',\n      attributes: {\n        'next.segment': segment,\n      },\n    },\n    () => getLayoutOrPageModule(tree)\n  )\n\n  /**\n   * Checks if the current segment is a root layout.\n   */\n  const rootLayoutAtThisLevel = isLayout && !rootLayoutIncluded\n  /**\n   * Checks if the current segment or any level above it has a root layout.\n   */\n  const rootLayoutIncludedAtThisLevelOrAbove =\n    rootLayoutIncluded || rootLayoutAtThisLevel\n\n  const [NotFound, notFoundStyles] = notFound\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: notFound[1],\n        getComponent: notFound[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const [Forbidden, forbiddenStyles] =\n    authInterrupts && forbidden\n      ? await createComponentStylesAndScripts({\n          ctx,\n          filePath: forbidden[1],\n          getComponent: forbidden[0],\n          injectedCSS: injectedCSSWithCurrentLayout,\n          injectedJS: injectedJSWithCurrentLayout,\n        })\n      : []\n\n  const [Unauthorized, unauthorizedStyles] =\n    authInterrupts && unauthorized\n      ? await createComponentStylesAndScripts({\n          ctx,\n          filePath: unauthorized[1],\n          getComponent: unauthorized[0],\n          injectedCSS: injectedCSSWithCurrentLayout,\n          injectedJS: injectedJSWithCurrentLayout,\n        })\n      : []\n\n  let dynamic = layoutOrPageMod?.dynamic\n\n  if (nextConfigOutput === 'export') {\n    if (!dynamic || dynamic === 'auto') {\n      dynamic = 'error'\n    } else if (dynamic === 'force-dynamic') {\n      // force-dynamic is always incompatible with 'export'. We must interrupt the build\n      throw new StaticGenBailoutError(\n        `Page with \\`dynamic = \"force-dynamic\"\\` couldn't be exported. \\`output: \"export\"\\` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports`\n      )\n    }\n  }\n\n  if (typeof dynamic === 'string') {\n    // the nested most config wins so we only force-static\n    // if it's configured above any parent that configured\n    // otherwise\n    if (dynamic === 'error') {\n      workStore.dynamicShouldError = true\n    } else if (dynamic === 'force-dynamic') {\n      workStore.forceDynamic = true\n\n      // TODO: (PPR) remove this bailout once PPR is the default\n      if (workStore.isStaticGeneration && !experimental.isRoutePPREnabled) {\n        // If the postpone API isn't available, we can't postpone the render and\n        // therefore we can't use the dynamic API.\n        const err = new DynamicServerError(\n          `Page with \\`dynamic = \"force-dynamic\"\\` won't be rendered statically.`\n        )\n        workStore.dynamicUsageDescription = err.message\n        workStore.dynamicUsageStack = err.stack\n        throw err\n      }\n    } else {\n      workStore.dynamicShouldError = false\n      workStore.forceStatic = dynamic === 'force-static'\n    }\n  }\n\n  if (typeof layoutOrPageMod?.fetchCache === 'string') {\n    workStore.fetchCache = layoutOrPageMod?.fetchCache\n  }\n\n  if (typeof layoutOrPageMod?.revalidate !== 'undefined') {\n    validateRevalidate(layoutOrPageMod?.revalidate, workStore.route)\n  }\n\n  if (typeof layoutOrPageMod?.revalidate === 'number') {\n    const defaultRevalidate = layoutOrPageMod.revalidate as number\n\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (workUnitStore) {\n      switch (workUnitStore.type) {\n        case 'prerender':\n        case 'prerender-runtime':\n        case 'prerender-legacy':\n        case 'prerender-ppr':\n          if (workUnitStore.revalidate > defaultRevalidate) {\n            workUnitStore.revalidate = defaultRevalidate\n          }\n          break\n        case 'request':\n          // A request store doesn't have a revalidate property.\n          break\n        // createComponentTree is not called for these stores:\n        case 'cache':\n        case 'private-cache':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          break\n        default:\n          workUnitStore satisfies never\n      }\n    }\n\n    if (\n      !workStore.forceStatic &&\n      workStore.isStaticGeneration &&\n      defaultRevalidate === 0 &&\n      // If the postpone API isn't available, we can't postpone the render and\n      // therefore we can't use the dynamic API.\n      !experimental.isRoutePPREnabled\n    ) {\n      const dynamicUsageDescription = `revalidate: 0 configured ${segment}`\n      workStore.dynamicUsageDescription = dynamicUsageDescription\n\n      throw new DynamicServerError(dynamicUsageDescription)\n    }\n  }\n\n  // Read unstable_dynamicStaleTime from page modules (not layouts) and track it on\n  // the store's stale field. This affects the segment cache stale time via\n  // the StaleTimeIterable.\n  if (\n    isPage &&\n    typeof layoutOrPageMod?.unstable_dynamicStaleTime === 'number'\n  ) {\n    const pageStaleTime = layoutOrPageMod.unstable_dynamicStaleTime\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (workUnitStore) {\n      switch (workUnitStore.type) {\n        case 'prerender':\n        case 'prerender-runtime':\n        case 'prerender-legacy':\n        case 'prerender-ppr':\n          if (workUnitStore.stale > pageStaleTime) {\n            workUnitStore.stale = pageStaleTime\n          }\n          break\n        case 'request':\n          if (\n            workUnitStore.stale === undefined ||\n            workUnitStore.stale > pageStaleTime\n          ) {\n            workUnitStore.stale = pageStaleTime\n          }\n          break\n        // createComponentTree is not called for these stores:\n        case 'cache':\n        case 'private-cache':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          break\n        default:\n          workUnitStore satisfies never\n      }\n    }\n  }\n\n  const isStaticGeneration = workStore.isStaticGeneration\n\n  // Assume the segment we're rendering contains only partial data if PPR is\n  // enabled and this is a statically generated response. This is used by the\n  // client Segment Cache after a prefetch to determine if it can skip the\n  // second request to fill in the dynamic data.\n  //\n  // It's OK for this to be `true` when the data is actually fully static, but\n  // it's not OK for this to be `false` when the data possibly contains holes.\n  // Although the value here is overly pessimistic, for prefetches, it will be\n  // replaced by a more specific value when the data is later processed into\n  // per-segment responses (see collect-segment-data.tsx)\n  //\n  // For dynamic requests, this must always be `false` because dynamic responses\n  // are never partial.\n  const isPossiblyPartialResponse =\n    isStaticGeneration && experimental.isRoutePPREnabled === true\n\n  const LayoutOrPage: ComponentType<any> | undefined = layoutOrPageMod\n    ? interopDefault(layoutOrPageMod)\n    : undefined\n\n  /**\n   * The React Component to render.\n   */\n  let MaybeComponent = LayoutOrPage\n\n  if (process.env.NODE_ENV === 'development' || isStaticGeneration) {\n    const { isValidElementType } =\n      require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n    if (\n      typeof MaybeComponent !== 'undefined' &&\n      !isValidElementType(MaybeComponent)\n    ) {\n      errorMissingDefaultExport(pagePath, modType ?? 'page')\n    }\n\n    if (\n      typeof ErrorComponent !== 'undefined' &&\n      !isValidElementType(ErrorComponent)\n    ) {\n      errorMissingDefaultExport(pagePath, 'error')\n    }\n\n    if (typeof Loading !== 'undefined' && !isValidElementType(Loading)) {\n      errorMissingDefaultExport(pagePath, 'loading')\n    }\n\n    if (typeof NotFound !== 'undefined' && !isValidElementType(NotFound)) {\n      errorMissingDefaultExport(pagePath, 'not-found')\n    }\n\n    if (typeof Forbidden !== 'undefined' && !isValidElementType(Forbidden)) {\n      errorMissingDefaultExport(pagePath, 'forbidden')\n    }\n\n    if (\n      typeof Unauthorized !== 'undefined' &&\n      !isValidElementType(Unauthorized)\n    ) {\n      errorMissingDefaultExport(pagePath, 'unauthorized')\n    }\n  }\n\n  // Handle dynamic segment params.\n  const segmentParam = getDynamicParamFromSegment(tree)\n\n  // Create object holding the parent params and current params\n  let currentParams: Params = parentParams\n  if (segmentParam && segmentParam.value !== null) {\n    currentParams = {\n      ...parentParams,\n      [segmentParam.param]: segmentParam.value,\n    }\n  }\n\n  // Track optional catch-all params with no value (e.g., [[...slug]] at /).\n  // These params won't exist as properties on the params object, so vary\n  // params tracking needs to use a Proxy to detect access. We propagate this\n  // through the tree so that child segments (like __PAGE__) also know about\n  // the missing param. In practice, this only gets passed down one level —\n  // from the optional catch-all layout segment to the page segment — so it's\n  // always very close to the leaf of the tree.\n  const optionalCatchAllParamName: string | null =\n    segmentParam?.type === 'oc' && segmentParam.value === null\n      ? segmentParam.param\n      : parentOptionalCatchAllParamName\n\n  // Resolve the segment param\n  const isSegmentViewEnabled = !!process.env.__NEXT_DEV_SERVER\n  const dir =\n    (process.env.NEXT_RUNTIME === 'edge'\n      ? process.env.__NEXT_EDGE_PROJECT_DIR\n      : ctx.renderOpts.dir) || ''\n\n  const [notFoundElement, notFoundFilePath] =\n    await createBoundaryConventionElement({\n      ctx,\n      conventionName: 'not-found',\n      Component: NotFound,\n      styles: notFoundStyles,\n      tree,\n    })\n\n  const [forbiddenElement] = await createBoundaryConventionElement({\n    ctx,\n    conventionName: 'forbidden',\n    Component: Forbidden,\n    styles: forbiddenStyles,\n    tree,\n  })\n\n  const [unauthorizedElement] = await createBoundaryConventionElement({\n    ctx,\n    conventionName: 'unauthorized',\n    Component: Unauthorized,\n    styles: unauthorizedStyles,\n    tree,\n  })\n\n  // TODO: Combine this `map` traversal with the loop below that turns the array\n  // into an object.\n  const parallelRouteMap = await Promise.all(\n    Object.keys(parallelRoutes).map(\n      async (\n        parallelRouteKey\n      ): Promise<[string, React.ReactNode, CacheNodeSeedData | null]> => {\n        const isChildrenRouteKey = parallelRouteKey === 'children'\n        const parallelRoute = parallelRoutes[parallelRouteKey]\n\n        const notFoundComponent = isChildrenRouteKey\n          ? notFoundElement\n          : undefined\n\n        const forbiddenComponent = isChildrenRouteKey\n          ? forbiddenElement\n          : undefined\n\n        const unauthorizedComponent = isChildrenRouteKey\n          ? unauthorizedElement\n          : undefined\n\n        // if we're prefetching and that there's a Loading component, we bail out\n        // otherwise we keep rendering for the prefetch.\n        // We also want to bail out if there's no Loading component in the tree.\n        let childCacheNodeSeedData: CacheNodeSeedData | null = null\n\n        if (\n          // Before PPR, the way instant navigations work in Next.js is we\n          // prefetch everything up to the first route segment that defines a\n          // loading.tsx boundary. (We do the same if there's no loading\n          // boundary in the entire tree, because we don't want to prefetch too\n          // much) The rest of the tree is deferred until the actual navigation.\n          // It does not take into account whether the data is dynamic — even if\n          // the tree is completely static, it will still defer everything\n          // inside the loading boundary.\n          //\n          // This behavior predates PPR and is only relevant if the\n          // PPR flag is not enabled.\n          isPrefetch &&\n          (Loading || !hasLoadingComponentInTree(parallelRoute)) &&\n          // The approach with PPR is different — loading.tsx behaves like a\n          // regular Suspense boundary and has no special behavior.\n          //\n          // With PPR, we prefetch as deeply as possible, and only defer when\n          // dynamic data is accessed. If so, we only defer the nearest parent\n          // Suspense boundary of the dynamic data access, regardless of whether\n          // the boundary is defined by loading.tsx or a normal <Suspense>\n          // component in userspace.\n          //\n          // NOTE: In practice this usually means we'll end up prefetching more\n          // than we were before PPR, which may or may not be considered a\n          // performance regression by some apps. The plan is to address this\n          // before General Availability of PPR by introducing granular\n          // per-segment fetching, so we can reuse as much of the tree as\n          // possible during both prefetches and dynamic navigations. But during\n          // the beta period, we should be clear about this trade off in our\n          // communications.\n          !experimental.isRoutePPREnabled\n        ) {\n          // Don't prefetch this child. This will trigger a lazy fetch by the\n          // client router.\n        } else {\n          // Create the child component\n\n          if (process.env.NODE_ENV === 'development' && missingSlots) {\n            // When we detect the default fallback (which triggers a 404), we collect the missing slots\n            // to provide more helpful debug information during development mode.\n            const parsedTree = parseLoaderTree(parallelRoute)\n            if (\n              parsedTree.conventionPath?.endsWith(PARALLEL_ROUTE_DEFAULT_PATH)\n            ) {\n              missingSlots.add(parallelRouteKey)\n            }\n          }\n\n          if (childCacheNodeSeedData === null) {\n            const seedData = await createComponentTreeInternal(\n              {\n                loaderTree: parallelRoute,\n                parentParams: currentParams,\n                parentOptionalCatchAllParamName: optionalCatchAllParamName,\n                rootLayoutIncluded: rootLayoutIncludedAtThisLevelOrAbove,\n                injectedCSS: injectedCSSWithCurrentLayout,\n                injectedJS: injectedJSWithCurrentLayout,\n                injectedFontPreloadTags:\n                  injectedFontPreloadTagsWithCurrentLayout,\n                ctx,\n                missingSlots,\n                preloadCallbacks,\n                authInterrupts,\n                // `StreamingMetadataOutlet` is used to conditionally throw. In the case of parallel routes we will have more than one page\n                // but we only want to throw on the first one.\n                MetadataOutlet: isChildrenRouteKey ? MetadataOutlet : null,\n              },\n              false\n            )\n\n            childCacheNodeSeedData = seedData\n          }\n        }\n\n        const templateNode = createElement(\n          Template,\n          null,\n          createElement(RenderFromTemplateContext, null)\n        )\n\n        const templateFilePath = getConventionPathByType(tree, dir, 'template')\n        const errorFilePath = getConventionPathByType(tree, dir, 'error')\n        const loadingFilePath = getConventionPathByType(tree, dir, 'loading')\n        const globalErrorFilePath = isRoot\n          ? getConventionPathByType(tree, dir, 'global-error')\n          : undefined\n\n        const wrappedErrorStyles =\n          isSegmentViewEnabled && errorFilePath\n            ? createElement(\n                SegmentViewNode,\n                {\n                  type: 'error',\n                  pagePath: errorFilePath,\n                },\n                errorStyles\n              )\n            : errorStyles\n\n        // Add a suffix to avoid conflict with the segment view node representing rendered file.\n        // existence: not-found.tsx@boundary\n        // rendered: not-found.tsx\n        const fileNameSuffix = BOUNDARY_SUFFIX\n        const segmentViewBoundaries = isSegmentViewEnabled\n          ? createElement(\n              Fragment,\n              null,\n              notFoundFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}not-found`,\n                  pagePath: notFoundFilePath + fileNameSuffix,\n                }),\n              loadingFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}loading`,\n                  pagePath: loadingFilePath + fileNameSuffix,\n                }),\n              errorFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}error`,\n                  pagePath: errorFilePath + fileNameSuffix,\n                }),\n              globalErrorFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}global-error`,\n                  pagePath: isNextjsBuiltinFilePath(globalErrorFilePath)\n                    ? `${BUILTIN_PREFIX}global-error.js${fileNameSuffix}`\n                    : globalErrorFilePath,\n                })\n            )\n          : null\n\n        return [\n          parallelRouteKey,\n          createElement(LayoutRouter, {\n            parallelRouterKey: parallelRouteKey,\n            error: ErrorComponent,\n            errorStyles: wrappedErrorStyles,\n            errorScripts: errorScripts,\n            template:\n              isSegmentViewEnabled && templateFilePath\n                ? createElement(\n                    SegmentViewNode,\n                    {\n                      type: 'template',\n                      pagePath: templateFilePath,\n                    },\n                    templateNode\n                  )\n                : templateNode,\n            templateStyles: templateStyles,\n            templateScripts: templateScripts,\n            notFound: notFoundComponent,\n            forbidden: forbiddenComponent,\n            unauthorized: unauthorizedComponent,\n            ...(isSegmentViewEnabled && {\n              segmentViewBoundaries,\n            }),\n          }),\n          childCacheNodeSeedData,\n        ]\n      }\n    )\n  )\n\n  // Convert the parallel route map into an object after all promises have been resolved.\n  let parallelRouteProps: { [key: string]: React.ReactNode } = {}\n  let parallelRouteCacheNodeSeedData: {\n    [key: string]: CacheNodeSeedData | null\n  } = {}\n  for (const parallelRoute of parallelRouteMap) {\n    const [parallelRouteKey, parallelRouteProp, flightData] = parallelRoute\n    parallelRouteProps[parallelRouteKey] = parallelRouteProp\n    parallelRouteCacheNodeSeedData[parallelRouteKey] = flightData\n  }\n\n  let loadingElement = Loading\n    ? createElement(Loading, {\n        key: 'l',\n      })\n    : null\n  const loadingFilePath = getConventionPathByType(tree, dir, 'loading')\n  if (isSegmentViewEnabled && loadingElement) {\n    if (loadingFilePath) {\n      loadingElement = createElement(\n        SegmentViewNode,\n        {\n          key: cacheNodeKey + '-loading',\n          type: 'loading',\n          pagePath: loadingFilePath,\n        },\n        loadingElement\n      )\n    }\n  }\n\n  const loadingData: LoadingModuleData = loadingElement\n    ? [loadingElement, loadingStyles, loadingScripts]\n    : null\n\n  // When the segment does not have a layout or page we still have to add the layout router to ensure the path holds the loading component\n  if (!MaybeComponent) {\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        layerAssets,\n        parallelRouteProps.children\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n\n      // No user-provided component, so no params will be accessed. Use the\n      // pre-resolved empty tracker.\n      emptyVaryParamsAccumulator\n    )\n  }\n\n  const Component = MaybeComponent\n  // If force-dynamic is used and the current render supports postponing, we\n  // replace it with a node that will postpone the render. This ensures that the\n  // postpone is invoked during the react render phase and not during the next\n  // render phase.\n  // @TODO this does not actually do what it seems like it would or should do. The idea is that\n  // if we are rendering in a force-dynamic mode and we can postpone we should only make the segments\n  // that ask for force-dynamic to be dynamic, allowing other segments to still prerender. However\n  // because this comes after the children traversal and the static generation store is mutated every segment\n  // along the parent path of a force-dynamic segment will hit this condition effectively making the entire\n  // render force-dynamic. We should refactor this function so that we can correctly track which segments\n  // need to be dynamic\n  if (\n    workStore.isStaticGeneration &&\n    workStore.forceDynamic &&\n    experimental.isRoutePPREnabled\n  ) {\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        createElement(Postpone, {\n          reason: 'dynamic = \"force-dynamic\" was used',\n          route: workStore.route,\n        }),\n        layerAssets\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      true,\n\n      // force-dynamic postpones without rendering the component, so no params\n      // are accessed. The vary params are empty.\n      emptyVaryParamsAccumulator\n    )\n  }\n\n  const isClientComponent = isClientReference(layoutOrPageMod)\n\n  const varyParamsAccumulator =\n    isClientComponent && cacheComponents\n      ? // Client components with Cache Components enabled don't receive params\n        // from the server, so they have an empty vary params set.\n        emptyVaryParamsAccumulator\n      : createVaryParamsAccumulator()\n\n  if (\n    process.env.NODE_ENV === 'development' &&\n    'params' in parallelRouteProps\n  ) {\n    // @TODO consider making this an error and running the check in build as well\n    console.error(\n      `\"params\" is a reserved prop in Layouts and Pages and cannot be used as the name of a parallel route in ${segment}`\n    )\n  }\n\n  if (isPage) {\n    const PageComponent = Component\n\n    // Assign searchParams to props if this is a page\n    let pageElement: React.ReactNode\n    if (isClientComponent) {\n      if (cacheComponents) {\n        // Params are omitted when Cache Components is enabled\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: null,\n        })\n      } else if (isStaticGeneration) {\n        const promiseOfParams =\n          createPrerenderParamsForClientSegment(currentParams)\n        const promiseOfSearchParams = createPrerenderSearchParamsForClientPage()\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: {\n            searchParams: query,\n            params: currentParams,\n            promises: [promiseOfSearchParams, promiseOfParams],\n          },\n        })\n      } else {\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: {\n            searchParams: query,\n            params: currentParams,\n            promises: null,\n          },\n        })\n      }\n    } else {\n      // If we are passing params to a server component Page we need to track\n      // their usage in case the current render mode tracks dynamic API usage.\n      const params = createServerParamsForServerSegment(\n        currentParams,\n        optionalCatchAllParamName,\n        varyParamsAccumulator\n      )\n\n      // If we are passing searchParams to a server component Page we need to\n      // track their usage in case the current render mode tracks dynamic API\n      // usage.\n      let searchParams = createServerSearchParamsForServerPage(\n        query,\n        varyParamsAccumulator\n      )\n\n      if (isUseCacheFunction(PageComponent)) {\n        const UseCachePageComponent: ComponentType<UseCachePageProps> =\n          PageComponent\n\n        pageElement = createElement(UseCachePageComponent, {\n          params: params,\n          searchParams: searchParams,\n          $$isPage: true,\n        })\n      } else {\n        pageElement = createElement(PageComponent, {\n          params: params,\n          searchParams: searchParams,\n        })\n      }\n    }\n\n    const isDefaultSegment = segment === DEFAULT_SEGMENT_KEY\n    const pageFilePath =\n      getConventionPathByType(tree, dir, 'page') ??\n      getConventionPathByType(tree, dir, 'defaultPage')\n    const segmentType = isDefaultSegment ? 'default' : 'page'\n    const wrappedPageElement =\n      isSegmentViewEnabled && pageFilePath\n        ? createElement(\n            SegmentViewNode,\n            {\n              key: cacheNodeKey + '-' + segmentType,\n              type: segmentType,\n              pagePath: pageFilePath,\n            },\n            pageElement\n          )\n        : pageElement\n\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        wrappedPageElement,\n        layerAssets,\n        MetadataOutlet ? createElement(MetadataOutlet, null) : null\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n\n      varyParamsAccumulator\n    )\n  } else {\n    const SegmentComponent = Component\n    const isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot =\n      rootLayoutAtThisLevel &&\n      'children' in parallelRoutes &&\n      Object.keys(parallelRoutes).length > 1\n\n    let segmentNode: React.ReactNode\n\n    if (isClientComponent) {\n      let clientSegment: React.ReactNode\n      if (cacheComponents) {\n        // Params are omitted when Cache Components is enabled\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: null,\n        })\n      } else if (isStaticGeneration) {\n        const promiseOfParams =\n          createPrerenderParamsForClientSegment(currentParams)\n\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: {\n            params: currentParams,\n            promises: [promiseOfParams],\n          },\n        })\n      } else {\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: {\n            params: currentParams,\n            promises: null,\n          },\n        })\n      }\n\n      if (isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot) {\n        let notfoundClientSegment: React.ReactNode\n        let forbiddenClientSegment: React.ReactNode\n        let unauthorizedClientSegment: React.ReactNode\n        // TODO-APP: This is a hack to support unmatched parallel routes, which will throw `notFound()`.\n        // This ensures that a `HTTPAccessFallbackBoundary` is available for when that happens,\n        // but it's not ideal, as it needlessly invokes the `NotFound` component and renders the `RootLayout` twice.\n        // We should instead look into handling the fallback behavior differently in development mode so that it doesn't\n        // rely on the `NotFound` behavior.\n        notfoundClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: NotFound,\n          errorElement: notFoundElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        forbiddenClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: Forbidden,\n          errorElement: forbiddenElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        unauthorizedClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: Unauthorized,\n          errorElement: unauthorizedElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        if (\n          notfoundClientSegment ||\n          forbiddenClientSegment ||\n          unauthorizedClientSegment\n        ) {\n          segmentNode = createElement(\n            HTTPAccessFallbackBoundary,\n            {\n              key: cacheNodeKey,\n              notFound: notfoundClientSegment,\n              forbidden: forbiddenClientSegment,\n              unauthorized: unauthorizedClientSegment,\n            },\n            layerAssets,\n            clientSegment\n          )\n        } else {\n          segmentNode = createElement(\n            Fragment,\n            {\n              key: cacheNodeKey,\n            },\n            layerAssets,\n            clientSegment\n          )\n        }\n      } else {\n        segmentNode = createElement(\n          Fragment,\n          {\n            key: cacheNodeKey,\n          },\n          layerAssets,\n          clientSegment\n        )\n      }\n    } else {\n      const params = createServerParamsForServerSegment(\n        currentParams,\n        optionalCatchAllParamName,\n        varyParamsAccumulator\n      )\n\n      let serverSegment: React.ReactNode\n\n      if (isUseCacheFunction(SegmentComponent)) {\n        const UseCacheLayoutComponent: ComponentType<UseCacheLayoutProps> =\n          SegmentComponent\n\n        serverSegment = createElement(\n          UseCacheLayoutComponent,\n          {\n            ...parallelRouteProps,\n            params: params,\n            $$isLayout: true,\n          },\n          // Force static children here so that they're validated.\n          // See https://github.com/facebook/react/pull/34846\n          parallelRouteProps.children\n        )\n      } else {\n        serverSegment = createElement(\n          SegmentComponent,\n          {\n            ...parallelRouteProps,\n            params: params,\n          },\n          // Force static children here so that they're validated.\n          // See https://github.com/facebook/react/pull/34846\n          parallelRouteProps.children\n        )\n      }\n\n      if (isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot) {\n        // TODO-APP: This is a hack to support unmatched parallel routes, which will throw `notFound()`.\n        // This ensures that a `HTTPAccessFallbackBoundary` is available for when that happens,\n        // but it's not ideal, as it needlessly invokes the `NotFound` component and renders the `RootLayout` twice.\n        // We should instead look into handling the fallback behavior differently in development mode so that it doesn't\n        // rely on the `NotFound` behavior.\n        segmentNode = createElement(\n          HTTPAccessFallbackBoundary,\n          {\n            key: cacheNodeKey,\n            notFound: notFoundElement\n              ? createElement(\n                  Fragment,\n                  null,\n                  layerAssets,\n                  createElement(\n                    SegmentComponent,\n                    {\n                      params: params,\n                    },\n                    notFoundStyles,\n                    notFoundElement\n                  )\n                )\n              : undefined,\n          },\n          layerAssets,\n          serverSegment\n        )\n      } else {\n        segmentNode = createElement(\n          Fragment,\n          {\n            key: cacheNodeKey,\n          },\n          layerAssets,\n          serverSegment\n        )\n      }\n    }\n\n    const layoutFilePath = getConventionPathByType(tree, dir, 'layout')\n    const wrappedSegmentNode =\n      isSegmentViewEnabled && layoutFilePath\n        ? createElement(\n            SegmentViewNode,\n            {\n              key: 'layout',\n              type: 'layout',\n              pagePath: layoutFilePath,\n            },\n            segmentNode\n          )\n        : segmentNode\n\n    // For layouts we just render the component\n    return createSeedData(\n      ctx,\n      wrappedSegmentNode,\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n      varyParamsAccumulator\n    )\n  }\n}\n\nfunction createErrorBoundaryClientSegmentRoot({\n  ctx,\n  ErrorBoundaryComponent,\n  errorElement,\n  ClientSegmentRoot,\n  layerAssets,\n  SegmentComponent,\n  currentParams,\n}: {\n  ctx: AppRenderContext\n  ErrorBoundaryComponent: ComponentType<any> | undefined\n  errorElement: React.ReactNode\n  ClientSegmentRoot: ComponentType<any>\n  layerAssets: React.ReactNode\n  SegmentComponent: ComponentType<any>\n  currentParams: Params\n}) {\n  const {\n    componentMod: { createElement, Fragment },\n  } = ctx\n  if (ErrorBoundaryComponent) {\n    const notFoundParallelRouteProps = {\n      children: errorElement,\n    }\n    return createElement(\n      Fragment,\n      null,\n      layerAssets,\n      createElement(ClientSegmentRoot, {\n        Component: SegmentComponent,\n        slots: notFoundParallelRouteProps,\n        params: currentParams,\n      })\n    )\n  }\n  return null\n}\n\nexport function getRootParams(\n  loaderTree: LoaderTree,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n): Params {\n  return getRootParamsImpl({}, loaderTree, getDynamicParamFromSegment)\n}\n\nfunction getRootParamsImpl(\n  parentParams: Params,\n  loaderTree: LoaderTree,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n): Params {\n  const {\n    modules: { layout },\n    parallelRoutes,\n  } = parseLoaderTree(loaderTree)\n\n  const segmentParam = getDynamicParamFromSegment(loaderTree)\n\n  let currentParams: Params = parentParams\n  if (segmentParam && segmentParam.value !== null) {\n    currentParams = {\n      ...parentParams,\n      [segmentParam.param]: segmentParam.value,\n    }\n  }\n\n  const isRootLayout = typeof layout !== 'undefined'\n\n  if (isRootLayout) {\n    return currentParams\n  } else if (!parallelRoutes.children) {\n    // This should really be an error but there are bugs in Turbopack that cause\n    // the _not-found LoaderTree to not have any layouts. For rootParams sake\n    // this is somewhat irrelevant when you are not customizing the 404 page.\n    // If you are customizing 404\n    // TODO update rootParams to make all params optional if `/app/not-found.tsx` is defined\n    return currentParams\n  } else {\n    return getRootParamsImpl(\n      currentParams,\n      // We stop looking for root params as soon as we hit the first layout\n      // and it is not possible to use parallel route children above the root layout\n      // so every parallelRoutes object that this function can visit will necessarily\n      // have a single `children` prop and no others.\n      parallelRoutes.children,\n      getDynamicParamFromSegment\n    )\n  }\n}\n\nasync function createBoundaryConventionElement({\n  ctx,\n  conventionName,\n  Component,\n  styles,\n  tree,\n}: {\n  ctx: AppRenderContext\n  conventionName:\n    | 'not-found'\n    | 'error'\n    | 'loading'\n    | 'forbidden'\n    | 'unauthorized'\n  Component: ComponentType<any> | undefined\n  styles: React.ReactNode | undefined\n  tree: LoaderTree\n}) {\n  const {\n    componentMod: { createElement, Fragment },\n  } = ctx\n  const isSegmentViewEnabled = !!process.env.__NEXT_DEV_SERVER\n  const dir =\n    (process.env.NEXT_RUNTIME === 'edge'\n      ? process.env.__NEXT_EDGE_PROJECT_DIR\n      : ctx.renderOpts.dir) || ''\n  const { SegmentViewNode } = ctx.componentMod\n  const element = Component\n    ? createElement(Fragment, null, createElement(Component, null), styles)\n    : undefined\n\n  const pagePath = getConventionPathByType(tree, dir, conventionName)\n\n  const wrappedElement =\n    isSegmentViewEnabled && element\n      ? createElement(\n          SegmentViewNode,\n          {\n            key: cacheNodeKey + '-' + conventionName,\n            type: conventionName,\n            // TODO: Discovered when moving to `createElement`.\n            // `SegmentViewNode` doesn't support undefined `pagePath`\n            pagePath: pagePath!,\n          },\n          element\n        )\n      : element\n\n  return [wrappedElement, pagePath] as const\n}\n\nfunction createSeedData(\n  ctx: AppRenderContext,\n  rsc: React.ReactNode,\n  parallelRoutes: Record<string, CacheNodeSeedData | null>,\n  loading: LoadingModuleData | null,\n  isPossiblyPartialResponse: boolean,\n  varyParamsAccumulator: VaryParamsAccumulator | null\n): CacheNodeSeedData {\n  const createElement = ctx.componentMod.createElement\n  if (loading !== null) {\n    // If a loading.tsx boundary is present, wrap the component data in an\n    // additional context provider to pass the loading data to the next\n    // set of children.\n    // NOTE: The reason this is a separate wrapper from LayoutRouter is because\n    // not all segments render a LayoutRouter component, e.g. the root segment.\n    const LoadingBoundaryProvider = ctx.componentMod.LoadingBoundaryProvider\n    rsc = createElement(LoadingBoundaryProvider, {\n      loading: loading,\n      children: rsc,\n    })\n  }\n  return [\n    rsc,\n    parallelRoutes,\n    null,\n    isPossiblyPartialResponse,\n    // The accumulator is itself the AsyncIterable<string> that Flight\n    // serializes into the segment's seed data.\n    varyParamsAccumulator,\n  ]\n}\n","import { notFound } from '../not-found'\n\nexport const PARALLEL_ROUTE_DEFAULT_PATH =\n  'next/dist/client/components/builtin/default.js'\n\nexport default function ParallelRouteDefault() {\n  notFound()\n}\n","import type {\n  FlightDataPath,\n  FlightDataSegment,\n  FlightRouterState,\n  PrefetchHints,\n  Segment,\n  HeadData,\n} from '../../shared/lib/app-router-types'\nimport type { PreloadCallbacks } from './types'\nimport { matchSegment } from '../../client/components/match-segments'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport { getPreloadableFonts } from './get-preloadable-fonts'\nimport {\n  createFlightRouterStateFromLoaderTree,\n  createRouteTreePrefetch,\n} from './create-flight-router-state-from-loader-tree'\nimport type { AppRenderContext } from './app-render'\nimport { hasLoadingComponentInTree } from './has-loading-component-in-tree'\nimport { addSearchParamsIfPageSegment } from '../../shared/lib/segment'\nimport { createComponentTree } from './create-component-tree'\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param'\n\n/**\n * Use router state to decide at what common layout to render the page.\n * This can either be the common layout between two pages or a specific place to start rendering from using the \"refetch\" marker in the tree.\n */\nexport async function walkTreeWithFlightRouterState({\n  loaderTreeToFilter,\n  parentParams,\n  flightRouterState,\n  parentIsInsideSharedLayout,\n  rscHead,\n  injectedCSS,\n  injectedJS,\n  injectedFontPreloadTags,\n  rootLayoutIncluded,\n  ctx,\n  preloadCallbacks,\n  MetadataOutlet,\n  hintTree,\n}: {\n  loaderTreeToFilter: LoaderTree\n  parentParams: { [key: string]: string | string[] }\n  flightRouterState?: FlightRouterState\n  rscHead: HeadData\n  parentIsInsideSharedLayout?: boolean\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  rootLayoutIncluded: boolean\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n  MetadataOutlet: React.ComponentType\n  hintTree: PrefetchHints | null\n}): Promise<FlightDataPath[]> {\n  const {\n    renderOpts: { nextFontManifest, experimental },\n    query,\n    isPrefetch,\n    getDynamicParamFromSegment,\n    parsedRequestHeaders,\n    workStore,\n  } = ctx\n  const prefetchInliningEnabled = Boolean(experimental.prefetchInlining)\n  const cacheComponents = ctx.renderOpts.cacheComponents\n  const partialPrefetching = ctx.renderOpts.partialPrefetching\n  const isStaticGeneration = workStore.isStaticGeneration\n  const isBuildTimePrerendering =\n    ctx.renderOpts.isBuildTimePrerendering ?? false\n\n  const [segment, parallelRoutes, modules] = loaderTreeToFilter\n\n  const parallelRoutesKeys = Object.keys(parallelRoutes)\n\n  const { layout } = modules\n  const isLayout = typeof layout !== 'undefined'\n\n  /**\n   * Checks if the current segment is a root layout.\n   */\n  const rootLayoutAtThisLevel = isLayout && !rootLayoutIncluded\n  /**\n   * Checks if the current segment or any level above it has a root layout.\n   */\n  const rootLayoutIncludedAtThisLevelOrAbove =\n    rootLayoutIncluded || rootLayoutAtThisLevel\n\n  // Because this function walks to a deeper point in the tree to start rendering we have to track the dynamic parameters up to the point where rendering starts\n  const segmentParam = getDynamicParamFromSegment(loaderTreeToFilter)\n  const currentParams =\n    // Handle null case where dynamic param is optional\n    segmentParam && segmentParam.value !== null\n      ? {\n          ...parentParams,\n          [segmentParam.param]: segmentParam.value,\n        }\n      : parentParams\n  const actualSegment: Segment = addSearchParamsIfPageSegment(\n    segmentParam ? segmentParam.treeSegment : segment,\n    query\n  )\n\n  /**\n   * Decide if the current segment is where rendering has to start.\n   */\n  const renderComponentsOnThisLevel =\n    // No further router state available\n    !flightRouterState ||\n    // Segment in router state does not match current segment\n    !matchSegment(actualSegment, flightRouterState[0]) ||\n    // Explicit refresh\n    flightRouterState[3] === 'refetch'\n\n  // Pre-PPR, the `loading` component signals to the router how deep to render the component tree\n  // to ensure prefetches are quick and inexpensive. If there's no `loading` component anywhere in the tree being rendered,\n  // the prefetch will be short-circuited to avoid requesting a potentially very expensive subtree. If there's a `loading`\n  // somewhere in the tree, we'll recursively render the component tree up until we encounter that loading component, and then stop.\n\n  // Check if we're inside the \"new\" part of the navigation — inside the\n  // shared layout. In the case of a prefetch, this can be true even if the\n  // segment matches, because the client might send a matching segment to\n  // indicate that it already has the data in its cache. But in order to find\n  // the correct loading boundary, we still need to track where the shared\n  // layout begins.\n  //\n  // TODO: We should rethink the protocol for dynamic requests. It might not\n  // make sense for the client to send a FlightRouterState, since that type is\n  // overloaded with other concerns.\n  const isInsideSharedLayout =\n    renderComponentsOnThisLevel ||\n    parentIsInsideSharedLayout ||\n    flightRouterState[3] === 'inside-shared-layout'\n\n  if (\n    isInsideSharedLayout &&\n    !experimental.isRoutePPREnabled &&\n    // If PPR is disabled, and this is a request for the route tree, then we\n    // never render any components. Only send the router state.\n    (parsedRequestHeaders.isRouteTreePrefetchRequest ||\n      // Otherwise, check for the presence of a `loading` component.\n      (isPrefetch &&\n        !Boolean(modules.loading) &&\n        !hasLoadingComponentInTree(loaderTreeToFilter)))\n  ) {\n    // Send only the router state.\n    // TODO: Even for a dynamic route, we should cache these responses,\n    // because they do not contain any render data (neither segment data nor\n    // the head). They can be made even more cacheable once we move the route\n    // params into a separate data structure.\n    const overriddenSegment =\n      flightRouterState &&\n      // TODO: Why does canSegmentBeOverridden exist? Why don't we always just\n      // use `actualSegment`? Is it to avoid overwriting some state that's\n      // tracked by the client? Dig deeper to see if we can simplify this.\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n\n    const routerState = parsedRequestHeaders.isRouteTreePrefetchRequest\n      ? // Route tree prefetch requests contain some extra information\n        await createRouteTreePrefetch(\n          loaderTreeToFilter,\n          hintTree,\n          prefetchInliningEnabled,\n          cacheComponents,\n          partialPrefetching,\n          isStaticGeneration,\n          isBuildTimePrerendering,\n          getDynamicParamFromSegment,\n          rootLayoutIncluded\n        )\n      : await createFlightRouterStateFromLoaderTree(\n          loaderTreeToFilter,\n          hintTree,\n          prefetchInliningEnabled,\n          cacheComponents,\n          partialPrefetching,\n          isStaticGeneration,\n          isBuildTimePrerendering,\n          getDynamicParamFromSegment,\n          query,\n          rootLayoutIncluded\n        )\n\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        null,\n        [null, null],\n        true,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  // Similar to the previous branch. This flag is sent by the client to request\n  // only the metadata for a page. No segment data.\n  if (flightRouterState && flightRouterState[3] === 'metadata-only') {\n    const overriddenSegment =\n      flightRouterState &&\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n    const routerState = parsedRequestHeaders.isRouteTreePrefetchRequest\n      ? await createRouteTreePrefetch(\n          loaderTreeToFilter,\n          hintTree,\n          prefetchInliningEnabled,\n          cacheComponents,\n          partialPrefetching,\n          isStaticGeneration,\n          isBuildTimePrerendering,\n          getDynamicParamFromSegment\n        )\n      : await createFlightRouterStateFromLoaderTree(\n          loaderTreeToFilter,\n          hintTree,\n          prefetchInliningEnabled,\n          cacheComponents,\n          partialPrefetching,\n          isStaticGeneration,\n          isBuildTimePrerendering,\n          getDynamicParamFromSegment,\n          query,\n          rootLayoutIncluded\n        )\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        null,\n        rscHead,\n        false,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  if (renderComponentsOnThisLevel) {\n    const overriddenSegment =\n      flightRouterState &&\n      // TODO: Why does canSegmentBeOverridden exist? Why don't we always just\n      // use `actualSegment`? Is it to avoid overwriting some state that's\n      // tracked by the client? Dig deeper to see if we can simplify this.\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n\n    const routerState = await createFlightRouterStateFromLoaderTree(\n      // Create router state using the slice of the loaderTree\n      loaderTreeToFilter,\n      hintTree,\n      prefetchInliningEnabled,\n      cacheComponents,\n      partialPrefetching,\n      isStaticGeneration,\n      isBuildTimePrerendering,\n      getDynamicParamFromSegment,\n      query,\n      rootLayoutIncluded\n    )\n\n    // Create component tree using the slice of the loaderTree\n    const seedData = await createComponentTree(\n      // This ensures flightRouterPath is valid and filters down the tree\n      {\n        ctx,\n        loaderTree: loaderTreeToFilter,\n        parentParams: currentParams,\n        parentOptionalCatchAllParamName: null,\n        parentRuntimePrefetchable: false,\n        injectedCSS,\n        injectedJS,\n        injectedFontPreloadTags,\n        // This is intentionally not \"rootLayoutIncludedAtThisLevelOrAbove\" as createComponentTree starts at the current level and does a check for \"rootLayoutAtThisLevel\" too.\n        rootLayoutIncluded,\n        preloadCallbacks,\n        authInterrupts: experimental.authInterrupts,\n        MetadataOutlet,\n      }\n    )\n\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        seedData,\n        rscHead,\n        false,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  // If we are not rendering on this level we need to check if the current\n  // segment has a layout. If so, we need to track all the used CSS to make\n  // the result consistent.\n  const layoutPath = layout?.[1]\n  const injectedCSSWithCurrentLayout = new Set(injectedCSS)\n  const injectedJSWithCurrentLayout = new Set(injectedJS)\n  const injectedFontPreloadTagsWithCurrentLayout = new Set(\n    injectedFontPreloadTags\n  )\n  if (layoutPath) {\n    getLinkAndScriptTags(\n      layoutPath,\n      injectedCSSWithCurrentLayout,\n      injectedJSWithCurrentLayout,\n      true\n    )\n    getPreloadableFonts(\n      nextFontManifest,\n      layoutPath,\n      injectedFontPreloadTagsWithCurrentLayout\n    )\n  }\n\n  const paths: FlightDataPath[] = []\n\n  // Walk through all parallel routes.\n  for (const parallelRouteKey of parallelRoutesKeys) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n\n    const subPaths = await walkTreeWithFlightRouterState({\n      ctx,\n      loaderTreeToFilter: parallelRoute,\n      parentParams: currentParams,\n      flightRouterState:\n        flightRouterState && flightRouterState[1][parallelRouteKey],\n      parentIsInsideSharedLayout: isInsideSharedLayout,\n      rscHead,\n      injectedCSS: injectedCSSWithCurrentLayout,\n      injectedJS: injectedJSWithCurrentLayout,\n      injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n      rootLayoutIncluded: rootLayoutIncludedAtThisLevelOrAbove,\n      preloadCallbacks,\n      MetadataOutlet,\n      hintTree: hintTree?.slots?.[parallelRouteKey] ?? null,\n    })\n\n    for (const subPath of subPaths) {\n      paths.push([actualSegment, parallelRouteKey, ...subPath])\n    }\n  }\n\n  return paths\n}\n\n/**\n * A simplified version of `walkTreeWithFlightRouterState` that doesn't skip any layouts\n * but returns a result of the same shape.\n * Intended to be used for instant validation, where we need the complete tree.\n */\nexport async function createFullTreeFlightDataForNavigation({\n  loaderTree,\n  rscHead,\n  injectedCSS,\n  injectedJS,\n  injectedFontPreloadTags,\n  ctx,\n  preloadCallbacks,\n  MetadataOutlet,\n}: {\n  loaderTree: LoaderTree\n  flightRouterState?: FlightRouterState\n  rscHead: HeadData\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n  MetadataOutlet: React.ComponentType\n}): Promise<[rootSegment: FlightDataPath]> {\n  const {\n    renderOpts: { experimental },\n    query,\n    getDynamicParamFromSegment,\n    pagePath,\n    workStore: workStoreForInitialRender,\n  } = ctx\n\n  const hintTreeForInitialRender =\n    ctx.renderOpts.prefetchHints?.[pagePath] ?? null\n\n  const routerState = await createFlightRouterStateFromLoaderTree(\n    loaderTree,\n    hintTreeForInitialRender,\n    Boolean(experimental.prefetchInlining),\n    ctx.renderOpts.cacheComponents,\n    ctx.renderOpts.partialPrefetching,\n    workStoreForInitialRender.isStaticGeneration,\n    ctx.renderOpts.isBuildTimePrerendering ?? false,\n    getDynamicParamFromSegment,\n    query\n  )\n  const rootSegment = routerState[0]\n\n  const seedData = await createComponentTree({\n    ctx,\n    loaderTree,\n    parentParams: {},\n    parentOptionalCatchAllParamName: null,\n    parentRuntimePrefetchable: false,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    rootLayoutIncluded: false,\n    preloadCallbacks,\n    authInterrupts: experimental.authInterrupts,\n    MetadataOutlet,\n  })\n\n  return [\n    [\n      // TODO: app-render slices this Segment off.\n      // why is that valid, and why are we including it in the first place?\n      rootSegment,\n      routerState,\n      seedData,\n      rscHead,\n      false,\n    ] satisfies FlightDataSegment,\n  ]\n}\n\n/*\n * This function is used to determine if an existing segment can be overridden\n * by the incoming segment.\n */\nconst canSegmentBeOverridden = (\n  existingSegment: Segment,\n  segment: Segment\n): boolean => {\n  if (Array.isArray(existingSegment) || !Array.isArray(segment)) {\n    return false\n  }\n\n  return getSegmentParam(existingSegment)?.paramName === segment[0]\n}\n","import { InvariantError } from '../../invariant-error'\nimport { getSegmentParam, type SegmentParam } from '../utils/get-segment-param'\nimport {\n  INTERCEPTION_ROUTE_MARKERS,\n  type InterceptionMarker,\n} from '../utils/interception-routes'\n\nexport type RouteGroupAppRouteSegment = {\n  type: 'route-group'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type ParallelRouteAppRouteSegment = {\n  type: 'parallel-route'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type StaticAppRouteSegment = {\n  type: 'static'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type DynamicAppRouteSegment = {\n  type: 'dynamic'\n  name: string\n  param: SegmentParam\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\n/**\n * Represents a single segment in a route path.\n * Can be either static (e.g., \"blog\") or dynamic (e.g., \"[slug]\").\n */\nexport type AppRouteSegment =\n  | StaticAppRouteSegment\n  | DynamicAppRouteSegment\n  | RouteGroupAppRouteSegment\n  | ParallelRouteAppRouteSegment\n\nexport type NormalizedAppRouteSegment =\n  | StaticAppRouteSegment\n  | DynamicAppRouteSegment\n\nfunction normalizeEncodedDynamicPlaceholder(segment: string): string {\n  if (!/%5b|%5d/i.test(segment)) {\n    return segment\n  }\n\n  try {\n    const decodedSegment = decodeURIComponent(segment)\n    return getSegmentParam(decodedSegment) ? decodedSegment : segment\n  } catch {\n    return segment\n  }\n}\n\nexport function parseAppRouteSegment(segment: string): AppRouteSegment | null {\n  if (segment === '') {\n    return null\n  }\n\n  // Check if the segment starts with an interception marker\n  const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n    segment.startsWith(m)\n  )\n\n  const param = getSegmentParam(segment)\n  if (param) {\n    return {\n      type: 'dynamic',\n      name: segment,\n      param,\n      interceptionMarker,\n    }\n  } else if (segment.startsWith('(') && segment.endsWith(')')) {\n    return {\n      type: 'route-group',\n      name: segment,\n      interceptionMarker,\n    }\n  } else if (segment.startsWith('@')) {\n    return {\n      type: 'parallel-route',\n      name: segment,\n      interceptionMarker,\n    }\n  } else {\n    return {\n      type: 'static',\n      name: segment,\n      interceptionMarker,\n    }\n  }\n}\n\nexport type AppRoute = {\n  normalized: boolean\n  pathname: string\n  segments: AppRouteSegment[]\n  dynamicSegments: DynamicAppRouteSegment[]\n  interceptionMarker: InterceptionMarker | undefined\n  interceptingRoute: AppRoute | undefined\n  interceptedRoute: AppRoute | undefined\n}\n\nexport type NormalizedAppRoute = Omit<AppRoute, 'normalized' | 'segments'> & {\n  normalized: true\n  segments: NormalizedAppRouteSegment[]\n}\n\nexport function isNormalizedAppRoute(\n  route: InterceptionAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isNormalizedAppRoute(\n  route: AppRoute | InterceptionAppRoute\n): route is NormalizedAppRoute {\n  return route.normalized\n}\n\nexport type InterceptionAppRoute = Omit<\n  AppRoute,\n  'interceptionMarker' | 'interceptingRoute' | 'interceptedRoute'\n> & {\n  interceptionMarker: InterceptionMarker\n  interceptingRoute: AppRoute\n  interceptedRoute: AppRoute\n}\n\nexport type NormalizedInterceptionAppRoute = Omit<\n  InterceptionAppRoute,\n  | 'normalized'\n  | 'segments'\n  | 'interceptionMarker'\n  | 'interceptingRoute'\n  | 'interceptedRoute'\n> & {\n  normalized: true\n  segments: NormalizedAppRouteSegment[]\n  interceptionMarker: InterceptionMarker\n  interceptingRoute: NormalizedAppRoute\n  interceptedRoute: NormalizedAppRoute\n}\n\nexport function isInterceptionAppRoute(\n  route: NormalizedAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isInterceptionAppRoute(\n  route: AppRoute\n): route is InterceptionAppRoute {\n  return (\n    route.interceptionMarker !== undefined &&\n    route.interceptingRoute !== undefined &&\n    route.interceptedRoute !== undefined\n  )\n}\n\n// Bitmask for which non-URL segment types to allow during parsing.\n// By default, route groups and parallel routes are rejected because\n// they should have been stripped by normalizeAppPath. These flags\n// let callers opt in to allowing specific types.\nconst OnlyRoutableSegments = /*   */ 0b00\nconst AllowParallelSegments = /*  */ 0b01\nconst AllowGroupSegments = /*     */ 0b10\n\nfunction parseAppRouteImpl(\n  pathname: string,\n  allowedTypes: number\n): AppRoute | NormalizedAppRoute {\n  const pathnameSegments = pathname.split('/').filter(Boolean)\n\n  // Build segments array with static and dynamic segments\n  const segments: AppRouteSegment[] = []\n\n  // Parse if this is an interception route.\n  let interceptionMarker: InterceptionMarker | undefined\n  let interceptingRoute: AppRoute | NormalizedAppRoute | undefined\n  let interceptedRoute: AppRoute | NormalizedAppRoute | undefined\n\n  for (const segment of pathnameSegments) {\n    const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment)\n\n    // Parse the segment into an AppSegment.\n    const appSegment = parseAppRouteSegment(normalizedSegment)\n    if (!appSegment) {\n      continue\n    }\n\n    if (\n      appSegment.type === 'route-group' &&\n      !(allowedTypes & AllowGroupSegments)\n    ) {\n      throw new InvariantError(\n        `${pathname} is being parsed as a normalized route, but it has a route group segment.`\n      )\n    }\n\n    if (\n      appSegment.type === 'parallel-route' &&\n      !(allowedTypes & AllowParallelSegments)\n    ) {\n      throw new InvariantError(\n        `${pathname} is being parsed as a normalized route, but it has a parallel route segment.`\n      )\n    }\n\n    segments.push(appSegment)\n\n    if (appSegment.interceptionMarker) {\n      const parts = pathname.split(appSegment.interceptionMarker)\n      if (parts.length !== 2) {\n        throw new Error(`Invalid interception route: ${pathname}`)\n      }\n\n      interceptingRoute = parseAppRouteImpl(parts[0], allowedTypes)\n      interceptedRoute = parseAppRouteImpl(parts[1], allowedTypes)\n      interceptionMarker = appSegment.interceptionMarker\n    }\n  }\n\n  const dynamicSegments = segments.filter(\n    (segment) => segment.type === 'dynamic'\n  )\n\n  return {\n    normalized: allowedTypes === OnlyRoutableSegments,\n    pathname,\n    segments,\n    dynamicSegments,\n    interceptionMarker,\n    interceptingRoute,\n    interceptedRoute,\n  }\n}\n\n/**\n * Parse an app route that has been fully normalized (no @slot or ()\n * group segments). Throws if either is present.\n */\nexport function parseNormalizedAppRoute(pathname: string): NormalizedAppRoute {\n  return parseAppRouteImpl(pathname, OnlyRoutableSegments) as NormalizedAppRoute\n}\n\n/**\n * Parse an app route that may contain @slot segments but not ()\n * group segments. Slot segments are preserved as parallel-route\n * type segments so callers can distinguish routes in different\n * parallel slots.\n */\nexport function parseAppRouteWithSlots(pathname: string): AppRoute {\n  return parseAppRouteImpl(pathname, AllowParallelSegments) as AppRoute\n}\n","import type { DynamicParamTypes } from '../../app-router-types'\n\nexport function interceptionPrefixFromParamType(\n  paramType: DynamicParamTypes\n): string | null {\n  switch (paramType) {\n    case 'catchall-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(..)(..)':\n      return '(..)(..)'\n    case 'catchall-intercepted-(.)':\n    case 'dynamic-intercepted-(.)':\n      return '(.)'\n    case 'catchall-intercepted-(..)':\n    case 'dynamic-intercepted-(..)':\n      return '(..)'\n    case 'catchall-intercepted-(...)':\n    case 'dynamic-intercepted-(...)':\n      return '(...)'\n    case 'catchall':\n    case 'dynamic':\n    case 'optional-catchall':\n    default:\n      return null\n  }\n}\n","import type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypes } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport type {\n  NormalizedAppRoute,\n  NormalizedAppRouteSegment,\n} from '../routes/app'\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type'\n\n/**\n * Extracts the param value from a path segment, handling interception markers\n * based on the expected param type.\n *\n * @param pathSegment - The path segment to extract the value from\n * @param params - The current params object for resolving dynamic param references\n * @param paramType - The expected param type which may include interception marker info\n * @returns The extracted param value\n */\nfunction getParamValueFromSegment(\n  pathSegment: NormalizedAppRouteSegment,\n  params: Params,\n  paramType: DynamicParamTypes\n): string {\n  // If the segment is dynamic, resolve it from the params object\n  if (pathSegment.type === 'dynamic') {\n    return params[pathSegment.param.paramName] as string\n  }\n\n  // If the paramType indicates this is an intercepted param, strip the marker\n  // that matches the interception marker in the param type\n  const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n  if (interceptionPrefix === pathSegment.interceptionMarker) {\n    return pathSegment.name.replace(pathSegment.interceptionMarker, '')\n  }\n\n  // For static segments, use the name\n  return pathSegment.name\n}\n\n/**\n * Resolves a route parameter value from the route segments at the given depth.\n * This shared logic is used by both extractPathnameRouteParamSegmentsFromLoaderTree\n * and resolveRouteParamsFromTree.\n *\n * @param paramName - The parameter name to resolve\n * @param paramType - The parameter type (dynamic, catchall, etc.)\n * @param depth - The current depth in the route tree\n * @param route - The normalized route containing segments\n * @param params - The current params object (used to resolve embedded param references)\n * @param options - Configuration options\n * @returns The resolved parameter value, or undefined if it cannot be resolved\n */\nexport function resolveParamValue(\n  paramName: string,\n  paramType: DynamicParamTypes,\n  depth: number,\n  route: NormalizedAppRoute,\n  params: Params\n): string | string[] | undefined {\n  switch (paramType) {\n    case 'catchall':\n    case 'optional-catchall':\n    case 'catchall-intercepted-(..)(..)':\n    case 'catchall-intercepted-(.)':\n    case 'catchall-intercepted-(..)':\n    case 'catchall-intercepted-(...)':\n      // For catchall routes, derive from pathname using depth to determine\n      // which segments to use\n      const processedSegments: string[] = []\n\n      // Process segments to handle any embedded dynamic params\n      for (let index = depth; index < route.segments.length; index++) {\n        const pathSegment = route.segments[index]\n\n        if (pathSegment.type === 'static') {\n          let value = pathSegment.name\n\n          // For intercepted catch-all params, strip the marker from the first segment\n          const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n          if (\n            interceptionPrefix &&\n            index === depth &&\n            interceptionPrefix === pathSegment.interceptionMarker\n          ) {\n            // Strip the interception marker from the value\n            value = value.replace(pathSegment.interceptionMarker, '')\n          }\n\n          processedSegments.push(value)\n        } else {\n          // If the segment is a param placeholder, check if we have its value\n          if (!params.hasOwnProperty(pathSegment.param.paramName)) {\n            // If the segment is an optional catchall, we can break out of the\n            // loop because it's optional!\n            if (pathSegment.param.paramType === 'optional-catchall') {\n              break\n            }\n\n            // Unknown param placeholder in pathname - can't derive full value\n            return undefined\n          }\n\n          // If the segment matches a param, use the param value\n          // We don't encode values here as that's handled during retrieval.\n          const paramValue = params[pathSegment.param.paramName]\n          if (Array.isArray(paramValue)) {\n            processedSegments.push(...paramValue)\n          } else {\n            processedSegments.push(paramValue as string)\n          }\n        }\n      }\n\n      if (processedSegments.length > 0) {\n        return processedSegments\n      } else if (paramType === 'optional-catchall') {\n        return undefined\n      } else {\n        // We shouldn't be able to match a catchall segment without any path\n        // segments if it's not an optional catchall\n        throw new InvariantError(\n          `Unexpected empty path segments match for a route \"${route.pathname}\" with param \"${paramName}\" of type \"${paramType}\"`\n        )\n      }\n    case 'dynamic':\n    case 'dynamic-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(.)':\n    case 'dynamic-intercepted-(..)':\n    case 'dynamic-intercepted-(...)':\n      // For regular dynamic parameters, take the segment at this depth\n      if (depth < route.segments.length) {\n        const pathSegment = route.segments[depth]\n\n        // Check if the segment at this depth is a placeholder for an unknown param\n        if (\n          pathSegment.type === 'dynamic' &&\n          !params.hasOwnProperty(pathSegment.param.paramName)\n        ) {\n          // The segment is a placeholder like [category] and we don't have the value\n          return undefined\n        }\n\n        // If the segment matches a param, use the param value from params object\n        // Otherwise it's a static segment, just use it directly\n        // We don't encode values here as that's handled during retrieval\n        return getParamValueFromSegment(pathSegment, params, paramType)\n      }\n\n      return undefined\n\n    default:\n      paramType satisfies never\n  }\n}\n","import type { DynamicParam } from '../../../../server/app-render/app-render'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\nimport type { OpaqueFallbackRouteParams } from '../../../../server/request/fallback-params'\nimport type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypesShort } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport { parseLoaderTree } from './parse-loader-tree'\nimport { parseNormalizedAppRoute, parseAppRouteSegment } from '../routes/app'\nimport { resolveParamValue } from './resolve-param-value'\n\n/**\n * Gets the value of a param from the params object. This correctly handles the\n * case where the param is a fallback route param and encodes the resulting\n * value.\n *\n * @param interpolatedParams - The params object.\n * @param segmentKey - The key of the segment.\n * @param fallbackRouteParams - The fallback route params.\n * @returns The value of the param.\n */\nfunction getParamValue(\n  interpolatedParams: Params,\n  segmentKey: string,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n  let value = interpolatedParams[segmentKey]\n\n  if (fallbackRouteParams?.has(segmentKey)) {\n    // We know that the fallback route params has the segment key because we\n    // checked that above.\n    const [searchValue] = fallbackRouteParams.get(segmentKey)!\n    value = searchValue\n  } else if (Array.isArray(value)) {\n    value = value.map((i) => encodeURIComponent(i))\n  } else if (typeof value === 'string') {\n    value = encodeURIComponent(value)\n  }\n\n  return value\n}\n\nexport function interpolateParallelRouteParams(\n  loaderTree: LoaderTree,\n  params: Params,\n  pagePath: string,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Params {\n  const interpolated = structuredClone(params)\n\n  // Stack-based traversal with depth tracking\n  const stack: Array<{ tree: LoaderTree; depth: number }> = [\n    { tree: loaderTree, depth: 0 },\n  ]\n\n  // Parse the route from the provided page path.\n  const route = parseNormalizedAppRoute(pagePath)\n\n  while (stack.length > 0) {\n    const { tree, depth } = stack.pop()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    if (\n      appSegment?.type === 'dynamic' &&\n      !interpolated.hasOwnProperty(appSegment.param.paramName) &&\n      // If the param is in the fallback route params, we don't need to\n      // interpolate it because it's already marked as being unknown.\n      !fallbackRouteParams?.has(appSegment.param.paramName)\n    ) {\n      const { paramName, paramType } = appSegment.param\n\n      const paramValue = resolveParamValue(\n        paramName,\n        paramType,\n        depth,\n        route,\n        interpolated\n      )\n\n      if (paramValue !== undefined) {\n        interpolated[paramName] = paramValue\n      } else if (paramType !== 'optional-catchall') {\n        throw new InvariantError(\n          `Could not resolve param value for segment: ${paramName}`\n        )\n      }\n    }\n\n    // Calculate next depth - increment if this is not a route group and not empty\n    let nextDepth = depth\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      nextDepth++\n    }\n\n    // Add all parallel routes to the stack for processing\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      stack.push({ tree: parallelRoute, depth: nextDepth })\n    }\n  }\n\n  return interpolated\n}\n\n/**\n *\n * Shared logic on client and server for creating a dynamic param value.\n *\n * This code needs to be shared with the client so it can extract dynamic route\n * params from the URL without a server request.\n *\n * Because everything in this module is sent to the client, we should aim to\n * keep this code as simple as possible. The special case handling for catchall\n * and optional is, alas, unfortunate.\n */\nexport function getDynamicParam(\n  interpolatedParams: Params,\n  segmentKey: string,\n  dynamicParamType: DynamicParamTypesShort,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  staticSiblings: readonly string[] | null\n): DynamicParam {\n  let value: string | string[] | undefined = getParamValue(\n    interpolatedParams,\n    segmentKey,\n    fallbackRouteParams\n  )\n\n  // handle the case where an optional catchall does not have a value,\n  // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`\n  if (!value || value.length === 0) {\n    if (dynamicParamType === 'oc') {\n      return {\n        param: segmentKey,\n        value: null,\n        type: dynamicParamType,\n        treeSegment: [segmentKey, '', dynamicParamType, staticSiblings],\n      }\n    }\n\n    throw new InvariantError(\n      `Missing value for segment key: \"${segmentKey}\" with dynamic param type: ${dynamicParamType}`\n    )\n  }\n\n  const paramCacheKey = Array.isArray(value) ? value.join('/') : value\n\n  return {\n    param: segmentKey,\n    // The value that is passed to user code.\n    value,\n    // The value that is rendered in the router tree.\n    // TODO: If the number of static siblings exceeds some threshold (e.g.,\n    // dozens or hundreds), consider sending a Bloom filter instead of the full\n    // array to reduce payload size. The client would then use the Bloom filter\n    // to check membership with a small false positive rate.\n    treeSegment: [segmentKey, paramCacheKey, dynamicParamType, staticSiblings],\n    type: dynamicParamType,\n  }\n}\n\n/**\n * Regular expression pattern used to match route parameters.\n * Matches both single parameters and parameter groups.\n * Examples:\n *   - `[[...slug]]` matches parameter group with key 'slug', repeat: true, optional: true\n *   - `[...slug]` matches parameter group with key 'slug', repeat: true, optional: false\n *   - `[[foo]]` matches parameter with key 'foo', repeat: false, optional: true\n *   - `[bar]` matches parameter with key 'bar', repeat: false, optional: false\n */\nexport const PARAMETER_PATTERN = /^([^[]*)\\[((?:\\[[^\\]]*\\])|[^\\]]+)\\](.*)$/\n\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n *   - `[[...slug]]` -> `{ key: 'slug', repeat: true, optional: true }`\n *   - `[...slug]` -> `{ key: 'slug', repeat: true, optional: false }`\n *   - `[[foo]]` -> `{ key: 'foo', repeat: false, optional: true }`\n *   - `[bar]` -> `{ key: 'bar', repeat: false, optional: false }`\n *   - `fizz` -> `{ key: 'fizz', repeat: false, optional: false }`\n * @param param - The parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseParameter(param: string) {\n  const match = param.match(PARAMETER_PATTERN)\n\n  if (!match) {\n    return parseMatchedParameter(param)\n  }\n\n  return parseMatchedParameter(match[2])\n}\n\n/**\n * Parses a matched parameter from the PARAMETER_PATTERN regex to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n *   - `[...slug]` -> `{ key: 'slug', repeat: true, optional: true }`\n *   - `...slug` -> `{ key: 'slug', repeat: true, optional: false }`\n *   - `[foo]` -> `{ key: 'foo', repeat: false, optional: true }`\n *   - `bar` -> `{ key: 'bar', repeat: false, optional: false }`\n * @param param - The matched parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseMatchedParameter(param: string) {\n  const optional = param.startsWith('[') && param.endsWith(']')\n  if (optional) {\n    param = param.slice(1, -1)\n  }\n  const repeat = param.startsWith('...')\n  if (repeat) {\n    param = param.slice(3)\n  }\n  return { key: param, repeat, optional }\n}\n","import {\n  arrayBufferToString,\n  stringToUint8Array,\n} from '../app-render/encryption-utils'\nimport type { CachedFetchValue } from '../response-cache/types'\nimport { MIN_PRERENDERABLE_EXPIRE } from '../use-cache/constants'\nimport type { CollectedCacheResult } from '../use-cache/use-cache-wrapper'\n\n/**\n * A generic cache store type that provides a subset of Map functionality\n */\ntype CacheStore<T> = Pick<\n  Map<string, T>,\n  'entries' | 'keys' | 'size' | 'get' | 'set' | 'has' | typeof Symbol.iterator\n>\n\n/**\n * A cache store specifically for fetch cache values\n */\nexport type FetchCacheStore = CacheStore<CachedFetchValue>\n\n/**\n * A cache store for encrypted bound args of inline server functions.\n */\nexport type EncryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * An in-memory-only cache store for decrypted bound args of inline server\n * functions.\n */\nexport type DecryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * An in-memory-only cache store for rendered `ImageResponse` array buffers,\n * keyed by a serialization of the `ImageResponse` constructor args. This lets\n * the prospective prerender render the image once and hand the array buffer to\n * the final prerender within microtasks, so that metadata image routes can be\n * statically prerendered under Cache Components. Never serialized into the\n * resume store.\n */\nexport type ImageResponseCacheStore = CacheStore<Promise<ArrayBuffer>>\n\n/**\n * Serialized format for \"use cache\" entries\n */\nexport interface UseCacheCacheStoreSerialized {\n  entry: {\n    value: string\n    tags: string[]\n    stale: number\n    timestamp: number\n    expire: number\n    revalidate: number\n  }\n  hasExplicitRevalidate: boolean | undefined\n  hasExplicitExpire: boolean | undefined\n  readRootParamNames: string[] | undefined\n}\n\n/**\n * A cache store specifically for \"use cache\" values that stores promises of\n * collected cache results (entry + metadata).\n */\nexport type UseCacheCacheStore = CacheStore<Promise<CollectedCacheResult>>\n\n/**\n * Parses serialized cache entries into a UseCacheCacheStore\n * @param entries - The serialized entries to parse\n * @returns A new UseCacheCacheStore containing the parsed entries\n */\nexport function parseUseCacheCacheStore(\n  entries: Iterable<[string, UseCacheCacheStoreSerialized]>\n): UseCacheCacheStore {\n  const store = new Map<string, Promise<CollectedCacheResult>>()\n\n  for (const [\n    key,\n    { entry, hasExplicitRevalidate, hasExplicitExpire, readRootParamNames },\n  ] of entries) {\n    store.set(\n      key,\n      Promise.resolve({\n        entry: {\n          // Create a ReadableStream from the Uint8Array\n          value: new ReadableStream<Uint8Array>({\n            start(controller) {\n              // Enqueue the Uint8Array to the stream\n              controller.enqueue(stringToUint8Array(atob(entry.value)))\n\n              // Close the stream\n              controller.close()\n            },\n          }),\n          tags: entry.tags,\n          stale: entry.stale,\n          timestamp: entry.timestamp,\n          expire: entry.expire,\n          revalidate: entry.revalidate,\n        },\n        hasExplicitRevalidate,\n        hasExplicitExpire,\n        readRootParamNames: readRootParamNames\n          ? new Set(readRootParamNames)\n          : undefined,\n        // Serialized RDC entries are non-dynamic by construction (the\n        // serializer drops dynamic entries), so this is never produced from the\n        // wire — the throw path that consumes it is only reachable for dynamic\n        // entries, which only exist in the in-memory RDC.\n        dynamicNestedCacheError: undefined,\n      })\n    )\n  }\n\n  return store\n}\n\n/**\n * Serializes UseCacheCacheStore entries into an array of key-value pairs\n * @param entries - The store entries to stringify\n * @returns A promise that resolves to an array of key-value pairs with serialized values\n */\nexport async function serializeUseCacheCacheStore(\n  entries: IterableIterator<[string, Promise<CollectedCacheResult>]>,\n  isCacheComponentsEnabled: boolean\n): Promise<Array<[string, UseCacheCacheStoreSerialized] | null>> {\n  return Promise.all(\n    Array.from(entries).map(([key, value]) => {\n      return value\n        .then(\n          async ({\n            entry,\n            hasExplicitRevalidate,\n            hasExplicitExpire,\n            readRootParamNames,\n          }) => {\n            if (\n              isCacheComponentsEnabled &&\n              (entry.revalidate === 0 ||\n                entry.expire < MIN_PRERENDERABLE_EXPIRE)\n            ) {\n              // The entry was omitted from the prerender result, and subsequently\n              // does not need to be included in the serialized RDC.\n              return null\n            }\n\n            const [left, right] = entry.value.tee()\n            entry.value = right\n\n            let binaryString: string = ''\n\n            // We want to encode the value as a string, but we aren't sure if the\n            // value is a a stream of UTF-8 bytes or not, so let's just encode it\n            // as a string using base64.\n            for await (const chunk of left) {\n              binaryString += arrayBufferToString(chunk)\n            }\n\n            return [\n              key,\n              {\n                entry: {\n                  // Encode the value as a base64 string.\n                  value: btoa(binaryString),\n                  tags: entry.tags,\n                  stale: entry.stale,\n                  timestamp: entry.timestamp,\n                  expire: entry.expire,\n                  revalidate: entry.revalidate,\n                },\n                hasExplicitRevalidate,\n                hasExplicitExpire,\n                readRootParamNames: readRootParamNames\n                  ? [...readRootParamNames]\n                  : undefined,\n              },\n            ] satisfies [string, UseCacheCacheStoreSerialized]\n          }\n        )\n        .catch(() => {\n          // Any failed cache writes should be ignored as to not discard the\n          // entire cache.\n          return null\n        })\n    })\n  )\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { getServerActionsManifest } from './manifests-singleton'\n\nlet __next_loaded_action_key: CryptoKey\n\nexport function arrayBufferToString(\n  buffer: ArrayBuffer | Uint8Array<ArrayBufferLike>\n) {\n  const bytes = new Uint8Array(buffer)\n  const len = bytes.byteLength\n\n  // @anonrig: V8 has a limit of 65535 arguments in a function.\n  // For len < 65535, this is faster.\n  // https://github.com/vercel/next.js/pull/56377#pullrequestreview-1656181623\n  if (len < 65535) {\n    return String.fromCharCode.apply(null, bytes as unknown as number[])\n  }\n\n  let binary = ''\n  for (let i = 0; i < len; i++) {\n    binary += String.fromCharCode(bytes[i])\n  }\n  return binary\n}\n\nexport function stringToUint8Array(binary: string) {\n  const len = binary.length\n  const arr = new Uint8Array(len)\n\n  for (let i = 0; i < len; i++) {\n    arr[i] = binary.charCodeAt(i)\n  }\n\n  return arr\n}\n\nexport function encrypt(\n  key: CryptoKey,\n  iv: Uint8Array<ArrayBuffer>,\n  data: Uint8Array<ArrayBuffer>\n) {\n  return crypto.subtle.encrypt(\n    {\n      name: 'AES-GCM',\n      iv,\n    },\n    key,\n    data\n  )\n}\n\nexport function decrypt(\n  key: CryptoKey,\n  iv: Uint8Array<ArrayBuffer>,\n  data: Uint8Array<ArrayBuffer>\n) {\n  return crypto.subtle.decrypt(\n    {\n      name: 'AES-GCM',\n      iv,\n    },\n    key,\n    data\n  )\n}\n\nexport async function getActionEncryptionKey() {\n  if (__next_loaded_action_key) {\n    return __next_loaded_action_key\n  }\n\n  const serverActionsManifest = getServerActionsManifest()\n\n  const rawKey =\n    process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY ||\n    serverActionsManifest.encryptionKey\n\n  if (rawKey === undefined) {\n    throw new InvariantError('Missing encryption key for Server Actions')\n  }\n\n  __next_loaded_action_key = await crypto.subtle.importKey(\n    'raw',\n    stringToUint8Array(atob(rawKey)),\n    'AES-GCM',\n    true,\n    ['encrypt', 'decrypt']\n  )\n\n  return __next_loaded_action_key\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  type UseCacheCacheStore,\n  type FetchCacheStore,\n  type EncryptedBoundArgsCacheStore,\n  serializeUseCacheCacheStore,\n  parseUseCacheCacheStore,\n  type DecryptedBoundArgsCacheStore,\n  type ImageResponseCacheStore,\n  type UseCacheCacheStoreSerialized,\n} from './cache-store'\n\n/**\n * An immutable version of the resume data cache used during rendering.\n * This cache is read-only and cannot be modified once created.\n */\nexport interface RenderResumeDataCache {\n  /**\n   * Discriminator. `false` means this cache is read-only and cannot be filled\n   * with new entries. Used by `ResumeDataCache` consumers to narrow the union\n   * via standard discriminated-union narrowing (e.g. `if\n   * (resumeDataCache.mutable)`).\n   */\n  readonly mutable: false\n\n  /**\n   * A read-only Map store for values cached by the 'use cache' React hook.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly cache: Omit<UseCacheCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for cached fetch responses.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly fetch: Omit<FetchCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for encrypted bound args of inline server functions.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly encryptedBoundArgs: Omit<EncryptedBoundArgsCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for decrypted bound args of inline server functions.\n   * This is only intended for in-memory usage during pre-rendering, and must\n   * not be persisted in the resume store. The 'set' operation is omitted to\n   * enforce immutability.\n   */\n  readonly decryptedBoundArgs: Omit<DecryptedBoundArgsCacheStore, 'set'>\n\n  /**\n   * A read-only in-memory Map store for rendered `ImageResponse` array buffers.\n   * This is only intended for in-memory usage during pre-rendering, and must\n   * not be persisted in the resume store. The 'set' operation is omitted to\n   * enforce immutability.\n   */\n  readonly imageResponses: Omit<ImageResponseCacheStore, 'set'>\n\n  /**\n   * Serialized cache keys that were intentionally skipped during the\n   * prospective prerender (e.g. because the cached function accessed fallback\n   * params or other dynamic data). During the final prerender, a key in this\n   * set is returned as a hanging promise early, without attempting to look up\n   * or generate a cache entry. Optional because this field is intentionally not\n   * serialized and won't be present in deserialized caches.\n   */\n  readonly dynamicCacheKeys?: ReadonlySet<string>\n}\n\n/**\n * A mutable version of the resume data cache used during pre-rendering.\n * This cache allows both reading and writing of cached values.\n */\nexport interface PrerenderResumeDataCache {\n  /**\n   * Discriminator. `true` means this cache is mutable and can be filled with\n   * new entries during this prerender. Used by `ResumeDataCache` consumers to\n   * narrow the union via standard discriminated-union narrowing (e.g.\n   * `if (resumeDataCache.mutable)`).\n   */\n  readonly mutable: true\n\n  /**\n   * A mutable Map store for values cached by the 'use cache' React hook.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly cache: UseCacheCacheStore\n\n  /**\n   * A mutable Map store for cached fetch responses.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly fetch: FetchCacheStore\n\n  /**\n   * A mutable Map store for encrypted bound args of inline server functions.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly encryptedBoundArgs: EncryptedBoundArgsCacheStore\n\n  /**\n   * A mutable Map store for decrypted bound args of inline server functions.\n   * This is only intended for in-memory usage during pre-rendering, and must\n   * not be persisted in the resume store. Supports both 'get' and 'set'\n   * operations to build the cache during pre-rendering.\n   */\n  readonly decryptedBoundArgs: DecryptedBoundArgsCacheStore\n\n  /**\n   * A mutable in-memory Map store for rendered `ImageResponse` array buffers.\n   * Filled during the prospective prerender and read during the final\n   * prerender. Never persisted in the resume store.\n   */\n  readonly imageResponses: ImageResponseCacheStore\n\n  /**\n   * Tracks serialized cache keys that were intentionally skipped during the\n   * prospective prerender (e.g. because the cached function accessed fallback\n   * params or other dynamic data). During the final prerender, a key in this\n   * set is returned as a hanging promise early, without attempting to look up\n   * or generate a cache entry.\n   *\n   * This is intentionally not serialized. It is only used in-memory within a\n   * single prerender cycle (prospective to final). During the resume at request\n   * time, a cache miss for a dynamic key should generate a fresh entry rather\n   * than being short-circuited.\n   */\n  readonly dynamicCacheKeys: Set<string>\n}\n\n/**\n * Discriminated union of the two resume data cache flavors. Consumers should\n * narrow via `resumeDataCache.mutable` to access the mutable Map API (only\n * available on `PrerenderResumeDataCache`).\n */\nexport type ResumeDataCache = RenderResumeDataCache | PrerenderResumeDataCache\n\ntype ResumeStoreSerialized = {\n  store: {\n    cache: {\n      [key: string]: any\n    }\n    fetch: {\n      [key: string]: any\n    }\n    encryptedBoundArgs: {\n      [key: string]: string\n    }\n  }\n}\n\n/**\n * Serializes a resume data cache into a JSON string for storage or\n * transmission. Handles 'use cache' values, fetch responses, and encrypted\n * bound args for inline server functions.\n *\n * @param resumeDataCache - The immutable cache to serialize\n * @returns A Promise that resolves to the serialized cache as a JSON string, or\n * 'null' if empty\n */\nexport async function stringifyResumeDataCache(\n  resumeDataCache: ResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`stringifyResumeDataCache` should not be called in edge runtime.'\n    )\n  } else {\n    if (resumeDataCache.fetch.size === 0 && resumeDataCache.cache.size === 0) {\n      return 'null'\n    }\n\n    const json: ResumeStoreSerialized = {\n      store: {\n        fetch: Object.fromEntries(Array.from(resumeDataCache.fetch.entries())),\n        cache: Object.fromEntries(\n          (\n            await serializeUseCacheCacheStore(\n              resumeDataCache.cache.entries(),\n              isCacheComponentsEnabled\n            )\n          ).filter(\n            (entry): entry is [string, UseCacheCacheStoreSerialized] =>\n              entry !== null\n          )\n        ),\n        encryptedBoundArgs: Object.fromEntries(\n          Array.from(resumeDataCache.encryptedBoundArgs.entries())\n        ),\n      },\n    }\n\n    // Compress the JSON string using zlib. As the data we already want to\n    // decompress is in memory, we use the synchronous deflateSync function.\n    const { deflateSync } = require('node:zlib') as typeof import('node:zlib')\n\n    return deflateSync(JSON.stringify(json)).toString('base64')\n  }\n}\n\n/**\n * Creates a new empty mutable resume data cache for pre-rendering.\n * Initializes fresh Map instances for both the 'use cache' and fetch caches.\n * Used at the start of pre-rendering to begin collecting cached values.\n *\n * @returns A new empty PrerenderResumeDataCache instance\n */\nexport function createPrerenderResumeDataCache(\n  source?: ResumeDataCache\n): PrerenderResumeDataCache {\n  if (source) {\n    return {\n      mutable: true,\n      cache: new Map(source.cache),\n      fetch: new Map(source.fetch),\n      encryptedBoundArgs: new Map(source.encryptedBoundArgs),\n      decryptedBoundArgs: new Map(source.decryptedBoundArgs),\n      imageResponses: new Map(source.imageResponses),\n      dynamicCacheKeys: source.dynamicCacheKeys\n        ? new Set(source.dynamicCacheKeys)\n        : new Set(),\n    }\n  } else {\n    return {\n      mutable: true,\n      cache: new Map(),\n      fetch: new Map(),\n      encryptedBoundArgs: new Map(),\n      decryptedBoundArgs: new Map(),\n      imageResponses: new Map(),\n      dynamicCacheKeys: new Set(),\n    }\n  }\n}\n\n/**\n * Creates an immutable render resume data cache from either:\n * 1. An existing prerender cache instance\n * 2. A serialized cache string\n *\n * @param renderResumeDataCache - A RenderResumeDataCache instance to be used directly\n * @param prerenderResumeDataCache - A PrerenderResumeDataCache instance to convert to immutable\n * @param persistedCache - A serialized cache string to parse\n * @param maxPostponedStateSizeBytes - The max compressed size limit in bytes (used to calculate 5x decompression limit)\n * @returns An immutable RenderResumeDataCache instance\n */\nexport function createRenderResumeDataCache(\n  resumeDataCache: ResumeDataCache\n): RenderResumeDataCache\nexport function createRenderResumeDataCache(\n  persistedCache: string,\n  maxPostponedStateSizeBytes: number | undefined\n): RenderResumeDataCache\nexport function createRenderResumeDataCache(\n  resumeDataCacheOrPersistedCache: ResumeDataCache | string,\n  maxPostponedStateSizeBytes?: number | undefined\n): RenderResumeDataCache {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`createRenderResumeDataCache` should not be called in edge runtime.'\n    )\n  } else {\n    if (typeof resumeDataCacheOrPersistedCache !== 'string') {\n      // If the cache is already read-only, return it directly. Otherwise we\n      // perform a type change by overriding the discriminator — the underlying\n      // Map references are still shared, but callers should treat the result\n      // as immutable.\n      if (!resumeDataCacheOrPersistedCache.mutable) {\n        return resumeDataCacheOrPersistedCache\n      }\n      return { ...resumeDataCacheOrPersistedCache, mutable: false }\n    }\n\n    if (resumeDataCacheOrPersistedCache === 'null') {\n      return {\n        mutable: false,\n        cache: new Map(),\n        fetch: new Map(),\n        encryptedBoundArgs: new Map(),\n        decryptedBoundArgs: new Map(),\n        imageResponses: new Map(),\n      }\n    }\n\n    // This should be a compressed string. Let's decompress it using zlib.\n    // As the data we already want to decompress is in memory, we use the\n    // synchronous inflateSync function.\n    const { inflateSync } = require('node:zlib') as typeof import('node:zlib')\n\n    // Limit decompressed size to prevent zipbomb attacks. This is 5x the\n    // configured maxPostponedStateSize, allowing reasonable compression\n    // ratios while preventing extreme decompression bombs.\n    // Default is 500MB (5x the default 100MB compressed limit).\n    const maxDecompressedSize = maxPostponedStateSizeBytes\n      ? maxPostponedStateSizeBytes * 5\n      : 500 * 1024 * 1024\n\n    let json: ResumeStoreSerialized\n    try {\n      json = JSON.parse(\n        inflateSync(Buffer.from(resumeDataCacheOrPersistedCache, 'base64'), {\n          maxOutputLength: maxDecompressedSize,\n        }).toString('utf-8')\n      )\n    } catch (err: unknown) {\n      if (\n        err instanceof RangeError &&\n        (err as NodeJS.ErrnoException).code === 'ERR_BUFFER_TOO_LARGE'\n      ) {\n        throw new Error(\n          `Decompressed resume data cache exceeded ${maxDecompressedSize} byte limit`\n        )\n      }\n      throw err\n    }\n\n    return {\n      mutable: false,\n      cache: parseUseCacheCacheStore(Object.entries(json.store.cache)),\n      fetch: new Map(Object.entries(json.store.fetch)),\n      encryptedBoundArgs: new Map(\n        Object.entries(json.store.encryptedBoundArgs)\n      ),\n      decryptedBoundArgs: new Map(),\n      imageResponses: new Map(),\n    }\n  }\n}\n","import { unpatchedSetImmediate } from '../node-environment-extensions/fast-set-immediate.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst MAX_ACTIVE_DEV_VALIDATIONS = 100\n\nexport interface DevValidationGeneration {\n  readonly signal: AbortSignal\n  finish(): void\n}\n\nexport class DevValidationScheduler {\n  private readonly currentValidationByDocument = new Map<\n    string,\n    AbortController\n  >()\n\n  constructor(private readonly maxActiveValidations: number) {\n    if (maxActiveValidations < 1) {\n      throw new InvariantError(\n        'DevValidationScheduler requires at least one active validation'\n      )\n    }\n  }\n\n  get size(): number {\n    return this.currentValidationByDocument.size\n  }\n\n  begin(htmlRequestId: string): DevValidationGeneration {\n    const previousController =\n      this.currentValidationByDocument.get(htmlRequestId)\n    if (previousController !== undefined) {\n      this.currentValidationByDocument.delete(htmlRequestId)\n      previousController.abort()\n    }\n\n    if (this.currentValidationByDocument.size >= this.maxActiveValidations) {\n      const oldestEntry = this.currentValidationByDocument\n        .entries()\n        .next().value\n      if (oldestEntry !== undefined) {\n        const [oldestHtmlRequestId, oldestController] = oldestEntry\n        this.currentValidationByDocument.delete(oldestHtmlRequestId)\n        oldestController.abort()\n      }\n    }\n\n    const controller = new AbortController()\n    this.currentValidationByDocument.set(htmlRequestId, controller)\n\n    return {\n      signal: controller.signal,\n      finish: () => {\n        // A superseded generation may settle after its replacement. Only the\n        // current generation is allowed to remove this document's entry.\n        if (\n          this.currentValidationByDocument.get(htmlRequestId) === controller\n        ) {\n          this.currentValidationByDocument.delete(htmlRequestId)\n        }\n      },\n    }\n  }\n}\n\n// Only active validation work is retained. The hard cap also bounds the\n// registry if user code suspends indefinitely and the work never settles.\nconst devValidationScheduler = new DevValidationScheduler(\n  MAX_ACTIVE_DEV_VALIDATIONS\n)\n\nexport function beginDevValidation(\n  htmlRequestId: string\n): DevValidationGeneration {\n  return devValidationScheduler.begin(htmlRequestId)\n}\n\n/**\n * Give incoming requests a chance to enter app rendering and supersede the\n * current validation before another expensive render attempt starts.\n *\n * The regular global `setImmediate` is patched by staged rendering and can run\n * inside the current timer task. The original immediate is required here so we\n * actually pass through the event-loop poll phase where HTTP requests arrive.\n */\nexport async function yieldToForegroundRequest(\n  validationSignal: AbortSignal\n): Promise<boolean> {\n  if (validationSignal.aborted) {\n    return false\n  }\n\n  await new Promise<void>((resolve) => unpatchedSetImmediate(resolve))\n  return !validationSignal.aborted\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport type { FlightRouterState } from '../../shared/lib/app-router-types'\n\nconst ANNOUNCER_TYPE = 'next-route-announcer'\nconst ANNOUNCER_ID = '__next-route-announcer__'\n\nfunction getAnnouncerNode() {\n  const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0]\n  if (existingAnnouncer?.shadowRoot?.childNodes[0]) {\n    return existingAnnouncer.shadowRoot.childNodes[0] as HTMLElement\n  } else {\n    const container = document.createElement(ANNOUNCER_TYPE)\n    container.style.cssText = 'position:absolute'\n    const announcer = document.createElement('div')\n    announcer.ariaLive = 'assertive'\n    announcer.id = ANNOUNCER_ID\n    announcer.role = 'alert'\n    announcer.style.cssText =\n      'position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal'\n\n    // Use shadow DOM here to avoid any potential CSS bleed\n    const shadow = container.attachShadow({ mode: 'open' })\n    shadow.appendChild(announcer)\n    document.body.appendChild(container)\n    return announcer\n  }\n}\n\nexport function AppRouterAnnouncer({ tree }: { tree: FlightRouterState }) {\n  const [portalNode, setPortalNode] = useState<HTMLElement | null>(null)\n\n  useEffect(() => {\n    const announcer = getAnnouncerNode()\n    setPortalNode(announcer)\n    return () => {\n      const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0]\n      if (container?.isConnected) {\n        document.body.removeChild(container)\n      }\n    }\n  }, [])\n\n  const [routeAnnouncement, setRouteAnnouncement] = useState('')\n  const previousTitle = useRef<string | undefined>(undefined)\n\n  useEffect(() => {\n    let currentTitle = ''\n    if (document.title) {\n      currentTitle = document.title\n    } else {\n      const pageHeader = document.querySelector('h1')\n      if (pageHeader) {\n        currentTitle = pageHeader.innerText || pageHeader.textContent || ''\n      }\n    }\n\n    // Only announce the title change, but not for the first load because screen\n    // readers do that automatically.\n    if (\n      previousTitle.current !== undefined &&\n      previousTitle.current !== currentTitle\n    ) {\n      setRouteAnnouncement(currentTitle)\n    }\n    previousTitle.current = currentTitle\n  }, [tree])\n\n  return portalNode ? createPortal(routeAnnouncement, portalNode) : null\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `forbidden` docs\n/**\n * @experimental\n * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)\n * within a route segment as well as inject a tag.\n *\n * `forbidden()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`\n\nexport function forbidden(): never {\n  if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n    throw new Error(\n      `\\`forbidden()\\` is experimental and only allowed to be enabled when \\`experimental.authInterrupts\\` is enabled.`\n    )\n  }\n\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n  throw error\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `unauthorized` docs\n/**\n * @experimental\n * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)\n * within a route segment as well as inject a tag.\n *\n * `unauthorized()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n *\n * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`\n\nexport function unauthorized(): never {\n  if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n    throw new Error(\n      `\\`unauthorized()\\` is experimental and only allowed to be used when \\`experimental.authInterrupts\\` is enabled.`\n    )\n  }\n\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n  throw error\n}\n","import type { Params } from '../../server/request/params'\n\nimport React, { useContext, useMemo, use } from 'react'\nimport {\n  AppRouterContext,\n  LayoutRouterContext,\n  type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n  SearchParamsContext,\n  PathnameContext,\n  PathParamsContext,\n  NavigationPromisesContext,\n  ReadonlyURLSearchParams,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n  computeSelectedLayoutSegment,\n  getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\nimport {\n  useDynamicRouteParams,\n  useDynamicSearchParams,\n} from './navigation-dynamic-rendering'\n\nconst {\n  instrumentParamsForClientValidation,\n  instrumentSearchParamsForClientValidation,\n  expectCompleteParamsInClientValidation,\n} = process.env.__NEXT_CACHE_COMPONENTS\n  ? (require('./instant-samples') as typeof import('./instant-samples'))\n  : {}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you *read* the current URL's search parameters.\n *\n * Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams)\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useSearchParams } from 'next/navigation'\n *\n * export default function Page() {\n *   const searchParams = useSearchParams()\n *   searchParams.get('foo') // returns 'bar' when ?foo=bar\n *   // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSearchParams`](https://nextjs.org/docs/app/api-reference/functions/use-search-params)\n */\n// Client components API\nexport function useSearchParams(): ReadonlyURLSearchParams {\n  useDynamicSearchParams?.('useSearchParams()')\n\n  const searchParams = useContext(SearchParamsContext)\n\n  // In the case where this is `null`, the compat types added in\n  // `next-env.d.ts` will add a new overload that changes the return type to\n  // include `null`.\n  const readonlySearchParams = useMemo((): ReadonlyURLSearchParams => {\n    if (!searchParams) {\n      // When the router is not ready in pages, we won't have the search params\n      // available.\n      return null!\n    }\n\n    return new ReadonlyURLSearchParams(searchParams)\n  }, [searchParams])\n\n  // During build-time instant validation, wrap with an proxy\n  // so that accessing undeclared search params throws an error.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    readonlySearchParams\n  ) {\n    return instrumentSearchParamsForClientValidation!(readonlySearchParams)\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.searchParams)\n    }\n  }\n\n  return readonlySearchParams\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the current URL's pathname.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { usePathname } from 'next/navigation'\n *\n * export default function Page() {\n *  const pathname = usePathname() // returns \"/dashboard\" on /dashboard?foo=bar\n *  // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `usePathname`](https://nextjs.org/docs/app/api-reference/functions/use-pathname)\n */\n// Client components API\nexport function usePathname(): string {\n  useDynamicRouteParams?.('usePathname()')\n\n  // In the case where this is `null`, the compat types added in `next-env.d.ts`\n  // will add a new overload that changes the return type to include `null`.\n  const pathname = useContext(PathnameContext) as string\n\n  // During build-time instant validation, error if fallback params exist\n  // because usePathname() can't return a sensible value without all params.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    pathname\n  ) {\n    expectCompleteParamsInClientValidation!('usePathname()')\n    return pathname\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.pathname)\n    }\n  }\n\n  return pathname\n}\n\n// Client components API\nexport {\n  ServerInsertedHTMLContext,\n  useServerInsertedHTML,\n} from '../../shared/lib/server-inserted-html.shared-runtime'\n\n/**\n *\n * This hook allows you to programmatically change routes inside [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components).\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useRouter } from 'next/navigation'\n *\n * export default function Page() {\n *  const router = useRouter()\n *  // ...\n *  router.push('/dashboard') // Navigate to /dashboard\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/app/api-reference/functions/use-router)\n */\n// Client components API\nexport function useRouter(): AppRouterInstance {\n  const router = useContext(AppRouterContext)\n  if (router === null) {\n    throw new Error('invariant expected app router to be mounted')\n  }\n\n  // Read the bfcacheId of the closest CacheNode and merge it into the\n  // returned router instance. This is contextual: callers in a shared\n  // layout get the layout's id; callers in a leaf segment get the leaf's.\n  // The id is stored on the CacheNode as a number and materialized as a\n  // string here. The format mirrors React's `useId()` (e.g. `_r_0_`) with\n  // a `b` prefix, so the id can be safely concatenated with other keys\n  // without collision.\n  const layout = useContext(LayoutRouterContext)\n  const bfcacheIdNumber = layout?.parentCacheNode.bfcacheId ?? 0\n  return useMemo<AppRouterInstance>(\n    () => ({\n      back: router.back,\n      forward: router.forward,\n      refresh: router.refresh,\n      hmrRefresh: router.hmrRefresh,\n      push: router.push,\n      replace: router.replace,\n      prefetch: router.prefetch,\n      experimental_gesturePush: router.experimental_gesturePush,\n      bfcacheId: '_b_' + bfcacheIdNumber + '_',\n    }),\n    [router, bfcacheIdNumber]\n  )\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read a route's dynamic params filled in by the current URL.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useParams } from 'next/navigation'\n *\n * export default function Page() {\n *   // on /dashboard/[team] where pathname is /dashboard/nextjs\n *   const { team } = useParams() // team === \"nextjs\"\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useParams`](https://nextjs.org/docs/app/api-reference/functions/use-params)\n */\n// Client components API\nexport function useParams<T extends Params = Params>(): T {\n  useDynamicRouteParams?.('useParams()')\n\n  const params = useContext(PathParamsContext) as T\n\n  // During build-time instant validation, wrap with a proxy\n  // so that accessing undeclared params throws an error.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    params\n  ) {\n    return instrumentParamsForClientValidation!(params)\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.params) as T\n    }\n  }\n\n  return params\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segments **below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n *\n * import { useSelectedLayoutSegments } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n *   const segments = useSelectedLayoutSegments()\n *\n *   return (\n *     <ul>\n *       {segments.map((segment, index) => (\n *         <li key={index}>{segment}</li>\n *       ))}\n *     </ul>\n *   )\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegments`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments)\n */\n// Client components API\nexport function useSelectedLayoutSegments(\n  parallelRouteKey: string = 'children'\n): string[] {\n  useDynamicRouteParams?.('useSelectedLayoutSegments()')\n\n  const context = useContext(LayoutRouterContext)\n  // @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts\n  if (!context) return null\n\n  // During build-time instant validation, error if fallback params exist\n  // because useSelectedLayoutSegments() can't return a sensible value without all params.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    context\n  ) {\n    expectCompleteParamsInClientValidation!('useSelectedLayoutSegments()')\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      const promise =\n        navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey)\n      if (promise) {\n        // We should always have a promise here, but if we don't, it's not worth erroring over.\n        // We just won't be able to instrument it, but can still provide the value.\n        return use(promise)\n      }\n    }\n  }\n\n  return getSelectedLayoutSegmentPath(context.parentTree, parallelRouteKey)\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segment **one level below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n * import { useSelectedLayoutSegment } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n *   const segment = useSelectedLayoutSegment()\n *\n *   return <p>Active segment: {segment}</p>\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegment`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment)\n */\n// Client components API\nexport function useSelectedLayoutSegment(\n  parallelRouteKey: string = 'children'\n): string | null {\n  useDynamicRouteParams?.('useSelectedLayoutSegment()')\n  const navigationPromises = useContext(NavigationPromisesContext)\n  const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey)\n\n  // During build-time instant validation, error if fallback params exist\n  // because useSelectedLayoutSegment() can't return a sensible value without all params.\n  if (typeof window === 'undefined' && process.env.__NEXT_CACHE_COMPONENTS) {\n    expectCompleteParamsInClientValidation!('useSelectedLayoutSegment()')\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    navigationPromises &&\n    'use' in React\n  ) {\n    const promise =\n      navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey)\n    if (promise) {\n      // We should always have a promise here, but if we don't, it's not worth erroring over.\n      // We just won't be able to instrument it, but can still provide the value.\n      return use(promise)\n    }\n  }\n\n  return computeSelectedLayoutSegment(selectedLayoutSegments, parallelRouteKey)\n}\n\nexport { unstable_isUnrecognizedActionError } from './unrecognized-action-error'\n\n// Shared components APIs\nexport {\n  // We need the same class that was used to instantiate the context value\n  // Otherwise instanceof checks will fail in usercode\n  ReadonlyURLSearchParams,\n}\nexport {\n  notFound,\n  forbidden,\n  unauthorized,\n  redirect,\n  permanentRedirect,\n  RedirectType,\n  unstable_rethrow,\n} from './navigation.react-server'\n","'use client'\nimport React, { useEffect } from 'react'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useRouter } from './navigation'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { type RedirectType, isRedirectError } from './redirect-error'\n\ninterface RedirectBoundaryProps {\n  router: AppRouterInstance\n  children: React.ReactNode\n}\n\nfunction HandleRedirect({\n  redirect,\n  reset,\n  redirectType,\n}: {\n  redirect: string\n  redirectType: RedirectType\n  reset: () => void\n}) {\n  const router = useRouter()\n\n  useEffect(() => {\n    React.startTransition(() => {\n      if (redirectType === 'push') {\n        router.push(redirect, {})\n      } else {\n        router.replace(redirect, {})\n      }\n      reset()\n    })\n  }, [redirect, redirectType, reset, router])\n\n  return null\n}\n\nexport class RedirectErrorBoundary extends React.Component<\n  RedirectBoundaryProps,\n  { redirect: string | null; redirectType: RedirectType | null }\n> {\n  constructor(props: RedirectBoundaryProps) {\n    super(props)\n    this.state = { redirect: null, redirectType: null }\n  }\n\n  static getDerivedStateFromError(error: unknown) {\n    if (isRedirectError(error)) {\n      const url = getURLFromRedirectError(error)\n      const redirectType = getRedirectTypeFromError(error)\n      if ('handled' in error) {\n        // The redirect was already handled. We'll still catch the redirect error\n        // so that we can remount the subtree, but we don't actually need to trigger the\n        // router.push.\n        return { redirect: null, redirectType: null }\n      }\n\n      return { redirect: url, redirectType }\n    }\n    // Re-throw if error is not for redirect\n    throw error\n  }\n\n  // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n  render(): React.ReactNode {\n    const { redirect, redirectType } = this.state\n    if (redirect !== null && redirectType !== null) {\n      return (\n        <HandleRedirect\n          redirect={redirect}\n          redirectType={redirectType}\n          reset={() => this.setState({ redirect: null })}\n        />\n      )\n    }\n\n    return this.props.children\n  }\n}\n\nexport function RedirectBoundary({ children }: { children: React.ReactNode }) {\n  const router = useRouter()\n  return (\n    <RedirectErrorBoundary router={router}>{children}</RedirectErrorBoundary>\n  )\n}\n","import type { Segment } from '../../../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\n\nexport function createRouterCacheKey(\n  segment: Segment,\n  withoutSearchParameters: boolean = false\n) {\n  // if the segment is an array, it means it's a dynamic segment\n  // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.\n  if (Array.isArray(segment)) {\n    return `${segment[0]}|${segment[1]}|${segment[2]}`\n  }\n\n  // Page segments might have search parameters, ie __PAGE__?foo=bar\n  // When `withoutSearchParameters` is true, we only want to return the page segment\n  if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {\n    return PAGE_SEGMENT_KEY\n  }\n\n  return segment\n}\n","/**\n * Create a \"Thenable\" that does not resolve. This is used to suspend indefinitely when data is not available yet.\n */\nexport const unresolvedThenable = {\n  then: () => {},\n} as PromiseLike<void>\n","'use client'\n\nimport { Component, createRef, type ReactNode } from 'react'\n\ninterface ErrorBoundaryProps {\n  children: ReactNode\n}\n\ninterface ErrorBoundaryState {\n  hasError: boolean\n}\n\nfunction getDomNodeAttributes(node: HTMLElement): Record<string, string> {\n  const result: Record<string, string> = {}\n  for (let i = 0; i < node.attributes.length; i++) {\n    const attr = node.attributes[i]\n    result[attr.name] = attr.value\n  }\n  return result\n}\n\nexport class GracefulDegradeBoundary extends Component<\n  ErrorBoundaryProps,\n  ErrorBoundaryState\n> {\n  private rootHtml: string\n  private htmlAttributes: Record<string, string>\n  private htmlRef: React.RefObject<HTMLHtmlElement | null>\n\n  constructor(props: ErrorBoundaryProps) {\n    super(props)\n    this.state = { hasError: false }\n    this.rootHtml = ''\n    this.htmlAttributes = {}\n    this.htmlRef = createRef<HTMLHtmlElement>()\n  }\n\n  static getDerivedStateFromError(_: unknown): ErrorBoundaryState {\n    return { hasError: true }\n  }\n\n  componentDidMount() {\n    const htmlNode = this.htmlRef.current\n    if (this.state.hasError && htmlNode) {\n      // Reapply the cached HTML attributes to the root element\n      Object.entries(this.htmlAttributes).forEach(([key, value]) => {\n        htmlNode.setAttribute(key, value)\n      })\n    }\n  }\n\n  render() {\n    const { hasError } = this.state\n    // Cache the root HTML content on the first render\n    if (typeof window !== 'undefined' && !this.rootHtml) {\n      this.rootHtml = document.documentElement.innerHTML\n      this.htmlAttributes = getDomNodeAttributes(document.documentElement)\n    }\n\n    if (hasError) {\n      // Render the current HTML content without hydration\n      return (\n        <html\n          ref={this.htmlRef}\n          suppressHydrationWarning\n          dangerouslySetInnerHTML={{\n            __html: this.rootHtml,\n          }}\n        />\n      )\n    }\n\n    return this.props.children\n  }\n}\n\nexport default GracefulDegradeBoundary\n","'use client'\n\nimport React, { type JSX } from 'react'\nimport GracefulDegradeBoundary from './graceful-degrade-boundary'\nimport { ErrorBoundary, type ErrorBoundaryProps } from '../error-boundary'\nimport { isBot } from '../../../shared/lib/router/utils/is-bot'\n\nconst isBotUserAgent =\n  typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport default function RootErrorBoundary({\n  children,\n  errorComponent,\n  errorStyles,\n  errorScripts,\n}: ErrorBoundaryProps & { children: React.ReactNode }): JSX.Element {\n  if (isBotUserAgent) {\n    // Preserve existing DOM/HTML for bots to avoid replacing content with an error UI\n    // and to keep the original SSR output intact.\n    return <GracefulDegradeBoundary>{children}</GracefulDegradeBoundary>\n  }\n\n  return (\n    <ErrorBoundary\n      errorComponent={errorComponent}\n      errorStyles={errorStyles}\n      errorScripts={errorScripts}\n    >\n      {children}\n    </ErrorBoundary>\n  )\n}\n","'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n  METADATA_BOUNDARY_NAME,\n  VIEWPORT_BOUNDARY_NAME,\n  OUTLET_BOUNDARY_NAME,\n  ROOT_LAYOUT_BOUNDARY_NAME,\n} from './boundary-constants'\n\n// We use a namespace object to allow us to recover the name of the function\n// at runtime even when production bundling/minification is used.\nconst NameSpace = {\n  [METADATA_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [VIEWPORT_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [OUTLET_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [ROOT_LAYOUT_BOUNDARY_NAME]: function ({\n    children,\n  }: {\n    children: ReactNode\n  }) {\n    return children\n  },\n}\n\nexport const MetadataBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[METADATA_BOUNDARY_NAME.slice(0) as typeof METADATA_BOUNDARY_NAME]\n\nexport const ViewportBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[VIEWPORT_BOUNDARY_NAME.slice(0) as typeof VIEWPORT_BOUNDARY_NAME]\n\nexport const OutletBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[OUTLET_BOUNDARY_NAME.slice(0) as typeof OUTLET_BOUNDARY_NAME]\n\nexport const RootLayoutBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[\n    ROOT_LAYOUT_BOUNDARY_NAME.slice(0) as typeof ROOT_LAYOUT_BOUNDARY_NAME\n  ]\n","import type {\n  FlightRouterState,\n  CacheNode,\n} from '../../../../shared/lib/app-router-types'\nimport { DEFAULT_SEGMENT_KEY } from '../../../../shared/lib/segment'\nimport { createRouterCacheKey } from '../create-router-cache-key'\n\nexport function findHeadInCache(\n  cache: CacheNode,\n  parallelRoutes: FlightRouterState[1]\n): [CacheNode, string, string] | null {\n  return findHeadInCacheImpl(cache, parallelRoutes, '', '')\n}\n\nfunction findHeadInCacheImpl(\n  cache: CacheNode,\n  parallelRoutes: FlightRouterState[1],\n  keyPrefix: string,\n  keyPrefixWithoutSearchParams: string\n): [CacheNode, string, string] | null {\n  const isLastItem = Object.keys(parallelRoutes).length === 0\n  if (isLastItem) {\n    // Returns the entire Cache Node of the segment whose head we will render.\n    return [cache, keyPrefix, keyPrefixWithoutSearchParams]\n  }\n\n  // First try the 'children' parallel route if it exists\n  // when starting from the \"root\", this corresponds with the main page component\n  const parallelRoutesKeys = Object.keys(parallelRoutes).filter(\n    (key) => key !== 'children'\n  )\n\n  // if we are at the root, we need to check the children slot first\n  if ('children' in parallelRoutes) {\n    parallelRoutesKeys.unshift('children')\n  }\n\n  const slots = cache.slots\n  if (slots !== null) {\n    for (const key of parallelRoutesKeys) {\n      const [segment, childParallelRoutes] = parallelRoutes[key]\n      // If the parallel is not matched and using the default segment,\n      // skip searching the head from it.\n      if (segment === DEFAULT_SEGMENT_KEY) {\n        continue\n      }\n\n      const childCacheNode = slots[key]\n      if (!childCacheNode) {\n        continue\n      }\n\n      const cacheKey = createRouterCacheKey(segment)\n      const cacheKeyWithoutSearchParams = createRouterCacheKey(segment, true)\n\n      const item = findHeadInCacheImpl(\n        childCacheNode,\n        childParallelRoutes,\n        keyPrefix + '/' + cacheKey,\n        keyPrefix + '/' + cacheKeyWithoutSearchParams\n      )\n\n      if (item) {\n        return item\n      }\n    }\n  }\n\n  return null\n}\n","import type { InitialRSCPayload } from '../../../shared/lib/app-router-types'\n\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { extractPathFromFlightRouterState } from './compute-changed-path'\n\nimport type { AppRouterState } from './router-reducer-types'\nimport { getFlightDataPartsFromPath } from '../../flight-data-helpers'\nimport { createInitialCacheNodeForHydration } from './ppr-navigations'\nimport {\n  convertRootFlightRouterStateToRouteTree,\n  resolveStaleAt,\n  processRuntimePrefetchStream,\n  segmentCacheMap,\n  writeDynamicRenderResponseIntoCache,\n  writePrerenderResponseIntoCache,\n} from '../segment-cache/cache'\nimport { FetchStrategy } from '../segment-cache/types'\nimport {\n  UnknownDynamicStaleTime,\n  computeDynamicStaleAt,\n} from '../segment-cache/bfcache'\nimport { decodeStageUntilBoundary } from './fetch-server-response'\nimport { discoverKnownRoute } from '../segment-cache/optimistic-routes'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\n\nexport interface InitialRouterStateParameters {\n  navigatedAt: number\n  initialRSCPayload: InitialRSCPayload\n  initialFlightStreamForCache?: ReadableStream<Uint8Array> | null\n  location: Location | null\n}\n\nexport function createInitialRouterState({\n  navigatedAt,\n  initialRSCPayload,\n  initialFlightStreamForCache,\n  location,\n}: InitialRouterStateParameters): AppRouterState {\n  const {\n    c: initialCanonicalUrlParts,\n    f: initialFlightData,\n    q: initialRenderedSearch,\n    i: initialCouldBeIntercepted,\n    S: initialSupportsPerSegmentPrefetching,\n    s: initialStaleTime,\n    l: initialStaticStageByteLength,\n    h: initialHeadVaryParams,\n    r: initialRootVaryParams,\n    p: initialRuntimePrefetchStream,\n    d: initialDynamicStaleTimeSeconds,\n  } = initialRSCPayload\n\n  // When initialized on the server, the canonical URL is provided as an array of parts.\n  // This is to ensure that when the RSC payload streamed to the client, crawlers don't interpret it\n  // as a URL that should be crawled.\n  const initialCanonicalUrl = initialCanonicalUrlParts.join('/')\n\n  const normalizedFlightData = getFlightDataPartsFromPath(initialFlightData[0])\n  const {\n    tree: initialTree,\n    seedData: initialSeedData,\n    head: initialHead,\n  } = normalizedFlightData\n  // For the SSR render, seed data should always be available (we only send back a `null` response\n  // in the case of a `loading` segment, pre-PPR.)\n\n  const canonicalUrl =\n    // location.href is read as the initial value for canonicalUrl in the browser\n    // This is safe to do as canonicalUrl can't be rendered, it's only used to control the history updates in the useEffect further down in this file.\n    location\n      ? // window.location does not have the same type as URL but has all the fields createHrefFromUrl needs.\n        createHrefFromUrl(location)\n      : initialCanonicalUrl\n\n  // Convert the initial FlightRouterState into the RouteTree type.\n  // NOTE: The metadataVaryPath isn't used for anything currently because the\n  // head is embedded into the CacheNode tree, but eventually we'll lift it out\n  // and store it on the top-level state object.\n  //\n  // For statically-generated-at-build-time HTML pages, the FlightRouterState\n  // baked into the initial RSC payload won't have the correct segment inlining\n  // hints because those are computed after the pre-render. The server marks\n  // these trees with InliningHintsStale, which causes the route cache entry\n  // to be immediately expired. The next prefetch will re-fetch the tree with\n  // correct hints from the /_tree response.\n  const acc = { metadataVaryPath: null, treeDivergedFromBase: false }\n  const initialRouteTree = convertRootFlightRouterStateToRouteTree(\n    initialTree,\n    initialRenderedSearch as NormalizedSearch,\n    acc\n  )\n  const metadataVaryPath = acc.metadataVaryPath\n  const initialTask = createInitialCacheNodeForHydration(\n    navigatedAt,\n    initialRouteTree,\n    initialSeedData,\n    initialHead,\n    computeDynamicStaleAt(\n      navigatedAt,\n      initialDynamicStaleTimeSeconds ?? UnknownDynamicStaleTime\n    )\n  )\n\n  // The following only applies in the browser (location !== null) since neither\n  // route learning nor segment cache state persists from SSR to client.\n  if (location !== null && metadataVaryPath !== null) {\n    // Learn the route pattern so we can predict it for future navigations.\n    discoverKnownRoute(\n      Date.now(),\n      location.pathname,\n      location.search as NormalizedSearch,\n      null, // nextUrl — initial render is never an interception\n      null, // No pending entry\n      initialRouteTree,\n      metadataVaryPath,\n      initialCouldBeIntercepted,\n      canonicalUrl,\n      initialSupportsPerSegmentPrefetching,\n      false // hasDynamicRewrite\n    )\n\n    // TODO: Implement Shell extraction as part of Cached Navigations.\n    // Intentionally holding off on doing this until we decide how the Cached\n    // Navigations behavior should work in combination with App Shells.\n\n    // Write the initial seed data into the segment cache so subsequent\n    // navigations to the initial page can serve cached segments instantly.\n    if (initialSeedData !== null && initialStaleTime !== undefined) {\n      if (\n        initialStaticStageByteLength !== undefined &&\n        initialFlightStreamForCache != null\n      ) {\n        // Partially static page — truncate the cloned Flight stream at the\n        // static stage byte boundary, decode, and cache the static subset.\n        // Promise.resolve wraps the Flight-deserialized thenable into a\n        // native Promise so we can chain `.then` on it safely.\n        Promise.resolve(initialStaticStageByteLength)\n          .then(async (byteLength) => {\n            const staticStageResponse =\n              await decodeStageUntilBoundary<InitialRSCPayload>(\n                initialFlightStreamForCache,\n                byteLength,\n                undefined\n              )\n            const now = Date.now()\n            const staleAt = await resolveStaleAt(now, staticStageResponse.s)\n\n            writePrerenderResponseIntoCache(\n              now,\n              FetchStrategy.PPR,\n              staticStageResponse.f,\n              undefined, // no build ID mismatch check for initial HTML\n              staticStageResponse.h,\n              staticStageResponse.r ?? null,\n              staleAt,\n              initialTree,\n              initialRenderedSearch,\n              true, // isResponsePartial\n              segmentCacheMap // hydration writes are bound to the shared map\n            )\n          })\n          .catch(() => {\n            // The static stage processing failed. Not fatal — the page\n            // rendered normally, we just won't write into the cache.\n          })\n      } else {\n        // Fully static page — cache the entire decoded seed data as-is. We're\n        // not using the initial response here (which would allow us to combine\n        // the two branches) to avoid unnecessary decoding of the Flight data,\n        // since we can just take the seed data that we already decoded during\n        // hydration and write it into the cache directly.\n        const now = Date.now()\n\n        resolveStaleAt(now, initialStaleTime)\n          .then((staleAt) => {\n            writePrerenderResponseIntoCache(\n              now,\n              FetchStrategy.PPR,\n              initialFlightData,\n              undefined, // buildId — not applicable for initial HTML\n              initialHeadVaryParams,\n              initialRootVaryParams ?? null,\n              staleAt,\n              initialTree,\n              initialRenderedSearch,\n              false, // isResponsePartial\n              segmentCacheMap // hydration writes are bound to the shared map\n            )\n          })\n          .catch(() => {\n            // The static stage processing failed. Not fatal — the page\n            // rendered normally, we just won't write into the cache.\n          })\n\n        // Cancel the stream clone — fully static path doesn't need it.\n        initialFlightStreamForCache?.cancel()\n      }\n    } else {\n      // No caching — cancel the unused stream clone.\n      initialFlightStreamForCache?.cancel()\n    }\n\n    // If the initial RSC payload includes an embedded runtime prefetch stream,\n    // decode it and write the runtime data into the segment cache. This allows\n    // subsequent navigations to serve runtime-prefetchable content from cache\n    // without a separate prefetch request.\n    if (initialRuntimePrefetchStream != null) {\n      processRuntimePrefetchStream(\n        Date.now(),\n        initialRuntimePrefetchStream,\n        initialTree,\n        initialRenderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              Date.now(),\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.rootVaryParamsIterable,\n              processed.staleAt,\n              processed.navigationSeed,\n              null,\n              segmentCacheMap // hydration writes are bound to the shared map\n            )\n          }\n        })\n        .catch(() => {\n          // Runtime prefetch cache write failed. Not fatal — the page rendered\n          // normally, we just won't cache runtime data.\n        })\n    }\n  }\n\n  // NOTE: We intentionally don't check if any data needs to be fetched from the\n  // server. We assume the initial hydration payload is sufficient to render\n  // the page.\n  //\n  // The completeness of the initial data is an important property that we rely\n  // on as a last-ditch mechanism for recovering the app; we must always be able\n  // to reload a fresh HTML document to get to a consistent state.\n  //\n  // In the future, there may be cases where the server intentionally sends\n  // partial data and expects the client to fill in the rest, in which case this\n  // logic may change. (There already is a similar case where the server sends\n  // _no_ hydration data in the HTML document at all, and the client fetches it\n  // separately, but that's different because we still end up hydrating with a\n  // complete tree.)\n\n  const initialState = {\n    tree: initialTask.route,\n    cache: initialTask.node,\n    pushRef: {\n      pendingPush: false,\n      mpaNavigation: false,\n      // First render needs to preserve the previous window.history.state\n      // to avoid it being overwritten on navigation back/forward with MPA Navigation.\n      preserveCustomHistoryState: true,\n    },\n    focusAndScrollRef: {\n      scrollRef: null,\n      forceScroll: false,\n      onlyHashChange: false,\n      hashFragment: null,\n    },\n    canonicalUrl,\n    renderedSearch: initialRenderedSearch,\n    // the || operator is intentional, the pathname can be an empty string\n    nextUrl:\n      (extractPathFromFlightRouterState(initialTree) || location?.pathname) ??\n      null,\n    previousNextUrl: null,\n    debugInfo: null,\n  }\n\n  return initialState\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { unpatchedSetImmediate } from '../node-environment-extensions/fast-set-immediate.external'\n\n/*\n==========================\n| Background             |\n==========================\n\nNode.js does not guarantee that two timers scheduled back to back will run\non the same iteration of the event loop:\n\n```ts\nsetTimeout(one, 0)\nsetTimeout(two, 0)\n```\n\nInternally, each timer is assigned a `_idleStart` property that holds\nan internal libuv timestamp in millisecond resolution.\nThis will be used to determine if the timer is already \"expired\" and should be executed.\nHowever, even in sync code, it's possible for two timers to get different `_idleStart` values.\nThis can cause one of the timers to be executed, and the other to be delayed until the next timer phase.\n\nThe delaying happens [here](https://github.com/nodejs/node/blob/c208ffc66bb9418ff026c4e3fa82e5b4387bd147/lib/internal/timers.js#L556-L564).\nand can be debugged by running node with `NODE_DEBUG=timer`.\n\nThe easiest way to observe it is to run this program in a loop until it exits with status 1:\n\n```\n// test.js\n\nlet immediateRan = false\nconst t1 = setTimeout(() => {\n  console.log('timeout 1')\n  setImmediate(() => {\n    console.log('immediate 1')\n    immediateRan = true\n  })\n})\n\nconst t2 = setTimeout(() => {\n  console.log('timeout 2')\n  if (immediateRan) {\n    console.log('immediate ran before the second timeout!')\n    console.log(\n      `t1._idleStart: ${t1._idleStart}, t2_idleStart: ${t2._idleStart}`\n    );\n    process.exit(1)\n  }\n})\n```\n\n```bash\n#!/usr/bin/env bash\n\ni=1;\nwhile true; do\n  output=\"$(NODE_DEBUG=timer node test.js 2>&1)\";\n  if [ \"$?\" -eq 1 ]; then\n    echo \"failed after $i iterations\";\n    echo \"$output\";\n    break;\n  fi;\n  i=$((i+1));\ndone\n```\n\nIf `t2` is deferred to the next iteration of the event loop,\nthen the immediate scheduled from inside `t1` will run first.\nWhen this occurs, `_idleStart` is reliably different between `t1` and `t2`.\n\n==========================\n| Solution               |\n==========================\n\nWe can guarantee that multiple timers (with the same delay, usually `0`)\nrun together without any delays by making sure that their `_idleStart`s are the same,\nbecause that's what's used to determine if a timer should be deferred or not.\nLuckily, this property is currently exposed to userland and mutable,\nso we can patch it.\n\nAnother related trick we could potentially apply is making\na timer immediately be considered expired by doing  `timer._idleStart -= 2`.\n(the value must be more than `1`, the delay that actually gets set for `setTimeout(cb, 0)`).\nThis makes node view this timer as \"a 1ms timer scheduled 2ms ago\",\nmeaning that it should definitely run in the next timer phase.\nHowever, I'm not confident we know all the side effects of doing this,\nso for now, simply ensuring coordination is enough.\n*/\n\nlet shouldAttemptPatching = true\n\nfunction warnAboutTimers() {\n  console.warn(\n    \"Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.\\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/\"\n  )\n}\n\n/**\n * Allows scheduling multiple timers (equivalent to `setTimeout(cb, delayMs)`)\n * that are guaranteed to run in the same iteration of the event loop.\n *\n * @param delayMs - the delay to pass to `setTimeout`. (default: 0)\n *\n * */\nexport function createAtomicTimerGroup(delayMs = 0) {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createAtomicTimerGroup cannot be called in the edge runtime'\n    )\n  } else {\n    let isFirstCallback = true\n    let firstTimerIdleStart: number | null = null\n    let didFirstTimerRun = false\n\n    // As a sanity check, we schedule an immediate from the first timeout\n    // to check if the execution was interrupted (i.e. if it ran between the timeouts).\n    // Note that we're deliberately bypassing the \"fast setImmediate\" patch here --\n    // otherwise, this check would always fail, because the immediate\n    // would always run before the second timeout.\n    let didImmediateRun = false\n    function runFirstCallback(callback: () => void) {\n      didFirstTimerRun = true\n      if (shouldAttemptPatching) {\n        unpatchedSetImmediate(() => {\n          didImmediateRun = true\n        })\n      }\n      return callback()\n    }\n\n    function runSubsequentCallback(callback: () => void) {\n      if (shouldAttemptPatching) {\n        if (didImmediateRun) {\n          // If the immediate managed to run between the timers, then we're not\n          // able to provide the guarantees that we're supposed to\n          shouldAttemptPatching = false\n          warnAboutTimers()\n        }\n      }\n      return callback()\n    }\n\n    return function scheduleTimeout(callback: () => void) {\n      if (didFirstTimerRun) {\n        throw new InvariantError(\n          'Cannot schedule more timers into a group that already executed'\n        )\n      }\n\n      const timer = setTimeout(\n        isFirstCallback ? runFirstCallback : runSubsequentCallback,\n        delayMs,\n        callback\n      )\n      isFirstCallback = false\n\n      if (!shouldAttemptPatching) {\n        // We already tried patching some timers, and it didn't work.\n        // No point trying again.\n        return timer\n      }\n\n      // NodeJS timers have a `_idleStart` property, but it doesn't exist e.g. in Bun.\n      // If it's not present, we'll warn and try to continue.\n      try {\n        if ('_idleStart' in timer && typeof timer._idleStart === 'number') {\n          // If this is the first timer that was scheduled, save its `_idleStart`.\n          // We'll copy it onto subsequent timers to guarantee that they'll all be\n          // considered expired in the same iteration of the event loop\n          // and thus will all be executed in the same timer phase.\n          if (firstTimerIdleStart === null) {\n            firstTimerIdleStart = timer._idleStart\n          } else {\n            timer._idleStart = firstTimerIdleStart\n          }\n        } else {\n          shouldAttemptPatching = false\n          warnAboutTimers()\n        }\n      } catch (err) {\n        // This should never fail in current Node, but it might start failing in the future.\n        // We might be okay even without tweaking the timers, so warn and try to continue.\n        console.error(\n          new InvariantError(\n            'An unexpected error occurred while adjusting `_idleStart` on an atomic timer',\n            { cause: err }\n          )\n        )\n        shouldAttemptPatching = false\n        warnAboutTimers()\n      }\n\n      return timer\n    }\n  }\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createAtomicTimerGroup } from './app-render-scheduling'\nimport {\n  DANGEROUSLY_runPendingImmediatesAfterCurrentTask,\n  expectNoPendingImmediates,\n} from '../node-environment-extensions/fast-set-immediate.external'\nimport { isThenable } from '../../shared/lib/is-thenable'\n\nfunction noop() {}\n\n/**\n * This is a utility function to make scheduling sequential tasks that run back to back easier.\n * We schedule on the same queue (setTimeout) at the same time to ensure no other events can sneak in between.\n *\n * The first function runs in the first task. Each subsequent function runs in its own task.\n * The returned promise resolves after the last task completes.\n */\nexport function runInSequentialTasks<R>(\n  first: () => R,\n  ...rest: Array<() => void>\n): Promise<Awaited<R>> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`runInSequentialTasks` should not be called in edge runtime.'\n    )\n  } else {\n    return new Promise((resolve, reject) => {\n      const scheduleTimeout = createAtomicTimerGroup()\n      const ids: ReturnType<typeof scheduleTimeout>[] = []\n\n      let result: R\n      ids.push(\n        scheduleTimeout(() => {\n          try {\n            DANGEROUSLY_runPendingImmediatesAfterCurrentTask()\n            result = first()\n            // If the first function returns a thenable, suppress unhandled\n            // rejections. A later task in the sequence (e.g. an abort) may\n            // cause the promise to reject, and we don't want that to surface\n            // as an unhandled rejection — the caller will observe the\n            // rejection when they await the returned promise.\n            if (isThenable(result)) {\n              result.then(noop, noop)\n            }\n          } catch (err) {\n            for (let i = 1; i < ids.length; i++) {\n              clearTimeout(ids[i])\n            }\n            reject(err)\n          }\n        })\n      )\n\n      for (let i = 0; i < rest.length; i++) {\n        const fn = rest[i]\n        let index = ids.length\n\n        ids.push(\n          scheduleTimeout(() => {\n            try {\n              DANGEROUSLY_runPendingImmediatesAfterCurrentTask()\n              fn()\n            } catch (err) {\n              // clear remaining timeouts\n              while (++index < ids.length) {\n                clearTimeout(ids[index])\n              }\n              reject(err)\n            }\n          })\n        )\n      }\n\n      // We wait a task before resolving\n      ids.push(\n        scheduleTimeout(() => {\n          try {\n            expectNoPendingImmediates()\n            resolve(result as Awaited<R>)\n          } catch (err) {\n            reject(err)\n          }\n        })\n      )\n    })\n  }\n}\n","/**\n * This class is used to detect when all cache reads for a given render are settled.\n * We do this to allow for cache warming the prerender without having to continue rendering\n * the remainder of the page. This feature is really only useful when the cacheComponents flag is on\n * and should only be used in codepaths gated with this feature.\n */\n\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport class CacheSignal {\n  private count = 0\n  private earlyListeners: Array<() => void> = []\n  private listeners: Array<() => void> = []\n  private tickPending = false\n  private pendingTimeoutCleanup: (() => void) | null = null\n\n  private subscribedSignals: Set<CacheSignal> | null = null\n\n  constructor() {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      // we rely on `process.nextTick`, which is not supported in edge\n      throw new InvariantError(\n        'CacheSignal cannot be used in the edge runtime, because `cacheComponents` does not support it.'\n      )\n    }\n  }\n\n  private noMorePendingCaches() {\n    if (!this.tickPending) {\n      this.tickPending = true\n      queueMicrotask(() =>\n        process.nextTick(() => {\n          this.tickPending = false\n          if (this.count === 0) {\n            for (let i = 0; i < this.earlyListeners.length; i++) {\n              this.earlyListeners[i]()\n            }\n            this.earlyListeners.length = 0\n          }\n        })\n      )\n    }\n\n    // After a cache resolves, React will schedule new rendering work:\n    // - in a microtask (when prerendering)\n    // - in setImmediate (when rendering)\n    // To cover both of these, we have to make sure that we let immediates execute at least once after each cache resolved.\n    // We don't know when the pending timeout was scheduled (and if it's about to resolve),\n    // so by scheduling a new one, we can be sure that we'll go around the event loop at least once.\n    if (this.pendingTimeoutCleanup) {\n      // We cancel the timeout in beginRead, so this shouldn't ever be active here,\n      // but we still cancel it defensively.\n      this.pendingTimeoutCleanup()\n    }\n    this.pendingTimeoutCleanup = scheduleImmediateAndTimeoutWithCleanup(\n      this.invokeListenersIfNoPendingReads\n    )\n  }\n\n  private invokeListenersIfNoPendingReads = () => {\n    this.pendingTimeoutCleanup = null\n    if (this.count === 0) {\n      for (let i = 0; i < this.listeners.length; i++) {\n        this.listeners[i]()\n      }\n      this.listeners.length = 0\n    }\n  }\n\n  /**\n   * This promise waits until there are no more in progress cache reads but no later.\n   * This allows for adding more cache reads after to delay cacheReady.\n   */\n  inputReady() {\n    return new Promise<void>((resolve) => {\n      this.earlyListeners.push(resolve)\n      if (this.count === 0) {\n        this.noMorePendingCaches()\n      }\n    })\n  }\n\n  /**\n   * If there are inflight cache reads this Promise can resolve in a microtask however\n   * if there are no inflight cache reads then we wait at least one task to allow initial\n   * cache reads to be initiated.\n   */\n  cacheReady() {\n    return new Promise<void>((resolve) => {\n      this.listeners.push(resolve)\n      if (this.count === 0) {\n        this.noMorePendingCaches()\n      }\n    })\n  }\n\n  beginRead() {\n    this.count++\n\n    // There's a new pending cache, so if there's a `noMorePendingCaches` timeout running,\n    // we should cancel it.\n    if (this.pendingTimeoutCleanup) {\n      this.pendingTimeoutCleanup()\n      this.pendingTimeoutCleanup = null\n    }\n\n    if (this.subscribedSignals !== null) {\n      for (const subscriber of this.subscribedSignals) {\n        subscriber.beginRead()\n      }\n    }\n  }\n\n  endRead() {\n    if (this.count === 0) {\n      throw new InvariantError(\n        'CacheSignal got more endRead() calls than beginRead() calls'\n      )\n    }\n\n    // If this is the last read we need to wait a task before we can claim the cache is settled.\n    // The cache read will likely ping a Server Component which can read from the cache again and this\n    // will play out in a microtask so we need to only resolve pending listeners if we're still at 0\n    // after at least one task.\n    // We only want one task scheduled at a time so when we hit count 1 we don't decrement the counter immediately.\n    // If intervening reads happen before the scheduled task runs they will never observe count 1 preventing reentrency\n    this.count--\n    if (this.count === 0) {\n      this.noMorePendingCaches()\n    }\n\n    if (this.subscribedSignals !== null) {\n      for (const subscriber of this.subscribedSignals) {\n        subscriber.endRead()\n      }\n    }\n  }\n\n  hasPendingReads(): boolean {\n    return this.count > 0\n  }\n\n  trackRead<T>(promise: Promise<T>) {\n    this.beginRead()\n    // `promise.finally()` still rejects, so don't use it here to avoid unhandled rejections\n    const onFinally = this.endRead.bind(this)\n    promise.then(onFinally, onFinally)\n    return promise\n  }\n\n  subscribeToReads(subscriber: CacheSignal): () => void {\n    if (subscriber === this) {\n      throw new InvariantError('A CacheSignal cannot subscribe to itself')\n    }\n    if (this.subscribedSignals === null) {\n      this.subscribedSignals = new Set()\n    }\n    this.subscribedSignals.add(subscriber)\n\n    // we'll notify the subscriber of each endRead() on this signal,\n    // so we need to give it a corresponding beginRead() for each read we have in flight now.\n    for (let i = 0; i < this.count; i++) {\n      subscriber.beginRead()\n    }\n\n    return this.unsubscribeFromReads.bind(this, subscriber)\n  }\n\n  unsubscribeFromReads(subscriber: CacheSignal) {\n    if (!this.subscribedSignals) {\n      return\n    }\n    this.subscribedSignals.delete(subscriber)\n\n    // we don't need to set the set back to `null` if it's empty --\n    // if other signals are subscribing to this one, it'll likely get more subscriptions later,\n    // so we'd have to allocate a fresh set again when that happens.\n  }\n}\n\nfunction scheduleImmediateAndTimeoutWithCleanup(cb: () => void): () => void {\n  // If we decide to clean up the timeout, we want to remove\n  // either the immediate or the timeout, whichever is still pending.\n  let clearPending: () => void\n\n  const immediate = setImmediate(() => {\n    const timeout = setTimeout(cb, 0)\n    clearPending = clearTimeout.bind(null, timeout)\n  })\n  clearPending = clearImmediate.bind(null, immediate)\n\n  return () => clearPending()\n}\n","import type { ClientTraceDataEntry } from './tracer'\n\n/**\n * Takes OpenTelemetry client trace data and the `clientTraceMetadata` option configured in the Next.js config (currently\n * experimental) and returns a filtered/allowed list of client trace data entries.\n */\nexport function getTracedMetadata(\n  traceData: ClientTraceDataEntry[],\n  clientTraceMetadata: string[] | undefined\n): ClientTraceDataEntry[] | undefined {\n  if (!clientTraceMetadata) return undefined\n  return traceData.filter(({ key }) => clientTraceMetadata.includes(key))\n}\n","import type { ExperimentalConfig } from '../config-shared'\nimport { INFINITE_CACHE } from '../../lib/constants'\n\n/**\n * An AsyncIterable<number> that yields staleTime values. Each call to\n * `update()` yields the new value. When `close()` is called, the iteration\n * ends.\n *\n * This is included in the RSC payload so Flight serializes each yielded value\n * into the stream immediately. If the prerender is aborted by sync IO, the last\n * yielded value is already in the stream, allowing the prerender to be aborted\n * synchronously.\n */\nexport class StaleTimeIterable {\n  private _resolve: ((result: IteratorResult<number>) => void) | null = null\n  private _done = false\n  private _buffer: number[] = []\n\n  /** The last value passed to `update()`. */\n  public currentValue: number = 0\n\n  update(value: number): void {\n    if (this._done) return\n    this.currentValue = value\n    if (this._resolve) {\n      this._resolve({ value, done: false })\n      this._resolve = null\n    } else {\n      this._buffer.push(value)\n    }\n  }\n\n  close(): void {\n    if (this._done) return\n    this._done = true\n    if (this._resolve) {\n      this._resolve({ value: undefined, done: true })\n      this._resolve = null\n    }\n  }\n\n  [Symbol.asyncIterator](): AsyncIterator<number> {\n    return {\n      next: () => {\n        if (this._buffer.length > 0) {\n          return Promise.resolve({ value: this._buffer.shift()!, done: false })\n        }\n        if (this._done) {\n          return Promise.resolve({ value: undefined, done: true })\n        }\n        return new Promise<IteratorResult<number>>((resolve) => {\n          this._resolve = resolve\n        })\n      },\n    }\n  }\n}\n\nexport function createSelectStaleTime(experimental: ExperimentalConfig) {\n  return (stale: number) =>\n    stale === INFINITE_CACHE &&\n    typeof experimental.staleTimes?.static === 'number'\n      ? experimental.staleTimes.static\n      : stale\n}\n\n/**\n * Intercepts writes to the `stale` field on the prerender store and yields\n * each update (after applying selectStaleTime) through the iterable. This\n * ensures the latest stale time is always serialized in the Flight stream,\n * even if the prerender is aborted by sync IO.\n */\nexport function trackStaleTime(\n  store: { stale: number },\n  iterable: StaleTimeIterable,\n  selectStaleTime: (stale: number) => number\n): void {\n  let _stale = store.stale\n  iterable.update(selectStaleTime(_stale))\n  Object.defineProperty(store, 'stale', {\n    get: () => _stale,\n    set: (value: number) => {\n      _stale = value\n      iterable.update(selectStaleTime(value))\n    },\n    configurable: true,\n    enumerable: true,\n  })\n}\n","import { htmlEscapeAttributeString } from '../../../shared/lib/htmlescape'\n\n/**\n * For chromium based browsers (Chrome, Edge, etc.) and Safari,\n * icons need to stay under <head> to be picked up by the browser.\n *\n */\nconst REINSERT_ICON_SCRIPT = `\\\ndocument.querySelectorAll('body link[rel=\"icon\"], body link[rel=\"apple-touch-icon\"]').forEach(el => document.head.appendChild(el))`\n\nexport function createServerInsertedMetadata(nonce: string | undefined) {\n  let inserted = false\n\n  return async function getServerInsertedMetadata(): Promise<string> {\n    if (inserted) {\n      return ''\n    }\n\n    inserted = true\n    return `<script${\n      nonce ? ` nonce=\"${htmlEscapeAttributeString(nonce)}\"` : ''\n    }>${REINSERT_ICON_SCRIPT}</script>`\n  }\n}\n","// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nconst reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/\nconst reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g\n\nexport function escapeStringRegexp(str: string) {\n  // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n  if (reHasRegExp.test(str)) {\n    return str.replace(reReplaceRegExp, '\\\\$&')\n  }\n  return str\n}\n","import {\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { PARAMETER_PATTERN, parseMatchedParameter } from './get-dynamic-param'\n\nexport interface Group {\n  pos: number\n  repeat: boolean\n  optional: boolean\n}\n\nexport interface RouteRegex {\n  groups: { [groupName: string]: Group }\n  re: RegExp\n}\n\nexport type RegexReference = {\n  names: Record<string, string>\n  intercepted: Record<string, string>\n}\n\ntype GetNamedRouteRegexOptions = {\n  /**\n   * Whether to prefix the route keys with the NEXT_INTERCEPTION_MARKER_PREFIX\n   * or NEXT_QUERY_PARAM_PREFIX. This is only relevant when creating the\n   * routes-manifest during the build.\n   */\n  prefixRouteKeys: boolean\n\n  /**\n   * Whether to include the suffix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `.json` part will be included\n   * in the regex, yielding `/(.*).json` as the regex.\n   */\n  includeSuffix?: boolean\n\n  /**\n   * Whether to include the prefix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `/` part will be included\n   * in the regex, yielding `^/(.*).json$` as the regex.\n   *\n   * Note that interception markers will already be included without the need\n   */\n  includePrefix?: boolean\n\n  /**\n   * Whether to exclude the optional trailing slash from the route regex.\n   */\n  excludeOptionalTrailingSlash?: boolean\n\n  /**\n   * Whether to backtrack duplicate keys. This is only relevant when creating\n   * the routes-manifest during the build.\n   */\n  backreferenceDuplicateKeys?: boolean\n\n  /**\n   * If provided, this will be used as the reference for the dynamic parameter\n   * keys instead of generating them in context. This is currently only used for\n   * interception routes.\n   */\n  reference?: RegexReference\n}\n\ntype GetRouteRegexOptions = {\n  /**\n   * Whether to include extra parts in the route regex. This means that when you\n   * have something like `/[...slug].json` the `.json` part will be included\n   * in the regex, yielding `/(.*).json` as the regex.\n   */\n  includeSuffix?: boolean\n\n  /**\n   * Whether to include the prefix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `/` part will be included\n   * in the regex, yielding `^/(.*).json$` as the regex.\n   *\n   * Note that interception markers will already be included without the need\n   * of adding this option.\n   */\n  includePrefix?: boolean\n\n  /**\n   * Whether to exclude the optional trailing slash from the route regex.\n   */\n  excludeOptionalTrailingSlash?: boolean\n}\n\nfunction getParametrizedRoute(\n  route: string,\n  includeSuffix: boolean,\n  includePrefix: boolean\n) {\n  const groups: { [groupName: string]: Group } = {}\n  let groupIndex = 1\n\n  const segments: string[] = []\n  for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n    const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n      segment.startsWith(m)\n    )\n    const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n    if (markerMatch && paramMatches && paramMatches[2]) {\n      const { key, optional, repeat } = parseMatchedParameter(paramMatches[2])\n      groups[key] = { pos: groupIndex++, repeat, optional }\n      segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)\n    } else if (paramMatches && paramMatches[2]) {\n      const { key, repeat, optional } = parseMatchedParameter(paramMatches[2])\n      groups[key] = { pos: groupIndex++, repeat, optional }\n\n      if (includePrefix && paramMatches[1]) {\n        segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n      }\n\n      let s = repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n\n      // Remove the leading slash if includePrefix already added it.\n      if (includePrefix && paramMatches[1]) {\n        s = s.substring(1)\n      }\n\n      segments.push(s)\n    } else {\n      segments.push(`/${escapeStringRegexp(segment)}`)\n    }\n\n    // If there's a suffix, add it to the segments if it's enabled.\n    if (includeSuffix && paramMatches && paramMatches[3]) {\n      segments.push(escapeStringRegexp(paramMatches[3]))\n    }\n  }\n\n  return {\n    parameterizedRoute: segments.join(''),\n    groups,\n  }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(\n  normalizedRoute: string,\n  {\n    includeSuffix = false,\n    includePrefix = false,\n    excludeOptionalTrailingSlash = false,\n  }: GetRouteRegexOptions = {}\n): RouteRegex {\n  const { parameterizedRoute, groups } = getParametrizedRoute(\n    normalizedRoute,\n    includeSuffix,\n    includePrefix\n  )\n\n  let re = parameterizedRoute\n  if (!excludeOptionalTrailingSlash) {\n    re += '(?:/)?'\n  }\n\n  return {\n    re: new RegExp(`^${re}$`),\n    groups: groups,\n  }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n  let i = 0\n\n  return () => {\n    let routeKey = ''\n    let j = ++i\n    while (j > 0) {\n      routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n      j = Math.floor((j - 1) / 26)\n    }\n    return routeKey\n  }\n}\n\nfunction getSafeKeyFromSegment({\n  interceptionMarker,\n  getSafeRouteKey,\n  segment,\n  routeKeys,\n  keyPrefix,\n  backreferenceDuplicateKeys,\n}: {\n  interceptionMarker?: string\n  getSafeRouteKey: () => string\n  segment: string\n  routeKeys: Record<string, string>\n  keyPrefix?: string\n  backreferenceDuplicateKeys: boolean\n}) {\n  const { key, optional, repeat } = parseMatchedParameter(segment)\n\n  // replace any non-word characters since they can break\n  // the named regex\n  let cleanedKey = key.replace(/\\W/g, '')\n\n  if (keyPrefix) {\n    cleanedKey = `${keyPrefix}${cleanedKey}`\n  }\n  let invalidKey = false\n\n  // check if the key is still invalid and fallback to using a known\n  // safe key\n  if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n    invalidKey = true\n  }\n  if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n    invalidKey = true\n  }\n\n  if (invalidKey) {\n    cleanedKey = getSafeRouteKey()\n  }\n\n  const duplicateKey = cleanedKey in routeKeys\n\n  if (keyPrefix) {\n    routeKeys[cleanedKey] = `${keyPrefix}${key}`\n  } else {\n    routeKeys[cleanedKey] = key\n  }\n\n  // if the segment has an interception marker, make sure that's part of the regex pattern\n  // this is to ensure that the route with the interception marker doesn't incorrectly match\n  // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n  const interceptionPrefix = interceptionMarker\n    ? escapeStringRegexp(interceptionMarker)\n    : ''\n\n  let pattern: string\n  if (duplicateKey && backreferenceDuplicateKeys) {\n    // Use a backreference to the key to ensure that the key is the same value\n    // in each of the placeholders.\n    pattern = `\\\\k<${cleanedKey}>`\n  } else if (repeat) {\n    pattern = `(?<${cleanedKey}>.+?)`\n  } else {\n    pattern = `(?<${cleanedKey}>[^/]+?)`\n  }\n\n  return {\n    key,\n    pattern: optional\n      ? `(?:/${interceptionPrefix}${pattern})?`\n      : `/${interceptionPrefix}${pattern}`,\n    cleanedKey: cleanedKey,\n    optional,\n    repeat,\n  }\n}\n\nfunction getNamedParametrizedRoute(\n  route: string,\n  prefixRouteKeys: boolean,\n  includeSuffix: boolean,\n  includePrefix: boolean,\n  backreferenceDuplicateKeys: boolean,\n  reference: RegexReference = { names: {}, intercepted: {} }\n) {\n  const getSafeRouteKey = buildGetSafeRouteKey()\n  const routeKeys: { [named: string]: string } = {}\n\n  const segments: string[] = []\n  const inverseParts: string[] = []\n\n  // Ensure we don't mutate the original reference object.\n  reference = structuredClone(reference)\n\n  for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n    const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n      segment.startsWith(m)\n    )\n\n    const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n    const interceptionMarker = hasInterceptionMarker\n      ? paramMatches?.[1]\n      : undefined\n\n    let keyPrefix: string | undefined\n    if (interceptionMarker && paramMatches?.[2]) {\n      keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n      reference.intercepted[paramMatches[2]] = interceptionMarker\n    } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {\n      keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n    } else {\n      keyPrefix = prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined\n    }\n\n    if (interceptionMarker && paramMatches && paramMatches[2]) {\n      // If there's an interception marker, add it to the segments.\n      const { key, pattern, cleanedKey, repeat, optional } =\n        getSafeKeyFromSegment({\n          getSafeRouteKey,\n          interceptionMarker,\n          segment: paramMatches[2],\n          routeKeys,\n          keyPrefix,\n          backreferenceDuplicateKeys,\n        })\n\n      segments.push(pattern)\n      inverseParts.push(\n        `/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n      )\n      reference.names[key] ??= cleanedKey\n    } else if (paramMatches && paramMatches[2]) {\n      // If there's a prefix, add it to the segments if it's enabled.\n      if (includePrefix && paramMatches[1]) {\n        segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n        inverseParts.push(`/${paramMatches[1]}`)\n      }\n\n      const { key, pattern, cleanedKey, repeat, optional } =\n        getSafeKeyFromSegment({\n          getSafeRouteKey,\n          segment: paramMatches[2],\n          routeKeys,\n          keyPrefix,\n          backreferenceDuplicateKeys,\n        })\n\n      // Remove the leading slash if includePrefix already added it.\n      let s = pattern\n      if (includePrefix && paramMatches[1]) {\n        s = s.substring(1)\n      }\n\n      segments.push(s)\n      inverseParts.push(\n        `/:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n      )\n      reference.names[key] ??= cleanedKey\n    } else {\n      segments.push(`/${escapeStringRegexp(segment)}`)\n      inverseParts.push(`/${segment}`)\n    }\n\n    // If there's a suffix, add it to the segments if it's enabled.\n    if (includeSuffix && paramMatches && paramMatches[3]) {\n      segments.push(escapeStringRegexp(paramMatches[3]))\n      inverseParts.push(paramMatches[3])\n    }\n  }\n\n  return {\n    namedParameterizedRoute: segments.join(''),\n    routeKeys,\n    pathToRegexpPattern: inverseParts.join(''),\n    reference,\n  }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n  normalizedRoute: string,\n  options: GetNamedRouteRegexOptions\n) {\n  const result = getNamedParametrizedRoute(\n    normalizedRoute,\n    options.prefixRouteKeys,\n    options.includeSuffix ?? false,\n    options.includePrefix ?? false,\n    options.backreferenceDuplicateKeys ?? false,\n    options.reference\n  )\n\n  let namedRegex = result.namedParameterizedRoute\n  if (!options.excludeOptionalTrailingSlash) {\n    namedRegex += '(?:/)?'\n  }\n\n  return {\n    ...getRouteRegex(normalizedRoute, options),\n    namedRegex: `^${namedRegex}$`,\n    routeKeys: result.routeKeys,\n    pathToRegexpPattern: result.pathToRegexpPattern,\n    reference: result.reference,\n  }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n  normalizedRoute: string,\n  options: {\n    catchAll?: boolean\n  }\n) {\n  const { parameterizedRoute } = getParametrizedRoute(\n    normalizedRoute,\n    false,\n    false\n  )\n  const { catchAll = true } = options\n  if (parameterizedRoute === '/') {\n    let catchAllRegex = catchAll ? '.*' : ''\n    return {\n      namedRegex: `^/${catchAllRegex}$`,\n    }\n  }\n\n  const { namedParameterizedRoute } = getNamedParametrizedRoute(\n    normalizedRoute,\n    false,\n    false,\n    false,\n    false,\n    undefined\n  )\n  let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n  return {\n    namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n  }\n}\n","import type { Token } from 'next/dist/compiled/path-to-regexp'\n\n/**\n * Route pattern normalization utilities for path-to-regexp compatibility.\n *\n * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain\n * patterns commonly used in Next.js interception routes. This module provides\n * normalization functions to make Next.js route patterns compatible with the\n * updated library while preserving all functionality.\n */\n\n/**\n * Internal separator used to normalize adjacent parameter patterns.\n * This unique marker is inserted between adjacent parameters and stripped out\n * during parameter extraction to avoid conflicts with real URL content.\n */\nexport const PARAM_SEPARATOR = '_NEXTSEP_'\n\n/**\n * Detects if a route pattern needs normalization for path-to-regexp compatibility.\n */\nexport function hasAdjacentParameterIssues(route: string): boolean {\n  if (typeof route !== 'string') return false\n\n  // Check for interception route markers followed immediately by parameters\n  // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n  // These patterns cause \"Must have text between two parameters\" errors\n  if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n    return true\n  }\n\n  // Check for basic adjacent parameters without separators\n  // Pattern: :param1:param2 (but not :param* or other URL patterns)\n  if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n    return true\n  }\n\n  return false\n}\n\n/**\n * Normalizes route patterns that have adjacent parameters without text between them.\n * Inserts a unique separator that can be safely stripped out later.\n */\nexport function normalizeAdjacentParameters(route: string): string {\n  let normalized = route\n\n  // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n  normalized = normalized.replace(\n    /(\\([^)]*\\)):([^/\\s]+)/g,\n    `$1${PARAM_SEPARATOR}:$2`\n  )\n\n  // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n  normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`)\n\n  return normalized\n}\n\n/**\n * Normalizes tokens that have repeating modifiers (* or +) but empty prefix and suffix.\n *\n * path-to-regexp 6.3.0+ introduced validation that throws:\n * \"Can not repeat without prefix/suffix\"\n *\n * This occurs when a token has modifier: '*' or '+' with both prefix: '' and suffix: ''\n */\nexport function normalizeTokensForRegexp(tokens: Token[]): Token[] {\n  return tokens.map((token) => {\n    // Token union type: Token = string | TokenObject\n    // Literal path segments are strings, parameters/wildcards are objects\n    if (\n      typeof token === 'object' &&\n      token !== null &&\n      // Not all token objects have 'modifier' property (e.g., simple text tokens)\n      'modifier' in token &&\n      // Only repeating modifiers (* or +) cause the validation error\n      // Other modifiers like '?' (optional) are fine\n      (token.modifier === '*' || token.modifier === '+') &&\n      // Token objects can have different shapes depending on route pattern\n      'prefix' in token &&\n      'suffix' in token &&\n      // Both prefix and suffix must be empty strings\n      // This is what causes the validation error in path-to-regexp\n      token.prefix === '' &&\n      token.suffix === ''\n    ) {\n      // Add minimal prefix to satisfy path-to-regexp validation\n      // We use '/' as it's the most common path delimiter and won't break route matching\n      // The prefix gets used in regex generation but doesn't affect parameter extraction\n      return {\n        ...token,\n        prefix: '/',\n      }\n    }\n    return token\n  })\n}\n\n/**\n * Strips normalization separators from compiled pathname.\n * This removes separators that were inserted by normalizeAdjacentParameters\n * to satisfy path-to-regexp validation.\n *\n * Only removes separators in the specific contexts where they were inserted:\n * - After interception route markers: (.)_NEXTSEP_ -> (.)\n *\n * This targeted approach ensures we don't accidentally remove the separator\n * from legitimate user content.\n */\nexport function stripNormalizedSeparators(pathname: string): string {\n  // Remove separator after interception route markers\n  // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.\n  // The separator appears after the closing paren of interception markers\n  return pathname.replace(new RegExp(`\\\\)${PARAM_SEPARATOR}`, 'g'), ')')\n}\n\n/**\n * Strips normalization separators from extracted route parameters.\n * Used by both server and client code to clean up parameters after route matching.\n */\nexport function stripParameterSeparators(\n  params: Record<string, any>\n): Record<string, any> {\n  const cleaned: Record<string, any> = {}\n\n  for (const [key, value] of Object.entries(params)) {\n    if (typeof value === 'string') {\n      // Remove the separator if it appears at the start of parameter values\n      cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n    } else if (Array.isArray(value)) {\n      // Handle array parameters (from repeated route segments)\n      cleaned[key] = value.map((item) =>\n        typeof item === 'string'\n          ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n          : item\n      )\n    } else {\n      cleaned[key] = value\n    }\n  }\n\n  return cleaned\n}\n","/**\n * Client-safe utilities for route matching that don't import server-side\n * utilities to avoid bundling issues with Turbopack\n */\n\nimport type {\n  Key,\n  TokensToRegexpOptions,\n  ParseOptions,\n  TokensToFunctionOptions,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n  pathToRegexp,\n  compile,\n  regexpToFunction,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n  hasAdjacentParameterIssues,\n  normalizeAdjacentParameters,\n  stripParameterSeparators,\n  stripNormalizedSeparators,\n} from '../../../../lib/route-pattern-normalizer'\n\n/**\n * Client-safe wrapper around pathToRegexp that handles path-to-regexp 6.3.0+ validation errors.\n * This includes both \"Can not repeat without prefix/suffix\" and \"Must have text between parameters\" errors.\n */\nexport function safePathToRegexp(\n  route: string | RegExp | Array<string | RegExp>,\n  keys?: Key[],\n  options?: TokensToRegexpOptions & ParseOptions\n): RegExp {\n  if (typeof route !== 'string') {\n    return pathToRegexp(route, keys, options)\n  }\n\n  // Check if normalization is needed and cache the result\n  const needsNormalization = hasAdjacentParameterIssues(route)\n  const routeToUse = needsNormalization\n    ? normalizeAdjacentParameters(route)\n    : route\n\n  try {\n    return pathToRegexp(routeToUse, keys, options)\n  } catch (error) {\n    // Only try normalization if we haven't already normalized\n    if (!needsNormalization) {\n      try {\n        const normalizedRoute = normalizeAdjacentParameters(route)\n        return pathToRegexp(normalizedRoute, keys, options)\n      } catch (retryError) {\n        // If that doesn't work, fall back to original error\n        throw error\n      }\n    }\n    throw error\n  }\n}\n\n/**\n * Client-safe wrapper around compile that handles path-to-regexp 6.3.0+ validation errors.\n * No server-side error reporting to avoid bundling issues.\n * When normalization is applied, the returned compiler function automatically strips\n * the internal separator from the output URL.\n */\nexport function safeCompile(\n  route: string,\n  options?: TokensToFunctionOptions & ParseOptions\n) {\n  // Check if normalization is needed and cache the result\n  const needsNormalization = hasAdjacentParameterIssues(route)\n  const routeToUse = needsNormalization\n    ? normalizeAdjacentParameters(route)\n    : route\n\n  try {\n    const compiler = compile(routeToUse, options)\n\n    // If we normalized the route, wrap the compiler to strip separators from output\n    // The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy\n    // path-to-regexp validation, but we don't want it in the final compiled URL\n    if (needsNormalization) {\n      return (params: any) => {\n        return stripNormalizedSeparators(compiler(params))\n      }\n    }\n\n    return compiler\n  } catch (error) {\n    // Only try normalization if we haven't already normalized\n    if (!needsNormalization) {\n      try {\n        const normalizedRoute = normalizeAdjacentParameters(route)\n        const compiler = compile(normalizedRoute, options)\n\n        // Wrap the compiler to strip separators from output\n        return (params: any) => {\n          return stripNormalizedSeparators(compiler(params))\n        }\n      } catch (retryError) {\n        // If that doesn't work, fall back to original error\n        throw error\n      }\n    }\n    throw error\n  }\n}\n\n/**\n * Client-safe wrapper around regexpToFunction that automatically cleans parameters.\n */\nexport function safeRegexpToFunction<\n  T extends Record<string, any> = Record<string, any>,\n>(regexp: RegExp, keys?: Key[]): (pathname: string) => { params: T } | false {\n  const originalMatcher = regexpToFunction<T>(regexp, keys || [])\n\n  return (pathname: string) => {\n    const result = originalMatcher(pathname)\n    if (!result) return false\n\n    // Clean parameters before returning\n    return {\n      ...result,\n      params: stripParameterSeparators(result.params as any) as T,\n    }\n  }\n}\n\n/**\n * Safe wrapper for route matcher functions that automatically cleans parameters.\n * This is client-safe and doesn't import path-to-regexp.\n */\nexport function safeRouteMatcher<T extends Record<string, any>>(\n  matcherFn: (pathname: string) => false | T\n): (pathname: string) => false | T {\n  return (pathname: string) => {\n    const result = matcherFn(pathname)\n    if (!result) return false\n\n    // Clean parameters before returning\n    return stripParameterSeparators(result) as T\n  }\n}\n","import type { Group } from './route-regex'\nimport { DecodeError } from '../../utils'\nimport type { Params } from '../../../../server/request/params'\nimport { safeRouteMatcher } from './route-match-utils'\n\nexport interface RouteMatchFn {\n  (pathname: string): false | Params\n}\n\ntype RouteMatcherOptions = {\n  // We only use the exec method of the RegExp object. This helps us avoid using\n  // type assertions that the passed in properties are of the correct type.\n  re: Pick<RegExp, 'exec'>\n  groups: Record<string, Group>\n}\n\nexport function getRouteMatcher({\n  re,\n  groups,\n}: RouteMatcherOptions): RouteMatchFn {\n  const rawMatcher = (pathname: string) => {\n    const routeMatch = re.exec(pathname)\n    if (!routeMatch) return false\n\n    const decode = (param: string) => {\n      try {\n        return decodeURIComponent(param)\n      } catch {\n        throw new DecodeError('failed to decode param')\n      }\n    }\n\n    const params: Params = {}\n    for (const [key, group] of Object.entries(groups)) {\n      const match = routeMatch[group.pos]\n      if (match !== undefined) {\n        if (group.repeat) {\n          params[key] = match.split('/').map((entry) => decode(entry))\n        } else {\n          params[key] = decode(match)\n        }\n      }\n    }\n\n    return params\n  }\n\n  // Wrap with safe matcher to handle parameter cleaning\n  return safeRouteMatcher(rawMatcher)\n}\n","import type { IncomingMessage } from 'http'\nimport type { Key } from 'next/dist/compiled/path-to-regexp'\nimport type { NextParsedUrlQuery } from '../../../../server/request-meta'\nimport type { RouteHas } from '../../../../lib/load-custom-routes'\nimport type { BaseNextRequest } from '../../../../server/base-http'\n\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { parseUrl, type ParsedUrl } from './parse-url'\nimport {\n  INTERCEPTION_ROUTE_MARKERS,\n  isInterceptionRouteAppPath,\n} from './interception-routes'\nimport { getCookieParser } from '../../../../server/api-utils/get-cookie-parser'\nimport type { Params } from '../../../../server/request/params'\nimport { safePathToRegexp, safeCompile } from './route-match-utils'\n\n/**\n * Ensure only a-zA-Z are used for param names for proper interpolating\n * with path-to-regexp\n */\nfunction getSafeParamName(paramName: string) {\n  let newParamName = ''\n\n  for (let i = 0; i < paramName.length; i++) {\n    const charCode = paramName.charCodeAt(i)\n\n    if (\n      (charCode > 64 && charCode < 91) || // A-Z\n      (charCode > 96 && charCode < 123) // a-z\n    ) {\n      newParamName += paramName[i]\n    }\n  }\n  return newParamName\n}\n\nfunction escapeSegment(str: string, segmentName: string) {\n  return str.replace(\n    new RegExp(`:${escapeStringRegexp(segmentName)}`, 'g'),\n    `__ESC_COLON_${segmentName}`\n  )\n}\n\nfunction unescapeSegments(str: string) {\n  return str.replace(/__ESC_COLON_/gi, ':')\n}\n\nexport function matchHas(\n  req: BaseNextRequest | IncomingMessage,\n  query: Params,\n  has: RouteHas[] = [],\n  missing: RouteHas[] = []\n): false | Params {\n  const params: Params = {}\n\n  const hasMatch = (hasItem: RouteHas) => {\n    let value\n    let key = hasItem.key\n\n    switch (hasItem.type) {\n      case 'header': {\n        key = key!.toLowerCase()\n        value = req.headers[key] as string\n        break\n      }\n      case 'cookie': {\n        if ('cookies' in req) {\n          value = req.cookies[hasItem.key]\n        } else {\n          const cookies = getCookieParser(req.headers)()\n          value = cookies[hasItem.key]\n        }\n\n        break\n      }\n      case 'query': {\n        value = query[key!]\n        break\n      }\n      case 'host': {\n        const { host } = req?.headers || {}\n        // remove port from host if present\n        const hostname = host?.split(':', 1)[0].toLowerCase()\n        value = hostname\n        break\n      }\n      default: {\n        break\n      }\n    }\n\n    if (!hasItem.value && value) {\n      params[getSafeParamName(key!)] = value\n      return true\n    } else if (value) {\n      const matcher = new RegExp(`^${hasItem.value}$`)\n      const matches = Array.isArray(value)\n        ? value.slice(-1)[0].match(matcher)\n        : value.match(matcher)\n\n      if (matches) {\n        if (Array.isArray(matches)) {\n          if (matches.groups) {\n            Object.keys(matches.groups).forEach((groupKey) => {\n              params[groupKey] = matches.groups![groupKey]\n            })\n          } else if (hasItem.type === 'host' && matches[0]) {\n            params.host = matches[0]\n          }\n        }\n        return true\n      }\n    }\n    return false\n  }\n\n  const allMatch =\n    has.every((item) => hasMatch(item)) &&\n    !missing.some((item) => hasMatch(item))\n\n  if (allMatch) {\n    return params\n  }\n  return false\n}\n\nexport function compileNonPath(value: string, params: Params): string {\n  if (!value.includes(':')) {\n    return value\n  }\n\n  for (const key of Object.keys(params)) {\n    if (value.includes(`:${key}`)) {\n      value = value\n        .replace(\n          new RegExp(`:${key}\\\\*`, 'g'),\n          `:${key}--ESCAPED_PARAM_ASTERISKS`\n        )\n        .replace(\n          new RegExp(`:${key}\\\\?`, 'g'),\n          `:${key}--ESCAPED_PARAM_QUESTION`\n        )\n        .replace(new RegExp(`:${key}\\\\+`, 'g'), `:${key}--ESCAPED_PARAM_PLUS`)\n        .replace(\n          new RegExp(`:${key}(?!\\\\w)`, 'g'),\n          `--ESCAPED_PARAM_COLON${key}`\n        )\n    }\n  }\n  value = value\n    .replace(/(:|\\*|\\?|\\+|\\(|\\)|\\{|\\})/g, '\\\\$1')\n    .replace(/--ESCAPED_PARAM_PLUS/g, '+')\n    .replace(/--ESCAPED_PARAM_COLON/g, ':')\n    .replace(/--ESCAPED_PARAM_QUESTION/g, '?')\n    .replace(/--ESCAPED_PARAM_ASTERISKS/g, '*')\n\n  // the value needs to start with a forward-slash to be compiled\n  // correctly\n  return safeCompile(`/${value}`, { validate: false })(params).slice(1)\n}\n\nexport function parseDestination(args: {\n  destination: string\n  params: Readonly<Params>\n  query: Readonly<NextParsedUrlQuery>\n}): ParsedUrl {\n  let escaped = args.destination\n  for (const param of Object.keys({ ...args.params, ...args.query })) {\n    if (!param) continue\n\n    escaped = escapeSegment(escaped, param)\n  }\n\n  const parsed = parseUrl(escaped)\n\n  let pathname = parsed.pathname\n  if (pathname) {\n    pathname = unescapeSegments(pathname)\n  }\n\n  let href = parsed.href\n  if (href) {\n    href = unescapeSegments(href)\n  }\n\n  let hostname = parsed.hostname\n  if (hostname) {\n    hostname = unescapeSegments(hostname)\n  }\n\n  let hash = parsed.hash\n  if (hash) {\n    hash = unescapeSegments(hash)\n  }\n\n  let search = parsed.search\n  if (search) {\n    search = unescapeSegments(search)\n  }\n\n  let origin = parsed.origin\n  if (origin) {\n    origin = unescapeSegments(origin)\n  }\n\n  return {\n    ...parsed,\n    pathname,\n    hostname,\n    href,\n    hash,\n    search,\n    origin,\n  }\n}\n\nexport function prepareDestination(args: {\n  appendParamsToQuery: boolean\n  destination: string\n  params: Params\n  query: NextParsedUrlQuery\n}) {\n  const parsedDestination = parseDestination(args)\n\n  const {\n    hostname: destHostname,\n    query: destQuery,\n    search: destSearch,\n  } = parsedDestination\n\n  // The following code assumes that the pathname here includes the hash if it's\n  // present.\n  let destPath = parsedDestination.pathname\n  if (parsedDestination.hash) {\n    destPath = `${destPath}${parsedDestination.hash}`\n  }\n\n  const destParams: (string | number)[] = []\n\n  const destPathParamKeys: Key[] = []\n  safePathToRegexp(destPath, destPathParamKeys)\n  for (const key of destPathParamKeys) {\n    destParams.push(key.name)\n  }\n\n  if (destHostname) {\n    const destHostnameParamKeys: Key[] = []\n    safePathToRegexp(destHostname, destHostnameParamKeys)\n    for (const key of destHostnameParamKeys) {\n      destParams.push(key.name)\n    }\n  }\n\n  const destPathCompiler = safeCompile(\n    destPath,\n    // we don't validate while compiling the destination since we should\n    // have already validated before we got to this point and validating\n    // breaks compiling destinations with named pattern params from the source\n    // e.g. /something:hello(.*) -> /another/:hello is broken with validation\n    // since compile validation is meant for reversing and not for inserting\n    // params from a separate path-regex into another\n    { validate: false }\n  )\n\n  let destHostnameCompiler\n  if (destHostname) {\n    destHostnameCompiler = safeCompile(destHostname, {\n      validate: false,\n      encode: encodeURIComponent,\n    })\n  }\n\n  // update any params in query values\n  for (const [key, strOrArray] of Object.entries(destQuery)) {\n    // the value needs to start with a forward-slash to be compiled\n    // correctly\n    if (Array.isArray(strOrArray)) {\n      destQuery[key] = strOrArray.map((value) =>\n        compileNonPath(unescapeSegments(value), args.params)\n      )\n    } else if (typeof strOrArray === 'string') {\n      destQuery[key] = compileNonPath(unescapeSegments(strOrArray), args.params)\n    }\n  }\n\n  // add path params to query if it's not a redirect and not\n  // already defined in destination query or path\n  let paramKeys = Object.keys(args.params).filter(\n    (name) => name !== 'nextInternalLocale'\n  )\n\n  if (\n    args.appendParamsToQuery &&\n    !paramKeys.some((key) => destParams.includes(key))\n  ) {\n    for (const key of paramKeys) {\n      if (!(key in destQuery)) {\n        destQuery[key] = args.params[key]\n      }\n    }\n  }\n\n  let newUrl\n\n  // The compiler also that the interception route marker is an unnamed param, hence '0',\n  // so we need to add it to the params object.\n  if (isInterceptionRouteAppPath(destPath)) {\n    for (const segment of destPath.split('/')) {\n      const marker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n        segment.startsWith(m)\n      )\n      if (marker) {\n        if (marker === '(..)(..)') {\n          args.params['0'] = '(..)'\n          args.params['1'] = '(..)'\n        } else {\n          args.params['0'] = marker\n        }\n        break\n      }\n    }\n  }\n\n  try {\n    newUrl = destPathCompiler(args.params)\n\n    const [pathname, hash] = newUrl.split('#', 2)\n    if (destHostnameCompiler) {\n      parsedDestination.hostname = destHostnameCompiler(args.params)\n    }\n    parsedDestination.pathname = pathname\n    parsedDestination.hash = `${hash ? '#' : ''}${hash || ''}`\n    parsedDestination.search = destSearch\n      ? compileNonPath(destSearch, args.params)\n      : ''\n  } catch (err: any) {\n    if (err.message.match(/Expected .*? to not repeat, but got an array/)) {\n      throw new Error(\n        `To use a multi-match in the destination you must add \\`*\\` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match`\n      )\n    }\n    throw err\n  }\n\n  // Query merge order lowest priority to highest\n  // 1. initial URL query values\n  // 2. path segment values\n  // 3. destination specified query values\n  parsedDestination.query = {\n    ...args.query,\n    ...parsedDestination.query,\n  }\n\n  return {\n    newUrl,\n    destQuery,\n    parsedDestination,\n  }\n}\n","/**\n * Decodes a query path parameter.\n *\n * @param value - The value to decode.\n * @returns The decoded value.\n */\nexport function decodeQueryPathParameter(value: string) {\n  // When deployed to Vercel, the value may be encoded, so this attempts to\n  // decode it and returns the original value if it fails.\n  try {\n    return decodeURIComponent(value)\n  } catch {\n    return value\n  }\n}\n","import type { UrlWithParsedQuery } from 'url'\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst DUMMY_ORIGIN = 'http://n'\n\nexport function isFullStringUrl(url: string) {\n  return /https?:\\/\\//.test(url)\n}\n\nexport function parseUrl(url: string): URL | undefined {\n  let parsed: URL | undefined = undefined\n  try {\n    parsed = new URL(url, DUMMY_ORIGIN)\n  } catch {}\n  return parsed\n}\n\nexport function parseReqUrl(url: string): UrlWithParsedQuery | undefined {\n  const parsedUrl: URL | undefined = parseUrl(url)\n\n  if (!parsedUrl) {\n    return\n  }\n\n  const query: Record<string, string | string[]> = {}\n\n  for (const key of parsedUrl.searchParams.keys()) {\n    const values = parsedUrl.searchParams.getAll(key)\n    query[key] = values.length > 1 ? values : values[0]\n  }\n\n  const legacyUrl: UrlWithParsedQuery = {\n    query,\n    hash: parsedUrl.hash,\n    search: parsedUrl.search,\n    path: parsedUrl.pathname,\n    pathname: parsedUrl.pathname,\n    href: `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,\n    host: '',\n    hostname: '',\n    auth: '',\n    protocol: '',\n    slashes: null,\n    port: '',\n  }\n  return legacyUrl\n}\n\nexport function stripNextRscUnionQuery(relativeUrl: string): string {\n  const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN)\n  urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  return urlInstance.pathname + urlInstance.search\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n  let { auth, hostname } = urlObj\n  let protocol = urlObj.protocol || ''\n  let pathname = urlObj.pathname || ''\n  let hash = urlObj.hash || ''\n  let query = urlObj.query || ''\n  let host: string | false = false\n\n  auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n  if (urlObj.host) {\n    host = auth + urlObj.host\n  } else if (hostname) {\n    host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n    if (urlObj.port) {\n      host += ':' + urlObj.port\n    }\n  }\n\n  if (query && typeof query === 'object') {\n    query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n  }\n\n  let search = urlObj.search || (query && `?${query}`) || ''\n\n  if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n  if (\n    urlObj.slashes ||\n    ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n  ) {\n    host = '//' + (host || '')\n    if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n  } else if (!host) {\n    host = ''\n  }\n\n  if (hash && hash[0] !== '#') hash = '#' + hash\n  if (search && search[0] !== '?') search = '?' + search\n\n  pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n  search = search.replace('#', '%23')\n\n  return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n  'auth',\n  'hash',\n  'host',\n  'hostname',\n  'href',\n  'path',\n  'pathname',\n  'port',\n  'protocol',\n  'query',\n  'search',\n  'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n  if (process.env.NODE_ENV === 'development') {\n    if (url !== null && typeof url === 'object') {\n      Object.keys(url).forEach((key) => {\n        if (!urlObjectKeys.includes(key)) {\n          console.warn(\n            `Unknown key passed via urlObject into url.format: ${key}`\n          )\n        }\n      })\n    }\n  }\n\n  return formatUrl(url)\n}\n","import type { Rewrite } from '../lib/load-custom-routes'\nimport type { RouteMatchFn } from '../shared/lib/router/utils/route-matcher'\nimport type { NextConfig } from './config'\nimport type { BaseNextRequest } from './base-http'\nimport type { NextUrlWithParsedQuery } from './request-meta'\nimport type { ParsedUrlQuery } from 'querystring'\n\nimport { normalizeLocalePath } from '../shared/lib/i18n/normalize-locale-path'\nimport { getPathMatch } from '../shared/lib/router/utils/path-match'\nimport { getNamedRouteRegex } from '../shared/lib/router/utils/route-regex'\nimport { getRouteMatcher } from '../shared/lib/router/utils/route-matcher'\nimport {\n  matchHas,\n  prepareDestination,\n} from '../shared/lib/router/utils/prepare-destination'\nimport { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { normalizeRscURL } from '../shared/lib/router/utils/app-paths'\nimport {\n  NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n  NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../lib/constants'\nimport { normalizeNextQueryParam } from './web/utils'\nimport type { IncomingHttpHeaders, IncomingMessage } from 'http'\nimport { decodeQueryPathParameter } from './lib/decode-query-path-parameter'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\nimport { parseReqUrl } from '../lib/url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\n\nfunction filterInternalQuery(\n  query: Record<string, undefined | string | string[]>,\n  paramKeys: string[]\n) {\n  // this is used to pass query information in rewrites\n  // but should not be exposed in final query\n  delete query['nextInternalLocale']\n\n  for (const key in query) {\n    const isNextQueryPrefix =\n      key !== NEXT_QUERY_PARAM_PREFIX && key.startsWith(NEXT_QUERY_PARAM_PREFIX)\n\n    const isNextInterceptionMarkerPrefix =\n      key !== NEXT_INTERCEPTION_MARKER_PREFIX &&\n      key.startsWith(NEXT_INTERCEPTION_MARKER_PREFIX)\n\n    if (\n      isNextQueryPrefix ||\n      isNextInterceptionMarkerPrefix ||\n      paramKeys.includes(key)\n    ) {\n      delete query[key]\n    }\n  }\n}\n\nexport function normalizeCdnUrl(\n  req: BaseNextRequest | IncomingMessage,\n  paramKeys: string[]\n) {\n  // make sure to normalize req.url from CDNs to strip dynamic and rewrite\n  // params from the query which are added during routing\n  const _parsedUrl = parseReqUrl(req.url!)\n\n  // we can't normalize if we can't parse\n  if (!_parsedUrl) {\n    return req.url\n  }\n  delete (_parsedUrl as any).search\n  filterInternalQuery(_parsedUrl.query, paramKeys)\n\n  req.url = formatUrl(_parsedUrl)\n}\n\nexport function interpolateDynamicPath(\n  pathname: string,\n  params: ParsedUrlQuery,\n  defaultRouteRegex?: ReturnType<typeof getNamedRouteRegex> | undefined\n) {\n  if (!defaultRouteRegex) return pathname\n\n  for (const param of Object.keys(defaultRouteRegex.groups)) {\n    const { optional, repeat } = defaultRouteRegex.groups[param]\n    let builtParam = `[${repeat ? '...' : ''}${param}]`\n\n    if (optional) {\n      builtParam = `[${builtParam}]`\n    }\n\n    let paramValue: string\n    const value = params[param]\n\n    if (Array.isArray(value)) {\n      paramValue = value.map((v) => v && encodeURIComponent(v)).join('/')\n    } else if (value) {\n      paramValue = encodeURIComponent(value)\n    } else {\n      paramValue = ''\n    }\n\n    if (paramValue || optional) {\n      pathname = pathname.replaceAll(builtParam, paramValue)\n    }\n  }\n\n  return pathname\n}\n\nexport function normalizeDynamicRouteParams(\n  query: ParsedUrlQuery,\n  defaultRouteRegex: ReturnType<typeof getNamedRouteRegex>,\n  defaultRouteMatches: ParsedUrlQuery,\n  ignoreMissingOptional: boolean\n) {\n  const isDefaultValueMatch = (\n    candidateValue: string | undefined,\n    defaultValue: string\n  ) => {\n    if (!candidateValue) {\n      return false\n    }\n\n    let normalizedCandidateValue = normalizeRscURL(candidateValue)\n    for (let i = 0; i < 3; i++) {\n      if (normalizedCandidateValue === defaultValue) {\n        return true\n      }\n\n      const decodedCandidateValue = decodeQueryPathParameter(\n        normalizedCandidateValue\n      )\n\n      if (decodedCandidateValue === normalizedCandidateValue) {\n        break\n      }\n\n      normalizedCandidateValue = decodedCandidateValue\n    }\n\n    return false\n  }\n\n  let hasValidParams = true\n  let params: ParsedUrlQuery = {}\n\n  for (const key of Object.keys(defaultRouteRegex.groups)) {\n    let value: string | string[] | undefined = query[key]\n\n    if (typeof value === 'string') {\n      value = normalizeRscURL(value)\n    } else if (Array.isArray(value)) {\n      value = value.map(normalizeRscURL)\n    }\n\n    // if the value matches the default value we can't rely\n    // on the parsed params, this is used to signal if we need\n    // to parse x-now-route-matches or not\n    const defaultValue = defaultRouteMatches![key]\n    const isOptional = defaultRouteRegex!.groups[key].optional\n\n    const isDefaultValue = Array.isArray(defaultValue)\n      ? defaultValue.some((defaultVal) => {\n          return Array.isArray(value)\n            ? value.some((val) => isDefaultValueMatch(val, defaultVal))\n            : isDefaultValueMatch(value, defaultVal)\n        })\n      : Array.isArray(value)\n        ? value.some((val) => isDefaultValueMatch(val, defaultValue as string))\n        : isDefaultValueMatch(value, defaultValue as string)\n\n    if (\n      isDefaultValue ||\n      (typeof value === 'undefined' && !(isOptional && ignoreMissingOptional))\n    ) {\n      return { params: {}, hasValidParams: false }\n    }\n\n    // non-provided optional values should be undefined so normalize\n    // them to undefined\n    if (\n      isOptional &&\n      (!value ||\n        (Array.isArray(value) &&\n          value.length === 1 &&\n          // fallback optional catch-all SSG pages have\n          // [[...paramName]] for the root path on Vercel\n          (value[0] === 'index' || value[0] === `[[...${key}]]`)) ||\n        value === 'index' ||\n        value === `[[...${key}]]`)\n    ) {\n      value = undefined\n      delete query[key]\n    }\n\n    // query values from the proxy aren't already split into arrays\n    // so make sure to normalize catch-all values\n    if (\n      value &&\n      typeof value === 'string' &&\n      defaultRouteRegex!.groups[key].repeat\n    ) {\n      value = value.split('/')\n    }\n\n    if (value) {\n      params[key] = value\n    }\n  }\n\n  return {\n    params,\n    hasValidParams,\n  }\n}\n\nexport function getServerUtils({\n  page,\n  i18n,\n  basePath,\n  rewrites,\n  pageIsDynamic,\n  trailingSlash,\n  caseSensitive,\n}: {\n  page: string\n  i18n?: NextConfig['i18n']\n  basePath: string\n  rewrites: DeepReadonly<{\n    fallback?: ReadonlyArray<Rewrite>\n    afterFiles?: ReadonlyArray<Rewrite>\n    beforeFiles?: ReadonlyArray<Rewrite>\n  }>\n  pageIsDynamic: boolean\n  trailingSlash?: boolean\n  caseSensitive: boolean\n}) {\n  let defaultRouteRegex: ReturnType<typeof getNamedRouteRegex> | undefined\n  let dynamicRouteMatcher: RouteMatchFn | undefined\n  let defaultRouteMatches: ParsedUrlQuery | undefined\n\n  if (pageIsDynamic) {\n    defaultRouteRegex = getNamedRouteRegex(page, {\n      prefixRouteKeys: false,\n    })\n    dynamicRouteMatcher = getRouteMatcher(defaultRouteRegex)\n    defaultRouteMatches = dynamicRouteMatcher(page) as ParsedUrlQuery\n  }\n\n  function handleRewrites(\n    req: BaseNextRequest | IncomingMessage,\n    parsedUrl: DeepReadonly<NextUrlWithParsedQuery>\n  ) {\n    // Here we deep clone the parsedUrl to avoid mutating the original. We also\n    // cast this to a mutable type so we can mutate it within this scope.\n    const rewrittenParsedUrl = structuredClone(\n      parsedUrl\n    ) as NextUrlWithParsedQuery\n    const rewriteParams: Record<string, string> = {}\n    let fsPathname = rewrittenParsedUrl.pathname\n\n    const matchesPage = () => {\n      const fsPathnameNoSlash = removeTrailingSlash(fsPathname || '')\n      return (\n        fsPathnameNoSlash === removeTrailingSlash(page) ||\n        dynamicRouteMatcher?.(fsPathnameNoSlash)\n      )\n    }\n\n    const checkRewrite = (rewrite: DeepReadonly<Rewrite>): boolean => {\n      const matcher = getPathMatch(\n        rewrite.source + (trailingSlash ? '(/)?' : ''),\n        {\n          removeUnnamedParams: true,\n          strict: true,\n          sensitive: !!caseSensitive,\n        }\n      )\n\n      if (!rewrittenParsedUrl.pathname) return false\n\n      let params = matcher(rewrittenParsedUrl.pathname)\n\n      if ((rewrite.has || rewrite.missing) && params) {\n        const hasParams = matchHas(\n          req,\n          rewrittenParsedUrl.query,\n          rewrite.has as Rewrite['has'],\n          rewrite.missing as Rewrite['missing']\n        )\n\n        if (hasParams) {\n          Object.assign(params, hasParams)\n        } else {\n          params = false\n        }\n      }\n\n      if (params) {\n        const { parsedDestination, destQuery } = prepareDestination({\n          appendParamsToQuery: true,\n          destination: rewrite.destination,\n          params: params,\n          query: rewrittenParsedUrl.query,\n        })\n\n        // if the rewrite destination is external break rewrite chain\n        if (parsedDestination.protocol) {\n          return true\n        }\n\n        Object.assign(rewriteParams, destQuery, params)\n        Object.assign(rewrittenParsedUrl.query, parsedDestination.query)\n        delete (parsedDestination as any).query\n\n        Object.assign(rewrittenParsedUrl, parsedDestination)\n\n        fsPathname = rewrittenParsedUrl.pathname\n        if (!fsPathname) return false\n\n        if (basePath) {\n          fsPathname = fsPathname.replace(new RegExp(`^${basePath}`), '') || '/'\n        }\n\n        if (i18n) {\n          const result = normalizeLocalePath(fsPathname, i18n.locales)\n          fsPathname = result.pathname\n          rewrittenParsedUrl.query.nextInternalLocale =\n            result.detectedLocale || params.nextInternalLocale\n        }\n\n        if (fsPathname === page) {\n          return true\n        }\n\n        if (pageIsDynamic && dynamicRouteMatcher) {\n          const dynamicParams = dynamicRouteMatcher(fsPathname)\n          if (dynamicParams) {\n            rewrittenParsedUrl.query = {\n              ...rewrittenParsedUrl.query,\n              ...dynamicParams,\n            }\n            return true\n          }\n        }\n      }\n\n      return false\n    }\n\n    for (const rewrite of rewrites.beforeFiles || []) {\n      checkRewrite(rewrite)\n    }\n\n    if (fsPathname !== page) {\n      let finished = false\n\n      for (const rewrite of rewrites.afterFiles || []) {\n        finished = checkRewrite(rewrite)\n        if (finished) break\n      }\n\n      if (!finished && !matchesPage()) {\n        for (const rewrite of rewrites.fallback || []) {\n          finished = checkRewrite(rewrite)\n          if (finished) break\n        }\n      }\n    }\n\n    return { rewriteParams, rewrittenParsedUrl }\n  }\n\n  function getParamsFromRouteMatches(routeMatchesHeader: string) {\n    // If we don't have a default route regex, we can't get params from route\n    // matches\n    if (!defaultRouteRegex) return null\n\n    const { groups, routeKeys } = defaultRouteRegex\n\n    const matcher = getRouteMatcher({\n      re: {\n        // Simulate a RegExp match from the \\`req.url\\` input\n        exec: (str: string) => {\n          // Normalize all the prefixed query params.\n          const obj: Record<string, string> = Object.fromEntries(\n            new URLSearchParams(str)\n          )\n          for (const [key, value] of Object.entries(obj)) {\n            const normalizedKey = normalizeNextQueryParam(key)\n            if (!normalizedKey) continue\n\n            obj[normalizedKey] = value\n            delete obj[key]\n          }\n\n          // Use all the named route keys.\n          const result = {} as RegExpExecArray\n          for (const keyName of Object.keys(routeKeys)) {\n            const paramName = routeKeys[keyName]\n\n            // If this param name is not a valid parameter name, then skip it.\n            if (!paramName) continue\n\n            const group = groups[paramName]\n            const value = obj[keyName]\n\n            // When we're missing a required param, we can't match the route.\n            if (!group.optional && !value) return null\n\n            result[group.pos] = value\n          }\n\n          return result\n        },\n      },\n      groups,\n    })\n\n    const routeMatches = matcher(routeMatchesHeader)\n    if (!routeMatches) return null\n\n    return routeMatches\n  }\n\n  function normalizeQueryParams(\n    query: Record<string, string | string[] | undefined>,\n    routeParamKeys: Set<string>\n  ) {\n    // this is used to pass query information in rewrites\n    // but should not be exposed in final query\n    delete query['nextInternalLocale']\n\n    for (const [key, value] of Object.entries(query)) {\n      const normalizedKey = normalizeNextQueryParam(key)\n      if (!normalizedKey) continue\n\n      // Remove the prefixed key from the query params because we want\n      // to consume it for the dynamic route matcher.\n      delete query[key]\n      routeParamKeys.add(normalizedKey)\n\n      if (typeof value === 'undefined') continue\n\n      query[normalizedKey] = Array.isArray(value)\n        ? value.map((v) => decodeQueryPathParameter(v))\n        : decodeQueryPathParameter(value)\n    }\n  }\n\n  return {\n    handleRewrites,\n    defaultRouteRegex,\n    dynamicRouteMatcher,\n    defaultRouteMatches,\n    normalizeQueryParams,\n    getParamsFromRouteMatches,\n    /**\n     * Normalize dynamic route params.\n     *\n     * @param query - The query params to normalize.\n     * @param ignoreMissingOptional - Whether to ignore missing optional params.\n     * @returns The normalized params and whether they are valid.\n     */\n    normalizeDynamicRouteParams: (\n      query: ParsedUrlQuery,\n      ignoreMissingOptional: boolean\n    ) => {\n      if (!defaultRouteRegex || !defaultRouteMatches) {\n        return { params: {}, hasValidParams: false }\n      }\n\n      return normalizeDynamicRouteParams(\n        query,\n        defaultRouteRegex,\n        defaultRouteMatches,\n        ignoreMissingOptional\n      )\n    },\n\n    normalizeCdnUrl: (\n      req: BaseNextRequest | IncomingMessage,\n      paramKeys: string[]\n    ) => normalizeCdnUrl(req, paramKeys),\n\n    interpolateDynamicPath: (\n      pathname: string,\n      params: Record<string, undefined | string | string[]>\n    ) => interpolateDynamicPath(pathname, params, defaultRouteRegex),\n\n    filterInternalQuery: (query: ParsedUrlQuery, paramKeys: string[]) =>\n      filterInternalQuery(query, paramKeys),\n  }\n}\n\nexport function getPreviouslyRevalidatedTags(\n  headers: IncomingHttpHeaders,\n  previewModeId: string | undefined\n): string[] {\n  return typeof headers[NEXT_CACHE_REVALIDATED_TAGS_HEADER] === 'string' &&\n    headers[NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER] === previewModeId\n    ? headers[NEXT_CACHE_REVALIDATED_TAGS_HEADER].split(',')\n    : []\n}\n","export const VALID_LOADERS = [\n  'default',\n  'imgix',\n  'cloudinary',\n  'akamai',\n  'custom',\n] as const\n\nexport type LoaderValue = (typeof VALID_LOADERS)[number]\n\nexport type ImageLoaderProps = {\n  src: string\n  width: number\n  quality?: number\n}\n\nexport type ImageLoaderPropsWithConfig = ImageLoaderProps & {\n  config: Readonly<ImageConfig>\n}\n\nexport type LocalPattern = {\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single path segment.\n   * Double `**` matches any number of path segments.\n   */\n  pathname?: string\n\n  /**\n   * Can be literal query string such as `?v=1` or\n   * empty string meaning no query string.\n   */\n  search?: string\n}\n\nexport type RemotePattern = {\n  /**\n   * Must be `http` or `https`.\n   */\n  protocol?: 'http' | 'https'\n\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single subdomain.\n   * Double `**` matches any number of subdomains.\n   */\n  hostname: string\n\n  /**\n   * Can be literal port such as `8080` or empty string\n   * meaning no port.\n   */\n  port?: string\n\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single path segment.\n   * Double `**` matches any number of path segments.\n   */\n  pathname?: string\n\n  /**\n   * Can be literal query string such as `?v=1` or\n   * empty string meaning no query string.\n   */\n  search?: string\n}\n\ntype ImageFormat = 'image/avif' | 'image/webp'\n\n/**\n * Image configurations\n *\n * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)\n */\nexport type ImageConfigComplete = {\n  /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */\n  deviceSizes: number[]\n\n  /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */\n  imageSizes: number[]\n\n  /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */\n  loader: LoaderValue\n\n  /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */\n  path: string\n\n  /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */\n  loaderFile: string\n\n  /**\n   * @deprecated Use `remotePatterns` instead.\n   */\n  domains: string[]\n\n  /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */\n  disableStaticImages: boolean\n\n  /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */\n  minimumCacheTTL: number\n\n  /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */\n  formats: ImageFormat[]\n\n  /** @see [Maximum Disk Cache Size (in bytes)](https://nextjs.org/docs/api-reference/next/image#maximumdiskcachesize) */\n  maximumDiskCacheSize: number | undefined\n\n  /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */\n  maximumRedirects: number\n\n  /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */\n  maximumResponseBody: number\n\n  /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */\n  dangerouslyAllowLocalIP: boolean\n\n  /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */\n  dangerouslyAllowSVG: boolean\n\n  /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */\n  contentSecurityPolicy: string\n\n  /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */\n  contentDispositionType: 'inline' | 'attachment'\n\n  /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */\n  remotePatterns: Array<URL | RemotePattern>\n\n  /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */\n  localPatterns: LocalPattern[] | undefined\n\n  /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */\n  qualities: number[] | undefined\n\n  /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */\n  unoptimized: boolean\n\n  /**\n   * When true, the `cacheHandler` configured in next.config.js will also be used\n   * for caching optimized images. When false, images use the default filesystem cache.\n   * @see [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandler#image-optimization-caching)\n   */\n  customCacheHandler: boolean\n}\n\nexport type ImageConfig = Partial<ImageConfigComplete>\n\nexport const imageConfigDefault: ImageConfigComplete = {\n  deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n  imageSizes: [32, 48, 64, 96, 128, 256, 384],\n  path: '/_next/image',\n  loader: 'default',\n  loaderFile: '',\n  /**\n   * @deprecated Use `remotePatterns` instead to protect your application from malicious users.\n   */\n  domains: [],\n  disableStaticImages: false,\n  minimumCacheTTL: 14400, // 4 hours\n  formats: ['image/webp'],\n  maximumDiskCacheSize: undefined, // auto-detect by default\n  maximumRedirects: 3,\n  maximumResponseBody: 50_000_000, // 50 MB\n  dangerouslyAllowLocalIP: false,\n  dangerouslyAllowSVG: false,\n  contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,\n  contentDispositionType: 'attachment',\n  localPatterns: undefined, // default: allow all local images\n  remotePatterns: [], // default: allow no remote images\n  qualities: [75],\n  unoptimized: false,\n  customCacheHandler: false,\n}\n","import React from 'react'\nimport type { ImageConfigComplete } from './image-config'\nimport { imageConfigDefault } from './image-config'\n\nexport const ImageConfigContext =\n  React.createContext<ImageConfigComplete>(imageConfigDefault)\n\nif (process.env.NODE_ENV !== 'production') {\n  ImageConfigContext.displayName = 'ImageConfigContext'\n}\n","import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\n\n/**\n * When we abort a staged render, we can still provide react with more chunks from later phases\n * to use for their debug info. This will not cause more contents to be rendered.\n */\nexport function createNodeStreamWithLateRelease(\n  partialChunks: Array<Uint8Array>,\n  allChunks: Array<Uint8Array>,\n  releaseSignal: AbortSignal\n): Readable {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createNodeStreamWithLateRelease cannot be used in the edge runtime'\n    )\n  } else {\n    const { Readable } = require('node:stream') as typeof import('node:stream')\n\n    let nextIndex = 0\n\n    const readable = new Readable({\n      read() {\n        while (nextIndex < partialChunks.length) {\n          this.push(partialChunks[nextIndex])\n          nextIndex++\n        }\n      },\n    })\n\n    releaseSignal.addEventListener(\n      'abort',\n      () => {\n        // Flush any remaining chunks from the original set\n        while (nextIndex < partialChunks.length) {\n          readable.push(partialChunks[nextIndex])\n          nextIndex++\n        }\n        // Flush all chunks since we're now aborted and can't schedule\n        // any new work but these chunks might unblock debugInfo\n        while (nextIndex < allChunks.length) {\n          readable.push(allChunks[nextIndex])\n          nextIndex++\n        }\n\n        setImmediate(() => {\n          readable.push(null)\n        })\n      },\n      { once: true }\n    )\n\n    return readable\n  }\n}\n\nexport function createNodeStreamFromChunks(\n  chunks: Array<Uint8Array>,\n  signal?: AbortSignal\n): Readable {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createNodeStreamFromChunks cannot be used in the edge runtime'\n    )\n  } else {\n    const { Readable } = require('node:stream') as typeof import('node:stream')\n\n    // If there's a signal, delay closing until it fires\n    if (signal) {\n      signal.addEventListener(\n        'abort',\n        () => {\n          readable.push(null)\n        },\n        { once: true }\n      )\n    }\n\n    let nextIndex = 0\n    const readable = new Readable({\n      read() {\n        while (nextIndex < chunks.length) {\n          this.push(chunks[nextIndex])\n          nextIndex++\n        }\n        if (!signal) {\n          this.push(null)\n        }\n      },\n    })\n    return readable\n  }\n}\n","import type { ComponentType, ErrorInfo, JSX, ReactNode } from 'react'\nimport type { RenderOpts, PreloadCallbacks } from './types'\nimport type {\n  ActionResult,\n  DynamicParamTypesShort,\n  DynamicSegmentTuple,\n  FlightRouterState,\n  CacheNodeSeedData,\n  RSCPayload,\n  NavigationFlightResponse,\n  FlightData,\n  InitialRSCPayload,\n  FlightDataPath,\n  PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../shared/lib/app-router-types'\nimport type { Readable } from 'node:stream'\nimport {\n  workAsyncStorage,\n  type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type {\n  InstantValidationSamples,\n  PrerenderStoreModernClient,\n  PrerenderStoreModernRuntime,\n  PrerenderStoreModernServer,\n  RequestStore,\n  ValidationStoreClient,\n  WorkUnitStore,\n} from '../app-render/work-unit-async-storage.external'\nimport type { NextParsedUrlQuery } from '../request-meta'\nimport { getTurbopackChunkGroupBootstrap } from '../get-page-files'\nimport { UNDERSCORE_NOT_FOUND_ROUTE_ENTRY } from '../../shared/lib/entry-constants'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { BaseNextRequest, BaseNextResponse } from '../base-http'\nimport type { IncomingHttpHeaders } from 'http'\nimport * as ReactClient from 'react'\n\nimport RenderResult, {\n  type AppPageRenderResultMetadata,\n  type RenderResultOptions,\n} from '../render-result'\nimport {\n  chainStreams,\n  continueFizzStream,\n  continueDynamicPrerender,\n  continueStaticPrerender,\n  continueDynamicHTMLResumeNode,\n  continueDynamicHTMLResumeWeb,\n  continueStaticFallbackPrerender,\n  streamToBuffer,\n  streamToString,\n  createWebInlinedDataStream,\n  createPendingStream,\n  createOnHeadersCallback,\n  resumeAndAbort,\n  renderToWebFlightStream,\n  resumeToFizzStream,\n  getServerPrerender,\n  getClientPrerender,\n  processPrelude as processPreludeOp,\n  createDocumentClosingStream,\n  teeStream,\n  renderToWebFizzStream,\n  renderToNodeFlightStream,\n  renderToNodeFizzStream,\n  createNodeInlinedDataStream,\n} from './stream-ops'\nimport type { AnyStream } from './stream-ops'\nimport { getInstantTestBootstrapScriptContent } from './instant-test-bootstrap'\nimport { stripInternalQueries } from '../internal-utils'\nimport {\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_ROUTER_STALE_TIME_HEADER,\n  NEXT_URL,\n  RSC_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n} from '../../client/components/app-router-headers'\nimport { createMetadataContext } from '../../lib/metadata/metadata-context'\nimport {\n  createRequestStore as createRequestStoreFromInputs,\n  createRequestStoreForRender,\n} from '../async-storage/request-store'\nimport { isRSCRequestHeader } from '../lib/is-rsc-request'\nimport { createWorkStore } from '../async-storage/work-store'\nimport { formatValidationEvent } from './dev-validation-events'\nimport { createSnapshot } from './async-local-storage'\nimport {\n  getDevValidationWorker,\n  type DevValidationWorkerMessage,\n  type SerializedValidationInputs,\n} from './dev-validation-worker-globals'\nimport { buildDevValidationSnapshot } from './dev-validation-worker-snapshot'\nimport {\n  getAccessFallbackErrorTypeByStatus,\n  getAccessFallbackHTTPStatus,\n  isHTTPAccessFallbackError,\n} from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getURLFromRedirectError,\n  getRedirectStatusCodeFromError,\n} from '../../client/components/redirect'\nimport { isRedirectError } from '../../client/components/redirect-error'\nimport { getImplicitTags, type ImplicitTags } from '../lib/implicit-tags'\nimport { AppRenderSpan, NextNodeServerSpan } from '../lib/trace/constants'\nimport {\n  getRequestInsightsIdentity,\n  runWithRequestInsightsIdentity,\n} from '../lib/trace/request-insights-identity'\nimport { getTracer, SpanStatusCode } from '../lib/trace/tracer'\nimport { traceLocalSpan } from '../lib/trace/local-span-recorder'\nimport { isRequestInsightsEnabled } from '../lib/trace/request-insights'\nimport { FlightRenderResult } from './flight-render-result'\nimport {\n  createReactServerErrorHandler,\n  createHTMLErrorHandler,\n  type DigestedError,\n  isUserLandError,\n  getDigestForWellKnownError,\n} from './create-error-handler'\nimport { dynamicParamTypes } from './get-short-dynamic-param-type'\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param'\nimport { getScriptNonceFromHeader } from './get-script-nonce-from-header'\nimport { parseAndValidateFlightRouterState } from './parse-and-validate-flight-router-state'\nimport { createFlightRouterStateFromLoaderTree } from './create-flight-router-state-from-loader-tree'\nimport { handleAction } from './action-handler'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { warn, error } from '../../build/output/log'\nimport {\n  appendMutableCookies,\n  RequestCookiesAdapter,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport { createServerInsertedHTML } from './server-inserted-html'\nimport { getRequiredScripts } from './required-scripts'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport { makeGetServerInsertedHTML } from './make-get-server-inserted-html'\nimport {\n  walkTreeWithFlightRouterState,\n  createFullTreeFlightDataForNavigation,\n} from './walk-tree-with-flight-router-state'\nimport { createComponentTree, getRootParams } from './create-component-tree'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport {\n  getClientReferenceManifest,\n  getServerModuleMap,\n} from './manifests-singleton'\nimport {\n  DynamicState,\n  type PostponedState,\n  DynamicHTMLPreludeState,\n  parsePostponedState,\n} from './postponed-state'\nimport {\n  getDynamicDataPostponedState,\n  getDynamicHTMLPostponedState,\n  getPostponedFromState,\n} from './postponed-state'\nimport { isDynamicServerError } from '../../client/components/hooks-server-context'\nimport { getFlightStream } from './use-flight-response'\nimport {\n  StaticGenBailoutError,\n  isStaticGenBailoutError,\n} from '../../client/components/static-generation-bailout'\nimport { getStackWithoutErrorMessage } from '../../lib/format-server-error'\nimport { extractNextErrorCode } from '../../lib/error-telemetry-utils'\nimport {\n  accessedDynamicData,\n  createRenderInBrowserAbortSignal,\n  formatDynamicAPIAccesses,\n  isPrerenderInterruptedError,\n  createDynamicTrackingState,\n  createDynamicValidationState,\n  trackAllowedDynamicAccess,\n  throwIfDisallowedDynamic,\n  PreludeState,\n  consumeDynamicAccess,\n  type DynamicAccess,\n  logDisallowedDynamicError,\n  trackDynamicHoleInRuntimeShell,\n  trackDynamicHoleInStaticShell,\n  getStaticShellDisallowedDynamicReasons,\n  getNavigationDisallowedDynamicReasons,\n  trackDynamicHoleInNavigation,\n  DynamicHoleKind,\n  trackThrownErrorInNavigation,\n  createInstantValidationState,\n  type NavigationValidationResult,\n  throwIfSyncIOUsed,\n} from './dynamic-rendering'\nimport { logBuildDebugHint } from './blocking-route-messages'\nimport {\n  getClientComponentLoaderMetrics,\n  wrapClientComponentLoader,\n} from '../client-component-renderer-logger'\nimport { isNodeNextRequest, isNodeNextResponse } from '../base-http/helpers'\nimport { waitForResponseToFinish } from './wait-for-response'\nimport {\n  beginDevValidation,\n  type DevValidationGeneration,\n  yieldToForegroundRequest,\n} from './dev-validation-scheduler'\nimport { signalFromNodeResponse } from '../web/spec-extension/adapters/next-request'\nimport {\n  parseRelativeUrl,\n  type ParsedRelativeUrl,\n} from '../../shared/lib/router/utils/parse-relative-url'\nimport AppRouter from '../../client/components/app-router'\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type { RequestErrorContext } from '../instrumentation/types'\nimport { getIsPossibleServerAction } from '../lib/server-action-request-meta'\nimport { createInitialRouterState } from '../../client/components/router-reducer/create-initial-router-state'\nimport { createMutableActionQueue } from '../../client/components/app-router-instance'\nimport { getRevalidateReason } from '../instrumentation/utils'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport {\n  getFallbackRouteParams,\n  type OpaqueFallbackRouteParams,\n} from '../request/fallback-params'\nimport {\n  ReactServerPrerenderResult,\n  createReactServerPrerenderResult,\n  ReactServerResult,\n  ReplayableNodeStream,\n  createReactServerPrerenderResultFromRender,\n} from './app-render-prerender-utils'\nimport {\n  Phase,\n  printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { runInSequentialTasks } from './app-render-render-utils'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n  getHmrRefreshHash,\n  workUnitAsyncStorage,\n  type PrerenderStore,\n} from './work-unit-async-storage.external'\nimport { consoleAsyncStorage } from './console-async-storage.external'\nimport { CacheSignal } from './cache-signal'\nimport {\n  createResponseVaryParamsAccumulator,\n  finishAccumulatingVaryParams,\n  getMetadataVaryParamsAccumulator,\n  getRootParamsVaryParamsAccumulator,\n} from './vary-params'\nimport { getTracedMetadata } from '../lib/trace/utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  StaleTimeIterable,\n  createSelectStaleTime,\n  trackStaleTime,\n} from './stale-time'\n\nimport { HTML_CONTENT_TYPE_HEADER, INFINITE_CACHE } from '../../lib/constants'\nimport { createComponentStylesAndScripts } from './create-component-styles-and-scripts'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport {\n  createPrerenderResumeDataCache,\n  createRenderResumeDataCache,\n  type PrerenderResumeDataCache,\n  type RenderResumeDataCache,\n  type ResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport type { MetadataErrorType } from '../../lib/metadata/resolve-metadata'\nimport isError from '../../lib/is-error'\nimport { createServerInsertedMetadata } from './metadata-insertion/create-server-inserted-metadata'\nimport { getPreviouslyRevalidatedTags } from '../server-utils'\nimport { executeRevalidates } from '../revalidation-utils'\nimport {\n  trackPendingChunkLoad,\n  trackPendingImport,\n  trackPendingModules,\n} from './module-loading/track-module-loading.external'\nimport { isReactLargeShellError } from './react-large-shell-error'\nimport type { GlobalErrorComponent } from '../../client/components/builtin/global-error'\nimport { normalizeConventionFilePath } from './segment-explorer-path'\nimport { getRequestMeta } from '../request-meta'\nimport {\n  getDynamicParam,\n  interpolateParallelRouteParams,\n} from '../../shared/lib/router/utils/get-dynamic-param'\nimport type { Params } from '../request/params'\nimport { ImageConfigContext } from '../../shared/lib/image-config-context.shared-runtime'\nimport { imageConfigDefault } from '../../shared/lib/image-config'\nimport {\n  getNextStage,\n  isAdvanceableRenderStage,\n  RENDER_STAGE_ADVANCE_ORDER,\n  RenderStage,\n  StagedRenderingController,\n  SyncIOMode,\n  type AdvanceableRenderStage,\n} from './staged-rendering'\nimport {\n  anySegmentHasPartialPrefetchingEnabled,\n  isPageAllowedToBlock,\n  anySegmentNeedsInstantValidationInDev,\n  anySegmentNeedsInstantValidationInBuild,\n  resolveInstantConfigSamplesForPage,\n} from './instant-validation/instant-config'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport {\n  createWebDebugChannel,\n  createNodeDebugChannel,\n  type DebugChannelPair,\n  type NodeDebugChannelPair,\n} from './debug-channel-server'\nimport {\n  createNodeStreamFromChunks,\n  createNodeStreamWithLateRelease,\n} from './instant-validation/stream-utils'\n\nimport {\n  createValidationBoundaryTracking,\n  type ValidationBoundaryTracking,\n} from './instant-validation/boundary-tracking'\nimport type {\n  AppSegmentConfig,\n  InstantSample,\n} from '../../build/segment-config/app/app-segment-config'\nimport { ResponseCookies } from '../web/spec-extension/cookies'\nimport { isInstantValidationError } from './instant-validation/instant-validation-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\nimport { RENDER_STAGES_BY_DATA_KIND } from '../dynamic-rendering-utils'\nimport type { StageEndTimes } from './instant-validation/instant-validation'\nimport { hasNonRootStaticParams } from '../lib/params-utils'\n\nexport type GetDynamicParamFromSegment = (\n  // The LoaderTree to extract the dynamic param from\n  loaderTree: LoaderTree\n) => DynamicParam | null\n\nexport type DynamicParam = {\n  param: string\n  value: string | string[] | null\n  treeSegment: DynamicSegmentTuple\n  type: DynamicParamTypesShort\n}\n\nexport type GenerateFlight = typeof generateDynamicFlightRenderResult\n\nexport type AppSharedContext = {\n  buildId: string\n  deploymentId: string\n  clientAssetToken: string\n}\n\nexport type AppRenderContext = {\n  sharedContext: AppSharedContext\n  workStore: WorkStore\n  url: ReturnType<typeof parseRelativeUrl>\n  componentMod: AppPageModule\n  renderOpts: RenderOpts\n  parsedRequestHeaders: ParsedRequestHeaders\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n  interpolatedParams: Params\n  /**\n   * The request's fallback route params (the same ones\n   * `getDynamicParamFromSegment` closes over). Kept on the context so the dev\n   * validation worker can rebuild an identical `getDynamicParamFromSegment`;\n   * the depth-loop segment keys are derived from it, so it must match what\n   * produced the seed render's Flight, not the separate fallback set validation\n   * uses to mark params unknown in its stores.\n   */\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n  query: NextParsedUrlQuery\n  isPrefetch: boolean\n  isPossibleServerAction: boolean\n  requestTimestamp: number\n  appUsingSizeAdjustment: boolean\n  flightRouterState?: FlightRouterState\n  requestId: string\n  htmlRequestId: string\n  pagePath: string\n  assetPrefix: string\n  isNotFoundPath: boolean\n  nonce: string | undefined\n  res: BaseNextResponse\n  /**\n   * For now, the implicit tags are common for the whole route. If we ever start\n   * rendering/revalidating segments independently, they need to move to the\n   * work unit store.\n   */\n  implicitTags: ImplicitTags\n}\n\nfunction maybeAppendBuildIdToRSCPayload<T extends RSCPayload>(\n  ctx: AppRenderContext,\n  payload: T\n): T {\n  if (!ctx.sharedContext.deploymentId) {\n    // When using the build id, we need to initialize the id on initial page load, so a build id\n    // header wouldn't be enough.\n    payload.b = ctx.sharedContext.buildId\n  }\n  return payload\n}\n\ninterface ParseRequestHeadersOptions {\n  readonly isRoutePPREnabled: boolean\n  readonly previewModeId: string | undefined\n}\n\nconst flightDataPathHeadKey = 'h'\nconst getFlightViewportKey = (requestId: string) => requestId + 'v'\nconst getFlightMetadataKey = (requestId: string) => requestId + 'm'\n\nconst filterStackFrame =\n  process.env.NODE_ENV !== 'production'\n    ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n        .filterStackFrameDEV\n    : undefined\n\ninterface ParsedRequestHeaders {\n  /**\n   * Router state provided from the client-side router. Used to handle rendering\n   * from the common layout down. This value will be undefined if the request is\n   * not a client-side navigation request, or if the request is a prefetch\n   * request.\n   */\n  readonly flightRouterState: FlightRouterState | undefined\n  readonly isPrefetchRequest: boolean\n  readonly isRuntimePrefetchRequest: boolean\n  /**\n   * App Shell prefetch: a runtime prefetch that the server renders with\n   * params omitted (any `await params` hangs forever). Produces the\n   * param-independent shell of the route. Implies isRuntimePrefetchRequest.\n   */\n  readonly isAppShellPrefetchRequest: boolean\n  readonly isRouteTreePrefetchRequest: boolean\n  readonly isHmrRefresh: boolean\n  readonly isRSCRequest: boolean\n  readonly nonce: string | undefined\n  readonly previouslyRevalidatedTags: string[]\n  readonly requestId: string | undefined\n  readonly htmlRequestId: string | undefined\n}\n\nfunction parseRequestHeaders(\n  headers: IncomingHttpHeaders,\n  options: ParseRequestHeadersOptions\n): ParsedRequestHeaders {\n  const isRSCRequest = isRSCRequestHeader(headers[RSC_HEADER])\n\n  // runtime prefetch requests are *not* treated as prefetch requests\n  // (TODO: this is confusing, we should refactor this to express this better)\n  const isPrefetchRequest =\n    isRSCRequest && headers[NEXT_ROUTER_PREFETCH_HEADER] === '1'\n\n  const isAppShellPrefetchRequest =\n    isRSCRequest && headers[NEXT_ROUTER_PREFETCH_HEADER] === '3'\n\n  // App Shell prefetches are a subtype of runtime prefetch — same code path,\n  // but with less resolved content (omitting link data)\n  const isRuntimePrefetchRequest =\n    isRSCRequest &&\n    (headers[NEXT_ROUTER_PREFETCH_HEADER] === '2' || isAppShellPrefetchRequest)\n\n  const isHmrRefresh = headers[NEXT_HMR_REFRESH_HEADER] !== undefined\n\n  const shouldProvideFlightRouterState =\n    isRSCRequest && (!isPrefetchRequest || !options.isRoutePPREnabled)\n\n  const flightRouterState = shouldProvideFlightRouterState\n    ? parseAndValidateFlightRouterState(headers[NEXT_ROUTER_STATE_TREE_HEADER])\n    : undefined\n\n  // Checks if this is a prefetch of the Route Tree by the Segment Cache\n  const isRouteTreePrefetchRequest =\n    isRSCRequest && headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] === '/_tree'\n\n  const csp =\n    headers['content-security-policy'] ||\n    headers['content-security-policy-report-only']\n\n  const nonce =\n    typeof csp === 'string' ? getScriptNonceFromHeader(csp) : undefined\n\n  const previouslyRevalidatedTags = getPreviouslyRevalidatedTags(\n    headers,\n    options.previewModeId\n  )\n\n  let requestId: string | undefined\n  let htmlRequestId: string | undefined\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    // The request IDs are only used for the dev server to send debug\n    // information to the matching client (identified by the HTML request ID\n    // that was sent to the client with the HTML document) for the current\n    // request (identified by the request ID, as defined by the client).\n\n    requestId =\n      typeof headers[NEXT_REQUEST_ID_HEADER] === 'string'\n        ? headers[NEXT_REQUEST_ID_HEADER]\n        : undefined\n\n    htmlRequestId =\n      typeof headers[NEXT_HTML_REQUEST_ID_HEADER] === 'string'\n        ? headers[NEXT_HTML_REQUEST_ID_HEADER]\n        : undefined\n  }\n\n  return {\n    flightRouterState,\n    isPrefetchRequest,\n    isRuntimePrefetchRequest,\n    isAppShellPrefetchRequest,\n    isRouteTreePrefetchRequest,\n    isHmrRefresh,\n    isRSCRequest,\n    nonce,\n    previouslyRevalidatedTags,\n    requestId,\n    htmlRequestId,\n  }\n}\n\n/**\n * Walks the loader tree to find the minimum `unstable_dynamicStaleTime` exported by\n * any page module. Returns null if no page exports the config.\n *\n * This only reads static exports from page modules — it does not render any\n * server components, so it's cheap to call.\n *\n * TODO: Move this to the prefetch hints file so we don't have to walk the\n * tree on every render.\n */\nasync function getDynamicStaleTime(tree: LoaderTree): Promise<number | null> {\n  const { page, parallelRoutes } = parseLoaderTree(tree)\n\n  let result: number | null = null\n\n  // Only pages (not layouts) can export unstable_dynamicStaleTime.\n  if (typeof page !== 'undefined') {\n    const pageMod = await page[0]()\n    if (\n      pageMod &&\n      typeof (pageMod as AppSegmentConfig).unstable_dynamicStaleTime ===\n        'number'\n    ) {\n      const value = (pageMod as AppSegmentConfig).unstable_dynamicStaleTime!\n      result = result !== null ? Math.min(result, value) : value\n    }\n  }\n\n  const childPromises: Promise<number | null>[] = []\n  for (const parallelRouteKey in parallelRoutes) {\n    childPromises.push(getDynamicStaleTime(parallelRoutes[parallelRouteKey]))\n  }\n  const childResults = await Promise.all(childPromises)\n  for (const childResult of childResults) {\n    if (childResult !== null) {\n      result = result !== null ? Math.min(result, childResult) : childResult\n    }\n  }\n\n  return result\n}\n\nfunction createNotFoundLoaderTree(loaderTree: LoaderTree): LoaderTree {\n  const components = loaderTree[2]\n  const hasGlobalNotFound = !!components['global-not-found']\n  const notFoundTreeComponents: LoaderTree[2] = hasGlobalNotFound\n    ? {\n        layout: components['global-not-found']!,\n        page: [() => null, 'next/dist/client/components/builtin/empty-stub'],\n      }\n    : {\n        page: components['not-found'],\n      }\n\n  return [\n    '',\n    {\n      children: [PAGE_SEGMENT_KEY, {}, notFoundTreeComponents, null],\n    },\n    // Always include global-error so that getGlobalErrorStyles can access it.\n    // When global-not-found is present, use full components.\n    // Otherwise, only include global-error module.\n    hasGlobalNotFound\n      ? components\n      : { 'global-error': components['global-error'] },\n    null, // staticSiblings\n  ]\n}\n\n/**\n * Returns a function that parses the dynamic segment and return the associated value.\n */\nfunction makeGetDynamicParamFromSegment(\n  interpolatedParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  optimisticRouting: boolean\n): GetDynamicParamFromSegment {\n  return function getDynamicParamFromSegment(loaderTree: LoaderTree) {\n    const [segment, , , staticSiblings] = loaderTree\n    const segmentParam = getSegmentParam(segment)\n    if (!segmentParam) {\n      return null\n    }\n    const segmentKey = segmentParam.paramName\n    const dynamicParamType = dynamicParamTypes[segmentParam.paramType]\n    // Static siblings are only included when optimistic routing is enabled\n    const siblings = optimisticRouting ? staticSiblings : null\n    return getDynamicParam(\n      interpolatedParams,\n      segmentKey,\n      dynamicParamType,\n      fallbackRouteParams,\n      siblings\n    )\n  }\n}\n\nfunction NonIndex({\n  createElement,\n  pagePath,\n  statusCode,\n  isPossibleServerAction,\n}: {\n  createElement: typeof ReactClient.createElement\n  pagePath: string\n  statusCode: number | undefined\n  isPossibleServerAction: boolean\n}) {\n  const is404Page = pagePath === '/404'\n  const isInvalidStatusCode = typeof statusCode === 'number' && statusCode > 400\n\n  // Only render noindex for page request, skip for server actions\n  // TODO: is this correct if `isPossibleServerAction` is a false positive?\n  if (!isPossibleServerAction && (is404Page || isInvalidStatusCode)) {\n    return createElement('meta', {\n      name: 'robots',\n      content: 'noindex',\n    })\n  }\n  return null\n}\n\n/**\n * This is used by server actions & client-side navigations to generate RSC data from a client-side request.\n * This function is only called on \"dynamic\" requests (ie, there wasn't already a static response).\n * It uses request headers (namely `next-router-state-tree`) to determine where to start rendering.\n */\nasync function generateDynamicRSCPayload(\n  ctx: AppRenderContext,\n  options?: {\n    actionResult?: ActionResult\n    skipPageRendering?: boolean\n    staleTimeIterable?: AsyncIterable<number>\n    staticStageByteLengthPromise?: Promise<number>\n    shellByteLengthPromise?: Promise<number | null>\n    shellUsedSessionDataPromise?: Promise<boolean>\n    runtimePrefetchStream?: ReadableStream<Uint8Array>\n  }\n): Promise<RSCPayload> {\n  // Flight data that is going to be passed to the browser.\n  // Currently a single item array but in the future multiple patches might be combined in a single request.\n\n  // We initialize `flightData` to an empty string because the client router knows how to tolerate\n  // it (treating it as an MPA navigation). The only time this function wouldn't generate flight data\n  // is for server actions, if the server action handler instructs this function to skip it. When the server\n  // action reducer sees a falsy value, it'll simply resolve the action with no data.\n  let flightData: FlightData = ''\n\n  const {\n    componentMod: {\n      routeModule: {\n        userland: { loaderTree },\n      },\n      createElement,\n      createMetadataComponents,\n      Fragment,\n    },\n    query,\n    requestId,\n    flightRouterState,\n    workStore,\n    url,\n  } = ctx\n\n  const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n\n  if (!options?.skipPageRendering) {\n    const preloadCallbacks: PreloadCallbacks = []\n    const requestStore = workUnitAsyncStorage.getStore()\n\n    // If we're performing instant validation, we need to render the whole tree,\n    // without skipping shared layouts.\n    const needsFullTree =\n      process.env.__NEXT_DEV_SERVER &&\n      ctx.renderOpts.cacheComponents &&\n      !(\n        requestStore?.type === 'request' &&\n        isBypassingCachesInDev(requestStore, workStore)\n      ) &&\n      !options?.actionResult && // Only for navigations\n      (await anySegmentNeedsInstantValidationInDev(loaderTree))\n\n    const { Viewport, Metadata, MetadataOutlet } = createMetadataComponents({\n      tree: loaderTree,\n      parsedQuery: query,\n      pathname: url.pathname,\n      metadataContext: createMetadataContext(ctx.renderOpts),\n      interpolatedParams: ctx.interpolatedParams,\n      serveStreamingMetadata,\n    })\n\n    const rscHead = createElement(\n      Fragment,\n      {\n        key: flightDataPathHeadKey,\n      },\n      createElement(NonIndex, {\n        createElement,\n        pagePath: ctx.pagePath,\n        statusCode: ctx.res.statusCode,\n        isPossibleServerAction: ctx.isPossibleServerAction,\n      }),\n      createElement(Viewport, {\n        key: getFlightViewportKey(requestId),\n      }),\n      createElement(Metadata, {\n        key: getFlightMetadataKey(requestId),\n      })\n    )\n\n    flightData = (\n      needsFullTree\n        ? await createFullTreeFlightDataForNavigation({\n            ctx,\n            loaderTree,\n            rscHead,\n            injectedCSS: new Set(),\n            injectedJS: new Set(),\n            injectedFontPreloadTags: new Set(),\n            preloadCallbacks,\n            MetadataOutlet,\n          })\n        : await walkTreeWithFlightRouterState({\n            ctx,\n            loaderTreeToFilter: loaderTree,\n            parentParams: {},\n            flightRouterState,\n            rscHead,\n            injectedCSS: new Set(),\n            injectedJS: new Set(),\n            injectedFontPreloadTags: new Set(),\n            rootLayoutIncluded: false,\n            preloadCallbacks,\n            MetadataOutlet,\n            hintTree: ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null,\n          })\n    ).map((path) => path.slice(1)) // remove the '' (root) segment\n  }\n\n  // In dev, the Vary header may not reliably reflect whether a route can\n  // be intercepted, because interception routes are compiled on demand.\n  // Default to true so the client doesn't cache a stale Fallback entry.\n  const varyHeader = ctx.res.getHeader('vary')\n  const couldBeIntercepted =\n    !!process.env.__NEXT_DEV_SERVER ||\n    (typeof varyHeader === 'string' && varyHeader.includes(NEXT_URL))\n\n  // If we have an action result, then this is a server action response.\n  // We can rely on this because `ActionResult` will always be a promise, even if\n  // the result is falsey.\n  if (options?.actionResult) {\n    return maybeAppendBuildIdToRSCPayload(ctx, {\n      a: options.actionResult,\n      f: flightData,\n      q: getRenderedSearch(query),\n      i: !!couldBeIntercepted,\n    })\n  }\n\n  // Otherwise, it's a regular RSC response.\n  const baseResponse: NavigationFlightResponse = maybeAppendBuildIdToRSCPayload(\n    ctx,\n    {\n      f: flightData,\n      q: getRenderedSearch(query),\n      i: !!couldBeIntercepted,\n      S: workStore.isStaticGeneration,\n      h: getMetadataVaryParamsAccumulator(),\n      r: getRootParamsVaryParamsAccumulator() ?? undefined,\n    }\n  )\n\n  if (options?.staleTimeIterable !== undefined) {\n    baseResponse.s = options.staleTimeIterable\n  }\n\n  if (options?.staticStageByteLengthPromise !== undefined) {\n    baseResponse.l = options.staticStageByteLengthPromise\n  }\n  if (options?.shellByteLengthPromise !== undefined) {\n    baseResponse.a = options.shellByteLengthPromise\n  }\n  if (options?.shellUsedSessionDataPromise !== undefined) {\n    baseResponse.u = options.shellUsedSessionDataPromise\n  }\n\n  if (options?.runtimePrefetchStream !== undefined) {\n    baseResponse.p = options.runtimePrefetchStream\n  }\n\n  // Include the per-page dynamic stale time from unstable_dynamicStaleTime, but only\n  // for dynamic renders (not prerenders/static generation). The client treats\n  // its presence as authoritative.\n  // TODO: Move this to the prefetch hints file so we don't have to walk the\n  // tree on every render.\n  if (!workStore.isStaticGeneration) {\n    const dynamicStaleTime = await getDynamicStaleTime(\n      ctx.componentMod.routeModule.userland.loaderTree\n    )\n    if (dynamicStaleTime !== null) {\n      baseResponse.d = dynamicStaleTime\n    }\n  }\n\n  return baseResponse\n}\n\nfunction createErrorContext(\n  ctx: AppRenderContext,\n  renderSource: RequestErrorContext['renderSource']\n): RequestErrorContext {\n  return {\n    routerKind: 'App Router',\n    routePath: ctx.pagePath,\n    // TODO: is this correct if `isPossibleServerAction` is a false positive?\n    routeType: ctx.isPossibleServerAction ? 'action' : 'render',\n    renderSource,\n    revalidateReason: getRevalidateReason(ctx.workStore),\n  }\n}\n\n/**\n * Produces a RenderResult containing the Flight data for the given request. See\n * `generateDynamicRSCPayload` for information on the contents of the render result.\n */\nasync function generateDynamicFlightRenderResult(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  options?: {\n    actionResult: ActionResult\n    skipPageRendering: boolean\n    componentTree?: CacheNodeSeedData\n    preloadCallbacks?: PreloadCallbacks\n    temporaryReferences?: WeakMap<any, string>\n    waitUntil?: Promise<unknown>\n  }\n): Promise<RenderResult> {\n  const { htmlRequestId, renderOpts, requestId, workStore } = ctx\n\n  const {\n    onInstrumentationRequestError,\n    setReactDebugChannel,\n    isBuildTimePrerendering = false,\n  } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  // With Server Components HMR cancellation enabled, a superseded HMR refresh\n  // aborts its own client fetch, which closes this response. We use that\n  // response-close to abort the discarded render. This is the\n  // non-Cache-Components dev RSC path; unlike the Cache Components staged path\n  // it has no detached validation, so the render is the only work to cancel.\n  const requestAbortSignal =\n    process.env.__NEXT_DEV_SERVER &&\n    renderOpts.experimental.serverComponentsHmrCancellation === true &&\n    requestStore.isHmrRefresh === true &&\n    isNodeNextResponse(ctx.res)\n      ? signalFromNodeResponse(ctx.res.originalResponse)\n      : undefined\n\n  if (process.env.__NEXT_USE_NODE_STREAMS) {\n    const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n\n    if (debugChannel) {\n      setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n    }\n\n    const { clientModules } = getClientReferenceManifest()\n\n    const rscPayload = await workUnitAsyncStorage.run(\n      requestStore,\n      generateDynamicRSCPayload,\n      ctx,\n      options\n    )\n\n    const flightStream = workUnitAsyncStorage.run(\n      requestStore,\n      renderToNodeFlightStream,\n      ctx.componentMod,\n      rscPayload,\n      clientModules,\n      {\n        onError,\n        temporaryReferences: options?.temporaryReferences,\n        filterStackFrame,\n        debugChannel: debugChannel?.serverSide,\n        signal: requestAbortSignal,\n      }\n    )\n\n    return new FlightRenderResult(\n      flightStream,\n      { fetchMetrics: workStore.fetchMetrics },\n      options?.waitUntil\n    )\n  } else {\n    const debugChannel = setReactDebugChannel && createWebDebugChannel()\n\n    if (debugChannel) {\n      setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n    }\n\n    const { clientModules } = getClientReferenceManifest()\n\n    const rscPayload = await workUnitAsyncStorage.run(\n      requestStore,\n      generateDynamicRSCPayload,\n      ctx,\n      options\n    )\n\n    const flightStream = workUnitAsyncStorage.run(\n      requestStore,\n      renderToWebFlightStream,\n      ctx.componentMod,\n      rscPayload,\n      clientModules,\n      {\n        onError,\n        temporaryReferences: options?.temporaryReferences,\n        filterStackFrame,\n        debugChannel: debugChannel?.serverSide,\n        signal: requestAbortSignal,\n      }\n    )\n\n    return new FlightRenderResult(\n      flightStream,\n      { fetchMetrics: workStore.fetchMetrics },\n      options?.waitUntil\n    )\n  }\n}\n\n/**\n * Production-only staged dynamic flight render for cache components (Node.js\n * streams). Uses staged rendering to separate static (RDC-backed) from\n * runtime/dynamic content.\n */\nasync function generateStagedDynamicFlightRenderResultNode(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore\n): Promise<RenderResult> {\n  const { componentMod, workStore, renderOpts } = ctx\n  const { routeModule } = componentMod\n  const { loaderTree } = routeModule.userland\n  const { onInstrumentationRequestError, experimental } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    false,\n    false,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  const selectStaleTime = createSelectStaleTime(experimental)\n  const staleTimeIterable = new StaleTimeIterable()\n\n  const stageController = new StagedRenderingController({\n    abortSignal: null,\n    abandonController: null,\n    // TODO(cached-navs): this assumes that we checked during build that there's no sync IO.\n    // but it can happen e.g. after a revalidation or conditionally for a param that wasn't prerendered.\n    // we should change this to track sync IO, log an error and advance to dynamic.\n    syncIO: SyncIOMode.Untracked,\n    finalStage: null,\n  })\n\n  // Initialize stale time tracking on the request store.\n  requestStore.stale = INFINITE_CACHE\n  requestStore.stagedRendering = stageController\n  requestStore.varyParamsAccumulator = createResponseVaryParamsAccumulator()\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  trackStaleTime(\n    requestStore as { stale: number },\n    staleTimeIterable,\n    selectStaleTime\n  )\n\n  const shellByteLengthDeferred = createPromiseWithResolvers<number | null>()\n  const staticStageByteLengthDeferred = createPromiseWithResolvers<number>()\n\n  let runtimePrefetchStream: ReadableStream<Uint8Array> | undefined\n\n  // Check if this route should runtime-cache its navigation. This happens when\n  // Partial Prefetching is enabled for the route, either per segment (a\n  // `prefetch` of 'partial' or 'unstable_eager') or globally (the\n  // `partialPrefetching` config). If so, we piggyback on the dynamic render to\n  // fill caches and then spawn a final runtime prerender whose result stream\n  // is embedded in the RSC payload. This is gated because it adds extra server\n  // processing and increases the response payload size.\n  if (\n    Boolean(renderOpts.partialPrefetching) ||\n    (await anySegmentHasPartialPrefetchingEnabled(loaderTree))\n  ) {\n    // Create a mutable cache that gets filled during the dynamic render.\n    const prerenderResumeDataCache = createPrerenderResumeDataCache()\n    requestStore.resumeDataCache = prerenderResumeDataCache\n\n    const cacheSignal = new CacheSignal()\n    trackPendingModules(cacheSignal)\n    requestStore.cacheSignal = cacheSignal\n\n    // Create a deferred stream for the runtime prefetch result. Its readable\n    // side goes into the RSC payload (Flight serializes it lazily). The\n    // writable side receives the runtime prerender result once the dynamic\n    // render has filled all caches.\n    const runtimePrefetchTransform = new TransformStream<Uint8Array>()\n    runtimePrefetchStream = runtimePrefetchTransform.readable\n\n    // Wait for the dynamic render to fill caches, then run the final runtime\n    // prerender (fire-and-forget — does not block the response).\n    void cacheSignal\n      .cacheReady()\n      .then(() =>\n        spawnRuntimePrefetchWithFilledCaches(\n          runtimePrefetchTransform.writable,\n          ctx,\n          prerenderResumeDataCache,\n          requestStore,\n          onError\n        )\n      )\n  }\n\n  const rscPayload = await workUnitAsyncStorage.run(\n    requestStore,\n    generateDynamicRSCPayload,\n    ctx,\n    {\n      staleTimeIterable,\n      staticStageByteLengthPromise: staticStageByteLengthDeferred.promise,\n      shellByteLengthPromise: shellByteLengthDeferred.promise,\n      runtimePrefetchStream,\n    }\n  )\n\n  const { clientModules } = getClientReferenceManifest()\n\n  const flightStream = await runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.ShellStatic)\n\n      const sourceStream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToNodeFlightStream,\n        ctx.componentMod,\n        rscPayload,\n        clientModules,\n        { onError, filterStackFrame }\n      ) as Readable\n\n      const replayable = new ReplayableNodeStream(sourceStream)\n      const dynamicStream = replayable.createReplayStream()\n      const staticStream = replayable.createReplayStream()\n\n      void countShellAndStaticStageBytes(staticStream, stageController).then(\n        (byteLengths) => {\n          staticStageByteLengthDeferred.resolve(byteLengths[RenderStage.Static])\n          shellByteLengthDeferred.resolve(byteLengths[RenderStage.ShellStatic])\n        }\n      )\n\n      return dynamicStream\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      // This is a separate task that doesn't advance a stage. It forces\n      // draining the immediate queue so that the stale time iterable and vary\n      // params accumulators are flushed before we advance to the dynamic stage.\n      staleTimeIterable.close()\n      if (requestStore.varyParamsAccumulator) {\n        finishAccumulatingVaryParams(requestStore.varyParamsAccumulator)\n      }\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n\n  return new FlightRenderResult(flightStream, {\n    fetchMetrics: workStore.fetchMetrics,\n  })\n}\n\n/**\n * Runs a final runtime prerender using the provided (already filled) cache and\n * pipes its output into the provided writable stream. The caller is responsible\n * for waiting until caches are warm before calling this function.\n */\nasync function spawnRuntimePrefetchWithFilledCaches(\n  writable: WritableStream<Uint8Array>,\n  ctx: AppRenderContext,\n  prerenderResumeDataCache: PrerenderResumeDataCache,\n  requestStore: RequestStore,\n  onError: (err: unknown) => string | undefined\n): Promise<void> {\n  try {\n    const { componentMod, getDynamicParamFromSegment } = ctx\n    const { loaderTree } = componentMod.routeModule.userland\n\n    const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n    const staleTimeIterable = new StaleTimeIterable()\n\n    // We want to be able to rewind the result to a session shell.\n    const mode: RuntimePrerenderMode = {\n      type: 'rewindable-session-shell',\n      shellUsedSessionDataDeferred: createPromiseWithResolvers(),\n      shellByteLengthDeferred: createPromiseWithResolvers(),\n    }\n\n    const { result } = await finalRuntimeServerPrerender(\n      mode,\n      ctx,\n      generateDynamicRSCPayload.bind(null, ctx, {\n        staleTimeIterable,\n        shellByteLengthPromise:\n          mode.type === 'rewindable-session-shell'\n            ? mode.shellByteLengthDeferred.promise\n            : undefined,\n        shellUsedSessionDataPromise: mode.shellUsedSessionDataDeferred.promise,\n      }),\n      prerenderResumeDataCache,\n      rootParams,\n      requestStore.headers,\n      requestStore.cookies,\n      requestStore.draftMode,\n      onError,\n      staleTimeIterable,\n      // This path is only reached on the production Cache Components + Cached\n      // Navigations renders (the staged Flight response and the HTML hydration\n      // payload), which set up no React debug channel.\n      undefined\n    )\n\n    await result.prelude.pipeTo(writable)\n  } catch {\n    // Runtime prerender failed. Close the stream gracefully — the navigation\n    // still works, we just won't get cached runtime data.\n    try {\n      await writable.close()\n    } catch {\n      // Writable may already be closed/errored.\n    }\n  }\n}\n\ntype RenderToReadableStreamServerOptions = NonNullable<\n  Parameters<\n    (typeof import('react-server-dom-webpack/server.node'))['renderToReadableStream']\n  >[2]\n>\n\nasync function stagedRenderWithoutCachesInDevNode(\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  options: Omit<RenderToReadableStreamServerOptions, 'environmentName'>\n) {\n  // We're rendering while bypassing caches,\n  // so we have no hope of showing a useful runtime stage.\n  // But we still want things like `params` to show up in devtools correctly,\n  // which relies on mechanisms we've set up for staged rendering,\n  // so we do a 2-task version (Static -> Dynamic) instead.\n\n  // We aren't filling caches so we don't need to abort this render, it'll\n  // stream in a single pass\n  const stageController = new StagedRenderingController({\n    abortSignal: null,\n    abandonController: null,\n    syncIO: SyncIOMode.Untracked, // do not track sync IO (we don't have reliable stages)\n    finalStage: null,\n  })\n\n  const environmentName = () => {\n    const currentStage = stageController.currentStage\n    return getEnvironmentNameForStageWithoutCaches(currentStage)\n  }\n\n  requestStore.stagedRendering = stageController\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  const { clientModules } = getClientReferenceManifest()\n  const rscPayload = await getPayload(requestStore)\n\n  return await runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.ShellStatic)\n\n      return workUnitAsyncStorage.run(\n        requestStore,\n        renderToNodeFlightStream,\n        ctx.componentMod,\n        rscPayload,\n        clientModules,\n        {\n          ...options,\n          environmentName,\n        }\n      )\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n}\n\nfunction getEnvironmentNameForStageWithoutCaches(stage: RenderStage) {\n  switch (stage) {\n    case RenderStage.Before:\n    case RenderStage.ShellStatic:\n    case RenderStage.Static:\n      return 'Prerender'\n    case RenderStage.ShellRuntime:\n    case RenderStage.Runtime:\n    case RenderStage.Dynamic:\n    case RenderStage.Abandoned:\n      return 'Server'\n    default:\n      stage satisfies never\n      throw new InvariantError(`Invalid render stage: ${stage}`)\n  }\n}\n\n/**\n * Fork of `generateDynamicFlightRenderResult` that renders using `renderWithRestartOnCacheMissInDev`\n * to ensure correct separation of environments Prerender/Server (for use in Cache Components)\n */\nasync function generateDynamicFlightRenderResultWithStagesInDev(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  initialRequestStore: RequestStore,\n  createRequestStore: (() => RequestStore) | undefined,\n  fallbackParams: OpaqueFallbackRouteParams | null\n): Promise<RenderResult> {\n  const {\n    htmlRequestId,\n    renderOpts,\n    requestId,\n    workStore,\n    componentMod: {\n      createElement,\n      routeModule: {\n        userland: { loaderTree },\n      },\n    },\n    url,\n  } = ctx\n\n  const {\n    onInstrumentationRequestError,\n    setReactDebugChannel,\n    setCacheStatus,\n    isBuildTimePrerendering = false,\n  } = renderOpts\n\n  let didErrorObservably = false\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    didErrorObservably = true\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  // We validate RSC requests for HMR refreshes and client navigations when\n  // instant configs exist, since we render all the layouts necessary to perform\n  // the validation in those cases.\n  const shouldValidate =\n    !ctx.isPrefetch &&\n    !isBypassingCachesInDev(initialRequestStore, workStore) &&\n    (initialRequestStore.isHmrRefresh === true ||\n      (await anySegmentNeedsInstantValidationInDev(loaderTree)))\n\n  const getPayload = async (requestStore: RequestStore) => {\n    const payload: RSCPayload &\n      RSCPayloadDevProperties &\n      RSCInitialPayloadPartialDev = await workUnitAsyncStorage.run(\n      requestStore,\n      generateDynamicRSCPayload,\n      ctx,\n      undefined\n    )\n\n    if (isBypassingCachesInDev(requestStore, workStore)) {\n      // Mark the RSC payload to indicate that caches were bypassed in dev.\n      // This lets the client know not to cache anything based on this render.\n      payload._bypassCachesInDev = createElement(WarnForBypassCachesInDev, {\n        route: workStore.route,\n      })\n    } else if (shouldValidate) {\n      // If this payload will be used for validation, it needs to contain the\n      // canonical URL. Without it we'd get an error.\n      payload.c = prepareInitialCanonicalUrl(url)\n    }\n\n    return payload\n  }\n\n  let debugChannel: DebugChannelPair | undefined\n  let stream: AnyStream\n\n  if (\n    // We only do this flow if we can safely recreate the store from scratch\n    // (which is not the case for renders after an action)\n    createRequestStore &&\n    // We only do this flow if we're not bypassing caches in dev using\n    // \"disable cache\" in devtools, a hard refresh (cache-control: \"no-cache\"),\n    // or draft mode.\n    !isBypassingCachesInDev(initialRequestStore, workStore)\n  ) {\n    // Before we kick off the render, we set the cache status back to it's initial state\n    // in case a previous render bypassed the cache.\n    if (setCacheStatus) {\n      setCacheStatus('ready', htmlRequestId)\n    }\n\n    const prefetchMode = await getPrefetchingModeForPage(renderOpts, loaderTree)\n\n    // A client navigation into a Partial Prefetching route extends the shell\n    // through the runtime-prefetchable content: it has already settled on the\n    // client (via the prefetch) by the time it navigates, so it belongs in this\n    // response's shell. Everything else uses the static shell, like an initial\n    // load: plain navigations, and HMR refreshes (a fresh render of the current\n    // page, with no settled prefetch to draw on). Dynamic content always\n    // streams in after the shell.\n    let prefetchStage: StreamRevealStage\n\n    if (initialRequestStore.isHmrRefresh === true) {\n      prefetchStage = RenderStage.Static\n    } else {\n      if (prefetchMode === PrefetchingMode.Partial) {\n        // TODO(app-shells): model `partialPrefetching: \"unstable_eager\"`\n        // TODO(app-shells): if this navigation came from <Link prefetch={true} />,\n        // we should show the shell for a speculative prefetch\n        // (which can have more data than the app shell)\n        prefetchStage = RenderStage.ShellRuntime\n      } else {\n        prefetchStage = RenderStage.Static\n      }\n    }\n\n    // With Server Components HMR cancellation enabled, a superseded HMR refresh\n    // aborts its own client fetch (see the client-side supersession logic),\n    // which closes this response. We use that response-close as the signal to\n    // stop the server work this refresh started that's now discarded: the\n    // streaming render below is aborted, and the detached validation is skipped\n    // (including aborting the background renders it uses to prepare its\n    // inputs). The render's in-flight `'use cache'` fills are left running,\n    // since they aren't tied to its controller. A superseding refresh can't\n    // reuse those fills today, because each edit changes the HMR hash baked\n    // into the cache key; that becomes useful only once those keys use\n    // implementation-derived hashes instead (see `use-cache-wrapper.ts`).\n    //\n    // The detached validation is Cache Components only: it runs only on this\n    // staged dev render, so there's nothing to skip on the non-Cache Components\n    // dev RSC path. That path (`generateDynamicFlightRenderResult`) aborts its\n    // superseded render the same way; it just has no validation to skip.\n    //\n    // TODO: The gate is `isHmrRefresh` for now because that's the only case we\n    // cancel today. The response-close signal itself is general, so this could\n    // later be relaxed to also cover a browser stop or a devtools \"cancel\n    // render\" button.\n    const requestAbortSignal =\n      renderOpts.experimental.serverComponentsHmrCancellation === true &&\n      initialRequestStore.isHmrRefresh === true &&\n      isNodeNextResponse(ctx.res)\n        ? signalFromNodeResponse(ctx.res.originalResponse)\n        : undefined\n\n    const result = await stagedRenderWithCachesInDev({\n      prefetchMode,\n      ctx,\n      requestStore: initialRequestStore,\n      createRequestStore,\n      getPayload,\n      onError,\n      shouldValidate,\n      fallbackRouteParams: fallbackParams,\n      getDevRenderDidError: () => didErrorObservably,\n      navigationKind: {\n        type: 'prefetched-client',\n        prefetchStage,\n      },\n      requestAbortSignal,\n    })\n    stream = result.stream\n    debugChannel = result.debugChannel\n  } else {\n    // We're either bypassing caches or we can't restart the render.\n    // Do a dynamic render, but with (basic) environment labels.\n\n    // Set cache status to bypass when specifically bypassing caches in dev\n    if (setCacheStatus) {\n      setCacheStatus('bypass', htmlRequestId)\n    }\n\n    debugChannel = setReactDebugChannel && createNodeDebugChannel()\n\n    stream = await stagedRenderWithoutCachesInDevNode(\n      ctx,\n      initialRequestStore,\n      getPayload,\n      {\n        onError: onError,\n        filterStackFrame,\n        debugChannel: debugChannel?.serverSide,\n      }\n    )\n  }\n\n  if (debugChannel && setReactDebugChannel) {\n    setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n  }\n\n  return new FlightRenderResult(stream, {\n    fetchMetrics: workStore.fetchMetrics,\n  })\n}\n\nasync function generateRuntimePrefetchResult(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  isShellPrefetch: boolean\n): Promise<RenderResult> {\n  const { workStore, renderOpts, htmlRequestId, requestId } = ctx\n  const {\n    isBuildTimePrerendering = false,\n    onInstrumentationRequestError,\n    setReactDebugChannel,\n  } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      // TODO(runtime-ppr): should we use a different value?\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    false,\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  const metadata: AppPageRenderResultMetadata = {}\n  const staleTimeIterable = new StaleTimeIterable()\n\n  const {\n    componentMod: {\n      routeModule: {\n        userland: { loaderTree },\n      },\n    },\n    getDynamicParamFromSegment,\n  } = ctx\n  const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  // We need to share caches between the prospective prerender and the final prerender,\n  // but we're not going to persist this anywhere.\n  const prerenderResumeDataCache = createPrerenderResumeDataCache()\n\n  await prospectiveRuntimeServerPrerender(\n    ctx,\n    isShellPrefetch,\n    generateDynamicRSCPayload.bind(null, ctx),\n    prerenderResumeDataCache,\n    rootParams,\n    requestStore.headers,\n    requestStore.cookies,\n    requestStore.draftMode\n  )\n\n  const mode: RuntimePrerenderMode = isShellPrefetch\n    ? {\n        type: 'session-shell-only',\n        shellUsedSessionDataDeferred: createPromiseWithResolvers(),\n      }\n    : {\n        type: 'rewindable-session-shell',\n        shellUsedSessionDataDeferred: createPromiseWithResolvers(),\n        shellByteLengthDeferred: createPromiseWithResolvers(),\n      }\n\n  const debugChannel = setReactDebugChannel\n    ? createWebDebugChannel()\n    : undefined\n  if (debugChannel && setReactDebugChannel) {\n    setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n  }\n\n  const response = await finalRuntimeServerPrerender(\n    mode,\n    ctx,\n    generateDynamicRSCPayload.bind(null, ctx, {\n      staleTimeIterable,\n      shellByteLengthPromise:\n        mode.type === 'rewindable-session-shell'\n          ? mode.shellByteLengthDeferred.promise\n          : undefined,\n      shellUsedSessionDataPromise: mode.shellUsedSessionDataDeferred.promise,\n    }),\n    prerenderResumeDataCache,\n    rootParams,\n    requestStore.headers,\n    requestStore.cookies,\n    requestStore.draftMode,\n    onError,\n    staleTimeIterable,\n    debugChannel?.serverSide\n  )\n\n  applyMetadataFromPrerenderResult(response, metadata, workStore)\n  metadata.fetchMetrics = ctx.workStore.fetchMetrics\n\n  return new FlightRenderResult(response.result.prelude, metadata)\n}\n\nasync function prospectiveRuntimeServerPrerender(\n  ctx: AppRenderContext,\n  isShellPrefetch: boolean,\n  getPayload: () => Promise<RSCPayload>,\n  resumeDataCache: PrerenderResumeDataCache | null,\n  rootParams: Params,\n  headers: PrerenderStoreModernRuntime['headers'],\n  cookies: PrerenderStoreModernRuntime['cookies'],\n  draftMode: PrerenderStoreModernRuntime['draftMode']\n) {\n  const { implicitTags, renderOpts, workStore } = ctx\n  const { ComponentMod } = renderOpts\n\n  // Prerender controller represents the lifetime of the prerender.\n  // It will be aborted when a Task is complete or a synchronously aborting\n  // API is called. Notably during cache-filling renders this does not actually\n  // terminate the render itself which will continue until all caches are filled\n  const initialServerPrerenderController = new AbortController()\n\n  // This controller represents the lifetime of the React render call. Notably\n  // during the cache-filling render it is different from the prerender controller\n  // because we don't want to end the react render until all caches are filled.\n  const initialServerRenderController = new AbortController()\n\n  // The cacheSignal helps us track whether caches are still filling or we are ready\n  // to cut the render off.\n  const cacheSignal = new CacheSignal()\n\n  const initialServerPrerenderStore: PrerenderStoreModernRuntime = {\n    type: 'prerender-runtime',\n    phase: 'render',\n    rootParams,\n    implicitTags,\n    renderSignal: initialServerRenderController.signal,\n    controller: initialServerPrerenderController,\n    // During the initial prerender we need to track all cache reads to ensure\n    // we render long enough to fill every cache it is possible to visit during\n    // the final prerender.\n    cacheSignal,\n    // We only need to track dynamic accesses during the final prerender.\n    dynamicTracking: null,\n    // Runtime prefetches are never cached server-side, only client-side,\n    // so we set `expire` and `revalidate` to their minimum values just in case.\n    revalidate: 1,\n    expire: 0,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    resumeDataCache,\n    hmrRefreshHash: undefined,\n    // We don't track vary params during initial prerender, only the final one\n    varyParamsAccumulator: null,\n    // No stage sequencing needed for prospective renders.\n    stagedRendering: null,\n    isSessionShell: isShellPrefetch,\n    // These are not present in regular prerenders, but allowed in a runtime\n    // prerender.\n    // Any cache keyed on headers() or cookies() needs to be invalidated.\n    // Otherwise some Next.js API semantics leak across render passes.\n    headers: HeadersAdapter.fresh(headers),\n    cookies: RequestCookiesAdapter.fresh(cookies),\n    draftMode,\n  }\n\n  const { clientModules } = getClientReferenceManifest()\n\n  // We're not going to use the result of this render because the only time it could be used\n  // is if it completes in a microtask and that's likely very rare for any non-trivial app\n  const initialServerPayload = await workUnitAsyncStorage.run(\n    initialServerPrerenderStore,\n    getPayload\n  )\n\n  const prerenderOptions = {\n    filterStackFrame,\n    onError: (err: unknown) => {\n      const digest = getDigestForWellKnownError(err)\n\n      if (digest) {\n        return digest\n      }\n\n      if (initialServerPrerenderController.signal.aborted) {\n        // The render aborted before this error was handled which indicates\n        // the error is caused by unfinished components within the render\n        return\n      } else if (\n        process.env.NEXT_DEBUG_BUILD ||\n        process.env.__NEXT_VERBOSE_LOGGING\n      ) {\n        printDebugThrownValueForProspectiveRender(\n          err,\n          workStore.route,\n          Phase.ProspectiveRender\n        )\n      }\n    },\n    // We don't want to stop rendering until the cacheSignal is complete so we pass\n    // a different signal to this render call than is used by dynamic APIs to signify\n    // transitioning out of the prerender environment\n    signal: initialServerRenderController.signal,\n  }\n\n  const pendingInitialServerResult = workUnitAsyncStorage.run(\n    initialServerPrerenderStore,\n    getServerPrerender(ComponentMod),\n    initialServerPayload,\n    clientModules,\n    prerenderOptions\n  )\n\n  // Wait for all caches to be finished filling and for async imports to resolve\n  trackPendingModules(cacheSignal)\n  await cacheSignal.cacheReady()\n\n  initialServerRenderController.abort()\n  initialServerPrerenderController.abort()\n\n  // We don't need to continue the prerender process if we already\n  // detected invalid dynamic usage in the initial prerender phase.\n  if (workStore.invalidDynamicUsageError) {\n    throw workStore.invalidDynamicUsageError\n  }\n\n  try {\n    return await createReactServerPrerenderResult(pendingInitialServerResult)\n  } catch (err) {\n    if (\n      initialServerRenderController.signal.aborted ||\n      initialServerPrerenderController.signal.aborted\n    ) {\n      // These are expected errors that might error the prerender. we ignore them.\n    } else if (\n      process.env.NEXT_DEBUG_BUILD ||\n      process.env.__NEXT_VERBOSE_LOGGING\n    ) {\n      // We don't normally log these errors because we are going to retry anyway but\n      // it can be useful for debugging Next.js itself to get visibility here when needed\n      printDebugThrownValueForProspectiveRender(\n        err,\n        workStore.route,\n        Phase.ProspectiveRender\n      )\n    }\n    return null\n  }\n}\n\n/**\n * Prepends a single ASCII byte to the chunks indicating whether the response\n * is partial (contains dynamic holes): '~' (0x7e) for partial, '#' (0x23)\n * for complete.\n */\nfunction prependIsPartialByteToChunks(\n  chunks: Uint8Array[],\n  isPartial: boolean\n) {\n  const markerByte = isPartial ? 0x7e : 0x23\n  return [new Uint8Array([markerByte]), ...chunks]\n}\n\ntype RuntimePrerenderMode =\n  | {\n      type: 'session-shell-only'\n      shellUsedSessionDataDeferred: PromiseWithResolvers<boolean>\n    }\n  | {\n      type: 'rewindable-session-shell'\n      shellUsedSessionDataDeferred: PromiseWithResolvers<boolean>\n      shellByteLengthDeferred: PromiseWithResolvers<number | null>\n    }\n\nasync function finalRuntimeServerPrerender(\n  mode: RuntimePrerenderMode,\n  ctx: AppRenderContext,\n  getPayload: () => Promise<RSCPayload>,\n  resumeDataCache: PrerenderResumeDataCache | null,\n  rootParams: Params,\n  headers: PrerenderStoreModernRuntime['headers'],\n  cookies: PrerenderStoreModernRuntime['cookies'],\n  draftMode: PrerenderStoreModernRuntime['draftMode'],\n  onError: (err: unknown) => string | undefined,\n  staleTimeIterable: StaleTimeIterable,\n  debugChannel: RenderToReadableStreamServerOptions['debugChannel']\n) {\n  const { implicitTags, renderOpts } = ctx\n  const { ComponentMod, experimental, isDebugDynamicAccesses } = renderOpts\n  const selectStaleTime = createSelectStaleTime(experimental)\n\n  let resultIsPartial = false\n  const finalServerController = new AbortController()\n\n  const serverDynamicTracking = createDynamicTrackingState(\n    isDebugDynamicAccesses\n  )\n\n  const finalStageController = new StagedRenderingController({\n    abortSignal: finalServerController.signal,\n    abandonController: null,\n    // In dynamic renders, we allow Sync IO in the Runtime stage\n    // if partialPrefetching is not enabled. However, a runtime prerender\n    // (or App Shell) is stricter and never allows sync IO in any stage\n    // that we go through here (i.e. < Dynamic)\n    syncIO: SyncIOMode.AllowedInDynamic,\n    // we only reach the runtime stage if we're doing a rewindable render\n    finalStage:\n      mode.type === 'session-shell-only'\n        ? RenderStage.ShellRuntime\n        : RenderStage.Runtime,\n  })\n\n  const varyParamsAccumulator = createResponseVaryParamsAccumulator()\n\n  const finalServerPrerenderStore: PrerenderStoreModernRuntime = {\n    type: 'prerender-runtime',\n    phase: 'render',\n    rootParams,\n    implicitTags,\n    renderSignal: finalServerController.signal,\n    controller: finalServerController,\n    // All caches we could read must already be filled so no tracking is necessary\n    cacheSignal: null,\n    dynamicTracking: serverDynamicTracking,\n    // Runtime prefetches are never cached server-side, only client-side,\n    // so we set `expire` and `revalidate` to their minimum values just in case.\n    revalidate: 1,\n    expire: 0,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    resumeDataCache,\n    hmrRefreshHash: undefined,\n    varyParamsAccumulator,\n    stagedRendering: finalStageController,\n    isSessionShell: mode.type === 'session-shell-only',\n    // These are not present in regular prerenders, but allowed in a runtime\n    // prerender.\n    headers: HeadersAdapter.fresh(headers),\n    cookies: RequestCookiesAdapter.fresh(cookies),\n    draftMode,\n  }\n\n  trackStaleTime(finalServerPrerenderStore, staleTimeIterable, selectStaleTime)\n\n  const { clientModules } = getClientReferenceManifest()\n\n  const finalRSCPayload = await workUnitAsyncStorage.run(\n    finalServerPrerenderStore,\n    getPayload\n  )\n\n  const streamState = createStreamPendingState()\n  const collectedChunks = createPrerenderChunksAccumulator()\n  const stageByteLengths = createStageByteLengths()\n  const collectChunk = (chunk: Uint8Array) => {\n    collectPrerenderChunk(collectedChunks, finalServerController.signal, chunk)\n    increaseChunkByteLengths(\n      stageByteLengths,\n      finalStageController.currentStage,\n      chunk.byteLength\n    )\n  }\n\n  let didHandleUnexpectedAbort = false\n  /**\n   * @returns - whether or not the task should be skipped\n   * because the render was already aborted.\n   * */\n  const checkUnexpectedAbort = (): boolean => {\n    if (finalServerController.signal.aborted) {\n      // If the server controller is already aborted, then we must have encountered sync IO\n      if (!didHandleUnexpectedAbort) {\n        didHandleUnexpectedAbort = true\n        onUnexpectedAbort()\n      }\n      return true\n    }\n\n    // Not aborted.\n    return false\n  }\n\n  const onUnexpectedAbort = () => {\n    resultIsPartial = true\n\n    // FIXME(NAR-810): If we're already aborted due to Sync IO, there should be no need to\n    // finish the accumulators. However, it seems like in `--debug-prerender`\n    // the stream will stay open if we don't close the iterable here.\n    if (process.env.NODE_ENV === 'development') {\n      if (staleTimeIterable !== undefined) {\n        staleTimeIterable.close()\n      }\n      finishAccumulatingVaryParams(varyParamsAccumulator)\n    }\n  }\n\n  await runInSequentialTasks(\n    async () => {\n      finalStageController.advanceStage(RenderStage.ShellStatic)\n\n      let stream = workUnitAsyncStorage.run(\n        finalServerPrerenderStore,\n        ComponentMod.renderToReadableStream,\n        finalRSCPayload,\n        clientModules,\n        {\n          filterStackFrame,\n          onError,\n          signal: finalServerController.signal,\n          debugChannel,\n        }\n      )\n\n      // Note: this await will only resolve after the last task (unless sync IO aborts the render earlier)\n      // We await it here so that if the stream errors, it's not an unhandled rejection.\n      await iterateStreamingPrerenderChunks(\n        stream,\n        finalServerController.signal,\n        collectChunk,\n        streamState\n      )\n    },\n    () => {\n      if (checkUnexpectedAbort()) return\n      finalStageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      if (checkUnexpectedAbort()) return\n      finalStageController.advanceStage(RenderStage.ShellRuntime)\n    },\n    () => {\n      if (checkUnexpectedAbort()) return\n\n      if (mode.type === 'session-shell-only') {\n        // We're only rendering a shell, so we do not advance to stages where link data is resolved.\n        return\n      }\n      finalStageController.advanceStage(RenderStage.Runtime)\n    },\n    () => {\n      if (checkUnexpectedAbort()) return\n\n      // Finish the accumulators. We need to wait for Flight to flush the result into the stream,\n      // which is scheduled in a (fast) immediate, so we do this in a separate task\n      // (fast immediates will be drained at the end of the task, so in the next task we know we're done flushing)\n\n      // Check if session data unblocked new content in the shell.\n      const didSessionDataUnblockNewContent =\n        stageByteLengths[RenderStage.ShellRuntime] >\n        stageByteLengths[RenderStage.Static]\n      mode.shellUsedSessionDataDeferred.resolve(didSessionDataUnblockNewContent)\n\n      if (mode.type === 'rewindable-session-shell') {\n        // If advancing to the runtime stage didn't unblock new content,\n        // then the result does not depend on link data and can be used as a shell (indicated via `null`).\n        // Otherwise, send a byte length to indicate where the shell content ends.\n        const didLinkDataUnblockNewContent =\n          stageByteLengths[RenderStage.Runtime] >\n          stageByteLengths[RenderStage.ShellRuntime]\n        mode.shellByteLengthDeferred.resolve(\n          didLinkDataUnblockNewContent\n            ? stageByteLengths[RenderStage.ShellRuntime]\n            : null\n        )\n      }\n\n      staleTimeIterable.close()\n      finishAccumulatingVaryParams(varyParamsAccumulator)\n    },\n    () => {\n      if (checkUnexpectedAbort()) return\n\n      if (streamState.isPending) {\n        // If the prerender is still pending then it must depend on dynamic data\n        // (or, if this is a shell prefetch, link data)\n        resultIsPartial = true\n      }\n\n      workUnitAsyncStorage.run(\n        finalServerPrerenderStore,\n        finalServerController.abort.bind(finalServerController)\n      )\n    }\n  )\n\n  const result = {\n    prelude: new ReactServerPrerenderResult(\n      prependIsPartialByteToChunks(\n        collectedChunks.prerenderChunks,\n        resultIsPartial\n      )\n    ).consumeAsStream(),\n  }\n\n  return {\n    result,\n    // TODO(runtime-ppr): do we need to produce a digest map here?\n    // digestErrorsMap: ...,\n    dynamicAccess: serverDynamicTracking,\n    isPartial: resultIsPartial,\n    collectedRevalidate: finalServerPrerenderStore.revalidate,\n    collectedExpire: finalServerPrerenderStore.expire,\n    collectedStale: staleTimeIterable.currentValue,\n    collectedTags: finalServerPrerenderStore.tags,\n  }\n}\n\n/**\n * Crawlers will inadvertently think the canonicalUrl in the RSC payload should be crawled\n * when our intention is to just seed the router state with the current URL.\n * This function splits up the pathname so that we can later join it on\n * when we're ready to consume the path.\n */\nfunction prepareInitialCanonicalUrl(url: RequestStore['url']) {\n  return (url.pathname + url.search).split('/')\n}\n\nfunction getRenderedSearch(query: NextParsedUrlQuery): string {\n  // Inlined implementation of querystring.encode, which is not available in\n  // the Edge runtime.\n  const pairs = []\n  for (const key in query) {\n    const value = query[key]\n    if (value == null) continue\n    if (Array.isArray(value)) {\n      for (const v of value) {\n        pairs.push(\n          `${encodeURIComponent(key)}=${encodeURIComponent(String(v))}`\n        )\n      }\n    } else {\n      pairs.push(\n        `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`\n      )\n    }\n  }\n\n  // The result should match the format of a web URL's `search` property, since\n  // this is the format that's stored in the App Router state.\n  // TODO: We're a bit inconsistent about this. The x-nextjs-rewritten-query\n  // header omits the leading question mark. Should refactor to always do\n  // that instead.\n  if (pairs.length === 0) {\n    // If the search string is empty, return an empty string.\n    return ''\n  }\n  // Prepend '?' to the search params string.\n  return '?' + pairs.join('&')\n}\n\n// This is the data necessary to render <AppRouter /> when no SSR errors are encountered\nasync function getRSCPayload(\n  tree: LoaderTree,\n  ctx: AppRenderContext,\n  options: {\n    is404: boolean\n    staleTimeIterable?: AsyncIterable<number>\n    staticStageByteLengthPromise?: Promise<number>\n    shellByteLengthPromise?: Promise<number | null>\n    runtimePrefetchStream?: ReadableStream<Uint8Array>\n  }\n): Promise<InitialRSCPayload & { P: ReactNode }> {\n  const {\n    is404,\n    staleTimeIterable,\n    staticStageByteLengthPromise,\n    shellByteLengthPromise,\n    runtimePrefetchStream,\n  } = options\n  const injectedCSS = new Set<string>()\n  const injectedJS = new Set<string>()\n  const injectedFontPreloadTags = new Set<string>()\n  let missingSlots: Set<string> | undefined\n\n  // We only track missing parallel slots in development\n  if (process.env.__NEXT_DEV_SERVER) {\n    missingSlots = new Set<string>()\n  }\n\n  const {\n    getDynamicParamFromSegment,\n    query,\n    appUsingSizeAdjustment,\n    componentMod: { createMetadataComponents, createElement, Fragment },\n    url,\n    workStore,\n  } = ctx\n\n  const hints = ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null\n  const prefetchInliningEnabled = Boolean(\n    ctx.renderOpts.experimental.prefetchInlining\n  )\n  const initialTree = await createFlightRouterStateFromLoaderTree(\n    tree,\n    hints,\n    prefetchInliningEnabled,\n    ctx.renderOpts.cacheComponents,\n    ctx.renderOpts.partialPrefetching,\n    workStore.isStaticGeneration,\n    ctx.renderOpts.isBuildTimePrerendering ?? false,\n    getDynamicParamFromSegment,\n    query\n  )\n  const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n  const hasGlobalNotFound = !!tree[2]['global-not-found']\n\n  const { Viewport, Metadata, MetadataOutlet } = createMetadataComponents({\n    tree,\n    // When it's using global-not-found, metadata errorType is undefined, which will retrieve the\n    // metadata from the page.\n    // When it's using not-found, metadata errorType is 'not-found', which will retrieve the\n    // metadata from the not-found.js boundary.\n    // TODO: remove this condition and keep it undefined when global-not-found is stabilized.\n    errorType: is404 && !hasGlobalNotFound ? 'not-found' : undefined,\n    parsedQuery: query,\n    pathname: url.pathname,\n    metadataContext: createMetadataContext(ctx.renderOpts),\n    interpolatedParams: ctx.interpolatedParams,\n    serveStreamingMetadata,\n  })\n\n  const preloadCallbacks: PreloadCallbacks = []\n\n  const seedData = await createComponentTree({\n    ctx,\n    loaderTree: tree,\n    parentParams: {},\n    parentOptionalCatchAllParamName: null,\n    parentRuntimePrefetchable: false,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    rootLayoutIncluded: false,\n    missingSlots,\n    preloadCallbacks,\n    authInterrupts: ctx.renderOpts.experimental.authInterrupts,\n    MetadataOutlet,\n  })\n\n  // When the `vary` response header is present with `Next-URL`, that means there's a chance\n  // it could respond differently if there's an interception route. We provide this information\n  // to `AppRouter` so that it can properly seed the prefetch cache with a prefix, if needed.\n  // In dev, the Vary header may not reliably reflect whether a route can\n  // be intercepted, because interception routes are compiled on demand.\n  // Default to true so the client doesn't cache a stale Fallback entry.\n  const varyHeader = ctx.res.getHeader('vary')\n  const couldBeIntercepted =\n    !!process.env.__NEXT_DEV_SERVER ||\n    (typeof varyHeader === 'string' && varyHeader.includes(NEXT_URL))\n\n  const initialHead = createElement(\n    Fragment,\n    {\n      key: flightDataPathHeadKey,\n    },\n    createElement(NonIndex, {\n      createElement,\n      pagePath: ctx.pagePath,\n      statusCode: ctx.res.statusCode,\n      isPossibleServerAction: ctx.isPossibleServerAction,\n    }),\n    createElement(Viewport, null),\n    createElement(Metadata, null),\n    appUsingSizeAdjustment\n      ? createElement('meta', {\n          name: 'next-size-adjust',\n          content: '',\n        })\n      : null\n  )\n\n  const { GlobalError, styles: globalErrorStyles } = await getGlobalErrorStyles(\n    tree,\n    ctx\n  )\n\n  // Assume the head we're rendering contains only partial data if PPR is\n  // enabled and this is a statically generated response. This is used by the\n  // client Segment Cache after a prefetch to determine if it can skip the\n  // second request to fill in the dynamic data.\n  //\n  // See similar comment in create-component-tree.tsx for more context.\n  const isPossiblyPartialHead =\n    workStore.isStaticGeneration &&\n    ctx.renderOpts.experimental.isRoutePPREnabled === true\n\n  return maybeAppendBuildIdToRSCPayload(ctx, {\n    // See the comment above the `Preloads` component (below) for why this is part of the payload\n    P: createElement(Preloads, {\n      preloadCallbacks: preloadCallbacks,\n    }),\n    c: prepareInitialCanonicalUrl(url),\n    q: getRenderedSearch(query),\n    i: !!couldBeIntercepted,\n    f: [\n      [\n        initialTree,\n        seedData,\n        initialHead,\n        isPossiblyPartialHead,\n      ] as FlightDataPath,\n    ],\n    m: missingSlots,\n    G: [GlobalError, globalErrorStyles],\n    // Tells the client whether this route supports per-segment prefetching.\n    // With Cache Components, all routes support it. Without it, only fully\n    // static pages do, because their per-segment prefetch responses are\n    // generated during static generation (build or ISR).\n    S: workStore.isStaticGeneration || ctx.renderOpts.cacheComponents,\n    h: getMetadataVaryParamsAccumulator(),\n    r: getRootParamsVaryParamsAccumulator() ?? undefined,\n    s: staleTimeIterable,\n    a: shellByteLengthPromise,\n    l: staticStageByteLengthPromise,\n    p: runtimePrefetchStream,\n    // Include the per-page dynamic stale time from unstable_dynamicStaleTime, but\n    // only for dynamic renders. The client treats its presence as\n    // authoritative.\n    // TODO: Move this to the prefetch hints file so we don't have to walk\n    // the tree on every render.\n    d: !workStore.isStaticGeneration\n      ? ((await getDynamicStaleTime(tree)) ?? undefined)\n      : undefined,\n  } satisfies InitialRSCPayload & { P: ReactNode })\n}\n\n/**\n * Preload calls (such as `ReactDOM.preloadStyle` and `ReactDOM.preloadFont`) need to be called during rendering\n * in order to create the appropriate preload tags in the DOM, otherwise they're a no-op. Since we invoke\n * renderToReadableStream with a function that returns component props rather than a component itself, we use\n * this component to \"render  \" the preload calls.\n */\nfunction Preloads({ preloadCallbacks }: { preloadCallbacks: Function[] }) {\n  preloadCallbacks.forEach((preloadFn) => preloadFn())\n  return null\n}\n\n// This is the data necessary to render <AppRouter /> when an error state is triggered\nasync function getErrorRSCPayload(\n  tree: LoaderTree,\n  ctx: AppRenderContext,\n  ssrError: unknown,\n  errorType: MetadataErrorType | 'redirect' | undefined,\n  shouldRenderMetadataAndViewport: boolean\n) {\n  const {\n    getDynamicParamFromSegment,\n    query,\n    componentMod: { createMetadataComponents, createElement, Fragment },\n    url,\n    workStore,\n  } = ctx\n\n  let Viewport: ComponentType | null = null\n  let Metadata: ComponentType | null = null\n  if (shouldRenderMetadataAndViewport) {\n    const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n    const metadataComponents = createMetadataComponents({\n      tree,\n      parsedQuery: query,\n      pathname: url.pathname,\n      metadataContext: createMetadataContext(ctx.renderOpts),\n      errorType,\n      interpolatedParams: ctx.interpolatedParams,\n      serveStreamingMetadata: serveStreamingMetadata,\n    })\n    Viewport = metadataComponents.Viewport\n    Metadata = metadataComponents.Metadata\n  }\n\n  const initialHead = createElement(\n    Fragment,\n    {\n      key: flightDataPathHeadKey,\n    },\n    createElement(NonIndex, {\n      createElement,\n      pagePath: ctx.pagePath,\n      statusCode: ctx.res.statusCode,\n      isPossibleServerAction: ctx.isPossibleServerAction,\n    }),\n    Viewport ? createElement(Viewport, null) : null,\n    process.env.__NEXT_DEV_SERVER &&\n      createElement('meta', {\n        name: 'next-error',\n        content: 'not-found',\n      }),\n    Metadata ? createElement(Metadata, null) : null\n  )\n\n  const errorHints = ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null\n  const errorPrefetchInliningEnabled = Boolean(\n    ctx.renderOpts.experimental.prefetchInlining\n  )\n  const initialTree = await createFlightRouterStateFromLoaderTree(\n    tree,\n    errorHints,\n    errorPrefetchInliningEnabled,\n    ctx.renderOpts.cacheComponents,\n    ctx.renderOpts.partialPrefetching,\n    workStore.isStaticGeneration,\n    ctx.renderOpts.isBuildTimePrerendering ?? false,\n    getDynamicParamFromSegment,\n    query\n  )\n\n  let err: Error | undefined = undefined\n  if (ssrError) {\n    err = isError(ssrError) ? ssrError : new Error(ssrError + '')\n  }\n\n  // For metadata notFound error there's no global not found boundary on top\n  // so we create a not found page with AppRouter\n  const seedData: CacheNodeSeedData = [\n    createElement(\n      'html',\n      {\n        id: '__next_error__',\n      },\n      createElement('head', null),\n      createElement(\n        'body',\n        null,\n        process.env.__NEXT_DEV_SERVER && err\n          ? createElement('template', {\n              'data-next-error-message': err.message,\n              'data-next-error-digest': 'digest' in err ? err.digest : '',\n              'data-next-error-stack': err.stack,\n            })\n          : null\n      )\n    ),\n    {},\n    null,\n    false,\n    null, // varyParams - not tracked for error pages\n  ]\n\n  const { GlobalError, styles: globalErrorStyles } = await getGlobalErrorStyles(\n    tree,\n    ctx\n  )\n\n  const isPossiblyPartialHead =\n    workStore.isStaticGeneration &&\n    ctx.renderOpts.experimental.isRoutePPREnabled === true\n\n  return maybeAppendBuildIdToRSCPayload(ctx, {\n    c: prepareInitialCanonicalUrl(url),\n    q: getRenderedSearch(query),\n    m: undefined,\n    i: false,\n    f: [\n      [\n        initialTree,\n        seedData,\n        initialHead,\n        isPossiblyPartialHead,\n      ] as FlightDataPath,\n    ],\n    G: [GlobalError, globalErrorStyles],\n    // Tells the client whether this route supports per-segment prefetching.\n    // With Cache Components, all routes support it. Without it, only fully\n    // static pages do, because their per-segment prefetch responses are\n    // generated during static generation (build or ISR).\n    S: workStore.isStaticGeneration || ctx.renderOpts.cacheComponents,\n    h: getMetadataVaryParamsAccumulator(),\n    r: getRootParamsVaryParamsAccumulator() ?? undefined,\n  } satisfies InitialRSCPayload)\n}\n\n// This component must run in an SSR context. It will render the RSC root component\nfunction App<T>({\n  reactServerStream,\n  reactDebugStream,\n  debugEndTime,\n  preinitScripts,\n  ServerInsertedHTMLProvider,\n  nonce,\n  images,\n}: {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  reactServerStream: Readable | BinaryStreamOf<T>\n  reactDebugStream: AnyStream | undefined\n  debugEndTime: number | undefined\n  preinitScripts: () => void\n  ServerInsertedHTMLProvider: ComponentType<{\n    children: JSX.Element\n  }>\n  images: RenderOpts['images']\n  nonce?: string\n}): JSX.Element {\n  preinitScripts()\n  const response = ReactClient.use(\n    getFlightStream<InitialRSCPayload>(\n      reactServerStream,\n      reactDebugStream,\n      debugEndTime,\n      nonce\n    )\n  )\n\n  const initialState = createInitialRouterState({\n    // This is not used during hydration, so we don't have to pass a\n    // real timestamp.\n    navigatedAt: -1,\n    initialRSCPayload: response,\n    // location is not initialized in the SSR render\n    // it's set to window.location during hydration\n    location: null,\n  })\n\n  const actionQueue = createMutableActionQueue(initialState)\n\n  const { HeadManagerContext } =\n    require('../../shared/lib/head-manager-context.shared-runtime') as typeof import('../../shared/lib/head-manager-context.shared-runtime')\n\n  return (\n    <HeadManagerContext.Provider\n      value={{\n        appDir: true,\n        nonce,\n      }}\n    >\n      <ImageConfigContext.Provider value={images ?? imageConfigDefault}>\n        <ServerInsertedHTMLProvider>\n          <AppRouter actionQueue={actionQueue} globalErrorState={response.G} />\n        </ServerInsertedHTMLProvider>\n      </ImageConfigContext.Provider>\n    </HeadManagerContext.Provider>\n  )\n  /* eslint-enable @next/internal/no-ambiguous-jsx -- React Client */\n}\n\n// @TODO our error stream should be probably just use the same root component. But it was previously\n// different I don't want to figure out if that is meaningful at this time so just keeping the behavior\n// consistent for now.\nfunction ErrorApp<T>({\n  reactServerStream,\n  preinitScripts,\n  ServerInsertedHTMLProvider,\n  nonce,\n  images,\n}: {\n  reactServerStream: BinaryStreamOf<T>\n  preinitScripts: () => void\n  ServerInsertedHTMLProvider: ComponentType<{\n    children: JSX.Element\n  }>\n  nonce?: string\n  images: RenderOpts['images']\n}): JSX.Element {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  preinitScripts()\n  const response = ReactClient.use(\n    getFlightStream<InitialRSCPayload>(\n      reactServerStream,\n      undefined,\n      undefined,\n      nonce\n    )\n  )\n\n  const initialState = createInitialRouterState({\n    // This is not used during hydration, so we don't have to pass a\n    // real timestamp.\n    navigatedAt: -1,\n    initialRSCPayload: response,\n    // location is not initialized in the SSR render\n    // it's set to window.location during hydration\n    location: null,\n  })\n\n  const actionQueue = createMutableActionQueue(initialState)\n\n  return (\n    <ImageConfigContext.Provider value={images ?? imageConfigDefault}>\n      <ServerInsertedHTMLProvider>\n        <AppRouter actionQueue={actionQueue} globalErrorState={response.G} />\n      </ServerInsertedHTMLProvider>\n    </ImageConfigContext.Provider>\n  )\n  /* eslint-enable @next/internal/no-ambiguous-jsx -- React Client */\n}\n\n// We use a trick with TS Generics to branch streams with a type so we can\n// consume the parsed value of a Readable Stream if it was constructed with a\n// certain object shape. The generic type is not used directly in the type so it\n// requires a disabling of the eslint rule disallowing unused vars\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type BinaryStreamOf<T> = AnyStream\n\n/**\n * Extracted to a separate function to prevent V8 from retaining the entire\n * `renderToHTMLOrFlightImpl` closure scope through globalThis.__next_require__.\n * V8 shares a single Context object per scope for all closures; by creating\n * these closures in their own function scope, the globalThis references only\n * retain `instrumented` and `cacheComponents`, not request-specific data like\n * req/res/workStore.\n */\nfunction installGlobalModuleLoadingHandlers(\n  ComponentMod: AppPageModule,\n  cacheComponents: boolean,\n  isTracingEnabled: boolean\n) {\n  const instrumented = wrapClientComponentLoader(ComponentMod, isTracingEnabled)\n\n  // When we are prerendering if there is a cacheSignal for tracking\n  // cache reads we track calls to `loadChunk` and `require`. This allows us\n  // to treat chunk/module loading with similar semantics as cache reads to avoid\n  // module loading from causing a prerender to abort too early.\n  const shouldTrackModuleLoading = () => {\n    if (!cacheComponents) {\n      return false\n    }\n    if (process.env.__NEXT_DEV_SERVER) {\n      return true\n    }\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (!workUnitStore) {\n      return false\n    }\n\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n      case 'validation-client':\n      case 'prerender-runtime':\n      case 'cache':\n      case 'private-cache':\n        return true\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        return false\n      default:\n        workUnitStore satisfies never\n    }\n  }\n\n  // @ts-expect-error\n  globalThis.__next_require__ = (\n    ...args: Parameters<typeof instrumented.require>\n  ) => {\n    const exportsOrPromise = instrumented.require(...args)\n    if (shouldTrackModuleLoading()) {\n      trackPendingImport(exportsOrPromise)\n    }\n    return exportsOrPromise\n  }\n\n  // @ts-expect-error\n  globalThis.__next_chunk_load__ = (\n    ...args: Parameters<typeof instrumented.loadChunk>\n  ) => {\n    const loadingChunk = instrumented.loadChunk(...args)\n    if (shouldTrackModuleLoading()) {\n      trackPendingChunkLoad(loadingChunk)\n    }\n    return loadingChunk\n  }\n}\n\nasync function renderToHTMLOrFlightImpl(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  url: ReturnType<typeof parseRelativeUrl>,\n  pagePath: string,\n  query: NextParsedUrlQuery,\n  renderOpts: RenderOpts,\n  workStore: WorkStore,\n  parsedRequestHeaders: ParsedRequestHeaders,\n  postponedState: PostponedState | null,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  sharedContext: AppSharedContext,\n  interpolatedParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n  const isNotFoundPath = pagePath === '/404'\n  if (isNotFoundPath) {\n    res.statusCode = 404\n  }\n\n  // A unique request timestamp used by development to ensure that it's\n  // consistent and won't change during this request. This is important to\n  // avoid that resources can be deduped by React Float if the same resource is\n  // rendered or preloaded multiple times: `<link href=\"a.css?v={Date.now()}\"/>`.\n  const requestTimestamp = Date.now()\n\n  const {\n    ComponentMod,\n    nextFontManifest,\n    serverActions,\n    assetPrefix = '',\n    enableTainting,\n    cacheComponents,\n    setIsrStatus,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  // We need to expose the bundled `require` API globally for\n  // react-server-dom-webpack. This is a hack until we find a better way.\n  if (ComponentMod.__next_app__) {\n    const isTracingEnabled =\n      getTracer().getActiveScopeSpan()?.isRecording() ?? false\n    installGlobalModuleLoadingHandlers(\n      ComponentMod,\n      cacheComponents,\n      isTracingEnabled\n    )\n  }\n\n  if (process.env.__NEXT_DEV_SERVER && setIsrStatus && !cacheComponents) {\n    // Reset the ISR status at start of request.\n    const { pathname } = new URL(req.url || '/', 'http://n')\n    setIsrStatus(\n      pathname,\n      // Only pages using the Node runtime can use ISR, Edge is always dynamic.\n      process.env.NEXT_RUNTIME === 'edge' ? false : undefined\n    )\n  }\n\n  if (\n    // The type check here ensures that `req` is correctly typed, and the\n    // environment variable check provides dead code elimination.\n    process.env.NEXT_RUNTIME !== 'edge' &&\n    isNodeNextRequest(req)\n  ) {\n    res.onClose(() => {\n      // We stop tracking fetch metrics when the response closes, since we\n      // report them at that time.\n      workStore.shouldTrackFetchMetrics = false\n    })\n\n    req.originalRequest.on('end', () => {\n      if ('performance' in globalThis) {\n        const metrics = getClientComponentLoaderMetrics({ reset: true })\n        if (metrics) {\n          getTracer()\n            .startSpan(NextNodeServerSpan.clientComponentLoading, {\n              startTime: metrics.clientComponentLoadStart,\n              attributes: {\n                'next.clientComponentLoadCount':\n                  metrics.clientComponentLoadCount,\n                'next.span_type': NextNodeServerSpan.clientComponentLoading,\n              },\n            })\n            .end(\n              metrics.clientComponentLoadStart +\n                metrics.clientComponentLoadTimes\n            )\n        }\n      }\n    })\n  }\n\n  const metadata: AppPageRenderResultMetadata = {\n    statusCode: isNotFoundPath ? 404 : undefined,\n    hasPendingUi: false,\n  }\n\n  const appUsingSizeAdjustment = !!nextFontManifest?.appUsingSizeAdjust\n\n  ComponentMod.patchFetch()\n\n  // Pull out the hooks/references from the component.\n  const {\n    routeModule: {\n      userland: { loaderTree },\n    },\n    taintObjectReference,\n  } = ComponentMod\n  if (enableTainting) {\n    taintObjectReference(\n      'Do not pass process.env to Client Components since it will leak sensitive data',\n      process.env\n    )\n  }\n\n  workStore.fetchMetrics = []\n  metadata.fetchMetrics = workStore.fetchMetrics\n\n  // don't modify original query object\n  query = { ...query }\n  stripInternalQueries(query)\n\n  const { isStaticGeneration } = workStore\n\n  let requestId: string\n  let htmlRequestId: string\n  const requestInsightsIdentity = process.env.__NEXT_REQUEST_INSIGHTS\n    ? getRequestInsightsIdentity()\n    : undefined\n\n  const {\n    flightRouterState,\n    isPrefetchRequest,\n    isRuntimePrefetchRequest,\n    isAppShellPrefetchRequest,\n    isRSCRequest,\n    isHmrRefresh,\n    nonce,\n  } = parsedRequestHeaders\n\n  if (parsedRequestHeaders.requestId) {\n    // If the client has provided a request ID (in development mode), we use it.\n    requestId = parsedRequestHeaders.requestId\n  } else if (requestInsightsIdentity) {\n    // Request Insights starts recording before the work store exists. Reuse\n    // the identity from that outer request scope so all spans stay together.\n    requestId = requestInsightsIdentity.requestId\n  } else {\n    // Otherwise we generate a new request ID.\n    if (isStaticGeneration) {\n      requestId = Buffer.from(\n        await crypto.subtle.digest('SHA-1', Buffer.from(req.url))\n      ).toString('hex')\n    } else if (process.env.NEXT_RUNTIME === 'edge') {\n      requestId = crypto.randomUUID()\n    } else {\n      requestId = (\n        require('next/dist/compiled/nanoid') as typeof import('next/dist/compiled/nanoid')\n      ).nanoid()\n    }\n  }\n\n  // If the client has provided an HTML request ID, we use it to associate the\n  // request with the HTML document from which it originated, which is used to\n  // send debug information to the associated WebSocket client. Otherwise, this\n  // is the request for the HTML document, so we use the request ID also as the\n  // HTML request ID.\n  htmlRequestId =\n    parsedRequestHeaders.htmlRequestId ||\n    requestInsightsIdentity?.htmlRequestId ||\n    requestId\n  workStore.requestId = requestId\n  workStore.htmlRequestId = htmlRequestId\n\n  const getDynamicParamFromSegment = makeGetDynamicParamFromSegment(\n    interpolatedParams,\n    fallbackRouteParams,\n    renderOpts.experimental.optimisticRouting\n  )\n\n  const isPossibleActionRequest = getIsPossibleServerAction(req)\n\n  // For implicit tags, we use the resolved pathname which has dynamic params\n  // interpolated, is decoded, and has trailing slash removed.\n  const resolvedPathname = getRequestMeta(req, 'resolvedPathname')\n  if (!resolvedPathname) {\n    throw new InvariantError('resolvedPathname must be set in request metadata')\n  }\n\n  const implicitTags = await getImplicitTags(\n    workStore.page,\n    resolvedPathname,\n    fallbackRouteParams\n  )\n\n  const ctx: AppRenderContext = {\n    componentMod: ComponentMod,\n    url,\n    renderOpts,\n    workStore,\n    parsedRequestHeaders,\n    getDynamicParamFromSegment,\n    interpolatedParams,\n    fallbackRouteParams,\n    query,\n    isPrefetch: isPrefetchRequest,\n    isPossibleServerAction: isPossibleActionRequest,\n    requestTimestamp,\n    appUsingSizeAdjustment,\n    flightRouterState,\n    requestId,\n    htmlRequestId,\n    pagePath,\n    assetPrefix,\n    isNotFoundPath,\n    nonce,\n    res,\n    sharedContext,\n    implicitTags,\n  }\n\n  getTracer().setRootSpanAttribute('next.route', pagePath)\n\n  if (isStaticGeneration) {\n    // We're either building or revalidating. In either case we need to\n    // prerender our page rather than render it.\n    const prerenderToStreamWithTracing = getTracer().wrap(\n      AppRenderSpan.getBodyResult,\n      {\n        spanName: `prerender route (app) ${pagePath}`,\n        attributes: {\n          'next.route': pagePath,\n        },\n      },\n      prerenderToStream\n    )\n\n    const response = await prerenderToStreamWithTracing(\n      req,\n      res,\n      ctx,\n      metadata,\n      loaderTree,\n      fallbackRouteParams\n    )\n\n    // If we're debugging partial prerendering, print all the dynamic API accesses\n    // that occurred during the render.\n    // @TODO move into renderToStream function\n    if (\n      response.dynamicAccess &&\n      accessedDynamicData(response.dynamicAccess) &&\n      renderOpts.isDebugDynamicAccesses\n    ) {\n      warn('The following dynamic usage was detected:')\n      for (const access of formatDynamicAPIAccesses(response.dynamicAccess)) {\n        warn(access)\n      }\n    }\n\n    // If we encountered any unexpected errors during build we fail the\n    // prerendering phase and the build.\n    if (workStore.invalidDynamicUsageError) {\n      logDisallowedDynamicError(workStore, workStore.invalidDynamicUsageError)\n      throw new StaticGenBailoutError()\n    }\n    if (response.digestErrorsMap.size) {\n      const buildFailingError = response.digestErrorsMap.values().next().value\n      if (buildFailingError) throw buildFailingError\n    }\n    // Pick first userland SSR error, which is also not a RSC error.\n    if (response.ssrErrors.length) {\n      const buildFailingError = response.ssrErrors.find((err) =>\n        isUserLandError(err)\n      )\n      if (buildFailingError) throw buildFailingError\n    }\n\n    const options: RenderResultOptions = {\n      metadata,\n      contentType: HTML_CONTENT_TYPE_HEADER,\n    }\n\n    // If we have pending revalidates, wait until they are all resolved.\n    const maybeRevalidatesPromise = executeRevalidates(workStore)\n    if (maybeRevalidatesPromise !== false) {\n      const revalidatesPromise = maybeRevalidatesPromise.finally(() => {\n        if (process.env.NEXT_PRIVATE_DEBUG_CACHE) {\n          console.log('pending revalidates promise finished for:', url.href)\n        }\n      })\n      if (renderOpts.waitUntil) {\n        renderOpts.waitUntil(revalidatesPromise)\n      } else {\n        options.waitUntil = revalidatesPromise\n      }\n    }\n\n    applyMetadataFromPrerenderResult(response, metadata, workStore)\n\n    if (response.renderResumeDataCache) {\n      metadata.renderResumeDataCache = response.renderResumeDataCache\n    }\n\n    const streamString = await streamToString(response.stream)\n    const result = new RenderResult(streamString, options)\n\n    // Run build-time instant validation if the page has instant configs\n    // TODO(instant-validation-build): This is not a great place to wire this in.\n    if (\n      workStore.cacheComponentsEnabled &&\n      workStore.isBuildTimePrerendering &&\n      renderOpts.runInstantValidation &&\n      (await anySegmentNeedsInstantValidationInBuild(loaderTree))\n    ) {\n      // Throws StaticGenBailoutError if validation failed.\n      await validateInstantConfigsInBuild(\n        ctx,\n        response.renderResumeDataCache ?? null\n      )\n    }\n\n    return result\n  } else {\n    // We're rendering dynamically\n    const renderResumeDataCache =\n      renderOpts.renderResumeDataCache ??\n      postponedState?.renderResumeDataCache ??\n      null\n\n    const rootParams = getRootParams(loaderTree, ctx.getDynamicParamFromSegment)\n    const fallbackParams = getRequestMeta(req, 'fallbackParams') || null\n    const hmrRefreshHash = getRequestMeta(req, 'hmrRefreshHash')\n\n    const createRequestStore = createRequestStoreForRender.bind(\n      null,\n      req,\n      res,\n      url,\n      rootParams,\n      implicitTags,\n      renderOpts.onUpdateCookies,\n      renderOpts.previewProps,\n      isHmrRefresh,\n      serverComponentsHmrCache,\n      renderResumeDataCache,\n      fallbackParams,\n      hmrRefreshHash\n    )\n    const requestStore = createRequestStore()\n\n    if (\n      process.env.__NEXT_DEV_SERVER &&\n      setIsrStatus &&\n      !cacheComponents &&\n      // Only pages using the Node runtime can use ISR, so we only need to\n      // update the status for those.\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(req)\n    ) {\n      req.originalRequest.on('end', () => {\n        const { pathname } = new URL(req.url || '/', 'http://n')\n        const isStatic = !requestStore.usedDynamic && !workStore.forceDynamic\n        setIsrStatus(pathname, isStatic)\n      })\n    }\n\n    // MARK: RSC request\n    if (isRSCRequest) {\n      if (isRuntimePrefetchRequest) {\n        // MARK: RSC runtimePrefetch\n        return generateRuntimePrefetchResult(\n          req,\n          ctx,\n          requestStore,\n          isAppShellPrefetchRequest\n        )\n      } else {\n        if (\n          process.env.__NEXT_DEV_SERVER &&\n          process.env.NEXT_RUNTIME !== 'edge' &&\n          cacheComponents\n        ) {\n          // MARK: RSC devCacheComponents\n          return generateDynamicFlightRenderResultWithStagesInDev(\n            req,\n            ctx,\n            requestStore,\n            createRequestStore,\n            fallbackParams\n          )\n        } else if (cacheComponents && cachedNavigations) {\n          // MARK: RSC cacheComponents\n          return generateStagedDynamicFlightRenderResultNode(\n            req,\n            ctx,\n            requestStore\n          )\n        } else {\n          // MARK: RSC dynamic\n          return generateDynamicFlightRenderResult(req, ctx, requestStore)\n        }\n      }\n    }\n\n    let didExecuteServerAction = false\n    let formState: null | any = null\n    if (isPossibleActionRequest) {\n      // For action requests, we handle them differently with a special render result.\n      const actionRequestResult = await handleAction({\n        req,\n        res,\n        ComponentMod,\n        generateFlight: generateDynamicFlightRenderResult,\n        workStore,\n        requestStore,\n        serverActions,\n        ctx,\n        metadata,\n      })\n\n      if (actionRequestResult) {\n        if (actionRequestResult.type === 'not-found') {\n          const notFoundLoaderTree = createNotFoundLoaderTree(loaderTree)\n          res.statusCode = 404\n          metadata.statusCode = 404\n          const stream = await renderToStream(\n            requestStore,\n            req,\n            res,\n            ctx,\n            notFoundLoaderTree,\n            formState,\n            postponedState,\n            metadata,\n            undefined, // Prevent restartable-render behavior in dev + Cache Components mode\n            fallbackParams\n          )\n\n          return new RenderResult(stream, {\n            metadata,\n            contentType: HTML_CONTENT_TYPE_HEADER,\n          })\n        } else if (actionRequestResult.type === 'done') {\n          if (actionRequestResult.result) {\n            actionRequestResult.result.assignMetadata(metadata)\n            return actionRequestResult.result\n          } else if (actionRequestResult.formState) {\n            formState = actionRequestResult.formState\n          }\n        }\n      }\n\n      didExecuteServerAction = true\n    }\n\n    const options: RenderResultOptions = {\n      metadata,\n      contentType: HTML_CONTENT_TYPE_HEADER,\n    }\n\n    const stream = await renderToStream(\n      // NOTE: in Cache Components (dev), if the render is restarted, it will use a different requestStore\n      // than the one that we're passing in here.\n      requestStore,\n      req,\n      res,\n      ctx,\n      loaderTree,\n      formState,\n      postponedState,\n      metadata,\n      // If we're rendering HTML after an action, we don't want restartable-render behavior\n      // because the result should be dynamic, like it is in prod.\n      // Also, the request store might have been mutated by the action (e.g. enabling draftMode)\n      // and we currently we don't copy changes over when creating a new store,\n      // so the restarted render wouldn't be correct.\n      didExecuteServerAction ? undefined : createRequestStore,\n      fallbackParams\n    )\n\n    // Forward an invalid-dynamic-usage error recorded by `'use cache'` only\n    // when userland caught it (try/catch around the cache call). If userland\n    // didn't catch, the rejection propagated into the React render, and React's\n    // `serverComponentsErrorHandler` already stamped a digest on the error and\n    // emitted it as a Flight error chunk — surfacing it again here would\n    // duplicate the entry in the dev overlay.\n    //\n    // The cacheComponents paths forward this themselves via\n    // `runValidationInDev` and the validation-skipped fallback in\n    // `generateDynamicFlightRenderResultWithStagesInDev`. Here we cover the\n    // non-cacheComponents dev path where neither runs.\n    if (\n      process.env.__NEXT_DEV_SERVER &&\n      !cacheComponents &&\n      workStore.invalidDynamicUsageError &&\n      !(workStore.invalidDynamicUsageError as { digest?: unknown }).digest\n    ) {\n      void logMessagesAndSendErrorsToBrowser(\n        [workStore.invalidDynamicUsageError],\n        ctx\n      )\n    }\n\n    // If we have pending revalidates, wait until they are all resolved.\n    const maybeRevalidatesPromise = executeRevalidates(workStore)\n    if (maybeRevalidatesPromise !== false) {\n      const revalidatesPromise = maybeRevalidatesPromise.finally(() => {\n        if (process.env.NEXT_PRIVATE_DEBUG_CACHE) {\n          console.log('pending revalidates promise finished for:', url.href)\n        }\n      })\n      if (renderOpts.waitUntil) {\n        renderOpts.waitUntil(revalidatesPromise)\n      } else {\n        options.waitUntil = revalidatesPromise\n      }\n    }\n\n    // Create the new render result for the response.\n    return new RenderResult(stream, options)\n  }\n}\n\nexport type AppPageRender = (\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  pagePath: string,\n  query: NextParsedUrlQuery,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  renderOpts: RenderOpts,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  sharedContext: AppSharedContext\n) => Promise<RenderResult<AppPageRenderResultMetadata>>\n\nexport const renderToHTMLOrFlight: AppPageRender = (\n  req,\n  res,\n  pagePath,\n  query,\n  fallbackRouteParams,\n  renderOpts,\n  serverComponentsHmrCache,\n  sharedContext\n) => {\n  if (!req.url) {\n    throw new Error('Invalid URL')\n  }\n\n  const url = parseRelativeUrl(req.url, undefined, false)\n\n  // We read these values from the request object as, in certain cases,\n  // base-server will strip them to opt into different rendering behavior.\n  const parsedRequestHeaders = parseRequestHeaders(req.headers, {\n    isRoutePPREnabled: renderOpts.experimental.isRoutePPREnabled === true,\n    previewModeId: renderOpts.previewProps?.previewModeId,\n  })\n\n  const { isPrefetchRequest, previouslyRevalidatedTags, nonce } =\n    parsedRequestHeaders\n\n  let interpolatedParams: Params\n  let postponedState: PostponedState | null = null\n\n  // If provided, the postpone state should be parsed so it can be provided to\n  // React.\n  if (typeof renderOpts.postponed === 'string') {\n    if (fallbackRouteParams) {\n      throw new InvariantError(\n        'postponed state should not be provided when fallback params are provided'\n      )\n    }\n\n    interpolatedParams = interpolateParallelRouteParams(\n      renderOpts.ComponentMod.routeModule.userland.loaderTree,\n      renderOpts.params ?? {},\n      pagePath,\n      fallbackRouteParams\n    )\n\n    postponedState = parsePostponedState(\n      renderOpts.postponed,\n      interpolatedParams,\n      renderOpts.experimental.maxPostponedStateSizeBytes\n    )\n  } else {\n    interpolatedParams = interpolateParallelRouteParams(\n      renderOpts.ComponentMod.routeModule.userland.loaderTree,\n      renderOpts.params ?? {},\n      pagePath,\n      fallbackRouteParams\n    )\n  }\n\n  if (\n    postponedState?.renderResumeDataCache &&\n    renderOpts.renderResumeDataCache\n  ) {\n    throw new InvariantError(\n      'postponed state and dev warmup immutable resume data cache should not be provided together'\n    )\n  }\n\n  const workStore = createWorkStore({\n    page: renderOpts.routeModule.definition.page,\n    renderOpts,\n    // @TODO move to workUnitStore of type Request\n    isPrefetchRequest,\n    buildId: sharedContext.buildId,\n    deploymentId: sharedContext.deploymentId,\n    previouslyRevalidatedTags,\n    nonce,\n  })\n\n  return workAsyncStorage.run(\n    workStore,\n    // The function to run\n    renderToHTMLOrFlightImpl,\n    // all of it's args\n    req,\n    res,\n    url,\n    pagePath,\n    query,\n    renderOpts,\n    workStore,\n    parsedRequestHeaders,\n    postponedState,\n    serverComponentsHmrCache,\n    sharedContext,\n    interpolatedParams,\n    fallbackRouteParams\n  )\n}\n\nfunction applyMetadataFromPrerenderResult(\n  response: Pick<\n    PrerenderToStreamResult,\n    | 'collectedExpire'\n    | 'collectedRevalidate'\n    | 'collectedStale'\n    | 'collectedTags'\n  >,\n  metadata: AppPageRenderResultMetadata,\n  workStore: WorkStore\n) {\n  if (response.collectedTags) {\n    metadata.fetchTags = response.collectedTags.join(',')\n  }\n\n  // Let the client router know how long to keep the cached entry around.\n  const staleHeader = String(response.collectedStale)\n  metadata.headers ??= {}\n  metadata.headers[NEXT_ROUTER_STALE_TIME_HEADER] = staleHeader\n\n  // If force static is specifically set to false, we should not revalidate\n  // the page.\n  if (workStore.forceStatic === false || response.collectedRevalidate === 0) {\n    metadata.cacheControl = { revalidate: 0, expire: undefined }\n  } else {\n    // Copy the cache control value onto the render result metadata.\n    metadata.cacheControl = {\n      revalidate:\n        response.collectedRevalidate >= INFINITE_CACHE\n          ? false\n          : response.collectedRevalidate,\n      expire:\n        response.collectedExpire >= INFINITE_CACHE\n          ? undefined\n          : response.collectedExpire,\n    }\n  }\n\n  // provide bailout info for debugging\n  if (metadata.cacheControl.revalidate === 0) {\n    metadata.staticBailoutInfo = {\n      description: workStore.dynamicUsageDescription,\n      stack: workStore.dynamicUsageStack,\n    }\n  }\n}\n\ntype RSCPayloadDevProperties = {\n  /** Only available during cacheComponents development builds. Used for logging errors. */\n  _validation?: Promise<ReactNode>\n  _bypassCachesInDev?: ReactNode\n}\n\ntype RSCInitialPayloadPartialDev = {\n  c?: InitialRSCPayload['c']\n}\n\nasync function renderToStream(\n  requestStore: RequestStore,\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  ctx: AppRenderContext,\n  tree: LoaderTree,\n  formState: any,\n  postponedState: PostponedState | null,\n  metadata: AppPageRenderResultMetadata,\n  createRequestStore: (() => RequestStore) | undefined,\n  fallbackParams: OpaqueFallbackRouteParams | null\n): Promise<AnyStream> {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  // MARK: renderToStream setup\n  const {\n    assetPrefix,\n    htmlRequestId,\n    nonce,\n    pagePath,\n    renderOpts,\n    requestId,\n    workStore,\n  } = ctx\n\n  const {\n    basePath,\n    buildManifest,\n    ComponentMod: { createElement },\n    crossOrigin,\n    experimental,\n    isBuildTimePrerendering = false,\n    onInstrumentationRequestError,\n    page,\n    reactMaxHeadersLength,\n    setReactDebugChannel,\n    subresourceIntegrityManifest,\n    supportsDynamicResponse,\n    cacheComponents,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  const { ServerInsertedHTMLProvider, renderServerInsertedHTML } =\n    createServerInsertedHTML()\n  const getServerInsertedMetadata = createServerInsertedMetadata(nonce)\n\n  const tracingMetadata = getTracedMetadata(\n    getTracer().getTracePropagationData(),\n    experimental.clientTraceMetadata\n  )\n\n  const polyfills: JSX.IntrinsicElements['script'][] =\n    buildManifest.polyfillFiles\n      .filter(\n        (polyfill) =>\n          polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')\n      )\n      .map((polyfill) => ({\n        src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(\n          ctx,\n          false\n        )}`,\n        integrity: subresourceIntegrityManifest?.[polyfill],\n        crossOrigin,\n        noModule: true,\n        nonce,\n      }))\n\n  const [preinitScripts, bootstrapScript] = getRequiredScripts(\n    buildManifest,\n    // Why is assetPrefix optional on renderOpts?\n    // @TODO make it default empty string on renderOpts and get rid of it from ctx\n    assetPrefix,\n    crossOrigin,\n    subresourceIntegrityManifest,\n    getAssetQueryString(ctx, true),\n    nonce,\n    page\n  )\n\n  // In development mode, set the request ID as a global variable, before the\n  // bootstrap script is executed, which depends on it during hydration.\n  // For MPA navigations (page reload, direct URL entry), the request ID\n  // header is not present, so we generate a random one.\n  let bootstrapScriptContent: string | undefined\n  if (process.env.__NEXT_DEV_SERVER) {\n    bootstrapScriptContent = `self.__next_r=${JSON.stringify(\n      requestId ?? crypto.randomUUID()\n    )}`\n  } else if (\n    buildManifest.pagesChunkGroupBootstrapParams &&\n    buildManifest.chunkLoadingGlobal\n  ) {\n    bootstrapScriptContent = getTurbopackChunkGroupBootstrap(\n      buildManifest.pagesChunkGroupBootstrapParams,\n      buildManifest.chunkLoadingGlobal,\n      [page]\n    )\n  }\n\n  // Instant Navigation Testing API: embed the cookie-guarded bootstrap so it\n  // runs before the client bootstrap module reads self.__next_instant_test as\n  // its hydration source. This mirrors the prerender path so a dynamically\n  // rendered document carries the same script as the cached static prelude.\n  if (ctx.renderOpts.experimental.exposeTestingApi) {\n    bootstrapScriptContent =\n      (bootstrapScriptContent ? `${bootstrapScriptContent};` : '') +\n      (await getInstantTestBootstrapScriptContent())\n  }\n\n  // Create the \"render route (app)\" span manually so we can keep it open during streaming.\n  // This is necessary because errors inside Suspense boundaries are reported asynchronously\n  // during stream consumption, after a typical wrapped function would have ended the span.\n  // Note: We pass the full span name as the first argument since startSpan uses it directly.\n  const renderSpan = getTracer().startSpan(\n    `render route (app) ${pagePath}` as any,\n    {\n      attributes: {\n        'next.span_name': `render route (app) ${pagePath}`,\n        'next.span_type': AppRenderSpan.getBodyResult,\n        'next.route': pagePath,\n      },\n    }\n  )\n\n  // Helper to end the span with error status (used when throwing from catch blocks)\n  const endSpanWithError = (err: unknown) => {\n    if (!renderSpan.isRecording()) return\n    if (err instanceof Error) {\n      renderSpan.recordException(err)\n      renderSpan.setAttribute('error.type', err.name)\n    }\n    renderSpan.setStatus({\n      code: SpanStatusCode.ERROR,\n      message: err instanceof Error ? err.message : undefined,\n    })\n    renderSpan.end()\n  }\n\n  // Run the rest of the function within the span's context so child spans\n  // (like \"build component tree\", \"generateMetadata\") are properly parented.\n  return getTracer().withSpan(renderSpan, async () => {\n    // MARK: renderToStream errorHandlers\n    const { reactServerErrorsByDigest } = workStore\n\n    // We use this to determine if we should suppress other derivative errors\n    let didErrorObservably = false\n    function onHTMLRenderRSCError(err: DigestedError, silenceLog: boolean) {\n      didErrorObservably = true\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'react-server-components'),\n        silenceLog\n      )\n    }\n    const serverComponentsErrorHandler = createReactServerErrorHandler(\n      process.env.NODE_ENV === 'development',\n      isBuildTimePrerendering,\n      reactServerErrorsByDigest,\n      onHTMLRenderRSCError,\n      renderSpan\n    )\n\n    function onHTMLRenderSSRError(err: DigestedError) {\n      // We don't need to silence logs here. onHTMLRenderSSRError won't be called\n      // at all if the error was logged before in the RSC error handler.\n      const silenceLog = false\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'server-rendering'),\n        silenceLog\n      )\n    }\n\n    const allCapturedErrors: Array<unknown> = []\n    const htmlRendererErrorHandler = createHTMLErrorHandler(\n      process.env.NODE_ENV === 'development',\n      isBuildTimePrerendering,\n      reactServerErrorsByDigest,\n      allCapturedErrors,\n      onHTMLRenderSSRError,\n      renderSpan\n    )\n\n    let reactServerResult: null | ReactServerResult = null\n    let reactDebugStream: AnyStream | undefined\n\n    const setHeader = res.setHeader.bind(res)\n    const appendHeader = res.appendHeader.bind(res)\n    const { clientModules } = getClientReferenceManifest()\n\n    try {\n      if (\n        process.env.__NEXT_DEV_SERVER &&\n        // Edge routes never prerender so we don't have a Prerender environment for anything in edge runtime\n        process.env.NEXT_RUNTIME !== 'edge' &&\n        // We only have a Prerender environment for projects opted into cacheComponents\n        cacheComponents\n      ) {\n        let debugChannelClientStream: ReplayableNodeStream | undefined\n\n        // eslint-disable-next-line @typescript-eslint/no-shadow\n        const getPayload = async (requestStore: RequestStore) => {\n          const payload: InitialRSCPayload & RSCPayloadDevProperties =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              getRSCPayload,\n              tree,\n              ctx,\n              { is404: res.statusCode === 404 }\n            )\n\n          if (isBypassingCachesInDev(requestStore, workStore)) {\n            // Mark the RSC payload to indicate that caches were bypassed in dev.\n            // This lets the client know not to cache anything based on this render.\n            if (renderOpts.setCacheStatus) {\n              // we know this is available  when cacheComponents is enabled, but typeguard to be safe\n              renderOpts.setCacheStatus('bypass', htmlRequestId)\n            }\n            payload._bypassCachesInDev = createElement(\n              WarnForBypassCachesInDev,\n              {\n                route: workStore.route,\n              }\n            )\n          }\n\n          return payload\n        }\n\n        if (\n          // We only do this flow if we can safely recreate the store from scratch\n          // (which is not the case for renders after an action)\n          createRequestStore &&\n          // We only do this flow if we're not bypassing caches in dev using\n          // \"disable cache\" in devtools, a hard refresh (cache-control: \"no-cache\"),\n          // or draft mode.\n          !isBypassingCachesInDev(requestStore, workStore)\n        ) {\n          const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n          const prefetchMode = await getPrefetchingModeForPage(\n            renderOpts,\n            loaderTree\n          )\n\n          const { stream: serverStream, debugChannel: returnedDebugChannel } =\n            await stagedRenderWithCachesInDev({\n              prefetchMode,\n              ctx,\n              requestStore,\n              createRequestStore,\n              getPayload,\n              onError: serverComponentsErrorHandler,\n              shouldValidate: true,\n              fallbackRouteParams: fallbackParams,\n              getDevRenderDidError: () => didErrorObservably,\n              // An initial HTML load serves the static shell; runtime and\n              // dynamic content stream in afterward.\n              navigationKind: {\n                type: 'initial-load',\n              },\n              // We currently only abort HMR refresh requests.\n              requestAbortSignal: undefined,\n            })\n\n          reactServerResult = new ReactServerResult(serverStream)\n\n          if (returnedDebugChannel) {\n            debugChannelClientStream = new ReplayableNodeStream(\n              returnedDebugChannel.clientSide.readable\n            )\n          }\n        } else {\n          logValidationSkipped(ctx)\n\n          // We're either bypassing caches or we can't restart the render.\n          // Do a dynamic render, but with (basic) environment labels.\n\n          const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n\n          const serverStream = await stagedRenderWithoutCachesInDevNode(\n            ctx,\n            requestStore,\n            getPayload,\n            {\n              onError: serverComponentsErrorHandler,\n              filterStackFrame,\n              debugChannel: debugChannel?.serverSide,\n            }\n          )\n          reactServerResult = new ReactServerResult(serverStream)\n\n          if (debugChannel) {\n            debugChannelClientStream = new ReplayableNodeStream(\n              debugChannel.clientSide.readable\n            )\n          }\n        }\n\n        if (debugChannelClientStream && setReactDebugChannel) {\n          reactDebugStream = debugChannelClientStream.createReplayStream()\n\n          setReactDebugChannel(\n            { readable: debugChannelClientStream.createReplayStream() },\n            htmlRequestId,\n            requestId\n          )\n        }\n      } else if (cacheComponents && cachedNavigations) {\n        // Production Cache Components + Cached Navigations: use staged\n        // rendering so the RSC payload includes the static stage byte length\n        // (`l` field), enabling the client to cache the static subset during\n        // hydration.\n\n        const selectStaleTime = createSelectStaleTime(experimental)\n        const staleTimeIterable = new StaleTimeIterable()\n\n        const stageController = new StagedRenderingController({\n          abortSignal: null,\n          abandonController: null,\n          // TODO(cached-navs): this assumes that we checked during build that there's no sync IO.\n          // but it can happen e.g. after a revalidation or conditionally for a param that wasn't prerendered.\n          // we should change this to track sync IO, log an error and advance to dynamic.\n          syncIO: SyncIOMode.Untracked,\n          finalStage: null,\n        })\n\n        requestStore.stale = INFINITE_CACHE\n        requestStore.stagedRendering = stageController\n        requestStore.asyncApiPromises = createAsyncApiPromises(\n          stageController,\n          requestStore.cookies,\n          requestStore.mutableCookies,\n          requestStore.headers\n        )\n        requestStore.varyParamsAccumulator =\n          createResponseVaryParamsAccumulator()\n\n        trackStaleTime(\n          requestStore as { stale: number },\n          staleTimeIterable,\n          selectStaleTime\n        )\n\n        const shellByteLengthDeferred = createPromiseWithResolvers<\n          number | null\n        >()\n        const staticStageByteLengthDeferred =\n          createPromiseWithResolvers<number>()\n\n        let runtimePrefetchStream: ReadableStream<Uint8Array> | undefined\n\n        // If the route should runtime-cache its navigation, spawn a runtime\n        // prerender after the resume render fills caches. The result is\n        // embedded in the initial RSC payload so the client can cache\n        // runtime-prefetchable content during hydration. This is enabled when\n        // Partial Prefetching is on for the route, either per segment (a\n        // `prefetch` of 'partial' or 'unstable_eager') or globally (the\n        // `partialPrefetching` config).\n        if (\n          Boolean(renderOpts.partialPrefetching) ||\n          (await anySegmentHasPartialPrefetchingEnabled(tree))\n        ) {\n          const prerenderResumeDataCache = createPrerenderResumeDataCache()\n          requestStore.resumeDataCache = prerenderResumeDataCache\n\n          const cacheSignal = new CacheSignal()\n          trackPendingModules(cacheSignal)\n          requestStore.cacheSignal = cacheSignal\n\n          const runtimePrefetchTransform = new TransformStream<Uint8Array>()\n          runtimePrefetchStream = runtimePrefetchTransform.readable\n\n          void cacheSignal\n            .cacheReady()\n            .then(() =>\n              spawnRuntimePrefetchWithFilledCaches(\n                runtimePrefetchTransform.writable,\n                ctx,\n                prerenderResumeDataCache,\n                requestStore,\n                serverComponentsErrorHandler\n              )\n            )\n        }\n\n        const RSCPayload = await workUnitAsyncStorage.run(\n          requestStore,\n          getRSCPayload,\n          tree,\n          ctx,\n          {\n            is404: res.statusCode === 404,\n            staleTimeIterable,\n            shellByteLengthPromise: shellByteLengthDeferred.promise,\n            staticStageByteLengthPromise: staticStageByteLengthDeferred.promise,\n            runtimePrefetchStream,\n          }\n        )\n\n        const flightStream = await runInSequentialTasks(\n          () => {\n            stageController.advanceStage(RenderStage.ShellStatic)\n\n            const stream = workUnitAsyncStorage.run(\n              requestStore,\n              renderToNodeFlightStream,\n              ctx.componentMod,\n              RSCPayload,\n              clientModules,\n              {\n                onError: serverComponentsErrorHandler,\n                filterStackFrame,\n              }\n            ) as Readable\n\n            const replayable = new ReplayableNodeStream(stream)\n            const dynamicStream = replayable.createReplayStream()\n            const staticStream = replayable.createReplayStream()\n\n            void countShellAndStaticStageBytes(\n              staticStream,\n              stageController\n            ).then((byteLengths) => {\n              staticStageByteLengthDeferred.resolve(\n                byteLengths[RenderStage.Static]\n              )\n              shellByteLengthDeferred.resolve(\n                byteLengths[RenderStage.ShellStatic]\n              )\n            })\n\n            return dynamicStream\n          },\n          () => {\n            stageController.advanceStage(RenderStage.Static)\n          },\n          () => {\n            // This is a separate task that doesn't advance a stage. It forces\n            // draining the immediate queue so that the stale time iterable and vary\n            // params accumulators are flushed before we advance to the dynamic stage.\n            staleTimeIterable.close()\n            if (requestStore.varyParamsAccumulator) {\n              finishAccumulatingVaryParams(requestStore.varyParamsAccumulator)\n            }\n          },\n          () => {\n            stageController.advanceStage(RenderStage.Dynamic)\n          }\n        )\n\n        reactServerResult = new ReactServerResult(flightStream)\n      } else {\n        // MARK: nodeStreams RSC\n        if (process.env.__NEXT_USE_NODE_STREAMS) {\n          // This is a dynamic render. We don't do dynamic tracking because we're not prerendering\n          const RSCPayload: RSCPayload & RSCPayloadDevProperties =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              getRSCPayload,\n              tree,\n              ctx,\n              { is404: res.statusCode === 404 }\n            )\n\n          const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n\n          if (debugChannel) {\n            const [readableSsr, readableBrowser] = teeStream(\n              debugChannel.clientSide.readable\n            )\n\n            reactDebugStream = readableSsr\n\n            setReactDebugChannel(\n              { readable: readableBrowser },\n              htmlRequestId,\n              requestId\n            )\n          }\n\n          reactServerResult = new ReactServerResult(\n            workUnitAsyncStorage.run(\n              requestStore,\n              renderToNodeFlightStream,\n              ctx.componentMod,\n              RSCPayload,\n              clientModules,\n              {\n                filterStackFrame,\n                onError: serverComponentsErrorHandler,\n                debugChannel: debugChannel?.serverSide,\n              }\n            )\n          )\n        } else {\n          // MARK: webStreams RSC\n          // This is a dynamic render. We don't do dynamic tracking because we're not prerendering\n          const RSCPayload: RSCPayload & RSCPayloadDevProperties =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              getRSCPayload,\n              tree,\n              ctx,\n              { is404: res.statusCode === 404 }\n            )\n\n          const debugChannel = setReactDebugChannel && createWebDebugChannel()\n\n          if (debugChannel) {\n            const [readableSsr, readableBrowser] = teeStream(\n              debugChannel.clientSide.readable\n            )\n\n            reactDebugStream = readableSsr\n\n            setReactDebugChannel(\n              { readable: readableBrowser },\n              htmlRequestId,\n              requestId\n            )\n          }\n\n          reactServerResult = new ReactServerResult(\n            workUnitAsyncStorage.run(\n              requestStore,\n              renderToWebFlightStream,\n              ctx.componentMod,\n              RSCPayload,\n              clientModules,\n              {\n                filterStackFrame,\n                onError: serverComponentsErrorHandler,\n                debugChannel: debugChannel?.serverSide,\n              }\n            )\n          )\n        }\n      }\n\n      // React doesn't start rendering synchronously but we want the RSC render to have a chance to start\n      // before we begin SSR rendering because we want to capture any available preload headers so we tick\n      // one task before continuing\n      await waitAtLeastOneReactRenderTask()\n\n      // MARK: nodeStreams HTML\n      if (process.env.__NEXT_USE_NODE_STREAMS) {\n        // If provided, the postpone state should be parsed as JSON so it can be\n        // provided to React.\n        if (typeof renderOpts.postponed === 'string') {\n          if (postponedState?.type === DynamicState.DATA) {\n            // We have a complete HTML Document in the prerender but we need to\n            // still include the new server component render because it was not included\n            // in the static prelude.\n            const inlinedDataStream = createNodeInlinedDataStream(\n              reactServerResult.tee(),\n              nonce,\n              formState\n            )\n\n            // End the span since there's no async rendering in this path\n            if (renderSpan.isRecording()) renderSpan.end()\n            return chainStreams(\n              inlinedDataStream,\n              createDocumentClosingStream()\n            )\n          } else if (postponedState) {\n            // We assume we have dynamic HTML requiring a resume render to complete\n            const { postponed, preludeState } =\n              getPostponedFromState(postponedState)\n\n            const resumeAppElement = (\n              <App\n                reactServerStream={reactServerResult.tee()}\n                reactDebugStream={reactDebugStream}\n                debugEndTime={undefined}\n                preinitScripts={preinitScripts}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />\n            )\n\n            const getServerInsertedHTML = makeGetServerInsertedHTML({\n              polyfills,\n              renderServerInsertedHTML,\n              serverCapturedErrors: allCapturedErrors,\n              basePath,\n              tracingMetadata: tracingMetadata,\n            })\n\n            const { stream: htmlStream, allReady } =\n              await workUnitAsyncStorage.run(\n                requestStore,\n                resumeToFizzStream,\n                resumeAppElement,\n                postponed,\n                { onError: htmlRendererErrorHandler, nonce }\n              )\n\n            // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n            allReady.finally(() => {\n              if (renderSpan.isRecording()) renderSpan.end()\n            })\n\n            return await continueDynamicHTMLResumeNode(htmlStream, {\n              delayDataUntilFirstHtmlChunk:\n                preludeState === DynamicHTMLPreludeState.Empty,\n              inlinedDataStream: createNodeInlinedDataStream(\n                reactServerResult.consume(),\n                nonce,\n                formState\n              ),\n              getServerInsertedHTML,\n              getServerInsertedMetadata,\n              deploymentId: ctx.sharedContext.deploymentId,\n            })\n          }\n        }\n\n        // This is a regular dynamic render\n        const getServerInsertedHTML = makeGetServerInsertedHTML({\n          polyfills,\n          renderServerInsertedHTML,\n          serverCapturedErrors: allCapturedErrors,\n          basePath,\n          tracingMetadata: tracingMetadata,\n        })\n\n        const generateStaticHTML = supportsDynamicResponse !== true\n\n        const appElement = (\n          <App\n            reactServerStream={reactServerResult.tee()}\n            // TODO: Pass Node.js debugStream\n            reactDebugStream={reactDebugStream}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />\n        )\n\n        const fizzOptions = {\n          onError: htmlRendererErrorHandler,\n          nonce,\n          onHeaders: (headers: { [header: string]: string }) => {\n            for (const key in headers) {\n              appendHeader(key, headers[key])\n            }\n          },\n          maxHeadersLength: reactMaxHeadersLength,\n          bootstrapScriptContent,\n          bootstrapScripts: [bootstrapScript],\n          formState,\n        }\n\n        const { stream: htmlStream, allReady } = await getTracer().trace(\n          AppRenderSpan.renderToNodeFizzStream,\n          () =>\n            workUnitAsyncStorage.run(\n              requestStore,\n              renderToNodeFizzStream,\n              appElement,\n              fizzOptions,\n              { waitForAllReady: generateStaticHTML }\n            )\n        )\n\n        // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n        allReady.finally(() => {\n          if (renderSpan.isRecording()) renderSpan.end()\n        })\n\n        return await continueFizzStream(htmlStream, {\n          inlinedDataStream: createNodeInlinedDataStream(\n            reactServerResult.consume(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: generateStaticHTML,\n          allReady,\n          deploymentId: ctx.sharedContext.deploymentId,\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n        })\n      } else {\n        // MARK: webStreams HTML\n        // If provided, the postpone state should be parsed as JSON so it can be\n        // provided to React.\n        if (typeof renderOpts.postponed === 'string') {\n          if (postponedState?.type === DynamicState.DATA) {\n            // We have a complete HTML Document in the prerender but we need to\n            // still include the new server component render because it was not included\n            // in the static prelude.\n            const inlinedDataStream = createWebInlinedDataStream(\n              reactServerResult.tee(),\n              nonce,\n              formState\n            )\n\n            // End the span since there's no async rendering in this path\n            if (renderSpan.isRecording()) renderSpan.end()\n            return chainStreams(\n              inlinedDataStream,\n              createDocumentClosingStream()\n            )\n          } else if (postponedState) {\n            // We assume we have dynamic HTML requiring a resume render to complete\n            const { postponed, preludeState } =\n              getPostponedFromState(postponedState)\n\n            const resumeAppElement = (\n              <App\n                reactServerStream={reactServerResult.tee()}\n                reactDebugStream={reactDebugStream}\n                debugEndTime={undefined}\n                preinitScripts={preinitScripts}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />\n            )\n\n            const getServerInsertedHTML = makeGetServerInsertedHTML({\n              polyfills,\n              renderServerInsertedHTML,\n              serverCapturedErrors: allCapturedErrors,\n              basePath,\n              tracingMetadata: tracingMetadata,\n            })\n\n            const { stream: htmlStream, allReady } =\n              await workUnitAsyncStorage.run(\n                requestStore,\n                resumeToFizzStream,\n                resumeAppElement,\n                postponed,\n                { onError: htmlRendererErrorHandler, nonce }\n              )\n\n            // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n            allReady.finally(() => {\n              if (renderSpan.isRecording()) renderSpan.end()\n            })\n\n            return await continueDynamicHTMLResumeWeb(htmlStream, {\n              delayDataUntilFirstHtmlChunk:\n                preludeState === DynamicHTMLPreludeState.Empty,\n              inlinedDataStream: createWebInlinedDataStream(\n                reactServerResult.consume(),\n                nonce,\n                formState\n              ),\n              getServerInsertedHTML,\n              getServerInsertedMetadata,\n              deploymentId: ctx.sharedContext.deploymentId,\n            })\n          }\n        }\n\n        // This is a regular dynamic render\n        const getServerInsertedHTML = makeGetServerInsertedHTML({\n          polyfills,\n          renderServerInsertedHTML,\n          serverCapturedErrors: allCapturedErrors,\n          basePath,\n          tracingMetadata: tracingMetadata,\n        })\n\n        const generateStaticHTML = supportsDynamicResponse !== true\n\n        const appElement = (\n          <App\n            reactServerStream={reactServerResult.tee()}\n            reactDebugStream={reactDebugStream}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />\n        )\n\n        const fizzOptions = {\n          onError: htmlRendererErrorHandler,\n          nonce,\n          onHeaders: (headers: Headers) => {\n            headers.forEach((value, key) => {\n              appendHeader(key, value)\n            })\n          },\n          maxHeadersLength: reactMaxHeadersLength,\n          bootstrapScriptContent,\n          bootstrapScripts: [bootstrapScript],\n          formState,\n        }\n\n        const { stream: htmlStream, allReady } = await workUnitAsyncStorage.run(\n          requestStore,\n          renderToWebFizzStream,\n          appElement,\n          fizzOptions\n        )\n\n        // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n        allReady.finally(() => {\n          if (renderSpan.isRecording()) renderSpan.end()\n        })\n\n        return await continueFizzStream(htmlStream, {\n          inlinedDataStream: createWebInlinedDataStream(\n            reactServerResult.consume(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: generateStaticHTML,\n          allReady,\n          deploymentId: ctx.sharedContext.deploymentId,\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n        })\n      }\n      // MARK: renderToStream errorRecovery\n    } catch (err) {\n      if (\n        isStaticGenBailoutError(err) ||\n        (typeof err === 'object' &&\n          err !== null &&\n          'message' in err &&\n          typeof err.message === 'string' &&\n          err.message.includes(\n            'https://nextjs.org/docs/advanced-features/static-html-export'\n          ))\n      ) {\n        // Ensure that \"next dev\" prints the red error overlay\n        endSpanWithError(err)\n        throw err\n      }\n\n      // If a bailout made it to this point, it means it wasn't wrapped inside\n      // a suspense boundary.\n      const shouldBailoutToCSR = isBailoutToCSRError(err)\n      if (shouldBailoutToCSR) {\n        const stack = getStackWithoutErrorMessage(err)\n        error(\n          `${err.reason} should be wrapped in a suspense boundary at page \"${pagePath}\". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout\\n${stack}`\n        )\n\n        endSpanWithError(err)\n        throw err\n      }\n\n      // MARK: errorRecovery classification\n      let errorType: MetadataErrorType | 'redirect' | undefined\n\n      if (isHTTPAccessFallbackError(err)) {\n        res.statusCode = getAccessFallbackHTTPStatus(err)\n        metadata.statusCode = res.statusCode\n        errorType = getAccessFallbackErrorTypeByStatus(res.statusCode)\n      } else if (isRedirectError(err)) {\n        errorType = 'redirect'\n        res.statusCode = getRedirectStatusCodeFromError(err)\n        metadata.statusCode = res.statusCode\n\n        const redirectUrl = addPathPrefix(\n          getURLFromRedirectError(err),\n          basePath\n        )\n\n        // If there were mutable cookies set, we need to set them on the\n        // response.\n        const headers = new Headers()\n        if (appendMutableCookies(headers, requestStore.mutableCookies)) {\n          setHeader('set-cookie', Array.from(headers.values()))\n        }\n\n        setHeader('location', redirectUrl)\n      } else if (!shouldBailoutToCSR) {\n        res.statusCode = 500\n        metadata.statusCode = res.statusCode\n      }\n\n      const [errorPreinitScripts, errorBootstrapScript] = getRequiredScripts(\n        buildManifest,\n        assetPrefix,\n        crossOrigin,\n        subresourceIntegrityManifest,\n        getAssetQueryString(ctx, false),\n        nonce,\n        UNDERSCORE_NOT_FOUND_ROUTE_ENTRY\n      )\n\n      let errorBootstrapScriptContent: string | undefined\n      if (process.env.__NEXT_DEV_SERVER) {\n        errorBootstrapScriptContent = bootstrapScriptContent\n      } else if (\n        buildManifest.pagesChunkGroupBootstrapParams &&\n        buildManifest.chunkLoadingGlobal\n      ) {\n        errorBootstrapScriptContent = getTurbopackChunkGroupBootstrap(\n          buildManifest.pagesChunkGroupBootstrapParams,\n          buildManifest.chunkLoadingGlobal,\n          [UNDERSCORE_NOT_FOUND_ROUTE_ENTRY]\n        )\n      }\n\n      if (process.env.__NEXT_USE_NODE_STREAMS) {\n        // MARK: nodeStreams errorRecovery RSC + HTML\n        let errorRSCPayload: InitialRSCPayload\n        let errorServerStream: import('./stream-ops').AnyStream\n\n        try {\n          errorRSCPayload = await workUnitAsyncStorage.run(\n            requestStore,\n            getErrorRSCPayload,\n            tree,\n            ctx,\n            reactServerErrorsByDigest.has((err as any).digest) ? null : err,\n            errorType,\n            // Normal error rendering should include the error payload head.\n            true\n          )\n\n          errorServerStream = workUnitAsyncStorage.run(\n            requestStore,\n            renderToNodeFlightStream,\n            ctx.componentMod,\n            errorRSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n\n          if (reactServerResult === null) {\n            endSpanWithError(err)\n            throw err\n          }\n        } catch (setupErr) {\n          endSpanWithError(setupErr)\n          throw setupErr\n        }\n\n        try {\n          const generateStaticHTML = supportsDynamicResponse !== true\n\n          const { stream: errorHtmlStream, allReady: errorAllReady } =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              renderToNodeFizzStream,\n              <ErrorApp\n                reactServerStream={errorServerStream}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                preinitScripts={errorPreinitScripts}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />,\n              {\n                nonce,\n                bootstrapScriptContent: errorBootstrapScriptContent,\n                bootstrapScripts: [errorBootstrapScript],\n                formState,\n              },\n              { waitForAllReady: generateStaticHTML }\n            )\n\n          errorAllReady.finally(() => {\n            if (renderSpan.isRecording()) renderSpan.end()\n          })\n\n          return await continueFizzStream(errorHtmlStream, {\n            inlinedDataStream: createNodeInlinedDataStream(\n              // This is intentionally using the readable datastream from the\n              // main render rather than the flight data from the error page\n              // render\n              reactServerResult.consume(),\n              nonce,\n              formState\n            ),\n            isStaticGeneration: generateStaticHTML,\n            deploymentId: ctx.sharedContext.deploymentId,\n            getServerInsertedHTML: makeGetServerInsertedHTML({\n              polyfills,\n              renderServerInsertedHTML,\n              serverCapturedErrors: [],\n              basePath,\n              tracingMetadata: tracingMetadata,\n            }),\n            getServerInsertedMetadata,\n            validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n          })\n        } catch (finalErr: any) {\n          if (\n            process.env.__NEXT_DEV_SERVER &&\n            isHTTPAccessFallbackError(finalErr)\n          ) {\n            const { bailOnRootNotFound } =\n              require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n            bailOnRootNotFound()\n          }\n          endSpanWithError(finalErr)\n          throw finalErr\n        }\n      } else {\n        // MARK: webStreams errorRecovery RSC + HTML\n        let errorRSCPayload: InitialRSCPayload\n        let errorServerStream: import('./stream-ops').AnyStream\n\n        try {\n          errorRSCPayload = await workUnitAsyncStorage.run(\n            requestStore,\n            getErrorRSCPayload,\n            tree,\n            ctx,\n            reactServerErrorsByDigest.has((err as any).digest) ? null : err,\n            errorType,\n            // Normal error rendering should include the error payload head.\n            true\n          )\n\n          errorServerStream = workUnitAsyncStorage.run(\n            requestStore,\n            renderToWebFlightStream,\n            ctx.componentMod,\n            errorRSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n\n          if (reactServerResult === null) {\n            endSpanWithError(err)\n            throw err\n          }\n        } catch (setupErr) {\n          endSpanWithError(setupErr)\n          throw setupErr\n        }\n\n        try {\n          const generateStaticHTML = supportsDynamicResponse !== true\n\n          const { stream: errorHtmlStream, allReady: errorAllReady } =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              renderToWebFizzStream,\n              <ErrorApp\n                reactServerStream={errorServerStream}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                preinitScripts={errorPreinitScripts}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />,\n              {\n                nonce,\n                bootstrapScriptContent: errorBootstrapScriptContent,\n                bootstrapScripts: [errorBootstrapScript],\n                formState,\n              }\n            )\n\n          errorAllReady.finally(() => {\n            if (renderSpan.isRecording()) renderSpan.end()\n          })\n\n          return await continueFizzStream(errorHtmlStream, {\n            inlinedDataStream: createWebInlinedDataStream(\n              // This is intentionally using the readable datastream from the\n              // main render rather than the flight data from the error page\n              // render\n              reactServerResult.consume(),\n              nonce,\n              formState\n            ),\n            isStaticGeneration: generateStaticHTML,\n            deploymentId: ctx.sharedContext.deploymentId,\n            getServerInsertedHTML: makeGetServerInsertedHTML({\n              polyfills,\n              renderServerInsertedHTML,\n              serverCapturedErrors: [],\n              basePath,\n              tracingMetadata: tracingMetadata,\n            }),\n            getServerInsertedMetadata,\n            validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n          })\n        } catch (finalErr: any) {\n          if (\n            process.env.__NEXT_DEV_SERVER &&\n            isHTTPAccessFallbackError(finalErr)\n          ) {\n            const { bailOnRootNotFound } =\n              require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n            bailOnRootNotFound()\n          }\n          endSpanWithError(finalErr)\n          throw finalErr\n        }\n      }\n    }\n  })\n  /* eslint-enable @next/internal/no-ambiguous-jsx */\n}\n\n/**\n * A staged dev render interrupted by sync IO. It has no artifacts that could be\n * used as validation inputs, only the reason it was interrupted.\n */\ninterface SyncInterruptedStagedDevRender {\n  readonly syncInterruptReason: Error\n}\n\n/**\n * The chunks and per-stage timings a staged dev render accumulates once its\n * stream finishes. A render only produces them when it runs to the end without\n * a sync-IO interrupt, so they back both a render's uninterrupted outcome and\n * the validation inputs.\n */\ninterface StagedDevRenderArtifacts {\n  readonly accumulatedChunks: AccumulatedStreamChunks\n  readonly startTime: number\n  readonly stageEndTimes: StageEndTimes\n}\n\n/**\n * How a staged dev render ended once its stream has fully finished: with usable\n * artifacts or interrupted by sync IO.\n */\ntype StagedDevRenderOutcome =\n  | StagedDevRenderArtifacts\n  | SyncInterruptedStagedDevRender\n\n/**\n * A settled staged dev render: how it ended, plus whether it triggered `use\n * cache` fills that may still be settling. `hadCacheMiss` is orthogonal to the\n * outcome (either kind of render can miss caches) and is consumed before the\n * result is split into validation inputs: it gates the `cacheReady()` wait\n * before the render's work store is inspected, and on an uninterrupted render\n * also marks the output non-prod-representative so it can't be reused for\n * validation.\n */\ninterface StagedDevRenderResult {\n  readonly hadCacheMiss: boolean\n  readonly outcome: StagedDevRenderOutcome\n}\n\n/**\n * What `runValidationInDev` consumes: an uninterrupted render's artifacts plus\n * the request store and the debug channel. Carries no `syncInterruptReason`:\n * the resolution step has already surfaced and bailed on any sync interrupt.\n */\nexport interface ResolvedValidationInputs extends StagedDevRenderArtifacts {\n  readonly requestStore: RequestStore\n  readonly debugChannelClient: AnyStream | undefined\n}\n\n/**\n * The inputs produced for validation, before resolution: either an\n * uninterrupted render's artifacts (`ResolvedValidationInputs`) or, for a\n * render interrupted by sync IO, only the interrupt reason. An interrupted\n * render is never validated, so it carries nothing else: its debug channel is\n * dropped at construction. Discriminate with `'syncInterruptReason' in x`; the\n * resolution step surfaces and bails on the interrupted case, so the depth loop\n * only ever sees `ResolvedValidationInputs`.\n */\nexport type DevValidationInputs =\n  | ResolvedValidationInputs\n  | SyncInterruptedStagedDevRender\n\n/**\n * Drops a validation debug channel branch we've decided not to read.\n */\nfunction dropValidationDebugChannel(channel: AnyStream | undefined): void {\n  if (channel instanceof ReadableStream) {\n    channel.cancel()\n  } else {\n    channel?.destroy()\n  }\n}\n\nconst alreadyForwardedDynamicUsageErrors = new WeakSet<Error>()\n\n/**\n * Forwards an `invalidDynamicUsageError` recorded on the work store (e.g. a\n * request API used inside `'use cache'`) to the dev overlay, so client\n * navigations surface the same error as initial HTML loads do via validation.\n *\n * Returns whether an error was present, so callers can skip further validation.\n * That's independent of whether it was forwarded: an error that already carries\n * a digest is not forwarded again (it was emitted into the React render), but\n * it's still present and already shown, so validation should still be skipped.\n */\nfunction forwardInvalidDynamicUsageError(\n  invalidDynamicUsageError: Error | undefined,\n  ctx: AppRenderContext\n): boolean {\n  if (!invalidDynamicUsageError) {\n    return false\n  }\n\n  // Forward only if userland caught the rejection. If userland didn't catch,\n  // the rejection propagated into the React render and React's\n  // `serverComponentsErrorHandler` already stamped a digest on the error and\n  // emitted it as a Flight error chunk, so surfacing it again here would\n  // duplicate the entry in the dev overlay.\n  if (\n    !(invalidDynamicUsageError as { digest?: unknown }).digest &&\n    !alreadyForwardedDynamicUsageErrors.has(invalidDynamicUsageError)\n  ) {\n    alreadyForwardedDynamicUsageErrors.add(invalidDynamicUsageError)\n    void logMessagesAndSendErrorsToBrowser([invalidDynamicUsageError], ctx)\n  }\n\n  return true\n}\n\n/**\n * Runs Cache Components validation in the background once the response has\n * finished.\n */\nfunction runDevValidationInBackground(\n  prefetchMode: PrefetchingMode,\n  navigationKind: DevNavigationKind,\n  result: StagedDevRenderResult,\n  requestStore: RequestStore,\n  validationDebugChannel: AnyStream | undefined,\n  ctx: AppRenderContext,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  getDevRenderDidError: () => boolean,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  validationGeneration: DevValidationGeneration\n): void {\n  const validationAbortSignal = validationGeneration.signal\n\n  void consoleAsyncStorage\n    .run({ dim: true }, async () => {\n      // Validation is detached diagnostic work, but the renders and error\n      // formatting it performs can still monopolize the event loop. Wait until\n      // the response has finished so that work cannot delay Flight delivery or\n      // the client navigation.\n      if (\n        isNodeNextResponse(ctx.res) &&\n        !(await waitForResponseToFinish(ctx.res.originalResponse))\n      ) {\n        logValidationAborted(ctx)\n        return\n      }\n\n      if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n        logValidationAborted(ctx)\n        return\n      }\n\n      return runInstantInsightsWithTracing(ctx, async (runSpan) => {\n        // Read whether the streamed render errored only now that it has fully\n        // settled.\n        const devRenderDidError = getDevRenderDidError()\n\n        const [instantInputs, staticInputs] = await runSpan(\n          AppRenderSpan.instantInsightsPrepareValidation,\n          'Prepare validation inputs',\n          async () => {\n            const lazyInputs = await prepareValidationInputs(\n              prefetchMode,\n              navigationKind,\n              result,\n              requestStore,\n              validationDebugChannel,\n              ctx,\n              prerenderResumeDataCache,\n              createRequestStore,\n              getPayload,\n              onError,\n              validationAbortSignal\n            )\n\n            // If we need to do multiple renders, do them in parallel.\n            // `runValidationInDev` currently needs `instantInputs` eagerly\n            // right before using `staticInputs` for static shell validation,\n            // so there's no point delaying one of the renders.\n            // We bail out (after logging an error during\n            // `resolveLazyDevValidationInputs`) if sync IO or invalid dynamic\n            // errors happen in either.\n            return Promise.all([\n              lazyInputs.instantInputs\n                ? resolveLazyDevValidationInputs(lazyInputs.instantInputs, ctx)\n                : null,\n              resolveLazyDevValidationInputs(lazyInputs.staticInputs, ctx),\n            ])\n          }\n        )\n        if (\n          instantInputs === VALIDATION_BAILOUT ||\n          staticInputs === VALIDATION_BAILOUT\n        ) {\n          return\n        }\n\n        // A newer render may have superseded this work while we prepared the\n        // validation inputs above (which can itself render).\n        if (validationAbortSignal.aborted) {\n          logValidationAborted(ctx)\n          return\n        }\n\n        return runSpan(\n          AppRenderSpan.instantInsightsRunValidation,\n          'Run validation',\n          async () => {\n            // Hand the whole validation to the worker when one is installed. It\n            // runs on a worker thread (off the main thread), emits its own\n            // lifecycle markers, logs code frames on its piped stdio, and\n            // returns the overlay Flight bytes for the main thread to forward.\n            // The worker is absent when `experimental.devValidationWorker` is\n            // false, and validation runs in-process instead.\n            const devValidationWorker = getDevValidationWorker()\n\n            if (devValidationWorker) {\n              const snapshot = await buildDevValidationSnapshot(\n                ctx,\n                instantInputs,\n                staticInputs,\n                prefetchMode,\n                fallbackRouteParams,\n                devRenderDidError\n              )\n\n              const chunks = await devValidationWorker(\n                snapshot,\n                validationAbortSignal\n              )\n\n              // A newer navigation may have superseded this validation while\n              // the worker ran; don't surface stale insights for a page the user\n              // left.\n              if (chunks && !validationAbortSignal.aborted) {\n                const { sendErrorsToBrowser } = ctx.renderOpts\n                if (!sendErrorsToBrowser) {\n                  throw new InvariantError(\n                    'Expected `sendErrorsToBrowser` to be defined in renderOpts.'\n                  )\n                }\n                sendErrorsToBrowser(\n                  createNodeStreamFromChunks(chunks),\n                  ctx.htmlRequestId\n                )\n              }\n            } else {\n              // In-process path, taken when `experimental.devValidationWorker`\n              // is false or no worker is installed (e.g. during a build).\n              // Validation computes the errors; the caller delivers them to the\n              // dev overlay. `runWithDevValidationLogging` encloses both the\n              // render and the delivery in the test-mode lifecycle markers so\n              // tests that assert the delivered error between\n              // `validation_start` and `validation_end` capture it.\n              await runWithDevValidationLogging(\n                ctx,\n                validationAbortSignal,\n                async () => {\n                  const validationErrors = await runValidationInDev(\n                    prefetchMode,\n                    instantInputs,\n                    staticInputs,\n                    toValidationRenderContext(ctx),\n                    fallbackRouteParams,\n                    devRenderDidError,\n                    validationAbortSignal\n                  )\n\n                  if (\n                    validationErrors !== undefined &&\n                    !validationAbortSignal.aborted\n                  ) {\n                    await logMessagesAndSendErrorsToBrowser(\n                      validationErrors,\n                      ctx\n                    )\n                  }\n                }\n              )\n            }\n          }\n        )\n      })\n    })\n    // The catch keeps a failed render, or anything thrown inside validation,\n    // from surfacing as an unhandled rejection.\n    .catch((err) => {\n      // Superseded validation is intentionally torn down. Don't log errors\n      // caused by its abort signal.\n      if (validationAbortSignal.aborted) {\n        return\n      }\n      console.error(\n        new InvariantError('An unexpected error occurred during validation', {\n          cause: err,\n        })\n      )\n    })\n    .finally(() => validationGeneration.finish())\n}\n\ntype RunInstantInsightsSpan = <T>(\n  spanType: AppRenderSpan,\n  spanName: string,\n  fn: () => Promise<T>\n) => Promise<T>\n\nfunction runInstantInsightsSpan<T>(\n  spanType: AppRenderSpan,\n  spanName: string,\n  fn: () => Promise<T>\n): Promise<T> {\n  return traceLocalSpan(\n    {\n      name: spanName,\n      attributes: {\n        'next.span_category': 'nextjs',\n        'next.span_name': spanName,\n        'next.span_type': spanType,\n      },\n    },\n    fn\n  )\n}\n\nfunction runWithoutInstantInsightsSpan<T>(\n  _spanType: AppRenderSpan,\n  _spanName: string,\n  fn: () => Promise<T>\n): Promise<T> {\n  return fn()\n}\n\nasync function runInstantInsightsWithTracing<T>(\n  ctx: AppRenderContext,\n  fn: (runSpan: RunInstantInsightsSpan) => Promise<T>\n): Promise<T> {\n  if (!isRequestInsightsEnabled()) {\n    return fn(runWithoutInstantInsightsSpan)\n  }\n\n  return runWithRequestInsightsIdentity(\n    {\n      requestId: ctx.requestId,\n      kind: 'instant-insights',\n      htmlRequestId: ctx.htmlRequestId,\n      url: ctx.url.href,\n    },\n    () =>\n      traceLocalSpan(\n        {\n          name: 'Instant Insights',\n          parentSpan: null,\n          attributes: {\n            'next.span_category': 'nextjs',\n            'next.span_name': 'Instant Insights',\n            'next.span_type': AppRenderSpan.instantInsights,\n            'next.route': ctx.pagePath,\n          },\n        },\n        () => fn(runInstantInsightsSpan)\n      )\n  )\n}\n\n/**\n * The inputs to use for dev validation.\n * If an input needs additional rendering work (because it couldn't be\n * reused from the main render), it'll be an async function that produces\n * the actual input, which lets the consumer consume these lazily and/or\n * control when they are evaluated.\n * */\ntype PrepareValidationInputsResult = {\n  /** `null` if Instant Validation isn't enabled for a route */\n  readonly instantInputs: null | DevValidationInputs | LazyDevValidationInputs\n  readonly staticInputs: DevValidationInputs | LazyDevValidationInputs\n}\n\n/**\n * A lazily evaluated render that will produce validation inputs.\n * If it encounters sync IO or another error, it'll resolve to a sentinel\n * `VALIDATION_BAILOUT` value instead.\n */\ntype LazyDevValidationInputs = MemoizedThunk<\n  Promise<DevValidationInputs | ValidationBailout>\n>\n\nconst VALIDATION_BAILOUT = Symbol('VALIDATION_BAILOUT')\ntype ValidationBailout = typeof VALIDATION_BAILOUT\n\nfunction createLazyDevValidationInputs(\n  create: () => Promise<DevValidationInputs | ValidationBailout>\n): LazyDevValidationInputs {\n  return createMemoizedThunk(create)\n}\n\n/** A lazily evaluated value. Only runs once even when called multiple times. */\ntype MemoizedThunk<T> = (() => T) & { MemoizedOnce: never }\n\nfunction createMemoizedThunk<T>(cb: () => T): MemoizedThunk<T> {\n  let cache: null | { value: T } = null\n  const wrapped = (): T => {\n    if (cache === null) {\n      cache = { value: cb() }\n    }\n    return cache.value\n  }\n  return wrapped as MemoizedThunk<T>\n}\n\nasync function prepareValidationInputs(\n  prefetchMode: PrefetchingMode,\n  navigationKind: DevNavigationKind,\n  result: StagedDevRenderResult,\n  requestStore: RequestStore,\n  validationDebugChannel: AnyStream | undefined,\n  ctx: AppRenderContext,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  validationAbortSignal: AbortSignal\n): Promise<PrepareValidationInputsResult> {\n  // Check if we can re-use the main render for validation.\n  let inputsFromNavigation: ResolvedValidationInputs | null\n  if (!result.hadCacheMiss && !('syncInterruptReason' in result.outcome)) {\n    inputsFromNavigation = {\n      accumulatedChunks: result.outcome.accumulatedChunks,\n      startTime: result.outcome.startTime,\n      stageEndTimes: result.outcome.stageEndTimes,\n      requestStore,\n      debugChannelClient: validationDebugChannel,\n    }\n  } else {\n    // Cache miss or sync IO. We can't re-use the main render.\n    dropValidationDebugChannel(validationDebugChannel)\n    inputsFromNavigation = null\n  }\n\n  if (prefetchMode === PrefetchingMode.Partial) {\n    return prepareValidationInputsInPartialPrefetching(\n      navigationKind,\n      requestStore,\n      ctx,\n      prerenderResumeDataCache,\n      createRequestStore,\n      getPayload,\n      onError,\n      inputsFromNavigation,\n      validationAbortSignal\n    )\n  } else {\n    return prepareValidationInputsInLegacyPrefetching(\n      ctx,\n      prerenderResumeDataCache,\n      createRequestStore,\n      getPayload,\n      onError,\n      inputsFromNavigation,\n      validationAbortSignal\n    )\n  }\n}\n\nasync function prepareValidationInputsInPartialPrefetching(\n  navigationKind: DevNavigationKind,\n  requestStore: RequestStore,\n  ctx: AppRenderContext,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  inputsFromNavigation: ResolvedValidationInputs | null,\n  validationAbortSignal: AbortSignal\n): Promise<PrepareValidationInputsResult> {\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n  const needsInstantValidation =\n    await anySegmentNeedsInstantValidationInDev(loaderTree)\n\n  // If we have static params that aren't root params, then the static stages are incompatible\n  // between the Static shell and the App Shell, and we can't use the same render for both.\n  const areStagesCompatible = !hasNonRootStaticParams(\n    ctx.interpolatedParams,\n    requestStore.rootParams,\n    requestStore.fallbackParams\n  )\n\n  const LAZY_FULL_RENDER = createLazyDevValidationInputs(async () => {\n    const shouldRenderWithAppShell = true\n    const prefetchMode = PrefetchingMode.Partial\n    const inputs = await renderWithWarmCachesForValidationInDev(\n      ctx,\n      createRequestStore,\n      getPayload,\n      onError,\n      prerenderResumeDataCache,\n      prefetchMode,\n      shouldRenderWithAppShell,\n      validationAbortSignal\n    )\n    if (forwardErrorsFromWarmRender(inputs, ctx)) {\n      return VALIDATION_BAILOUT\n    }\n    return inputs\n  })\n\n  const LAZY_RUNTIME_PRERENDER = createLazyDevValidationInputs(async () => {\n    const inputs = await prerenderWithWarmCachesForStaticValidationInDev(\n      ctx,\n      createRequestStore,\n      getPayload,\n      onError,\n      prerenderResumeDataCache,\n      validationAbortSignal\n    )\n    if (forwardErrorsFromWarmRender(inputs, ctx)) {\n      return VALIDATION_BAILOUT\n    }\n    return inputs\n  })\n\n  if (inputsFromNavigation) {\n    // We can reuse the main render for at least one of the validation passes.\n    if (areStagesCompatible) {\n      // Stages are compatible across the static shell and the app shell.\n      // We reuse the main render for both.\n      const instantInputs = needsInstantValidation ? inputsFromNavigation : null\n      const staticInputs = inputsFromNavigation\n      return { instantInputs, staticInputs }\n    }\n\n    // Stages are incompatible across static and instant validation.\n\n    // If this navigation has an accurate app shell, we can use it for instant validation.\n    // However, static validation can't use this static stage, so we need to prerender it.\n    if (navigationHasAppShell(navigationKind)) {\n      const instantInputs = needsInstantValidation ? inputsFromNavigation : null\n      const staticInputs = LAZY_RUNTIME_PRERENDER\n      return { instantInputs, staticInputs }\n    }\n\n    // This navigation does not have an accurate app shell, so if we need instant validation, we need to render again.\n    // However, this means that it has an accurate static shell, so we can skip prerendering it.\n    const instantInputs = needsInstantValidation ? LAZY_FULL_RENDER : null\n    const staticInputs = inputsFromNavigation\n    return { instantInputs, staticInputs }\n  }\n\n  // We cannot reuse the main navigation, and need to render again.\n  // If stages are compatible and we'll rerender for instant validation,\n  // we can reuse the result for static validation.\n  const instantInputs = needsInstantValidation ? LAZY_FULL_RENDER : null\n  const staticInputs =\n    areStagesCompatible && instantInputs !== null\n      ? instantInputs\n      : LAZY_RUNTIME_PRERENDER\n\n  return { instantInputs, staticInputs }\n}\n\nasync function prepareValidationInputsInLegacyPrefetching(\n  ctx: AppRenderContext,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  inputsFromNavigation: ResolvedValidationInputs | null,\n  validationAbortSignal: AbortSignal\n): Promise<PrepareValidationInputsResult> {\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n  const needsInstantValidation =\n    await anySegmentNeedsInstantValidationInDev(loaderTree)\n\n  // We're not in partialPrefetching, so we can use the same inputs for both\n  // instant validation and static shell validation.\n  if (inputsFromNavigation) {\n    // The main render is reusable.\n    const instantInputs = needsInstantValidation ? inputsFromNavigation : null\n    const staticInputs = inputsFromNavigation\n    return { instantInputs, staticInputs }\n  }\n\n  const LAZY_FULL_RENDER = createLazyDevValidationInputs(async () => {\n    const shouldRenderWithAppShell = false\n    const prefetchMode = PrefetchingMode.LegacySpeculative\n    const inputs = await renderWithWarmCachesForValidationInDev(\n      ctx,\n      createRequestStore,\n      getPayload,\n      onError,\n      prerenderResumeDataCache,\n      prefetchMode,\n      shouldRenderWithAppShell,\n      validationAbortSignal\n    )\n    if (forwardErrorsFromWarmRender(inputs, ctx)) {\n      return VALIDATION_BAILOUT\n    }\n    return inputs\n  })\n\n  const LAZY_RUNTIME_PRERENDER = createLazyDevValidationInputs(async () => {\n    const inputs = await prerenderWithWarmCachesForStaticValidationInDev(\n      ctx,\n      createRequestStore,\n      getPayload,\n      onError,\n      prerenderResumeDataCache,\n      validationAbortSignal\n    )\n    if (forwardErrorsFromWarmRender(inputs, ctx)) {\n      return VALIDATION_BAILOUT\n    }\n    return inputs\n  })\n\n  // If instant validation is needed, we need to perform a full rerender.\n  // Otherwise, a prerender is enough.\n  if (needsInstantValidation) {\n    const instantInputs = LAZY_FULL_RENDER\n    const staticInputs = instantInputs\n    return { instantInputs, staticInputs }\n  } else {\n    const instantInputs = null\n    const staticInputs = LAZY_RUNTIME_PRERENDER\n    return { instantInputs, staticInputs }\n  }\n}\n\nasync function resolveLazyDevValidationInputs(\n  resolvedOrLazyInputs: DevValidationInputs | LazyDevValidationInputs,\n  ctx: AppRenderContext\n): Promise<ResolvedValidationInputs | ValidationBailout> {\n  let inputs: DevValidationInputs\n  if (typeof resolvedOrLazyInputs === 'function') {\n    const maybeInputs = await resolvedOrLazyInputs()\n    if (maybeInputs === VALIDATION_BAILOUT) {\n      return maybeInputs\n    }\n    inputs = maybeInputs\n  } else {\n    inputs = resolvedOrLazyInputs\n  }\n\n  if ('syncInterruptReason' in inputs) {\n    await logMessagesAndSendErrorsToBrowser([inputs.syncInterruptReason], ctx)\n    return VALIDATION_BAILOUT\n  }\n  return inputs\n}\n\nfunction forwardErrorsFromWarmRender(\n  inputs: DevValidationInputs,\n  ctx: AppRenderContext\n) {\n  if ('syncInterruptReason' in inputs) {\n    void logMessagesAndSendErrorsToBrowser([inputs.syncInterruptReason], ctx)\n    return true\n  }\n\n  // Unlike the cold streamed render, which fills the caches, the warm\n  // render reads them back. Reading a `use cache` entry can surface an\n  // invalid dynamic usage error that filling can't (e.g. a nested\n  // dynamic `use cache` cache life that propagated to a parent with no\n  // explicit `cacheLife`). Forward it and skip validation.\n  if (\n    forwardInvalidDynamicUsageError(ctx.workStore.invalidDynamicUsageError, ctx)\n  ) {\n    return true\n  }\n  return false\n}\n\ninterface StagedDevRenderSetup {\n  readonly cacheSignal: CacheSignal\n  readonly prerenderResumeDataCache: ReturnType<\n    typeof createPrerenderResumeDataCache\n  >\n  readonly stageController: StagedRenderingController\n  readonly environmentName: () => string\n}\n\nexport enum PrefetchingMode {\n  LegacySpeculative = 1,\n  Partial = 2,\n}\n\nasync function getPrefetchingModeForPage(\n  renderOpts: Pick<RenderOpts, 'partialPrefetching'>,\n  loaderTree: LoaderTree\n): Promise<PrefetchingMode> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  // TODO(app-shells): support \"unstable_eager\"\n  if (renderOpts.partialPrefetching) {\n    debug?.('using prefetching mode Partial because of next.config.js')\n    return PrefetchingMode.Partial\n  }\n  if (await anySegmentHasPartialPrefetchingEnabled(loaderTree)) {\n    debug?.('using prefetching mode Partial because of segment config')\n    return PrefetchingMode.Partial\n  }\n\n  debug?.('using prefetching mode LegacySpeculative')\n  return PrefetchingMode.LegacySpeculative\n}\n\nfunction getSyncIOMode(prefetchMode: PrefetchingMode): SyncIOMode {\n  switch (prefetchMode) {\n    case PrefetchingMode.LegacySpeculative:\n      return SyncIOMode.AllowedInRuntimeOrDynamic\n    case PrefetchingMode.Partial:\n      return SyncIOMode.AllowedInDynamic\n  }\n}\n\n/**\n * Per-render setup shared by the streaming dev Cache Components renders: a\n * cache signal (so caches fill in the background), a prerender resume data\n * cache, async API promises, and a staged rendering controller, all wired into\n * the request store.\n */\nfunction setUpStagedDevRender(\n  prefetchingMode: PrefetchingMode,\n  navigationKind: DevNavigationKind,\n  requestStore: RequestStore\n): StagedDevRenderSetup {\n  const shouldRenderWithAppShell = navigationHasAppShell(navigationKind)\n\n  const cacheSignal = new CacheSignal()\n  trackPendingModules(cacheSignal)\n  const prerenderResumeDataCache = createPrerenderResumeDataCache()\n  const stageController = new StagedRenderingController({\n    abortSignal: null,\n    abandonController: null,\n    syncIO: getSyncIOMode(prefetchingMode),\n    finalStage: null,\n  })\n  requestStore.resumeDataCache = prerenderResumeDataCache\n  requestStore.stagedRendering = stageController\n  requestStore.needsSessionShell = shouldRenderWithAppShell\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  requestStore.cacheSignal = cacheSignal\n\n  const environmentName = () =>\n    getEnvironmentNameForStage(stageController.currentStage)\n\n  return {\n    cacheSignal,\n    prerenderResumeDataCache,\n    stageController,\n    environmentName,\n  }\n}\n\nfunction getEnvironmentNameForStage(stage: RenderStage) {\n  switch (stage) {\n    case RenderStage.Before:\n    case RenderStage.ShellStatic:\n    case RenderStage.Static:\n      return 'Prerender'\n    case RenderStage.ShellRuntime:\n    case RenderStage.Runtime:\n      return 'Prefetch'\n    case RenderStage.Dynamic:\n    case RenderStage.Abandoned:\n      return 'Server'\n    default:\n      stage satisfies never\n      throw new InvariantError(`Invalid render stage: ${stage}`)\n  }\n}\n\n// The rendering context and reveal config that `stagedRenderWithCachesInDev`\n// forwards to `streamStagedRenderInDev`.\ninterface StagedDevRenderOptions {\n  prefetchMode: PrefetchingMode\n  ctx: AppRenderContext\n  requestStore: RequestStore\n  onError: (error: unknown) => void\n  navigationKind: DevNavigationKind\n  // This is defined only for foreground HMR requests. When it aborts, the\n  // staged render is torn down while its in-flight `'use cache'` fills keep\n  // running. Detached validation uses its per-document generation signal;\n  // `waitForResponseToFinish` handles response closure before it begins.\n  requestAbortSignal: AbortSignal | undefined\n}\n\ntype DevNavigationKind =\n  | { type: 'initial-load' }\n  | { type: 'prefetched-client'; prefetchStage: StreamRevealStage }\n\ntype StreamRevealStage =\n  | RenderStage.Static\n  | RenderStage.ShellRuntime\n  | RenderStage.Runtime\n\nfunction navigationHasAppShell(navigationKind: DevNavigationKind): boolean {\n  // TODO(app-shells): when we implement `<Link prefetch={true}>/`prefetch = \"unstable_eager\"` in dev,\n  // this might need to be adjusted, because we'll use `Runtime` for the stage\n  return (\n    navigationKind.type === 'prefetched-client' &&\n    navigationKind.prefetchStage === RenderStage.ShellRuntime\n  )\n}\n\ninterface StreamStagedRenderInDevOptions extends StagedDevRenderOptions {\n  rscPayload: RSCPayload\n  stageController: StagedRenderingController\n  cacheSignal: CacheSignal\n  environmentName: () => string\n  debugChannel: NodeDebugChannelPair | undefined\n}\n\n/**\n * Streams a staged dev render to completion without ever abandoning it, so it\n * streams progressively and fills caches as a side effect. Resolves as soon as\n * the first task creates the stream, handing back the response `stream` and a\n * `result` promise. The `result` settles once the full stream has finished, and\n * reports whether any stage boundary still had pending cache reads (a cold load\n * that streamed Suspense fallbacks for not-yet-cached content), the stage\n * timings, and the accumulated chunks.\n *\n * The chunks are accumulated eagerly because detecting completion requires\n * reading the whole stream anyway; the same accumulation feeds validation when\n * the render turns out to be prod-representative.\n */\nasync function streamStagedRenderInDev({\n  ctx,\n  requestStore,\n  rscPayload,\n  stageController,\n  cacheSignal,\n  environmentName,\n  onError,\n  debugChannel,\n  navigationKind,\n  requestAbortSignal,\n}: StreamStagedRenderInDevOptions): Promise<{\n  stream: Readable\n  resultPromise: Promise<StagedDevRenderResult>\n}> {\n  let holdStreamUntilRevealed: boolean\n  let revealAfterStage: StreamRevealStage\n  switch (navigationKind.type) {\n    case 'initial-load': {\n      // Hold the stream until the shell content has flushed so the\n      // streamed HTML reflects the prerendered HTML shell\n      holdStreamUntilRevealed = true\n      revealAfterStage = RenderStage.Static\n      break\n    }\n    case 'prefetched-client': {\n      // This stream goes to the browser, which gates revealing the response on\n      // the payload's `_revealAfter`, so release it live and let the browser\n      // process chunks as they arrive instead of holding it server-side.\n      holdStreamUntilRevealed = false\n      revealAfterStage = navigationKind.prefetchStage\n      break\n    }\n  }\n\n  const { ComponentMod } = ctx.renderOpts\n  const { clientModules } = getClientReferenceManifest()\n\n  // The first task creates the stream; `streamReady` carries it (and its chunk\n  // accumulation) out of that task into the function body below.\n  const streamReady = createPromiseWithResolvers<{\n    stream: Readable\n    accumulatedChunksPromise: Promise<AccumulatedStreamChunks>\n  }>()\n\n  // `revealAfter` resolves once the `revealAfterStage` content has flushed (or\n  // earlier on a cache miss). When streaming live (a client navigation), it's\n  // surfaced through the Flight payload as `_revealAfter`: the client decodes\n  // it and defers resolving the response's deferred RSCs on it (see\n  // `ppr-navigations`), so a Suspense boundary's children aren't revealed\n  // before their row has been decoded, which would flush a premature fallback.\n  // React serializes the promise as a pending row whose resolution row is\n  // emitted only when we resolve it here, and that row follows the children's\n  // row in the payload, so the children are already decoded by the time the\n  // client unblocks. The HTML (Fizz) render can't gate like this, so we don't\n  // surface the promise on its payload and instead hold the whole stream on\n  // `revealAfter` for it (see `holdStreamUntilRevealed` below).\n  const revealAfter = createPromiseWithResolvers<void>()\n  if (!holdStreamUntilRevealed) {\n    ;(rscPayload as InitialRSCPayload | NavigationFlightResponse)._revealAfter =\n      revealAfter.promise\n  }\n\n  let startTime = -Infinity\n\n  // Whether any stage boundary still had pending cache reads (or modules): i.e.\n  // the caches weren't filled yet and the render streamed Suspense fallbacks\n  // for content that would be cached in production.\n  let hadCacheMiss = false\n\n  // Whether the cold-cache status has already been reported for this render. It\n  // is reported at most once, and only for a read that's still pending while a\n  // shell stage is flushing (see `checkForCacheMiss`).\n  let reportedColdCache = false\n\n  // Runs at each stage boundary. Latches the running cache-miss verdict and\n  // returns it, so a boundary can reveal the shell as soon as a miss is seen\n  // (and so dev validation can later tell whether the streamed render is\n  // prod-representative). The first miss seen while a shell stage is still\n  // flushing also reports the cold-cache status.\n  const checkForCacheMiss = () => {\n    if (cacheSignal.hasPendingReads()) {\n      hadCacheMiss = true\n\n      // The cold-cache indicator reflects the shell only. A cache read still\n      // pending while a shell stage flushes (`currentStage <=\n      // revealAfterStage`, using the ordered `RenderStage` values) is part of\n      // the shell that production serves instantly, so a cold cache there is\n      // worth surfacing and we show the indicator. A cache miss after the shell\n      // stage is runtime or dynamic content that production reads/fills during\n      // the resume at runtime, so a cold cache there is expected and must not\n      // show the indicator.\n      if (\n        !reportedColdCache &&\n        stageController.currentStage <= revealAfterStage\n      ) {\n        // First in-shell cache miss this render: tell the dev overlay we're\n        // streaming with a cold cache now. The per-load `'ready'` reset clears\n        // it again on the next load.\n        ctx.renderOpts.setCacheStatus?.('cold', ctx.htmlRequestId)\n        reportedColdCache = true\n      }\n    }\n    return hadCacheMiss\n  }\n\n  const checkCacheMissAndAdvance = (stage: AdvanceableRenderStage) => {\n    if (checkForCacheMiss()) {\n      revealAfter.resolve()\n    }\n    stageController.advanceStage(stage)\n  }\n\n  const checkReveal = (stage: AdvanceableRenderStage) => {\n    if (checkForCacheMiss() || revealAfterStage === stage) {\n      revealAfter.resolve()\n    }\n  }\n\n  const stagesAdvanced = runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.ShellStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const replayable = new ReplayableNodeStream(\n        workUnitAsyncStorage.run(\n          requestStore,\n          renderToNodeFlightStream,\n          ComponentMod,\n          rscPayload,\n          clientModules,\n          {\n            onError,\n            environmentName,\n            startTime,\n            filterStackFrame,\n            debugChannel: debugChannel?.serverSide,\n            signal: requestAbortSignal,\n          }\n        ) as Readable\n      )\n\n      streamReady.resolve({\n        stream: replayable.createReplayStream(),\n        accumulatedChunksPromise: accumulateStreamChunks(\n          replayable.createReplayStream(),\n          stageController,\n          // Abort accumulation as soon as the signal aborts instead of waiting\n          // for the stream to close.\n          requestAbortSignal ?? null\n        ),\n      })\n    },\n    () => checkCacheMissAndAdvance(RenderStage.Static),\n    () => checkReveal(RenderStage.Static),\n\n    () => checkCacheMissAndAdvance(RenderStage.ShellRuntime),\n    () => checkReveal(RenderStage.ShellRuntime),\n\n    () => checkCacheMissAndAdvance(RenderStage.Runtime),\n    () => checkReveal(RenderStage.Runtime),\n\n    () => {\n      // Advance to the dynamic stage even while caches are still filling, so\n      // dynamic content streams to the browser right away instead of being\n      // withheld until the slowest cache fill completes. Streaming that content\n      // promptly is the whole point of the streaming dev render.\n      //\n      // The tradeoff is that dev no longer detects a `'use cache'` deadlock: a\n      // cache whose fill depends on Dynamic-stage IO used to be held here until\n      // it hit the fill timeout, but advancing now unblocks that IO so the\n      // cache fills instead. That detection only served to debug a build-time\n      // deadlock from within dev, and the streaming render no longer blocks the\n      // page on the fill, so we accept losing it here.\n      // TODO: Surface `'use cache'` deadlocks at build time instead, e.g. via\n      // `next build --debug-prerender`, so they can still be diagnosed.\n      stageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n\n  // If a task throws before the stream is created, surface it to the awaiter\n  // below via `streamReady`. Resolve (not reject) `revealAfter` so the client\n  // consumers that gate on the payload's `_revealAfter` unblock rather than\n  // seeing a rejection; the actual error still surfaces through the stream.\n  stagesAdvanced.catch((err) => {\n    streamReady.reject(err)\n    revealAfter.resolve()\n  })\n\n  const { stream, accumulatedChunksPromise } = await streamReady.promise\n\n  // For the HTML (Fizz) render, hold the stream until the shell-stage content\n  // has flushed (or until a cache miss reveals early) so the HTML reflects the\n  // prerendered shell that production streams rather than a premature fallback.\n  // The `_revealAfter` gate is client-side and doesn't apply to this render,\n  // which consumes the payload directly and would otherwise stream a boundary's\n  // fallback before its content arrived. A client navigation doesn't need the\n  // hold: it gates revealing the response on `_revealAfter` (whose resolution\n  // row follows the children's row in the stream), so we release the stream to\n  // it live and let the browser process chunks as they arrive instead of\n  // holding it server-side.\n  if (holdStreamUntilRevealed) {\n    await revealAfter.promise\n  }\n\n  // Advancing the stages only drives the pipeline forward; the render isn't\n  // actually complete until its stream has fully finished. The accumulation\n  // resolves at that point, so the result is read only once both it and the\n  // stages have settled (a late `syncInterruptReason` or\n  // `invalidDynamicUsageError` isn't final until the last stage has streamed).\n  const resultPromise = Promise.all([\n    stagesAdvanced,\n    accumulatedChunksPromise,\n  ]).then(([, accumulatedChunks]): StagedDevRenderResult => {\n    const syncInterruptReason = stageController.getSyncInterruptReason()\n    return {\n      hadCacheMiss,\n      outcome: syncInterruptReason\n        ? { syncInterruptReason }\n        : {\n            startTime,\n            stageEndTimes: getStageEndTimes(stageController),\n            accumulatedChunks,\n          },\n    }\n  })\n\n  return { stream, resultPromise }\n}\n\nfunction getStageEndTimes(\n  stageController: StagedRenderingController\n): StageEndTimes {\n  return {\n    [RenderStage.Static]: stageController.getStageEndTime(RenderStage.Static),\n    [RenderStage.ShellRuntime]: stageController.getStageEndTime(\n      RenderStage.ShellRuntime\n    ),\n    [RenderStage.Runtime]: stageController.getStageEndTime(RenderStage.Runtime),\n  }\n}\n\nasync function renderWithWarmCachesForValidationInDev(\n  ctx: AppRenderContext,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  prefetchMode: PrefetchingMode,\n  shouldRenderWithAppShell: boolean,\n  validationAbortSignal: AbortSignal\n): Promise<DevValidationInputs> {\n  const { ComponentMod, setReactDebugChannel } = ctx.renderOpts\n  const { clientModules } = getClientReferenceManifest()\n\n  const stageController = new StagedRenderingController({\n    abortSignal: null,\n    abandonController: null,\n    syncIO: getSyncIOMode(prefetchMode),\n    finalStage: null,\n  })\n\n  const requestStore = createRequestStore()\n  requestStore.resumeDataCache = createRenderResumeDataCache(\n    prerenderResumeDataCache\n  )\n  requestStore.stagedRendering = stageController\n  requestStore.needsSessionShell = shouldRenderWithAppShell\n  requestStore.cacheSignal = null\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n  const environmentName = () =>\n    getEnvironmentNameForStage(stageController.currentStage)\n\n  const rscPayload = await getPayload(requestStore)\n\n  let startTime = -Infinity\n  const accumulatedChunks = await runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.ShellStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const sourceStream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToNodeFlightStream,\n        ComponentMod,\n        rscPayload,\n        clientModules,\n        {\n          onError,\n          environmentName,\n          startTime,\n          filterStackFrame,\n          debugChannel: debugChannel?.serverSide,\n          signal: validationAbortSignal,\n        }\n      ) as Readable\n\n      return accumulateStreamChunks(\n        sourceStream,\n        stageController,\n        validationAbortSignal\n      )\n    },\n    () => stageController.advanceStage(RenderStage.Static),\n    () => stageController.advanceStage(RenderStage.ShellRuntime),\n    () => stageController.advanceStage(RenderStage.Runtime),\n    () => stageController.advanceStage(RenderStage.Dynamic)\n  )\n\n  const syncInterruptReason = stageController.getSyncInterruptReason()\n  if (syncInterruptReason) {\n    // Sync IO interrupted the render, so it won't be validated. Drop the debug\n    // channel now and return only the interrupt reason: nothing downstream\n    // reads the request store or chunks of an interrupted render.\n    dropValidationDebugChannel(debugChannel?.clientSide.readable)\n    return { syncInterruptReason }\n  }\n\n  return {\n    accumulatedChunks,\n    startTime,\n    stageEndTimes: getStageEndTimes(stageController),\n    requestStore,\n    debugChannelClient: debugChannel?.clientSide.readable,\n  }\n}\n\ninterface StagedRenderWithCachesInDevOptions extends StagedDevRenderOptions {\n  createRequestStore: () => RequestStore\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>\n  shouldValidate: boolean\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n  getDevRenderDidError: () => boolean\n}\n\nasync function prerenderWithWarmCachesForStaticValidationInDev(\n  ctx: AppRenderContext,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void,\n  prerenderResumeDataCache: ReturnType<typeof createPrerenderResumeDataCache>,\n  validationAbortSignal: AbortSignal\n): Promise<DevValidationInputs> {\n  // This function is currently only used in partialPrefetching.\n  const prefetchMode = PrefetchingMode.Partial\n\n  const { ComponentMod, setReactDebugChannel } = ctx.renderOpts\n  const { clientModules } = getClientReferenceManifest()\n\n  // This render is for validation only, and won't be shown to the user,\n  // so we're only rendering until the runtime stage\n  // (we need static chunks and runtime chunks for discriminated errors)\n  const finalReactController = new AbortController()\n  const finalDataController = new AbortController()\n\n  abortWhenSignalAborts(validationAbortSignal, finalReactController)\n\n  const stageController = new StagedRenderingController({\n    abortSignal: finalDataController.signal,\n    abandonController: null,\n    syncIO: getSyncIOMode(prefetchMode),\n    finalStage: RenderStage.Runtime,\n  })\n\n  const requestStore = createRequestStore()\n  requestStore.resumeDataCache = createRenderResumeDataCache(\n    prerenderResumeDataCache\n  )\n  requestStore.stagedRendering = stageController\n  requestStore.needsSessionShell = false\n  requestStore.cacheSignal = null\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  // We abort upon reaching the runtime stage or on Sync IO.\n  // If sync IO occurs in a place where it's not allowed, then we have to fail validation,\n  // and we can abort the render immediately, without waiting for anything else..\n  requestStore.controller = finalReactController\n  requestStore.renderSignal = finalDataController.signal\n\n  const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n  const environmentName = () =>\n    getEnvironmentNameForStage(stageController.currentStage)\n\n  const rscPayload = await getPayload(requestStore)\n\n  let startTime = -Infinity\n  const collectedChunksByStage = createStageChunksAccumulator()\n\n  const collectChunk = (chunk: Uint8Array) => {\n    // We abort the render before the dynamic stage.\n    // If we aborted, save the errored chunks as if they were emitted\n    // in the dynamic stage so that we can late-release them for debug info.\n    const stage = finalReactController.signal.aborted\n      ? RenderStage.Dynamic\n      : stageController.currentStage\n    collectStageChunk(collectedChunksByStage, stage, chunk)\n  }\n\n  await runInSequentialTasks(\n    async () => {\n      stageController.advanceStage(RenderStage.ShellStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const sourceStream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToNodeFlightStream,\n        ComponentMod,\n        rscPayload,\n        clientModules,\n        {\n          onError,\n          environmentName,\n          startTime,\n          filterStackFrame,\n          debugChannel: debugChannel?.serverSide,\n        }\n      ) as Readable\n\n      // Only reject hanging promises after react finished aborting.\n      abortWhenSignalAborts(finalReactController.signal, finalDataController)\n\n      // Note: this await will only resolve after the last task (unless sync IO aborts the render earlier)\n      await iterateStreamingPrerenderChunks(\n        sourceStream,\n        finalReactController.signal,\n        collectChunk\n      )\n    },\n    () => stageController.advanceStage(RenderStage.Static),\n    () => stageController.advanceStage(RenderStage.ShellRuntime),\n    () => stageController.advanceStage(RenderStage.Runtime),\n    () => {\n      // Do not advance to the dynamic stage, abort instead.\n      abortInRenderContext(requestStore, finalReactController)\n    }\n  )\n\n  const syncInterruptReason = stageController.getSyncInterruptReason()\n  if (syncInterruptReason) {\n    // Sync IO interrupted the render, so it won't be validated. Drop the debug\n    // channel now and return only the interrupt reason: nothing downstream\n    // reads the request store or chunks of an interrupted render.\n    dropValidationDebugChannel(debugChannel?.clientSide.readable)\n    return { syncInterruptReason }\n  }\n  return {\n    accumulatedChunks: collectedChunksByStage,\n    startTime,\n    stageEndTimes: getStageEndTimes(stageController),\n    requestStore,\n    debugChannelClient: debugChannel?.clientSide.readable,\n  }\n}\n\n/** When the source signal aborts, abort the controller with its reason. */\nfunction abortWhenSignalAborts(\n  signal: AbortSignal,\n  controller: AbortController\n) {\n  if (signal.aborted) {\n    controller.abort(signal.reason)\n    return\n  }\n  signal.addEventListener(\n    'abort',\n    () => controller.abort(signal.reason),\n    ABORT_ONCE\n  )\n}\n\nconst ABORT_ONCE = { once: true }\n\n/** Make sure that any userspace code that might run during abort has access\n * to the workUnitStore that it was rendered in.\n * This is mostly relevant to Fizz where a component suspended on a hanging use()\n * might get rerendered during an abort for debug info reasons, but we defensively\n * also do it in Flight just in case.\n * x-ref: https://github.com/vercel/next.js/pull/94436\n * */\nfunction abortInRenderContext(\n  workUnitStore: WorkUnitStore,\n  controller: AbortController,\n  reason?: unknown\n): void {\n  if (controller.signal.aborted) {\n    return\n  }\n  workUnitAsyncStorage.run(\n    workUnitStore,\n    reason\n      ? controller.abort.bind(controller, reason)\n      : controller.abort.bind(controller)\n  )\n}\n\n/**\n * Sets up and streams a dev Cache Components render. Streams immediately and\n * fills caches as a side effect, then runs a background follow-up once the\n * render finishes. When `shouldValidate`, it spawns Cache Components validation\n * (against the streamed render directly when it's prod-representative,\n * otherwise against a separate warm-cache render); otherwise it just forwards\n * any recorded invalid dynamic usage error to the dev overlay.\n */\nasync function stagedRenderWithCachesInDev({\n  prefetchMode,\n  ctx,\n  requestStore,\n  createRequestStore,\n  getPayload,\n  onError,\n  shouldValidate,\n  fallbackRouteParams,\n  getDevRenderDidError,\n  navigationKind,\n  requestAbortSignal,\n}: StagedRenderWithCachesInDevOptions): Promise<{\n  stream: Readable\n  debugChannel: NodeDebugChannelPair | undefined\n}> {\n  const validationGeneration = shouldValidate\n    ? beginDevValidation(ctx.htmlRequestId)\n    : undefined\n\n  try {\n    const { setReactDebugChannel } = ctx.renderOpts\n\n    const {\n      cacheSignal,\n      prerenderResumeDataCache,\n      stageController,\n      environmentName,\n    } = setUpStagedDevRender(prefetchMode, navigationKind, requestStore)\n\n    let validationDebugChannel: AnyStream | undefined\n    const debugChannel = setReactDebugChannel && createNodeDebugChannel()\n    if (validationGeneration !== undefined && debugChannel) {\n      const debugChannelReplay = new ReplayableNodeStream(\n        debugChannel.clientSide.readable\n      )\n      debugChannel.clientSide.readable = debugChannelReplay.createReplayStream()\n      validationDebugChannel = debugChannelReplay.createReplayStream()\n    }\n\n    // The stage controller starts in the `Before` stage, where sync IO doesn't\n    // abort, so it's fine if it happens while creating the payload.\n    const rscPayload = await getPayload(requestStore)\n\n    const { stream, resultPromise } = await streamStagedRenderInDev({\n      prefetchMode,\n      ctx,\n      requestStore,\n      rscPayload,\n      stageController,\n      cacheSignal,\n      environmentName,\n      onError,\n      debugChannel,\n      navigationKind,\n      requestAbortSignal,\n    })\n\n    if (validationGeneration === undefined) {\n      logValidationSkipped(ctx)\n    }\n\n    // The render may record an invalid dynamic usage error (e.g. a request API\n    // used inside `'use cache'`). A cache-miss render records it while filling,\n    // so the verdict isn't final until the fills settle. Once the render has\n    // settled, forward any such error to the dev overlay: it's a real error\n    // from the render the user received, so it surfaces whether or not the\n    // route validates. When there is one the render isn't prod-representative,\n    // so validating it is pointless and we skip it; otherwise validation runs\n    // in the background (deferred there until the response has finished).\n    void resultPromise.then(\n      async (result) => {\n        if (result.hadCacheMiss) {\n          await cacheSignal.cacheReady()\n        }\n\n        const hadInvalidDynamicUsage = forwardInvalidDynamicUsageError(\n          ctx.workStore.invalidDynamicUsageError,\n          ctx\n        )\n\n        if (validationGeneration === undefined) {\n          return\n        }\n\n        if (hadInvalidDynamicUsage || validationGeneration.signal.aborted) {\n          if (validationGeneration.signal.aborted) {\n            logValidationAborted(ctx)\n          }\n          validationGeneration.finish()\n          return\n        }\n\n        runDevValidationInBackground(\n          prefetchMode,\n          navigationKind,\n          result,\n          requestStore,\n          validationDebugChannel,\n          ctx,\n          fallbackRouteParams,\n          prerenderResumeDataCache,\n          getDevRenderDidError,\n          createRequestStore,\n          getPayload,\n          onError,\n          validationGeneration\n        )\n      },\n      () => {\n        // The render itself rejected; there's nothing to forward or validate.\n        validationGeneration?.finish()\n      }\n    )\n\n    return { stream, debugChannel }\n  } catch (err) {\n    validationGeneration?.finish()\n    throw err\n  }\n}\n\ninterface AccumulatedStreamChunks {\n  readonly shellStaticChunks: Array<Uint8Array>\n  readonly staticChunks: Array<Uint8Array>\n  readonly shellRuntimeChunks: Array<Uint8Array>\n  readonly runtimeChunks: Array<Uint8Array>\n  readonly dynamicChunks: Array<Uint8Array>\n}\n\nfunction createStageChunksAccumulator(): AccumulatedStreamChunks {\n  return {\n    shellStaticChunks: [],\n    staticChunks: [],\n    shellRuntimeChunks: [],\n    runtimeChunks: [],\n    dynamicChunks: [],\n  }\n}\n\nasync function accumulateStreamChunks(\n  stream: AnyStream,\n  stageController: StagedRenderingController,\n  signal: AbortSignal | null\n): Promise<AccumulatedStreamChunks> {\n  const accumulator = createStageChunksAccumulator()\n  await accumulateStreamChunksInto(accumulator, stream, stageController, signal)\n  return accumulator\n}\n\nasync function accumulateStreamChunksInto(\n  accumulator: AccumulatedStreamChunks,\n  stream: AnyStream,\n  stageController: StagedRenderingController,\n  signal: AbortSignal | null\n): Promise<void> {\n  if (stream instanceof ReadableStream) {\n    const reader = stream.getReader()\n\n    let cancelled = false\n    function cancel() {\n      if (!cancelled) {\n        cancelled = true\n        reader.cancel()\n      }\n    }\n\n    if (signal) {\n      signal.addEventListener('abort', cancel, { once: true })\n    }\n\n    try {\n      while (!cancelled) {\n        const { done, value } = await reader.read()\n        if (done || cancelled) {\n          cancel()\n          break\n        }\n        collectStageChunk(accumulator, stageController.currentStage, value)\n      }\n    } catch (err) {\n      // When we cancel the reader we may reject the read.\n      // Only swallow errors caused by our intentional cancel();\n      // re-throw unexpected errors to avoid silently returning partial data.\n      if (!cancelled) {\n        throw err\n      }\n    }\n  } else {\n    const nodeStream = stream as Readable\n    let cancelled = false\n    function cancel() {\n      if (!cancelled) {\n        cancelled = true\n        nodeStream.destroy()\n      }\n    }\n\n    if (signal) {\n      signal.addEventListener('abort', cancel, { once: true })\n    }\n\n    try {\n      for await (const value of nodeStream) {\n        if (cancelled) break\n        collectStageChunk(accumulator, stageController.currentStage, value)\n      }\n    } catch (err) {\n      if (!cancelled) {\n        throw err\n      }\n    }\n  }\n}\n\nfunction collectStageChunk(\n  accumulator: AccumulatedStreamChunks,\n  stage: RenderStage,\n  value: Uint8Array\n): void {\n  switch (stage) {\n    case RenderStage.Before:\n      throw new InvariantError('Unexpected stream chunk while in Before stage')\n    case RenderStage.ShellStatic:\n      accumulator.shellStaticChunks.push(value)\n    // fall through\n    case RenderStage.Static:\n      accumulator.staticChunks.push(value)\n    // fall through\n    case RenderStage.ShellRuntime:\n      accumulator.shellRuntimeChunks.push(value)\n    // fall through\n    case RenderStage.Runtime:\n      accumulator.runtimeChunks.push(value)\n    // fall through\n    case RenderStage.Dynamic:\n      accumulator.dynamicChunks.push(value)\n      break\n    case RenderStage.Abandoned:\n      break\n    default:\n      stage satisfies never\n      break\n  }\n}\n\nasync function countShellAndStaticStageBytes(\n  stream: Readable,\n  stageController: StagedRenderingController\n): Promise<\n  Pick<StageByteLengths, RenderStage.ShellStatic | RenderStage.Static>\n> {\n  const byteLengths = createStageByteLengths()\n\n  // Abort the signal whenever we advance to the stage after static.\n  const abortController = new AbortController()\n  const endStage = getNextStage(RenderStage.Static)\n  stageController.onStage(endStage, abortController.abort.bind(abortController))\n\n  await countStageBytesUntilAbortNode(\n    byteLengths,\n    stream,\n    stageController,\n    abortController.signal\n  )\n  return byteLengths\n}\n\ntype StageByteLengths = Record<AdvanceableRenderStage, number>\n\nfunction createStageByteLengths(): StageByteLengths {\n  const result: Partial<StageByteLengths> = {}\n  for (const stage of RENDER_STAGE_ADVANCE_ORDER) {\n    result[stage] = 0\n  }\n  return result as StageByteLengths\n}\n\nasync function countStageBytesUntilAbortNode(\n  byteLengths: StageByteLengths,\n  stream: Readable,\n  stageController: StagedRenderingController,\n  abortSignal: AbortSignal\n): Promise<void> {\n  let cancelled = false\n  abortSignal.addEventListener(\n    'abort',\n    () => {\n      cancelled = true\n      stream.destroy()\n    },\n    { once: true }\n  )\n\n  try {\n    for await (const value of stream) {\n      if (cancelled) break\n      increaseChunkByteLengths(\n        byteLengths,\n        stageController.currentStage,\n        (value as Uint8Array).byteLength\n      )\n    }\n  } catch (err) {\n    if (!cancelled) {\n      throw err\n    }\n  }\n}\n\nfunction increaseChunkByteLengths(\n  byteLengths: StageByteLengths,\n  currentStage: RenderStage,\n  length: number\n) {\n  if (!isAdvanceableRenderStage(currentStage)) {\n    return\n  }\n  // Later stages include earlier stages, so we increment\n  // the byte count for all that are `>= currentStage`.\n  // Iterate in reverse so we don't have to skip the earlier ones.\n  for (let i = RENDER_STAGE_ADVANCE_ORDER.length - 1; i >= 0; i--) {\n    const stage = RENDER_STAGE_ADVANCE_ORDER[i]\n    if (stage < currentStage) {\n      break\n    }\n    byteLengths[stage] += length\n  }\n}\n\nfunction createAsyncApiPromises(\n  stagedRendering: StagedRenderingController,\n  cookies: RequestStore['cookies'],\n  mutableCookies: RequestStore['mutableCookies'],\n  headers: RequestStore['headers']\n): NonNullable<RequestStore['asyncApiPromises']> {\n  // NOTE: Must be kept in sync with cookies.ts, headers.ts, params.ts, search-params.ts\n  const cookiesStage = RENDER_STAGES_BY_DATA_KIND.sessionData\n  const headersStage = RENDER_STAGES_BY_DATA_KIND.sessionData\n  const paramsStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData\n  const searchParamsStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData\n\n  return {\n    cookies: stagedRendering.delayUntilStage(cookiesStage, 'cookies', cookies),\n    mutableCookies: stagedRendering.delayUntilStage(\n      cookiesStage,\n      'cookies',\n      mutableCookies as RequestStore['cookies']\n    ),\n    headers: stagedRendering.delayUntilStage(headersStage, 'headers', headers),\n\n    // These are not used directly, but we chain other `params`/`searchParams` promises off of them.\n    sharedParamsParent: stagedRendering.delayUntilStage(\n      paramsStage,\n      undefined,\n      '<internal params>'\n    ),\n    sharedSearchParamsParent: stagedRendering.delayUntilStage(\n      searchParamsStage,\n      undefined,\n      '<internal searchParams>'\n    ),\n\n    connection: stagedRendering.delayUntilStage(\n      RenderStage.Dynamic,\n      'connection',\n      undefined\n    ),\n    io: stagedRendering.delayUntilStage(RenderStage.Dynamic, 'io', undefined),\n  }\n}\n\n/**\n * Logs the given messages, and sends the error instances to the browser as an\n * RSC stream, where they can be deserialized and logged (or otherwise presented\n * in the devtools), while leveraging React's capabilities to not only\n * source-map the stack frames (via findSourceMapURL), but also create virtual\n * server modules that allow users to inspect the server source code in the\n * browser.\n */\nasync function logMessagesAndSendErrorsToBrowser(\n  messages: unknown[],\n  ctx: AppRenderContext\n): Promise<void> {\n  const { htmlRequestId, renderOpts } = ctx\n  const { sendErrorsToBrowser } = renderOpts\n\n  const errors: Error[] = []\n  for (const message of messages) {\n    // Log the error to the CLI. Prevent the logs from being dimmed, which we\n    // apply for other logs during the spawned validation.\n    consoleAsyncStorage.exit(() => {\n      console.error(message)\n    })\n\n    // Error instances are also sent to the browser. We're currently using a\n    // non-Error message only in debug build mode as a message that is only\n    // meant for the CLI. FIXME: This is a bit spooky action at a distance. We\n    // should maybe have a more explicit way of determining which messages\n    // should be sent to the browser. Regardless, only real errors with a proper\n    // stack make sense to be \"replayed\" in the browser.\n    if (message instanceof Error) {\n      errors.push(message)\n    }\n  }\n\n  if (errors.length > 0) {\n    if (!sendErrorsToBrowser) {\n      throw new InvariantError(\n        'Expected `sendErrorsToBrowser` to be defined in renderOpts.'\n      )\n    }\n\n    // Build a Map of error → error code for errors that have one.\n    // React doesn't revive __NEXT_ERROR_CODE during RSC deserialization, so we\n    // send it as a side-channel Map. RSC preserves object identity, so the\n    // deserialized Map keys will reference the same Error objects.\n    const errorCodes = new Map<Error, string>()\n    for (const err of errors) {\n      const code = extractNextErrorCode(err)\n      if (code !== undefined) {\n        errorCodes.set(err, code)\n      }\n    }\n\n    const { clientModules } = getClientReferenceManifest()\n\n    let errorsFlightStream: AnyStream\n    if (process.env.__NEXT_USE_NODE_STREAMS) {\n      errorsFlightStream = renderToNodeFlightStream(\n        ctx.componentMod,\n        { errors, errorCodes },\n        clientModules,\n        { filterStackFrame }\n      )\n    } else {\n      errorsFlightStream = renderToWebFlightStream(\n        ctx.componentMod,\n        { errors, errorCodes },\n        clientModules,\n        { filterStackFrame }\n      )\n    }\n\n    sendErrorsToBrowser(errorsFlightStream, htmlRequestId)\n  }\n}\n\nfunction logValidationSkipped(ctx: AppRenderContext) {\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    const requestId = ctx.requestId\n    const url = ctx.url.href\n    console.log(\n      formatValidationEvent({ type: 'validation_start', requestId, url })\n    )\n    console.log(\n      formatValidationEvent({ type: 'validation_end', requestId, url })\n    )\n  }\n}\n\nfunction logValidationAborted(ctx: AppRenderContext) {\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    const requestId = ctx.requestId\n    const url = ctx.url.href\n    console.log(\n      formatValidationEvent({ type: 'validation_aborted', requestId, url })\n    )\n  }\n}\n\n/**\n * Runs a dev validation `run` callback (the render plus the error delivery),\n * enclosing it in the `validation_start` / `validation_end` /\n * `validation_aborted` lifecycle markers that E2E tests read from the CLI\n * output. The markers must enclose delivery as well as the render, so tests\n * that assert the error between the markers capture it. Also applies the\n * `NEXT_TEST_DEV_VALIDATION_DELAY_MS` hook that keeps validation in flight for\n * scheduler tests. All of this is test-mode only; otherwise `run` is invoked\n * directly.\n */\nasync function runWithDevValidationLogging(\n  ctx: AppRenderContext,\n  validationAbortSignal: AbortSignal,\n  run: () => Promise<void>\n): Promise<void> {\n  if (!(process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION)) {\n    return run()\n  }\n\n  const requestId = ctx.requestId\n  const url = ctx.url.href\n  const responseFinished =\n    !isNodeNextResponse(ctx.res) || ctx.res.originalResponse.writableFinished\n\n  console.log(\n    formatValidationEvent({\n      type: 'validation_start',\n      requestId,\n      url,\n      responseFinished,\n    })\n  )\n\n  try {\n    // Keep validation in flight for scheduler E2E tests without relying on\n    // timing-sensitive user code. Aborts end the delay immediately.\n    const validationDelay = Number(\n      process.env.NEXT_TEST_DEV_VALIDATION_DELAY_MS\n    )\n\n    if (\n      Number.isFinite(validationDelay) &&\n      validationDelay > 0 &&\n      !validationAbortSignal.aborted\n    ) {\n      await new Promise<void>((resolve) => {\n        let timeout: NodeJS.Timeout\n        const finishDelay = () => {\n          clearTimeout(timeout)\n          validationAbortSignal.removeEventListener('abort', finishDelay)\n          resolve()\n        }\n        timeout = setTimeout(finishDelay, validationDelay)\n        validationAbortSignal.addEventListener('abort', finishDelay, {\n          once: true,\n        })\n      })\n    }\n\n    if (!validationAbortSignal.aborted) {\n      await run()\n    }\n  } finally {\n    if (validationAbortSignal.aborted) {\n      logValidationAborted(ctx)\n    } else {\n      console.log(\n        formatValidationEvent({ type: 'validation_end', requestId, url })\n      )\n    }\n  }\n}\n\n/**\n * The slice of the render context the dev/build validation passes read. Both\n * the in-process callers and the validation worker build one of these, so it\n * names exactly what validation depends on and nothing else: no live\n * request/response objects that can't be rebuilt off the main thread.\n * `isDebugChannelEnabled` is the derived flag validation uses in place of the\n * main render's `setReactDebugChannel` callback (validation only ever read that\n * callback's presence as a boolean).\n */\nexport type ValidationRenderContext = Pick<\n  AppRenderContext,\n  | 'componentMod'\n  | 'getDynamicParamFromSegment'\n  | 'query'\n  | 'implicitTags'\n  | 'nonce'\n  | 'workStore'\n> & {\n  renderOpts: Pick<RenderOpts, 'images' | 'allowEmptyStaticShell'>\n  isDebugChannelEnabled: boolean\n}\n\n/**\n * Projects a full app render context down to the slice validation reads. The\n * in-process dev and build callers hold an `AppRenderContext` and use this to\n * hand validation exactly what it needs; the worker builds the same shape from\n * its snapshot instead.\n */\nexport function toValidationRenderContext(\n  ctx: AppRenderContext\n): ValidationRenderContext {\n  return {\n    componentMod: ctx.componentMod,\n    getDynamicParamFromSegment: ctx.getDynamicParamFromSegment,\n    query: ctx.query,\n    implicitTags: ctx.implicitTags,\n    nonce: ctx.nonce,\n    workStore: ctx.workStore,\n    renderOpts: {\n      images: ctx.renderOpts.images,\n      allowEmptyStaticShell: ctx.renderOpts.allowEmptyStaticShell,\n    },\n    isDebugChannelEnabled: !!ctx.renderOpts.setReactDebugChannel,\n  }\n}\n\n/**\n * Rebuilds the `WorkStore` the worker's dev validation runs under from the\n * transported snapshot, carrying only the fields the validation passes read.\n * `after()` callbacks are routed into a throwaway `AfterContext` whose hooks\n * no-op, because the validation render must not repeat those side effects, and\n * `after()` can't affect the rendered output.\n */\nfunction buildDevValidationWorkStore(\n  message: DevValidationWorkerMessage\n): WorkStore {\n  const { AfterContext } =\n    require('../after/after-context') as typeof import('../after/after-context')\n\n  const noopAfterContext = new AfterContext({\n    waitUntil(promise) {\n      promise.catch(() => {})\n    },\n    onClose() {},\n    onTaskError() {},\n  })\n\n  return {\n    isStaticGeneration: false,\n    page: message.page,\n    route: message.route,\n    forceStatic: message.forceStatic,\n    isDraftMode: message.request.isDraftMode,\n    useCacheTimeout: message.nextConfigSerializable.useCacheTimeout,\n    staticPageGenerationTimeout:\n      message.nextConfigSerializable.staticPageGenerationTimeout,\n    cacheLifeProfiles: message.nextConfigSerializable.cacheLifeProfiles,\n    buildId: message.buildId,\n    deploymentId: message.deploymentId,\n    requestStartTime: message.request.requestStartTime,\n    previouslyRevalidatedTags: [],\n    refreshTagsByCacheKind: new Map(),\n    runInCleanSnapshot: createSnapshot(),\n    shouldTrackFetchMetrics: false,\n    reactServerErrorsByDigest: new Map(),\n    afterContext: noopAfterContext,\n    // Dev validation only ever runs under Cache Components.\n    cacheComponentsEnabled: true,\n    validationLevel: message.validationLevel,\n  }\n}\n\n/**\n * Revives one serialized validation input into the in-memory shape\n * `runValidationInDev` consumes, binding it to the rebuilt request store.\n */\nfunction toDevValidationInputs(\n  serialized: SerializedValidationInputs,\n  requestStore: RequestStore\n): ResolvedValidationInputs {\n  return {\n    accumulatedChunks: serialized.accumulatedChunks,\n    startTime: serialized.startTime,\n    stageEndTimes: serialized.stageEndTimes,\n    requestStore,\n    debugChannelClient: serialized.debugChunks\n      ? createNodeStreamFromChunks(serialized.debugChunks)\n      : undefined,\n  }\n}\n\n/**\n * Worker entry point for Cached Components dev validation, reached from the\n * validation worker via `ComponentMod.routeModule.runValidationInDev`. The\n * worker reloads the route's compiled module and calls this so the entire\n * validation (Flight re-encodes and the client prerenders) runs inside the\n * app-page bundle's single React instance, alongside the user's client\n * components. It rebuilds the render context, work store, and request store\n * from the transported snapshot (the live objects can't cross a thread) and\n * returns the validation errors for the worker to serialize and the main thread\n * to deliver.\n */\nexport async function runValidationInDevFromSnapshot(\n  message: DevValidationWorkerMessage,\n  componentMod: AppPageModule,\n  abortSignal: AbortSignal\n): Promise<Array<unknown> | undefined> {\n  // Expose the reloaded route's bundler `require` / `loadChunk` on `globalThis`\n  // so `react-server-dom-*` can resolve client references during the validation\n  // prerenders, exactly as the main render does after loading its module.\n  if (componentMod.__next_app__) {\n    installGlobalModuleLoadingHandlers(componentMod, true, false)\n  }\n\n  // `requestFallbackRouteParams` reproduces `ctx.getDynamicParamFromSegment`\n  // exactly, so the depth-loop segment keys match the seed render's Flight.\n  // `fallbackRouteParams` is separate and only marks params unknown in the\n  // prerender stores.\n  //\n  // TODO: Those two fallback params sets are very confusing in the whole code\n  // base. We should maybe refactor this to make their different roles clearer.\n  const { requestFallbackRouteParams, fallbackRouteParams } = message\n\n  const getDynamicParamFromSegment = makeGetDynamicParamFromSegment(\n    message.interpolatedParams,\n    requestFallbackRouteParams,\n    message.optimisticRouting\n  )\n\n  const implicitTags: ImplicitTags = {\n    tags: message.implicitTags,\n    expirationsByCacheKind: new Map(),\n  }\n\n  const workStore = buildDevValidationWorkStore(message)\n\n  const ctx: ValidationRenderContext = {\n    componentMod,\n    getDynamicParamFromSegment,\n    query: message.query,\n    implicitTags,\n    nonce: message.nonce,\n    workStore,\n    renderOpts: {\n      images: message.renderOpts.images,\n      allowEmptyStaticShell: message.renderOpts.allowEmptyStaticShell,\n    },\n    isDebugChannelEnabled: message.isDebugChannelEnabled,\n  }\n\n  const requestStore = createRequestStoreFromInputs({\n    phase: 'render',\n    headers: new Headers(message.request.headers),\n    onUpdateCookies: undefined,\n    url: {\n      pathname: message.request.urlPathname,\n      search: message.request.urlSearch,\n    },\n    rootParams: message.request.rootParams,\n    implicitTags,\n    resumeDataCache: null,\n    previewProps: undefined,\n    isHmrRefresh: message.request.isHmrRefresh,\n    hmrRefreshHash: message.request.hmrRefreshHash,\n    serverComponentsHmrCache: undefined,\n    fallbackParams: requestFallbackRouteParams,\n  })\n\n  const staticInputs = toDevValidationInputs(message.staticInputs, requestStore)\n\n  const instantInputs = message.instantInputs\n    ? toDevValidationInputs(message.instantInputs, requestStore)\n    : null\n\n  return workAsyncStorage.run(\n    workStore,\n    runValidationInDev,\n    message.prefetchMode,\n    instantInputs,\n    staticInputs,\n    ctx,\n    fallbackRouteParams,\n    message.devRenderDidError,\n    abortSignal\n  )\n}\n\n/**\n * This function is a fork of prerenderToStream cacheComponents branch.\n * While it doesn't return a stream we want it to have identical\n * prerender semantics to prerenderToStream and should update it\n * in conjunction with any changes to that function.\n */\nasync function runValidationInDev(\n  prefetchMode: PrefetchingMode,\n  instantInputs: ResolvedValidationInputs | null,\n  staticInputs: ResolvedValidationInputs,\n  ctx: ValidationRenderContext,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  devRenderDidError: boolean,\n  validationAbortSignal: AbortSignal\n): Promise<Array<unknown> | undefined> {\n  const { componentMod: ComponentMod, getDynamicParamFromSegment } = ctx\n  const loaderTree = ComponentMod.routeModule.userland.loaderTree\n  const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  const needsInstantValidation =\n    await anySegmentNeedsInstantValidationInDev(loaderTree)\n\n  // `samples` from instant config are only used during build\n  const validationSamples = null\n  const validationSampleTracking = null\n\n  //================================\n  // Client module warmup\n  //================================\n  {\n    // For warmup, we have to use the shared inputs if present -- the static inputs\n    // may not have a proper dynamic stage.\n    const { runtimeChunks, dynamicChunks } = (instantInputs ?? staticInputs)\n      .accumulatedChunks\n\n    // First we warmup SSR with the runtime chunks. This ensures that when we do\n    // the full prerender pass with dynamic tracking module loading won't\n    // interrupt the prerender and can properly observe the entire content\n    await warmupClientModulesForStagedValidation(\n      // if we're going to be validating prefetches, we'll be rendering some segments in the dynamic stage.\n      // otherwise, for static shell validation, we only need to warm up to the runtime stage.\n      // we also need to use a different store type, because instant validation allows more APIs to resolve.\n      needsInstantValidation ? 'validation-client' : 'prerender-client',\n      needsInstantValidation ? dynamicChunks : runtimeChunks,\n      dynamicChunks,\n      rootParams,\n      fallbackRouteParams,\n      ctx,\n      validationSamples,\n      validationSampleTracking,\n      validationAbortSignal\n    )\n  }\n\n  // React renders used by validation can occupy an entire event-loop turn.\n  // Yield between them so a newer navigation can enter app rendering,\n  // supersede this validation, and avoid waiting for all remaining attempts.\n  if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n    return\n  }\n\n  // instantInputs and staticInputs may be the same,\n  // so we have to make sure we only consume the debug channel once.\n  let cachedDebugChunks = new WeakMap<AnyStream, Uint8Array[]>()\n  const getDebugChunksOnce = async (\n    channel: AnyStream\n  ): Promise<Uint8Array[]> => {\n    let chunks = cachedDebugChunks.get(channel)\n    if (!chunks) {\n      cachedDebugChunks.set(\n        channel,\n        (chunks = await collectDebugChunksFromClientChannel(channel))\n      )\n    }\n    return chunks\n  }\n\n  //================================\n  // Static shell validation\n  //================================\n  {\n    // The request may have been aborted during the client module warmup above.\n    if (validationAbortSignal.aborted) {\n      return\n    }\n\n    const inputs = staticInputs\n\n    const debugChunks = inputs.debugChannelClient\n      ? await getDebugChunksOnce(inputs.debugChannelClient)\n      : null\n    const hmrRefreshHash = getHmrRefreshHash(inputs.requestStore)\n\n    const result = await validateStaticShell(\n      inputs,\n      ctx,\n      rootParams,\n      fallbackRouteParams,\n      debugChunks,\n      hmrRefreshHash,\n      validationAbortSignal\n    )\n    // A newer render superseded this validation while its render ran, so its\n    // result is stale. Don't surface errors for a page the user left.\n    if (validationAbortSignal.aborted) {\n      return\n    }\n    if (result.length > 0) {\n      if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n        return\n      }\n      return result\n    }\n  }\n\n  //================================\n  // Instant validation\n  //================================\n  if (needsInstantValidation && instantInputs) {\n    if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n      return\n    }\n\n    const inputs = instantInputs\n\n    const debugChunks = inputs.debugChannelClient\n      ? await getDebugChunksOnce(inputs.debugChannelClient)\n      : null\n    const hmrRefreshHash = getHmrRefreshHash(inputs.requestStore)\n\n    const result = await validateInstantConfigs(\n      prefetchMode,\n      inputs.accumulatedChunks,\n      debugChunks,\n      inputs.startTime,\n      inputs.stageEndTimes,\n      rootParams,\n      fallbackRouteParams,\n      ctx,\n      hmrRefreshHash,\n      validationSamples,\n      devRenderDidError,\n      validationAbortSignal\n    )\n\n    // A newer render superseded this work. Don't surface stale validation\n    // errors for a page the user left.\n    if (validationAbortSignal.aborted) {\n      return\n    }\n    if (result.length > 0) {\n      if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n        return\n      }\n      return result\n    }\n  }\n}\n\nasync function collectDebugChunksFromClientChannel(debugChannel: AnyStream) {\n  const debugChunks: Uint8Array[] = []\n  for await (const c of debugChannel) {\n    debugChunks.push(c)\n  }\n  return debugChunks\n}\n\nasync function validateStaticShell(\n  inputs: ResolvedValidationInputs,\n  ctx: ValidationRenderContext,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  debugChunks: Uint8Array[] | null,\n  hmrRefreshHash: string | undefined,\n  validationAbortSignal: AbortSignal\n): Promise<unknown[]> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  debug?.(`Starting static shell validation...`)\n\n  const { componentMod: ComponentMod, renderOpts } = ctx\n\n  const loaderTree = ComponentMod.routeModule.userland.loaderTree\n\n  const { accumulatedChunks, stageEndTimes } = inputs\n  const { staticChunks, runtimeChunks, dynamicChunks } = accumulatedChunks\n\n  const allowEmptyStaticShell =\n    (renderOpts.allowEmptyStaticShell ?? false) ||\n    (await isPageAllowedToBlock(loaderTree))\n\n  const runtimeResult = await validateStagedShell(\n    runtimeChunks,\n    dynamicChunks,\n    debugChunks,\n    stageEndTimes[RenderStage.Runtime],\n    rootParams,\n    fallbackRouteParams,\n    allowEmptyStaticShell,\n    ctx,\n    hmrRefreshHash,\n    trackDynamicHoleInRuntimeShell,\n    validationAbortSignal\n  )\n\n  if (runtimeResult.length > 0) {\n    debug?.(`❌ Failed - ${runtimeResult.length} errors from runtime stage`)\n    // We have something to report from the runtime validation\n    // We can skip the rest\n    return runtimeResult\n  }\n\n  if (!(await yieldToForegroundRequest(validationAbortSignal))) {\n    return []\n  }\n\n  const staticResult = await validateStagedShell(\n    staticChunks,\n    dynamicChunks,\n    debugChunks,\n    stageEndTimes[RenderStage.Static],\n    rootParams,\n    fallbackRouteParams,\n    allowEmptyStaticShell,\n    ctx,\n    hmrRefreshHash,\n    trackDynamicHoleInStaticShell,\n    validationAbortSignal\n  )\n\n  if (staticResult.length > 0) {\n    debug?.(`❌ Failed - ${staticResult.length} errors from static stage`)\n    // We have something to report from the static validation\n    // We can skip the rest\n    return staticResult\n  }\n  debug?.(`✅ Passed`)\n  return []\n}\n\nasync function warmupClientModulesForStagedValidation(\n  storeType: PrerenderStoreModernClient['type'] | ValidationStoreClient['type'],\n  partialServerChunks: Array<Uint8Array>,\n  allServerChunks: Array<Uint8Array>,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  ctx: ValidationRenderContext,\n  validationSamples: ValidationStoreClient['validationSamples'],\n  validationSampleTracking: ValidationStoreClient['validationSampleTracking'],\n  validationAbortSignal?: AbortSignal\n) {\n  const { implicitTags, nonce, workStore } = ctx\n\n  // Warmup SSR\n  const initialClientPrerenderController = new AbortController()\n  const initialClientReactController = new AbortController()\n  const initialClientRenderController = new AbortController()\n  const initialClientReactSignal =\n    validationAbortSignal === undefined\n      ? initialClientReactController.signal\n      : AbortSignal.any([\n          initialClientReactController.signal,\n          validationAbortSignal,\n        ])\n\n  const preinitScripts = () => {}\n  const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n  let initialClientPrerenderStore: PrerenderStore\n  if (storeType === 'prerender-client') {\n    const store: PrerenderStoreModernClient = {\n      type: 'prerender-client',\n      phase: 'render',\n      rootParams,\n      fallbackRouteParams,\n      implicitTags,\n      renderSignal: initialClientRenderController.signal,\n      controller: initialClientPrerenderController,\n      // For HTML Generation the only cache tracked activity\n      // is module loading, which has it's own cache signal\n      cacheSignal: null,\n      dynamicTracking: null,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      // TODO should this be removed from client stores?\n      resumeDataCache: null,\n      hmrRefreshHash: undefined,\n      // Client prerenders don't track server param access\n      varyParamsAccumulator: null,\n    }\n    initialClientPrerenderStore = store\n  } else {\n    const store: ValidationStoreClient = {\n      type: 'validation-client',\n      phase: 'render',\n      rootParams,\n      implicitTags,\n      renderSignal: initialClientRenderController.signal,\n      controller: initialClientPrerenderController,\n      // For HTML Generation the only cache tracked activity\n      // is module loading, which has it's own cache signal\n      cacheSignal: null,\n      dynamicTracking: null,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      // TODO should this be removed from client stores?\n      resumeDataCache: null,\n      hmrRefreshHash: undefined,\n      // Client prerenders don't track server param access\n      varyParamsAccumulator: null,\n      // We're not rendering any validation boundaries yet.\n      boundaryState: null,\n      validationSamples,\n      validationSampleTracking,\n      fallbackRouteParams,\n    }\n    initialClientPrerenderStore = store\n  }\n\n  // TODO: maybe conditionally switch between runtime chunks and all chunks?\n  // but warming too much should always be fine, just not always necessary\n  const serverStream = createNodeStreamWithLateRelease(\n    partialServerChunks,\n    allServerChunks,\n    initialClientReactSignal\n  )\n\n  const pendingInitialClientResult = workUnitAsyncStorage.run(\n    initialClientPrerenderStore,\n    getClientPrerender,\n    // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n    <App\n      reactServerStream={serverStream}\n      reactDebugStream={undefined}\n      debugEndTime={undefined}\n      preinitScripts={preinitScripts}\n      ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n      nonce={nonce}\n      images={ctx.renderOpts.images}\n    />,\n    {\n      signal: initialClientReactSignal,\n      onError: (err: unknown) => {\n        const digest = getDigestForWellKnownError(err)\n\n        if (digest) {\n          return digest\n        }\n\n        if (isReactLargeShellError(err)) {\n          // TODO: Aggregate\n          console.error(err)\n          return undefined\n        }\n\n        if (initialClientReactSignal.aborted) {\n          // These are expected errors that might error the prerender. we ignore them.\n        } else if (\n          process.env.NEXT_DEBUG_BUILD ||\n          process.env.__NEXT_VERBOSE_LOGGING\n        ) {\n          // We don't normally log these errors because we are going to retry anyway but\n          // it can be useful for debugging Next.js itself to get visibility here when needed\n          printDebugThrownValueForProspectiveRender(\n            err,\n            workStore.route,\n            Phase.ProspectiveRender\n          )\n        }\n      },\n      // We don't need bootstrap scripts in this prerender\n      // bootstrapScripts: [bootstrapScript],\n    }\n  )\n\n  // The listener to abort our own render controller must be added after React\n  // has added its listener, to ensure that pending I/O is not\n  // aborted/rejected too early.\n  initialClientReactSignal.addEventListener(\n    'abort',\n    () => {\n      initialClientRenderController.abort()\n    },\n    { once: true }\n  )\n\n  pendingInitialClientResult.catch((err: unknown) => {\n    if (initialClientReactSignal.aborted || isPrerenderInterruptedError(err)) {\n      // These are expected errors that might error the prerender. we ignore them.\n    } else if (\n      process.env.NEXT_DEBUG_BUILD ||\n      process.env.__NEXT_VERBOSE_LOGGING\n    ) {\n      // We don't normally log these errors because we are going to retry anyway but\n      // it can be useful for debugging Next.js itself to get visibility here when needed\n      printDebugThrownValueForProspectiveRender(\n        err,\n        workStore.route,\n        Phase.ProspectiveRender\n      )\n    }\n  })\n\n  // This is mostly needed for dynamic `import()`s in client components.\n  // Promises passed to client were already awaited above (assuming that they came from cached functions)\n  const cacheSignal = new CacheSignal()\n  trackPendingModules(cacheSignal)\n  await cacheSignal.cacheReady()\n  workUnitAsyncStorage.run(\n    initialClientPrerenderStore,\n    initialClientReactController.abort.bind(initialClientReactController)\n  )\n}\n\nasync function validateStagedShell(\n  stageChunks: Array<Uint8Array>,\n  allServerChunks: Array<Uint8Array>,\n  debugChunks: null | Array<Uint8Array>,\n  debugEndTime: number | undefined,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  allowEmptyStaticShell: boolean,\n  ctx: ValidationRenderContext,\n  hmrRefreshHash: string | undefined,\n  trackDynamicHole:\n    | typeof trackDynamicHoleInStaticShell\n    | typeof trackDynamicHoleInRuntimeShell,\n  validationAbortSignal: AbortSignal\n): Promise<Array<unknown>> {\n  const { implicitTags, nonce, workStore } = ctx\n\n  const clientDynamicTracking = createDynamicTrackingState(\n    false //isDebugDynamicAccesses\n  )\n  const clientReactController = new AbortController()\n  const clientRenderController = new AbortController()\n  const clientReactSignal = AbortSignal.any([\n    clientReactController.signal,\n    validationAbortSignal,\n  ])\n\n  const preinitScripts = () => {}\n  const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n  const finalClientPrerenderStore: PrerenderStore = {\n    type: 'prerender-client',\n    phase: 'render',\n    rootParams,\n    fallbackRouteParams,\n    implicitTags,\n    renderSignal: clientRenderController.signal,\n    controller: clientReactController,\n    // No APIs require a cacheSignal through the workUnitStore during the HTML prerender\n    cacheSignal: null,\n    dynamicTracking: clientDynamicTracking,\n    revalidate: INFINITE_CACHE,\n    expire: INFINITE_CACHE,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    // TODO should this be removed from client stores?\n    resumeDataCache: null,\n    hmrRefreshHash,\n    // Client prerenders don't track server param access\n    varyParamsAccumulator: null,\n  }\n\n  const dynamicValidation = createDynamicValidationState()\n\n  const serverStream = createNodeStreamWithLateRelease(\n    stageChunks,\n    allServerChunks,\n    clientReactSignal\n  )\n\n  const debugChannelClient = debugChunks\n    ? createNodeStreamWithLateRelease(\n        debugChunks,\n        debugChunks,\n        clientReactSignal\n      )\n    : undefined\n\n  try {\n    let { prelude: unprocessedPrelude } = await runInSequentialTasks(\n      () => {\n        const pendingFinalClientResult = workUnitAsyncStorage.run(\n          finalClientPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n          <App\n            reactServerStream={serverStream}\n            reactDebugStream={debugChannelClient}\n            debugEndTime={debugEndTime}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            signal: clientReactSignal,\n            onError: (err: unknown, errorInfo: ErrorInfo) => {\n              if (\n                isPrerenderInterruptedError(err) ||\n                clientReactSignal.aborted\n              ) {\n                const componentStack = errorInfo.componentStack\n                if (typeof componentStack === 'string') {\n                  trackDynamicHole(\n                    err,\n                    workStore,\n                    componentStack,\n                    dynamicValidation,\n                    clientDynamicTracking\n                  )\n                }\n                return\n              }\n\n              if (isReactLargeShellError(err)) {\n                // TODO: Aggregate\n                console.error(err)\n                return undefined\n              }\n\n              return getDigestForWellKnownError(err)\n            },\n            // We don't need bootstrap scripts in this prerender\n            // bootstrapScripts: [bootstrapScript],\n          }\n        )\n\n        // The listener to abort our own render controller must be added after\n        // React has added its listener, to ensure that pending I/O is not\n        // aborted/rejected too early.\n        clientReactSignal.addEventListener(\n          'abort',\n          () => {\n            clientRenderController.abort()\n          },\n          { once: true }\n        )\n\n        return pendingFinalClientResult\n      },\n      () => {\n        workUnitAsyncStorage.run(\n          finalClientPrerenderStore,\n          clientReactController.abort.bind(clientReactController)\n        )\n      }\n    )\n\n    const { preludeIsEmpty } = await processPreludeOp(unprocessedPrelude)\n    return getStaticShellDisallowedDynamicReasons(\n      workStore,\n      preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n      dynamicValidation,\n      allowEmptyStaticShell\n    )\n  } catch (thrownValue) {\n    // Even if the root errors we still want to report any cache components errors\n    // that were discovered before the root errored.\n    let errors: Array<unknown> = getStaticShellDisallowedDynamicReasons(\n      workStore,\n      PreludeState.Errored,\n      dynamicValidation,\n      allowEmptyStaticShell\n    )\n\n    if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n      errors.unshift(\n        'During dynamic validation the root of the page errored. The next logged error is the thrown value. It may be a duplicate of errors reported during the normal development mode render.',\n        thrownValue\n      )\n    }\n\n    return errors\n  }\n}\n\n/**\n * Validates instant configs by iterating URL depths from deepest to\n * shallowest. At each depth, builds a combined payload where segments\n * above the boundary use Dynamic stage (already mounted) and segments\n * below use Static/Runtime stage (being prefetched). If the new subtree\n * contains any `instant` configs, the payload is rendered to\n * detect dynamic holes without Suspense.\n */\nasync function validateInstantConfigs(\n  prefetchMode: PrefetchingMode,\n  accumulatedChunks: AccumulatedStreamChunks,\n  debugChunks: null | Array<Uint8Array>,\n  startTime: number,\n  stageEndTimes: StageEndTimes,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  ctx: ValidationRenderContext,\n  hmrRefreshHash: string | undefined,\n  validationSamples: ValidationStoreClient['validationSamples'] | null,\n  devRenderDidError: boolean,\n  validationAbortSignal?: AbortSignal\n): Promise<Array<unknown>> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  const {\n    createCombinedPayloadAtDepth,\n    createCombinedPayloadStream,\n    collectStagedSegmentData,\n    discoverValidationDepths,\n    ValidationPrefetchKind,\n  } = ctx.componentMod.InstantValidation()!\n\n  const { createValidationSampleTracking } =\n    require('./instant-validation/instant-samples') as typeof import('./instant-validation/instant-samples')\n\n  debug?.('\\nStarting depth-based instant validation...')\n\n  const prefetchKind =\n    prefetchMode === PrefetchingMode.Partial\n      ? ValidationPrefetchKind.Shell\n      : ValidationPrefetchKind.LegacySpeculative\n\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n\n  const clientReferenceManifest = getClientReferenceManifest()\n\n  const renderFlightStream = process.env.__NEXT_USE_NODE_STREAMS\n    ? renderToNodeFlightStream\n    : renderToWebFlightStream\n  const createDebugChannel = process.env.__NEXT_USE_NODE_STREAMS\n    ? createNodeDebugChannel\n    : createWebDebugChannel\n\n  const { cache, payload: initialRscPayload } = await collectStagedSegmentData(\n    prefetchKind,\n    ctx.componentMod,\n    renderFlightStream,\n    {\n      [RenderStage.Static]: accumulatedChunks.staticChunks,\n      [RenderStage.ShellRuntime]: accumulatedChunks.shellRuntimeChunks,\n      [RenderStage.Runtime]: accumulatedChunks.runtimeChunks,\n      [RenderStage.Dynamic]: accumulatedChunks.dynamicChunks,\n    },\n    debugChunks,\n    startTime,\n    stageEndTimes,\n    clientReferenceManifest,\n    createDebugChannel\n  )\n\n  const { implicitTags, nonce, workStore, isDebugChannelEnabled } = ctx\n\n  async function validateAtDepth(\n    depth: number,\n    groupDepthForValidation: number\n  ): Promise<null | NavigationValidationResult> {\n    return validateAtDepthImpl(depth, groupDepthForValidation, null)\n  }\n\n  async function validateAtDepthImpl(\n    depth: number,\n    groupDepthForValidation: number,\n    previousBoundaryState: null | ValidationBoundaryTracking\n  ): Promise<null | NavigationValidationResult> {\n    if (validationAbortSignal?.aborted) {\n      return null\n    }\n\n    const extraChunksController = new AbortController()\n    const extraChunksSignal =\n      validationAbortSignal === undefined\n        ? extraChunksController.signal\n        : AbortSignal.any([extraChunksController.signal, validationAbortSignal])\n\n    const boundaryState = createValidationBoundaryTracking()\n    let useRuntimeStageForPartialSegments = false\n    if (previousBoundaryState) {\n      // We're doing a followup render to better discriminate error types\n      useRuntimeStageForPartialSegments = true\n      for (const [id, filePath] of previousBoundaryState.requiredIds) {\n        boundaryState.requiredIds.set(id, filePath)\n      }\n    }\n\n    const payloadResult = await createCombinedPayloadAtDepth(\n      prefetchKind,\n      initialRscPayload,\n      cache,\n      loaderTree,\n      ctx.getDynamicParamFromSegment,\n      ctx.query,\n      depth,\n      groupDepthForValidation,\n      extraChunksSignal,\n      boundaryState,\n      clientReferenceManifest,\n      useRuntimeStageForPartialSegments\n    )\n\n    if (payloadResult === null) {\n      return null\n    }\n\n    const reactController = new AbortController()\n    const renderController = new AbortController()\n    const reactSignal =\n      validationAbortSignal === undefined\n        ? reactController.signal\n        : AbortSignal.any([reactController.signal, validationAbortSignal])\n    const preinitScripts = () => {}\n    const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n    const { stream: serverStream, debugStream } =\n      await createCombinedPayloadStream(\n        ctx.componentMod,\n        renderFlightStream,\n        payloadResult.payload,\n        extraChunksController,\n        reactSignal,\n        clientReferenceManifest,\n        startTime,\n        isDebugChannelEnabled,\n        createDebugChannel\n      )\n\n    const instantValidationState = createInstantValidationState(\n      payloadResult.slotStacks\n    )\n\n    const validationSampleTracking =\n      validationSamples !== null ? createValidationSampleTracking() : null\n\n    const clientDynamicTracking = createDynamicTrackingState(false)\n\n    const prerenderStore: PrerenderStore = {\n      type: 'validation-client',\n      phase: 'render',\n      rootParams,\n      implicitTags,\n      renderSignal: renderController.signal,\n      controller: reactController,\n      cacheSignal: null,\n      dynamicTracking: clientDynamicTracking,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      resumeDataCache: null,\n      hmrRefreshHash,\n      varyParamsAccumulator: null,\n      boundaryState,\n      fallbackRouteParams,\n      validationSamples,\n      validationSampleTracking,\n    }\n\n    let dynamicHoleKind: DynamicHoleKind\n    switch (prefetchKind) {\n      case ValidationPrefetchKind.Shell: {\n        dynamicHoleKind = payloadResult.hasAmbiguousErrors\n          ? DynamicHoleKind.Link\n          : DynamicHoleKind.Dynamic\n        break\n      }\n      case ValidationPrefetchKind.LegacySpeculative: {\n        dynamicHoleKind = payloadResult.hasAmbiguousErrors\n          ? DynamicHoleKind.Runtime\n          : DynamicHoleKind.Dynamic\n        break\n      }\n    }\n\n    let result: NavigationValidationResult\n    try {\n      const { prelude: unprocessedPrelude } = await runInSequentialTasks(\n        () => {\n          const pendingResult = workUnitAsyncStorage.run(\n            prerenderStore,\n            getClientPrerender,\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n            <App\n              reactServerStream={serverStream}\n              reactDebugStream={debugStream ?? undefined}\n              debugEndTime={undefined}\n              preinitScripts={preinitScripts}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            {\n              signal: reactSignal,\n              onError: (err: unknown, errorInfo: ErrorInfo) => {\n                if (isPrerenderInterruptedError(err) || reactSignal.aborted) {\n                  const componentStack = errorInfo.componentStack\n                  if (typeof componentStack === 'string') {\n                    trackDynamicHoleInNavigation(\n                      err,\n                      workStore,\n                      componentStack,\n                      instantValidationState,\n                      clientDynamicTracking,\n                      dynamicHoleKind,\n                      boundaryState\n                    )\n                  }\n                  return\n                } else if (!reactSignal.aborted) {\n                  const componentStack = errorInfo.componentStack\n                  if (typeof componentStack === 'string') {\n                    let errorForDisplay = err\n                    if (process.env.NODE_ENV === 'production') {\n                      // In production (i.e. build validation), Flight omits everything except the digest\n                      // when serializing errors, which makes them very unfriendly for debugging.\n                      // Map the deserialized errors back to their original error object to make it more useful.\n                      if (\n                        err &&\n                        typeof err === 'object' &&\n                        'digest' in err &&\n                        typeof err.digest === 'string'\n                      ) {\n                        const serverError =\n                          workStore.reactServerErrorsByDigest.get(err.digest)\n                        if (serverError !== undefined) {\n                          errorForDisplay = serverError\n                        }\n                      }\n                    }\n\n                    trackThrownErrorInNavigation(\n                      workStore,\n                      instantValidationState,\n                      errorForDisplay,\n                      componentStack\n                    )\n                  }\n                }\n\n                if (isReactLargeShellError(err)) {\n                  console.error(err)\n                  return undefined\n                }\n\n                return getDigestForWellKnownError(err)\n              },\n            }\n          )\n\n          reactSignal.addEventListener(\n            'abort',\n            () => {\n              renderController.abort()\n            },\n            { once: true }\n          )\n\n          return pendingResult\n        },\n        () => {\n          workUnitAsyncStorage.run(\n            prerenderStore,\n            reactController.abort.bind(reactController)\n          )\n        }\n      )\n\n      const { preludeIsEmpty } = await processPreludeOp(unprocessedPrelude)\n\n      result = getNavigationDisallowedDynamicReasons(\n        workStore,\n        preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n        instantValidationState,\n        validationSampleTracking,\n        boundaryState,\n        devRenderDidError\n      )\n    } catch (thrownValue) {\n      result = getNavigationDisallowedDynamicReasons(\n        workStore,\n        PreludeState.Errored,\n        instantValidationState,\n        validationSampleTracking,\n        boundaryState,\n        devRenderDidError\n      )\n    }\n\n    // If the prerender produced no real errors at this depth — either an\n    // empty array (clean) or a deferred-only result (Error/AggregateError\n    // representing a missing-boundary fallback) — there's nothing to\n    // discriminate. Pass it up so the outer loop can hold any deferred\n    // fallback back until every depth has been tried.\n    if (!Array.isArray(result) || result.length === 0) {\n      return result\n    }\n\n    if (previousBoundaryState === null && payloadResult.hasAmbiguousErrors) {\n      // This is the first validation attempt. we prepared a payload where dynamic holes might be runtime data dependencies\n      // or dynamic data dependencies. We do a followup validation using a payload with only Runtime segments to discriminate\n      if (\n        validationAbortSignal !== undefined &&\n        !(await yieldToForegroundRequest(validationAbortSignal))\n      ) {\n        return []\n      }\n\n      const dynamicOnlyResult = await validateAtDepthImpl(\n        depth,\n        groupDepthForValidation,\n        boundaryState\n      )\n\n      if (Array.isArray(dynamicOnlyResult) && dynamicOnlyResult.length > 0) {\n        // The dynamic errors only validation found errors to report so we favor those\n        return dynamicOnlyResult\n      }\n    }\n\n    // If we didn't return some other errors at this point the only thing to return is this validation's result\n    return result\n  }\n\n  // Discover validation depth bounds from the LoaderTree. The array\n  // length is the max URL depth; each entry is the max group depth\n  // (route group segments) between that URL depth and the next.\n  const groupDepthsByUrlDepth = discoverValidationDepths(loaderTree)\n  const maxDepth = groupDepthsByUrlDepth.length\n\n  let impairedValidation: null | Error | AggregateError = null\n\n  for (let depth = maxDepth - 1; depth >= 0; depth--) {\n    const maxGroupDepth = groupDepthsByUrlDepth[depth]\n\n    for (\n      let currentGroupDepth = maxGroupDepth;\n      currentGroupDepth >= 0;\n      currentGroupDepth--\n    ) {\n      const debugKind = ValidationPrefetchKind[prefetchKind]\n      debug?.(\n        `Trying ${debugKind} at depth ${depth}` +\n          (currentGroupDepth > 0\n            ? ` + groupDepth ${currentGroupDepth}...`\n            : '...')\n      )\n\n      if (\n        validationAbortSignal !== undefined &&\n        !(await yieldToForegroundRequest(validationAbortSignal))\n      ) {\n        return []\n      }\n\n      const result = await validateAtDepth(depth, currentGroupDepth)\n\n      if (Array.isArray(result)) {\n        const errors: Array<Error> = result\n        // Validation completed at least partially.\n        if (errors.length > 0) {\n          // There were issues with producing an instant UI for this attempted navigation\n          debug?.(\n            `  ${debugKind} at depth ${depth}+${currentGroupDepth}: ❌ Failed (${errors.length} errors)`\n          )\n          return errors\n        } else {\n          // There is nothing blocking instant UI for this simluated navigation\n          debug?.(\n            `  ${debugKind} at depth ${depth}+${currentGroupDepth}: ✅ Passed`\n          )\n        }\n      } else if (result === null) {\n        // There was no validation to perform at this level\n        debug?.(`  No config at depth ${depth}+${currentGroupDepth}, skipping.`)\n      } else {\n        // Something prevented this level from fully validating but there\n        // were no detected errors. Always overwrite — prefer the\n        // shallowest deferred fallback. If a high-level layout drops\n        // children, everything below is unreachable; the shallowest\n        // unrendered segment is closest to the actual cause.\n        impairedValidation = result\n      }\n    }\n  }\n\n  if (impairedValidation) {\n    debug?.(\n      `⏸ All depths passed without real errors; surfacing deferred missing-boundary fallback`\n    )\n    if (impairedValidation instanceof AggregateError) {\n      // There is at least one potential cause of the validation blocking\n      return impairedValidation.errors\n    } else {\n      // There was no known cause but we report something anyway\n      return [impairedValidation]\n    }\n  }\n\n  debug?.(`✅ All depths passed`)\n  return []\n}\n\n/**\n * Two-pass render for build-time instant validation.\n * The flow is similar to `renderWithRestartOnCacheMissInDev`: pass 1 warms caches,\n * pass 2 renders with warm caches. If pass 1 has no cache misses,\n * its result is returned directly.\n *\n * Differences from `renderWithRestartOnCacheMissInDev`:\n * - both renders are abortable: if we know that we can't use a stream, we can just\n *   throw it away, we don't have to render a complete result.\n * - We don't need to tee the stream, we only care about accumulating chunks.\n */\nasync function renderWithRestartOnCacheMissInValidation(\n  prefetchMode: PrefetchingMode,\n  ctx: AppRenderContext,\n  initialRequestStore: RequestStore,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  createOnError: (\n    signal: AbortSignal,\n    isRestart: boolean\n  ) => (error: unknown) => void,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<{\n  accumulatedChunksPromise: Promise<AccumulatedStreamChunks>\n  startTime: number\n  stageController: StagedRenderingController\n  requestStore: RequestStore\n}> {\n  const { componentMod: ComponentMod } = ctx\n  const shouldRenderAppShell = prefetchMode === PrefetchingMode.Partial\n\n  const { clientModules } = getClientReferenceManifest()\n  const renderFlightStream = process.env.__NEXT_USE_NODE_STREAMS\n    ? renderToNodeFlightStream\n    : renderToWebFlightStream\n\n  let startTime = -Infinity\n  let requestStore: RequestStore = initialRequestStore\n\n  //===============================================\n  // Initial render (prospective — may warm caches)\n  //===============================================\n\n  const cacheSignal = new CacheSignal()\n  trackPendingModules(cacheSignal)\n\n  // The prerender we rean before the validation probably already filled some caches,\n  // so we want to save work and re-use them.\n  const prerenderResumeDataCache = prefilledDataCache\n    ? createPrerenderResumeDataCache(prefilledDataCache)\n    : createPrerenderResumeDataCache()\n\n  const initialReactController = new AbortController()\n  const initialDataController = new AbortController()\n\n  const initialAbandonController = new AbortController()\n  const initialStageController = new StagedRenderingController({\n    abortSignal: initialDataController.signal,\n    abandonController: initialAbandonController,\n    syncIO: getSyncIOMode(prefetchMode),\n    finalStage: null,\n  })\n\n  requestStore.resumeDataCache = prerenderResumeDataCache\n  requestStore.stagedRendering = initialStageController\n  requestStore.needsSessionShell = shouldRenderAppShell\n  requestStore.cacheSignal = cacheSignal\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    initialStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  // We don't set `requestStore.controller and requestStore.renderSignal here.\n  // Right now, we only abort for sync IO, and in the first render, that's just a restart\n  // (after waiting for caches)\n  requestStore.controller = undefined\n  requestStore.renderSignal = undefined\n\n  const initialRscPayload = await getPayload(requestStore)\n\n  const advanceStageIfNoCacheMiss = (\n    stage: Parameters<StagedRenderingController['advanceStage']>[0]\n  ) => {\n    if (initialAbandonController.signal.aborted === true) {\n      return\n    } else if (cacheSignal.hasPendingReads()) {\n      initialAbandonController.abort()\n    } else {\n      initialStageController.advanceStage(stage)\n    }\n  }\n\n  const initialResult = await runInSequentialTasks(\n    () => {\n      initialStageController.advanceStage(RenderStage.ShellStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const stream = workUnitAsyncStorage.run(\n        requestStore,\n        renderFlightStream,\n        ComponentMod,\n        initialRscPayload,\n        clientModules,\n        {\n          onError: createOnError(initialReactController.signal, false),\n          startTime,\n          filterStackFrame,\n          signal: initialReactController.signal,\n        }\n      )\n\n      initialReactController.signal.addEventListener(\n        'abort',\n        () => {\n          const { reason } = initialReactController.signal\n          initialDataController.abort(reason)\n        },\n        { once: true }\n      )\n\n      const accumulatedChunksPromise = accumulateStreamChunks(\n        stream,\n        initialStageController,\n        initialDataController.signal\n      )\n      accumulatedChunksPromise.catch(() => {})\n      return { accumulatedChunksPromise }\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Static)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.ShellRuntime)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Runtime)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Dynamic)\n    }\n  )\n\n  if (initialStageController.currentStage !== RenderStage.Abandoned) {\n    // No cache misses. Use the result as-is.\n    return {\n      accumulatedChunksPromise: initialResult.accumulatedChunksPromise,\n      startTime,\n      stageController: initialStageController,\n      requestStore,\n    }\n  }\n\n  // Cache miss. Wait for caches to fill, then re-render with warm caches.\n  await cacheSignal.cacheReady()\n  workUnitAsyncStorage.run(\n    requestStore,\n    initialReactController.abort.bind(initialReactController)\n  )\n\n  //===============================================\n  // Final render (restarted, with warm caches)\n  //===============================================\n\n  requestStore = createRequestStore()\n\n  // Unlike dev, where we're re-using the render that'll be visible in the browser,\n  // we *can* abort the validation render.\n\n  const finalReactController = new AbortController()\n  const finalDataController = new AbortController()\n  const finalStageController = new StagedRenderingController({\n    abortSignal: finalDataController.signal,\n    abandonController: null,\n    syncIO: getSyncIOMode(prefetchMode),\n    finalStage: null,\n  })\n\n  requestStore.resumeDataCache = createRenderResumeDataCache(\n    prerenderResumeDataCache\n  )\n  requestStore.stagedRendering = finalStageController\n  requestStore.needsSessionShell = shouldRenderAppShell\n  requestStore.cacheSignal = null\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    finalStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  // Right now, we only abort for sync IO.\n  // If sync IO occurs in a place where it's not allowed, then we have to fail validation,\n  // and we can abort the render immediately, without waiting for anything else..\n  requestStore.controller = finalReactController\n  requestStore.renderSignal = finalDataController.signal\n\n  const finalRscPayload = await getPayload(requestStore)\n\n  const finalResult = await runInSequentialTasks(\n    () => {\n      finalStageController.advanceStage(RenderStage.ShellStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const stream = workUnitAsyncStorage.run(\n        requestStore,\n        renderFlightStream,\n        ComponentMod,\n        finalRscPayload,\n        clientModules,\n        {\n          onError: createOnError(finalReactController.signal, true),\n          startTime,\n          filterStackFrame,\n          signal: finalReactController.signal,\n        }\n      )\n\n      finalReactController.signal.addEventListener(\n        'abort',\n        () => {\n          finalDataController.abort(finalReactController.signal.reason)\n        },\n        { once: true }\n      )\n\n      const accumulatedChunksPromise = accumulateStreamChunks(\n        stream,\n        finalStageController,\n        null\n      )\n      accumulatedChunksPromise.catch(() => {})\n\n      return {\n        accumulatedChunksPromise,\n      }\n    },\n    () => finalStageController.advanceStage(RenderStage.Static),\n    () => finalStageController.advanceStage(RenderStage.ShellRuntime),\n    () => finalStageController.advanceStage(RenderStage.Runtime),\n    () => finalStageController.advanceStage(RenderStage.Dynamic)\n  )\n\n  return {\n    accumulatedChunksPromise: finalResult.accumulatedChunksPromise,\n    startTime,\n    stageController: finalStageController,\n    requestStore,\n  }\n}\n\nasync function validateInstantConfigsInBuild(\n  ctx: AppRenderContext,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<void> {\n  const run = async () => {\n    let success: boolean\n    try {\n      // The validation renders are separate renders, and use a separate WorkStore.\n      // However, we defensively exit the existing workStore to avoid relying on something from there\n      // before we shadow it.\n      success = await workAsyncStorage.exit(async () =>\n        validateInstantConfigsInBuildImpl(ctx, prefilledDataCache)\n      )\n    } catch (err) {\n      console.error(\n        new InvariantError(\n          'An unexpected error occurred during instant validation',\n          { cause: err }\n        )\n      )\n      success = false\n    }\n    if (!success) {\n      console.error('Stopping prerender due to instant validation errors.')\n      throw new StaticGenBailoutError()\n    }\n  }\n\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    // In tests, we use these markers to extract the relevant portion of the CLI logs.\n    // We want consistent ordering of these messages and other console.error calls,\n    // so we use console.error here as well. Using console.log leads to non-deterministic\n    // log order, likely stdout/stderr can interleave in non-deterministic ways.\n    const requestId = String(Date.now())\n    const route = ctx.workStore.route\n    console.error(\n      formatValidationEvent({ type: 'validation_start', requestId, url: route })\n    )\n    try {\n      return await run()\n    } finally {\n      console.error(\n        formatValidationEvent({ type: 'validation_end', requestId, url: route })\n      )\n    }\n  } else {\n    return await run()\n  }\n}\n\n/**\n * Runs instant validation at build time using the `samples` from `instant`.\n *\n * For each sample, this creates a staged RSC render with a synthetic `RequestStore`\n * populated from sample data, then feeds the accumulated chunks to\n * `validateInstantConfigs` which handles the actual validation.\n */\nasync function validateInstantConfigsInBuildImpl(\n  ctx: AppRenderContext,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<boolean> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  const { workStore: outerWorkStore } = ctx\n  const route = outerWorkStore.route\n\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n  let samples = await resolveInstantConfigSamplesForPage(loaderTree)\n  if (!samples || samples.length === 0) {\n    // No samples defined; use a single empty sample to still run validation\n    samples = [{}]\n  }\n  debug?.('Resolved samples:', samples)\n\n  const allPossibleFallbackRouteParams = getFallbackRouteParams(\n    route,\n    ctx.componentMod.routeModule\n  )\n\n  for (let sampleIndex = 0; sampleIndex < samples.length; sampleIndex++) {\n    const sample = samples[sampleIndex]\n    debug?.(`Validating sample (${sampleIndex + 1}/${samples.length}):`, sample)\n\n    let errors: unknown[]\n    try {\n      errors = await consoleAsyncStorage.run({ dim: true }, () =>\n        validateInstantConfigInBuildWithSample(\n          ctx,\n          sample,\n          allPossibleFallbackRouteParams,\n          prefilledDataCache\n        )\n      )\n    } catch (err) {\n      if (isInstantValidationError(err)) {\n        errors = [err]\n      } else {\n        throw err\n      }\n    }\n\n    if (errors.length > 0) {\n      debug?.(`❌ Sample failed validation (${errors.length} errors)`)\n      const sampleDesc =\n        samples.length > 1\n          ? ` (sample ${sampleIndex + 1} of ${samples.length})`\n          : ''\n      for (const err of errors) {\n        console.error(err)\n      }\n      console.error(\n        `Build-time instant validation failed for route \"${route}\"${sampleDesc}.`\n      )\n      logBuildDebugHint(route)\n      return false\n    } else {\n      debug?.('✅ Sample validated successfully')\n    }\n  }\n  return true\n}\n\nasync function validateInstantConfigInBuildWithSample(\n  outerCtx: AppRenderContext,\n  sample: InstantSample,\n  allPossibleFallbackRouteParams: OpaqueFallbackRouteParams | null,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<unknown[]> {\n  // The flow for build mirrors what we do when validating in dev.\n  // We have to perform a full dynamic render to get the RSC chunks for each stage.\n  // In order to do that, we have to set up a mock AppRenderContext, workStore, and requestStore\n  // based on the `sample` we're using.\n\n  const { workStore: outerWorkStore } = outerCtx\n  const loaderTree = outerCtx.componentMod.routeModule.userland.loaderTree\n  const prefetchMode = await getPrefetchingModeForPage(\n    outerCtx.renderOpts,\n    loaderTree\n  )\n\n  const route = outerWorkStore.route\n\n  const {\n    createCookiesFromSample,\n    createHeadersFromSample,\n    createDraftModeForValidation,\n    createRelativeURLFromSamples,\n    createValidationSampleTracking,\n  } =\n    require('./instant-validation/instant-samples') as typeof import('./instant-validation/instant-samples')\n\n  // TODO(instant-validation-build): it feels like this should happen higher up\n  // and go through existing URL parsing/generation logic?\n  const sampleUrl = createRelativeURLFromSamples(\n    route,\n    sample.params,\n    sample.searchParams\n  )\n\n  const sampleParams = sample.params ?? {}\n  let fallbackRouteParams: OpaqueFallbackRouteParams | null = null\n  if (allPossibleFallbackRouteParams) {\n    const fallbackRouteParamsMut = new Map()\n    for (const [paramKey, value] of allPossibleFallbackRouteParams) {\n      if (!(paramKey in sampleParams)) {\n        fallbackRouteParamsMut.set(paramKey, value)\n      }\n    }\n    fallbackRouteParams = fallbackRouteParamsMut\n  }\n\n  const getDynamicParamFromSegment = makeGetDynamicParamFromSegment(\n    sampleParams,\n    fallbackRouteParams,\n    false\n  )\n\n  const sampleRootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  let sampleUrlWithoutQuery: Omit<ParsedRelativeUrl, 'query'>\n  let sampleQuery: ParsedRelativeUrl['query']\n  ;({ query: sampleQuery, ...sampleUrlWithoutQuery } = sampleUrl)\n\n  const { AfterContext } =\n    require('../after/after-context') as typeof import('../after/after-context')\n\n  // NOTE: Matching the field order in `createWorkStore` to avoid deopting.\n  const workStore: WorkStore = {\n    isStaticGeneration: false,\n    page: outerWorkStore.page,\n    route: outerWorkStore.route,\n    requestStartTime: outerWorkStore.requestStartTime,\n    incrementalCache: outerWorkStore.incrementalCache,\n    cacheLifeProfiles: outerWorkStore.cacheLifeProfiles,\n    useCacheTimeout: outerWorkStore.useCacheTimeout,\n    staticPageGenerationTimeout: outerWorkStore.staticPageGenerationTimeout,\n    isBuildTimePrerendering: false,\n    fetchCache: outerWorkStore.fetchCache,\n    isOnDemandRevalidate: false,\n    requestId: outerWorkStore.requestId,\n    htmlRequestId: outerWorkStore.htmlRequestId,\n\n    isDraftMode: false,\n\n    isPrefetchRequest: false,\n    buildId: outerWorkStore.buildId,\n    deploymentId: outerWorkStore.deploymentId,\n    reactLoadableManifest: outerWorkStore.reactLoadableManifest,\n    assetPrefix: outerWorkStore.assetPrefix,\n    nonce: outerWorkStore.nonce,\n\n    // Never run `after()` for this validation render. by definition, `after` can't affect the rendered output.\n    afterContext: new AfterContext({\n      waitUntil(promise) {\n        promise.catch(() => {})\n      },\n      onClose() {},\n      onTaskError() {},\n    }),\n\n    cacheComponentsEnabled: outerWorkStore.cacheComponentsEnabled,\n    validationLevel: outerWorkStore.validationLevel,\n    previouslyRevalidatedTags: [],\n    refreshTagsByCacheKind: new Map(),\n    runInCleanSnapshot: outerWorkStore.runInCleanSnapshot,\n    shouldTrackFetchMetrics: false,\n    reactServerErrorsByDigest: new Map(),\n  }\n\n  return workAsyncStorage.run(workStore, async () => {\n    // NOTE: match field order in renderToHTMLOrFlightImpl to avoid deopts\n    const validationCtx: AppRenderContext = {\n      componentMod: outerCtx.componentMod,\n      url: sampleUrlWithoutQuery,\n      renderOpts: outerCtx.renderOpts,\n      workStore,\n      parsedRequestHeaders: outerCtx.parsedRequestHeaders,\n      getDynamicParamFromSegment,\n      interpolatedParams: sampleParams,\n      fallbackRouteParams,\n      query: sampleQuery,\n      isPrefetch: false,\n      isPossibleServerAction: false,\n      requestTimestamp: outerCtx.requestTimestamp,\n      appUsingSizeAdjustment: outerCtx.appUsingSizeAdjustment,\n      flightRouterState: undefined,\n      requestId: outerCtx.requestId,\n      htmlRequestId: outerCtx.htmlRequestId,\n      pagePath: outerCtx.pagePath,\n      assetPrefix: outerCtx.assetPrefix,\n      isNotFoundPath: outerCtx.isNotFoundPath,\n      nonce: outerCtx.nonce,\n      res: outerCtx.res,\n      sharedContext: outerCtx.sharedContext,\n      implicitTags: outerCtx.implicitTags,\n    }\n\n    const validationSamples: InstantValidationSamples = {\n      params: sample.params,\n      searchParams: sample.searchParams,\n    }\n\n    const createRequestStore = (): RequestStore => {\n      // Create exhaustive request data from sample\n      const sampleCookies = createCookiesFromSample(sample.cookies, route)\n\n      // We don't have to bother initializing these, pages can't access them anyway,\n      // we just need them because RequestStore requires them.\n      const unusedMutableCookies = new ResponseCookies(new Headers())\n\n      // Create headers.\n      const sampleHeaders = createHeadersFromSample(\n        sample.headers,\n        sample.cookies,\n        route\n      )\n\n      const draftMode = createDraftModeForValidation()\n\n      return {\n        type: 'request',\n        phase: 'render',\n        implicitTags: outerCtx.implicitTags,\n        url: {\n          pathname: sampleUrl.pathname,\n          search: sampleUrl.search,\n        },\n        headers: sampleHeaders,\n        cookies: sampleCookies,\n        mutableCookies: unusedMutableCookies,\n        userspaceMutableCookies: unusedMutableCookies,\n        draftMode,\n        rootParams: sampleRootParams,\n        validationSamples,\n        validationSampleTracking: createValidationSampleTracking(),\n        // This will be set when rendering\n        resumeDataCache: null,\n        stagedRendering: null,\n        asyncApiPromises: undefined,\n      }\n    }\n\n    // Track server errors. If one of them surfaces during the client render\n    // in the deserialized form (with no message/stack) we'll use this to map it\n    // back to the original.\n    const onServerError = createReactServerErrorHandler(\n      true, // shouldFormatError\n      true, // isBuildTimePrerendering - disables tracing\n      workStore.reactServerErrorsByDigest,\n      () => {} // Don't report anything here. If needed, it will be reported in the client render.\n    )\n\n    const {\n      accumulatedChunksPromise,\n      startTime,\n      stageController,\n      requestStore: finalServerStore,\n    } = await renderWithRestartOnCacheMissInValidation(\n      prefetchMode,\n      validationCtx,\n      createRequestStore(),\n      createRequestStore,\n      (requestStore) =>\n        workUnitAsyncStorage.run(\n          requestStore,\n          getRSCPayload,\n          loaderTree,\n          validationCtx,\n          { is404: false }\n        ),\n      (signal) =>\n        function onError(err) {\n          const digest = getDigestForWellKnownError(err)\n          if (digest) {\n            return digest\n          }\n          if (signal.aborted) {\n            return\n          }\n          return onServerError(err)\n        },\n      prefilledDataCache\n    )\n\n    const accumulatedChunks = await accumulatedChunksPromise\n    const endTimes = getStageEndTimes(stageController)\n    const debugChunks = null // TODO(instant-validation-build): support debugChannel\n\n    // Missing sample errors take priority over everything else,\n    // because they prevent us from rendering everything we need to validate.\n    const serverValidationSampleTracking =\n      finalServerStore.validationSampleTracking!\n    if (serverValidationSampleTracking.missingSampleErrors.length > 0) {\n      return serverValidationSampleTracking.missingSampleErrors\n    }\n\n    // We also error for sync IO. This runs after the prerender,\n    // so if we get sync IO errors here, they're likely from the runtime stage --\n    // the prerender probably discovered sync IO in the static stage\n    if (\n      stageController.currentStage === RenderStage.Abandoned &&\n      stageController.syncInterruptReason\n    ) {\n      return [stageController.syncInterruptReason]\n    }\n\n    // Now we the chunks of a fully rendered page, just like in dev.\n    // We can use them to validate all the navigations required by `instant` configs.\n    // Note that we're not performing static shell validation here -- that happens\n    // implicitly as part of the static prerender.\n\n    // The static prerender has warmed some client modules already,\n    // but we'll be reaching Runtime/Dynamic stages and thus rendering more content,\n    // so we need to warm again.\n    // TODO(instant-validation-build): This might warm too much, possibly hitting errors on code that didn't expect\n    // to run at build time. For example, we generally don't need to render leaf segments (e.g. __PAGE__) in\n    // the Dynamic stage, they're Runtime at best.\n\n    const warmupValidationSamplesTracking = createValidationSampleTracking()\n    const validationRenderCtx = toValidationRenderContext(validationCtx)\n    await warmupClientModulesForStagedValidation(\n      'validation-client',\n      accumulatedChunks.dynamicChunks,\n      accumulatedChunks.dynamicChunks,\n      sampleRootParams,\n      fallbackRouteParams,\n      validationRenderCtx,\n      validationSamples,\n      warmupValidationSamplesTracking\n    )\n    if (warmupValidationSamplesTracking.missingSampleErrors.length > 0) {\n      return warmupValidationSamplesTracking.missingSampleErrors\n    }\n\n    return await validateInstantConfigs(\n      prefetchMode,\n      accumulatedChunks,\n      debugChunks,\n      startTime,\n      endTimes,\n      sampleRootParams,\n      fallbackRouteParams,\n      validationRenderCtx,\n      undefined, // hmrRefreshHash,\n      validationSamples,\n      false // build has no shared dev render that would surface errors\n    )\n  })\n}\n\ntype PrerenderToStreamResult = {\n  stream: AnyStream\n  digestErrorsMap: Map<string, DigestedError>\n  ssrErrors: Array<unknown>\n  dynamicAccess?: null | Array<DynamicAccess>\n  collectedRevalidate: number\n  collectedExpire: number\n  collectedStale: number\n  collectedTags: null | string[]\n  renderResumeDataCache?: RenderResumeDataCache\n}\n\n/**\n * Determines whether we should generate static flight data.\n */\n// TODO: This helper used to exclude fallback route params. It now only checks\n// static generation inside prerenderToStream and can be removed. LOE: low.\nfunction shouldGenerateStaticFlightData(workStore: WorkStore): boolean {\n  const { isStaticGeneration } = workStore\n  if (!isStaticGeneration) return false\n\n  return true\n}\n\nasync function continueStaticPrerenderWithInlinedData(\n  htmlStream: AnyStream,\n  reactServerResult: ReactServerPrerenderResult,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  createInlinedDataStream: typeof createWebInlinedDataStream,\n  formState: unknown | null,\n  nonce: string | undefined,\n  getServerInsertedHTML: () => Promise<string>,\n  getServerInsertedMetadata: () => Promise<string>,\n  deploymentId: string | undefined,\n  ComponentMod: AppPageModule,\n  renderFlightStream: typeof renderToWebFlightStream,\n  clientModules: Parameters<typeof renderToWebFlightStream>[2],\n  filterStackFrameForError: typeof filterStackFrame,\n  serverComponentsErrorHandler: (err: unknown) => string | undefined\n): Promise<AnyStream> {\n  const hasFallbackRouteParams =\n    fallbackRouteParams && fallbackRouteParams.size > 0\n  if (hasFallbackRouteParams) {\n    // This is a \"static fallback\" prerender: although the page didn't\n    // access any runtime params in a Server Component, it may have\n    // accessed a runtime param in a client segment.\n    //\n    // TODO: If there were no client segments, we can use the fully static\n    // path instead.\n    //\n    // Rather than use a dynamic server resume to fill in the params,\n    // we can rely on the client to parse the params from the URL and use\n    // that to hydrate the page.\n    //\n    // Send an empty InitialRSCPayload to the server component renderer\n    // The data will be fetched by the client instead.\n    // TODO: In the future, rather than defer the entire hydration payload\n    // to be fetched by the client, we should only defer the client\n    // segments, since those are the only ones whose data is not complete.\n    const emptyReactServerResult =\n      await createReactServerPrerenderResultFromRender(\n        renderFlightStream(ComponentMod, [], clientModules, {\n          filterStackFrame: filterStackFrameForError,\n          onError: serverComponentsErrorHandler,\n        })\n      )\n    const inlinedDataStream = createInlinedDataStream(\n      emptyReactServerResult.consumeAsStream(),\n      nonce,\n      formState\n    )\n    return continueStaticFallbackPrerender(htmlStream, {\n      inlinedDataStream,\n      getServerInsertedHTML,\n      getServerInsertedMetadata,\n      deploymentId,\n    })\n  }\n\n  const inlinedDataStream = createInlinedDataStream(\n    reactServerResult.consumeAsStream(),\n    nonce,\n    formState\n  )\n  return continueStaticPrerender(htmlStream, {\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  })\n}\n\nasync function prerenderToStream(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  ctx: AppRenderContext,\n  metadata: AppPageRenderResultMetadata,\n  tree: LoaderTree,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Promise<PrerenderToStreamResult> {\n  // When prerendering formState is always null. We still include it\n  // because some shared APIs expect a formState value and this is slightly\n  // more explicit than making it an optional function argument\n  const formState = null\n\n  const {\n    assetPrefix,\n    getDynamicParamFromSegment,\n    implicitTags,\n    nonce,\n    pagePath,\n    renderOpts,\n    workStore,\n  } = ctx\n\n  const {\n    basePath,\n    buildManifest,\n    ComponentMod,\n    crossOrigin,\n    experimental,\n    isDebugDynamicAccesses,\n    isBuildTimePrerendering = false,\n    onInstrumentationRequestError,\n    page,\n    reactMaxHeadersLength,\n    subresourceIntegrityManifest,\n    cacheComponents,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  const renderFlightStream = process.env.__NEXT_USE_NODE_STREAMS\n    ? renderToNodeFlightStream\n    : renderToWebFlightStream\n  const renderFizzStream = process.env.__NEXT_USE_NODE_STREAMS\n    ? renderToNodeFizzStream\n    : renderToWebFizzStream\n  const createInlinedDataStream = process.env.__NEXT_USE_NODE_STREAMS\n    ? createNodeInlinedDataStream\n    : createWebInlinedDataStream\n\n  const allowEmptyStaticShell =\n    (renderOpts.allowEmptyStaticShell ?? false) ||\n    (await isPageAllowedToBlock(tree))\n\n  const rootParams = getRootParams(tree, getDynamicParamFromSegment)\n\n  const { ServerInsertedHTMLProvider, renderServerInsertedHTML } =\n    createServerInsertedHTML()\n  const getServerInsertedMetadata = createServerInsertedMetadata(nonce)\n\n  const tracingMetadata = getTracedMetadata(\n    getTracer().getTracePropagationData(),\n    experimental.clientTraceMetadata\n  )\n\n  const polyfills: JSX.IntrinsicElements['script'][] =\n    buildManifest.polyfillFiles\n      .filter(\n        (polyfill) =>\n          polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')\n      )\n      .map((polyfill) => ({\n        src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(\n          ctx,\n          false\n        )}`,\n        integrity: subresourceIntegrityManifest?.[polyfill],\n        crossOrigin,\n        noModule: true,\n        nonce,\n      }))\n\n  const [preinitScripts, bootstrapScript] = getRequiredScripts(\n    buildManifest,\n    // Why is assetPrefix optional on renderOpts?\n    // @TODO make it default empty string on renderOpts and get rid of it from ctx\n    assetPrefix,\n    crossOrigin,\n    subresourceIntegrityManifest,\n    getAssetQueryString(ctx, true),\n    nonce,\n    page\n  )\n\n  let bootstrapScriptContent =\n    buildManifest.pagesChunkGroupBootstrapParams &&\n    buildManifest.chunkLoadingGlobal\n      ? getTurbopackChunkGroupBootstrap(\n          buildManifest.pagesChunkGroupBootstrapParams,\n          buildManifest.chunkLoadingGlobal,\n          [page]\n        )\n      : undefined\n\n  // Instant Navigation Testing API: when exposed, embed the cookie-guarded\n  // bootstrap into the prerendered prelude so the cached static shell carries\n  // it and it runs before the client bootstrap module reads\n  // self.__next_instant_test.\n  if (renderOpts.experimental.exposeTestingApi) {\n    bootstrapScriptContent =\n      (bootstrapScriptContent ? `${bootstrapScriptContent};` : '') +\n      (await getInstantTestBootstrapScriptContent())\n  }\n\n  // In development the static shell is served without a dynamic resume, so it\n  // must carry the debug-channel request id (self.__next_r) itself for\n  // app-index to initialize the HMR/debug channel. renderToStream provides this\n  // for dynamic renders; prepend it here so it runs before the bootstrap\n  // module.\n  if (process.env.__NEXT_DEV_SERVER && bootstrapScriptContent) {\n    bootstrapScriptContent =\n      `self.__next_r=${JSON.stringify(ctx.requestId ?? crypto.randomUUID())};` +\n      bootstrapScriptContent\n  }\n\n  const { reactServerErrorsByDigest } = workStore\n  // We don't report errors during prerendering through our instrumentation hooks\n  const reportErrors = !experimental.isRoutePPREnabled\n  function onHTMLRenderRSCError(err: DigestedError, silenceLog: boolean) {\n    if (reportErrors) {\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'react-server-components'),\n        silenceLog\n      )\n    }\n  }\n  const serverComponentsErrorHandler = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    reactServerErrorsByDigest,\n    onHTMLRenderRSCError\n  )\n\n  function onHTMLRenderSSRError(err: DigestedError) {\n    if (reportErrors) {\n      // We don't need to silence logs here. onHTMLRenderSSRError won't be\n      // called at all if the error was logged before in the RSC error handler.\n      const silenceLog = false\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'server-rendering'),\n        silenceLog\n      )\n    }\n  }\n  const allCapturedErrors: Array<unknown> = []\n  const htmlRendererErrorHandler = createHTMLErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    reactServerErrorsByDigest,\n    allCapturedErrors,\n    onHTMLRenderSSRError\n  )\n\n  let reactServerPrerenderResult: null | ReactServerPrerenderResult = null\n  let reactServerPrerenderResultIsDynamic: null | boolean = null\n  let reactServerResumeDataCache: ResumeDataCache | null = null\n  let reactServerPrerenderStore: null | PrerenderStore = null\n  const setMetadataHeader = (name: string) => {\n    metadata.headers ??= {}\n    metadata.headers[name] = res.getHeader(name)\n  }\n  const setHeader = (name: string, value: string | string[]) => {\n    res.setHeader(name, value)\n    setMetadataHeader(name)\n    return res\n  }\n  const appendHeader = (name: string, value: string | string[]) => {\n    if (Array.isArray(value)) {\n      value.forEach((item) => {\n        res.appendHeader(name, item)\n      })\n    } else {\n      res.appendHeader(name, value)\n    }\n    setMetadataHeader(name)\n  }\n\n  const selectStaleTime = createSelectStaleTime(experimental)\n  const { clientModules } = getClientReferenceManifest()\n\n  let prerenderStore: PrerenderStore | null = null\n\n  try {\n    if (cacheComponents) {\n      /**\n       * cacheComponents with PPR\n       *\n       * The general approach is to render the RSC stream first allowing any cache reads to resolve.\n       * Once we have settled all cache reads we restart the render and abort after a single Task.\n       *\n       * Unlike with the non PPR case we can't synchronously abort the render when a dynamic API is used\n       * during the initial render because we need to ensure all caches can be filled as part of the initial Task\n       * and a synchronous abort might prevent us from filling all caches.\n       *\n       * Once the render is complete we allow the SSR render to finish and use a combination of the postponed state\n       * and the reactServerIsDynamic value to determine how to treat the resulting render\n       */\n\n      // The prerender controller represents the lifetime of the prerender. It\n      // will be aborted when a task is complete or a synchronously aborting API\n      // is called. Notably, during prospective prerenders, this does not\n      // actually terminate the prerender itself, which will continue until all\n      // caches are filled.\n      const initialServerPrerenderController = new AbortController()\n\n      // This controller is used to abort the React prerender.\n      const initialServerReactController = new AbortController()\n\n      // This controller represents the lifetime of the React prerender. Its\n      // signal can be used for any I/O operation to abort the I/O and/or to\n      // reject, when prerendering aborts. This includes our own hanging\n      // promises for accessing request data, and for fetch calls. It might be\n      // replaced in the future by React.cacheSignal(). It's aborted after the\n      // React controller, so that no pending I/O can register abort listeners\n      // that are called before React's abort listener is called. This ensures\n      // that pending I/O is not rejected too early when aborting the prerender.\n      // Notably, during the prospective prerender, it is different from the\n      // prerender controller because we don't want to end the React prerender\n      // until all caches are filled.\n      const initialServerRenderController = new AbortController()\n\n      // The cacheSignal helps us track whether caches are still filling or we are ready\n      // to cut the render off.\n      const cacheSignal = new CacheSignal()\n\n      // If a prefilled immutable render resume data cache is provided, e.g.\n      // when prerendering an optional fallback shell after having prerendered\n      // pages with defined params, we use this instead of a mutable prerender\n      // resume data cache.\n      const resumeDataCache: ResumeDataCache =\n        renderOpts.renderResumeDataCache ?? createPrerenderResumeDataCache()\n      reactServerPrerenderResultIsDynamic = null\n      reactServerResumeDataCache = resumeDataCache\n      reactServerPrerenderStore = null\n\n      const initialServerPayloadPrerenderStore: PrerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        // While this render signal isn't going to be used to abort a React render while getting the RSC payload\n        // various request data APIs bind to this controller to reject after completion.\n        renderSignal: initialServerRenderController.signal,\n        // When we generate the RSC payload we might abort this controller due to sync IO\n        // but we don't actually care about sync IO in this phase so we use a throw away controller\n        // that isn't connected to anything\n        controller: new AbortController(),\n        stagedRendering: null, // We don't need staging in the initial render\n        // During the initial prerender we need to track all cache reads to ensure\n        // we render long enough to fill every cache it is possible to visit during\n        // the final prerender.\n        cacheSignal,\n        dynamicTracking: null,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n        hmrRefreshHash: undefined,\n        // We don't track vary params during initial prerender, only the final one\n        varyParamsAccumulator: null,\n        runtimeDataAccessed: null,\n        shouldAttemptStaticPrefetch: null,\n        isFallbackUpgradeable: renderOpts.isFallbackUpgradeable === true,\n      }\n\n      // We're not going to use the result of this render because the only time it could be used\n      // is if it completes in a microtask and that's likely very rare for any non-trivial app\n      const initialServerPayload = await workUnitAsyncStorage.run(\n        initialServerPayloadPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n\n      const initialServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: initialServerRenderController.signal,\n        controller: initialServerPrerenderController,\n        stagedRendering: null, // We don't need staging in the initial render\n        // During the initial prerender we need to track all cache reads to ensure\n        // we render long enough to fill every cache it is possible to visit during\n        // the final prerender.\n        cacheSignal,\n        dynamicTracking: null,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n        hmrRefreshHash: undefined,\n        // We don't track vary params during initial prerender, only the final one\n        varyParamsAccumulator: null,\n        runtimeDataAccessed: null,\n        shouldAttemptStaticPrefetch: null,\n        isFallbackUpgradeable: renderOpts.isFallbackUpgradeable === true,\n      })\n\n      const initialPrerenderOptions = {\n        filterStackFrame,\n        onError: (err: unknown) => {\n          const digest = getDigestForWellKnownError(err)\n\n          if (digest) {\n            return digest\n          }\n\n          if (isReactLargeShellError(err)) {\n            // TODO: Aggregate\n            console.error(err)\n            return undefined\n          }\n\n          if (initialServerPrerenderController.signal.aborted) {\n            // The render aborted before this error was handled which indicates\n            // the error is caused by unfinished components within the render\n            return\n          } else if (\n            process.env.NEXT_DEBUG_BUILD ||\n            process.env.__NEXT_VERBOSE_LOGGING\n          ) {\n            printDebugThrownValueForProspectiveRender(\n              err,\n              workStore.route,\n              Phase.ProspectiveRender\n            )\n          }\n        },\n        // We don't want to stop rendering until the cacheSignal is complete so we pass\n        // a different signal to this render call than is used by dynamic APIs to signify\n        // transitioning out of the prerender environment\n        signal: initialServerReactController.signal,\n      }\n\n      const pendingInitialServerResult = workUnitAsyncStorage.run(\n        initialServerPrerenderStore,\n        getServerPrerender(ComponentMod),\n        initialServerPayload,\n        clientModules,\n        initialPrerenderOptions\n      )\n\n      // The listener to abort our own render controller must be added after\n      // React has added its listener, to ensure that pending I/O is not\n      // aborted/rejected too early.\n      initialServerReactController.signal.addEventListener(\n        'abort',\n        () => {\n          initialServerRenderController.abort()\n          initialServerPrerenderController.abort()\n        },\n        { once: true }\n      )\n\n      // Wait for all caches to be finished filling and for async imports to resolve\n      trackPendingModules(cacheSignal)\n      await cacheSignal.cacheReady()\n\n      initialServerReactController.abort()\n\n      // We don't need to continue the prerender process if we already\n      // detected invalid dynamic usage in the initial prerender phase.\n      if (workStore.invalidDynamicUsageError) {\n        logDisallowedDynamicError(workStore, workStore.invalidDynamicUsageError)\n        throw new StaticGenBailoutError()\n      }\n\n      let initialServerResult\n      try {\n        initialServerResult = await createReactServerPrerenderResult(\n          pendingInitialServerResult\n        )\n      } catch (err) {\n        if (\n          initialServerReactController.signal.aborted ||\n          initialServerPrerenderController.signal.aborted\n        ) {\n          // These are expected errors that might error the prerender. we ignore them.\n        } else if (\n          process.env.NEXT_DEBUG_BUILD ||\n          process.env.__NEXT_VERBOSE_LOGGING\n        ) {\n          // We don't normally log these errors because we are going to retry anyway but\n          // it can be useful for debugging Next.js itself to get visibility here when needed\n          printDebugThrownValueForProspectiveRender(\n            err,\n            workStore.route,\n            Phase.ProspectiveRender\n          )\n        }\n      }\n\n      if (initialServerResult) {\n        const initialClientPrerenderController = new AbortController()\n        const initialClientReactController = new AbortController()\n        const initialClientRenderController = new AbortController()\n\n        const initialClientPrerenderStore: PrerenderStore = {\n          type: 'prerender-client',\n          phase: 'render',\n          rootParams,\n          fallbackRouteParams,\n          implicitTags,\n          renderSignal: initialClientRenderController.signal,\n          controller: initialClientPrerenderController,\n          // For HTML Generation the only cache tracked activity\n          // is module loading, which has it's own cache signal\n          cacheSignal: null,\n          dynamicTracking: null,\n          revalidate: INFINITE_CACHE,\n          expire: INFINITE_CACHE,\n          stale: INFINITE_CACHE,\n          tags: [...implicitTags.tags],\n          resumeDataCache,\n          hmrRefreshHash: undefined,\n          // Client prerenders don't track server param access\n          varyParamsAccumulator: null,\n        }\n\n        const pendingInitialClientResult = workUnitAsyncStorage.run(\n          initialClientPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n          <App\n            reactServerStream={initialServerResult.asUnclosingStream()}\n            reactDebugStream={undefined}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            signal: initialClientReactController.signal,\n            onError: (err: unknown) => {\n              const digest = getDigestForWellKnownError(err)\n\n              if (digest) {\n                return digest\n              }\n\n              if (isReactLargeShellError(err)) {\n                // TODO: Aggregate\n                console.error(err)\n                return undefined\n              }\n\n              if (initialClientReactController.signal.aborted) {\n                // These are expected errors that might error the prerender. we ignore them.\n              } else if (\n                process.env.NEXT_DEBUG_BUILD ||\n                process.env.__NEXT_VERBOSE_LOGGING\n              ) {\n                // We don't normally log these errors because we are going to retry anyway but\n                // it can be useful for debugging Next.js itself to get visibility here when needed\n                printDebugThrownValueForProspectiveRender(\n                  err,\n                  workStore.route,\n                  Phase.ProspectiveRender\n                )\n              }\n            },\n            bootstrapScriptContent,\n            bootstrapScripts: [bootstrapScript],\n          }\n        )\n\n        // The listener to abort our own render controller must be added after\n        // React has added its listener, to ensure that pending I/O is not\n        // aborted/rejected too early.\n        initialClientReactController.signal.addEventListener(\n          'abort',\n          () => {\n            initialClientRenderController.abort()\n          },\n          { once: true }\n        )\n\n        pendingInitialClientResult.catch((err: unknown) => {\n          if (\n            initialClientReactController.signal.aborted ||\n            isPrerenderInterruptedError(err)\n          ) {\n            // These are expected errors that might error the prerender. we ignore them.\n          } else if (\n            process.env.NEXT_DEBUG_BUILD ||\n            process.env.__NEXT_VERBOSE_LOGGING\n          ) {\n            // We don't normally log these errors because we are going to retry anyway but\n            // it can be useful for debugging Next.js itself to get visibility here when needed\n            printDebugThrownValueForProspectiveRender(\n              err,\n              workStore.route,\n              Phase.ProspectiveRender\n            )\n          }\n        })\n\n        // This is mostly needed for dynamic `import()`s in client components.\n        // Promises passed to client were already awaited above (assuming that they came from cached functions)\n        trackPendingModules(cacheSignal)\n        await cacheSignal.cacheReady()\n        workUnitAsyncStorage.run(\n          initialClientPrerenderStore,\n          initialClientReactController.abort.bind(initialClientReactController)\n        )\n      }\n\n      const finalServerReactController = new AbortController()\n      const finalServerRenderController = new AbortController()\n\n      const varyParamsAccumulator = createResponseVaryParamsAccumulator()\n\n      const finalStageController = new StagedRenderingController({\n        abortSignal: finalServerRenderController.signal,\n        abandonController: null,\n        syncIO: SyncIOMode.AllowedInDynamic,\n        finalStage: RenderStage.Static,\n      })\n\n      // Records runtime data accesses from the payload and render stores\n      // below into the RSC payload (as `u`), resolved `true` at the moment\n      // of first access so the fulfillment row is serialized at the stream\n      // position where it happened. Used when generating per-segment\n      // prefetch responses. Request data props (params, searchParams) are\n      // created while the RSC payload is constructed, under the payload\n      // store; both stores share the same promise so it observes accesses\n      // from both.\n      const runtimeDataAccessed = createPromiseWithResolvers<boolean>()\n\n      // Companion cell holding this prerender's static-prefetch measurement\n      // directly — the value that becomes the route's build-constant hint:\n      // starts true, and a disqualifying runtime-data access flips it false\n      // — fallback-param accesses on an upgradeable route don't (see\n      // trackRuntimeDataAccessed, which applies the rule at access time).\n      // Read after the prerender settles by\n      // collectSegmentData below. Shared between both stores for the same\n      // reason as the promise.\n      const shouldAttemptStaticPrefetch = { current: true }\n\n      const finalServerPayloadPrerenderStore: PrerenderStoreModernServer = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        // While this render signal isn't going to be used to abort a React render while getting the RSC payload\n        // various request data APIs bind to this controller to reject after completion.\n        renderSignal: finalServerRenderController.signal,\n        // When we generate the RSC payload we might abort this controller due to sync IO\n        // but we don't actually care about sync IO in this phase so we use a throw away controller\n        // that isn't connected to anything\n        controller: new AbortController(),\n        // NOTE: we're not using the stage controller for sync IO tracking,\n        // so this doesn't break the \"throwaway abort controller\" trick above.\n        stagedRendering: finalStageController,\n        // All caches we could read must already be filled so no tracking is necessary\n        cacheSignal: null,\n        dynamicTracking: null,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n        hmrRefreshHash: undefined,\n        varyParamsAccumulator,\n        runtimeDataAccessed,\n        shouldAttemptStaticPrefetch,\n        isFallbackUpgradeable: renderOpts.isFallbackUpgradeable === true,\n      }\n\n      const shellByteLengthDeferred = createPromiseWithResolvers<\n        number | null\n      >()\n\n      const finalServerPayload = await workUnitAsyncStorage.run(\n        finalServerPayloadPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        {\n          is404: res.statusCode === 404,\n          shellByteLengthPromise: shellByteLengthDeferred.promise,\n        }\n      )\n\n      let staleTimeIterable: StaleTimeIterable | undefined\n      if (cachedNavigations) {\n        staleTimeIterable = new StaleTimeIterable()\n        finalServerPayload.s = staleTimeIterable\n      }\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        // Embed the runtime data access tracking in the payload so\n        // collectSegmentData can replay it per stage. Only needed when the\n        // Flight data will be decomposed into segment prefetches below.\n        finalServerPayload.u = runtimeDataAccessed.promise\n      }\n\n      const serverDynamicTracking = createDynamicTrackingState(\n        isDebugDynamicAccesses\n      )\n      let resultIsPartial = false\n\n      const finalServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: finalServerRenderController.signal,\n        controller: finalServerReactController,\n        stagedRendering: finalStageController,\n        // All caches we could read must already be filled so no tracking is necessary\n        cacheSignal: null,\n        dynamicTracking: serverDynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n        hmrRefreshHash: undefined,\n        varyParamsAccumulator,\n        runtimeDataAccessed,\n        shouldAttemptStaticPrefetch,\n        isFallbackUpgradeable: renderOpts.isFallbackUpgradeable === true,\n      })\n\n      if (staleTimeIterable !== undefined) {\n        trackStaleTime(\n          finalServerPrerenderStore,\n          staleTimeIterable,\n          selectStaleTime\n        )\n      }\n\n      const streamState = createStreamPendingState()\n      const collectedChunks = createPrerenderChunksAccumulator()\n      const collectedChunksByStage = createStageChunksAccumulator()\n      const collectChunk = (chunk: Uint8Array) => {\n        collectPrerenderChunk(\n          collectedChunks,\n          finalServerReactController.signal,\n          chunk\n        )\n        collectStageChunk(\n          collectedChunksByStage,\n          finalStageController.currentStage,\n          chunk\n        )\n      }\n\n      let didHandleUnexpectedAbort = false\n      /**\n       * @returns - whether or not the task should be skipped\n       * because the render was already aborted.\n       * */\n      const checkUnexpectedAbort = (): boolean => {\n        if (finalServerReactController.signal.aborted) {\n          // If the server controller is already aborted, then we must have encountered sync IO\n          if (!didHandleUnexpectedAbort) {\n            didHandleUnexpectedAbort = true\n            onUnexpectedAbort()\n          }\n          return true\n        }\n\n        // Not aborted.\n        return false\n      }\n\n      const onUnexpectedAbort = () => {\n        resultIsPartial = true\n\n        // FIXME(NAR-810): If we're already aborted due to Sync IO, there should be no need to\n        // finish the accumulators. However, it seems like in `--debug-prerender`\n        // the stream will stay open if we don't settle these here.\n        if (process.env.NODE_ENV === 'development') {\n          if (staleTimeIterable !== undefined) {\n            staleTimeIterable.close()\n          }\n          runtimeDataAccessed.resolve(false)\n          finishAccumulatingVaryParams(varyParamsAccumulator)\n        }\n      }\n\n      let debugEndTime: number | undefined = undefined\n      let didLinkDataUnblockNewContent = false\n\n      await runInSequentialTasks(\n        async () => {\n          if (process.env.NODE_ENV === 'development') {\n            // The end time should be tracked whenever we abort.\n            // We defensively do this before React runs its abort listener,\n            // although in practice this shouldn't matter.\n            finalServerReactController.signal.addEventListener(\n              'abort',\n              () => {\n                debugEndTime = performance.timeOrigin + performance.now()\n              },\n              { once: true }\n            )\n          }\n\n          finalStageController.advanceStage(RenderStage.ShellStatic)\n\n          let stream = workUnitAsyncStorage.run(\n            finalServerPrerenderStore,\n            ComponentMod.renderToReadableStream,\n            finalServerPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: (err: unknown) => {\n                return serverComponentsErrorHandler(err)\n              },\n              signal: finalServerReactController.signal,\n            }\n          )\n\n          // The listener to abort our own render controller must be added\n          // after React has added its listener, to ensure that pending I/O\n          // is not aborted/rejected too early.\n          finalServerReactController.signal.addEventListener(\n            'abort',\n            () => {\n              finalServerRenderController.abort()\n            },\n            { once: true }\n          )\n\n          // Note: this await will only resolve after the last task (unless sync IO aborts the render earlier)\n          // We await it here so that if the stream errors, it's not an unhandled rejection.\n          await iterateStreamingPrerenderChunks(\n            stream,\n            finalServerReactController.signal,\n            collectChunk,\n            streamState\n          )\n        },\n        () => {\n          if (checkUnexpectedAbort()) return\n          finalStageController.advanceStage(RenderStage.Static)\n        },\n        () => {\n          if (checkUnexpectedAbort()) return\n\n          // Finish the accumulators. We need to wait for Flight to flush the result into the stream,\n          // which is scheduled in a (fast) immediate, so we do this in a separate task\n          // (fast immediates will be drained at the end of the task, so in the next task we know we're done flushing)\n\n          // If new chunks were emitted in the static stage\n          // (after unblocking link data, i.e. static params)\n          // then the prerender uses link data.\n          // NOTE: we must capture this *before* resolving staleTime/varyParams,\n          // which always emit new static chunks.\n          didLinkDataUnblockNewContent =\n            collectedChunksByStage.staticChunks.length >\n            collectedChunksByStage.shellStaticChunks.length\n\n          // Now that the prerendering is complete, we know the final stale\n          // time and vary params. Close the stale time iterable and resolve\n          // the vary params thenable so Flight can serialize their values\n          // into the stream. The timing here is important: both were\n          // included in the Flight payload, but they can only be serialized\n          // at the very end, after all the components have finished.\n          if (staleTimeIterable !== undefined) {\n            staleTimeIterable.close()\n          }\n          // Idempotent: a no-op if a runtime data access already resolved it\n          // `true`. The `false` row lands here, after all stage content.\n          runtimeDataAccessed.resolve(false)\n          finishAccumulatingVaryParams(varyParamsAccumulator)\n\n          shellByteLengthDeferred.resolve(\n            didLinkDataUnblockNewContent\n              ? collectedChunksByStage.shellStaticChunks.reduce(\n                  (acc, chunk) => acc + chunk.byteLength,\n                  0\n                )\n              : null\n          )\n        },\n        () => {\n          if (checkUnexpectedAbort()) return\n\n          if (streamState.isPending) {\n            // If prerenderIsPending then we have blocked for longer than a Task and we assume\n            // there is something unfinished.\n            resultIsPartial = true\n          }\n\n          workUnitAsyncStorage.run(\n            finalServerPrerenderStore,\n            finalServerReactController.abort.bind(finalServerReactController)\n          )\n        }\n      )\n\n      // If a sync IO error occurred, there's no point continuing.\n      // NOTE: this early exit is load-bearing. The way we simulate a halt\n      // in a render (ignoring all chunks emitted after an abort)\n      // can lead to a blocked root chunk (if it didn't flush before the abort).\n      // This means that deserializing the RSC payload can hang in unexpected places --\n      // normally, we can at least get the outer object with hanging promises inside.\n      throwIfSyncIOUsed(workStore, serverDynamicTracking)\n\n      const reactServerResult = (reactServerPrerenderResult =\n        new ReactServerPrerenderResult(collectedChunks.prerenderChunks))\n      reactServerPrerenderResultIsDynamic = resultIsPartial\n      reactServerPrerenderStore = finalServerPrerenderStore\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        metadata.flightData = Buffer.concat(\n          cachedNavigations\n            ? prependIsPartialByteToChunks(\n                reactServerResult.asChunks(),\n                resultIsPartial\n              )\n            : reactServerResult.asChunks()\n        )\n\n        // collectSegmentData needs the raw flight data without the marker byte.\n        const flightData = cachedNavigations\n          ? metadata.flightData.subarray(1)\n          : metadata.flightData\n\n        await collectSegmentData(\n          flightData,\n          finalServerPrerenderStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      const clientDynamicTracking = createDynamicTrackingState(\n        isDebugDynamicAccesses\n      )\n\n      const finalClientReactController = new AbortController()\n      const finalClientRenderController = new AbortController()\n\n      const finalClientPrerenderStore: PrerenderStore = {\n        type: 'prerender-client',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: finalClientRenderController.signal,\n        controller: finalClientReactController,\n        // No APIs require a cacheSignal through the workUnitStore during the HTML prerender\n        cacheSignal: null,\n        dynamicTracking: clientDynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n        hmrRefreshHash: undefined,\n        // Client prerenders don't track server param access\n        varyParamsAccumulator: null,\n      }\n\n      let dynamicValidation = createDynamicValidationState()\n\n      const finalClientOnHeaders = createOnHeadersCallback(appendHeader)\n\n      let { prelude: unprocessedPrelude, postponed } =\n        await runInSequentialTasks(\n          () => {\n            const stream =\n              process.env.NODE_ENV === 'development' &&\n              collectedChunks.allChunks\n                ? createNodeStreamWithLateRelease(\n                    collectedChunks.prerenderChunks,\n                    collectedChunks.allChunks,\n                    finalClientReactController.signal\n                  )\n                : reactServerResult.asUnclosingStream()\n\n            const pendingFinalClientResult = workUnitAsyncStorage.run(\n              finalClientPrerenderStore,\n              getClientPrerender,\n              // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n              <App\n                reactServerStream={stream}\n                reactDebugStream={undefined}\n                debugEndTime={debugEndTime}\n                preinitScripts={preinitScripts}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />,\n              {\n                signal: finalClientReactController.signal,\n                onError: (err: unknown, errorInfo: ErrorInfo) => {\n                  if (\n                    isPrerenderInterruptedError(err) ||\n                    finalClientReactController.signal.aborted\n                  ) {\n                    const componentStack: string | undefined = (\n                      errorInfo as any\n                    ).componentStack\n                    if (typeof componentStack === 'string') {\n                      trackAllowedDynamicAccess(\n                        err,\n                        workStore,\n                        componentStack,\n                        dynamicValidation,\n                        clientDynamicTracking\n                      )\n                    }\n                    return\n                  }\n\n                  return htmlRendererErrorHandler(err, errorInfo)\n                },\n                onHeaders: finalClientOnHeaders,\n                maxHeadersLength: reactMaxHeadersLength,\n                bootstrapScriptContent,\n                bootstrapScripts: [bootstrapScript],\n              }\n            )\n\n            // The listener to abort our own render controller must be added\n            // after React has added its listener, to ensure that pending I/O is\n            // not aborted/rejected too early.\n            finalClientReactController.signal.addEventListener(\n              'abort',\n              () => {\n                finalClientRenderController.abort()\n              },\n              { once: true }\n            )\n\n            return pendingFinalClientResult\n          },\n          () => {\n            workUnitAsyncStorage.run(\n              finalClientPrerenderStore,\n              finalClientReactController.abort.bind(finalClientReactController)\n            )\n          }\n        )\n\n      metadata.hasPendingUi = postponed != null\n\n      const { prelude, preludeIsEmpty } =\n        await processPreludeOp(unprocessedPrelude)\n\n      throwIfDisallowedDynamic(\n        workStore,\n        preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n        dynamicValidation,\n        serverDynamicTracking,\n        allowEmptyStaticShell\n      )\n\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n\n      let htmlStream: AnyStream = prelude\n      if (resultIsPartial) {\n        if (postponed != null) {\n          metadata.postponed = await getDynamicHTMLPostponedState(\n            postponed,\n            preludeIsEmpty\n              ? DynamicHTMLPreludeState.Empty\n              : DynamicHTMLPreludeState.Full,\n            fallbackRouteParams,\n            resumeDataCache,\n            cacheComponents\n          )\n        } else {\n          metadata.postponed = await getDynamicDataPostponedState(\n            resumeDataCache,\n            cacheComponents\n          )\n        }\n        reactServerResult.consume()\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(htmlStream, {\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          }),\n          dynamicAccess: consumeDynamicAccess(\n            serverDynamicTracking,\n            clientDynamicTracking\n          ),\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: finalServerPrerenderStore.revalidate,\n          collectedExpire: finalServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(finalServerPrerenderStore.stale),\n          collectedTags: finalServerPrerenderStore.tags,\n          renderResumeDataCache: createRenderResumeDataCache(resumeDataCache),\n        }\n      } else if (postponed != null) {\n        // We postponed but nothing dynamic was used. We resume the render now and immediately abort it\n        // so we can set all the postponed boundaries to client render mode before we store the HTML response\n        const foreverStream = createPendingStream()\n        const resumePrelude = await workUnitAsyncStorage.run(\n          finalServerPrerenderStore,\n          resumeAndAbort,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n          <App\n            reactServerStream={foreverStream}\n            reactDebugStream={undefined}\n            debugEndTime={undefined}\n            preinitScripts={() => {}}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          JSON.parse(JSON.stringify(postponed)),\n          {\n            signal: createRenderInBrowserAbortSignal(),\n            onError: htmlRendererErrorHandler,\n            nonce,\n          }\n        )\n        // First we write everything from the prerender, then we write everything from the aborted resume render\n        htmlStream = chainStreams(prelude, resumePrelude)\n      }\n\n      if (workStore.forceDynamic) {\n        throw new StaticGenBailoutError(\n          'Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js'\n        )\n      }\n\n      const stream = await continueStaticPrerenderWithInlinedData(\n        htmlStream,\n        reactServerResult,\n        fallbackRouteParams,\n        createInlinedDataStream,\n        formState,\n        nonce,\n        getServerInsertedHTML,\n        getServerInsertedMetadata,\n        ctx.sharedContext.deploymentId,\n        ComponentMod,\n        renderFlightStream,\n        clientModules,\n        filterStackFrame,\n        serverComponentsErrorHandler\n      )\n\n      return {\n        digestErrorsMap: reactServerErrorsByDigest,\n        ssrErrors: allCapturedErrors,\n        stream,\n        dynamicAccess: consumeDynamicAccess(\n          serverDynamicTracking,\n          clientDynamicTracking\n        ),\n        collectedRevalidate: finalServerPrerenderStore.revalidate,\n        collectedExpire: finalServerPrerenderStore.expire,\n        collectedStale: selectStaleTime(finalServerPrerenderStore.stale),\n        collectedTags: finalServerPrerenderStore.tags,\n        renderResumeDataCache: createRenderResumeDataCache(resumeDataCache),\n      }\n    } else if (experimental.isRoutePPREnabled) {\n      // We're statically generating with PPR and need to do dynamic tracking\n      let dynamicTracking = createDynamicTrackingState(isDebugDynamicAccesses)\n\n      const resumeDataCache = createPrerenderResumeDataCache()\n      const pprReactServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender-ppr',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        dynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n      })\n      const RSCPayload = await workUnitAsyncStorage.run(\n        pprReactServerPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n      let reactServerResult: ReactServerPrerenderResult\n      reactServerResult = reactServerPrerenderResult =\n        await createReactServerPrerenderResultFromRender(\n          workUnitAsyncStorage.run(\n            pprReactServerPrerenderStore,\n            renderFlightStream,\n            ComponentMod,\n            RSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n        )\n\n      const ssrPrerenderStore: PrerenderStore = {\n        type: 'prerender-ppr',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        dynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        resumeDataCache,\n      }\n      const pprOnHeaders = createOnHeadersCallback(appendHeader)\n      const { prelude: unprocessedPrelude, postponed } =\n        await workUnitAsyncStorage.run(\n          ssrPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n          <App\n            reactServerStream={reactServerResult.asUnclosingStream()}\n            reactDebugStream={undefined}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            onError: htmlRendererErrorHandler,\n            onHeaders: pprOnHeaders,\n            maxHeadersLength: reactMaxHeadersLength,\n            bootstrapScriptContent,\n            bootstrapScripts: [bootstrapScript],\n          }\n        )\n\n      metadata.hasPendingUi = postponed != null\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n\n      // After awaiting here we've waited for the entire RSC render to complete. Crucially this means\n      // that when we detect whether we've used dynamic APIs below we know we'll have picked up even\n      // parts of the React Server render that might not be used in the SSR render.\n      const flightData = await streamToBuffer(reactServerResult.asStream())\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          ssrPrerenderStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      const { prelude, preludeIsEmpty } =\n        await processPreludeOp(unprocessedPrelude)\n\n      /**\n       * When prerendering there are three outcomes to consider\n       *\n       *   Dynamic HTML:      The prerender has dynamic holes (caused by using Next.js Dynamic Rendering APIs)\n       *                      We will need to resume this result when requests are handled and we don't include\n       *                      any server inserted HTML or inlined flight data in the static HTML\n       *\n       *   Dynamic Data:      The prerender has no dynamic holes but dynamic APIs were used. We will not\n       *                      resume this render when requests are handled but we will generate new inlined\n       *                      flight data since it is dynamic and differences may end up reconciling on the client\n       *\n       *   Static:            The prerender has no dynamic holes and no dynamic APIs were used. We statically encode\n       *                      all server inserted HTML and flight data\n       */\n      // First we check if we have any dynamic holes in our HTML prerender\n      if (accessedDynamicData(dynamicTracking.dynamicAccesses)) {\n        if (postponed != null) {\n          // Dynamic HTML case.\n          metadata.postponed = await getDynamicHTMLPostponedState(\n            postponed,\n            preludeIsEmpty\n              ? DynamicHTMLPreludeState.Empty\n              : DynamicHTMLPreludeState.Full,\n            fallbackRouteParams,\n            resumeDataCache,\n            cacheComponents\n          )\n        } else {\n          // Dynamic Data case.\n          metadata.postponed = await getDynamicDataPostponedState(\n            resumeDataCache,\n            cacheComponents\n          )\n        }\n        // Regardless of whether this is the Dynamic HTML or Dynamic Data case we need to ensure we include\n        // server inserted html in the static response because the html that is part of the prerender may depend on it\n        // It is possible in the set of stream transforms for Dynamic HTML vs Dynamic Data may differ but currently both states\n        // require the same set so we unify the code path here\n        reactServerResult.consume()\n        const pprDynamicOpts = {\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(prelude, pprDynamicOpts),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: pprReactServerPrerenderStore.revalidate,\n          collectedExpire: pprReactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(pprReactServerPrerenderStore.stale),\n          collectedTags: pprReactServerPrerenderStore.tags,\n        }\n      } else if (fallbackRouteParams && fallbackRouteParams.size > 0) {\n        // Rendering the fallback case.\n        metadata.postponed = await getDynamicDataPostponedState(\n          resumeDataCache,\n          cacheComponents\n        )\n\n        const pprFallbackDynamicOpts = {\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(\n            prelude,\n            pprFallbackDynamicOpts\n          ),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: pprReactServerPrerenderStore.revalidate,\n          collectedExpire: pprReactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(pprReactServerPrerenderStore.stale),\n          collectedTags: pprReactServerPrerenderStore.tags,\n        }\n      } else {\n        // Static case\n        // We still have not used any dynamic APIs. At this point we can produce an entirely static prerender response\n        if (workStore.forceDynamic) {\n          throw new StaticGenBailoutError(\n            'Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js'\n          )\n        }\n\n        let htmlStream: AnyStream = prelude\n        if (postponed != null) {\n          // We postponed but nothing dynamic was used. We resume the render now and immediately abort it\n          // so we can set all the postponed boundaries to client render mode before we store the HTML response\n          const foreverStream = createPendingStream()\n          const resumePrelude = await resumeAndAbort(\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n            <App\n              reactServerStream={foreverStream}\n              reactDebugStream={undefined}\n              debugEndTime={undefined}\n              preinitScripts={() => {}}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            JSON.parse(JSON.stringify(postponed)),\n            {\n              signal: createRenderInBrowserAbortSignal(),\n              onError: htmlRendererErrorHandler,\n              nonce,\n            }\n          )\n          // First we write everything from the prerender, then we write everything from the aborted resume render\n          htmlStream = chainStreams(prelude, resumePrelude)\n        }\n\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueStaticPrerender(htmlStream, {\n            inlinedDataStream: createInlinedDataStream(\n              reactServerResult.consumeAsStream(),\n              nonce,\n              formState\n            ),\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          }),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: pprReactServerPrerenderStore.revalidate,\n          collectedExpire: pprReactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(pprReactServerPrerenderStore.stale),\n          collectedTags: pprReactServerPrerenderStore.tags,\n        }\n      }\n    } else {\n      const prerenderLegacyStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender-legacy',\n        phase: 'render',\n        rootParams,\n        implicitTags,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n      })\n      // This is a regular static generation. We don't do dynamic tracking because we rely on\n      // the old-school dynamic error handling to bail out of static generation\n      const RSCPayload = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n\n      let reactServerResult: ReactServerPrerenderResult\n      reactServerResult = reactServerPrerenderResult =\n        await createReactServerPrerenderResultFromRender(\n          workUnitAsyncStorage.run(\n            prerenderLegacyStore,\n            renderFlightStream,\n            ComponentMod,\n            RSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n        )\n\n      const { stream: htmlStream } = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        renderFizzStream,\n        // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n        <App\n          reactServerStream={reactServerResult.asUnclosingStream()}\n          reactDebugStream={undefined}\n          debugEndTime={undefined}\n          preinitScripts={preinitScripts}\n          ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n          nonce={nonce}\n          images={ctx.renderOpts.images}\n        />,\n        {\n          onError: htmlRendererErrorHandler,\n          nonce,\n          bootstrapScriptContent,\n          bootstrapScripts: [bootstrapScript],\n        },\n        { waitForAllReady: true }\n      )\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        const flightData = await streamToBuffer(reactServerResult.asStream())\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          prerenderLegacyStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n      return {\n        digestErrorsMap: reactServerErrorsByDigest,\n        ssrErrors: allCapturedErrors,\n        stream: await continueFizzStream(htmlStream, {\n          inlinedDataStream: createInlinedDataStream(\n            reactServerResult.consumeAsStream(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: true,\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }),\n        // TODO: Should this include the SSR pass?\n        collectedRevalidate: prerenderLegacyStore.revalidate,\n        collectedExpire: prerenderLegacyStore.expire,\n        collectedStale: selectStaleTime(prerenderLegacyStore.stale),\n        collectedTags: prerenderLegacyStore.tags,\n      }\n    }\n  } catch (err) {\n    if (\n      isStaticGenBailoutError(err) ||\n      (typeof err === 'object' &&\n        err !== null &&\n        'message' in err &&\n        typeof err.message === 'string' &&\n        err.message.includes(\n          'https://nextjs.org/docs/advanced-features/static-html-export'\n        ))\n    ) {\n      // Ensure that \"next dev\" prints the red error overlay\n      throw err\n    }\n\n    // If this is a static generation error, we need to throw it so that it\n    // can be handled by the caller if we're in static generation mode.\n    if (isDynamicServerError(err)) {\n      throw err\n    }\n\n    // If a bailout made it to this point, it means it wasn't wrapped inside\n    // a suspense boundary.\n    const shouldBailoutToCSR = isBailoutToCSRError(err)\n    if (shouldBailoutToCSR) {\n      const stack = getStackWithoutErrorMessage(err)\n      error(\n        `${err.reason} should be wrapped in a suspense boundary at page \"${pagePath}\". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout\\n${stack}`\n      )\n\n      throw err\n    }\n\n    // If we errored when we did not have an RSC stream to read from. This is\n    // not just a render error, we need to throw early.\n    if (reactServerPrerenderResult === null) {\n      throw err\n    }\n    let errorType: MetadataErrorType | 'redirect' | undefined\n    const isHTTPAccessFallback = isHTTPAccessFallbackError(err)\n    const isRedirect = isRedirectError(err)\n\n    if (isHTTPAccessFallback) {\n      res.statusCode = getAccessFallbackHTTPStatus(err)\n      metadata.statusCode = res.statusCode\n      errorType = getAccessFallbackErrorTypeByStatus(res.statusCode)\n    } else if (isRedirect) {\n      errorType = 'redirect'\n      res.statusCode = getRedirectStatusCodeFromError(err)\n      metadata.statusCode = res.statusCode\n\n      const redirectUrl = addPathPrefix(getURLFromRedirectError(err), basePath)\n\n      setHeader('location', redirectUrl)\n    } else {\n      res.statusCode = 500\n      metadata.statusCode = res.statusCode\n    }\n\n    if (cacheComponents && !isHTTPAccessFallback && !isRedirect) {\n      throw reactServerErrorsByDigest.get((err as any).digest) ?? err\n    }\n\n    const [errorPreinitScripts, errorBootstrapScript] = getRequiredScripts(\n      buildManifest,\n      assetPrefix,\n      crossOrigin,\n      subresourceIntegrityManifest,\n      getAssetQueryString(ctx, false),\n      nonce,\n      UNDERSCORE_NOT_FOUND_ROUTE_ENTRY\n    )\n\n    const errorBootstrapScriptContent =\n      buildManifest.pagesChunkGroupBootstrapParams &&\n      buildManifest.chunkLoadingGlobal\n        ? getTurbopackChunkGroupBootstrap(\n            buildManifest.pagesChunkGroupBootstrapParams,\n            buildManifest.chunkLoadingGlobal,\n            [UNDERSCORE_NOT_FOUND_ROUTE_ENTRY]\n          )\n        : undefined\n\n    if (cacheComponents) {\n      const originalFlightPrerenderResult = reactServerPrerenderResult\n      const originalFlightPrerenderResultIsDynamic =\n        reactServerPrerenderResultIsDynamic\n      const originalResumeDataCache = reactServerResumeDataCache\n      const originalPrerenderStore =\n        reactServerPrerenderStore as PrerenderStore | null\n\n      if (originalFlightPrerenderResult === null) {\n        throw new InvariantError(\n          'Cache Components error recovery expected an original Flight prerender result'\n        )\n      }\n      if (originalFlightPrerenderResultIsDynamic === null) {\n        throw new InvariantError(\n          'Cache Components error recovery expected to know whether the original Flight prerender result was dynamic'\n        )\n      }\n      if (originalResumeDataCache === null) {\n        throw new InvariantError(\n          'Cache Components error recovery expected an original resume data cache'\n        )\n      }\n      if (originalPrerenderStore === null) {\n        throw new InvariantError(\n          'Cache Components error recovery expected an original prerender store'\n        )\n      }\n      const originalCollectedStale = selectStaleTime(\n        originalPrerenderStore.stale\n      )\n\n      // The final recovery still belongs to Cache Components. Render the error\n      // payload with the same prerender APIs as the normal path so not-found\n      // metadata can participate in static, dynamic-data, and dynamic-HTML\n      // outcomes instead of being dropped from the recovery shell.\n      const errorServerReactController = new AbortController()\n      const errorServerRenderController = new AbortController()\n      const errorServerDynamicTracking = createDynamicTrackingState(\n        isDebugDynamicAccesses\n      )\n      const errorPrerenderStore: PrerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: errorServerRenderController.signal,\n        controller: errorServerReactController,\n        stagedRendering: null,\n        cacheSignal: null,\n        dynamicTracking: errorServerDynamicTracking,\n        revalidate:\n          typeof prerenderStore?.revalidate !== 'undefined'\n            ? prerenderStore.revalidate\n            : INFINITE_CACHE,\n        expire:\n          typeof prerenderStore?.expire !== 'undefined'\n            ? prerenderStore.expire\n            : INFINITE_CACHE,\n        stale:\n          typeof prerenderStore?.stale !== 'undefined'\n            ? prerenderStore.stale\n            : INFINITE_CACHE,\n        tags: [...(prerenderStore?.tags || implicitTags.tags)],\n        resumeDataCache: originalResumeDataCache,\n        hmrRefreshHash: undefined,\n        varyParamsAccumulator: null,\n        runtimeDataAccessed: null,\n        shouldAttemptStaticPrefetch: null,\n        isFallbackUpgradeable: renderOpts.isFallbackUpgradeable === true,\n      }\n\n      const errorRSCPayload = await workUnitAsyncStorage.run(\n        errorPrerenderStore,\n        getErrorRSCPayload,\n        tree,\n        ctx,\n        reactServerErrorsByDigest.has((err as any).digest) ? undefined : err,\n        errorType,\n        // The recovery shell only bootstraps the original Flight data. Avoid\n        // blocking that shell on error-page metadata or viewport.\n        false\n      )\n\n      const errorServerResult = await createReactServerPrerenderResult(\n        runInSequentialTasks(\n          async () => {\n            const pendingErrorServerResult = workUnitAsyncStorage.run(\n              errorPrerenderStore,\n              getServerPrerender(ComponentMod),\n              errorRSCPayload,\n              clientModules,\n              {\n                filterStackFrame,\n                signal: errorServerReactController.signal,\n                onError: (rscError: unknown) => {\n                  return serverComponentsErrorHandler(rscError)\n                },\n              }\n            )\n\n            // The listener to abort our own render controller must be added\n            // after React has added its listener, to ensure that pending I/O\n            // is not aborted/rejected too early.\n            errorServerReactController.signal.addEventListener(\n              'abort',\n              () => {\n                errorServerRenderController.abort()\n              },\n              { once: true }\n            )\n\n            const prerenderResult = await pendingErrorServerResult\n            return prerenderResult\n          },\n          () => {\n            if (!errorServerReactController.signal.aborted) {\n              workUnitAsyncStorage.run(\n                errorPrerenderStore,\n                errorServerReactController.abort.bind(\n                  errorServerReactController\n                )\n              )\n            }\n          }\n        )\n      )\n\n      try {\n        const errorClientReactController = new AbortController()\n        const errorClientRenderController = new AbortController()\n        const errorClientDynamicTracking = createDynamicTrackingState(\n          isDebugDynamicAccesses\n        )\n        const errorDynamicValidation = createDynamicValidationState()\n        const errorClientPrerenderStore: PrerenderStore = {\n          type: 'prerender-client',\n          phase: 'render',\n          rootParams,\n          fallbackRouteParams,\n          implicitTags,\n          renderSignal: errorClientRenderController.signal,\n          controller: errorClientReactController,\n          cacheSignal: null,\n          dynamicTracking: errorClientDynamicTracking,\n          revalidate: errorPrerenderStore.revalidate,\n          expire: errorPrerenderStore.expire,\n          stale: errorPrerenderStore.stale,\n          tags: [...(errorPrerenderStore.tags || implicitTags.tags)],\n          resumeDataCache: originalResumeDataCache,\n          hmrRefreshHash: undefined,\n          varyParamsAccumulator: null,\n        }\n\n        const {\n          prelude: unprocessedErrorHtmlStream,\n          postponed: errorPostponed,\n        } = await runInSequentialTasks(\n          () => {\n            const pendingErrorHtmlResult = workUnitAsyncStorage.run(\n              errorClientPrerenderStore,\n              getClientPrerender,\n              // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n              <ErrorApp\n                reactServerStream={errorServerResult.asUnclosingStream()}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                preinitScripts={errorPreinitScripts}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />,\n              {\n                nonce,\n                bootstrapScriptContent: errorBootstrapScriptContent,\n                bootstrapScripts: [errorBootstrapScript],\n                formState,\n                signal: errorClientReactController.signal,\n                onError: (clientError: unknown, errorInfo: ErrorInfo) => {\n                  if (\n                    isPrerenderInterruptedError(clientError) ||\n                    errorClientReactController.signal.aborted\n                  ) {\n                    const componentStack: string | undefined = (\n                      errorInfo as any\n                    ).componentStack\n                    if (typeof componentStack === 'string') {\n                      trackAllowedDynamicAccess(\n                        clientError,\n                        workStore,\n                        componentStack,\n                        errorDynamicValidation,\n                        errorClientDynamicTracking\n                      )\n                    }\n                    return\n                  }\n\n                  return htmlRendererErrorHandler(clientError, errorInfo)\n                },\n              }\n            )\n\n            // The listener to abort our own render controller must be added\n            // after React has added its listener, to ensure that pending I/O\n            // is not aborted/rejected too early.\n            errorClientReactController.signal.addEventListener(\n              'abort',\n              () => {\n                errorClientRenderController.abort()\n              },\n              { once: true }\n            )\n\n            return pendingErrorHtmlResult\n          },\n          () => {\n            workUnitAsyncStorage.run(\n              errorClientPrerenderStore,\n              errorClientReactController.abort.bind(errorClientReactController)\n            )\n          }\n        )\n\n        metadata.hasPendingUi = errorPostponed != null\n\n        const { prelude, preludeIsEmpty } = await processPreludeOp(\n          unprocessedErrorHtmlStream\n        )\n\n        if (preludeIsEmpty) {\n          console.error(\n            `Route \"${workStore.route}\" did not produce a static shell while rendering its error page.`\n          )\n          throwIfDisallowedDynamic(\n            workStore,\n            PreludeState.Empty,\n            errorDynamicValidation,\n            errorServerDynamicTracking,\n            false\n          )\n          throw new StaticGenBailoutError()\n        }\n\n        const getServerInsertedHTML = makeGetServerInsertedHTML({\n          polyfills,\n          renderServerInsertedHTML,\n          serverCapturedErrors: [],\n          basePath,\n          tracingMetadata: tracingMetadata,\n        })\n\n        let errorHtmlStream: AnyStream = prelude\n        if (originalFlightPrerenderResultIsDynamic) {\n          metadata.postponed = await getDynamicDataPostponedState(\n            originalResumeDataCache,\n            cacheComponents\n          )\n          originalFlightPrerenderResult.consume()\n          errorServerResult.consume()\n          return {\n            digestErrorsMap: reactServerErrorsByDigest,\n            ssrErrors: allCapturedErrors,\n            stream: await continueDynamicPrerender(errorHtmlStream, {\n              getServerInsertedHTML,\n              getServerInsertedMetadata,\n              deploymentId: ctx.sharedContext.deploymentId,\n            }),\n            dynamicAccess: consumeDynamicAccess(\n              errorServerDynamicTracking,\n              errorClientDynamicTracking\n            ),\n            collectedRevalidate: originalPrerenderStore.revalidate,\n            collectedExpire: originalPrerenderStore.expire,\n            collectedStale: originalCollectedStale,\n            collectedTags: originalPrerenderStore.tags,\n            renderResumeDataCache: createRenderResumeDataCache(\n              originalResumeDataCache\n            ),\n          }\n        } else if (errorPostponed != null) {\n          // We postponed but nothing dynamic was used. Resume the error shell\n          // and immediately abort it so postponed client boundaries are marked\n          // for browser rendering before the static response is stored.\n          const foreverStream = createPendingStream()\n          const resumePrelude = await workUnitAsyncStorage.run(\n            errorPrerenderStore,\n            resumeAndAbort,\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n            <ErrorApp\n              reactServerStream={foreverStream}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              preinitScripts={() => {}}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            JSON.parse(JSON.stringify(errorPostponed)),\n            {\n              signal: createRenderInBrowserAbortSignal(),\n              onError: htmlRendererErrorHandler,\n              nonce,\n            }\n          )\n          errorHtmlStream = chainStreams(prelude, resumePrelude)\n        }\n\n        if (workStore.forceDynamic) {\n          throw new StaticGenBailoutError(\n            'Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js'\n          )\n        }\n\n        const stream = await continueStaticPrerenderWithInlinedData(\n          errorHtmlStream,\n          originalFlightPrerenderResult,\n          fallbackRouteParams,\n          createInlinedDataStream,\n          formState,\n          nonce,\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          ctx.sharedContext.deploymentId,\n          ComponentMod,\n          renderFlightStream,\n          clientModules,\n          filterStackFrame,\n          serverComponentsErrorHandler\n        )\n\n        errorServerResult.consume()\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream,\n          dynamicAccess: consumeDynamicAccess(\n            errorServerDynamicTracking,\n            errorClientDynamicTracking\n          ),\n          collectedRevalidate: originalPrerenderStore.revalidate,\n          collectedExpire: originalPrerenderStore.expire,\n          collectedStale: originalCollectedStale,\n          collectedTags: originalPrerenderStore.tags,\n          renderResumeDataCache: createRenderResumeDataCache(\n            originalResumeDataCache\n          ),\n        }\n      } catch (finalErr: any) {\n        if (\n          process.env.__NEXT_DEV_SERVER &&\n          isHTTPAccessFallbackError(finalErr)\n        ) {\n          const { bailOnRootNotFound } =\n            require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n          bailOnRootNotFound()\n        }\n        throw finalErr\n      }\n    }\n\n    const prerenderLegacyStore: PrerenderStore = {\n      type: 'prerender-legacy',\n      phase: 'render',\n      rootParams,\n      implicitTags: implicitTags,\n      revalidate:\n        typeof prerenderStore?.revalidate !== 'undefined'\n          ? prerenderStore.revalidate\n          : INFINITE_CACHE,\n      expire:\n        typeof prerenderStore?.expire !== 'undefined'\n          ? prerenderStore.expire\n          : INFINITE_CACHE,\n      stale:\n        typeof prerenderStore?.stale !== 'undefined'\n          ? prerenderStore.stale\n          : INFINITE_CACHE,\n      tags: [...(prerenderStore?.tags || implicitTags.tags)],\n    }\n\n    const errorRSCPayload = await workUnitAsyncStorage.run(\n      prerenderLegacyStore,\n      getErrorRSCPayload,\n      tree,\n      ctx,\n      reactServerErrorsByDigest.has((err as any).digest) ? undefined : err,\n      errorType,\n      // Legacy prerender recovery should include the error payload head.\n      true\n    )\n\n    const errorServerStream = workUnitAsyncStorage.run(\n      prerenderLegacyStore,\n      renderFlightStream,\n      ComponentMod,\n      errorRSCPayload,\n      clientModules,\n      {\n        filterStackFrame,\n        onError: serverComponentsErrorHandler,\n      }\n    )\n\n    try {\n      const { stream: errorHtmlStream } = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        renderFizzStream,\n        // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n        <ErrorApp\n          reactServerStream={errorServerStream}\n          ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n          preinitScripts={errorPreinitScripts}\n          nonce={nonce}\n          images={ctx.renderOpts.images}\n        />,\n        {\n          nonce,\n          bootstrapScriptContent: errorBootstrapScriptContent,\n          bootstrapScripts: [errorBootstrapScript],\n          formState,\n        },\n        { waitForAllReady: true }\n      )\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        const flightData = await streamToBuffer(\n          reactServerPrerenderResult.asStream()\n        )\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          prerenderLegacyStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      return {\n        digestErrorsMap: reactServerErrorsByDigest,\n        ssrErrors: allCapturedErrors,\n        stream: await continueFizzStream(errorHtmlStream, {\n          inlinedDataStream: createInlinedDataStream(\n            reactServerPrerenderResult.consumeAsStream(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: true,\n          getServerInsertedHTML: makeGetServerInsertedHTML({\n            polyfills,\n            renderServerInsertedHTML,\n            serverCapturedErrors: [],\n            basePath,\n            tracingMetadata: tracingMetadata,\n          }),\n          getServerInsertedMetadata,\n          validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }),\n        dynamicAccess: null,\n        collectedRevalidate: prerenderLegacyStore.revalidate,\n        collectedExpire: prerenderLegacyStore.expire,\n        collectedStale: selectStaleTime(prerenderLegacyStore.stale),\n        collectedTags: prerenderLegacyStore.tags,\n      }\n    } catch (finalErr: any) {\n      if (\n        process.env.__NEXT_DEV_SERVER &&\n        isHTTPAccessFallbackError(finalErr)\n      ) {\n        const { bailOnRootNotFound } =\n          require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n        bailOnRootNotFound()\n      }\n      throw finalErr\n    }\n  }\n}\n\ntype StreamPendingState = { isPending: boolean }\n\nfunction createStreamPendingState(): StreamPendingState {\n  // This state essentially acts as a mutable out-parameter that should be set\n  // by something that consumes the stream.\n  // As a sanity check, we require it to be set at least once.\n  let _isPending: boolean | undefined\n  return {\n    get isPending() {\n      if (_isPending === undefined) {\n        throw new InvariantError(\n          'Expected stream state to be initialized before reading'\n        )\n      }\n      return _isPending\n    },\n    set isPending(value) {\n      _isPending = value\n    },\n  }\n}\n\nfunction createPrerenderChunksAccumulator(): PrerenderChunksAccumulator {\n  return {\n    // Chunks emitted before aborting the render.\n    prerenderChunks: [],\n    // In dev, we also collect chunks that the render emits after aborting,\n    // because they can contain debug info for chunks that did not\n    // resolve during the prerender. However, unlike a prerender, a render\n    // will also error all the pending chunks (instead of halting),\n    // so have to use something like `createNodeStreamWithLateRelease`\n    // to make the errors unobservable.\n    allChunks: process.env.NODE_ENV === 'development' ? [] : null,\n  }\n}\n\ntype PrerenderChunksAccumulator = {\n  prerenderChunks: Uint8Array[]\n  allChunks: Uint8Array[] | null\n}\n\nfunction collectPrerenderChunk(\n  chunks: PrerenderChunksAccumulator,\n  signal: AbortSignal,\n  chunk: Uint8Array\n) {\n  // The chunks emitted after an abort are not part of the prerender...\n  if (!signal.aborted) {\n    chunks.prerenderChunks.push(chunk)\n  }\n  // ...but if they contain debug info, we still want to collect them\n  // to improve error messages.\n  chunks.allChunks?.push(chunk)\n}\n\nasync function iterateStreamingPrerenderChunks(\n  stream: AnyStream,\n  signal: AbortSignal,\n  onChunk: (chunk: Uint8Array) => void,\n  streamState?: StreamPendingState\n): Promise<void> {\n  if (stream instanceof ReadableStream) {\n    const reader = stream.getReader()\n    if (streamState) {\n      streamState.isPending = true\n    }\n\n    // In production, there's no debug info, so we don't need to capture\n    // anything emitted after the abort and can cancel immediately.\n    if (process.env.NODE_ENV !== 'development') {\n      signal.addEventListener(\n        'abort',\n        () => {\n          reader.cancel(signal.reason)\n        },\n        { once: true }\n      )\n    }\n\n    while (true) {\n      const { done, value } = await reader.read()\n      if (done) {\n        break\n      }\n      onChunk(value)\n    }\n    if (streamState) {\n      streamState.isPending = false\n    }\n  } else {\n    const nodeStream = stream as Readable\n    if (streamState) {\n      streamState.isPending = true\n    }\n\n    let cancelled = false\n\n    // In production, there's no debug info, so we don't need to capture\n    // anything emitted after the abort and can cancel immediately.\n    if (process.env.NODE_ENV !== 'development') {\n      signal.addEventListener(\n        'abort',\n        () => {\n          if (!cancelled) {\n            cancelled = true\n            nodeStream.destroy()\n          }\n        },\n        { once: true }\n      )\n    }\n\n    try {\n      for await (const value of nodeStream) {\n        if (cancelled) break\n        onChunk(value)\n      }\n    } catch (err) {\n      if (!cancelled) {\n        throw err\n      }\n    }\n    if (streamState) {\n      streamState.isPending = false\n    }\n  }\n}\n\nconst getGlobalErrorStyles = async (\n  tree: LoaderTree,\n  ctx: AppRenderContext\n): Promise<{\n  GlobalError: GlobalErrorComponent\n  styles: ReactNode | undefined\n}> => {\n  const globalErrorModule = parseLoaderTree(tree).modules['global-error']\n\n  if (!globalErrorModule) {\n    throw new Error(\n      'Invariant: global-error module is required but not found in loader tree'\n    )\n  }\n\n  const {\n    componentMod: { createElement },\n  } = ctx\n\n  // Get the GlobalError component and styles from the loader tree\n  const [GlobalErrorComponent, styles] = await createComponentStylesAndScripts({\n    ctx,\n    filePath: globalErrorModule[1],\n    getComponent: globalErrorModule[0],\n    injectedCSS: new Set(),\n    injectedJS: new Set(),\n  })\n\n  let globalErrorStyles: ReactNode = styles\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    const dir =\n      (process.env.NEXT_RUNTIME === 'edge'\n        ? process.env.__NEXT_EDGE_PROJECT_DIR\n        : ctx.renderOpts.dir) || ''\n\n    const globalErrorModulePath = normalizeConventionFilePath(\n      dir,\n      globalErrorModule[1]\n    )\n    if (globalErrorModulePath) {\n      const SegmentViewNode = ctx.componentMod.SegmentViewNode\n      globalErrorStyles =\n        // This will be rendered next to GlobalError component under ErrorBoundary,\n        // it requires a key to avoid React warning about duplicate keys.\n        createElement(\n          SegmentViewNode,\n          {\n            key: 'ge-svn',\n            type: 'global-error',\n            pagePath: globalErrorModulePath,\n          },\n          globalErrorStyles\n        )\n    }\n  }\n\n  return {\n    GlobalError: GlobalErrorComponent,\n    styles: globalErrorStyles,\n  }\n}\n\nasync function collectSegmentData(\n  fullPageDataBuffer: Buffer,\n  prerenderStore: PrerenderStore,\n  ComponentMod: AppPageModule,\n  renderOpts: RenderOpts,\n  pagePath: string,\n  metadata: AppPageRenderResultMetadata\n): Promise<void> {\n  // Per-segment prefetch data\n  //\n  // All of the segments for a page are generated simultaneously, including\n  // during revalidations. This is to ensure consistency, because it's\n  // possible for a mismatch between a layout and page segment can cause the\n  // client to error during rendering. We want to preserve the ability of the\n  // client to recover from such a mismatch by re-requesting all the segments\n  // to get a consistent view of the page.\n  //\n  // For performance, we reuse the Flight output that was created when\n  // generating the initial page HTML. The Flight stream for the whole page is\n  // decomposed into a separate stream per segment.\n\n  const { clientModules, edgeRscModuleMapping, rscModuleMapping } =\n    getClientReferenceManifest()\n\n  // Manifest passed to the Flight client for reading the full-page Flight\n  // stream. Based off similar code in use-cache-wrapper.ts.\n  const isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n  const serverConsumerManifest = {\n    // moduleLoading must be null because we don't want to trigger preloads of ClientReferences\n    // to be added to the consumer. Instead, we'll wait for any ClientReference to be emitted\n    // which themselves will handle the preloading.\n    moduleLoading: null,\n    moduleMap: isEdgeRuntime ? edgeRscModuleMapping : rscModuleMapping,\n    serverModuleMap: getServerModuleMap(),\n  }\n\n  const selectStaleTime = createSelectStaleTime(renderOpts.experimental)\n  const staleTime = selectStaleTime(prerenderStore.stale)\n\n  // Resolve prefetch hints. At runtime (next start / ISR), the precomputed\n  // hints are already loaded from the prefetch-hints.json manifest. During\n  // build, compute them and write them to metadata so the build pipeline\n  // can persist them to the manifest. Like every other hint bit, the\n  // static-prefetch-attempt hint is computed once here and stays constant\n  // for the entire build — it must reach every response that carries\n  // prefetch hints (dynamic navigations included), which only the manifest\n  // flow can guarantee.\n  //\n  // The manifest isn't just a cache of this work — for some responses it's\n  // the only possible source. A response's FlightRouterState is built early\n  // in its render, before the runtime-data tracking has settled, so it can't\n  // read a finished measurement even when one is coming; and a dynamic\n  // navigation has no prerender to measure in the first place. Recomputing\n  // per render would therefore leave those responses with no hint at all,\n  // which is worse than an occasionally-stale one: the client would deopt\n  // straight to runtime prefetches instead of attempting static.\n  let hints: PrefetchHints | null\n  const prefetchInlining = renderOpts.experimental.prefetchInlining\n  if (renderOpts.isBuildTimePrerendering) {\n    // Whether the client should attempt a static prefetch for this route\n    // (PrefetchHint.ShouldAttemptStaticPrefetch): the prerender store's\n    // cell holds the hint value directly — true iff the build-time\n    // prerender accessed no runtime data that disqualifies a static\n    // attempt. The fallback-param upgradeability rule is applied at access\n    // time — see trackRuntimeDataAccessed — so only the settled value is\n    // read here. Only the modern (cacheComponents) prerender tracks\n    // accesses; legacy prerenders conservatively never set the hint.\n    const hintCell =\n      prerenderStore.type === 'prerender'\n        ? prerenderStore.shouldAttemptStaticPrefetch\n        : null\n    const shouldAttemptStaticPrefetch = hintCell !== null && hintCell.current\n    if (prefetchInlining || shouldAttemptStaticPrefetch) {\n      // Build time: compute fresh hints and store in metadata for the\n      // manifest. When prefetch inlining is disabled there are no sizes to\n      // measure, but the static-prefetch hint still rides the manifest —\n      // collectPrefetchHints then only builds the tree shape carrying it.\n      hints = await ComponentMod.collectPrefetchHints(\n        fullPageDataBuffer,\n        staleTime,\n        clientModules,\n        serverConsumerManifest,\n        prefetchInlining,\n        shouldAttemptStaticPrefetch\n      )\n      metadata.prefetchHints = hints\n    } else {\n      // Inlining is disabled and the hint didn't qualify — there's nothing\n      // to record, so don't write a manifest entry for this route.\n      hints = null\n    }\n  } else {\n    // Runtime: use hints from the manifest. Never compute fresh hints\n    // during ISR/revalidation.\n    const manifestHints = renderOpts.prefetchHints?.[pagePath]\n    if (manifestHints === undefined) {\n      if (!prefetchInlining || !renderOpts.cacheComponents) {\n        // Without cacheComponents, dynamic pages have no static shell\n        // and therefore no prerender pass to compute hints; and with\n        // inlining disabled, a missing entry just means the route didn't\n        // qualify for the static-prefetch hint at build. Either way this\n        // is expected — skip the hint system for this route and let\n        // prefetching proceed normally without inlining decisions (the\n        // client goes straight to runtime prefetches where it matters).\n        hints = null\n      } else {\n        // TODO(#91407): No hints found for this route. This currently\n        // happens for routes with `instant = false` at the root segment,\n        // which causes the prerender to run per-request and the hints\n        // manifest to be unavailable at runtime.\n        //\n        // Fall back to a hint tree that marks everything as\n        // unprefetchable. This also swallows the static-prefetch-attempt\n        // hint — such routes never carry it, so the client goes straight\n        // to a runtime prefetch, which is safe (just less cacheable).\n        // Once the instant:false bug is fixed, this should become an\n        // error — the manifest should always have an entry for every\n        // route that reaches collectSegmentData.\n        hints = {\n          hints: PrefetchHint.PrefetchDisabled,\n          slots: null,\n        }\n      }\n    } else {\n      hints = manifestHints\n    }\n  }\n\n  // Whether this render is a fallback shell, i.e. it was prerendered with\n  // unknown (opaque) route params rather than concrete ones. The per-segment\n  // responses generated below are stamped with this so the client knows to\n  // retry the prefetch — a more complete version may become available once\n  // the server's background regeneration finishes.\n  //\n  // Only flag the shell when it could actually be upgraded\n  // (`isFallbackUpgradeable`): at least one fallback param is a candidate\n  // enumerated by `generateStaticParams`. A route with no `generateStaticParams`\n  // never upgrades, so flagging it would trigger pointless client retries.\n  const fallbackRouteParams =\n    'fallbackRouteParams' in prerenderStore\n      ? prerenderStore.fallbackRouteParams\n      : null\n  const isUpgradeableISRFallback =\n    fallbackRouteParams != null &&\n    fallbackRouteParams.size > 0 &&\n    renderOpts.isFallbackUpgradeable === true\n\n  // Pass the resolved hints so collectSegmentData can union them into\n  // the TreePrefetch. During the initial build the FlightRouterState in\n  // the buffer doesn't have inlining hints yet (they were just computed\n  // above), so we need to merge them in here. At runtime/ISR the hints\n  // are already embedded in the FlightRouterState, so this is null.\n  metadata.segmentData = await ComponentMod.collectSegmentData(\n    renderOpts.cacheComponents,\n    fullPageDataBuffer,\n    staleTime,\n    clientModules,\n    serverConsumerManifest,\n    Boolean(renderOpts.experimental.prefetchInlining),\n    hints,\n    isUpgradeableISRFallback\n  )\n}\n\nfunction isBypassingCachesInDev(\n  requestStore: RequestStore,\n  workStore: WorkStore\n): boolean {\n  return (\n    !!process.env.__NEXT_DEV_SERVER &&\n    (requestStore.headers.get('cache-control') === 'no-cache' ||\n      requestStore.draftMode.isEnabled ||\n      workStore.isDraftMode === true)\n  )\n}\n\nfunction WarnForBypassCachesInDev({ route }: { route: string }) {\n  warnOnce(\n    `Route ${route} is rendering with server caches disabled. For this navigation, Component Metadata in React DevTools will not accurately reflect what is statically prerenderable and runtime prefetchable. See more info here: https://nextjs.org/docs/messages/cache-bypass-in-dev`\n  )\n  return null\n}\n","export function getRevalidateReason(params: {\n  isOnDemandRevalidate?: boolean\n  isStaticGeneration?: boolean\n}): 'on-demand' | 'stale' | undefined {\n  if (params.isOnDemandRevalidate) {\n    return 'on-demand'\n  }\n  if (params.isStaticGeneration) {\n    return 'stale'\n  }\n  return undefined\n}\n","import type { BaseNextRequest, BaseNextResponse } from './'\nimport type { NodeNextRequest, NodeNextResponse } from './node'\nimport type { WebNextRequest, WebNextResponse } from './web'\n\n/**\n * This file provides some helpers that should be used in conjunction with\n * explicit environment checks. When combined with the environment checks, it\n * will ensure that the correct typings are used as well as enable code\n * elimination.\n */\n\n/**\n * Type guard to determine if a request is a WebNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base request is a WebNextRequest.\n */\nexport const isWebNextRequest = (req: BaseNextRequest): req is WebNextRequest =>\n  process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a response is a WebNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base response is a WebNextResponse.\n */\nexport const isWebNextResponse = (\n  res: BaseNextResponse\n): res is WebNextResponse => process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a request is a NodeNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base request is a NodeNextRequest.\n */\nexport const isNodeNextRequest = (\n  req: BaseNextRequest\n): req is NodeNextRequest => process.env.NEXT_RUNTIME !== 'edge'\n\n/**\n * Type guard to determine if a response is a NodeNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base response is a NodeNextResponse.\n */\nexport const isNodeNextResponse = (\n  res: BaseNextResponse\n): res is NodeNextResponse => process.env.NEXT_RUNTIME !== 'edge'\n","/**\n * Normalizes the raw RSC header value. Only the literal string \"1\" is treated\n * as a valid RSC request marker; malformed or repeated values are ignored.\n */\nexport function isRSCRequestHeader(\n  value: string | string[] | null | undefined\n): boolean {\n  return value === '1'\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport { flightRouterStateSchema } from './types'\nimport { assert } from 'next/dist/compiled/superstruct'\n\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[]\n): FlightRouterState\nexport function parseAndValidateFlightRouterState(\n  stateHeader: undefined\n): undefined\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[] | undefined\n): FlightRouterState | undefined\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[] | undefined\n): FlightRouterState | undefined {\n  if (typeof stateHeader === 'undefined') {\n    return undefined\n  }\n  if (Array.isArray(stateHeader)) {\n    throw new Error(\n      'Multiple router state headers were sent. This is not allowed.'\n    )\n  }\n\n  // We limit the size of the router state header to ~40kb. This is to prevent\n  // a malicious user from sending a very large header and slowing down the\n  // resolving of the router state.\n  // This is around 2,000 nested or parallel route segment states:\n  // '{\"children\":[\"\",{}]}'.length === 20.\n  if (stateHeader.length > 20 * 2000) {\n    throw new Error('The router state header was too large.')\n  }\n\n  try {\n    const state = JSON.parse(decodeURIComponent(stateHeader))\n    assert(state, flightRouterStateSchema)\n    return state\n  } catch {\n    throw new Error('The router state header was sent but could not be parsed.')\n  }\n}\n","import type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { IncrementalCache } from '../lib/incremental-cache'\nimport type { RenderOpts } from '../app-render/types'\nimport type { FetchMetric } from '../base-http'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\nimport type {\n  ValidationLevel,\n  ResolvedCacheLifeProfiles,\n} from '../config-shared'\n\nimport { AfterContext } from '../after/after-context'\n\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { createLazyResult, type LazyResult } from '../lib/lazy-result'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { createSnapshot } from '../app-render/async-local-storage'\n\nexport type WorkStoreContext = {\n  /**\n   * The page that is being rendered. This relates to the path to the page file.\n   */\n  page: string\n\n  isPrefetchRequest?: boolean\n  nonce?: string\n  renderOpts: {\n    cacheLifeProfiles: ResolvedCacheLifeProfiles\n    staticPageGenerationTimeout: number\n    incrementalCache?: IncrementalCache\n    /**\n     * The hash of the most recent server component change (dev only). Included\n     * in `\"use cache\"` cache keys so that cached entries are revalidated after\n     * an edit, for every client, regardless of whether it runs the HMR client.\n     */\n    hmrRefreshHash?: string\n    isOnDemandRevalidate?: boolean\n    cacheComponents: boolean\n    validationLevel: ValidationLevel\n    fetchCache?: AppSegmentConfig['fetchCache']\n    isPossibleServerAction?: boolean\n    pendingWaitUntil?: Promise<any>\n    experimental: Pick<\n      RenderOpts['experimental'],\n      'isRoutePPREnabled' | 'authInterrupts' | 'useCacheTimeout'\n    >\n\n    /**\n     * Fetch metrics attached in patch-fetch.ts\n     **/\n    fetchMetrics?: FetchMetric[]\n\n    /**\n     * A hack around accessing the store value outside the context of the\n     * request.\n     *\n     * @internal\n     * @deprecated should only be used as a temporary workaround\n     */\n    // TODO: remove this when we resolve accessing the store outside the execution context\n    store?: WorkStore\n  } & Pick<\n    // Pull some properties from RenderOpts so that the docs are also\n    // mirrored.\n    RenderOpts,\n    | 'assetPrefix'\n    | 'supportsDynamicResponse'\n    | 'isBuildTimePrerendering'\n    | 'isDraftMode'\n    | 'isDebugDynamicAccesses'\n  > &\n    RequestLifecycleOpts &\n    Partial<Pick<RenderOpts, 'reactLoadableManifest'>>\n\n  /**\n   * The deployment ID of the current build.\n   */\n  deploymentId: string\n\n  /**\n   * The build ID of the current build.\n   */\n  buildId: string\n\n  // Tags that were previously revalidated (e.g. by a redirecting server action)\n  // and have already been sent to cache handlers.\n  previouslyRevalidatedTags: string[]\n}\n\nexport function createWorkStore({\n  page,\n  renderOpts,\n  isPrefetchRequest,\n  buildId,\n  deploymentId,\n  previouslyRevalidatedTags,\n  nonce,\n}: WorkStoreContext): WorkStore {\n  /**\n   * Rules of Static & Dynamic HTML:\n   *\n   *    1.) We must generate static HTML unless the caller explicitly opts\n   *        in to dynamic HTML support.\n   *\n   *    2.) If dynamic HTML support is requested, we must honor that request\n   *        or throw an error. It is the sole responsibility of the caller to\n   *        ensure they aren't e.g. requesting dynamic HTML for a static page.\n   *\n   *    3.) If the request is in draft mode, we must generate dynamic HTML.\n   *\n   *    4.) If the request is a server action, we must generate dynamic HTML.\n   *\n   * These rules help ensure that other existing features like request caching,\n   * coalescing, and ISR continue working as intended.\n   */\n  const isStaticGeneration =\n    !renderOpts.supportsDynamicResponse &&\n    !renderOpts.isDraftMode &&\n    !renderOpts.isPossibleServerAction\n\n  const shouldTrackFetchMetrics =\n    !!process.env.__NEXT_DEV_SERVER ||\n    // The only times we want to track fetch metrics outside of development is\n    // when we are performing a static generation and we either are in debug\n    // mode, or tracking fetch metrics was specifically opted into.\n    (isStaticGeneration &&\n      (!!process.env.NEXT_DEBUG_BUILD ||\n        process.env.NEXT_SSG_FETCH_METRICS === '1'))\n\n  const store: WorkStore = {\n    isStaticGeneration,\n    page,\n    route: normalizeAppPath(page),\n    incrementalCache:\n      // we fallback to a global incremental cache for edge-runtime locally\n      // so that it can access the fs cache without mocks\n      renderOpts.incrementalCache || (globalThis as any).__incrementalCache,\n    cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n    useCacheTimeout: renderOpts.experimental.useCacheTimeout,\n    staticPageGenerationTimeout: renderOpts.staticPageGenerationTimeout,\n    isBuildTimePrerendering: renderOpts.isBuildTimePrerendering,\n    fetchCache: renderOpts.fetchCache,\n    isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n    requestId: undefined,\n    htmlRequestId: undefined,\n\n    isDraftMode: renderOpts.isDraftMode,\n\n    isPrefetchRequest,\n    buildId,\n    deploymentId,\n    reactLoadableManifest: renderOpts?.reactLoadableManifest || {},\n    assetPrefix: renderOpts?.assetPrefix || '',\n    nonce,\n\n    afterContext: createAfterContext(renderOpts),\n    cacheComponentsEnabled: renderOpts.cacheComponents,\n    validationLevel: renderOpts.validationLevel,\n    previouslyRevalidatedTags,\n    requestStartTime: performance.timeOrigin + performance.now(),\n    refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n    runInCleanSnapshot: createSnapshot(),\n    shouldTrackFetchMetrics,\n    reactServerErrorsByDigest: new Map(),\n  }\n\n  // TODO: remove this when we resolve accessing the store outside the execution context\n  renderOpts.store = store\n\n  return store\n}\n\nfunction createAfterContext(renderOpts: RequestLifecycleOpts): AfterContext {\n  const { waitUntil, onClose, onAfterTaskError } = renderOpts\n  return new AfterContext({\n    waitUntil,\n    onClose,\n    onTaskError: onAfterTaskError,\n  })\n}\n\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */\nfunction createRefreshTagsByCacheKind(): Map<string, LazyResult<void>> {\n  const refreshTagsByCacheKind = new Map<string, LazyResult<void>>()\n  const cacheHandlers = getCacheHandlerEntries()\n\n  if (cacheHandlers) {\n    for (const [kind, cacheHandler] of cacheHandlers) {\n      if ('refreshTags' in cacheHandler) {\n        refreshTagsByCacheKind.set(\n          kind,\n          createLazyResult(async () => cacheHandler.refreshTags())\n        )\n      }\n    }\n  }\n\n  return refreshTagsByCacheKind\n}\n","import type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport type { Params } from '../request/params'\n\nexport function hasNonRootStaticParams(\n  params: Params,\n  rootParams: Params,\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n  for (const paramName in params) {\n    if (\n      !Object.hasOwn(rootParams, paramName) &&\n      isStaticParam(paramName, fallbackParams)\n    ) {\n      return true\n    }\n  }\n  return false\n}\n\nfunction isStaticParam(\n  paramName: string,\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n  // NOTE: Assume that undefined fallback params mean that all of the params are static.\n  if (!fallbackParams) return true\n  // If the param isn't a fallback param, it must be static.\n  return !fallbackParams.has(paramName)\n}\n\nexport function allParamsAreRootParams(\n  underlyingParams: Params,\n  rootParams: Params\n) {\n  for (const paramName in underlyingParams) {\n    if (!Object.hasOwn(rootParams, paramName)) {\n      return false\n    }\n  }\n  return true\n}\n\nexport function isEmptyParams(params: Params): boolean {\n  for (const _paramKey in params) {\n    return false\n  }\n  return true\n}\n\nexport function hasFallbackRouteParams(\n  underlyingParams: Params,\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n): boolean {\n  if (fallbackParams) {\n    for (let key in underlyingParams) {\n      if (fallbackParams.has(key)) {\n        return true\n      }\n    }\n  }\n  return false\n}\n","import type { ServerResponse } from 'node:http'\n\n/**\n * Waits for a Node response to finish normally. Returns false when the\n * connection closes before the response has finished.\n */\nexport function waitForResponseToFinish(\n  response: ServerResponse\n): Promise<boolean> {\n  if (response.writableFinished) {\n    return Promise.resolve(true)\n  }\n  if (response.destroyed) {\n    return Promise.resolve(false)\n  }\n\n  return new Promise((resolve) => {\n    function cleanup() {\n      response.off('finish', onFinish)\n      response.off('close', onClose)\n    }\n\n    function onFinish() {\n      cleanup()\n      resolve(true)\n    }\n\n    function onClose() {\n      cleanup()\n      resolve(response.writableFinished)\n    }\n\n    response.on('finish', onFinish)\n    response.on('close', onClose)\n  })\n}\n","import { resolveRouteParamsFromTree } from '../../build/static-paths/utils'\nimport type { FallbackRouteParam } from '../../build/static-paths/types'\nimport type { DynamicParamTypesShort } from '../../shared/lib/app-router-types'\nimport { dynamicParamTypes } from '../app-render/get-short-dynamic-param-type'\nimport type AppPageRouteModule from '../route-modules/app-page/module'\nimport { parseNormalizedAppRoute } from '../../shared/lib/router/routes/app'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from '../../build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree'\nimport { getParamProperties } from '../../shared/lib/router/utils/get-segment-param'\n\nexport type OpaqueFallbackRouteParamValue = [\n  /**\n   * The search value of the fallback route param. This is the opaque key\n   * that will be used to replace the dynamic param in the postponed state.\n   */\n  searchValue: string,\n\n  /**\n   * The dynamic param type of the fallback route param. This is the type of\n   * the dynamic param that will be used to replace the dynamic param in the\n   * postponed state.\n   */\n  dynamicParamType: DynamicParamTypesShort,\n]\n\n/**\n * An opaque fallback route params object. This is used to store the fallback\n * route params in a way that is not easily accessible to the client.\n */\nexport type OpaqueFallbackRouteParams = ReadonlyMap<\n  string,\n  OpaqueFallbackRouteParamValue\n>\n\n/**\n * The entries of the opaque fallback route params object.\n *\n * @param key the key of the fallback route param\n * @param value the value of the fallback route param\n */\nexport type OpaqueFallbackRouteParamEntries =\n  ReturnType<OpaqueFallbackRouteParams['entries']> extends MapIterator<\n    [infer K, infer V]\n  >\n    ? ReadonlyArray<[K, V]>\n    : never\n\n/**\n * Creates an opaque fallback route params object from the fallback route params.\n *\n * @param fallbackRouteParams the fallback route params\n * @returns the opaque fallback route params\n */\nexport function createOpaqueFallbackRouteParams(\n  fallbackRouteParams: readonly FallbackRouteParam[]\n): OpaqueFallbackRouteParams | null {\n  // If there are no fallback route params, we can return early.\n  if (fallbackRouteParams.length === 0) return null\n\n  // As we're creating unique keys for each of the dynamic route params, we only\n  // need to generate a unique ID once per request because each of the keys will\n  // be also be unique.\n  const uniqueID = Math.random().toString(16).slice(2)\n\n  const keys = new Map<string, OpaqueFallbackRouteParamValue>()\n\n  // Generate a unique key for the fallback route param, if this key is found\n  // in the static output, it represents a bug in cache components.\n  for (const { paramName, paramType } of fallbackRouteParams) {\n    keys.set(paramName, [\n      `%%drp:${paramName}:${uniqueID}%%`,\n      dynamicParamTypes[paramType],\n    ])\n  }\n\n  return keys\n}\n\nexport function buildDynamicSegmentPlaceholder(\n  param: Pick<FallbackRouteParam, 'paramName' | 'paramType'>\n): string {\n  const { repeat, optional } = getParamProperties(param.paramType)\n\n  if (optional) {\n    return `[[...${param.paramName}]]`\n  }\n\n  if (repeat) {\n    return `[...${param.paramName}]`\n  }\n\n  return `[${param.paramName}]`\n}\n\nexport function getPlaceholderFallbackRouteParams(\n  params: Record<string, undefined | string | string[]> | undefined,\n  fallbackRouteParams: readonly FallbackRouteParam[]\n): FallbackRouteParam[] {\n  return fallbackRouteParams.filter((param) => {\n    const placeholder = buildDynamicSegmentPlaceholder(param)\n    const value = params?.[param.paramName]\n\n    return (\n      value === placeholder ||\n      (Array.isArray(value) && value.length === 1 && value[0] === placeholder)\n    )\n  })\n}\n\n/**\n * Gets the fallback route params for a given page. This is an expensive\n * operation because it requires parsing the loader tree to extract the fallback\n * route params.\n *\n * @param page the page\n * @param routeModule the route module\n * @returns the opaque fallback route params\n */\nexport function getFallbackRouteParams(\n  page: string,\n  routeModule: AppPageRouteModule\n) {\n  const route = parseNormalizedAppRoute(page)\n\n  // Extract the pathname-contributing segments from the loader tree. This\n  // mirrors the logic in buildAppStaticPaths where we determine which segments\n  // actually contribute to the pathname.\n  const { pathnameRouteParamSegments, params } =\n    extractPathnameRouteParamSegmentsFromLoaderTree(\n      routeModule.userland.loaderTree,\n      route\n    )\n\n  // Create fallback route params for the pathname segments.\n  const fallbackRouteParams: FallbackRouteParam[] =\n    pathnameRouteParamSegments.map(({ paramName, paramType }) => ({\n      paramName,\n      paramType,\n    }))\n\n  // Resolve route params from the loader tree. This mutates the\n  // fallbackRouteParams array to add any route params that are\n  // unknown at request time.\n  //\n  // The page parameter contains placeholders like [slug], which helps\n  // resolveRouteParamsFromTree determine which params are unknown.\n  resolveRouteParamsFromTree(\n    routeModule.userland.loaderTree,\n    params, // Static params extracted from the page\n    route, // The page pattern with placeholders\n    fallbackRouteParams // Will be mutated to add route params\n  )\n\n  // Convert the fallback route params to an opaque format that can be safely\n  // used in the postponed state without exposing implementation details.\n  return createOpaqueFallbackRouteParams(fallbackRouteParams)\n}\n","import type { LoaderTree } from '../../../server/lib/app-dir-module'\nimport type { Params } from '../../../server/request/params'\nimport type { DynamicParamTypes } from '../../../shared/lib/app-router-types'\nimport {\n  parseAppRouteSegment,\n  type NormalizedAppRoute,\n  type NormalizedAppRouteSegment,\n} from '../../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-tree'\nimport { resolveParamValue } from '../../../shared/lib/router/utils/resolve-param-value'\n\n/**\n * Validates that the static segments in currentPath match the corresponding\n * segments in targetSegments. This ensures we only extract dynamic parameters\n * that are part of the target pathname structure.\n *\n * Segments are compared literally - interception markers like \"(.)photo\" are\n * part of the pathname and must match exactly.\n *\n * @example\n * // Matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', '(.)photo', '[id]']\n * → Returns true (both static segments match exactly)\n *\n * @example\n * // Non-matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', 'photo', '[id]']\n * → Returns false (segments don't match - marker is part of pathname)\n *\n * @param currentPath - The accumulated path segments from the loader tree\n * @param targetSegments - The target pathname split into segments\n * @returns true if all static segments match, false otherwise\n */\nfunction validatePrefixMatch(\n  currentPath: NormalizedAppRouteSegment[],\n  route: NormalizedAppRoute\n): boolean {\n  for (let i = 0; i < currentPath.length; i++) {\n    const pathSegment = currentPath[i]\n    const targetPathSegment = route.segments[i]\n\n    // Type mismatch - one is static, one is dynamic\n    if (pathSegment.type !== targetPathSegment.type) {\n      return false\n    }\n\n    // One has an interception marker, the other doesn't.\n    if (\n      pathSegment.interceptionMarker !== targetPathSegment.interceptionMarker\n    ) {\n      return false\n    }\n\n    // Both are static but names don't match\n    if (\n      pathSegment.type === 'static' &&\n      targetPathSegment.type === 'static' &&\n      pathSegment.name !== targetPathSegment.name\n    ) {\n      return false\n    }\n    // Both are dynamic but param names don't match\n    else if (\n      pathSegment.type === 'dynamic' &&\n      targetPathSegment.type === 'dynamic' &&\n      pathSegment.param.paramType !== targetPathSegment.param.paramType &&\n      pathSegment.param.paramName !== targetPathSegment.param.paramName\n    ) {\n      return false\n    }\n  }\n\n  return true\n}\n\n/**\n * Extracts pathname route param segments from a loader tree and resolves\n * parameter values from static segments in the route.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param route - The target route to match against\n * @returns Object containing pathname route param segments and resolved params\n */\nexport function extractPathnameRouteParamSegmentsFromLoaderTree(\n  loaderTree: LoaderTree,\n  route: NormalizedAppRoute\n): {\n  pathnameRouteParamSegments: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }>\n  params: Params\n} {\n  const pathnameRouteParamSegments: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }> = []\n  const params: Params = {}\n\n  // BFS traversal with depth and path tracking\n  const queue: Array<{\n    tree: LoaderTree\n    depth: number\n    currentPath: NormalizedAppRouteSegment[]\n  }> = [{ tree: loaderTree, depth: 0, currentPath: [] }]\n\n  while (queue.length > 0) {\n    const { tree, depth, currentPath } = queue.shift()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    // Build the path for the current node\n    let updatedPath = currentPath\n    let nextDepth = depth\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    // Only add to path if it's a real segment that appears in the URL\n    // Route groups and parallel markers don't contribute to URL pathname\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      updatedPath = [...currentPath, appSegment]\n      nextDepth = depth + 1\n    }\n\n    // Check if this segment has a param and matches the target pathname at this depth\n    if (appSegment?.type === 'dynamic') {\n      const { paramName, paramType } = appSegment.param\n\n      // Check if this segment is at the correct depth in the target pathname\n      // A segment matches if:\n      // 1. There's a dynamic segment at this depth in the pathname\n      // 2. The parameter names match (e.g., [id] matches [id], not [category])\n      // 3. The static segments leading up to this point match (prefix check)\n      if (depth < route.segments.length) {\n        const targetSegment = route.segments[depth]\n\n        // Match if the target pathname has a dynamic segment at this depth\n        if (targetSegment.type === 'dynamic') {\n          // Check that parameter names match exactly\n          // This prevents [category] from matching against /[id]\n          if (paramName !== targetSegment.param.paramName) {\n            continue // Different param names, skip this segment\n          }\n\n          // Validate that the path leading up to this dynamic segment matches\n          // the target pathname. This prevents false matches like extracting\n          // [slug] from \"/news/[slug]\" when the tree has \"/blog/[slug]\"\n          if (validatePrefixMatch(currentPath, route)) {\n            pathnameRouteParamSegments.push({\n              name: segment,\n              paramName,\n              paramType,\n            })\n          }\n        }\n      }\n\n      // Resolve parameter value if it's not already known.\n      if (!params.hasOwnProperty(paramName)) {\n        const paramValue = resolveParamValue(\n          paramName,\n          paramType,\n          depth,\n          route,\n          params\n        )\n\n        if (paramValue !== undefined) {\n          params[paramName] = paramValue\n        }\n      }\n    }\n\n    // Continue traversing all parallel routes to find matching segments\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      queue.push({\n        tree: parallelRoute,\n        depth: nextDepth,\n        currentPath: updatedPath,\n      })\n    }\n  }\n\n  return { pathnameRouteParamSegments, params }\n}\n","import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { Params } from '../../server/request/params'\nimport type { AppPageRouteModule } from '../../server/route-modules/app-page/module.compiled'\nimport type { AppRouteRouteModule } from '../../server/route-modules/app-route/module.compiled'\nimport { isAppPageRouteModule } from '../../server/route-modules/checks'\nimport type { DynamicParamTypes } from '../../shared/lib/app-router-types'\nimport {\n  parseAppRouteSegment,\n  type NormalizedAppRoute,\n} from '../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport type { AppSegment } from '../segment-config/app/app-segments'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from './app/extract-pathname-route-param-segments-from-loader-tree'\nimport { resolveParamValue } from '../../shared/lib/router/utils/resolve-param-value'\nimport type { FallbackRouteParam } from './types'\n\n/**\n * Encodes a parameter value using the provided encoder.\n *\n * @param value - The value to encode.\n * @param encoder - The encoder to use.\n * @returns The encoded value.\n */\nexport function encodeParam(\n  value: string | string[],\n  encoder: (value: string) => string\n) {\n  let replaceValue: string\n  if (Array.isArray(value)) {\n    replaceValue = value.map(encoder).join('/')\n  } else {\n    replaceValue = encoder(value)\n  }\n\n  return replaceValue\n}\n\n/**\n * Normalizes a pathname to a consistent format.\n *\n * @param pathname - The pathname to normalize.\n * @returns The normalized pathname.\n */\nexport function normalizePathname(pathname: string) {\n  return pathname.replace(/\\\\/g, '/').replace(/(?!^)\\/$/, '')\n}\n\n/**\n * Extracts segments that contribute to the pathname by traversing the loader tree\n * based on the route module type.\n *\n * @param routeModule - The app route module (page or route handler)\n * @param segments - Array of AppSegment objects collected from the route\n * @param page - The target pathname to match against, INCLUDING interception\n *               markers (e.g., \"/blog/[slug]\", \"/(.)photo/[id]\")\n * @returns Array of segments with param info that contribute to the pathname\n */\nexport function extractPathnameRouteParamSegments(\n  routeModule: AppRouteRouteModule | AppPageRouteModule,\n  segments: readonly Readonly<AppSegment>[],\n  route: NormalizedAppRoute\n): Array<{\n  readonly name: string\n  readonly paramName: string\n  readonly paramType: DynamicParamTypes\n}> {\n  // For AppPageRouteModule, use the loaderTree traversal approach\n  if (isAppPageRouteModule(routeModule)) {\n    const { pathnameRouteParamSegments } =\n      extractPathnameRouteParamSegmentsFromLoaderTree(\n        routeModule.userland.loaderTree,\n        route\n      )\n    return pathnameRouteParamSegments\n  }\n\n  return extractPathnameRouteParamSegmentsFromSegments(segments)\n}\n\nexport function extractPathnameRouteParamSegmentsFromSegments(\n  segments: readonly Readonly<AppSegment>[]\n): Array<{\n  readonly name: string\n  readonly paramName: string\n  readonly paramType: DynamicParamTypes\n}> {\n  // TODO: should we consider what values are already present in the page?\n\n  // For AppRouteRouteModule, filter the segments array to get the route params\n  // that contribute to the pathname.\n  const result: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }> = []\n\n  for (const segment of segments) {\n    // Skip segments without param info.\n    if (!segment.paramName || !segment.paramType) continue\n\n    // Collect all the route param keys that contribute to the pathname.\n    result.push({\n      name: segment.name,\n      paramName: segment.paramName,\n      paramType: segment.paramType,\n    })\n  }\n\n  return result\n}\n\n/**\n * Resolves all route parameters from the loader tree. This function uses\n * tree-based traversal to correctly handle the hierarchical structure of routes\n * and accurately determine parameter values based on their depth in the tree.\n *\n * This processes both regular route parameters (from the main children route) and\n * parallel route parameters (from slots like @modal, @sidebar).\n *\n * Unlike interpolateParallelRouteParams (which has a complete URL at runtime),\n * this build-time function determines which route params are unknown.\n * The pathname may contain placeholders like [slug], making it incomplete.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param params - The current route parameters object (will be mutated)\n * @param route - The current route being processed\n * @param fallbackRouteParams - Array of fallback route parameters (will be mutated)\n */\nexport function resolveRouteParamsFromTree(\n  loaderTree: LoaderTree,\n  params: Params,\n  route: NormalizedAppRoute,\n  fallbackRouteParams: FallbackRouteParam[]\n): void {\n  // Stack-based traversal with depth tracking\n  const stack: Array<{\n    tree: LoaderTree\n    depth: number\n  }> = [{ tree: loaderTree, depth: 0 }]\n\n  while (stack.length > 0) {\n    const { tree, depth } = stack.pop()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    // If this segment is a route parameter, then we should process it if it's\n    // not already known and is not already marked as a fallback route param.\n    if (\n      appSegment?.type === 'dynamic' &&\n      !params.hasOwnProperty(appSegment.param.paramName) &&\n      !fallbackRouteParams.some(\n        (param) => param.paramName === appSegment.param.paramName\n      )\n    ) {\n      const { paramName, paramType } = appSegment.param\n\n      const paramValue = resolveParamValue(\n        paramName,\n        paramType,\n        depth,\n        route,\n        params\n      )\n\n      if (paramValue !== undefined) {\n        params[paramName] = paramValue\n      } else if (paramType !== 'optional-catchall') {\n        // If we couldn't resolve the param, mark it as a fallback\n        fallbackRouteParams.push({ paramName, paramType })\n      }\n    }\n\n    // Calculate next depth - increment if this is not a route group and not empty\n    let nextDepth = depth\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      nextDepth++\n    }\n\n    // Add all parallel routes to the stack for processing.\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      stack.push({ tree: parallelRoute, depth: nextDepth })\n    }\n  }\n}\n","import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'\n\nexport { MODERN_BROWSERSLIST_TARGET }\n\nexport type ValueOf<T> = Required<T>[keyof T]\n\nexport const COMPILER_NAMES = {\n  client: 'client',\n  server: 'server',\n  edgeServer: 'edge-server',\n} as const\n\nexport type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>\n\nexport const COMPILER_INDEXES: {\n  [compilerKey in CompilerNameValues]: number\n} = {\n  [COMPILER_NAMES.client]: 0,\n  [COMPILER_NAMES.server]: 1,\n  [COMPILER_NAMES.edgeServer]: 2,\n} as const\n\n// Re-export entry constants for backward compatibility\nexport {\n  UNDERSCORE_NOT_FOUND_ROUTE,\n  UNDERSCORE_NOT_FOUND_ROUTE_ENTRY,\n  UNDERSCORE_GLOBAL_ERROR_ROUTE,\n  UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n} from './entry-constants'\n\nexport enum AdapterOutputType {\n  /**\n   * `PAGES` represents all the React pages that are under `pages/`.\n   */\n  PAGES = 'PAGES',\n\n  /**\n   * `PAGES_API` represents all the API routes under `pages/api/`.\n   */\n  PAGES_API = 'PAGES_API',\n  /**\n   * `APP_PAGE` represents all the React pages that are under `app/` with the\n   * filename of `page.{j,t}s{,x}`.\n   */\n  APP_PAGE = 'APP_PAGE',\n\n  /**\n   * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n   * filename of `route.{j,t}s{,x}`.\n   */\n  APP_ROUTE = 'APP_ROUTE',\n\n  /**\n   * `PRERENDER` represents an ISR enabled route that might\n   * have a seeded cache entry or fallback generated during build\n   */\n  PRERENDER = 'PRERENDER',\n\n  /**\n   * `STATIC_FILE` represents a static file (ie /_next/static)\n   */\n  STATIC_FILE = 'STATIC_FILE',\n\n  /**\n   * `MIDDLEWARE` represents the middleware output if present\n   */\n  MIDDLEWARE = 'MIDDLEWARE',\n}\n\nexport const PHASE_EXPORT = 'phase-export'\nexport const PHASE_ANALYZE = 'phase-analyze'\nexport const PHASE_PRODUCTION_BUILD = 'phase-production-build'\nexport const PHASE_PRODUCTION_SERVER = 'phase-production-server'\nexport const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'\nexport const PHASE_TEST = 'phase-test'\nexport const PHASE_INFO = 'phase-info'\n\nexport type PHASE_TYPE =\n  | typeof PHASE_INFO\n  | typeof PHASE_TEST\n  | typeof PHASE_EXPORT\n  | typeof PHASE_ANALYZE\n  | typeof PHASE_PRODUCTION_BUILD\n  | typeof PHASE_PRODUCTION_SERVER\n  | typeof PHASE_DEVELOPMENT_SERVER\n\nexport const PAGES_MANIFEST = 'pages-manifest.json'\nexport const APP_PATHS_MANIFEST = 'app-paths-manifest.json'\nexport const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json'\nexport const BUILD_MANIFEST = 'build-manifest.json'\nexport const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json'\nexport const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest'\nexport const NEXT_FONT_MANIFEST = 'next-font-manifest'\nexport const EXPORT_MARKER = 'export-marker.json'\nexport const EXPORT_DETAIL = 'export-detail.json'\nexport const PRERENDER_MANIFEST = 'prerender-manifest.json'\nexport const PREFETCH_HINTS = 'prefetch-hints.json'\nexport const ROUTES_MANIFEST = 'routes-manifest.json'\nexport const IMAGES_MANIFEST = 'images-manifest.json'\nexport const SERVER_FILES_MANIFEST = 'required-server-files'\nexport const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json'\nexport const REQUEST_INSIGHTS_DEV_ENDPOINT =\n  '/_next/development/request-insights'\nexport const MIDDLEWARE_MANIFEST = 'middleware-manifest.json'\nexport const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST =\n  '_clientMiddlewareManifest.js'\nexport const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json'\nexport const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json'\nexport const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'\nexport const SERVER_DIRECTORY = 'server'\nexport const CONFIG_FILES = [\n  'next.config.js',\n  'next.config.mjs',\n  'next.config.ts',\n  // process.features can be undefined on Edge runtime\n  // TODO: Remove `as any` once we bump @types/node to v22.10.0+\n  ...((process?.features as any)?.typescript ? ['next.config.mts'] : []),\n]\nexport const BUILD_ID_FILE = 'BUILD_ID'\nexport const BLOCKED_PAGES = ['/_document', '/_app', '/_error']\nexport const CLIENT_PUBLIC_FILES_PATH = 'public'\nexport const CLIENT_STATIC_FILES_PATH = 'static'\nexport const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'\nexport const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'\nexport const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__'\n\n// server/[entry]/page_client-reference-manifest.js\nexport const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest'\n// server/server-reference-manifest\nexport const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest'\n// server/middleware-build-manifest.js\nexport const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-manifest'\n// server/middleware-react-loadable-manifest.js\nexport const MIDDLEWARE_REACT_LOADABLE_MANIFEST =\n  'middleware-react-loadable-manifest'\n// server/interception-route-rewrite-manifest.js\nexport const INTERCEPTION_ROUTE_REWRITE_MANIFEST =\n  'interception-route-rewrite-manifest'\n// server/dynamic-css-manifest.js\nexport const DYNAMIC_CSS_MANIFEST = 'dynamic-css-manifest'\n\n// static/runtime/main.js\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`\n// next internal client components chunk for layouts\nexport const APP_CLIENT_INTERNALS = 'app-pages-internals'\n// static/runtime/react-refresh.js\nexport const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`\n// static/runtime/webpack.js\nexport const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`\n// static/runtime/polyfills.js\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = 'polyfills'\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(\n  CLIENT_STATIC_FILES_RUNTIME_POLYFILLS\n)\nexport const DEFAULT_RUNTIME_WEBPACK = 'webpack-runtime'\nexport const EDGE_RUNTIME_WEBPACK = 'edge-runtime-webpack'\nexport const STATIC_PROPS_ID = '__N_SSG'\nexport const SERVER_PROPS_ID = '__N_SSP'\nexport const DEFAULT_SERIF_FONT = {\n  name: 'Times New Roman',\n  xAvgCharWidth: 821,\n  azAvgWidth: 854.3953488372093,\n  unitsPerEm: 2048,\n}\nexport const DEFAULT_SANS_SERIF_FONT = {\n  name: 'Arial',\n  xAvgCharWidth: 904,\n  azAvgWidth: 934.5116279069767,\n  unitsPerEm: 2048,\n}\nexport const STATIC_STATUS_PAGES = ['/500']\nexport const TRACE_OUTPUT_VERSION = 1\n// in `MB`\nexport const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000\n\nexport const RSC_MODULE_TYPES = {\n  client: 'client',\n  server: 'server',\n} as const\n\n// comparing\n// https://nextjs.org/docs/api-reference/edge-runtime\n// with\n// https://nodejs.org/docs/latest/api/globals.html\nexport const EDGE_UNSUPPORTED_NODE_APIS = [\n  'clearImmediate',\n  'setImmediate',\n  'BroadcastChannel',\n  'ByteLengthQueuingStrategy',\n  'CompressionStream',\n  'CountQueuingStrategy',\n  'DecompressionStream',\n  'DomException',\n  'MessageChannel',\n  'MessageEvent',\n  'MessagePort',\n  'ReadableByteStreamController',\n  'ReadableStreamBYOBRequest',\n  'ReadableStreamDefaultController',\n  'TransformStreamDefaultController',\n  'WritableStreamDefaultController',\n]\n\nexport const SYSTEM_ENTRYPOINTS = new Set<string>([\n  CLIENT_STATIC_FILES_RUNTIME_MAIN,\n  CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n  CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n])\n","import { pathHasPrefix } from '../router/utils/path-has-prefix'\n\n/**\n * strip _next/data/<build-id>/ prefix and .json suffix\n */\nexport function normalizeDataPath(pathname: string) {\n  if (!pathHasPrefix(pathname || '/', '/_next/data')) {\n    return pathname\n  }\n  pathname = pathname\n    .replace(/\\/_next\\/data\\/[^/]{1,}/, '')\n    .replace(/\\.json$/, '')\n\n  if (pathname === '/index') {\n    return '/'\n  }\n  return pathname\n}\n","import { getRequestMeta, type NextIncomingMessage } from '../request-meta'\n\nconst PATCHED_SET_HEADER = Symbol('next.patchSetHeaderWithCookieSupport')\n\ntype PatchableResponse = {\n  setHeader(key: string, value: string | string[]): PatchableResponse\n  headersSent?: boolean\n  [PATCHED_SET_HEADER]?: true\n}\n\n/**\n * Ensure cookies set in middleware are merged and not overridden by API\n * routes/getServerSideProps.\n *\n * @param req Incoming request\n * @param res Outgoing response\n */\nexport function patchSetHeaderWithCookieSupport(\n  req: NextIncomingMessage,\n  res: PatchableResponse\n) {\n  if (res[PATCHED_SET_HEADER]) {\n    return\n  }\n\n  const setHeader = res.setHeader.bind(res)\n\n  Object.defineProperty(res, PATCHED_SET_HEADER, {\n    value: true,\n  })\n\n  res.setHeader = (\n    name: string,\n    value: string | string[]\n  ): PatchableResponse => {\n    // When renders /_error after page is failed, it could attempt to set\n    // headers after headers.\n    if ('headersSent' in res && res.headersSent) {\n      return res\n    }\n\n    if (name.toLowerCase() === 'set-cookie') {\n      const middlewareValue = getRequestMeta(req, 'middlewareCookie')\n\n      if (\n        !middlewareValue ||\n        !Array.isArray(value) ||\n        !value.every((item, idx) => item === middlewareValue[idx])\n      ) {\n        value = [\n          // TODO: (wyattjoh) find out why this is called multiple times resulting in duplicate cookies being added\n          ...new Set([\n            ...(middlewareValue || []),\n            ...(typeof value === 'string'\n              ? [value]\n              : Array.isArray(value)\n                ? value\n                : []),\n          ]),\n        ]\n      }\n    }\n\n    return setHeader(name, value)\n  }\n}\n","import type { PageExtensions } from '../../build/page-extensions-type'\nimport { normalizePathSep } from '../../shared/lib/page-path/normalize-path-sep'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { isAppRouteRoute } from '../is-app-route-route'\n\nexport const STATIC_METADATA_IMAGES = {\n  icon: {\n    filename: 'icon',\n    extensions: ['ico', 'jpg', 'jpeg', 'png', 'svg'],\n  },\n  apple: {\n    filename: 'apple-icon',\n    extensions: ['jpg', 'jpeg', 'png'],\n  },\n  favicon: {\n    filename: 'favicon',\n    extensions: ['ico'],\n  },\n  openGraph: {\n    filename: 'opengraph-image',\n    extensions: ['jpg', 'jpeg', 'png', 'gif'],\n  },\n  twitter: {\n    filename: 'twitter-image',\n    extensions: ['jpg', 'jpeg', 'png', 'gif'],\n  },\n} as const\n\n// Match routes that are metadata routes, e.g. /sitemap.xml, /favicon.<ext>, /<icon>.<ext>, etc.\n// TODO-METADATA: support more metadata routes with more extensions\nexport const DEFAULT_METADATA_ROUTE_EXTENSIONS = ['js', 'jsx', 'ts', 'tsx']\n\n// Match the file extension with the dynamic multi-routes extensions\n// e.g. ([xml, js], null) -> can match `/sitemap.xml/route`, `sitemap.js/route`\n// e.g. ([png], [ts]) -> can match `/opengraph-image.png`, `/opengraph-image.ts`\nexport const getExtensionRegexString = (\n  staticExtensions: readonly string[],\n  dynamicExtensions: readonly string[] | null\n) => {\n  let result: string\n  // If there's no possible multi dynamic routes, will not match any <name>[].<ext> files\n  if (!dynamicExtensions || dynamicExtensions.length === 0) {\n    result = `(\\\\.(?:${staticExtensions.join('|')}))`\n  } else {\n    result = `(?:\\\\.(${staticExtensions.join('|')})|(\\\\.(${dynamicExtensions.join('|')})))`\n  }\n  return result\n}\n\n/**\n * Matches the static metadata files, e.g. /robots.txt, /sitemap.xml, /favicon.ico, etc.\n * @param appDirRelativePath the relative file path to app/\n * @returns if the path is a static metadata file route\n */\nexport function isStaticMetadataFile(appDirRelativePath: string) {\n  return isMetadataRouteFile(appDirRelativePath, [], true)\n}\n\n// Pre-compiled static regexes for common cases\nconst FAVICON_REGEX = /^[\\\\/]favicon\\.ico$/\nconst ROBOTS_TXT_REGEX = /^[\\\\/]robots\\.txt$/\nconst MANIFEST_JSON_REGEX = /^[\\\\/]manifest\\.json$/\nconst MANIFEST_WEBMANIFEST_REGEX = /^[\\\\/]manifest\\.webmanifest$/\nconst SITEMAP_XML_REGEX = /[\\\\/]sitemap\\.xml$/\n\n// Cache for compiled regex patterns based on parameters\nconst compiledRegexCache = new Map<string, RegExp[]>()\n\n// Fast path checks for common metadata files\nfunction fastPathCheck(normalizedPath: string): boolean | null {\n  // Check favicon.ico first (most common)\n  if (FAVICON_REGEX.test(normalizedPath)) return true\n\n  // Check other common static files\n  if (ROBOTS_TXT_REGEX.test(normalizedPath)) return true\n  if (MANIFEST_JSON_REGEX.test(normalizedPath)) return true\n  if (MANIFEST_WEBMANIFEST_REGEX.test(normalizedPath)) return true\n  if (SITEMAP_XML_REGEX.test(normalizedPath)) return true\n\n  // Quick negative check - if it doesn't contain any metadata keywords, skip\n  if (\n    !normalizedPath.includes('robots') &&\n    !normalizedPath.includes('manifest') &&\n    !normalizedPath.includes('sitemap') &&\n    !normalizedPath.includes('icon') &&\n    !normalizedPath.includes('apple-icon') &&\n    !normalizedPath.includes('opengraph-image') &&\n    !normalizedPath.includes('twitter-image') &&\n    !normalizedPath.includes('favicon')\n  ) {\n    return false\n  }\n\n  return null // Continue with full regex matching\n}\n\nfunction getCompiledRegexes(\n  pageExtensions: PageExtensions,\n  strictlyMatchExtensions: boolean\n): RegExp[] {\n  // Create cache key\n  const cacheKey = `${pageExtensions.join(',')}|${strictlyMatchExtensions}`\n\n  const cached = compiledRegexCache.get(cacheKey)\n  if (cached) {\n    return cached\n  }\n\n  // Pre-compute common strings\n  const trailingMatcher = strictlyMatchExtensions ? '$' : '?$'\n  const variantsMatcher = '\\\\d?'\n  const groupSuffix = strictlyMatchExtensions ? '' : '(-\\\\w{6})?'\n  const suffixMatcher = variantsMatcher + groupSuffix\n\n  // Pre-compute extension arrays to avoid repeated concatenation\n  const robotsExts =\n    pageExtensions.length > 0 ? [...pageExtensions, 'txt'] : ['txt']\n  const manifestExts =\n    pageExtensions.length > 0\n      ? [...pageExtensions, 'webmanifest', 'json']\n      : ['webmanifest', 'json']\n\n  const regexes = [\n    new RegExp(\n      `^[\\\\\\\\/]robots${getExtensionRegexString(robotsExts, null)}${trailingMatcher}`\n    ),\n    new RegExp(\n      `^[\\\\\\\\/]manifest${getExtensionRegexString(manifestExts, null)}${trailingMatcher}`\n    ),\n    // FAVICON_REGEX removed - already handled in fastPathCheck\n    new RegExp(\n      `[\\\\\\\\/]sitemap${getExtensionRegexString(['xml'], pageExtensions)}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]icon${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.icon.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]apple-icon${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.apple.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]opengraph-image${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.openGraph.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]twitter-image${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.twitter.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n  ]\n\n  compiledRegexCache.set(cacheKey, regexes)\n  return regexes\n}\n\n/**\n * Determine if the file is a metadata route file entry\n * @param appDirRelativePath the relative file path to app/\n * @param pageExtensions the js extensions, such as ['js', 'jsx', 'ts', 'tsx']\n * @param strictlyMatchExtensions if it's true, match the file with page extension, otherwise match the file with default corresponding extension\n * @returns if the file is a metadata route file\n */\nexport function isMetadataRouteFile(\n  appDirRelativePath: string,\n  pageExtensions: PageExtensions,\n  strictlyMatchExtensions: boolean\n): boolean {\n  // Early exit for empty or obviously non-metadata paths\n  if (!appDirRelativePath || appDirRelativePath.length < 2) {\n    return false\n  }\n\n  const normalizedPath = normalizePathSep(appDirRelativePath)\n\n  // Fast path check for common cases\n  const fastResult = fastPathCheck(normalizedPath)\n  if (fastResult !== null) {\n    return fastResult\n  }\n\n  // Get compiled regexes from cache\n  const regexes = getCompiledRegexes(pageExtensions, strictlyMatchExtensions)\n\n  // Use for loop instead of .some() for better performance\n  for (let i = 0; i < regexes.length; i++) {\n    if (regexes[i].test(normalizedPath)) {\n      return true\n    }\n  }\n\n  return false\n}\n\n// Check if the route is a static metadata route, with /route suffix\n// e.g. /favicon.ico/route, /icon.png/route, etc.\n// But skip the text routes like robots.txt since they might also be dynamic.\n// Checking route path is not enough to determine if text routes is dynamic.\nexport function isStaticMetadataRoute(route: string) {\n  // extract ext with regex\n  const pathname = route.replace(/\\/route$/, '')\n\n  const matched =\n    isAppRouteRoute(route) &&\n    isMetadataRouteFile(pathname, [], true) &&\n    // These routes can either be built by static or dynamic entrypoints,\n    // so we assume they're dynamic\n    pathname !== '/robots.txt' &&\n    pathname !== '/manifest.webmanifest' &&\n    !pathname.endsWith('/sitemap.xml')\n\n  return matched\n}\n\n/**\n * Determine if a page or pathname is a metadata page.\n *\n * The input is a page or pathname, which can be with or without page suffix /foo/page or /foo.\n * But it will not contain the /route suffix.\n *\n * .e.g\n * /robots -> true\n * /sitemap -> true\n * /foo -> false\n */\nexport function isMetadataPage(page: string) {\n  const matched = !isAppRouteRoute(page) && isMetadataRouteFile(page, [], false)\n\n  return matched\n}\n\n/*\n * Determine if a Next.js route is a metadata route.\n * `route` will has a route suffix.\n *\n * e.g.\n * /app/robots/route -> true\n * /robots/route -> true\n * /sitemap/[__metadata_id__]/route -> true\n * /app/sitemap/page -> false\n * /icon-a102f4/route -> true\n */\nexport function isMetadataRoute(route: string): boolean {\n  let page = normalizeAppPath(route)\n    .replace(/^\\/?app\\//, '')\n    // Remove the dynamic route id\n    .replace('/[__metadata_id__]', '')\n    // Remove the /route suffix\n    .replace(/\\/route$/, '')\n\n  if (page[0] !== '/') page = '/' + page\n\n  const matched = isAppRouteRoute(route) && isMetadataRouteFile(page, [], false)\n\n  return matched\n}\n","import path from '../shared/lib/isomorphic/path'\nimport type { CacheFs } from '../shared/lib/utils'\n\n/**\n * A task to be written.\n */\ntype Task = [\n  /**\n   * The directory to create.\n   */\n  directory: string,\n\n  /**\n   * The promise to create the directory.\n   */\n  mkdir: Promise<unknown>,\n\n  /**\n   * The promises to write the files that are dependent on the directory being\n   * created.\n   */\n  writeFile: Promise<unknown>[],\n]\n/**\n * MultiFileWriter is a utility for writing multiple files in parallel that\n * guarantees that all files will be written after their containing directory\n * is created, and that the directory will only be created once.\n */\nexport class MultiFileWriter {\n  /**\n   * The tasks to be written.\n   */\n  private readonly tasks: Task[] = []\n\n  constructor(\n    /**\n     * The file system methods to use.\n     */\n    private readonly fs: Pick<CacheFs, 'mkdir' | 'writeFile'>\n  ) {}\n\n  /**\n   * Finds or creates a task for a directory.\n   *\n   * @param directory - The directory to find or create a task for.\n   * @returns The task for the directory.\n   */\n  private findOrCreateTask(directory: string): Task {\n    // See if this directory already has a task to create it.\n    for (const task of this.tasks) {\n      if (task[0] === directory) {\n        return task\n      }\n    }\n\n    const promise = this.fs.mkdir(directory)\n\n    // Attach a catch handler so that it doesn't throw an unhandled promise\n    // rejection warning.\n    promise.catch(() => {})\n\n    // Otherwise, create a new task for this directory.\n    const task: Task = [directory, promise, []]\n    this.tasks.push(task)\n\n    return task\n  }\n\n  /**\n   * Appends a file to the writer to be written after its containing directory\n   * is created. The file writer should be awaited after all the files have been\n   * appended. Any async operation that occurs between appending and awaiting\n   * may cause an unhandled promise rejection warning and potentially crash the\n   * process.\n   *\n   * @param filePath - The path to the file to write.\n   * @param data - The data to write to the file.\n   */\n  public append(filePath: string, data: Buffer | string): void {\n    // Find or create a task for the directory that contains the file.\n    const task = this.findOrCreateTask(path.dirname(filePath))\n\n    const promise = task[1].then(() => this.fs.writeFile(filePath, data))\n\n    // Attach a catch handler so that it doesn't throw an unhandled promise\n    // rejection warning.\n    promise.catch(() => {})\n\n    // Add the file write to the task AFTER the directory promise has resolved.\n    task[2].push(promise)\n  }\n\n  /**\n   * Returns a promise that resolves when all the files have been written.\n   */\n  public wait(): Promise<unknown> {\n    return Promise.all(this.tasks.flatMap((task) => task[2]))\n  }\n}\n","import type { RouteMetadata } from '../../../export/routes/types'\nimport type { CacheHandler, CacheHandlerContext, CacheHandlerValue } from '.'\nimport type { CacheFs } from '../../../shared/lib/utils'\nimport type { TagManifestEntry } from './tags-manifest.external'\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedFetchValue,\n  type IncrementalCacheValue,\n  type SetIncrementalFetchCacheContext,\n  type SetIncrementalResponseCacheContext,\n} from '../../response-cache'\n\nimport type { LRUCache } from '../lru-cache'\nimport path from '../../../shared/lib/isomorphic/path'\nimport {\n  NEXT_CACHE_TAGS_HEADER,\n  NEXT_DATA_SUFFIX,\n  NEXT_META_SUFFIX,\n  RSC_SEGMENT_SUFFIX,\n  RSC_SEGMENTS_DIR_SUFFIX,\n  RSC_SUFFIX,\n} from '../../../lib/constants'\nimport { areTagsExpired, tagsManifest } from './tags-manifest.external'\nimport { MultiFileWriter } from '../../../lib/multi-file-writer'\nimport { getMemoryCache } from './memory-cache.external'\n\ntype FileSystemCacheContext = Omit<\n  CacheHandlerContext,\n  'fs' | 'serverDistDir'\n> & {\n  fs: CacheFs\n  serverDistDir: string\n}\n\nexport default class FileSystemCache implements CacheHandler {\n  private fs: FileSystemCacheContext['fs']\n  private flushToDisk?: FileSystemCacheContext['flushToDisk']\n  private serverDistDir: FileSystemCacheContext['serverDistDir']\n  private revalidatedTags: string[]\n  private static debug: boolean = !!process.env.NEXT_PRIVATE_DEBUG_CACHE\n  private static memoryCache: LRUCache<CacheHandlerValue> | undefined\n\n  constructor(ctx: FileSystemCacheContext) {\n    this.fs = ctx.fs\n    this.flushToDisk = ctx.flushToDisk\n    this.serverDistDir = ctx.serverDistDir\n    this.revalidatedTags = ctx.revalidatedTags\n\n    if (ctx.maxMemoryCacheSize) {\n      if (!FileSystemCache.memoryCache) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: using memory store for fetch cache')\n        }\n\n        FileSystemCache.memoryCache = getMemoryCache(ctx.maxMemoryCacheSize)\n      } else if (FileSystemCache.debug) {\n        console.log('FileSystemCache: memory store already initialized')\n      }\n    } else if (FileSystemCache.debug) {\n      console.log('FileSystemCache: not using memory store for fetch cache')\n    }\n  }\n\n  public resetRequestCache(): void {}\n\n  public async revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ) {\n    tags = typeof tags === 'string' ? [tags] : tags\n\n    if (FileSystemCache.debug) {\n      console.log('FileSystemCache: revalidateTag', tags, durations)\n    }\n\n    if (tags.length === 0) {\n      return\n    }\n\n    const now = Date.now()\n\n    for (const tag of tags) {\n      const existingEntry = tagsManifest.get(tag) || {}\n\n      if (durations) {\n        // Use provided durations directly\n        const updates: TagManifestEntry = { ...existingEntry }\n\n        // mark as stale immediately\n        updates.stale = now\n\n        if (durations.expire !== undefined) {\n          updates.expired = now + durations.expire * 1000 // Convert seconds to ms\n        }\n\n        tagsManifest.set(tag, updates)\n      } else {\n        // Update expired field for immediate expiration (default behavior when no durations provided)\n        tagsManifest.set(tag, { ...existingEntry, expired: now })\n      }\n    }\n  }\n\n  public async get(...args: Parameters<CacheHandler['get']>) {\n    const [key, ctx] = args\n    const { kind } = ctx\n\n    let data = FileSystemCache.memoryCache?.get(key)\n\n    if (FileSystemCache.debug) {\n      if (kind === IncrementalCacheKind.FETCH) {\n        console.log('FileSystemCache: get', key, ctx.tags, kind, !!data)\n      } else {\n        console.log('FileSystemCache: get', key, kind, !!data)\n      }\n    }\n\n    // let's check the disk for seed data\n    if (!data && process.env.NEXT_RUNTIME !== 'edge') {\n      try {\n        if (kind === IncrementalCacheKind.APP_ROUTE) {\n          const filePath = this.getFilePath(\n            `${key}.body`,\n            IncrementalCacheKind.APP_ROUTE\n          )\n          const fileData = await this.fs.readFile(filePath)\n          const { mtime } = await this.fs.stat(filePath)\n\n          const meta = JSON.parse(\n            await this.fs.readFile(\n              filePath.replace(/\\.body$/, NEXT_META_SUFFIX),\n              'utf8'\n            )\n          )\n\n          data = {\n            lastModified: mtime.getTime(),\n            value: {\n              kind: CachedRouteKind.APP_ROUTE,\n              body: fileData,\n              headers: meta.headers,\n              status: meta.status,\n            },\n          }\n        } else {\n          const filePath = this.getFilePath(\n            kind === IncrementalCacheKind.FETCH ? key : `${key}.html`,\n            kind\n          )\n\n          const fileData = await this.fs.readFile(filePath, 'utf8')\n          const { mtime } = await this.fs.stat(filePath)\n\n          if (kind === IncrementalCacheKind.FETCH) {\n            const { tags, fetchIdx, fetchUrl } = ctx\n\n            if (!this.flushToDisk) return null\n\n            const lastModified = mtime.getTime()\n            const parsedData: CachedFetchValue = JSON.parse(fileData)\n            data = {\n              lastModified,\n              value: parsedData,\n            }\n\n            if (data.value?.kind === CachedRouteKind.FETCH) {\n              const storedTags = data.value?.tags\n\n              // update stored tags if a new one is being added\n              // TODO: remove this when we can send the tags\n              // via header on GET same as SET\n              if (!tags?.every((tag) => storedTags?.includes(tag))) {\n                if (FileSystemCache.debug) {\n                  console.log(\n                    'FileSystemCache: tags vs storedTags mismatch',\n                    tags,\n                    storedTags\n                  )\n                }\n                await this.set(key, data.value, {\n                  fetchCache: true,\n                  tags,\n                  fetchIdx,\n                  fetchUrl,\n                })\n              }\n            }\n          } else if (kind === IncrementalCacheKind.APP_PAGE) {\n            // We try to load the metadata file, but if it fails, we don't\n            // error. We also don't load it if this is a fallback.\n            let meta: RouteMetadata | undefined\n            try {\n              meta = JSON.parse(\n                await this.fs.readFile(\n                  filePath.replace(/\\.html$/, NEXT_META_SUFFIX),\n                  'utf8'\n                )\n              )\n            } catch {}\n\n            let maybeSegmentData: Map<string, Buffer> | undefined\n            if (meta?.segmentPaths) {\n              // Collect all the segment data for this page.\n              // TODO: To optimize file system reads, we should consider creating\n              // separate cache entries for each segment, rather than storing them\n              // all on the page's entry. Though the behavior is\n              // identical regardless.\n              const segmentData: Map<string, Buffer> = new Map()\n              maybeSegmentData = segmentData\n              const segmentsDir = key + RSC_SEGMENTS_DIR_SUFFIX\n              await Promise.all(\n                meta.segmentPaths.map(async (segmentPath: string) => {\n                  const segmentDataFilePath = this.getFilePath(\n                    segmentsDir + segmentPath + RSC_SEGMENT_SUFFIX,\n                    IncrementalCacheKind.APP_PAGE\n                  )\n                  try {\n                    segmentData.set(\n                      segmentPath,\n                      await this.fs.readFile(segmentDataFilePath)\n                    )\n                  } catch {\n                    // This shouldn't happen, but if for some reason we fail to\n                    // load a segment from the filesystem, treat it the same as if\n                    // the segment is dynamic and does not have a prefetch.\n                  }\n                })\n              )\n            }\n\n            let rscData: Buffer | undefined\n            if (\n              !ctx.isFallback &&\n              (!ctx.isRoutePPREnabled || meta?.postponed == null)\n            ) {\n              rscData = await this.fs.readFile(\n                this.getFilePath(\n                  `${key}${RSC_SUFFIX}`,\n                  IncrementalCacheKind.APP_PAGE\n                )\n              )\n            }\n\n            data = {\n              lastModified: mtime.getTime(),\n              value: {\n                kind: CachedRouteKind.APP_PAGE,\n                html: fileData,\n                rscData,\n                postponed: meta?.postponed,\n                headers: meta?.headers,\n                status: meta?.status,\n                segmentData: maybeSegmentData,\n              },\n            }\n          } else if (kind === IncrementalCacheKind.PAGES) {\n            let meta: RouteMetadata | undefined\n            let pageData: string | object = {}\n\n            if (!ctx.isFallback) {\n              pageData = JSON.parse(\n                await this.fs.readFile(\n                  this.getFilePath(\n                    `${key}${NEXT_DATA_SUFFIX}`,\n                    IncrementalCacheKind.PAGES\n                  ),\n                  'utf8'\n                )\n              )\n            }\n\n            data = {\n              lastModified: mtime.getTime(),\n              value: {\n                kind: CachedRouteKind.PAGES,\n                html: fileData,\n                pageData,\n                headers: meta?.headers,\n                status: meta?.status,\n              },\n            }\n          } else {\n            throw new Error(\n              `Invariant: Unexpected route kind ${kind} in file system cache.`\n            )\n          }\n        }\n\n        if (data) {\n          FileSystemCache.memoryCache?.set(key, data)\n        }\n      } catch {\n        return null\n      }\n    }\n\n    if (\n      data?.value?.kind === CachedRouteKind.APP_PAGE ||\n      data?.value?.kind === CachedRouteKind.APP_ROUTE ||\n      data?.value?.kind === CachedRouteKind.PAGES\n    ) {\n      const tagsHeader = data.value.headers?.[NEXT_CACHE_TAGS_HEADER]\n      if (typeof tagsHeader === 'string') {\n        const cacheTags = tagsHeader.split(',')\n\n        // we trigger a blocking validation if an ISR page\n        // had a tag revalidated, if we want to be a background\n        // revalidation instead we return data.lastModified = -1\n        if (\n          cacheTags.length > 0 &&\n          areTagsExpired(cacheTags, data.lastModified)\n        ) {\n          if (FileSystemCache.debug) {\n            console.log('FileSystemCache: expired tags', cacheTags)\n          }\n\n          return null\n        }\n      }\n    } else if (data?.value?.kind === CachedRouteKind.FETCH) {\n      const combinedTags =\n        ctx.kind === IncrementalCacheKind.FETCH\n          ? [...(ctx.tags || []), ...(ctx.softTags || [])]\n          : []\n\n      // When revalidate tag is called we don't return stale data so it's\n      // updated right away.\n      if (combinedTags.some((tag) => this.revalidatedTags.includes(tag))) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: was revalidated', combinedTags)\n        }\n\n        return null\n      }\n\n      if (areTagsExpired(combinedTags, data.lastModified)) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: expired tags', combinedTags)\n        }\n\n        return null\n      }\n    }\n\n    return data ?? null\n  }\n\n  public async set(\n    key: string,\n    data: IncrementalCacheValue | null,\n    ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ) {\n    FileSystemCache.memoryCache?.set(key, {\n      value: data,\n      lastModified: Date.now(),\n    })\n\n    if (FileSystemCache.debug) {\n      console.log('FileSystemCache: set', key)\n    }\n\n    if (!this.flushToDisk || !data) return\n\n    // Create a new writer that will prepare to write all the files to disk\n    // after their containing directory is created.\n    const writer = new MultiFileWriter(this.fs)\n\n    if (data.kind === CachedRouteKind.APP_ROUTE) {\n      const filePath = this.getFilePath(\n        `${key}.body`,\n        IncrementalCacheKind.APP_ROUTE\n      )\n\n      writer.append(filePath, data.body)\n\n      const meta: RouteMetadata = {\n        headers: data.headers,\n        status: data.status,\n        postponed: undefined,\n        segmentPaths: undefined,\n        prefetchHints: undefined,\n      }\n\n      writer.append(\n        filePath.replace(/\\.body$/, NEXT_META_SUFFIX),\n        JSON.stringify(meta, null, 2)\n      )\n    } else if (\n      data.kind === CachedRouteKind.PAGES ||\n      data.kind === CachedRouteKind.APP_PAGE\n    ) {\n      const isAppPath = data.kind === CachedRouteKind.APP_PAGE\n      const htmlPath = this.getFilePath(\n        `${key}.html`,\n        isAppPath ? IncrementalCacheKind.APP_PAGE : IncrementalCacheKind.PAGES\n      )\n\n      writer.append(htmlPath, data.html)\n\n      // Fallbacks don't generate a data file.\n      if (!ctx.fetchCache && !ctx.isFallback && !ctx.isRoutePPREnabled) {\n        writer.append(\n          this.getFilePath(\n            `${key}${isAppPath ? RSC_SUFFIX : NEXT_DATA_SUFFIX}`,\n            isAppPath\n              ? IncrementalCacheKind.APP_PAGE\n              : IncrementalCacheKind.PAGES\n          ),\n          isAppPath ? data.rscData! : JSON.stringify(data.pageData)\n        )\n      }\n\n      if (data?.kind === CachedRouteKind.APP_PAGE) {\n        let segmentPaths: string[] | undefined\n        if (data.segmentData) {\n          segmentPaths = []\n          const segmentsDir = htmlPath.replace(\n            /\\.html$/,\n            RSC_SEGMENTS_DIR_SUFFIX\n          )\n\n          for (const [segmentPath, buffer] of data.segmentData) {\n            segmentPaths.push(segmentPath)\n            const segmentDataFilePath =\n              segmentsDir + segmentPath + RSC_SEGMENT_SUFFIX\n            writer.append(segmentDataFilePath, buffer)\n          }\n        }\n\n        const meta: RouteMetadata = {\n          headers: data.headers,\n          status: data.status,\n          postponed: data.postponed,\n          segmentPaths,\n          prefetchHints: undefined,\n        }\n\n        writer.append(\n          htmlPath.replace(/\\.html$/, NEXT_META_SUFFIX),\n          JSON.stringify(meta)\n        )\n      }\n    } else if (data.kind === CachedRouteKind.FETCH) {\n      const filePath = this.getFilePath(key, IncrementalCacheKind.FETCH)\n      writer.append(\n        filePath,\n        JSON.stringify({\n          ...data,\n          tags: ctx.fetchCache ? ctx.tags : [],\n        })\n      )\n    }\n\n    // Wait for all FS operations to complete.\n    await writer.wait()\n  }\n\n  private getFilePath(key: string, kind: IncrementalCacheKind): string {\n    let rootDir: string\n    switch (kind) {\n      case IncrementalCacheKind.FETCH:\n        // we store in .next/cache/fetch-cache so it can be persisted\n        // across deploys\n        rootDir = path.join(this.serverDistDir, '..', 'cache', 'fetch-cache')\n        break\n      case IncrementalCacheKind.PAGES:\n        rootDir = path.join(this.serverDistDir, 'pages')\n        break\n      case IncrementalCacheKind.IMAGE:\n      case IncrementalCacheKind.APP_PAGE:\n      case IncrementalCacheKind.APP_ROUTE:\n        rootDir = path.join(this.serverDistDir, 'app')\n        break\n      default:\n        throw new Error(`Unexpected file path kind: ${kind}`)\n    }\n\n    const filePath = path.join(rootDir, key)\n    if (!(filePath.startsWith(rootDir + path.sep) || filePath === rootDir)) {\n      throw new Error(`Invalid file path: ${filePath}`)\n    }\n\n    return filePath\n  }\n}\n","/**\n * This transforms a URL pathname into a route. It removes any trailing slashes\n * and the `/index` suffix.\n *\n * @param pathname - The URL path that needs to be optimized.\n * @returns - The route\n *\n * @example\n * // returns '/example'\n * toRoute('/example/index/');\n *\n * @example\n * // returns '/example'\n * toRoute('/example/');\n *\n * @example\n * // returns '/'\n * toRoute('/index/');\n *\n * @example\n * // returns '/'\n * toRoute('/');\n */\nexport function toRoute(pathname: string): string {\n  return pathname.replace(/(?:\\/index)?\\/?$/, '') || '/'\n}\n","import type { CacheFs } from '../../../shared/lib/utils'\nimport type { PrerenderManifest } from '../../../build'\nimport {\n  type IncrementalCacheValue,\n  type IncrementalCacheEntry,\n  type IncrementalCache as IncrementalCacheType,\n  IncrementalCacheKind,\n  CachedRouteKind,\n  type IncrementalResponseCacheEntry,\n  type IncrementalFetchCacheEntry,\n  type GetIncrementalFetchCacheContext,\n  type GetIncrementalResponseCacheContext,\n  type CachedFetchValue,\n  type SetIncrementalFetchCacheContext,\n  type SetIncrementalResponseCacheContext,\n} from '../../response-cache'\nimport type { DeepReadonly } from '../../../shared/lib/deep-readonly'\nimport FileSystemCache from './file-system-cache'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\n\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  NEXT_CACHE_TAGS_HEADER,\n  PRERENDER_REVALIDATE_HEADER,\n} from '../../../lib/constants'\nimport { toRoute } from '../to-route'\nimport { SharedCacheControls } from './shared-cache-controls.external'\nimport {\n  getResumeDataCache,\n  workUnitAsyncStorage,\n} from '../../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport type { Revalidate } from '../cache-control'\nimport { getPreviouslyRevalidatedTags } from '../../server-utils'\nimport { workAsyncStorage } from '../../app-render/work-async-storage.external'\nimport { DetachedPromise } from '../../../lib/detached-promise'\nimport { areTagsExpired, areTagsStale } from './tags-manifest.external'\n\nexport interface CacheHandlerContext {\n  fs?: CacheFs\n  dev?: boolean\n  flushToDisk?: boolean\n  serverDistDir?: string\n  maxMemoryCacheSize?: number\n  fetchCacheKeyPrefix?: string\n  prerenderManifest?: PrerenderManifest\n  revalidatedTags: string[]\n  _requestHeaders: IncrementalCache['requestHeaders']\n}\n\nexport interface CacheHandlerValue {\n  lastModified: number\n  age?: number\n  cacheState?: string\n  value: IncrementalCacheValue | null\n}\n\nfunction toHex(buffer: ArrayBufferView | ArrayBuffer): string {\n  // Hex-encode body bytes losslessly: decoding as UTF-8 would collapse\n  // distinct bytes (0xff/0xfe to U+FFFD) and collide; Buffer isn't on edge.\n  const bytes = isArrayBuffer(buffer)\n    ? new Uint8Array(buffer)\n    : new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)\n  let hex = ''\n  for (const byte of bytes) {\n    hex += byte.toString(16).padStart(2, '0')\n  }\n  return hex\n}\n\ntype Body = NonNullable<RequestInit['body'] | Request['body']>\n\n// Duck typing to support Edge runtime\n// TODO: Switch to instanceof checks once Edge runtime is removed.\n\nfunction isArrayBuffer(\n  buffer: ArrayBuffer | ArrayBufferView\n): buffer is ArrayBuffer {\n  return !('buffer' in buffer)\n}\n\nfunction isBodyByteSequence(\n  body: Body\n): body is ArrayBufferView<ArrayBuffer> | ArrayBuffer {\n  return typeof body === 'object' && 'byteLength' in body\n}\n\nfunction isBodyReadableStream(body: Body): body is ReadableStream {\n  return typeof (body as any).getReader === 'function'\n}\n\nfunction isBodyFormDataOrURLSearchParams(\n  body: Body\n): body is FormData | URLSearchParams {\n  return typeof (body as any).keys === 'function'\n}\n\nfunction isBodyBlob(body: Body): body is Blob {\n  return typeof (body as any).arrayBuffer === 'function'\n}\n\nexport class CacheHandler {\n  // eslint-disable-next-line\n  constructor(_ctx: CacheHandlerContext) {}\n\n  public async get(\n    _cacheKey: string,\n    _ctx: GetIncrementalFetchCacheContext | GetIncrementalResponseCacheContext\n  ): Promise<CacheHandlerValue | null> {\n    return {} as any\n  }\n\n  public async set(\n    _cacheKey: string,\n    _data: IncrementalCacheValue | null,\n    _ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ): Promise<void> {}\n\n  public async revalidateTag(\n    _tags: string | string[],\n    _durations?: { expire?: number }\n  ): Promise<void> {}\n\n  public resetRequestCache(): void {}\n}\n\nasync function hashString(cacheString: string): Promise<string> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    const encoder = new TextEncoder()\n    const buffer = encoder.encode(cacheString)\n    return toHex(await crypto.subtle.digest('SHA-256', buffer))\n  } else {\n    const crypto = require('crypto') as typeof import('crypto')\n    return crypto.createHash('sha256').update(cacheString).digest('hex')\n  }\n}\n\n// this should be bumped anytime a fix is made to cache entries\n// that should bust the cache\nconst MAIN_KEY_PREFIX = 'v4'\n\nexport class IncrementalCache implements IncrementalCacheType {\n  readonly dev?: boolean\n  readonly disableForTestmode?: boolean\n  readonly cacheHandler?: CacheHandler\n  readonly hasCustomCacheHandler: boolean\n  readonly prerenderManifest: DeepReadonly<PrerenderManifest>\n  readonly requestHeaders: Record<string, undefined | string | string[]>\n  readonly allowedRevalidateHeaderKeys?: string[]\n  readonly minimalMode?: boolean\n  readonly fetchCacheKeyPrefix?: string\n  readonly isOnDemandRevalidate?: boolean\n  readonly revalidatedTags?: readonly string[]\n\n  private static readonly debug: boolean =\n    !!process.env.NEXT_PRIVATE_DEBUG_CACHE\n  private readonly locks = new Map<string, Promise<void>>()\n\n  /**\n   * The cache controls for routes. This will source the values from the\n   * prerender manifest until the in-memory cache is updated with new values.\n   */\n  private readonly cacheControls: SharedCacheControls\n\n  constructor({\n    fs,\n    dev,\n    flushToDisk,\n    minimalMode,\n    serverDistDir,\n    requestHeaders,\n    maxMemoryCacheSize,\n    getPrerenderManifest,\n    fetchCacheKeyPrefix,\n    CurCacheHandler,\n    allowedRevalidateHeaderKeys,\n  }: {\n    fs?: CacheFs\n    dev: boolean\n    minimalMode?: boolean\n    serverDistDir?: string\n    flushToDisk?: boolean\n    allowedRevalidateHeaderKeys?: string[]\n    requestHeaders: IncrementalCache['requestHeaders']\n    maxMemoryCacheSize?: number\n    getPrerenderManifest: () => DeepReadonly<PrerenderManifest>\n    fetchCacheKeyPrefix?: string\n    CurCacheHandler?: typeof CacheHandler\n  }) {\n    this.hasCustomCacheHandler = Boolean(CurCacheHandler)\n\n    const cacheHandlersSymbol = Symbol.for('@next/cache-handlers')\n    const _globalThis: typeof globalThis & {\n      [cacheHandlersSymbol]?: {\n        FetchCache?: typeof CacheHandler\n      }\n    } = globalThis\n\n    if (!CurCacheHandler) {\n      // if we have a global cache handler available leverage it\n      const globalCacheHandler = _globalThis[cacheHandlersSymbol]\n\n      if (globalCacheHandler?.FetchCache) {\n        CurCacheHandler = globalCacheHandler.FetchCache\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: using global FetchCache cache handler')\n        }\n      } else {\n        if (fs && serverDistDir) {\n          if (IncrementalCache.debug) {\n            console.log('IncrementalCache: using filesystem cache handler')\n          }\n          CurCacheHandler = FileSystemCache\n        }\n      }\n    } else if (IncrementalCache.debug) {\n      console.log(\n        'IncrementalCache: using custom cache handler',\n        CurCacheHandler.name\n      )\n    }\n\n    if (process.env.__NEXT_TEST_MAX_ISR_CACHE) {\n      // Allow cache size to be overridden for testing purposes\n      maxMemoryCacheSize = parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE, 10)\n    }\n    this.dev = dev\n    this.disableForTestmode = process.env.NEXT_PRIVATE_TEST_PROXY === 'true'\n    // this is a hack to avoid Webpack knowing this is equal to this.minimalMode\n    // because we replace this.minimalMode to true in production bundles.\n    const minimalModeKey = 'minimalMode'\n    this[minimalModeKey] = minimalMode\n    this.requestHeaders = requestHeaders\n    this.allowedRevalidateHeaderKeys = allowedRevalidateHeaderKeys\n    this.prerenderManifest = getPrerenderManifest()\n    this.cacheControls = new SharedCacheControls(this.prerenderManifest)\n    this.fetchCacheKeyPrefix = fetchCacheKeyPrefix\n    let revalidatedTags: string[] = []\n\n    if (\n      requestHeaders[PRERENDER_REVALIDATE_HEADER] ===\n      this.prerenderManifest?.preview?.previewModeId\n    ) {\n      this.isOnDemandRevalidate = true\n    }\n\n    if (minimalMode) {\n      revalidatedTags = this.revalidatedTags = getPreviouslyRevalidatedTags(\n        requestHeaders,\n        this.prerenderManifest?.preview?.previewModeId\n      )\n    }\n\n    if (CurCacheHandler) {\n      this.cacheHandler = new CurCacheHandler({\n        dev,\n        fs,\n        flushToDisk,\n        serverDistDir,\n        revalidatedTags,\n        maxMemoryCacheSize,\n        _requestHeaders: requestHeaders,\n        fetchCacheKeyPrefix,\n      })\n    }\n  }\n\n  private calculateRevalidate(\n    pathname: string,\n    fromTime: number,\n    dev: boolean,\n    isFallback: boolean | undefined\n  ): Revalidate {\n    // in development we don't have a prerender-manifest\n    // and default to always revalidating to allow easier debugging\n    if (dev)\n      return Math.floor(performance.timeOrigin + performance.now() - 1000)\n\n    const cacheControl = this.cacheControls.get(toRoute(pathname))\n\n    // if an entry isn't present in routes we fallback to a default\n    // of revalidating after 1 second unless it's a fallback request.\n    const initialRevalidateSeconds = cacheControl\n      ? cacheControl.revalidate\n      : isFallback\n        ? false\n        : 1\n\n    const revalidateAfter =\n      typeof initialRevalidateSeconds === 'number'\n        ? initialRevalidateSeconds * 1000 + fromTime\n        : initialRevalidateSeconds\n\n    return revalidateAfter\n  }\n\n  _getPathname(pathname: string, fetchCache?: boolean) {\n    return fetchCache ? pathname : normalizePagePath(pathname)\n  }\n\n  resetRequestCache() {\n    this.cacheHandler?.resetRequestCache?.()\n  }\n\n  async lock(cacheKey: string): Promise<() => Promise<void> | void> {\n    // Wait for any existing lock on this cache key to be released\n    // This implements a simple queue-based locking mechanism\n    while (true) {\n      const lock = this.locks.get(cacheKey)\n\n      if (IncrementalCache.debug) {\n        console.log('IncrementalCache: lock get', cacheKey, !!lock)\n      }\n\n      // If no lock exists, we can proceed to acquire it\n      if (!lock) break\n\n      // Wait for the existing lock to be released before trying again\n      await lock\n    }\n\n    // Create a new detached promise that will represent this lock\n    // The resolve function (unlock) will be returned to the caller\n    const { resolve, promise } = new DetachedPromise<void>()\n\n    if (IncrementalCache.debug) {\n      console.log('IncrementalCache: successfully locked', cacheKey)\n    }\n\n    // Store the lock promise in the locks map\n    this.locks.set(cacheKey, promise)\n\n    return () => {\n      // Resolve the promise to release the lock.\n      resolve()\n\n      // Remove the lock from the map once it's released so that future gets\n      // can acquire the lock.\n      this.locks.delete(cacheKey)\n    }\n  }\n\n  async revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ): Promise<void> {\n    return this.cacheHandler?.revalidateTag(tags, durations)\n  }\n\n  async generateSimpleCacheKey(input: string): Promise<string> {\n    const cacheString = JSON.stringify([\n      MAIN_KEY_PREFIX,\n      this.fetchCacheKeyPrefix || '',\n      input,\n    ])\n\n    return hashString(cacheString)\n  }\n\n  // x-ref: https://github.com/facebook/react/blob/2655c9354d8e1c54ba888444220f63e836925caa/packages/react/src/ReactFetch.js#L23\n  async generateCacheKey(\n    url: string,\n    init: RequestInit | Request = {}\n  ): Promise<string> {\n    const bodyChunks: string[] = []\n\n    const encoder = new TextEncoder()\n\n    // Will be set implementing https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n    let bodyType: string | null = null\n    const body = init.body\n    if (body) {\n      if (isBodyByteSequence(body)) {\n        bodyChunks.push(`bytes:${toHex(body)}`)\n        ;(init as any)._ogBody = body\n      } else if (isBodyReadableStream(body)) {\n        const readableBody = body\n\n        const chunks: Uint8Array[] = []\n\n        try {\n          await readableBody.pipeTo(\n            new WritableStream({\n              write(chunk) {\n                chunks.push(\n                  typeof chunk === 'string' ? encoder.encode(chunk) : chunk\n                )\n              },\n            })\n          )\n\n          // Create a new buffer with all the chunks.\n          const length = chunks.reduce((total, arr) => total + arr.length, 0)\n          const arrayBuffer = new Uint8Array(length)\n\n          // Push each of the chunks into the new array buffer.\n          let offset = 0\n          for (const chunk of chunks) {\n            arrayBuffer.set(chunk, offset)\n            offset += chunk.length\n          }\n\n          bodyChunks.push(`bytes:${toHex(arrayBuffer)}`)\n          ;(init as any)._ogBody = arrayBuffer\n        } catch (err) {\n          console.error('Problem reading body', err)\n        }\n      } else if (isBodyFormDataOrURLSearchParams(body)) {\n        bodyType =\n          String(body) === '[object FormData]'\n            ? // We don't need a boundary because we're not actually using this for a Content-Type header\n              'multipart/form-data; boundary='\n            : 'application/x-www-form-urlencoded;charset=UTF-8'\n        const iterable = body\n        ;(init as any)._ogBody = body\n        // Separate, tagged chunks so `[\"a\",\"b\"]` can't collide with `[\"a,b\"]`.\n        for (const [key, val] of iterable.entries()) {\n          bodyChunks.push(`key:${key}`)\n          if (typeof val === 'string') {\n            bodyChunks.push(`str:${val}`)\n          } else {\n            bodyChunks.push(\n              'file',\n              val.name,\n              val.type,\n              `bytes:${toHex(await val.arrayBuffer())}`\n            )\n          }\n        }\n        // handle blob body\n      } else if (isBodyBlob(body)) {\n        const blob = body\n        const arrayBuffer = await blob.arrayBuffer()\n        bodyChunks.push('blob', blob.type, `bytes:${toHex(arrayBuffer)}`)\n        ;(init as any)._ogBody = new Blob([arrayBuffer], { type: blob.type })\n        bodyType = blob.type\n      } else if (typeof body === 'string') {\n        bodyChunks.push(`str:${body}`)\n        ;(init as any)._ogBody = body\n        bodyType = 'text/plain;charset=UTF-8'\n      } else {\n        body satisfies never\n        throw new Error(`Unsupported body type: ${typeof body}`)\n      }\n    }\n\n    const headers =\n      typeof (init.headers || {}).keys === 'function'\n        ? Object.fromEntries(init.headers as Headers)\n        : Object.assign({} as Record<string, string>, init.headers)\n\n    // w3c trace context headers can break request caching and deduplication\n    // so we remove them from the cache key\n    if ('traceparent' in headers) delete headers['traceparent']\n    if ('tracestate' in headers) delete headers['tracestate']\n\n    const cacheString = JSON.stringify([\n      MAIN_KEY_PREFIX,\n      this.fetchCacheKeyPrefix || '',\n      url,\n      init.method,\n      // Ensures default Content-Type is part of the cache key\n      // TODO: Only necessary when headers are not used from the Request instance\n      bodyType,\n      headers,\n      init.mode,\n      init.redirect,\n      init.credentials,\n      init.referrer,\n      init.referrerPolicy,\n      init.integrity,\n      init.cache,\n      bodyChunks,\n    ])\n\n    return hashString(cacheString)\n  }\n\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext\n  ): Promise<IncrementalFetchCacheEntry | null>\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext | GetIncrementalResponseCacheContext\n  ): Promise<IncrementalCacheEntry | null> {\n    // Unlike other caches if we have a resume data cache, we use it even if\n    // testmode would normally disable it or if requestHeaders say 'no-cache'.\n    if (ctx.kind === IncrementalCacheKind.FETCH) {\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      const resumeDataCache = workUnitStore\n        ? getResumeDataCache(workUnitStore)\n        : null\n      if (resumeDataCache) {\n        const memoryCacheData = resumeDataCache.fetch.get(cacheKey)\n        if (memoryCacheData?.kind === CachedRouteKind.FETCH) {\n          // Check if any tags were recently revalidated before returning RDC entry.\n          // When a server action calls updateTag(), the re-render should see fresh\n          // data instead of stale RDC data.\n          const workStore = workAsyncStorage.getStore()\n          const combinedTags = [...(ctx.tags || []), ...(ctx.softTags || [])]\n          const hasRevalidatedTag = combinedTags.some(\n            (tag) =>\n              this.revalidatedTags?.includes(tag) ||\n              workStore?.pendingRevalidatedTags?.some(\n                (item) => item.tag === tag\n              )\n          )\n\n          if (hasRevalidatedTag) {\n            if (IncrementalCache.debug) {\n              console.log('IncrementalCache: rdc:revalidated-tag', cacheKey)\n            }\n            // Fall through to cacheHandler lookup\n          } else {\n            if (IncrementalCache.debug) {\n              console.log('IncrementalCache: rdc:hit', cacheKey)\n            }\n\n            return { isStale: false, value: memoryCacheData }\n          }\n        } else if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:miss', cacheKey)\n        }\n      } else {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:no-resume-data')\n        }\n      }\n    }\n\n    // we don't leverage the prerender cache in dev mode\n    // so that getStaticProps is always called for easier debugging\n    if (\n      this.disableForTestmode ||\n      (this.dev &&\n        (ctx.kind !== IncrementalCacheKind.FETCH ||\n          this.requestHeaders['cache-control'] === 'no-cache'))\n    ) {\n      return null\n    }\n\n    cacheKey = this._getPathname(\n      cacheKey,\n      ctx.kind === IncrementalCacheKind.FETCH\n    )\n\n    const cacheData = await this.cacheHandler?.get(cacheKey, ctx)\n\n    if (ctx.kind === IncrementalCacheKind.FETCH) {\n      if (!cacheData) {\n        return null\n      }\n\n      if (cacheData.value?.kind !== CachedRouteKind.FETCH) {\n        throw new InvariantError(\n          `Expected cached value for cache key ${JSON.stringify(cacheKey)} to be a \"FETCH\" kind, got ${JSON.stringify(cacheData.value?.kind)} instead.`\n        )\n      }\n\n      const workStore = workAsyncStorage.getStore()\n      const combinedTags = [...(ctx.tags || []), ...(ctx.softTags || [])]\n      // if a tag was revalidated we don't return stale data\n      if (\n        combinedTags.some(\n          (tag) =>\n            this.revalidatedTags?.includes(tag) ||\n            workStore?.pendingRevalidatedTags?.some((item) => item.tag === tag)\n        )\n      ) {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: expired tag', cacheKey)\n        }\n\n        return null\n      }\n\n      // As we're able to get the cache entry for this fetch, and the prerender\n      // resume data cache (RDC) is available, it must have been populated by a\n      // previous fetch, but was not yet present in the in-memory cache. This\n      // could be the case when performing multiple renders in parallel during\n      // build time where we de-duplicate the fetch calls.\n      //\n      // We add it to the RDC so that the next fetch call will be able to use it\n      // and it won't have to reach into the fetch cache implementation.\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      if (workUnitStore) {\n        const resumeDataCache = getResumeDataCache(workUnitStore)\n        if (resumeDataCache?.mutable) {\n          if (IncrementalCache.debug) {\n            console.log('IncrementalCache: rdc:set', cacheKey)\n          }\n\n          resumeDataCache.fetch.set(cacheKey, cacheData.value)\n        }\n      }\n\n      const revalidate = ctx.revalidate || cacheData.value.revalidate\n      const age =\n        (performance.timeOrigin +\n          performance.now() -\n          (cacheData.lastModified || 0)) /\n        1000\n\n      let isStale = age > revalidate\n      const data = cacheData.value.data\n\n      if (areTagsExpired(combinedTags, cacheData.lastModified)) {\n        return null\n      } else if (areTagsStale(combinedTags, cacheData.lastModified)) {\n        isStale = true\n      }\n\n      return {\n        isStale,\n        value: { kind: CachedRouteKind.FETCH, data, revalidate },\n      }\n    } else if (cacheData?.value?.kind === CachedRouteKind.FETCH) {\n      throw new InvariantError(\n        `Expected cached value for cache key ${JSON.stringify(cacheKey)} not to be a ${JSON.stringify(ctx.kind)} kind, got \"FETCH\" instead.`\n      )\n    }\n\n    let entry: IncrementalResponseCacheEntry | null = null\n    const { isFallback } = ctx\n    const cacheControl = this.cacheControls.get(toRoute(cacheKey))\n\n    let isStale: boolean | -1 | undefined\n    let revalidateAfter: Revalidate\n\n    if (cacheData?.lastModified === -1) {\n      isStale = -1\n      revalidateAfter = -1 * CACHE_ONE_YEAR_SECONDS * 1000\n    } else {\n      const now = performance.timeOrigin + performance.now()\n      const lastModified = cacheData?.lastModified || now\n\n      revalidateAfter = this.calculateRevalidate(\n        cacheKey,\n        lastModified,\n        this.dev ?? false,\n        ctx.isFallback\n      )\n\n      // If the route's `expire` time has passed, force a blocking revalidation\n      // by signalling `isStale = -1`. The response cache treats `-1` as \"skip\n      // the early SWR resolve\" and awaits a fresh render before the user sees a\n      // response.\n      const expireAfter =\n        typeof cacheControl?.expire === 'number'\n          ? cacheControl.expire * 1000 + lastModified\n          : undefined\n\n      if (expireAfter !== undefined && expireAfter < now) {\n        isStale = -1\n      } else {\n        isStale =\n          revalidateAfter !== false && revalidateAfter < now ? true : undefined\n\n        // If the stale time couldn't be determined based on the revalidation\n        // time, we check if the tags are expired or stale.\n        if (\n          isStale === undefined &&\n          (cacheData?.value?.kind === CachedRouteKind.APP_PAGE ||\n            cacheData?.value?.kind === CachedRouteKind.APP_ROUTE)\n        ) {\n          const tagsHeader = cacheData.value.headers?.[NEXT_CACHE_TAGS_HEADER]\n\n          if (typeof tagsHeader === 'string') {\n            const cacheTags = tagsHeader.split(',')\n\n            if (cacheTags.length > 0) {\n              if (areTagsExpired(cacheTags, lastModified)) {\n                isStale = -1\n              } else if (areTagsStale(cacheTags, lastModified)) {\n                isStale = true\n              }\n            }\n          }\n        }\n      }\n    }\n\n    if (cacheData) {\n      entry = {\n        isStale,\n        cacheControl,\n        revalidateAfter,\n        value: cacheData.value,\n        isFallback,\n      }\n    }\n\n    if (\n      !cacheData &&\n      this.prerenderManifest.notFoundRoutes.includes(cacheKey)\n    ) {\n      // for the first hit after starting the server the cache\n      // may not have a way to save notFound: true so if\n      // the prerender-manifest marks this as notFound then we\n      // return that entry and trigger a cache set to give it a\n      // chance to update in-memory entries\n      entry = {\n        isStale,\n        value: null,\n        cacheControl,\n        revalidateAfter,\n        isFallback,\n      }\n      this.set(cacheKey, entry.value, { ...ctx, cacheControl })\n    }\n    return entry\n  }\n\n  async set(\n    pathname: string,\n    data: CachedFetchValue | null,\n    ctx: SetIncrementalFetchCacheContext\n  ): Promise<void>\n  async set(\n    pathname: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n  async set(\n    pathname: string,\n    data: IncrementalCacheValue | null,\n    ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ): Promise<void> {\n    // Even if we otherwise disable caching for testMode or if no fetchCache is\n    // configured we still always stash results in the resume data cache if one\n    // exists. This is because this is a transient in memory cache that\n    // populates caches ahead of a dynamic render in dev mode to allow the RSC\n    // debug info to have the right environment associated to it.\n    if (data?.kind === CachedRouteKind.FETCH) {\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      const resumeDataCache = workUnitStore\n        ? getResumeDataCache(workUnitStore)\n        : null\n      if (resumeDataCache?.mutable) {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:set', pathname)\n        }\n\n        resumeDataCache.fetch.set(pathname, data)\n      }\n    }\n\n    if (this.disableForTestmode || (this.dev && !ctx.fetchCache)) return\n\n    pathname = this._getPathname(pathname, ctx.fetchCache)\n\n    // FetchCache has upper limit of 2MB per-entry currently\n    const itemSize = JSON.stringify(data).length\n    if (\n      ctx.fetchCache &&\n      itemSize > 2 * 1024 * 1024 &&\n      // We ignore the size limit when custom cache handler is being used, as it\n      // might not have this limit\n      !this.hasCustomCacheHandler &&\n      // We also ignore the size limit when it's an implicit build-time-only\n      // caching that the user isn't even aware of.\n      !ctx.isImplicitBuildTimeCache\n    ) {\n      const warningText = `Failed to set Next.js data cache for ${ctx.fetchUrl || pathname}, items over 2MB can not be cached (${itemSize} bytes)`\n\n      if (this.dev) {\n        throw new Error(warningText)\n      }\n      console.warn(warningText)\n      return\n    }\n\n    try {\n      if (!ctx.fetchCache && ctx.cacheControl) {\n        this.cacheControls.set(toRoute(pathname), ctx.cacheControl)\n      }\n\n      await this.cacheHandler?.set(pathname, data, ctx)\n    } catch (error) {\n      console.warn('Failed to update prerender cache for', pathname, error)\n    }\n  }\n}\n","import type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { NextConfigRuntime } from '../../config-shared'\nimport type { UrlWithParsedQuery } from 'node:url'\nimport type { ServerCacheStatus } from '../../../next-devtools/dev-overlay/cache-indicator'\nimport type { AnyStream } from '../../app-render/stream-ops'\n\nexport type RevalidateFn = (config: {\n  urlPath: string\n  headers: { [key: string]: string | string[] }\n  opts: { unstable_onlyGenerated?: boolean }\n}) => Promise<void>\n\n// The RouterServerContext contains instance specific\n// information that isn't available/relevant when\n// deployed in serverless environments, the key is\n// the relative project dir this allows separate contexts\n// when running multiple next instances in same process\nexport type RouterServerContext = Record<\n  string,\n  {\n    // hostname the server is started with\n    hostname?: string\n    // revalidate function to bypass going through network\n    // to invoke revalidate request (uses mocked req/res)\n    revalidate?: RevalidateFn\n    // function to render the 404 page\n    render404?: (\n      req: IncomingMessage,\n      res: ServerResponse,\n      parsedUrl?: UrlWithParsedQuery,\n      setHeaders?: boolean\n    ) => Promise<void>\n    // exposing nextConfig for dev mode specifically\n    nextConfig?: NextConfigRuntime\n    // whether running in custom server mode\n    isCustomServer?: boolean\n    // whether test proxy is enabled\n    experimentalTestProxy?: boolean\n    // allow dev server to log with original stack\n    logErrorWithOriginalStack?: (err: unknown, type: string) => void\n    // allow setting ISR status in dev\n    setIsrStatus?: (key: string, value: boolean | undefined) => void\n    setReactDebugChannel?: (\n      debugChannel: { readable: AnyStream },\n      htmlRequestId: string,\n      requestId: string\n    ) => void\n    setCacheStatus?: (status: ServerCacheStatus, htmlRequestId: string) => void\n    sendErrorsToBrowser?: (\n      errorsRscStream: AnyStream,\n      htmlRequestId: string\n    ) => void\n    // indicates request handlers are already wrapped by next-server tracing\n    isWrappedByNextServer?: boolean\n  }\n>\n\nexport const RouterServerContextSymbol = Symbol.for(\n  '@next/router-server-methods'\n)\n\nexport const routerServerGlobal = globalThis as typeof globalThis & {\n  [RouterServerContextSymbol]?: RouterServerContext\n}\n","import { NEXT_URL } from '../client/components/app-router-headers'\nimport type { Rewrite } from './load-custom-routes'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\n\nexport function isInterceptionRouteRewrite(route: DeepReadonly<Rewrite>) {\n  // When we generate interception rewrites in the above implementation, we always do so with only a single `has` condition.\n  return route.has?.[0]?.key === NEXT_URL\n}\n","import '../../build/adapter/setup-node-env.external'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport type {\n  InstrumentationOnRequestError,\n  RequestErrorContext,\n} from '../instrumentation/types'\nimport type { ParsedUrlQuery } from 'node:querystring'\nimport type { UrlWithParsedQuery } from 'node:url'\nimport type {\n  PrerenderManifest,\n  RequiredServerFilesManifest,\n} from '../../build'\nimport type { DevRoutesManifest } from '../lib/router-utils/setup-dev-bundler'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport {\n  BUILD_ID_FILE,\n  BUILD_MANIFEST,\n  CLIENT_REFERENCE_MANIFEST,\n  DYNAMIC_CSS_MANIFEST,\n  NEXT_FONT_MANIFEST,\n  PREFETCH_HINTS,\n  PRERENDER_MANIFEST,\n  REACT_LOADABLE_MANIFEST,\n  ROUTES_MANIFEST,\n  SERVER_FILES_MANIFEST,\n  SERVER_REFERENCE_MANIFEST,\n  SUBRESOURCE_INTEGRITY_MANIFEST,\n} from '../../shared/lib/constants'\nimport { parseReqUrl } from '../../lib/url'\nimport {\n  normalizeLocalePath,\n  type PathLocale,\n} from '../../shared/lib/i18n/normalize-locale-path'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'\nimport { getServerUtils } from '../server-utils'\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { checkIsOnDemandRevalidate } from '../api-utils'\nimport type { PreviewData } from '../../types'\nimport type { BuildManifest } from '../get-page-files'\nimport type { ReactLoadableManifest } from '../load-components'\nimport type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport { normalizeDataPath } from '../../shared/lib/page-path/normalize-data-path'\nimport { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'\nimport {\n  addRequestMeta,\n  getRequestMeta,\n  type NextIncomingMessage,\n} from '../request-meta'\nimport { patchSetHeaderWithCookieSupport } from '../lib/patch-set-header'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\nimport { isStaticMetadataRoute } from '../../lib/metadata/is-metadata-route'\nimport { IncrementalCache } from '../lib/incremental-cache'\nimport { initializeCacheHandlers, setCacheHandler } from '../use-cache/handlers'\nimport { interopDefault } from '../app-render/interop-default'\nimport { RouteKind } from '../route-kind'\nimport type { BaseNextRequest } from '../base-http'\nimport type { I18NConfig, NextConfigRuntime } from '../config-shared'\nimport ResponseCache, { type ResponseGenerator } from '../response-cache'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n  RouterServerContextSymbol,\n  routerServerGlobal,\n  type RouterServerContext,\n} from '../lib/router-utils/router-server-context'\nimport { decodePathParams } from '../lib/router-utils/decode-path-params'\nimport { removeTrailingSlash } from '../../shared/lib/router/utils/remove-trailing-slash'\nimport { isInterceptionRouteRewrite } from '../../lib/is-interception-route-rewrite'\n\n/**\n * RouteModuleOptions is the options that are passed to the route module, other\n * route modules should extend this class to add specific options for their\n * route.\n */\nexport interface RouteModuleOptions<\n  D extends RouteDefinition = RouteDefinition,\n  U = unknown,\n> {\n  readonly definition: Readonly<D>\n  readonly userland: Readonly<U>\n  readonly distDir: string\n  readonly relativeProjectDir: string\n}\n\n/**\n * RouteHandlerContext is the base context for a route handler.\n */\nexport interface RouteModuleHandleContext {\n  /**\n   * Any matched parameters for the request. This is only defined for dynamic\n   * routes.\n   */\n  params: Record<string, string | string[] | undefined> | undefined\n}\n\nconst dynamicImportEsmDefault = (id: string) =>\n  import(/* webpackIgnore: true */ /* turbopackIgnore: true */ id).then(\n    (mod) => mod.default || mod\n  )\n\n/**\n * RouteModule is the base class for all route modules. This class should be\n * extended by all route modules.\n */\nexport abstract class RouteModule<\n  D extends RouteDefinition = RouteDefinition,\n  U = unknown,\n> {\n  /**\n   * The userland module. This is the module that is exported from the user's\n   * code. Exposed as a getter so subclasses can override with lazy loading.\n   */\n  protected _userland: Readonly<U>\n\n  get userland(): Readonly<U> {\n    return this._userland\n  }\n\n  /**\n   * The definition of the route.\n   */\n  public readonly definition: Readonly<D>\n\n  /**\n   * The shared modules that are exposed and required for the route module.\n   */\n  public static readonly sharedModules: any\n\n  public isDev: boolean\n  public distDir: string\n  public relativeProjectDir: string\n  public incrementCache?: IncrementalCache\n  public responseCache?: ResponseCache\n\n  constructor({\n    userland,\n    definition,\n    distDir,\n    relativeProjectDir,\n  }: RouteModuleOptions<D, U>) {\n    this._userland = userland\n    this.definition = definition\n    this.isDev = !!process.env.__NEXT_DEV_SERVER\n    this.distDir = distDir\n    this.relativeProjectDir = relativeProjectDir\n  }\n\n  private getRouterServerContext(\n    req: NextIncomingMessage\n  ): RouterServerContext[string] | undefined {\n    const hostname = getRequestMeta(req, 'hostname')\n    const revalidate = getRequestMeta(req, 'revalidate')\n    const render404 = getRequestMeta(req, 'render404')\n    const relativeProjectDir =\n      getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n    const routerServerContext =\n      routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n\n    return {\n      ...routerServerContext,\n      ...(hostname !== undefined ? { hostname } : {}),\n      ...(revalidate !== undefined ? { revalidate } : {}),\n      ...(render404 !== undefined ? { render404 } : {}),\n    }\n  }\n\n  public normalizeUrl(\n    _req: IncomingMessage | BaseNextRequest,\n    _parsedUrl: UrlWithParsedQuery\n  ) {}\n\n  public async instrumentationOnRequestError(\n    req: IncomingMessage | BaseNextRequest,\n    ...args: Parameters<InstrumentationOnRequestError>\n  ) {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      const { getEdgeInstrumentationModule } = await import('../web/globals')\n      const instrumentation = await getEdgeInstrumentationModule()\n\n      if (instrumentation) {\n        await instrumentation.onRequestError?.(...args)\n      }\n    } else {\n      const { join } = require('node:path') as typeof import('node:path')\n      const absoluteProjectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      const { instrumentationOnRequestError } = await import(\n        '../lib/router-utils/instrumentation-globals.external.js'\n      )\n\n      return instrumentationOnRequestError(\n        absoluteProjectDir,\n        this.distDir,\n        ...args\n      )\n    }\n  }\n\n  private loadManifests(\n    srcPage: string,\n    projectDir?: string\n  ): {\n    buildId: string\n    buildManifest: BuildManifest\n    fallbackBuildManifest: BuildManifest\n    routesManifest: DeepReadonly<DevRoutesManifest>\n    nextFontManifest: DeepReadonly<NextFontManifest>\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n    serverFilesManifest: DeepReadonly<RequiredServerFilesManifest> | undefined\n    reactLoadableManifest: DeepReadonly<ReactLoadableManifest>\n    subresourceIntegrityManifest: any\n    clientReferenceManifest: any\n    serverActionsManifest: any\n    dynamicCssManifest: any\n    prefetchHintsManifest: Record<string, any> | undefined\n    interceptionRoutePatterns: RegExp[]\n  } {\n    let result\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      const { getEdgePreviewProps } =\n        require('../web/get-edge-preview-props') as typeof import('../web/get-edge-preview-props')\n\n      const maybeJSONParse = (str?: string) =>\n        str ? JSON.parse(str) : undefined\n\n      result = {\n        buildId: process.env.__NEXT_BUILD_ID || '',\n        buildManifest: self.__BUILD_MANIFEST as any,\n        fallbackBuildManifest: {} as any,\n        reactLoadableManifest: maybeJSONParse(self.__REACT_LOADABLE_MANIFEST),\n        nextFontManifest: maybeJSONParse(self.__NEXT_FONT_MANIFEST),\n        prerenderManifest: {\n          routes: {},\n          dynamicRoutes: {},\n          notFoundRoutes: [],\n          version: 4,\n          preview: getEdgePreviewProps(),\n        } as const,\n        routesManifest: {\n          version: 4,\n          caseSensitive: Boolean(process.env.__NEXT_CASE_SENSITIVE_ROUTES),\n          basePath: process.env.__NEXT_BASE_PATH || '',\n          rewrites: (process.env.__NEXT_REWRITES as any) || {\n            beforeFiles: [],\n            afterFiles: [],\n            fallback: [],\n          },\n          redirects: [],\n          headers: [],\n          onMatchHeaders: [],\n          i18n:\n            (process.env.__NEXT_I18N_CONFIG as any as I18NConfig) || undefined,\n          skipProxyUrlNormalize: Boolean(\n            process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n          ),\n        },\n        serverFilesManifest: self.__SERVER_FILES_MANIFEST,\n        clientReferenceManifest: self.__RSC_MANIFEST?.[srcPage],\n        serverActionsManifest: maybeJSONParse(self.__RSC_SERVER_MANIFEST),\n        subresourceIntegrityManifest: maybeJSONParse(\n          self.__SUBRESOURCE_INTEGRITY_MANIFEST\n        ),\n        dynamicCssManifest: maybeJSONParse(self.__DYNAMIC_CSS_MANIFEST),\n        // Edge pages are always dynamic so prefetch inlining hints\n        // don't apply. The runtime handles missing hints gracefully.\n        prefetchHintsManifest: undefined,\n        interceptionRoutePatterns: (\n          maybeJSONParse(self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST) ?? []\n        ).map((rewrite: any) => new RegExp(rewrite.regex)),\n      }\n    } else {\n      if (!projectDir) {\n        throw new Error('Invariant: projectDir is required for node runtime')\n      }\n      const { loadManifestFromRelativePath } =\n        require('../load-manifest.external') as typeof import('../load-manifest.external')\n      const normalizedPagePath = normalizePagePath(srcPage)\n\n      const router =\n        this.definition.kind === RouteKind.PAGES ||\n        this.definition.kind === RouteKind.PAGES_API\n          ? 'pages'\n          : 'app'\n\n      const [\n        routesManifest,\n        prerenderManifest,\n        buildManifest,\n        fallbackBuildManifest,\n        reactLoadableManifest,\n        nextFontManifest,\n        clientReferenceManifest,\n        serverActionsManifest,\n        subresourceIntegrityManifest,\n        serverFilesManifest,\n        buildId,\n        dynamicCssManifest,\n        prefetchHintsManifest,\n      ] = [\n        loadManifestFromRelativePath<DevRoutesManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: ROUTES_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<PrerenderManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: PRERENDER_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<BuildManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: BUILD_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        srcPage === '/_error'\n          ? loadManifestFromRelativePath<BuildManifest>({\n              projectDir,\n              distDir: this.distDir,\n              manifest: `fallback-${BUILD_MANIFEST}`,\n              shouldCache: !this.isDev,\n              handleMissing: true,\n            })\n          : ({} as BuildManifest),\n        loadManifestFromRelativePath<ReactLoadableManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: process.env.TURBOPACK\n            ? `server/${router === 'app' ? 'app' : 'pages'}${normalizedPagePath}/${REACT_LOADABLE_MANIFEST}`\n            : REACT_LOADABLE_MANIFEST,\n          handleMissing: true,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<NextFontManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: `server/${NEXT_FONT_MANIFEST}.json`,\n          shouldCache: !this.isDev,\n        }),\n        router === 'app' && !isStaticMetadataRoute(srcPage)\n          ? loadManifestFromRelativePath({\n              distDir: this.distDir,\n              projectDir,\n              useEval: true,\n              handleMissing: true,\n              manifest: `server/app${srcPage.replace(/%5F/g, '_') + '_' + CLIENT_REFERENCE_MANIFEST}.js`,\n              shouldCache: !this.isDev,\n            })\n          : undefined,\n        router === 'app'\n          ? loadManifestFromRelativePath<any>({\n              distDir: this.distDir,\n              projectDir,\n              manifest: `server/${SERVER_REFERENCE_MANIFEST}.json`,\n              handleMissing: true,\n              shouldCache: !this.isDev,\n            })\n          : {},\n        loadManifestFromRelativePath<Record<string, string>>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: `server/${SUBRESOURCE_INTEGRITY_MANIFEST}.json`,\n          handleMissing: true,\n          shouldCache: !this.isDev,\n        }),\n        this.isDev\n          ? undefined\n          : loadManifestFromRelativePath<RequiredServerFilesManifest>({\n              projectDir,\n              distDir: this.distDir,\n              shouldCache: true,\n              manifest: `${SERVER_FILES_MANIFEST}.json`,\n            }),\n        this.isDev\n          ? 'development'\n          : loadManifestFromRelativePath<any>({\n              projectDir,\n              distDir: this.distDir,\n              manifest: BUILD_ID_FILE,\n              skipParse: true,\n              shouldCache: true,\n            }),\n        loadManifestFromRelativePath<any>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: DYNAMIC_CSS_MANIFEST,\n          shouldCache: !this.isDev,\n          handleMissing: true,\n        }),\n        router === 'app'\n          ? loadManifestFromRelativePath<Record<string, any>>({\n              projectDir,\n              distDir: this.distDir,\n              manifest: `server/${PREFETCH_HINTS}`,\n              shouldCache: !this.isDev,\n              handleMissing: true,\n            })\n          : undefined,\n      ]\n\n      result = {\n        buildId,\n        buildManifest,\n        fallbackBuildManifest,\n        routesManifest,\n        nextFontManifest,\n        prerenderManifest,\n        serverFilesManifest,\n        reactLoadableManifest,\n        clientReferenceManifest: (clientReferenceManifest as any)\n          ?.__RSC_MANIFEST?.[srcPage.replace(/%5F/g, '_')],\n        serverActionsManifest,\n        subresourceIntegrityManifest,\n        dynamicCssManifest,\n        prefetchHintsManifest,\n        interceptionRoutePatterns: routesManifest.rewrites.beforeFiles\n          .filter(isInterceptionRouteRewrite)\n          .map((rewrite) => new RegExp(rewrite.regex)),\n      }\n    }\n\n    return result\n  }\n\n  public async loadCustomCacheHandlers(\n    req: IncomingMessage | BaseNextRequest,\n    nextConfig: NextConfigRuntime\n  ) {\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      const { cacheMaxMemorySize, cacheHandlers } = nextConfig\n      if (!cacheHandlers) return\n\n      // If we've already initialized the cache handlers interface, don't do it\n      // again.\n      if (!initializeCacheHandlers(cacheMaxMemorySize)) return\n\n      for (const [kind, handler] of Object.entries(cacheHandlers)) {\n        if (!handler) continue\n\n        const { formatDynamicImportPath } =\n          require('../../lib/format-dynamic-import-path') as typeof import('../../lib/format-dynamic-import-path')\n\n        const { join } = require('node:path') as typeof import('node:path')\n        const absoluteProjectDir = join(\n          /* turbopackIgnore: true */\n          process.cwd(),\n          getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n        )\n\n        setCacheHandler(\n          kind,\n          interopDefault(\n            await dynamicImportEsmDefault(\n              formatDynamicImportPath(\n                `${absoluteProjectDir}/${this.distDir}`,\n                handler\n              )\n            )\n          )\n        )\n      }\n    }\n  }\n\n  public async getIncrementalCache(\n    req: IncomingMessage | BaseNextRequest,\n    nextConfig: NextConfigRuntime,\n    prerenderManifest: DeepReadonly<PrerenderManifest>,\n    isMinimalMode: boolean\n  ): Promise<IncrementalCache> {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      return (globalThis as any).__incrementalCache\n    } else {\n      let CacheHandler: any\n      const { cacheHandler } = nextConfig\n\n      if (cacheHandler) {\n        const { formatDynamicImportPath } =\n          require('../../lib/format-dynamic-import-path') as typeof import('../../lib/format-dynamic-import-path')\n\n        CacheHandler = interopDefault(\n          await dynamicImportEsmDefault(\n            formatDynamicImportPath(this.distDir, cacheHandler)\n          )\n        )\n      }\n      const { join } = require('node:path') as typeof import('node:path')\n      const projectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      await this.loadCustomCacheHandlers(req, nextConfig)\n\n      // incremental-cache is request specific\n      // although can have shared caches in module scope\n      // per-cache handler\n      const incrementalCache = new IncrementalCache({\n        fs: (\n          require('../lib/node-fs-methods') as typeof import('../lib/node-fs-methods')\n        ).nodeFs,\n        dev: this.isDev,\n        requestHeaders: req.headers,\n        allowedRevalidateHeaderKeys:\n          nextConfig.experimental.allowedRevalidateHeaderKeys,\n        minimalMode: isMinimalMode,\n        serverDistDir: `${projectDir}/${this.distDir}/server`,\n        fetchCacheKeyPrefix: nextConfig.experimental.fetchCacheKeyPrefix,\n        maxMemoryCacheSize: nextConfig.cacheMaxMemorySize,\n        flushToDisk: !isMinimalMode && nextConfig.experimental.isrFlushToDisk,\n        getPrerenderManifest: () => prerenderManifest,\n        CurCacheHandler: CacheHandler,\n      })\n\n      // we need to expose this on globalThis as the app-render\n      // workStore grabs the incrementalCache from there\n      ;(globalThis as any).__incrementalCache = incrementalCache\n      return incrementalCache\n    }\n  }\n\n  public async onRequestError(\n    req: IncomingMessage | BaseNextRequest,\n    err: unknown,\n    errorContext: RequestErrorContext,\n    silenceLog: boolean,\n    routerServerContext?: RouterServerContext[string]\n  ) {\n    if (!silenceLog) {\n      if (routerServerContext?.logErrorWithOriginalStack) {\n        routerServerContext.logErrorWithOriginalStack(err, 'app-dir')\n      } else {\n        console.error(err)\n      }\n    }\n    await this.instrumentationOnRequestError(\n      req,\n      err,\n      {\n        path: req.url || '/',\n        headers: req.headers,\n        method: req.method || 'GET',\n      },\n      errorContext\n    )\n  }\n\n  /** A more lightweight version of `prepare()` for only retrieving the config on edge */\n  public getNextConfigEdge(req: NextIncomingMessage): {\n    nextConfig: NextConfigRuntime\n    deploymentId: string\n  } {\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      throw new Error(\n        'Invariant: getNextConfigEdge must only be called in edge runtime'\n      )\n    }\n\n    let serverFilesManifest = self.__SERVER_FILES_MANIFEST as any as\n      | RequiredServerFilesManifest\n      | undefined\n    const routerServerContext = this.getRouterServerContext(req)\n    const nextConfig =\n      routerServerContext?.nextConfig || serverFilesManifest?.config\n\n    if (!nextConfig) {\n      throw new Error(\"Invariant: nextConfig couldn't be loaded\")\n    }\n\n    let deploymentId\n    if (nextConfig.experimental?.runtimeServerDeploymentId) {\n      if (!process.env.NEXT_DEPLOYMENT_ID) {\n        throw new Error(\n          'process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'\n        )\n      }\n      deploymentId = process.env.NEXT_DEPLOYMENT_ID\n    } else {\n      deploymentId = nextConfig.deploymentId || ''\n    }\n\n    return { nextConfig, deploymentId }\n  }\n\n  public async prepare(\n    req: IncomingMessage | BaseNextRequest,\n    res: ServerResponse | null,\n    {\n      srcPage,\n      multiZoneDraftMode,\n    }: {\n      srcPage: string\n      multiZoneDraftMode?: boolean\n    }\n  ): Promise<\n    | {\n        buildId: string\n        deploymentId: string\n        clientAssetToken: string\n        locale?: string\n        locales?: readonly string[]\n        defaultLocale?: string\n        query: ParsedUrlQuery\n        originalQuery: ParsedUrlQuery\n        originalPathname: string\n        params?: ParsedUrlQuery\n        parsedUrl: UrlWithParsedQuery\n        previewData: PreviewData\n        pageIsDynamic: boolean\n        isDraftMode: boolean\n        resolvedPathname: string\n        encodedResolvedPathname: string\n        isNextDataRequest: boolean\n        buildManifest: DeepReadonly<BuildManifest>\n        fallbackBuildManifest: DeepReadonly<BuildManifest>\n        nextFontManifest: DeepReadonly<NextFontManifest>\n        serverFilesManifest:\n          | DeepReadonly<RequiredServerFilesManifest>\n          | undefined\n        reactLoadableManifest: DeepReadonly<ReactLoadableManifest>\n        routesManifest: DeepReadonly<DevRoutesManifest>\n        prerenderManifest: DeepReadonly<PrerenderManifest>\n        // we can't pull in the client reference type or it causes issues with\n        // our pre-compiled types\n        clientReferenceManifest?: any\n        serverActionsManifest?: any\n        dynamicCssManifest?: any\n        prefetchHintsManifest?: Record<string, any>\n        subresourceIntegrityManifest?: DeepReadonly<Record<string, string>>\n        isOnDemandRevalidate: boolean\n        revalidateOnlyGenerated: boolean\n        nextConfig: NextConfigRuntime\n        routerServerContext?: RouterServerContext[string]\n        interceptionRoutePatterns?: any\n      }\n    | undefined\n  > {\n    let absoluteProjectDir: string | undefined\n\n    // edge runtime handles loading instrumentation at the edge adapter level\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      if (res) {\n        patchSetHeaderWithCookieSupport(req, res)\n      }\n\n      const { join, relative } =\n        require('node:path') as typeof import('node:path')\n\n      absoluteProjectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      const absoluteDistDir = getRequestMeta(req, 'distDir')\n\n      if (absoluteDistDir) {\n        this.distDir = relative(absoluteProjectDir, absoluteDistDir)\n      }\n      const { ensureInstrumentationRegistered } = await import(\n        '../lib/router-utils/instrumentation-globals.external.js'\n      )\n      // ensure instrumentation is registered and pass\n      // onRequestError below. Awaited so any caller of `RouteModule.prepare`\n      // that bypasses `BaseServer.handleRequest` (where this is also awaited\n      // via `prepareImpl`) still observes the instrumentation hook completing\n      // before the userland route handler runs.\n      await ensureInstrumentationRegistered(absoluteProjectDir, this.distDir)\n    }\n    const manifests = this.loadManifests(srcPage, absoluteProjectDir)\n    const { routesManifest, prerenderManifest, serverFilesManifest } = manifests\n\n    const { basePath, i18n, rewrites } = routesManifest\n\n    const routerServerContext = this.getRouterServerContext(req)\n    const nextConfig =\n      routerServerContext?.nextConfig || serverFilesManifest?.config\n\n    // Injected in base-server.ts\n    const protocol = req.headers['x-forwarded-proto']?.includes('https')\n      ? 'https'\n      : 'http'\n\n    // When there are hostname and port we build an absolute URL\n    if (!getRequestMeta(req, 'initURL')) {\n      const initUrl = serverFilesManifest?.config.experimental.trustHostHeader\n        ? `${protocol}://${req.headers.host || 'localhost'}${req.url}`\n        : `${protocol}://${routerServerContext?.hostname || 'localhost'}${req.url}`\n\n      addRequestMeta(req, 'initURL', initUrl)\n      addRequestMeta(req, 'initProtocol', protocol)\n    }\n\n    if (basePath) {\n      req.url = removePathPrefix(req.url || '/', basePath)\n    }\n\n    const parsedUrl = parseReqUrl(req.url || '/')\n    addRequestMeta(req, 'initQuery', { ...parsedUrl?.query })\n    // if we couldn't parse the URL we can't continue\n    if (!parsedUrl) {\n      return\n    }\n    let isNextDataRequest = false\n\n    if (pathHasPrefix(parsedUrl.pathname || '/', '/_next/data')) {\n      isNextDataRequest = true\n      parsedUrl.pathname = normalizeDataPath(parsedUrl.pathname || '/')\n    }\n    this.normalizeUrl(req, parsedUrl)\n    let originalPathname = parsedUrl.pathname || '/'\n    const originalQuery = { ...parsedUrl.query }\n    const pageIsDynamic = isDynamicRoute(srcPage)\n\n    let localeResult: PathLocale | undefined\n    let detectedLocale: string | undefined\n\n    if (i18n) {\n      localeResult = normalizeLocalePath(\n        parsedUrl.pathname || '/',\n        i18n.locales\n      )\n\n      if (localeResult.detectedLocale) {\n        req.url = `${localeResult.pathname}${parsedUrl.search}`\n        originalPathname = localeResult.pathname\n\n        if (!detectedLocale) {\n          detectedLocale = localeResult.detectedLocale\n        }\n      }\n    }\n\n    // Normalize the page path for route matching. The srcPage contains the\n    // internal page path (e.g., /app/[slug]/page), but route matchers expect\n    // the pathname format (e.g., /app/[slug]).\n    const normalizedSrcPage = normalizeAppPath(srcPage)\n\n    const serverUtils = getServerUtils({\n      page: normalizedSrcPage,\n      i18n,\n      basePath,\n      rewrites,\n      pageIsDynamic,\n      trailingSlash: process.env.__NEXT_TRAILING_SLASH as any as boolean,\n      caseSensitive: Boolean(routesManifest.caseSensitive),\n    })\n\n    const domainLocale = detectDomainLocale(\n      i18n?.domains,\n      getHostname(parsedUrl, req.headers),\n      detectedLocale\n    )\n\n    if (Boolean(domainLocale)) {\n      addRequestMeta(req, 'isLocaleDomain', Boolean(domainLocale))\n    }\n\n    const defaultLocale =\n      getRequestMeta(req, 'defaultLocale') ||\n      domainLocale?.defaultLocale ||\n      i18n?.defaultLocale\n\n    // Ensure parsedUrl.pathname includes locale before processing\n    // rewrites or they won't match correctly.\n    if (defaultLocale && !detectedLocale) {\n      parsedUrl.pathname = `/${defaultLocale}${parsedUrl.pathname === '/' ? '' : parsedUrl.pathname}`\n    }\n    const locale =\n      getRequestMeta(req, 'locale') || detectedLocale || defaultLocale\n\n    // we apply rewrites against cloned URL so that we don't\n    // modify the original with the rewrite destination\n    const { rewriteParams, rewrittenParsedUrl } = serverUtils.handleRewrites(\n      req,\n      parsedUrl\n    )\n    const rewriteParamKeys = Object.keys(rewriteParams)\n    Object.assign(parsedUrl.query, rewrittenParsedUrl.query)\n\n    // after processing rewrites we want to remove locale\n    // from parsedUrl pathname\n    if (i18n) {\n      parsedUrl.pathname = normalizeLocalePath(\n        parsedUrl.pathname || '/',\n        i18n.locales\n      ).pathname\n\n      rewrittenParsedUrl.pathname = normalizeLocalePath(\n        rewrittenParsedUrl.pathname || '/',\n        i18n.locales\n      ).pathname\n    }\n\n    let params: Record<string, undefined | string | string[]> | undefined =\n      getRequestMeta(req, 'params')\n\n    // attempt parsing from pathname\n    if (!params && serverUtils.dynamicRouteMatcher) {\n      const paramsMatch = serverUtils.dynamicRouteMatcher(\n        normalizeDataPath(\n          rewrittenParsedUrl?.pathname || parsedUrl.pathname || '/'\n        )\n      )\n      const paramsResult = serverUtils.normalizeDynamicRouteParams(\n        paramsMatch || {},\n        true\n      )\n\n      if (paramsResult.hasValidParams) {\n        params = paramsResult.params\n      }\n    }\n\n    // Local \"next start\" expects the routing parsed query values\n    // to not be present in the URL although when deployed proxies\n    // will add query values from resolving the routes to pass to function.\n\n    // TODO: do we want to change expectations for \"next start\"\n    // to include these query values in the URL which affects asPath\n    // but would match deployed behavior, e.g. a rewrite from middleware\n    // that adds a query param would be in asPath as query but locally\n    // it won't be in the asPath but still available in the query object\n    const query = getRequestMeta(req, 'query') || {\n      ...parsedUrl.query,\n    }\n\n    const routeParamKeys = new Set<string>()\n    const combinedParamKeys = []\n\n    // We don't include rewriteParamKeys in the combinedParamKeys\n    // for app router since the searchParams is populated from the\n    // URL so we don't want to strip the rewrite params from the URL\n    // so that searchParams can include them.\n    if (\n      this.definition.kind === RouteKind.PAGES ||\n      this.definition.kind === RouteKind.PAGES_API\n    ) {\n      for (const key of [\n        ...rewriteParamKeys,\n        ...Object.keys(serverUtils.defaultRouteMatches || {}),\n      ]) {\n        // We only want to filter rewrite param keys from the URL\n        // if they are matches from the URL e.g. the key/value matches\n        // before and after applying the rewrites /:path for /hello and\n        // { path: 'hello' } but not for { path: 'another' } and /hello\n        // TODO: we should prefix rewrite param keys the same as we do\n        // for dynamic routes so we can identify them properly\n        const originalValue = Array.isArray(originalQuery[key])\n          ? originalQuery[key].join('')\n          : originalQuery[key]\n\n        const queryValue = Array.isArray(query[key])\n          ? query[key].join('')\n          : query[key]\n\n        if (!(key in originalQuery) || originalValue === queryValue) {\n          combinedParamKeys.push(key)\n        }\n      }\n    }\n\n    serverUtils.normalizeCdnUrl(req, combinedParamKeys)\n    // When Next is not hosted in a single process, upstream proxies will add query values for route params that were used to match the route.\n    // Outside of that environment, there is no reason to do any normalization to honor those query values.\n    if (!routerServerContext?.isWrappedByNextServer) {\n      serverUtils.normalizeQueryParams(query, routeParamKeys)\n    } else {\n      serverUtils.filterInternalQuery(query, [])\n    }\n    serverUtils.filterInternalQuery(originalQuery, combinedParamKeys)\n\n    if (pageIsDynamic) {\n      const queryResult = serverUtils.normalizeDynamicRouteParams(query, true)\n\n      const paramsResult = serverUtils.normalizeDynamicRouteParams(\n        params || {},\n        true\n      )\n\n      let paramsToInterpolate: ParsedUrlQuery\n\n      if (\n        // if both query and params are valid but one\n        // provided more information and the query params\n        // were nxtP prefixed rely on that one\n        query &&\n        params &&\n        paramsResult.hasValidParams &&\n        queryResult.hasValidParams &&\n        routeParamKeys.size > 0 &&\n        Object.keys(paramsResult.params).length <=\n          Object.keys(queryResult.params).length\n      ) {\n        paramsToInterpolate = queryResult.params\n        params = Object.assign(queryResult.params)\n      } else {\n        paramsToInterpolate =\n          paramsResult.hasValidParams && params\n            ? params\n            : queryResult.hasValidParams\n              ? query\n              : {}\n      }\n\n      req.url = serverUtils.interpolateDynamicPath(\n        req.url || '/',\n        paramsToInterpolate\n      )\n      parsedUrl.pathname = serverUtils.interpolateDynamicPath(\n        parsedUrl.pathname || '/',\n        paramsToInterpolate\n      )\n      originalPathname = serverUtils.interpolateDynamicPath(\n        originalPathname,\n        paramsToInterpolate\n      )\n\n      // try pulling from query if valid\n      if (!params) {\n        if (queryResult.hasValidParams) {\n          params = Object.assign({}, queryResult.params)\n\n          // If we pulled from query remove it so it's\n          // only in params\n          for (const key in serverUtils.defaultRouteMatches) {\n            delete query[key]\n          }\n        } else {\n          // use final params from URL matching\n          const paramsMatch = serverUtils.dynamicRouteMatcher?.(\n            normalizeDataPath(\n              localeResult?.pathname || parsedUrl.pathname || '/'\n            )\n          )\n          // we don't normalize these as they are allowed to be\n          // the literal slug matches here e.g. /blog/[slug]\n          // actually being requested\n          if (paramsMatch) {\n            params = Object.assign({}, paramsMatch)\n          }\n        }\n      }\n\n      // When partial nxtP* params are provided (e.g. background\n      // revalidation for intermediate PPR shells), both\n      // normalizeDynamicRouteParams calls above fail because not all\n      // route params are present. Merge the normalized query params\n      // (from nxtP*) into the current params to override placeholders\n      // with concrete values.\n      if (\n        params &&\n        routeParamKeys.size > 0 &&\n        !paramsResult.hasValidParams &&\n        !queryResult.hasValidParams\n      ) {\n        for (const key of routeParamKeys) {\n          if (query[key] !== undefined) {\n            params[key] = query[key]\n          }\n        }\n        addRequestMeta(req, 'resolvedRouteParamKeys', routeParamKeys)\n      }\n    }\n\n    // Remove any normalized params from the query if they\n    // weren't present as non-prefixed query key e.g.\n    // ?search=1&nxtPsearch=hello we don't delete search\n    for (const key of routeParamKeys) {\n      if (!(key in originalQuery)) {\n        delete query[key]\n        // handle the case where there's collision and we\n        // normalized nxtPid=123 -> id=123 but user also\n        // sends id=456 as separate key\n      } else if (\n        originalQuery[key] &&\n        query[key] &&\n        originalQuery[key] !== query[key]\n      ) {\n        query[key] = originalQuery[key]\n      }\n    }\n\n    const { isOnDemandRevalidate, revalidateOnlyGenerated } =\n      checkIsOnDemandRevalidate(req.headers, prerenderManifest.preview)\n\n    let isDraftMode = false\n    let previewData: PreviewData\n\n    // preview data relies on non-edge utils\n    if (process.env.NEXT_RUNTIME !== 'edge' && res) {\n      const { tryGetPreviewData } =\n        require('../api-utils/node/try-get-preview-data') as typeof import('../api-utils/node/try-get-preview-data')\n\n      previewData = tryGetPreviewData(\n        req,\n        res,\n        prerenderManifest.preview,\n        Boolean(multiZoneDraftMode)\n      )\n      isDraftMode = previewData !== false\n    }\n\n    if (!nextConfig) {\n      throw new Error(\"Invariant: nextConfig couldn't be loaded\")\n    }\n\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      const { installProcessErrorHandlers } =\n        require('../node-environment-extensions/process-error-handlers') as typeof import('../node-environment-extensions/process-error-handlers')\n\n      installProcessErrorHandlers(\n        Boolean(\n          nextConfig.experimental.removeUncaughtErrorAndRejectionListeners\n        )\n      )\n    }\n\n    let resolvedPathname = normalizedSrcPage\n    if (isDynamicRoute(resolvedPathname) && params) {\n      resolvedPathname = serverUtils.interpolateDynamicPath(\n        resolvedPathname,\n        params\n      )\n    }\n\n    if (resolvedPathname === '/index') {\n      resolvedPathname = '/'\n    }\n\n    if (\n      res &&\n      Boolean(req.headers['x-nextjs-data']) &&\n      (!res.statusCode || res.statusCode === 200)\n    ) {\n      res.setHeader(\n        'x-nextjs-matched-path',\n        removeTrailingSlash(`${locale ? `/${locale}` : ''}${normalizedSrcPage}`)\n      )\n    }\n    const encodedResolvedPathname = resolvedPathname\n\n    // we decode for cache key/manifest usage encoded is\n    // for URL building\n    try {\n      resolvedPathname = decodePathParams(resolvedPathname)\n    } catch (_) {}\n\n    resolvedPathname = removeTrailingSlash(resolvedPathname)\n    addRequestMeta(req, 'resolvedPathname', resolvedPathname)\n\n    let deploymentId\n    if (nextConfig.experimental?.runtimeServerDeploymentId) {\n      if (!process.env.NEXT_DEPLOYMENT_ID) {\n        throw new Error(\n          'process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'\n        )\n      }\n      deploymentId = process.env.NEXT_DEPLOYMENT_ID\n    } else {\n      deploymentId = nextConfig.deploymentId || ''\n    }\n\n    return {\n      query,\n      originalQuery,\n      originalPathname,\n      params,\n      parsedUrl,\n      locale,\n      isNextDataRequest,\n      locales: i18n?.locales,\n      defaultLocale,\n      isDraftMode,\n      previewData,\n      pageIsDynamic,\n      resolvedPathname,\n      encodedResolvedPathname,\n      isOnDemandRevalidate,\n      revalidateOnlyGenerated,\n      ...manifests,\n      // loadManifest returns a readonly object, but we don't want to propagate that throughout the\n      // whole codebase (for now)\n      nextConfig:\n        nextConfig satisfies DeepReadonly<NextConfigRuntime> as NextConfigRuntime,\n      routerServerContext,\n      deploymentId,\n      clientAssetToken: nextConfig.supportsImmutableAssets ? '' : deploymentId,\n    }\n  }\n\n  public getResponseCache(req: IncomingMessage | BaseNextRequest) {\n    if (!this.responseCache) {\n      const minimalMode = getRequestMeta(req, 'minimalMode') ?? false\n      this.responseCache = new ResponseCache(minimalMode)\n    }\n    return this.responseCache\n  }\n\n  public async handleResponse({\n    req,\n    nextConfig,\n    cacheKey,\n    routeKind,\n    isFallback,\n    prerenderManifest,\n    isRoutePPREnabled,\n    isOnDemandRevalidate,\n    revalidateOnlyGenerated,\n    responseGenerator,\n    waitUntil,\n    isMinimalMode,\n  }: {\n    req: IncomingMessage | BaseNextRequest\n    nextConfig: NextConfigRuntime\n    cacheKey: string | null\n    routeKind: RouteKind\n    isFallback?: boolean\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n    isRoutePPREnabled?: boolean\n    isOnDemandRevalidate?: boolean\n    revalidateOnlyGenerated?: boolean\n    responseGenerator: ResponseGenerator\n    waitUntil?: (prom: Promise<any>) => void\n    isMinimalMode: boolean\n  }) {\n    const responseCache = this.getResponseCache(req)\n    const cacheEntry = await responseCache.get(cacheKey, responseGenerator, {\n      routeKind,\n      isFallback,\n      isRoutePPREnabled,\n      isOnDemandRevalidate,\n      // A Next.js Segment Cache prefetch uses the `Next-Router-Prefetch`\n      // header (surfaced as the `isPrefetchRSCRequest` request meta), not the\n      // standard browser `purpose: prefetch` header. Recognize both so the\n      // response cache treats segment prefetches as prefetches — most\n      // importantly, so a prefetch that misses serves a fallback shell rather\n      // than joining an in-flight background (concrete) revalidation.\n      isPrefetch:\n        req.headers.purpose === 'prefetch' ||\n        getRequestMeta(req, 'isPrefetchRSCRequest') === true,\n      // Use x-invocation-id header to scope the in-memory cache to a single\n      // revalidation request in minimal mode.\n      invocationID: req.headers['x-invocation-id'] as string | undefined,\n      incrementalCache: await this.getIncrementalCache(\n        req,\n        nextConfig,\n        prerenderManifest,\n        isMinimalMode\n      ),\n      waitUntil,\n    })\n\n    if (!cacheEntry) {\n      if (\n        cacheKey &&\n        // revalidate only generated can bail even if cacheKey is provided\n        !(isOnDemandRevalidate && revalidateOnlyGenerated)\n      ) {\n        // A cache entry might not be generated if a response is written\n        // in `getInitialProps` or `getServerSideProps`, but those shouldn't\n        // have a cache key. If we do have a cache key but we don't end up\n        // with a cache entry, then either Next.js or the application has a\n        // bug that needs fixing.\n        throw new Error('invariant: cache entry required but not generated')\n      }\n    }\n    return cacheEntry\n  }\n}\n","export function isAppRouteRoute(route: string): boolean {\n  return route.endsWith('/route')\n}\n","/**\n * For a given page path, this function ensures that there is no backslash\n * escaping slashes in the path. Example:\n *  - `foo\\/bar\\/baz` -> `foo/bar/baz`\n */\nexport function normalizePathSep(path: string): string {\n  return path.replace(/\\\\/g, '/')\n}\n","import type { Key } from 'next/dist/compiled/path-to-regexp'\nimport { regexpToFunction } from 'next/dist/compiled/path-to-regexp'\nimport { pathToRegexp } from 'next/dist/compiled/path-to-regexp'\n\ninterface Options {\n  /**\n   * A transformer function that will be applied to the regexp generated\n   * from the provided path and path-to-regexp.\n   */\n  regexModifier?: (regex: string) => string\n  /**\n   * When true the function will remove all unnamed parameters\n   * from the matched parameters.\n   */\n  removeUnnamedParams?: boolean\n  /**\n   * When true the regexp won't allow an optional trailing delimiter\n   * to match.\n   */\n  strict?: boolean\n\n  /**\n   * When true the matcher will be case-sensitive, defaults to false\n   */\n  sensitive?: boolean\n}\n\nexport type PatchMatcher = (\n  pathname: string,\n  params?: Record<string, any>\n) => Record<string, any> | false\n\n/**\n * Generates a path matcher function for a given path and options based on\n * path-to-regexp. By default the match will be case insensitive, non strict\n * and delimited by `/`.\n */\nexport function getPathMatch(path: string, options?: Options): PatchMatcher {\n  const keys: Key[] = []\n  const regexp = pathToRegexp(path, keys, {\n    delimiter: '/',\n    sensitive:\n      typeof options?.sensitive === 'boolean' ? options.sensitive : false,\n    strict: options?.strict,\n  })\n\n  const matcher = regexpToFunction<Record<string, any>>(\n    options?.regexModifier\n      ? new RegExp(options.regexModifier(regexp.source), regexp.flags)\n      : regexp,\n    keys\n  )\n\n  /**\n   * A matcher function that will check if a given pathname matches the path\n   * given in the builder function. When the path does not match it will return\n   * `false` but if it does it will return an object with the matched params\n   * merged with the params provided in the second argument.\n   */\n  return (pathname, params) => {\n    // If no pathname is provided it's not a match.\n    if (typeof pathname !== 'string') return false\n\n    const match = matcher(pathname)\n\n    // If the path did not match `false` will be returned.\n    if (!match) return false\n\n    /**\n     * If unnamed params are not allowed they must be removed from\n     * the matched parameters. path-to-regexp uses \"string\" for named and\n     * \"number\" for unnamed parameters.\n     */\n    if (options?.removeUnnamedParams) {\n      for (const key of keys) {\n        if (typeof key.name === 'number') {\n          delete match.params[key.name]\n        }\n      }\n    }\n\n    return { ...params, ...match.params }\n  }\n}\n","import type { NextApiRequestCookies } from '.'\n\n/**\n * Parse cookies from the `headers` of request\n * @param req request object\n */\n\nexport function getCookieParser(headers: {\n  [key: string]: string | string[] | null | undefined\n}): () => NextApiRequestCookies {\n  return function parseCookie(): NextApiRequestCookies {\n    const { cookie } = headers\n\n    if (!cookie) {\n      return {}\n    }\n\n    const { parse: parseCookieFn } =\n      require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n    return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie)\n  }\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nimport { searchParamsToUrlQuery } from './querystring'\nimport { parseRelativeUrl } from './parse-relative-url'\n\nexport interface ParsedUrl {\n  auth: string | null\n  hash: string\n  hostname: string | null\n  href: string\n  origin?: string | null\n  pathname: string\n  port: string | null\n  protocol: string | null\n  query: ParsedUrlQuery\n  search: string\n  slashes: boolean | null\n}\n\nexport function parseUrl(url: string): ParsedUrl {\n  if (url.startsWith('/')) {\n    return parseRelativeUrl(url)\n  }\n\n  const parsedURL = new URL(url)\n  const username = parsedURL.username\n  const password = parsedURL.password\n  const auth = username\n    ? password\n      ? `${username}:${password}`\n      : username\n    : null\n  const pathname = parsedURL.pathname\n  const search = parsedURL.search\n  return {\n    auth,\n    hash: parsedURL.hash,\n    hostname: parsedURL.hostname,\n    href: parsedURL.href,\n    pathname,\n    port: parsedURL.port,\n    protocol: parsedURL.protocol,\n    query: searchParamsToUrlQuery(parsedURL.searchParams),\n    search,\n    origin: parsedURL.origin,\n    slashes:\n      parsedURL.href.slice(\n        parsedURL.protocol.length,\n        parsedURL.protocol.length + 2\n      ) === '//',\n  }\n}\n","import escapePathDelimiters from '../../../shared/lib/router/utils/escape-path-delimiters'\nimport { DecodeError } from '../../../shared/lib/utils'\n\n/**\n * We only encode path delimiters for path segments from\n * getStaticPaths so we need to attempt decoding the URL\n * to match against and only escape the path delimiters\n * this allows non-ascii values to be handled e.g.\n * Japanese characters.\n * */\nfunction decodePathParams(pathname: string): string {\n  // TODO: investigate adding this handling for non-SSG\n  // pages so non-ascii names also work there.\n  return pathname\n    .split('/')\n    .map((seg) => {\n      try {\n        seg = escapePathDelimiters(decodeURIComponent(seg), true)\n      } catch (_) {\n        // An improperly encoded URL was provided\n        throw new DecodeError('Failed to decode path param(s).')\n      }\n      return seg\n    })\n    .join('/')\n}\n\nexport { decodePathParams }\n","// escape delimiters used by path-to-regexp\nexport default function escapePathDelimiters(\n  segment: string,\n  escapeEncoded?: boolean\n): string {\n  return segment.replace(\n    new RegExp(`([/#?\\\\\\\\]${escapeEncoded ? '|%(2f|23|3f|5c)' : ''})`, 'gi'),\n    (char: string) => encodeURIComponent(char)\n  )\n}\n","import React from 'react'\nimport type { NextRouter } from './router/router'\n\nexport const RouterContext = React.createContext<NextRouter | null>(null)\n\nif (process.env.NODE_ENV !== 'production') {\n  RouterContext.displayName = 'RouterContext'\n}\n","import type {\n  DynamicPrerenderManifestRoute,\n  PrerenderManifest,\n} from '../../../../build'\nimport type { DeepReadonly } from '../../../../shared/lib/deep-readonly'\nimport {\n  getRouteMatcher,\n  type RouteMatchFn,\n} from '../../../../shared/lib/router/utils/route-matcher'\nimport { getRouteRegex } from '../../../../shared/lib/router/utils/route-regex'\n\n/**\n * A matcher for a dynamic route.\n */\ntype Matcher = {\n  /**\n   * The matcher for the dynamic route. This is lazily created when the matcher\n   * is first used.\n   */\n  matcher?: RouteMatchFn\n\n  /**\n   * The source of the dynamic route.\n   */\n  source: string\n\n  /**\n   * The route that matches the source.\n   */\n  route: DeepReadonly<DynamicPrerenderManifestRoute>\n}\n\nexport type PrerenderManifestMatch = {\n  source: string\n  route: DeepReadonly<DynamicPrerenderManifestRoute>\n}\n\n/**\n * A matcher for the prerender manifest.\n *\n * This class is used to match the pathname to the dynamic route.\n */\nexport class PrerenderManifestMatcher {\n  private readonly matchers: Array<Matcher>\n  constructor(\n    pathname: string,\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n  ) {\n    this.matchers = Object.entries(prerenderManifest.dynamicRoutes)\n      .filter(([source, route]) => {\n        // If the pathname is a fallback source route, or the source route is\n        // the same as the pathname, then we should include it in the matchers.\n        return route.fallbackSourceRoute === pathname || source === pathname\n      })\n      .map(([source, route]) => ({ source, route }))\n  }\n\n  /**\n   * Match the pathname to the dynamic route. If no match is found, an error is\n   * thrown.\n   *\n   * @param pathname - The pathname to match.\n   * @returns The dynamic route that matches the pathname.\n   */\n  public match(pathname: string): PrerenderManifestMatch | null {\n    // Iterate over the matchers. They're already in the correct order of\n    // specificity as they were inserted into the prerender manifest that way\n    // and iterating over them with Object.entries guarantees that.\n    for (const matcher of this.matchers) {\n      // Lazily create the matcher, this is only done once per matcher.\n      if (!matcher.matcher) {\n        matcher.matcher = getRouteMatcher(getRouteRegex(matcher.source))\n      }\n\n      const match = matcher.matcher(pathname)\n      if (match) {\n        return {\n          source: matcher.source,\n          route: matcher.route,\n        }\n      }\n    }\n\n    return null\n  }\n}\n","import type { Normalizer } from '../normalizer'\n\nexport class SuffixPathnameNormalizer implements Normalizer {\n  constructor(private readonly suffix: string) {}\n\n  public match(pathname: string) {\n    // If the pathname doesn't end in the suffix, we don't match.\n    if (!pathname.endsWith(this.suffix)) return false\n\n    return true\n  }\n\n  public normalize(pathname: string, matched?: boolean): string {\n    // If we're not matched and we don't match, we don't need to normalize.\n    if (!matched && !this.match(pathname)) return pathname\n\n    return pathname.substring(0, pathname.length - this.suffix.length)\n  }\n}\n","import type { PathnameNormalizer } from './pathname-normalizer'\n\nimport { RSC_SUFFIX } from '../../../lib/constants'\nimport { SuffixPathnameNormalizer } from './suffix'\n\nexport class RSCPathnameNormalizer\n  extends SuffixPathnameNormalizer\n  implements PathnameNormalizer\n{\n  constructor() {\n    super(RSC_SUFFIX)\n  }\n}\n","import type { PathnameNormalizer } from './pathname-normalizer'\n\nimport {\n  RSC_SEGMENT_SUFFIX,\n  RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\nimport { escapeStringRegexp } from '../../../shared/lib/escape-regexp'\n\nconst PATTERN = new RegExp(\n  `^(/.*)${escapeStringRegexp(RSC_SEGMENTS_DIR_SUFFIX)}(/.*)${escapeStringRegexp(RSC_SEGMENT_SUFFIX)}$`\n)\n\nexport class SegmentPrefixRSCPathnameNormalizer implements PathnameNormalizer {\n  public match(pathname: string): boolean {\n    return PATTERN.test(pathname)\n  }\n\n  public extract(pathname: string) {\n    const match = pathname.match(PATTERN)\n    if (!match) return null\n\n    return { originalPathname: match[1], segmentPath: match[2] }\n  }\n\n  public normalize(pathname: string): string {\n    const match = this.extract(pathname)\n    if (!match) return pathname\n\n    return match.originalPathname\n  }\n}\n","import type { IncomingMessage } from 'http'\n\nimport {\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  RSC_HEADER,\n} from '../../../client/components/app-router-headers'\nimport type { BaseNextRequest } from '../../base-http'\nimport { isRSCRequestHeader } from '../../lib/is-rsc-request'\nimport { parseReqUrl } from '../../../lib/url'\nimport { formatUrl } from '../../../shared/lib/router/utils/format-url'\nimport { addRequestMeta } from '../../request-meta'\n\nfunction getHeaderValue(\n  value: string | string[] | undefined\n): string | undefined {\n  if (Array.isArray(value)) {\n    return value[0]\n  }\n  return value\n}\n\nexport function applyAppPageRscRequestMetaFromHeaders(\n  req: Pick<IncomingMessage | BaseNextRequest, 'headers'>\n): void {\n  const isRscRequest = isRSCRequestHeader(req.headers[RSC_HEADER])\n  if (!isRscRequest) {\n    return\n  }\n\n  addRequestMeta(req as IncomingMessage, 'isRSCRequest', true)\n\n  const isPrefetchRequest =\n    getHeaderValue(req.headers[NEXT_ROUTER_PREFETCH_HEADER]) === '1'\n  if (!isPrefetchRequest) {\n    return\n  }\n\n  addRequestMeta(req as IncomingMessage, 'isPrefetchRSCRequest', true)\n\n  const segmentPrefetchPath = getHeaderValue(\n    req.headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]\n  )\n  if (segmentPrefetchPath) {\n    addRequestMeta(\n      req as IncomingMessage,\n      'segmentPrefetchRSCRequest',\n      segmentPrefetchPath\n    )\n  }\n}\n\nexport function normalizeAppPageRequestUrl(\n  req: Pick<IncomingMessage | BaseNextRequest, 'url'>,\n  pathname: string\n) {\n  if (!req.url) {\n    return\n  }\n\n  const normalizedUrl = parseReqUrl(req.url)\n  if (!normalizedUrl) {\n    return\n  }\n\n  normalizedUrl.pathname = pathname\n  req.url = formatUrl(normalizedUrl)\n}\n"],"names":["leafPrototypes","getProto","installedChunks","b","error","Error","exports","require","version","renderToReadableStream","resume","renderToPipeableStream","resumeToPipeableStream","__defProp","Object","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","src_exports","all","RequestCookies","ResponseCookies","parseCookie","parseSetCookie","stringifyCookie","name","c","_a","attrs","Date","Boolean","stringified","encodeURIComponent","cookie","map","Map","pair","splitAt","key","decodeURIComponent","setCookie","attributes","domain","expires","httponly","maxage","path","samesite","secure","partitioned","priority","value2","string","t","Number","SAME_SITE","PRIORITY","newT","to","from","except","desc","requestHeaders","header","Symbol","args","Array","_","n","names","result","JSON","v","responseHeaders","_b","_c","cookieString","cookiesString","start","ch","lastComma","nextStart","cookiesSeparatorFound","cookiesStrings","pos","skipWhitespace","parsed","bag","headers","serialized","options","e","i","s","r","a","o","f","l","h","Buffer","u","d","noop","HeaderParser","g","w","FileStream","process","k","nullDecoder","finalcb","checkEndState","z","E","M","L","A","p","y","m","C","S","P","T","x","B","K","D","U","V","W","ssCb","Math","readPctEnc","String","skipKeyBytes","skipValBytes","getDecoder","TextDecoder","convertToUTF8","memcmp","matchNeedle","__dirname","parse","format","isNaN","parseFloat","parseInt","__nccwpck_require__","TypeError","isFinite","empty","Events","EE","addListener","clearEvent","EventEmitter","arguments","Promise","TimeoutError","pTimeout","setTimeout","clearTimeout","clearInterval","setInterval","run","tryConsume","mustConsume","consumeText","isSafe","safePattern","escapeString","tokensToFunction","flags","RegExp","regexpToFunction","tokensToRegexp","R","pathToRegexp","styleReplacer","match","prefix","suffix","scriptReplacer","getIteratorFn","maybeIterable","MAYBE_ITERATOR_SYMBOL","objectName","object","describeKeyForErrorMessage","encodedKey","describeValueForErrorMessage","isArrayImpl","CLIENT_REFERENCE_TAG","describeElementType","type","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_VIEW_TRANSITION_TYPE","REACT_FORWARD_REF_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","payload","flushBuffered","destination","writeChunk","chunk","writtenBytes","writeToDestination","currentView","Uint8Array","target","read","textEncoder","view","destinationHasCapacity$1","writeChunkAndReturn","completeWriting","stringToPrecomputedChunk","content","console","byteLengthOfChunk","typeName","willCoercionThrow","checkAttributeStringCoercion","attributeName","checkCSSPropertyStringCoercion","propName","checkHtmlStringCoercion","isAttributeNameSafe","hasOwnProperty","validatedAttributeNameCache","illegalAttributeNameCache","VALID_ATTRIBUTE_NAME_REGEX","checkControlledValueProps","tagName","props","hasReadOnlyValue","escapeTextForBrowser","text","matchHtmlRegExp","index","html","lastIndex","sanitizeURL","url","isJavaScriptProtocol","escapeEntireInlineScriptContent","scriptText","scriptRegex","createRenderState","resumableState","nonce","externalRuntimeConfig","importMap","onHeaders","maxHeadersLength","inlineScriptWithNonce","startInlineScript","nonceStyle","inlineStyleWithNonce","startInlineStyle","idPrefix","bootstrapChunks","bootstrapScriptContent","bootstrapScripts","bootstrapModules","pushCompletedShellIdAttribute","endOfStartTag","endInlineScript","importMapScriptStart","importMapScriptEnd","createPreambleState","Set","preloadBootstrapScriptOrModule","startScriptSrc","attributeEnd","scriptNonce","scriptIntegirty","scriptCrossOrigin","endAsyncScript","startModuleSrc","createResumableState","identifierPrefix","NothingSent","createFormatContext","insertionMode","selectedValue","tagScope","viewTransition","createRootFormatContext","namespaceURI","SVG_MODE","MATHML_MODE","ROOT_HTML_MODE","getChildFormatContext","parentContext","subtreeScope","HTML_MODE","HTML_TABLE_MODE","HTML_TABLE_BODY_MODE","HTML_COLGROUP_MODE","HTML_TABLE_ROW_MODE","HTML_HEAD_MODE","HTML_HTML_MODE","getSuspenseViewTransition","parentViewTransition","getSuspenseFallbackFormatContext","NeedUpgradeToViewTransitions","getSuspenseContentFormatContext","makeId","treeId","localId","pushTextInstance","renderState","textEmbedded","textSeparator","pushViewTransitionAttributes","formatContext","pushStringAttribute","pushStyleAttribute","style","styleName","isFirst","styleValue","nameChunk","warnedStyleNames","msPattern$1","hyphenPattern","character","badVendoredStyleNamePattern","badStyleValueWithSemicolonPattern","value$jscomp$0","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","styleNameCache","uppercasePattern","msPattern","unitlessNumbers","styleAttributeStart","styleAssign","styleSeparator","pushBooleanAttribute","attributeSeparator","attributeEmptyString","attributeAssign","pushAdditionalFormField","startHiddenInputChunk","validateAdditionalFormField","endOfStartTagSelfClosing","getCustomFormFields","formAction","id","customFields","formData","pushFormActionAttribute","formEncType","formMethod","formTarget","didWarnFormActionName","didWarnFormActionMethod","didWarnFormActionTarget","actionJavaScriptURL","injectFormReplayingRuntime","pushAttribute","didWarnForNewBooleanPropsWithEmptyValue","aliases","pushInnerHTML","innerHTML","children","checkSelectProp","preamble","formReplayingRuntimeScript","pushLinkImpl","propKey","startChunkForTag","propValue","escapeStyleTextContent","styleText","styleRegex","pushSelfClosing","tag","pushTitleImpl","endChunkForTag","pushScriptImpl","pushStartSingletonElement","pushStartGenericElement","tagStartChunk","validatedTagCache","VALID_TAG_REGEX","endTagCache","hoistPreambleState","preambleState","writeBootstrap","writeStartPendingSuspenseBoundary","startPendingSuspenseBoundary1","startPendingSuspenseBoundary2","escapeJSStringsForInstructionScripts","input","regexForJSStringsInInstructionScripts","escapeJSObjectForInstructionScripts","regexForJSStringsInScripts","flushStyleTagsLateForBoundary","styleQueue","rules","hrefs","currentlyFlushingRenderState","lateStyleTagResourceOpen1","lateStyleTagResourceOpen2","spaceSeparator","lateStyleTagResourceOpen3","destinationHasCapacity","lateStyleTagTemplateClose","currentlyRenderingBoundaryHasStylesToHoist","hasStylesToHoist","stylesheet","PREAMBLE","writeHoistablesForBoundary","hoistableState","flushResource","resource","flushStyleInPreamble","stylesheetFlushingQueue","flushStylesInPreamble","hasStylesheets","styleTagResourceOpen1","styleTagResourceOpen2","styleTagResourceOpen3","styleTagResourceClose","preloadLateStyle","PENDING$1","PRELOADED","preloadLateStyles","SentCompletedShellId","completedShellIdAttributeStart","createHoistableState","href","EXISTS","adoptPreloadCredentials","preloadState","getPreloadAsHeader","as","params","paramName","escapeHrefForLinkHeaderURLContext","escapeStringForLinkHeaderQuotedParamValueContext","hrefInput","regexForHrefInLinkHeaderURLContext","escapeHrefForLinkHeaderURLContextReplacer","regexForLinkHeaderQuotedParamValueContext","escapeStringForLinkHeaderQuotedParamValueContextReplacer","hoistStyleQueueDependency","hoistStylesheetDependency","hoistHoistables","parentState","childState","hasSuspenseyContent","flushingInShell","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_FRAGMENT_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","innerType","popToNearestCommonAncestor","prev","next","parentNext","switchContext","newSnapshot","currentActiveSnapshot","pushAllNext","popAllPrevious","popPreviousToCommonLevel","popNextToCommonLevel","warnOnInvalidCallback","callback","didWarnOnInvalidCallback","warnNoop","publicInstance","callerName","warningKey","didWarnAboutNoopUpdateForComponent","getTreeId","context","overflow","clz32","pushTreeContext","baseContext","totalChildren","baseIdWithLeadingBit","baseLength","length","numberOfOverflowBits","getSuspendedThenable","suspendedThenable","thenable","createFatalRecoverableError","recoverable","resolveCurrentlyRenderingComponent","currentlyRenderingComponent","isInHookUserCodeInDev","createHook","numberOfReRenders","createWorkInProgressHook","workInProgressHook","firstWorkInProgressHook","isReRender","getThenableStateAfterSuspending","state","thenableState","resetHooksState","currentlyRenderingKeyPath","currentlyRenderingRequest","currentlyRenderingTask","didScheduleRenderPhaseUpdate","renderPhaseUpdates","readContext","basicStateReducer","action","useReducer","reducer","initialArg","init","currentHookNameInDev","firstRenderPhaseUpdate","dispatchAction","useMemo","nextCreate","deps","prevState","JSCompiler_inline_result","objectIs","componentIdentity","queue","throwOnUseEffectEventCall","unsupportedStartTransition","unsupportedSetOptimisticState","createPostbackActionStateKey","permalink","componentKeyPath","hookIndex","useActionState","initialState","actionStateHookIndex","actionStateCounter","request","nextPostbackStateKey","isSignatureEqual","postbackKey","actionStateMatchingIndex","boundAction","_boundAction","unwrapThenable","thenableIndexCounter","fulfilledValue","fulfilledThenable","rejectedThenable","shouldCaptureSuspendedCallSite","currentTask","currentTaskInDEV","currentComponentStack","suspendedCallSiteStack","suspendedCallSiteDebugTask","SuspenseException","unsupportedRefresh","disabledLog","prepareStackTrace","structuredStackTrace","formatOwnerStack","prevPrepareStackTrace","describeBuiltInComponentFrame","describeNativeComponentFrame","fn","construct","reentry","frame","componentFrameCache","previousDispatcher","ReactSharedInternals","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","Fake","Reflect","control","x$0","prevProps","x$1","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","_frame","assign","describeComponentStackByType","lazyComponent","idx","getViewTransitionClassName","defaultClass","eventClass","resetOwnerStackLimit","now","getCurrentTime","lastResetTime","isEligibleForOutlining","boundary","defaultErrorHandler","bind","RequestInstance","rootFormatContext","progressiveChunkSize","onError","onAllReady","onShellReady","onShellError","onFatalError","formState","abortSet","createRequest","createPendingSegment","pushComponentStack","createRenderTask","emptyTreeContext","emptyContextObject","createPrerenderRequest","resumeRequest","postponedState","createReplayTask","resumeAndPrerenderRequest","resolveRequest","currentRequest","store","requestStorage","pingTask","task","scheduleMicrotask","performWork","setImmediate","createSuspenseBoundary","row","fallbackAbortableTasks","defer","PENDING","node","childIndex","blockedBoundary","blockedSegment","blockedPreamble","keyPath","treeContext","componentStack","legacyContext","debugTask","task$jscomp$0","finishAbortedTaskDEV","replay","parentFormatContext","lastPushedText","getCurrentStackInDEV","info","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","pushServerComponentStack","debugInfo","componentInfo","REACT_ELEMENT_TYPE","owner","stack","replaceSuspenseComponentStackWithSuspenseFallbackStack","getThrownInfo","node$jscomp$0","errorInfo","encodeErrorForBoundary","digest","thrownInfo","wasAborted","RecoverableException","describeObjectForErrorMessage","objectOrArray","expandedName","objKind","jsxChildrenParents","jsxPropsParents","_value2","_substr2","logRecoverableError","suspendedRecoverableError","REACT_RECOVERABLE_DIGEST","fatalError","shellComplete","CLOSED","finishSuspenseListRow","unblockSuspenseListRow","unblockedRow","inheritedHoistables","unblockedBoundaries","unblockedBoundary","finishedTask","tryToResolveTogetherRow","togetherRow","boundaries","allCompleteAndInlinable","rowBoundary","createSuspenseListRow","previousRow","newRow","renderSuspenseListRows","rows","revealOrder","prevKeyPath","prevTreeContext","prevRow","previousComponentStack","previousDebugTask","previousSuspenseListRow","resumeSlots","resumeSegmentID","resumeNode","renderNode","warnForMissingKey","_node3","newSegment","COMPLETED","finishedSegment","thrownValue","ABORTED","ERRORED","renderWithHooks","Component","secondArg","prevThenableState","localIdCounter","callComponentInDEV","finishFunctionComponent","hasId","actionStateCount","didEmitActionStateMarkers","segment","formStateMarkerIsMatching","formStateMarkerIsNotMatching","renderNodeDestructive","renderElement","ref","newProps","defaultProps","_propName","resolvedProps","contextType","didWarnAboutInvalidateContextType","addendum","instance","componentName","didWarnAboutUninitializedState","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutChildContextTypes","didWarnAboutContextTypes$1","hasMutatedProps","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","classComponentUpdater","internalInstance","contextType$jscomp$0","componentName$jscomp$0","didWarnAboutDirectlyAssigningPropsToState","getDerivedStateFromProps","partialState","componentName$jscomp$1","didWarnAboutUndefinedDerivedState","oldState","componentName$jscomp$2","didWarnAboutDeprecatedWillMount","oldQueue","oldReplace","nextState","dontMutate","partial","partialState$jscomp$0","nextChildren","callRenderInDEV","didWarnAboutReassigningProps","componentName$jscomp$3","didWarnAboutBadClass","actionStateMatchingIndex$jscomp$0","_componentName$jscomp$0","didWarnAboutContextTypes","componentName$jscomp$4","didWarnAboutGetDerivedStateOnFunctionComponent","_componentName2","didWarnAboutContextTypeOnFunctionComponent","prevContext","prevKeyPath$jscomp$0","_children","target$jscomp$0","invalidProps","warnedProperties$1","rARIACamel$1","ariaProperties","rARIA$1","prop","didWarnValueNull","eventRegistry","unknownProps","warnedProperties","lowerCasedName","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA","rARIACamel","possibleStandardNames","didWarnDefaultSelectValue","propKey$jscomp$0","children$jscomp$0","innerHTML$jscomp$0","propValue$jscomp$0","propKey$jscomp$1","children$jscomp$1","selected","innerHTML$jscomp$1","propValue$jscomp$1","didWarnSelectedSetOnOption","stringValue","didWarnInvalidOptionInnerHTML","React","child","didWarnInvalidOptionChildren","selectedMarkerAttribute","didWarnDefaultTextareaValue","propKey$jscomp$2","defaultValue","children$jscomp$2","propValue$jscomp$2","leadingNewline","propKey$jscomp$3","value$jscomp$1","defaultValue$jscomp$0","checked","defaultChecked","propValue$jscomp$3","didWarnFormActionType","didWarnDefaultChecked","didWarnDefaultInputValue","propKey$jscomp$4","children$jscomp$3","innerHTML$jscomp$2","name$jscomp$0","formAction$jscomp$0","formEncType$jscomp$0","formMethod$jscomp$0","formTarget$jscomp$0","propValue$jscomp$4","formData$jscomp$0","JSCompiler_inline_result$jscomp$1","propKey$jscomp$5","children$jscomp$4","innerHTML$jscomp$3","formAction$jscomp$1","formEncType$jscomp$1","formMethod$jscomp$1","formTarget$jscomp$1","propValue$jscomp$5","formData$jscomp$1","formActionName","JSCompiler_inline_result$jscomp$2","propKey$jscomp$6","propValue$jscomp$6","propKey$jscomp$7","children$jscomp$5","innerHTML$jscomp$4","propValue$jscomp$7","sanitizedValue","JSCompiler_inline_result$jscomp$3","noscriptTagInScope","isFallback","children$jscomp$6","JSCompiler_inline_result$jscomp$4","noscriptTagInScope$jscomp$0","isFallback$jscomp$0","rel","precedence","JSCompiler_inline_result$jscomp$5","propDescription","resourceState","preloadResource","_resource","noscriptTagInScope$jscomp$1","asyncProp","JSCompiler_inline_result$jscomp$6","resources","preloads","resourceState$jscomp$0","scriptProps","preloadResource$jscomp$0","resource$jscomp$0","noscriptTagInScope$jscomp$2","children$jscomp$7","child$jscomp$0","precedence$jscomp$0","href$jscomp$0","propKey$jscomp$8","children$jscomp$8","innerHTML$jscomp$5","propValue$jscomp$8","child$jscomp$1","JSCompiler_inline_result$jscomp$7","styleQueue$jscomp$0","resourceState$jscomp$1","propKey$jscomp$9","children$jscomp$9","innerHTML$jscomp$6","propValue$jscomp$9","child$jscomp$2","noscriptTagInScope$jscomp$3","isFallback$jscomp$1","JSCompiler_inline_result$jscomp$8","propKey$jscomp$10","children$jscomp$10","innerHTML$jscomp$7","propValue$jscomp$10","pictureOrNoScriptTagInScope","src","srcSet","sizes","key$jscomp$0","promotablePreloads","resource$jscomp$1","PRELOAD_NO_CREDS","crossOrigin","headPreambleContributionChunk","JSCompiler_inline_result$jscomp$9","preamble$jscomp$0","bodyPreambleContributionChunk","JSCompiler_inline_result$jscomp$10","preamble$jscomp$1","htmlPreambleContributionChunk","doctypeChunk","JSCompiler_inline_result$jscomp$11","propKey$jscomp$11","children$jscomp$11","innerHTML$jscomp$8","propValue$jscomp$11","_prevContext2","_prevKeyPath3","preambleSegment","REACT_LEGACY_HIDDEN_TYPE","prevKeyPath$jscomp$1","segment$jscomp$0","prevKeyPath$jscomp$2","startActivityBoundary","_prevKeyPath4","endActivityBoundary","iteratorFn","iterator","validateIterable","step","_prevKeyPath2","prevKeyPath$jscomp$3","prevContext$jscomp$0","prevKeyPath$jscomp$4","resumableState$jscomp$0","autoName","resumableState$jscomp$1","update","enter","exit","share","autoName$jscomp$0","REACT_SCOPE_TYPE","_prevKeyPath","_prevContext","_prevRow","_content","prevKeyPath$jscomp$5","prevContext$jscomp$1","prevRow$jscomp$0","parentBoundary","parentPreamble","parentHoistableState","parentSegment","fallback","fallbackAbortSet","newBoundary","boundarySegment","contentRootSegment","trackedPostpones","suspenseComponentStack","fallbackKeyPath","fallbackReplayNode","suspendedPrimaryTask","queueCompletedSegment","preparePreamble","thrownValue$2","CLIENT_RENDERED","untrackBoundary","suspendedFallbackTask","propsWithoutRef","prevSnapshot","prevKeyPath$jscomp$6","prevValue","rendererSigil","prevNode","newNode","prevSnapshot$jscomp$0","context$jscomp$0","render","newChildren","prevKeyPath$jscomp$7","callLazyInitInDEV","segmentId","prevReplay","resumedSegment","replayElement","keyOrIndex","childNodes","childSlots","currentNode","abortRemainingReplayNodes","previousReplaySet","resumedBoundary","iterable","didWarnAboutGenerators","didWarnAboutMaps","retryNode","refProp","REACT_OPTIMISTIC_KEY","renderChildrenArray","didWarnForKey","WeakSet","parentOwner","replayNodes","j","errorDigest","trackPostponedBoundary","POSTPONED","tracked","boundaryNode","addToReplayParent","trackPostpone","spawnNewSuspendedReplayTask","spawnNewSuspendedRenderTask","previousFormatContext","previousContext","previousKeyPath","previousTreeContext","childrenLength","chunkLength","thrownValue$3","abortTaskSoft","request$jscomp$0","nodes","slots","error$jscomp$0","errorDigest$jscomp$0","errorInfo$jscomp$0","aborted","prevTaskInDEV","prevGetCurrentStackImpl","finishAbortedTask","isRecoverableAbort","REACT_RECOVERABLE_TYPE","completeShell","_trackedPostpones","fallbackTask","completeAll","abortTaskDEV","abortTask","ASYNC_ITERATOR","bestStack","restoreThenableState","lastThenable","previousThenableValue","previousThenableThen","previousThenableReason","_previousThenableThen","prevStatus","prevAborted","prevDispatcher","HooksDispatcher","prevAsyncDispatcher","DefaultAsyncDispatcher","prevRequest","prevResumableState","currentResumableState","safelyEmitEarlyPreloads","linkHeader","queueIter","queueStep","sheetIter","sheetStep","sheet","props$jscomp$0","childSegment","segmentByteSize","postponedRow","postponedBoundary","request$jscomp$1","pingedTasks","prevTask","startNode","ping","prevTask$jscomp$0","startNode$jscomp$0","x$jscomp$0","ping$jscomp$0","errorInfo$jscomp$1","boundary$jscomp$0","useError","boundaryRow","flushCompletedQueues","preparePreambleFromSubtree","collectedPreambleSegments","pendingPreambles","preparePreambleFromSegment","originalRequestByteSize","hasPendingPreambles","flushSubtree","placeholder1","placeholder2","FLUSHED","chunks","chunkIdx","childIdx","flushSegment","errorMessage","errorStack","startClientRenderedSuspenseBoundary","clientRenderedSuspenseBoundaryError1","clientRenderedSuspenseBoundaryError1A","clientRenderedSuspenseBoundaryErrorAttrInterstitial","clientRenderedSuspenseBoundaryError1B","clientRenderedSuspenseBoundaryError1C","clientRenderedSuspenseBoundaryError1D","clientRenderedSuspenseBoundaryError2","flushingPartialBoundaries","flushedByteSize","flushingShell","startCompletedSuspenseBoundary","endSuspenseBoundary","flushSegmentContainer","startSegmentHTML","startSegmentHTML2","startSegmentSVG","startSegmentSVG2","startSegmentMathML","startSegmentMathML2","startSegmentTable","startSegmentTable2","startSegmentTableBody","startSegmentTableBody2","startSegmentTableRow","startSegmentTableRow2","startSegmentColGroup","startSegmentColGroup2","endSegmentHTML","endSegmentSVG","endSegmentMathML","endSegmentTable","endSegmentTableBody","endSegmentTableRow","endSegmentColGroup","flushCompletedBoundary","nextArrayOpenBrackChunk","completedSegments","flushPartiallyCompletedSegment","requiresStyleInsertion","requiresViewTransitions","SentClientRenderFunction","clientRenderScriptFunctionOnly","SentCompleteBoundaryFunction","completeBoundaryScriptFunctionOnly","SentUpgradeToViewTransitions","completeBoundaryUpgradeToViewTransitionsInstruction","SentStyleInsertionFunction","completeBoundaryWithStylesScript1FullPartial","completeBoundaryWithStylesScript1Partial","completeBoundaryScript1Partial","completeBoundaryScript2","completeBoundaryScript3a","arrayFirstOpenBracket","LATE","arrayCloseBracket","arraySubsequentOpenBracket","arrayInterstitial","completeBoundaryScript3b","completeBoundaryScriptEnd","segmentID","SentCompleteSegmentFunction","completeSegmentScript1Full","completeSegmentScript1Partial","completeSegmentScript2","completeSegmentScriptEnd","completedRootSegment","completedPreambleSegments","i$jscomp$0","htmlChunks","headChunks","charsetChunks","viewportChunks","importMapChunks","hoistableChunks","segments","headChunks$jscomp$0","bodyChunks","renderState$jscomp$0","SentMarkShellTime","shellId","shellTimeRuntimeScript","renderState$jscomp$1","viewportChunks$jscomp$0","hoistableChunks$jscomp$0","clientRenderedBoundaries","renderState$jscomp$2","errorComponentStack","clientRenderScript1Full","clientRenderScript1Partial","clientRenderScript1A","clientRenderErrorScriptArgInterstitial","clientRenderErrorScriptNull","clientRenderScriptEnd","completedBoundaries","partialBoundaries","largeBoundaries","startWork","enqueueEarlyPreloadsAfterInitialWork","enqueueFlush","startFlowing","abort","reason","abortableTasks","error$4","parentKeyPath","workingMap","parentNode","getPostponedState","hasFlushableShell","nextSegmentId","replaySlots","ensureCorrectIsomorphicReactVersion","isomorphicReactPackageVersion","createDrainHandler","createCancelHandler","createFakeWritableFromReadableStreamController$1","controller","createFakeWritableFromReadableStreamController","createFakeWritableFromReadable","readable","util","async_hooks","ReactDOM","stream","REACT_MEMO_CACHE_SENTINEL","WeakMap","queueMicrotask","ReactDOMSharedInternals","NotPending","JSCompiler_temp","bucket","imageSrcSet","imageSizes","fetchPriority","Function","inst","internals","log","LN2","usable","initialValue","previousRef","subscribe","getSnapshot","getServerSnapshot","passthrough","size","data","callComponent","callRender","callLazyInit","lazy","performance","localPerformance","localDate","resolve","reject","onHeadersImpl","headersDescriptor","Headers","writable","ReadableStream","signal","listener","hasStartedFlowing","allReady","res","rej","getCrossOriginStringAs","getValueDescriptorExpectingObjectForWarning","thing","getValueDescriptorExpectingEnumForWarning","resolveDispatcher","dispatcher","__REACT_DEVTOOLS_GLOBAL_HOOK__","Internals","container","containerInfo","implementation","previousTransition","previousUpdatePriority","integrity","encountered","form","typeOf","$$typeof","checkEvalAvailabilityOnceDev","hasConfirmedEval","eval","$jscomp$unused$catch","requireAsyncModule","promise","globalThis","ignoreReject","preloadModule","metadata","promises","chunkId","entry","chunkCache","requireModule","moduleExports","processReply","root","formFieldPrefix","temporaryReferences","serializeTypedArray","typedArray","Blob","blobId","nextPartId","FormData","resolveToJSON","originalValue","streamId","parentReference","writtenObjects","modelRoot","pendingParts","lazyId","partJSON","serializeModel","_lazyId","_partJSON2","_data","promiseId","partValue","previousReference","_partJSON3","_data3","originalKey","ArrayBuffer","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","reader","buffer","binaryReader","progress","_partJSON","getPrototypeOf","ObjectPrototype$1","ObjectPrototype","descriptor","knownServerReferences","model","json","defaultEncodeFormAction","referenceClosure","boundCache","reference","body","prefixedData","referenceId","numberOfBoundArgs","boundPromise","boundArgs","createFakeServerFunction","filename","sourceMap","line","col","environmentName","innerFunction","encodedName","encodeURI","fakeServerFunctionIdx","registerBoundServerReference","bound","encodeFormAction","FunctionBind","newFn","ArraySlice","addObjectToProperties","properties","indent","addedProperties","addValueToProperties","propertyName","propsKeys","propsLength","array","kind","getIODescription","str","markAllTracksInOrder","supportsUserTiming","getIOColor","functionName","getIOLongName","ioInfo","description","env","rootEnv","getIOShortName","queryIdx","logComponentAwait","asyncInfo","trackIdx","startTime","endTime","entryName","trackNames","logIOInfoErrored","logIOInfo","color","ReactPromise","status","hasGCedResponse","weakResponse","unwrapWeakResponse","closeDebugChannel","debugChannel","readChunk","initializeModelChunk","initializeModuleChunk","getRoot","getChunk","createPendingChunk","response","releasePendingChunk","flushInitialRenderPerformance","filterDebugInfo","moveDebugInfoFromChunkToInnerValue","resolveLazy","wakeChunk","listeners","fulfillReference","rejectChunk","rejectReference","resolveBlockedCycle","resolvedChunk","referencedChunk","wakeChunkIfInitialized","resolveListeners","rejectListeners","cyclicHandler","triggerErrorOnChunk","prevHandler","initializingHandler","prevChunk","initializingChunk","initializeDebugChunk","createResolvedModelChunk","createResolvedIteratorResultChunk","done","resolveIteratorResultChunk","resolveModelChunk","resolveModuleChunk","debugChunk","prevIsInitializingDebugInfo","isInitializingDebugInfo","initializeDebugInfo","waitForReference","resolvedModel","parseModel","reportGlobalError","debugChannelRegistry","nullRefGetter","initializeElement","element","lazyNode","normalizedStackTrace","createFakeJSXCallStackInDEV","supportsCreateTask","buildFakeCallStack","initializeFakeTask","initializeFakeStack","createLazyChunkWrapper","validated","lazyType","fulfilledChunk","handler","parentObject","_referencedChunk","mappedValue","transferReferencedDebugInfo","blockedValue","erroredComponent","isAwaitingDebugInfo","loadServerReference","metaData","callServer","findSourceMapURL","serverReference","bundlerConfig","resolvedModuleData","resolvedValue","parentChunk","debugInfoEntry","getOutlinedModel","ArrayPrototype","createMap","createSet","createBlob","createFormData","applyConstructor","extractIterator","createModel","missingCall","markIOStarted","ResponseInstance","serverReferenceConfig","moduleLoading","allowPartialStream","replayConsole","debugStartTime","debugEndTime","WeakRef","ReactSharedInteralsServer","createResponse","createStreamState","streamDebugValue","streamState","debugValuePromise","MIN_CHUNK_SIZE","incrementChunkDebugInfo","previousEndTime","addAsyncInfo","resolveChunkDebugInfo","resolveBuffer","resolveStream","startReadableStream","closed","previousBlockedChunk","_chunk3","blockedChunk","asyncIterator","startAsyncIterable","nextWriteIndex","nextReadIndex","arg","resolveErrorDev","message","errorOptions","reviveModel","isAggregateError","AggregateError","revivedErrors","getRootTask","useEnclosingLine","innerCall","frameKey","fakeFunctionCache","enclosingLine","enclosingCol","fakeFunctionIdx","childEnvironmentName","rootTask","cachedEntry","ownerTask","fakeJSXCallSite","previousStackTraceLimit","ownerStackTraceLimit","_componentInfoOrAsyncInfo","currentOwnerInDEV","ownerStack","initializeIOInfo","mergeBuffer","lastChunk","byteLength","_i3","resolveTypedArray","constructor","bytesPerElement","rootChunk","flushComponentPerformance","response$jscomp$0","trackIdx$jscomp$6","trackTime","parentEndTime","previousResult","startTime$jscomp$0","_i4","_info","childrenEndTime","childTrackIdx","childTrackTime","_i5","childResult","childEndTime","componentEndTime","isLastComponent","endTimeIdx","_i6","_info2","time","candidateInfo","trackIdx$jscomp$0","componentEndTime$jscomp$0","childrenEndTime$jscomp$0","entryName$jscomp$0","measureName","env$jscomp$0","isPrimaryEnv","selfTime","color$jscomp$0","debugTask$jscomp$0","measureName$jscomp$0","properties$jscomp$0","env$jscomp$1","trackIdx$jscomp$3","endTime$jscomp$0","entryName$jscomp$1","debugTask$jscomp$1","properties$jscomp$1","tooltipText","_j","_candidateInfo","_env","trackIdx$jscomp$4","childrenEndTime$jscomp$3","env$jscomp$2","name$jscomp$1","entryName$jscomp$2","measureName$jscomp$1","properties$jscomp$2","_env2","trackIdx$jscomp$5","endTime$jscomp$1","entryName$jscomp$3","debugTask$jscomp$2","tooltipText$jscomp$0","processFullStringRow","clientReference","nonce$jscomp$0","JSCompiler_temp_const$jscomp$0","JSCompiler_temp_const$jscomp$1","replayConsoleWithCallStackInDEV","_chunk4","unblock","processBinaryChunk","rowState","rowID","rowTag","rowLength","lastIdx","offset","stringDecoder","decoderOptions","NaN","BigInt","mightHaveStaticConstructor","code","close","noServerCall$1","createResponseFromOptions","startReadingFromStream$1","onDone","debugValue","_ref","noServerCall","startReadingFromStream","onEnd","bind$1","v8FrameRegExp","jscSpiderMonkeyFrameRegExp","_this","resolveCallback","rejectCallback","wrapperPromise","FinalizationRegistry","createFakeJSXCallStack","replayConsoleWithCallStack","methodName","stackTrace","prevStack","newArgs","callStack","promiseForResponse","streamDoneCount","handleDone","serverConsumerManifest","streamEndedCount","endOfFirst","endOfSecond","checkKeyStringCoercion","getTaskName","UnknownOwner","elementRefGetterWithDeprecationWarning","didWarnAboutElementRef","validateChildKeys","isValidElement","specialPropKeyWarningShown","createTask","unknownOwnerDebugStack","callStackForError","unknownOwnerDebugTask","didWarnAboutKeySpread","config","maybeKey","isStaticChildren","trackActualOwner","debugStackDEV","debugStack","keys","getter","displayName","warnAboutAccessingKey","jsxDEVImpl","didWarnStateUpdateForUnmountedComponent","updater","emptyObject","ReactNoopUpdateQueue","ComponentDummy","PureComponent","getOwner","hasValidKey","ReactElement","getElementKey","escaperLookup","mapChildren","func","count","mapIntoArray","escapedPrefix","nameSoFar","invokeCallback","oldElement","newKey","childKey","userProvidedKeyEscapeRegex","lazyInitializer","resolveDebugValue","rejectDebugValue","moduleObject","_ioInfo","_ioInfo2","releaseAsyncTransition","startTransition","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","addTransitionType","transition","transitionTypes","enqueueTask","enqueueTaskImpl","requireString","_err","didWarnAboutMessageChannel","MessageChannel","channel","aggregateErrors","errors","popActScope","prevActQueue","prevActScopeDepth","actScopeDepth","recursivelyFlushAsyncActWork","flushActQueue","isFlushing","continuation","didWarnAboutOldJSXRuntime","deprecatedAPIs","fnName","reportError","didWarnNoAwaitAct","queueSeveralMicrotasks","forEachFunc","forEachContext","didAwaitActCall","error$0","_thrownError","returnValue$jscomp$0","getCurrentStack","childArray","_i","refObject","ownName","elementType","ctor","compare","Context","formatterFn","create","configure","strEscape","sort","isTypedArrayWithEntries","stringifyTypedArray","getPositiveIntegerOption","RangeError","getItemCount","stringifyFnReplacer","$","stringifyArrayReplacer","stringifyIndent","stringifySimple","stdout","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","replace","substring","end","nextIndex","indexOf","formatter","open","bold","red","green","yellow","magenta","white","prefixes","wait","warn","ready","event","trace","LOGGING_METHOD","prefixedLog","prefixType","undefined","shift","consoleMethod","bootstrap","warnOnceCache","LRUCache","value","warnOnce","join","has","set","errorOnceCache","errorOnce","actionId","actionArgs","dispatchAppRouterAction","ACTION_SERVER_ACTION","basePath","__NEXT_ROUTER_BASEPATH","pathname","__NEXT_DEV_SERVER","startsWith","document","location","origin","includes","URL","searchParams","RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_URL","RSC_CONTENT_TYPE_HEADER","NEXT_INSTANT_TEST_COOKIE","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER","addBasePath","required","normalizePathTrailingSlash","charCodeAt","__NEXT_MANUAL_TRAILING_SLASH","query","hash","parsePath","__NEXT_TRAILING_SLASH","test","endsWith","removeTrailingSlash","__NEXT_MANUAL_CLIENT_BASE_PATH","addPathPrefix","isExternalURL","window","createFromFetchBrowser","__NEXT_REACT_DEBUG_CHANNEL","instrumentationModules","nextTransitionId","callHooks","invoke","hooks","startRouterTransition","fromTree","prefetchIntent","__NEXT_INSTRUMENTATION_CLIENT_ROUTER_TRANSITION_EVENTS","some","onRouterTransitionStart","toString","routes","timestamp","timeOrigin","fromRoutes","visit","primary","sourceSegment","segmentToSourcePagePathname","isPage","isGroupSegment","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","nextSegments","parallelRoutes","push","localeCompare","route","runRemainingActions","actionQueue","settledAction","setState","pending","runAction","needsRefresh","dispatch","ACTION_REFRESH","actionResult","handleResult","discarded","didRevalidate","isThenable","then","err","createMutableActionQueue","resolvers","ACTION_RESTORE","deferredPromise","newAction","last","ACTION_NAVIGATE","getCurrentAppRouterState","getAppRouterActionQueue","dispatchNavigateAction","navigateType","scrollBehavior","linkInstanceRef","__NEXT_APP_NAV_FAIL_HANDLING","__pendingUrl","setLinkForCurrentNavigation","tree","isExternalUrl","locationSearch","search","dispatchTraverseAction","historyState","activeHmrRefreshController","publicAppRouterInstance","back","history","forward","prefetch","fetchStrategy","isJavaScriptURLString","PrefetchKind","FetchStrategy","prefetchWithSegmentCache","nextUrl","treeAtTimeOfPrefetch","onInvalidate","createPrefetchURL","isBot","navigator","userAgent","cacheKey","createCacheKey","schedulePrefetchTask","PrefetchPriority","scroll","ScrollBehavior","refresh","hmrRefresh","resetKnownRoutes","__NEXT_SERVER_COMPONENTS_HMR_CANCELLATION","AbortController","ACTION_HMR_REFRESH","bfcacheId","__NEXT_GESTURE_TRANSITION","experimental_gesturePush","currentUrl","canonicalUrl","freshnessPolicy","FreshnessPolicy","forkedGestureState","navigate","renderedSearch","cache","dispatchGestureState","fontFamily","height","display","alignItems","justifyContent","marginTop","maxWidth","padding","textAlign","marginBottom","fontSize","fontWeight","letterSpacing","lineHeight","margin","gap","borderRadius","cursor","background","border","position","bottom","left","right","errorThemeCss","WarningIcon","svg","width","viewBox","fill","isServerError","handleISRError","head","dangerouslySetInnerHTML","__html","div","h1","button","onClick","HTTPAccessFallbackErrorBoundary","triggeredStatus","previousPathname","componentDidCatch","missingSlots","warningMessage","slot","getDerivedStateFromError","isHTTPAccessFallbackError","getAccessFallbackHTTPStatus","notFound","forbidden","unauthorized","errorComponents","HTTPAccessErrorStatus","isNotFound","isForbidden","isUnauthorized","meta","getAccessFallbackErrorTypeByStatus","HTTPAccessFallbackBoundary","useUntrackedPathname","useContext","MissingSlotContext","bailOnRootNotFound","NotAllowedRootHTTPFallbackError","DevRootHTTPAccessFallbackBoundary","ErrorBoundaryHandler","AppRouterContext","reset","retry","isNextRouterError","handleHardNavError","errorStyles","errorScripts","this","errorComponent","ErrorBoundary","workAsyncStorage","isStaticGeneration","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","values","HTTP_ERROR_FALLBACK_ERROR_CODE","httpStatus","split","instrumentParamsForClientValidation","underlyingParams","workStore","workUnitStore","workUnitAsyncStorage","validationSamples","declaredKeys","createExhaustiveParamsProxy","expectCompleteParamsInClientValidation","expression","fallbackParams","fallbackRouteParams","missingParams","trackMissingSampleErrorAndThrow","InstantValidationError","instrumentSearchParamsForClientValidation","underlyingSearchParams","createExhaustiveURLSearchParamsProxy","isRedirectError","linkForMostRecentNavigation","PENDING_LINK_STATUS","IDLE_LINK_STATUS","link","setOptimisticLinkStatus","unmountLinkForCurrentNavigation","getLinkForCurrentNavigation","prefetchable","prefetchableAndVisible","observer","IntersectionObserver","entries","isVisible","intersectionRatio","rootMargin","observeVisibility","existingInstance","get","unmountPrefetchableInstance","observe","mountLinkInstance","router","prefetchEnabled","prefetchURL","prefetchTask","prefetchHref","mountFormInstance","delete","cancelPrefetchTask","unobserve","onLinkVisibilityChanged","onNavigationIntent","unstable_upgradeToDynamicPrefetch","__NEXT_DYNAMIC_ON_HOVER","rescheduleLinkPrefetch","pingVisibleLinks","isPrefetchTaskDirty","scheduleSegmentPrefetchTask","matchSegment","existingSegment","useNavFailureHandler","useEffect","uncaughtExceptionHandler","evt","addEventListener","removeEventListener","layoutSegmentPromisesCache","createLayoutSegmentPromises","cached","segmentPromises","segmentsPromises","parallelRouteKey","getSelectedLayoutSegmentPath","computeSelectedLayoutSegment","createDevToolsInstrumentedPromise","selectedLayoutSegmentPromises","selectedLayoutSegmentsPromises","rootNavigationPromisesCache","createRootNavigationPromises","pathParams","searchParamsString","pathParamsString","stringify","treeCache","readonlySearchParams","ReadonlyURLSearchParams","layoutSegmentPromises","nestedLayoutPromisesCache","createNestedLayoutNavigationPromises","parentNavPromises","parallelRouteKeys","hasFallbackRouteParams","PathnameContext","DIGEST","offlineState","checkOfflineError","DOMException","timeoutHandle","backoffStep","dispatchOfflineChange","checkConnectivity","getOffline","notifyOnline","pingPrefetchScheduler","timeoutId","fetch","method","delay","waitForConnection","ReadonlyURLSearchParamsError","URLSearchParams","append","REDIRECT_ERROR_CODE","errorCode","slice","statusCode","at","RedirectStatusCode","getRedirectError","redirect","actionAsyncStorage","getStore","isAction","permanentRedirect","getURLFromRedirectError","getRedirectTypeFromError","getRedirectStatusCodeFromError","getSelectedParams","currentTree","parallelRoute","isDynamicParameter","isArray","segmentValue","PAGE_SEGMENT_KEY","removeLeadingSlash","segmentToPathname","dynamicParamType","normalizeSegments","reduce","acc","extractPathFromFlightRouterState","flightRouterState","INTERCEPTION_ROUTE_MARKERS","childrenPath","childPath","extractSourcePageFromFlightRouterState","sourcePageSegments","extractSourcePageSegmentsFromFlightRouterState","computeChangedPath","treeA","treeB","changedPath","computeChangedPathImpl","segmentA","parallelRoutesA","segmentB","parallelRoutesB","normalizedSegmentA","normalizedSegmentB","parallelRouterKey","createHrefFromUrl","includeHash","createDebugChannel","createFromReadableStream","createFromReadableStreamBrowser","createFromFetch","doMpaNavigation","urlToUrlWithoutFlightMarker","fetchServerResponse","prepareFlightRouterStateForRequest","isHmrRefresh","isLegacyPPR","__NEXT_PPR","__NEXT_CACHE_COMPONENTS","createFetch","__NEXT_USE_OFFLINE","responseUrl","redirected","contentType","interception","postponed","ok","flightResponsePromise","createFromNextReadableStream","flightResponse","cacheData","NEXT_NAV_DEPLOYMENT_ID_HEADER","getNavigationBuildId","normalizedFlightData","normalizeFlightData","staticStageData","resolveStaticStageData","flightData","q","couldBeIntercepted","supportsPerSegmentPrefetching","dynamicStaleTime","UnknownDynamicStaleTime","runtimePrefetchStream","_debugInfo","revealAfter","_revealAfter","offline","originalUrl","processFetch","responseStream","InvariantError","isPartial","stripIsPartialByte","__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS","stream1","rest","tee","staticBodyClone","shellBodyClone","isResponsePartial","strippedResponse","Response","statusText","defineProperty","cancel","staticStageByteLength","decodeStageUntilBoundary","resolveShellStageData","shellByteLength","responseBodyClone","createNonTaskyPrefetchResponseStream","decodeBufferedStage","enqueue","decodeFlightResponse","fetchPromise","onAbort","catch","once","pull","getReader","shouldImmediatelyDecode","__NEXT_TEST_MODE","deploymentId","getDeploymentId","self","__next_r","crypto","getRandomValues","fetchOptions","credentials","fetchUrl","setCacheBustingSearchParam","processed","browserResponse","__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS","flightStream","unstable_allowPartialStream","createInitialCacheNodeForHydration","navigatedAt","initialTree","seedData","seedHead","seedDynamicStaleAt","createCacheNodeOnNavigation","separateRefreshUrls","scrollRef","segmentCacheMap","startPPRNavigation","oldUrl","oldRenderedSearch","oldCacheNode","oldRouterState","newRouteTree","newMetadataVaryPath","freshness","isSamePageNavigation","accumulation","restrictToShell","oldRootRefreshState","updateCacheNodeOnNavigation","parentNeedsDynamicRequest","parentRefreshState","oldSegment","dropPrefetchRsc","existingCacheNode","refreshUrl","newCacheNode","needsDynamicRequest","createSegmentFromRouteTree","segmentMatchKind","prefetchHints","PrefetchHint","isNavigatingToNewRootLayout","nextTree","currentInPrefix","nextInPrefix","currentTreeSegment","nextTreeSegment","currentTreeChildren","nextTreeChild","currentTreeChild","newSlots","oldRouterStateChildren","seedDataChildren","shouldRefreshDynamicData","isLeafSegment","createCacheNodeForSegment","generateBFCacheId","cacheNode","accumulateScrollRef","createCacheNode","rsc","prefetchRsc","prefetchHead","maybeRefreshState","refreshState","add","patchedRouterStateChildren","taskChildren","childNeedsDynamicRequest","dynamicRequestTreeChildren","newCacheNodeSlots","oldCacheNodeSlots","newRouteTreeChild","oldRouterStateChild","seedDataChild","oldSegmentChild","newSegmentChild","seedHeadChild","reuseActiveSegmentInDefaultSlot","parentRouteTree","reusedUrl","reusedRenderedSearch","oldRefreshState","reusedRouteTree","convertReusedFlightRouterStateToRouteTree","metadataVaryPath","treeDivergedFromBase","taskChild","taskChildRoute","dynamicRequestTreeChild","dynamicRequestTree","newFlightRouterState","createDynamicRequestTree","current","getRenderedSearchFromVaryPath","varyPath","stringifiedQuery","urlSearchParamsToParsedUrlQuery","patchRouterStateWithNewChildren","baseRouterState","clone","newRouterState","seedRsc","dynamicStaleAt","doesSegmentNeedDynamicRequest","bfcacheEntry","readFromBFCacheDuringRegularNavigation","writeToBFCache","writeHeadToBFCache","readFromBFCache","oldRsc","oldRscDidResolve","isDeferredRsc","cachedRsc","isCachedRscPartial","segmentEntry","readSegmentCacheEntryForNavigation","EntryStatus","promiseForFulfilledEntry","waitForSegmentCacheEntry","createDeferredRsc","doesHeadNeedDynamicRequest","cachedHead","isCachedHeadPartial","metadataEntry","__NEXT_OPTIMISTIC_ROUTING","previousNavigationDidMismatch","spawnDynamicRequests","primaryUrl","routeCacheEntry","navigationLock","primaryRequestPromise","fetchMissingDynamicData","refreshRequestPromises","scopedDynamicRequestTree","voidPromise","finishNavigationTask","exitStatus","onFulfill","remainingCount","onReject","forEach","refreshRequestPromise","abortRemainingPendingTasks","childExitStatus","primaryRequestResult","dispatchRetryDueToTreeMismatch","seed","isHardRetry","retryUrl","retryNextUrl","baseTree","originalNavigateType","retryFreshnessPolicy","markRouteEntryAsDynamicRewrite","discoverKnownRoute","routeTree","invalidateRouteCacheEntries","lastCommitted","getLastCommittedTree","retryNavigateType","retryAction","ACTION_SERVER_PATCH","previousTree","mpa","convertServerPatchToFullTree","__NEXT_EXPOSE_TESTING_API","staticStageResponse","resolveStaleAt","staleAt","buildId","writePrerenderResponseIntoCache","processRuntimePrefetchStream","writeDynamicRenderResponseIntoCache","flightDatas","headVaryParams","rootVaryParamsIterable","navigationSeed","computeDynamicStaleAt","didReceiveUnknownParallelRoute","writeDynamicDataIntoNavigationTask","serverRouteTree","dynamicData","dynamicHead","finishPendingCacheNode","dynamicSegmentData","resolveRsc","updateBFCacheEntryStaleAt","serverChildren","dynamicDataChildren","serverRouteTreeChild","dynamicDataChild","taskSegment","serverSegment","resolvedUrl","didCommitWrongUrl","committedUrl","DEFERRED","pendingRsc","responseDebugInfo","fulfilledRsc","apply","rejectedRsc","getCurrentNavigationLock","getCurrentNavigationGate","beginLockedNavigation","begin","resetNavigationLockToPending","lastCommittedTree","setLastCommittedTree","hasInterceptionRouteInCurrentTree","isInterceptionRouteAppPath","hmrRefreshReducer","refreshDynamicData","DYNAMIC_STALETIME_MS","__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME","STATIC_STALETIME_MS","getStaleTimeMs","__NEXT_CLIENT_ROUTER_STATIC_STALETIME","navigateReducer","completeHardNavigation","getElementById","currentRenderedSearch","navigateUsingSegmentCache","refreshReducer","bypassCacheInvalidation","currentNextUrl","currentRouterState","invalidateSegmentCacheEntries","invalidateBfCache","nextUrlForRefresh","previousNextUrl","currentCanonicalUrl","currentFlightRouterState","refreshSeed","pushRef","pendingPush","navigateToKnownRoute","computeClientCacheBustingSearchParam","subtle","computeCacheBustingSearchParam","computeLegacyCacheBustingSearchParam","setCacheBustingSearchParamWithHash","existingSearch","pairs","rawQuery","filter","dynamicStaleTimeSeconds","newStaleAt","createCacheMap","originalHref","splitPathnameIntoParts","parts","Fallback","Revalidation","parent","getFromCacheMap","currentCacheVersion","rootEntry","isRevalidation","onlyMatchFulfilled","getEntryWithFallbackImpl","previousKey","remainingKeys","lazilyEvictIfNeeded","isValueExpired","deleteMapEntry","existingEntry","fallbackEntry","lruPut","setInCacheMap","cacheMap","getOrInitialize","newEntry","setMapEntryValue","updateLruSize","oldEntry","deleteFromCacheMap","deleteFromLru","parentMap","revalidatingEntry","setSizeInCacheMap","convertRouteTreeToFlightRouterState","childTree","drainVaryParams","readVaryParams","rootIterable","varyParams","staleTimeSeconds","max","MetadataOnlyRequestTree","routeCacheMap","invalidationListeners","currentRouteCacheVersion","currentSegmentCacheVersion","getCurrentRouteCacheVersion","getCurrentSegmentCacheVersion","invalidateEntirePrefetchCache","pingInvalidationListeners","tasks","notifyInvalidationListener","readRouteCacheEntry","getRouteVaryPath","matchKnownRoute","lookupVaryPath","getShellSegmentVaryPath","fulfilled","pendingEntry","promiseWithResolvers","createPromiseWithResolvers","createDetachedRouteCacheEntry","blockedTasks","hasDynamicRewrite","Infinity","readOrCreateRouteCacheEntry","deprecated_requestOptimisticRouteCacheEntry","requestedUrl","requestedSearch","urlWithoutSearchParams","routeWithNoSearchParams","createPrefetchRequestKey","canonicalUrlForRouteWithNoSearchParams","optimisticCanonicalSearch","optimisticRenderedSearch","optimisticUrl","optimisticCanonicalUrl","optimisticRouteTree","deprecated_createOptimisticRouteTree","optimisticMetadataTree","newRenderedSearch","clonedSlots","originalSlots","requestKey","shellVaryPath","clonePageVaryPathWithNewSearchParams","readOrCreateSegmentCacheEntry","insertEmptySegmentCacheEntry","varyPathForRequest","getSegmentVaryPathForRequest","emptyEntry","createDetachedSegmentCacheEntry","readOrCreateRevalidatingSegmentEntry","overwriteRevalidatingSegmentCacheEntry","isExistingSegmentEntryPreferred","candidateEntry","currentStrategy","upsertSegmentEntry","pingBlockedTasks","evictShadowingSegmentEntries","shadowEntry","isUpgradeableISRFallback","upgradeToPendingSegment","attemptToFulfillDynamicSegmentFromBFCache","dynamicPrefetchStaleAt","fulfillSegmentCacheEntry","attemptToUpgradeSegmentFromBFCache","upserted","pingPrefetchTask","createMetadataRouteTree","HEAD_REQUEST_KEY","fulfillRouteCacheEntry","fulfilledEntry","writeRouteIntoCache","getFulfilledRouteVaryPath","segmentCacheEntry","rejectRouteCacheEntry","rejectedEntry","rejectSegmentCacheEntry","convertRootFlightRouterStateToRouteTree","convertFlightRouterStateToRouteTree","ROOT_SEGMENT_REQUEST_KEY","parentPartialVaryPath","getPartialPageVaryPath","getPartialLayoutVaryPath","parentRequestKey","requestKeyPart","createSegmentRequestKeyPart","appendSegmentRequestKeyPart","parentRenderedSearch","partialVaryPath","originalSegment","isRootParam","compressedRefreshState","paramCacheKey","appendLayoutVaryPath","finalizeLayoutVaryPath","finalizePageVaryPath","finalizeMetadataVaryPath","childRouterState","childRequestKeyPart","fetchRouteOnCacheMiss","urlAfterRedirects","fetchPrefetchResponse","varyHeader","routeIsPPREnabled","pathnameParts","rootSegment","prefetchStream","responseSize","serverData","renderedPathname","getRenderedPathname","getRenderedSearch","convertTreePrefetchToRouteTree","pathnamePartsIndex","prefetchSlots","childDoesAppearInURL","childPartialVaryPath","childPrefetch","childSegmentName","childParam","param","childParamValue","parseDynamicParamFromURLPart","childParamKey","getCacheKeyForDynamicParam","siblings","doesStaticSegmentAppearInURL","childPathnamePartsIndex","childRequestKey","rootTree","writeDynamicTreeResponseIntoCache","originalPathname","originalSearch","normalizedFlightDataResult","isRootRender","getStaleAtFromHeader","fulfilledVaryPath","rejectRemainingSegmentsInBundle","fetchSegmentsOnCacheMiss","routeKey","segmentCount","fetchSegmentsOnCacheMissImpl","serverResponse","shellResponse","writeSegmentBundleResponseVariants","fallbackRetryStatus","isCanceled","retryUpgradeableFallbackPrefetch","normalizedRequestKey","shellOffset","readFulfilledValue","subarray","writeSegmentBundleResponse","detachEntriesFromSegmentBundle","payloadFetchStrategy","averageSize","sizeNode","serverDataArray","responseIsUpgradeableISRFallback","responseNeedsRuntimeRequest","needsRuntimeRequest","dataIndex","entryStaleAt","readFulfilledStaleAt","staleTime","rootVaryParams","recordedFetchStrategy","payloadVaryPath","__NEXT_VARY_PARAMS","getFulfilledSegmentVaryPath","nodeEntry","clonedTail","clonedNode","valueFromServer","valueIfUnresolved","attempt","fetchSegmentPrefetchesUsingDynamicRequest","spawnedEntries","serverDataThatSatisfiesSpawnedEntries","rejectSegmentEntriesIfStillPending","fulfilledEntries","bufferedResponseSize","originalFlightStream","onStreamClose","onResponseSizeUpdate","totalByteLength","totalBytesReceivedSoFar","staleAtForSpawnedEntries","shellStageData","shellStaleAt","metadataTree","flightDataEntry","segmentPath","writeSeedDataIntoCache","entriesOwnedByCurrentTask","fulfillEntrySpawnedByRuntimePrefetch","childSeedData","isHeadPartial","segmentVaryParams","ownedEntry","canonicalVaryPath","possiblyNewEntry","byteLimit","remaining","canNewFetchStrategyProvideMoreContent","newStrategy","staleTimeIterable","headVaryParamsIterable","defaultIsPartial","firstByte","hasMarker","remainder","fetchInternal","preLockFetch","getPreLockFetch","lruSize","ensureCleanupIsScheduled","tail","newNodeSize","prevNodeSize","deleted","cleanup","maxLruSize","parseCookieValue","raw","rawState","writeCookieValue","cookieStore","lockAtCall","lockState","existing","writeDocumentCookie","beginNavigationLockPrefetch","activePrefetches","getNavigationLockSegmentCacheMap","resolveNavigationLockPrefetch","acquireLock","resolveReleased","resolveCurrentNavigation","released","currentNavigation","globalFetchOverride","releaseLock","random","isDevServerRequest","currentLock","startListeningForInstantNavigationCookie","__next_instant_test","reload","changed","refreshOnInstantNavigationUnlock","updateCapturedSPAToTree","toTree","isNavigationLocked","allCookies","trimmed","trim","shouldRestrictNavigationToShell","rootPrefetchHints","linkFetchStrategy","subtreeHasSpeculativePrefetch","currentCacheNode","ensurePrefetchThenNavigate","navigateImpl","navigateUsingPrefetchedRouteTree","optimisticRoute","navigateToUnknownRoute","createLinkPrefetchPartialError","completeSoftNavigation","prefetchSeed","DynamicRequestTreeForEntireRoute","promiseForDynamicServerResponse","mpaNavigation","preserveCustomHistoryState","focusAndScrollRef","referringNextUrl","collectedDebugInfo","activeScrollRef","forceScroll","nextUrlForNewRoute","onlyHashChange","oldScrollRef","hashFragment","completeTraverseNavigation","baseData","treePatch","dataPatch","headPatch","didServerPatchDivergeFromBase","baseNode","childBase","segmentIdentityDivergesFromBase","detectTreeDivergenceFromBase","serverNode","baseChildren","childServer","convertServerPatchToFullTreeImpl","clonedTree","updatedParallelRouteKey","baseTreeChildren","baseSeedDataChildren","newTreeChildren","newSeedDataChildren","childBaseRouterState","childBaseSeedData","SubtreePrefetchHints","childHints","propagateSubtreeBits","finalFlightRouterState","baseSegment","navigationLockPrefetch","readPattern","part","pattern","createEmptyPart","staticChildren","dynamicChild","dynamicChildParamName","dynamicChildParamType","hasConflictingDynamicChildren","knownRouteTreeRoot","discoverKnownRoutePart","handleMismatchDueToRewrite","fullTree","parentKnownRoutePart","partIndex","urlPart","knownRoutePart","nextPartIndex","existingChild","paramType","staticSiblings","canonicalizeURLPart","joinedRemainingParts","discoverDynamicChild","newChild","mutablePart","sibling","resultFromChildren","childRouteTree","existingPattern","resolvedParams","matchKnownRoutePart","staticChild","dynamicPart","dynamicPattern","directPattern","matchedPart","reifiedTree","reifyRouteTree","newValue","patternSlots","childPattern","newVaryPath","reifiedMetadata","syntheticEntry","taskHeap","inProgressRequests","sortIdCounter","didScheduleMicrotask","mostRecentlyHoveredLink","revalidationCooldownTimeoutHandle","startRevalidationCooldown","taskSegmentCacheMap","lockMap","routeCacheVersion","segmentCacheVersion","phase","hasBackgroundWork","hasPendingResponses","spawnedRuntimePrefetches","sortId","_heapIndex","_navigationLockPrefetch","trackMostRecentlyHoveredLink","heapPush","heapDelete","heap","pop","heapSiftDown","reschedulePrefetchTask","heapResift","processQueueInMicrotask","hasNetworkBandwidth","spawnPrefetchSubtask","prefetchSubtask","onPrefetchConnectionClosed","heapPeek","pingRoute","pingRootRouteTree","staticWalkStrategy","pingStaticHead","headRequiresRuntimeCompleteness","walkRequiresRuntimeCompleteness","addSpawnedRuntimePrefetch","__NEXT_PREFETCH_INLINING","pingSegmentBundle","pingSharedPartOfCacheComponentsTree","oldTree","newTree","parentBundle","bundleInProgress","accumulateSegmentBundle","bundle","oldTreeChildren","newTreeChild","newTreeChildSegment","oldTreeChild","oldTreeChildSegment","bundleForChild","doesCurrentSegmentMatchCachedSegment","pingNewPartOfCacheComponentsTree","segmentRequiresRuntimeCompleteness","attemptStaticPrefetchOfSegment","finishStaticBundleOnRuntimeBailout","runtimeStrategy","pingRuntimeHead","requestTree","pingRuntimePrefetches","pingRouteTreeAndIncludeDynamicData","requestTreeChildren","diffRouteTreeAgainstCurrent","requestTreeChild","subtreeHasLoadingBoundary","pingPPRDisabledRouteTreeUpToLoadingBoundary","refetchMarkerContext","refetchMarker","pendingSegment","blockTaskOnPendingResponse","keyWithoutSearch","routeWithoutSearch","heapPop","routeHasPartialPrefetching","wouldRuntimeRequestProvideMore","isInsideRefetchingParent","spawnedSegment","pingFullSegmentRevalidation","spawnRevalidations","needsFetch","nodeTree","runtimeWouldProvideMore","willBeSupersededByRuntimeRequest","isUpgradeableISRFallbackRetry","StaticPrefetchDisabled","effectiveParent","revalidatingSegment","nonEmptyRevalidatingSegment","emptySegment","currentSegment","cachedSegment","addSearchParamsIfPageSegment","compareQueuePriority","priorityDiff","phaseDiff","heapSiftUp","first","parentIndex","halfLength","leftIndex","rightIndex","NavigationResultTag","original","parentPath","finalizedVaryPath","pageRequestKey","originalVaryPath","pathParamsVaryPath","searchParamsVaryPath","newSearch","UnrecognizedActionError","unstable_isUnrecognizedActionError","promisesWithDebugInfo","useActionQueue","canonicalState","setGesture","useOptimistic","useAppDevRenderingIndicator","stateWithDebugInfo","promiseWithDebugInfo","asyncState","use","OfflineContext","createContext","setOptimistic","setCanonical","isOffline","canonical","optimistic","OfflineProvider","canonicalOffline","setCanonicalOffline","useState","setOptimisticOffline","Provider","useOffline","STORE_NAME","CREATED_AT_INDEX","openDebugChannelDB","openRequest","indexedDB","onupgradeneeded","createObjectStore","createIndex","onsuccess","onerror","onblocked","persistDebugChannelToIndexedDB","requestId","db","debug","transaction","objectStore","put","createdAt","countReq","entriesToDelete","cursorReq","openCursor","continue","oncomplete","__NEXT_DEBUG_CHANNEL_PERSISTED","onabort","getNavigationEntry","getEntriesByType","getOrCreateDebugChannelReadableWriterPair","existingPair","TransformStream","transform","writer","getWriter","oldestRequestId","requestIdleCallback","finally","responseStart","responseEnd","deliveryType","transferSize","encodedBodySize","restoreDebugChannelOrReload","source","wasServedFromCacheAtPageshow","branch","getReq","tx","HMR_MESSAGE_SENT_TO_BROWSER","HMR_MESSAGE_SENT_TO_SERVER","friendlySyntaxErrorLabel","isLikelyASyntaxError","stripAnsi","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","originName","breakingChangeIndex","NEXT_RSPACK","moduleName","file","moduleIdentifier","details","lines","loaderPaths","exec","parsingError","errorLine","errorColumn","splice","firstLine","loaderPath","arr","formatWebpackMessages","formattedErrors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","unshift","REACT_REFRESH_FULL_RELOAD_FROM_ERROR","getTerminalLoggingConfig","__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL","for","alreadyLoggedOnServerSymbol","terminalLoggingConfig","UNAVAILABLE_MARKER","maximumDepth","depthLimit","maximumBreadth","edgeLimit","safeStringifyWithDepth","shouldForwardLogs","isTerminalLoggingEnabled","__NEXT_MCP_SERVER","flushBufferedEntries","socket","logQueue","clientEntry","stringifyUserArg","sourceType","send","flushScheduled","cancelFlush","scheduleLogSend","timeout","rafId","requestAnimationFrame","cb","cancelAnimationFrame","onSocketReady","readyState","WebSocket","OPEN","logStringify","queueMicroTask","errorQueue","errorHandlers","rejectionQueue","rejectionHandlers","ReplaySsrOnlyErrors","onBlockingError","ssrError","readSsrError","ssrErrorTemplateTag","querySelector","getAttribute","MISSING_ROOT_TAGS_ERROR","RuntimeErrorHandler","hadRuntimeError","ErroredHtml","globalError","GlobalError","globalErrorStyles","DefaultGlobalError","AppDevOverlayErrorBoundary","isError","reportHmrLatency","sendMessage","updatedModules","startMsSinceEpoch","endMsSinceEpoch","hasUpdate","latencyMs","__nextDevClientId","page","isPageHidden","visibilityState","__NEXT_HMR_LATENCY_CB","mostRecentCompilationHash","reloading","webpackStartMsSinceEpoch","pendingHotUpdateWebpack","resolvePendingHotUpdateWebpack","waitForWebpackRuntimeHotUpdate","canApplyUpdates","module","hot","performFullReload","dependencyChain","processMessage","processTurbopackMessage","staticIndicatorState","handleErrors","formatted","__NEXT_HMR_CB","__NEXT_DEV_INDICATOR","appIsrManifest","isStatic","versionInfo","devIndicator","devToolsConfig","requestInsights","errorCount","clientId","warningCount","formattedMessages","tryApplyUpdatesWebpack","__webpack_hash__","handleApplyUpdates","addStatusHandler","removeStatusHandler","check","sessionId","turbopackHmr","onTurbopackMessage","documentElement","errorJSON","errorObject","insight","write","errorState","getSerializedOverlayState","segmentTrieData","getSegmentTrieData","serializedErrors","errorCodes","enumerable","configurable","cause","HotReload","webSocket","handleOnUnhandledError","handleOnUnhandledRejection","useWebSocketPing","GlobalLayoutRouterContext","interval","appDirRoute","getFlightDataPartsFromPath","flightDataPath","pathToSegment","createInitialRSCPayloadFromFallbackPrerender","fallbackInitialRSCPayload","originalFlightDataPath","originalFlightRouterState","fillInFallbackFlightRouterStateImpl","doesAppearInURL","paramValue","childFlightRouterState","G","getNextFlightSegmentPath","flightSegmentPath","stripClientOnlyDataFromFlightRouterState","_refreshState","refreshMarker","cleanedSegment","stripClientOnlyDataFromSegment","cleanedParallelRoutes","hasBasePath","pathHasPrefix","globalBuildId","setNavigationBuildId","removeBasePath","rewrittenQuery","rewrittenPath","urlWithoutFlightParameters","getParamValueFromCacheKey","TEXT_PLAIN_CONTENT_TYPE_HEADER","HTML_CONTENT_TYPE_HEADER","JSON_CONTENT_TYPE_HEADER","NEXT_QUERY_PARAM_PREFIX","NEXT_INTERCEPTION_MARKER_PREFIX","MATCHED_PATH_HEADER","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","RSC_SUFFIX","ACTION_SUFFIX","NEXT_DATA_SUFFIX","NEXT_META_SUFFIX","NEXT_BODY_SUFFIX","NEXT_CACHE_TAGS_HEADER","NEXT_CACHE_REVALIDATED_TAGS_HEADER","NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER","NEXT_RESUME_HEADER","NEXT_RESUME_STATE_LENGTH_HEADER","NEXT_CACHE_TAG_MAX_ITEMS","NEXT_CACHE_TAG_MAX_LENGTH","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","NEXT_CACHE_IMPLICIT_TAG_ID","NEXT_CACHE_ROOT_PARAM_TAG_ID","CACHE_ONE_YEAR_SECONDS","INFINITE_CACHE","MIDDLEWARE_FILENAME","MIDDLEWARE_LOCATION_REGEXP","PROXY_FILENAME","PROXY_LOCATION_REGEXP","INSTRUMENTATION_HOOK_FILENAME","PAGES_DIR_ALIAS","DOT_NEXT_ALIAS","ROOT_DIR_ALIAS","APP_DIR_ALIAS","RSC_MOD_REF_PROXY_ALIAS","RSC_ACTION_VALIDATE_ALIAS","RSC_ACTION_PROXY_ALIAS","RSC_CACHE_WRAPPER_ALIAS","RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS","RSC_ACTION_ENCRYPTION_ALIAS","RSC_ACTION_CLIENT_WRAPPER_ALIAS","PUBLIC_DIR_MIDDLEWARE_CONFLICT","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","SERVER_PROPS_EXPORT_ERROR","GSP_NO_RETURNED_VALUE","GSSP_NO_RETURNED_VALUE","UNSTABLE_REVALIDATE_RENAME_ERROR","GSSP_COMPONENT_MEMBER_ERROR","NON_STANDARD_NODE_ENV","SSG_FALLBACK_EXPORT_ERROR","ESLINT_DEFAULT_DIRS","SERVER_RUNTIME","edge","experimentalEdge","nodejs","WEB_SOCKET_MAX_RECONNECTIONS","WEBPACK_LAYERS_NAMES","shared","reactServerComponents","serverSideRendering","actionBrowser","apiNode","apiEdge","middleware","instrument","edgeAsset","appPagesBrowser","pagesDirBrowser","pagesDirEdge","pagesDirNode","WEBPACK_LAYERS","GROUP","builtinReact","serverOnly","neutralTarget","clientOnly","bundled","appPages","WEBPACK_RESOURCE_QUERIES","edgeSSREntry","metadataRoute","metadataImageMeta","DetachedPromise","resolveCacheHandlerPathToFilesystem","filePath","fileURLToPath","formatDynamicImportPath","dir","resolvedFilePath","absoluteFilePath","pathToFileURL","getProperError","seen","isPlainObject","_key","scheduleOnNextTick","nextTick","scheduleImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","isPending","useTransition","AfterContext","waitUntil","onClose","onTaskError","isRequestClosed","initialOnCloseError","workUnitStores","callbackQueue","PromiseQueue","pause","after","addThenable","addCallback","errorWaitUntilNotAvailable","reportTaskError","afterTaskStore","afterTaskAsyncStorage","rootTaskSpawnPhase","runCallbacksOnClosePromise","runCallbacksOnClose","wrappedCallback","bindSnapshot","runCallbacks","withExecuteRevalidates","onIdle","taskKind","handlerError","wrapApiHandler","getTracer","setRootSpanAttribute","NodeSpan","spanName","sendStatusCode","statusOrUrl","writeHead","Location","checkIsOnDemandRevalidate","rawHeaders","previewProps","HeadersAdapter","isOnDemandRevalidate","previewModeId","revalidateOnlyGenerated","COOKIE_NAME_PRERENDER_BYPASS","COOKIE_NAME_PRERENDER_DATA","RESPONSE_LIMIT_DEFAULT","SYMBOL_PREVIEW_DATA","SYMBOL_CLEARED_COOKIES","clearPreviewData","serialize","previous","getHeader","setHeader","httpOnly","sameSite","ApiError","sendError","statusMessage","setLazyProp","req","opts","optsReset","tryGetPreviewData","multiZoneDraftMode","cookies","encryptedPreviewData","tokenPreviewData","isValidPreviewModeId","jsonwebtoken","verify","previewModeSigningKey","decryptWithSecret","decryptedPreviewData","previewModeEncryptionKey","isWebStream","ReactServerResult","_stream","_replayable","ReplayableNodeStream","createReplayStream","Readable","webStream","__non_webpack_require__","toWeb","fromWeb","consume","dispose","_chunks","_done","_error","_subscribers","on","buf","sub","onChunk","clear","ReadableCtor","__NEXT_BUNDLER","bufferedChunks","bufferIndex","bufferDrained","isDone","sourceError","destroy","subscriber","createReactServerPrerenderResult","underlying","prelude","ReactServerPrerenderResult","createReactServerPrerenderResultFromRender","assertChunks","consumeChunks","asChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","processPrelude","unprocessedPrelude","peek","firstResult","preludeIsEmpty","sharedAsyncLocalStorageNotAvailableError","FakeAsyncLocalStorage","disable","enterWith","maybeGlobalAsyncLocalStorage","AsyncLocalStorage","createAsyncLocalStorage","createSnapshot","snapshot","createWebDebugChannel","readableController","clientSideReadable","serverSide","WritableStream","clientSide","createNodeDebugChannel","PassThrough","Writable","encoding","final","createValidationSampleTracking","missingSampleErrors","trackMissingSampleError","validationSampleTracking","getExpectedSampleTracking","createCookiesFromSample","sampleCookies","declaredNames","Proxy","RequestCookiesAdapter","receiver","originalMethod","createMissingCookieSampleError","call","nameOrCookie","createHeadersFromSample","rawSampleHeaders","sampleHeaders","find","toLowerCase","cookieHeaderValue","headersInit","rawName","createDraftModeForValidation","isEnabled","enable","declaredParamNames","wellKnownProperties","createExhaustiveSearchParamsProxy","declaredSearchParamNames","createMissingSearchParamSampleError","originalMathod","hasOwn","createRelativeURLFromSamples","sampleParams","sampleSearchParams","createPathnameFromRouteAndSampleParams","interpolatedSegments","rawSegment","getSegmentParam","qs","createURLSearchParamsFromSample","parseRelativeUrl","assertRootParamInSamples","INSTANT_VALIDATION_ERROR_DIGEST","isInstantValidationError","getActionNotFoundError","getInvalidServerReferenceIdError","encoded","MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH","TRUNCATED_SERVER_REFERENCE_ID_LENGTH","MANIFESTS_SINGLETON","globalThisWithManifests","normalizeWorkerPageName","pageName","selectWorkerForForwarding","serverActionsManifest","bundlePath","workers","getServerActionsManifest","normalizeAppPath","removePathPrefix","setManifestsSingleton","clientReferenceManifest","rawServerActionsManifest","existingSingleton","encryptionKey","clientReferenceManifestsPerRoute","mappingProxies","proxiedClientReferenceManifest","registeredManifest","proxy","currentManifest","additionalClientReferenceManifestPages","serverModuleMap","workerEntry","mightBeServerReferenceId","moduleId","async","getManifestsSingleton","manifestSingleton","getClientReferenceManifest","getServerModuleMap","createNodeBufferedTransformStream","maxBufferByteLength","bufferByteLength","merged","copiedBytes","bufferedChunk","Transform","_encoding","flush","renderToWebFlightStream","ComponentMod","clientModules","renderToWebFizzStream","streamOptions","_options","renderToInitialFizzStream","ReactDOMServer","nodeReadableToWebReadableStream","webToReadable","createFlightDataInjectionTransform","dataStream","delayDataUntilFirstHtmlChunk","htmlStreamFinished","donePulling","startOrContinuePulling","startPulling","nodeTransform","createHeadInsertionTransform","insert","inserted","hasBytes","insertion","indexOfUint8Array","ENCODED_TAGS","encodedInsertion","allocUnsafe","createMetadataTransform","chunkIndex","isMarkRemoved","iconMarkIndex","closedHeadIndex","iconMarkLength","replaced","insertionLength","createMoveSuffixTransform","foundSuffix","before","createHtmlDataDplIdTransform","dplId","didTransform","htmlTagIndex","insertionPoint","encodedAttribute","modified","renderToNodeFlightStream","renderOptions","pt","pipeable","pipe","renderToNodeFizzStream","shellReady","deferPipe","waitForAllReady","AppRenderSpan","resumeToFizzStream","runInContext","resumeAndAbort","continueFizzStream","renderStream","inlinedDataStream","getServerInsertedHTML","getServerInsertedMetadata","validateRootLayout","suffixUnclosed","CLOSE_TAG","buffered","flushed","encodedSuffix","deferredSuffix","flightInjection","foundHtml","foundBody","rootLayoutValidator","missingTags","moveSuffix","headInsertion","continueStaticPrerender","prerenderStream","webContinueStaticPrerender","continueDynamicPrerender","webContinueDynamicPrerender","continueStaticFallbackPrerender","webContinueStaticFallbackPrerender","continueDynamicHTMLResumeNode","continueDynamicHTMLResumeWeb","webContinueDynamicHTMLResume","chainStreams","streams","out","pipeNext","streamToBuffer","webStreamToBuffer","streamToString","webStreamToString","createWebInlinedDataStream","webSource","createInlinedDataReadableStream","createNodeInlinedDataStream","startScriptTag","htmlEscapeAttributeString","scriptContents","htmlEscapeJsonString","INLINE_FLIGHT_PAYLOAD_BOOTSTRAP","INLINE_FLIGHT_PAYLOAD_FORM_STATE","pullFlightData","prerender","output","htmlInlinedData","isUtf8","decodedString","base64","byteOffset","readableEnded","readableLength","removeListener","createPendingStream","createDocumentClosingStream","webCreateDocumentClosingStream","createOnHeadersCallback","appendHeader","pipeRuntimePrefetchTransform","sentinel","pipeThrough","createRuntimePrefetchTransformStream","getServerPrerender","getClientPrerender","teeStream","replayable","flightResponses","encoder","TextEncoder","getFlightStream","debugStream","newResponse","edgeSSRModuleMapping","ssrModuleMapping","moduleMap","nodeDebugStream","createFromNodeStream","responseOnNextTick","flightReader","decoder","fatal","scriptStart","encode","decode","writeFlightDataInstruction","btoa","fromCodePoint","CIPHER_ALGORITHM","encryptWithSecret","secret","iv","salt","cipher","encrypted","concat","getAuthTag","encryptedData","CIPHER_SALT_LENGTH","decipher","setAuthTag","createDefaultCacheHandler","maxSize","refreshTags","getExpiration","updateTags","memoryCache","pendingSets","NEXT_PRIVATE_DEBUG_CACHE","pendingPromise","privateEntry","expire","maxAgeSeconds","MIN_PRERENDERABLE_EXPIRE","revalidate","areTagsExpired","tags","areTagsStale","returnStream","newSaved","resolvePending","clonedValue","isErrored","errorRetryCount","expiration","tagsManifest","expired","durations","round","updates","stale","LRUNode","SentinelNode","calculateSize","onEvict","totalSize","addToHead","removeNode","moveToHead","removeTail","lastNode","remove","currentSize","nodeFs","existsSync","fs","readFile","readFileSync","writeFile","mkdir","recursive","stat","REACT_POSTPONE_TYPE","isPostpone","findSourceMap","sourceMapPayloads","findSourceMapPayload","sourceURL","sourceMapIgnoreListsEverything","ignoreList","sources","findApplicableSourceMapPayload","line0","column0","sections","middle","section","column","didWarnAboutInvalidSourceMapDEV","filterStackFrameDEV","line1","column1","sourceMapPayload","bundlerFindSourceMapURLSymbol","setBundlerFindSourceMapURLImplementation","findSourceMapURLImplementation","invalidSourceMap","sourceMapURLs","findSourceMapURLDEV","scriptNameOrSourceURL","bundlerSourceMapURL","sourceMapURL","sourceMapJSON","sourceMapURLData","devirtualizeReactServerURL","envIdx","suffixIdx","lastIndexOf","decodeURI","isAnonymousFrameLikelyJSNative","ignoreListAnonymousStackFramesIfSandwiched","frames","isAnonymousFrame","isIgnoredFrame","getMethodName","ignoreFrame","currentFrame","previousFrameIsIgnored","ignoreSandwich","nextFrame","BaseServerSpan","LoadComponentsSpan","NextServerSpan","NextNodeServerSpan","StartServerSpan","RenderSpan","RouterSpan","AppRouteRouteHandlersSpan","ResolveMetadataSpan","MiddlewareSpan","NextVanillaSpanAllowlist","LogSpanAllowList","REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY","getRequestInsightsIdentityStorage","globalStore","runWithRequestInsightsIdentity","identity","getRequestInsightsIdentity","getRequestInsightKind","getRequestInsightKey","REQUEST_INSIGHTS_STORE_KEY","SAFE_SPAN_ATTRIBUTE_KEYS","SENSITIVE_PARAM_NAME_RE","InMemoryRequestInsightsStore","recordSpan","span","links","events","getOrCreateRequest","requestInsightKind","htmlRequestId","spanStartTime","sanitizeUrl","updateTiming","durationMs","spans","traceId","spanId","parentSpanId","sanitizeSpanAttributes","getStringAttribute","getNumberAttribute","cacheStatus","cacheReason","recordFetchForInsight","notify","recordFetch","fetchStartTime","sanitizeFetchInsight","requests","requestOrder","insightKey","requestTimings","isRequestSpan","requestTiming","requestEndTime","min","fetches","existingFetch","recordRequestInsightSpan","getRequestInsightsStore","recordRequestInsightFetch","getRequestInsightsSnapshot","subscribeRequestInsights","clearRequestInsightsForTest","sanitized","isRelativeUrl","username","password","spanRecorderForTest","record","isLocalSpanRecordingEnabled","spanRecord","isRequestInsightsEnabled","setSpanRecorderForTest","recorder","__NEXT_REQUEST_INSIGHTS","_global","UNHANDLED_REJECTION_LISTENER_KEY","unhandledRejectionListener","Log","isUnhandledRejectionListenerRegistered","registerUnhandledRejectionListener","installProcessErrorHandlers","shouldRemoveUncaughtErrorAndRejectionListeners","nextInitializedProcessErrorHandlers","removeAllListeners","savedRevalidationState","cloneRevalidationState","curr","prevTagsWithProfile","prevRevalidateWrites","newRevalidates","pendingRevalidatedTags","item","profileKey","profile","pendingRevalidateWrites","pendingRevalidates","fromEntries","executeRevalidates","revalidateTags","tagsWithProfile","incrementalCache","handlers","getCacheHandlers","tagsByProfile","existingKey","tagsForProfile","cacheLife","cacheLifeProfiles","revalidateTag","ReactServerDOMTurbopackClient","ReactServerDOMWebpackClient","altType","altPkg","pkg","OPENING","HTML","HEAD","BODY","BODY_AND_HTML","META","ICON_MARK","voidCatch","pipeTo","preventClose","nextStream","lastStream","streamFromString","streamFromBuffer","streamToChunks","webstreamToUint8Array","sum","nodestreamToUint8Array","streamToUint8Array","createBufferedTransformStream","scheduleFlush","detached","createMetadataTransformStream","createHeadInsertionTransformStream","insertedHeadContent","createClientResumeScriptInsertionTransformStream","cacheBustingHeader","searchStr","NEXT_CLIENT_RESUME_SCRIPT","didAlreadyInsert","headClosingTagIndex","createDeferredSuffixStream","createFlightDataInjectionTransformStream","createMoveSuffixStream","createHtmlDataDplIdTransformStream","attribute","modifiedChunk","createRootLayoutValidatorStream","chainTransformers","transformers","transformer","isEquivalentUint8Arrays","removeFromUint8Array","continueDynamicHTMLResume","enc","searchLen","currentChunk","found","processChunk","nextChunk","exclusiveUpperBound","currentIndex","candidateLoop","matchIndex","candidateIndex","candidateValue","overflowBytes","truncatedChunk","haystack","isBuffer","completeMatch","tagIndex","removed","cloneCacheEntry","streamA","streamB","clonedEntry","MIN_PREFETCHABLE_STALE","MIN_SHELL_STALE","handlersSymbol","handlersMapSymbol","handlersSetSymbol","privateHandlerSymbol","builtInHandlersSymbol","devFrontHandlersSymbol","devTieredHandlersSymbol","memoryCacheDisabledSymbol","initializeCacheHandlers","cacheMaxMemorySize","handlersMap","builtInHandlers","builtInSize","DefaultCache","RemoteCache","getCacheHandler","getPrivateCacheHandler","isMemoryCacheDisabled","isCustomCacheHandler","isBuiltInCacheHandler","getDevTieredCacheHandler","handlersSet","iterateCacheHandlersWithDevBuiltIns","privateHandler","devFrontHandlers","getCacheHandlerEntries","iterateCacheHandlerEntriesWithDevBuiltIns","setCacheHandler","cacheHandler","frontHandler","createTieredCacheHandler","front","backing","inFlightSyncs","scheduleBackgroundSync","sync","softTags","frontEntry","reconcileFrontFromBacking","backingEntry","servedEntry","mirroredEntry","mirrorIntoFront","ReadonlyHeadersError","callable","ReflectAdapter","lowercased","deleteProperty","seal","hidden","methods","isHidden","sealed","createHidingMethods","getSetCookie","callbackfn","thisArg","fresh","merge","ReadonlyRequestCookiesError","SYMBOL_MODIFY_COOKIE_VALUES","getModifiedCookieValues","appendMutableCookies","mutableCookies","modifiedCookieValues","resCookies","returnedCookies","getAll","MutableRequestCookiesAdapter","wrap","onUpdateCookies","responseCookies","modifiedValues","modifiedCookies","updateResponseCookies","pathWasRevalidated","ActionDidRevalidateStaticAndDynamic","serializedCookies","tempCookies","wrappedCookies","createCookiesWithMutableAccessCheck","requestStore","ensureCookiesAreStillMutable","areCookiesMutableInCurrentPhase","_callingExpression","responseCookiesToRequestCookies","requestCookies","ActionDidNotRevalidate","ActionDidRevalidateDynamicOnly","LayoutRouterContext","TemplateContext","parentHints","getDeploymentIdQuery","ampersand","getAssetToken","NEXT_SUPPORTS_IMMUTABLE_ASSETS","NEXT_DEPLOYMENT_ID","getAssetTokenQuery","djb2Hash","hexHash","HeadManagerContext","SearchParamsContext","PathParamsContext","NavigationPromisesContext","ESCAPE_LOOKUP","ESCAPE_REGEX","ATTRIBUTE_ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_REGEX","createUnrenderedSegmentError","missingFiles","label","getObjectClassLabel","prototype","ensureLeadingSlash","compareAppPaths","aHasSlot","bHasSlot","normalizeRscURL","normalizeCacheBustingInput","createCacheBustingSearchParamInput","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","computeCacheBustingSearchParamFromInput","bytes","binary","fromCharCode","interceptionMarker","marker","isCatchAll","getParamProperties","repeat","optional","extractInterceptionRouteInformation","interceptingRoute","interceptedRoute","splitInterceptingRoute","HTML_LIMITED_BOT_UA_RE","HEADLESS_BROWSER_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","getBotType","hashIndex","queryIndex","hasQuery","base","parseQuery","globalBase","resolvedBase","protocol","host","auth","hostname","port","searchParamsToUrlQuery","slashes","stringifyUrlQueryParam","urlQueryToSearchParams","searchParamsList","withoutPrefix","encodeToFilesystemAndURLSafeString","simpleParamValueRegex","convertSegmentPathToStaticExportFilename","getSegmentValue","isParallelRouteSegment","SERVER_REFERENCE_ID_LENGTH","extractInfoFromServerReferenceId","infoByte","argMask","usedArgs","bit","typeBit","hasRestArgs","restArgs","omitUnusedArgs","filteredArgs","WEB_VITALS","execOnce","used","ABSOLUTE_URL_REGEX","isAbsoluteUrl","getLocationOrigin","getURL","getDisplayName","isResSent","finished","headersSent","normalizeRepeatedSlashes","urlParts","urlNoQuery","loadGetInitialProps","App","ctx","getInitialProps","pageProps","SP","ST","every","DecodeError","NormalizeError","PageNotFoundError","MissingStaticPage","MiddlewareNotFoundError","stringifyError","isDefinitelyAValidIdentifier","describeStringPropertyAccess","describeHasCheckingStringProperty","stringifiedProp","msg","voidHandler","isClientReference","CLIENT_REFERENCE_TAG$1","registerClientReferenceImpl","proxyImplementation","SERVER_REFERENCE_TAG","getReference","proxyHandlers$1","deepProxyHandlers","resolveClientReferenceMetadata","modulePath","preload","hints","uniquePart","trimOptions","emitHint","preloadModule$1","hasProperties","resolveOwner","currentOwner","componentStorage","resolvePromiseOrAwaitNode","unresolvedNode","getAsyncSequenceFromPromise","asyncId","getAsyncId","pendingOperations","collectStackTracePrivate","framesToSkip","callSite","callSite$jscomp$0","identifierRegExp","collectedStackTrace","collectStackTrace","parseStackTracePrivate","skipFrames","parseStackTrace","stackTraceCache","frameRegExp","isAsync","currentComponentDebugInfo","unsupportedHook","unsupportedContext","ReactSharedInternalsServer","isGetter","defaultFilterStackFrame","devirtualizeURL","filterStackTrace","filteredStack","callsite","hasUnfilteredFrame","lineNumber","columnNumber","isAwaitInUserspace","firstFrame","patchConsole","consoleInst","wrapperMethod","badge","outlineComponentInfo","serializeDebugModel","filterStackFrame","keepDebugAlive","PRERENDER","serializeDebugThenable","counter","emitOutlinedDebugModelChunk","emitErrorChunk","ABORTING","emitDebugHaltChunk","deferredDebugObjects","cancelled","serializeThenable","newTask","forwardDebugInfoFromThenable","erroredTask","haltTask","finishHaltedTask","forwardDebugInfoFromCurrentContext","readThenable","callWithDebugContextInDEV","componentDebugInfo","renderFunctionComponent","canEmitDebugInfo","outlineTask","componentDebugID","componentEnv","advanceTaskTime","emitDebugChunk","wakeable","$jscomp$compprop0","renderModelDestructive","emptyRoot","logKeyError","renderFragment","forwardDebugInfo","deferTask","serializeLazyID","retryTask","serializeByValueID","emitAsyncSequence","alreadyForwardedDebugInfo","visited","visitAsyncNode","cutOff","chain","previousIONode","cutOff$jscomp$0","awaited","serializeIONode","markOperationEndTime","implicitSlot","lastTimestamp","debugOwner","serializeDeferredObject","serializeNumber","number","encodeReferenceChunk","serializeClientReference","parentPropertyName","clientReferenceKey","writtenClientReferences","existingId","clientReferenceMetadata","importId","emitImportChunk","serializeDebugClientReference","outlineModel","outlineModelWithFormatContext","bufferId","emitTypedArrayChunk","serializeDebugTypedArray","doNotLimit","__PROTO__$1","textId","elementReference","_writtenObjects","_existingReference","serializedSize","MAX_ROW_SIZE","TEMPORARY_REFERENCE_TAG","newFormatContext","outlineDebugModel","REACT_LEGACY_ELEMENT_TYPE","errorEnv","blob","abortBlob","streamTask","abortStream","supportsBYOB","isByteStream","callOnAllReadyIfReady","tryStreamTask","x$6","getAsyncIterator","abortIterable","isIterator","callIteratorInDEV","endStreamRow","x$7","symbols","emitTextChunk","writtenServerReferences","emitSymbolChunk","CLOSING","causeReference","errorsReference","causeId","errorsId","existingRef","emitIOInfoChunk","objectLimit","ioNode","promiseRef","callsite$jscomp$0","binaryLength","NEXT_TWO_CHUNKS_ARE_ATOMIC","renderDebugModel","CONSTRUCTOR_MARKER","tempRef","existingDebugReference","debugModelRoot","debugNoOutline","prevModelRoot","ioInfo$jscomp$0","id$jscomp$0","sequence","forwardDebugInfoFromAbortedTask","emitTimingChunk","emitChunk","resolveModel","jsonValue","prevImplicitSlot","_resolved","ERRORED$1","prevCanEmitDebugInfo","RENDERING","parentSerializedSize","currentEnv","processedChunk","errorId","currentRequest$1","flushCompletedChunks","debugDestination","debugChunks","importsChunks","hintChunks","_debugChunks","_item","regularChunks","_item2","errorChunks","startFlowingDebug","error$8","fromHex","resolveDebugMessage","command","retainedValue","resolveServerReference","appendBackingEntry","backingStore","$jscomp$compprop2","RESPONSE_SYMBOL","$jscomp$compprop4","loadServerReference$1","blockedPromise","cachedPromise","resolveReference","promiseValue","MAX_BOUND_ARGS","bumpArrayCount","arrayContext","_chunk$reason","rawModel","parentObj","parentKey","arrayRoot","obj","proxyHandlers","referencedFormDataKey","MAX_BIGINT_DIGITS","parseTypedArray","parseReadableStream","parseAsyncIterable","childContext","localLength","rootArrayContexts","referenceArrayRoot","flightController","_chunk","FlightIterator","$jscomp$compprop5","backingFormData","arraySizeLimit","resolveField","decodeBoundActionMetaData","serverManifest","serverReferenceToString","PROMISE_PROTOTYPE","lastRanAwait","emptyStack","resourceType","callIterator","triggerAsyncId","trigger","currentAsyncId","inspectedValue","cycleProtection","maybeActionKey","actionKey","webpackMap","_entry$value","busboyStream","handle","queuedFields","bodyFinished","_ref2","mimeType","pendingFile","exportName","debugChannelReadable","onData","lastWasPartial","stringBuffer","debugWritable","debugChannelWritable","createCacheRoot","createFakeCallStack","fnMap","objectCache","ReactServerDOMTurbopackServer","ReactServerDOMWebpackServer","ReactServerDOMTurbopackStatic","ReactServerDOMWebpackStatic","getAltProxyForBindingsDEV","fillPool","customRandom","StructError","isObject","print","toFailures","Struct","assert","is","mask","validate","define","never","unknown","coerce","getSize","refine","__webpack_require__","mode","ns","def","definition","moreModules","chunkIds","runtime","_m","localSpanAsyncStorage","runtimeStyles","runtimeStyleChanged","vendoredReactRSC","vendoredReactSSR","RenderStage","SyncIOMode","DynamicHoleKind","PreludeState","CachedRouteKind","IncrementalCacheKind","RouteKind","DynamicState","DynamicHTMLPreludeState","Phase","VALIDATION_LEVEL","NEXT_REQUEST_META","getRequestMeta","addRequestMeta","TEST_ROUTE","TEST_STRICT_ROUTE","isDynamicRoute","strict","normalizePagePath","normalized","posix","resolvedPage","normalize","getTurbopackChunkGroupBootstrap","paramsByPage","chunkLoadingGlobal","pages","statements","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","normalizeNextQueryParam","detectDomainLocale","domainItems","detectedLocale","defaultLocale","locales","locale","addPathSuffix","getHostname","normalizeLocalePath","lowercasedLocales","REGEX_LOCALHOST_HOSTNAME","parseURL","Internal","NextURL","baseOrOpts","analyze","getNextPathnameInfo","i18n","trailingSlash","nextConfig","pathnameNoDataPrefix","paths","parseData","i18nProvider","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","domainLocale","domains","formatPathname","addLocale","ignorePrefix","lower","forceLocale","formatSearch","toJSON","Request","ResponseAbortedName","ResponseAborted","createAbortController","writableFinished","signalFromNodeResponse","errored","destroyed","AbortSignal","clientComponentLoadStart","clientComponentLoadTimes","clientComponentLoadCount","getClientComponentLoaderMetrics","metrics","isAbortError","HAS_CLIENT_COMPONENT_METRICS_ENABLED","NEXT_OTEL_PERFORMANCE_PREFIX","pipeToNodeResponse","waitUntilForEnd","createWriterFromResponse","started","drained","onDrain","off","measure","flushHeaders","pipeNodeReadableToNodeResponse","isNodeReadable","RenderResult","EMPTY","fromStatic","assignMetadata","isNull","isDynamic","toUnchunkedString","getInstantTestBootstrapScriptContent","INTERNAL_QUERY_NAMES","createMetadataContext","renderOpts","isStaticMetadataRouteFile","DraftModeProvider","cookieValue","_isEnabled","_previewModeId","_mutableCookies","HIDDEN_REQUEST_HEADERS","mergeMiddlewareCookies","existingCookies","setCookieValue","splitCookiesString","charAt","createRequestStoreForRender","rootParams","implicitTags","serverComponentsHmrCache","resumeDataCache","hmrRefreshHash","createRequestStore","inputs","userspaceMutableCookies","draftMode","__serverComponentsHmrCache","createLazyResult","pendingResult","onfulfilled","onrejected","formatValidationEvent","SYMBOL","buildDevValidationSnapshot","instantInputs","staticInputs","prefetchMode","devRenderDidError","responseFinished","originalResponse","chunksByChannel","getDebugChunksOnce","toSerializedInputs","accumulatedChunks","debugChannelClient","stageEndTimes","urlPathname","urlSearch","isDraftMode","requestStartTime","interpolatedParams","requestFallbackRouteParams","optimisticRouting","experimental","forceStatic","validationLevel","isDebugChannelEnabled","setReactDebugChannel","images","allowEmptyStaticShell","OUT_OF_CLASS_CHAR","OUT_OF_CLASS_RUN","encodeHeaderSafe","getImplicitTags","getDerivedTags","derivedTags","curPathname","tagsArray","expirationsByCacheKind","createTagsExpirationsByCacheKind","cacheHandlers","lastLocalTraceId","lastLocalSpanId","traceLocalSpan","parentSpan","resolvedParentSpan","parentSpanContext","spanContext","createLocalSpan","delegateSpan","isolateOpenTelemetry","LocalRecordingSpan","padStart","requestIdentity","getCurrentRequestIdentity","requestInsightsIdentity","recordException","setStatus","SpanStatusCode","getLocalSpanAsyncStorage","cleanSpanStoreAttributes","openTelemetryIsolated","spanContextValue","traceFlags","getSpanStoreLinks","spanStoreLinks","getTimestamp","exception","ended","isOpenTelemetryIsolated","setAttribute","setAttributes","addEvent","attributesOrStartTime","eventTime","isSpanStoreAttributes","updateName","releaseReferences","isRecording","getSpanStoreException","getSpanStoreExceptionAttributes","recordAttributes","getRecordError","cleanedAttributes","getTime","FlightRenderResult","invalidServerComponentReactHooks","setMessage","getStackWithoutErrorMessage","formatServerError","addedMessage","clientHook","regex","BAILOUT_TO_CSR","BailoutToCSRError","isBailoutToCSRError","isDynamicServerError","NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","isStaticGenBailoutError","RENDER_STAGE_ADVANCE_ORDER","getNextStage","stage","StagedRenderingController","abortSignal","abandonController","syncIO","finalStage","currentStage","syncInterruptReason","triggers","createStageTrigger","syncIOMode","cancelStageTrigger","_listeners","_rejectPromise","abandonRender","onStage","shouldTrackSyncInterrupt","syncInterruptCurrentStageWithReason","advanceStage","getSyncInterruptReason","getStageEndTime","triggeredAt","nextStageIx","dynamicStageIx","resolveStage","targetStage","targetStageIx","_resolvePromise","getStagePromise","waitForStage","delayUntilStage","ioTrigger","isClientHookDynamicError","RENDER_STAGES_BY_DATA_KIND","sessionData","staticLinkData","runtimeLinkData","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","createRuntimeMetadataError","createDynamicMetadataError","createRuntimeViewportError","createDynamicViewportError","logBuildDebugHint","allRequiredBoundariesRendered","requiredIds","renderedIds","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","syncDynamicErrorWithStackPostMicrotask","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","dynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getPendingClientSyncDynamicError","clientDynamic","isDynamicPostponeReason","isPrerenderInterruptedError","consumeDynamicAccess","serverDynamic","createRenderInBrowserAbortSignal","hasSuspenseRegex","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","hasMetadataRegex","hasViewportRegex","hasOutletRegex","hasInstantValidationBoundaryRegex","slotMarkerRegex","trackOutletSuspenseAboveBody","dynamicValidation","trackAllowedDynamicAccess","dynamicReason","syncDynamicError","addErrorContext","trackDynamicHoleInRuntimeShell","trackDynamicHoleInStaticShell","createInstantStack","logDisallowedDynamicError","throwIfSyncIOUsed","throwIfDisallowedDynamic","createDynamicOrRuntimeMetadataError","createDynamicOrRuntimeViewportError","getStaticShellDisallowedDynamicReasons","getNavigationDisallowedDynamicReasons","boundaryState","validationPreventingErrors","hasAllowedClientDynamicAboveBoundary","thrownErrorsOutsideBoundary","rootInstantStack","slotStacks","filePaths","cwd","createDigestWithErrorCode","originalDigest","__NEXT_ERROR_CODE","extractNextErrorCode","isReactLargeShellError","getDigestForWellKnownError","createReactServerErrorHandler","shouldFormatError","isBuildTimePrerendering","reactServerErrors","onReactServerRenderError","spanToRecordOn","originalError","stringHash","getActiveScopeSpan","createHTMLErrorHandler","allCapturedErrors","onHTMLRenderSSRError","isSSRError","dynamicParamTypes","catchall","dynamic","CSP_NONCE_SOURCE_REGEX","dynamicParamTypesSchema","segmentSchema","flightRouterStateSchema","createFlightRouterStateFromLoaderTreeImpl","loaderTree","hintTree","prefetchInliningEnabled","cacheComponents","partialPrefetching","getDynamicParamFromSegment","didFindRootLayout","layout","loading","dynamicParam","treeSegment","segmentTree","mod","instantConfig","instant","prefetchConfig","childHintNode","createFlightRouterStateFromLoaderTree","createRouteTreePrefetch","actionsForbiddenHeaders","getServerActionRequestMetadata","isURLEncodedAction","isMultipartAction","isFetchAction","isPossibleServerAction","BUILTIN_PREFIX","nextInternalPrefixRegex","normalizeFilePath","projectDir","relativeProjectRoot","relativePath","projectDirName","projectDirWithSlash","normalizeConventionFilePath","conventionPath","BOUNDARY_PREFIX","getConventionPathByType","conventionType","modules","nodeHeadersToRecord","getForwardedHeaders","getHeaders","fromNodeOutgoingHttpHeaders","nodeHeaders","mergedHeaders","filterReqHeaders","forbiddenHeaders","createForwardedActionResponse","workerPathname","forwardedHeaders","__NEXT_PRIVATE_ORIGIN","initUrl","parsedUrl","duplex","internal","createRedirectRenderResult","originalHost","redirectUrl","redirectType","currentPathname","appRelativeRedirectUrl","getAppRelativeRedirectUrl","resolved","parsedRedirectUrl","prerenderManifest","preview","cacheBustingSearchParam","limitUntrustedHeaderValueForLogs","handleAction","generateFlight","serverActions","forwardedHostHeader","forwardedHostHeaderValue","hostHeader","warning","handleUnrecognizedFetchAction","fetchCache","originHeader","originHost","isCsrfOriginAllowed","originDomain","allowedOrigins","normalizedOrigin","allowedOrigin","normalizedAllowed","matchWildcardDomain","normalizedDomain","normalizedPattern","domainParts","patternParts","patternPart","domainPart","skipPageRendering","actionWasForwarded","forwardedWorker","actionModId","boundActionArguments","defaultBodySizeLimit","bodySizeLimit","bodySizeLimitBytes","createTemporaryReferenceSet","decodeReply","decodeReplyFromBusboy","decodeAction","decodeFormState","pipeline","actionBodyFromMeta","sizeLimitTransform","getActionModIdOrError","busboy","defParamCharset","limits","fieldSize","abortController","sizeLimitedBody","fakeRequest","areAllActionIdsValid","mpaFormData","seenActionRefs","hasAtLeastOneAction","$ACTION_","$ACTION_ID_","isInvalidActionIdFieldName","actionIdFieldName","$ACTION_REF_","actionDescriptorField","actionFields","actionField","isInvalidStringActionDescriptor","actionDescriptor","ACTION_DESCRIPTOR_ID_PREFIX","executeActionAndPrepareForRender","actionData","actionHandler","actionMod","__next_app__","logInfo","actionType","logServerFunctions","actionInfo","isInlineAction","exportedName","addRevalidationHeader","isTagRevalidated","isCookieRevalidated","duration","maybeRevalidatesPromise","ServerInsertedHTMLContext","useServerInsertedHTML","addInsertedServerHTMLCallback","createServerInsertedHTML","serverInsertedHTMLCallbacks","addInsertedHtml","ServerInsertedHTMLProvider","renderServerInsertedHTML","ReactClient","encodeURIPath","getRequiredScripts","buildManifest","assetPrefix","SRIManifest","pagePath","preinitScripts","preinitScriptCommands","bootstrapScript","files","rootMainFilesTree","rootMainFiles","makeGetServerInsertedHTML","polyfills","serverCapturedErrors","tracingMetadata","flushedErrorMetaTagsUntilIndex","polyfillTags","polyfill","script","traceMetaTags","errorMetaTags","isPermanent","httpEquiv","serverInsertedHTML","getLinkAndScriptTags","injectedCSS","injectedScripts","collectNewImports","filePathWithoutExt","cssChunks","jsChunks","entryCSSFiles","entryJSFiles","cssFiles","jsFiles","css","styles","scripts","getPreloadableFonts","nextFontManifest","injectedFontPreloadTags","filepathWithoutExtension","fontFiles","foundFontUsage","preloadedFontFiles","app","fontFile","hasLoadingComponentInTree","isUseCacheFunction","$$id","getLayoutOrPageModule","modType","defaultPage","isLayout","isDefaultPage","interopDefault","default","parseLoaderTree","template","getAssetQueryString","addTimestamp","shouldAddVersion","requestTimestamp","sharedContext","clientAssetToken","renderCssResource","entryCssFiles","preloadCallbacks","componentMod","createElement","elements","entryCssFile","fullHref","inlined","parsedRequestHeaders","isRSCRequest","preloadStyle","createComponentStylesAndScripts","getComponent","injectedJS","jsHrefs","scriptIndex","EMPTY_SET","weakRef","deref","locked","Batcher","cacheKeyFn","schedulerFn","batch","fromResponseCacheEntry","cacheEntry","pageData","rscData","segmentData","toResponseCacheEntry","isMiss","isStale","cacheControl","parsePositiveInt","envValue","DEFAULT_TTL_MS","NEXT_PRIVATE_RESPONSE_CACHE_TTL","DEFAULT_MAX_SIZE","NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE","TTL_SENTINEL","invocationID","ResponseCache","minimal_mode","ttl","getBatcher","revalidateBatcher","evictedInvocationIDs","compoundKey","extractInvocationID","separatorIndex","responseGenerator","hasResolved","previousCacheEntry","cachedItem","expiresAt","isRoutePPREnabled","isPrefetch","routeKind","handleGet","previousIncrementalCacheEntry","routeKindToIncrementalCacheKind","incrementalResponseCacheEntry","handleRevalidate","responseCacheEntry","isRevalidating","VaryParamsAccumulator","_seen","_resolve","_buffer","emptyVaryParamsAccumulator","createResponseVaryParamsAccumulator","getMetadataVaryParamsAccumulator","getVaryParamsAccumulator","getRootParamsVaryParamsAccumulator","finishAccumulatingVaryParams","responseAccumulator","segmentAccumulator","createComponentTree","createComponentTreeInternal","errorMissingDefaultExport","convention","parentParams","parentOptionalCatchAllParamName","rootLayoutIncluded","authInterrupts","MetadataOutlet","isRoot","defaultExport","nextConfigOutput","Fragment","SegmentViewNode","LayoutRouter","RenderFromTemplateContext","ClientPageRoot","ClientSegmentRoot","createServerSearchParamsForServerPage","createPrerenderSearchParamsForClientPage","createServerParamsForServerSegment","createPrerenderParamsForClientSegment","serverHooks","DynamicServerError","Postpone","injectedCSSWithCurrentLayout","injectedJSWithCurrentLayout","injectedFontPreloadTagsWithCurrentLayout","layerAssets","getLayerAssets","layoutOrPagePath","styleTags","scriptTags","fontFilename","ext","preloadFont","preconnect","fullSrc","Template","templateStyles","templateScripts","ErrorComponent","Loading","loadingStyles","loadingScripts","layoutOrPageMod","hideSpan","rootLayoutAtThisLevel","rootLayoutIncludedAtThisLevelOrAbove","NotFound","notFoundStyles","Forbidden","forbiddenStyles","Unauthorized","unauthorizedStyles","dynamicShouldError","forceDynamic","dynamicUsageDescription","dynamicUsageStack","validateRevalidate","revalidateVal","defaultRevalidate","unstable_dynamicStaleTime","pageStaleTime","isPossiblyPartialResponse","LayoutOrPage","isValidElementType","segmentParam","currentParams","optionalCatchAllParamName","isSegmentViewEnabled","notFoundElement","notFoundFilePath","createBoundaryConventionElement","conventionName","forbiddenElement","unauthorizedElement","parallelRouteMap","isChildrenRouteKey","notFoundComponent","forbiddenComponent","unauthorizedComponent","childCacheNodeSeedData","parsedTree","PARALLEL_ROUTE_DEFAULT_PATH","templateNode","templateFilePath","errorFilePath","loadingFilePath","globalErrorFilePath","wrappedErrorStyles","fileNameSuffix","segmentViewBoundaries","isNextjsBuiltinFilePath","parallelRouteProps","parallelRouteCacheNodeSeedData","parallelRouteProp","loadingElement","cacheNodeKey","loadingData","createSeedData","isClientComponent","varyParamsAccumulator","createVaryParamsAccumulator","accumulator","pageElement","serverProvidedParams","promiseOfParams","promiseOfSearchParams","$$isPage","isDefaultSegment","pageFilePath","segmentType","wrappedPageElement","segmentNode","isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot","clientSegment","notfoundClientSegment","forbiddenClientSegment","unauthorizedClientSegment","createErrorBoundaryClientSegmentRoot","ErrorBoundaryComponent","errorElement","SegmentComponent","$$isLayout","layoutFilePath","getRootParams","getRootParamsImpl","LoadingBoundaryProvider","walkTreeWithFlightRouterState","loaderTreeToFilter","parentIsInsideSharedLayout","rscHead","prefetchInlining","parallelRoutesKeys","actualSegment","renderComponentsOnThisLevel","isInsideSharedLayout","isRouteTreePrefetchRequest","canSegmentBeOverridden","overriddenSegment","routerState","parentRuntimePrefetchable","layoutPath","subPath","createFullTreeFlightDataForNavigation","workStoreForInitialRender","hintTreeForInitialRender","parseAppRouteSegment","parseNormalizedAppRoute","parseAppRouteImpl","allowedTypes","pathnameSegments","appSegment","normalizeEncodedDynamicPlaceholder","decodedSegment","dynamicSegments","interceptionPrefixFromParamType","resolveParamValue","depth","processedSegments","pathSegment","interceptionPrefix","interpolateParallelRouteParams","interpolated","structuredClone","nextDepth","getDynamicParam","segmentKey","getParamValue","searchValue","PARAMETER_PATTERN","parseMatchedParameter","serializeUseCacheCacheStore","isCacheComponentsEnabled","hasExplicitRevalidate","hasExplicitExpire","readRootParamNames","binaryString","arrayBufferToString","len","stringifyResumeDataCache","encryptedBoundArgs","deflateSync","createPrerenderResumeDataCache","mutable","decryptedBoundArgs","imageResponses","dynamicCacheKeys","createRenderResumeDataCache","resumeDataCacheOrPersistedCache","maxPostponedStateSizeBytes","inflateSync","maxDecompressedSize","maxOutputLength","parseUseCacheCacheStore","stringToUint8Array","atob","dynamicNestedCacheError","getDynamicHTMLPostponedState","preludeState","dataString","replacementsString","postponedString","getDynamicDataPostponedState","describePostponedStateParseFailure","diagnostics","stateLength","errorName","errnoError","prefixMatch","hasLengthPrefix","declaredPostponedLength","tailStart","postponedStringComplete","resumeDataCacheTailLength","resumeDataCacheTailIsNull","devValidationScheduler","maxActiveValidations","currentValidationByDocument","previousController","oldestEntry","oldestHtmlRequestId","oldestController","finish","yieldToForegroundRequest","validationSignal","unpatchedSetImmediate","ANNOUNCER_TYPE","AppRouterAnnouncer","portalNode","setPortalNode","getAnnouncerNode","existingAnnouncer","getElementsByName","shadowRoot","cssText","announcer","ariaLive","role","shadow","attachShadow","appendChild","getElementsByTagName","isConnected","removeChild","routeAnnouncement","setRouteAnnouncement","previousTitle","useRef","currentTitle","title","pageHeader","innerText","textContent","createPortal","useRouter","bfcacheIdNumber","parentCacheNode","HandleRedirect","RedirectErrorBoundary","RedirectBoundary","createRouterCacheKey","withoutSearchParameters","unresolvedThenable","RootErrorBoundary","NameSpace","RootLayoutBoundary","globalMutable","HistoryUpdater","appRouterState","useInsertionEffect","__NA","__PRIVATE_NEXTJS_INTERNALS_TREE","pushState","replaceState","copyNextJsInternalHistoryState","currentState","Head","headCacheNode","resolvedPrefetchRsc","useDeferredValue","Router","nd","sourcePage","__internal_src_page","handlePageShow","persisted","pendingMpaPath","handleUnhandledRedirect","preventDefault","originalPushState","originalReplaceState","applyUrlFromHistoryPushReplace","appHistoryState","_unused","_N","onPopState","matchingHead","findHeadInCacheImpl","keyPrefix","keyPrefixWithoutSearchParams","childParallelRoutes","childCacheNode","instrumentedNavigationPromises","layoutRouterContext","parentTree","parentSegmentPath","parentLoadingData","debugNameContext","isActive","globalLayoutRouterContext","headKey","headKeyWithoutSearchParams","HotReloader","RuntimeStylesForWebpack","AppRouter","globalErrorState","forceUpdate","renderedStylesSize","createInitialRouterState","initialRSCPayload","initialFlightStreamForCache","initialCanonicalUrlParts","initialFlightData","initialRenderedSearch","initialCouldBeIntercepted","initialSupportsPerSegmentPrefetching","initialStaleTime","initialStaticStageByteLength","initialHeadVaryParams","initialRootVaryParams","initialRuntimePrefetchStream","initialDynamicStaleTimeSeconds","initialCanonicalUrl","initialSeedData","initialHead","initialRouteTree","initialTask","printDebugThrownValueForProspectiveRender","originalErrorStack","stackStart","shouldAttemptPatching","warnAboutTimers","runInSequentialTasks","scheduleTimeout","createAtomicTimerGroup","delayMs","isFirstCallback","firstTimerIdleStart","didFirstTimerRun","didImmediateRun","runFirstCallback","runSubsequentCallback","timer","_idleStart","ids","DANGEROUSLY_runPendingImmediatesAfterCurrentTask","expectNoPendingImmediates","CacheSignal","earlyListeners","tickPending","pendingTimeoutCleanup","subscribedSignals","invokeListenersIfNoPendingReads","noMorePendingCaches","clearPending","immediate","clearImmediate","inputReady","cacheReady","beginRead","endRead","hasPendingReads","trackRead","onFinally","subscribeToReads","unsubscribeFromReads","getTracedMetadata","traceData","clientTraceMetadata","StaleTimeIterable","currentValue","createSelectStaleTime","staleTimes","static","trackStaleTime","selectStaleTime","_stale","createServerInsertedMetadata","reHasRegExp","reReplaceRegExp","escapeStringRegexp","getRouteRegex","normalizedRoute","includeSuffix","includePrefix","excludeOptionalTrailingSlash","parameterizedRoute","groups","getParametrizedRoute","groupIndex","markerMatch","paramMatches","re","getSafeKeyFromSegment","getSafeRouteKey","routeKeys","backreferenceDuplicateKeys","cleanedKey","invalidKey","duplicateKey","PARAM_SEPARATOR","hasAdjacentParameterIssues","normalizeAdjacentParameters","stripNormalizedSeparators","safePathToRegexp","needsNormalization","routeToUse","retryError","safeCompile","compiler","compile","getRouteMatcher","matcherFn","routeMatch","group","cleaned","unescapeSegments","compileNonPath","decodeQueryPathParameter","parseReqUrl","parseUrl","slashedProtocols","formatUrl","urlObj","querystring","filterInternalQuery","paramKeys","isNextQueryPrefix","isNextInterceptionMarkerPrefix","getPreviouslyRevalidatedTags","imageConfigDefault","deviceSizes","loader","loaderFile","disableStaticImages","minimumCacheTTL","formats","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","dangerouslyAllowLocalIP","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","localPatterns","remotePatterns","qualities","unoptimized","customCacheHandler","ImageConfigContext","anySegmentHasPartialPrefetchingEnabled","isPageAllowedToBlock","anySegmentNeedsInstantValidation","level","baseValidationLevel","manualValidation","applyDefaultValidation","needsValidation","disabled","unstable_disableValidation","unstable_disableDevValidation","unstable_disableBuildValidation","anySegmentNeedsInstantValidationInDev","cacheScopedToWorkStore","anySegmentNeedsInstantValidationInBuild","resolveInstantConfigSamplesForPage","samples","unstable_samples","childSamples","resultsPerWorkStore","results","createNodeStreamWithLateRelease","partialChunks","allChunks","releaseSignal","createNodeStreamFromChunks","maybeAppendBuildIdToRSCPayload","getDynamicStaleTime","pageMod","childPromises","makeGetDynamicParamFromSegment","NonIndex","is404Page","generateDynamicRSCPayload","routeModule","userland","createMetadataComponents","serveStreamingMetadata","needsFullTree","isBypassingCachesInDev","Viewport","Metadata","parsedQuery","metadataContext","baseResponse","staticStageByteLengthPromise","shellByteLengthPromise","shellUsedSessionDataPromise","createErrorContext","renderSource","routerKind","routePath","routeType","revalidateReason","generateDynamicFlightRenderResult","onInstrumentationRequestError","reactServerErrorsByDigest","silenceLog","requestAbortSignal","serverComponentsHmrCancellation","rscPayload","fetchMetrics","generateStagedDynamicFlightRenderResultNode","stageController","stagedRendering","asyncApiPromises","createAsyncApiPromises","shellByteLengthDeferred","staticStageByteLengthDeferred","prerenderResumeDataCache","cacheSignal","trackPendingModules","runtimePrefetchTransform","spawnRuntimePrefetchWithFilledCaches","sourceStream","dynamicStream","countShellAndStaticStageBytes","byteLengths","shellUsedSessionDataDeferred","finalRuntimeServerPrerender","stagedRenderWithoutCachesInDevNode","getPayload","getEnvironmentNameForStageWithoutCaches","generateDynamicFlightRenderResultWithStagesInDev","initialRequestStore","setCacheStatus","didErrorObservably","shouldValidate","_bypassCachesInDev","WarnForBypassCachesInDev","prepareInitialCanonicalUrl","prefetchStage","getPrefetchingModeForPage","stagedRenderWithCachesInDev","getDevRenderDidError","navigationKind","generateRuntimePrefetchResult","isShellPrefetch","prospectiveRuntimeServerPrerender","applyMetadataFromPrerenderResult","initialServerPrerenderController","initialServerRenderController","initialServerPrerenderStore","renderSignal","dynamicTracking","isSessionShell","initialServerPayload","prerenderOptions","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","pendingInitialServerResult","invalidDynamicUsageError","prependIsPartialByteToChunks","resultIsPartial","finalServerController","serverDynamicTracking","finalStageController","finalServerPrerenderStore","finalRSCPayload","createStreamPendingState","collectedChunks","createPrerenderChunksAccumulator","stageByteLengths","createStageByteLengths","collectChunk","collectPrerenderChunk","increaseChunkByteLengths","didHandleUnexpectedAbort","checkUnexpectedAbort","onUnexpectedAbort","iterateStreamingPrerenderChunks","didSessionDataUnblockNewContent","didLinkDataUnblockNewContent","prerenderChunks","dynamicAccess","collectedRevalidate","collectedExpire","collectedStale","collectedTags","getRSCPayload","is404","appUsingSizeAdjustment","hasGlobalNotFound","errorType","getGlobalErrorStyles","isPossiblyPartialHead","Preloads","preloadFn","getErrorRSCPayload","shouldRenderMetadataAndViewport","metadataComponents","errorHints","errorPrefetchInliningEnabled","reactServerStream","reactDebugStream","appDir","ErrorApp","installGlobalModuleLoadingHandlers","isTracingEnabled","instrumented","loadChunk","shouldTrackModuleLoading","__next_require__","exportsOrPromise","trackPendingImport","__next_chunk_load__","loadingChunk","trackPendingChunkLoad","renderToHTMLOrFlightImpl","isNotFoundPath","enableTainting","setIsrStatus","cachedNavigations","shouldTrackFetchMetrics","originalRequest","startSpan","hasPendingUi","appUsingSizeAdjust","patchFetch","taintObjectReference","isPrefetchRequest","isRuntimePrefetchRequest","isAppShellPrefetchRequest","isPossibleActionRequest","resolvedPathname","prerenderToStreamWithTracing","prerenderToStream","access","digestErrorsMap","buildFailingError","ssrErrors","revalidatesPromise","renderResumeDataCache","cacheComponentsEnabled","runInstantValidation","validateInstantConfigsInBuild","usedDynamic","didExecuteServerAction","actionRequestResult","components","notFoundTreeComponents","notFoundLoaderTree","renderToStream","logMessagesAndSendErrorsToBrowser","renderToHTMLOrFlight","csp","previouslyRevalidatedTags","shouldProvideFlightRouterState","parseAndValidateFlightRouterState","stateHeader","getScriptNonceFromHeader","cspHeaderValue","directives","directive","parsePostponedState","postponedStringLengthMatch","postponedStringLength","replacements","replaceAll","createWorkStore","supportsDynamicResponse","NEXT_SSG_FETCH_METRICS","__incrementalCache","useCacheTimeout","staticPageGenerationTimeout","reactLoadableManifest","afterContext","createAfterContext","onAfterTaskError","refreshTagsByCacheKind","createRefreshTagsByCacheKind","runInCleanSnapshot","fetchTags","staleHeader","staticBailoutInfo","reactMaxHeadersLength","subresourceIntegrityManifest","getTracePropagationData","polyfillFiles","noModule","randomUUID","pagesChunkGroupBootstrapParams","exposeTestingApi","renderSpan","endSpanWithError","withSpan","serverComponentsErrorHandler","htmlRendererErrorHandler","reactServerResult","debugChannelClientStream","serverStream","returnedDebugChannel","logValidationSkipped","RSCPayload","staticStream","readableSsr","readableBrowser","getPostponedFromState","resumeAppElement","htmlStream","generateStaticHTML","appElement","fizzOptions","errorBootstrapScriptContent","shouldBailoutToCSR","errorPreinitScripts","errorBootstrapScript","errorRSCPayload","errorServerStream","setupErr","errorHtmlStream","errorAllReady","finalErr","dropValidationDebugChannel","alreadyForwardedDynamicUsageErrors","forwardInvalidDynamicUsageError","runInstantInsightsSpan","spanType","runWithoutInstantInsightsSpan","_spanType","_spanName","runInstantInsightsWithTracing","VALIDATION_BAILOUT","createMemoizedThunk","prepareValidationInputs","validationDebugChannel","validationAbortSignal","inputsFromNavigation","hadCacheMiss","outcome","prepareValidationInputsInPartialPrefetching","prepareValidationInputsInLegacyPrefetching","needsInstantValidation","areStagesCompatible","hasNonRootStaticParams","LAZY_FULL_RENDER","renderWithWarmCachesForValidationInDev","forwardErrorsFromWarmRender","LAZY_RUNTIME_PRERENDER","prerenderWithWarmCachesForStaticValidationInDev","navigationHasAppShell","resolveLazyDevValidationInputs","resolvedOrLazyInputs","maybeInputs","NEXT_PRIVATE_DEBUG_VALIDATION","getSyncIOMode","getEnvironmentNameForStage","streamStagedRenderInDev","holdStreamUntilRevealed","revealAfterStage","streamReady","reportedColdCache","checkForCacheMiss","checkCacheMissAndAdvance","checkReveal","stagesAdvanced","accumulatedChunksPromise","accumulateStreamChunks","resultPromise","getStageEndTimes","shouldRenderWithAppShell","needsSessionShell","finalReactController","finalDataController","abortWhenSignalAborts","collectedChunksByStage","createStageChunksAccumulator","collectStageChunk","ABORT_ONCE","validationGeneration","debugChannelReplay","hadInvalidDynamicUsage","logValidationAborted","consoleAsyncStorage","dim","isNodeNextResponse","onFinish","runSpan","lazyInputs","devValidationWorker","sendErrorsToBrowser","runWithDevValidationLogging","validationErrors","runValidationInDev","toValidationRenderContext","shellStaticChunks","staticChunks","shellRuntimeChunks","runtimeChunks","dynamicChunks","accumulateStreamChunksInto","nodeStream","endStage","countStageBytesUntilAbortNode","cookiesStage","headersStage","paramsStage","searchParamsStage","sharedParamsParent","sharedSearchParamsParent","connection","io","messages","NEXT_TEST_LOG_VALIDATION","validationDelay","NEXT_TEST_DEV_VALIDATION_DELAY_MS","finishDelay","toDevValidationInputs","runValidationInDevFromSnapshot","buildDevValidationWorkStore","noopAfterContext","nextConfigSerializable","createRequestStoreFromInputs","warmupClientModulesForStagedValidation","cachedDebugChunks","collectDebugChunksFromClientChannel","getHmrRefreshHash","validateStaticShell","validateInstantConfigs","runtimeResult","validateStagedShell","staticResult","storeType","partialServerChunks","allServerChunks","initialClientPrerenderStore","initialClientPrerenderController","initialClientReactController","initialClientRenderController","initialClientReactSignal","any","pendingInitialClientResult","stageChunks","trackDynamicHole","clientDynamicTracking","clientReactController","clientRenderController","clientReactSignal","finalClientPrerenderStore","pendingFinalClientResult","processPreludeOp","createCombinedPayloadAtDepth","createCombinedPayloadStream","collectStagedSegmentData","discoverValidationDepths","ValidationPrefetchKind","InstantValidation","prefetchKind","Shell","LegacySpeculative","initialRscPayload","validateAtDepth","groupDepthForValidation","validateAtDepthImpl","previousBoundaryState","dynamicHoleKind","extraChunksController","extraChunksSignal","useRuntimeStageForPartialSegments","payloadResult","reactController","renderController","reactSignal","instantValidationState","prerenderStore","hasAmbiguousErrors","trackDynamicHoleInNavigation","effectiveCreateInstantStack","resolveInstantStack","slotStack","boundaryLocation","suspenseLocation","trackThrownErrorInNavigation","dynamicOnlyResult","groupDepthsByUrlDepth","maxDepth","impairedValidation","maxGroupDepth","currentGroupDepth","debugKind","renderWithRestartOnCacheMissInValidation","createOnError","prefilledDataCache","shouldRenderAppShell","initialReactController","initialDataController","initialAbandonController","initialStageController","advanceStageIfNoCacheMiss","initialResult","finalRscPayload","finalResult","success","validateInstantConfigsInBuildImpl","outerWorkStore","allPossibleFallbackRouteParams","getFallbackRouteParams","pathnameRouteParamSegments","extractPathnameRouteParamSegmentsFromLoaderTree","currentPath","updatedPath","targetSegment","validatePrefixMatch","targetPathSegment","resolveRouteParamsFromTree","uniqueID","sampleIndex","validateInstantConfigInBuildWithSample","sampleDesc","outerCtx","sampleUrlWithoutQuery","sampleQuery","sampleUrl","fallbackRouteParamsMut","paramKey","sampleRootParams","validationCtx","unusedMutableCookies","onServerError","finalServerStore","endTimes","serverValidationSampleTracking","warmupValidationSamplesTracking","validationRenderCtx","shouldGenerateStaticFlightData","continueStaticPrerenderWithInlinedData","createInlinedDataStream","renderFlightStream","filterStackFrameForError","emptyReactServerResult","reportErrors","reactServerPrerenderResult","reactServerPrerenderResultIsDynamic","reactServerResumeDataCache","reactServerPrerenderStore","setMetadataHeader","initialServerResult","initialServerReactController","initialServerPayloadPrerenderStore","runtimeDataAccessed","shouldAttemptStaticPrefetch","isFallbackUpgradeable","initialPrerenderOptions","finalServerReactController","finalServerRenderController","finalServerPayloadPrerenderStore","finalServerPayload","collectSegmentData","finalClientReactController","finalClientRenderController","finalClientOnHeaders","foreverStream","resumePrelude","pprReactServerPrerenderStore","ssrPrerenderStore","pprOnHeaders","pprDynamicOpts","pprFallbackDynamicOpts","prerenderLegacyStore","isHTTPAccessFallback","isRedirect","originalFlightPrerenderResult","originalFlightPrerenderResultIsDynamic","originalResumeDataCache","originalPrerenderStore","originalCollectedStale","errorServerReactController","errorServerRenderController","errorServerDynamicTracking","errorPrerenderStore","errorServerResult","pendingErrorServerResult","rscError","errorClientReactController","errorClientRenderController","errorClientDynamicTracking","errorDynamicValidation","errorClientPrerenderStore","unprocessedErrorHtmlStream","errorPostponed","pendingErrorHtmlResult","clientError","_isPending","globalErrorModule","GlobalErrorComponent","globalErrorModulePath","fullPageDataBuffer","edgeRscModuleMapping","rscModuleMapping","hintCell","collectPrefetchHints","manifestHints","BUILD_MANIFEST","normalizeDataPath","features","typescript","PATCHED_SET_HEADER","getExtensionRegexString","staticExtensions","dynamicExtensions","FAVICON_REGEX","ROBOTS_TXT_REGEX","MANIFEST_JSON_REGEX","MANIFEST_WEBMANIFEST_REGEX","SITEMAP_XML_REGEX","compiledRegexCache","MultiFileWriter","findOrCreateTask","directory","flatMap","FileSystemCache","flushToDisk","serverDistDir","revalidatedTags","maxMemoryCacheSize","getMemoryCache","resetRequestCache","getFilePath","fileData","mtime","lastModified","fetchIdx","parsedData","storedTags","maybeSegmentData","segmentPaths","segmentsDir","segmentDataFilePath","tagsHeader","cacheTags","combinedTags","isAppPath","htmlPath","rootDir","toRoute","toHex","isArrayBuffer","hex","byte","hashString","cacheString","createHash","IncrementalCache","dev","minimalMode","getPrerenderManifest","fetchCacheKeyPrefix","CurCacheHandler","allowedRevalidateHeaderKeys","locks","hasCustomCacheHandler","cacheHandlersSymbol","_globalThis","globalCacheHandler","FetchCache","__NEXT_TEST_MAX_ISR_CACHE","disableForTestmode","NEXT_PRIVATE_TEST_PROXY","cacheControls","SharedCacheControls","_requestHeaders","calculateRevalidate","fromTime","floor","initialRevalidateSeconds","_getPathname","lock","generateSimpleCacheKey","generateCacheKey","bodyType","_ogBody","readableBody","total","arrayBuffer","val","referrer","referrerPolicy","revalidateAfter","getResumeDataCache","memoryCacheData","age","expireAfter","notFoundRoutes","itemSize","isImplicitBuildTimeCache","warningText","RouterServerContextSymbol","routerServerGlobal","isInterceptionRouteRewrite","dynamicImportEsmDefault","RouteModule","_userland","distDir","relativeProjectDir","isDev","getRouterServerContext","render404","routerServerContext","normalizeUrl","_req","_parsedUrl","instrumentationOnRequestError","absoluteProjectDir","loadManifests","srcPage","loadManifestFromRelativePath","routesManifest","fallbackBuildManifest","serverFilesManifest","dynamicCssManifest","prefetchHintsManifest","manifest","shouldCache","handleMissing","isAppRouteRoute","isMetadataRouteFile","appDirRelativePath","pageExtensions","strictlyMatchExtensions","normalizedPath","fastResult","regexes","getCompiledRegexes","trailingMatcher","suffixMatcher","variantsMatcher","robotsExts","manifestExts","useEval","skipParse","__RSC_MANIFEST","interceptionRoutePatterns","rewrites","beforeFiles","rewrite","loadCustomCacheHandlers","getIncrementalCache","isMinimalMode","CacheHandler","isrFlushToDisk","onRequestError","errorContext","logErrorWithOriginalStack","getNextConfigEdge","prepare","localeResult","previewData","patchSetHeaderWithCookieSupport","middlewareValue","relative","absoluteDistDir","ensureInstrumentationRegistered","manifests","trustHostHeader","isNextDataRequest","originalQuery","pageIsDynamic","normalizedSrcPage","serverUtils","getServerUtils","caseSensitive","defaultRouteRegex","dynamicRouteMatcher","defaultRouteMatches","namedRegex","getNamedParametrizedRoute","prefixRouteKeys","intercepted","inverseParts","hasInterceptionMarker","namedParameterizedRoute","pathToRegexpPattern","handleRewrites","rewrittenParsedUrl","rewriteParams","fsPathname","checkRewrite","regexp","matcher","removeUnnamedParams","sensitive","delimiter","regexModifier","missing","hasParams","matchHas","hasMatch","hasItem","getCookieParser","parseCookieFn","getSafeParamName","newParamName","charCode","matches","groupKey","parsedDestination","destQuery","prepareDestination","destHostnameCompiler","newUrl","parseDestination","escaped","parsedURL","destHostname","destSearch","destPath","destParams","destPathParamKeys","destHostnameParamKeys","destPathCompiler","strOrArray","appendParamsToQuery","nextInternalLocale","dynamicParams","fsPathnameNoSlash","afterFiles","normalizeQueryParams","routeParamKeys","normalizedKey","getParamsFromRouteMatches","routeMatchesHeader","routeMatches","keyName","normalizeDynamicRouteParams","ignoreMissingOptional","isDefaultValueMatch","normalizedCandidateValue","decodedCandidateValue","isOptional","isDefaultValue","defaultVal","hasValidParams","normalizeCdnUrl","interpolateDynamicPath","builtParam","rewriteParamKeys","paramsMatch","paramsResult","combinedParamKeys","queryValue","isWrappedByNextServer","paramsToInterpolate","queryResult","removeUncaughtErrorAndRejectionListeners","encodedResolvedPathname","seg","char","runtimeServerDeploymentId","supportsImmutableAssets","getResponseCache","responseCache","handleResponse","purpose","RouterContext","PrerenderManifestMatcher","matchers","dynamicRoutes","fallbackSourceRoute","SuffixPathnameNormalizer","matched","RSCPathnameNormalizer","PATTERN","SegmentPrefixRSCPathnameNormalizer","extract","getHeaderValue","registerServerReact","registerClientReact","AppPageRouteModule","normalizers","segmentPrefetchRSC","applyAppPageRscRequestMetaFromHeaders","segmentPrefetchPath","normalizeAppPageRequestUrl","normalizedUrl","pathCouldBeIntercepted","getVaryHeader","baseVaryHeader","vendored","contexts","vendoredContexts"],"mappings":"UACIA,eADAC,SCAAC,gB,2ICOAC,EAJJ,SAASC,QACP,MAAM,qBAAwB,CAAxB,AAAIC,MAHV,qIAGM,qB,MAAA,Q,WAAA,G,aAAA,EAAuB,EAC/B,CAiBAC,QAAQ,OAAO,CAAGH,AAVdA,CAAAA,EAAII,oBAAQ,qEAAuE,EAUnEC,OAAO,CAC3BF,QAAQ,sBAAsB,CAAGH,EAAEM,sBAAsB,CACzDH,QAAQ,cAAc,CAAGF,MACzBE,QAAQ,oBAAoB,CAAGF,MAC3BD,EAAEO,MAAM,EACVJ,CAAAA,QAAQ,MAAM,CAAGH,EAAEO,MAAM,AAAD,EAEtBP,EAAEQ,sBAAsB,EAC1BL,CAAAA,QAAQ,sBAAsB,CAAGH,EAAEQ,sBAAsB,AAAD,EAEtDR,EAAES,sBAAsB,EAC1BN,CAAAA,QAAQ,sBAAsB,CAAGH,EAAES,sBAAsB,AAAD,C,yEChC1D,IAAIC,UAAYC,OAAO,cAAc,CACj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,MAAM,CAAG7pC,MAAQ23C,YAAY9N,OAAQ7pC,OAClD80C,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAkpC,kBACA,EACA4L,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAmpC,WACA,EACA2L,aAEF,MACF,MAAK,IACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAopC,YACA,EACA0L,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAqpC,WACA,EACAyL,aAEF,MACF,MAAK,IACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAspC,YACA,EACAwL,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAupC,aACA,EACAuL,aAEF,MACF,MAAK,IACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAwpC,aACA,EACAsL,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACAypC,cACA,EACAqL,aAEF,MACF,MAAK,IACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACA0pC,eACA,EACAoL,aAEF,MACF,MAAK,GACHiD,kBACE/I,SACA7lC,GACA0gC,OACA7pC,MACA2pC,SACA,EACAmL,aAEF,MACJ,CACA,IACE,IAAI6H,cAAgB3N,SAAS,cAAc,CAAEjzB,IAAM,GAAIljB,EAAI,EAC3DA,EAAIgxC,OAAO,MAAM,CACjBhxC,IAEAkjB,KAAO4gC,cAAc,MAAM,CAAC9S,MAAM,CAAChxC,EAAE,CAAE+jD,gBAEzChB,qBAAqB5M,SAAU8F,YAAa3rC,GAAI6B,IADhD+Q,KAAO4gC,cAAc,MAAM,CAAC38C,OAE9B,EA+NgBsuC,aACAwG,YACAwH,MACAC,OACA1S,OACA2S,WAEL3jD,EAAI4jD,QACL,IAAMJ,UAAYxjD,IACjB2jD,UAAYF,MAAQC,O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kBACf,MAAMniJ,MACJ,iCACEgiJ,IAAI,MAAM,CACV,4BACAG,kBACA,KAIN,OAFA,OAASJ,WACPN,eAAeM,UAAWC,IAAI,MAAM,CAAEtmG,UACjC8N,OAAOw4F,IAChB,KAAK,IACH,OAAOI,gBACL1mG,SACA,OACAhG,YACA,EACAssG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA/F,UACA,EACAqsG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA5uC,WACA,EACAk1I,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA9F,kBACA,EACAosG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA7F,WACA,EACAmsG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA5F,YACA,EACAksG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA3F,WACA,EACAisG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACA1F,YACA,EACAgsG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACAzF,aACA,EACA+rG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACAxF,aACA,EACA8rG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACAvF,cACA,EACA6rG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACAtF,eACA,EACA4rG,IACA//I,IACA8/I,UAEJ,KAAK,IACH,OAAOK,gBACL1mG,SACA,OACArF,SACA,EACA2rG,IACA//I,IACA8/I,UAEJ,KAAK,IAGH,GAFAC,IAAMj5I,SAAS,OAAM,KAAK,CAAC,GAAI,IAE3B,CAAE,CADN2yC,CAAAA,SAAWA,SAAS,S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,oBAAAA,0BAAAA,AAAAA,EAA2Bs3G,mBAC3B2f,0BAA0Br/I,IAAI,CAAC,AAACmiJ,QACvBA,OAAOrjJ,IAAI,CAAC4gI,kBAGzB,CAEO2oB,cACL3oB,gBAAwB,CACxB2f,yBAAmC,CAC3B,CACR,IAAMiJ,eAAiB,CAAC,EAAErrJ,mBAAAA,UAAUA,CAAC,EAAE,EAAEE,mBAAAA,6BAA6BA,CAAC,EAAE,EAAEC,mBAAAA,2BAA2BA,CAAC,EAAE,EAAEC,mBAAAA,mCAAmCA,CAAC,CAAC,QAEhJ,AACE,IAAI,CAAC+qJ,sBAAsB,CAAC1oB,iBAAkB2f,2BAIvC,CAAC,EAAEiJ,eAAe,EAAE,EAAE/qJ,mBAAAA,QAAQA,CAAC,CAAC,CAIhC+qJ,cAEX,C,qBAtIK,oBAIGrB,QAAQ,CAAG,IAAIxxK,QAAAA,IAAAA,CAsBfqyK,WAAW,CAAG,CACpBjpI,IAAK,IAAIyoI,sBACTS,mBAAoB,IAAIP,kCAC1B,C,CA0GF,CAEA,IAAMe,SAAW,CACf,YAAav6D,iBACb,YAAaC,iBACbu6D,SAAUC,2BACZ,EAIA,gBAAeZ,kB","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377]}