@dxtmisha/functional-basic 0.8.5 → 0.10.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/dist/library.js CHANGED
@@ -1,104 +1,104 @@
1
- var Wt = Object.defineProperty;
2
- var jt = (i, t, e) => t in i ? Wt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var c = (i, t, e) => jt(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { geo as Ut } from "@dxtmisha/media";
5
- function C(i, t) {
6
- return t ? Object.assign({}, i, t) : Object.assign({}, i);
1
+ var Vt = Object.defineProperty;
2
+ var Kt = (s, t, e) => t in s ? Vt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var c = (s, t, e) => Kt(s, typeof t != "symbol" ? t + "" : t, e);
4
+ import { geo as Yt } from "@dxtmisha/media";
5
+ function D(s, t) {
6
+ return t ? Object.assign({}, s, t) : Object.assign({}, s);
7
7
  }
8
- function f(i) {
9
- return !!(i && typeof i == "object");
8
+ function f(s) {
9
+ return !!(s && typeof s == "object");
10
10
  }
11
- function g(i, t, e) {
12
- if (f(i)) {
13
- const s = [];
14
- return i instanceof Map ? i.forEach((r, o) => s.push(t(r, o, i))) : Array.isArray(i) ? i.forEach((r, o) => s.push(t(r, o, i))) : Object.entries(i).forEach(
15
- ([r, o]) => s.push(t(o, r, i))
16
- ), e ? s : s.filter((r) => r !== void 0);
11
+ function d(s, t, e) {
12
+ if (f(s)) {
13
+ const i = [];
14
+ return s instanceof Map ? s.forEach((r, a) => i.push(t(r, a, s))) : Array.isArray(s) ? s.forEach((r, a) => i.push(t(r, a, s))) : Object.entries(s).forEach(
15
+ ([r, a]) => i.push(t(a, r, s))
16
+ ), e ? i : i.filter((r) => r !== void 0);
17
17
  }
18
18
  return [];
19
19
  }
20
- function It(i, t = "=", e = "&") {
21
- return g(
22
- i,
23
- (s, r) => `${r}${t}${encodeURIComponent(String(s).trim())}`
20
+ function Pt(s, t = "=", e = "&") {
21
+ return d(
22
+ s,
23
+ (i, r) => `${r}${t}${encodeURIComponent(String(i).trim())}`
24
24
  ).sort().join(e);
25
25
  }
26
- function at(i) {
27
- return Array.isArray(i);
26
+ function ht(s) {
27
+ return Array.isArray(s);
28
28
  }
29
- function J(i) {
30
- return i == null;
29
+ function X(s) {
30
+ return s == null;
31
31
  }
32
- function v(i, t) {
33
- if (i) {
34
- if (t && i === "0")
32
+ function m(s, t) {
33
+ if (s) {
34
+ if (t && s === "0")
35
35
  return !0;
36
- switch (typeof i) {
36
+ switch (typeof s) {
37
37
  case "bigint":
38
38
  case "number":
39
- return i !== 0;
39
+ return s !== 0;
40
40
  case "boolean":
41
- return i;
41
+ return s;
42
42
  case "function":
43
43
  case "symbol":
44
44
  return !0;
45
45
  case "object":
46
- return Array.isArray(i) ? i.length > 0 : Object.values(i).some((e) => !J(e));
46
+ return Array.isArray(s) ? s.length > 0 : Object.values(s).some((e) => !X(e));
47
47
  case "string":
48
- return !["", "undefined", "null", "0", "false", "[]"].includes(i);
48
+ return !["", "undefined", "null", "0", "false", "[]"].includes(s);
49
49
  case "undefined":
50
50
  return !1;
51
51
  default:
52
- return !!i;
52
+ return !!s;
53
53
  }
54
54
  }
55
55
  return !1;
56
56
  }
57
- function A(i) {
58
- return f(i) && !Array.isArray(i);
57
+ function A(s) {
58
+ return f(s) && !Array.isArray(s);
59
59
  }
60
- function x(i) {
61
- return typeof i == "string";
60
+ function U(s) {
61
+ return typeof s == "string";
62
62
  }
63
- function U(i) {
64
- return JSON.parse(JSON.stringify(i));
63
+ function V(s) {
64
+ return JSON.parse(JSON.stringify(s));
65
65
  }
66
66
  function l() {
67
67
  return typeof window != "undefined" && !!window.document;
68
68
  }
69
- function dt(i) {
70
- switch (typeof i) {
69
+ function yt(s) {
70
+ switch (typeof s) {
71
71
  case "number":
72
72
  return !0;
73
73
  case "string":
74
- return !!i.match(/^-?[0-9]+(\.[0-9]+)?$/);
74
+ return !!s.match(/^-?[0-9]+(\.[0-9]+)?$/);
75
75
  default:
76
76
  return !1;
77
77
  }
78
78
  }
79
- function k(i) {
80
- if (typeof i == "number")
81
- return i;
82
- if (!i)
79
+ function k(s) {
80
+ if (typeof s == "number")
81
+ return s;
82
+ if (!s)
83
83
  return 0;
84
- let t = i.replace(/[^\d., ]+/ig, "");
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 rt(i, t) {
88
- return J(i) ? !1 : Array.isArray(t) ? t.includes(i) : dt(i) && dt(t) ? k(i) === k(t) : i === t;
87
+ function ot(s, t) {
88
+ return X(s) ? !1 : Array.isArray(t) ? t.includes(s) : yt(s) && yt(t) ? k(s) === k(t) : s === t;
89
89
  }
90
- function ct(i) {
91
- return i instanceof Function || typeof i == "function";
90
+ function lt(s) {
91
+ return s instanceof Function || typeof s == "function";
92
92
  }
93
- function B(i) {
94
- return ct(i) ? i() : i;
93
+ function B(s) {
94
+ return lt(s) ? s() : s;
95
95
  }
96
- function nt() {
96
+ function ct() {
97
97
  return location.href.startsWith("data:");
98
98
  }
99
- const tt = {};
100
- let gt = "ui-storage";
101
- class T {
99
+ const it = {};
100
+ let $t = "ui-storage";
101
+ class et {
102
102
  /**
103
103
  * Constructor
104
104
  * @param name value name/ название значения
@@ -108,10 +108,10 @@ class T {
108
108
  c(this, "value");
109
109
  c(this, "age");
110
110
  this.name = t, this.isSession = e;
111
- const s = `${e ? "session" : "storage"}#${t}`;
112
- if (s in tt)
113
- return tt[s];
114
- this.make(), tt[s] = this;
111
+ const i = `${e ? "session" : "storage"}#${t}`;
112
+ if (i in it)
113
+ return it[i];
114
+ this.make(), it[i] = this;
115
115
  }
116
116
  /**
117
117
  * Changing the prefix in key names. Should be called at the beginning of the code.
@@ -120,7 +120,7 @@ class T {
120
120
  * @param newPrefix new prefix/ новый префикс
121
121
  */
122
122
  static setPrefix(t) {
123
- gt = t;
123
+ $t = t;
124
124
  }
125
125
  /**
126
126
  * Getting data from local storage.
@@ -172,7 +172,7 @@ class T {
172
172
  * @param cache cache time/ время кэширования
173
173
  */
174
174
  isCache(t) {
175
- return J(t) || this.age && this.age + t * 1e3 >= (/* @__PURE__ */ new Date()).getTime();
175
+ return X(t) || this.age && this.age + t * 1e3 >= (/* @__PURE__ */ new Date()).getTime();
176
176
  }
177
177
  /**
178
178
  * Returns an object for working with storage.
@@ -180,7 +180,7 @@ class T {
180
180
  * Возвращает объект для работы с хранилищем.
181
181
  */
182
182
  getMethod() {
183
- if (l() && !nt()) {
183
+ if (l() && !ct()) {
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;
@@ -192,7 +192,7 @@ class T {
192
192
  * Получение имени ключа в хранилище.
193
193
  */
194
194
  getIndex() {
195
- return `${gt}__${this.name}`;
195
+ return `${$t}__${this.name}`;
196
196
  }
197
197
  /**
198
198
  * Getting data from storage.
@@ -205,8 +205,8 @@ class T {
205
205
  if (t)
206
206
  try {
207
207
  return JSON.parse(t);
208
- } catch (s) {
209
- console.error("DataStorage", s);
208
+ } catch (i) {
209
+ console.error("DataStorage", i);
210
210
  }
211
211
  }
212
212
  /**
@@ -219,7 +219,7 @@ class T {
219
219
  return t ? (this.value = t.value, this.age = t.age) : (this.value = void 0, this.age = void 0), this;
220
220
  }
221
221
  }
222
- const Ht = "geo-code", b = class b {
222
+ const qt = "geo-code", w = class w {
223
223
  /**
224
224
  * Information about the current country.
225
225
  *
@@ -274,7 +274,7 @@ const Ht = "geo-code", b = class b {
274
274
  * Получение обработанных данных.
275
275
  */
276
276
  static getItem() {
277
- return C(this.item, {
277
+ return D(this.item, {
278
278
  language: this.language
279
279
  });
280
280
  }
@@ -284,7 +284,7 @@ const Ht = "geo-code", b = class b {
284
284
  * Возвращает полный список стран.
285
285
  */
286
286
  static getList() {
287
- return Ut;
287
+ return Yt;
288
288
  }
289
289
  /**
290
290
  * Returns the data about the country by its full code.
@@ -295,7 +295,7 @@ const Ht = "geo-code", b = class b {
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(U(e != null ? e : this.getList()[0]));
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(V(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 Ht = "geo-code", b = class b {
305
305
  */
306
306
  static getByCodeFull(t) {
307
307
  return this.getList().find(
308
- (e) => rt(t, [
308
+ (e) => ot(t, [
309
309
  `${e.language}-${e.country}`,
310
310
  `${e.country}-${e.language}`
311
311
  ])
@@ -319,8 +319,8 @@ const Ht = "geo-code", b = class b {
319
319
  */
320
320
  static getByCountry(t) {
321
321
  return this.getList().find((e) => {
322
- var s;
323
- return e.country === t || ((s = e == null ? void 0 : e.countryAlternative) == null ? void 0 : s.find((r) => r === t));
322
+ var i;
323
+ return e.country === t || ((i = e == null ? void 0 : e.countryAlternative) == null ? void 0 : i.find((r) => r === t));
324
324
  });
325
325
  }
326
326
  /**
@@ -331,8 +331,8 @@ const Ht = "geo-code", b = class b {
331
331
  */
332
332
  static getByLanguage(t) {
333
333
  return this.getList().find((e) => {
334
- var s;
335
- return e.language === t || ((s = e == null ? void 0 : e.languageAlternative) == null ? void 0 : s.find((r) => r === t));
334
+ var i;
335
+ return e.language === t || ((i = e == null ? void 0 : e.languageAlternative) == null ? void 0 : i.find((r) => r === t));
336
336
  });
337
337
  }
338
338
  /**
@@ -435,33 +435,33 @@ const Ht = "geo-code", b = class b {
435
435
  * объект с данными об текущей стране
436
436
  */
437
437
  static toFull(t) {
438
- return C(t, {
438
+ return D(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(b, "storage", new T(Ht)), c(b, "location"), c(b, "item"), c(b, "language"), c(b, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), b.location = b.findLocation(), b.language = b.findLanguage(b.location), b.item = b.getByCode(b.location);
445
- let p = b;
446
- function Ft(i) {
447
- return l() && i === window;
444
+ c(w, "storage", new et(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
+ let b = w;
446
+ function Wt(s) {
447
+ return l() && s === window;
448
448
  }
449
- function N(i) {
449
+ function E(s) {
450
450
  var t;
451
451
  if (l())
452
- return Ft(i) ? document.body : x(i) ? (t = document.querySelector(i)) != null ? t : void 0 : i;
452
+ return Wt(s) ? document.body : U(s) ? (t = document.querySelector(s)) != null ? t : void 0 : s;
453
453
  }
454
- function ft(i) {
455
- return Ft(i) ? i : N(i);
454
+ function pt(s) {
455
+ return Wt(s) ? s : E(s);
456
456
  }
457
- function zt(i) {
457
+ function Jt(s) {
458
458
  var t;
459
- return !!((t = N(i)) != null && t.closest("html"));
459
+ return !!((t = E(s)) != null && t.closest("html"));
460
460
  }
461
- function z(i) {
462
- return Array.isArray(i) ? i : [i];
461
+ function Y(s) {
462
+ return Array.isArray(s) ? s : [s];
463
463
  }
464
- class mt {
464
+ class bt {
465
465
  /**
466
466
  * Classes Constructor
467
467
  * @param elementSelector element/ элемент
@@ -473,7 +473,7 @@ class mt {
473
473
  * @param detail an event-dependent value associated with the event/ зависимое от события
474
474
  * значение, связанное с событием
475
475
  */
476
- constructor(t, e = ["click"], s, r, o) {
476
+ constructor(t, e = ["click"], i, r, a) {
477
477
  /**
478
478
  * Element.
479
479
  *
@@ -502,8 +502,8 @@ class mt {
502
502
  * Это должен быть объект, реализующий интерфейс EventListener или просто функция JavaScript.
503
503
  */
504
504
  c(this, "listenerRecent", (t) => {
505
- var e, s;
506
- zt(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail), f(this.options) && ((s = this.options) != null && s.once) && this.stop()) : this.stop();
505
+ var e, i;
506
+ Jt(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail), f(this.options) && ((i = this.options) != null && i.once) && this.stop()) : this.stop();
507
507
  });
508
508
  /**
509
509
  * Event states.
@@ -512,7 +512,7 @@ class mt {
512
512
  */
513
513
  c(this, "activity", !1);
514
514
  c(this, "activityItems", []);
515
- this.listener = s, this.options = r, this.detail = o, this.element = ft(t), this.elementControl = N(t), this.type = z(e);
515
+ this.listener = i, this.options = r, this.detail = a, this.element = pt(t), this.elementControl = E(t), this.type = Y(e);
516
516
  }
517
517
  /**
518
518
  * Checks whether event listening is currently enabled.
@@ -532,8 +532,8 @@ class mt {
532
532
  * @param elementSelector element/ элемент
533
533
  */
534
534
  setElement(t) {
535
- const e = ft(t);
536
- return this.elementControlEdit || (this.elementControl = N(t)), this.element = e, this.reset(), this;
535
+ const e = pt(t);
536
+ return this.elementControlEdit || (this.elementControl = E(t)), this.element = e, this.reset(), this;
537
537
  }
538
538
  /**
539
539
  * Modifies the object that receives the notification.
@@ -542,7 +542,7 @@ class mt {
542
542
  * @param elementSelector element/ элемент
543
543
  */
544
544
  setElementControl(t) {
545
- return this.elementControl = N(t), this.elementControlEdit = !J(this.elementControl), this.elementControlEdit || (this.elementControl = N(this.element)), this;
545
+ return this.elementControl = E(t), this.elementControlEdit = !X(this.elementControl), this.elementControlEdit || (this.elementControl = E(this.element)), this;
546
546
  }
547
547
  /**
548
548
  * Changes the type of the handled event.
@@ -551,7 +551,7 @@ class mt {
551
551
  * @param type type/ тип
552
552
  */
553
553
  setType(t) {
554
- return this.type = z(t), this.reset(), this;
554
+ return this.type = Y(t), this.reset(), this;
555
555
  }
556
556
  /**
557
557
  * Modifies the object that receives the notification.
@@ -592,8 +592,8 @@ class mt {
592
592
  dispatch(t = this.detail) {
593
593
  return this.type.forEach(
594
594
  (e) => {
595
- var s;
596
- return (s = this.element) == null ? void 0 : s.dispatchEvent(new CustomEvent(e, { detail: t }));
595
+ var i;
596
+ return (i = this.element) == null ? void 0 : i.dispatchEvent(new CustomEvent(e, { detail: t }));
597
597
  }
598
598
  ), this;
599
599
  }
@@ -619,10 +619,10 @@ class mt {
619
619
  return this.activity && (this.activity = !1, this.activityItems.forEach(({
620
620
  element: t,
621
621
  type: e,
622
- listener: s,
622
+ listener: i,
623
623
  observer: r
624
624
  }) => {
625
- r ? r.disconnect() : s ? t == null || t.removeEventListener(e, s) : t == null || t.removeEventListener(e, this.listenerRecent);
625
+ r ? r.disconnect() : i ? t == null || t.removeEventListener(e, i) : t == null || t.removeEventListener(e, this.listenerRecent);
626
626
  })), this;
627
627
  }
628
628
  /**
@@ -676,9 +676,9 @@ class mt {
676
676
  makeScroll() {
677
677
  if (this.element) {
678
678
  let t = !1;
679
- const e = (s) => {
679
+ const e = (i) => {
680
680
  t || (t = !0, requestAnimationFrame(() => {
681
- this.listenerRecent(s), t = !1;
681
+ this.listenerRecent(i), t = !1;
682
682
  }));
683
683
  };
684
684
  return this.element.addEventListener("scroll", e, this.options), this.element.addEventListener("resize", e, this.options), this.activityItems.push(
@@ -697,7 +697,7 @@ class mt {
697
697
  return !1;
698
698
  }
699
699
  }
700
- const yt = "ui-loading", K = class K {
700
+ const wt = "ui-loading", H = class H {
701
701
  /**
702
702
  * Check if the loader is active now.
703
703
  *
@@ -706,6 +706,14 @@ const yt = "ui-loading", K = class K {
706
706
  static is() {
707
707
  return this.value > 0;
708
708
  }
709
+ /**
710
+ * Get current loading value.
711
+ *
712
+ * Получить текущее значение загрузки.
713
+ */
714
+ static get() {
715
+ return this.value;
716
+ }
709
717
  /**
710
718
  * Shows the loader.
711
719
  *
@@ -732,7 +740,26 @@ const yt = "ui-loading", K = class K {
732
740
  * @param element element/ элемент
733
741
  */
734
742
  static registrationEvent(t, e) {
735
- l() && new mt(window, yt, t).setElementControl(e).start();
743
+ if (l()) {
744
+ const i = new bt(window, wt, t).setElementControl(e).start();
745
+ this.registrationList.push({
746
+ item: i,
747
+ listener: t,
748
+ element: e
749
+ });
750
+ }
751
+ }
752
+ /**
753
+ * Unregistration of an event.
754
+ *
755
+ * Отмена регистрации события.
756
+ * @param listener the object that receives a notification (an object that implements the
757
+ * Event interface) when an event of the specified type occurs/ объект, который принимает
758
+ * уведомление, когда событие указанного типа произошло
759
+ * @param element element/ элемент
760
+ */
761
+ static unregistrationEvent(t, e) {
762
+ this.registrationList = this.registrationList.filter((i) => i.listener === t && i.element === e ? (i.item.stop(), !1) : !0);
736
763
  }
737
764
  /**
738
765
  * Calls the event listener.
@@ -744,9 +771,9 @@ const yt = "ui-loading", K = class K {
744
771
  (t = this.event) == null || t.dispatch({ loading: this.is() });
745
772
  }
746
773
  };
747
- c(K, "value", 0), c(K, "event"), l() && (K.event = new mt(window, yt));
748
- let I = K;
749
- class Zt {
774
+ c(H, "value", 0), c(H, "event"), c(H, "registrationList", []), l() && (H.event = new bt(window, wt));
775
+ let R = H;
776
+ class Mt {
750
777
  constructor() {
751
778
  /** Default headers/ Заголовки по умолчанию */
752
779
  c(this, "headers", {});
@@ -760,11 +787,11 @@ class Zt {
760
787
  */
761
788
  get(t, e = "application/json;charset=UTF-8") {
762
789
  if (t !== null) {
763
- const s = C(
790
+ const i = D(
764
791
  this.headers,
765
792
  t
766
793
  );
767
- return v(e) && (s["Content-Type"] = e), s;
794
+ return m(e) && (i["Content-Type"] = e), i;
768
795
  }
769
796
  }
770
797
  /**
@@ -776,8 +803,8 @@ class Zt {
776
803
  return A(t) && (this.headers = t), this;
777
804
  }
778
805
  }
779
- var L = /* @__PURE__ */ ((i) => (i.get = "GET", i.post = "POST", i.put = "PUT", i.delete = "DELETE", i))(L || {});
780
- class Vt {
806
+ var C = /* @__PURE__ */ ((s) => (s.get = "GET", s.post = "POST", s.put = "PUT", s.delete = "DELETE", s))(C || {});
807
+ class Qt {
781
808
  constructor() {
782
809
  /** Default request data/ Данные запроса по умолчанию */
783
810
  c(this, "value");
@@ -810,7 +837,7 @@ class Vt {
810
837
  if (t instanceof FormData)
811
838
  this.addByFormData(t, e);
812
839
  else if (A(t))
813
- return C(e, t);
840
+ return D(e, t);
814
841
  }
815
842
  return t;
816
843
  }
@@ -830,11 +857,11 @@ class Vt {
830
857
  * @param value default values/ значения по умолчанию
831
858
  */
832
859
  addByFormData(t, e) {
833
- for (const s in e)
834
- t.has(s) || t.set(s, e[s]);
860
+ for (const i in e)
861
+ t.has(i) || t.set(i, e[i]);
835
862
  }
836
863
  }
837
- class $t {
864
+ class vt {
838
865
  constructor() {
839
866
  c(this, "value");
840
867
  }
@@ -969,15 +996,15 @@ class $t {
969
996
  this.value || (this.value = {}), this.value[t] = e;
970
997
  }
971
998
  }
972
- async function Kt(i) {
973
- const t = B(i);
999
+ async function Xt(s) {
1000
+ const t = B(s);
974
1001
  return t instanceof Promise ? await t : t;
975
1002
  }
976
- function q(i, t) {
977
- return Math.floor(Math.random() * (t - i + 1) + i);
1003
+ function Q(s, t) {
1004
+ return Math.floor(Math.random() * (t - s + 1) + s);
978
1005
  }
979
- const pt = "d-response-loading";
980
- class Yt {
1006
+ const St = "d-response-loading";
1007
+ class _t {
981
1008
  /**
982
1009
  * Constructor
983
1010
  * @param requestDefault default request processor/ процессор запросов по умолчанию
@@ -1002,8 +1029,8 @@ class Yt {
1002
1029
  * @param request data for the request/ данные для запроса
1003
1030
  * @param devMode is it developer mode/ является ли режим разработчика
1004
1031
  */
1005
- get(t = "", e, s, r) {
1006
- return this.response.find((o) => !this.isDisable(o) && this.isPath(o, t) && e === o.method && this.isFirst(o, r) && this.isResponse(o, s) ? (this.isDevMode(r) && console.warn(`Response type: ${o.path}`), this.first.push(o), !0) : !1);
1032
+ get(t = "", e, i, r) {
1033
+ return this.response.find((a) => !this.isDisable(a) && this.isPath(a, t) && e === a.method && this.isFirst(a, r) && this.isResponse(a, i) ? (this.isDevMode(r) && console.warn(`Response type: ${a.path}`), this.first.push(a), !0) : !1);
1007
1034
  }
1008
1035
  /**
1009
1036
  * Returns a list of data about the emulator.
@@ -1020,7 +1047,7 @@ class Yt {
1020
1047
  * @param response data for caching/ данные для кеширования
1021
1048
  */
1022
1049
  add(t) {
1023
- return this.response.push(...z(t)), this;
1050
+ return this.response.push(...Y(t)), this;
1024
1051
  }
1025
1052
  /**
1026
1053
  * Sets developer mode.
@@ -1038,15 +1065,15 @@ class Yt {
1038
1065
  async emulator(t) {
1039
1066
  const {
1040
1067
  path: e = "",
1041
- method: s = L.get,
1042
- global: r = s === L.get,
1043
- devMode: o = !1
1068
+ method: i = C.get,
1069
+ global: r = i === C.get,
1070
+ devMode: a = !1
1044
1071
  } = t;
1045
- if (r || this.isDevMode(o)) {
1046
- const a = this.requestDefault.request(t.request), u = this.get(e, s, a, o);
1072
+ if (r || this.isDevMode(a)) {
1073
+ const o = this.requestDefault.request(t.request), u = this.get(e, i, o, a);
1047
1074
  if (u) {
1048
- const h = await this.fetch(u, a);
1049
- return this.isDevMode(o) && console.warn("Response data:", e, a, h), h;
1075
+ const h = await this.fetch(u, o);
1076
+ return this.isDevMode(a) && console.warn("Response data:", e, o, h), h;
1050
1077
  }
1051
1078
  }
1052
1079
  }
@@ -1096,9 +1123,9 @@ class Yt {
1096
1123
  * @param request request data/ данные запроса
1097
1124
  */
1098
1125
  isResponse(t, e) {
1099
- const s = this.requestDefault.request(t == null ? void 0 : t.request);
1100
- return e === s || s === "*any" || v(e) && v(s) && A(e) && A(s) && !(e instanceof FormData) && !(s instanceof FormData) && Object.values(e).length === Object.values(s).length && Object.entries(s).reduce(
1101
- (r, [o, a]) => r && (a === (e == null ? void 0 : e[o]) || a === "*any"),
1126
+ const i = this.requestDefault.request(t == null ? void 0 : t.request);
1127
+ return e === i || i === "*any" || m(e) && m(i) && A(e) && A(i) && !(e instanceof FormData) && !(i instanceof FormData) && Object.values(e).length === Object.values(i).length && Object.entries(i).reduce(
1128
+ (r, [a, o]) => r && (o === (e == null ? void 0 : e[a]) || o === "*any"),
1102
1129
  !0
1103
1130
  );
1104
1131
  }
@@ -1110,13 +1137,13 @@ class Yt {
1110
1137
  * @param request data for the request/ данные для запроса
1111
1138
  */
1112
1139
  fetch(t, e) {
1113
- return this.startResponseLoading(), new Promise((s) => {
1114
- Kt(
1115
- ct(t.response) ? t.response(e) : t.response
1140
+ return this.startResponseLoading(), new Promise((i) => {
1141
+ Xt(
1142
+ lt(t.response) ? t.response(e) : t.response
1116
1143
  ).then((r) => {
1117
- t != null && t.lag ? (I.show(), setTimeout(() => {
1118
- this.stopResponseLoading(), s(r), I.hide();
1119
- }, q(0, 2e3))) : (this.stopResponseLoading(), s(r));
1144
+ t != null && t.lag ? (R.show(), setTimeout(() => {
1145
+ this.stopResponseLoading(), i(r), R.hide();
1146
+ }, Q(0, 2e3))) : (this.stopResponseLoading(), i(r));
1120
1147
  });
1121
1148
  });
1122
1149
  }
@@ -1126,7 +1153,7 @@ class Yt {
1126
1153
  * Включить загрузку для эмуляции запроса.
1127
1154
  */
1128
1155
  startResponseLoading() {
1129
- this.loading && clearTimeout(this.loading), l() && document.body.classList.add(pt);
1156
+ this.loading && clearTimeout(this.loading), l() && document.body.classList.add(St);
1130
1157
  }
1131
1158
  /**
1132
1159
  * Disable loading for request emulation.
@@ -1135,11 +1162,11 @@ class Yt {
1135
1162
  */
1136
1163
  stopResponseLoading() {
1137
1164
  this.loading = setTimeout(() => {
1138
- this.loading = void 0, l() && document.body.classList.remove(pt);
1165
+ this.loading = void 0, l() && document.body.classList.remove(St);
1139
1166
  }, 1200);
1140
1167
  }
1141
1168
  }
1142
- class qt {
1169
+ class Ot {
1143
1170
  constructor() {
1144
1171
  /** Function for call before the request/ Функция для вызова перед запросом */
1145
1172
  c(this, "callback");
@@ -1167,9 +1194,9 @@ class qt {
1167
1194
  * @param query data received in the request/ данные, полученные в запросе
1168
1195
  * @param apiFetch request options/ опции запроса
1169
1196
  */
1170
- async makeEnd(t, e, s) {
1197
+ async makeEnd(t, e, i) {
1171
1198
  let r = {};
1172
- return t && this.callbackEnd && (r = await this.callbackEnd(e, s)), r;
1199
+ return t && this.callbackEnd && (r = await this.callbackEnd(e, i)), r;
1173
1200
  }
1174
1201
  /**
1175
1202
  * The function is modified for a call before the request.
@@ -1210,11 +1237,11 @@ class qt {
1210
1237
  * @param apiFetch request options/ опции запроса
1211
1238
  */
1212
1239
  async end(t, e) {
1213
- let s = {};
1214
- return this.callbackEnd && (s = await this.callbackEnd(t, e)), s;
1240
+ let i = {};
1241
+ return this.callbackEnd && (i = await this.callbackEnd(t, e)), i;
1215
1242
  }
1216
1243
  }
1217
- const w = class w {
1244
+ const v = class v {
1218
1245
  /**
1219
1246
  * Is the server local.
1220
1247
  *
@@ -1247,7 +1274,7 @@ const w = class w {
1247
1274
  * @param api adding a path to the site’s API/ добавление пути к API сайта
1248
1275
  */
1249
1276
  static getUrl(t, e = !0) {
1250
- return `${e ? this.url : ""}${t}`.replace("{locale}", p.getLocation()).replace("{country}", p.getCountry()).replace("{language}", p.getLanguage());
1277
+ return `${e ? this.url : ""}${t}`.replace("{locale}", b.getLocation()).replace("{country}", b.getCountry()).replace("{language}", b.getLanguage());
1251
1278
  }
1252
1279
  /**
1253
1280
  * Getting data for the body.
@@ -1256,11 +1283,11 @@ const w = class w {
1256
1283
  * @param request this request/ данный запрос
1257
1284
  * @param method method for request/ метод запрос
1258
1285
  */
1259
- static getBody(t = {}, e = L.get) {
1286
+ static getBody(t = {}, e = C.get) {
1260
1287
  if (t instanceof FormData)
1261
1288
  return t;
1262
- if (e !== L.get && v(t))
1263
- return x(t) ? t : JSON.stringify(t);
1289
+ if (e !== C.get && m(t))
1290
+ return U(t) ? t : JSON.stringify(t);
1264
1291
  }
1265
1292
  /**
1266
1293
  * Getting data for the body of the get method.
@@ -1270,11 +1297,11 @@ const w = class w {
1270
1297
  * @param path path to request/ путь к запрос
1271
1298
  * @param method method for request/ метод запрос
1272
1299
  */
1273
- static getBodyForGet(t, e = "", s = L.get) {
1274
- if (s === L.get) {
1275
- const r = e.match(/\?/) ? "&" : "?", o = typeof t == "object" ? It(t) : t;
1276
- if (v(o))
1277
- return `${r}${o}`;
1300
+ static getBodyForGet(t, e = "", i = C.get) {
1301
+ if (i === C.get) {
1302
+ const r = e.match(/\?/) ? "&" : "?", a = typeof t == "object" ? Pt(t) : t;
1303
+ if (m(a))
1304
+ return `${r}${a}`;
1278
1305
  }
1279
1306
  return "";
1280
1307
  }
@@ -1284,7 +1311,7 @@ const w = class w {
1284
1311
  * Изменяет данные заголовка по умолчанию.
1285
1312
  */
1286
1313
  static setHeaders(t) {
1287
- return this.headers.set(t), w;
1314
+ return this.headers.set(t), v;
1288
1315
  }
1289
1316
  /**
1290
1317
  * Modifies the default request data.
@@ -1292,7 +1319,7 @@ const w = class w {
1292
1319
  * Изменяет данные запроса по умолчанию.
1293
1320
  */
1294
1321
  static setRequestDefault(t) {
1295
- return this.requestDefault.set(t), w;
1322
+ return this.requestDefault.set(t), v;
1296
1323
  }
1297
1324
  /**
1298
1325
  * Change the base path to the script.
@@ -1301,7 +1328,7 @@ const w = class w {
1301
1328
  * @param url path to the script/ путь к скрипту
1302
1329
  */
1303
1330
  static setUrl(t) {
1304
- return this.url = t, w;
1331
+ return this.url = t, v;
1305
1332
  }
1306
1333
  /**
1307
1334
  * The function is modified for a call before the request.
@@ -1310,7 +1337,7 @@ const w = class w {
1310
1337
  * @param callback function for call/ функция для вызова
1311
1338
  */
1312
1339
  static setPreparation(t) {
1313
- return this.preparation.set(t), w;
1340
+ return this.preparation.set(t), v;
1314
1341
  }
1315
1342
  /**
1316
1343
  * Modify the function after the request.
@@ -1319,7 +1346,7 @@ const w = class w {
1319
1346
  * @param callback function for call/ функция для вызова
1320
1347
  */
1321
1348
  static setEnd(t) {
1322
- return this.preparation.setEnd(t), w;
1349
+ return this.preparation.setEnd(t), v;
1323
1350
  }
1324
1351
  /**
1325
1352
  * To execute a request.
@@ -1328,7 +1355,7 @@ const w = class w {
1328
1355
  * @param pathRequest query string or list of parameters/ строка запроса или список параметров
1329
1356
  */
1330
1357
  static async request(t) {
1331
- return x(t) ? await this.fetch({
1358
+ return U(t) ? await this.fetch({
1332
1359
  path: t
1333
1360
  }) : await this.fetch(t);
1334
1361
  }
@@ -1339,8 +1366,8 @@ const w = class w {
1339
1366
  * @param request list of parameters/ список параметров
1340
1367
  */
1341
1368
  static get(t) {
1342
- return this.request(C(t, {
1343
- method: L.get
1369
+ return this.request(D(t, {
1370
+ method: C.get
1344
1371
  }));
1345
1372
  }
1346
1373
  /**
@@ -1350,8 +1377,8 @@ const w = class w {
1350
1377
  * @param request list of parameters/ список параметров
1351
1378
  */
1352
1379
  static post(t) {
1353
- return this.request(C(t, {
1354
- method: L.post
1380
+ return this.request(D(t, {
1381
+ method: C.post
1355
1382
  }));
1356
1383
  }
1357
1384
  /**
@@ -1361,8 +1388,8 @@ const w = class w {
1361
1388
  * @param request list of parameters/ список параметров
1362
1389
  */
1363
1390
  static put(t) {
1364
- return this.request(C(t, {
1365
- method: L.put
1391
+ return this.request(D(t, {
1392
+ method: C.put
1366
1393
  }));
1367
1394
  }
1368
1395
  /**
@@ -1372,8 +1399,8 @@ const w = class w {
1372
1399
  * @param request list of parameters/ список параметров
1373
1400
  */
1374
1401
  static delete(t) {
1375
- return this.request(C(t, {
1376
- method: L.delete
1402
+ return this.request(D(t, {
1403
+ method: C.delete
1377
1404
  }));
1378
1405
  }
1379
1406
  /**
@@ -1385,31 +1412,31 @@ const w = class w {
1385
1412
  static async fetch(t) {
1386
1413
  const {
1387
1414
  toData: e = !0,
1388
- hideError: s = !1,
1415
+ hideError: i = !1,
1389
1416
  queryReturn: r = void 0,
1390
- globalPreparation: o = !0,
1391
- globalEnd: a = !0
1417
+ globalPreparation: a = !0,
1418
+ globalEnd: o = !0
1392
1419
  } = t, u = await this.response.emulator(t);
1393
1420
  if (u)
1394
1421
  return u;
1395
- const h = new $t();
1396
- let m;
1397
- I.show();
1422
+ const h = new vt();
1423
+ let y;
1424
+ R.show();
1398
1425
  try {
1399
- await this.preparation.make(o, t);
1400
- const d = await this.makeQuery(t), S = await this.preparation.makeEnd(a, d, t);
1401
- if (h.setStatus(d.status, d.statusText), this.status.setStatus(d.status, d.statusText), S != null && S.reset)
1402
- return I.hide(), await this.fetch(t);
1403
- m = await this.readData(
1404
- d,
1426
+ await this.preparation.make(a, t);
1427
+ const g = await this.makeQuery(t), S = await this.preparation.makeEnd(o, g, t);
1428
+ if (h.setStatus(g.status, g.statusText), this.status.setStatus(g.status, g.statusText), S != null && S.reset)
1429
+ return R.hide(), await this.fetch(t);
1430
+ y = await this.readData(
1431
+ g,
1405
1432
  r,
1406
1433
  S
1407
1434
  );
1408
- } catch (d) {
1409
- throw s || console.error("Api: ", d), h.setError(String(d)), this.status.setError(String(d)), I.hide(), d;
1435
+ } catch (g) {
1436
+ throw i || console.error("Api: ", g), h.setError(String(g)), this.status.setError(String(g)), R.hide(), g;
1410
1437
  }
1411
- return I.hide(), h.setLastResponse(m), this.status.setLastResponse(m), this.makeStatus(
1412
- this.makeData(m, e),
1438
+ return R.hide(), h.setLastResponse(y), this.status.setLastResponse(y), this.makeStatus(
1439
+ this.makeData(y, e),
1413
1440
  h
1414
1441
  );
1415
1442
  }
@@ -1421,9 +1448,9 @@ const w = class w {
1421
1448
  * @param queryReturn custom function for reading data/ кастомная функция для чтения данных
1422
1449
  * @param end finalization data/ данные финализации
1423
1450
  */
1424
- static async readData(t, e, s) {
1451
+ static async readData(t, e, i) {
1425
1452
  var r;
1426
- return e ? await e(t) : "data" in s ? s.data : ((r = t.headers.get("Content-Type")) != null ? r : "").match("application/json") ? await t.json() : { data: await t.text() };
1453
+ return e ? await e(t) : "data" in i ? i.data : ((r = t.headers.get("Content-Type")) != null ? r : "").match("application/json") ? await t.json() : { data: await t.text() };
1427
1454
  }
1428
1455
  /**
1429
1456
  * Executing the request.
@@ -1433,19 +1460,19 @@ const w = class w {
1433
1460
  */
1434
1461
  static async makeQuery(t) {
1435
1462
  const e = this.requestDefault.request(t.request), {
1436
- api: s = !0,
1463
+ api: i = !0,
1437
1464
  path: r = "",
1438
- pathFull: o = void 0,
1439
- method: a = L.get,
1465
+ pathFull: a = void 0,
1466
+ method: o = C.get,
1440
1467
  headers: u = {},
1441
1468
  type: h = "application/json;charset=UTF-8",
1442
- init: m = {},
1443
- controller: d = void 0
1444
- } = t, S = o != null ? o : this.getUrl(r, s), G = `${S}${this.getBodyForGet(e, S, a)}`, Q = this.headers.get(u, h), Z = C(m, {
1445
- method: a,
1446
- body: this.getBody(e, a)
1469
+ init: y = {},
1470
+ controller: g = void 0
1471
+ } = t, S = a != null ? a : this.getUrl(r, i), st = `${S}${this.getBodyForGet(e, S, o)}`, _ = this.headers.get(u, h), q = D(y, {
1472
+ method: o,
1473
+ body: this.getBody(e, o)
1447
1474
  });
1448
- return Q && (Z.headers = Q), d && (Z.signal = d.signal), await fetch(G, Z);
1475
+ return _ && (q.headers = _), g && (q.signal = g.signal), await fetch(st, q);
1449
1476
  }
1450
1477
  /**
1451
1478
  * Transforms data if needed.
@@ -1457,10 +1484,10 @@ const w = class w {
1457
1484
  static makeData(t, e) {
1458
1485
  if (!e || !t || !A(t) || !("data" in t))
1459
1486
  return t;
1460
- if (t.data !== null && typeof t.data != "object" || at(t.data))
1487
+ if (t.data !== null && typeof t.data != "object" || ht(t.data))
1461
1488
  return t.data;
1462
- const s = C(t.data);
1463
- return "success" in t && !("success" in s) && (s.success = t.success), "status" in t && !("status" in s) && (s.status = t.status), "message" in t && !("message" in s) && (s.message = t.message), s;
1489
+ const i = D(t.data);
1490
+ 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;
1464
1491
  }
1465
1492
  /**
1466
1493
  * Appends the status object to the response data if possible.
@@ -1476,16 +1503,16 @@ const w = class w {
1476
1503
  } : t;
1477
1504
  }
1478
1505
  };
1479
- c(w, "url", "/api/"), c(w, "headers", new Zt()), c(w, "requestDefault", new Vt()), c(w, "status", new $t()), c(w, "response", new Yt(w.requestDefault)), c(w, "preparation", new qt());
1480
- let H = w;
1481
- class Ee {
1506
+ 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 K = v;
1508
+ class He {
1482
1509
  /**
1483
1510
  * Constructor
1484
1511
  * @param name channel name/ название канала
1485
1512
  * @param callback callback on message received/ колбэк на получение сообщения
1486
1513
  * @param callbackError callback on message error/ колбэк на ошибку сообщения
1487
1514
  */
1488
- constructor(t, e, s) {
1515
+ constructor(t, e, i) {
1489
1516
  c(this, "channel");
1490
1517
  /**
1491
1518
  * Update state on message received.
@@ -1507,9 +1534,9 @@ class Ee {
1507
1534
  var e;
1508
1535
  return (e = this.callbackError) == null || e.call(this, t), this;
1509
1536
  });
1510
- if (this.callback = e, this.callbackError = s, l())
1537
+ if (this.callback = e, this.callbackError = i, l())
1511
1538
  try {
1512
- this.channel = new BroadcastChannel(`${Jt()}__${t}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
1539
+ this.channel = new BroadcastChannel(`${Tt()}__${t}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
1513
1540
  } catch (r) {
1514
1541
  console.error(`BroadcastMessage ${t}:`, r);
1515
1542
  }
@@ -1552,8 +1579,8 @@ class Ee {
1552
1579
  return this.callbackError = t, this;
1553
1580
  }
1554
1581
  }
1555
- const Jt = () => new T("__broadcast-name").get(() => `name_${q(1e6, 9999999)}`);
1556
- class Mt {
1582
+ const Tt = () => new et("__broadcast-name").get(() => `name_${Q(1e6, 9999999)}`);
1583
+ class Gt {
1557
1584
  /**
1558
1585
  * Constructor
1559
1586
  * @param callback function for the cache/ функция для кэша
@@ -1613,10 +1640,10 @@ class Mt {
1613
1640
  * @param comparison additional data for comparison/ дополнительные данные для сравнения
1614
1641
  */
1615
1642
  isUpdate(t) {
1616
- return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
1643
+ return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, i) => e !== t[i]) >= 0 ? (this.comparisons = [...t], !0) : !1;
1617
1644
  }
1618
1645
  }
1619
- class Qt {
1646
+ class te {
1620
1647
  constructor() {
1621
1648
  c(this, "cache", {});
1622
1649
  }
@@ -1628,8 +1655,8 @@ class Qt {
1628
1655
  * @param callback function for the cache/ функция для кэша
1629
1656
  * @param comparison additional data for comparison/ дополнительные данные для сравнения
1630
1657
  */
1631
- get(t, e, s) {
1632
- return this.getCacheItem(t, e).getCache(s != null ? s : []);
1658
+ get(t, e, i) {
1659
+ return this.getCacheItem(t, e).getCache(i != null ? i : []);
1633
1660
  }
1634
1661
  /**
1635
1662
  * Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
@@ -1639,8 +1666,8 @@ class Qt {
1639
1666
  * @param callback function for the cache/ функция для кэша
1640
1667
  * @param comparison additional data for comparison/ дополнительные данные для сравнения
1641
1668
  */
1642
- async getAsync(t, e, s) {
1643
- return await this.getCacheItem(t, e).getCacheAsync(s != null ? s : []);
1669
+ async getAsync(t, e, i) {
1670
+ return await this.getCacheItem(t, e).getCacheAsync(i != null ? i : []);
1644
1671
  }
1645
1672
  /**
1646
1673
  * Returns an instance of the object for working with the cache element.
@@ -1650,10 +1677,10 @@ class Qt {
1650
1677
  * @param callback function for the cache/ функция для кэша
1651
1678
  */
1652
1679
  getCacheItem(t, e) {
1653
- return t in this.cache || (this.cache[t] = new Mt(e)), this.cache[t];
1680
+ return t in this.cache || (this.cache[t] = new Gt(e)), this.cache[t];
1654
1681
  }
1655
1682
  }
1656
- const O = class O {
1683
+ const tt = class tt {
1657
1684
  /**
1658
1685
  * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
1659
1686
  *
@@ -1662,15 +1689,15 @@ const O = class O {
1662
1689
  * @param callback function for the cache/ функция для кэша
1663
1690
  * @param comparison additional data for comparison/ дополнительные данные для сравнения
1664
1691
  */
1665
- static get(t, e, s) {
1666
- return this.cache.get(t, e, s);
1692
+ static get(t, e, i) {
1693
+ return this.cache.get(t, e, i);
1667
1694
  }
1668
1695
  };
1669
- c(O, "cache"), O.cache = new Qt();
1670
- let bt = O;
1671
- function Rt(i, t = !1) {
1672
- if (typeof i == "string") {
1673
- const e = i.trim();
1696
+ c(tt, "cache"), tt.cache = new te();
1697
+ let Lt = tt;
1698
+ function Ut(s, t = !1) {
1699
+ if (typeof s == "string") {
1700
+ const e = s.trim();
1674
1701
  switch (e) {
1675
1702
  case "undefined":
1676
1703
  return;
@@ -1684,8 +1711,8 @@ function Rt(i, t = !1) {
1684
1711
  if (/^[{[]/.exec(e))
1685
1712
  try {
1686
1713
  return JSON.parse(e);
1687
- } catch (s) {
1688
- console.error("transformation: JSON error", s);
1714
+ } catch (i) {
1715
+ console.error("transformation: JSON error", i);
1689
1716
  }
1690
1717
  else {
1691
1718
  if (/^[0-9]+\.[0-9.]+$/.exec(e))
@@ -1697,10 +1724,10 @@ function Rt(i, t = !1) {
1697
1724
  }
1698
1725
  }
1699
1726
  }
1700
- return i;
1727
+ return s;
1701
1728
  }
1702
- const Xt = "cookie-block";
1703
- class xt {
1729
+ const ee = "cookie-block";
1730
+ class jt {
1704
1731
  /**
1705
1732
  * Obtaining status.
1706
1733
  *
@@ -1720,14 +1747,14 @@ class xt {
1720
1747
  this.storage.set(t);
1721
1748
  }
1722
1749
  }
1723
- c(xt, "storage", new T(Xt));
1724
- const X = {}, lt = class lt {
1750
+ c(jt, "storage", new et(ee));
1751
+ const O = {}, mt = class mt {
1725
1752
  constructor(t) {
1726
1753
  c(this, "value");
1727
1754
  c(this, "options", {});
1728
- if (this.name = t, t in et)
1729
- return et[t];
1730
- this.value = X == null ? void 0 : X[t], et[t] = this;
1755
+ if (this.name = t, t in rt)
1756
+ return rt[t];
1757
+ this.value = O == null ? void 0 : O[t], rt[t] = this;
1731
1758
  }
1732
1759
  /**
1733
1760
  * Get data or update if none.
@@ -1772,14 +1799,14 @@ const X = {}, lt = class lt {
1772
1799
  * Обновление данных cookie.
1773
1800
  */
1774
1801
  update() {
1775
- var t, e, s, r, o;
1776
- if (l() && !nt() && !xt.get()) {
1777
- const a = String((t = this.value) != null ? t : "");
1802
+ var t, e, i, r, a;
1803
+ if (l() && !ct() && !jt.get()) {
1804
+ const o = String((t = this.value) != null ? t : "");
1778
1805
  document.cookie = [
1779
- `${encodeURIComponent(this.name)}=${encodeURIComponent(a)}`,
1780
- `max-age=${a === "" ? "-1" : this.getAge()}`,
1781
- `SameSite=${(s = (e = this.options) == null ? void 0 : e.sameSite) != null ? s : "strict"}`,
1782
- ...(o = (r = this.options) == null ? void 0 : r.arguments) != null ? o : []
1806
+ `${encodeURIComponent(this.name)}=${encodeURIComponent(o)}`,
1807
+ `max-age=${o === "" ? "-1" : this.getAge()}`,
1808
+ `SameSite=${(i = (e = this.options) == null ? void 0 : e.sameSite) != null ? i : "strict"}`,
1809
+ ...(a = (r = this.options) == null ? void 0 : r.arguments) != null ? a : []
1783
1810
  ].join("; ");
1784
1811
  }
1785
1812
  }
@@ -1790,43 +1817,43 @@ const X = {}, lt = class lt {
1790
1817
  */
1791
1818
  static updateData() {
1792
1819
  for (const t of document.cookie.split(";")) {
1793
- const [e, s] = t.trim().split("=");
1794
- e && v(s) && (X[e] = Rt(s));
1820
+ const [e, i] = t.trim().split("=");
1821
+ e && m(i) && (O[e] = Ut(i));
1795
1822
  }
1796
1823
  }
1797
1824
  };
1798
- l() && !nt() && lt.updateData();
1799
- let wt = lt;
1800
- const et = {};
1801
- function F(i) {
1802
- var r, o, a, u, h, m, d, S;
1803
- if (i instanceof Date)
1804
- return i;
1805
- if (J(i))
1825
+ l() && !ct() && mt.updateData();
1826
+ let Ct = mt;
1827
+ const rt = {};
1828
+ function P(s) {
1829
+ var r, a, o, u, h, y, g, S;
1830
+ if (s instanceof Date)
1831
+ return s;
1832
+ if (X(s))
1806
1833
  return /* @__PURE__ */ new Date();
1807
- if (typeof i == "number")
1808
- return new Date(i);
1809
- let t = i, e = p.getTimezoneFormat().trim();
1810
- i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (G, Q, Z) => (t = Q, e = Z.trim(), G));
1811
- const s = (S = (d = (m = (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 ? m : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? d : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? S : t.replace(" ", "T");
1812
- return /* @__PURE__ */ new Date(`${s.trim()}${e}`);
1834
+ if (typeof s == "number")
1835
+ return new Date(s);
1836
+ let t = s, e = b.getTimezoneFormat().trim();
1837
+ s.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (st, _, q) => (t = _, e = q.trim(), st));
1838
+ const i = (S = (g = (y = (h = (u = (o = (a = (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 ? a : /^\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 ? o : /^\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 ? y : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? g : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? S : t.replace(" ", "T");
1839
+ return /* @__PURE__ */ new Date(`${i.trim()}${e}`);
1813
1840
  }
1814
- function _t(i, t) {
1815
- return g(i, (e) => e == null ? void 0 : e[t], !0);
1841
+ function se(s, t) {
1842
+ return d(s, (e) => e == null ? void 0 : e[t], !0);
1816
1843
  }
1817
- class M {
1844
+ class N {
1818
1845
  /**
1819
1846
  * Constructor
1820
1847
  * @param code country code, full form language-country or one of them/
1821
1848
  * код страны, полный вид язык-страна или один из них
1822
1849
  */
1823
- constructor(t = p.getLocation()) {
1850
+ constructor(t = b.getLocation()) {
1824
1851
  c(this, "geo");
1825
- this.geo = p.find(t);
1852
+ this.geo = b.find(t);
1826
1853
  const e = this.getLocation();
1827
- if (e in it)
1828
- return it[e];
1829
- it[e] = this;
1854
+ if (e in nt)
1855
+ return nt[e];
1856
+ nt[e] = this;
1830
1857
  }
1831
1858
  /**
1832
1859
  * Returns an instance of the class according to the specified country code.
@@ -1835,8 +1862,8 @@ class M {
1835
1862
  * @param code country code, full form language-country or one of them/
1836
1863
  * код страны, полный вид язык-страна или один из них
1837
1864
  */
1838
- static getInstance(t = p.getLocation()) {
1839
- return new M(t);
1865
+ static getInstance(t = b.getLocation()) {
1866
+ return new N(t);
1840
1867
  }
1841
1868
  /**
1842
1869
  * Returns country code and language.
@@ -1863,18 +1890,18 @@ class M {
1863
1890
  * объект с некоторыми или всеми из следующих свойств
1864
1891
  */
1865
1892
  display(t, e) {
1866
- var o;
1867
- let s = { type: "language" }, r;
1868
- e && (typeof e == "string" ? s.type = e : s = {
1869
- ...s,
1893
+ var a;
1894
+ let i = { type: "language" }, r;
1895
+ e && (typeof e == "string" ? i.type = e : i = {
1896
+ ...i,
1870
1897
  ...e
1871
1898
  });
1872
1899
  try {
1873
- l() && (t ? r = new Intl.DisplayNames(this.getLocation(), s).of(t) : s.type === "language" ? r = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.language) : s.type === "region" && (r = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.country)));
1874
- } catch (a) {
1875
- console.error("display: ", a);
1900
+ l() && (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
+ } catch (o) {
1902
+ console.error("display: ", o);
1876
1903
  }
1877
- return (o = r != null ? r : t) != null ? o : "";
1904
+ return (a = r != null ? r : t) != null ? a : "";
1878
1905
  }
1879
1906
  /**
1880
1907
  * Get display names of language.
@@ -1884,11 +1911,11 @@ class M {
1884
1911
  * @param style the formatting style to use/ используемый стиль форматирования
1885
1912
  */
1886
1913
  languageName(t, e) {
1887
- const s = {
1914
+ const i = {
1888
1915
  type: "language",
1889
1916
  style: e
1890
1917
  };
1891
- return this.display(p.getByCode(t).language, s);
1918
+ return this.display(b.getByCode(t).language, i);
1892
1919
  }
1893
1920
  /**
1894
1921
  * Get display names of region.
@@ -1898,11 +1925,11 @@ class M {
1898
1925
  * @param style the formatting style to use/ используемый стиль форматирования
1899
1926
  */
1900
1927
  countryName(t, e) {
1901
- const s = {
1928
+ const i = {
1902
1929
  type: "region",
1903
1930
  style: e
1904
1931
  };
1905
- return this.display(t, s);
1932
+ return this.display(t, i);
1906
1933
  }
1907
1934
  /**
1908
1935
  * The method returns a string containing the full name in a specific format.
@@ -1913,25 +1940,25 @@ class M {
1913
1940
  * @param surname surname middle name (optional)/ отчество
1914
1941
  * @param short shorten the names/ сократить названия
1915
1942
  */
1916
- fullName(t, e, s, r) {
1943
+ fullName(t, e, i, r) {
1917
1944
  var u, h;
1918
- const o = (h = (u = this.geo) == null ? void 0 : u.nameFormat) != null ? h : "fl";
1919
- let a;
1920
- switch (o) {
1945
+ const a = (h = (u = this.geo) == null ? void 0 : u.nameFormat) != null ? h : "fl";
1946
+ let o;
1947
+ switch (a) {
1921
1948
  case "fsl":
1922
- a = `${e}${s ? ` ${s}` : ""} ${t}`;
1949
+ o = `${e}${i ? ` ${i}` : ""} ${t}`;
1923
1950
  break;
1924
1951
  case "lf":
1925
- a = `${t} ${e}`;
1952
+ o = `${t} ${e}`;
1926
1953
  break;
1927
1954
  case "lsf":
1928
- a = `${t}${s ? ` ${s}` : ""} ${e}`;
1955
+ o = `${t}${i ? ` ${i}` : ""} ${e}`;
1929
1956
  break;
1930
1957
  default:
1931
- a = `${e} ${t}`;
1958
+ o = `${e} ${t}`;
1932
1959
  break;
1933
1960
  }
1934
- return r ? a.replace(/ (.)[^ ]+/ig, " $1.") : a;
1961
+ return r ? o.replace(/ (.)[^ ]+/ig, " $1.") : o;
1935
1962
  }
1936
1963
  /**
1937
1964
  * In basic use without specifying a locale, a formatted string.
@@ -1942,8 +1969,8 @@ class M {
1942
1969
  * или всеми свойствами
1943
1970
  */
1944
1971
  number(t, e) {
1945
- var s, r;
1946
- return ((r = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : r.call(s, k(t))) || t.toString();
1972
+ var i, r;
1973
+ return ((r = (i = this.numberObject(e)) == null ? void 0 : i.format) == null ? void 0 : r.call(i, k(t))) || t.toString();
1947
1974
  }
1948
1975
  /**
1949
1976
  * Decimal point symbol.
@@ -1951,8 +1978,8 @@ class M {
1951
1978
  * Символ десятичной точки.
1952
1979
  */
1953
1980
  decimal() {
1954
- var t, e, s, r, o;
1955
- return ((o = (r = (s = (e = (t = this.numberObject()) == null ? void 0 : t.formatToParts) == null ? void 0 : e.call(t, 1.2)) == null ? void 0 : s.find) == null ? void 0 : r.call(s, (a) => a.type === "decimal")) == null ? void 0 : o.value) || ".";
1981
+ var t, e, i, r, a;
1982
+ return ((a = (r = (i = (e = (t = this.numberObject()) == null ? void 0 : t.formatToParts) == null ? void 0 : e.call(t, 1.2)) == null ? void 0 : i.find) == null ? void 0 : r.call(i, (o) => o.type === "decimal")) == null ? void 0 : a.value) || ".";
1956
1983
  }
1957
1984
  /**
1958
1985
  * Currency formatting.
@@ -1963,23 +1990,23 @@ class M {
1963
1990
  * валюта для использования в форматировании валюты
1964
1991
  * @param numberOnly do not display the currency symbol/ не выводить значок валюты
1965
1992
  */
1966
- currency(t, e, s = !1) {
1993
+ currency(t, e, i = !1) {
1967
1994
  const r = {
1968
1995
  style: "currency",
1969
1996
  currencyDisplay: "symbol",
1970
1997
  ...typeof e == "string" ? { currency: e } : e || {}
1971
- }, o = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...a) => (r.currency = String(a[2]).toUpperCase(), String(a[1])));
1972
- if (s) {
1973
- const a = this.numberObject(r);
1974
- return a ? _t(
1975
- a.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
1998
+ }, a = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...o) => (r.currency = String(o[2]).toUpperCase(), String(o[1])));
1999
+ if (i) {
2000
+ const o = this.numberObject(r);
2001
+ return o ? se(
2002
+ o.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
1976
2003
  "value"
1977
2004
  ).join("") : t.toString();
1978
2005
  } else return "currency" in r ? this.number(
1979
- typeof t == "number" ? t : o,
2006
+ typeof t == "number" ? t : a,
1980
2007
  r
1981
2008
  ) : this.number(
1982
- typeof t == "number" ? t : o,
2009
+ typeof t == "number" ? t : a,
1983
2010
  {
1984
2011
  ...r,
1985
2012
  style: "decimal"
@@ -1996,12 +2023,12 @@ class M {
1996
2023
  * как отобразить валюту в формате валюты
1997
2024
  */
1998
2025
  currencySymbol(t, e = "symbol") {
1999
- var s, r, o, a, u;
2000
- return ((u = (a = (o = (r = (s = this.numberObject({
2026
+ var i, r, a, o, u;
2027
+ return ((u = (o = (a = (r = (i = this.numberObject({
2001
2028
  style: "currency",
2002
2029
  currencyDisplay: e,
2003
2030
  currency: t
2004
- })) == null ? void 0 : s.formatToParts) == null ? void 0 : r.call(s, 100)) == null ? void 0 : o.find) == null ? void 0 : a.call(o, (h) => h.type === "currency")) == null ? void 0 : u.value) || t;
2031
+ })) == null ? void 0 : i.formatToParts) == null ? void 0 : r.call(i, 100)) == null ? void 0 : a.find) == null ? void 0 : o.call(a, (h) => h.type === "currency")) == null ? void 0 : u.value) || t;
2005
2032
  }
2006
2033
  /**
2007
2034
  * Unit formatting.
@@ -2013,11 +2040,11 @@ class M {
2013
2040
  * в форматировании блока
2014
2041
  */
2015
2042
  unit(t, e) {
2016
- const s = {
2043
+ const i = {
2017
2044
  style: "unit",
2018
2045
  ...typeof e == "string" ? { unit: e } : e || {}
2019
- }, r = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...o) => (s.unit = String(o[2]).toLowerCase(), String(o[1])));
2020
- return this.number(r, s);
2046
+ }, r = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...a) => (i.unit = String(a[2]).toLowerCase(), String(a[1])));
2047
+ return this.number(r, i);
2021
2048
  }
2022
2049
  /**
2023
2050
  * Возвращает отформатированный размер файла
@@ -2026,19 +2053,19 @@ class M {
2026
2053
  * в форматировании блока
2027
2054
  */
2028
2055
  sizeFile(t, e = "byte") {
2029
- const s = k(t);
2030
- if (s > 1024 && x(e))
2056
+ const i = k(t);
2057
+ if (i > 1024 && U(e))
2031
2058
  switch (e) {
2032
2059
  case "byte":
2033
- return this.sizeFile(s / 1024, "kilobyte");
2060
+ return this.sizeFile(i / 1024, "kilobyte");
2034
2061
  case "kilobyte":
2035
- return this.sizeFile(s / 1024, "megabyte");
2062
+ return this.sizeFile(i / 1024, "megabyte");
2036
2063
  case "megabyte":
2037
- return this.sizeFile(s / 1024, "gigabyte");
2064
+ return this.sizeFile(i / 1024, "gigabyte");
2038
2065
  case "gigabyte":
2039
- return this.sizeFile(s / 1024, "terabyte");
2066
+ return this.sizeFile(i / 1024, "terabyte");
2040
2067
  case "terabyte":
2041
- return this.sizeFile(s / 1024, "petabyte");
2068
+ return this.sizeFile(i / 1024, "petabyte");
2042
2069
  }
2043
2070
  return this.unit(t, e);
2044
2071
  }
@@ -2074,40 +2101,40 @@ class M {
2074
2101
  * @param options Property for PluralRules/ свойство для PluralRules
2075
2102
  * @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
2076
2103
  */
2077
- plural(t, e, s, r) {
2104
+ plural(t, e, i, r) {
2078
2105
  var u;
2079
- const o = k(t), a = e.split("|");
2080
- if (a.length > 1)
2106
+ const a = k(t), o = e.split("|");
2107
+ if (o.length > 1)
2081
2108
  try {
2082
2109
  if (l()) {
2083
- const m = new Intl.PluralRules(this.getLocation(), s).select(o);
2084
- let d;
2085
- switch (m) {
2110
+ const y = new Intl.PluralRules(this.getLocation(), i).select(a);
2111
+ let g;
2112
+ switch (y) {
2086
2113
  case "zero":
2087
- d = a[a.length - 1];
2114
+ g = o[o.length - 1];
2088
2115
  break;
2089
2116
  case "one":
2090
- d = a == null ? void 0 : a[0];
2117
+ g = o == null ? void 0 : o[0];
2091
2118
  break;
2092
2119
  case "two":
2093
- d = a == null ? void 0 : a[1];
2120
+ g = o == null ? void 0 : o[1];
2094
2121
  break;
2095
2122
  case "few":
2096
- d = a != null && a[3] ? a == null ? void 0 : a[2] : a == null ? void 0 : a[1];
2123
+ g = o != null && o[3] ? o == null ? void 0 : o[2] : o == null ? void 0 : o[1];
2097
2124
  break;
2098
2125
  case "many":
2099
- d = (a == null ? void 0 : a[3]) || (a == null ? void 0 : a[2]) || (a == null ? void 0 : a[1]);
2126
+ g = (o == null ? void 0 : o[3]) || (o == null ? void 0 : o[2]) || (o == null ? void 0 : o[1]);
2100
2127
  break;
2101
2128
  case "other":
2102
- a.length === 6 ? d = a[a.length - 2] : d = a[a.length - 1];
2129
+ o.length === 6 ? g = o[o.length - 2] : g = o[o.length - 1];
2103
2130
  break;
2104
2131
  }
2105
- return `${this.number(o, r)} ${d != null ? d : ""}`.trim();
2132
+ return `${this.number(a, r)} ${g != null ? g : ""}`.trim();
2106
2133
  }
2107
2134
  } catch (h) {
2108
2135
  console.error("plural: ", h);
2109
2136
  }
2110
- return `${this.number(o, r)} ${(u = a == null ? void 0 : a[0]) != null ? u : ""}`.trim();
2137
+ return `${this.number(a, r)} ${(u = o == null ? void 0 : o[0]) != null ? u : ""}`.trim();
2111
2138
  }
2112
2139
  /**
2113
2140
  * Enables language-sensitive date and time formatting.
@@ -2118,9 +2145,9 @@ class M {
2118
2145
  * @param styleOptions the representation of the month/ представление месяца
2119
2146
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
2120
2147
  */
2121
- date(t, e, s, r) {
2122
- const o = F(t), a = typeof s == "string", u = this.dateOptions(e, a ? s : "short");
2123
- return r && (u.hour12 = !1), a || Object.assign(u, s), o.toLocaleString(this.getLocation(), u);
2148
+ date(t, e, i, r) {
2149
+ const a = P(t), o = typeof i == "string", u = this.dateOptions(e, o ? i : "short");
2150
+ return r && (u.hour12 = !1), o || Object.assign(u, i), a.toLocaleString(this.getLocation(), u);
2124
2151
  }
2125
2152
  /**
2126
2153
  * Enables language-sensitive relative time formatting.
@@ -2131,13 +2158,13 @@ class M {
2131
2158
  * длина интернационализированного сообщения
2132
2159
  * @param todayValue current day/ текущий день
2133
2160
  */
2134
- relative(t, e, s) {
2135
- const r = F(t), o = s || /* @__PURE__ */ new Date(), a = {
2161
+ relative(t, e, i) {
2162
+ const r = P(t), a = i || /* @__PURE__ */ new Date(), o = {
2136
2163
  numeric: "auto",
2137
2164
  ...typeof e == "string" ? { style: e } : e || {}
2138
2165
  };
2139
- let u = "second", h = (r.getTime() - o.getTime()) / 1e3;
2140
- return Math.abs(h) >= 60 && (u = "minute", h /= 60, Math.abs(h) >= 60 && (u = "hour", h /= 60, Math.abs(h) >= 24 && (u = "day", h /= 24, Math.abs(h) >= 30 && (u = "month", h /= 30, Math.abs(h) >= 12 && (u = "year", h /= 12))))), this.relativeByValue(h, u, a);
2166
+ let u = "second", h = (r.getTime() - a.getTime()) / 1e3;
2167
+ return Math.abs(h) >= 60 && (u = "minute", h /= 60, Math.abs(h) >= 60 && (u = "hour", h /= 60, Math.abs(h) >= 24 && (u = "day", h /= 24, Math.abs(h) >= 30 && (u = "month", h /= 30, Math.abs(h) >= 12 && (u = "year", h /= 12))))), this.relativeByValue(h, u, o);
2141
2168
  }
2142
2169
  /**
2143
2170
  * Enables language-sensitive relative time formatting
@@ -2157,16 +2184,16 @@ class M {
2157
2184
  * @param type type of data format/ тип формата data
2158
2185
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
2159
2186
  */
2160
- relativeLimit(t, e, s, r, o, a, u) {
2161
- const h = F(t), m = s || /* @__PURE__ */ new Date(), d = new Date(m), S = new Date(m);
2162
- return d.setDate(m.getDate() - e), S.setDate(m.getDate() + e), h >= d && h <= S ? this.relative(
2187
+ relativeLimit(t, e, i, r, a, o, u) {
2188
+ const h = P(t), y = i || /* @__PURE__ */ new Date(), g = new Date(y), S = new Date(y);
2189
+ return g.setDate(y.getDate() - e), S.setDate(y.getDate() + e), h >= g && h <= S ? this.relative(
2163
2190
  h,
2164
2191
  r,
2165
- m
2192
+ y
2166
2193
  ) : this.date(
2167
2194
  h,
2168
- a,
2169
2195
  o,
2196
+ a,
2170
2197
  u
2171
2198
  );
2172
2199
  }
@@ -2176,16 +2203,16 @@ class M {
2176
2203
  * @param unit time unit/ единица времени
2177
2204
  * @param styleOptions additional option or formatting style/ дополнительная опция или стиль форматирования
2178
2205
  */
2179
- relativeByValue(t, e, s) {
2206
+ relativeByValue(t, e, i) {
2180
2207
  const r = {
2181
2208
  numeric: "auto",
2182
- ...typeof s == "string" ? { style: s } : s || {}
2209
+ ...typeof i == "string" ? { style: i } : i || {}
2183
2210
  };
2184
2211
  try {
2185
2212
  if (l())
2186
2213
  return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(k(t)), e);
2187
- } catch (o) {
2188
- console.error("relative: ", o);
2214
+ } catch (a) {
2215
+ console.error("relative: ", a);
2189
2216
  }
2190
2217
  return "";
2191
2218
  }
@@ -2198,9 +2225,9 @@ class M {
2198
2225
  month(t, e) {
2199
2226
  try {
2200
2227
  if (l())
2201
- return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(F(t));
2202
- } catch (s) {
2203
- console.error("month: ", s);
2228
+ return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(P(t));
2229
+ } catch (i) {
2230
+ console.error("month: ", i);
2204
2231
  }
2205
2232
  return "";
2206
2233
  }
@@ -2217,15 +2244,15 @@ class M {
2217
2244
  }];
2218
2245
  try {
2219
2246
  if (l()) {
2220
- const s = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
2221
- for (let o = 0; o < 12; o++)
2222
- s.setMonth(o), e.push({
2223
- label: r.format(s).replace(/^./, (a) => a.toUpperCase()),
2224
- value: o + 1
2247
+ const i = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
2248
+ for (let a = 0; a < 12; a++)
2249
+ i.setMonth(a), e.push({
2250
+ label: r.format(i).replace(/^./, (o) => o.toUpperCase()),
2251
+ value: a + 1
2225
2252
  });
2226
2253
  }
2227
- } catch (s) {
2228
- console.error("months: ", s);
2254
+ } catch (i) {
2255
+ console.error("months: ", i);
2229
2256
  }
2230
2257
  return e;
2231
2258
  }
@@ -2239,9 +2266,9 @@ class M {
2239
2266
  weekday(t, e) {
2240
2267
  try {
2241
2268
  if (l())
2242
- return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(F(t));
2243
- } catch (s) {
2244
- console.error("weekday: ", s);
2269
+ return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(P(t));
2270
+ } catch (i) {
2271
+ console.error("weekday: ", i);
2245
2272
  }
2246
2273
  return "";
2247
2274
  }
@@ -2258,16 +2285,16 @@ class M {
2258
2285
  }];
2259
2286
  try {
2260
2287
  if (l()) {
2261
- const s = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), o = s.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
2262
- s.setDate(s.getDate() - o);
2263
- for (let a = 0; a < 7; a++)
2288
+ const i = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), a = i.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
2289
+ i.setDate(i.getDate() - a);
2290
+ for (let o = 0; o < 7; o++)
2264
2291
  e.push({
2265
- label: r.format(s).replace(/^./, (u) => u.toUpperCase()),
2266
- value: s.getDay()
2267
- }), s.setDate(s.getDate() + 1);
2292
+ label: r.format(i).replace(/^./, (u) => u.toUpperCase()),
2293
+ value: i.getDay()
2294
+ }), i.setDate(i.getDate() + 1);
2268
2295
  }
2269
- } catch (s) {
2270
- console.error("weekdays: ", s);
2296
+ } catch (i) {
2297
+ console.error("weekdays: ", i);
2271
2298
  }
2272
2299
  return e;
2273
2300
  }
@@ -2287,10 +2314,10 @@ class M {
2287
2314
  * @param data an array with data/ массив с данными
2288
2315
  * @param compareFn a function for sorting/ функция для сортировки
2289
2316
  */
2290
- sort(t, e = (s, r) => [s, r]) {
2317
+ sort(t, e = (i, r) => [i, r]) {
2291
2318
  if (l()) {
2292
- const s = new Intl.Collator(this.getLocation());
2293
- return t.sort((r, o) => s.compare(...e(r, o)));
2319
+ const i = new Intl.Collator(this.getLocation());
2320
+ return t.sort((r, a) => i.compare(...e(r, a)));
2294
2321
  }
2295
2322
  return t;
2296
2323
  }
@@ -2317,23 +2344,23 @@ class M {
2317
2344
  * @param display the representation of the month/ представление месяца
2318
2345
  */
2319
2346
  dateOptions(t, e = "short") {
2320
- const s = {};
2321
- return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (s.year = "numeric"), ["full", "datetime", "date", void 0, "year-month", "month", "day-month"].indexOf(t) !== -1 && (s.month = e), ["full", "datetime", "date", void 0, "day", "day-month"].indexOf(t) !== -1 && (s.day = "2-digit"), t !== void 0 && (["full", "datetime", "time", "hour-minute", "hour"].indexOf(t) !== -1 && (s.hour = "2-digit"), ["full", "datetime", "time", "hour-minute", "minute"].indexOf(t) !== -1 && (s.minute = "2-digit"), ["full", "time", "second"].indexOf(t) !== -1 && (s.second = "2-digit")), s;
2347
+ const i = {};
2348
+ 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;
2322
2349
  }
2323
2350
  }
2324
- const it = {};
2325
- class ut {
2351
+ const nt = {};
2352
+ class gt {
2326
2353
  /**
2327
2354
  * Constructor
2328
2355
  * @param date date for processing/ дата для обработки
2329
2356
  * @param type type of date format for output/ тип формата даты вывода
2330
2357
  * @param code country and language code/ код страны и языка
2331
2358
  */
2332
- constructor(t, e = "date", s = p.getLocation()) {
2359
+ constructor(t, e = "date", i = b.getLocation()) {
2333
2360
  c(this, "date");
2334
2361
  c(this, "hour24", !1);
2335
2362
  c(this, "watch");
2336
- this.type = e, this.code = s, this.date = F(t);
2363
+ this.type = e, this.code = i, this.date = P(t);
2337
2364
  }
2338
2365
  /**
2339
2366
  * Returns an object for working with formatting.
@@ -2341,7 +2368,7 @@ class ut {
2341
2368
  * Возвращает объект для работы с форматированием.
2342
2369
  */
2343
2370
  getIntl() {
2344
- return new M(this.code);
2371
+ return new N(this.code);
2345
2372
  }
2346
2373
  /**
2347
2374
  * Returns a Date object.
@@ -2397,11 +2424,11 @@ class ut {
2397
2424
  const e = this.getTimeZoneOffset();
2398
2425
  if (t === "minute")
2399
2426
  return e.toString();
2400
- const s = e / 60 * -1;
2427
+ const i = e / 60 * -1;
2401
2428
  if (t === "hour")
2402
- return this.getIntl().number(Math.trunc(s), { signDisplay: "always" });
2403
- const r = this.toTimeZoneHourFormat(s), o = s.toString().match(/.\d+/) ? "30" : "00";
2404
- return t === "RFC" ? `${r}${o}` : `${r}:${o}`;
2429
+ return this.getIntl().number(Math.trunc(i), { signDisplay: "always" });
2430
+ const r = this.toTimeZoneHourFormat(i), a = i.toString().match(/.\d+/) ? "30" : "00";
2431
+ return t === "RFC" ? `${r}${a}` : `${r}:${a}`;
2405
2432
  }
2406
2433
  /**
2407
2434
  * Returns the code of the first day of the week.
@@ -2546,13 +2573,13 @@ class ut {
2546
2573
  * @param timeZone add time zone/ добавить временную зону
2547
2574
  */
2548
2575
  standard(t = !0) {
2549
- const e = new ut(this.date, this.type, "en-GB"), s = [];
2576
+ const e = new gt(this.date, this.type, "en-GB"), i = [];
2550
2577
  let r;
2551
2578
  return e.setHour24(!0), this.type === "hour-minute" ? r = e.locale(this.type, {
2552
2579
  year: "numeric",
2553
2580
  month: "2-digit",
2554
2581
  hour12: !1
2555
- }) : (["full", "datetime", "date", "year-month", "year", "month", "day"].indexOf(this.type) !== -1 && (s.push(e.localeYear()), s.push(e.localeMonth("2-digit"))), ["full", "datetime", "date", "year", "month", "day"].indexOf(this.type) !== -1 && s.push(e.localeDay("2-digit")), ["full", "datetime", "time", "hour", "minute", "second"].indexOf(this.type) !== -1 && (r = e.locale("time"))), `${s.join("-")}${r ? `T${r}${t ? e.getTimeZone() : ""}` : ""}`;
2582
+ }) : (["full", "datetime", "date", "year-month", "year", "month", "day"].indexOf(this.type) !== -1 && (i.push(e.localeYear()), i.push(e.localeMonth("2-digit"))), ["full", "datetime", "date", "year", "month", "day"].indexOf(this.type) !== -1 && i.push(e.localeDay("2-digit")), ["full", "datetime", "time", "hour", "minute", "second"].indexOf(this.type) !== -1 && (r = e.locale("time"))), `${i.join("-")}${r ? `T${r}${t ? e.getTimeZone() : ""}` : ""}`;
2556
2583
  }
2557
2584
  /**
2558
2585
  * Change the date completely.
@@ -2562,7 +2589,7 @@ class ut {
2562
2589
  * целочисленное значение, представляющее число
2563
2590
  */
2564
2591
  setDate(t) {
2565
- return this.date = F(t), this.update(), this;
2592
+ return this.date = P(t), this.update(), this;
2566
2593
  }
2567
2594
  /**
2568
2595
  * Change the type of data output.
@@ -2985,12 +3012,250 @@ class ut {
2985
3012
  ), this;
2986
3013
  }
2987
3014
  }
2988
- const n = "f", W = class W {
3015
+ function T(s) {
3016
+ var t;
3017
+ return U(s) ? s.trim() : ht(s) && s.findIndex((e) => f(e)) === -1 ? s.join(",") : f(s) ? JSON.stringify(s) : s === !0 ? "1" : s === !1 ? "0" : (t = s == null ? void 0 : s.toString()) != null ? t : "";
3018
+ }
3019
+ function ie(s, t, e) {
3020
+ const i = T(s);
3021
+ if (!e || e <= 0)
3022
+ return i.split(t);
3023
+ const r = i.split(t, e), a = i.split(t);
3024
+ return r.length === a.length ? r : (r.pop(), [
3025
+ ...r,
3026
+ a.slice(e - 1).join(t)
3027
+ ]);
3028
+ }
3029
+ function x(s, t) {
3030
+ var r;
3031
+ if (!m(t))
3032
+ return;
3033
+ const e = ie(t, ".", 2), i = e[0];
3034
+ return i && (s != null && s[i]) && f(s[i]) && (e != null && e[1]) ? x(s[i], e[1]) : (r = m(i) && (s == null ? void 0 : s[i])) != null ? r : void 0;
3035
+ }
3036
+ function Ht(s) {
3037
+ return s.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...t) => `${String(t[1]).toUpperCase()}`).replace(/^([A-Z])/, (t) => `${t.toLowerCase()}`);
3038
+ }
3039
+ var F = /* @__PURE__ */ ((s) => (s.currency = "currency", s.date = "date", s.name = "name", s.number = "number", s.plural = "plural", s.unit = "unit", s))(F || {});
3040
+ class ze {
3041
+ /**
3042
+ * Constructor
3043
+ *
3044
+ * Конструктор
3045
+ * @param options formatting options for each column/ property/
3046
+ * параметры форматирования для каждого столбца/свойства
3047
+ * @param list initial list of data to format/ начальный список данных для форматирования
3048
+ */
3049
+ constructor(t, e) {
3050
+ this.options = t, this.list = e;
3051
+ }
3052
+ /**
3053
+ * Returns the current list of data.
3054
+ *
3055
+ * Возвращает текущий список данных.
3056
+ * @returns the list of data or undefined if not set/ список данных или undefined, если не задан
3057
+ */
3058
+ getList() {
3059
+ return this.list;
3060
+ }
3061
+ /**
3062
+ * Returns the current formatting options.
3063
+ *
3064
+ * Возвращает текущие параметры форматирования.
3065
+ * @returns formatting options/ параметры форматирования
3066
+ */
3067
+ getOptions() {
3068
+ return this.options;
3069
+ }
3070
+ /**
3071
+ * Sets the list of data to be formatted.
3072
+ *
3073
+ * Устанавливает список данных для форматирования.
3074
+ * @param list list of data/ список данных
3075
+ * @returns the Formatters instance for chaining/ экземпляр Formatters для цепочки вызовов
3076
+ */
3077
+ setList(t) {
3078
+ return this.list = t, this;
3079
+ }
3080
+ /**
3081
+ * Formats the entire list based on the provided options.
3082
+ * Adds formatted values with the suffix 'Format' to each item.
3083
+ *
3084
+ * Форматирует весь список на основе предоставленных параметров.
3085
+ * Добавляет отформатированные значения с суффиксом 'Format' к каждому элементу.
3086
+ * @returns the list of items with additional formatted columns/
3087
+ * список элементов с дополнительными отформатированными столбцами
3088
+ */
3089
+ to() {
3090
+ return this.list ? d(this.list, (t) => ({
3091
+ ...t,
3092
+ ...this.getFormatData(t)
3093
+ })) : [];
3094
+ }
3095
+ /**
3096
+ * Generates formatted data for a single item based on options.
3097
+ *
3098
+ * Генерирует отформатированные данные для одного элемента на основе параметров.
3099
+ * @param item item to format/ элемент для форматирования
3100
+ * @protected
3101
+ */
3102
+ getFormatData(t) {
3103
+ const e = {};
3104
+ return d(
3105
+ this.options,
3106
+ (i, r) => {
3107
+ const a = `${Ht(r)}Format`, o = x(t, r);
3108
+ i != null && i.transformation ? m(o) ? e[a] = i.transformation(
3109
+ o,
3110
+ t,
3111
+ i.options
3112
+ ) : e[a] = "" : e[a] = this.transformation(
3113
+ o,
3114
+ t,
3115
+ i.type,
3116
+ i.options
3117
+ );
3118
+ }
3119
+ ), e;
3120
+ }
3121
+ /**
3122
+ * Router-like method to delegate formatting to specific type formatters.
3123
+ *
3124
+ * Метод-маршрутизатор для делегирования форматирования конкретным типам форматировщиков.
3125
+ * @param valueOriginal original value to format/ исходное значение для форматирования
3126
+ * @param item entire item context/ весь контекст элемента
3127
+ * @param type type of formatter to use/ тип используемого форматировщика
3128
+ * @param options additional options for the specific formatter/
3129
+ * дополнительные параметры для конкретного форматировщика
3130
+ * @protected
3131
+ * @returns Formatted string/ отформатированная строка
3132
+ */
3133
+ transformation(t, e, i, r) {
3134
+ if (m(t) || i === F.name)
3135
+ switch (i) {
3136
+ case F.currency:
3137
+ return this.formatCurrency(t, e, r);
3138
+ case F.date:
3139
+ return this.formatDate(t, r);
3140
+ case F.name:
3141
+ return this.formatName(e, r);
3142
+ case F.number:
3143
+ return this.formatNumber(t, r);
3144
+ case F.plural:
3145
+ return this.formatPlural(t, r);
3146
+ case F.unit:
3147
+ return this.formatUnit(t, r);
3148
+ default:
3149
+ return String(t);
3150
+ }
3151
+ return "";
3152
+ }
3153
+ /**
3154
+ * Formats a value as currency.
3155
+ *
3156
+ * Форматирует значение как валюту.
3157
+ * @param value value to format/ значение для форматирования
3158
+ * @param item item context/ контекст элемента
3159
+ * @param options currency formatting options/ параметры форматирования валюты
3160
+ * @protected
3161
+ * @returns Formatted currency string/ отформатированная строка валюты
3162
+ */
3163
+ formatCurrency(t, e, i) {
3164
+ var a;
3165
+ const r = i != null && i.currencyPropName ? x(e, i.currencyPropName) : e == null ? void 0 : e.currency;
3166
+ return N.getInstance().currency(
3167
+ t,
3168
+ (a = i == null ? void 0 : i.options) != null ? a : r,
3169
+ i == null ? void 0 : i.numberOnly
3170
+ );
3171
+ }
3172
+ /**
3173
+ * Formats a value as a date.
3174
+ *
3175
+ * Форматирует значение как дату.
3176
+ * @param value value to format/ значение для форматирования
3177
+ * @param options date formatting options/ параметры форматирования даты
3178
+ * @protected
3179
+ * @returns Formatted date string/ отформатированная строка даты
3180
+ */
3181
+ formatDate(t, e) {
3182
+ return N.getInstance().date(
3183
+ t,
3184
+ e == null ? void 0 : e.type,
3185
+ e == null ? void 0 : e.options,
3186
+ e == null ? void 0 : e.hour24
3187
+ );
3188
+ }
3189
+ /**
3190
+ * Formats full name from multiple property names.
3191
+ *
3192
+ * Форматирует полное имя из нескольких имен свойств.
3193
+ * @param item item context containing name components/ контекст элемента, содержащий компоненты имени
3194
+ * @param options name formatting options (prop names for first, last, surname)/
3195
+ * параметры форматирования имени (имена свойств для имени, фамилии, отчества)
3196
+ * @protected
3197
+ * @returns Formatted name string or empty string if components are missing/
3198
+ * отформатированная строка имени или пустая строка, если компоненты отсутствуют
3199
+ */
3200
+ formatName(t, e) {
3201
+ var o, u, h;
3202
+ const i = x(t, (o = e == null ? void 0 : e.lastPropName) != null ? o : "lastName"), r = x(t, (u = e == null ? void 0 : e.firstPropName) != null ? u : "firstName"), a = x(t, (h = e == null ? void 0 : e.surname) != null ? h : "surname");
3203
+ return i && r ? N.getInstance().fullName(
3204
+ i,
3205
+ r,
3206
+ a,
3207
+ e == null ? void 0 : e.short
3208
+ ) : "";
3209
+ }
3210
+ /**
3211
+ * Formats a value as a number.
3212
+ *
3213
+ * Форматирует значение как число.
3214
+ * @param value value to format/ значение для форматирования
3215
+ * @param options number formatting options/ параметры форматирования числа
3216
+ * @protected
3217
+ * @returns Formatted number string/ отформатированная строка числа
3218
+ */
3219
+ formatNumber(t, e) {
3220
+ return N.getInstance().number(t, e == null ? void 0 : e.options);
3221
+ }
3222
+ /**
3223
+ * Formats a value based on plural rules.
3224
+ *
3225
+ * Форматирует значение на основе правил множественного числа.
3226
+ * @param value numeric value for pluralization/ числовое значение для плюрализации
3227
+ * @param options plural formatting options (words and rules)/
3228
+ * параметры форматирования множественного числа (слова и правила)
3229
+ * @protected
3230
+ * @returns Formatted plural string/ отформатированная строка множественного числа
3231
+ */
3232
+ formatPlural(t, e) {
3233
+ return e && e.words ? N.getInstance().plural(
3234
+ t,
3235
+ e == null ? void 0 : e.words,
3236
+ e == null ? void 0 : e.options,
3237
+ e == null ? void 0 : e.optionsNumber
3238
+ ) : t;
3239
+ }
3240
+ /**
3241
+ * Formats a value with a specific unit.
3242
+ *
3243
+ * Форматирует значение с определенной единицей измерения.
3244
+ * @param value value to format/ значение для форматирования
3245
+ * @param options unit formatting options/ параметры форматирования единиц измерения
3246
+ * @protected
3247
+ * @returns Formatted unit string/ отформатированная строка единицы измерения
3248
+ */
3249
+ formatUnit(t, e) {
3250
+ return e && e.unit ? N.getInstance().unit(t, e.unit) : t;
3251
+ }
3252
+ }
3253
+ const n = "f", z = class z {
2989
3254
  /**
2990
3255
  * Constructor
2991
3256
  * @param code country and language code/ код страны и языка
2992
3257
  */
2993
- constructor(t = p.getLocation()) {
3258
+ constructor(t = b.getLocation()) {
2994
3259
  this.code = t;
2995
3260
  }
2996
3261
  /**
@@ -3000,15 +3265,15 @@ const n = "f", W = class W {
3000
3265
  * @param code country code/ код страны
3001
3266
  */
3002
3267
  get(t = this.code) {
3003
- var s;
3004
- const e = p.find(t);
3268
+ var i;
3269
+ const e = b.find(t);
3005
3270
  if (e) {
3006
3271
  const r = this.getCountry(e);
3007
3272
  return {
3008
3273
  language: this.getLanguage(e),
3009
3274
  country: r,
3010
3275
  standard: e.standard,
3011
- icon: (s = W.flags) == null ? void 0 : s[e.country],
3276
+ icon: (i = z.flags) == null ? void 0 : i[e.country],
3012
3277
  label: r,
3013
3278
  value: e.country
3014
3279
  };
@@ -3031,7 +3296,7 @@ const n = "f", W = class W {
3031
3296
  * @param codes country code/ код страны
3032
3297
  */
3033
3298
  getList(t) {
3034
- return g(this.getCodes(t), (e) => this.get(e));
3299
+ return d(this.getCodes(t), (e) => this.get(e));
3035
3300
  }
3036
3301
  /**
3037
3302
  * Getting a list of countries by an array of codes in national language.
@@ -3040,13 +3305,13 @@ const n = "f", W = class W {
3040
3305
  * @param codes country code/ код страны.
3041
3306
  */
3042
3307
  getNational(t) {
3043
- return g(this.getList(t), (e) => {
3044
- const s = new W(e.standard).get(e.standard);
3308
+ return d(this.getList(t), (e) => {
3309
+ const i = new z(e.standard).get(e.standard);
3045
3310
  return {
3046
3311
  ...e,
3047
- description: s == null ? void 0 : s.country,
3048
- nationalLanguage: s == null ? void 0 : s.language,
3049
- nationalCountry: s == null ? void 0 : s.country
3312
+ description: i == null ? void 0 : i.country,
3313
+ nationalLanguage: i == null ? void 0 : i.language,
3314
+ nationalCountry: i == null ? void 0 : i.country
3050
3315
  };
3051
3316
  });
3052
3317
  }
@@ -3065,7 +3330,7 @@ const n = "f", W = class W {
3065
3330
  * Возвращает специальный объект для работы с форматированием.
3066
3331
  */
3067
3332
  getLocation() {
3068
- return new M(this.code);
3333
+ return new N(this.code);
3069
3334
  }
3070
3335
  /**
3071
3336
  * Returns a list of countries to retrieve data from.
@@ -3074,7 +3339,7 @@ const n = "f", W = class W {
3074
3339
  * @param codes country code/ код страны
3075
3340
  */
3076
3341
  getCodes(t) {
3077
- return t != null ? t : Object.keys(W.flags);
3342
+ return t != null ? t : Object.keys(z.flags);
3078
3343
  }
3079
3344
  /**
3080
3345
  * Getting the name of the language.
@@ -3095,7 +3360,7 @@ const n = "f", W = class W {
3095
3360
  return this.getLocation().countryName(t.country);
3096
3361
  }
3097
3362
  };
3098
- c(W, "flags", {
3363
+ c(z, "flags", {
3099
3364
  AD: `${n}-ad`,
3100
3365
  AE: `${n}-ae`,
3101
3366
  AF: `${n}-af`,
@@ -3338,8 +3603,8 @@ c(W, "flags", {
3338
3603
  ZM: `${n}-zm`,
3339
3604
  ZW: `${n}-zw`
3340
3605
  });
3341
- let vt = W;
3342
- const j = class j {
3606
+ let Dt = z;
3607
+ const Z = class Z {
3343
3608
  /**
3344
3609
  * Getting an object with information about the phone code and country.
3345
3610
  *
@@ -3356,12 +3621,12 @@ const j = class j {
3356
3621
  * @param phone phone number/ номер телефон
3357
3622
  */
3358
3623
  static getByPhone(t) {
3359
- let e = this.map, s, r = "";
3360
- return this.toNumber(t).forEach((o) => {
3361
- var a;
3362
- r === "" && o in e ? (s = e[o], e = (a = s == null ? void 0 : s.next) != null ? a : {}) : r += o;
3624
+ let e = this.map, i, r = "";
3625
+ return this.toNumber(t).forEach((a) => {
3626
+ var o;
3627
+ r === "" && a in e ? (i = e[a], e = (o = i == null ? void 0 : i.next) != null ? o : {}) : r += a;
3363
3628
  }), {
3364
- item: s,
3629
+ item: i,
3365
3630
  phone: r
3366
3631
  };
3367
3632
  }
@@ -3372,10 +3637,10 @@ const j = class j {
3372
3637
  * @param code country and language code/ код страны и языка
3373
3638
  */
3374
3639
  static getByCode(t) {
3375
- var s;
3640
+ var i;
3376
3641
  const e = this.get(t);
3377
3642
  if (e)
3378
- return (s = this.getByPhone(e.phone.toString())) == null ? void 0 : s.item;
3643
+ return (i = this.getByPhone(e.phone.toString())) == null ? void 0 : i.item;
3379
3644
  }
3380
3645
  /**
3381
3646
  * We get an array from a list of all phone numbers.
@@ -3401,11 +3666,11 @@ const j = class j {
3401
3666
  * @param masks a mask to transform a phone number/ маска для преобразования номер телефон
3402
3667
  */
3403
3668
  static toMask(t, e) {
3404
- if (v(t) && Array.isArray(e) && e.length > 0) {
3405
- const s = this.removeZero(t), r = s.length;
3406
- for (const o of e)
3407
- if (this.getUnnecessaryLength(o) === r)
3408
- return this.toStandard(s, o);
3669
+ if (m(t) && Array.isArray(e) && e.length > 0) {
3670
+ const i = this.removeZero(t), r = i.length;
3671
+ for (const a of e)
3672
+ if (this.getUnnecessaryLength(a) === r)
3673
+ return this.toStandard(i, a);
3409
3674
  }
3410
3675
  }
3411
3676
  /**
@@ -3449,16 +3714,16 @@ const j = class j {
3449
3714
  * Формирование списка для карты.
3450
3715
  */
3451
3716
  static makeList() {
3452
- const t = g(p.getList(), (e) => {
3717
+ const t = d(b.getList(), (e) => {
3453
3718
  if (e != null && e.phoneMask)
3454
3719
  return {
3455
3720
  phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
3456
3721
  within: (e == null ? void 0 : e.phoneWithin) || 0,
3457
- mask: z(e.phoneMask),
3722
+ mask: Y(e.phoneMask),
3458
3723
  value: e.country
3459
3724
  };
3460
3725
  });
3461
- this.list = t.sort((e, s) => e.phone - s.phone);
3726
+ this.list = t.sort((e, i) => e.phone - i.phone);
3462
3727
  }
3463
3728
  /**
3464
3729
  * Creating a map for search.
@@ -3468,21 +3733,21 @@ const j = class j {
3468
3733
  static makeMap() {
3469
3734
  this.list.forEach((t) => {
3470
3735
  t.mask.forEach((e) => {
3471
- let s = this.map, r;
3472
- if (this.toNumber(e).forEach((o) => {
3473
- var a;
3474
- o in s || (s[o] = {
3736
+ let i = this.map, r;
3737
+ if (this.toNumber(e).forEach((a) => {
3738
+ var o;
3739
+ a in i || (i[a] = {
3475
3740
  items: [],
3476
3741
  info: void 0,
3477
3742
  value: void 0,
3478
3743
  mask: [],
3479
3744
  maskFull: [],
3480
3745
  next: {}
3481
- }), r = s[o], s = (a = r == null ? void 0 : r.next) != null ? a : {};
3746
+ }), r = i[a], i = (o = r == null ? void 0 : r.next) != null ? o : {};
3482
3747
  }), r) {
3483
3748
  r.value === void 0 && (r.info = t, r.value = t.value);
3484
- const o = this.toWithin(e, t.within);
3485
- r.mask.push(o), r.maskFull.push(o.replace(/\d/ig, "*")), r.items.push(t);
3749
+ const a = this.toWithin(e, t.within);
3750
+ r.mask.push(a), r.maskFull.push(a.replace(/\d/ig, "*")), r.items.push(t);
3486
3751
  }
3487
3752
  });
3488
3753
  });
@@ -3504,8 +3769,8 @@ const j = class j {
3504
3769
  * @param mask a mask to transform a phone number/ маска для преобразования номер телефон
3505
3770
  */
3506
3771
  static toStandard(t, e) {
3507
- let s = 0;
3508
- return e.replace(/\*/ig, () => String(t[s++]));
3772
+ let i = 0;
3773
+ return e.replace(/\*/ig, () => String(t[i++]));
3509
3774
  }
3510
3775
  /**
3511
3776
  * Replaces the first character with the internal country code
@@ -3518,9 +3783,9 @@ const j = class j {
3518
3783
  return t.replace(/\*/, this.getWithinSymbol(e));
3519
3784
  }
3520
3785
  };
3521
- c(j, "list", []), c(j, "map", {}), j.makeList(), j.makeMap();
3522
- let St = j, P;
3523
- class Be {
3786
+ c(Z, "list", []), c(Z, "map", {}), Z.makeList(), Z.makeMap();
3787
+ let kt = Z, j;
3788
+ class Ze {
3524
3789
  /**
3525
3790
  * Returns the value by its name.
3526
3791
  *
@@ -3528,7 +3793,7 @@ class Be {
3528
3793
  * @param name property name/ название свойства
3529
3794
  */
3530
3795
  static get(t) {
3531
- return P && (P == null ? void 0 : P[t]);
3796
+ return j && (j == null ? void 0 : j[t]);
3532
3797
  }
3533
3798
  /**
3534
3799
  * Adds data, this method works only once.
@@ -3537,10 +3802,10 @@ class Be {
3537
3802
  * @param data global data/ глобальные данные
3538
3803
  */
3539
3804
  static add(t) {
3540
- P === void 0 && (P = C(t));
3805
+ j === void 0 && (j = D(t));
3541
3806
  }
3542
3807
  }
3543
- const R = class R {
3808
+ const W = class W {
3544
3809
  /**
3545
3810
  * Get data from hash.
3546
3811
  *
@@ -3560,8 +3825,8 @@ const R = class R {
3560
3825
  */
3561
3826
  static set(t, e) {
3562
3827
  var r;
3563
- const s = B(e);
3564
- s !== ((r = this.hash) == null ? void 0 : r[t]) && (this.hash[t] = s, this.update());
3828
+ const i = B(e);
3829
+ i !== ((r = this.hash) == null ? void 0 : r[t]) && (this.hash[t] = i, this.update());
3565
3830
  }
3566
3831
  /**
3567
3832
  * Adding an event when data is changed.
@@ -3571,8 +3836,20 @@ const R = class R {
3571
3836
  * @param callback the function is called when the data is changed/ функция вызывается при изменении данных
3572
3837
  */
3573
3838
  static addWatch(t, e) {
3574
- var s;
3575
- t in this.watch ? (s = this.watch[t]) == null || s.push(e) : this.watch[t] = [e];
3839
+ var i;
3840
+ t in this.watch ? (i = this.watch[t]) == null || i.push(e) : this.watch[t] = [e];
3841
+ }
3842
+ /**
3843
+ * Removing an event when data is changed.
3844
+ *
3845
+ * Удаление события при изменении данных.
3846
+ * @param name variable names/ названия переменных
3847
+ * @param callback the function is called when the data is changed/ функция вызывается при изменении данных
3848
+ */
3849
+ static removeWatch(t, e) {
3850
+ var r;
3851
+ const i = (r = this.watch) == null ? void 0 : r[t];
3852
+ i && (this.watch[t] = i.filter((a) => a !== e));
3576
3853
  }
3577
3854
  /**
3578
3855
  * Update hash variable from URL string.
@@ -3594,7 +3871,7 @@ const R = class R {
3594
3871
  const t = {};
3595
3872
  return location.hash.replace(
3596
3873
  /([\w-]+)[:=]([^;]+)/ig,
3597
- (...e) => (t[String(e[1])] = Rt(e[2]), "")
3874
+ (...e) => (t[String(e[1])] = Ut(e[2]), "")
3598
3875
  ), t;
3599
3876
  }
3600
3877
  /**
@@ -3603,7 +3880,7 @@ const R = class R {
3603
3880
  * Обновление строки хэша в URL.
3604
3881
  */
3605
3882
  static update() {
3606
- this.block = !0, history.replaceState(null, "", `#${It(this.hash, "=", ";")}`), requestAnimationFrame(() => {
3883
+ this.block = !0, history.replaceState(null, "", `#${Pt(this.hash, "=", ";")}`), requestAnimationFrame(() => {
3607
3884
  this.block = !1;
3608
3885
  });
3609
3886
  }
@@ -3614,15 +3891,15 @@ const R = class R {
3614
3891
  * @param location fresh data/ свежий данные
3615
3892
  */
3616
3893
  static makeWatch(t) {
3617
- g(this.watch, (e, s) => {
3894
+ d(this.watch, (e, i) => {
3618
3895
  var r;
3619
- ((r = this.hash) == null ? void 0 : r[s]) !== (t == null ? void 0 : t[s]) && e.forEach((o) => o(t[s]));
3896
+ ((r = this.hash) == null ? void 0 : r[i]) !== (t == null ? void 0 : t[i]) && e.forEach((a) => a(t[i]));
3620
3897
  });
3621
3898
  }
3622
3899
  };
3623
- c(R, "hash", {}), c(R, "watch", {}), c(R, "block", !1), l() && (R.reload(), addEventListener("hashchange", () => R.reload()));
3624
- let Dt = R;
3625
- const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3900
+ c(W, "hash", {}), c(W, "watch", {}), c(W, "block", !1), l() && (W.reload(), addEventListener("hashchange", () => W.reload()));
3901
+ let Nt = W;
3902
+ const at = "__UI_ICON", Et = 320, At = "--LOAD--", M = class M {
3626
3903
  /**
3627
3904
  * Checks if the given icon is in the list of connected icons.
3628
3905
  *
@@ -3642,10 +3919,10 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3642
3919
  * @param wait waiting time for picture loading/
3643
3920
  * время ожидания загрузки картинки
3644
3921
  */
3645
- static async get(t, e = "", s = 1e3 * 60 * 3) {
3646
- var o, a, u, h;
3647
- const r = (h = (u = (o = this.icons) == null ? void 0 : o[this.getName(t)]) != null ? u : (a = this.icons) == null ? void 0 : a[t]) != null ? h : `${t.replace(/^@/, e != null ? e : this.url)}.svg`;
3648
- return typeof r == "string" ? r === Ct && s > 0 ? (await this.wait(), this.get(t, e, s - Lt)) : r : ct(r) ? await r() : await r;
3922
+ static async get(t, e = "", i = 1e3 * 60 * 3) {
3923
+ var a, o, u, h;
3924
+ const r = (h = (u = (a = this.icons) == null ? void 0 : a[this.getName(t)]) != null ? u : (o = this.icons) == null ? void 0 : o[t]) != null ? h : `${t.replace(/^@/, e != null ? e : this.url)}.svg`;
3925
+ return typeof r == "string" ? r === At && i > 0 ? (await this.wait(), this.get(t, e, i - Et)) : r : lt(r) ? await r() : await r;
3649
3926
  }
3650
3927
  /**
3651
3928
  * Returns a list of names of all registered icons.
@@ -3653,7 +3930,7 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3653
3930
  * Возвращает список названий всех зарегистрированных иконок.
3654
3931
  */
3655
3932
  static getNameList() {
3656
- return g(this.icons, (t, e) => e.replace(/^@/, ""));
3933
+ return d(this.icons, (t, e) => e.replace(/^@/, ""));
3657
3934
  }
3658
3935
  /**
3659
3936
  * Returns a global link.
@@ -3661,7 +3938,7 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3661
3938
  * Возвращает глобальную ссылку.
3662
3939
  */
3663
3940
  static getUrlGlobal() {
3664
- return `${H.isLocalhost(), ""}${this.url}`;
3941
+ return `${K.isLocalhost(), ""}${this.url}`;
3665
3942
  }
3666
3943
  /**
3667
3944
  * Adding custom icons.
@@ -3680,7 +3957,7 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3680
3957
  * @param index icon name/ название иконки
3681
3958
  */
3682
3959
  static addLoad(t) {
3683
- this.icons[this.getName(t)] = Ct;
3960
+ this.icons[this.getName(t)] = At;
3684
3961
  }
3685
3962
  /**
3686
3963
  * Adding custom global icons.
@@ -3699,7 +3976,7 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3699
3976
  * @param list list of icons/ список иконки
3700
3977
  */
3701
3978
  static addByList(t) {
3702
- g(t, (e, s) => this.add(s, e));
3979
+ d(t, (e, i) => this.add(i, e));
3703
3980
  }
3704
3981
  /**
3705
3982
  * Changes the file path.
@@ -3725,42 +4002,42 @@ const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
3725
4002
  * Задержка выполнения скрипта.
3726
4003
  */
3727
4004
  static wait() {
3728
- return new Promise((t) => setTimeout(() => t(), Lt));
4005
+ return new Promise((t) => setTimeout(() => t(), Et));
3729
4006
  }
3730
4007
  };
3731
- c(Y, "icons", {}), c(Y, "url", "/icons/"), l() && (st in window || (window[st] = {}), Y.icons = window[st]);
3732
- let kt = Y;
3733
- function Ot(i, t, e) {
3734
- var s, r;
3735
- return (r = (s = N(i)) == null ? void 0 : s[t]) != null ? r : e;
4008
+ c(M, "icons", {}), c(M, "url", "/icons/"), l() && (at in window || (window[at] = {}), M.icons = window[at]);
4009
+ let It = M;
4010
+ function re(s, t, e) {
4011
+ var i, r;
4012
+ return (r = (i = E(s)) == null ? void 0 : i[t]) != null ? r : e;
3736
4013
  }
3737
- function Tt(i, t, e) {
3738
- const s = N(i);
3739
- if (s) {
3740
- const r = Ot(s, t);
4014
+ function ne(s, t, e) {
4015
+ const i = E(s);
4016
+ if (i) {
4017
+ const r = re(i, t);
3741
4018
  if (f(r) && f(e))
3742
- g(e, (o, a) => {
3743
- r[a] = B(o);
4019
+ d(e, (a, o) => {
4020
+ r[o] = B(a);
3744
4021
  });
3745
4022
  else {
3746
- const o = B(e);
3747
- !(t in s) && typeof o == "string" ? s.setAttribute(t.toString(), o) : s[t] = B(e);
4023
+ const a = B(e);
4024
+ !(t in i) && typeof a == "string" ? i.setAttribute(t.toString(), a) : i[t] = B(e);
3748
4025
  }
3749
4026
  }
3750
- return s;
4027
+ return i;
3751
4028
  }
3752
- function _(i, t = "div", e, s) {
4029
+ function G(s, t = "div", e, i) {
3753
4030
  if (!l())
3754
4031
  return;
3755
4032
  const r = document.createElement(t);
3756
- return typeof e == "function" ? e(r) : A(e) && g(e, (o, a) => {
3757
- Tt(r, a, o);
3758
- }), i == null || i.insertBefore(r, s != null ? s : null), r;
4033
+ return typeof e == "function" ? e(r) : A(e) && d(e, (a, o) => {
4034
+ ne(r, o, a);
4035
+ }), s == null || s.insertBefore(r, i != null ? i : null), r;
3759
4036
  }
3760
- function Gt(i) {
3761
- return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").trim();
4037
+ function ae(s) {
4038
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").trim();
3762
4039
  }
3763
- class ht {
4040
+ class dt {
3764
4041
  /**
3765
4042
  * Creates an instance of MetaManager.
3766
4043
  *
@@ -3804,7 +4081,7 @@ class ht {
3804
4081
  * Возвращает все мета-теги в виде HTML-строки.
3805
4082
  */
3806
4083
  html() {
3807
- return g(
4084
+ return d(
3808
4085
  this.listMeta,
3809
4086
  (e) => this.toHtmlString(e)
3810
4087
  ).join("");
@@ -3826,9 +4103,9 @@ class ht {
3826
4103
  * @param metaList object with meta tag names and content / объект с именами и содержимым мета-тегов
3827
4104
  */
3828
4105
  setByList(t) {
3829
- return g(
4106
+ return d(
3830
4107
  t,
3831
- (e, s) => this.set(s, String(e))
4108
+ (e, i) => this.set(i, String(e))
3832
4109
  ), this;
3833
4110
  }
3834
4111
  /**
@@ -3869,12 +4146,12 @@ class ht {
3869
4146
  */
3870
4147
  setMeta(t) {
3871
4148
  var r;
3872
- const e = this.findMetaElement(t), s = (r = this.items[t]) != null ? r : "";
4149
+ const e = this.findMetaElement(t), i = (r = this.items[t]) != null ? r : "";
3873
4150
  if (e)
3874
- e.content = s;
4151
+ e.content = i;
3875
4152
  else if (l()) {
3876
- const o = { content: s };
3877
- this.isProperty ? o.property = t : o.name = t, _(document.head, "meta", o);
4153
+ const a = { content: i };
4154
+ this.isProperty ? a.property = t : a.name = t, G(document.head, "meta", a);
3878
4155
  }
3879
4156
  return this;
3880
4157
  }
@@ -3885,8 +4162,8 @@ class ht {
3885
4162
  * @param name meta tag name / имя мета-тега
3886
4163
  */
3887
4164
  toHtmlString(t) {
3888
- var s;
3889
- const e = Gt((s = this.items[t]) != null ? s : "");
4165
+ var i;
4166
+ const e = ae((i = this.items[t]) != null ? i : "");
3890
4167
  return e ? `<meta ${this.getAttributeName()}="${t}" content="${e}">` : "";
3891
4168
  }
3892
4169
  /**
@@ -3896,15 +4173,15 @@ class ht {
3896
4173
  */
3897
4174
  update() {
3898
4175
  return this.listMeta.forEach((t) => {
3899
- var e, s;
3900
- this.items[t] = (s = (e = this.findMetaElement(t)) == null ? void 0 : e.content) != null ? s : "";
4176
+ var e, i;
4177
+ this.items[t] = (i = (e = this.findMetaElement(t)) == null ? void 0 : e.content) != null ? i : "";
3901
4178
  }), this;
3902
4179
  }
3903
4180
  }
3904
- var D = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(D || {}), te = /* @__PURE__ */ ((i) => (i.indexFollow = "index, follow", i.noIndexFollow = "noindex, follow", i.indexNoFollow = "index, nofollow", i.noIndexNoFollow = "noindex, nofollow", i.noArchive = "noarchive", i.noSnippet = "nosnippet", i.noImageIndex = "noimageindex", i.images = "images", i.noTranslate = "notranslate", i.noPreview = "nopreview", i.textOnly = "textonly", i.noIndexSubpages = "noindex, noarchive", i.none = "none", i))(te || {}), y = /* @__PURE__ */ ((i) => (i.title = "og:title", i.type = "og:type", i.url = "og:url", i.image = "og:image", i.description = "og:description", i.locale = "og:locale", i.siteName = "og:site_name", i.localeAlternate = "og:locale:alternate", i.imageUrl = "og:image:url", i.imageSecureUrl = "og:image:secure_url", i.imageType = "og:image:type", i.imageWidth = "og:image:width", i.imageHeight = "og:image:height", i.imageAlt = "og:image:alt", i.video = "og:video", i.videoUrl = "og:video:url", i.videoSecureUrl = "og:video:secure_url", i.videoType = "og:video:type", i.videoWidth = "og:video:width", i.videoHeight = "og:video:height", i.audio = "og:audio", i.audioSecureUrl = "og:audio:secure_url", i.audioType = "og:audio:type", i.articlePublishedTime = "article:published_time", i.articleModifiedTime = "article:modified_time", i.articleExpirationTime = "article:expiration_time", i.articleAuthor = "article:author", i.articleSection = "article:section", i.articleTag = "article:tag", i.bookAuthor = "book:author", i.bookIsbn = "book:isbn", i.bookReleaseDate = "book:release_date", i.bookTag = "book:tag", i.musicDuration = "music:duration", i.musicAlbum = "music:album", i.musicAlbumDisc = "music:album:disc", i.musicAlbumTrack = "music:album:track", i.musicMusician = "music:musician", i.musicSong = "music:song", i.musicSongDisc = "music:song:disc", i.musicSongTrack = "music:song:track", i.musicReleaseDate = "music:release_date", i.musicCreator = "music:creator", i.videoActor = "video:actor", i.videoActorRole = "video:actor:role", i.videoDirector = "video:director", i.videoWriter = "video:writer", i.videoDuration = "video:duration", i.videoReleaseDate = "video:release_date", i.videoTag = "video:tag", i.videoSeries = "video:series", i.profileFirstName = "profile:first_name", i.profileLastName = "profile:last_name", i.profileUsername = "profile:username", i.profileGender = "profile:gender", i.productBrand = "product:brand", i.productAvailability = "product:availability", i.productCondition = "product:condition", i.productPriceAmount = "product:price:amount", i.productPriceCurrency = "product:price:currency", i.productRetailerItemId = "product:retailer_item_id", i.productCategory = "product:category", i.productEan = "product:ean", i.productIsbn = "product:isbn", i.productMfrPartNo = "product:mfr_part_no", i.productUpc = "product:upc", i.productWeightValue = "product:weight:value", i.productWeightUnits = "product:weight:units", i.productColor = "product:color", i.productMaterial = "product:material", i.productPattern = "product:pattern", i.productAgeGroup = "product:age_group", i.productGender = "product:gender", i))(y || {}), ee = /* @__PURE__ */ ((i) => (i.website = "website", i.article = "article", i.video = "video.other", i.videoTvShow = "video.tv_show", i.videoEpisode = "video.episode", i.videoMovie = "video.movie", i.musicAlbum = "music.album", i.musicPlaylist = "music.playlist", i.musicSong = "music.song", i.musicRadioStation = "music.radio_station", i.app = "app", i.product = "product", i.business = "business.business", i.place = "place", i.event = "event", i.profile = "profile", i.book = "book", i))(ee || {}), ie = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(ie || {}), se = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(se || {}), re = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(re || {}), ne = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(ne || {}), $ = /* @__PURE__ */ ((i) => (i.card = "twitter:card", i.site = "twitter:site", i.creator = "twitter:creator", i.url = "twitter:url", i.title = "twitter:title", i.description = "twitter:description", i.image = "twitter:image", i.imageAlt = "twitter:image:alt", i.imageSrc = "twitter:image:src", i.imageWidth = "twitter:image:width", i.imageHeight = "twitter:image:height", i.label1 = "twitter:label1", i.data1 = "twitter:data1", i.label2 = "twitter:label2", i.data2 = "twitter:data2", i.appNameIphone = "twitter:app:name:iphone", i.appIdIphone = "twitter:app:id:iphone", i.appUrlIphone = "twitter:app:url:iphone", i.appNameIpad = "twitter:app:name:ipad", i.appIdIpad = "twitter:app:id:ipad", i.appUrlIpad = "twitter:app:url:ipad", i.appNameGooglePlay = "twitter:app:name:googleplay", i.appIdGooglePlay = "twitter:app:id:googleplay", i.appUrlGooglePlay = "twitter:app:url:googleplay", i.player = "twitter:player", i.playerWidth = "twitter:player:width", i.playerHeight = "twitter:player:height", i.playerStream = "twitter:player:stream", i.playerStreamContentType = "twitter:player:stream:content_type", i))($ || {}), oe = /* @__PURE__ */ ((i) => (i.summary = "summary", i.summaryLargeImage = "summary_large_image", i.app = "app", i.player = "player", i.product = "product", i.gallery = "gallery", i.photo = "photo", i.leadGeneration = "lead_generation", i.audio = "audio", i.poll = "poll", i))(oe || {});
3905
- class ae extends ht {
4181
+ var L = /* @__PURE__ */ ((s) => (s.description = "description", s.keywords = "keywords", s.canonical = "canonical", s.robots = "robots", s.author = "author", s))(L || {}), oe = /* @__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))(oe || {}), $ = /* @__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 || {}), de = /* @__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))(de || {});
4182
+ class fe extends dt {
3906
4183
  constructor() {
3907
- super(Object.values(y), !0);
4184
+ super(Object.values($), !0);
3908
4185
  }
3909
4186
  /**
3910
4187
  * Gets the Open Graph title.
@@ -3912,7 +4189,7 @@ class ae extends ht {
3912
4189
  * Получает заголовок Open Graph.
3913
4190
  */
3914
4191
  getTitle() {
3915
- return this.get(y.title);
4192
+ return this.get($.title);
3916
4193
  }
3917
4194
  /**
3918
4195
  * Gets the Open Graph type.
@@ -3920,7 +4197,7 @@ class ae extends ht {
3920
4197
  * Получает тип Open Graph.
3921
4198
  */
3922
4199
  getType() {
3923
- return this.get(y.type);
4200
+ return this.get($.type);
3924
4201
  }
3925
4202
  /**
3926
4203
  * Gets the Open Graph URL.
@@ -3928,7 +4205,7 @@ class ae extends ht {
3928
4205
  * Получает URL Open Graph.
3929
4206
  */
3930
4207
  getUrl() {
3931
- return this.get(y.url);
4208
+ return this.get($.url);
3932
4209
  }
3933
4210
  /**
3934
4211
  * Gets the Open Graph image URL.
@@ -3936,7 +4213,7 @@ class ae extends ht {
3936
4213
  * Получает URL изображения Open Graph.
3937
4214
  */
3938
4215
  getImage() {
3939
- return this.get(y.image);
4216
+ return this.get($.image);
3940
4217
  }
3941
4218
  /**
3942
4219
  * Gets the Open Graph description.
@@ -3944,7 +4221,7 @@ class ae extends ht {
3944
4221
  * Получает описание Open Graph.
3945
4222
  */
3946
4223
  getDescription() {
3947
- return this.get(y.description);
4224
+ return this.get($.description);
3948
4225
  }
3949
4226
  /**
3950
4227
  * Gets the Open Graph locale.
@@ -3952,7 +4229,7 @@ class ae extends ht {
3952
4229
  * Получает локаль Open Graph.
3953
4230
  */
3954
4231
  getLocale() {
3955
- return this.get(y.locale);
4232
+ return this.get($.locale);
3956
4233
  }
3957
4234
  /**
3958
4235
  * Gets the Open Graph site name.
@@ -3960,7 +4237,7 @@ class ae extends ht {
3960
4237
  * Получает название сайта Open Graph.
3961
4238
  */
3962
4239
  getSiteName() {
3963
- return this.get(y.siteName);
4240
+ return this.get($.siteName);
3964
4241
  }
3965
4242
  /**
3966
4243
  * Sets the Open Graph title.
@@ -3969,7 +4246,7 @@ class ae extends ht {
3969
4246
  * @param title title / заголовок
3970
4247
  */
3971
4248
  setTitle(t) {
3972
- return this.set(y.title, t);
4249
+ return this.set($.title, t);
3973
4250
  }
3974
4251
  /**
3975
4252
  * Sets the Open Graph type.
@@ -3978,7 +4255,7 @@ class ae extends ht {
3978
4255
  * @param type type / тип
3979
4256
  */
3980
4257
  setType(t) {
3981
- return this.set(y.type, t);
4258
+ return this.set($.type, t);
3982
4259
  }
3983
4260
  /**
3984
4261
  * Sets the Open Graph URL.
@@ -3987,7 +4264,7 @@ class ae extends ht {
3987
4264
  * @param url URL / URL
3988
4265
  */
3989
4266
  setUrl(t) {
3990
- return this.set(y.url, t);
4267
+ return this.set($.url, t);
3991
4268
  }
3992
4269
  /**
3993
4270
  * Sets the Open Graph image URL.
@@ -3996,7 +4273,7 @@ class ae extends ht {
3996
4273
  * @param url image URL / URL изображения
3997
4274
  */
3998
4275
  setImage(t) {
3999
- return this.set(y.image, t);
4276
+ return this.set($.image, t);
4000
4277
  }
4001
4278
  /**
4002
4279
  * Sets the Open Graph description.
@@ -4005,7 +4282,7 @@ class ae extends ht {
4005
4282
  * @param description description / описание
4006
4283
  */
4007
4284
  setDescription(t) {
4008
- return this.set(y.description, t);
4285
+ return this.set($.description, t);
4009
4286
  }
4010
4287
  /**
4011
4288
  * Sets the Open Graph locale.
@@ -4014,7 +4291,7 @@ class ae extends ht {
4014
4291
  * @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
4015
4292
  */
4016
4293
  setLocale(t) {
4017
- return this.set(y.locale, t);
4294
+ return this.set($.locale, t);
4018
4295
  }
4019
4296
  /**
4020
4297
  * Sets the Open Graph site name.
@@ -4023,12 +4300,12 @@ class ae extends ht {
4023
4300
  * @param siteName site name / название сайта
4024
4301
  */
4025
4302
  setSiteName(t) {
4026
- return this.set(y.siteName, t);
4303
+ return this.set($.siteName, t);
4027
4304
  }
4028
4305
  }
4029
- class ce extends ht {
4306
+ class me extends dt {
4030
4307
  constructor() {
4031
- super(Object.values($));
4308
+ super(Object.values(p));
4032
4309
  }
4033
4310
  /**
4034
4311
  * Gets the Twitter Card type.
@@ -4036,7 +4313,7 @@ class ce extends ht {
4036
4313
  * Получает тип Twitter Card.
4037
4314
  */
4038
4315
  getCard() {
4039
- return this.get($.card);
4316
+ return this.get(p.card);
4040
4317
  }
4041
4318
  /**
4042
4319
  * Gets the website or brand @username.
@@ -4044,7 +4321,7 @@ class ce extends ht {
4044
4321
  * Получает аккаунт сайта или бренда (@username).
4045
4322
  */
4046
4323
  getSite() {
4047
- return this.get($.site);
4324
+ return this.get(p.site);
4048
4325
  }
4049
4326
  /**
4050
4327
  * Gets the content creator @username.
@@ -4052,7 +4329,7 @@ class ce extends ht {
4052
4329
  * Получает автора контента (@username).
4053
4330
  */
4054
4331
  getCreator() {
4055
- return this.get($.creator);
4332
+ return this.get(p.creator);
4056
4333
  }
4057
4334
  /**
4058
4335
  * Gets the page URL.
@@ -4060,7 +4337,7 @@ class ce extends ht {
4060
4337
  * Получает URL страницы.
4061
4338
  */
4062
4339
  getUrl() {
4063
- return this.get($.url);
4340
+ return this.get(p.url);
4064
4341
  }
4065
4342
  /**
4066
4343
  * Gets the card title.
@@ -4068,7 +4345,7 @@ class ce extends ht {
4068
4345
  * Получает заголовок карточки.
4069
4346
  */
4070
4347
  getTitle() {
4071
- return this.get($.title);
4348
+ return this.get(p.title);
4072
4349
  }
4073
4350
  /**
4074
4351
  * Gets the card description.
@@ -4076,7 +4353,7 @@ class ce extends ht {
4076
4353
  * Получает описание карточки.
4077
4354
  */
4078
4355
  getDescription() {
4079
- return this.get($.description);
4356
+ return this.get(p.description);
4080
4357
  }
4081
4358
  /**
4082
4359
  * Gets the card image URL.
@@ -4084,7 +4361,7 @@ class ce extends ht {
4084
4361
  * Получает URL изображения карточки.
4085
4362
  */
4086
4363
  getImage() {
4087
- return this.get($.image);
4364
+ return this.get(p.image);
4088
4365
  }
4089
4366
  /**
4090
4367
  * Sets the Twitter Card type.
@@ -4093,7 +4370,7 @@ class ce extends ht {
4093
4370
  * @param card card type / тип карточки
4094
4371
  */
4095
4372
  setCard(t) {
4096
- return this.set($.card, t), this;
4373
+ return this.set(p.card, t), this;
4097
4374
  }
4098
4375
  /**
4099
4376
  * Sets the website or brand @username.
@@ -4102,7 +4379,7 @@ class ce extends ht {
4102
4379
  * @param site @username / аккаунт
4103
4380
  */
4104
4381
  setSite(t) {
4105
- return this.set($.site, t), this;
4382
+ return this.set(p.site, t), this;
4106
4383
  }
4107
4384
  /**
4108
4385
  * Sets the content creator @username.
@@ -4111,7 +4388,7 @@ class ce extends ht {
4111
4388
  * @param creator @username / аккаунт автора
4112
4389
  */
4113
4390
  setCreator(t) {
4114
- return this.set($.creator, t), this;
4391
+ return this.set(p.creator, t), this;
4115
4392
  }
4116
4393
  /**
4117
4394
  * Sets the page URL.
@@ -4120,7 +4397,7 @@ class ce extends ht {
4120
4397
  * @param url URL / URL
4121
4398
  */
4122
4399
  setUrl(t) {
4123
- return this.set($.url, t), this;
4400
+ return this.set(p.url, t), this;
4124
4401
  }
4125
4402
  /**
4126
4403
  * Sets the card title.
@@ -4129,7 +4406,7 @@ class ce extends ht {
4129
4406
  * @param title title / заголовок
4130
4407
  */
4131
4408
  setTitle(t) {
4132
- return this.set($.title, t), this;
4409
+ return this.set(p.title, t), this;
4133
4410
  }
4134
4411
  /**
4135
4412
  * Sets the card description.
@@ -4138,7 +4415,7 @@ class ce extends ht {
4138
4415
  * @param description description / описание
4139
4416
  */
4140
4417
  setDescription(t) {
4141
- return this.set($.description, t), this;
4418
+ return this.set(p.description, t), this;
4142
4419
  }
4143
4420
  /**
4144
4421
  * Sets the card image URL.
@@ -4147,21 +4424,21 @@ class ce extends ht {
4147
4424
  * @param image image URL / URL изображения
4148
4425
  */
4149
4426
  setImage(t) {
4150
- return this.set($.image, t), this;
4427
+ return this.set(p.image, t), this;
4151
4428
  }
4152
4429
  }
4153
- class Ie extends ht {
4430
+ class Ve extends dt {
4154
4431
  /**
4155
4432
  * Creates an instance of Meta with integrated Open Graph and Twitter Card support.
4156
4433
  *
4157
4434
  * Создает экземпляр Meta с интегрированной поддержкой Open Graph и Twitter Card.
4158
4435
  */
4159
4436
  constructor() {
4160
- super(Object.values(D));
4437
+ super(Object.values(L));
4161
4438
  c(this, "suffix");
4162
4439
  c(this, "og");
4163
4440
  c(this, "twitter");
4164
- this.og = new ae(), this.twitter = new ce();
4441
+ this.og = new fe(), this.twitter = new me();
4165
4442
  }
4166
4443
  /**
4167
4444
  * Gets the MetaOg instance for advanced Open Graph operations.
@@ -4193,7 +4470,7 @@ class Ie extends ht {
4193
4470
  * Получает мета-тег keywords.
4194
4471
  */
4195
4472
  getKeywords() {
4196
- return this.get(D.keywords);
4473
+ return this.get(L.keywords);
4197
4474
  }
4198
4475
  /**
4199
4476
  * Gets the description meta tag.
@@ -4201,7 +4478,7 @@ class Ie extends ht {
4201
4478
  * Получает мета-тег description.
4202
4479
  */
4203
4480
  getDescription() {
4204
- return this.get(D.description);
4481
+ return this.get(L.description);
4205
4482
  }
4206
4483
  /**
4207
4484
  * Gets the Open Graph image URL.
@@ -4217,7 +4494,7 @@ class Ie extends ht {
4217
4494
  * Получает канонический URL.
4218
4495
  */
4219
4496
  getCanonical() {
4220
- return this.get(D.canonical);
4497
+ return this.get(L.canonical);
4221
4498
  }
4222
4499
  /**
4223
4500
  * Gets the robots meta tag value.
@@ -4225,7 +4502,7 @@ class Ie extends ht {
4225
4502
  * Получает значение мета-тега robots.
4226
4503
  */
4227
4504
  getRobots() {
4228
- return this.get(D.robots);
4505
+ return this.get(L.robots);
4229
4506
  }
4230
4507
  /**
4231
4508
  * Gets the author meta tag.
@@ -4233,7 +4510,7 @@ class Ie extends ht {
4233
4510
  * Получает мета-тег author.
4234
4511
  */
4235
4512
  getAuthor() {
4236
- return this.get(D.author);
4513
+ return this.get(L.author);
4237
4514
  }
4238
4515
  /**
4239
4516
  * Gets the Open Graph site name.
@@ -4259,8 +4536,8 @@ class Ie extends ht {
4259
4536
  */
4260
4537
  setTitle(e) {
4261
4538
  if (l()) {
4262
- const s = v(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
4263
- document.title = s, this.og.setTitle(s), this.twitter.setTitle(s);
4539
+ const i = m(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
4540
+ document.title = i, this.og.setTitle(i), this.twitter.setTitle(i);
4264
4541
  }
4265
4542
  return this;
4266
4543
  }
@@ -4271,7 +4548,7 @@ class Ie extends ht {
4271
4548
  * @param keywords keywords as string or array / ключевые слова в виде строки или массива
4272
4549
  */
4273
4550
  setKeywords(e) {
4274
- return this.set(D.keywords, z(e).join(", ")), this;
4551
+ return this.set(L.keywords, Y(e).join(", ")), this;
4275
4552
  }
4276
4553
  /**
4277
4554
  * Sets the description meta tag.
@@ -4280,7 +4557,7 @@ class Ie extends ht {
4280
4557
  * @param description page description / описание страницы
4281
4558
  */
4282
4559
  setDescription(e) {
4283
- return this.set(D.description, e), this;
4560
+ return this.set(L.description, e), this;
4284
4561
  }
4285
4562
  /**
4286
4563
  * Sets the image for Open Graph and Twitter Card.
@@ -4298,7 +4575,7 @@ class Ie extends ht {
4298
4575
  * @param canonical canonical URL / канонический URL
4299
4576
  */
4300
4577
  setCanonical(e) {
4301
- return this.set(D.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
4578
+ return this.set(L.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
4302
4579
  }
4303
4580
  /**
4304
4581
  * Sets the robots meta tag.
@@ -4307,7 +4584,7 @@ class Ie extends ht {
4307
4584
  * @param robots robots directive / директива robots
4308
4585
  */
4309
4586
  setRobots(e) {
4310
- return this.set(D.robots, e), this;
4587
+ return this.set(L.robots, e), this;
4311
4588
  }
4312
4589
  /**
4313
4590
  * Sets the author meta tag.
@@ -4316,7 +4593,7 @@ class Ie extends ht {
4316
4593
  * @param author author name / имя автора
4317
4594
  */
4318
4595
  setAuthor(e) {
4319
- return this.set(D.author, e), this;
4596
+ return this.set(L.author, e), this;
4320
4597
  }
4321
4598
  /**
4322
4599
  * Sets the site name for Open Graph and Twitter Card.
@@ -4359,10 +4636,10 @@ class Ie extends ht {
4359
4636
  * Получает отформатированный суффикс с разделителем.
4360
4637
  */
4361
4638
  getSuffix() {
4362
- return v(this.suffix) ? ` - ${this.suffix}` : "";
4639
+ return m(this.suffix) ? ` - ${this.suffix}` : "";
4363
4640
  }
4364
4641
  }
4365
- class ot {
4642
+ class ut {
4366
4643
  /**
4367
4644
  * Checks whether to enable scroll hiding.
4368
4645
  *
@@ -4381,19 +4658,35 @@ class ot {
4381
4658
  var e;
4382
4659
  const t = (e = this.storage.get()) != null ? e : -1;
4383
4660
  if (!this.calculate && t === -1) {
4384
- const s = await this.init();
4385
- return this.storage.set(s), s;
4661
+ const i = await this.init();
4662
+ return this.storage.set(i), i;
4386
4663
  }
4387
4664
  return t;
4388
4665
  }
4666
+ /**
4667
+ * Returns the storage.
4668
+ *
4669
+ * Возвращает хранилище.
4670
+ */
4671
+ static getStorage() {
4672
+ return this.storage;
4673
+ }
4674
+ /**
4675
+ * Returns the calculate flag.
4676
+ *
4677
+ * Возвращает флаг вычисления.
4678
+ */
4679
+ static getCalculate() {
4680
+ return this.calculate;
4681
+ }
4389
4682
  /**
4390
4683
  * Creates elements to check the width of the scroll.
4391
4684
  *
4392
4685
  * Создает элементы для проверки ширины скролла.
4393
4686
  */
4394
4687
  static createElement() {
4395
- return _(document.body, "div", (t) => {
4396
- t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", _(t, "div", (e) => {
4688
+ return G(document.body, "div", (t) => {
4689
+ t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", G(t, "div", (e) => {
4397
4690
  e.style.height = "100px";
4398
4691
  });
4399
4692
  });
@@ -4413,8 +4706,562 @@ class ot {
4413
4706
  });
4414
4707
  }
4415
4708
  }
4416
- c(ot, "storage", new T("scrollbar", !0)), c(ot, "calculate", !1);
4417
- const ue = [
4709
+ c(ut, "storage", new et("scrollbar", !0)), c(ut, "calculate", !1);
4710
+ function ft(s) {
4711
+ return s.replace(/([[\]\\^$.?*+(){}/|])/g, "\\$1");
4712
+ }
4713
+ function ye(s) {
4714
+ const t = d(
4715
+ s.split(" "),
4716
+ (e) => ft(e)
4717
+ ).join("|");
4718
+ return new RegExp(`(${t})`, "ig");
4719
+ }
4720
+ function $e(s, t, e = "sys-highlight-match") {
4721
+ return t ? String(s).replace(
4722
+ ye(t),
4723
+ `<span class="${e}">$1</span>`
4724
+ ) : s;
4725
+ }
4726
+ class pe {
4727
+ /**
4728
+ * Constructor for SearchListData.
4729
+ *
4730
+ * Конструктор для SearchListData.
4731
+ * @param list original list of items/ исходный список элементов
4732
+ * @param columns columns to search in/ столбцы для поиска
4733
+ * @param item current search item state/ текущее состояние элемента поиска
4734
+ * @param options search options/ опции поиска
4735
+ */
4736
+ constructor(t, e, i, r) {
4737
+ c(this, "listCache");
4738
+ this.list = t, this.columns = e, this.item = i, this.options = r;
4739
+ }
4740
+ /**
4741
+ * Checks if both list and columns are provided.
4742
+ *
4743
+ * Проверяет, предоставлены ли и список, и столбцы.
4744
+ * @returns boolean indicating if ready for column-based search/ логическое значение, указывающее на готовность к поиску по столбцам
4745
+ */
4746
+ is() {
4747
+ return !!(this.list && this.columns);
4748
+ }
4749
+ /**
4750
+ * Checks if the list is provided.
4751
+ *
4752
+ * Проверяет, предоставлен ли список.
4753
+ * @returns boolean/ логическое значение
4754
+ */
4755
+ isList() {
4756
+ return !!this.list;
4757
+ }
4758
+ /**
4759
+ * Returns the original list.
4760
+ *
4761
+ * Возвращает исходный список.
4762
+ * @returns list value/ значение списка
4763
+ */
4764
+ getList() {
4765
+ return this.list;
4766
+ }
4767
+ /**
4768
+ * Returns the search columns.
4769
+ *
4770
+ * Возвращает столбцы поиска.
4771
+ * @returns columns or undefined/ столбцы или undefined
4772
+ */
4773
+ getColumns() {
4774
+ return this.columns;
4775
+ }
4776
+ /**
4777
+ * Gets the search cache, initializing it if necessary.
4778
+ *
4779
+ * Получает кэш поиска, инициализируя его при необходимости.
4780
+ * @returns search cache/ кэш поиска
4781
+ */
4782
+ getCache() {
4783
+ var t;
4784
+ return this.listCache || this.initCache(), (t = this.listCache) != null ? t : [];
4785
+ }
4786
+ /**
4787
+ * Sets a new list and regenerates the cache.
4788
+ *
4789
+ * Устанавливает новый список и регенерирует кэш.
4790
+ * @param list new list/ новый список
4791
+ * @returns this instance/ данный экземпляр
4792
+ */
4793
+ setList(t) {
4794
+ return this.list = t, this.resetCache(), this;
4795
+ }
4796
+ /**
4797
+ * Sets new search columns and regenerates the cache.
4798
+ *
4799
+ * Устанавливает новые столбцы поиска и регенерирует кэш.
4800
+ * @param columns new columns/ новые столбцы
4801
+ * @returns this instance/ данный экземпляр
4802
+ */
4803
+ setColumns(t) {
4804
+ return this.columns = t, this.resetCache(), this;
4805
+ }
4806
+ /**
4807
+ * Finds a cached item corresponding to the given original item.
4808
+ *
4809
+ * Находит кэшированный элемент, соответствующий данному исходному элементу.
4810
+ * @param item original item/ исходный элемент
4811
+ * @returns cache item or undefined/ кэшированный элемент или undefined
4812
+ */
4813
+ findCacheItem(t) {
4814
+ return this.getCache().find((e) => e.item === t);
4815
+ }
4816
+ /**
4817
+ * Iterates over the cached list and executes a callback for each item.
4818
+ *
4819
+ * Перебирает кэшированный список и выполняет обратный вызов для каждого элемента.
4820
+ * @param callback function to execute for each item/ функция для выполнения для каждого элемента
4821
+ * @returns formatted list/ отформатированный список
4822
+ */
4823
+ forEach(t) {
4824
+ const e = [];
4825
+ return this.isList() && this.getCache().forEach((i) => {
4826
+ const r = t(
4827
+ i.item,
4828
+ i.value
4829
+ );
4830
+ r && e.push(r);
4831
+ }), e;
4832
+ }
4833
+ /**
4834
+ * Converts a single item to a formatted item with highlighted matches if selected.
4835
+ *
4836
+ * Преобразует один элемент в отформатированный элемент с выделенными совпадениями, если он выбран.
4837
+ * @param item original item/ исходный элемент
4838
+ * @param selection whether the item matches the search and should be highlighted/ совпадает ли элемент с поиском и должен ли он быть выделен
4839
+ * @returns formatted item/ отформатированный элемент
4840
+ */
4841
+ toFormatItem(t, e) {
4842
+ const i = {};
4843
+ return this.columns && this.columns.forEach((r) => {
4844
+ const a = this.getColumnName(r), o = x(t, r);
4845
+ i[a] = m(o) && e ? this.addTag(o) : T(o);
4846
+ }), {
4847
+ ...t,
4848
+ ...i,
4849
+ searchActive: e
4850
+ };
4851
+ }
4852
+ /**
4853
+ * Formats a column path to a camelCase property name with a 'Search' suffix.
4854
+ *
4855
+ * Форматирует путь к столбцу в имя свойства camelCase с суффиксом 'Search'.
4856
+ * @param column column path/ путь к столбцу
4857
+ * @returns property name/ имя свойства
4858
+ */
4859
+ getColumnName(t) {
4860
+ return t.replace(
4861
+ /\.([a-z0-9])/ig,
4862
+ (e, i) => i.toUpperCase()
4863
+ ) + "Search";
4864
+ }
4865
+ /**
4866
+ * Adds highlight tags to the given value based on the current search value.
4867
+ *
4868
+ * Добавляет теги выделения к данному значению на основе текущего значения поиска.
4869
+ * @param value value to highlight/ значение для выделения
4870
+ * @returns highlighted string/ выделенная строка
4871
+ */
4872
+ addTag(t) {
4873
+ return $e(
4874
+ T(t),
4875
+ this.item.get(),
4876
+ this.options.getClassName()
4877
+ );
4878
+ }
4879
+ /**
4880
+ * Generates a search cache for the current list and columns.
4881
+ *
4882
+ * Генерирует кэш поиска для текущего списка и столбцов.
4883
+ * @returns search cache/ кэш поиска
4884
+ */
4885
+ generateCache() {
4886
+ if (!this.isList())
4887
+ return [];
4888
+ const t = [];
4889
+ for (const e of this.list) {
4890
+ let i = "";
4891
+ if (this.columns)
4892
+ for (const r of this.columns) {
4893
+ const a = x(e, r);
4894
+ m(a) && (i += ` ${T(a)}`);
4895
+ }
4896
+ t.push({
4897
+ item: e,
4898
+ value: i
4899
+ });
4900
+ }
4901
+ return t;
4902
+ }
4903
+ /**
4904
+ * Initializes the search cache.
4905
+ *
4906
+ * Инициализирует кэш поиска.
4907
+ */
4908
+ initCache() {
4909
+ this.listCache = this.generateCache();
4910
+ }
4911
+ /**
4912
+ * Resets the search cache.
4913
+ *
4914
+ * Сбрасывает кэш поиска.
4915
+ */
4916
+ resetCache() {
4917
+ this.listCache = void 0;
4918
+ }
4919
+ }
4920
+ class be {
4921
+ /**
4922
+ * Constructor for SearchListItem.
4923
+ *
4924
+ * Конструктор для SearchListItem.
4925
+ * @param value current search value/ текущее значение поиска
4926
+ * @param options search options/ опции поиска
4927
+ */
4928
+ constructor(t, e) {
4929
+ this.value = t, this.options = e;
4930
+ }
4931
+ /**
4932
+ * Checks if the value is filled.
4933
+ *
4934
+ * Проверяет, заполнено ли значение.
4935
+ * @returns boolean indicating if value exists/ логическое значение, указывающее на наличие значения
4936
+ */
4937
+ is() {
4938
+ return !!this.value;
4939
+ }
4940
+ /**
4941
+ * Checks if a search should be performed based on the current value and options.
4942
+ *
4943
+ * Проверяет, следует ли выполнять поиск на основе текущего значения и опций.
4944
+ * @returns boolean/ логическое значение
4945
+ */
4946
+ isSearch() {
4947
+ return this.is() && this.value.length >= this.options.getLimit();
4948
+ }
4949
+ /**
4950
+ * Returns the current search value as a string.
4951
+ *
4952
+ * Возвращает текущее значение поиска в виде строки.
4953
+ * @returns search value/ значение поиска
4954
+ */
4955
+ get() {
4956
+ var t;
4957
+ return (t = this.value) != null ? t : "";
4958
+ }
4959
+ /**
4960
+ * Sets a new search value.
4961
+ *
4962
+ * Устанавливает новое значение поиска.
4963
+ * @param value new search value/ новое значение поиска
4964
+ * @returns this instance/ данный экземпляр
4965
+ */
4966
+ set(t) {
4967
+ return this.value = t, this;
4968
+ }
4969
+ }
4970
+ function zt(s, t = "ig", e = ":value") {
4971
+ const i = ft(s);
4972
+ return new RegExp(e.replace(/:value/g, i), t);
4973
+ }
4974
+ function we(s) {
4975
+ return zt(s, "i", "(:value)");
4976
+ }
4977
+ function ve(s) {
4978
+ let t = "";
4979
+ return s.split(" ").forEach((e) => {
4980
+ const i = ft(e).trim();
4981
+ m(i) && (t += `(?=.*?${i})`);
4982
+ }), new RegExp(`^${t}`, "ig");
4983
+ }
4984
+ class Se {
4985
+ /**
4986
+ * Constructor for SearchListMatcher.
4987
+ *
4988
+ * Конструктор для SearchListMatcher.
4989
+ * @param item search item containing the current value/ элемент поиска, содержащий текущее значение
4990
+ * @param options search options/ опции поиска
4991
+ */
4992
+ constructor(t, e) {
4993
+ c(this, "matcher");
4994
+ this.item = t, this.options = e, this.initMatcher();
4995
+ }
4996
+ /**
4997
+ * Checks if the matcher is initialized.
4998
+ *
4999
+ * Проверяет, инициализирован ли сопоставитель.
5000
+ * @returns boolean/ логическое значение
5001
+ */
5002
+ is() {
5003
+ return !!this.matcher;
5004
+ }
5005
+ /**
5006
+ * Checks if the given value matches the current search expression.
5007
+ *
5008
+ * Проверяет, соответствует ли данное значение текущему поисковому выражению.
5009
+ * @param value value to check/ проверяемое значение
5010
+ * @returns boolean indicating a match/ логическое значение, указывающее на совпадение
5011
+ */
5012
+ isSelection(t) {
5013
+ return this.matcher ? this.matcher.test(t) : !1;
5014
+ }
5015
+ /**
5016
+ * Returns the current regular expression matcher.
5017
+ *
5018
+ * Возвращает текущий сопоставитель регулярных выражений.
5019
+ * @returns RegExp or undefined/ RegExp или undefined
5020
+ */
5021
+ get() {
5022
+ return this.matcher;
5023
+ }
5024
+ /**
5025
+ * Updates the matcher based on the current item value and options.
5026
+ *
5027
+ * Обновляет сопоставитель на основе текущего значения элемента и опций.
5028
+ */
5029
+ update() {
5030
+ this.initMatcher();
5031
+ }
5032
+ /**
5033
+ * Initializes or resets the regular expression matcher.
5034
+ *
5035
+ * Инициализирует или сбрасывает сопоставитель регулярных выражений.
5036
+ */
5037
+ initMatcher() {
5038
+ this.item.is() ? this.matcher = this.options.getFindExactMatch() ? we(this.item.get()) : ve(this.item.get()) : this.matcher = void 0;
5039
+ }
5040
+ }
5041
+ class Le {
5042
+ /**
5043
+ * Constructor for SearchListOptions.
5044
+ *
5045
+ * Конструктор для SearchListOptions.
5046
+ * @param options search options/ опции поиска
5047
+ */
5048
+ constructor(t) {
5049
+ this.options = t;
5050
+ }
5051
+ /**
5052
+ * Returns the current search options.
5053
+ *
5054
+ * Возвращает текущие опции поиска.
5055
+ * @returns search options/ опции поиска
5056
+ */
5057
+ getOptions() {
5058
+ return this.options || {};
5059
+ }
5060
+ /**
5061
+ * Returns the minimum number of characters required to trigger a search.
5062
+ *
5063
+ * Возвращает минимальное количество символов, необходимых для запуска поиска.
5064
+ * @returns limit value/ значение лимита
5065
+ */
5066
+ getLimit() {
5067
+ var t;
5068
+ return (t = this.getOptions().limit) != null ? t : 2;
5069
+ }
5070
+ /**
5071
+ * Returns whether to return all items even if they don't match the search query.
5072
+ *
5073
+ * Возвращает, следует ли возвращать все элементы, даже если они не соответствуют поисковому запросу.
5074
+ * @returns boolean value/ логическое значение
5075
+ */
5076
+ getReturnEverything() {
5077
+ var t;
5078
+ return (t = this.getOptions().returnEverything) != null ? t : !1;
5079
+ }
5080
+ /**
5081
+ * Returns the search delay in milliseconds.
5082
+ *
5083
+ * Возвращает задержку поиска в миллисекундах.
5084
+ * @returns delay value/ значение задержки
5085
+ */
5086
+ getDelay() {
5087
+ var t;
5088
+ return (t = this.getOptions().delay) != null ? t : 0;
5089
+ }
5090
+ /**
5091
+ * Returns whether to perform an exact match search.
5092
+ *
5093
+ * Возвращает, следует ли выполнять поиск с точным совпадением.
5094
+ * @returns boolean value/ логическое значение
5095
+ */
5096
+ getFindExactMatch() {
5097
+ var t;
5098
+ return (t = this.getOptions().findExactMatch) != null ? t : !1;
5099
+ }
5100
+ /**
5101
+ * Returns the CSS class name used for highlighting matches.
5102
+ *
5103
+ * Возвращает имя класса CSS, используемое для выделения совпадений.
5104
+ * @returns class name/ имя класса
5105
+ */
5106
+ getClassName() {
5107
+ var t;
5108
+ return (t = this.getOptions().classSearchName) != null ? t : "sys-search-selection";
5109
+ }
5110
+ /**
5111
+ * Sets new search options.
5112
+ *
5113
+ * Устанавливает новые опции поиска.
5114
+ * @param options search options/ опции поиска
5115
+ * @returns this instance/ данный экземпляр
5116
+ */
5117
+ setOptions(t) {
5118
+ return this.options = t, this;
5119
+ }
5120
+ }
5121
+ class Ke {
5122
+ /**
5123
+ * Constructor for SearchList.
5124
+ *
5125
+ * Конструктор для SearchList.
5126
+ * @param list initial list of items/ исходный список элементов
5127
+ * @param columns columns to perform search on/ столбцы для выполнения поиска
5128
+ * @param value initial search value/ начальное значение поиска
5129
+ * @param options search options/ опции поиска
5130
+ */
5131
+ constructor(t, e, i, r) {
5132
+ c(this, "options");
5133
+ c(this, "item");
5134
+ c(this, "matcher");
5135
+ c(this, "data");
5136
+ /**
5137
+ * Callback for processing items when a search is active.
5138
+ * Checks for selection and handles "return everything" option.
5139
+ *
5140
+ * Обратный вызов для обработки элементов при активном поиске.
5141
+ * Проверяет выбор и обрабатывает опцию "возвращать всё".
5142
+ */
5143
+ c(this, "callbackToSelection", (t, e) => {
5144
+ if (this.matcher.isSelection(e))
5145
+ return this.data.toFormatItem(t, !0);
5146
+ if (this.options.getReturnEverything())
5147
+ return this.data.toFormatItem(t, !1);
5148
+ });
5149
+ /**
5150
+ * Callback for processing items when no search is active.
5151
+ *
5152
+ * Обратный вызов для обработки элементов, когда поиск не активен.
5153
+ */
5154
+ c(this, "callbackToNone", (t) => this.data.toFormatItem(t, !1));
5155
+ this.options = new Le(r), this.item = new be(i, this.options), this.matcher = new Se(this.item, this.options), this.data = new pe(t, e, this.item, this.options);
5156
+ }
5157
+ /**
5158
+ * Returns the search data management instance.
5159
+ *
5160
+ * Возвращает экземпляр управления данными поиска.
5161
+ * @returns SearchListData instance/ экземпляр SearchListData
5162
+ */
5163
+ getData() {
5164
+ return this.data;
5165
+ }
5166
+ /**
5167
+ * Returns the current list of items.
5168
+ *
5169
+ * Возвращает текущий список элементов.
5170
+ * @returns list of items/ список элементов
5171
+ */
5172
+ getList() {
5173
+ return this.data.getList();
5174
+ }
5175
+ /**
5176
+ * Returns the current search columns.
5177
+ *
5178
+ * Возвращает текущие столбцы поиска.
5179
+ * @returns columns or undefined/ столбцы или undefined
5180
+ */
5181
+ getColumns() {
5182
+ return this.data.getColumns();
5183
+ }
5184
+ /**
5185
+ * Returns the search item instance.
5186
+ *
5187
+ * Возвращает экземпляр элемента поиска.
5188
+ * @returns SearchListItem instance/ экземпляр SearchListItem
5189
+ */
5190
+ getItem() {
5191
+ return this.item;
5192
+ }
5193
+ /**
5194
+ * Returns the current search value.
5195
+ *
5196
+ * Возвращает текущее значение поиска.
5197
+ * @returns search value string or undefined/ строка значения поиска или undefined
5198
+ */
5199
+ getValue() {
5200
+ return this.item.get();
5201
+ }
5202
+ /**
5203
+ * Returns the search options instance.
5204
+ *
5205
+ * Возвращает экземпляр опций поиска.
5206
+ * @returns SearchListOptions instance/ экземпляр SearchListOptions
5207
+ */
5208
+ getOptions() {
5209
+ return this.options;
5210
+ }
5211
+ /**
5212
+ * Sets a new list of items.
5213
+ *
5214
+ * Устанавливает новый список элементов.
5215
+ * @param list new list/ новый список
5216
+ * @returns this instance/ данный экземпляр
5217
+ */
5218
+ setList(t) {
5219
+ return this.data.setList(t), this;
5220
+ }
5221
+ /**
5222
+ * Sets new search columns.
5223
+ *
5224
+ * Устанавливает новые столбцы поиска.
5225
+ * @param columns new columns/ новые столбцы
5226
+ * @returns this instance/ данный экземпляр
5227
+ */
5228
+ setColumns(t) {
5229
+ return this.data.setColumns(t), this;
5230
+ }
5231
+ /**
5232
+ * Sets a new search value and updates the matcher.
5233
+ *
5234
+ * Устанавливает новое значение поиска и обновляет сопоставитель.
5235
+ * @param value new search value/ новое значение поиска
5236
+ * @returns this instance/ данный экземпляр
5237
+ */
5238
+ setValue(t) {
5239
+ return this.item.set(t), this.matcher.update(), this;
5240
+ }
5241
+ /**
5242
+ * Sets new search options and updates the matcher.
5243
+ *
5244
+ * Устанавливает новые опции поиска и обновляет сопоставитель.
5245
+ * @param options new options/ новые опции
5246
+ * @returns this instance/ данный экземпляр
5247
+ */
5248
+ setOptions(t) {
5249
+ return this.options.setOptions(t), this.matcher.update(), this;
5250
+ }
5251
+ /**
5252
+ * Processes the list and returns a formatted list of items based on the current search state.
5253
+ *
5254
+ * Обрабатывает список и возвращает отформатированный список элементов на основе текущего состояния поиска.
5255
+ * @returns formatted list of items/ отформатированный список элементов
5256
+ */
5257
+ to() {
5258
+ if (this.item.isSearch())
5259
+ return this.data.forEach(this.callbackToSelection);
5260
+ const t = this.data.getList();
5261
+ return t ? d(t, this.callbackToNone) : [];
5262
+ }
5263
+ }
5264
+ const Ce = [
4418
5265
  "d",
4419
5266
  "e",
4420
5267
  "f",
@@ -4434,21 +5281,21 @@ const ue = [
4434
5281
  "t",
4435
5282
  "u",
4436
5283
  "v"
4437
- ], he = (i, t = {}) => {
4438
- let e = String(i);
4439
- if (i.match(/%[a-z]/)) {
4440
- let s = 0;
4441
- g(t, (r) => {
4442
- e = e.replace(new RegExp(`%${ue[s++]}`, "g"), String(r));
5284
+ ], De = (s, t = {}) => {
5285
+ let e = String(s);
5286
+ if (s.match(/%[a-z]/)) {
5287
+ let i = 0;
5288
+ d(t, (r) => {
5289
+ e = e.replace(new RegExp(`%${Ce[i++]}`, "g"), String(r));
4443
5290
  });
4444
5291
  }
4445
- return A(t) && g(t, (s, r) => {
5292
+ return A(t) && d(t, (i, r) => {
4446
5293
  e = e.replace(
4447
5294
  new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})(.*?)(?:\\[|\\{)\\/${r}(?:\\]|\\})`, "g"),
4448
- (o, a) => String(s).replace(/(?:\[|\{)content(?:\]|\})/g, a)
4449
- ).replace(new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})`, "g"), String(s));
5295
+ (a, o) => String(i).replace(/(?:\[|\{)content(?:\]|\})/g, o)
5296
+ ).replace(new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})`, "g"), String(i));
4450
5297
  }), e;
4451
- }, le = "global", E = class E {
5298
+ }, ke = "global", I = class I {
4452
5299
  /**
4453
5300
  * Getting the translation text by its code.
4454
5301
  *
@@ -4458,8 +5305,8 @@ const ue = [
4458
5305
  */
4459
5306
  static async get(t, e) {
4460
5307
  var r;
4461
- const s = this.getText(t);
4462
- return s ? this.replacement(s, e) : (H.isLocalhost() || await this.add(t), this.replacement((r = this.getText(t)) != null ? r : t));
5308
+ const i = this.getText(t);
5309
+ return i ? this.replacement(i, e) : (K.isLocalhost() || await this.add(t), this.replacement((r = this.getText(t)) != null ? r : t));
4463
5310
  }
4464
5311
  /**
4465
5312
  * Getting the translation text by its code (Sync).
@@ -4471,9 +5318,9 @@ const ue = [
4471
5318
  * @param replacement If set, replaces the text with the specified values/
4472
5319
  * если установлено, заменяет текст на указанные значения
4473
5320
  */
4474
- static getSync(t, e = !1, s) {
5321
+ static getSync(t, e = !1, i) {
4475
5322
  const r = this.getText(t);
4476
- return r ? this.replacement(r, s) : e ? " " : t;
5323
+ return r ? this.replacement(r, i) : e ? " " : t;
4477
5324
  }
4478
5325
  /**
4479
5326
  * Getting a list of translations by an array of text codes.
@@ -4483,12 +5330,12 @@ const ue = [
4483
5330
  */
4484
5331
  static getList(t) {
4485
5332
  return new Promise((e) => {
4486
- const s = {};
5333
+ const i = {};
4487
5334
  let r = 0;
4488
- for (const o of t) {
4489
- const a = Array.isArray(o) ? o[0] : o, u = Array.isArray(o) ? o.slice(1) : void 0;
4490
- this.get(a, u).then((h) => {
4491
- s[a] = h, ++r >= t.length && e(s);
5335
+ for (const a of t) {
5336
+ const o = Array.isArray(a) ? a[0] : a, u = Array.isArray(a) ? a.slice(1) : void 0;
5337
+ this.get(o, u).then((h) => {
5338
+ i[o] = h, ++r >= t.length && e(i);
4492
5339
  });
4493
5340
  }
4494
5341
  });
@@ -4502,12 +5349,12 @@ const ue = [
4502
5349
  * если установлено false, возвращает пустую строку, если нет текста
4503
5350
  */
4504
5351
  static getListSync(t, e = !1) {
4505
- const s = {};
5352
+ const i = {};
4506
5353
  for (const r of t) {
4507
- const o = Array.isArray(r) ? r[0] : r, a = Array.isArray(r) ? r.slice(1) : void 0;
4508
- s[o] = this.getSync(o, e, a);
5354
+ const a = Array.isArray(r) ? r[0] : r, o = Array.isArray(r) ? r.slice(1) : void 0;
5355
+ i[a] = this.getSync(a, e, o);
4509
5356
  }
4510
- return s;
5357
+ return i;
4511
5358
  }
4512
5359
  /**
4513
5360
  * Added a list of translated texts.
@@ -4531,8 +5378,8 @@ const ue = [
4531
5378
  * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
4532
5379
  */
4533
5380
  static addSync(t) {
4534
- g(t, (e, s) => {
4535
- x(e) && v(e) && (this.data[this.getName(s)] = e);
5381
+ d(t, (e, i) => {
5382
+ U(e) && m(e) && (this.data[this.getName(i)] = e);
4536
5383
  });
4537
5384
  }
4538
5385
  /**
@@ -4542,8 +5389,8 @@ const ue = [
4542
5389
  * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
4543
5390
  */
4544
5391
  static async addNormalOrSync(t) {
4545
- if (v(t))
4546
- if (H.isLocalhost())
5392
+ if (m(t))
5393
+ if (K.isLocalhost())
4547
5394
  this.addSync(t);
4548
5395
  else {
4549
5396
  const e = Object.keys(t);
@@ -4557,11 +5404,11 @@ const ue = [
4557
5404
  * @param data list of texts by location/ список текстов по местоположению
4558
5405
  */
4559
5406
  static addSyncByLocation(t) {
4560
- g(
5407
+ d(
4561
5408
  t,
4562
- (e, s) => g(e, (r, o) => {
4563
- const a = `${s}-${o}`;
4564
- a in this.data || (this.data[a] = r);
5409
+ (e, i) => d(e, (r, a) => {
5410
+ const o = `${i}-${a}`;
5411
+ o in this.data || (this.data[o] = r);
4565
5412
  })
4566
5413
  );
4567
5414
  }
@@ -4572,7 +5419,7 @@ const ue = [
4572
5419
  * @param url path to the script/ путь к скрипту
4573
5420
  */
4574
5421
  static setUrl(t) {
4575
- return this.url = t, E;
5422
+ return this.url = t, I;
4576
5423
  }
4577
5424
  static setPropsName(t) {
4578
5425
  return this.propsName = t, this;
@@ -4596,9 +5443,9 @@ const ue = [
4596
5443
  const e = this.getName(t);
4597
5444
  if (e in this.data)
4598
5445
  return this.data[e];
4599
- const s = this.getNameByLanguage(t);
4600
- if (s in this.data)
4601
- return this.data[s];
5446
+ const i = this.getNameByLanguage(t);
5447
+ if (i in this.data)
5448
+ return this.data[i];
4602
5449
  const r = this.getNameByGlobal(t);
4603
5450
  if (r in this.data)
4604
5451
  return this.data[r];
@@ -4610,7 +5457,7 @@ const ue = [
4610
5457
  * @param name code name/ название кода
4611
5458
  */
4612
5459
  static getName(t) {
4613
- return `${p.getLocation()}-${t}`;
5460
+ return `${b.getLocation()}-${t}`;
4614
5461
  }
4615
5462
  /**
4616
5463
  * Getting the title for translation by language.
@@ -4619,7 +5466,7 @@ const ue = [
4619
5466
  * @param name code name/ название кода
4620
5467
  */
4621
5468
  static getNameByLanguage(t) {
4622
- return `${p.getLanguage()}-${t}`;
5469
+ return `${b.getLanguage()}-${t}`;
4623
5470
  }
4624
5471
  /**
4625
5472
  * Getting the title for translation globally.
@@ -4628,7 +5475,7 @@ const ue = [
4628
5475
  * @param name code name/ название кода
4629
5476
  */
4630
5477
  static getNameByGlobal(t) {
4631
- return `${le}-${t}`;
5478
+ return `${ke}-${t}`;
4632
5479
  }
4633
5480
  /**
4634
5481
  * Returns a list of names that are not yet in the list.
@@ -4638,8 +5485,8 @@ const ue = [
4638
5485
  */
4639
5486
  static getNamesNone(t) {
4640
5487
  const e = [];
4641
- return z(t).forEach((s) => {
4642
- s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
5488
+ return Y(t).forEach((i) => {
5489
+ i !== "__TRANSLATE_START__" && i !== "__TRANSLATE_END__" && !(this.getName(i) in this.data) && e.push(i);
4643
5490
  }), e;
4644
5491
  }
4645
5492
  /**
@@ -4648,7 +5495,7 @@ const ue = [
4648
5495
  * Получение списка переводов с сервера.
4649
5496
  */
4650
5497
  static async getResponse() {
4651
- const t = await H.get({
5498
+ const t = await K.get({
4652
5499
  api: !1,
4653
5500
  path: this.url,
4654
5501
  request: {
@@ -4667,7 +5514,7 @@ const ue = [
4667
5514
  * @param replacement values for replacement/ значения для замены
4668
5515
  */
4669
5516
  static replacement(t, e) {
4670
- return e ? he(t, e) : t;
5517
+ return e ? De(t, e) : t;
4671
5518
  }
4672
5519
  /**
4673
5520
  * Adding translation data from the server.
@@ -4677,492 +5524,476 @@ const ue = [
4677
5524
  static async make() {
4678
5525
  const t = await this.getResponse();
4679
5526
  this.cache.forEach((e) => {
4680
- var s;
4681
- this.data[this.getName(e)] = (s = t == null ? void 0 : t[e]) != null ? s : "";
5527
+ var i;
5528
+ this.data[this.getName(e)] = (i = t == null ? void 0 : t[e]) != null ? i : "";
4682
5529
  }), this.cache = [];
4683
5530
  }
4684
5531
  };
4685
- c(E, "url", "/api/translate"), c(E, "propsName", "list"), c(E, "data", {}), c(E, "cache", []), c(E, "resolveList", []), c(E, "timeout");
4686
- let Nt = E;
4687
- function de(i) {
4688
- var t;
4689
- return x(i) ? i.trim() : at(i) && i.findIndex((e) => f(e)) === -1 ? i.join(",") : f(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
4690
- }
4691
- function ge(i, t) {
4692
- return Array(t).fill(i);
5532
+ c(I, "url", "/api/translate"), c(I, "propsName", "list"), c(I, "data", {}), c(I, "cache", []), c(I, "resolveList", []), c(I, "timeout");
5533
+ let Bt = I;
5534
+ function Ne(s, t) {
5535
+ return Array(t).fill(s);
4693
5536
  }
4694
- function Fe(i) {
5537
+ function Ye(s) {
4695
5538
  return new Promise((t, e) => {
4696
- const s = new FileReader();
4697
- s.onloadend = () => t(s.result), s.onerror = e, s.readAsDataURL(i);
5539
+ const i = new FileReader();
5540
+ i.onloadend = () => t(i.result), i.onerror = e, i.readAsDataURL(s);
4698
5541
  });
4699
5542
  }
4700
- function Re(i) {
5543
+ function qe(s) {
4701
5544
  var t;
4702
5545
  if (l())
4703
- return (t = document.querySelector(i)) != null ? t : void 0;
5546
+ return (t = document.querySelector(s)) != null ? t : void 0;
4704
5547
  }
4705
- function xe(i) {
5548
+ function Je(s) {
4706
5549
  if (l())
4707
- return document.querySelectorAll(i);
5550
+ return document.querySelectorAll(s);
4708
5551
  }
4709
- function Pe(i) {
4710
- i.preventDefault(), i.stopPropagation();
5552
+ function Me(s) {
5553
+ s.preventDefault(), s.stopPropagation();
4711
5554
  }
4712
- function fe(i, t, e) {
4713
- const s = () => {
4714
- i(), t != null && t() ? fe(i, t, e) : e == null || e();
5555
+ function Ee(s, t, e) {
5556
+ const i = () => {
5557
+ s(), t != null && t() ? Ee(s, t, e) : e == null || e();
4715
5558
  };
4716
- l() ? requestAnimationFrame(s) : s();
5559
+ l() ? requestAnimationFrame(i) : i();
4717
5560
  }
4718
- function We(i) {
4719
- var s;
4720
- const t = {}, e = N(i);
5561
+ function Qe(s) {
5562
+ var i;
5563
+ const t = {}, e = E(s);
4721
5564
  if (e)
4722
5565
  for (const r of e.attributes)
4723
- t[r.name] = (s = (r == null ? void 0 : r.value) || (r == null ? void 0 : r.textContent)) != null ? s : void 0;
5566
+ t[r.name] = (i = (r == null ? void 0 : r.value) || (r == null ? void 0 : r.textContent)) != null ? i : void 0;
4724
5567
  return t;
4725
5568
  }
4726
- async function je(i) {
5569
+ async function Xe(s) {
4727
5570
  var t, e;
4728
- return (e = (t = i == null ? void 0 : i.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
5571
+ return (e = (t = s == null ? void 0 : s.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
4729
5572
  }
4730
- function Ue(i = "datetime") {
4731
- return new ut(void 0, i).standard();
5573
+ function _e(s = "datetime") {
5574
+ return new gt(void 0, s).standard();
4732
5575
  }
4733
- let At = q(1e5, 9e5);
4734
- function He(i, t) {
4735
- const e = N(i);
4736
- return e ? (v(e.id) || e.setAttribute("id", `id-${At++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${At++}`;
5576
+ let Ft = Q(1e5, 9e5);
5577
+ function Oe(s, t) {
5578
+ const e = E(s);
5579
+ return e ? (m(e.id) || e.setAttribute("id", `id-${Ft++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${Ft++}`;
4737
5580
  }
4738
- function me(i) {
4739
- return x(i) ? _(
5581
+ function Ae(s) {
5582
+ return U(s) ? G(
4740
5583
  void 0,
4741
5584
  "img",
4742
- { src: i }
4743
- ) : i;
4744
- }
4745
- function ye(i, t = "ig", e = ":value") {
4746
- const s = i.replace(/([[\]\\^$.?*+(){}/|])/g, "\\$1");
4747
- return new RegExp(e.replace(/:value/g, s), t);
4748
- }
4749
- function $e(i, t, e) {
4750
- const s = de(i);
4751
- if (!e || e <= 0)
4752
- return s.split(t);
4753
- const r = s.split(t, e), o = s.split(t);
4754
- return r.length === o.length ? r : (r.pop(), [
4755
- ...r,
4756
- o.slice(e - 1).join(t)
4757
- ]);
4758
- }
4759
- function pe(i, t) {
4760
- var r;
4761
- if (!v(t))
4762
- return;
4763
- const e = $e(t, ".", 2), s = e[0];
4764
- return s && (i != null && i[s]) && f(i[s]) && (e != null && e[1]) ? pe(i[s], e[1]) : (r = v(s) && (i == null ? void 0 : i[s])) != null ? r : void 0;
5585
+ { src: s }
5586
+ ) : s;
4765
5587
  }
4766
- function ze(i) {
4767
- var t, e, s;
4768
- return (s = (t = i == null ? void 0 : i.key) != null ? t : i == null ? void 0 : i.code) != null ? s : (e = i == null ? void 0 : i.keyCode) == null ? void 0 : e.toString();
5588
+ function Te(s) {
5589
+ var t, e, i;
5590
+ 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();
4769
5591
  }
4770
- function Pt(i) {
4771
- return g(i, (t) => t.length);
5592
+ function Zt(s) {
5593
+ return d(s, (t) => t.length);
4772
5594
  }
4773
- function Ze(i) {
4774
- return Math.max(...Pt(i));
5595
+ function Ge(s) {
5596
+ return Math.max(...Zt(s));
4775
5597
  }
4776
- function Ve(i) {
4777
- return Math.min(...Pt(i));
5598
+ function ts(s) {
5599
+ return Math.min(...Zt(s));
4778
5600
  }
4779
- function be(i) {
4780
- var t, e, s, r;
4781
- return (i == null ? void 0 : i.clientX) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientX) || ((r = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : r.clientX) || 0;
5601
+ function Ie(s) {
5602
+ var t, e, i, r;
5603
+ return (s == null ? void 0 : s.clientX) || ((e = (t = s == null ? void 0 : s.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientX) || ((r = (i = s == null ? void 0 : s.touches) == null ? void 0 : i[0]) == null ? void 0 : r.clientX) || 0;
4782
5604
  }
4783
- function we(i) {
4784
- var t, e, s, r;
4785
- return (i == null ? void 0 : i.clientY) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientY) || ((r = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : r.clientY) || 0;
5605
+ function Be(s) {
5606
+ var t, e, i, r;
5607
+ return (s == null ? void 0 : s.clientY) || ((e = (t = s == null ? void 0 : s.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientY) || ((r = (i = s == null ? void 0 : s.touches) == null ? void 0 : i[0]) == null ? void 0 : r.clientY) || 0;
4786
5608
  }
4787
- function Ke(i) {
5609
+ function es(s) {
4788
5610
  return {
4789
- x: be(i),
4790
- y: we(i)
5611
+ x: Ie(s),
5612
+ y: Be(s)
4791
5613
  };
4792
5614
  }
4793
- function Ye(i, t) {
5615
+ function ss(s, t) {
4794
5616
  const e = {};
4795
- return t.forEach((s) => {
4796
- s in i && i[s] !== void 0 && (e[s] = i[s]);
5617
+ return t.forEach((i) => {
5618
+ i in s && s[i] !== void 0 && (e[i] = s[i]);
4797
5619
  }), e;
4798
5620
  }
4799
- function qe(i, t = void 0) {
5621
+ function is(s, t = void 0) {
4800
5622
  const e = {};
4801
- return g(i, (s, r) => {
4802
- s !== t && (e[r] = s);
5623
+ return d(s, (i, r) => {
5624
+ i !== t && (e[r] = i);
4803
5625
  }), e;
4804
5626
  }
4805
- function Je(i) {
4806
- return A(i) ? i : {};
5627
+ function rs(s) {
5628
+ return A(s) ? s : {};
4807
5629
  }
4808
- function ve(i, t) {
4809
- return ge(i, t).join("");
5630
+ function Fe(s, t) {
5631
+ return Ne(s, t).join("");
4810
5632
  }
4811
- function Me(i, t, e = "#", s = 2, r = 12) {
4812
- const o = q(i, t), a = [];
4813
- for (let u = 0; u < o; u++)
4814
- a.push(ve(e, q(s, r)));
4815
- return a.join(" ");
5633
+ function ns(s, t, e = "#", i = 2, r = 12) {
5634
+ const a = Q(s, t), o = [];
5635
+ for (let u = 0; u < a; u++)
5636
+ o.push(Fe(e, Q(i, r)));
5637
+ return o.join(" ");
4816
5638
  }
4817
- function Qe(i, t) {
4818
- const e = i != null ? i : 0;
5639
+ function as(s, t) {
5640
+ const e = s != null ? s : 0;
4819
5641
  return t > e ? 100 / (t - e) : 0;
4820
5642
  }
4821
- function Xe(i, t) {
4822
- const e = i != null ? i : 0;
5643
+ function os(s, t) {
5644
+ const e = s != null ? s : 0;
4823
5645
  return t > e ? (t - e) / 100 : 0;
4824
5646
  }
4825
- const Et = 0;
4826
- function _e(i, t, e) {
4827
- const s = t == null ? void 0 : t.closest(i);
4828
- if (t && s && s.scrollHeight !== s.offsetHeight) {
4829
- const r = s.getBoundingClientRect(), o = t.getBoundingClientRect();
5647
+ const xt = 0;
5648
+ function cs(s, t, e) {
5649
+ const i = t == null ? void 0 : t.closest(s);
5650
+ if (t && i && i.scrollHeight !== i.offsetHeight) {
5651
+ const r = i.getBoundingClientRect(), a = t.getBoundingClientRect();
4830
5652
  if (e) {
4831
- const a = e.getBoundingClientRect();
4832
- s.scrollTop = t.offsetTop - (a.top - r.top) - (a.height / 2 - o.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
4833
- } else s.scrollTop > t.offsetTop ? s.scrollTop = o.top - r.top - Et : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = o.top - r.top + o.height - r.height + Et);
5653
+ const o = e.getBoundingClientRect();
5654
+ i.scrollTop = t.offsetTop - (o.top - r.top) - (o.height / 2 - a.height / 2), i.scrollTop + i.offsetHeight < t.offsetTop + t.offsetHeight && (i.scrollTop = t.offsetTop + t.offsetHeight - i.offsetHeight);
5655
+ } else i.scrollTop > t.offsetTop ? i.scrollTop = a.top - r.top - xt : i.scrollTop + i.offsetHeight < t.offsetTop + t.offsetHeight && (i.scrollTop = a.top - r.top + a.height - r.height + xt);
4834
5656
  }
4835
5657
  }
4836
- function Oe(i, t, e = 0) {
5658
+ function us(s, t, e = 0) {
4837
5659
  if (!l())
4838
5660
  return;
4839
- const s = (t == null ? void 0 : t.behavior) || "smooth";
4840
- if ("scrollIntoView" in i && !e) {
4841
- i.scrollIntoView({
4842
- behavior: s,
5661
+ const i = (t == null ? void 0 : t.behavior) || "smooth";
5662
+ if ("scrollIntoView" in s && !e) {
5663
+ s.scrollIntoView({
5664
+ behavior: i,
4843
5665
  block: (t == null ? void 0 : t.block) || "start",
4844
5666
  inline: (t == null ? void 0 : t.inline) || "start"
4845
5667
  });
4846
5668
  return;
4847
5669
  }
4848
- if ("getBoundingClientRect" in i && "scrollTo" in window) {
4849
- const r = ((window == null ? void 0 : window.scrollY) || window.pageYOffset) + i.getBoundingClientRect().top - e;
5670
+ if ("getBoundingClientRect" in s && "scrollTo" in window) {
5671
+ const r = ((window == null ? void 0 : window.scrollY) || window.pageYOffset) + s.getBoundingClientRect().top - e;
4850
5672
  window.scrollTo({
4851
5673
  top: r,
4852
- behavior: s
5674
+ behavior: i
4853
5675
  });
4854
5676
  }
4855
5677
  }
4856
- function Te(i, t, e = "smooth") {
4857
- if (!l() || !i || !t)
5678
+ function hs(s, t, e = "smooth") {
5679
+ if (!l() || !s || !t)
4858
5680
  return;
4859
- const s = i.getBoundingClientRect(), r = t.getBoundingClientRect();
4860
- i.scrollBy({
4861
- top: r.top - s.top,
4862
- left: r.left - s.left,
5681
+ const i = s.getBoundingClientRect(), r = t.getBoundingClientRect();
5682
+ s.scrollBy({
5683
+ top: r.top - i.top,
5684
+ left: r.left - i.left,
4863
5685
  behavior: e
4864
5686
  });
4865
5687
  }
4866
- function Ge(i, t) {
4867
- return i.indexOf(t) !== -1;
5688
+ function ls(s, t) {
5689
+ return s.indexOf(t) !== -1;
4868
5690
  }
4869
- async function ti() {
5691
+ async function gs() {
4870
5692
  if (l()) {
4871
- const i = await ot.get();
4872
- document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
5693
+ const s = await ut.get();
5694
+ document.body.style.setProperty("--sys-scrollbar-offset", `${s}px`);
4873
5695
  }
4874
5696
  }
4875
- function ei(i, t) {
5697
+ function ds(s, t) {
4876
5698
  const e = {};
4877
- return f(i) && f(t) && g(i, (s, r) => {
4878
- r in t && (e[r] = s);
5699
+ return f(s) && f(t) && d(s, (i, r) => {
5700
+ r in t && (e[r] = i);
4879
5701
  }), e;
4880
5702
  }
4881
- function ii(i, t) {
4882
- let e = Object.keys(i).length !== Object.keys(t).length;
4883
- return e || g(i, (s, r) => {
4884
- s !== (t == null ? void 0 : t[r]) && (e = !0);
5703
+ function fs(s, t) {
5704
+ let e = Object.keys(s).length !== Object.keys(t).length;
5705
+ return e || d(s, (i, r) => {
5706
+ i !== (t == null ? void 0 : t[r]) && (e = !0);
4885
5707
  }), e;
4886
5708
  }
4887
- const Se = (i) => {
4888
- if (i instanceof HTMLElement) {
4889
- const t = i.tagName.toLowerCase();
4890
- return !!(t === "input" || t === "textarea" || t === "select" || i.isContentEditable || i.getAttribute("contenteditable") === "true");
5709
+ const xe = (s) => {
5710
+ if (s instanceof HTMLElement) {
5711
+ const t = s.tagName.toLowerCase();
5712
+ return !!(t === "input" || t === "textarea" || t === "select" || s.isContentEditable || s.getAttribute("contenteditable") === "true");
4891
5713
  }
4892
5714
  return !1;
4893
- }, si = (i, t) => i.code === "Space" || i.code === "Enter" || i.key === " " || i.key === "Spacebar" || i.key === "Enter" || i.keyCode === 13 || i.keyCode === 32 ? t !== void 0 ? !t : !Se(i.target) : !1;
4894
- function ri(i) {
4895
- switch (typeof i) {
5715
+ }, ms = (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;
5716
+ function ys(s) {
5717
+ switch (typeof s) {
4896
5718
  case "number":
4897
5719
  return !0;
4898
5720
  case "string":
4899
- return !!i.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
5721
+ return !!s.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
4900
5722
  default:
4901
5723
  return !1;
4902
5724
  }
4903
5725
  }
4904
- function ni(i, t) {
5726
+ function $s(s, t) {
4905
5727
  const e = Math.floor(t);
4906
- return i >= e && i < e + 1;
5728
+ return s >= e && s < e + 1;
4907
5729
  }
4908
- function oi(i, t) {
4909
- return Array.isArray(i) ? i.every((e) => rt(e, t)) : rt(i, t);
5730
+ function ps(s, t) {
5731
+ return Array.isArray(s) ? s.every((e) => ot(e, t)) : ot(s, t);
4910
5732
  }
4911
- function ai(i, t) {
4912
- if (i.startsWith(t))
4913
- return i.slice(t.length).trim();
5733
+ function bs(s, t) {
5734
+ if (s.startsWith(t))
5735
+ return s.slice(t.length).trim();
4914
5736
  let e = 0;
4915
- for (; i[e] === t[e] && e < i.length && e < t.length; )
5737
+ for (; s[e] === t[e] && e < s.length && e < t.length; )
4916
5738
  e++;
4917
- return i.slice(e).trim();
5739
+ return s.slice(e).trim();
4918
5740
  }
4919
- const ci = (i, t, e) => {
4920
- var s, r;
4921
- return (r = (s = i == null ? void 0 : i.replace(new RegExp(`<${t}`, "ig"), `<${e}`)) == null ? void 0 : s.replace(new RegExp(`</${t}`, "ig"), `</${e}`)) == null ? void 0 : r.trim();
5741
+ const ws = (s, t, e) => {
5742
+ var i, r;
5743
+ 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();
4922
5744
  };
4923
- function De(i) {
4924
- return [...new Set(i)];
5745
+ function Re(s) {
5746
+ return [...new Set(s)];
4925
5747
  }
4926
- function V(i, t, e = !0) {
4927
- const s = U(i);
4928
- return f(i) && f(t) && g(
5748
+ function J(s, t, e = !0) {
5749
+ const i = V(s);
5750
+ return f(s) && f(t) && d(
4929
5751
  t,
4930
- (r, o) => {
4931
- const a = i == null ? void 0 : i[o];
4932
- f(a) && f(r) ? e && Array.isArray(a) && Array.isArray(r) ? s[o] = U(De([...a, ...r])) : s[o] = V(
4933
- Array.isArray(a) ? { ...a } : a,
5752
+ (r, a) => {
5753
+ const o = s == null ? void 0 : s[a];
5754
+ f(o) && f(r) ? e && Array.isArray(o) && Array.isArray(r) ? i[a] = V(Re([...o, ...r])) : i[a] = J(
5755
+ Array.isArray(o) ? { ...o } : o,
4934
5756
  r,
4935
5757
  e
4936
- ) : s[o] = f(r) ? U(r) : r;
5758
+ ) : i[a] = f(r) ? V(r) : r;
4937
5759
  }
4938
- ), s;
5760
+ ), i;
4939
5761
  }
4940
- function ui(i, t) {
4941
- let e = i;
4942
- return g(t, (s, r) => {
4943
- e = e.replace(ye(`[${r}]`), B(s));
5762
+ function vs(s, t) {
5763
+ let e = s;
5764
+ return d(t, (i, r) => {
5765
+ e = e.replace(zt(`[${r}]`), B(i));
4944
5766
  }), e;
4945
5767
  }
4946
- function Le(i, t = "auto") {
5768
+ function Pe(s, t = "auto") {
4947
5769
  switch (t) {
4948
5770
  case "auto":
4949
- return i.naturalWidth >= i.naturalHeight;
5771
+ return s.naturalWidth >= s.naturalHeight;
4950
5772
  case "width":
4951
5773
  return !0;
4952
5774
  case "height":
4953
5775
  return !1;
4954
5776
  }
4955
5777
  }
4956
- function hi(i, t, e = "auto", s) {
4957
- var o;
4958
- const r = me(i);
5778
+ function Ss(s, t, e = "auto", i) {
5779
+ var a;
5780
+ const r = Ae(s);
4959
5781
  if (r && (r.naturalWidth > t && (e === "auto" || e === "width") || r.naturalHeight > t && (e === "auto" || e === "height"))) {
4960
- const a = Le(r, e), u = (o = document.createElement("canvas")) == null ? void 0 : o.getContext("2d");
5782
+ const o = Pe(r, e), u = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
4961
5783
  if (u)
4962
- 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(s);
5784
+ return u.canvas.width = o ? t : r.naturalWidth / r.naturalHeight * t, u.canvas.height = o ? r.naturalHeight / r.naturalWidth * t : t, u.drawImage(r, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(i);
4963
5785
  }
4964
5786
  }
4965
- function li(i) {
4966
- const t = k(i);
5787
+ function Ls(s) {
5788
+ const t = k(s);
4967
5789
  if (t > 0) {
4968
- const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
4969
- return `${e}:${s}`;
5790
+ const e = String(Math.floor(t / 60)).padStart(2, "0"), i = String(t % 60).padStart(2, "0");
5791
+ return `${e}:${i}`;
4970
5792
  }
4971
5793
  return "00:00";
4972
5794
  }
4973
- function di(i, t, {
5795
+ function Cs(s, t, {
4974
5796
  multiple: e = !1,
4975
- maxlength: s = 0,
5797
+ maxlength: i = 0,
4976
5798
  alwaysChange: r = !0,
4977
- notEmpty: o = !1
5799
+ notEmpty: a = !1
4978
5800
  }) {
4979
5801
  if (e) {
4980
- if (at(i)) {
4981
- const a = i.indexOf(t), u = [...i];
4982
- return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!s || i.length < s) && u.push(t), u;
5802
+ if (ht(s)) {
5803
+ const o = s.indexOf(t), u = [...s];
5804
+ return o !== -1 ? (!a || u.length > 1) && u.splice(o, 1) : (!i || s.length < i) && u.push(t), u;
4983
5805
  }
4984
- return i === t ? [] : i ? [i, t] : [t];
5806
+ return s === t ? [] : s ? [s, t] : [t];
4985
5807
  }
4986
- return r || i !== t ? t : i;
5808
+ return r || s !== t ? t : s;
4987
5809
  }
4988
- function gi(i, t, e) {
4989
- if (f(i) && f(t)) {
5810
+ function Ds(s, t, e) {
5811
+ if (f(s) && f(t)) {
4990
5812
  if (e) {
4991
- let s = {}, r = !1;
4992
- return g(i, (o, a) => {
4993
- !r && (e === a || e === o) ? (r = !0, s = V(s, t)) : r ? s = V(s, { [a]: o }) : s[a] = f(o) ? U(o) : o;
4994
- }), r ? s : V(i, t);
5813
+ let i = {}, r = !1;
5814
+ return d(s, (a, o) => {
5815
+ !r && (e === o || e === a) ? (r = !0, i = J(i, t)) : r ? i = J(i, { [o]: a }) : i[o] = f(a) ? V(a) : a;
5816
+ }), r ? i : J(s, t);
4995
5817
  }
4996
5818
  if (f(t))
4997
- return V(i, t);
5819
+ return J(s, t);
4998
5820
  }
4999
- return U(i);
5000
- }
5001
- function Ce(i) {
5002
- return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...t) => `${String(t[1]).toUpperCase()}`).replace(/^([A-Z])/, (t) => `${t.toLowerCase()}`);
5821
+ return V(s);
5003
5822
  }
5004
- function fi(i) {
5005
- return Ce(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
5823
+ function ks(s) {
5824
+ return Ht(s).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
5006
5825
  }
5007
- function mi(i) {
5008
- return i.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());
5826
+ function Ns(s) {
5827
+ 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());
5009
5828
  }
5010
- function yi(i, t, e, s) {
5011
- const r = k(i), o = k(t);
5012
- return t && o < r ? `${Bt(o, e, s)}+` : Bt(r, e, s);
5829
+ function Es(s, t, e, i) {
5830
+ const r = k(s), a = k(t);
5831
+ return t && a < r ? `${Rt(a, e, i)}+` : Rt(r, e, i);
5013
5832
  }
5014
- const Bt = (i, t, e) => t ? new M(e).number(i) : i;
5015
- function ke(i, t) {
5016
- return 1 / i * t;
5833
+ const Rt = (s, t, e) => t ? new N(e).number(s) : s;
5834
+ function We(s, t) {
5835
+ return 1 / s * t;
5017
5836
  }
5018
- function $i(i, t) {
5019
- return ke(i, t) * 100;
5837
+ function As(s, t) {
5838
+ return We(s, t) * 100;
5020
5839
  }
5021
- function pi(i) {
5840
+ function Is(s) {
5022
5841
  let t = "";
5023
- for (const e of i)
5842
+ for (const e of s)
5024
5843
  t += String.fromCharCode(e);
5025
- return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(i).toString("base64") : "";
5844
+ return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(s).toString("base64") : "";
5026
5845
  }
5027
- async function bi(i) {
5846
+ async function Bs(s) {
5028
5847
  if (l())
5029
5848
  try {
5030
- await navigator.clipboard.writeText(i);
5849
+ await navigator.clipboard.writeText(s);
5031
5850
  } catch (t) {
5032
- document == null || document.execCommand(i);
5851
+ document == null || document.execCommand(s);
5033
5852
  }
5034
5853
  }
5035
5854
  export {
5036
- H as Api,
5037
- Vt as ApiDefault,
5038
- Zt as ApiHeaders,
5039
- L as ApiMethodItem,
5040
- qt as ApiPreparation,
5041
- Yt as ApiResponse,
5042
- $t as ApiStatus,
5043
- Ee as BroadcastMessage,
5044
- Qt as Cache,
5045
- Mt as CacheItem,
5046
- bt as CacheStatic,
5047
- wt as Cookie,
5048
- xt as CookieBlock,
5049
- T as DataStorage,
5050
- ut as Datetime,
5051
- mt as EventItem,
5855
+ K as Api,
5856
+ Qt as ApiDefault,
5857
+ Mt as ApiHeaders,
5858
+ C as ApiMethodItem,
5859
+ Ot as ApiPreparation,
5860
+ _t as ApiResponse,
5861
+ vt as ApiStatus,
5862
+ He as BroadcastMessage,
5863
+ te as Cache,
5864
+ Gt as CacheItem,
5865
+ Lt as CacheStatic,
5866
+ Ct as Cookie,
5867
+ jt as CookieBlock,
5868
+ et as DataStorage,
5869
+ gt as Datetime,
5870
+ bt as EventItem,
5871
+ ze as Formatters,
5872
+ F as FormattersType,
5052
5873
  n as GEO_FLAG_ICON_NAME,
5053
- p as Geo,
5054
- vt as GeoFlag,
5055
- M as GeoIntl,
5056
- St as GeoPhone,
5057
- Be as Global,
5058
- Dt as Hash,
5059
- kt as Icons,
5060
- I as Loading,
5061
- Ie as Meta,
5062
- ht as MetaManager,
5063
- ae as MetaOg,
5064
- re as MetaOpenGraphAge,
5065
- ie as MetaOpenGraphAvailability,
5066
- se as MetaOpenGraphCondition,
5067
- ne as MetaOpenGraphGender,
5068
- y as MetaOpenGraphTag,
5069
- ee as MetaOpenGraphType,
5070
- te as MetaRobots,
5071
- D as MetaTag,
5072
- ce as MetaTwitter,
5073
- oe as MetaTwitterCard,
5074
- $ as MetaTwitterTag,
5075
- ot as ScrollbarWidth,
5076
- le as TRANSLATE_GLOBAL_PREFIX,
5077
- Nt as Translate,
5078
- de as anyToString,
5079
- he as applyTemplate,
5080
- ge as arrFill,
5081
- Fe as blobToBase64,
5082
- U as copyObject,
5083
- C as copyObjectLite,
5084
- _ as createElement,
5085
- Re as domQuerySelector,
5086
- xe as domQuerySelectorAll,
5087
- Gt as encodeAttribute,
5088
- Pe as eventStopPropagation,
5874
+ b as Geo,
5875
+ Dt as GeoFlag,
5876
+ N as GeoIntl,
5877
+ kt as GeoPhone,
5878
+ Ze as Global,
5879
+ Nt as Hash,
5880
+ It as Icons,
5881
+ R as Loading,
5882
+ Ve as Meta,
5883
+ dt as MetaManager,
5884
+ fe as MetaOg,
5885
+ le as MetaOpenGraphAge,
5886
+ ue as MetaOpenGraphAvailability,
5887
+ he as MetaOpenGraphCondition,
5888
+ ge as MetaOpenGraphGender,
5889
+ $ as MetaOpenGraphTag,
5890
+ ce as MetaOpenGraphType,
5891
+ oe as MetaRobots,
5892
+ L as MetaTag,
5893
+ me as MetaTwitter,
5894
+ de as MetaTwitterCard,
5895
+ p as MetaTwitterTag,
5896
+ ut as ScrollbarWidth,
5897
+ Ke as SearchList,
5898
+ pe as SearchListData,
5899
+ be as SearchListItem,
5900
+ Se as SearchListMatcher,
5901
+ Le as SearchListOptions,
5902
+ ke as TRANSLATE_GLOBAL_PREFIX,
5903
+ Bt as Translate,
5904
+ $e as addTagHighlightMatch,
5905
+ T as anyToString,
5906
+ De as applyTemplate,
5907
+ Ne as arrFill,
5908
+ Ye as blobToBase64,
5909
+ V as copyObject,
5910
+ D as copyObjectLite,
5911
+ G as createElement,
5912
+ qe as domQuerySelector,
5913
+ Je as domQuerySelectorAll,
5914
+ ae as encodeAttribute,
5915
+ ft as escapeExp,
5916
+ Me as eventStopPropagation,
5089
5917
  B as executeFunction,
5090
- Kt as executePromise,
5091
- g as forEach,
5092
- fe as frame,
5093
- We as getAttributes,
5094
- je as getClipboardData,
5095
- _t as getColumn,
5096
- Ue as getCurrentDate,
5097
- N as getElement,
5098
- He as getElementId,
5099
- me as getElementImage,
5100
- Ot as getElementItem,
5101
- ft as getElementOrWindow,
5102
- ye as getExp,
5103
- pe as getItemByPath,
5104
- ze as getKey,
5105
- Pt as getLengthOfAllArray,
5106
- Ze as getMaxLengthAllArray,
5107
- Ve as getMinLengthAllArray,
5108
- Ke as getMouseClient,
5109
- be as getMouseClientX,
5110
- we as getMouseClientY,
5111
- Ye as getObjectByKeys,
5112
- qe as getObjectNoUndefined,
5113
- Je as getObjectOrNone,
5114
- Me as getRandomText,
5115
- It as getRequestString,
5116
- Qe as getStepPercent,
5117
- Xe as getStepValue,
5118
- _e as goScroll,
5119
- Oe as goScrollSmooth,
5120
- Te as goScrollTo,
5121
- Ge as inArray,
5122
- ti as initScrollbarOffset,
5123
- ei as intersectKey,
5124
- at as isArray,
5125
- ii as isDifferent,
5126
- nt as isDomData,
5918
+ Xt as executePromise,
5919
+ d as forEach,
5920
+ Ee as frame,
5921
+ Qe as getAttributes,
5922
+ Xe as getClipboardData,
5923
+ se as getColumn,
5924
+ _e as getCurrentDate,
5925
+ E as getElement,
5926
+ Oe as getElementId,
5927
+ Ae as getElementImage,
5928
+ re as getElementItem,
5929
+ pt as getElementOrWindow,
5930
+ we as getExactSearchExp,
5931
+ zt as getExp,
5932
+ x as getItemByPath,
5933
+ Te as getKey,
5934
+ Zt as getLengthOfAllArray,
5935
+ Ge as getMaxLengthAllArray,
5936
+ ts as getMinLengthAllArray,
5937
+ es as getMouseClient,
5938
+ Ie as getMouseClientX,
5939
+ Be as getMouseClientY,
5940
+ ss as getObjectByKeys,
5941
+ is as getObjectNoUndefined,
5942
+ rs as getObjectOrNone,
5943
+ ns as getRandomText,
5944
+ Pt as getRequestString,
5945
+ ve as getSearchExp,
5946
+ ye as getSeparatingSearchExp,
5947
+ as as getStepPercent,
5948
+ os as getStepValue,
5949
+ cs as goScroll,
5950
+ us as goScrollSmooth,
5951
+ hs as goScrollTo,
5952
+ ls as inArray,
5953
+ gs as initScrollbarOffset,
5954
+ ds as intersectKey,
5955
+ ht as isArray,
5956
+ fs as isDifferent,
5957
+ ct as isDomData,
5127
5958
  l as isDomRuntime,
5128
- si as isEnter,
5129
- v as isFilled,
5130
- ri as isFloat,
5131
- ct as isFunction,
5132
- zt as isInDom,
5133
- Se as isInput,
5134
- ni as isIntegerBetween,
5135
- J as isNull,
5136
- dt as isNumber,
5959
+ ms as isEnter,
5960
+ m as isFilled,
5961
+ ys as isFloat,
5962
+ lt as isFunction,
5963
+ Jt as isInDom,
5964
+ xe as isInput,
5965
+ $s as isIntegerBetween,
5966
+ X as isNull,
5967
+ yt as isNumber,
5137
5968
  f as isObject,
5138
5969
  A as isObjectNotArray,
5139
- rt as isSelected,
5140
- oi as isSelectedByList,
5141
- x as isString,
5142
- Ft as isWindow,
5143
- q as random,
5144
- ai as removeCommonPrefix,
5145
- ci as replaceComponentName,
5146
- V as replaceRecursive,
5147
- ui as replaceTemplate,
5148
- hi as resizeImageByMax,
5149
- li as secondToTime,
5150
- Tt as setElementItem,
5151
- di as setValues,
5152
- gi as splice,
5153
- ve as strFill,
5154
- $e as strSplit,
5155
- z as toArray,
5156
- Ce as toCamelCase,
5157
- fi as toCamelCaseFirst,
5158
- F as toDate,
5159
- mi as toKebabCase,
5970
+ ot as isSelected,
5971
+ ps as isSelectedByList,
5972
+ U as isString,
5973
+ Wt as isWindow,
5974
+ Q as random,
5975
+ bs as removeCommonPrefix,
5976
+ ws as replaceComponentName,
5977
+ J as replaceRecursive,
5978
+ vs as replaceTemplate,
5979
+ Ss as resizeImageByMax,
5980
+ Ls as secondToTime,
5981
+ ne as setElementItem,
5982
+ Cs as setValues,
5983
+ Ds as splice,
5984
+ Fe as strFill,
5985
+ ie as strSplit,
5986
+ Y as toArray,
5987
+ Ht as toCamelCase,
5988
+ ks as toCamelCaseFirst,
5989
+ P as toDate,
5990
+ Ns as toKebabCase,
5160
5991
  k as toNumber,
5161
- yi as toNumberByMax,
5162
- ke as toPercent,
5163
- $i as toPercentBy100,
5164
- Rt as transformation,
5165
- pi as uint8ArrayToBase64,
5166
- De as uniqueArray,
5167
- bi as writeClipboardData
5992
+ Es as toNumberByMax,
5993
+ We as toPercent,
5994
+ As as toPercentBy100,
5995
+ Ut as transformation,
5996
+ Is as uint8ArrayToBase64,
5997
+ Re as uniqueArray,
5998
+ Bs as writeClipboardData
5168
5999
  };