@dxtmisha/functional 1.2.0 → 1.4.2

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.
Files changed (124) hide show
  1. package/dist/ScrollbarWidth-D6yhyHBp.js +2184 -0
  2. package/dist/classes/ref/DatetimeRef.d.ts +1 -3
  3. package/dist/classes/ref/EventRef.d.ts +1 -2
  4. package/dist/classes/ref/GeoFlagRef.d.ts +1 -2
  5. package/dist/classes/ref/GeoIntlRef.d.ts +1 -2
  6. package/dist/classes/ref/GeoRef.d.ts +1 -1
  7. package/dist/composables/ref/__tests__/useMeta.test.d.ts +4 -0
  8. package/dist/composables/ref/useApiRef.d.ts +2 -2
  9. package/dist/composables/ref/useCookieRef.d.ts +1 -1
  10. package/dist/composables/ref/useMeta.d.ts +21 -0
  11. package/dist/composables/ref/useTranslateRef.d.ts +1 -1
  12. package/dist/flags.js +1 -1
  13. package/dist/functions/basic.d.ts +1 -0
  14. package/dist/functions/computedByLanguage.d.ts +15 -0
  15. package/dist/functions/ref/getBindRef.d.ts +1 -1
  16. package/dist/functions/ref/render.d.ts +1 -1
  17. package/dist/functions/render/getBind.d.ts +2 -2
  18. package/dist/functions/render/getClassName.d.ts +1 -1
  19. package/dist/functions/render/getIndexForRender.d.ts +1 -1
  20. package/dist/functions/toBind.d.ts +1 -1
  21. package/dist/functions/toBinds.d.ts +1 -1
  22. package/dist/library.d.ts +3 -97
  23. package/dist/library.js +1906 -1765
  24. package/dist/types/constructorTypes.d.ts +3 -3
  25. package/dist/types/listTypes.d.ts +1 -1
  26. package/package.json +6 -5
  27. package/dist/Icons-Bp74_rUm.js +0 -1301
  28. package/dist/classes/Api.d.ts +0 -305
  29. package/dist/classes/BroadcastMessage.d.ts +0 -36
  30. package/dist/classes/Cache.d.ts +0 -34
  31. package/dist/classes/CacheItem.d.ts +0 -55
  32. package/dist/classes/CacheStatic.d.ts +0 -17
  33. package/dist/classes/Cookie.d.ts +0 -58
  34. package/dist/classes/CookieBlock.d.ts +0 -22
  35. package/dist/classes/DataStorage.d.ts +0 -82
  36. package/dist/classes/Datetime.d.ts +0 -482
  37. package/dist/classes/EventItem.d.ts +0 -160
  38. package/dist/classes/Geo.d.ts +0 -168
  39. package/dist/classes/GeoFlag.d.ts +0 -79
  40. package/dist/classes/GeoIntl.d.ts +0 -262
  41. package/dist/classes/GeoPhone.d.ts +0 -107
  42. package/dist/classes/Global.d.ts +0 -21
  43. package/dist/classes/Hash.d.ts +0 -59
  44. package/dist/classes/Icons.d.ts +0 -90
  45. package/dist/classes/Loading.d.ts +0 -49
  46. package/dist/classes/ScrollbarWidth.d.ts +0 -33
  47. package/dist/classes/Translate.d.ts +0 -116
  48. package/dist/functions/anyToString.d.ts +0 -7
  49. package/dist/functions/applyTemplate.d.ts +0 -10
  50. package/dist/functions/arrFill.d.ts +0 -8
  51. package/dist/functions/copyObject.d.ts +0 -8
  52. package/dist/functions/createElement.d.ts +0 -13
  53. package/dist/functions/domQuerySelector.d.ts +0 -7
  54. package/dist/functions/domQuerySelectorAll.d.ts +0 -7
  55. package/dist/functions/eventStopPropagation.d.ts +0 -7
  56. package/dist/functions/executeFunction.d.ts +0 -8
  57. package/dist/functions/executePromise.d.ts +0 -7
  58. package/dist/functions/forEach.d.ts +0 -11
  59. package/dist/functions/frame.d.ts +0 -16
  60. package/dist/functions/getAttributes.d.ts +0 -8
  61. package/dist/functions/getClipboardData.d.ts +0 -11
  62. package/dist/functions/getColumn.d.ts +0 -10
  63. package/dist/functions/getElement.d.ts +0 -8
  64. package/dist/functions/getElementId.d.ts +0 -9
  65. package/dist/functions/getElementItem.d.ts +0 -11
  66. package/dist/functions/getElementOrWindow.d.ts +0 -8
  67. package/dist/functions/getExp.d.ts +0 -13
  68. package/dist/functions/getItemByPath.d.ts +0 -8
  69. package/dist/functions/getKey.d.ts +0 -7
  70. package/dist/functions/getLengthOfAllArray.d.ts +0 -8
  71. package/dist/functions/getMaxLengthAllArray.d.ts +0 -8
  72. package/dist/functions/getMinLengthAllArray.d.ts +0 -8
  73. package/dist/functions/getMouseClient.d.ts +0 -8
  74. package/dist/functions/getMouseClientX.d.ts +0 -7
  75. package/dist/functions/getMouseClientY.d.ts +0 -7
  76. package/dist/functions/getObjectByKeys.d.ts +0 -8
  77. package/dist/functions/getObjectNoUndefined.d.ts +0 -8
  78. package/dist/functions/getObjectOrNone.d.ts +0 -7
  79. package/dist/functions/getRandomText.d.ts +0 -11
  80. package/dist/functions/getRequestString.d.ts +0 -9
  81. package/dist/functions/getStepPercent.d.ts +0 -8
  82. package/dist/functions/getStepValue.d.ts +0 -8
  83. package/dist/functions/goScroll.d.ts +0 -10
  84. package/dist/functions/inArray.d.ts +0 -8
  85. package/dist/functions/initScrollbarOffset.d.ts +0 -6
  86. package/dist/functions/intersectKey.d.ts +0 -8
  87. package/dist/functions/isArray.d.ts +0 -7
  88. package/dist/functions/isDifferent.d.ts +0 -9
  89. package/dist/functions/isDomRuntime.d.ts +0 -10
  90. package/dist/functions/isFilled.d.ts +0 -9
  91. package/dist/functions/isFloat.d.ts +0 -7
  92. package/dist/functions/isFunction.d.ts +0 -8
  93. package/dist/functions/isInDom.d.ts +0 -8
  94. package/dist/functions/isIntegerBetween.d.ts +0 -8
  95. package/dist/functions/isNull.d.ts +0 -8
  96. package/dist/functions/isNumber.d.ts +0 -7
  97. package/dist/functions/isObject.d.ts +0 -7
  98. package/dist/functions/isObjectNotArray.d.ts +0 -7
  99. package/dist/functions/isSelected.d.ts +0 -8
  100. package/dist/functions/isSelectedByList.d.ts +0 -8
  101. package/dist/functions/isString.d.ts +0 -7
  102. package/dist/functions/isWindow.d.ts +0 -7
  103. package/dist/functions/random.d.ts +0 -8
  104. package/dist/functions/replaceRecursive.d.ts +0 -10
  105. package/dist/functions/replaceTemplate.d.ts +0 -9
  106. package/dist/functions/secondToTime.d.ts +0 -7
  107. package/dist/functions/setElementItem.d.ts +0 -10
  108. package/dist/functions/setValues.d.ts +0 -17
  109. package/dist/functions/splice.d.ts +0 -12
  110. package/dist/functions/strFill.d.ts +0 -8
  111. package/dist/functions/toArray.d.ts +0 -17
  112. package/dist/functions/toCamelCase.d.ts +0 -7
  113. package/dist/functions/toCamelCaseFirst.d.ts +0 -7
  114. package/dist/functions/toDate.d.ts +0 -7
  115. package/dist/functions/toKebabCase.d.ts +0 -15
  116. package/dist/functions/toNumber.d.ts +0 -8
  117. package/dist/functions/toNumberByMax.d.ts +0 -9
  118. package/dist/functions/toPercent.d.ts +0 -8
  119. package/dist/functions/toPercentBy100.d.ts +0 -8
  120. package/dist/functions/transformation.d.ts +0 -21
  121. package/dist/functions/uniqueArray.d.ts +0 -7
  122. package/dist/functions/writeClipboardData.d.ts +0 -7
  123. package/dist/types/basicTypes.d.ts +0 -126
  124. package/dist/types/geoTypes.d.ts +0 -86
package/dist/library.js CHANGED
@@ -1,33 +1,34 @@
1
- var Bt = Object.defineProperty;
2
- var Tt = (i, t, e) => t in i ? Bt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var k = (i, t, e) => Tt(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { D as Y, i as d, r as O, e as A, a as W, b as Ft, G as p, f, t as b, c as ot, d as T, g as Et, h as K, j as m, k as L, A as H, l as g, E as xt, m as F, L as ft, n as E } from "./Icons-Bp74_rUm.js";
5
- import { o as Ns, I as Is, p as Bs, q as Ts, s as Fs, u as Es, v as xs, w as Rs } from "./Icons-Bp74_rUm.js";
6
- import { ref as $, watch as y, h as Rt, computed as c, toRefs as Ot, useAttrs as Wt, useSlots as Pt, isRef as ct, triggerRef as jt, shallowRef as P, onUnmounted as it, inject as Ht, provide as Gt, watchEffect as zt } from "vue";
7
- function Ut(i, t, e) {
8
- if (i in _)
9
- return _[i];
10
- const s = new Y(i), n = $(s.get(t, e));
11
- return y(n, (a) => s.set(a)), d() && window.addEventListener("storage", () => {
12
- s.update(), n.value = s.get();
13
- }), _[i] = n, n;
14
- }
15
- const _ = {};
16
- class Zt {
1
+ var It = Object.defineProperty;
2
+ var Nt = (i, t, e) => t in i ? It(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var u = (i, t, e) => Nt(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { i as y, D as ut, r as z, a as At, G as w, f as $, t as N, b as ct, c as Bt, d as _, e as W, g as F, A as V, h as S, j as vt, S as bt, k as j, l as U, m as lt, E as Ft, C as xt, H as O, L as mt } from "./ScrollbarWidth-D6yhyHBp.js";
5
+ import { n as Pi, o as Hi, R as Ri, p as Wi, q as ji, s as Ui, u as zi, v as _i, w as Ki, x as Zi, y as Vi, I as Yi, z as qi, B as Ji, F as Qi, J as Xi, K as Mi, M as Oi, N as Ti, O as Gi, P as ts, Q as es } from "./ScrollbarWidth-D6yhyHBp.js";
6
+ import { isRef as Q, h as Et, computed as l, toRefs as Pt, useAttrs as Ht, useSlots as Rt, ref as p, watch as f, triggerRef as Wt, shallowRef as Z, onUnmounted as rt, inject as jt, provide as Ut, watchEffect as zt } from "vue";
7
+ class _t {
17
8
  /**
18
9
  * Constructor
19
10
  * @param name channel name/ название канала
20
11
  * @param callback callback on message received/ колбэк на получение сообщения
21
12
  */
22
13
  constructor(t, e) {
23
- if (this.callback = e, d())
14
+ u(this, "channel");
15
+ /**
16
+ * Update state on message received.
17
+ *
18
+ * Обновление состояния при получении сообщения.
19
+ * @param event message event/ событие сообщения
20
+ */
21
+ u(this, "update", (t) => {
22
+ var e;
23
+ return (e = this.callback) == null || e.call(this, t), this;
24
+ });
25
+ if (this.callback = e, y())
24
26
  try {
25
- this.channel = new BroadcastChannel(`${Yt()}__${t}`), this.channel.onmessage = this.update;
27
+ this.channel = new BroadcastChannel(`${Kt()}__${t}`), this.channel.onmessage = this.update;
26
28
  } catch (s) {
27
29
  console.error(`BroadcastMessage ${t}:`, s);
28
30
  }
29
31
  }
30
- channel;
31
32
  /**
32
33
  * Send a message to the channel.
33
34
  *
@@ -35,7 +36,8 @@ class Zt {
35
36
  * @param message message to send/ сообщение для отправки
36
37
  */
37
38
  post(t) {
38
- return this.channel?.postMessage(t), this;
39
+ var e;
40
+ return (e = this.channel) == null || e.postMessage(t), this;
39
41
  }
40
42
  /**
41
43
  * Set the callback function to be called when a message is received.
@@ -46,296 +48,47 @@ class Zt {
46
48
  setCallback(t) {
47
49
  return this.callback = t, this;
48
50
  }
49
- /**
50
- * Update state on message received.
51
- *
52
- * Обновление состояния при получении сообщения.
53
- * @param event message event/ событие сообщения
54
- */
55
- update = (t) => (this.callback?.(t), this);
56
- }
57
- const Yt = () => Ut(
58
- "__broadcast-name",
59
- () => `name_${O(1e6, 9999999)}`
60
- );
61
- class Kt {
62
- /**
63
- * Constructor
64
- * @param callback function for the cache/ функция для кэша
65
- */
66
- constructor(t) {
67
- this.callback = t;
68
- }
69
- cache;
70
- cacheOld;
71
- comparisons = [];
72
- /**
73
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
74
- *
75
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
76
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
77
- */
78
- getCache(t) {
79
- return this.isUpdate(t) && (this.cacheOld = this.cache, this.setCache()), this.cache;
80
- }
81
- /**
82
- * Getting the previous value of the cache.
83
- *
84
- * Получение предыдущего значения кэша.
85
- */
86
- getCacheOld() {
87
- return this.cacheOld;
88
- }
89
- /**
90
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
91
- *
92
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша (Async).
93
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
94
- */
95
- async getCacheAsync(t) {
96
- return this.isUpdate(t) && (this.cacheOld = this.cache, await this.setCacheAsync()), this.cache;
97
- }
98
- /**
99
- * Overwrites or adds new values for the cache.
100
- *
101
- * Перезаписывает или добавляет новые значения для кэша.
102
- */
103
- setCache() {
104
- this.cache = this.callback();
105
- }
106
- /**
107
- * Overwrites or adds new values for the cache (Async).
108
- *
109
- * Перезаписывает или добавляет новые значения для кэша (Async).
110
- */
111
- async setCacheAsync() {
112
- this.cache = await this.callback();
113
- }
114
- /**
115
- * Checking additional data.
116
- *
117
- * Проверка дополнительных данных.
118
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
119
- */
120
- isUpdate(t) {
121
- return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
122
- }
123
- }
124
- class Vt {
125
- cache = {};
126
- /**
127
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
128
- *
129
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
130
- * @param name cache name/ название кэша
131
- * @param callback function for the cache/ функция для кэша
132
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
133
- */
134
- get(t, e, s) {
135
- return this.getCacheItem(t, e).getCache(s ?? []);
136
- }
137
- /**
138
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
139
- *
140
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша (Async).
141
- * @param name cache name/ название кэша
142
- * @param callback function for the cache/ функция для кэша
143
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
144
- */
145
- async getAsync(t, e, s) {
146
- return await this.getCacheItem(t, e).getCacheAsync(s ?? []);
147
- }
148
- /**
149
- * Returns an instance of the object for working with the cache element.
150
- *
151
- * Возвращает экземпляр объекта для работы с элементом кэша.
152
- * @param name cache name/ название кэша
153
- * @param callback function for the cache/ функция для кэша
154
- */
155
- getCacheItem(t, e) {
156
- return t in this.cache || (this.cache[t] = new Kt(e)), this.cache[t];
157
- }
158
- }
159
- const Z = class Z {
160
- /**
161
- * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
162
- *
163
- * Получение данных для кэша, и если нет кэша, выполняет функцию для сохранения кэша.
164
- * @param name cache name/ название кэша
165
- * @param callback function for the cache/ функция для кэша
166
- * @param comparison additional data for comparison/ дополнительные данные для сравнения
167
- */
168
- static get(t, e, s) {
169
- return this.cache.get(t, e, s);
170
- }
171
- };
172
- k(Z, "cache"), Z.cache = new Vt();
173
- let dt = Z;
174
- function wt(i, t = !1) {
175
- if (typeof i == "string") {
176
- const e = i.trim();
177
- switch (e) {
178
- case "undefined":
179
- return;
180
- case "null":
181
- return null;
182
- case "true":
183
- return !0;
184
- case "false":
185
- return !1;
186
- default:
187
- if (/^[{[]/.exec(e))
188
- try {
189
- return JSON.parse(e);
190
- } catch (s) {
191
- console.error("transformation: JSON error", s);
192
- }
193
- else {
194
- if (/^[0-9]+\.[0-9.]+$/.exec(e))
195
- return parseFloat(e);
196
- if (/^[0-9]+$/.exec(e))
197
- return parseInt(e, 10);
198
- if (t && d() && typeof window?.[e] == "function")
199
- return window[e];
200
- }
201
- }
202
- }
203
- return i;
204
- }
205
- const qt = "cookie-block";
206
- class _t {
207
- static storage = new Y(qt);
208
- /**
209
- * Obtaining status.
210
- *
211
- * Получение статуса.
212
- */
213
- static get() {
214
- return this.storage.get() ?? !1;
215
- }
216
- /**
217
- * Changing status.
218
- *
219
- * Изменение статуса.
220
- * @param value value to be changed/ значение, на которое будет изменен
221
- */
222
- static set(t) {
223
- this.storage.set(t);
224
- }
225
51
  }
226
- const mt = {}, lt = class lt {
227
- constructor(t) {
228
- if (this.name = t, t in J)
229
- return J[t];
230
- this.value = mt?.[t], J[t] = this;
231
- }
232
- value;
233
- options = {};
234
- /**
235
- * Get data or update if none.
236
- *
237
- * Получает данные или обновляет, если их нет.
238
- * @param defaultValue value or function to change data/ значение или функция для изменения данных
239
- * @param options additional parameters/ дополнительные параметры
240
- */
241
- get(t, e) {
242
- return this.value === void 0 && t && this.set(t, e), this.value;
243
- }
244
- /**
245
- * Updates cookie data.
246
- *
247
- * Обновляет данные cookie.
248
- * @param value value or function to change data/ значение или функция для изменения данных
249
- * @param options additional parameters/ дополнительные параметры
250
- */
251
- set(t, e) {
252
- this.value = A(t), Object.assign(this.options, e), this.update();
253
- }
254
- /**
255
- * Delete cookie data.
256
- *
257
- * Удаление данных из cookie.
258
- */
259
- remove() {
260
- this.set("");
261
- }
262
- /**
263
- * Returns cache time.
264
- *
265
- * Возвращает время кэширования.
266
- */
267
- getAge() {
268
- return this.options?.age ?? 10080 * 60;
269
- }
270
- /**
271
- * Update cookie data.
272
- *
273
- * Обновление данных cookie.
274
- */
275
- update() {
276
- if (d() && !_t.get()) {
277
- const t = String(this.value ?? "");
278
- document.cookie = [
279
- `${encodeURIComponent(this.name)}=${encodeURIComponent(t)}`,
280
- `max-age=${t === "" ? "-1" : this.getAge()}`,
281
- `SameSite=${this.options?.sameSite ?? "strict"}`,
282
- ...this.options?.arguments ?? []
283
- ].join("; ");
284
- }
285
- }
286
- /**
287
- * Update data from cookies.
288
- *
289
- * Обновляет данные из cookies.
290
- */
291
- static updateData() {
292
- for (const t of document.cookie.split(";")) {
293
- const [e, s] = t.trim().split("=");
294
- e && W(s) && (mt[e] = wt(s));
295
- }
296
- }
297
- };
298
- d() && lt.updateData();
299
- let rt = lt;
300
- const J = {};
301
- function w(i) {
52
+ const Kt = () => new ut("__broadcast-name").get(() => `name_${z(1e6, 9999999)}`);
53
+ function A(i) {
54
+ var n, o, a, c, h, d, g, D;
302
55
  if (i instanceof Date)
303
56
  return i;
304
- if (Ft(i))
57
+ if (At(i))
305
58
  return /* @__PURE__ */ new Date();
306
59
  if (typeof i == "number")
307
60
  return new Date(i);
308
- let t = i, e = p.getTimezoneFormat();
309
- i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (n, a, o) => (t = a, e = o, n));
310
- const s = (/^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) ?? (/^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) ?? (/^\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")) ?? (/^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) ?? (/^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) ?? (/^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) ?? (/^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) ?? (/^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) ?? t.replace(" ", "T");
61
+ let t = i, e = w.getTimezoneFormat();
62
+ i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (H, X, k) => (t = X, e = k, H));
63
+ const s = (D = (g = (d = (h = (c = (a = (o = (n = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? n : /^\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 ? c : /^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) != null ? h : /^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) != null ? d : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? g : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? D : t.replace(" ", "T");
311
64
  return /* @__PURE__ */ new Date(`${s}${e}`);
312
65
  }
313
66
  function nt(i, t) {
314
- return f(i, (e) => e?.[t]);
67
+ return $(i, (e) => e == null ? void 0 : e[t]);
315
68
  }
316
- class I {
69
+ class P {
317
70
  /**
318
- * Returns an instance of the class according to the specified country code.
319
- *
320
- * Возвращает экземпляр класса по указанному коду страны.
71
+ * Constructor
321
72
  * @param code country code, full form language-country or one of them/
322
73
  * код страны, полный вид язык-страна или один из них
323
74
  */
324
- static getInstance(t = p.getLocation()) {
325
- return new I(t);
75
+ constructor(t = w.getLocation()) {
76
+ u(this, "geo");
77
+ this.geo = w.find(t);
78
+ const e = this.getLocation();
79
+ if (e in T)
80
+ return T[e];
81
+ T[e] = this;
326
82
  }
327
- geo;
328
83
  /**
329
- * Constructor
84
+ * Returns an instance of the class according to the specified country code.
85
+ *
86
+ * Возвращает экземпляр класса по указанному коду страны.
330
87
  * @param code country code, full form language-country or one of them/
331
88
  * код страны, полный вид язык-страна или один из них
332
89
  */
333
- constructor(t = p.getLocation()) {
334
- this.geo = p.find(t);
335
- const e = this.getLocation();
336
- if (e in Q)
337
- return Q[e];
338
- Q[e] = this;
90
+ static getInstance(t = w.getLocation()) {
91
+ return new P(t);
339
92
  }
340
93
  /**
341
94
  * Returns country code and language.
@@ -362,17 +115,18 @@ class I {
362
115
  * объект с некоторыми или всеми из следующих свойств
363
116
  */
364
117
  display(t, e) {
118
+ var o;
365
119
  let s = { type: "language" }, n;
366
120
  e && (typeof e == "string" ? s.type = e : s = {
367
121
  ...s,
368
122
  ...e
369
123
  });
370
124
  try {
371
- d() && (t ? n = new Intl.DisplayNames(this.getLocation(), s).of(t) : s.type === "language" ? n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.language) : s.type === "region" && (n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.country)));
125
+ y() && (t ? n = new Intl.DisplayNames(this.getLocation(), s).of(t) : s.type === "language" ? n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.language) : s.type === "region" && (n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.country)));
372
126
  } catch (a) {
373
127
  console.error("display: ", a);
374
128
  }
375
- return n ?? t ?? "";
129
+ return (o = n != null ? n : t) != null ? o : "";
376
130
  }
377
131
  /**
378
132
  * Get display names of language.
@@ -386,7 +140,7 @@ class I {
386
140
  type: "language",
387
141
  style: e
388
142
  };
389
- return this.display(p.getByCode(t).language, s);
143
+ return this.display(w.getByCode(t).language, s);
390
144
  }
391
145
  /**
392
146
  * Get display names of region.
@@ -412,23 +166,24 @@ class I {
412
166
  * @param short shorten the names/ сократить названия
413
167
  */
414
168
  fullName(t, e, s, n) {
415
- const a = this.geo?.nameFormat ?? "fl";
416
- let o;
417
- switch (a) {
169
+ var c, h;
170
+ const o = (h = (c = this.geo) == null ? void 0 : c.nameFormat) != null ? h : "fl";
171
+ let a;
172
+ switch (o) {
418
173
  case "fsl":
419
- o = `${e}${s ? ` ${s}` : ""} ${t}`;
174
+ a = `${e}${s ? ` ${s}` : ""} ${t}`;
420
175
  break;
421
176
  case "lf":
422
- o = `${t} ${e}`;
177
+ a = `${t} ${e}`;
423
178
  break;
424
179
  case "lsf":
425
- o = `${t}${s ? ` ${s}` : ""} ${e}`;
180
+ a = `${t}${s ? ` ${s}` : ""} ${e}`;
426
181
  break;
427
182
  default:
428
- o = `${e} ${t}`;
183
+ a = `${e} ${t}`;
429
184
  break;
430
185
  }
431
- return n ? o.replace(/ (.)[^ ]+/ig, " $1.") : o;
186
+ return n ? a.replace(/ (.)[^ ]+/ig, " $1.") : a;
432
187
  }
433
188
  /**
434
189
  * In basic use without specifying a locale, a formatted string.
@@ -439,7 +194,8 @@ class I {
439
194
  * или всеми свойствами
440
195
  */
441
196
  number(t, e) {
442
- return this.numberObject(e)?.format?.(b(t)) || t.toString();
197
+ var s, n;
198
+ return ((n = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : n.call(s, N(t))) || t.toString();
443
199
  }
444
200
  /**
445
201
  * Decimal point symbol.
@@ -447,7 +203,8 @@ class I {
447
203
  * Символ десятичной точки.
448
204
  */
449
205
  decimal() {
450
- return this.numberObject()?.formatToParts?.(1.2)?.find?.((t) => t.type === "decimal")?.value || ".";
206
+ var t, e, s, n, o;
207
+ return ((o = (n = (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 : n.call(s, (a) => a.type === "decimal")) == null ? void 0 : o.value) || ".";
451
208
  }
452
209
  /**
453
210
  * Currency formatting.
@@ -463,18 +220,18 @@ class I {
463
220
  style: "currency",
464
221
  currencyDisplay: "symbol",
465
222
  ...typeof e == "string" ? { currency: e } : e || {}
466
- }, a = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...o) => (n.currency = String(o[2]).toUpperCase(), String(o[1])));
223
+ }, o = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...a) => (n.currency = String(a[2]).toUpperCase(), String(a[1])));
467
224
  if (s) {
468
- const o = this.numberObject(n);
469
- return o ? nt(
470
- o.formatToParts(b(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
225
+ const a = this.numberObject(n);
226
+ return a ? nt(
227
+ a.formatToParts(N(t)).filter((c) => ["literal", "currency"].indexOf(c.type) === -1),
471
228
  "value"
472
229
  ).join("") : t.toString();
473
230
  } else return "currency" in n ? this.number(
474
- typeof t == "number" ? t : a,
231
+ typeof t == "number" ? t : o,
475
232
  n
476
233
  ) : this.number(
477
- typeof t == "number" ? t : a,
234
+ typeof t == "number" ? t : o,
478
235
  {
479
236
  ...n,
480
237
  style: "decimal"
@@ -491,11 +248,12 @@ class I {
491
248
  * как отобразить валюту в формате валюты
492
249
  */
493
250
  currencySymbol(t, e = "symbol") {
494
- return this.numberObject({
251
+ var s, n, o, a, c;
252
+ return ((c = (a = (o = (n = (s = this.numberObject({
495
253
  style: "currency",
496
254
  currencyDisplay: e,
497
255
  currency: t
498
- })?.formatToParts?.(100)?.find?.((s) => s.type === "currency")?.value || t;
256
+ })) == null ? void 0 : s.formatToParts) == null ? void 0 : n.call(s, 100)) == null ? void 0 : o.find) == null ? void 0 : a.call(o, (h) => h.type === "currency")) == null ? void 0 : c.value) || t;
499
257
  }
500
258
  /**
501
259
  * Unit formatting.
@@ -510,7 +268,7 @@ class I {
510
268
  const s = {
511
269
  style: "unit",
512
270
  ...typeof e == "string" ? { unit: e } : e || {}
513
- }, n = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...a) => (s.unit = String(a[2]).toLowerCase(), String(a[1])));
271
+ }, n = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...o) => (s.unit = String(o[2]).toLowerCase(), String(o[1])));
514
272
  return this.number(n, s);
515
273
  }
516
274
  /**
@@ -520,8 +278,8 @@ class I {
520
278
  * в форматировании блока
521
279
  */
522
280
  sizeFile(t, e = "byte") {
523
- const s = b(t);
524
- if (s > 1024 && ot(e))
281
+ const s = N(t);
282
+ if (s > 1024 && ct(e))
525
283
  switch (e) {
526
284
  case "byte":
527
285
  return this.sizeFile(s / 1024, "kilobyte");
@@ -558,7 +316,7 @@ class I {
558
316
  * объект с некоторыми или всеми свойствами
559
317
  */
560
318
  percentBy100(t, e) {
561
- return this.percent(b(t) / 100, e);
319
+ return this.percent(N(t) / 100, e);
562
320
  }
563
321
  /**
564
322
  * Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
@@ -569,38 +327,39 @@ class I {
569
327
  * @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
570
328
  */
571
329
  plural(t, e, s, n) {
572
- const a = b(t), o = e.split("|");
573
- if (o.length > 1)
330
+ var c;
331
+ const o = N(t), a = e.split("|");
332
+ if (a.length > 1)
574
333
  try {
575
- if (d()) {
576
- const h = new Intl.PluralRules(this.getLocation(), s).select(a);
577
- let l;
578
- switch (h) {
334
+ if (y()) {
335
+ const d = new Intl.PluralRules(this.getLocation(), s).select(o);
336
+ let g;
337
+ switch (d) {
579
338
  case "zero":
580
- l = o[o.length - 1];
339
+ g = a[a.length - 1];
581
340
  break;
582
341
  case "one":
583
- l = o?.[0];
342
+ g = a == null ? void 0 : a[0];
584
343
  break;
585
344
  case "two":
586
- l = o?.[1];
345
+ g = a == null ? void 0 : a[1];
587
346
  break;
588
347
  case "few":
589
- l = o?.[3] ? o?.[2] : o?.[1];
348
+ g = a != null && a[3] ? a == null ? void 0 : a[2] : a == null ? void 0 : a[1];
590
349
  break;
591
350
  case "many":
592
- l = o?.[3] || o?.[2] || o?.[1];
351
+ g = (a == null ? void 0 : a[3]) || (a == null ? void 0 : a[2]) || (a == null ? void 0 : a[1]);
593
352
  break;
594
353
  case "other":
595
- o.length === 6 ? l = o[o.length - 2] : l = o[o.length - 1];
354
+ a.length === 6 ? g = a[a.length - 2] : g = a[a.length - 1];
596
355
  break;
597
356
  }
598
- return `${this.number(a, n)} ${l ?? ""}`.trim();
357
+ return `${this.number(o, n)} ${g != null ? g : ""}`.trim();
599
358
  }
600
- } catch (u) {
601
- console.error("plural: ", u);
359
+ } catch (h) {
360
+ console.error("plural: ", h);
602
361
  }
603
- return `${this.number(a, n)} ${o?.[0] ?? ""}`.trim();
362
+ return `${this.number(o, n)} ${(c = a == null ? void 0 : a[0]) != null ? c : ""}`.trim();
604
363
  }
605
364
  /**
606
365
  * Enables language-sensitive date and time formatting.
@@ -612,8 +371,8 @@ class I {
612
371
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
613
372
  */
614
373
  date(t, e, s, n) {
615
- const a = w(t), o = typeof s == "string", u = this.dateOptions(e, o ? s : "short");
616
- return n && (u.hour12 = !1), o || Object.assign(u, s), a.toLocaleString(this.getLocation(), u);
374
+ const o = A(t), a = typeof s == "string", c = this.dateOptions(e, a ? s : "short");
375
+ return n && (c.hour12 = !1), a || Object.assign(c, s), o.toLocaleString(this.getLocation(), c);
617
376
  }
618
377
  /**
619
378
  * Enables language-sensitive relative time formatting.
@@ -625,12 +384,12 @@ class I {
625
384
  * @param todayValue current day/ текущий день
626
385
  */
627
386
  relative(t, e, s) {
628
- const n = w(t), a = s || /* @__PURE__ */ new Date(), o = {
387
+ const n = A(t), o = s || /* @__PURE__ */ new Date(), a = {
629
388
  numeric: "auto",
630
389
  ...typeof e == "string" ? { style: e } : e || {}
631
390
  };
632
- let u = "second", h = (n.getTime() - a.getTime()) / 1e3;
633
- 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);
391
+ let c = "second", h = (n.getTime() - o.getTime()) / 1e3;
392
+ return Math.abs(h) >= 60 && (c = "minute", h /= 60, Math.abs(h) >= 60 && (c = "hour", h /= 60, Math.abs(h) >= 24 && (c = "day", h /= 24, Math.abs(h) >= 30 && (c = "month", h /= 30, Math.abs(h) >= 12 && (c = "year", h /= 12))))), this.relativeByValue(h, c, a);
634
393
  }
635
394
  /**
636
395
  * Enables language-sensitive relative time formatting
@@ -650,17 +409,17 @@ class I {
650
409
  * @param type type of data format/ тип формата data
651
410
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
652
411
  */
653
- relativeLimit(t, e, s, n, a, o, u) {
654
- const h = w(t), l = s || /* @__PURE__ */ new Date(), C = new Date(l), D = new Date(l);
655
- return C.setDate(l.getDate() - e), D.setDate(l.getDate() + e), h >= C && h <= D ? this.relative(
412
+ relativeLimit(t, e, s, n, o, a, c) {
413
+ const h = A(t), d = s || /* @__PURE__ */ new Date(), g = new Date(d), D = new Date(d);
414
+ return g.setDate(d.getDate() - e), D.setDate(d.getDate() + e), h >= g && h <= D ? this.relative(
656
415
  h,
657
416
  n,
658
- l
417
+ d
659
418
  ) : this.date(
660
419
  h,
661
- o,
662
420
  a,
663
- u
421
+ o,
422
+ c
664
423
  );
665
424
  }
666
425
  /**
@@ -675,10 +434,10 @@ class I {
675
434
  ...typeof s == "string" ? { style: s } : s || {}
676
435
  };
677
436
  try {
678
- if (d())
679
- return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(b(t)), e);
680
- } catch (a) {
681
- console.error("relative: ", a);
437
+ if (y())
438
+ return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(N(t)), e);
439
+ } catch (o) {
440
+ console.error("relative: ", o);
682
441
  }
683
442
  return "";
684
443
  }
@@ -690,8 +449,8 @@ class I {
690
449
  */
691
450
  month(t, e) {
692
451
  try {
693
- if (d())
694
- return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(w(t));
452
+ if (y())
453
+ return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(A(t));
695
454
  } catch (s) {
696
455
  console.error("month: ", s);
697
456
  }
@@ -709,12 +468,12 @@ class I {
709
468
  value: void 0
710
469
  }];
711
470
  try {
712
- if (d()) {
471
+ if (y()) {
713
472
  const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
714
- for (let a = 0; a < 12; a++)
715
- s.setMonth(a), e.push({
716
- label: n.format(s).replace(/^./, (o) => o.toUpperCase()),
717
- value: a + 1
473
+ for (let o = 0; o < 12; o++)
474
+ s.setMonth(o), e.push({
475
+ label: n.format(s).replace(/^./, (a) => a.toUpperCase()),
476
+ value: o + 1
718
477
  });
719
478
  }
720
479
  } catch (s) {
@@ -731,8 +490,8 @@ class I {
731
490
  */
732
491
  weekday(t, e) {
733
492
  try {
734
- if (d())
735
- return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(w(t));
493
+ if (y())
494
+ return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(A(t));
736
495
  } catch (s) {
737
496
  console.error("weekday: ", s);
738
497
  }
@@ -750,12 +509,12 @@ class I {
750
509
  value: void 0
751
510
  }];
752
511
  try {
753
- if (d()) {
754
- const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), a = s.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
755
- s.setDate(s.getDate() - a);
756
- for (let o = 0; o < 7; o++)
512
+ if (y()) {
513
+ const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), o = s.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
514
+ s.setDate(s.getDate() - o);
515
+ for (let a = 0; a < 7; a++)
757
516
  e.push({
758
- label: n.format(s).replace(/^./, (u) => u.toUpperCase()),
517
+ label: n.format(s).replace(/^./, (c) => c.toUpperCase()),
759
518
  value: s.getDay()
760
519
  }), s.setDate(s.getDate() + 1);
761
520
  }
@@ -781,9 +540,9 @@ class I {
781
540
  * @param compareFn a function for sorting/ функция для сортировки
782
541
  */
783
542
  sort(t, e = (s, n) => [s, n]) {
784
- if (d()) {
543
+ if (y()) {
785
544
  const s = new Intl.Collator(this.getLocation());
786
- return t.sort((n, a) => s.compare(...e(n, a)));
545
+ return t.sort((n, o) => s.compare(...e(n, o)));
787
546
  }
788
547
  return t;
789
548
  }
@@ -796,7 +555,7 @@ class I {
796
555
  */
797
556
  numberObject(t) {
798
557
  try {
799
- if (d())
558
+ if (y())
800
559
  return new Intl.NumberFormat(this.getLocation(), t);
801
560
  } catch (e) {
802
561
  console.error("numberObject: ", e);
@@ -814,27 +573,27 @@ class I {
814
573
  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;
815
574
  }
816
575
  }
817
- const Q = {};
818
- class ut {
576
+ const T = {};
577
+ class ht {
819
578
  /**
820
579
  * Constructor
821
580
  * @param date date for processing/ дата для обработки
822
581
  * @param type type of date format for output/ тип формата даты вывода
823
582
  * @param code country and language code/ код страны и языка
824
583
  */
825
- constructor(t, e = "date", s = p.getLocation()) {
826
- this.type = e, this.code = s, this.date = w(t);
584
+ constructor(t, e = "date", s = w.getLocation()) {
585
+ u(this, "date");
586
+ u(this, "hour24", !1);
587
+ u(this, "watch");
588
+ this.type = e, this.code = s, this.date = A(t);
827
589
  }
828
- date;
829
- hour24 = !1;
830
- watch;
831
590
  /**
832
591
  * Returns an object for working with formatting.
833
592
  *
834
593
  * Возвращает объект для работы с форматированием.
835
594
  */
836
595
  getIntl() {
837
- return new I(this.code);
596
+ return new P(this.code);
838
597
  }
839
598
  /**
840
599
  * Returns a Date object.
@@ -896,8 +655,8 @@ class ut {
896
655
  const n = this.getIntl().number(Math.trunc(s), {
897
656
  signDisplay: "always",
898
657
  minimumIntegerDigits: 2
899
- }), a = s.toString().match(/.\d+/) ? "30" : "00";
900
- return t === "RFC" ? `${n}${a}` : `${n}:${a}`;
658
+ }), o = s.toString().match(/.\d+/) ? "30" : "00";
659
+ return t === "RFC" ? `${n}${o}` : `${n}:${o}`;
901
660
  }
902
661
  /**
903
662
  * Returns the code of the first day of the week.
@@ -1042,7 +801,7 @@ class ut {
1042
801
  * @param timeZone add time zone/ добавить временную зону
1043
802
  */
1044
803
  standard(t = !0) {
1045
- const e = new ut(this.date, this.type, "en-GB"), s = [];
804
+ const e = new ht(this.date, this.type, "en-GB"), s = [];
1046
805
  let n;
1047
806
  return e.setHour24(!0), this.type === "hour-minute" ? n = e.locale(this.type, {
1048
807
  year: "numeric",
@@ -1058,7 +817,7 @@ class ut {
1058
817
  * целочисленное значение, представляющее число
1059
818
  */
1060
819
  setDate(t) {
1061
- return this.date = w(t), this.update(), this;
820
+ return this.date = A(t), this.update(), this;
1062
821
  }
1063
822
  /**
1064
823
  * Change the type of data output.
@@ -1458,265 +1217,23 @@ class ut {
1458
1217
  * Обновление всех значений.
1459
1218
  */
1460
1219
  update() {
1461
- return this.watch?.(
1220
+ var t;
1221
+ return (t = this.watch) == null || t.call(
1222
+ this,
1462
1223
  this.date,
1463
1224
  this.type,
1464
1225
  this.hour24
1465
1226
  ), this;
1466
1227
  }
1467
1228
  }
1468
- const r = "@flag";
1469
- class x {
1229
+ const r = "@flag", E = class E {
1470
1230
  /**
1471
1231
  * Constructor
1472
1232
  * @param code country and language code/ код страны и языка
1473
1233
  */
1474
- constructor(t = p.getLocation()) {
1234
+ constructor(t = w.getLocation()) {
1475
1235
  this.code = t;
1476
1236
  }
1477
- static flags = {
1478
- AD: `${r}-ad`,
1479
- AE: `${r}-ae`,
1480
- AF: `${r}-af`,
1481
- AG: `${r}-ag`,
1482
- AI: `${r}-ai`,
1483
- AL: `${r}-al`,
1484
- AM: `${r}-am`,
1485
- AN: `${r}-an`,
1486
- AO: `${r}-ao`,
1487
- AQ: `${r}-aq`,
1488
- AR: `${r}-ar`,
1489
- AS: `${r}-as`,
1490
- AT: `${r}-at`,
1491
- AU: `${r}-au`,
1492
- AW: `${r}-aw`,
1493
- AZ: `${r}-az`,
1494
- BA: `${r}-ba`,
1495
- BB: `${r}-bb`,
1496
- BD: `${r}-bd`,
1497
- BE: `${r}-be`,
1498
- BF: `${r}-bf`,
1499
- BG: `${r}-bg`,
1500
- BH: `${r}-bh`,
1501
- BI: `${r}-bi`,
1502
- BJ: `${r}-bj`,
1503
- BL: `${r}-bl`,
1504
- BM: `${r}-bm`,
1505
- BN: `${r}-bn`,
1506
- BO: `${r}-bo`,
1507
- BR: `${r}-br`,
1508
- BS: `${r}-bs`,
1509
- BT: `${r}-bt`,
1510
- BW: `${r}-bw`,
1511
- BY: `${r}-by`,
1512
- BZ: `${r}-bz`,
1513
- CA: `${r}-ca`,
1514
- CC: `${r}-cc`,
1515
- CD: `${r}-cd`,
1516
- CF: `${r}-cf`,
1517
- CG: `${r}-cg`,
1518
- CH: `${r}-ch`,
1519
- CI: `${r}-ci`,
1520
- CK: `${r}-ck`,
1521
- CL: `${r}-cl`,
1522
- CM: `${r}-cm`,
1523
- CN: `${r}-cn`,
1524
- CO: `${r}-co`,
1525
- CR: `${r}-cr`,
1526
- CU: `${r}-cu`,
1527
- CV: `${r}-cv`,
1528
- CW: `${r}-cw`,
1529
- CX: `${r}-cx`,
1530
- CY: `${r}-cy`,
1531
- CZ: `${r}-cz`,
1532
- DE: `${r}-de`,
1533
- DJ: `${r}-dj`,
1534
- DK: `${r}-dk`,
1535
- DM: `${r}-dm`,
1536
- DZ: `${r}-dz`,
1537
- EC: `${r}-ec`,
1538
- EE: `${r}-ee`,
1539
- EG: `${r}-eg`,
1540
- EH: `${r}-eh`,
1541
- ER: `${r}-er`,
1542
- ES: `${r}-es`,
1543
- ET: `${r}-et`,
1544
- FI: `${r}-fi`,
1545
- FJ: `${r}-fj`,
1546
- FK: `${r}-fk`,
1547
- FM: `${r}-fm`,
1548
- FO: `${r}-fo`,
1549
- FR: `${r}-fr`,
1550
- GA: `${r}-ga`,
1551
- GB: `${r}-gb`,
1552
- GD: `${r}-gd`,
1553
- GE: `${r}-ge`,
1554
- GF: `${r}-gf`,
1555
- GG: `${r}-gg`,
1556
- GH: `${r}-gh`,
1557
- GI: `${r}-gi`,
1558
- GL: `${r}-gl`,
1559
- GM: `${r}-gm`,
1560
- GN: `${r}-gn`,
1561
- GQ: `${r}-gq`,
1562
- GR: `${r}-gr`,
1563
- GT: `${r}-gt`,
1564
- GU: `${r}-gu`,
1565
- GW: `${r}-gw`,
1566
- GY: `${r}-gy`,
1567
- HK: `${r}-hk`,
1568
- HN: `${r}-hn`,
1569
- HR: `${r}-hr`,
1570
- HT: `${r}-ht`,
1571
- HU: `${r}-hu`,
1572
- ID: `${r}-id`,
1573
- IE: `${r}-ie`,
1574
- IL: `${r}-il`,
1575
- IM: `${r}-im`,
1576
- IN: `${r}-in`,
1577
- IO: `${r}-io`,
1578
- IQ: `${r}-iq`,
1579
- IR: `${r}-ir`,
1580
- IS: `${r}-is`,
1581
- IT: `${r}-it`,
1582
- JE: `${r}-je`,
1583
- JM: `${r}-jm`,
1584
- JO: `${r}-jo`,
1585
- JP: `${r}-jp`,
1586
- KE: `${r}-ke`,
1587
- KG: `${r}-kg`,
1588
- KH: `${r}-kh`,
1589
- KI: `${r}-ki`,
1590
- KM: `${r}-km`,
1591
- KN: `${r}-kn`,
1592
- KP: `${r}-kp`,
1593
- KR: `${r}-kr`,
1594
- KW: `${r}-kw`,
1595
- KY: `${r}-ky`,
1596
- KZ: `${r}-kz`,
1597
- LA: `${r}-la`,
1598
- LB: `${r}-lb`,
1599
- LC: `${r}-lc`,
1600
- LI: `${r}-li`,
1601
- LK: `${r}-lk`,
1602
- LR: `${r}-lr`,
1603
- LS: `${r}-ls`,
1604
- LT: `${r}-lt`,
1605
- LU: `${r}-lu`,
1606
- LV: `${r}-lv`,
1607
- LY: `${r}-ly`,
1608
- MA: `${r}-ma`,
1609
- MC: `${r}-mc`,
1610
- MD: `${r}-md`,
1611
- ME: `${r}-me`,
1612
- MF: `${r}-mf`,
1613
- MG: `${r}-mg`,
1614
- MH: `${r}-mh`,
1615
- MK: `${r}-mk`,
1616
- ML: `${r}-ml`,
1617
- MM: `${r}-mm`,
1618
- MN: `${r}-mn`,
1619
- MO: `${r}-mo`,
1620
- MP: `${r}-mp`,
1621
- MQ: `${r}-mq`,
1622
- MR: `${r}-mr`,
1623
- MS: `${r}-ms`,
1624
- MT: `${r}-mt`,
1625
- MU: `${r}-mu`,
1626
- MV: `${r}-mv`,
1627
- MW: `${r}-mw`,
1628
- MX: `${r}-mx`,
1629
- MY: `${r}-my`,
1630
- MZ: `${r}-mz`,
1631
- NA: `${r}-na`,
1632
- NC: `${r}-nc`,
1633
- NE: `${r}-ne`,
1634
- NF: `${r}-nf`,
1635
- NG: `${r}-ng`,
1636
- NI: `${r}-ni`,
1637
- NL: `${r}-nl`,
1638
- NO: `${r}-no`,
1639
- NP: `${r}-np`,
1640
- NR: `${r}-nr`,
1641
- NU: `${r}-nu`,
1642
- NZ: `${r}-nz`,
1643
- OM: `${r}-om`,
1644
- PA: `${r}-pa`,
1645
- PE: `${r}-pe`,
1646
- PF: `${r}-pf`,
1647
- PG: `${r}-pg`,
1648
- PH: `${r}-ph`,
1649
- PK: `${r}-pk`,
1650
- PL: `${r}-pl`,
1651
- PM: `${r}-pm`,
1652
- PN: `${r}-pn`,
1653
- PR: `${r}-pr`,
1654
- PS: `${r}-ps`,
1655
- PT: `${r}-pt`,
1656
- PW: `${r}-pw`,
1657
- PY: `${r}-py`,
1658
- QA: `${r}-qa`,
1659
- RE: `${r}-re`,
1660
- RO: `${r}-ro`,
1661
- RS: `${r}-rs`,
1662
- RU: `${r}-ru`,
1663
- RW: `${r}-rw`,
1664
- SA: `${r}-sa`,
1665
- SB: `${r}-sb`,
1666
- SC: `${r}-sc`,
1667
- SD: `${r}-sd`,
1668
- SE: `${r}-se`,
1669
- SG: `${r}-sg`,
1670
- SH: `${r}-sh`,
1671
- SI: `${r}-si`,
1672
- SJ: `${r}-sj`,
1673
- SK: `${r}-sk`,
1674
- SL: `${r}-sl`,
1675
- SM: `${r}-sm`,
1676
- SN: `${r}-sn`,
1677
- SO: `${r}-so`,
1678
- SR: `${r}-sr`,
1679
- SS: `${r}-ss`,
1680
- ST: `${r}-st`,
1681
- SV: `${r}-sv`,
1682
- SX: `${r}-sx`,
1683
- SY: `${r}-sy`,
1684
- SZ: `${r}-sz`,
1685
- TC: `${r}-tc`,
1686
- TD: `${r}-td`,
1687
- TG: `${r}-tg`,
1688
- TH: `${r}-th`,
1689
- TJ: `${r}-tj`,
1690
- TK: `${r}-tk`,
1691
- TL: `${r}-tl`,
1692
- TM: `${r}-tm`,
1693
- TN: `${r}-tn`,
1694
- TO: `${r}-to`,
1695
- TR: `${r}-tr`,
1696
- TT: `${r}-tt`,
1697
- TV: `${r}-tv`,
1698
- TW: `${r}-tw`,
1699
- TZ: `${r}-tz`,
1700
- UA: `${r}-ua`,
1701
- UG: `${r}-ug`,
1702
- US: `${r}-us`,
1703
- UY: `${r}-uy`,
1704
- UZ: `${r}-uz`,
1705
- VA: `${r}-va`,
1706
- VC: `${r}-vc`,
1707
- VE: `${r}-ve`,
1708
- VG: `${r}-vg`,
1709
- VI: `${r}-vi`,
1710
- VN: `${r}-vn`,
1711
- VU: `${r}-vu`,
1712
- WF: `${r}-wf`,
1713
- WS: `${r}-ws`,
1714
- YE: `${r}-ye`,
1715
- YT: `${r}-yt`,
1716
- ZA: `${r}-za`,
1717
- ZM: `${r}-zm`,
1718
- ZW: `${r}-zw`
1719
- };
1720
1237
  /**
1721
1238
  * Returns information about the country and its flag.
1722
1239
  *
@@ -1724,15 +1241,16 @@ class x {
1724
1241
  * @param code country code/ код страны
1725
1242
  */
1726
1243
  get(t = this.code) {
1727
- const e = p.find(t);
1244
+ var s;
1245
+ const e = w.find(t);
1728
1246
  if (e) {
1729
- const s = this.getCountry(e);
1247
+ const n = this.getCountry(e);
1730
1248
  return {
1731
1249
  language: this.getLanguage(e),
1732
- country: s,
1250
+ country: n,
1733
1251
  standard: e.standard,
1734
- icon: x.flags?.[e.country],
1735
- label: s,
1252
+ icon: (s = E.flags) == null ? void 0 : s[e.country],
1253
+ label: n,
1736
1254
  value: e.country
1737
1255
  };
1738
1256
  }
@@ -1744,7 +1262,8 @@ class x {
1744
1262
  * @param code country code/ код страны
1745
1263
  */
1746
1264
  getFlag(t = this.code) {
1747
- return this.get(t)?.icon;
1265
+ var e;
1266
+ return (e = this.get(t)) == null ? void 0 : e.icon;
1748
1267
  }
1749
1268
  /**
1750
1269
  * Getting a list of countries by an array of codes.
@@ -1753,7 +1272,7 @@ class x {
1753
1272
  * @param codes country code/ код страны
1754
1273
  */
1755
1274
  getList(t) {
1756
- return f(this.getCodes(t), (e) => this.get(e));
1275
+ return $(this.getCodes(t), (e) => this.get(e));
1757
1276
  }
1758
1277
  /**
1759
1278
  * Getting a list of countries by an array of codes in national language.
@@ -1762,13 +1281,13 @@ class x {
1762
1281
  * @param codes country code/ код страны.
1763
1282
  */
1764
1283
  getNational(t) {
1765
- return f(this.getList(t), (e) => {
1766
- const s = new x(e.standard).get(e.standard);
1284
+ return $(this.getList(t), (e) => {
1285
+ const s = new E(e.standard).get(e.standard);
1767
1286
  return {
1768
1287
  ...e,
1769
- description: s?.country,
1770
- nationalLanguage: s?.language,
1771
- nationalCountry: s?.country
1288
+ description: s == null ? void 0 : s.country,
1289
+ nationalLanguage: s == null ? void 0 : s.language,
1290
+ nationalCountry: s == null ? void 0 : s.country
1772
1291
  };
1773
1292
  });
1774
1293
  }
@@ -1787,7 +1306,7 @@ class x {
1787
1306
  * Возвращает специальный объект для работы с форматированием.
1788
1307
  */
1789
1308
  getLocation() {
1790
- return new I(this.code);
1309
+ return new P(this.code);
1791
1310
  }
1792
1311
  /**
1793
1312
  * Returns a list of countries to retrieve data from.
@@ -1796,7 +1315,7 @@ class x {
1796
1315
  * @param codes country code/ код страны
1797
1316
  */
1798
1317
  getCodes(t) {
1799
- return t ?? Object.keys(x.flags);
1318
+ return t != null ? t : Object.keys(E.flags);
1800
1319
  }
1801
1320
  /**
1802
1321
  * Getting the name of the language.
@@ -1816,468 +1335,976 @@ class x {
1816
1335
  getCountry(t) {
1817
1336
  return this.getLocation().countryName(t.country);
1818
1337
  }
1819
- }
1820
- const N = class N {
1338
+ };
1339
+ u(E, "flags", {
1340
+ AD: `${r}-ad`,
1341
+ AE: `${r}-ae`,
1342
+ AF: `${r}-af`,
1343
+ AG: `${r}-ag`,
1344
+ AI: `${r}-ai`,
1345
+ AL: `${r}-al`,
1346
+ AM: `${r}-am`,
1347
+ AN: `${r}-an`,
1348
+ AO: `${r}-ao`,
1349
+ AQ: `${r}-aq`,
1350
+ AR: `${r}-ar`,
1351
+ AS: `${r}-as`,
1352
+ AT: `${r}-at`,
1353
+ AU: `${r}-au`,
1354
+ AW: `${r}-aw`,
1355
+ AZ: `${r}-az`,
1356
+ BA: `${r}-ba`,
1357
+ BB: `${r}-bb`,
1358
+ BD: `${r}-bd`,
1359
+ BE: `${r}-be`,
1360
+ BF: `${r}-bf`,
1361
+ BG: `${r}-bg`,
1362
+ BH: `${r}-bh`,
1363
+ BI: `${r}-bi`,
1364
+ BJ: `${r}-bj`,
1365
+ BL: `${r}-bl`,
1366
+ BM: `${r}-bm`,
1367
+ BN: `${r}-bn`,
1368
+ BO: `${r}-bo`,
1369
+ BR: `${r}-br`,
1370
+ BS: `${r}-bs`,
1371
+ BT: `${r}-bt`,
1372
+ BW: `${r}-bw`,
1373
+ BY: `${r}-by`,
1374
+ BZ: `${r}-bz`,
1375
+ CA: `${r}-ca`,
1376
+ CC: `${r}-cc`,
1377
+ CD: `${r}-cd`,
1378
+ CF: `${r}-cf`,
1379
+ CG: `${r}-cg`,
1380
+ CH: `${r}-ch`,
1381
+ CI: `${r}-ci`,
1382
+ CK: `${r}-ck`,
1383
+ CL: `${r}-cl`,
1384
+ CM: `${r}-cm`,
1385
+ CN: `${r}-cn`,
1386
+ CO: `${r}-co`,
1387
+ CR: `${r}-cr`,
1388
+ CU: `${r}-cu`,
1389
+ CV: `${r}-cv`,
1390
+ CW: `${r}-cw`,
1391
+ CX: `${r}-cx`,
1392
+ CY: `${r}-cy`,
1393
+ CZ: `${r}-cz`,
1394
+ DE: `${r}-de`,
1395
+ DJ: `${r}-dj`,
1396
+ DK: `${r}-dk`,
1397
+ DM: `${r}-dm`,
1398
+ DZ: `${r}-dz`,
1399
+ EC: `${r}-ec`,
1400
+ EE: `${r}-ee`,
1401
+ EG: `${r}-eg`,
1402
+ EH: `${r}-eh`,
1403
+ ER: `${r}-er`,
1404
+ ES: `${r}-es`,
1405
+ ET: `${r}-et`,
1406
+ FI: `${r}-fi`,
1407
+ FJ: `${r}-fj`,
1408
+ FK: `${r}-fk`,
1409
+ FM: `${r}-fm`,
1410
+ FO: `${r}-fo`,
1411
+ FR: `${r}-fr`,
1412
+ GA: `${r}-ga`,
1413
+ GB: `${r}-gb`,
1414
+ GD: `${r}-gd`,
1415
+ GE: `${r}-ge`,
1416
+ GF: `${r}-gf`,
1417
+ GG: `${r}-gg`,
1418
+ GH: `${r}-gh`,
1419
+ GI: `${r}-gi`,
1420
+ GL: `${r}-gl`,
1421
+ GM: `${r}-gm`,
1422
+ GN: `${r}-gn`,
1423
+ GQ: `${r}-gq`,
1424
+ GR: `${r}-gr`,
1425
+ GT: `${r}-gt`,
1426
+ GU: `${r}-gu`,
1427
+ GW: `${r}-gw`,
1428
+ GY: `${r}-gy`,
1429
+ HK: `${r}-hk`,
1430
+ HN: `${r}-hn`,
1431
+ HR: `${r}-hr`,
1432
+ HT: `${r}-ht`,
1433
+ HU: `${r}-hu`,
1434
+ ID: `${r}-id`,
1435
+ IE: `${r}-ie`,
1436
+ IL: `${r}-il`,
1437
+ IM: `${r}-im`,
1438
+ IN: `${r}-in`,
1439
+ IO: `${r}-io`,
1440
+ IQ: `${r}-iq`,
1441
+ IR: `${r}-ir`,
1442
+ IS: `${r}-is`,
1443
+ IT: `${r}-it`,
1444
+ JE: `${r}-je`,
1445
+ JM: `${r}-jm`,
1446
+ JO: `${r}-jo`,
1447
+ JP: `${r}-jp`,
1448
+ KE: `${r}-ke`,
1449
+ KG: `${r}-kg`,
1450
+ KH: `${r}-kh`,
1451
+ KI: `${r}-ki`,
1452
+ KM: `${r}-km`,
1453
+ KN: `${r}-kn`,
1454
+ KP: `${r}-kp`,
1455
+ KR: `${r}-kr`,
1456
+ KW: `${r}-kw`,
1457
+ KY: `${r}-ky`,
1458
+ KZ: `${r}-kz`,
1459
+ LA: `${r}-la`,
1460
+ LB: `${r}-lb`,
1461
+ LC: `${r}-lc`,
1462
+ LI: `${r}-li`,
1463
+ LK: `${r}-lk`,
1464
+ LR: `${r}-lr`,
1465
+ LS: `${r}-ls`,
1466
+ LT: `${r}-lt`,
1467
+ LU: `${r}-lu`,
1468
+ LV: `${r}-lv`,
1469
+ LY: `${r}-ly`,
1470
+ MA: `${r}-ma`,
1471
+ MC: `${r}-mc`,
1472
+ MD: `${r}-md`,
1473
+ ME: `${r}-me`,
1474
+ MF: `${r}-mf`,
1475
+ MG: `${r}-mg`,
1476
+ MH: `${r}-mh`,
1477
+ MK: `${r}-mk`,
1478
+ ML: `${r}-ml`,
1479
+ MM: `${r}-mm`,
1480
+ MN: `${r}-mn`,
1481
+ MO: `${r}-mo`,
1482
+ MP: `${r}-mp`,
1483
+ MQ: `${r}-mq`,
1484
+ MR: `${r}-mr`,
1485
+ MS: `${r}-ms`,
1486
+ MT: `${r}-mt`,
1487
+ MU: `${r}-mu`,
1488
+ MV: `${r}-mv`,
1489
+ MW: `${r}-mw`,
1490
+ MX: `${r}-mx`,
1491
+ MY: `${r}-my`,
1492
+ MZ: `${r}-mz`,
1493
+ NA: `${r}-na`,
1494
+ NC: `${r}-nc`,
1495
+ NE: `${r}-ne`,
1496
+ NF: `${r}-nf`,
1497
+ NG: `${r}-ng`,
1498
+ NI: `${r}-ni`,
1499
+ NL: `${r}-nl`,
1500
+ NO: `${r}-no`,
1501
+ NP: `${r}-np`,
1502
+ NR: `${r}-nr`,
1503
+ NU: `${r}-nu`,
1504
+ NZ: `${r}-nz`,
1505
+ OM: `${r}-om`,
1506
+ PA: `${r}-pa`,
1507
+ PE: `${r}-pe`,
1508
+ PF: `${r}-pf`,
1509
+ PG: `${r}-pg`,
1510
+ PH: `${r}-ph`,
1511
+ PK: `${r}-pk`,
1512
+ PL: `${r}-pl`,
1513
+ PM: `${r}-pm`,
1514
+ PN: `${r}-pn`,
1515
+ PR: `${r}-pr`,
1516
+ PS: `${r}-ps`,
1517
+ PT: `${r}-pt`,
1518
+ PW: `${r}-pw`,
1519
+ PY: `${r}-py`,
1520
+ QA: `${r}-qa`,
1521
+ RE: `${r}-re`,
1522
+ RO: `${r}-ro`,
1523
+ RS: `${r}-rs`,
1524
+ RU: `${r}-ru`,
1525
+ RW: `${r}-rw`,
1526
+ SA: `${r}-sa`,
1527
+ SB: `${r}-sb`,
1528
+ SC: `${r}-sc`,
1529
+ SD: `${r}-sd`,
1530
+ SE: `${r}-se`,
1531
+ SG: `${r}-sg`,
1532
+ SH: `${r}-sh`,
1533
+ SI: `${r}-si`,
1534
+ SJ: `${r}-sj`,
1535
+ SK: `${r}-sk`,
1536
+ SL: `${r}-sl`,
1537
+ SM: `${r}-sm`,
1538
+ SN: `${r}-sn`,
1539
+ SO: `${r}-so`,
1540
+ SR: `${r}-sr`,
1541
+ SS: `${r}-ss`,
1542
+ ST: `${r}-st`,
1543
+ SV: `${r}-sv`,
1544
+ SX: `${r}-sx`,
1545
+ SY: `${r}-sy`,
1546
+ SZ: `${r}-sz`,
1547
+ TC: `${r}-tc`,
1548
+ TD: `${r}-td`,
1549
+ TG: `${r}-tg`,
1550
+ TH: `${r}-th`,
1551
+ TJ: `${r}-tj`,
1552
+ TK: `${r}-tk`,
1553
+ TL: `${r}-tl`,
1554
+ TM: `${r}-tm`,
1555
+ TN: `${r}-tn`,
1556
+ TO: `${r}-to`,
1557
+ TR: `${r}-tr`,
1558
+ TT: `${r}-tt`,
1559
+ TV: `${r}-tv`,
1560
+ TW: `${r}-tw`,
1561
+ TZ: `${r}-tz`,
1562
+ UA: `${r}-ua`,
1563
+ UG: `${r}-ug`,
1564
+ US: `${r}-us`,
1565
+ UY: `${r}-uy`,
1566
+ UZ: `${r}-uz`,
1567
+ VA: `${r}-va`,
1568
+ VC: `${r}-vc`,
1569
+ VE: `${r}-ve`,
1570
+ VG: `${r}-vg`,
1571
+ VI: `${r}-vi`,
1572
+ VN: `${r}-vn`,
1573
+ VU: `${r}-vu`,
1574
+ WF: `${r}-wf`,
1575
+ WS: `${r}-ws`,
1576
+ YE: `${r}-ye`,
1577
+ YT: `${r}-yt`,
1578
+ ZA: `${r}-za`,
1579
+ ZM: `${r}-zm`,
1580
+ ZW: `${r}-zw`
1581
+ });
1582
+ let ot = E, x;
1583
+ class Ne {
1821
1584
  /**
1822
- * Getting an object with information about the phone code and country.
1585
+ * Returns the value by its name.
1823
1586
  *
1824
- * Получение объекта с информацией о телефонном коде и стране.
1825
- * @param code country and language code/ код страны и языка
1587
+ * Возвращает значение по его имени.
1588
+ * @param name property name/ название свойства
1826
1589
  */
1827
1590
  static get(t) {
1828
- return this.list.find((e) => t === e.value);
1591
+ return x && (x == null ? void 0 : x[t]);
1829
1592
  }
1830
1593
  /**
1831
- * Getting information by phone.
1594
+ * Adds data, this method works only once.
1832
1595
  *
1833
- * Получение информации по телефону.
1834
- * @param phone phone number/ номер телефон
1596
+ * Добавляет данные, этот метод работает только 1 раз.
1597
+ * @param data global data/ глобальные данные
1835
1598
  */
1836
- static getByPhone(t) {
1837
- let e = this.map, s, n = "";
1838
- return this.toNumber(t).forEach((a) => {
1839
- n === "" && a in e ? (s = e[a], e = s?.next ?? {}) : n += a;
1840
- }), {
1841
- item: s,
1842
- phone: n
1843
- };
1599
+ static add(t) {
1600
+ x === void 0 && (x = { ...t });
1844
1601
  }
1602
+ }
1603
+ function Zt(i) {
1604
+ return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").trim();
1605
+ }
1606
+ class dt {
1845
1607
  /**
1846
- * Retrieves complete mask data by country code.
1608
+ * Creates an instance of MetaManager.
1847
1609
  *
1848
- * Получает полные данные о маске по коду страны.
1849
- * @param code country and language code/ код страны и языка
1610
+ * Создает экземпляр MetaManager.
1611
+ * @param listMeta list of meta-tag names to manage / список имен мета-тегов для управления
1612
+ * @param isProperty use 'property' attribute instead of 'name' / использовать атрибут 'property' вместо 'name'
1850
1613
  */
1851
- static getByCode(t) {
1852
- const e = this.get(t);
1853
- if (e)
1854
- return this.getByPhone(e.phone.toString())?.item;
1614
+ constructor(t, e = !1) {
1615
+ u(this, "items", {});
1616
+ this.listMeta = t, this.isProperty = e, this.update();
1855
1617
  }
1856
1618
  /**
1857
- * We get an array from a list of all phone numbers.
1619
+ * Returns the list of meta tag names.
1858
1620
  *
1859
- * Получаем массив из списка всех телефонных кодов.
1621
+ * Возвращает список имен мета-тегов.
1860
1622
  */
1861
- static getList() {
1862
- return this.list;
1623
+ getListMeta() {
1624
+ return this.listMeta;
1863
1625
  }
1864
1626
  /**
1865
- * We get a map of a tree, sorted by its code.
1627
+ * Get the content of a meta tag by name.
1866
1628
  *
1867
- * Получаем карту дерева, отсортированную по его коду.
1629
+ * Получает содержимое мета-тега по имени.
1630
+ * @param name meta tag name / имя мета-тега
1868
1631
  */
1869
- static getMap() {
1870
- return this.map;
1632
+ get(t) {
1633
+ var e;
1634
+ return (e = this.items[t]) != null ? e : "";
1871
1635
  }
1872
1636
  /**
1873
- * Convert to phone mask.
1637
+ * Returns all meta tags.
1874
1638
  *
1875
- * Преобразовать в маску телефона.
1876
- * @param phone phone number/ номер телефон
1877
- * @param masks a mask to transform a phone number/ маска для преобразования номер телефон
1639
+ * Возвращает все мета-теги.
1878
1640
  */
1879
- static toMask(t, e) {
1880
- if (W(t) && Array.isArray(e) && e.length > 0) {
1881
- const s = this.removeZero(t), n = s.length;
1882
- for (const a of e)
1883
- if (this.getUnnecessaryLength(a) === n)
1884
- return this.toStandard(s, a);
1885
- }
1641
+ getItems() {
1642
+ return this.items;
1886
1643
  }
1887
1644
  /**
1888
- * Deletes the country code from the input number.
1645
+ * Returns all meta tags as HTML string.
1889
1646
  *
1890
- * Удаляет код страны по входному номеру.
1891
- * @param phone phone number/ номер телефон
1647
+ * Возвращает все мета-теги в виде HTML-строки.
1892
1648
  */
1893
- static removeZero(t) {
1894
- return t.match(/^0/) ? t.replace(/^0/, "") : t.match(/^89/) ? t.replace(/^8/, "") : t;
1649
+ html() {
1650
+ return $(
1651
+ this.listMeta,
1652
+ (e) => this.toHtmlString(e)
1653
+ ).join("");
1895
1654
  }
1896
1655
  /**
1897
- * Returns the symbol by the internal country code.
1656
+ * Sets the content of a meta tag.
1898
1657
  *
1899
- * Возвращает символ по коду внутри страны.
1900
- * @param within internal country code/ код внутри страны
1658
+ * Устанавливает содержимое мета-тега.
1659
+ * @param name meta tag name / имя мета-тега
1660
+ * @param content meta tag content / содержимое мета-тега
1901
1661
  */
1902
- static getWithinSymbol(t) {
1903
- switch (t) {
1904
- case 4:
1905
- case "4":
1906
- return "$";
1907
- case 8:
1908
- case "8":
1909
- return "~";
1910
- }
1911
- return "=";
1662
+ set(t, e) {
1663
+ return this.setItem(t, e).setMeta(t), this;
1912
1664
  }
1913
1665
  /**
1914
- * Deletes all characters that do not belong to the mask.
1666
+ * Sets multiple meta tags from an object.
1915
1667
  *
1916
- * Удаляет все символы, не относящиеся к маске.
1917
- * @param mask A mask to transform a phone number/ маска для преобразования номер телефон
1668
+ * Устанавливает несколько мета-тегов из объекта.
1669
+ * @param metaList object with meta tag names and content / объект с именами и содержимым мета-тегов
1918
1670
  */
1919
- static getUnnecessaryLength(t) {
1920
- return t.replace(/[^*]+/ig, "").length;
1671
+ setByList(t) {
1672
+ return $(
1673
+ t,
1674
+ (e, s) => this.set(s, String(e))
1675
+ ), this;
1921
1676
  }
1922
1677
  /**
1923
- * Creating a list for the map.
1678
+ * Returns the attribute name for meta tags.
1924
1679
  *
1925
- * Формирование списка для карты.
1680
+ * Возвращает имя атрибута для мета-тегов.
1926
1681
  */
1927
- static makeList() {
1928
- const t = f(p.getList(), (e) => {
1929
- if (e?.phoneMask)
1930
- return {
1931
- phone: e?.phoneCode && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
1932
- within: e?.phoneWithin || 0,
1933
- mask: T(e.phoneMask),
1934
- value: e.country
1935
- };
1936
- });
1937
- this.list = t.sort((e, s) => e.phone - s.phone);
1938
- }
1939
- /**
1940
- * Creating a map for search.
1941
- *
1942
- * Создание карты для поиска.
1943
- */
1944
- static makeMap() {
1945
- this.list.forEach((t) => {
1946
- t.mask.forEach((e) => {
1947
- let s = this.map, n;
1948
- if (this.toNumber(e).forEach((a) => {
1949
- a in s || (s[a] = {
1950
- items: [],
1951
- info: void 0,
1952
- value: void 0,
1953
- mask: [],
1954
- maskFull: [],
1955
- next: {}
1956
- }), n = s[a], s = n?.next ?? {};
1957
- }), n) {
1958
- n.value === void 0 && (n.info = t, n.value = t.value);
1959
- const a = this.toWithin(e, t.within);
1960
- n.mask.push(a), n.maskFull.push(a.replace(/\d/ig, "*")), n.items.push(t);
1961
- }
1962
- });
1963
- });
1682
+ getAttributeName() {
1683
+ return this.isProperty ? "property" : "name";
1964
1684
  }
1965
1685
  /**
1966
- * The method parses a string argument and returns a floating point number.
1686
+ * Finds a meta element in the DOM.
1967
1687
  *
1968
- * Метод принимает строку в качестве аргумента и возвращает десятичное число.
1969
- * @param value the value to parse/ текстовая строка
1688
+ * Находит мета-элемент в DOM.
1689
+ * @param name meta tag name / имя мета-тега
1970
1690
  */
1971
- static toNumber(t) {
1972
- return t.replace(/\D+/ig, "").split("");
1691
+ findMetaElement(t) {
1692
+ if (!y())
1693
+ return;
1694
+ const e = `meta[${this.getAttributeName()}="${t}"]`;
1695
+ return document.querySelector(e) || void 0;
1973
1696
  }
1974
1697
  /**
1975
- * Converts the phone to a standard.
1698
+ * Sets the content of a meta tag in internal storage.
1976
1699
  *
1977
- * Преобразовывает телефон в стандарт.
1978
- * @param phone phone number/ номер телефон
1979
- * @param mask a mask to transform a phone number/ маска для преобразования номер телефон
1700
+ * Устанавливает содержимое мета-тега во внутреннем хранилище.
1701
+ * @param name meta tag name / имя мета-тега
1702
+ * @param content meta tag content / содержимое мета-тега
1980
1703
  */
1981
- static toStandard(t, e) {
1982
- let s = 0;
1983
- return e.replace(/\*/ig, () => String(t[s++]));
1704
+ setItem(t, e) {
1705
+ return this.items[t] = e, this;
1984
1706
  }
1985
1707
  /**
1986
- * Replaces the first character with the internal country code
1708
+ * Sets or creates a meta tag in the DOM.
1987
1709
  *
1988
- * Заменяет первый символ на код внутри страны.
1989
- * @param mask a mask to transform a phone number/ маска для преобразования номер телефон
1990
- * @param within internal country code/ код внутри страны
1710
+ * Устанавливает или создает мета-тег в DOM.
1711
+ * @param name meta tag name / имя мета-тега
1991
1712
  */
1992
- static toWithin(t, e) {
1993
- return t.replace(/\*/, this.getWithinSymbol(e));
1713
+ setMeta(t) {
1714
+ var n;
1715
+ const e = this.findMetaElement(t), s = (n = this.items[t]) != null ? n : "";
1716
+ if (e)
1717
+ e.content = s;
1718
+ else if (y()) {
1719
+ const o = { content: s };
1720
+ this.isProperty ? o.property = t : o.name = t, Bt(document.head, "meta", o);
1721
+ }
1722
+ return this;
1994
1723
  }
1995
- };
1996
- k(N, "list", []), k(N, "map", {}), N.makeList(), N.makeMap();
1997
- let yt = N, j;
1998
- class Ce {
1999
1724
  /**
2000
- * Returns the value by its name.
1725
+ * Converts meta tag to HTML string.
2001
1726
  *
2002
- * Возвращает значение по его имени.
2003
- * @param name property name/ название свойства
1727
+ * Преобразует мета-тег в HTML-строку.
1728
+ * @param name meta tag name / имя мета-тега
2004
1729
  */
2005
- static get(t) {
2006
- return j && j?.[t];
1730
+ toHtmlString(t) {
1731
+ var s;
1732
+ const e = Zt((s = this.items[t]) != null ? s : "");
1733
+ return e ? `<meta ${this.getAttributeName()}="${t}" content="${e}">` : "";
2007
1734
  }
2008
1735
  /**
2009
- * Adds data, this method works only once.
1736
+ * Updates meta tags data from the DOM.
2010
1737
  *
2011
- * Добавляет данные, этот метод работает только 1 раз.
2012
- * @param data global data/ глобальные данные
1738
+ * Обновляет данные мета-тегов из DOM.
2013
1739
  */
2014
- static add(t) {
2015
- j === void 0 && (j = { ...t });
1740
+ update() {
1741
+ return this.listMeta.forEach((t) => {
1742
+ var e, s;
1743
+ this.items[t] = (s = (e = this.findMetaElement(t)) == null ? void 0 : e.content) != null ? s : "";
1744
+ }), this;
2016
1745
  }
2017
1746
  }
2018
- const M = class M {
1747
+ var L = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(L || {}), Vt = /* @__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))(Vt || {}), v = /* @__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))(v || {}), Yt = /* @__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))(Yt || {}), qt = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(qt || {}), Jt = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(Jt || {}), Qt = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(Qt || {}), Xt = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(Xt || {}), b = /* @__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))(b || {}), Mt = /* @__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))(Mt || {});
1748
+ class Ot extends dt {
1749
+ constructor() {
1750
+ super(Object.values(v), !0);
1751
+ }
2019
1752
  /**
2020
- * Get data from hash.
1753
+ * Gets the Open Graph title.
2021
1754
  *
2022
- * Получение данных из хэша.
2023
- * @param name variable names/ названия переменных
2024
- * @param defaultValue value or function to change data/ значение или функция для изменения данных
1755
+ * Получает заголовок Open Graph.
2025
1756
  */
2026
- static get(t, e) {
2027
- return !(t in this.hash) && e && this.set(t, e), this.hash[t];
1757
+ getTitle() {
1758
+ return this.get(v.title);
2028
1759
  }
2029
1760
  /**
2030
- * Change data in hash.
1761
+ * Gets the Open Graph type.
2031
1762
  *
2032
- * Изменение данных в хэше.
2033
- * @param name variable names/ названия переменных
2034
- * @param callback value or function to change data/ значение или функция для изменения данных
1763
+ * Получает тип Open Graph.
2035
1764
  */
2036
- static set(t, e) {
2037
- const s = A(e);
2038
- s !== this.hash?.[t] && (this.hash[t] = s, this.update());
1765
+ getType() {
1766
+ return this.get(v.type);
2039
1767
  }
2040
1768
  /**
2041
- * Adding an event when data is changed.
1769
+ * Gets the Open Graph URL.
2042
1770
  *
2043
- * Добавление события при изменении данных.
2044
- * @param name variable names/ названия переменных
2045
- * @param callback the function is called when the data is changed/ функция вызывается при изменении данных
1771
+ * Получает URL Open Graph.
2046
1772
  */
2047
- static addWatch(t, e) {
2048
- t in this.watch ? this.watch[t]?.push(e) : this.watch[t] = [e];
1773
+ getUrl() {
1774
+ return this.get(v.url);
2049
1775
  }
2050
1776
  /**
2051
- * Update hash variable from URL string.
1777
+ * Gets the Open Graph image URL.
2052
1778
  *
2053
- * Обновление переменной хэша из строки URL.
1779
+ * Получает URL изображения Open Graph.
2054
1780
  */
2055
- static reload() {
2056
- if (!this.block) {
2057
- const t = this.getLocation();
2058
- this.makeWatch(t), this.hash = t;
2059
- }
1781
+ getImage() {
1782
+ return this.get(v.image);
2060
1783
  }
2061
1784
  /**
2062
- * Obtaining data from the URL string.
1785
+ * Gets the Open Graph description.
2063
1786
  *
2064
- * Получение данных из строки URL.
1787
+ * Получает описание Open Graph.
2065
1788
  */
2066
- static getLocation() {
2067
- const t = {};
2068
- return location.hash.replace(
2069
- /([\w-]+)[:=]([^;]+)/ig,
2070
- (...e) => (t[String(e[1])] = wt(e[2]), "")
2071
- ), t;
1789
+ getDescription() {
1790
+ return this.get(v.description);
2072
1791
  }
2073
1792
  /**
2074
- * Update hash string in URL.
1793
+ * Gets the Open Graph locale.
2075
1794
  *
2076
- * Обновление строки хэша в URL.
1795
+ * Получает локаль Open Graph.
2077
1796
  */
2078
- static update() {
2079
- this.block = !0, history.replaceState(null, "", `#${Et(this.hash, "=", ";")}`), requestAnimationFrame(() => {
2080
- this.block = !1;
2081
- });
1797
+ getLocale() {
1798
+ return this.get(v.locale);
2082
1799
  }
2083
1800
  /**
2084
- * Calling all functions whose data has changed.
1801
+ * Gets the Open Graph site name.
2085
1802
  *
2086
- * Вызов всех функций, у которых были изменены данные.
2087
- * @param location fresh data/ свежий данные
1803
+ * Получает название сайта Open Graph.
2088
1804
  */
2089
- static makeWatch(t) {
2090
- f(this.watch, (e, s) => {
2091
- this.hash?.[s] !== t?.[s] && e.forEach((n) => n(t[s]));
2092
- });
2093
- }
2094
- };
2095
- k(M, "hash", {}), k(M, "watch", {}), k(M, "block", !1), d() && (M.reload(), addEventListener("hashchange", () => M.reload()));
2096
- let R = M;
2097
- function Jt(i, t, e) {
2098
- return K(i)?.[t] ?? e;
2099
- }
2100
- function Qt(i, t, e) {
2101
- const s = K(i);
2102
- if (s) {
2103
- const n = Jt(s, t);
2104
- if (m(n) && m(e))
2105
- f(e, (a, o) => {
2106
- n[o] = A(a);
2107
- });
2108
- else {
2109
- const a = A(e);
2110
- !(t in s) && typeof a == "string" ? s.setAttribute(t.toString(), a) : s[t] = A(e);
2111
- }
1805
+ getSiteName() {
1806
+ return this.get(v.siteName);
2112
1807
  }
2113
- return s;
2114
- }
2115
- function pt(i, t = "div", e, s) {
2116
- if (!d())
2117
- return;
2118
- const n = document.createElement(t);
2119
- return typeof e == "function" ? e(n) : L(e) && f(e, (a, o) => {
2120
- Qt(n, o, a);
2121
- }), i?.insertBefore(n, s ?? null), n;
2122
- }
2123
- class St {
2124
- static storage = new Y("scrollbar", !0);
2125
- static calculate = !1;
2126
1808
  /**
2127
- * Checks whether to enable scroll hiding.
1809
+ * Sets the Open Graph title.
2128
1810
  *
2129
- * Проверяет, надо ли включить скрытие скролла.
1811
+ * Устанавливает заголовок Open Graph.
1812
+ * @param title title / заголовок
2130
1813
  */
2131
- static async is() {
2132
- const t = await this.get();
2133
- return t !== -1 && t <= 8;
1814
+ setTitle(t) {
1815
+ return this.set(v.title, t);
2134
1816
  }
2135
1817
  /**
2136
- * Returns the width of the scroll.
1818
+ * Sets the Open Graph type.
2137
1819
  *
2138
- * Возвращает ширину скролла.
1820
+ * Устанавливает тип Open Graph.
1821
+ * @param type type / тип
2139
1822
  */
2140
- static async get() {
2141
- const t = this.storage.get() ?? -1;
2142
- if (!this.calculate && t === -1) {
2143
- const e = await this.init();
2144
- return this.storage.set(e), e;
2145
- }
2146
- return t;
1823
+ setType(t) {
1824
+ return this.set(v.type, t);
2147
1825
  }
2148
1826
  /**
2149
- * Creates elements to check the width of the scroll.
1827
+ * Sets the Open Graph URL.
2150
1828
  *
2151
- * Создает элементы для проверки ширины скролла.
1829
+ * Устанавливает URL Open Graph.
1830
+ * @param url URL / URL
2152
1831
  */
2153
- static createElement() {
2154
- return pt(document.body, "div", (t) => {
2155
- t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", pt(t, "div", (e) => {
2156
- e.style.height = "100px";
2157
- });
2158
- });
1832
+ setUrl(t) {
1833
+ return this.set(v.url, t);
2159
1834
  }
2160
1835
  /**
2161
- * Initialization of data to check the width of the scroll.
1836
+ * Sets the Open Graph image URL.
2162
1837
  *
2163
- * Инициализация данных для проверки ширины скролла.
1838
+ * Устанавливает URL изображения Open Graph.
1839
+ * @param url image URL / URL изображения
2164
1840
  */
2165
- static init() {
2166
- return new Promise((t) => {
2167
- this.calculate = !0;
2168
- const e = this.createElement();
2169
- e ? requestAnimationFrame(() => {
2170
- t(e.offsetWidth - e.clientWidth), e.remove(), this.calculate = !1;
2171
- }) : t(0);
2172
- });
1841
+ setImage(t) {
1842
+ return this.set(v.image, t);
2173
1843
  }
2174
- }
2175
- const Xt = [
2176
- "d",
2177
- "e",
2178
- "f",
2179
- "g",
2180
- "h",
2181
- "i",
2182
- "j",
2183
- "k",
2184
- "l",
2185
- "m",
2186
- "n",
2187
- "o",
2188
- "p",
2189
- "q",
2190
- "r",
2191
- "s",
2192
- "t",
2193
- "u",
2194
- "v"
2195
- ], te = (i, t = {}) => {
2196
- let e = String(i);
2197
- if (i.match(/%[a-z]/)) {
2198
- let s = 0;
2199
- f(t, (n) => {
2200
- e = e.replace(new RegExp(`%${Xt[s++]}`, "g"), String(n));
2201
- });
1844
+ /**
1845
+ * Sets the Open Graph description.
1846
+ *
1847
+ * Устанавливает описание Open Graph.
1848
+ * @param description description / описание
1849
+ */
1850
+ setDescription(t) {
1851
+ return this.set(v.description, t);
2202
1852
  }
2203
- return L(t) && f(t, (s, n) => {
2204
- e = e.replace(
2205
- new RegExp(`\\[${n}\\](.*?)\\[/${n}\\]`, "g"),
2206
- (a, o) => String(s).replace(/\[content]/g, o)
2207
- ).replace(new RegExp(`\\[${n}\\]`, "g"), String(s));
2208
- }), e;
2209
- };
2210
- class z {
2211
- static url = "/api/translate";
2212
- static propsName = "list";
2213
- static data = {};
2214
- static cache = [];
2215
- static resolveList = [];
2216
- static timeout;
2217
1853
  /**
2218
- * Getting the translation text by its code.
1854
+ * Sets the Open Graph locale.
2219
1855
  *
2220
- * Получение текста перевода по его коду.
2221
- * @param name code name/ название кода
2222
- * @param replacement If set, replaces the text with the specified values/ если установлено, заменяет текст на указанные значения
1856
+ * Устанавливает локаль Open Graph.
1857
+ * @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
2223
1858
  */
2224
- static async get(t, e) {
2225
- const s = this.getName(t);
2226
- return s in this.data ? this.replacement(this.data[s], e) : (H.isLocalhost() || await this.add(t), this.replacement(this.data?.[s] ?? t));
1859
+ setLocale(t) {
1860
+ return this.set(v.locale, t);
2227
1861
  }
2228
1862
  /**
2229
- * Getting the translation text by its code (Sync).
1863
+ * Sets the Open Graph site name.
2230
1864
  *
2231
- * Получение текста перевода по его коду (Sync).
2232
- * @param name code name/ название кода
2233
- * @param first If set to false, returns an empty string if there is no text/
2234
- * если установлено false, возвращает пустую строку, если нет текста
2235
- * @param replacement If set, replaces the text with the specified values/
2236
- * если установлено, заменяет текст на указанные значения
1865
+ * Устанавливает название сайта Open Graph.
1866
+ * @param siteName site name / название сайта
2237
1867
  */
2238
- static getSync(t, e = !1, s) {
2239
- const n = this.getName(t);
2240
- return n in this.data ? this.replacement(String(this.data[n]), s) : e ? " " : t;
1868
+ setSiteName(t) {
1869
+ return this.set(v.siteName, t);
1870
+ }
1871
+ }
1872
+ class Tt extends dt {
1873
+ constructor() {
1874
+ super(Object.values(b));
2241
1875
  }
2242
1876
  /**
2243
- * Getting a list of translations by an array of text codes.
1877
+ * Gets the Twitter Card type.
2244
1878
  *
2245
- * Получение списка переводов по массиву кодов текста.
2246
- * @param names list of codes to get translations/ список кодов для получения переводов
1879
+ * Получает тип Twitter Card.
2247
1880
  */
2248
- static getList(t) {
2249
- return new Promise((e) => {
2250
- const s = {};
2251
- let n = 0;
2252
- for (const a of t) {
2253
- const o = Array.isArray(a) ? a[0] : a, u = Array.isArray(a) ? a.slice(1) : void 0;
2254
- this.get(o, u).then((h) => {
2255
- s[o] = h, ++n >= t.length && e(s);
2256
- });
2257
- }
2258
- });
1881
+ getCard() {
1882
+ return this.get(b.card);
2259
1883
  }
2260
1884
  /**
2261
- * Getting a list of translations by an array of text codes.
1885
+ * Gets the website or brand @username.
2262
1886
  *
2263
- * Получение списка переводов по массиву кодов текста.
2264
- * @param names list of codes to get translations/ список кодов для получения переводов
2265
- * @param first If set to false, returns an empty string if there is no text/
2266
- * если установлено false, возвращает пустую строку, если нет текста
1887
+ * Получает аккаунт сайта или бренда (@username).
2267
1888
  */
2268
- static getListSync(t, e = !1) {
2269
- const s = {};
2270
- for (const n of t) {
2271
- const a = Array.isArray(n) ? n[0] : n, o = Array.isArray(n) ? n.slice(1) : void 0;
2272
- s[a] = this.getSync(a, e, o);
2273
- }
2274
- return s;
1889
+ getSite() {
1890
+ return this.get(b.site);
2275
1891
  }
2276
1892
  /**
2277
- * Added a list of translated texts.
1893
+ * Gets the content creator @username.
2278
1894
  *
2279
- * Добавлен список переведенных текстов.
2280
- * @param names list of codes to get translations/ список кодов для получения переводов
1895
+ * Получает автора контента (@username).
1896
+ */
1897
+ getCreator() {
1898
+ return this.get(b.creator);
1899
+ }
1900
+ /**
1901
+ * Gets the page URL.
1902
+ *
1903
+ * Получает URL страницы.
1904
+ */
1905
+ getUrl() {
1906
+ return this.get(b.url);
1907
+ }
1908
+ /**
1909
+ * Gets the card title.
1910
+ *
1911
+ * Получает заголовок карточки.
1912
+ */
1913
+ getTitle() {
1914
+ return this.get(b.title);
1915
+ }
1916
+ /**
1917
+ * Gets the card description.
1918
+ *
1919
+ * Получает описание карточки.
1920
+ */
1921
+ getDescription() {
1922
+ return this.get(b.description);
1923
+ }
1924
+ /**
1925
+ * Gets the card image URL.
1926
+ *
1927
+ * Получает URL изображения карточки.
1928
+ */
1929
+ getImage() {
1930
+ return this.get(b.image);
1931
+ }
1932
+ /**
1933
+ * Sets the Twitter Card type.
1934
+ *
1935
+ * Устанавливает тип Twitter Card.
1936
+ * @param card card type / тип карточки
1937
+ */
1938
+ setCard(t) {
1939
+ return this.set(b.card, t), this;
1940
+ }
1941
+ /**
1942
+ * Sets the website or brand @username.
1943
+ *
1944
+ * Устанавливает аккаунт сайта или бренда (@username).
1945
+ * @param site @username / аккаунт
1946
+ */
1947
+ setSite(t) {
1948
+ return this.set(b.site, t), this;
1949
+ }
1950
+ /**
1951
+ * Sets the content creator @username.
1952
+ *
1953
+ * Устанавливает автора контента (@username).
1954
+ * @param creator @username / аккаунт автора
1955
+ */
1956
+ setCreator(t) {
1957
+ return this.set(b.creator, t), this;
1958
+ }
1959
+ /**
1960
+ * Sets the page URL.
1961
+ *
1962
+ * Устанавливает URL страницы.
1963
+ * @param url URL / URL
1964
+ */
1965
+ setUrl(t) {
1966
+ return this.set(b.url, t), this;
1967
+ }
1968
+ /**
1969
+ * Sets the card title.
1970
+ *
1971
+ * Устанавливает заголовок карточки.
1972
+ * @param title title / заголовок
1973
+ */
1974
+ setTitle(t) {
1975
+ return this.set(b.title, t), this;
1976
+ }
1977
+ /**
1978
+ * Sets the card description.
1979
+ *
1980
+ * Устанавливает описание карточки.
1981
+ * @param description description / описание
1982
+ */
1983
+ setDescription(t) {
1984
+ return this.set(b.description, t), this;
1985
+ }
1986
+ /**
1987
+ * Sets the card image URL.
1988
+ *
1989
+ * Устанавливает URL изображения карточки.
1990
+ * @param image image URL / URL изображения
1991
+ */
1992
+ setImage(t) {
1993
+ return this.set(b.image, t), this;
1994
+ }
1995
+ }
1996
+ class Gt extends dt {
1997
+ /**
1998
+ * Creates an instance of Meta with integrated Open Graph and Twitter Card support.
1999
+ *
2000
+ * Создает экземпляр Meta с интегрированной поддержкой Open Graph и Twitter Card.
2001
+ */
2002
+ constructor() {
2003
+ super(Object.values(L));
2004
+ u(this, "suffix");
2005
+ u(this, "og");
2006
+ u(this, "twitter");
2007
+ this.og = new Ot(), this.twitter = new Tt();
2008
+ }
2009
+ /**
2010
+ * Gets the MetaOg instance for advanced Open Graph operations.
2011
+ *
2012
+ * Получает экземпляр MetaOg для расширенных операций с Open Graph.
2013
+ */
2014
+ getOg() {
2015
+ return this.og;
2016
+ }
2017
+ /**
2018
+ * Gets the MetaTwitter instance for advanced Twitter Card operations.
2019
+ *
2020
+ * Получает экземпляр MetaTwitter для расширенных операций с Twitter Card.
2021
+ */
2022
+ getTwitter() {
2023
+ return this.twitter;
2024
+ }
2025
+ /**
2026
+ * Gets the page title without suffix.
2027
+ *
2028
+ * Получает заголовок страницы без суффикса.
2029
+ */
2030
+ getTitle() {
2031
+ return y() ? document.title.replace(this.getSuffix(), "").trim() : "";
2032
+ }
2033
+ /**
2034
+ * Gets the keywords meta tag.
2035
+ *
2036
+ * Получает мета-тег keywords.
2037
+ */
2038
+ getKeywords() {
2039
+ return this.get(L.keywords);
2040
+ }
2041
+ /**
2042
+ * Gets the description meta tag.
2043
+ *
2044
+ * Получает мета-тег description.
2045
+ */
2046
+ getDescription() {
2047
+ return this.get(L.description);
2048
+ }
2049
+ /**
2050
+ * Gets the Open Graph image URL.
2051
+ *
2052
+ * Получает URL изображения Open Graph.
2053
+ */
2054
+ getImage() {
2055
+ return this.og.getImage();
2056
+ }
2057
+ /**
2058
+ * Gets the canonical URL.
2059
+ *
2060
+ * Получает канонический URL.
2061
+ */
2062
+ getCanonical() {
2063
+ return this.get(L.canonical);
2064
+ }
2065
+ /**
2066
+ * Gets the robots meta tag value.
2067
+ *
2068
+ * Получает значение мета-тега robots.
2069
+ */
2070
+ getRobots() {
2071
+ return this.get(L.robots);
2072
+ }
2073
+ /**
2074
+ * Gets the author meta tag.
2075
+ *
2076
+ * Получает мета-тег author.
2077
+ */
2078
+ getAuthor() {
2079
+ return this.get(L.author);
2080
+ }
2081
+ /**
2082
+ * Gets the Open Graph site name.
2083
+ *
2084
+ * Получает название сайта Open Graph.
2085
+ */
2086
+ getSiteName() {
2087
+ return this.og.getSiteName();
2088
+ }
2089
+ /**
2090
+ * Gets the Open Graph locale.
2091
+ *
2092
+ * Получает локаль Open Graph.
2093
+ */
2094
+ getLocale() {
2095
+ return this.og.getLocale();
2096
+ }
2097
+ /**
2098
+ * Sets the page title (with suffix) and updates Open Graph and Twitter Card titles.
2099
+ *
2100
+ * Устанавливает заголовок страницы (с суффиксом) и обновляет заголовки Open Graph и Twitter Card.
2101
+ * @param title page title / заголовок страницы
2102
+ */
2103
+ setTitle(e) {
2104
+ if (y()) {
2105
+ const s = _(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
2106
+ document.title = s, this.og.setTitle(s), this.twitter.setTitle(s);
2107
+ }
2108
+ return this;
2109
+ }
2110
+ /**
2111
+ * Sets the keywords meta tag.
2112
+ *
2113
+ * Устанавливает мета-тег keywords.
2114
+ * @param keywords keywords as string or array / ключевые слова в виде строки или массива
2115
+ */
2116
+ setKeywords(e) {
2117
+ return this.set(L.keywords, W(e).join(", ")), this;
2118
+ }
2119
+ /**
2120
+ * Sets the description meta tag.
2121
+ *
2122
+ * Устанавливает мета-тег description.
2123
+ * @param description page description / описание страницы
2124
+ */
2125
+ setDescription(e) {
2126
+ return this.set(L.description, e), this;
2127
+ }
2128
+ /**
2129
+ * Sets the image for Open Graph and Twitter Card.
2130
+ *
2131
+ * Устанавливает изображение для Open Graph и Twitter Card.
2132
+ * @param image image URL / URL изображения
2133
+ */
2134
+ setImage(e) {
2135
+ return this.og.setImage(e), this.twitter.setImage(e), this;
2136
+ }
2137
+ /**
2138
+ * Sets the canonical URL and updates Open Graph and Twitter Card URLs.
2139
+ *
2140
+ * Устанавливает канонический URL и обновляет URL для Open Graph и Twitter Card.
2141
+ * @param canonical canonical URL / канонический URL
2142
+ */
2143
+ setCanonical(e) {
2144
+ return this.set(L.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
2145
+ }
2146
+ /**
2147
+ * Sets the robots meta tag.
2148
+ *
2149
+ * Устанавливает мета-тег robots.
2150
+ * @param robots robots directive / директива robots
2151
+ */
2152
+ setRobots(e) {
2153
+ return this.set(L.robots, e), this;
2154
+ }
2155
+ /**
2156
+ * Sets the author meta tag.
2157
+ *
2158
+ * Устанавливает мета-тег author.
2159
+ * @param author author name / имя автора
2160
+ */
2161
+ setAuthor(e) {
2162
+ return this.set(L.author, e), this;
2163
+ }
2164
+ /**
2165
+ * Sets the site name for Open Graph and Twitter Card.
2166
+ *
2167
+ * Устанавливает название сайта для Open Graph и Twitter Card.
2168
+ * @param siteName site name / название сайта
2169
+ */
2170
+ setSiteName(e) {
2171
+ return this.og.setSiteName(e), this.twitter.setSite(e), this;
2172
+ }
2173
+ /**
2174
+ * Sets the locale for Open Graph.
2175
+ *
2176
+ * Устанавливает локаль для Open Graph.
2177
+ * @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
2178
+ */
2179
+ setLocale(e) {
2180
+ return this.og.setLocale(e), this;
2181
+ }
2182
+ /**
2183
+ * Sets the suffix to append to page title.
2184
+ *
2185
+ * Устанавливает суффикс для добавления к заголовку страницы.
2186
+ * @param suffix title suffix (e.g. 'My Site') / суффикс заголовка (например, 'Мой Сайт')
2187
+ */
2188
+ setSuffix(e) {
2189
+ this.suffix = e;
2190
+ }
2191
+ /**
2192
+ * Generates the complete HTML for all meta-tags including Open Graph and Twitter Card.
2193
+ *
2194
+ * Генерирует полный HTML для всех мета-тегов, включая Open Graph и Twitter Card.
2195
+ */
2196
+ html() {
2197
+ return `${super.html()}${this.og.html()}${this.twitter.html()}`;
2198
+ }
2199
+ /**
2200
+ * Gets the formatted suffix with separator.
2201
+ *
2202
+ * Получает отформатированный суффикс с разделителем.
2203
+ */
2204
+ getSuffix() {
2205
+ return _(this.suffix) ? ` - ${this.suffix}` : "";
2206
+ }
2207
+ }
2208
+ const te = [
2209
+ "d",
2210
+ "e",
2211
+ "f",
2212
+ "g",
2213
+ "h",
2214
+ "i",
2215
+ "j",
2216
+ "k",
2217
+ "l",
2218
+ "m",
2219
+ "n",
2220
+ "o",
2221
+ "p",
2222
+ "q",
2223
+ "r",
2224
+ "s",
2225
+ "t",
2226
+ "u",
2227
+ "v"
2228
+ ], ee = (i, t = {}) => {
2229
+ let e = String(i);
2230
+ if (i.match(/%[a-z]/)) {
2231
+ let s = 0;
2232
+ $(t, (n) => {
2233
+ e = e.replace(new RegExp(`%${te[s++]}`, "g"), String(n));
2234
+ });
2235
+ }
2236
+ return F(t) && $(t, (s, n) => {
2237
+ e = e.replace(
2238
+ new RegExp(`\\[${n}\\](.*?)\\[/${n}\\]`, "g"),
2239
+ (o, a) => String(s).replace(/\[content]/g, a)
2240
+ ).replace(new RegExp(`\\[${n}\\]`, "g"), String(s));
2241
+ }), e;
2242
+ }, I = class I {
2243
+ /**
2244
+ * Getting the translation text by its code.
2245
+ *
2246
+ * Получение текста перевода по его коду.
2247
+ * @param name code name/ название кода
2248
+ * @param replacement If set, replaces the text with the specified values/ если установлено, заменяет текст на указанные значения
2249
+ */
2250
+ static async get(t, e) {
2251
+ var n, o;
2252
+ const s = this.getName(t);
2253
+ return s in this.data ? this.replacement(this.data[s], e) : (V.isLocalhost() || await this.add(t), this.replacement((o = (n = this.data) == null ? void 0 : n[s]) != null ? o : t));
2254
+ }
2255
+ /**
2256
+ * Getting the translation text by its code (Sync).
2257
+ *
2258
+ * Получение текста перевода по его коду (Sync).
2259
+ * @param name code name/ название кода
2260
+ * @param first If set to false, returns an empty string if there is no text/
2261
+ * если установлено false, возвращает пустую строку, если нет текста
2262
+ * @param replacement If set, replaces the text with the specified values/
2263
+ * если установлено, заменяет текст на указанные значения
2264
+ */
2265
+ static getSync(t, e = !1, s) {
2266
+ const n = this.getName(t);
2267
+ return n in this.data ? this.replacement(String(this.data[n]), s) : e ? " " : t;
2268
+ }
2269
+ /**
2270
+ * Getting a list of translations by an array of text codes.
2271
+ *
2272
+ * Получение списка переводов по массиву кодов текста.
2273
+ * @param names list of codes to get translations/ список кодов для получения переводов
2274
+ */
2275
+ static getList(t) {
2276
+ return new Promise((e) => {
2277
+ const s = {};
2278
+ let n = 0;
2279
+ for (const o of t) {
2280
+ const a = Array.isArray(o) ? o[0] : o, c = Array.isArray(o) ? o.slice(1) : void 0;
2281
+ this.get(a, c).then((h) => {
2282
+ s[a] = h, ++n >= t.length && e(s);
2283
+ });
2284
+ }
2285
+ });
2286
+ }
2287
+ /**
2288
+ * Getting a list of translations by an array of text codes.
2289
+ *
2290
+ * Получение списка переводов по массиву кодов текста.
2291
+ * @param names list of codes to get translations/ список кодов для получения переводов
2292
+ * @param first If set to false, returns an empty string if there is no text/
2293
+ * если установлено false, возвращает пустую строку, если нет текста
2294
+ */
2295
+ static getListSync(t, e = !1) {
2296
+ const s = {};
2297
+ for (const n of t) {
2298
+ const o = Array.isArray(n) ? n[0] : n, a = Array.isArray(n) ? n.slice(1) : void 0;
2299
+ s[o] = this.getSync(o, e, a);
2300
+ }
2301
+ return s;
2302
+ }
2303
+ /**
2304
+ * Added a list of translated texts.
2305
+ *
2306
+ * Добавлен список переведенных текстов.
2307
+ * @param names list of codes to get translations/ список кодов для получения переводов
2281
2308
  */
2282
2309
  static add(t) {
2283
2310
  return new Promise((e) => {
@@ -2295,8 +2322,8 @@ class z {
2295
2322
  * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
2296
2323
  */
2297
2324
  static addSync(t) {
2298
- f(t, (e, s) => {
2299
- ot(e) && W(e) && (this.data[this.getName(s)] = e);
2325
+ $(t, (e, s) => {
2326
+ ct(e) && _(e) && (this.data[this.getName(s)] = e);
2300
2327
  });
2301
2328
  }
2302
2329
  /**
@@ -2306,8 +2333,8 @@ class z {
2306
2333
  * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
2307
2334
  */
2308
2335
  static async addNormalOrSync(t) {
2309
- if (W(t))
2310
- if (H.isLocalhost())
2336
+ if (_(t))
2337
+ if (V.isLocalhost())
2311
2338
  this.addSync(t);
2312
2339
  else {
2313
2340
  const e = Object.keys(t);
@@ -2321,7 +2348,7 @@ class z {
2321
2348
  * @param url path to the script/ путь к скрипту
2322
2349
  */
2323
2350
  static setUrl(t) {
2324
- return this.url = t, z;
2351
+ return this.url = t, I;
2325
2352
  }
2326
2353
  static setPropsName(t) {
2327
2354
  return this.propsName = t, this;
@@ -2333,7 +2360,7 @@ class z {
2333
2360
  * @param name code name/ название кода
2334
2361
  */
2335
2362
  static getName(t) {
2336
- return `${p.getLocation()}-${t}`;
2363
+ return `${w.getLocation()}-${t}`;
2337
2364
  }
2338
2365
  /**
2339
2366
  * Returns a list of names that are not yet in the list.
@@ -2343,7 +2370,7 @@ class z {
2343
2370
  */
2344
2371
  static getNamesNone(t) {
2345
2372
  const e = [];
2346
- return T(t).forEach((s) => {
2373
+ return W(t).forEach((s) => {
2347
2374
  s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
2348
2375
  }), e;
2349
2376
  }
@@ -2353,7 +2380,7 @@ class z {
2353
2380
  * Получение списка переводов с сервера.
2354
2381
  */
2355
2382
  static async getResponse() {
2356
- return await H.get({
2383
+ const t = await V.get({
2357
2384
  api: !1,
2358
2385
  path: this.url,
2359
2386
  request: {
@@ -2361,7 +2388,8 @@ class z {
2361
2388
  },
2362
2389
  toData: !0,
2363
2390
  global: !0
2364
- }) ?? {};
2391
+ });
2392
+ return t != null ? t : {};
2365
2393
  }
2366
2394
  /**
2367
2395
  * Replaces the text with the specified values.
@@ -2371,7 +2399,7 @@ class z {
2371
2399
  * @param replacement values for replacement/ значения для замены
2372
2400
  */
2373
2401
  static replacement(t, e) {
2374
- return e ? te(t, e) : t;
2402
+ return e ? ee(t, e) : t;
2375
2403
  }
2376
2404
  /**
2377
2405
  * Adding translation data from the server.
@@ -2381,23 +2409,270 @@ class z {
2381
2409
  static async make() {
2382
2410
  const t = await this.getResponse();
2383
2411
  this.cache.forEach((e) => {
2384
- this.data[this.getName(e)] = t?.[e] ?? "";
2412
+ var s;
2413
+ this.data[this.getName(e)] = (s = t == null ? void 0 : t[e]) != null ? s : "";
2385
2414
  }), this.cache = [];
2386
2415
  }
2416
+ };
2417
+ u(I, "url", "/api/translate"), u(I, "propsName", "list"), u(I, "data", {}), u(I, "cache", []), u(I, "resolveList", []), u(I, "timeout");
2418
+ let q = I;
2419
+ function gt(i) {
2420
+ return Array.isArray(i);
2421
+ }
2422
+ function Ae(i) {
2423
+ var t;
2424
+ return ct(i) ? i.trim() : gt(i) && i.findIndex((e) => S(e)) === -1 ? i.join(",") : S(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
2425
+ }
2426
+ function ie(i, t) {
2427
+ return Array(t).fill(i);
2428
+ }
2429
+ function Be(i) {
2430
+ var t;
2431
+ if (y())
2432
+ return (t = document.querySelector(i)) != null ? t : void 0;
2433
+ }
2434
+ function Fe(i) {
2435
+ if (y())
2436
+ return document.querySelectorAll(i);
2437
+ }
2438
+ function xe(i) {
2439
+ i.preventDefault(), i.stopPropagation();
2440
+ }
2441
+ function se(i, t, e) {
2442
+ const s = () => {
2443
+ i(), t != null && t() ? se(i, t, e) : e == null || e();
2444
+ };
2445
+ y() ? requestAnimationFrame(s) : s();
2446
+ }
2447
+ function Ee(i) {
2448
+ var s;
2449
+ const t = {}, e = vt(i);
2450
+ if (e)
2451
+ for (const n of e.attributes)
2452
+ t[n.name] = (s = (n == null ? void 0 : n.value) || (n == null ? void 0 : n.textContent)) != null ? s : void 0;
2453
+ return t;
2454
+ }
2455
+ async function Pe(i) {
2456
+ var t, e;
2457
+ return (e = (t = i == null ? void 0 : i.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
2458
+ }
2459
+ let yt = z(1e5, 9e5);
2460
+ function Y(i, t) {
2461
+ const e = vt(i);
2462
+ return e ? (_(e.id) || e.setAttribute("id", `id-${yt++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${yt++}`;
2463
+ }
2464
+ function St(i, t = "ig", e = ":value") {
2465
+ const s = i.replace(/([[\]\\^$.?*+()/])/g, "\\$1");
2466
+ return new RegExp(e.replace(/:value/g, s), t);
2467
+ }
2468
+ function re(i, t) {
2469
+ var n;
2470
+ const e = t.split(".", 2), s = e[0];
2471
+ return s && (i != null && i[s]) && F(i[s]) && (e != null && e[1]) ? re(i[s], e[1]) : (n = s && (i == null ? void 0 : i[s])) != null ? n : "";
2472
+ }
2473
+ function He(i) {
2474
+ var t, e, s;
2475
+ 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();
2476
+ }
2477
+ function wt(i) {
2478
+ return $(i, (t) => t.length);
2479
+ }
2480
+ function Re(i) {
2481
+ return Math.max(...wt(i));
2482
+ }
2483
+ function We(i) {
2484
+ return Math.min(...wt(i));
2485
+ }
2486
+ function ne(i) {
2487
+ var t, e, s, n;
2488
+ 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) || ((n = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : n.clientX) || 0;
2489
+ }
2490
+ function oe(i) {
2491
+ var t, e, s, n;
2492
+ 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) || ((n = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : n.clientY) || 0;
2493
+ }
2494
+ function je(i) {
2495
+ return {
2496
+ x: ne(i),
2497
+ y: oe(i)
2498
+ };
2499
+ }
2500
+ function Ue(i, t) {
2501
+ const e = {};
2502
+ return t.forEach((s) => {
2503
+ s in i && i[s] !== void 0 && (e[s] = i[s]);
2504
+ }), e;
2505
+ }
2506
+ function ze(i, t = void 0) {
2507
+ const e = {};
2508
+ return $(i, (s, n) => {
2509
+ s !== t && (e[n] = s);
2510
+ }), e;
2511
+ }
2512
+ function _e(i) {
2513
+ return F(i) ? i : {};
2514
+ }
2515
+ function ae(i, t) {
2516
+ return ie(i, t).join("");
2517
+ }
2518
+ function Ke(i, t, e = "#", s = 2, n = 12) {
2519
+ const o = z(i, t), a = [];
2520
+ for (let c = 0; c < o; c++)
2521
+ a.push(ae(e, z(s, n)));
2522
+ return a.join(" ");
2523
+ }
2524
+ function Ze(i, t) {
2525
+ const e = i != null ? i : 0;
2526
+ return t > e ? 100 / (t - e) : 0;
2527
+ }
2528
+ function Ve(i, t) {
2529
+ const e = i != null ? i : 0;
2530
+ return t > e ? (t - e) / 100 : 0;
2531
+ }
2532
+ const $t = 0;
2533
+ function Ye(i, t, e) {
2534
+ const s = t == null ? void 0 : t.closest(i);
2535
+ if (t && s && s.scrollHeight !== s.offsetHeight)
2536
+ if (e) {
2537
+ const n = e.getBoundingClientRect(), o = s.getBoundingClientRect(), a = t.getBoundingClientRect();
2538
+ s.scrollTop = t.offsetTop - (n.top - o.top) - (n.height / 2 - a.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
2539
+ } else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - $t : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + $t);
2540
+ }
2541
+ function qe(i, t) {
2542
+ return i.indexOf(t) !== -1;
2543
+ }
2544
+ async function Je() {
2545
+ if (y()) {
2546
+ const i = await bt.get();
2547
+ document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
2548
+ }
2549
+ }
2550
+ function Qe(i, t) {
2551
+ const e = {};
2552
+ return S(i) && S(t) && $(i, (s, n) => {
2553
+ n in t && (e[n] = s);
2554
+ }), e;
2555
+ }
2556
+ function Xe(i, t) {
2557
+ let e = Object.keys(i).length !== Object.keys(t).length;
2558
+ return e || $(i, (s, n) => {
2559
+ s !== (t == null ? void 0 : t[n]) && (e = !0);
2560
+ }), e;
2561
+ }
2562
+ function Me(i) {
2563
+ switch (typeof i) {
2564
+ case "number":
2565
+ return !0;
2566
+ case "string":
2567
+ return !!i.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
2568
+ default:
2569
+ return !1;
2570
+ }
2571
+ }
2572
+ function Oe(i, t) {
2573
+ const e = Math.floor(t);
2574
+ return i >= e && i < e + 1;
2575
+ }
2576
+ function Te(i, t) {
2577
+ return Array.isArray(i) ? i.every((e) => j(e, t)) : j(i, t);
2578
+ }
2579
+ function ue(i) {
2580
+ return [...new Set(i)];
2581
+ }
2582
+ function R(i, t, e = !0) {
2583
+ const s = U(i);
2584
+ return S(i) && S(t) && $(
2585
+ t,
2586
+ (n, o) => {
2587
+ const a = i == null ? void 0 : i[o];
2588
+ S(a) && S(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] = U(ue([...a, ...n])) : s[o] = R(
2589
+ Array.isArray(a) ? { ...a } : a,
2590
+ n,
2591
+ e
2592
+ ) : s[o] = S(n) ? U(n) : n;
2593
+ }
2594
+ ), s;
2595
+ }
2596
+ function Ge(i, t) {
2597
+ let e = i;
2598
+ return $(t, (s, n) => {
2599
+ e = e.replace(St(`[${n}]`), lt(s));
2600
+ }), e;
2601
+ }
2602
+ function ti(i) {
2603
+ const t = N(i);
2604
+ if (t > 0) {
2605
+ const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
2606
+ return `${e}:${s}`;
2607
+ }
2608
+ return "00:00";
2609
+ }
2610
+ function ei(i, t, {
2611
+ multiple: e = !1,
2612
+ maxlength: s = 0,
2613
+ alwaysChange: n = !0,
2614
+ notEmpty: o = !1
2615
+ }) {
2616
+ if (e) {
2617
+ if (gt(i)) {
2618
+ const a = i.indexOf(t), c = [...i];
2619
+ return a !== -1 ? (!o || c.length > 1) && c.splice(a, 1) : (!s || i.length < s) && c.push(t), c;
2620
+ }
2621
+ return i === t ? [] : i ? [i, t] : [t];
2622
+ }
2623
+ return n || i !== t ? t : i;
2624
+ }
2625
+ function ii(i, t, e) {
2626
+ if (S(i) && S(t)) {
2627
+ if (e) {
2628
+ let s = {}, n = !1;
2629
+ return $(i, (o, a) => {
2630
+ !n && (e === a || e === o) ? (n = !0, s = R(s, t)) : n ? s = R(s, { [a]: o }) : s[a] = S(o) ? U(o) : o;
2631
+ }), n ? s : R(i, t);
2632
+ }
2633
+ if (S(t))
2634
+ return R(i, t);
2635
+ }
2636
+ return U(i);
2387
2637
  }
2388
- function ht(i) {
2389
- return Array.isArray(i);
2638
+ function Dt(i) {
2639
+ 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()}`);
2640
+ }
2641
+ function si(i) {
2642
+ return Dt(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
2643
+ }
2644
+ function ri(i) {
2645
+ 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());
2646
+ }
2647
+ function ni(i, t, e, s) {
2648
+ const n = N(i), o = N(t);
2649
+ return t && o < n ? `${pt(o, e, s)}+` : pt(n, e, s);
2650
+ }
2651
+ const pt = (i, t, e) => t ? new P(e).number(i) : i;
2652
+ function ce(i, t) {
2653
+ return 1 / i * t;
2654
+ }
2655
+ function oi(i, t) {
2656
+ return ce(i, t) * 100;
2657
+ }
2658
+ async function ai(i) {
2659
+ if (y())
2660
+ try {
2661
+ await navigator.clipboard.writeText(i);
2662
+ } catch (t) {
2663
+ document == null || document.execCommand(i);
2664
+ }
2390
2665
  }
2391
- class ee {
2666
+ class le {
2392
2667
  /**
2393
2668
  * Constructor
2394
2669
  * @param props base data/ базовые данные
2395
2670
  * @param watch data for tracking/ данные для слежения
2396
2671
  */
2397
2672
  constructor(t, e = Object.keys(t)) {
2673
+ u(this, "cache", {});
2398
2674
  this.props = t, this.watch = e;
2399
2675
  }
2400
- cache = {};
2401
2676
  /**
2402
2677
  * Checks if the value has been updated.
2403
2678
  *
@@ -2405,7 +2680,7 @@ class ee {
2405
2680
  * @param name property name/ название свойства
2406
2681
  */
2407
2682
  is(t) {
2408
- return ht(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
2683
+ return gt(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
2409
2684
  }
2410
2685
  /**
2411
2686
  * Checks if there are changes in the data.
@@ -2434,10 +2709,11 @@ class ee {
2434
2709
  * @param name property name/ название свойства
2435
2710
  */
2436
2711
  isDifferent(t) {
2437
- return this.cache?.[t] !== this.props?.[t];
2712
+ var e, s;
2713
+ return ((e = this.cache) == null ? void 0 : e[t]) !== ((s = this.props) == null ? void 0 : s[t]);
2438
2714
  }
2439
2715
  }
2440
- class se {
2716
+ class he {
2441
2717
  /**
2442
2718
  * Constructor
2443
2719
  * @param props base data/ базовые данные
@@ -2446,10 +2722,10 @@ class se {
2446
2722
  * @param changed base data/ данный для слежения
2447
2723
  */
2448
2724
  constructor(t, e, s) {
2449
- this.props = t, this.callback = e, this.changed = new ee(t, s);
2725
+ u(this, "event", {});
2726
+ u(this, "changed");
2727
+ this.props = t, this.callback = e, this.changed = new le(t, s);
2450
2728
  }
2451
- event = {};
2452
- changed;
2453
2729
  /**
2454
2730
  * Calls the callback function.
2455
2731
  *
@@ -2496,7 +2772,7 @@ class se {
2496
2772
  this.callback && this.callback(this.event);
2497
2773
  }
2498
2774
  }
2499
- class De extends se {
2775
+ class ui extends he {
2500
2776
  /**
2501
2777
  * Calls the callback function.
2502
2778
  *
@@ -2516,25 +2792,28 @@ class De extends se {
2516
2792
  (t || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
2517
2793
  }
2518
2794
  }
2519
- function ie(i) {
2795
+ function m(i) {
2796
+ return Q(i) ? i.value : i;
2797
+ }
2798
+ function de(i) {
2520
2799
  return i && "class" in i && typeof i.class == "string" ? i.class : void 0;
2521
2800
  }
2522
- function re(i, t, e) {
2523
- const s = ie(t);
2801
+ function ge(i, t, e) {
2802
+ const s = de(t);
2524
2803
  return e && s ? `${e}.${s}` : e || s || i;
2525
2804
  }
2526
- function ne(i, t, e, s) {
2527
- const n = re(i, t, s);
2528
- return Rt(i, { key: n, ...t }, e);
2805
+ function fe(i, t, e, s) {
2806
+ const n = ge(i, t, s);
2807
+ return Et(i, { key: n, ...t }, e);
2529
2808
  }
2530
2809
  function at(i, t) {
2531
- const e = i?.class, s = t?.class, n = i?.style, a = t?.style, o = {
2810
+ const e = i == null ? void 0 : i.class, s = t == null ? void 0 : t.class, n = i == null ? void 0 : i.style, o = t == null ? void 0 : t.style, a = {
2532
2811
  ...i,
2533
2812
  ...t
2534
2813
  };
2535
- return e && s && (o.class = [], e && o.class.push(e), s && o.class.push(s)), n && a && (o.style = [], n && o.style.push(n), a && o.style.push(a)), o;
2814
+ return e && s && (a.class = [], e && a.class.push(e), s && a.class.push(s)), n && o && (a.style = [], n && a.style.push(n), o && a.style.push(o)), a;
2536
2815
  }
2537
- function ae(...i) {
2816
+ function me(...i) {
2538
2817
  let t = {};
2539
2818
  return i.forEach((e) => {
2540
2819
  e && (t = at(t, e));
@@ -2547,10 +2826,10 @@ class Lt {
2547
2826
  * @param modification data for modification/ данные для модификации
2548
2827
  */
2549
2828
  constructor(t = {}, e) {
2829
+ /** Cache for computed properties/ Кэш для вычисляемых свойств */
2830
+ u(this, "caching", {});
2550
2831
  this.components = t, this.modification = e;
2551
2832
  }
2552
- /** Cache for computed properties/ Кэш для вычисляемых свойств */
2553
- caching = {};
2554
2833
  /**
2555
2834
  * Check the presence of the component.
2556
2835
  *
@@ -2567,7 +2846,8 @@ class Lt {
2567
2846
  * @param name name of the component/ названия компонента
2568
2847
  */
2569
2848
  get(t) {
2570
- return this.components?.[t];
2849
+ var e;
2850
+ return (e = this.components) == null ? void 0 : e[t];
2571
2851
  }
2572
2852
  /**
2573
2853
  * Returns the modified input data of the connected components.
@@ -2578,10 +2858,10 @@ class Lt {
2578
2858
  */
2579
2859
  getModification(t, e) {
2580
2860
  if (t) {
2581
- t in this.caching || (this.caching[t] = c(() => this.computeModification(t)));
2861
+ t in this.caching || (this.caching[t] = l(() => this.computeModification(t)));
2582
2862
  const s = this.caching[t];
2583
2863
  if (s)
2584
- return e ? ae(s.value, e) : s.value;
2864
+ return e ? me(s.value, e) : s.value;
2585
2865
  }
2586
2866
  return e;
2587
2867
  }
@@ -2595,13 +2875,13 @@ class Lt {
2595
2875
  * @param index the name of the key/ названия ключа
2596
2876
  */
2597
2877
  render(t, e, s, n) {
2598
- const a = this.renderOne(
2878
+ const o = this.renderOne(
2599
2879
  t,
2600
2880
  e,
2601
2881
  s,
2602
2882
  n
2603
2883
  );
2604
- return a ? [a] : [];
2884
+ return o ? [o] : [];
2605
2885
  }
2606
2886
  /**
2607
2887
  * Rendering a component by its name.
@@ -2614,12 +2894,12 @@ class Lt {
2614
2894
  */
2615
2895
  renderOne(t, e, s, n) {
2616
2896
  if (this.is(t)) {
2617
- const a = n ?? t;
2618
- return ne(
2897
+ const o = n != null ? n : t;
2898
+ return fe(
2619
2899
  this.get(t),
2620
- this.getModification(a, e),
2900
+ this.getModification(o, e),
2621
2901
  s,
2622
- a
2902
+ o
2623
2903
  );
2624
2904
  }
2625
2905
  }
@@ -2634,8 +2914,8 @@ class Lt {
2634
2914
  * @param children sub-elements of the component/ под элементы компонента
2635
2915
  * @param index the name of the key/ названия ключа
2636
2916
  */
2637
- renderAdd(t, e, s, n, a) {
2638
- return t.push(...this.render(e, s, n, a)), this;
2917
+ renderAdd(t, e, s, n, o) {
2918
+ return t.push(...this.render(e, s, n, o)), this;
2639
2919
  }
2640
2920
  /**
2641
2921
  * Calculates modified input data for connected components.
@@ -2644,22 +2924,20 @@ class Lt {
2644
2924
  * @param index the name of this/ название данного
2645
2925
  */
2646
2926
  computeModification(t) {
2647
- const e = g(this.modification?.[t]);
2648
- if (e && L(e)) {
2649
- const s = {};
2650
- return f(e, (n, a) => {
2651
- s[a] = g(n);
2652
- }), s;
2927
+ var s;
2928
+ const e = m((s = this.modification) == null ? void 0 : s[t]);
2929
+ if (e && F(e)) {
2930
+ const n = {};
2931
+ return $(e, (o, a) => {
2932
+ n[a] = m(o);
2933
+ }), n;
2653
2934
  }
2654
2935
  return {};
2655
2936
  }
2656
2937
  }
2657
- class ke extends Lt {
2938
+ class ci extends Lt {
2658
2939
  }
2659
- function Ct(i) {
2660
- return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[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()}`);
2661
- }
2662
- class Me {
2940
+ class li {
2663
2941
  /**
2664
2942
  * Constructor
2665
2943
  * @param name class name/ название класса
@@ -2667,22 +2945,22 @@ class Me {
2667
2945
  * @param options list of additional parameters/ список дополнительных параметров
2668
2946
  */
2669
2947
  constructor(t, e, s) {
2670
- this.props = e, this.options = s, this.name = this.initName(t), this.refs = this.props ? Ot(this.props) : {}, this.components = new Lt(s?.components, s?.compMod), this.emits = s?.emits, this.classes = c(() => this.updateClasses()), this.styles = c(() => this.updateStyles()), this.attrs = Wt(), this.slots = Pt();
2671
- }
2672
- name;
2673
- element = $();
2674
- refs;
2675
- components;
2676
- emits;
2677
- classes;
2678
- classesSub;
2679
- styles;
2680
- stylesSub;
2681
- attrs;
2682
- slots;
2683
- dataExpose;
2948
+ u(this, "name");
2949
+ u(this, "element", p());
2950
+ u(this, "refs");
2951
+ u(this, "components");
2952
+ u(this, "emits");
2953
+ u(this, "classes");
2954
+ u(this, "classesSub");
2955
+ u(this, "styles");
2956
+ u(this, "stylesSub");
2957
+ u(this, "attrs");
2958
+ u(this, "slots");
2959
+ u(this, "dataExpose");
2960
+ this.props = e, this.options = s, this.name = this.initName(t), this.refs = this.props ? Pt(this.props) : {}, this.components = new Lt(s == null ? void 0 : s.components, s == null ? void 0 : s.compMod), this.emits = s == null ? void 0 : s.emits, this.classes = l(() => this.updateClasses()), this.styles = l(() => this.updateStyles()), this.attrs = Ht(), this.slots = Rt();
2961
+ }
2684
2962
  init() {
2685
- return this.classesSub = c(() => this.initClasses()), this.stylesSub = c(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
2963
+ return this.classesSub = l(() => this.initClasses()), this.stylesSub = l(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
2686
2964
  }
2687
2965
  /**
2688
2966
  * Getting the class name.
@@ -2707,7 +2985,7 @@ class Me {
2707
2985
  * @param name list of class names by levels/ список названий классов по уровням
2708
2986
  */
2709
2987
  getSubClass(t) {
2710
- return `${this.getName()}__${T(t).join("__")}`;
2988
+ return `${this.getName()}__${W(t).join("__")}`;
2711
2989
  }
2712
2990
  /**
2713
2991
  * Getting the class name for the status.
@@ -2716,7 +2994,7 @@ class Me {
2716
2994
  * @param name list of class names by levels/ список названий классов по уровням
2717
2995
  */
2718
2996
  getStatusClass(t) {
2719
- return `${this.getName()}--${T(t).join("--")}`;
2997
+ return `${this.getName()}--${W(t).join("--")}`;
2720
2998
  }
2721
2999
  /**
2722
3000
  * Getting the property name for the style.
@@ -2725,7 +3003,7 @@ class Me {
2725
3003
  * @param name list of class names by levels/ список названий классов по уровням
2726
3004
  */
2727
3005
  getStyle(t) {
2728
- return `--${this.getName()}-sys-${T(t).join("-")}`;
3006
+ return `--${this.getName()}-sys-${W(t).join("-")}`;
2729
3007
  }
2730
3008
  /**
2731
3009
  * Getting additional parameters.
@@ -2733,7 +3011,8 @@ class Me {
2733
3011
  * Получение дополнительных параметров.
2734
3012
  */
2735
3013
  getAttrs() {
2736
- const t = { ...this.attrs ?? {} };
3014
+ var e;
3015
+ const t = { ...(e = this.attrs) != null ? e : {} };
2737
3016
  return "class" in t && delete t.class, "style" in t && delete t.style, t;
2738
3017
  }
2739
3018
  /**
@@ -2742,7 +3021,8 @@ class Me {
2742
3021
  * Список доступных переменных извне.
2743
3022
  */
2744
3023
  expose() {
2745
- return this.dataExpose ?? {};
3024
+ var t;
3025
+ return (t = this.dataExpose) != null ? t : {};
2746
3026
  }
2747
3027
  /**
2748
3028
  * The rendering method for the setup method.
@@ -2762,9 +3042,10 @@ class Me {
2762
3042
  * @param props property for the slot/ свойство для слота
2763
3043
  */
2764
3044
  initSlot(t, e, s = {}) {
2765
- if (this.slots && this.slots?.[t] && typeof this.slots[t] == "function") {
2766
- const n = this.slots[t](s);
2767
- return e && e.push(n), n;
3045
+ var n;
3046
+ if (this.slots && ((n = this.slots) != null && n[t]) && typeof this.slots[t] == "function") {
3047
+ const o = this.slots[t](s);
3048
+ return e && e.push(o), o;
2768
3049
  }
2769
3050
  }
2770
3051
  /**
@@ -2774,7 +3055,7 @@ class Me {
2774
3055
  * @param classes list of classes for transformation/ список классов для преобразования
2775
3056
  */
2776
3057
  toClass(t) {
2777
- return L(t) ? t : Array.isArray(t) ? { [t.filter((s) => typeof s == "string" && s.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
3058
+ return F(t) ? t : Array.isArray(t) ? { [t.filter((s) => typeof s == "string" && s.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
2778
3059
  }
2779
3060
  /**
2780
3061
  * Converts the class name to standard for the current component.
@@ -2783,9 +3064,9 @@ class Me {
2783
3064
  * @param classes list of classes/ список классов
2784
3065
  */
2785
3066
  toClassName(t) {
2786
- if (m(t)) {
3067
+ if (S(t)) {
2787
3068
  const e = {};
2788
- return f(t, (s, n) => {
3069
+ return $(t, (s, n) => {
2789
3070
  n.match(/\?\?/) ? e[n.replace(/\?\?/, this.getName())] = s : n.match(/\?/) ? e[n.replace(/\?/, this.getDesign())] = s : e[n] = s;
2790
3071
  }), e;
2791
3072
  }
@@ -2798,7 +3079,7 @@ class Me {
2798
3079
  * @param name component name for transformation/ название компонента для преобразования
2799
3080
  */
2800
3081
  initName(t) {
2801
- return f(t.split(".", 2), (e) => Ct(e));
3082
+ return $(t.split(".", 2), (e) => Dt(e));
2802
3083
  }
2803
3084
  /**
2804
3085
  * Updating data about the class.
@@ -2806,16 +3087,17 @@ class Me {
2806
3087
  * Обновление данных об классе.
2807
3088
  */
2808
3089
  updateClasses() {
2809
- const t = this.classesSub?.value, e = this.options?.classes?.value;
3090
+ var s, n, o, a;
3091
+ const t = (s = this.classesSub) == null ? void 0 : s.value, e = (o = (n = this.options) == null ? void 0 : n.classes) == null ? void 0 : o.value;
2810
3092
  return t && e ? {
2811
3093
  ...t,
2812
3094
  ...e,
2813
3095
  main: {
2814
- ...this.toClass(t?.main),
2815
- ...this.toClass(e?.main),
2816
- ...this.toClass(this.attrs?.class)
3096
+ ...this.toClass(t == null ? void 0 : t.main),
3097
+ ...this.toClass(e == null ? void 0 : e.main),
3098
+ ...this.toClass((a = this.attrs) == null ? void 0 : a.class)
2817
3099
  }
2818
- } : e ?? {
3100
+ } : e != null ? e : {
2819
3101
  main: {}
2820
3102
  };
2821
3103
  }
@@ -2825,42 +3107,43 @@ class Me {
2825
3107
  * Доработка полученного списка стилей.
2826
3108
  */
2827
3109
  updateStyles() {
2828
- const t = this.stylesSub?.value, e = this.options?.styles?.value;
3110
+ var s, n, o;
3111
+ const t = (s = this.stylesSub) == null ? void 0 : s.value, e = (o = (n = this.options) == null ? void 0 : n.styles) == null ? void 0 : o.value;
2829
3112
  return t && e ? {
2830
3113
  ...t,
2831
3114
  ...e
2832
- } : e ?? {};
3115
+ } : e != null ? e : {};
2833
3116
  }
2834
3117
  }
2835
- function S(i) {
2836
- return ct(i) ? i : $(i);
3118
+ function B(i) {
3119
+ return Q(i) ? i : p(i);
2837
3120
  }
2838
- class Ae {
2839
- item;
2840
- type;
2841
- code;
2842
- date;
2843
- datetime;
2844
- year = c(() => this.date.value && this.datetime.getYear());
2845
- month = c(() => this.date.value && this.datetime.getMonth());
2846
- day = c(() => this.date.value && this.datetime.getDay());
2847
- hour = c(() => this.date.value && this.datetime.getHour());
2848
- minute = c(() => this.date.value && this.datetime.getMinute());
2849
- second = c(() => this.date.value && this.datetime.getSecond());
3121
+ class hi {
2850
3122
  /**
2851
3123
  * Constructor
2852
3124
  * @param date date for processing. дата для обработки
2853
3125
  * @param type type of date format for output. тип формата даты вывода
2854
3126
  * @param code country and language code. код страны и языка
2855
3127
  */
2856
- constructor(t, e = "date", s = p.getLocation()) {
2857
- this.item = S(t), this.type = S(e), this.code = S(s), this.date = $(w(this.item.value)), this.datetime = new ut(
3128
+ constructor(t, e = "date", s = w.getLocation()) {
3129
+ u(this, "item");
3130
+ u(this, "type");
3131
+ u(this, "code");
3132
+ u(this, "date");
3133
+ u(this, "datetime");
3134
+ u(this, "year", l(() => this.date.value && this.datetime.getYear()));
3135
+ u(this, "month", l(() => this.date.value && this.datetime.getMonth()));
3136
+ u(this, "day", l(() => this.date.value && this.datetime.getDay()));
3137
+ u(this, "hour", l(() => this.date.value && this.datetime.getHour()));
3138
+ u(this, "minute", l(() => this.date.value && this.datetime.getMinute()));
3139
+ u(this, "second", l(() => this.date.value && this.datetime.getSecond()));
3140
+ this.item = B(t), this.type = B(e), this.code = B(s), this.date = p(A(this.item.value)), this.datetime = new ht(
2858
3141
  this.date.value,
2859
3142
  this.type.value,
2860
3143
  this.code.value
2861
- ), y(this.item, (n) => {
2862
- this.date.value = w(n);
2863
- }), y(this.type, (n) => this.datetime.setType(n)), y(this.code, (n) => this.datetime.setCode(n)), y(this.date, (n) => this.datetime.setDate(n)), this.datetime.setWatch(() => jt(this.date));
3144
+ ), f(this.item, (n) => {
3145
+ this.date.value = A(n);
3146
+ }), f(this.type, (n) => this.datetime.setType(n)), f(this.code, (n) => this.datetime.setCode(n)), f(this.date, (n) => this.datetime.setDate(n)), this.datetime.setWatch(() => Wt(this.date));
2864
3147
  }
2865
3148
  /**
2866
3149
  * Returns the basic data for the date.
@@ -2892,7 +3175,7 @@ class Ae {
2892
3175
  * Возвращает формат часов.
2893
3176
  */
2894
3177
  getHoursType() {
2895
- return c(() => this.date.value && this.datetime.getHoursType());
3178
+ return l(() => this.date.value && this.datetime.getHoursType());
2896
3179
  }
2897
3180
  /**
2898
3181
  * Returns the code of the first day of the week.
@@ -2900,7 +3183,7 @@ class Ae {
2900
3183
  * Возвращает код первого дня недели.
2901
3184
  */
2902
3185
  getFirstDayCode() {
2903
- return c(() => this.date.value && this.datetime.getFirstDayCode());
3186
+ return l(() => this.date.value && this.datetime.getFirstDayCode());
2904
3187
  }
2905
3188
  /**
2906
3189
  * The method returns the year of the specified date according to local time.
@@ -2958,7 +3241,7 @@ class Ae {
2958
3241
  * Возвращает последний день недели.
2959
3242
  */
2960
3243
  getMaxDay() {
2961
- return c(() => this.date.value && this.datetime.getMaxDay());
3244
+ return l(() => this.date.value && this.datetime.getMaxDay());
2962
3245
  }
2963
3246
  /**
2964
3247
  * Enables language-sensitive date and time formatting.
@@ -2968,7 +3251,7 @@ class Ae {
2968
3251
  * @param styleOptions the representation of the month. представление месяца
2969
3252
  */
2970
3253
  locale(t = this.type.value, e) {
2971
- return c(() => this.date.value && this.datetime.locale(t, e));
3254
+ return l(() => this.date.value && this.datetime.locale(t, e));
2972
3255
  }
2973
3256
  /**
2974
3257
  * Output of standard data.
@@ -2977,10 +3260,10 @@ class Ae {
2977
3260
  * @param timeZone add time zone. добавить временную зону
2978
3261
  */
2979
3262
  standard(t = !0) {
2980
- return c(() => this.date.value && this.datetime.standard(t));
3263
+ return l(() => this.date.value && this.datetime.standard(t));
2981
3264
  }
2982
3265
  }
2983
- class Ne extends xt {
3266
+ class di extends Ft {
2984
3267
  /**
2985
3268
  * Classes Constructor
2986
3269
  * @param elementSelector element/ элемент
@@ -2993,26 +3276,26 @@ class Ne extends xt {
2993
3276
  * @param detail an event-dependent value associated with the event/ зависимое от события
2994
3277
  * значение, связанное с событием
2995
3278
  */
2996
- constructor(t, e, s = ["click"], n, a, o) {
2997
- const u = S(t), h = S(e);
3279
+ constructor(t, e, s = ["click"], n, o, a) {
3280
+ const c = B(t), h = B(e);
2998
3281
  super(
2999
- u.value,
3282
+ c.value,
3000
3283
  s,
3001
3284
  n,
3002
- a,
3003
- o
3004
- ), h.value && this.setElementControl(h.value), y(u, (l) => this.setElement(l)), y(h, (l) => this.setElementControl(l));
3285
+ o,
3286
+ a
3287
+ ), h.value && this.setElementControl(h.value), f(c, (d) => this.setElement(d)), f(h, (d) => this.setElementControl(d));
3005
3288
  }
3006
3289
  }
3007
- class Ie {
3008
- code;
3009
- flag;
3290
+ class gi {
3010
3291
  /**
3011
3292
  * Constructor
3012
3293
  * @param code country and language code/ код страны и языка
3013
3294
  */
3014
- constructor(t = p.getLocation()) {
3015
- this.code = S(t), this.flag = new x(this.code.value), y(this.code, (e) => this.flag.setCode(e));
3295
+ constructor(t = w.getLocation()) {
3296
+ u(this, "code");
3297
+ u(this, "flag");
3298
+ this.code = B(t), this.flag = new ot(this.code.value), f(this.code, (e) => this.flag.setCode(e));
3016
3299
  }
3017
3300
  /**
3018
3301
  * Obtaining a reactive object with the country code.
@@ -3029,7 +3312,7 @@ class Ie {
3029
3312
  * @param code country code/ код страны
3030
3313
  */
3031
3314
  get(t = this.code.value) {
3032
- return c(() => this.flag.get(t));
3315
+ return l(() => this.flag.get(t));
3033
3316
  }
3034
3317
  /**
3035
3318
  * Getting a link to the flag.
@@ -3038,7 +3321,10 @@ class Ie {
3038
3321
  * @param code country code/ код страны
3039
3322
  */
3040
3323
  getFlag(t = this.code.value) {
3041
- return c(() => this.flag.get(t)?.icon);
3324
+ return l(() => {
3325
+ var e;
3326
+ return (e = this.flag.get(t)) == null ? void 0 : e.icon;
3327
+ });
3042
3328
  }
3043
3329
  /**
3044
3330
  * Getting a list of countries by an array of codes.
@@ -3047,7 +3333,7 @@ class Ie {
3047
3333
  * @param codes country code/ код страны
3048
3334
  */
3049
3335
  getList(t) {
3050
- return c(() => this.flag.getList(t));
3336
+ return l(() => this.flag.getList(t));
3051
3337
  }
3052
3338
  /**
3053
3339
  * Getting a list of countries by an array of codes in national language.
@@ -3056,15 +3342,10 @@ class Ie {
3056
3342
  * @param codes country code/ код страны.
3057
3343
  */
3058
3344
  getNational(t) {
3059
- return c(() => this.flag.getNational(t));
3345
+ return l(() => this.flag.getNational(t));
3060
3346
  }
3061
3347
  }
3062
- class Dt {
3063
- static item = P(p.get());
3064
- static country = c(() => this.item.value.country);
3065
- static language = c(() => this.item.value.language);
3066
- static standard = c(() => this.item.value.standard);
3067
- static firstDay = c(() => this.item.value.firstDay);
3348
+ const C = class C {
3068
3349
  /**
3069
3350
  * Information about the current country.
3070
3351
  *
@@ -3113,19 +3394,24 @@ class Dt {
3113
3394
  * код страны, полный вид язык-страна или один из них
3114
3395
  */
3115
3396
  static set(t) {
3116
- p.set(t, !0), this.item.value = p.getItem();
3397
+ w.set(t, !0), this.item.value = w.getItem();
3117
3398
  }
3118
- }
3119
- class oe {
3120
- location;
3121
- intl;
3399
+ };
3400
+ u(C, "item", Z(w.get())), u(C, "country", l(() => C.item.value.country)), u(C, "language", l(() => C.item.value.language)), u(C, "standard", l(() => C.item.value.standard)), u(C, "firstDay", l(() => C.item.value.firstDay));
3401
+ let K = C;
3402
+ class ye {
3122
3403
  /**
3123
3404
  * Constructor
3124
3405
  * @param code country code, full form language-country or one of them/
3125
3406
  * код страны, полный вид язык-страна или один из них
3126
3407
  */
3127
3408
  constructor(t) {
3128
- this.location = S(t), this.intl = c(() => new I(this.location.value ?? Dt.getLanguage().value));
3409
+ u(this, "location");
3410
+ u(this, "intl");
3411
+ this.location = B(t), this.intl = l(() => {
3412
+ var e;
3413
+ return new P((e = this.location.value) != null ? e : K.getLanguage().value);
3414
+ });
3129
3415
  }
3130
3416
  /**
3131
3417
  * The consistent translation of language, region and script display names.
@@ -3136,7 +3422,7 @@ class oe {
3136
3422
  * объект с некоторыми или всеми из следующих свойств
3137
3423
  */
3138
3424
  display(t, e) {
3139
- return c(() => this.intl.value.display(g(t), e));
3425
+ return l(() => this.intl.value.display(m(t), e));
3140
3426
  }
3141
3427
  /**
3142
3428
  * Get display names of language.
@@ -3146,7 +3432,7 @@ class oe {
3146
3432
  * @param style the formatting style to use/ используемый стиль форматирования
3147
3433
  */
3148
3434
  languageName(t, e) {
3149
- return c(() => this.intl.value.languageName(g(t), e));
3435
+ return l(() => this.intl.value.languageName(m(t), e));
3150
3436
  }
3151
3437
  /**
3152
3438
  * Get display names of region.
@@ -3156,7 +3442,7 @@ class oe {
3156
3442
  * @param style the formatting style to use/ используемый стиль форматирования
3157
3443
  */
3158
3444
  countryName(t, e) {
3159
- return c(() => this.intl.value.countryName(g(t), e));
3445
+ return l(() => this.intl.value.countryName(m(t), e));
3160
3446
  }
3161
3447
  /**
3162
3448
  * In basic use without specifying a locale, a formatted string.
@@ -3168,7 +3454,7 @@ class oe {
3168
3454
  * или всеми свойствами
3169
3455
  */
3170
3456
  number(t, e) {
3171
- return c(() => this.intl.value.number(g(t), e));
3457
+ return l(() => this.intl.value.number(m(t), e));
3172
3458
  }
3173
3459
  /**
3174
3460
  * Decimal point symbol.
@@ -3176,7 +3462,7 @@ class oe {
3176
3462
  * Символ десятичной точки.
3177
3463
  */
3178
3464
  decimal() {
3179
- return c(() => this.intl.value.decimal());
3465
+ return l(() => this.intl.value.decimal());
3180
3466
  }
3181
3467
  /**
3182
3468
  * Currency formatting.
@@ -3188,10 +3474,10 @@ class oe {
3188
3474
  * @param numberOnly do not display the currency symbol/ не выводить значок валюты
3189
3475
  */
3190
3476
  currency(t, e, s = !1) {
3191
- return c(
3477
+ return l(
3192
3478
  () => this.intl.value.currency(
3193
- g(t),
3194
- g(e),
3479
+ m(t),
3480
+ m(e),
3195
3481
  s
3196
3482
  )
3197
3483
  );
@@ -3206,7 +3492,7 @@ class oe {
3206
3492
  * в форматировании блока
3207
3493
  */
3208
3494
  unit(t, e) {
3209
- return c(() => this.intl.value.unit(g(t), e));
3495
+ return l(() => this.intl.value.unit(m(t), e));
3210
3496
  }
3211
3497
  /**
3212
3498
  * Number as a percentage.
@@ -3216,7 +3502,7 @@ class oe {
3216
3502
  * @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
3217
3503
  */
3218
3504
  percent(t, e) {
3219
- return c(() => this.intl.value.percent(g(t), e));
3505
+ return l(() => this.intl.value.percent(m(t), e));
3220
3506
  }
3221
3507
  /**
3222
3508
  * Number as a percentage (unit).
@@ -3227,7 +3513,7 @@ class oe {
3227
3513
  * объект с некоторыми или всеми свойствами
3228
3514
  */
3229
3515
  percentBy100(t, e) {
3230
- return c(() => this.intl.value.percentBy100(g(t), e));
3516
+ return l(() => this.intl.value.percentBy100(m(t), e));
3231
3517
  }
3232
3518
  /**
3233
3519
  * Enables language-sensitive date and time formatting.
@@ -3239,7 +3525,7 @@ class oe {
3239
3525
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
3240
3526
  */
3241
3527
  date(t, e, s, n) {
3242
- return c(() => this.intl.value.date(g(t), e, s, n));
3528
+ return l(() => this.intl.value.date(m(t), e, s, n));
3243
3529
  }
3244
3530
  /**
3245
3531
  * Enables language-sensitive relative time formatting.
@@ -3251,7 +3537,7 @@ class oe {
3251
3537
  * @param todayValue current day/ текущий день
3252
3538
  */
3253
3539
  relative(t, e, s) {
3254
- return c(() => this.intl.value.relative(g(t), e, s));
3540
+ return l(() => this.intl.value.relative(m(t), e, s));
3255
3541
  }
3256
3542
  /**
3257
3543
  * Enables language-sensitive relative time formatting
@@ -3271,15 +3557,15 @@ class oe {
3271
3557
  * @param type type of data format/ тип формата data
3272
3558
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
3273
3559
  */
3274
- relativeLimit(t, e, s, n, a, o, u) {
3275
- return c(() => this.intl.value.relativeLimit(
3276
- g(t),
3560
+ relativeLimit(t, e, s, n, o, a, c) {
3561
+ return l(() => this.intl.value.relativeLimit(
3562
+ m(t),
3277
3563
  e,
3278
3564
  s,
3279
3565
  n,
3280
- a,
3281
3566
  o,
3282
- u
3567
+ a,
3568
+ c
3283
3569
  ));
3284
3570
  }
3285
3571
  /**
@@ -3290,7 +3576,7 @@ class oe {
3290
3576
  * @param style the representation of the month/ представление месяца
3291
3577
  */
3292
3578
  month(t, e) {
3293
- return c(() => this.intl.value.month(g(t), e));
3579
+ return l(() => this.intl.value.month(m(t), e));
3294
3580
  }
3295
3581
  /**
3296
3582
  * Array to list of months.
@@ -3299,7 +3585,7 @@ class oe {
3299
3585
  * @param style the representation of the month/ представление месяца
3300
3586
  */
3301
3587
  months(t) {
3302
- return c(() => this.intl.value.months(t));
3588
+ return l(() => this.intl.value.months(t));
3303
3589
  }
3304
3590
  /**
3305
3591
  * Returns names of days of the week.
@@ -3309,7 +3595,7 @@ class oe {
3309
3595
  * @param style the representation of the weekday/ представление о дне недели
3310
3596
  */
3311
3597
  weekday(t, e) {
3312
- return c(() => this.intl.value.weekday(g(t), e));
3598
+ return l(() => this.intl.value.weekday(m(t), e));
3313
3599
  }
3314
3600
  /**
3315
3601
  * An array of the list of names of the days of the week.
@@ -3318,7 +3604,7 @@ class oe {
3318
3604
  * @param style the representation of the weekday/ представление о дне недели
3319
3605
  */
3320
3606
  weekdays(t) {
3321
- return c(() => this.intl.value.weekdays(t));
3607
+ return l(() => this.intl.value.weekdays(t));
3322
3608
  }
3323
3609
  /**
3324
3610
  * Time.
@@ -3327,14 +3613,10 @@ class oe {
3327
3613
  * @param value the date to format/ дата для форматирования
3328
3614
  */
3329
3615
  time(t) {
3330
- return c(() => this.intl.value.time(g(t)));
3616
+ return l(() => this.intl.value.time(m(t)));
3331
3617
  }
3332
3618
  }
3333
- function kt(i, t = "ig", e = ":value") {
3334
- const s = i.replace(/([[\]\\^$.?*+()/])/g, "\\$1");
3335
- return new RegExp(e.replace(/:value/g, s), t);
3336
- }
3337
- class Mt {
3619
+ class kt {
3338
3620
  /**
3339
3621
  * Creates an instance of ListData for managing list data.
3340
3622
  *
@@ -3349,143 +3631,147 @@ class Mt {
3349
3631
  * @param lite Threshold for lite mode / порог для облегченного режима
3350
3632
  * @param parent Parent identifier / идентификатор родителя
3351
3633
  */
3352
- constructor(t, e, s, n, a, o, u, h, l) {
3353
- this.list = t, this.focus = e, this.highlight = s, this.highlightLengthStart = n, this.selected = a, this.keyValue = o, this.keyLabel = u, this.lite = h, this.parent = l, ct(t) && y(t, () => {
3634
+ constructor(t, e, s, n, o, a, c, h, d) {
3635
+ u(this, "subList", {});
3636
+ /**
3637
+ * Returns a list for forming a list.
3638
+ *
3639
+ * Возвращает список для формирования списка.
3640
+ */
3641
+ u(this, "data", l(
3642
+ () => $(
3643
+ m(this.list) || [],
3644
+ (t, e) => this.initItem(e, t)
3645
+ )
3646
+ ));
3647
+ /**
3648
+ * Returns a simplified list for quick loading.
3649
+ *
3650
+ * Возвращает упрощенный список для быстрой загрузки.
3651
+ */
3652
+ u(this, "liteData", l(() => {
3653
+ if (this.isLite()) {
3654
+ const t = [];
3655
+ for (const e of this.data.value) {
3656
+ const s = {
3657
+ parent: this.parent,
3658
+ index: e.index,
3659
+ type: e.type,
3660
+ label: e.label,
3661
+ description: e.description,
3662
+ value: e.value
3663
+ };
3664
+ "description" in e && (s.description = e.description), t.push(s);
3665
+ }
3666
+ return t;
3667
+ }
3668
+ return this.data.value;
3669
+ }));
3670
+ /**
3671
+ * Returns a list of records with all additional data.
3672
+ *
3673
+ * Возвращает список записей со всеми дополнительными данными.
3674
+ */
3675
+ u(this, "fullData", l(() => {
3676
+ const t = this.getFocus(), e = this.getHighlight(), s = this.getSelected();
3677
+ return $(
3678
+ this.data.value,
3679
+ (n) => ({
3680
+ ...n,
3681
+ focus: t === n.index,
3682
+ highlight: e,
3683
+ selected: j(n.index, s)
3684
+ })
3685
+ );
3686
+ }));
3687
+ /**
3688
+ * Returns a map of all entries.
3689
+ *
3690
+ * Возвращает карту всех записей.
3691
+ */
3692
+ u(this, "map", l(() => {
3693
+ const t = [];
3694
+ return this.data.value.forEach((e) => {
3695
+ switch (e.type) {
3696
+ case "item":
3697
+ t.push(e);
3698
+ break;
3699
+ case "group":
3700
+ case "menu":
3701
+ t.push(
3702
+ e,
3703
+ ...this.getSubList(e).map.value
3704
+ );
3705
+ break;
3706
+ }
3707
+ }), t;
3708
+ }));
3709
+ /** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
3710
+ u(this, "mapItems", l(() => this.map.value.filter((t) => t.type === "item")));
3711
+ /**
3712
+ * Returns a list consisting only of values for selection.
3713
+ *
3714
+ * Возвращает список, состоящий только из значений для выбора.
3715
+ */
3716
+ u(this, "items", l(() => this.map.value.filter(
3717
+ (t) => t.type === "item" || t.type === "group" || t.type === "menu"
3718
+ )));
3719
+ /**
3720
+ * Finds the first element that meets the search conditions.
3721
+ *
3722
+ * Находит первый элемент, соответствующий условиям поиска.
3723
+ */
3724
+ u(this, "highlightFirstItem", l(() => {
3725
+ const t = this.getHighlight(), e = t && t.length >= this.getHighlightLengthStart() && St(t, "i");
3726
+ return e ? this.map.value.findIndex(
3727
+ (s) => {
3728
+ var n, o, a;
3729
+ return ((n = s.label) == null ? void 0 : n.toString().match(e)) || ((o = s.index) == null ? void 0 : o.toString().match(e)) || ((a = s.search) == null ? void 0 : a.toString().match(e));
3730
+ }
3731
+ ) : -1;
3732
+ }));
3733
+ /**
3734
+ * Is there a selected item.
3735
+ *
3736
+ * Есть ли выбранный элемент.
3737
+ */
3738
+ u(this, "isSelected", l(() => {
3739
+ const t = this.getSelected();
3740
+ return !!t && this.mapItems.value.findIndex((e) => j(e.index, t)) !== -1;
3741
+ }));
3742
+ /**
3743
+ * Returns a list of selected items on the map.
3744
+ *
3745
+ * Возвращает список выделенных элементов на карте.
3746
+ */
3747
+ u(this, "selectedList", l(() => {
3748
+ const t = this.getSelected();
3749
+ return t && this.isSelected.value ? this.mapItems.value.filter((e) => j(e.index, t)) : [];
3750
+ }));
3751
+ /**
3752
+ * Returns a list of selected items on the map.
3753
+ *
3754
+ * Возвращает список выделенных элементов на карте.
3755
+ */
3756
+ u(this, "selectedNames", l(() => nt(this.selectedList.value, "label")));
3757
+ /**
3758
+ * Returns a list of selected item values on the map.
3759
+ *
3760
+ * Возвращает список значений выделенных элементов на карте.
3761
+ */
3762
+ u(this, "selectedValues", l(() => nt(this.selectedList.value, "value")));
3763
+ this.list = t, this.focus = e, this.highlight = s, this.highlightLengthStart = n, this.selected = o, this.keyValue = a, this.keyLabel = c, this.lite = h, this.parent = d, Q(t) && f(t, () => {
3354
3764
  this.subList = {};
3355
3765
  });
3356
3766
  }
3357
- subList = {};
3358
- /**
3359
- * Returns a list for forming a list.
3360
- *
3361
- * Возвращает список для формирования списка.
3362
- */
3363
- data = c(
3364
- () => f(
3365
- g(this.list) || [],
3366
- (t, e) => this.initItem(e, t)
3367
- )
3368
- );
3369
- /**
3370
- * Returns a simplified list for quick loading.
3371
- *
3372
- * Возвращает упрощенный список для быстрой загрузки.
3373
- */
3374
- liteData = c(() => {
3375
- if (this.isLite()) {
3376
- const t = [];
3377
- for (const e of this.data.value) {
3378
- const s = {
3379
- parent: this.parent,
3380
- index: e.index,
3381
- type: e.type,
3382
- label: e.label,
3383
- description: e.description,
3384
- value: e.value
3385
- };
3386
- "description" in e && (s.description = e.description), t.push(s);
3387
- }
3388
- return t;
3389
- }
3390
- return this.data.value;
3391
- });
3392
- /**
3393
- * Returns a list of records with all additional data.
3394
- *
3395
- * Возвращает список записей со всеми дополнительными данными.
3396
- */
3397
- fullData = c(() => {
3398
- const t = this.getFocus(), e = this.getHighlight(), s = this.getSelected();
3399
- return f(
3400
- this.data.value,
3401
- (n) => ({
3402
- ...n,
3403
- focus: t === n.index,
3404
- highlight: e,
3405
- selected: F(n.index, s)
3406
- })
3407
- );
3408
- });
3409
- /**
3410
- * Returns a map of all entries.
3411
- *
3412
- * Возвращает карту всех записей.
3413
- */
3414
- map = c(() => {
3415
- const t = [];
3416
- return this.data.value.forEach((e) => {
3417
- switch (e.type) {
3418
- case "item":
3419
- t.push(e);
3420
- break;
3421
- case "group":
3422
- case "menu":
3423
- t.push(
3424
- e,
3425
- ...this.getSubList(e).map.value
3426
- );
3427
- break;
3428
- }
3429
- }), t;
3430
- });
3431
- /** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
3432
- mapItems = c(() => this.map.value.filter((t) => t.type === "item"));
3433
- /**
3434
- * Returns a list consisting only of values for selection.
3435
- *
3436
- * Возвращает список, состоящий только из значений для выбора.
3437
- */
3438
- items = c(() => this.map.value.filter(
3439
- (t) => t.type === "item" || t.type === "group" || t.type === "menu"
3440
- ));
3441
- /**
3442
- * Finds the first element that meets the search conditions.
3443
- *
3444
- * Находит первый элемент, соответствующий условиям поиска.
3445
- */
3446
- highlightFirstItem = c(() => {
3447
- const t = this.getHighlight(), e = t && t.length >= this.getHighlightLengthStart() && kt(t, "i");
3448
- return e ? this.map.value.findIndex(
3449
- (s) => s.label?.toString().match(e) || s.index?.toString().match(e) || s.search?.toString().match(e)
3450
- ) : -1;
3451
- });
3452
- /**
3453
- * Is there a selected item.
3454
- *
3455
- * Есть ли выбранный элемент.
3456
- */
3457
- isSelected = c(() => {
3458
- const t = this.getSelected();
3459
- return !!t && this.mapItems.value.findIndex((e) => F(e.index, t)) !== -1;
3460
- });
3461
- /**
3462
- * Returns a list of selected items on the map.
3463
- *
3464
- * Возвращает список выделенных элементов на карте.
3465
- */
3466
- selectedList = c(() => {
3467
- const t = this.getSelected();
3468
- return t && this.isSelected.value ? this.mapItems.value.filter((e) => F(e.index, t)) : [];
3469
- });
3470
- /**
3471
- * Returns a list of selected items on the map.
3472
- *
3473
- * Возвращает список выделенных элементов на карте.
3474
- */
3475
- selectedNames = c(() => nt(this.selectedList.value, "label"));
3476
- /**
3477
- * Returns a list of selected item values on the map.
3478
- *
3479
- * Возвращает список значений выделенных элементов на карте.
3480
- */
3481
- selectedValues = c(() => nt(this.selectedList.value, "value"));
3482
3767
  /**
3483
3768
  * Checks whether it is necessary to first display a simplified version.
3484
3769
  *
3485
3770
  * Проверяет, надо ли сначала вывести упрощенную версию.
3486
3771
  */
3487
3772
  isLite() {
3488
- return !!(this.lite?.value && this.data.value.length > this.lite.value);
3773
+ var t;
3774
+ return !!((t = this.lite) != null && t.value && this.data.value.length > this.lite.value);
3489
3775
  }
3490
3776
  /**
3491
3777
  * Checks if an element is in focus.
@@ -3534,7 +3820,8 @@ class Mt {
3534
3820
  * Возвращает значения в фокусе.
3535
3821
  */
3536
3822
  getFocus() {
3537
- return this.focus?.value;
3823
+ var t;
3824
+ return (t = this.focus) == null ? void 0 : t.value;
3538
3825
  }
3539
3826
  /**
3540
3827
  * Returns the selected value.
@@ -3542,7 +3829,8 @@ class Mt {
3542
3829
  * Возвращает выделенного значение.
3543
3830
  */
3544
3831
  getHighlight() {
3545
- return this.highlight?.value;
3832
+ var t;
3833
+ return (t = this.highlight) == null ? void 0 : t.value;
3546
3834
  }
3547
3835
  /**
3548
3836
  * Returns the minimum length for highlight to start.
@@ -3550,7 +3838,8 @@ class Mt {
3550
3838
  * Возвращает минимальную длину для начала выделения.
3551
3839
  */
3552
3840
  getHighlightLengthStart() {
3553
- return this.highlightLengthStart?.value ?? 2;
3841
+ var t, e;
3842
+ return (e = (t = this.highlightLengthStart) == null ? void 0 : t.value) != null ? e : 2;
3554
3843
  }
3555
3844
  /**
3556
3845
  * Returns the selected value.
@@ -3558,7 +3847,8 @@ class Mt {
3558
3847
  * Возвращает выбранное значение.
3559
3848
  */
3560
3849
  getSelected() {
3561
- return this.selected?.value;
3850
+ var t;
3851
+ return (t = this.selected) == null ? void 0 : t.value;
3562
3852
  }
3563
3853
  /**
3564
3854
  * Returns an item by its index.
@@ -3581,7 +3871,8 @@ class Mt {
3581
3871
  * @param key item key/ ключ элемента
3582
3872
  */
3583
3873
  getItemByKey(t) {
3584
- return this.map.value?.[t];
3874
+ var e;
3875
+ return (e = this.map.value) == null ? void 0 : e[t];
3585
3876
  }
3586
3877
  /**
3587
3878
  * Returns the first item with the specified parent.
@@ -3608,7 +3899,7 @@ class Mt {
3608
3899
  * @param item List item data/ данные элемента списка
3609
3900
  */
3610
3901
  getSubList(t) {
3611
- return t.index in this.subList || (this.subList[t.index] = new Mt(
3902
+ return t.index in this.subList || (this.subList[t.index] = new kt(
3612
3903
  t.value,
3613
3904
  this.focus,
3614
3905
  this.highlight,
@@ -3649,7 +3940,7 @@ class Mt {
3649
3940
  * @param label item label / метка элемента
3650
3941
  */
3651
3942
  getIndex(t, e, s, n) {
3652
- return t && !m(t) ? t : e && !m(e) ? e : s && n;
3943
+ return t && !S(t) ? t : e && !S(e) ? e : s && n;
3653
3944
  }
3654
3945
  /**
3655
3946
  * Creates an object of the record element.
@@ -3659,20 +3950,21 @@ class Mt {
3659
3950
  * @param item selected element/ выбранный элемент
3660
3951
  */
3661
3952
  initItem(t, e) {
3662
- if (L(e)) {
3663
- const s = e?.[this.keyValue?.value ?? "value"], n = e?.[this.keyLabel?.value ?? "label"] ?? s, a = this.getIndex(
3664
- e?.index,
3665
- s,
3953
+ var s, n, o, a, c, h;
3954
+ if (F(e)) {
3955
+ const d = e == null ? void 0 : e[(n = (s = this.keyValue) == null ? void 0 : s.value) != null ? n : "value"], g = (c = e == null ? void 0 : e[(a = (o = this.keyLabel) == null ? void 0 : o.value) != null ? a : "label"]) != null ? c : d, D = this.getIndex(
3956
+ e == null ? void 0 : e.index,
3957
+ d,
3666
3958
  t,
3667
- n
3959
+ g
3668
3960
  );
3669
3961
  return {
3670
3962
  ...e,
3671
3963
  parent: this.parent,
3672
- index: a,
3673
- type: e?.type ?? "item",
3674
- label: n,
3675
- value: s
3964
+ index: D,
3965
+ type: (h = e == null ? void 0 : e.type) != null ? h : "item",
3966
+ label: g,
3967
+ value: d
3676
3968
  };
3677
3969
  }
3678
3970
  return {
@@ -3684,8 +3976,7 @@ class Mt {
3684
3976
  };
3685
3977
  }
3686
3978
  }
3687
- class Be {
3688
- static router;
3979
+ class $e {
3689
3980
  /**
3690
3981
  * Get router instance.
3691
3982
  *
@@ -3722,128 +4013,126 @@ class Be {
3722
4013
  this.router || this.set(t);
3723
4014
  }
3724
4015
  }
3725
- class Te {
3726
- /**
3727
- * Reactive item.
3728
- *
3729
- * Реактивный элемент.
3730
- */
3731
- item = $();
4016
+ u($e, "router");
4017
+ class fi {
3732
4018
  /**
3733
4019
  * Constructor
3734
4020
  */
3735
4021
  constructor() {
3736
- St.is().then((t) => {
4022
+ /**
4023
+ * Reactive item.
4024
+ *
4025
+ * Реактивный элемент.
4026
+ */
4027
+ u(this, "item", p());
4028
+ /**
4029
+ * Checks whether the scroll width is defined.
4030
+ *
4031
+ * Проверяет, определена ли ширина скролла.
4032
+ */
4033
+ u(this, "is", l(() => this.item.value !== void 0));
4034
+ bt.is().then((t) => {
3737
4035
  this.item.value = t;
3738
4036
  });
3739
4037
  }
3740
- /**
3741
- * Checks whether the scroll width is defined.
3742
- *
3743
- * Проверяет, определена ли ширина скролла.
3744
- */
3745
- is = c(() => this.item.value !== void 0);
3746
4038
  }
3747
- const ce = (i) => typeof i == "string" ? { method: i } : i || {};
3748
- let U;
3749
- function Fe(i, t, e = !0, s, n, a) {
3750
- const o = $(), u = S(ce(t)), h = $(!1), l = $(!1);
3751
- let C = !0, D = 0;
3752
- const V = async () => {
3753
- if (C)
4039
+ const pe = (i) => typeof i == "string" ? { method: i } : i || {};
4040
+ let J;
4041
+ function mi(i, t, e = !0, s, n, o) {
4042
+ const a = p(), c = B(pe(t)), h = p(!1), d = p(!1);
4043
+ let g = !0, D = 0;
4044
+ const H = async () => {
4045
+ if (g)
3754
4046
  return;
3755
- const v = g(i);
3756
- if ((!s || s.value) && v) {
3757
- h.value = !0, l.value = !0;
3758
- let q = {};
3759
- const gt = await H.request({
3760
- path: v,
3761
- ...u.value
4047
+ const k = m(i);
4048
+ if ((!s || s.value) && k) {
4049
+ h.value = !0, d.value = !0;
4050
+ let M = {};
4051
+ const ft = await V.request({
4052
+ path: k,
4053
+ ...c.value
3762
4054
  });
3763
- gt && (q = gt), n ? o.value = n(q) : o.value = q, h.value = !1;
3764
- } else o.value !== void 0 && (o.value = void 0);
3765
- }, It = () => {
3766
- const v = [];
3767
- e && v.push(u), ct(i) && v.push(i), s && v.push(s), U && v.push(U), v.length > 0 && y(v, async () => {
3768
- h.value || await V();
4055
+ ft && (M = ft), n ? a.value = n(M) : a.value = M, h.value = !1;
4056
+ } else a.value !== void 0 && (a.value = void 0);
4057
+ }, X = () => {
4058
+ const k = [];
4059
+ e && k.push(c), Q(i) && k.push(i), s && k.push(s), J && k.push(J), k.length > 0 && f(k, async () => {
4060
+ h.value || await H();
3769
4061
  });
3770
4062
  };
3771
4063
  return {
3772
4064
  get data() {
3773
- return C && (C = !1, V().then()), It(), a && (D++, it(() => {
3774
- D--, D < 1 && (console.warn("useApiRef: unmounted"), o.value = void 0, C = !0, D = 0);
3775
- })), o;
4065
+ return g && (g = !1, H().then()), X(), o && (D++, rt(() => {
4066
+ D--, D < 1 && (console.warn("useApiRef: unmounted"), a.value = void 0, g = !0, D = 0);
4067
+ })), a;
3776
4068
  },
3777
4069
  get isStarting() {
3778
- return c(() => o.value === void 0);
4070
+ return l(() => a.value === void 0);
4071
+ },
4072
+ get loading() {
4073
+ return l(() => h.value);
3779
4074
  },
3780
- loading: h,
3781
4075
  get reading() {
3782
- return c(() => l.value);
4076
+ return l(() => d.value);
3783
4077
  },
3784
- reset: V
4078
+ reset: H
3785
4079
  };
3786
4080
  }
3787
- const Ee = (i) => {
3788
- U || (U = i);
4081
+ const yi = (i) => {
4082
+ J || (J = i);
3789
4083
  };
3790
- function ue(i, t) {
4084
+ function ve(i, t) {
3791
4085
  const e = `broadcast--${i}`;
3792
- if (e in X)
3793
- return X[e];
3794
- const s = $(A(t)), n = new Zt(
4086
+ if (e in G)
4087
+ return G[e];
4088
+ const s = p(lt(t)), n = new _t(
3795
4089
  e,
3796
- (a) => {
3797
- s.value !== a.data.message && (s.value = a.data.message);
4090
+ (o) => {
4091
+ s.value !== o.data.message && (s.value = o.data.message);
3798
4092
  }
3799
4093
  );
3800
- return y(s, (a) => n.post({ message: a })), X[e] = s, s;
4094
+ return f(s, (o) => n.post({ message: o })), G[e] = s, s;
3801
4095
  }
3802
- const X = {};
3803
- function xe(i, t, e) {
4096
+ const G = {};
4097
+ function $i(i, t, e) {
3804
4098
  if (i in tt)
3805
4099
  return tt[i];
3806
- const s = new rt(i), n = ue(
4100
+ const s = new xt(i), n = ve(
3807
4101
  `__cookie:${i}`,
3808
4102
  s.get(t, e)
3809
4103
  );
3810
- return y(n, (a) => {
3811
- s.set(a, e);
4104
+ return f(n, (o) => {
4105
+ s.set(o, e);
3812
4106
  }), tt[i] = n, n;
3813
4107
  }
3814
4108
  const tt = {};
3815
- function Re() {
3816
- return new oe();
4109
+ function pi() {
4110
+ return new ye();
3817
4111
  }
3818
- function Oe(i, t) {
4112
+ function vi(i, t) {
3819
4113
  if (i in et)
3820
4114
  return et[i];
3821
- const e = P(R.get(i, t));
3822
- return y(e, (s) => R.set(i, s)), R.addWatch(i, (s) => {
4115
+ const e = Z(O.get(i, t));
4116
+ return f(e, (s) => O.set(i, s)), O.addWatch(i, (s) => {
3823
4117
  e.value = s;
3824
4118
  }), et[i] = e, e;
3825
4119
  }
3826
- const et = {};
3827
- let $t = O(1e5, 9e5);
3828
- function G(i, t) {
3829
- const e = K(i);
3830
- return e ? (W(e.id) || e.setAttribute("id", `id-${$t++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${$t++}`;
3831
- }
3832
- const We = () => {
4120
+ const et = {}, bi = () => {
3833
4121
  const i = {}, t = "IntersectionObserver" in window ? new IntersectionObserver(
3834
4122
  (s) => {
3835
4123
  s.forEach((n) => {
3836
- const a = G(n.target);
3837
- a in i && (i[a].status.value = n.isIntersecting);
4124
+ const o = Y(n.target);
4125
+ o in i && (i[o].status.value = n.isIntersecting);
3838
4126
  });
3839
4127
  },
3840
4128
  {
3841
4129
  rootMargin: "128px 0px"
3842
4130
  }
3843
4131
  ) : void 0, e = (s) => {
4132
+ var n;
3844
4133
  if (s) {
3845
- const n = G(s);
3846
- n in i && (t?.unobserve(s), i[n]?.stopWatch(), delete i[n]);
4134
+ const o = Y(s);
4135
+ o in i && (t == null || t.unobserve(s), (n = i[o]) == null || n.stopWatch(), delete i[o]);
3847
4136
  }
3848
4137
  };
3849
4138
  return {
@@ -3855,14 +4144,14 @@ const We = () => {
3855
4144
  * @param element element for tracking/ элемента для отслеживания
3856
4145
  */
3857
4146
  addLazyItem(s) {
3858
- const n = P(!t);
4147
+ const n = Z(!t);
3859
4148
  if (t) {
3860
- const a = y(s, (o, u) => {
3861
- if (u && t.unobserve(u), s.value) {
3862
- const h = G(s.value);
4149
+ const o = f(s, (a, c) => {
4150
+ if (c && t.unobserve(c), s.value) {
4151
+ const h = Y(s.value);
3863
4152
  i[h] = {
3864
4153
  status: n,
3865
- stopWatch: a
4154
+ stopWatch: o
3866
4155
  }, t.observe(s.value);
3867
4156
  } else
3868
4157
  e(s.value);
@@ -3881,444 +4170,296 @@ const We = () => {
3881
4170
  *
3882
4171
  * Удаление всех элементов из отслеживания.
3883
4172
  */
3884
- disconnectLazy: () => t?.disconnect()
4173
+ disconnectLazy: () => t == null ? void 0 : t.disconnect()
3885
4174
  };
3886
4175
  };
3887
- function Pe() {
3888
- const i = P(ft.is());
3889
- return ft.registrationEvent(({ detail: t }) => {
4176
+ function Si() {
4177
+ const i = Z(mt.is());
4178
+ return mt.registrationEvent(({ detail: t }) => {
3890
4179
  i.value = t.loading;
3891
4180
  }), i;
3892
4181
  }
3893
- function je(i, t) {
3894
- if (i in st)
3895
- return st[i];
3896
- const e = new Y(i, !0), s = $(e.get(t));
3897
- return y(s, (n) => e.set(n)), st[i] = s, s;
3898
- }
3899
- const st = {};
3900
- function he(i) {
3901
- const t = P(z.getListSync(i, !0)), e = async () => {
3902
- t.value = { ...await z.getList(i) };
3903
- };
3904
- y(Dt.getLanguage(), e);
3905
- for (const s in t.value)
3906
- if (t.value[s] === s || t.value[s] === " ") {
3907
- e().then();
3908
- break;
3909
- }
3910
- return t;
3911
- }
3912
- const He = (i) => he(i);
3913
- function Ge(i) {
3914
- return ot(i) ? i.trim() : ht(i) && i.findIndex((t) => m(t)) === -1 ? i.join(",") : m(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : i?.toString() ?? "";
3915
- }
3916
- function le(i, t) {
3917
- return Array(t).fill(i);
3918
- }
3919
- function ze(i) {
3920
- if (d())
3921
- return document.querySelector(i) ?? void 0;
3922
- }
3923
- function Ue(i) {
3924
- if (d())
3925
- return document.querySelectorAll(i);
3926
- }
3927
- function Ze(i) {
3928
- i.preventDefault(), i.stopPropagation();
3929
- }
3930
- const At = [], ge = O(1e5, 999999);
3931
- function Ye(i, t = !0, e = !1, s = !0) {
4182
+ const Ct = [], be = z(1e5, 999999);
4183
+ function Se(i, t = !0, e = !1, s = !0) {
3932
4184
  let n;
3933
- const a = `__execute_use${ge}::${G()}`, o = (...u) => {
4185
+ const o = `__execute_use${be}::${Y()}`, a = (...c) => {
3934
4186
  if (!e && s) {
3935
- const h = Ht(a, void 0);
4187
+ const h = jt(o, void 0);
3936
4188
  if (h)
3937
4189
  return h;
3938
4190
  {
3939
- let l = Object.freeze(i(...u));
3940
- return Gt(a, l), t && it(() => {
3941
- l = void 0;
3942
- }), l;
4191
+ let d = Object.freeze(i(...c));
4192
+ return Ut(o, d), t && rt(() => {
4193
+ d = void 0;
4194
+ }), d;
3943
4195
  }
3944
- } else n || (n = Object.freeze(i(...u)), t && it(() => {
4196
+ } else n || (n = Object.freeze(i(...c)), t && rt(() => {
3945
4197
  n = void 0;
3946
4198
  }));
3947
4199
  return n;
3948
4200
  };
3949
- return e && At.push(o), o;
4201
+ return e && Ct.push(a), a;
3950
4202
  }
3951
- function Ke() {
3952
- At.forEach((i) => i());
4203
+ function wi() {
4204
+ Ct.forEach((i) => i());
3953
4205
  }
3954
- function fe(i, t, e) {
3955
- const s = () => {
3956
- i(), t?.() ? fe(i, t, e) : e?.();
4206
+ const we = Se(() => {
4207
+ const i = new Gt(), t = p(i.getTitle()), e = p(i.getKeywords()), s = p(i.getDescription()), n = p(i.getImage()), o = p(i.getCanonical()), a = p(i.getRobots()), c = p(i.getAuthor()), h = p(i.getSiteName()), d = () => i.html();
4208
+ return f(t, () => {
4209
+ i.setTitle(t.value);
4210
+ }), f(e, () => {
4211
+ i.setKeywords(e.value);
4212
+ }), f(s, () => {
4213
+ i.setDescription(s.value);
4214
+ }), f(n, () => {
4215
+ i.setImage(n.value);
4216
+ }), f(o, () => {
4217
+ i.setCanonical(o.value);
4218
+ }), f(a, () => {
4219
+ i.setRobots(a.value);
4220
+ }), f(c, () => {
4221
+ i.setAuthor(c.value);
4222
+ }), f(h, () => {
4223
+ i.setSiteName(h.value);
4224
+ }), {
4225
+ meta: i,
4226
+ title: t,
4227
+ keyword: e,
4228
+ description: s,
4229
+ author: c,
4230
+ image: n,
4231
+ canonical: o,
4232
+ robots: a,
4233
+ siteName: h,
4234
+ getHtmlMeta: d
3957
4235
  };
3958
- d() ? requestAnimationFrame(s) : s();
3959
- }
3960
- function Ve(i) {
3961
- const t = {}, e = K(i);
3962
- if (e)
3963
- for (const s of e.attributes)
3964
- t[s.name] = (s?.value || s?.textContent) ?? void 0;
3965
- return t;
3966
- }
3967
- async function qe(i) {
3968
- return i?.clipboardData?.getData("text") ?? (await navigator.clipboard.readText() || "");
3969
- }
3970
- function de(i, t) {
3971
- const e = t.split(".", 2), s = e[0];
3972
- return s && i?.[s] && L(i[s]) && e?.[1] ? de(i[s], e[1]) : (s && i?.[s]) ?? "";
3973
- }
3974
- function _e(i) {
3975
- return i?.key ?? i?.code ?? i?.keyCode?.toString();
3976
- }
3977
- function Nt(i) {
3978
- return f(i, (t) => t.length);
3979
- }
3980
- function Je(i) {
3981
- return Math.max(...Nt(i));
3982
- }
3983
- function Qe(i) {
3984
- return Math.min(...Nt(i));
4236
+ }, !1, !0), Di = () => we();
4237
+ function Li(i, t) {
4238
+ if (i in it)
4239
+ return it[i];
4240
+ const e = new ut(i, !0), s = p(e.get(t));
4241
+ return f(s, (n) => e.set(n)), it[i] = s, s;
3985
4242
  }
3986
- function me(i) {
3987
- return i?.clientX || i?.targetTouches?.[0]?.clientX || i?.touches?.[0]?.clientX || 0;
3988
- }
3989
- function ye(i) {
3990
- return i?.clientY || i?.targetTouches?.[0]?.clientY || i?.touches?.[0]?.clientY || 0;
4243
+ const it = {};
4244
+ function ki(i, t, e) {
4245
+ if (i in st)
4246
+ return st[i];
4247
+ const s = new ut(i), n = p(s.get(t, e));
4248
+ return f(n, (o) => s.set(o)), y() && window.addEventListener("storage", () => {
4249
+ s.update(), n.value = s.get();
4250
+ }), st[i] = n, n;
3991
4251
  }
3992
- function Xe(i) {
3993
- return {
3994
- x: me(i),
3995
- y: ye(i)
4252
+ const st = {};
4253
+ function De(i) {
4254
+ const t = Z(q.getListSync(i, !0)), e = async () => {
4255
+ t.value = { ...await q.getList(i) };
3996
4256
  };
4257
+ f(K.getLanguage(), e);
4258
+ for (const s in t.value)
4259
+ if (t.value[s] === s || t.value[s] === " ") {
4260
+ e().then();
4261
+ break;
4262
+ }
4263
+ return t;
3997
4264
  }
3998
- function ts(i, t) {
3999
- const e = {};
4000
- return t.forEach((s) => {
4001
- s in i && i[s] !== void 0 && (e[s] = i[s]);
4002
- }), e;
4003
- }
4004
- function es(i, t = void 0) {
4005
- const e = {};
4006
- return f(i, (s, n) => {
4007
- s !== t && (e[n] = s);
4008
- }), e;
4009
- }
4010
- function ss(i) {
4011
- return L(i) ? i : {};
4012
- }
4013
- function pe(i, t) {
4014
- return le(i, t).join("");
4015
- }
4016
- function is(i, t, e = "#", s = 2, n = 12) {
4017
- const a = O(i, t), o = [];
4018
- for (let u = 0; u < a; u++)
4019
- o.push(pe(e, O(s, n)));
4020
- return o.join(" ");
4021
- }
4022
- function rs(i, t) {
4023
- const e = i ?? 0;
4024
- return t > e ? 100 / (t - e) : 0;
4025
- }
4026
- function ns(i, t) {
4027
- const e = i ?? 0;
4028
- return t > e ? (t - e) / 100 : 0;
4029
- }
4030
- const vt = 0;
4031
- function as(i, t, e) {
4032
- const s = t?.closest(i);
4033
- if (t && s && s.scrollHeight !== s.offsetHeight)
4034
- if (e) {
4035
- const n = e.getBoundingClientRect(), a = s.getBoundingClientRect(), o = t.getBoundingClientRect();
4036
- s.scrollTop = t.offsetTop - (n.top - a.top) - (n.height / 2 - o.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
4037
- } else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - vt : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + vt);
4038
- }
4039
- function os(i, t) {
4040
- return i.indexOf(t) !== -1;
4041
- }
4042
- async function cs() {
4043
- if (d()) {
4044
- const i = await St.get();
4045
- document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
4046
- }
4047
- }
4048
- function us(i, t) {
4049
- const e = {};
4050
- return m(i) && m(t) && f(i, (s, n) => {
4051
- n in t && (e[n] = s);
4052
- }), e;
4053
- }
4054
- function hs(i, t) {
4055
- let e = Object.keys(i).length !== Object.keys(t).length;
4056
- return e || f(i, (s, n) => {
4057
- s !== t?.[n] && (e = !0);
4058
- }), e;
4059
- }
4060
- function ls(i) {
4061
- switch (typeof i) {
4062
- case "number":
4063
- return !0;
4064
- case "string":
4065
- return !!i.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
4066
- default:
4067
- return !1;
4068
- }
4069
- }
4070
- function gs(i, t) {
4071
- const e = Math.floor(t);
4072
- return i >= e && i < e + 1;
4073
- }
4074
- function fs(i, t) {
4075
- return Array.isArray(i) ? i.every((e) => F(e, t)) : F(i, t);
4265
+ const Ci = (i) => De(i);
4266
+ function Ii(i, t = () => {
4267
+ }, e, s) {
4268
+ return l(
4269
+ () => {
4270
+ if (K.get().value && (e === void 0 || e())) {
4271
+ const n = i();
4272
+ if (n !== void 0)
4273
+ return n;
4274
+ }
4275
+ return lt(t);
4276
+ },
4277
+ s
4278
+ );
4076
4279
  }
4077
- function $e(i, t = {}, e = "value", s = !1) {
4078
- const n = typeof t == "string", a = n ? t : e, o = n ? {} : t;
4079
- return i ? i && L(i) && (a in i || s) ? at(o, i) : at(o, { [a]: i }) : n ? {} : { ...o };
4280
+ function Le(i, t = {}, e = "value", s = !1) {
4281
+ const n = typeof t == "string", o = n ? t : e, a = n ? {} : t;
4282
+ return i ? i && F(i) && (o in i || s) ? at(a, i) : at(a, { [o]: i }) : n ? {} : { ...a };
4080
4283
  }
4081
- function ds(i, t = {}, e = "value") {
4082
- return c(() => $e(g(i), g(t), e));
4284
+ function Ni(i, t = {}, e = "value") {
4285
+ return l(() => Le(m(i), m(t), e));
4083
4286
  }
4084
- const ms = (i, t) => {
4085
- const e = $();
4287
+ const Ai = (i, t) => {
4288
+ const e = p();
4086
4289
  let s = !0;
4087
4290
  const n = () => {
4088
4291
  s && (zt(async () => {
4089
- const a = g(await i());
4090
- a !== t && (e.value = a);
4292
+ const o = m(await i());
4293
+ o !== t && (e.value = o);
4091
4294
  }), s = !1);
4092
4295
  };
4093
- return c(() => (n(), e.value));
4296
+ return l(() => (n(), e.value));
4094
4297
  };
4095
- function ys(i, t) {
4298
+ function Bi(i, t) {
4096
4299
  i.value !== t && (i.value = t);
4097
4300
  }
4098
- function ps(i) {
4301
+ function Fi(i) {
4099
4302
  let t;
4100
- return c(() => (t || (t = i()), t.value));
4101
- }
4102
- function ve(i) {
4103
- return [...new Set(i)];
4104
- }
4105
- function B(i, t, e = !0) {
4106
- const s = E(i);
4107
- return m(i) && m(t) && f(
4108
- t,
4109
- (n, a) => {
4110
- const o = i?.[a];
4111
- m(o) && m(n) ? e && Array.isArray(o) && Array.isArray(n) ? s[a] = E(ve([...o, ...n])) : s[a] = B(
4112
- Array.isArray(o) ? { ...o } : o,
4113
- n,
4114
- e
4115
- ) : s[a] = m(n) ? E(n) : n;
4116
- }
4117
- ), s;
4118
- }
4119
- function $s(i, t) {
4120
- let e = i;
4121
- return f(t, (s, n) => {
4122
- e = e.replace(kt(`[${n}]`), A(s));
4123
- }), e;
4124
- }
4125
- function vs(i) {
4126
- const t = b(i);
4127
- if (t > 0) {
4128
- const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
4129
- return `${e}:${s}`;
4130
- }
4131
- return "00:00";
4132
- }
4133
- function bs(i, t, {
4134
- multiple: e = !1,
4135
- maxlength: s = 0,
4136
- alwaysChange: n = !0,
4137
- notEmpty: a = !1
4138
- }) {
4139
- if (e) {
4140
- if (ht(i)) {
4141
- const o = i.indexOf(t), u = [...i];
4142
- return o !== -1 ? (!a || u.length > 1) && u.splice(o, 1) : (!s || i.length < s) && u.push(t), u;
4143
- }
4144
- return i === t ? [] : i ? [i, t] : [t];
4145
- }
4146
- return n || i !== t ? t : i;
4147
- }
4148
- function ws(i, t, e) {
4149
- if (m(i) && m(t)) {
4150
- if (e) {
4151
- let s = {}, n = !1;
4152
- return f(i, (a, o) => {
4153
- !n && (e === o || e === a) ? (n = !0, s = B(s, t)) : n ? s = B(s, { [o]: a }) : s[o] = m(a) ? E(a) : a;
4154
- }), n ? s : B(i, t);
4155
- }
4156
- if (m(t))
4157
- return B(i, t);
4158
- }
4159
- return E(i);
4160
- }
4161
- function Ss(i) {
4162
- return Ct(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
4163
- }
4164
- function Ls(i) {
4165
- return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[A-Z])([A-Z])", "g"), (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(new RegExp("(?<=[\\w ])[A-Z]", "g"), (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
4166
- }
4167
- function Cs(i, t, e, s) {
4168
- const n = b(i), a = b(t);
4169
- return t && a < n ? `${bt(a, e, s)}+` : bt(n, e, s);
4170
- }
4171
- const bt = (i, t, e) => t ? new I(e).number(i) : i;
4172
- function be(i, t) {
4173
- return 1 / i * t;
4174
- }
4175
- function Ds(i, t) {
4176
- return be(i, t) * 100;
4177
- }
4178
- async function ks(i) {
4179
- if (d())
4180
- try {
4181
- await navigator.clipboard.writeText(i);
4182
- } catch {
4183
- document?.execCommand(i);
4184
- }
4303
+ return l(() => (t || (t = i()), t.value));
4185
4304
  }
4186
4305
  export {
4187
- H as Api,
4188
- Ns as ApiMethodItem,
4189
- Zt as BroadcastMessage,
4190
- Vt as Cache,
4191
- Kt as CacheItem,
4192
- dt as CacheStatic,
4193
- rt as Cookie,
4194
- _t as CookieBlock,
4195
- Y as DataStorage,
4196
- ut as Datetime,
4197
- Ae as DatetimeRef,
4198
- se as DesignAbstract,
4199
- De as DesignAsyncAbstract,
4200
- ee as DesignChanged,
4201
- ke as DesignComp,
4306
+ V as Api,
4307
+ Pi as ApiDefault,
4308
+ Hi as ApiHeaders,
4309
+ Ri as ApiMethodItem,
4310
+ Wi as ApiPreparation,
4311
+ ji as ApiResponse,
4312
+ Ui as ApiStatus,
4313
+ _t as BroadcastMessage,
4314
+ zi as Cache,
4315
+ _i as CacheItem,
4316
+ Ki as CacheStatic,
4317
+ xt as Cookie,
4318
+ Zi as CookieBlock,
4319
+ ut as DataStorage,
4320
+ ht as Datetime,
4321
+ hi as DatetimeRef,
4322
+ he as DesignAbstract,
4323
+ ui as DesignAsyncAbstract,
4324
+ le as DesignChanged,
4325
+ ci as DesignComp,
4202
4326
  Lt as DesignComponents,
4203
- Me as DesignConstructorAbstract,
4204
- xt as EventItem,
4205
- Ne as EventRef,
4327
+ li as DesignConstructorAbstract,
4328
+ Ft as EventItem,
4329
+ di as EventRef,
4206
4330
  r as GEO_FLAG_ICON_NAME,
4207
- p as Geo,
4208
- x as GeoFlag,
4209
- Ie as GeoFlagRef,
4210
- I as GeoIntl,
4211
- oe as GeoIntlRef,
4212
- yt as GeoPhone,
4213
- Dt as GeoRef,
4214
- Ce as Global,
4215
- R as Hash,
4216
- Is as Icons,
4217
- Mt as ListDataRef,
4218
- ft as Loading,
4219
- Be as RouterItemRef,
4220
- St as ScrollbarWidth,
4221
- Te as ScrollbarWidthRef,
4222
- z as Translate,
4223
- Ge as anyToString,
4224
- te as applyTemplate,
4225
- le as arrFill,
4226
- E as copyObject,
4227
- pt as createElement,
4228
- ze as domQuerySelector,
4229
- Ue as domQuerySelectorAll,
4230
- Ze as eventStopPropagation,
4231
- A as executeFunction,
4232
- Bs as executePromise,
4233
- Ye as executeUse,
4234
- Ke as executeUseGlobalInit,
4235
- f as forEach,
4236
- fe as frame,
4237
- Ve as getAttributes,
4238
- $e as getBind,
4239
- ds as getBindRef,
4240
- ie as getClassName,
4241
- qe as getClipboardData,
4331
+ w as Geo,
4332
+ ot as GeoFlag,
4333
+ gi as GeoFlagRef,
4334
+ P as GeoIntl,
4335
+ ye as GeoIntlRef,
4336
+ Vi as GeoPhone,
4337
+ K as GeoRef,
4338
+ Ne as Global,
4339
+ O as Hash,
4340
+ Yi as Icons,
4341
+ kt as ListDataRef,
4342
+ mt as Loading,
4343
+ Gt as Meta,
4344
+ dt as MetaManager,
4345
+ Ot as MetaOg,
4346
+ Qt as MetaOpenGraphAge,
4347
+ qt as MetaOpenGraphAvailability,
4348
+ Jt as MetaOpenGraphCondition,
4349
+ Xt as MetaOpenGraphGender,
4350
+ v as MetaOpenGraphTag,
4351
+ Yt as MetaOpenGraphType,
4352
+ Vt as MetaRobots,
4353
+ L as MetaTag,
4354
+ Tt as MetaTwitter,
4355
+ Mt as MetaTwitterCard,
4356
+ b as MetaTwitterTag,
4357
+ $e as RouterItemRef,
4358
+ bt as ScrollbarWidth,
4359
+ fi as ScrollbarWidthRef,
4360
+ q as Translate,
4361
+ Ae as anyToString,
4362
+ ee as applyTemplate,
4363
+ ie as arrFill,
4364
+ Ii as computedByLanguage,
4365
+ U as copyObject,
4366
+ Bt as createElement,
4367
+ Be as domQuerySelector,
4368
+ Fe as domQuerySelectorAll,
4369
+ Zt as encodeAttribute,
4370
+ xe as eventStopPropagation,
4371
+ lt as executeFunction,
4372
+ qi as executePromise,
4373
+ Se as executeUse,
4374
+ wi as executeUseGlobalInit,
4375
+ $ as forEach,
4376
+ se as frame,
4377
+ Ee as getAttributes,
4378
+ Le as getBind,
4379
+ Ni as getBindRef,
4380
+ de as getClassName,
4381
+ Pe as getClipboardData,
4242
4382
  nt as getColumn,
4243
- ms as getComputedAsync,
4244
- K as getElement,
4245
- G as getElementId,
4246
- Jt as getElementItem,
4247
- Ts as getElementOrWindow,
4248
- kt as getExp,
4249
- re as getIndexForRender,
4250
- de as getItemByPath,
4251
- _e as getKey,
4252
- Nt as getLengthOfAllArray,
4253
- Je as getMaxLengthAllArray,
4254
- Qe as getMinLengthAllArray,
4255
- Xe as getMouseClient,
4256
- me as getMouseClientX,
4257
- ye as getMouseClientY,
4258
- ts as getObjectByKeys,
4259
- es as getObjectNoUndefined,
4260
- ss as getObjectOrNone,
4261
- is as getRandomText,
4262
- g as getRef,
4263
- Et as getRequestString,
4264
- rs as getStepPercent,
4265
- ns as getStepValue,
4266
- as as goScroll,
4267
- os as inArray,
4268
- cs as initScrollbarOffset,
4269
- us as intersectKey,
4270
- ht as isArray,
4271
- hs as isDifferent,
4272
- d as isDomRuntime,
4273
- W as isFilled,
4274
- ls as isFloat,
4275
- Fs as isFunction,
4276
- Es as isInDom,
4277
- gs as isIntegerBetween,
4278
- Ft as isNull,
4279
- xs as isNumber,
4280
- m as isObject,
4281
- L as isObjectNotArray,
4282
- F as isSelected,
4283
- fs as isSelectedByList,
4284
- ot as isString,
4285
- Rs as isWindow,
4286
- O as random,
4287
- ne as render,
4288
- B as replaceRecursive,
4289
- $s as replaceTemplate,
4290
- vs as secondToTime,
4291
- Ee as setApiRefGlobalConditions,
4292
- Qt as setElementItem,
4293
- ys as setRef,
4294
- bs as setValues,
4295
- ws as splice,
4296
- pe as strFill,
4297
- He as t,
4298
- T as toArray,
4383
+ Ai as getComputedAsync,
4384
+ vt as getElement,
4385
+ Y as getElementId,
4386
+ Ji as getElementItem,
4387
+ Qi as getElementOrWindow,
4388
+ St as getExp,
4389
+ ge as getIndexForRender,
4390
+ re as getItemByPath,
4391
+ He as getKey,
4392
+ wt as getLengthOfAllArray,
4393
+ Re as getMaxLengthAllArray,
4394
+ We as getMinLengthAllArray,
4395
+ je as getMouseClient,
4396
+ ne as getMouseClientX,
4397
+ oe as getMouseClientY,
4398
+ Ue as getObjectByKeys,
4399
+ ze as getObjectNoUndefined,
4400
+ _e as getObjectOrNone,
4401
+ Ke as getRandomText,
4402
+ m as getRef,
4403
+ Xi as getRequestString,
4404
+ Ze as getStepPercent,
4405
+ Ve as getStepValue,
4406
+ Ye as goScroll,
4407
+ qe as inArray,
4408
+ Je as initScrollbarOffset,
4409
+ Qe as intersectKey,
4410
+ gt as isArray,
4411
+ Xe as isDifferent,
4412
+ y as isDomRuntime,
4413
+ _ as isFilled,
4414
+ Me as isFloat,
4415
+ Mi as isFunction,
4416
+ Oi as isInDom,
4417
+ Oe as isIntegerBetween,
4418
+ At as isNull,
4419
+ Ti as isNumber,
4420
+ S as isObject,
4421
+ F as isObjectNotArray,
4422
+ j as isSelected,
4423
+ Te as isSelectedByList,
4424
+ ct as isString,
4425
+ Gi as isWindow,
4426
+ z as random,
4427
+ fe as render,
4428
+ R as replaceRecursive,
4429
+ Ge as replaceTemplate,
4430
+ ti as secondToTime,
4431
+ yi as setApiRefGlobalConditions,
4432
+ ts as setElementItem,
4433
+ Bi as setRef,
4434
+ ei as setValues,
4435
+ ii as splice,
4436
+ ae as strFill,
4437
+ Ci as t,
4438
+ W as toArray,
4299
4439
  at as toBind,
4300
- ae as toBinds,
4301
- Ct as toCamelCase,
4302
- Ss as toCamelCaseFirst,
4303
- ps as toComputed,
4304
- w as toDate,
4305
- Ls as toKebabCase,
4306
- b as toNumber,
4307
- Cs as toNumberByMax,
4308
- be as toPercent,
4309
- Ds as toPercentBy100,
4310
- S as toRefItem,
4311
- wt as transformation,
4312
- ve as uniqueArray,
4313
- Fe as useApiRef,
4314
- ue as useBroadcastValueRef,
4315
- xe as useCookieRef,
4316
- Re as useGeoIntlRef,
4317
- Oe as useHashRef,
4318
- We as useLazyRef,
4319
- Pe as useLoadingRef,
4320
- je as useSessionRef,
4321
- Ut as useStorageRef,
4322
- he as useTranslateRef,
4323
- ks as writeClipboardData
4440
+ me as toBinds,
4441
+ Dt as toCamelCase,
4442
+ si as toCamelCaseFirst,
4443
+ Fi as toComputed,
4444
+ A as toDate,
4445
+ ri as toKebabCase,
4446
+ N as toNumber,
4447
+ ni as toNumberByMax,
4448
+ ce as toPercent,
4449
+ oi as toPercentBy100,
4450
+ B as toRefItem,
4451
+ es as transformation,
4452
+ ue as uniqueArray,
4453
+ mi as useApiRef,
4454
+ ve as useBroadcastValueRef,
4455
+ $i as useCookieRef,
4456
+ pi as useGeoIntlRef,
4457
+ vi as useHashRef,
4458
+ bi as useLazyRef,
4459
+ Si as useLoadingRef,
4460
+ Di as useMeta,
4461
+ Li as useSessionRef,
4462
+ ki as useStorageRef,
4463
+ De as useTranslateRef,
4464
+ ai as writeClipboardData
4324
4465
  };