@spine-event-engine/storage-datastore 2.0.0-snapshot.22 → 2.0.0-snapshot.24

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 (33) hide show
  1. package/README.md +8 -2
  2. package/REFERENCE.md +55 -11
  3. package/dist/datastore/agent-execution.d.ts +337 -0
  4. package/dist/datastore/agent-execution.d.ts.map +1 -0
  5. package/dist/datastore/agent-execution.js +789 -0
  6. package/dist/datastore/agent-execution.js.map +1 -0
  7. package/dist/datastore/agent-history.d.ts +108 -0
  8. package/dist/datastore/agent-history.d.ts.map +1 -0
  9. package/dist/datastore/agent-history.js +219 -0
  10. package/dist/datastore/agent-history.js.map +1 -0
  11. package/dist/datastore/entity-history.d.ts +22 -65
  12. package/dist/datastore/entity-history.d.ts.map +1 -1
  13. package/dist/datastore/entity-history.js +83 -247
  14. package/dist/datastore/entity-history.js.map +1 -1
  15. package/dist/datastore/record-storage.d.ts +24 -0
  16. package/dist/datastore/record-storage.d.ts.map +1 -1
  17. package/dist/datastore/record-storage.js +46 -7
  18. package/dist/datastore/record-storage.js.map +1 -1
  19. package/dist/datastore/storage-factory.d.ts +110 -6
  20. package/dist/datastore/storage-factory.d.ts.map +1 -1
  21. package/dist/datastore/storage-factory.js +261 -8
  22. package/dist/datastore/storage-factory.js.map +1 -1
  23. package/dist/datastore/tenant-catalog.d.ts +9 -1
  24. package/dist/datastore/tenant-catalog.d.ts.map +1 -1
  25. package/dist/datastore/tenant-catalog.js +225 -1
  26. package/dist/datastore/tenant-catalog.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/index.yaml +24 -1
  29. package/package.json +5 -5
  30. package/dist/datastore/delivery-cleanup.d.ts +0 -31
  31. package/dist/datastore/delivery-cleanup.d.ts.map +0 -1
  32. package/dist/datastore/delivery-cleanup.js +0 -111
  33. package/dist/datastore/delivery-cleanup.js.map +0 -1
@@ -15,11 +15,15 @@ import { Datastore } from "@google-cloud/datastore";
15
15
  import { StringifierRegistry } from "@spine-event-engine/core";
16
16
  import { RecordStorage, StorageFactory, } from "@spine-event-engine/storage";
17
17
  import {} from "@spine-event-engine/storage/provider";
18
+ import { AgentExecutionRecords, AgentHistoryRecords, eventHistorySpec, stateHistorySpec, } from "@spine-event-engine/storage/provider";
19
+ import { eventStoreRecordSpec } from "@spine-event-engine/storage/provider";
18
20
  import { EntityCommitStorageFactories } from "@spine-event-engine/storage/provider";
19
- import { DeliveryCleanupStorageFactories } from "@spine-event-engine/storage/provider";
21
+ import { AgentHistoryStorageFactories } from "@spine-event-engine/storage/provider";
22
+ import { AgentExecutionStorageFactories } from "@spine-event-engine/storage/provider";
20
23
  import { DatastoreEntityCommitStorage, DatastoreEntityStorage, } from "./entity-history.js";
21
24
  import { DatastoreRecordStorage } from "./record-storage.js";
22
- import { DatastoreDeliveryCleanupStorage } from "./delivery-cleanup.js";
25
+ import { DatastoreAgentHistory, AgentHistoryHash } from "./agent-history.js";
26
+ import { DatastoreAgentExecution } from "./agent-execution.js";
23
27
  import { DefaultNamespaceConverter, NamespaceAssignments, } from "./namespace.js";
24
28
  import { DatastoreTenantCatalog } from "./tenant-catalog.js";
25
29
  const maxClientSideScan = 1_000;
@@ -27,12 +31,33 @@ const maxClientSideScan = 1_000;
27
31
  * A Google Cloud Datastore-backed implementation of the Spine TS storage port.
28
32
  */
29
33
  export class DatastoreStorageFactory extends StorageFactory {
34
+ /**
35
+ * Caller-supplied Datastore client.
36
+ */
30
37
  #client;
38
+ /**
39
+ * Custom record creators indexed by source and record type.
40
+ */
31
41
  #recordCreators;
42
+ /**
43
+ * Physical layouts indexed by source and record type.
44
+ */
32
45
  #layouts;
46
+ /**
47
+ * Custom Entity creators indexed by state type.
48
+ */
33
49
  #entityCreators;
50
+ /**
51
+ * Reversible tenant namespace assignment.
52
+ */
34
53
  #namespaceConverter;
54
+ /**
55
+ * Message-valued ID and column conversion registry.
56
+ */
35
57
  #stringifiers;
58
+ /**
59
+ * Native tenant namespace catalog.
60
+ */
36
61
  #catalog;
37
62
  /**
38
63
  * Starts a mutable factory configuration.
@@ -65,13 +90,111 @@ export class DatastoreStorageFactory extends StorageFactory {
65
90
  EntityCommitStorageFactories.register(this, {
66
91
  createEntityCommitStorage: (input) => this.createEntityStorage(input).commits,
67
92
  });
68
- DeliveryCleanupStorageFactories.register(this, {
69
- createDeliveryCleanupStorage: () => new DatastoreDeliveryCleanupStorage((context, spec) => this.cleanupStorage(context, spec)),
93
+ this.registerAgentHistory();
94
+ this.registerAgentExecution();
95
+ }
96
+ /**
97
+ * Registers the required provider-only Agent history capability.
98
+ */
99
+ registerAgentHistory() {
100
+ AgentHistoryStorageFactories.register(this, {
101
+ createAgentHistoryStorage: (input) => {
102
+ if (!this.isOpen())
103
+ throw new Error("StorageFactory is closed.");
104
+ return new DatastoreAgentHistory(input, new DatastoreRecordStorage(input.context, AgentHistoryRecords.spec((value) => AgentHistoryHash.value(value)), this.#client, maxClientSideScan, AgentHistoryRecords.group, "spine_agent_history", this.#namespaceConverter, this.#stringifiers));
105
+ },
106
+ });
107
+ }
108
+ /**
109
+ * Registers the native transactional Agent execution capability.
110
+ */
111
+ registerAgentExecution() {
112
+ AgentExecutionStorageFactories.register(this, {
113
+ createAgentExecutionStorage: (input) => this.createAgentExecution(input),
70
114
  });
71
115
  }
116
+ /**
117
+ * Opens one Agent execution handle after factory lifecycle validation.
118
+ *
119
+ * @param input Requested fenced execution change.
120
+ * @returns Tenant-scoped Agent execution storage handle.
121
+ * @typeParam I Typed entity identifier.
122
+ * @typeParam S Generated Entity state.
123
+ */
124
+ createAgentExecution(input) {
125
+ if (!this.isOpen())
126
+ throw new Error("StorageFactory is closed.");
127
+ return new DatastoreAgentExecution(input, this.executionRows(input));
128
+ }
129
+ /**
130
+ * Opens the fixed execution kinds and existing Entity record families.
131
+ *
132
+ * @param input Requested fenced execution change.
133
+ * @returns Tenant-scoped native record handles.
134
+ * @typeParam I Typed entity identifier.
135
+ * @typeParam S Generated Entity state.
136
+ */
137
+ executionRows(input) {
138
+ const context = input.entity.context;
139
+ const digest = (value) => AgentHistoryHash.value(value);
140
+ return {
141
+ invocation: this.executionRecord(context, AgentExecutionRecords.invocationSpec(digest), AgentExecutionRecords.invocationGroup, "spine_agent_execution"),
142
+ head: this.executionRecord(context, AgentExecutionRecords.headSpec(digest), AgentExecutionRecords.headGroup, "spine_agent_execution_head"),
143
+ history: this.executionRecord(context, AgentHistoryRecords.spec(digest), AgentHistoryRecords.group, "spine_agent_history"),
144
+ current: this.executionRecord(context, input.entity.recordSpec),
145
+ ...this.optionalExecutionRows(input),
146
+ events: this.executionRecord(context, eventStoreRecordSpec),
147
+ };
148
+ }
149
+ /**
150
+ * Opens optional existing Entity state and diagnostic record families.
151
+ *
152
+ * @param input Typed Agent repository and history configuration.
153
+ * @returns Optional native state and diagnostic handles.
154
+ * @typeParam I Typed Agent identifier.
155
+ * @typeParam S Generated Agent state.
156
+ */
157
+ optionalExecutionRows(input) {
158
+ const context = input.entity.context;
159
+ const state = input.entity.stateHistory
160
+ ? stateHistorySpec(input.entity.stateSchema)
161
+ : undefined;
162
+ const diagnostic = input.entity.eventHistory
163
+ ? eventHistorySpec(input.entity.stateSchema)
164
+ : undefined;
165
+ return {
166
+ ...(state === undefined
167
+ ? {}
168
+ : {
169
+ states: this.executionRecord(context, state.spec, state.group),
170
+ }),
171
+ ...(diagnostic === undefined
172
+ ? {}
173
+ : {
174
+ diagnostics: this.executionRecord(context, diagnostic.spec, diagnostic.group),
175
+ }),
176
+ };
177
+ }
178
+ /**
179
+ * Resolves one native kind through the existing record layout.
180
+ *
181
+ * @param context Captured event storage context.
182
+ * @param fixedKind Fixed native Datastore kind.
183
+ * @param group Fixed storage group.
184
+ * @param spec Typed record layout.
185
+ * @returns Typed native record handle.
186
+ * @typeParam I Typed entity identifier.
187
+ * @typeParam R Typed persisted record.
188
+ */
189
+ executionRecord(context, spec, group, fixedKind) {
190
+ const kind = fixedKind ?? this.resolve(spec, group, false).layout?.kind;
191
+ return new DatastoreRecordStorage(context, spec, this.#client, maxClientSideScan, group, kind, this.#namespaceConverter, this.#stringifiers);
192
+ }
72
193
  /**
73
194
  * Creates the selected Entity provider bundle.
74
195
  *
196
+ * @typeParam I Entity identifier type.
197
+ * @typeParam S Entity state message type.
75
198
  * @param input The Entity persistence contract.
76
199
  * @returns The coherent Entity storage handle.
77
200
  */
@@ -89,6 +212,8 @@ export class DatastoreStorageFactory extends StorageFactory {
89
212
  /**
90
213
  * Creates provider-specific Datastore record storage.
91
214
  *
215
+ * @typeParam I Record identifier type.
216
+ * @typeParam R Stored record message type.
92
217
  * @param context The storage context.
93
218
  * @param recordSpec The record specification.
94
219
  * @param group Separates records that share one source type.
@@ -101,14 +226,30 @@ export class DatastoreStorageFactory extends StorageFactory {
101
226
  return creator(context, recordSpec, this.#client, maxClientSideScan);
102
227
  return new DatastoreRecordStorage(context, recordSpec, this.#client, maxClientSideScan, group, resolved.layout?.kind, this.#namespaceConverter, this.#stringifiers);
103
228
  }
229
+ /**
230
+ * Opens the built-in record provider for generated Entity families.
231
+ *
232
+ * @typeParam I Record identifier type.
233
+ * @typeParam R Stored record message type.
234
+ * @param context Identifies the storage tenant and context.
235
+ * @param recordSpec Defines the generated record family.
236
+ * @param group Selects an optional grouped history family.
237
+ * @returns A built-in Datastore record handle.
238
+ */
104
239
  createEntityRecordStorage(context, recordSpec, group) {
105
240
  const resolved = this.resolve(recordSpec, group, false);
106
241
  return new DatastoreRecordStorage(context, recordSpec, this.#client, maxClientSideScan, group, resolved.layout?.kind, this.#namespaceConverter, this.#stringifiers);
107
242
  }
108
- cleanupStorage(context, recordSpec) {
109
- const resolved = this.resolve(recordSpec, undefined, false);
110
- return new DatastoreRecordStorage(context, recordSpec, this.#client, maxClientSideScan, undefined, resolved.layout?.kind, this.#namespaceConverter, this.#stringifiers);
111
- }
243
+ /**
244
+ * Resolves the registered creator and physical layout for a record family.
245
+ *
246
+ * @typeParam I Record identifier type.
247
+ * @typeParam R Stored record message type.
248
+ * @param recordSpec Defines the requested family.
249
+ * @param group Selects an optional grouped family.
250
+ * @param includeCreator Allows a custom record creator for ordinary records.
251
+ * @returns Matching custom creator and physical layout, when registered.
252
+ */
112
253
  resolve(recordSpec, group, includeCreator) {
113
254
  const source = recordSpec.sourceType.typeName;
114
255
  const record = recordSpec.recordType.typeName;
@@ -137,34 +278,98 @@ export class DatastoreStorageFactory extends StorageFactory {
137
278
  void this.#catalog.close();
138
279
  }
139
280
  }
281
+ /**
282
+
283
+ * Configures a Datastore storage factory before construction.
284
+
285
+ */
140
286
  class Builder {
141
287
  create;
288
+ /**
289
+ * Caller-supplied client required by build.
290
+ */
142
291
  #client;
292
+ /**
293
+ * Custom record creators indexed by family.
294
+ */
143
295
  #recordCreators = new Map();
296
+ /**
297
+ * Physical kind layouts indexed by family.
298
+ */
144
299
  #layouts = new Map();
300
+ /**
301
+ * Custom Entity creators indexed by state type.
302
+ */
145
303
  #entityCreators = new Map();
304
+ /**
305
+ * Converter for multitenant Datastore namespaces.
306
+ */
146
307
  #namespaceConverter = new DefaultNamespaceConverter();
308
+ /**
309
+ * Converter for message-valued IDs and columns.
310
+ */
147
311
  #stringifiers = new StringifierRegistry();
312
+ /**
313
+ * Creates a builder with the selected factory constructor.
314
+ *
315
+ * @param create Constructs the configured factory.
316
+ */
148
317
  constructor(create) {
149
318
  this.create = create;
150
319
  }
320
+ /**
321
+ * Sets the caller-supplied Datastore client.
322
+ *
323
+ * @param client Connects to the chosen Datastore project.
324
+ * @returns This builder.
325
+ */
151
326
  setClient(client) {
152
327
  this.#client = client;
153
328
  return this;
154
329
  }
330
+ /**
331
+ * Sets reversible tenant namespace conversion.
332
+ *
333
+ * @param converter Converts complete tenant identities.
334
+ * @returns This builder.
335
+ */
155
336
  setNamespaceConverter(converter) {
156
337
  this.#namespaceConverter = converter;
157
338
  return this;
158
339
  }
340
+ /**
341
+ * Sets message-valued ID and column converters.
342
+ *
343
+ * @param registry Supplies schema-bound message stringifiers.
344
+ * @returns This builder.
345
+ */
159
346
  setStringifierRegistry(registry) {
160
347
  this.#stringifiers = new StringifierRegistry(registry);
161
348
  return this;
162
349
  }
350
+ /**
351
+ * Registers a physical kind for one source and record family.
352
+ *
353
+ * @typeParam R Stored record message type.
354
+ * @param first Record type, or source type when three arguments are supplied.
355
+ * @param second Layout, or record type when three arguments are supplied.
356
+ * @param third Layout for a source-specific registration.
357
+ * @returns This builder.
358
+ */
163
359
  organizeRecords(first, second, third) {
164
360
  const [source, record, layout] = third === undefined ? [undefined, first, second] : [first, second, third];
165
361
  this.#layouts.set(key(source?.typeName ?? record.typeName, record.typeName), checkedLayout(layout));
166
362
  return this;
167
363
  }
364
+ /**
365
+ * Registers a custom record provider for one family.
366
+ *
367
+ * @typeParam R Stored record message type.
368
+ * @param first Record type, or source type when three arguments are supplied.
369
+ * @param second Creator, or record type when three arguments are supplied.
370
+ * @param third Creator for a source-specific registration.
371
+ * @returns This builder.
372
+ */
168
373
  useRecordStorage(first, second, third) {
169
374
  const [source, record, creator] = third === undefined
170
375
  ? [undefined, first, second]
@@ -172,10 +377,23 @@ class Builder {
172
377
  this.#recordCreators.set(key(source?.typeName ?? record.typeName, record.typeName), creator);
173
378
  return this;
174
379
  }
380
+ /**
381
+ * Registers a custom persistence provider for an Entity state type.
382
+ *
383
+ * @typeParam S Entity state message type.
384
+ * @param sourceType Selects the Entity state type.
385
+ * @param creator Builds its storage handle.
386
+ * @returns This builder.
387
+ */
175
388
  useEntityStorage(sourceType, creator) {
176
389
  this.#entityCreators.set(sourceType.typeName, creator);
177
390
  return this;
178
391
  }
392
+ /**
393
+ * Builds a factory after validating its client and kind registrations.
394
+ *
395
+ * @returns The configured Datastore storage factory.
396
+ */
179
397
  build() {
180
398
  if (this.#client === undefined)
181
399
  throw new Error("DatastoreStorageFactory builder requires a client.");
@@ -183,12 +401,39 @@ class Builder {
183
401
  return this.create(this.#client, new Map(this.#recordCreators), new Map(this.#layouts), new Map(this.#entityCreators), this.#namespaceConverter, this.#stringifiers);
184
402
  }
185
403
  }
404
+ /**
405
+ * Combines generated Entity records and commit access for one source.
406
+ *
407
+ * @typeParam I Entity identifier type.
408
+ * @typeParam S Entity state message type.
409
+ */
186
410
  class DefaultEntityHandle {
411
+ /**
412
+ * Current Entity record access.
413
+ */
187
414
  current;
415
+ /**
416
+ * Retained state history access.
417
+ */
188
418
  states;
419
+ /**
420
+ * Retained diagnostic history access.
421
+ */
189
422
  events;
423
+ /**
424
+ * Ordered Entity commit access.
425
+ */
190
426
  commits;
427
+ /**
428
+ * Shared record-family handles.
429
+ */
191
430
  #storage;
431
+ /**
432
+ * Connects the generated storage and commit handle.
433
+ *
434
+ * @param storage Opens current and retained Entity records.
435
+ * @param commits Writes one prepared Entity mutation.
436
+ */
192
437
  constructor(storage, commits) {
193
438
  this.#storage = storage;
194
439
  this.current = storage.current;
@@ -196,9 +441,17 @@ class DefaultEntityHandle {
196
441
  this.events = storage.events;
197
442
  this.commits = commits;
198
443
  }
444
+ /**
445
+ * Returns whether the generated storage remains open.
446
+ *
447
+ * @returns Whether operations remain available.
448
+ */
199
449
  isOpen() {
200
450
  return this.#storage.isOpen();
201
451
  }
452
+ /**
453
+ * Closes generated records and commit access.
454
+ */
202
455
  close() {
203
456
  this.#storage.close();
204
457
  this.commits.close();
@@ -1 +1 @@
1
- {"version":3,"file":"storage-factory.js","sourceRoot":"","sources":["../../src/datastore/storage-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,aAAa,EACb,cAAc,GAIf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGN,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,O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ACvB,CAAC;CACF;AAED,SAAS,GAAG,CAAC,MAAc,EAAE,MAAc;IACzC,OAAO,GAAG,MAAM,SAAS,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,aAAa,CAAC,MAAoB;IACzC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,KAAK;QACnF,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,oBAAoB,CAAC,OAA0C;IACtE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC7C,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,QAAQ;YACjD,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;QACzF,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Datastore } from "@google-cloud/datastore";
2
- import { type TenantBoundary as TenantBoundaryValue, type TenantCatalog } from "@spine-event-engine/storage/provider";
2
+ import { type TenantBoundary as TenantBoundaryValue, type TenantCatalog, type TenantCatalogPage, type TenantCatalogRead } from "@spine-event-engine/storage/provider";
3
3
  import { type NamespaceConverter } from "./namespace.js";
4
4
  interface EarlyTenantOptions {
5
5
  readonly now?: () => number;
@@ -26,6 +26,13 @@ export declare class DatastoreTenantCatalog implements TenantCatalog {
26
26
  * @returns The discovered and early-admitted tenant boundaries.
27
27
  */
28
28
  all(): Promise<readonly TenantBoundaryValue[]>;
29
+ /**
30
+ * Reads one bounded early-admission or native namespace page.
31
+ *
32
+ * @param request Finite candidate limit and instance-bound continuation.
33
+ * @returns A possibly empty continuing tenant page.
34
+ */
35
+ page(request: TenantCatalogRead): Promise<TenantCatalogPage>;
29
36
  /**
30
37
  * Records an admitted tenant until native metadata becomes visible.
31
38
  *
@@ -38,6 +45,7 @@ export declare class DatastoreTenantCatalog implements TenantCatalog {
38
45
  keep(boundary: TenantBoundaryValue): Promise<void>;
39
46
  /**
40
47
  * Stores a tenant namespace until native Datastore metadata becomes visible.
48
+ *
41
49
  * @param boundary The tenant admitted for early reads.
42
50
  */
43
51
  private keepNow;
@@ -1 +1 @@
1
- {"version":3,"file":"tenant-catalog.d.ts","sourceRoot":"","sources":["../../src/datastore/tenant-catalog.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAEL,KAAK,cAAc,IAAI,mBAAmB,EAC1C,KAAK,aAAa,EACnB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAK/E,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,sBAAuB,YAAW,aAAa;;IAwBxD,OAAO,CAAC,QAAQ,CAAC,MAAM;IARzB;;;;;;OAMG;gBAEgB,MAAM,EAAE,SAAS,EAClC,SAAS,EAAE,kBAAkB,EAC7B,OAAO,GAAE,kBAAuB;IAalC;;;;OAIG;IACG,GAAG,IAAI,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC;IAqCpD;;;;;;;;OA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