@vworlds/vecs 1.0.2 → 1.0.4

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/system.d.ts CHANGED
@@ -1,56 +1,14 @@
1
1
  import { ArrayMap } from "./util/array_map.js";
2
2
  import { Bitset } from "./util/bitset.js";
3
- import { Component, ComponentClassArray, ComponentClassOrType } from "./component.js";
3
+ import { Component } from "./component.js";
4
+ import { Query } from "./query.js";
5
+ import { type QueryDSL, type MaybeRequired } from "./dsl.js";
4
6
  import type { Entity } from "./entity.js";
5
7
  import { Phase, type IPhase } from "./phase.js";
6
8
  import { type World } from "./world.js";
7
- type EntityCallback = (e: Entity) => void;
9
+ export type { QueryDSL as SystemQuery, EntityTestFunc } from "./dsl.js";
8
10
  type ComponentCallback = (c: Component) => void;
9
11
  type RunCallback = (now: number, delta: number) => void;
10
- /** A function that tests whether a given entity belongs to a system. */
11
- export type EntityTestFunc = (e: Entity) => boolean;
12
- type ComponentOrParent = typeof Component | {
13
- parent: typeof Component;
14
- };
15
- type ComponentInstance<T> = T extends {
16
- parent: typeof Component;
17
- } ? InstanceType<T["parent"]> : T extends typeof Component ? InstanceType<T> : never;
18
- /**
19
- * A composable query expression used to declare which entities a
20
- * {@link System} should track.
21
- *
22
- * Queries can be nested arbitrarily:
23
- *
24
- * ```ts
25
- * // Entities that have Position AND (Sprite OR Container):
26
- * world.system("render").query({
27
- * AND: [Position, { OR: [Sprite, Container] }]
28
- * });
29
- *
30
- * // Entities that have a parent with Player AND Container:
31
- * world.system("attach").query({
32
- * PARENT: { AND: [Player, Container] }
33
- * });
34
- * ```
35
- *
36
- * Short forms:
37
- * - A single class or type id is equivalent to `{ HAS: [C] }`.
38
- * - An array `[A, B]` is equivalent to `{ HAS: [A, B] }`.
39
- * - Pass an {@link EntityTestFunc} directly for fully custom membership logic.
40
- */
41
- export type SystemQuery = ComponentClassArray | ComponentClassOrType | EntityTestFunc | {
42
- HAS: ComponentClassArray | ComponentClassOrType;
43
- } | {
44
- HAS_ONLY: ComponentClassArray | ComponentClassOrType;
45
- } | {
46
- AND: SystemQuery[];
47
- } | {
48
- OR: SystemQuery[];
49
- } | {
50
- NOT: SystemQuery;
51
- } | {
52
- PARENT: SystemQuery;
53
- };
54
12
  /**
55
13
  * A reactive processor that operates on a filtered subset of world entities.
56
14
  *
@@ -81,38 +39,15 @@ export type SystemQuery = ComponentClassArray | ComponentClassOrType | EntityTes
81
39
  * `sort`, `each`, and `update` inject callbacks, those components appear as
82
40
  * non-nullable; any component not in `R` remains `Type | undefined`.
83
41
  */
84
- type MaybeRequired<C, R extends (typeof Component)[]> = C extends typeof Component ? C extends R[number] ? InstanceType<C> : InstanceType<C> | undefined : never;
85
- export declare class System<R extends (typeof Component)[] = []> {
86
- /** Unique name for this system, used in logs and pipeline output. */
87
- readonly name: string;
88
- /** The world that owns this system. */
89
- readonly world: World;
42
+ export declare class System<R extends (typeof Component)[] = []> extends Query<R> {
90
43
  protected componentUpdateCallbacks: ArrayMap<ComponentCallback>;
91
- protected eachCallback: EntityCallback | undefined;
92
- protected _entities: Set<Entity> | undefined;
93
- protected _enterCallback: EntityCallback[];
94
- protected _exitCallback: EntityCallback[];
44
+ protected eachCallback: ((e: Entity) => void) | undefined;
95
45
  private _runCallback;
96
- protected _belongs: EntityTestFunc;
97
46
  private readonly updateQueue;
98
- private hasQuery;
99
47
  /** @internal */
100
48
  _phase: string | Phase | undefined;
101
49
  protected watchlistBitmask: Bitset;
102
- constructor(
103
- /** Unique name for this system, used in logs and pipeline output. */
104
- name: string,
105
- /** The world that owns this system. */
106
- world: World);
107
- /** Returns the system name. */
108
- toString(): string;
109
- /**
110
- * Read-only view of the entities currently tracked by this system.
111
- *
112
- * Empty unless {@link track} (or {@link each}, which implies it) was
113
- * called during system configuration.
114
- */
115
- get entities(): ReadonlySet<Entity>;
50
+ constructor(name: string, world: World);
116
51
  /**
117
52
  * Assign this system to a pipeline phase.
118
53
  *
@@ -127,67 +62,12 @@ export declare class System<R extends (typeof Component)[] = []> {
127
62
  phase(p: string | IPhase): this;
128
63
  /** @internal Delivers a component-modified notification to this system. */
129
64
  notifyModified(c: Component): void;
130
- /** Returns `true` if the entity satisfies this system's query. */
131
- belongs(e: Entity): boolean;
132
- /** @internal Fires `enter` callbacks for a newly matched entity. */
65
+ /** @internal Fires enter callbacks, adds entity to tracked set, queues component updates. */
133
66
  _enter(e: Entity): void;
134
- /** @internal Fires `exit` callbacks when an entity leaves the system. */
67
+ /** @internal Fires exit callbacks, removes entity from tracked set, drains update queue. */
135
68
  _exit(e: Entity): void;
136
69
  /** @internal Execute one tick: run `run`, fire `each`, then drain the update queue. */
137
70
  _run(now: number, delta: number): void;
138
- private getComponent;
139
- private getInjected;
140
- private mapInjectedClassToTypes;
141
- /**
142
- * Register a callback that fires when an entity **enters** this system
143
- * (i.e. first satisfies the system's query) with injected components.
144
- *
145
- * @param inject - Ordered list of component classes (or `{ parent: C }`) to
146
- * resolve from the entering entity and pass to `callback`.
147
- * @param callback - Receives the entity and the resolved component tuple.
148
- * @returns `this` for chaining.
149
- *
150
- * @example
151
- * ```ts
152
- * system.enter([Position, Sprite], (e, [pos, sprite]) => {
153
- * sprite.initialize(scene);
154
- * sprite.sprite.setPosition(pos.x, pos.y);
155
- * });
156
- * ```
157
- */
158
- enter<J extends ComponentOrParent[]>(inject: readonly [...J], callback: (e: Entity, injected: {
159
- [K in keyof J]: ComponentInstance<J[K]>;
160
- }) => void): this;
161
- /**
162
- * Register a callback that fires when an entity enters this system.
163
- *
164
- * @param callback - Receives only the entity (no injection).
165
- * @returns `this` for chaining.
166
- */
167
- enter(callback: (e: Entity) => void): this;
168
- /**
169
- * Register a callback that fires when an entity **exits** this system
170
- * (its components no longer satisfy the query, or it was destroyed) with
171
- * injected components.
172
- *
173
- * Components that were just removed are still accessible via `get_deleted`
174
- * semantics — the injected tuple includes them even though they are no
175
- * longer in the entity's active component set.
176
- *
177
- * @param inject - Component classes to resolve and inject.
178
- * @param callback - Receives the entity and the resolved component tuple.
179
- * @returns `this` for chaining.
180
- */
181
- exit<J extends ComponentOrParent[]>(inject: readonly [...J], callback: (e: Entity, injected: {
182
- [K in keyof J]: ComponentInstance<J[K]>;
183
- }) => void): this;
184
- /**
185
- * Register a callback that fires when an entity exits this system.
186
- *
187
- * @param callback - Receives only the entity.
188
- * @returns `this` for chaining.
189
- */
190
- exit(callback: (e: Entity) => void): this;
191
71
  /**
192
72
  * Register a per-tick callback that runs every time this system's phase
193
73
  * executes, regardless of entity membership.
@@ -279,46 +159,14 @@ export declare class System<R extends (typeof Component)[] = []> {
279
159
  [K in keyof J]: MaybeRequired<J[K], R>;
280
160
  }) => void): this;
281
161
  /**
282
- * Enable entity tracking: matched entities are inserted into
283
- * {@link entities} as they enter the system and removed as they exit.
284
- *
285
- * Idempotent. Intended to be called during system configuration before
286
- * `world.start()`; entities already matched when `track` is called late
287
- * will not be backfilled.
288
- *
289
- * {@link each} implies `track` — call this directly only when you want
290
- * the tracked set without an `each` callback.
291
- *
292
- * @returns `this` for chaining.
293
- */
294
- track(): this;
295
- /**
296
- * Enable sorted entity tracking: matched entities are stored in insertion
297
- * order determined by `compare`, which receives a tuple of resolved
298
- * component instances for each pair of entities being ordered.
299
- *
300
- * Implies {@link track}.
301
- *
302
- * @param components - Component classes to resolve and pass to `compare`.
303
- * @param compare - Returns a negative number, zero, or positive number when
304
- * `a` should sort before, equal to, or after `b`.
305
- * @returns `this` for chaining.
162
+ * Not supported on `System`. Throws unconditionally.
306
163
  *
307
- * @example
308
- * ```ts
309
- * world.system("Render")
310
- * .requires(Position, Sprite)
311
- * .sort([Position], ([posA], [posB]) => posA.z - posB.z);
312
- * ```
164
+ * Systems are owned by the world for the duration of the session. If you
165
+ * need a temporary reactive set, use a standalone {@link Query} instead.
313
166
  */
314
- sort<J extends (typeof Component)[]>(components: readonly [...J], compare: (a: {
315
- [K in keyof J]: MaybeRequired<J[K], R>;
316
- }, b: {
317
- [K in keyof J]: MaybeRequired<J[K], R>;
318
- }) => number): this;
319
- private queryBuilder;
167
+ destroy(): never;
320
168
  /**
321
- * Set the entity membership predicate using the {@link SystemQuery} DSL.
169
+ * Set the entity membership predicate using the {@link QueryDSL} DSL.
322
170
  *
323
171
  * Replaces any implicit query derived from `update` watchlists and any
324
172
  * previous `requires` call. After calling `query`, auto-expanding of
@@ -329,7 +177,7 @@ export declare class System<R extends (typeof Component)[] = []> {
329
177
  * to be present on every matched entity, eliminating `| undefined` from
330
178
  * those positions. It has no effect at runtime.
331
179
  *
332
- * @param q - A {@link SystemQuery} expression.
180
+ * @param q - A {@link QueryDSL} expression.
333
181
  * @param _guaranteed - Component classes guaranteed present on every matched
334
182
  * entity (type hint only — not validated at runtime).
335
183
  * @returns `this` for chaining.
@@ -343,7 +191,7 @@ export declare class System<R extends (typeof Component)[] = []> {
343
191
  * });
344
192
  * ```
345
193
  */
346
- query<T extends (typeof Component)[] = []>(q: SystemQuery, _guaranteed?: readonly [...T]): System<T>;
194
+ query<T extends (typeof Component)[] = []>(q: QueryDSL, _guaranteed?: readonly [...T]): System<T>;
347
195
  /**
348
196
  * Shorthand for `query([...components])` — the system tracks entities that
349
197
  * have **all** of the listed component types.
@@ -358,4 +206,3 @@ export declare class System<R extends (typeof Component)[] = []> {
358
206
  */
359
207
  requires<T extends (typeof Component)[]>(...components: [...T]): System<T>;
360
208
  }
361
- export {};
package/dist/system.js CHANGED
@@ -1,58 +1,45 @@
1
1
  import { ArrayMap } from "./util/array_map.js";
2
2
  import { Bitset } from "./util/bitset.js";
3
- import { OrderedSet } from "./util/ordered_set.js";
4
- import { Component, calculateComponentBitmask, } from "./component.js";
3
+ import { Query } from "./query.js";
4
+ import { HAS } from "./dsl.js";
5
5
  import { Phase } from "./phase.js";
6
- function HAS(world, ...components) {
7
- const testBitmask = calculateComponentBitmask(components, world);
8
- return (e) => e.componentBitmask.hasBitset(testBitmask);
9
- }
10
- function HAS_ONLY(world, ...components) {
11
- const testBitmask = calculateComponentBitmask(components, world);
12
- return (e) => e.componentBitmask.equal(testBitmask);
13
- }
14
- function NOT(func) {
15
- return (e) => !func(e);
16
- }
17
- function AND(...funcs) {
18
- return (e) => funcs.every((f) => f(e));
19
- }
20
- function OR(...funcs) {
21
- return (e) => funcs.some((f) => f(e));
22
- }
23
- function PARENT(func) {
24
- return (e) => (e.parent && func(e.parent)) || false;
25
- }
26
- const EMPTY_ENTITIES = new Set();
27
- export class System {
28
- constructor(
29
- /** Unique name for this system, used in logs and pipeline output. */
30
- name,
31
- /** The world that owns this system. */
32
- world) {
33
- this.name = name;
34
- this.world = world;
6
+ /**
7
+ * A reactive processor that operates on a filtered subset of world entities.
8
+ *
9
+ * Systems are created and registered through {@link World.system}:
10
+ *
11
+ * ```ts
12
+ * world.system("Move")
13
+ * .requires(Position, Velocity) // track entities with both components
14
+ * .phase("update")
15
+ * .enter([Position], (e, [pos]) => { pos.x = 0; })
16
+ * .update(Position, (pos) => { pos.x += pos.vx; })
17
+ * .exit((e) => { console.log("entity left", e.eid); });
18
+ * ```
19
+ *
20
+ * All builder methods return `this` for chaining. Call {@link World.start}
21
+ * once all systems are registered; after that, drive the loop with
22
+ * {@link World.runPhase}.
23
+ *
24
+ * ### Component injection and type inference
25
+ *
26
+ * `enter`, `exit`, `update`, `each`, and `sort` all accept an array of
27
+ * component classes that are resolved from the entity and passed as a typed
28
+ * tuple to the callback. Use `{ parent: SomeComponent }` to resolve from the
29
+ * entity's parent instead of the entity itself.
30
+ *
31
+ * Components declared via {@link requires} (or the second argument of
32
+ * {@link query}) are tracked as a type parameter `R` on the system. In
33
+ * `sort`, `each`, and `update` inject callbacks, those components appear as
34
+ * non-nullable; any component not in `R` remains `Type | undefined`.
35
+ */
36
+ export class System extends Query {
37
+ constructor(name, world) {
38
+ super(name, world, false);
35
39
  this.componentUpdateCallbacks = new ArrayMap();
36
- this._enterCallback = [];
37
- this._exitCallback = [];
38
- this._belongs = (e) => false;
39
40
  this.updateQueue = [];
40
- this.hasQuery = false;
41
41
  this.watchlistBitmask = new Bitset();
42
42
  }
43
- /** Returns the system name. */
44
- toString() {
45
- return this.name;
46
- }
47
- /**
48
- * Read-only view of the entities currently tracked by this system.
49
- *
50
- * Empty unless {@link track} (or {@link each}, which implies it) was
51
- * called during system configuration.
52
- */
53
- get entities() {
54
- return this._entities ?? EMPTY_ENTITIES;
55
- }
56
43
  /**
57
44
  * Assign this system to a pipeline phase.
58
45
  *
@@ -80,21 +67,14 @@ export class System {
80
67
  return;
81
68
  this.updateQueue.push(c);
82
69
  }
83
- /** Returns `true` if the entity satisfies this system's query. */
84
- belongs(e) {
85
- return this._belongs(e);
86
- }
87
- /** @internal Fires `enter` callbacks for a newly matched entity. */
70
+ /** @internal Fires enter callbacks, adds entity to tracked set, queues component updates. */
88
71
  _enter(e) {
89
- this._enterCallback.forEach((callback) => callback(e));
72
+ super._enter(e);
90
73
  e.forEachComponent((c) => this.notifyModified(c));
91
- this._entities?.add(e);
92
74
  }
93
- /** @internal Fires `exit` callbacks when an entity leaves the system. */
75
+ /** @internal Fires exit callbacks, removes entity from tracked set, drains update queue. */
94
76
  _exit(e) {
95
- this._exitCallback.forEach((callback) => callback(e));
96
- this._entities?.delete(e);
97
- // remove queued updates for components of the exiting entity:
77
+ super._exit(e);
98
78
  this.updateQueue.forEach((c, i) => {
99
79
  if (!c)
100
80
  return;
@@ -108,7 +88,7 @@ export class System {
108
88
  this._runCallback(now, delta);
109
89
  if (this.eachCallback) {
110
90
  const cb = this.eachCallback;
111
- this._entities?.forEach((e) => cb(e));
91
+ this.forEach((e) => cb(e));
112
92
  }
113
93
  this.updateQueue.forEach((c) => {
114
94
  if (!c)
@@ -120,64 +100,6 @@ export class System {
120
100
  });
121
101
  this.updateQueue.length = 0;
122
102
  }
123
- getComponent(e, C, considerDeleted) {
124
- let c;
125
- if (typeof C === "number") {
126
- c = e.get(C, considerDeleted); // obtain an instance of C
127
- }
128
- else {
129
- c = e.parent && e.parent.get(C.parent, considerDeleted);
130
- }
131
- return c;
132
- }
133
- getInjected(e, inject, considerDeleted = false) {
134
- const injected = [];
135
- inject.forEach((C) => {
136
- const c = this.getComponent(e, C, considerDeleted);
137
- if (!c)
138
- throw "system does not contain component";
139
- injected.push(c);
140
- });
141
- return injected;
142
- }
143
- mapInjectedClassToTypes(inject) {
144
- //map injected class constructors to type numbers which are faster to search for later
145
- return inject.map((C) => {
146
- if (typeof C === "function")
147
- return this.world.getComponentType(C);
148
- return { parent: this.world.getComponentType(C.parent) };
149
- });
150
- }
151
- // Implement the overloaded function
152
- enter(injectOrCallback, callback) {
153
- if (typeof injectOrCallback === "function") {
154
- // It is the second signature
155
- this._enterCallback.push(injectOrCallback);
156
- }
157
- else {
158
- // It is the first signature
159
- const inject = this.mapInjectedClassToTypes(injectOrCallback);
160
- this._enterCallback.push((e) => {
161
- callback(e, this.getInjected(e, inject));
162
- });
163
- }
164
- return this;
165
- }
166
- // Implement the overloaded function
167
- exit(injectOrCallback, callback) {
168
- if (typeof injectOrCallback === "function") {
169
- // It is the second signature
170
- this._exitCallback.push(injectOrCallback);
171
- }
172
- else {
173
- // It is the first signature
174
- const inject = this.mapInjectedClassToTypes(injectOrCallback);
175
- this._exitCallback.push((e) => {
176
- callback(e, this.getInjected(e, inject, true));
177
- });
178
- }
179
- return this;
180
- }
181
103
  /**
182
104
  * Register a per-tick callback that runs every time this system's phase
183
105
  * executes, regardless of entity membership.
@@ -196,14 +118,11 @@ export class System {
196
118
  update(ComponentClass, injectOrCallback, callback) {
197
119
  const type = this.world.getComponentType(ComponentClass);
198
120
  if (typeof injectOrCallback === "function") {
199
- // Only ComponentClass and callback are passed
200
121
  callback = injectOrCallback;
201
122
  this.componentUpdateCallbacks.set(type, callback);
202
123
  }
203
124
  else {
204
- // ComponentClass, inject, and callback are passed
205
125
  const inject = injectOrCallback;
206
- //map injected class constructors to component type numbers which are faster to search for later
207
126
  const injectedComponentTypes = inject.map((C) => this.world.getComponentType(C));
208
127
  const cb = (c) => {
209
128
  const injected = [];
@@ -270,83 +189,16 @@ export class System {
270
189
  return this;
271
190
  }
272
191
  /**
273
- * Enable entity tracking: matched entities are inserted into
274
- * {@link entities} as they enter the system and removed as they exit.
275
- *
276
- * Idempotent. Intended to be called during system configuration before
277
- * `world.start()`; entities already matched when `track` is called late
278
- * will not be backfilled.
192
+ * Not supported on `System`. Throws unconditionally.
279
193
  *
280
- * {@link each} implies `track` call this directly only when you want
281
- * the tracked set without an `each` callback.
282
- *
283
- * @returns `this` for chaining.
284
- */
285
- track() {
286
- this._entities ?? (this._entities = new Set());
287
- return this;
288
- }
289
- /**
290
- * Enable sorted entity tracking: matched entities are stored in insertion
291
- * order determined by `compare`, which receives a tuple of resolved
292
- * component instances for each pair of entities being ordered.
293
- *
294
- * Implies {@link track}.
295
- *
296
- * @param components - Component classes to resolve and pass to `compare`.
297
- * @param compare - Returns a negative number, zero, or positive number when
298
- * `a` should sort before, equal to, or after `b`.
299
- * @returns `this` for chaining.
300
- *
301
- * @example
302
- * ```ts
303
- * world.system("Render")
304
- * .requires(Position, Sprite)
305
- * .sort([Position], ([posA], [posB]) => posA.z - posB.z);
306
- * ```
194
+ * Systems are owned by the world for the duration of the session. If you
195
+ * need a temporary reactive set, use a standalone {@link Query} instead.
307
196
  */
308
- sort(components, compare) {
309
- const types = components.map((C) => this.world.getComponentType(C));
310
- this._entities = new OrderedSet((a, b) => compare(types.map((t) => a.get(t, true)), types.map((t) => b.get(t, true))));
311
- return this;
312
- }
313
- queryBuilder(q) {
314
- if (typeof q === "number" ||
315
- (typeof q === "function" && q.prototype instanceof Component)) {
316
- return HAS(this.world, q);
317
- }
318
- else if (typeof q === "function") {
319
- return q;
320
- }
321
- if (q instanceof Array) {
322
- return HAS(this.world, ...q);
323
- }
324
- if ("HAS" in q) {
325
- return this.queryBuilder(q.HAS);
326
- }
327
- if ("HAS_ONLY" in q) {
328
- const v = q.HAS_ONLY;
329
- if (v instanceof Array) {
330
- return HAS_ONLY(this.world, ...v);
331
- }
332
- return HAS_ONLY(this.world, v);
333
- }
334
- if ("AND" in q) {
335
- return AND(...q.AND.map((sq) => this.queryBuilder(sq)));
336
- }
337
- if ("OR" in q) {
338
- return OR(...q.OR.map((sq) => this.queryBuilder(sq)));
339
- }
340
- if ("NOT" in q) {
341
- return NOT(this.queryBuilder(q.NOT));
342
- }
343
- if ("PARENT" in q) {
344
- return PARENT(this.queryBuilder(q.PARENT));
345
- }
346
- throw "Unrecognized query term";
197
+ destroy() {
198
+ throw `destroy() is not supported on System '${this.name}'`;
347
199
  }
348
200
  /**
349
- * Set the entity membership predicate using the {@link SystemQuery} DSL.
201
+ * Set the entity membership predicate using the {@link QueryDSL} DSL.
350
202
  *
351
203
  * Replaces any implicit query derived from `update` watchlists and any
352
204
  * previous `requires` call. After calling `query`, auto-expanding of
@@ -357,7 +209,7 @@ export class System {
357
209
  * to be present on every matched entity, eliminating `| undefined` from
358
210
  * those positions. It has no effect at runtime.
359
211
  *
360
- * @param q - A {@link SystemQuery} expression.
212
+ * @param q - A {@link QueryDSL} expression.
361
213
  * @param _guaranteed - Component classes guaranteed present on every matched
362
214
  * entity (type hint only — not validated at runtime).
363
215
  * @returns `this` for chaining.
@@ -372,8 +224,7 @@ export class System {
372
224
  * ```
373
225
  */
374
226
  query(q, _guaranteed) {
375
- this._belongs = this.queryBuilder(q);
376
- this.hasQuery = true;
227
+ super.query(q, _guaranteed);
377
228
  return this;
378
229
  }
379
230
  /**
@@ -389,7 +240,7 @@ export class System {
389
240
  * @returns `this` for chaining.
390
241
  */
391
242
  requires(...components) {
392
- this.query(components);
243
+ super.requires(...components);
393
244
  return this;
394
245
  }
395
246
  }
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,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