@dxtmisha/functional-basic 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.d.ts +257 -29
- package/dist/library.js +359 -312
- package/package.json +3 -2
package/dist/library.js
CHANGED
|
@@ -2,13 +2,13 @@ var Vt = Object.defineProperty;
|
|
|
2
2
|
var Kt = (s, t, e) => t in s ? Vt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
3
|
var c = (s, t, e) => Kt(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { geo as Yt } from "@dxtmisha/media";
|
|
5
|
-
function
|
|
5
|
+
function C(s, t) {
|
|
6
6
|
return t ? Object.assign({}, s, t) : Object.assign({}, s);
|
|
7
7
|
}
|
|
8
8
|
function m(s) {
|
|
9
9
|
return !!(s && typeof s == "object");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function g(s, t, e) {
|
|
12
12
|
if (m(s)) {
|
|
13
13
|
const i = [];
|
|
14
14
|
return s instanceof Map ? s.forEach((r, o) => i.push(t(r, o, s))) : Array.isArray(s) ? s.forEach((r, o) => i.push(t(r, o, s))) : Object.entries(s).forEach(
|
|
@@ -18,12 +18,12 @@ function d(s, t, e) {
|
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
20
|
function Pt(s, t = "=", e = "&") {
|
|
21
|
-
return
|
|
21
|
+
return g(
|
|
22
22
|
s,
|
|
23
23
|
(i, r) => `${r}${t}${encodeURIComponent(String(i).trim())}`
|
|
24
24
|
).sort().join(e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function et(s) {
|
|
27
27
|
return Array.isArray(s);
|
|
28
28
|
}
|
|
29
29
|
function X(s) {
|
|
@@ -54,16 +54,16 @@ function y(s, t) {
|
|
|
54
54
|
}
|
|
55
55
|
return !1;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function E(s) {
|
|
58
58
|
return m(s) && !Array.isArray(s);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function U(s) {
|
|
61
61
|
return typeof s == "string";
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Y(s) {
|
|
64
64
|
return JSON.parse(JSON.stringify(s));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function f() {
|
|
67
67
|
return typeof window != "undefined" && !!window.document;
|
|
68
68
|
}
|
|
69
69
|
function yt(s) {
|
|
@@ -84,7 +84,7 @@ function k(s) {
|
|
|
84
84
|
let t = s.replace(/[^\d., ]+/ig, "");
|
|
85
85
|
return t.match(/( [0-9]{3}[ ,.]|[0-9] [0-9])/ig) ? t = t.replace(/ /ig, "").replace(/,/ig, ".") : t.match(/,[0-9]{3}[,.]/ig) ? t = t.replace(/,/ig, "") : t.match(/[.][0-9]{3}[,.]/ig) ? t = t.replace(/[.]/ig, "").replace(/,/ig, ".") : t = t.replace(/,/ig, "."), parseFloat(t);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function ct(s, t) {
|
|
88
88
|
return X(s) ? !1 : Array.isArray(t) ? t.includes(s) : yt(s) && yt(t) ? k(s) === k(t) : s === t;
|
|
89
89
|
}
|
|
90
90
|
function lt(s) {
|
|
@@ -93,12 +93,12 @@ function lt(s) {
|
|
|
93
93
|
function B(s) {
|
|
94
94
|
return lt(s) ? s() : s;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ut() {
|
|
97
97
|
return location.href.startsWith("data:");
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const rt = {};
|
|
100
100
|
let $t = "ui-storage";
|
|
101
|
-
class
|
|
101
|
+
class st {
|
|
102
102
|
/**
|
|
103
103
|
* Constructor
|
|
104
104
|
* @param name value name/ название значения
|
|
@@ -109,9 +109,9 @@ class et {
|
|
|
109
109
|
c(this, "age");
|
|
110
110
|
this.name = t, this.isSession = e;
|
|
111
111
|
const i = `${e ? "session" : "storage"}#${t}`;
|
|
112
|
-
if (i in
|
|
113
|
-
return
|
|
114
|
-
this.make(),
|
|
112
|
+
if (i in rt)
|
|
113
|
+
return rt[i];
|
|
114
|
+
this.make(), rt[i] = this;
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Changing the prefix in key names. Should be called at the beginning of the code.
|
|
@@ -180,7 +180,7 @@ class et {
|
|
|
180
180
|
* Возвращает объект для работы с хранилищем.
|
|
181
181
|
*/
|
|
182
182
|
getMethod() {
|
|
183
|
-
if (
|
|
183
|
+
if (f() && !ut()) {
|
|
184
184
|
const t = this.isSession ? window == null ? void 0 : window.sessionStorage : window == null ? void 0 : window.localStorage;
|
|
185
185
|
if (t)
|
|
186
186
|
return t;
|
|
@@ -274,7 +274,7 @@ const qt = "geo-code", w = class w {
|
|
|
274
274
|
* Получение обработанных данных.
|
|
275
275
|
*/
|
|
276
276
|
static getItem() {
|
|
277
|
-
return
|
|
277
|
+
return C(this.item, {
|
|
278
278
|
language: this.language
|
|
279
279
|
});
|
|
280
280
|
}
|
|
@@ -295,7 +295,7 @@ const qt = "geo-code", w = class w {
|
|
|
295
295
|
*/
|
|
296
296
|
static getByCode(t) {
|
|
297
297
|
let e;
|
|
298
|
-
return t && (t.match(/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/) && (e = this.getByCodeFull(t)), !e && t.match(/[A-Z]{2}/) && (e = this.getByCountry(this.toCountry(t))), !e && t.match(/[a-z]{2}/) && (e = this.getByLanguage(this.toLanguage(t)))), this.toFull(
|
|
298
|
+
return t && (t.match(/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/) && (e = this.getByCodeFull(t)), !e && t.match(/[A-Z]{2}/) && (e = this.getByCountry(this.toCountry(t))), !e && t.match(/[a-z]{2}/) && (e = this.getByLanguage(this.toLanguage(t)))), this.toFull(Y(e != null ? e : this.getList()[0]));
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* Returns the full data by language and country.
|
|
@@ -305,7 +305,7 @@ const qt = "geo-code", w = class w {
|
|
|
305
305
|
*/
|
|
306
306
|
static getByCodeFull(t) {
|
|
307
307
|
return this.getList().find(
|
|
308
|
-
(e) =>
|
|
308
|
+
(e) => ct(t, [
|
|
309
309
|
`${e.language}-${e.country}`,
|
|
310
310
|
`${e.country}-${e.language}`
|
|
311
311
|
])
|
|
@@ -399,7 +399,7 @@ const qt = "geo-code", w = class w {
|
|
|
399
399
|
*/
|
|
400
400
|
static findLocation() {
|
|
401
401
|
var t;
|
|
402
|
-
return
|
|
402
|
+
return f() && (this.storage.get() || ((t = document.querySelector("html")) == null ? void 0 : t.lang) || navigator.language || navigator.languages[0] || "en-GB") || "en-GB";
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
405
405
|
* Determines the current language.
|
|
@@ -435,43 +435,42 @@ const qt = "geo-code", w = class w {
|
|
|
435
435
|
* объект с данными об текущей стране
|
|
436
436
|
*/
|
|
437
437
|
static toFull(t) {
|
|
438
|
-
return
|
|
438
|
+
return C(t, {
|
|
439
439
|
standard: this.toStandard(t),
|
|
440
440
|
firstDay: (t == null ? void 0 : t.firstDay) || "Mo"
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
};
|
|
444
|
-
c(w, "storage", new
|
|
444
|
+
c(w, "storage", new st(qt)), c(w, "location"), c(w, "item"), c(w, "language"), c(w, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), w.location = w.findLocation(), w.language = w.findLanguage(w.location), w.item = w.getByCode(w.location);
|
|
445
445
|
let b = w;
|
|
446
|
-
function
|
|
447
|
-
return
|
|
446
|
+
function jt(s) {
|
|
447
|
+
return f() && s === window;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function A(s) {
|
|
450
450
|
var t;
|
|
451
|
-
if (
|
|
452
|
-
return
|
|
451
|
+
if (f())
|
|
452
|
+
return jt(s) ? document.body : U(s) ? (t = document.querySelector(s)) != null ? t : void 0 : s;
|
|
453
453
|
}
|
|
454
454
|
function pt(s) {
|
|
455
|
-
return
|
|
455
|
+
return jt(s) ? s : A(s);
|
|
456
456
|
}
|
|
457
457
|
function Jt(s) {
|
|
458
458
|
var t;
|
|
459
|
-
return !!((t =
|
|
459
|
+
return !!((t = A(s)) != null && t.closest("html"));
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function H(s) {
|
|
462
462
|
return Array.isArray(s) ? s : [s];
|
|
463
463
|
}
|
|
464
464
|
class bt {
|
|
465
465
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* @param
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* @param options
|
|
473
|
-
* @param detail
|
|
474
|
-
* значение, связанное с событием
|
|
466
|
+
* Constructor for EventItem.
|
|
467
|
+
*
|
|
468
|
+
* Конструктор для EventItem.
|
|
469
|
+
* @param elementSelector target element or selector where the listener should be attached / целевой элемент или селектор, к которому должен быть прикреплен слушатель
|
|
470
|
+
* @param type event type (e.g., 'click'), array of types, or special optimization types ('resize', 'scroll-sync') / тип события (например, 'click'), массив типов или специальные типы оптимизации ('resize', 'scroll-sync')
|
|
471
|
+
* @param listener the handler function to be executed when the event occurs / функция-обработчик, которая будет выполнена при возникновении события
|
|
472
|
+
* @param options standard EventListenerOptions or boolean for useCapture / стандартные EventListenerOptions или логическое значение для useCapture
|
|
473
|
+
* @param detail additional data provided to the listener via the custom Event interaction / дополнительные данные, предоставляемые слушателю через кастомное взаимодействие с событием
|
|
475
474
|
*/
|
|
476
475
|
constructor(t, e = ["click"], i, r, o) {
|
|
477
476
|
/**
|
|
@@ -512,7 +511,7 @@ class bt {
|
|
|
512
511
|
*/
|
|
513
512
|
c(this, "activity", !1);
|
|
514
513
|
c(this, "activityItems", []);
|
|
515
|
-
this.listener = i, this.options = r, this.detail = o, this.element = pt(t), this.elementControl =
|
|
514
|
+
this.listener = i, this.options = r, this.detail = o, this.element = pt(t), this.elementControl = A(t), this.type = H(e);
|
|
516
515
|
}
|
|
517
516
|
/**
|
|
518
517
|
* Checks whether event listening is currently enabled.
|
|
@@ -533,7 +532,7 @@ class bt {
|
|
|
533
532
|
*/
|
|
534
533
|
setElement(t) {
|
|
535
534
|
const e = pt(t);
|
|
536
|
-
return this.elementControlEdit || (this.elementControl =
|
|
535
|
+
return this.elementControlEdit || (this.elementControl = A(t)), this.element = e, this.reset(), this;
|
|
537
536
|
}
|
|
538
537
|
/**
|
|
539
538
|
* Modifies the object that receives the notification.
|
|
@@ -542,7 +541,7 @@ class bt {
|
|
|
542
541
|
* @param elementSelector element/ элемент
|
|
543
542
|
*/
|
|
544
543
|
setElementControl(t) {
|
|
545
|
-
return this.elementControl =
|
|
544
|
+
return this.elementControl = A(t), this.elementControlEdit = !X(this.elementControl), this.elementControlEdit || (this.elementControl = A(this.element)), this;
|
|
546
545
|
}
|
|
547
546
|
/**
|
|
548
547
|
* Changes the type of the handled event.
|
|
@@ -551,7 +550,7 @@ class bt {
|
|
|
551
550
|
* @param type type/ тип
|
|
552
551
|
*/
|
|
553
552
|
setType(t) {
|
|
554
|
-
return this.type =
|
|
553
|
+
return this.type = H(t), this.reset(), this;
|
|
555
554
|
}
|
|
556
555
|
/**
|
|
557
556
|
* Modifies the object that receives the notification.
|
|
@@ -581,13 +580,12 @@ class bt {
|
|
|
581
580
|
return this.detail = t, this;
|
|
582
581
|
}
|
|
583
582
|
/**
|
|
584
|
-
*
|
|
585
|
-
*
|
|
583
|
+
* Triggers the events on the target element, optionally with a new detail value.
|
|
584
|
+
* This method manually initiates a `CustomEvent` dispatch for all specified types.
|
|
586
585
|
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* @param detail
|
|
590
|
-
* значение, связанное с событием
|
|
586
|
+
* Инициирует события на целевом элементе, опционально с новым значением detail.
|
|
587
|
+
* Этот метод вручную запускает диспетчеризацию `CustomEvent` для всех указанных типов.
|
|
588
|
+
* @param detail the value to be passed as the event detail / значение, которое будет передано как detail события
|
|
591
589
|
*/
|
|
592
590
|
dispatch(t = this.detail) {
|
|
593
591
|
return this.type.forEach(
|
|
@@ -697,7 +695,7 @@ class bt {
|
|
|
697
695
|
return !1;
|
|
698
696
|
}
|
|
699
697
|
}
|
|
700
|
-
const wt = "ui-loading",
|
|
698
|
+
const wt = "ui-loading", Z = class Z {
|
|
701
699
|
/**
|
|
702
700
|
* Check if the loader is active now.
|
|
703
701
|
*
|
|
@@ -740,7 +738,7 @@ const wt = "ui-loading", H = class H {
|
|
|
740
738
|
* @param element element/ элемент
|
|
741
739
|
*/
|
|
742
740
|
static registrationEvent(t, e) {
|
|
743
|
-
if (
|
|
741
|
+
if (f()) {
|
|
744
742
|
const i = new bt(window, wt, t).setElementControl(e).start();
|
|
745
743
|
this.registrationList.push({
|
|
746
744
|
item: i,
|
|
@@ -771,8 +769,8 @@ const wt = "ui-loading", H = class H {
|
|
|
771
769
|
(t = this.event) == null || t.dispatch({ loading: this.is() });
|
|
772
770
|
}
|
|
773
771
|
};
|
|
774
|
-
c(
|
|
775
|
-
let R =
|
|
772
|
+
c(Z, "value", 0), c(Z, "event"), c(Z, "registrationList", []), f() && (Z.event = new bt(window, wt));
|
|
773
|
+
let R = Z;
|
|
776
774
|
class Mt {
|
|
777
775
|
constructor() {
|
|
778
776
|
/** Default headers/ Заголовки по умолчанию */
|
|
@@ -787,7 +785,7 @@ class Mt {
|
|
|
787
785
|
*/
|
|
788
786
|
get(t, e = "application/json;charset=UTF-8") {
|
|
789
787
|
if (t !== null) {
|
|
790
|
-
const i =
|
|
788
|
+
const i = C(
|
|
791
789
|
this.headers,
|
|
792
790
|
t
|
|
793
791
|
);
|
|
@@ -800,10 +798,10 @@ class Mt {
|
|
|
800
798
|
* Изменяет данные заголовка по умолчанию.
|
|
801
799
|
*/
|
|
802
800
|
set(t) {
|
|
803
|
-
return
|
|
801
|
+
return E(t) && (this.headers = t), this;
|
|
804
802
|
}
|
|
805
803
|
}
|
|
806
|
-
var
|
|
804
|
+
var D = /* @__PURE__ */ ((s) => (s.get = "GET", s.post = "POST", s.put = "PUT", s.delete = "DELETE", s))(D || {});
|
|
807
805
|
class Qt {
|
|
808
806
|
constructor() {
|
|
809
807
|
/** Default request data/ Данные запроса по умолчанию */
|
|
@@ -836,8 +834,8 @@ class Qt {
|
|
|
836
834
|
if (e) {
|
|
837
835
|
if (t instanceof FormData)
|
|
838
836
|
this.addByFormData(t, e);
|
|
839
|
-
else if (
|
|
840
|
-
return
|
|
837
|
+
else if (E(t))
|
|
838
|
+
return C(e, t);
|
|
841
839
|
}
|
|
842
840
|
return t;
|
|
843
841
|
}
|
|
@@ -965,7 +963,7 @@ class vt {
|
|
|
965
963
|
* @param response response data/ данные ответа
|
|
966
964
|
*/
|
|
967
965
|
setLastResponse(t) {
|
|
968
|
-
return t &&
|
|
966
|
+
return t && E(t) && ("message" in t && this.setLastMessage(String(t.message)), "status" in t && this.setLastStatus(String(t.status))), this.set({ lastResponse: t }), this;
|
|
969
967
|
}
|
|
970
968
|
/**
|
|
971
969
|
* Sets the last status.
|
|
@@ -1047,7 +1045,7 @@ class _t {
|
|
|
1047
1045
|
* @param response data for caching/ данные для кеширования
|
|
1048
1046
|
*/
|
|
1049
1047
|
add(t) {
|
|
1050
|
-
return this.response.push(...
|
|
1048
|
+
return this.response.push(...H(t)), this;
|
|
1051
1049
|
}
|
|
1052
1050
|
/**
|
|
1053
1051
|
* Sets developer mode.
|
|
@@ -1065,8 +1063,8 @@ class _t {
|
|
|
1065
1063
|
async emulator(t) {
|
|
1066
1064
|
const {
|
|
1067
1065
|
path: e = "",
|
|
1068
|
-
method: i =
|
|
1069
|
-
global: r = i ===
|
|
1066
|
+
method: i = D.get,
|
|
1067
|
+
global: r = i === D.get,
|
|
1070
1068
|
devMode: o = !1
|
|
1071
1069
|
} = t;
|
|
1072
1070
|
if (r || this.isDevMode(o)) {
|
|
@@ -1124,7 +1122,7 @@ class _t {
|
|
|
1124
1122
|
*/
|
|
1125
1123
|
isResponse(t, e) {
|
|
1126
1124
|
const i = this.requestDefault.request(t == null ? void 0 : t.request);
|
|
1127
|
-
return e === i || i === "*any" || y(e) && y(i) &&
|
|
1125
|
+
return e === i || i === "*any" || y(e) && y(i) && E(e) && E(i) && !(e instanceof FormData) && !(i instanceof FormData) && Object.values(e).length === Object.values(i).length && Object.entries(i).reduce(
|
|
1128
1126
|
(r, [o, a]) => r && (a === (e == null ? void 0 : e[o]) || a === "*any"),
|
|
1129
1127
|
!0
|
|
1130
1128
|
);
|
|
@@ -1153,7 +1151,7 @@ class _t {
|
|
|
1153
1151
|
* Включить загрузку для эмуляции запроса.
|
|
1154
1152
|
*/
|
|
1155
1153
|
startResponseLoading() {
|
|
1156
|
-
this.loading && clearTimeout(this.loading),
|
|
1154
|
+
this.loading && clearTimeout(this.loading), f() && document.body.classList.add(St);
|
|
1157
1155
|
}
|
|
1158
1156
|
/**
|
|
1159
1157
|
* Disable loading for request emulation.
|
|
@@ -1162,7 +1160,7 @@ class _t {
|
|
|
1162
1160
|
*/
|
|
1163
1161
|
stopResponseLoading() {
|
|
1164
1162
|
this.loading = setTimeout(() => {
|
|
1165
|
-
this.loading = void 0,
|
|
1163
|
+
this.loading = void 0, f() && document.body.classList.remove(St);
|
|
1166
1164
|
}, 1200);
|
|
1167
1165
|
}
|
|
1168
1166
|
}
|
|
@@ -1283,11 +1281,11 @@ const v = class v {
|
|
|
1283
1281
|
* @param request this request/ данный запрос
|
|
1284
1282
|
* @param method method for request/ метод запрос
|
|
1285
1283
|
*/
|
|
1286
|
-
static getBody(t = {}, e =
|
|
1284
|
+
static getBody(t = {}, e = D.get) {
|
|
1287
1285
|
if (t instanceof FormData)
|
|
1288
1286
|
return t;
|
|
1289
|
-
if (e !==
|
|
1290
|
-
return
|
|
1287
|
+
if (e !== D.get && y(t))
|
|
1288
|
+
return U(t) ? t : JSON.stringify(t);
|
|
1291
1289
|
}
|
|
1292
1290
|
/**
|
|
1293
1291
|
* Getting data for the body of the get method.
|
|
@@ -1297,8 +1295,8 @@ const v = class v {
|
|
|
1297
1295
|
* @param path path to request/ путь к запрос
|
|
1298
1296
|
* @param method method for request/ метод запрос
|
|
1299
1297
|
*/
|
|
1300
|
-
static getBodyForGet(t, e = "", i =
|
|
1301
|
-
if (i ===
|
|
1298
|
+
static getBodyForGet(t, e = "", i = D.get) {
|
|
1299
|
+
if (i === D.get) {
|
|
1302
1300
|
const r = e.match(/\?/) ? "&" : "?", o = typeof t == "object" ? Pt(t) : t;
|
|
1303
1301
|
if (y(o))
|
|
1304
1302
|
return `${r}${o}`;
|
|
@@ -1355,7 +1353,7 @@ const v = class v {
|
|
|
1355
1353
|
* @param pathRequest query string or list of parameters/ строка запроса или список параметров
|
|
1356
1354
|
*/
|
|
1357
1355
|
static async request(t) {
|
|
1358
|
-
return
|
|
1356
|
+
return U(t) ? await this.fetch({
|
|
1359
1357
|
path: t
|
|
1360
1358
|
}) : await this.fetch(t);
|
|
1361
1359
|
}
|
|
@@ -1366,8 +1364,8 @@ const v = class v {
|
|
|
1366
1364
|
* @param request list of parameters/ список параметров
|
|
1367
1365
|
*/
|
|
1368
1366
|
static get(t) {
|
|
1369
|
-
return this.request(
|
|
1370
|
-
method:
|
|
1367
|
+
return this.request(C(t, {
|
|
1368
|
+
method: D.get
|
|
1371
1369
|
}));
|
|
1372
1370
|
}
|
|
1373
1371
|
/**
|
|
@@ -1377,8 +1375,8 @@ const v = class v {
|
|
|
1377
1375
|
* @param request list of parameters/ список параметров
|
|
1378
1376
|
*/
|
|
1379
1377
|
static post(t) {
|
|
1380
|
-
return this.request(
|
|
1381
|
-
method:
|
|
1378
|
+
return this.request(C(t, {
|
|
1379
|
+
method: D.post
|
|
1382
1380
|
}));
|
|
1383
1381
|
}
|
|
1384
1382
|
/**
|
|
@@ -1388,8 +1386,8 @@ const v = class v {
|
|
|
1388
1386
|
* @param request list of parameters/ список параметров
|
|
1389
1387
|
*/
|
|
1390
1388
|
static put(t) {
|
|
1391
|
-
return this.request(
|
|
1392
|
-
method:
|
|
1389
|
+
return this.request(C(t, {
|
|
1390
|
+
method: D.put
|
|
1393
1391
|
}));
|
|
1394
1392
|
}
|
|
1395
1393
|
/**
|
|
@@ -1399,8 +1397,8 @@ const v = class v {
|
|
|
1399
1397
|
* @param request list of parameters/ список параметров
|
|
1400
1398
|
*/
|
|
1401
1399
|
static delete(t) {
|
|
1402
|
-
return this.request(
|
|
1403
|
-
method:
|
|
1400
|
+
return this.request(C(t, {
|
|
1401
|
+
method: D.delete
|
|
1404
1402
|
}));
|
|
1405
1403
|
}
|
|
1406
1404
|
/**
|
|
@@ -1420,23 +1418,23 @@ const v = class v {
|
|
|
1420
1418
|
if (u)
|
|
1421
1419
|
return u;
|
|
1422
1420
|
const h = new vt();
|
|
1423
|
-
let
|
|
1421
|
+
let d;
|
|
1424
1422
|
R.show();
|
|
1425
1423
|
try {
|
|
1426
1424
|
await this.preparation.make(o, t);
|
|
1427
|
-
const
|
|
1428
|
-
if (h.setStatus(
|
|
1425
|
+
const l = await this.makeQuery(t), S = await this.preparation.makeEnd(a, l, t);
|
|
1426
|
+
if (h.setStatus(l.status, l.statusText), this.status.setStatus(l.status, l.statusText), S != null && S.reset)
|
|
1429
1427
|
return R.hide(), await this.fetch(t);
|
|
1430
|
-
|
|
1431
|
-
|
|
1428
|
+
d = await this.readData(
|
|
1429
|
+
l,
|
|
1432
1430
|
r,
|
|
1433
1431
|
S
|
|
1434
1432
|
);
|
|
1435
|
-
} catch (
|
|
1436
|
-
throw i || console.error("Api: ",
|
|
1433
|
+
} catch (l) {
|
|
1434
|
+
throw i || console.error("Api: ", l), h.setError(String(l)), this.status.setError(String(l)), R.hide(), l;
|
|
1437
1435
|
}
|
|
1438
|
-
return R.hide(), h.setLastResponse(
|
|
1439
|
-
this.makeData(
|
|
1436
|
+
return R.hide(), h.setLastResponse(d), this.status.setLastResponse(d), this.makeStatus(
|
|
1437
|
+
this.makeData(d, e),
|
|
1440
1438
|
h
|
|
1441
1439
|
);
|
|
1442
1440
|
}
|
|
@@ -1463,16 +1461,16 @@ const v = class v {
|
|
|
1463
1461
|
api: i = !0,
|
|
1464
1462
|
path: r = "",
|
|
1465
1463
|
pathFull: o = void 0,
|
|
1466
|
-
method: a =
|
|
1464
|
+
method: a = D.get,
|
|
1467
1465
|
headers: u = {},
|
|
1468
1466
|
type: h = "application/json;charset=UTF-8",
|
|
1469
|
-
init:
|
|
1470
|
-
controller:
|
|
1471
|
-
} = t, S = o != null ? o : this.getUrl(r, i),
|
|
1467
|
+
init: d = {},
|
|
1468
|
+
controller: l = void 0
|
|
1469
|
+
} = t, S = o != null ? o : this.getUrl(r, i), it = `${S}${this.getBodyForGet(e, S, a)}`, _ = this.headers.get(u, h), q = C(d, {
|
|
1472
1470
|
method: a,
|
|
1473
1471
|
body: this.getBody(e, a)
|
|
1474
1472
|
});
|
|
1475
|
-
return _ && (q.headers = _),
|
|
1473
|
+
return _ && (q.headers = _), l && (q.signal = l.signal), await fetch(it, q);
|
|
1476
1474
|
}
|
|
1477
1475
|
/**
|
|
1478
1476
|
* Transforms data if needed.
|
|
@@ -1482,11 +1480,11 @@ const v = class v {
|
|
|
1482
1480
|
* @param toData is it necessary to process the data/ нужно ли обрабатывать данные
|
|
1483
1481
|
*/
|
|
1484
1482
|
static makeData(t, e) {
|
|
1485
|
-
if (!e || !t || !
|
|
1483
|
+
if (!e || !t || !E(t) || !("data" in t))
|
|
1486
1484
|
return t;
|
|
1487
|
-
if (t.data !== null && typeof t.data != "object" ||
|
|
1485
|
+
if (t.data !== null && typeof t.data != "object" || et(t.data))
|
|
1488
1486
|
return t.data;
|
|
1489
|
-
const i =
|
|
1487
|
+
const i = C(t.data);
|
|
1490
1488
|
return "success" in t && !("success" in i) && (i.success = t.success), "status" in t && !("status" in i) && (i.status = t.status), "message" in t && !("message" in i) && (i.message = t.message), i;
|
|
1491
1489
|
}
|
|
1492
1490
|
/**
|
|
@@ -1497,14 +1495,14 @@ const v = class v {
|
|
|
1497
1495
|
* @param status status object/ объект статуса
|
|
1498
1496
|
*/
|
|
1499
1497
|
static makeStatus(t, e) {
|
|
1500
|
-
return t &&
|
|
1498
|
+
return t && E(t) ? {
|
|
1501
1499
|
...t,
|
|
1502
1500
|
statusObject: e.get()
|
|
1503
1501
|
} : t;
|
|
1504
1502
|
}
|
|
1505
1503
|
};
|
|
1506
1504
|
c(v, "url", "/api/"), c(v, "headers", new Mt()), c(v, "requestDefault", new Qt()), c(v, "status", new vt()), c(v, "response", new _t(v.requestDefault)), c(v, "preparation", new Ot());
|
|
1507
|
-
let
|
|
1505
|
+
let W = v;
|
|
1508
1506
|
class He {
|
|
1509
1507
|
/**
|
|
1510
1508
|
* Constructor
|
|
@@ -1534,7 +1532,7 @@ class He {
|
|
|
1534
1532
|
var e;
|
|
1535
1533
|
return (e = this.callbackError) == null || e.call(this, t), this;
|
|
1536
1534
|
});
|
|
1537
|
-
if (this.callback = e, this.callbackError = i,
|
|
1535
|
+
if (this.callback = e, this.callbackError = i, f())
|
|
1538
1536
|
try {
|
|
1539
1537
|
this.channel = new BroadcastChannel(`${Tt()}__${t}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1540
1538
|
} catch (r) {
|
|
@@ -1579,7 +1577,7 @@ class He {
|
|
|
1579
1577
|
return this.callbackError = t, this;
|
|
1580
1578
|
}
|
|
1581
1579
|
}
|
|
1582
|
-
const Tt = () => new
|
|
1580
|
+
const Tt = () => new st("__broadcast-name").get(() => `name_${Q(1e6, 9999999)}`);
|
|
1583
1581
|
class Gt {
|
|
1584
1582
|
/**
|
|
1585
1583
|
* Constructor
|
|
@@ -1695,7 +1693,7 @@ const tt = class tt {
|
|
|
1695
1693
|
};
|
|
1696
1694
|
c(tt, "cache"), tt.cache = new te();
|
|
1697
1695
|
let Lt = tt;
|
|
1698
|
-
function
|
|
1696
|
+
function Wt(s, t = !1) {
|
|
1699
1697
|
if (typeof s == "string") {
|
|
1700
1698
|
const e = s.trim();
|
|
1701
1699
|
switch (e) {
|
|
@@ -1719,7 +1717,7 @@ function jt(s, t = !1) {
|
|
|
1719
1717
|
return parseFloat(e);
|
|
1720
1718
|
if (/^[0-9]+$/.exec(e))
|
|
1721
1719
|
return parseInt(e, 10);
|
|
1722
|
-
if (t &&
|
|
1720
|
+
if (t && f() && typeof (window == null ? void 0 : window[e]) == "function")
|
|
1723
1721
|
return window[e];
|
|
1724
1722
|
}
|
|
1725
1723
|
}
|
|
@@ -1747,14 +1745,14 @@ class Ut {
|
|
|
1747
1745
|
this.storage.set(t);
|
|
1748
1746
|
}
|
|
1749
1747
|
}
|
|
1750
|
-
c(Ut, "storage", new
|
|
1748
|
+
c(Ut, "storage", new st(ee));
|
|
1751
1749
|
const O = {}, mt = class mt {
|
|
1752
1750
|
constructor(t) {
|
|
1753
1751
|
c(this, "value");
|
|
1754
1752
|
c(this, "options", {});
|
|
1755
|
-
if (this.name = t, t in
|
|
1756
|
-
return
|
|
1757
|
-
this.value = O == null ? void 0 : O[t],
|
|
1753
|
+
if (this.name = t, t in nt)
|
|
1754
|
+
return nt[t];
|
|
1755
|
+
this.value = O == null ? void 0 : O[t], nt[t] = this;
|
|
1758
1756
|
}
|
|
1759
1757
|
/**
|
|
1760
1758
|
* Get data or update if none.
|
|
@@ -1800,7 +1798,7 @@ const O = {}, mt = class mt {
|
|
|
1800
1798
|
*/
|
|
1801
1799
|
update() {
|
|
1802
1800
|
var t, e, i, r, o;
|
|
1803
|
-
if (
|
|
1801
|
+
if (f() && !ut() && !Ut.get()) {
|
|
1804
1802
|
const a = String((t = this.value) != null ? t : "");
|
|
1805
1803
|
document.cookie = [
|
|
1806
1804
|
`${encodeURIComponent(this.name)}=${encodeURIComponent(a)}`,
|
|
@@ -1818,15 +1816,15 @@ const O = {}, mt = class mt {
|
|
|
1818
1816
|
static updateData() {
|
|
1819
1817
|
for (const t of document.cookie.split(";")) {
|
|
1820
1818
|
const [e, i] = t.trim().split("=");
|
|
1821
|
-
e && y(i) && (O[e] =
|
|
1819
|
+
e && y(i) && (O[e] = Wt(i));
|
|
1822
1820
|
}
|
|
1823
1821
|
}
|
|
1824
1822
|
};
|
|
1825
|
-
|
|
1826
|
-
let
|
|
1827
|
-
const
|
|
1823
|
+
f() && !ut() && mt.updateData();
|
|
1824
|
+
let Dt = mt;
|
|
1825
|
+
const nt = {};
|
|
1828
1826
|
function P(s) {
|
|
1829
|
-
var r, o, a, u, h,
|
|
1827
|
+
var r, o, a, u, h, d, l, S;
|
|
1830
1828
|
if (s instanceof Date)
|
|
1831
1829
|
return s;
|
|
1832
1830
|
if (X(s))
|
|
@@ -1834,12 +1832,12 @@ function P(s) {
|
|
|
1834
1832
|
if (typeof s == "number")
|
|
1835
1833
|
return new Date(s);
|
|
1836
1834
|
let t = s, e = b.getTimezoneFormat().trim();
|
|
1837
|
-
s.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (
|
|
1838
|
-
const i = (S = (
|
|
1835
|
+
s.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (it, _, q) => (t = _, e = q.trim(), it));
|
|
1836
|
+
const i = (S = (l = (d = (h = (u = (a = (o = (r = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? r : /^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) != null ? o : /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(t) && t.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6")) != null ? a : /^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) != null ? u : /^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) != null ? h : /^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) != null ? d : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? l : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? S : t.replace(" ", "T");
|
|
1839
1837
|
return /* @__PURE__ */ new Date(`${i.trim()}${e}`);
|
|
1840
1838
|
}
|
|
1841
1839
|
function se(s, t) {
|
|
1842
|
-
return
|
|
1840
|
+
return g(s, (e) => e == null ? void 0 : e[t], !0);
|
|
1843
1841
|
}
|
|
1844
1842
|
class N {
|
|
1845
1843
|
/**
|
|
@@ -1851,9 +1849,9 @@ class N {
|
|
|
1851
1849
|
c(this, "geo");
|
|
1852
1850
|
this.geo = b.find(t);
|
|
1853
1851
|
const e = this.getLocation();
|
|
1854
|
-
if (e in
|
|
1855
|
-
return
|
|
1856
|
-
|
|
1852
|
+
if (e in ot)
|
|
1853
|
+
return ot[e];
|
|
1854
|
+
ot[e] = this;
|
|
1857
1855
|
}
|
|
1858
1856
|
/**
|
|
1859
1857
|
* Returns an instance of the class according to the specified country code.
|
|
@@ -1897,7 +1895,7 @@ class N {
|
|
|
1897
1895
|
...e
|
|
1898
1896
|
});
|
|
1899
1897
|
try {
|
|
1900
|
-
|
|
1898
|
+
typeof Intl != "undefined" && (t ? r = new Intl.DisplayNames(this.getLocation(), i).of(t) : i.type === "language" ? r = new Intl.DisplayNames(this.getLocation(), i).of(this.geo.language) : i.type === "region" && (r = new Intl.DisplayNames(this.getLocation(), i).of(this.geo.country)));
|
|
1901
1899
|
} catch (a) {
|
|
1902
1900
|
console.error("display: ", a);
|
|
1903
1901
|
}
|
|
@@ -2054,7 +2052,7 @@ class N {
|
|
|
2054
2052
|
*/
|
|
2055
2053
|
sizeFile(t, e = "byte") {
|
|
2056
2054
|
const i = k(t);
|
|
2057
|
-
if (i > 1024 &&
|
|
2055
|
+
if (i > 1024 && U(e))
|
|
2058
2056
|
switch (e) {
|
|
2059
2057
|
case "byte":
|
|
2060
2058
|
return this.sizeFile(i / 1024, "kilobyte");
|
|
@@ -2106,30 +2104,30 @@ class N {
|
|
|
2106
2104
|
const o = k(t), a = e.split("|");
|
|
2107
2105
|
if (a.length > 1)
|
|
2108
2106
|
try {
|
|
2109
|
-
if (
|
|
2110
|
-
const
|
|
2111
|
-
let
|
|
2112
|
-
switch (
|
|
2107
|
+
if (typeof Intl != "undefined") {
|
|
2108
|
+
const d = new Intl.PluralRules(this.getLocation(), i).select(o);
|
|
2109
|
+
let l;
|
|
2110
|
+
switch (d) {
|
|
2113
2111
|
case "zero":
|
|
2114
|
-
|
|
2112
|
+
l = a[a.length - 1];
|
|
2115
2113
|
break;
|
|
2116
2114
|
case "one":
|
|
2117
|
-
|
|
2115
|
+
l = a == null ? void 0 : a[0];
|
|
2118
2116
|
break;
|
|
2119
2117
|
case "two":
|
|
2120
|
-
|
|
2118
|
+
l = a == null ? void 0 : a[1];
|
|
2121
2119
|
break;
|
|
2122
2120
|
case "few":
|
|
2123
|
-
|
|
2121
|
+
l = a != null && a[3] ? a == null ? void 0 : a[2] : a == null ? void 0 : a[1];
|
|
2124
2122
|
break;
|
|
2125
2123
|
case "many":
|
|
2126
|
-
|
|
2124
|
+
l = (a == null ? void 0 : a[3]) || (a == null ? void 0 : a[2]) || (a == null ? void 0 : a[1]);
|
|
2127
2125
|
break;
|
|
2128
2126
|
case "other":
|
|
2129
|
-
a.length === 6 ?
|
|
2127
|
+
a.length === 6 ? l = a[a.length - 2] : l = a[a.length - 1];
|
|
2130
2128
|
break;
|
|
2131
2129
|
}
|
|
2132
|
-
return `${this.number(o, r)} ${
|
|
2130
|
+
return `${this.number(o, r)} ${l != null ? l : ""}`.trim();
|
|
2133
2131
|
}
|
|
2134
2132
|
} catch (h) {
|
|
2135
2133
|
console.error("plural: ", h);
|
|
@@ -2185,11 +2183,11 @@ class N {
|
|
|
2185
2183
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
2186
2184
|
*/
|
|
2187
2185
|
relativeLimit(t, e, i, r, o, a, u) {
|
|
2188
|
-
const h = P(t),
|
|
2189
|
-
return
|
|
2186
|
+
const h = P(t), d = i || /* @__PURE__ */ new Date(), l = new Date(d), S = new Date(d);
|
|
2187
|
+
return l.setDate(d.getDate() - e), S.setDate(d.getDate() + e), h >= l && h <= S ? this.relative(
|
|
2190
2188
|
h,
|
|
2191
2189
|
r,
|
|
2192
|
-
|
|
2190
|
+
d
|
|
2193
2191
|
) : this.date(
|
|
2194
2192
|
h,
|
|
2195
2193
|
a,
|
|
@@ -2209,7 +2207,7 @@ class N {
|
|
|
2209
2207
|
...typeof i == "string" ? { style: i } : i || {}
|
|
2210
2208
|
};
|
|
2211
2209
|
try {
|
|
2212
|
-
if (
|
|
2210
|
+
if (this.hasIntl() && typeof Intl.RelativeTimeFormat != "undefined")
|
|
2213
2211
|
return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(k(t)), e);
|
|
2214
2212
|
} catch (o) {
|
|
2215
2213
|
console.error("relative: ", o);
|
|
@@ -2224,7 +2222,7 @@ class N {
|
|
|
2224
2222
|
*/
|
|
2225
2223
|
month(t, e) {
|
|
2226
2224
|
try {
|
|
2227
|
-
if (
|
|
2225
|
+
if (this.hasIntlDateTimeFormat())
|
|
2228
2226
|
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(P(t));
|
|
2229
2227
|
} catch (i) {
|
|
2230
2228
|
console.error("month: ", i);
|
|
@@ -2243,7 +2241,7 @@ class N {
|
|
|
2243
2241
|
value: void 0
|
|
2244
2242
|
}];
|
|
2245
2243
|
try {
|
|
2246
|
-
if (
|
|
2244
|
+
if (this.hasIntlDateTimeFormat()) {
|
|
2247
2245
|
const i = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
|
|
2248
2246
|
for (let o = 0; o < 12; o++)
|
|
2249
2247
|
i.setMonth(o), e.push({
|
|
@@ -2265,7 +2263,7 @@ class N {
|
|
|
2265
2263
|
*/
|
|
2266
2264
|
weekday(t, e) {
|
|
2267
2265
|
try {
|
|
2268
|
-
if (
|
|
2266
|
+
if (this.hasIntlDateTimeFormat())
|
|
2269
2267
|
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(P(t));
|
|
2270
2268
|
} catch (i) {
|
|
2271
2269
|
console.error("weekday: ", i);
|
|
@@ -2284,7 +2282,7 @@ class N {
|
|
|
2284
2282
|
value: void 0
|
|
2285
2283
|
}];
|
|
2286
2284
|
try {
|
|
2287
|
-
if (
|
|
2285
|
+
if (this.hasIntlDateTimeFormat()) {
|
|
2288
2286
|
const i = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), o = i.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
|
|
2289
2287
|
i.setDate(i.getDate() - o);
|
|
2290
2288
|
for (let a = 0; a < 7; a++)
|
|
@@ -2315,12 +2313,28 @@ class N {
|
|
|
2315
2313
|
* @param compareFn a function for sorting/ функция для сортировки
|
|
2316
2314
|
*/
|
|
2317
2315
|
sort(t, e = (i, r) => [i, r]) {
|
|
2318
|
-
if (
|
|
2316
|
+
if (this.hasIntl() && typeof Intl.Collator != "undefined") {
|
|
2319
2317
|
const i = new Intl.Collator(this.getLocation());
|
|
2320
2318
|
return t.sort((r, o) => i.compare(...e(r, o)));
|
|
2321
2319
|
}
|
|
2322
2320
|
return t;
|
|
2323
2321
|
}
|
|
2322
|
+
/**
|
|
2323
|
+
* Checks if the Intl object is available.
|
|
2324
|
+
*
|
|
2325
|
+
* Проверяет доступность объекта Intl.
|
|
2326
|
+
*/
|
|
2327
|
+
hasIntl() {
|
|
2328
|
+
return typeof Intl != "undefined";
|
|
2329
|
+
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Checks if the Intl.DateTimeFormat object is available.
|
|
2332
|
+
*
|
|
2333
|
+
* Проверяет доступность объекта Intl.DateTimeFormat.
|
|
2334
|
+
*/
|
|
2335
|
+
hasIntlDateTimeFormat() {
|
|
2336
|
+
return this.hasIntl() && typeof Intl.DateTimeFormat != "undefined";
|
|
2337
|
+
}
|
|
2324
2338
|
/**
|
|
2325
2339
|
* The object enables language-sensitive number formatting.
|
|
2326
2340
|
*
|
|
@@ -2330,7 +2344,7 @@ class N {
|
|
|
2330
2344
|
*/
|
|
2331
2345
|
numberObject(t) {
|
|
2332
2346
|
try {
|
|
2333
|
-
if (
|
|
2347
|
+
if (this.hasIntl() && typeof Intl.NumberFormat != "undefined")
|
|
2334
2348
|
return new Intl.NumberFormat(this.getLocation(), t);
|
|
2335
2349
|
} catch (e) {
|
|
2336
2350
|
console.error("numberObject: ", e);
|
|
@@ -2348,7 +2362,7 @@ class N {
|
|
|
2348
2362
|
return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (i.year = "numeric"), ["full", "datetime", "date", void 0, "year-month", "month", "day-month"].indexOf(t) !== -1 && (i.month = e), ["full", "datetime", "date", void 0, "day", "day-month"].indexOf(t) !== -1 && (i.day = "2-digit"), t !== void 0 && (["full", "datetime", "time", "hour-minute", "hour"].indexOf(t) !== -1 && (i.hour = "2-digit"), ["full", "datetime", "time", "hour-minute", "minute"].indexOf(t) !== -1 && (i.minute = "2-digit"), ["full", "time", "second"].indexOf(t) !== -1 && (i.second = "2-digit")), i;
|
|
2349
2363
|
}
|
|
2350
2364
|
}
|
|
2351
|
-
const
|
|
2365
|
+
const ot = {};
|
|
2352
2366
|
class gt {
|
|
2353
2367
|
/**
|
|
2354
2368
|
* Constructor
|
|
@@ -2990,7 +3004,7 @@ class gt {
|
|
|
2990
3004
|
* @param hour hour/ час
|
|
2991
3005
|
*/
|
|
2992
3006
|
toTimeZoneHourFormat(t) {
|
|
2993
|
-
|
|
3007
|
+
f() && this.getIntl().number(Math.trunc(t), {
|
|
2994
3008
|
signDisplay: "always",
|
|
2995
3009
|
minimumIntegerDigits: 2
|
|
2996
3010
|
});
|
|
@@ -3014,7 +3028,7 @@ class gt {
|
|
|
3014
3028
|
}
|
|
3015
3029
|
function T(s) {
|
|
3016
3030
|
var t;
|
|
3017
|
-
return
|
|
3031
|
+
return U(s) ? s.trim() : et(s) && s.findIndex((e) => m(e)) === -1 ? s.join(",") : m(s) ? JSON.stringify(s) : s === !0 ? "1" : s === !1 ? "0" : (t = s == null ? void 0 : s.toString()) != null ? t : "";
|
|
3018
3032
|
}
|
|
3019
3033
|
function ie(s, t, e) {
|
|
3020
3034
|
const i = T(s);
|
|
@@ -3049,6 +3063,33 @@ class ze {
|
|
|
3049
3063
|
constructor(t, e) {
|
|
3050
3064
|
this.options = t, this.list = e;
|
|
3051
3065
|
}
|
|
3066
|
+
/**
|
|
3067
|
+
* Checks if the list is set.
|
|
3068
|
+
*
|
|
3069
|
+
* Проверяет, установлен ли список.
|
|
3070
|
+
* @returns true if the list is set, false otherwise/ true, если список установлен, иначе false
|
|
3071
|
+
*/
|
|
3072
|
+
is() {
|
|
3073
|
+
return !!this.list;
|
|
3074
|
+
}
|
|
3075
|
+
/**
|
|
3076
|
+
* Checks if the list is an array.
|
|
3077
|
+
*
|
|
3078
|
+
* Проверяет, является ли список массивом.
|
|
3079
|
+
* @returns true if the list is an array, false otherwise/ true, если список является массивом, иначе false
|
|
3080
|
+
*/
|
|
3081
|
+
isArray() {
|
|
3082
|
+
return Array.isArray(this.list);
|
|
3083
|
+
}
|
|
3084
|
+
/**
|
|
3085
|
+
* Returns the count of records in the list.
|
|
3086
|
+
*
|
|
3087
|
+
* Возвращает количество записей в списке.
|
|
3088
|
+
* @returns count of records/ количество записей
|
|
3089
|
+
*/
|
|
3090
|
+
length() {
|
|
3091
|
+
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
3092
|
+
}
|
|
3052
3093
|
/**
|
|
3053
3094
|
* Returns the current list of data.
|
|
3054
3095
|
*
|
|
@@ -3056,7 +3097,7 @@ class ze {
|
|
|
3056
3097
|
* @returns the list of data or undefined if not set/ список данных или undefined, если не задан
|
|
3057
3098
|
*/
|
|
3058
3099
|
getList() {
|
|
3059
|
-
return this.list;
|
|
3100
|
+
return this.list ? H(this.list) : [];
|
|
3060
3101
|
}
|
|
3061
3102
|
/**
|
|
3062
3103
|
* Returns the current formatting options.
|
|
@@ -3078,19 +3119,20 @@ class ze {
|
|
|
3078
3119
|
return this.list = t, this;
|
|
3079
3120
|
}
|
|
3080
3121
|
/**
|
|
3081
|
-
* Formats the entire list based on the provided options.
|
|
3122
|
+
* Formats the entire list or a single item based on the provided options.
|
|
3082
3123
|
* Adds formatted values with the suffix 'Format' to each item.
|
|
3083
3124
|
*
|
|
3084
|
-
* Форматирует весь список на основе предоставленных параметров.
|
|
3125
|
+
* Форматирует весь список или один элемент на основе предоставленных параметров.
|
|
3085
3126
|
* Добавляет отформатированные значения с суффиксом 'Format' к каждому элементу.
|
|
3086
|
-
* @returns
|
|
3087
|
-
* список
|
|
3127
|
+
* @returns formatted data (list or single item) with additional formatted columns /
|
|
3128
|
+
* отформатированные данные (список или один элемент) с дополнительными отформатированными столбцами
|
|
3088
3129
|
*/
|
|
3089
3130
|
to() {
|
|
3090
|
-
|
|
3091
|
-
...
|
|
3092
|
-
...this.getFormatData(
|
|
3093
|
-
}))
|
|
3131
|
+
const t = g(this.getList(), (e) => ({
|
|
3132
|
+
...e,
|
|
3133
|
+
...this.getFormatData(e)
|
|
3134
|
+
}));
|
|
3135
|
+
return this.isArray() ? t : t[0];
|
|
3094
3136
|
}
|
|
3095
3137
|
/**
|
|
3096
3138
|
* Generates formatted data for a single item based on options.
|
|
@@ -3101,7 +3143,7 @@ class ze {
|
|
|
3101
3143
|
*/
|
|
3102
3144
|
getFormatData(t) {
|
|
3103
3145
|
const e = {};
|
|
3104
|
-
return
|
|
3146
|
+
return g(
|
|
3105
3147
|
this.options,
|
|
3106
3148
|
(i, r) => {
|
|
3107
3149
|
const o = `${Ht(r)}Format`, a = x(t, r);
|
|
@@ -3250,7 +3292,7 @@ class ze {
|
|
|
3250
3292
|
return e && e.unit ? N.getInstance().unit(t, e.unit) : t;
|
|
3251
3293
|
}
|
|
3252
3294
|
}
|
|
3253
|
-
const n = "f",
|
|
3295
|
+
const n = "f", V = class V {
|
|
3254
3296
|
/**
|
|
3255
3297
|
* Constructor
|
|
3256
3298
|
* @param code country and language code/ код страны и языка
|
|
@@ -3273,7 +3315,7 @@ const n = "f", z = class z {
|
|
|
3273
3315
|
language: this.getLanguage(e),
|
|
3274
3316
|
country: r,
|
|
3275
3317
|
standard: e.standard,
|
|
3276
|
-
icon: (i =
|
|
3318
|
+
icon: (i = V.flags) == null ? void 0 : i[e.country],
|
|
3277
3319
|
label: r,
|
|
3278
3320
|
value: e.country
|
|
3279
3321
|
};
|
|
@@ -3296,7 +3338,7 @@ const n = "f", z = class z {
|
|
|
3296
3338
|
* @param codes country code/ код страны
|
|
3297
3339
|
*/
|
|
3298
3340
|
getList(t) {
|
|
3299
|
-
return
|
|
3341
|
+
return g(this.getCodes(t), (e) => this.get(e));
|
|
3300
3342
|
}
|
|
3301
3343
|
/**
|
|
3302
3344
|
* Getting a list of countries by an array of codes in national language.
|
|
@@ -3305,8 +3347,8 @@ const n = "f", z = class z {
|
|
|
3305
3347
|
* @param codes country code/ код страны.
|
|
3306
3348
|
*/
|
|
3307
3349
|
getNational(t) {
|
|
3308
|
-
return
|
|
3309
|
-
const i = new
|
|
3350
|
+
return g(this.getList(t), (e) => {
|
|
3351
|
+
const i = new V(e.standard).get(e.standard);
|
|
3310
3352
|
return {
|
|
3311
3353
|
...e,
|
|
3312
3354
|
description: i == null ? void 0 : i.country,
|
|
@@ -3339,7 +3381,7 @@ const n = "f", z = class z {
|
|
|
3339
3381
|
* @param codes country code/ код страны
|
|
3340
3382
|
*/
|
|
3341
3383
|
getCodes(t) {
|
|
3342
|
-
return t != null ? t : Object.keys(
|
|
3384
|
+
return t != null ? t : Object.keys(V.flags);
|
|
3343
3385
|
}
|
|
3344
3386
|
/**
|
|
3345
3387
|
* Getting the name of the language.
|
|
@@ -3360,7 +3402,7 @@ const n = "f", z = class z {
|
|
|
3360
3402
|
return this.getLocation().countryName(t.country);
|
|
3361
3403
|
}
|
|
3362
3404
|
};
|
|
3363
|
-
c(
|
|
3405
|
+
c(V, "flags", {
|
|
3364
3406
|
AD: `${n}-ad`,
|
|
3365
3407
|
AE: `${n}-ae`,
|
|
3366
3408
|
AF: `${n}-af`,
|
|
@@ -3603,8 +3645,8 @@ c(z, "flags", {
|
|
|
3603
3645
|
ZM: `${n}-zm`,
|
|
3604
3646
|
ZW: `${n}-zw`
|
|
3605
3647
|
});
|
|
3606
|
-
let
|
|
3607
|
-
const
|
|
3648
|
+
let Ct = V;
|
|
3649
|
+
const K = class K {
|
|
3608
3650
|
/**
|
|
3609
3651
|
* Getting an object with information about the phone code and country.
|
|
3610
3652
|
*
|
|
@@ -3624,9 +3666,9 @@ const Z = class Z {
|
|
|
3624
3666
|
var a, u, h;
|
|
3625
3667
|
const e = this.toNumber(t), i = [""];
|
|
3626
3668
|
let r = this.map, o;
|
|
3627
|
-
for (const
|
|
3628
|
-
if (i[i.length - 1] +=
|
|
3629
|
-
(a = r[
|
|
3669
|
+
for (const d of e)
|
|
3670
|
+
if (i[i.length - 1] += d, d in r)
|
|
3671
|
+
(a = r[d]) != null && a.value && (o = r[d], i.push("")), r = (h = (u = r[d]) == null ? void 0 : u.next) != null ? h : {};
|
|
3630
3672
|
else
|
|
3631
3673
|
break;
|
|
3632
3674
|
return o ? (i.pop(), {
|
|
@@ -3722,12 +3764,12 @@ const Z = class Z {
|
|
|
3722
3764
|
* Формирование списка для карты.
|
|
3723
3765
|
*/
|
|
3724
3766
|
static makeList() {
|
|
3725
|
-
const t =
|
|
3767
|
+
const t = g(b.getList(), (e) => {
|
|
3726
3768
|
if (e != null && e.phoneMask)
|
|
3727
3769
|
return {
|
|
3728
3770
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
|
|
3729
3771
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3730
|
-
mask:
|
|
3772
|
+
mask: H(e.phoneMask),
|
|
3731
3773
|
value: e.country
|
|
3732
3774
|
};
|
|
3733
3775
|
});
|
|
@@ -3791,8 +3833,8 @@ const Z = class Z {
|
|
|
3791
3833
|
return t.replace(/\*/, this.getWithinSymbol(e));
|
|
3792
3834
|
}
|
|
3793
3835
|
};
|
|
3794
|
-
c(
|
|
3795
|
-
let kt =
|
|
3836
|
+
c(K, "list", []), c(K, "map", {}), K.makeList(), K.makeMap();
|
|
3837
|
+
let kt = K, z;
|
|
3796
3838
|
class Ze {
|
|
3797
3839
|
/**
|
|
3798
3840
|
* Returns the value by its name.
|
|
@@ -3801,7 +3843,7 @@ class Ze {
|
|
|
3801
3843
|
* @param name property name/ название свойства
|
|
3802
3844
|
*/
|
|
3803
3845
|
static get(t) {
|
|
3804
|
-
return
|
|
3846
|
+
return z && (z == null ? void 0 : z[t]);
|
|
3805
3847
|
}
|
|
3806
3848
|
/**
|
|
3807
3849
|
* Adds data, this method works only once.
|
|
@@ -3810,10 +3852,10 @@ class Ze {
|
|
|
3810
3852
|
* @param data global data/ глобальные данные
|
|
3811
3853
|
*/
|
|
3812
3854
|
static add(t) {
|
|
3813
|
-
|
|
3855
|
+
z === void 0 && (z = C(t));
|
|
3814
3856
|
}
|
|
3815
3857
|
}
|
|
3816
|
-
const
|
|
3858
|
+
const j = class j {
|
|
3817
3859
|
/**
|
|
3818
3860
|
* Get data from hash.
|
|
3819
3861
|
*
|
|
@@ -3879,7 +3921,7 @@ const W = class W {
|
|
|
3879
3921
|
const t = {};
|
|
3880
3922
|
return location.hash.replace(
|
|
3881
3923
|
/([\w-]+)[:=]([^;]+)/ig,
|
|
3882
|
-
(...e) => (t[String(e[1])] =
|
|
3924
|
+
(...e) => (t[String(e[1])] = Wt(e[2]), "")
|
|
3883
3925
|
), t;
|
|
3884
3926
|
}
|
|
3885
3927
|
/**
|
|
@@ -3899,15 +3941,15 @@ const W = class W {
|
|
|
3899
3941
|
* @param location fresh data/ свежий данные
|
|
3900
3942
|
*/
|
|
3901
3943
|
static makeWatch(t) {
|
|
3902
|
-
|
|
3944
|
+
g(this.watch, (e, i) => {
|
|
3903
3945
|
var r;
|
|
3904
3946
|
((r = this.hash) == null ? void 0 : r[i]) !== (t == null ? void 0 : t[i]) && e.forEach((o) => o(t[i]));
|
|
3905
3947
|
});
|
|
3906
3948
|
}
|
|
3907
3949
|
};
|
|
3908
|
-
c(
|
|
3909
|
-
let Nt =
|
|
3910
|
-
const
|
|
3950
|
+
c(j, "hash", {}), c(j, "watch", {}), c(j, "block", !1), f() && (j.reload(), addEventListener("hashchange", () => j.reload()));
|
|
3951
|
+
let Nt = j;
|
|
3952
|
+
const at = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
|
|
3911
3953
|
/**
|
|
3912
3954
|
* Checks if the given icon is in the list of connected icons.
|
|
3913
3955
|
*
|
|
@@ -3938,7 +3980,7 @@ const ot = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
|
|
|
3938
3980
|
* Возвращает список названий всех зарегистрированных иконок.
|
|
3939
3981
|
*/
|
|
3940
3982
|
static getNameList() {
|
|
3941
|
-
return
|
|
3983
|
+
return g(this.icons, (t, e) => e.replace(/^@/, ""));
|
|
3942
3984
|
}
|
|
3943
3985
|
/**
|
|
3944
3986
|
* Returns a global link.
|
|
@@ -3946,7 +3988,7 @@ const ot = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
|
|
|
3946
3988
|
* Возвращает глобальную ссылку.
|
|
3947
3989
|
*/
|
|
3948
3990
|
static getUrlGlobal() {
|
|
3949
|
-
return `${
|
|
3991
|
+
return `${W.isLocalhost(), ""}${this.url}`;
|
|
3950
3992
|
}
|
|
3951
3993
|
/**
|
|
3952
3994
|
* Adding custom icons.
|
|
@@ -3984,7 +4026,7 @@ const ot = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
|
|
|
3984
4026
|
* @param list list of icons/ список иконки
|
|
3985
4027
|
*/
|
|
3986
4028
|
static addByList(t) {
|
|
3987
|
-
|
|
4029
|
+
g(t, (e, i) => this.add(i, e));
|
|
3988
4030
|
}
|
|
3989
4031
|
/**
|
|
3990
4032
|
* Changes the file path.
|
|
@@ -4013,18 +4055,18 @@ const ot = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
|
|
|
4013
4055
|
return new Promise((t) => setTimeout(() => t(), Et));
|
|
4014
4056
|
}
|
|
4015
4057
|
};
|
|
4016
|
-
c(M, "icons", {}), c(M, "url", "/icons/"),
|
|
4058
|
+
c(M, "icons", {}), c(M, "url", "/icons/"), f() && (at in window || (window[at] = {}), M.icons = window[at]);
|
|
4017
4059
|
let It = M;
|
|
4018
4060
|
function re(s, t, e) {
|
|
4019
4061
|
var i, r;
|
|
4020
|
-
return (r = (i =
|
|
4062
|
+
return (r = (i = A(s)) == null ? void 0 : i[t]) != null ? r : e;
|
|
4021
4063
|
}
|
|
4022
4064
|
function ne(s, t, e) {
|
|
4023
|
-
const i =
|
|
4065
|
+
const i = A(s);
|
|
4024
4066
|
if (i) {
|
|
4025
4067
|
const r = re(i, t);
|
|
4026
4068
|
if (m(r) && m(e))
|
|
4027
|
-
|
|
4069
|
+
g(e, (o, a) => {
|
|
4028
4070
|
r[a] = B(o);
|
|
4029
4071
|
});
|
|
4030
4072
|
else {
|
|
@@ -4035,17 +4077,17 @@ function ne(s, t, e) {
|
|
|
4035
4077
|
return i;
|
|
4036
4078
|
}
|
|
4037
4079
|
function G(s, t = "div", e, i) {
|
|
4038
|
-
if (!
|
|
4080
|
+
if (!f())
|
|
4039
4081
|
return;
|
|
4040
4082
|
const r = document.createElement(t);
|
|
4041
|
-
return typeof e == "function" ? e(r) :
|
|
4083
|
+
return typeof e == "function" ? e(r) : E(e) && g(e, (o, a) => {
|
|
4042
4084
|
ne(r, a, o);
|
|
4043
4085
|
}), s == null || s.insertBefore(r, i != null ? i : null), r;
|
|
4044
4086
|
}
|
|
4045
4087
|
function oe(s) {
|
|
4046
4088
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").trim();
|
|
4047
4089
|
}
|
|
4048
|
-
class
|
|
4090
|
+
class ft {
|
|
4049
4091
|
/**
|
|
4050
4092
|
* Creates an instance of MetaManager.
|
|
4051
4093
|
*
|
|
@@ -4089,7 +4131,7 @@ class dt {
|
|
|
4089
4131
|
* Возвращает все мета-теги в виде HTML-строки.
|
|
4090
4132
|
*/
|
|
4091
4133
|
html() {
|
|
4092
|
-
return
|
|
4134
|
+
return g(
|
|
4093
4135
|
this.listMeta,
|
|
4094
4136
|
(e) => this.toHtmlString(e)
|
|
4095
4137
|
).join("");
|
|
@@ -4111,7 +4153,7 @@ class dt {
|
|
|
4111
4153
|
* @param metaList object with meta tag names and content / объект с именами и содержимым мета-тегов
|
|
4112
4154
|
*/
|
|
4113
4155
|
setByList(t) {
|
|
4114
|
-
return
|
|
4156
|
+
return g(
|
|
4115
4157
|
t,
|
|
4116
4158
|
(e, i) => this.set(i, String(e))
|
|
4117
4159
|
), this;
|
|
@@ -4131,7 +4173,7 @@ class dt {
|
|
|
4131
4173
|
* @param name meta tag name / имя мета-тега
|
|
4132
4174
|
*/
|
|
4133
4175
|
findMetaElement(t) {
|
|
4134
|
-
if (!
|
|
4176
|
+
if (!f())
|
|
4135
4177
|
return;
|
|
4136
4178
|
const e = `meta[${this.getAttributeName()}="${t}"]`;
|
|
4137
4179
|
return document.querySelector(e) || void 0;
|
|
@@ -4157,7 +4199,7 @@ class dt {
|
|
|
4157
4199
|
const e = this.findMetaElement(t), i = (r = this.items[t]) != null ? r : "";
|
|
4158
4200
|
if (e)
|
|
4159
4201
|
e.content = i;
|
|
4160
|
-
else if (
|
|
4202
|
+
else if (f()) {
|
|
4161
4203
|
const o = { content: i };
|
|
4162
4204
|
this.isProperty ? o.property = t : o.name = t, G(document.head, "meta", o);
|
|
4163
4205
|
}
|
|
@@ -4186,8 +4228,8 @@ class dt {
|
|
|
4186
4228
|
}), this;
|
|
4187
4229
|
}
|
|
4188
4230
|
}
|
|
4189
|
-
var L = /* @__PURE__ */ ((s) => (s.description = "description", s.keywords = "keywords", s.canonical = "canonical", s.robots = "robots", s.author = "author", s))(L || {}), ae = /* @__PURE__ */ ((s) => (s.indexFollow = "index, follow", s.noIndexFollow = "noindex, follow", s.indexNoFollow = "index, nofollow", s.noIndexNoFollow = "noindex, nofollow", s.noArchive = "noarchive", s.noSnippet = "nosnippet", s.noImageIndex = "noimageindex", s.images = "images", s.noTranslate = "notranslate", s.noPreview = "nopreview", s.textOnly = "textonly", s.noIndexSubpages = "noindex, noarchive", s.none = "none", s))(ae || {}), $ = /* @__PURE__ */ ((s) => (s.title = "og:title", s.type = "og:type", s.url = "og:url", s.image = "og:image", s.description = "og:description", s.locale = "og:locale", s.siteName = "og:site_name", s.localeAlternate = "og:locale:alternate", s.imageUrl = "og:image:url", s.imageSecureUrl = "og:image:secure_url", s.imageType = "og:image:type", s.imageWidth = "og:image:width", s.imageHeight = "og:image:height", s.imageAlt = "og:image:alt", s.video = "og:video", s.videoUrl = "og:video:url", s.videoSecureUrl = "og:video:secure_url", s.videoType = "og:video:type", s.videoWidth = "og:video:width", s.videoHeight = "og:video:height", s.audio = "og:audio", s.audioSecureUrl = "og:audio:secure_url", s.audioType = "og:audio:type", s.articlePublishedTime = "article:published_time", s.articleModifiedTime = "article:modified_time", s.articleExpirationTime = "article:expiration_time", s.articleAuthor = "article:author", s.articleSection = "article:section", s.articleTag = "article:tag", s.bookAuthor = "book:author", s.bookIsbn = "book:isbn", s.bookReleaseDate = "book:release_date", s.bookTag = "book:tag", s.musicDuration = "music:duration", s.musicAlbum = "music:album", s.musicAlbumDisc = "music:album:disc", s.musicAlbumTrack = "music:album:track", s.musicMusician = "music:musician", s.musicSong = "music:song", s.musicSongDisc = "music:song:disc", s.musicSongTrack = "music:song:track", s.musicReleaseDate = "music:release_date", s.musicCreator = "music:creator", s.videoActor = "video:actor", s.videoActorRole = "video:actor:role", s.videoDirector = "video:director", s.videoWriter = "video:writer", s.videoDuration = "video:duration", s.videoReleaseDate = "video:release_date", s.videoTag = "video:tag", s.videoSeries = "video:series", s.profileFirstName = "profile:first_name", s.profileLastName = "profile:last_name", s.profileUsername = "profile:username", s.profileGender = "profile:gender", s.productBrand = "product:brand", s.productAvailability = "product:availability", s.productCondition = "product:condition", s.productPriceAmount = "product:price:amount", s.productPriceCurrency = "product:price:currency", s.productRetailerItemId = "product:retailer_item_id", s.productCategory = "product:category", s.productEan = "product:ean", s.productIsbn = "product:isbn", s.productMfrPartNo = "product:mfr_part_no", s.productUpc = "product:upc", s.productWeightValue = "product:weight:value", s.productWeightUnits = "product:weight:units", s.productColor = "product:color", s.productMaterial = "product:material", s.productPattern = "product:pattern", s.productAgeGroup = "product:age_group", s.productGender = "product:gender", s))($ || {}), ce = /* @__PURE__ */ ((s) => (s.website = "website", s.article = "article", s.video = "video.other", s.videoTvShow = "video.tv_show", s.videoEpisode = "video.episode", s.videoMovie = "video.movie", s.musicAlbum = "music.album", s.musicPlaylist = "music.playlist", s.musicSong = "music.song", s.musicRadioStation = "music.radio_station", s.app = "app", s.product = "product", s.business = "business.business", s.place = "place", s.event = "event", s.profile = "profile", s.book = "book", s))(ce || {}), ue = /* @__PURE__ */ ((s) => (s.inStock = "in stock", s.outOfStock = "out of stock", s.preorder = "preorder", s.backorder = "backorder", s.discontinued = "discontinued", s.pending = "pending", s))(ue || {}), he = /* @__PURE__ */ ((s) => (s.new = "new", s.used = "used", s.refurbished = "refurbished", s))(he || {}), le = /* @__PURE__ */ ((s) => (s.newborn = "newborn", s.infant = "infant", s.toddler = "toddler", s.kids = "kids", s.adult = "adult", s))(le || {}), ge = /* @__PURE__ */ ((s) => (s.female = "female", s.male = "male", s.unisex = "unisex", s))(ge || {}), p = /* @__PURE__ */ ((s) => (s.card = "twitter:card", s.site = "twitter:site", s.creator = "twitter:creator", s.url = "twitter:url", s.title = "twitter:title", s.description = "twitter:description", s.image = "twitter:image", s.imageAlt = "twitter:image:alt", s.imageSrc = "twitter:image:src", s.imageWidth = "twitter:image:width", s.imageHeight = "twitter:image:height", s.label1 = "twitter:label1", s.data1 = "twitter:data1", s.label2 = "twitter:label2", s.data2 = "twitter:data2", s.appNameIphone = "twitter:app:name:iphone", s.appIdIphone = "twitter:app:id:iphone", s.appUrlIphone = "twitter:app:url:iphone", s.appNameIpad = "twitter:app:name:ipad", s.appIdIpad = "twitter:app:id:ipad", s.appUrlIpad = "twitter:app:url:ipad", s.appNameGooglePlay = "twitter:app:name:googleplay", s.appIdGooglePlay = "twitter:app:id:googleplay", s.appUrlGooglePlay = "twitter:app:url:googleplay", s.player = "twitter:player", s.playerWidth = "twitter:player:width", s.playerHeight = "twitter:player:height", s.playerStream = "twitter:player:stream", s.playerStreamContentType = "twitter:player:stream:content_type", s))(p || {}),
|
|
4190
|
-
class
|
|
4231
|
+
var L = /* @__PURE__ */ ((s) => (s.description = "description", s.keywords = "keywords", s.canonical = "canonical", s.robots = "robots", s.author = "author", s))(L || {}), ae = /* @__PURE__ */ ((s) => (s.indexFollow = "index, follow", s.noIndexFollow = "noindex, follow", s.indexNoFollow = "index, nofollow", s.noIndexNoFollow = "noindex, nofollow", s.noArchive = "noarchive", s.noSnippet = "nosnippet", s.noImageIndex = "noimageindex", s.images = "images", s.noTranslate = "notranslate", s.noPreview = "nopreview", s.textOnly = "textonly", s.noIndexSubpages = "noindex, noarchive", s.none = "none", s))(ae || {}), $ = /* @__PURE__ */ ((s) => (s.title = "og:title", s.type = "og:type", s.url = "og:url", s.image = "og:image", s.description = "og:description", s.locale = "og:locale", s.siteName = "og:site_name", s.localeAlternate = "og:locale:alternate", s.imageUrl = "og:image:url", s.imageSecureUrl = "og:image:secure_url", s.imageType = "og:image:type", s.imageWidth = "og:image:width", s.imageHeight = "og:image:height", s.imageAlt = "og:image:alt", s.video = "og:video", s.videoUrl = "og:video:url", s.videoSecureUrl = "og:video:secure_url", s.videoType = "og:video:type", s.videoWidth = "og:video:width", s.videoHeight = "og:video:height", s.audio = "og:audio", s.audioSecureUrl = "og:audio:secure_url", s.audioType = "og:audio:type", s.articlePublishedTime = "article:published_time", s.articleModifiedTime = "article:modified_time", s.articleExpirationTime = "article:expiration_time", s.articleAuthor = "article:author", s.articleSection = "article:section", s.articleTag = "article:tag", s.bookAuthor = "book:author", s.bookIsbn = "book:isbn", s.bookReleaseDate = "book:release_date", s.bookTag = "book:tag", s.musicDuration = "music:duration", s.musicAlbum = "music:album", s.musicAlbumDisc = "music:album:disc", s.musicAlbumTrack = "music:album:track", s.musicMusician = "music:musician", s.musicSong = "music:song", s.musicSongDisc = "music:song:disc", s.musicSongTrack = "music:song:track", s.musicReleaseDate = "music:release_date", s.musicCreator = "music:creator", s.videoActor = "video:actor", s.videoActorRole = "video:actor:role", s.videoDirector = "video:director", s.videoWriter = "video:writer", s.videoDuration = "video:duration", s.videoReleaseDate = "video:release_date", s.videoTag = "video:tag", s.videoSeries = "video:series", s.profileFirstName = "profile:first_name", s.profileLastName = "profile:last_name", s.profileUsername = "profile:username", s.profileGender = "profile:gender", s.productBrand = "product:brand", s.productAvailability = "product:availability", s.productCondition = "product:condition", s.productPriceAmount = "product:price:amount", s.productPriceCurrency = "product:price:currency", s.productRetailerItemId = "product:retailer_item_id", s.productCategory = "product:category", s.productEan = "product:ean", s.productIsbn = "product:isbn", s.productMfrPartNo = "product:mfr_part_no", s.productUpc = "product:upc", s.productWeightValue = "product:weight:value", s.productWeightUnits = "product:weight:units", s.productColor = "product:color", s.productMaterial = "product:material", s.productPattern = "product:pattern", s.productAgeGroup = "product:age_group", s.productGender = "product:gender", s))($ || {}), ce = /* @__PURE__ */ ((s) => (s.website = "website", s.article = "article", s.video = "video.other", s.videoTvShow = "video.tv_show", s.videoEpisode = "video.episode", s.videoMovie = "video.movie", s.musicAlbum = "music.album", s.musicPlaylist = "music.playlist", s.musicSong = "music.song", s.musicRadioStation = "music.radio_station", s.app = "app", s.product = "product", s.business = "business.business", s.place = "place", s.event = "event", s.profile = "profile", s.book = "book", s))(ce || {}), ue = /* @__PURE__ */ ((s) => (s.inStock = "in stock", s.outOfStock = "out of stock", s.preorder = "preorder", s.backorder = "backorder", s.discontinued = "discontinued", s.pending = "pending", s))(ue || {}), he = /* @__PURE__ */ ((s) => (s.new = "new", s.used = "used", s.refurbished = "refurbished", s))(he || {}), le = /* @__PURE__ */ ((s) => (s.newborn = "newborn", s.infant = "infant", s.toddler = "toddler", s.kids = "kids", s.adult = "adult", s))(le || {}), ge = /* @__PURE__ */ ((s) => (s.female = "female", s.male = "male", s.unisex = "unisex", s))(ge || {}), p = /* @__PURE__ */ ((s) => (s.card = "twitter:card", s.site = "twitter:site", s.creator = "twitter:creator", s.url = "twitter:url", s.title = "twitter:title", s.description = "twitter:description", s.image = "twitter:image", s.imageAlt = "twitter:image:alt", s.imageSrc = "twitter:image:src", s.imageWidth = "twitter:image:width", s.imageHeight = "twitter:image:height", s.label1 = "twitter:label1", s.data1 = "twitter:data1", s.label2 = "twitter:label2", s.data2 = "twitter:data2", s.appNameIphone = "twitter:app:name:iphone", s.appIdIphone = "twitter:app:id:iphone", s.appUrlIphone = "twitter:app:url:iphone", s.appNameIpad = "twitter:app:name:ipad", s.appIdIpad = "twitter:app:id:ipad", s.appUrlIpad = "twitter:app:url:ipad", s.appNameGooglePlay = "twitter:app:name:googleplay", s.appIdGooglePlay = "twitter:app:id:googleplay", s.appUrlGooglePlay = "twitter:app:url:googleplay", s.player = "twitter:player", s.playerWidth = "twitter:player:width", s.playerHeight = "twitter:player:height", s.playerStream = "twitter:player:stream", s.playerStreamContentType = "twitter:player:stream:content_type", s))(p || {}), fe = /* @__PURE__ */ ((s) => (s.summary = "summary", s.summaryLargeImage = "summary_large_image", s.app = "app", s.player = "player", s.product = "product", s.gallery = "gallery", s.photo = "photo", s.leadGeneration = "lead_generation", s.audio = "audio", s.poll = "poll", s))(fe || {});
|
|
4232
|
+
class de extends ft {
|
|
4191
4233
|
constructor() {
|
|
4192
4234
|
super(Object.values($), !0);
|
|
4193
4235
|
}
|
|
@@ -4311,7 +4353,7 @@ class fe extends dt {
|
|
|
4311
4353
|
return this.set($.siteName, t);
|
|
4312
4354
|
}
|
|
4313
4355
|
}
|
|
4314
|
-
class me extends
|
|
4356
|
+
class me extends ft {
|
|
4315
4357
|
constructor() {
|
|
4316
4358
|
super(Object.values(p));
|
|
4317
4359
|
}
|
|
@@ -4435,7 +4477,7 @@ class me extends dt {
|
|
|
4435
4477
|
return this.set(p.image, t), this;
|
|
4436
4478
|
}
|
|
4437
4479
|
}
|
|
4438
|
-
class Ve extends
|
|
4480
|
+
class Ve extends ft {
|
|
4439
4481
|
/**
|
|
4440
4482
|
* Creates an instance of Meta with integrated Open Graph and Twitter Card support.
|
|
4441
4483
|
*
|
|
@@ -4446,7 +4488,7 @@ class Ve extends dt {
|
|
|
4446
4488
|
c(this, "suffix");
|
|
4447
4489
|
c(this, "og");
|
|
4448
4490
|
c(this, "twitter");
|
|
4449
|
-
this.og = new
|
|
4491
|
+
this.og = new de(), this.twitter = new me();
|
|
4450
4492
|
}
|
|
4451
4493
|
/**
|
|
4452
4494
|
* Gets the MetaOg instance for advanced Open Graph operations.
|
|
@@ -4470,7 +4512,7 @@ class Ve extends dt {
|
|
|
4470
4512
|
* Получает заголовок страницы без суффикса.
|
|
4471
4513
|
*/
|
|
4472
4514
|
getTitle() {
|
|
4473
|
-
return
|
|
4515
|
+
return f() ? document.title.replace(this.getSuffix(), "").trim() : "";
|
|
4474
4516
|
}
|
|
4475
4517
|
/**
|
|
4476
4518
|
* Gets the keywords meta tag.
|
|
@@ -4543,7 +4585,7 @@ class Ve extends dt {
|
|
|
4543
4585
|
* @param title page title / заголовок страницы
|
|
4544
4586
|
*/
|
|
4545
4587
|
setTitle(e) {
|
|
4546
|
-
if (
|
|
4588
|
+
if (f()) {
|
|
4547
4589
|
const i = y(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
4548
4590
|
document.title = i, this.og.setTitle(i), this.twitter.setTitle(i);
|
|
4549
4591
|
}
|
|
@@ -4556,7 +4598,7 @@ class Ve extends dt {
|
|
|
4556
4598
|
* @param keywords keywords as string or array / ключевые слова в виде строки или массива
|
|
4557
4599
|
*/
|
|
4558
4600
|
setKeywords(e) {
|
|
4559
|
-
return this.set(L.keywords,
|
|
4601
|
+
return this.set(L.keywords, H(e).join(", ")), this;
|
|
4560
4602
|
}
|
|
4561
4603
|
/**
|
|
4562
4604
|
* Sets the description meta tag.
|
|
@@ -4647,7 +4689,7 @@ class Ve extends dt {
|
|
|
4647
4689
|
return y(this.suffix) ? ` - ${this.suffix}` : "";
|
|
4648
4690
|
}
|
|
4649
4691
|
}
|
|
4650
|
-
class
|
|
4692
|
+
class ht {
|
|
4651
4693
|
/**
|
|
4652
4694
|
* Checks whether to enable scroll hiding.
|
|
4653
4695
|
*
|
|
@@ -4714,14 +4756,14 @@ class ut {
|
|
|
4714
4756
|
});
|
|
4715
4757
|
}
|
|
4716
4758
|
}
|
|
4717
|
-
c(
|
|
4718
|
-
function
|
|
4759
|
+
c(ht, "storage", new st("scrollbar", !0)), c(ht, "calculate", !1);
|
|
4760
|
+
function dt(s) {
|
|
4719
4761
|
return s.replace(/([[\]\\^$.?*+(){}/|])/g, "\\$1");
|
|
4720
4762
|
}
|
|
4721
4763
|
function ye(s) {
|
|
4722
|
-
const t =
|
|
4764
|
+
const t = g(
|
|
4723
4765
|
s.split(" "),
|
|
4724
|
-
(e) =>
|
|
4766
|
+
(e) => dt(e)
|
|
4725
4767
|
).join("|");
|
|
4726
4768
|
return new RegExp(`(${t})`, "ig");
|
|
4727
4769
|
}
|
|
@@ -4976,7 +5018,7 @@ class be {
|
|
|
4976
5018
|
}
|
|
4977
5019
|
}
|
|
4978
5020
|
function zt(s, t = "ig", e = ":value") {
|
|
4979
|
-
const i =
|
|
5021
|
+
const i = dt(s);
|
|
4980
5022
|
return new RegExp(e.replace(/:value/g, i), t);
|
|
4981
5023
|
}
|
|
4982
5024
|
function we(s) {
|
|
@@ -4985,7 +5027,7 @@ function we(s) {
|
|
|
4985
5027
|
function ve(s) {
|
|
4986
5028
|
let t = "";
|
|
4987
5029
|
return s.split(" ").forEach((e) => {
|
|
4988
|
-
const i =
|
|
5030
|
+
const i = dt(e).trim();
|
|
4989
5031
|
y(i) && (t += `(?=.*?${i})`);
|
|
4990
5032
|
}), new RegExp(`^${t}`, "ig");
|
|
4991
5033
|
}
|
|
@@ -5266,10 +5308,10 @@ class Ke {
|
|
|
5266
5308
|
if (this.item.isSearch())
|
|
5267
5309
|
return this.data.forEach(this.callbackToSelection);
|
|
5268
5310
|
const t = this.data.getList();
|
|
5269
|
-
return t ?
|
|
5311
|
+
return t ? g(t, this.callbackToNone) : [];
|
|
5270
5312
|
}
|
|
5271
5313
|
}
|
|
5272
|
-
const
|
|
5314
|
+
const De = [
|
|
5273
5315
|
"d",
|
|
5274
5316
|
"e",
|
|
5275
5317
|
"f",
|
|
@@ -5289,15 +5331,15 @@ const Ce = [
|
|
|
5289
5331
|
"t",
|
|
5290
5332
|
"u",
|
|
5291
5333
|
"v"
|
|
5292
|
-
],
|
|
5334
|
+
], Ce = (s, t = {}) => {
|
|
5293
5335
|
let e = String(s);
|
|
5294
5336
|
if (s.match(/%[a-z]/)) {
|
|
5295
5337
|
let i = 0;
|
|
5296
|
-
|
|
5297
|
-
e = e.replace(new RegExp(`%${
|
|
5338
|
+
g(t, (r) => {
|
|
5339
|
+
e = e.replace(new RegExp(`%${De[i++]}`, "g"), String(r));
|
|
5298
5340
|
});
|
|
5299
5341
|
}
|
|
5300
|
-
return
|
|
5342
|
+
return E(t) && g(t, (i, r) => {
|
|
5301
5343
|
e = e.replace(
|
|
5302
5344
|
new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})(.*?)(?:\\[|\\{)\\/${r}(?:\\]|\\})`, "g"),
|
|
5303
5345
|
(o, a) => String(i).replace(/(?:\[|\{)content(?:\]|\})/g, a)
|
|
@@ -5314,7 +5356,7 @@ const Ce = [
|
|
|
5314
5356
|
static async get(t, e) {
|
|
5315
5357
|
var r;
|
|
5316
5358
|
const i = this.getText(t);
|
|
5317
|
-
return i ? this.replacement(i, e) : (
|
|
5359
|
+
return i ? this.replacement(i, e) : (W.isLocalhost() || await this.add(t), this.replacement((r = this.getText(t)) != null ? r : t));
|
|
5318
5360
|
}
|
|
5319
5361
|
/**
|
|
5320
5362
|
* Getting the translation text by its code (Sync).
|
|
@@ -5386,8 +5428,8 @@ const Ce = [
|
|
|
5386
5428
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
5387
5429
|
*/
|
|
5388
5430
|
static addSync(t) {
|
|
5389
|
-
|
|
5390
|
-
|
|
5431
|
+
g(t, (e, i) => {
|
|
5432
|
+
U(e) && y(e) && (this.data[this.getName(i)] = e);
|
|
5391
5433
|
});
|
|
5392
5434
|
}
|
|
5393
5435
|
/**
|
|
@@ -5398,7 +5440,7 @@ const Ce = [
|
|
|
5398
5440
|
*/
|
|
5399
5441
|
static async addNormalOrSync(t) {
|
|
5400
5442
|
if (y(t))
|
|
5401
|
-
if (
|
|
5443
|
+
if (W.isLocalhost())
|
|
5402
5444
|
this.addSync(t);
|
|
5403
5445
|
else {
|
|
5404
5446
|
const e = Object.keys(t);
|
|
@@ -5412,9 +5454,9 @@ const Ce = [
|
|
|
5412
5454
|
* @param data list of texts by location/ список текстов по местоположению
|
|
5413
5455
|
*/
|
|
5414
5456
|
static addSyncByLocation(t) {
|
|
5415
|
-
|
|
5457
|
+
g(
|
|
5416
5458
|
t,
|
|
5417
|
-
(e, i) =>
|
|
5459
|
+
(e, i) => g(e, (r, o) => {
|
|
5418
5460
|
const a = `${i}-${o}`;
|
|
5419
5461
|
a in this.data || (this.data[a] = r);
|
|
5420
5462
|
})
|
|
@@ -5493,7 +5535,7 @@ const Ce = [
|
|
|
5493
5535
|
*/
|
|
5494
5536
|
static getNamesNone(t) {
|
|
5495
5537
|
const e = [];
|
|
5496
|
-
return
|
|
5538
|
+
return H(t).forEach((i) => {
|
|
5497
5539
|
i !== "__TRANSLATE_START__" && i !== "__TRANSLATE_END__" && !(this.getName(i) in this.data) && e.push(i);
|
|
5498
5540
|
}), e;
|
|
5499
5541
|
}
|
|
@@ -5503,7 +5545,7 @@ const Ce = [
|
|
|
5503
5545
|
* Получение списка переводов с сервера.
|
|
5504
5546
|
*/
|
|
5505
5547
|
static async getResponse() {
|
|
5506
|
-
const t = await
|
|
5548
|
+
const t = await W.get({
|
|
5507
5549
|
api: !1,
|
|
5508
5550
|
path: this.url,
|
|
5509
5551
|
request: {
|
|
@@ -5522,7 +5564,7 @@ const Ce = [
|
|
|
5522
5564
|
* @param replacement values for replacement/ значения для замены
|
|
5523
5565
|
*/
|
|
5524
5566
|
static replacement(t, e) {
|
|
5525
|
-
return e ?
|
|
5567
|
+
return e ? Ce(t, e) : t;
|
|
5526
5568
|
}
|
|
5527
5569
|
/**
|
|
5528
5570
|
* Adding translation data from the server.
|
|
@@ -5550,11 +5592,11 @@ function Ye(s) {
|
|
|
5550
5592
|
}
|
|
5551
5593
|
function qe(s) {
|
|
5552
5594
|
var t;
|
|
5553
|
-
if (
|
|
5595
|
+
if (f())
|
|
5554
5596
|
return (t = document.querySelector(s)) != null ? t : void 0;
|
|
5555
5597
|
}
|
|
5556
5598
|
function Je(s) {
|
|
5557
|
-
if (
|
|
5599
|
+
if (f())
|
|
5558
5600
|
return document.querySelectorAll(s);
|
|
5559
5601
|
}
|
|
5560
5602
|
function Me(s) {
|
|
@@ -5564,11 +5606,11 @@ function Ee(s, t, e) {
|
|
|
5564
5606
|
const i = () => {
|
|
5565
5607
|
s(), t != null && t() ? Ee(s, t, e) : e == null || e();
|
|
5566
5608
|
};
|
|
5567
|
-
|
|
5609
|
+
f() ? requestAnimationFrame(i) : i();
|
|
5568
5610
|
}
|
|
5569
5611
|
function Qe(s) {
|
|
5570
5612
|
var i;
|
|
5571
|
-
const t = {}, e =
|
|
5613
|
+
const t = {}, e = A(s);
|
|
5572
5614
|
if (e)
|
|
5573
5615
|
for (const r of e.attributes)
|
|
5574
5616
|
t[r.name] = (i = (r == null ? void 0 : r.value) || (r == null ? void 0 : r.textContent)) != null ? i : void 0;
|
|
@@ -5583,11 +5625,11 @@ function _e(s = "datetime") {
|
|
|
5583
5625
|
}
|
|
5584
5626
|
let Ft = Q(1e5, 9e5);
|
|
5585
5627
|
function Oe(s, t) {
|
|
5586
|
-
const e =
|
|
5628
|
+
const e = A(s);
|
|
5587
5629
|
return e ? (y(e.id) || e.setAttribute("id", `id-${Ft++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${Ft++}`;
|
|
5588
5630
|
}
|
|
5589
5631
|
function Ae(s) {
|
|
5590
|
-
return
|
|
5632
|
+
return U(s) ? G(
|
|
5591
5633
|
void 0,
|
|
5592
5634
|
"img",
|
|
5593
5635
|
{ src: s }
|
|
@@ -5598,7 +5640,7 @@ function Te(s) {
|
|
|
5598
5640
|
return (i = (t = s == null ? void 0 : s.key) != null ? t : s == null ? void 0 : s.code) != null ? i : (e = s == null ? void 0 : s.keyCode) == null ? void 0 : e.toString();
|
|
5599
5641
|
}
|
|
5600
5642
|
function Zt(s) {
|
|
5601
|
-
return
|
|
5643
|
+
return g(s, (t) => t.length);
|
|
5602
5644
|
}
|
|
5603
5645
|
function Ge(s) {
|
|
5604
5646
|
return Math.max(...Zt(s));
|
|
@@ -5628,12 +5670,12 @@ function ss(s, t) {
|
|
|
5628
5670
|
}
|
|
5629
5671
|
function is(s, t = void 0) {
|
|
5630
5672
|
const e = {};
|
|
5631
|
-
return
|
|
5673
|
+
return g(s, (i, r) => {
|
|
5632
5674
|
i !== t && (e[r] = i);
|
|
5633
5675
|
}), e;
|
|
5634
5676
|
}
|
|
5635
5677
|
function rs(s) {
|
|
5636
|
-
return
|
|
5678
|
+
return E(s) ? s : {};
|
|
5637
5679
|
}
|
|
5638
5680
|
function Fe(s, t) {
|
|
5639
5681
|
return Ne(s, t).join("");
|
|
@@ -5664,7 +5706,7 @@ function cs(s, t, e) {
|
|
|
5664
5706
|
}
|
|
5665
5707
|
}
|
|
5666
5708
|
function us(s, t, e = 0) {
|
|
5667
|
-
if (!
|
|
5709
|
+
if (!f())
|
|
5668
5710
|
return;
|
|
5669
5711
|
const i = (t == null ? void 0 : t.behavior) || "smooth";
|
|
5670
5712
|
if ("scrollIntoView" in s && !e) {
|
|
@@ -5684,7 +5726,7 @@ function us(s, t, e = 0) {
|
|
|
5684
5726
|
}
|
|
5685
5727
|
}
|
|
5686
5728
|
function hs(s, t, e = "smooth") {
|
|
5687
|
-
if (!
|
|
5729
|
+
if (!f() || !s || !t)
|
|
5688
5730
|
return;
|
|
5689
5731
|
const i = s.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
5690
5732
|
s.scrollBy({
|
|
@@ -5697,20 +5739,24 @@ function ls(s, t) {
|
|
|
5697
5739
|
return s.indexOf(t) !== -1;
|
|
5698
5740
|
}
|
|
5699
5741
|
async function gs() {
|
|
5700
|
-
if (
|
|
5701
|
-
const s = await
|
|
5742
|
+
if (f()) {
|
|
5743
|
+
const s = await ht.get();
|
|
5702
5744
|
document.body.style.setProperty("--sys-scrollbar-offset", `${s}px`);
|
|
5703
5745
|
}
|
|
5704
5746
|
}
|
|
5705
|
-
function
|
|
5747
|
+
function fs(s, t) {
|
|
5706
5748
|
const e = {};
|
|
5707
|
-
return m(s) && m(t) &&
|
|
5749
|
+
return m(s) && m(t) && g(s, (i, r) => {
|
|
5708
5750
|
r in t && (e[r] = i);
|
|
5709
5751
|
}), e;
|
|
5710
5752
|
}
|
|
5711
|
-
|
|
5753
|
+
const ds = (s) => {
|
|
5754
|
+
var t;
|
|
5755
|
+
return et(s) ? !0 : !!(s && E(s) && ((s == null ? void 0 : s.status) === "success" || s != null && s.success || (t = s == null ? void 0 : s.statusObject) != null && t.status && String(s.statusObject.status).match(/^2/) || !("status" in s) && !("success" in s) && !("statusObject" in s) && String(W.getStatus().getStatus()).match(/^2/)));
|
|
5756
|
+
};
|
|
5757
|
+
function ms(s, t) {
|
|
5712
5758
|
let e = Object.keys(s).length !== Object.keys(t).length;
|
|
5713
|
-
return e ||
|
|
5759
|
+
return e || g(s, (i, r) => {
|
|
5714
5760
|
i !== (t == null ? void 0 : t[r]) && (e = !0);
|
|
5715
5761
|
}), e;
|
|
5716
5762
|
}
|
|
@@ -5720,8 +5766,8 @@ const xe = (s) => {
|
|
|
5720
5766
|
return !!(t === "input" || t === "textarea" || t === "select" || s.isContentEditable || s.getAttribute("contenteditable") === "true");
|
|
5721
5767
|
}
|
|
5722
5768
|
return !1;
|
|
5723
|
-
},
|
|
5724
|
-
function
|
|
5769
|
+
}, ys = (s, t) => s.code === "Space" || s.code === "Enter" || s.key === " " || s.key === "Spacebar" || s.key === "Enter" || s.keyCode === 13 || s.keyCode === 32 ? t !== void 0 ? !t : !xe(s.target) : !1;
|
|
5770
|
+
function $s(s) {
|
|
5725
5771
|
switch (typeof s) {
|
|
5726
5772
|
case "number":
|
|
5727
5773
|
return !0;
|
|
@@ -5731,14 +5777,14 @@ function ys(s) {
|
|
|
5731
5777
|
return !1;
|
|
5732
5778
|
}
|
|
5733
5779
|
}
|
|
5734
|
-
function
|
|
5780
|
+
function ps(s, t) {
|
|
5735
5781
|
const e = Math.floor(t);
|
|
5736
5782
|
return s >= e && s < e + 1;
|
|
5737
5783
|
}
|
|
5738
|
-
function ps(s, t) {
|
|
5739
|
-
return Array.isArray(s) ? s.every((e) => at(e, t)) : at(s, t);
|
|
5740
|
-
}
|
|
5741
5784
|
function bs(s, t) {
|
|
5785
|
+
return Array.isArray(s) ? s.every((e) => ct(e, t)) : ct(s, t);
|
|
5786
|
+
}
|
|
5787
|
+
function ws(s, t) {
|
|
5742
5788
|
if (s.startsWith(t))
|
|
5743
5789
|
return s.slice(t.length).trim();
|
|
5744
5790
|
let e = 0;
|
|
@@ -5746,7 +5792,7 @@ function bs(s, t) {
|
|
|
5746
5792
|
e++;
|
|
5747
5793
|
return s.slice(e).trim();
|
|
5748
5794
|
}
|
|
5749
|
-
const
|
|
5795
|
+
const vs = (s, t, e) => {
|
|
5750
5796
|
var i, r;
|
|
5751
5797
|
return (r = (i = s == null ? void 0 : s.replace(new RegExp(`<${t}`, "ig"), `<${e}`)) == null ? void 0 : i.replace(new RegExp(`</${t}`, "ig"), `</${e}`)) == null ? void 0 : r.trim();
|
|
5752
5798
|
};
|
|
@@ -5754,22 +5800,22 @@ function Re(s) {
|
|
|
5754
5800
|
return [...new Set(s)];
|
|
5755
5801
|
}
|
|
5756
5802
|
function J(s, t, e = !0) {
|
|
5757
|
-
const i =
|
|
5758
|
-
return m(s) && m(t) &&
|
|
5803
|
+
const i = Y(s);
|
|
5804
|
+
return m(s) && m(t) && g(
|
|
5759
5805
|
t,
|
|
5760
5806
|
(r, o) => {
|
|
5761
5807
|
const a = s == null ? void 0 : s[o];
|
|
5762
|
-
m(a) && m(r) ? e && Array.isArray(a) && Array.isArray(r) ? i[o] =
|
|
5808
|
+
m(a) && m(r) ? e && Array.isArray(a) && Array.isArray(r) ? i[o] = Y(Re([...a, ...r])) : i[o] = J(
|
|
5763
5809
|
Array.isArray(a) ? { ...a } : a,
|
|
5764
5810
|
r,
|
|
5765
5811
|
e
|
|
5766
|
-
) : i[o] = m(r) ?
|
|
5812
|
+
) : i[o] = m(r) ? Y(r) : r;
|
|
5767
5813
|
}
|
|
5768
5814
|
), i;
|
|
5769
5815
|
}
|
|
5770
|
-
function
|
|
5816
|
+
function Ss(s, t) {
|
|
5771
5817
|
let e = s;
|
|
5772
|
-
return
|
|
5818
|
+
return g(t, (i, r) => {
|
|
5773
5819
|
e = e.replace(zt(`[${r}]`), B(i));
|
|
5774
5820
|
}), e;
|
|
5775
5821
|
}
|
|
@@ -5783,7 +5829,7 @@ function Pe(s, t = "auto") {
|
|
|
5783
5829
|
return !1;
|
|
5784
5830
|
}
|
|
5785
5831
|
}
|
|
5786
|
-
function
|
|
5832
|
+
function Ls(s, t, e = "auto", i) {
|
|
5787
5833
|
var o;
|
|
5788
5834
|
const r = Ae(s);
|
|
5789
5835
|
if (r && (r.naturalWidth > t && (e === "auto" || e === "width") || r.naturalHeight > t && (e === "auto" || e === "height"))) {
|
|
@@ -5792,7 +5838,7 @@ function Ss(s, t, e = "auto", i) {
|
|
|
5792
5838
|
return u.canvas.width = a ? t : r.naturalWidth / r.naturalHeight * t, u.canvas.height = a ? r.naturalHeight / r.naturalWidth * t : t, u.drawImage(r, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(i);
|
|
5793
5839
|
}
|
|
5794
5840
|
}
|
|
5795
|
-
function
|
|
5841
|
+
function Ds(s) {
|
|
5796
5842
|
const t = k(s);
|
|
5797
5843
|
if (t > 0) {
|
|
5798
5844
|
const e = String(Math.floor(t / 60)).padStart(2, "0"), i = String(t % 60).padStart(2, "0");
|
|
@@ -5807,7 +5853,7 @@ function Cs(s, t, {
|
|
|
5807
5853
|
notEmpty: o = !1
|
|
5808
5854
|
}) {
|
|
5809
5855
|
if (e) {
|
|
5810
|
-
if (
|
|
5856
|
+
if (et(s)) {
|
|
5811
5857
|
const a = s.indexOf(t), u = [...s];
|
|
5812
5858
|
return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!i || s.length < i) && u.push(t), u;
|
|
5813
5859
|
}
|
|
@@ -5815,44 +5861,44 @@ function Cs(s, t, {
|
|
|
5815
5861
|
}
|
|
5816
5862
|
return r || s !== t ? t : s;
|
|
5817
5863
|
}
|
|
5818
|
-
function
|
|
5864
|
+
function ks(s, t, e) {
|
|
5819
5865
|
if (m(s) && m(t)) {
|
|
5820
5866
|
if (e) {
|
|
5821
5867
|
let i = {}, r = !1;
|
|
5822
|
-
return
|
|
5823
|
-
!r && (e === a || e === o) ? (r = !0, i = J(i, t)) : r ? i = J(i, { [a]: o }) : i[a] = m(o) ?
|
|
5868
|
+
return g(s, (o, a) => {
|
|
5869
|
+
!r && (e === a || e === o) ? (r = !0, i = J(i, t)) : r ? i = J(i, { [a]: o }) : i[a] = m(o) ? Y(o) : o;
|
|
5824
5870
|
}), r ? i : J(s, t);
|
|
5825
5871
|
}
|
|
5826
5872
|
if (m(t))
|
|
5827
5873
|
return J(s, t);
|
|
5828
5874
|
}
|
|
5829
|
-
return
|
|
5875
|
+
return Y(s);
|
|
5830
5876
|
}
|
|
5831
|
-
function
|
|
5877
|
+
function Ns(s) {
|
|
5832
5878
|
return Ht(s).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
|
|
5833
5879
|
}
|
|
5834
|
-
function
|
|
5880
|
+
function Es(s) {
|
|
5835
5881
|
return s.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
|
|
5836
5882
|
}
|
|
5837
|
-
function
|
|
5883
|
+
function As(s, t, e, i) {
|
|
5838
5884
|
const r = k(s), o = k(t);
|
|
5839
5885
|
return t && o < r ? `${Rt(o, e, i)}+` : Rt(r, e, i);
|
|
5840
5886
|
}
|
|
5841
5887
|
const Rt = (s, t, e) => t ? new N(e).number(s) : s;
|
|
5842
|
-
function
|
|
5888
|
+
function je(s, t) {
|
|
5843
5889
|
return 1 / s * t;
|
|
5844
5890
|
}
|
|
5845
|
-
function
|
|
5846
|
-
return
|
|
5891
|
+
function Is(s, t) {
|
|
5892
|
+
return je(s, t) * 100;
|
|
5847
5893
|
}
|
|
5848
|
-
function
|
|
5894
|
+
function Bs(s) {
|
|
5849
5895
|
let t = "";
|
|
5850
5896
|
for (const e of s)
|
|
5851
5897
|
t += String.fromCharCode(e);
|
|
5852
|
-
return
|
|
5898
|
+
return f() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(s).toString("base64") : "";
|
|
5853
5899
|
}
|
|
5854
|
-
async function
|
|
5855
|
-
if (
|
|
5900
|
+
async function Fs(s) {
|
|
5901
|
+
if (f())
|
|
5856
5902
|
try {
|
|
5857
5903
|
await navigator.clipboard.writeText(s);
|
|
5858
5904
|
} catch (t) {
|
|
@@ -5860,10 +5906,10 @@ async function Bs(s) {
|
|
|
5860
5906
|
}
|
|
5861
5907
|
}
|
|
5862
5908
|
export {
|
|
5863
|
-
|
|
5909
|
+
W as Api,
|
|
5864
5910
|
Qt as ApiDefault,
|
|
5865
5911
|
Mt as ApiHeaders,
|
|
5866
|
-
|
|
5912
|
+
D as ApiMethodItem,
|
|
5867
5913
|
Ot as ApiPreparation,
|
|
5868
5914
|
_t as ApiResponse,
|
|
5869
5915
|
vt as ApiStatus,
|
|
@@ -5871,16 +5917,16 @@ export {
|
|
|
5871
5917
|
te as Cache,
|
|
5872
5918
|
Gt as CacheItem,
|
|
5873
5919
|
Lt as CacheStatic,
|
|
5874
|
-
|
|
5920
|
+
Dt as Cookie,
|
|
5875
5921
|
Ut as CookieBlock,
|
|
5876
|
-
|
|
5922
|
+
st as DataStorage,
|
|
5877
5923
|
gt as Datetime,
|
|
5878
5924
|
bt as EventItem,
|
|
5879
5925
|
ze as Formatters,
|
|
5880
5926
|
F as FormattersType,
|
|
5881
5927
|
n as GEO_FLAG_ICON_NAME,
|
|
5882
5928
|
b as Geo,
|
|
5883
|
-
|
|
5929
|
+
Ct as GeoFlag,
|
|
5884
5930
|
N as GeoIntl,
|
|
5885
5931
|
kt as GeoPhone,
|
|
5886
5932
|
Ze as Global,
|
|
@@ -5888,8 +5934,8 @@ export {
|
|
|
5888
5934
|
It as Icons,
|
|
5889
5935
|
R as Loading,
|
|
5890
5936
|
Ve as Meta,
|
|
5891
|
-
|
|
5892
|
-
|
|
5937
|
+
ft as MetaManager,
|
|
5938
|
+
de as MetaOg,
|
|
5893
5939
|
le as MetaOpenGraphAge,
|
|
5894
5940
|
ue as MetaOpenGraphAvailability,
|
|
5895
5941
|
he as MetaOpenGraphCondition,
|
|
@@ -5899,9 +5945,9 @@ export {
|
|
|
5899
5945
|
ae as MetaRobots,
|
|
5900
5946
|
L as MetaTag,
|
|
5901
5947
|
me as MetaTwitter,
|
|
5902
|
-
|
|
5948
|
+
fe as MetaTwitterCard,
|
|
5903
5949
|
p as MetaTwitterTag,
|
|
5904
|
-
|
|
5950
|
+
ht as ScrollbarWidth,
|
|
5905
5951
|
Ke as SearchList,
|
|
5906
5952
|
pe as SearchListData,
|
|
5907
5953
|
be as SearchListItem,
|
|
@@ -5911,26 +5957,26 @@ export {
|
|
|
5911
5957
|
Bt as Translate,
|
|
5912
5958
|
$e as addTagHighlightMatch,
|
|
5913
5959
|
T as anyToString,
|
|
5914
|
-
|
|
5960
|
+
Ce as applyTemplate,
|
|
5915
5961
|
Ne as arrFill,
|
|
5916
5962
|
Ye as blobToBase64,
|
|
5917
|
-
|
|
5918
|
-
|
|
5963
|
+
Y as copyObject,
|
|
5964
|
+
C as copyObjectLite,
|
|
5919
5965
|
G as createElement,
|
|
5920
5966
|
qe as domQuerySelector,
|
|
5921
5967
|
Je as domQuerySelectorAll,
|
|
5922
5968
|
oe as encodeAttribute,
|
|
5923
|
-
|
|
5969
|
+
dt as escapeExp,
|
|
5924
5970
|
Me as eventStopPropagation,
|
|
5925
5971
|
B as executeFunction,
|
|
5926
5972
|
Xt as executePromise,
|
|
5927
|
-
|
|
5973
|
+
g as forEach,
|
|
5928
5974
|
Ee as frame,
|
|
5929
5975
|
Qe as getAttributes,
|
|
5930
5976
|
Xe as getClipboardData,
|
|
5931
5977
|
se as getColumn,
|
|
5932
5978
|
_e as getCurrentDate,
|
|
5933
|
-
|
|
5979
|
+
A as getElement,
|
|
5934
5980
|
Oe as getElementId,
|
|
5935
5981
|
Ae as getElementImage,
|
|
5936
5982
|
re as getElementItem,
|
|
@@ -5959,49 +6005,50 @@ export {
|
|
|
5959
6005
|
hs as goScrollTo,
|
|
5960
6006
|
ls as inArray,
|
|
5961
6007
|
gs as initScrollbarOffset,
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
6008
|
+
fs as intersectKey,
|
|
6009
|
+
ds as isApiSuccess,
|
|
6010
|
+
et as isArray,
|
|
6011
|
+
ms as isDifferent,
|
|
6012
|
+
ut as isDomData,
|
|
6013
|
+
f as isDomRuntime,
|
|
6014
|
+
ys as isEnter,
|
|
5968
6015
|
y as isFilled,
|
|
5969
|
-
|
|
6016
|
+
$s as isFloat,
|
|
5970
6017
|
lt as isFunction,
|
|
5971
6018
|
Jt as isInDom,
|
|
5972
6019
|
xe as isInput,
|
|
5973
|
-
|
|
6020
|
+
ps as isIntegerBetween,
|
|
5974
6021
|
X as isNull,
|
|
5975
6022
|
yt as isNumber,
|
|
5976
6023
|
m as isObject,
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
6024
|
+
E as isObjectNotArray,
|
|
6025
|
+
ct as isSelected,
|
|
6026
|
+
bs as isSelectedByList,
|
|
6027
|
+
U as isString,
|
|
6028
|
+
jt as isWindow,
|
|
5982
6029
|
Q as random,
|
|
5983
|
-
|
|
5984
|
-
|
|
6030
|
+
ws as removeCommonPrefix,
|
|
6031
|
+
vs as replaceComponentName,
|
|
5985
6032
|
J as replaceRecursive,
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
6033
|
+
Ss as replaceTemplate,
|
|
6034
|
+
Ls as resizeImageByMax,
|
|
6035
|
+
Ds as secondToTime,
|
|
5989
6036
|
ne as setElementItem,
|
|
5990
6037
|
Cs as setValues,
|
|
5991
|
-
|
|
6038
|
+
ks as splice,
|
|
5992
6039
|
Fe as strFill,
|
|
5993
6040
|
ie as strSplit,
|
|
5994
|
-
|
|
6041
|
+
H as toArray,
|
|
5995
6042
|
Ht as toCamelCase,
|
|
5996
|
-
|
|
6043
|
+
Ns as toCamelCaseFirst,
|
|
5997
6044
|
P as toDate,
|
|
5998
|
-
|
|
6045
|
+
Es as toKebabCase,
|
|
5999
6046
|
k as toNumber,
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6047
|
+
As as toNumberByMax,
|
|
6048
|
+
je as toPercent,
|
|
6049
|
+
Is as toPercentBy100,
|
|
6050
|
+
Wt as transformation,
|
|
6051
|
+
Bs as uint8ArrayToBase64,
|
|
6005
6052
|
Re as uniqueArray,
|
|
6006
|
-
|
|
6053
|
+
Fs as writeClipboardData
|
|
6007
6054
|
};
|