pkgviz 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -1
- package/.next/build-manifest.json +15 -24
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +14 -3
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +52 -16
- package/.next/required-server-files.js +349 -0
- package/.next/required-server-files.json +106 -75
- package/.next/routes-manifest.json +16 -6
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +20 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +9 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +22 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +20 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +20 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -2
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.meta +19 -0
- package/.next/server/app/_not-found.rsc +18 -19
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +12 -0
- package/.next/server/app/favicon.ico/route.js +6 -1
- package/.next/server/app/favicon.ico/route.js.map +5 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +20 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +93 -0
- package/.next/server/app/page.js +16 -13
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +3 -1
- package/.next/server/app-paths-manifest.json +2 -1
- package/.next/server/chunks/[externals]__0l8ei7u._.js +3 -0
- package/.next/server/chunks/[externals]__0l8ei7u._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js +160 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js +28 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js +158 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js.map +1 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js +367 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js +3 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +24 -1
- package/.next/server/middleware-manifest.json +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +15 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages-manifest.json +2 -4
- package/.next/server/prefetch-hints.json +25 -0
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +94 -1
- package/.next/static/chunks/19mx3mg6lkumu.js +1 -0
- package/.next/static/chunks/1las_6j17xa9p.js +1 -0
- package/.next/static/chunks/1xk6snnh6e5_j.css +3 -0
- package/.next/static/chunks/2-rtuqsgzmno4.js +22 -0
- package/.next/static/chunks/27t_qfc-3_lzs.js +1 -0
- package/.next/static/chunks/2sswp23h6zh08.js +345 -0
- package/.next/static/chunks/310vm2bl3xxpt.js +31 -0
- package/.next/static/chunks/3fntmmi971322.js +1 -0
- package/.next/static/chunks/turbopack-1b6uko1cu_h42.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/favicon.2246eezznj2ab.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_buildManifest.js +11 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_clientMiddlewareManifest.js +1 -0
- package/README.md +176 -4
- package/bin/pkgviz.ts +57 -29
- package/package.json +57 -36
- package/src/app/actions/audit.actions.ts +7 -49
- package/src/app/globals.css +0 -2
- package/src/app/layout.tsx +3 -2
- package/src/app/loading.tsx +8 -0
- package/src/app/page.tsx +16 -2
- package/src/app/utils/buildGraph.ts +99 -100
- package/src/app/utils/getParsedFileStructure.ts +128 -54
- package/src/app/utils/inspectParserLanguageAsync.ts +39 -0
- package/src/app/utils/markCyclicPackages.ts +45 -185
- package/src/app/utils/parser/cpp/parseCppFile.ts +68 -86
- package/src/app/utils/parser/delphi/parseFile.ts +36 -120
- package/src/app/utils/parser/java/findEntryPoint.ts +2 -1
- package/src/app/utils/parser/java/parseJavaFile.ts +33 -45
- package/src/app/utils/parser/kotlin/parseFile.ts +34 -87
- package/src/app/utils/parser/python/parseFile.ts +30 -100
- package/src/app/utils/parser/typescript/parseFile.ts +17 -52
- package/src/app/utils/selectParserLanguage.ts +39 -0
- package/src/cli/formatAuditRuleFailures.ts +21 -0
- package/src/cli/runAuditAsync.ts +41 -0
- package/src/components/Breadcrumb.tsx +5 -4
- package/src/components/ExportPanel.tsx +53 -0
- package/src/components/Header.tsx +1 -0
- package/src/components/Loader.tsx +8 -2
- package/src/components/ProjectLoadError.tsx +15 -0
- package/src/components/SettingsPanel.tsx +184 -0
- package/src/components/Switch.tsx +9 -17
- package/src/components/ThemeToggle.tsx +2 -1
- package/src/components/ToggleSwitch.tsx +36 -0
- package/src/components/sidebar/Sidebar.tsx +14 -0
- package/src/components/sidebar/SidebarBadge.tsx +25 -0
- package/src/components/sidebar/SidebarRow.tsx +14 -0
- package/src/components/sidebar/SidebarSection.tsx +16 -0
- package/src/components/sidebar/SidebarTabs.tsx +58 -0
- package/src/contexts/SettingsContext.tsx +19 -20
- package/src/features/audit/adapters/inbound/react/AuditRuleList.tsx +76 -0
- package/src/features/audit/adapters/inbound/react/AuditRulePanel.tsx +30 -0
- package/src/features/audit/adapters/inbound/react/CycleInspector.tsx +116 -0
- package/src/features/audit/adapters/inbound/react/CyclicDependenciesRuleDetails.tsx +124 -0
- package/src/features/audit/adapters/inbound/react/useCycleSelection.ts +47 -0
- package/src/features/audit/application/use-cases/createAuditFromSnapshot.ts +28 -0
- package/src/features/audit/application/use-cases/resolveSelectedCycleIds.ts +18 -0
- package/src/features/audit/composition/createAuditAsync.ts +11 -0
- package/src/features/audit/domain/evaluateAuditRules.ts +42 -0
- package/src/features/audit/domain/hasBlockingAuditRuleFailure.ts +6 -0
- package/src/features/audit/domain/resolveAuditConfiguration.ts +27 -0
- package/src/features/audit/utils/cycleVisualization.ts +86 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeDependencyImportsAsync.ts +172 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeTypeScriptImportsAsync.ts +6 -0
- package/src/features/graph-view/adapters/inbound/react/DependencyGraphView.tsx +184 -0
- package/src/features/graph-view/adapters/inbound/react/GraphZoomControls.tsx +48 -0
- package/src/features/graph-view/adapters/inbound/react/applyGraphInteractionPresentation.ts +35 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewModel.ts +240 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewStyles.ts +37 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphFocus.ts +104 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphInteractions.ts +50 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphProjection.ts +71 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphViewport.ts +48 -0
- package/src/features/graph-view/domain/getDependencyHighlightClasses.ts +39 -0
- package/src/features/graph-view/domain/reduceGraphInteraction.ts +23 -0
- package/src/features/graph-view/utils/createCompoundOpacityIndex.ts +38 -0
- package/src/features/graph-view/utils/projectVisibleGraph.ts +94 -0
- package/src/features/graph-view/utils/readNodeDefinitionId.ts +7 -0
- package/src/features/graph-view/utils/removeEmptyStructuralNodes.ts +27 -0
- package/src/features/project-analysis/adapters/outbound/filesystem/readProjectSnapshotAsync.ts +12 -0
- package/src/features/project-analysis/application/use-cases/createProjectSnapshotReader.ts +29 -0
- package/src/features/project-analysis/composition/loadProjectOverviewAsync.ts +14 -0
- package/src/features/project-analysis/composition/loadProjectSnapshotAsync.ts +12 -0
- package/src/features/project-tree/adapters/inbound/react/ProjectTreePanel.tsx +52 -0
- package/src/features/project-tree/adapters/inbound/react/useProjectTreeExpansion.ts +46 -0
- package/src/features/project-tree/application/use-cases/buildProjectTree.ts +61 -0
- package/src/features/project-tree/application/use-cases/resolveProjectTreeNavigation.ts +13 -0
- package/src/features/project-tree/utils/findProjectTreeNode.ts +14 -0
- package/src/features/project-tree/utils/findProjectTreeNodeByGraphPackage.ts +21 -0
- package/src/features/project-tree/utils/getProjectTreeAncestorIds.ts +26 -0
- package/src/features/settings/utils/readSettingsEnvironment.ts +53 -0
- package/src/i18n/en.ts +21 -2
- package/src/i18n/i18n.ts +2 -3
- package/src/layouts/breadthfirst/style.ts +1 -0
- package/src/layouts/circle/style.ts +1 -0
- package/src/layouts/concentric/style.ts +1 -0
- package/src/layouts/elk/layout.ts +1 -3
- package/src/layouts/elk/style.ts +1 -0
- package/src/layouts/getWeightBuckets.ts +3 -1
- package/src/layouts/grid/style.ts +1 -0
- package/src/layouts/index.ts +0 -4
- package/src/layouts/style.ts +172 -25
- package/src/screens/home/Home.tsx +73 -25
- package/src/screens/home/HomeGraph.tsx +43 -0
- package/src/screens/home/HomeSidebar.tsx +129 -0
- package/src/shared/types/index.ts +0 -9
- package/src/shared/utils/getProjectName.ts +4 -1
- package/src/shared/utils/parseProjectPath.ts +1 -0
- package/src/shared/utils/toPosix.ts +1 -1
- package/src/types/audit.ts +76 -0
- package/src/types/auditVisualization.ts +22 -0
- package/src/types/graphInteraction.ts +9 -0
- package/src/types/parserSelection.ts +11 -0
- package/src/types/projectAnalysis.ts +20 -0
- package/src/types/projectAnalysisActionResult.ts +2 -0
- package/src/types/projectTree.ts +7 -0
- package/src/utils/filter/filterByPackagePrefix.ts +25 -7
- package/src/utils/filter/filterEmptyPackages.ts +28 -29
- package/src/utils/filter/filterSubPackagesFromDepth.ts +20 -17
- package/src/utils/filter/filterVendorPackages.ts +1 -1
- package/src/utils/filter/isIntrinsicGraphNode.ts +8 -0
- package/src/utils/filter/toggleCompoundNodes.ts +41 -31
- package/src/utils/runProjectAnalysisActionAsync.ts +14 -0
- package/tsconfig.json +11 -3
- package/.next/app-build-manifest.json +0 -29
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/chrome-devtools-workspace-uuid +0 -1
- package/.next/cache/eslint/.cache_6t30dc +0 -1
- package/.next/cache/webpack/client-production/0.pack +0 -4
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/10.pack +0 -0
- package/.next/cache/webpack/client-production/11.pack +0 -0
- package/.next/cache/webpack/client-production/12.pack +0 -0
- package/.next/cache/webpack/client-production/13.pack +0 -0
- package/.next/cache/webpack/client-production/14.pack +0 -0
- package/.next/cache/webpack/client-production/15.pack +0 -0
- package/.next/cache/webpack/client-production/16.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/3.pack +0 -0
- package/.next/cache/webpack/client-production/4.pack +0 -0
- package/.next/cache/webpack/client-production/5.pack +0 -0
- package/.next/cache/webpack/client-production/6.pack +0 -0
- package/.next/cache/webpack/client-production/7.pack +0 -0
- package/.next/cache/webpack/client-production/8.pack +0 -0
- package/.next/cache/webpack/client-production/9.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/10.pack +0 -4
- package/.next/cache/webpack/server-production/11.pack +0 -0
- package/.next/cache/webpack/server-production/12.pack +0 -0
- package/.next/cache/webpack/server-production/13.pack +0 -0
- package/.next/cache/webpack/server-production/14.pack +0 -0
- package/.next/cache/webpack/server-production/15.pack +0 -0
- package/.next/cache/webpack/server-production/16.pack +0 -0
- package/.next/cache/webpack/server-production/17.pack +0 -0
- package/.next/cache/webpack/server-production/18.pack +0 -4
- package/.next/cache/webpack/server-production/2.pack +0 -0
- package/.next/cache/webpack/server-production/3.pack +0 -0
- package/.next/cache/webpack/server-production/4.pack +0 -0
- package/.next/cache/webpack/server-production/5.pack +0 -0
- package/.next/cache/webpack/server-production/6.pack +0 -0
- package/.next/cache/webpack/server-production/7.pack +0 -0
- package/.next/cache/webpack/server-production/8.pack +0 -0
- package/.next/cache/webpack/server-production/9.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/server/app/index.html +0 -1
- package/.next/server/app/index.meta +0 -7
- package/.next/server/app/index.rsc +0 -20
- package/.next/server/chunks/548.js +0 -6
- package/.next/server/chunks/610.js +0 -7
- package/.next/server/chunks/985.js +0 -22
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/pages/_app.js +0 -1
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -1
- package/.next/server/pages/_document.js.nft.json +0 -1
- package/.next/server/pages/_error.js +0 -19
- package/.next/server/pages/_error.js.nft.json +0 -1
- package/.next/server/webpack-runtime.js +0 -1
- package/.next/static/_YC2p40ZiYT2Gcw-h_tjC/_buildManifest.js +0 -1
- package/.next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +0 -1
- package/.next/static/chunks/680-55ad17895c8fb70b.js +0 -1
- package/.next/static/chunks/90542734-29e255269788f1bd.js +0 -1
- package/.next/static/chunks/91dbc596-b9cdccd3f5cba95d.js +0 -1
- package/.next/static/chunks/964-b440f7af22c41ca5.js +0 -1
- package/.next/static/chunks/app/_not-found/page-11e4fea8e290f304.js +0 -1
- package/.next/static/chunks/app/layout-8aae7fba5ed8afb3.js +0 -1
- package/.next/static/chunks/app/page-91450b1230da8bca.js +0 -1
- package/.next/static/chunks/framework-bc35dade6ff9684e.js +0 -1
- package/.next/static/chunks/main-9e86d333c1e02dd1.js +0 -1
- package/.next/static/chunks/main-app-69a9ff75ff3465ca.js +0 -1
- package/.next/static/chunks/pages/_app-0a0020ddd67f79cf.js +0 -1
- package/.next/static/chunks/pages/_error-03529f2c21436739.js +0 -1
- package/.next/static/chunks/webpack-7adfafc806738767.js +0 -1
- package/.next/static/css/ec31779168107a11.css +0 -3
- package/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/.next/static/media/747892c23ea88013-s.woff2 +0 -0
- package/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
- package/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
- package/.next/trace +0 -2
- package/.next/types/app/layout.ts +0 -84
- package/.next/types/app/page.ts +0 -84
- package/.next/types/cache-life.d.ts +0 -141
- package/.next/types/package.json +0 -1
- package/src/app/actions/graph.actions.ts +0 -25
- package/src/app/utils/parser/cpp/extractCppPackageFromImport.ts +0 -18
- package/src/app/utils/parser/delphi/extractPackageFromImport.ts +0 -21
- package/src/app/utils/parser/java/extractJavaPackageFromImport.ts +0 -39
- package/src/app/utils/parser/java/getIntrinsicPackagesRecursive.ts +0 -33
- package/src/app/utils/parser/kotlin/extractPackageFromImport.ts +0 -19
- package/src/app/utils/parser/python/extractPythonPackageFromImport.ts +0 -18
- package/src/app/utils/parser/typescript/extractTypeScriptPackageFromImport.ts +0 -18
- package/src/components/Cytoscape.tsx +0 -23
- package/src/components/Setting.tsx +0 -17
- package/src/components/Settings.tsx +0 -189
- package/src/components/ZoomInput.tsx +0 -94
- package/src/components/useCytoscape.ts +0 -343
- package/src/layouts/getLayoutStyle.ts +0 -19
- package/src/shared/utils/detectLanguage.ts +0 -255
- package/src/shared/utils/getJsonAsync.ts +0 -13
- package/src/shared/utils/parseEnv.ts +0 -91
- package/src/store/useLocalStorage.ts +0 -29
- package/src/utils/hasChildren.ts +0 -7
- /package/.next/{react-loadable-manifest.json → server/app/_global-error/page/react-loadable-manifest.json} +0 -0
- /package/.next/static/chunks/{polyfills-42372ed130431b0a.js → 0cz1d0mv5g_q7.js} +0 -0
- /package/.next/static/{_YC2p40ZiYT2Gcw-h_tjC → rjdzHqzPw2GCNhDbjcu0-}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/src/shared/lib/isomorphic/path.js","../../../../node_modules/next/dist/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js","../../../../node_modules/next/dist/compiled/react-server-dom-turbopack/client.node.js","../../../../node_modules/next/dist/compiled/%40opentelemetry/api/index.js","../../../../node_modules/next/dist/esm/server/lib/trace/tracer.js","../../../../node_modules/next/dist/esm/shared/lib/is-thenable.js","../../../../node_modules/next/dist/compiled/cookie/index.js","../../../../node_modules/next/dist/compiled/fresh/index.js","../../../../node_modules/next/dist/compiled/string-hash/index.js","../../../../node_modules/next/dist/esm/server/lib/lru-cache.js","../../../../node_modules/next/dist/esm/lib/batcher.js","../../../../node_modules/next/dist/esm/server/response-cache/utils.js","../../../../node_modules/next/dist/esm/lib/picocolors.js","../../../../node_modules/next/dist/esm/build/output/log.js","../../../../node_modules/next/dist/esm/server/response-cache/index.js","../../../../node_modules/next/src/client/components/app-router-headers.ts","../../../../node_modules/next/dist/esm/client/components/client-page.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/components/client-page.tsx","../../../../node_modules/next/dist/esm/client/components/client-segment.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/components/client-segment.tsx","../../../../node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/components/http-access-fallback/error-boundary.tsx","../../../../node_modules/next/dist/esm/client/components/layout-router.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/components/layout-router.tsx","../../../../node_modules/next/src/client/components/redirect-status-code.ts","../../../../node_modules/next/dist/esm/client/components/render-from-template-context.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/components/render-from-template-context.tsx","../../../../node_modules/next/src/lib/constants.ts","../../../../node_modules/next/src/lib/fallback.ts","../../../../node_modules/next/dist/esm/lib/framework/boundary-components.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/lib/framework/boundary-components.tsx","../../../../node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/lib/metadata/generate/icon-mark.tsx","../../../../node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-dom.ts","../../../../node_modules/next/src/lib/scheduler.ts","../../../../node_modules/next/src/lib/url.ts","../../../../node_modules/next/dist/esm/client/components/static-generation-bailout.js","../../../../node_modules/next/dist/esm/server/app-render/staged-rendering.js","../../../../node_modules/next/dist/esm/lib/metadata/metadata.js","../../../../node_modules/next/dist/esm/lib/metadata/resolve-metadata.js","../../../../node_modules/next/dist/esm/lib/metadata/generate/utils.js","../../../../node_modules/next/dist/esm/lib/metadata/resolvers/resolve-url.js","../../../../node_modules/next/dist/esm/lib/metadata/resolvers/resolve-title.js","../../../../node_modules/next/dist/esm/server/lib/app-dir-module.js","../../../../node_modules/next/dist/esm/client/components/hooks-server-context.js","../../../../node_modules/next/dist/esm/server/app-render/vary-params.js","../../../../node_modules/next/dist/esm/lib/client-and-server-references.js","../../../../node_modules/next/dist/esm/server/lib/router-utils/is-postpone.js","../../../../node_modules/next/dist/esm/server/request/search-params.js","../../../../node_modules/next/dist/esm/server/app-render/rsc/preloads.js","../../../../node_modules/next/dist/esm/server/app-render/create-error-handler.js","../../../../node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../node_modules/next/dist/esm/client/components/redirect-error.js","../../../../node_modules/next/dist/esm/server/lib/trace/span-store.js","../../../../node_modules/next/dist/esm/server/app-render/async-local-storage.js","../../../../node_modules/next/dist/esm/server/lib/clone-response.js","../../../../node_modules/next/dist/esm/server/lib/encode-header-safe.js","../../../../node_modules/next/dist/esm/server/app-render/entry-base.js","../../../../node_modules/next/dist/esm/lib/metadata/constants.js","../../../../node_modules/next/dist/esm/shared/lib/promise-with-resolvers.js","../../../../node_modules/next/dist/esm/lib/framework/boundary-constants.js","../../../../node_modules/next/dist/esm/server/app-render/instant-validation/boundary-constants.js","../../../../node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js","../../../../node_modules/next/dist/esm/lib/metadata/default-metadata.js","../../../../node_modules/next/dist/esm/server/lib/params-utils.js","../../../../node_modules/next/dist/esm/shared/lib/request-insights.js","../../../../node_modules/next/dist/esm/server/lib/trace/request-insights-identity.js","../../../../node_modules/next/dist/esm/server/create-deduped-by-callsite-server-error-logger.js","../../../../node_modules/next/dist/esm/server/app-render/encryption-utils.js","../../../../node_modules/next/dist/esm/server/request/utils.js","../../../../node_modules/next/dist/esm/server/use-cache/constants.js","../../../../node_modules/next/dist/esm/shared/lib/segment-cache/segment-value-encoding.js","../../../../node_modules/next/dist/esm/lib/metadata/resolvers/resolve-basics.js","../../../../node_modules/next/dist/esm/server/app-render/collect-segment-data.js","../../../../node_modules/next/dist/esm/server/dynamic-rendering-utils.js","../../../../node_modules/next/dist/esm/server/lib/trace/request-insights.js","../../../../node_modules/next/dist/esm/server/app-render/react-large-shell-error.js","../../../../node_modules/next/dist/esm/server/app-render/prospective-render-utils.js","../../../../node_modules/next/dist/esm/lib/metadata/resolvers/resolve-opengraph.js","../../../../node_modules/next/dist/esm/server/app-render/postponed-state.js","../../../../node_modules/next/dist/esm/lib/metadata/resolvers/resolve-icons.js","../../../../node_modules/next/dist/esm/server/lib/patch-fetch.js","../../../../node_modules/next/dist/esm/server/lib/lazy-result.js","../../../../node_modules/next/dist/esm/server/app-render/rsc/taint.js","../../../../node_modules/next/dist/esm/server/lib/dedupe-fetch.js","../../../../node_modules/next/dist/esm/server/request/pathname.js","../../../../node_modules/next/dist/esm/shared/lib/app-router-types.js","../../../../node_modules/next/dist/esm/server/resume-data-cache/cache-store.js","../../../../node_modules/next/dist/esm/client/components/is-next-router-error.js","../../../../node_modules/next/dist/esm/server/resume-data-cache/resume-data-cache.js","../../../../node_modules/next/dist/esm/server/request/params.js","../../../../node_modules/next/dist/esm/server/app-render/dynamic-rendering.js","../../../../node_modules/next/src/server/app-render/interop-default.ts","../../../../node_modules/next/src/server/app-render/strip-flight-headers.ts","../../../../node_modules/next/dist/esm/server/base-http/index.js","../../../../node_modules/next/dist/esm/server/base-http/node.js","../../../../node_modules/next/dist/esm/server/api-utils/index.js","../../../../node_modules/next/dist/esm/server/api-utils/get-cookie-parser.js","../../../../node_modules/next/src/server/instrumentation/utils.ts","../../../../node_modules/next/src/server/lib/experimental/ppr.ts","../../../../node_modules/next/src/server/lib/is-non-html-sec-fetch-dest.ts","../../../../node_modules/next/src/server/lib/is-rsc-request.ts","../../../../node_modules/next/src/server/lib/postponed-request-body.ts","../../../../node_modules/next/src/server/lib/server-action-request-meta.ts","../../../../node_modules/next/src/server/lib/streaming-metadata.ts","../../../../node_modules/next/src/server/lib/trace/constants.ts","../../../../node_modules/next/src/server/request-meta.ts","../../../../node_modules/next/dist/esm/shared/lib/router/routes/app.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/parse-loader-tree.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/interception-prefix-from-param-type.js","../../../../node_modules/next/dist/esm/server/app-render/get-short-dynamic-param-type.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/resolve-param-value.js","../../../../node_modules/next/dist/esm/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js","../../../../node_modules/next/dist/esm/server/request/fallback-params.js","../../../../node_modules/next/dist/esm/build/static-paths/utils.js","../../../../node_modules/next/src/server/response-cache/types.ts","../../../../node_modules/next/src/server/route-kind.ts","../../../../node_modules/next/dist/esm/server/lib/cache-control.js","../../../../node_modules/next/dist/esm/server/send-payload.js","../../../../node_modules/next/dist/esm/shared/lib/utils.js","../../../../node_modules/next/dist/esm/server/lib/etag.js","../../../../node_modules/next/src/server/stream-utils/encoded-tags.ts","../../../../node_modules/next/dist/esm/server/stream-utils/node-web-streams-helper.js","../../../../node_modules/next/dist/esm/server/web/spec-extension/adapters/next-request.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js","../../../../node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js","../../../../node_modules/next/dist/esm/server/client-component-renderer-logger.js","../../../../node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js","../../../../node_modules/next/dist/esm/server/web/error.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/cache-busting-search-param.js","../../../../node_modules/next/dist/esm/server/render-result.js","../../../../node_modules/next/dist/esm/server/web/spec-extension/request.js","../../../../node_modules/next/dist/esm/server/pipe-readable.js","../../../../node_modules/next/dist/esm/server/web/next-url.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js","../../../../node_modules/next/dist/esm/shared/lib/get-hostname.js","../../../../node_modules/next/dist/esm/lib/detached-promise.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js","../../../../node_modules/next/dist/esm/server/web/utils.js","../../../../node_modules/next/dist/esm/server/base-http/helpers.js","../../../../node_modules/next/dist/esm/server/app-render/instant-validation/instant-validation-error.js","../../../../node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js","../../../../node_modules/next/dist/esm/server/app-render/instant-validation/instant-samples.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/querystring.js","../../../../node_modules/next/dist/esm/shared/lib/action-revalidation-kind.js","../../../../node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/parse-relative-url.js","../../../../node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js","../../../../node_modules/next/src/server/web/spec-extension/cookies.ts","../../../../node_modules/next/src/shared/lib/entry-constants.ts","../../../../node_modules/next/src/shared/lib/invariant-error.ts","../../../../node_modules/next/dist/esm/shared/lib/segment.js","../../../../node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js","../../../../node_modules/next/src/shared/lib/router/utils/get-segment-param.tsx","../../../../node_modules/next/src/shared/lib/router/utils/interception-routes.ts","../../../../node_modules/next/dist/esm/shared/lib/router/utils/is-bot.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/html-bots.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js","../../../../node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js","../../../../node_modules/next/dist/esm/server/app-render/manifests-singleton.js","../../../../node_modules/next/dist/esm/shared/lib/server-reference-info.js","../../../../node_modules/next/src/shared/lib/size-limit.ts","../../../../node_modules/next/src/shared/lib/utils/reflect-utils.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.ts"],"sourcesContent":["/**\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","/**\n * @license React\n * react-server-dom-turbopack-client.node.production.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\";\nvar util = require(\"util\"),\n ReactDOM = require(\"react-dom\"),\n decoderOptions = { stream: !0 },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction 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}\nfunction 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}\nfunction 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}\nvar instrumentedChunks = new WeakSet(),\n loadedChunks = new WeakSet();\nfunction ignoreReject() {}\nfunction preloadModule(metadata) {\n for (var chunks = metadata[1], promises = [], i = 0; i < chunks.length; i++) {\n var thenable = globalThis.__next_chunk_load__(chunks[i]);\n loadedChunks.has(thenable) || promises.push(thenable);\n if (!instrumentedChunks.has(thenable)) {\n var resolve = loadedChunks.add.bind(loadedChunks, thenable);\n thenable.then(resolve, ignoreReject);\n instrumentedChunks.add(thenable);\n }\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}\nfunction 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}\nfunction prepareDestinationWithChunks(moduleLoading, chunks, nonce$jscomp$0) {\n if (null !== moduleLoading)\n for (var i = 0; i < chunks.length; i++) {\n var chunk = chunks[i],\n nonce = nonce$jscomp$0,\n JSCompiler_temp_const = ReactDOMSharedInternals.d,\n JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X;\n chunk =\n moduleLoading.prefix + (\"string\" === typeof chunk ? chunk : chunk[0]);\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(JSCompiler_temp_const, chunk, {\n crossOrigin: JSCompiler_inline_result,\n integrity: void 0,\n fetchPriority: void 0,\n nonce: nonce\n });\n }\n}\nvar 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_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ASYNC_ITERATOR = Symbol.asyncIterator,\n isArrayImpl = Array.isArray,\n getPrototypeOf = Object.getPrototypeOf,\n ObjectPrototype$1 = Object.prototype,\n knownServerReferences = new WeakMap();\nfunction 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}\nfunction 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$21 = JSON.stringify(entry.value, resolveToJSON);\n data.append(formFieldPrefix + streamId, partJSON$21);\n iterator.next().then(progress, reject);\n } catch (x$22) {\n reject(x$22);\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 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 );\n case REACT_LAZY_TYPE:\n parentReference = value._payload;\n var init = value._init;\n null === formData && (formData = new FormData());\n pendingParts++;\n try {\n var resolvedModel = init(parentReference),\n lazyId = nextPartId++,\n partJSON = serializeModel(resolvedModel, 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$23 = nextPartId++;\n parentReference = function () {\n try {\n var partJSON$24 = serializeModel(value, lazyId$23),\n data$25 = formData;\n data$25.append(formFieldPrefix + lazyId$23, partJSON$24);\n pendingParts--;\n 0 === pendingParts && resolve(data$25);\n } catch (reason) {\n reject(reason);\n }\n };\n x.then(parentReference, parentReference);\n return \"$\" + lazyId$23.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 partJSON$27 =\n void 0 !== previousReference\n ? JSON.stringify(previousReference)\n : serializeModel(partValue, promiseId);\n partValue = formData;\n partValue.append(formFieldPrefix + promiseId, partJSON$27);\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 ((key = parentReference + \":\" + key),\n writtenObjects.set(value, key),\n void 0 !== temporaryReferences &&\n temporaryReferences.set(key, value)));\n if (isArrayImpl(value)) return value;\n if (value instanceof FormData) {\n null === formData && (formData = new FormData());\n var data$31 = formData;\n key = nextPartId++;\n var prefix = formFieldPrefix + \"_\" + key + \"_\";\n value.forEach(function (originalValue, originalKey) {\n data$31.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) return serializeTypedArray(\"O\", value);\n if (value instanceof Uint8Array) return serializeTypedArray(\"o\", value);\n if (value instanceof Uint8ClampedArray)\n return serializeTypedArray(\"U\", value);\n if (value instanceof Int16Array) return serializeTypedArray(\"S\", value);\n if (value instanceof Uint16Array) return serializeTypedArray(\"s\", value);\n if (value instanceof Int32Array) return serializeTypedArray(\"L\", value);\n if (value instanceof Uint32Array) return serializeTypedArray(\"l\", value);\n if (value instanceof Float32Array) return serializeTypedArray(\"G\", value);\n if (value instanceof Float64Array) 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 ((key = getIteratorFn(value)))\n return (\n (parentReference = key.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 key = value[ASYNC_ITERATOR];\n if (\"function\" === typeof key)\n return serializeAsyncIterable(value, key.call(value));\n key = getPrototypeOf(value);\n if (\n key !== ObjectPrototype$1 &&\n (null === key || null !== getPrototypeOf(key))\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 );\n return \"$T\";\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 );\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 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}\nvar boundCache = new WeakMap();\nfunction 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}\nfunction 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}\nfunction 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}\nfunction registerBoundServerReference(reference, id, bound, encodeFormAction) {\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 && (boundPromise = Promise.resolve([]));\n return encodeFormAction(referenceClosure.id, boundPromise);\n }\n },\n $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },\n bind: { value: bind }\n }));\n}\nvar FunctionBind = Function.prototype.bind,\n ArraySlice = Array.prototype.slice;\nfunction bind() {\n var referenceClosure = knownServerReferences.get(this);\n if (!referenceClosure) return FunctionBind.apply(this, arguments);\n var newFn = referenceClosure.originalBind.apply(this, arguments),\n 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}\nfunction createBoundServerReference(metaData, callServer, encodeFormAction) {\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 registerBoundServerReference(action, id, bound, encodeFormAction);\n return action;\n}\nfunction createServerReference$1(id, callServer, encodeFormAction) {\n function action() {\n var args = Array.prototype.slice.call(arguments);\n return callServer(id, args);\n }\n registerBoundServerReference(action, id, null, encodeFormAction);\n return action;\n}\nvar ObjectPrototype = Object.prototype,\n ArrayPrototype = Array.prototype;\nfunction ReactPromise(status, value, reason) {\n this.status = status;\n this.value = value;\n this.reason = reason;\n}\nReactPromise.prototype = Object.create(Promise.prototype);\nObject.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 break;\n case \"resolved_module\":\n initializeModuleChunk(this);\n }\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 = []), 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});\nfunction 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}\nfunction createPendingChunk() {\n return new ReactPromise(\"pending\", null, null);\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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(response, listener, cyclicHandler.value, chunk),\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 && rejectChunk(response, rejectListeners, chunk.reason);\n }\n}\nfunction 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}\nfunction createResolvedIteratorResultChunk(response, value, done) {\n return new ReactPromise(\n \"resolved_model\",\n (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') + value + \"}\",\n response\n );\n}\nfunction resolveIteratorResultChunk(response, chunk, value, done) {\n resolveModelChunk(\n response,\n chunk,\n (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') + value + \"}\"\n );\n}\nfunction resolveModelChunk(response, chunk, value) {\n if (\"pending\" !== chunk.status) chunk.reason.enqueueModel(value);\n else {\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}\nfunction resolveModuleChunk(response, chunk, value) {\n if (\"pending\" === chunk.status || \"blocked\" === chunk.status) {\n var resolveListeners = chunk.value,\n rejectListeners = chunk.reason;\n chunk.status = \"resolved_module\";\n chunk.value = value;\n chunk.reason = null;\n null !== resolveListeners &&\n (initializeModuleChunk(chunk),\n wakeChunkIfInitialized(\n response,\n chunk,\n resolveListeners,\n rejectListeners\n ));\n }\n}\nvar initializingHandler = null;\nfunction initializeModelChunk(chunk) {\n var prevHandler = initializingHandler;\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 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 } catch (error) {\n (chunk.status = \"rejected\"), (chunk.reason = error);\n } finally {\n initializingHandler = prevHandler;\n }\n}\nfunction 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}\nfunction reportGlobalError(weakResponse, error) {\n weakResponse._closed = !0;\n weakResponse._closedReason = error;\n weakResponse._chunks.forEach(function (chunk) {\n \"pending\" === chunk.status\n ? triggerErrorOnChunk(weakResponse, chunk, error)\n : \"fulfilled\" === chunk.status &&\n null !== chunk.reason &&\n chunk.reason.error(error);\n });\n}\nfunction createLazyChunkWrapper(chunk) {\n return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk };\n}\nfunction 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()),\n (response.status = \"halted\"),\n (response.value = null),\n (response.reason = null))\n : (chunk = new ReactPromise(\"rejected\", null, response._closedReason))\n : (chunk = createPendingChunk()),\n chunks.set(id, chunk));\n return chunk;\n}\nfunction fulfillReference(response, reference, value) {\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$44 = value._payload;\n if (referencedChunk$44 === handler.chunk) value = handler.value;\n else {\n switch (referencedChunk$44.status) {\n case \"resolved_model\":\n initializeModelChunk(referencedChunk$44);\n break;\n case \"resolved_module\":\n initializeModuleChunk(referencedChunk$44);\n }\n switch (referencedChunk$44.status) {\n case \"fulfilled\":\n value = referencedChunk$44.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 element.props = mappedValue;\n }\n }\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 && wakeChunk(response, value, handler.value, reference)));\n}\nfunction 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}\nfunction waitForReference(\n referencedChunk,\n parentObject,\n key,\n response,\n map,\n path\n) {\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 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}\nfunction loadServerReference(response, metaData, parentObject, key) {\n if (!response._serverReferenceConfig)\n return createBoundServerReference(\n metaData,\n response._callServer,\n response._encodeFormAction\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 && null === handler.value && (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 }\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 },\n function (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 );\n return null;\n}\nfunction getOutlinedModel(response, reference, parentObject, key, map) {\n reference = reference.split(\":\");\n var id = parseInt(reference[0], 16);\n id = getChunk(response, id);\n switch (id.status) {\n case \"resolved_model\":\n initializeModelChunk(id);\n break;\n case \"resolved_module\":\n initializeModuleChunk(id);\n }\n switch (id.status) {\n case \"fulfilled\":\n id = id.value;\n for (var i = 1; i < reference.length; i++) {\n for (\n ;\n \"object\" === typeof id &&\n null !== id &&\n id.$$typeof === REACT_LAZY_TYPE;\n\n ) {\n id = id._payload;\n switch (id.status) {\n case \"resolved_model\":\n initializeModelChunk(id);\n break;\n case \"resolved_module\":\n initializeModuleChunk(id);\n }\n switch (id.status) {\n case \"fulfilled\":\n id = id.value;\n break;\n case \"blocked\":\n case \"pending\":\n return waitForReference(\n id,\n parentObject,\n key,\n response,\n map,\n reference.slice(i - 1)\n );\n case \"halted\":\n return (\n initializingHandler\n ? ((response = initializingHandler), response.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 = id.reason))\n : (initializingHandler = {\n parent: null,\n chunk: null,\n value: null,\n reason: id.reason,\n deps: 0,\n errored: !0\n }),\n null\n );\n }\n }\n var name = reference[i];\n if (\n \"object\" !== typeof id ||\n null === id ||\n (getPrototypeOf(id) !== ObjectPrototype &&\n getPrototypeOf(id) !== ArrayPrototype) ||\n !hasOwnProperty.call(id, name)\n )\n throw Error(\"Invalid reference.\");\n id = id[name];\n }\n for (\n ;\n \"object\" === typeof id &&\n null !== id &&\n id.$$typeof === REACT_LAZY_TYPE;\n\n ) {\n reference = id._payload;\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 id = reference.value;\n continue;\n }\n break;\n }\n return map(response, id, parentObject, key);\n case \"pending\":\n case \"blocked\":\n return waitForReference(id, parentObject, key, response, map, reference);\n case \"halted\":\n return (\n initializingHandler\n ? ((response = initializingHandler), response.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 = id.reason))\n : (initializingHandler = {\n parent: null,\n chunk: null,\n value: null,\n reason: id.reason,\n deps: 0,\n errored: !0\n }),\n null\n );\n }\n}\nfunction createMap(response, model) {\n return new Map(model);\n}\nfunction createSet(response, model) {\n return new Set(model);\n}\nfunction createBlob(response, model) {\n return new Blob(model.slice(1), { type: model[0] });\n}\nfunction 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}\nfunction extractIterator(response, model) {\n return model[Symbol.iterator]();\n}\nfunction createModel(response, model) {\n return model;\n}\nfunction 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 createLazyChunkWrapper(response)\n );\n case \"@\":\n return (\n (parentObject = parseInt(value.slice(2), 16)),\n getChunk(response, parentObject)\n );\n case \"S\":\n return Symbol.for(value.slice(2));\n case \"h\":\n return (\n (value = value.slice(2)),\n getOutlinedModel(\n response,\n value,\n parentObject,\n key,\n loadServerReference\n )\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 (value = value.slice(2)),\n getOutlinedModel(response, value, parentObject, key, createMap)\n );\n case \"W\":\n return (\n (value = value.slice(2)),\n getOutlinedModel(response, value, parentObject, key, createSet)\n );\n case \"B\":\n return (\n (value = value.slice(2)),\n getOutlinedModel(response, value, parentObject, key, createBlob)\n );\n case \"K\":\n return (\n (value = value.slice(2)),\n getOutlinedModel(response, value, parentObject, key, createFormData)\n );\n case \"Z\":\n return resolveErrorProd();\n case \"i\":\n return (\n (value = value.slice(2)),\n getOutlinedModel(response, value, parentObject, key, extractIterator)\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 default:\n return (\n (value = value.slice(1)),\n getOutlinedModel(response, value, parentObject, key, createModel)\n );\n }\n }\n return value;\n}\nfunction 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}\nfunction ResponseInstance(\n bundlerConfig,\n serverReferenceConfig,\n moduleLoading,\n callServer,\n encodeFormAction,\n nonce,\n temporaryReferences,\n allowPartialStream\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}\nfunction createStreamState() {\n return { _rowState: 0, _rowID: 0, _rowTag: 0, _rowLength: 0, _buffer: [] };\n}\nfunction resolveBuffer(response, id, buffer) {\n response = response._chunks;\n var chunk = response.get(id);\n chunk && \"pending\" !== chunk.status\n ? chunk.reason.enqueueValue(buffer)\n : ((buffer = new ReactPromise(\"fulfilled\", buffer, null)),\n response.set(id, buffer));\n}\nfunction resolveModule(response, id, model) {\n var chunks = response._chunks,\n chunk = chunks.get(id);\n model = parseModel(response, model);\n var clientReference = resolveClientReference(response._bundlerConfig, model);\n prepareDestinationWithChunks(\n response._moduleLoading,\n model[1],\n response._nonce\n );\n if ((model = preloadModule(clientReference))) {\n if (chunk) {\n var blockedChunk = chunk;\n blockedChunk.status = \"blocked\";\n } else\n (blockedChunk = new ReactPromise(\"blocked\", null, null)),\n chunks.set(id, 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 ? resolveModuleChunk(response, chunk, clientReference)\n : ((chunk = new ReactPromise(\"resolved_module\", clientReference, null)),\n chunks.set(id, chunk));\n}\nfunction resolveStream(response, id, stream, controller) {\n var chunks = response._chunks,\n chunk = chunks.get(id);\n chunk\n ? \"pending\" === chunk.status &&\n ((id = chunk.value),\n (chunk.status = \"fulfilled\"),\n (chunk.value = stream),\n (chunk.reason = controller),\n null !== id && wakeChunk(response, id, chunk.value, chunk))\n : ((response = new ReactPromise(\"fulfilled\", stream, controller)),\n chunks.set(id, response));\n}\nfunction startReadableStream(response, id, type) {\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(response, id, type, {\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 = new ReactPromise(\"resolved_model\", json, response);\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 chunk$55 = createPendingChunk();\n chunk$55.then(\n function (v) {\n return controller.enqueue(v);\n },\n function (e) {\n return controller.error(e);\n }\n );\n previousBlockedChunk = chunk$55;\n chunk.then(function () {\n previousBlockedChunk === chunk$55 && (previousBlockedChunk = null);\n resolveModelChunk(response, chunk$55, json);\n });\n }\n },\n close: function () {\n if (!closed)\n if (((closed = !0), null === previousBlockedChunk)) 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}\nfunction asyncIterator() {\n return this;\n}\nfunction createIterator(next) {\n next = { next: next };\n next[ASYNC_ITERATOR] = asyncIterator;\n return next;\n}\nfunction startAsyncIterable(response, id, iterator) {\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();\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] = 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] = createPendingChunk());\n nextWriteIndex < buffer.length;\n\n )\n triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);\n }\n }\n );\n}\nfunction resolveErrorProd() {\n var error = Error(\n \"An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.\"\n );\n error.stack = \"Error: \" + error.message;\n return error;\n}\nfunction mergeBuffer(buffer, lastChunk) {\n for (var l = buffer.length, byteLength = lastChunk.length, i = 0; i < l; i++)\n byteLength += buffer[i].byteLength;\n byteLength = new Uint8Array(byteLength);\n for (var i$56 = (i = 0); i$56 < l; i$56++) {\n var chunk = buffer[i$56];\n byteLength.set(chunk, i);\n i += chunk.byteLength;\n }\n byteLength.set(lastChunk, i);\n return byteLength;\n}\nfunction resolveTypedArray(\n response,\n id,\n buffer,\n lastChunk,\n constructor,\n bytesPerElement\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);\n}\nfunction processFullBinaryRow(response, streamState, id, tag, buffer, chunk) {\n switch (tag) {\n case 65:\n resolveBuffer(response, id, mergeBuffer(buffer, chunk).buffer);\n return;\n case 79:\n resolveTypedArray(response, id, buffer, chunk, Int8Array, 1);\n return;\n case 111:\n resolveBuffer(\n response,\n id,\n 0 === buffer.length ? chunk : mergeBuffer(buffer, chunk)\n );\n return;\n case 85:\n resolveTypedArray(response, id, buffer, chunk, Uint8ClampedArray, 1);\n return;\n case 83:\n resolveTypedArray(response, id, buffer, chunk, Int16Array, 2);\n return;\n case 115:\n resolveTypedArray(response, id, buffer, chunk, Uint16Array, 2);\n return;\n case 76:\n resolveTypedArray(response, id, buffer, chunk, Int32Array, 4);\n return;\n case 108:\n resolveTypedArray(response, id, buffer, chunk, Uint32Array, 4);\n return;\n case 71:\n resolveTypedArray(response, id, buffer, chunk, Float32Array, 4);\n return;\n case 103:\n resolveTypedArray(response, id, buffer, chunk, Float64Array, 8);\n return;\n case 77:\n resolveTypedArray(response, id, buffer, chunk, BigInt64Array, 8);\n return;\n case 109:\n resolveTypedArray(response, id, buffer, chunk, BigUint64Array, 8);\n return;\n case 86:\n resolveTypedArray(response, id, buffer, chunk, DataView, 1);\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}\nfunction processFullStringRow(response, streamState, id, tag, row) {\n switch (tag) {\n case 73:\n resolveModule(response, id, row);\n break;\n case 72:\n id = row[0];\n row = row.slice(1);\n response = parseModel(response, row);\n row = ReactDOMSharedInternals.d;\n switch (id) {\n case \"D\":\n row.D(response);\n break;\n case \"C\":\n \"string\" === typeof response\n ? row.C(response)\n : row.C(response[0], response[1]);\n break;\n case \"L\":\n id = response[0];\n streamState = response[1];\n 3 === response.length\n ? row.L(id, streamState, response[2])\n : row.L(id, streamState);\n break;\n case \"m\":\n \"string\" === typeof response\n ? row.m(response)\n : row.m(response[0], response[1]);\n break;\n case \"X\":\n \"string\" === typeof response\n ? row.X(response)\n : row.X(response[0], response[1]);\n break;\n case \"S\":\n \"string\" === typeof response\n ? row.S(response)\n : row.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 ? row.M(response)\n : row.M(response[0], response[1]);\n }\n break;\n case 69:\n streamState = response._chunks;\n tag = streamState.get(id);\n row = JSON.parse(row);\n var error = resolveErrorProd();\n error.digest = row.digest;\n tag\n ? triggerErrorOnChunk(response, tag, error)\n : ((response = new ReactPromise(\"rejected\", null, error)),\n streamState.set(id, response));\n break;\n case 84:\n response = response._chunks;\n (streamState = response.get(id)) && \"pending\" !== streamState.status\n ? streamState.reason.enqueueValue(row)\n : ((row = new ReactPromise(\"fulfilled\", row, null)),\n response.set(id, row));\n break;\n case 78:\n case 68:\n case 74:\n case 87:\n throw Error(\n \"Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.\"\n );\n case 82:\n startReadableStream(response, id, void 0);\n break;\n case 114:\n startReadableStream(response, id, \"bytes\");\n break;\n case 88:\n startAsyncIterable(response, id, !1);\n break;\n case 120:\n startAsyncIterable(response, id, !0);\n break;\n case 67:\n (id = response._chunks.get(id)) &&\n \"fulfilled\" === id.status &&\n id.reason.close(\"\" === row ? '\"$undefined\"' : row);\n break;\n default:\n (streamState = response._chunks),\n (tag = streamState.get(id))\n ? resolveModelChunk(response, tag, row)\n : ((response = new ReactPromise(\"resolved_model\", row, response)),\n streamState.set(id, response));\n }\n}\nfunction processBinaryChunk(weakResponse, streamState, chunk) {\n for (\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 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) | (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) | (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), 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 )\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))\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}\nfunction parseModel(response, json) {\n json = JSON.parse(json);\n return reviveModel(response, json, { \"\": json }, \"\");\n}\nfunction 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 return value[0] === REACT_ELEMENT_TYPE\n ? (value[0] === REACT_ELEMENT_TYPE\n ? ((response = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: value[1],\n key: value[2],\n ref: null,\n props: value[3]\n }),\n null !== initializingHandler &&\n ((value = initializingHandler),\n (initializingHandler = value.parent),\n value.errored\n ? ((response = new ReactPromise(\n \"rejected\",\n null,\n value.reason\n )),\n (response = createLazyChunkWrapper(response)))\n : 0 < value.deps &&\n ((i = new ReactPromise(\"blocked\", null, null)),\n (value.value = response),\n (value.chunk = i),\n (response = createLazyChunkWrapper(i)))))\n : (response = value),\n response)\n : 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}\nfunction close(weakResponse) {\n weakResponse._allowPartialStream\n ? ((weakResponse._closed = !0),\n weakResponse._chunks.forEach(function (chunk) {\n \"pending\" === chunk.status\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 : reportGlobalError(weakResponse, Error(\"Connection closed.\"));\n}\nfunction 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}\nfunction createResponseFromOptions(options) {\n return new ResponseInstance(\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 );\n}\nfunction startReadingFromStream$1(response, stream, onDone) {\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(),\n reader = stream.getReader();\n reader.read().then(progress).catch(error);\n}\nfunction 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}\nfunction startReadingFromStream(response, stream, onEnd) {\n var streamState = createStreamState();\n stream.on(\"data\", function (chunk) {\n if (\"string\" === typeof chunk) {\n for (\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 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) | (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 } else processBinaryChunk(response, streamState, chunk);\n });\n stream.on(\"error\", function (error) {\n reportGlobalError(response, error);\n });\n stream.on(\"end\", onEnd);\n}\nexports.createFromFetch = function (promiseForResponse, options) {\n var response = createResponseFromOptions(options);\n promiseForResponse.then(\n function (r) {\n startReadingFromStream$1(response, r.body, close.bind(null, response));\n },\n function (e) {\n reportGlobalError(response, e);\n }\n );\n return getChunk(response, 0);\n};\nexports.createFromNodeStream = function (\n stream,\n serverConsumerManifest,\n options\n) {\n serverConsumerManifest = new ResponseInstance(\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 );\n startReadingFromStream(\n serverConsumerManifest,\n stream,\n close.bind(null, serverConsumerManifest)\n );\n return getChunk(serverConsumerManifest, 0);\n};\nexports.createFromReadableStream = function (stream, options) {\n options = createResponseFromOptions(options);\n startReadingFromStream$1(options, stream, close.bind(null, options));\n return getChunk(options, 0);\n};\nexports.createServerReference = function (id) {\n return createServerReference$1(id, noServerCall$1);\n};\nexports.createTemporaryReferenceSet = function () {\n return new Map();\n};\nexports.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};\nexports.registerServerReference = function (reference, id, encodeFormAction) {\n registerBoundServerReference(reference, id, null, encodeFormAction);\n return reference;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.js');\n} else {\n module.exports = require('./cjs/react-server-dom-turbopack-client.node.development.js');\n}\n","(()=>{\"use strict\";var e={912:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(108);const a=r(221);const o=r(44);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},44:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(757);const a=r(412);const o=r(711);const i=r(221);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"<failed to generate stacktrace>\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},262:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(586);const a=r(221);const o=r(44);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},25:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(221);const a=r(19);const o=r(92);const i=r(398);const c=r(504);const s=r(44);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},397:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(221);const a=r(498);const o=r(477);const i=r(793);const c=r(44);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},398:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(912);const a=r(23);const o=(0,a.createContextKey)(\"OpenTelemetry Baggage Key\");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},152:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},647:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol(\"BaggageEntryMetadata\")},504:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(44);const a=r(152);const o=r(647);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!==\"string\"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=\"\"}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},778:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.context=void 0;const n=r(912);t.context=n.ContextAPI.getInstance()},108:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopContextManager=void 0;const n=r(23);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},23:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},304:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.diag=void 0;const n=r(44);t.diag=n.DiagAPI.instance()},757:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagComponentLogger=void 0;const n=r(221);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||\"DiagComponentLogger\"}debug(...e){return logProxy(\"debug\",this._namespace,e)}error(...e){return logProxy(\"error\",this._namespace,e)}info(...e){return logProxy(\"info\",this._namespace,e)}warn(...e){return logProxy(\"warn\",this._namespace,e)}verbose(...e){return logProxy(\"verbose\",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)(\"diag\");if(!a){return}r.unshift(t);return a[e](...r)}},83:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:\"error\",c:\"error\"},{n:\"warn\",c:\"warn\"},{n:\"info\",c:\"info\"},{n:\"debug\",c:\"debug\"},{n:\"verbose\",c:\"trace\"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!==\"function\"){r=console.log}if(typeof r===\"function\"){return r.apply(console,t)}}}}for(let e=0;e<r.length;e++){this[r[e].n]=_consoleFunc(r[e].c)}}}t.DiagConsoleLogger=DiagConsoleLogger},412:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(711);function createLogLevelDiagLogger(e,t){if(e<n.DiagLogLevel.NONE){e=n.DiagLogLevel.NONE}else if(e>n.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a===\"function\"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc(\"error\",n.DiagLogLevel.ERROR),warn:_filterFunc(\"warn\",n.DiagLogLevel.WARN),info:_filterFunc(\"info\",n.DiagLogLevel.INFO),debug:_filterFunc(\"debug\",n.DiagLogLevel.DEBUG),verbose:_filterFunc(\"verbose\",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},711:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"ERROR\"]=30]=\"ERROR\";e[e[\"WARN\"]=50]=\"WARN\";e[e[\"INFO\"]=60]=\"INFO\";e[e[\"DEBUG\"]=70]=\"DEBUG\";e[e[\"VERBOSE\"]=80]=\"VERBOSE\";e[e[\"ALL\"]=9999]=\"ALL\"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},221:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(678);const a=r(652);const o=r(662);const i=a.VERSION.split(\".\")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},662:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(652);const a=/^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},120:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.metrics=void 0;const n=r(262);t.metrics=n.MetricsAPI.getInstance()},532:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ValueType=void 0;var r;(function(e){e[e[\"INT\"]=0]=\"INT\";e[e[\"DOUBLE\"]=1]=\"DOUBLE\"})(r=t.ValueType||(t.ValueType={}))},440:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},586:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(440);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},678:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(59),t)},460:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},59:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(460),t)},27:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.propagation=void 0;const n=r(25);t.propagation=n.PropagationAPI.getInstance()},19:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},92:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},816:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.trace=void 0;const n=r(397);t.trace=n.TraceAPI.getInstance()},374:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NonRecordingSpan=void 0;const n=r(546);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},637:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracer=void 0;const n=r(912);const a=r(793);const o=r(374);const i=r(477);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e===\"object\"&&typeof e[\"spanId\"]===\"string\"&&typeof e[\"traceId\"]===\"string\"&&typeof e[\"traceFlags\"]===\"number\"}},76:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracerProvider=void 0;const n=r(637);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},779:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracer=void 0;const n=r(637);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},498:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracerProvider=void 0;const n=r(779);const a=r(76);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},312:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e[\"NOT_RECORD\"]=0]=\"NOT_RECORD\";e[e[\"RECORD\"]=1]=\"RECORD\";e[e[\"RECORD_AND_SAMPLED\"]=2]=\"RECORD_AND_SAMPLED\"})(r=t.SamplingDecision||(t.SamplingDecision={}))},793:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(23);const a=r(374);const o=r(912);const i=(0,n.createContextKey)(\"OpenTelemetry Context Key SPAN\");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},285:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceStateImpl=void 0;const n=r(240);const a=32;const o=512;const i=\",\";const c=\"=\";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},240:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.validateValue=t.validateKey=void 0;const r=\"[_0-9a-z-*/]\";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},87:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createTraceState=void 0;const n=r(285);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},546:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(731);t.INVALID_SPANID=\"0000000000000000\";t.INVALID_TRACEID=\"00000000000000000000000000000000\";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},613:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanKind=void 0;var r;(function(e){e[e[\"INTERNAL\"]=0]=\"INTERNAL\";e[e[\"SERVER\"]=1]=\"SERVER\";e[e[\"CLIENT\"]=2]=\"CLIENT\";e[e[\"PRODUCER\"]=3]=\"PRODUCER\";e[e[\"CONSUMER\"]=4]=\"CONSUMER\"})(r=t.SpanKind||(t.SpanKind={}))},477:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(546);const a=r(374);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},854:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e[\"UNSET\"]=0]=\"UNSET\";e[e[\"OK\"]=1]=\"OK\";e[e[\"ERROR\"]=2]=\"ERROR\"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},731:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"SAMPLED\"]=1]=\"SAMPLED\"})(r=t.TraceFlags||(t.TraceFlags={}))},652:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.VERSION=void 0;t.VERSION=\"1.6.0\"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var r={};(()=>{var e=r;Object.defineProperty(e,\"__esModule\",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(504);Object.defineProperty(e,\"baggageEntryMetadataFromString\",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(23);Object.defineProperty(e,\"createContextKey\",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,\"ROOT_CONTEXT\",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(83);Object.defineProperty(e,\"DiagConsoleLogger\",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(711);Object.defineProperty(e,\"DiagLogLevel\",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(440);Object.defineProperty(e,\"createNoopMeter\",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(532);Object.defineProperty(e,\"ValueType\",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(92);Object.defineProperty(e,\"defaultTextMapGetter\",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,\"defaultTextMapSetter\",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(779);Object.defineProperty(e,\"ProxyTracer\",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(498);Object.defineProperty(e,\"ProxyTracerProvider\",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(312);Object.defineProperty(e,\"SamplingDecision\",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(613);Object.defineProperty(e,\"SpanKind\",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(854);Object.defineProperty(e,\"SpanStatusCode\",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(731);Object.defineProperty(e,\"TraceFlags\",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(87);Object.defineProperty(e,\"createTraceState\",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(477);Object.defineProperty(e,\"isSpanContextValid\",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,\"isValidTraceId\",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,\"isValidSpanId\",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(546);Object.defineProperty(e,\"INVALID_SPANID\",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,\"INVALID_TRACEID\",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,\"INVALID_SPAN_CONTEXT\",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(778);Object.defineProperty(e,\"context\",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(304);Object.defineProperty(e,\"diag\",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(120);Object.defineProperty(e,\"metrics\",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(27);Object.defineProperty(e,\"propagation\",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(816);Object.defineProperty(e,\"trace\",{enumerable:true,get:function(){return C.trace}});e[\"default\"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();","import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants';\nimport { isThenable } from '../../../shared/lib/is-thenable';\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nconst LOCAL_SPAN_RECORDER_KEY = Symbol.for('@next/local-span-recorder');\nlet api;\nfunction getLocalSpanRecorder() {\n if (process.env.__NEXT_DEV_SERVER) {\n return globalThis[LOCAL_SPAN_RECORDER_KEY];\n } else {\n return undefined;\n }\n}\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api');\n} else {\n try {\n api = require('@opentelemetry/api');\n } catch (err) {\n api = require('next/dist/compiled/@opentelemetry/api');\n }\n}\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api;\nexport class BubbledError extends Error {\n constructor(bubble, result){\n super(), this.bubble = bubble, this.result = result;\n }\n}\nexport function isBubbledError(error) {\n if (typeof error !== 'object' || error === null) return false;\n return error instanceof BubbledError;\n}\nconst closeSpanWithError = (span, error)=>{\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true);\n } else {\n if (error) {\n span.recordException(error);\n span.setAttribute('error.type', error.name);\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error == null ? void 0 : error.message\n });\n }\n span.end();\n};\n/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map();\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId');\nlet lastSpanId = 0;\nconst getSpanId = ()=>lastSpanId++;\nconst clientTraceDataSetter = {\n set (carrier, key, value) {\n carrier.push({\n key,\n value\n });\n }\n};\nclass NextTracerImpl {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */ getTracerInstance() {\n return trace.getTracer('next.js', '0.0.1');\n }\n isOpenTelemetryEnabled() {\n var _tracerProvider_getDelegate_constructor, _tracerProvider_getDelegate;\n const activeSpan = trace.getSpan(context.active());\n if (activeSpan == null ? void 0 : activeSpan.isRecording()) {\n return true;\n }\n const tracerProvider = trace.getTracerProvider();\n if (!('getDelegate' in tracerProvider)) {\n return true;\n }\n return (tracerProvider.getDelegate == null ? void 0 : (_tracerProvider_getDelegate = tracerProvider.getDelegate.call(tracerProvider)) == null ? void 0 : (_tracerProvider_getDelegate_constructor = _tracerProvider_getDelegate.constructor) == null ? void 0 : _tracerProvider_getDelegate_constructor.name) !== 'NoopTracerProvider';\n }\n getContext() {\n return context;\n }\n getTracePropagationData() {\n const activeContext = context.active();\n const entries = [];\n propagation.inject(activeContext, entries, clientTraceDataSetter);\n return entries;\n }\n getActiveScopeSpan() {\n const localSpanRecorder = getLocalSpanRecorder();\n const activeLocalSpan = localSpanRecorder == null ? void 0 : localSpanRecorder.getActiveLocalSpan();\n if (activeLocalSpan && (localSpanRecorder == null ? void 0 : localSpanRecorder.isOpenTelemetryIsolatedSpan(activeLocalSpan))) {\n return activeLocalSpan;\n }\n const activeSpan = trace.getSpan(context.active());\n if (activeSpan || !process.env.__NEXT_DEV_SERVER) {\n return activeSpan;\n }\n return activeLocalSpan;\n }\n /**\n * Run `fn` with the active span cleared, so spans created inside become new\n * roots (or parent to incoming propagated context). Used for in-process\n * Node.js middleware so its span is a sibling of the request span, matching\n * edge middleware which runs in a detached sandbox.\n */ runWithDetachedContext(fn) {\n if (!NEXT_OTEL_PERFORMANCE_PREFIX && !this.isOpenTelemetryEnabled()) {\n return fn();\n }\n return context.with(ROOT_CONTEXT, fn);\n }\n withPropagatedContext(carrier, fn, getter, force = false) {\n const activeContext = context.active();\n if (!NEXT_OTEL_PERFORMANCE_PREFIX && !this.isOpenTelemetryEnabled() && !trace.getSpanContext(activeContext)) {\n return fn();\n }\n if (force) {\n const remoteContext = propagation.extract(ROOT_CONTEXT, carrier, getter);\n if (trace.getSpanContext(remoteContext)) {\n return context.with(remoteContext, fn);\n }\n // Preserve the current active span while still merging any extracted\n // baggage/context values from the carrier.\n const mergedContext = propagation.extract(activeContext, carrier, getter);\n return context.with(mergedContext, fn);\n }\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn();\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter);\n return context.with(remoteContext, fn);\n }\n trace(...args) {\n const [type, fnOrOptions, fnOrEmpty] = args;\n const tracingEnabled = Boolean(NEXT_OTEL_PERFORMANCE_PREFIX) || this.isOpenTelemetryEnabled();\n const localSpanRecorder = getLocalSpanRecorder();\n const localSpanRecordingEnabled = (localSpanRecorder == null ? void 0 : localSpanRecorder.isLocalSpanRecordingEnabled()) ?? false;\n if (!tracingEnabled && !localSpanRecordingEnabled) {\n return typeof fnOrOptions === 'function' ? fnOrOptions() : fnOrEmpty();\n }\n // coerce options form overload\n const { fn, options } = typeof fnOrOptions === 'function' ? {\n fn: fnOrOptions,\n options: {}\n } : {\n fn: fnOrEmpty,\n options: {\n ...fnOrOptions\n }\n };\n const spanName = options.spanName ?? type;\n const parentSpan = options.parentSpan ?? this.getActiveScopeSpan();\n const isolatedParentSpan = parentSpan && (localSpanRecorder == null ? void 0 : localSpanRecorder.isOpenTelemetryIsolatedSpan(parentSpan)) ? parentSpan : undefined;\n const shouldDelegateSpan = !isolatedParentSpan && (NextVanillaSpanAllowlist.has(type) || process.env.NEXT_OTEL_VERBOSE === '1');\n const shouldTraceSpan = shouldDelegateSpan || ((localSpanRecorder == null ? void 0 : localSpanRecorder.isRequestInsightsEnabled()) ?? false);\n if (!shouldTraceSpan || options.hideSpan) {\n return fn();\n }\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = isolatedParentSpan ? context.active() : this.getSpanContext(parentSpan);\n if (!spanContext) {\n spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT;\n }\n // Check if there's already a root span in the store for this trace\n // We are intentionally not checking whether there is an active context\n // from outside of nextjs to ensure that we can provide the same level\n // of telemetry when using a custom server\n const existingRootSpanId = spanContext.getValue(rootSpanIdKey);\n const isRootSpan = typeof existingRootSpanId !== 'number' || !rootSpanAttributesStore.has(existingRootSpanId);\n const spanId = getSpanId();\n options.attributes = {\n 'next.span_category': 'nextjs',\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes\n };\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.runWithActiveSpan(spanName, options, spanContext, tracingEnabled && shouldDelegateSpan, localSpanRecordingEnabled, isolatedParentSpan, (span)=>{\n let startTime;\n if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) {\n startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined;\n }\n let cleanedUp = false;\n const onCleanup = ()=>{\n if (cleanedUp) return;\n cleanedUp = true;\n rootSpanAttributesStore.delete(spanId);\n if (startTime) {\n performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, {\n start: startTime,\n end: performance.now()\n });\n }\n };\n if (isRootSpan) {\n rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {})));\n }\n if (fn.length > 1) {\n try {\n return fn(span, (err)=>{\n if (err) {\n closeSpanWithError(span, err);\n } else {\n span.end();\n }\n });\n } catch (err) {\n closeSpanWithError(span, err);\n throw err;\n } finally{\n onCleanup();\n }\n }\n try {\n const result = fn(span);\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result.then((res)=>{\n span.end();\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res;\n }).catch((err)=>{\n closeSpanWithError(span, err);\n throw err;\n }).finally(onCleanup);\n } else {\n span.end();\n onCleanup();\n }\n return result;\n } catch (err) {\n closeSpanWithError(span, err);\n onCleanup();\n throw err;\n }\n }));\n }\n runWithActiveSpan(spanName, options, parentContext, tracingEnabled, localSpanRecordingEnabled, isolatedParentSpan, fn) {\n if (tracingEnabled) {\n return this.getTracerInstance().startActiveSpan(spanName, options, (span)=>fn(localSpanRecordingEnabled ? this.createLocalRecordingSpan(spanName, options, parentContext, span, isolatedParentSpan) : span));\n }\n const span = this.createLocalRecordingSpan(spanName, options, parentContext, undefined, isolatedParentSpan);\n const localSpanRecorder = getLocalSpanRecorder();\n return localSpanRecorder.withLocalSpan(span, ()=>localSpanRecorder.isOpenTelemetryIsolatedSpan(span) ? fn(span) : context.with(trace.setSpan(context.active(), span), fn, undefined, span));\n }\n createLocalRecordingSpan(name, options, parentContext, delegateSpan, isolatedParentSpan) {\n const parentSpanContext = (isolatedParentSpan == null ? void 0 : isolatedParentSpan.spanContext()) ?? trace.getSpanContext(parentContext);\n const delegateSpanContext = delegateSpan == null ? void 0 : delegateSpan.spanContext();\n return getLocalSpanRecorder().createLocalSpan({\n name,\n attributes: options.attributes,\n links: options.links,\n startTime: options.startTime,\n delegateSpan,\n traceId: (delegateSpanContext == null ? void 0 : delegateSpanContext.traceId) ?? (parentSpanContext == null ? void 0 : parentSpanContext.traceId),\n spanId: delegateSpanContext == null ? void 0 : delegateSpanContext.spanId,\n parentSpanId: parentSpanContext == null ? void 0 : parentSpanContext.spanId,\n isolateOpenTelemetry: isolatedParentSpan !== undefined\n });\n }\n wrap(...args) {\n const tracer = this;\n const [name, options, fn] = args.length === 3 ? args : [\n args[0],\n {},\n args[1]\n ];\n if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1' && !process.env.__NEXT_DEV_SERVER) {\n return fn;\n }\n return function() {\n let optionsObj = options;\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments);\n }\n const lastArgId = arguments.length - 1;\n const cb = arguments[lastArgId];\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb);\n return tracer.trace(name, optionsObj, (_span, done)=>{\n arguments[lastArgId] = function(err) {\n done == null ? void 0 : done(err);\n return scopeBoundCb.apply(this, arguments);\n };\n return fn.apply(this, arguments);\n });\n } else {\n return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments));\n }\n };\n }\n startSpan(...args) {\n const [type, passedOptions] = args;\n const options = passedOptions ? {\n ...passedOptions,\n attributes: {\n 'next.span_category': 'nextjs',\n ...passedOptions.attributes\n }\n } : {\n attributes: {\n 'next.span_category': 'nextjs'\n }\n };\n const localSpanRecorder = getLocalSpanRecorder();\n const parentSpan = options.parentSpan ?? this.getActiveScopeSpan();\n const isolatedParentSpan = parentSpan && (localSpanRecorder == null ? void 0 : localSpanRecorder.isOpenTelemetryIsolatedSpan(parentSpan)) ? parentSpan : undefined;\n const parentContext = (isolatedParentSpan ? undefined : this.getSpanContext(parentSpan)) ?? context.active();\n const localSpanRecordingEnabled = (localSpanRecorder == null ? void 0 : localSpanRecorder.isLocalSpanRecordingEnabled()) ?? false;\n if (!localSpanRecordingEnabled) {\n return this.getTracerInstance().startSpan(type, options, parentContext);\n }\n const delegateSpan = !isolatedParentSpan && this.isOpenTelemetryEnabled() ? this.getTracerInstance().startSpan(type, options, parentContext) : undefined;\n return this.createLocalRecordingSpan(type, options, parentContext, delegateSpan, isolatedParentSpan);\n }\n getSpanContext(parentSpan) {\n const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined;\n return spanContext;\n }\n getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey);\n return rootSpanAttributesStore.get(spanId);\n }\n setRootSpanAttribute(key, value) {\n const spanId = context.active().getValue(rootSpanIdKey);\n const attributes = rootSpanAttributesStore.get(spanId);\n if (attributes && !attributes.has(key)) {\n attributes.set(key, value);\n }\n if (process.env.__NEXT_DEV_SERVER) {\n var _getLocalSpanRecorder;\n const localSpan = (_getLocalSpanRecorder = getLocalSpanRecorder()) == null ? void 0 : _getLocalSpanRecorder.getActiveLocalSpan();\n if (localSpan) {\n localSpan.setAttribute(key, value);\n }\n }\n }\n withSpan(span, fn) {\n const recorder = getLocalSpanRecorder();\n if (recorder == null ? void 0 : recorder.isLocalRecordingSpan(span)) {\n return recorder.withLocalSpan(span, ()=>recorder.isOpenTelemetryIsolatedSpan(span) ? fn() : context.with(trace.setSpan(context.active(), span), fn));\n }\n return context.with(trace.setSpan(context.active(), span), fn);\n }\n}\nconst getTracer = (()=>{\n const tracer = new NextTracerImpl();\n return ()=>tracer;\n})();\nexport { getTracer, SpanStatusCode, SpanKind };\n\n//# sourceMappingURL=tracer.js.map","/**\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 */ export function isThenable(promise) {\n return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function';\n}\n\n//# sourceMappingURL=is-thenable.js.map","(()=>{\"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={928:e=>{\n/*!\n * fresh\n * Copyright(c) 2012 TJ Holowaychuk\n * Copyright(c) 2016-2017 Douglas Christopher Wilson\n * MIT Licensed\n */\nvar r=/(?:^|,)\\s*?no-cache\\s*?(?:,|$)/;e.exports=fresh;function fresh(e,a){var t=e[\"if-modified-since\"];var s=e[\"if-none-match\"];if(!t&&!s){return false}var i=e[\"cache-control\"];if(i&&r.test(i)){return false}if(s&&s!==\"*\"){var f=a[\"etag\"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var _=0;_<u.length;_++){var o=u[_];if(o===f||o===\"W/\"+f||\"W/\"+o===f){n=false;break}}if(n){return false}}if(t){var p=a[\"last-modified\"];var v=!p||!(parseHttpDate(p)<=parseHttpDate(t));if(v){return false}}return true}function parseHttpDate(e){var r=e&&Date.parse(e);return typeof r===\"number\"?r:NaN}function parseTokenList(e){var r=0;var a=[];var t=0;for(var s=0,i=e.length;s<i;s++){switch(e.charCodeAt(s)){case 32:if(t===r){t=r=s+1}break;case 44:a.push(e.substring(t,r));t=r=s+1;break;default:r=s+1;break}}a.push(e.substring(t,r));return a}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var s=r[a]={exports:{}};var i=true;try{e[a](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete r[a]}return s.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(928);module.exports=a})();","(()=>{\"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=_})();","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */ class LRUNode {\n constructor(key, data, size){\n this.prev = null;\n this.next = null;\n this.key = key;\n this.data = data;\n this.size = size;\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 */ class SentinelNode {\n constructor(){\n this.prev = null;\n this.next = 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 */ export class LRUCache {\n constructor(maxSize, calculateSize, onEvict){\n this.cache = new Map();\n this.totalSize = 0;\n this.maxSize = maxSize;\n this.calculateSize = calculateSize;\n this.onEvict = onEvict;\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode();\n this.tail = new SentinelNode();\n this.head.next = this.tail;\n this.tail.prev = this.head;\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 */ addToHead(node) {\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 * 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 */ removeNode(node) {\n // Connected nodes always have non-null prev/next\n node.prev.next = node.next;\n node.next.prev = node.prev;\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 */ moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\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 */ removeTail() {\n const lastNode = this.tail.prev;\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 * 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 */ set(key, value) {\n const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value, key)) ?? 1;\n if (size <= 0) {\n throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1045\",\n enumerable: false,\n configurable: true\n });\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize');\n return false;\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 // 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 == null ? void 0 : this.onEvict.call(this, tail.key, tail.data);\n }\n return true;\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 */ has(key) {\n return this.cache.has(key);\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 */ get(key) {\n const node = this.cache.get(key);\n if (!node) return undefined;\n // Mark as most recently used by moving to head\n this.moveToHead(node);\n return node.data;\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 */ *[Symbol.iterator]() {\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;\n yield [\n node.key,\n node.data\n ];\n current = current.next;\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 */ remove(key) {\n const node = this.cache.get(key);\n if (!node) return;\n this.removeNode(node);\n this.cache.delete(key);\n this.totalSize -= node.size;\n }\n /**\n * Returns the number of items in the cache.\n */ get size() {\n return this.cache.size;\n }\n /**\n * Returns the current total size of all cached items.\n * This uses the custom size calculation if provided.\n */ get currentSize() {\n return this.totalSize;\n }\n}\n\n//# sourceMappingURL=lru-cache.js.map","import { DetachedPromise } from './detached-promise';\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */ export class Batcher {\n constructor(cacheKeyFn, /**\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 */ schedulerFn = (fn)=>fn()){\n this.cacheKeyFn = cacheKeyFn;\n this.schedulerFn = schedulerFn;\n this.pending = new Map();\n }\n static create(options) {\n return new Batcher(options == null ? void 0 : options.cacheKeyFn, options == null ? void 0 : options.schedulerFn);\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 */ async batch(key, fn) {\n const cacheKey = this.cacheKeyFn ? await this.cacheKeyFn(key) : key;\n if (cacheKey === null) {\n return fn({\n resolve: (value)=>Promise.resolve(value),\n key\n });\n }\n const pending = this.pending.get(cacheKey);\n if (pending) return pending;\n const { promise, resolve, reject } = new DetachedPromise();\n this.pending.set(cacheKey, promise);\n this.schedulerFn(async ()=>{\n try {\n const result = await fn({\n resolve,\n 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 return promise;\n }\n}\n\n//# sourceMappingURL=batcher.js.map","import { CachedRouteKind, IncrementalCacheKind } from './types';\nimport RenderResult from '../render-result';\nimport { RouteKind } from '../route-kind';\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants';\nexport async function fromResponseCacheEntry(cacheEntry) {\n var _cacheEntry_value, _cacheEntry_value1;\n return {\n ...cacheEntry,\n value: ((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) === CachedRouteKind.PAGES ? {\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 } : ((_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind) === CachedRouteKind.APP_PAGE ? {\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 } : cacheEntry.value\n };\n}\nexport async function toResponseCacheEntry(response) {\n var _response_value, _response_value1;\n if (!response) return null;\n return {\n isMiss: response.isMiss,\n isStale: response.isStale,\n cacheControl: response.cacheControl,\n isFallback: response.isFallback,\n value: ((_response_value = response.value) == null ? void 0 : _response_value.kind) === CachedRouteKind.PAGES ? {\n kind: CachedRouteKind.PAGES,\n html: RenderResult.fromStatic(response.value.html, HTML_CONTENT_TYPE_HEADER),\n pageData: response.value.pageData,\n headers: response.value.headers,\n status: response.value.status\n } : ((_response_value1 = response.value) == null ? void 0 : _response_value1.kind) === CachedRouteKind.APP_PAGE ? {\n kind: CachedRouteKind.APP_PAGE,\n html: RenderResult.fromStatic(response.value.html, HTML_CONTENT_TYPE_HEADER),\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 } : response.value\n };\n}\nexport function routeKindToIncrementalCacheKind(routeKind) {\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 Object.defineProperty(new Error(`Unexpected route kind ${routeKind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E64\",\n enumerable: false,\n configurable: true\n });\n default:\n return routeKind;\n }\n}\n\n//# sourceMappingURL=utils.js.map","// ISC License\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\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// 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\nvar _globalThis;\nconst { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};\nconst enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb');\nconst replaceClose = (str, close, replace, index)=>{\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 ? start + replaceClose(end, close, replace, nextIndex) : start + end;\n};\nconst formatter = (open, close, replace = open)=>{\n if (!enabled) return String;\n return (input)=>{\n const string = '' + input;\n const index = string.indexOf(close, open.length);\n return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;\n };\n};\nexport const reset = enabled ? (s)=>`\\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\n//# sourceMappingURL=picocolors.js.map","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors';\nimport { LRUCache } from '../../server/lib/lru-cache';\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲',\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»'))\n};\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error'\n};\nfunction prefixedLog(prefixType, ...message) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift();\n }\n const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log';\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}\nexport function bootstrap(message) {\n console.log(message);\n}\nexport function wait(...message) {\n prefixedLog('wait', ...message);\n}\nexport function error(...message) {\n prefixedLog('error', ...message);\n}\nexport function warn(...message) {\n prefixedLog('warn', ...message);\n}\nexport function ready(...message) {\n prefixedLog('ready', ...message);\n}\nexport function info(...message) {\n prefixedLog('info', ...message);\n}\nexport function event(...message) {\n prefixedLog('event', ...message);\n}\nexport function trace(...message) {\n prefixedLog('trace', ...message);\n}\nconst warnOnceCache = new LRUCache(10000, (value)=>value.length);\nexport function warnOnce(...message) {\n const key = message.join(' ');\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key);\n warn(...message);\n }\n}\nconst errorOnceCache = new LRUCache(10000, (value)=>value.length);\nexport function errorOnce(...message) {\n const key = message.join(' ');\n if (!errorOnceCache.has(key)) {\n errorOnceCache.set(key, key);\n error(...message);\n }\n}\n\n//# sourceMappingURL=log.js.map","import { Batcher } from '../../lib/batcher';\nimport { LRUCache } from '../lib/lru-cache';\nimport { warnOnce } from '../../build/output/log';\nimport { scheduleOnNextTick } from '../../lib/scheduler';\nimport { fromResponseCacheEntry, routeKindToIncrementalCacheKind, toResponseCacheEntry } from './utils';\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 */ function parsePositiveInt(envValue, fallback) {\n if (!envValue) return fallback;\n const parsed = parseInt(envValue, 10);\n return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;\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 */ const DEFAULT_TTL_MS = parsePositiveInt(process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL, 10000);\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 */ const DEFAULT_MAX_SIZE = parsePositiveInt(process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE, 150);\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 */ const KEY_SEPARATOR = '\\0';\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 */ const TTL_SENTINEL = '__ttl_sentinel__';\n/**\n * Creates a compound cache key from pathname and invocationID.\n */ function createCacheKey(pathname, invocationID) {\n return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`;\n}\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */ function extractInvocationID(compoundKey) {\n const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR);\n if (separatorIndex === -1) return undefined;\n const invocationID = compoundKey.slice(separatorIndex + 1);\n return invocationID === TTL_SENTINEL ? undefined : invocationID;\n}\nexport * from './types';\nexport default class ResponseCache {\n constructor(minimal_mode, maxSize = DEFAULT_MAX_SIZE, ttl = DEFAULT_TTL_MS){\n this.getBatcher = Batcher.create({\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 })=>`${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 this.revalidateBatcher = Batcher.create({\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 * 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 */ this.evictedInvocationIDs = new Set();\n this.minimal_mode = minimal_mode;\n this.maxSize = maxSize;\n this.ttl = ttl;\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 * 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 */ async get(key, responseGenerator, context) {\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 // 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 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 // TTL mode: check expiration\n const now = Date.now();\n if (cachedItem.expiresAt > now) {\n return toResponseCacheEntry(cachedItem.entry);\n }\n // TTL expired - clean up\n this.cache.remove(cacheKey);\n }\n // Warn if this invocation had entries evicted - indicates cache may be too small.\n if (context.invocationID && this.evictedInvocationIDs.has(context.invocationID)) {\n warnOnce(`Response cache entry was evicted for invocation ${context.invocationID}. ` + `Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`);\n }\n }\n const { incrementalCache, isOnDemandRevalidate = false, isFallback = false, isRoutePPREnabled = false, isPrefetch = false, waitUntil, routeKind, invocationID } = context;\n const response = await this.getBatcher.batch({\n key,\n isOnDemandRevalidate\n }, ({ resolve })=>{\n const promise = this.handleGet(key, responseGenerator, {\n incrementalCache,\n isOnDemandRevalidate,\n isFallback,\n isRoutePPREnabled,\n isPrefetch,\n routeKind,\n invocationID\n }, resolve);\n // We need to ensure background revalidates are passed to waitUntil.\n if (waitUntil) waitUntil(promise);\n return promise;\n });\n if (this.minimal_mode && (response == null ? void 0 : 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 return toResponseCacheEntry(response);\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 */ async handleGet(key, responseGenerator, context, resolve) {\n let previousIncrementalCacheEntry = null;\n let resolved = false;\n try {\n // Get the previous cache entry if not in minimal mode\n previousIncrementalCacheEntry = !this.minimal_mode ? await context.incrementalCache.get(key, {\n kind: routeKindToIncrementalCacheKind(context.routeKind),\n isRoutePPREnabled: context.isRoutePPREnabled,\n isFallback: context.isFallback\n }) : null;\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 (previousIncrementalCacheEntry && !context.isOnDemandRevalidate && previousIncrementalCacheEntry.isStale !== -1) {\n resolve(previousIncrementalCacheEntry);\n resolved = true;\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 // 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 = context.isPrefetch && previousIncrementalCacheEntry === null ? await this.handleRevalidate(key, context.incrementalCache, context.isRoutePPREnabled, context.isFallback, responseGenerator, previousIncrementalCacheEntry, resolved) : await this.revalidate(key, context.incrementalCache, context.isRoutePPREnabled, context.isFallback, responseGenerator, previousIncrementalCacheEntry, resolved);\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 // Resolve for on-demand revalidation or if not already resolved\n if (context.isOnDemandRevalidate && !resolved) {\n return incrementalResponseCacheEntry;\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 throw err;\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 */ async revalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved, waitUntil) {\n return this.revalidateBatcher.batch(key, ()=>{\n const promise = this.handleRevalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved);\n // We need to ensure background revalidates are passed to waitUntil.\n if (waitUntil) waitUntil(promise);\n return promise;\n });\n }\n async handleRevalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved) {\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 // Convert the response cache entry to an incremental response cache entry.\n const incrementalResponseCacheEntry = await fromResponseCacheEntry({\n ...responseCacheEntry,\n isMiss: !previousIncrementalCacheEntry\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 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 == null ? void 0 : previousIncrementalCacheEntry.cacheControl) {\n const revalidate = Math.min(Math.max(previousIncrementalCacheEntry.cacheControl.revalidate || 3, 3), 30);\n const expire = previousIncrementalCacheEntry.cacheControl.expire === undefined ? undefined : Math.max(revalidate + 3, previousIncrementalCacheEntry.cacheControl.expire);\n await incrementalCache.set(key, previousIncrementalCacheEntry.value, {\n cacheControl: {\n revalidate: revalidate,\n expire: expire\n },\n isRoutePPREnabled,\n isFallback\n });\n }\n // We haven't resolved yet, so let's throw to indicate an error.\n throw err;\n }\n }\n}\n\n//# sourceMappingURL=index.js.map","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","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-page.js\"));\n","'use client'\n\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { urlSearchParamsToParsedUrlQuery } from '../route-params'\nimport { SearchParamsContext } from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n createClientParams,\n createClientSearchParams,\n} from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params and searchParams to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Page component.\n *\n * additionally we may send promises representing the params and searchParams. We don't ever use these passed\n * values but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations.\n * It is up to the caller to decide if the promises are needed.\n */\nexport function ClientPageRoot({\n Component,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n serverProvidedParams: null | {\n searchParams: ParsedUrlQuery\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let searchParams: ParsedUrlQuery\n let params: Params\n if (serverProvidedParams !== null) {\n searchParams = serverProvidedParams.searchParams\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params as\n // props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n\n // This is an intentional behavior change: when Cache Components is enabled,\n // client segments receive the \"canonical\" search params, not the\n // rewritten ones. Users should either call useSearchParams directly or pass\n // the rewritten ones in from a Server Component.\n // TODO: Log a deprecation error when this object is accessed\n searchParams = urlSearchParamsToParsedUrlQuery(use(SearchParamsContext)!)\n }\n\n const clientSearchParams = createClientSearchParams(searchParams)\n const clientParams = createClientParams(params)\n\n return <Component params={clientParams} searchParams={clientSearchParams} />\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-segment.js\"));\n","'use client'\n\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { createClientParams } from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Segment component.\n *\n * additionally we may send a promise representing params. We don't ever use this passed\n * value but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations\n * such as when cacheComponents is enabled. It is up to the caller to decide if the promises are needed.\n */\nexport function ClientSegmentRoot({\n Component,\n slots,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n slots: { [key: string]: React.ReactNode }\n serverProvidedParams: null | {\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let params: Params\n if (serverProvidedParams !== null) {\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params\n // as props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n }\n\n const clientParams = createClientParams(params)\n\n return <Component {...slots} params={clientParams} />\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js\"));\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","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/layout-router.js\"));\n","'use client'\n\nimport type { CacheNode } from '../../shared/lib/app-router-types'\nimport type { LoadingModuleData } from '../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n} from '../../shared/lib/app-router-types'\nimport type { ErrorComponent } from './error-boundary'\nimport type { FocusAndScrollRef } from './router-reducer/router-reducer-types'\n\nimport React, {\n Activity,\n Fragment,\n useContext,\n use,\n Suspense,\n useDeferredValue,\n useLayoutEffect,\n type FragmentInstance,\n type JSX,\n type ActivityProps,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport {\n LayoutRouterContext,\n GlobalLayoutRouterContext,\n TemplateContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { ErrorBoundary } from './error-boundary'\nimport { disableSmoothScrollDuringRouteTransition } from '../../shared/lib/router/utils/disable-smooth-scroll'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\nimport {\n InstantValidationBoundaryContext,\n RenderValidationBoundaryAtThisLevel,\n} from './instant-validation/boundary'\nimport { createRouterCacheKey } from './router-reducer/create-router-cache-key'\nimport {\n useRouterBFCache,\n type RouterBFCacheEntry,\n} from './bfcache-state-manager'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n NavigationPromisesContext,\n type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { getParamValueFromCacheKey } from '../route-params'\nimport type { Params } from '../../server/request/params'\nimport { isDeferredRsc } from './router-reducer/ppr-navigations'\n\nconst enableNewScrollHandler = process.env.__NEXT_APP_NEW_SCROLL_HANDLER\n\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = (\n ReactDOM as any\n).__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE\n\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */\nfunction findDOMNode(\n instance: React.ReactInstance | null | undefined\n): Element | Text | null {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null\n\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode =\n __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode\n return internal_reactDOMfindDOMNode(instance)\n}\n\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y',\n] as const\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */\nfunction shouldSkipElement(element: HTMLElement) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if (['sticky', 'fixed'].includes(getComputedStyle(element).position)) {\n return true\n }\n\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect()\n return rectProperties.every((item) => rect[item] === 0)\n}\n\nconst enum ScrollTargetState {\n NoClientRects,\n InViewport,\n OutOfViewport,\n}\n\n/**\n * Resolve the root scroll padding used by the viewport check.\n *\n * Computed lengths serialize as pixels, but percentages remain relative to\n * the scrollport. Preserve the existing behavior for values that still\n * contain unresolved CSS math.\n */\nfunction getScrollPaddingTopInPixels(\n htmlElement: HTMLElement,\n viewportHeight: number\n): number {\n const scrollPaddingTop = getComputedStyle(htmlElement).scrollPaddingTop\n const value = Number.parseFloat(scrollPaddingTop)\n\n if (!Number.isFinite(value) || value < 0) {\n return 0\n }\n\n if (scrollPaddingTop.endsWith('px')) {\n return value\n }\n\n if (scrollPaddingTop.endsWith('%')) {\n return (value / 100) * viewportHeight\n }\n\n return 0\n}\n\n/**\n * Check where the top corner of the HTMLElement is relative to the usable\n * viewport.\n *\n * Scroll padding is resolved lazily so an empty Fragment does not trigger a\n * computed style read. The caller caches the value for the second check.\n */\nfunction getScrollTargetState(\n instance: HTMLElement | FragmentInstance,\n viewportHeight: number,\n getScrollPaddingTop: () => number\n): ScrollTargetState {\n const rects = instance.getClientRects()\n if (rects.length === 0) {\n return ScrollTargetState.NoClientRects\n }\n let elementTop = Number.POSITIVE_INFINITY\n for (let i = 0; i < rects.length; i++) {\n const rect = rects[i]\n if (rect.top < elementTop) {\n elementTop = rect.top\n }\n }\n return elementTop >= getScrollPaddingTop() && elementTop <= viewportHeight\n ? ScrollTargetState.InViewport\n : ScrollTargetState.OutOfViewport\n}\n\n/**\n * Find the DOM node for a hash fragment.\n * If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior.\n * If the hash fragment is an id, the page has to scroll to the element with that id.\n * If the hash fragment is a name, the page has to scroll to the first element with that name.\n */\nfunction getHashFragmentDomNode(hashFragment: string) {\n // If the hash fragment is `top` the page has to scroll to the top of the page.\n if (hashFragment === 'top') {\n return document.body\n }\n\n // If the hash fragment is an id, the page has to scroll to the element with that id.\n return (\n document.getElementById(hashFragment) ??\n // If the hash fragment is a name, the page has to scroll to the first element with that name.\n document.getElementsByName(hashFragment)[0] ??\n null\n )\n}\ninterface ScrollAndMaybeFocusHandlerProps {\n focusAndScrollRef: FocusAndScrollRef\n children: React.ReactNode\n cacheNode: CacheNode\n}\nclass InnerScrollAndFocusHandlerOld extends React.Component<ScrollAndMaybeFocusHandlerProps> {\n handlePotentialScroll = () => {\n // Handle scroll and focus, it's only applied once.\n const { focusAndScrollRef, cacheNode } = this.props\n\n const scrollRef = focusAndScrollRef.forceScroll\n ? focusAndScrollRef.scrollRef\n : cacheNode.scrollRef\n if (scrollRef === null || !scrollRef.current) return\n\n let domNode:\n | ReturnType<typeof getHashFragmentDomNode>\n | ReturnType<typeof findDOMNode> = null\n const hashFragment = focusAndScrollRef.hashFragment\n\n if (hashFragment) {\n domNode = getHashFragmentDomNode(hashFragment)\n if (domNode === null) {\n // A missing hash target is still a handled scroll intent. Do not\n // fall back to the route segment or leave the intent pending.\n scrollRef.current = false\n focusAndScrollRef.onlyHashChange = false\n focusAndScrollRef.hashFragment = null\n return\n }\n }\n\n // `findDOMNode` is tricky because it returns just the first child if the component is a fragment.\n // This already caused a bug where the first child was a <link/> in head.\n if (!domNode) {\n domNode = findDOMNode(this)\n }\n\n // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.\n if (!(domNode instanceof Element)) {\n return\n }\n\n // Verify if the element is a HTMLElement and if we want to consider it for scroll behavior.\n // If the element is skipped, try to select the next sibling and try again.\n while (!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)) {\n if (process.env.NODE_ENV !== 'production') {\n if (domNode.parentElement?.localName === 'head') {\n // We enter this state when metadata was rendered as part of the page or via Next.js.\n // This is always a bug in Next.js and caused by React hoisting metadata.\n // Fixed with `experimental.appNewScrollHandler`\n }\n }\n\n // No siblings found that match the criteria are found, so handle scroll higher up in the tree instead.\n if (domNode.nextElementSibling === null) {\n return\n }\n domNode = domNode.nextElementSibling\n }\n\n // Mark as scrolled so no other segment scrolls for this navigation.\n scrollRef.current = false\n\n disableSmoothScrollDuringRouteTransition(\n () => {\n // In case of hash scroll, we only need to scroll the element into view\n if (hashFragment) {\n domNode.scrollIntoView()\n\n return\n }\n // Store the current viewport height because reading `clientHeight` causes a reflow,\n // and it won't change during this function.\n const htmlElement = document.documentElement\n const viewportHeight = htmlElement.clientHeight\n let scrollPaddingTop: number | null = null\n const getScrollPaddingTop = () => {\n if (scrollPaddingTop === null) {\n // Reuse the style and layout update from the geometry read above.\n scrollPaddingTop = getScrollPaddingTopInPixels(\n htmlElement,\n viewportHeight\n )\n }\n return scrollPaddingTop\n }\n\n // If the element's top edge is already in the viewport, exit early.\n if (\n getScrollTargetState(domNode, viewportHeight, getScrollPaddingTop) ===\n ScrollTargetState.InViewport\n ) {\n return\n }\n\n // Otherwise, try scrolling go the top of the document to be backward compatible with pages\n // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)\n // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left\n // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically\n htmlElement.scrollTop = 0\n\n // Scroll to domNode if domNode is not in viewport when scrolled to top of document\n if (\n getScrollTargetState(domNode, viewportHeight, getScrollPaddingTop) !==\n ScrollTargetState.InViewport\n ) {\n // Scroll into view doesn't scroll horizontally by default when not needed\n domNode.scrollIntoView()\n }\n },\n {\n // We will force layout by querying domNode position\n dontForceLayout: true,\n onlyHashChange: focusAndScrollRef.onlyHashChange,\n }\n )\n\n // Mutate after scrolling so that it can be read by `disableSmoothScrollDuringRouteTransition`\n focusAndScrollRef.onlyHashChange = false\n focusAndScrollRef.hashFragment = null\n\n // Set focus on the element\n domNode.focus()\n }\n\n componentDidMount() {\n this.handlePotentialScroll()\n }\n\n componentDidUpdate() {\n this.handlePotentialScroll()\n }\n\n render() {\n return this.props.children\n }\n}\n\n/**\n * Fork of InnerScrollAndFocusHandlerOld using Fragment refs for scrolling.\n * No longer focuses the first host descendant.\n */\nfunction InnerScrollHandlerNew(props: ScrollAndMaybeFocusHandlerProps) {\n const childrenRef = React.useRef<FragmentInstance>(null)\n\n useLayoutEffect(\n () => {\n const { focusAndScrollRef, cacheNode } = props\n\n const scrollRef = focusAndScrollRef.forceScroll\n ? focusAndScrollRef.scrollRef\n : cacheNode.scrollRef\n if (scrollRef === null || !scrollRef.current) return\n\n let instance: FragmentInstance | HTMLElement | null = null\n const hashFragment = focusAndScrollRef.hashFragment\n\n if (hashFragment) {\n instance = getHashFragmentDomNode(hashFragment)\n if (instance === null) {\n // A missing hash target is still a handled scroll intent. Do not\n // fall back to the route Fragment or leave the intent pending.\n scrollRef.current = false\n focusAndScrollRef.onlyHashChange = false\n focusAndScrollRef.hashFragment = null\n return\n }\n } else {\n instance = childrenRef.current\n }\n\n // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.\n if (instance === null) {\n return\n }\n\n let didHandleScroll = false\n\n disableSmoothScrollDuringRouteTransition(\n () => {\n const htmlElement = document.documentElement\n let viewportHeight: number | null = null\n let initialTargetState: ScrollTargetState | null = null\n let scrollPaddingTop: number | null = null\n const getScrollPaddingTop = () => {\n if (scrollPaddingTop === null) {\n // Reuse the style and layout update from the geometry read.\n scrollPaddingTop = getScrollPaddingTopInPixels(\n htmlElement,\n viewportHeight!\n )\n }\n return scrollPaddingTop\n }\n\n if (!hashFragment) {\n // Store the current viewport height because reading `clientHeight` causes a reflow,\n // and it won't change during this function.\n viewportHeight = htmlElement.clientHeight\n initialTargetState = getScrollTargetState(\n instance,\n viewportHeight,\n getScrollPaddingTop\n )\n\n // An empty Fragment is not a scroll target. In particular, avoid\n // React's sibling fallback and leave the scroll signal available\n // for another changed segment.\n if (initialTargetState === ScrollTargetState.NoClientRects) {\n return\n }\n }\n\n didHandleScroll = true\n\n // Mark as scrolled so no other segment scrolls for this navigation.\n scrollRef.current = false\n\n // This handler intentionally leaves focus untouched; resetting focus on\n // navigation is deferred.\n\n // In case of hash scroll, we only need to scroll the element into view\n if (hashFragment) {\n instance.scrollIntoView()\n\n return\n }\n\n // If the element's top edge is already in the viewport, exit early.\n if (initialTargetState === ScrollTargetState.InViewport) {\n return\n }\n\n // Otherwise, try scrolling go the top of the document to be backward compatible with pages\n // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)\n // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left\n // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically\n htmlElement.scrollTop = 0\n\n // Scroll to domNode if domNode is not in viewport when scrolled to top of document\n if (\n getScrollTargetState(\n instance,\n viewportHeight!,\n getScrollPaddingTop\n ) === ScrollTargetState.OutOfViewport\n ) {\n // Scroll into view doesn't scroll horizontally by default when not needed\n instance.scrollIntoView()\n }\n },\n {\n // We will force layout by querying domNode position\n dontForceLayout: true,\n onlyHashChange: focusAndScrollRef.onlyHashChange,\n }\n )\n\n if (!didHandleScroll) {\n return\n }\n\n // Mutate after scrolling so that it can be read by `disableSmoothScrollDuringRouteTransition`\n focusAndScrollRef.onlyHashChange = false\n focusAndScrollRef.hashFragment = null\n },\n // Used to run on every commit. We may be able to be smarter about this\n // but be prepared for lots of manual testing.\n undefined\n )\n\n return <Fragment ref={childrenRef}>{props.children}</Fragment>\n}\n\nconst InnerScrollAndMaybeFocusHandler = enableNewScrollHandler\n ? InnerScrollHandlerNew\n : InnerScrollAndFocusHandlerOld\n\nfunction ScrollAndMaybeFocusHandler({\n children,\n cacheNode,\n}: {\n children: React.ReactNode\n cacheNode: CacheNode\n}) {\n const context = useContext(GlobalLayoutRouterContext)\n if (!context) {\n throw new Error('invariant global layout router not mounted')\n }\n\n return (\n <InnerScrollAndMaybeFocusHandler\n focusAndScrollRef={context.focusAndScrollRef}\n cacheNode={cacheNode}\n >\n {children}\n </InnerScrollAndMaybeFocusHandler>\n )\n}\n\n/**\n * InnerLayoutRouter handles rendering the provided segment based on the cache.\n */\nfunction InnerLayoutRouter({\n tree,\n segmentPath,\n debugNameContext,\n cacheNode: maybeCacheNode,\n params,\n url,\n isActive,\n}: {\n tree: FlightRouterState\n segmentPath: FlightSegmentPath\n debugNameContext: string\n cacheNode: CacheNode | null\n params: Params\n url: string\n isActive: boolean\n}) {\n const context = useContext(GlobalLayoutRouterContext)\n const parentNavPromises = useContext(NavigationPromisesContext)\n\n if (!context) {\n throw new Error('invariant global layout router not mounted')\n }\n\n const cacheNode =\n maybeCacheNode !== null\n ? maybeCacheNode\n : // This segment is not in the cache. Suspend indefinitely.\n //\n // This should only be reachable for inactive/hidden segments, during\n // prerendering The active segment should always be consistent with the\n // CacheNode tree. Regardless, if we don't have a matching CacheNode, we\n // must suspend rather than render nothing, to prevent showing an\n // inconsistent route.\n\n (use(unresolvedThenable) as never)\n\n // `rsc` represents the renderable node for this segment.\n\n // If this segment has a `prefetchRsc`, it's the statically prefetched data.\n // We should use that on initial render instead of `rsc`. Then we'll switch\n // to `rsc` when the dynamic response streams in.\n //\n // If no prefetch data is available, then we go straight to rendering `rsc`.\n const resolvedPrefetchRsc =\n cacheNode.prefetchRsc !== null ? cacheNode.prefetchRsc : cacheNode.rsc\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 const rsc: any = useDeferredValue(cacheNode.rsc, resolvedPrefetchRsc)\n\n // `rsc` is either a React node or a promise for a React node, except we\n // special case `null` to represent that this segment's data is missing. If\n // it's a promise, we need to unwrap it so we can determine whether or not the\n // data is missing.\n let resolvedRsc: React.ReactNode\n if (isDeferredRsc(rsc)) {\n const unwrappedRsc = use(rsc)\n if (unwrappedRsc === null) {\n // If the promise was resolved to `null`, it means the data for this\n // segment was not returned by the server. Suspend indefinitely. When this\n // happens, the router is responsible for triggering a new state update to\n // un-suspend this segment.\n use(unresolvedThenable) as never\n }\n resolvedRsc = unwrappedRsc\n } else {\n // This is not a deferred RSC promise. Don't need to unwrap it.\n if (rsc === null) {\n use(unresolvedThenable) as never\n }\n resolvedRsc = rsc\n }\n\n // In dev, we create a NavigationPromisesContext containing the instrumented promises that provide\n // `useSelectedLayoutSegment` and `useSelectedLayoutSegments`.\n // Promises are cached outside of render to survive suspense retries.\n let navigationPromises: NavigationPromises | null = null\n if (process.env.NODE_ENV !== 'production') {\n const { createNestedLayoutNavigationPromises } =\n require('./navigation-devtools') as typeof import('./navigation-devtools')\n\n navigationPromises = createNestedLayoutNavigationPromises(\n tree,\n parentNavPromises\n )\n }\n\n let children = resolvedRsc\n\n if (navigationPromises) {\n children = (\n <NavigationPromisesContext.Provider value={navigationPromises}>\n {resolvedRsc}\n </NavigationPromisesContext.Provider>\n )\n }\n\n children = (\n // The layout router context narrows down tree and childNodes at each level.\n <LayoutRouterContext.Provider\n value={{\n parentTree: tree,\n parentCacheNode: cacheNode,\n parentSegmentPath: segmentPath,\n parentParams: params,\n // This is always set to null as we enter a child segment. It's\n // populated by LoadingBoundaryProvider the next time we reach a\n // loading boundary.\n parentLoadingData: null,\n debugNameContext: debugNameContext,\n\n // TODO-APP: overriding of url for parallel routes\n url: url,\n isActive: isActive,\n }}\n >\n {children}\n </LayoutRouterContext.Provider>\n )\n\n return children\n}\n\nexport function LoadingBoundaryProvider({\n loading,\n children,\n}: {\n loading: LoadingModuleData\n children: React.ReactNode\n}) {\n // Provides the data needed to render a loading.tsx boundary, via context.\n //\n // loading.tsx creates a Suspense boundary around each of a layout's child\n // slots. (Might be bit confusing to think about the data flow, but: if\n // loading.tsx and layout.tsx are in the same directory, they are assigned\n // to the same CacheNode.)\n //\n // This provider component does not render the Suspense boundary directly;\n // that's handled by LoadingBoundary.\n //\n // TODO: For simplicity, we should combine this provider with LoadingBoundary\n // and render the Suspense boundary directly. The only real benefit of doing\n // it separately is so that when there are multiple parallel routes, we only\n // send the boundary data once, rather than once per child. But that's a\n // negligible benefit and can be achieved via caching instead.\n const parentContext = use(LayoutRouterContext)\n if (parentContext === null) {\n return children\n }\n // All values except for parentLoadingData are the same as the parent context.\n return (\n <LayoutRouterContext.Provider\n value={{\n parentTree: parentContext.parentTree,\n parentCacheNode: parentContext.parentCacheNode,\n parentSegmentPath: parentContext.parentSegmentPath,\n parentParams: parentContext.parentParams,\n parentLoadingData: loading,\n debugNameContext: parentContext.debugNameContext,\n url: parentContext.url,\n isActive: parentContext.isActive,\n }}\n >\n {children}\n </LayoutRouterContext.Provider>\n )\n}\n\n/**\n * Renders suspense boundary with the provided \"loading\" property as the fallback.\n * If no loading property is provided it renders the children without a suspense boundary.\n */\nfunction LoadingBoundary({\n name,\n loading,\n children,\n}: {\n name: ActivityProps['name']\n loading: LoadingModuleData | null\n children: React.ReactNode\n}): JSX.Element {\n // TODO: For LoadingBoundary, and the other built-in boundary types, don't\n // wrap in an extra function component if no user-defined boundary is\n // provided. In other words, inline this conditional wrapping logic into\n // the parent component. More efficient and keeps unnecessary junk out of\n // the component stack.\n if (loading !== null) {\n const loadingRsc = loading[0]\n const loadingStyles = loading[1]\n const loadingScripts = loading[2]\n return (\n <Suspense\n name={name}\n fallback={\n <>\n {loadingStyles}\n {loadingScripts}\n {loadingRsc}\n </>\n }\n >\n {children}\n </Suspense>\n )\n }\n\n return <>{children}</>\n}\n\n/**\n * OuterLayoutRouter handles the current segment as well as <Offscreen> rendering of other segments.\n * It can be rendered next to each other with a different `parallelRouterKey`, allowing for Parallel routes.\n */\nexport default function OuterLayoutRouter({\n parallelRouterKey,\n error,\n errorStyles,\n errorScripts,\n templateStyles,\n templateScripts,\n template,\n notFound,\n forbidden,\n unauthorized,\n segmentViewBoundaries,\n}: {\n parallelRouterKey: string\n error: ErrorComponent | undefined\n errorStyles: React.ReactNode | undefined\n errorScripts: React.ReactNode | undefined\n templateStyles: React.ReactNode | undefined\n templateScripts: React.ReactNode | undefined\n template: React.ReactNode\n notFound: React.ReactNode | undefined\n forbidden: React.ReactNode | undefined\n unauthorized: React.ReactNode | undefined\n segmentViewBoundaries?: React.ReactNode\n}) {\n const context = useContext(LayoutRouterContext)\n if (!context) {\n throw new Error('invariant expected layout router to be mounted')\n }\n\n const {\n parentTree,\n parentCacheNode,\n parentSegmentPath,\n parentParams,\n parentLoadingData,\n url,\n isActive,\n debugNameContext,\n } = context\n\n // Get the CacheNode for this segment by reading it from the parent segment's\n // child map.\n const parentTreeSegment = parentTree[0]\n const segmentPath =\n parentSegmentPath === null\n ? // TODO: The root segment value is currently omitted from the segment\n // path. This has led to a bunch of special cases scattered throughout\n // the code. We should clean this up.\n [parallelRouterKey]\n : parentSegmentPath.concat([parentTreeSegment, parallelRouterKey])\n\n // The \"state\" key of a segment is the one passed to React — it represents the\n // identity of the UI tree. Whenever the state key changes, the tree is\n // recreated and the state is reset. In the App Router model, search params do\n // not cause state to be lost, so two segments with the same segment path but\n // different search params should have the same state key.\n //\n // The \"cache\" key of a segment, however, *does* include the search params, if\n // it's possible that the segment accessed the search params on the server.\n // (This only applies to page segments; layout segments cannot access search\n // params on the server.)\n const activeTree = parentTree[1][parallelRouterKey]\n const maybeParentSlots = parentCacheNode.slots\n if (activeTree === undefined || maybeParentSlots === null) {\n // Could not find a matching segment. The client tree is inconsistent with\n // the server tree. Suspend indefinitely; the router will have already\n // detected the inconsistency when handling the server response, and\n // triggered a refresh of the page to recover.\n use(unresolvedThenable) as never\n }\n\n let maybeValidationBoundaryId: string | null = null\n if (typeof window === 'undefined' && process.env.__NEXT_CACHE_COMPONENTS) {\n maybeValidationBoundaryId = use(InstantValidationBoundaryContext)\n }\n\n const activeSegment = activeTree[0]\n const activeCacheNode = maybeParentSlots![parallelRouterKey] ?? null\n const activeStateKey = createRouterCacheKey(activeSegment, true) // no search params\n\n // At each level of the route tree, not only do we render the currently\n // active segment — we also render the last N segments that were active at\n // this level inside a hidden <Activity> boundary, to preserve their state\n // if or when the user navigates to them again.\n //\n // bfcacheEntry is a linked list of FlightRouterStates.\n let bfcacheEntry: RouterBFCacheEntry | null = useRouterBFCache(\n activeTree,\n activeCacheNode,\n activeStateKey\n )\n let children: Array<React.ReactNode> = []\n do {\n const tree = bfcacheEntry.tree\n const cacheNode = bfcacheEntry.cacheNode\n const stateKey = bfcacheEntry.stateKey\n const segment = tree[0]\n\n /*\n - Error boundary\n - Only renders error boundary if error component is provided.\n - Rendered for each segment to ensure they have their own error state.\n - When gracefully degrade for bots, skip rendering error boundary.\n - Loading boundary\n - Only renders suspense boundary if loading components is provided.\n - Rendered for each segment to ensure they have their own loading state.\n - Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch.\n */\n\n let segmentBoundaryTriggerNode: React.ReactNode = null\n let segmentViewStateNode: React.ReactNode = null\n if (process.env.NODE_ENV !== 'production') {\n const { SegmentBoundaryTriggerNode, SegmentViewStateNode } =\n require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')\n\n const pagePrefix = normalizeAppPath(url)\n segmentViewStateNode = (\n <SegmentViewStateNode key={pagePrefix} page={pagePrefix} />\n )\n\n segmentBoundaryTriggerNode = (\n <>\n <SegmentBoundaryTriggerNode />\n </>\n )\n }\n\n let params = parentParams\n if (Array.isArray(segment)) {\n // This segment contains a route param. Accumulate these as we traverse\n // down the router tree. The result represents the set of params that\n // the layout/page components are permitted to access below this point.\n const paramName = segment[0]\n const paramCacheKey = segment[1]\n const paramType = segment[2]\n const paramValue = getParamValueFromCacheKey(paramCacheKey, paramType)\n if (paramValue !== null) {\n params = {\n ...parentParams,\n [paramName]: paramValue,\n }\n }\n }\n\n const debugName = getBoundaryDebugNameFromSegment(segment)\n // `debugNameContext` represents the nearest non-\"virtual\" parent segment.\n // `getBoundaryDebugNameFromSegment` returns undefined for virtual segments.\n // So if `debugName` is undefined, the context is passed through unchanged.\n const childDebugNameContext = debugName ?? debugNameContext\n\n // In practical terms, clicking this name in the Suspense DevTools\n // should select the child slots of that layout.\n //\n // So the name we apply to the Activity boundary is actually based on\n // the nearest parent segments.\n //\n // We skip over \"virtual\" parents, i.e. ones inserted by Next.js that\n // don't correspond to application-defined code.\n const isVirtual = debugName === undefined\n const debugNameToDisplay = isVirtual ? undefined : debugNameContext\n\n let templateValue = (\n <ScrollAndMaybeFocusHandler cacheNode={cacheNode}>\n <ErrorBoundary\n errorComponent={error}\n errorStyles={errorStyles}\n errorScripts={errorScripts}\n >\n <LoadingBoundary\n name={debugNameToDisplay}\n // TODO: The loading module data for a segment is stored on the\n // parent, then applied to each of that parent segment's\n // parallel route slots. In the simple case where there's only\n // one parallel route (the `children` slot), this is no\n // different from if the loading module data were stored on the\n // child directly. But I'm not sure this actually makes sense\n // when there are multiple parallel routes. It's not a huge\n // issue because you always have the option to define a narrower\n // loading boundary for a particular slot. But this sort of\n // smells like an implementation accident to me.\n loading={parentLoadingData}\n >\n <HTTPAccessFallbackBoundary\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n >\n <RedirectBoundary>\n <InnerLayoutRouter\n url={url}\n tree={tree}\n params={params}\n cacheNode={cacheNode}\n segmentPath={segmentPath}\n debugNameContext={childDebugNameContext}\n isActive={isActive && stateKey === activeStateKey}\n />\n {segmentBoundaryTriggerNode}\n </RedirectBoundary>\n </HTTPAccessFallbackBoundary>\n </LoadingBoundary>\n </ErrorBoundary>\n {segmentViewStateNode}\n </ScrollAndMaybeFocusHandler>\n )\n\n if (\n typeof window === 'undefined' &&\n process.env.__NEXT_CACHE_COMPONENTS &&\n typeof maybeValidationBoundaryId === 'string'\n ) {\n templateValue = (\n <RenderValidationBoundaryAtThisLevel id={maybeValidationBoundaryId}>\n {templateValue}\n </RenderValidationBoundaryAtThisLevel>\n )\n }\n\n let child = (\n <TemplateContext.Provider key={stateKey} value={templateValue}>\n {templateStyles}\n {templateScripts}\n {template}\n </TemplateContext.Provider>\n )\n\n if (process.env.NODE_ENV !== 'production') {\n const { SegmentStateProvider } =\n require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')\n\n child = (\n <SegmentStateProvider key={stateKey}>\n {child}\n {segmentViewBoundaries}\n </SegmentStateProvider>\n )\n }\n\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n child = (\n <Activity\n name={debugNameToDisplay}\n key={stateKey}\n mode={stateKey === activeStateKey ? 'visible' : 'hidden'}\n >\n {child}\n </Activity>\n )\n }\n\n children.push(child)\n\n bfcacheEntry = bfcacheEntry.next\n } while (bfcacheEntry !== null)\n\n return children\n}\n\nfunction getBoundaryDebugNameFromSegment(segment: Segment): string | undefined {\n if (segment === '/') {\n // Reached the root\n return '/'\n }\n if (typeof segment === 'string') {\n if (isVirtualLayout(segment)) {\n return undefined\n } else {\n return segment + '/'\n }\n }\n const paramCacheKey = segment[1]\n return paramCacheKey + '/'\n}\n\nfunction isVirtualLayout(segment: string): boolean {\n return (\n // This is inserted by the loader. Uses double-underscore convention\n // (like __PAGE__ and __DEFAULT__) to avoid collisions with\n // user-defined route groups.\n segment === '(__SLOT__)'\n )\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js\"));\n","'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport { TemplateContext } from '../../shared/lib/app-router-context.shared-runtime'\n\nexport default function RenderFromTemplateContext(): JSX.Element {\n const children = useContext(TemplateContext)\n return <>{children}</>\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 * Describes the different fallback modes that a given page can have.\n */\nexport const enum FallbackMode {\n /**\n * A BLOCKING_STATIC_RENDER fallback will block the request until the page is\n * generated. No fallback page will be rendered, and users will have to wait\n * to render the page.\n */\n BLOCKING_STATIC_RENDER = 'BLOCKING_STATIC_RENDER',\n\n /**\n * When set to PRERENDER, a fallback page will be sent to users in place of\n * forcing them to wait for the page to be generated. This allows the user to\n * see a rendered page earlier.\n */\n PRERENDER = 'PRERENDER',\n\n /**\n * When set to NOT_FOUND, pages that are not already prerendered will result\n * in a not found response.\n */\n NOT_FOUND = 'NOT_FOUND',\n}\n\n/**\n * The fallback value returned from the `getStaticPaths` function.\n */\nexport type GetStaticPathsFallback = boolean | 'blocking'\n\n/**\n * Parses the fallback field from the prerender manifest.\n *\n * @param fallbackField The fallback field from the prerender manifest.\n * @returns The fallback mode.\n */\nexport function parseFallbackField(\n fallbackField: string | boolean | null | undefined\n): FallbackMode | undefined {\n if (typeof fallbackField === 'string') {\n return FallbackMode.PRERENDER\n } else if (fallbackField === null) {\n return FallbackMode.BLOCKING_STATIC_RENDER\n } else if (fallbackField === false) {\n return FallbackMode.NOT_FOUND\n } else if (fallbackField === undefined) {\n return undefined\n } else {\n throw new Error(\n `Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false.`\n )\n }\n}\n\nexport function fallbackModeToFallbackField(\n fallback: FallbackMode,\n page: string | undefined\n): string | false | null {\n switch (fallback) {\n case FallbackMode.BLOCKING_STATIC_RENDER:\n return null\n case FallbackMode.NOT_FOUND:\n return false\n case FallbackMode.PRERENDER:\n if (!page) {\n throw new Error(\n `Invariant: expected a page to be provided when fallback mode is \"${fallback}\"`\n )\n }\n\n return page\n default:\n throw new Error(`Invalid fallback mode: ${fallback}`)\n }\n}\n\n/**\n * Parses the fallback from the static paths result.\n *\n * @param result The result from the static paths function.\n * @returns The fallback mode.\n */\nexport function parseStaticPathsResult(\n result: GetStaticPathsFallback\n): FallbackMode {\n if (result === true) {\n return FallbackMode.PRERENDER\n } else if (result === 'blocking') {\n return FallbackMode.BLOCKING_STATIC_RENDER\n } else {\n return FallbackMode.NOT_FOUND\n }\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js\"));\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","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js\"));\n","'use client'\n\n// This is a client component that only renders during SSR,\n// but will be replaced during streaming with an icon insertion script tag.\n// We don't want it to be presented anywhere so it's only visible during streaming,\n// right after the icon meta tags so that browser can pick it up as soon as it's rendered.\n// Note: we don't just emit the script here because we only need the script if it's not in the head,\n// and we need it to be hoistable alongside the other metadata but sync scripts are not hoistable.\nexport const IconMark = () => {\n if (typeof window !== 'undefined') {\n return null\n }\n return <meta name=\"«nxt-icon»\" />\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactDOM\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","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","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT';\nexport class StaticGenBailoutError extends Error {\n constructor(...args){\n super(...args), this.code = NEXT_STATIC_GEN_BAILOUT;\n }\n}\nexport function isStaticGenBailoutError(error) {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false;\n }\n return error.code === NEXT_STATIC_GEN_BAILOUT;\n}\n\n//# sourceMappingURL=static-generation-bailout.js.map","import { InvariantError } from '../../shared/lib/invariant-error';\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers';\nexport var RenderStage = /*#__PURE__*/ function(RenderStage) {\n RenderStage[RenderStage[\"Before\"] = 1] = \"Before\";\n //\n RenderStage[RenderStage[\"ShellStatic\"] = 11] = \"ShellStatic\";\n RenderStage[RenderStage[\"Static\"] = 13] = \"Static\";\n //\n RenderStage[RenderStage[\"ShellRuntime\"] = 21] = \"ShellRuntime\";\n RenderStage[RenderStage[\"Runtime\"] = 23] = \"Runtime\";\n //\n RenderStage[RenderStage[\"Dynamic\"] = 30] = \"Dynamic\";\n //\n RenderStage[RenderStage[\"Abandoned\"] = 40] = \"Abandoned\";\n return RenderStage;\n}({});\nexport const RENDER_STAGE_ADVANCE_ORDER = [\n 11,\n 13,\n 21,\n 23,\n 30\n];\nexport function getNextStage(stage) {\n return RENDER_STAGE_ADVANCE_ORDER[RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1];\n}\nexport function isAdvanceableRenderStage(stage) {\n return 1 < stage && stage <= 30;\n}\nexport var SyncIOMode = /*#__PURE__*/ function(SyncIOMode) {\n /** Sync IO does not error in any stage. */ SyncIOMode[SyncIOMode[\"Untracked\"] = 1] = \"Untracked\";\n /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */ SyncIOMode[SyncIOMode[\"AllowedInRuntimeOrDynamic\"] = 2] = \"AllowedInRuntimeOrDynamic\";\n /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */ SyncIOMode[SyncIOMode[\"AllowedInDynamic\"] = 3] = \"AllowedInDynamic\";\n return SyncIOMode;\n}({});\nexport class StagedRenderingController {\n constructor({ abortSignal, abandonController, syncIO, finalStage }){\n this.currentStage = 1;\n this.syncInterruptReason = null;\n this.triggers = {\n [11]: createStageTrigger(),\n [13]: createStageTrigger(),\n //\n [21]: createStageTrigger(),\n [23]: createStageTrigger(),\n //\n [30]: createStageTrigger()\n };\n this.abortSignal = abortSignal;\n this.abandonController = abandonController;\n this.syncIOMode = syncIO;\n this.finalStage = finalStage;\n if (abortSignal) {\n abortSignal.addEventListener('abort', ()=>{\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 if (abandonController) {\n abandonController.signal.addEventListener('abort', ()=>{\n this.abandonRender();\n }, {\n once: true\n });\n }\n }\n onStage(stage, callback) {\n addSyncTriggerListener(this.triggers[stage], callback);\n }\n shouldTrackSyncInterrupt() {\n if (this.syncIOMode === 1) {\n return false;\n }\n switch(this.currentStage){\n case 1:\n // If we haven't started the render yet, it can't be interrupted.\n return false;\n case 11:\n case 13:\n return true;\n case 21:\n case 23:\n {\n switch(this.syncIOMode){\n case 2:\n {\n // Before `partialPrefetching`: Sync IO only errors in static stages.\n return false;\n }\n case 3:\n {\n return true;\n }\n }\n // NOT a fallthrough, but eslint doesn't understand that\n }\n case 30:\n case 40:\n return false;\n default:\n this.currentStage;\n return false;\n }\n }\n /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */ syncInterruptCurrentStageWithReason(reason) {\n const { currentStage } = this;\n if (currentStage === 1 || currentStage === 30 || currentStage === 40) {\n // Not interruptible. Defensive noop.\n return;\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 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 = 40;\n return;\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(30);\n }\n getSyncInterruptReason() {\n return this.syncInterruptReason;\n }\n getStageEndTime(stage) {\n return this.triggers[getNextStage(stage)].triggeredAt ?? Infinity;\n }\n 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 const { currentStage } = this;\n if (currentStage === 1) {\n throw Object.defineProperty(new InvariantError(\"A render that hasn't started yet cannot be abandoned\"), \"__NEXT_ERROR_CODE\", {\n value: \"E1300\",\n enumerable: false,\n configurable: true\n });\n }\n if (currentStage === 30 || currentStage === 40) {\n // We shouldn't ever trigger an abandon in these. Defensive noop.\n return;\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(30);\n for(let i = nextStageIx; i < dynamicStageIx; i++){\n this.resolveStage(RENDER_STAGE_ADVANCE_ORDER[i]);\n }\n this.currentStage = 40;\n }\n advanceStage(targetStage) {\n if (this.finalStage !== null && targetStage > this.finalStage) {\n throw Object.defineProperty(new InvariantError(`Attempted to advance to stage ${RenderStage[targetStage]} but the render is limited to ${RenderStage[this.finalStage]}`), \"__NEXT_ERROR_CODE\", {\n value: \"E1302\",\n enumerable: false,\n configurable: true\n });\n }\n const { currentStage } = this;\n if (currentStage === 30 || currentStage === 40) {\n // Terminal stages, nowhere left to advance.\n return;\n }\n // If we're already at the target stage or beyond, do nothing.\n if (targetStage <= currentStage) {\n return;\n }\n this.currentStage = targetStage;\n // Resolve all stages between the current stage and the target.\n const nextStageIx = currentStage === 1 ? 0 : 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 resolveStage(stage) {\n fireStageTrigger(this.triggers[stage]);\n }\n getStagePromise(stage) {\n return this.triggers[stage].promise;\n }\n waitForStage(stage) {\n return this.getStagePromise(stage);\n }\n delayUntilStage(stage, displayName, resolvedValue) {\n const stagePromise = this.getStagePromise(stage);\n const promise = process.env.NODE_ENV === 'development' ? makeDevtoolsIOPromiseFromIOTrigger(stagePromise, displayName, resolvedValue) : stagePromise.then(()=>resolvedValue);\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}\nfunction ignoreReject() {}\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(ioTrigger, displayName, resolvedValue) {\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((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}\nfunction addSyncTriggerListener(trigger, listener) {\n if (trigger.state === 'pending') {\n trigger._listeners.push(listener);\n } else {\n listener();\n }\n}\nfunction createStageTrigger() {\n const { promise, resolve, reject } = createPromiseWithResolvers();\n return {\n state: 'pending',\n triggeredAt: null,\n promise,\n _listeners: [],\n _resolvePromise: resolve,\n _rejectPromise: reject\n };\n}\nfunction fireStageTrigger(trigger) {\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}\nfunction cancelStageTrigger(trigger, reason) {\n if (trigger.state !== 'pending') {\n return;\n }\n trigger.state = 'cancelled';\n // we didn't trigger, so don't save `triggeredAt`.\n // We're not gonna fire the listeners, we may as well free them.\n trigger._listeners.length = 0;\n // Suppress unhandled rejection warnings for promises that no one is awaiting.\n trigger.promise.catch(ignoreReject);\n trigger._rejectPromise(reason);\n}\n\n//# sourceMappingURL=staged-rendering.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { Suspense, cache } from 'react';\nimport { resolveMetadata, resolveViewport } from './resolve-metadata';\nimport { isHTTPAccessFallbackError } from '../../client/components/http-access-fallback/http-access-fallback';\nimport { createServerSearchParamsForMetadata } from '../../server/request/search-params';\nimport { createServerPathnameForMetadata } from '../../server/request/pathname';\nimport { isPostpone } from '../../server/lib/router-utils/is-postpone';\nimport { MetadataBoundary, ViewportBoundary, OutletBoundary } from '../framework/boundary-components';\nimport { getOrigin } from './generate/utils';\nimport { IconMark } from './generate/icon-mark';\n// Use a promise to share the status of the metadata resolving,\n// returning two components `MetadataTree` and `MetadataOutlet`\n// `MetadataTree` is the one that will be rendered at first in the content sequence for metadata tags.\n// `MetadataOutlet` is the one that will be rendered under error boundaries for metadata resolving errors.\n// In this way we can let the metadata tags always render successfully,\n// and the error will be caught by the error boundary and trigger fallbacks.\nexport function createMetadataComponents({ tree, pathname, parsedQuery, metadataContext, interpolatedParams, errorType, serveStreamingMetadata }) {\n const searchParams = createServerSearchParamsForMetadata(parsedQuery);\n const pathnameForMetadata = createServerPathnameForMetadata(pathname);\n async function Viewport() {\n const tags = await getResolvedViewport(tree, searchParams, interpolatedParams, errorType).catch((viewportErr)=>{\n // When Legacy PPR is enabled viewport can reject with a Postpone type\n // This will go away once Legacy PPR is removed and dynamic metadata will\n // stay pending until after the prerender is complete when it is dynamic\n if (isPostpone(viewportErr)) {\n throw viewportErr;\n }\n if (!errorType && isHTTPAccessFallbackError(viewportErr)) {\n return getNotFoundViewport(tree, searchParams, interpolatedParams).catch(()=>null);\n }\n // We're going to throw the error from the metadata outlet so we just render null here instead\n return null;\n });\n return tags;\n }\n Viewport.displayName = 'Next.Viewport';\n function ViewportWrapper() {\n return /*#__PURE__*/ _jsx(ViewportBoundary, {\n children: /*#__PURE__*/ _jsx(Viewport, {})\n });\n }\n async function Metadata() {\n const tags = await getResolvedMetadata(tree, pathnameForMetadata, searchParams, interpolatedParams, metadataContext, errorType).catch((metadataErr)=>{\n // When Legacy PPR is enabled metadata can reject with a Postpone type\n // This will go away once Legacy PPR is removed and dynamic metadata will\n // stay pending until after the prerender is complete when it is dynamic\n if (isPostpone(metadataErr)) {\n throw metadataErr;\n }\n if (!errorType && isHTTPAccessFallbackError(metadataErr)) {\n return getNotFoundMetadata(tree, pathnameForMetadata, searchParams, interpolatedParams, metadataContext).catch(()=>null);\n }\n // We're going to throw the error from the metadata outlet so we just render null here instead\n return null;\n });\n return tags;\n }\n Metadata.displayName = 'Next.Metadata';\n function MetadataWrapper() {\n // TODO: We shouldn't change what we render based on whether we are streaming or not.\n // If we aren't streaming we should just block the response until we have resolved the\n // metadata.\n if (!serveStreamingMetadata) {\n return /*#__PURE__*/ _jsx(MetadataBoundary, {\n children: /*#__PURE__*/ _jsx(Metadata, {})\n });\n }\n return /*#__PURE__*/ _jsx(\"div\", {\n hidden: true,\n children: /*#__PURE__*/ _jsx(MetadataBoundary, {\n children: /*#__PURE__*/ _jsx(Suspense, {\n name: \"Next.Metadata\",\n children: /*#__PURE__*/ _jsx(Metadata, {})\n })\n })\n });\n }\n function MetadataOutlet() {\n const pendingOutlet = Promise.all([\n getResolvedMetadata(tree, pathnameForMetadata, searchParams, interpolatedParams, metadataContext, errorType),\n getResolvedViewport(tree, searchParams, interpolatedParams, errorType)\n ]).then(()=>null);\n // TODO: We shouldn't change what we render based on whether we are streaming or not.\n // If we aren't streaming we should just block the response until we have resolved the\n // metadata.\n if (!serveStreamingMetadata) {\n return /*#__PURE__*/ _jsx(OutletBoundary, {\n children: pendingOutlet\n });\n }\n return /*#__PURE__*/ _jsx(OutletBoundary, {\n children: /*#__PURE__*/ _jsx(Suspense, {\n name: \"Next.MetadataOutlet\",\n children: pendingOutlet\n })\n });\n }\n MetadataOutlet.displayName = 'Next.MetadataOutlet';\n return {\n Viewport: ViewportWrapper,\n Metadata: MetadataWrapper,\n MetadataOutlet\n };\n}\nconst getResolvedMetadata = cache(getResolvedMetadataImpl);\nasync function getResolvedMetadataImpl(tree, pathname, searchParams, interpolatedParams, metadataContext, errorType) {\n const errorConvention = errorType === 'redirect' ? undefined : errorType;\n return renderMetadata(tree, pathname, searchParams, interpolatedParams, metadataContext, errorConvention);\n}\nconst getNotFoundMetadata = cache(getNotFoundMetadataImpl);\nasync function getNotFoundMetadataImpl(tree, pathname, searchParams, interpolatedParams, metadataContext) {\n const notFoundErrorConvention = 'not-found';\n return renderMetadata(tree, pathname, searchParams, interpolatedParams, metadataContext, notFoundErrorConvention);\n}\nconst getResolvedViewport = cache(getResolvedViewportImpl);\nasync function getResolvedViewportImpl(tree, searchParams, interpolatedParams, errorType) {\n const errorConvention = errorType === 'redirect' ? undefined : errorType;\n return renderViewport(tree, searchParams, interpolatedParams, errorConvention);\n}\nconst getNotFoundViewport = cache(getNotFoundViewportImpl);\nasync function getNotFoundViewportImpl(tree, searchParams, interpolatedParams) {\n const notFoundErrorConvention = 'not-found';\n return renderViewport(tree, searchParams, interpolatedParams, notFoundErrorConvention);\n}\nasync function renderMetadata(tree, pathname, searchParams, interpolatedParams, metadataContext, errorConvention) {\n const resolvedMetadata = await resolveMetadata(tree, pathname, searchParams, errorConvention, interpolatedParams, metadataContext);\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: createMetadataElements(resolvedMetadata)\n });\n}\nasync function renderViewport(tree, searchParams, interpolatedParams, errorConvention) {\n const resolvedViewport = await resolveViewport(tree, searchParams, errorConvention, interpolatedParams);\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: createViewportElements(resolvedViewport)\n });\n}\n// ---------------------------------------------------------------------------\n// Viewport tag rendering\n// ---------------------------------------------------------------------------\nfunction createViewportElements(viewport) {\n const tags = [];\n let i = 0;\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n charSet: \"utf-8\"\n }, i++));\n // Build viewport content string from layout properties\n const viewportParts = [];\n if (viewport.width != null) {\n viewportParts.push(`width=${viewport.width}`);\n }\n if (viewport.height != null) {\n viewportParts.push(`height=${viewport.height}`);\n }\n if (viewport.initialScale != null) {\n viewportParts.push(`initial-scale=${viewport.initialScale}`);\n }\n if (viewport.minimumScale != null) {\n viewportParts.push(`minimum-scale=${viewport.minimumScale}`);\n }\n if (viewport.maximumScale != null) {\n viewportParts.push(`maximum-scale=${viewport.maximumScale}`);\n }\n if (viewport.userScalable != null) {\n viewportParts.push(`user-scalable=${viewport.userScalable ? 'yes' : 'no'}`);\n }\n if (viewport.viewportFit) {\n viewportParts.push(`viewport-fit=${viewport.viewportFit}`);\n }\n if (viewport.interactiveWidget) {\n viewportParts.push(`interactive-widget=${viewport.interactiveWidget}`);\n }\n if (viewportParts.length) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"viewport\",\n content: viewportParts.join(', ')\n }, i++));\n }\n if (viewport.themeColor) {\n for (const themeColor of viewport.themeColor){\n if (themeColor.media) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"theme-color\",\n content: themeColor.color,\n media: themeColor.media\n }, i++));\n } else {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"theme-color\",\n content: themeColor.color\n }, i++));\n }\n }\n }\n if (viewport.colorScheme) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"color-scheme\",\n content: viewport.colorScheme\n }, i++));\n }\n return tags;\n}\n// ---------------------------------------------------------------------------\n// Metadata tag rendering\n// ---------------------------------------------------------------------------\nfunction createMetadataElements(metadata) {\n var _metadata_robots, _metadata_robots1;\n const tags = [];\n let i = 0;\n // --- Title ---\n if (metadata.title !== null && metadata.title.absolute) {\n tags.push(/*#__PURE__*/ _jsx(\"title\", {\n children: metadata.title.absolute\n }, i++));\n }\n // --- Basic meta tags ---\n if (metadata.description) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"description\",\n content: metadata.description\n }, i++));\n }\n if (metadata.applicationName) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"application-name\",\n content: metadata.applicationName\n }, i++));\n }\n // --- Authors ---\n if (metadata.authors) {\n for (const author of metadata.authors){\n if (author.url) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"author\",\n href: author.url.toString()\n }, i++));\n }\n if (author.name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"author\",\n content: author.name\n }, i++));\n }\n }\n }\n // --- Manifest ---\n if (metadata.manifest) {\n const manifestOrigin = getOrigin(metadata.manifest);\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"manifest\",\n href: metadata.manifest.toString(),\n crossOrigin: !manifestOrigin && process.env.VERCEL_ENV === 'preview' ? 'use-credentials' : undefined\n }, i++));\n }\n if (metadata.generator) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"generator\",\n content: metadata.generator\n }, i++));\n }\n if (metadata.keywords && metadata.keywords.length) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"keywords\",\n content: metadata.keywords.join(',')\n }, i++));\n }\n if (metadata.referrer) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"referrer\",\n content: metadata.referrer\n }, i++));\n }\n if (metadata.creator) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"creator\",\n content: metadata.creator\n }, i++));\n }\n if (metadata.publisher) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"publisher\",\n content: metadata.publisher\n }, i++));\n }\n if ((_metadata_robots = metadata.robots) == null ? void 0 : _metadata_robots.basic) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"robots\",\n content: metadata.robots.basic\n }, i++));\n }\n if ((_metadata_robots1 = metadata.robots) == null ? void 0 : _metadata_robots1.googleBot) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"googlebot\",\n content: metadata.robots.googleBot\n }, i++));\n }\n if (metadata.abstract) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"abstract\",\n content: metadata.abstract\n }, i++));\n }\n // --- Link rel arrays ---\n if (metadata.archives) {\n for (const archive of metadata.archives){\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"archives\",\n href: archive\n }, i++));\n }\n }\n if (metadata.assets) {\n for (const asset of metadata.assets){\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"assets\",\n href: asset\n }, i++));\n }\n }\n if (metadata.bookmarks) {\n for (const bookmark of metadata.bookmarks){\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"bookmarks\",\n href: bookmark\n }, i++));\n }\n }\n // --- Pagination ---\n if (metadata.pagination) {\n if (metadata.pagination.previous) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"prev\",\n href: metadata.pagination.previous\n }, i++));\n }\n if (metadata.pagination.next) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"next\",\n href: metadata.pagination.next\n }, i++));\n }\n }\n if (metadata.category) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"category\",\n content: metadata.category\n }, i++));\n }\n if (metadata.classification) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"classification\",\n content: metadata.classification\n }, i++));\n }\n // --- Other (arbitrary name/value pairs) ---\n if (metadata.other) {\n for (const [name, content] of Object.entries(metadata.other)){\n if (Array.isArray(content)) {\n for (const contentItem of content){\n if (contentItem != null && contentItem !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: name,\n content: String(contentItem)\n }, i++));\n }\n }\n } else if (content != null && content !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: name,\n content: String(content)\n }, i++));\n }\n }\n }\n // --- Alternates ---\n if (metadata.alternates) {\n const { canonical, languages, media, types } = metadata.alternates;\n if (canonical && canonical.url) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"canonical\",\n href: canonical.url.toString(),\n ...canonical.title ? {\n title: canonical.title\n } : undefined\n }, i++));\n }\n if (languages) {\n for (const [locale, descriptors] of Object.entries(languages)){\n if (descriptors) {\n for (const descriptor of descriptors){\n if (descriptor.url) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"alternate\",\n hrefLang: locale,\n href: descriptor.url.toString(),\n ...descriptor.title ? {\n title: descriptor.title\n } : undefined\n }, i++));\n }\n }\n }\n }\n }\n if (media) {\n for (const [mediaName, descriptors] of Object.entries(media)){\n if (descriptors) {\n for (const descriptor of descriptors){\n if (descriptor.url) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"alternate\",\n media: mediaName,\n href: descriptor.url.toString(),\n ...descriptor.title ? {\n title: descriptor.title\n } : undefined\n }, i++));\n }\n }\n }\n }\n }\n if (types) {\n for (const [type, descriptors] of Object.entries(types)){\n if (descriptors) {\n for (const descriptor of descriptors){\n if (descriptor.url) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: \"alternate\",\n type: type,\n href: descriptor.url.toString(),\n ...descriptor.title ? {\n title: descriptor.title\n } : undefined\n }, i++));\n }\n }\n }\n }\n }\n }\n // --- iTunes ---\n if (metadata.itunes) {\n const { appId, appArgument } = metadata.itunes;\n let itunesContent = `app-id=${appId}`;\n if (appArgument) {\n itunesContent += `, app-argument=${appArgument}`;\n }\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"apple-itunes-app\",\n content: itunesContent\n }, i++));\n }\n // --- Facebook ---\n if (metadata.facebook) {\n if (metadata.facebook.appId) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"fb:app_id\",\n content: metadata.facebook.appId\n }, i++));\n }\n if (metadata.facebook.admins) {\n for (const admin of metadata.facebook.admins){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"fb:admins\",\n content: admin\n }, i++));\n }\n }\n }\n // --- Pinterest ---\n if (metadata.pinterest && metadata.pinterest.richPin !== undefined) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"pinterest-rich-pin\",\n content: metadata.pinterest.richPin.toString()\n }, i++));\n }\n // --- Format Detection ---\n if (metadata.formatDetection) {\n const formatDetectionKeys = [\n 'telephone',\n 'date',\n 'address',\n 'email',\n 'url'\n ];\n let formatContent = '';\n for (const key of formatDetectionKeys){\n if (metadata.formatDetection[key] === false) {\n if (formatContent) formatContent += ', ';\n formatContent += `${key}=no`;\n }\n }\n if (formatContent) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"format-detection\",\n content: formatContent\n }, i++));\n }\n }\n // --- Verification ---\n if (metadata.verification) {\n const verification = metadata.verification;\n if (verification.google) {\n for (const value of verification.google){\n if (value != null && value !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"google-site-verification\",\n content: String(value)\n }, i++));\n }\n }\n }\n if (verification.yahoo) {\n for (const value of verification.yahoo){\n if (value != null && value !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"y_key\",\n content: String(value)\n }, i++));\n }\n }\n }\n if (verification.yandex) {\n for (const value of verification.yandex){\n if (value != null && value !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"yandex-verification\",\n content: String(value)\n }, i++));\n }\n }\n }\n if (verification.me) {\n for (const value of verification.me){\n if (value != null && value !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"me\",\n content: String(value)\n }, i++));\n }\n }\n }\n if (verification.other) {\n for (const [name, values] of Object.entries(verification.other)){\n for (const value of values){\n if (value != null && value !== '') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: name,\n content: String(value)\n }, i++));\n }\n }\n }\n }\n }\n // --- Apple Web App ---\n if (metadata.appleWebApp) {\n const { capable, title, startupImage, statusBarStyle } = metadata.appleWebApp;\n if (capable) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"mobile-web-app-capable\",\n content: \"yes\"\n }, i++));\n }\n if (title) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"apple-mobile-web-app-title\",\n content: title\n }, i++));\n }\n if (startupImage) {\n for (const image of startupImage){\n if (image.media) {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n href: image.url,\n media: image.media,\n rel: \"apple-touch-startup-image\"\n }, i++));\n } else {\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n href: image.url,\n rel: \"apple-touch-startup-image\"\n }, i++));\n }\n }\n }\n if (statusBarStyle) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"apple-mobile-web-app-status-bar-style\",\n content: statusBarStyle\n }, i++));\n }\n }\n // --- Open Graph ---\n if (metadata.openGraph) {\n var _og_title;\n const og = metadata.openGraph;\n if (og.determiner) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:determiner\",\n content: og.determiner\n }, i++));\n }\n if ((_og_title = og.title) == null ? void 0 : _og_title.absolute) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:title\",\n content: og.title.absolute\n }, i++));\n }\n if (og.description) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:description\",\n content: og.description\n }, i++));\n }\n if (og.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:url\",\n content: og.url.toString()\n }, i++));\n }\n if (og.siteName) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:site_name\",\n content: og.siteName\n }, i++));\n }\n if (og.locale) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:locale\",\n content: og.locale\n }, i++));\n }\n if (og.countryName) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:country_name\",\n content: og.countryName\n }, i++));\n }\n if (og.ttl != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:ttl\",\n content: og.ttl.toString()\n }, i++));\n }\n // OG images\n if (og.images) {\n for (const image of og.images){\n if (typeof image === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image\",\n content: image\n }, i++));\n } else {\n if (image.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image\",\n content: String(image.url)\n }, i++));\n }\n if (image.secureUrl) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image:secure_url\",\n content: String(image.secureUrl)\n }, i++));\n }\n if (image.type) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image:type\",\n content: image.type\n }, i++));\n }\n if (image.width) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image:width\",\n content: String(image.width)\n }, i++));\n }\n if (image.height) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image:height\",\n content: String(image.height)\n }, i++));\n }\n if (image.alt) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:image:alt\",\n content: image.alt\n }, i++));\n }\n }\n }\n }\n // OG videos\n if (og.videos) {\n for (const video of og.videos){\n if (typeof video === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video\",\n content: video\n }, i++));\n } else {\n if (video.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video\",\n content: String(video.url)\n }, i++));\n }\n if (video.secureUrl) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video:secure_url\",\n content: String(video.secureUrl)\n }, i++));\n }\n if (video.type) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video:type\",\n content: video.type\n }, i++));\n }\n if (video.width) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video:width\",\n content: String(video.width)\n }, i++));\n }\n if (video.height) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:video:height\",\n content: String(video.height)\n }, i++));\n }\n }\n }\n }\n // OG audio\n if (og.audio) {\n for (const audio of og.audio){\n if (typeof audio === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:audio\",\n content: audio\n }, i++));\n } else {\n if (audio.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:audio\",\n content: String(audio.url)\n }, i++));\n }\n if (audio.secureUrl) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:audio:secure_url\",\n content: String(audio.secureUrl)\n }, i++));\n }\n if (audio.type) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:audio:type\",\n content: audio.type\n }, i++));\n }\n }\n }\n }\n // OG simple array properties\n if (og.emails) {\n for (const email of og.emails){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:email\",\n content: email\n }, i++));\n }\n }\n if (og.phoneNumbers) {\n for (const phone of og.phoneNumbers){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:phone_number\",\n content: phone\n }, i++));\n }\n }\n if (og.faxNumbers) {\n for (const fax of og.faxNumbers){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:fax_number\",\n content: fax\n }, i++));\n }\n }\n if (og.alternateLocale) {\n for (const locale of og.alternateLocale){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:locale:alternate\",\n content: locale\n }, i++));\n }\n }\n // OG type-specific tags\n if ('type' in og) {\n const ogType = og.type;\n switch(ogType){\n case 'website':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"website\"\n }, i++));\n break;\n case 'article':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"article\"\n }, i++));\n if (og.publishedTime) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:published_time\",\n content: og.publishedTime.toString()\n }, i++));\n }\n if (og.modifiedTime) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:modified_time\",\n content: og.modifiedTime.toString()\n }, i++));\n }\n if (og.expirationTime) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:expiration_time\",\n content: og.expirationTime.toString()\n }, i++));\n }\n if (og.authors) {\n for (const author of og.authors){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:author\",\n content: String(author)\n }, i++));\n }\n }\n if (og.section) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:section\",\n content: og.section\n }, i++));\n }\n if (og.tags) {\n for (const tag of og.tags){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"article:tag\",\n content: tag\n }, i++));\n }\n }\n break;\n case 'book':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"book\"\n }, i++));\n if (og.isbn) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"book:isbn\",\n content: og.isbn\n }, i++));\n }\n if (og.releaseDate) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"book:release_date\",\n content: og.releaseDate\n }, i++));\n }\n if (og.authors) {\n for (const author of og.authors){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"book:author\",\n content: String(author)\n }, i++));\n }\n }\n if (og.tags) {\n for (const tag of og.tags){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"book:tag\",\n content: tag\n }, i++));\n }\n }\n break;\n case 'profile':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"profile\"\n }, i++));\n if (og.firstName) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"profile:first_name\",\n content: og.firstName\n }, i++));\n }\n if (og.lastName) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"profile:last_name\",\n content: og.lastName\n }, i++));\n }\n if (og.username) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"profile:username\",\n content: og.username\n }, i++));\n }\n if (og.gender) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"profile:gender\",\n content: og.gender\n }, i++));\n }\n break;\n case 'music.song':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"music.song\"\n }, i++));\n if (og.duration != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:duration\",\n content: og.duration.toString()\n }, i++));\n }\n if (og.albums) {\n for (const album of og.albums){\n if (typeof album === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:album\",\n content: album\n }, i++));\n } else {\n if (album.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:album\",\n content: String(album.url)\n }, i++));\n }\n if (album.disc != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:album:disc\",\n content: String(album.disc)\n }, i++));\n }\n if (album.track != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:album:track\",\n content: String(album.track)\n }, i++));\n }\n }\n }\n }\n if (og.musicians) {\n for (const musician of og.musicians){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:musician\",\n content: String(musician)\n }, i++));\n }\n }\n break;\n case 'music.album':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"music.album\"\n }, i++));\n if (og.songs) {\n for (const song of og.songs){\n if (typeof song === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song\",\n content: song\n }, i++));\n } else {\n if (song.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song\",\n content: String(song.url)\n }, i++));\n }\n if (song.disc != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song:disc\",\n content: String(song.disc)\n }, i++));\n }\n if (song.track != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song:track\",\n content: String(song.track)\n }, i++));\n }\n }\n }\n }\n if (og.musicians) {\n for (const musician of og.musicians){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:musician\",\n content: String(musician)\n }, i++));\n }\n }\n if (og.releaseDate) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:release_date\",\n content: og.releaseDate\n }, i++));\n }\n break;\n case 'music.playlist':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"music.playlist\"\n }, i++));\n if (og.songs) {\n for (const song of og.songs){\n if (typeof song === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song\",\n content: song\n }, i++));\n } else {\n if (song.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song\",\n content: String(song.url)\n }, i++));\n }\n if (song.disc != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song:disc\",\n content: String(song.disc)\n }, i++));\n }\n if (song.track != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:song:track\",\n content: String(song.track)\n }, i++));\n }\n }\n }\n }\n if (og.creators) {\n for (const creator of og.creators){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:creator\",\n content: String(creator)\n }, i++));\n }\n }\n break;\n case 'music.radio_station':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"music.radio_station\"\n }, i++));\n if (og.creators) {\n for (const creator of og.creators){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"music:creator\",\n content: String(creator)\n }, i++));\n }\n }\n break;\n case 'video.movie':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"video.movie\"\n }, i++));\n if (og.actors) {\n for (const actor of og.actors){\n if (typeof actor === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor\",\n content: actor\n }, i++));\n } else {\n if (actor.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor\",\n content: String(actor.url)\n }, i++));\n }\n if (actor.role) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor:role\",\n content: actor.role\n }, i++));\n }\n }\n }\n }\n if (og.directors) {\n for (const director of og.directors){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:director\",\n content: String(director)\n }, i++));\n }\n }\n if (og.writers) {\n for (const writer of og.writers){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:writer\",\n content: String(writer)\n }, i++));\n }\n }\n if (og.duration != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:duration\",\n content: String(og.duration)\n }, i++));\n }\n if (og.releaseDate) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:release_date\",\n content: og.releaseDate\n }, i++));\n }\n if (og.tags) {\n for (const tag of og.tags){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:tag\",\n content: tag\n }, i++));\n }\n }\n break;\n case 'video.episode':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"video.episode\"\n }, i++));\n if (og.actors) {\n for (const actor of og.actors){\n if (typeof actor === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor\",\n content: actor\n }, i++));\n } else {\n if (actor.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor\",\n content: String(actor.url)\n }, i++));\n }\n if (actor.role) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:actor:role\",\n content: actor.role\n }, i++));\n }\n }\n }\n }\n if (og.directors) {\n for (const director of og.directors){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:director\",\n content: String(director)\n }, i++));\n }\n }\n if (og.writers) {\n for (const writer of og.writers){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:writer\",\n content: String(writer)\n }, i++));\n }\n }\n if (og.duration != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:duration\",\n content: String(og.duration)\n }, i++));\n }\n if (og.releaseDate) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:release_date\",\n content: og.releaseDate\n }, i++));\n }\n if (og.tags) {\n for (const tag of og.tags){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:tag\",\n content: tag\n }, i++));\n }\n }\n if (og.series) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"video:series\",\n content: String(og.series)\n }, i++));\n }\n break;\n case 'video.tv_show':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"video.tv_show\"\n }, i++));\n break;\n case 'video.other':\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"og:type\",\n content: \"video.other\"\n }, i++));\n break;\n default:\n const _exhaustiveCheck = ogType;\n throw Object.defineProperty(new Error(`Invalid OpenGraph type: ${_exhaustiveCheck}`), \"__NEXT_ERROR_CODE\", {\n value: \"E237\",\n enumerable: false,\n configurable: true\n });\n }\n }\n }\n // --- Twitter ---\n if (metadata.twitter) {\n var _tw_title;\n const tw = metadata.twitter;\n const { card } = tw;\n if (card) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:card\",\n content: card\n }, i++));\n }\n if (tw.site) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:site\",\n content: tw.site\n }, i++));\n }\n if (tw.siteId) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:site:id\",\n content: tw.siteId\n }, i++));\n }\n if (tw.creator) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:creator\",\n content: tw.creator\n }, i++));\n }\n if (tw.creatorId) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:creator:id\",\n content: tw.creatorId\n }, i++));\n }\n if ((_tw_title = tw.title) == null ? void 0 : _tw_title.absolute) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:title\",\n content: tw.title.absolute\n }, i++));\n }\n if (tw.description) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:description\",\n content: tw.description\n }, i++));\n }\n // Twitter images\n if (tw.images) {\n for (const image of tw.images){\n if (typeof image === 'string') {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image\",\n content: image\n }, i++));\n } else {\n if (image.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image\",\n content: String(image.url)\n }, i++));\n }\n if (image.alt) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image:alt\",\n content: image.alt\n }, i++));\n }\n if (image.secureUrl) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image:secure_url\",\n content: String(image.secureUrl)\n }, i++));\n }\n if (image.type) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image:type\",\n content: image.type\n }, i++));\n }\n if (image.width) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image:width\",\n content: String(image.width)\n }, i++));\n }\n if (image.height) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:image:height\",\n content: String(image.height)\n }, i++));\n }\n }\n }\n }\n // Twitter player cards\n if (card === 'player') {\n for (const player of tw.players){\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:player\",\n content: player.playerUrl.toString()\n }, i++));\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:player:stream\",\n content: player.streamUrl.toString()\n }, i++));\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:player:width\",\n content: String(player.width)\n }, i++));\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: \"twitter:player:height\",\n content: String(player.height)\n }, i++));\n }\n }\n // Twitter app cards\n if (card === 'app') {\n const { app } = tw;\n for (const platform of [\n 'iphone',\n 'ipad',\n 'googleplay'\n ]){\n var _app_url;\n if (app.name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: `twitter:app:name:${platform}`,\n content: app.name\n }, i++));\n }\n if (app.id[platform]) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: `twitter:app:id:${platform}`,\n content: String(app.id[platform])\n }, i++));\n }\n if ((_app_url = app.url) == null ? void 0 : _app_url[platform]) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n name: `twitter:app:url:${platform}`,\n content: app.url[platform].toString()\n }, i++));\n }\n }\n }\n }\n // --- App Links ---\n if (metadata.appLinks) {\n const appLinks = metadata.appLinks;\n // iOS / iPhone / iPad (AppLinksApple: url, app_store_id, app_name)\n if (appLinks.ios) {\n for (const item of appLinks.ios){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ios:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_store_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ios:app_store_id\",\n content: String(item.app_store_id)\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ios:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n if (appLinks.iphone) {\n for (const item of appLinks.iphone){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:iphone:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_store_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:iphone:app_store_id\",\n content: String(item.app_store_id)\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:iphone:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n if (appLinks.ipad) {\n for (const item of appLinks.ipad){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ipad:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_store_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ipad:app_store_id\",\n content: String(item.app_store_id)\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:ipad:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n // Android (AppLinksAndroid: package, url, class, app_name)\n if (appLinks.android) {\n for (const item of appLinks.android){\n if (item.package) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:android:package\",\n content: item.package\n }, i++));\n }\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:android:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.class) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:android:class\",\n content: item.class\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:android:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n // Windows Phone (AppLinksWindows: url, app_id, app_name)\n if (appLinks.windows_phone) {\n for (const item of appLinks.windows_phone){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_phone:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_phone:app_id\",\n content: item.app_id\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_phone:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n // Windows (AppLinksWindows: url, app_id, app_name)\n if (appLinks.windows) {\n for (const item of appLinks.windows){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows:app_id\",\n content: item.app_id\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n // Windows Universal (AppLinksWindows: url, app_id, app_name)\n if (appLinks.windows_universal) {\n for (const item of appLinks.windows_universal){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_universal:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.app_id) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_universal:app_id\",\n content: item.app_id\n }, i++));\n }\n if (item.app_name) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:windows_universal:app_name\",\n content: item.app_name\n }, i++));\n }\n }\n }\n // Web (AppLinksWeb: url, should_fallback)\n if (appLinks.web) {\n for (const item of appLinks.web){\n if (item.url) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:web:url\",\n content: String(item.url)\n }, i++));\n }\n if (item.should_fallback != null) {\n tags.push(/*#__PURE__*/ _jsx(\"meta\", {\n property: \"al:web:should_fallback\",\n content: String(item.should_fallback)\n }, i++));\n }\n }\n }\n }\n // --- Icons ---\n if (metadata.icons) {\n const { shortcut, icon, apple, other } = metadata.icons;\n const hasIcon = Boolean((shortcut == null ? void 0 : shortcut.length) || (icon == null ? void 0 : icon.length) || (apple == null ? void 0 : apple.length) || (other == null ? void 0 : other.length));\n if (shortcut) {\n for (const ic of shortcut){\n const { url, rel, ...props } = ic;\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: rel || 'shortcut icon',\n href: url.toString(),\n ...props\n }, i++));\n }\n }\n if (icon) {\n for (const ic of icon){\n const { url, rel, ...props } = ic;\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: rel || 'icon',\n href: url.toString(),\n ...props\n }, i++));\n }\n }\n if (apple) {\n for (const ic of apple){\n const { url, rel, ...props } = ic;\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: rel || 'apple-touch-icon',\n href: url.toString(),\n ...props\n }, i++));\n }\n }\n if (other) {\n for (const ic of other){\n const { url, rel, ...props } = ic;\n tags.push(/*#__PURE__*/ _jsx(\"link\", {\n rel: rel || 'icon',\n href: url.toString(),\n ...props\n }, i++));\n }\n }\n if (hasIcon) {\n tags.push(/*#__PURE__*/ _jsx(IconMark, {}, i++));\n }\n }\n return tags;\n}\n\n//# sourceMappingURL=metadata.js.map","import { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param';\nimport { workAsyncStorage } from '../../server/app-render/work-async-storage.external';\nimport { InvariantError } from '../../shared/lib/invariant-error';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport 'server-only';\nimport { cache } from 'react';\nimport { createDefaultMetadata, createDefaultViewport } from './default-metadata';\nimport { resolveOpenGraph, resolveTwitter } from './resolvers/resolve-opengraph';\nimport { resolveTitle } from './resolvers/resolve-title';\nimport { resolveAsArrayOrUndefined } from './generate/utils';\nimport { getComponentTypeModule, getLayoutOrPageModule } from '../../server/lib/app-dir-module';\nimport { resolveAlternates, resolveAppleWebApp, resolveAppLinks, resolveRobots, resolveThemeColor, resolveVerification, resolveItunes, resolveFacebook, resolvePagination } from './resolvers/resolve-basics';\nimport { resolveIcons } from './resolvers/resolve-icons';\nimport { getTracer } from '../../server/lib/trace/tracer';\nimport { ResolveMetadataSpan } from '../../server/lib/trace/constants';\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment';\nimport * as Log from '../../build/output/log';\nimport { createServerParamsForMetadata } from '../../server/request/params';\nimport { getUseCacheFunctionInfo, isUseCacheFunction } from '../client-and-server-references';\nimport { createLazyResult } from '../../server/lib/lazy-result';\nfunction isFavicon(icon) {\n if (!icon) {\n return false;\n }\n // turbopack appends a hash to all images\n return (icon.url === '/favicon.ico' || icon.url.toString().startsWith('/favicon.ico?')) && icon.type === 'image/x-icon';\n}\nfunction convertUrlsToStrings(input) {\n if (input instanceof URL) {\n return input.toString();\n } else if (Array.isArray(input)) {\n return input.map((item)=>convertUrlsToStrings(item));\n } else if (input && typeof input === 'object') {\n const result = {};\n for (const [key, value] of Object.entries(input)){\n result[key] = convertUrlsToStrings(value);\n }\n return result;\n }\n return input;\n}\nfunction normalizeMetadataBase(metadataBase) {\n if (typeof metadataBase === 'string') {\n try {\n metadataBase = new URL(metadataBase);\n } catch {\n throw Object.defineProperty(new Error(`metadataBase is not a valid URL: ${metadataBase}`), \"__NEXT_ERROR_CODE\", {\n value: \"E850\",\n enumerable: false,\n configurable: true\n });\n }\n }\n return metadataBase;\n}\nasync function mergeStaticMetadata(metadataBase, source, target, staticFilesMetadata, metadataContext, titleTemplates, leafSegmentStaticIcons, pathname) {\n var _source_twitter, _source_openGraph;\n if (!staticFilesMetadata) return target;\n const { icon, apple, openGraph, twitter, manifest } = staticFilesMetadata;\n // Keep updating the static icons in the most leaf node\n if (icon) {\n leafSegmentStaticIcons.icon = icon;\n }\n if (apple) {\n leafSegmentStaticIcons.apple = apple;\n }\n // file based metadata is specified and current level metadata twitter.images is not specified\n if (twitter && !(source == null ? void 0 : (_source_twitter = source.twitter) == null ? void 0 : _source_twitter.hasOwnProperty('images'))) {\n const resolvedTwitter = resolveTwitter({\n ...target.twitter,\n images: twitter\n }, metadataBase, {\n ...metadataContext,\n isStaticMetadataRouteFile: true\n }, titleTemplates.twitter);\n target.twitter = convertUrlsToStrings(resolvedTwitter);\n }\n // file based metadata is specified and current level metadata openGraph.images is not specified\n if (openGraph && !(source == null ? void 0 : (_source_openGraph = source.openGraph) == null ? void 0 : _source_openGraph.hasOwnProperty('images'))) {\n const resolvedOpenGraph = await resolveOpenGraph({\n ...target.openGraph,\n images: openGraph\n }, metadataBase, pathname, {\n ...metadataContext,\n isStaticMetadataRouteFile: true\n }, titleTemplates.openGraph);\n target.openGraph = convertUrlsToStrings(resolvedOpenGraph);\n }\n if (manifest) {\n target.manifest = manifest;\n }\n return target;\n}\n/**\n * Merges the given metadata with the resolved metadata. Returns a new object.\n */ async function mergeMetadata(route, pathname, { metadata, resolvedMetadata, staticFilesMetadata, titleTemplates, metadataContext, buildState, leafSegmentStaticIcons }) {\n const newResolvedMetadata = structuredClone(resolvedMetadata);\n const metadataBase = normalizeMetadataBase((metadata == null ? void 0 : metadata.metadataBase) !== undefined ? metadata.metadataBase : resolvedMetadata.metadataBase);\n for(const key_ in metadata){\n const key = key_;\n switch(key){\n case 'title':\n {\n newResolvedMetadata.title = resolveTitle(metadata.title, titleTemplates.title);\n break;\n }\n case 'alternates':\n {\n newResolvedMetadata.alternates = convertUrlsToStrings(await resolveAlternates(metadata.alternates, metadataBase, pathname, metadataContext));\n break;\n }\n case 'openGraph':\n {\n newResolvedMetadata.openGraph = convertUrlsToStrings(await resolveOpenGraph(metadata.openGraph, metadataBase, pathname, metadataContext, titleTemplates.openGraph));\n break;\n }\n case 'twitter':\n {\n newResolvedMetadata.twitter = convertUrlsToStrings(resolveTwitter(metadata.twitter, metadataBase, metadataContext, titleTemplates.twitter));\n break;\n }\n case 'facebook':\n newResolvedMetadata.facebook = resolveFacebook(metadata.facebook);\n break;\n case 'verification':\n newResolvedMetadata.verification = resolveVerification(metadata.verification);\n break;\n case 'icons':\n {\n newResolvedMetadata.icons = convertUrlsToStrings(resolveIcons(metadata.icons));\n break;\n }\n case 'appleWebApp':\n newResolvedMetadata.appleWebApp = resolveAppleWebApp(metadata.appleWebApp);\n break;\n case 'appLinks':\n newResolvedMetadata.appLinks = convertUrlsToStrings(resolveAppLinks(metadata.appLinks));\n break;\n case 'robots':\n {\n newResolvedMetadata.robots = resolveRobots(metadata.robots);\n break;\n }\n case 'archives':\n case 'assets':\n case 'bookmarks':\n case 'keywords':\n {\n newResolvedMetadata[key] = resolveAsArrayOrUndefined(metadata[key]);\n break;\n }\n case 'authors':\n {\n newResolvedMetadata[key] = convertUrlsToStrings(resolveAsArrayOrUndefined(metadata.authors));\n break;\n }\n case 'itunes':\n {\n newResolvedMetadata[key] = await resolveItunes(metadata.itunes, metadataBase, pathname, metadataContext);\n break;\n }\n case 'pagination':\n {\n newResolvedMetadata.pagination = await resolvePagination(metadata.pagination, metadataBase, pathname, metadataContext);\n break;\n }\n // directly assign fields that fallback to null\n case 'abstract':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'applicationName':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'description':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'generator':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'creator':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'publisher':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'category':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'classification':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'referrer':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'formatDetection':\n newResolvedMetadata[key] = metadata[key] ?? null;\n break;\n case 'manifest':\n newResolvedMetadata[key] = convertUrlsToStrings(metadata[key]) ?? null;\n break;\n case 'pinterest':\n newResolvedMetadata[key] = convertUrlsToStrings(metadata[key]) ?? null;\n break;\n case 'other':\n newResolvedMetadata.other = Object.assign({}, newResolvedMetadata.other, metadata.other);\n if (metadata.other) {\n if ('apple-touch-fullscreen' in metadata.other) {\n buildState.warnings.add(`Use appleWebApp instead\\nRead more: https://nextjs.org/docs/app/api-reference/functions/generate-metadata`);\n }\n if ('apple-touch-icon-precomposed' in metadata.other) {\n buildState.warnings.add(`Use icons.apple instead\\nRead more: https://nextjs.org/docs/app/api-reference/functions/generate-metadata`);\n }\n }\n break;\n case 'metadataBase':\n newResolvedMetadata.metadataBase = metadataBase ? metadataBase.toString() : null;\n break;\n case 'apple-touch-fullscreen':\n {\n buildState.warnings.add(`Use appleWebApp instead\\nRead more: https://nextjs.org/docs/app/api-reference/functions/generate-metadata`);\n break;\n }\n case 'apple-touch-icon-precomposed':\n {\n buildState.warnings.add(`Use icons.apple instead\\nRead more: https://nextjs.org/docs/app/api-reference/functions/generate-metadata`);\n break;\n }\n case 'themeColor':\n case 'colorScheme':\n case 'viewport':\n if (metadata[key] != null) {\n buildState.warnings.add(`Unsupported metadata ${key} is configured in metadata export in ${route}. Please move it to viewport export instead.\\nRead more: https://nextjs.org/docs/app/api-reference/functions/generate-viewport`);\n }\n break;\n default:\n {\n key;\n }\n }\n }\n return mergeStaticMetadata(metadataBase, metadata, newResolvedMetadata, staticFilesMetadata, metadataContext, titleTemplates, leafSegmentStaticIcons, pathname);\n}\n/**\n * Merges the given viewport with the resolved viewport. Returns a new object.\n */ function mergeViewport({ resolvedViewport, viewport }) {\n const newResolvedViewport = structuredClone(resolvedViewport);\n if (viewport) {\n for(const key_ in viewport){\n const key = key_;\n switch(key){\n case 'themeColor':\n {\n newResolvedViewport.themeColor = resolveThemeColor(viewport.themeColor);\n break;\n }\n case 'colorScheme':\n newResolvedViewport.colorScheme = viewport.colorScheme || null;\n break;\n case 'width':\n case 'height':\n case 'initialScale':\n case 'minimumScale':\n case 'maximumScale':\n case 'userScalable':\n case 'viewportFit':\n case 'interactiveWidget':\n // always override the target with the source\n // @ts-ignore viewport properties\n newResolvedViewport[key] = viewport[key];\n break;\n default:\n key;\n }\n }\n }\n return newResolvedViewport;\n}\nfunction getDefinedViewport(mod, props, tracingProps) {\n if (typeof mod.generateViewport === 'function') {\n const { route } = tracingProps;\n const segmentProps = createSegmentProps(mod.generateViewport, props);\n return Object.assign((parent)=>getTracer().trace(ResolveMetadataSpan.generateViewport, {\n spanName: `generateViewport ${route}`,\n attributes: {\n 'next.page': route\n }\n }, ()=>mod.generateViewport(segmentProps, parent)), {\n $$original: mod.generateViewport\n });\n }\n return mod.viewport || null;\n}\nfunction getDefinedMetadata(mod, props, tracingProps) {\n if (typeof mod.generateMetadata === 'function') {\n const { route } = tracingProps;\n const segmentProps = createSegmentProps(mod.generateMetadata, props);\n return Object.assign((parent)=>getTracer().trace(ResolveMetadataSpan.generateMetadata, {\n spanName: `generateMetadata ${route}`,\n attributes: {\n 'next.page': route\n }\n }, ()=>mod.generateMetadata(segmentProps, parent)), {\n $$original: mod.generateMetadata\n });\n }\n return mod.metadata || null;\n}\n/**\n * If `fn` is a `'use cache'` function, we add special markers to the props,\n * that the cache wrapper reads and removes, before passing the props to the\n * user function.\n */ function createSegmentProps(fn, props) {\n return isUseCacheFunction(fn) ? 'searchParams' in props ? {\n ...props,\n $$isPage: true\n } : {\n ...props,\n $$isLayout: true\n } : props;\n}\nasync function collectStaticImagesFiles(metadata, props, type) {\n if (!(metadata == null ? void 0 : metadata[type])) return undefined;\n const iconPromises = metadata[type].map(async (imageModule)=>await imageModule(props));\n return (iconPromises == null ? void 0 : iconPromises.length) > 0 ? (await Promise.all(iconPromises)).flat() : undefined;\n}\nasync function resolveStaticMetadata(modules, props) {\n const { metadata } = modules;\n if (!metadata) return null;\n const [icon, apple, openGraph, twitter] = await Promise.all([\n collectStaticImagesFiles(metadata, props, 'icon'),\n collectStaticImagesFiles(metadata, props, 'apple'),\n collectStaticImagesFiles(metadata, props, 'openGraph'),\n collectStaticImagesFiles(metadata, props, 'twitter')\n ]);\n const staticMetadata = {\n icon,\n apple,\n openGraph,\n twitter,\n manifest: metadata.manifest\n };\n return staticMetadata;\n}\n// [layout.metadata, static files metadata] -> ... -> [page.metadata, static files metadata]\nasync function collectMetadata({ tree, metadataItems, errorMetadataItem, props, route, errorConvention }) {\n let mod;\n let modType;\n const hasErrorConventionComponent = Boolean(errorConvention && tree[2][errorConvention]);\n if (errorConvention) {\n mod = await getComponentTypeModule(tree, 'layout');\n modType = errorConvention;\n } else {\n const { mod: layoutOrPageMod, modType: layoutOrPageModType } = await getLayoutOrPageModule(tree);\n mod = layoutOrPageMod;\n modType = layoutOrPageModType;\n }\n if (modType) {\n route += `/${modType}`;\n }\n const staticFilesMetadata = await resolveStaticMetadata(tree[2], props);\n const metadataExport = mod ? getDefinedMetadata(mod, props, {\n route\n }) : null;\n metadataItems.push([\n metadataExport,\n staticFilesMetadata\n ]);\n if (hasErrorConventionComponent && errorConvention) {\n const errorMod = await getComponentTypeModule(tree, errorConvention);\n const errorMetadataExport = errorMod ? getDefinedMetadata(errorMod, props, {\n route\n }) : null;\n errorMetadataItem[0] = errorMetadataExport;\n errorMetadataItem[1] = staticFilesMetadata;\n }\n}\n// [layout.metadata, static files metadata] -> ... -> [page.metadata, static files metadata]\nasync function collectViewport({ tree, viewportItems, errorViewportItemRef, props, route, errorConvention }) {\n let mod;\n let modType;\n const hasErrorConventionComponent = Boolean(errorConvention && tree[2][errorConvention]);\n if (errorConvention) {\n mod = await getComponentTypeModule(tree, 'layout');\n modType = errorConvention;\n } else {\n const { mod: layoutOrPageMod, modType: layoutOrPageModType } = await getLayoutOrPageModule(tree);\n mod = layoutOrPageMod;\n modType = layoutOrPageModType;\n }\n if (modType) {\n route += `/${modType}`;\n }\n const viewportExport = mod ? getDefinedViewport(mod, props, {\n route\n }) : null;\n viewportItems.push(viewportExport);\n if (hasErrorConventionComponent && errorConvention) {\n const errorMod = await getComponentTypeModule(tree, errorConvention);\n const errorViewportExport = errorMod ? getDefinedViewport(errorMod, props, {\n route\n }) : null;\n errorViewportItemRef.current = errorViewportExport;\n }\n}\nconst resolveMetadataItems = cache(async function(tree, searchParams, errorConvention, interpolatedParams) {\n const parentParams = {};\n const metadataItems = [];\n const errorMetadataItem = [\n null,\n null\n ];\n const treePrefix = undefined;\n return resolveMetadataItemsImpl(metadataItems, tree, treePrefix, parentParams, null, searchParams, errorConvention, errorMetadataItem, interpolatedParams);\n});\nasync function resolveMetadataItemsImpl(metadataItems, tree, /** Provided tree can be nested subtree, this argument says what is the path of such subtree */ treePrefix, parentParams, parentOptionalCatchAllParamName, searchParams, errorConvention, errorMetadataItem, interpolatedParams) {\n const [segment, parallelRoutes, { page }] = tree;\n const currentTreePrefix = treePrefix && treePrefix.length ? [\n ...treePrefix,\n segment\n ] : [\n segment\n ];\n const isPage = typeof page !== 'undefined';\n // Handle dynamic segment params.\n let currentParams = parentParams;\n const segmentParam = getSegmentParam(segment);\n if (segmentParam) {\n const value = interpolatedParams[segmentParam.paramName];\n if (value !== null && value !== undefined) {\n currentParams = {\n ...parentParams,\n [segmentParam.paramName]: value\n };\n }\n }\n // Track optional catch-all params with no value (see comment in\n // create-component-tree.tsx for full explanation).\n const optionalCatchAllParamName = (segmentParam == null ? void 0 : segmentParam.paramType) === 'optional-catchall' && (interpolatedParams[segmentParam.paramName] === null || interpolatedParams[segmentParam.paramName] === undefined) ? segmentParam.paramName : parentOptionalCatchAllParamName;\n const params = createServerParamsForMetadata(currentParams, optionalCatchAllParamName);\n const props = isPage ? {\n params,\n searchParams\n } : {\n params\n };\n await collectMetadata({\n tree,\n metadataItems,\n errorMetadataItem,\n errorConvention,\n props,\n route: currentTreePrefix// __PAGE__ shouldn't be shown in a route\n .filter((s)=>s !== PAGE_SEGMENT_KEY).join('/')\n });\n for(const key in parallelRoutes){\n const childTree = parallelRoutes[key];\n await resolveMetadataItemsImpl(metadataItems, childTree, currentTreePrefix, currentParams, optionalCatchAllParamName, searchParams, errorConvention, errorMetadataItem, interpolatedParams);\n }\n if (Object.keys(parallelRoutes).length === 0 && errorConvention) {\n // If there are no parallel routes, place error metadata as the last item.\n // e.g. layout -> layout -> not-found\n metadataItems.push(errorMetadataItem);\n }\n return metadataItems;\n}\nconst resolveViewportItems = cache(async function(tree, searchParams, errorConvention, interpolatedParams) {\n const parentParams = {};\n const viewportItems = [];\n const errorViewportItemRef = {\n current: null\n };\n const treePrefix = undefined;\n return resolveViewportItemsImpl(viewportItems, tree, treePrefix, parentParams, null, searchParams, errorConvention, errorViewportItemRef, interpolatedParams);\n});\nasync function resolveViewportItemsImpl(viewportItems, tree, /** Provided tree can be nested subtree, this argument says what is the path of such subtree */ treePrefix, parentParams, parentOptionalCatchAllParamName, searchParams, errorConvention, errorViewportItemRef, interpolatedParams) {\n const [segment, parallelRoutes, { page }] = tree;\n const currentTreePrefix = treePrefix && treePrefix.length ? [\n ...treePrefix,\n segment\n ] : [\n segment\n ];\n const isPage = typeof page !== 'undefined';\n // Handle dynamic segment params.\n let currentParams = parentParams;\n const segmentParam = getSegmentParam(segment);\n if (segmentParam) {\n const value = interpolatedParams[segmentParam.paramName];\n if (value !== null && value !== undefined) {\n currentParams = {\n ...parentParams,\n [segmentParam.paramName]: value\n };\n }\n }\n // Track optional catch-all params with no value (see comment in\n // create-component-tree.tsx for full explanation).\n const optionalCatchAllParamName = (segmentParam == null ? void 0 : segmentParam.paramType) === 'optional-catchall' && (interpolatedParams[segmentParam.paramName] === null || interpolatedParams[segmentParam.paramName] === undefined) ? segmentParam.paramName : parentOptionalCatchAllParamName;\n const params = createServerParamsForMetadata(currentParams, optionalCatchAllParamName);\n let layerProps;\n if (isPage) {\n layerProps = {\n params,\n searchParams\n };\n } else {\n layerProps = {\n params\n };\n }\n await collectViewport({\n tree,\n viewportItems,\n errorViewportItemRef,\n errorConvention,\n props: layerProps,\n route: currentTreePrefix// __PAGE__ shouldn't be shown in a route\n .filter((s)=>s !== PAGE_SEGMENT_KEY).join('/')\n });\n for(const key in parallelRoutes){\n const childTree = parallelRoutes[key];\n await resolveViewportItemsImpl(viewportItems, childTree, currentTreePrefix, currentParams, optionalCatchAllParamName, searchParams, errorConvention, errorViewportItemRef, interpolatedParams);\n }\n if (Object.keys(parallelRoutes).length === 0 && errorConvention) {\n // If there are no parallel routes, place error metadata as the last item.\n // e.g. layout -> layout -> not-found\n viewportItems.push(errorViewportItemRef.current);\n }\n return viewportItems;\n}\nconst isTitleTruthy = (title)=>!!(title == null ? void 0 : title.absolute);\nconst hasTitle = (metadata)=>isTitleTruthy(metadata == null ? void 0 : metadata.title);\nfunction inheritFromMetadata(target, metadata) {\n if (target) {\n if (!hasTitle(target) && hasTitle(metadata)) {\n target.title = metadata.title;\n }\n if (!target.description && metadata.description) {\n target.description = metadata.description;\n }\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst commonOgKeys = [\n 'title',\n 'description',\n 'images'\n];\nfunction postProcessMetadata(metadata, favicon, titleTemplates, metadataContext) {\n const { openGraph, twitter } = metadata;\n if (openGraph) {\n // If there's openGraph information but not configured in twitter,\n // inherit them from openGraph metadata.\n let autoFillProps = {};\n const hasTwTitle = hasTitle(twitter);\n const hasTwDescription = twitter == null ? void 0 : twitter.description;\n const hasTwImages = Boolean((twitter == null ? void 0 : twitter.hasOwnProperty('images')) && twitter.images);\n if (!hasTwTitle) {\n if (isTitleTruthy(openGraph.title)) {\n autoFillProps.title = openGraph.title;\n } else if (metadata.title && isTitleTruthy(metadata.title)) {\n autoFillProps.title = metadata.title;\n }\n }\n if (!hasTwDescription) autoFillProps.description = openGraph.description || metadata.description || undefined;\n if (!hasTwImages) autoFillProps.images = openGraph.images;\n if (Object.keys(autoFillProps).length > 0) {\n const partialTwitter = resolveTwitter(autoFillProps, normalizeMetadataBase(metadata.metadataBase), metadataContext, titleTemplates.twitter);\n if (metadata.twitter) {\n metadata.twitter = Object.assign({}, metadata.twitter, {\n ...!hasTwTitle && {\n title: partialTwitter == null ? void 0 : partialTwitter.title\n },\n ...!hasTwDescription && {\n description: partialTwitter == null ? void 0 : partialTwitter.description\n },\n ...!hasTwImages && {\n images: partialTwitter == null ? void 0 : partialTwitter.images\n }\n });\n } else {\n metadata.twitter = convertUrlsToStrings(partialTwitter);\n }\n }\n }\n // If there's no title and description configured in openGraph or twitter,\n // use the title and description from metadata.\n inheritFromMetadata(openGraph, metadata);\n inheritFromMetadata(twitter, metadata);\n if (favicon) {\n if (!metadata.icons) {\n metadata.icons = {\n icon: [],\n apple: []\n };\n }\n metadata.icons.icon.unshift(favicon);\n }\n return metadata;\n}\nfunction prerenderMetadata(metadataItems) {\n // If the index is a function then it is a resolver and the next slot\n // is the corresponding result. If the index is not a function it is the result\n // itself.\n const resolversAndResults = [];\n for(let i = 0; i < metadataItems.length; i++){\n const metadataExport = metadataItems[i][0];\n getResult(resolversAndResults, metadataExport);\n }\n return resolversAndResults;\n}\nfunction prerenderViewport(viewportItems) {\n // If the index is a function then it is a resolver and the next slot\n // is the corresponding result. If the index is not a function it is the result\n // itself.\n const resolversAndResults = [];\n for(let i = 0; i < viewportItems.length; i++){\n const viewportExport = viewportItems[i];\n getResult(resolversAndResults, viewportExport);\n }\n return resolversAndResults;\n}\nconst noop = ()=>{};\nfunction getResult(resolversAndResults, exportForResult) {\n if (typeof exportForResult === 'function') {\n // If the function is a 'use cache' function that uses the parent data as\n // the second argument, we don't want to eagerly execute it during\n // metadata/viewport pre-rendering, as the parent data might also be\n // computed from another 'use cache' function. To ensure that the hanging\n // input abort signal handling works in this case (i.e. the depending\n // function waits for the cached input to resolve while encoding its args),\n // they must be called sequentially. This can be accomplished by wrapping\n // the call in a lazy promise, so that the original function is only called\n // when the result is actually awaited.\n const useCacheFunctionInfo = getUseCacheFunctionInfo(exportForResult.$$original);\n if (useCacheFunctionInfo && useCacheFunctionInfo.usedArgs[1]) {\n const promise = new Promise((resolve)=>resolversAndResults.push(resolve));\n resolversAndResults.push(createLazyResult(async ()=>exportForResult(promise)));\n } else {\n let result;\n if (useCacheFunctionInfo) {\n resolversAndResults.push(noop);\n // @ts-expect-error We intentionally omit the parent argument, because\n // we know from the check above that the 'use cache' function does not\n // use it.\n result = exportForResult();\n } else {\n result = exportForResult(new Promise((resolve)=>resolversAndResults.push(resolve)));\n }\n resolversAndResults.push(result);\n if (result instanceof Promise) {\n // since we eager execute generateMetadata and\n // they can reject at anytime we need to ensure\n // we attach the catch handler right away to\n // prevent unhandled rejections crashing the process\n result.catch((err)=>{\n return {\n __nextError: err\n };\n });\n }\n }\n } else if (typeof exportForResult === 'object') {\n resolversAndResults.push(exportForResult);\n } else {\n resolversAndResults.push(null);\n }\n}\nfunction freezeInDev(obj) {\n if (process.env.NODE_ENV === 'development') {\n return require('../../shared/lib/deep-freeze').deepFreeze(obj);\n }\n return obj;\n}\nexport async function accumulateMetadata(route, metadataItems, pathname, metadataContext) {\n let resolvedMetadata = createDefaultMetadata();\n let titleTemplates = {\n title: null,\n twitter: null,\n openGraph: null\n };\n const buildState = {\n warnings: new Set()\n };\n let favicon;\n // Collect the static icons in the most leaf node,\n // since we don't collect all the static metadata icons in the parent segments.\n const leafSegmentStaticIcons = {\n icon: [],\n apple: []\n };\n const resolversAndResults = prerenderMetadata(metadataItems);\n let resultIndex = 0;\n for(let i = 0; i < metadataItems.length; i++){\n var _staticFilesMetadata_icon;\n const staticFilesMetadata = metadataItems[i][1];\n // Treat favicon as special case, it should be the first icon in the list\n // i <= 1 represents root layout, and if current page is also at root\n if (i <= 1 && isFavicon(staticFilesMetadata == null ? void 0 : (_staticFilesMetadata_icon = staticFilesMetadata.icon) == null ? void 0 : _staticFilesMetadata_icon[0])) {\n var _staticFilesMetadata_icon1;\n const iconMod = staticFilesMetadata == null ? void 0 : (_staticFilesMetadata_icon1 = staticFilesMetadata.icon) == null ? void 0 : _staticFilesMetadata_icon1.shift();\n if (i === 0) favicon = iconMod;\n }\n let pendingMetadata = resolversAndResults[resultIndex++];\n if (typeof pendingMetadata === 'function') {\n // This metadata item had a `generateMetadata` and\n // we need to provide the currently resolved metadata\n // to it before we continue;\n const resolveParentMetadata = pendingMetadata;\n // we know that the next item is a result if this item\n // was a resolver\n pendingMetadata = resolversAndResults[resultIndex++];\n resolveParentMetadata(freezeInDev(resolvedMetadata));\n }\n // Otherwise the item was either null or a static export\n let metadata;\n if (isPromiseLike(pendingMetadata)) {\n metadata = await pendingMetadata;\n } else {\n metadata = pendingMetadata;\n }\n resolvedMetadata = await mergeMetadata(route, pathname, {\n resolvedMetadata,\n metadata,\n metadataContext,\n staticFilesMetadata,\n titleTemplates,\n buildState,\n leafSegmentStaticIcons\n });\n // If the layout is the same layer with page, skip the leaf layout and leaf page\n // The leaf layout and page are the last two items\n if (i < metadataItems.length - 2) {\n var _resolvedMetadata_title, _resolvedMetadata_openGraph, _resolvedMetadata_twitter;\n titleTemplates = {\n title: ((_resolvedMetadata_title = resolvedMetadata.title) == null ? void 0 : _resolvedMetadata_title.template) || null,\n openGraph: ((_resolvedMetadata_openGraph = resolvedMetadata.openGraph) == null ? void 0 : _resolvedMetadata_openGraph.title.template) || null,\n twitter: ((_resolvedMetadata_twitter = resolvedMetadata.twitter) == null ? void 0 : _resolvedMetadata_twitter.title.template) || null\n };\n }\n }\n if (leafSegmentStaticIcons.icon.length > 0 || leafSegmentStaticIcons.apple.length > 0) {\n if (!resolvedMetadata.icons) {\n resolvedMetadata.icons = {\n icon: [],\n apple: []\n };\n if (leafSegmentStaticIcons.icon.length > 0) {\n resolvedMetadata.icons.icon.unshift(...leafSegmentStaticIcons.icon);\n }\n if (leafSegmentStaticIcons.apple.length > 0) {\n resolvedMetadata.icons.apple.unshift(...leafSegmentStaticIcons.apple);\n }\n }\n }\n // Only log warnings if there are any, and only once after the metadata resolving process is finished\n if (buildState.warnings.size > 0) {\n for (const warning of buildState.warnings){\n Log.warn(warning);\n }\n }\n return postProcessMetadata(resolvedMetadata, favicon, titleTemplates, metadataContext);\n}\nexport async function accumulateViewport(viewportItems) {\n let resolvedViewport = createDefaultViewport();\n const resolversAndResults = prerenderViewport(viewportItems);\n let i = 0;\n while(i < resolversAndResults.length){\n let pendingViewport = resolversAndResults[i++];\n if (typeof pendingViewport === 'function') {\n // this viewport item had a `generateViewport` and\n // we need to provide the currently resolved viewport\n // to it before we continue;\n const resolveParentViewport = pendingViewport;\n // we know that the next item is a result if this item\n // was a resolver\n pendingViewport = resolversAndResults[i++];\n resolveParentViewport(freezeInDev(resolvedViewport));\n }\n // Otherwise the item was either null or a static export\n let viewport;\n if (isPromiseLike(pendingViewport)) {\n viewport = await pendingViewport;\n } else {\n viewport = pendingViewport;\n }\n resolvedViewport = mergeViewport({\n resolvedViewport,\n viewport\n });\n }\n return resolvedViewport;\n}\n// Exposed API for metadata component, that directly resolve the loader tree and related context as resolved metadata.\nexport async function resolveMetadata(tree, pathname, searchParams, errorConvention, interpolatedParams, metadataContext) {\n const metadataItems = await resolveMetadataItems(tree, searchParams, errorConvention, interpolatedParams);\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n return accumulateMetadata(workStore.route, metadataItems, pathname, metadataContext);\n}\n// Exposed API for viewport component, that directly resolve the loader tree and related context as resolved viewport.\nexport async function resolveViewport(tree, searchParams, errorConvention, interpolatedParams) {\n const viewportItems = await resolveViewportItems(tree, searchParams, errorConvention, interpolatedParams);\n return accumulateViewport(viewportItems);\n}\nfunction isPromiseLike(value) {\n return typeof value === 'object' && value !== null && typeof value.then === 'function';\n}\n\n//# sourceMappingURL=resolve-metadata.js.map","function resolveArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n return [\n value\n ];\n}\nfunction resolveAsArrayOrUndefined(value) {\n if (typeof value === 'undefined' || value === null) {\n return undefined;\n }\n return resolveArray(value);\n}\nfunction getOrigin(url) {\n let origin = undefined;\n if (typeof url === 'string') {\n try {\n url = new URL(url);\n origin = url.origin;\n } catch {}\n }\n return origin;\n}\nexport { resolveAsArrayOrUndefined, resolveArray, getOrigin };\n\n//# sourceMappingURL=utils.js.map","import path from '../../../shared/lib/isomorphic/path';\nfunction isStringOrURL(icon) {\n return typeof icon === 'string' || icon instanceof URL;\n}\nfunction createLocalMetadataBase() {\n // Check if experimental HTTPS is enabled\n const isExperimentalHttps = Boolean(process.env.__NEXT_EXPERIMENTAL_HTTPS);\n const protocol = isExperimentalHttps ? 'https' : 'http';\n return new URL(`${protocol}://localhost:${process.env.PORT || 3000}`);\n}\nfunction getPreviewDeploymentUrl() {\n const origin = process.env.VERCEL_BRANCH_URL || process.env.VERCEL_URL;\n return origin ? new URL(`https://${origin}`) : undefined;\n}\nfunction getProductionDeploymentUrl() {\n const origin = process.env.VERCEL_PROJECT_PRODUCTION_URL;\n return origin ? new URL(`https://${origin}`) : undefined;\n}\n/**\n * Given an optional user-provided metadataBase, this determines what the metadataBase should\n * fallback to. Specifically:\n * - In dev, it should always be localhost\n * - In Vercel preview builds, it should be the preview build ID\n * - In start, it should be the user-provided metadataBase value. Otherwise,\n * it'll fall back to the Vercel production deployment, and localhost as a last resort.\n */ export function getSocialImageMetadataBaseFallback(metadataBase) {\n const defaultMetadataBase = createLocalMetadataBase();\n const previewDeploymentUrl = getPreviewDeploymentUrl();\n const productionDeploymentUrl = getProductionDeploymentUrl();\n let fallbackMetadataBase;\n if (process.env.NODE_ENV === 'development') {\n fallbackMetadataBase = defaultMetadataBase;\n } else {\n fallbackMetadataBase = process.env.NODE_ENV === 'production' && previewDeploymentUrl && process.env.VERCEL_ENV === 'preview' ? previewDeploymentUrl : metadataBase || productionDeploymentUrl || defaultMetadataBase;\n }\n return fallbackMetadataBase;\n}\nfunction resolveUrl(url, metadataBase) {\n if (url instanceof URL) return url;\n if (!url) return null;\n try {\n // If we can construct a URL instance from url, ignore metadataBase\n const parsedUrl = new URL(url);\n return parsedUrl;\n } catch {}\n if (!metadataBase) {\n metadataBase = createLocalMetadataBase();\n }\n // Handle relative or absolute paths\n const pathname = metadataBase.pathname || '';\n const joinedPath = path.posix.join(pathname, url);\n return new URL(joinedPath, metadataBase);\n}\n// Resolve with `pathname` if `url` is a relative path.\nfunction resolveRelativeUrl(url, pathname) {\n if (typeof url === 'string' && url.startsWith('./')) {\n return path.posix.resolve(pathname, url);\n }\n return url;\n}\n// The regex is matching logic from packages/next/src/lib/load-custom-routes.ts\nconst FILE_REGEX = /^(?:\\/((?!\\.well-known(?:\\/.*)?)(?:[^/]+\\/)*[^/]+\\.\\w+))(\\/?|$)/i;\nfunction isFilePattern(pathname) {\n return FILE_REGEX.test(pathname);\n}\n// Resolve `pathname` if `url` is a relative path the compose with `metadataBase`.\nfunction resolveAbsoluteUrlWithPathname(url, metadataBase, pathname, { trailingSlash }) {\n // Resolve url with pathname that always starts with `/`\n url = resolveRelativeUrl(url, pathname);\n // Convert string url or URL instance to absolute url string,\n // if there's case needs to be resolved with metadataBase\n let resolvedUrl = '';\n const result = metadataBase ? resolveUrl(url, metadataBase) : url;\n if (typeof result === 'string') {\n resolvedUrl = result;\n } else {\n resolvedUrl = result.pathname === '/' && result.searchParams.size === 0 ? result.origin : result.href;\n }\n // Add trailing slash if it's enabled for urls matches the condition\n // - Not external, same origin with metadataBase\n // - Doesn't have query\n if (trailingSlash && !resolvedUrl.endsWith('/')) {\n let isRelative = resolvedUrl.startsWith('/');\n let hasQuery = resolvedUrl.includes('?');\n let isExternal = false;\n let isFileUrl = false;\n if (!isRelative) {\n try {\n const parsedUrl = new URL(resolvedUrl);\n isExternal = metadataBase != null && parsedUrl.origin !== metadataBase.origin;\n isFileUrl = isFilePattern(parsedUrl.pathname);\n } catch {\n // If it's not a valid URL, treat it as external\n isExternal = true;\n }\n if (// Do not apply trailing slash for file like urls, aligning with the behavior with `trailingSlash`\n !isFileUrl && !isExternal && !hasQuery) return `${resolvedUrl}/`;\n }\n }\n return resolvedUrl;\n}\nexport { isStringOrURL, resolveUrl, resolveRelativeUrl, resolveAbsoluteUrlWithPathname, };\n\n//# sourceMappingURL=resolve-url.js.map","function resolveTitleTemplate(template, title) {\n return template ? template.replace(/%s/g, title) : title;\n}\nexport function resolveTitle(title, stashedTemplate) {\n let resolved;\n const template = typeof title !== 'string' && title && 'template' in title ? title.template : null;\n if (typeof title === 'string') {\n resolved = resolveTitleTemplate(stashedTemplate, title);\n } else if (title) {\n if ('default' in title) {\n resolved = resolveTitleTemplate(stashedTemplate, title.default);\n }\n if ('absolute' in title && title.absolute) {\n resolved = title.absolute;\n }\n }\n if (title && typeof title !== 'string') {\n return {\n template,\n absolute: resolved || ''\n };\n } else {\n return {\n absolute: resolved || title || '',\n template\n };\n }\n}\n\n//# sourceMappingURL=resolve-title.js.map","import { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment';\nexport async function getLayoutOrPageModule(loaderTree) {\n const { layout, page, defaultPage } = loaderTree[2];\n const isLayout = typeof layout !== 'undefined';\n const isPage = typeof page !== 'undefined';\n const isDefaultPage = typeof defaultPage !== 'undefined' && loaderTree[0] === DEFAULT_SEGMENT_KEY;\n let mod = undefined;\n let modType = undefined;\n let filePath = undefined;\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 return {\n mod,\n modType,\n filePath\n };\n}\nexport async function getComponentTypeModule(loaderTree, moduleType) {\n const { [moduleType]: module } = loaderTree[2];\n if (typeof module !== 'undefined') {\n return await module[0]();\n }\n return undefined;\n}\n\n//# sourceMappingURL=app-dir-module.js.map","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE';\nexport class DynamicServerError extends Error {\n constructor(description){\n super(`Dynamic server usage: ${description}`), this.description = description, this.digest = DYNAMIC_ERROR_CODE;\n }\n}\nexport function isDynamicServerError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') {\n return false;\n }\n return err.digest === DYNAMIC_ERROR_CODE;\n}\n\n//# sourceMappingURL=hooks-server-context.js.map","import { getVaryParamsAccumulator, workUnitAsyncStorage } from './work-unit-async-storage.external';\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 */ export class VaryParamsAccumulator {\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 */ add(paramName) {\n if (this._done || this._seen.has(paramName)) {\n return;\n }\n this._seen.add(paramName);\n if (this._resolve !== null) {\n this._resolve({\n value: paramName,\n done: false\n });\n this._resolve = null;\n } else {\n this._buffer.push(paramName);\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. */ close() {\n if (this._done) {\n return;\n }\n this._done = true;\n if (this._resolve !== null) {\n this._resolve({\n value: undefined,\n done: true\n });\n this._resolve = null;\n }\n }\n [Symbol.asyncIterator]() {\n return {\n next: ()=>{\n if (this._buffer.length > 0) {\n return Promise.resolve({\n value: this._buffer.shift(),\n done: false\n });\n }\n if (this._done) {\n return Promise.resolve({\n value: undefined,\n done: true\n });\n }\n return new Promise((resolve)=>{\n this._resolve = resolve;\n });\n }\n };\n }\n constructor(){\n this._resolve = null;\n this._done = false;\n this._buffer = [];\n // The set of param names already yielded. Doubles as the dedupe guard so the\n // same name is never emitted twice.\n this._seen = new Set();\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 */ export const emptyVaryParamsAccumulator = new VaryParamsAccumulator();\nemptyVaryParamsAccumulator.close();\nexport function createResponseVaryParamsAccumulator() {\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();\n return {\n head,\n rootParams,\n segments\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 */ export function createVaryParamsAccumulator() {\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}\nexport function getMetadataVaryParamsAccumulator() {\n var _getVaryParamsAccumulator;\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (!workUnitStore) {\n return null;\n }\n return ((_getVaryParamsAccumulator = getVaryParamsAccumulator(workUnitStore)) == null ? void 0 : _getVaryParamsAccumulator.head) ?? null;\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 * 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 */ export function getRootParamsVaryParamsAccumulator() {\n var _getVaryParamsAccumulator;\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (!workUnitStore) {\n return null;\n }\n return ((_getVaryParamsAccumulator = getVaryParamsAccumulator(workUnitStore)) == null ? void 0 : _getVaryParamsAccumulator.rootParams) ?? null;\n}\n/**\n * Records that a param was accessed. Adds the param name to the accumulator.\n */ export function accumulateVaryParam(accumulator, paramName) {\n accumulator.add(paramName);\n}\n/**\n * Records a root param access.\n */ export function accumulateRootVaryParam(paramName) {\n const rootParamsAccumulator = getRootParamsVaryParamsAccumulator();\n if (rootParamsAccumulator !== null) {\n accumulateVaryParam(rootParamsAccumulator, paramName);\n }\n}\nexport function createVaryingParams(accumulator, originalParamsObject, optionalCatchAllParamName) {\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 (prop === optionalCatchAllParamName || Object.prototype.hasOwnProperty.call(target, prop)) {\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 // 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 = {};\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}\nexport function createVaryingSearchParams(accumulator, originalSearchParamsObject) {\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 * 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 */ export function finishAccumulatingVaryParams(responseAccumulator) {\n responseAccumulator.head.close();\n responseAccumulator.rootParams.close();\n for (const segmentAccumulator of responseAccumulator.segments){\n segmentAccumulator.close();\n }\n}\n\n//# sourceMappingURL=vary-params.js.map","import { extractInfoFromServerReferenceId } from '../shared/lib/server-reference-info';\nexport function isServerReference(value) {\n return value.$$typeof === Symbol.for('react.server.reference');\n}\nexport function isUseCacheFunction(value) {\n if (!isServerReference(value)) {\n return false;\n }\n const { type } = extractInfoFromServerReferenceId(value.$$id);\n return type === 'use-cache';\n}\nexport function getUseCacheFunctionInfo(value) {\n if (!isServerReference(value)) {\n return null;\n }\n const info = extractInfoFromServerReferenceId(value.$$id);\n return info.type === 'use-cache' ? info : null;\n}\nexport function isClientReference(mod) {\n const defaultExport = (mod == null ? void 0 : mod.default) || mod;\n return (defaultExport == null ? void 0 : defaultExport.$$typeof) === Symbol.for('react.client.reference');\n}\n\n//# sourceMappingURL=client-and-server-references.js.map","const REACT_POSTPONE_TYPE = Symbol.for('react.postpone');\nexport function isPostpone(error) {\n return typeof error === 'object' && error !== null && error.$$typeof === REACT_POSTPONE_TYPE;\n}\n\n//# sourceMappingURL=is-postpone.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { createVaryingSearchParams, getMetadataVaryParamsAccumulator } from '../app-render/vary-params';\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect';\nimport { throwToInterruptStaticGeneration, postponeWithTracking, annotateDynamicAccess } from '../app-render/dynamic-rendering';\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external';\nimport { workUnitAsyncStorage, throwInvariantForMissingStore } from '../app-render/work-unit-async-storage.external';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { makeDevtoolsIOAwarePromise, makeRuntimeHangingPromise, makePromiseFromTrigger, trackRuntimeDataAccessed, RENDER_STAGES_BY_DATA_KIND } from '../dynamic-rendering-utils';\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger';\nimport { describeStringPropertyAccess, describeHasCheckingStringProperty, wellKnownProperties } from '../../shared/lib/utils/reflect-utils';\nimport { throwWithStaticGenerationBailoutErrorWithDynamicError, throwForSearchParamsAccessInUseCache } from './utils';\nexport function createSearchParamsFromClient(underlyingSearchParams) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore);\n case 'prerender-runtime':\n throw Object.defineProperty(new InvariantError('createSearchParamsFromClient should not be called in a runtime prerender.'), \"__NEXT_ERROR_CODE\", {\n value: \"E769\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createSearchParamsFromClient should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E739\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createSearchParamsFromClient should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1133\",\n enumerable: false,\n configurable: true\n });\n case 'validation-client':\n {\n if (workUnitStore.validationSamples) {\n return createClientSearchParamsInValidation(underlyingSearchParams, workStore, workUnitStore);\n }\n return makeUntrackedSearchParams(underlyingSearchParams);\n }\n case 'request':\n return createRenderSearchParams(underlyingSearchParams, workStore, workUnitStore);\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport function createServerSearchParamsForMetadata(underlyingSearchParams) {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator();\n return createServerSearchParamsForServerPage(underlyingSearchParams, metadataVaryParamsAccumulator);\n}\nexport function createServerSearchParamsForServerPage(underlyingSearchParams, varyParamsAccumulator) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore);\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createServerSearchParamsForServerPage should not be called in a client validation.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1066\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createServerSearchParamsForServerPage should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E747\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createServerSearchParamsForServerPage should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1128\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n return createRuntimePrerenderSearchParams(underlyingSearchParams, workStore, workUnitStore, varyParamsAccumulator);\n case 'request':\n return createRenderSearchParams(underlyingSearchParams, workStore, workUnitStore);\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nexport function createPrerenderSearchParamsForClientPage() {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // dictionary object.\n return Promise.resolve({});\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n // We're prerendering in a mode that aborts (cacheComponents) and should stall\n // the promise to ensure the RSC side is considered dynamic\n return makeRuntimeHangingPromise(workUnitStore.renderSignal, workStore.route, '`searchParams`', workUnitStore);\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createPrerenderSearchParamsForClientPage should not be called in a client validation.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1061\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n throw Object.defineProperty(new InvariantError('createPrerenderSearchParamsForClientPage should not be called in a runtime prerender.'), \"__NEXT_ERROR_CODE\", {\n value: \"E768\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createPrerenderSearchParamsForClientPage should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E746\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createPrerenderSearchParamsForClientPage should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1124\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n return Promise.resolve({});\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nfunction createStaticPrerenderSearchParams(workStore, prerenderStore) {\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // dictionary object.\n return Promise.resolve({});\n }\n switch(prerenderStore.type){\n case 'prerender':\n case 'prerender-client':\n // We are in a cacheComponents (PPR or otherwise) prerender\n return makeHangingSearchParams(workStore, prerenderStore);\n case 'prerender-ppr':\n case 'prerender-legacy':\n // We are in a legacy static generation and need to interrupt the\n // prerender when search params are accessed.\n return makeErroringSearchParams(workStore, prerenderStore);\n default:\n return prerenderStore;\n }\n}\nfunction createRuntimePrerenderSearchParams(underlyingSearchParams, workStore, workUnitStore, varyParamsAccumulator) {\n const userspaceSearchParams = varyParamsAccumulator !== null ? createVaryingSearchParams(varyParamsAccumulator, underlyingSearchParams) : underlyingSearchParams;\n const result = makeUntrackedSearchParams(userspaceSearchParams);\n const { stagedRendering } = workUnitStore;\n if (!stagedRendering) {\n // If there's no staging, we're in a prospective runtime prerender.\n if (workUnitStore.isSessionShell) {\n // If we're warming up for a session shell, search params should hang,\n // because they'll be a hanging input in the final prerender.\n return makeHangingSearchParams(workStore, workUnitStore);\n }\n return result;\n }\n // Unlike `createRuntimePrerenderParams`, which uses `delayUntilStage`, we\n // resolve with `waitForStage(...).then(...)` here. Switching search params to\n // `delayUntilStage` drops the source code frame from the instant-validation\n // \"URL data outside of Suspense\" error when a page awaits `searchParams` at\n // the top level (params, read via a nested component, is unaffected). See the\n // `missing suspense around search params` cases in the instant-validation\n // `suspense-boundaries` tests. The underlying reason in React's async I/O\n // await tracking isn't understood yet. TODO: align search params with params\n // on `delayUntilStage` once resolved.\n const searchParamsStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData;\n return stagedRendering.waitForStage(searchParamsStage).then(()=>result);\n}\nfunction createRenderSearchParams(underlyingSearchParams, workStore, requestStore) {\n const { asyncApiPromises, validationSamples } = requestStore;\n if (asyncApiPromises) {\n let userspaceSearchParams = underlyingSearchParams;\n if (validationSamples) {\n userspaceSearchParams = createSearchParamsProxyForInstantValidation(workStore, validationSamples, underlyingSearchParams);\n }\n return createStagedRenderSearchParams(workStore, asyncApiPromises, underlyingSearchParams, userspaceSearchParams);\n }\n // No staged rendering = no cacheComponents, or cacheComponents prod without cachedNavigations\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // dictionary object.\n return Promise.resolve({});\n }\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeUntrackedSearchParamsWithDevWarnings(underlyingSearchParams, workStore, requestStore);\n } else {\n return makeUntrackedSearchParams(underlyingSearchParams);\n }\n}\nfunction createStagedRenderSearchParams(workStore, asyncApiPromises, underlyingSearchParams, userspaceSearchParams) {\n const trigger = asyncApiPromises.sharedSearchParamsParent;\n if (process.env.NODE_ENV === 'development') {\n // We wrap each instance of searchParams in a `new Promise()`.\n // This is important when all awaits are in third party which would otherwise\n // track all the way to the internal params.\n const promise = new Promise((resolve, reject)=>{\n trigger.then(()=>resolve(userspaceSearchParams), reject);\n });\n // @ts-expect-error\n promise.displayName = 'searchParams';\n promise.catch(ignoreReject);\n return instrumentSearchParamsPromiseWithDevWarnings(underlyingSearchParams, promise, workStore);\n } else {\n return makePromiseFromTrigger(trigger, userspaceSearchParams);\n }\n}\nfunction createSearchParamsProxyForInstantValidation(workStore, validationSamples, underlyingSearchParams) {\n const { createExhaustiveSearchParamsProxy } = require('../app-render/instant-validation/instant-samples');\n const declaredKeys = new Set(Object.keys(validationSamples.searchParams ?? {}));\n return createExhaustiveSearchParamsProxy(underlyingSearchParams, declaredKeys, workStore.route);\n}\nconst CachedSearchParams = new WeakMap();\nconst CachedSearchParamsForUseCache = new WeakMap();\nfunction makeHangingSearchParams(workStore, prerenderStore) {\n const cachedSearchParams = CachedSearchParams.get(prerenderStore);\n if (cachedSearchParams) {\n return cachedSearchParams;\n }\n const promise = makeRuntimeHangingPromise(prerenderStore.renderSignal, workStore.route, '`searchParams`', // This promise is created for every page whether or not it reads search\n // params, so recording the access at creation would mark every render.\n // The access is tracked in the proxy traps below instead.\n null);\n const trackSearchParamsAccessed = ()=>{\n // Record against the store that's active at access time: the promise is\n // created while the RSC payload is constructed, but typically accessed\n // later, during the render, under a different store.\n const workUnitStore = workUnitAsyncStorage.getStore();\n trackRuntimeDataAccessed(workUnitStore ?? prerenderStore);\n };\n const proxyHandler = {\n get (target, prop, receiver) {\n if (Object.hasOwn(target, prop)) {\n // The promise has this property directly. we must return it.\n // We know it isn't a dynamic access because it can only be something\n // that was previously written to the promise and thus not an underlying searchParam value\n return ReflectAdapter.get(target, prop, receiver);\n }\n switch(prop){\n case 'then':\n case 'catch':\n case 'finally':\n {\n const originalMethod = ReflectAdapter.get(target, prop, receiver);\n return ({\n [prop]: (...args)=>{\n const expression = '`await searchParams`, `searchParams.then`, or similar';\n trackSearchParamsAccessed();\n annotateDynamicAccess(expression, prerenderStore);\n // Mirror `makeHangingParams`: when this never-resolving promise\n // is awaited while a `use cache` key is being encoded\n // (dynamicAccessAsyncStorage is set), abort so the surrounding\n // cache bails out to a dynamic hole instead of hanging on it.\n // Without this, a private cache that reads `searchParams` would\n // stall the App Shell cache-warming render. Re-wrapping the\n // result propagates the same behavior to promises derived via\n // `.then`/`.catch`/`.finally` that are then passed into a cache.\n const dynamicAccessStore = dynamicAccessAsyncStorage.getStore();\n if (dynamicAccessStore) {\n dynamicAccessStore.abortController.abort(Object.defineProperty(new Error('Accessed `searchParams` during prerendering.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1449\",\n enumerable: false,\n configurable: true\n }));\n }\n return new Proxy(originalMethod.apply(target, args), proxyHandler);\n }\n })[prop];\n }\n case 'status':\n {\n const expression = '`use(searchParams)`, `searchParams.status`, or similar';\n trackSearchParamsAccessed();\n annotateDynamicAccess(expression, prerenderStore);\n return ReflectAdapter.get(target, prop, receiver);\n }\n default:\n {\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n }\n };\n const proxiedPromise = new Proxy(promise, proxyHandler);\n CachedSearchParams.set(prerenderStore, proxiedPromise);\n return proxiedPromise;\n}\nfunction makeErroringSearchParams(workStore, prerenderStore) {\n const cachedSearchParams = CachedSearchParams.get(workStore);\n if (cachedSearchParams) {\n return cachedSearchParams;\n }\n const underlyingSearchParams = {};\n // For search params we don't construct a ReactPromise because we want to interrupt\n // rendering on any property access that was not set from outside and so we only want\n // to have properties like value and status if React sets them.\n const promise = Promise.resolve(underlyingSearchParams);\n const proxiedPromise = new Proxy(promise, {\n get (target, prop, receiver) {\n if (Object.hasOwn(promise, prop)) {\n // The promise has this property directly. we must return it.\n // We know it isn't a dynamic access because it can only be something\n // that was previously written to the promise and thus not an underlying searchParam value\n return ReflectAdapter.get(target, prop, receiver);\n }\n if (typeof prop === 'string' && prop === 'then') {\n const expression = '`await searchParams`, `searchParams.then`, or similar';\n if (workStore.dynamicShouldError) {\n throwWithStaticGenerationBailoutErrorWithDynamicError(workStore.route, expression);\n } else if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking);\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(expression, workStore, prerenderStore);\n }\n }\n return ReflectAdapter.get(target, prop, receiver);\n }\n });\n CachedSearchParams.set(workStore, proxiedPromise);\n return proxiedPromise;\n}\n/**\n * This is a variation of `makeErroringSearchParams` that always throws an\n * error on access, because accessing searchParams inside of `\"use cache\"` is\n * not allowed.\n */ export function makeErroringSearchParamsForUseCache() {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const cachedSearchParams = CachedSearchParamsForUseCache.get(workStore);\n if (cachedSearchParams) {\n return cachedSearchParams;\n }\n const promise = Promise.resolve({});\n const proxiedPromise = new Proxy(promise, {\n get: function get(target, prop, receiver) {\n if (Object.hasOwn(promise, prop)) {\n // The promise has this property directly. we must return it. We know it\n // isn't a dynamic access because it can only be something that was\n // previously written to the promise and thus not an underlying\n // searchParam value\n return ReflectAdapter.get(target, prop, receiver);\n }\n if (typeof prop === 'string' && (prop === 'then' || !wellKnownProperties.has(prop))) {\n throwForSearchParamsAccessInUseCache(workStore, get);\n }\n return ReflectAdapter.get(target, prop, receiver);\n }\n });\n CachedSearchParamsForUseCache.set(workStore, proxiedPromise);\n return proxiedPromise;\n}\nfunction makeUntrackedSearchParams(underlyingSearchParams) {\n const cachedSearchParams = CachedSearchParams.get(underlyingSearchParams);\n if (cachedSearchParams) {\n return cachedSearchParams;\n }\n const promise = Promise.resolve(underlyingSearchParams);\n CachedSearchParams.set(underlyingSearchParams, promise);\n return promise;\n}\nfunction makeUntrackedSearchParamsWithDevWarnings(underlyingSearchParams, workStore, requestStore) {\n const cachedSearchParams = CachedSearchParams.get(underlyingSearchParams);\n if (cachedSearchParams) {\n return cachedSearchParams;\n }\n const promise = makeUntrackedSearchParamsWithDevWarningsImpl(underlyingSearchParams, workStore, requestStore);\n CachedSearchParams.set(requestStore, promise);\n return promise;\n}\nfunction makeUntrackedSearchParamsWithDevWarningsImpl(underlyingSearchParams, workStore, requestStore) {\n const promiseInitialized = {\n current: false\n };\n const proxiedUnderlying = instrumentSearchParamsObjectWithDevWarnings(underlyingSearchParams, workStore, promiseInitialized);\n const promise = makeDevtoolsIOAwarePromise(proxiedUnderlying, requestStore, RENDER_STAGES_BY_DATA_KIND.runtimeLinkData);\n promise.then(()=>{\n promiseInitialized.current = true;\n }, // If we're in staged rendering, this promise will reject if the render\n // is aborted before it can reach the runtime stage.\n // In that case, we have to prevent an unhandled rejection from the promise\n // created by this `.then()` call.\n // This does not affect the `promiseInitialized` logic above,\n // because `proxiedUnderlying` will not be used to resolve the promise,\n // so there's no risk of any of its properties being accessed and triggering\n // an undesireable warning.\n ignoreReject);\n return instrumentSearchParamsPromiseWithDevWarnings(underlyingSearchParams, promise, workStore);\n}\nfunction ignoreReject() {}\nfunction instrumentSearchParamsObjectWithDevWarnings(underlyingSearchParams, workStore, promiseInitialized) {\n // We have an unfortunate sequence of events that requires this initialization logic. We want to instrument the underlying\n // searchParams object to detect if you are accessing values in dev. This is used for warnings and for things like the static prerender\n // indicator. However when we pass this proxy to our Promise.resolve() below the VM checks if the resolved value is a promise by looking\n // at the `.then` property. To our dynamic tracking logic this is indistinguishable from a `then` searchParam and so we would normally trigger\n // dynamic tracking. However we know that this .then is not real dynamic access, it's just how thenables resolve in sequence. So we introduce\n // this initialization concept so we omit the dynamic check until after we've constructed our resolved promise.\n return new Proxy(underlyingSearchParams, {\n get (target, prop, receiver) {\n if (typeof prop === 'string' && promiseInitialized.current) {\n if (workStore.dynamicShouldError) {\n const expression = describeStringPropertyAccess('searchParams', prop);\n throwWithStaticGenerationBailoutErrorWithDynamicError(workStore.route, expression);\n }\n }\n return ReflectAdapter.get(target, prop, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'string') {\n if (workStore.dynamicShouldError) {\n const expression = describeHasCheckingStringProperty('searchParams', prop);\n throwWithStaticGenerationBailoutErrorWithDynamicError(workStore.route, expression);\n }\n }\n return Reflect.has(target, prop);\n },\n ownKeys (target) {\n if (workStore.dynamicShouldError) {\n const expression = '`{...searchParams}`, `Object.keys(searchParams)`, or similar';\n throwWithStaticGenerationBailoutErrorWithDynamicError(workStore.route, expression);\n }\n return Reflect.ownKeys(target);\n }\n });\n}\nfunction instrumentSearchParamsPromiseWithDevWarnings(underlyingSearchParams, promise, workStore) {\n // Track which properties we should warn for.\n const proxiedProperties = new Set();\n Object.keys(underlyingSearchParams).forEach((prop)=>{\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n proxiedProperties.add(prop);\n }\n });\n return new Proxy(promise, {\n get (target, prop, receiver) {\n if (prop === 'then' && workStore.dynamicShouldError) {\n const expression = '`searchParams.then`';\n throwWithStaticGenerationBailoutErrorWithDynamicError(workStore.route, expression);\n }\n if (typeof prop === 'string') {\n if (!wellKnownProperties.has(prop) && (proxiedProperties.has(prop) || // We are accessing a property that doesn't exist on the promise nor\n // the underlying searchParams.\n Reflect.has(target, prop) === false)) {\n const expression = describeStringPropertyAccess('searchParams', prop);\n warnForSyncAccess(workStore.route, expression);\n }\n }\n return ReflectAdapter.get(target, prop, receiver);\n },\n set (target, prop, value, receiver) {\n if (typeof prop === 'string') {\n proxiedProperties.delete(prop);\n }\n return Reflect.set(target, prop, value, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'string') {\n if (!wellKnownProperties.has(prop) && (proxiedProperties.has(prop) || // We are accessing a property that doesn't exist on the promise nor\n // the underlying searchParams.\n Reflect.has(target, prop) === false)) {\n const expression = describeHasCheckingStringProperty('searchParams', prop);\n warnForSyncAccess(workStore.route, expression);\n }\n }\n return Reflect.has(target, prop);\n },\n ownKeys (target) {\n const expression = '`Object.keys(searchParams)` or similar';\n warnForSyncAccess(workStore.route, expression);\n return Reflect.ownKeys(target);\n }\n });\n}\nconst warnForSyncAccess = createDedupedByCallsiteServerErrorLoggerDev(createSearchAccessError);\nfunction createSearchAccessError(route, expression) {\n const prefix = route ? `Route \"${route}\" ` : 'This route ';\n return Object.defineProperty(new Error(`${prefix}used ${expression}. ` + `\\`searchParams\\` is a Promise and must be unwrapped with \\`await\\` or \\`React.use()\\` before accessing its properties. ` + `Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), \"__NEXT_ERROR_CODE\", {\n value: \"E848\",\n enumerable: false,\n configurable: true\n });\n}\nfunction createClientSearchParamsInValidation(underlyingSearchParams, workStore, workUnitStore) {\n var _workUnitStore_validationSamples;\n const { createExhaustiveSearchParamsProxy } = require('../app-render/instant-validation/instant-samples');\n const declaredKeys = new Set(Object.keys(((_workUnitStore_validationSamples = workUnitStore.validationSamples) == null ? void 0 : _workUnitStore_validationSamples.searchParams) ?? {}));\n underlyingSearchParams = createExhaustiveSearchParamsProxy(underlyingSearchParams, declaredKeys, workStore.route);\n return Promise.resolve(underlyingSearchParams);\n}\n\n//# sourceMappingURL=search-params.js.map","/*\n\nFiles in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.\n\n*/ import ReactDOM from 'react-dom';\nexport function preloadStyle(href, crossOrigin, nonce) {\n const opts = {\n as: 'style'\n };\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin;\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce;\n }\n ReactDOM.preload(href, opts);\n}\nexport function preloadFont(href, type, crossOrigin, nonce) {\n const opts = {\n as: 'font',\n type\n };\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin;\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce;\n }\n ReactDOM.preload(href, opts);\n}\nexport function preconnect(href, crossOrigin, nonce) {\n const opts = {};\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin;\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce;\n }\n ;\n ReactDOM.preconnect(href, opts);\n}\n\n//# sourceMappingURL=preloads.js.map","import stringHash from 'next/dist/compiled/string-hash';\nimport { formatServerError } from '../../lib/format-server-error';\nimport { SpanStatusCode, getTracer } from '../lib/trace/tracer';\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/**\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 */ export function getDigestForWellKnownError(error) {\n // If we're bailing out to CSR, we don't need to log the error.\n if (isBailoutToCSRError(error)) return error.digest;\n // If this is a navigation error, we don't need to log the error.\n if (isNextRouterError(error)) return error.digest;\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 // If this is a prerender interrupted error, we don't need to log the error.\n if (isPrerenderInterruptedError(error)) return error.digest;\n if (isInstantValidationError(error)) return error.digest;\n return undefined;\n}\nexport function createReactServerErrorHandler(shouldFormatError, isBuildTimePrerendering, reactServerErrors, onReactServerRenderError, spanToRecordOn) {\n return (thrownValue)=>{\n var _err_message;\n // If the response was closed, we don't need to log the error.\n if (isAbortError(thrownValue)) return;\n const digest = getDigestForWellKnownError(thrownValue);\n if (digest) {\n return digest;\n }\n if (isReactLargeShellError(thrownValue)) {\n // TODO: Aggregate\n console.error(thrownValue);\n return undefined;\n }\n let err = getProperError(thrownValue);\n let silenceLog = false;\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 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 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 = typeof thrownValue === 'string' ? stringHash(thrownValue).toString() : createDigestWithErrorCode(err, stringHash(err.message + (err.stack || '')).toString());\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 // Format server errors in development to add more helpful error messages\n if (shouldFormatError) {\n formatServerError(err);\n }\n // Don't log the suppressed error during export\n if (!(isBuildTimePrerendering && (err == null ? void 0 : (_err_message = err.message) == null ? void 0 : _err_message.includes('The specific message is omitted in production builds to avoid leaking sensitive details.')))) {\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 onReactServerRenderError(err, silenceLog);\n }\n return err.digest;\n };\n}\nexport function createHTMLErrorHandler(shouldFormatError, isBuildTimePrerendering, reactServerErrors, allCapturedErrors, onHTMLRenderSSRError, spanToRecordOn) {\n return (thrownValue, errorInfo)=>{\n var _err_message;\n if (isReactLargeShellError(thrownValue)) {\n // TODO: Aggregate\n console.error(thrownValue);\n return undefined;\n }\n let isSSRError = true;\n allCapturedErrors.push(thrownValue);\n // If the response was closed, we don't need to log the error.\n if (isAbortError(thrownValue)) return;\n const digest = getDigestForWellKnownError(thrownValue);\n if (digest) {\n return digest;\n }\n const err = getProperError(thrownValue);\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(err, stringHash(err.message + ((errorInfo == null ? void 0 : errorInfo.componentStack) || err.stack || '')).toString());\n }\n // Format server errors in development to add more helpful error messages\n if (shouldFormatError) {\n formatServerError(err);\n }\n // Don't log the suppressed error during export\n if (!(isBuildTimePrerendering && (err == null ? void 0 : (_err_message = err.message) == null ? void 0 : _err_message.includes('The specific message is omitted in production builds to avoid leaking sensitive details.')))) {\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 onHTMLRenderSSRError(err, errorInfo);\n }\n }\n return err.digest;\n };\n}\nexport function isUserLandError(err) {\n return !isAbortError(err) && !isBailoutToCSRError(err) && !isNextRouterError(err);\n}\n\n//# sourceMappingURL=create-error-handler.js.map","// 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/** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error {\n constructor(reason){\n super(`Bail out to client-side rendering: ${reason}`), this.reason = reason, this.digest = BAILOUT_TO_CSR;\n }\n}\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === BAILOUT_TO_CSR;\n}\n\n//# sourceMappingURL=bailout-to-csr.js.map","import { RedirectStatusCode } from './redirect-status-code';\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT';\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 */ export function isRedirectError(error) {\n if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {\n return false;\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 const statusCode = Number(status);\n return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode;\n}\n\n//# sourceMappingURL=redirect-error.js.map","let spanRecorderForTest;\nexport function recordSpan(record) {\n if (!isLocalSpanRecordingEnabled()) {\n return;\n }\n const spanRecord = {\n timestamp: getCurrentTimestamp(),\n ...record\n };\n spanRecorderForTest == null ? void 0 : spanRecorderForTest(spanRecord);\n if (isRequestInsightsEnabled() && spanRecord.requestId) {\n const { recordRequestInsightSpan } = require('./request-insights');\n recordRequestInsightSpan(spanRecord);\n }\n}\nexport function setSpanRecorderForTest(recorder) {\n spanRecorderForTest = recorder;\n}\nexport function isLocalSpanRecordingEnabled() {\n if (!process.env.__NEXT_DEV_SERVER) {\n return false;\n }\n return spanRecorderForTest !== undefined || isRequestInsightsEnabled();\n}\nexport function isRequestInsightsEnabled() {\n if (!process.env.__NEXT_DEV_SERVER) {\n return false;\n }\n const value = process.env.__NEXT_REQUEST_INSIGHTS;\n return isEnabledEnvValue(value);\n}\nfunction isEnabledEnvValue(value) {\n return value === '1' || value === 'true' || value === true;\n}\nfunction getCurrentTimestamp() {\n return performance.timeOrigin + performance.now();\n}\n\n//# sourceMappingURL=span-store.js.map","const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), \"__NEXT_ERROR_CODE\", {\n value: \"E504\",\n enumerable: false,\n configurable: true\n});\nclass FakeAsyncLocalStorage {\n disable() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n getStore() {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined;\n }\n run() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n exit() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n enterWith() {\n throw sharedAsyncLocalStorageNotAvailableError;\n }\n static bind(fn) {\n return fn;\n }\n}\nconst maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;\nexport function createAsyncLocalStorage() {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage();\n }\n return new FakeAsyncLocalStorage();\n}\nexport function bindSnapshot(// WARNING: Don't pass a named function to this argument! See: https://github.com/facebook/react/pull/34911\nfn) {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn);\n }\n return FakeAsyncLocalStorage.bind(fn);\n}\nexport function createSnapshot() {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot();\n }\n return function(fn, ...args) {\n return fn(...args);\n };\n}\n\n//# sourceMappingURL=async-local-storage.js.map","const noop = ()=>{};\nlet registry;\nif (globalThis.FinalizationRegistry) {\n registry = new FinalizationRegistry((weakRef)=>{\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 * 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 */ export function cloneResponse(original) {\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 [\n original,\n original\n ];\n }\n const [body1, body2] = original.body.tee();\n const cloned1 = new Response(body1, {\n status: original.status,\n statusText: original.statusText,\n headers: original.headers\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 const cloned2 = new Response(body2, {\n status: original.status,\n statusText: original.statusText,\n headers: original.headers\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 // 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 if (cloned2.body) {\n registry.register(cloned2, new WeakRef(cloned2.body));\n }\n }\n return [\n cloned1,\n cloned2\n ];\n}\n\n//# sourceMappingURL=clone-response.js.map","/**\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 */ const OUT_OF_CLASS_CHAR = /[^\\t\\x20-\\x7e]/;\nconst OUT_OF_CLASS_RUN = /[^\\t\\x20-\\x7e]+/g;\nexport function encodeHeaderSafe(value) {\n return OUT_OF_CLASS_CHAR.test(value) ? value.replace(OUT_OF_CLASS_RUN, (run)=>encodeURIComponent(run)) : value;\n}\n\n//# sourceMappingURL=encode-header-safe.js.map","// eslint-disable-next-line import/no-extraneous-dependencies\nexport { createTemporaryReferenceSet, renderToReadableStream, decodeReply, decodeAction, decodeFormState } from 'react-server-dom-webpack/server';\n// eslint-disable-next-line import/no-extraneous-dependencies\nexport { prerender } from 'react-server-dom-webpack/static';\n/* eslint-disable import/no-extraneous-dependencies */ export let renderToPipeableStream;\nexport let prerenderToNodeStream;\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n renderToPipeableStream = require('react-server-dom-webpack/server.node').renderToPipeableStream;\n prerenderToNodeStream = require('react-server-dom-webpack/static').prerenderToNodeStream;\n} else {\n renderToPipeableStream = undefined;\n prerenderToNodeStream = undefined;\n}\n/* eslint-enable import/no-extraneous-dependencies */ // TODO: Just re-export `* as ReactServer`\nexport { captureOwnerStack, createElement, Fragment } from 'react';\nexport { default as LayoutRouter, LoadingBoundaryProvider } from '../../client/components/layout-router';\nexport { default as RenderFromTemplateContext } from '../../client/components/render-from-template-context';\nexport { ClientPageRoot } from '../../client/components/client-page';\nexport { ClientSegmentRoot } from '../../client/components/client-segment';\nexport { createServerSearchParamsForServerPage, createPrerenderSearchParamsForClientPage } from '../request/search-params';\nexport { createServerParamsForServerSegment, createPrerenderParamsForClientSegment } from '../request/params';\nexport * as serverHooks from '../../client/components/hooks-server-context';\nexport { HTTPAccessFallbackBoundary } from '../../client/components/http-access-fallback/error-boundary';\nexport { createMetadataComponents } from '../../lib/metadata/metadata';\nexport { RootLayoutBoundary } from '../../lib/framework/boundary-components';\nexport { preloadStyle, preloadFont, preconnect } from './rsc/preloads';\nexport { isEmptyHTMLPrelude } from './postponed-state';\nexport { Postpone } from './rsc/postpone';\nexport { taintObjectReference } from './rsc/taint';\nexport { collectSegmentData, collectPrefetchHints } from './collect-segment-data';\nexport const InstantValidation = ()=>{\n if (process.env.NEXT_RUNTIME !== 'edge' && process.env.__NEXT_CACHE_COMPONENTS) {\n return require('./instant-validation/instant-validation');\n } else {\n return undefined;\n }\n};\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external';\nimport { patchFetch as _patchFetch } from '../lib/patch-fetch';\nlet SegmentViewNode = ()=>null;\nlet SegmentViewStateNode = ()=>null;\nif (process.env.NODE_ENV === 'development') {\n const mod = require('../../next-devtools/userspace/app/segment-explorer-node');\n SegmentViewNode = mod.SegmentViewNode;\n SegmentViewStateNode = mod.SegmentViewStateNode;\n}\n// hot-reloader modules are not bundled so we need to inject `__next__clear_chunk_cache__`\n// into globalThis from this file which is bundled.\nif (process.env.TURBOPACK) {\n globalThis.__next__clear_chunk_cache__ = __turbopack_clear_chunk_cache__;\n} else {\n // Webpack does not have chunks on the server\n globalThis.__next__clear_chunk_cache__ = null;\n}\n// patchFetch makes use of APIs such as `React.unstable_postpone` which are only available\n// in the experimental channel of React, so export it from here so that it comes from the bundled runtime\nexport function patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\n// Development only\nexport { SegmentViewNode, SegmentViewStateNode };\n\n//# sourceMappingURL=entry-base.js.map","export const ViewportMetaKeys = {\n width: 'width',\n height: 'height',\n initialScale: 'initial-scale',\n minimumScale: 'minimum-scale',\n maximumScale: 'maximum-scale',\n viewportFit: 'viewport-fit',\n userScalable: 'user-scalable',\n interactiveWidget: 'interactive-widget'\n};\nexport const IconKeys = [\n 'icon',\n 'shortcut',\n 'apple',\n 'other'\n];\n\n//# sourceMappingURL=constants.js.map","export function createPromiseWithResolvers() {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve;\n let reject;\n const promise = new Promise((res, rej)=>{\n resolve = res;\n reject = rej;\n });\n return {\n resolve: resolve,\n reject: reject,\n promise\n };\n}\n\n//# sourceMappingURL=promise-with-resolvers.js.map","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\n//# sourceMappingURL=boundary-constants.js.map","export const INSTANT_VALIDATION_BOUNDARY_NAME = '__next_instant_validation_boundary__';\nexport const INSTANT_SLOT_MARKER_PREFIX = '__next_instant_slot_';\nexport const INSTANT_SLOT_MARKER_SUFFIX = '__';\n\n//# sourceMappingURL=boundary-constants.js.map","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401\n};\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus));\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK';\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 */ export function isHTTPAccessFallbackError(error) {\n if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {\n return false;\n }\n const [prefix, httpStatus] = error.digest.split(';');\n return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus));\n}\nexport function getAccessFallbackHTTPStatus(error) {\n const httpStatus = error.digest.split(';')[1];\n return Number(httpStatus);\n}\nexport function getAccessFallbackErrorTypeByStatus(status) {\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\n//# sourceMappingURL=http-access-fallback.js.map","export function createDefaultViewport() {\n return {\n // name=viewport\n width: 'device-width',\n initialScale: 1,\n // visual metadata\n themeColor: null,\n colorScheme: null\n };\n}\nexport function createDefaultMetadata() {\n return {\n // Deprecated ones\n viewport: null,\n themeColor: null,\n colorScheme: null,\n metadataBase: null,\n // Other values are all null\n title: null,\n description: null,\n applicationName: null,\n authors: null,\n generator: null,\n keywords: null,\n referrer: null,\n creator: null,\n publisher: null,\n robots: null,\n manifest: null,\n alternates: {\n canonical: null,\n languages: null,\n media: null,\n types: null\n },\n icons: null,\n openGraph: null,\n twitter: null,\n verification: {},\n appleWebApp: null,\n formatDetection: null,\n itunes: null,\n facebook: null,\n pinterest: null,\n abstract: null,\n appLinks: null,\n archives: null,\n assets: null,\n bookmarks: null,\n category: null,\n classification: null,\n pagination: {\n previous: null,\n next: null\n },\n other: {}\n };\n}\n\n//# sourceMappingURL=default-metadata.js.map","export function hasNonRootStaticParams(params, rootParams, fallbackParams) {\n for(const paramName in params){\n if (!Object.hasOwn(rootParams, paramName) && isStaticParam(paramName, fallbackParams)) {\n return true;\n }\n }\n return false;\n}\nfunction isStaticParam(paramName, fallbackParams) {\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}\nexport function allParamsAreRootParams(underlyingParams, rootParams) {\n for(const paramName in underlyingParams){\n if (!Object.hasOwn(rootParams, paramName)) {\n return false;\n }\n }\n return true;\n}\nexport function isEmptyParams(params) {\n for(const _paramKey in params){\n return false;\n }\n return true;\n}\nexport function hasFallbackRouteParams(underlyingParams, fallbackParams) {\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\n//# sourceMappingURL=params-utils.js.map","export function getRequestInsightKind(insight) {\n return insight.kind ?? 'request';\n}\nexport function getRequestInsightKey(insight) {\n return `${getRequestInsightKind(insight)}:${insight.requestId}`;\n}\n\n//# sourceMappingURL=request-insights.js.map","import { createAsyncLocalStorage } from '../../app-render/async-local-storage';\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('@next/request-insights-identity-storage');\nfunction getRequestInsightsIdentityStorage() {\n const globalStore = globalThis;\n return globalStore[REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY] ??= createAsyncLocalStorage();\n}\nexport function runWithRequestInsightsIdentity(identity, fn) {\n return getRequestInsightsIdentityStorage().run(identity, fn);\n}\nexport function getRequestInsightsIdentity() {\n return getRequestInsightsIdentityStorage().getStore();\n}\n\n//# sourceMappingURL=request-insights-identity.js.map","import * as React from 'react';\nconst errorRef = {\n current: null\n};\n// React.cache is currently only available in canary/experimental React channels.\nconst cache = typeof React.cache === 'function' ? React.cache : (fn)=>fn;\n// When Cache Components is enabled, we record these as errors so that they\n// are captured by the dev overlay as it's more critical to fix these\n// when enabled.\nconst logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS ? console.error : console.warn;\n// We don't want to dedupe across requests.\n// The developer might've just attempted to fix the warning so we should warn again if it still happens.\nconst flushCurrentErrorIfNew = cache(// eslint-disable-next-line @typescript-eslint/no-unused-vars -- cache key\n(key)=>{\n try {\n logErrorOrWarn(errorRef.current);\n } finally{\n errorRef.current = null;\n }\n});\n/**\n * Creates a function that logs an error message that is deduped by the userland\n * callsite.\n * This requires no indirection between the call of this function and the userland\n * callsite i.e. there's only a single library frame above this.\n * Do not use on the Client where sourcemaps and ignore listing might be enabled.\n * Only use that for warnings need a fix independent of the callstack.\n *\n * @param getMessage\n * @returns\n */ export function createDedupedByCallsiteServerErrorLoggerDev(getMessage) {\n return function logDedupedError(...args) {\n const message = getMessage(...args);\n if (process.env.NODE_ENV !== 'production') {\n var _stack;\n const callStackFrames = (_stack = new Error().stack) == null ? void 0 : _stack.split('\\n');\n if (callStackFrames === undefined || callStackFrames.length < 4) {\n logErrorOrWarn(message);\n } else {\n // Error:\n // logDedupedError\n // asyncApiBeingAccessedSynchronously\n // <userland callsite>\n // TODO: This breaks if sourcemaps with ignore lists are enabled.\n const key = callStackFrames[4];\n errorRef.current = message;\n flushCurrentErrorIfNew(key);\n }\n } else {\n logErrorOrWarn(message);\n }\n };\n}\n\n//# sourceMappingURL=create-deduped-by-callsite-server-error-logger.js.map","import { InvariantError } from '../../shared/lib/invariant-error';\nimport { getServerActionsManifest } from './manifests-singleton';\nlet __next_loaded_action_key;\nexport function arrayBufferToString(buffer) {\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\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);\n }\n let binary = '';\n for(let i = 0; i < len; i++){\n binary += String.fromCharCode(bytes[i]);\n }\n return binary;\n}\nexport function stringToUint8Array(binary) {\n const len = binary.length;\n const arr = new Uint8Array(len);\n for(let i = 0; i < len; i++){\n arr[i] = binary.charCodeAt(i);\n }\n return arr;\n}\nexport function encrypt(key, iv, data) {\n return crypto.subtle.encrypt({\n name: 'AES-GCM',\n iv\n }, key, data);\n}\nexport function decrypt(key, iv, data) {\n return crypto.subtle.decrypt({\n name: 'AES-GCM',\n iv\n }, key, data);\n}\nexport async function getActionEncryptionKey() {\n if (__next_loaded_action_key) {\n return __next_loaded_action_key;\n }\n const serverActionsManifest = getServerActionsManifest();\n const rawKey = process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY || serverActionsManifest.encryptionKey;\n if (rawKey === undefined) {\n throw Object.defineProperty(new InvariantError('Missing encryption key for Server Actions'), \"__NEXT_ERROR_CODE\", {\n value: \"E571\",\n enumerable: false,\n configurable: true\n });\n }\n __next_loaded_action_key = await crypto.subtle.importKey('raw', stringToUint8Array(atob(rawKey)), 'AES-GCM', true, [\n 'encrypt',\n 'decrypt'\n ]);\n return __next_loaded_action_key;\n}\n\n//# sourceMappingURL=encryption-utils.js.map","import { StaticGenBailoutError } from '../../client/components/static-generation-bailout';\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external';\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external';\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) {\n throw Object.defineProperty(new StaticGenBailoutError(`Route ${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`), \"__NEXT_ERROR_CODE\", {\n value: \"E543\",\n enumerable: false,\n configurable: true\n });\n}\nexport function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) {\n const error = Object.defineProperty(new Error(`Route ${workStore.route} used \\`searchParams\\` inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \\`searchParams\\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), \"__NEXT_ERROR_CODE\", {\n value: \"E842\",\n enumerable: false,\n configurable: true\n });\n Error.captureStackTrace(error, constructorOpt);\n workStore.invalidDynamicUsageError ??= error;\n throw error;\n}\nexport function isRequestApiAllowedInCurrentPhase(workUnitStore) {\n switch(workUnitStore.phase){\n case 'action':\n case 'render':\n {\n // The request is still in progress. The API may be disallowed for other reasons,\n // but not because of phase.\n return true;\n }\n case 'after':\n {\n // The request has finished.\n // If we're in a Route Handler or a Server Action,\n // request APIs can be called everywhere, even in after().\n const actionStore = actionAsyncStorage.getStore();\n if (actionStore && (actionStore.isAppRoute || actionStore.isAction)) {\n return true;\n }\n const afterTaskStore = afterTaskAsyncStorage.getStore();\n if (afterTaskStore) {\n // We're in an `after` callback. Request APIs are callable if\n // the `after()` call happened in an action phase:\n // - in a Route Handler\n // - in a Server Action's body (but not the render after)\n //\n // TODO(after): Is it even possible to have `phase === 'action'` but no `actionStore`?\n // We should revisit this setup and simplify this.\n return afterTaskStore.rootTaskSpawnPhase === 'action';\n }\n // Otherwise, we must be in a page, in the `after` phase.\n // We don't allow calling request APIs here because we'd miss\n // them during prerendering and wouldn't know that the page is dynamic.\n return false;\n }\n }\n}\n\n//# sourceMappingURL=utils.js.map","import { InvariantError } from '../../shared/lib/invariant-error';\nexport const MIN_PRERENDERABLE_EXPIRE = 300 // 5 minutes\n;\nexport const MIN_PREFETCHABLE_STALE = 30 // 30 seconds\n;\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 Object.defineProperty(new InvariantError('MIN_PREFETCHABLE_STALE must not exceed MIN_SHELL_STALE.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1422\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=constants.js.map","import { PAGE_SEGMENT_KEY } from '../segment';\nexport const ROOT_SEGMENT_REQUEST_KEY = '';\nexport const HEAD_REQUEST_KEY = '/_head';\nexport function createSegmentRequestKeyPart(segment) {\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;\n }\n const safeName = // 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' ? '_not-found' : 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;\n }\n const name = segment[0];\n const paramType = segment[2];\n const safeName = encodeToFilesystemAndURLSafeString(name);\n const encodedName = '$' + paramType + '$' + safeName;\n return encodedName;\n}\nexport function appendSegmentRequestKeyPart(parentRequestKey, parallelRouteKey, childRequestKeyPart) {\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 // 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 = parallelRouteKey === 'children' ? childRequestKeyPart : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`;\n return parentRequestKey + '/' + slotKey;\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\\-_@]+$/;\nfunction encodeToFilesystemAndURLSafeString(value) {\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).replace(/\\+/g, '-') // Replace '+' with '-'\n .replace(/\\//g, '_') // Replace '/' with '_'\n .replace(/=+$/, '') // Remove trailing '='\n ;\n return '!' + base64url;\n}\nexport function convertSegmentPathToStaticExportFilename(segmentPath) {\n return `__next${segmentPath.replace(/\\//g, '.')}.txt`;\n}\n\n//# sourceMappingURL=segment-value-encoding.js.map","import { resolveAsArrayOrUndefined } from '../generate/utils';\nimport { resolveAbsoluteUrlWithPathname } from './resolve-url';\nfunction resolveAlternateUrl(url, metadataBase, pathname, metadataContext) {\n // If alter native url is an URL instance,\n // we treat it as a URL base and resolve with current pathname\n if (url instanceof URL) {\n const newUrl = new URL(pathname, url);\n url.searchParams.forEach((value, key)=>newUrl.searchParams.set(key, value));\n url = newUrl;\n }\n return resolveAbsoluteUrlWithPathname(url, metadataBase, pathname, metadataContext);\n}\nexport const resolveThemeColor = (themeColor)=>{\n var _resolveAsArrayOrUndefined;\n if (!themeColor) return null;\n const themeColorDescriptors = [];\n (_resolveAsArrayOrUndefined = resolveAsArrayOrUndefined(themeColor)) == null ? void 0 : _resolveAsArrayOrUndefined.forEach((descriptor)=>{\n if (typeof descriptor === 'string') themeColorDescriptors.push({\n color: descriptor\n });\n else if (typeof descriptor === 'object') themeColorDescriptors.push({\n color: descriptor.color,\n media: descriptor.media\n });\n });\n return themeColorDescriptors;\n};\nasync function resolveUrlValuesOfObject(obj, metadataBase, pathname, metadataContext) {\n if (!obj) return null;\n const result = {};\n for (const [key, value] of Object.entries(obj)){\n if (typeof value === 'string' || value instanceof URL) {\n const pathnameForUrl = await pathname;\n result[key] = [\n {\n url: resolveAlternateUrl(value, metadataBase, pathnameForUrl, metadataContext)\n }\n ];\n } else if (value && value.length) {\n result[key] = [];\n const pathnameForUrl = await pathname;\n value.forEach((item, index)=>{\n const url = resolveAlternateUrl(item.url, metadataBase, pathnameForUrl, metadataContext);\n result[key][index] = {\n url,\n title: item.title\n };\n });\n }\n }\n return result;\n}\nasync function resolveCanonicalUrl(urlOrDescriptor, metadataBase, pathname, metadataContext) {\n if (!urlOrDescriptor) return null;\n const url = typeof urlOrDescriptor === 'string' || urlOrDescriptor instanceof URL ? urlOrDescriptor : urlOrDescriptor.url;\n const pathnameForUrl = await pathname;\n // Return string url because structureClone can't handle URL instance\n return {\n url: resolveAlternateUrl(url, metadataBase, pathnameForUrl, metadataContext)\n };\n}\nexport const resolveAlternates = async (alternates, metadataBase, pathname, context)=>{\n if (!alternates) return null;\n const canonical = await resolveCanonicalUrl(alternates.canonical, metadataBase, pathname, context);\n const languages = await resolveUrlValuesOfObject(alternates.languages, metadataBase, pathname, context);\n const media = await resolveUrlValuesOfObject(alternates.media, metadataBase, pathname, context);\n const types = await resolveUrlValuesOfObject(alternates.types, metadataBase, pathname, context);\n return {\n canonical,\n languages,\n media,\n types\n };\n};\nconst robotsKeys = [\n 'noarchive',\n 'nosnippet',\n 'noimageindex',\n 'nocache',\n 'notranslate',\n 'indexifembedded',\n 'nositelinkssearchbox',\n 'unavailable_after',\n 'max-video-preview',\n 'max-image-preview',\n 'max-snippet'\n];\nconst resolveRobotsValue = (robots)=>{\n if (!robots) return null;\n if (typeof robots === 'string') return robots;\n const values = [];\n if (robots.index) values.push('index');\n else if (typeof robots.index === 'boolean') values.push('noindex');\n if (robots.follow) values.push('follow');\n else if (typeof robots.follow === 'boolean') values.push('nofollow');\n for (const key of robotsKeys){\n const value = robots[key];\n if (typeof value !== 'undefined' && value !== false) {\n values.push(typeof value === 'boolean' ? key : `${key}:${value}`);\n }\n }\n return values.join(', ');\n};\nexport const resolveRobots = (robots)=>{\n if (!robots) return null;\n return {\n basic: resolveRobotsValue(robots),\n googleBot: typeof robots !== 'string' ? resolveRobotsValue(robots.googleBot) : null\n };\n};\nconst VerificationKeys = [\n 'google',\n 'yahoo',\n 'yandex',\n 'me',\n 'other'\n];\nexport const resolveVerification = (verification)=>{\n if (!verification) return null;\n const res = {};\n for (const key of VerificationKeys){\n const value = verification[key];\n if (value) {\n if (key === 'other') {\n res.other = {};\n for(const otherKey in verification.other){\n const otherValue = resolveAsArrayOrUndefined(verification.other[otherKey]);\n if (otherValue) res.other[otherKey] = otherValue;\n }\n } else res[key] = resolveAsArrayOrUndefined(value);\n }\n }\n return res;\n};\nexport const resolveAppleWebApp = (appWebApp)=>{\n var _resolveAsArrayOrUndefined;\n if (!appWebApp) return null;\n if (appWebApp === true) {\n return {\n capable: true\n };\n }\n const startupImages = appWebApp.startupImage ? (_resolveAsArrayOrUndefined = resolveAsArrayOrUndefined(appWebApp.startupImage)) == null ? void 0 : _resolveAsArrayOrUndefined.map((item)=>typeof item === 'string' ? {\n url: item\n } : item) : null;\n return {\n capable: 'capable' in appWebApp ? !!appWebApp.capable : true,\n title: appWebApp.title || null,\n startupImage: startupImages,\n statusBarStyle: appWebApp.statusBarStyle || 'default'\n };\n};\nexport const resolveAppLinks = (appLinks)=>{\n if (!appLinks) return null;\n for(const key in appLinks){\n // @ts-ignore // TODO: type infer\n appLinks[key] = resolveAsArrayOrUndefined(appLinks[key]);\n }\n return appLinks;\n};\nexport const resolveItunes = async (itunes, metadataBase, pathname, context)=>{\n if (!itunes) return null;\n return {\n appId: itunes.appId,\n appArgument: itunes.appArgument ? resolveAlternateUrl(itunes.appArgument, metadataBase, await pathname, context) : undefined\n };\n};\nexport const resolveFacebook = (facebook)=>{\n if (!facebook) return null;\n return {\n appId: facebook.appId,\n admins: resolveAsArrayOrUndefined(facebook.admins)\n };\n};\nexport const resolvePagination = async (pagination, metadataBase, pathname, context)=>{\n return {\n previous: (pagination == null ? void 0 : pagination.previous) ? resolveAlternateUrl(pagination.previous, metadataBase, await pathname, context) : null,\n next: (pagination == null ? void 0 : pagination.next) ? resolveAlternateUrl(pagination.next, metadataBase, await pathname, context) : null\n };\n};\n\n//# sourceMappingURL=resolve-basics.js.map","/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */ import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { PrefetchHint, StaticPrefetchDisabled } from '../../shared/lib/app-router-types';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { renderToReadableStream } from 'react-server-dom-webpack/server';\nimport { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment';\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers';\nimport { createSegmentRequestKeyPart, appendSegmentRequestKeyPart, ROOT_SEGMENT_REQUEST_KEY, HEAD_REQUEST_KEY } from '../../shared/lib/segment-cache/segment-value-encoding';\nimport { getDigestForWellKnownError } from './create-error-handler';\nimport { Phase, printDebugThrownValueForProspectiveRender } from './prospective-render-utils';\nimport { workAsyncStorage } from './work-async-storage.external';\nconst filterStackFrame = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').filterStackFrameDEV : undefined;\nconst findSourceMapURL = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').findSourceMapURLDEV : undefined;\nfunction onSegmentPrerenderError(error) {\n const digest = getDigestForWellKnownError(error);\n if (digest) {\n return digest;\n }\n // We don't need to log the errors because we would have already done that\n // when generating the original Flight stream for the whole page.\n if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n const workStore = workAsyncStorage.getStore();\n printDebugThrownValueForProspectiveRender(error, (workStore == null ? void 0 : workStore.route) ?? 'unknown route', Phase.SegmentCollection);\n }\n}\n/**\n * Extract the FlightRouterState, seed data, and head from a prerendered\n * InitialRSCPayload. Returns null if the payload doesn't match the expected\n * shape: a single root path with no segment prefix, which has 4 elements\n * ([tree, seedData, head, isHeadPartial], per getRSCPayload) or 3 when\n * reconstructed without the isHeadPartial flag (per instant-validation).\n */ function extractFlightData(initialRSCPayload) {\n const flightDataPaths = initialRSCPayload.f;\n // FlightDataPath is an unsound type, hence the additional checks.\n if (flightDataPaths.length !== 1 || flightDataPaths[0].length !== 3 && flightDataPaths[0].length !== 4) {\n console.error('Internal Next.js error: InitialRSCPayload does not match the expected ' + 'shape for a prerendered page during segment prefetch generation.');\n return null;\n }\n return {\n buildId: initialRSCPayload.b,\n flightRouterState: flightDataPaths[0][0],\n seedData: flightDataPaths[0][1],\n head: flightDataPaths[0][2]\n };\n}\nexport async function collectSegmentData(isCacheComponentsEnabled, fullPageDataBuffer, staleTime, clientModules, serverConsumerManifest, prefetchInlining, hints, isUpgradeableISRFallback) {\n // Traverse the router tree and generate a prefetch response for each segment.\n // A mutable map to collect the results as we traverse the route tree.\n const resultMap = new Map();\n // Before we start, warm up the module cache by decoding the page data once.\n // Then we can assume that any remaining async tasks that occur the next time\n // are due to hanging promises caused by dynamic data access. Note we only\n // have to do this once per page, not per individual segment.\n //\n // The warm-up decode also tells us the page's own shell byte boundary (its\n // `a` field): a byte offset into fullPageDataBuffer marking the end of the\n // page's shell stage, null if the shell is identical to the full static\n // response, or undefined if the render wasn't staged (no shell exists).\n //\n // And it tells us whether the render accessed runtime data (cookies,\n // headers, fallback params, searchParams, ...): the settled value of the\n // page's embedded access flag (its `u` field). Conservatively true when\n // the page carries no flag (legacy render paths) or the decode fails.\n let pageShellByteLength = undefined;\n let runtimeDataAccessed = true;\n try {\n const pagePayload = await createFromReadableStream(// Use a stream that never closes so pending references (dynamic\n // holes) can't error the decode.\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)), {\n findSourceMapURL,\n serverConsumerManifest\n });\n await waitAtLeastOneReactRenderTask();\n // `a` is a promise resolved mid-stream; the whole buffer is present, so\n // it resolves. undefined means the render wasn't staged (no shell).\n if (pagePayload.a !== undefined) {\n pageShellByteLength = await pagePayload.a;\n }\n if (pagePayload.u !== undefined) {\n runtimeDataAccessed = readRuntimeDataAccessed(pagePayload.u);\n }\n } catch {}\n // All segment responses of a page share one decode of the page buffer, and\n // one `release` promise that coordinates the two serialization stages: it\n // resolves when the coordinator lets the shell-stage bytes settle into the\n // rest of the page data (see renderSegmentPrefetch, which measures each\n // response's shell boundary at that moment). Its resolved value is true\n // when the page's shell is identical to its full static response — then so\n // is every segment's, so each resolves `a` to null instead of a boundary.\n //\n // When the page has a real shell boundary the decode is staged: only the\n // shell byte prefix is enqueued now, the rest held until the release. With\n // no boundary there's nothing to stage on, so the whole buffer is decoded\n // at once and the release is resolved eagerly (segment boundaries then fall\n // out as 0 or null without any measurement).\n const release = createPromiseWithResolvers();\n let pageDataStream;\n if (typeof pageShellByteLength === 'number') {\n const prefixLength = pageShellByteLength;\n pageDataStream = new ReadableStream({\n async start (controller) {\n // The shell byte prefix decodes to the page's shell variant:\n // everything the staged page render serialized after its shell stage\n // stays a pending reference until the release enqueues the rest.\n controller.enqueue(fullPageDataBuffer.subarray(0, prefixLength));\n await release.promise;\n controller.enqueue(fullPageDataBuffer.subarray(prefixLength));\n // Intentionally never closed, like createUnclosingPrefetchStream:\n // the page stream may hold references that never resolve (dynamic\n // holes), and Flight errors if the stream closes while any are pending.\n }\n });\n } else {\n pageDataStream = createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer));\n release.resolve(pageShellByteLength === null);\n }\n // Create an abort controller that we'll use to stop the stream.\n const abortController = new AbortController();\n const onCompletedProcessingRouteTree = async ()=>{\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // serializing the stream takes longer than a microtask, it must because of\n // hanging promises caused by dynamic data.\n await waitAtLeastOneReactRenderTask();\n abortController.abort();\n };\n // Generate a stream for the route tree prefetch. While we're walking the\n // tree, we'll also spawn additional tasks to generate the segment prefetches.\n // The promises for these tasks are pushed to a mutable array that we will\n // await once the route tree is fully rendered.\n const segmentTasks = [];\n let treeStream;\n try {\n const prerenderResult = await prerender(// RootTreePrefetch is not a valid return type for a React component, but\n // we need to use a component so that when we decode the original stream\n // inside of it, the side effects are transferred to the new stream.\n // @ts-expect-error\n /*#__PURE__*/ _jsx(PrefetchTreeData, {\n isClientParamParsingEnabled: isCacheComponentsEnabled,\n pageDataStream: pageDataStream,\n serverConsumerManifest: serverConsumerManifest,\n clientModules: clientModules,\n staleTime: staleTime,\n segmentTasks: segmentTasks,\n onCompletedProcessingRouteTree: onCompletedProcessingRouteTree,\n prefetchInlining: prefetchInlining,\n hints: hints,\n isUpgradeableISRFallback: isUpgradeableISRFallback,\n runtimeDataAccessed: runtimeDataAccessed,\n shellStageRelease: release.promise\n }), clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError\n });\n treeStream = prerenderResult.prelude;\n // The tree walk has spawned every segment render, each against the fully\n // available shell prefix; one task later they've flushed their shells and\n // are blocked on the release for the rest.\n await waitAtLeastOneReactRenderTask();\n } catch (error) {\n // The release still fires (finally below), so the spawned tasks run to\n // completion — but the throw skips the Promise.all that observes them.\n // Absorb their rejections so a failing task can't crash as an unhandled\n // rejection and mask this error.\n void Promise.allSettled(segmentTasks);\n throw error;\n } finally{\n // Start the second stage: settle the rest of the page data into the\n // decode so each render can measure its boundary and finish. Runs on\n // failure too, so a tree-render error can't strand the spawned tasks on\n // a release that never comes. (false is inert here: a staged page's shell\n // is always a strict prefix, and an unstaged release already resolved.)\n // TODO: I don't think it's really necessary to unblock the spawned tasks.\n // It's fine if they hang indefinitely; the tasks will be garbage collected.\n release.resolve(false);\n }\n // Write the route tree to a special `/_tree` segment.\n const treeBuffer = await streamToBuffer(treeStream);\n resultMap.set('/_tree', treeBuffer);\n // Also output the entire full page data response\n resultMap.set('/_full', fullPageDataBuffer);\n // Await the segment tasks in parallel and write the segment prefetches to\n // the result map.\n let hasPageSegment = false;\n for (const [segmentPath, buffer] of (await Promise.all(segmentTasks))){\n resultMap.set(segmentPath, buffer);\n if (segmentPath.endsWith('__PAGE__')) {\n hasPageSegment = true;\n }\n }\n if (!hasPageSegment) {\n // The build requires at least one segment path ending with __PAGE__ to\n // register the catch-all segment data route. When all page segments are\n // disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry\n // is emitted. Write a dummy entry with a path that doesn't match any\n // real route segment so the client will never request it.\n //\n // TODO: Remove the __PAGE__ requirement from the build instead of\n // working around it here. The invariant is outdated now that segments\n // can be disabled.\n resultMap.set('/todo-remove-fake-segment/__PAGE__', Buffer.alloc(0));\n }\n return resultMap;\n}\n/**\n * Compute prefetch hints for a route by measuring segment sizes and deciding\n * which segments should be inlined. Only runs at build time. The results are\n * written to prefetch-hints.json and loaded at server startup.\n *\n * This is a separate pass from collectSegmentData so that the inlining\n * decisions can be fed back into collectSegmentData to control which segments\n * are output as separate entries vs. inlined into their parent.\n *\n * `shouldAttemptStaticPrefetch` (computed by the caller from the prerender's\n * runtime-data tracking) is folded onto every node of the result, so the\n * manifest delivers it to every response like the other hint bits. It's\n * independent of the inlining feature: when `inlining` is false the sizing\n * pass is skipped entirely — no inlining bits are emitted — and only the\n * tree shape carrying the static-prefetch hint is built.\n *\n * Both kinds of hint have the same structure and the same lifetime — one\n * bitmask per node of the route tree, measured once per build and constant\n * for the deployment. They differ only in what they're derived from: the\n * inlining bits from the size of each segment's encoded response, the\n * static-prefetch bit from what the decoded body turned out to access.\n */ export async function collectPrefetchHints(fullPageDataBuffer, staleTime, clientModules, serverConsumerManifest, inlining, shouldAttemptStaticPrefetch) {\n // Warm up the module cache, same as collectSegmentData.\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest\n });\n await waitAtLeastOneReactRenderTask();\n } catch {}\n // Decode the Flight data to walk the route tree.\n const initialRSCPayload = await createFromReadableStream(createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)), {\n findSourceMapURL,\n serverConsumerManifest\n });\n const flightData = extractFlightData(initialRSCPayload);\n if (flightData === null) {\n return {\n hints: 0,\n slots: null\n };\n }\n const { buildId, flightRouterState, seedData, head } = flightData;\n // The hints every node starts from. The static-prefetch-attempt hint is\n // page-global (the tracking that feeds it is), so it goes on every node,\n // non-propagating — the client reads it per segment, and the runtime\n // hint merging walks the manifest tree node-by-node.\n const baseHints = shouldAttemptStaticPrefetch ? PrefetchHint.ShouldAttemptStaticPrefetch : 0;\n if (inlining === false) {\n // Prefetch inlining is disabled: nothing to measure, and no inlining\n // bits may be emitted (the client would act on them even though the\n // responses aren't bundled). Just mirror the route tree's shape with\n // the base hints on every node.\n return createUniformHintTree(flightRouterState, baseHints);\n }\n const { maxSize, maxBundleSize } = inlining;\n // Root params are forwarded once at the top level of each segment\n // response, same as the page response's own root vary params; the client\n // unions them into each segment's set at read time.\n const rootVaryParamsIterable = initialRSCPayload.r ?? null;\n // The page's staleTime iterable, forwarded into each segment response. When\n // Cache Components is off the page carries no `s`, so wrap the eager value.\n const staleTimeIterable = initialRSCPayload.s ?? createStaleTimeIterable(staleTime);\n // The page's runtime-data-access flag, forwarded into each segment\n // response's `needsRuntimeRequest`. This pass only measures sizes, so a\n // conservative already-resolved `true` stands in when the page carries\n // no `u`.\n const needsRuntimeRequest = initialRSCPayload.u ?? Promise.resolve(true);\n // This pass only measures gzip sizes for inlining hints, so nothing is\n // staged (each response's `a` falls out as the no-shell sentinel, 0), but\n // the responses are byte-identical in shape to the real ones — the point\n // of measuring. Pre-resolving false is the \"nothing staged\" release.\n const shellStageRelease = Promise.resolve(false);\n // Measure the head (metadata/viewport) gzip size so the main traversal\n // can decide whether to inline it into a page's bundle.\n const [, headBuffer] = await renderSegmentPrefetch(buildId, staleTimeIterable, head, HEAD_REQUEST_KEY, initialRSCPayload.h, rootVaryParamsIterable, clientModules, null, // Fallback-ness doesn't affect size, so pass false.\n false, needsRuntimeRequest, shellStageRelease);\n const headGzipSize = await getGzipSize(headBuffer);\n // Mutable accumulator: the first segment that accepts the head sets this\n // to true. Once set, subsequent segments skip the check.\n const headInlineState = {\n inlined: false\n };\n // Walk the tree with the parent-first, child-decides algorithm.\n const { node } = await collectPrefetchHintsImpl(flightRouterState, buildId, staleTimeIterable, seedData, clientModules, ROOT_SEGMENT_REQUEST_KEY, null, baseHints, maxSize, maxBundleSize, headGzipSize, headInlineState, rootVaryParamsIterable, needsRuntimeRequest, shellStageRelease);\n if (!headInlineState.inlined) {\n // No page could accept the head. Set HeadOutlined on the root so the\n // client knows to fetch the head separately.\n node.hints |= PrefetchHint.HeadOutlined;\n }\n return node;\n}\n// Measure a segment's gzip size and decide whether it should be inlined.\n//\n// These hints are computed once during build and never change for the\n// lifetime of that deployment. The client can assume that hints delivered as\n// part of one request will be the same during a subsequent request, given\n// the same build ID. There's no skew to worry about as long as the build\n// itself is consistent.\n//\n// In the Segment Cache, we split page prefetches into multiple requests so\n// that each one can be cached and deduped independently. However, some\n// segments are small enough that the potential caching benefits are not worth\n// the additional network overhead. For these, we inline a parent's data into\n// one of its children's responses, avoiding a separate request. The parent\n// is inlined into the child (not the other way around) because the parent's\n// response is more likely to be shared across multiple pages. The child's\n// response is already page-specific, so adding the parent's data there\n// doesn't meaningfully reduce deduplication. It's similar to how JS bundlers\n// decide whether to inline a module into a chunk.\n//\n// The algorithm is parent-first, child-decides: the parent measures itself\n// and passes its gzip size down. Each child decides whether to accept. A\n// child rejects if the parent exceeds maxSize or if accepting would push\n// the cumulative inlined bytes past maxBundleSize. This produces\n// both ParentInlinedIntoSelf (on the child) and InlinedIntoChild (on the\n// parent) in a single pass.\nasync function collectPrefetchHintsImpl(route, buildId, staleTimeIterable, seedData, clientModules, // TODO: Consider persisting the computed requestKey into the hints output\n// so it doesn't need to be recomputed during the build. This might also\n// suggest renaming prefetch-hints.json to something like\n// segment-manifest.json, since it would contain more than just hints.\nrequestKey, parentGzipSize, // Hints every node starts from (the page-global static-prefetch-attempt\n// hint); the inlining bits computed here are OR'd on top.\nbaseHints, maxSize, maxBundleSize, headGzipSize, headInlineState, rootVaryParamsIterable, needsRuntimeRequest, shellStageRelease) {\n // Check if static prefetching is disabled for this segment\n // (prefetch: 'force-disabled' / instant = false). Such segments act as\n // transparent pass-throughs in the bundle chain: they contribute zero\n // bytes of their own and pass parent data through to children. However,\n // they cannot be the terminal of a chain — if no child accepts the parent\n // data, the parent cannot be inlined into this segment because there's no\n // static response to carry it. See the ParentInlinedIntoSelf check below.\n //\n // Partial Prefetching segments are NOT disabled even though they may need\n // a runtime prefetch: they have static data — emitted unconditionally, so\n // the client can attempt a static prefetch before deciding whether the\n // runtime request is needed — and are measured and inlined like any other\n // segment.\n const isStaticPrefetchDisabled = ((route[4] ?? 0) & StaticPrefetchDisabled) !== 0;\n // Render current segment and measure its gzip size. Skip measurement for\n // segments with static prefetching disabled since they contribute nothing.\n let currentGzipSize = null;\n if (!isStaticPrefetchDisabled && seedData !== null) {\n const [, buffer] = await renderSegmentPrefetch(buildId, staleTimeIterable, seedData[0], requestKey, seedData[4], rootVaryParamsIterable, clientModules, null, // Size-measurement pass only; fallback-ness is irrelevant here.\n false, needsRuntimeRequest, shellStageRelease);\n currentGzipSize = await getGzipSize(buffer);\n }\n // Only offer this segment to its children for inlining if its gzip size\n // is below maxSize. Segments with static prefetching disabled have\n // nothing to offer (their slot in the bundle is null).\n const sizeToInline = currentGzipSize !== null && currentGzipSize < maxSize ? currentGzipSize : null;\n // Process children serially (not in parallel) to ensure deterministic\n // results. Since this only runs at build time and the rendering is just\n // re-encoding cached prerenders, this won't impact build times. Each child\n // receives our gzip size and decides whether to inline us. Once a child\n // accepts, we stop offering to remaining siblings — the parent is only\n // inlined into one child. In parallel routes, this avoids duplicating the\n // parent's data across multiple sibling responses.\n const children = route[1];\n const seedDataChildren = seedData !== null ? seedData[1] : null;\n let slots = null;\n let didInlineIntoChild = false;\n let acceptingChildInlinedBytes = 0;\n // Track the smallest inlinedBytes across all children so we know how much\n // budget remains along the best path. When our own parent asks whether we\n // can accept its data, the parent's bytes would flow through to the child\n // with the most remaining headroom.\n let smallestChildInlinedBytes = Infinity;\n let hasChildren = false;\n for(const parallelRouteKey in children){\n hasChildren = true;\n const childRoute = children[parallelRouteKey];\n const childSegment = childRoute[0];\n const childSeedData = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] ?? null : null;\n const childRequestKey = appendSegmentRequestKeyPart(requestKey, parallelRouteKey, createSegmentRequestKeyPart(childSegment));\n // Determine what size to offer children for inlining. Normally we offer\n // our own size. But if static prefetching is disabled for this segment,\n // it has no data of its own — instead it passes the parent's offer\n // through to children. This allows a static grandparent to inline\n // through a disabled intermediate segment into a static grandchild.\n const sizeToOfferChild = isStaticPrefetchDisabled ? parentGzipSize : sizeToInline;\n const childResult = await collectPrefetchHintsImpl(childRoute, buildId, staleTimeIterable, childSeedData, clientModules, childRequestKey, // Once a child has accepted us, stop offering to remaining siblings.\n didInlineIntoChild ? null : sizeToOfferChild, baseHints, maxSize, maxBundleSize, headGzipSize, headInlineState, rootVaryParamsIterable, needsRuntimeRequest, shellStageRelease);\n if (slots === null) {\n slots = {};\n }\n slots[parallelRouteKey] = childResult.node;\n if (childResult.node.hints & PrefetchHint.ParentInlinedIntoSelf) {\n // This child accepted our data — it will include our segment's\n // response in its own. No need to track headroom anymore since\n // we already know which child we're inlined into.\n didInlineIntoChild = true;\n acceptingChildInlinedBytes = childResult.inlinedBytes;\n } else if (!didInlineIntoChild) {\n // Track the child with the most remaining headroom. Used below\n // when deciding whether to accept our own parent's data.\n if (childResult.inlinedBytes < smallestChildInlinedBytes) {\n smallestChildInlinedBytes = childResult.inlinedBytes;\n }\n }\n }\n // Leaf segment: no children have consumed any budget yet.\n if (!hasChildren) {\n smallestChildInlinedBytes = 0;\n }\n // Mark this segment as InlinedIntoChild if one of its children accepted.\n // This means this segment doesn't need its own prefetch response — its\n // data is included in the accepting child's response instead.\n let hints = baseHints;\n if (didInlineIntoChild) {\n hints |= PrefetchHint.InlinedIntoChild;\n }\n // inlinedBytes represents the total gzipped bytes of parent data inlined\n // into the deepest \"inlining target\" along this branch. It starts at 0 at\n // the leaves and grows as parents are inlined going back up the tree. If a\n // child accepted us, our size is already counted in that child's value.\n let inlinedBytes = didInlineIntoChild ? acceptingChildInlinedBytes : smallestChildInlinedBytes;\n // Determine which segment is responsible for the head (metadata/viewport).\n //\n // The head is assigned to the first page bundle terminal that has budget\n // room; otherwise it's outlined as a standalone response (HeadOutlined,\n // set by the caller). Head can only be inlined into a page, not a layout,\n // because pages may access additional params (e.g. searchParams) that\n // layouts cannot. It must be a bundle terminal because only bundle\n // terminals emit a static response of their own (the head bundle is\n // appended in collectSegmentDataImpl's standalone-task branch) —\n // assigning the head to an inlined segment would leave it out of every\n // static response.\n //\n // A disabled segment (prefetch: 'force-disabled' / instant = false) is\n // never a valid target — it has no response at all. A Partial Prefetching\n // segment, by contrast, DOES have a static response (see\n // isStaticPrefetchDisabled above) and is an ordinary candidate. Runtime\n // prefetching gets no special treatment here: whether the client will\n // actually issue a runtime request can't be known at build time (a static\n // prefetch attempt may prove sufficient and skip it), so the head must\n // always be reachable through the static responses — inlined into one of\n // them, or outlined.\n const isBundleTerminal = !didInlineIntoChild && !isStaticPrefetchDisabled;\n const segment = route[0];\n const isPageSegment = typeof segment === 'string' ? segment === PAGE_SEGMENT_KEY : segment[0] === PAGE_SEGMENT_KEY;\n if (!headInlineState.inlined && isBundleTerminal && isPageSegment) {\n // The head counts against the bundle budget.\n if (inlinedBytes + headGzipSize < maxBundleSize) {\n hints |= PrefetchHint.HeadInlinedIntoSelf;\n inlinedBytes += headGzipSize;\n headInlineState.inlined = true;\n }\n }\n // Decide whether to accept our own parent's data. Conditions:\n //\n // 1. The parent offered us a size (parentGzipSize is not null). It's null\n // when the parent is too large to inline or when this is the root.\n //\n // 2. The total inlined bytes along this branch wouldn't exceed the budget.\n // Even if each segment is individually small, at some point it no\n // longer makes sense to keep adding bytes because the combined response\n // is unique per URL and can't be deduped.\n //\n // 3. If this segment has static prefetching disabled, it can only accept\n // the parent if it has successfully inlined into a child. A disabled\n // segment is a transparent pass-through — it passes parent data through\n // to descendants. But if no descendant accepted, there's no static\n // response to carry the parent's data, so the parent must remain\n // outlined.\n //\n // A node can be both InlinedIntoChild and ParentInlinedIntoSelf. This\n // happens in multi-level chains: GP → P → C where all are small. C\n // accepts P (P is InlinedIntoChild), then P also accepts GP (P is\n // ParentInlinedIntoSelf). The result: C's response includes both P's\n // and GP's data. The parent's data flows through to the deepest\n // accepting descendant.\n if (parentGzipSize !== null) {\n // A disabled segment can only pass through — it needs a child to\n // ultimately accept the parent's data.\n const canAcceptParent = !isStaticPrefetchDisabled || didInlineIntoChild;\n if (canAcceptParent && inlinedBytes + parentGzipSize < maxBundleSize) {\n hints |= PrefetchHint.ParentInlinedIntoSelf;\n inlinedBytes += parentGzipSize;\n }\n }\n return {\n node: {\n hints,\n slots\n },\n inlinedBytes\n };\n}\n// Mirrors the route tree's shape with the same hints on every node. Used by\n// collectPrefetchHints when prefetch inlining is disabled: there are no sizes\n// to measure, but the static-prefetch-attempt hint still needs a manifest\n// tree — the client reads the bit per node, and the runtime hint merging\n// (createFlightRouterStateFromLoaderTree) walks the manifest tree in parallel\n// with the loader tree, so a bit that's missing from a node never reaches the\n// corresponding segment.\nfunction createUniformHintTree(route, hints) {\n let slots = null;\n const children = route[1];\n for(const parallelRouteKey in children){\n if (slots === null) {\n slots = {};\n }\n slots[parallelRouteKey] = createUniformHintTree(children[parallelRouteKey], hints);\n }\n return {\n hints,\n slots\n };\n}\n// We use gzip size rather than raw size because it better reflects the actual\n// transfer cost. The inlining trade-off is about whether the overhead of an\n// additional HTTP request (connection setup, headers, round trip) is worth\n// the deduplication benefit of keeping a segment separate. Below some\n// compressed size, the request overhead dominates and inlining is better.\n// Above it, the deduplication benefit of a cacheable standalone response\n// wins out.\nasync function getGzipSize(buffer) {\n const stream = new Blob([\n new Uint8Array(buffer)\n ]).stream().pipeThrough(new CompressionStream('gzip'));\n const compressedBlob = await new Response(stream).blob();\n return compressedBlob.size;\n}\nasync function PrefetchTreeData({ isClientParamParsingEnabled, pageDataStream, serverConsumerManifest, clientModules, staleTime, segmentTasks, onCompletedProcessingRouteTree, prefetchInlining, hints, isUpgradeableISRFallback, runtimeDataAccessed, shellStageRelease }) {\n // We're currently rendering a Flight response for the route tree prefetch.\n // Inside this component, decode the Flight stream for the whole page. This is\n // a hack to transfer the side effects from the original Flight stream (e.g.\n // Float preloads) onto the Flight stream for the tree prefetch.\n // TODO: React needs a better way to do this. Needed for Server Actions, too.\n //\n // This is the decode that everything downstream reads from: the route tree\n // walk below and, through it, every segment task. When staged, the values\n // extracted here hold pending references at the param-dependent holes; the\n // shell byte prefix carries the full router tree and seed-data skeleton, so\n // the root resolves from the prefix alone (the rest arrives at the release).\n const initialRSCPayload = await createFromReadableStream(pageDataStream, {\n findSourceMapURL,\n serverConsumerManifest\n });\n const flightData = extractFlightData(initialRSCPayload);\n if (flightData === null) {\n return null;\n }\n const { buildId, flightRouterState, seedData, head } = flightData;\n // Root params are forwarded once at the top level of each segment\n // response, same as the page response's own root vary params; the client\n // unions them into each segment's set at read time.\n const rootVaryParamsIterable = initialRSCPayload.r ?? null;\n // The page's staleTime iterable, forwarded into each segment response. When\n // Cache Components is off the page carries no `s`, so wrap the eager value.\n const staleTimeIterable = initialRSCPayload.s ?? createStaleTimeIterable(staleTime);\n // The page's runtime-data-access flag, forwarded into each segment\n // response's `needsRuntimeRequest`. When the page carries no `u` (e.g.\n // legacy render paths), wrap the flag the caller read from the warm-up\n // decode in an already-resolved promise.\n const needsRuntimeRequest = initialRSCPayload.u ?? Promise.resolve(runtimeDataAccessed);\n // Only applies when prefetch inlining is enabled — the client doesn't\n // know to look for the head inside a page's response otherwise.\n const headIsInlined = prefetchInlining && hints !== null && !(hints.hints & PrefetchHint.HeadOutlined);\n // Compute the route metadata tree by traversing the FlightRouterState. As we\n // walk the tree, we will also spawn a task to produce a prefetch response for\n // each segment. When prefetch inlining is enabled, small segments are bundled\n // into their children's responses based on the hint bits.\n const headBundle = headIsInlined ? {\n rsc: head,\n varyParams: initialRSCPayload.h,\n next: null\n } : null;\n const tree = collectSegmentDataImpl(isClientParamParsingEnabled, flightRouterState, buildId, staleTimeIterable, seedData, clientModules, ROOT_SEGMENT_REQUEST_KEY, segmentTasks, prefetchInlining, hints, null, headBundle, rootVaryParamsIterable, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease);\n // Spawn a task to produce a prefetch response for the \"head\" segment,\n // unless it was inlined into a page's bundle.\n if (!headIsInlined) {\n segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTimeIterable, head, HEAD_REQUEST_KEY, initialRSCPayload.h, rootVaryParamsIterable, clientModules, null, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease)));\n }\n // Notify the abort controller that we're done processing the route tree.\n // Anything async that happens after this point must be due to hanging\n // promises in the original stream.\n onCompletedProcessingRouteTree();\n // Render the route tree to a special `/_tree` segment.\n const treePrefetch = {\n tree,\n staleTime\n };\n if (buildId) {\n treePrefetch.buildId = buildId;\n }\n return treePrefetch;\n}\nfunction collectSegmentDataImpl(isClientParamParsingEnabled, route, buildId, staleTimeIterable, seedData, clientModules, requestKey, segmentTasks, prefetchInlining, hintTree, parentBundle, headBundle, rootVaryParamsIterable, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease) {\n // Union the hints already embedded in the FlightRouterState with the\n // separately-computed build-time hints. During the initial build, the\n // FlightRouterState was produced before collectPrefetchHints ran, so\n // inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in\n // route[4] yet. On subsequent renders the hints are already in the\n // FlightRouterState, so the union is idempotent.\n //\n // Always strip InliningHintsStale from the result. That bit is only\n // relevant for the initial RSC payload baked into HTML — the /_tree\n // response produced here always has correct hints, so the client should\n // never see InliningHintsStale in a /_tree response.\n const prefetchHints = ((route[4] ?? 0) | (hintTree !== null ? hintTree.hints : 0)) & ~PrefetchHint.InliningHintsStale;\n // The params this segment's own output varies on, forwarded into its\n // response as-is. Root params are forwarded separately, once per response.\n const varyParams = seedData !== null ? seedData[4] : null;\n // If static prefetching is disabled for this segment\n // (prefetch: 'force-disabled' / instant = false), it still participates in\n // the bundle chain but with null data. The client will skip creating a\n // cache entry for it.\n //\n // Partial Prefetching segments are NOT disabled even though they may need\n // a runtime prefetch: their static data is emitted UNCONDITIONALLY — it\n // can't be gated on the ShouldAttemptStaticPrefetch hint, because the\n // client walks bundles positionally and the null-slot positions must be\n // deterministic from build-time config alone. The client uses the data to\n // attempt a static prefetch before deciding whether the segment's runtime\n // request is actually needed.\n const staticPrefetchDisabled = (prefetchHints & StaticPrefetchDisabled) !== 0;\n const rsc = seedData !== null && !staticPrefetchDisabled ? seedData[0] : null;\n // Determine whether this segment's data should be accumulated into a\n // child's response (inlining) or spawned as its own task. When inlining\n // is disabled, the hint bits may still be set (they're computed at build\n // time regardless) but we ignore them — every segment is rendered\n // standalone because the client doesn't know how to parse bundled\n // responses.\n let childBundle = null;\n if (prefetchInlining && prefetchHints & PrefetchHint.InlinedIntoChild) {\n // This segment is small enough that its data will be included in one\n // of its children's responses. Don't spawn a separate task — prepend\n // this segment's data onto the linked list so the accepting child can\n // bundle it into its response.\n if (seedData !== null) {\n childBundle = {\n rsc,\n varyParams,\n next: parentBundle\n };\n }\n } else {\n // This segment is not inlined into a child. Spawn a task to render it.\n // If it has ParentInlinedIntoSelf, the accumulated parents are included\n // in its response. Otherwise parentBundle is null and it renders as a\n // standalone single-segment response.\n //\n // Skip spawning a task if rsc is null (disabled segment) — there's no\n // data to serve and the client won't request it.\n if (seedData !== null && rsc !== null) {\n let bundle = prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? parentBundle : null;\n // If this page accepts the head, append it at the tail of the chain.\n if (headBundle !== null && prefetchHints & PrefetchHint.HeadInlinedIntoSelf) {\n headBundle.next = bundle;\n bundle = headBundle;\n }\n segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTimeIterable, rsc, requestKey, varyParams, rootVaryParamsIterable, clientModules, bundle, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease)));\n }\n // childBundle stays null — reset the accumulator for children.\n }\n // Metadata about the segment. Sent as part of the tree prefetch. Null if\n // there are no children.\n let slotMetadata = null;\n const children = route[1];\n const seedDataChildren = seedData !== null ? seedData[1] : null;\n for(const parallelRouteKey in children){\n const childRoute = children[parallelRouteKey];\n const childSegment = childRoute[0];\n const childSeedData = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] ?? null : null;\n const childRequestKey = appendSegmentRequestKeyPart(requestKey, parallelRouteKey, createSegmentRequestKeyPart(childSegment));\n const childHintTree = hintTree !== null && hintTree.slots !== null ? hintTree.slots[parallelRouteKey] ?? null : null;\n const childTree = collectSegmentDataImpl(isClientParamParsingEnabled, childRoute, buildId, staleTimeIterable, childSeedData, clientModules, childRequestKey, segmentTasks, prefetchInlining, childHintTree, childBundle, headBundle, rootVaryParamsIterable, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease);\n if (slotMetadata === null) {\n slotMetadata = {};\n }\n slotMetadata[parallelRouteKey] = childTree;\n }\n const segment = route[0];\n let name;\n let param;\n if (typeof segment === 'string') {\n name = segment;\n param = null;\n } else {\n name = segment[0];\n param = {\n type: segment[2],\n // This value is omitted from the prefetch response when cacheComponents\n // is enabled.\n key: isClientParamParsingEnabled ? null : segment[1],\n siblings: segment[3]\n };\n }\n // Metadata about the segment. Sent to the client as part of the\n // tree prefetch.\n return {\n name,\n param,\n prefetchHints,\n slots: slotMetadata\n };\n}\n/**\n * Renders one segment prefetch response, and with it a shell byte boundary\n * (`a`) — the per-segment analogue of the route-level `a`. The boundary lets a\n * client later truncate the buffered response and re-decode the prefix into\n * the segment's shell variant (param-dependent content reduced to pending\n * references) without a second request.\n *\n * That boundary is the whole reason this isn't a plain re-serialize. A shell\n * is a temporal property of the staged page render, already collapsed by the\n * time the page stream is decoded, so it can't be recovered from the settled\n * values. Instead the response is serialized against a staged decode of the\n * page (the caller drip-feeds it in two stages): the shell rows flush first,\n * and the byte count when the rest is released is the boundary.\n *\n * Uses the streaming renderer, not `prerender`, because the boundary must be\n * observed mid-stream — `prerender` only exposes its prelude once finished.\n */ async function renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, rootVaryParams, clientModules, bundle, isUpgradeableISRFallback, needsRuntimeRequest, shellStageRelease) {\n const streamInfoStage = createPromiseWithResolvers();\n // Build the data array by walking the bundle list, terminal (requested)\n // segment first. Always an array, even for a single segment; the terminal\n // always has non-null rsc — disabled segments are skipped by the caller.\n const data = [];\n let node = {\n rsc,\n varyParams,\n next: bundle\n };\n while(node !== null){\n const elementRsc = node.rsc;\n if (elementRsc === null) {\n // Static prefetching disabled (prefetch: 'force-disabled'; Partial\n // Prefetching segments carry real data): a null placeholder keeps the\n // array aligned with the client's bundle list, which skips a cache\n // entry for the slot.\n data.push(null);\n } else {\n // We can determine if a segment contains only partial data if it takes\n // longer than a task to encode, because dynamic data is encoded as an\n // infinite promise. We must do this in a separate Flight prerender from\n // the one that actually generates the prefetch stream because we need\n // to include the result in the stream itself.\n const contentIsComplete = new Promise(async (resolve)=>{\n // Wait for the input stream to be fully unblocked before checking if\n // the data can be decoded synchronously.\n await streamInfoStage.promise;\n // If the data is fully static, this will resolve synchronously.\n // Otherwise, the promise stays unresolved forever, and so does\n // whatever field it's encoded into in the outer response.\n await prerender(elementRsc, clientModules, {\n filterStackFrame,\n onError () {}\n });\n resolve();\n });\n data.push({\n rsc: elementRsc,\n isPartial: contentIsComplete,\n staleTime,\n varyParams: node.varyParams\n });\n }\n node = node.next;\n }\n const responseKey = requestKey === ROOT_SEGMENT_REQUEST_KEY ? '/_index' : requestKey;\n // `a` (see SegmentPrefetchResponse['a']) is resolved below, once the shell\n // stage's bytes have been counted.\n let totalByteLength = 0;\n const shellByteOffset = createPromiseWithResolvers();\n // Wrap in the response envelope with the build ID at the top level.\n const payload = {\n buildId: buildId ?? '',\n data,\n isUpgradeableISRFallback,\n a: shellByteOffset.promise,\n rootVaryParams,\n needsRuntimeRequest\n };\n const abortController = new AbortController();\n const segmentStream = renderToReadableStream(payload, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError (error) {\n if (abortController.signal.aborted) {\n // Expected: aborting the render \"errors\" every reference that is\n // still pending, i.e. the dynamic holes. The corresponding error\n // rows are discarded below.\n return undefined;\n }\n return onSegmentPrerenderError(error);\n }\n });\n // Consume the stream as it's emitted, counting bytes so the shell boundary\n // can be measured. Reads settle within a microtask of each enqueue, so by\n // the time the release resolves (in a task after the renderer's last\n // flush), every byte the renderer has emitted has been counted.\n const reader = segmentStream.getReader();\n const chunksPromise = new Promise(async (resolve)=>{\n const chunks = [];\n while(true){\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n if (abortController.signal.aborted) {\n continue;\n }\n chunks.push(value);\n totalByteLength += value.byteLength;\n }\n resolve(chunks);\n });\n // The release's value is true when the page's shell is its entire static\n // response — then so is every segment's, so `a` is null (no separate shell\n // to extract). Otherwise we measure.\n const shellIsFullResponse = await shellStageRelease;\n // The shell stage is complete: everything the render can emit from the shell\n // prefix has flushed, so this is the shell's byte length.\n const byteLengthAfterShellStage = totalByteLength;\n // Wait one task for the rest of the segment data (past the page's own shell\n // boundary) to flush, per the timing rule: one macrotask after the release\n // enqueues it into the input decode, the render has emitted all of it.\n await waitAtLeastOneReactRenderTask();\n // Resolve `a`: null when the page said its shell is the whole response\n // (shellIsFullResponse) — then so is every segment's. Otherwise resolve the\n // measured boundary, even if no segment *content* follows it: the\n // stage-dependent metadata (`staleTime`, `needsRuntimeRequest`) always\n // lands its post-shell values and completion rows after this point, so a\n // truncated decode is meaningful for every segment of a staged page. When\n // the page wasn't staged at all, the release resolved before any bytes\n // flushed and the measured boundary falls out as 0, the \"no shell\"\n // sentinel.\n if (shellIsFullResponse) {\n shellByteOffset.resolve(null);\n } else {\n shellByteOffset.resolve(byteLengthAfterShellStage);\n }\n // Now write the stream metadata (`a`, the `isPartial` promises, and a\n // post-shell `needsRuntimeRequest` resolution). This is gated behind\n // streamInfoStage so it lands strictly after the boundary measurement\n // above — the post-shell values must not count as (or leak into) the\n // shell prefix.\n streamInfoStage.resolve();\n // Wait for the metadata rows to flush before halting — two macrotasks,\n // each a distinct hop:\n // 1. streamInfoStage unblocks the completeness probe renders; a static\n // segment's probe resolves within this task (a partial one never does,\n // which is how it stays pending → read as partial).\n // 2. those resolutions (and the already-resolved `a`) ping the render,\n // which emits their rows; the consumer reads that chunk here.\n // Halting after only the first hop would drop the not-yet-flushed metadata.\n await waitAtLeastOneReactRenderTask();\n await waitAtLeastOneReactRenderTask();\n // We're done writing, so we can abort the stream.\n abortController.abort();\n return [\n responseKey,\n Buffer.concat(await chunksPromise)\n ];\n}\n/**\n * Reads the page's runtime-data-access flag (the payload's `u`) from a decode\n * of the fully-settled page buffer. Because every byte is present, the\n * promise's row (if the render emitted one) is already visible on its\n * thenable status, so this never blocks — the same trick the client cache\n * uses to read staleTime from a buffered response.\n *\n * - fulfilled: the recorded flag.\n * - pending: `false`. A successful render always settles the flag (prerender\n * completion resolves `false`), so a pending row can only appear in an\n * aborted render's buffer, where it means no access was recorded before\n * the abort.\n * - rejected: `true`, conservatively — an abort errors rows that were still\n * pending when it happened.\n */ function readRuntimeDataAccessed(runtimeDataAccessed) {\n const promise = runtimeDataAccessed;\n // Force Flight to unwrap a received-but-not-yet-settled row.\n promise.then(ignoreChunk, ignoreChunk);\n switch(promise.status){\n case 'fulfilled':\n return promise.value === true;\n case 'rejected':\n return true;\n case undefined:\n default:\n return false;\n }\n}\nfunction ignoreChunk() {}\n// Wraps a known staleTime value in the same async-iterable shape as the page\n// response's `s`, so segment responses carry staleTime uniformly (and\n// rewindably) whether or not Cache Components supplied a real `s` iterable.\n// Re-consumable: each consumer gets a fresh generator (one segment response's\n// render, and there can be several).\nfunction createStaleTimeIterable(staleTime) {\n return {\n async *[Symbol.asyncIterator] () {\n yield staleTime;\n }\n };\n}\nfunction createUnclosingPrefetchStream(originalFlightStream) {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\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 continue;\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return;\n }\n }\n });\n}\n\n//# sourceMappingURL=collect-segment-data.js.map","import { RenderStage } from './app-render/staged-rendering';\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external';\nimport { getServerReact, getClientReact } from './runtime-reacts.external';\nexport function isHangingPromiseRejectionError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === HANGING_PROMISE_REJECTION;\n}\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';\nclass HangingPromiseRejectionError extends Error {\n constructor(route, expression){\n super(`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}\".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;\n }\n}\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC';\nexport class ClientHookDynamicError extends Error {\n constructor(route, expression){\n super(`Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` + `This blocks prerendering because the value is only available at runtime.\\n\\n` + `Ways to fix this:\\n` + ` - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` + ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` + `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`), this.digest = CLIENT_HOOK_DYNAMIC;\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1433\",\n enumerable: false,\n configurable: true\n });\n }\n}\nexport function isClientHookDynamicError(err) {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false;\n }\n return err.digest === CLIENT_HOOK_DYNAMIC;\n}\nconst abortListenersBySignal = new WeakMap();\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 */ export function makeDynamicHangingPromise(signal, route, expression) {\n return makeHangingPromiseWithError(signal, new HangingPromiseRejectionError(route, expression));\n}\nexport function makeUntrackedHangingPromise(signal, route, expression) {\n return makeHangingPromiseWithError(signal, new HangingPromiseRejectionError(route, expression));\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 */ export function makeRuntimeHangingPromise(signal, route, expression, workUnitStore) {\n if (workUnitStore !== null) {\n trackRuntimeDataAccessed(workUnitStore);\n }\n return makeHangingPromiseWithError(signal, new HangingPromiseRejectionError(route, expression));\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 */ export function makeFallbackParamsHangingPromise(signal, route, expression, workUnitStore) {\n if (workUnitStore !== null) {\n trackFallbackParamsAccessed(workUnitStore);\n }\n return makeHangingPromiseWithError(signal, new HangingPromiseRejectionError(route, expression));\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 */ export function makeStageHangingPromise(signal, route, expression, workUnitStore) {\n trackRuntimeDataAccessed(workUnitStore);\n return makeHangingPromiseWithError(signal, new HangingPromiseRejectionError(route, expression));\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 */ export function trackRuntimeDataAccessed(workUnitStore) {\n trackRuntimeDataAccessedImpl(workUnitStore, false);\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 */ export function trackFallbackParamsAccessed(workUnitStore) {\n trackRuntimeDataAccessedImpl(workUnitStore, true);\n}\nfunction trackRuntimeDataAccessedImpl(workUnitStore, isFallbackParamAccess) {\n switch(workUnitStore.type){\n case 'prerender':\n {\n var // 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;\n (_workUnitStore_runtimeDataAccessed = workUnitStore.runtimeDataAccessed) == null ? void 0 : _workUnitStore_runtimeDataAccessed.resolve(true);\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 (hintCell !== null && (!isFallbackParamAccess || !workUnitStore.isFallbackUpgradeable)) {\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 break;\n default:\n workUnitStore;\n }\n}\nexport function makeClientHookHangingPromise(signal, error) {\n return makeHangingPromiseWithError(signal, error);\n}\nfunction makeHangingPromiseWithError(signal, error) {\n if (signal.aborted) {\n return Promise.reject(error);\n } else {\n const hangingPromise = new Promise((_, 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 = [\n boundRejection\n ];\n abortListenersBySignal.set(signal, listeners);\n signal.addEventListener('abort', ()=>{\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}\nfunction ignoreReject() {}\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 */ export function makePromiseFromTrigger(trigger, value) {\n const promise = trigger.then(()=>value);\n promise.catch(ignoreReject);\n return promise;\n}\nexport function makeDevtoolsIOAwarePromise(underlying, requestStore, stage) {\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(stage, undefined, underlying);\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((resolve)=>{\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(()=>{\n resolve(underlying);\n }, 0);\n });\n}\nexport const RENDER_STAGES_BY_DATA_KIND = {\n sessionData: RenderStage.ShellRuntime,\n staticLinkData: RenderStage.Static,\n runtimeLinkData: RenderStage.Runtime\n};\nexport function applyOwnerStack(error) {\n if (process.env.NODE_ENV !== 'production') {\n var _getClientReact_captureOwnerStack, _getClientReact, _getServerReact_captureOwnerStack, _getServerReact;\n let ownerStack;\n const workUnitStore = workUnitAsyncStorage.getStore();\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 = ((_getClientReact = getClientReact()) == null ? void 0 : (_getClientReact_captureOwnerStack = _getClientReact.captureOwnerStack) == null ? void 0 : _getClientReact_captureOwnerStack.call(_getClientReact)) ?? ((_getServerReact = getServerReact()) == null ? void 0 : (_getServerReact_captureOwnerStack = _getServerReact.captureOwnerStack) == null ? void 0 : _getServerReact_captureOwnerStack.call(_getServerReact));\n switch(workUnitStore == null ? void 0 : workUnitStore.type){\n case 'cache':\n case 'private-cache':\n ownerStack = (innerOwnerStack || '') + (workUnitStore.outerOwnerStack || '') || 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;\n }\n if (ownerStack) {\n let stack = ownerStack;\n if (error.stack) {\n const frames = [];\n for (const frame of error.stack.split('\\n').slice(1)){\n if (frame.includes('react_stack_bottom_frame')) {\n break;\n }\n frames.push(frame);\n }\n stack = '\\n' + frames.join('\\n') + stack;\n }\n error.stack = error.name + ': ' + error.message + stack;\n }\n }\n return error;\n}\n\n//# sourceMappingURL=dynamic-rendering-utils.js.map","import { getRequestInsightKey, getRequestInsightKind } from '../../../shared/lib/request-insights';\nexport { isRequestInsightsEnabled } from './span-store';\nconst MAX_REQUEST_INSIGHTS = 100;\nconst REQUEST_INSIGHTS_STORE_KEY = Symbol.for('@next/request-insights-store');\nconst CLIENT_COMPONENT_LOADING_SPAN_TYPE = 'NextNodeServer.clientComponentLoading';\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 = /(?:^|[_-])(?:access[_-]?token|api[_-]?key|auth|authorization|code|cookie|credential|id[_-]?token|jwt|key|password|secret|session|signature|sig|token)(?:$|[_-])/i;\nclass InMemoryRequestInsightsStore {\n recordSpan(span) {\n var _span_attributes;\n if (!span.requestId) {\n return;\n }\n const insight = this.getOrCreateRequest({\n requestId: span.requestId,\n kind: span.requestInsightKind,\n htmlRequestId: span.htmlRequestId,\n route: span.route,\n url: span.url\n }, span.startTime ?? span.timestamp);\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(insight, spanStartTime, span.durationMs, ((_span_attributes = span.attributes) == null ? void 0 : _span_attributes['next.span_type']) === 'BaseServer.handleRequest');\n insight.status = insight.status === 'error' || span.status === 'error' ? 'error' : span.status === 'ok' ? 'ok' : insight.status;\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 const fetch = getFetchInsight(span);\n if (fetch) {\n this.recordFetchForInsight(insight, fetch);\n }\n this.notify(insight);\n }\n recordFetch(identity, fetch) {\n if (!identity.requestId) {\n return;\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 getSnapshot() {\n return {\n requests: this.requestOrder.map((insightKey)=>this.requests.get(insightKey)).filter((request)=>request !== undefined)\n };\n }\n subscribe(listener) {\n this.listeners.add(listener);\n return ()=>{\n this.listeners.delete(listener);\n };\n }\n clear() {\n this.requests.clear();\n this.requestTimings.clear();\n this.requestOrder.length = 0;\n }\n updateTiming(insight, startTime, durationMs, isRequestSpan) {\n const insightKey = getRequestInsightKey(insight);\n if (isRequestSpan && durationMs !== undefined) {\n const requestTiming = {\n startTime,\n durationMs\n };\n this.requestTimings.set(insightKey, requestTiming);\n insight.startTime = requestTiming.startTime;\n insight.durationMs = requestTiming.durationMs;\n return;\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 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 notify(insight) {\n for (const listener of this.listeners){\n listener(insight);\n }\n }\n getOrCreateRequest(identity, startTime) {\n const requestId = identity.requestId;\n const insightKey = getRequestInsightKey({\n requestId,\n kind: identity.kind\n });\n let insight = this.requests.get(insightKey);\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 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 return insight;\n }\n recordFetchForInsight(insight, fetch) {\n if (insight.fetches.some((existingFetch)=>existingFetch.url === fetch.url && (existingFetch.index !== undefined && fetch.index !== undefined ? existingFetch.index === fetch.index : existingFetch.startTime === fetch.startTime))) {\n return;\n }\n insight.fetches.push(sanitizeFetchInsight(fetch));\n }\n trim() {\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 constructor(){\n this.requests = new Map();\n this.requestTimings = new Map();\n this.requestOrder = [];\n this.listeners = new Set();\n }\n}\nexport function recordRequestInsightSpan(span) {\n var _span_attributes;\n if (((_span_attributes = span.attributes) == null ? void 0 : _span_attributes['next.span_type']) === CLIENT_COMPONENT_LOADING_SPAN_TYPE) {\n return;\n }\n getRequestInsightsStore().recordSpan(span);\n}\nexport function recordRequestInsightFetch(identity, fetch) {\n getRequestInsightsStore().recordFetch(identity, fetch);\n}\nexport function getRequestInsightsSnapshot() {\n return getRequestInsightsStore().getSnapshot();\n}\nexport function subscribeRequestInsights(listener) {\n return getRequestInsightsStore().subscribe(listener);\n}\nexport function clearRequestInsightsForTest() {\n getRequestInsightsStore().clear();\n}\nfunction getRequestInsightsStore() {\n const globalStore = globalThis;\n return globalStore[REQUEST_INSIGHTS_STORE_KEY] ??= new InMemoryRequestInsightsStore();\n}\nfunction getFetchInsight(span) {\n const attributes = span.attributes;\n if (!attributes || attributes['next.span_type'] !== 'AppRender.fetch') {\n return null;\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}\nfunction sanitizeFetchInsight(fetch) {\n return {\n ...fetch,\n url: sanitizeUrl(fetch.url)\n };\n}\nfunction getCurrentTimestamp() {\n return performance.timeOrigin + performance.now();\n}\nfunction sanitizeSpanAttributes(attributes) {\n if (!attributes) {\n return undefined;\n }\n const sanitized = {};\n for (const [key, value] of Object.entries(attributes)){\n if (!SAFE_SPAN_ATTRIBUTE_KEYS.has(key)) {\n continue;\n }\n sanitized[key] = key === 'http.url' ? sanitizeUrlAttribute(value) : value;\n }\n return Object.keys(sanitized).length > 0 ? sanitized : undefined;\n}\nfunction sanitizeSpanEvents(events) {\n return events == null ? void 0 : events.map((event)=>({\n ...event,\n attributes: sanitizeSpanAttributes(event.attributes)\n }));\n}\nfunction sanitizeSpanLinks(links) {\n return links == null ? void 0 : links.map((link)=>({\n ...link,\n attributes: sanitizeSpanAttributes(link.attributes)\n }));\n}\nfunction sanitizeUrlAttribute(value) {\n return typeof value === 'string' ? sanitizeUrl(value) ?? '' : value;\n}\nfunction sanitizeUrl(value) {\n if (!value) {\n return value;\n }\n const isRelativeUrl = value.startsWith('/');\n try {\n const url = isRelativeUrl ? new URL(value, 'http://n') : new URL(value);\n url.username = '';\n url.password = '';\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 return isRelativeUrl ? `${url.pathname}${url.search}${url.hash}` : url.href;\n } catch {\n return value;\n }\n}\nfunction getStringAttribute(value) {\n return typeof value === 'string' ? value : undefined;\n}\nfunction getNumberAttribute(value) {\n return typeof value === 'number' ? value : undefined;\n}\n\n//# sourceMappingURL=request-insights.js.map","// TODO: isWellKnownError -> isNextInternalError\n// isReactLargeShellError -> isWarning\nexport function isReactLargeShellError(error) {\n return typeof error === 'object' && error !== null && 'message' in error && typeof error.message === 'string' && error.message.startsWith('This rendered a large document (>');\n}\n\n//# sourceMappingURL=react-large-shell-error.js.map","import { getDigestForWellKnownError } from './create-error-handler';\nimport { isReactLargeShellError } from './react-large-shell-error';\nexport var Phase = /*#__PURE__*/ function(Phase) {\n Phase[\"ProspectiveRender\"] = \"the prospective render\";\n Phase[\"SegmentCollection\"] = \"segment collection\";\n Phase[\"InstantValidation\"] = \"instant validation\";\n return Phase;\n}({});\nexport function printDebugThrownValueForProspectiveRender(thrownValue, route, phase) {\n // We don't need to print well-known Next.js errors.\n if (getDigestForWellKnownError(thrownValue)) {\n return;\n }\n if (isReactLargeShellError(thrownValue)) {\n // TODO: Aggregate\n console.error(thrownValue);\n return undefined;\n }\n let message;\n if (typeof thrownValue === 'object' && thrownValue !== null && typeof thrownValue.message === 'string') {\n message = thrownValue.message;\n if (typeof thrownValue.stack === 'string') {\n const originalErrorStack = thrownValue.stack;\n const stackStart = originalErrorStack.indexOf('\\n');\n if (stackStart > -1) {\n const error = Object.defineProperty(new 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.\n \nOriginal Error: ${message}`), \"__NEXT_ERROR_CODE\", {\n value: \"E949\",\n enumerable: false,\n configurable: true\n });\n error.stack = '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 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 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. The thrown value is logged just following this message`);\n console.error(thrownValue);\n return;\n}\n\n//# sourceMappingURL=prospective-render-utils.js.map","import { resolveArray, resolveAsArrayOrUndefined } from '../generate/utils';\nimport { getSocialImageMetadataBaseFallback, isStringOrURL, resolveUrl, resolveAbsoluteUrlWithPathname } from './resolve-url';\nimport { resolveTitle } from './resolve-title';\nimport { isFullStringUrl } from '../../url';\nimport { warnOnce } from '../../../build/output/log';\nconst OgTypeFields = {\n article: [\n 'authors',\n 'tags'\n ],\n song: [\n 'albums',\n 'musicians'\n ],\n playlist: [\n 'albums',\n 'musicians'\n ],\n radio: [\n 'creators'\n ],\n video: [\n 'actors',\n 'directors',\n 'writers',\n 'tags'\n ],\n basic: [\n 'emails',\n 'phoneNumbers',\n 'faxNumbers',\n 'alternateLocale',\n 'audio',\n 'videos'\n ]\n};\nfunction resolveAndValidateImage(item, metadataBase, isStaticMetadataRouteFile) {\n if (!item) return undefined;\n const isItemUrl = isStringOrURL(item);\n const inputUrl = isItemUrl ? item : item.url;\n if (!inputUrl) return undefined;\n // process.env.VERCEL is set to \"1\" when System Environment Variables are\n // exposed. When exposed, validation is not necessary since we are falling back to\n // process.env.VERCEL_PROJECT_PRODUCTION_URL, process.env.VERCEL_BRANCH_URL, or\n // process.env.VERCEL_URL for the `metadataBase`. process.env.VERCEL is undefined\n // when System Environment Variables are not exposed. When not exposed, we cannot\n // detect in the build environment if the deployment is a Vercel deployment or not.\n //\n // x-ref: https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables\n const isUsingVercelSystemEnvironmentVariables = Boolean(process.env.VERCEL);\n const isRelativeUrl = typeof inputUrl === 'string' && !isFullStringUrl(inputUrl);\n // When no explicit metadataBase is specified by the user, we'll override it with the fallback metadata\n // under the following conditions:\n // - The provided URL is relative (ie ./og-image).\n // - The image is statically generated by Next.js (such as the special `opengraph-image` route)\n // In both cases, we want to ensure that across all environments, the ogImage is a fully qualified URL.\n // In the `opengraph-image` case, since the user isn't explicitly passing a relative path, this ensures\n // the ogImage will be properly discovered across different environments without the user needing to\n // have a bunch of `process.env` checks when defining their `metadataBase`.\n if (isRelativeUrl && (!metadataBase || isStaticMetadataRouteFile)) {\n const fallbackMetadataBase = getSocialImageMetadataBaseFallback(metadataBase);\n // When not using Vercel environment variables for URL injection, we aren't able to determine\n // a fallback value for `metadataBase`. For self-hosted setups, we want to warn\n // about this since the only fallback we'll be able to generate is `localhost`.\n // In development, we'll only warn for relative metadata that isn't part of the static\n // metadata conventions (eg `opengraph-image`), as otherwise it's currently very noisy\n // for common cases. Eventually we should remove this warning all together in favor of\n // devtools.\n const shouldWarn = !isUsingVercelSystemEnvironmentVariables && !metadataBase && (process.env.NODE_ENV === 'production' || !isStaticMetadataRouteFile);\n if (shouldWarn) {\n warnOnce(`metadataBase property in metadata export is not set for resolving social open graph or twitter images, using \"${fallbackMetadataBase.origin}\". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase`);\n }\n metadataBase = fallbackMetadataBase;\n }\n return isItemUrl ? {\n url: resolveUrl(inputUrl, metadataBase)\n } : {\n ...item,\n // Update image descriptor url\n url: resolveUrl(inputUrl, metadataBase)\n };\n}\nexport function resolveImages(images, metadataBase, isStaticMetadataRouteFile) {\n const resolvedImages = resolveAsArrayOrUndefined(images);\n if (!resolvedImages) return resolvedImages;\n const nonNullableImages = [];\n for (const item of resolvedImages){\n const resolvedItem = resolveAndValidateImage(item, metadataBase, isStaticMetadataRouteFile);\n if (!resolvedItem) continue;\n nonNullableImages.push(resolvedItem);\n }\n return nonNullableImages;\n}\nconst ogTypeToFields = {\n article: OgTypeFields.article,\n book: OgTypeFields.article,\n 'music.song': OgTypeFields.song,\n 'music.album': OgTypeFields.song,\n 'music.playlist': OgTypeFields.playlist,\n 'music.radio_station': OgTypeFields.radio,\n 'video.movie': OgTypeFields.video,\n 'video.episode': OgTypeFields.video\n};\nfunction getFieldsByOgType(ogType) {\n if (!ogType || !(ogType in ogTypeToFields)) return OgTypeFields.basic;\n return ogTypeToFields[ogType].concat(OgTypeFields.basic);\n}\nexport const resolveOpenGraph = async (openGraph, metadataBase, pathname, metadataContext, titleTemplate)=>{\n if (!openGraph) return null;\n function resolveProps(target, og) {\n const ogType = og && 'type' in og ? og.type : undefined;\n const keys = getFieldsByOgType(ogType);\n for (const k of keys){\n const key = k;\n if (key in og && key !== 'url') {\n const value = og[key];\n target[key] = value ? resolveArray(value) : null;\n }\n }\n target.images = resolveImages(og.images, metadataBase, metadataContext.isStaticMetadataRouteFile);\n }\n const resolved = {\n ...openGraph,\n title: resolveTitle(openGraph.title, titleTemplate)\n };\n resolveProps(resolved, openGraph);\n resolved.url = openGraph.url ? resolveAbsoluteUrlWithPathname(openGraph.url, metadataBase, await pathname, metadataContext) : null;\n return resolved;\n};\nconst TwitterBasicInfoKeys = [\n 'site',\n 'siteId',\n 'creator',\n 'creatorId',\n 'description'\n];\nexport const resolveTwitter = (twitter, metadataBase, metadataContext, titleTemplate)=>{\n var _resolved_images;\n if (!twitter) return null;\n let card = 'card' in twitter ? twitter.card : undefined;\n const resolved = {\n ...twitter,\n title: resolveTitle(twitter.title, titleTemplate)\n };\n for (const infoKey of TwitterBasicInfoKeys){\n resolved[infoKey] = twitter[infoKey] || null;\n }\n resolved.images = resolveImages(twitter.images, metadataBase, metadataContext.isStaticMetadataRouteFile);\n card = card || (((_resolved_images = resolved.images) == null ? void 0 : _resolved_images.length) ? 'summary_large_image' : 'summary');\n resolved.card = card;\n if ('card' in resolved) {\n switch(resolved.card){\n case 'player':\n {\n resolved.players = resolveAsArrayOrUndefined(resolved.players) || [];\n break;\n }\n case 'app':\n {\n resolved.app = resolved.app || {};\n break;\n }\n case 'summary':\n case 'summary_large_image':\n break;\n default:\n resolved;\n }\n }\n return resolved;\n};\n\n//# sourceMappingURL=resolve-opengraph.js.map","import { getDynamicParam } from '../../shared/lib/router/utils/get-dynamic-param';\nimport { createPrerenderResumeDataCache, createRenderResumeDataCache } from '../resume-data-cache/resume-data-cache';\nimport { stringifyResumeDataCache } from '../resume-data-cache/resume-data-cache';\nexport var DynamicState = /*#__PURE__*/ function(DynamicState) {\n /**\n * The dynamic access occurred during the RSC render phase.\n */ DynamicState[DynamicState[\"DATA\"] = 1] = \"DATA\";\n /**\n * The dynamic access occurred during the HTML shell render phase.\n */ DynamicState[DynamicState[\"HTML\"] = 2] = \"HTML\";\n return DynamicState;\n}({});\nexport var DynamicHTMLPreludeState = /*#__PURE__*/ function(DynamicHTMLPreludeState) {\n DynamicHTMLPreludeState[DynamicHTMLPreludeState[\"Empty\"] = 0] = \"Empty\";\n DynamicHTMLPreludeState[DynamicHTMLPreludeState[\"Full\"] = 1] = \"Full\";\n return DynamicHTMLPreludeState;\n}({});\nexport async function getDynamicHTMLPostponedState(postponed, preludeState, fallbackRouteParams, resumeDataCache, isCacheComponentsEnabled) {\n const data = [\n preludeState,\n postponed\n ];\n const dataString = JSON.stringify(data);\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(createRenderResumeDataCache(resumeDataCache), isCacheComponentsEnabled)}`;\n }\n const replacements = Array.from(fallbackRouteParams.entries());\n const replacementsString = JSON.stringify(replacements);\n // Serialized as `<replacements.length><replacements><data>`\n const postponedString = `${replacementsString.length}${replacementsString}${dataString}`;\n // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n return `${postponedString.length}:${postponedString}${await stringifyResumeDataCache(resumeDataCache, isCacheComponentsEnabled)}`;\n}\nexport async function getDynamicDataPostponedState(resumeDataCache, isCacheComponentsEnabled) {\n return `4:null${await stringifyResumeDataCache(createRenderResumeDataCache(resumeDataCache), isCacheComponentsEnabled)}`;\n}\nexport function parsePostponedState(state, interpolatedParams, maxPostponedStateSizeBytes) {\n try {\n var _state_match;\n const postponedStringLengthMatch = (_state_match = state.match(/^([0-9]*):/)) == null ? void 0 : _state_match[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 Object.defineProperty(new Error('Invariant: invalid postponed state: missing length prefix'), \"__NEXT_ERROR_CODE\", {\n value: \"E1388\",\n enumerable: false,\n configurable: true\n });\n }\n const postponedStringLength = parseInt(postponedStringLengthMatch);\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(postponedStringLengthMatch.length + 1, postponedStringLengthMatch.length + postponedStringLength + 1);\n const renderResumeDataCache = createRenderResumeDataCache(state.slice(postponedStringLengthMatch.length + postponedStringLength + 1), maxPostponedStateSizeBytes);\n try {\n if (postponedString === 'null') {\n return {\n type: 1,\n renderResumeDataCache\n };\n }\n if (/^[0-9]/.test(postponedString)) {\n var _postponedString_match;\n const match = (_postponedString_match = postponedString.match(/^([0-9]*)/)) == null ? void 0 : _postponedString_match[1];\n if (!match) {\n throw Object.defineProperty(new Error(`Invariant: invalid postponed state ${JSON.stringify(postponedString)}`), \"__NEXT_ERROR_CODE\", {\n value: \"E314\",\n enumerable: false,\n configurable: true\n });\n }\n // This is the length of the replacements entries.\n const length = parseInt(match);\n const replacements = JSON.parse(postponedString.slice(match.length, // We then go to the end of the string.\n match.length + length));\n let postponed = postponedString.slice(match.length + length);\n for (const [segmentKey, [searchValue, dynamicParamType]] of replacements){\n const { treeSegment: [, // 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] } = getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, null, null // staticSiblings not needed for postponed state\n );\n postponed = postponed.replaceAll(searchValue, value);\n }\n return {\n type: 2,\n data: JSON.parse(postponed),\n renderResumeDataCache\n };\n }\n return {\n type: 2,\n data: JSON.parse(postponedString),\n renderResumeDataCache\n };\n } catch (err) {\n console.error('Failed to parse postponed state', describePostponedStateParseFailure(state, err));\n return {\n type: 1,\n renderResumeDataCache\n };\n }\n } catch (err) {\n console.error('Failed to parse postponed state', describePostponedStateParseFailure(state, err));\n return {\n type: 1,\n renderResumeDataCache: createRenderResumeDataCache(createPrerenderResumeDataCache())\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 */ function describePostponedStateParseFailure(state, error) {\n const errnoError = error;\n const diagnostics = {\n stateLength: state.length,\n errorName: error instanceof Error ? error.name : typeof error,\n errorCode: errnoError == null ? void 0 : errnoError.code\n };\n const prefixMatch = state.match(/^([0-9]+):/);\n if (!prefixMatch) {\n diagnostics.hasLengthPrefix = false;\n return diagnostics;\n }\n const declaredPostponedLength = parseInt(prefixMatch[1], 10);\n const tailStart = prefixMatch[0].length + declaredPostponedLength;\n const tail = state.slice(tailStart);\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 return diagnostics;\n}\nexport function getPostponedFromState(state) {\n const [preludeState, postponed] = state.data;\n return {\n preludeState,\n 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 */ export function isEmptyHTMLPrelude(state) {\n try {\n var _state_match;\n const lengthMatch = (_state_match = state.match(/^([0-9]*):/)) == null ? void 0 : _state_match[1];\n if (!lengthMatch) {\n return false;\n }\n const length = parseInt(lengthMatch);\n let postponedString = state.slice(lengthMatch.length + 1, lengthMatch.length + 1 + length);\n // `null` is the dynamic-data case (a full shell was produced).\n if (postponedString === 'null') {\n return false;\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 var _postponedString_match;\n const replacementsLengthMatch = (_postponedString_match = postponedString.match(/^([0-9]*)/)) == null ? void 0 : _postponedString_match[1];\n if (!replacementsLengthMatch) {\n return false;\n }\n const replacementsLength = parseInt(replacementsLengthMatch);\n postponedString = postponedString.slice(replacementsLengthMatch.length + replacementsLength);\n }\n const data = JSON.parse(postponedString);\n return Array.isArray(data) && data[0] === 0;\n } catch {\n return false;\n }\n}\n\n//# sourceMappingURL=postponed-state.js.map","import { resolveAsArrayOrUndefined } from '../generate/utils';\nimport { isStringOrURL } from './resolve-url';\nimport { IconKeys } from '../constants';\nexport function resolveIcon(icon) {\n if (isStringOrURL(icon)) return {\n url: icon\n };\n else if (Array.isArray(icon)) return icon;\n return icon;\n}\nexport const resolveIcons = (icons)=>{\n if (!icons) {\n return null;\n }\n const resolved = {\n icon: [],\n apple: []\n };\n if (Array.isArray(icons)) {\n resolved.icon = icons.map(resolveIcon).filter(Boolean);\n } else if (isStringOrURL(icons)) {\n resolved.icon = [\n resolveIcon(icons)\n ];\n } else {\n for (const key of IconKeys){\n const values = resolveAsArrayOrUndefined(icons[key]);\n if (values) resolved[key] = values.map(resolveIcon);\n }\n }\n return resolved;\n};\n\n//# sourceMappingURL=resolve-icons.js.map","import { AppRenderSpan, NextNodeServerSpan } from './trace/constants';\nimport { isRequestInsightsEnabled, recordRequestInsightFetch } from './trace/request-insights';\nimport { getRequestInsightsIdentity } from './trace/request-insights-identity';\nimport { getTracer, SpanKind } from './trace/tracer';\nimport { CACHE_ONE_YEAR_SECONDS, INFINITE_CACHE, NEXT_CACHE_TAG_MAX_ITEMS, NEXT_CACHE_TAG_MAX_LENGTH } from '../../lib/constants';\nimport { markCurrentScopeAsDynamic } from '../app-render/dynamic-rendering';\nimport { makeDynamicHangingPromise } from '../dynamic-rendering-utils';\nimport { createDedupeFetch } from './dedupe-fetch';\nimport { getCacheSignal } from '../app-render/work-unit-async-storage.external';\nimport { CachedRouteKind, IncrementalCacheKind } from '../response-cache';\nimport { cloneResponse } from './clone-response';\nimport { RenderStage } from '../app-render/staged-rendering';\nimport { encodeHeaderSafe } from './encode-header-safe';\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge';\nexport const NEXT_PATCH_SYMBOL = Symbol.for('next-patch');\nfunction isFetchPatched() {\n return globalThis[NEXT_PATCH_SYMBOL] === true;\n}\nexport function validateRevalidate(revalidateVal, route) {\n try {\n let normalizedRevalidate = undefined;\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 (typeof revalidateVal === 'number' && !isNaN(revalidateVal) && revalidateVal > -1) {\n normalizedRevalidate = revalidateVal;\n } else if (typeof revalidateVal !== 'undefined') {\n throw Object.defineProperty(new Error(`Invalid revalidate value \"${revalidateVal}\" on \"${route}\", must be a non-negative number or false`), \"__NEXT_ERROR_CODE\", {\n value: \"E179\",\n enumerable: false,\n configurable: true\n });\n }\n return normalizedRevalidate;\n } catch (err) {\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}\nexport function validateTags(tags, description) {\n const validTags = [];\n const invalidTags = [];\n for(let i = 0; i < tags.length; i++){\n const tag = tags[i];\n if (typeof tag !== 'string') {\n invalidTags.push({\n tag,\n reason: 'invalid type, must be a string'\n });\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 if (validTags.length > NEXT_CACHE_TAG_MAX_ITEMS) {\n console.warn(`Warning: exceeded max tag count for ${description}, dropped tags:`, tags.slice(i).join(', '));\n break;\n }\n }\n if (invalidTags.length > 0) {\n console.warn(`Warning: invalid tags passed to ${description}: `);\n for (const { tag, reason } of invalidTags){\n console.log(`tag: \"${tag}\" ${reason}`);\n }\n }\n return validTags;\n}\nfunction trackFetchMetric(workStore, span, ctx) {\n const metric = {\n ...ctx,\n end: performance.timeOrigin + performance.now(),\n idx: workStore.nextFetchId || 0\n };\n span == null ? void 0 : 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 if (isRequestInsightsEnabled()) {\n const requestInsightsIdentity = getRequestInsightsIdentity();\n const requestInsightsRequestId = (requestInsightsIdentity == null ? void 0 : requestInsightsIdentity.requestId) ?? workStore.requestId;\n if (requestInsightsRequestId) {\n recordRequestInsightFetch({\n requestId: requestInsightsRequestId,\n kind: requestInsightsIdentity == null ? void 0 : requestInsightsIdentity.kind,\n htmlRequestId: (requestInsightsIdentity == null ? void 0 : requestInsightsIdentity.htmlRequestId) ?? workStore.htmlRequestId,\n route: workStore.route\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 if (!workStore.shouldTrackFetchMetrics) {\n return;\n }\n workStore.fetchMetrics ??= [];\n workStore.fetchMetrics.push(metric);\n}\nasync function createCachedPrerenderResponse(res, cacheKey, incrementalCacheContext, incrementalCache, revalidate, handleUnlock) {\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 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 // We can skip setting the serverComponentsHmrCache because we aren't in dev\n // mode.\n if (incrementalCacheContext) {\n await incrementalCache.set(cacheKey, {\n kind: CachedRouteKind.FETCH,\n data: fetchedData,\n revalidate\n }, incrementalCacheContext);\n }\n await handleUnlock();\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}\nasync function createCachedDynamicResponse(workStore, res, cacheKey, incrementalCacheContext, incrementalCache, serverComponentsHmrCache, revalidate, input, handleUnlock, signal) {\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 // 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.arrayBuffer().then(async (arrayBuffer)=>{\n const bodyBuffer = Buffer.from(arrayBuffer);\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 serverComponentsHmrCache == null ? void 0 : serverComponentsHmrCache.set(cacheKey, fetchedData);\n if (incrementalCacheContext) {\n await incrementalCache.set(cacheKey, {\n kind: CachedRouteKind.FETCH,\n data: fetchedData,\n revalidate\n }, incrementalCacheContext);\n }\n }).catch((error)=>{\n // Don't warn if the request was aborted intentionally.\n if (!(signal == null ? void 0 : signal.aborted)) {\n console.warn(`Failed to set fetch cache`, input, error);\n }\n }).finally(handleUnlock);\n const pendingRevalidateKey = `cache-set-${cacheKey}`;\n const pendingRevalidates = workStore.pendingRevalidates ??= {};\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 pendingRevalidates[pendingRevalidateKey] = pendingRevalidatePromise.then(()=>cacheSetPromise).finally(()=>{\n // If the pending revalidate is not present in the store, then we have\n // nothing to delete.\n if (!(pendingRevalidates == null ? void 0 : pendingRevalidates[pendingRevalidateKey])) {\n return;\n }\n delete pendingRevalidates[pendingRevalidateKey];\n });\n return cloned2;\n}\nexport function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStorage }) {\n // Create the patched fetch function.\n const patched = async function fetch(input, init) {\n var _init_method, _init_next;\n let url;\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 == null ? void 0 : url.href) ?? '';\n const method = (init == null ? void 0 : (_init_method = init.method) == null ? void 0 : _init_method.toUpperCase()) || 'GET';\n // Do create a new span trace for internal fetches in the\n // non-verbose mode.\n const isInternal = (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.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 = isInternal ? undefined : performance.timeOrigin + performance.now();\n const workStore = workAsyncStorage.getStore();\n const workUnitStore = workUnitAsyncStorage.getStore();\n let cacheSignal = workUnitStore ? getCacheSignal(workUnitStore) : null;\n if (cacheSignal) {\n cacheSignal.beginRead();\n }\n const result = getTracer().trace(isInternal ? NextNodeServerSpan.internalFetch : AppRenderSpan.fetch, {\n hideSpan,\n kind: SpanKind.CLIENT,\n spanName: [\n 'fetch',\n method,\n fetchUrl\n ].filter(Boolean).join(' '),\n attributes: {\n 'http.url': fetchUrl,\n 'http.method': method,\n 'net.peer.name': url == null ? void 0 : url.hostname,\n 'net.peer.port': (url == null ? void 0 : url.port) || undefined\n }\n }, async (span)=>{\n var _getRequestMeta;\n // If this is an internal fetch, we should not do any special treatment.\n if (isInternal) {\n return originFetch(input, init);\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 // 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 const isRequestInput = input && typeof input === 'object' && typeof input.method === 'string';\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, overrides);\n init = next ? {\n next\n } : undefined;\n }\n const getRequestMeta = (field)=>{\n // If request input is present but init is not, retrieve from input first.\n const value = init == null ? void 0 : init[field];\n return value || (isRequestInput ? input[field] : null);\n };\n let finalRevalidate = undefined;\n const getNextField = (field)=>{\n var _init_next, _init_next1, _input_next;\n return typeof (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next[field]) !== 'undefined' ? init == null ? void 0 : (_init_next1 = init.next) == null ? void 0 : _init_next1[field] : isRequestInput ? (_input_next = input.next) == null ? void 0 : _input_next[field] : 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 = validateTags(getNextField('tags') || [], `fetch ${input.toString()}`);\n let revalidateStore;\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;\n }\n }\n if (revalidateStore) {\n if (Array.isArray(tags)) {\n // Collect tags onto parent caches or parent prerenders.\n const collectedTags = revalidateStore.tags ?? (revalidateStore.tags = []);\n for (const tag of tags){\n if (!collectedTags.includes(tag)) {\n collectedTags.push(tag);\n }\n }\n }\n }\n const implicitTags = workUnitStore == null ? void 0 : workUnitStore.implicitTags;\n let pageFetchCacheMode = workStore.fetchCache;\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;\n }\n }\n const isUsingNoStore = !!workStore.isUnstableNoStore;\n let currentFetchCacheConfig = getRequestMeta('cache');\n let cacheReason = '';\n let cacheWarning;\n if (typeof currentFetchCacheConfig === 'string' && typeof currentFetchRevalidate !== 'undefined') {\n // If the revalidate value conflicts with the cache value, we should warn the user and unset the conflicting values.\n const isConflictingRevalidate = // revalidate: 0 and cache: force-cache\n currentFetchCacheConfig === 'force-cache' && currentFetchRevalidate === 0 || // revalidate: >0 or revalidate: false and cache: no-store\n currentFetchCacheConfig === 'no-store' && (currentFetchRevalidate > 0 || currentFetchRevalidate === false);\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 const hasExplicitFetchCacheOptOut = // fetch config itself signals not to cache\n currentFetchCacheConfig === 'no-cache' || currentFetchCacheConfig === 'no-store' || // 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' || pageFetchCacheMode === 'only-no-store';\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 = !pageFetchCacheMode && !currentFetchCacheConfig && !currentFetchRevalidate && workStore.forceDynamic;\n if (// 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' && typeof currentFetchRevalidate === 'undefined') {\n currentFetchRevalidate = false;\n } else if (hasExplicitFetchCacheOptOut || noFetchConfigAndForceDynamic) {\n currentFetchRevalidate = 0;\n }\n if (currentFetchCacheConfig === 'no-cache' || currentFetchCacheConfig === 'no-store') {\n cacheReason = `cache: ${currentFetchCacheConfig}`;\n }\n finalRevalidate = validateRevalidate(currentFetchRevalidate, workStore.route);\n const _headers = getRequestMeta('headers');\n const initHeaders = typeof (_headers == null ? void 0 : _headers.get) === 'function' ? _headers : new Headers(_headers || {});\n const hasUnCacheableHeader = initHeaders.get('authorization') || initHeaders.get('cookie');\n const isUnCacheableMethod = ![\n 'get',\n 'head'\n ].includes(((_getRequestMeta = getRequestMeta('method')) == null ? void 0 : _getRequestMeta.toLowerCase()) || 'get');\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 */ const hasNoExplicitCacheConfig = // eslint-disable-next-line eqeqeq\n pageFetchCacheMode == undefined && // eslint-disable-next-line eqeqeq\n (currentFetchCacheConfig == undefined || // 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') && // eslint-disable-next-line eqeqeq\n currentFetchRevalidate == undefined;\n let autoNoCache = Boolean((hasUnCacheableHeader || isUnCacheableMethod) && (revalidateStore == null ? void 0 : revalidateStore.revalidate) === 0);\n let isImplicitBuildTimeCache = false;\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 // 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 return makeDynamicHangingPromise(workUnitStore.renderSignal, workStore.route, 'fetch()');\n case 'validation-client':\n break;\n case 'request':\n if (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering) {\n if (cacheSignal) {\n cacheSignal.endRead();\n cacheSignal = null;\n }\n await workUnitStore.stagedRendering.waitForStage(RenderStage.Dynamic);\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;\n }\n }\n switch(pageFetchCacheMode){\n case 'force-no-store':\n {\n cacheReason = 'fetchCache = force-no-store';\n break;\n }\n case 'only-no-store':\n {\n if (currentFetchCacheConfig === 'force-cache' || typeof finalRevalidate !== 'undefined' && finalRevalidate > 0) {\n throw Object.defineProperty(new Error(`cache: 'force-cache' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-no-store'`), \"__NEXT_ERROR_CODE\", {\n value: \"E448\",\n enumerable: false,\n configurable: true\n });\n }\n cacheReason = 'fetchCache = only-no-store';\n break;\n }\n case 'only-cache':\n {\n if (currentFetchCacheConfig === 'no-store') {\n throw Object.defineProperty(new Error(`cache: 'no-store' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-cache'`), \"__NEXT_ERROR_CODE\", {\n value: \"E521\",\n enumerable: false,\n configurable: true\n });\n }\n break;\n }\n case 'force-cache':\n {\n if (typeof currentFetchRevalidate === 'undefined' || currentFetchRevalidate === 0) {\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 break;\n default:\n pageFetchCacheMode;\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 ? revalidateStore.revalidate : INFINITE_CACHE;\n }\n } else if (!cacheReason) {\n cacheReason = `revalidate: ${finalRevalidate}`;\n }\n if (// when force static is configured we don't bail from\n // `revalidate: 0` values\n !(workStore.forceStatic && finalRevalidate === 0) && // we don't consider autoNoCache to switch to dynamic for ISR\n !autoNoCache && // 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 && finalRevalidate < revalidateStore.revalidate) {\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(workUnitStore.renderSignal, workStore.route, 'fetch()');\n case 'request':\n if (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering) {\n if (cacheSignal) {\n cacheSignal.endRead();\n cacheSignal = null;\n }\n await workUnitStore.stagedRendering.waitForStage(RenderStage.Dynamic);\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;\n }\n }\n markCurrentScopeAsDynamic(workStore, workUnitStore, `revalidate: 0 fetch ${input} ${workStore.route}`);\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 const isCacheableRevalidate = typeof finalRevalidate === 'number' && finalRevalidate > 0;\n let cacheKey;\n const { incrementalCache } = workStore;\n let isHmrRefresh = false;\n let serverComponentsHmrCache;\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;\n }\n }\n if (incrementalCache && (isCacheableRevalidate || serverComponentsHmrCache)) {\n try {\n cacheKey = await incrementalCache.generateCacheKey(fetchUrl, isRequestInput ? input : init);\n } catch (cause) {\n console.error(`Failed to generate cache key for`, input, cause);\n }\n }\n const fetchIdx = workStore.nextFetchId ?? 1;\n workStore.nextFetchId = fetchIdx + 1;\n let handleUnlock = ()=>{};\n const doOriginalFetch = async (isStale, cacheReasonOverride)=>{\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 // don't pass through signal when revalidating\n ...isStale ? [] : [\n 'signal'\n ]\n ];\n if (isRequestInput) {\n const reqInput = input;\n const reqOptions = {\n body: reqInput._ogBody || reqInput.body\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 } = init;\n init = {\n ...otherInput,\n body: _ogBody || body,\n signal: isStale ? undefined : signal\n };\n }\n // add metadata to init without editing the original\n const clonedInit = {\n ...init,\n next: {\n ...init == null ? void 0 : init.next,\n fetchType: 'origin',\n fetchIdx\n }\n };\n return originFetch(input, clonedInit).then(async (res)=>{\n if (!isStale && fetchStart) {\n trackFetchMetric(workStore, span, {\n start: fetchStart,\n url: fetchUrl,\n cacheReason: cacheReasonOverride || cacheReason,\n cacheStatus: finalRevalidate === 0 || cacheReasonOverride ? 'skip' : 'miss',\n cacheWarning,\n status: res.status,\n method: clonedInit.method || 'GET'\n });\n }\n if (res.status === 200 && incrementalCache && cacheKey && (isCacheableRevalidate || serverComponentsHmrCache)) {\n const normalizedRevalidate = finalRevalidate >= INFINITE_CACHE ? CACHE_ONE_YEAR_SECONDS : finalRevalidate;\n const incrementalCacheConfig = isCacheableRevalidate ? {\n fetchCache: true,\n fetchUrl,\n fetchIdx,\n tags,\n isImplicitBuildTimeCache\n } : undefined;\n switch(workUnitStore == null ? void 0 : workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'validation-client':\n case 'prerender-runtime':\n return createCachedPrerenderResponse(res, cacheKey, incrementalCacheConfig, incrementalCache, normalizedRevalidate, handleUnlock);\n case 'request':\n if (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering && workUnitStore.cacheSignal && isCacheableRevalidate) {\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(res, cacheKey, incrementalCacheConfig, incrementalCache, normalizedRevalidate, handleUnlock);\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(workStore, res, cacheKey, incrementalCacheConfig, incrementalCache, serverComponentsHmrCache, normalizedRevalidate, input, handleUnlock, getRequestMeta('signal'));\n default:\n workUnitStore;\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 return res;\n }).catch((error)=>{\n handleUnlock();\n throw error;\n });\n };\n let cacheReasonOverride;\n let isForegroundRevalidate = false;\n let isHmrRefreshCache = false;\n if (cacheKey && incrementalCache) {\n let cachedFetchData;\n if (isHmrRefresh && serverComponentsHmrCache) {\n cachedFetchData = serverComponentsHmrCache.get(cacheKey);\n isHmrRefreshCache = true;\n }\n if (isCacheableRevalidate && !cachedFetchData) {\n handleUnlock = await incrementalCache.lock(cacheKey);\n const entry = workStore.isOnDemandRevalidate ? null : await incrementalCache.get(cacheKey, {\n kind: IncrementalCacheKind.FETCH,\n revalidate: finalRevalidate,\n fetchUrl,\n fetchIdx,\n tags,\n softTags: implicitTags == null ? void 0 : implicitTags.tags\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 (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering) {\n await workUnitStore.stagedRendering.waitForStage(RenderStage.Dynamic);\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;\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 if ((entry == null ? void 0 : 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).then(async (response)=>({\n body: await response.arrayBuffer(),\n headers: response.headers,\n status: response.status,\n statusText: response.statusText\n })).finally(()=>{\n workStore.pendingRevalidates ??= {};\n delete workStore.pendingRevalidates[cacheKey || ''];\n });\n // Attach the empty catch here so we don't get a \"unhandled\n // promise rejection\" warning.\n pendingRevalidate.catch(console.error);\n workStore.pendingRevalidates[cacheKey] = pendingRevalidate;\n }\n }\n cachedFetchData = entry.value.data;\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 == null ? void 0 : init.method) || 'GET'\n });\n }\n const response = new Response(Buffer.from(cachedFetchData.body, 'base64'), {\n headers: cachedFetchData.headers,\n status: cachedFetchData.status\n });\n Object.defineProperty(response, 'url', {\n value: cachedFetchData.url\n });\n return response;\n }\n }\n if ((workStore.isStaticGeneration || process.env.NODE_ENV === 'development' && process.env.__NEXT_CACHE_COMPONENTS && workUnitStore && // eslint-disable-next-line no-restricted-syntax\n workUnitStore.type === 'request' && workUnitStore.stagedRendering) && init && typeof init === 'object') {\n const { cache } = init;\n // Delete `cache` property as Cloudflare Workers will throw an error\n if (isEdgeRuntime) delete init.cache;\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(workUnitStore.renderSignal, workStore.route, 'fetch()');\n case 'request':\n if (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering) {\n if (cacheSignal) {\n cacheSignal.endRead();\n cacheSignal = null;\n }\n await workUnitStore.stagedRendering.waitForStage(RenderStage.Dynamic);\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;\n }\n }\n markCurrentScopeAsDynamic(workStore, workUnitStore, `no-store fetch ${input} ${workStore.route}`);\n }\n const hasNextConfig = 'next' in init;\n const { next = {} } = init;\n if (typeof next.revalidate === 'number' && revalidateStore && next.revalidate < revalidateStore.revalidate) {\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(workUnitStore.renderSignal, workStore.route, 'fetch()');\n case 'request':\n if (process.env.NODE_ENV === 'development' && workUnitStore.stagedRendering) {\n await workUnitStore.stagedRendering.waitForStage(RenderStage.Dynamic);\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;\n }\n }\n markCurrentScopeAsDynamic(workStore, workUnitStore, `revalidate: 0 fetch ${input} ${workStore.route}`);\n }\n if (!workStore.forceStatic || next.revalidate !== 0) {\n revalidateStore.revalidate = next.revalidate;\n }\n }\n if (hasNextConfig) delete init.next;\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 = workStore.pendingRevalidates[pendingRevalidateKey];\n if (pendingRevalidate) {\n const revalidatedResult = await pendingRevalidate;\n return new Response(revalidatedResult.body, {\n headers: revalidatedResult.headers,\n status: revalidatedResult.status,\n statusText: revalidatedResult.statusText\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)// 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 pendingRevalidate = pendingResponse.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 }).finally(()=>{\n var _workStore_pendingRevalidates;\n // If the pending revalidate is not present in the store, then\n // we have nothing to delete.\n if (!((_workStore_pendingRevalidates = workStore.pendingRevalidates) == null ? void 0 : _workStore_pendingRevalidates[pendingRevalidateKey])) {\n return;\n }\n delete workStore.pendingRevalidates[pendingRevalidateKey];\n });\n // Attach the empty catch here so we don't get a \"unhandled promise\n // rejection\" warning\n pendingRevalidate.catch(()=>{});\n workStore.pendingRevalidates[pendingRevalidateKey] = pendingRevalidate;\n return pendingResponse.then((responses)=>responses[1]);\n } else {\n return doOriginalFetch(false, cacheReasonOverride);\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 // 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;\n patched.__nextGetStaticStore = ()=>workAsyncStorage;\n patched._nextOriginalFetch = originFetch;\n globalThis[NEXT_PATCH_SYMBOL] = true;\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', {\n value: 'fetch',\n writable: false\n });\n return patched;\n}\n// we patch fetch to collect cache information used for\n// determining if a page is static or not\nexport function patchFetch(options) {\n // If we've already patched fetch, we should not patch it again.\n if (isFetchPatched()) return;\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 // Set the global fetch to the patched fetch.\n globalThis.fetch = createPatchedFetcher(original, options);\n}\nlet currentTimeoutBoundary = 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\n//# sourceMappingURL=patch-fetch.js.map","/**\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 */ export function createLazyResult(fn) {\n let pendingResult;\n const result = {\n then (onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = Promise.resolve(fn());\n }\n pendingResult.then((value)=>{\n result.value = value;\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 return pendingResult.then(onfulfilled, onrejected);\n }\n };\n return result;\n}\nexport function isResolvedLazyResult(result) {\n return result.hasOwnProperty('value');\n}\n\n//# sourceMappingURL=lazy-result.js.map","/*\n\nFiles in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.\n\n*/ import * as React from 'react';\nfunction notImplemented() {\n throw Object.defineProperty(new Error('Taint can only be used with the taint flag.'), \"__NEXT_ERROR_CODE\", {\n value: \"E354\",\n enumerable: false,\n configurable: true\n });\n}\nexport const taintObjectReference = process.env.__NEXT_EXPERIMENTAL_REACT ? React.experimental_taintObjectReference : notImplemented;\nexport const taintUniqueValue = process.env.__NEXT_EXPERIMENTAL_REACT ? React.experimental_taintUniqueValue : notImplemented;\n\n//# sourceMappingURL=taint.js.map","/**\n * Based on https://github.com/facebook/react/blob/d4e78c42a94be027b4dc7ed2659a5fddfbf9bd4e/packages/react/src/ReactFetch.js\n */ import * as React from 'react';\nimport { cloneResponse } from './clone-response';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nconst simpleCacheKey = '[\"GET\",[],null,\"follow\",null,null,null,null]' // generateCacheKey(new Request('https://blank'));\n;\n// Headers that should not affect deduplication\n// traceparent and tracestate are used for distributed tracing and should not affect cache keys\nconst headersToExcludeInCacheKey = new Set([\n 'traceparent',\n 'tracestate'\n]);\nfunction generateCacheKey(request) {\n // We pick the fields that goes into the key used to dedupe requests.\n // We don't include the `cache` field, because we end up using whatever\n // caching resulted from the first request.\n // Notably we currently don't consider non-standard (or future) options.\n // This might not be safe. TODO: warn for non-standard extensions differing.\n // IF YOU CHANGE THIS UPDATE THE simpleCacheKey ABOVE.\n const filteredHeaders = Array.from(request.headers.entries()).filter(([key])=>!headersToExcludeInCacheKey.has(key.toLowerCase()));\n return JSON.stringify([\n request.method,\n filteredHeaders,\n request.mode,\n request.redirect,\n request.credentials,\n request.referrer,\n request.referrerPolicy,\n request.integrity\n ]);\n}\nexport function createDedupeFetch(originalFetch) {\n const getCacheEntries = React.cache(// eslint-disable-next-line @typescript-eslint/no-unused-vars -- url is the cache key\n (url)=>[]);\n return function dedupeFetch(resource, options) {\n if (options && options.signal) {\n // If we're passed a signal, then we assume that\n // someone else controls the lifetime of this object and opts out of\n // caching. It's effectively the opt-out mechanism.\n // Ideally we should be able to check this on the Request but\n // it always gets initialized with its own signal so we don't\n // know if it's supposed to override - unless we also override the\n // Request constructor.\n return originalFetch(resource, options);\n }\n // Normalize the Request\n let url;\n let cacheKey;\n if (typeof resource === 'string' && !options) {\n // Fast path.\n cacheKey = simpleCacheKey;\n url = resource;\n } else {\n // Normalize the request.\n // if resource is not a string or a URL (its an instance of Request)\n // then do not instantiate a new Request but instead\n // reuse the request as to not disturb the body in the event it's a ReadableStream.\n const request = typeof resource === 'string' || resource instanceof URL ? new Request(resource, options) : resource;\n if (request.method !== 'GET' && request.method !== 'HEAD' || request.keepalive) {\n // We currently don't dedupe requests that might have side-effects. Those\n // have to be explicitly cached. We assume that the request doesn't have a\n // body if it's GET or HEAD.\n // keepalive gets treated the same as if you passed a custom cache signal.\n return originalFetch(resource, options);\n }\n cacheKey = generateCacheKey(request);\n url = request.url;\n }\n const cacheEntries = getCacheEntries(url);\n for(let i = 0, j = cacheEntries.length; i < j; i += 1){\n const [key, promise] = cacheEntries[i];\n if (key === cacheKey) {\n return promise.then(()=>{\n const response = cacheEntries[i][2];\n if (!response) throw Object.defineProperty(new InvariantError('No cached response'), \"__NEXT_ERROR_CODE\", {\n value: \"E579\",\n enumerable: false,\n configurable: true\n });\n // We're cloning the response using this utility because there exists\n // a bug in the undici library around response cloning. See the\n // following pull request for more details:\n // https://github.com/vercel/next.js/pull/73274\n const [cloned1, cloned2] = cloneResponse(response);\n cacheEntries[i][2] = cloned2;\n return cloned1;\n });\n }\n }\n // We pass the original arguments here in case normalizing the Request\n // doesn't include all the options in this environment.\n const promise = originalFetch(resource, options);\n const entry = [\n cacheKey,\n promise,\n null\n ];\n cacheEntries.push(entry);\n return promise.then((response)=>{\n // We're cloning the response using this utility because there exists\n // a bug in the undici library around response cloning. See the\n // following pull request for more details:\n // https://github.com/vercel/next.js/pull/73274\n const [cloned1, cloned2] = cloneResponse(response);\n entry[2] = cloned2;\n return cloned1;\n });\n };\n}\n\n//# sourceMappingURL=dedupe-fetch.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { postponeWithTracking } from '../app-render/dynamic-rendering';\nimport { throwInvariantForMissingStore, workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external';\nimport { makeDynamicHangingPromise, makeFallbackParamsHangingPromise, RENDER_STAGES_BY_DATA_KIND } from '../dynamic-rendering-utils';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nexport function createServerPathnameForMetadata(underlyingPathname) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n {\n return createPrerenderPathname(underlyingPathname, workStore, workUnitStore);\n }\n case 'prerender-client':\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createServerPathnameForMetadata should not be called in client contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1065\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createServerPathnameForMetadata should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E740\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createServerPathnameForMetadata should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1129\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n {\n // TODO(app-shells): whether or not this is included in the shell\n // should depend on whether this route has params.\n // if there's no params, it can be included.\n // for now, we defensively exclude it to match the earlier pessimistic\n // behavior of always resolving in the runtime stage\n // (i.e. assuming that we have non-static params in the pathname)\n const { stagedRendering } = workUnitStore;\n if (stagedRendering) {\n const pathnameStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData;\n return stagedRendering.delayUntilStage(pathnameStage, undefined, underlyingPathname);\n } else {\n if (workUnitStore.isSessionShell) {\n return makeDynamicHangingPromise(workUnitStore.renderSignal, workStore.route, '`pathname`');\n } else {\n return createRenderPathname(underlyingPathname);\n }\n }\n }\n case 'request':\n // TODO(app-shells): this should be delayed if there's non-static params\n return createRenderPathname(underlyingPathname);\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nfunction createPrerenderPathname(underlyingPathname, workStore, prerenderStore) {\n switch(prerenderStore.type){\n case 'prerender':\n {\n const fallbackParams = prerenderStore.fallbackRouteParams;\n if (fallbackParams && fallbackParams.size > 0) {\n // The pathname only hangs when there are fallback params, and a\n // concrete (ISR-upgraded) prerender resolves it — so this access is\n // fallback-param data for the static-prefetch hint.\n return makeFallbackParamsHangingPromise(prerenderStore.renderSignal, workStore.route, '`pathname`', prerenderStore);\n }\n break;\n }\n case 'prerender-ppr':\n {\n const fallbackParams = prerenderStore.fallbackRouteParams;\n if (fallbackParams && fallbackParams.size > 0) {\n return makeErroringPathname(workStore, prerenderStore.dynamicTracking);\n }\n break;\n }\n case 'prerender-legacy':\n break;\n default:\n prerenderStore;\n }\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingPathname);\n}\nfunction makeErroringPathname(workStore, dynamicTracking) {\n let reject = null;\n const promise = new Promise((_, re)=>{\n reject = re;\n });\n const originalThen = promise.then.bind(promise);\n // We instrument .then so that we can generate a tracking event only if you actually\n // await this promise, not just that it is created.\n promise.then = (onfulfilled, onrejected)=>{\n if (reject) {\n try {\n postponeWithTracking(workStore.route, 'metadata relative url resolving', dynamicTracking);\n } catch (error) {\n reject(error);\n reject = null;\n }\n }\n return originalThen(onfulfilled, onrejected);\n };\n // We wrap in a noop proxy to trick the runtime into thinking it\n // isn't a native promise (it's not really). This is so that awaiting\n // the promise will call the `then` property triggering the lazy postpone\n return new Proxy(promise, {});\n}\nfunction createRenderPathname(underlyingPathname) {\n return Promise.resolve(underlyingPathname);\n}\n\n//# sourceMappingURL=pathname.js.map","/**\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 */ export var PrefetchHint = /*#__PURE__*/ function(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 // 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 PrefetchHint[PrefetchHint[\"SubtreeHasPartialPrefetching\"] = 2] = \"SubtreeHasPartialPrefetching\";\n // This segment itself has a loading.tsx boundary.\n PrefetchHint[PrefetchHint[\"SegmentHasLoadingBoundary\"] = 4] = \"SegmentHasLoadingBoundary\";\n // A descendant segment (but not this one) has a loading.tsx boundary.\n // Propagates upward so the root reflects the entire subtree.\n PrefetchHint[PrefetchHint[\"SubtreeHasLoadingBoundary\"] = 8] = \"SubtreeHasLoadingBoundary\";\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 PrefetchHint[PrefetchHint[\"IsRootLayoutOrAbove\"] = 16] = \"IsRootLayoutOrAbove\";\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 PrefetchHint[PrefetchHint[\"ParentInlinedIntoSelf\"] = 32] = \"ParentInlinedIntoSelf\";\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 PrefetchHint[PrefetchHint[\"InlinedIntoChild\"] = 64] = \"InlinedIntoChild\";\n // On a __PAGE__: this page's response includes the head (metadata/viewport)\n // at the end of its SegmentPrefetch[] array.\n PrefetchHint[PrefetchHint[\"HeadInlinedIntoSelf\"] = 128] = \"HeadInlinedIntoSelf\";\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 PrefetchHint[PrefetchHint[\"HeadOutlined\"] = 256] = \"HeadOutlined\";\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 PrefetchHint[PrefetchHint[\"InliningHintsStale\"] = 512] = \"InliningHintsStale\";\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 PrefetchHint[PrefetchHint[\"PrefetchDisabled\"] = 1024] = \"PrefetchDisabled\";\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 // 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 PrefetchHint[PrefetchHint[\"SubtreeHasEagerPrefetch\"] = 4096] = \"SubtreeHasEagerPrefetch\";\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 PrefetchHint[PrefetchHint[\"SubtreeHasInstantFalse\"] = 8192] = \"SubtreeHasInstantFalse\";\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 PrefetchHint[PrefetchHint[\"ShouldAttemptStaticPrefetch\"] = 16384] = \"ShouldAttemptStaticPrefetch\";\n return PrefetchHint;\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 */ export const StaticPrefetchDisabled = 1024;\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 */ export const SubtreePrefetchHints = 2 | 8 | 8192 | 4096;\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 */ export function propagateSubtreeBits(parentHints, childHints) {\n if (childHints & 2) {\n parentHints |= 2;\n }\n // A child with a loading boundary (directly, or anywhere in its subtree) makes\n // this a SubtreeHasLoadingBoundary on the parent.\n if (childHints & (4 | 8)) {\n parentHints |= 8;\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 & 4096) {\n parentHints |= 4096;\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 & 8192) {\n parentHints |= 8192;\n }\n return parentHints;\n}\n\n//# sourceMappingURL=app-router-types.js.map","import { arrayBufferToString, stringToUint8Array } from '../app-render/encryption-utils';\nimport { MIN_PRERENDERABLE_EXPIRE } from '../use-cache/constants';\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 */ export function parseUseCacheCacheStore(entries) {\n const store = new Map();\n for (const [key, { entry, hasExplicitRevalidate, hasExplicitExpire, readRootParamNames }] of entries){\n store.set(key, Promise.resolve({\n entry: {\n // Create a ReadableStream from the Uint8Array\n value: new ReadableStream({\n start (controller) {\n // Enqueue the Uint8Array to the stream\n controller.enqueue(stringToUint8Array(atob(entry.value)));\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 ? new Set(readRootParamNames) : 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 return store;\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 */ export async function serializeUseCacheCacheStore(entries, isCacheComponentsEnabled) {\n return Promise.all(Array.from(entries).map(([key, value])=>{\n return value.then(async ({ entry, hasExplicitRevalidate, hasExplicitExpire, readRootParamNames })=>{\n if (isCacheComponentsEnabled && (entry.revalidate === 0 || entry.expire < MIN_PRERENDERABLE_EXPIRE)) {\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 const [left, right] = entry.value.tee();\n entry.value = right;\n let binaryString = '';\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 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 ];\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//# sourceMappingURL=cache-store.js.map","import { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback';\nimport { isRedirectError } from './redirect-error';\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 */ export function isNextRouterError(error) {\n return isRedirectError(error) || isHTTPAccessFallbackError(error);\n}\n\n//# sourceMappingURL=is-next-router-error.js.map","import { InvariantError } from '../../shared/lib/invariant-error';\nimport { serializeUseCacheCacheStore, parseUseCacheCacheStore } from './cache-store';\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 */ export async function stringifyResumeDataCache(resumeDataCache, isCacheComponentsEnabled) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw Object.defineProperty(new InvariantError('`stringifyResumeDataCache` should not be called in edge runtime.'), \"__NEXT_ERROR_CODE\", {\n value: \"E602\",\n enumerable: false,\n configurable: true\n });\n } else {\n if (resumeDataCache.fetch.size === 0 && resumeDataCache.cache.size === 0) {\n return 'null';\n }\n const json = {\n store: {\n fetch: Object.fromEntries(Array.from(resumeDataCache.fetch.entries())),\n cache: Object.fromEntries((await serializeUseCacheCacheStore(resumeDataCache.cache.entries(), isCacheComponentsEnabled)).filter((entry)=>entry !== null)),\n encryptedBoundArgs: Object.fromEntries(Array.from(resumeDataCache.encryptedBoundArgs.entries()))\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');\n return deflateSync(JSON.stringify(json)).toString('base64');\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 */ export function createPrerenderResumeDataCache(source) {\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 ? new Set(source.dynamicCacheKeys) : 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}\nexport function createRenderResumeDataCache(resumeDataCacheOrPersistedCache, maxPostponedStateSizeBytes) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw Object.defineProperty(new InvariantError('`createRenderResumeDataCache` should not be called in edge runtime.'), \"__NEXT_ERROR_CODE\", {\n value: \"E556\",\n enumerable: false,\n configurable: true\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 {\n ...resumeDataCacheOrPersistedCache,\n 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 // 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');\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 ? maxPostponedStateSizeBytes * 5 : 500 * 1024 * 1024;\n let json;\n try {\n json = JSON.parse(inflateSync(Buffer.from(resumeDataCacheOrPersistedCache, 'base64'), {\n maxOutputLength: maxDecompressedSize\n }).toString('utf-8'));\n } catch (err) {\n if (err instanceof RangeError && err.code === 'ERR_BUFFER_TOO_LARGE') {\n throw Object.defineProperty(new Error(`Decompressed resume data cache exceeded ${maxDecompressedSize} byte limit`), \"__NEXT_ERROR_CODE\", {\n value: \"E976\",\n enumerable: false,\n configurable: true\n });\n }\n throw err;\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(Object.entries(json.store.encryptedBoundArgs)),\n decryptedBoundArgs: new Map(),\n imageResponses: new Map()\n };\n }\n}\n\n//# sourceMappingURL=resume-data-cache.js.map","import { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { createVaryingParams, getMetadataVaryParamsAccumulator } from '../app-render/vary-params';\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect';\nimport { throwToInterruptStaticGeneration, postponeWithTracking } from '../app-render/dynamic-rendering';\nimport { workUnitAsyncStorage, throwInvariantForMissingStore } from '../app-render/work-unit-async-storage.external';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { describeStringPropertyAccess, wellKnownProperties } from '../../shared/lib/utils/reflect-utils';\nimport { makeDevtoolsIOAwarePromise, makeFallbackParamsHangingPromise, makePromiseFromTrigger, trackFallbackParamsAccessed, RENDER_STAGES_BY_DATA_KIND } from '../dynamic-rendering-utils';\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger';\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external';\nimport { isEmptyParams, hasFallbackRouteParams, allParamsAreRootParams } from '../lib/params-utils';\nexport function createParamsFromClient(underlyingParams) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // Client params don't need additional vary tracking because by the\n // time they reach the client, the access would have already been\n // tracked by the server.\n const varyParamsAccumulator = null;\n return createStaticPrerenderParams(underlyingParams, null, workStore, workUnitStore, varyParamsAccumulator);\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createParamsFromClient should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E736\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n throw Object.defineProperty(new InvariantError('createParamsFromClient should not be called in a runtime prerender.'), \"__NEXT_ERROR_CODE\", {\n value: \"E770\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createParamsFromClient should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1122\",\n enumerable: false,\n configurable: true\n });\n case 'validation-client':\n {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(underlyingParams, workStore, workUnitStore.validationSamples);\n }\n return makeUntrackedParams(underlyingParams);\n }\n case 'request':\n {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(underlyingParams, workStore, workUnitStore.validationSamples);\n }\n if (process.env.NODE_ENV === 'development') {\n const fallbackParams = workUnitStore.fallbackParams;\n const userspaceParams = underlyingParams;\n return createRenderParamsInDev(underlyingParams, userspaceParams, fallbackParams, workStore, workUnitStore);\n } else {\n return createRenderParamsInProd(underlyingParams);\n }\n }\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nexport function createServerParamsForMetadata(underlyingParams, optionalCatchAllParamName) {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator();\n return createServerParamsForServerSegment(underlyingParams, optionalCatchAllParamName, metadataVaryParamsAccumulator);\n}\n// routes always runs in RSC context so it is equivalent to a Server Page Component\nexport function createServerParamsForRoute(underlyingParams, varyParamsAccumulator = null) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderParams(underlyingParams, null, workStore, workUnitStore, varyParamsAccumulator);\n case 'prerender-client':\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createServerParamsForRoute should not be called in client contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1064\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createServerParamsForRoute should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E738\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createServerParamsForRoute should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1131\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n {\n throw Object.defineProperty(new InvariantError('createServerParamsForRoute should not be called in runtime prerenders.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1367\",\n enumerable: false,\n configurable: true\n });\n }\n case 'request':\n if (process.env.NODE_ENV === 'development') {\n const fallbackParams = workUnitStore.fallbackParams;\n const userspaceParams = underlyingParams;\n return createRenderParamsInDev(underlyingParams, userspaceParams, fallbackParams, workStore, workUnitStore);\n } else {\n return createRenderParamsInProd(underlyingParams);\n }\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nexport function createServerParamsForServerSegment(underlyingParams, optionalCatchAllParamName, varyParamsAccumulator) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Expected workStore to be initialized'), \"__NEXT_ERROR_CODE\", {\n value: \"E1068\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderParams(underlyingParams, optionalCatchAllParamName, workStore, workUnitStore, varyParamsAccumulator);\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createServerParamsForServerSegment should not be called in client contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1101\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createServerParamsForServerSegment should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E743\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createServerParamsForServerSegment should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1120\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n return createRuntimePrerenderParams(underlyingParams, optionalCatchAllParamName, workStore, workUnitStore, varyParamsAccumulator);\n case 'request':\n {\n return createRenderParamsForPage(workStore, workUnitStore, underlyingParams, optionalCatchAllParamName, varyParamsAccumulator);\n }\n default:\n workUnitStore;\n }\n }\n throwInvariantForMissingStore();\n}\nexport function createPrerenderParamsForClientSegment(underlyingParams) {\n const workStore = workAsyncStorage.getStore();\n if (!workStore) {\n throw Object.defineProperty(new InvariantError('Missing workStore in createPrerenderParamsForClientSegment'), \"__NEXT_ERROR_CODE\", {\n value: \"E773\",\n enumerable: false,\n configurable: true\n });\n }\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-client':\n const fallbackParams = workUnitStore.fallbackRouteParams;\n if (fallbackParams) {\n for(let key in underlyingParams){\n if (fallbackParams.has(key)) {\n // This params object has one or more fallback params, so we need\n // to consider the awaiting of this params object \"dynamic\". Since\n // we are in cacheComponents mode we encode this as a promise that never\n // resolves.\n return makeFallbackParamsHangingPromise(workUnitStore.renderSignal, workStore.route, '`params`', workUnitStore);\n }\n }\n }\n break;\n case 'validation-client':\n throw Object.defineProperty(new InvariantError('createPrerenderParamsForClientSegment should not be called in validation contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1099\",\n enumerable: false,\n configurable: true\n });\n break;\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw Object.defineProperty(new InvariantError('createPrerenderParamsForClientSegment should not be called in cache contexts.'), \"__NEXT_ERROR_CODE\", {\n value: \"E734\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError('createPrerenderParamsForClientSegment should not be called inside generateStaticParams.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1126\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n break;\n default:\n workUnitStore;\n }\n }\n // We're prerendering in a mode that does not abort. We resolve the promise without\n // any tracking because we're just transporting a value from server to client where the tracking\n // will be applied.\n return Promise.resolve(underlyingParams);\n}\nfunction createStaticPrerenderParams(underlyingParams, optionalCatchAllParamName, workStore, prerenderStore, varyParamsAccumulator) {\n switch(prerenderStore.type){\n case 'prerender':\n {\n let userspaceParams = underlyingParams;\n if (varyParamsAccumulator !== null) {\n userspaceParams = createVaryingParams(varyParamsAccumulator, underlyingParams, optionalCatchAllParamName);\n }\n if (isEmptyParams(underlyingParams)) {\n // This route has no params.\n return makeUntrackedParams(userspaceParams);\n }\n const fallbackParams = prerenderStore.fallbackRouteParams;\n if (hasFallbackRouteParams(underlyingParams, fallbackParams)) {\n // This params object has one or more fallback params, so we need\n // to consider the awaiting of this params object dynamic.\n return makeHangingParams(underlyingParams, workStore, prerenderStore);\n }\n // All params are static.\n const { stagedRendering } = prerenderStore;\n if (stagedRendering) {\n // Even if all params are static, we need to exclude them from the app shell\n // by delaying them to the static stage. However, root params are allowed in shells,\n // so if all the params are root params, they can be included as well.\n if (!allParamsAreRootParams(underlyingParams, prerenderStore.rootParams)) {\n const staticParamsStage = RENDER_STAGES_BY_DATA_KIND.staticLinkData;\n return stagedRendering.delayUntilStage(staticParamsStage, 'params', userspaceParams);\n }\n }\n return makeUntrackedParams(userspaceParams);\n }\n case 'prerender-client':\n {\n const fallbackParams = prerenderStore.fallbackRouteParams;\n if (fallbackParams) {\n for(const key in underlyingParams){\n if (fallbackParams.has(key)) {\n // This params object has one or more fallback params, so we need\n // to consider the awaiting of this params object \"dynamic\". Since\n // we are in cacheComponents mode we encode this as a promise that never\n // resolves.\n return makeHangingParams(underlyingParams, workStore, prerenderStore);\n }\n }\n }\n break;\n }\n case 'prerender-ppr':\n {\n const fallbackParams = prerenderStore.fallbackRouteParams;\n if (fallbackParams) {\n for(const key in underlyingParams){\n if (fallbackParams.has(key)) {\n return makeErroringParams(underlyingParams, fallbackParams, workStore, prerenderStore);\n }\n }\n }\n break;\n }\n case 'prerender-legacy':\n break;\n default:\n prerenderStore;\n }\n let userspaceParams = underlyingParams;\n if (varyParamsAccumulator !== null) {\n userspaceParams = createVaryingParams(varyParamsAccumulator, underlyingParams, optionalCatchAllParamName);\n }\n return makeUntrackedParams(userspaceParams);\n}\nfunction createRuntimePrerenderParams(underlyingParams, optionalCatchAllParamName, workStore, workUnitStore, varyParamsAccumulator) {\n let userspaceParams = underlyingParams;\n if (varyParamsAccumulator !== null) {\n userspaceParams = createVaryingParams(varyParamsAccumulator, underlyingParams, optionalCatchAllParamName);\n }\n if (isEmptyParams(underlyingParams)) {\n // This route has no params.\n return makeUntrackedParams(userspaceParams);\n }\n const { stagedRendering } = workUnitStore;\n if (!stagedRendering) {\n // If there's no staging, we're in a prospective runtime prerender.\n if (workUnitStore.isSessionShell) {\n // If we're warming up for a session shell, params should be hanging,\n // because they'll be a hanging input in the final prerender.\n return makeHangingParams(underlyingParams, workStore, workUnitStore);\n } else {\n return makeUntrackedParams(userspaceParams);\n }\n }\n // We don't have fallbackParams in runtime prerenders, so we don't know\n // when params are static. However, root params are static by definition,\n // so we can at least check for that.\n // Note that resolving them without a delay is valid because root params are\n // allowed in shells.\n if (allParamsAreRootParams(underlyingParams, workUnitStore.rootParams)) {\n return makeUntrackedParams(userspaceParams);\n }\n // Semantically, we should resolve static params in the static stage.\n // But params are link data, and we need to recover a param-less session shell,\n // so we delay all params until the runtime stage instead.\n const staticParamsStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData;\n return stagedRendering.delayUntilStage(staticParamsStage, 'params', userspaceParams);\n}\nfunction createRenderParamsForPage(workStore, workUnitStore, underlyingParams, optionalCatchAllParamName, varyParamsAccumulator) {\n const { stagedRendering, asyncApiPromises, validationSamples } = workUnitStore;\n // Distinguish the params that we expose to userspace (potentially wrapped in proxies)\n // and the underlying object containing params values. We do this because wrappers\n // like `instrumentParamsPromiseWithDevWarnings` need to be able to get the known param names\n // without triggering other wrapper proxies.\n let userspaceParams = underlyingParams;\n if (validationSamples) {\n userspaceParams = createServerParamsProxyForInstantValidation(underlyingParams, workStore, validationSamples);\n }\n if (varyParamsAccumulator) {\n userspaceParams = createVaryingParams(varyParamsAccumulator, userspaceParams, optionalCatchAllParamName);\n }\n if (stagedRendering && asyncApiPromises) {\n return createStagedRenderParams(workStore, workUnitStore, stagedRendering, asyncApiPromises, underlyingParams, userspaceParams);\n }\n // No staged rendering = no cacheComponents, or cacheComponents prod without cachedNavigations\n if (process.env.NODE_ENV === 'development') {\n const fallbackParams = workUnitStore.fallbackParams;\n return createRenderParamsInDev(underlyingParams, userspaceParams, fallbackParams, workStore, workUnitStore);\n } else {\n return createRenderParamsInProd(userspaceParams);\n }\n}\nfunction createStagedRenderParams(workStore, workUnitStore, stagedRendering, asyncApiPromises, underlyingParams, userspaceParams) {\n const promise = createStagedRenderParamsImpl(workUnitStore, stagedRendering, asyncApiPromises, underlyingParams, userspaceParams);\n if (process.env.NODE_ENV === 'development') {\n return instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore);\n } else {\n return promise;\n }\n}\nfunction createStagedRenderParamsImpl(workUnitStore, stagedRendering, asyncApiPromises, /** The actual param values, without any instrumentation */ underlyingParams, /** The params object to return to userspace, possibly wrapped in a proxy */ userspaceParams) {\n // If the route has no params, they should resolve immediately.\n if (isEmptyParams(underlyingParams)) {\n return makeUntrackedParams(userspaceParams);\n }\n // If we have fallback params, then they should always resolve in the runtime link data stage.\n // We do this indirectly via the shared params parent for better debug info.\n if (hasFallbackRouteParams(underlyingParams, workUnitStore.fallbackParams)) {\n return createParamsPromiseFromTrigger(asyncApiPromises.sharedParamsParent, userspaceParams);\n }\n // All params are static.\n // If we're rendering with shells, even static params must be delayed to exclude them from the shell.\n // However, root params are allowed in shells, so if all the params are root params, they can be included as well.\n if (!allParamsAreRootParams(underlyingParams, workUnitStore.rootParams)) {\n // For a dynamic request we generally want to recover a static shell,\n // so static params can resolve in the static stage, because session\n // shells are handled with a separate render.\n // However, in dev we might need to recover a session shell for instant validation.\n // This is indicated by `needsSessionShell`.\n const staticParamsStage = workUnitStore.needsSessionShell ? RENDER_STAGES_BY_DATA_KIND.runtimeLinkData : RENDER_STAGES_BY_DATA_KIND.staticLinkData;\n return stagedRendering.delayUntilStage(staticParamsStage, 'params', userspaceParams);\n }\n return makeUntrackedParams(userspaceParams);\n}\nfunction createParamsPromiseFromTrigger(trigger, userspaceParams) {\n if (process.env.NODE_ENV === 'development') {\n // We wrap each instance of params in a `new Promise()`, which lets us show each\n // await a different set of values. This is important when all awaits\n // are in third party which would otherwise track all the way to the\n // internal params.\n const promise = new Promise((resolve, reject)=>{\n trigger.then(()=>resolve(userspaceParams), reject);\n });\n promise.catch(noop);\n // @ts-expect-error\n promise.displayName = 'params';\n return promise;\n } else {\n return makePromiseFromTrigger(trigger, userspaceParams);\n }\n}\nfunction noop() {}\nfunction createServerParamsProxyForInstantValidation(underlyingParams, workStore, validationSamples) {\n const { createExhaustiveParamsProxy } = require('../app-render/instant-validation/instant-samples');\n const declaredParams = new Set(Object.keys(validationSamples.params ?? {}));\n return createExhaustiveParamsProxy(underlyingParams, declaredParams, workStore.route);\n}\nfunction createClientParamsInInstantValidation(underlyingParams, workStore, validationSamples) {\n const { createExhaustiveParamsProxy } = require('../app-render/instant-validation/instant-samples');\n const declaredParams = new Set(Object.keys((validationSamples == null ? void 0 : validationSamples.params) ?? {}));\n const proxiedUnderlying = createExhaustiveParamsProxy(underlyingParams, declaredParams, workStore.route);\n return Promise.resolve(proxiedUnderlying);\n}\nfunction createRenderParamsInProd(userspaceParams) {\n return makeUntrackedParams(userspaceParams);\n}\nfunction createRenderParamsInDev(underlyingParams, userpaceParams, fallbackParams, workStore, requestStore) {\n return makeDynamicallyTrackedParamsWithDevWarnings(underlyingParams, userpaceParams, hasFallbackRouteParams(underlyingParams, fallbackParams), workStore, requestStore);\n}\nconst CachedParams = new WeakMap();\nconst fallbackParamsProxyHandler = {\n get: function get(target, prop, receiver) {\n if (prop === 'then' || prop === 'catch' || prop === 'finally') {\n const originalMethod = ReflectAdapter.get(target, prop, receiver);\n return ({\n [prop]: (...args)=>{\n // Record against the store that's active at access time: the\n // hanging promise is cached by params object across prerender\n // stores, so the store that created it may not be the one that's\n // rendering when it's finally awaited.\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workUnitStore !== undefined) {\n trackFallbackParamsAccessed(workUnitStore);\n }\n const store = dynamicAccessAsyncStorage.getStore();\n if (store) {\n store.abortController.abort(Object.defineProperty(new Error(`Accessed fallback \\`params\\` during prerendering.`), \"__NEXT_ERROR_CODE\", {\n value: \"E691\",\n enumerable: false,\n configurable: true\n }));\n }\n return new Proxy(originalMethod.apply(target, args), fallbackParamsProxyHandler);\n }\n })[prop];\n }\n return ReflectAdapter.get(target, prop, receiver);\n }\n};\nfunction makeHangingParams(underlyingParams, workStore, prerenderStore) {\n const cachedParams = CachedParams.get(underlyingParams);\n if (cachedParams) {\n return cachedParams;\n }\n const promise = new Proxy(makeFallbackParamsHangingPromise(prerenderStore.renderSignal, workStore.route, '`params`', // This promise is created for every segment on a fallback route whether\n // or not it reads params, so recording the access at creation would mark\n // every render. The access is tracked in the proxy traps instead.\n null), fallbackParamsProxyHandler);\n CachedParams.set(underlyingParams, promise);\n return promise;\n}\nfunction makeErroringParams(underlyingParams, fallbackParams, workStore, prerenderStore) {\n const cachedParams = CachedParams.get(underlyingParams);\n if (cachedParams) {\n return cachedParams;\n }\n const augmentedUnderlying = {\n ...underlyingParams\n };\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying);\n CachedParams.set(underlyingParams, promise);\n Object.keys(underlyingParams).forEach((prop)=>{\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get () {\n const expression = describeStringPropertyAccess('params', prop);\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(workStore.route, expression, prerenderStore.dynamicTracking);\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(expression, workStore, prerenderStore);\n }\n },\n enumerable: true\n });\n }\n }\n });\n return promise;\n}\nfunction makeUntrackedParams(underlyingParams) {\n const cachedParams = CachedParams.get(underlyingParams);\n if (cachedParams) {\n return cachedParams;\n }\n const promise = Promise.resolve(underlyingParams);\n CachedParams.set(underlyingParams, promise);\n return promise;\n}\nfunction makeDynamicallyTrackedParamsWithDevWarnings(underlyingParams, userspaceParams, hasFallbackParams, workStore, requestStore) {\n const cachedParams = CachedParams.get(underlyingParams);\n if (cachedParams) {\n return cachedParams;\n }\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = hasFallbackParams ? makeDevtoolsIOAwarePromise(userspaceParams, requestStore, RENDER_STAGES_BY_DATA_KIND.runtimeLinkData) : Promise.resolve(userspaceParams);\n const proxiedPromise = instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore);\n CachedParams.set(underlyingParams, proxiedPromise);\n return proxiedPromise;\n}\nfunction instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore) {\n // Track which properties we should warn for.\n const proxiedProperties = new Set();\n Object.keys(underlyingParams).forEach((prop)=>{\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n proxiedProperties.add(prop);\n }\n });\n return new Proxy(promise, {\n get (target, prop, receiver) {\n if (typeof prop === 'string') {\n if (// We are accessing a property that was proxied to the promise instance\n proxiedProperties.has(prop)) {\n const expression = describeStringPropertyAccess('params', prop);\n warnForSyncAccess(workStore.route, expression);\n }\n }\n return ReflectAdapter.get(target, prop, receiver);\n },\n set (target, prop, value, receiver) {\n if (typeof prop === 'string') {\n proxiedProperties.delete(prop);\n }\n return ReflectAdapter.set(target, prop, value, receiver);\n },\n ownKeys (target) {\n const expression = '`...params` or similar expression';\n warnForSyncAccess(workStore.route, expression);\n return Reflect.ownKeys(target);\n }\n });\n}\nconst warnForSyncAccess = createDedupedByCallsiteServerErrorLoggerDev(createParamsAccessError);\nfunction createParamsAccessError(route, expression) {\n const prefix = route ? `Route \"${route}\" ` : 'This route ';\n return Object.defineProperty(new Error(`${prefix}used ${expression}. ` + `\\`params\\` is a Promise and must be unwrapped with \\`await\\` or \\`React.use()\\` before accessing its properties. ` + `Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), \"__NEXT_ERROR_CODE\", {\n value: \"E834\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=params.js.map","/**\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 */ // Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react';\nimport { DynamicServerError } from '../../client/components/hooks-server-context';\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout';\nimport { getStagedRenderingController, throwForMissingRequestStore, workUnitAsyncStorage } from './work-unit-async-storage.external';\nimport { workAsyncStorage } from '../app-render/work-async-storage.external';\nimport { ClientHookDynamicError, isClientHookDynamicError, makeClientHookHangingPromise, trackRuntimeDataAccessed } from '../dynamic-rendering-utils';\nimport { METADATA_BOUNDARY_NAME, VIEWPORT_BOUNDARY_NAME, OUTLET_BOUNDARY_NAME, ROOT_LAYOUT_BOUNDARY_NAME } from '../../lib/framework/boundary-constants';\nimport { scheduleOnNextTick } from '../../lib/scheduler';\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr';\nimport { createRuntimeBodyError, createDynamicBodyError, createRuntimeBodyErrorInNavigation, createDynamicBodyErrorInNavigation, createDynamicOrRuntimeBodyError, createRuntimeMetadataError, createDynamicMetadataError, createRuntimeViewportError, createDynamicViewportError, createDynamicOrRuntimeViewportError, createDynamicOrRuntimeMetadataError, logBuildDebugHint, createLinkBodyErrorInNavigation, createLinkMetadataError, createLinkViewportError } from './blocking-route-messages';\nimport { InvariantError } from '../../shared/lib/invariant-error';\nimport { INSTANT_VALIDATION_BOUNDARY_NAME, INSTANT_SLOT_MARKER_PREFIX, INSTANT_SLOT_MARKER_SUFFIX } from './instant-validation/boundary-constants';\nimport { allRequiredBoundariesRendered } from './instant-validation/boundary-tracking';\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages';\nconst hasPostpone = typeof React.unstable_postpone === 'function';\nexport function createDynamicTrackingState(isDebugDynamicAccesses) {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n syncDynamicErrorWithStackPostMicrotask: false\n };\n}\nexport function createDynamicValidationState() {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n dynamicMetadata: null,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: []\n };\n}\nfunction getPendingClientSyncDynamicError(clientDynamic) {\n return clientDynamic.syncDynamicErrorWithStackPostMicrotask ? null : clientDynamic.syncDynamicErrorWithStack;\n}\nexport function getFirstDynamicReason(trackingState) {\n var _trackingState_dynamicAccesses_;\n return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression;\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 */ export function markCurrentScopeAsDynamic(store, workUnitStore, expression) {\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;\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 if (store.dynamicShouldError) {\n throw Object.defineProperty(new StaticGenBailoutError(`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`), \"__NEXT_ERROR_CODE\", {\n value: \"E553\",\n enumerable: false,\n configurable: true\n });\n }\n if (workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender-ppr':\n return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);\n case 'prerender-legacy':\n workUnitStore.revalidate = 0;\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), \"__NEXT_ERROR_CODE\", {\n value: \"E550\",\n enumerable: false,\n configurable: true\n });\n store.dynamicUsageDescription = expression;\n store.dynamicUsageStack = err.stack;\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;\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 */ export function throwToInterruptStaticGeneration(expression, store, prerenderStore) {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = Object.defineProperty(new DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), \"__NEXT_ERROR_CODE\", {\n value: \"E558\",\n enumerable: false,\n configurable: true\n });\n prerenderStore.revalidate = 0;\n store.dynamicUsageDescription = expression;\n store.dynamicUsageStack = err.stack;\n throw err;\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 */ export function trackDynamicDataInDynamicRender(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;\n }\n}\nfunction abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;\n const error = createPrerenderInterruptedError(reason);\n prerenderStore.controller.abort(error);\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 ? new Error().stack : undefined,\n expression\n });\n }\n}\nexport function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {\n const dynamicTracking = prerenderStore.dynamicTracking;\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 abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);\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 */ export function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) {\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 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(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);\n}\nexport function Postpone({ reason, route }) {\n const prerenderStore = workUnitAsyncStorage.getStore();\n const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null;\n postponeWithTracking(route, reason, dynamicTracking);\n}\nexport function postponeWithTracking(route, expression, dynamicTracking) {\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 ? new Error().stack : undefined,\n expression\n });\n }\n React.unstable_postpone(createPostponeReason(route, expression));\n}\nfunction createPostponeReason(route, expression) {\n return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;\n}\nexport function isDynamicPostpone(err) {\n if (typeof err === 'object' && err !== null && typeof err.message === 'string') {\n return isDynamicPostponeReason(err.message);\n }\n return false;\n}\nfunction isDynamicPostponeReason(reason) {\n return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error');\n}\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), \"__NEXT_ERROR_CODE\", {\n value: \"E296\",\n enumerable: false,\n configurable: true\n });\n}\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED';\nfunction createPrerenderInterruptedError(message) {\n const error = Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n error.digest = NEXT_PRERENDER_INTERRUPTED;\n return error;\n}\nexport function isPrerenderInterruptedError(error) {\n return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error;\n}\nexport function accessedDynamicData(dynamicAccesses) {\n return dynamicAccesses.length > 0;\n}\nexport function consumeDynamicAccess(serverDynamic, clientDynamic) {\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}\nexport function formatDynamicAPIAccesses(dynamicAccesses) {\n return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{\n stack = stack.split('\\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).filter((line)=>{\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false;\n }\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' (<anonymous>)')) {\n return false;\n }\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false;\n }\n return true;\n }).join('\\n');\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`;\n });\n}\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), \"__NEXT_ERROR_CODE\", {\n value: \"E224\",\n enumerable: false,\n configurable: true\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 */ export function createRenderInBrowserAbortSignal() {\n const controller = new AbortController();\n controller.abort(Object.defineProperty(new BailoutToCSRError('Render in Browser'), \"__NEXT_ERROR_CODE\", {\n value: \"E721\",\n enumerable: false,\n configurable: true\n }));\n return controller.signal;\n}\nexport function createHangingInputAbortSignal(workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController();\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 const stagedRendering = getStagedRenderingController(workUnitStore);\n if (stagedRendering && stagedRendering.finalStage !== null) {\n stagedRendering.waitForStage(stagedRendering.finalStage).then(()=>scheduleOnNextTick(()=>controller.abort()), noop);\n } else {\n scheduleOnNextTick(()=>controller.abort());\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;\n }\n}\nfunction noop() {}\nexport function annotateDynamicAccess(expression, prerenderStore) {\n const dynamicTracking = prerenderStore.dynamicTracking;\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined,\n expression\n });\n }\n}\nexport function useDynamicRouteParams(expression) {\n const workStore = workAsyncStorage.getStore();\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (workStore && workUnitStore) {\n switch(workUnitStore.type){\n case 'prerender-client':\n {\n const fallbackParams = workUnitStore.fallbackRouteParams;\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(makeClientHookHangingPromise(workUnitStore.renderSignal, new ClientHookDynamicError(workStore.route, expression)));\n }\n break;\n }\n case 'prerender':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E795\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-ppr':\n {\n const fallbackParams = workUnitStore.fallbackRouteParams;\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);\n }\n break;\n }\n case 'validation-client':\n {\n break;\n }\n case 'prerender-runtime':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E771\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'private-cache':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E745\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1130\",\n enumerable: false,\n configurable: true\n });\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break;\n default:\n workUnitStore;\n }\n }\n}\nexport function useDynamicSearchParams(expression) {\n const workStore = workAsyncStorage.getStore();\n const workUnitStore = workUnitAsyncStorage.getStore();\n if (!workStore) {\n // We assume pages router context and just return\n return;\n }\n if (!workUnitStore) {\n throwForMissingRequestStore(expression);\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 {\n React.use(makeClientHookHangingPromise(workUnitStore.renderSignal, new ClientHookDynamicError(workStore.route, expression)));\n break;\n }\n case 'prerender-legacy':\n case 'prerender-ppr':\n {\n if (workStore.forceStatic) {\n return;\n }\n throw Object.defineProperty(new BailoutToCSRError(expression), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n case 'prerender':\n case 'prerender-runtime':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E795\",\n enumerable: false,\n configurable: true\n });\n case 'cache':\n case 'unstable-cache':\n case 'private-cache':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E745\",\n enumerable: false,\n configurable: true\n });\n case 'generate-static-params':\n throw Object.defineProperty(new InvariantError(`\\`${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.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1130\",\n enumerable: false,\n configurable: true\n });\n case 'request':\n return;\n default:\n workUnitStore;\n }\n}\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(<anonymous>\\)/;\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6';\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\\\\s+at Suspense \\\\(<anonymous>\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(<anonymous>\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`);\nconst hasMetadataRegex = new RegExp(`\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`);\nconst hasViewportRegex = new RegExp(`\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`);\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`);\nconst hasInstantValidationBoundaryRegex = new RegExp(`\\\\n\\\\s+at ${INSTANT_VALIDATION_BOUNDARY_NAME}[\\\\n\\\\s]`);\nconst slotMarkerRegex = new RegExp(`\\\\n\\\\s+at ${INSTANT_SLOT_MARKER_PREFIX}(\\\\d+)${INSTANT_SLOT_MARKER_SUFFIX}[\\\\n\\\\s]`);\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. */ function resolveInstantStack(componentStack, dynamicValidation) {\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 * 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 */ function trackOutletSuspenseAboveBody(componentStack, dynamicValidation) {\n if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {\n dynamicValidation.hasSuspenseAboveBody = true;\n }\n}\nexport function trackAllowedDynamicAccess(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {\n const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);\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 (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {\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 if (isClientHookDynamicError(dynamicReason)) {\n dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));\n return;\n }\n const error = addErrorContext(createDynamicOrRuntimeBodyError(workStore.route), componentStack, null);\n dynamicValidation.dynamicErrors.push(error);\n return;\n}\nexport var DynamicHoleKind = /*#__PURE__*/ function(DynamicHoleKind) {\n /** We know that this hole is caused by link data. */ DynamicHoleKind[DynamicHoleKind[\"Link\"] = 1] = \"Link\";\n /** We know that this hole is caused by runtime data. */ DynamicHoleKind[DynamicHoleKind[\"Runtime\"] = 2] = \"Runtime\";\n /** We know that this hole is caused by dynamic data. */ DynamicHoleKind[DynamicHoleKind[\"Dynamic\"] = 3] = \"Dynamic\";\n return DynamicHoleKind;\n}({});\nexport function createInstantValidationState(slotStacks) {\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}\nexport function trackDynamicHoleInNavigation(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic, kind, boundaryState) {\n const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);\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(componentStack, dynamicValidation);\n if (hasMetadataRegex.test(componentStack)) {\n const error = addErrorContext(kind === 1 ? createLinkMetadataError(workStore.route) : kind === 2 ? createRuntimeMetadataError(workStore.route) : createDynamicMetadataError(workStore.route), componentStack, effectiveCreateInstantStack);\n dynamicValidation.dynamicMetadata = error;\n return;\n }\n if (hasViewportRegex.test(componentStack)) {\n const error = addErrorContext(kind === 1 ? createLinkViewportError(workStore.route) : kind === 2 ? createRuntimeViewportError(workStore.route) : createDynamicViewportError(workStore.route), componentStack, effectiveCreateInstantStack);\n dynamicValidation.dynamicErrors.push(error);\n return;\n }\n const boundaryLocation = 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 // 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 ;\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(Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E1331\",\n enumerable: false,\n configurable: true\n }), componentStack, effectiveCreateInstantStack);\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 if (syncDynamicError) {\n if (effectiveCreateInstantStack !== null && syncDynamicError.cause === undefined) {\n syncDynamicError.cause = effectiveCreateInstantStack();\n }\n dynamicValidation.dynamicErrors.push(syncDynamicError);\n return;\n }\n if (isClientHookDynamicError(dynamicReason)) {\n dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, effectiveCreateInstantStack));\n return;\n }\n const error = addErrorContext(kind === 1 ? createLinkBodyErrorInNavigation(workStore.route) : kind === 2 ? createRuntimeBodyErrorInNavigation(workStore.route) : createDynamicBodyErrorInNavigation(workStore.route), componentStack, effectiveCreateInstantStack);\n dynamicValidation.dynamicErrors.push(error);\n return;\n}\nexport function trackThrownErrorInNavigation(workStore, dynamicValidation, thrownValue, componentStack) {\n const boundaryLocation = 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 // 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(Object.defineProperty(new Error('An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.', {\n cause: thrownValue\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E1118\",\n enumerable: false,\n configurable: true\n }), componentStack, null);\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(Object.defineProperty(new Error(message, {\n cause: thrownValue\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E1338\",\n enumerable: false,\n configurable: true\n }), componentStack, null // TODO(instant-validation-build): conflicting use of cause\n );\n dynamicValidation.validationPreventingErrors.push(error);\n }\n}\nexport function trackDynamicHoleInRuntimeShell(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {\n const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);\n if (hasOutletRegex.test(componentStack)) {\n trackOutletSuspenseAboveBody(componentStack, dynamicValidation);\n return;\n } else if (hasMetadataRegex.test(componentStack)) {\n const error = addErrorContext(createDynamicMetadataError(workStore.route), componentStack, null);\n dynamicValidation.dynamicMetadata = error;\n return;\n } else if (hasViewportRegex.test(componentStack)) {\n const error = addErrorContext(createDynamicViewportError(workStore.route), componentStack, null);\n dynamicValidation.dynamicErrors.push(error);\n return;\n } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {\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 if (isClientHookDynamicError(dynamicReason)) {\n dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));\n return;\n }\n const error = addErrorContext(createDynamicBodyError(workStore.route), componentStack, null);\n dynamicValidation.dynamicErrors.push(error);\n return;\n}\nexport function trackDynamicHoleInStaticShell(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {\n const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);\n if (hasOutletRegex.test(componentStack)) {\n trackOutletSuspenseAboveBody(componentStack, dynamicValidation);\n return;\n } else if (hasMetadataRegex.test(componentStack)) {\n const error = addErrorContext(createRuntimeMetadataError(workStore.route), componentStack, null);\n dynamicValidation.dynamicMetadata = error;\n return;\n } else if (hasViewportRegex.test(componentStack)) {\n const error = addErrorContext(createRuntimeViewportError(workStore.route), componentStack, null);\n dynamicValidation.dynamicErrors.push(error);\n return;\n } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {\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 if (isClientHookDynamicError(dynamicReason)) {\n dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));\n return;\n }\n const error = addErrorContext(createRuntimeBodyError(workStore.route), componentStack, null);\n dynamicValidation.dynamicErrors.push(error);\n return;\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 */ function addErrorContext(error, componentStack, createInstantStack) {\n const ownerStack = process.env.NODE_ENV !== 'production' && React.captureOwnerStack ? React.captureOwnerStack() : null;\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 = error.name + ': ' + error.message + (ownerStack || componentStack);\n return error;\n}\nexport var PreludeState = /*#__PURE__*/ function(PreludeState) {\n PreludeState[PreludeState[\"Full\"] = 0] = \"Full\";\n PreludeState[PreludeState[\"Empty\"] = 1] = \"Empty\";\n PreludeState[PreludeState[\"Errored\"] = 2] = \"Errored\";\n return PreludeState;\n}({});\nexport function logDisallowedDynamicError(workStore, error) {\n console.error(error);\n logBuildDebugHint(workStore.route);\n}\nexport function throwIfSyncIOUsed(workStore, serverDynamic) {\n if (serverDynamic.syncDynamicErrorWithStack) {\n logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);\n throw new StaticGenBailoutError();\n }\n}\nexport function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic, allowEmptyStaticShell) {\n throwIfSyncIOUsed(workStore, serverDynamic);\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 (prelude === 0 && dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {\n console.error(createDynamicOrRuntimeMetadataError(workStore.route).message);\n throw new StaticGenBailoutError();\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 if (prelude !== 0) {\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 throw new StaticGenBailoutError();\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(createDynamicOrRuntimeViewportError(workStore.route).message);\n throw new StaticGenBailoutError();\n }\n if (prelude === 1) {\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(`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 throw new StaticGenBailoutError();\n }\n }\n}\nexport function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation, allowEmptyStaticShell) {\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 (prelude === 0 && dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicErrors.length === 0 && dynamicValidation.dynamicMetadata) {\n return [\n 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 if (prelude !== 0) {\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 if (prelude === 1) {\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 Object.defineProperty(new InvariantError(`Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason.`), \"__NEXT_ERROR_CODE\", {\n value: \"E936\",\n enumerable: false,\n configurable: true\n })\n ];\n }\n }\n // We had a non-empty prelude and there are no dynamic holes\n return [];\n}\nexport function getNavigationDisallowedDynamicReasons(workStore, prelude, dynamicValidation, validationSampleTracking, boundaryState, devRenderDidError) {\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 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 // NOTE: We don't care about Suspense above body here,\n // we're only concerned with the validation boundary\n if (prelude !== 0) {\n const dynamicErrors = dynamicValidation.dynamicErrors;\n if (dynamicErrors.length > 0) {\n return dynamicErrors;\n }\n if (prelude === 1 && !dynamicValidation.hasAllowedClientDynamicAboveBoundary && allRequiredBoundariesRendered(boundaryState)) {\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 Object.defineProperty(new InvariantError(`Route \"${workStore.route}\" failed to render during instant validation and Next.js was unable to determine a reason.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1055\",\n enumerable: false,\n configurable: true\n });\n }\n } else {\n const dynamicErrors = dynamicValidation.dynamicErrors;\n if (dynamicErrors.length > 0) {\n return dynamicErrors;\n }\n if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicMetadata) {\n return [\n 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 = [];\n for (const [id, filePaths] of boundaryState.requiredIds){\n if (!boundaryState.renderedIds.has(id)) {\n for (const filePath of filePaths){\n let normalized = filePath.replace(/^\\[project\\][\\\\/]?/, '').replace(process.cwd() + '/', '').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]\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\n ]);\n }\n }\n // We had a non-empty prelude and there are no dynamic holes\n return [];\n}\n\n//# sourceMappingURL=dynamic-rendering.js.map","/**\n * Interop between \"export default\" and \"module.exports\".\n */\nexport function interopDefault(mod: any) {\n return mod.default || mod\n}\n","import type { IncomingHttpHeaders } from 'node:http'\n\nimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'\n\n/**\n * Removes the flight headers from the request.\n *\n * @param req the request to strip the headers from\n */\nexport function stripFlightHeaders(headers: IncomingHttpHeaders) {\n for (const header of FLIGHT_HEADERS) {\n delete headers[header]\n }\n}\n","import { RedirectStatusCode } from '../../client/components/redirect-status-code';\nimport { getCookieParser } from '../api-utils/get-cookie-parser';\nexport class BaseNextRequest {\n constructor(method, url, body){\n this.method = method;\n this.url = url;\n this.body = body;\n }\n // Utils implemented using the abstract methods above\n get cookies() {\n if (this._cookies) return this._cookies;\n return this._cookies = getCookieParser(this.headers)();\n }\n}\nexport class BaseNextResponse {\n constructor(destination){\n this.destination = destination;\n }\n // Utils implemented using the abstract methods above\n redirect(destination, statusCode) {\n this.setHeader('Location', destination);\n this.statusCode = statusCode;\n // Since IE11 doesn't support the 308 header add backwards\n // compatibility using refresh header\n if (statusCode === RedirectStatusCode.PermanentRedirect) {\n this.setHeader('Refresh', `0;url=${destination}`);\n }\n return this;\n }\n}\n\n//# sourceMappingURL=index.js.map","import { SYMBOL_CLEARED_COOKIES } from '../api-utils';\nimport { NEXT_REQUEST_META } from '../request-meta';\nimport { BaseNextRequest, BaseNextResponse } from './index';\nlet prop;\nexport class NodeNextRequest extends BaseNextRequest {\n static #_ = prop = _NEXT_REQUEST_META = NEXT_REQUEST_META;\n constructor(_req){\n var _this__req;\n super(_req.method.toUpperCase(), _req.url, _req), this._req = _req, this.headers = this._req.headers, this.fetchMetrics = (_this__req = this._req) == null ? void 0 : _this__req.fetchMetrics, this[_NEXT_REQUEST_META] = this._req[NEXT_REQUEST_META] || {}, this.streaming = false;\n }\n get originalRequest() {\n // Need to mimic these changes to the original req object for places where we use it:\n // render.tsx, api/ssg requests\n this._req[NEXT_REQUEST_META] = this[NEXT_REQUEST_META];\n this._req.url = this.url;\n this._req.cookies = this.cookies;\n return this._req;\n }\n set originalRequest(value) {\n this._req = value;\n }\n /**\n * Returns the request body as a Web Readable Stream. The body here can only\n * be read once as the body will start flowing as soon as the data handler\n * is attached.\n *\n * @internal\n */ stream() {\n if (this.streaming) {\n throw Object.defineProperty(new Error('Invariant: NodeNextRequest.stream() can only be called once'), \"__NEXT_ERROR_CODE\", {\n value: \"E467\",\n enumerable: false,\n configurable: true\n });\n }\n this.streaming = true;\n return new ReadableStream({\n start: (controller)=>{\n this._req.on('data', (chunk)=>{\n controller.enqueue(new Uint8Array(chunk));\n });\n this._req.on('end', ()=>{\n controller.close();\n });\n this._req.on('error', (err)=>{\n controller.error(err);\n });\n }\n });\n }\n}\nexport class NodeNextResponse extends BaseNextResponse {\n get originalResponse() {\n if (SYMBOL_CLEARED_COOKIES in this) {\n this._res[SYMBOL_CLEARED_COOKIES] = this[SYMBOL_CLEARED_COOKIES];\n }\n return this._res;\n }\n constructor(_res){\n super(_res), this._res = _res, this.textBody = undefined;\n }\n get sent() {\n return this._res.finished || this._res.headersSent;\n }\n get statusCode() {\n return this._res.statusCode;\n }\n set statusCode(value) {\n this._res.statusCode = value;\n }\n get statusMessage() {\n return this._res.statusMessage;\n }\n set statusMessage(value) {\n this._res.statusMessage = value;\n }\n setHeader(name, value) {\n this._res.setHeader(name, value);\n return this;\n }\n removeHeader(name) {\n this._res.removeHeader(name);\n return this;\n }\n getHeaderValues(name) {\n const values = this._res.getHeader(name);\n if (values === undefined) return undefined;\n return (Array.isArray(values) ? values : [\n values\n ]).map((value)=>value.toString());\n }\n hasHeader(name) {\n return this._res.hasHeader(name);\n }\n getHeader(name) {\n const values = this.getHeaderValues(name);\n return Array.isArray(values) ? values.join(',') : undefined;\n }\n getHeaders() {\n return this._res.getHeaders();\n }\n appendHeader(name, value) {\n const currentValues = this.getHeaderValues(name) ?? [];\n if (!currentValues.includes(value)) {\n this._res.setHeader(name, [\n ...currentValues,\n value\n ]);\n }\n return this;\n }\n body(value) {\n this.textBody = value;\n return this;\n }\n send() {\n this._res.end(this.textBody);\n }\n onClose(callback) {\n this.originalResponse.on('close', callback);\n }\n}\nvar _NEXT_REQUEST_META;\n\n//# sourceMappingURL=node.js.map","import { HeadersAdapter } from '../web/spec-extension/adapters/headers';\nimport { PRERENDER_REVALIDATE_HEADER, PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER } from '../../lib/constants';\nimport { getTracer } from '../lib/trace/tracer';\nimport { NodeSpan } from '../lib/trace/constants';\nexport function wrapApiHandler(page, handler) {\n return (...args)=>{\n getTracer().setRootSpanAttribute('next.route', page);\n // Call API route method\n return getTracer().trace(NodeSpan.runHandler, {\n spanName: `executing api route (pages) ${page}`\n }, ()=>handler(...args));\n };\n}\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */ export function sendStatusCode(res, statusCode) {\n res.statusCode = statusCode;\n return res;\n}\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */ export function redirect(res, statusOrUrl, url) {\n if (typeof statusOrUrl === 'string') {\n url = statusOrUrl;\n statusOrUrl = 307;\n }\n if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n throw Object.defineProperty(new Error(`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').`), \"__NEXT_ERROR_CODE\", {\n value: \"E389\",\n enumerable: false,\n configurable: true\n });\n }\n res.writeHead(statusOrUrl, {\n Location: url\n });\n res.write(url);\n res.end();\n return res;\n}\nexport function checkIsOnDemandRevalidate(rawHeaders, previewProps) {\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 const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER);\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId;\n const revalidateOnlyGenerated = headers.has(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER);\n return {\n isOnDemandRevalidate,\n revalidateOnlyGenerated\n };\n }\n const headers = rawHeaders;\n const previewModeId = headers[PRERENDER_REVALIDATE_HEADER];\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId;\n const revalidateOnlyGenerated = headers.hasOwnProperty(PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER);\n return {\n isOnDemandRevalidate,\n revalidateOnlyGenerated\n };\n}\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`;\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`;\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024;\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA);\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS);\nexport function clearPreviewData(res, options = {}) {\n if (SYMBOL_CLEARED_COOKIES in res) {\n return res;\n }\n const { serialize } = require('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) ? previous : [],\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\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\n } : undefined\n })\n ]);\n Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n value: true,\n enumerable: false\n });\n return res;\n}\n/**\n * Custom error class\n */ export class ApiError extends Error {\n constructor(statusCode, message){\n super(message);\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n this.statusCode = statusCode;\n }\n}\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */ export function sendError(res, statusCode, message) {\n res.statusCode = statusCode;\n res.statusMessage = message;\n res.end(message);\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 */ export function setLazyProp({ req }, prop, getter) {\n const opts = {\n configurable: true,\n enumerable: true\n };\n const optsReset = {\n ...opts,\n 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, {\n ...optsReset,\n value\n });\n return value;\n },\n set: (value)=>{\n Object.defineProperty(req, prop, {\n ...optsReset,\n value\n });\n }\n });\n}\n\n//# sourceMappingURL=index.js.map","/**\n * Parse cookies from the `headers` of request\n * @param req request object\n */ export function getCookieParser(headers) {\n return function parseCookie() {\n const { cookie } = headers;\n if (!cookie) {\n return {};\n }\n const { parse: parseCookieFn } = require('next/dist/compiled/cookie');\n return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie);\n };\n}\n\n//# sourceMappingURL=get-cookie-parser.js.map","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","/**\n * If set to `incremental`, only those leaf pages that export\n * `experimental_ppr = true` will have partial prerendering enabled. If any\n * page exports this value as `false` or does not export it at all will not\n * have partial prerendering enabled. If set to a boolean, the options for\n * `experimental_ppr` will be ignored.\n */\n\nexport type ExperimentalPPRConfig = boolean | 'incremental'\n\n/**\n * Returns true if partial prerendering is enabled for the application. It does\n * not tell you if a given route has PPR enabled, as that requires analysis of\n * the route's configuration.\n *\n * @see {@link checkIsRoutePPREnabled} - for checking if a specific route has PPR enabled.\n */\nexport function checkIsAppPPREnabled(\n config: ExperimentalPPRConfig | undefined\n): boolean {\n // If the config is undefined, partial prerendering is disabled.\n if (typeof config === 'undefined') return false\n\n // If the config is a boolean, use it directly.\n if (typeof config === 'boolean') return config\n\n // If the config is a string, it must be 'incremental' to enable partial\n // prerendering.\n if (config === 'incremental') return true\n\n return false\n}\n\n/**\n * Returns true if partial prerendering is supported for the current page with\n * the provided app configuration. If the application doesn't have partial\n * prerendering enabled, this function will always return false. If you want to\n * check if the application has partial prerendering enabled\n *\n * @see {@link checkIsAppPPREnabled} for checking if the application has PPR enabled.\n */\nexport function checkIsRoutePPREnabled(\n config: ExperimentalPPRConfig | undefined\n): boolean {\n // If the config is undefined, partial prerendering is disabled.\n if (typeof config === 'undefined') return false\n\n // If the config is a boolean, use it directly.\n if (typeof config === 'boolean') return config\n\n return false\n}\n","/**\n * `Sec-Fetch-Dest` values for subresource requests that can never render an\n * HTML response. Excludes destinations that can display HTML (`document`,\n * `iframe`, etc.) and `empty` (`fetch()`/XHR, including RSC requests).\n */\nconst NON_HTML_SEC_FETCH_DESTS = new Set([\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'json',\n 'manifest',\n 'paintworklet',\n 'report',\n 'script',\n 'serviceworker',\n 'sharedworker',\n 'style',\n 'track',\n 'video',\n 'webidentity',\n 'worker',\n 'xslt',\n])\n\nexport function isNonHtmlSecFetchDest(\n value: string | string[] | null | undefined\n): boolean {\n return typeof value === 'string' && NON_HTML_SEC_FETCH_DESTS.has(value)\n}\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 {\n DEFAULT_MAX_POSTPONED_STATE_SIZE,\n parseMaxPostponedStateSize,\n} from '../../shared/lib/size-limit'\nimport type { SizeLimit } from '../../types'\n\nconst INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE =\n 'maxPostponedStateSize must be a valid number (bytes) or filesize format string (e.g., \"5mb\")'\n\nexport type PostponedRequestBodyChunk = Buffer | Uint8Array | string\n\nexport function getMaxPostponedStateSize(\n configuredMaxPostponedStateSize: SizeLimit | undefined\n): {\n maxPostponedStateSize: SizeLimit\n maxPostponedStateSizeBytes: number\n} {\n const maxPostponedStateSize =\n configuredMaxPostponedStateSize ?? DEFAULT_MAX_POSTPONED_STATE_SIZE\n const maxPostponedStateSizeBytes = parseMaxPostponedStateSize(\n configuredMaxPostponedStateSize\n )\n\n if (maxPostponedStateSizeBytes === undefined) {\n throw new Error(INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE)\n }\n\n return { maxPostponedStateSize, maxPostponedStateSizeBytes }\n}\n\nexport function getPostponedStateExceededErrorMessage(\n maxPostponedStateSize: SizeLimit\n): string {\n return (\n `Postponed state exceeded ${maxPostponedStateSize} limit. ` +\n `To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`\n )\n}\n\nfunction toBuffer(chunk: PostponedRequestBodyChunk): Buffer {\n return Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n}\n\nexport async function readBodyWithSizeLimit(\n body: AsyncIterable<PostponedRequestBodyChunk>,\n maxBodySizeBytes: number\n): Promise<Buffer | null> {\n const chunks: Array<Buffer> = []\n let size = 0\n\n for await (const chunk of body) {\n const buffer = toBuffer(chunk)\n size += buffer.byteLength\n if (size > maxBodySizeBytes) {\n return null\n }\n chunks.push(buffer)\n }\n\n return Buffer.concat(chunks)\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 { HTML_LIMITED_BOT_UA_RE_STRING } from '../../shared/lib/router/utils/is-bot'\n\nlet cachedPattern: string | undefined\nlet cachedRegex: RegExp | undefined\n\nexport function shouldServeStreamingMetadata(\n userAgent: string,\n htmlLimitedBots: string | undefined\n): boolean {\n const pattern = htmlLimitedBots || HTML_LIMITED_BOT_UA_RE_STRING\n if (cachedPattern !== pattern) {\n cachedPattern = pattern\n cachedRegex = new RegExp(pattern, 'i')\n }\n // Only block metadata for HTML-limited bots\n if (userAgent && cachedRegex!.test(userAgent)) {\n return false\n }\n return true\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 { 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 { InvariantError } from '../../invariant-error';\nimport { getSegmentParam } from '../utils/get-segment-param';\nimport { INTERCEPTION_ROUTE_MARKERS } from '../utils/interception-routes';\nfunction normalizeEncodedDynamicPlaceholder(segment) {\n if (!/%5b|%5d/i.test(segment)) {\n return segment;\n }\n try {\n const decodedSegment = decodeURIComponent(segment);\n return getSegmentParam(decodedSegment) ? decodedSegment : segment;\n } catch {\n return segment;\n }\n}\nexport function parseAppRouteSegment(segment) {\n if (segment === '') {\n return null;\n }\n // Check if the segment starts with an interception marker\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));\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}\nexport function isNormalizedAppRoute(route) {\n return route.normalized;\n}\nexport function isInterceptionAppRoute(route) {\n return route.interceptionMarker !== undefined && route.interceptingRoute !== undefined && route.interceptedRoute !== undefined;\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 = /* */ 0;\nconst AllowParallelSegments = /* */ 1;\nconst AllowGroupSegments = /* */ 2;\nfunction parseAppRouteImpl(pathname, allowedTypes) {\n const pathnameSegments = pathname.split('/').filter(Boolean);\n // Build segments array with static and dynamic segments\n const segments = [];\n // Parse if this is an interception route.\n let interceptionMarker;\n let interceptingRoute;\n let interceptedRoute;\n for (const segment of pathnameSegments){\n const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment);\n // Parse the segment into an AppSegment.\n const appSegment = parseAppRouteSegment(normalizedSegment);\n if (!appSegment) {\n continue;\n }\n if (appSegment.type === 'route-group' && !(allowedTypes & AllowGroupSegments)) {\n throw Object.defineProperty(new InvariantError(`${pathname} is being parsed as a normalized route, but it has a route group segment.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1151\",\n enumerable: false,\n configurable: true\n });\n }\n if (appSegment.type === 'parallel-route' && !(allowedTypes & AllowParallelSegments)) {\n throw Object.defineProperty(new InvariantError(`${pathname} is being parsed as a normalized route, but it has a parallel route segment.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1152\",\n enumerable: false,\n configurable: true\n });\n }\n segments.push(appSegment);\n if (appSegment.interceptionMarker) {\n const parts = pathname.split(appSegment.interceptionMarker);\n if (parts.length !== 2) {\n throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), \"__NEXT_ERROR_CODE\", {\n value: \"E924\",\n enumerable: false,\n configurable: true\n });\n }\n interceptingRoute = parseAppRouteImpl(parts[0], allowedTypes);\n interceptedRoute = parseAppRouteImpl(parts[1], allowedTypes);\n interceptionMarker = appSegment.interceptionMarker;\n }\n }\n const dynamicSegments = segments.filter((segment)=>segment.type === 'dynamic');\n return {\n normalized: allowedTypes === OnlyRoutableSegments,\n pathname,\n segments,\n dynamicSegments,\n interceptionMarker,\n interceptingRoute,\n interceptedRoute\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 */ export function parseNormalizedAppRoute(pathname) {\n return parseAppRouteImpl(pathname, OnlyRoutableSegments);\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 */ export function parseAppRouteWithSlots(pathname) {\n return parseAppRouteImpl(pathname, AllowParallelSegments);\n}\n\n//# sourceMappingURL=app.js.map","import { DEFAULT_SEGMENT_KEY } from '../../segment';\nexport function parseLoaderTree(tree) {\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 const conventionPath = layout?.[1] || template?.[1] || page?.[1];\n return {\n page,\n segment,\n modules,\n /* it can be either layout / template / page */ conventionPath,\n parallelRoutes,\n staticSiblings\n };\n}\n\n//# sourceMappingURL=parse-loader-tree.js.map","export function interceptionPrefixFromParamType(paramType) {\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\n//# sourceMappingURL=interception-prefix-from-param-type.js.map","export const dynamicParamTypes = {\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\n//# sourceMappingURL=get-short-dynamic-param-type.js.map","import { InvariantError } from '../../invariant-error';\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type';\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 */ function getParamValueFromSegment(pathSegment, params, paramType) {\n // If the segment is dynamic, resolve it from the params object\n if (pathSegment.type === 'dynamic') {\n return params[pathSegment.param.paramName];\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 // For static segments, use the name\n return pathSegment.name;\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 */ export function resolveParamValue(paramName, paramType, depth, route, params) {\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 = [];\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 if (pathSegment.type === 'static') {\n let value = pathSegment.name;\n // For intercepted catch-all params, strip the marker from the first segment\n const interceptionPrefix = interceptionPrefixFromParamType(paramType);\n if (interceptionPrefix && index === depth && interceptionPrefix === pathSegment.interceptionMarker) {\n // Strip the interception marker from the value\n value = value.replace(pathSegment.interceptionMarker, '');\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 // Unknown param placeholder in pathname - can't derive full value\n return undefined;\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);\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 Object.defineProperty(new InvariantError(`Unexpected empty path segments match for a route \"${route.pathname}\" with param \"${paramName}\" of type \"${paramType}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E931\",\n enumerable: false,\n configurable: true\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 // Check if the segment at this depth is a placeholder for an unknown param\n if (pathSegment.type === 'dynamic' && !params.hasOwnProperty(pathSegment.param.paramName)) {\n // The segment is a placeholder like [category] and we don't have the value\n return undefined;\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 return undefined;\n default:\n paramType;\n }\n}\n\n//# sourceMappingURL=resolve-param-value.js.map","import { parseAppRouteSegment } 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 * 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 */ function validatePrefixMatch(currentPath, route) {\n for(let i = 0; i < currentPath.length; i++){\n const pathSegment = currentPath[i];\n const targetPathSegment = route.segments[i];\n // Type mismatch - one is static, one is dynamic\n if (pathSegment.type !== targetPathSegment.type) {\n return false;\n }\n // One has an interception marker, the other doesn't.\n if (pathSegment.interceptionMarker !== targetPathSegment.interceptionMarker) {\n return false;\n }\n // Both are static but names don't match\n if (pathSegment.type === 'static' && targetPathSegment.type === 'static' && pathSegment.name !== targetPathSegment.name) {\n return false;\n } else if (pathSegment.type === 'dynamic' && targetPathSegment.type === 'dynamic' && pathSegment.param.paramType !== targetPathSegment.param.paramType && pathSegment.param.paramName !== targetPathSegment.param.paramName) {\n return false;\n }\n }\n return true;\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 */ export function extractPathnameRouteParamSegmentsFromLoaderTree(loaderTree, route) {\n const pathnameRouteParamSegments = [];\n const params = {};\n // BFS traversal with depth and path tracking\n const queue = [\n {\n tree: loaderTree,\n depth: 0,\n currentPath: []\n }\n ];\n while(queue.length > 0){\n const { tree, depth, currentPath } = queue.shift();\n const { segment, parallelRoutes } = parseLoaderTree(tree);\n // Build the path for the current node\n let updatedPath = currentPath;\n let nextDepth = depth;\n const appSegment = parseAppRouteSegment(segment);\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 (appSegment && appSegment.type !== 'route-group' && appSegment.type !== 'parallel-route') {\n updatedPath = [\n ...currentPath,\n appSegment\n ];\n nextDepth = depth + 1;\n }\n // Check if this segment has a param and matches the target pathname at this depth\n if ((appSegment == null ? void 0 : appSegment.type) === 'dynamic') {\n const { paramName, paramType } = appSegment.param;\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 // 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 // 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 // Resolve parameter value if it's not already known.\n if (!params.hasOwnProperty(paramName)) {\n const paramValue = resolveParamValue(paramName, paramType, depth, route, params);\n if (paramValue !== undefined) {\n params[paramName] = paramValue;\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 return {\n pathnameRouteParamSegments,\n params\n };\n}\n\n//# sourceMappingURL=extract-pathname-route-param-segments-from-loader-tree.js.map","import { resolveRouteParamsFromTree } from '../../build/static-paths/utils';\nimport { dynamicParamTypes } from '../app-render/get-short-dynamic-param-type';\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/**\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 */ export function createOpaqueFallbackRouteParams(fallbackRouteParams) {\n // If there are no fallback route params, we can return early.\n if (fallbackRouteParams.length === 0) return null;\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 const keys = new Map();\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 return keys;\n}\nexport function buildDynamicSegmentPlaceholder(param) {\n const { repeat, optional } = getParamProperties(param.paramType);\n if (optional) {\n return `[[...${param.paramName}]]`;\n }\n if (repeat) {\n return `[...${param.paramName}]`;\n }\n return `[${param.paramName}]`;\n}\nexport function getPlaceholderFallbackRouteParams(params, fallbackRouteParams) {\n return fallbackRouteParams.filter((param)=>{\n const placeholder = buildDynamicSegmentPlaceholder(param);\n const value = params == null ? void 0 : params[param.paramName];\n return value === placeholder || Array.isArray(value) && value.length === 1 && value[0] === placeholder;\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 */ export function getFallbackRouteParams(page, routeModule) {\n const route = parseNormalizedAppRoute(page);\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 } = extractPathnameRouteParamSegmentsFromLoaderTree(routeModule.userland.loaderTree, route);\n // Create fallback route params for the pathname segments.\n const fallbackRouteParams = pathnameRouteParamSegments.map(({ paramName, paramType })=>({\n paramName,\n paramType\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(routeModule.userland.loaderTree, params, route, fallbackRouteParams // Will be mutated to add route params\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\n//# sourceMappingURL=fallback-params.js.map","import { isAppPageRouteModule } from '../../server/route-modules/checks';\nimport { parseAppRouteSegment } from '../../shared/lib/router/routes/app';\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree';\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from './app/extract-pathname-route-param-segments-from-loader-tree';\nimport { resolveParamValue } from '../../shared/lib/router/utils/resolve-param-value';\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 */ export function encodeParam(value, encoder) {\n let replaceValue;\n if (Array.isArray(value)) {\n replaceValue = value.map(encoder).join('/');\n } else {\n replaceValue = encoder(value);\n }\n return replaceValue;\n}\n/**\n * Normalizes a pathname to a consistent format.\n *\n * @param pathname - The pathname to normalize.\n * @returns The normalized pathname.\n */ export function normalizePathname(pathname) {\n return pathname.replace(/\\\\/g, '/').replace(/(?!^)\\/$/, '');\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 */ export function extractPathnameRouteParamSegments(routeModule, segments, route) {\n // For AppPageRouteModule, use the loaderTree traversal approach\n if (isAppPageRouteModule(routeModule)) {\n const { pathnameRouteParamSegments } = extractPathnameRouteParamSegmentsFromLoaderTree(routeModule.userland.loaderTree, route);\n return pathnameRouteParamSegments;\n }\n return extractPathnameRouteParamSegmentsFromSegments(segments);\n}\nexport function extractPathnameRouteParamSegmentsFromSegments(segments) {\n // TODO: should we consider what values are already present in the page?\n // For AppRouteRouteModule, filter the segments array to get the route params\n // that contribute to the pathname.\n const result = [];\n for (const segment of segments){\n // Skip segments without param info.\n if (!segment.paramName || !segment.paramType) continue;\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 return result;\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 */ export function resolveRouteParamsFromTree(loaderTree, params, route, fallbackRouteParams) {\n // Stack-based traversal with depth tracking\n const stack = [\n {\n tree: loaderTree,\n depth: 0\n }\n ];\n while(stack.length > 0){\n const { tree, depth } = stack.pop();\n const { segment, parallelRoutes } = parseLoaderTree(tree);\n const appSegment = parseAppRouteSegment(segment);\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 ((appSegment == null ? void 0 : appSegment.type) === 'dynamic' && !params.hasOwnProperty(appSegment.param.paramName) && !fallbackRouteParams.some((param)=>param.paramName === appSegment.param.paramName)) {\n const { paramName, paramType } = appSegment.param;\n const paramValue = resolveParamValue(paramName, paramType, depth, route, params);\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({\n paramName,\n 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 (appSegment && appSegment.type !== 'route-group' && appSegment.type !== 'parallel-route') {\n nextDepth++;\n }\n // Add all parallel routes to the stack for processing.\n for (const parallelRoute of Object.values(parallelRoutes)){\n stack.push({\n tree: parallelRoute,\n depth: nextDepth\n });\n }\n }\n}\n\n//# sourceMappingURL=utils.js.map","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 { CACHE_ONE_YEAR_SECONDS } from '../../lib/constants';\nexport function getCacheControlHeader({ revalidate, expire }) {\n const swrHeader = typeof revalidate === 'number' && expire !== undefined && revalidate < expire ? `, stale-while-revalidate=${expire - revalidate}` : '';\n if (revalidate === 0) {\n return 'private, no-cache, no-store, max-age=0, must-revalidate';\n } else if (typeof revalidate === 'number') {\n return `s-maxage=${revalidate}${swrHeader}`;\n }\n return `s-maxage=${CACHE_ONE_YEAR_SECONDS}${swrHeader}`;\n}\n\n//# sourceMappingURL=cache-control.js.map","import { isResSent } from '../shared/lib/utils';\nimport { generateETag } from './lib/etag';\nimport fresh from 'next/dist/compiled/fresh';\nimport { getCacheControlHeader } from './lib/cache-control';\nimport { HTML_CONTENT_TYPE_HEADER } from '../lib/constants';\nexport function sendEtagResponse(req, res, etag) {\n if (etag) {\n /**\n * The server generating a 304 response MUST generate any of the\n * following header fields that would have been sent in a 200 (OK)\n * response to the same request: Cache-Control, Content-Location, Date,\n * ETag, Expires, and Vary. https://tools.ietf.org/html/rfc7232#section-4.1\n */ res.setHeader('ETag', etag);\n }\n if (fresh(req.headers, {\n etag\n })) {\n res.statusCode = 304;\n res.end();\n return true;\n }\n return false;\n}\nexport async function sendRenderResult({ req, res, result, generateEtags, poweredByHeader, cacheControl }) {\n if (isResSent(res)) {\n return;\n }\n if (poweredByHeader && result.contentType === HTML_CONTENT_TYPE_HEADER) {\n res.setHeader('X-Powered-By', 'Next.js');\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheControl && !res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', getCacheControlHeader(cacheControl));\n }\n const payload = result.isDynamic ? null : result.toUnchunkedString();\n if (generateEtags && payload !== null) {\n const etag = generateETag(payload);\n if (sendEtagResponse(req, res, etag)) {\n return;\n }\n }\n if (!res.getHeader('Content-Type') && result.contentType) {\n res.setHeader('Content-Type', result.contentType);\n }\n if (payload) {\n res.setHeader('Content-Length', Buffer.byteLength(payload));\n }\n if (req.method === 'HEAD') {\n res.end(null);\n return;\n }\n if (payload !== null) {\n res.end(payload);\n return;\n }\n // Pipe the render result to the response after we get a writer for it.\n await result.pipeToNodeResponse(res);\n}\n\n//# sourceMappingURL=send-payload.js.map","/**\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 */ export const WEB_VITALS = [\n 'CLS',\n 'FCP',\n 'FID',\n 'INP',\n 'LCP',\n 'TTFB'\n];\n/**\n * Utils\n */ export function execOnce(fn) {\n let used = false;\n let result;\n return (...args)=>{\n if (!used) {\n used = true;\n result = fn(...args);\n }\n return result;\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)=>{\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 = c >= 65 /* A */ && c <= 90 || c >= 97 /* a */ && c <= 122;\n /* z */ if (!isLetter) {\n return false;\n }\n return ABSOLUTE_URL_REGEX.test(url);\n};\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location;\n return `${protocol}//${hostname}${port ? ':' + port : ''}`;\n}\nexport function getURL() {\n const { href } = window.location;\n const origin = getLocationOrigin();\n return href.substring(origin.length);\n}\nexport function getDisplayName(Component) {\n return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';\n}\nexport function isResSent(res) {\n return res.finished || res.headersSent;\n}\nexport function normalizeRepeatedSlashes(url) {\n const urlParts = url.split('?');\n const urlNoQuery = urlParts[0];\n return urlNoQuery// first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/').replace(/\\/\\/+/g, '/') + (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '');\n}\nexport async function loadGetInitialProps(App, ctx) {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(App)}.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 Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E1035\",\n enumerable: false,\n configurable: true\n });\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || ctx.ctx && ctx.ctx.res;\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 {};\n }\n const props = await App.getInitialProps(ctx);\n if (res && isResSent(res)) {\n return props;\n }\n if (!props) {\n const message = `\"${getDisplayName(App)}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`;\n throw Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E1025\",\n enumerable: false,\n configurable: true\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(`${getDisplayName(App)} 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 return props;\n}\nexport const SP = typeof performance !== 'undefined';\nexport const ST = SP && [\n 'mark',\n 'measure',\n 'getEntriesByName'\n].every((method)=>typeof performance[method] === 'function');\nexport class DecodeError extends Error {\n}\nexport class NormalizeError extends Error {\n}\nexport class PageNotFoundError extends Error {\n constructor(page){\n super();\n this.code = 'ENOENT';\n this.name = 'PageNotFoundError';\n this.message = `Cannot find module for page: ${page}`;\n }\n}\nexport class MissingStaticPage extends Error {\n constructor(page, message){\n super();\n this.message = `Failed to load static file for page: ${page} ${message}`;\n }\n}\nexport class MiddlewareNotFoundError extends Error {\n constructor(){\n super();\n this.code = 'ENOENT';\n this.message = `Cannot find the middleware module`;\n }\n}\nexport function stringifyError(error) {\n return JSON.stringify({\n message: error.message,\n stack: error.stack\n });\n}\n\n//# sourceMappingURL=utils.js.map","/**\n * FNV-1a Hash implementation\n * @author Travis Webb (tjwebb) <me@traviswebb.com>\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */ export const fnv1a52 = (str)=>{\n const len = str.length;\n let i = 0, t0 = 0, v0 = 0x2325, t1 = 0, v1 = 0x8422, t2 = 0, v2 = 0x9ce4, t3 = 0, v3 = 0xcbf2;\n while(i < len){\n v0 ^= str.charCodeAt(i++);\n t0 = v0 * 435;\n t1 = v1 * 435;\n t2 = v2 * 435;\n t3 = v3 * 435;\n t2 += v0 << 8;\n t3 += v1 << 8;\n t1 += t0 >>> 16;\n v0 = t0 & 65535;\n t2 += t1 >>> 16;\n v1 = t1 & 65535;\n v3 = t3 + (t2 >>> 16) & 65535;\n v2 = t2 & 65535;\n }\n return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);\n};\nexport const generateETag = (payload, weak = false)=>{\n const prefix = weak ? 'W/\"' : '\"';\n return prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '\"';\n};\n\n//# sourceMappingURL=etag.js.map","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 { getTracer } from '../lib/trace/tracer';\nimport { AppRenderSpan } from '../lib/trace/constants';\nimport { DetachedPromise } from '../../lib/detached-promise';\nimport { scheduleImmediate, atLeastOneTask, waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\nimport { ENCODED_TAGS } from './encoded-tags';\nimport { indexOfUint8Array, isEquivalentUint8Arrays, removeFromUint8Array } from './uint8array-helpers';\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants';\nimport { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, NEXT_RSC_UNION_QUERY } from '../../client/components/app-router-headers';\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param';\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// 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();\nexport function chainStreams(...streams) {\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({\n start (controller) {\n controller.close();\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 const { readable, writable } = new TransformStream();\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, {\n preventClose: true\n });\n let i = 1;\n for(; i < streams.length - 1; i++){\n const nextStream = streams[i];\n promise = promise.then(()=>nextStream.pipeTo(writable, {\n preventClose: true\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 // 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 return readable;\n}\nexport function streamFromString(str) {\n return new ReadableStream({\n start (controller) {\n controller.enqueue(encoder.encode(str));\n controller.close();\n }\n });\n}\nexport function streamFromBuffer(chunk) {\n return new ReadableStream({\n start (controller) {\n controller.enqueue(chunk);\n controller.close();\n }\n });\n}\nasync function streamToChunks(stream) {\n const reader = stream.getReader();\n const chunks = [];\n while(true){\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n }\n return chunks;\n}\nfunction concatUint8Arrays(chunks) {\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}\nexport async function webstreamToUint8Array(stream) {\n return concatUint8Arrays(await streamToChunks(stream));\n}\nfunction webToReadable(stream) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw Object.defineProperty(new Error('webToReadable cannot be used in the edge runtime'), \"__NEXT_ERROR_CODE\", {\n value: \"E1148\",\n enumerable: false,\n configurable: true\n });\n } else {\n let Readable;\n if (process.env.TURBOPACK) {\n Readable = require('node:stream').Readable;\n } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') {\n Readable = __non_webpack_require__('node:stream').Readable;\n } else {\n Readable = require('node:stream').Readable;\n }\n if (stream instanceof Readable) {\n return stream;\n }\n return Readable.fromWeb(stream);\n }\n}\nexport async function nodestreamToUint8Array(stream) {\n const chunks = [];\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}\nexport async function streamToUint8Array(stream) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n // Edge runtime always uses web streams\n return webstreamToUint8Array(stream);\n } else {\n let Readable;\n if (process.env.TURBOPACK) {\n Readable = require('node:stream').Readable;\n } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') {\n Readable = __non_webpack_require__('node:stream').Readable;\n } else {\n Readable = require('node:stream').Readable;\n }\n if (stream instanceof Readable) {\n return nodestreamToUint8Array(stream);\n }\n return webstreamToUint8Array(stream);\n }\n}\nexport async function streamToBuffer(stream) {\n return Buffer.concat(await streamToChunks(stream));\n}\nexport async function streamToString(stream, signal) {\n const decoder = new TextDecoder('utf-8', {\n fatal: true\n });\n let string = '';\n for await (const chunk of stream){\n if (signal == null ? void 0 : signal.aborted) {\n return string;\n }\n string += decoder.decode(chunk, {\n stream: true\n });\n }\n string += decoder.decode();\n return string;\n}\nexport function createBufferedTransformStream(options = {}) {\n const { maxBufferByteLength = Infinity } = options;\n let bufferedChunks = [];\n let bufferByteLength = 0;\n let pending;\n const flush = (controller)=>{\n try {\n if (bufferedChunks.length === 0) {\n return;\n }\n const chunk = new Uint8Array(bufferByteLength);\n let copiedBytes = 0;\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 const scheduleFlush = (controller)=>{\n if (pending) {\n return;\n }\n const detached = new DetachedPromise();\n pending = detached;\n scheduleImmediate(()=>{\n try {\n flush(controller);\n } finally{\n pending = undefined;\n detached.resolve();\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 if (bufferByteLength >= maxBufferByteLength) {\n flush(controller);\n } else {\n scheduleFlush(controller);\n }\n },\n flush () {\n return pending == null ? void 0 : pending.promise;\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// }\nexport function renderToInitialFizzStream({ ReactDOMServer, element, streamOptions }) {\n return getTracer().trace(AppRenderSpan.renderToReadableStream, async ()=>ReactDOMServer.renderToReadableStream(element, streamOptions));\n}\nexport function createMetadataTransformStream(insert) {\n let chunkIndex = -1;\n let isMarkRemoved = false;\n return new TransformStream({\n async transform (chunk, controller) {\n let iconMarkIndex = -1;\n let closedHeadIndex = -1;\n chunkIndex++;\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 // 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 // Remove the icon mark from the chunk.\n replaced.set(chunk.subarray(0, iconMarkIndex));\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex);\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(chunk.length - iconMarkLength + insertionLength);\n replaced.set(chunk.subarray(0, iconMarkIndex));\n replaced.set(encodedInsertion, iconMarkIndex);\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);\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(chunk.length - iconMarkLength + insertionLength);\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 // Set the rest of the chunk after the icon mark.\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);\n chunk = replaced;\n isMarkRemoved = true;\n }\n controller.enqueue(chunk);\n }\n });\n}\nexport function createHeadInsertionTransformStream(insert) {\n let inserted = false;\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 return new TransformStream({\n async transform (chunk, controller) {\n hasBytes = true;\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(chunk.length + encodedInsertion.length);\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(chunk.slice(index), index + encodedInsertion.length);\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}\nasync function createClientResumeScriptInsertionTransformStream() {\n const segmentPath = '/_full';\n const cacheBustingHeader = await computeCacheBustingSearchParam('1', '/_full', undefined, 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 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(chunk, ENCODED_TAGS.CLOSED.HEAD);\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 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(chunk.length + encodedInsertion.length);\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(chunk.slice(headClosingTagIndex), headClosingTagIndex + encodedInsertion.length);\n controller.enqueue(insertedHeadContent);\n didAlreadyInsert = true;\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(suffix) {\n let flushed = false;\n let pending;\n const flush = (controller)=>{\n const detached = new DetachedPromise();\n pending = detached;\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 return new TransformStream({\n transform (chunk, controller) {\n controller.enqueue(chunk);\n // If we've already flushed, we're done.\n if (flushed) return;\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 // Flush now.\n controller.enqueue(encoder.encode(suffix));\n }\n });\n}\nexport function createFlightDataInjectionTransformStream(stream, delayDataUntilFirstHtmlChunk) {\n let htmlStreamFinished = false;\n let pull = null;\n let donePulling = false;\n function startOrContinuePulling(controller) {\n if (!pull) {\n pull = startPulling(controller);\n }\n return pull;\n }\n async function startPulling(controller) {\n const reader = stream.getReader();\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 // 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 try {\n while(true){\n const { done, value } = await reader.read();\n if (done) {\n donePulling = true;\n return;\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 return new TransformStream({\n start (controller) {\n if (!delayDataUntilFirstHtmlChunk) {\n startOrContinuePulling(controller);\n }\n },\n transform (chunk, controller) {\n controller.enqueue(chunk);\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}\nexport const CLOSE_TAG = '</body></html>';\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 */ export function createMoveSuffixStream() {\n let foundSuffix = false;\n return new TransformStream({\n transform (chunk, controller) {\n if (foundSuffix) {\n return controller.enqueue(chunk);\n }\n const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML);\n if (index > -1) {\n foundSuffix = true;\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 // Write out the part before the suffix.\n const before = chunk.slice(0, index);\n controller.enqueue(before);\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(index + ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);\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}\nfunction createStripDocumentClosingTagsTransform() {\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 (isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML) || isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) || isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)) {\n // the entire chunk is the closing tags; return without enqueueing anything.\n return;\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 controller.enqueue(chunk);\n }\n });\n}\nexport function createHtmlDataDplIdTransformStream(dplId) {\n let didTransform = false;\n return new TransformStream({\n transform (chunk, controller) {\n if (didTransform) {\n controller.enqueue(chunk);\n return;\n }\n const htmlTagIndex = indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML);\n if (htmlTagIndex === -1) {\n controller.enqueue(chunk);\n return;\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(chunk.length + encodedAttribute.length);\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(chunk.subarray(insertionPoint), insertionPoint + encodedAttribute.length);\n controller.enqueue(modifiedChunk);\n didTransform = true;\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 */ export function createRootLayoutValidatorStream() {\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 (!foundHtml && indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML) > -1) {\n foundHtml = true;\n }\n if (!foundBody && indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.BODY) > -1) {\n foundBody = true;\n }\n controller.enqueue(chunk);\n },\n flush (controller) {\n const missingTags = [];\n if (!foundHtml) missingTags.push('html');\n if (!foundBody) missingTags.push('body');\n if (!missingTags.length) return;\n controller.enqueue(encoder.encode(`<html id=\"__next_error__\">\n <template\n data-next-error-message=\"Missing ${missingTags.map((c)=>`<${c}>`).join(missingTags.length > 1 ? ' and ' : '')} 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}\nexport function chainTransformers(readable, transformers) {\n let stream = readable;\n for (const transformer of transformers){\n if (!transformer) continue;\n stream = stream.pipeThrough(transformer);\n }\n return stream;\n}\nexport async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration, deploymentId, getServerInsertedHTML, getServerInsertedMetadata, validateRootLayout }) {\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 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 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 // Transform metadata\n createMetadataTransformStream(getServerInsertedMetadata),\n // Insert suffix content\n suffixUnclosed != null && suffixUnclosed.length > 0 ? createDeferredSuffixStream(suffixUnclosed) : null,\n // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n inlinedDataStream ? createFlightDataInjectionTransformStream(inlinedDataStream, true) : null,\n // Validate the root layout for missing html or body tags\n validateRootLayout ? createRootLayoutValidatorStream() : null,\n // Close tags should always be deferred to the end\n createMoveSuffixStream(),\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}\nexport async function continueDynamicPrerender(prerenderStream, { getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {\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}\nexport async function continueStaticPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {\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}\nexport async function continueStaticFallbackPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {\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}\nexport async function continueDynamicHTMLResume(renderStream, { delayDataUntilFirstHtmlChunk, inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {\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(inlinedDataStream, delayDataUntilFirstHtmlChunk),\n // Close tags should always be deferred to the end\n createMoveSuffixStream()\n ]);\n}\nexport function createDocumentClosingStream() {\n return streamFromString(CLOSE_TAG);\n}\n// ---------------------------------------------------------------------------\n// Runtime prefetch transform (Web streams)\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 */ export function createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime) {\n const enc = new TextEncoder();\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 let currentChunk = null;\n let found = false;\n function processChunk(controller, nextChunk) {\n if (found) {\n if (nextChunk) {\n controller.enqueue(nextChunk);\n }\n return;\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 ;\n return;\n }\n let currentIndex = currentChunk.indexOf(first);\n // check the current candidate match if it is within the bounds of our search space for the currentChunk\n candidateLoop: while(-1 < currentIndex && currentIndex < exclusiveUpperBound){\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 = candidateIndex < currentChunk.length ? currentChunk[candidateIndex] : 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 = 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 // Advance to the next chunk\n currentChunk = nextChunk;\n }\n return new TransformStream({\n transform (chunk, controller) {\n processChunk(controller, chunk);\n },\n flush (controller) {\n processChunk(controller, null);\n }\n });\n}\n\n//# sourceMappingURL=node-web-streams-helper.js.map","import { getRequestMeta } from '../../../request-meta';\nimport { fromNodeOutgoingHttpHeaders } from '../../utils';\nimport { NextRequest } from '../request';\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers';\nexport const ResponseAbortedName = 'ResponseAborted';\nexport class ResponseAborted extends Error {\n constructor(...args){\n super(...args), this.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 */ export function createAbortController(response) {\n const controller = new AbortController();\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 controller.abort(new ResponseAborted());\n });\n return controller;\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 */ export function signalFromNodeResponse(response) {\n const { errored, destroyed } = response;\n if (errored || destroyed) {\n return AbortSignal.abort(errored ?? new ResponseAborted());\n }\n const { signal } = createAbortController(response);\n return signal;\n}\nexport class NextRequestAdapter {\n static fromBaseNextRequest(request, signal) {\n if (// 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' && isWebNextRequest(request)) {\n return NextRequestAdapter.fromWebNextRequest(request);\n } else if (// 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' && isNodeNextRequest(request)) {\n return NextRequestAdapter.fromNodeNextRequest(request, signal);\n } else {\n throw Object.defineProperty(new Error('Invariant: Unsupported NextRequest type'), \"__NEXT_ERROR_CODE\", {\n value: \"E345\",\n enumerable: false,\n configurable: true\n });\n }\n }\n static fromNodeNextRequest(request, signal) {\n // HEAD and GET requests can not have a body.\n let body = 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 let 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 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 // body can not be passed if request was aborted\n // or we get a Request body was disturbed error\n ...signal.aborted ? {} : {\n body\n }\n });\n }\n static fromWebNextRequest(request) {\n // HEAD and GET requests can not have a body.\n let body = null;\n if (request.method !== 'GET' && request.method !== 'HEAD') {\n body = request.body;\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 // 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 body\n }\n });\n }\n}\n\n//# sourceMappingURL=next-request.js.map","import { parsePath } from './parse-path';\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */ export function addPathPrefix(path, prefix) {\n if (!path.startsWith('/') || !prefix) {\n return path;\n }\n const { pathname, query, hash } = parsePath(path);\n return `${prefix}${pathname}${query}${hash}`;\n}\n\n//# sourceMappingURL=add-path-prefix.js.map","/**\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 */ const cache = new WeakMap();\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 */ export function normalizeLocalePath(pathname, locales) {\n // If locales is undefined, return the pathname as is.\n if (!locales) return {\n 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 let detectedLocale;\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 // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return {\n pathname\n };\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase();\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 {\n pathname\n };\n // Return the case-sensitive locale.\n detectedLocale = locales[index];\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/';\n return {\n pathname,\n detectedLocale\n };\n}\n\n//# sourceMappingURL=normalize-locale-path.js.map","// Combined load times for loading client components\nlet clientComponentLoadStart = 0;\nlet clientComponentLoadTimes = 0;\nlet clientComponentLoadCount = 0;\nexport function wrapClientComponentLoader(ComponentMod, isTracingEnabled) {\n if (!('performance' in globalThis) || !process.env.NEXT_OTEL_PERFORMANCE_PREFIX && !isTracingEnabled) {\n return ComponentMod.__next_app__;\n }\n return {\n require: (...args)=>{\n const startTime = performance.now();\n if (clientComponentLoadStart === 0) {\n clientComponentLoadStart = startTime;\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}\nexport function getClientComponentLoaderMetrics(options = {}) {\n const metrics = clientComponentLoadStart === 0 ? undefined : {\n clientComponentLoadStart,\n clientComponentLoadTimes,\n clientComponentLoadCount\n };\n if (options.reset) {\n clientComponentLoadStart = 0;\n clientComponentLoadTimes = 0;\n clientComponentLoadCount = 0;\n }\n return metrics;\n}\n\n//# sourceMappingURL=client-component-renderer-logger.js.map","export function detectDomainLocale(domainItems, hostname, detectedLocale) {\n if (!domainItems) return;\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase();\n }\n for (const item of domainItems){\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase();\n if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale)=>locale.toLowerCase() === detectedLocale)) {\n return item;\n }\n }\n}\n\n//# sourceMappingURL=detect-domain-locale.js.map","export class PageSignatureError extends Error {\n constructor({ page }){\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `);\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1177\",\n enumerable: false,\n configurable: true\n });\n }\n}\nexport class RemovedPageError extends Error {\n constructor(){\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `);\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1178\",\n enumerable: false,\n configurable: true\n });\n }\n}\nexport class RemovedUAError extends Error {\n constructor(){\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `);\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1172\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=error.js.map","import { addPathPrefix } from './add-path-prefix';\nimport { pathHasPrefix } from './path-has-prefix';\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 */ export function addLocale(path, locale, defaultLocale, ignorePrefix) {\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 const lower = path.toLowerCase();\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 // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`);\n}\n\n//# sourceMappingURL=add-locale.js.map","import { normalizeLocalePath } from '../../i18n/normalize-locale-path';\nimport { removePathPrefix } from './remove-path-prefix';\nimport { pathHasPrefix } from './path-has-prefix';\nexport function getNextPathnameInfo(pathname, options) {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {};\n const info = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash\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 if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) {\n const paths = info.pathname.replace(/^\\/_next\\/data\\//, '').replace(/\\.json$/, '').split('/');\n const buildId = paths[0];\n info.buildId = buildId;\n pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/';\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 // 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 ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales);\n info.locale = result.detectedLocale;\n info.pathname = result.pathname ?? info.pathname;\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales);\n if (result.detectedLocale) {\n info.locale = result.detectedLocale;\n }\n }\n }\n return info;\n}\n\n//# sourceMappingURL=get-next-pathname-info.js.map","import { hexHash } from '../../hash';\nconst CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12;\nconst textEncoder = new TextEncoder();\nfunction encodeCacheBustingSearchParam(bytes) {\n let binary = '';\n for(let i = 0; i < bytes.length; i++){\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\nfunction normalizeCacheBustingInput(value) {\n if (value === undefined) {\n return '0';\n }\n return Array.isArray(value) ? value.join(',') : value;\n}\nfunction createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {\n if ((prefetchHeader === undefined || prefetchHeader === '0') && segmentPrefetchHeader === undefined && stateTreeHeader === undefined && nextUrlHeader === undefined) {\n return null;\n }\n return [\n prefetchHeader ?? '0',\n normalizeCacheBustingInput(segmentPrefetchHeader),\n normalizeCacheBustingInput(stateTreeHeader),\n normalizeCacheBustingInput(nextUrlHeader)\n ].join(',');\n}\nasync function computeCacheBustingSearchParamFromInput(input) {\n // Truncate SHA-256 to 96 bits to keep `_rsc` compact\n const digest = await globalThis.crypto.subtle.digest('SHA-256', textEncoder.encode(input));\n return encodeCacheBustingSearchParam(new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES));\n}\nexport async function computeCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {\n const input = createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader);\n if (input === null) {\n return '';\n }\n return computeCacheBustingSearchParamFromInput(input);\n}\nexport function computeLegacyCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {\n const input = createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader);\n if (input === null) {\n return '';\n }\n return hexHash(input);\n}\n\n//# sourceMappingURL=cache-busting-search-param.js.map","import { chainStreams, streamFromBuffer, streamFromString, streamToString } from './stream-utils/node-web-streams-helper';\nimport { isAbortError, pipeToNodeResponse, pipeNodeReadableToNodeResponse } from './pipe-readable';\nimport { InvariantError } from '../shared/lib/invariant-error';\nfunction isNodeReadable(value) {\n return value !== null && typeof value === 'object' && typeof value.pipe === 'function' && typeof value.on === 'function' && !(value instanceof ReadableStream);\n}\nexport default class RenderResult {\n static #_ = /**\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 */ this.EMPTY = new RenderResult(null, {\n metadata: {},\n contentType: null\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 */ static fromStatic(value, contentType) {\n return new RenderResult(value, {\n metadata: {},\n contentType\n });\n }\n constructor(response, { contentType, waitUntil, metadata }){\n this.response = response;\n this.contentType = contentType;\n this.metadata = metadata;\n this.waitUntil = waitUntil;\n }\n assignMetadata(metadata) {\n Object.assign(this.metadata, metadata);\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 */ get isNull() {\n return this.response === null;\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 */ get isDynamic() {\n return typeof this.response !== 'string';\n }\n toUnchunkedString(stream = false) {\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 if (typeof this.response !== 'string') {\n if (!stream) {\n throw Object.defineProperty(new InvariantError('dynamic responses cannot be unchunked. This is a bug in Next.js'), \"__NEXT_ERROR_CODE\", {\n value: \"E732\",\n enumerable: false,\n configurable: true\n });\n }\n return streamToString(this.readable);\n }\n return this.response;\n }\n /**\n * Returns a readable stream of the response.\n */ get readable() {\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({\n start (controller) {\n controller.close();\n }\n });\n }\n if (typeof this.response === 'string') {\n return streamFromString(this.response);\n }\n if (Buffer.isBuffer(this.response)) {\n return streamFromBuffer(this.response);\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 if (isNodeReadable(this.response)) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw Object.defineProperty(new InvariantError('Node.js Readable cannot be converted to a web stream in the edge runtime'), \"__NEXT_ERROR_CODE\", {\n value: \"E1150\",\n enumerable: false,\n configurable: true\n });\n } else {\n let Readable;\n if (process.env.TURBOPACK) {\n Readable = require('node:stream').Readable;\n } else {\n Readable = __non_webpack_require__('node:stream').Readable;\n }\n return Readable.toWeb(this.response);\n }\n }\n return this.response;\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 */ coerce() {\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 if (typeof this.response === 'string') {\n return [\n streamFromString(this.response)\n ];\n } else if (Array.isArray(this.response)) {\n return this.response;\n } else if (Buffer.isBuffer(this.response)) {\n return [\n streamFromBuffer(this.response)\n ];\n } else if (isNodeReadable(this.response)) {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw Object.defineProperty(new InvariantError('Node.js Readable cannot be converted to a web stream in the edge runtime'), \"__NEXT_ERROR_CODE\", {\n value: \"E1150\",\n enumerable: false,\n configurable: true\n });\n } else {\n let Readable;\n if (process.env.TURBOPACK) {\n Readable = require('node:stream').Readable;\n } else {\n Readable = __non_webpack_require__('node:stream').Readable;\n }\n return [\n Readable.toWeb(this.response)\n ];\n }\n } else {\n return [\n 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 */ pipeThrough(transform) {\n this.response = this.readable.pipeThrough(transform);\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 */ unshift(readable) {\n // Coerce the response to an array of streams.\n this.response = this.coerce();\n // Add the new stream to the start of the array.\n this.response.unshift(readable);\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 */ push(readable) {\n // Coerce the response to an array of streams.\n this.response = this.coerce();\n // Add the new stream to the end of the array.\n this.response.push(readable);\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 */ async pipeTo(writable) {\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 // 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 // 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 return;\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 * 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 */ async pipeToNodeResponse(res) {\n if (this.response !== null && typeof this.response !== 'string' && !Buffer.isBuffer(this.response) && !Array.isArray(this.response) && isNodeReadable(this.response)) {\n await pipeNodeReadableToNodeResponse(this.response, res, this.waitUntil);\n return;\n }\n await pipeToNodeResponse(this.readable, res, this.waitUntil);\n }\n}\n\n//# sourceMappingURL=render-result.js.map","import { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { RemovedUAError, RemovedPageError } from '../error';\nimport { RequestCookies } from './cookies';\nexport const INTERNALS = Symbol('internal request');\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 */ export class NextRequest extends Request {\n constructor(input, init = {}){\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n validateURL(url);\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 if (input instanceof Request) super(input, init);\n else super(url, init);\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 ? url : nextUrl.toString()\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 get cookies() {\n return this[INTERNALS].cookies;\n }\n get nextUrl() {\n return this[INTERNALS].nextUrl;\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 */ get page() {\n throw new RemovedPageError();\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 */ get ua() {\n throw new RemovedUAError();\n }\n get url() {\n return this[INTERNALS].url;\n }\n}\n\n//# sourceMappingURL=request.js.map","import { ResponseAbortedName, createAbortController } 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';\nexport function isAbortError(e) {\n return (e == null ? void 0 : e.name) === 'AbortError' || (e == null ? void 0 : e.name) === ResponseAbortedName;\n}\nconst HAS_CLIENT_COMPONENT_METRICS_ENABLED = 'performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nfunction createWriterFromResponse(res, waitUntilForEnd) {\n let started = false;\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();\n function onDrain() {\n drained.resolve();\n }\n res.on('drain', onDrain);\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 // 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();\n res.once('finish', ()=>{\n finished.resolve();\n });\n // Create a writable stream that will write to the response.\n return new WritableStream({\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 if (HAS_CLIENT_COMPONENT_METRICS_ENABLED) {\n const metrics = getClientComponentLoaderMetrics();\n if (metrics) {\n performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`, {\n start: metrics.clientComponentLoadStart,\n end: metrics.clientComponentLoadStart + metrics.clientComponentLoadTimes\n });\n }\n }\n res.flushHeaders();\n getTracer().trace(NextNodeServerSpan.startResponse, {\n spanName: 'start response'\n }, ()=>undefined);\n }\n try {\n const ok = res.write(chunk);\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 // 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 // Reset the drained promise so that we can wait for the next drain event.\n drained = new DetachedPromise();\n }\n } catch (err) {\n res.end();\n throw Object.defineProperty(new Error('failed to write chunk to response', {\n cause: err\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E321\",\n enumerable: false,\n configurable: true\n });\n }\n },\n abort: (err)=>{\n if (res.writableFinished) return;\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 if (res.writableFinished) return;\n res.end();\n return finished.promise;\n }\n });\n}\nexport async function pipeToNodeResponse(readable, res, waitUntilForEnd) {\n try {\n // If the response has already errored, then just return now.\n const { errored, destroyed } = res;\n if (errored || destroyed) return;\n // Create a new AbortController so that we can abort the readable if the\n // client disconnects.\n const controller = createAbortController(res);\n const writer = createWriterFromResponse(res, waitUntilForEnd);\n await readable.pipeTo(writer, {\n signal: controller.signal\n });\n } catch (err) {\n // If this isn't related to an abort error, re-throw it.\n if (isAbortError(err)) return;\n throw Object.defineProperty(new Error('failed to pipe response', {\n cause: err\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E180\",\n enumerable: false,\n configurable: true\n });\n }\n}\nexport async function pipeNodeReadableToNodeResponse(readable, res, waitUntilForEnd) {\n try {\n const { errored, destroyed } = res;\n if (errored || destroyed) return;\n let started = false;\n const finished = new DetachedPromise();\n res.once('close', ()=>{\n readable.destroy();\n finished.resolve();\n });\n readable.on('data', (chunk)=>{\n if (!started) {\n started = true;\n if ('performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX) {\n const metrics = getClientComponentLoaderMetrics();\n if (metrics) {\n performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`, {\n start: metrics.clientComponentLoadStart,\n end: metrics.clientComponentLoadStart + metrics.clientComponentLoadTimes\n });\n }\n }\n res.flushHeaders();\n getTracer().trace(NextNodeServerSpan.startResponse, {\n spanName: 'start response'\n }, ()=>undefined);\n }\n const ok = res.write(chunk);\n if ('flush' in res && typeof res.flush === 'function') {\n res.flush();\n }\n if (!ok) {\n readable.pause();\n res.once('drain', ()=>{\n readable.resume();\n });\n }\n });\n readable.on('end', async ()=>{\n if (waitUntilForEnd) {\n await waitUntilForEnd;\n }\n if (!res.writableFinished) {\n res.end();\n }\n finished.resolve();\n });\n readable.on('error', (err)=>{\n if (isAbortError(err)) {\n finished.resolve();\n return;\n }\n res.destroy(err);\n finished.resolve();\n });\n await finished.promise;\n } catch (err) {\n if (isAbortError(err)) return;\n throw Object.defineProperty(new Error('failed to pipe response', {\n cause: err\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E180\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=pipe-readable.js.map","import { 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';\nconst REGEX_LOCALHOST_HOSTNAME = /^(?:127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)$/;\nfunction parseURL(url, base) {\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}\nconst Internal = Symbol('NextURLInternal');\nexport class NextURL {\n constructor(input, baseOrOpts, opts){\n let base;\n let options;\n if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') {\n base = baseOrOpts;\n options = opts || {};\n } else {\n options = opts || baseOrOpts || {};\n }\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: ''\n };\n this.analyze();\n }\n analyze() {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;\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 const hostname = getHostname(this[Internal].url, this[Internal].options.headers);\n this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);\n const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);\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 formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash\n });\n }\n formatSearch() {\n return this[Internal].url.search;\n }\n get buildId() {\n return this[Internal].buildId;\n }\n set buildId(buildId) {\n this[Internal].buildId = buildId;\n }\n get locale() {\n return this[Internal].locale ?? '';\n }\n set locale(locale) {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;\n if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {\n throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale \"${locale}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E597\",\n enumerable: false,\n configurable: true\n });\n }\n this[Internal].locale = locale;\n }\n get defaultLocale() {\n return this[Internal].defaultLocale;\n }\n get domainLocale() {\n return this[Internal].domainLocale;\n }\n get searchParams() {\n return this[Internal].url.searchParams;\n }\n get host() {\n return this[Internal].url.host;\n }\n set host(value) {\n this[Internal].url.host = value;\n }\n get hostname() {\n return this[Internal].url.hostname;\n }\n set hostname(value) {\n this[Internal].url.hostname = value;\n }\n get port() {\n return this[Internal].url.port;\n }\n set port(value) {\n this[Internal].url.port = value;\n }\n get protocol() {\n return this[Internal].url.protocol;\n }\n set protocol(value) {\n this[Internal].url.protocol = value;\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 set href(url) {\n this[Internal].url = parseURL(url);\n this.analyze();\n }\n get origin() {\n return this[Internal].url.origin;\n }\n get pathname() {\n return this[Internal].url.pathname;\n }\n set pathname(value) {\n this[Internal].url.pathname = value;\n }\n get hash() {\n return this[Internal].url.hash;\n }\n set hash(value) {\n this[Internal].url.hash = value;\n }\n get search() {\n return this[Internal].url.search;\n }\n set search(value) {\n this[Internal].url.search = value;\n }\n get password() {\n return this[Internal].url.password;\n }\n set password(value) {\n this[Internal].url.password = value;\n }\n get username() {\n return this[Internal].url.username;\n }\n set username(value) {\n this[Internal].url.username = value;\n }\n get basePath() {\n return this[Internal].basePath;\n }\n set basePath(value) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`;\n }\n toString() {\n return this.href;\n }\n toJSON() {\n return this.href;\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 clone() {\n return new NextURL(String(this), this[Internal].options);\n }\n}\n\n//# sourceMappingURL=next-url.js.map","import { removeTrailingSlash } from './remove-trailing-slash';\nimport { addPathPrefix } from './add-path-prefix';\nimport { addPathSuffix } from './add-path-suffix';\nimport { addLocale } from './add-locale';\nexport function formatNextPathnameInfo(info) {\n let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix);\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname);\n }\n if (info.buildId) {\n pathname = addPathSuffix(addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json');\n }\n pathname = addPathPrefix(pathname, info.basePath);\n return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname);\n}\n\n//# sourceMappingURL=format-next-pathname-info.js.map","/**\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 */ export function getHostname(parsed, headers) {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname;\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 return hostname.toLowerCase();\n}\n\n//# sourceMappingURL=get-hostname.js.map","/**\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 */ export class DetachedPromise {\n constructor(){\n let resolve;\n let reject;\n // Create the promise and assign the resolvers to the object.\n this.promise = new Promise((res, rej)=>{\n resolve = res;\n reject = rej;\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\n//# sourceMappingURL=detached-promise.js.map","import { parsePath } from './parse-path';\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 */ export function addPathSuffix(path, suffix) {\n if (!path.startsWith('/') || !suffix) {\n return path;\n }\n const { pathname, query, hash } = parsePath(path);\n return `${pathname}${suffix}${query}${hash}`;\n}\n\n//# sourceMappingURL=add-path-suffix.js.map","/**\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 */ export function removeTrailingSlash(route) {\n return route.charCodeAt(route.length - 1) === 47 && route.length > 1 ? route.slice(0, -1) : route;\n}\n\n//# sourceMappingURL=remove-trailing-slash.js.map","import { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants';\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 */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) {\n const headers = new Headers();\n for (let [key, value] of Object.entries(nodeHeaders)){\n const values = Array.isArray(value) ? value : [\n value\n ];\n for (let v of values){\n if (typeof v === 'undefined') continue;\n if (typeof v === 'number') {\n v = v.toString();\n }\n headers.append(key, v);\n }\n }\n return headers;\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*/ export function splitCookiesString(cookiesString) {\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 // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while(pos < cookiesString.length && notSpecialChar()){\n pos += 1;\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 if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\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 */ export function toNodeOutgoingHttpHeaders(headers) {\n const nodeHeaders = {};\n const cookies = [];\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 * Validate the correctness of a user-provided URL.\n */ export function validateURL(url) {\n try {\n return String(new URL(String(url)));\n } catch (error) {\n throw Object.defineProperty(new Error(`URL is malformed \"${String(url)}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {\n cause: error\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E61\",\n enumerable: false,\n configurable: true\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 */ export function normalizeNextQueryParam(key) {\n const prefixes = [\n NEXT_QUERY_PARAM_PREFIX,\n NEXT_INTERCEPTION_MARKER_PREFIX\n ];\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\n//# sourceMappingURL=utils.js.map","/**\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 * 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 */ export const isWebNextRequest = (req)=>process.env.NEXT_RUNTIME === 'edge';\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 */ export const isWebNextResponse = (res)=>process.env.NEXT_RUNTIME === 'edge';\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 */ export const isNodeNextRequest = (req)=>process.env.NEXT_RUNTIME !== 'edge';\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 */ export const isNodeNextResponse = (res)=>process.env.NEXT_RUNTIME !== 'edge';\n\n//# sourceMappingURL=helpers.js.map","const INSTANT_VALIDATION_ERROR_DIGEST = 'INSTANT_VALIDATION_ERROR';\n/** Check if an error is an exhaustive samples validation error (by digest). */ export function isInstantValidationError(err) {\n return !!(err && typeof err === 'object' && err instanceof Error && err.digest === INSTANT_VALIDATION_ERROR_DIGEST);\n}\nexport class InstantValidationError extends Error {\n constructor(...args){\n super(...args), this.digest = INSTANT_VALIDATION_ERROR_DIGEST;\n }\n}\n\n//# sourceMappingURL=instant-validation-error.js.map","export class ReflectAdapter {\n static get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n static set(target, prop, value, receiver) {\n return Reflect.set(target, prop, value, receiver);\n }\n static has(target, prop) {\n return Reflect.has(target, prop);\n }\n static deleteProperty(target, prop) {\n return Reflect.deleteProperty(target, prop);\n }\n}\n\n//# sourceMappingURL=reflect.js.map","import { RequestCookies } from '../../web/spec-extension/cookies';\nimport { RequestCookiesAdapter } from '../../web/spec-extension/adapters/request-cookies';\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers';\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';\nexport function createValidationSampleTracking() {\n return {\n missingSampleErrors: []\n };\n}\nfunction getExpectedSampleTracking() {\n let validationSampleTracking = 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 = 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;\n }\n }\n if (!validationSampleTracking) {\n throw Object.defineProperty(new InvariantError('Expected to have a workUnitStore that provides validationSampleTracking'), \"__NEXT_ERROR_CODE\", {\n value: \"E1110\",\n enumerable: false,\n configurable: true\n });\n }\n return validationSampleTracking;\n}\nexport function trackMissingSampleError(error) {\n const validationSampleTracking = getExpectedSampleTracking();\n validationSampleTracking.missingSampleErrors.push(error);\n}\nexport function trackMissingSampleErrorAndThrow(error) {\n // TODO(instant-validation-build): this should abort the render\n trackMissingSampleError(error);\n throw error;\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 */ export function createCookiesFromSample(sampleCookies, route) {\n const declaredNames = new Set();\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 const sealed = RequestCookiesAdapter.seal(cookies);\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 = function(name) {\n if (!declaredNames.has(name)) {\n trackMissingSampleErrorAndThrow(createMissingCookieSampleError(route, name));\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 = function(nameOrCookie) {\n let name;\n if (typeof nameOrCookie === 'string') {\n name = nameOrCookie;\n } else if (nameOrCookie && typeof nameOrCookie === 'object' && typeof nameOrCookie.name === 'string') {\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 if (!declaredNames.has(name)) {\n trackMissingSampleErrorAndThrow(createMissingCookieSampleError(route, name));\n }\n return originalMethod.call(target, name);\n };\n return wrappedMethod;\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 return Reflect.get(target, prop, receiver);\n }\n });\n}\nfunction createMissingCookieSampleError(route, name) {\n return Object.defineProperty(new InstantValidationError(`Route \"${route}\" accessed cookie \"${name}\" which is not defined in the \\`unstable_samples\\` ` + `of \\`instant\\`. Add it to the sample's \\`cookies\\` array, ` + `or \\`{ name: \"${name}\", value: null }\\` if it should be absent.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1346\",\n enumerable: false,\n configurable: true\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 */ export function createHeadersFromSample(rawSampleHeaders, sampleCookies, route) {\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 ? [\n ...rawSampleHeaders\n ] : [];\n if (sampleHeaders.find(([name])=>name.toLowerCase() === 'cookie')) {\n throw Object.defineProperty(new InstantValidationError('Invalid sample: Defining cookies via a \"cookie\" header is not supported. Use `cookies: [{ name: ..., value: ... }]` instead.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1111\",\n enumerable: false,\n configurable: true\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 const declaredNames = new Set();\n const headersInit = {};\n for (const [name, value] of sampleHeaders){\n declaredNames.add(name.toLowerCase());\n if (value !== null) {\n headersInit[name.toLowerCase()] = value;\n }\n }\n const sealed = HeadersAdapter.seal(HeadersAdapter.from(headersInit));\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 = function(rawName) {\n const name = rawName.toLowerCase();\n if (!declaredNames.has(name)) {\n trackMissingSampleErrorAndThrow(Object.defineProperty(new InstantValidationError(`Route \"${route}\" accessed header \"${name}\" which is not defined in the \\`unstable_samples\\` ` + `of \\`instant\\`. Add it to the sample's \\`headers\\` array, ` + `or \\`[\"${name}\", null]\\` if it should be absent.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1348\",\n enumerable: false,\n configurable: true\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.call(target, name);\n };\n return patchedMethod;\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n}\n/**\n * Creates a DraftModeProvider that always returns isEnabled: false.\n */ export function createDraftModeForValidation() {\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 Object.defineProperty(new Error('Draft mode cannot be enabled during build-time instant validation.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1092\",\n enumerable: false,\n configurable: true\n });\n },\n disable () {\n throw Object.defineProperty(new Error('Draft mode cannot be disabled during build-time instant validation.'), \"__NEXT_ERROR_CODE\", {\n value: \"E1094\",\n enumerable: false,\n configurable: true\n });\n }\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 */ export function createExhaustiveParamsProxy(underlyingParams, declaredParamNames, route) {\n return new Proxy(underlyingParams, {\n get (target, prop, receiver) {\n if (typeof prop === 'string' && !wellKnownProperties.has(prop) && // 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 && !declaredParamNames.has(prop)) {\n trackMissingSampleErrorAndThrow(Object.defineProperty(new InstantValidationError(`Route \"${route}\" accessed param \"${prop}\" which is not defined in the \\`unstable_samples\\` ` + `of \\`instant\\`. Add it to the sample's \\`params\\` object.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1349\",\n enumerable: false,\n configurable: true\n }));\n }\n return Reflect.get(target, prop, receiver);\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 */ export function createExhaustiveSearchParamsProxy(searchParams, declaredSearchParamNames, route) {\n return new Proxy(searchParams, {\n get (target, prop, receiver) {\n if (typeof prop === 'string' && !wellKnownProperties.has(prop) && !declaredSearchParamNames.has(prop)) {\n trackMissingSampleErrorAndThrow(createMissingSearchParamSampleError(route, prop));\n }\n return Reflect.get(target, prop, receiver);\n },\n has (target, prop) {\n if (typeof prop === 'string' && !wellKnownProperties.has(prop) && !declaredSearchParamNames.has(prop)) {\n trackMissingSampleErrorAndThrow(createMissingSearchParamSampleError(route, prop));\n }\n return Reflect.has(target, prop);\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 */ export function createExhaustiveURLSearchParamsProxy(searchParams, declaredSearchParamNames, route) {\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)=>{\n if (typeof name === 'string' && !declaredSearchParamNames.has(name)) {\n trackMissingSampleErrorAndThrow(createMissingSearchParamSampleError(route, name));\n }\n return originalMathod.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}\nfunction createMissingSearchParamSampleError(route, name) {\n return Object.defineProperty(new InstantValidationError(`Route \"${route}\" accessed searchParam \"${name}\" which is not defined in the \\`unstable_samples\\` ` + `of \\`instant\\`. Add it to the sample's \\`searchParams\\` object, ` + `or \\`{ \"${name}\": null }\\` if it should be absent.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1347\",\n enumerable: false,\n configurable: true\n });\n}\nexport function createRelativeURLFromSamples(route, sampleParams, sampleSearchParams) {\n // Build searchParams query object and URL search string from sample\n const pathname = createPathnameFromRouteAndSampleParams(route, sampleParams ?? {});\n let search = '';\n if (sampleSearchParams) {\n const qs = createURLSearchParamsFromSample(sampleSearchParams).toString();\n if (qs) {\n search = '?' + qs;\n }\n }\n return parseRelativeUrl(pathname + search, undefined, true);\n}\nfunction createURLSearchParamsFromSample(sampleSearchParams) {\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 * 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 */ function createPathnameFromRouteAndSampleParams(route, params) {\n let interpolatedSegments = [];\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 {\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 = [\n rawSegment\n ];\n } else if (!Array.isArray(paramValue)) {\n // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n throw Object.defineProperty(new InstantValidationError(`Expected sample param value for segment '${rawSegment}' to be an array of strings, got ${typeof paramValue}`), \"__NEXT_ERROR_CODE\", {\n value: \"E1104\",\n enumerable: false,\n configurable: true\n });\n }\n interpolatedSegments.push(...paramValue.map((v)=>encodeURIComponent(v)));\n break;\n }\n case 'dynamic':\n {\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 Object.defineProperty(new InstantValidationError(`Expected sample param value for segment '${rawSegment}' to be a string, got ${typeof paramValue}`), \"__NEXT_ERROR_CODE\", {\n value: \"E1108\",\n enumerable: false,\n configurable: true\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 {\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 Object.defineProperty(new InvariantError('Not implemented: Validation of interception routes'), \"__NEXT_ERROR_CODE\", {\n value: \"E1106\",\n enumerable: false,\n configurable: true\n });\n }\n default:\n {\n param.paramType;\n }\n }\n } else {\n interpolatedSegments.push(rawSegment);\n }\n }\n return interpolatedSegments.join('/');\n}\nexport function assertRootParamInSamples(workStore, sampleParams, paramName) {\n if (sampleParams && paramName in sampleParams) {\n // The param is defined in the samples.\n } else {\n const route = workStore.route;\n trackMissingSampleErrorAndThrow(Object.defineProperty(new InstantValidationError(`Route \"${route}\" accessed root param \"${paramName}\" which is not defined in the \\`unstable_samples\\` ` + `of \\`instant\\`. Add it to the sample's \\`params\\` object.`), \"__NEXT_ERROR_CODE\", {\n value: \"E1192\",\n enumerable: false,\n configurable: true\n }));\n }\n}\n\n//# sourceMappingURL=instant-samples.js.map","export function searchParamsToUrlQuery(searchParams) {\n const query = {};\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] = [\n existing,\n value\n ];\n }\n }\n return query;\n}\nfunction stringifyUrlQueryParam(param) {\n if (typeof param === 'string') {\n return param;\n }\n if (typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') {\n return String(param);\n } else {\n return '';\n }\n}\nexport function urlQueryToSearchParams(query) {\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}\nexport function assign(target, ...searchParamsList) {\n for (const searchParams of searchParamsList){\n for (const key of searchParams.keys()){\n target.delete(key);\n }\n for (const [key, value] of searchParams.entries()){\n target.append(key, value);\n }\n }\n return target;\n}\n\n//# sourceMappingURL=querystring.js.map","export const ActionDidNotRevalidate = 0;\nexport const ActionDidRevalidateStaticAndDynamic = 1;\nexport const ActionDidRevalidateDynamicOnly = 2;\n\n//# sourceMappingURL=action-revalidation-kind.js.map","import { RequestCookies } from '../cookies';\nimport { ResponseCookies } from '../cookies';\nimport { ReflectAdapter } from './reflect';\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external';\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind';\n/**\n * @internal\n */ export class ReadonlyRequestCookiesError extends Error {\n constructor(){\n super('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 Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1180\",\n enumerable: false,\n configurable: true\n });\n }\n static callable() {\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport class RequestCookiesAdapter {\n static seal(cookies) {\n return new Proxy(cookies, {\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 * @param cookies\n * @returns A fresh object identity backed by the original value\n */ static fresh(cookies) {\n return new Proxy(cookies, {\n get (target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver);\n }\n });\n }\n}\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies');\nexport function getModifiedCookieValues(cookies) {\n const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES];\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return [];\n }\n return modified;\n}\nexport function appendMutableCookies(headers, mutableCookies) {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies);\n if (modifiedCookieValues.length === 0) {\n return false;\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 // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues){\n resCookies.set(cookie);\n }\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies){\n resCookies.set(cookie);\n }\n return true;\n}\nexport class MutableRequestCookiesAdapter {\n static wrap(cookies, onUpdateCookies) {\n const responseCookies = new ResponseCookies(new Headers());\n for (const cookie of cookies.getAll()){\n responseCookies.set(cookie);\n }\n let modifiedValues = [];\n const modifiedCookies = new Set();\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 const allCookies = responseCookies.getAll();\n modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));\n if (onUpdateCookies) {\n const serializedCookies = [];\n for (const cookie of modifiedValues){\n const tempCookies = new ResponseCookies(new Headers());\n tempCookies.set(cookie);\n serializedCookies.push(tempCookies.toString());\n }\n onUpdateCookies(serializedCookies);\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 // TODO: Throw error if trying to set a cookie after the response\n // headers have been set.\n case 'delete':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.delete(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n case 'set':\n return function(...args) {\n modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);\n try {\n target.set(...args);\n return wrappedCookies;\n } finally{\n updateResponseCookies();\n }\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n }\n}\nexport function createCookiesWithMutableAccessCheck(requestStore) {\n const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n get (target, prop, receiver) {\n switch(prop){\n case 'delete':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().delete');\n target.delete(...args);\n return wrappedCookies;\n };\n case 'set':\n return function(...args) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().set');\n target.set(...args);\n return wrappedCookies;\n };\n default:\n return ReflectAdapter.get(target, prop, receiver);\n }\n }\n });\n return wrappedCookies;\n}\nexport function areCookiesMutableInCurrentPhase(requestStore) {\n return requestStore.phase === 'action';\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 * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {\n if (!areCookiesMutableInCurrentPhase(requestStore)) {\n // TODO: maybe we can give a more precise error message based on callingExpression?\n throw new ReadonlyRequestCookiesError();\n }\n}\nexport function responseCookiesToRequestCookies(responseCookies) {\n const requestCookies = new RequestCookies(new Headers());\n for (const cookie of responseCookies.getAll()){\n requestCookies.set(cookie);\n }\n return requestCookies;\n}\n\n//# sourceMappingURL=request-cookies.js.map","import { getLocationOrigin } from '../../utils';\nimport { searchParamsToUrlQuery } from './querystring';\nexport function parseRelativeUrl(url, base, parseQuery = true) {\n const globalBase = new URL(typeof window === 'undefined' ? 'http://n' : getLocationOrigin());\n const resolvedBase = base ? new URL(base, globalBase) : url.startsWith('.') ? new URL(typeof window === 'undefined' ? 'http://n' : window.location.href) : globalBase;\n const { pathname, searchParams, search, hash, href, origin } = url.startsWith('/') ? // See https://nodejs.org/api/http.html#messageurl\n // Not using `origin` to support other protocols\n new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`) : new URL(url, resolvedBase);\n if (origin !== globalBase.origin) {\n throw Object.defineProperty(new Error(`invariant: invalid relative URL, router received ${url}`), \"__NEXT_ERROR_CODE\", {\n value: \"E159\",\n enumerable: false,\n configurable: true\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\n//# sourceMappingURL=parse-relative-url.js.map","import { ReflectAdapter } from './reflect';\n/**\n * @internal\n */ export class ReadonlyHeadersError extends Error {\n constructor(){\n super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers');\n Object.defineProperty(this, \"__NEXT_ERROR_CODE\", {\n value: \"E1176\",\n enumerable: false,\n configurable: true\n });\n }\n static callable() {\n throw new ReadonlyHeadersError();\n }\n}\n/**\n * Builds the read methods for a sealed view that exposes all of `target`.\n */ function createPassThroughMethods(target, sealed) {\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 * Builds the read methods for a sealed view that omits the header names matched\n * by `isHidden`.\n */ function createHidingMethods(target, sealed, isHidden) {\n function* entries() {\n for (const entry of target.entries()){\n if (!isHidden(entry[0])) {\n yield entry;\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 () {\n for (const name of target.keys()){\n if (!isHidden(name)) {\n yield name;\n }\n }\n },\n *values () {\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}\nexport class HeadersAdapter extends Headers {\n constructor(headers){\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 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 const lowercased = prop.toLowerCase();\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((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return;\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 const lowercased = prop.toLowerCase();\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((o)=>o.toLowerCase() === lowercased);\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 const lowercased = prop.toLowerCase();\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((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false;\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original);\n },\n deleteProperty (target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.deleteProperty(target, prop);\n const lowercased = prop.toLowerCase();\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((o)=>o.toLowerCase() === lowercased);\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true;\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original);\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 */ static seal(headers, hidden) {\n const isHidden = hidden && hidden.size > 0 ? (name)=>hidden.has(name.toLowerCase()) : null;\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;\n const sealed = new Proxy(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 methods = isHidden ? createHidingMethods(headers, sealed, isHidden) : createPassThroughMethods(headers, sealed);\n return sealed;\n }\n /**\n * @param headers\n * @returns A fresh object identity backed by the original value\n */ static fresh(headers) {\n return new Proxy(headers, {\n get (target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver);\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 */ merge(value) {\n if (Array.isArray(value)) return value.join(', ');\n return value;\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 */ static from(headers) {\n if (headers instanceof Headers) return headers;\n return new HeadersAdapter(headers);\n }\n append(name, value) {\n const existing = this.headers[name];\n if (typeof existing === 'string') {\n this.headers[name] = [\n existing,\n value\n ];\n } else if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n this.headers[name] = value;\n }\n }\n delete(name) {\n delete this.headers[name];\n }\n get(name) {\n const value = this.headers[name];\n if (typeof value !== 'undefined') return this.merge(value);\n return null;\n }\n has(name) {\n return typeof this.headers[name] !== 'undefined';\n }\n set(name, value) {\n this.headers[name] = value;\n }\n forEach(callbackfn, thisArg) {\n for (const [name, value] of this.entries()){\n callbackfn.call(thisArg, value, name, this);\n }\n }\n *entries() {\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);\n yield [\n name,\n value\n ];\n }\n }\n *keys() {\n for (const key of Object.keys(this.headers)){\n const name = key.toLowerCase();\n yield name;\n }\n }\n *values() {\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);\n yield value;\n }\n }\n [Symbol.iterator]() {\n return this.entries();\n }\n}\n\n//# sourceMappingURL=headers.js.map","export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\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","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 getSegmentValue(segment) {\n return Array.isArray(segment) ? segment[1] : segment;\n}\nexport function isGroupSegment(segment) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')');\n}\nexport function isParallelRouteSegment(segment) {\n return segment.startsWith('@') && segment !== '@children';\n}\nexport function addSearchParamsIfPageSegment(segment, searchParams) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams);\n return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY;\n }\n return segment;\n}\nexport function computeSelectedLayoutSegment(segments, parallelRouteKey) {\n if (!segments || segments.length === 0) {\n return null;\n }\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment = parallelRouteKey === 'children' ? segments[0] : segments[segments.length - 1];\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/** Get the canonical parameters from the current level to the leaf node. */ export function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {\n let node;\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 if (!node) return segmentPath;\n const segment = node[0];\n let segmentValue = getSegmentValue(segment);\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath;\n }\n segmentPath.push(segmentValue);\n return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);\n}\nexport const PAGE_SEGMENT_KEY = '__PAGE__';\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__';\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found';\n\n//# sourceMappingURL=segment.js.map","/**\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 */ export function ensureLeadingSlash(path) {\n return path.startsWith('/') ? path : `/${path}`;\n}\n\n//# sourceMappingURL=ensure-leading-slash.js.map","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash';\nimport { isGroupSegment } from '../../segment';\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 */ export function normalizeAppPath(route) {\n return ensureLeadingSlash(route.split('/').reduce((pathname, segment, index, segments)=>{\n // Empty segments are ignored.\n if (!segment) {\n return pathname;\n }\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname;\n }\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname;\n }\n // The last segment (if it's a leaf) should be ignored.\n if ((segment === 'page' || segment === 'route') && index === segments.length - 1) {\n return pathname;\n }\n return `${pathname}/${segment}`;\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 */ export function compareAppPaths(a, b) {\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 * 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 */ export function normalizeRscURL(url) {\n return url.replace(/\\.rsc($|\\?)/, // $1 ensures `?` is preserved\n '$1');\n}\n\n//# sourceMappingURL=app-paths.js.map","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","import { HTML_LIMITED_BOT_UA_RE } from './html-bots';\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;\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source;\nexport { HTML_LIMITED_BOT_UA_RE };\nfunction isDomBotUA(userAgent) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent);\n}\nfunction isHtmlLimitedBotUA(userAgent) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent);\n}\nexport function isBot(userAgent) {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent);\n}\nexport function getBotType(userAgent) {\n if (isDomBotUA(userAgent)) {\n return 'dom';\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html';\n }\n return undefined;\n}\n\n//# sourceMappingURL=is-bot.js.map","// 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 = /[\\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\n//# sourceMappingURL=html-bots.js.map","/**\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 */ export function parsePath(path) {\n const hashIndex = path.indexOf('#');\n const queryIndex = path.indexOf('?');\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : ''\n };\n }\n return {\n pathname: path,\n query: '',\n hash: ''\n };\n}\n\n//# sourceMappingURL=parse-path.js.map","import { parsePath } from './parse-path';\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 */ export function pathHasPrefix(path, prefix) {\n if (typeof path !== 'string') {\n return false;\n }\n const { pathname } = parsePath(path);\n return pathname === prefix || pathname.startsWith(prefix + '/');\n}\n\n//# sourceMappingURL=path-has-prefix.js.map","import { pathHasPrefix } from './path-has-prefix';\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 */ export function removePathPrefix(path, prefix) {\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 // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length);\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 // 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//# sourceMappingURL=remove-path-prefix.js.map","import { 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';\nexport function getActionNotFoundError(actionId) {\n return Object.defineProperty(new Error(`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`), \"__NEXT_ERROR_CODE\", {\n value: \"E974\",\n enumerable: false,\n configurable: true\n });\n}\nexport function getInvalidServerReferenceIdError(id) {\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(id.length > MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH ? id.slice(0, TRUNCATED_SERVER_REFERENCE_ID_LENGTH) + '…' : id);\n return Object.defineProperty(new Error(`The Server Reference ID did not match the expected format. Received ${encoded}.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`), \"__NEXT_ERROR_CODE\", {\n value: \"E1442\",\n enumerable: false,\n configurable: true\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// 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');\nconst globalThisWithManifests = globalThis;\nfunction createProxiedClientReferenceManifest(clientReferenceManifestsPerRoute) {\n const createMappingProxy = (prop)=>{\n return new Proxy({}, {\n get (_, id) {\n const workStore = workAsyncStorage.getStore();\n if (workStore) {\n var _clientReferenceManifestsPerRoute_get;\n const currentManifest = (_clientReferenceManifestsPerRoute_get = clientReferenceManifestsPerRoute.get(workStore.route)) == null ? void 0 : _clientReferenceManifestsPerRoute_get.clientReferenceManifest;\n if (currentManifest == null ? void 0 : currentManifest[prop][id]) {\n return currentManifest[prop][id];\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 [route, { page, clientReferenceManifest }] of clientReferenceManifestsPerRoute){\n if (route === workStore.route) {\n continue;\n }\n const entry = clientReferenceManifest[prop][id];\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 ??= new Set();\n workStore.additionalClientReferenceManifestPages.add(page);\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 { clientReferenceManifest } of clientReferenceManifestsPerRoute.values()){\n const entry = clientReferenceManifest[prop][id];\n if (entry !== undefined) {\n return entry;\n }\n }\n }\n return undefined;\n }\n });\n };\n const mappingProxies = new Map();\n return new Proxy({}, {\n get (_, prop) {\n const workStore = workAsyncStorage.getStore();\n switch(prop){\n case 'moduleLoading':\n case 'entryCSSFiles':\n case 'entryJSFiles':\n {\n if (!workStore) {\n throw Object.defineProperty(new InvariantError(`Cannot access \"${prop}\" without a work store.`), \"__NEXT_ERROR_CODE\", {\n value: \"E952\",\n enumerable: false,\n configurable: true\n });\n }\n const registeredManifest = clientReferenceManifestsPerRoute.get(workStore.route);\n if (!registeredManifest) {\n throw Object.defineProperty(new InvariantError(`The client reference manifest for route \"${workStore.route}\" does not exist.`), \"__NEXT_ERROR_CODE\", {\n value: \"E951\",\n enumerable: false,\n configurable: true\n });\n }\n return registeredManifest.clientReferenceManifest[prop];\n }\n case 'clientModules':\n case 'rscModuleMapping':\n case 'edgeRscModuleMapping':\n case 'ssrModuleMapping':\n case 'edgeSSRModuleMapping':\n {\n let proxy = mappingProxies.get(prop);\n if (!proxy) {\n proxy = createMappingProxy(prop);\n mappingProxies.set(prop, proxy);\n }\n return proxy;\n }\n default:\n {\n throw Object.defineProperty(new InvariantError(`This is a proxied client reference manifest. The property \"${String(prop)}\" is not handled.`), \"__NEXT_ERROR_CODE\", {\n value: \"E953\",\n enumerable: false,\n configurable: true\n });\n }\n }\n }\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 */ function createServerModuleMap() {\n return new Proxy(Object.create(null), {\n get: (target, id, receiver)=>{\n var _getServerActionsManifest__id, _getServerActionsManifest_;\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 if (wellKnownProperties.has(id)) {\n return Reflect.get(target, id, receiver);\n }\n if (!mightBeServerReferenceId(id)) {\n throw getInvalidServerReferenceIdError(id);\n }\n const workers = (_getServerActionsManifest_ = getServerActionsManifest()[process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node']) == null ? void 0 : (_getServerActionsManifest__id = _getServerActionsManifest_[id]) == null ? void 0 : _getServerActionsManifest__id.workers;\n if (!workers) {\n throw getActionNotFoundError(id);\n }\n const workStore = workAsyncStorage.getStore();\n let workerEntry;\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 if (!workerEntry) {\n throw getActionNotFoundError(id);\n }\n const { moduleId, async } = workerEntry;\n return {\n id: moduleId,\n name: id,\n chunks: [],\n 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 */ function normalizeWorkerPageName(pageName) {\n if (pathHasPrefix(pageName, 'app')) {\n return pageName;\n }\n return 'app' + pageName;\n}\n/**\n * Converts a bundlePath (relative path to the entrypoint) to a routable page\n * name.\n */ function denormalizeWorkerPageName(bundlePath) {\n return normalizeAppPath(removePathPrefix(bundlePath, 'app'));\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 */ export function selectWorkerForForwarding(actionId, pageName) {\n var _serverActionsManifest__actionId;\n const serverActionsManifest = getServerActionsManifest();\n const workers = (_serverActionsManifest__actionId = serverActionsManifest[process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'][actionId]) == null ? void 0 : _serverActionsManifest__actionId.workers;\n // There are no workers to handle this action, nothing to forward to.\n if (!workers) {\n return;\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 // Otherwise, grab the first worker that has a handler for this action id.\n return denormalizeWorkerPageName(Object.keys(workers)[0]);\n}\nexport function setManifestsSingleton({ page, clientReferenceManifest, serverActionsManifest: rawServerActionsManifest }) {\n const existingSingleton = globalThisWithManifests[MANIFESTS_SINGLETON];\n const route = normalizeAppPath(page);\n const serverActionsManifest = {\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 if (existingSingleton) {\n existingSingleton.clientReferenceManifestsPerRoute.set(route, {\n page,\n clientReferenceManifest\n });\n existingSingleton.serverActionsManifest = serverActionsManifest;\n } else {\n const clientReferenceManifestsPerRoute = new Map([\n [\n route,\n {\n page,\n clientReferenceManifest\n }\n ]\n ]);\n const proxiedClientReferenceManifest = createProxiedClientReferenceManifest(clientReferenceManifestsPerRoute);\n globalThisWithManifests[MANIFESTS_SINGLETON] = {\n clientReferenceManifestsPerRoute,\n proxiedClientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap()\n };\n }\n}\nfunction getManifestsSingleton() {\n const manifestSingleton = globalThisWithManifests[MANIFESTS_SINGLETON];\n if (!manifestSingleton) {\n throw Object.defineProperty(new InvariantError('The manifests singleton was not initialized.'), \"__NEXT_ERROR_CODE\", {\n value: \"E950\",\n enumerable: false,\n configurable: true\n });\n }\n return manifestSingleton;\n}\nexport function getClientReferenceManifest() {\n return getManifestsSingleton().proxiedClientReferenceManifest;\n}\nexport function getServerActionsManifest() {\n return getManifestsSingleton().serverActionsManifest;\n}\nexport function getServerModuleMap() {\n return getManifestsSingleton().serverModuleMap;\n}\n\n//# sourceMappingURL=manifests-singleton.js.map","export const SERVER_REFERENCE_ID_LENGTH = 42;\nexport function mightBeServerReferenceId(id) {\n return id.length === SERVER_REFERENCE_ID_LENGTH;\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 */ export function extractInfoFromServerReferenceId(id) {\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 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 return {\n type: typeBit === 1 ? 'use-cache' : 'server-action',\n usedArgs: usedArgs,\n hasRestArgs: restArgs === 1\n };\n}\n/**\n * Creates a sparse array containing only the used arguments based on the\n * provided action info.\n */ export function omitUnusedArgs(args, info) {\n const filteredArgs = new Array(args.length);\n let length = 0;\n for(let index = 0; index < args.length; index++){\n if (index < 6 && info.usedArgs[index] || // 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 filteredArgs[index] = args[index];\n length = index + 1;\n }\n }\n // Trim trailing unused args from the array.\n filteredArgs.length = length;\n return filteredArgs;\n}\n\n//# sourceMappingURL=server-reference-info.js.map","import type { SizeLimit } from '../../types'\n\nexport const DEFAULT_MAX_POSTPONED_STATE_SIZE: SizeLimit = '100 MB'\n\n// 100MB in bytes. Not using the parseSizeLimit for performance as parseMaxPostponedStateSize is in the hot path for rendering.\nconst DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES = 104_857_600\n\nfunction parseSizeLimit(size: SizeLimit): number | undefined {\n const bytes = (\n require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n ).parse(size)\n if (bytes === null || isNaN(bytes) || bytes < 1) {\n return undefined\n }\n return bytes\n}\n\n/**\n * Parses the maxPostponedStateSize config value, using the default if not provided.\n */\nexport function parseMaxPostponedStateSize(\n size: SizeLimit | undefined\n): number | undefined {\n if (!size) {\n return DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES\n }\n return parseSizeLimit(size)\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","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactServerDOMTurbopackStatic\n"],"names":["path","process","env","NEXT_RUNTIME","require","module","exports","util","ReactDOM","decoderOptions","stream","hasOwnProperty","Object","prototype","resolveClientReference","bundlerConfig","metadata","moduleExports","name","Error","length","id","chunks","resolveServerReference","resolvedModuleData","idx","lastIndexOf","slice","async","requireAsyncModule","promise","globalThis","__next_require__","then","status","value","reason","instrumentedChunks","WeakSet","loadedChunks","ignoreReject","preloadModule","promises","i","thenable","__next_chunk_load__","has","push","resolve","add","bind","Promise","all","requireModule","__esModule","default","call","prepareDestinationWithChunks","moduleLoading","nonce$jscomp$0","chunk","nonce","JSCompiler_temp_const","ReactDOMSharedInternals","d","JSCompiler_temp_const$jscomp$0","X","prefix","JSCompiler_inline_result","crossOrigin","integrity","fetchPriority","__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","REACT_ELEMENT_TYPE","Symbol","for","REACT_LAZY_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","getIteratorFn","maybeIterable","ASYNC_ITERATOR","asyncIterator","isArrayImpl","Array","isArray","getPrototypeOf","ObjectPrototype$1","knownServerReferences","WeakMap","serializeNumber","number","Number","isFinite","Infinity","processReply","root","formFieldPrefix","temporaryReferences","reject","serializeTypedArray","tag","typedArray","Blob","Uint8Array","buffer","byteOffset","byteLength","blobId","nextPartId","formData","FormData","append","toString","serializeBinaryReader","reader","progress","entry","done","data","streamId","pendingParts","read","serializeReader","partJSON","JSON","stringify","resolveToJSON","x","serializeReadableStream","binaryReader","getReader","mode","serializeAsyncIterable","iterable","partJSON$21","next","x$22","key","$$typeof","indexOf","parentReference","writtenObjects","get","set","modelRoot","_payload","init","_init","resolvedModel","lazyId","serializeModel","lazyId$23","partJSON$24","data$25","promiseId","partValue","previousReference","partJSON$27","data$31","forEach","originalValue","originalKey","Map","from","Set","ArrayBuffer","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ReadableStream","Date","bound","model","json","boundCache","encodeFormData","reference","res","rej","body","e","defaultEncodeFormAction","identifierPrefix","referenceClosure","prefixedData","method","encType","isSignatureEqual","referenceId","numberOfBoundArgs","boundPromise","boundArgs","error","registerBoundServerReference","encodeFormAction","originalBind","defineProperties","$$FORM_ACTION","$$IS_SIGNATURE_EQUAL","FunctionBind","Function","ArraySlice","apply","arguments","newFn","args","concat","createBoundServerReference","metaData","callServer","action","createServerReference$1","ObjectPrototype","ArrayPrototype","ReactPromise","create","defineProperty","writable","enumerable","configurable","initializeModelChunk","initializeModuleChunk","readChunk","createPendingChunk","wakeChunk","response","listeners","listener","fulfillReference","rejectChunk","rejectReference","handler","resolveBlockedCycle","resolvedChunk","referencedChunk","wakeChunkIfInitialized","resolveListeners","rejectListeners","cyclicHandler","splice","triggerErrorOnChunk","createResolvedIteratorResultChunk","resolveIteratorResultChunk","resolveModelChunk","enqueueModel","resolveModuleChunk","initializingHandler","prevHandler","parseModel","errored","deps","reportGlobalError","weakResponse","_closed","_closedReason","_chunks","createLazyChunkWrapper","getChunk","_allowPartialStream","parentObject","map","referencedChunk$44","mappedValue","element","props","waitForReference","parent","loadServerReference","_serverReferenceConfig","_callServer","_encodeFormAction","serverReference","resolvedValue","unshift","getOutlinedModel","split","parseInt","createMap","createSet","createBlob","type","createFormData","extractIterator","createModel","parseModelString","_tempRefs","resolveErrorProd","NaN","parse","BigInt","missingCall","ResponseInstance","serverReferenceConfig","allowPartialStream","_bundlerConfig","_moduleLoading","_nonce","_stringDecoder","TextDecoder","createStreamState","_rowState","_rowID","_rowTag","_rowLength","_buffer","resolveBuffer","enqueueValue","resolveModule","clientReference","blockedChunk","resolveStream","controller","startReadableStream","closed","start","c","previousBlockedChunk","enqueue","v","chunk$55","close","createIterator","startAsyncIterable","nextWriteIndex","nextReadIndex","arg","stack","message","mergeBuffer","lastChunk","l","i$56","resolveTypedArray","constructor","bytesPerElement","processFullBinaryRow","streamState","stringDecoder","row","decode","processFullStringRow","D","C","L","m","S","M","digest","processBinaryChunk","rowState","rowID","rowTag","rowLength","chunkLength","lastIdx","offset","reviveModel","ref","noServerCall$1","createResponseFromOptions","options","serverConsumerManifest","moduleMap","serverModuleMap","unstable_allowPartialStream","startReadingFromStream$1","onDone","_ref","catch","noServerCall","startReadingFromStream","onEnd","on","charCodeAt","createFromFetch","promiseForResponse","r","createFromNodeStream","createFromReadableStream","createServerReference","createTemporaryReferenceSet","encodeReply","abort","signal","aborted","removeEventListener","addEventListener","registerServerReference","t","ContextAPI","n","a","o","NoopContextManager","getInstance","_instance","setGlobalContextManager","registerGlobal","DiagAPI","instance","active","_getContextManager","with","getGlobal","disable","unregisterGlobal","_logProxy","setLogger","logLevel","DiagLogLevel","INFO","s","u","createLogLevelDiagLogger","suppressOverrideMessage","warn","createComponentLogger","DiagComponentLogger","verbose","debug","info","MetricsAPI","setGlobalMeterProvider","getMeterProvider","NOOP_METER_PROVIDER","getMeter","PropagationAPI","NoopTextMapPropagator","createBaggage","getBaggage","getActiveBaggage","setBaggage","deleteBaggage","setGlobalPropagator","inject","defaultTextMapSetter","_getGlobalPropagator","extract","defaultTextMapGetter","fields","TraceAPI","_proxyTracerProvider","ProxyTracerProvider","wrapSpanContext","isSpanContextValid","deleteSpan","getSpan","getActiveSpan","getSpanContext","setSpan","setSpanContext","setGlobalTracerProvider","setDelegate","getTracerProvider","getTracer","createContextKey","getValue","undefined","setValue","deleteValue","BaggageImpl","_entries","getEntry","assign","getAllEntries","entries","setEntry","removeEntry","delete","removeEntries","clear","baggageEntryMetadataSymbol","baggageEntryMetadataFromString","__TYPE__","context","ROOT_CONTEXT","enable","BaseContext","_currentContext","diag","_namespace","namespace","logProxy","DiagConsoleLogger","_consoleFunc","console","log","NONE","ALL","_filterFunc","ERROR","WARN","DEBUG","VERBOSE","VERSION","_globalThis","version","isCompatible","_makeCompatibilityCheck","match","major","minor","patch","prerelease","isExactmatch","_reject","_accept","metrics","ValueType","createNoopMeter","NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC","NOOP_OBSERVABLE_GAUGE_METRIC","NOOP_OBSERVABLE_COUNTER_METRIC","NOOP_UP_DOWN_COUNTER_METRIC","NOOP_HISTOGRAM_METRIC","NOOP_COUNTER_METRIC","NOOP_METER","NoopObservableUpDownCounterMetric","NoopObservableGaugeMetric","NoopObservableCounterMetric","NoopObservableMetric","NoopHistogramMetric","NoopUpDownCounterMetric","NoopCounterMetric","NoopMetric","NoopMeter","createHistogram","createCounter","createUpDownCounter","createObservableGauge","createObservableCounter","createObservableUpDownCounter","addBatchObservableCallback","removeBatchObservableCallback","record","addCallback","removeCallback","NoopMeterProvider","__createBinding","__exportStar","propagation","keys","trace","NonRecordingSpan","INVALID_SPAN_CONTEXT","_spanContext","spanContext","setAttribute","setAttributes","addEvent","setStatus","updateName","end","isRecording","recordException","NoopTracer","startSpan","Boolean","isSpanContext","startActiveSpan","g","NoopTracerProvider","ProxyTracer","_provider","_getTracer","Reflect","_delegate","getDelegateTracer","getDelegate","SamplingDecision","TraceStateImpl","_internalState","_parse","_clone","unset","serialize","_keys","reduce","join","reverse","trim","validateKey","validateValue","size","RegExp","test","createTraceState","INVALID_TRACEID","INVALID_SPANID","traceId","spanId","traceFlags","TraceFlags","SpanKind","isValidSpanId","isValidTraceId","SpanStatusCode","__nccwpck_require__","ab","p","_","f","b","O","P","N","isThenable","decodeURIComponent","encodeURIComponent","TypeError","substr","tryDecode","encode","maxAge","isNaN","Math","floor","domain","expires","toUTCString","httpOnly","secure","sameSite","toLowerCase","fresh","parseTokenList","parseHttpDate","substring","hash","stdout","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","str","replace","index","nextIndex","formatter","open","String","input","string","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","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","createClientModuleProxy","__turbopack_context__","LayoutRouterContext","use","urlSearchParamsToParsedUrlQuery","SearchParamsContext","createClientParams","createClientSearchParams","ClientPageRoot","Component","serverProvidedParams","searchParams","params","layoutRouterContext","parentParams","clientSearchParams","clientParams","ClientSegmentRoot","slots","React","useContext","useUntrackedPathname","HTTPAccessErrorStatus","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","isHTTPAccessFallbackError","MissingSlotContext","HTTPAccessFallbackErrorBoundary","state","triggeredStatus","previousPathname","pathname","componentDidCatch","NODE_ENV","missingSlots","warnOnce","warningMessage","formattedSlots","sort","localeCompare","slot","getDerivedStateFromError","httpStatus","getDerivedStateFromProps","render","notFound","forbidden","unauthorized","children","errorComponents","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","isNotFound","isForbidden","isUnauthorized","meta","content","HTTPAccessFallbackBoundary","hasErrorFallback","Activity","Fragment","Suspense","useDeferredValue","useLayoutEffect","GlobalLayoutRouterContext","TemplateContext","unresolvedThenable","ErrorBoundary","disableSmoothScrollDuringRouteTransition","RedirectBoundary","InstantValidationBoundaryContext","RenderValidationBoundaryAtThisLevel","createRouterCacheKey","useRouterBFCache","normalizeAppPath","NavigationPromisesContext","getParamValueFromCacheKey","isDeferredRsc","enableNewScrollHandler","__NEXT_APP_NEW_SCROLL_HANDLER","findDOMNode","window","internal_reactDOMfindDOMNode","rectProperties","shouldSkipElement","includes","getComputedStyle","position","rect","getBoundingClientRect","every","item","getScrollPaddingTopInPixels","htmlElement","viewportHeight","scrollPaddingTop","parseFloat","endsWith","getScrollTargetState","getScrollPaddingTop","rects","getClientRects","elementTop","POSITIVE_INFINITY","top","getHashFragmentDomNode","hashFragment","document","getElementById","getElementsByName","InnerScrollAndFocusHandlerOld","componentDidMount","handlePotentialScroll","componentDidUpdate","focusAndScrollRef","cacheNode","scrollRef","forceScroll","current","domNode","onlyHashChange","Element","HTMLElement","parentElement","localName","nextElementSibling","scrollIntoView","documentElement","clientHeight","scrollTop","dontForceLayout","focus","InnerScrollHandlerNew","childrenRef","useRef","didHandleScroll","initialTargetState","InnerScrollAndMaybeFocusHandler","ScrollAndMaybeFocusHandler","InnerLayoutRouter","tree","segmentPath","debugNameContext","maybeCacheNode","url","isActive","parentNavPromises","resolvedPrefetchRsc","prefetchRsc","rsc","resolvedRsc","unwrappedRsc","navigationPromises","createNestedLayoutNavigationPromises","Provider","parentTree","parentCacheNode","parentSegmentPath","parentLoadingData","LoadingBoundaryProvider","loading","parentContext","LoadingBoundary","loadingRsc","loadingStyles","loadingScripts","fallback","OuterLayoutRouter","parallelRouterKey","errorStyles","errorScripts","templateStyles","templateScripts","template","segmentViewBoundaries","parentTreeSegment","activeTree","maybeParentSlots","maybeValidationBoundaryId","__NEXT_CACHE_COMPONENTS","activeSegment","activeCacheNode","activeStateKey","bfcacheEntry","stateKey","segment","segmentBoundaryTriggerNode","segmentViewStateNode","SegmentBoundaryTriggerNode","SegmentViewStateNode","pagePrefix","page","paramName","paramCacheKey","paramType","paramValue","debugName","getBoundaryDebugNameFromSegment","childDebugNameContext","isVirtual","debugNameToDisplay","templateValue","errorComponent","child","SegmentStateProvider","isVirtualLayout","RedirectStatusCode","RenderFromTemplateContext","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_NAV_DEPLOYMENT_ID_HEADER","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","FallbackMode","parseFallbackField","fallbackField","fallbackModeToFallbackField","parseStaticPathsResult","result","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","NameSpace","MetadataBoundary","ViewportBoundary","OutletBoundary","RootLayoutBoundary","IconMark","vendored","scheduleOnNextTick","cb","setTimeout","nextTick","scheduleImmediate","setImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","DUMMY_ORIGIN","isFullStringUrl","parseUrl","parsed","URL","parseReqUrl","parsedUrl","query","values","getAll","legacyUrl","search","href","host","hostname","auth","protocol","slashes","port","stripNextRscUnionQuery","relativeUrl","urlInstance","_seen","VaryParamsAccumulator","_done","_resolve","shift","rootParams","head","createResponseVaryParamsAccumulator","emptyVaryParamsAccumulator","createVaryParamsAccumulator","segments","responseAccumulator","workUnitStore","accumulator","_getVaryParamsAccumulator","getViewportVaryParamsAccumulator","rootParamsAccumulator","getRootParamsVaryParamsAccumulator","getMetadataVaryParamsAccumulator","optionalCatchAllParamName","getStore","originalParamsObject","prop","accumulateRootVaryParam","target","underlyingParamsWithVarying","receiver","accumulateVaryParam","createVaryingParams","ownKeys","Proxy","originalSearchParamsObject","segmentAccumulator","createVaryingSearchParams","finishAccumulatingVaryParams","interopDefault","mod","stripFlightHeaders","headers","header","wrapApiHandler","setRootSpanAttribute","NodeSpan","runHandler","spanName","redirect","sendStatusCode","statusCode","statusOrUrl","writeHead","Location","write","checkIsOnDemandRevalidate","rawHeaders","previewProps","HeadersAdapter","previewModeId","isOnDemandRevalidate","revalidateOnlyGenerated","COOKIE_NAME_PRERENDER_BYPASS","COOKIE_NAME_PRERENDER_DATA","RESPONSE_LIMIT_DEFAULT","SYMBOL_PREVIEW_DATA","SYMBOL_CLEARED_COOKIES","clearPreviewData","previous","getHeader","setHeader","ApiError","sendError","statusMessage","setLazyProp","req","getter","opts","optsReset","getRevalidateReason","isStaticGeneration","checkIsAppPPREnabled","config","checkIsRoutePPREnabled","NON_HTML_SEC_FETCH_DESTS","isNonHtmlSecFetchDest","isRSCRequestHeader","DEFAULT_MAX_POSTPONED_STATE_SIZE","parseMaxPostponedStateSize","INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE","getMaxPostponedStateSize","configuredMaxPostponedStateSize","maxPostponedStateSize","maxPostponedStateSizeBytes","getPostponedStateExceededErrorMessage","toBuffer","Buffer","isBuffer","readBodyWithSizeLimit","maxBodySizeBytes","getServerActionRequestMetadata","actionId","contentType","Headers","isURLEncodedAction","isMultipartAction","startsWith","isFetchAction","isPossibleServerAction","getIsPossibleServerAction","HTML_LIMITED_BOT_UA_RE_STRING","cachedPattern","cachedRegex","shouldServeStreamingMetadata","userAgent","htmlLimitedBots","pattern","BaseServerSpan","LoadComponentsSpan","NextServerSpan","NextNodeServerSpan","StartServerSpan","RenderSpan","AppRenderSpan","RouterSpan","AppRouteRouteHandlersSpan","ResolveMetadataSpan","MiddlewareSpan","NextVanillaSpanAllowlist","LogSpanAllowList","NEXT_REQUEST_META","getRequestMeta","setRequestMeta","addRequestMeta","request","removeRequestMeta","normalizeEncodedDynamicPlaceholder","decodedSegment","parseAppRouteSegment","interceptionMarker","find","param","isNormalizedAppRoute","route","normalized","isInterceptionAppRoute","OnlyRoutableSegments","allowedTypes","parseAppRouteImpl","appSegment","interceptingRoute","interceptedRoute","AllowParallelSegments","AllowGroupSegments","pathnameSegments","filter","normalizedSegment","parts","dynamicSegments","parseNormalizedAppRoute","parseAppRouteWithSlots","CachedRouteKind","IncrementalCacheKind","RouteKind","WEB_VITALS","used","fn","execOnce","isAbsoluteUrl","ABSOLUTE_URL_REGEX","isLetter","getLocationOrigin","location","getURL","normalizeRepeatedSlashes","origin","urlNoQuery","getDisplayName","displayName","isResSent","finished","headersSent","urlParts","loadGetInitialProps","App","ctx","getInitialProps","pageProps","SP","performance","ST","DecodeError","NormalizeError","PageNotFoundError","code","MissingStaticPage","MiddlewareNotFoundError","stringifyError","ENCODED_TAGS","OPENING","HTML","HEAD","BODY","CLOSED","BODY_AND_HTML","META","ICON_MARK","CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES","textEncoder","TextEncoder","encodeCacheBustingSearchParam","bytes","binary","normalizeCacheBustingInput","fromCharCode","segmentPrefetchHeader","btoa","stateTreeHeader","prefetchHeader","createCacheBustingSearchParamInput","nextUrlHeader","subarray","computeCacheBustingSearchParamFromInput","crypto","subtle","computeCacheBustingSearchParam1","computeLegacyCacheBustingSearchParam","hexHash","ReflectAdapter","deleteProperty","ActionDidNotRevalidate","ActionDidRevalidateStaticAndDynamic","ActionDidRevalidateDynamicOnly","RequestCookies","ResponseCookies","stringifyCookie","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","UNDERSCORE_GLOBAL_ERROR_ROUTE","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY","InvariantError","ensureLeadingSlash","INTERCEPTION_ROUTE_MARKERS","getSegmentParam","marker","isCatchAll","getParamProperties","repeat","optional","isInterceptionRouteAppPath","extractInterceptionRouteInformation","splitInterceptingRoute","HTML_LIMITED_BOT_UA_RE","parsePath","hashIndex","queryIndex","hasQuery","SERVER_REFERENCE_ID_LENGTH","mightBeServerReferenceId","extractInfoFromServerReferenceId","infoByte","typeBit","argMask","restArgs","usedArgs","bitPosition","bit","hasRestArgs","omitUnusedArgs","filteredArgs","DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES","parseSizeLimit","isDefinitelyAValidIdentifier","describeStringPropertyAccess","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","ReactServerDOMTurbopackStatic"],"mappings":"gKAaAK,EAAOC,OAAO,CAHLF,EAGQJ,AAHA,CAAA,CAAA,IAAA,2FCCjB,IAAIO,EAAAA,EAAAA,CAAAA,CAAAA,OACFC,EAAAA,EAAAA,CAAAA,CAAAA,OACAC,EAAiB,CAAEC,OAAQ,CAAC,CAAE,EAC9BC,EAAiBC,OAAOC,SAAS,CAACF,cAAc,CA0ClD,SAASkB,EAAmBR,CAAE,EAC5B,IAAIS,EAAUC,WAAWC,gBAAgB,CAACX,SAC1C,AAAI,YAAe,OAAOS,EAAQG,IAAI,EAAI,cAAgBH,EAAQI,MAAM,CAC/D,CAAP,KACFJ,EAAQG,IAAI,CACV,SAAUE,CAAK,EACbL,EAAQI,MAAM,CAAG,YACjBJ,EAAQK,KAAK,CAAGA,CAClB,EACA,SAAUC,CAAM,EACdN,EAAQI,MAAM,CAAG,WACjBJ,EAAQM,MAAM,CAAGA,CACnB,GAEKN,EACT,CACA,IAAIO,EAAqB,IAAIC,QAC3BC,EAAe,IAAID,QACrB,SAASE,IAAgB,CACzB,SAASC,EAAczB,CAAQ,EAC7B,IAAK,IAAIM,EAASN,CAAQ,CAAC,EAAE,CAAE0B,EAAW,EAAE,CAAEC,EAAI,EAAGA,EAAIrB,EAAOF,MAAM,CAAEuB,IAAK,CAC3E,IAAIC,EAAWb,WAAWc,mBAAmB,CAACvB,CAAM,CAACqB,EAAE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BACA,uBACA,WACA,UACA,iBAGA,OACA,QACA,UAGA,SAKA,cACA,aAGA,SACA,WACA,aAGA,aACD,EAAC,2CArCK,SAAS+nC,AACdvP,CAAc,CACdF,CAAY,EAEZ,IAAM0P,EAAkBxqC,KAAKC,SAAS,CAAC66B,GACvC,MAAO,CAAC,cAAc,EAAEE,EAAO,EAAE,EAAEwP,EAAgB,OAAO,EAAEA,EAAgB,IAAI,EAAExP,EAAO,cAAc,CAAC,AAC1G,mCAbO,SAASsP,AAA6BtP,CAAc,CAAEF,CAAY,SACvE,AAAIuP,EAA6BhtB,IAAI,CAACyd,GAC7B,CAAC,EAAE,CADiC,CAC/BE,EAAO,CAAC,EAAEF,EAAK,EAAE,CAAC,CAEzB,CAAC,EAAE,EAAEE,EAAO,CAAC,EAAEh7B,KAAKC,SAAS,CAAC66B,GAAM,GAAG,CAAC,AACjD,4DCZAtiC,EAAOC,OAAO,CACZF,EAAQ,CAAA,CAAA,IAAA,GACRk/B,QAAQ,CAAC,YAAY,CAAEiT,6BAA6B","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,25,27,28,29,31,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]}
|