{"version":3,"sources":["../../src/build/utils.ts"],"sourcesContent":["import type { NextConfigComplete } from '../server/config-shared'\nimport type { ExperimentalPPRConfig } from '../server/lib/experimental/ppr'\nimport { checkIsRoutePPREnabled } from '../server/lib/experimental/ppr'\nimport type { AssetBinding } from './webpack/loaders/get-module-build-info'\nimport type { ServerRuntime } from '../types'\nimport type { BuildManifest } from '../server/get-page-files'\nimport type {\n CustomRoutes,\n Header,\n Redirect,\n Rewrite,\n} from '../lib/load-custom-routes'\nimport type {\n EdgeFunctionDefinition,\n MiddlewareManifest,\n} from './webpack/plugins/middleware-plugin'\nimport type { WebpackLayerName } from '../lib/constants'\nimport {\n INSTRUMENTATION_HOOK_FILENAME,\n MIDDLEWARE_FILENAME,\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT,\n SERVER_PROPS_SSG_CONFLICT,\n SSG_GET_INITIAL_PROPS_CONFLICT,\n WEBPACK_LAYERS,\n PROXY_FILENAME,\n} from '../lib/constants'\nimport type {\n AppPageModule,\n AppPageRouteModule,\n} from '../server/route-modules/app-page/module'\nimport type { NextComponentType } from '../shared/lib/utils'\n\nimport '../server/require-hook'\nimport '../server/node-polyfill-crypto'\nimport '../server/node-environment'\n\nimport { bold, cyan, green, red, underline, yellow } from '../lib/picocolors'\nimport textTable from 'next/dist/compiled/text-table'\nimport path from 'path'\nimport { promises as fs } from 'fs'\nimport { isValidElementType } from 'next/dist/compiled/react-is'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport browserslist from 'next/dist/compiled/browserslist'\nimport {\n MODERN_BROWSERSLIST_TARGET,\n UNDERSCORE_GLOBAL_ERROR_ROUTE,\n UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n UNDERSCORE_NOT_FOUND_ROUTE,\n} from '../shared/lib/constants'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport { findPageFile } from '../server/lib/find-page-file'\nimport { isEdgeRuntime } from '../lib/is-edge-runtime'\nimport * as Log from './output/log'\nimport type { LoadComponentsReturnType } from '../server/load-components'\nimport { loadComponents } from '../server/load-components'\nimport { trace } from '../trace'\nimport { setHttpClientAndAgentOptions } from '../server/setup-http-agent-env'\nimport { Sema } from 'next/dist/compiled/async-sema'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { getRuntimeContext } from '../server/web/sandbox'\nimport { RouteKind } from '../server/route-kind'\nimport type { PageExtensions } from './page-extensions-type'\nimport type { FallbackMode } from '../lib/fallback'\nimport type { OutgoingHttpHeaders } from 'http'\nimport type { AppSegmentConfig } from './segment-config/app/app-segment-config'\nimport type { AppSegment } from './segment-config/app/app-segments'\nimport { collectSegments } from './segment-config/app/app-segments'\nimport { createIncrementalCache } from '../export/helpers/create-incremental-cache'\nimport { collectRootParamKeys } from './segment-config/app/collect-root-param-keys'\nimport { buildAppStaticPaths } from './static-paths/app'\nimport { buildPagesStaticPaths } from './static-paths/pages'\nimport type { PrerenderedRoute } from './static-paths/types'\nimport type { CacheControl } from '../server/lib/cache-control'\nimport { formatExpire, formatRevalidate } from './output/format'\nimport type { AppRouteRouteModule } from '../server/route-modules/app-route/module'\nimport { formatIssue, isRelevantWarning } from '../shared/lib/turbopack/utils'\nimport type { TurbopackResult } from './swc/types'\n\nexport type ROUTER_TYPE = 'pages' | 'app'\n\n// Use `print()` for expected console output\nconst print = console.log\n\nconst RESERVED_PAGE = /^\\/(_app|_error|_document|api(\\/|$))/\n\nexport function unique(main: ReadonlyArray, sub: ReadonlyArray): T[] {\n return [...new Set([...main, ...sub])]\n}\n\nexport function difference(\n main: ReadonlyArray | ReadonlySet,\n sub: ReadonlyArray | ReadonlySet\n): T[] {\n const a = new Set(main)\n const b = new Set(sub)\n return [...a].filter((x) => !b.has(x))\n}\n\nexport function isMiddlewareFilename(file?: string | null) {\n return (\n file === MIDDLEWARE_FILENAME ||\n file === `src/${MIDDLEWARE_FILENAME}` ||\n file === PROXY_FILENAME ||\n file === `src/${PROXY_FILENAME}`\n )\n}\n\nexport function isInstrumentationHookFilename(file?: string | null) {\n return (\n file === INSTRUMENTATION_HOOK_FILENAME ||\n file === `src/${INSTRUMENTATION_HOOK_FILENAME}`\n )\n}\n\nconst filterAndSortList = (\n list: ReadonlyArray,\n routeType: ROUTER_TYPE,\n hasCustomApp: boolean\n) => {\n let pages: string[]\n if (routeType === 'app') {\n // filter out static app route of /favicon.ico and /_global-error\n pages = list.filter((e) => {\n if (e === '/favicon.ico') return false\n // Hide static /_global-error from build output\n if (e === '/_global-error') return false\n return true\n })\n } else {\n // filter built-in pages\n pages = list\n .slice()\n .filter(\n (e) =>\n !(\n e === '/_document' ||\n e === '/_error' ||\n (!hasCustomApp && e === '/_app')\n )\n )\n }\n return pages.sort((a, b) => a.localeCompare(b))\n}\n\nexport interface PageInfo {\n originalAppPath: string | undefined\n isStatic: boolean\n isSSG: boolean\n /**\n * If true, it means that the route has partial prerendering enabled.\n */\n isRoutePPREnabled: boolean\n ssgPageRoutes: string[] | null\n initialCacheControl: CacheControl | undefined\n pageDuration: number | undefined\n ssgPageDurations: number[] | undefined\n runtime: ServerRuntime\n hasEmptyStaticShell?: boolean\n hasPostponed?: boolean\n isDynamicAppRoute?: boolean\n}\n\nexport type PageInfos = Map\n\nexport interface RoutesUsingEdgeRuntime {\n [route: string]: 0\n}\n\nexport function collectRoutesUsingEdgeRuntime(\n input: PageInfos\n): RoutesUsingEdgeRuntime {\n const routesUsingEdgeRuntime: RoutesUsingEdgeRuntime = {}\n for (const [route, info] of input.entries()) {\n if (isEdgeRuntime(info.runtime)) {\n routesUsingEdgeRuntime[route] = 0\n }\n }\n\n return routesUsingEdgeRuntime\n}\n\n/**\n * Processes and categorizes build issues, then logs them as warnings, errors, or fatal errors.\n * Stops execution if fatal issues are encountered.\n *\n * @param entrypoints - The result object containing build issues to process.\n * @param isDev - A flag indicating if the build is running in development mode.\n * @return This function does not return a value but logs or throws errors based on the issues.\n * @throws {Error} If a fatal issue is encountered, this function throws an error. In development mode, we only throw on\n * 'fatal' and 'bug' issues. In production mode, we also throw on 'error' issues.\n */\nexport function printBuildErrors(\n entrypoints: TurbopackResult,\n isDev: boolean\n): void {\n // Issues that we want to stop the server from executing\n const topLevelFatalIssues = []\n // Issues that are true errors, but we believe we can keep running and allow the user to address the issue\n const topLevelErrors = []\n // Issues that are warnings but should not affect the running of the build\n const topLevelWarnings = []\n\n // Track seen formatted error messages to avoid duplicates\n const seenFatalIssues = new Set()\n const seenErrors = new Set()\n const seenWarnings = new Set()\n\n for (const issue of entrypoints.issues) {\n // We only want to completely shut down the server\n if (issue.severity === 'fatal' || issue.severity === 'bug') {\n const formatted = formatIssue(issue)\n if (!seenFatalIssues.has(formatted)) {\n seenFatalIssues.add(formatted)\n topLevelFatalIssues.push(formatted)\n }\n } else if (isRelevantWarning(issue)) {\n const formatted = formatIssue(issue)\n if (!seenWarnings.has(formatted)) {\n seenWarnings.add(formatted)\n topLevelWarnings.push(formatted)\n }\n } else if (issue.severity === 'error') {\n const formatted = formatIssue(issue)\n if (isDev) {\n // We want to treat errors as recoverable in development\n // so that we can show the errors in the site and allow users\n // to respond to the errors when necessary. In production builds\n // though we want to error out and stop the build process.\n if (!seenErrors.has(formatted)) {\n seenErrors.add(formatted)\n topLevelErrors.push(formatted)\n }\n } else {\n if (!seenFatalIssues.has(formatted)) {\n seenFatalIssues.add(formatted)\n topLevelFatalIssues.push(formatted)\n }\n }\n }\n }\n // TODO: print in order by source location so issues from the same file are displayed together and then add a summary at the end about the number of warnings/errors\n if (topLevelWarnings.length > 0) {\n console.warn(\n `Turbopack build encountered ${\n topLevelWarnings.length\n } warnings:\\n${topLevelWarnings.join('\\n')}`\n )\n }\n\n if (topLevelErrors.length > 0) {\n console.error(\n `Turbopack build encountered ${\n topLevelErrors.length\n } errors:\\n${topLevelErrors.join('\\n')}`\n )\n }\n\n if (topLevelFatalIssues.length > 0) {\n throw new Error(\n `Turbopack build failed with ${\n topLevelFatalIssues.length\n } errors:\\n${topLevelFatalIssues.join('\\n')}`\n )\n }\n}\n\nexport async function printTreeView(\n lists: {\n pages: ReadonlyArray\n app: ReadonlyArray | undefined\n },\n pageInfos: Map,\n {\n pagesDir,\n pageExtensions,\n middlewareManifest,\n useStaticPages404,\n hasGSPAndRevalidateZero,\n }: {\n pagesDir?: string\n pageExtensions: PageExtensions\n buildManifest: BuildManifest\n middlewareManifest: MiddlewareManifest\n useStaticPages404: boolean\n hasGSPAndRevalidateZero: Set\n }\n) {\n // Can be overridden for test purposes to omit the build duration output.\n const MIN_DURATION = process.env.__NEXT_PRIVATE_DETERMINISTIC_BUILD_OUTPUT\n ? Infinity // Don't ever log build durations.\n : 300\n\n const getPrettyDuration = (_duration: number): string => {\n const duration = `${_duration} ms`\n // green for 300-1000ms\n if (_duration < 1000) return green(duration)\n // yellow for 1000-2000ms\n if (_duration < 2000) return yellow(duration)\n // red for >= 2000ms\n return red(bold(duration))\n }\n\n // Check if we have a custom app.\n const hasCustomApp = !!(\n pagesDir && (await findPageFile(pagesDir, '/_app', pageExtensions, false))\n )\n\n // Collect all the symbols we use so we can print the icons out.\n const usedSymbols = new Set()\n\n const messages: string[][] = []\n\n const printFileTree = async ({\n list,\n routerType,\n }: {\n list: ReadonlyArray\n routerType: ROUTER_TYPE\n }) => {\n const filteredPages = filterAndSortList(list, routerType, hasCustomApp)\n if (filteredPages.length === 0) {\n return\n }\n\n let showRevalidate = false\n let showExpire = false\n\n for (const page of filteredPages) {\n const cacheControl = pageInfos.get(page)?.initialCacheControl\n\n if (cacheControl?.revalidate) {\n showRevalidate = true\n }\n\n if (cacheControl?.expire) {\n showExpire = true\n }\n\n if (showRevalidate && showExpire) {\n break\n }\n }\n\n messages.push(\n [\n routerType === 'app' ? 'Route (app)' : 'Route (pages)',\n showRevalidate ? 'Revalidate' : '',\n showExpire ? 'Expire' : '',\n ]\n .filter((entry) => entry !== '')\n .map((entry) => underline(entry))\n )\n\n filteredPages.forEach((item, i, arr) => {\n const border =\n i === 0\n ? arr.length === 1\n ? '─'\n : '┌'\n : i === arr.length - 1\n ? '└'\n : '├'\n\n const pageInfo = pageInfos.get(item)\n const totalDuration =\n (pageInfo?.pageDuration || 0) +\n (pageInfo?.ssgPageDurations?.reduce((a, b) => a + (b || 0), 0) || 0)\n\n let symbol: string\n\n if (item === '/_app' || item === '/_app.server') {\n symbol = ' '\n } else if (isEdgeRuntime(pageInfo?.runtime)) {\n symbol = 'ƒ'\n } else if (pageInfo?.isRoutePPREnabled) {\n if (\n // If the page has an empty static shell, then it's equivalent to a\n // dynamic page\n pageInfo?.hasEmptyStaticShell ||\n // ensure we don't mark dynamic paths that postponed as being dynamic\n // since in this case we're able to partially prerender it\n (pageInfo.isDynamicAppRoute && !pageInfo.hasPostponed)\n ) {\n symbol = 'ƒ'\n } else if (!pageInfo?.hasPostponed) {\n symbol = '○'\n } else {\n symbol = '◐'\n }\n } else if (pageInfo?.isStatic) {\n symbol = '○'\n } else if (pageInfo?.isSSG) {\n symbol = '●'\n } else {\n symbol = 'ƒ'\n }\n\n if (hasGSPAndRevalidateZero.has(item)) {\n usedSymbols.add('ƒ')\n messages.push([\n `${border} ƒ ${item}${\n totalDuration > MIN_DURATION\n ? ` (${getPrettyDuration(totalDuration)})`\n : ''\n }`,\n showRevalidate && pageInfo?.initialCacheControl\n ? formatRevalidate(pageInfo.initialCacheControl)\n : '',\n showExpire && pageInfo?.initialCacheControl\n ? formatExpire(pageInfo.initialCacheControl)\n : '',\n ])\n }\n\n usedSymbols.add(symbol)\n\n messages.push([\n `${border} ${symbol} ${item}${\n totalDuration > MIN_DURATION\n ? ` (${getPrettyDuration(totalDuration)})`\n : ''\n }`,\n showRevalidate && pageInfo?.initialCacheControl\n ? formatRevalidate(pageInfo.initialCacheControl)\n : '',\n showExpire && pageInfo?.initialCacheControl\n ? formatExpire(pageInfo.initialCacheControl)\n : '',\n ])\n\n if (pageInfo?.ssgPageRoutes?.length) {\n const totalRoutes = pageInfo.ssgPageRoutes.length\n const contSymbol = i === arr.length - 1 ? ' ' : '│'\n\n // HERE\n\n let routes: { route: string; duration: number; avgDuration?: number }[]\n if (pageInfo.ssgPageDurations?.some((d) => d > MIN_DURATION)) {\n const previewPages = totalRoutes === 8 ? 8 : Math.min(totalRoutes, 7)\n const routesWithDuration = pageInfo.ssgPageRoutes\n .map((route, idx) => ({\n route,\n duration: pageInfo.ssgPageDurations![idx] || 0,\n }))\n .sort(({ duration: a }, { duration: b }) =>\n // Sort by duration\n // keep too small durations in original order at the end\n a <= MIN_DURATION && b <= MIN_DURATION ? 0 : b - a\n )\n routes = routesWithDuration.slice(0, previewPages)\n const remainingRoutes = routesWithDuration.slice(previewPages)\n if (remainingRoutes.length) {\n const remaining = remainingRoutes.length\n const avgDuration = Math.round(\n remainingRoutes.reduce(\n (total, { duration }) => total + duration,\n 0\n ) / remainingRoutes.length\n )\n routes.push({\n route: `[+${remaining} more paths]`,\n duration: 0,\n avgDuration,\n })\n }\n } else {\n const previewPages = totalRoutes === 4 ? 4 : Math.min(totalRoutes, 3)\n routes = pageInfo.ssgPageRoutes\n .slice(0, previewPages)\n .map((route) => ({ route, duration: 0 }))\n if (totalRoutes > previewPages) {\n const remaining = totalRoutes - previewPages\n routes.push({ route: `[+${remaining} more paths]`, duration: 0 })\n }\n }\n\n routes.forEach(\n ({ route, duration, avgDuration }, index, { length }) => {\n const innerSymbol = index === length - 1 ? '└' : '├'\n\n const initialCacheControl =\n pageInfos.get(route)?.initialCacheControl\n\n messages.push([\n `${contSymbol} ${innerSymbol} ${route}${\n duration > MIN_DURATION\n ? ` (${getPrettyDuration(duration)})`\n : ''\n }${\n avgDuration && avgDuration > MIN_DURATION\n ? ` (avg ${getPrettyDuration(avgDuration)})`\n : ''\n }`,\n showRevalidate && initialCacheControl\n ? formatRevalidate(initialCacheControl)\n : '',\n showExpire && initialCacheControl\n ? formatExpire(initialCacheControl)\n : '',\n ])\n }\n )\n }\n })\n }\n\n // If enabled, then print the tree for the app directory.\n if (lists.app) {\n await printFileTree({\n routerType: 'app',\n list: lists.app,\n })\n\n messages.push(['', '', '', ''])\n }\n\n pageInfos.set('/404', {\n ...(pageInfos.get('/404') || pageInfos.get('/_error'))!,\n isStatic: useStaticPages404,\n })\n\n // If there's no app /_notFound page present, then the 404 is still using the pages/404\n if (\n !lists.pages.includes('/404') &&\n !lists.app?.includes(UNDERSCORE_NOT_FOUND_ROUTE)\n ) {\n lists.pages = [...lists.pages, '/404']\n }\n\n // Print the tree view for the pages directory.\n await printFileTree({\n routerType: 'pages',\n list: lists.pages,\n })\n\n const middlewareInfo = middlewareManifest.middleware?.['/']\n if (middlewareInfo?.files.length > 0) {\n messages.push([])\n messages.push(['ƒ Proxy (Middleware)'])\n }\n\n print(\n textTable(messages, {\n align: ['l', 'r', 'r', 'r'],\n stringLength: (str) => stripAnsi(str).length,\n })\n )\n\n const staticFunctionInfo = lists.app\n ? 'generateStaticParams'\n : 'getStaticProps'\n print()\n print(\n textTable(\n [\n usedSymbols.has('○') && [\n '○',\n '(Static)',\n 'prerendered as static content',\n ],\n usedSymbols.has('●') && [\n '●',\n '(SSG)',\n `prerendered as static HTML (uses ${cyan(staticFunctionInfo)})`,\n ],\n usedSymbols.has('◐') && [\n '◐',\n '(Partial Prerender)',\n 'prerendered as static HTML with dynamic server-streamed content',\n ],\n usedSymbols.has('ƒ') && ['ƒ', '(Dynamic)', `server-rendered on demand`],\n ].filter((x) => x) as [string, string, string][],\n {\n align: ['l', 'l', 'l'],\n stringLength: (str) => stripAnsi(str).length,\n }\n )\n )\n\n print()\n}\n\nexport function printCustomRoutes({\n redirects,\n rewrites,\n headers,\n}: CustomRoutes) {\n const printRoutes = (\n routes: Redirect[] | Rewrite[] | Header[],\n type: 'Redirects' | 'Rewrites' | 'Headers'\n ) => {\n const isRedirects = type === 'Redirects'\n const isHeaders = type === 'Headers'\n print(underline(type))\n\n /*\n ┌ source\n ├ permanent/statusCode\n └ destination\n */\n const routesStr = (routes as any[])\n .map((route: { source: string }) => {\n let routeStr = `┌ source: ${route.source}\\n`\n\n if (!isHeaders) {\n const r = route as Rewrite\n routeStr += `${isRedirects ? '├' : '└'} destination: ${\n r.destination\n }\\n`\n }\n if (isRedirects) {\n const r = route as Redirect\n routeStr += `└ ${\n r.statusCode\n ? `status: ${r.statusCode}`\n : `permanent: ${r.permanent}`\n }\\n`\n }\n\n if (isHeaders) {\n const r = route as Header\n routeStr += `└ headers:\\n`\n\n for (let i = 0; i < r.headers.length; i++) {\n const header = r.headers[i]\n const last = i === headers.length - 1\n\n routeStr += ` ${last ? '└' : '├'} ${header.key}: ${header.value}\\n`\n }\n }\n\n return routeStr\n })\n .join('\\n')\n\n print(`${routesStr}\\n`)\n }\n\n print()\n if (redirects.length) {\n printRoutes(redirects, 'Redirects')\n }\n if (headers.length) {\n printRoutes(headers, 'Headers')\n }\n\n const combinedRewrites = [\n ...rewrites.beforeFiles,\n ...rewrites.afterFiles,\n ...rewrites.fallback,\n ]\n if (combinedRewrites.length) {\n printRoutes(combinedRewrites, 'Rewrites')\n }\n}\n\ntype PageIsStaticResult = {\n isRoutePPREnabled?: boolean\n isStatic?: boolean\n hasServerProps?: boolean\n hasStaticProps?: boolean\n prerenderedRoutes: PrerenderedRoute[] | undefined\n prerenderFallbackMode: FallbackMode | undefined\n rootParamKeys: readonly string[] | undefined\n isNextImageImported?: boolean\n traceIncludes?: string[]\n traceExcludes?: string[]\n appConfig?: AppSegmentConfig\n}\n\nexport async function isPageStatic({\n dir,\n page,\n distDir,\n configFileName,\n httpAgentOptions,\n locales,\n defaultLocale,\n parentId,\n pageRuntime,\n edgeInfo,\n pageType,\n cacheComponents,\n authInterrupts,\n originalAppPath,\n isrFlushToDisk,\n cacheMaxMemorySize,\n nextConfigOutput,\n cacheHandler,\n cacheHandlers,\n cacheLifeProfiles,\n pprConfig,\n buildId,\n sriEnabled,\n}: {\n dir: string\n page: string\n distDir: string\n cacheComponents: boolean\n authInterrupts: boolean\n configFileName: string\n httpAgentOptions: NextConfigComplete['httpAgentOptions']\n locales?: readonly string[]\n defaultLocale?: string\n parentId?: any\n edgeInfo?: any\n pageType?: 'pages' | 'app'\n pageRuntime?: ServerRuntime\n originalAppPath?: string\n isrFlushToDisk?: boolean\n cacheMaxMemorySize: number\n cacheHandler?: string\n cacheHandlers?: Record\n cacheLifeProfiles?: {\n [profile: string]: import('../server/use-cache/cache-life').CacheLife\n }\n nextConfigOutput: 'standalone' | 'export' | undefined\n pprConfig: ExperimentalPPRConfig | undefined\n buildId: string\n sriEnabled: boolean\n}): Promise {\n // Skip page data collection for synthetic _global-error routes\n if (page === UNDERSCORE_GLOBAL_ERROR_ROUTE) {\n return {\n isStatic: true,\n isRoutePPREnabled: false,\n prerenderFallbackMode: undefined,\n prerenderedRoutes: undefined,\n rootParamKeys: undefined,\n hasStaticProps: false,\n hasServerProps: false,\n isNextImageImported: false,\n appConfig: {},\n }\n }\n\n await createIncrementalCache({\n cacheHandler,\n cacheHandlers,\n distDir,\n dir,\n flushToDisk: isrFlushToDisk,\n cacheMaxMemorySize,\n })\n\n const isPageStaticSpan = trace('is-page-static-utils', parentId)\n return isPageStaticSpan\n .traceAsyncFn(async (): Promise => {\n setHttpClientAndAgentOptions({\n httpAgentOptions,\n })\n\n let componentsResult: LoadComponentsReturnType\n let prerenderedRoutes: PrerenderedRoute[] | undefined\n let prerenderFallbackMode: FallbackMode | undefined\n let appConfig: AppSegmentConfig = {}\n let rootParamKeys: readonly string[] | undefined\n const pathIsEdgeRuntime = isEdgeRuntime(pageRuntime)\n\n if (pathIsEdgeRuntime) {\n const runtime = await getRuntimeContext({\n paths: edgeInfo.files.map((file: string) => path.join(distDir, file)),\n edgeFunctionEntry: {\n ...edgeInfo,\n wasm: (edgeInfo.wasm ?? []).map((binding: AssetBinding) => ({\n ...binding,\n filePath: path.join(distDir, binding.filePath),\n })),\n },\n name: edgeInfo.name,\n useCache: true,\n distDir,\n })\n const mod = (\n await runtime.context._ENTRIES[`middleware_${edgeInfo.name}`]\n ).ComponentMod\n\n // This is not needed during require.\n const buildManifest = {} as BuildManifest\n\n componentsResult = {\n Component: mod.default,\n Document: mod.Document,\n App: mod.App,\n routeModule: mod.routeModule,\n page,\n ComponentMod: mod,\n pageConfig: mod.config || {},\n buildManifest,\n reactLoadableManifest: {},\n getServerSideProps: mod.getServerSideProps,\n getStaticPaths: mod.getStaticPaths,\n getStaticProps: mod.getStaticProps,\n }\n } else {\n componentsResult = await loadComponents({\n distDir,\n page: originalAppPath || page,\n isAppPath: pageType === 'app',\n isDev: false,\n sriEnabled,\n needsManifestsForLegacyReasons: true,\n })\n }\n\n const { Component, routeModule } = componentsResult\n\n const Comp = Component as NextComponentType | undefined\n\n let isRoutePPREnabled: boolean = false\n\n if (pageType === 'app') {\n const ComponentMod: AppPageModule = componentsResult.ComponentMod\n\n let segments: AppSegment[]\n try {\n segments = await collectSegments(\n // We know this is an app page or app route module because we\n // checked above that the page type is 'app'.\n routeModule as AppPageRouteModule | AppRouteRouteModule\n )\n } catch (err) {\n throw new Error(`Failed to collect configuration for ${page}`, {\n cause: err,\n })\n }\n\n appConfig =\n originalAppPath === UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY\n ? {}\n : reduceAppConfig(segments)\n\n if (appConfig.dynamic === 'force-static' && pathIsEdgeRuntime) {\n Log.warn(\n `Page \"${page}\" is using runtime = 'edge' which is currently incompatible with dynamic = 'force-static'. Please remove either \"runtime\" or \"force-static\" for correct behavior`\n )\n }\n\n rootParamKeys = collectRootParamKeys(routeModule)\n\n // A page supports partial prerendering if it is an app page and either\n // the whole app has PPR enabled or this page has PPR enabled when we're\n // in incremental mode.\n isRoutePPREnabled =\n routeModule.definition.kind === RouteKind.APP_PAGE &&\n checkIsRoutePPREnabled(pprConfig)\n\n // If force dynamic was set and we don't have PPR enabled, then set the\n // revalidate to 0.\n // TODO: (PPR) remove this once PPR is enabled by default\n if (appConfig.dynamic === 'force-dynamic' && !isRoutePPREnabled) {\n appConfig.revalidate = 0\n }\n\n // If the page is dynamic and we're not in edge runtime, then we need to\n // build the static paths. The edge runtime doesn't support static\n // paths.\n if (isDynamicRoute(page) && !pathIsEdgeRuntime) {\n ;({ prerenderedRoutes, fallbackMode: prerenderFallbackMode } =\n await buildAppStaticPaths({\n dir,\n page,\n cacheComponents,\n authInterrupts,\n segments,\n distDir,\n requestHeaders: {},\n isrFlushToDisk,\n cacheMaxMemorySize,\n cacheHandler,\n cacheLifeProfiles,\n ComponentMod,\n nextConfigOutput,\n isRoutePPREnabled,\n buildId,\n rootParamKeys,\n }))\n }\n } else {\n if (!Comp || !isValidElementType(Comp) || typeof Comp === 'string') {\n throw new Error('INVALID_DEFAULT_EXPORT')\n }\n }\n\n const hasGetInitialProps = !!Comp?.getInitialProps\n const hasStaticProps = !!componentsResult.getStaticProps\n const hasStaticPaths = !!componentsResult.getStaticPaths\n const hasServerProps = !!componentsResult.getServerSideProps\n\n // A page cannot be prerendered _and_ define a data requirement. That's\n // contradictory!\n if (hasGetInitialProps && hasStaticProps) {\n throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT)\n }\n\n if (hasGetInitialProps && hasServerProps) {\n throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT)\n }\n\n if (hasStaticProps && hasServerProps) {\n throw new Error(SERVER_PROPS_SSG_CONFLICT)\n }\n\n const pageIsDynamic = isDynamicRoute(page)\n // A page cannot have static parameters if it is not a dynamic page.\n if (hasStaticProps && hasStaticPaths && !pageIsDynamic) {\n throw new Error(\n `getStaticPaths can only be used with dynamic pages, not '${page}'.` +\n `\\nLearn more: https://nextjs.org/docs/routing/dynamic-routes`\n )\n }\n\n if (hasStaticProps && pageIsDynamic && !hasStaticPaths) {\n throw new Error(\n `getStaticPaths is required for dynamic SSG pages and is missing for '${page}'.` +\n `\\nRead more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`\n )\n }\n\n if (hasStaticProps && hasStaticPaths) {\n ;({ prerenderedRoutes, fallbackMode: prerenderFallbackMode } =\n await buildPagesStaticPaths({\n page,\n locales,\n defaultLocale,\n configFileName,\n getStaticPaths: componentsResult.getStaticPaths!,\n }))\n }\n\n const isNextImageImported = (globalThis as any).__NEXT_IMAGE_IMPORTED\n\n let isStatic = false\n if (!hasStaticProps && !hasGetInitialProps && !hasServerProps) {\n isStatic = true\n }\n\n // When PPR is enabled, any route may be completely static, so\n // mark this route as static.\n if (isRoutePPREnabled) {\n isStatic = true\n }\n\n return {\n isStatic,\n isRoutePPREnabled,\n prerenderFallbackMode,\n prerenderedRoutes,\n rootParamKeys,\n hasStaticProps,\n hasServerProps,\n isNextImageImported,\n appConfig,\n }\n })\n .catch((err) => {\n if (err.message === 'INVALID_DEFAULT_EXPORT') {\n throw err\n }\n console.error(err)\n throw new Error(`Failed to collect page data for ${page}`)\n })\n}\n\ntype ReducedAppConfig = Pick<\n AppSegmentConfig,\n | 'revalidate'\n | 'dynamic'\n | 'fetchCache'\n | 'preferredRegion'\n | 'runtime'\n | 'maxDuration'\n>\n\n/**\n * Collect the app config from the generate param segments. This only gets a\n * subset of the config options.\n *\n * @param segments the generate param segments\n * @returns the reduced app config\n */\nexport function reduceAppConfig(\n segments: Pick[]\n): ReducedAppConfig {\n const config: ReducedAppConfig = {}\n\n for (const segment of segments) {\n const {\n dynamic,\n fetchCache,\n preferredRegion,\n revalidate,\n runtime,\n maxDuration,\n } = segment.config || {}\n\n // TODO: should conflicting configs here throw an error\n // e.g. if layout defines one region but page defines another\n\n if (typeof preferredRegion !== 'undefined') {\n config.preferredRegion = preferredRegion\n }\n\n if (typeof dynamic !== 'undefined') {\n config.dynamic = dynamic\n }\n\n if (typeof fetchCache !== 'undefined') {\n config.fetchCache = fetchCache\n }\n\n if (typeof revalidate !== 'undefined') {\n config.revalidate = revalidate\n }\n\n // Any revalidate number overrides false, and shorter revalidate overrides\n // longer (initially).\n if (\n typeof revalidate === 'number' &&\n (typeof config.revalidate !== 'number' || revalidate < config.revalidate)\n ) {\n config.revalidate = revalidate\n }\n\n if (typeof runtime !== 'undefined') {\n config.runtime = runtime\n }\n\n if (typeof maxDuration !== 'undefined') {\n config.maxDuration = maxDuration\n }\n }\n\n return config\n}\n\nexport async function hasCustomGetInitialProps({\n page,\n distDir,\n checkingApp,\n sriEnabled,\n}: {\n page: string\n distDir: string\n checkingApp: boolean\n sriEnabled: boolean\n}): Promise {\n const { ComponentMod } = await loadComponents({\n distDir,\n page: page,\n isAppPath: false,\n isDev: false,\n sriEnabled,\n needsManifestsForLegacyReasons: true,\n })\n let mod = ComponentMod\n\n if (checkingApp) {\n mod = (await mod._app) || mod.default || mod\n } else {\n mod = mod.default || mod\n }\n mod = await mod\n return mod.getInitialProps !== mod.origGetInitialProps\n}\n\nexport async function getDefinedNamedExports({\n page,\n distDir,\n sriEnabled,\n}: {\n page: string\n distDir: string\n sriEnabled: boolean\n}): Promise> {\n const { ComponentMod } = await loadComponents({\n distDir,\n page: page,\n isAppPath: false,\n isDev: false,\n sriEnabled,\n needsManifestsForLegacyReasons: true,\n })\n\n return Object.keys(ComponentMod).filter((key) => {\n return typeof ComponentMod[key] !== 'undefined'\n })\n}\n\nexport function detectConflictingPaths(\n combinedPages: string[],\n ssgPages: Set,\n additionalGeneratedSSGPaths: Map\n) {\n const conflictingPaths = new Map<\n string,\n Array<{\n path: string\n page: string\n }>\n >()\n\n const dynamicSsgPages = [...ssgPages].filter((page) => isDynamicRoute(page))\n const additionalSsgPathsByPath: {\n [page: string]: { [path: string]: string }\n } = {}\n\n additionalGeneratedSSGPaths.forEach((paths, pathsPage) => {\n additionalSsgPathsByPath[pathsPage] ||= {}\n paths.forEach((curPath) => {\n const currentPath = curPath.toLowerCase()\n additionalSsgPathsByPath[pathsPage][currentPath] = curPath\n })\n })\n\n additionalGeneratedSSGPaths.forEach((paths, pathsPage) => {\n paths.forEach((curPath) => {\n const lowerPath = curPath.toLowerCase()\n let conflictingPage = combinedPages.find(\n (page) => page.toLowerCase() === lowerPath\n )\n\n if (conflictingPage) {\n conflictingPaths.set(lowerPath, [\n { path: curPath, page: pathsPage },\n { path: conflictingPage, page: conflictingPage },\n ])\n } else {\n let conflictingPath: string | undefined\n\n conflictingPage = dynamicSsgPages.find((page) => {\n if (page === pathsPage) return false\n\n conflictingPath =\n additionalGeneratedSSGPaths.get(page) == null\n ? undefined\n : additionalSsgPathsByPath[page][lowerPath]\n return conflictingPath\n })\n\n if (conflictingPage && conflictingPath) {\n conflictingPaths.set(lowerPath, [\n { path: curPath, page: pathsPage },\n { path: conflictingPath, page: conflictingPage },\n ])\n }\n }\n })\n })\n\n if (conflictingPaths.size > 0) {\n let conflictingPathsOutput = ''\n\n conflictingPaths.forEach((pathItems) => {\n pathItems.forEach((pathItem, idx) => {\n const isDynamic = pathItem.page !== pathItem.path\n\n if (idx > 0) {\n conflictingPathsOutput += 'conflicts with '\n }\n\n conflictingPathsOutput += `path: \"${pathItem.path}\"${\n isDynamic ? ` from page: \"${pathItem.page}\" ` : ' '\n }`\n })\n conflictingPathsOutput += '\\n'\n })\n\n Log.error(\n 'Conflicting paths returned from getStaticPaths, paths must be unique per page.\\n' +\n 'See more info here: https://nextjs.org/docs/messages/conflicting-ssg-paths\\n\\n' +\n conflictingPathsOutput\n )\n process.exit(1)\n }\n}\n\nexport async function copyTracedFiles(\n dir: string,\n distDir: string,\n pageKeys: readonly string[],\n appPageKeys: readonly string[] | undefined,\n tracingRoot: string,\n serverConfig: NextConfigComplete,\n middlewareManifest: MiddlewareManifest,\n hasNodeMiddleware: boolean,\n hasInstrumentationHook: boolean,\n staticPages: Set\n) {\n const outputPath = path.join(distDir, 'standalone')\n\n // Clean up standalone directory first.\n await fs.rm(outputPath, { recursive: true, force: true })\n\n let moduleType = false\n const nextConfig = {\n ...serverConfig,\n distDir: `./${path.relative(dir, distDir)}`,\n }\n try {\n const packageJsonPath = path.join(distDir, '../package.json')\n const packageJsonContent = await fs.readFile(packageJsonPath, 'utf8')\n const packageJson = JSON.parse(packageJsonContent)\n moduleType = packageJson.type === 'module'\n\n // we always copy the package.json to the standalone\n // folder to ensure any resolving logic is maintained\n const packageJsonOutputPath = path.join(\n outputPath,\n path.relative(tracingRoot, dir),\n 'package.json'\n )\n await fs.mkdir(path.dirname(packageJsonOutputPath), { recursive: true })\n await fs.writeFile(packageJsonOutputPath, packageJsonContent)\n } catch {}\n const copiedFiles = new Set()\n\n async function handleTraceFiles(traceFilePath: string) {\n const traceData = JSON.parse(await fs.readFile(traceFilePath, 'utf8')) as {\n files: string[]\n }\n const copySema = new Sema(10, { capacity: traceData.files.length })\n const traceFileDir = path.dirname(traceFilePath)\n\n await Promise.all(\n traceData.files.map(async (relativeFile) => {\n await copySema.acquire()\n\n const tracedFilePath = path.join(traceFileDir, relativeFile)\n const fileOutputPath = path.join(\n outputPath,\n path.relative(tracingRoot, tracedFilePath)\n )\n\n if (!copiedFiles.has(fileOutputPath)) {\n copiedFiles.add(fileOutputPath)\n\n await fs.mkdir(path.dirname(fileOutputPath), { recursive: true })\n const symlink = await fs.readlink(tracedFilePath).catch(() => null)\n\n if (symlink) {\n try {\n await fs.symlink(symlink, fileOutputPath)\n } catch (e: any) {\n if (e.code !== 'EEXIST') {\n throw e\n }\n }\n } else {\n await fs.copyFile(tracedFilePath, fileOutputPath)\n }\n }\n\n await copySema.release()\n })\n )\n }\n\n async function handleEdgeFunction(page: EdgeFunctionDefinition) {\n async function handleFile(file: string) {\n const originalPath = path.join(distDir, file)\n const fileOutputPath = path.join(\n outputPath,\n path.relative(tracingRoot, distDir),\n file\n )\n await fs.mkdir(path.dirname(fileOutputPath), { recursive: true })\n await fs.copyFile(originalPath, fileOutputPath)\n }\n await Promise.all([\n page.files.map(handleFile),\n page.wasm?.map((file) => handleFile(file.filePath)),\n page.assets?.map((file) => handleFile(file.filePath)),\n ])\n }\n\n const edgeFunctionHandlers: Promise[] = []\n\n for (const middleware of Object.values(middlewareManifest.middleware)) {\n if (isMiddlewareFilename(middleware.name)) {\n edgeFunctionHandlers.push(handleEdgeFunction(middleware))\n }\n }\n\n for (const page of Object.values(middlewareManifest.functions)) {\n edgeFunctionHandlers.push(handleEdgeFunction(page))\n }\n\n await Promise.all(edgeFunctionHandlers)\n\n for (const page of pageKeys) {\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n const route = normalizePagePath(page)\n\n if (staticPages.has(route)) {\n continue\n }\n\n const pageFile = path.join(\n distDir,\n 'server',\n 'pages',\n `${normalizePagePath(page)}.js`\n )\n const pageTraceFile = `${pageFile}.nft.json`\n await handleTraceFiles(pageTraceFile).catch((err) => {\n if (err.code !== 'ENOENT' || (page !== '/404' && page !== '/500')) {\n Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n }\n })\n }\n\n if (hasNodeMiddleware) {\n const middlewareFile = path.join(distDir, 'server', 'middleware.js')\n const middlewareTrace = `${middlewareFile}.nft.json`\n await handleTraceFiles(middlewareTrace)\n }\n\n if (appPageKeys) {\n for (const page of appPageKeys) {\n if (middlewareManifest.functions.hasOwnProperty(page)) {\n continue\n }\n const pageFile = path.join(distDir, 'server', 'app', `${page}.js`)\n const pageTraceFile = `${pageFile}.nft.json`\n await handleTraceFiles(pageTraceFile).catch((err) => {\n Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n })\n }\n }\n\n if (hasInstrumentationHook) {\n await handleTraceFiles(\n path.join(distDir, 'server', 'instrumentation.js.nft.json')\n )\n }\n\n await handleTraceFiles(path.join(distDir, 'next-server.js.nft.json'))\n const serverOutputPath = path.join(\n outputPath,\n path.relative(tracingRoot, dir),\n 'server.js'\n )\n await fs.mkdir(path.dirname(serverOutputPath), { recursive: true })\n\n await fs.writeFile(\n serverOutputPath,\n `${\n moduleType\n ? `performance.mark('next-start');\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport module from 'node:module'\nconst require = module.createRequire(import.meta.url)\nconst __dirname = fileURLToPath(new URL('.', import.meta.url))\n`\n : `const path = require('path')`\n }\n\nconst dir = path.join(__dirname)\n\nprocess.env.NODE_ENV = 'production'\nprocess.chdir(__dirname)\n\nconst currentPort = parseInt(process.env.PORT, 10) || 3000\nconst hostname = process.env.HOSTNAME || '0.0.0.0'\n\nlet keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)\nconst nextConfig = ${JSON.stringify(nextConfig)}\n\nprocess.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)\n\nrequire('next')\nconst { startServer } = require('next/dist/server/lib/start-server')\n\nif (\n Number.isNaN(keepAliveTimeout) ||\n !Number.isFinite(keepAliveTimeout) ||\n keepAliveTimeout < 0\n) {\n keepAliveTimeout = undefined\n}\n\nstartServer({\n dir,\n isDev: false,\n config: nextConfig,\n hostname,\n port: currentPort,\n allowRetry: false,\n keepAliveTimeout,\n}).catch((err) => {\n console.error(err);\n process.exit(1);\n});`\n )\n}\n\nexport function isReservedPage(page: string) {\n return RESERVED_PAGE.test(page)\n}\n\nexport function isAppBuiltinPage(page: string) {\n return /next[\\\\/]dist[\\\\/](esm[\\\\/])?client[\\\\/]components[\\\\/]builtin[\\\\/]/.test(\n page\n )\n}\n\nexport function isCustomErrorPage(page: string) {\n return page === '/404' || page === '/500'\n}\n\nexport function isMiddlewareFile(file: string) {\n return (\n file === `/${MIDDLEWARE_FILENAME}` ||\n file === `/src/${MIDDLEWARE_FILENAME}` ||\n file === `/${PROXY_FILENAME}` ||\n file === `/src/${PROXY_FILENAME}`\n )\n}\n\nexport function isProxyFile(file: string) {\n return file === `/${PROXY_FILENAME}` || file === `/src/${PROXY_FILENAME}`\n}\n\nexport function isInstrumentationHookFile(file: string) {\n return (\n file === `/${INSTRUMENTATION_HOOK_FILENAME}` ||\n file === `/src/${INSTRUMENTATION_HOOK_FILENAME}`\n )\n}\n\nexport function getPossibleInstrumentationHookFilenames(\n folder: string,\n extensions: string[]\n) {\n const files = []\n for (const extension of extensions) {\n files.push(\n path.join(folder, `${INSTRUMENTATION_HOOK_FILENAME}.${extension}`),\n path.join(folder, `src`, `${INSTRUMENTATION_HOOK_FILENAME}.${extension}`)\n )\n }\n\n return files\n}\n\nexport function getPossibleMiddlewareFilenames(\n folder: string,\n extensions: string[]\n) {\n return extensions.flatMap((extension) => [\n path.join(folder, `${MIDDLEWARE_FILENAME}.${extension}`),\n path.join(folder, `${PROXY_FILENAME}.${extension}`),\n ])\n}\n\nexport class NestedMiddlewareError extends Error {\n constructor(\n nestedFileNames: string[],\n mainDir: string,\n pagesOrAppDir: string\n ) {\n super(\n `Nested Middleware is not allowed, found:\\n` +\n `${nestedFileNames.map((file) => `pages${file}`).join('\\n')}\\n` +\n `Please move your code to a single file at ${path.join(\n path.posix.sep,\n path.relative(mainDir, path.resolve(pagesOrAppDir, '..')),\n 'middleware'\n )} instead.\\n` +\n `Read More - https://nextjs.org/docs/messages/nested-middleware`\n )\n }\n}\n\nexport function getSupportedBrowsers(\n dir: string,\n isDevelopment: boolean\n): string[] {\n let browsers: any\n try {\n const browsersListConfig = browserslist.loadConfig({\n path: dir,\n env: isDevelopment ? 'development' : 'production',\n })\n // Running `browserslist` resolves `extends` and other config features into a list of browsers\n if (browsersListConfig && browsersListConfig.length > 0) {\n browsers = browserslist(browsersListConfig)\n }\n } catch {}\n\n // When user has browserslist use that target\n if (browsers && browsers.length > 0) {\n return browsers\n }\n\n // Uses modern browsers as the default.\n return MODERN_BROWSERSLIST_TARGET\n}\n\nexport function shouldUseReactServerCondition(\n layer: WebpackLayerName | null | undefined\n): boolean {\n return Boolean(\n layer && WEBPACK_LAYERS.GROUP.serverOnly.includes(layer as any)\n )\n}\n\nexport function isWebpackClientOnlyLayer(\n layer: WebpackLayerName | null | undefined\n): boolean {\n return Boolean(\n layer && WEBPACK_LAYERS.GROUP.clientOnly.includes(layer as any)\n )\n}\n\nexport function isWebpackDefaultLayer(\n layer: WebpackLayerName | null | undefined\n): boolean {\n return (\n layer === null ||\n layer === undefined ||\n layer === WEBPACK_LAYERS.pagesDirBrowser ||\n layer === WEBPACK_LAYERS.pagesDirEdge ||\n layer === WEBPACK_LAYERS.pagesDirNode\n )\n}\n\nexport function isWebpackBundledLayer(\n layer: WebpackLayerName | null | undefined\n): boolean {\n return Boolean(layer && WEBPACK_LAYERS.GROUP.bundled.includes(layer as any))\n}\n\nexport function isWebpackAppPagesLayer(\n layer: WebpackLayerName | null | undefined\n): boolean {\n return Boolean(layer && WEBPACK_LAYERS.GROUP.appPages.includes(layer as any))\n}\n\nexport function collectMeta({\n status,\n headers,\n}: {\n status?: number\n headers?: OutgoingHttpHeaders\n}): {\n status?: number\n headers?: Record\n} {\n const meta: {\n status?: number\n headers?: Record\n } = {}\n\n if (status !== 200) {\n meta.status = status\n }\n\n if (headers && Object.keys(headers).length) {\n meta.headers = {}\n\n // normalize header values as initialHeaders\n // must be Record\n for (const key in headers) {\n // set-cookie is already handled - the middleware cookie setting case\n // isn't needed for the prerender manifest since it can't read cookies\n if (key === 'x-middleware-set-cookie') continue\n\n let value = headers[key]\n\n if (Array.isArray(value)) {\n if (key === 'set-cookie') {\n value = value.join(',')\n } else {\n value = value[value.length - 1]\n }\n }\n\n if (typeof value === 'string') {\n meta.headers[key] = value\n }\n }\n }\n\n return meta\n}\n\nexport const RSPACK_DEFAULT_LAYERS_REGEX = new RegExp(\n `^(|${[WEBPACK_LAYERS.pagesDirBrowser, WEBPACK_LAYERS.pagesDirEdge, WEBPACK_LAYERS.pagesDirNode].join('|')})$`\n)\n"],"names":["NestedMiddlewareError","RSPACK_DEFAULT_LAYERS_REGEX","collectMeta","collectRoutesUsingEdgeRuntime","copyTracedFiles","detectConflictingPaths","difference","getDefinedNamedExports","getPossibleInstrumentationHookFilenames","getPossibleMiddlewareFilenames","getSupportedBrowsers","hasCustomGetInitialProps","isAppBuiltinPage","isCustomErrorPage","isInstrumentationHookFile","isInstrumentationHookFilename","isMiddlewareFile","isMiddlewareFilename","isPageStatic","isProxyFile","isReservedPage","isWebpackAppPagesLayer","isWebpackBundledLayer","isWebpackClientOnlyLayer","isWebpackDefaultLayer","printBuildErrors","printCustomRoutes","printTreeView","reduceAppConfig","shouldUseReactServerCondition","unique","print","console","log","RESERVED_PAGE","main","sub","Set","a","b","filter","x","has","file","MIDDLEWARE_FILENAME","PROXY_FILENAME","INSTRUMENTATION_HOOK_FILENAME","filterAndSortList","list","routeType","hasCustomApp","pages","e","slice","sort","localeCompare","input","routesUsingEdgeRuntime","route","info","entries","isEdgeRuntime","runtime","entrypoints","isDev","topLevelFatalIssues","topLevelErrors","topLevelWarnings","seenFatalIssues","seenErrors","seenWarnings","issue","issues","severity","formatted","formatIssue","add","push","isRelevantWarning","length","warn","join","error","Error","lists","pageInfos","pagesDir","pageExtensions","middlewareManifest","useStaticPages404","hasGSPAndRevalidateZero","MIN_DURATION","process","env","__NEXT_PRIVATE_DETERMINISTIC_BUILD_OUTPUT","Infinity","getPrettyDuration","_duration","duration","green","yellow","red","bold","findPageFile","usedSymbols","messages","printFileTree","routerType","filteredPages","showRevalidate","showExpire","page","cacheControl","get","initialCacheControl","revalidate","expire","entry","map","underline","forEach","item","i","arr","pageInfo","border","totalDuration","pageDuration","ssgPageDurations","reduce","symbol","isRoutePPREnabled","hasEmptyStaticShell","isDynamicAppRoute","hasPostponed","isStatic","isSSG","formatRevalidate","formatExpire","ssgPageRoutes","totalRoutes","contSymbol","routes","some","d","previewPages","Math","min","routesWithDuration","idx","remainingRoutes","remaining","avgDuration","round","total","index","innerSymbol","app","set","includes","UNDERSCORE_NOT_FOUND_ROUTE","middlewareInfo","middleware","files","textTable","align","stringLength","str","stripAnsi","staticFunctionInfo","cyan","redirects","rewrites","headers","printRoutes","type","isRedirects","isHeaders","routesStr","routeStr","source","r","destination","statusCode","permanent","header","last","key","value","combinedRewrites","beforeFiles","afterFiles","fallback","dir","distDir","configFileName","httpAgentOptions","locales","defaultLocale","parentId","pageRuntime","edgeInfo","pageType","cacheComponents","authInterrupts","originalAppPath","isrFlushToDisk","cacheMaxMemorySize","nextConfigOutput","cacheHandler","cacheHandlers","cacheLifeProfiles","pprConfig","buildId","sriEnabled","UNDERSCORE_GLOBAL_ERROR_ROUTE","prerenderFallbackMode","undefined","prerenderedRoutes","rootParamKeys","hasStaticProps","hasServerProps","isNextImageImported","appConfig","createIncrementalCache","flushToDisk","isPageStaticSpan","trace","traceAsyncFn","setHttpClientAndAgentOptions","componentsResult","pathIsEdgeRuntime","getRuntimeContext","paths","path","edgeFunctionEntry","wasm","binding","filePath","name","useCache","mod","context","_ENTRIES","ComponentMod","buildManifest","Component","default","Document","App","routeModule","pageConfig","config","reactLoadableManifest","getServerSideProps","getStaticPaths","getStaticProps","loadComponents","isAppPath","needsManifestsForLegacyReasons","Comp","segments","collectSegments","err","cause","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY","dynamic","Log","collectRootParamKeys","definition","kind","RouteKind","APP_PAGE","checkIsRoutePPREnabled","isDynamicRoute","fallbackMode","buildAppStaticPaths","requestHeaders","isValidElementType","hasGetInitialProps","getInitialProps","hasStaticPaths","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","pageIsDynamic","buildPagesStaticPaths","globalThis","__NEXT_IMAGE_IMPORTED","catch","message","segment","fetchCache","preferredRegion","maxDuration","checkingApp","_app","origGetInitialProps","Object","keys","combinedPages","ssgPages","additionalGeneratedSSGPaths","conflictingPaths","Map","dynamicSsgPages","additionalSsgPathsByPath","pathsPage","curPath","currentPath","toLowerCase","lowerPath","conflictingPage","find","conflictingPath","size","conflictingPathsOutput","pathItems","pathItem","isDynamic","exit","pageKeys","appPageKeys","tracingRoot","serverConfig","hasNodeMiddleware","hasInstrumentationHook","staticPages","outputPath","fs","rm","recursive","force","moduleType","nextConfig","relative","packageJsonPath","packageJsonContent","readFile","packageJson","JSON","parse","packageJsonOutputPath","mkdir","dirname","writeFile","copiedFiles","handleTraceFiles","traceFilePath","traceData","copySema","Sema","capacity","traceFileDir","Promise","all","relativeFile","acquire","tracedFilePath","fileOutputPath","symlink","readlink","code","copyFile","release","handleEdgeFunction","handleFile","originalPath","assets","edgeFunctionHandlers","values","functions","hasOwnProperty","normalizePagePath","pageFile","pageTraceFile","middlewareFile","middlewareTrace","serverOutputPath","stringify","test","folder","extensions","extension","flatMap","constructor","nestedFileNames","mainDir","pagesOrAppDir","posix","sep","resolve","isDevelopment","browsers","browsersListConfig","browserslist","loadConfig","MODERN_BROWSERSLIST_TARGET","layer","Boolean","WEBPACK_LAYERS","GROUP","serverOnly","clientOnly","pagesDirBrowser","pagesDirEdge","pagesDirNode","bundled","appPages","status","meta","Array","isArray","RegExp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAm7CaA,qBAAqB;eAArBA;;IAoIAC,2BAA2B;eAA3BA;;IAhDGC,WAAW;eAAXA;;IA/1CAC,6BAA6B;eAA7BA;;IAi/BMC,eAAe;eAAfA;;IAxFNC,sBAAsB;eAAtBA;;IAx+BAC,UAAU;eAAVA;;IAi9BMC,sBAAsB;eAAtBA;;IAgXNC,uCAAuC;eAAvCA;;IAeAC,8BAA8B;eAA9BA;;IA6BAC,oBAAoB;eAApBA;;IA1bMC,wBAAwB;eAAxBA;;IAgXNC,gBAAgB;eAAhBA;;IAMAC,iBAAiB;eAAjBA;;IAiBAC,yBAAyB;eAAzBA;;IAxyCAC,6BAA6B;eAA7BA;;IA2xCAC,gBAAgB;eAAhBA;;IApyCAC,oBAAoB;eAApBA;;IA4jBMC,YAAY;eAAZA;;IAivBNC,WAAW;eAAXA;;IAvBAC,cAAc;eAAdA;;IAyIAC,sBAAsB;eAAtBA;;IANAC,qBAAqB;eAArBA;;IApBAC,wBAAwB;eAAxBA;;IAQAC,qBAAqB;eAArBA;;IAhzCAC,gBAAgB;eAAhBA;;IAuYAC,iBAAiB;eAAjBA;;IA5TMC,aAAa;eAAbA;;IA2sBNC,eAAe;eAAfA;;IA0gBAC,6BAA6B;eAA7BA;;IA14CAC,MAAM;eAANA;;;qBAnFuB;2BAuBhC;QAOA;QACA;QACA;4BAEmD;kEACpC;6DACL;oBACc;yBACI;kEACb;qEACG;4BAMlB;2BACwB;8BACF;+BACC;6DACT;gCAEU;uBACT;mCACuB;2BAC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