@topvisor/ui 0.9.33-dev → 0.9.34-utils-components-1

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