Duffer Derek

Current Path : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/next/dist/lib/
Upload File :
Current File : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/next/dist/lib/load-custom-routes.js.map

{"version":3,"sources":["../../src/lib/load-custom-routes.ts"],"sourcesContent":["import type { NextConfig } from '../server/config'\nimport type { Token } from 'next/dist/compiled/path-to-regexp'\n\nimport { bold, yellow } from './picocolors'\nimport { escapeStringRegexp } from '../shared/lib/escape-regexp'\nimport { tryToParsePath } from './try-to-parse-path'\nimport { allowedStatusCodes } from './redirect-status'\nimport { isFullStringUrl } from './url'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from './constants'\n\nexport type RouteHas =\n  | {\n      type: 'header' | 'cookie' | 'query'\n      key: string\n      value?: string\n    }\n  | {\n      type: 'host'\n      key?: undefined\n      value: string\n    }\n\nexport type Rewrite = {\n  source: string\n  destination: string\n  basePath?: false\n  locale?: false\n  has?: RouteHas[]\n  missing?: RouteHas[]\n\n  /**\n   * @internal - used internally for routing\n   */\n  internal?: boolean\n\n  /**\n   * @internal - used internally for routing\n   */\n  regex?: string\n}\n\nexport type Header = {\n  source: string\n  basePath?: false\n  locale?: false\n  headers: Array<{ key: string; value: string }>\n  has?: RouteHas[]\n  missing?: RouteHas[]\n\n  /**\n   * @internal - used internally for routing\n   */\n  internal?: boolean\n}\n\n// internal type used for validation (not user facing)\nexport type Redirect = {\n  source: string\n  destination: string\n  basePath?: false\n  locale?: false\n  has?: RouteHas[]\n  missing?: RouteHas[]\n  priority?: boolean\n\n  /**\n   * @internal - used internally for routing\n   */\n  internal?: boolean\n} & (\n  | {\n      statusCode?: never\n      permanent: boolean\n    }\n  | {\n      statusCode: number\n      permanent?: never\n    }\n)\n\nexport type Middleware = {\n  source: string\n  locale?: false\n  has?: RouteHas[]\n  missing?: RouteHas[]\n}\n\nconst allowedHasTypes = new Set(['header', 'cookie', 'query', 'host'])\nconst namedGroupsRegex = /\\(\\?<([a-zA-Z][a-zA-Z0-9]*)>/g\n\nexport function normalizeRouteRegex(regex: string) {\n  // clean up un-necessary escaping from regex.source which turns / into \\\\/\n  return regex.replace(/\\\\\\//g, '/')\n}\n\nfunction checkRedirect(route: Redirect): {\n  invalidParts: string[]\n  hadInvalidStatus: boolean\n} {\n  const invalidParts: string[] = []\n  let hadInvalidStatus: boolean = false\n\n  if (route.statusCode && !allowedStatusCodes.has(route['statusCode'])) {\n    hadInvalidStatus = true\n    invalidParts.push(`\\`statusCode\\` is not undefined or valid statusCode`)\n  }\n  if (typeof route.permanent !== 'boolean' && !route['statusCode']) {\n    invalidParts.push(`\\`permanent\\` is not set to \\`true\\` or \\`false\\``)\n  }\n\n  return {\n    invalidParts,\n    hadInvalidStatus,\n  }\n}\n\nfunction checkHeader(route: Header): string[] {\n  const invalidParts: string[] = []\n\n  if (!Array.isArray(route.headers)) {\n    invalidParts.push('`headers` field must be an array')\n  } else if (route.headers.length === 0) {\n    invalidParts.push('`headers` field cannot be empty')\n  } else {\n    for (const header of route.headers) {\n      if (!header || typeof header !== 'object') {\n        invalidParts.push(\n          \"`headers` items must be object with { key: '', value: '' }\"\n        )\n        break\n      }\n      if (typeof header.key !== 'string') {\n        invalidParts.push('`key` in header item must be string')\n        break\n      }\n      if (typeof header.value !== 'string') {\n        invalidParts.push('`value` in header item must be string')\n        break\n      }\n    }\n  }\n  return invalidParts\n}\n\nexport type RouteType = 'rewrite' | 'redirect' | 'header'\n\nexport function checkCustomRoutes(\n  routes: Redirect[] | Header[] | Rewrite[] | Middleware[],\n  type: RouteType | 'middleware'\n): void {\n  if (!Array.isArray(routes)) {\n    console.error(\n      `Error: ${type}s must return an array, received ${typeof routes}.\\n` +\n        `See here for more info: https://nextjs.org/docs/messages/routes-must-be-array`\n    )\n    process.exit(1)\n  }\n\n  let numInvalidRoutes = 0\n  let hadInvalidStatus = false\n  let hadInvalidHas = false\n  let hadInvalidMissing = false\n\n  const allowedKeys = new Set<string>(['source', 'locale', 'has', 'missing'])\n\n  if (type === 'rewrite') {\n    allowedKeys.add('basePath')\n    allowedKeys.add('destination')\n  }\n  if (type === 'redirect') {\n    allowedKeys.add('basePath')\n    allowedKeys.add('statusCode')\n    allowedKeys.add('permanent')\n    allowedKeys.add('destination')\n  }\n  if (type === 'header') {\n    allowedKeys.add('basePath')\n    allowedKeys.add('headers')\n  }\n\n  for (const route of routes) {\n    if (!route || typeof route !== 'object') {\n      console.error(\n        `The route ${JSON.stringify(\n          route\n        )} is not a valid object with \\`source\\`${\n          type !== 'middleware'\n            ? ` and \\`${type === 'header' ? 'headers' : 'destination'}\\``\n            : ''\n        }`\n      )\n      numInvalidRoutes++\n      continue\n    }\n\n    if (\n      type === 'rewrite' &&\n      (route as Rewrite).basePath === false &&\n      !(\n        (route as Rewrite).destination.startsWith('http://') ||\n        (route as Rewrite).destination.startsWith('https://')\n      )\n    ) {\n      console.error(\n        `The route ${\n          (route as Rewrite).source\n        } rewrites urls outside of the basePath. Please use a destination that starts with \\`http://\\` or \\`https://\\` https://nextjs.org/docs/messages/invalid-external-rewrite`\n      )\n      numInvalidRoutes++\n      continue\n    }\n\n    const keys = Object.keys(route)\n    const invalidKeys = keys.filter((key) => !allowedKeys.has(key))\n    const invalidParts: string[] = []\n\n    if (\n      'basePath' in route &&\n      typeof route.basePath !== 'undefined' &&\n      route.basePath !== false\n    ) {\n      invalidParts.push('`basePath` must be undefined or false')\n    }\n\n    if (typeof route.locale !== 'undefined' && route.locale !== false) {\n      invalidParts.push('`locale` must be undefined or false')\n    }\n\n    const checkInvalidHasMissing = (\n      items: any,\n      fieldName: 'has' | 'missing'\n    ) => {\n      let hadInvalidItem = false\n\n      if (typeof items !== 'undefined' && !Array.isArray(items)) {\n        invalidParts.push(\n          `\\`${fieldName}\\` must be undefined or valid has object`\n        )\n        hadInvalidItem = true\n      } else if (items) {\n        const invalidHasItems = []\n\n        for (const hasItem of items) {\n          let invalidHasParts = []\n\n          if (!allowedHasTypes.has(hasItem.type)) {\n            invalidHasParts.push(`invalid type \"${hasItem.type}\"`)\n          }\n          if (typeof hasItem.key !== 'string' && hasItem.type !== 'host') {\n            invalidHasParts.push(`invalid key \"${hasItem.key}\"`)\n          }\n          if (\n            typeof hasItem.value !== 'undefined' &&\n            typeof hasItem.value !== 'string'\n          ) {\n            invalidHasParts.push(`invalid value \"${hasItem.value}\"`)\n          }\n          if (typeof hasItem.value === 'undefined' && hasItem.type === 'host') {\n            invalidHasParts.push(`value is required for \"host\" type`)\n          }\n\n          if (invalidHasParts.length > 0) {\n            invalidHasItems.push(\n              `${invalidHasParts.join(', ')} for ${JSON.stringify(hasItem)}`\n            )\n          }\n        }\n\n        if (invalidHasItems.length > 0) {\n          hadInvalidItem = true\n          const itemStr = `item${invalidHasItems.length === 1 ? '' : 's'}`\n\n          console.error(\n            `Invalid \\`${fieldName}\\` ${itemStr}:\\n` +\n              invalidHasItems.join('\\n')\n          )\n          console.error()\n          invalidParts.push(`invalid \\`${fieldName}\\` ${itemStr} found`)\n        }\n      }\n      return hadInvalidItem\n    }\n    if (checkInvalidHasMissing(route.has, 'has')) {\n      hadInvalidHas = true\n    }\n    if (checkInvalidHasMissing(route.missing, 'missing')) {\n      hadInvalidMissing = true\n    }\n\n    if (!route.source) {\n      invalidParts.push('`source` is missing')\n    } else if (typeof route.source !== 'string') {\n      invalidParts.push('`source` is not a string')\n    } else if (!route.source.startsWith('/')) {\n      invalidParts.push('`source` does not start with /')\n    }\n\n    if (type === 'header') {\n      invalidParts.push(...checkHeader(route as Header))\n    } else if (type !== 'middleware') {\n      let _route = route as Rewrite | Redirect\n      if (!_route.destination) {\n        invalidParts.push('`destination` is missing')\n      } else if (typeof _route.destination !== 'string') {\n        invalidParts.push('`destination` is not a string')\n      } else if (\n        type === 'rewrite' &&\n        !_route.destination.match(/^(\\/|https:\\/\\/|http:\\/\\/)/)\n      ) {\n        invalidParts.push(\n          '`destination` does not start with `/`, `http://`, or `https://`'\n        )\n      }\n    }\n\n    if (type === 'redirect') {\n      const result = checkRedirect(route as Redirect)\n      hadInvalidStatus = hadInvalidStatus || result.hadInvalidStatus\n      invalidParts.push(...result.invalidParts)\n    }\n\n    let sourceTokens: Token[] | undefined\n\n    if (typeof route.source === 'string' && route.source.startsWith('/')) {\n      // only show parse error if we didn't already show error\n      // for not being a string\n      const { tokens, error, regexStr } = tryToParsePath(route.source)\n\n      if (error) {\n        invalidParts.push('`source` parse failed')\n      }\n\n      if (regexStr && regexStr.length > 4096) {\n        invalidParts.push('`source` exceeds max built length of 4096')\n      }\n\n      sourceTokens = tokens\n    }\n    const hasSegments = new Set<string>()\n\n    if (route.has) {\n      for (const hasItem of route.has) {\n        if (!hasItem.value && hasItem.key) {\n          hasSegments.add(hasItem.key)\n        }\n\n        if (hasItem.value) {\n          for (const match of hasItem.value.matchAll(namedGroupsRegex)) {\n            if (match[1]) {\n              hasSegments.add(match[1])\n            }\n          }\n\n          if (hasItem.type === 'host') {\n            hasSegments.add('host')\n          }\n        }\n      }\n    }\n\n    // make sure no unnamed patterns are attempted to be used in the\n    // destination as this can cause confusion and is not allowed\n    if (typeof (route as Rewrite).destination === 'string') {\n      if (\n        (route as Rewrite).destination.startsWith('/') &&\n        Array.isArray(sourceTokens)\n      ) {\n        const unnamedInDest = new Set()\n\n        for (const token of sourceTokens) {\n          if (typeof token === 'object' && typeof token.name === 'number') {\n            const unnamedIndex = new RegExp(`:${token.name}(?!\\\\d)`)\n            if ((route as Rewrite).destination.match(unnamedIndex)) {\n              unnamedInDest.add(`:${token.name}`)\n            }\n          }\n        }\n\n        if (unnamedInDest.size > 0) {\n          invalidParts.push(\n            `\\`destination\\` has unnamed params ${[...unnamedInDest].join(\n              ', '\n            )}`\n          )\n        } else {\n          const {\n            tokens: destTokens,\n            regexStr: destRegexStr,\n            error: destinationParseFailed,\n          } = tryToParsePath((route as Rewrite).destination, {\n            handleUrl: true,\n          })\n\n          if (destRegexStr && destRegexStr.length > 4096) {\n            invalidParts.push('`destination` exceeds max built length of 4096')\n          }\n\n          if (destinationParseFailed) {\n            invalidParts.push('`destination` parse failed')\n          } else {\n            const sourceSegments = new Set(\n              sourceTokens\n                .map((item) => typeof item === 'object' && item.name)\n                .filter(Boolean)\n            )\n            const invalidDestSegments = new Set()\n\n            for (const token of destTokens!) {\n              if (\n                typeof token === 'object' &&\n                !sourceSegments.has(token.name) &&\n                !hasSegments.has(token.name as string)\n              ) {\n                invalidDestSegments.add(token.name)\n              }\n            }\n\n            if (invalidDestSegments.size) {\n              invalidParts.push(\n                `\\`destination\\` has segments not in \\`source\\` or \\`has\\` (${[\n                  ...invalidDestSegments,\n                ].join(', ')})`\n              )\n            }\n          }\n        }\n      }\n    }\n\n    const hasInvalidKeys = invalidKeys.length > 0\n    const hasInvalidParts = invalidParts.length > 0\n\n    if (hasInvalidKeys || hasInvalidParts) {\n      console.error(\n        `${invalidParts.join(', ')}${\n          invalidKeys.length\n            ? (hasInvalidParts ? ',' : '') +\n              ` invalid field${invalidKeys.length === 1 ? '' : 's'}: ` +\n              invalidKeys.join(',')\n            : ''\n        } for route ${JSON.stringify(route)}`\n      )\n      console.error()\n      numInvalidRoutes++\n    }\n  }\n\n  if (numInvalidRoutes > 0) {\n    if (hadInvalidStatus) {\n      console.error(\n        `\\nValid redirect statusCode values are ${[...allowedStatusCodes].join(\n          ', '\n        )}`\n      )\n    }\n    if (hadInvalidHas) {\n      console.error(\n        `\\nValid \\`has\\` object shape is ${JSON.stringify(\n          {\n            type: [...allowedHasTypes].join(', '),\n            key: 'the key to check for',\n            value: 'undefined or a value string to match against',\n          },\n          null,\n          2\n        )}`\n      )\n    }\n    if (hadInvalidMissing) {\n      console.error(\n        `\\nValid \\`missing\\` object shape is ${JSON.stringify(\n          {\n            type: [...allowedHasTypes].join(', '),\n            key: 'the key to check for',\n            value: 'undefined or a value string to match against',\n          },\n          null,\n          2\n        )}`\n      )\n    }\n    console.error()\n    console.error(\n      `Error: Invalid ${type}${numInvalidRoutes === 1 ? '' : 's'} found`\n    )\n    process.exit(1)\n  }\n}\n\nexport interface CustomRoutes {\n  headers: Header[]\n  onMatchHeaders: Header[]\n  rewrites: {\n    fallback: Rewrite[]\n    afterFiles: Rewrite[]\n    beforeFiles: Rewrite[]\n  }\n  redirects: Redirect[]\n}\n\nfunction processRoutes<T>(\n  routes: T,\n  config: NextConfig,\n  type: 'redirect' | 'rewrite' | 'header'\n): T {\n  const _routes = routes as any as Array<{\n    source: string\n    locale?: false\n    basePath?: false\n    destination?: string\n  }>\n  const newRoutes: typeof _routes = []\n  const defaultLocales: Array<{\n    locale: string\n    base: string\n  }> = []\n\n  if (config.i18n && type === 'redirect') {\n    for (const item of config.i18n?.domains || []) {\n      defaultLocales.push({\n        locale: item.defaultLocale,\n        base: `http${item.http ? '' : 's'}://${item.domain}`,\n      })\n    }\n\n    defaultLocales.push({\n      locale: config.i18n.defaultLocale,\n      base: '',\n    })\n  }\n\n  for (const r of _routes) {\n    const srcBasePath =\n      config.basePath && r.basePath !== false ? config.basePath : ''\n    const isExternal = !r.destination?.startsWith('/')\n    const destBasePath = srcBasePath && !isExternal ? srcBasePath : ''\n\n    if (config.i18n && r.locale !== false) {\n      if (!isExternal) {\n        defaultLocales.forEach((item) => {\n          let destination\n\n          if (r.destination) {\n            destination = item.base\n              ? `${item.base}${destBasePath}${r.destination}`\n              : `${destBasePath}${r.destination}`\n          }\n\n          newRoutes.push({\n            ...r,\n            destination,\n            source: `${srcBasePath}/${item.locale}${\n              r.source === '/' && !config.trailingSlash ? '' : r.source\n            }`,\n          })\n        })\n      }\n\n      r.source = `/:nextInternalLocale(${config.i18n.locales\n        .map((locale: string) => escapeStringRegexp(locale))\n        .join('|')})${\n        r.source === '/' && !config.trailingSlash ? '' : r.source\n      }`\n\n      if (r.destination && r.destination?.startsWith('/')) {\n        r.destination = `/:nextInternalLocale${\n          r.destination === '/' && !config.trailingSlash ? '' : r.destination\n        }`\n      }\n    }\n    r.source = `${srcBasePath}${\n      r.source === '/' && srcBasePath ? '' : r.source\n    }`\n\n    if (r.destination) {\n      r.destination = `${destBasePath}${\n        r.destination === '/' && destBasePath ? '' : r.destination\n      }`\n    }\n    newRoutes.push(r)\n  }\n  return newRoutes as any as T\n}\n\nasync function loadRedirects(config: NextConfig) {\n  if (typeof config.redirects !== 'function') {\n    return []\n  }\n  let redirects = await config.redirects()\n  // check before we process the routes and after to ensure\n  // they are still valid\n  checkCustomRoutes(redirects, 'redirect')\n\n  // save original redirects before transforms\n  if (Array.isArray(redirects)) {\n    config._originalRedirects = redirects.map((r) => ({ ...r }))\n  }\n  redirects = processRoutes(redirects, config, 'redirect')\n  checkCustomRoutes(redirects, 'redirect')\n  return redirects\n}\n\nasync function loadRewrites(config: NextConfig) {\n  // If assetPrefix is set, add a rewrite for `/${assetPrefix}/_next/*`\n  // requests so that they are handled in any of dev, start, or deploy\n  // automatically without the user having to configure this.\n  // If the assetPrefix is an absolute URL, we still consider the path for automatic rewrite.\n  // but hostname routing must be handled by the user\n  let maybeAssetPrefixRewrite: Rewrite[] = []\n  if (config.assetPrefix) {\n    let prefix = config.assetPrefix\n    if (\n      isFullStringUrl(config.assetPrefix) &&\n      URL.canParse(config.assetPrefix)\n    ) {\n      prefix = new URL(config.assetPrefix).pathname\n    }\n\n    if (prefix && prefix !== '/') {\n      const assetPrefix = prefix.startsWith('/') ? prefix : `/${prefix}`\n      const basePath = config.basePath || ''\n      // If these are the same, then this would result in an infinite rewrite.\n      if (assetPrefix !== basePath) {\n        maybeAssetPrefixRewrite.push({\n          source: `${assetPrefix}/_next/:path+`,\n          destination: `${basePath}/_next/:path+`,\n        })\n      }\n    }\n  }\n\n  if (typeof config.rewrites !== 'function') {\n    return {\n      beforeFiles: [...maybeAssetPrefixRewrite],\n      afterFiles: [],\n      fallback: [],\n    }\n  }\n  const _rewrites = await config.rewrites()\n  let beforeFiles: Rewrite[] = []\n  let afterFiles: Rewrite[] = []\n  let fallback: Rewrite[] = []\n\n  if (\n    !Array.isArray(_rewrites) &&\n    typeof _rewrites === 'object' &&\n    Object.keys(_rewrites).every(\n      (key) =>\n        key === 'beforeFiles' || key === 'afterFiles' || key === 'fallback'\n    )\n  ) {\n    beforeFiles = _rewrites.beforeFiles || []\n    afterFiles = _rewrites.afterFiles || []\n    fallback = _rewrites.fallback || []\n  } else {\n    afterFiles = _rewrites as any\n  }\n  // check before we process the routes and after to ensure\n  // they are still valid\n  checkCustomRoutes(beforeFiles, 'rewrite')\n  checkCustomRoutes(afterFiles, 'rewrite')\n  checkCustomRoutes(fallback, 'rewrite')\n\n  // save original rewrites before transforms\n  config._originalRewrites = {\n    beforeFiles: beforeFiles.map((r) => ({ ...r })),\n    afterFiles: afterFiles.map((r) => ({ ...r })),\n    fallback: fallback.map((r) => ({ ...r })),\n  }\n\n  beforeFiles = [\n    ...maybeAssetPrefixRewrite,\n    ...processRoutes(beforeFiles, config, 'rewrite'),\n  ]\n  afterFiles = processRoutes(afterFiles, config, 'rewrite')\n  fallback = processRoutes(fallback, config, 'rewrite')\n\n  checkCustomRoutes(beforeFiles, 'rewrite')\n  checkCustomRoutes(afterFiles, 'rewrite')\n  checkCustomRoutes(fallback, 'rewrite')\n\n  return {\n    beforeFiles,\n    afterFiles,\n    fallback,\n  }\n}\n\nasync function loadHeaders(config: NextConfig) {\n  if (typeof config.headers !== 'function') {\n    return []\n  }\n  let headers = await config.headers()\n  // check before we process the routes and after to ensure\n  // they are still valid\n  checkCustomRoutes(headers, 'header')\n\n  headers = processRoutes(headers, config, 'header')\n  checkCustomRoutes(headers, 'header')\n  return headers\n}\n\nexport default async function loadCustomRoutes(\n  config: NextConfig\n): Promise<CustomRoutes> {\n  const [headers, rewrites, redirects] = await Promise.all([\n    loadHeaders(config),\n    loadRewrites(config),\n    loadRedirects(config),\n  ])\n\n  const onMatchHeaders: Header[] = []\n\n  const totalRewrites =\n    rewrites.beforeFiles.length +\n    rewrites.afterFiles.length +\n    rewrites.fallback.length\n\n  const totalRoutes = headers.length + redirects.length + totalRewrites\n\n  if (totalRoutes > 1000) {\n    console.warn(\n      bold(yellow(`Warning: `)) +\n        `total number of custom routes exceeds 1000, this can reduce performance. Route counts:\\n` +\n        `headers: ${headers.length}\\n` +\n        `rewrites: ${totalRewrites}\\n` +\n        `redirects: ${redirects.length}\\n` +\n        `See more info: https://nextjs.org/docs/messages/max-custom-routes-reached`\n    )\n  }\n\n  const cacheControlSources: string[] = []\n  for (const headerRoute of headers) {\n    if (!headerRoute.source.startsWith('/_next/')) {\n      continue\n    }\n    for (const header of headerRoute.headers) {\n      if (header.key.toLowerCase() === 'cache-control') {\n        cacheControlSources.push(headerRoute.source)\n        break\n      }\n    }\n  }\n  if (cacheControlSources.length > 0) {\n    console.warn(\n      bold(yellow(`Warning: `)) +\n        `Custom Cache-Control headers detected for the following routes:\\n` +\n        cacheControlSources.map((source) => `  - ${source}`).join('\\n') +\n        `\\n\\nSetting a custom Cache-Control header can break Next.js development behavior.`\n    )\n  }\n\n  if (config.deploymentId) {\n    if (config.experimental?.useSkewCookie) {\n      headers.unshift({\n        source: '/:path*',\n        headers: [\n          {\n            key: 'Set-Cookie',\n            value: `__vdpl=${config.deploymentId}; Path=/; HttpOnly`,\n          },\n        ],\n      })\n    }\n\n    onMatchHeaders.push(\n      {\n        source: '/:path*',\n        has: [\n          {\n            type: 'header',\n            key: 'rsc',\n            value: '1',\n          },\n        ],\n        headers: [\n          {\n            key: NEXT_NAV_DEPLOYMENT_ID_HEADER,\n            value: config.deploymentId,\n          },\n        ],\n      },\n      {\n        source: '/_next/data/(.*)',\n        headers: [\n          {\n            key: NEXT_NAV_DEPLOYMENT_ID_HEADER,\n            value: config.deploymentId,\n          },\n        ],\n      }\n    )\n  }\n\n  if (!config.skipTrailingSlashRedirect) {\n    if (config.trailingSlash) {\n      redirects.unshift(\n        {\n          source: '/:file((?!\\\\.well-known(?:/.*)?)(?:[^/]+/)*[^/]+\\\\.\\\\w+)/',\n          destination: '/:file',\n          permanent: true,\n          locale: config.i18n ? false : undefined,\n          internal: true,\n          priority: true,\n          // don't run this redirect for _next/data requests\n          missing: [\n            {\n              type: 'header',\n              key: 'x-nextjs-data',\n            },\n          ],\n        },\n        {\n          source: '/:notfile((?!\\\\.well-known(?:/.*)?)(?:[^/]+/)*[^/\\\\.]+)',\n          destination: '/:notfile/',\n          permanent: true,\n          locale: config.i18n ? false : undefined,\n          internal: true,\n          priority: true,\n        }\n      )\n      if (config.basePath) {\n        redirects.unshift({\n          source: config.basePath,\n          destination: config.basePath + '/',\n          permanent: true,\n          basePath: false,\n          locale: config.i18n ? false : undefined,\n          internal: true,\n          priority: true,\n        })\n      }\n    } else {\n      redirects.unshift({\n        source: '/:path+/',\n        destination: '/:path+',\n        permanent: true,\n        locale: config.i18n ? false : undefined,\n        internal: true,\n        priority: true,\n      })\n      if (config.basePath) {\n        redirects.unshift({\n          source: config.basePath + '/',\n          destination: config.basePath,\n          permanent: true,\n          basePath: false,\n          locale: config.i18n ? false : undefined,\n          internal: true,\n          priority: true,\n        })\n      }\n    }\n  }\n\n  return {\n    headers,\n    onMatchHeaders,\n    rewrites,\n    redirects,\n  }\n}\n"],"names":["checkCustomRoutes","loadCustomRoutes","normalizeRouteRegex","allowedHasTypes","Set","namedGroupsRegex","regex","replace","checkRedirect","route","invalidParts","hadInvalidStatus","statusCode","allowedStatusCodes","has","push","permanent","checkHeader","Array","isArray","headers","length","header","key","value","routes","type","console","error","process","exit","numInvalidRoutes","hadInvalidHas","hadInvalidMissing","allowedKeys","add","JSON","stringify","basePath","destination","startsWith","source","keys","Object","invalidKeys","filter","locale","checkInvalidHasMissing","items","fieldName","hadInvalidItem","invalidHasItems","hasItem","invalidHasParts","join","itemStr","missing","_route","match","result","sourceTokens","tokens","regexStr","tryToParsePath","hasSegments","matchAll","unnamedInDest","token","name","unnamedIndex","RegExp","size","destTokens","destRegexStr","destinationParseFailed","handleUrl","sourceSegments","map","item","Boolean","invalidDestSegments","hasInvalidKeys","hasInvalidParts","processRoutes","config","_routes","newRoutes","defaultLocales","i18n","domains","defaultLocale","base","http","domain","r","srcBasePath","isExternal","destBasePath","forEach","trailingSlash","locales","escapeStringRegexp","loadRedirects","redirects","_originalRedirects","loadRewrites","maybeAssetPrefixRewrite","assetPrefix","prefix","isFullStringUrl","URL","canParse","pathname","rewrites","beforeFiles","afterFiles","fallback","_rewrites","every","_originalRewrites","loadHeaders","Promise","all","onMatchHeaders","totalRewrites","totalRoutes","warn","bold","yellow","cacheControlSources","headerRoute","toLowerCase","deploymentId","experimental","useSkewCookie","unshift","NEXT_NAV_DEPLOYMENT_ID_HEADER","skipTrailingSlashRedirect","undefined","internal","priority"],"mappings":";;;;;;;;;;;;;;;;IAkJgBA,iBAAiB;eAAjBA;;IA4iBhB,OA+JC;eA/J6BC;;IApmBdC,mBAAmB;eAAnBA;;;4BAvFa;8BACM;gCACJ;gCACI;qBACH;2BACc;AA+E9C,MAAMC,kBAAkB,IAAIC,IAAI;IAAC;IAAU;IAAU;IAAS;CAAO;AACrE,MAAMC,mBAAmB;AAElB,SAASH,oBAAoBI,KAAa;IAC/C,0EAA0E;IAC1E,OAAOA,MAAMC,OAAO,CAAC,SAAS;AAChC;AAEA,SAASC,cAAcC,KAAe;IAIpC,MAAMC,eAAyB,EAAE;IACjC,IAAIC,mBAA4B;IAEhC,IAAIF,MAAMG,UAAU,IAAI,CAACC,kCAAkB,CAACC,GAAG,CAACL,KAAK,CAAC,aAAa,GAAG;QACpEE,mBAAmB;QACnBD,aAAaK,IAAI,CAAC,CAAC,mDAAmD,CAAC;IACzE;IACA,IAAI,OAAON,MAAMO,SAAS,KAAK,aAAa,CAACP,KAAK,CAAC,aAAa,EAAE;QAChEC,aAAaK,IAAI,CAAC,CAAC,iDAAiD,CAAC;IACvE;IAEA,OAAO;QACLL;QACAC;IACF;AACF;AAEA,SAASM,YAAYR,KAAa;IAChC,MAAMC,eAAyB,EAAE;IAEjC,IAAI,CAACQ,MAAMC,OAAO,CAACV,MAAMW,OAAO,GAAG;QACjCV,aAAaK,IAAI,CAAC;IACpB,OAAO,IAAIN,MAAMW,OAAO,CAACC,MAAM,KAAK,G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