@pumped-fn/lite 0.1.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/CHANGELOG.md +25 -0
- package/LICENSE +21 -0
- package/README.md +250 -0
- package/dist/index.cjs +647 -0
- package/dist/index.d.cts +411 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +411 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +625 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +60 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
//#region src/symbols.d.ts
|
|
2
|
+
declare const atomSymbol: unique symbol;
|
|
3
|
+
declare const flowSymbol: unique symbol;
|
|
4
|
+
declare const tagSymbol: unique symbol;
|
|
5
|
+
declare const taggedSymbol: unique symbol;
|
|
6
|
+
declare const controllerDepSymbol: unique symbol;
|
|
7
|
+
declare const presetSymbol: unique symbol;
|
|
8
|
+
declare const controllerSymbol: unique symbol;
|
|
9
|
+
declare const tagExecutorSymbol: unique symbol;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/types.d.ts
|
|
12
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
13
|
+
type AtomState = 'idle' | 'resolving' | 'resolved' | 'failed';
|
|
14
|
+
declare namespace Lite {
|
|
15
|
+
interface Scope {
|
|
16
|
+
resolve<T>(atom: Atom<T>): Promise<T>;
|
|
17
|
+
controller<T>(atom: Atom<T>): Controller<T>;
|
|
18
|
+
release<T>(atom: Atom<T>): Promise<void>;
|
|
19
|
+
dispose(): Promise<void>;
|
|
20
|
+
createContext(options?: CreateContextOptions): ExecutionContext;
|
|
21
|
+
on(event: AtomState, atom: Atom<unknown>, listener: () => void): () => void;
|
|
22
|
+
}
|
|
23
|
+
interface CreateContextOptions {
|
|
24
|
+
tags?: Tagged<unknown>[];
|
|
25
|
+
}
|
|
26
|
+
interface ScopeOptions {
|
|
27
|
+
extensions?: Extension[];
|
|
28
|
+
tags?: Tagged<unknown>[];
|
|
29
|
+
presets?: Preset<unknown>[];
|
|
30
|
+
}
|
|
31
|
+
interface Atom<T> {
|
|
32
|
+
readonly [atomSymbol]: true;
|
|
33
|
+
readonly factory: AtomFactory<T, Record<string, Dependency>>;
|
|
34
|
+
readonly deps?: Record<string, Dependency>;
|
|
35
|
+
readonly tags?: Tagged<unknown>[];
|
|
36
|
+
}
|
|
37
|
+
interface Flow<TOutput, TInput = unknown> {
|
|
38
|
+
readonly [flowSymbol]: true;
|
|
39
|
+
readonly factory: FlowFactory<TOutput, TInput, Record<string, Dependency>>;
|
|
40
|
+
readonly deps?: Record<string, Dependency>;
|
|
41
|
+
readonly tags?: Tagged<unknown>[];
|
|
42
|
+
}
|
|
43
|
+
interface ResolveContext {
|
|
44
|
+
cleanup(fn: () => MaybePromise<void>): void;
|
|
45
|
+
invalidate(): void;
|
|
46
|
+
readonly scope: Scope;
|
|
47
|
+
}
|
|
48
|
+
interface ExecutionContext {
|
|
49
|
+
readonly input: unknown;
|
|
50
|
+
readonly scope: Scope;
|
|
51
|
+
exec<T>(options: ExecFlowOptions<T>): Promise<T>;
|
|
52
|
+
exec<T, Args extends unknown[]>(options: ExecFnOptions<T, Args>): Promise<T>;
|
|
53
|
+
onClose(fn: () => MaybePromise<void>): void;
|
|
54
|
+
close(): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
interface ExecFlowOptions<T> {
|
|
57
|
+
flow: Flow<T, unknown>;
|
|
58
|
+
input: unknown;
|
|
59
|
+
tags?: Tagged<unknown>[];
|
|
60
|
+
}
|
|
61
|
+
interface ExecFnOptions<T, Args extends unknown[] = unknown[]> {
|
|
62
|
+
fn: (...args: Args) => MaybePromise<T>;
|
|
63
|
+
params: Args;
|
|
64
|
+
tags?: Tagged<unknown>[];
|
|
65
|
+
}
|
|
66
|
+
interface Controller<T> {
|
|
67
|
+
readonly [controllerSymbol]: true;
|
|
68
|
+
readonly state: AtomState;
|
|
69
|
+
get(): T;
|
|
70
|
+
resolve(): Promise<T>;
|
|
71
|
+
release(): Promise<void>;
|
|
72
|
+
invalidate(): void;
|
|
73
|
+
on(listener: () => void): () => void;
|
|
74
|
+
}
|
|
75
|
+
interface Tag<T, HasDefault extends boolean = false> {
|
|
76
|
+
readonly [tagSymbol]: true;
|
|
77
|
+
readonly key: symbol;
|
|
78
|
+
readonly label: string;
|
|
79
|
+
readonly defaultValue: HasDefault extends true ? T : undefined;
|
|
80
|
+
readonly hasDefault: HasDefault;
|
|
81
|
+
(value: T): Tagged<T>;
|
|
82
|
+
get(source: TagSource): HasDefault extends true ? T : T;
|
|
83
|
+
find(source: TagSource): HasDefault extends true ? T : T | undefined;
|
|
84
|
+
collect(source: TagSource): T[];
|
|
85
|
+
}
|
|
86
|
+
interface Tagged<T> {
|
|
87
|
+
readonly [taggedSymbol]: true;
|
|
88
|
+
readonly key: symbol;
|
|
89
|
+
readonly value: T;
|
|
90
|
+
}
|
|
91
|
+
type TagSource = Tagged<unknown>[] | {
|
|
92
|
+
tags?: Tagged<unknown>[];
|
|
93
|
+
};
|
|
94
|
+
interface TagExecutor<TOutput, TTag = TOutput> {
|
|
95
|
+
readonly [tagExecutorSymbol]: true;
|
|
96
|
+
readonly tag: Tag<TTag, boolean>;
|
|
97
|
+
readonly mode: "required" | "optional" | "all";
|
|
98
|
+
}
|
|
99
|
+
interface ControllerDep<T> {
|
|
100
|
+
readonly [controllerDepSymbol]: true;
|
|
101
|
+
readonly atom: Atom<T>;
|
|
102
|
+
}
|
|
103
|
+
interface Preset<T> {
|
|
104
|
+
readonly [presetSymbol]: true;
|
|
105
|
+
readonly atom: Atom<T>;
|
|
106
|
+
readonly value: T | Atom<T>;
|
|
107
|
+
}
|
|
108
|
+
interface Extension {
|
|
109
|
+
readonly name: string;
|
|
110
|
+
init?(scope: Scope): MaybePromise<void>;
|
|
111
|
+
wrapResolve?<T>(next: () => Promise<T>, atom: Atom<T>, scope: Scope): Promise<T>;
|
|
112
|
+
wrapExec?<T>(next: () => Promise<T>, target: Flow<T, unknown> | ((...args: unknown[]) => MaybePromise<T>), ctx: ExecutionContext): Promise<T>;
|
|
113
|
+
dispose?(scope: Scope): MaybePromise<void>;
|
|
114
|
+
}
|
|
115
|
+
type Dependency = Atom<unknown> | ControllerDep<unknown> | TagExecutor<unknown>;
|
|
116
|
+
type InferDep<D> = D extends Atom<infer T> ? T : D extends ControllerDep<infer T> ? Controller<T> : D extends TagExecutor<infer TOutput, infer _TTag> ? TOutput : never;
|
|
117
|
+
type InferDeps<D> = { [K in keyof D]: InferDep<D[K]> };
|
|
118
|
+
type AtomFactory<T, D extends Record<string, Dependency>> = keyof D extends never ? (ctx: ResolveContext) => MaybePromise<T> : (ctx: ResolveContext, deps: InferDeps<D>) => MaybePromise<T>;
|
|
119
|
+
type FlowFactory<TOutput, TInput, D extends Record<string, Dependency>> = keyof D extends never ? (ctx: ExecutionContext) => MaybePromise<TOutput> : (ctx: ExecutionContext, deps: InferDeps<D>) => MaybePromise<TOutput>;
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/tag.d.ts
|
|
123
|
+
/**
|
|
124
|
+
* Creates a metadata tag for attaching and retrieving typed values from Atoms and Flows.
|
|
125
|
+
*
|
|
126
|
+
* @param options - Configuration object with label and optional default value
|
|
127
|
+
* @returns A Tag instance that can create tagged values and query them from sources
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const nameTag = tag<string>({ label: "name" })
|
|
132
|
+
* const myAtom = atom({
|
|
133
|
+
* factory: (ctx) => "value",
|
|
134
|
+
* tags: [nameTag("MyAtom")]
|
|
135
|
+
* })
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
declare function tag<T>(options: {
|
|
139
|
+
label: string;
|
|
140
|
+
}): Lite.Tag<T, false>;
|
|
141
|
+
declare function tag<T>(options: {
|
|
142
|
+
label: string;
|
|
143
|
+
default: T;
|
|
144
|
+
}): Lite.Tag<T, true>;
|
|
145
|
+
/**
|
|
146
|
+
* Type guard to check if a value is a Tag.
|
|
147
|
+
*
|
|
148
|
+
* @param value - The value to check
|
|
149
|
+
* @returns True if the value is a Tag, false otherwise
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* if (isTag(value)) {
|
|
154
|
+
* const tagged = value("myValue")
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
declare function isTag(value: unknown): value is Lite.Tag<unknown, boolean>;
|
|
159
|
+
/**
|
|
160
|
+
* Type guard to check if a value is a Tagged value.
|
|
161
|
+
*
|
|
162
|
+
* @param value - The value to check
|
|
163
|
+
* @returns True if the value is a Tagged value, false otherwise
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```typescript
|
|
167
|
+
* if (isTagged(value)) {
|
|
168
|
+
* console.log(value.key, value.value)
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare function isTagged(value: unknown): value is Lite.Tagged<unknown>;
|
|
173
|
+
/**
|
|
174
|
+
* Tag execution helpers for declaring how tags should be resolved from dependency sources.
|
|
175
|
+
*/
|
|
176
|
+
declare const tags: {
|
|
177
|
+
/**
|
|
178
|
+
* Creates a required tag executor that throws if the tag is not found.
|
|
179
|
+
*
|
|
180
|
+
* @param tag - The tag to execute
|
|
181
|
+
* @returns A tag executor that requires the tag to be present
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* const myAtom = atom({
|
|
186
|
+
* deps: { name: tags.required(nameTag) },
|
|
187
|
+
* factory: (ctx, { name }) => `Hello ${name}`
|
|
188
|
+
* })
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
required<T>(tag: Lite.Tag<T, boolean>): Lite.TagExecutor<T, T>;
|
|
192
|
+
/**
|
|
193
|
+
* Creates an optional tag executor that returns undefined if the tag is not found.
|
|
194
|
+
*
|
|
195
|
+
* @param tag - The tag to execute
|
|
196
|
+
* @returns A tag executor that allows the tag to be absent
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* const myAtom = atom({
|
|
201
|
+
* deps: { name: tags.optional(nameTag) },
|
|
202
|
+
* factory: (ctx, { name }) => name ?? "Anonymous"
|
|
203
|
+
* })
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
optional<T>(tag: Lite.Tag<T, boolean>): Lite.TagExecutor<T | undefined, T>;
|
|
207
|
+
/**
|
|
208
|
+
* Creates a tag executor that collects all values for the given tag.
|
|
209
|
+
*
|
|
210
|
+
* @param tag - The tag to execute
|
|
211
|
+
* @returns A tag executor that returns an array of all matching tag values
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```typescript
|
|
215
|
+
* const myAtom = atom({
|
|
216
|
+
* deps: { names: tags.all(nameTag) },
|
|
217
|
+
* factory: (ctx, { names }) => names.join(", ")
|
|
218
|
+
* })
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
all<T>(tag: Lite.Tag<T, boolean>): Lite.TagExecutor<T[], T>;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Type guard to check if a value is a TagExecutor.
|
|
225
|
+
*
|
|
226
|
+
* @param value - The value to check
|
|
227
|
+
* @returns True if the value is a TagExecutor, false otherwise
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```typescript
|
|
231
|
+
* if (isTagExecutor(value)) {
|
|
232
|
+
* console.log(value.mode, value.tag)
|
|
233
|
+
* }
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
declare function isTagExecutor(value: unknown): value is Lite.TagExecutor<unknown>;
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/atom.d.ts
|
|
239
|
+
/**
|
|
240
|
+
* Creates a long-lived dependency that can be resolved and reused within a scope.
|
|
241
|
+
*
|
|
242
|
+
* @param config - Configuration object containing factory function, optional dependencies, and tags
|
|
243
|
+
* @returns An Atom instance that can be resolved to produce a value of type T
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* const dbAtom = atom({
|
|
248
|
+
* factory: async (ctx) => createDatabase()
|
|
249
|
+
* })
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
declare function atom<T>(config: {
|
|
253
|
+
deps?: undefined;
|
|
254
|
+
factory: (ctx: Lite.ResolveContext) => MaybePromise<T>;
|
|
255
|
+
tags?: Lite.Tagged<unknown>[];
|
|
256
|
+
}): Lite.Atom<T>;
|
|
257
|
+
declare function atom<T, const D extends Record<string, Lite.Atom<unknown> | Lite.ControllerDep<unknown> | {
|
|
258
|
+
mode: string;
|
|
259
|
+
}>>(config: {
|
|
260
|
+
deps: D;
|
|
261
|
+
factory: (ctx: Lite.ResolveContext, deps: Lite.InferDeps<D>) => MaybePromise<T>;
|
|
262
|
+
tags?: Lite.Tagged<unknown>[];
|
|
263
|
+
}): Lite.Atom<T>;
|
|
264
|
+
/**
|
|
265
|
+
* Type guard to check if a value is an Atom.
|
|
266
|
+
*
|
|
267
|
+
* @param value - The value to check
|
|
268
|
+
* @returns True if the value is an Atom, false otherwise
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```typescript
|
|
272
|
+
* if (isAtom(value)) {
|
|
273
|
+
* await scope.resolve(value)
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
declare function isAtom(value: unknown): value is Lite.Atom<unknown>;
|
|
278
|
+
/**
|
|
279
|
+
* Wraps an Atom to receive a Controller instead of the resolved value.
|
|
280
|
+
* The Controller provides full lifecycle control: get, resolve, release, invalidate, and subscribe.
|
|
281
|
+
*
|
|
282
|
+
* @param atom - The Atom to wrap
|
|
283
|
+
* @returns A ControllerDep that resolves to a Controller for the Atom
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* ```typescript
|
|
287
|
+
* const configAtom = atom({ factory: () => fetchConfig() })
|
|
288
|
+
* const serverAtom = atom({
|
|
289
|
+
* deps: { config: controller(configAtom) },
|
|
290
|
+
* factory: (ctx, { config }) => {
|
|
291
|
+
* const unsub = config.on(() => ctx.invalidate())
|
|
292
|
+
* ctx.cleanup(unsub)
|
|
293
|
+
* return createServer(config.get().port)
|
|
294
|
+
* }
|
|
295
|
+
* })
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
declare function controller<T>(atom: Lite.Atom<T>): Lite.ControllerDep<T>;
|
|
299
|
+
/**
|
|
300
|
+
* Type guard to check if a value is a ControllerDep wrapper.
|
|
301
|
+
*
|
|
302
|
+
* @param value - The value to check
|
|
303
|
+
* @returns True if the value is a ControllerDep wrapper, false otherwise
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* if (isControllerDep(dep)) {
|
|
308
|
+
* const ctrl = scope.controller(dep.atom)
|
|
309
|
+
* }
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
312
|
+
declare function isControllerDep(value: unknown): value is Lite.ControllerDep<unknown>;
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/flow.d.ts
|
|
315
|
+
/**
|
|
316
|
+
* Creates a short-lived execution unit that processes input and produces output.
|
|
317
|
+
*
|
|
318
|
+
* @param config - Configuration object containing factory function, optional dependencies, and tags
|
|
319
|
+
* @returns A Flow instance that can be executed within an execution context
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```typescript
|
|
323
|
+
* const processUser = flow({
|
|
324
|
+
* factory: async (ctx) => {
|
|
325
|
+
* const userId = ctx.input
|
|
326
|
+
* return await fetchUser(userId)
|
|
327
|
+
* }
|
|
328
|
+
* })
|
|
329
|
+
* ```
|
|
330
|
+
*/
|
|
331
|
+
declare function flow<TOutput, TInput = unknown>(config: {
|
|
332
|
+
deps?: undefined;
|
|
333
|
+
factory: (ctx: Lite.ExecutionContext) => MaybePromise<TOutput>;
|
|
334
|
+
tags?: Lite.Tagged<unknown>[];
|
|
335
|
+
}): Lite.Flow<TOutput, TInput>;
|
|
336
|
+
declare function flow<TOutput, TInput, const D extends Record<string, Lite.Atom<unknown> | Lite.ControllerDep<unknown> | {
|
|
337
|
+
mode: string;
|
|
338
|
+
}>>(config: {
|
|
339
|
+
deps: D;
|
|
340
|
+
factory: (ctx: Lite.ExecutionContext, deps: Lite.InferDeps<D>) => MaybePromise<TOutput>;
|
|
341
|
+
tags?: Lite.Tagged<unknown>[];
|
|
342
|
+
}): Lite.Flow<TOutput, TInput>;
|
|
343
|
+
/**
|
|
344
|
+
* Type guard to check if a value is a Flow.
|
|
345
|
+
*
|
|
346
|
+
* @param value - The value to check
|
|
347
|
+
* @returns True if the value is a Flow, false otherwise
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```typescript
|
|
351
|
+
* if (isFlow(value)) {
|
|
352
|
+
* await ctx.exec({ flow: value, input: data })
|
|
353
|
+
* }
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
356
|
+
declare function isFlow(value: unknown): value is Lite.Flow<unknown, unknown>;
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/preset.d.ts
|
|
359
|
+
/**
|
|
360
|
+
* Creates a preset value for an Atom, overriding its factory within a scope.
|
|
361
|
+
*
|
|
362
|
+
* @param atom - The Atom to preset
|
|
363
|
+
* @param value - The preset value (can be a direct value or another Atom)
|
|
364
|
+
* @returns A Preset instance to be used in scope configuration
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```typescript
|
|
368
|
+
* const scope = await createScope({
|
|
369
|
+
* presets: [preset(dbAtom, mockDatabase)]
|
|
370
|
+
* })
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
declare function preset<T>(atom: Lite.Atom<T>, value: T | Lite.Atom<T>): Lite.Preset<T>;
|
|
374
|
+
/**
|
|
375
|
+
* Type guard to check if a value is a Preset.
|
|
376
|
+
*
|
|
377
|
+
* @param value - The value to check
|
|
378
|
+
* @returns True if the value is a Preset, false otherwise
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* ```typescript
|
|
382
|
+
* if (isPreset(value)) {
|
|
383
|
+
* console.log(value.atom, value.value)
|
|
384
|
+
* }
|
|
385
|
+
* ```
|
|
386
|
+
*/
|
|
387
|
+
declare function isPreset(value: unknown): value is Lite.Preset<unknown>;
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/scope.d.ts
|
|
390
|
+
/**
|
|
391
|
+
* Creates a DI container that manages Atom resolution, caching, and lifecycle.
|
|
392
|
+
*
|
|
393
|
+
* @param options - Optional configuration for extensions, presets, and tags
|
|
394
|
+
* @returns A Promise that resolves to a Scope instance
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```typescript
|
|
398
|
+
* const scope = await createScope({
|
|
399
|
+
* extensions: [loggingExtension],
|
|
400
|
+
* presets: [preset(dbAtom, testDb)]
|
|
401
|
+
* })
|
|
402
|
+
* const db = await scope.resolve(dbAtom)
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
declare function createScope(options?: Lite.ScopeOptions): Promise<Lite.Scope>;
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/index.d.ts
|
|
408
|
+
declare const VERSION = "0.0.1";
|
|
409
|
+
//#endregion
|
|
410
|
+
export { type AtomState, type Lite, VERSION, atom, atomSymbol, controller, controllerDepSymbol, controllerSymbol, createScope, flow, flowSymbol, isAtom, isControllerDep, isFlow, isPreset, isTag, isTagExecutor, isTagged, preset, presetSymbol, tag, tagExecutorSymbol, tagSymbol, taggedSymbol, tags };
|
|
411
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/symbols.ts","../src/types.ts","../src/tag.ts","../src/atom.ts","../src/flow.ts","../src/preset.ts","../src/scope.ts","../src/index.ts"],"sourcesContent":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