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

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 (164) hide show
  1. package/README.md +388 -24
  2. package/dist/board-element-CRN_hj5F.d.ts +13 -0
  3. package/dist/chunk-34IGUWOP.js +1703 -0
  4. package/dist/chunk-34IGUWOP.js.map +1 -0
  5. package/dist/chunk-6ZNAIOYG.js +7125 -0
  6. package/dist/chunk-6ZNAIOYG.js.map +1 -0
  7. package/dist/chunk-B4RMCLUN.js +617 -0
  8. package/dist/chunk-B4RMCLUN.js.map +1 -0
  9. package/dist/chunk-D3F3GCMF.js +625 -0
  10. package/dist/chunk-D3F3GCMF.js.map +1 -0
  11. package/dist/chunk-ES74C2IN.js +1576 -0
  12. package/dist/chunk-ES74C2IN.js.map +1 -0
  13. package/dist/diagnostics-BokP7HN3.d.ts +64 -0
  14. package/dist/extract-DgzrJ5el.d.ts +6743 -0
  15. package/dist/index.d.ts +4748 -1
  16. package/dist/index.js +1556 -7
  17. package/dist/index.js.map +1 -1
  18. package/dist/model-BeslAXVA.d.ts +648 -0
  19. package/dist/react.d.ts +78 -0
  20. package/dist/react.js +411 -0
  21. package/dist/react.js.map +1 -0
  22. package/dist/reducer.d.ts +786 -544
  23. package/dist/reducer.js +4286 -842
  24. package/dist/reducer.js.map +1 -1
  25. package/dist/testing.d.ts +529 -569
  26. package/dist/testing.js +2588 -934
  27. package/dist/testing.js.map +1 -1
  28. package/dist/types-Xg_RxV1n.d.ts +118 -0
  29. package/package.json +39 -163
  30. package/dist/HandView-Bi2lxzQP.d.ts +0 -79
  31. package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
  32. package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
  33. package/dist/attributes-DbvyMbXw.d.ts +0 -68
  34. package/dist/authoring/index.d.ts +0 -59
  35. package/dist/authoring/index.js +0 -24
  36. package/dist/authoring/index.js.map +0 -1
  37. package/dist/authoring-compiler.d.ts +0 -27
  38. package/dist/authoring-compiler.js +0 -11
  39. package/dist/authoring-compiler.js.map +0 -1
  40. package/dist/authoring-materialize-cli.d.ts +0 -1
  41. package/dist/authoring-materialize-cli.js +0 -45
  42. package/dist/authoring-materialize-cli.js.map +0 -1
  43. package/dist/browser-interaction.d.ts +0 -910
  44. package/dist/browser-interaction.js +0 -119
  45. package/dist/browser-interaction.js.map +0 -1
  46. package/dist/chunk-2GQIALJL.js +0 -219
  47. package/dist/chunk-2GQIALJL.js.map +0 -1
  48. package/dist/chunk-533O7C4L.js +0 -7095
  49. package/dist/chunk-533O7C4L.js.map +0 -1
  50. package/dist/chunk-6LMESVGT.js +0 -5960
  51. package/dist/chunk-6LMESVGT.js.map +0 -1
  52. package/dist/chunk-DQS2EG5E.js +0 -564
  53. package/dist/chunk-DQS2EG5E.js.map +0 -1
  54. package/dist/chunk-EOEA3I64.js +0 -1864
  55. package/dist/chunk-EOEA3I64.js.map +0 -1
  56. package/dist/chunk-FL67RDID.js +0 -2903
  57. package/dist/chunk-FL67RDID.js.map +0 -1
  58. package/dist/chunk-HIH6Y4FA.js +0 -7802
  59. package/dist/chunk-HIH6Y4FA.js.map +0 -1
  60. package/dist/chunk-HUK4234C.js +0 -166
  61. package/dist/chunk-HUK4234C.js.map +0 -1
  62. package/dist/chunk-KGV2EUNN.js +0 -532
  63. package/dist/chunk-KGV2EUNN.js.map +0 -1
  64. package/dist/chunk-KRJPRYEA.js +0 -922
  65. package/dist/chunk-KRJPRYEA.js.map +0 -1
  66. package/dist/chunk-KWHOFBDM.js +0 -9
  67. package/dist/chunk-KWHOFBDM.js.map +0 -1
  68. package/dist/chunk-LMHCGCA6.js +0 -104
  69. package/dist/chunk-LMHCGCA6.js.map +0 -1
  70. package/dist/chunk-N33CGX2F.js +0 -263
  71. package/dist/chunk-N33CGX2F.js.map +0 -1
  72. package/dist/chunk-PF7L4BMG.js +0 -117
  73. package/dist/chunk-PF7L4BMG.js.map +0 -1
  74. package/dist/chunk-PZ5AY32C.js +0 -10
  75. package/dist/chunk-PZ5AY32C.js.map +0 -1
  76. package/dist/chunk-T3ZKNUZ7.js +0 -1
  77. package/dist/chunk-T3ZKNUZ7.js.map +0 -1
  78. package/dist/chunk-TXELBVTG.js +0 -32
  79. package/dist/chunk-TXELBVTG.js.map +0 -1
  80. package/dist/chunk-VDXOF4FW.js +0 -69
  81. package/dist/chunk-VDXOF4FW.js.map +0 -1
  82. package/dist/chunk-VRRR6QZT.js +0 -11941
  83. package/dist/chunk-VRRR6QZT.js.map +0 -1
  84. package/dist/chunk-VWTKGIYF.js +0 -90
  85. package/dist/chunk-VWTKGIYF.js.map +0 -1
  86. package/dist/chunk-WHR5UW3F.js +0 -1988
  87. package/dist/chunk-WHR5UW3F.js.map +0 -1
  88. package/dist/chunk-XFMSLL3P.js +0 -637
  89. package/dist/chunk-XFMSLL3P.js.map +0 -1
  90. package/dist/chunk-ZSTCUJKZ.js +0 -21
  91. package/dist/chunk-ZSTCUJKZ.js.map +0 -1
  92. package/dist/codegen.d.ts +0 -941
  93. package/dist/codegen.js +0 -44
  94. package/dist/codegen.js.map +0 -1
  95. package/dist/components-CNAt5J1p.d.ts +0 -1300
  96. package/dist/definitions-bZSBaPjj.d.ts +0 -300
  97. package/dist/diagnostics-DIi3ina7.d.ts +0 -50
  98. package/dist/digest.d.ts +0 -8
  99. package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
  100. package/dist/index-CR69MyWr.d.ts +0 -193
  101. package/dist/index.d-Bw8AOcgp.d.ts +0 -2036
  102. package/dist/package-set.d.ts +0 -13
  103. package/dist/package-set.js +0 -13
  104. package/dist/package-set.js.map +0 -1
  105. package/dist/player-state-Cqpyeql0.d.ts +0 -371
  106. package/dist/plugin-runtime-contract.d.ts +0 -17
  107. package/dist/plugin-runtime-contract.js +0 -94
  108. package/dist/plugin-runtime-contract.js.map +0 -1
  109. package/dist/plugin-state-BRH3UiUp.d.ts +0 -214
  110. package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
  111. package/dist/protocol-CVaSqPgX.d.ts +0 -320
  112. package/dist/reducer/advanced.d.ts +0 -81
  113. package/dist/reducer/advanced.js +0 -45
  114. package/dist/reducer/advanced.js.map +0 -1
  115. package/dist/reducer-contract.d.ts +0 -3
  116. package/dist/reducer-contract.js +0 -16
  117. package/dist/reducer-contract.js.map +0 -1
  118. package/dist/reference-games/index.d.ts +0 -31
  119. package/dist/reference-games/index.js +0 -48
  120. package/dist/reference-games/index.js.map +0 -1
  121. package/dist/runtime/primitives.d.ts +0 -250
  122. package/dist/runtime/primitives.js +0 -189
  123. package/dist/runtime/primitives.js.map +0 -1
  124. package/dist/runtime/runtime-api.d.ts +0 -2
  125. package/dist/runtime/runtime-api.js +0 -1
  126. package/dist/runtime/runtime-api.js.map +0 -1
  127. package/dist/runtime/workspace-contract.d.ts +0 -359
  128. package/dist/runtime/workspace-contract.js +0 -23
  129. package/dist/runtime/workspace-contract.js.map +0 -1
  130. package/dist/runtime-C7Z2acNU.d.ts +0 -1706
  131. package/dist/runtime-api-CgPuEVeF.d.ts +0 -86
  132. package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
  133. package/dist/runtime.d.ts +0 -83
  134. package/dist/runtime.js +0 -240
  135. package/dist/runtime.js.map +0 -1
  136. package/dist/schema.d.ts +0 -405
  137. package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
  138. package/dist/testing-compiler.d.ts +0 -37
  139. package/dist/testing-compiler.js +0 -272
  140. package/dist/testing-compiler.js.map +0 -1
  141. package/dist/testing-runtime.d.ts +0 -119
  142. package/dist/testing-runtime.js +0 -212
  143. package/dist/testing-runtime.js.map +0 -1
  144. package/dist/types-DJj5MJkl.d.ts +0 -256
  145. package/dist/types-DN4O7kH_.d.ts +0 -122
  146. package/dist/types-q1Guidm5.d.ts +0 -28
  147. package/dist/types.d.ts +0 -1958
  148. package/dist/types.js +0 -26
  149. package/dist/types.js.map +0 -1
  150. package/dist/ui/components.d.ts +0 -18
  151. package/dist/ui/components.js +0 -220
  152. package/dist/ui/components.js.map +0 -1
  153. package/dist/ui/defaults.d.ts +0 -19
  154. package/dist/ui/defaults.js +0 -104
  155. package/dist/ui/defaults.js.map +0 -1
  156. package/dist/ui/player-state.d.ts +0 -2
  157. package/dist/ui/player-state.js +0 -1
  158. package/dist/ui/player-state.js.map +0 -1
  159. package/dist/ui/plugin-styles.css +0 -2
  160. package/dist/ui-contract-BC4JpysE.d.ts +0 -1169
  161. package/dist/ui.d.ts +0 -318
  162. package/dist/ui.js +0 -281
  163. package/dist/ui.js.map +0 -1
  164. package/dist/views-D2Cfzr3h.d.ts +0 -1588
@@ -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\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