@dxtmisha/functional-basic 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/ai-description.md +18 -19
- package/ai-types.md +102 -142
- package/dist/library.js +596 -471
- package/dist/src/classes/ErrorCenter.d.ts +7 -0
- package/dist/src/classes/ErrorCenterHandler.d.ts +10 -0
- package/dist/src/classes/ErrorCenterInstance.d.ts +8 -0
- package/dist/src/classes/GeoUnit.d.ts +207 -0
- package/dist/src/library.d.ts +1 -0
- package/dist/src/types/geoTypes.d.ts +79 -35
- package/package.json +2 -2
package/dist/library.js
CHANGED
|
@@ -109,32 +109,32 @@ function m(e, ...t) {
|
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/functions/isNumber.ts
|
|
112
|
-
var
|
|
113
|
-
function
|
|
112
|
+
var te = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
113
|
+
function h(e) {
|
|
114
114
|
switch (typeof e) {
|
|
115
115
|
case "number": return Number.isFinite(e);
|
|
116
116
|
case "bigint": return !0;
|
|
117
|
-
case "string": return
|
|
117
|
+
case "string": return te.test(e.trim());
|
|
118
118
|
default: return !1;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region src/functions/toNumber.ts
|
|
123
|
-
var
|
|
124
|
-
function
|
|
123
|
+
var g = /[^-+\d., ]+/g, _ = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, ne = / /g, v = /,/g, re = /,[0-9]{3}[,.]/, ie = /[.][0-9]{3}[,.]/, ae = /[.]/g;
|
|
124
|
+
function y(e) {
|
|
125
125
|
if (typeof e == "number") return Number.isFinite(e) && e || 0;
|
|
126
126
|
if (!e) return 0;
|
|
127
|
-
let t = e.replace(
|
|
128
|
-
return t =
|
|
127
|
+
let t = e.replace(g, "");
|
|
128
|
+
return t = _.test(t) ? t.replace(ne, "").replace(v, ".") : re.test(t) ? t.replace(v, "") : ie.test(t) ? t.replace(ae, "").replace(v, ".") : t.replace(v, "."), parseFloat(t) || 0;
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region src/functions/isSelected.ts
|
|
132
|
-
function
|
|
133
|
-
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) :
|
|
132
|
+
function b(e, t) {
|
|
133
|
+
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : h(e) && h(t) ? y(e) === y(t) : e === t;
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/functions/anyToString.ts
|
|
137
|
-
function
|
|
137
|
+
function x(e, n = !0, r = !0) {
|
|
138
138
|
var a;
|
|
139
139
|
if (d(e)) return r ? e.trim() : e;
|
|
140
140
|
if (c(e)) return "";
|
|
@@ -148,49 +148,49 @@ function S(e, n = !0, r = !0) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/functions/isDomData.ts
|
|
151
|
-
function
|
|
151
|
+
function oe() {
|
|
152
152
|
return s() && location.href.startsWith("data:");
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/functions/strSplit.ts
|
|
156
|
-
function
|
|
157
|
-
let r =
|
|
156
|
+
function se(e, t, n) {
|
|
157
|
+
let r = x(e);
|
|
158
158
|
if (!n || n <= 0) return r.split(t);
|
|
159
159
|
let i = r.split(t, n), a = r.split(t);
|
|
160
160
|
return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region \0@oxc-project+runtime@0.130.0/helpers/typeof.js
|
|
164
|
-
function
|
|
164
|
+
function S(e) {
|
|
165
165
|
"@babel/helpers - typeof";
|
|
166
|
-
return
|
|
166
|
+
return S = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
167
167
|
return typeof e;
|
|
168
168
|
} : function(e) {
|
|
169
169
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
170
|
-
},
|
|
170
|
+
}, S(e);
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPrimitive.js
|
|
174
|
-
function
|
|
175
|
-
if (
|
|
174
|
+
function ce(e, t) {
|
|
175
|
+
if (S(e) != "object" || !e) return e;
|
|
176
176
|
var n = e[Symbol.toPrimitive];
|
|
177
177
|
if (n !== void 0) {
|
|
178
178
|
var r = n.call(e, t || "default");
|
|
179
|
-
if (
|
|
179
|
+
if (S(r) != "object") return r;
|
|
180
180
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
181
181
|
}
|
|
182
182
|
return (t === "string" ? String : Number)(e);
|
|
183
183
|
}
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPropertyKey.js
|
|
186
|
-
function
|
|
187
|
-
var t =
|
|
188
|
-
return
|
|
186
|
+
function le(e) {
|
|
187
|
+
var t = ce(e, "string");
|
|
188
|
+
return S(t) == "symbol" ? t : t + "";
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region \0@oxc-project+runtime@0.130.0/helpers/defineProperty.js
|
|
192
|
-
function
|
|
193
|
-
return (t =
|
|
192
|
+
function C(e, t, n) {
|
|
193
|
+
return (t = le(t)) in e ? Object.defineProperty(e, t, {
|
|
194
194
|
value: n,
|
|
195
195
|
enumerable: !0,
|
|
196
196
|
configurable: !0,
|
|
@@ -199,9 +199,9 @@ function w(e, t, n) {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/classes/ErrorCenterHandler.ts
|
|
202
|
-
var
|
|
202
|
+
var ue = class {
|
|
203
203
|
constructor(e) {
|
|
204
|
-
|
|
204
|
+
C(this, "handlers", []), C(this, "callbacks", []), e && this.addList(e);
|
|
205
205
|
}
|
|
206
206
|
has(e) {
|
|
207
207
|
return !!this.get(e);
|
|
@@ -219,10 +219,13 @@ var le = class {
|
|
|
219
219
|
addList(e) {
|
|
220
220
|
return e.forEach((e) => e.handlers.forEach((t) => this.add(e.group, t))), this;
|
|
221
221
|
}
|
|
222
|
+
addCallback(e) {
|
|
223
|
+
return this.callbacks.push(e), this;
|
|
224
|
+
}
|
|
222
225
|
on(e) {
|
|
223
226
|
var t;
|
|
224
227
|
let n = (t = this.get(e.group)) == null ? this.get(void 0) : t;
|
|
225
|
-
return n && n.handlers.forEach((t) => t(e)), this.toConsole(e), this;
|
|
228
|
+
return n && n.handlers.forEach((t) => t(e)), this.callbacks.forEach((t) => t(e)), this.toConsole(e), this;
|
|
226
229
|
}
|
|
227
230
|
toConsole(e) {
|
|
228
231
|
if (console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details: ", e.details), !s()) {
|
|
@@ -231,9 +234,9 @@ var le = class {
|
|
|
231
234
|
}
|
|
232
235
|
return this;
|
|
233
236
|
}
|
|
234
|
-
},
|
|
235
|
-
constructor(e, t = new
|
|
236
|
-
|
|
237
|
+
}, de = class {
|
|
238
|
+
constructor(e, t = new ue()) {
|
|
239
|
+
C(this, "handler", void 0), C(this, "causes", []), this.handler = t, e && this.addList(e);
|
|
237
240
|
}
|
|
238
241
|
has(e, t) {
|
|
239
242
|
return !!this.get(e, t);
|
|
@@ -253,6 +256,9 @@ var le = class {
|
|
|
253
256
|
addHandlerList(e) {
|
|
254
257
|
return this.handler.addList(e), this;
|
|
255
258
|
}
|
|
259
|
+
addCallback(e) {
|
|
260
|
+
return this.handler.addCallback(e), this;
|
|
261
|
+
}
|
|
256
262
|
on(e) {
|
|
257
263
|
return this.handler.on(this.assign(e)), this;
|
|
258
264
|
}
|
|
@@ -270,7 +276,7 @@ var le = class {
|
|
|
270
276
|
}
|
|
271
277
|
return e;
|
|
272
278
|
}
|
|
273
|
-
},
|
|
279
|
+
}, fe = [
|
|
274
280
|
{
|
|
275
281
|
group: "api",
|
|
276
282
|
code: "cacheClear",
|
|
@@ -421,7 +427,7 @@ var le = class {
|
|
|
421
427
|
label: "Translate Error",
|
|
422
428
|
message: "An error occurred while loading translations."
|
|
423
429
|
}
|
|
424
|
-
],
|
|
430
|
+
], w = class {
|
|
425
431
|
static getItem() {
|
|
426
432
|
return this.item;
|
|
427
433
|
}
|
|
@@ -443,14 +449,17 @@ var le = class {
|
|
|
443
449
|
static addHandlerList(e) {
|
|
444
450
|
this.getItem().addHandlerList(e);
|
|
445
451
|
}
|
|
452
|
+
static addCallback(e) {
|
|
453
|
+
this.getItem().addCallback(e);
|
|
454
|
+
}
|
|
446
455
|
static on(e) {
|
|
447
456
|
this.getItem().on(e);
|
|
448
457
|
}
|
|
449
458
|
};
|
|
450
|
-
w
|
|
459
|
+
C(w, "item", new de(fe));
|
|
451
460
|
//#endregion
|
|
452
461
|
//#region src/functions/transformation.ts
|
|
453
|
-
function
|
|
462
|
+
function T(e, t = !1) {
|
|
454
463
|
if (typeof e == "string") {
|
|
455
464
|
let r = e.trim();
|
|
456
465
|
switch (r) {
|
|
@@ -463,7 +472,7 @@ function E(e, t = !1) {
|
|
|
463
472
|
if (/^[{[]/.exec(r)) try {
|
|
464
473
|
return JSON.parse(r);
|
|
465
474
|
} catch (e) {
|
|
466
|
-
|
|
475
|
+
w.on({
|
|
467
476
|
group: "transformation",
|
|
468
477
|
code: "error",
|
|
469
478
|
details: e
|
|
@@ -478,32 +487,32 @@ function E(e, t = !1) {
|
|
|
478
487
|
}
|
|
479
488
|
//#endregion
|
|
480
489
|
//#region src/functions/encodeLiteAttribute.ts
|
|
481
|
-
var
|
|
490
|
+
var pe = {
|
|
482
491
|
"<": "<",
|
|
483
492
|
">": ">",
|
|
484
493
|
"&": "&"
|
|
485
494
|
};
|
|
486
|
-
function
|
|
495
|
+
function me(e) {
|
|
487
496
|
return String(e).replace(/[<>&]/g, (e) => {
|
|
488
497
|
var t;
|
|
489
|
-
return (t =
|
|
498
|
+
return (t = pe == null ? void 0 : pe[e]) == null ? e : t;
|
|
490
499
|
});
|
|
491
500
|
}
|
|
492
501
|
//#endregion
|
|
493
502
|
//#region src/functions/getElementSafeScript.ts
|
|
494
|
-
function
|
|
503
|
+
function he(e, t) {
|
|
495
504
|
return `<script id="${e.replace(/"/g, """)}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
|
|
496
505
|
}
|
|
497
506
|
//#endregion
|
|
498
507
|
//#region src/functions/getHydrationData.ts
|
|
499
|
-
function
|
|
508
|
+
function ge(e, t, n = !0) {
|
|
500
509
|
if (typeof document < "u") {
|
|
501
510
|
let t = document.getElementById(e);
|
|
502
511
|
if (t) try {
|
|
503
512
|
let e = JSON.parse(t.textContent || "");
|
|
504
513
|
return n && t.remove(), e;
|
|
505
514
|
} catch (t) {
|
|
506
|
-
|
|
515
|
+
w.on({
|
|
507
516
|
group: "hydration",
|
|
508
517
|
code: "error",
|
|
509
518
|
details: {
|
|
@@ -517,7 +526,7 @@ function he(e, t, n = !0) {
|
|
|
517
526
|
}
|
|
518
527
|
//#endregion
|
|
519
528
|
//#region src/classes/ServerStorage.ts
|
|
520
|
-
var
|
|
529
|
+
var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
521
530
|
static init(e) {
|
|
522
531
|
return this.listener || (this.listener = e), this;
|
|
523
532
|
}
|
|
@@ -547,7 +556,7 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
547
556
|
e in t && delete t[e];
|
|
548
557
|
}
|
|
549
558
|
static toString() {
|
|
550
|
-
return
|
|
559
|
+
return he(ve, this.getDataForHydration());
|
|
551
560
|
}
|
|
552
561
|
static getStorage(e = !0, t) {
|
|
553
562
|
var n;
|
|
@@ -555,17 +564,17 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
555
564
|
let r = (n = this.listener) == null ? void 0 : n.call(this);
|
|
556
565
|
if (!r) {
|
|
557
566
|
var i;
|
|
558
|
-
return this.hideError ||
|
|
567
|
+
return this.hideError || w.on({
|
|
559
568
|
group: "storage",
|
|
560
569
|
code: "context",
|
|
561
570
|
details: { status: t }
|
|
562
571
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
563
572
|
}
|
|
564
|
-
return
|
|
573
|
+
return _e in r || (r[_e] = {}), r[_e];
|
|
565
574
|
}
|
|
566
575
|
static getStorageDom() {
|
|
567
576
|
if (!this.storage) {
|
|
568
|
-
let e =
|
|
577
|
+
let e = ge(ve, {});
|
|
569
578
|
this.storage = {}, r(e, (e, t) => {
|
|
570
579
|
this.storage[t] = {
|
|
571
580
|
value: e,
|
|
@@ -582,16 +591,16 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
582
591
|
}), t;
|
|
583
592
|
}
|
|
584
593
|
};
|
|
585
|
-
|
|
594
|
+
C(E, "storage", void 0), C(E, "listener", void 0), C(E, "hideError", void 0);
|
|
586
595
|
//#endregion
|
|
587
596
|
//#region src/classes/DataStorage.ts
|
|
588
|
-
var
|
|
597
|
+
var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D = class {
|
|
589
598
|
static setPrefix(e) {
|
|
590
|
-
|
|
599
|
+
ye = e;
|
|
591
600
|
}
|
|
592
|
-
constructor(e, t = !1, n =
|
|
593
|
-
|
|
594
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
601
|
+
constructor(e, t = !1, n = w.getItem()) {
|
|
602
|
+
C(this, "name", void 0), C(this, "isSession", void 0), C(this, "errorCenter", void 0), C(this, "value", void 0), C(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
603
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = be();
|
|
595
604
|
if (r in i) return i[r];
|
|
596
605
|
this.make(), i[r] = this;
|
|
597
606
|
}
|
|
@@ -603,7 +612,7 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
603
612
|
if (this.value = m(e), this.age = Date.now(), this.value === void 0) this.remove();
|
|
604
613
|
else {
|
|
605
614
|
var t;
|
|
606
|
-
(t = this.getMethod()) == null || t.setItem(this.getIndex(),
|
|
615
|
+
(t = this.getMethod()) == null || t.setItem(this.getIndex(), me(JSON.stringify({
|
|
607
616
|
value: this.value,
|
|
608
617
|
age: this.age
|
|
609
618
|
})));
|
|
@@ -621,14 +630,14 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
621
630
|
return c(e) || this.age && this.age + e * 1e3 >= Date.now();
|
|
622
631
|
}
|
|
623
632
|
getMethod() {
|
|
624
|
-
if (s() && !
|
|
633
|
+
if (s() && !oe()) {
|
|
625
634
|
var e, t;
|
|
626
635
|
let n = this.isSession ? (e = window) == null ? void 0 : e.sessionStorage : (t = window) == null ? void 0 : t.localStorage;
|
|
627
636
|
if (n) return n;
|
|
628
637
|
}
|
|
629
638
|
}
|
|
630
639
|
getIndex() {
|
|
631
|
-
return `${
|
|
640
|
+
return `${ye}__${this.name}`;
|
|
632
641
|
}
|
|
633
642
|
getValue() {
|
|
634
643
|
var e, t;
|
|
@@ -647,9 +656,9 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
647
656
|
let e = this.getValue();
|
|
648
657
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
649
658
|
}
|
|
650
|
-
},
|
|
659
|
+
}, xe = "__ui:cookie-block__", Se = class {
|
|
651
660
|
constructor() {
|
|
652
|
-
|
|
661
|
+
C(this, "storage", new D(xe));
|
|
653
662
|
}
|
|
654
663
|
get() {
|
|
655
664
|
var e;
|
|
@@ -658,9 +667,9 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
658
667
|
set(e) {
|
|
659
668
|
this.storage.set(e);
|
|
660
669
|
}
|
|
661
|
-
},
|
|
670
|
+
}, Ce = class {
|
|
662
671
|
static getItem() {
|
|
663
|
-
return
|
|
672
|
+
return E.get("__ui:cookie-block__", () => new Se());
|
|
664
673
|
}
|
|
665
674
|
static get() {
|
|
666
675
|
return this.getItem().get();
|
|
@@ -668,7 +677,7 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
668
677
|
static set(e) {
|
|
669
678
|
this.getItem().set(e);
|
|
670
679
|
}
|
|
671
|
-
},
|
|
680
|
+
}, we = "__ui:cookie-storage__", O = class {
|
|
672
681
|
static init(e, t, n) {
|
|
673
682
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
674
683
|
}
|
|
@@ -678,19 +687,19 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
678
687
|
static get(e, t) {
|
|
679
688
|
var n, r;
|
|
680
689
|
let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
|
|
681
|
-
return i === void 0 && t !== void 0 ? this.set(e, t) :
|
|
690
|
+
return i === void 0 && t !== void 0 ? this.set(e, t) : T(i);
|
|
682
691
|
}
|
|
683
692
|
static set(e, t, n) {
|
|
684
693
|
let r = m(t);
|
|
685
|
-
if (
|
|
686
|
-
let i =
|
|
694
|
+
if (Ce.get()) return r;
|
|
695
|
+
let i = x(r, !1);
|
|
687
696
|
return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
|
|
688
697
|
}
|
|
689
698
|
static remove(e) {
|
|
690
699
|
this.set(e, "", { age: -1 });
|
|
691
700
|
}
|
|
692
701
|
static update() {
|
|
693
|
-
s() && (
|
|
702
|
+
s() && (E.remove(we), this.initItems());
|
|
694
703
|
}
|
|
695
704
|
static format(e, t, n) {
|
|
696
705
|
return [
|
|
@@ -706,18 +715,18 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
706
715
|
].filter(Boolean).join("; ");
|
|
707
716
|
}
|
|
708
717
|
static hasDom() {
|
|
709
|
-
return s() && !
|
|
718
|
+
return s() && !oe();
|
|
710
719
|
}
|
|
711
720
|
static parse(e) {
|
|
712
721
|
let t = {};
|
|
713
722
|
for (let n of e.split(";")) {
|
|
714
|
-
let [e, r] =
|
|
723
|
+
let [e, r] = se(n.trim(), "=", 2);
|
|
715
724
|
e && l(r) && (t[e] = r);
|
|
716
725
|
}
|
|
717
726
|
return t;
|
|
718
727
|
}
|
|
719
728
|
static initItems() {
|
|
720
|
-
return
|
|
729
|
+
return E.get(we, () => {
|
|
721
730
|
var e;
|
|
722
731
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
723
732
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -746,22 +755,22 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
746
755
|
return e ? "Partitioned" : void 0;
|
|
747
756
|
}
|
|
748
757
|
static toArguments(e) {
|
|
749
|
-
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${
|
|
758
|
+
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${x(t)}`);
|
|
750
759
|
}
|
|
751
760
|
};
|
|
752
|
-
|
|
761
|
+
C(O, "getListener", void 0), C(O, "getListenerRaw", void 0), C(O, "setListener", void 0);
|
|
753
762
|
//#endregion
|
|
754
763
|
//#region src/classes/Cookie.ts
|
|
755
|
-
var
|
|
764
|
+
var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
756
765
|
static getInstance(t) {
|
|
757
766
|
var n, r;
|
|
758
|
-
return (n = (r =
|
|
767
|
+
return (n = (r = Te()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
759
768
|
}
|
|
760
769
|
constructor(e) {
|
|
761
|
-
|
|
762
|
-
let t =
|
|
770
|
+
C(this, "name", void 0), C(this, "value", void 0), C(this, "options", {}), this.name = e;
|
|
771
|
+
let t = Te();
|
|
763
772
|
if (e in t) return t[e];
|
|
764
|
-
this.value =
|
|
773
|
+
this.value = O.get(this.name), t[e] = this;
|
|
765
774
|
}
|
|
766
775
|
get(e, t) {
|
|
767
776
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
@@ -773,11 +782,11 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
773
782
|
this.set("");
|
|
774
783
|
}
|
|
775
784
|
update() {
|
|
776
|
-
|
|
785
|
+
O.set(this.name, this.value, this.options);
|
|
777
786
|
}
|
|
778
|
-
},
|
|
787
|
+
}, De = "ui-geo-code", Oe = "__ui:geo-code__", ke = class {
|
|
779
788
|
constructor() {
|
|
780
|
-
|
|
789
|
+
C(this, "storage", new D(Oe)), C(this, "location", void 0), C(this, "valueDefault", void 0), C(this, "item", void 0), C(this, "language", void 0), C(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
781
790
|
}
|
|
782
791
|
get() {
|
|
783
792
|
return this.item;
|
|
@@ -815,7 +824,7 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
815
824
|
return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[A-Z]{2}/.test(e) && (n = this.getByCountry(this.toCountry(e))), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e)))), this.toFull((t = n) == null ? this.getList()[0] : t, e);
|
|
816
825
|
}
|
|
817
826
|
getByCodeFull(e) {
|
|
818
|
-
return this.getList().find((t) =>
|
|
827
|
+
return this.getList().find((t) => b(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
|
|
819
828
|
}
|
|
820
829
|
getByCountry(e) {
|
|
821
830
|
return this.getList().find((t) => {
|
|
@@ -857,7 +866,7 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
857
866
|
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
858
867
|
}
|
|
859
868
|
getCookie() {
|
|
860
|
-
return
|
|
869
|
+
return Ee.getInstance(De);
|
|
861
870
|
}
|
|
862
871
|
findLocation() {
|
|
863
872
|
return this.getCookie().get() || this.findLocationDom() || m(this.valueDefault) || "en-GB";
|
|
@@ -867,7 +876,14 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
867
876
|
return s() && (this.storage.get() || ((e = document.querySelector("html")) == null ? void 0 : e.lang) || navigator.language || navigator.languages[0] || void 0) || void 0;
|
|
868
877
|
}
|
|
869
878
|
findLanguage(e) {
|
|
870
|
-
|
|
879
|
+
if (e) {
|
|
880
|
+
let t = this.toLanguage(e);
|
|
881
|
+
if (t) {
|
|
882
|
+
let e = this.getByLanguage(t);
|
|
883
|
+
if (e) return e.language;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
return this.item.language;
|
|
871
887
|
}
|
|
872
888
|
toCountry(e) {
|
|
873
889
|
return e.replace(/[^A-Z]+/g, "");
|
|
@@ -886,9 +902,9 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
886
902
|
locationLanguage: n
|
|
887
903
|
};
|
|
888
904
|
}
|
|
889
|
-
},
|
|
905
|
+
}, k = class {
|
|
890
906
|
static getObject() {
|
|
891
|
-
return
|
|
907
|
+
return E.get("__ui:geo-instance__", () => new ke());
|
|
892
908
|
}
|
|
893
909
|
static get() {
|
|
894
910
|
return this.getObject().get();
|
|
@@ -956,14 +972,14 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
956
972
|
};
|
|
957
973
|
//#endregion
|
|
958
974
|
//#region src/functions/isWindow.ts
|
|
959
|
-
function
|
|
975
|
+
function Ae(e) {
|
|
960
976
|
return s() && e === window;
|
|
961
977
|
}
|
|
962
978
|
//#endregion
|
|
963
979
|
//#region src/functions/getElement.ts
|
|
964
|
-
function
|
|
980
|
+
function A(e) {
|
|
965
981
|
if (!s()) return d(e) ? void 0 : e;
|
|
966
|
-
if (
|
|
982
|
+
if (Ae(e)) return document.body;
|
|
967
983
|
if (d(e)) {
|
|
968
984
|
var t;
|
|
969
985
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -972,30 +988,30 @@ function j(e) {
|
|
|
972
988
|
}
|
|
973
989
|
//#endregion
|
|
974
990
|
//#region src/functions/getElementOrWindow.ts
|
|
975
|
-
function
|
|
976
|
-
return
|
|
991
|
+
function je(e) {
|
|
992
|
+
return Ae(e) ? e : A(e);
|
|
977
993
|
}
|
|
978
994
|
//#endregion
|
|
979
995
|
//#region src/functions/isInDom.ts
|
|
980
|
-
function
|
|
996
|
+
function Me(e) {
|
|
981
997
|
var t;
|
|
982
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
998
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = A(e)) != null && t.closest("html"));
|
|
983
999
|
}
|
|
984
1000
|
//#endregion
|
|
985
1001
|
//#region src/functions/toArray.ts
|
|
986
|
-
function
|
|
1002
|
+
function j(e) {
|
|
987
1003
|
return Array.isArray(e) ? e : [e];
|
|
988
1004
|
}
|
|
989
1005
|
//#endregion
|
|
990
1006
|
//#region src/classes/EventItem.ts
|
|
991
|
-
var
|
|
1007
|
+
var Ne = class {
|
|
992
1008
|
constructor(e, n = ["click"], r, i, a) {
|
|
993
|
-
|
|
994
|
-
if (
|
|
1009
|
+
C(this, "listener", void 0), C(this, "options", void 0), C(this, "detail", void 0), C(this, "element", void 0), C(this, "elementControl", void 0), C(this, "elementControlEdit", void 0), C(this, "type", void 0), C(this, "listenerRecent", (e) => {
|
|
1010
|
+
if (Me(this.elementControl)) {
|
|
995
1011
|
var n, r;
|
|
996
1012
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
997
1013
|
} else this.stop();
|
|
998
|
-
}),
|
|
1014
|
+
}), C(this, "activity", !1), C(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = je(e), this.elementControl = A(e), this.type = j(n);
|
|
999
1015
|
}
|
|
1000
1016
|
isActive() {
|
|
1001
1017
|
return this.activity;
|
|
@@ -1004,14 +1020,14 @@ var Me = class {
|
|
|
1004
1020
|
return this.element;
|
|
1005
1021
|
}
|
|
1006
1022
|
setElement(e) {
|
|
1007
|
-
let t =
|
|
1008
|
-
return this.elementControlEdit || (this.elementControl =
|
|
1023
|
+
let t = je(e);
|
|
1024
|
+
return this.elementControlEdit || (this.elementControl = A(e)), this.element = t, this.reset(), this;
|
|
1009
1025
|
}
|
|
1010
1026
|
setElementControl(e) {
|
|
1011
|
-
return this.elementControl =
|
|
1027
|
+
return this.elementControl = A(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = A(this.element)), this;
|
|
1012
1028
|
}
|
|
1013
1029
|
setType(e) {
|
|
1014
|
-
return this.type =
|
|
1030
|
+
return this.type = j(e), this.reset(), this;
|
|
1015
1031
|
}
|
|
1016
1032
|
setListener(e) {
|
|
1017
1033
|
return this.listener = e, this;
|
|
@@ -1080,9 +1096,9 @@ var Me = class {
|
|
|
1080
1096
|
}
|
|
1081
1097
|
return !1;
|
|
1082
1098
|
}
|
|
1083
|
-
},
|
|
1084
|
-
constructor(e =
|
|
1085
|
-
|
|
1099
|
+
}, Pe = "ui-loading", Fe = class {
|
|
1100
|
+
constructor(e = Pe) {
|
|
1101
|
+
C(this, "eventName", void 0), C(this, "value", 0), C(this, "event", void 0), C(this, "registrationList", []), this.eventName = e, s() && (this.event = new Ne(window, this.eventName));
|
|
1086
1102
|
}
|
|
1087
1103
|
is() {
|
|
1088
1104
|
return this.value > 0;
|
|
@@ -1098,7 +1114,7 @@ var Me = class {
|
|
|
1098
1114
|
}
|
|
1099
1115
|
registrationEvent(e, t) {
|
|
1100
1116
|
if (s()) {
|
|
1101
|
-
let n = new
|
|
1117
|
+
let n = new Ne(window, this.eventName, e).setElementControl(t).start();
|
|
1102
1118
|
this.registrationList.push({
|
|
1103
1119
|
item: n,
|
|
1104
1120
|
listener: e,
|
|
@@ -1113,7 +1129,7 @@ var Me = class {
|
|
|
1113
1129
|
var e;
|
|
1114
1130
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1115
1131
|
}
|
|
1116
|
-
},
|
|
1132
|
+
}, M = class {
|
|
1117
1133
|
static is() {
|
|
1118
1134
|
return this.getItem().is();
|
|
1119
1135
|
}
|
|
@@ -1121,7 +1137,7 @@ var Me = class {
|
|
|
1121
1137
|
return this.getItem().get();
|
|
1122
1138
|
}
|
|
1123
1139
|
static getItem() {
|
|
1124
|
-
return
|
|
1140
|
+
return E.get("__ui:loading-instance__", () => new Fe());
|
|
1125
1141
|
}
|
|
1126
1142
|
static show() {
|
|
1127
1143
|
this.getItem().show();
|
|
@@ -1135,7 +1151,7 @@ var Me = class {
|
|
|
1135
1151
|
static unregistrationEvent(e, t) {
|
|
1136
1152
|
this.getItem().unregistrationEvent(e, t);
|
|
1137
1153
|
}
|
|
1138
|
-
},
|
|
1154
|
+
}, Ie, Le = 1440 * 60, N = class {
|
|
1139
1155
|
static init(e, t, n, r) {
|
|
1140
1156
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1141
1157
|
}
|
|
@@ -1145,7 +1161,7 @@ var Me = class {
|
|
|
1145
1161
|
static async get(e) {
|
|
1146
1162
|
let t = await this.getItemOrListener(e);
|
|
1147
1163
|
return this.clearOld().catch((e) => {
|
|
1148
|
-
|
|
1164
|
+
w.on({
|
|
1149
1165
|
group: "api",
|
|
1150
1166
|
code: "cacheClear",
|
|
1151
1167
|
details: e
|
|
@@ -1157,7 +1173,7 @@ var Me = class {
|
|
|
1157
1173
|
let t = this.generateKey(e);
|
|
1158
1174
|
return await this.get(t);
|
|
1159
1175
|
}
|
|
1160
|
-
static async set(e, t, n =
|
|
1176
|
+
static async set(e, t, n = Le) {
|
|
1161
1177
|
let r = {
|
|
1162
1178
|
value: t,
|
|
1163
1179
|
age: n,
|
|
@@ -1220,12 +1236,12 @@ var Me = class {
|
|
|
1220
1236
|
}
|
|
1221
1237
|
}
|
|
1222
1238
|
};
|
|
1223
|
-
|
|
1239
|
+
Ie = N, C(N, "items", void 0), C(N, "getListener", void 0), C(N, "setListener", void 0), C(N, "removeListener", void 0), C(N, "cacheStepAgeClearOld", 16384), C(N, "stepAgeClearOld", Ie.cacheStepAgeClearOld);
|
|
1224
1240
|
//#endregion
|
|
1225
1241
|
//#region src/classes/ApiStatus.ts
|
|
1226
|
-
var
|
|
1242
|
+
var Re = class {
|
|
1227
1243
|
constructor() {
|
|
1228
|
-
|
|
1244
|
+
C(this, "value", void 0);
|
|
1229
1245
|
}
|
|
1230
1246
|
get() {
|
|
1231
1247
|
return this.value;
|
|
@@ -1285,15 +1301,15 @@ var Le = class {
|
|
|
1285
1301
|
setValue(e, t) {
|
|
1286
1302
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1287
1303
|
}
|
|
1288
|
-
},
|
|
1304
|
+
}, ze = [
|
|
1289
1305
|
"success",
|
|
1290
1306
|
"status",
|
|
1291
1307
|
"code",
|
|
1292
1308
|
"message",
|
|
1293
1309
|
"error"
|
|
1294
|
-
],
|
|
1310
|
+
], Be = class {
|
|
1295
1311
|
constructor(e, t, n, r) {
|
|
1296
|
-
|
|
1312
|
+
C(this, "apiFetch", void 0), C(this, "query", void 0), C(this, "end", void 0), C(this, "error", void 0), C(this, "data", void 0), C(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
|
|
1297
1313
|
}
|
|
1298
1314
|
async init() {
|
|
1299
1315
|
return this.data = await this.readData(), this;
|
|
@@ -1323,18 +1339,18 @@ var Le = class {
|
|
|
1323
1339
|
}
|
|
1324
1340
|
initItem(e) {
|
|
1325
1341
|
let t = { ...e.data };
|
|
1326
|
-
return
|
|
1342
|
+
return ze.forEach((r) => {
|
|
1327
1343
|
if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
|
|
1328
1344
|
var i, a, o, s;
|
|
1329
1345
|
t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
|
|
1330
1346
|
}
|
|
1331
1347
|
}), t;
|
|
1332
1348
|
}
|
|
1333
|
-
},
|
|
1349
|
+
}, P = /* @__PURE__ */ function(e) {
|
|
1334
1350
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1335
|
-
}({}),
|
|
1351
|
+
}({}), Ve = class {
|
|
1336
1352
|
constructor() {
|
|
1337
|
-
|
|
1353
|
+
C(this, "value", void 0);
|
|
1338
1354
|
}
|
|
1339
1355
|
is() {
|
|
1340
1356
|
return !!this.value;
|
|
@@ -1361,9 +1377,9 @@ var Le = class {
|
|
|
1361
1377
|
e.has(t) || e.set(t, n);
|
|
1362
1378
|
}), this;
|
|
1363
1379
|
}
|
|
1364
|
-
},
|
|
1380
|
+
}, He = class {
|
|
1365
1381
|
constructor(e, t, n) {
|
|
1366
|
-
|
|
1382
|
+
C(this, "method", void 0), C(this, "response", void 0), C(this, "error", void 0), C(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
|
|
1367
1383
|
}
|
|
1368
1384
|
getMethod() {
|
|
1369
1385
|
return this.method;
|
|
@@ -1385,9 +1401,9 @@ var Le = class {
|
|
|
1385
1401
|
getStatus() {
|
|
1386
1402
|
return this.response.status;
|
|
1387
1403
|
}
|
|
1388
|
-
},
|
|
1404
|
+
}, Ue = class {
|
|
1389
1405
|
constructor() {
|
|
1390
|
-
|
|
1406
|
+
C(this, "storage", []);
|
|
1391
1407
|
}
|
|
1392
1408
|
async find(e, t) {
|
|
1393
1409
|
let n = await this.getBody(t), r = this.getCode(n), i = this.getMessage(n) || t.statusText, a = this.findItem(e, t, r);
|
|
@@ -1404,7 +1420,7 @@ var Le = class {
|
|
|
1404
1420
|
};
|
|
1405
1421
|
}
|
|
1406
1422
|
add(e, t, n) {
|
|
1407
|
-
return
|
|
1423
|
+
return j(e).forEach((e) => {
|
|
1408
1424
|
let r = e.url || t, i = e.method || n;
|
|
1409
1425
|
r && i && this.storage.push({
|
|
1410
1426
|
...e,
|
|
@@ -1439,19 +1455,19 @@ var Le = class {
|
|
|
1439
1455
|
getMessage(e) {
|
|
1440
1456
|
return this.getDataByKey(e, "message");
|
|
1441
1457
|
}
|
|
1442
|
-
},
|
|
1458
|
+
}, We = class {
|
|
1443
1459
|
static getStorage() {
|
|
1444
|
-
return
|
|
1460
|
+
return E.get("__ui:api-error-storage__", () => new Ue());
|
|
1445
1461
|
}
|
|
1446
1462
|
static add(e, t, n) {
|
|
1447
1463
|
this.getStorage().add(e, t, n);
|
|
1448
1464
|
}
|
|
1449
1465
|
static async getItem(e, t) {
|
|
1450
|
-
return new
|
|
1466
|
+
return new He(e, t, await this.getStorage().find(e, t));
|
|
1451
1467
|
}
|
|
1452
|
-
},
|
|
1468
|
+
}, Ge = class {
|
|
1453
1469
|
constructor() {
|
|
1454
|
-
|
|
1470
|
+
C(this, "headers", {});
|
|
1455
1471
|
}
|
|
1456
1472
|
get(e, t = "application/json;charset=UTF-8") {
|
|
1457
1473
|
if (e === null) return;
|
|
@@ -1465,15 +1481,15 @@ var Le = class {
|
|
|
1465
1481
|
set(e) {
|
|
1466
1482
|
return this.headers = e, this;
|
|
1467
1483
|
}
|
|
1468
|
-
},
|
|
1484
|
+
}, Ke = "__ui:api:hydration:id__", qe = class {
|
|
1469
1485
|
constructor() {
|
|
1470
|
-
|
|
1486
|
+
C(this, "list", []);
|
|
1471
1487
|
}
|
|
1472
1488
|
initResponse(e) {
|
|
1473
1489
|
s() && e.add(this.getListByClient());
|
|
1474
1490
|
}
|
|
1475
1491
|
toClient(e, t) {
|
|
1476
|
-
let { path: n, method: r =
|
|
1492
|
+
let { path: n, method: r = P.get, request: i, global: a = r === P.get } = e;
|
|
1477
1493
|
!a || !n || s() || this.list.push({
|
|
1478
1494
|
path: n,
|
|
1479
1495
|
method: r,
|
|
@@ -1482,14 +1498,14 @@ var Le = class {
|
|
|
1482
1498
|
});
|
|
1483
1499
|
}
|
|
1484
1500
|
toString() {
|
|
1485
|
-
return
|
|
1501
|
+
return he(Ke, this.list);
|
|
1486
1502
|
}
|
|
1487
1503
|
getListByClient() {
|
|
1488
|
-
return
|
|
1504
|
+
return ge(Ke, []);
|
|
1489
1505
|
}
|
|
1490
|
-
},
|
|
1506
|
+
}, Je = class {
|
|
1491
1507
|
constructor() {
|
|
1492
|
-
|
|
1508
|
+
C(this, "callback", void 0), C(this, "callbackEnd", void 0), C(this, "loading", !1);
|
|
1493
1509
|
}
|
|
1494
1510
|
async make(e, t) {
|
|
1495
1511
|
if (e && this.callback) return this.go(t);
|
|
@@ -1515,15 +1531,15 @@ var Le = class {
|
|
|
1515
1531
|
};
|
|
1516
1532
|
//#endregion
|
|
1517
1533
|
//#region src/functions/executePromise.ts
|
|
1518
|
-
async function
|
|
1534
|
+
async function Ye(e, ...t) {
|
|
1519
1535
|
let n = m(e, ...t);
|
|
1520
1536
|
return n instanceof Promise ? await n : n;
|
|
1521
1537
|
}
|
|
1522
1538
|
//#endregion
|
|
1523
1539
|
//#region src/classes/ApiResponse.ts
|
|
1524
|
-
var
|
|
1540
|
+
var Xe = "d-response-loading", Ze = class {
|
|
1525
1541
|
constructor(e) {
|
|
1526
|
-
|
|
1542
|
+
C(this, "requestDefault", void 0), C(this, "first", []), C(this, "response", []), C(this, "loading", void 0), C(this, "devMode", !1), this.requestDefault = e;
|
|
1527
1543
|
}
|
|
1528
1544
|
get(e = "", t, n, r) {
|
|
1529
1545
|
return this.response.find((i) => !this.isDisable(i) && this.isPath(i, e) && t === i.method && this.isFirst(i, r) && this.isResponse(i, n) ? (this.isDevMode(r) && console.warn(`Response type: ${i.path}`), this.first.push(i), !0) : !1);
|
|
@@ -1532,7 +1548,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1532
1548
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1533
1549
|
}
|
|
1534
1550
|
add(e) {
|
|
1535
|
-
return this.response.push(...
|
|
1551
|
+
return this.response.push(...j(e)), this;
|
|
1536
1552
|
}
|
|
1537
1553
|
setDevMode(e) {
|
|
1538
1554
|
return this.devMode = e, this;
|
|
@@ -1566,7 +1582,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1566
1582
|
}
|
|
1567
1583
|
readData(e) {
|
|
1568
1584
|
if (!s()) return;
|
|
1569
|
-
let { path: t = "", method: n =
|
|
1585
|
+
let { path: t = "", method: n = P.get, global: r = n === P.get, devMode: i = !1 } = e;
|
|
1570
1586
|
if (r || this.isDevMode(i)) {
|
|
1571
1587
|
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1572
1588
|
if (a) return {
|
|
@@ -1577,9 +1593,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1577
1593
|
}
|
|
1578
1594
|
fetch(e, t) {
|
|
1579
1595
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1580
|
-
|
|
1581
|
-
e != null && e.lag ? (
|
|
1582
|
-
this.stopResponseLoading(), n(t),
|
|
1596
|
+
Ye(p(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1597
|
+
e != null && e.lag ? (M.show(), setTimeout(() => {
|
|
1598
|
+
this.stopResponseLoading(), n(t), M.hide();
|
|
1583
1599
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1584
1600
|
});
|
|
1585
1601
|
});
|
|
@@ -1588,17 +1604,17 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1588
1604
|
return e.response;
|
|
1589
1605
|
}
|
|
1590
1606
|
startResponseLoading() {
|
|
1591
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1607
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Xe);
|
|
1592
1608
|
}
|
|
1593
1609
|
stopResponseLoading() {
|
|
1594
1610
|
s() && (this.loading = setTimeout(() => {
|
|
1595
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1611
|
+
this.loading = void 0, document.body.classList.remove(Xe);
|
|
1596
1612
|
}, 2400));
|
|
1597
1613
|
}
|
|
1598
|
-
},
|
|
1614
|
+
}, Qe = class {
|
|
1599
1615
|
constructor(e = "/api/", t = {}) {
|
|
1600
|
-
|
|
1601
|
-
let { headersClass: n =
|
|
1616
|
+
C(this, "url", void 0), C(this, "headers", void 0), C(this, "requestDefault", void 0), C(this, "status", void 0), C(this, "response", void 0), C(this, "preparation", void 0), C(this, "loading", void 0), C(this, "errorCenter", void 0), C(this, "hydration", void 0), C(this, "timeout", 16e3), C(this, "origin", void 0), C(this, "wrapper", void 0), this.url = e;
|
|
1617
|
+
let { headersClass: n = Ge, requestDefaultClass: r = Ve, statusClass: i = Re, responseClass: a = Ze, preparationClass: o = Je, loadingClass: s = M.getItem(), errorCenterClass: c = w.getItem(), hydrationClass: l = qe, wrapper: u } = t;
|
|
1602
1618
|
this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.wrapper = u, this.hydration.initResponse(this.response);
|
|
1603
1619
|
}
|
|
1604
1620
|
isLocalhost() {
|
|
@@ -1617,14 +1633,14 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1617
1633
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1618
1634
|
}
|
|
1619
1635
|
getUrl(e, t = !0) {
|
|
1620
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1636
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", k.getLocation()).replace("{country}", k.getCountry()).replace("{language}", k.getLanguage());
|
|
1621
1637
|
}
|
|
1622
|
-
getBody(e = {}, t =
|
|
1638
|
+
getBody(e = {}, t = P.get) {
|
|
1623
1639
|
if (e instanceof FormData) return e;
|
|
1624
|
-
if (t !==
|
|
1640
|
+
if (t !== P.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1625
1641
|
}
|
|
1626
|
-
getBodyForGet(e, t = "", n =
|
|
1627
|
-
if (n ===
|
|
1642
|
+
getBodyForGet(e, t = "", n = P.get) {
|
|
1643
|
+
if (n === P.get) {
|
|
1628
1644
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1629
1645
|
if (l(r)) return `${n}${r}`;
|
|
1630
1646
|
}
|
|
@@ -1665,63 +1681,63 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1665
1681
|
get(e) {
|
|
1666
1682
|
return this.request({
|
|
1667
1683
|
...e,
|
|
1668
|
-
method:
|
|
1684
|
+
method: P.get
|
|
1669
1685
|
});
|
|
1670
1686
|
}
|
|
1671
1687
|
post(e) {
|
|
1672
1688
|
return this.request({
|
|
1673
1689
|
...e,
|
|
1674
|
-
method:
|
|
1690
|
+
method: P.post
|
|
1675
1691
|
});
|
|
1676
1692
|
}
|
|
1677
1693
|
put(e) {
|
|
1678
1694
|
return this.request({
|
|
1679
1695
|
...e,
|
|
1680
|
-
method:
|
|
1696
|
+
method: P.put
|
|
1681
1697
|
});
|
|
1682
1698
|
}
|
|
1683
1699
|
patch(e) {
|
|
1684
1700
|
return this.request({
|
|
1685
1701
|
...e,
|
|
1686
|
-
method:
|
|
1702
|
+
method: P.patch
|
|
1687
1703
|
});
|
|
1688
1704
|
}
|
|
1689
1705
|
delete(e) {
|
|
1690
1706
|
return this.request({
|
|
1691
1707
|
...e,
|
|
1692
|
-
method:
|
|
1708
|
+
method: P.delete
|
|
1693
1709
|
});
|
|
1694
1710
|
}
|
|
1695
1711
|
getRetryDelay(e, t) {
|
|
1696
1712
|
return f(t, t + e * t);
|
|
1697
1713
|
}
|
|
1698
1714
|
async fetch(e, t = 0) {
|
|
1699
|
-
let { method: n =
|
|
1715
|
+
let { method: n = P.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, p = this.getUrl(i, r), m = await this.response.emulator(e);
|
|
1700
1716
|
if (m) return m;
|
|
1701
|
-
let
|
|
1702
|
-
if (
|
|
1703
|
-
let
|
|
1717
|
+
let te = await N.getByFetch(e);
|
|
1718
|
+
if (te) return this.hydration.toClient(e, te), te;
|
|
1719
|
+
let h = new Re(), g, _;
|
|
1704
1720
|
o || this.loading.show();
|
|
1705
1721
|
try {
|
|
1706
1722
|
await this.preparation.make(l, e);
|
|
1707
1723
|
let { query: r, timeoutId: i } = await this.makeQuery(e, p);
|
|
1708
1724
|
i && clearTimeout(i);
|
|
1709
1725
|
let m = await this.preparation.makeEnd(u, r, e);
|
|
1710
|
-
if (
|
|
1711
|
-
var
|
|
1712
|
-
d && (
|
|
1726
|
+
if (h.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
|
|
1727
|
+
var ne;
|
|
1728
|
+
d && (_ = await We.getItem(n, r)), this.makeErrorQuery((ne = _) == null ? r : ne);
|
|
1713
1729
|
}
|
|
1714
1730
|
if (m != null && m.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1715
|
-
|
|
1731
|
+
g = new Be(e, r, m, _), await g.init();
|
|
1716
1732
|
} catch (e) {
|
|
1717
|
-
throw a || this.makeError(e),
|
|
1733
|
+
throw a || this.makeError(e), h.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
|
|
1718
1734
|
}
|
|
1719
|
-
|
|
1720
|
-
let
|
|
1721
|
-
return o || this.loading.hide(), this.hydration.toClient(e,
|
|
1735
|
+
h.setLastResponse(g.getData()), this.status.setLastResponse(g.getData());
|
|
1736
|
+
let v = g.getAndStatus(h);
|
|
1737
|
+
return o || this.loading.hide(), this.hydration.toClient(e, v), await N.setByFetch(e, v), v;
|
|
1722
1738
|
}
|
|
1723
1739
|
async makeQuery(e, t) {
|
|
1724
|
-
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i =
|
|
1740
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = P.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r == null ? t : r, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
|
|
1725
1741
|
...s,
|
|
1726
1742
|
method: i,
|
|
1727
1743
|
body: this.getBody(n, i)
|
|
@@ -1815,12 +1831,12 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1815
1831
|
}, n);
|
|
1816
1832
|
}
|
|
1817
1833
|
}
|
|
1818
|
-
},
|
|
1834
|
+
}, F = class {
|
|
1819
1835
|
static isLocalhost() {
|
|
1820
1836
|
return this.getItem().isLocalhost();
|
|
1821
1837
|
}
|
|
1822
1838
|
static getItem() {
|
|
1823
|
-
return
|
|
1839
|
+
return E.get("__ui:api-instance__", () => new Qe());
|
|
1824
1840
|
}
|
|
1825
1841
|
static getStatus() {
|
|
1826
1842
|
return this.getItem().getStatus();
|
|
@@ -1840,10 +1856,10 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1840
1856
|
static getUrl(e, t = !0) {
|
|
1841
1857
|
return this.getItem().getUrl(e, t);
|
|
1842
1858
|
}
|
|
1843
|
-
static getBody(e = {}, t =
|
|
1859
|
+
static getBody(e = {}, t = P.get) {
|
|
1844
1860
|
return this.getItem().getBody(e, t);
|
|
1845
1861
|
}
|
|
1846
|
-
static getBodyForGet(e, t = "", n =
|
|
1862
|
+
static getBodyForGet(e, t = "", n = P.get) {
|
|
1847
1863
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1848
1864
|
}
|
|
1849
1865
|
static setHeaders(e) {
|
|
@@ -1891,16 +1907,16 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1891
1907
|
static delete(e) {
|
|
1892
1908
|
return this.getItem().delete(e);
|
|
1893
1909
|
}
|
|
1894
|
-
},
|
|
1895
|
-
constructor(e, t, n, r =
|
|
1896
|
-
if (
|
|
1910
|
+
}, $e = class {
|
|
1911
|
+
constructor(e, t, n, r = w.getItem()) {
|
|
1912
|
+
if (C(this, "callback", void 0), C(this, "callbackError", void 0), C(this, "channel", void 0), C(this, "update", (e) => {
|
|
1897
1913
|
var t;
|
|
1898
1914
|
return (t = this.callback) == null || t.call(this, e), this;
|
|
1899
|
-
}),
|
|
1915
|
+
}), C(this, "updateError", (e) => {
|
|
1900
1916
|
var t;
|
|
1901
1917
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1902
1918
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1903
|
-
this.channel = new BroadcastChannel(`${
|
|
1919
|
+
this.channel = new BroadcastChannel(`${et()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1904
1920
|
} catch (e) {
|
|
1905
1921
|
r.on({
|
|
1906
1922
|
group: "broadcast",
|
|
@@ -1926,9 +1942,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1926
1942
|
var e;
|
|
1927
1943
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1928
1944
|
}
|
|
1929
|
-
},
|
|
1945
|
+
}, et = () => new D("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), tt = class {
|
|
1930
1946
|
constructor(e) {
|
|
1931
|
-
|
|
1947
|
+
C(this, "callback", void 0), C(this, "cache", void 0), C(this, "cacheOld", void 0), C(this, "comparisons", []), this.callback = e;
|
|
1932
1948
|
}
|
|
1933
1949
|
getCache(e) {
|
|
1934
1950
|
return this.isUpdate(e) && (this.cacheOld = this.cache, this.setCache()), this.cache;
|
|
@@ -1948,9 +1964,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1948
1964
|
isUpdate(e) {
|
|
1949
1965
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1950
1966
|
}
|
|
1951
|
-
},
|
|
1967
|
+
}, nt = class {
|
|
1952
1968
|
constructor() {
|
|
1953
|
-
|
|
1969
|
+
C(this, "cache", {});
|
|
1954
1970
|
}
|
|
1955
1971
|
get(e, t, n) {
|
|
1956
1972
|
return this.getCacheItem(e, t).getCache(n == null ? [] : n);
|
|
@@ -1959,11 +1975,11 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1959
1975
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1960
1976
|
}
|
|
1961
1977
|
getCacheItem(e, t) {
|
|
1962
|
-
return e in this.cache || (this.cache[e] = new
|
|
1978
|
+
return e in this.cache || (this.cache[e] = new tt(t)), this.cache[e];
|
|
1963
1979
|
}
|
|
1964
|
-
},
|
|
1980
|
+
}, rt = class {
|
|
1965
1981
|
static getItem() {
|
|
1966
|
-
return
|
|
1982
|
+
return E.get("__ui:cache-static__", () => new nt());
|
|
1967
1983
|
}
|
|
1968
1984
|
static get(e, t, n) {
|
|
1969
1985
|
return this.getItem().get(e, t, n);
|
|
@@ -1974,41 +1990,41 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1974
1990
|
};
|
|
1975
1991
|
//#endregion
|
|
1976
1992
|
//#region src/functions/toDate.ts
|
|
1977
|
-
function
|
|
1993
|
+
function I(e) {
|
|
1978
1994
|
var t, n, r, i, a, o, s, l;
|
|
1979
1995
|
if (e instanceof Date) return e;
|
|
1980
1996
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1981
1997
|
if (typeof e == "number") return new Date(e);
|
|
1982
|
-
let u = e, d =
|
|
1998
|
+
let u = e, d = k.getTimezoneFormat().trim();
|
|
1983
1999
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1984
2000
|
let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
|
|
1985
2001
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
1986
2002
|
}
|
|
1987
2003
|
//#endregion
|
|
1988
2004
|
//#region src/functions/getColumn.ts
|
|
1989
|
-
function
|
|
2005
|
+
function it(e, t) {
|
|
1990
2006
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1991
2007
|
}
|
|
1992
2008
|
//#endregion
|
|
1993
2009
|
//#region src/classes/GeoIntl.ts
|
|
1994
|
-
var
|
|
1995
|
-
static isItem(e =
|
|
1996
|
-
return this.getLocation(e) in
|
|
2010
|
+
var L = class e {
|
|
2011
|
+
static isItem(e = k.getLocation()) {
|
|
2012
|
+
return this.getLocation(e) in z;
|
|
1997
2013
|
}
|
|
1998
|
-
static getLocation(e =
|
|
1999
|
-
if (e in
|
|
2000
|
-
let t =
|
|
2001
|
-
return
|
|
2014
|
+
static getLocation(e = k.getLocation()) {
|
|
2015
|
+
if (e in R) return R[e];
|
|
2016
|
+
let t = k.find(e);
|
|
2017
|
+
return R[e] = t.standard, t.standard;
|
|
2002
2018
|
}
|
|
2003
|
-
static getInstance(t =
|
|
2019
|
+
static getInstance(t = k.getLocation()) {
|
|
2004
2020
|
let n = this.getLocation(t);
|
|
2005
|
-
return n in
|
|
2021
|
+
return n in z ? z[n] : new e(t);
|
|
2006
2022
|
}
|
|
2007
|
-
constructor(e =
|
|
2008
|
-
|
|
2023
|
+
constructor(e = k.getLocation(), t = w.getItem()) {
|
|
2024
|
+
C(this, "errorCenter", void 0), C(this, "geo", void 0), this.errorCenter = t, this.geo = k.find(e);
|
|
2009
2025
|
let n = this.getLocation();
|
|
2010
|
-
if (n in
|
|
2011
|
-
|
|
2026
|
+
if (n in z) return z[n];
|
|
2027
|
+
R[e] = n, z[n] = this;
|
|
2012
2028
|
}
|
|
2013
2029
|
getLocation() {
|
|
2014
2030
|
return this.geo.standard;
|
|
@@ -2039,7 +2055,7 @@ var R = class e {
|
|
|
2039
2055
|
type: "language",
|
|
2040
2056
|
style: t
|
|
2041
2057
|
};
|
|
2042
|
-
return this.display(
|
|
2058
|
+
return this.display(k.getByCode(e).language, n);
|
|
2043
2059
|
}
|
|
2044
2060
|
countryName(e, t) {
|
|
2045
2061
|
let n = {
|
|
@@ -2069,7 +2085,7 @@ var R = class e {
|
|
|
2069
2085
|
}
|
|
2070
2086
|
number(e, t) {
|
|
2071
2087
|
var n, r;
|
|
2072
|
-
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n,
|
|
2088
|
+
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n, y(e))) || e.toString();
|
|
2073
2089
|
}
|
|
2074
2090
|
decimal() {
|
|
2075
2091
|
var e, t, n;
|
|
@@ -2083,7 +2099,7 @@ var R = class e {
|
|
|
2083
2099
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
2084
2100
|
if (n) {
|
|
2085
2101
|
let t = this.numberObject(r);
|
|
2086
|
-
return t ?
|
|
2102
|
+
return t ? it(t.formatToParts(y(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2087
2103
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
2088
2104
|
else return this.number(typeof e == "number" ? e : i, {
|
|
2089
2105
|
...r,
|
|
@@ -2106,7 +2122,7 @@ var R = class e {
|
|
|
2106
2122
|
return this.number(r, n);
|
|
2107
2123
|
}
|
|
2108
2124
|
sizeFile(e, t = "byte") {
|
|
2109
|
-
let n =
|
|
2125
|
+
let n = y(e);
|
|
2110
2126
|
if (n > 1024 && d(t)) switch (t) {
|
|
2111
2127
|
case "byte": return this.sizeFile(n / 1024, "kilobyte");
|
|
2112
2128
|
case "kilobyte": return this.sizeFile(n / 1024, "megabyte");
|
|
@@ -2123,11 +2139,11 @@ var R = class e {
|
|
|
2123
2139
|
});
|
|
2124
2140
|
}
|
|
2125
2141
|
percentBy100(e, t) {
|
|
2126
|
-
return this.percent(
|
|
2142
|
+
return this.percent(y(e) / 100, t);
|
|
2127
2143
|
}
|
|
2128
2144
|
plural(e, t, n, r) {
|
|
2129
2145
|
var i;
|
|
2130
|
-
let a =
|
|
2146
|
+
let a = y(e), o = t.split("|");
|
|
2131
2147
|
if (o.length > 1) try {
|
|
2132
2148
|
if (typeof Intl < "u") {
|
|
2133
2149
|
var s;
|
|
@@ -2164,18 +2180,18 @@ var R = class e {
|
|
|
2164
2180
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
2165
2181
|
}
|
|
2166
2182
|
date(e, t, n, r) {
|
|
2167
|
-
let i =
|
|
2183
|
+
let i = I(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
2168
2184
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
2169
2185
|
}
|
|
2170
2186
|
relative(e, t, n) {
|
|
2171
|
-
let r =
|
|
2187
|
+
let r = I(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
2172
2188
|
numeric: "auto",
|
|
2173
2189
|
...typeof t == "string" ? { style: t } : t || {}
|
|
2174
2190
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
2175
2191
|
return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
|
|
2176
2192
|
}
|
|
2177
2193
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
2178
|
-
let s =
|
|
2194
|
+
let s = I(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
2179
2195
|
return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
|
|
2180
2196
|
}
|
|
2181
2197
|
relativeByValue(e, t, n) {
|
|
@@ -2184,7 +2200,7 @@ var R = class e {
|
|
|
2184
2200
|
...typeof n == "string" ? { style: n } : n || {}
|
|
2185
2201
|
};
|
|
2186
2202
|
try {
|
|
2187
|
-
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(
|
|
2203
|
+
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(y(e)), t);
|
|
2188
2204
|
} catch (e) {
|
|
2189
2205
|
this.errorCenter.on({
|
|
2190
2206
|
group: "intl",
|
|
@@ -2196,7 +2212,7 @@ var R = class e {
|
|
|
2196
2212
|
}
|
|
2197
2213
|
month(e, t) {
|
|
2198
2214
|
try {
|
|
2199
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2215
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(I(e));
|
|
2200
2216
|
} catch (e) {
|
|
2201
2217
|
this.errorCenter.on({
|
|
2202
2218
|
group: "intl",
|
|
@@ -2230,7 +2246,7 @@ var R = class e {
|
|
|
2230
2246
|
}
|
|
2231
2247
|
weekday(e, t) {
|
|
2232
2248
|
try {
|
|
2233
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2249
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(I(e));
|
|
2234
2250
|
} catch (e) {
|
|
2235
2251
|
this.errorCenter.on({
|
|
2236
2252
|
group: "intl",
|
|
@@ -2332,15 +2348,15 @@ var R = class e {
|
|
|
2332
2348
|
"second"
|
|
2333
2349
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2334
2350
|
}
|
|
2335
|
-
},
|
|
2336
|
-
constructor(e, t = "date", n =
|
|
2337
|
-
|
|
2351
|
+
}, R = {}, z = {}, at = class e {
|
|
2352
|
+
constructor(e, t = "date", n = k.getLocation()) {
|
|
2353
|
+
C(this, "type", void 0), C(this, "code", void 0), C(this, "date", void 0), C(this, "hour24", !1), C(this, "watch", void 0), this.type = t, this.code = n, this.date = I(e), isNaN(this.date.getTime()) && w.on({
|
|
2338
2354
|
group: "intl",
|
|
2339
2355
|
code: "invalid"
|
|
2340
2356
|
});
|
|
2341
2357
|
}
|
|
2342
2358
|
getIntl() {
|
|
2343
|
-
return
|
|
2359
|
+
return L.getInstance(this.code);
|
|
2344
2360
|
}
|
|
2345
2361
|
getDate() {
|
|
2346
2362
|
return this.date;
|
|
@@ -2443,7 +2459,7 @@ var R = class e {
|
|
|
2443
2459
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2444
2460
|
}
|
|
2445
2461
|
setDate(e) {
|
|
2446
|
-
return this.date =
|
|
2462
|
+
return this.date = I(e), this.update(), this;
|
|
2447
2463
|
}
|
|
2448
2464
|
setType(e) {
|
|
2449
2465
|
return this.type = e, this.update(), this;
|
|
@@ -2595,24 +2611,24 @@ var R = class e {
|
|
|
2595
2611
|
};
|
|
2596
2612
|
//#endregion
|
|
2597
2613
|
//#region src/functions/getItemByPath.ts
|
|
2598
|
-
function
|
|
2614
|
+
function B(e, n) {
|
|
2599
2615
|
var r;
|
|
2600
2616
|
if (!l(n, !0)) return;
|
|
2601
|
-
let i =
|
|
2602
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2617
|
+
let i = se(n, ".", 2), a = i[0];
|
|
2618
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? B(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2603
2619
|
}
|
|
2604
2620
|
//#endregion
|
|
2605
2621
|
//#region src/functions/toCamelCase.ts
|
|
2606
|
-
function
|
|
2622
|
+
function ot(e) {
|
|
2607
2623
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
|
|
2608
2624
|
}
|
|
2609
2625
|
//#endregion
|
|
2610
2626
|
//#region src/types/formattersTypes.ts
|
|
2611
|
-
var
|
|
2627
|
+
var V = /* @__PURE__ */ function(e) {
|
|
2612
2628
|
return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
|
|
2613
|
-
}({}),
|
|
2629
|
+
}({}), st = class {
|
|
2614
2630
|
constructor(e, t) {
|
|
2615
|
-
|
|
2631
|
+
C(this, "options", void 0), C(this, "list", void 0), this.options = e, this.list = t;
|
|
2616
2632
|
}
|
|
2617
2633
|
is() {
|
|
2618
2634
|
return !!this.list;
|
|
@@ -2624,7 +2640,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2624
2640
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2625
2641
|
}
|
|
2626
2642
|
getList() {
|
|
2627
|
-
return this.list ?
|
|
2643
|
+
return this.list ? j(this.list) : [];
|
|
2628
2644
|
}
|
|
2629
2645
|
getOptions() {
|
|
2630
2646
|
return this.options;
|
|
@@ -2642,50 +2658,50 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2642
2658
|
getFormatData(e) {
|
|
2643
2659
|
let t = {};
|
|
2644
2660
|
return r(this.options, (n, r) => {
|
|
2645
|
-
let i = `${
|
|
2661
|
+
let i = `${ot(r)}Format`, a = B(e, r);
|
|
2646
2662
|
n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
|
|
2647
2663
|
}), t;
|
|
2648
2664
|
}
|
|
2649
2665
|
transformation(e, t, n, r) {
|
|
2650
|
-
if (l(e) || n ===
|
|
2651
|
-
case
|
|
2652
|
-
case
|
|
2653
|
-
case
|
|
2654
|
-
case
|
|
2655
|
-
case
|
|
2656
|
-
case
|
|
2666
|
+
if (l(e) || n === V.name) switch (n) {
|
|
2667
|
+
case V.currency: return this.formatCurrency(e, t, r);
|
|
2668
|
+
case V.date: return this.formatDate(e, r);
|
|
2669
|
+
case V.name: return this.formatName(t, r);
|
|
2670
|
+
case V.number: return this.formatNumber(e, r);
|
|
2671
|
+
case V.plural: return this.formatPlural(e, r);
|
|
2672
|
+
case V.unit: return this.formatUnit(e, r);
|
|
2657
2673
|
default: return String(e);
|
|
2658
2674
|
}
|
|
2659
2675
|
return "";
|
|
2660
2676
|
}
|
|
2661
2677
|
formatCurrency(e, t, n) {
|
|
2662
2678
|
var r;
|
|
2663
|
-
let i = n != null && n.currencyPropName ?
|
|
2664
|
-
return
|
|
2679
|
+
let i = n != null && n.currencyPropName ? B(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2680
|
+
return L.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2665
2681
|
}
|
|
2666
2682
|
formatDate(e, t) {
|
|
2667
|
-
return
|
|
2683
|
+
return L.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2668
2684
|
}
|
|
2669
2685
|
formatName(e, t) {
|
|
2670
2686
|
var n, r, i;
|
|
2671
|
-
let a =
|
|
2672
|
-
return a && o ?
|
|
2687
|
+
let a = B(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = B(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = B(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2688
|
+
return a && o ? L.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2673
2689
|
}
|
|
2674
2690
|
formatNumber(e, t) {
|
|
2675
|
-
return
|
|
2691
|
+
return L.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2676
2692
|
}
|
|
2677
2693
|
formatPlural(e, t) {
|
|
2678
|
-
return t && t.words ?
|
|
2694
|
+
return t && t.words ? L.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2679
2695
|
}
|
|
2680
2696
|
formatUnit(e, t) {
|
|
2681
|
-
return t && t.unit ?
|
|
2697
|
+
return t && t.unit ? L.getInstance().unit(e, t.unit) : e;
|
|
2682
2698
|
}
|
|
2683
|
-
},
|
|
2684
|
-
constructor(e =
|
|
2685
|
-
|
|
2699
|
+
}, ct = "f", lt = class e {
|
|
2700
|
+
constructor(e = k.getLocation()) {
|
|
2701
|
+
C(this, "code", void 0), this.code = e;
|
|
2686
2702
|
}
|
|
2687
2703
|
get(t = this.getCode()) {
|
|
2688
|
-
let n =
|
|
2704
|
+
let n = k.find(t);
|
|
2689
2705
|
if (n) {
|
|
2690
2706
|
var r;
|
|
2691
2707
|
let t = this.getCountry(n);
|
|
@@ -2711,7 +2727,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2711
2727
|
};
|
|
2712
2728
|
}
|
|
2713
2729
|
getCode() {
|
|
2714
|
-
return this.code ||
|
|
2730
|
+
return this.code || k.getLocation();
|
|
2715
2731
|
}
|
|
2716
2732
|
getFlag(e = this.getCode()) {
|
|
2717
2733
|
var t;
|
|
@@ -2719,14 +2735,14 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2719
2735
|
}
|
|
2720
2736
|
getList(e, t = !0) {
|
|
2721
2737
|
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2722
|
-
return t ? new
|
|
2738
|
+
return t ? new L().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2723
2739
|
}
|
|
2724
2740
|
getListLanguage(e, t = !0) {
|
|
2725
2741
|
let n = [], i = /* @__PURE__ */ new Set();
|
|
2726
2742
|
return r(this.getCodes(e), (e) => {
|
|
2727
2743
|
let t = this.getLanguage(e);
|
|
2728
2744
|
t && !i.has(t.value) && (n.push(t), i.add(t.value));
|
|
2729
|
-
}), t ? new
|
|
2745
|
+
}), t ? new L().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2730
2746
|
}
|
|
2731
2747
|
getNational(t, n = !0) {
|
|
2732
2748
|
let i = r(this.getList(t, !1), (t) => {
|
|
@@ -2738,7 +2754,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2738
2754
|
nationalCountry: n == null ? void 0 : n.country
|
|
2739
2755
|
};
|
|
2740
2756
|
});
|
|
2741
|
-
return n ? new
|
|
2757
|
+
return n ? new L().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2742
2758
|
}
|
|
2743
2759
|
getNationalLanguage(t, n = !0) {
|
|
2744
2760
|
let i = r(this.getListLanguage(t, !1), (t) => {
|
|
@@ -2750,13 +2766,13 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2750
2766
|
nationalCountry: n == null ? void 0 : n.country
|
|
2751
2767
|
};
|
|
2752
2768
|
});
|
|
2753
|
-
return n ? new
|
|
2769
|
+
return n ? new L().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2754
2770
|
}
|
|
2755
2771
|
setCode(e) {
|
|
2756
2772
|
return this.code = e, this;
|
|
2757
2773
|
}
|
|
2758
2774
|
getLocation() {
|
|
2759
|
-
return new
|
|
2775
|
+
return new L(this.code);
|
|
2760
2776
|
}
|
|
2761
2777
|
getCodes(t) {
|
|
2762
2778
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2768,7 +2784,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2768
2784
|
return this.getLocation().countryName(e.country);
|
|
2769
2785
|
}
|
|
2770
2786
|
};
|
|
2771
|
-
|
|
2787
|
+
C(lt, "flags", {
|
|
2772
2788
|
RU: "f-ru",
|
|
2773
2789
|
FR: "f-fr",
|
|
2774
2790
|
GB: "f-gb",
|
|
@@ -3012,7 +3028,7 @@ w(ct, "flags", {
|
|
|
3012
3028
|
});
|
|
3013
3029
|
//#endregion
|
|
3014
3030
|
//#region src/classes/GeoPhone.ts
|
|
3015
|
-
var
|
|
3031
|
+
var ut = class {
|
|
3016
3032
|
static get(e) {
|
|
3017
3033
|
return this.getList().find((t) => e === t.value);
|
|
3018
3034
|
}
|
|
@@ -3068,11 +3084,11 @@ var lt = class {
|
|
|
3068
3084
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3069
3085
|
}
|
|
3070
3086
|
static makeList() {
|
|
3071
|
-
let e = r(
|
|
3087
|
+
let e = r(k.getList(), (e) => {
|
|
3072
3088
|
if (e != null && e.phoneMask) return {
|
|
3073
3089
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3074
3090
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3075
|
-
mask:
|
|
3091
|
+
mask: j(e.phoneMask),
|
|
3076
3092
|
value: e.country
|
|
3077
3093
|
};
|
|
3078
3094
|
});
|
|
@@ -3111,12 +3127,121 @@ var lt = class {
|
|
|
3111
3127
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
3112
3128
|
}
|
|
3113
3129
|
};
|
|
3114
|
-
|
|
3115
|
-
//#endregion
|
|
3116
|
-
//#region src/classes/
|
|
3117
|
-
var
|
|
3130
|
+
C(ut, "list", void 0), C(ut, "map", void 0);
|
|
3131
|
+
//#endregion
|
|
3132
|
+
//#region src/classes/GeoUnit.ts
|
|
3133
|
+
var H = {}, dt = {
|
|
3134
|
+
"millimeter->inch": .03937007874,
|
|
3135
|
+
"centimeter->inch": .3937007874,
|
|
3136
|
+
"meter->foot": 3.280839895,
|
|
3137
|
+
"kilometer->mile": .621371192,
|
|
3138
|
+
"square-meter->square-foot": 10.763910417,
|
|
3139
|
+
"hectare->acre": 2.4710538147,
|
|
3140
|
+
"gram->ounce": .03527396195,
|
|
3141
|
+
"kilogram->pound": 2.2046226218,
|
|
3142
|
+
"tonne->ton": 1.1023113109,
|
|
3143
|
+
"milliliter->fluid-ounce": .0338140227,
|
|
3144
|
+
"liter->gallon": .2641720524,
|
|
3145
|
+
"kilometer-per-hour->mile-per-hour": .621371192
|
|
3146
|
+
}, ft = class e {
|
|
3147
|
+
static getInstance(t = k.getLocation()) {
|
|
3148
|
+
let n = k.find(t).standard;
|
|
3149
|
+
return n in H ? H[n] : new e(t);
|
|
3150
|
+
}
|
|
3151
|
+
constructor(e = k.getLocation()) {
|
|
3152
|
+
C(this, "geo", void 0), this.geo = k.find(e);
|
|
3153
|
+
let t = this.getLocation();
|
|
3154
|
+
if (t in H) return H[t];
|
|
3155
|
+
H[t] = this;
|
|
3156
|
+
}
|
|
3157
|
+
getLocation() {
|
|
3158
|
+
return this.geo.standard;
|
|
3159
|
+
}
|
|
3160
|
+
millimeter(e, t) {
|
|
3161
|
+
return this.formatUnit(e, "millimeter", t);
|
|
3162
|
+
}
|
|
3163
|
+
centimeter(e, t) {
|
|
3164
|
+
return this.formatUnit(e, "centimeter", t);
|
|
3165
|
+
}
|
|
3166
|
+
meter(e, t) {
|
|
3167
|
+
return this.formatUnit(e, "meter", t);
|
|
3168
|
+
}
|
|
3169
|
+
kilometer(e, t) {
|
|
3170
|
+
return this.formatUnit(e, "kilometer", t);
|
|
3171
|
+
}
|
|
3172
|
+
squareMeter(e, t) {
|
|
3173
|
+
return this.formatUnit(e, "square-meter", t);
|
|
3174
|
+
}
|
|
3175
|
+
hectare(e, t) {
|
|
3176
|
+
return this.formatUnit(e, "hectare", t);
|
|
3177
|
+
}
|
|
3178
|
+
gram(e, t) {
|
|
3179
|
+
return this.formatUnit(e, "gram", t);
|
|
3180
|
+
}
|
|
3181
|
+
kilogram(e, t) {
|
|
3182
|
+
return this.formatUnit(e, "kilogram", t);
|
|
3183
|
+
}
|
|
3184
|
+
tonne(e, t) {
|
|
3185
|
+
return this.formatUnit(e, "tonne", t);
|
|
3186
|
+
}
|
|
3187
|
+
milliliter(e, t) {
|
|
3188
|
+
return this.formatUnit(e, "milliliter", t);
|
|
3189
|
+
}
|
|
3190
|
+
liter(e, t) {
|
|
3191
|
+
return this.formatUnit(e, "liter", t);
|
|
3192
|
+
}
|
|
3193
|
+
celsius(e, t) {
|
|
3194
|
+
return this.formatUnit(e, "celsius", t);
|
|
3195
|
+
}
|
|
3196
|
+
kilometerPerHour(e, t) {
|
|
3197
|
+
return this.formatUnit(e, "kilometer-per-hour", t);
|
|
3198
|
+
}
|
|
3199
|
+
format(e, t, n) {
|
|
3200
|
+
switch (t) {
|
|
3201
|
+
case "millimeter": return this.millimeter(e, n);
|
|
3202
|
+
case "centimeter": return this.centimeter(e, n);
|
|
3203
|
+
case "meter": return this.meter(e, n);
|
|
3204
|
+
case "kilometer": return this.kilometer(e, n);
|
|
3205
|
+
case "square-meter": return this.squareMeter(e, n);
|
|
3206
|
+
case "hectare": return this.hectare(e, n);
|
|
3207
|
+
case "gram": return this.gram(e, n);
|
|
3208
|
+
case "kilogram": return this.kilogram(e, n);
|
|
3209
|
+
case "tonne": return this.tonne(e, n);
|
|
3210
|
+
case "milliliter": return this.milliliter(e, n);
|
|
3211
|
+
case "liter": return this.liter(e, n);
|
|
3212
|
+
case "celsius": return this.celsius(e, n);
|
|
3213
|
+
case "kilometer-per-hour": return this.kilometerPerHour(e, n);
|
|
3214
|
+
}
|
|
3215
|
+
return e.toString();
|
|
3216
|
+
}
|
|
3217
|
+
isCelsiusToFahrenheit(e, t) {
|
|
3218
|
+
return e === "celsius" && t === "fahrenheit";
|
|
3219
|
+
}
|
|
3220
|
+
getTargetUnit(e) {
|
|
3221
|
+
var t;
|
|
3222
|
+
return ((t = this.geo.unit) == null ? void 0 : t[e]) || e;
|
|
3223
|
+
}
|
|
3224
|
+
formatUnit(e, t, n) {
|
|
3225
|
+
let r = y(e), i = this.getTargetUnit(t), a = this.convert(r, t, i);
|
|
3226
|
+
return L.getInstance(this.getLocation()).unit(a, {
|
|
3227
|
+
unit: i,
|
|
3228
|
+
...n
|
|
3229
|
+
});
|
|
3230
|
+
}
|
|
3231
|
+
convert(e, t, n) {
|
|
3232
|
+
if (t !== n) {
|
|
3233
|
+
if (this.isCelsiusToFahrenheit(t, n)) return this.celsiusToFahrenheit(e);
|
|
3234
|
+
let r = `${t}->${n}`;
|
|
3235
|
+
if (r in dt) return e * dt[r];
|
|
3236
|
+
}
|
|
3237
|
+
return e;
|
|
3238
|
+
}
|
|
3239
|
+
celsiusToFahrenheit(e) {
|
|
3240
|
+
return e * 1.8 + 32;
|
|
3241
|
+
}
|
|
3242
|
+
}, pt = class {
|
|
3118
3243
|
static getItem() {
|
|
3119
|
-
return
|
|
3244
|
+
return E.get("__ui:global-instance__", () => ({}));
|
|
3120
3245
|
}
|
|
3121
3246
|
static get(e) {
|
|
3122
3247
|
var t;
|
|
@@ -3126,9 +3251,9 @@ var ut = class {
|
|
|
3126
3251
|
let t = this.getItem();
|
|
3127
3252
|
Object.keys(t).length > 0 || Object.assign(t, e);
|
|
3128
3253
|
}
|
|
3129
|
-
},
|
|
3254
|
+
}, mt = class {
|
|
3130
3255
|
constructor() {
|
|
3131
|
-
|
|
3256
|
+
C(this, "data", void 0), C(this, "watch", {}), C(this, "block", !1), C(this, "time", void 0);
|
|
3132
3257
|
}
|
|
3133
3258
|
get(e, t) {
|
|
3134
3259
|
let n = this.getData();
|
|
@@ -3167,7 +3292,7 @@ var ut = class {
|
|
|
3167
3292
|
((r = this.data) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3168
3293
|
}), this;
|
|
3169
3294
|
}
|
|
3170
|
-
},
|
|
3295
|
+
}, ht = class extends mt {
|
|
3171
3296
|
init() {
|
|
3172
3297
|
return this.initData(), s() && addEventListener("hashchange", () => this.reload()), this;
|
|
3173
3298
|
}
|
|
@@ -3175,7 +3300,7 @@ var ut = class {
|
|
|
3175
3300
|
let e = {};
|
|
3176
3301
|
if (s()) {
|
|
3177
3302
|
let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
|
|
3178
|
-
for (let n of t) e[n[1]] =
|
|
3303
|
+
for (let n of t) e[n[1]] = T(n[2]);
|
|
3179
3304
|
}
|
|
3180
3305
|
return e;
|
|
3181
3306
|
}
|
|
@@ -3193,9 +3318,9 @@ var ut = class {
|
|
|
3193
3318
|
}
|
|
3194
3319
|
return this;
|
|
3195
3320
|
}
|
|
3196
|
-
},
|
|
3321
|
+
}, gt = class {
|
|
3197
3322
|
static getItem() {
|
|
3198
|
-
return
|
|
3323
|
+
return E.get("__ui:hash-instance__", () => new ht());
|
|
3199
3324
|
}
|
|
3200
3325
|
static get(e, t) {
|
|
3201
3326
|
return this.getItem().get(e, t);
|
|
@@ -3212,29 +3337,29 @@ var ut = class {
|
|
|
3212
3337
|
static reload() {
|
|
3213
3338
|
this.getItem().reload();
|
|
3214
3339
|
}
|
|
3215
|
-
},
|
|
3340
|
+
}, _t = 320, vt = "--LOAD--", yt = class {
|
|
3216
3341
|
static is(e) {
|
|
3217
3342
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3218
3343
|
}
|
|
3219
3344
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3220
3345
|
let r = this.getRaw(e, t);
|
|
3221
|
-
return typeof r == "string" ? r ===
|
|
3346
|
+
return typeof r == "string" ? r === vt && n > 0 ? (await this.wait(), this.get(e, t, n - _t)) : r : p(r) ? await r() : await r;
|
|
3222
3347
|
}
|
|
3223
3348
|
static getAsync(e, t = "") {
|
|
3224
3349
|
let n = this.getRaw(e, t);
|
|
3225
|
-
return typeof n == "string" && n !==
|
|
3350
|
+
return typeof n == "string" && n !== vt ? n : "";
|
|
3226
3351
|
}
|
|
3227
3352
|
static getNameList() {
|
|
3228
3353
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
3229
3354
|
}
|
|
3230
3355
|
static getUrlGlobal() {
|
|
3231
|
-
return `${
|
|
3356
|
+
return `${F.isLocalhost(), ""}${this.url}`;
|
|
3232
3357
|
}
|
|
3233
3358
|
static add(e, t) {
|
|
3234
3359
|
this.icons[this.getName(e)] = t;
|
|
3235
3360
|
}
|
|
3236
3361
|
static addLoad(e) {
|
|
3237
|
-
this.icons[this.getName(e)] =
|
|
3362
|
+
this.icons[this.getName(e)] = vt;
|
|
3238
3363
|
}
|
|
3239
3364
|
static addGlobal(e, t) {
|
|
3240
3365
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3256,22 +3381,22 @@ var ut = class {
|
|
|
3256
3381
|
return (n = (r = (i = this.icons) == null ? void 0 : i[this.getName(e)]) == null ? (a = this.icons) == null ? void 0 : a[e] : r) == null ? `${e.replace(/^@/, t || this.url)}.svg` : n;
|
|
3257
3382
|
}
|
|
3258
3383
|
static wait() {
|
|
3259
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3384
|
+
return new Promise((e) => setTimeout(() => e(), _t));
|
|
3260
3385
|
}
|
|
3261
3386
|
};
|
|
3262
|
-
|
|
3387
|
+
C(yt, "icons", {}), C(yt, "url", "/icons/");
|
|
3263
3388
|
//#endregion
|
|
3264
3389
|
//#region src/functions/getElementItem.ts
|
|
3265
|
-
function
|
|
3390
|
+
function bt(e, t, n) {
|
|
3266
3391
|
var r, i;
|
|
3267
|
-
return (r = (i =
|
|
3392
|
+
return (r = (i = A(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3268
3393
|
}
|
|
3269
3394
|
//#endregion
|
|
3270
3395
|
//#region src/functions/setElementItem.ts
|
|
3271
|
-
function
|
|
3272
|
-
let a =
|
|
3396
|
+
function xt(e, n, i) {
|
|
3397
|
+
let a = A(e);
|
|
3273
3398
|
if (a) {
|
|
3274
|
-
let e =
|
|
3399
|
+
let e = bt(a, n);
|
|
3275
3400
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3276
3401
|
e[n] = m(t);
|
|
3277
3402
|
});
|
|
@@ -3288,12 +3413,12 @@ function U(e, t = "div", i, a) {
|
|
|
3288
3413
|
if (!s()) return;
|
|
3289
3414
|
let o = document.createElement(t);
|
|
3290
3415
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3291
|
-
|
|
3416
|
+
xt(o, t, e);
|
|
3292
3417
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3293
3418
|
}
|
|
3294
3419
|
//#endregion
|
|
3295
3420
|
//#region src/functions/encodeAttribute.ts
|
|
3296
|
-
var
|
|
3421
|
+
var St = {
|
|
3297
3422
|
"&": "&",
|
|
3298
3423
|
"<": "<",
|
|
3299
3424
|
">": ">",
|
|
@@ -3303,14 +3428,14 @@ var yt = {
|
|
|
3303
3428
|
function W(e) {
|
|
3304
3429
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3305
3430
|
var t;
|
|
3306
|
-
return (t =
|
|
3431
|
+
return (t = St == null ? void 0 : St[e]) == null ? e : t;
|
|
3307
3432
|
});
|
|
3308
3433
|
}
|
|
3309
3434
|
//#endregion
|
|
3310
3435
|
//#region src/classes/MetaManager.ts
|
|
3311
3436
|
var G = class {
|
|
3312
3437
|
constructor(e, t = !1) {
|
|
3313
|
-
|
|
3438
|
+
C(this, "listMeta", void 0), C(this, "isProperty", void 0), C(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3314
3439
|
}
|
|
3315
3440
|
getListMeta() {
|
|
3316
3441
|
return this.listMeta;
|
|
@@ -3360,7 +3485,7 @@ var G = class {
|
|
|
3360
3485
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3361
3486
|
}
|
|
3362
3487
|
toHtmlTitle(e) {
|
|
3363
|
-
return
|
|
3488
|
+
return me(e);
|
|
3364
3489
|
}
|
|
3365
3490
|
update() {
|
|
3366
3491
|
return this.listMeta.forEach((e) => {
|
|
@@ -3370,25 +3495,25 @@ var G = class {
|
|
|
3370
3495
|
}
|
|
3371
3496
|
}, K = /* @__PURE__ */ function(e) {
|
|
3372
3497
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3373
|
-
}({}),
|
|
3498
|
+
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3374
3499
|
return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
|
|
3375
3500
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
3376
3501
|
return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
|
|
3377
|
-
}({}),
|
|
3502
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3378
3503
|
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3379
|
-
}({}),
|
|
3504
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3380
3505
|
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3381
|
-
}({}),
|
|
3506
|
+
}({}), Et = /* @__PURE__ */ function(e) {
|
|
3382
3507
|
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3383
|
-
}({}),
|
|
3508
|
+
}({}), Dt = /* @__PURE__ */ function(e) {
|
|
3384
3509
|
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3385
|
-
}({}),
|
|
3510
|
+
}({}), Ot = /* @__PURE__ */ function(e) {
|
|
3386
3511
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3387
3512
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
3388
3513
|
return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
|
|
3389
|
-
}({}),
|
|
3514
|
+
}({}), kt = /* @__PURE__ */ function(e) {
|
|
3390
3515
|
return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
|
|
3391
|
-
}({}),
|
|
3516
|
+
}({}), At = class extends G {
|
|
3392
3517
|
constructor() {
|
|
3393
3518
|
super(Object.values(q), !0);
|
|
3394
3519
|
}
|
|
@@ -3434,7 +3559,7 @@ var G = class {
|
|
|
3434
3559
|
setSiteName(e) {
|
|
3435
3560
|
return this.set(q.siteName, e);
|
|
3436
3561
|
}
|
|
3437
|
-
},
|
|
3562
|
+
}, jt = class extends G {
|
|
3438
3563
|
constructor() {
|
|
3439
3564
|
super(Object.values(J));
|
|
3440
3565
|
}
|
|
@@ -3480,9 +3605,9 @@ var G = class {
|
|
|
3480
3605
|
setImage(e) {
|
|
3481
3606
|
return this.set(J.image, e), this;
|
|
3482
3607
|
}
|
|
3483
|
-
},
|
|
3608
|
+
}, Mt = class extends G {
|
|
3484
3609
|
constructor() {
|
|
3485
|
-
super(Object.values(K)),
|
|
3610
|
+
super(Object.values(K)), C(this, "suffix", void 0), C(this, "og", void 0), C(this, "twitter", void 0), this.og = new At(), this.twitter = new jt();
|
|
3486
3611
|
}
|
|
3487
3612
|
getOg() {
|
|
3488
3613
|
return this.og;
|
|
@@ -3523,7 +3648,7 @@ var G = class {
|
|
|
3523
3648
|
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3524
3649
|
}
|
|
3525
3650
|
setKeywords(e) {
|
|
3526
|
-
return this.set(K.keywords,
|
|
3651
|
+
return this.set(K.keywords, j(e).join(", ")), this;
|
|
3527
3652
|
}
|
|
3528
3653
|
setDescription(e) {
|
|
3529
3654
|
return this.set(K.description, e), this;
|
|
@@ -3558,9 +3683,9 @@ var G = class {
|
|
|
3558
3683
|
getSuffix() {
|
|
3559
3684
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3560
3685
|
}
|
|
3561
|
-
},
|
|
3686
|
+
}, Nt = class {
|
|
3562
3687
|
static getItem() {
|
|
3563
|
-
return
|
|
3688
|
+
return E.get("__ui:meta-instance__", () => new Mt());
|
|
3564
3689
|
}
|
|
3565
3690
|
static getOg() {
|
|
3566
3691
|
return this.getItem().getOg();
|
|
@@ -3633,10 +3758,10 @@ var G = class {
|
|
|
3633
3758
|
}
|
|
3634
3759
|
}, Y = class e {
|
|
3635
3760
|
static getInstance() {
|
|
3636
|
-
return
|
|
3761
|
+
return E.get("__ui:url-item__", () => new e());
|
|
3637
3762
|
}
|
|
3638
3763
|
constructor(e) {
|
|
3639
|
-
|
|
3764
|
+
C(this, "url", void 0), this.set(e);
|
|
3640
3765
|
}
|
|
3641
3766
|
get href() {
|
|
3642
3767
|
return this.url.href;
|
|
@@ -3684,7 +3809,7 @@ var G = class {
|
|
|
3684
3809
|
getParams() {
|
|
3685
3810
|
let e = {};
|
|
3686
3811
|
return this.url.searchParams.forEach((t, n) => {
|
|
3687
|
-
e[n] =
|
|
3812
|
+
e[n] = T(t);
|
|
3688
3813
|
}), e;
|
|
3689
3814
|
}
|
|
3690
3815
|
set(e) {
|
|
@@ -3707,7 +3832,7 @@ var G = class {
|
|
|
3707
3832
|
toJSON() {
|
|
3708
3833
|
return this.url.toJSON();
|
|
3709
3834
|
}
|
|
3710
|
-
},
|
|
3835
|
+
}, Pt = class extends mt {
|
|
3711
3836
|
init() {
|
|
3712
3837
|
return s() && addEventListener("popstate", () => {
|
|
3713
3838
|
Y.getInstance().set(), this.reload();
|
|
@@ -3731,9 +3856,9 @@ var G = class {
|
|
|
3731
3856
|
}
|
|
3732
3857
|
return this;
|
|
3733
3858
|
}
|
|
3734
|
-
},
|
|
3859
|
+
}, Ft = class {
|
|
3735
3860
|
static getItem() {
|
|
3736
|
-
return
|
|
3861
|
+
return E.get("__ui:query-instance__", () => new Pt());
|
|
3737
3862
|
}
|
|
3738
3863
|
static get(e, t) {
|
|
3739
3864
|
return this.getItem().get(e, t);
|
|
@@ -3750,9 +3875,9 @@ var G = class {
|
|
|
3750
3875
|
static reload() {
|
|
3751
3876
|
this.getItem().reload();
|
|
3752
3877
|
}
|
|
3753
|
-
},
|
|
3878
|
+
}, It = class {
|
|
3754
3879
|
constructor(e, t = 320, n = !1) {
|
|
3755
|
-
|
|
3880
|
+
C(this, "callback", void 0), C(this, "delay", void 0), C(this, "timerId", void 0), C(this, "startTime", void 0), C(this, "remaining", void 0), C(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
|
|
3756
3881
|
}
|
|
3757
3882
|
resume() {
|
|
3758
3883
|
if (this.timerId || this.completed) return this;
|
|
@@ -3788,7 +3913,7 @@ var G = class {
|
|
|
3788
3913
|
stop() {
|
|
3789
3914
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3790
3915
|
}
|
|
3791
|
-
},
|
|
3916
|
+
}, Lt = class {
|
|
3792
3917
|
static async is() {
|
|
3793
3918
|
let e = await this.get();
|
|
3794
3919
|
return e !== -1 && e <= 8;
|
|
@@ -3804,7 +3929,7 @@ var G = class {
|
|
|
3804
3929
|
return t;
|
|
3805
3930
|
}
|
|
3806
3931
|
static getStorage() {
|
|
3807
|
-
return new
|
|
3932
|
+
return new D("__ui:scrollbar__", !0);
|
|
3808
3933
|
}
|
|
3809
3934
|
static getCalculate() {
|
|
3810
3935
|
return this.calculate;
|
|
@@ -3826,7 +3951,7 @@ var G = class {
|
|
|
3826
3951
|
});
|
|
3827
3952
|
}
|
|
3828
3953
|
};
|
|
3829
|
-
|
|
3954
|
+
C(Lt, "calculate", !1);
|
|
3830
3955
|
//#endregion
|
|
3831
3956
|
//#region src/functions/escapeExp.ts
|
|
3832
3957
|
function X(e) {
|
|
@@ -3834,7 +3959,7 @@ function X(e) {
|
|
|
3834
3959
|
}
|
|
3835
3960
|
//#endregion
|
|
3836
3961
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3837
|
-
function
|
|
3962
|
+
function Rt(e, t = 128) {
|
|
3838
3963
|
if (e instanceof RegExp) return e;
|
|
3839
3964
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3840
3965
|
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(X).join("|");
|
|
@@ -3842,20 +3967,20 @@ function Ft(e, t = 128) {
|
|
|
3842
3967
|
}
|
|
3843
3968
|
//#endregion
|
|
3844
3969
|
//#region src/functions/addTagHighlightMatch.ts
|
|
3845
|
-
var
|
|
3846
|
-
function
|
|
3970
|
+
var zt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Bt = `___HIGHLIGHT_END_${f(1e5, 999999)}___`, Vt = RegExp(`${zt}|${Bt}`, "g");
|
|
3971
|
+
function Ht(e, t, n = "sys-highlight-match", r = !1) {
|
|
3847
3972
|
let i = a(e);
|
|
3848
3973
|
if (l(i) && l(t)) {
|
|
3849
|
-
let e = i.replace(
|
|
3850
|
-
return r && (e = W(e)), e.replace(
|
|
3974
|
+
let e = i.replace(Rt(t), `${zt}$1${Bt}`);
|
|
3975
|
+
return r && (e = W(e)), e.replace(Vt, (e) => e === zt ? `<span class="${n}">` : "</span>");
|
|
3851
3976
|
}
|
|
3852
3977
|
return r ? W(i) : i;
|
|
3853
3978
|
}
|
|
3854
3979
|
//#endregion
|
|
3855
3980
|
//#region src/classes/SearchListData.ts
|
|
3856
|
-
var
|
|
3981
|
+
var Ut = class {
|
|
3857
3982
|
constructor(e, t, n, r) {
|
|
3858
|
-
|
|
3983
|
+
C(this, "list", void 0), C(this, "columns", void 0), C(this, "item", void 0), C(this, "options", void 0), C(this, "listCache", void 0), this.list = e, this.columns = t, this.item = n, this.options = r;
|
|
3859
3984
|
}
|
|
3860
3985
|
is() {
|
|
3861
3986
|
return !!(this.list && this.columns);
|
|
@@ -3892,8 +4017,8 @@ var Bt = class {
|
|
|
3892
4017
|
toFormatItem(e, t) {
|
|
3893
4018
|
let n = {};
|
|
3894
4019
|
return this.columns && this.columns.forEach((r) => {
|
|
3895
|
-
let i = this.getColumnName(r), a =
|
|
3896
|
-
n[i] = l(a) && t ? this.addTag(a) :
|
|
4020
|
+
let i = this.getColumnName(r), a = B(e, r);
|
|
4021
|
+
n[i] = l(a) && t ? this.addTag(a) : x(a);
|
|
3897
4022
|
}), {
|
|
3898
4023
|
...e,
|
|
3899
4024
|
...n,
|
|
@@ -3904,7 +4029,7 @@ var Bt = class {
|
|
|
3904
4029
|
return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
|
|
3905
4030
|
}
|
|
3906
4031
|
addTag(e) {
|
|
3907
|
-
return
|
|
4032
|
+
return Ht(x(e), this.item.get(), this.options.getClassName());
|
|
3908
4033
|
}
|
|
3909
4034
|
generateCache() {
|
|
3910
4035
|
if (!this.isList()) return [];
|
|
@@ -3912,8 +4037,8 @@ var Bt = class {
|
|
|
3912
4037
|
for (let t of this.list) {
|
|
3913
4038
|
let n = "";
|
|
3914
4039
|
if (this.columns) for (let e of this.columns) {
|
|
3915
|
-
let r =
|
|
3916
|
-
l(r) && (n += ` ${
|
|
4040
|
+
let r = B(t, e);
|
|
4041
|
+
l(r) && (n += ` ${x(r)}`);
|
|
3917
4042
|
}
|
|
3918
4043
|
e.push({
|
|
3919
4044
|
item: t,
|
|
@@ -3928,9 +4053,9 @@ var Bt = class {
|
|
|
3928
4053
|
resetCache() {
|
|
3929
4054
|
this.listCache = void 0;
|
|
3930
4055
|
}
|
|
3931
|
-
},
|
|
4056
|
+
}, Wt = class {
|
|
3932
4057
|
constructor(e, t) {
|
|
3933
|
-
|
|
4058
|
+
C(this, "value", void 0), C(this, "options", void 0), this.value = e, this.options = t;
|
|
3934
4059
|
}
|
|
3935
4060
|
is() {
|
|
3936
4061
|
return !!this.value;
|
|
@@ -3948,18 +4073,18 @@ var Bt = class {
|
|
|
3948
4073
|
};
|
|
3949
4074
|
//#endregion
|
|
3950
4075
|
//#region src/functions/getExp.ts
|
|
3951
|
-
function
|
|
4076
|
+
function Gt(e, t = "ig", n = ":value") {
|
|
3952
4077
|
let r = X(e);
|
|
3953
4078
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3954
4079
|
}
|
|
3955
4080
|
//#endregion
|
|
3956
4081
|
//#region src/functions/getExactSearchExp.ts
|
|
3957
|
-
function
|
|
3958
|
-
return
|
|
4082
|
+
function Kt(e) {
|
|
4083
|
+
return Gt(e, "i", "(:value)");
|
|
3959
4084
|
}
|
|
3960
4085
|
//#endregion
|
|
3961
4086
|
//#region src/functions/getSearchExp.ts
|
|
3962
|
-
function
|
|
4087
|
+
function qt(e, t = 128) {
|
|
3963
4088
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3964
4089
|
let n = [];
|
|
3965
4090
|
return a(e).split(" ").forEach((e) => {
|
|
@@ -3969,9 +4094,9 @@ function Wt(e, t = 128) {
|
|
|
3969
4094
|
}
|
|
3970
4095
|
//#endregion
|
|
3971
4096
|
//#region src/classes/SearchListMatcher.ts
|
|
3972
|
-
var
|
|
4097
|
+
var Jt = class {
|
|
3973
4098
|
constructor(e, t) {
|
|
3974
|
-
|
|
4099
|
+
C(this, "item", void 0), C(this, "options", void 0), C(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
|
|
3975
4100
|
}
|
|
3976
4101
|
is() {
|
|
3977
4102
|
return !!this.matcher;
|
|
@@ -3986,11 +4111,11 @@ var Gt = class {
|
|
|
3986
4111
|
this.initMatcher();
|
|
3987
4112
|
}
|
|
3988
4113
|
initMatcher() {
|
|
3989
|
-
this.item.is() ? this.matcher = this.options.getFindExactMatch() ?
|
|
4114
|
+
this.item.is() ? this.matcher = this.options.getFindExactMatch() ? Kt(this.item.get()) : qt(this.item.get()) : this.matcher = void 0;
|
|
3990
4115
|
}
|
|
3991
|
-
},
|
|
4116
|
+
}, Yt = class {
|
|
3992
4117
|
constructor(e) {
|
|
3993
|
-
|
|
4118
|
+
C(this, "options", void 0), this.options = e;
|
|
3994
4119
|
}
|
|
3995
4120
|
getOptions() {
|
|
3996
4121
|
return this.options || {};
|
|
@@ -4018,12 +4143,12 @@ var Gt = class {
|
|
|
4018
4143
|
setOptions(e) {
|
|
4019
4144
|
return this.options = e, this;
|
|
4020
4145
|
}
|
|
4021
|
-
},
|
|
4146
|
+
}, Xt = class {
|
|
4022
4147
|
constructor(e, t, n, r) {
|
|
4023
|
-
|
|
4148
|
+
C(this, "options", void 0), C(this, "item", void 0), C(this, "matcher", void 0), C(this, "data", void 0), C(this, "callbackToSelection", (e, t) => {
|
|
4024
4149
|
if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
|
|
4025
4150
|
if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
|
|
4026
|
-
}),
|
|
4151
|
+
}), C(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Yt(r), this.item = new Wt(n, this.options), this.matcher = new Jt(this.item, this.options), this.data = new Ut(e, t, this.item, this.options);
|
|
4027
4152
|
}
|
|
4028
4153
|
getData() {
|
|
4029
4154
|
return this.data;
|
|
@@ -4060,13 +4185,13 @@ var Gt = class {
|
|
|
4060
4185
|
let e = this.data.getList();
|
|
4061
4186
|
return e ? r(e, this.callbackToNone) : [];
|
|
4062
4187
|
}
|
|
4063
|
-
},
|
|
4188
|
+
}, Zt = () => E.get("__ui:storage-callback__", () => ({})), Qt = class e {
|
|
4064
4189
|
static getInstance(t, n = "main") {
|
|
4065
4190
|
return new e(t, n);
|
|
4066
4191
|
}
|
|
4067
4192
|
constructor(e, t = "main") {
|
|
4068
|
-
|
|
4069
|
-
let n = `${t}:${e}`, r =
|
|
4193
|
+
C(this, "name", void 0), C(this, "group", void 0), C(this, "callbacks", []), C(this, "loading", !1), this.name = e, this.group = t;
|
|
4194
|
+
let n = `${t}:${e}`, r = Zt();
|
|
4070
4195
|
if (n in r) return r[n];
|
|
4071
4196
|
r[n] = this;
|
|
4072
4197
|
}
|
|
@@ -4093,10 +4218,10 @@ var Gt = class {
|
|
|
4093
4218
|
}
|
|
4094
4219
|
async run(e) {
|
|
4095
4220
|
this.loading = !1;
|
|
4096
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
4221
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Ye(t, e), n && this.removeCallback(t);
|
|
4097
4222
|
return this;
|
|
4098
4223
|
}
|
|
4099
|
-
},
|
|
4224
|
+
}, $t = [
|
|
4100
4225
|
"d",
|
|
4101
4226
|
"e",
|
|
4102
4227
|
"f",
|
|
@@ -4116,10 +4241,10 @@ var Gt = class {
|
|
|
4116
4241
|
"t",
|
|
4117
4242
|
"u",
|
|
4118
4243
|
"v"
|
|
4119
|
-
],
|
|
4244
|
+
], en = RegExp(`%(${$t.join("|")})`, "g"), tn = (e, t = {}) => {
|
|
4120
4245
|
let r = String(e);
|
|
4121
|
-
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(
|
|
4122
|
-
let r =
|
|
4246
|
+
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(en, (e, n) => {
|
|
4247
|
+
let r = $t.indexOf(n);
|
|
4123
4248
|
if (r !== -1) {
|
|
4124
4249
|
var i;
|
|
4125
4250
|
return String((i = t == null ? void 0 : t[r]) == null ? "" : i);
|
|
@@ -4138,12 +4263,12 @@ var Gt = class {
|
|
|
4138
4263
|
}
|
|
4139
4264
|
return e;
|
|
4140
4265
|
})), r;
|
|
4141
|
-
},
|
|
4266
|
+
}, nn = (e) => {
|
|
4142
4267
|
var t;
|
|
4143
|
-
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(
|
|
4144
|
-
},
|
|
4145
|
-
constructor(e, t = () =>
|
|
4146
|
-
|
|
4268
|
+
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(F.getStatus().getStatus()))));
|
|
4269
|
+
}, rn = "global", an = 160, on = class {
|
|
4270
|
+
constructor(e, t = () => k.getLanguage(), n = () => k.getLocation()) {
|
|
4271
|
+
C(this, "language", void 0), C(this, "location", void 0), C(this, "files", {}), C(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
4147
4272
|
}
|
|
4148
4273
|
isFile() {
|
|
4149
4274
|
return Object.keys(this.files).length > 0 && this.getIndex() !== void 0;
|
|
@@ -4171,7 +4296,7 @@ var Gt = class {
|
|
|
4171
4296
|
if (e in this.files) return e;
|
|
4172
4297
|
let t = this.getLanguage();
|
|
4173
4298
|
if (t in this.files) return t;
|
|
4174
|
-
if ("global" in this.files) return
|
|
4299
|
+
if ("global" in this.files) return rn;
|
|
4175
4300
|
}
|
|
4176
4301
|
getByData(e) {
|
|
4177
4302
|
if (e in this.data) return this.data[e];
|
|
@@ -4182,14 +4307,14 @@ var Gt = class {
|
|
|
4182
4307
|
return t && (this.data[e] = t), t;
|
|
4183
4308
|
}
|
|
4184
4309
|
}
|
|
4185
|
-
},
|
|
4186
|
-
constructor(e = "/api/translate", t = "list", n = new
|
|
4187
|
-
|
|
4310
|
+
}, sn = class {
|
|
4311
|
+
constructor(e = "/api/translate", t = "list", n = new on()) {
|
|
4312
|
+
C(this, "url", void 0), C(this, "propsName", void 0), C(this, "files", void 0), C(this, "data", {}), C(this, "cache", []), C(this, "resolveList", []), C(this, "timeout", void 0), C(this, "isReadApi", !0), this.url = e, this.propsName = t, this.files = n;
|
|
4188
4313
|
}
|
|
4189
4314
|
async get(e, t) {
|
|
4190
4315
|
var n;
|
|
4191
4316
|
let r = this.getText(e);
|
|
4192
|
-
return r ? this.replacement(r, t) : (
|
|
4317
|
+
return r ? this.replacement(r, t) : (F.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
4193
4318
|
}
|
|
4194
4319
|
getSync(e, t = !1, n) {
|
|
4195
4320
|
let r = this.getText(e);
|
|
@@ -4230,7 +4355,7 @@ var Gt = class {
|
|
|
4230
4355
|
});
|
|
4231
4356
|
}
|
|
4232
4357
|
async addNormalOrSync(e) {
|
|
4233
|
-
if (l(e)) if (
|
|
4358
|
+
if (l(e)) if (F.isLocalhost()) this.addSync(e);
|
|
4234
4359
|
else {
|
|
4235
4360
|
let t = Object.keys(e);
|
|
4236
4361
|
t.length > 0 && await this.add(t);
|
|
@@ -4272,16 +4397,16 @@ var Gt = class {
|
|
|
4272
4397
|
return `${this.files.getLanguage()}-${e}`;
|
|
4273
4398
|
}
|
|
4274
4399
|
getNameByGlobal(e) {
|
|
4275
|
-
return `${
|
|
4400
|
+
return `${rn}-${e}`;
|
|
4276
4401
|
}
|
|
4277
4402
|
getNamesNone(e) {
|
|
4278
4403
|
let t = [];
|
|
4279
|
-
return
|
|
4404
|
+
return j(e).forEach((e) => {
|
|
4280
4405
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4281
4406
|
}), t;
|
|
4282
4407
|
}
|
|
4283
4408
|
async getResponse() {
|
|
4284
|
-
let e = await
|
|
4409
|
+
let e = await F.get({
|
|
4285
4410
|
api: !1,
|
|
4286
4411
|
path: this.url,
|
|
4287
4412
|
request: { [this.propsName]: this.cache },
|
|
@@ -4289,14 +4414,14 @@ var Gt = class {
|
|
|
4289
4414
|
timeout: 12e3,
|
|
4290
4415
|
global: !0
|
|
4291
4416
|
});
|
|
4292
|
-
return
|
|
4417
|
+
return nn(e) || w.on({
|
|
4293
4418
|
group: "translate",
|
|
4294
4419
|
code: "error",
|
|
4295
4420
|
details: e
|
|
4296
4421
|
}), e == null ? {} : e;
|
|
4297
4422
|
}
|
|
4298
4423
|
replacement(e, t) {
|
|
4299
|
-
return t ?
|
|
4424
|
+
return t ? tn(e, t) : e;
|
|
4300
4425
|
}
|
|
4301
4426
|
async make() {
|
|
4302
4427
|
let e;
|
|
@@ -4308,12 +4433,12 @@ var Gt = class {
|
|
|
4308
4433
|
this.data[this.getName(t)] = (n = e == null ? void 0 : e[t]) == null ? "" : n;
|
|
4309
4434
|
}), this.cache = [];
|
|
4310
4435
|
}
|
|
4311
|
-
},
|
|
4436
|
+
}, cn = class {
|
|
4312
4437
|
static async get(e, t) {
|
|
4313
4438
|
return this.getItem().get(e, t);
|
|
4314
4439
|
}
|
|
4315
4440
|
static getItem() {
|
|
4316
|
-
return this.item || (this.item = new
|
|
4441
|
+
return this.item || (this.item = new sn()), this.item;
|
|
4317
4442
|
}
|
|
4318
4443
|
static getSync(e, t = !1, n) {
|
|
4319
4444
|
return this.getItem().getSync(e, t, n);
|
|
@@ -4352,18 +4477,18 @@ var Gt = class {
|
|
|
4352
4477
|
e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
|
|
4353
4478
|
}
|
|
4354
4479
|
};
|
|
4355
|
-
|
|
4480
|
+
C(cn, "item", void 0);
|
|
4356
4481
|
//#endregion
|
|
4357
4482
|
//#region src/functions/arrFill.ts
|
|
4358
|
-
function
|
|
4483
|
+
function ln(e, t) {
|
|
4359
4484
|
return Array(t).fill(e);
|
|
4360
4485
|
}
|
|
4361
4486
|
//#endregion
|
|
4362
4487
|
//#region src/functions/blobToBase64.ts
|
|
4363
|
-
var
|
|
4488
|
+
var un = () => dn() !== void 0, dn = () => {
|
|
4364
4489
|
var e;
|
|
4365
4490
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4366
|
-
},
|
|
4491
|
+
}, fn = async (e) => new Promise((t, n) => {
|
|
4367
4492
|
if (typeof FileReader < "u") {
|
|
4368
4493
|
let r = new FileReader();
|
|
4369
4494
|
r.onloadend = () => {
|
|
@@ -4374,19 +4499,19 @@ var sn = () => cn() !== void 0, cn = () => {
|
|
|
4374
4499
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4375
4500
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4376
4501
|
} else n();
|
|
4377
|
-
}),
|
|
4502
|
+
}), pn = (e) => {
|
|
4378
4503
|
var t;
|
|
4379
4504
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4380
4505
|
};
|
|
4381
|
-
async function
|
|
4382
|
-
let n = s() ? await
|
|
4506
|
+
async function mn(e, t = !1) {
|
|
4507
|
+
let n = s() ? await fn(e) : un() ? pn(await e.arrayBuffer()) : void 0;
|
|
4383
4508
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4384
4509
|
}
|
|
4385
4510
|
//#endregion
|
|
4386
4511
|
//#region src/functions/capitalize.ts
|
|
4387
|
-
function
|
|
4512
|
+
function hn(e, t = !1) {
|
|
4388
4513
|
let n = String(e);
|
|
4389
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4514
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(k.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4390
4515
|
}
|
|
4391
4516
|
//#endregion
|
|
4392
4517
|
//#region src/functions/copyObject.ts
|
|
@@ -4395,12 +4520,12 @@ function Z(e) {
|
|
|
4395
4520
|
}
|
|
4396
4521
|
//#endregion
|
|
4397
4522
|
//#region src/functions/copyObjectLite.ts
|
|
4398
|
-
function
|
|
4523
|
+
function gn(e, t) {
|
|
4399
4524
|
return Object.assign({}, e, t);
|
|
4400
4525
|
}
|
|
4401
4526
|
//#endregion
|
|
4402
4527
|
//#region src/functions/domQuerySelector.ts
|
|
4403
|
-
function
|
|
4528
|
+
function _n(e) {
|
|
4404
4529
|
if (s()) {
|
|
4405
4530
|
var t;
|
|
4406
4531
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4408,67 +4533,67 @@ function mn(e) {
|
|
|
4408
4533
|
}
|
|
4409
4534
|
//#endregion
|
|
4410
4535
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4411
|
-
function
|
|
4536
|
+
function vn(e) {
|
|
4412
4537
|
if (s()) return document.querySelectorAll(e);
|
|
4413
4538
|
}
|
|
4414
4539
|
//#endregion
|
|
4415
4540
|
//#region src/functions/getElementImage.ts
|
|
4416
|
-
function
|
|
4541
|
+
function yn(e) {
|
|
4417
4542
|
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4418
4543
|
}
|
|
4419
4544
|
//#endregion
|
|
4420
4545
|
//#region src/functions/resizeImageByMax.ts
|
|
4421
|
-
function
|
|
4546
|
+
function bn(e, t = "auto") {
|
|
4422
4547
|
switch (t) {
|
|
4423
4548
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4424
4549
|
case "width": return !0;
|
|
4425
4550
|
case "height": return !1;
|
|
4426
4551
|
}
|
|
4427
4552
|
}
|
|
4428
|
-
function
|
|
4429
|
-
let i =
|
|
4553
|
+
function xn(e, t, n = "auto", r) {
|
|
4554
|
+
let i = yn(e);
|
|
4430
4555
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4431
4556
|
var a;
|
|
4432
|
-
let e =
|
|
4557
|
+
let e = bn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4433
4558
|
if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
|
|
4434
4559
|
}
|
|
4435
4560
|
}
|
|
4436
4561
|
//#endregion
|
|
4437
4562
|
//#region src/functions/ensureMaxSize.ts
|
|
4438
|
-
async function
|
|
4563
|
+
async function Sn(e, t = .56, n = "image/jpeg") {
|
|
4439
4564
|
return new Promise((r) => {
|
|
4440
4565
|
if (!s()) {
|
|
4441
4566
|
r("");
|
|
4442
4567
|
return;
|
|
4443
4568
|
}
|
|
4444
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4569
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = yn(a);
|
|
4445
4570
|
o ? (o.onload = () => {
|
|
4446
|
-
let e =
|
|
4571
|
+
let e = xn(o, t * o.naturalWidth, "width", n);
|
|
4447
4572
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4448
4573
|
}, o.onerror = () => {
|
|
4449
4574
|
URL.revokeObjectURL(a), r("");
|
|
4450
|
-
}) :
|
|
4575
|
+
}) : mn(i).then((e) => r(String(e == null ? "" : e)));
|
|
4451
4576
|
});
|
|
4452
4577
|
}
|
|
4453
4578
|
//#endregion
|
|
4454
4579
|
//#region src/functions/eventStopPropagation.ts
|
|
4455
|
-
function
|
|
4580
|
+
function Cn(e) {
|
|
4456
4581
|
e.preventDefault(), e.stopPropagation();
|
|
4457
4582
|
}
|
|
4458
4583
|
//#endregion
|
|
4459
4584
|
//#region src/functions/frame.ts
|
|
4460
|
-
function
|
|
4585
|
+
function wn(e, t, n) {
|
|
4461
4586
|
let r = () => {
|
|
4462
|
-
e(), s() && t != null && t() ?
|
|
4587
|
+
e(), s() && t != null && t() ? wn(e, t, n) : n == null || n();
|
|
4463
4588
|
};
|
|
4464
4589
|
s() ? requestAnimationFrame(r) : r();
|
|
4465
4590
|
}
|
|
4466
4591
|
//#endregion
|
|
4467
4592
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4468
|
-
function
|
|
4593
|
+
function Tn(e, t) {
|
|
4469
4594
|
let n = a(e);
|
|
4470
4595
|
if (l(n) && l(t)) {
|
|
4471
|
-
let e = [], r =
|
|
4596
|
+
let e = [], r = Rt(t), i = 0, a;
|
|
4472
4597
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4473
4598
|
text: n.substring(i, a.index),
|
|
4474
4599
|
isMatch: !1
|
|
@@ -4488,8 +4613,8 @@ function Sn(e, t) {
|
|
|
4488
4613
|
}
|
|
4489
4614
|
//#endregion
|
|
4490
4615
|
//#region src/functions/getAttributes.ts
|
|
4491
|
-
function
|
|
4492
|
-
let t = {}, n =
|
|
4616
|
+
function En(e) {
|
|
4617
|
+
let t = {}, n = A(e);
|
|
4493
4618
|
if (n) for (let e of n.attributes) {
|
|
4494
4619
|
var r;
|
|
4495
4620
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4498,12 +4623,12 @@ function Cn(e) {
|
|
|
4498
4623
|
}
|
|
4499
4624
|
//#endregion
|
|
4500
4625
|
//#region src/functions/getClipboardData.ts
|
|
4501
|
-
async function
|
|
4626
|
+
async function Dn(e) {
|
|
4502
4627
|
if (s()) try {
|
|
4503
4628
|
var t, n;
|
|
4504
4629
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
4505
4630
|
} catch (e) {
|
|
4506
|
-
|
|
4631
|
+
w.on({
|
|
4507
4632
|
group: "clipboard",
|
|
4508
4633
|
code: "error",
|
|
4509
4634
|
details: e
|
|
@@ -4513,35 +4638,35 @@ async function wn(e) {
|
|
|
4513
4638
|
}
|
|
4514
4639
|
//#endregion
|
|
4515
4640
|
//#region src/functions/getCurrentDate.ts
|
|
4516
|
-
function
|
|
4517
|
-
return new
|
|
4641
|
+
function On(e = "datetime") {
|
|
4642
|
+
return new at(void 0, e).standard();
|
|
4518
4643
|
}
|
|
4519
4644
|
//#endregion
|
|
4520
4645
|
//#region src/functions/getCurrentTime.ts
|
|
4521
|
-
function
|
|
4646
|
+
function kn() {
|
|
4522
4647
|
return Date.now();
|
|
4523
4648
|
}
|
|
4524
4649
|
//#endregion
|
|
4525
4650
|
//#region src/functions/getElementId.ts
|
|
4526
|
-
var Q,
|
|
4651
|
+
var Q, An = () => {
|
|
4527
4652
|
let e = Q == null ? void 0 : Q();
|
|
4528
4653
|
if (e) return String(e);
|
|
4529
|
-
let t =
|
|
4654
|
+
let t = E.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4530
4655
|
return `id-${t.id++}`;
|
|
4531
4656
|
};
|
|
4532
|
-
function
|
|
4657
|
+
function jn(e, t) {
|
|
4533
4658
|
if (e) {
|
|
4534
|
-
let n =
|
|
4535
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4659
|
+
let n = A(e);
|
|
4660
|
+
if (n) return l(n.id) || n.setAttribute("id", An()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4536
4661
|
}
|
|
4537
|
-
return
|
|
4662
|
+
return An();
|
|
4538
4663
|
}
|
|
4539
|
-
function
|
|
4664
|
+
function Mn(e) {
|
|
4540
4665
|
Q || (Q = e);
|
|
4541
4666
|
}
|
|
4542
4667
|
//#endregion
|
|
4543
4668
|
//#region src/functions/getFirst.ts
|
|
4544
|
-
function
|
|
4669
|
+
function Nn(e) {
|
|
4545
4670
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4546
4671
|
if (t(e)) {
|
|
4547
4672
|
var n;
|
|
@@ -4551,18 +4676,18 @@ function An(e) {
|
|
|
4551
4676
|
}
|
|
4552
4677
|
//#endregion
|
|
4553
4678
|
//#region src/functions/getKey.ts
|
|
4554
|
-
function
|
|
4679
|
+
function Pn(e) {
|
|
4555
4680
|
var t, n, r;
|
|
4556
4681
|
return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
|
|
4557
4682
|
}
|
|
4558
4683
|
//#endregion
|
|
4559
4684
|
//#region src/functions/getLength.ts
|
|
4560
|
-
function
|
|
4685
|
+
function Fn(e) {
|
|
4561
4686
|
return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
|
|
4562
4687
|
}
|
|
4563
4688
|
//#endregion
|
|
4564
4689
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4565
|
-
function
|
|
4690
|
+
function In(e) {
|
|
4566
4691
|
return r(e, (e) => {
|
|
4567
4692
|
var t;
|
|
4568
4693
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4570,41 +4695,41 @@ function Nn(e) {
|
|
|
4570
4695
|
}
|
|
4571
4696
|
//#endregion
|
|
4572
4697
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4573
|
-
function
|
|
4698
|
+
function Ln(e) {
|
|
4574
4699
|
if (!l(e)) return 0;
|
|
4575
|
-
let t =
|
|
4700
|
+
let t = In(e);
|
|
4576
4701
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4577
4702
|
}
|
|
4578
4703
|
//#endregion
|
|
4579
4704
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4580
|
-
function
|
|
4705
|
+
function Rn(e) {
|
|
4581
4706
|
if (!l(e)) return 0;
|
|
4582
|
-
let t =
|
|
4707
|
+
let t = In(e);
|
|
4583
4708
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4584
4709
|
}
|
|
4585
4710
|
//#endregion
|
|
4586
4711
|
//#region src/functions/getMouseClientX.ts
|
|
4587
|
-
function
|
|
4712
|
+
function zn(e) {
|
|
4588
4713
|
var t, n;
|
|
4589
4714
|
return (e == null ? void 0 : e.clientX) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
|
|
4590
4715
|
}
|
|
4591
4716
|
//#endregion
|
|
4592
4717
|
//#region src/functions/getMouseClientY.ts
|
|
4593
|
-
function
|
|
4718
|
+
function Bn(e) {
|
|
4594
4719
|
var t, n;
|
|
4595
4720
|
return (e == null ? void 0 : e.clientY) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
|
|
4596
4721
|
}
|
|
4597
4722
|
//#endregion
|
|
4598
4723
|
//#region src/functions/getMouseClient.ts
|
|
4599
|
-
function
|
|
4724
|
+
function Vn(e) {
|
|
4600
4725
|
return {
|
|
4601
|
-
x:
|
|
4602
|
-
y:
|
|
4726
|
+
x: zn(e),
|
|
4727
|
+
y: Bn(e)
|
|
4603
4728
|
};
|
|
4604
4729
|
}
|
|
4605
4730
|
//#endregion
|
|
4606
4731
|
//#region src/functions/getObjectByKeys.ts
|
|
4607
|
-
function
|
|
4732
|
+
function Hn(e, t) {
|
|
4608
4733
|
let r = {};
|
|
4609
4734
|
return n(e) && t.forEach((t) => {
|
|
4610
4735
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4612,7 +4737,7 @@ function zn(e, t) {
|
|
|
4612
4737
|
}
|
|
4613
4738
|
//#endregion
|
|
4614
4739
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4615
|
-
function
|
|
4740
|
+
function Un(e, t = void 0) {
|
|
4616
4741
|
let n = {};
|
|
4617
4742
|
return r(e, (e, r) => {
|
|
4618
4743
|
e !== t && (n[r] = e);
|
|
@@ -4620,42 +4745,42 @@ function Bn(e, t = void 0) {
|
|
|
4620
4745
|
}
|
|
4621
4746
|
//#endregion
|
|
4622
4747
|
//#region src/functions/getObjectOrNone.ts
|
|
4623
|
-
function
|
|
4748
|
+
function Wn(e) {
|
|
4624
4749
|
return n(e) ? e : {};
|
|
4625
4750
|
}
|
|
4626
4751
|
//#endregion
|
|
4627
4752
|
//#region src/functions/getOnlyText.ts
|
|
4628
|
-
function
|
|
4629
|
-
return
|
|
4753
|
+
function Gn(e) {
|
|
4754
|
+
return x(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4630
4755
|
}
|
|
4631
4756
|
//#endregion
|
|
4632
4757
|
//#region src/functions/strFill.ts
|
|
4633
|
-
function
|
|
4758
|
+
function Kn(e, t) {
|
|
4634
4759
|
return String(e).repeat(t);
|
|
4635
4760
|
}
|
|
4636
4761
|
//#endregion
|
|
4637
4762
|
//#region src/functions/getRandomText.ts
|
|
4638
|
-
function
|
|
4763
|
+
function qn(e, t, n = "#", r = 2, i = 12) {
|
|
4639
4764
|
let a = f(e, t), o = [];
|
|
4640
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4765
|
+
for (let e = 0; e < a; e++) o.push(Kn(n, f(r, i)));
|
|
4641
4766
|
return o.join(" ");
|
|
4642
4767
|
}
|
|
4643
4768
|
//#endregion
|
|
4644
4769
|
//#region src/functions/getStepPercent.ts
|
|
4645
|
-
function
|
|
4770
|
+
function Jn(e, t) {
|
|
4646
4771
|
let n = e == null ? 0 : e;
|
|
4647
4772
|
return t > n ? 100 / (t - n) : 0;
|
|
4648
4773
|
}
|
|
4649
4774
|
//#endregion
|
|
4650
4775
|
//#region src/functions/getStepValue.ts
|
|
4651
|
-
function
|
|
4776
|
+
function Yn(e, t) {
|
|
4652
4777
|
let n = e == null ? 0 : e;
|
|
4653
4778
|
return t > n ? (t - n) / 100 : 0;
|
|
4654
4779
|
}
|
|
4655
4780
|
//#endregion
|
|
4656
4781
|
//#region src/functions/goScroll.ts
|
|
4657
|
-
var
|
|
4658
|
-
function
|
|
4782
|
+
var Xn = 0;
|
|
4783
|
+
function Zn(e, t, n) {
|
|
4659
4784
|
if (!s()) return;
|
|
4660
4785
|
let r = t == null ? void 0 : t.closest(e);
|
|
4661
4786
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4663,12 +4788,12 @@ function Jn(e, t, n) {
|
|
|
4663
4788
|
if (n) {
|
|
4664
4789
|
let a = n.getBoundingClientRect();
|
|
4665
4790
|
r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
|
|
4666
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4791
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Xn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Xn);
|
|
4667
4792
|
}
|
|
4668
4793
|
}
|
|
4669
4794
|
//#endregion
|
|
4670
4795
|
//#region src/functions/goScrollSmooth.ts
|
|
4671
|
-
function
|
|
4796
|
+
function Qn(e, t, n = 0) {
|
|
4672
4797
|
if (!s()) return;
|
|
4673
4798
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4674
4799
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4690,7 +4815,7 @@ function Yn(e, t, n = 0) {
|
|
|
4690
4815
|
}
|
|
4691
4816
|
//#endregion
|
|
4692
4817
|
//#region src/functions/goScrollTo.ts
|
|
4693
|
-
function
|
|
4818
|
+
function $n(e, t, n = "smooth") {
|
|
4694
4819
|
if (!s() || !e || !t) return;
|
|
4695
4820
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4696
4821
|
e.scrollBy({
|
|
@@ -4701,16 +4826,16 @@ function Xn(e, t, n = "smooth") {
|
|
|
4701
4826
|
}
|
|
4702
4827
|
//#endregion
|
|
4703
4828
|
//#region src/functions/isShare.ts
|
|
4704
|
-
function
|
|
4829
|
+
function er() {
|
|
4705
4830
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4706
4831
|
}
|
|
4707
4832
|
//#endregion
|
|
4708
4833
|
//#region src/functions/handleShare.ts
|
|
4709
|
-
async function
|
|
4710
|
-
if (
|
|
4834
|
+
async function tr(e) {
|
|
4835
|
+
if (er() && navigator.canShare && navigator.canShare(e)) try {
|
|
4711
4836
|
return await navigator.share(e), !0;
|
|
4712
4837
|
} catch (e) {
|
|
4713
|
-
|
|
4838
|
+
w.on({
|
|
4714
4839
|
group: "share",
|
|
4715
4840
|
code: "error",
|
|
4716
4841
|
details: e
|
|
@@ -4720,20 +4845,20 @@ async function Qn(e) {
|
|
|
4720
4845
|
}
|
|
4721
4846
|
//#endregion
|
|
4722
4847
|
//#region src/functions/inArray.ts
|
|
4723
|
-
function
|
|
4848
|
+
function nr(e, t) {
|
|
4724
4849
|
return e.includes(t);
|
|
4725
4850
|
}
|
|
4726
4851
|
//#endregion
|
|
4727
4852
|
//#region src/functions/initScrollbarOffset.ts
|
|
4728
|
-
async function
|
|
4853
|
+
async function rr() {
|
|
4729
4854
|
if (s()) {
|
|
4730
|
-
let e = await
|
|
4855
|
+
let e = await Lt.get();
|
|
4731
4856
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4732
4857
|
}
|
|
4733
4858
|
}
|
|
4734
4859
|
//#endregion
|
|
4735
4860
|
//#region src/functions/intersectKey.ts
|
|
4736
|
-
function
|
|
4861
|
+
function ir(e, n) {
|
|
4737
4862
|
let i = {};
|
|
4738
4863
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4739
4864
|
t in n && (i[t] = e);
|
|
@@ -4741,7 +4866,7 @@ function tr(e, n) {
|
|
|
4741
4866
|
}
|
|
4742
4867
|
//#endregion
|
|
4743
4868
|
//#region src/functions/isDifferent.ts
|
|
4744
|
-
function
|
|
4869
|
+
function ar(e, t) {
|
|
4745
4870
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4746
4871
|
return n || r(e, (e, r) => {
|
|
4747
4872
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4749,25 +4874,25 @@ function nr(e, t) {
|
|
|
4749
4874
|
}
|
|
4750
4875
|
//#endregion
|
|
4751
4876
|
//#region src/functions/isElementVisible.ts
|
|
4752
|
-
function
|
|
4877
|
+
function or(e) {
|
|
4753
4878
|
if (!s()) return !1;
|
|
4754
|
-
let t =
|
|
4879
|
+
let t = A(e);
|
|
4755
4880
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4756
4881
|
let n = window.getComputedStyle(t);
|
|
4757
4882
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4758
4883
|
}
|
|
4759
4884
|
//#endregion
|
|
4760
4885
|
//#region src/functions/isInput.ts
|
|
4761
|
-
var
|
|
4886
|
+
var sr = (e) => {
|
|
4762
4887
|
if (e instanceof HTMLElement) {
|
|
4763
4888
|
let t = e.tagName.toLowerCase();
|
|
4764
4889
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4765
4890
|
}
|
|
4766
4891
|
return !1;
|
|
4767
|
-
},
|
|
4892
|
+
}, cr = (e, t) => e.code === "Space" || e.code === "Enter" || e.key === " " || e.key === "Spacebar" || e.key === "Enter" || e.keyCode === 13 || e.keyCode === 32 ? t === void 0 ? !sr(e.target) : !t : !1;
|
|
4768
4893
|
//#endregion
|
|
4769
4894
|
//#region src/functions/isFloat.ts
|
|
4770
|
-
function
|
|
4895
|
+
function lr(e) {
|
|
4771
4896
|
switch (typeof e) {
|
|
4772
4897
|
case "number": return !0;
|
|
4773
4898
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4776,21 +4901,21 @@ function or(e) {
|
|
|
4776
4901
|
}
|
|
4777
4902
|
//#endregion
|
|
4778
4903
|
//#region src/functions/isIntegerBetween.ts
|
|
4779
|
-
function
|
|
4904
|
+
function ur(e, t) {
|
|
4780
4905
|
let n = Math.floor(t);
|
|
4781
4906
|
return e >= n && e < n + 1;
|
|
4782
4907
|
}
|
|
4783
4908
|
//#endregion
|
|
4784
4909
|
//#region src/functions/isSelectedByList.ts
|
|
4785
|
-
function
|
|
4786
|
-
return Array.isArray(e) ? e.every((e) =>
|
|
4910
|
+
function dr(e, t) {
|
|
4911
|
+
return Array.isArray(e) ? e.every((e) => b(e, t)) : b(e, t);
|
|
4787
4912
|
}
|
|
4788
4913
|
//#endregion
|
|
4789
4914
|
//#region src/functions/isTab.ts
|
|
4790
|
-
var
|
|
4915
|
+
var fr = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4791
4916
|
//#endregion
|
|
4792
4917
|
//#region src/functions/removeCommonPrefix.ts
|
|
4793
|
-
function
|
|
4918
|
+
function pr(e, t) {
|
|
4794
4919
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4795
4920
|
let n = 0;
|
|
4796
4921
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4798,13 +4923,13 @@ function ur(e, t) {
|
|
|
4798
4923
|
}
|
|
4799
4924
|
//#endregion
|
|
4800
4925
|
//#region src/functions/replaceComponentName.ts
|
|
4801
|
-
var
|
|
4926
|
+
var mr = (e, t, n) => {
|
|
4802
4927
|
var r;
|
|
4803
4928
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4804
4929
|
};
|
|
4805
4930
|
//#endregion
|
|
4806
4931
|
//#region src/functions/uniqueArray.ts
|
|
4807
|
-
function
|
|
4932
|
+
function hr(e) {
|
|
4808
4933
|
return [...new Set(e)];
|
|
4809
4934
|
}
|
|
4810
4935
|
//#endregion
|
|
@@ -4813,21 +4938,21 @@ function $(e, n, i = !0) {
|
|
|
4813
4938
|
let a = Z(e);
|
|
4814
4939
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4815
4940
|
let o = e == null ? void 0 : e[r];
|
|
4816
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(
|
|
4941
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(hr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
|
|
4817
4942
|
}), a;
|
|
4818
4943
|
}
|
|
4819
4944
|
//#endregion
|
|
4820
4945
|
//#region src/functions/replaceTemplate.ts
|
|
4821
|
-
function
|
|
4946
|
+
function gr(e, t) {
|
|
4822
4947
|
let n = e;
|
|
4823
4948
|
return r(t, (e, t) => {
|
|
4824
|
-
n = n.replace(
|
|
4949
|
+
n = n.replace(Gt(`[${t}]`), m(e));
|
|
4825
4950
|
}), n;
|
|
4826
4951
|
}
|
|
4827
4952
|
//#endregion
|
|
4828
4953
|
//#region src/functions/secondToTime.ts
|
|
4829
|
-
function
|
|
4830
|
-
let n =
|
|
4954
|
+
function _r(e, t) {
|
|
4955
|
+
let n = y(e);
|
|
4831
4956
|
if (n > 0) {
|
|
4832
4957
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
4833
4958
|
return t && Number(e) >= 60 ? `${String(Math.floor(Number(e) / 60)).padStart(2, "0")}:${String(Number(e) % 60).padStart(2, "0")}:${r}` : `${e}:${r}`;
|
|
@@ -4836,7 +4961,7 @@ function mr(e, t) {
|
|
|
4836
4961
|
}
|
|
4837
4962
|
//#endregion
|
|
4838
4963
|
//#region src/functions/setValues.ts
|
|
4839
|
-
function
|
|
4964
|
+
function vr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4840
4965
|
if (n) {
|
|
4841
4966
|
if (i(e)) {
|
|
4842
4967
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4848,7 +4973,7 @@ function hr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4848
4973
|
}
|
|
4849
4974
|
//#endregion
|
|
4850
4975
|
//#region src/functions/splice.ts
|
|
4851
|
-
function
|
|
4976
|
+
function yr(e, n, i) {
|
|
4852
4977
|
if (t(e) && t(n)) {
|
|
4853
4978
|
if (i) {
|
|
4854
4979
|
let a = {}, o = !1;
|
|
@@ -4862,34 +4987,34 @@ function gr(e, n, i) {
|
|
|
4862
4987
|
}
|
|
4863
4988
|
//#endregion
|
|
4864
4989
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4865
|
-
function
|
|
4866
|
-
return
|
|
4990
|
+
function br(e) {
|
|
4991
|
+
return ot(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4867
4992
|
}
|
|
4868
4993
|
//#endregion
|
|
4869
4994
|
//#region src/functions/toKebabCase.ts
|
|
4870
|
-
function
|
|
4995
|
+
function xr(e) {
|
|
4871
4996
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
|
|
4872
4997
|
}
|
|
4873
4998
|
//#endregion
|
|
4874
4999
|
//#region src/functions/toNumberByMax.ts
|
|
4875
|
-
function
|
|
4876
|
-
let i =
|
|
4877
|
-
return t && a < i ? `${
|
|
5000
|
+
function Sr(e, t, n, r) {
|
|
5001
|
+
let i = y(e), a = y(t);
|
|
5002
|
+
return t && a < i ? `${Cr(a, n, r)}+` : Cr(i, n, r);
|
|
4878
5003
|
}
|
|
4879
|
-
var
|
|
5004
|
+
var Cr = (e, t, n) => t ? new L(n).number(e) : e;
|
|
4880
5005
|
//#endregion
|
|
4881
5006
|
//#region src/functions/toPercent.ts
|
|
4882
|
-
function
|
|
5007
|
+
function wr(e, t) {
|
|
4883
5008
|
return e === 0 ? t : 1 / e * t;
|
|
4884
5009
|
}
|
|
4885
5010
|
//#endregion
|
|
4886
5011
|
//#region src/functions/toPercentBy100.ts
|
|
4887
|
-
function
|
|
4888
|
-
return
|
|
5012
|
+
function Tr(e, t) {
|
|
5013
|
+
return wr(e, t) * 100;
|
|
4889
5014
|
}
|
|
4890
5015
|
//#endregion
|
|
4891
5016
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4892
|
-
function
|
|
5017
|
+
function Er(e) {
|
|
4893
5018
|
let t = "";
|
|
4894
5019
|
for (let n of e) t += String.fromCharCode(n);
|
|
4895
5020
|
if (s()) return window.btoa(t);
|
|
@@ -4901,7 +5026,7 @@ function Cr(e) {
|
|
|
4901
5026
|
}
|
|
4902
5027
|
//#endregion
|
|
4903
5028
|
//#region src/functions/writeClipboardData.ts
|
|
4904
|
-
async function
|
|
5029
|
+
async function Dr(e) {
|
|
4905
5030
|
if (s()) try {
|
|
4906
5031
|
await navigator.clipboard.writeText(e);
|
|
4907
5032
|
} catch (n) {
|
|
@@ -4910,4 +5035,4 @@ async function wr(e) {
|
|
|
4910
5035
|
}
|
|
4911
5036
|
}
|
|
4912
5037
|
//#endregion
|
|
4913
|
-
export {
|
|
5038
|
+
export { F as Api, N as ApiCache, Be as ApiDataReturn, Ve as ApiDefault, We as ApiError, He as ApiErrorItem, Ue as ApiErrorStorage, Ge as ApiHeaders, qe as ApiHydration, Qe as ApiInstance, P as ApiMethodItem, Je as ApiPreparation, Ze as ApiResponse, Re as ApiStatus, $e as BroadcastMessage, nt as Cache, tt as CacheItem, rt as CacheStatic, Ee as Cookie, Ce as CookieBlock, Se as CookieBlockInstance, O as CookieStorage, D as DataStorage, at as Datetime, w as ErrorCenter, ue as ErrorCenterHandler, de as ErrorCenterInstance, Ne as EventItem, st as Formatters, V as FormattersType, ct as GEO_FLAG_ICON_NAME, k as Geo, lt as GeoFlag, ke as GeoInstance, L as GeoIntl, ut as GeoPhone, ft as GeoUnit, pt as Global, gt as Hash, ht as HashInstance, yt as Icons, M as Loading, Fe as LoadingInstance, Mt as Meta, G as MetaManager, At as MetaOg, Dt as MetaOpenGraphAge, Tt as MetaOpenGraphAvailability, Et as MetaOpenGraphCondition, Ot as MetaOpenGraphGender, q as MetaOpenGraphTag, wt as MetaOpenGraphType, Ct as MetaRobots, Nt as MetaStatic, K as MetaTag, jt as MetaTwitter, kt as MetaTwitterCard, J as MetaTwitterTag, Ft as Query, Pt as QueryInstance, It as ResumableTimer, Lt as ScrollbarWidth, Xt as SearchList, Ut as SearchListData, Wt as SearchListItem, Jt as SearchListMatcher, Yt as SearchListOptions, E as ServerStorage, Qt as StorageCallback, rn as TRANSLATE_GLOBAL_PREFIX, an as TRANSLATE_TIME_OUT, cn as Translate, on as TranslateFile, sn as TranslateInstance, De as UI_GEO_COOKIE_KEY, mt as UrlInstanceAbstract, Y as UrlItem, Ht as addTagHighlightMatch, x as anyToString, tn as applyTemplate, ln as arrFill, mn as blobToBase64, hn as capitalize, Z as copyObject, gn as copyObjectLite, U as createElement, _n as domQuerySelector, vn as domQuerySelectorAll, W as encodeAttribute, me as encodeLiteAttribute, Sn as ensureMaxSize, X as escapeExp, Cn as eventStopPropagation, m as executeFunction, Ye as executePromise, r as forEach, wn as frame, Tn as getArrayHighlightMatch, En as getAttributes, Dn as getClipboardData, it as getColumn, On as getCurrentDate, kn as getCurrentTime, A as getElement, jn as getElementId, yn as getElementImage, bt as getElementItem, je as getElementOrWindow, he as getElementSafeScript, Kt as getExactSearchExp, Gt as getExp, Nn as getFirst, ge as getHydrationData, B as getItemByPath, Pn as getKey, Fn as getLength, In as getLengthOfAllArray, Ln as getMaxLengthAllArray, Rn as getMinLengthAllArray, Vn as getMouseClient, zn as getMouseClientX, Bn as getMouseClientY, Hn as getObjectByKeys, Un as getObjectNoUndefined, Wn as getObjectOrNone, Gn as getOnlyText, qn as getRandomText, o as getRequestString, qt as getSearchExp, Rt as getSeparatingSearchExp, Jn as getStepPercent, Yn as getStepValue, Zn as goScroll, Qn as goScrollSmooth, $n as goScrollTo, tr as handleShare, nr as inArray, Mn as initGetElementId, rr as initScrollbarOffset, ir as intersectKey, nn as isApiSuccess, i as isArray, ar as isDifferent, oe as isDomData, s as isDomRuntime, or as isElementVisible, cr as isEnter, l as isFilled, lr as isFloat, p as isFunction, Me as isInDom, sr as isInput, ur as isIntegerBetween, c as isNull, h as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, b as isSelected, dr as isSelectedByList, er as isShare, d as isString, fr as isTab, Ae as isWindow, f as random, pr as removeCommonPrefix, mr as replaceComponentName, $ as replaceRecursive, gr as replaceTemplate, xn as resizeImageByMax, _r as secondToTime, xt as setElementItem, vr as setValues, ee as sleep, yr as splice, Kn as strFill, se as strSplit, j as toArray, ot as toCamelCase, br as toCamelCaseFirst, I as toDate, xr as toKebabCase, y as toNumber, Sr as toNumberByMax, wr as toPercent, Tr as toPercentBy100, a as toString, T as transformation, Er as uint8ArrayToBase64, hr as uniqueArray, Dr as writeClipboardData };
|