/opt/canhelp/node_modules/next/dist/build/analysis
NameSizeModeActions
extract-const-value.d.ts8330644editdlrm
extract-const-value.js68640644editdlrm
extract-const-value.js.map117600644editdlrm
get-page-static-info.d.ts36670644editdlrm
get-page-static-info.js220870644editdlrm
get-page-static-info.js.map330660644editdlrm
parse-module.d.ts2290644editdlrm
parse-module.js7340644editdlrm
parse-module.js.map11330644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/build/analysis/get-page-static-info.js.map (33066B)
{"version":3,"sources":["../../../src/build/analysis/get-page-static-info.ts"],"sourcesContent":["import type { NextConfig } from '../../server/config-shared'\nimport type { RouteHas } from '../../lib/load-custom-routes'\n\nimport { promises as fs } from 'fs'\nimport { LRUCache } from '../../server/lib/lru-cache'\nimport {\n extractExportedConstValue,\n UnsupportedValueError,\n} from './extract-const-value'\nimport { parseModule } from './parse-module'\nimport * as Log from '../output/log'\nimport { SERVER_RUNTIME } from '../../lib/constants'\nimport { tryToParsePath } from '../../lib/try-to-parse-path'\nimport { isAPIRoute } from '../../lib/is-api-route'\nimport { isEdgeRuntime } from '../../lib/is-edge-runtime'\nimport { RSC_MODULE_TYPES } from '../../shared/lib/constants'\nimport type { RSCMeta } from '../webpack/loaders/get-module-build-info'\nimport { PAGE_TYPES } from '../../lib/page-types'\nimport {\n AppSegmentConfigSchemaKeys,\n parseAppSegmentConfig,\n type AppSegmentConfig,\n} from '../segment-config/app/app-segment-config'\nimport { reportZodError } from '../../shared/lib/zod'\nimport {\n PagesSegmentConfigSchemaKeys,\n parsePagesSegmentConfig,\n type PagesSegmentConfig,\n type PagesSegmentConfigConfig,\n} from '../segment-config/pages/pages-segment-config'\nimport {\n MiddlewareConfigInputSchema,\n SourceSchema,\n type MiddlewareConfigMatcherInput,\n} from '../segment-config/middleware/middleware-config'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\n\nconst PARSE_PATTERN =\n /(? | undefined\n runtime: AppSegmentConfig['runtime'] | undefined\n preferredRegion: AppSegmentConfig['preferredRegion'] | undefined\n maxDuration: number | undefined\n hadUnsupportedValue: boolean\n}\n\nexport interface PagesPageStaticInfo {\n type: PAGE_TYPES.PAGES\n getStaticProps?: boolean\n getServerSideProps?: boolean\n rsc?: RSCModuleType\n generateStaticParams?: boolean\n generateSitemaps?: boolean\n generateImageMetadata?: boolean\n middleware?: MiddlewareConfig\n config:\n | (Omit & {\n config?: Omit\n })\n | undefined\n runtime: PagesSegmentConfig['runtime'] | undefined\n preferredRegion: PagesSegmentConfigConfig['regions'] | undefined\n maxDuration: number | undefined\n hadUnsupportedValue: boolean\n}\n\nexport type PageStaticInfo = AppPageStaticInfo | PagesPageStaticInfo\n\nconst CLIENT_MODULE_LABEL =\n /\\/\\* __next_internal_client_entry_do_not_use__ ([^ ]*) (cjs|auto) \\*\\//\n\nconst ACTION_MODULE_LABEL =\n /\\/\\* __next_internal_action_entry_do_not_use__ (\\{[^}]+\\}) \\*\\//\n\nconst CLIENT_DIRECTIVE = 'use client'\nconst SERVER_ACTION_DIRECTIVE = 'use server'\n\nexport type RSCModuleType = 'server' | 'client'\nexport function getRSCModuleInformation(\n source: string,\n isReactServerLayer: boolean\n): RSCMeta {\n const actionsJson = source.match(ACTION_MODULE_LABEL)\n const parsedActionsMeta = actionsJson\n ? (JSON.parse(actionsJson[1]) as Record)\n : undefined\n const clientInfoMatch = source.match(CLIENT_MODULE_LABEL)\n const isClientRef = !!clientInfoMatch\n\n if (!isReactServerLayer) {\n return {\n type: RSC_MODULE_TYPES.client,\n actionIds: parsedActionsMeta,\n isClientRef,\n }\n }\n\n const clientRefsString = clientInfoMatch?.[1]\n const clientRefs = clientRefsString ? clientRefsString.split(',') : []\n const clientEntryType = clientInfoMatch?.[2] as 'cjs' | 'auto' | undefined\n\n const type = clientInfoMatch\n ? RSC_MODULE_TYPES.client\n : RSC_MODULE_TYPES.server\n\n return {\n type,\n actionIds: parsedActionsMeta,\n clientRefs,\n clientEntryType,\n isClientRef,\n }\n}\n\n/**\n * Receives a parsed AST from SWC and checks if it belongs to a module that\n * requires a runtime to be specified. Those are:\n * - Modules with `export function getStaticProps | getServerSideProps`\n * - Modules with `export { getStaticProps | getServerSideProps } `\n * - Modules with `export const runtime = ...`\n */\nfunction checkExports(\n ast: any,\n expectedExports: string[],\n page: string\n): {\n getStaticProps?: boolean\n getServerSideProps?: boolean\n generateImageMetadata?: boolean\n generateSitemaps?: boolean\n generateStaticParams?: boolean\n directives?: Set\n exports?: Set\n} {\n const exportsSet = new Set([\n 'getStaticProps',\n 'getServerSideProps',\n 'generateImageMetadata',\n 'generateSitemaps',\n 'generateStaticParams',\n ])\n if (!Array.isArray(ast?.body)) {\n return {}\n }\n\n try {\n let getStaticProps: boolean = false\n let getServerSideProps: boolean = false\n let generateImageMetadata: boolean = false\n let generateSitemaps: boolean = false\n let generateStaticParams = false\n let exports = new Set()\n let directives = new Set()\n let hasLeadingNonDirectiveNode = false\n\n for (const node of ast.body) {\n // There should be no non-string literals nodes before directives\n if (\n node.type === 'ExpressionStatement' &&\n node.expression.type === 'StringLiteral'\n ) {\n if (!hasLeadingNonDirectiveNode) {\n const directive = node.expression.value\n if (CLIENT_DIRECTIVE === directive) {\n directives.add('client')\n }\n if (SERVER_ACTION_DIRECTIVE === directive) {\n directives.add('server')\n }\n }\n } else {\n hasLeadingNonDirectiveNode = true\n }\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'VariableDeclaration'\n ) {\n for (const declaration of node.declaration?.declarations) {\n if (expectedExports.includes(declaration.id.value)) {\n exports.add(declaration.id.value)\n }\n }\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'FunctionDeclaration' &&\n exportsSet.has(node.declaration.identifier?.value)\n ) {\n const id = node.declaration.identifier.value\n getServerSideProps = id === 'getServerSideProps'\n getStaticProps = id === 'getStaticProps'\n generateImageMetadata = id === 'generateImageMetadata'\n generateSitemaps = id === 'generateSitemaps'\n generateStaticParams = id === 'generateStaticParams'\n }\n\n if (\n node.type === 'ExportDeclaration' &&\n node.declaration?.type === 'VariableDeclaration'\n ) {\n const id = node.declaration?.declarations[0]?.id.value\n if (exportsSet.has(id)) {\n getServerSideProps = id === 'getServerSideProps'\n getStaticProps = id === 'getStaticProps'\n generateImageMetadata = id === 'generateImageMetadata'\n generateSitemaps = id === 'generateSitemaps'\n generateStaticParams = id === 'generateStaticParams'\n }\n }\n\n if (node.type === 'ExportNamedDeclaration') {\n for (const specifier of node.specifiers) {\n if (\n specifier.type === 'ExportSpecifier' &&\n specifier.orig?.type === 'Identifier'\n ) {\n const value = specifier.orig.value\n\n if (!getServerSideProps && value === 'getServerSideProps') {\n getServerSideProps = true\n }\n if (!getStaticProps && value === 'getStaticProps') {\n getStaticProps = true\n }\n if (!generateImageMetadata && value === 'generateImageMetadata') {\n generateImageMetadata = true\n }\n if (!generateSitemaps && value === 'generateSitemaps') {\n generateSitemaps = true\n }\n if (!generateStaticParams && value === 'generateStaticParams') {\n generateStaticParams = true\n }\n if (expectedExports.includes(value) && !exports.has(value)) {\n // An export was found that was actually a re-export, and not a\n // literal value. We should warn here.\n Log.warn(\n `Next.js can't recognize the exported \\`${value}\\` field in \"${page}\", it may be re-exported from another file. The default config will be used instead.`\n )\n }\n }\n }\n }\n }\n\n return {\n getStaticProps,\n getServerSideProps,\n generateImageMetadata,\n generateSitemaps,\n generateStaticParams,\n directives,\n exports,\n }\n } catch {}\n\n return {}\n}\n\nasync function tryToReadFile(filePath: string, shouldThrow: boolean) {\n try {\n return await fs.readFile(filePath, {\n encoding: 'utf8',\n })\n } catch (error: any) {\n if (shouldThrow) {\n error.message = `Next.js ERROR: Failed to read file ${filePath}:\\n${error.message}`\n throw error\n }\n }\n}\n\n/**\n * @internal - required to exclude zod types from the build\n */\nexport function getMiddlewareMatchers(\n matcherOrMatchers: MiddlewareConfigMatcherInput,\n nextConfig: Pick\n): MiddlewareMatcher[] {\n const matchers = Array.isArray(matcherOrMatchers)\n ? matcherOrMatchers\n : [matcherOrMatchers]\n\n const { i18n } = nextConfig\n\n return matchers.map((matcher) => {\n matcher = typeof matcher === 'string' ? { source: matcher } : matcher\n\n const originalSource = matcher.source\n\n let { source, ...rest } = matcher\n\n const isRoot = source === '/'\n\n if (i18n?.locales && matcher.locale !== false) {\n source = `/:nextInternalLocale((?!_next/)[^/.]{1,})${\n isRoot ? '' : source\n }`\n }\n\n source = `/:nextData(_next/data/[^/]{1,})?${source}${\n isRoot\n ? `(${nextConfig.i18n ? '|\\\\.json|' : ''}/?index|/?index\\\\.json)?`\n : '{(\\\\.json)}?'\n }`\n\n if (nextConfig.basePath) {\n source = `${nextConfig.basePath}${source}`\n }\n\n // Validate that the source is still.\n const result = SourceSchema.safeParse(source)\n if (!result.success) {\n reportZodError('Failed to parse middleware source', result.error)\n\n // We need to exit here because middleware being built occurs before we\n // finish setting up the server. Exiting here is the only way to ensure\n // that we don't hang.\n process.exit(1)\n }\n\n return {\n ...rest,\n // We know that parsed.regexStr is not undefined because we already\n // checked that the source is valid.\n regexp: tryToParsePath(result.data).regexStr!,\n originalSource: originalSource || source,\n }\n })\n}\n\nfunction parseMiddlewareConfig(\n page: string,\n rawConfig: unknown,\n nextConfig: NextConfig\n): MiddlewareConfig {\n // If there's no config to parse, then return nothing.\n if (typeof rawConfig !== 'object' || !rawConfig) return {}\n\n const input = MiddlewareConfigInputSchema.safeParse(rawConfig)\n if (!input.success) {\n reportZodError(`${page} contains invalid middleware config`, input.error)\n\n // We need to exit here because middleware being built occurs before we\n // finish setting up the server. Exiting here is the only way to ensure\n // that we don't hang.\n process.exit(1)\n }\n\n const config: MiddlewareConfig = {}\n\n if (input.data.matcher) {\n config.matchers = getMiddlewareMatchers(input.data.matcher, nextConfig)\n }\n\n if (input.data.unstable_allowDynamic) {\n config.unstable_allowDynamic = Array.isArray(\n input.data.unstable_allowDynamic\n )\n ? input.data.unstable_allowDynamic\n : [input.data.unstable_allowDynamic]\n }\n\n if (input.data.regions) {\n config.regions = input.data.regions\n }\n\n return config\n}\n\nconst apiRouteWarnings = new LRUCache(250)\nfunction warnAboutExperimentalEdge(apiRoute: string | null) {\n if (\n process.env.NODE_ENV === 'production' &&\n process.env.NEXT_PRIVATE_BUILD_WORKER === '1'\n ) {\n return\n }\n\n if (apiRoute && apiRouteWarnings.has(apiRoute)) {\n return\n }\n\n Log.warn(\n apiRoute\n ? `${apiRoute} provided runtime 'experimental-edge'. It can be updated to 'edge' instead.`\n : `You are using an experimental edge runtime, the API might change.`\n )\n\n if (apiRoute) {\n apiRouteWarnings.set(apiRoute, 1)\n }\n}\n\nlet hadUnsupportedValue = false\nconst warnedUnsupportedValueMap = new LRUCache(250, () => 1)\n\nfunction warnAboutUnsupportedValue(\n pageFilePath: string,\n page: string | undefined,\n error: UnsupportedValueError\n) {\n hadUnsupportedValue = true\n const isProductionBuild = process.env.NODE_ENV === 'production'\n if (\n // we only log for the server compilation so it's not\n // duplicated due to webpack build worker having fresh\n // module scope for each compiler\n process.env.NEXT_COMPILER_NAME !== 'server' ||\n (isProductionBuild && warnedUnsupportedValueMap.has(pageFilePath))\n ) {\n return\n }\n warnedUnsupportedValueMap.set(pageFilePath, true)\n\n const message =\n `Next.js can't recognize the exported \\`config\\` field in ` +\n (page ? `route \"${page}\"` : `\"${pageFilePath}\"`) +\n ':\\n' +\n error.message +\n (error.path ? ` at \"${error.path}\"` : '') +\n '.\\n' +\n 'Read More - https://nextjs.org/docs/messages/invalid-page-config'\n\n // for a build we use `Log.error` instead of throwing\n // so that all errors can be logged before exiting the process\n if (isProductionBuild) {\n Log.error(message)\n } else {\n throw new Error(message)\n }\n}\n\ntype GetPageStaticInfoParams = {\n pageFilePath: string\n nextConfig: Partial\n isDev?: boolean\n page: string\n pageType: PAGE_TYPES\n}\n\nexport async function getAppPageStaticInfo({\n pageFilePath,\n nextConfig,\n isDev,\n page,\n}: GetPageStaticInfoParams): Promise {\n const content = await tryToReadFile(pageFilePath, !isDev)\n if (!content || !PARSE_PATTERN.test(content)) {\n return {\n type: PAGE_TYPES.APP,\n config: undefined,\n runtime: undefined,\n preferredRegion: undefined,\n maxDuration: undefined,\n hadUnsupportedValue: false,\n }\n }\n\n const ast = await parseModule(pageFilePath, content)\n\n const {\n generateStaticParams,\n generateImageMetadata,\n generateSitemaps,\n exports,\n directives,\n } = checkExports(ast, AppSegmentConfigSchemaKeys, page)\n\n const { type: rsc } = getRSCModuleInformation(content, true)\n\n const exportedConfig: Record = {}\n if (exports) {\n for (const property of exports) {\n try {\n exportedConfig[property] = extractExportedConstValue(ast, property)\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n }\n }\n }\n\n try {\n exportedConfig.config = extractExportedConstValue(ast, 'config')\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n // `export config` doesn't exist, or other unknown error thrown by swc, silence them\n }\n\n const route = normalizeAppPath(page)\n const config = parseAppSegmentConfig(exportedConfig, route)\n\n // Prevent edge runtime and generateStaticParams in the same file.\n if (isEdgeRuntime(config.runtime) && generateStaticParams) {\n throw new Error(\n `Page \"${page}\" cannot use both \\`export const runtime = 'edge'\\` and export \\`generateStaticParams\\`.`\n )\n }\n\n // Prevent use client and generateStaticParams in the same file.\n if (directives?.has('client') && generateStaticParams) {\n throw new Error(\n `Page \"${page}\" cannot use both \"use client\" and export function \"generateStaticParams()\".`\n )\n }\n\n return {\n type: PAGE_TYPES.APP,\n rsc,\n generateImageMetadata,\n generateSitemaps,\n generateStaticParams,\n config,\n middleware: parseMiddlewareConfig(page, exportedConfig.config, nextConfig),\n runtime: config.runtime,\n preferredRegion: config.preferredRegion,\n maxDuration: config.maxDuration,\n hadUnsupportedValue,\n }\n}\n\nexport async function getPagesPageStaticInfo({\n pageFilePath,\n nextConfig,\n isDev,\n page,\n}: GetPageStaticInfoParams): Promise {\n const content = await tryToReadFile(pageFilePath, !isDev)\n if (!content || !PARSE_PATTERN.test(content)) {\n return {\n type: PAGE_TYPES.PAGES,\n config: undefined,\n runtime: undefined,\n preferredRegion: undefined,\n maxDuration: undefined,\n hadUnsupportedValue: false,\n }\n }\n\n const ast = await parseModule(pageFilePath, content)\n\n const { getServerSideProps, getStaticProps, exports } = checkExports(\n ast,\n PagesSegmentConfigSchemaKeys,\n page\n )\n\n const { type: rsc } = getRSCModuleInformation(content, true)\n\n const exportedConfig: Record = {}\n if (exports) {\n for (const property of exports) {\n try {\n exportedConfig[property] = extractExportedConstValue(ast, property)\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n }\n }\n }\n\n try {\n exportedConfig.config = extractExportedConstValue(ast, 'config')\n } catch (e) {\n if (e instanceof UnsupportedValueError) {\n warnAboutUnsupportedValue(pageFilePath, page, e)\n }\n // `export config` doesn't exist, or other unknown error thrown by swc, silence them\n }\n\n // Validate the config.\n const route = normalizePagePath(page)\n const config = parsePagesSegmentConfig(exportedConfig, route)\n const isAnAPIRoute = isAPIRoute(route)\n\n const resolvedRuntime = config.runtime ?? config.config?.runtime\n\n if (resolvedRuntime === SERVER_RUNTIME.experimentalEdge) {\n warnAboutExperimentalEdge(isAnAPIRoute ? page! : null)\n }\n\n if (resolvedRuntime === SERVER_RUNTIME.edge && page && !isAnAPIRoute) {\n const message = `Page ${page} provided runtime 'edge', the edge runtime for rendering is currently experimental. Use runtime 'experimental-edge' instead.`\n if (isDev) {\n Log.error(message)\n } else {\n throw new Error(message)\n }\n }\n\n return {\n type: PAGE_TYPES.PAGES,\n getStaticProps,\n getServerSideProps,\n rsc,\n config,\n middleware: parseMiddlewareConfig(page, exportedConfig.config, nextConfig),\n runtime: resolvedRuntime,\n preferredRegion: config.config?.regions,\n maxDuration: config.maxDuration ?? config.config?.maxDuration,\n hadUnsupportedValue,\n }\n}\n\n/**\n * For a given pageFilePath and nextConfig, if the config supports it, this\n * function will read the file and return the runtime that should be used.\n * It will look into the file content only if the page *requires* a runtime\n * to be specified, that is, when gSSP or gSP is used.\n * Related discussion: https://github.com/vercel/next.js/discussions/34179\n */\nexport async function getPageStaticInfo(\n params: GetPageStaticInfoParams\n): Promise {\n if (params.pageType === PAGE_TYPES.APP) {\n return getAppPageStaticInfo(params)\n }\n\n return getPagesPageStaticInfo(params)\n}\n"],"names":["getAppPageStaticInfo","getMiddlewareMatchers","getPageStaticInfo","getPagesPageStaticInfo","getRSCModuleInformation","PARSE_PATTERN","CLIENT_MODULE_LABEL","ACTION_MODULE_LABEL","CLIENT_DIRECTIVE","SERVER_ACTION_DIRECTIVE","source","isReactServerLayer","actionsJson","match","parsedActionsMeta","JSON","parse","undefined","clientInfoMatch","isClientRef","type","RSC_MODULE_TYPES","client","actionIds","clientRefsString","clientRefs","split","clientEntryType","server","checkExports","ast","expectedExports","page","exportsSet","Set","Array","isArray","body","getStaticProps","getServerSideProps","generateImageMetadata","generateSitemaps","generateStaticParams","exports","directives","hasLeadingNonDirectiveNode","node","expression","directive","value","add","declaration","declarations","includes","id","has","identifier","specifier","specifiers","orig","Log","warn","tryToReadFile","filePath","shouldThrow","fs","readFile","encoding","error","message","matcherOrMatchers","nextConfig","matchers","i18n","map","matcher","originalSource","rest","isRoot","locales","locale","basePath","result","SourceSchema","safeParse","success","reportZodError","process","exit","regexp","tryToParsePath","data","regexStr","parseMiddlewareConfig","rawConfig","input","MiddlewareConfigInputSchema","config","unstable_allowDynamic","regions","apiRouteWarnings","LRUCache","warnAboutExperimentalEdge","apiRoute","env","NODE_ENV","NEXT_PRIVATE_BUILD_WORKER","set","hadUnsupportedValue","warnedUnsupportedValueMap","warnAboutUnsupportedValue","pageFilePath","isProductionBuild","NEXT_COMPILER_NAME","path","Error","isDev","content","test","PAGE_TYPES","APP","runtime","preferredRegion","maxDuration","parseModule","AppSegmentConfigSchemaKeys","rsc","exportedConfig","property","extractExportedConstValue","e","UnsupportedValueError","route","normalizeAppPath","parseAppSegmentConfig","isEdgeRuntime","middleware","PAGES","PagesSegmentConfigSchemaKeys","normalizePagePath","parsePagesSegmentConfig","isAnAPIRoute","isAPIRoute","resolvedRuntime","SERVER_RUNTIME","experimentalEdge","edge","params","pageType"],"mappings":";;;;;;;;;;;;;;;;;;IAgesBA,oBAAoB;eAApBA;;IAtKNC,qBAAqB;eAArBA;;IAqVMC,iBAAiB;eAAjBA;;IA3FAC,sBAAsB;eAAtBA;;IAhcNC,uBAAuB;eAAvBA;;;oBAjHe;0BACN;mCAIlB;6BACqB;6DACP;2BACU;gCACA;4BACJ;+BACG;4BACG;2BAEN;kCAKpB;qBACwB;oCAMxB;kCAKA;0BAC0B;mCACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElC,MAAMC,gBACJ;AAmEF,MAAMC,sBACJ;AAEF,MAAMC,sBACJ;AAEF,MAAMC,mBAAmB;AACzB,MAAMC,0BAA0B;AAGzB,SAASL,wBACdM,MAAc,EACdC,kBAA2B;IAE3B,MAAMC,cAAcF,OAAOG,KAAK,CAACN;IACjC,MAAMO,oBAAoBF,cACrBG,KAAKC,KAAK,CAACJ,WAAW,CAAC,EAAE,IAC1BK;IACJ,MAAMC,kBAAkBR,OAAOG,KAAK,CAACP;IACrC,MAAMa,cAAc,CAAC,CAACD;IAEtB,IAAI,CAACP,oBAAoB;QACvB,OAAO;YACLS,MAAMC,4BAAgB,CAACC,MAAM;YAC7BC,WAAWT;YACXK;QACF;IACF;IAEA,MAAMK,mBAAmBN,mCAAAA,eAAiB,CAAC,EAAE;IAC7C,MAAMO,aAAaD,mBAAmBA,iBAAiBE,KAAK,CAAC,OAAO,EAAE;IACtE,MAAMC,kBAAkBT,mCAAAA,eAAiB,CAAC,EAAE;IAE5C,MAAME,OAAOF,kBACTG,4BAAgB,CAACC,MAAM,GACvBD,4BAAgB,CAACO,MAAM;IAE3B,OAAO;QACLR;QACAG,WAAWT;QACXW;QACAE;QACAR;IACF;AACF;AAEA;;;;;;CAMC,GACD,SAASU,aACPC,GAAQ,EACRC,eAAyB,EACzBC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