@endge/utils 0.24.14 → 0.25.3
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 +2 -2
- package/dist/collection/collection.types.d.ts +10 -10
- package/dist/collection/indexed-collection.d.ts +1 -1
- package/dist/events/ChangeNotifier.d.ts +8 -0
- package/dist/events/EventBus.d.ts +2 -2
- package/dist/execute/NamedExecutor.d.ts +2 -2
- package/dist/index.d.ts +8 -14
- package/dist/shared/serialize/decorator.d.ts +2 -2
- package/dist/tools/logs.d.ts +3 -3
- package/dist/tools/tools.types.d.ts +2 -2
- package/dist/utils.js +347 -445
- 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,36 +1,32 @@
|
|
|
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 m, plainToInstance as S, instanceToPlain as b, 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
|
-
import { fetchEventSource as lt, EventStreamContentType as ut } from "@microsoft/fetch-event-source";
|
|
16
|
-
import { defineStore as ft } from "pinia";
|
|
17
|
-
const dt = {
|
|
18
|
-
path: "/",
|
|
19
|
-
watch: !0,
|
|
20
|
-
decode: (r) => v(decodeURIComponent(r)),
|
|
21
|
-
encode: (r) => encodeURIComponent(typeof r == "string" ? r : JSON.stringify(r))
|
|
22
|
-
}, Ut = (r, t) => {
|
|
23
|
-
var s;
|
|
24
|
-
const e = { ...dt, ...t || {} }, n = X(document.cookie, e), i = b(n[r] ?? ((s = e.default) == null ? void 0 : s.call(e)));
|
|
25
|
-
return H(i, () => {
|
|
26
|
-
document.cookie = ht(r, i.value, e);
|
|
27
|
-
}), i;
|
|
28
|
-
};
|
|
29
|
-
function ht(r, t, e = {}) {
|
|
30
|
-
return t == null ? k(r, t, { ...e, maxAge: -1 }) : k(r, t, e);
|
|
31
|
-
}
|
|
7
|
+
import { v4 as W } from "uuid";
|
|
8
|
+
import { DateTime as Y } from "ts-luxon";
|
|
9
|
+
import { differenceInSeconds as N, format as T, differenceInCalendarDays as q, isAfter as D, isEqual as Q, isBefore as z, startOfDay as g, endOfDay as X } from "date-fns";
|
|
10
|
+
import { utcToZonedTime as E, getTimezoneOffset as _, zonedTimeToUtc as v } from "date-fns-tz";
|
|
11
|
+
import { fetchEventSource as tt, EventStreamContentType as et } from "@microsoft/fetch-event-source";
|
|
32
12
|
var y = /* @__PURE__ */ ((r) => (r.Add = "add", r.Remove = "remove", r.Update = "update", r.IndexCreate = "indexCreate", r))(y || {});
|
|
33
|
-
class
|
|
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
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class H {
|
|
34
30
|
/**
|
|
35
31
|
* Создает экземпляр EventBus и подготавливает базовое состояние.
|
|
36
32
|
*/
|
|
@@ -156,40 +152,8 @@ class j {
|
|
|
156
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 xt = new H(Object.keys({}));
|
|
156
|
+
class Dt extends P {
|
|
193
157
|
/**
|
|
194
158
|
* Создает экземпляр Collection и подготавливает базовое состояние.
|
|
195
159
|
*/
|
|
@@ -199,7 +163,7 @@ class Jt extends B {
|
|
|
199
163
|
o(this, "indices", /* @__PURE__ */ new Map());
|
|
200
164
|
o(this, "rootIds", /* @__PURE__ */ new Set());
|
|
201
165
|
o(this, "bus");
|
|
202
|
-
this.bus = new
|
|
166
|
+
this.bus = new H(Object.values(y)), e.length && this.add(e), this.createIndex("id");
|
|
203
167
|
}
|
|
204
168
|
/**
|
|
205
169
|
* Выполняет действие add в рамках ответственности Collection.
|
|
@@ -218,12 +182,12 @@ 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 [
|
|
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);
|
|
224
188
|
this.indices.forEach((c, h) => {
|
|
225
|
-
c.delete(
|
|
226
|
-
}),
|
|
189
|
+
c.delete(u[h]);
|
|
190
|
+
}), u.parentId || this.rootIds.delete(u.id), i.push(u);
|
|
227
191
|
}
|
|
228
192
|
}), i.length && (this.bus.emit(y.Remove, i), this.notify());
|
|
229
193
|
}
|
|
@@ -234,8 +198,8 @@ 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.indices.forEach((a,
|
|
238
|
-
a.set(i[
|
|
201
|
+
s && (Object.assign(s, i), this.indices.forEach((a, l) => {
|
|
202
|
+
a.set(i[l], s);
|
|
239
203
|
}));
|
|
240
204
|
}), n != null && n.length && (this.bus.emit(y.Update, n), this.notify());
|
|
241
205
|
}
|
|
@@ -254,7 +218,8 @@ class Jt extends B {
|
|
|
254
218
|
* Создает runtime-сущность Collection.
|
|
255
219
|
*/
|
|
256
220
|
createIndex(e) {
|
|
257
|
-
if (this.indices.has(e))
|
|
221
|
+
if (this.indices.has(e))
|
|
222
|
+
return;
|
|
258
223
|
const n = /* @__PURE__ */ new Map();
|
|
259
224
|
this.items.forEach((i) => {
|
|
260
225
|
n.set(i[e], i);
|
|
@@ -286,7 +251,7 @@ class Jt extends B {
|
|
|
286
251
|
this.bus.off(e, n);
|
|
287
252
|
}
|
|
288
253
|
}
|
|
289
|
-
class
|
|
254
|
+
class Et {
|
|
290
255
|
/**
|
|
291
256
|
* Создает экземпляр IndexedCollection и подготавливает базовое состояние.
|
|
292
257
|
*/
|
|
@@ -307,7 +272,7 @@ class Vt {
|
|
|
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.
|
|
@@ -348,7 +313,8 @@ 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.map.has(n.id))
|
|
316
|
+
if (this.map.has(n.id))
|
|
317
|
+
continue;
|
|
352
318
|
const i = this.list.length;
|
|
353
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
|
}
|
|
@@ -453,11 +419,13 @@ class Vt {
|
|
|
453
419
|
rebuildFilteredFromScratch() {
|
|
454
420
|
if (!this.filterFn) {
|
|
455
421
|
if (this.filteredList = [], this.filterIndexEnabled)
|
|
456
|
-
for (const t of this.list)
|
|
422
|
+
for (const t of this.list)
|
|
423
|
+
t.filteredIndex = -1;
|
|
457
424
|
return;
|
|
458
425
|
}
|
|
459
426
|
if (this.filteredList = [], this.filterIndexEnabled)
|
|
460
|
-
for (const t of this.list)
|
|
427
|
+
for (const t of this.list)
|
|
428
|
+
t.filteredIndex = -1;
|
|
461
429
|
for (const t of this.list)
|
|
462
430
|
this.filterFn(t) && this.appendToFiltered(t);
|
|
463
431
|
}
|
|
@@ -484,7 +452,8 @@ class Vt {
|
|
|
484
452
|
* Выполняет внутренний шаг refilterOneO1 для IndexedCollection.
|
|
485
453
|
*/
|
|
486
454
|
refilterOneO1(t) {
|
|
487
|
-
if (!this.filterFn || !this.filterIndexEnabled)
|
|
455
|
+
if (!this.filterFn || !this.filterIndexEnabled)
|
|
456
|
+
return !1;
|
|
488
457
|
const e = this.filterFn(t), i = (t.filteredIndex ?? -1) >= 0;
|
|
489
458
|
return e ? i ? !1 : (this.appendToFiltered(t), !0) : i ? (this.removeFromFilteredO1(t), !0) : !1;
|
|
490
459
|
}
|
|
@@ -492,9 +461,11 @@ class Vt {
|
|
|
492
461
|
* Удаляет сущность из runtime-коллекции IndexedCollection.
|
|
493
462
|
*/
|
|
494
463
|
removeFromFilteredO1(t) {
|
|
495
|
-
if (!this.filterIndexEnabled)
|
|
464
|
+
if (!this.filterIndexEnabled)
|
|
465
|
+
return;
|
|
496
466
|
const e = t.filteredIndex ?? -1;
|
|
497
|
-
if (e < 0)
|
|
467
|
+
if (e < 0)
|
|
468
|
+
return;
|
|
498
469
|
const n = this.filteredList.length - 1;
|
|
499
470
|
if (e !== n) {
|
|
500
471
|
const i = this.filteredList[n];
|
|
@@ -507,7 +478,8 @@ class Vt {
|
|
|
507
478
|
*/
|
|
508
479
|
removeFromListO1(t) {
|
|
509
480
|
const e = this.indexById.get(t);
|
|
510
|
-
if (e === void 0)
|
|
481
|
+
if (e === void 0)
|
|
482
|
+
return;
|
|
511
483
|
const n = this.list.length - 1;
|
|
512
484
|
if (e !== n) {
|
|
513
485
|
const i = this.list[n];
|
|
@@ -516,7 +488,7 @@ class Vt {
|
|
|
516
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");
|
|
@@ -547,7 +519,7 @@ class Gt {
|
|
|
547
519
|
return t;
|
|
548
520
|
}
|
|
549
521
|
}
|
|
550
|
-
class
|
|
522
|
+
class At {
|
|
551
523
|
constructor(t) {
|
|
552
524
|
o(this, "baseUrl");
|
|
553
525
|
this.baseUrl = t.baseUrl.replace(/\/+$/, "");
|
|
@@ -619,7 +591,7 @@ class Zt {
|
|
|
619
591
|
return await n.json().catch(() => ({}));
|
|
620
592
|
}
|
|
621
593
|
}
|
|
622
|
-
class
|
|
594
|
+
class Ot {
|
|
623
595
|
/**
|
|
624
596
|
* Создает экземпляр DelayedExecutor и подготавливает базовое состояние.
|
|
625
597
|
*/
|
|
@@ -659,14 +631,14 @@ class Wt {
|
|
|
659
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 Ct {
|
|
670
642
|
/**
|
|
671
643
|
* Создает экземпляр NamedExecutor и подготавливает базовое состояние.
|
|
672
644
|
*/
|
|
@@ -703,7 +675,7 @@ class Yt {
|
|
|
703
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
680
|
this.clear(t);
|
|
709
681
|
}
|
|
@@ -727,89 +699,7 @@ class Yt {
|
|
|
727
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);
|
|
728
700
|
}
|
|
729
701
|
}
|
|
730
|
-
function
|
|
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;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
function ue() {
|
|
702
|
+
function Mt() {
|
|
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 $t() {
|
|
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 Ft() {
|
|
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 kt() {
|
|
869
772
|
return function(r, t) {
|
|
870
773
|
f(
|
|
871
774
|
({ value: e }) => typeof e == "string" ? e.trim() : String(e ?? ""),
|
|
@@ -876,10 +779,10 @@ function de() {
|
|
|
876
779
|
)(r, t);
|
|
877
780
|
};
|
|
878
781
|
}
|
|
879
|
-
function
|
|
782
|
+
function Lt(r, t) {
|
|
880
783
|
return f(({ value: e, type: n }) => e ? n === m.PLAIN_TO_CLASS ? Array.isArray(e) ? t ? new Map(
|
|
881
784
|
e.map((i) => {
|
|
882
|
-
const s =
|
|
785
|
+
const s = S(r, i);
|
|
883
786
|
return [s[t], s];
|
|
884
787
|
})
|
|
885
788
|
) : (console.warn(
|
|
@@ -889,70 +792,115 @@ function he(r, t) {
|
|
|
889
792
|
const a = new r();
|
|
890
793
|
return Object.assign(a, s), [i, a];
|
|
891
794
|
})
|
|
892
|
-
) : (console.warn(`[TypeMap] Expected object or array, got ${
|
|
795
|
+
) : (console.warn(`[TypeMap] Expected object or array, got ${x(e)}`), /* @__PURE__ */ new Map()) : n === m.CLASS_TO_PLAIN ? e instanceof Map ? Array.from(e.values()).map((i) => b(i)) : (console.warn(`[TypeMap] Expected Map, got ${x(e)}`), t ? [] : {}) : (console.warn(`[TypeMap] Unexpected transformation type: ${String(n)}`), e) : /* @__PURE__ */ new Map());
|
|
893
796
|
}
|
|
894
|
-
function
|
|
797
|
+
function Nt(r) {
|
|
895
798
|
return f(({ value: t, type: e }) => {
|
|
896
|
-
if (!t || typeof t != "object")
|
|
799
|
+
if (!t || typeof t != "object")
|
|
800
|
+
return {};
|
|
897
801
|
if (e === m.PLAIN_TO_CLASS) {
|
|
898
802
|
const n = {};
|
|
899
803
|
for (const i of Object.keys(t))
|
|
900
|
-
n[i] =
|
|
804
|
+
n[i] = S(r, t[i]);
|
|
901
805
|
return n;
|
|
902
806
|
}
|
|
903
807
|
if (e === m.CLASS_TO_PLAIN) {
|
|
904
808
|
const n = {};
|
|
905
809
|
for (const i of Object.keys(t))
|
|
906
|
-
n[i] =
|
|
810
|
+
n[i] = b(t[i]);
|
|
907
811
|
return n;
|
|
908
812
|
}
|
|
909
813
|
return t;
|
|
910
814
|
});
|
|
911
815
|
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
816
|
+
class zt {
|
|
817
|
+
/**
|
|
818
|
+
* Выполняет действие toPlain в рамках ответственности Serialize.
|
|
819
|
+
*/
|
|
820
|
+
static toPlain(t) {
|
|
821
|
+
return b(t, {
|
|
822
|
+
exposeDefaultValues: !0,
|
|
823
|
+
excludeExtraneousValues: !0
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Выполняет действие fromJSON в рамках ответственности Serialize.
|
|
828
|
+
*/
|
|
829
|
+
static fromJSON(t, e) {
|
|
830
|
+
const n = S(t, e, {
|
|
831
|
+
exposeDefaultValues: !0,
|
|
832
|
+
excludeExtraneousValues: !0
|
|
833
|
+
}), i = rt(n);
|
|
834
|
+
return i && i(), n;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function Pt(r) {
|
|
838
|
+
return function(t, e) {
|
|
839
|
+
J(r)(t, e), Reflect.defineMetadata("genericExpose", r.name, t, e);
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
const nt = Symbol("beforeSerialize");
|
|
843
|
+
function Ht() {
|
|
844
|
+
return function(r, t, e) {
|
|
845
|
+
Reflect.defineMetadata(nt, t, r);
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
function Ut(r, t, e) {
|
|
849
|
+
r.__afterDeserializeMethods__ || (r.__afterDeserializeMethods__ = []), r.__afterDeserializeMethods__.push(t);
|
|
850
|
+
}
|
|
851
|
+
function Rt(r) {
|
|
852
|
+
return function(t, e) {
|
|
853
|
+
f(({ value: n }) => n === null ? void 0 : n, { toPlainOnly: !0 })(t, e), Z(r)(t, e);
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
function Kt() {
|
|
857
|
+
return f(({ value: r, type: t }) => t === m.PLAIN_TO_CLASS ? r == null ? void 0 : r.id : r);
|
|
858
|
+
}
|
|
859
|
+
function jt(r) {
|
|
860
|
+
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);
|
|
861
|
+
}
|
|
862
|
+
function Bt() {
|
|
863
|
+
return f(({ value: r, type: t }) => t === m.CLASS_TO_PLAIN && (r == null ? void 0 : r.id) || r);
|
|
864
|
+
}
|
|
865
|
+
function Vt() {
|
|
866
|
+
return f(({ value: r, type: t }) => t === m.CLASS_TO_PLAIN ? r.map((e) => e.id) : r);
|
|
867
|
+
}
|
|
868
|
+
function Gt() {
|
|
869
|
+
return f(({ value: r, type: t }) => t === "classToPlain" ? void 0 : r, { toPlainOnly: !0 });
|
|
870
|
+
}
|
|
871
|
+
function Jt(r, t) {
|
|
872
|
+
return S(r, t, {
|
|
873
|
+
exposeDefaultValues: !0,
|
|
874
|
+
excludeExtraneousValues: !0
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
function Zt(r) {
|
|
878
|
+
return b(r, {
|
|
879
|
+
exposeUnsetFields: !1
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
function Wt(r) {
|
|
883
|
+
return r == null;
|
|
937
884
|
}
|
|
938
|
-
function
|
|
885
|
+
function Yt(r, t) {
|
|
939
886
|
return r < t ? -1 : r > t ? 1 : 0;
|
|
940
887
|
}
|
|
941
|
-
const
|
|
942
|
-
function
|
|
943
|
-
if (!
|
|
888
|
+
const it = process.env.NODE_ENV !== "production";
|
|
889
|
+
function qt(r, t) {
|
|
890
|
+
if (!it)
|
|
891
|
+
return t();
|
|
944
892
|
console.groupCollapsed(`⏳ ${r}`);
|
|
945
893
|
const e = performance.now(), n = t(), i = performance.now();
|
|
946
894
|
return console.log(`${r}: ${Math.round(i - e)} ms`), console.groupEnd(), n;
|
|
947
895
|
}
|
|
948
|
-
const
|
|
949
|
-
function
|
|
896
|
+
const Qt = () => W(), M = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
897
|
+
function Xt(r) {
|
|
950
898
|
let t = "";
|
|
951
899
|
for (let e = 0; e < r; ++e)
|
|
952
|
-
t +=
|
|
900
|
+
t += M[Math.floor(M.length * Math.random())];
|
|
953
901
|
return t;
|
|
954
902
|
}
|
|
955
|
-
class
|
|
903
|
+
class vt {
|
|
956
904
|
/**
|
|
957
905
|
* Создает экземпляр HotkeyManager и подготавливает базовое состояние.
|
|
958
906
|
*/
|
|
@@ -981,7 +929,8 @@ class Te {
|
|
|
981
929
|
* Обрабатывает runtime-событие HotkeyManager.
|
|
982
930
|
*/
|
|
983
931
|
handle(t) {
|
|
984
|
-
if (!this.enabled || this.isIgnoredTarget(t.target))
|
|
932
|
+
if (!this.enabled || this.isIgnoredTarget(t.target))
|
|
933
|
+
return;
|
|
985
934
|
const e = this.normalizeKey(t), n = this.bindings.get(e);
|
|
986
935
|
if (n)
|
|
987
936
|
for (const i of n)
|
|
@@ -1033,14 +982,14 @@ class Te {
|
|
|
1033
982
|
this.clear(), this.target.removeEventListener("keydown", this.handleBound);
|
|
1034
983
|
}
|
|
1035
984
|
}
|
|
1036
|
-
function
|
|
985
|
+
function te(r, t) {
|
|
1037
986
|
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 &&
|
|
987
|
+
var u, c;
|
|
988
|
+
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());
|
|
989
|
+
return n && i && s && a && l;
|
|
1041
990
|
}) : !1;
|
|
1042
991
|
}
|
|
1043
|
-
const
|
|
992
|
+
const $ = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new Set([
|
|
1044
993
|
"Alt",
|
|
1045
994
|
"AltGraph",
|
|
1046
995
|
"CapsLock",
|
|
@@ -1057,49 +1006,49 @@ const N = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new Set([
|
|
|
1057
1006
|
"Symbol",
|
|
1058
1007
|
"SymbolLock"
|
|
1059
1008
|
]);
|
|
1060
|
-
function
|
|
1061
|
-
return
|
|
1009
|
+
function ee(r) {
|
|
1010
|
+
return I(K(r).snapshot);
|
|
1062
1011
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const e =
|
|
1065
|
-
return e.subscribers.add(t), t(
|
|
1012
|
+
function re(r, t) {
|
|
1013
|
+
const e = K(r);
|
|
1014
|
+
return e.subscribers.add(t), t(I(e.snapshot)), () => e.subscribers.delete(t);
|
|
1066
1015
|
}
|
|
1067
|
-
function
|
|
1068
|
-
var a,
|
|
1069
|
-
const t =
|
|
1016
|
+
function K(r) {
|
|
1017
|
+
var a, l, u;
|
|
1018
|
+
const t = $.get(r);
|
|
1070
1019
|
if (t)
|
|
1071
1020
|
return t;
|
|
1072
|
-
const e =
|
|
1073
|
-
snapshot:
|
|
1021
|
+
const e = ot((a = r.defaultView) == null ? void 0 : a.navigator), n = {
|
|
1022
|
+
snapshot: F(e),
|
|
1074
1023
|
entries: /* @__PURE__ */ new Map(),
|
|
1075
1024
|
subscribers: /* @__PURE__ */ new Set()
|
|
1076
1025
|
}, i = (c) => {
|
|
1077
|
-
var
|
|
1026
|
+
var C;
|
|
1078
1027
|
const h = c ? {
|
|
1079
1028
|
ctrl: c.ctrlKey,
|
|
1080
1029
|
shift: c.shiftKey,
|
|
1081
1030
|
alt: c.altKey,
|
|
1082
1031
|
meta: c.metaKey,
|
|
1083
1032
|
mod: e === "macos" ? c.metaKey : e === "windows" || e === "linux" ? c.ctrlKey : c.ctrlKey || c.metaKey,
|
|
1084
|
-
altGraph: ((
|
|
1085
|
-
} :
|
|
1033
|
+
altGraph: ((C = c.getModifierState) == null ? void 0 : C.call(c, "AltGraph")) === !0
|
|
1034
|
+
} : F(e).modifiers, O = [...n.entries.values()], w = {
|
|
1086
1035
|
platform: e,
|
|
1087
1036
|
modifiers: h,
|
|
1088
1037
|
held: {
|
|
1089
|
-
key: [...new Set(
|
|
1090
|
-
code: [...new Set(
|
|
1038
|
+
key: [...new Set(O.map((p) => p.key))].sort(),
|
|
1039
|
+
code: [...new Set(O.map((p) => p.code).filter(Boolean))].sort()
|
|
1091
1040
|
}
|
|
1092
1041
|
};
|
|
1093
|
-
if (!
|
|
1094
|
-
n.snapshot =
|
|
1042
|
+
if (!at(n.snapshot, w)) {
|
|
1043
|
+
n.snapshot = w;
|
|
1095
1044
|
for (const p of n.subscribers)
|
|
1096
|
-
p(
|
|
1045
|
+
p(I(w));
|
|
1097
1046
|
}
|
|
1098
1047
|
}, s = () => {
|
|
1099
1048
|
n.entries.clear(), i();
|
|
1100
1049
|
};
|
|
1101
1050
|
return r.addEventListener("keydown", (c) => {
|
|
1102
|
-
if (!
|
|
1051
|
+
if (!st.has(c.key)) {
|
|
1103
1052
|
const h = c.key.toLowerCase();
|
|
1104
1053
|
n.entries.set(c.code || `key:${h}`, { key: h, code: c.code });
|
|
1105
1054
|
}
|
|
@@ -1109,9 +1058,9 @@ function V(r) {
|
|
|
1109
1058
|
n.entries.delete(c.code || `key:${h}`), i(c);
|
|
1110
1059
|
}, !0), r.addEventListener("visibilitychange", () => {
|
|
1111
1060
|
r.visibilityState === "hidden" && s();
|
|
1112
|
-
}), (
|
|
1061
|
+
}), (l = r.defaultView) == null || l.addEventListener("blur", s), (u = r.defaultView) == null || u.addEventListener("pagehide", s), $.set(r, n), n;
|
|
1113
1062
|
}
|
|
1114
|
-
function
|
|
1063
|
+
function F(r) {
|
|
1115
1064
|
return {
|
|
1116
1065
|
platform: r,
|
|
1117
1066
|
modifiers: {
|
|
@@ -1125,25 +1074,25 @@ function L(r) {
|
|
|
1125
1074
|
held: { key: [], code: [] }
|
|
1126
1075
|
};
|
|
1127
1076
|
}
|
|
1128
|
-
function
|
|
1077
|
+
function ot(r) {
|
|
1129
1078
|
var n;
|
|
1130
1079
|
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
1080
|
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
1081
|
}
|
|
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 &&
|
|
1082
|
+
function at(r, t) {
|
|
1083
|
+
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
1084
|
}
|
|
1136
|
-
function
|
|
1085
|
+
function k(r, t) {
|
|
1137
1086
|
return r.length === t.length && r.every((e, n) => e === t[n]);
|
|
1138
1087
|
}
|
|
1139
|
-
function
|
|
1088
|
+
function I(r) {
|
|
1140
1089
|
return {
|
|
1141
1090
|
platform: r.platform,
|
|
1142
1091
|
modifiers: { ...r.modifiers },
|
|
1143
1092
|
held: { key: [...r.held.key], code: [...r.held.code] }
|
|
1144
1093
|
};
|
|
1145
1094
|
}
|
|
1146
|
-
class
|
|
1095
|
+
class ne extends P {
|
|
1147
1096
|
constructor() {
|
|
1148
1097
|
super(...arguments);
|
|
1149
1098
|
/** Массив всех логов */
|
|
@@ -1294,27 +1243,27 @@ class De extends B {
|
|
|
1294
1243
|
this.logs = [], this.notify();
|
|
1295
1244
|
}
|
|
1296
1245
|
}
|
|
1297
|
-
function
|
|
1246
|
+
function ct(r) {
|
|
1298
1247
|
try {
|
|
1299
1248
|
return new new Proxy(r, { construct: () => ({}) })(), !0;
|
|
1300
1249
|
} catch {
|
|
1301
1250
|
return !1;
|
|
1302
1251
|
}
|
|
1303
1252
|
}
|
|
1304
|
-
function
|
|
1305
|
-
if (
|
|
1253
|
+
function ie(r, ...t) {
|
|
1254
|
+
if (ct(r)) {
|
|
1306
1255
|
const e = r;
|
|
1307
1256
|
return new e(...t);
|
|
1308
1257
|
} else
|
|
1309
1258
|
return r(...t);
|
|
1310
1259
|
}
|
|
1311
|
-
const
|
|
1312
|
-
function
|
|
1260
|
+
const lt = /* @__PURE__ */ new WeakMap();
|
|
1261
|
+
function se(r) {
|
|
1313
1262
|
let t;
|
|
1314
|
-
return () => (t || (t = r(),
|
|
1263
|
+
return () => (t || (t = r(), lt.set(r, t)), t);
|
|
1315
1264
|
}
|
|
1316
|
-
const
|
|
1317
|
-
DateTime:
|
|
1265
|
+
const ut = {
|
|
1266
|
+
DateTime: Y,
|
|
1318
1267
|
toDateTime(r) {
|
|
1319
1268
|
return this.DateTime.fromJSDate(r);
|
|
1320
1269
|
},
|
|
@@ -1342,25 +1291,25 @@ const xt = {
|
|
|
1342
1291
|
getZone() {
|
|
1343
1292
|
return this.DateTime.now().zone;
|
|
1344
1293
|
}
|
|
1345
|
-
},
|
|
1346
|
-
function
|
|
1294
|
+
}, oe = (r) => ut.toDateTime(r);
|
|
1295
|
+
function ae(r) {
|
|
1347
1296
|
return String(r).charAt(0).toUpperCase() + String(r).slice(1);
|
|
1348
1297
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return
|
|
1298
|
+
function ce(r, t) {
|
|
1299
|
+
return D(r, t) || Q(r, t);
|
|
1351
1300
|
}
|
|
1352
|
-
function
|
|
1353
|
-
const i = g(r), s = g(t), a = g(e),
|
|
1354
|
-
return !
|
|
1301
|
+
function le(r, t, e, n) {
|
|
1302
|
+
const i = g(r), s = g(t), a = g(e), l = g(n);
|
|
1303
|
+
return !z(s, a) && !D(i, l);
|
|
1355
1304
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return !
|
|
1305
|
+
function ue(r, t, e) {
|
|
1306
|
+
return !z(r, g(t)) && !D(r, X(e));
|
|
1358
1307
|
}
|
|
1359
|
-
const
|
|
1360
|
-
function
|
|
1361
|
-
return r &&
|
|
1308
|
+
const fe = (r) => r && new Date(r);
|
|
1309
|
+
function de(r, t = "HH:mm dd.MM.yyyy", e = {}) {
|
|
1310
|
+
return r && T(r, t, e);
|
|
1362
1311
|
}
|
|
1363
|
-
function
|
|
1312
|
+
function ft(r, t = "HH:mm dd.MM.yyyy", e = {}, n = !0) {
|
|
1364
1313
|
if (!r || !r || r === "")
|
|
1365
1314
|
return "";
|
|
1366
1315
|
if (typeof r == "string")
|
|
@@ -1370,39 +1319,39 @@ function _t(r, t = "HH:mm dd.MM.yyyy", e = {}, n = !0) {
|
|
|
1370
1319
|
return "";
|
|
1371
1320
|
} else
|
|
1372
1321
|
r = new Date(r.toString());
|
|
1373
|
-
return n ?
|
|
1322
|
+
return n ? T(r, t, e) : T(E(r, "utc"), t, e);
|
|
1374
1323
|
}
|
|
1375
|
-
function
|
|
1324
|
+
function he(r) {
|
|
1376
1325
|
const t = { weekday: "short" }, e = new Intl.DateTimeFormat("ru-RU", t).format(r);
|
|
1377
1326
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1378
1327
|
}
|
|
1379
|
-
function
|
|
1328
|
+
function me(r) {
|
|
1380
1329
|
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
1330
|
return `${i}.${s}.${a}`;
|
|
1382
1331
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1332
|
+
function ye(r, t = !0) {
|
|
1333
|
+
return ft(r, "HH:mm", {}, t);
|
|
1385
1334
|
}
|
|
1386
|
-
function
|
|
1335
|
+
function pe(r) {
|
|
1387
1336
|
const t = Array.from(r), e = Math.min(...t.map((i) => i.getTime())), n = Math.max(...t.map((i) => i.getTime()));
|
|
1388
1337
|
return {
|
|
1389
1338
|
minDate: new Date(e),
|
|
1390
1339
|
maxDate: new Date(n)
|
|
1391
1340
|
};
|
|
1392
1341
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const e =
|
|
1342
|
+
function ge(r, t) {
|
|
1343
|
+
const e = N(r, t), { hours: n, minutes: i } = A(e);
|
|
1395
1344
|
return n || i ? `${e > 0 ? "-" : "+"}${d(n)}:${d(i)}` : "";
|
|
1396
1345
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const e =
|
|
1346
|
+
function Te(r, t) {
|
|
1347
|
+
const e = N(r, t), { hours: n, minutes: i } = A(e);
|
|
1399
1348
|
return n || i ? `${e > 0 ? "-" : ""}${d(n)}:${d(i)}` : "";
|
|
1400
1349
|
}
|
|
1401
|
-
function
|
|
1350
|
+
function L(r = /* @__PURE__ */ new Date()) {
|
|
1402
1351
|
return new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
1403
1352
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const e =
|
|
1353
|
+
function Se(r, t) {
|
|
1354
|
+
const e = q(L(r), L(t));
|
|
1406
1355
|
return e ? e > 7 ? {
|
|
1407
1356
|
variant: "red",
|
|
1408
1357
|
value: ">7"
|
|
@@ -1417,51 +1366,51 @@ function Ue(r, t) {
|
|
|
1417
1366
|
value: `${e}`
|
|
1418
1367
|
} : null;
|
|
1419
1368
|
}
|
|
1420
|
-
function
|
|
1369
|
+
function be(r) {
|
|
1421
1370
|
const e = String(r ?? "").trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1422
1371
|
if (!e)
|
|
1423
1372
|
return null;
|
|
1424
1373
|
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
1374
|
return Number.isNaN(a.getTime()) ? null : a.toISOString();
|
|
1426
1375
|
}
|
|
1427
|
-
function
|
|
1376
|
+
function we(r) {
|
|
1428
1377
|
const t = String(r ?? "").trim();
|
|
1429
1378
|
if (!t)
|
|
1430
1379
|
return null;
|
|
1431
1380
|
const e = t.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/);
|
|
1432
1381
|
if (e) {
|
|
1433
|
-
const i = Number(e[1]), s = Number(e[2]) - 1, a = Number(e[3]),
|
|
1382
|
+
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
1383
|
return Number.isNaN(h.getTime()) ? null : h.toISOString();
|
|
1435
1384
|
}
|
|
1436
1385
|
const n = new Date(t);
|
|
1437
1386
|
return Number.isNaN(n.getTime()) ? null : n.toISOString();
|
|
1438
1387
|
}
|
|
1439
|
-
function
|
|
1388
|
+
function _e(r) {
|
|
1440
1389
|
const t = String(r ?? "").trim();
|
|
1441
1390
|
return t ? t.slice(0, 10) : "";
|
|
1442
1391
|
}
|
|
1443
|
-
function
|
|
1392
|
+
function xe(r) {
|
|
1444
1393
|
const t = String(r ?? "").trim();
|
|
1445
1394
|
if (!t)
|
|
1446
1395
|
return "";
|
|
1447
1396
|
const e = new Date(t);
|
|
1448
1397
|
if (Number.isNaN(e.getTime()))
|
|
1449
1398
|
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}:${
|
|
1399
|
+
const n = e.getFullYear(), i = d(e.getMonth() + 1), s = d(e.getDate()), a = d(e.getHours()), l = d(e.getMinutes());
|
|
1400
|
+
return `${n}-${i}-${s}T${a}:${l}`;
|
|
1452
1401
|
}
|
|
1453
|
-
function
|
|
1454
|
-
const e =
|
|
1402
|
+
function De(r, t) {
|
|
1403
|
+
const e = j(r);
|
|
1455
1404
|
if (e)
|
|
1456
1405
|
return e;
|
|
1457
1406
|
const n = new Date(String(r ?? "").trim());
|
|
1458
1407
|
if (Number.isNaN(n.getTime()))
|
|
1459
1408
|
return "";
|
|
1460
|
-
const i =
|
|
1409
|
+
const i = B(t), s = i ? E(n, i) : n;
|
|
1461
1410
|
return `${d(s.getHours())}:${d(s.getMinutes())}`;
|
|
1462
1411
|
}
|
|
1463
|
-
function
|
|
1464
|
-
const n =
|
|
1412
|
+
function Ee(r, t, e) {
|
|
1413
|
+
const n = j(t).match(/^(\d{2}):(\d{2})$/);
|
|
1465
1414
|
if (!n)
|
|
1466
1415
|
return null;
|
|
1467
1416
|
const i = new Date(String(r ?? "").trim());
|
|
@@ -1470,13 +1419,13 @@ function Ge(r, t, e) {
|
|
|
1470
1419
|
const s = Number(n[1]), a = Number(n[2]);
|
|
1471
1420
|
if (s > 23 || a > 59)
|
|
1472
1421
|
return null;
|
|
1473
|
-
const
|
|
1474
|
-
if (!
|
|
1422
|
+
const l = B(e);
|
|
1423
|
+
if (!l)
|
|
1475
1424
|
return i.setHours(s, a, 0, 0), i.toISOString();
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1425
|
+
const u = E(i, l);
|
|
1426
|
+
return u.setHours(s, a, 0, 0), v(u, l).toISOString();
|
|
1478
1427
|
}
|
|
1479
|
-
function
|
|
1428
|
+
function j(r) {
|
|
1480
1429
|
if (r == null)
|
|
1481
1430
|
return "";
|
|
1482
1431
|
const t = String(r).trim();
|
|
@@ -1488,7 +1437,7 @@ function G(r) {
|
|
|
1488
1437
|
const n = t.match(/^(\d{2}):(\d{2})$/);
|
|
1489
1438
|
return n ? `${n[1]}:${n[2]}` : "";
|
|
1490
1439
|
}
|
|
1491
|
-
function
|
|
1440
|
+
function B(r) {
|
|
1492
1441
|
const t = String(r ?? "").trim();
|
|
1493
1442
|
if (!t || t === "local")
|
|
1494
1443
|
return null;
|
|
@@ -1498,7 +1447,7 @@ function Z(r) {
|
|
|
1498
1447
|
return null;
|
|
1499
1448
|
}
|
|
1500
1449
|
}
|
|
1501
|
-
function
|
|
1450
|
+
function Ie(r) {
|
|
1502
1451
|
if (r == null)
|
|
1503
1452
|
return null;
|
|
1504
1453
|
const t = String(r).trim();
|
|
@@ -1510,31 +1459,31 @@ function Ze(r) {
|
|
|
1510
1459
|
const n = t.match(/^(\d{2}):(\d{2})$/);
|
|
1511
1460
|
return n ? `${n[1]}:${n[2]}:00` : null;
|
|
1512
1461
|
}
|
|
1513
|
-
function
|
|
1514
|
-
const t =
|
|
1462
|
+
function Ae(r) {
|
|
1463
|
+
const t = ht(r), e = Math.sign(t) >= 0 ? "" : "-", { hours: n, minutes: i } = A(t);
|
|
1515
1464
|
return `${e}${d(n)}:${d(i)}`;
|
|
1516
1465
|
}
|
|
1517
|
-
function
|
|
1518
|
-
const n =
|
|
1466
|
+
function Oe(r = null, t = "dd", e = {}) {
|
|
1467
|
+
const n = dt(r);
|
|
1519
1468
|
if (!n)
|
|
1520
1469
|
return "";
|
|
1521
1470
|
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() ? "" : `/${
|
|
1471
|
+
return i.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), s.toDateString() === i.toDateString() ? "" : `/${T(n, t, e)}`;
|
|
1523
1472
|
}
|
|
1524
|
-
function
|
|
1473
|
+
function dt(r) {
|
|
1525
1474
|
if (!r || r === "")
|
|
1526
1475
|
return null;
|
|
1527
1476
|
const t = typeof r == "string" ? new Date(r) : r instanceof Date ? r : new Date(r.toString());
|
|
1528
1477
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1529
1478
|
}
|
|
1530
|
-
function
|
|
1479
|
+
function A(r) {
|
|
1531
1480
|
const t = Math.abs(r);
|
|
1532
1481
|
return {
|
|
1533
1482
|
hours: Math.floor(t / 3600) % 24,
|
|
1534
1483
|
minutes: Math.floor(t / 60) % 60
|
|
1535
1484
|
};
|
|
1536
1485
|
}
|
|
1537
|
-
function
|
|
1486
|
+
function ht(r) {
|
|
1538
1487
|
const t = String(r ?? "").trim();
|
|
1539
1488
|
if (!t)
|
|
1540
1489
|
return 0;
|
|
@@ -1543,30 +1492,30 @@ function It(r) {
|
|
|
1543
1492
|
return (e[1] ? -1 : 1) * (Number(e[2]) * 3600 + Number(e[3]) * 60 + Number(e[4] ?? 0));
|
|
1544
1493
|
const n = t.match(/^(-)?P(?:(\d+(?:\.\d+)?)D)?(?:T(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/i);
|
|
1545
1494
|
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 +
|
|
1495
|
+
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);
|
|
1496
|
+
return i * (s * 86400 + a * 3600 + l * 60 + u);
|
|
1548
1497
|
}
|
|
1549
1498
|
return 0;
|
|
1550
1499
|
}
|
|
1551
1500
|
function d(r) {
|
|
1552
1501
|
return String(r).padStart(2, "0");
|
|
1553
1502
|
}
|
|
1554
|
-
function
|
|
1503
|
+
function Ce(r) {
|
|
1555
1504
|
const t = /* @__PURE__ */ new Date();
|
|
1556
1505
|
try {
|
|
1557
|
-
const e =
|
|
1506
|
+
const e = _(r, t), n = Intl.supportedValuesOf("timeZone");
|
|
1558
1507
|
for (const i of n)
|
|
1559
|
-
if (
|
|
1508
|
+
if (_(i, t) === e)
|
|
1560
1509
|
return i;
|
|
1561
1510
|
} catch {
|
|
1562
1511
|
return null;
|
|
1563
1512
|
}
|
|
1564
1513
|
return null;
|
|
1565
1514
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1515
|
+
function Me(r) {
|
|
1516
|
+
return _(r, /* @__PURE__ */ new Date());
|
|
1568
1517
|
}
|
|
1569
|
-
class
|
|
1518
|
+
class $e {
|
|
1570
1519
|
constructor(t) {
|
|
1571
1520
|
o(this, "_url");
|
|
1572
1521
|
o(this, "_retryInterval");
|
|
@@ -1597,15 +1546,15 @@ class Xe {
|
|
|
1597
1546
|
async _connect() {
|
|
1598
1547
|
var t, e, n;
|
|
1599
1548
|
try {
|
|
1600
|
-
await
|
|
1549
|
+
await tt(this._url, {
|
|
1601
1550
|
method: "GET",
|
|
1602
1551
|
headers: await this._buildHeaders(),
|
|
1603
1552
|
signal: (t = this._abortController) == null ? void 0 : t.signal,
|
|
1604
1553
|
openWhenHidden: !0,
|
|
1605
1554
|
onopen: (i) => {
|
|
1606
|
-
var a,
|
|
1607
|
-
if (i.ok && i.headers.get("content-type") ===
|
|
1608
|
-
this._isConnected = !0, (
|
|
1555
|
+
var a, l;
|
|
1556
|
+
if (i.ok && i.headers.get("content-type") === et) {
|
|
1557
|
+
this._isConnected = !0, (l = (a = this._options).onOpen) == null || l.call(a);
|
|
1609
1558
|
return;
|
|
1610
1559
|
}
|
|
1611
1560
|
throw new Error(`Unexpected response: ${i.status}`);
|
|
@@ -1614,7 +1563,7 @@ class Xe {
|
|
|
1614
1563
|
try {
|
|
1615
1564
|
this._options.onEvent(JSON.parse(i.data));
|
|
1616
1565
|
} catch (s) {
|
|
1617
|
-
console.warn(`[SSEManager] Failed to parse message: ${
|
|
1566
|
+
console.warn(`[SSEManager] Failed to parse message: ${U(s)}`);
|
|
1618
1567
|
}
|
|
1619
1568
|
},
|
|
1620
1569
|
onclose: () => {
|
|
@@ -1635,7 +1584,7 @@ class Xe {
|
|
|
1635
1584
|
return this._isConnected;
|
|
1636
1585
|
}
|
|
1637
1586
|
}
|
|
1638
|
-
class
|
|
1587
|
+
class Fe {
|
|
1639
1588
|
constructor() {
|
|
1640
1589
|
o(this, "_currentCount", 0);
|
|
1641
1590
|
o(this, "_lastResetTime", Date.now());
|
|
@@ -1652,127 +1601,80 @@ class ve {
|
|
|
1652
1601
|
this._currentCount = 0, this._lastEventsPerSecond = 0, this._lastResetTime = Date.now();
|
|
1653
1602
|
}
|
|
1654
1603
|
}
|
|
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
1604
|
export {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1605
|
+
Ut as AfterDeserialize,
|
|
1606
|
+
xt as AppBus,
|
|
1607
|
+
Ht as BeforeSerialize,
|
|
1608
|
+
Dt as Collection,
|
|
1609
|
+
Ot as DelayedExecutor,
|
|
1610
|
+
jt as DeserializeArrayField,
|
|
1611
|
+
Kt as DeserializeId,
|
|
1612
|
+
H as EventBus,
|
|
1703
1613
|
y as Events,
|
|
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
|
+
Pt as GenericExpose,
|
|
1615
|
+
vt as HotkeyManager,
|
|
1616
|
+
it as IS_DEBUG,
|
|
1617
|
+
Gt as IgnoreToPlain,
|
|
1618
|
+
Et as IndexedCollection,
|
|
1619
|
+
Rt as IsOptionalTransformed,
|
|
1620
|
+
Mt as Json,
|
|
1621
|
+
$t as JsonString,
|
|
1622
|
+
Ct as NamedExecutor,
|
|
1623
|
+
At as PayloadHttpClient,
|
|
1624
|
+
It as RingBuffer,
|
|
1625
|
+
$e as SSEManager,
|
|
1626
|
+
kt as Script,
|
|
1627
|
+
zt as Serialize,
|
|
1628
|
+
Bt as SerializeId,
|
|
1629
|
+
Vt as SerializeIds,
|
|
1630
|
+
ne as StructuredLogger,
|
|
1631
|
+
ut as SystemClock,
|
|
1632
|
+
Lt as TypeMap,
|
|
1633
|
+
Nt as TypeRecord,
|
|
1634
|
+
Fe as UPSMeter_Service,
|
|
1635
|
+
ae as capitalize,
|
|
1636
|
+
Yt as compareNumber,
|
|
1637
|
+
U as consoleErrorSummary,
|
|
1638
|
+
x as consoleValueSummary,
|
|
1639
|
+
ie as createInstance,
|
|
1640
|
+
ge as diffDuration,
|
|
1641
|
+
Te as diffDurationTable,
|
|
1642
|
+
oe as dt,
|
|
1643
|
+
ye as extractTime,
|
|
1644
|
+
pe as findMinMaxDates,
|
|
1645
|
+
me as formatDateToMSK,
|
|
1646
|
+
de as formatDatetime,
|
|
1647
|
+
ft as formatDatetimeTZ,
|
|
1648
|
+
Oe as formatDatetimeTZSpecial,
|
|
1649
|
+
Qt as generateUUID,
|
|
1650
|
+
Se as getDateOnlyDiffFactor,
|
|
1651
|
+
he as getDayOfWeek,
|
|
1652
|
+
ee as getKeyboardStateSnapshot,
|
|
1653
|
+
rt as getOnDeserializedMethod,
|
|
1654
|
+
Me as getTimezoneOffsetMs,
|
|
1655
|
+
se as globalState,
|
|
1656
|
+
ce as isAfterOrEqual,
|
|
1657
|
+
te as isAnyKeyComboActive,
|
|
1658
|
+
ct as isConstructor,
|
|
1659
|
+
ue as isDateInRange,
|
|
1660
|
+
le as isDateRangeOverlap,
|
|
1661
|
+
Wt as isNullOrUndefined,
|
|
1662
|
+
De as isoDateTimeToTimeInput,
|
|
1663
|
+
_e as isoToDateInput,
|
|
1664
|
+
xe as isoToDateTimeLocalInput,
|
|
1665
|
+
Ee as mergeTimeIntoDateTime,
|
|
1666
|
+
Ft as onDeserialized,
|
|
1667
|
+
fe as parseDate,
|
|
1668
|
+
Ae as parseDuration,
|
|
1669
|
+
Ce as parseOffsetToTimezone,
|
|
1670
|
+
qt as profile,
|
|
1671
|
+
Xt as randomString,
|
|
1672
|
+
L as removeTime,
|
|
1673
|
+
re as subscribeKeyboardState,
|
|
1674
|
+
j as timeToTimeInput,
|
|
1675
|
+
Jt as toInstance,
|
|
1676
|
+
be as toIsoZDate,
|
|
1677
|
+
we as toIsoZDateTime,
|
|
1678
|
+
Zt as toPlain,
|
|
1679
|
+
Ie as toTimeHHMMSS
|
|
1778
1680
|
};
|