{"version":3,"sources":["../../../src/build/adapter/build-complete.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs/promises'\nimport { pathToFileURL } from 'url'\nimport * as Log from '../output/log'\nimport { isMiddlewareFilename } from '../utils'\nimport { RenderingMode } from '../rendering-mode'\nimport { interopDefault } from '../../lib/interop-default'\nimport type { RouteHas } from '../../lib/load-custom-routes'\nimport { recursiveReadDir } from '../../lib/recursive-readdir'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport type { Revalidate } from '../../server/lib/cache-control'\nimport type { NextConfigComplete } from '../../server/config-shared'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { AdapterOutputType, type PHASE_TYPE } from '../../shared/lib/constants'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\nimport {\n  convertRedirects,\n  convertRewrites,\n  convertHeaders,\n} from 'next/dist/compiled/@vercel/routing-utils'\n\nimport type {\n  MiddlewareManifest,\n  EdgeFunctionDefinition,\n} from '../webpack/plugins/middleware-plugin'\n\nimport type {\n  RoutesManifest,\n  PrerenderManifest,\n  ManifestRewriteRoute,\n  FunctionsConfigManifest,\n  DynamicPrerenderManifestRoute,\n  ManifestHeaderRoute,\n} from '..'\n\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  HTML_CONTENT_TYPE_HEADER,\n  JSON_CONTENT_TYPE_HEADER,\n  NEXT_QUERY_PARAM_PREFIX,\n  NEXT_RESUME_HEADER,\n} from '../../lib/constants'\n\nimport { normalizeLocalePath } from '../../shared/lib/i18n/normalize-locale-path'\nimport { isStaticMetadataFile } from '../../lib/metadata/is-metadata-route'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport { getRedirectStatus, modifyRouteRegex } from '../../lib/redirect-status'\nimport { getNamedRouteRegex } from '../../shared/lib/router/utils/route-regex'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\nimport { sortSortableRoutes } from '../../shared/lib/router/utils/sortable-routes'\nimport { defaultOverrides } from '../../server/require-hook'\nimport { generateRoutesManifest } from '../generate-routes-manifest'\nimport { Bundler } from '../../lib/bundler'\n\ninterface SharedRouteFields {\n  /**\n   * id is the unique identifier of the output\n   */\n  id: string\n  /**\n   * filePath is the location on disk of the built entrypoint asset\n   */\n  filePath: string\n  /**\n   * pathname is the URL pathname the asset should be served at\n   */\n  pathname: string\n\n  /**\n   * sourcePage is the original source in the app or pages folder\n   */\n  sourcePage: string\n\n  /**\n   * runtime is which runtime the entrypoint is built for\n   */\n  runtime: 'nodejs' | 'edge'\n  /**\n   * assets are all necessary traced assets that could be\n   * loaded by the output to handle a request e.g. traced\n   * node_modules or necessary manifests for Next.js.\n   * The key is the relative path from the repo root and the value\n   * is the absolute path to the file\n   */\n  assets: Record<string, string>\n\n  /**\n   * wasmAssets are bundled wasm files with mapping of name\n   * to filePath on disk\n   */\n  wasmAssets?: Record<string, string>\n\n  /**\n   * edgeRuntime contains canonical entry metadata for invoking\n   * this output in an edge runtime.\n   */\n  edgeRuntime?: {\n    /**\n     * modulePath is the canonical module path that registers this\n     * output in the edge runtime.\n     */\n    modulePath: string\n    /**\n     * entryKey is the canonical key used for the global edge entry registry.\n     */\n    entryKey: string\n    /**\n     * handlerExport is the export name to invoke on the edge entry.\n     */\n    handlerExport: string\n  }\n\n  /**\n   * config related to the route\n   */\n  config: {\n    /**\n     * maxDuration is a segment config to signal the max\n     * execution duration a route should be allowed before\n     * it's timed out\n     */\n    maxDuration?: number\n    /**\n     * preferredRegion is a segment config to signal deployment\n     * region preferences to the provider being used\n     */\n    preferredRegion?: string | string[]\n\n    /**\n     * env is the environment variables to expose, this is only\n     * populated for edge runtime currently\n     */\n    env?: Record<string, string>\n  }\n}\n\nexport interface AdapterOutput {\n  /**\n   * `PAGES` represents all the React pages that are under `pages/`.\n   */\n  PAGES: SharedRouteFields & {\n    type: AdapterOutputType.PAGES\n  }\n\n  /**\n   * `PAGES_API` represents all the API routes under `pages/api/`.\n   */\n  PAGES_API: SharedRouteFields & {\n    type: AdapterOutputType.PAGES_API\n  }\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: SharedRouteFields & {\n    type: AdapterOutputType.APP_PAGE\n  }\n\n  /**\n   * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n   * filename of `route.{j,t}s{,x}`.\n   */\n  APP_ROUTE: SharedRouteFields & {\n    type: AdapterOutputType.APP_ROUTE\n  }\n\n  /**\n   * `PRERENDER` represents an ISR enabled route that might\n   * have a seeded cache entry or fallback generated during build\n   */\n  PRERENDER: {\n    id: string\n    pathname: string\n    type: AdapterOutputType.PRERENDER\n\n    /**\n     * For prerenders the parent output is the originating\n     * page that the prerender is created from\n     */\n    parentOutputId: string\n\n    /**\n     * groupId is the identifier for a group of prerenders that should be\n     * revalidated together\n     */\n    groupId: number\n\n    pprChain?: {\n      headers: Record<string, string>\n    }\n\n    /**\n     * parentFallbackMode signals whether additional routes can be generated\n     * e.g. fallback: false or 'blocking' in getStaticPaths in pages router\n     */\n    parentFallbackMode?: DynamicPrerenderManifestRoute['fallback']\n\n    /**\n     * fallback is initial cache data generated during build for a prerender\n     */\n    fallback?: {\n      /**\n       * path to the fallback file can be HTML/JSON/RSC,\n       */\n      filePath: string | undefined\n      /**\n       * initialStatus is the status code that should be applied\n       * when serving the fallback\n       */\n      initialStatus?: number\n      /**\n       * initialHeaders are the headers that should be sent when\n       * serving the fallback\n       */\n      initialHeaders?: Record<string, string | string[]>\n      /**\n       * initial expiration is how long until the fallback entry\n       * is considered expired and no longer valid to serve\n       */\n      initialExpiration?: number\n      /**\n       * initial revalidate is how long until the fallback is\n       * considered stale and should be revalidated\n       */\n      initialRevalidate?: Revalidate\n\n      /**\n       * postponedState is the PPR state when it postponed and is used for resuming\n       */\n      postponedState: string | undefined\n    }\n\n    /**\n     * config related to the route\n     */\n    config: {\n      /**\n       * allowQuery is the allowed query values to be passed\n       * to an ISR function and what should be considered for the cacheKey\n       * e.g. for /blog/[slug], \"slug\" is the only allowQuery\n       */\n      allowQuery?: string[]\n      /**\n       * allowHeader is the allowed headers to be passed to an\n       * ISR function to prevent accidentally poisoning the cache\n       * from leaking additional information that can impact the render\n       */\n      allowHeader?: string[]\n      /**\n       * bypass for is a list of has conditions the cache\n       * should be bypassed and invoked directly e.g. action header\n       */\n      bypassFor?: RouteHas[]\n      /**\n       * renderingMode signals PPR or not for a prerender\n       */\n      renderingMode?: RenderingMode\n      /**\n       * partialFallback signals this prerender serves a partial fallback shell\n       * and should be upgraded to a full route in the background.\n       */\n      partialFallback?: boolean\n\n      /**\n       * bypassToken is the generated token that signals a prerender cache\n       * should be bypassed\n       */\n      bypassToken?: string\n    }\n  }\n\n  /**\n   * `STATIC_FILE` represents a static file (ie /_next/static) or a purely\n   * static HTML asset e.g. an automatically statically optimized page\n   * that does not use ISR\n   */\n  STATIC_FILE: {\n    id: string\n    filePath: string\n    pathname: string\n    type: AdapterOutputType.STATIC_FILE\n    /**\n     * If this static file is immutable (because its filename contains a content hash), then this\n     * field contains the untruncated content hash.\n     */\n    immutableHash: string | undefined\n  }\n\n  /**\n   * `MIDDLEWARE` represents the middleware output if present\n   */\n  MIDDLEWARE: SharedRouteFields & {\n    type: AdapterOutputType.MIDDLEWARE\n    /**\n     * config related to the route\n     */\n    config: SharedRouteFields['config'] & {\n      /**\n       * matchers are the configured matchers for middleware\n       */\n      matchers?: Array<{\n        source: string\n        sourceRegex: string\n        has: RouteHas[] | undefined\n        missing: RouteHas[] | undefined\n      }>\n    }\n  }\n}\n\nexport interface AdapterOutputs {\n  pages: Array<AdapterOutput['PAGES']>\n  middleware?: AdapterOutput['MIDDLEWARE']\n  appPages: Array<AdapterOutput['APP_PAGE']>\n  pagesApi: Array<AdapterOutput['PAGES_API']>\n  appRoutes: Array<AdapterOutput['APP_ROUTE']>\n  prerenders: Array<AdapterOutput['PRERENDER']>\n  staticFiles: Array<AdapterOutput['STATIC_FILE']>\n}\n\ntype RewriteItem = {\n  source: string\n  sourceRegex: string\n  destination: string\n  has: RouteHas[] | undefined\n  missing: RouteHas[] | undefined\n}\n\ntype DynamicRouteItem = {\n  source: string\n  sourceRegex: string\n  destination: string\n  has: RouteHas[] | undefined\n  missing: RouteHas[] | undefined\n}\n\ntype Route = {\n  // regex as string can have named or un-named matches\n  source?: string\n  sourceRegex: string\n  // destination can have matches to replace in destination\n  // keyed by $1 for un-named and $name for named\n  destination?: string\n  headers?: Record<string, string>\n  has?: RouteHas[]\n  missing?: RouteHas[]\n  status?: number\n  priority?: boolean\n}\n\nexport interface NextAdapter {\n  name: string\n  /**\n   * modifyConfig is called for any CLI command that loads the next.config\n   * to only apply for specific commands the \"phase\" should be used\n   * @param config\n   * @param ctx\n   * @returns\n   */\n  modifyConfig?: (\n    config: NextConfigComplete,\n    ctx: {\n      phase: PHASE_TYPE\n      /**\n       * nextVersion is the current version of Next.js being used\n       */\n      nextVersion: string\n    }\n  ) => Promise<NextConfigComplete> | NextConfigComplete\n  onBuildComplete?: (ctx: {\n    routing: {\n      beforeMiddleware: Array<Route>\n      beforeFiles: Array<Route>\n      afterFiles: Array<Route>\n      dynamicRoutes: Array<Route>\n      onMatch: Array<Route>\n      fallback: Array<Route>\n      /**\n       * shouldNormalizeNextData indicates whether Next.js data URLs\n       * (e.g., /_next/data/BUILD_ID/page.json) should be normalized\n       * during route resolution. This is true when middleware is present\n       * and there are pages router items to resolve.\n       */\n      shouldNormalizeNextData: boolean\n      rsc: RoutesManifest['rsc']\n    }\n    outputs: AdapterOutputs\n    /**\n     * projectDir is the absolute directory the Next.js application is in\n     */\n    projectDir: string\n    /**\n     * repoRoot is the absolute path of the detected root of the repo\n     */\n    repoRoot: string\n    /**\n     * distDir is the absolute path to the dist directory\n     */\n    distDir: string\n    /**\n     * config is the loaded next.config (has modifyConfig applied)\n     */\n    config: NextConfigComplete\n    /**\n     * nextVersion is the current version of Next.js being used\n     */\n    nextVersion: string\n    /**\n     * buildId is the current unique ID for the build, this can be\n     * influenced by NextConfig.generateBuildId\n     */\n    buildId: string\n  }) => Promise<void> | void\n}\n\nfunction normalizePathnames(\n  config: NextConfigComplete,\n  outputs: AdapterOutputs\n) {\n  // normalize pathname field with basePath\n  if (config.basePath) {\n    for (const output of [\n      ...outputs.pages,\n      ...outputs.pagesApi,\n      ...outputs.appPages,\n      ...outputs.appRoutes,\n      ...outputs.prerenders,\n      ...outputs.staticFiles,\n    ]) {\n      output.pathname =\n        addPathPrefix(output.pathname, config.basePath).replace(/\\/$/, '') ||\n        '/'\n    }\n  }\n}\n\nexport async function handleBuildComplete({\n  dir,\n  config,\n  appType,\n  buildId,\n  configOutDir,\n  distDir,\n  pageKeys,\n  bundler,\n  tracingRoot,\n  adapterPath,\n  appPageKeys,\n  staticPages,\n  nextVersion,\n  hasStatic404,\n  hasStatic500,\n  routesManifest,\n  serverPropsPages,\n  hasNodeMiddleware,\n  prerenderManifest,\n  middlewareManifest,\n  requiredServerFiles,\n  hasInstrumentationHook,\n  functionsConfigManifest,\n}: {\n  dir: string\n  appType: 'app' | 'pages' | 'hybrid'\n  distDir: string\n  buildId: string\n  configOutDir: string\n  adapterPath: string\n  tracingRoot: string\n  nextVersion: string\n  hasStatic404: boolean\n  hasStatic500: boolean\n  bundler: Bundler\n  staticPages: Set<string>\n  hasNodeMiddleware: boolean\n  config: NextConfigComplete\n  pageKeys: readonly string[]\n  serverPropsPages: Set<string>\n  requiredServerFiles: string[]\n  routesManifest: RoutesManifest\n  hasInstrumentationHook: boolean\n  prerenderManifest: PrerenderManifest\n  middlewareManifest: MiddlewareManifest\n  appPageKeys?: readonly string[] | undefined\n  functionsConfigManifest: FunctionsConfigManifest\n}) {\n  const adapterMod = interopDefault(\n    await import(pathToFileURL(require.resolve(adapterPath)).href)\n  ) as NextAdapter\n\n  if (typeof adapterMod.onBuildComplete === 'function') {\n    const outputs: AdapterOutputs = {\n      pages: [],\n      pagesApi: [],\n      appPages: [],\n      appRoutes: [],\n      prerenders: [],\n      staticFiles: [],\n    }\n\n    if (config.output === 'export') {\n      // collect export assets and provide as static files\n      const exportFiles = await recursiveReadDir(configOutDir)\n\n      for (const file of exportFiles) {\n        let pathname = (\n          file.endsWith('.html') ? file.replace(/\\.html$/, '') : file\n        ).replace(/\\\\/g, '/')\n\n        pathname = pathname.startsWith('/') ? pathname : `/${pathname}`\n\n        outputs.staticFiles.push({\n          id: file,\n          pathname,\n          filePath: path.join(configOutDir, file),\n          type: AdapterOutputType.STATIC_FILE,\n          immutableHash: undefined,\n        } satisfies AdapterOutput['STATIC_FILE'])\n      }\n    } else {\n      const staticFiles = await recursiveReadDir(path.join(distDir, 'static'))\n\n      const clientHashes: Record<string, string> | undefined =\n        bundler === Bundler.Turbopack && config.experimental.immutableAssetToken\n          ? JSON.parse(\n              await fs.readFile(\n                path.join(distDir, 'immutable-static-hashes.json'),\n                'utf8'\n              )\n            )\n          : undefined\n\n      for (const file of staticFiles) {\n        const pathname = path.posix.join('/_next/static', file)\n        const filePath = path.join(distDir, 'static', file)\n        const id = path.join('static', file)\n        outputs.staticFiles.push({\n          type: AdapterOutputType.STATIC_FILE,\n          id,\n          pathname,\n          filePath,\n          immutableHash: clientHashes?.[id],\n        })\n      }\n\n      const sharedNodeAssets: Record<string, string> = {}\n      const pagesSharedNodeAssets: Record<string, string> = {}\n      const appPagesSharedNodeAssets: Record<string, string> = {}\n\n      for (const file of requiredServerFiles) {\n        // add to shared node assets\n        const filePath = path.join(dir, file)\n        const fileOutputPath = path.relative(tracingRoot, filePath)\n        sharedNodeAssets[fileOutputPath] = filePath\n      }\n\n      // add \"next/setup-node-env\" stub so it can be required top-level\n      // TODO: should we make this always available without adapters\n      const setupNodeStubPath = path.join(\n        path.dirname(require.resolve('next/package.json')),\n        'setup-node-env.js'\n      )\n      sharedNodeAssets[path.relative(tracingRoot, setupNodeStubPath)] =\n        require.resolve('next/dist/build/adapter/setup-node-env.external')\n\n      const moduleTypes = ['app-page', 'pages'] as const\n\n      for (const type of moduleTypes) {\n        const currentDependencies: string[] = []\n        const modulePath = require.resolve(\n          `next/dist/server/route-modules/${type}/module.compiled`\n        )\n        currentDependencies.push(modulePath)\n\n        const contextDir = path.join(\n          path.dirname(modulePath),\n          'vendored',\n          'contexts'\n        )\n\n        for (const item of await fs.readdir(contextDir)) {\n          if (item.match(/\\.(mjs|cjs|js)$/)) {\n            currentDependencies.push(path.join(contextDir, item))\n          }\n        }\n\n        for (const dependencyPath of currentDependencies) {\n          const rootRelativeFilePath = path.relative(\n            tracingRoot,\n            dependencyPath\n          )\n\n          if (type === 'pages') {\n            pagesSharedNodeAssets[rootRelativeFilePath] = path.join(\n              tracingRoot,\n              rootRelativeFilePath\n            )\n          } else {\n            appPagesSharedNodeAssets[rootRelativeFilePath] = path.join(\n              tracingRoot,\n              rootRelativeFilePath\n            )\n          }\n        }\n      }\n\n      if (bundler !== Bundler.Turbopack) {\n        const { nodeFileTrace } =\n          require('next/dist/compiled/@vercel/nft') as typeof import('next/dist/compiled/@vercel/nft')\n        const { makeIgnoreFn } =\n          require('../collect-build-traces') as typeof import('../collect-build-traces')\n\n        const sharedTraceIgnores = [\n          '**/next/dist/compiled/next-server/**/*.dev.js',\n          '**/next/dist/compiled/webpack/*',\n          '**/node_modules/webpack5/**/*',\n          '**/next/dist/server/lib/route-resolver*',\n          'next/dist/compiled/semver/semver/**/*.js',\n          '**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js',\n          '**/*.d.ts',\n          '**/*.map',\n          '**/next/dist/pages/**/*',\n          '**/node_modules/sharp/**/*',\n          '**/@img/sharp-libvips*/**/*',\n          '**/next/dist/compiled/edge-runtime/**/*',\n          '**/next/dist/server/web/sandbox/**/*',\n          '**/next/dist/server/post-process.js',\n        ]\n        const sharedIgnoreFn = makeIgnoreFn(tracingRoot, sharedTraceIgnores)\n\n        // These are modules that are necessary for bootstrapping node env\n        const necessaryNodeDependencies = [\n          require.resolve('next/dist/server/node-environment'),\n          require.resolve('next/dist/server/require-hook'),\n          require.resolve('next/dist/server/node-polyfill-crypto'),\n          ...Object.values(defaultOverrides).filter((item) =>\n            path.extname(item)\n          ),\n        ]\n\n        const { fileList, esmFileList } = await nodeFileTrace(\n          necessaryNodeDependencies,\n          {\n            base: tracingRoot,\n            ignore: sharedIgnoreFn,\n          }\n        )\n        esmFileList.forEach((item) => fileList.add(item))\n\n        for (const rootRelativeFilePath of fileList) {\n          sharedNodeAssets[rootRelativeFilePath] = path.join(\n            tracingRoot,\n            rootRelativeFilePath\n          )\n        }\n      }\n\n      if (hasInstrumentationHook) {\n        const assets = await handleTraceFiles(\n          path.join(distDir, 'server', 'instrumentation.js.nft.json'),\n          'neutral'\n        )\n        const fileOutputPath = path.relative(\n          tracingRoot,\n          path.join(distDir, 'server', 'instrumentation.js')\n        )\n        sharedNodeAssets[fileOutputPath] = path.join(\n          distDir,\n          'server',\n          'instrumentation.js'\n        )\n        Object.assign(sharedNodeAssets, assets)\n      }\n\n      async function handleTraceFiles(\n        traceFilePath: string,\n        type: 'pages' | 'app' | 'neutral'\n      ): Promise<Record<string, string>> {\n        const assets: Record<string, string> = Object.assign(\n          {},\n          sharedNodeAssets,\n          type === 'pages' ? pagesSharedNodeAssets : {},\n          type === 'app' ? appPagesSharedNodeAssets : {}\n        )\n        const traceData = JSON.parse(\n          await fs.readFile(traceFilePath, 'utf8')\n        ) as {\n          files: string[]\n        }\n        const traceFileDir = path.dirname(traceFilePath)\n\n        for (const relativeFile of traceData.files) {\n          const tracedFilePath = path.join(traceFileDir, relativeFile)\n          const fileOutputPath = path.relative(tracingRoot, tracedFilePath)\n          assets[fileOutputPath] = tracedFilePath\n        }\n        return assets\n      }\n\n      async function handleEdgeFunction(\n        page: EdgeFunctionDefinition,\n        isMiddleware: boolean = false\n      ) {\n        let type: AdapterOutputType = AdapterOutputType.PAGES\n        const isAppPrefix = page.name.startsWith('app/')\n        const isAppPage = isAppPrefix && page.name.endsWith('/page')\n        const isAppRoute = isAppPrefix && page.name.endsWith('/route')\n        let currentOutputs: Array<\n          | AdapterOutput['PAGES']\n          | AdapterOutput['PAGES_API']\n          | AdapterOutput['APP_PAGE']\n          | AdapterOutput['APP_ROUTE']\n        > = outputs.pages\n\n        if (isMiddleware) {\n          type = AdapterOutputType.MIDDLEWARE\n        } else if (isAppPage) {\n          currentOutputs = outputs.appPages\n          type = AdapterOutputType.APP_PAGE\n        } else if (isAppRoute) {\n          currentOutputs = outputs.appRoutes\n          type = AdapterOutputType.APP_ROUTE\n        } else if (page.page.startsWith('/api')) {\n          currentOutputs = outputs.pagesApi\n          type = AdapterOutputType.PAGES_API\n        }\n\n        const route = page.page.replace(/^(app|pages)\\//, '')\n        const pathname = isAppPrefix\n          ? normalizeAppPath(route)\n          : route === '/index'\n            ? '/'\n            : route\n        const edgeEntrypointRelativePath = page.entrypoint\n        const edgeEntrypointPath = path.join(\n          distDir,\n          edgeEntrypointRelativePath\n        )\n\n        const output: Omit<AdapterOutput[typeof type], 'type'> & {\n          type: any\n        } = {\n          type,\n          id: page.name,\n          runtime: 'edge',\n          sourcePage: route,\n          pathname,\n          filePath: edgeEntrypointPath,\n          edgeRuntime: {\n            modulePath: edgeEntrypointPath,\n            entryKey: `middleware_${page.name}`,\n            handlerExport: 'handler',\n          },\n          assets: {},\n          wasmAssets: {},\n          config: {\n            env: page.env,\n          },\n        }\n\n        function handleFile(file: string) {\n          const originalPath = path.join(distDir, file)\n          const fileOutputPath = path.relative(\n            config.distDir,\n            path.join(path.relative(tracingRoot, distDir), file)\n          )\n          if (!output.assets) {\n            output.assets = {}\n          }\n          output.assets[fileOutputPath] = originalPath\n        }\n        for (const file of page.files) {\n          handleFile(file)\n        }\n        for (const item of [...(page.assets || [])]) {\n          if (!output.assets) {\n            output.assets = {}\n          }\n          output.assets[item.name] = path.join(distDir, item.filePath)\n        }\n        for (const item of page.wasm || []) {\n          if (!output.wasmAssets) {\n            output.wasmAssets = {}\n          }\n          output.wasmAssets[item.name] = path.join(distDir, item.filePath)\n        }\n\n        if (type === AdapterOutputType.MIDDLEWARE) {\n          ;(output as AdapterOutput['MIDDLEWARE']).config.matchers =\n            page.matchers.map((item) => {\n              return {\n                source: item.originalSource,\n                sourceRegex: item.regexp,\n                has: item.has,\n                missing: [\n                  ...(item.missing || []),\n                  // always skip middleware for on-demand revalidate\n                  {\n                    type: 'header',\n                    key: 'x-prerender-revalidate',\n                    value: prerenderManifest.preview.previewModeId,\n                  },\n                ],\n              }\n            })\n          output.pathname = '/_middleware'\n          output.id = page.name\n          outputs.middleware = output\n        } else {\n          currentOutputs.push(output)\n        }\n\n        // need to add matching .rsc output\n        if (isAppPage) {\n          const rscPathname = normalizePagePath(output.pathname) + '.rsc'\n          outputs.appPages.push({\n            ...output,\n            pathname: rscPathname,\n            id: page.name + '.rsc',\n          })\n        } else if (\n          type !== AdapterOutputType.MIDDLEWARE &&\n          serverPropsPages.has(pathname)\n        ) {\n          const nextDataPath = path.posix.join(\n            '/_next/data/',\n            buildId,\n            normalizePagePath(pathname) + '.json'\n          )\n          outputs.pages.push({\n            ...output,\n            pathname: nextDataPath,\n          })\n        }\n      }\n\n      const edgeFunctionHandlers: Promise<any>[] = []\n\n      for (const middleware of Object.values(middlewareManifest.middleware)) {\n        if (isMiddlewareFilename(middleware.name)) {\n          edgeFunctionHandlers.push(handleEdgeFunction(middleware, true))\n        }\n      }\n\n      for (const page of Object.values(middlewareManifest.functions)) {\n        edgeFunctionHandlers.push(handleEdgeFunction(page))\n      }\n      const pagesDistDir = path.join(distDir, 'server', 'pages')\n      const pageOutputMap: Record<\n        string,\n        AdapterOutput['PAGES'] | AdapterOutput['PAGES_API']\n      > = {}\n\n      const rscFallbackPath = path.join(distDir, 'server', 'rsc-fallback.json')\n\n      if (appPageKeys && appPageKeys.length > 0 && pageKeys.length > 0) {\n        await fs.writeFile(rscFallbackPath, '{}')\n      }\n\n      for (const page of pageKeys) {\n        if (page === '/_app' || page === '/_document') {\n          continue\n        }\n\n        if (middlewareManifest.functions.hasOwnProperty(page)) {\n          continue\n        }\n\n        const route = normalizePagePath(page)\n        const pageFile = path.join(pagesDistDir, `${route}.js`)\n\n        // if it's an auto static optimized page it's just\n        // a static file\n        if (staticPages.has(page)) {\n          if (config.i18n) {\n            for (const locale of config.i18n.locales || []) {\n              const localePage =\n                page === '/' ? `/${locale}` : addPathPrefix(page, `/${locale}`)\n\n              const localeOutput = {\n                id: localePage,\n                pathname: localePage,\n                type: AdapterOutputType.STATIC_FILE,\n                filePath: path.join(\n                  pagesDistDir,\n                  `${normalizePagePath(localePage)}.html`\n                ),\n                immutableHash: undefined,\n              } satisfies AdapterOutput['STATIC_FILE']\n\n              outputs.staticFiles.push(localeOutput)\n\n              if (appPageKeys && appPageKeys.length > 0) {\n                outputs.staticFiles.push({\n                  id: `${localePage}.rsc`,\n                  pathname: `${localePage}.rsc`,\n                  type: AdapterOutputType.STATIC_FILE,\n                  filePath: rscFallbackPath,\n                  immutableHash: undefined,\n                })\n              }\n            }\n          } else {\n            const staticOutput = {\n              id: page,\n              pathname: route,\n              type: AdapterOutputType.STATIC_FILE,\n              filePath: pageFile.replace(/\\.js$/, '.html'),\n              immutableHash: undefined,\n            } satisfies AdapterOutput['STATIC_FILE']\n\n            outputs.staticFiles.push(staticOutput)\n\n            if (appPageKeys && appPageKeys.length > 0) {\n              outputs.staticFiles.push({\n                id: `${page}.rsc`,\n                pathname: `${route}.rsc`,\n                type: AdapterOutputType.STATIC_FILE,\n                filePath: rscFallbackPath,\n                immutableHash: undefined,\n              })\n            }\n          }\n          // if was a static file output don't create page output as well\n          continue\n        }\n\n        const pageTraceFile = `${pageFile}.nft.json`\n        const assets = await handleTraceFiles(pageTraceFile, 'pages').catch(\n          (err) => {\n            if (err.code !== 'ENOENT' || (page !== '/404' && page !== '/500')) {\n              Log.warn(`Failed to locate traced assets for ${pageFile}`, err)\n            }\n            return {} as Record<string, string>\n          }\n        )\n        const functionConfig = functionsConfigManifest.functions[route] || {}\n        let sourcePage = route.replace(/^\\//, '')\n\n        sourcePage = sourcePage === 'api' ? 'api/index' : sourcePage\n\n        const output: AdapterOutput['PAGES'] | AdapterOutput['PAGES_API'] = {\n          id: route,\n          type: page.startsWith('/api')\n            ? AdapterOutputType.PAGES_API\n            : AdapterOutputType.PAGES,\n          filePath: pageTraceFile.replace(/\\.nft\\.json$/, ''),\n          pathname: route,\n          sourcePage,\n          assets,\n          runtime: 'nodejs',\n          config: {\n            maxDuration: functionConfig.maxDuration,\n            preferredRegion: functionConfig.regions,\n          },\n        }\n        pageOutputMap[page] = output\n\n        if (output.type === AdapterOutputType.PAGES) {\n          outputs.pages.push(output)\n\n          // if page is get server side props we need to create\n          // the _next/data output as well\n          if (serverPropsPages.has(page)) {\n            const dataPathname = path.posix.join(\n              '/_next/data',\n              buildId,\n              normalizePagePath(page) + '.json'\n            )\n            outputs.pages.push({\n              ...output,\n              pathname: dataPathname,\n              id: dataPathname,\n            })\n\n            if (appPageKeys && appPageKeys.length > 0) {\n              const rscPage = `${page === '/' ? '/index' : page}.rsc`\n              outputs.staticFiles.push({\n                id: rscPage,\n                pathname: rscPage,\n                type: AdapterOutputType.STATIC_FILE,\n                filePath: rscFallbackPath,\n                immutableHash: undefined,\n              })\n            }\n          }\n\n          for (const locale of config.i18n?.locales || []) {\n            const localePage =\n              page === '/' ? `/${locale}` : addPathPrefix(page, `/${locale}`)\n\n            outputs.pages.push({\n              ...output,\n              id: localePage,\n              pathname: localePage,\n            })\n\n            if (serverPropsPages.has(page)) {\n              const dataPathname = path.posix.join(\n                '/_next/data',\n                buildId,\n                localePage + '.json'\n              )\n              outputs.pages.push({\n                ...output,\n                pathname: dataPathname,\n                id: dataPathname,\n              })\n              if (appPageKeys && appPageKeys.length > 0) {\n                outputs.staticFiles.push({\n                  id: `${localePage}.rsc`,\n                  pathname: `${localePage}.rsc`,\n                  type: AdapterOutputType.STATIC_FILE,\n                  filePath: rscFallbackPath,\n                  immutableHash: undefined,\n                })\n              }\n            }\n          }\n        } else {\n          outputs.pagesApi.push(output)\n        }\n      }\n\n      if (hasNodeMiddleware) {\n        const middlewareFile = path.join(distDir, 'server', 'middleware.js')\n        const middlewareTrace = `${middlewareFile}.nft.json`\n        const assets = await handleTraceFiles(middlewareTrace, 'neutral')\n        const functionConfig =\n          functionsConfigManifest.functions['/_middleware'] || {}\n\n        outputs.middleware = {\n          pathname: '/_middleware',\n          id: '/_middleware',\n          sourcePage: 'middleware',\n          assets,\n          type: AdapterOutputType.MIDDLEWARE,\n          runtime: 'nodejs',\n          filePath: middlewareFile,\n          config: {\n            matchers:\n              functionConfig.matchers?.map((item) => {\n                return {\n                  source: item.originalSource,\n                  sourceRegex: item.regexp,\n                  has: item.has,\n                  missing: [\n                    ...(item.missing || []),\n                    // always skip middleware for on-demand revalidate\n                    {\n                      type: 'header',\n                      key: 'x-prerender-revalidate',\n                      value: prerenderManifest.preview.previewModeId,\n                    },\n                  ],\n                }\n              }) || [],\n          },\n        } satisfies AdapterOutput['MIDDLEWARE']\n      }\n      const appOutputMap: Record<\n        string,\n        AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE']\n      > = {}\n      const appDistDir = path.join(distDir, 'server', 'app')\n\n      if (appPageKeys) {\n        for (const page of appPageKeys) {\n          if (middlewareManifest.functions.hasOwnProperty(page)) {\n            continue\n          }\n          const normalizedPage = normalizeAppPath(page)\n\n          // Skip static metadata routes only when they are prerendered.\n          // Dynamic metadata routes (e.g. robots/sitemap using connection())\n          // should remain app routes in adapter outputs.\n          const isStaticMetadataRoute = isStaticMetadataFile(normalizedPage)\n          const isPrerenderedMetadataRoute =\n            prerenderManifest.routes[normalizedPage] ||\n            prerenderManifest.dynamicRoutes[normalizedPage] ||\n            config.i18n?.locales?.some((locale) => {\n              const localePathname = path.posix.join(\n                '/',\n                locale,\n                normalizedPage.slice(1)\n              )\n              return (\n                prerenderManifest.routes[localePathname] ||\n                prerenderManifest.dynamicRoutes[localePathname]\n              )\n            })\n\n          if (isStaticMetadataRoute && isPrerenderedMetadataRoute) {\n            continue\n          }\n          const pageFile = path.join(appDistDir, `${page}.js`)\n          const pageTraceFile = `${pageFile}.nft.json`\n          const assets = await handleTraceFiles(pageTraceFile, 'app').catch(\n            (err) => {\n              Log.warn(`Failed to copy traced files for ${pageFile}`, err)\n              return {} as Record<string, string>\n            }\n          )\n\n          // If this is a parallel route we just need to merge\n          // the assets as they share the same pathname\n          const existingOutput = appOutputMap[normalizedPage]\n          if (existingOutput) {\n            Object.assign(existingOutput.assets, assets)\n            existingOutput.assets[path.relative(tracingRoot, pageFile)] =\n              pageFile\n\n            continue\n          }\n\n          const functionConfig =\n            functionsConfigManifest.functions[normalizedPage] || {}\n\n          const output: AdapterOutput['APP_PAGE'] | AdapterOutput['APP_ROUTE'] =\n            {\n              pathname: normalizedPage,\n              id: normalizedPage,\n              sourcePage: page,\n              assets,\n              type: page.endsWith('/route')\n                ? AdapterOutputType.APP_ROUTE\n                : AdapterOutputType.APP_PAGE,\n              runtime: 'nodejs',\n              filePath: pageFile,\n              config: {\n                maxDuration: functionConfig.maxDuration,\n                preferredRegion: functionConfig.regions,\n              },\n            }\n          appOutputMap[normalizedPage] = output\n\n          if (output.type === AdapterOutputType.APP_PAGE) {\n            outputs.appPages.push({\n              ...output,\n              pathname: normalizePagePath(output.pathname) + '.rsc',\n              id: normalizePagePath(output.pathname) + '.rsc',\n            })\n            outputs.appPages.push(output)\n          } else {\n            outputs.appRoutes.push(output)\n            outputs.appRoutes.push({\n              ...output,\n              pathname: normalizePagePath(output.pathname) + '.rsc',\n              id: normalizePagePath(output.pathname) + '.rsc',\n            })\n          }\n        }\n      }\n\n      const getParentOutput = (\n        srcRoute: string,\n        childRoute: string,\n        allowMissing?: boolean\n      ) => {\n        const normalizedSrcRoute = normalizeLocalePath(\n          srcRoute,\n          config.i18n?.locales || []\n        ).pathname\n        const parentOutput =\n          pageOutputMap[normalizedSrcRoute] || appOutputMap[normalizedSrcRoute]\n\n        if (!parentOutput && !allowMissing) {\n          console.error({\n            appOutputs: Object.keys(appOutputMap),\n            pageOutputs: Object.keys(pageOutputMap),\n          })\n          throw new Error(\n            `Invariant: failed to find source route ${srcRoute} for prerender ${childRoute}`\n          )\n        }\n        return parentOutput\n      }\n\n      const {\n        prefetchSegmentDirSuffix,\n        prefetchSegmentSuffix,\n        varyHeader,\n        didPostponeHeader,\n        contentTypeHeader: rscContentTypeHeader,\n      } = routesManifest.rsc\n\n      const handleAppMeta = async (\n        route: string,\n        initialOutput: AdapterOutput['PRERENDER'],\n        meta: AppRouteMeta,\n        ctx: {\n          htmlAllowQuery?: string[]\n          dataAllowQuery?: string[]\n        }\n      ) => {\n        if (meta.postponed && initialOutput.fallback) {\n          initialOutput.fallback.postponedState = meta.postponed\n        }\n\n        if (meta?.segmentPaths) {\n          const normalizedRoute = normalizePagePath(route)\n          const segmentsDir = path.join(\n            appDistDir,\n            `${normalizedRoute}${prefetchSegmentDirSuffix}`\n          )\n\n          // If client param parsing is enabled, we follow the same logic as\n          // the HTML allowQuery as it's already going to vary based on if\n          // there's a static shell generated or if there's fallback root\n          // params. If there are fallback root params, and we can serve a\n          // fallback, then we should follow the same logic for the segment\n          // prerenders.\n          //\n          // If client param parsing is not enabled, we have to use the\n          // allowQuery because the segment payloads will contain dynamic\n          // segment values.\n          const segmentAllowQuery = routesManifest.rsc.clientParamParsing\n            ? ctx.htmlAllowQuery\n            : ctx.dataAllowQuery\n\n          for (const segmentPath of meta.segmentPaths) {\n            const outputSegmentPath =\n              path.join(\n                normalizedRoute + prefetchSegmentDirSuffix,\n                segmentPath\n              ) + prefetchSegmentSuffix\n\n            // Only use the fallback value when the allowQuery is defined and\n            // either: (1) it is empty, meaning segments do not vary by params,\n            // or (2) client param parsing is enabled, meaning the segment\n            // payloads are safe to reuse across params.\n            const shouldAttachSegmentFallback =\n              segmentAllowQuery &&\n              (segmentAllowQuery.length === 0 ||\n                routesManifest.rsc.clientParamParsing)\n\n            const fallbackPathname = shouldAttachSegmentFallback\n              ? path.join(segmentsDir, segmentPath + prefetchSegmentSuffix)\n              : undefined\n\n            outputs.prerenders.push({\n              id: outputSegmentPath,\n              pathname: outputSegmentPath,\n              type: AdapterOutputType.PRERENDER,\n              parentOutputId: initialOutput.parentOutputId,\n              groupId: initialOutput.groupId,\n\n              config: {\n                ...initialOutput.config,\n                bypassFor: undefined,\n                partialFallback: undefined,\n              },\n\n              fallback: {\n                filePath: fallbackPathname,\n                postponedState: undefined,\n                initialExpiration: initialOutput.fallback?.initialExpiration,\n                initialRevalidate: initialOutput.fallback?.initialRevalidate,\n\n                initialHeaders: {\n                  ...meta.headers,\n                  ...initialOutput.fallback?.initialHeaders,\n                  vary: varyHeader,\n                  'content-type': rscContentTypeHeader,\n                  [didPostponeHeader]: '2',\n                },\n              },\n            } satisfies AdapterOutput['PRERENDER'])\n          }\n        }\n      }\n\n      let prerenderGroupId = 1\n\n      type AppRouteMeta = {\n        segmentPaths?: string[]\n        postponed?: string\n        headers?: Record<string, string>\n        status?: number\n      }\n\n      const getAppRouteMeta = async (\n        route: string,\n        isAppPage: boolean\n      ): Promise<AppRouteMeta> => {\n        const basename = route.endsWith('/') ? `${route}index` : route\n        const meta: AppRouteMeta = isAppPage\n          ? JSON.parse(\n              await fs\n                .readFile(path.join(appDistDir, `${basename}.meta`), 'utf8')\n                .catch(() => '{}')\n            )\n          : {}\n\n        if (meta.headers) {\n          // normalize these for consistency\n          for (const key of Object.keys(meta.headers)) {\n            const keyLower = key.toLowerCase()\n            let value = meta.headers[key]\n\n            // normalize values to strings (e.g. set-cookie can be an array)\n            if (Array.isArray(value)) {\n              value = value.join(', ')\n            } else if (typeof value !== 'string') {\n              value = String(value)\n            }\n\n            if (keyLower !== key) {\n              delete meta.headers[key]\n            }\n            meta.headers[keyLower] = value\n          }\n        }\n\n        return meta\n      }\n\n      const filePathCache = new Map<string, Promise<boolean>>()\n      const cachedFilePathCheck = async (filePath: string) => {\n        if (filePathCache.has(filePath)) {\n          return filePathCache.get(filePath)\n        }\n        const newCheck = fs\n          .access(filePath)\n          .then(() => true)\n          .catch(() => false)\n        filePathCache.set(filePath, newCheck)\n\n        return newCheck\n      }\n\n      for (const route in prerenderManifest.routes) {\n        const {\n          initialExpireSeconds: initialExpiration,\n          initialRevalidateSeconds: initialRevalidate,\n          initialHeaders,\n          initialStatus,\n          dataRoute,\n          prefetchDataRoute,\n          renderingMode,\n          allowHeader,\n          experimentalBypassFor,\n        } = prerenderManifest.routes[route]\n\n        const srcRoute = prerenderManifest.routes[route].srcRoute || route\n        const srcRouteInfo = prerenderManifest.dynamicRoutes[srcRoute]\n\n        const isAppPage =\n          Boolean(appOutputMap[srcRoute]) || srcRoute === '/_not-found'\n\n        // if we already have 404.html favor that instead of\n        // _not-found prerender\n        if (srcRoute === '/_not-found' && hasStatic404) {\n          continue\n        }\n\n        const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route)\n\n        let allowQuery: string[] | undefined\n        const routeKeys = routesManifest.dynamicRoutes.find(\n          (item) => item.page === srcRoute\n        )?.routeKeys\n\n        if (!isDynamicRoute(route)) {\n          // for non-dynamic routes we use an empty array since\n          // no query values bust the cache for non-dynamic prerenders\n          // prerendered paths also do not pass allowQuery as they match\n          // during handle: 'filesystem' so should not cache differently\n          // by query values\n          allowQuery = []\n        } else if (routeKeys) {\n          // if we have routeKeys in the routes-manifest we use those\n          // for allowQuery for dynamic routes\n          allowQuery = Object.values(routeKeys)\n        }\n\n        let filePath = path.join(\n          isAppPage ? appDistDir : pagesDistDir,\n          `${normalizePagePath(route)}.${isAppPage && !dataRoute ? 'body' : 'html'}`\n        )\n\n        // Check if this is a static metadata route (e.g., /favicon.ico, /icon.png, /opengraph-image.png)\n        // These should be output as static files, not prerenders.\n        if (isStaticMetadataFile(route)) {\n          // For static metadata from app router, check if the .body file exists\n          const staticMetadataFilePath = path.join(\n            appDistDir,\n            `${normalizePagePath(route)}.body`\n          )\n          if (await cachedFilePathCheck(staticMetadataFilePath)) {\n            outputs.staticFiles.push({\n              id: route,\n              pathname: route,\n              type: AdapterOutputType.STATIC_FILE,\n              filePath: staticMetadataFilePath,\n              immutableHash: undefined,\n            })\n            continue\n          }\n        }\n\n        // we use the static 404 for notFound: true if available\n        // if not we do a blocking invoke on first request\n        if (isNotFoundTrue && hasStatic404) {\n          const locale =\n            config.i18n &&\n            normalizeLocalePath(route, config.i18n?.locales).detectedLocale\n\n          for (const currentFilePath of [\n            path.join(pagesDistDir, locale || '', '404.html'),\n            path.join(pagesDistDir, '404.html'),\n          ]) {\n            if (await cachedFilePathCheck(currentFilePath)) {\n              filePath = currentFilePath\n              break\n            }\n          }\n        }\n\n        const meta = await getAppRouteMeta(route, isAppPage)\n\n        let htmlAllowQuery = allowQuery\n        let dataAllowQuery = allowQuery\n        const dataInitialHeaders: Record<string, string> = {}\n\n        // We additionally vary based on if there's a postponed prerender\n        // because if there isn't, then that means that we generated an\n        // empty shell, and producing an empty RSC shell would be a waste.\n        // If there is a postponed prerender, then the RSC shell would be\n        // non-empty, and it would be valuable to also generate an empty\n        // RSC shell.\n        if (meta.postponed) {\n          htmlAllowQuery = []\n\n          if (routesManifest.rsc.dynamicRSCPrerender) {\n            // If client param parsing is enabled, we follow the same logic as the\n            // HTML allowQuery as it's already going to vary based on if there's a\n            // static shell generated or if there's fallback root params. If there\n            // are fallback root params, and we can serve a fallback, then we\n            // should follow the same logic for the dynamic RSC routes.\n            //\n            // If client param parsing is not enabled, we have to use the\n            // allowQuery because the RSC payloads will contain dynamic segment\n            // values.\n            if (routesManifest.rsc.clientParamParsing) {\n              dataAllowQuery = htmlAllowQuery\n            }\n          }\n        }\n\n        if (renderingMode === RenderingMode.PARTIALLY_STATIC) {\n          // Dynamic RSC requests cannot be cached, so we explicity set it\n          // here to ensure that the response is not cached by the browser.\n          dataInitialHeaders['cache-control'] =\n            'private, no-store, no-cache, max-age=0, must-revalidate'\n        }\n\n        const initialOutput: AdapterOutput['PRERENDER'] = {\n          id: route,\n          type: AdapterOutputType.PRERENDER,\n          pathname: route,\n          parentOutputId:\n            srcRoute === '/_not-found'\n              ? srcRoute\n              : getParentOutput(srcRoute, route).id,\n          groupId: prerenderGroupId,\n\n          pprChain:\n            isAppPage && renderingMode === RenderingMode.PARTIALLY_STATIC\n              ? {\n                  headers: {\n                    [NEXT_RESUME_HEADER]: '1',\n                  },\n                }\n              : undefined,\n\n          parentFallbackMode: srcRouteInfo?.fallback,\n\n          fallback:\n            !isNotFoundTrue || (isNotFoundTrue && hasStatic404)\n              ? {\n                  filePath,\n                  postponedState: undefined,\n                  initialStatus:\n                    initialStatus ??\n                    meta.status ??\n                    (isNotFoundTrue ? 404 : undefined),\n                  initialHeaders: {\n                    ...initialHeaders,\n                    vary: varyHeader,\n                    'content-type': HTML_CONTENT_TYPE_HEADER,\n                    ...meta.headers,\n                  },\n                  initialExpiration,\n                  initialRevalidate:\n                    typeof initialRevalidate === 'undefined'\n                      ? 1\n                      : initialRevalidate,\n                }\n              : undefined,\n          config: {\n            allowQuery,\n            allowHeader,\n            renderingMode,\n            bypassFor:\n              isAppPage && srcRoute !== '/_not-found'\n                ? experimentalBypassFor\n                : undefined,\n            bypassToken: prerenderManifest.preview.previewModeId,\n          },\n        }\n        outputs.prerenders.push(initialOutput)\n\n        if (!isAppPage && appPageKeys && appPageKeys.length > 0) {\n          const rscPage = `${route === '/' ? '/index' : route}.rsc`\n          outputs.staticFiles.push({\n            id: rscPage,\n            pathname: rscPage,\n            type: AdapterOutputType.STATIC_FILE,\n            filePath: rscFallbackPath,\n            immutableHash: undefined,\n          })\n        }\n\n        if (dataRoute) {\n          let dataFilePath: string | undefined = path.join(\n            pagesDistDir,\n            `${normalizePagePath(route)}.json`\n          )\n          let postponed = meta.postponed\n\n          const dataRouteToUse =\n            renderingMode === RenderingMode.PARTIALLY_STATIC &&\n            prefetchDataRoute\n              ? prefetchDataRoute\n              : dataRoute\n\n          if (isAppPage) {\n            // When experimental PPR is enabled, we expect that the data\n            // that should be served as a part of the prerender should\n            // be from the prefetch data route. If this isn't enabled\n            // for ppr, the only way to get the data is from the data\n            // route.\n            dataFilePath = path.join(\n              appDistDir,\n              (dataRouteToUse ?? dataRoute)?.replace(/^\\//, '')\n            )\n          }\n\n          if (\n            renderingMode === RenderingMode.PARTIALLY_STATIC &&\n            !(await cachedFilePathCheck(dataFilePath))\n          ) {\n            outputs.prerenders.push({\n              ...initialOutput,\n              id: dataRoute,\n              pathname: dataRoute,\n              fallback: {\n                ...initialOutput.fallback,\n                postponedState: postponed,\n                initialStatus: undefined,\n                initialHeaders: {\n                  ...initialOutput.fallback?.initialHeaders,\n                  ...dataInitialHeaders,\n                  'content-type': isAppPage\n                    ? rscContentTypeHeader\n                    : JSON_CONTENT_TYPE_HEADER,\n                },\n                filePath: undefined,\n              },\n            })\n          } else {\n            outputs.prerenders.push({\n              ...initialOutput,\n              id: dataRoute,\n              pathname: dataRoute,\n              fallback: isNotFoundTrue\n                ? undefined\n                : {\n                    ...initialOutput.fallback,\n                    initialStatus: undefined,\n                    initialHeaders: {\n                      ...initialOutput.fallback?.initialHeaders,\n                      ...dataInitialHeaders,\n                      'content-type': isAppPage\n                        ? rscContentTypeHeader\n                        : JSON_CONTENT_TYPE_HEADER,\n                    },\n                    postponedState: undefined,\n                    filePath: dataFilePath,\n                  },\n            })\n          }\n        }\n\n        if (isAppPage) {\n          await handleAppMeta(route, initialOutput, meta, {\n            htmlAllowQuery,\n            dataAllowQuery,\n          })\n        }\n        prerenderGroupId += 1\n      }\n\n      for (const dynamicRoute in prerenderManifest.dynamicRoutes) {\n        const {\n          fallback,\n          fallbackExpire,\n          fallbackRevalidate,\n          fallbackHeaders,\n          fallbackStatus,\n          fallbackSourceRoute,\n          fallbackRootParams,\n          remainingPrerenderableParams,\n          allowHeader,\n          dataRoute,\n          renderingMode,\n          experimentalBypassFor,\n        } = prerenderManifest.dynamicRoutes[dynamicRoute]\n\n        const srcRoute = fallbackSourceRoute || dynamicRoute\n        const parentOutput = getParentOutput(srcRoute, dynamicRoute)\n        const isAppPage = Boolean(appOutputMap[srcRoute])\n\n        const meta = await getAppRouteMeta(dynamicRoute, isAppPage)\n        const routeKeys =\n          routesManifest.dynamicRoutes.find(\n            (item) => item.page === dynamicRoute\n          )?.routeKeys || {}\n        const allowQuery = Object.values(routeKeys)\n        const partialFallbacksEnabled =\n          config.experimental.partialFallbacks === true\n        const partialFallback =\n          partialFallbacksEnabled &&\n          isAppPage &&\n          remainingPrerenderableParams !== undefined &&\n          remainingPrerenderableParams.length > 0 &&\n          renderingMode === RenderingMode.PARTIALLY_STATIC &&\n          typeof fallback === 'string' &&\n          Boolean(meta.postponed)\n\n        // Today, consumers of this build output can only upgrade a fallback shell\n        // when all remaining route params become concrete in the upgraded entry.\n        // They cannot yet represent intermediate shells like `/[foo]/[bar] -> /foo/[bar]`,\n        // because we do not emit which fallback params should remain deferred after\n        // the upgrade. Until that contract exists, only emit `partialFallback` for\n        // the conservative case where the upgraded entry can become fully concrete.\n        const canEmitPartialFallback =\n          partialFallback &&\n          fallbackRootParams?.length === 0 &&\n          allowQuery.length === remainingPrerenderableParams?.length\n        let htmlAllowQuery = allowQuery\n\n        // We only want to vary on the shell contents if there is a fallback\n        // present and able to be served.\n        if (typeof fallback === 'string') {\n          if (fallbackRootParams && fallbackRootParams.length > 0) {\n            htmlAllowQuery = fallbackRootParams as string[]\n          }\n\n          // We additionally vary based on if there's a postponed prerender\n          // because if there isn't, then that means that we generated an\n          // empty shell, and producing an empty RSC shell would be a waste.\n          // If there is a postponed prerender, then the RSC shell would be\n          // non-empty, and it would be valuable to also generate an empty\n          // RSC shell.\n          else if (meta.postponed) {\n            // If there's postponed fallback content, we usually collapse to a shared shell (`[]`).\n            // For opt-in partial fallbacks in cache components, keep only the\n            // params that can still complete this shell.\n            const remainingPrerenderableQueryKeys = new Set(\n              (remainingPrerenderableParams ?? []).map(\n                (param) => `${NEXT_QUERY_PARAM_PREFIX}${param.paramName}`\n              )\n            )\n            htmlAllowQuery =\n              canEmitPartialFallback && routesManifest.rsc.clientParamParsing\n                ? Object.values(routeKeys).filter((routeKey) =>\n                    remainingPrerenderableQueryKeys.has(routeKey)\n                  )\n                : []\n          }\n        }\n\n        const initialOutput: AdapterOutput['PRERENDER'] = {\n          id: dynamicRoute,\n          type: AdapterOutputType.PRERENDER,\n          pathname: dynamicRoute,\n          parentOutputId: parentOutput.id,\n          groupId: prerenderGroupId,\n\n          pprChain:\n            isAppPage && renderingMode === RenderingMode.PARTIALLY_STATIC\n              ? {\n                  headers: {\n                    [NEXT_RESUME_HEADER]: '1',\n                  },\n                }\n              : undefined,\n\n          fallback:\n            typeof fallback === 'string'\n              ? {\n                  filePath: path.join(\n                    isAppPage ? appDistDir : pagesDistDir,\n                    // app router dynamic route fallbacks don't have the\n                    // extension so ensure it's added here\n                    fallback.endsWith('.html') ? fallback : `${fallback}.html`\n                  ),\n                  postponedState: undefined,\n                  initialStatus: fallbackStatus ?? meta.status,\n                  initialHeaders: {\n                    ...fallbackHeaders,\n                    ...(appPageKeys?.length ? { vary: varyHeader } : {}),\n                    'content-type': HTML_CONTENT_TYPE_HEADER,\n                    ...meta.headers,\n                  },\n                  initialExpiration: fallbackExpire,\n                  initialRevalidate: fallbackRevalidate ?? 1,\n                }\n              : undefined,\n          config: {\n            allowQuery: htmlAllowQuery,\n            allowHeader,\n            renderingMode,\n            partialFallback: canEmitPartialFallback || undefined,\n            bypassFor: isAppPage ? experimentalBypassFor : undefined,\n            bypassToken: prerenderManifest.preview.previewModeId,\n          },\n        }\n\n        if (!config.i18n || isAppPage) {\n          outputs.prerenders.push(initialOutput)\n\n          if (\n            !isAppPage &&\n            fallback !== false &&\n            appPageKeys &&\n            appPageKeys.length > 0\n          ) {\n            const rscPage = `${srcRoute === '/' ? '/index' : srcRoute}.rsc`\n            outputs.staticFiles.push({\n              id: rscPage,\n              pathname: rscPage,\n              type: AdapterOutputType.STATIC_FILE,\n              filePath: rscFallbackPath,\n              immutableHash: undefined,\n            })\n          }\n\n          let dataAllowQuery = allowQuery\n          const dataInitialHeaders: Record<string, string> = {}\n\n          if (meta.postponed && routesManifest.rsc.dynamicRSCPrerender) {\n            // If client param parsing is enabled, we follow the same logic as the\n            // HTML allowQuery as it's already going to vary based on if there's a\n            // static shell generated or if there's fallback root params. If there\n            // are fallback root params, and we can serve a fallback, then we\n            // should follow the same logic for the dynamic RSC routes.\n            //\n            // If client param parsing is not enabled, we have to use the\n            // allowQuery because the RSC payloads will contain dynamic segment\n            // values.\n            if (routesManifest.rsc.clientParamParsing) {\n              dataAllowQuery = htmlAllowQuery\n            }\n          }\n\n          if (renderingMode === RenderingMode.PARTIALLY_STATIC) {\n            // Dynamic RSC requests cannot be cached, so we explicity set it\n            // here to ensure that the response is not cached by the browser.\n            dataInitialHeaders['cache-control'] =\n              'private, no-store, no-cache, max-age=0, must-revalidate'\n          }\n\n          if (isAppPage) {\n            await handleAppMeta(dynamicRoute, initialOutput, meta, {\n              htmlAllowQuery,\n              dataAllowQuery,\n            })\n          }\n\n          if (renderingMode === RenderingMode.PARTIALLY_STATIC) {\n            outputs.prerenders.push({\n              ...initialOutput,\n              id: `${dynamicRoute}.rsc`,\n              pathname: `${dynamicRoute}.rsc`,\n              fallback: {\n                ...initialOutput.fallback,\n                filePath: undefined,\n                postponedState: meta.postponed,\n                initialStatus: undefined,\n                initialHeaders: {\n                  ...initialOutput.fallback?.initialHeaders,\n                  ...dataInitialHeaders,\n                  'content-type': isAppPage\n                    ? rscContentTypeHeader\n                    : JSON_CONTENT_TYPE_HEADER,\n                },\n              },\n\n              config: {\n                ...initialOutput.config,\n                allowQuery: dataAllowQuery,\n                partialFallback: undefined,\n              },\n            })\n          } else if (dataRoute) {\n            outputs.prerenders.push({\n              ...initialOutput,\n              id: dataRoute,\n              pathname: dataRoute,\n              fallback: undefined,\n              config: {\n                ...initialOutput.config,\n                partialFallback: undefined,\n              },\n            })\n          }\n          prerenderGroupId += 1\n        } else {\n          for (const locale of config.i18n.locales) {\n            const currentOutput: AdapterOutput['PRERENDER'] = {\n              ...initialOutput,\n              pathname: path.posix.join(`/${locale}`, initialOutput.pathname),\n              id: path.posix.join(`/${locale}`, initialOutput.id),\n              fallback:\n                typeof fallback === 'string'\n                  ? {\n                      ...initialOutput.fallback,\n                      initialStatus: undefined,\n                      postponedState: undefined,\n                      filePath: path.join(\n                        pagesDistDir,\n                        locale,\n                        // app router dynamic route fallbacks don't have the\n                        // extension so ensure it's added here\n                        fallback.endsWith('.html')\n                          ? fallback\n                          : `${fallback}.html`\n                      ),\n                    }\n                  : undefined,\n              groupId: prerenderGroupId,\n            }\n            outputs.prerenders.push(currentOutput)\n\n            if (\n              !isAppPage &&\n              fallback !== false &&\n              appPageKeys &&\n              appPageKeys.length > 0\n            ) {\n              const rscPage = `${path.posix.join(`/${locale}`, initialOutput.pathname)}.rsc`\n              outputs.staticFiles.push({\n                id: rscPage,\n                pathname: rscPage,\n                type: AdapterOutputType.STATIC_FILE,\n                filePath: rscFallbackPath,\n                immutableHash: undefined,\n              })\n            }\n\n            if (dataRoute) {\n              const dataPathname = path.posix.join(\n                `/_next/data`,\n                buildId,\n                locale,\n                dynamicRoute + '.json'\n              )\n              outputs.prerenders.push({\n                ...initialOutput,\n                id: dataPathname,\n                pathname: dataPathname,\n                // data route doesn't have skeleton fallback\n                fallback: undefined,\n                config: {\n                  ...initialOutput.config,\n                  partialFallback: undefined,\n                },\n                groupId: prerenderGroupId,\n              })\n            }\n            prerenderGroupId += 1\n          }\n        }\n      }\n\n      // ensure 404\n      const staticErrorDocs = [\n        ...(hasStatic404 ? ['/404'] : []),\n        ...(hasStatic500 ? ['/500'] : []),\n      ]\n\n      for (const errorDoc of staticErrorDocs) {\n        const errorDocPath = path.posix.join(\n          '/',\n          config.i18n?.defaultLocale || '',\n          errorDoc\n        )\n\n        if (!prerenderManifest.routes[errorDocPath]) {\n          for (const currentDocPath of [\n            errorDocPath,\n            ...(config.i18n?.locales?.map((locale) =>\n              path.posix.join('/', locale, errorDoc)\n            ) || []),\n          ]) {\n            const currentFilePath = path.join(\n              pagesDistDir,\n              `${currentDocPath}.html`\n            )\n            if (await cachedFilePathCheck(currentFilePath)) {\n              outputs.staticFiles.push({\n                pathname: currentDocPath,\n                id: currentDocPath,\n                type: AdapterOutputType.STATIC_FILE,\n                filePath: currentFilePath,\n                immutableHash: undefined,\n              })\n            }\n          }\n        }\n      }\n    }\n\n    normalizePathnames(config, outputs)\n\n    const dynamicRoutes: DynamicRouteItem[] = []\n    const dynamicDataRoutes: DynamicRouteItem[] = []\n    const dynamicSegmentRoutes: DynamicRouteItem[] = []\n\n    const getDestinationQuery = (routeKeys: Record<string, string>) => {\n      const items = Object.entries(routeKeys ?? {})\n      if (items.length === 0) return ''\n\n      return '?' + items.map(([key, value]) => `${value}=$${key}`).join('&')\n    }\n\n    const fallbackFalseHasCondition: RouteHas[] = [\n      {\n        type: 'cookie',\n        key: '__prerender_bypass',\n        value: prerenderManifest.preview.previewModeId,\n      },\n      {\n        type: 'cookie',\n        key: '__next_preview_data',\n      },\n    ]\n\n    for (const route of routesManifest.dynamicRoutes) {\n      const shouldLocalize = config.i18n\n\n      const routeRegex = getNamedRouteRegex(route.page, {\n        prefixRouteKeys: true,\n      })\n\n      const isFallbackFalse =\n        prerenderManifest.dynamicRoutes[route.page]?.fallback === false\n\n      const { hasFallbackRootParams } = route\n\n      const sourceRegex = routeRegex.namedRegex.replace(\n        '^',\n        `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?${shouldLocalize ? '(?<nextLocale>[^/]{1,})' : ''}`\n      )\n      const destination =\n        path.posix.join(\n          '/',\n          config.basePath,\n          shouldLocalize ? '/$nextLocale' : '',\n          route.page\n        ) + getDestinationQuery(route.routeKeys)\n\n      if (appPageKeys && appPageKeys.length > 0) {\n        // If we have fallback root params (implying we've already\n        // emitted a rewrite for the /_tree request), or if the route\n        // has PPR enabled and client param parsing is enabled, then\n        // we don't need to include any other suffixes.\n        const shouldSkipSuffixes = hasFallbackRootParams\n\n        dynamicRoutes.push({\n          source: route.page + '.rsc',\n          sourceRegex: sourceRegex.replace(\n            new RegExp(escapeStringRegexp('(?:/)?$')),\n            // Now than the upstream issues has been resolved, we can safely\n            // add the suffix back, this resolves a bug related to segment\n            // rewrites not capturing the correct suffix values when\n            // enabled.\n            shouldSkipSuffixes\n              ? '(?<rscSuffix>\\\\.rsc|\\\\.segments/.+\\\\.segment\\\\.rsc)(?:/)?$'\n              : '(?<rscSuffix>\\\\.rsc|\\\\.segments/.+\\\\.segment\\\\.rsc)(?:/)?$'\n          ),\n          destination: destination?.replace(/($|\\?)/, '$rscSuffix$1'),\n          has:\n            isFallbackFalse && !pageKeys.includes(route.page)\n              ? fallbackFalseHasCondition\n              : undefined,\n          missing: undefined,\n        })\n      }\n\n      // needs basePath and locale handling if pages router\n      dynamicRoutes.push({\n        source: route.page,\n        sourceRegex,\n        destination,\n        has: isFallbackFalse ? fallbackFalseHasCondition : undefined,\n        missing: undefined,\n      })\n\n      for (const segmentRoute of route.prefetchSegmentDataRoutes || []) {\n        dynamicSegmentRoutes.push({\n          source: route.page,\n          sourceRegex: segmentRoute.source.replace(\n            '^',\n            `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?`\n          ),\n          destination: path.posix.join(\n            '/',\n            config.basePath,\n            segmentRoute.destination +\n              getDestinationQuery(segmentRoute.routeKeys)\n          ),\n          has: undefined,\n          missing: undefined,\n        })\n      }\n    }\n\n    const needsMiddlewareResolveRoutes =\n      outputs.middleware && outputs.pages.length > 0\n\n    const dataRoutePages = new Set([\n      ...routesManifest.dataRoutes.map((item) => item.page),\n    ])\n    const sortedDataPages = sortSortableRoutes([\n      ...(needsMiddlewareResolveRoutes\n        ? [...staticPages].map((page) => ({ sourcePage: page, page }))\n        : []),\n      ...routesManifest.dataRoutes.map((item) => ({\n        sourcePage: item.page,\n        page: item.page,\n      })),\n    ])\n\n    for (const { page } of sortedDataPages) {\n      if (needsMiddlewareResolveRoutes || isDynamicRoute(page)) {\n        const shouldLocalize = config.i18n\n        const isFallbackFalse =\n          prerenderManifest.dynamicRoutes[page]?.fallback === false\n\n        const routeRegex = getNamedRouteRegex(page + '.json', {\n          prefixRouteKeys: true,\n          includeSuffix: true,\n        })\n        const isDataRoute = dataRoutePages.has(page)\n\n        const destination = path.posix.join(\n          '/',\n          config.basePath,\n          ...(isDataRoute ? [`_next/data`, buildId] : ''),\n          ...(page === '/'\n            ? [shouldLocalize ? '$nextLocale.json' : 'index.json']\n            : [\n                shouldLocalize ? '$nextLocale' : '',\n                page +\n                  (isDataRoute ? '.json' : '') +\n                  getDestinationQuery(routeRegex.routeKeys || {}),\n              ])\n        )\n\n        dynamicDataRoutes.push({\n          source: page,\n          sourceRegex:\n            shouldLocalize && page === '/'\n              ? '^' +\n                path.posix.join(\n                  '/',\n                  config.basePath,\n                  '_next/data',\n                  escapeStringRegexp(buildId),\n                  '(?<nextLocale>[^/]{1,}).json'\n                )\n              : routeRegex.namedRegex.replace(\n                  '^',\n                  `^${path.posix.join(\n                    '/',\n                    config.basePath,\n                    `_next/data`,\n                    escapeStringRegexp(buildId)\n                  )}[/]?${shouldLocalize ? '(?<nextLocale>[^/]{1,})' : ''}`\n                ),\n          destination,\n          has: isFallbackFalse ? fallbackFalseHasCondition : undefined,\n          missing: undefined,\n        })\n      }\n    }\n\n    const buildRewriteItem = (route: ManifestRewriteRoute): RewriteItem => {\n      const converted = convertRewrites([route], ['nextInternalLocale'])[0]\n      const regex = converted.src || route.regex\n\n      return {\n        source: route.source,\n        sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n        destination: converted.dest || route.destination,\n        has: route.has,\n        missing: route.missing,\n      } satisfies Route\n    }\n\n    const buildRouteFromHeader = (route: ManifestHeaderRoute): Route => {\n      const converted = convertHeaders([route])[0]\n      const regex = converted.src || route.regex\n      return {\n        source: route.source,\n        sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n        headers: 'headers' in converted ? converted.headers || {} : {},\n        has: route.has,\n        missing: route.missing,\n        priority: route.internal || undefined,\n      } satisfies Route\n    }\n\n    try {\n      Log.info(`Running onBuildComplete from ${adapterMod.name}`)\n\n      const combinedDynamicRoutes = [\n        ...dynamicDataRoutes,\n        ...dynamicSegmentRoutes,\n        ...dynamicRoutes,\n      ] satisfies Route[]\n\n      const rewrites = {\n        beforeFiles: routesManifest.rewrites.beforeFiles.map(buildRewriteItem),\n        afterFiles: routesManifest.rewrites.afterFiles.map(buildRewriteItem),\n        fallback: routesManifest.rewrites.fallback.map(buildRewriteItem),\n      }\n\n      const redirects = routesManifest.redirects.map((route) => {\n        const converted = convertRedirects([route], 307)[0]\n        const regex = converted.src || route.regex\n\n        return {\n          source: route.source,\n          sourceRegex: route.internal ? regex : modifyRouteRegex(regex),\n          headers: 'headers' in converted ? converted.headers || {} : {},\n          status: converted.status || getRedirectStatus(route),\n          has: route.has,\n          missing: route.missing,\n          priority: route.internal || undefined,\n        } satisfies Route\n      })\n\n      const headers = routesManifest.headers.map((route) =>\n        buildRouteFromHeader(route)\n      )\n      const onMatchHeaders = routesManifest.onMatchHeaders.map((route) =>\n        buildRouteFromHeader(route)\n      )\n\n      await adapterMod.onBuildComplete({\n        routing: {\n          beforeMiddleware: [...headers, ...redirects],\n          beforeFiles: rewrites.beforeFiles,\n          afterFiles: rewrites.afterFiles,\n          dynamicRoutes: combinedDynamicRoutes,\n          onMatch: [\n            {\n              // This ensures we only match known emitted-by-Next.js files and not\n              // user-emitted files which may be missing a hash in their filename.\n              sourceRegex: `${path.posix.join(config.basePath || '/', '_next/static', `/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|${escapeStringRegexp(buildId)})/.+`)}`,\n              // Next.js assets contain a hash or entropy in their filenames, so they\n              // are guaranteed to be unique and cacheable indefinitely.\n              headers: {\n                'cache-control': `public,max-age=${CACHE_ONE_YEAR_SECONDS},immutable`,\n              },\n            },\n            ...onMatchHeaders,\n          ],\n          fallback: rewrites.fallback,\n          shouldNormalizeNextData: !!needsMiddlewareResolveRoutes,\n          rsc: generateRoutesManifest({\n            appType,\n            pageKeys: {\n              pages: pageKeys as string[],\n              app: appPageKeys as string[],\n            },\n            config,\n            redirects: [],\n            headers: [],\n            onMatchHeaders: [],\n            rewrites,\n            restrictedRedirectPaths: [],\n            isAppPPREnabled: config.cacheComponents,\n          }).routesManifest.rsc,\n        },\n        outputs,\n\n        config,\n        distDir,\n        buildId,\n        nextVersion,\n        projectDir: dir,\n        repoRoot: tracingRoot,\n      })\n    } catch (err) {\n      Log.error(`Failed to run onBuildComplete from ${adapterMod.name}`)\n      throw err\n    }\n  }\n}\n"],"names":["handleBuildComplete","normalizePathnames","config","outputs","basePath","output","pages","pagesApi","appPages","appRoutes","prerenders","staticFiles","pathname","addPathPrefix","replace","dir","appType","buildId","configOutDir","distDir","pageKeys","bundler","tracingRoot","adapterPath","appPageKeys","staticPages","nextVersion","hasStatic404","hasStatic500","routesManifest","serverPropsPages","hasNodeMiddleware","prerenderManifest","middlewareManifest","requiredServerFiles","hasInstrumentationHook","functionsConfigManifest","adapterMod","interopDefault","pathToFileURL","require","resolve","href","onBuildComplete","exportFiles","recursiveReadDir","file","endsWith","startsWith","push","id","filePath","path","join","type","AdapterOutputType","STATIC_FILE","immutableHash","undefined","clientHashes","Bundler","Turbopack","experimental","immutableAssetToken","JSON","parse","fs","readFile","posix","sharedNodeAssets","pagesSharedNodeAssets","appPagesSharedNodeAssets","fileOutputPath","relative","setupNodeStubPath","dirname","moduleTypes","currentDependencies","modulePath","contextDir","item","readdir","match","dependencyPath","rootRelativeFilePath","nodeFileTrace","makeIgnoreFn","sharedTraceIgnores","sharedIgnoreFn","necessaryNodeDependencies","Object","values","defaultOverrides","filter","extname","fileList","esmFileList","base","ignore","forEach","add","assets","handleTraceFiles","assign","traceFilePath","traceData","traceFileDir","relativeFile","files","tracedFilePath","handleEdgeFunction","page","isMiddleware","PAGES","isAppPrefix","name","isAppPage","isAppRoute","currentOutputs","MIDDLEWARE","APP_PAGE","APP_ROUTE","PAGES_API","route","normalizeAppPath","edgeEntrypointRelativePath","entrypoint","edgeEntrypointPath","runtime","sourcePage","edgeRuntime","entryKey","handlerExport","wasmAssets","env","handleFile","originalPath","wasm","matchers","map","source","originalSource","sourceRegex","regexp","has","missing","key","value","preview","previewModeId","middleware","rscPathname","normalizePagePath","nextDataPath","edgeFunctionHandlers","isMiddlewareFilename","functions","pagesDistDir","pageOutputMap","rscFallbackPath","length","writeFile","hasOwnProperty","pageFile","i18n","locale","locales","localePage","localeOutput","staticOutput","pageTraceFile","catch","err","code","Log","warn","functionConfig","maxDuration","preferredRegion","regions","dataPathname","rscPage","middlewareFile","middlewareTrace","appOutputMap","appDistDir","normalizedPage","isStaticMetadataRoute","isStaticMetadataFile","isPrerenderedMetadataRoute","routes","dynamicRoutes","some","localePathname","slice","existingOutput","getParentOutput","srcRoute","childRoute","allowMissing","normalizedSrcRoute","normalizeLocalePath","parentOutput","console","error","appOutputs","keys","pageOutputs","Error","prefetchSegmentDirSuffix","prefetchSegmentSuffix","varyHeader","didPostponeHeader","contentTypeHeader","rscContentTypeHeader","rsc","handleAppMeta","initialOutput","meta","ctx","postponed","fallback","postponedState","segmentPaths","normalizedRoute","segmentsDir","segmentAllowQuery","clientParamParsing","htmlAllowQuery","dataAllowQuery","segmentPath","outputSegmentPath","shouldAttachSegmentFallback","fallbackPathname","PRERENDER","parentOutputId","groupId","bypassFor","partialFallback","initialExpiration","initialRevalidate","initialHeaders","headers","vary","prerenderGroupId","getAppRouteMeta","basename","keyLower","toLowerCase","Array","isArray","String","filePathCache","Map","cachedFilePathCheck","get","newCheck","access","then","set","initialExpireSeconds","initialRevalidateSeconds","initialStatus","dataRoute","prefetchDataRoute","renderingMode","allowHeader","experimentalBypassFor","srcRouteInfo","Boolean","isNotFoundTrue","notFoundRoutes","includes","allowQuery","routeKeys","find","isDynamicRoute","staticMetadataFilePath","detectedLocale","currentFilePath","dataInitialHeaders","dynamicRSCPrerender","RenderingMode","PARTIALLY_STATIC","pprChain","NEXT_RESUME_HEADER","parentFallbackMode","status","HTML_CONTENT_TYPE_HEADER","bypassToken","dataFilePath","dataRouteToUse","JSON_CONTENT_TYPE_HEADER","dynamicRoute","fallbackExpire","fallbackRevalidate","fallbackHeaders","fallbackStatus","fallbackSourceRoute","fallbackRootParams","remainingPrerenderableParams","partialFallbacksEnabled","partialFallbacks","canEmitPartialFallback","remainingPrerenderableQueryKeys","Set","param","NEXT_QUERY_PARAM_PREFIX","paramName","routeKey","currentOutput","staticErrorDocs","errorDoc","errorDocPath","defaultLocale","currentDocPath","dynamicDataRoutes","dynamicSegmentRoutes","getDestinationQuery","items","entries","fallbackFalseHasCondition","shouldLocalize","routeRegex","getNamedRouteRegex","prefixRouteKeys","isFallbackFalse","hasFallbackRootParams","namedRegex","destination","shouldSkipSuffixes","RegExp","escapeStringRegexp","segmentRoute","prefetchSegmentDataRoutes","needsMiddlewareResolveRoutes","dataRoutePages","dataRoutes","sortedDataPages","sortSortableRoutes","includeSuffix","isDataRoute","buildRewriteItem","converted","convertRewrites","regex","src","internal","modifyRouteRegex","dest","buildRouteFromHeader","convertHeaders","priority","info","combinedDynamicRoutes","rewrites","beforeFiles","afterFiles","redirects","convertRedirects","getRedirectStatus","onMatchHeaders","routing","beforeMiddleware","onMatch","CACHE_ONE_YEAR_SECONDS","shouldNormalizeNextData","generateRoutesManifest","app","restrictedRedirectPaths","isAppPPREnabled","cacheComponents","projectDir","repoRoot"],"mappings":";;;;+BAobsBA;;;eAAAA;;;6DApbL;iEACF;qBACe;6DACT;uBACgB;+BACP;gCACC;kCAEE;wBACF;0BAGE;2BACkB;mCACjB;8BAK3B;4BAsBA;qCAE6B;iCACC;+BACP;gCACsB;4BACjB;8BACA;gCACA;6BACF;wCACM;yBACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2WxB,SAASC,mBACPC,MAA0B,EAC1BC,OAAuB;IAEvB,yCAAyC;IACzC,IAAID,OAAOE,QAAQ,EAAE;QACnB,KAAK,MAAMC,UAAU;eAChBF,QAAQG,KAAK;eACbH,QAAQI,QAAQ;eAChBJ,QAAQK,QAAQ;eAChBL,QAAQM,SAAS;eACjBN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