@dreamboard-games/sdk 0.5.0-alpha.0 → 0.5.0-alpha.2

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.
Files changed (113) hide show
  1. package/README.md +127 -0
  2. package/dist/browser-interaction.d.ts +22 -22
  3. package/dist/{chunk-VRRR6QZT.js → chunk-32PFKDV7.js} +170 -406
  4. package/dist/chunk-32PFKDV7.js.map +1 -0
  5. package/dist/{chunk-N33CGX2F.js → chunk-3BAD4VC2.js} +3 -3
  6. package/dist/{chunk-LMHCGCA6.js → chunk-3SKDNDPG.js} +2 -2
  7. package/dist/chunk-5YV2WHJ4.js +25 -0
  8. package/dist/chunk-5YV2WHJ4.js.map +1 -0
  9. package/dist/{chunk-VWTKGIYF.js → chunk-ANRB4XKA.js} +1 -1
  10. package/dist/chunk-ANRB4XKA.js.map +1 -0
  11. package/dist/{chunk-EOEA3I64.js → chunk-BI4G3PM2.js} +7 -7
  12. package/dist/chunk-BI4G3PM2.js.map +1 -0
  13. package/dist/{chunk-KRJPRYEA.js → chunk-EVCLTY4Q.js} +21 -8
  14. package/dist/chunk-EVCLTY4Q.js.map +1 -0
  15. package/dist/{chunk-DQS2EG5E.js → chunk-GDPKTBUR.js} +2 -2
  16. package/dist/{chunk-FL67RDID.js → chunk-H6VDGFL5.js} +128 -128
  17. package/dist/chunk-H6VDGFL5.js.map +1 -0
  18. package/dist/{chunk-6LMESVGT.js → chunk-LR3ZTWQF.js} +3 -3
  19. package/dist/chunk-LR3ZTWQF.js.map +1 -0
  20. package/dist/{chunk-TXELBVTG.js → chunk-PN5O6GG2.js} +2 -2
  21. package/dist/{chunk-533O7C4L.js → chunk-S2JEDVWH.js} +500 -430
  22. package/dist/chunk-S2JEDVWH.js.map +1 -0
  23. package/dist/{chunk-2GQIALJL.js → chunk-UGH54WZ2.js} +6 -2
  24. package/dist/chunk-UGH54WZ2.js.map +1 -0
  25. package/dist/chunk-VCDWP5VL.js +746 -0
  26. package/dist/chunk-VCDWP5VL.js.map +1 -0
  27. package/dist/{chunk-ZSTCUJKZ.js → chunk-Y75CFE77.js} +2 -6
  28. package/dist/chunk-Y75CFE77.js.map +1 -0
  29. package/dist/chunk-Z7QCREWI.js +3435 -0
  30. package/dist/chunk-Z7QCREWI.js.map +1 -0
  31. package/dist/chunk-ZZGN2ATS.js +1941 -0
  32. package/dist/chunk-ZZGN2ATS.js.map +1 -0
  33. package/dist/{components-CNAt5J1p.d.ts → components-gAbIz7hK.d.ts} +2 -18
  34. package/dist/{definitions-bZSBaPjj.d.ts → definitions-BgmV_GhC.d.ts} +3 -3
  35. package/dist/digest.d.ts +2 -2
  36. package/dist/game-CsZScpcn.d.ts +763 -0
  37. package/dist/{index-CR69MyWr.d.ts → index-CcT9Q7N7.d.ts} +1 -1
  38. package/dist/{index.d-Bw8AOcgp.d.ts → index.d-DjzoK7zn.d.ts} +67 -2
  39. package/dist/index.js +1 -2
  40. package/dist/package-set.js +1 -2
  41. package/dist/plugin-runtime-contract.d.ts +4 -4
  42. package/dist/plugin-runtime-contract.js +13 -15
  43. package/dist/{protocol-CVaSqPgX.d.ts → protocol-dYgafTYY.d.ts} +1 -7
  44. package/dist/reducer/advanced.d.ts +12 -11
  45. package/dist/reducer/advanced.js +10 -4
  46. package/dist/reducer-contract.d.ts +10 -2
  47. package/dist/reducer-contract.js +4 -4
  48. package/dist/reducer.d.ts +12 -689
  49. package/dist/reducer.js +19 -1293
  50. package/dist/reducer.js.map +1 -1
  51. package/dist/runtime/primitives.d.ts +4 -4
  52. package/dist/runtime/primitives.js +5 -5
  53. package/dist/runtime/runtime-api.d.ts +2 -2
  54. package/dist/runtime/workspace-contract.d.ts +50 -17
  55. package/dist/runtime/workspace-contract.js +15 -10
  56. package/dist/{runtime-C7Z2acNU.d.ts → runtime-RJ5orDJU.d.ts} +23 -30
  57. package/dist/{plugin-state-BRH3UiUp.d.ts → runtime-api-Bz5pwNU_.d.ts} +86 -4
  58. package/dist/runtime.d.ts +8 -8
  59. package/dist/runtime.js +19 -17
  60. package/dist/runtime.js.map +1 -1
  61. package/dist/schema.d.ts +2 -28
  62. package/dist/testing-compiler.d.ts +4 -4
  63. package/dist/testing-runtime.d.ts +7 -7
  64. package/dist/testing-runtime.js +6 -6
  65. package/dist/testing.d.ts +17 -17
  66. package/dist/testing.js +14 -14
  67. package/dist/{types-q1Guidm5.d.ts → types-DR7DoB1x.d.ts} +1 -1
  68. package/dist/{types-DN4O7kH_.d.ts → types-JWCYHmu7.d.ts} +2 -2
  69. package/dist/types.js +6 -18
  70. package/dist/types.js.map +1 -1
  71. package/dist/ui/components.d.ts +3 -4
  72. package/dist/ui/components.js +1 -5
  73. package/dist/{ui-contract-BC4JpysE.d.ts → ui-contract-GTUPkf8z.d.ts} +175 -176
  74. package/dist/ui.d.ts +4 -5
  75. package/dist/ui.js +2 -6
  76. package/dist/{views-D2Cfzr3h.d.ts → views-BpuWcOyN.d.ts} +101 -48
  77. package/package.json +3 -22
  78. package/dist/authoring/index.d.ts +0 -59
  79. package/dist/authoring/index.js +0 -24
  80. package/dist/authoring/index.js.map +0 -1
  81. package/dist/authoring-compiler.d.ts +0 -27
  82. package/dist/authoring-compiler.js +0 -11
  83. package/dist/authoring-compiler.js.map +0 -1
  84. package/dist/authoring-materialize-cli.d.ts +0 -1
  85. package/dist/authoring-materialize-cli.js +0 -45
  86. package/dist/authoring-materialize-cli.js.map +0 -1
  87. package/dist/chunk-2GQIALJL.js.map +0 -1
  88. package/dist/chunk-533O7C4L.js.map +0 -1
  89. package/dist/chunk-6LMESVGT.js.map +0 -1
  90. package/dist/chunk-EOEA3I64.js.map +0 -1
  91. package/dist/chunk-FL67RDID.js.map +0 -1
  92. package/dist/chunk-HIH6Y4FA.js +0 -7802
  93. package/dist/chunk-HIH6Y4FA.js.map +0 -1
  94. package/dist/chunk-HUK4234C.js +0 -166
  95. package/dist/chunk-HUK4234C.js.map +0 -1
  96. package/dist/chunk-KGV2EUNN.js +0 -532
  97. package/dist/chunk-KGV2EUNN.js.map +0 -1
  98. package/dist/chunk-KRJPRYEA.js.map +0 -1
  99. package/dist/chunk-KWHOFBDM.js +0 -9
  100. package/dist/chunk-KWHOFBDM.js.map +0 -1
  101. package/dist/chunk-VRRR6QZT.js.map +0 -1
  102. package/dist/chunk-VWTKGIYF.js.map +0 -1
  103. package/dist/chunk-XFMSLL3P.js +0 -637
  104. package/dist/chunk-XFMSLL3P.js.map +0 -1
  105. package/dist/chunk-ZSTCUJKZ.js.map +0 -1
  106. package/dist/codegen.d.ts +0 -941
  107. package/dist/codegen.js +0 -44
  108. package/dist/codegen.js.map +0 -1
  109. package/dist/runtime-api-CgPuEVeF.d.ts +0 -86
  110. /package/dist/{chunk-N33CGX2F.js.map → chunk-3BAD4VC2.js.map} +0 -0
  111. /package/dist/{chunk-LMHCGCA6.js.map → chunk-3SKDNDPG.js.map} +0 -0
  112. /package/dist/{chunk-DQS2EG5E.js.map → chunk-GDPKTBUR.js.map} +0 -0
  113. /package/dist/{chunk-TXELBVTG.js.map → chunk-PN5O6GG2.js.map} +0 -0
@@ -1,166 +0,0 @@
1
- import {
2
- generateWorkspaceArtifacts
3
- } from "./chunk-KGV2EUNN.js";
4
- import {
5
- WORKSPACE_CODEGEN_OWNERSHIP
6
- } from "./chunk-HIH6Y4FA.js";
7
-
8
- // src/authoring/materialize-workspace.ts
9
- import { createHash, randomUUID } from "crypto";
10
- import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
11
- import path from "path";
12
- import { pathToFileURL } from "url";
13
- import { build } from "esbuild";
14
- var authoritativePaths = new Set(
15
- WORKSPACE_CODEGEN_OWNERSHIP.dynamic.generatedFiles
16
- );
17
- async function materializeWorkspace(options) {
18
- const projectRoot = path.resolve(options.projectRoot ?? process.cwd());
19
- const manifestPath = resolveProjectPath(projectRoot, options.manifestPath);
20
- if (!await isFile(manifestPath)) {
21
- throw new Error(`Manifest source does not exist: ${manifestPath}.`);
22
- }
23
- const manifest = await loadManifest({ manifestPath, projectRoot });
24
- const artifacts = generateWorkspaceArtifacts(manifest);
25
- const emittedAuthoritative = new Set(
26
- artifacts.filter(({ ownership }) => ownership === "authoritative").map(({ path: artifactPath }) => artifactPath)
27
- );
28
- assertExactAuthoritativeInventory(emittedAuthoritative);
29
- let seededFiles = 0;
30
- const records = [];
31
- for (const artifact of artifacts) {
32
- const destination = resolveProjectPath(projectRoot, artifact.path);
33
- if (artifact.ownership === "seed") {
34
- if (!options.writeMissingSeeds || await isFile(destination)) {
35
- continue;
36
- }
37
- }
38
- await mkdir(path.dirname(destination), { recursive: true });
39
- if (artifact.ownership === "authoritative") {
40
- await writeAuthoritativeFile(destination, artifact.content);
41
- } else {
42
- await writeFile(destination, artifact.content);
43
- }
44
- if (artifact.ownership === "seed") {
45
- seededFiles += 1;
46
- continue;
47
- }
48
- const bytes = await readFile(destination);
49
- const actual = createHash("sha256").update(bytes).digest("hex");
50
- if (actual !== artifact.contentSha256) {
51
- throw new Error(
52
- `Generated ${artifact.path} digest does not match its declared digest.`
53
- );
54
- }
55
- records.push({
56
- path: artifact.path,
57
- ownership: "authoritative",
58
- sha256: `sha256:${actual}`
59
- });
60
- }
61
- records.sort(
62
- (left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0
63
- );
64
- return {
65
- schemaVersion: 1,
66
- projectRoot,
67
- authoritativeFiles: records.length,
68
- seededFiles,
69
- artifacts: records,
70
- digest: `sha256:${createHash("sha256").update(JSON.stringify(records)).digest("hex")}`
71
- };
72
- }
73
- async function loadManifest(options) {
74
- const typesEntry = await resolveCurrentSdkTypesFacade();
75
- const entryPath = path.join(
76
- options.projectRoot,
77
- "node_modules/.cache/dreamboard-workspace-compiler",
78
- `manifest-${process.pid}-${randomUUID()}.mjs`
79
- );
80
- await mkdir(path.dirname(entryPath), { recursive: true });
81
- try {
82
- const result = await build({
83
- entryPoints: [options.manifestPath],
84
- outfile: entryPath,
85
- absWorkingDir: options.projectRoot,
86
- bundle: true,
87
- format: "esm",
88
- platform: "node",
89
- target: "node24",
90
- alias: {
91
- "@dreamboard-games/sdk/types": typesEntry
92
- },
93
- sourcemap: "inline",
94
- logLevel: "silent"
95
- });
96
- void result;
97
- const loaded = await import(pathToFileURL(entryPath).href);
98
- const manifest = loaded.manifest ?? loaded.default;
99
- if (!manifest || typeof manifest !== "object") {
100
- throw new Error("Manifest source must export a manifest object.");
101
- }
102
- return manifest;
103
- } finally {
104
- await rm(entryPath, { force: true });
105
- }
106
- }
107
- async function resolveCurrentSdkTypesFacade() {
108
- const candidates = [
109
- path.resolve(import.meta.dirname, "../types.ts"),
110
- path.resolve(import.meta.dirname, "types.js")
111
- ];
112
- for (const candidate of candidates) {
113
- if (await isFile(candidate)) return candidate;
114
- }
115
- throw new Error(
116
- `Could not resolve the current @dreamboard-games/sdk/types facade from ${import.meta.dirname}.`
117
- );
118
- }
119
- async function writeAuthoritativeFile(destination, content) {
120
- const temporaryPath = path.join(
121
- path.dirname(destination),
122
- `.${path.basename(destination)}.${process.pid}.${randomUUID()}.tmp`
123
- );
124
- try {
125
- await writeFile(temporaryPath, content);
126
- await rename(temporaryPath, destination);
127
- } finally {
128
- await rm(temporaryPath, { force: true });
129
- }
130
- }
131
- function assertExactAuthoritativeInventory(emitted) {
132
- const missing = [...authoritativePaths].filter(
133
- (value) => !emitted.has(value)
134
- );
135
- const unexpected = [...emitted].filter(
136
- (value) => !authoritativePaths.has(value)
137
- );
138
- if (missing.length > 0 || unexpected.length > 0) {
139
- throw new Error(
140
- `SDK workspace ownership mismatch (missing: ${missing.join(", ") || "none"}; unexpected: ${unexpected.join(", ") || "none"}).`
141
- );
142
- }
143
- }
144
- function resolveProjectPath(projectRoot, value) {
145
- if (typeof value !== "string" || value.length === 0 || path.isAbsolute(value) || value.split(/[\\/]+/).some((segment) => segment === "..")) {
146
- throw new Error(`Workspace path must be project-relative: ${value}.`);
147
- }
148
- const resolved = path.resolve(projectRoot, value);
149
- if (!resolved.startsWith(`${projectRoot}${path.sep}`)) {
150
- throw new Error(`Workspace path escapes the project root: ${value}.`);
151
- }
152
- return resolved;
153
- }
154
- async function isFile(filePath) {
155
- return stat(filePath).then((value) => value.isFile()).catch((error) => {
156
- if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
157
- return false;
158
- }
159
- throw error;
160
- });
161
- }
162
-
163
- export {
164
- materializeWorkspace
165
- };
166
- //# sourceMappingURL=chunk-HUK4234C.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/authoring/materialize-workspace.ts"],"sourcesContent":["import { createHash, randomUUID } from \"node:crypto\";\nimport { mkdir, readFile, rename, rm, stat, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { WORKSPACE_CODEGEN_OWNERSHIP } from \"@dreamboard-games/workspace-codegen\";\nimport { build } from \"esbuild\";\nimport { generateWorkspaceArtifacts } from \"./adapter.js\";\n\nexport type MaterializeWorkspaceOptions = {\n readonly manifestPath: string;\n readonly projectRoot?: string;\n /** Scaffolding-only. Existing build/test paths leave seed files untouched. */\n readonly writeMissingSeeds?: boolean;\n};\n\nexport type MaterializedWorkspaceResult = {\n readonly schemaVersion: 1;\n readonly projectRoot: string;\n readonly authoritativeFiles: number;\n readonly seededFiles: number;\n readonly artifacts: readonly {\n readonly path: string;\n readonly ownership: \"authoritative\";\n readonly sha256: `sha256:${string}`;\n }[];\n readonly digest: `sha256:${string}`;\n};\n\ntype ManifestModule = {\n readonly default?: unknown;\n readonly manifest?: unknown;\n};\n\nconst authoritativePaths = new Set(\n WORKSPACE_CODEGEN_OWNERSHIP.dynamic.generatedFiles,\n);\n\n/**\n * Materialize SDK-owned workspace contracts from authored manifest source.\n * Authoritative files are always replaced. Seed files are untouched unless a\n * scaffolding caller explicitly opts in. No test state or projection artifact\n * is emitted.\n */\nexport async function materializeWorkspace(\n options: MaterializeWorkspaceOptions,\n): Promise<MaterializedWorkspaceResult> {\n const projectRoot = path.resolve(options.projectRoot ?? process.cwd());\n const manifestPath = resolveProjectPath(projectRoot, options.manifestPath);\n if (!(await isFile(manifestPath))) {\n throw new Error(`Manifest source does not exist: ${manifestPath}.`);\n }\n const manifest = await loadManifest({ manifestPath, projectRoot });\n const artifacts = generateWorkspaceArtifacts(manifest);\n const emittedAuthoritative = new Set(\n artifacts\n .filter(({ ownership }) => ownership === \"authoritative\")\n .map(({ path: artifactPath }) => artifactPath),\n );\n assertExactAuthoritativeInventory(emittedAuthoritative);\n\n let seededFiles = 0;\n const records: Array<{\n readonly path: string;\n readonly ownership: \"authoritative\";\n readonly sha256: `sha256:${string}`;\n }> = [];\n for (const artifact of artifacts) {\n const destination = resolveProjectPath(projectRoot, artifact.path);\n if (artifact.ownership === \"seed\") {\n if (!options.writeMissingSeeds || (await isFile(destination))) {\n continue;\n }\n }\n await mkdir(path.dirname(destination), { recursive: true });\n if (artifact.ownership === \"authoritative\") {\n await writeAuthoritativeFile(destination, artifact.content);\n } else {\n await writeFile(destination, artifact.content);\n }\n if (artifact.ownership === \"seed\") {\n seededFiles += 1;\n continue;\n }\n const bytes = await readFile(destination);\n const actual = createHash(\"sha256\").update(bytes).digest(\"hex\");\n if (actual !== artifact.contentSha256) {\n throw new Error(\n `Generated ${artifact.path} digest does not match its declared digest.`,\n );\n }\n records.push({\n path: artifact.path,\n ownership: \"authoritative\",\n sha256: `sha256:${actual}`,\n });\n }\n records.sort((left, right) =>\n left.path < right.path ? -1 : left.path > right.path ? 1 : 0,\n );\n return {\n schemaVersion: 1,\n projectRoot,\n authoritativeFiles: records.length,\n seededFiles,\n artifacts: records,\n digest: `sha256:${createHash(\"sha256\")\n .update(JSON.stringify(records))\n .digest(\"hex\")}`,\n };\n}\n\nasync function loadManifest(options: {\n readonly manifestPath: string;\n readonly projectRoot: string;\n}): Promise<unknown> {\n const typesEntry = await resolveCurrentSdkTypesFacade();\n const entryPath = path.join(\n options.projectRoot,\n \"node_modules/.cache/dreamboard-workspace-compiler\",\n `manifest-${process.pid}-${randomUUID()}.mjs`,\n );\n await mkdir(path.dirname(entryPath), { recursive: true });\n try {\n const result = await build({\n entryPoints: [options.manifestPath],\n outfile: entryPath,\n absWorkingDir: options.projectRoot,\n bundle: true,\n format: \"esm\",\n platform: \"node\",\n target: \"node24\",\n alias: {\n \"@dreamboard-games/sdk/types\": typesEntry,\n },\n sourcemap: \"inline\",\n logLevel: \"silent\",\n });\n void result;\n const loaded = (await import(\n pathToFileURL(entryPath).href\n )) as ManifestModule;\n const manifest = loaded.manifest ?? loaded.default;\n if (!manifest || typeof manifest !== \"object\") {\n throw new Error(\"Manifest source must export a manifest object.\");\n }\n return manifest;\n } finally {\n await rm(entryPath, { force: true });\n }\n}\n\nasync function resolveCurrentSdkTypesFacade(): Promise<string> {\n const candidates = [\n path.resolve(import.meta.dirname, \"../types.ts\"),\n path.resolve(import.meta.dirname, \"types.js\"),\n ];\n for (const candidate of candidates) {\n if (await isFile(candidate)) return candidate;\n }\n throw new Error(\n `Could not resolve the current @dreamboard-games/sdk/types facade from ${import.meta.dirname}.`,\n );\n}\n\nasync function writeAuthoritativeFile(\n destination: string,\n content: string,\n): Promise<void> {\n const temporaryPath = path.join(\n path.dirname(destination),\n `.${path.basename(destination)}.${process.pid}.${randomUUID()}.tmp`,\n );\n try {\n await writeFile(temporaryPath, content);\n await rename(temporaryPath, destination);\n } finally {\n await rm(temporaryPath, { force: true });\n }\n}\n\nfunction assertExactAuthoritativeInventory(emitted: ReadonlySet<string>): void {\n const missing = [...authoritativePaths].filter(\n (value) => !emitted.has(value),\n );\n const unexpected = [...emitted].filter(\n (value) => !authoritativePaths.has(value),\n );\n if (missing.length > 0 || unexpected.length > 0) {\n throw new Error(\n `SDK workspace ownership mismatch (missing: ${missing.join(\", \") || \"none\"}; unexpected: ${unexpected.join(\", \") || \"none\"}).`,\n );\n }\n}\n\nfunction resolveProjectPath(projectRoot: string, value: string): string {\n if (\n typeof value !== \"string\" ||\n value.length === 0 ||\n path.isAbsolute(value) ||\n value.split(/[\\\\/]+/).some((segment) => segment === \"..\")\n ) {\n throw new Error(`Workspace path must be project-relative: ${value}.`);\n }\n const resolved = path.resolve(projectRoot, value);\n if (!resolved.startsWith(`${projectRoot}${path.sep}`)) {\n throw new Error(`Workspace path escapes the project root: ${value}.`);\n }\n return resolved;\n}\n\nasync function isFile(filePath: string): Promise<boolean> {\n return stat(filePath)\n .then((value) => value.isFile())\n .catch((error: unknown) => {\n if (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n error.code === \"ENOENT\"\n ) {\n return false;\n }\n throw error;\n });\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,kBAAkB;AACvC,SAAS,OAAO,UAAU,QAAQ,IAAI,MAAM,iBAAiB;AAC7D,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAE9B,SAAS,aAAa;AA4BtB,IAAM,qBAAqB,IAAI;AAAA,EAC7B,4BAA4B,QAAQ;AACtC;AAQA,eAAsB,qBACpB,SACsC;AACtC,QAAM,cAAc,KAAK,QAAQ,QAAQ,eAAe,QAAQ,IAAI,CAAC;AACrE,QAAM,eAAe,mBAAmB,aAAa,QAAQ,YAAY;AACzE,MAAI,CAAE,MAAM,OAAO,YAAY,GAAI;AACjC,UAAM,IAAI,MAAM,mCAAmC,YAAY,GAAG;AAAA,EACpE;AACA,QAAM,WAAW,MAAM,aAAa,EAAE,cAAc,YAAY,CAAC;AACjE,QAAM,YAAY,2BAA2B,QAAQ;AACrD,QAAM,uBAAuB,IAAI;AAAA,IAC/B,UACG,OAAO,CAAC,EAAE,UAAU,MAAM,cAAc,eAAe,EACvD,IAAI,CAAC,EAAE,MAAM,aAAa,MAAM,YAAY;AAAA,EACjD;AACA,oCAAkC,oBAAoB;AAEtD,MAAI,cAAc;AAClB,QAAM,UAID,CAAC;AACN,aAAW,YAAY,WAAW;AAChC,UAAM,cAAc,mBAAmB,aAAa,SAAS,IAAI;AACjE,QAAI,SAAS,cAAc,QAAQ;AACjC,UAAI,CAAC,QAAQ,qBAAsB,MAAM,OAAO,WAAW,GAAI;A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