eternal-timer 1.4.2 → 2.0.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.
package/README.md CHANGED
@@ -4,7 +4,7 @@ A simple and persistent timer library for Node.js. Timers are saved to a file an
4
4
 
5
5
  ## Features
6
6
 
7
- - **Monitor Timers (asynchronous)**: Start monitoring expired timers asynchronously; the function returns immediately and the callback is invoked when timers expire.
7
+ - **Monitor Timers (asynchronous)**: Start monitoring expired timers asynchronously; the function returns immediately and the callback is called when timers expire.
8
8
  - **Persistence**: Save timer data to a file that persists across process restarts
9
9
 
10
10
  ## Installation
@@ -18,29 +18,40 @@ npm install eternal-timer
18
18
  ### Basic Example
19
19
 
20
20
  ```typescript
21
- import { createTimer, checkTimers, removeTimer, showTimers } from 'eternal-timer';
21
+ import { TimersManager } from 'eternal-timer';
22
22
 
23
23
  async function main() {
24
- // Create a timer (5 seconds)
25
- const timerId = await createTimer(5000);
26
- console.log('Timer created:', timerId);
24
+ const manager = new TimersManager();
27
25
 
28
- // Monitor timers (executes when timer expires)
29
- checkTimers((timer) => {
30
- console.log('Timer expired:', timer.id);
31
- });
26
+ // Create a timer (5 seconds)
27
+ const timerId = await manager.createTimer(5000);
28
+ console.log('Timer created:', timerId);
32
29
 
33
- // Display all timers
34
- const timers = await showTimers();
35
- console.log('Active timers:', timers);
30
+ // Monitor timers (executes when timer expires)
31
+ manager.checkTimers(async (timer) => {
32
+ console.log('Timer expired:', timer.id);
33
+ });
36
34
 
37
- // Remove a timer
38
- await removeTimer(timerId);
35
+ // Display all timers
36
+ const timers = await manager.showTimers();
37
+ console.log('Active timers:', timers);
38
+
39
+ // Remove a timer
40
+ await manager.removeTimer(timerId);
39
41
  }
42
+
43
+ main();
40
44
  ```
41
45
 
42
46
  ## API
43
47
 
48
+ ### `new TimersManager(timerfiledir?: string)`
49
+
50
+ Creates a new `TimersManager` instance.
51
+
52
+ **Parameters:**
53
+ - `timerfiledir` (string, optional): The path to the directory where the timer file is stored. If omitted, `.timers` under the project root is used.
54
+
44
55
  ### `createTimer(length: number): Promise<string>`
45
56
 
46
57
  Creates a new timer.
@@ -52,7 +63,7 @@ Creates a new timer.
52
63
 
53
64
  **Throws:** If length is invalid(e.g. length < 0) or file operation fails
54
65
 
55
- ### `removeTimer(id: string): Promise<boolean>`
66
+ ### `removeTimer(id: string): Promise<void>`
56
67
 
57
68
  Removes a timer by ID.
58
69
 
@@ -61,12 +72,17 @@ Removes a timer by ID.
61
72
 
62
73
  **Returns:** void
63
74
 
64
- ### `checkTimers(callback: (timer: Timer) => void, interval?: number): Promise<void>`
75
+ **Throws:** If the timer with the specified ID is not found or if a file operation fails.
76
+
77
+ ### `checkTimers(callback: (timer: Timer) => Promise<void>, interval?: number): Promise<void>`
78
+
79
+ Starts monitoring expired timers and returns immediately.
65
80
 
66
- Starts monitoring expired timers asynchronously and returns immediately. The callback is invoked asynchronously when a timer expires.
81
+ The callback is invoked when a timer expires during periodic checks.
82
+ The callback is awaited before the next timer check continues.
67
83
 
68
84
  **Parameters:**
69
- - `callback`: Function invoked when an expired timer is detected (called asynchronously)
85
+ - `callback`: Function invoked when an expired timer is detected (called during periodic checks and awaited)
70
86
  - `interval` (number, optional): Check interval in milliseconds (default: 50ms)
71
87
 
72
88
  **Throws:** If file operation fails
@@ -84,8 +100,8 @@ Retrieves all active timers.
84
100
  ```typescript
85
101
  type Timer = {
86
102
  id: string; // Unique timer identifier (UUID)
87
- start: string; // Timer start timestamp
88
- stop: string; // Timer end timestamp
103
+ start: number; // Timer start timestamp
104
+ stop: number; // Timer end timestamp
89
105
  }
90
106
  ```
91
107
 
@@ -111,4 +127,4 @@ Licensed under the Apache License, Version 2.0. See the `LICENSE` file for detai
111
127
 
112
128
  ## Repository
113
129
 
114
- https://github.com/SUKEsann2000/eternal-timer
130
+ https://github.com/SUKEsann2000/eternal-timer
@@ -3,214 +3,203 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createTimer = createTimer;
7
- exports.removeTimer = removeTimer;
8
- exports.checkTimers = checkTimers;
9
- exports.showTimers = showTimers;
10
- exports.getRemainingTimer = getRemainingTimer;
6
+ exports.TimersManager = void 0;
11
7
  const fs_1 = __importDefault(require("fs"));
12
8
  const path_1 = __importDefault(require("path"));
13
9
  const searchRoot_js_1 = __importDefault(require("./searchRoot.js"));
14
10
  const uuid_1 = require("uuid");
15
- // search root folder of project
16
- const rootdir = (0, searchRoot_js_1.default)();
17
- const timerfiledir = path_1.default.join(rootdir, ".timers");
18
11
  /**
19
- * createFile
20
- * @description create `.timers` file
21
- * @returns void
22
- * @throws If file operation fails
23
- * @example
24
- * await createFile();
12
+ * TimersManager
13
+ * @description
14
+ * Manages timers stored in a file.
15
+ * Each timer is stored as: `id start stop`.
16
+ *
17
+ * - Timers are persisted in a file
18
+ * - Expired timers are detected by polling
25
19
  */
26
- async function createFile() {
27
- if (!fs_1.default.existsSync(timerfiledir)) {
28
- fs_1.default.writeFile(timerfiledir, "", (data) => {
29
- console.log("The file was created in ", timerfiledir);
30
- });
20
+ class TimersManager {
21
+ timerfiledir;
22
+ /**
23
+ * constructor
24
+ * @param timerfiledir(string, optional)
25
+ * If omitted, `.timers` under the project root is used.
26
+ */
27
+ constructor(timerfiledir) {
28
+ this.timerfiledir =
29
+ timerfiledir ?? path_1.default.join((0, searchRoot_js_1.default)(), ".timers");
31
30
  }
32
- return;
33
- }
34
- /**
35
- * createTimer
36
- * @description Creates a new timer.
37
- * @param length Timer duration in milliseconds
38
- * @returns Promise that resolves to the timer ID (UUID)
39
- * @throws If length is invalid(e.g. length < 0) or file operation fails
40
- * @example
41
- * const newTimer = await createTimer(5000);
42
- * // newTimer will be id of the timer
43
- */
44
- async function createTimer(length) {
45
- try {
46
- await createFile();
47
- if (length < 0) {
48
- throw new Error(`Invailed length: ${length}`);
31
+ /**
32
+ * createFile
33
+ * @description create `.timers` file
34
+ * @returns void
35
+ * @throws If file operation fails
36
+ */
37
+ async createFile() {
38
+ try {
39
+ await fs_1.default.promises.access(this.timerfiledir);
40
+ }
41
+ catch {
42
+ await fs_1.default.promises.writeFile(this.timerfiledir, "");
49
43
  }
50
- length = Math.trunc(length);
51
- // uuid, start, end
52
- const id = (0, uuid_1.v4)();
53
- const now = Date.now();
54
- const newTimerData = `${id} ${now.toString()} ${(now + length).toString()}`;
55
- await fs_1.default.promises.appendFile(timerfiledir, newTimerData + "\n");
56
- return id;
57
- }
58
- catch (e) {
59
- throw new Error(`Error when creating timer: ${e}`);
60
44
  }
61
- }
62
- /**
63
- * removeTimer
64
- * @description Removes a timer by ID.
65
- * @param id ID of the timer to remove
66
- * @returns void
67
- * @throws If file operation fails
68
- * @example
69
- * await removeTimer(id);
70
- */
71
- async function removeTimer(id) {
72
- try {
73
- const timersRaw = fs_1.default.readFileSync(timerfiledir, "utf-8");
74
- const timersData = timersRaw.split(/\r?\n/);
75
- let newTimersData = "";
76
- let found = false;
77
- for (const timerData of timersData) {
78
- if (!timerData.trim()) {
79
- found = true;
80
- continue;
45
+ /**
46
+ * createTimer
47
+ * @description Creates a new timer.
48
+ * @param length Timer duration in milliseconds
49
+ * @returns Promise that resolves to the timer ID (UUID)
50
+ * @throws If length is invalid(e.g. length < 0) or file operation fails
51
+ * @example
52
+ * const manager = new TimersManager();
53
+ * const newTimer = await manager.createTimer(5000);
54
+ * // newTimer will be id of the timer
55
+ */
56
+ async createTimer(length) {
57
+ try {
58
+ await this.createFile();
59
+ if (length < 0) {
60
+ throw new Error(`Invailed length: ${length}`);
81
61
  }
82
- const [timerId] = timerData.split(" ");
83
- if (timerId !== id) {
62
+ length = Math.trunc(length);
63
+ // uuid, start, end
64
+ const id = (0, uuid_1.v4)();
65
+ const now = Date.now();
66
+ const newTimerData = `${id} ${now.toString()} ${(now + length).toString()}`;
67
+ await fs_1.default.promises.appendFile(this.timerfiledir, newTimerData + "\n");
68
+ return id;
69
+ }
70
+ catch (e) {
71
+ throw new Error(`Error when creating timer: ${e}`);
72
+ }
73
+ }
74
+ /**
75
+ * removeTimer
76
+ * @description Removes a timer by ID.
77
+ * @param id ID of the timer to remove
78
+ * @returns void
79
+ * @throws If file operation fails
80
+ * @example
81
+ * await manager.removeTimer(id);
82
+ */
83
+ async removeTimer(id) {
84
+ try {
85
+ const timersRaw = fs_1.default.readFileSync(this.timerfiledir, "utf-8");
86
+ const timersData = timersRaw.split(/\r?\n/);
87
+ let newTimersData = "";
88
+ let found = false;
89
+ for (const timerData of timersData) {
90
+ if (!timerData.trim())
91
+ continue;
92
+ const [timerId] = timerData.split(" ");
93
+ if (timerId === id) {
94
+ found = true;
95
+ continue;
96
+ }
84
97
  newTimersData += timerData + "\n";
85
98
  }
99
+ if (!found) {
100
+ throw new Error(`Timer with id ${id} not found`);
101
+ }
102
+ await fs_1.default.promises.writeFile(this.timerfiledir, newTimersData, "utf-8");
103
+ return;
86
104
  }
87
- if (!found) {
88
- throw new Error(`Timer with id ${id} not found`);
105
+ catch (e) {
106
+ throw new Error(`Error when removing timer: ${e}`);
89
107
  }
90
- await fs_1.default.promises.writeFile(timerfiledir, newTimersData, "utf-8");
91
- return;
92
108
  }
93
- catch (e) {
94
- throw new Error(`Error when removing timer: ${e}`);
109
+ /**
110
+ * @description Starts monitoring expired timers asynchronously and returns immediately. The callback is invoked asynchronously when a timer expires.
111
+ * The callback is awaited before continuing.
112
+ * @param callback Function invoked when an expired timer is detected (called asynchronously)
113
+ * @param interval (number, optional): Check interval in milliseconds (default: 50ms)
114
+ * @throws If file operation fails
115
+ * @example
116
+ * manager.checkTimers((timer) => {
117
+ * console.log(`A timer was stopped: ${timer.id}`);
118
+ * });
119
+ */
120
+ async checkTimers(callback, interval = 50) {
121
+ try {
122
+ await this.createFile();
123
+ setInterval(async () => {
124
+ const timersDataRaw = await fs_1.default.promises.readFile(this.timerfiledir, "utf-8");
125
+ const timersData = timersDataRaw.split(/\r?\n/);
126
+ const timersSet = new Set();
127
+ await this.checkTimerfileSyntax(timersDataRaw);
128
+ for (const timerData of timersData) {
129
+ if (!timerData.trim())
130
+ continue;
131
+ const [id, startStr, stopStr] = timerData.split(" ");
132
+ timersSet.add({
133
+ id: id,
134
+ start: Number(startStr),
135
+ stop: Number(stopStr),
136
+ });
137
+ }
138
+ const now = Date.now();
139
+ for (const timer of timersSet) {
140
+ if (Number(timer.stop) <= now) {
141
+ await this.removeTimer(timer.id);
142
+ await callback(timer);
143
+ }
144
+ }
145
+ }, interval);
146
+ }
147
+ catch (e) {
148
+ throw new Error(`Error when checking alarm: ${e}`);
149
+ }
95
150
  }
96
- }
97
- /**
98
- * @description Starts monitoring expired timers asynchronously and returns immediately. The callback is invoked asynchronously when a timer expires.
99
- * @param callback Function invoked when an expired timer is detected (called asynchronously)
100
- * @param interval (number, optional): Check interval in milliseconds (default: 50ms)
101
- * @throws If file operation fails
102
- * @example
103
- * checkTimers((timer) => {
104
- * console.log(`A timer was stopped: ${timer.id}`);
105
- * });
106
- */
107
- async function checkTimers(callback, interval = 50) {
108
- try {
109
- await createFile();
110
- setInterval(() => {
111
- const timersDataRaw = fs_1.default.readFileSync(timerfiledir, "utf-8");
112
- const timersData = timersDataRaw.split(/\r?\n/);
113
- const timersSet = new Set();
114
- checkTimerfileSyntax(timersDataRaw);
151
+ /**
152
+ * showTimers
153
+ * @description Retrieves all active timers.
154
+ * @returns Array of `Timer` objects
155
+ * @throws If file operation fails
156
+ * @example
157
+ * const timers = await manager.showTimers();
158
+ * console.log(JSON.stringify(timers))
159
+ */
160
+ async showTimers() {
161
+ try {
162
+ await this.createFile();
163
+ const timersRaw = fs_1.default.readFileSync(this.timerfiledir, "utf-8");
164
+ const timersData = timersRaw.split(/\r?\n/);
165
+ const timersJSON = [];
115
166
  for (const timerData of timersData) {
167
+ const splitedTimerData = timerData.split(" ");
116
168
  if (!timerData.trim())
117
169
  continue;
118
- const [id, startStr, stopStr] = timerData.split(" ");
119
- timersSet.add({
120
- id: id,
121
- start: startStr,
122
- stop: stopStr
170
+ timersJSON.push({
171
+ id: splitedTimerData[0],
172
+ start: Number(splitedTimerData[1]),
173
+ stop: Number(splitedTimerData[2]),
123
174
  });
124
175
  }
125
- const now = Date.now();
126
- for (const timer of timersSet) {
127
- if (Number(timer.stop) <= now) {
128
- removeTimer(timer.id);
129
- callback(timer);
130
- }
131
- }
132
- }, interval);
133
- }
134
- catch (e) {
135
- throw new Error(`Error when checking alarm: ${e}`);
136
- }
137
- }
138
- /**
139
- * showTimers
140
- * @description Retrieves all active timers.
141
- * @returns Array of `Timer` objects
142
- * @throws If file operation fails
143
- * @example
144
- * const timers = await showTimers();
145
- * console.log(JSON.stringify(timers))
146
- */
147
- async function showTimers() {
148
- try {
149
- await createFile();
150
- const timersRaw = fs_1.default.readFileSync(timerfiledir, "utf-8");
151
- const timersData = timersRaw.split(/\r?\n/);
152
- let timersJSON = [];
153
- for (const timerData of timersData) {
154
- const splitedTimerData = timerData.split(" ");
155
- timersJSON.push({
156
- id: splitedTimerData[0],
157
- start: splitedTimerData[1],
158
- stop: splitedTimerData[2]
159
- });
176
+ return timersJSON;
177
+ }
178
+ catch (e) {
179
+ throw new Error(`Error when showing timers: ${e}`);
160
180
  }
161
- return timersJSON;
162
- }
163
- catch (e) {
164
- throw new Error(`Error when showing timers: ${e}`);
165
181
  }
166
- }
167
- /**
168
- * getRemainingTimer
169
- * @description Retrieves the remaining time of a timer by ID.
170
- * @param id timer's id you want to get remaining time(ms)
171
- * @returns Remaining time of the timer(ms)
172
- * @throws If timer with the specified ID is not found or file operation fails
173
- * @example
174
- * const remaining: number = await getRemainingTimer(id);
175
- * console.log(`Remaining time: ${remaining} ms`);
176
- */
177
- async function getRemainingTimer(id) {
178
- try {
179
- const timersRaw = fs_1.default.readFileSync(timerfiledir, "utf-8");
180
- const timersData = timersRaw.split(/\r?\n/);
182
+ async checkTimerfileSyntax(fileData) {
183
+ const throwing = () => {
184
+ throw new Error(`Timer file's syntax is wrong`);
185
+ };
186
+ const timersData = fileData
187
+ .split('\n')
188
+ .map(l => l.trim())
189
+ .filter(l => l !== "");
181
190
  for (const timerData of timersData) {
182
- const splitedTimerData = timerData.split(" ");
183
- if (splitedTimerData[0] === id) {
184
- const now = Date.now();
185
- const stop = Number(splitedTimerData[2]);
186
- return Math.max(0, stop - now);
187
- }
191
+ const timerArray = timerData.split(/\s+/);
192
+ if (timerArray.length !== 3)
193
+ throwing();
194
+ if (timerArray[0]?.length !== 36)
195
+ throwing();
196
+ if (timerArray[1].trim() === "")
197
+ throwing();
198
+ if (timerArray[2].trim() === "")
199
+ throwing();
188
200
  }
189
- throw new Error(`Timer with id ${id} not found`);
190
- }
191
- catch (e) {
192
- throw new Error(`Error when getting remaining timer: ${e}`);
193
- }
194
- }
195
- async function checkTimerfileSyntax(fileData) {
196
- const throwing = () => {
197
- throw new Error(`Timer file's syntax is wrong`);
198
- };
199
- const timersData = fileData
200
- .split('\n')
201
- .map(l => l.trim())
202
- .filter(l => l !== "");
203
- for (const timerData of timersData) {
204
- const timerArray = timerData.split(/\s+/);
205
- if (timerArray.length !== 3)
206
- throwing();
207
- if (timerArray[0]?.length !== 36)
208
- throwing();
209
- if (timerArray[1].trim() === "")
210
- throwing();
211
- if (timerArray[2].trim() === "")
212
- throwing();
201
+ return;
213
202
  }
214
- return;
215
203
  }
204
+ exports.TimersManager = TimersManager;
216
205
  //# sourceMappingURL=index.js.map
@@ -1,59 +1,76 @@
1
1
  export type Timer = {
2
2
  id: string;
3
- start: string;
4
- stop: string;
3
+ start: number;
4
+ stop: number;
5
5
  };
6
6
  /**
7
- * createTimer
8
- * @description Creates a new timer.
9
- * @param length Timer duration in milliseconds
10
- * @returns Promise that resolves to the timer ID (UUID)
11
- * @throws If length is invalid(e.g. length < 0) or file operation fails
12
- * @example
13
- * const newTimer = await createTimer(5000);
14
- * // newTimer will be id of the timer
7
+ * TimersManager
8
+ * @description
9
+ * Manages timers stored in a file.
10
+ * Each timer is stored as: `id start stop`.
11
+ *
12
+ * - Timers are persisted in a file
13
+ * - Expired timers are detected by polling
15
14
  */
16
- export declare function createTimer(length: number): Promise<string>;
17
- /**
18
- * removeTimer
19
- * @description Removes a timer by ID.
20
- * @param id ID of the timer to remove
21
- * @returns void
22
- * @throws If file operation fails
23
- * @example
24
- * await removeTimer(id);
25
- */
26
- export declare function removeTimer(id: string): Promise<void>;
27
- /**
28
- * @description Starts monitoring expired timers asynchronously and returns immediately. The callback is invoked asynchronously when a timer expires.
29
- * @param callback Function invoked when an expired timer is detected (called asynchronously)
30
- * @param interval (number, optional): Check interval in milliseconds (default: 50ms)
31
- * @throws If file operation fails
32
- * @example
33
- * checkTimers((timer) => {
34
- * console.log(`A timer was stopped: ${timer.id}`);
35
- * });
36
- */
37
- export declare function checkTimers(callback: (timer: Timer) => void, interval?: number): Promise<void>;
38
- /**
39
- * showTimers
40
- * @description Retrieves all active timers.
41
- * @returns Array of `Timer` objects
42
- * @throws If file operation fails
43
- * @example
44
- * const timers = await showTimers();
45
- * console.log(JSON.stringify(timers))
46
- */
47
- export declare function showTimers(): Promise<Timer[]>;
48
- /**
49
- * getRemainingTimer
50
- * @description Retrieves the remaining time of a timer by ID.
51
- * @param id timer's id you want to get remaining time(ms)
52
- * @returns Remaining time of the timer(ms)
53
- * @throws If timer with the specified ID is not found or file operation fails
54
- * @example
55
- * const remaining: number = await getRemainingTimer(id);
56
- * console.log(`Remaining time: ${remaining} ms`);
57
- */
58
- export declare function getRemainingTimer(id: string): Promise<number>;
15
+ export declare class TimersManager {
16
+ private readonly timerfiledir;
17
+ /**
18
+ * constructor
19
+ * @param timerfiledir(string, optional)
20
+ * If omitted, `.timers` under the project root is used.
21
+ */
22
+ constructor(timerfiledir?: string);
23
+ /**
24
+ * createFile
25
+ * @description create `.timers` file
26
+ * @returns void
27
+ * @throws If file operation fails
28
+ */
29
+ private createFile;
30
+ /**
31
+ * createTimer
32
+ * @description Creates a new timer.
33
+ * @param length Timer duration in milliseconds
34
+ * @returns Promise that resolves to the timer ID (UUID)
35
+ * @throws If length is invalid(e.g. length < 0) or file operation fails
36
+ * @example
37
+ * const manager = new TimersManager();
38
+ * const newTimer = await manager.createTimer(5000);
39
+ * // newTimer will be id of the timer
40
+ */
41
+ createTimer(length: number): Promise<string>;
42
+ /**
43
+ * removeTimer
44
+ * @description Removes a timer by ID.
45
+ * @param id ID of the timer to remove
46
+ * @returns void
47
+ * @throws If file operation fails
48
+ * @example
49
+ * await manager.removeTimer(id);
50
+ */
51
+ removeTimer(id: string): Promise<void>;
52
+ /**
53
+ * @description Starts monitoring expired timers asynchronously and returns immediately. The callback is invoked asynchronously when a timer expires.
54
+ * The callback is awaited before continuing.
55
+ * @param callback Function invoked when an expired timer is detected (called asynchronously)
56
+ * @param interval (number, optional): Check interval in milliseconds (default: 50ms)
57
+ * @throws If file operation fails
58
+ * @example
59
+ * manager.checkTimers((timer) => {
60
+ * console.log(`A timer was stopped: ${timer.id}`);
61
+ * });
62
+ */
63
+ checkTimers(callback: (timer: Timer) => Promise<void>, interval?: number): Promise<void>;
64
+ /**
65
+ * showTimers
66
+ * @description Retrieves all active timers.
67
+ * @returns Array of `Timer` objects
68
+ * @throws If file operation fails
69
+ * @example
70
+ * const timers = await manager.showTimers();
71
+ * console.log(JSON.stringify(timers))
72
+ */
73
+ showTimers(): Promise<Timer[]>;
74
+ private checkTimerfileSyntax;
75
+ }
59
76
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,KAAK,GAAG;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAuBD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBjE;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB3D;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCxG;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAmBnD;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBnE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,KAAK,GAAG;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC;;;;OAIM;gBAEL,YAAY,CAAC,EAAE,MAAM;IAMtB;;;;;OAKM;YACQ,UAAU;IAQxB;;;;;;;;;;OAUM;IACO,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBzD;;;;;;;;OAQM;IACO,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BnD;;;;;;;;;;OAUM;IACO,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCzG;;;;;;;;OAQM;IACO,UAAU,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAsB7B,oBAAoB;CAiBlC"}