@homebridge-plugins/homebridge-sharkiq 2.0.0-beta.12 → 2.0.0-beta.13
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/constants.d.ts.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/devices/BaseMatterAccessory.d.ts +63 -0
- package/dist/devices/BaseMatterAccessory.d.ts.map +1 -0
- package/dist/devices/BaseMatterAccessory.js +100 -0
- package/dist/devices/BaseMatterAccessory.js.map +1 -0
- package/dist/devices/RoboticVacuumAccessory.d.ts +53 -28
- package/dist/devices/RoboticVacuumAccessory.d.ts.map +1 -1
- package/dist/devices/RoboticVacuumAccessory.js +316 -308
- package/dist/devices/RoboticVacuumAccessory.js.map +1 -1
- package/dist/devices/index.d.ts +9 -0
- package/dist/devices/index.d.ts.map +1 -0
- package/dist/devices/index.js +8 -0
- package/dist/devices/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/platform.d.ts +32 -32
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +91 -312
- package/dist/platform.js.map +1 -1
- package/docs/variables/default.html +2 -1
- package/package.json +1 -1
- package/dist/errorHandling.d.ts +0 -19
- package/dist/errorHandling.d.ts.map +0 -1
- package/dist/errorHandling.js +0 -27
- package/dist/errorHandling.js.map +0 -1
- package/dist/platformAccessory.d.ts +0 -48
- package/dist/platformAccessory.d.ts.map +0 -1
- package/dist/platformAccessory.js +0 -560
- package/dist/platformAccessory.js.map +0 -1
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;CAKhB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAA;AAEV,eAAO,MAAM,QAAQ;;;;;;CAMX,CAAA"}
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,EAAE;IACV,GAAG,EAAE,EAAE;CACC,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,EAAE;IACV,GAAG,EAAE,EAAE;CACC,CAAA;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,GAAG;IACxB,8BAA8B,EAAE,IAAI;IACpC,uBAAuB,EAAE,GAAG;CACpB,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Matter Accessory Class
|
|
3
|
+
*
|
|
4
|
+
* This base class implements the MatterAccessory interface and provides
|
|
5
|
+
* common functionality that all Matter devices can use.
|
|
6
|
+
*
|
|
7
|
+
* Individual device types should extend this class and call super() with
|
|
8
|
+
* the required configuration.
|
|
9
|
+
*/
|
|
10
|
+
import type { API, EndpointType, Logger, MatterAccessory } from 'homebridge';
|
|
11
|
+
export interface BaseMatterAccessoryConfig {
|
|
12
|
+
uuid: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
deviceType: EndpointType;
|
|
15
|
+
serialNumber: string;
|
|
16
|
+
manufacturer: string;
|
|
17
|
+
model: string;
|
|
18
|
+
firmwareRevision: string;
|
|
19
|
+
hardwareRevision: string;
|
|
20
|
+
context?: Record<string, unknown>;
|
|
21
|
+
clusters?: MatterAccessory['clusters'];
|
|
22
|
+
handlers?: MatterAccessory['handlers'];
|
|
23
|
+
parts?: MatterAccessory['parts'];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Base class for all Matter accessories
|
|
27
|
+
* Implements the MatterAccessory interface and provides common methods
|
|
28
|
+
*/
|
|
29
|
+
export declare abstract class BaseMatterAccessory implements MatterAccessory {
|
|
30
|
+
readonly uuid: string;
|
|
31
|
+
readonly displayName: string;
|
|
32
|
+
readonly deviceType: EndpointType;
|
|
33
|
+
readonly serialNumber: string;
|
|
34
|
+
readonly manufacturer: string;
|
|
35
|
+
readonly model: string;
|
|
36
|
+
readonly firmwareRevision: string;
|
|
37
|
+
readonly hardwareRevision: string;
|
|
38
|
+
readonly context: Record<string, unknown>;
|
|
39
|
+
readonly clusters?: MatterAccessory['clusters'];
|
|
40
|
+
readonly handlers?: MatterAccessory['handlers'];
|
|
41
|
+
readonly parts?: MatterAccessory['parts'];
|
|
42
|
+
protected readonly api: API;
|
|
43
|
+
protected readonly log: Logger;
|
|
44
|
+
constructor(api: API, log: Logger, config: BaseMatterAccessoryConfig);
|
|
45
|
+
/**
|
|
46
|
+
* Update the accessory state
|
|
47
|
+
* Helper method to update cluster attributes
|
|
48
|
+
*/
|
|
49
|
+
protected updateState(cluster: string, attributes: Record<string, unknown>): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Log helper methods
|
|
52
|
+
*/
|
|
53
|
+
protected logInfo(message: string, ...args: unknown[]): void;
|
|
54
|
+
protected logError(message: string, ...args: unknown[]): void;
|
|
55
|
+
protected logDebug(message: string, ...args: unknown[]): void;
|
|
56
|
+
protected logWarn(message: string, ...args: unknown[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* Convert this class instance to a plain MatterAccessory object
|
|
59
|
+
* This is what gets registered with Homebridge
|
|
60
|
+
*/
|
|
61
|
+
toAccessory(): MatterAccessory;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=BaseMatterAccessory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseMatterAccessory.d.ts","sourceRoot":"","sources":["../../src/devices/BaseMatterAccessory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5E,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,YAAY,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;CACjC;AAED;;;GAGG;AACH,8BAAsB,mBAAoB,YAAW,eAAe;IAElE,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,SAAgB,WAAW,EAAE,MAAM,CAAA;IACnC,SAAgB,UAAU,EAAE,YAAY,CAAA;IACxC,SAAgB,YAAY,EAAE,MAAM,CAAA;IACpC,SAAgB,YAAY,EAAE,MAAM,CAAA;IACpC,SAAgB,KAAK,EAAE,MAAM,CAAA;IAC7B,SAAgB,gBAAgB,EAAE,MAAM,CAAA;IACxC,SAAgB,gBAAgB,EAAE,MAAM,CAAA;IACxC,SAAgB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChD,SAAgB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtD,SAAgB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtD,SAAgB,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;IAGhD,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAA;IAC3B,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;gBAG5B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,yBAAyB;IA6BnC;;;OAGG;cACa,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhG;;OAEG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI5D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI7D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI7D,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI5D;;;OAGG;IACI,WAAW,IAAI,eAAe;CAgBtC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Matter Accessory Class
|
|
3
|
+
*
|
|
4
|
+
* This base class implements the MatterAccessory interface and provides
|
|
5
|
+
* common functionality that all Matter devices can use.
|
|
6
|
+
*
|
|
7
|
+
* Individual device types should extend this class and call super() with
|
|
8
|
+
* the required configuration.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Base class for all Matter accessories
|
|
12
|
+
* Implements the MatterAccessory interface and provides common methods
|
|
13
|
+
*/
|
|
14
|
+
export class BaseMatterAccessory {
|
|
15
|
+
// Required MatterAccessory properties
|
|
16
|
+
uuid;
|
|
17
|
+
displayName;
|
|
18
|
+
deviceType;
|
|
19
|
+
serialNumber;
|
|
20
|
+
manufacturer;
|
|
21
|
+
model;
|
|
22
|
+
firmwareRevision;
|
|
23
|
+
hardwareRevision;
|
|
24
|
+
context;
|
|
25
|
+
clusters;
|
|
26
|
+
handlers;
|
|
27
|
+
parts;
|
|
28
|
+
// Protected properties available to child classes
|
|
29
|
+
api;
|
|
30
|
+
log;
|
|
31
|
+
constructor(api, log, config) {
|
|
32
|
+
this.api = api;
|
|
33
|
+
this.log = log;
|
|
34
|
+
// Set all required properties
|
|
35
|
+
this.uuid = config.uuid;
|
|
36
|
+
this.displayName = config.displayName;
|
|
37
|
+
this.deviceType = config.deviceType;
|
|
38
|
+
this.serialNumber = config.serialNumber;
|
|
39
|
+
this.manufacturer = config.manufacturer;
|
|
40
|
+
this.model = config.model;
|
|
41
|
+
this.firmwareRevision = config.firmwareRevision;
|
|
42
|
+
this.hardwareRevision = config.hardwareRevision;
|
|
43
|
+
this.clusters = config.clusters;
|
|
44
|
+
this.handlers = config.handlers;
|
|
45
|
+
this.parts = config.parts;
|
|
46
|
+
// Set context with all metadata
|
|
47
|
+
this.context = {
|
|
48
|
+
serialNumber: this.serialNumber,
|
|
49
|
+
manufacturer: this.manufacturer,
|
|
50
|
+
model: this.model,
|
|
51
|
+
firmwareRevision: this.firmwareRevision,
|
|
52
|
+
hardwareRevision: this.hardwareRevision,
|
|
53
|
+
...config.context,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Update the accessory state
|
|
58
|
+
* Helper method to update cluster attributes
|
|
59
|
+
*/
|
|
60
|
+
async updateState(cluster, attributes) {
|
|
61
|
+
await this.api.matter.updateAccessoryState(this.uuid, cluster, attributes);
|
|
62
|
+
this.log.debug(`[${this.displayName}] Updated ${cluster} state:`, attributes);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Log helper methods
|
|
66
|
+
*/
|
|
67
|
+
logInfo(message, ...args) {
|
|
68
|
+
this.log.info(`[${this.displayName}] ${message}`, ...args);
|
|
69
|
+
}
|
|
70
|
+
logError(message, ...args) {
|
|
71
|
+
this.log.error(`[${this.displayName}] ${message}`, ...args);
|
|
72
|
+
}
|
|
73
|
+
logDebug(message, ...args) {
|
|
74
|
+
this.log.debug(`[${this.displayName}] ${message}`, ...args);
|
|
75
|
+
}
|
|
76
|
+
logWarn(message, ...args) {
|
|
77
|
+
this.log.warn(`[${this.displayName}] ${message}`, ...args);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Convert this class instance to a plain MatterAccessory object
|
|
81
|
+
* This is what gets registered with Homebridge
|
|
82
|
+
*/
|
|
83
|
+
toAccessory() {
|
|
84
|
+
return {
|
|
85
|
+
uuid: this.uuid,
|
|
86
|
+
displayName: this.displayName,
|
|
87
|
+
deviceType: this.deviceType,
|
|
88
|
+
serialNumber: this.serialNumber,
|
|
89
|
+
manufacturer: this.manufacturer,
|
|
90
|
+
model: this.model,
|
|
91
|
+
firmwareRevision: this.firmwareRevision,
|
|
92
|
+
hardwareRevision: this.hardwareRevision,
|
|
93
|
+
context: this.context,
|
|
94
|
+
clusters: this.clusters,
|
|
95
|
+
handlers: this.handlers,
|
|
96
|
+
parts: this.parts,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=BaseMatterAccessory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseMatterAccessory.js","sourceRoot":"","sources":["../../src/devices/BaseMatterAccessory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH;;;GAGG;AACH,MAAM,OAAgB,mBAAmB;IACvC,sCA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AC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAA;IACH,CAAC;CACF"}
|
|
@@ -1,36 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Robotic Vacuum Cleaner Accessory Class
|
|
3
|
+
*
|
|
4
|
+
* This is a comprehensive example demonstrating all available features
|
|
5
|
+
* of the RoboticVacuumCleaner device type including:
|
|
6
|
+
* - Multiple run modes (Idle, Cleaning, Mapping)
|
|
7
|
+
* - Multiple clean modes (Vacuum, Mop, Vacuum & Mop, Deep Clean)
|
|
8
|
+
* - Operational state management with realistic transitions
|
|
9
|
+
* - Service area (room) support
|
|
10
|
+
*
|
|
11
|
+
* IMPORTANT: Platform Matter accessories
|
|
12
|
+
* =======================================
|
|
13
|
+
* This vacuum is registered as a platform accessory using
|
|
14
|
+
* api.matter.registerPlatformAccessories(), which works the same as HAP.
|
|
15
|
+
* Platform accessories are registered synchronously and are immediately ready for use.
|
|
16
|
+
*
|
|
17
|
+
* Demo behavior:
|
|
18
|
+
* - Start/Resume: Sets run mode to "Cleaning", runs for 15/10 seconds, then returns to dock
|
|
19
|
+
* - Return to dock: Immediately sets "Idle" mode, then Seeking (5s) → Charging (3s) → Docked
|
|
20
|
+
* - Stop: Immediately stops and resets to "Idle" mode
|
|
21
|
+
* - Pause: Cancels automatic completion timer, keeps "Cleaning" mode
|
|
22
|
+
*/
|
|
1
23
|
import type { API, Logger } from 'homebridge';
|
|
2
|
-
|
|
3
|
-
export declare class RoboticVacuumAccessory {
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private publishedAccessory;
|
|
9
|
-
private pollIntervalId;
|
|
10
|
-
private dockedDelay;
|
|
11
|
-
private dockedUpdateInterval;
|
|
12
|
-
constructor(api: API, log: Logger, device: any);
|
|
13
|
-
private retry;
|
|
14
|
-
toAccessory(): MatterAccessory;
|
|
15
|
-
attachToPublishedAccessory(accessory: MatterAccessory): void;
|
|
16
|
-
private performInitialSync;
|
|
17
|
-
private startPolling;
|
|
18
|
-
private stopPolling;
|
|
19
|
-
private setClusterValue;
|
|
20
|
-
updateOperationalState(): Promise<void>;
|
|
21
|
-
updateRunMode(): Promise<void>;
|
|
22
|
-
updateCleanMode(): Promise<void>;
|
|
23
|
-
updateSelectedAreas(): Promise<void>;
|
|
24
|
-
updateProgress(): Promise<void>;
|
|
25
|
-
private handleStart;
|
|
26
|
-
private handleStop;
|
|
24
|
+
import { BaseMatterAccessory } from './BaseMatterAccessory.js';
|
|
25
|
+
export declare class RoboticVacuumAccessory extends BaseMatterAccessory {
|
|
26
|
+
private activeTimers;
|
|
27
|
+
constructor(api: API, log: Logger);
|
|
28
|
+
private handleChangeRunMode;
|
|
29
|
+
private handleChangeCleanMode;
|
|
27
30
|
private handlePause;
|
|
31
|
+
private handleStop;
|
|
32
|
+
private handleStart;
|
|
28
33
|
private handleResume;
|
|
29
34
|
private handleGoHome;
|
|
30
|
-
private handleChangeRunMode;
|
|
31
|
-
private handleChangeCleanMode;
|
|
32
35
|
private handleSelectAreas;
|
|
33
36
|
private handleSkipArea;
|
|
37
|
+
/**
|
|
38
|
+
* Helper method to clear all active timers
|
|
39
|
+
*/
|
|
40
|
+
private clearTimers;
|
|
41
|
+
/**
|
|
42
|
+
* Helper method to initiate return to dock sequence
|
|
43
|
+
* Can be called synchronously from other handlers
|
|
44
|
+
*/
|
|
45
|
+
private returnToDock;
|
|
46
|
+
/**
|
|
47
|
+
* Update Methods - Use these to update the vacuum state from your API/device
|
|
48
|
+
*
|
|
49
|
+
* Since this is a platform accessory, state updates work immediately after registration.
|
|
50
|
+
*/
|
|
51
|
+
updateOperationalState(state: number): void;
|
|
52
|
+
updateRunMode(mode: number): void;
|
|
53
|
+
updateCleanMode(mode: number): void;
|
|
54
|
+
updateSelectedAreas(areaIds: number[]): void;
|
|
55
|
+
updateCurrentArea(areaId: number | null): void;
|
|
56
|
+
updateProgress(progress: Array<{
|
|
57
|
+
areaId: number;
|
|
58
|
+
status: number;
|
|
59
|
+
}>): void;
|
|
34
60
|
}
|
|
35
|
-
export {};
|
|
36
61
|
//# sourceMappingURL=RoboticVacuumAccessory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoboticVacuumAccessory.d.ts","sourceRoot":"","sources":["../../src/devices/RoboticVacuumAccessory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RoboticVacuumAccessory.d.ts","sourceRoot":"","sources":["../../src/devices/RoboticVacuumAccessory.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAkB,MAAM,YAAY,CAAA;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,YAAY,CAAuB;gBAE/B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM;YAuJnB,mBAAmB;YAuCnB,qBAAqB;YAyBrB,WAAW;YAOX,UAAU;YAQV,WAAW;YAoBX,YAAY;YAoBZ,YAAY;YAiBZ,iBAAiB;YAUjB,cAAc;IAQ5B;;OAEG;IACH,OAAO,CAAC,WAAW;IAKnB;;;OAGG;IACH,OAAO,CAAC,YAAY;IA0BpB;;;;OAIG;IAEI,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAmB3C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMjC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAsBnC,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAQ5C,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAU9C,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI;CAIjF"}
|