like2d 2.7.4 → 2.9.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 (77) hide show
  1. package/README.md +34 -35
  2. package/dist/core/audio.d.ts +12 -9
  3. package/dist/core/audio.d.ts.map +1 -1
  4. package/dist/core/audio.js +7 -4
  5. package/dist/core/canvas.d.ts +58 -0
  6. package/dist/core/canvas.d.ts.map +1 -0
  7. package/dist/core/canvas.js +209 -0
  8. package/dist/core/events.d.ts +92 -7
  9. package/dist/core/events.d.ts.map +1 -1
  10. package/dist/core/events.js +20 -0
  11. package/dist/core/gamepad-mapping.d.ts +57 -18
  12. package/dist/core/gamepad-mapping.d.ts.map +1 -1
  13. package/dist/core/gamepad-mapping.js +23 -223
  14. package/dist/core/gamepad.d.ts +34 -58
  15. package/dist/core/gamepad.d.ts.map +1 -1
  16. package/dist/core/gamepad.js +79 -213
  17. package/dist/core/graphics.d.ts +175 -64
  18. package/dist/core/graphics.d.ts.map +1 -1
  19. package/dist/core/graphics.js +294 -198
  20. package/dist/core/input-state.d.ts +2 -2
  21. package/dist/core/input-state.d.ts.map +1 -1
  22. package/dist/core/input.d.ts +22 -15
  23. package/dist/core/input.d.ts.map +1 -1
  24. package/dist/core/input.js +25 -37
  25. package/dist/core/keyboard.d.ts +7 -7
  26. package/dist/core/keyboard.d.ts.map +1 -1
  27. package/dist/core/keyboard.js +24 -31
  28. package/dist/core/like.d.ts +98 -44
  29. package/dist/core/like.d.ts.map +1 -1
  30. package/dist/core/like.js +8 -0
  31. package/dist/core/mouse.d.ts +45 -22
  32. package/dist/core/mouse.d.ts.map +1 -1
  33. package/dist/core/mouse.js +90 -78
  34. package/dist/core/timer.d.ts +2 -5
  35. package/dist/core/timer.d.ts.map +1 -1
  36. package/dist/core/timer.js +2 -14
  37. package/dist/engine.d.ts +61 -11
  38. package/dist/engine.d.ts.map +1 -1
  39. package/dist/engine.js +119 -102
  40. package/dist/index.d.ts +42 -21
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +35 -14
  43. package/dist/math/index.d.ts +2 -0
  44. package/dist/math/index.d.ts.map +1 -0
  45. package/dist/math/index.js +1 -0
  46. package/dist/math/rect.d.ts +71 -0
  47. package/dist/math/rect.d.ts.map +1 -0
  48. package/dist/{core → math}/rect.js +8 -0
  49. package/dist/math/vector2.d.ts +78 -0
  50. package/dist/math/vector2.d.ts.map +1 -0
  51. package/dist/{core → math}/vector2.js +24 -0
  52. package/dist/prefab-scenes/index.d.ts +7 -0
  53. package/dist/prefab-scenes/index.d.ts.map +1 -0
  54. package/dist/prefab-scenes/index.js +6 -0
  55. package/dist/prefab-scenes/startScreen.d.ts +59 -0
  56. package/dist/prefab-scenes/startScreen.d.ts.map +1 -0
  57. package/dist/{scenes/startup.js → prefab-scenes/startScreen.js} +47 -7
  58. package/dist/scene.d.ts +103 -5
  59. package/dist/scene.d.ts.map +1 -1
  60. package/dist/scene.js +28 -1
  61. package/package.json +18 -2
  62. package/dist/core/canvas-config.d.ts +0 -22
  63. package/dist/core/canvas-config.d.ts.map +0 -1
  64. package/dist/core/canvas-config.js +0 -14
  65. package/dist/core/canvas-manager.d.ts +0 -25
  66. package/dist/core/canvas-manager.d.ts.map +0 -1
  67. package/dist/core/canvas-manager.js +0 -178
  68. package/dist/core/gamepad-buttons.d.ts +0 -23
  69. package/dist/core/gamepad-buttons.d.ts.map +0 -1
  70. package/dist/core/gamepad-buttons.js +0 -36
  71. package/dist/core/rect.d.ts +0 -26
  72. package/dist/core/rect.d.ts.map +0 -1
  73. package/dist/core/vector2.d.ts +0 -26
  74. package/dist/core/vector2.d.ts.map +0 -1
  75. package/dist/gamecontrollerdb.txt +0 -2221
  76. package/dist/scenes/startup.d.ts +0 -18
  77. package/dist/scenes/startup.d.ts.map +0 -1
@@ -1,19 +1,58 @@
1
- export interface ButtonMapping {
2
- toStandard: Map<number, number>;
3
- controllerName: string;
4
- hasMapping: boolean;
5
- vendor: number | null;
6
- product: number | null;
7
- }
8
- export declare class GamepadMapping {
9
- private dbLoaded;
10
- loadDatabase(): Promise<void>;
11
- loadDatabaseFromText(content: string): void;
12
- /**
13
- * Get button mapping for a specific gamepad
14
- */
15
- getMapping(gamepad: Gamepad): ButtonMapping;
16
- private extractVendorProduct;
17
- }
18
- export declare const gamepadMapping: GamepadMapping;
1
+ declare const buttonMap: readonly [{
2
+ readonly like: "ButtonBottom";
3
+ readonly num: number;
4
+ }, {
5
+ readonly like: "ButtonRight";
6
+ readonly num: 1;
7
+ }, {
8
+ readonly like: "ButtonLeft";
9
+ readonly num: 2;
10
+ }, {
11
+ readonly like: "ButtonTop";
12
+ readonly num: 3;
13
+ }, {
14
+ readonly like: "ButtonL1";
15
+ readonly num: 4;
16
+ }, {
17
+ readonly like: "ButtonR1";
18
+ readonly num: 5;
19
+ }, {
20
+ readonly like: "ButtonL2";
21
+ readonly num: 6;
22
+ }, {
23
+ readonly like: "ButtonR2";
24
+ readonly num: 7;
25
+ }, {
26
+ readonly like: "ButtonMenuLeft";
27
+ readonly num: 8;
28
+ }, {
29
+ readonly like: "ButtonMenuRight";
30
+ readonly num: 9;
31
+ }, {
32
+ readonly like: "ButtonMenuCenter";
33
+ readonly num: 16;
34
+ }, {
35
+ readonly like: "ButtonLeftStick";
36
+ readonly num: 10;
37
+ }, {
38
+ readonly like: "ButtonRightStick";
39
+ readonly num: 11;
40
+ }, {
41
+ readonly like: "DPadUp";
42
+ readonly num: 12;
43
+ }, {
44
+ readonly like: "DPadDown";
45
+ readonly num: 13;
46
+ }, {
47
+ readonly like: "DPadLeft";
48
+ readonly num: 14;
49
+ }, {
50
+ readonly like: "DPadRight";
51
+ readonly num: 15;
52
+ }];
53
+ type extraButton = `Button${number}`;
54
+ export type LikeButton = (typeof buttonMap)[number]["like"] | extraButton;
55
+ export declare const numberToName: Map<number, LikeButton>;
56
+ export declare const nameToNumber: Map<LikeButton, number>;
57
+ export {};
19
58
  //# sourceMappingURL=gamepad-mapping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gamepad-mapping.d.ts","sourceRoot":"","sources":["../../src/core/gamepad-mapping.ts"],"names":[],"mappings":"AA+HA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAS;IAEnB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BnC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK3C;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa;IAsC3C,OAAO,CAAC,oBAAoB;CAuB7B;AAUD,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
1
+ {"version":3,"file":"gamepad-mapping.d.ts","sourceRoot":"","sources":["../../src/core/gamepad-mapping.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS;;kBACqB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBhC,CAAC;AAEX,KAAK,WAAW,GAAG,SAAS,MAAM,EAAE,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;AAE1E,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAEhD,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAEhD,CAAC"}
@@ -1,223 +1,23 @@
1
- // Gamepad button mapping layer
2
- // Bridges SDL database mappings with our internal button naming system
3
- import { GP } from './gamepad-buttons';
4
- // Map SDL button names to our standard button indices
5
- const SDL_TO_GP = {
6
- 'a': GP.Bottom,
7
- 'b': GP.Right,
8
- 'x': GP.Left,
9
- 'y': GP.Top,
10
- 'leftshoulder': GP.LB,
11
- 'rightshoulder': GP.RB,
12
- 'lefttrigger': GP.LT,
13
- 'righttrigger': GP.RT,
14
- 'back': GP.Back,
15
- 'start': GP.Start,
16
- 'guide': GP.Guide,
17
- 'leftstick': GP.LS,
18
- 'rightstick': GP.RS,
19
- 'dpup': GP.DUp,
20
- 'dpdown': GP.DDown,
21
- 'dpleft': GP.DLeft,
22
- 'dpright': GP.DRight,
23
- };
24
- // Internal database for storing pre-built controller mappings
25
- class GamepadDatabase {
26
- constructor() {
27
- // vendorProductKey -> mapping
28
- Object.defineProperty(this, "mappings", {
29
- enumerable: true,
30
- configurable: true,
31
- writable: true,
32
- value: new Map()
33
- });
34
- Object.defineProperty(this, "loaded", {
35
- enumerable: true,
36
- configurable: true,
37
- writable: true,
38
- value: false
39
- });
40
- }
41
- load(dbContent) {
42
- this.mappings.clear();
43
- const lines = dbContent.split('\n');
44
- for (const line of lines) {
45
- const trimmed = line.trim();
46
- if (!trimmed || trimmed.startsWith('#')) {
47
- continue;
48
- }
49
- const mapping = this.parseLine(trimmed);
50
- if (mapping) {
51
- // Extract vendor/product from GUID and store mapping
52
- const guid = line.split(',')[0].toLowerCase().trim();
53
- const vpKey = this.extractVendorProductKey(guid);
54
- if (vpKey !== null && !this.mappings.has(vpKey)) {
55
- this.mappings.set(vpKey, mapping);
56
- }
57
- }
58
- }
59
- this.loaded = true;
60
- }
61
- extractVendorProductKey(guid) {
62
- if (guid.length < 20)
63
- return null;
64
- const vendorHex = guid.substring(8, 12);
65
- const productHex = guid.substring(16, 20);
66
- const vendor = parseInt(vendorHex.substring(2, 4) + vendorHex.substring(0, 2), 16);
67
- const product = parseInt(productHex.substring(2, 4) + productHex.substring(0, 2), 16);
68
- if (isNaN(vendor) || isNaN(product))
69
- return null;
70
- return 0x10000 * vendor + product;
71
- }
72
- isLoaded() {
73
- return this.loaded;
74
- }
75
- getMappingCount() {
76
- return this.mappings.size;
77
- }
78
- getMapping(vendor, product) {
79
- const key = 0x10000 * vendor + product;
80
- return this.mappings.get(key);
81
- }
82
- parseLine(line) {
83
- const parts = line.split(',');
84
- if (parts.length < 3) {
85
- return null;
86
- }
87
- const name = parts[1].trim();
88
- const toStandard = new Map();
89
- // Parse mapping pairs (key:value)
90
- for (let i = 2; i < parts.length; i++) {
91
- const part = parts[i].trim();
92
- if (!part || part.startsWith('platform:'))
93
- continue;
94
- const colonIndex = part.indexOf(':');
95
- if (colonIndex === -1)
96
- continue;
97
- const sdlName = part.substring(0, colonIndex).trim();
98
- const value = part.substring(colonIndex + 1).trim();
99
- if (!sdlName || !value)
100
- continue;
101
- // Only handle button mappings (b0, b1, etc.)
102
- if (value.startsWith('b')) {
103
- const controllerIndex = parseInt(value.substring(1), 10);
104
- const gpIndex = SDL_TO_GP[sdlName];
105
- if (!isNaN(controllerIndex) && gpIndex !== undefined) {
106
- toStandard.set(controllerIndex, gpIndex);
107
- }
108
- }
109
- }
110
- return { name, toStandard };
111
- }
112
- }
113
- // Singleton instance
114
- const gamepadDatabase = new GamepadDatabase();
115
- export class GamepadMapping {
116
- constructor() {
117
- Object.defineProperty(this, "dbLoaded", {
118
- enumerable: true,
119
- configurable: true,
120
- writable: true,
121
- value: false
122
- });
123
- }
124
- async loadDatabase() {
125
- if (this.dbLoaded)
126
- return;
127
- try {
128
- const res = await fetch('./gamecontrollerdb.txt');
129
- if (res.ok) {
130
- const text = await res.text();
131
- // Validate it's actually the DB file, not HTML error page
132
- if (text.startsWith('# Game Controller DB') || text.includes('03000000')) {
133
- gamepadDatabase.load(text);
134
- this.dbLoaded = true;
135
- }
136
- }
137
- }
138
- catch { }
139
- if (!this.dbLoaded) {
140
- try {
141
- // @ts-ignore - Vite handles ?raw imports
142
- const module = await import('../gamecontrollerdb.txt?raw');
143
- if (typeof module.default === 'string') {
144
- gamepadDatabase.load(module.default);
145
- this.dbLoaded = true;
146
- }
147
- }
148
- catch { }
149
- }
150
- if (this.dbLoaded) {
151
- console.log(`[Gamepad] Loaded ${gamepadDatabase.getMappingCount()} controller mappings`);
152
- }
153
- }
154
- loadDatabaseFromText(content) {
155
- gamepadDatabase.load(content);
156
- this.dbLoaded = true;
157
- }
158
- /**
159
- * Get button mapping for a specific gamepad
160
- */
161
- getMapping(gamepad) {
162
- const vp = this.extractVendorProduct(gamepad);
163
- // If browser provides "standard" mapping, use identity mapping
164
- if (gamepad.mapping === 'standard') {
165
- return {
166
- toStandard: IDENTITY_MAP,
167
- controllerName: gamepad.id,
168
- hasMapping: true,
169
- vendor: vp?.vendor ?? null,
170
- product: vp?.product ?? null,
171
- };
172
- }
173
- // Look up in database
174
- if (vp && this.dbLoaded) {
175
- const dbMapping = gamepadDatabase.getMapping(vp.vendor, vp.product);
176
- if (dbMapping) {
177
- return {
178
- toStandard: dbMapping.toStandard,
179
- controllerName: dbMapping.name,
180
- hasMapping: true,
181
- vendor: vp.vendor,
182
- product: vp.product,
183
- };
184
- }
185
- }
186
- // No mapping found - use identity
187
- return {
188
- toStandard: IDENTITY_MAP,
189
- controllerName: gamepad.id,
190
- hasMapping: false,
191
- vendor: vp?.vendor ?? null,
192
- product: vp?.product ?? null,
193
- };
194
- }
195
- extractVendorProduct(gamepad) {
196
- const id = gamepad.id;
197
- const vendorProductMatch = id.match(/Vendor:\s*([0-9a-fA-F]+)\s+Product:\s*([0-9a-fA-F]+)/i);
198
- if (vendorProductMatch) {
199
- const vendor = parseInt(vendorProductMatch[1], 16);
200
- const product = parseInt(vendorProductMatch[2], 16);
201
- if (!isNaN(vendor) && !isNaN(product)) {
202
- return { vendor, product };
203
- }
204
- }
205
- const hexMatch = id.match(/^([0-9a-fA-F]{4})[\s-]+([0-9a-fA-F]{4})/);
206
- if (hexMatch) {
207
- const vendor = parseInt(hexMatch[1], 16);
208
- const product = parseInt(hexMatch[2], 16);
209
- if (!isNaN(vendor) && !isNaN(product)) {
210
- return { vendor, product };
211
- }
212
- }
213
- return null;
214
- }
215
- }
216
- // Reusable identity map for standard/unmapped controllers
217
- const IDENTITY_MAP = new Map([
218
- [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7],
219
- [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15],
220
- [16, 16], [17, 17], [18, 18], [19, 19],
221
- ]);
222
- // Singleton instance
223
- export const gamepadMapping = new GamepadMapping();
1
+ // Friendlier names for the buttons.
2
+ // https://www.w3.org/TR/gamepad/#dfn-standard-gamepad
3
+ const buttonMap = [
4
+ { like: "ButtonBottom", num: 0 },
5
+ { like: "ButtonRight", num: 1 },
6
+ { like: "ButtonLeft", num: 2 },
7
+ { like: "ButtonTop", num: 3 },
8
+ { like: "ButtonL1", num: 4 },
9
+ { like: "ButtonR1", num: 5 },
10
+ { like: "ButtonL2", num: 6 },
11
+ { like: "ButtonR2", num: 7 },
12
+ { like: "ButtonMenuLeft", num: 8 },
13
+ { like: "ButtonMenuRight", num: 9 },
14
+ { like: "ButtonMenuCenter", num: 16 },
15
+ { like: "ButtonLeftStick", num: 10 },
16
+ { like: "ButtonRightStick", num: 11 },
17
+ { like: "DPadUp", num: 12 },
18
+ { like: "DPadDown", num: 13 },
19
+ { like: "DPadLeft", num: 14 },
20
+ { like: "DPadRight", num: 15 },
21
+ ];
22
+ export const numberToName = new Map(buttonMap.map(({ like, num }) => [num, like]));
23
+ export const nameToNumber = new Map(buttonMap.map(({ like, num }) => [like, num]));
@@ -1,61 +1,37 @@
1
- import { getGPName, GP } from './gamepad-buttons';
2
- import { ButtonMapping } from './gamepad-mapping';
3
- export { GP, getGPName };
4
- export interface StickPosition {
5
- x: number;
6
- y: number;
7
- }
8
- export type ButtonCallback = (gamepadIndex: number, buttonIndex: number, buttonName: string, pressed: boolean) => void;
9
- export declare class Gamepad {
1
+ import { LikeButton } from './gamepad-mapping';
2
+ import { EngineDispatch } from '../engine';
3
+ export type { LikeButton };
4
+ /** A selector for a gamepad. */
5
+ export type GamepadTarget = number;
6
+ export type ButtonTracker = {
7
+ prev: Set<number>;
8
+ current: Set<number>;
9
+ };
10
+ /** LIKE Gamepad Wrapper
11
+ *
12
+ * - Allows events/callbacks to be sent from joy buttons
13
+ * - Extends stateful API with justPressed
14
+ *
15
+ * # Examples
16
+ *
17
+ * ### Binding events
18
+ * ```ts
19
+ * like.gamepadpressed = (idx: number, _num: number, button: string) => {
20
+ * console.log(`Button ${button} pressed on controller ${idx}`);
21
+ * }
22
+ * ```
23
+ */
24
+ export declare class GamepadInternal {
25
+ private dispatch;
10
26
  private buttonTrackers;
11
- private connectedGamepads;
12
- private buttonMappings;
13
- onButtonEvent?: (gamepadIndex: number, buttonIndex: number, buttonName: string, pressed: boolean) => void;
14
- private onConnected?;
15
- private onDisconnected?;
16
- private gamepadConnectedHandler;
17
- private gamepadDisconnectedHandler;
18
- private blurHandler;
19
- constructor();
20
- private handleGamepadConnected;
21
- private handleGamepadDisconnected;
22
- private handleBlur;
23
- setCallbacks(callbacks: {
24
- onConnected?: (gamepad: globalThis.Gamepad) => void;
25
- onDisconnected?: (gamepadIndex: number) => void;
26
- }): void;
27
- dispose(): void;
28
- init(): Promise<void>;
29
- private onGamepadConnectedInternal;
30
- private onGamepadDisconnectedInternal;
31
- update(): void;
32
- isConnected(gamepadIndex: number): boolean;
33
- /**
34
- * Check if a button is currently pressed on a specific gamepad
35
- * Uses mapped button indices (standard layout)
36
- */
37
- isButtonDown(gamepadIndex: number, buttonIndex: number): boolean;
38
- isButtonDownOnAny(buttonIndex: number): boolean;
39
- getPressedButtons(gamepadIndex: number): Set<number>;
40
- getConnectedGamepads(): number[];
41
- /**
42
- * Get the raw Gamepad object for a specific index
43
- */
44
- getGamepad(gamepadIndex: number): globalThis.Gamepad | undefined;
45
- /**
46
- * Get the button mapping for a specific gamepad
47
- */
48
- getButtonMapping(gamepadIndex: number): ButtonMapping | undefined;
49
- /**
50
- * Check if a gamepad has a known mapping from the database
51
- */
52
- hasMapping(gamepadIndex: number): boolean;
53
- /**
54
- * Get the controller name for a specific gamepad
55
- */
56
- getControllerName(gamepadIndex: number): string | undefined;
57
- getAxis(gamepadIndex: number, axisIndex: number): number;
58
- getLeftStick(gamepadIndex: number): StickPosition;
59
- getRightStick(gamepadIndex: number): StickPosition;
27
+ private abort;
28
+ constructor(dispatch: EngineDispatch);
29
+ _update(): void;
30
+ isButtonDown(target: GamepadTarget, buttonRaw: number | LikeButton): boolean | undefined;
31
+ isButtonJustPressed(target: GamepadTarget, buttonRaw: LikeButton): boolean | undefined;
32
+ getGamepad(target: number): Gamepad | null;
33
+ _dispose(): void;
34
+ static getButtonName(button: number | LikeButton): LikeButton;
35
+ static getButtonNumber(button: number | LikeButton): number;
60
36
  }
61
37
  //# sourceMappingURL=gamepad.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gamepad.d.ts","sourceRoot":"","sources":["../../src/core/gamepad.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAkB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAkBD,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAEvH,qBAAa,OAAO;IAClB,OAAO,CAAC,cAAc,CAAgD;IACtE,OAAO,CAAC,iBAAiB,CAAyC;IAClE,OAAO,CAAC,cAAc,CAAoC;IACnD,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAA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