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AAA,EAAAA,MAAAA,EAAmB,KAAO,GAE3C,MAAO2I,CAAAA,EAAAA,EAAAA,OAAAA,EAAQ,IACb,GAAcH,EAIP,GAJM,CAAO,MAKI,CAAlBjI,GACFkI,EAASlI,OAAO,GAChBmI,EAASnI,OAAO,KAEhBkI,EAASlI,OAAO,CAAGqI,EAASL,EAAMhI,GAClCmI,EAASnI,OAAO,CAAGqI,EAASJ,EAAMjI,GAEtC,EAXSgI,GAAQC,EAYhB,CAACD,EAAMC,EAAK,CACjB,CAEA,SAASI,EACPL,CAAgC,CAChChI,CAAiB,EAEjB,GAAoB,YAAhB,OAAOgI,EAST,OADAA,EAAKhI,OAAO,CAAGA,EACR,KACLgI,EAAKhI,OAAO,CAAG,IACjB,CAX8B,EAC9B,IAAMsI,EAAUN,EAAKhI,SACrB,YAAI,OAAOsI,EACFA,EAEA,IAAMN,EAAK,KAEtB,CAMF,MANS,iOC3CT,qCAA6C,CAC7C,QACA,CAAC,EA8DD,SANA,KACA,0CACA,cACA,SACK,CACL,EACA,GACA,yBACA,QACA,CAAK,CACL,yBACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,+BACA,QACA,CAAK,CACL,iCACA,QACA,CAAK,CACL,uCACA,QACA,CAAK,CACL,kCACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,yCACA,QACA,CAAK,CACL,+BACA,QACA,CAAK,CACL,+BACA,QACA,CAAK,CACL,sCACA,QACA,CAAK,CACL,4BACA,QACA,CAAK,CACL,sCACA,QACA,CAAK,CACL,8CACA,QACA,CAAK,CACL,kDACA,QACA,CAAK,CACL,uCACA,QACA,CAAK,CACL,0CACA,QACA,CAAK,CACL,kCACA,QACA,CAAK,CACL,oCACA,QACA,CAAK,CACL,qCACA,QACA,CAAK,CACL,4BACA,QACA,CAAK,CACL,2CACA,QACA,CAAK,CACL,4BACA,QACA,CAAK,CACL,mCACA,QACA,CAAK,CACL,8BACA,QACA,CAAK,CACL,iCACA,QACA,CAAK,CACL,2BACA,QACA,CAAK,CACL,uCACA,QACA,CAAK,CACL,sDACA,QACA,CAAK,CACL,0CACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,2CACA,QACA,CAAK,CACL,uCACA,QACA,CAAK,CACL,kCACA,QACA,CAAK,CACL,qCACA,QACA,CAAK,CACL,mCACA,QACA,CAAK,CACL,mCACA,QACA,CAAK,CACL,+BACA,QACA,CAAK,CACL,mCACA,QACA,CAAK,CACL,8BACA,QACA,CAAK,CACL,sBACA,QACA,CAAK,CACL,qCACA,QACA,CAAK,CACL,gDACA,QACA,CAAK,CACL,qCACA,QACA,CAAK,CACL,0BACA,QACA,CAAK,CACL,qCACA,QACA,CAAK,CACL,0CACA,QACA,CAAK,CACL,sDACA,QACA,CAAK,CACL,4CACA,QACA,CAAK,CACL,0BACA,SACA,CAAK,CACL,oCACA,SACA,CACA,CAAC,EACD,aACA,SACA,mBACA,2BACA,wCACA,kBACA,cACA,iBACA,SACA,YACA,UACA,UACA,UACA,sBACA,2BACA,4BACA,gCACA,gBACA,KACA,MACA,OACA,UACA,UACA,aACA,eACA,cAA+C,EAAoB,EACnE,oBACA,uBACA,qBACA,0BACA,yBACA,mCACA,qCACA,sCACA,mCACA,uCACA,2CACA,kLACA,wGACA,4FACA,2HACA,4GACA,0HACA,+FACA,mGACA,uGACA,6JACA,sNACA,yJACA,GACA,MACA,QACA,aACA,MACA,MACA,CACA,GACA,YACA,qCACA,eACA,EAIA,GAGA,gBAIA,4BAGA,0BAGA,+BAGA,UAGA,wBAGA,wBAGA,uBAGA,mCACA,EACA,IACA,KACA,OACA,cACA,wBACA,gBACA,CACA,YACA,wBACA,gBACA,aACA,aACA,CACA,eAEA,MACA,CACA,YACA,sBACA,kBACA,CACA,SACA,wBACA,gBACA,sBACA,kBACA,SACA,aACA,CACA,UAEA,wBACA,sBACA,kBACA,gBACA,CAEA,EACA,IACA,uCACA,6BACA,wCACA,gDACA,+GCvWgBO,qCAAAA,KAHhB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,EAAoBa,EAAIP,SAAS,CAAEO,EAAIA,GAAG,CAC7D,EAEK,CAAC,EAGV,IAAMzT,EAAQ,MAAMwT,EAAIE,eAAe,CAACD,GAExC,GAAIJ,GAAOV,EAAUU,GACnB,GADyB,IAClBrT,EAGT,GAAI,CAACA,EAIH,KAJU,CAIJ,MAHW,IAAGyS,EAClBe,GACA,+DAA8DxT,EAAM,cAcxE,OAAOA,CACT,CAEO,IAAMqS,EAA4B,aAAvB,OAAOsB,YACZrB,EACXD,GACC,CAAC,OAAQ,UAAW,mBAAmB,CAAWhI,KAAK,CACtD,GAA2C,YAA/B,OAAOsJ,WAAW,CAACC,EAAO,CAGnC,OAAMjH,UAAoBkE,MAAO,CACjC,MAAMsB,UAAuBtB,MAAO,CACpC,MAAMuB,UAA0BvB,MAGrCgD,YAAYC,CAAY,CAAE,CACxB,KAAK,GACL,IAAI,CAACC,IAAI,CAAG,SACZ,IAAI,CAACX,IAAI,CAAG,oBACZ,IAAI,CAACY,OAAO,CAAI,gCAA+BF,CACjD,CACF,CAEO,MAAM5B,UAA0BrB,MACrCgD,YAAYC,CAAY,CAAEE,CAAe,CAAE,CACzC,KAAK,GACL,IAAI,CAACA,OAAO,CAAI,wCAAuCF,EAAK,IAAGE,CACjE,CACF,CAEO,MAAM/B,UAAgCpB,MAE3CgD,aAAc,CACZ,KAAK,GACL,IAAI,CAACE,IAAI,CAAG,SACZ,IAAI,CAACC,OAAO,CAAI,mCAClB,CACF,CAWO,SAASnB,EAAexP,CAAY,EACzC,OAAO4Q,KAAKC,SAAS,CAAC,CAAEF,QAAS3Q,EAAM2Q,OAAO,CAAEG,MAAO9Q,EAAM8Q,KAAK,EACpE","sources":["webpack://_N_E/../../src/client/add-locale.ts","webpack://_N_E/../../src/client/get-domain-locale.ts","webpack://_N_E/../../src/client/link.tsx","webpack://_N_E/../../src/client/request-idle-callback.ts","webpack://_N_E/../../src/client/resolve-href.ts","webpack://_N_E/../../src/client/use-intersection.tsx","webpack://_N_E/../../src/client/use-merged-ref.ts","webpack://_N_E/../../node_modules/next/dist/lib/constants.js?d29e","webpack://_N_E/../../../src/shared/lib/escape-regexp.ts","webpack://_N_E/../../../src/shared/lib/router-context.shared-runtime.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/index.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/interpolate-as.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-dynamic.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-local-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/omit.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/querystring.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-matcher.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-regex.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/sorted-routes.ts","webpack://_N_E/../../../src/shared/lib/utils.ts"],"sourcesContent":["import type { addLocale as Fn } from '../shared/lib/router/utils/add-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nexport const addLocale: typeof Fn = (path, ...args) => {\n if (process.env.__NEXT_I18N_SUPPORT) {\n return normalizePathTrailingSlash(\n require('../shared/lib/router/utils/add-locale').addLocale(path, ...args)\n )\n }\n return path\n}\n","import type { DomainLocale } from '../server/config'\nimport type { normalizeLocalePath as NormalizeFn } from './normalize-locale-path'\nimport type { detectDomainLocale as DetectFn } from './detect-domain-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function getDomainLocale(\n path: string,\n locale?: string | false,\n locales?: string[],\n domainLocales?: DomainLocale[]\n) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const normalizeLocalePath: typeof NormalizeFn =\n require('./normalize-locale-path').normalizeLocalePath\n const detectDomainLocale: typeof DetectFn =\n require('./detect-domain-locale').detectDomainLocale\n\n const target = locale || normalizeLocalePath(path, locales).detectedLocale\n const domain = detectDomainLocale(domainLocales, undefined, target)\n if (domain) {\n const proto = `http${domain.http ? '' : 's'}://`\n const finalLocale = target === domain.defaultLocale ? '' : `/${target}`\n return `${proto}${domain.domain}${normalizePathTrailingSlash(\n `${basePath}${finalLocale}${path}`\n )}`\n }\n return false\n } else {\n return false\n }\n}\n","'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport type {\n AppRouterInstance,\n PrefetchOptions as AppRouterPrefetchOptions,\n} from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { PrefetchKind } from './components/router-reducer/router-reducer-types'\nimport { useMergedRef } from './use-merged-ref'\n\ntype Url = string | UrlObject\ntype RequiredKeys = {\n [K in keyof T]-?: {} extends Pick ? never : K\n}[keyof T]\ntype OptionalKeys = {\n [K in keyof T]-?: {} extends Pick ? K : never\n}[keyof T]\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - `null` (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when the webpack plugin runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys\ntype LinkPropsOptional = OptionalKeys\n\nconst prefetched = new Set()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched.\n */\n bypassPrefetchedCheck?: boolean\n}\n\nfunction prefetch(\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n options: PrefetchOptions,\n appOptions: AppRouterPrefetchOptions,\n isAppRouter: boolean\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.\n if (!isAppRouter && !isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled & when we're not using the app router. App router handles\n // reusing an existing prefetch entry (if it exists) for the same URL.\n // If we dedupe in here, we will cause a race where different prefetch kinds\n // to the same URL (ie auto vs true) will cause one to be ignored.\n if (!options.bypassPrefetchedCheck && !isAppRouter) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n const doPrefetch = async () => {\n if (isAppRouter) {\n // note that `appRouter.prefetch()` is currently sync,\n // so we have to wrap this call in an async function to be able to catch() errors below.\n return (router as AppRouterInstance).prefetch(href, appOptions)\n } else {\n return (router as NextRouter).prefetch(href, as, options)\n }\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n doPrefetch().catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n isAppRouter?: boolean\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (\n isAnchorNodeName &&\n (isModifiedEvent(e) ||\n // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.\n (!isAppRouter && !isLocalURL(href)))\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n if (isAppRouter) {\n React.startTransition(navigate)\n } else {\n navigate()\n }\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: ``](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = {children}\n }\n\n const pagesRouter = React.useContext(RouterContext)\n const appRouter = React.useContext(AppRouterContext)\n const router = pagesRouter ?? appRouter\n\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const prefetchEnabled = prefetchProp !== false\n /**\n * The possible states for prefetch are:\n * - null: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport\n * - true: we will prefetch if the link is visible and prefetch the full page, not just partially\n * - false: we will not prefetch if in the viewport at all\n */\n const appPrefetchKind =\n prefetchProp === null ? PrefetchKind.AUTO : PrefetchKind.FULL\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'prefetch' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isAppRouter && !asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n if (!pagesRouter) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(\n pagesRouter,\n hrefProp,\n true\n )\n\n return {\n href: resolvedHref,\n as: asProp\n ? resolveHref(pagesRouter, asProp)\n : resolvedAs || resolvedHref,\n }\n }, [pagesRouter, hrefProp, asProp])\n\n const previousHref = React.useRef(href)\n const previousAs = React.useRef(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid with child. Please remove or use .\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(\n router,\n href,\n as,\n { locale },\n {\n kind: appPrefetchKind,\n },\n isAppRouter\n )\n }, [\n as,\n href,\n isVisible,\n locale,\n prefetchEnabled,\n pagesRouter?.locale,\n router,\n isAppRouter,\n appPrefetchKind,\n ])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler\n onMouseEnter: React.MouseEventHandler\n onClick: React.MouseEventHandler\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n isAppRouter\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n if (\n (!prefetchEnabled || process.env.NODE_ENV === 'development') &&\n isAppRouter\n ) {\n return\n }\n\n prefetch(\n router,\n href,\n as,\n {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n },\n {\n kind: appPrefetchKind,\n },\n isAppRouter\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n if (!prefetchEnabled && isAppRouter) {\n return\n }\n\n prefetch(\n router,\n href,\n as,\n {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n },\n {\n kind: appPrefetchKind,\n },\n isAppRouter\n )\n },\n }\n\n // If child is an tag and doesn't have a href attribute, or if the 'passHref' property is\n // defined, we specify the current 'href', so that repetition is not needed by the user.\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale =\n typeof locale !== 'undefined' ? locale : pagesRouter?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n pagesRouter?.isLocaleDomain &&\n getDomainLocale(\n as,\n curLocale,\n pagesRouter?.locales,\n pagesRouter?.domainLocales\n )\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, pagesRouter?.defaultLocale))\n }\n\n return legacyBehavior ? (\n React.cloneElement(child, childProps)\n ) : (\n \n {children}\n \n )\n }\n)\n\nexport default Link\n","export const requestIdleCallback =\n (typeof self !== 'undefined' &&\n self.requestIdleCallback &&\n self.requestIdleCallback.bind(window)) ||\n function (cb: IdleRequestCallback): number {\n let start = Date.now()\n return self.setTimeout(function () {\n cb({\n didTimeout: false,\n timeRemaining: function () {\n return Math.max(0, 50 - (Date.now() - start))\n },\n })\n }, 1)\n }\n\nexport const cancelIdleCallback =\n (typeof self !== 'undefined' &&\n self.cancelIdleCallback &&\n self.cancelIdleCallback.bind(window)) ||\n function (id: number) {\n return clearTimeout(id)\n }\n","import type { NextRouter, Url } from '../shared/lib/router/router'\n\nimport { searchParamsToUrlQuery } from '../shared/lib/router/utils/querystring'\nimport { formatWithValidation } from '../shared/lib/router/utils/format-url'\nimport { omit } from '../shared/lib/router/utils/omit'\nimport { normalizeRepeatedSlashes } from '../shared/lib/utils'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { isDynamicRoute } from '../shared/lib/router/utils'\nimport { interpolateAs } from '../shared/lib/router/utils/interpolate-as'\n\n/**\n * Resolves a given hyperlink with a certain router state (basePath not included).\n * Preserves absolute urls.\n */\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs: true\n): [string, string] | [string]\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: false\n): string\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: boolean\n): [string, string] | [string] | string {\n // we use a dummy base url for relative urls\n let base: URL\n let urlAsString = typeof href === 'string' ? href : formatWithValidation(href)\n\n // repeated slashes and backslashes in the URL are considered\n // invalid and will never match a Next.js page/file\n const urlProtoMatch = urlAsString.match(/^[a-zA-Z]{1,}:\\/\\//)\n const urlAsStringNoProto = urlProtoMatch\n ? urlAsString.slice(urlProtoMatch[0].length)\n : urlAsString\n\n const urlParts = urlAsStringNoProto.split('?', 1)\n\n if ((urlParts[0] || '').match(/(\\/\\/|\\\\)/)) {\n console.error(\n `Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\\\ are not valid in the href.`\n )\n const normalizedUrl = normalizeRepeatedSlashes(urlAsStringNoProto)\n urlAsString = (urlProtoMatch ? urlProtoMatch[0] : '') + normalizedUrl\n }\n\n // Return because it cannot be routed by the Next.js router\n if (!isLocalURL(urlAsString)) {\n return (resolveAs ? [urlAsString] : urlAsString) as string\n }\n\n try {\n base = new URL(\n urlAsString.startsWith('#') ? router.asPath : router.pathname,\n 'http://n'\n )\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n base = new URL('/', 'http://n')\n }\n\n try {\n const finalUrl = new URL(urlAsString, base)\n finalUrl.pathname = normalizePathTrailingSlash(finalUrl.pathname)\n let interpolatedAs = ''\n\n if (\n isDynamicRoute(finalUrl.pathname) &&\n finalUrl.searchParams &&\n resolveAs\n ) {\n const query = searchParamsToUrlQuery(finalUrl.searchParams)\n\n const { result, params } = interpolateAs(\n finalUrl.pathname,\n finalUrl.pathname,\n query\n )\n\n if (result) {\n interpolatedAs = formatWithValidation({\n pathname: result,\n hash: finalUrl.hash,\n query: omit(query, params),\n })\n }\n }\n\n // if the origin didn't change, it means we received a relative href\n const resolvedHref =\n finalUrl.origin === base.origin\n ? finalUrl.href.slice(finalUrl.origin.length)\n : finalUrl.href\n\n return resolveAs\n ? [resolvedHref, interpolatedAs || resolvedHref]\n : resolvedHref\n } catch (_) {\n return resolveAs ? [urlAsString] : urlAsString\n }\n}\n","import { useCallback, useEffect, useRef, useState } from 'react'\nimport {\n requestIdleCallback,\n cancelIdleCallback,\n} from './request-idle-callback'\n\ntype UseIntersectionObserverInit = Pick<\n IntersectionObserverInit,\n 'rootMargin' | 'root'\n>\n\ntype UseIntersection = { disabled?: boolean } & UseIntersectionObserverInit & {\n rootRef?: React.RefObject | null\n }\ntype ObserveCallback = (isVisible: boolean) => void\ntype Identifier = {\n root: Element | Document | null\n margin: string\n}\ntype Observer = {\n id: Identifier\n observer: IntersectionObserver\n elements: Map\n}\n\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function'\n\nconst observers = new Map()\nconst idList: Identifier[] = []\n\nfunction createObserver(options: UseIntersectionObserverInit): Observer {\n const id = {\n root: options.root || null,\n margin: options.rootMargin || '',\n }\n const existing = idList.find(\n (obj) => obj.root === id.root && obj.margin === id.margin\n )\n let instance: Observer | undefined\n\n if (existing) {\n instance = observers.get(existing)\n if (instance) {\n return instance\n }\n }\n\n const elements = new Map()\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n const callback = elements.get(entry.target)\n const isVisible = entry.isIntersecting || entry.intersectionRatio > 0\n if (callback && isVisible) {\n callback(isVisible)\n }\n })\n }, options)\n instance = {\n id,\n observer,\n elements,\n }\n\n idList.push(id)\n observers.set(id, instance)\n return instance\n}\n\nfunction observe(\n element: Element,\n callback: ObserveCallback,\n options: UseIntersectionObserverInit\n): () => void {\n const { id, observer, elements } = createObserver(options)\n elements.set(element, callback)\n\n observer.observe(element)\n return function unobserve(): void {\n elements.delete(element)\n observer.unobserve(element)\n\n // Destroy observer when there's nothing left to watch:\n if (elements.size === 0) {\n observer.disconnect()\n observers.delete(id)\n const index = idList.findIndex(\n (obj) => obj.root === id.root && obj.margin === id.margin\n )\n if (index > -1) {\n idList.splice(index, 1)\n }\n }\n }\n}\n\nexport function useIntersection({\n rootRef,\n rootMargin,\n disabled,\n}: UseIntersection): [(element: T | null) => void, boolean, () => void] {\n const isDisabled: boolean = disabled || !hasIntersectionObserver\n\n const [visible, setVisible] = useState(false)\n const elementRef = useRef(null)\n const setElement = useCallback((element: T | null) => {\n elementRef.current = element\n }, [])\n\n useEffect(() => {\n if (hasIntersectionObserver) {\n if (isDisabled || visible) return\n\n const element = elementRef.current\n if (element && element.tagName) {\n const unobserve = observe(\n element,\n (isVisible) => isVisible && setVisible(isVisible),\n { root: rootRef?.current, rootMargin }\n )\n\n return unobserve\n }\n } else {\n if (!visible) {\n const idleCallback = requestIdleCallback(() => setVisible(true))\n return () => cancelIdleCallback(idleCallback)\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isDisabled, rootMargin, rootRef, visible, elementRef.current])\n\n const resetVisible = useCallback(() => {\n setVisible(false)\n }, [])\n\n return [setElement, visible, resetVisible]\n}\n","import { useMemo, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef(\n refA: Ref,\n refB: Ref\n): Ref {\n const cleanupA = useRef<() => void>(() => {})\n const cleanupB = useRef<() => void>(() => {})\n\n return useMemo(() => {\n if (!refA || !refB) {\n return refA || refB\n }\n\n return (current: TElement | null): void => {\n if (current === null) {\n cleanupA.current()\n cleanupB.current()\n } else {\n cleanupA.current = applyRef(refA, current)\n cleanupB.current = applyRef(refB, current)\n }\n }\n }, [refA, refB])\n}\n\nfunction applyRef(\n refA: NonNullable>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n ACTION_SUFFIX: null,\n APP_DIR_ALIAS: null,\n CACHE_ONE_YEAR: null,\n DOT_NEXT_ALIAS: null,\n ESLINT_DEFAULT_DIRS: null,\n GSP_NO_RETURNED_VALUE: null,\n GSSP_COMPONENT_MEMBER_ERROR: null,\n GSSP_NO_RETURNED_VALUE: null,\n INFINITE_CACHE: null,\n INSTRUMENTATION_HOOK_FILENAME: null,\n MATCHED_PATH_HEADER: null,\n MIDDLEWARE_FILENAME: null,\n MIDDLEWARE_LOCATION_REGEXP: null,\n NEXT_BODY_SUFFIX: null,\n NEXT_CACHE_IMPLICIT_TAG_ID: null,\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: null,\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: null,\n NEXT_CACHE_SOFT_TAGS_HEADER: null,\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: null,\n NEXT_CACHE_TAGS_HEADER: null,\n NEXT_CACHE_TAG_MAX_ITEMS: null,\n NEXT_CACHE_TAG_MAX_LENGTH: null,\n NEXT_DATA_SUFFIX: null,\n NEXT_INTERCEPTION_MARKER_PREFIX: null,\n NEXT_META_SUFFIX: null,\n NEXT_QUERY_PARAM_PREFIX: null,\n NEXT_RESUME_HEADER: null,\n NON_STANDARD_NODE_ENV: null,\n PAGES_DIR_ALIAS: null,\n PRERENDER_REVALIDATE_HEADER: null,\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: null,\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: null,\n ROOT_DIR_ALIAS: null,\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: null,\n RSC_ACTION_ENCRYPTION_ALIAS: null,\n RSC_ACTION_PROXY_ALIAS: null,\n RSC_ACTION_VALIDATE_ALIAS: null,\n RSC_CACHE_WRAPPER_ALIAS: null,\n RSC_MOD_REF_PROXY_ALIAS: null,\n RSC_PREFETCH_SUFFIX: null,\n RSC_SEGMENTS_DIR_SUFFIX: null,\n RSC_SEGMENT_SUFFIX: null,\n RSC_SUFFIX: null,\n SERVER_PROPS_EXPORT_ERROR: null,\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: null,\n SERVER_PROPS_SSG_CONFLICT: null,\n SERVER_RUNTIME: null,\n SSG_FALLBACK_EXPORT_ERROR: null,\n SSG_GET_INITIAL_PROPS_CONFLICT: null,\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: null,\n UNSTABLE_REVALIDATE_RENAME_ERROR: null,\n WEBPACK_LAYERS: null,\n WEBPACK_RESOURCE_QUERIES: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ACTION_SUFFIX: function() {\n return ACTION_SUFFIX;\n },\n APP_DIR_ALIAS: function() {\n return APP_DIR_ALIAS;\n },\n CACHE_ONE_YEAR: function() {\n return CACHE_ONE_YEAR;\n },\n DOT_NEXT_ALIAS: function() {\n return DOT_NEXT_ALIAS;\n },\n ESLINT_DEFAULT_DIRS: function() {\n return ESLINT_DEFAULT_DIRS;\n },\n GSP_NO_RETURNED_VALUE: function() {\n return GSP_NO_RETURNED_VALUE;\n },\n GSSP_COMPONENT_MEMBER_ERROR: function() {\n return GSSP_COMPONENT_MEMBER_ERROR;\n },\n GSSP_NO_RETURNED_VALUE: function() {\n return GSSP_NO_RETURNED_VALUE;\n },\n INFINITE_CACHE: function() {\n return INFINITE_CACHE;\n },\n INSTRUMENTATION_HOOK_FILENAME: function() {\n return INSTRUMENTATION_HOOK_FILENAME;\n },\n MATCHED_PATH_HEADER: function() {\n return MATCHED_PATH_HEADER;\n },\n MIDDLEWARE_FILENAME: function() {\n return MIDDLEWARE_FILENAME;\n },\n MIDDLEWARE_LOCATION_REGEXP: function() {\n return MIDDLEWARE_LOCATION_REGEXP;\n },\n NEXT_BODY_SUFFIX: function() {\n return NEXT_BODY_SUFFIX;\n },\n NEXT_CACHE_IMPLICIT_TAG_ID: function() {\n return NEXT_CACHE_IMPLICIT_TAG_ID;\n },\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {\n return NEXT_CACHE_REVALIDATED_TAGS_HEADER;\n },\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {\n return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;\n },\n NEXT_CACHE_SOFT_TAGS_HEADER: function() {\n return NEXT_CACHE_SOFT_TAGS_HEADER;\n },\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;\n },\n NEXT_CACHE_TAGS_HEADER: function() {\n return NEXT_CACHE_TAGS_HEADER;\n },\n NEXT_CACHE_TAG_MAX_ITEMS: function() {\n return NEXT_CACHE_TAG_MAX_ITEMS;\n },\n NEXT_CACHE_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_TAG_MAX_LENGTH;\n },\n NEXT_DATA_SUFFIX: function() {\n return NEXT_DATA_SUFFIX;\n },\n NEXT_INTERCEPTION_MARKER_PREFIX: function() {\n return NEXT_INTERCEPTION_MARKER_PREFIX;\n },\n NEXT_META_SUFFIX: function() {\n return NEXT_META_SUFFIX;\n },\n NEXT_QUERY_PARAM_PREFIX: function() {\n return NEXT_QUERY_PARAM_PREFIX;\n },\n NEXT_RESUME_HEADER: function() {\n return NEXT_RESUME_HEADER;\n },\n NON_STANDARD_NODE_ENV: function() {\n return NON_STANDARD_NODE_ENV;\n },\n PAGES_DIR_ALIAS: function() {\n return PAGES_DIR_ALIAS;\n },\n PRERENDER_REVALIDATE_HEADER: function() {\n return PRERENDER_REVALIDATE_HEADER;\n },\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {\n return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;\n },\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {\n return PUBLIC_DIR_MIDDLEWARE_CONFLICT;\n },\n ROOT_DIR_ALIAS: function() {\n return ROOT_DIR_ALIAS;\n },\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {\n return RSC_ACTION_CLIENT_WRAPPER_ALIAS;\n },\n RSC_ACTION_ENCRYPTION_ALIAS: function() {\n return RSC_ACTION_ENCRYPTION_ALIAS;\n },\n RSC_ACTION_PROXY_ALIAS: function() {\n return RSC_ACTION_PROXY_ALIAS;\n },\n RSC_ACTION_VALIDATE_ALIAS: function() {\n return RSC_ACTION_VALIDATE_ALIAS;\n },\n RSC_CACHE_WRAPPER_ALIAS: function() {\n return RSC_CACHE_WRAPPER_ALIAS;\n },\n RSC_MOD_REF_PROXY_ALIAS: function() {\n return RSC_MOD_REF_PROXY_ALIAS;\n },\n RSC_PREFETCH_SUFFIX: function() {\n return RSC_PREFETCH_SUFFIX;\n },\n RSC_SEGMENTS_DIR_SUFFIX: function() {\n return RSC_SEGMENTS_DIR_SUFFIX;\n },\n RSC_SEGMENT_SUFFIX: function() {\n return RSC_SEGMENT_SUFFIX;\n },\n RSC_SUFFIX: function() {\n return RSC_SUFFIX;\n },\n SERVER_PROPS_EXPORT_ERROR: function() {\n return SERVER_PROPS_EXPORT_ERROR;\n },\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {\n return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;\n },\n SERVER_PROPS_SSG_CONFLICT: function() {\n return SERVER_PROPS_SSG_CONFLICT;\n },\n SERVER_RUNTIME: function() {\n return SERVER_RUNTIME;\n },\n SSG_FALLBACK_EXPORT_ERROR: function() {\n return SSG_FALLBACK_EXPORT_ERROR;\n },\n SSG_GET_INITIAL_PROPS_CONFLICT: function() {\n return SSG_GET_INITIAL_PROPS_CONFLICT;\n },\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {\n return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;\n },\n UNSTABLE_REVALIDATE_RENAME_ERROR: function() {\n return UNSTABLE_REVALIDATE_RENAME_ERROR;\n },\n WEBPACK_LAYERS: function() {\n return WEBPACK_LAYERS;\n },\n WEBPACK_RESOURCE_QUERIES: function() {\n return WEBPACK_RESOURCE_QUERIES;\n }\n});\nconst NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nconst NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nconst MATCHED_PATH_HEADER = 'x-matched-path';\nconst PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nconst PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nconst RSC_PREFETCH_SUFFIX = '.prefetch.rsc';\nconst RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nconst RSC_SEGMENT_SUFFIX = '.segment.rsc';\nconst RSC_SUFFIX = '.rsc';\nconst ACTION_SUFFIX = '.action';\nconst NEXT_DATA_SUFFIX = '.json';\nconst NEXT_META_SUFFIX = '.meta';\nconst NEXT_BODY_SUFFIX = '.body';\nconst NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nconst NEXT_CACHE_SOFT_TAGS_HEADER = 'x-next-cache-soft-tags';\nconst NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nconst NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nconst NEXT_RESUME_HEADER = 'next-resume';\nconst NEXT_CACHE_TAG_MAX_ITEMS = 64;\nconst NEXT_CACHE_TAG_MAX_LENGTH = 256;\nconst NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nconst NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\nconst CACHE_ONE_YEAR = 31536000;\nconst INFINITE_CACHE = 0xfffffffe;\nconst MIDDLEWARE_FILENAME = 'middleware';\nconst MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\nconst INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\nconst PAGES_DIR_ALIAS = 'private-next-pages';\nconst DOT_NEXT_ALIAS = 'private-dot-next';\nconst ROOT_DIR_ALIAS = 'private-next-root-dir';\nconst APP_DIR_ALIAS = 'private-next-app-dir';\nconst RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy';\nconst RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nconst RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nconst RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nconst RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nconst RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nconst PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nconst SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nconst SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nconst SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nconst STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nconst SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nconst GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nconst GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nconst UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nconst GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nconst NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nconst SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nconst ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nconst SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The layer for the API routes.\n */ api: 'api',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.api\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\n\n//# sourceMappingURL=constants.js.map","// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nconst reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/\nconst reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g\n\nexport function escapeStringRegexp(str: string) {\n // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n if (reHasRegExp.test(str)) {\n return str.replace(reReplaceRegExp, '\\\\$&')\n }\n return str\n}\n","import React from 'react'\nimport type { NextRouter } from './router/router'\n\nexport const RouterContext = React.createContext(null)\n\nif (process.env.NODE_ENV !== 'production') {\n RouterContext.displayName = 'RouterContext'\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n","export { getSortedRoutes, getSortedRouteObjects } from './sorted-routes'\nexport { isDynamicRoute } from './is-dynamic'\n","import type { ParsedUrlQuery } from 'querystring'\n\nimport { getRouteMatcher } from './route-matcher'\nimport { getRouteRegex } from './route-regex'\n\nexport function interpolateAs(\n route: string,\n asPathname: string,\n query: ParsedUrlQuery\n) {\n let interpolatedRoute = ''\n\n const dynamicRegex = getRouteRegex(route)\n const dynamicGroups = dynamicRegex.groups\n const dynamicMatches =\n // Try to match the dynamic route against the asPath\n (asPathname !== route ? getRouteMatcher(dynamicRegex)(asPathname) : '') ||\n // Fall back to reading the values from the href\n // TODO: should this take priority; also need to change in the router.\n query\n\n interpolatedRoute = route\n const params = Object.keys(dynamicGroups)\n\n if (\n !params.every((param) => {\n let value = dynamicMatches[param] || ''\n const { repeat, optional } = dynamicGroups[param]\n\n // support single-level catch-all\n // TODO: more robust handling for user-error (passing `/`)\n let replaced = `[${repeat ? '...' : ''}${param}]`\n if (optional) {\n replaced = `${!value ? '/' : ''}[${replaced}]`\n }\n if (repeat && !Array.isArray(value)) value = [value]\n\n return (\n (optional || param in dynamicMatches) &&\n // Interpolate group into data URL if present\n (interpolatedRoute =\n interpolatedRoute!.replace(\n replaced,\n repeat\n ? (value as string[])\n .map(\n // these values should be fully encoded instead of just\n // path delimiter escaped since they are being inserted\n // into the URL and we expect URL encoded segments\n // when parsing dynamic route params\n (segment) => encodeURIComponent(segment)\n )\n .join('/')\n : encodeURIComponent(value as string)\n ) || '/')\n )\n })\n ) {\n interpolatedRoute = '' // did not satisfy all requirements\n\n // n.b. We ignore this error because we handle warning for this case in\n // development in the `` component directly.\n }\n return {\n params,\n result: interpolatedRoute,\n }\n}\n","import {\n extractInterceptionRouteInformation,\n isInterceptionRouteAppPath,\n} from '../../../../server/lib/interception-routes'\n\n// Identify /[param]/ in route string\nconst TEST_ROUTE = /\\/\\[[^/]+?\\](?=\\/|$)/\n\nexport function isDynamicRoute(route: string): boolean {\n if (isInterceptionRouteAppPath(route)) {\n route = extractInterceptionRouteInformation(route).interceptedRoute\n }\n\n return TEST_ROUTE.test(route)\n}\n","import { isAbsoluteUrl, getLocationOrigin } from '../../utils'\nimport { hasBasePath } from '../../../../client/has-base-path'\n\n/**\n * Detects whether a given url is routable by the Next.js router (browser only).\n */\nexport function isLocalURL(url: string): boolean {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!isAbsoluteUrl(url)) return true\n try {\n // absolute urls can be local if they are on the same origin\n const locationOrigin = getLocationOrigin()\n const resolved = new URL(url, locationOrigin)\n return resolved.origin === locationOrigin && hasBasePath(resolved.pathname)\n } catch (_) {\n return false\n }\n}\n","export function omit(\n object: T,\n keys: K[]\n): Omit {\n const omitted: { [key: string]: unknown } = {}\n Object.keys(object).forEach((key) => {\n if (!keys.includes(key as K)) {\n omitted[key] = object[key]\n }\n })\n return omitted as Omit\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n searchParams.forEach((value, key) => {\n if (typeof query[key] === 'undefined') {\n query[key] = value\n } else if (Array.isArray(query[key])) {\n ;(query[key] as string[]).push(value)\n } else {\n query[key] = [query[key] as string, value]\n }\n })\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (\n typeof param === 'string' ||\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(\n urlQuery: ParsedUrlQuery\n): URLSearchParams {\n const result = new URLSearchParams()\n Object.entries(urlQuery).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n value.forEach((item) => result.append(key, stringifyUrlQueryParam(item)))\n } else {\n result.set(key, stringifyUrlQueryParam(value))\n }\n })\n return result\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n searchParamsList.forEach((searchParams) => {\n Array.from(searchParams.keys()).forEach((key) => target.delete(key))\n searchParams.forEach((value, key) => target.append(key, value))\n })\n return target\n}\n","import type { RouteRegex } from './route-regex'\nimport { DecodeError } from '../../utils'\nimport type { Params } from '../../../../server/request/params'\n\nexport interface RouteMatchFn {\n (pathname: string | null | undefined): false | Params\n}\n\nexport function getRouteMatcher({ re, groups }: RouteRegex): RouteMatchFn {\n return (pathname: string | null | undefined) => {\n const routeMatch = re.exec(pathname!)\n if (!routeMatch) {\n return false\n }\n\n const decode = (param: string) => {\n try {\n return decodeURIComponent(param)\n } catch (_) {\n throw new DecodeError('failed to decode param')\n }\n }\n const params: { [paramName: string]: string | string[] } = {}\n\n Object.keys(groups).forEach((slugName: string) => {\n const g = groups[slugName]\n const m = routeMatch[g.pos]\n if (m !== undefined) {\n params[slugName] = ~m.indexOf('/')\n ? m.split('/').map((entry) => decode(entry))\n : g.repeat\n ? [decode(m)]\n : decode(m)\n }\n })\n return params\n }\n}\n","import {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from '../../../../server/lib/interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\n\nexport interface Group {\n pos: number\n repeat: boolean\n optional: boolean\n}\n\nexport interface RouteRegex {\n groups: { [groupName: string]: Group }\n re: RegExp\n}\n\n/**\n * Regular expression pattern used to match route parameters.\n * Matches both single parameters and parameter groups.\n * Examples:\n * - `[[...slug]]` matches parameter group with key 'slug', repeat: true, optional: true\n * - `[...slug]` matches parameter group with key 'slug', repeat: true, optional: false\n * - `[[foo]]` matches parameter with key 'foo', repeat: false, optional: true\n * - `[bar]` matches parameter with key 'bar', repeat: false, optional: false\n */\nconst PARAMETER_PATTERN = /\\[((?:\\[.*\\])|.+)\\]/\n\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[[...slug]]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[[foo]]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `[bar]` -> `{ key: 'bar', repeat: false, optional: false }`\n * - `fizz` -> `{ key: 'fizz', repeat: false, optional: false }`\n * @param param - The parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseParameter(param: string) {\n const match = param.match(PARAMETER_PATTERN)\n\n if (!match) {\n return parseMatchedParameter(param)\n }\n\n return parseMatchedParameter(match[1])\n}\n\n/**\n * Parses a matched parameter from the PARAMETER_PATTERN regex to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `...slug` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[foo]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `bar` -> `{ key: 'bar', repeat: false, optional: false }`\n * @param param - The matched parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nfunction parseMatchedParameter(param: string) {\n const optional = param.startsWith('[') && param.endsWith(']')\n if (optional) {\n param = param.slice(1, -1)\n }\n const repeat = param.startsWith('...')\n if (repeat) {\n param = param.slice(3)\n }\n return { key: param, repeat, optional }\n}\n\nfunction getParametrizedRoute(route: string) {\n const segments = removeTrailingSlash(route).slice(1).split('/')\n const groups: { [groupName: string]: Group } = {}\n let groupIndex = 1\n return {\n parameterizedRoute: segments\n .map((segment) => {\n const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n if (markerMatch && paramMatches) {\n const { key, optional, repeat } = parseMatchedParameter(\n paramMatches[1]\n )\n groups[key] = { pos: groupIndex++, repeat, optional }\n return `/${escapeStringRegexp(markerMatch)}([^/]+?)`\n } else if (paramMatches) {\n const { key, repeat, optional } = parseMatchedParameter(\n paramMatches[1]\n )\n groups[key] = { pos: groupIndex++, repeat, optional }\n return repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n } else {\n return `/${escapeStringRegexp(segment)}`\n }\n })\n .join(''),\n groups,\n }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(normalizedRoute: string): RouteRegex {\n const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute)\n return {\n re: new RegExp(`^${parameterizedRoute}(?:/)?$`),\n groups: groups,\n }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n let i = 0\n\n return () => {\n let routeKey = ''\n let j = ++i\n while (j > 0) {\n routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n j = Math.floor((j - 1) / 26)\n }\n return routeKey\n }\n}\n\nfunction getSafeKeyFromSegment({\n interceptionMarker,\n getSafeRouteKey,\n segment,\n routeKeys,\n keyPrefix,\n}: {\n interceptionMarker?: string\n getSafeRouteKey: () => string\n segment: string\n routeKeys: Record\n keyPrefix?: string\n}) {\n const { key, optional, repeat } = parseMatchedParameter(segment)\n\n // replace any non-word characters since they can break\n // the named regex\n let cleanedKey = key.replace(/\\W/g, '')\n\n if (keyPrefix) {\n cleanedKey = `${keyPrefix}${cleanedKey}`\n }\n let invalidKey = false\n\n // check if the key is still invalid and fallback to using a known\n // safe key\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true\n }\n if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n invalidKey = true\n }\n\n if (invalidKey) {\n cleanedKey = getSafeRouteKey()\n }\n\n if (keyPrefix) {\n routeKeys[cleanedKey] = `${keyPrefix}${key}`\n } else {\n routeKeys[cleanedKey] = key\n }\n\n // if the segment has an interception marker, make sure that's part of the regex pattern\n // this is to ensure that the route with the interception marker doesn't incorrectly match\n // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n const interceptionPrefix = interceptionMarker\n ? escapeStringRegexp(interceptionMarker)\n : ''\n\n return repeat\n ? optional\n ? `(?:/${interceptionPrefix}(?<${cleanedKey}>.+?))?`\n : `/${interceptionPrefix}(?<${cleanedKey}>.+?)`\n : `/${interceptionPrefix}(?<${cleanedKey}>[^/]+?)`\n}\n\nfunction getNamedParametrizedRoute(route: string, prefixRouteKeys: boolean) {\n const segments = removeTrailingSlash(route).slice(1).split('/')\n const getSafeRouteKey = buildGetSafeRouteKey()\n const routeKeys: { [named: string]: string } = {}\n return {\n namedParameterizedRoute: segments\n .map((segment) => {\n const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n segment.startsWith(m)\n )\n const paramMatches = segment.match(/\\[((?:\\[.*\\])|.+)\\]/) // Check for parameters\n\n if (hasInterceptionMarker && paramMatches) {\n const [usedMarker] = segment.split(paramMatches[0])\n\n return getSafeKeyFromSegment({\n getSafeRouteKey,\n interceptionMarker: usedMarker,\n segment: paramMatches[1],\n routeKeys,\n keyPrefix: prefixRouteKeys\n ? NEXT_INTERCEPTION_MARKER_PREFIX\n : undefined,\n })\n } else if (paramMatches) {\n return getSafeKeyFromSegment({\n getSafeRouteKey,\n segment: paramMatches[1],\n routeKeys,\n keyPrefix: prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined,\n })\n } else {\n return `/${escapeStringRegexp(segment)}`\n }\n })\n .join(''),\n routeKeys,\n }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n normalizedRoute: string,\n prefixRouteKey: boolean\n) {\n const result = getNamedParametrizedRoute(normalizedRoute, prefixRouteKey)\n return {\n ...getRouteRegex(normalizedRoute),\n namedRegex: `^${result.namedParameterizedRoute}(?:/)?$`,\n routeKeys: result.routeKeys,\n }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n normalizedRoute: string,\n options: {\n catchAll?: boolean\n }\n) {\n const { parameterizedRoute } = getParametrizedRoute(normalizedRoute)\n const { catchAll = true } = options\n if (parameterizedRoute === '/') {\n let catchAllRegex = catchAll ? '.*' : ''\n return {\n namedRegex: `^/${catchAllRegex}$`,\n }\n }\n\n const { namedParameterizedRoute } = getNamedParametrizedRoute(\n normalizedRoute,\n false\n )\n let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n return {\n namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n }\n}\n","class UrlNode {\n placeholder: boolean = true\n children: Map = new Map()\n slugName: string | null = null\n restSlugName: string | null = null\n optionalRestSlugName: string | null = null\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false)\n }\n\n smoosh(): string[] {\n return this._smoosh()\n }\n\n private _smoosh(prefix: string = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort()\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1)\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1)\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1)\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], [])\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`)\n )\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1)\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`\n )\n }\n\n routes.unshift(r)\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`)\n )\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`)\n )\n }\n\n return routes\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false\n return\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`)\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0]\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1)\n\n let isOptional = false\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1)\n isOptional = true\n }\n\n if (segmentName.startsWith('…')) {\n throw new Error(\n `Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`\n )\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3)\n isCatchAll = true\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`\n )\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`\n )\n }\n\n function handleSlug(previousSlug: string | null, nextSlug: string) {\n if (previousSlug !== null) {\n // If the specific segment already has a slug but the slug is not `something`\n // This prevents collisions like:\n // pages/[post]/index.js\n // pages/[id]/index.js\n // Because currently multiple dynamic params on the same segment level are not supported\n if (previousSlug !== nextSlug) {\n // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`\n )\n }\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`\n )\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dynamic path`\n )\n }\n })\n\n slugNames.push(nextSlug)\n }\n\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error(\n `You cannot use both an required and optional catch-all route at the same level (\"[...${this.restSlugName}]\" and \"${urlPaths[0]}\" ).`\n )\n }\n\n handleSlug(this.optionalRestSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = '[[...]]'\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot use both an optional and required catch-all route at the same level (\"[[...${this.optionalRestSlugName}]]\" and \"${urlPaths[0]}\").`\n )\n }\n\n handleSlug(this.restSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = '[...]'\n }\n } else {\n if (isOptional) {\n throw new Error(\n `Optional route parameters are not yet supported (\"${urlPaths[0]}\").`\n )\n }\n handleSlug(this.slugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = '[]'\n }\n }\n\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode())\n }\n\n this.children\n .get(nextSegment)!\n ._insert(urlPaths.slice(1), slugNames, isCatchAll)\n }\n}\n\nexport function getSortedRoutes(\n normalizedPages: ReadonlyArray\n): string[] {\n // First the UrlNode is created, and every UrlNode can have only 1 dynamic segment\n // Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js\n // Only 1 dynamic segment per nesting level\n\n // So in the case that is test/integration/dynamic-routing it'll be this:\n // pages/[post]/comments.js\n // pages/blog/[post]/comment/[id].js\n // Both are fine because `pages/[post]` and `pages/blog` are on the same level\n // So in this case `UrlNode` created here has `this.slugName === 'post'`\n // And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities\n // Instead what has to be passed through is the upwards path's dynamic names\n const root = new UrlNode()\n\n // Here the `root` gets injected multiple paths, and insert will break them up into sublevels\n normalizedPages.forEach((pagePath) => root.insert(pagePath))\n // Smoosh will then sort those sublevels up to the point where you get the correct route definition priority\n return root.smoosh()\n}\n\nexport function getSortedRouteObjects(\n objects: T[],\n getter: (obj: T) => string\n): T[] {\n // We're assuming here that all the pathnames are unique, that way we can\n // sort the list and use the index as the key.\n const indexes: Record = {}\n const pathnames: string[] = []\n for (let i = 0; i < objects.length; i++) {\n const pathname = getter(objects[i])\n indexes[pathname] = i\n pathnames[i] = pathname\n }\n\n // Sort the pathnames.\n const sorted = getSortedRoutes(pathnames)\n\n // Map the sorted pathnames back to the original objects using the new sorted\n // index.\n return sorted.map((pathname) => objects[indexes[pathname]])\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType

= NextComponentType<\n AppContextType,\n P,\n AppPropsType\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer\n enhanceComponent?: Enhancer\n }\n | Enhancer\n\nexport type RenderPageResult = {\n html: string\n head?: Array\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n runtimeConfig?: { [key: string]: any }\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: string[]\n defaultLocale?: string\n domainLocales?: DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType = {\n Component: NextComponentType\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps & {\n Component: NextComponentType\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n styles?: React.ReactElement[] | Iterable | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n /**\n * Object of `query` values from url\n */\n query: Partial<{\n [key: string]: string | string[]\n }>\n /**\n * Object of `cookies` from header\n */\n cookies: Partial<{\n [key: string]: string\n }>\n\n body: any\n\n env: Env\n\n draftMode?: boolean\n\n preview?: boolean\n /**\n * Preview data set on the request, if any\n * */\n previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse = ServerResponse & {\n /**\n * Send data `any` data in response\n */\n send: Send\n /**\n * Send data `json` data in response\n */\n json: Send\n status: (statusCode: number) => NextApiResponse\n redirect(url: string): NextApiResponse\n redirect(status: number, url: string): NextApiResponse\n\n /**\n * Set draft mode\n */\n setDraftMode: (options: { enable: boolean }) => NextApiResponse\n\n /**\n * Set preview data for Next.js' prerender mode\n */\n setPreviewData: (\n data: object | string,\n options?: {\n /**\n * Specifies the number (in seconds) for the preview session to last for.\n * The given number will be converted to an integer by rounding down.\n * By default, no maximum age is set and the preview session finishes\n * when the client shuts down (browser is closed).\n */\n maxAge?: number\n /**\n * Specifies the path for the preview session to work under. By default,\n * the path is considered the \"default path\", i.e., any pages under \"/\".\n */\n path?: string\n }\n ) => NextApiResponse\n\n /**\n * Clear preview data for Next.js' prerender mode\n */\n clearPreviewData: (options?: { path?: string }) => NextApiResponse\n\n /**\n * Revalidate a specific page and regenerate it using On-Demand Incremental\n * Static Regeneration.\n * The path should be an actual path, not a rewritten path. E.g. for\n * \"/blog/[slug]\" this should be \"/blog/post-1\".\n * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n */\n revalidate: (\n urlPath: string,\n opts?: {\n unstable_onlyGenerated?: boolean\n }\n ) => Promise\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler = (\n req: NextApiRequest,\n res: NextApiResponse\n) => unknown | Promise\n\n/**\n * Utils\n */\nexport function execOnce ReturnType>(\n fn: T\n): T {\n let used = false\n let result: ReturnType\n\n return ((...args: any[]) => {\n if (!used) {\n used = true\n result = fn(...args)\n }\n return result\n }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location\n return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n const { href } = window.location\n const origin = getLocationOrigin()\n return href.substring(origin.length)\n}\n\nexport function getDisplayName

(Component: ComponentType

) {\n return typeof Component === 'string'\n ? Component\n : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n const urlParts = url.split('?')\n const urlNoQuery = urlParts[0]\n\n return (\n urlNoQuery\n // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/')\n .replace(/\\/\\/+/g, '/') +\n (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n )\n}\n\nexport async function loadGetInitialProps<\n C extends BaseContext,\n IP = {},\n P = {},\n>(App: NextComponentType, ctx: C): Promise {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n throw new Error(message)\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n }\n }\n return {} as IP\n }\n\n const props = await App.getInitialProps(ctx)\n\n if (res && isResSent(res)) {\n return props\n }\n\n if (!props) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n throw new Error(message)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\n `${getDisplayName(\n App\n )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n )\n }\n }\n\n return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n SP &&\n (['mark', 'measure', 'getEntriesByName'] as const).every(\n (method) => typeof performance[method] === 'function'\n )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n code: string\n\n constructor(page: string) {\n super()\n this.code = 'ENOENT'\n this.name = 'PageNotFoundError'\n this.message = `Cannot find module for page: ${page}`\n }\n}\n\nexport class MissingStaticPage extends Error {\n constructor(page: string, message: string) {\n super()\n this.message = `Failed to load static file for page: ${page} ${message}`\n }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n code: string\n constructor() {\n super()\n this.code = 'ENOENT'\n this.message = `Cannot find the middleware module`\n }\n}\n\nexport interface CacheFs {\n existsSync: typeof fs.existsSync\n readFile: typeof fs.promises.readFile\n readFileSync: typeof fs.readFileSync\n writeFile(f: string, d: any): Promise\n mkdir(dir: string): Promise\n stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n return JSON.stringify({ message: error.message, stack: error.stack })\n}\n"],"names":["addLocale","path","args","getDomainLocale","locale","locales","domainLocales","prefetched","Set","router","prefetch","href","window","prefetchedKey","as","options","undefined","isAppRouter","process","env","urlObjOrString","children","childrenProp","legacyBehavior","a","appRouter","React","useContext","AppRouterContext","pagesRouter","prefetchEnabled","prefetchProp","NODE_ENV","resolvedHref","asProp","formatStringOrUrl","resolveHref","previousAs","useRef","setIntersectionRef","isVisible","useIntersection","resetVisible","rootMargin","previousHref","current","kind","appPrefetchKind","ref","setRef","onClick","e","child","props","currentTarget","isModifiedEvent","isLocalURL","event","eventTarget","getAttribute","metaKey","nativeEvent","which","navigate","replace","shallow","scroll","routerScroll","onMouseEnter","onMouseEnterProp","priority","onTouchStart","onTouchStartProp","childProps","curLocale","localeDomain","addBasePath","defaultLocale","restProps","cancelIdleCallback","requestIdleCallback","self","bind","cb","start","Date","now","setTimeout","didTimeout","timeRemaining","Math","max","id","clearTimeout","resolveAs","base","urlAsString","formatWithValidation","urlProtoMatch","match","urlAsStringNoProto","slice","length","urlParts","split","console","error","pathname","normalizedUrl","normalizeRepeatedSlashes","URL","startsWith","asPath","_","finalUrl","normalizePathTrailingSlash","interpolatedAs","isDynamicRoute","searchParams","query","searchParamsToUrlQuery","result","params","interpolateAs","hash","omit","origin","hasIntersectionObserver","IntersectionObserver","observers","Map","idList","rootRef","disabled","isDisabled","visible","setVisible","useState","elementRef","setElement","useCallback","element","useEffect","tagName","unobserve","observe","callback","observer","elements","createObserver","instance","root","margin","existing","find","obj","get","entries","forEach","entry","target","isIntersecting","intersectionRatio","push","set","delete","size","disconnect","index","findIndex","splice","idleCallback","useMergedRef","refA","refB","cleanupA","cleanupB","useMemo","applyRef","cleanup","escapeStringRegexp","reHasRegExp","reReplaceRegExp","str","test","RouterContext","createContext","formatUrl","urlObjectKeys","slashedProtocols","urlObj","auth","hostname","protocol","host","encodeURIComponent","indexOf","port","String","querystring","urlQueryToSearchParams","search","endsWith","slashes","url","getSortedRouteObjects","getSortedRoutes","route","asPathname","interpolatedRoute","dynamicRegex","getRouteRegex","dynamicGroups","groups","dynamicMatches","getRouteMatcher","Object","keys","every","value","param","repeat","optional","replaced","Array","isArray","map","segment","join","TEST_ROUTE","isInterceptionRouteAppPath","extractInterceptionRouteInformation","interceptedRoute","isAbsoluteUrl","locationOrigin","getLocationOrigin","resolved","hasBasePath","object","omitted","includes","key","stringifyUrlQueryParam","isNaN","urlQuery","URLSearchParams","append","item","assign","searchParamsList","from","re","routeMatch","exec","decode","decodeURIComponent","DecodeError","g","slugName","m","pos","getNamedMiddlewareRegex","getNamedRouteRegex","parseParameter","PARAMETER_PATTERN","parseMatchedParameter","getParametrizedRoute","segments","removeTrailingSlash","groupIndex","parameterizedRoute","markerMatch","INTERCEPTION_ROUTE_MARKERS","paramMatches","normalizedRoute","getSafeKeyFromSegment","interceptionMarker","getSafeRouteKey","routeKeys","keyPrefix","cleanedKey","invalidKey","parseInt","interceptionPrefix","getNamedParametrizedRoute","prefixRouteKeys","i","routeKey","j","fromCharCode","floor","namedParameterizedRoute","hasInterceptionMarker","some","usedMarker","NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_QUERY_PARAM_PREFIX","prefixRouteKey","namedRegex","catchAll","catchAllRegex","catchAllGroupedRegex","UrlNode","insert","urlPath","_insert","filter","Boolean","smoosh","_smoosh","prefix","childrenPaths","sort","restSlugName","optionalRestSlugName","routes","c","reduce","prev","curr","placeholder","r","Error","unshift","urlPaths","slugNames","isCatchAll","nextSegment","segmentName","isOptional","substring","handleSlug","previousSlug","nextSlug","slug","has","normalizedPages","pagePath","objects","getter","indexes","pathnames","MiddlewareNotFoundError","MissingStaticPage","NormalizeError","PageNotFoundError","SP","ST","WEB_VITALS","execOnce","getDisplayName","getURL","isResSent","loadGetInitialProps","stringifyError","fn","used","ABSOLUTE_URL_REGEX","location","Component","displayName","name","res","finished","headersSent","App","ctx","getInitialProps","performance","method","constructor","page","code","message","JSON","stringify","stack"],"sourceRoot":"","ignoreList":[7]}