@topvisor/ui 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/.chunks/datepicker-3uPurK_5.es.js +290 -0
  2. package/.chunks/datepicker-3uPurK_5.es.js.map +1 -0
  3. package/.chunks/datepicker-BJGX0c7G.amd.js +248 -0
  4. package/.chunks/datepicker-BJGX0c7G.amd.js.map +1 -0
  5. package/.chunks/forms-BImXJ_ZO.amd.js +3 -0
  6. package/.chunks/forms-BImXJ_ZO.amd.js.map +1 -0
  7. package/.chunks/forms-D9r2-H5Y.es.js +2000 -0
  8. package/.chunks/forms-D9r2-H5Y.es.js.map +1 -0
  9. package/.chunks/i18n-C_OH9IT3.amd.js.map +1 -1
  10. package/.chunks/i18n-DuTvft1T.es.js.map +1 -1
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js → listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js} +2 -2
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Bdv8YBAk.es.js.map +1 -0
  13. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js → listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js} +2 -2
  14. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BxpjEUsq.amd.js.map +1 -0
  15. package/.chunks/{menu-CcyqVSfg.es.js → menu-B0Ul7Kbg.es.js} +2 -2
  16. package/.chunks/menu-B0Ul7Kbg.es.js.map +1 -0
  17. package/.chunks/{menu-DTbsTDGK.amd.js → menu-CbhB9e4x.amd.js} +2 -2
  18. package/.chunks/menu-CbhB9e4x.amd.js.map +1 -0
  19. package/.chunks/{popup-C5yk4q8p.es.js → popup-Coq_61yv.es.js} +495 -495
  20. package/.chunks/popup-Coq_61yv.es.js.map +1 -0
  21. package/.chunks/{popup-DAruCfQv.amd.js → popup-pQCswyfj.amd.js} +447 -447
  22. package/.chunks/popup-pQCswyfj.amd.js.map +1 -0
  23. package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
  24. package/.chunks/store-esTid5oI.amd.js.map +1 -1
  25. package/README.md +86 -86
  26. package/assets/core.css +1 -1
  27. package/assets/forms.css +1 -1
  28. package/assets/formsExt.css +1 -1
  29. package/assets/menu.css +1 -1
  30. package/assets/popup.css +1 -1
  31. package/assets/tabs.css +1 -1
  32. package/assets/tabsView.css +1 -1
  33. package/assets/themes/dark.css +1 -0
  34. package/assets/themes/light.css +1 -0
  35. package/components/forms/select/select.d.ts +1 -2
  36. package/components/tabsView/tabsView/store.d.ts +1 -1
  37. package/components/tabsView/tabsView/tabsView.d.ts +1 -1
  38. package/core/app.amd.js +1 -1
  39. package/core/app.amd.js.map +1 -1
  40. package/core/app.js +58 -59
  41. package/core/app.js.map +1 -1
  42. package/core/core/core.d.ts +10 -9
  43. package/core/core/events/resize.d.ts +16 -0
  44. package/core/core/events.d.ts +12 -17
  45. package/core/core/options.d.ts +22 -0
  46. package/core/core/state.d.ts +12 -1
  47. package/core/core.amd.js +1 -1
  48. package/core/core.js +1 -1
  49. package/forms/forms.amd.js +1 -1
  50. package/forms/forms.js +1 -1
  51. package/forms/helpers.amd.js.map +1 -1
  52. package/forms/helpers.js.map +1 -1
  53. package/formsExt/formsExt.amd.js +1 -1
  54. package/formsExt/formsExt.amd.js.map +1 -1
  55. package/formsExt/formsExt.js +17 -18
  56. package/formsExt/formsExt.js.map +1 -1
  57. package/icomoon/Read Me.txt +7 -7
  58. package/icomoon/demo-files/demo.css +161 -161
  59. package/icomoon/demo-files/demo.js +30 -30
  60. package/icomoon/demo.html +3379 -3379
  61. package/icomoon/fonts/Topvisor-2.svg +263 -263
  62. package/icomoon/style.css +740 -740
  63. package/package.json +37 -36
  64. package/popup/popup.amd.js +1 -1
  65. package/popup/popup.amd.js.map +1 -1
  66. package/popup/popup.js +18 -18
  67. package/popup/popup.js.map +1 -1
  68. package/popup/worker.amd.js +1 -1
  69. package/popup/worker.amd.js.map +1 -1
  70. package/popup/worker.js +2 -2
  71. package/popup/worker.js.map +1 -1
  72. package/project/project.amd.js +1 -1
  73. package/project/project.amd.js.map +1 -1
  74. package/project/project.js +3 -3
  75. package/project/project.js.map +1 -1
  76. package/require/css.amd.js +12 -12
  77. package/tabs/tabs.amd.js +1 -1
  78. package/tabs/tabs.amd.js.map +1 -1
  79. package/tabs/tabs.js +7 -8
  80. package/tabs/tabs.js.map +1 -1
  81. package/tabsView/tabsView.amd.js +1 -1
  82. package/tabsView/tabsView.amd.js.map +1 -1
  83. package/tabsView/tabsView.js +106 -98
  84. package/tabsView/tabsView.js.map +1 -1
  85. package/test/themes/themes/dark-positions.amd.js +2 -0
  86. package/test/themes/themes/dark-positions.amd.js.map +1 -0
  87. package/test/themes/themes/dark-positions.d.ts +1 -0
  88. package/test/themes/themes/dark-positions.js +2 -0
  89. package/test/themes/themes/dark-positions.js.map +1 -0
  90. package/test/themes/themes/dark.amd.js +2 -0
  91. package/test/themes/themes/dark.amd.js.map +1 -0
  92. package/test/themes/themes/dark.d.ts +1 -0
  93. package/test/themes/themes/dark.js +4 -0
  94. package/test/themes/themes/dark.js.map +1 -0
  95. package/test/themes/themes/light-positions.amd.js +2 -0
  96. package/test/themes/themes/light-positions.amd.js.map +1 -0
  97. package/test/themes/themes/light-positions.d.ts +1 -0
  98. package/test/themes/themes/light-positions.js +2 -0
  99. package/test/themes/themes/light-positions.js.map +1 -0
  100. package/test/themes/themes/light.amd.js +2 -0
  101. package/test/themes/themes/light.amd.js.map +1 -0
  102. package/test/themes/themes/light.d.ts +1 -0
  103. package/test/themes/themes/light.js +4 -0
  104. package/test/themes/themes/light.js.map +1 -0
  105. package/utils/check.amd.js.map +1 -1
  106. package/utils/check.js.map +1 -1
  107. package/utils/clipboard.amd.js.map +1 -1
  108. package/utils/clipboard.js.map +1 -1
  109. package/utils/date.amd.js +1 -1
  110. package/utils/date.js +1 -1
  111. package/utils/device.amd.js +1 -1
  112. package/utils/device.js +3 -3
  113. package/utils/dom.amd.js.map +1 -1
  114. package/utils/dom.js.map +1 -1
  115. package/utils/image.amd.js.map +1 -1
  116. package/utils/image.js.map +1 -1
  117. package/utils/keyboard.amd.js.map +1 -1
  118. package/utils/keyboard.js.map +1 -1
  119. package/utils/lodash.amd.js +1 -1
  120. package/utils/lodash.amd.js.map +1 -1
  121. package/utils/lodash.js +6 -703
  122. package/utils/lodash.js.map +1 -1
  123. package/utils/number.amd.js.map +1 -1
  124. package/utils/number.js.map +1 -1
  125. package/utils/price.amd.js +1 -1
  126. package/utils/price.amd.js.map +1 -1
  127. package/utils/price.js +1 -1
  128. package/utils/price.js.map +1 -1
  129. package/utils/route.amd.js.map +1 -1
  130. package/utils/route.js.map +1 -1
  131. package/utils/scroll.amd.js.map +1 -1
  132. package/utils/scroll.js.map +1 -1
  133. package/utils/string.amd.js.map +1 -1
  134. package/utils/string.js.map +1 -1
  135. package/utils/system.amd.js.map +1 -1
  136. package/utils/system.js.map +1 -1
  137. package/utils/url.amd.js.map +1 -1
  138. package/utils/url.js.map +1 -1
  139. package/web-types.json +72 -72
  140. package/.chunks/datepicker-CS24dmLk.es.js +0 -290
  141. package/.chunks/datepicker-CS24dmLk.es.js.map +0 -1
  142. package/.chunks/datepicker-DsMs2YKL.amd.js +0 -248
  143. package/.chunks/datepicker-DsMs2YKL.amd.js.map +0 -1
  144. package/.chunks/debounce-4ipCj607.amd.js +0 -2
  145. package/.chunks/debounce-4ipCj607.amd.js.map +0 -1
  146. package/.chunks/debounce-BISRz08p.es.js +0 -116
  147. package/.chunks/debounce-BISRz08p.es.js.map +0 -1
  148. package/.chunks/forms-DKL0e9tp.amd.js +0 -3
  149. package/.chunks/forms-DKL0e9tp.amd.js.map +0 -1
  150. package/.chunks/forms-DT_fsN6V.es.js +0 -1161
  151. package/.chunks/forms-DT_fsN6V.es.js.map +0 -1
  152. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-B3E-SDdg.es.js.map +0 -1
  153. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uKhci19t.amd.js.map +0 -1
  154. package/.chunks/menu-CcyqVSfg.es.js.map +0 -1
  155. package/.chunks/menu-DTbsTDGK.amd.js.map +0 -1
  156. package/.chunks/popup-C5yk4q8p.es.js.map +0 -1
  157. package/.chunks/popup-DAruCfQv.amd.js.map +0 -1
  158. package/assets/dark.css +0 -1
  159. package/assets/light.css +0 -1
@@ -1,1161 +0,0 @@
1
- import { reactive as I, defineComponent as v, useCssVars as G, computed as w, openBlock as u, createElementBlock as f, createElementVNode as S, createCommentVNode as h, createBlock as T, resolveDynamicComponent as ee, normalizeClass as g, withCtx as L, renderSlot as k, createTextVNode as te, toDisplayString as V, mergeModels as C, useModel as Q, withDirectives as W, vModelCheckbox as J, mergeProps as D, withKeys as oe, vModelText as Z, withModifiers as se, onUnmounted as ae, ref as ne, unref as A, vModelRadio as ie, resolveDirective as re, watch as le, Fragment as N, renderList as F, vModelSelect as de } from "vue";
2
- function pe() {
3
- return "devicePixelRatio" in window && window.devicePixelRatio > 1;
4
- }
5
- function ue() {
6
- return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
7
- }
8
- function ce() {
9
- return navigator.userAgent.indexOf("Topvisor_App") != -1;
10
- }
11
- function me() {
12
- return navigator.userAgent.indexOf("Mac OS X") !== -1;
13
- }
14
- function Xt() {
15
- const t = /Chrome|Android/.test(navigator.userAgent);
16
- let a = /Safari/.test(navigator.userAgent);
17
- return t && a && (a = !1), a;
18
- }
19
- function Yt() {
20
- return me() ? "⌘" : "Ctrl";
21
- }
22
- const qt = () => $(document).scrollTop(), Kt = () => $(document), Gt = () => [document], fe = () => {
23
- const t = [
24
- ["iOS", /(iPhone|iPad)/i],
25
- ["Android", /(Android)/i],
26
- ["Windows Phone", /(IEMobile)/i],
27
- ["Windows 3.11", /Win16/i],
28
- ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/i],
29
- ["Windows 98", /(Windows 98)|(Win98)/i],
30
- ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/i],
31
- ["Windows XP", /(Windows NT 5.1)|(Windows XP)/i],
32
- ["Windows Server 2003", /(Windows NT 5.2)/i],
33
- ["Windows Vista", /(Windows NT 6.0)/i],
34
- ["Windows 7", /(Windows NT 6.1)/i],
35
- ["Windows 8", /(Windows NT 6.[23])|(Windows 8)/i],
36
- ["Windows 10", /(Windows NT 10)/i],
37
- ["Windows NT 4.0", /(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)/i],
38
- ["Windows ME", /Windows ME/i],
39
- ["Windows", /Windows/i],
40
- ["Open BSD", /OpenBSD/i],
41
- ["Sun OS", /SunOS/i],
42
- ["Linux", /(Linux)|(X11)/i],
43
- ["Macintosh", /(Mac_PowerPC)|(Macintosh)|(Mac OS X 10.4)|(Mac OS X 10.5)|(Mac OS X 10.6)/i],
44
- ["QNX", /QNX/i],
45
- ["BeOS", /BeOS/i],
46
- ["OS/2", /OS\/2/i]
47
- ];
48
- let a = "";
49
- for (let o = 0; o < t.length; o++)
50
- if (t[o][1].test(navigator.userAgent)) {
51
- a = t[o][0];
52
- break;
53
- }
54
- return a;
55
- }, Qt = async () => {
56
- var a;
57
- let t = fe();
58
- if (t === "Windows 10") {
59
- const o = await ((a = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : a.getHighEntropyValues(["platformVersion"]));
60
- o && o.platformVersion >= "13" && (t = "Windows 11");
61
- }
62
- return t;
63
- }, be = 100;
64
- let U;
65
- const H = /* @__PURE__ */ new Map(), z = {
66
- width: window.innerWidth,
67
- height: window.innerHeight
68
- };
69
- function he(t) {
70
- H.set(t, t);
71
- }
72
- function ge(t) {
73
- H.delete(t);
74
- }
75
- function we(t) {
76
- clearTimeout(U), U = setTimeout(function() {
77
- t.topEvent = {
78
- widthDiff: z.width - window.innerWidth,
79
- hightDiff: z.height - window.innerHeight
80
- }, z.width = window.innerWidth, z.height = window.innerHeight, H.forEach((a) => a(t));
81
- }, be);
82
- }
83
- window.addEventListener("resize", we);
84
- const X = {
85
- addOnReize: he,
86
- removeOnResize: ge
87
- };
88
- var K;
89
- const R = {
90
- /**
91
- * Базовая ширина страницы для отображения ПК / Мобильной версии сайта
92
- */
93
- widthForMobile: 900,
94
- /**
95
- * Формат даты, который будет испоьзоваться по умолчанию для вывода даты, как правило, завсит от текущего пользователя
96
- */
97
- dateFormat: "Y-m-d",
98
- /**
99
- * Валюта, которая будет испоьзоваться по умолчанию, как правило, завсит от текущего пользователя
100
- */
101
- currency: "USD",
102
- /**
103
- * Для Москвы: +0300
104
- */
105
- gmt: (K = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : K[1]
106
- }, ye = {
107
- dateFormat: R.dateFormat,
108
- currency: R.currency,
109
- gmt: R.gmt,
110
- /**
111
- * Device by size
112
- * @see widthForMobile
113
- */
114
- isMobile: !1,
115
- /**
116
- * Device by user agent
117
- */
118
- isMobileUA: !1,
119
- /**
120
- * true, если плотность пикселей экрана больше 1
121
- */
122
- isRetina: !1,
123
- /**
124
- * true, елси это приложение
125
- */
126
- isApp: !1,
127
- /**
128
- * true при горизонтальном расположении устройства
129
- */
130
- isLandscape: !0,
131
- /**
132
- * true при вертикальном расположении устройства
133
- */
134
- isPortrait: !1,
135
- /**
136
- * Максимальная сторона страницы
137
- */
138
- size: 0
139
- // /**
140
- // * true, если страница скрыта
141
- // */
142
- // isHidden: false,
143
- };
144
- class c {
145
- /**
146
- * Настройки словаря
147
- *
148
- * @deprecated - используйте useI18n() и $i18n;
149
- */
150
- static L = I({
151
- Not_date: "Not date"
152
- });
153
- static state = I({ ...ye });
154
- static widthForMobile = 900;
155
- static matchMediaIsMobile;
156
- static $ = window.$;
157
- static Events = X;
158
- static _setState() {
159
- c.matchMediaIsMobile = window.matchMedia(`(max-width: ${c.widthForMobile}px)`), c.state.isMobileUA = ue(), c.state.isRetina = pe(), c.state.isApp = ce(), c.setStateByWindowSize(), X.addOnReize(c.onResize), c.onResize(), c.saveToCookie();
160
- }
161
- static onResize() {
162
- c.setStateByWindowSize(), document.documentElement.style.setProperty("--100vh", window.innerHeight + "px");
163
- }
164
- static setStateByWindowSize() {
165
- var a;
166
- c.state.isMobile = !!((a = c.matchMediaIsMobile) != null && a.matches), c.state.isLandscape = window.innerWidth > window.innerHeight, c.state.isPortrait = !c.state.isLandscape, c.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, c.saveToCookie();
167
- }
168
- /**
169
- * Сохранить информацию об устройстве в cookie
170
- */
171
- static saveToCookie() {
172
- const a = [
173
- 1,
174
- window.innerWidth,
175
- window.innerHeight,
176
- window.devicePixelRatio,
177
- Number(c.state.isMobile),
178
- Number(c.state.isRetina)
179
- ];
180
- document.cookie = "device=" + a.join(",") + "; path=/;";
181
- }
182
- /**
183
- * Проверить скрыта страница или нет
184
- */
185
- static isHidden = () => document.hidden;
186
- /**
187
- * Вставить css стили на страницу по ссылке с автоматическим добавлением правил media
188
- *
189
- * Правила media:
190
- * - Файлы *.m.css будут грузиться, только на экранах с шириной менее, чем Core.widthForMobile
191
- * - Файлы *.pc.css будут грузиться, только на экранах с шириной более, чем Core.widthForMobile
192
- *
193
- * Настройкой Core.widthForMobile можно управлять через plugin: @topvisor/ui/plugin/core
194
- *
195
- * @param fileNames - список ссылок на css файлы
196
- * @param useSync - использовать синхронную загрузку css, только для css с того же домена. В синхронном режиме стили предзагружаются независимо от
197
- * media
198
- */
199
- static insertCSSLinkToPage = (a, o = !1) => {
200
- const n = /* @__PURE__ */ new Map();
201
- n.set("::", []), a.forEach((e) => {
202
- let d = !1, i = !1;
203
- e.match(/\.m\./) && (d = !0), e.match(/\.pc\./) && (i = !0);
204
- const m = `${d}:${i}`;
205
- n.has(m) || n.set(`${d}:${i}`, []), n.get(`${d}:${i}`).push(e);
206
- });
207
- const s = [];
208
- return n.forEach((e, d) => {
209
- if (!e.length)
210
- return;
211
- const [i, m] = d.split(":").map((p) => p === "true");
212
- let r = "all";
213
- i && (r = "(max-width: " + c.widthForMobile + "px)"), m && (r = "(min-width: " + c.widthForMobile + "px)"), c._insertToPage(e, r, o).forEach((p) => s.push(p));
214
- }), Promise.all(s);
215
- };
216
- static _insertToPage = (a, o, n) => {
217
- const s = [];
218
- return a.forEach((e) => {
219
- if (n) {
220
- const p = new XMLHttpRequest();
221
- p.open("GET", e, !1), p.send();
222
- }
223
- const d = "topCSSLink-" + e.replace(/\W/g, "-");
224
- if (window.hasOwnProperty(d)) return;
225
- let i, m;
226
- const r = new Promise((p, b) => {
227
- i = p, m = b;
228
- });
229
- s.push(r);
230
- const l = document.createElement("link");
231
- l.id = d, l.rel = "stylesheet", l.media = o, l.href = e, l.onload = () => i(), l.onerror = () => m(), document.head.append(l);
232
- }), s;
233
- };
234
- /**
235
- * Вставить css стили на страницу с автоматическим добавлением правил media
236
- *
237
- * Загрузка с Vite:
238
- *
239
- * ```js
240
- * import style from '/style.css?raw';
241
- *
242
- * insertToPageAsInine(style);
243
- * ```
244
- *
245
- * Загрузка с fetch:
246
- *
247
- * ```js
248
- * const style = await fetch('./style.css');
249
- *
250
- * insertToPageAsInine(style);
251
- * ```
252
- *
253
- * @param style - css стили в строке
254
- * @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.widthForMobile
255
- *
256
- * @see insertToPage
257
- */
258
- static insertStyleToPage = (a, o = "") => {
259
- let n = "all";
260
- o === "m" && (n = "(max-width: " + c.widthForMobile + "px)"), o === "pc" && (n = "(min-width: " + c.widthForMobile + "px)");
261
- const s = document.createElement("style");
262
- s.innerHTML = a, s.media = n, document.head.append(s);
263
- };
264
- }
265
- const M = window.L ?? {}, Jt = (t, a, o) => {
266
- switch (new Date(t, a, o).getDay()) {
267
- case 0:
268
- return M.Vs + ".";
269
- case 1:
270
- return M.Pn + ".";
271
- case 2:
272
- return M.Vt + ".";
273
- case 3:
274
- return M.Sr + ".";
275
- case 4:
276
- return M.Ct + ".";
277
- case 5:
278
- return M.Pt + ".";
279
- case 6:
280
- return M.Sb + ".";
281
- default:
282
- return "";
283
- }
284
- }, Zt = (t, a = !0, o = 2) => {
285
- let n = String(t.getFullYear()), s = String(t.getDate()).padStart(2, "0"), e = String(t.getMonth() + 1).padStart(2, "0"), d = String(t.getHours()).padStart(2, "0"), i = String(t.getMinutes()).padStart(2, "0"), m = String(t.getSeconds()).padStart(2, "0"), r = n + "-" + e + "-" + s;
286
- return o >= 1 && (r += " " + d), o >= 2 && (r += ":" + i), o === 3 && (r += ":" + m), a && (r = B(r, o)), r;
287
- };
288
- function jt(t) {
289
- return t.indexOf("T") === -1 && (t.length == 10 && (t += " 00:00:00"), t = t.replace(" ", "T") + c.state.gmt), new Date(t);
290
- }
291
- function ve(t, a = !0, o = 0) {
292
- let n;
293
- t != null ? n = new Date(t) : n = /* @__PURE__ */ new Date();
294
- const s = n.getFullYear(), e = String(n.getMonth() + 1).padStart(2, "0"), d = n.getDate().toString().padStart(2, "0"), i = n.getHours().toString().padStart(2, "0"), m = n.getMinutes().toString().padStart(2, "0"), r = n.getSeconds().toString().padStart(2, "0");
295
- return n = s + "-" + e + "-" + d, o && (n += " "), o >= 1 && (n += i), o >= 2 && (n += ":" + m), o >= 3 && (n += ":" + r), a && (n = B(n, o)), n;
296
- }
297
- function xt(t, a = !0) {
298
- const n = (/* @__PURE__ */ new Date()).getTimezoneOffset() / 60 * -1 * 60 * 60 * 1e3, s = 3 * 60 * 60 * 1e3;
299
- let e;
300
- t !== void 0 ? e = new Date(t) : e = /* @__PURE__ */ new Date(), e.setTime(e.getTime() - n + s);
301
- let d = String(e.getFullYear()), i = String(e.getDate()).padStart(2, "0"), m = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getHours()).padStart(2, "0"), l = String(e.getMinutes()).padStart(2, "0"), p = String(e.getSeconds()).padStart(2, "0"), b = d + "-" + m + "-" + i + " " + r + ":" + l + ":" + p;
302
- return a && (b = B(b)), b;
303
- }
304
- function B(t, a = 2, o, n = c.L.Not_date) {
305
- if (typeof t == "string" && (!t || t.substring(0, 10) === "0000-00-00") && n && n !== "0000-00-00" || !t) return n;
306
- o || (o = c.state.dateFormat), o = o.toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd");
307
- let s;
308
- if (t instanceof Date)
309
- s = t;
310
- else {
311
- let d = t.substring(0, 10);
312
- if (d.length === 7 && (d += "-01"), d += " 00:00", d = d.replace(/-/g, "/"), s = new Date(d), isNaN(Number(s))) return n;
313
- }
314
- let e = "";
315
- if (o && window.$ && (e = $.datepicker.formatDate(o, s)), a && typeof t == "string" && t.length > 10 || a && t instanceof Date) {
316
- let d = "";
317
- if (t instanceof Date)
318
- d = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
319
- hour12: !1,
320
- hour: "numeric",
321
- minute: a >= 2 ? "numeric" : void 0,
322
- second: a >= 3 ? "numeric" : void 0
323
- });
324
- else
325
- switch (a) {
326
- case 1:
327
- d = t.substring(11, 13);
328
- break;
329
- case 2:
330
- d = t.substring(11, 16);
331
- break;
332
- case 3:
333
- d = t.substring(11, 19);
334
- break;
335
- }
336
- e += " " + d;
337
- }
338
- return e = e.trim(), e;
339
- }
340
- function Y(t, a = c.L.Not_date) {
341
- if (!t)
342
- return a;
343
- if (t.match(/\d\d\d\d-\d\d-\d\d/))
344
- return t;
345
- const o = c.state.dateFormat.toLowerCase(), n = t.split(/\W/), s = o.split(/\W/);
346
- let e = "", d = "", i = "";
347
- s.forEach((r, l) => {
348
- switch (r) {
349
- case "d":
350
- e = n[l];
351
- break;
352
- case "m":
353
- d = n[l];
354
- break;
355
- case "y":
356
- i = n[l];
357
- break;
358
- }
359
- });
360
- let m = i + "-" + d + "-" + e;
361
- return m.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + m), m = ve((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), m;
362
- }
363
- const $e = { class: "top-avatar" }, Se = ["src", "title"], _e = ["title"], ke = /* @__PURE__ */ v({
364
- __name: "avatar",
365
- props: {
366
- size: { default: 64 },
367
- image: {},
368
- nickname: {},
369
- isOnline: { type: Boolean },
370
- lastActiveTime: {},
371
- i18n: { default: () => ({
372
- Online: "Online",
373
- LastSeen: "Last seen"
374
- }) }
375
- },
376
- setup(t) {
377
- G((s) => ({
378
- "4394695c": s.size + "px"
379
- }));
380
- const a = t, o = w(() => {
381
- var s, e;
382
- if (a.isOnline)
383
- return (s = a.i18n) == null ? void 0 : s.Online;
384
- if (a.lastActiveTime)
385
- return ((e = a.i18n) == null ? void 0 : e.LastSeen) + ": " + B(a.lastActiveTime, 2);
386
- }), n = w(() => a.nickname ? a.nickname + (o.value ? `
387
- ${o.value}` : "") : o.value);
388
- return (s, e) => (u(), f("div", $e, [
389
- S("img", {
390
- class: "top-avatar_image",
391
- src: s.image,
392
- title: n.value,
393
- alt: ""
394
- }, null, 8, Se),
395
- s.isOnline ? (u(), f("div", {
396
- key: 0,
397
- class: "top-avatar_status",
398
- title: o.value
399
- }, null, 8, _e)) : h("", !0)
400
- ]));
401
- }
402
- }), Te = {
403
- "top-avatar": "top-avatar",
404
- "top-avatar_image": "top-avatar_image",
405
- "top-avatar_status": "top-avatar_status"
406
- }, y = (t, a) => {
407
- const o = t.__vccOpts || t;
408
- for (const [n, s] of a)
409
- o[n] = s;
410
- return o;
411
- }, Me = {
412
- $style: Te
413
- }, Ve = /* @__PURE__ */ y(ke, [["__cssModules", Me]]), We = ["data-top-badge"], Be = {
414
- key: 1,
415
- class: "top-ellipsis"
416
- }, Le = /* @__PURE__ */ v({
417
- __name: "button",
418
- props: {
419
- color: { default: "blue" },
420
- styling: { default: "" },
421
- size: { default: "s" },
422
- name: {},
423
- title: {},
424
- icon: {},
425
- icon2: {},
426
- href: {},
427
- badgeNumber: {},
428
- badgePosAfterText: { type: Boolean },
429
- disabled: { type: Boolean },
430
- isSubmit: { type: Boolean },
431
- isActive: { type: Boolean },
432
- isProgress: { type: Boolean }
433
- },
434
- setup(t) {
435
- const a = t, o = w(() => a.href ? "a" : "button"), n = w(() => a.isSubmit ? "submit" : void 0);
436
- return (s, e) => (u(), T(ee(o.value), {
437
- class: g({
438
- "top-active": s.isActive,
439
- "top-disabled": s.disabled,
440
- "top-forms-focusable": !s.disabled,
441
- "top-button": !0,
442
- "top-button-progress": s.isProgress,
443
- [`top-size_${s.size}`]: !!s.size,
444
- [`top-color_${s.color}`]: !0,
445
- [`top-style_${s.styling}`]: !!s.styling,
446
- "top-button-withoutText": !s.$slots.default
447
- }),
448
- name: s.name,
449
- title: s.title,
450
- href: s.href,
451
- type: n.value,
452
- "data-top-icon": s.icon || void 0,
453
- "data-top-icon2": s.icon2 || void 0,
454
- disabled: s.disabled || void 0,
455
- inProgress: s.isProgress
456
- }, {
457
- default: L(() => [
458
- s.badgeNumber ? (u(), f("span", {
459
- key: 0,
460
- "data-top-badge": s.badgeNumber,
461
- class: g(["top-button_badge", {
462
- "top-button_badge-afterText": s.badgePosAfterText
463
- }])
464
- }, null, 10, We)) : h("", !0),
465
- s.$slots.default ? (u(), f("span", Be, [
466
- k(s.$slots, "default", {}, () => [
467
- te(V(s.icon ? "" : "Button"), 1)
468
- ])
469
- ])) : h("", !0),
470
- k(s.$slots, "html")
471
- ]),
472
- _: 3
473
- }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
474
- }
475
- }), Ee = "_progress_13336_1", ze = {
476
- "top-button": "top-button",
477
- "top-active": "top-active",
478
- "top-button-progress": "top-button-progress",
479
- progress: Ee,
480
- "top-button-withoutText": "top-button-withoutText",
481
- "top-color_blue": "top-color_blue",
482
- "top-color_green": "top-color_green",
483
- "top-color_orange": "top-color_orange",
484
- "top-color_red": "top-color_red",
485
- "top-color_pink": "top-color_pink",
486
- "top-color_theme": "top-color_theme",
487
- "top-style_outline": "top-style_outline",
488
- "top-style_soft": "top-style_soft",
489
- "top-style_transparent": "top-style_transparent",
490
- "top-ellipsis": "top-ellipsis",
491
- "top-size_xs": "top-size_xs",
492
- "top-size_m": "top-size_m",
493
- "top-size_l": "top-size_l",
494
- "top-button_badge-afterText": "top-button_badge-afterText"
495
- }, De = {
496
- $style: ze
497
- }, Pe = /* @__PURE__ */ y(Le, [["__cssModules", De]]), Ae = { class: "top-forms-optionLabel" }, Ne = /* @__PURE__ */ v({
498
- __name: "controlLabel",
499
- props: {
500
- description: {},
501
- disabled: { type: Boolean }
502
- },
503
- setup(t) {
504
- return (a, o) => (u(), f("div", Ae, [
505
- S("div", {
506
- class: g({
507
- "top-forms-optionLabel_title": !0,
508
- "top-forms-optionLabel_title-disabled": a.disabled
509
- })
510
- }, [
511
- k(a.$slots, "default")
512
- ], 2),
513
- a.description ? (u(), f("div", {
514
- key: 0,
515
- class: g(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": a.disabled }])
516
- }, V(a.description), 3)) : h("", !0)
517
- ]));
518
- }
519
- }), Re = {
520
- "top-forms-optionLabel": "top-forms-optionLabel",
521
- "top-forms-optionLabel_title": "top-forms-optionLabel_title",
522
- "top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
523
- "top-forms-optionLabel_description": "top-forms-optionLabel_description",
524
- "top-forms-optionLabel_description-disabled": "top-forms-optionLabel_description-disabled"
525
- }, Ce = {
526
- $style: Re
527
- }, P = /* @__PURE__ */ y(Ne, [["__cssModules", Ce]]), Oe = ["name", "value", "indeterminate", "disabled"], He = /* @__PURE__ */ v({
528
- __name: "checkbox",
529
- props: /* @__PURE__ */ C({
530
- modelValue: { type: [Boolean, Array, Set] },
531
- name: {},
532
- value: {},
533
- description: {},
534
- disabled: { type: Boolean },
535
- indeterminate: { type: Boolean },
536
- isError: { type: Boolean }
537
- }, {
538
- modelValue: { type: [Boolean, Array, Set] },
539
- modelModifiers: {}
540
- }),
541
- emits: ["update:modelValue"],
542
- setup(t) {
543
- const a = Q(t, "modelValue");
544
- return (o, n) => (u(), f("label", {
545
- class: g({
546
- "top-forms-optionWrapper": !0,
547
- "top-checkbox": !0,
548
- ["top-checkbox_" + o.name]: !!o.name,
549
- "top-disabled": o.disabled,
550
- "top-error": o.isError && !o.disabled
551
- })
552
- }, [
553
- W(S("input", {
554
- type: "checkbox",
555
- class: g({
556
- "top-forms-focusable": !o.disabled,
557
- "top-forms-option": !0,
558
- "top-checkbox_input": !0,
559
- "top-error": o.isError && !o.disabled
560
- }),
561
- name: o.name,
562
- "onUpdate:modelValue": n[0] || (n[0] = (s) => a.value = s),
563
- value: o.value,
564
- indeterminate: o.indeterminate,
565
- disabled: o.disabled
566
- }, null, 10, Oe), [
567
- [J, a.value]
568
- ]),
569
- o.$slots.default ? (u(), T(P, {
570
- key: 0,
571
- description: o.description,
572
- disabled: o.disabled
573
- }, {
574
- default: L(() => [
575
- k(o.$slots, "default")
576
- ]),
577
- _: 3
578
- }, 8, ["description", "disabled"])) : h("", !0)
579
- ], 2));
580
- }
581
- }), Ie = {
582
- "top-checkbox": "top-checkbox",
583
- "top-checkbox_input": "top-checkbox_input",
584
- "top-error": "top-error"
585
- }, Fe = {
586
- $style: Ie
587
- }, Ue = /* @__PURE__ */ y(He, [["__cssModules", Fe]]), Xe = ["title"], Ye = /* @__PURE__ */ v({
588
- __name: "hint",
589
- props: {
590
- hint: {}
591
- },
592
- setup(t) {
593
- return (a, o) => (u(), f("span", {
594
- class: "top-hint",
595
- "data-top-icon": "",
596
- title: a.hint
597
- }, null, 8, Xe));
598
- }
599
- }), qe = {
600
- "top-hint": "top-hint"
601
- }, Ke = {
602
- $style: qe
603
- }, j = /* @__PURE__ */ y(Ye, [["__cssModules", Ke]]), Ge = {
604
- "top-loadbar": "top-loadbar"
605
- }, Qe = {}, Je = { class: "top-loadbar" };
606
- function Ze(t, a) {
607
- return u(), f("div", Je);
608
- }
609
- const je = {
610
- $style: Ge
611
- }, x = /* @__PURE__ */ y(Qe, [["render", Ze], ["__cssModules", je]]), xe = ["data-top-icon", "data-top-icon2"], et = ["name", "title", "placeholder", "disabled", "readonly"], tt = {
612
- key: 2,
613
- class: "top-formsCaption"
614
- }, ot = /* @__PURE__ */ v({
615
- inheritAttrs: !1,
616
- __name: "input",
617
- props: {
618
- modelValue: {},
619
- name: {},
620
- disabled: { type: Boolean },
621
- readonly: { type: Boolean },
622
- modificator: {},
623
- size: { default: "s" },
624
- isError: { type: Boolean },
625
- isLoading: { type: Boolean },
626
- icon: {},
627
- icon2: {},
628
- addCleaner: { type: Boolean },
629
- title: {},
630
- captionType: { default: "" }
631
- },
632
- emits: ["update:modelValue"],
633
- setup(t, { emit: a }) {
634
- const o = t, n = a, s = w({
635
- get() {
636
- return o.modelValue;
637
- },
638
- set(i) {
639
- n("update:modelValue", i);
640
- }
641
- }), e = w(() => o.addCleaner && !o.title || o.captionType !== "" ? "" : o.title), d = (i) => {
642
- o.modelValue && i.stopPropagation(), n("update:modelValue", "");
643
- };
644
- return (i, m) => (u(), f("label", {
645
- class: g({
646
- "top-input": !0,
647
- ["top-size_" + i.size]: !0,
648
- "top-disabled": i.disabled,
649
- ["top-input-" + i.modificator]: !!i.modificator,
650
- "top-input-withCleaner": i.addCleaner && s.value && s.value !== "0000-00-00",
651
- "top-formsCaptionWrapper": i.captionType !== "",
652
- "top-formsCaptionWrapper-always": i.captionType === "top"
653
- }),
654
- "data-top-icon": i.icon,
655
- "data-top-icon2": i.icon2
656
- }, [
657
- i.isLoading ? (u(), T(x, { key: 0 })) : h("", !0),
658
- W(S("input", D({
659
- type: "text",
660
- class: {
661
- "top-input_input": !0,
662
- ["top-input_input-" + i.modificator]: !!i.modificator,
663
- "top-forms-focusable": !i.disabled,
664
- "top-error": i.isError
665
- },
666
- autocomplete: "off_always",
667
- name: i.name,
668
- "onUpdate:modelValue": m[0] || (m[0] = (r) => s.value = r),
669
- title: i.title,
670
- placeholder: e.value,
671
- disabled: i.disabled,
672
- readonly: i.readonly,
673
- onKeydown: m[1] || (m[1] = oe((r) => (i.addCleaner || !!i.$slots.btn) && d(r), ["esc"]))
674
- }, i.$attrs), null, 16, et), [
675
- [Z, s.value]
676
- ]),
677
- i.addCleaner && s.value && s.value !== "0000-00-00" ? (u(), f("span", {
678
- key: 1,
679
- class: "top-input_cleaner",
680
- "data-top-icon": "",
681
- onClick: se(d, ["prevent"])
682
- })) : h("", !0),
683
- i.captionType !== "" ? (u(), f("span", tt, V(i.title), 1)) : h("", !0),
684
- k(i.$slots, "default")
685
- ], 10, xe));
686
- }
687
- }), st = {
688
- "top-input": "top-input",
689
- "top-input_input": "top-input_input",
690
- "top-input-withCleaner": "top-input-withCleaner",
691
- "top-input_cleaner": "top-input_cleaner",
692
- "top-loadbar": "top-loadbar"
693
- }, at = {
694
- $style: st
695
- }, O = /* @__PURE__ */ y(ot, [["__cssModules", at]]), nt = ["modelValue"], it = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
696
- let q = (t) => {
697
- };
698
- const rt = /* @__PURE__ */ v({
699
- __name: "inputDate",
700
- props: {
701
- modelValue: {},
702
- name: {},
703
- disabled: { type: Boolean },
704
- readonly: { type: Boolean },
705
- modificator: {},
706
- size: {},
707
- isError: { type: Boolean },
708
- isLoading: { type: Boolean },
709
- icon: {},
710
- icon2: { default: "" },
711
- addCleaner: { type: Boolean },
712
- title: {},
713
- captionType: {}
714
- },
715
- emits: ["update:modelValue"],
716
- setup(t, { emit: a }) {
717
- const o = t, n = a;
718
- ae(() => {
719
- e && e.datepicker("destroy");
720
- });
721
- const s = ne();
722
- let e;
723
- const d = w({
724
- get() {
725
- return B(o.modelValue, 2, void 0, "0000-00-00");
726
- },
727
- set(l) {
728
- l = Y(l, "0000-00-00"), n("update:modelValue", l);
729
- }
730
- });
731
- let i = (l) => {
732
- q(l);
733
- }, m = (l) => {
734
- const p = Y(l.target.value), b = B(p);
735
- if (!b || b === c.L.Not_date || l.target.value !== b) {
736
- l.target.value = d.value;
737
- return;
738
- }
739
- d.value = l.target.value;
740
- };
741
- async function r(l) {
742
- const p = await import("./datepicker-CS24dmLk.es.js");
743
- q = p.oninput, e = p.connectDatepicker(l.target, {
744
- onSelect: () => m(l)
745
- }), e && e.datepicker("show");
746
- }
747
- return (l, p) => A(it) ? (u(), T(O, D({ key: 0 }, l.$props, {
748
- modelValue: d.value,
749
- readonly: "",
750
- onClick: p[1] || (p[1] = (b) => s.value.showPicker())
751
- }), {
752
- default: L(() => [
753
- S("input", {
754
- ref_key: "el",
755
- ref: s,
756
- type: "date",
757
- class: "top-input_input-date",
758
- modelValue: l.modelValue,
759
- onChange: p[0] || (p[0] = (b) => d.value = b.target.value),
760
- tabindex: "-1"
761
- }, null, 40, nt)
762
- ]),
763
- _: 1
764
- }, 16, ["modelValue"])) : (u(), T(O, D({ key: 1 }, l.$props, {
765
- modelValue: d.value,
766
- "onUpdate:modelValue": p[2] || (p[2] = (b) => b === "" ? d.value = "" : ""),
767
- onInput: A(i),
768
- onFocusOnce: r,
769
- onChange: A(m),
770
- modificator: "datepicker"
771
- }), null, 16, ["modelValue", "onInput", "onChange"]));
772
- }
773
- }), lt = {
774
- "top-input-datepicker": "top-input-datepicker",
775
- "top-input_input-date": "top-input_input-date"
776
- }, dt = {
777
- $style: lt
778
- }, pt = /* @__PURE__ */ y(rt, [["__cssModules", dt]]), ut = { class: "top-inputRange" }, ct = /* @__PURE__ */ S("span", { class: "top-inputRange_dash" }, " — ", -1), mt = /* @__PURE__ */ v({
779
- __name: "inputRange",
780
- setup(t) {
781
- return (a, o) => (u(), f("div", ut, [
782
- k(a.$slots, "from"),
783
- ct,
784
- k(a.$slots, "to")
785
- ]));
786
- }
787
- }), ft = {
788
- "top-inputRange": "top-inputRange",
789
- "top-inputRange_dash": "top-inputRange_dash",
790
- "top-input": "top-input"
791
- }, bt = {
792
- $style: ft
793
- }, ht = /* @__PURE__ */ y(mt, [["__cssModules", bt]]), gt = ["name", "value", "disabled"], wt = /* @__PURE__ */ v({
794
- __name: "radio",
795
- props: {
796
- modelValue: {},
797
- value: {},
798
- name: {},
799
- description: {},
800
- disabled: { type: Boolean },
801
- isError: { type: Boolean }
802
- },
803
- emits: ["update:modelValue"],
804
- setup(t, { emit: a }) {
805
- const o = t, n = a, s = w({
806
- get() {
807
- return o.modelValue;
808
- },
809
- set(e) {
810
- n("update:modelValue", e);
811
- }
812
- });
813
- return (e, d) => (u(), f("label", {
814
- class: g({
815
- "top-forms-optionWrapper": !0,
816
- "top-radio": !0,
817
- ["top-radio_" + e.name]: e.name !== "",
818
- "top-disabled": e.disabled,
819
- "top-error": e.isError && !e.disabled
820
- })
821
- }, [
822
- W(S("input", {
823
- type: "radio",
824
- class: g({
825
- "top-forms-focusable": !e.disabled,
826
- "top-forms-option": !0,
827
- "top-radio_input": !0,
828
- "top-error": e.isError && !e.disabled
829
- }),
830
- "onUpdate:modelValue": d[0] || (d[0] = (i) => s.value = i),
831
- name: e.name,
832
- value: e.value,
833
- disabled: e.disabled
834
- }, null, 10, gt), [
835
- [ie, s.value]
836
- ]),
837
- e.$slots.default ? (u(), T(P, {
838
- key: 0,
839
- description: e.description,
840
- disabled: e.disabled
841
- }, {
842
- default: L(() => [
843
- k(e.$slots, "default")
844
- ]),
845
- _: 3
846
- }, 8, ["description", "disabled"])) : h("", !0)
847
- ], 2));
848
- }
849
- }), yt = {
850
- "top-radio": "top-radio",
851
- "top-radio_input": "top-radio_input",
852
- "top-error": "top-error"
853
- }, vt = {
854
- $style: yt
855
- }, $t = /* @__PURE__ */ y(wt, [["__cssModules", vt]]), St = ["name", "value", "disabled"], _t = /* @__PURE__ */ v({
856
- __name: "switcher",
857
- props: {
858
- modelValue: { type: [Boolean, Array, Set] },
859
- name: {},
860
- value: {},
861
- description: {},
862
- disabled: { type: Boolean },
863
- isError: { type: Boolean }
864
- },
865
- emits: ["update:modelValue"],
866
- setup(t, { emit: a }) {
867
- const o = t, n = a, s = w({
868
- get() {
869
- return o.modelValue;
870
- },
871
- set(e) {
872
- n("update:modelValue", e);
873
- }
874
- });
875
- return (e, d) => (u(), f("label", {
876
- class: g({
877
- "top-forms-optionWrapper": !0,
878
- "top-checkboxSwitcher": !0,
879
- "top-disabled": e.disabled,
880
- "top-error": e.isError && !e.disabled
881
- })
882
- }, [
883
- W(S("input", {
884
- type: "checkbox",
885
- class: g({
886
- "top-forms-focusable": !e.disabled,
887
- "top-forms-option": !0,
888
- "top-checkboxSwitcher_input": !0,
889
- "top-error": e.isError && !e.disabled
890
- }),
891
- "onUpdate:modelValue": d[0] || (d[0] = (i) => s.value = i),
892
- name: e.name,
893
- value: e.value,
894
- disabled: e.disabled
895
- }, null, 10, St), [
896
- [J, s.value]
897
- ]),
898
- e.$slots.default ? (u(), T(P, {
899
- key: 0,
900
- description: e.description,
901
- disabled: e.disabled
902
- }, {
903
- default: L(() => [
904
- k(e.$slots, "default")
905
- ]),
906
- _: 3
907
- }, 8, ["description", "disabled"])) : h("", !0)
908
- ], 2));
909
- }
910
- }), kt = {
911
- "top-checkboxSwitcher": "top-checkboxSwitcher",
912
- "top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
913
- "top-error": "top-error"
914
- }, Tt = {
915
- $style: kt
916
- }, Mt = /* @__PURE__ */ y(_t, [["__cssModules", Tt]]), Vt = ["name", "placeholder", "disabled", "readonly", "rows"], Wt = {
917
- key: 0,
918
- class: "top-textarea_pseudoContent"
919
- }, Bt = /* @__PURE__ */ v({
920
- inheritAttrs: !1,
921
- __name: "textarea",
922
- props: {
923
- modelValue: {},
924
- name: {},
925
- placeholder: {},
926
- rows: { default: 5 },
927
- minHeight: { default: 120 },
928
- expandable: { type: Boolean },
929
- disabled: { type: Boolean },
930
- readonly: { type: Boolean },
931
- isError: { type: Boolean },
932
- hint: {}
933
- },
934
- emits: ["update:modelValue"],
935
- setup(t, { emit: a }) {
936
- G((e) => ({
937
- "403001b8": e.minHeight + "px"
938
- }));
939
- const o = t, n = a, s = w({
940
- get() {
941
- return o.modelValue;
942
- },
943
- set(e) {
944
- n("update:modelValue", e);
945
- }
946
- });
947
- return (e, d) => {
948
- const i = re("top-tooltip");
949
- return u(), f("label", {
950
- class: g({
951
- "top-textarea": !0,
952
- ["top-textarea-" + e.name]: e.name,
953
- "top-disabled": e.disabled
954
- })
955
- }, [
956
- W(S("textarea", D({
957
- type: "text",
958
- class: {
959
- "top-forms-focusable": !e.disabled,
960
- "top-textarea_textarea": !0,
961
- "top-textarea_textarea-expandable": e.expandable,
962
- "top-error": e.isError
963
- },
964
- autocomplete: "off_always",
965
- name: e.name,
966
- placeholder: e.placeholder,
967
- disabled: e.disabled,
968
- readonly: e.readonly,
969
- rows: e.expandable ? void 0 : e.rows
970
- }, e.$attrs, {
971
- "onUpdate:modelValue": d[0] || (d[0] = (m) => s.value = m)
972
- }), null, 16, Vt), [
973
- [Z, s.value]
974
- ]),
975
- e.expandable ? (u(), f("div", Wt, V(s.value + " "), 1)) : h("", !0),
976
- e.hint ? W((u(), T(j, {
977
- key: 1,
978
- class: "top-textarea_hint",
979
- hint: e.hint
980
- }, null, 8, ["hint"])), [
981
- [i]
982
- ]) : h("", !0)
983
- ], 2);
984
- };
985
- }
986
- }), Lt = {
987
- "top-textarea": "top-textarea",
988
- "top-textarea_textarea": "top-textarea_textarea",
989
- "top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
990
- "top-textarea_pseudoContent": "top-textarea_pseudoContent",
991
- "top-textarea_hint": "top-textarea_hint"
992
- }, Et = {
993
- $style: Lt
994
- }, zt = /* @__PURE__ */ y(Bt, [["__cssModules", Et]]), Dt = ["data-value", "data-top-icon", "data-top-icon2"], Pt = ["name", "disabled"], At = ["label", "disabled"], Nt = ["value", "selected", "disabled"], Rt = ["value", "selected", "disabled"], Ct = {
995
- key: 1,
996
- class: "top-formsCaption"
997
- }, Ot = /* @__PURE__ */ v({
998
- __name: "select",
999
- props: /* @__PURE__ */ C({
1000
- modelValue: {},
1001
- options: {},
1002
- name: {},
1003
- disabled: { type: Boolean },
1004
- icon: {},
1005
- size: { default: "s" },
1006
- addChanger: { type: Boolean },
1007
- title: {},
1008
- isError: { type: Boolean }
1009
- }, {
1010
- modelValue: {
1011
- required: !0
1012
- },
1013
- modelModifiers: {}
1014
- }),
1015
- emits: /* @__PURE__ */ C(["update:modelValue"], ["update:modelValue"]),
1016
- setup(t, { emit: a }) {
1017
- const o = t, n = Q(t, "modelValue"), s = w(() => {
1018
- const r = /* @__PURE__ */ new Map();
1019
- return o.options.forEach((l, p) => {
1020
- if (typeof l == "string" && (l = d(p, l)), l.children) {
1021
- const b = /* @__PURE__ */ new Map();
1022
- l.children.forEach((_, E) => {
1023
- typeof _ == "string" && (_ = d(E, _)), b.set(_.value, _);
1024
- }), l = { ...l }, l.children = b, r.set(l.value, l);
1025
- } else
1026
- r.set(l.value, l);
1027
- }), r;
1028
- }), e = w(() => {
1029
- const r = /* @__PURE__ */ new Map();
1030
- return s.value.forEach((l) => {
1031
- if (!l.disabled) {
1032
- if (l.children) {
1033
- l.children.forEach((p) => {
1034
- p.disabled || r.set(p.value, p);
1035
- });
1036
- return;
1037
- }
1038
- r.set(l.value, l);
1039
- }
1040
- }), r;
1041
- }), d = (r, l) => ({
1042
- value: r,
1043
- title: l
1044
- });
1045
- le([
1046
- () => o.modelValue,
1047
- e
1048
- ], () => {
1049
- (n.value === null || n.value === void 0) && e.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), n.value = e.value.keys().next().value);
1050
- }, { immediate: !0 });
1051
- const i = w(() => {
1052
- var r;
1053
- return (r = e.value.get(n.value)) == null ? void 0 : r.icon;
1054
- }), m = () => {
1055
- const r = [...e.value.keys()], p = (r.indexOf(n.value) + 1) % r.length;
1056
- n.value = r[p];
1057
- };
1058
- return (r, l) => (u(), f("label", {
1059
- class: g({
1060
- "top-select": !0,
1061
- ["top-select-" + r.name]: r.name,
1062
- ["top-size_" + r.size]: !0,
1063
- "top-formsCaptionWrapper": !!r.title,
1064
- "top-select-error": r.isError,
1065
- "top-disabled": r.disabled
1066
- }),
1067
- "data-value": n.value,
1068
- "data-top-icon": r.icon,
1069
- "data-top-icon2": i.value
1070
- }, [
1071
- W(S("select", {
1072
- class: g({
1073
- "top-forms-focusable": !r.disabled,
1074
- "top-select_select": !0,
1075
- "top-select_arrow": !0,
1076
- "top-error": r.isError
1077
- }),
1078
- name: r.name,
1079
- disabled: r.disabled,
1080
- "onUpdate:modelValue": l[0] || (l[0] = (p) => n.value = p)
1081
- }, [
1082
- (u(!0), f(N, null, F(s.value, ([p, b]) => (u(), f(N, null, [
1083
- b.children ? (u(), f("optgroup", {
1084
- key: "group_" + p,
1085
- label: b.title,
1086
- disabled: b.disabled
1087
- }, [
1088
- (u(!0), f(N, null, F(b.children, ([_, E]) => (u(), f("option", {
1089
- key: _,
1090
- value: _,
1091
- selected: _ === n.value,
1092
- disabled: E.disabled
1093
- }, V(E.title), 9, Nt))), 128))
1094
- ], 8, At)) : (u(), f("option", {
1095
- key: p ?? void 0,
1096
- value: p,
1097
- selected: p === n.value,
1098
- disabled: b.disabled
1099
- }, V(b.title), 9, Rt))
1100
- ], 64))), 256))
1101
- ], 10, Pt), [
1102
- [de, n.value]
1103
- ]),
1104
- r.addChanger && e.value.size && !r.disabled ? (u(), f("span", {
1105
- key: 0,
1106
- class: "top-changer",
1107
- onClick: m
1108
- })) : h("", !0),
1109
- r.title ? (u(), f("span", Ct, V(r.title), 1)) : h("", !0)
1110
- ], 10, Dt));
1111
- }
1112
- }), Ht = {
1113
- "top-select": "top-select",
1114
- "top-select-error": "top-select-error",
1115
- "top-select_select": "top-select_select",
1116
- "top-changer": "top-changer"
1117
- }, It = {
1118
- $style: Ht
1119
- }, Ft = /* @__PURE__ */ y(Ot, [["__cssModules", It]]), eo = Ve, to = Pe, oo = Ue, so = P, ao = j, no = O, io = pt, ro = ht, lo = $t, po = Mt, uo = zt, co = Ft, mo = x;
1120
- export {
1121
- Gt as A,
1122
- fe as B,
1123
- c as C,
1124
- Qt as D,
1125
- X as E,
1126
- Jt as F,
1127
- Zt as G,
1128
- jt as H,
1129
- ve as I,
1130
- xt as J,
1131
- Y as K,
1132
- Pe as T,
1133
- y as _,
1134
- j as a,
1135
- eo as b,
1136
- to as c,
1137
- B as d,
1138
- oo as e,
1139
- so as f,
1140
- ao as g,
1141
- no as h,
1142
- Xt as i,
1143
- io as j,
1144
- ro as k,
1145
- mo as l,
1146
- lo as m,
1147
- co as n,
1148
- po as o,
1149
- uo as p,
1150
- O as q,
1151
- zt as r,
1152
- x as s,
1153
- pe as t,
1154
- ue as u,
1155
- ce as v,
1156
- me as w,
1157
- Yt as x,
1158
- qt as y,
1159
- Kt as z
1160
- };
1161
- //# sourceMappingURL=forms-DT_fsN6V.es.js.map