tempo-sdk 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -0
- package/dist/chunk-BRNAFXET.js +173 -0
- package/dist/chunk-BRNAFXET.js.map +1 -0
- package/dist/chunk-FIAAEHXK.js +171 -0
- package/dist/chunk-FIAAEHXK.js.map +1 -0
- package/dist/chunk-G4OYWYQA.js +168 -0
- package/dist/chunk-G4OYWYQA.js.map +1 -0
- package/dist/chunk-UWWB27SE.js +170 -0
- package/dist/chunk-UWWB27SE.js.map +1 -0
- package/dist/index.d.ts +0 -9
- package/dist/index.js +6 -114
- package/dist/index.js.map +1 -1
- package/dist/nextjs/plugin.cjs +171 -0
- package/dist/nextjs/plugin.cjs.map +1 -0
- package/dist/nextjs/plugin.d.cts +2 -0
- package/dist/nextjs/plugin.d.ts +2 -0
- package/dist/nextjs/plugin.js +7 -0
- package/dist/nextjs/plugin.js.map +1 -0
- package/dist/nextjs-loader.cjs +901 -0
- package/dist/nextjs-loader.cjs.map +1 -0
- package/dist/nextjs.cjs +202 -0
- package/dist/nextjs.cjs.map +1 -0
- package/dist/nextjs.d.cts +108 -0
- package/dist/nextjs.d.ts +108 -0
- package/dist/nextjs.js +15 -0
- package/dist/nextjs.js.map +1 -0
- package/package.json +32 -8
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// nextjs/plugin.ts
|
|
21
|
+
var plugin_exports = {};
|
|
22
|
+
__export(plugin_exports, {
|
|
23
|
+
default: () => tempoNextjsPlugin
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
26
|
+
|
|
27
|
+
// nextjs.ts
|
|
28
|
+
var import_node_fs = require("fs");
|
|
29
|
+
var import_node_module = require("module");
|
|
30
|
+
var import_node_path = require("path");
|
|
31
|
+
var import_meta = {};
|
|
32
|
+
var TURBOPACK_RULE_KEY = "*.{tsx,jsx}";
|
|
33
|
+
var requireFromHere = (0, import_node_module.createRequire)(
|
|
34
|
+
typeof import_meta.url === "string" && import_meta.url.length > 0 ? import_meta.url : __filename
|
|
35
|
+
);
|
|
36
|
+
function resolveLoaderPath() {
|
|
37
|
+
for (const candidate of ["./nextjs-loader.cjs", "./dist/nextjs-loader.cjs"]) {
|
|
38
|
+
try {
|
|
39
|
+
return requireFromHere.resolve(candidate);
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
throw new Error(
|
|
44
|
+
"tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. Run `pnpm build` in the tempo-sdk package to produce the dist/ output."
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function detectNextVersion() {
|
|
48
|
+
try {
|
|
49
|
+
const pkg = requireFromHere("next/package.json");
|
|
50
|
+
const m = /^(\d+)\.(\d+)/.exec(pkg.version);
|
|
51
|
+
if (!m) return null;
|
|
52
|
+
return { major: Number(m[1]), minor: Number(m[2]) };
|
|
53
|
+
} catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function useExperimentalTurbo(version) {
|
|
58
|
+
if (!version) return false;
|
|
59
|
+
if (version.major < 15) return true;
|
|
60
|
+
if (version.major === 15 && version.minor < 3) return true;
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
function shouldOmitTurbopack(version) {
|
|
64
|
+
if (!version) return false;
|
|
65
|
+
return version.major < 13;
|
|
66
|
+
}
|
|
67
|
+
function buildTurbopackRule(loaderPath, options) {
|
|
68
|
+
const loaderOptions = {};
|
|
69
|
+
if (options.computeAnnotatedPropsModule !== void 0) {
|
|
70
|
+
loaderOptions.computeAnnotatedPropsModule = options.computeAnnotatedPropsModule;
|
|
71
|
+
}
|
|
72
|
+
if (options.autoInjectRootMeta !== void 0) {
|
|
73
|
+
loaderOptions.autoInjectRootMeta = options.autoInjectRootMeta;
|
|
74
|
+
}
|
|
75
|
+
const condition = options.productionBuild ? { not: "foreign" } : { all: [{ not: "foreign" }, "development"] };
|
|
76
|
+
return {
|
|
77
|
+
condition,
|
|
78
|
+
loaders: [{ loader: loaderPath, options: loaderOptions }]
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function mergeTurbopackRules(existing, newRule) {
|
|
82
|
+
const existingRule = existing?.rules?.[TURBOPACK_RULE_KEY];
|
|
83
|
+
let mergedRule;
|
|
84
|
+
if (!existingRule) {
|
|
85
|
+
mergedRule = newRule;
|
|
86
|
+
} else if (Array.isArray(existingRule)) {
|
|
87
|
+
mergedRule = [...existingRule, newRule];
|
|
88
|
+
} else {
|
|
89
|
+
mergedRule = [existingRule, newRule];
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
...existing,
|
|
93
|
+
rules: {
|
|
94
|
+
...existing?.rules,
|
|
95
|
+
[TURBOPACK_RULE_KEY]: mergedRule
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function buildWebpackHook(loaderPath, options, userWebpack) {
|
|
100
|
+
const loaderOptions = {};
|
|
101
|
+
if (options.computeAnnotatedPropsModule !== void 0) {
|
|
102
|
+
loaderOptions.computeAnnotatedPropsModule = options.computeAnnotatedPropsModule;
|
|
103
|
+
}
|
|
104
|
+
if (options.autoInjectRootMeta !== void 0) {
|
|
105
|
+
loaderOptions.autoInjectRootMeta = options.autoInjectRootMeta;
|
|
106
|
+
}
|
|
107
|
+
const allowProduction = options.productionBuild === true;
|
|
108
|
+
return (configIn, context) => {
|
|
109
|
+
var _a;
|
|
110
|
+
const config = configIn;
|
|
111
|
+
const ctx = context;
|
|
112
|
+
if (ctx.dev || allowProduction) {
|
|
113
|
+
config.module ?? (config.module = {});
|
|
114
|
+
(_a = config.module).rules ?? (_a.rules = []);
|
|
115
|
+
config.module.rules.push({
|
|
116
|
+
test: /\.(tsx|jsx)$/,
|
|
117
|
+
exclude: /node_modules/,
|
|
118
|
+
enforce: "pre",
|
|
119
|
+
use: [{ loader: loaderPath, options: loaderOptions }]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (typeof userWebpack === "function") {
|
|
123
|
+
return userWebpack(config, context);
|
|
124
|
+
}
|
|
125
|
+
return config;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function tempoNextjsPlugin(pluginOptions = {}) {
|
|
129
|
+
return (inputConfigArg) => {
|
|
130
|
+
const inputConfig = inputConfigArg ?? {};
|
|
131
|
+
if (!process.env.TEMPO) return inputConfig;
|
|
132
|
+
const loaderPath = _internal.resolveLoaderPath();
|
|
133
|
+
const version = _internal.detectNextVersion();
|
|
134
|
+
const omitTurbopack = _internal.shouldOmitTurbopack(version);
|
|
135
|
+
const useExperimental = _internal.useExperimentalTurbo(version);
|
|
136
|
+
const newRule = buildTurbopackRule(loaderPath, pluginOptions);
|
|
137
|
+
const existingTurbo = useExperimental ? inputConfig.experimental?.turbo : inputConfig.turbopack;
|
|
138
|
+
const mergedTurbo = mergeTurbopackRules(existingTurbo, newRule);
|
|
139
|
+
const webpackHook = buildWebpackHook(
|
|
140
|
+
loaderPath,
|
|
141
|
+
pluginOptions,
|
|
142
|
+
inputConfig.webpack ?? null
|
|
143
|
+
);
|
|
144
|
+
const next = {
|
|
145
|
+
...inputConfig,
|
|
146
|
+
webpack: webpackHook
|
|
147
|
+
};
|
|
148
|
+
if (!omitTurbopack) {
|
|
149
|
+
if (useExperimental) {
|
|
150
|
+
next.experimental = {
|
|
151
|
+
...inputConfig.experimental,
|
|
152
|
+
turbo: mergedTurbo
|
|
153
|
+
};
|
|
154
|
+
} else {
|
|
155
|
+
next.turbopack = mergedTurbo;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return next;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
var _internal = {
|
|
162
|
+
buildTurbopackRule,
|
|
163
|
+
mergeTurbopackRules,
|
|
164
|
+
buildWebpackHook,
|
|
165
|
+
detectNextVersion,
|
|
166
|
+
useExperimentalTurbo,
|
|
167
|
+
shouldOmitTurbopack,
|
|
168
|
+
resolveLoaderPath
|
|
169
|
+
};
|
|
170
|
+
module.exports = Object.assign(module.exports.default, module.exports);
|
|
171
|
+
//# sourceMappingURL=plugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../nextjs/plugin.ts","../../nextjs.ts"],"sourcesContent":["export { tempoNextjsPlugin as default } from \"../nextjs\";\nexport type { TempoNextjsOptions } from \"../nextjs\";\n","/**\n * Next.js plugin that registers the tempo-annotate loader for Webpack and\n * Turbopack. Mirrors the user-facing pattern of `@next/mdx`: a higher-order\n * function that takes plugin options, returns a function that takes the user's\n * `next.config`, and returns a new config with the plugin's loader rules\n * merged in.\n *\n * See SPEC_NEXTJS.md (in this directory) for the full design rationale.\n *\n * @example\n * ```js\n * // next.config.js\n * const tempoNextjsPlugin = require(\"tempo-sdk/nextjs\");\n * module.exports = tempoNextjsPlugin()({ reactStrictMode: true });\n * ```\n */\n\nimport { existsSync, realpathSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, resolve } from \"node:path\";\n\nimport type { ElementInfo, PropValue } from \"@modules/annotation\";\n\n// ---------------------------------------------------------------------------\n// Types. We keep these minimal and self-contained rather than depending on\n// Next.js types — the plugin file is loaded by `next.config.js` evaluation,\n// before `next` itself is fully resolved in some environments.\n// ---------------------------------------------------------------------------\n\nexport type ComputeAnnotatedProps = (\n info: ElementInfo,\n filepath: string,\n modifiedtsMs: number,\n) => Record<string, PropValue>;\n\nexport interface TempoNextjsOptions {\n /** Path to a JS/TS module that default-exports a `ComputeAnnotatedProps`\n * function. Resolved relative to the project root (CWD where the user\n * invokes `next dev` / `next build`). Turbopack does not allow function-\n * valued loader options, so this must be a path. */\n computeAnnotatedPropsModule?: string;\n\n /** File patterns to include. Default: `[\"**\\/*.tsx\", \"**\\/*.jsx\"]`. */\n include?: string | RegExp | Array<string | RegExp>;\n\n /** File patterns to exclude. Default: `[\"**\\/node_modules\\/**\"]`. */\n exclude?: string | RegExp | Array<string | RegExp>;\n\n /** Auto-inject `<meta name=\"tempo-project-root\">` into JSX `<head>`.\n * Default: `true`. */\n autoInjectRootMeta?: boolean;\n\n /** Run the loader during production builds too. Default: `false`. */\n productionBuild?: boolean;\n}\n\ninterface TurbopackRule {\n condition?: unknown;\n loaders?: Array<{ loader: string; options?: unknown } | string>;\n}\n\ninterface TurbopackConfig {\n rules?: Record<string, TurbopackRule | TurbopackRule[]>;\n [key: string]: unknown;\n}\n\ninterface NextConfigLike {\n webpack?: ((config: unknown, context: { dev: boolean; [k: string]: unknown }) => unknown) | null;\n turbopack?: TurbopackConfig;\n experimental?: { turbo?: TurbopackConfig; [k: string]: unknown };\n [key: string]: unknown;\n}\n\ntype NextConfigInput = NextConfigLike | undefined;\n\ninterface WebpackHookContext {\n dev: boolean;\n [key: string]: unknown;\n}\n\ninterface WebpackConfigLike {\n module?: { rules?: unknown[] };\n [key: string]: unknown;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nconst TURBOPACK_RULE_KEY = \"*.{tsx,jsx}\";\n\nconst requireFromHere = createRequire(\n typeof import.meta.url === \"string\" && import.meta.url.length > 0\n ? import.meta.url\n : __filename,\n);\n\nfunction resolveLoaderPath(): string {\n // Production: dist/nextjs.{js,cjs} sits next to dist/nextjs-loader.cjs.\n // Development: source nextjs.ts sits at <pkg>/nextjs.ts; the built\n // loader is at <pkg>/dist/nextjs-loader.cjs. Try both so unit tests\n // running directly against the .ts source file still find the loader.\n for (const candidate of [\"./nextjs-loader.cjs\", \"./dist/nextjs-loader.cjs\"]) {\n try {\n return requireFromHere.resolve(candidate);\n } catch {\n // try next candidate\n }\n }\n throw new Error(\n \"tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. \" +\n \"Run `pnpm build` in the tempo-sdk package to produce the dist/ output.\",\n );\n}\n\ninterface NextVersionInfo {\n major: number;\n minor: number;\n}\n\nfunction detectNextVersion(): NextVersionInfo | null {\n try {\n const pkg = requireFromHere(\"next/package.json\") as { version: string };\n const m = /^(\\d+)\\.(\\d+)/.exec(pkg.version);\n if (!m) return null;\n return { major: Number(m[1]), minor: Number(m[2]) };\n } catch {\n return null;\n }\n}\n\n/** Should the wrapper write to `experimental.turbo` instead of `turbopack`? */\nfunction useExperimentalTurbo(version: NextVersionInfo | null): boolean {\n if (!version) return false;\n if (version.major < 15) return true;\n if (version.major === 15 && version.minor < 3) return true;\n return false;\n}\n\n/** Should the wrapper omit Turbopack registration entirely? Some pre-13 versions\n * error on unknown config keys. */\nfunction shouldOmitTurbopack(version: NextVersionInfo | null): boolean {\n if (!version) return false;\n return version.major < 13;\n}\n\nfunction buildTurbopackRule(\n loaderPath: string,\n options: TempoNextjsOptions,\n): TurbopackRule {\n const loaderOptions: Record<string, unknown> = {};\n if (options.computeAnnotatedPropsModule !== undefined) {\n loaderOptions.computeAnnotatedPropsModule = options.computeAnnotatedPropsModule;\n }\n if (options.autoInjectRootMeta !== undefined) {\n loaderOptions.autoInjectRootMeta = options.autoInjectRootMeta;\n }\n\n // {all: [{not: \"foreign\"}, \"development\"]} — exclude node_modules / Next\n // internals AND only run during `next dev`. The \"development\" condition is\n // a Turbopack built-in; it matches both `next dev` and `next build` in dev\n // mode but is inert during a production `next build`.\n const condition = options.productionBuild\n ? { not: \"foreign\" }\n : { all: [{ not: \"foreign\" }, \"development\"] };\n\n return {\n condition,\n loaders: [{ loader: loaderPath, options: loaderOptions }],\n };\n}\n\nfunction mergeTurbopackRules(\n existing: TurbopackConfig | undefined,\n newRule: TurbopackRule,\n): TurbopackConfig {\n const existingRule = existing?.rules?.[TURBOPACK_RULE_KEY];\n let mergedRule: TurbopackRule | TurbopackRule[];\n if (!existingRule) {\n mergedRule = newRule;\n } else if (Array.isArray(existingRule)) {\n mergedRule = [...existingRule, newRule];\n } else {\n mergedRule = [existingRule, newRule];\n }\n return {\n ...existing,\n rules: {\n ...existing?.rules,\n [TURBOPACK_RULE_KEY]: mergedRule,\n },\n };\n}\n\nfunction buildWebpackHook(\n loaderPath: string,\n options: TempoNextjsOptions,\n userWebpack: NextConfigLike[\"webpack\"],\n): NonNullable<NextConfigLike[\"webpack\"]> {\n const loaderOptions: Record<string, unknown> = {};\n if (options.computeAnnotatedPropsModule !== undefined) {\n loaderOptions.computeAnnotatedPropsModule = options.computeAnnotatedPropsModule;\n }\n if (options.autoInjectRootMeta !== undefined) {\n loaderOptions.autoInjectRootMeta = options.autoInjectRootMeta;\n }\n\n const allowProduction = options.productionBuild === true;\n\n return (configIn, context) => {\n const config = configIn as WebpackConfigLike;\n const ctx = context as WebpackHookContext;\n if (ctx.dev || allowProduction) {\n config.module ??= {};\n config.module.rules ??= [];\n config.module.rules.push({\n test: /\\.(tsx|jsx)$/,\n exclude: /node_modules/,\n enforce: \"pre\",\n use: [{ loader: loaderPath, options: loaderOptions }],\n });\n }\n if (typeof userWebpack === \"function\") {\n return userWebpack(config, context);\n }\n return config;\n };\n}\n\n// ---------------------------------------------------------------------------\n// tempoProjectRoot — sync helper for Pages Router users (Section 6.4)\n// ---------------------------------------------------------------------------\n\nlet cachedTempoProjectRoot: string | null = null;\n\n/**\n * Returns the canonical project root that the Tempo loader uses to compute\n * `data-tempo-filepath` values. Use this in `pages/_document.tsx` to set the\n * content of `<meta name=\"tempo-project-root\">`, ensuring the manual meta tag\n * value matches what the loader produces.\n */\nexport function tempoProjectRoot(): string {\n if (cachedTempoProjectRoot !== null) return cachedTempoProjectRoot;\n\n // Walk upward from CWD looking for the nearest package.json. CWD is what\n // Next.js itself uses as the project root when the user invokes\n // `next dev` / `next build` — the loader's `rootContext` matches.\n let dir = process.cwd();\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (existsSync(resolve(dir, \"package.json\"))) break;\n const parent = dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n let canonical = dir;\n try {\n canonical = realpathSync.native(dir);\n } catch {\n // Keep `dir` as fallback.\n }\n cachedTempoProjectRoot = canonical;\n return canonical;\n}\n\n/** Reset the cached project root. For tests only. */\nexport function _resetTempoProjectRoot(): void {\n cachedTempoProjectRoot = null;\n}\n\n// ---------------------------------------------------------------------------\n// tempoNextjsPlugin — the wrapper\n// ---------------------------------------------------------------------------\n\n/**\n * Higher-order function that wraps a Next.js config to register the\n * tempo-annotate loader with both Webpack and Turbopack. No-op when\n * `process.env.TEMPO` is not set.\n *\n * @example\n * ```js\n * // next.config.js\n * const tempoNextjsPlugin = require(\"tempo-sdk/nextjs\");\n * module.exports = tempoNextjsPlugin()({ reactStrictMode: true });\n * ```\n */\nexport function tempoNextjsPlugin(\n pluginOptions: TempoNextjsOptions = {},\n): (inputConfig?: NextConfigLike) => NextConfigLike {\n return (inputConfigArg?: NextConfigLike): NextConfigLike => {\n const inputConfig: NextConfigLike = inputConfigArg ?? {};\n\n if (!process.env.TEMPO) return inputConfig;\n\n // Routed through `_internal.*` so unit tests can spy on these helpers\n // without rewiring the imports.\n const loaderPath = _internal.resolveLoaderPath();\n const version = _internal.detectNextVersion();\n const omitTurbopack = _internal.shouldOmitTurbopack(version);\n const useExperimental = _internal.useExperimentalTurbo(version);\n\n const newRule = buildTurbopackRule(loaderPath, pluginOptions);\n\n const existingTurbo = useExperimental\n ? inputConfig.experimental?.turbo\n : inputConfig.turbopack;\n const mergedTurbo = mergeTurbopackRules(existingTurbo, newRule);\n\n const webpackHook = buildWebpackHook(\n loaderPath,\n pluginOptions,\n inputConfig.webpack ?? null,\n );\n\n const next: NextConfigLike = {\n ...inputConfig,\n webpack: webpackHook,\n };\n\n if (!omitTurbopack) {\n if (useExperimental) {\n next.experimental = {\n ...inputConfig.experimental,\n turbo: mergedTurbo,\n };\n } else {\n next.turbopack = mergedTurbo;\n }\n }\n\n return next;\n };\n}\n\nexport default tempoNextjsPlugin;\n\n// ---------------------------------------------------------------------------\n// Type re-exports for users writing custom strategies.\n// ---------------------------------------------------------------------------\n\nexport type { ElementInfo, PropValue } from \"@modules/annotation\";\n\n// Internal exports used by tests.\nexport const _internal = {\n buildTurbopackRule,\n mergeTurbopackRules,\n buildWebpackHook,\n detectNextVersion,\n useExperimentalTurbo,\n shouldOmitTurbopack,\n resolveLoaderPath,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBA,qBAAyC;AACzC,yBAA8B;AAC9B,uBAAiC;AAnBjC;AAyFA,IAAM,qBAAqB;AAE3B,IAAM,sBAAkB;AAAA,EACtB,OAAO,YAAY,QAAQ,YAAY,YAAY,IAAI,SAAS,IAC5D,YAAY,MACZ;AACN;AAEA,SAAS,oBAA4B;AAKnC,aAAW,aAAa,CAAC,uBAAuB,0BAA0B,GAAG;AAC3E,QAAI;AACF,aAAO,gBAAgB,QAAQ,SAAS;AAAA,IAC1C,QAAQ;AAAA,IAER;AAAA,EACF;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EAEF;AACF;AAOA,SAAS,oBAA4C;AACnD,MAAI;AACF,UAAM,MAAM,gBAAgB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