@prisma-idb/client-idb 0.11.0 → 0.13.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.
Files changed (37) hide show
  1. package/README.md +6 -0
  2. package/dist/client-auto.d.mts +2 -2
  3. package/dist/client-auto.d.mts.map +1 -1
  4. package/dist/client-auto.mjs +44 -3
  5. package/dist/client-auto.mjs.map +1 -1
  6. package/dist/client.d.mts +3 -2
  7. package/dist/client.mjs +3 -2
  8. package/dist/decimal-identity-D_1J9lPN.d.mts +21 -0
  9. package/dist/decimal-identity-D_1J9lPN.d.mts.map +1 -0
  10. package/dist/internal.d.mts +5 -4
  11. package/dist/internal.d.mts.map +1 -1
  12. package/dist/internal.mjs +2 -2
  13. package/dist/{managed-client-CxlNmERd.mjs → managed-client-DMk8ERfX.mjs} +12 -5
  14. package/dist/managed-client-DMk8ERfX.mjs.map +1 -0
  15. package/dist/{managed-client-CS78EjPu.d.mts → managed-client-eksFK4UF.d.mts} +32 -3
  16. package/dist/managed-client-eksFK4UF.d.mts.map +1 -0
  17. package/dist/mutation-executor-IuJmyWEG.mjs +2132 -0
  18. package/dist/mutation-executor-IuJmyWEG.mjs.map +1 -0
  19. package/dist/{executor-Bp-hdRg2.d.mts → mutation-scope-CE3GMR4X.d.mts} +79 -28
  20. package/dist/mutation-scope-CE3GMR4X.d.mts.map +1 -0
  21. package/dist/{idb-orm-BitJ-EMq.mjs → orm-transaction-BGx1eukw.mjs} +366 -558
  22. package/dist/orm-transaction-BGx1eukw.mjs.map +1 -0
  23. package/dist/{idb-orm-9XN3c9ly.d.mts → orm-transaction-B_ZJ92uY.d.mts} +40 -7
  24. package/dist/orm-transaction-B_ZJ92uY.d.mts.map +1 -0
  25. package/dist/orm.d.mts +13 -4
  26. package/dist/orm.d.mts.map +1 -1
  27. package/dist/orm.mjs +3 -3
  28. package/package.json +9 -9
  29. package/dist/executor-Bp-hdRg2.d.mts.map +0 -1
  30. package/dist/idb-orm-9XN3c9ly.d.mts.map +0 -1
  31. package/dist/idb-orm-BitJ-EMq.mjs.map +0 -1
  32. package/dist/managed-client-CS78EjPu.d.mts.map +0 -1
  33. package/dist/managed-client-CxlNmERd.mjs.map +0 -1
  34. package/dist/mutation-executor-SJqTuSbb.mjs +0 -1196
  35. package/dist/mutation-executor-SJqTuSbb.mjs.map +0 -1
  36. package/dist/mutation-scope-1hS0ogGa.d.mts +0 -33
  37. package/dist/mutation-scope-1hS0ogGa.d.mts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { AsyncIterableResult } from "@prisma/orm-framework/components/runtime";
2
- import { IdbQueryPlan } from "@prisma-idb/adapter-idb/runtime";
3
2
  import { Contract, ContractModelBase, ContractReferenceRelation } from "@prisma/orm-framework/contract/types";
4
- import { keyEquals as keyEquals$1, keyToken } from "@prisma-idb/target-idb/runtime";
3
+ import { IdbTransactionScope } from "@prisma-idb/driver-idb/runtime";
4
+ import { keyEquals as keyEquals$1, keyToken as keyToken$1 } from "@prisma-idb/target-idb/runtime";
5
+ import { IdbQueryPlan } from "@prisma-idb/adapter-idb/runtime";
5
6
  import { ExtractIdbFieldInputTypes, ExtractIdbFieldOutputTypes, IdbKeyPath, IdbStorage } from "@prisma-idb/target-idb/pack";
6
7
  //#region src/core/types.d.ts
7
8
  /**
8
9
  * Extract the model map from a contract by traversing the domain namespace.
9
10
  *
10
- * 0.14.0: `Contract` dropped the 2nd `TModels` type parameter; models are now
11
- * accessed via `domain.namespaces[ns].models`. For a single-namespace contract
12
- * (the only IDB case) this resolves to the typed model map; falls back to
11
+ * Models live under `domain.namespaces[ns].models`. For a single-namespace
12
+ * contract this resolves to the typed model map; falls back to
13
13
  * `Record<string, ContractModelBase>` for un-typed/multi-namespace inputs.
14
14
  */
15
15
  type ModelsOf<TContract> = TContract extends {
@@ -37,6 +37,7 @@ type IdbContract = Contract<IdbStorage>;
37
37
  * `IdbContract` or when the model name is not in the type maps).
38
38
  */
39
39
  type NsFieldOutputTypes<TContract> = ExtractIdbFieldOutputTypes<TContract>[keyof ExtractIdbFieldOutputTypes<TContract>];
40
+ /** Resolve a model output row when type maps bind it, or keep an untyped record. */
40
41
  type ResolvedOutputRow<TContract, ModelName extends string> = string extends keyof ExtractIdbFieldOutputTypes<TContract> ? Record<string, unknown> : NsFieldOutputTypes<TContract> extends Record<string, unknown> ? ModelName extends keyof NsFieldOutputTypes<TContract> ? { -readonly [K in keyof NsFieldOutputTypes<TContract>[ModelName]]: NsFieldOutputTypes<TContract>[ModelName][K]; } : Record<string, unknown> : Record<string, unknown>;
41
42
  /**
42
43
  * Resolve the input row type for a model from the contract's type maps.
@@ -45,6 +46,7 @@ type ResolvedOutputRow<TContract, ModelName extends string> = string extends key
45
46
  * used for `create()`, `where()`, and mutation payloads.
46
47
  */
47
48
  type NsFieldInputTypes<TContract> = ExtractIdbFieldInputTypes<TContract>[keyof ExtractIdbFieldInputTypes<TContract>];
49
+ /** Resolve a model input row from its bound input type map. */
48
50
  type ResolvedInputRow<TContract, ModelName extends string> = string extends keyof ExtractIdbFieldInputTypes<TContract> ? Record<string, unknown> : NsFieldInputTypes<TContract> extends Record<string, unknown> ? ModelName extends keyof NsFieldInputTypes<TContract> ? { -readonly [K in keyof NsFieldInputTypes<TContract>[ModelName]]: NsFieldInputTypes<TContract>[ModelName][K]; } : Record<string, unknown> : Record<string, unknown>;
49
51
  /** The full TypeScript row shape returned by `all()`, `first()`, and `create()`. */
50
52
  type DefaultModelRow<TContract, ModelName extends string> = ResolvedOutputRow<TContract, ModelName>;
@@ -58,7 +60,7 @@ type DefaultModelRow<TContract, ModelName extends string> = ResolvedOutputRow<TC
58
60
  type WhereFilter<TContract, ModelName extends string> = { readonly [K in keyof DefaultModelRow<TContract, ModelName>]?: DefaultModelRow<TContract, ModelName>[K]; };
59
61
  /**
60
62
  * The union of a model's `keyPath` field name(s), extracted from
61
- * `contract.models[ModelName].storage.keyPath`. For a single-field key this
63
+ * the domain model's `storage.keyPath`. For a single-field key this
62
64
  * is just that field name; for a compound key it's the union of every member
63
65
  * field name (NOT an ordered tuple — see {@link ModelKeyPathOrdered} for the
64
66
  * order-preserving form `KeyType` needs).
@@ -76,8 +78,8 @@ type ModelKeyPath<TContract, ModelName extends string> = ModelName extends keyof
76
78
  * normalized to a 1-tuple (`readonly ["id"]`) so `KeyType` below can branch
77
79
  * on tuple shape uniformly. Needed because `findUnique`/`delete` accept the
78
80
  * key as a positional array for compound-key models (mirroring the
79
- * `IDBValidKey` array form IDB itself expects — see ADR-tracked decision in
80
- * Phase 9.1), which requires order, unlike `ModelKeyPath`'s Omit/Pick usage.
81
+ * `IDBValidKey` array form IDB itself expects), which requires order, unlike
82
+ * `ModelKeyPath`'s Omit/Pick usage.
81
83
  */
82
84
  type ModelKeyPathOrdered<TContract, ModelName extends string> = ModelName extends keyof ModelsOf<TContract> ? ModelsOf<TContract>[ModelName] extends {
83
85
  storage: {
@@ -101,18 +103,15 @@ type IsNever<T> = [T] extends [never] ? true : false;
101
103
  /**
102
104
  * TypeScript type of the primary key parameter for `findUnique()`/`delete()`.
103
105
  *
104
- * Single-field-key models keep today's scalar shape (e.g. `string`) — no
105
- * change for the common case, and untyped/loosely-typed contracts (no
106
- * emitted type maps — `ModelKeyPathOrdered` resolves to `never`) fall
107
- * through to the exact same `IDBValidKey` fallback `KeyType` always used
108
- * before compound keys existed. Compound-key models get an ordered tuple
106
+ * Single-field keys use the field's resolved output type, such as `string`.
107
+ * Compound-key models get an ordered tuple
109
108
  * type (e.g. `[string, Date]` for `@@id([orgId, effectiveFrom])`), matching
110
109
  * the `IDBValidKey` array IDB itself expects for a compound key-get — the
111
110
  * same value passes straight through to the driver with zero runtime
112
111
  * conversion.
113
112
  */
114
113
  type KeyType<TContract, ModelName extends string> = IsNever<ModelKeyPathOrdered<TContract, ModelName>> extends true ? ModelKeyPath<TContract, ModelName> extends keyof ResolvedOutputRow<TContract, ModelName> ? ResolvedOutputRow<TContract, ModelName>[ModelKeyPath<TContract, ModelName>] : IDBValidKey : ModelKeyPathOrdered<TContract, ModelName> extends readonly [infer Single extends string] ? Single extends keyof ResolvedOutputRow<TContract, ModelName> ? ResolvedOutputRow<TContract, ModelName>[Single] : IDBValidKey : KeyTupleType<TContract, ModelName, ModelKeyPathOrdered<TContract, ModelName>>;
115
- /** The object store name for a model, extracted from `contract.domain...storage.storeName` (used to match `execution.mutations.defaults[].ref.table`). */
114
+ /** The object store name for a model, extracted from `contract.domain...storage.storeName` (used to match `execution.mutations.defaults[].ref.entry`). */
116
115
  type ModelStoreName<TContract, ModelName extends string> = ModelName extends keyof ModelsOf<TContract> ? ModelsOf<TContract>[ModelName] extends {
117
116
  readonly storage: {
118
117
  readonly storeName: infer S;
@@ -161,13 +160,25 @@ type FieldsWithCreateDefault<TContract, ModelName extends string> = Extract<Exec
161
160
  }>["ref"]["column"];
162
161
  /** {@link FieldsWithCreateDefault}, narrowed to keys that actually exist on the resolved input row (may be absent for models with no typed maps). */
163
162
  type DefaultedInputField<TContract, ModelName extends string> = FieldsWithCreateDefault<TContract, ModelName> & keyof ResolvedInputRow<TContract, ModelName>;
163
+ /**
164
+ * Keys of the resolved input row whose contract fields declare `nullable: true`.
165
+ * `create()` stores `null` for one the caller omits (`completeCreateRecord`
166
+ * in `mutation-defaults.ts`). Input types such as JSON's `unknown` can admit
167
+ * `null` even when the contract field is required.
168
+ */
169
+ type NullableInputField<TContract, ModelName extends string> = ModelName extends keyof ModelsOf<TContract> ? { [K in keyof ResolvedInputRow<TContract, ModelName>]-?: K extends keyof ModelsOf<TContract>[ModelName]["fields"] ? IsNever<ModelsOf<TContract>[ModelName]["fields"][K]> extends true ? never : ModelsOf<TContract>[ModelName]["fields"][K] extends {
170
+ readonly nullable: true;
171
+ } ? K : never : never; }[keyof ResolvedInputRow<TContract, ModelName>] : never;
172
+ /** The fields `create()` may omit: see {@link CreateInput}. */
173
+ type OmittableCreateField<TContract, ModelName extends string> = KeyPathField<TContract, ModelName> | DefaultedInputField<TContract, ModelName> | NullableInputField<TContract, ModelName>;
164
174
  /**
165
175
  * Input shape for `create()`: the full input row with an `autoIncrement`
166
- * primary key made optional (see {@link OptionalKeyPathField}), and every
167
- * field with an `onCreate` execution default — including a `uuid()`/`cuid()`
168
- * key — also made optional. Any other key field stays required.
176
+ * primary key made optional (see {@link OptionalKeyPathField}), every field
177
+ * with an `onCreate` execution default — including a `uuid()`/`cuid()` key —
178
+ * and every nullable field also made optional. Any other key field stays
179
+ * required.
169
180
  */
170
- type CreateInput<TContract, ModelName extends string> = Omit<ResolvedInputRow<TContract, ModelName>, OptionalKeyPathField<TContract, ModelName> | FieldsWithCreateDefault<TContract, ModelName>> & Partial<Pick<ResolvedInputRow<TContract, ModelName>, KeyPathField<TContract, ModelName> | DefaultedInputField<TContract, ModelName>>>;
181
+ type CreateInput<TContract, ModelName extends string> = Omit<ResolvedInputRow<TContract, ModelName>, OmittableCreateField<TContract, ModelName>> & Partial<Pick<ResolvedInputRow<TContract, ModelName>, OmittableCreateField<TContract, ModelName>>>;
171
182
  /** Extract the relations record for a model. */
172
183
  type ModelRelations<TContract, ModelName extends string> = ModelName extends keyof ModelsOf<TContract> ? ModelsOf<TContract>[ModelName] extends {
173
184
  relations: infer R;
@@ -197,7 +208,7 @@ type RelationRowType<TContract, ModelName extends string, RelKey extends string>
197
208
  *
198
209
  * - `true` — the relation is loaded as rows (array for `1:N`, single/null
199
210
  * otherwise), optionally refined by a `where`/`orderBy`/`take` callback.
200
- * - `"scalar"` — the relation is reduced to a `count()` (Phase 6.5), so the
211
+ * - `"scalar"` — the relation is reduced to a `count()`, so the
201
212
  * row field becomes a `number` instead of related rows.
202
213
  */
203
214
  type IncludeMarker = true | "scalar";
@@ -230,12 +241,20 @@ type IncludedRow<TContract, ModelName extends string, TIncludes extends IncludeS
230
241
  * keeps relations and narrows only scalar columns).
231
242
  */
232
243
  type SelectedRow<TContract, ModelName extends string, TIncludes extends IncludeSpec<TContract, ModelName>, TSelected extends string> = [TSelected] extends [never] ? IncludedRow<TContract, ModelName, TIncludes> : Pick<DefaultModelRow<TContract, ModelName>, TSelected & keyof DefaultModelRow<TContract, ModelName>> & IncludeFields<TContract, ModelName, TIncludes>;
244
+ /** The containing field replaced by a shallow patch of a dotted primary-key path. */
245
+ type KeyPathRoot<Path extends string> = Path extends `${infer Field}.${string}` ? Field : Path;
246
+ /** Model fields that a patch may change without replacing primary-key data. */
247
+ type MutableModelRow<TContract, ModelName extends string> = Omit<DefaultModelRow<TContract, ModelName>, KeyPathRoot<ModelKeyPath<TContract, ModelName>>>;
248
+ /** An optional patch that still rejects extra fields when the row has no mutable fields. */
249
+ type PartialPatch<Row> = keyof Row extends never ? Record<string, never> : Partial<Row>;
233
250
  /**
234
251
  * Partial update shape for `update()`, `updateAll()`, `updateCount()`, and the
235
- * `update` arm of `upsert()`. All fields are optional — only provided fields
236
- * are shallow-merged onto the existing record.
252
+ * `update` arm of `upsert()`. Primary-key fields are excluded. Remaining
253
+ * fields are optional and shallow-merged onto the existing record. The
254
+ * conditional preserves each model's fields when ModelName is a union,
255
+ * while unresolved model names keep the untyped row fallback.
237
256
  */
238
- type PatchInput<TContract, ModelName extends string> = Partial<DefaultModelRow<TContract, ModelName>>;
257
+ type PatchInput<TContract, ModelName extends string> = IsNever<ModelName> extends true ? Partial<DefaultModelRow<TContract, ModelName>> : ModelName extends string ? PartialPatch<MutableModelRow<TContract, ModelName>> : never;
239
258
  /** Extracts the `to` model name for a named relation on a model. */
240
259
  type RelatedModelOf<TContract, ModelName extends string, RelName extends string> = ModelName extends keyof ModelsOf<TContract> ? ModelsOf<TContract>[ModelName] extends {
241
260
  relations: Record<RelName, {
@@ -318,10 +337,12 @@ type NestedCreateInput<TContract, ModelName extends string> = Omit<CreateInput<T
318
337
  type MutationCreateInput<TContract, ModelName extends string> = NestedCreateInput<TContract, ModelName> & RelationMutationFields<TContract, ModelName>;
319
338
  /**
320
339
  * Input shape for `update()` with optional relation callbacks.
321
- * All scalar fields are optional (shallow merge); relation fields accept
322
- * `connect` or `disconnect` callbacks.
340
+ * Non-key scalar fields are optional (shallow merge); relation fields accept
341
+ * `connect` or `disconnect` callbacks. Check emptiness after adding relation
342
+ * fields so a key-only scalar row can still accept declared callbacks without
343
+ * an incompatible never index signature.
323
344
  */
324
- type MutationUpdateInput<TContract, ModelName extends string> = PatchInput<TContract, ModelName> & RelationMutationFields<TContract, ModelName>;
345
+ type MutationUpdateInput<TContract, ModelName extends string> = IsNever<ModelName> extends true ? PatchInput<TContract, ModelName> & RelationMutationFields<TContract, ModelName> : ModelName extends string ? PartialPatch<MutableModelRow<TContract, ModelName> & RelationMutationFields<TContract, ModelName>> : never;
325
346
  /** Sort direction for `orderBy()`. */
326
347
  type SortDirection = "asc" | "desc";
327
348
  /** Partial sort spec: field name → direction. */
@@ -335,7 +356,8 @@ type AggregateFn = "count" | "sum" | "avg" | "min" | "max";
335
356
  * output type is assignable to `number`. For a loosely-typed `IdbContract`
336
357
  * (no type maps — `DefaultModelRow` is `Record<string, unknown>`) the row key
337
358
  * set widens to `string`, so we allow any field name rather than collapsing to
338
- * `never`. Mirrors `NumericFieldNames` from `sql-orm-client`, trait-free.
359
+ * `never`. Runtime validation still requires a declared scalar Int or Float
360
+ * field. Mirrors `NumericFieldNames` from `sql-orm-client`, trait-free.
339
361
  */
340
362
  type NumericFieldNames<TContract, ModelName extends string> = string extends keyof DefaultModelRow<TContract, ModelName> ? string : { [K in keyof DefaultModelRow<TContract, ModelName> & string]: NonNullable<DefaultModelRow<TContract, ModelName>[K]> extends number ? K : never; }[keyof DefaultModelRow<TContract, ModelName> & string];
341
363
  declare const idbAggregateResultBrand: unique symbol;
@@ -419,5 +441,34 @@ interface IdbQueryExecutor {
419
441
  query<Row>(plan: IdbQueryPlan<Row>): AsyncIterableResult<Row>;
420
442
  }
421
443
  //#endregion
422
- export { RelationMutationCreate as A, NoIncludes as C, ReferenceRelKeys as D, PatchInput as E, extractKeyFromRow as F, getKeyPath as I, getStoreName as L, SelectedRow as M, SortDirection as N, RelatedModelOf as O, WhereFilter as P, keyEquals$1 as R, MutationUpdateInput as S, OrderBySpec as T, IncludedRow as _, IdbAggregateBuilder as a, ModelKeyPathOrdered as b, IdbAggregateSpec as c, IdbRelationMutation as d, IdbRelationMutator as f, IncludeSpec as g, IncludeMarker as h, DefaultModelRow as i, RelationMutationDisconnect as j, RelationMutationConnect as k, IdbContract as l, IncludeFields as m, AggregateFn as n, IdbAggregateResult as o, IdbStorage as p, CreateInput as r, IdbAggregateSelector as s, IdbQueryExecutor as t, IdbKeyPath as u, KeyType as v, NumericFieldNames as w, MutationCreateInput as x, ModelKeyPath as y, keyToken as z };
423
- //# sourceMappingURL=executor-Bp-hdRg2.d.mts.map
444
+ //#region src/core/mutation-scope.d.ts
445
+ /**
446
+ * Extends the basic {@link IdbQueryExecutor} with multi-store transaction
447
+ * support. `IdbRuntime` satisfies this interface — `runtime.transaction()`
448
+ * delegates to `driver.transaction()` which opens the IDB transaction.
449
+ */
450
+ interface IdbQueryExecutorWithTransaction extends IdbQueryExecutor {
451
+ /**
452
+ * Open a multi-store IDB transaction and return a scope object.
453
+ *
454
+ * The returned scope's `execute()` runs `IdbAtomicPlan`s directly inside
455
+ * the transaction — no new transaction is opened per call, and the
456
+ * middleware chain is bypassed. `commit()` resolves when `tx.oncomplete`
457
+ * fires; `rollback()` calls `tx.abort()`.
458
+ */
459
+ transaction(storeNames: string[], mode?: IDBTransactionMode): Promise<IdbTransactionScope>;
460
+ }
461
+ /**
462
+ * Run a callback inside a single multi-store IDB readwrite transaction.
463
+ *
464
+ * Opens the transaction, passes the `IdbTransactionScope` to `run`, then:
465
+ * - On success: awaits `scope.commit()` (waits for `tx.oncomplete`).
466
+ * - On error: calls `scope.rollback()` and rethrows.
467
+ *
468
+ * The callback receives the low-level scope, not the ORM accessor.
469
+ * Use this for multi-store atomic writes that span several object stores.
470
+ */
471
+ declare function withMutationScope<T>(executor: IdbQueryExecutorWithTransaction, storeNames: string[], run: (scope: IdbTransactionScope) => Promise<T>): Promise<T>;
472
+ //#endregion
473
+ export { RelatedModelOf as A, keyEquals$1 as B, MutationCreateInput as C, OrderBySpec as D, NumericFieldNames as E, SortDirection as F, WhereFilter as I, extractKeyFromRow as L, RelationMutationCreate as M, RelationMutationDisconnect as N, PatchInput as O, SelectedRow as P, getKeyPath as R, ModelKeyPathOrdered as S, NoIncludes as T, keyToken$1 as V, IncludeMarker as _, CreateInput as a, KeyType as b, IdbAggregateResult as c, IdbContract as d, IdbKeyPath as f, IncludeFields as g, IdbStorage as h, AggregateFn as i, RelationMutationConnect as j, ReferenceRelKeys as k, IdbAggregateSelector as l, IdbRelationMutator as m, withMutationScope as n, DefaultModelRow as o, IdbRelationMutation as p, IdbQueryExecutor as r, IdbAggregateBuilder as s, IdbQueryExecutorWithTransaction as t, IdbAggregateSpec as u, IncludeSpec as v, MutationUpdateInput as w, ModelKeyPath as x, IncludedRow as y, getStoreName as z };
474
+ //# sourceMappingURL=mutation-scope-CE3GMR4X.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutation-scope-CE3GMR4X.d.mts","names":[],"sources":["../src/core/types.ts","../src/core/executor.ts","../src/core/mutation-scope.ts"],"mappings":";;;;;;;;;;;;;;KA+BK,SAAS,aAAa;WAA6B;aAAmB,kBAAkB;;IACzF,SAAS;WAAuB,cAAc;IAC5C,UAAU,eAAe,qBACvB,IACA,eAAe,qBACjB,eAAe,qBACjB,eAAe;;;;;;KASP,cAAc,SAAS;;;;;;;;;;;;KAiB9B,mBAAmB,aAAa,2BAA2B,iBAAiB,2BAA2B;;KAGvG,kBAAkB,WAAW,iDAAiD,2BAA2B,aAC1G,0BACA,mBAAmB,mBAAmB,0BACpC,wBAAwB,mBAAmB,0BAC5B,WAAW,mBAAmB,WAAW,aAAa,mBAAmB,WAAW,WAAW,QAC5G,0BACF;;;;;;;KAQD,kBAAkB,aAAa,0BAA0B,iBAAiB,0BAA0B;;KAGpG,iBAAiB,WAAW,iDAAiD,0BAA0B,aACxG,0BACA,kBAAkB,mBAAmB,0BACnC,wB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