@endge/utils 0.24.14 → 0.25.6
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/collection/collection.d.ts +7 -7
- package/dist/collection/collection.types.d.ts +10 -10
- package/dist/collection/indexed-collection.d.ts +17 -17
- package/dist/database/PayloadHttpClient.d.ts +3 -3
- package/dist/events/ChangeNotifier.d.ts +8 -0
- package/dist/events/EventBus.d.ts +3 -3
- package/dist/execute/NamedExecutor.d.ts +9 -9
- package/dist/execute/delay-executor.d.ts +8 -8
- package/dist/index.d.ts +8 -14
- package/dist/shared/serialize/decorator.d.ts +2 -2
- package/dist/tools/hotkeys.d.ts +8 -8
- package/dist/tools/logs.d.ts +7 -7
- package/dist/tools/tools.types.d.ts +2 -2
- package/dist/utils.js +545 -634
- package/package.json +11 -17
- package/dist/composable/useCookie.d.ts +0 -1
- package/dist/events/Subscribable.d.ts +0 -31
- package/dist/serialize/useStorageDebounced.d.ts +0 -2
- package/dist/tooltip/TooltipRegistrator.d.ts +0 -15
- package/dist/tooltip/store.d.ts +0 -29
- package/dist/tooltip/tooltip.types.d.ts +0 -10
package/dist/utils.js
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (r, t, e) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { destr as v } from "destr";
|
|
7
|
-
import { plainToInstance as w, instanceToPlain as x, Transform as f, TransformationType as m, Expose as tt } from "class-transformer";
|
|
8
|
-
import { IsOptional as et } from "class-validator";
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var G = (r, t, e) => t in r ? V(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var o = (r, t, e) => G(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { Transform as f, TransformationType as _, plainToInstance as T, instanceToPlain as S, Expose as J } from "class-transformer";
|
|
5
|
+
import { IsOptional as Z } from "class-validator";
|
|
9
6
|
import "reflect-metadata";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
import { v4 as W } from "uuid";
|
|
8
|
+
import { DateTime as Y } from "ts-luxon";
|
|
9
|
+
import { differenceInSeconds as N, format as g, differenceInCalendarDays as q, isAfter as D, isEqual as Q, isBefore as z, startOfDay as p, endOfDay as X } from "date-fns";
|
|
10
|
+
import { utcToZonedTime as I, getTimezoneOffset as w, zonedTimeToUtc as v } from "date-fns-tz";
|
|
11
|
+
import { fetchEventSource as tt, EventStreamContentType as et } from "@microsoft/fetch-event-source";
|
|
12
|
+
var m = /* @__PURE__ */ ((r) => (r.Add = "add", r.Remove = "remove", r.Update = "update", r.IndexCreate = "indexCreate", r))(m || {});
|
|
13
|
+
class P {
|
|
14
|
+
constructor() {
|
|
15
|
+
o(this, "_listeners", /* @__PURE__ */ new Set());
|
|
16
|
+
}
|
|
17
|
+
/** Подписывает listener на изменения utility owner. */
|
|
18
|
+
subscribe(t) {
|
|
19
|
+
return this._listeners.add(t), () => {
|
|
20
|
+
this._listeners.delete(t);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** Уведомляет текущих listeners об изменении. */
|
|
24
|
+
notify() {
|
|
25
|
+
for (const t of this._listeners)
|
|
26
|
+
t();
|
|
27
|
+
}
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
class j {
|
|
29
|
+
class H {
|
|
34
30
|
/**
|
|
35
31
|
* Создает экземпляр EventBus и подготавливает базовое состояние.
|
|
36
32
|
*/
|
|
37
33
|
constructor(t = []) {
|
|
38
|
-
o(this, "
|
|
34
|
+
o(this, "_listeners", /* @__PURE__ */ new Map());
|
|
39
35
|
t.forEach((e) => {
|
|
40
|
-
this.
|
|
36
|
+
this._listeners.set(e, /* @__PURE__ */ new Set());
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
39
|
// ---- Типизированные события ----
|
|
@@ -63,7 +59,7 @@ class j {
|
|
|
63
59
|
* Выполняет действие offAll в рамках ответственности EventBus.
|
|
64
60
|
*/
|
|
65
61
|
offAll() {
|
|
66
|
-
for (const t of this.
|
|
62
|
+
for (const t of this._listeners.values())
|
|
67
63
|
t.clear();
|
|
68
64
|
}
|
|
69
65
|
/**
|
|
@@ -104,7 +100,7 @@ class j {
|
|
|
104
100
|
_on(t, e) {
|
|
105
101
|
const n = Array.isArray(t) ? t : [t];
|
|
106
102
|
for (const i of n)
|
|
107
|
-
this.
|
|
103
|
+
this._listeners.has(i) || this._listeners.set(i, /* @__PURE__ */ new Set()), this._listeners.get(i).add(e);
|
|
108
104
|
}
|
|
109
105
|
/**
|
|
110
106
|
* Обрабатывает входящее событие EventBus.
|
|
@@ -124,13 +120,13 @@ class j {
|
|
|
124
120
|
var i;
|
|
125
121
|
const n = Array.isArray(t) ? t : [t];
|
|
126
122
|
for (const s of n)
|
|
127
|
-
(i = this.
|
|
123
|
+
(i = this._listeners.get(s)) == null || i.delete(e);
|
|
128
124
|
}
|
|
129
125
|
/**
|
|
130
126
|
* Публикует событие во внутренний event bus EventBus.
|
|
131
127
|
*/
|
|
132
128
|
_emit(t, e) {
|
|
133
|
-
const n = this.
|
|
129
|
+
const n = this._listeners.get(t);
|
|
134
130
|
if (n)
|
|
135
131
|
for (const i of n)
|
|
136
132
|
i(e);
|
|
@@ -140,66 +136,34 @@ class j {
|
|
|
140
136
|
*/
|
|
141
137
|
hasListeners(t) {
|
|
142
138
|
var e;
|
|
143
|
-
return (((e = this.
|
|
139
|
+
return (((e = this._listeners.get(t)) == null ? void 0 : e.size) ?? 0) > 0;
|
|
144
140
|
}
|
|
145
141
|
/**
|
|
146
142
|
* Выполняет действие eventNames в рамках ответственности EventBus.
|
|
147
143
|
*/
|
|
148
144
|
eventNames() {
|
|
149
|
-
return [...this.
|
|
145
|
+
return [...this._listeners.entries()].filter(([, t]) => t.size > 0).map(([t]) => t);
|
|
150
146
|
}
|
|
151
147
|
/**
|
|
152
148
|
* Очищает накопленное состояние EventBus.
|
|
153
149
|
*/
|
|
154
150
|
clear(t) {
|
|
155
151
|
var e;
|
|
156
|
-
t ? (e = this.
|
|
152
|
+
t ? (e = this._listeners.get(t)) == null || e.clear() : this._listeners.clear();
|
|
157
153
|
}
|
|
158
154
|
}
|
|
159
|
-
const
|
|
160
|
-
class
|
|
161
|
-
constructor() {
|
|
162
|
-
o(this, "subscribers", /* @__PURE__ */ new Set());
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Подписывается на обновления.
|
|
166
|
-
* @param listener Функция, вызываемая при уведомлении.
|
|
167
|
-
* @returns Функция для отписки.
|
|
168
|
-
*/
|
|
169
|
-
subscribe(t) {
|
|
170
|
-
return this.subscribers.add(t), () => {
|
|
171
|
-
this.subscribers.delete(t);
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Уведомляет всех подписчиков.
|
|
176
|
-
*/
|
|
177
|
-
notify() {
|
|
178
|
-
this.subscribers.forEach((t) => t());
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
const jt = (r) => {
|
|
182
|
-
const t = b(r), e = r.subscribe(() => {
|
|
183
|
-
R(t);
|
|
184
|
-
});
|
|
185
|
-
return { refObj: t, unsubscribe: e };
|
|
186
|
-
}, Bt = (r) => {
|
|
187
|
-
const t = b(r), e = r.subscribe(() => R(t));
|
|
188
|
-
return q(() => {
|
|
189
|
-
e();
|
|
190
|
-
}), t;
|
|
191
|
-
};
|
|
192
|
-
class Jt extends B {
|
|
155
|
+
const wt = new H(Object.keys({}));
|
|
156
|
+
class xt extends P {
|
|
193
157
|
/**
|
|
194
158
|
* Создает экземпляр Collection и подготавливает базовое состояние.
|
|
195
159
|
*/
|
|
196
160
|
constructor(e = []) {
|
|
197
161
|
super();
|
|
198
|
-
o(this, "
|
|
199
|
-
o(this, "
|
|
200
|
-
o(this, "
|
|
201
|
-
o(this, "
|
|
202
|
-
this.
|
|
162
|
+
o(this, "_items", []);
|
|
163
|
+
o(this, "_indices", /* @__PURE__ */ new Map());
|
|
164
|
+
o(this, "_rootIds", /* @__PURE__ */ new Set());
|
|
165
|
+
o(this, "_bus");
|
|
166
|
+
this._bus = new H(Object.values(m)), e.length && this.add(e), this._createIndex("id");
|
|
203
167
|
}
|
|
204
168
|
/**
|
|
205
169
|
* Выполняет действие add в рамках ответственности Collection.
|
|
@@ -207,10 +171,10 @@ class Jt extends B {
|
|
|
207
171
|
add(e) {
|
|
208
172
|
const n = Array.isArray(e) ? e : [e];
|
|
209
173
|
n.forEach((i) => {
|
|
210
|
-
this.
|
|
174
|
+
this._items.push(i), this._indices.forEach((s, a) => {
|
|
211
175
|
s.set(i[a], i);
|
|
212
|
-
}), i.parentId || this.
|
|
213
|
-
}), n != null && n.length && (this.
|
|
176
|
+
}), i.parentId || this._rootIds.add(i.id);
|
|
177
|
+
}), n != null && n.length && (this._bus.emit(m.Add, n), this.notify());
|
|
214
178
|
}
|
|
215
179
|
/**
|
|
216
180
|
* Удаляет сущность из runtime-коллекции Collection.
|
|
@@ -218,14 +182,14 @@ class Jt extends B {
|
|
|
218
182
|
remove(e) {
|
|
219
183
|
const n = Array.isArray(e) ? e : [e], i = [];
|
|
220
184
|
n.forEach((s) => {
|
|
221
|
-
const a = typeof s == "string" ? s : s.id,
|
|
222
|
-
if (
|
|
223
|
-
const [
|
|
224
|
-
this.
|
|
225
|
-
c.delete(
|
|
226
|
-
}),
|
|
185
|
+
const a = typeof s == "string" ? s : s.id, l = this._items.findIndex((u) => u.id === a);
|
|
186
|
+
if (l !== -1) {
|
|
187
|
+
const [u] = this._items.splice(l, 1);
|
|
188
|
+
this._indices.forEach((c, h) => {
|
|
189
|
+
c.delete(u[h]);
|
|
190
|
+
}), u.parentId || this._rootIds.delete(u.id), i.push(u);
|
|
227
191
|
}
|
|
228
|
-
}), i.length && (this.
|
|
192
|
+
}), i.length && (this._bus.emit(m.Remove, i), this.notify());
|
|
229
193
|
}
|
|
230
194
|
/**
|
|
231
195
|
* Обновляет runtime-состояние Collection.
|
|
@@ -234,86 +198,87 @@ class Jt extends B {
|
|
|
234
198
|
const n = Array.isArray(e) ? e : [e];
|
|
235
199
|
n.forEach((i) => {
|
|
236
200
|
const s = this.get(i.id);
|
|
237
|
-
s && (Object.assign(s, i), this.
|
|
238
|
-
a.set(i[
|
|
201
|
+
s && (Object.assign(s, i), this._indices.forEach((a, l) => {
|
|
202
|
+
a.set(i[l], s);
|
|
239
203
|
}));
|
|
240
|
-
}), n != null && n.length && (this.
|
|
204
|
+
}), n != null && n.length && (this._bus.emit(m.Update, n), this.notify());
|
|
241
205
|
}
|
|
242
206
|
/**
|
|
243
207
|
* Возвращает значение состояния Collection.
|
|
244
208
|
*/
|
|
245
209
|
get(e) {
|
|
246
210
|
if (typeof e == "string")
|
|
247
|
-
return this.
|
|
211
|
+
return this._indices.get("id").get(e);
|
|
248
212
|
{
|
|
249
213
|
const [n, i] = Object.entries(e)[0];
|
|
250
|
-
return this.
|
|
214
|
+
return this._indices.has(n) || this._createIndex(n), this._indices.get(n).get(i);
|
|
251
215
|
}
|
|
252
216
|
}
|
|
253
217
|
/**
|
|
254
218
|
* Создает runtime-сущность Collection.
|
|
255
219
|
*/
|
|
256
|
-
|
|
257
|
-
if (this.
|
|
220
|
+
_createIndex(e) {
|
|
221
|
+
if (this._indices.has(e))
|
|
222
|
+
return;
|
|
258
223
|
const n = /* @__PURE__ */ new Map();
|
|
259
|
-
this.
|
|
224
|
+
this._items.forEach((i) => {
|
|
260
225
|
n.set(i[e], i);
|
|
261
|
-
}), this.
|
|
226
|
+
}), this._indices.set(e, n), this._bus.emit(m.IndexCreate, e);
|
|
262
227
|
}
|
|
263
228
|
/**
|
|
264
229
|
* Возвращает реактивный массив всех элементов.
|
|
265
230
|
*/
|
|
266
231
|
get all() {
|
|
267
|
-
return this.
|
|
232
|
+
return this._items;
|
|
268
233
|
}
|
|
269
234
|
/**
|
|
270
235
|
* Возвращает массив корневых элементов (без parentId).
|
|
271
236
|
*/
|
|
272
237
|
get allRoot() {
|
|
273
|
-
return Array.from(this.
|
|
238
|
+
return Array.from(this._rootIds).map((e) => this.get(e));
|
|
274
239
|
}
|
|
275
240
|
// Доступ к подпискам
|
|
276
241
|
/**
|
|
277
242
|
* Обрабатывает входящее событие Collection.
|
|
278
243
|
*/
|
|
279
244
|
on(e, n) {
|
|
280
|
-
this.
|
|
245
|
+
this._bus.on(e, n);
|
|
281
246
|
}
|
|
282
247
|
/**
|
|
283
248
|
* Выполняет действие off в рамках ответственности Collection.
|
|
284
249
|
*/
|
|
285
250
|
off(e, n) {
|
|
286
|
-
this.
|
|
251
|
+
this._bus.off(e, n);
|
|
287
252
|
}
|
|
288
253
|
}
|
|
289
|
-
class
|
|
254
|
+
class Dt {
|
|
290
255
|
/**
|
|
291
256
|
* Создает экземпляр IndexedCollection и подготавливает базовое состояние.
|
|
292
257
|
*/
|
|
293
258
|
constructor(t = null) {
|
|
294
|
-
o(this, "
|
|
295
|
-
o(this, "
|
|
296
|
-
o(this, "
|
|
297
|
-
o(this, "
|
|
298
|
-
o(this, "
|
|
299
|
-
o(this, "
|
|
300
|
-
o(this, "
|
|
301
|
-
o(this, "
|
|
302
|
-
o(this, "
|
|
303
|
-
o(this, "
|
|
259
|
+
o(this, "_list", []);
|
|
260
|
+
o(this, "_filteredList", []);
|
|
261
|
+
o(this, "_map", /* @__PURE__ */ new Map());
|
|
262
|
+
o(this, "_indexById", /* @__PURE__ */ new Map());
|
|
263
|
+
o(this, "_dirtySort", !1);
|
|
264
|
+
o(this, "_dirtyFilter", !1);
|
|
265
|
+
o(this, "_sortFn");
|
|
266
|
+
o(this, "_filterFn");
|
|
267
|
+
o(this, "_indexEnabled", !1);
|
|
268
|
+
o(this, "_filterIndexEnabled", !1);
|
|
304
269
|
t && this.options(t);
|
|
305
270
|
}
|
|
306
271
|
/**
|
|
307
272
|
* Выполняет действие options в рамках ответственности IndexedCollection.
|
|
308
273
|
*/
|
|
309
274
|
options(t) {
|
|
310
|
-
return Object.
|
|
275
|
+
return Object.hasOwn(t, "sortFn") && (this._sortFn = t.sortFn, this._dirtySort = !0), Object.hasOwn(t, "filterFn") && (this._filterFn = t.filterFn, this._dirtyFilter = !0), t.indexEnabled !== void 0 && (this._indexEnabled = t.indexEnabled, this._dirtySort = !0), t.filterIndexEnabled !== void 0 && (this._filterIndexEnabled = t.filterIndexEnabled, this._dirtyFilter = !0), this;
|
|
311
276
|
}
|
|
312
277
|
/**
|
|
313
278
|
* Выполняет действие markDirty в рамках ответственности IndexedCollection.
|
|
314
279
|
*/
|
|
315
280
|
markDirty(t) {
|
|
316
|
-
t.sort && (this.
|
|
281
|
+
t.sort && (this._dirtySort = !0), t.filter && (this._dirtyFilter = !0);
|
|
317
282
|
}
|
|
318
283
|
/**
|
|
319
284
|
* Выполняет действие ensure в рамках ответственности IndexedCollection.
|
|
@@ -326,13 +291,13 @@ class Vt {
|
|
|
326
291
|
* Выполняет действие ensureSorted в рамках ответственности IndexedCollection.
|
|
327
292
|
*/
|
|
328
293
|
ensureSorted() {
|
|
329
|
-
if (this.
|
|
330
|
-
this.
|
|
331
|
-
for (let t = 0; t < this.
|
|
332
|
-
const e = this.
|
|
333
|
-
this.
|
|
294
|
+
if (this._dirtySort) {
|
|
295
|
+
this._sortFn && this._list.sort(this._sortFn), this._indexById.clear();
|
|
296
|
+
for (let t = 0; t < this._list.length; t++) {
|
|
297
|
+
const e = this._list[t];
|
|
298
|
+
this._indexById.set(e.id, t), this._indexEnabled && (e.index = t);
|
|
334
299
|
}
|
|
335
|
-
this.
|
|
300
|
+
this._filterFn && (this._dirtyFilter = !0), this._dirtySort = !1;
|
|
336
301
|
}
|
|
337
302
|
}
|
|
338
303
|
// Фильтр, если нужно
|
|
@@ -340,7 +305,7 @@ class Vt {
|
|
|
340
305
|
* Выполняет действие ensureFiltered в рамках ответственности IndexedCollection.
|
|
341
306
|
*/
|
|
342
307
|
ensureFiltered() {
|
|
343
|
-
this.
|
|
308
|
+
this._dirtyFilter && (this._rebuildFilteredFromScratch(), this._dirtyFilter = !1);
|
|
344
309
|
}
|
|
345
310
|
/**
|
|
346
311
|
* Выполняет действие add в рамках ответственности IndexedCollection.
|
|
@@ -348,11 +313,12 @@ class Vt {
|
|
|
348
313
|
add(t) {
|
|
349
314
|
const e = Array.isArray(t) ? t : [t];
|
|
350
315
|
for (const n of e) {
|
|
351
|
-
if (this.
|
|
352
|
-
|
|
353
|
-
|
|
316
|
+
if (this._map.has(n.id))
|
|
317
|
+
continue;
|
|
318
|
+
const i = this._list.length;
|
|
319
|
+
this._list.push(n), this._map.set(n.id, n), this._indexById.set(n.id, i), this._indexEnabled && (n.index = i), this._filterIndexEnabled && (n.filteredIndex = -1), this._addToFilteredIfPasses(n);
|
|
354
320
|
}
|
|
355
|
-
this.
|
|
321
|
+
this._sortFn && (this._dirtySort = !0);
|
|
356
322
|
}
|
|
357
323
|
/**
|
|
358
324
|
* Удаляет сущность из runtime-коллекции IndexedCollection.
|
|
@@ -360,10 +326,10 @@ class Vt {
|
|
|
360
326
|
remove(t) {
|
|
361
327
|
const e = Array.isArray(t) ? t : [t];
|
|
362
328
|
for (const n of e) {
|
|
363
|
-
const i = this.
|
|
364
|
-
i && (this.
|
|
329
|
+
const i = this._map.get(n);
|
|
330
|
+
i && (this._removeFromFilteredO1(i), this._removeFromListO1(n), this._map.delete(n), this._indexEnabled && (i.index = -1), this._filterIndexEnabled && (i.filteredIndex = -1));
|
|
365
331
|
}
|
|
366
|
-
this.
|
|
332
|
+
this._sortFn && (this._dirtySort = !0);
|
|
367
333
|
}
|
|
368
334
|
/**
|
|
369
335
|
* Вызывать после изменения полей элемента
|
|
@@ -371,15 +337,15 @@ class Vt {
|
|
|
371
337
|
* mayAffectSort если изменились поля сортировки
|
|
372
338
|
*/
|
|
373
339
|
touch(t, e = {}) {
|
|
374
|
-
const n = this.
|
|
375
|
-
n && (e.mayAffectFilter !== !1 && (this.
|
|
340
|
+
const n = this._map.get(t);
|
|
341
|
+
n && (e.mayAffectFilter !== !1 && (this._refilterOneO1(n), !this._filterIndexEnabled && this._filterFn && (this._dirtyFilter = !0)), e.mayAffectSort !== !1 && this._sortFn && (this._dirtySort = !0));
|
|
376
342
|
}
|
|
377
343
|
/**
|
|
378
344
|
* Выполняет действие forEach в рамках ответственности IndexedCollection.
|
|
379
345
|
*/
|
|
380
346
|
forEach(t) {
|
|
381
347
|
this.ensure();
|
|
382
|
-
const e = this.
|
|
348
|
+
const e = this._filterFn ? this._filteredList : this._list;
|
|
383
349
|
for (let n = 0; n < e.length; n++)
|
|
384
350
|
t(e[n], n);
|
|
385
351
|
}
|
|
@@ -393,14 +359,14 @@ class Vt {
|
|
|
393
359
|
* Отсортированный полный список (без фильтра), если есть sortFn.
|
|
394
360
|
*/
|
|
395
361
|
unfiltered() {
|
|
396
|
-
return this.ensureSorted(), this.
|
|
362
|
+
return this.ensureSorted(), this._list;
|
|
397
363
|
}
|
|
398
364
|
/**
|
|
399
365
|
* Отсортированный и отфильтрованный список (если есть filterFn).
|
|
400
366
|
* Если filterFn нет — возвращается list.
|
|
401
367
|
*/
|
|
402
368
|
filtered() {
|
|
403
|
-
return this.ensure(), this.
|
|
369
|
+
return this.ensure(), this._filterFn ? this._filteredList : this._list;
|
|
404
370
|
}
|
|
405
371
|
/**
|
|
406
372
|
* Выполняет действие pos в рамках ответственности IndexedCollection.
|
|
@@ -427,13 +393,13 @@ class Vt {
|
|
|
427
393
|
* Выполняет действие has в рамках ответственности IndexedCollection.
|
|
428
394
|
*/
|
|
429
395
|
has(t) {
|
|
430
|
-
return this.
|
|
396
|
+
return this._map.has(t);
|
|
431
397
|
}
|
|
432
398
|
/**
|
|
433
399
|
* Возвращает значение состояния IndexedCollection.
|
|
434
400
|
*/
|
|
435
401
|
get(t) {
|
|
436
|
-
return this.
|
|
402
|
+
return this._map.get(t);
|
|
437
403
|
}
|
|
438
404
|
/**
|
|
439
405
|
* Выполняет действие size в рамках ответственности IndexedCollection.
|
|
@@ -445,84 +411,90 @@ class Vt {
|
|
|
445
411
|
* Очищает накопленное состояние IndexedCollection.
|
|
446
412
|
*/
|
|
447
413
|
clear() {
|
|
448
|
-
this.
|
|
414
|
+
this._list = [], this._filteredList = [], this._map.clear(), this._indexById.clear(), this._dirtySort = !1, this._dirtyFilter = !1;
|
|
449
415
|
}
|
|
450
416
|
/**
|
|
451
417
|
* Выполняет внутренний шаг rebuildFilteredFromScratch для IndexedCollection.
|
|
452
418
|
*/
|
|
453
|
-
|
|
454
|
-
if (!this.
|
|
455
|
-
if (this.
|
|
456
|
-
for (const t of this.
|
|
419
|
+
_rebuildFilteredFromScratch() {
|
|
420
|
+
if (!this._filterFn) {
|
|
421
|
+
if (this._filteredList = [], this._filterIndexEnabled)
|
|
422
|
+
for (const t of this._list)
|
|
423
|
+
t.filteredIndex = -1;
|
|
457
424
|
return;
|
|
458
425
|
}
|
|
459
|
-
if (this.
|
|
460
|
-
for (const t of this.
|
|
461
|
-
|
|
462
|
-
|
|
426
|
+
if (this._filteredList = [], this._filterIndexEnabled)
|
|
427
|
+
for (const t of this._list)
|
|
428
|
+
t.filteredIndex = -1;
|
|
429
|
+
for (const t of this._list)
|
|
430
|
+
this._filterFn(t) && this._appendToFiltered(t);
|
|
463
431
|
}
|
|
464
432
|
/**
|
|
465
433
|
* Выполняет внутренний шаг addToFilteredIfPasses для IndexedCollection.
|
|
466
434
|
*/
|
|
467
|
-
|
|
468
|
-
if (this.
|
|
469
|
-
if (!this.
|
|
470
|
-
this.
|
|
435
|
+
_addToFilteredIfPasses(t) {
|
|
436
|
+
if (this._filterFn) {
|
|
437
|
+
if (!this._filterIndexEnabled) {
|
|
438
|
+
this._dirtyFilter = !0;
|
|
471
439
|
return;
|
|
472
440
|
}
|
|
473
|
-
(t.filteredIndex ?? -1) >= 0 || this.
|
|
441
|
+
(t.filteredIndex ?? -1) >= 0 || this._filterFn(t) && this._appendToFiltered(t);
|
|
474
442
|
}
|
|
475
443
|
}
|
|
476
444
|
/**
|
|
477
445
|
* Добавляет сущность в runtime-коллекцию IndexedCollection.
|
|
478
446
|
*/
|
|
479
|
-
|
|
480
|
-
const e = this.
|
|
481
|
-
this.
|
|
447
|
+
_appendToFiltered(t) {
|
|
448
|
+
const e = this._filteredList.length;
|
|
449
|
+
this._filteredList.push(t), this._filterIndexEnabled && (t.filteredIndex = e);
|
|
482
450
|
}
|
|
483
451
|
/**
|
|
484
452
|
* Выполняет внутренний шаг refilterOneO1 для IndexedCollection.
|
|
485
453
|
*/
|
|
486
|
-
|
|
487
|
-
if (!this.
|
|
488
|
-
|
|
489
|
-
|
|
454
|
+
_refilterOneO1(t) {
|
|
455
|
+
if (!this._filterFn || !this._filterIndexEnabled)
|
|
456
|
+
return !1;
|
|
457
|
+
const e = this._filterFn(t), i = (t.filteredIndex ?? -1) >= 0;
|
|
458
|
+
return e ? i ? !1 : (this._appendToFiltered(t), !0) : i ? (this._removeFromFilteredO1(t), !0) : !1;
|
|
490
459
|
}
|
|
491
460
|
/**
|
|
492
461
|
* Удаляет сущность из runtime-коллекции IndexedCollection.
|
|
493
462
|
*/
|
|
494
|
-
|
|
495
|
-
if (!this.
|
|
463
|
+
_removeFromFilteredO1(t) {
|
|
464
|
+
if (!this._filterIndexEnabled)
|
|
465
|
+
return;
|
|
496
466
|
const e = t.filteredIndex ?? -1;
|
|
497
|
-
if (e < 0)
|
|
498
|
-
|
|
467
|
+
if (e < 0)
|
|
468
|
+
return;
|
|
469
|
+
const n = this._filteredList.length - 1;
|
|
499
470
|
if (e !== n) {
|
|
500
|
-
const i = this.
|
|
501
|
-
this.
|
|
471
|
+
const i = this._filteredList[n];
|
|
472
|
+
this._filteredList[e] = i, i.filteredIndex = e;
|
|
502
473
|
}
|
|
503
|
-
this.
|
|
474
|
+
this._filteredList.pop(), t.filteredIndex = -1;
|
|
504
475
|
}
|
|
505
476
|
/**
|
|
506
477
|
* Удаляет сущность из runtime-коллекции IndexedCollection.
|
|
507
478
|
*/
|
|
508
|
-
|
|
509
|
-
const e = this.
|
|
510
|
-
if (e === void 0)
|
|
511
|
-
|
|
479
|
+
_removeFromListO1(t) {
|
|
480
|
+
const e = this._indexById.get(t);
|
|
481
|
+
if (e === void 0)
|
|
482
|
+
return;
|
|
483
|
+
const n = this._list.length - 1;
|
|
512
484
|
if (e !== n) {
|
|
513
|
-
const i = this.
|
|
514
|
-
this.
|
|
485
|
+
const i = this._list[n];
|
|
486
|
+
this._list[e] = i, this._indexById.set(i.id, e), this._indexEnabled && (i.index = e);
|
|
515
487
|
}
|
|
516
|
-
this.
|
|
488
|
+
this._list.pop(), this._indexById.delete(t);
|
|
517
489
|
}
|
|
518
490
|
}
|
|
519
|
-
class
|
|
491
|
+
class It {
|
|
520
492
|
constructor(t) {
|
|
521
493
|
o(this, "_cap");
|
|
522
494
|
o(this, "_buf");
|
|
523
495
|
o(this, "_head", 0);
|
|
524
496
|
o(this, "_len", 0);
|
|
525
|
-
this._cap = Math.max(0, t | 0), this._buf =
|
|
497
|
+
this._cap = Math.max(0, t | 0), this._buf = Array.from({ length: this._cap });
|
|
526
498
|
}
|
|
527
499
|
get capacity() {
|
|
528
500
|
return this._cap;
|
|
@@ -539,7 +511,7 @@ class Gt {
|
|
|
539
511
|
toArray() {
|
|
540
512
|
if (this._len === 0 || this._cap <= 0)
|
|
541
513
|
return [];
|
|
542
|
-
const t =
|
|
514
|
+
const t = Array.from({ length: this._len }), e = (this._head - this._len + this._cap) % this._cap;
|
|
543
515
|
for (let n = 0; n < this._len; n += 1) {
|
|
544
516
|
const i = (e + n) % this._cap;
|
|
545
517
|
t[n] = this._buf[i];
|
|
@@ -547,31 +519,31 @@ class Gt {
|
|
|
547
519
|
return t;
|
|
548
520
|
}
|
|
549
521
|
}
|
|
550
|
-
class
|
|
522
|
+
class Et {
|
|
551
523
|
constructor(t) {
|
|
552
|
-
o(this, "
|
|
553
|
-
this.
|
|
524
|
+
o(this, "_baseUrl");
|
|
525
|
+
this._baseUrl = t.baseUrl.replace(/\/+$/, "");
|
|
554
526
|
}
|
|
555
|
-
|
|
527
|
+
_buildUrl(t, e) {
|
|
556
528
|
const n = new URL(
|
|
557
529
|
t.replace(/^\//, ""),
|
|
558
|
-
this.
|
|
530
|
+
this._baseUrl.endsWith("/") ? this._baseUrl : `${this._baseUrl}/`
|
|
559
531
|
);
|
|
560
532
|
if (e)
|
|
561
533
|
for (const [i, s] of Object.entries(e))
|
|
562
534
|
s != null && n.searchParams.set(i, String(s));
|
|
563
535
|
return n.toString();
|
|
564
536
|
}
|
|
565
|
-
|
|
537
|
+
_buildHeaders(t) {
|
|
566
538
|
return {
|
|
567
539
|
"Content-Type": "application/json",
|
|
568
540
|
...t || {}
|
|
569
541
|
};
|
|
570
542
|
}
|
|
571
543
|
async get(t, e, n) {
|
|
572
|
-
const i = await fetch(this.
|
|
544
|
+
const i = await fetch(this._buildUrl(t, e), {
|
|
573
545
|
method: "GET",
|
|
574
|
-
headers: this.
|
|
546
|
+
headers: this._buildHeaders(n),
|
|
575
547
|
credentials: "include"
|
|
576
548
|
});
|
|
577
549
|
if (!i.ok) {
|
|
@@ -581,9 +553,9 @@ class Zt {
|
|
|
581
553
|
return await i.json();
|
|
582
554
|
}
|
|
583
555
|
async post(t, e, n) {
|
|
584
|
-
const i = await fetch(this.
|
|
556
|
+
const i = await fetch(this._buildUrl(t), {
|
|
585
557
|
method: "POST",
|
|
586
|
-
headers: this.
|
|
558
|
+
headers: this._buildHeaders(n),
|
|
587
559
|
credentials: "include",
|
|
588
560
|
body: e !== void 0 ? JSON.stringify(e) : void 0
|
|
589
561
|
});
|
|
@@ -594,9 +566,9 @@ class Zt {
|
|
|
594
566
|
return await i.json();
|
|
595
567
|
}
|
|
596
568
|
async patch(t, e, n) {
|
|
597
|
-
const i = await fetch(this.
|
|
569
|
+
const i = await fetch(this._buildUrl(t), {
|
|
598
570
|
method: "PATCH",
|
|
599
|
-
headers: this.
|
|
571
|
+
headers: this._buildHeaders(n),
|
|
600
572
|
credentials: "include",
|
|
601
573
|
body: e !== void 0 ? JSON.stringify(e) : void 0
|
|
602
574
|
});
|
|
@@ -607,9 +579,9 @@ class Zt {
|
|
|
607
579
|
return await i.json();
|
|
608
580
|
}
|
|
609
581
|
async delete(t, e) {
|
|
610
|
-
const n = await fetch(this.
|
|
582
|
+
const n = await fetch(this._buildUrl(t), {
|
|
611
583
|
method: "DELETE",
|
|
612
|
-
headers: this.
|
|
584
|
+
headers: this._buildHeaders(e),
|
|
613
585
|
credentials: "include"
|
|
614
586
|
});
|
|
615
587
|
if (!n.ok) {
|
|
@@ -619,197 +591,115 @@ class Zt {
|
|
|
619
591
|
return await n.json().catch(() => ({}));
|
|
620
592
|
}
|
|
621
593
|
}
|
|
622
|
-
class
|
|
594
|
+
class At {
|
|
623
595
|
/**
|
|
624
596
|
* Создает экземпляр DelayedExecutor и подготавливает базовое состояние.
|
|
625
597
|
*/
|
|
626
598
|
constructor(t, e = !1) {
|
|
627
|
-
o(this, "
|
|
628
|
-
o(this, "
|
|
629
|
-
o(this, "
|
|
630
|
-
o(this, "
|
|
631
|
-
this.
|
|
599
|
+
o(this, "_delayTimer", null);
|
|
600
|
+
o(this, "_maxTimer", null);
|
|
601
|
+
o(this, "_hasExecutedOnce", !1);
|
|
602
|
+
o(this, "_lastArgs", null);
|
|
603
|
+
this._fn = t, this._firstExecuteImmediately = e;
|
|
632
604
|
}
|
|
633
605
|
/**
|
|
634
606
|
* Выполняет действие run в рамках ответственности DelayedExecutor.
|
|
635
607
|
*/
|
|
636
608
|
run(t, e = 500, n = 2e3) {
|
|
637
|
-
if (this.
|
|
638
|
-
this.
|
|
609
|
+
if (this._lastArgs = t, this._firstExecuteImmediately && !this._hasExecutedOnce) {
|
|
610
|
+
this._hasExecutedOnce = !0, this.flush();
|
|
639
611
|
return;
|
|
640
612
|
}
|
|
641
|
-
this.
|
|
613
|
+
this._delayTimer && clearTimeout(this._delayTimer), this._delayTimer = setTimeout(() => this.flush(), e), this._maxTimer || (this._maxTimer = setTimeout(() => this.flush(), n));
|
|
642
614
|
}
|
|
643
615
|
/**
|
|
644
616
|
* Принудительно завершает накопленные изменения DelayedExecutor.
|
|
645
617
|
*/
|
|
646
618
|
flush() {
|
|
647
|
-
this.
|
|
619
|
+
this._clear(), this._lastArgs && this._fn(...this._lastArgs);
|
|
648
620
|
}
|
|
649
621
|
/**
|
|
650
622
|
* Выполняет действие cancel в рамках ответственности DelayedExecutor.
|
|
651
623
|
*/
|
|
652
624
|
cancel() {
|
|
653
|
-
this.
|
|
625
|
+
this._clear();
|
|
654
626
|
}
|
|
655
627
|
/**
|
|
656
628
|
* Очищает накопленное состояние DelayedExecutor.
|
|
657
629
|
*/
|
|
658
|
-
|
|
659
|
-
this.
|
|
630
|
+
_clear() {
|
|
631
|
+
this._delayTimer && clearTimeout(this._delayTimer), this._maxTimer && clearTimeout(this._maxTimer), this._delayTimer = null, this._maxTimer = null;
|
|
660
632
|
}
|
|
661
633
|
}
|
|
662
|
-
function
|
|
634
|
+
function x(r) {
|
|
663
635
|
var t;
|
|
664
636
|
return r == null ? String(r) : typeof r == "string" ? `string(${r.length})` : typeof r != "object" ? `${typeof r}(${String(r)})` : Array.isArray(r) ? `Array(${r.length})` : r instanceof Map ? `Map(${r.size})` : r instanceof Set ? `Set(${r.size})` : ((t = r.constructor) == null ? void 0 : t.name) || "Object";
|
|
665
637
|
}
|
|
666
|
-
function
|
|
667
|
-
return r instanceof Error ? `${r.name}: ${r.message}` :
|
|
638
|
+
function U(r) {
|
|
639
|
+
return r instanceof Error ? `${r.name}: ${r.message}` : x(r);
|
|
668
640
|
}
|
|
669
|
-
class
|
|
641
|
+
class Ot {
|
|
670
642
|
/**
|
|
671
643
|
* Создает экземпляр NamedExecutor и подготавливает базовое состояние.
|
|
672
644
|
*/
|
|
673
645
|
constructor(t) {
|
|
674
|
-
o(this, "
|
|
675
|
-
o(this, "
|
|
676
|
-
o(this, "
|
|
677
|
-
o(this, "
|
|
678
|
-
this.
|
|
646
|
+
o(this, "_delayTimers", /* @__PURE__ */ new Map());
|
|
647
|
+
o(this, "_maxTimers", /* @__PURE__ */ new Map());
|
|
648
|
+
o(this, "_callbacks", /* @__PURE__ */ new Map());
|
|
649
|
+
o(this, "_firstCallTime", /* @__PURE__ */ new Map());
|
|
650
|
+
this._config = t;
|
|
679
651
|
}
|
|
680
652
|
/**
|
|
681
653
|
* Выполняет действие run в рамках ответственности NamedExecutor.
|
|
682
654
|
*/
|
|
683
655
|
run(t, e) {
|
|
684
656
|
const n = Date.now();
|
|
685
|
-
if (!this.
|
|
686
|
-
this.
|
|
657
|
+
if (!this._firstCallTime.has(t)) {
|
|
658
|
+
this._firstCallTime.set(t, n);
|
|
687
659
|
const s = setTimeout(() => {
|
|
688
660
|
this.flush(t);
|
|
689
|
-
}, this.
|
|
690
|
-
this.
|
|
661
|
+
}, this._config.maxMs);
|
|
662
|
+
this._maxTimers.set(t, s);
|
|
691
663
|
}
|
|
692
|
-
this.
|
|
664
|
+
this._callbacks.set(t, e), clearTimeout(this._delayTimers.get(t));
|
|
693
665
|
const i = setTimeout(() => {
|
|
694
666
|
this.flush(t);
|
|
695
|
-
}, this.
|
|
696
|
-
this.
|
|
667
|
+
}, this._config.delayMs);
|
|
668
|
+
this._delayTimers.set(t, i);
|
|
697
669
|
}
|
|
698
670
|
/**
|
|
699
671
|
* Принудительно завершает накопленные изменения NamedExecutor.
|
|
700
672
|
*/
|
|
701
673
|
flush(t) {
|
|
702
674
|
try {
|
|
703
|
-
const e = this.
|
|
675
|
+
const e = this._callbacks.get(t);
|
|
704
676
|
e && e();
|
|
705
677
|
} catch (e) {
|
|
706
|
-
console.error(`[NamedExecutor] flush error: ${
|
|
678
|
+
console.error(`[NamedExecutor] flush error: ${U(e)}`);
|
|
707
679
|
}
|
|
708
|
-
this.
|
|
680
|
+
this._clear(t);
|
|
709
681
|
}
|
|
710
682
|
/**
|
|
711
683
|
* Выполняет действие cancel в рамках ответственности NamedExecutor.
|
|
712
684
|
*/
|
|
713
685
|
cancel(t) {
|
|
714
|
-
this.
|
|
686
|
+
this._clear(t);
|
|
715
687
|
}
|
|
716
688
|
/**
|
|
717
689
|
* Принудительно завершает накопленные изменения NamedExecutor.
|
|
718
690
|
*/
|
|
719
691
|
flushAll() {
|
|
720
|
-
for (const t of this.
|
|
692
|
+
for (const t of this._callbacks.keys())
|
|
721
693
|
this.flush(t);
|
|
722
694
|
}
|
|
723
695
|
/**
|
|
724
696
|
* Очищает накопленное состояние NamedExecutor.
|
|
725
697
|
*/
|
|
726
|
-
|
|
727
|
-
clearTimeout(this.
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
function qt(r, t) {
|
|
731
|
-
return w(r, t, {
|
|
732
|
-
exposeDefaultValues: !0,
|
|
733
|
-
excludeExtraneousValues: !0
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
function Qt(r) {
|
|
737
|
-
return x(r, {
|
|
738
|
-
exposeUnsetFields: !1
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
function Xt(r) {
|
|
742
|
-
return function(t, e) {
|
|
743
|
-
tt(r)(t, e), Reflect.defineMetadata("genericExpose", r.name, t, e);
|
|
744
|
-
};
|
|
745
|
-
}
|
|
746
|
-
const mt = Symbol("beforeSerialize");
|
|
747
|
-
function vt() {
|
|
748
|
-
return function(r, t, e) {
|
|
749
|
-
Reflect.defineMetadata(mt, t, r);
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
function te(r, t, e) {
|
|
753
|
-
r.__afterDeserializeMethods__ || (r.__afterDeserializeMethods__ = []), r.__afterDeserializeMethods__.push(t);
|
|
754
|
-
}
|
|
755
|
-
function ee(r) {
|
|
756
|
-
return function(t, e) {
|
|
757
|
-
f(({ value: n }) => n === null ? void 0 : n, { toPlainOnly: !0 })(t, e), et(r)(t, e);
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
function re() {
|
|
761
|
-
return f(({ value: r, type: t }) => t === m.PLAIN_TO_CLASS ? r == null ? void 0 : r.id : r);
|
|
762
|
-
}
|
|
763
|
-
function ne(r) {
|
|
764
|
-
return f(({ value: t, type: e }) => e === m.PLAIN_TO_CLASS ? t == null ? void 0 : t.map((n) => n == null ? void 0 : n[r]) : t);
|
|
765
|
-
}
|
|
766
|
-
function ie() {
|
|
767
|
-
return f(({ value: r, type: t }) => t === m.CLASS_TO_PLAIN && (r == null ? void 0 : r.id) || r);
|
|
768
|
-
}
|
|
769
|
-
function se() {
|
|
770
|
-
return f(({ value: r, type: t }) => t === m.CLASS_TO_PLAIN ? r.map((e) => e.id) : r);
|
|
771
|
-
}
|
|
772
|
-
function oe() {
|
|
773
|
-
return f(({ value: r, type: t }) => t === "classToPlain" ? void 0 : r, { toPlainOnly: !0 });
|
|
774
|
-
}
|
|
775
|
-
function ae(r) {
|
|
776
|
-
return r == null;
|
|
777
|
-
}
|
|
778
|
-
const J = Symbol("onDeserialized");
|
|
779
|
-
function ce() {
|
|
780
|
-
return function(r, t) {
|
|
781
|
-
Reflect.defineMetadata(J, t, r);
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
function yt(r) {
|
|
785
|
-
const t = Reflect.getMetadata(
|
|
786
|
-
J,
|
|
787
|
-
r
|
|
788
|
-
);
|
|
789
|
-
return t ? r[t].bind(r) : null;
|
|
790
|
-
}
|
|
791
|
-
class le {
|
|
792
|
-
/**
|
|
793
|
-
* Выполняет действие toPlain в рамках ответственности Serialize.
|
|
794
|
-
*/
|
|
795
|
-
static toPlain(t) {
|
|
796
|
-
return x(t, {
|
|
797
|
-
exposeDefaultValues: !0,
|
|
798
|
-
excludeExtraneousValues: !0
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* Выполняет действие fromJSON в рамках ответственности Serialize.
|
|
803
|
-
*/
|
|
804
|
-
static fromJSON(t, e) {
|
|
805
|
-
const n = w(t, e, {
|
|
806
|
-
exposeDefaultValues: !0,
|
|
807
|
-
excludeExtraneousValues: !0
|
|
808
|
-
}), i = yt(n);
|
|
809
|
-
return i && i(), n;
|
|
698
|
+
_clear(t) {
|
|
699
|
+
clearTimeout(this._delayTimers.get(t)), clearTimeout(this._maxTimers.get(t)), this._delayTimers.delete(t), this._maxTimers.delete(t), this._callbacks.delete(t), this._firstCallTime.delete(t);
|
|
810
700
|
}
|
|
811
701
|
}
|
|
812
|
-
function
|
|
702
|
+
function Ct() {
|
|
813
703
|
return function(r, t) {
|
|
814
704
|
f(
|
|
815
705
|
({ value: e }) => {
|
|
@@ -834,7 +724,7 @@ function ue() {
|
|
|
834
724
|
)(r, t);
|
|
835
725
|
};
|
|
836
726
|
}
|
|
837
|
-
function
|
|
727
|
+
function Mt() {
|
|
838
728
|
return function(r, t) {
|
|
839
729
|
f(
|
|
840
730
|
({ value: e }) => {
|
|
@@ -865,7 +755,20 @@ function fe() {
|
|
|
865
755
|
)(r, t);
|
|
866
756
|
};
|
|
867
757
|
}
|
|
868
|
-
|
|
758
|
+
const R = Symbol("onDeserialized");
|
|
759
|
+
function $t() {
|
|
760
|
+
return function(r, t) {
|
|
761
|
+
Reflect.defineMetadata(R, t, r);
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
function rt(r) {
|
|
765
|
+
const t = Reflect.getMetadata(
|
|
766
|
+
R,
|
|
767
|
+
r
|
|
768
|
+
);
|
|
769
|
+
return t ? r[t].bind(r) : null;
|
|
770
|
+
}
|
|
771
|
+
function Ft() {
|
|
869
772
|
return function(r, t) {
|
|
870
773
|
f(
|
|
871
774
|
({ value: e }) => typeof e == "string" ? e.trim() : String(e ?? ""),
|
|
@@ -876,113 +779,168 @@ function de() {
|
|
|
876
779
|
)(r, t);
|
|
877
780
|
};
|
|
878
781
|
}
|
|
879
|
-
function
|
|
880
|
-
return f(({ value: e, type: n }) =>
|
|
881
|
-
e
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
782
|
+
function kt(r, t) {
|
|
783
|
+
return f(({ value: e, type: n }) => {
|
|
784
|
+
if (!e)
|
|
785
|
+
return /* @__PURE__ */ new Map();
|
|
786
|
+
if (n === _.PLAIN_TO_CLASS) {
|
|
787
|
+
if (Array.isArray(e))
|
|
788
|
+
return t ? new Map(
|
|
789
|
+
e.map((i) => {
|
|
790
|
+
const s = T(r, i);
|
|
791
|
+
return [s[t], s];
|
|
792
|
+
})
|
|
793
|
+
) : (console.warn(
|
|
794
|
+
"[TypeMap] Key field is required for array transformation!"
|
|
795
|
+
), /* @__PURE__ */ new Map());
|
|
796
|
+
if (typeof e == "object") {
|
|
797
|
+
const i = r;
|
|
798
|
+
return new Map(
|
|
799
|
+
Object.entries(e).map(([s, a]) => {
|
|
800
|
+
const l = new i();
|
|
801
|
+
return Object.assign(l, a), [s, l];
|
|
802
|
+
})
|
|
803
|
+
);
|
|
804
|
+
}
|
|
805
|
+
return console.warn(`[TypeMap] Expected object or array, got ${x(e)}`), /* @__PURE__ */ new Map();
|
|
806
|
+
}
|
|
807
|
+
return n === _.CLASS_TO_PLAIN ? e instanceof Map ? Array.from(e.values()).map((i) => S(i)) : (console.warn(`[TypeMap] Expected Map, got ${x(e)}`), t ? [] : {}) : (console.warn(`[TypeMap] Unexpected transformation type: ${String(n)}`), e);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
function Lt(r) {
|
|
895
811
|
return f(({ value: t, type: e }) => {
|
|
896
|
-
if (!t || typeof t != "object")
|
|
897
|
-
|
|
812
|
+
if (!t || typeof t != "object")
|
|
813
|
+
return {};
|
|
814
|
+
if (e === _.PLAIN_TO_CLASS) {
|
|
898
815
|
const n = {};
|
|
899
816
|
for (const i of Object.keys(t))
|
|
900
|
-
n[i] =
|
|
817
|
+
n[i] = T(r, t[i]);
|
|
901
818
|
return n;
|
|
902
819
|
}
|
|
903
|
-
if (e ===
|
|
820
|
+
if (e === _.CLASS_TO_PLAIN) {
|
|
904
821
|
const n = {};
|
|
905
822
|
for (const i of Object.keys(t))
|
|
906
|
-
n[i] =
|
|
823
|
+
n[i] = S(t[i]);
|
|
907
824
|
return n;
|
|
908
825
|
}
|
|
909
826
|
return t;
|
|
910
827
|
});
|
|
911
828
|
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
() => {
|
|
933
|
-
l();
|
|
934
|
-
},
|
|
935
|
-
{ deep: !0 }
|
|
936
|
-
), u;
|
|
829
|
+
class Nt {
|
|
830
|
+
/**
|
|
831
|
+
* Выполняет действие toPlain в рамках ответственности Serialize.
|
|
832
|
+
*/
|
|
833
|
+
static toPlain(t) {
|
|
834
|
+
return S(t, {
|
|
835
|
+
exposeDefaultValues: !0,
|
|
836
|
+
excludeExtraneousValues: !0
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Выполняет действие fromJSON в рамках ответственности Serialize.
|
|
841
|
+
*/
|
|
842
|
+
static fromJSON(t, e) {
|
|
843
|
+
const n = T(t, e, {
|
|
844
|
+
exposeDefaultValues: !0,
|
|
845
|
+
excludeExtraneousValues: !0
|
|
846
|
+
}), i = rt(n);
|
|
847
|
+
return i && i(), n;
|
|
848
|
+
}
|
|
937
849
|
}
|
|
938
|
-
function
|
|
850
|
+
function zt(r) {
|
|
851
|
+
return function(t, e) {
|
|
852
|
+
J(r)(t, e), Reflect.defineMetadata("genericExpose", r.name, t, e);
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
const nt = Symbol("beforeSerialize");
|
|
856
|
+
function Pt() {
|
|
857
|
+
return function(r, t, e) {
|
|
858
|
+
Reflect.defineMetadata(nt, t, r);
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
function Ht(r, t, e) {
|
|
862
|
+
r.__afterDeserializeMethods__ || (r.__afterDeserializeMethods__ = []), r.__afterDeserializeMethods__.push(t);
|
|
863
|
+
}
|
|
864
|
+
function Ut(r) {
|
|
865
|
+
return function(t, e) {
|
|
866
|
+
f(({ value: n }) => n === null ? void 0 : n, { toPlainOnly: !0 })(t, e), Z(r)(t, e);
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
function Rt() {
|
|
870
|
+
return f(({ value: r, type: t }) => t === _.PLAIN_TO_CLASS ? r == null ? void 0 : r.id : r);
|
|
871
|
+
}
|
|
872
|
+
function Kt(r) {
|
|
873
|
+
return f(({ value: t, type: e }) => e === _.PLAIN_TO_CLASS ? t == null ? void 0 : t.map((n) => n == null ? void 0 : n[r]) : t);
|
|
874
|
+
}
|
|
875
|
+
function jt() {
|
|
876
|
+
return f(({ value: r, type: t }) => t === _.CLASS_TO_PLAIN && (r == null ? void 0 : r.id) || r);
|
|
877
|
+
}
|
|
878
|
+
function Bt() {
|
|
879
|
+
return f(({ value: r, type: t }) => t === _.CLASS_TO_PLAIN ? r.map((e) => e.id) : r);
|
|
880
|
+
}
|
|
881
|
+
function Vt() {
|
|
882
|
+
return f(({ value: r, type: t }) => t === "classToPlain" ? void 0 : r, { toPlainOnly: !0 });
|
|
883
|
+
}
|
|
884
|
+
function Gt(r, t) {
|
|
885
|
+
return T(r, t, {
|
|
886
|
+
exposeDefaultValues: !0,
|
|
887
|
+
excludeExtraneousValues: !0
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
function Jt(r) {
|
|
891
|
+
return S(r, {
|
|
892
|
+
exposeUnsetFields: !1
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
function Zt(r) {
|
|
896
|
+
return r == null;
|
|
897
|
+
}
|
|
898
|
+
function Wt(r, t) {
|
|
939
899
|
return r < t ? -1 : r > t ? 1 : 0;
|
|
940
900
|
}
|
|
941
|
-
const
|
|
942
|
-
function
|
|
943
|
-
|
|
944
|
-
console.groupCollapsed(`⏳ ${r}`);
|
|
945
|
-
const e = performance.now(), n = t(), i = performance.now();
|
|
946
|
-
return console.log(`${r}: ${Math.round(i - e)} ms`), console.groupEnd(), n;
|
|
901
|
+
const Yt = !1;
|
|
902
|
+
function qt(r, t) {
|
|
903
|
+
return t();
|
|
947
904
|
}
|
|
948
|
-
const
|
|
949
|
-
function
|
|
905
|
+
const Qt = () => W(), M = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
906
|
+
function Xt(r) {
|
|
950
907
|
let t = "";
|
|
951
908
|
for (let e = 0; e < r; ++e)
|
|
952
|
-
t +=
|
|
909
|
+
t += M[Math.floor(M.length * Math.random())];
|
|
953
910
|
return t;
|
|
954
911
|
}
|
|
955
|
-
class
|
|
912
|
+
class vt {
|
|
956
913
|
/**
|
|
957
914
|
* Создает экземпляр HotkeyManager и подготавливает базовое состояние.
|
|
958
915
|
*/
|
|
959
916
|
constructor(t = {}) {
|
|
960
|
-
o(this, "
|
|
961
|
-
o(this, "
|
|
962
|
-
o(this, "
|
|
963
|
-
o(this, "
|
|
964
|
-
o(this, "
|
|
965
|
-
this.
|
|
917
|
+
o(this, "_bindings", /* @__PURE__ */ new Map());
|
|
918
|
+
o(this, "_enabled", !0);
|
|
919
|
+
o(this, "_target");
|
|
920
|
+
o(this, "_ignoreInput");
|
|
921
|
+
o(this, "_handleBound");
|
|
922
|
+
this._target = t.target || window, this._ignoreInput = t.ignoreInput ?? !1, this._handleBound = this._handle.bind(this), this._target.addEventListener("keydown", this._handleBound);
|
|
966
923
|
}
|
|
967
924
|
/**
|
|
968
925
|
* Выполняет внутренний шаг isIgnoredTarget для HotkeyManager.
|
|
969
926
|
*/
|
|
970
|
-
|
|
971
|
-
return this.
|
|
927
|
+
_isIgnoredTarget(t) {
|
|
928
|
+
return this._ignoreInput ? t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable : !1;
|
|
972
929
|
}
|
|
973
930
|
/**
|
|
974
931
|
* Нормализует входные данные HotkeyManager.
|
|
975
932
|
*/
|
|
976
|
-
|
|
933
|
+
_normalizeKey(t) {
|
|
977
934
|
const e = [];
|
|
978
935
|
return t.ctrlKey && e.push("ctrl"), t.metaKey && e.push("meta"), t.altKey && e.push("alt"), t.shiftKey && e.push("shift"), e.push(t.key.toLowerCase()), e.join("+");
|
|
979
936
|
}
|
|
980
937
|
/**
|
|
981
938
|
* Обрабатывает runtime-событие HotkeyManager.
|
|
982
939
|
*/
|
|
983
|
-
|
|
984
|
-
if (!this.
|
|
985
|
-
|
|
940
|
+
_handle(t) {
|
|
941
|
+
if (!this._enabled || this._isIgnoredTarget(t.target))
|
|
942
|
+
return;
|
|
943
|
+
const e = this._normalizeKey(t), n = this._bindings.get(e);
|
|
986
944
|
if (n)
|
|
987
945
|
for (const i of n)
|
|
988
946
|
i(t);
|
|
@@ -994,7 +952,7 @@ class Te {
|
|
|
994
952
|
const n = Array.isArray(t) ? t : [t];
|
|
995
953
|
for (const i of n) {
|
|
996
954
|
const s = i.toLowerCase();
|
|
997
|
-
this.
|
|
955
|
+
this._bindings.has(s) || this._bindings.set(s, /* @__PURE__ */ new Set()), this._bindings.get(s).add(e);
|
|
998
956
|
}
|
|
999
957
|
}
|
|
1000
958
|
/**
|
|
@@ -1005,42 +963,42 @@ class Te {
|
|
|
1005
963
|
const n = Array.isArray(t) ? t : [t];
|
|
1006
964
|
for (const s of n) {
|
|
1007
965
|
const a = s.toLowerCase();
|
|
1008
|
-
(i = this.
|
|
966
|
+
(i = this._bindings.get(a)) == null || i.delete(e);
|
|
1009
967
|
}
|
|
1010
968
|
}
|
|
1011
969
|
/**
|
|
1012
970
|
* Очищает накопленное состояние HotkeyManager.
|
|
1013
971
|
*/
|
|
1014
972
|
clear(t) {
|
|
1015
|
-
t ? this.
|
|
973
|
+
t ? this._bindings.delete(t.toLowerCase()) : this._bindings.clear();
|
|
1016
974
|
}
|
|
1017
975
|
/**
|
|
1018
976
|
* Выполняет действие enable в рамках ответственности HotkeyManager.
|
|
1019
977
|
*/
|
|
1020
978
|
enable() {
|
|
1021
|
-
this.
|
|
979
|
+
this._enabled = !0;
|
|
1022
980
|
}
|
|
1023
981
|
/**
|
|
1024
982
|
* Выполняет действие disable в рамках ответственности HotkeyManager.
|
|
1025
983
|
*/
|
|
1026
984
|
disable() {
|
|
1027
|
-
this.
|
|
985
|
+
this._enabled = !1;
|
|
1028
986
|
}
|
|
1029
987
|
/**
|
|
1030
988
|
* Освобождает runtime-ресурсы и подписки HotkeyManager.
|
|
1031
989
|
*/
|
|
1032
990
|
destroy() {
|
|
1033
|
-
this.clear(), this.
|
|
991
|
+
this.clear(), this._target.removeEventListener("keydown", this._handleBound);
|
|
1034
992
|
}
|
|
1035
993
|
}
|
|
1036
|
-
function
|
|
994
|
+
function te(r, t) {
|
|
1037
995
|
return t != null && t.key ? r.some((e) => {
|
|
1038
|
-
var
|
|
1039
|
-
const n = e.ctrl === void 0 || t.ctrlKey === e.ctrl, i = e.alt === void 0 || t.altKey === e.alt, s = e.shift === void 0 || t.shiftKey === e.shift, a = e.meta === void 0 || t.metaKey === e.meta,
|
|
1040
|
-
return n && i && s && a &&
|
|
996
|
+
var u, c;
|
|
997
|
+
const n = e.ctrl === void 0 || t.ctrlKey === e.ctrl, i = e.alt === void 0 || t.altKey === e.alt, s = e.shift === void 0 || t.shiftKey === e.shift, a = e.meta === void 0 || t.metaKey === e.meta, l = t.key && e.key && ((u = t.key) == null ? void 0 : u.toLowerCase()) === ((c = e.key) == null ? void 0 : c.toLowerCase());
|
|
998
|
+
return n && i && s && a && l;
|
|
1041
999
|
}) : !1;
|
|
1042
1000
|
}
|
|
1043
|
-
const
|
|
1001
|
+
const $ = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new Set([
|
|
1044
1002
|
"Alt",
|
|
1045
1003
|
"AltGraph",
|
|
1046
1004
|
"CapsLock",
|
|
@@ -1057,49 +1015,49 @@ const N = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new Set([
|
|
|
1057
1015
|
"Symbol",
|
|
1058
1016
|
"SymbolLock"
|
|
1059
1017
|
]);
|
|
1060
|
-
function
|
|
1061
|
-
return
|
|
1018
|
+
function ee(r) {
|
|
1019
|
+
return E(K(r).snapshot);
|
|
1062
1020
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const e =
|
|
1065
|
-
return e.subscribers.add(t), t(
|
|
1021
|
+
function re(r, t) {
|
|
1022
|
+
const e = K(r);
|
|
1023
|
+
return e.subscribers.add(t), t(E(e.snapshot)), () => e.subscribers.delete(t);
|
|
1066
1024
|
}
|
|
1067
|
-
function
|
|
1068
|
-
var a,
|
|
1069
|
-
const t =
|
|
1025
|
+
function K(r) {
|
|
1026
|
+
var a, l, u;
|
|
1027
|
+
const t = $.get(r);
|
|
1070
1028
|
if (t)
|
|
1071
1029
|
return t;
|
|
1072
|
-
const e =
|
|
1073
|
-
snapshot:
|
|
1030
|
+
const e = st((a = r.defaultView) == null ? void 0 : a.navigator), n = {
|
|
1031
|
+
snapshot: F(e),
|
|
1074
1032
|
entries: /* @__PURE__ */ new Map(),
|
|
1075
1033
|
subscribers: /* @__PURE__ */ new Set()
|
|
1076
1034
|
}, i = (c) => {
|
|
1077
|
-
var
|
|
1035
|
+
var C;
|
|
1078
1036
|
const h = c ? {
|
|
1079
1037
|
ctrl: c.ctrlKey,
|
|
1080
1038
|
shift: c.shiftKey,
|
|
1081
1039
|
alt: c.altKey,
|
|
1082
1040
|
meta: c.metaKey,
|
|
1083
1041
|
mod: e === "macos" ? c.metaKey : e === "windows" || e === "linux" ? c.ctrlKey : c.ctrlKey || c.metaKey,
|
|
1084
|
-
altGraph: ((
|
|
1085
|
-
} :
|
|
1042
|
+
altGraph: ((C = c.getModifierState) == null ? void 0 : C.call(c, "AltGraph")) === !0
|
|
1043
|
+
} : F(e).modifiers, O = [...n.entries.values()], b = {
|
|
1086
1044
|
platform: e,
|
|
1087
1045
|
modifiers: h,
|
|
1088
1046
|
held: {
|
|
1089
|
-
key: [...new Set(
|
|
1090
|
-
code: [...new Set(
|
|
1047
|
+
key: [...new Set(O.map((y) => y.key))].sort(),
|
|
1048
|
+
code: [...new Set(O.map((y) => y.code).filter(Boolean))].sort()
|
|
1091
1049
|
}
|
|
1092
1050
|
};
|
|
1093
|
-
if (!
|
|
1094
|
-
n.snapshot =
|
|
1095
|
-
for (const
|
|
1096
|
-
|
|
1051
|
+
if (!ot(n.snapshot, b)) {
|
|
1052
|
+
n.snapshot = b;
|
|
1053
|
+
for (const y of n.subscribers)
|
|
1054
|
+
y(E(b));
|
|
1097
1055
|
}
|
|
1098
1056
|
}, s = () => {
|
|
1099
1057
|
n.entries.clear(), i();
|
|
1100
1058
|
};
|
|
1101
1059
|
return r.addEventListener("keydown", (c) => {
|
|
1102
|
-
if (!
|
|
1060
|
+
if (!it.has(c.key)) {
|
|
1103
1061
|
const h = c.key.toLowerCase();
|
|
1104
1062
|
n.entries.set(c.code || `key:${h}`, { key: h, code: c.code });
|
|
1105
1063
|
}
|
|
@@ -1109,9 +1067,9 @@ function V(r) {
|
|
|
1109
1067
|
n.entries.delete(c.code || `key:${h}`), i(c);
|
|
1110
1068
|
}, !0), r.addEventListener("visibilitychange", () => {
|
|
1111
1069
|
r.visibilityState === "hidden" && s();
|
|
1112
|
-
}), (
|
|
1070
|
+
}), (l = r.defaultView) == null || l.addEventListener("blur", s), (u = r.defaultView) == null || u.addEventListener("pagehide", s), $.set(r, n), n;
|
|
1113
1071
|
}
|
|
1114
|
-
function
|
|
1072
|
+
function F(r) {
|
|
1115
1073
|
return {
|
|
1116
1074
|
platform: r,
|
|
1117
1075
|
modifiers: {
|
|
@@ -1125,32 +1083,32 @@ function L(r) {
|
|
|
1125
1083
|
held: { key: [], code: [] }
|
|
1126
1084
|
};
|
|
1127
1085
|
}
|
|
1128
|
-
function
|
|
1086
|
+
function st(r) {
|
|
1129
1087
|
var n;
|
|
1130
1088
|
const t = r, e = String(((n = t == null ? void 0 : t.userAgentData) == null ? void 0 : n.platform) ?? (t == null ? void 0 : t.platform) ?? (t == null ? void 0 : t.userAgent) ?? "").toLowerCase();
|
|
1131
1089
|
return e.includes("mac") || e.includes("darwin") || e.includes("iphone") || e.includes("ipad") ? "macos" : e.includes("win") ? "windows" : e.includes("linux") || e.includes("x11") || e.includes("cros") ? "linux" : "unknown";
|
|
1132
1090
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return r.platform === t.platform && r.modifiers.ctrl === t.modifiers.ctrl && r.modifiers.shift === t.modifiers.shift && r.modifiers.alt === t.modifiers.alt && r.modifiers.meta === t.modifiers.meta && r.modifiers.mod === t.modifiers.mod && r.modifiers.altGraph === t.modifiers.altGraph &&
|
|
1091
|
+
function ot(r, t) {
|
|
1092
|
+
return r.platform === t.platform && r.modifiers.ctrl === t.modifiers.ctrl && r.modifiers.shift === t.modifiers.shift && r.modifiers.alt === t.modifiers.alt && r.modifiers.meta === t.modifiers.meta && r.modifiers.mod === t.modifiers.mod && r.modifiers.altGraph === t.modifiers.altGraph && k(r.held.key, t.held.key) && k(r.held.code, t.held.code);
|
|
1135
1093
|
}
|
|
1136
|
-
function
|
|
1094
|
+
function k(r, t) {
|
|
1137
1095
|
return r.length === t.length && r.every((e, n) => e === t[n]);
|
|
1138
1096
|
}
|
|
1139
|
-
function
|
|
1097
|
+
function E(r) {
|
|
1140
1098
|
return {
|
|
1141
1099
|
platform: r.platform,
|
|
1142
1100
|
modifiers: { ...r.modifiers },
|
|
1143
1101
|
held: { key: [...r.held.key], code: [...r.held.code] }
|
|
1144
1102
|
};
|
|
1145
1103
|
}
|
|
1146
|
-
class
|
|
1104
|
+
class ne extends P {
|
|
1147
1105
|
constructor() {
|
|
1148
1106
|
super(...arguments);
|
|
1149
1107
|
/** Массив всех логов */
|
|
1150
|
-
o(this, "
|
|
1108
|
+
o(this, "_logs", []);
|
|
1151
1109
|
/** Текущий контекст (иерархия) */
|
|
1152
|
-
o(this, "
|
|
1153
|
-
o(this, "
|
|
1110
|
+
o(this, "_currentContext", []);
|
|
1111
|
+
o(this, "_currentActions", []);
|
|
1154
1112
|
}
|
|
1155
1113
|
/**
|
|
1156
1114
|
* Устанавливает текущий контекст.
|
|
@@ -1162,7 +1120,7 @@ class De extends B {
|
|
|
1162
1120
|
* logger.context('components', 'DriverCard')
|
|
1163
1121
|
*/
|
|
1164
1122
|
context(...e) {
|
|
1165
|
-
return this.
|
|
1123
|
+
return this._currentContext = e, this;
|
|
1166
1124
|
}
|
|
1167
1125
|
/**
|
|
1168
1126
|
* Добавляет дополнительный уровень контекста.
|
|
@@ -1173,7 +1131,7 @@ class De extends B {
|
|
|
1173
1131
|
* logger.start('attributes')
|
|
1174
1132
|
*/
|
|
1175
1133
|
start(e) {
|
|
1176
|
-
return this.
|
|
1134
|
+
return this._currentContext.push(e), this;
|
|
1177
1135
|
}
|
|
1178
1136
|
/**
|
|
1179
1137
|
* Убирает последний уровень контекста.
|
|
@@ -1187,10 +1145,10 @@ class De extends B {
|
|
|
1187
1145
|
*/
|
|
1188
1146
|
end(e, n, i) {
|
|
1189
1147
|
if (n) {
|
|
1190
|
-
const s = i ?? this.
|
|
1191
|
-
this.
|
|
1148
|
+
const s = i ?? this._currentActions.length ? this._currentActions : void 0;
|
|
1149
|
+
this._log(e ?? "info", n, s);
|
|
1192
1150
|
}
|
|
1193
|
-
return this.
|
|
1151
|
+
return this._currentContext.pop(), this._currentActions = [], this;
|
|
1194
1152
|
}
|
|
1195
1153
|
/**
|
|
1196
1154
|
* Добавляет экшены в текущий контекст (для следующего `end`)
|
|
@@ -1201,7 +1159,7 @@ class De extends B {
|
|
|
1201
1159
|
* logger.action('ti ti-check', 'Все успешно', () => console.logFrame('Успешно!'))
|
|
1202
1160
|
*/
|
|
1203
1161
|
action(e, n, i) {
|
|
1204
|
-
return this.
|
|
1162
|
+
return this._currentActions.push({ icon: e, tooltip: n, handler: i }), this;
|
|
1205
1163
|
}
|
|
1206
1164
|
/**
|
|
1207
1165
|
* Внутренний метод для создания лога.
|
|
@@ -1210,15 +1168,15 @@ class De extends B {
|
|
|
1210
1168
|
* @param message Сообщение
|
|
1211
1169
|
* @param actions Дополнительные действия (иконки с обработчиками)
|
|
1212
1170
|
*/
|
|
1213
|
-
|
|
1171
|
+
_log(e, n, i) {
|
|
1214
1172
|
const s = {
|
|
1215
1173
|
timestamp: Date.now(),
|
|
1216
1174
|
level: e,
|
|
1217
1175
|
message: n,
|
|
1218
|
-
context: [...this.
|
|
1176
|
+
context: [...this._currentContext],
|
|
1219
1177
|
actions: i
|
|
1220
1178
|
};
|
|
1221
|
-
this.
|
|
1179
|
+
this._logs.push(s), this.notify();
|
|
1222
1180
|
}
|
|
1223
1181
|
/**
|
|
1224
1182
|
* Лог уровня _debug.
|
|
@@ -1229,7 +1187,7 @@ class De extends B {
|
|
|
1229
1187
|
* logger._debug('Загрузка данных')
|
|
1230
1188
|
*/
|
|
1231
1189
|
debug(e, n) {
|
|
1232
|
-
this.
|
|
1190
|
+
this._log("debug", e, n);
|
|
1233
1191
|
}
|
|
1234
1192
|
/**
|
|
1235
1193
|
* Лог уровня info.
|
|
@@ -1240,7 +1198,7 @@ class De extends B {
|
|
|
1240
1198
|
* logger.info('Загрузка завершена')
|
|
1241
1199
|
*/
|
|
1242
1200
|
info(e, n) {
|
|
1243
|
-
this.
|
|
1201
|
+
this._log("info", e, n);
|
|
1244
1202
|
}
|
|
1245
1203
|
/**
|
|
1246
1204
|
* Лог уровня warn.
|
|
@@ -1251,7 +1209,7 @@ class De extends B {
|
|
|
1251
1209
|
* logger.warn('Низкий заряд батареи')
|
|
1252
1210
|
*/
|
|
1253
1211
|
warn(e, n) {
|
|
1254
|
-
this.
|
|
1212
|
+
this._log("warn", e, n);
|
|
1255
1213
|
}
|
|
1256
1214
|
/**
|
|
1257
1215
|
* Лог уровня error.
|
|
@@ -1264,7 +1222,7 @@ class De extends B {
|
|
|
1264
1222
|
* ])
|
|
1265
1223
|
*/
|
|
1266
1224
|
error(e, n) {
|
|
1267
|
-
this.
|
|
1225
|
+
this._log("error", e, n);
|
|
1268
1226
|
}
|
|
1269
1227
|
/**
|
|
1270
1228
|
* Лог уровня success.
|
|
@@ -1277,7 +1235,7 @@ class De extends B {
|
|
|
1277
1235
|
* ])
|
|
1278
1236
|
*/
|
|
1279
1237
|
success(e, n) {
|
|
1280
|
-
this.
|
|
1238
|
+
this._log("success", e, n);
|
|
1281
1239
|
}
|
|
1282
1240
|
/**
|
|
1283
1241
|
* Получить все логи.
|
|
@@ -1285,36 +1243,36 @@ class De extends B {
|
|
|
1285
1243
|
* @returns Массив логов
|
|
1286
1244
|
*/
|
|
1287
1245
|
getLogs() {
|
|
1288
|
-
return this.
|
|
1246
|
+
return this._logs;
|
|
1289
1247
|
}
|
|
1290
1248
|
/**
|
|
1291
1249
|
* Очистить все логи (полностью).
|
|
1292
1250
|
*/
|
|
1293
1251
|
clear() {
|
|
1294
|
-
this.
|
|
1252
|
+
this._logs = [], this.notify();
|
|
1295
1253
|
}
|
|
1296
1254
|
}
|
|
1297
|
-
function
|
|
1255
|
+
function at(r) {
|
|
1298
1256
|
try {
|
|
1299
1257
|
return new new Proxy(r, { construct: () => ({}) })(), !0;
|
|
1300
1258
|
} catch {
|
|
1301
1259
|
return !1;
|
|
1302
1260
|
}
|
|
1303
1261
|
}
|
|
1304
|
-
function
|
|
1305
|
-
if (
|
|
1262
|
+
function ie(r, ...t) {
|
|
1263
|
+
if (at(r)) {
|
|
1306
1264
|
const e = r;
|
|
1307
1265
|
return new e(...t);
|
|
1308
1266
|
} else
|
|
1309
1267
|
return r(...t);
|
|
1310
1268
|
}
|
|
1311
|
-
const
|
|
1312
|
-
function
|
|
1269
|
+
const ct = /* @__PURE__ */ new WeakMap();
|
|
1270
|
+
function se(r) {
|
|
1313
1271
|
let t;
|
|
1314
|
-
return () => (t || (t = r(),
|
|
1272
|
+
return () => (t || (t = r(), ct.set(r, t)), t);
|
|
1315
1273
|
}
|
|
1316
|
-
const
|
|
1317
|
-
DateTime:
|
|
1274
|
+
const lt = {
|
|
1275
|
+
DateTime: Y,
|
|
1318
1276
|
toDateTime(r) {
|
|
1319
1277
|
return this.DateTime.fromJSDate(r);
|
|
1320
1278
|
},
|
|
@@ -1342,67 +1300,67 @@ const xt = {
|
|
|
1342
1300
|
getZone() {
|
|
1343
1301
|
return this.DateTime.now().zone;
|
|
1344
1302
|
}
|
|
1345
|
-
},
|
|
1346
|
-
function
|
|
1303
|
+
}, oe = (r) => lt.toDateTime(r);
|
|
1304
|
+
function ae(r) {
|
|
1347
1305
|
return String(r).charAt(0).toUpperCase() + String(r).slice(1);
|
|
1348
1306
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return
|
|
1307
|
+
function ce(r, t) {
|
|
1308
|
+
return D(r, t) || Q(r, t);
|
|
1351
1309
|
}
|
|
1352
|
-
function
|
|
1353
|
-
const i =
|
|
1354
|
-
return !
|
|
1310
|
+
function le(r, t, e, n) {
|
|
1311
|
+
const i = p(r), s = p(t), a = p(e), l = p(n);
|
|
1312
|
+
return !z(s, a) && !D(i, l);
|
|
1355
1313
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return !
|
|
1314
|
+
function ue(r, t, e) {
|
|
1315
|
+
return !z(r, p(t)) && !D(r, X(e));
|
|
1358
1316
|
}
|
|
1359
|
-
const
|
|
1360
|
-
function
|
|
1361
|
-
return r &&
|
|
1317
|
+
const fe = (r) => r && new Date(r);
|
|
1318
|
+
function de(r, t = "HH:mm dd.MM.yyyy", e = {}) {
|
|
1319
|
+
return r && g(r, t, e);
|
|
1362
1320
|
}
|
|
1363
|
-
function
|
|
1321
|
+
function ut(r, t = "HH:mm dd.MM.yyyy", e = {}, n = !0) {
|
|
1364
1322
|
if (!r || !r || r === "")
|
|
1365
1323
|
return "";
|
|
1366
1324
|
if (typeof r == "string")
|
|
1367
1325
|
r = new Date(r);
|
|
1368
1326
|
else if (r instanceof Date) {
|
|
1369
|
-
if (isNaN(r))
|
|
1327
|
+
if (Number.isNaN(r.getTime()))
|
|
1370
1328
|
return "";
|
|
1371
1329
|
} else
|
|
1372
1330
|
r = new Date(r.toString());
|
|
1373
|
-
return n ?
|
|
1331
|
+
return n ? g(r, t, e) : g(I(r, "utc"), t, e);
|
|
1374
1332
|
}
|
|
1375
|
-
function
|
|
1333
|
+
function he(r) {
|
|
1376
1334
|
const t = { weekday: "short" }, e = new Intl.DateTimeFormat("ru-RU", t).format(r);
|
|
1377
1335
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1378
1336
|
}
|
|
1379
|
-
function
|
|
1337
|
+
function _e(r) {
|
|
1380
1338
|
const t = new Date(r), e = t.getTime() + t.getTimezoneOffset() * 6e3, n = new Date(e + 180 * 6e3), i = String(n.getDate()).padStart(2, "0"), s = String(n.getMonth() + 1).padStart(2, "0"), a = n.getFullYear();
|
|
1381
1339
|
return `${i}.${s}.${a}`;
|
|
1382
1340
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1341
|
+
function me(r, t = !0) {
|
|
1342
|
+
return ut(r, "HH:mm", {}, t);
|
|
1385
1343
|
}
|
|
1386
|
-
function
|
|
1344
|
+
function ye(r) {
|
|
1387
1345
|
const t = Array.from(r), e = Math.min(...t.map((i) => i.getTime())), n = Math.max(...t.map((i) => i.getTime()));
|
|
1388
1346
|
return {
|
|
1389
1347
|
minDate: new Date(e),
|
|
1390
1348
|
maxDate: new Date(n)
|
|
1391
1349
|
};
|
|
1392
1350
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const e =
|
|
1351
|
+
function pe(r, t) {
|
|
1352
|
+
const e = N(r, t), { hours: n, minutes: i } = A(e);
|
|
1395
1353
|
return n || i ? `${e > 0 ? "-" : "+"}${d(n)}:${d(i)}` : "";
|
|
1396
1354
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const e =
|
|
1355
|
+
function ge(r, t) {
|
|
1356
|
+
const e = N(r, t), { hours: n, minutes: i } = A(e);
|
|
1399
1357
|
return n || i ? `${e > 0 ? "-" : ""}${d(n)}:${d(i)}` : "";
|
|
1400
1358
|
}
|
|
1401
|
-
function
|
|
1359
|
+
function L(r = /* @__PURE__ */ new Date()) {
|
|
1402
1360
|
return new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
1403
1361
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const e =
|
|
1362
|
+
function Te(r, t) {
|
|
1363
|
+
const e = q(L(r), L(t));
|
|
1406
1364
|
return e ? e > 7 ? {
|
|
1407
1365
|
variant: "red",
|
|
1408
1366
|
value: ">7"
|
|
@@ -1417,51 +1375,51 @@ function Ue(r, t) {
|
|
|
1417
1375
|
value: `${e}`
|
|
1418
1376
|
} : null;
|
|
1419
1377
|
}
|
|
1420
|
-
function
|
|
1378
|
+
function Se(r) {
|
|
1421
1379
|
const e = String(r ?? "").trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1422
1380
|
if (!e)
|
|
1423
1381
|
return null;
|
|
1424
1382
|
const n = Number(e[1]), i = Number(e[2]) - 1, s = Number(e[3]), a = new Date(Date.UTC(n, i, s, 0, 0, 0, 0));
|
|
1425
1383
|
return Number.isNaN(a.getTime()) ? null : a.toISOString();
|
|
1426
1384
|
}
|
|
1427
|
-
function
|
|
1385
|
+
function be(r) {
|
|
1428
1386
|
const t = String(r ?? "").trim();
|
|
1429
1387
|
if (!t)
|
|
1430
1388
|
return null;
|
|
1431
1389
|
const e = t.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/);
|
|
1432
1390
|
if (e) {
|
|
1433
|
-
const i = Number(e[1]), s = Number(e[2]) - 1, a = Number(e[3]),
|
|
1391
|
+
const i = Number(e[1]), s = Number(e[2]) - 1, a = Number(e[3]), l = Number(e[4]), u = Number(e[5]), c = e[6] != null ? Number(e[6]) : 0, h = new Date(i, s, a, l, u, c, 0);
|
|
1434
1392
|
return Number.isNaN(h.getTime()) ? null : h.toISOString();
|
|
1435
1393
|
}
|
|
1436
1394
|
const n = new Date(t);
|
|
1437
1395
|
return Number.isNaN(n.getTime()) ? null : n.toISOString();
|
|
1438
1396
|
}
|
|
1439
|
-
function
|
|
1397
|
+
function we(r) {
|
|
1440
1398
|
const t = String(r ?? "").trim();
|
|
1441
1399
|
return t ? t.slice(0, 10) : "";
|
|
1442
1400
|
}
|
|
1443
|
-
function
|
|
1401
|
+
function xe(r) {
|
|
1444
1402
|
const t = String(r ?? "").trim();
|
|
1445
1403
|
if (!t)
|
|
1446
1404
|
return "";
|
|
1447
1405
|
const e = new Date(t);
|
|
1448
1406
|
if (Number.isNaN(e.getTime()))
|
|
1449
1407
|
return t.slice(0, 16);
|
|
1450
|
-
const n = e.getFullYear(), i = d(e.getMonth() + 1), s = d(e.getDate()), a = d(e.getHours()),
|
|
1451
|
-
return `${n}-${i}-${s}T${a}:${
|
|
1408
|
+
const n = e.getFullYear(), i = d(e.getMonth() + 1), s = d(e.getDate()), a = d(e.getHours()), l = d(e.getMinutes());
|
|
1409
|
+
return `${n}-${i}-${s}T${a}:${l}`;
|
|
1452
1410
|
}
|
|
1453
|
-
function
|
|
1454
|
-
const e =
|
|
1411
|
+
function De(r, t) {
|
|
1412
|
+
const e = j(r);
|
|
1455
1413
|
if (e)
|
|
1456
1414
|
return e;
|
|
1457
1415
|
const n = new Date(String(r ?? "").trim());
|
|
1458
1416
|
if (Number.isNaN(n.getTime()))
|
|
1459
1417
|
return "";
|
|
1460
|
-
const i =
|
|
1418
|
+
const i = B(t), s = i ? I(n, i) : n;
|
|
1461
1419
|
return `${d(s.getHours())}:${d(s.getMinutes())}`;
|
|
1462
1420
|
}
|
|
1463
|
-
function
|
|
1464
|
-
const n =
|
|
1421
|
+
function Ie(r, t, e) {
|
|
1422
|
+
const n = j(t).match(/^(\d{2}):(\d{2})$/);
|
|
1465
1423
|
if (!n)
|
|
1466
1424
|
return null;
|
|
1467
1425
|
const i = new Date(String(r ?? "").trim());
|
|
@@ -1470,13 +1428,13 @@ function Ge(r, t, e) {
|
|
|
1470
1428
|
const s = Number(n[1]), a = Number(n[2]);
|
|
1471
1429
|
if (s > 23 || a > 59)
|
|
1472
1430
|
return null;
|
|
1473
|
-
const
|
|
1474
|
-
if (!
|
|
1431
|
+
const l = B(e);
|
|
1432
|
+
if (!l)
|
|
1475
1433
|
return i.setHours(s, a, 0, 0), i.toISOString();
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1434
|
+
const u = I(i, l);
|
|
1435
|
+
return u.setHours(s, a, 0, 0), v(u, l).toISOString();
|
|
1478
1436
|
}
|
|
1479
|
-
function
|
|
1437
|
+
function j(r) {
|
|
1480
1438
|
if (r == null)
|
|
1481
1439
|
return "";
|
|
1482
1440
|
const t = String(r).trim();
|
|
@@ -1488,7 +1446,7 @@ function G(r) {
|
|
|
1488
1446
|
const n = t.match(/^(\d{2}):(\d{2})$/);
|
|
1489
1447
|
return n ? `${n[1]}:${n[2]}` : "";
|
|
1490
1448
|
}
|
|
1491
|
-
function
|
|
1449
|
+
function B(r) {
|
|
1492
1450
|
const t = String(r ?? "").trim();
|
|
1493
1451
|
if (!t || t === "local")
|
|
1494
1452
|
return null;
|
|
@@ -1498,7 +1456,7 @@ function Z(r) {
|
|
|
1498
1456
|
return null;
|
|
1499
1457
|
}
|
|
1500
1458
|
}
|
|
1501
|
-
function
|
|
1459
|
+
function Ee(r) {
|
|
1502
1460
|
if (r == null)
|
|
1503
1461
|
return null;
|
|
1504
1462
|
const t = String(r).trim();
|
|
@@ -1510,31 +1468,31 @@ function Ze(r) {
|
|
|
1510
1468
|
const n = t.match(/^(\d{2}):(\d{2})$/);
|
|
1511
1469
|
return n ? `${n[1]}:${n[2]}:00` : null;
|
|
1512
1470
|
}
|
|
1513
|
-
function
|
|
1514
|
-
const t =
|
|
1471
|
+
function Ae(r) {
|
|
1472
|
+
const t = dt(r), e = Math.sign(t) >= 0 ? "" : "-", { hours: n, minutes: i } = A(t);
|
|
1515
1473
|
return `${e}${d(n)}:${d(i)}`;
|
|
1516
1474
|
}
|
|
1517
|
-
function
|
|
1518
|
-
const n =
|
|
1475
|
+
function Oe(r = null, t = "dd", e = {}) {
|
|
1476
|
+
const n = ft(r);
|
|
1519
1477
|
if (!n)
|
|
1520
1478
|
return "";
|
|
1521
1479
|
const i = /* @__PURE__ */ new Date(), s = new Date(n);
|
|
1522
|
-
return i.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), s.toDateString() === i.toDateString() ? "" : `/${
|
|
1480
|
+
return i.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), s.toDateString() === i.toDateString() ? "" : `/${g(n, t, e)}`;
|
|
1523
1481
|
}
|
|
1524
|
-
function
|
|
1482
|
+
function ft(r) {
|
|
1525
1483
|
if (!r || r === "")
|
|
1526
1484
|
return null;
|
|
1527
1485
|
const t = typeof r == "string" ? new Date(r) : r instanceof Date ? r : new Date(r.toString());
|
|
1528
1486
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1529
1487
|
}
|
|
1530
|
-
function
|
|
1488
|
+
function A(r) {
|
|
1531
1489
|
const t = Math.abs(r);
|
|
1532
1490
|
return {
|
|
1533
1491
|
hours: Math.floor(t / 3600) % 24,
|
|
1534
1492
|
minutes: Math.floor(t / 60) % 60
|
|
1535
1493
|
};
|
|
1536
1494
|
}
|
|
1537
|
-
function
|
|
1495
|
+
function dt(r) {
|
|
1538
1496
|
const t = String(r ?? "").trim();
|
|
1539
1497
|
if (!t)
|
|
1540
1498
|
return 0;
|
|
@@ -1543,30 +1501,30 @@ function It(r) {
|
|
|
1543
1501
|
return (e[1] ? -1 : 1) * (Number(e[2]) * 3600 + Number(e[3]) * 60 + Number(e[4] ?? 0));
|
|
1544
1502
|
const n = t.match(/^(-)?P(?:(\d+(?:\.\d+)?)D)?(?:T(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/i);
|
|
1545
1503
|
if (n) {
|
|
1546
|
-
const i = n[1] ? -1 : 1, s = Number(n[2] ?? 0), a = Number(n[3] ?? 0),
|
|
1547
|
-
return i * (s * 86400 + a * 3600 +
|
|
1504
|
+
const i = n[1] ? -1 : 1, s = Number(n[2] ?? 0), a = Number(n[3] ?? 0), l = Number(n[4] ?? 0), u = Number(n[5] ?? 0);
|
|
1505
|
+
return i * (s * 86400 + a * 3600 + l * 60 + u);
|
|
1548
1506
|
}
|
|
1549
1507
|
return 0;
|
|
1550
1508
|
}
|
|
1551
1509
|
function d(r) {
|
|
1552
1510
|
return String(r).padStart(2, "0");
|
|
1553
1511
|
}
|
|
1554
|
-
function
|
|
1512
|
+
function Ce(r) {
|
|
1555
1513
|
const t = /* @__PURE__ */ new Date();
|
|
1556
1514
|
try {
|
|
1557
|
-
const e =
|
|
1515
|
+
const e = w(r, t), n = Intl.supportedValuesOf("timeZone");
|
|
1558
1516
|
for (const i of n)
|
|
1559
|
-
if (
|
|
1517
|
+
if (w(i, t) === e)
|
|
1560
1518
|
return i;
|
|
1561
1519
|
} catch {
|
|
1562
1520
|
return null;
|
|
1563
1521
|
}
|
|
1564
1522
|
return null;
|
|
1565
1523
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1524
|
+
function Me(r) {
|
|
1525
|
+
return w(r, /* @__PURE__ */ new Date());
|
|
1568
1526
|
}
|
|
1569
|
-
class
|
|
1527
|
+
class $e {
|
|
1570
1528
|
constructor(t) {
|
|
1571
1529
|
o(this, "_url");
|
|
1572
1530
|
o(this, "_retryInterval");
|
|
@@ -1597,15 +1555,15 @@ class Xe {
|
|
|
1597
1555
|
async _connect() {
|
|
1598
1556
|
var t, e, n;
|
|
1599
1557
|
try {
|
|
1600
|
-
await
|
|
1558
|
+
await tt(this._url, {
|
|
1601
1559
|
method: "GET",
|
|
1602
1560
|
headers: await this._buildHeaders(),
|
|
1603
1561
|
signal: (t = this._abortController) == null ? void 0 : t.signal,
|
|
1604
1562
|
openWhenHidden: !0,
|
|
1605
1563
|
onopen: (i) => {
|
|
1606
|
-
var a,
|
|
1607
|
-
if (i.ok && i.headers.get("content-type") ===
|
|
1608
|
-
this._isConnected = !0, (
|
|
1564
|
+
var a, l;
|
|
1565
|
+
if (i.ok && i.headers.get("content-type") === et) {
|
|
1566
|
+
this._isConnected = !0, (l = (a = this._options).onOpen) == null || l.call(a);
|
|
1609
1567
|
return;
|
|
1610
1568
|
}
|
|
1611
1569
|
throw new Error(`Unexpected response: ${i.status}`);
|
|
@@ -1614,7 +1572,7 @@ class Xe {
|
|
|
1614
1572
|
try {
|
|
1615
1573
|
this._options.onEvent(JSON.parse(i.data));
|
|
1616
1574
|
} catch (s) {
|
|
1617
|
-
console.warn(`[SSEManager] Failed to parse message: ${
|
|
1575
|
+
console.warn(`[SSEManager] Failed to parse message: ${U(s)}`);
|
|
1618
1576
|
}
|
|
1619
1577
|
},
|
|
1620
1578
|
onclose: () => {
|
|
@@ -1635,7 +1593,7 @@ class Xe {
|
|
|
1635
1593
|
return this._isConnected;
|
|
1636
1594
|
}
|
|
1637
1595
|
}
|
|
1638
|
-
class
|
|
1596
|
+
class Fe {
|
|
1639
1597
|
constructor() {
|
|
1640
1598
|
o(this, "_currentCount", 0);
|
|
1641
1599
|
o(this, "_lastResetTime", Date.now());
|
|
@@ -1652,127 +1610,80 @@ class ve {
|
|
|
1652
1610
|
this._currentCount = 0, this._lastEventsPerSecond = 0, this._lastResetTime = Date.now();
|
|
1653
1611
|
}
|
|
1654
1612
|
}
|
|
1655
|
-
const tr = ft("tooltip", () => {
|
|
1656
|
-
const r = Q({}), t = b(null);
|
|
1657
|
-
function e(l) {
|
|
1658
|
-
r[l.id] = {
|
|
1659
|
-
...l,
|
|
1660
|
-
visible: !1
|
|
1661
|
-
};
|
|
1662
|
-
}
|
|
1663
|
-
function n(l) {
|
|
1664
|
-
delete r[l];
|
|
1665
|
-
}
|
|
1666
|
-
function i(l) {
|
|
1667
|
-
r[l] && (t.value = l, r[l].active = !0);
|
|
1668
|
-
}
|
|
1669
|
-
function s(l) {
|
|
1670
|
-
r[l] && (r[l].active = !1, t.value === l && (t.value = null));
|
|
1671
|
-
}
|
|
1672
|
-
function a(l) {
|
|
1673
|
-
i(l);
|
|
1674
|
-
}
|
|
1675
|
-
function u() {
|
|
1676
|
-
t.value && s(t.value);
|
|
1677
|
-
}
|
|
1678
|
-
return {
|
|
1679
|
-
tooltips: r,
|
|
1680
|
-
activeId: t,
|
|
1681
|
-
registerTooltip: e,
|
|
1682
|
-
unregisterTooltip: n,
|
|
1683
|
-
showTooltip: i,
|
|
1684
|
-
hideTooltip: s,
|
|
1685
|
-
setActiveTooltipId: a,
|
|
1686
|
-
clearActiveTooltipId: u
|
|
1687
|
-
};
|
|
1688
|
-
});
|
|
1689
|
-
function er(r, t) {
|
|
1690
|
-
var e;
|
|
1691
|
-
return r("div", {}, (e = t.slots) != null && e.default ? t.slots.default() : []);
|
|
1692
|
-
}
|
|
1693
|
-
const rr = "x-collection-tooltip-id";
|
|
1694
1613
|
export {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
je as toIsoZDateTime,
|
|
1771
|
-
Qt as toPlain,
|
|
1772
|
-
Ze as toTimeHHMMSS,
|
|
1773
|
-
Ut as useCookie,
|
|
1774
|
-
ye as useStorageDebounced,
|
|
1775
|
-
jt as useSubscribableRef,
|
|
1776
|
-
Bt as useSubscribableRefAuto,
|
|
1777
|
-
tr as useTooltipStore
|
|
1614
|
+
Ht as AfterDeserialize,
|
|
1615
|
+
wt as AppBus,
|
|
1616
|
+
Pt as BeforeSerialize,
|
|
1617
|
+
xt as Collection,
|
|
1618
|
+
At as DelayedExecutor,
|
|
1619
|
+
Kt as DeserializeArrayField,
|
|
1620
|
+
Rt as DeserializeId,
|
|
1621
|
+
H as EventBus,
|
|
1622
|
+
m as Events,
|
|
1623
|
+
zt as GenericExpose,
|
|
1624
|
+
vt as HotkeyManager,
|
|
1625
|
+
Yt as IS_DEBUG,
|
|
1626
|
+
Vt as IgnoreToPlain,
|
|
1627
|
+
Dt as IndexedCollection,
|
|
1628
|
+
Ut as IsOptionalTransformed,
|
|
1629
|
+
Ct as Json,
|
|
1630
|
+
Mt as JsonString,
|
|
1631
|
+
Ot as NamedExecutor,
|
|
1632
|
+
Et as PayloadHttpClient,
|
|
1633
|
+
It as RingBuffer,
|
|
1634
|
+
$e as SSEManager,
|
|
1635
|
+
Ft as Script,
|
|
1636
|
+
Nt as Serialize,
|
|
1637
|
+
jt as SerializeId,
|
|
1638
|
+
Bt as SerializeIds,
|
|
1639
|
+
ne as StructuredLogger,
|
|
1640
|
+
lt as SystemClock,
|
|
1641
|
+
kt as TypeMap,
|
|
1642
|
+
Lt as TypeRecord,
|
|
1643
|
+
Fe as UPSMeter_Service,
|
|
1644
|
+
ae as capitalize,
|
|
1645
|
+
Wt as compareNumber,
|
|
1646
|
+
U as consoleErrorSummary,
|
|
1647
|
+
x as consoleValueSummary,
|
|
1648
|
+
ie as createInstance,
|
|
1649
|
+
pe as diffDuration,
|
|
1650
|
+
ge as diffDurationTable,
|
|
1651
|
+
oe as dt,
|
|
1652
|
+
me as extractTime,
|
|
1653
|
+
ye as findMinMaxDates,
|
|
1654
|
+
_e as formatDateToMSK,
|
|
1655
|
+
de as formatDatetime,
|
|
1656
|
+
ut as formatDatetimeTZ,
|
|
1657
|
+
Oe as formatDatetimeTZSpecial,
|
|
1658
|
+
Qt as generateUUID,
|
|
1659
|
+
Te as getDateOnlyDiffFactor,
|
|
1660
|
+
he as getDayOfWeek,
|
|
1661
|
+
ee as getKeyboardStateSnapshot,
|
|
1662
|
+
rt as getOnDeserializedMethod,
|
|
1663
|
+
Me as getTimezoneOffsetMs,
|
|
1664
|
+
se as globalState,
|
|
1665
|
+
ce as isAfterOrEqual,
|
|
1666
|
+
te as isAnyKeyComboActive,
|
|
1667
|
+
at as isConstructor,
|
|
1668
|
+
ue as isDateInRange,
|
|
1669
|
+
le as isDateRangeOverlap,
|
|
1670
|
+
Zt as isNullOrUndefined,
|
|
1671
|
+
De as isoDateTimeToTimeInput,
|
|
1672
|
+
we as isoToDateInput,
|
|
1673
|
+
xe as isoToDateTimeLocalInput,
|
|
1674
|
+
Ie as mergeTimeIntoDateTime,
|
|
1675
|
+
$t as onDeserialized,
|
|
1676
|
+
fe as parseDate,
|
|
1677
|
+
Ae as parseDuration,
|
|
1678
|
+
Ce as parseOffsetToTimezone,
|
|
1679
|
+
qt as profile,
|
|
1680
|
+
Xt as randomString,
|
|
1681
|
+
L as removeTime,
|
|
1682
|
+
re as subscribeKeyboardState,
|
|
1683
|
+
j as timeToTimeInput,
|
|
1684
|
+
Gt as toInstance,
|
|
1685
|
+
Se as toIsoZDate,
|
|
1686
|
+
be as toIsoZDateTime,
|
|
1687
|
+
Jt as toPlain,
|
|
1688
|
+
Ee as toTimeHHMMSS
|
|
1778
1689
|
};
|