@openmouse/protocol 0.17.0 → 0.19.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 (59) hide show
  1. package/dist/asus/devices.d.ts +69 -0
  2. package/dist/asus/devices.d.ts.map +1 -0
  3. package/dist/asus/devices.js +148 -0
  4. package/dist/asus/devices.js.map +1 -0
  5. package/dist/asus/index.d.ts +42 -35
  6. package/dist/asus/index.d.ts.map +1 -1
  7. package/dist/asus/index.js +155 -184
  8. package/dist/asus/index.js.map +1 -1
  9. package/dist/drivers/asus/hid.d.ts +9 -3
  10. package/dist/drivers/asus/hid.d.ts.map +1 -1
  11. package/dist/drivers/asus/hid.js +148 -248
  12. package/dist/drivers/asus/hid.js.map +1 -1
  13. package/dist/drivers/atk/hid.d.ts +2 -0
  14. package/dist/drivers/atk/hid.d.ts.map +1 -1
  15. package/dist/drivers/atk/hid.js +29 -8
  16. package/dist/drivers/atk/hid.js.map +1 -1
  17. package/dist/drivers/atk/products.d.ts.map +1 -1
  18. package/dist/drivers/atk/products.js +1 -0
  19. package/dist/drivers/atk/products.js.map +1 -1
  20. package/dist/drivers/attackshark/hid.d.ts.map +1 -1
  21. package/dist/drivers/attackshark/hid.js +57 -31
  22. package/dist/drivers/attackshark/hid.js.map +1 -1
  23. package/dist/drivers/endgame/egg-op1-hid.d.ts +14 -2
  24. package/dist/drivers/endgame/egg-op1-hid.d.ts.map +1 -1
  25. package/dist/drivers/endgame/egg-op1-hid.js +102 -17
  26. package/dist/drivers/endgame/egg-op1-hid.js.map +1 -1
  27. package/dist/drivers/gwolves/products.d.ts.map +1 -1
  28. package/dist/drivers/gwolves/products.js +2 -1
  29. package/dist/drivers/gwolves/products.js.map +1 -1
  30. package/dist/drivers/gwolves/xvi-hid.d.ts +15 -1
  31. package/dist/drivers/gwolves/xvi-hid.d.ts.map +1 -1
  32. package/dist/drivers/gwolves/xvi-hid.js +146 -19
  33. package/dist/drivers/gwolves/xvi-hid.js.map +1 -1
  34. package/dist/drivers/lamzu/hid.d.ts +1 -0
  35. package/dist/drivers/lamzu/hid.d.ts.map +1 -1
  36. package/dist/drivers/lamzu/hid.js +21 -0
  37. package/dist/drivers/lamzu/hid.js.map +1 -1
  38. package/dist/drivers/microsoft/hid.d.ts.map +1 -1
  39. package/dist/drivers/microsoft/hid.js +11 -0
  40. package/dist/drivers/microsoft/hid.js.map +1 -1
  41. package/dist/drivers/mouse-types.d.ts +2 -0
  42. package/dist/drivers/mouse-types.d.ts.map +1 -1
  43. package/dist/drivers/registry.d.ts +2 -2
  44. package/dist/drivers/registry.d.ts.map +1 -1
  45. package/dist/drivers/registry.js +2 -2
  46. package/dist/drivers/registry.js.map +1 -1
  47. package/dist/drivers/vendors.d.ts +3 -8
  48. package/dist/drivers/vendors.d.ts.map +1 -1
  49. package/dist/drivers/vendors.js +10 -17
  50. package/dist/drivers/vendors.js.map +1 -1
  51. package/dist/endgame-gear/op1.d.ts +36 -0
  52. package/dist/endgame-gear/op1.d.ts.map +1 -1
  53. package/dist/endgame-gear/op1.js +59 -39
  54. package/dist/endgame-gear/op1.js.map +1 -1
  55. package/dist/lamzu/index.d.ts +3 -1
  56. package/dist/lamzu/index.d.ts.map +1 -1
  57. package/dist/lamzu/index.js +24 -2
  58. package/dist/lamzu/index.js.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,69 @@
1
+ /**
2
+ * ASUS ROG / TUF per-PID capability table.
3
+ *
4
+ * Every ASUS mouse from the Gladius II onward speaks the same 64-byte
5
+ * protocol (`12 xx` reads, `51 31` settings, `51 28` lighting, `50 03` save).
6
+ * What differs per model, and what this table records, is how many DPI stages
7
+ * the settings block holds, the DPI step, and which optional commands exist.
8
+ *
9
+ * ## Provenance
10
+ *
11
+ * Only `verified: true` entries have been exercised on hardware by this
12
+ * project. The rest are transcribed facts, not a tested driver:
13
+ *
14
+ * - G-Helper (seerge/g-helper, `app/Peripherals/Mouse/Models/*.cs`): product
15
+ * ids, stage counts, DPI ranges and steps, profile counts, zones, and which
16
+ * settings each model exposes.
17
+ * - libratbag (`data/devices/asus-*.device`): cross-checks for the Strix
18
+ * Impact III and Harpe Ace.
19
+ * - OpenRGB (`AsusAuraMouseDevices.h`): lighting zones and effect order, and
20
+ * the only public source for the Gladius II Core.
21
+ *
22
+ * The Gladius II Core has no public DPI data. Its stage count, step and ceiling
23
+ * are taken from the TUF Gaming M5, the same generation with the same
24
+ * 6200-DPI sensor, and profiles are held at 1 until an owner confirms more.
25
+ *
26
+ * ## Why an unverified entry is safe to ship
27
+ *
28
+ * Every setter reads the value back. A wrong stage count or step shows up as
29
+ * a read-back mismatch, never as a silent success, and none of these commands
30
+ * touch firmware or calibration except the lift-off write, which is only
31
+ * enabled where G-Helper already sends it.
32
+ *
33
+ * ## Deliberately absent
34
+ *
35
+ * The ROG Omni receiver (`0x1ace`) is shared by several mice and needs a model
36
+ * identification handshake before any of this applies.
37
+ */
38
+ /** Effect names, spelled as the shared `MouseLightingMode` values. */
39
+ export type AsusLightingEffect = "Static" | "Breathing single" | "Cycling" | "Spectrum" | "Reactive" | "Wave";
40
+ export interface AsusMouseModel {
41
+ name: string;
42
+ wireless: boolean;
43
+ /** Stages in the settings block; also shifts the rate/debounce/snap fields. */
44
+ dpiStages: 2 | 4;
45
+ minDpi: number;
46
+ maxDpi: number;
47
+ /** Wire value is `dpi / step - 1`. */
48
+ dpiStep: 50 | 100;
49
+ /** DPI is read from the `12 04 02` X/Y block instead of `12 04 00`. */
50
+ dpiXY?: boolean;
51
+ /** A DPI write carries the stage's indicator colour, so it must be resent. */
52
+ dpiColors?: boolean;
53
+ profiles: number;
54
+ debounce: boolean;
55
+ liftOff: boolean;
56
+ battery: boolean;
57
+ /** Zone names in wire order. */
58
+ zones: readonly string[];
59
+ /** Wire byte for each effect the model offers, in display order. */
60
+ lightingModes: Readonly<Partial<Record<AsusLightingEffect, number>>>;
61
+ /** Older firmware scales brightness 0-4, newer 0-100. */
62
+ brightnessMax: 4 | 100;
63
+ /** Older firmware answers `12 03 00` with every zone in one reply. */
64
+ lightingAllZones?: boolean;
65
+ verified: boolean;
66
+ }
67
+ export declare const ASUS_MICE: ReadonlyMap<number, AsusMouseModel>;
68
+ export declare const ASUS_PRODUCT_IDS: readonly number[];
69
+ //# sourceMappingURL=devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../src/asus/devices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAE9G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,OAAO,EAAE,EAAE,GAAG,GAAG,CAAC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,oEAAoE;IACpE,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,yDAAyD;IACzD,aAAa,EAAE,CAAC,GAAG,GAAG,CAAC;IACvB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AA6DD,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAsDxD,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAA0B,CAAC"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * ASUS ROG / TUF per-PID capability table.
3
+ *
4
+ * Every ASUS mouse from the Gladius II onward speaks the same 64-byte
5
+ * protocol (`12 xx` reads, `51 31` settings, `51 28` lighting, `50 03` save).
6
+ * What differs per model, and what this table records, is how many DPI stages
7
+ * the settings block holds, the DPI step, and which optional commands exist.
8
+ *
9
+ * ## Provenance
10
+ *
11
+ * Only `verified: true` entries have been exercised on hardware by this
12
+ * project. The rest are transcribed facts, not a tested driver:
13
+ *
14
+ * - G-Helper (seerge/g-helper, `app/Peripherals/Mouse/Models/*.cs`): product
15
+ * ids, stage counts, DPI ranges and steps, profile counts, zones, and which
16
+ * settings each model exposes.
17
+ * - libratbag (`data/devices/asus-*.device`): cross-checks for the Strix
18
+ * Impact III and Harpe Ace.
19
+ * - OpenRGB (`AsusAuraMouseDevices.h`): lighting zones and effect order, and
20
+ * the only public source for the Gladius II Core.
21
+ *
22
+ * The Gladius II Core has no public DPI data. Its stage count, step and ceiling
23
+ * are taken from the TUF Gaming M5, the same generation with the same
24
+ * 6200-DPI sensor, and profiles are held at 1 until an owner confirms more.
25
+ *
26
+ * ## Why an unverified entry is safe to ship
27
+ *
28
+ * Every setter reads the value back. A wrong stage count or step shows up as
29
+ * a read-back mismatch, never as a silent success, and none of these commands
30
+ * touch firmware or calibration except the lift-off write, which is only
31
+ * enabled where G-Helper already sends it.
32
+ *
33
+ * ## Deliberately absent
34
+ *
35
+ * The ROG Omni receiver (`0x1ace`) is shared by several mice and needs a model
36
+ * identification handshake before any of this applies.
37
+ */
38
+ const GLADIUS_II_MODES = {
39
+ Static: 0x00,
40
+ "Breathing single": 0x01,
41
+ Cycling: 0x02,
42
+ Spectrum: 0x03,
43
+ Reactive: 0x04,
44
+ Wave: 0x05,
45
+ };
46
+ // These models put Reactive at 0x03 (G-Helper and OpenRGB agree).
47
+ const TUF_MODES = {
48
+ Static: 0x00,
49
+ "Breathing single": 0x01,
50
+ Cycling: 0x02,
51
+ Reactive: 0x03,
52
+ };
53
+ const MODERN_MODES = {
54
+ Static: 0x00,
55
+ "Breathing single": 0x01,
56
+ Cycling: 0x02,
57
+ Reactive: 0x04,
58
+ };
59
+ const HARPE_ACE_AIM_LAB = {
60
+ name: "ROG Harpe Ace Aim Lab Edition",
61
+ dpiStages: 4,
62
+ minDpi: 50,
63
+ maxDpi: 36_000,
64
+ dpiStep: 50,
65
+ dpiXY: true,
66
+ dpiColors: true,
67
+ profiles: 5,
68
+ debounce: true,
69
+ liftOff: true,
70
+ battery: true,
71
+ zones: ["Scroll wheel"],
72
+ lightingModes: MODERN_MODES,
73
+ brightnessMax: 100,
74
+ verified: false,
75
+ };
76
+ const TUF_M5 = {
77
+ name: "TUF Gaming M5",
78
+ wireless: false,
79
+ dpiStages: 2,
80
+ minDpi: 100,
81
+ maxDpi: 6_200,
82
+ dpiStep: 100,
83
+ profiles: 3,
84
+ debounce: true,
85
+ liftOff: false,
86
+ battery: false,
87
+ zones: ["Logo"],
88
+ lightingModes: TUF_MODES,
89
+ brightnessMax: 4,
90
+ verified: false,
91
+ };
92
+ export const ASUS_MICE = new Map([
93
+ [0x1845, {
94
+ name: "ROG Gladius II",
95
+ wireless: false,
96
+ dpiStages: 2,
97
+ minDpi: 100,
98
+ maxDpi: 12_000,
99
+ dpiStep: 100,
100
+ profiles: 3,
101
+ debounce: true,
102
+ liftOff: true,
103
+ battery: false,
104
+ zones: ["Logo", "Scroll wheel", "Underglow"],
105
+ lightingModes: GLADIUS_II_MODES,
106
+ brightnessMax: 4,
107
+ lightingAllZones: true,
108
+ verified: true,
109
+ }],
110
+ [0x18dd, { ...TUF_M5, name: "ROG Gladius II Core", profiles: 1, zones: ["Logo", "Scroll wheel"] }],
111
+ [0x1898, TUF_M5],
112
+ [0x1910, {
113
+ name: "TUF Gaming M3",
114
+ wireless: false,
115
+ dpiStages: 4,
116
+ minDpi: 100,
117
+ maxDpi: 7_000,
118
+ dpiStep: 100,
119
+ profiles: 1,
120
+ debounce: true,
121
+ liftOff: false,
122
+ battery: false,
123
+ zones: ["Logo"],
124
+ lightingModes: TUF_MODES,
125
+ brightnessMax: 4,
126
+ verified: false,
127
+ }],
128
+ [0x1a88, {
129
+ name: "ROG Strix Impact III",
130
+ wireless: false,
131
+ dpiStages: 4,
132
+ minDpi: 100,
133
+ maxDpi: 12_000,
134
+ dpiStep: 50,
135
+ profiles: 3,
136
+ debounce: false,
137
+ liftOff: false,
138
+ battery: false,
139
+ zones: ["Logo", "Scroll wheel"],
140
+ lightingModes: MODERN_MODES,
141
+ brightnessMax: 100,
142
+ verified: false,
143
+ }],
144
+ [0x1a92, { ...HARPE_ACE_AIM_LAB, wireless: false }],
145
+ [0x1a94, { ...HARPE_ACE_AIM_LAB, wireless: true }],
146
+ ]);
147
+ export const ASUS_PRODUCT_IDS = [...ASUS_MICE.keys()];
148
+ //# sourceMappingURL=devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/asus/devices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAiCH,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,IAAI;IACxB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;CACF,CAAC;AAEX,kEAAkE;AAClE,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,IAAI;IACxB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACN,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,IAA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AQ,EAAE,IAAI,EAAE,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC"}
@@ -1,52 +1,59 @@
1
+ import type { AsusMouseModel } from "./devices.js";
2
+ export * from "./devices.js";
1
3
  export declare const ASUS_VENDOR_ID = 2821;
2
- export declare const ROG_GLADIUS_II_PRODUCT_ID = 6213;
3
- export declare const ASUS_GLADIUS_II_USAGE_PAGE = 65281;
4
- export declare const ASUS_GLADIUS_II_USAGE = 1;
4
+ export declare const ASUS_USAGE_PAGE = 65281;
5
+ export declare const ASUS_USAGE = 1;
5
6
  export declare const ASUS_REPORT_ID = 0;
6
7
  export declare const ASUS_REPORT_SIZE = 64;
7
- export declare const GLADIUS_II_MIN_DPI = 100;
8
- export declare const GLADIUS_II_MAX_DPI = 12000;
9
- export declare const GLADIUS_II_DPI_STEP = 100;
10
- export declare const GLADIUS_II_PROFILE_COUNT = 3;
11
- export declare const GLADIUS_II_POLLING_RATES: readonly [125, 250, 500, 1000];
12
- export declare const GLADIUS_II_DEBOUNCE_MS: readonly [12, 16, 20, 24, 28, 32];
13
- export type GladiusIILiftOffDistance = "Low" | "High";
14
- export interface GladiusIISettings {
15
- dpiStages: [number, number];
8
+ export declare const ASUS_POLLING_RATES: readonly [125, 250, 500, 1000];
9
+ export declare const ASUS_DEBOUNCE_MS: readonly [12, 16, 20, 24, 28, 32];
10
+ export type AsusLiftOffDistance = "Low" | "High";
11
+ export interface AsusSettings {
12
+ dpiStages: number[];
16
13
  pollingRateHz: number;
17
14
  debounceMs: number | null;
18
15
  angleSnapping: boolean;
19
16
  }
20
- export interface GladiusIIProfile {
17
+ export interface AsusProfile {
21
18
  onboardProfile: number;
22
19
  activeDpiStage: number;
23
20
  }
24
- export interface GladiusIIRawLightingZone {
25
- zone: number;
21
+ export interface AsusRawLightingZone {
26
22
  mode: number;
23
+ /** Wire scale, 0 to the model's `brightnessMax`. */
27
24
  brightness: number;
28
25
  red: number;
29
26
  green: number;
30
27
  blue: number;
31
- direction: number;
32
- randomColor: boolean;
33
- speed: number;
34
28
  }
35
- export declare function decodeGladiusIISettings(data: Uint8Array): GladiusIISettings;
36
- export declare function decodeGladiusIIProfile(data: Uint8Array): GladiusIIProfile;
37
- export declare function decodeGladiusIILiftOffDistance(data: Uint8Array): GladiusIILiftOffDistance;
38
- export declare function decodeGladiusIILighting(data: Uint8Array): GladiusIIRawLightingZone[];
39
- export declare function gladiusIIReadSettingsRequest(): Uint8Array;
40
- export declare function gladiusIIReadProfileRequest(): Uint8Array;
41
- export declare function gladiusIIReadLiftOffRequest(): Uint8Array;
42
- export declare function gladiusIIReadLightingRequest(): Uint8Array;
43
- export declare function gladiusIISetDpiRequest(stage: number, dpi: number): Uint8Array;
44
- export declare function gladiusIISetActiveDpiStageRequest(stage: number): Uint8Array;
45
- export declare function gladiusIISetPollingRateRequest(pollingRateHz: number): Uint8Array;
46
- export declare function gladiusIISetProfileRequest(profile: number): Uint8Array;
47
- export declare function gladiusIISetAngleSnappingRequest(enabled: boolean): Uint8Array;
48
- export declare function gladiusIISetDebounceRequest(milliseconds: number): Uint8Array;
49
- export declare function gladiusIISetLiftOffRequest(value: GladiusIILiftOffDistance): Uint8Array;
50
- export declare function gladiusIISetLightingRequest(zone: number, mode: number, brightness: number, red: number, green: number, blue: number, direction?: number, randomColor?: number, speed?: number): Uint8Array;
51
- export declare function gladiusIISaveRequest(): Uint8Array;
29
+ export interface AsusBattery {
30
+ percent: number;
31
+ charging: boolean;
32
+ }
33
+ export type AsusRgb = readonly [number, number, number];
34
+ export declare function asusDecodeSettings(model: AsusMouseModel, data: Uint8Array): AsusSettings;
35
+ /** X values from the `12 04 02` block, four bytes (X, Y) per stage. */
36
+ export declare function asusDecodeDpiXY(model: AsusMouseModel, data: Uint8Array): number[];
37
+ export declare function asusDecodeDpiColors(model: AsusMouseModel, data: Uint8Array): AsusRgb[];
38
+ export declare function asusDecodeProfile(model: AsusMouseModel, data: Uint8Array): AsusProfile;
39
+ export declare function asusDecodeLiftOffDistance(data: Uint8Array): AsusLiftOffDistance;
40
+ export declare function asusDecodeLighting(model: AsusMouseModel, data: Uint8Array, zone: number): AsusRawLightingZone;
41
+ export declare function asusDecodeBattery(data: Uint8Array): AsusBattery;
42
+ export declare function asusReadSettingsRequest(): Uint8Array;
43
+ export declare function asusReadDpiXYRequest(): Uint8Array;
44
+ export declare function asusReadDpiColorsRequest(): Uint8Array;
45
+ export declare function asusReadProfileRequest(): Uint8Array;
46
+ export declare function asusReadLiftOffRequest(): Uint8Array;
47
+ export declare function asusReadLightingRequest(model: AsusMouseModel, zone: number): Uint8Array;
48
+ export declare function asusReadBatteryRequest(): Uint8Array;
49
+ export declare function asusSetDpiRequest(model: AsusMouseModel, stage: number, dpi: number, color?: AsusRgb): Uint8Array;
50
+ export declare function asusSetActiveDpiStageRequest(model: AsusMouseModel, stage: number): Uint8Array;
51
+ export declare function asusSetPollingRateRequest(model: AsusMouseModel, pollingRateHz: number): Uint8Array;
52
+ export declare function asusSetProfileRequest(model: AsusMouseModel, profile: number): Uint8Array;
53
+ export declare function asusSetAngleSnappingRequest(model: AsusMouseModel, enabled: boolean): Uint8Array;
54
+ export declare function asusSetDebounceRequest(model: AsusMouseModel, milliseconds: number): Uint8Array;
55
+ /** Also resets the surface calibration; ASUS has no separate lift-off command. */
56
+ export declare function asusSetLiftOffRequest(value: AsusLiftOffDistance): Uint8Array;
57
+ export declare function asusSetLightingRequest(model: AsusMouseModel, zone: number, mode: number, brightness: number, red: number, green: number, blue: number, speed?: number): Uint8Array;
58
+ export declare function asusSaveRequest(): Uint8Array;
52
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asus/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,OAAS,CAAC;AAErC,eAAO,MAAM,yBAAyB,OAAS,CAAC;AAEhD,eAAO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