cry-db 2.4.48 → 2.5.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/README.md +131 -42
- package/dist/index.d.mts +2 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mongo.d.mts +24 -0
- package/dist/mongo.d.mts.map +1 -1
- package/dist/mongo.mjs +383 -90
- package/dist/mongo.mjs.map +1 -1
- package/dist/types.d.mts +23 -0
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils.d.mts +74 -0
- package/dist/utils.d.mts.map +1 -0
- package/dist/utils.mjs +807 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,57 +148,81 @@ can both appear in a single update with one exception:
|
|
|
148
148
|
| Terminal removes only (4) | `$pull` added to the doc; `arrayFilters` still allowed for any sub-field updates. |
|
|
149
149
|
| Terminal inserts (3), with or without removes (4) | Aggregation pipeline with a unified `$filter + $concatArrays` stage per parent field. Inserts are idempotent (re-inserting the same `_id` replaces the element). |
|
|
150
150
|
| Terminal inserts **and** sub-field updates on the same parent array | Single pipeline: `$filter + $concatArrays` produces the post-insert array, then a per-`_id` `$switch + $mergeObjects` overlay applies the sub-field updates LAST. Same-id insert + sub-field update yields an element with the insert as its base and the sub-field update overriding matching fields. |
|
|
151
|
-
| Terminal inserts **and** a NESTED-bracket sub-field path (`arr[A].sub[B].field`) | The NESTED-bracket path is **dropped** (mongo forbids `arrayFilters` on pipelines) and surfaced as a warning. The rest of the update proceeds. See *Nested brackets* below. |
|
|
152
151
|
|
|
153
|
-
####
|
|
152
|
+
#### Nested brackets (multi-level)
|
|
154
153
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
terminal-bracket
|
|
160
|
-
|
|
154
|
+
Bracket paths can chain to arbitrary depth — `arr[A].sub[B].field`,
|
|
155
|
+
`arr[A].sub[B]`, `arr[A].sub[B] = undefined`, and so on are all
|
|
156
|
+
supported. Pure sub-field nested updates take the `arrayFilters` fast
|
|
157
|
+
path (mongo's native nested positional support). When combined with a
|
|
158
|
+
terminal-bracket insert/remove anywhere in the update, the library
|
|
159
|
+
switches to pipeline form and composes the nested transform recursively:
|
|
160
|
+
each bracket level becomes a `$filter + $concatArrays + $map/$switch`
|
|
161
|
+
stage applied inside the parent element's overlay.
|
|
161
162
|
|
|
162
163
|
```ts
|
|
163
|
-
// ✓
|
|
164
|
+
// ✓ Pure nested sub-field — arrayFilters path
|
|
164
165
|
await items.updateOne({ _id: 'r1' }, {
|
|
165
|
-
'postavke[
|
|
166
|
+
'terapije[t1].postavke[sp2].kolicina': 99,
|
|
166
167
|
});
|
|
167
168
|
|
|
168
|
-
// ✓
|
|
169
|
+
// ✓ Nested sub-field + nested terminal insert (different ids) — pipeline path
|
|
169
170
|
await items.updateOne({ _id: 'r1' }, {
|
|
170
|
-
'postavke[
|
|
171
|
-
|
|
171
|
+
'terapije[t1].postavke[sp2].kolicina': 99,
|
|
172
|
+
"terapije[t1].postavke[sp3]": [{ _id: 'sp3', kolicina: 5 }],
|
|
172
173
|
});
|
|
173
174
|
|
|
174
|
-
//
|
|
175
|
+
// ✓ Combined with top-level operations
|
|
175
176
|
await items.updateOne({ _id: 'r1' }, {
|
|
176
|
-
'terapije[t1].postavke[sp2].kolicina': 99,
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// ✗ NOT SUPPORTED — terminal-bracket insert/remove under a bracketed parent
|
|
181
|
-
await items.updateOne({ _id: 'r1' }, {
|
|
182
|
-
"terapije[t1].postavke['new']": [{ _id: 'new', kolicina: 1 }],
|
|
177
|
+
'terapije[t1].postavke[sp2].kolicina': 99,
|
|
178
|
+
"terapije[t1].postavke[sp3]": [{ _id: 'sp3', kolicina: 5 }],
|
|
179
|
+
"terapije[t2]": undefined, // delete outer t2
|
|
180
|
+
"terapije[t9]": [{ _id: 't9', postavke: [] }], // insert new outer t9
|
|
183
181
|
});
|
|
184
182
|
```
|
|
185
183
|
|
|
186
|
-
|
|
184
|
+
**Order of effects within one update:**
|
|
187
185
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
1. `$filter` removes elements whose `_id` is in any `removeIds` for that level.
|
|
187
|
+
2. `$concatArrays` appends terminal-bracket-inserted elements at the end.
|
|
188
|
+
3. `$map + $switch` applies sub-field overlays in-place on matching ids.
|
|
189
|
+
4. Nested array transforms inside the overlay are wrapped in `$cond:
|
|
190
|
+
$isArray(<path>)` — when the operation is removes-only on a missing
|
|
191
|
+
nested array, the field is NOT created. (Matches mongo's native
|
|
192
|
+
"$pull on missing field = no-op" semantic.)
|
|
191
193
|
|
|
192
|
-
|
|
194
|
+
**Same-id overlap:** when a nested "new base" operation and a nested
|
|
195
|
+
sub-field update target the SAME element (same `_id` at the inner
|
|
196
|
+
level), both apply — the new-base value is set first, sub-field
|
|
197
|
+
overlay applies on top. A `kind: 'overlap'` warning is emitted so the
|
|
198
|
+
unusual overlap is visible to the caller.
|
|
193
199
|
|
|
194
|
-
|
|
200
|
+
Two flavors trigger the warning:
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
// Flavor 1: terminal-array insert + sub-field on same id.
|
|
204
|
+
await items.updateOne({ _id: 'r1' }, {
|
|
205
|
+
'terapije[t1].postavke[sp1].kolicina': 99,
|
|
206
|
+
"terapije[t1].postavke[sp1]": [{ _id: 'sp1', q: 5 }],
|
|
207
|
+
});
|
|
208
|
+
// final sp1: { _id: 'sp1', q: 5, kolicina: 99 }
|
|
209
|
+
// — terminal value's `q` kept, sub-field's `kolicina` overlaid.
|
|
210
|
+
// — original sp1 fields (not in terminal value) are dropped.
|
|
195
211
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
212
|
+
// Flavor 2: whole-element replace (object value, not array) + sub-field.
|
|
213
|
+
await items.updateOne({ _id: 'r1' }, {
|
|
214
|
+
'terapije[t1].postavke[sp1].kolicina': 99,
|
|
215
|
+
"terapije[t1].postavke[sp1]": { _id: 'sp1', q: 5 },
|
|
216
|
+
});
|
|
217
|
+
// final sp1: identical to Flavor 1 above.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Both flavors emit `result.results.warnings[0].error` matching
|
|
221
|
+
`/same-id|overlap/i`.
|
|
222
|
+
|
|
223
|
+
The top-level same-id case is the same semantic (insert/replace +
|
|
224
|
+
sub-field on the same outer `_id`) but is silent — it's a documented
|
|
225
|
+
merge pattern, not an overlap warning.
|
|
202
226
|
|
|
203
227
|
### Delete
|
|
204
228
|
|
|
@@ -229,15 +253,22 @@ const results = await mongo.updateCollections([
|
|
|
229
253
|
collection: 'users',
|
|
230
254
|
batch: {
|
|
231
255
|
updates: [
|
|
232
|
-
{ _id: id1, update: { name: 'Alice' } },
|
|
233
|
-
{ _id: id2, update: { name: 'Bob' } },
|
|
256
|
+
{ _id: id1, _rev: 4, update: { name: 'Alice' } },
|
|
257
|
+
{ _id: id2, _rev: 1, update: { name: 'Bob' } },
|
|
234
258
|
],
|
|
235
|
-
deletes: [{ _id: id3 }],
|
|
259
|
+
deletes: [{ _id: id3, _rev: 2 }],
|
|
236
260
|
},
|
|
237
261
|
}],
|
|
238
262
|
]);
|
|
239
263
|
```
|
|
240
264
|
|
|
265
|
+
Each `updates`/`deletes` entry carries `_rev` — the revision the client's
|
|
266
|
+
change was computed against. The server uses it to detect concurrent
|
|
267
|
+
external writes and to surface server-resolved fields (see `mustRefresh`
|
|
268
|
+
below). Do **not** put `_rev` inside `update` (it is stripped). Omitting
|
|
269
|
+
`_rev` is treated as `0`, which forces a full-record refresh — the
|
|
270
|
+
old-client fallback.
|
|
271
|
+
|
|
241
272
|
**Partial-failure semantics**: per-record failures inside `updates` or
|
|
242
273
|
`deletes` are **caught**, surfaced in `result.results.errors`, and do
|
|
243
274
|
not stop the rest of the batch. Each `findOneAndUpdate` /
|
|
@@ -259,18 +290,53 @@ land in `errors` and the batch keeps going. Infrastructure failures
|
|
|
259
290
|
exception.
|
|
260
291
|
|
|
261
292
|
```ts
|
|
262
|
-
results[0].results.inserted
|
|
263
|
-
results[0].results.updated
|
|
264
|
-
results[0].results.deleted
|
|
265
|
-
results[0].results.
|
|
266
|
-
results[0].results.
|
|
267
|
-
|
|
293
|
+
results[0].results.inserted // DbEntity[] — records actually upserted as new
|
|
294
|
+
results[0].results.updated // DbEntity[] — records actually updated
|
|
295
|
+
results[0].results.deleted // DbEntity[] — records actually deleted
|
|
296
|
+
results[0].results.mustRefresh // (DbEntity & full record)[] — see below
|
|
297
|
+
results[0].results.errors // { _id, error }[] — per-record failures (omitted if none)
|
|
298
|
+
results[0].results.warnings // { _id, error }[] — non-fatal issues (e.g. dropped
|
|
299
|
+
// NESTED-bracket paths; omitted if none)
|
|
268
300
|
```
|
|
269
301
|
|
|
270
302
|
`errors` and `warnings` are **arrays** — one entry per affected record.
|
|
271
303
|
Both fields are omitted when empty. The call itself does not throw on
|
|
272
304
|
per-record failures; check `.errors.length` to detect them.
|
|
273
305
|
|
|
306
|
+
#### `mustRefresh` — records the client must re-adopt
|
|
307
|
+
|
|
308
|
+
The `inserted`/`updated`/`deleted` arrays carry only `{_id,_ts,_rev}`, so a
|
|
309
|
+
client that relied on them alone never learned what cry-db changed beyond
|
|
310
|
+
the diff it sent. `mustRefresh` closes that: it holds the **full, sanitized
|
|
311
|
+
post-write record** for any entry where the client's local copy is now
|
|
312
|
+
stale. A record lands in `mustRefresh` when:
|
|
313
|
+
|
|
314
|
+
- cry-db **resolved a field** the client sent as a placeholder — `SEQ_*`
|
|
315
|
+
(auto-increment) or `__hashed__*` (hashing); or
|
|
316
|
+
- the stored `_rev` **advanced beyond the client's base `_rev`** by more than
|
|
317
|
+
this write applied — i.e. another actor modified the record first
|
|
318
|
+
(conflict); or
|
|
319
|
+
- the request **omitted `_rev`** (old-client fallback — always refresh).
|
|
320
|
+
|
|
321
|
+
Contract:
|
|
322
|
+
|
|
323
|
+
- Every `mustRefresh._id` **also** appears in `inserted`/`updated`/`deleted`,
|
|
324
|
+
so dirty-clearing logic that keys off those arrays is unaffected — treat
|
|
325
|
+
`mustRefresh` as supplementary.
|
|
326
|
+
- Records are **full and sanitized**: `__hashed__*` values are never
|
|
327
|
+
included (the client adopting the record drops any local plaintext), and
|
|
328
|
+
`removeFieldsAlways`/`findNewerRemoveFields` are applied as on reads.
|
|
329
|
+
- The client should **replace** its local record with the `mustRefresh`
|
|
330
|
+
entry, then run its own dirty-merge — apply `mustRefresh` **before** the
|
|
331
|
+
merge so unsynced local edits to other fields are reconciled rather than
|
|
332
|
+
clobbered.
|
|
333
|
+
- Conflict detection requires `useRevisions()`. Field-resolution refresh
|
|
334
|
+
(SEQ/hash) works regardless of revisions.
|
|
335
|
+
|
|
336
|
+
> **Consumers** (e.g. `cry-synced-db-client`): send `_rev` per update/delete
|
|
337
|
+
> and apply `mustRefresh` on the response. The `applyObjDiff`/`computeObjDiff`
|
|
338
|
+
> helpers (also exported from this package) can drive the local replace.
|
|
339
|
+
|
|
274
340
|
## Features
|
|
275
341
|
|
|
276
342
|
### Revisions
|
|
@@ -512,6 +578,29 @@ users.removeFieldsAlways('secret,internal'); // set fields stripped f
|
|
|
512
578
|
users.removeFieldsAlways(['secret', 'internal']); // set fields stripped from ALL find* and publish
|
|
513
579
|
```
|
|
514
580
|
|
|
581
|
+
## Diff Utilities
|
|
582
|
+
|
|
583
|
+
Pure, mongo-independent helpers for computing and replaying document diffs,
|
|
584
|
+
exported from the package root. They are the server-side counterpart of the
|
|
585
|
+
cry-synced-db-client diff machinery (`computeObjDiff` / `applyObjDiff`).
|
|
586
|
+
|
|
587
|
+
```ts
|
|
588
|
+
import { computeObjDiff, applyObjDiff } from 'cry-db';
|
|
589
|
+
|
|
590
|
+
// Minimal MongoDB-style dot/bracket paths between two documents (only keys
|
|
591
|
+
// present in `update`). Arrays of `_id`-keyed objects diff element-wise via
|
|
592
|
+
// `arr[<id>].field`, with composition changes as `arr[<id>] = [el]` /
|
|
593
|
+
// `arr[<id>] = undefined`. `_ts`/`_rev`/`_csq` are never emitted.
|
|
594
|
+
const diff = computeObjDiff(existing, update);
|
|
595
|
+
// → { "koraki[k1].diag": "new", "koraki[k2]": [{ _id: "k2", ... }] }
|
|
596
|
+
|
|
597
|
+
// Replay a diff onto a base document the way a server-side `$set`+`$unset`
|
|
598
|
+
// would. Returns a fresh object (base is cloned, never mutated). Bracket
|
|
599
|
+
// paths whose parent array is missing are materialized; unrepresentable
|
|
600
|
+
// multi-bracket paths are dropped (logged unless the root field starts `_`).
|
|
601
|
+
const merged = applyObjDiff(base, diff, fallbackId, collection);
|
|
602
|
+
```
|
|
603
|
+
|
|
515
604
|
## Environment Variables
|
|
516
605
|
|
|
517
606
|
| Variable | Default | Description |
|
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { Base } from './base.mjs';
|
|
|
3
3
|
import { Mongo, fj } from './mongo.mjs';
|
|
4
4
|
import { Repo } from './repo.mjs';
|
|
5
5
|
import { Db } from './db.mjs';
|
|
6
|
-
|
|
6
|
+
import { computeObjDiff, applyObjDiff } from './utils.mjs';
|
|
7
|
+
export { Types, Base, Mongo, Repo, Db, fj, computeObjDiff, applyObjDiff, };
|
|
7
8
|
export type { DbChannel, DbRevChannel } from './types.mjs';
|
|
8
9
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAO,aAAa,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EACH,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,EAAE,EACF,EAAE,EACF,cAAc,EACd,YAAY,GACf,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// AI modified: 2026-05-21 (export computeObjDiff / applyObjDiff from ./utils.mjs)
|
|
1
2
|
import * as Types from './types.mjs';
|
|
2
3
|
import { Base } from './base.mjs';
|
|
3
4
|
import { Mongo, fj } from './mongo.mjs';
|
|
4
5
|
import { Repo } from './repo.mjs';
|
|
5
6
|
import { Db } from './db.mjs';
|
|
6
|
-
|
|
7
|
+
import { computeObjDiff, applyObjDiff } from './utils.mjs';
|
|
8
|
+
export { Types, Base, Mongo, Repo, Db, fj, computeObjDiff, applyObjDiff, };
|
|
7
9
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAO,aAAa,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,KAAK,KAAK,MAAO,aAAa,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EACH,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,EAAE,EACF,EAAE,EACF,cAAc,EACd,YAAY,GACf,CAAA"}
|
package/dist/mongo.d.mts
CHANGED
|
@@ -233,6 +233,15 @@ export declare class Mongo extends Db {
|
|
|
233
233
|
* (`{ "arr[id]": v }`) or already wrapped in `$set`/`$unset`/etc.
|
|
234
234
|
*/
|
|
235
235
|
private _buildPublishDelta;
|
|
236
|
+
/**
|
|
237
|
+
* Build a `mustRefresh` entry: a full, sanitized clone of the post-write
|
|
238
|
+
* document the client must adopt locally. Sanitization strips `__hashed__`
|
|
239
|
+
* (the hash never leaves the server), other `__`-internal keys, and the
|
|
240
|
+
* configured `findNewerRemoveFields`/`removeFieldsAlways` — matching what a
|
|
241
|
+
* read/publish exposes. `_id`/`_rev`/`_ts` are preserved. Clones first so
|
|
242
|
+
* the caller's `res.value`/`res` is left intact for the publish payload.
|
|
243
|
+
*/
|
|
244
|
+
private _buildMustRefreshRecord;
|
|
236
245
|
private _shouldAuditCollection;
|
|
237
246
|
private _publishAndAudit;
|
|
238
247
|
private _makeDataPublication;
|
|
@@ -409,6 +418,18 @@ export declare class Mongo extends Db {
|
|
|
409
418
|
* `undefined` if no extractable paths were present.
|
|
410
419
|
*/
|
|
411
420
|
private _extractArraySubFieldUpdates;
|
|
421
|
+
/**
|
|
422
|
+
* Build the filter + concat + map+switch expression that transforms an
|
|
423
|
+
* array according to a FieldOps spec. Used both at the top level (in
|
|
424
|
+
* `_applyBracketProcessing`'s main pipeline) and recursively from
|
|
425
|
+
* `_buildElementMergeExpr` to compose nested-array transformations
|
|
426
|
+
* inside an element overlay.
|
|
427
|
+
*
|
|
428
|
+
* `baseInputPath` is a mongo field path string (e.g. `"$koraki"` for
|
|
429
|
+
* top-level, `"$$el.postavke"` for nested). It MUST be a string so the
|
|
430
|
+
* generated expression can read the existing array via `$ifNull`.
|
|
431
|
+
*/
|
|
432
|
+
private static _buildArrayTransformExpr;
|
|
412
433
|
/**
|
|
413
434
|
* Build an aggregation expression that produces a transformed copy of an
|
|
414
435
|
* element, applying the given sets/unsets and (optionally) a whole-element
|
|
@@ -422,6 +443,9 @@ export declare class Mongo extends Db {
|
|
|
422
443
|
* `$$REMOVE` inside `$mergeObjects` does NOT drop the field (mongo treats
|
|
423
444
|
* it as a missing value and falls through to the previous operand), so
|
|
424
445
|
* the explicit kv-filter is required.
|
|
446
|
+
* - `nestedArrayOps`: per-array-field FieldOps for nested-bracket support.
|
|
447
|
+
* Each entry produces a `$mergeObjects` overlay that replaces the named
|
|
448
|
+
* field with the recursive output of `_buildArrayTransformExpr`.
|
|
425
449
|
*
|
|
426
450
|
* The returned expression is suitable as the `in:` argument of `$map`.
|
|
427
451
|
*/
|
package/dist/mongo.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongo.d.mts","sourceRoot":"","sources":["../src/mongo.mts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAwB,gBAAgB,EAAE,aAAa,EAAiB,eAAe,EAA2B,WAAW,EAAyC,SAAS,EAA6B,MAAM,SAAS,CAAC;AAE/O,OAAO,EAAE,EAAE,EAAO,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,uBAAuB,EAAE,sBAAsB,EAAqC,MAAM,EAA8B,YAAY,EAAE,EAAE,EAAE,UAAU,EAAe,UAAU,EAAkB,kBAAkB,EAAO,UAAU,EAAuR,SAAS,EAAE,SAAS,EAA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