@nuasite/cms-core 0.64.3 → 0.65.0
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/dist/asset-paths.d.ts.map +1 -0
- package/dist/asset-paths.js +55 -0
- package/dist/astro-source-analysis.d.ts.map +1 -0
- package/dist/astro-source-analysis.js +503 -0
- package/dist/byte-range.d.ts.map +1 -0
- package/dist/byte-range.js +31 -0
- package/dist/{types/check-entries.d.ts → check-entries.d.ts} +3 -3
- package/dist/check-entries.d.ts.map +1 -0
- package/dist/check-entries.js +98 -0
- package/dist/{types/check-live.d.ts → check-live.d.ts} +4 -4
- package/dist/check-live.d.ts.map +1 -0
- package/dist/check-live.js +49 -0
- package/dist/{types/check-shape.d.ts → check-shape.d.ts} +4 -4
- package/dist/check-shape.d.ts.map +1 -0
- package/dist/check-shape.js +119 -0
- package/dist/{types/check-write.d.ts → check-write.d.ts} +4 -4
- package/dist/check-write.d.ts.map +1 -0
- package/dist/check-write.js +273 -0
- package/dist/{types/check.d.ts → check.d.ts} +2 -2
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +366 -0
- package/dist/{types/collection-scanner.d.ts → collection-scanner.d.ts} +2 -2
- package/dist/collection-scanner.d.ts.map +1 -0
- package/dist/collection-scanner.js +1483 -0
- package/dist/{types/component-registry.d.ts → component-registry.d.ts} +1 -1
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/component-registry.js +271 -0
- package/dist/{types/content-config-ast.d.ts → content-config-ast.d.ts} +1 -1
- package/dist/content-config-ast.d.ts.map +1 -0
- package/dist/content-config-ast.js +1614 -0
- package/dist/{types/core.d.ts → core.d.ts} +3 -3
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +94 -0
- package/dist/editor-write-model.d.ts.map +1 -0
- package/dist/editor-write-model.js +101 -0
- package/dist/fs/glob.d.ts.map +1 -0
- package/dist/fs/glob.js +79 -0
- package/dist/{types/fs → fs}/node-fs.d.ts +1 -1
- package/dist/fs/node-fs.d.ts.map +1 -0
- package/dist/fs/node-fs.js +199 -0
- package/dist/{types/fs → fs}/staged.d.ts +1 -1
- package/dist/fs/staged.d.ts.map +1 -0
- package/dist/fs/staged.js +203 -0
- package/dist/fs/types.d.ts.map +1 -0
- package/dist/fs/types.js +0 -0
- package/dist/{types/handlers → handlers}/entry-ops.d.ts +2 -2
- package/dist/handlers/entry-ops.d.ts.map +1 -0
- package/dist/handlers/entry-ops.js +846 -0
- package/dist/{types/handlers → handlers}/page-ops.d.ts +1 -1
- package/dist/handlers/page-ops.d.ts.map +1 -0
- package/dist/handlers/page-ops.js +165 -0
- package/dist/{types/handlers → handlers}/redirect-ops.d.ts +1 -1
- package/dist/handlers/redirect-ops.d.ts.map +1 -0
- package/dist/handlers/redirect-ops.js +111 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/media/contember.d.ts.map +1 -0
- package/dist/media/contember.js +79 -0
- package/dist/media/errors.d.ts.map +1 -0
- package/dist/media/errors.js +22 -0
- package/dist/{types/media → media}/file-system.d.ts +1 -1
- package/dist/media/file-system.d.ts.map +1 -0
- package/dist/media/file-system.js +124 -0
- package/dist/{types/media → media}/index.d.ts +8 -8
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +8 -0
- package/dist/media/local.d.ts.map +1 -0
- package/dist/media/local.js +209 -0
- package/dist/media/mime.d.ts.map +1 -0
- package/dist/media/mime.js +21 -0
- package/dist/media/names.d.ts.map +1 -0
- package/dist/media/names.js +23 -0
- package/dist/{types/media → media}/project-images.d.ts +1 -1
- package/dist/media/project-images.d.ts.map +1 -0
- package/dist/media/project-images.js +99 -0
- package/dist/media/s3.d.ts.map +1 -0
- package/dist/media/s3.js +160 -0
- package/dist/media/type-filter.d.ts.map +1 -0
- package/dist/media/type-filter.js +164 -0
- package/dist/{types/portable.d.ts → portable.d.ts} +25 -25
- package/dist/portable.d.ts.map +1 -0
- package/dist/portable.js +27 -0
- package/dist/{types/project-config-ast.d.ts → project-config-ast.d.ts} +1 -1
- package/dist/project-config-ast.d.ts.map +1 -0
- package/dist/project-config-ast.js +324 -0
- package/dist/public-static-file.d.ts.map +1 -0
- package/dist/public-static-file.js +40 -0
- package/dist/redirects.d.ts.map +1 -0
- package/dist/redirects.js +185 -0
- package/dist/route-scan.d.ts.map +1 -0
- package/dist/route-scan.js +23 -0
- package/dist/schema-port.d.ts.map +1 -0
- package/dist/schema-port.js +30 -0
- package/dist/{types/schema-probe.d.ts → schema-probe.d.ts} +2 -2
- package/dist/schema-probe.d.ts.map +1 -0
- package/dist/schema-probe.js +119 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +163 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +12 -12
- package/src/check-entries.ts +4 -4
- package/src/check-live.ts +4 -4
- package/src/check-shape.ts +5 -5
- package/src/check-write.ts +6 -6
- package/src/check.ts +15 -9
- package/src/collection-scanner.ts +3 -3
- package/src/component-registry.ts +1 -1
- package/src/content-config-ast.ts +1 -1
- package/src/core.ts +8 -8
- package/src/editor-write-model.ts +1 -1
- package/src/fs/node-fs.ts +2 -2
- package/src/fs/staged.ts +6 -3
- package/src/handlers/entry-ops.ts +7 -7
- package/src/handlers/page-ops.ts +2 -2
- package/src/handlers/redirect-ops.ts +2 -2
- package/src/index.ts +4 -4
- package/src/media/contember.ts +1 -1
- package/src/media/file-system.ts +4 -4
- package/src/media/index.ts +8 -8
- package/src/media/local.ts +3 -3
- package/src/media/project-images.ts +2 -2
- package/src/media/s3.ts +3 -3
- package/src/portable.ts +25 -25
- package/src/project-config-ast.ts +1 -1
- package/src/route-scan.ts +1 -1
- package/src/schema-probe.ts +2 -2
- package/src/tsconfig.json +5 -1
- package/dist/types/asset-paths.d.ts.map +0 -1
- package/dist/types/astro-source-analysis.d.ts.map +0 -1
- package/dist/types/byte-range.d.ts.map +0 -1
- package/dist/types/check-entries.d.ts.map +0 -1
- package/dist/types/check-live.d.ts.map +0 -1
- package/dist/types/check-shape.d.ts.map +0 -1
- package/dist/types/check-write.d.ts.map +0 -1
- package/dist/types/check.d.ts.map +0 -1
- package/dist/types/collection-scanner.d.ts.map +0 -1
- package/dist/types/component-registry.d.ts.map +0 -1
- package/dist/types/content-config-ast.d.ts.map +0 -1
- package/dist/types/core.d.ts.map +0 -1
- package/dist/types/editor-write-model.d.ts.map +0 -1
- package/dist/types/fs/glob.d.ts.map +0 -1
- package/dist/types/fs/node-fs.d.ts.map +0 -1
- package/dist/types/fs/staged.d.ts.map +0 -1
- package/dist/types/fs/types.d.ts.map +0 -1
- package/dist/types/handlers/entry-ops.d.ts.map +0 -1
- package/dist/types/handlers/page-ops.d.ts.map +0 -1
- package/dist/types/handlers/redirect-ops.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/media/contember.d.ts.map +0 -1
- package/dist/types/media/errors.d.ts.map +0 -1
- package/dist/types/media/file-system.d.ts.map +0 -1
- package/dist/types/media/index.d.ts.map +0 -1
- package/dist/types/media/local.d.ts.map +0 -1
- package/dist/types/media/mime.d.ts.map +0 -1
- package/dist/types/media/names.d.ts.map +0 -1
- package/dist/types/media/project-images.d.ts.map +0 -1
- package/dist/types/media/s3.d.ts.map +0 -1
- package/dist/types/media/type-filter.d.ts.map +0 -1
- package/dist/types/portable.d.ts.map +0 -1
- package/dist/types/project-config-ast.d.ts.map +0 -1
- package/dist/types/public-static-file.d.ts.map +0 -1
- package/dist/types/redirects.d.ts.map +0 -1
- package/dist/types/route-scan.d.ts.map +0 -1
- package/dist/types/schema-port.d.ts.map +0 -1
- package/dist/types/schema-probe.d.ts.map +0 -1
- package/dist/types/shared.d.ts.map +0 -1
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- /package/dist/{types/asset-paths.d.ts → asset-paths.d.ts} +0 -0
- /package/dist/{types/astro-source-analysis.d.ts → astro-source-analysis.d.ts} +0 -0
- /package/dist/{types/byte-range.d.ts → byte-range.d.ts} +0 -0
- /package/dist/{types/editor-write-model.d.ts → editor-write-model.d.ts} +0 -0
- /package/dist/{types/fs → fs}/glob.d.ts +0 -0
- /package/dist/{types/fs → fs}/types.d.ts +0 -0
- /package/dist/{types/media → media}/contember.d.ts +0 -0
- /package/dist/{types/media → media}/errors.d.ts +0 -0
- /package/dist/{types/media → media}/local.d.ts +0 -0
- /package/dist/{types/media → media}/mime.d.ts +0 -0
- /package/dist/{types/media → media}/names.d.ts +0 -0
- /package/dist/{types/media → media}/s3.d.ts +0 -0
- /package/dist/{types/media → media}/type-filter.d.ts +0 -0
- /package/dist/{types/public-static-file.d.ts → public-static-file.d.ts} +0 -0
- /package/dist/{types/redirects.d.ts → redirects.d.ts} +0 -0
- /package/dist/{types/route-scan.d.ts → route-scan.d.ts} +0 -0
- /package/dist/{types/schema-port.d.ts → schema-port.d.ts} +0 -0
- /package/dist/{types/shared.d.ts → shared.d.ts} +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { globToRegExp } from "./glob.js";
|
|
3
|
+
export class CmsCommitConflictError extends Error {
|
|
4
|
+
paths;
|
|
5
|
+
constructor(paths) {
|
|
6
|
+
super(`Changed since the edit read them: ${paths.join(', ')}`);
|
|
7
|
+
this.paths = paths;
|
|
8
|
+
this.name = 'CmsCommitConflictError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** `sha256:<hex>` of the bytes; for UTF-8 text, the same value the sidecar reports as a source hash. */
|
|
12
|
+
export function digestBytes(content) {
|
|
13
|
+
return `sha256:${createHash('sha256').update(content).digest('hex')}`;
|
|
14
|
+
}
|
|
15
|
+
/** Root-relative, no leading slash, no `.` segments: one spelling per file, so a staged write is found again. */
|
|
16
|
+
function normalize(path) {
|
|
17
|
+
const segments = [];
|
|
18
|
+
for (const segment of path.split('/')) {
|
|
19
|
+
if (segment === '' || segment === '.')
|
|
20
|
+
continue;
|
|
21
|
+
if (segment === '..' && segments.length > 0 && segments.at(-1) !== '..')
|
|
22
|
+
segments.pop();
|
|
23
|
+
else
|
|
24
|
+
segments.push(segment);
|
|
25
|
+
}
|
|
26
|
+
return segments.join('/');
|
|
27
|
+
}
|
|
28
|
+
function isBelow(path, dir) {
|
|
29
|
+
return dir === '' || path.startsWith(`${dir}/`);
|
|
30
|
+
}
|
|
31
|
+
function missing(path) {
|
|
32
|
+
return Object.assign(new Error(`ENOENT: no such file, '${path}'`), { code: 'ENOENT' });
|
|
33
|
+
}
|
|
34
|
+
export function createStagedFileSystem(base) {
|
|
35
|
+
const reads = new Map();
|
|
36
|
+
const staged = new Map();
|
|
37
|
+
const encoder = new TextEncoder();
|
|
38
|
+
const decoder = new TextDecoder();
|
|
39
|
+
/** Keeps the first version seen, except that content read later sharpens a bare `present`. */
|
|
40
|
+
function observe(path, version) {
|
|
41
|
+
const recorded = reads.get(path);
|
|
42
|
+
if (recorded === undefined || (recorded.kind === 'present' && version.kind === 'content'))
|
|
43
|
+
reads.set(path, version);
|
|
44
|
+
}
|
|
45
|
+
/** A path changed without its content read first is fenced on its content from the moment it is changed. */
|
|
46
|
+
async function observeBeforeChange(path) {
|
|
47
|
+
if (staged.has(path))
|
|
48
|
+
return;
|
|
49
|
+
const recorded = reads.get(path);
|
|
50
|
+
if (recorded !== undefined && recorded.kind !== 'present')
|
|
51
|
+
return;
|
|
52
|
+
observe(path, await versionOf(base, path));
|
|
53
|
+
}
|
|
54
|
+
async function readBytes(rawPath) {
|
|
55
|
+
const path = normalize(rawPath);
|
|
56
|
+
const change = staged.get(path);
|
|
57
|
+
if (change === null)
|
|
58
|
+
throw missing(path);
|
|
59
|
+
if (change !== undefined)
|
|
60
|
+
return change.content.slice();
|
|
61
|
+
try {
|
|
62
|
+
const content = await base.readBytes(path);
|
|
63
|
+
observe(path, { kind: 'content', digest: digestBytes(content) });
|
|
64
|
+
return content;
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (!(await base.exists(path)))
|
|
68
|
+
observe(path, { kind: 'absent' });
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async function write(rawPath, content) {
|
|
73
|
+
const path = normalize(rawPath);
|
|
74
|
+
await observeBeforeChange(path);
|
|
75
|
+
staged.set(path, { content: content.slice(), mtimeMs: Date.now() });
|
|
76
|
+
}
|
|
77
|
+
async function remove(rawPath) {
|
|
78
|
+
const path = normalize(rawPath);
|
|
79
|
+
await observeBeforeChange(path);
|
|
80
|
+
staged.set(path, null);
|
|
81
|
+
}
|
|
82
|
+
function stagedBelow(dir) {
|
|
83
|
+
return [...staged].filter(([path, change]) => change !== null && isBelow(path, dir)).map(([path]) => path);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
async readFile(path) {
|
|
87
|
+
return decoder.decode(await readBytes(path));
|
|
88
|
+
},
|
|
89
|
+
readBytes,
|
|
90
|
+
writeFile(path, content) {
|
|
91
|
+
return write(path, encoder.encode(content));
|
|
92
|
+
},
|
|
93
|
+
writeBytes: write,
|
|
94
|
+
async rename(from, to) {
|
|
95
|
+
const content = await readBytes(from);
|
|
96
|
+
await remove(from);
|
|
97
|
+
await write(to, content);
|
|
98
|
+
},
|
|
99
|
+
remove,
|
|
100
|
+
async exists(rawPath) {
|
|
101
|
+
const path = normalize(rawPath);
|
|
102
|
+
const change = staged.get(path);
|
|
103
|
+
if (change !== undefined)
|
|
104
|
+
return change !== null;
|
|
105
|
+
if (stagedBelow(path).length > 0)
|
|
106
|
+
return true;
|
|
107
|
+
const exists = await base.exists(path);
|
|
108
|
+
observe(path, exists ? { kind: 'present' } : { kind: 'absent' });
|
|
109
|
+
return exists;
|
|
110
|
+
},
|
|
111
|
+
async list(rawDir) {
|
|
112
|
+
const dir = normalize(rawDir);
|
|
113
|
+
const entries = new Map((await base.list(dir)).map(entry => [entry.name, entry.isDirectory]));
|
|
114
|
+
for (const [path, change] of staged) {
|
|
115
|
+
if (!isBelow(path, dir))
|
|
116
|
+
continue;
|
|
117
|
+
const rest = dir === '' ? path : path.slice(dir.length + 1);
|
|
118
|
+
const [name, ...deeper] = rest.split('/');
|
|
119
|
+
if (name === undefined)
|
|
120
|
+
continue;
|
|
121
|
+
if (deeper.length > 0) {
|
|
122
|
+
if (change !== null)
|
|
123
|
+
entries.set(name, true);
|
|
124
|
+
}
|
|
125
|
+
else if (change === null) {
|
|
126
|
+
entries.delete(name);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
entries.set(name, false);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return [...entries].map(([name, isDirectory]) => ({ name, isDirectory }));
|
|
133
|
+
},
|
|
134
|
+
async glob(pattern, options) {
|
|
135
|
+
const matcher = globToRegExp(pattern);
|
|
136
|
+
const files = new Set(await base.glob(pattern, options));
|
|
137
|
+
for (const [path, change] of staged) {
|
|
138
|
+
if (change === null)
|
|
139
|
+
files.delete(path);
|
|
140
|
+
else if (matcher.test(path))
|
|
141
|
+
files.add(path);
|
|
142
|
+
}
|
|
143
|
+
return [...files];
|
|
144
|
+
},
|
|
145
|
+
async stat(rawPath) {
|
|
146
|
+
const path = normalize(rawPath);
|
|
147
|
+
const change = staged.get(path);
|
|
148
|
+
if (change === null)
|
|
149
|
+
throw missing(path);
|
|
150
|
+
if (change !== undefined)
|
|
151
|
+
return { mtimeMs: change.mtimeMs, size: change.content.byteLength };
|
|
152
|
+
const stat = await base.stat(path);
|
|
153
|
+
observe(path, { kind: 'present' });
|
|
154
|
+
return stat;
|
|
155
|
+
},
|
|
156
|
+
changeset() {
|
|
157
|
+
const changes = [...staged].map(([path, change]) => change === null ? { kind: 'remove', path } : { kind: 'write', path, content: change.content });
|
|
158
|
+
return { reads: new Map(reads), changes };
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/** The version of `path` now, in the terms {@link CmsFileVersion} records. */
|
|
163
|
+
export async function versionOf(fs, path) {
|
|
164
|
+
if (!(await fs.exists(path)))
|
|
165
|
+
return { kind: 'absent' };
|
|
166
|
+
try {
|
|
167
|
+
return { kind: 'content', digest: digestBytes(await fs.readBytes(path)) };
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
// A directory exists without content.
|
|
171
|
+
return { kind: 'present' };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** Whether a path whose version was `recorded` may be overwritten now that it is `current`. */
|
|
175
|
+
export function versionMatches(recorded, current) {
|
|
176
|
+
if (recorded.kind === 'absent')
|
|
177
|
+
return current.kind === 'absent';
|
|
178
|
+
if (recorded.kind === 'present')
|
|
179
|
+
return current.kind !== 'absent';
|
|
180
|
+
return current.kind === 'content' && current.digest === recorded.digest;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* A commit over `fs` that checks the recorded versions and then applies the changes. It is atomic
|
|
184
|
+
* only when nothing else writes to `fs` between its awaits; a host with concurrent writers does
|
|
185
|
+
* both steps inside its own critical section instead.
|
|
186
|
+
*/
|
|
187
|
+
export function commitChangeset(fs) {
|
|
188
|
+
return async ({ reads, changes }) => {
|
|
189
|
+
const conflicts = [];
|
|
190
|
+
for (const [path, recorded] of reads) {
|
|
191
|
+
if (!versionMatches(recorded, await versionOf(fs, path)))
|
|
192
|
+
conflicts.push(path);
|
|
193
|
+
}
|
|
194
|
+
if (conflicts.length > 0)
|
|
195
|
+
throw new CmsCommitConflictError(conflicts);
|
|
196
|
+
for (const change of changes) {
|
|
197
|
+
if (change.kind === 'write')
|
|
198
|
+
await fs.writeBytes(change.path, change.content);
|
|
199
|
+
else
|
|
200
|
+
await fs.remove(change.path);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fs/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EA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AC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC9D"}
|
package/dist/fs/types.js
ADDED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CollectionEntryInfo, ComponentDefinition, MutationResult } from '@nuasite/cms-types';
|
|
2
|
-
import { type ParseCache } from '../content-config-ast';
|
|
3
|
-
import type { CmsFileSystem } from '../fs/types';
|
|
2
|
+
import { type ParseCache } from '../content-config-ast.ts';
|
|
3
|
+
import type { CmsFileSystem } from '../fs/types.ts';
|
|
4
4
|
export interface GetEntryResult {
|
|
5
5
|
/** Markdown body (empty string for data collections). */
|
|
6
6
|
content: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-ops.d.ts","sourceRoot":"","sources":["../../src/handlers/entry-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAKlG,OAAO,EAAE,KAAK,UAAU,EAAwC,MAAM,0BAA0B,CAAA;AAYhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAOnD,MAAM,WAAW,cAAc;IAC9B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,aAAa,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,2EAA2E;IAC3E,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,uEAAuE;IACvE,2BAA2B,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAA;CAC/E;AAuED,4EAA4E;AAC5E,MAAM,WAAW,UAA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