@efficiency-point/design-system 0.1.5 → 0.1.7

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 (82) hide show
  1. package/README.md +3 -3
  2. package/dist/components/DSAccordion/DSAccordion.d.ts.map +1 -1
  3. package/dist/components/DSCheckbox/DSCheckbox.d.ts.map +1 -1
  4. package/dist/components/DSDataTable/DSDataTable.d.ts.map +1 -1
  5. package/dist/components/DSDateTimePicker/DSDateTimePicker.d.ts.map +1 -1
  6. package/dist/components/DSDropDown/DSDropDown.d.ts.map +1 -1
  7. package/dist/components/DSDropDownMultiple/DSDropDownMultiple.d.ts.map +1 -1
  8. package/dist/components/DSFileInput/DSFileInput.d.ts.map +1 -1
  9. package/dist/components/DSIcon/DSIcon.d.ts +4 -7
  10. package/dist/components/DSIcon/DSIcon.d.ts.map +1 -1
  11. package/dist/components/DSIcon/IconSvg.d.ts +4 -0
  12. package/dist/components/DSIcon/IconSvg.d.ts.map +1 -0
  13. package/dist/components/DSIcon/source/IconBasket.d.ts +4 -0
  14. package/dist/components/DSIcon/source/IconBasket.d.ts.map +1 -0
  15. package/dist/components/DSIcon/source/IconCaptions.d.ts +4 -0
  16. package/dist/components/DSIcon/source/IconCaptions.d.ts.map +1 -0
  17. package/dist/components/DSIcon/source/IconCheck.d.ts +4 -0
  18. package/dist/components/DSIcon/source/IconCheck.d.ts.map +1 -0
  19. package/dist/components/DSIcon/source/IconChevron.d.ts +4 -0
  20. package/dist/components/DSIcon/source/IconChevron.d.ts.map +1 -0
  21. package/dist/components/DSIcon/source/IconCross.d.ts +4 -0
  22. package/dist/components/DSIcon/source/IconCross.d.ts.map +1 -0
  23. package/dist/components/DSIcon/source/IconEdit.d.ts +4 -0
  24. package/dist/components/DSIcon/source/IconEdit.d.ts.map +1 -0
  25. package/dist/components/DSIcon/source/IconErrorCircle.d.ts +4 -0
  26. package/dist/components/DSIcon/source/IconErrorCircle.d.ts.map +1 -0
  27. package/dist/components/DSIcon/source/IconEye.d.ts +4 -0
  28. package/dist/components/DSIcon/source/IconEye.d.ts.map +1 -0
  29. package/dist/components/DSIcon/source/IconEyeOff.d.ts +4 -0
  30. package/dist/components/DSIcon/source/IconEyeOff.d.ts.map +1 -0
  31. package/dist/components/DSIcon/source/IconFullscreen.d.ts +4 -0
  32. package/dist/components/DSIcon/source/IconFullscreen.d.ts.map +1 -0
  33. package/dist/components/DSIcon/source/IconFullscreenExit.d.ts +4 -0
  34. package/dist/components/DSIcon/source/IconFullscreenExit.d.ts.map +1 -0
  35. package/dist/components/DSIcon/source/IconInfo.d.ts +4 -0
  36. package/dist/components/DSIcon/source/IconInfo.d.ts.map +1 -0
  37. package/dist/components/DSIcon/source/IconInfoCircle.d.ts +4 -0
  38. package/dist/components/DSIcon/source/IconInfoCircle.d.ts.map +1 -0
  39. package/dist/components/DSIcon/source/IconMinus.d.ts +4 -0
  40. package/dist/components/DSIcon/source/IconMinus.d.ts.map +1 -0
  41. package/dist/components/DSIcon/source/IconPause.d.ts +4 -0
  42. package/dist/components/DSIcon/source/IconPause.d.ts.map +1 -0
  43. package/dist/components/DSIcon/source/IconPictureInPicture.d.ts +4 -0
  44. package/dist/components/DSIcon/source/IconPictureInPicture.d.ts.map +1 -0
  45. package/dist/components/DSIcon/source/IconPlay.d.ts +4 -0
  46. package/dist/components/DSIcon/source/IconPlay.d.ts.map +1 -0
  47. package/dist/components/DSIcon/source/IconReplay.d.ts +4 -0
  48. package/dist/components/DSIcon/source/IconReplay.d.ts.map +1 -0
  49. package/dist/components/DSIcon/source/IconSettings.d.ts +4 -0
  50. package/dist/components/DSIcon/source/IconSettings.d.ts.map +1 -0
  51. package/dist/components/DSIcon/source/IconSort.d.ts +4 -0
  52. package/dist/components/DSIcon/source/IconSort.d.ts.map +1 -0
  53. package/dist/components/DSIcon/source/IconSortAscending.d.ts +4 -0
  54. package/dist/components/DSIcon/source/IconSortAscending.d.ts.map +1 -0
  55. package/dist/components/DSIcon/source/IconSortDescending.d.ts +4 -0
  56. package/dist/components/DSIcon/source/IconSortDescending.d.ts.map +1 -0
  57. package/dist/components/DSIcon/source/IconSuccessCircle.d.ts +4 -0
  58. package/dist/components/DSIcon/source/IconSuccessCircle.d.ts.map +1 -0
  59. package/dist/components/DSIcon/source/IconUpload.d.ts +4 -0
  60. package/dist/components/DSIcon/source/IconUpload.d.ts.map +1 -0
  61. package/dist/components/DSIcon/source/IconVolume.d.ts +4 -0
  62. package/dist/components/DSIcon/source/IconVolume.d.ts.map +1 -0
  63. package/dist/components/DSIcon/source/IconVolumeMuted.d.ts +4 -0
  64. package/dist/components/DSIcon/source/IconVolumeMuted.d.ts.map +1 -0
  65. package/dist/components/DSIcon/source/IconWarning.d.ts +4 -0
  66. package/dist/components/DSIcon/source/IconWarning.d.ts.map +1 -0
  67. package/dist/components/DSIcon/source/index.d.ts +31 -0
  68. package/dist/components/DSIcon/source/index.d.ts.map +1 -0
  69. package/dist/components/DSIcon/types.d.ts +13 -0
  70. package/dist/components/DSIcon/types.d.ts.map +1 -0
  71. package/dist/components/DSInfoBlock/DSInfoBlock.d.ts.map +1 -1
  72. package/dist/components/DSInput/DSInput.d.ts.map +1 -1
  73. package/dist/components/DSModal/DSModal.d.ts.map +1 -1
  74. package/dist/components/DSSearchDropDown/DSSearchDropDown.d.ts.map +1 -1
  75. package/dist/components/DSToast/DSToast.d.ts.map +1 -1
  76. package/dist/components/DSVideoPlayerFrame/DSVideoPlayerFrame.d.ts.map +1 -1
  77. package/dist/components/DSVideoPlayerFrame/DSVideoPlayerFrame.utils.d.ts +2 -0
  78. package/dist/components/DSVideoPlayerFrame/DSVideoPlayerFrame.utils.d.ts.map +1 -0
  79. package/dist/index.cjs +2 -2
  80. package/dist/index.es.js +1255 -927
  81. package/dist/style.css +1 -1
  82. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -33,17 +33,17 @@ var y = {
33
33
  })
34
34
  ]
35
35
  }), x = {
36
- container: "_container_dhg26_1",
37
- inner: "_inner_dhg26_21",
38
- line: "_line_dhg26_39",
39
- primary: "_primary_dhg26_57",
40
- secondary: "_secondary_dhg26_63",
41
- outline: "_outline_dhg26_69",
42
- ghost: "_ghost_dhg26_75",
43
- empty: "_empty_dhg26_81",
44
- destructive: "_destructive_dhg26_87",
45
- destructiveOutline: "_destructiveOutline_dhg26_93",
46
- grow: "_grow_dhg26_1"
36
+ container: "_container_1h2c4_1",
37
+ inner: "_inner_1h2c4_21",
38
+ line: "_line_1h2c4_39",
39
+ primary: "_primary_1h2c4_57",
40
+ secondary: "_secondary_1h2c4_65",
41
+ outline: "_outline_1h2c4_73",
42
+ ghost: "_ghost_1h2c4_81",
43
+ empty: "_empty_1h2c4_89",
44
+ destructive: "_destructive_1h2c4_97",
45
+ destructiveOutline: "_destructiveOutline_1h2c4_105",
46
+ grow: "_grow_1h2c4_1"
47
47
  }, S = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
48
48
  className: `${x.container} ${x[e]}`,
49
49
  children: /* @__PURE__ */ n("div", {
@@ -86,7 +86,7 @@ var T = {
86
86
  disabled: "_disabled_fa00b_47",
87
87
  message: "_message_fa00b_55",
88
88
  success: "_success_fa00b_71"
89
- }, ee = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
89
+ }, E = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
90
90
  className: `${T.label} ${a ? T.disabled : ""} ${o}`,
91
91
  ...s,
92
92
  children: [
@@ -101,28 +101,184 @@ var T = {
101
101
  children: i
102
102
  })
103
103
  ]
104
- }), E = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
104
+ }), D = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
105
105
  id: r,
106
106
  className: `${T.message} ${T[n]} ${a}`,
107
107
  role: i && n === "error" ? "alert" : void 0,
108
108
  "aria-live": i && n !== "error" ? "polite" : void 0,
109
109
  children: e
110
- }), D = {
110
+ }), O = ({ width: e = 24, height: r = 24, color: i, title: a, style: o, children: s, ...c }) => /* @__PURE__ */ n("svg", {
111
+ xmlns: "http://www.w3.org/2000/svg",
112
+ viewBox: "0 0 24 24",
113
+ width: e,
114
+ height: r,
115
+ fill: "none",
116
+ stroke: "currentColor",
117
+ strokeWidth: "1.8",
118
+ strokeLinecap: "round",
119
+ strokeLinejoin: "round",
120
+ role: a ? "img" : void 0,
121
+ "aria-hidden": !a || void 0,
122
+ focusable: "false",
123
+ style: i ? {
124
+ ...o,
125
+ color: i
126
+ } : o,
127
+ ...c,
128
+ children: [a && /* @__PURE__ */ t("title", { children: a }), s]
129
+ }), k = {
130
+ IconBasket: (e) => /* @__PURE__ */ t(O, {
131
+ ...e,
132
+ children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
133
+ }),
134
+ IconCheck: (e) => /* @__PURE__ */ t(O, {
135
+ ...e,
136
+ children: /* @__PURE__ */ t("path", { d: "m5 12 4 4L19 6" })
137
+ }),
138
+ IconChevron: (e) => /* @__PURE__ */ t(O, {
139
+ viewBox: "0 0 20 20",
140
+ ...e,
141
+ children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
142
+ }),
143
+ IconCross: ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(O, {
144
+ strokeWidth: e,
145
+ ...n,
146
+ children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
147
+ }),
148
+ IconEdit: (e) => /* @__PURE__ */ t(O, {
149
+ ...e,
150
+ children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
151
+ }),
152
+ IconErrorCircle: (e) => /* @__PURE__ */ n(O, {
153
+ ...e,
154
+ children: [/* @__PURE__ */ t("circle", {
155
+ cx: "12",
156
+ cy: "12",
157
+ r: "10"
158
+ }), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
159
+ }),
160
+ IconEye: (e) => /* @__PURE__ */ n(O, {
161
+ ...e,
162
+ children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
163
+ cx: "12",
164
+ cy: "12",
165
+ r: "2.5"
166
+ })]
167
+ }),
168
+ IconEyeOff: (e) => /* @__PURE__ */ t(O, {
169
+ ...e,
170
+ children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
171
+ }),
172
+ IconInfo: (e) => /* @__PURE__ */ t(O, {
173
+ ...e,
174
+ children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
175
+ }),
176
+ IconInfoCircle: (e) => /* @__PURE__ */ n(O, {
177
+ ...e,
178
+ children: [/* @__PURE__ */ t("circle", {
179
+ cx: "12",
180
+ cy: "12",
181
+ r: "10"
182
+ }), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
183
+ }),
184
+ IconMinus: (e) => /* @__PURE__ */ t(O, {
185
+ ...e,
186
+ children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
187
+ }),
188
+ IconPause: (e) => /* @__PURE__ */ t(O, {
189
+ ...e,
190
+ children: /* @__PURE__ */ t("path", {
191
+ d: "M8 5v14M16 5v14",
192
+ strokeWidth: "3"
193
+ })
194
+ }),
195
+ IconPictureInPicture: (e) => /* @__PURE__ */ t(O, {
196
+ ...e,
197
+ children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
198
+ }),
199
+ IconPlay: (e) => /* @__PURE__ */ t(O, {
200
+ ...e,
201
+ children: /* @__PURE__ */ t("path", {
202
+ d: "m8 5 11 7-11 7V5Z",
203
+ fill: "currentColor",
204
+ stroke: "none"
205
+ })
206
+ }),
207
+ IconReplay: (e) => /* @__PURE__ */ t(O, {
208
+ ...e,
209
+ children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
210
+ }),
211
+ IconSettings: (e) => /* @__PURE__ */ t(O, {
212
+ ...e,
213
+ children: /* @__PURE__ */ t("path", { d: "M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z" })
214
+ }),
215
+ IconFullscreen: (e) => /* @__PURE__ */ t(O, {
216
+ ...e,
217
+ children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
218
+ }),
219
+ IconFullscreenExit: (e) => /* @__PURE__ */ t(O, {
220
+ ...e,
221
+ children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
222
+ }),
223
+ IconCaptions: (e) => /* @__PURE__ */ t(O, {
224
+ ...e,
225
+ children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
226
+ }),
227
+ IconVolume: (e) => /* @__PURE__ */ t(O, {
228
+ ...e,
229
+ children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
230
+ }),
231
+ IconVolumeMuted: (e) => /* @__PURE__ */ t(O, {
232
+ ...e,
233
+ children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
234
+ }),
235
+ IconSort: (e) => /* @__PURE__ */ t(O, {
236
+ ...e,
237
+ children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
238
+ }),
239
+ IconSortAscending: (e) => /* @__PURE__ */ t(O, {
240
+ ...e,
241
+ children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
242
+ }),
243
+ IconSortDescending: (e) => /* @__PURE__ */ t(O, {
244
+ ...e,
245
+ children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
246
+ }),
247
+ IconSuccessCircle: (e) => /* @__PURE__ */ n(O, {
248
+ ...e,
249
+ children: [/* @__PURE__ */ t("circle", {
250
+ cx: "12",
251
+ cy: "12",
252
+ r: "10"
253
+ }), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
254
+ }),
255
+ IconUpload: (e) => /* @__PURE__ */ t(O, {
256
+ ...e,
257
+ children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
258
+ }),
259
+ IconWarning: (e) => /* @__PURE__ */ n(O, {
260
+ ...e,
261
+ children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
262
+ })
263
+ }, A = ({ name: e, ...n }) => {
264
+ let r = k[e];
265
+ return /* @__PURE__ */ t(r, { ...n });
266
+ }, j = {
111
267
  wrapper: "_wrapper_1gq36_1",
112
268
  label: "_label_1gq36_3",
113
269
  input: "_input_1gq36_5",
114
270
  control: "_control_1gq36_7",
115
271
  disabled: "_disabled_1gq36_13",
116
272
  controlError: "_controlError_1gq36_17"
117
- }, O = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: u = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
273
+ }, M = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: u = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
118
274
  let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = d(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
119
275
  return s(() => {
120
276
  y.current && (y.current.indeterminate = h && !e);
121
277
  }, [e, h]), /* @__PURE__ */ n("div", {
122
- className: `${D.wrapper} ${f}`,
278
+ className: `${j.wrapper} ${f}`,
123
279
  children: [
124
280
  /* @__PURE__ */ n("label", {
125
- className: `${D.label} ${l ? D.disabled : ""}`,
281
+ className: `${j.label} ${l ? j.disabled : ""}`,
126
282
  htmlFor: v,
127
283
  children: [
128
284
  /* @__PURE__ */ t("input", {
@@ -135,53 +291,63 @@ var T = {
135
291
  "aria-readonly": u || void 0,
136
292
  "aria-invalid": !!o,
137
293
  "aria-describedby": [b, x].filter(Boolean).join(" ") || void 0,
138
- className: D.input,
294
+ className: j.input,
139
295
  onChange: (e) => {
140
296
  u || r?.(e.target.checked, e);
141
297
  },
142
298
  ...g
143
299
  }),
144
- /* @__PURE__ */ t("span", {
145
- className: `${D.control} ${o ? D.controlError : ""}`,
300
+ /* @__PURE__ */ n("span", {
301
+ className: `${j.control} ${o ? j.controlError : ""}`,
146
302
  "aria-hidden": "true",
147
- children: h && !e ? "−" : e ? "✓" : ""
303
+ children: [h && !e && /* @__PURE__ */ t(A, {
304
+ name: "IconMinus",
305
+ width: 16,
306
+ height: 16
307
+ }), e && /* @__PURE__ */ t(A, {
308
+ name: "IconCheck",
309
+ width: 16,
310
+ height: 16
311
+ })]
148
312
  }),
149
313
  i && /* @__PURE__ */ t("span", { children: i })
150
314
  ]
151
315
  }),
152
- a && !o && /* @__PURE__ */ t(E, {
316
+ a && !o && /* @__PURE__ */ t(D, {
153
317
  id: b,
154
318
  children: a
155
319
  }),
156
- o && /* @__PURE__ */ t(E, {
320
+ o && /* @__PURE__ */ t(D, {
157
321
  id: x,
158
322
  variant: "error",
159
323
  children: o
160
324
  })
161
325
  ]
162
326
  });
163
- }, k = {
164
- wrapper: "_wrapper_1or7y_1",
165
- trigger: "_trigger_1or7y_17",
166
- lg: "_lg_1or7y_51",
167
- chevron: "_chevron_1or7y_63",
168
- chevronOpen: "_chevronOpen_1or7y_89",
169
- nav: "_nav_1or7y_99",
170
- day: "_day_1or7y_101",
171
- monthSelect: "_monthSelect_1or7y_103",
172
- yearInput: "_yearInput_1or7y_105",
173
- timeInput: "_timeInput_1or7y_107",
174
- value: "_value_1or7y_131",
175
- placeholder: "_placeholder_1or7y_139",
176
- error: "_error_1or7y_147",
177
- panel: "_panel_1or7y_155",
178
- calendarHeader: "_calendarHeader_1or7y_181",
179
- weekdays: "_weekdays_1or7y_271",
180
- days: "_days_1or7y_273",
181
- outside: "_outside_1or7y_309",
182
- selected: "_selected_1or7y_317",
183
- timeLabel: "_timeLabel_1or7y_337"
184
- }, A = [
327
+ }, N = {
328
+ wrapper: "_wrapper_1kcfm_1",
329
+ trigger: "_trigger_1kcfm_17",
330
+ lg: "_lg_1kcfm_51",
331
+ chevron: "_chevron_1kcfm_63",
332
+ chevronOpen: "_chevronOpen_1kcfm_89",
333
+ nav: "_nav_1kcfm_99",
334
+ day: "_day_1kcfm_101",
335
+ monthSelect: "_monthSelect_1kcfm_103",
336
+ yearInput: "_yearInput_1kcfm_105",
337
+ timeInput: "_timeInput_1kcfm_107",
338
+ value: "_value_1kcfm_131",
339
+ placeholder: "_placeholder_1kcfm_139",
340
+ error: "_error_1kcfm_147",
341
+ panel: "_panel_1kcfm_155",
342
+ calendarHeader: "_calendarHeader_1kcfm_181",
343
+ weekdays: "_weekdays_1kcfm_271",
344
+ days: "_days_1kcfm_273",
345
+ outside: "_outside_1kcfm_309",
346
+ selected: "_selected_1kcfm_317",
347
+ timeLabel: "_timeLabel_1kcfm_337",
348
+ previousMonth: "_previousMonth_1kcfm_385",
349
+ nextMonth: "_nextMonth_1kcfm_393"
350
+ }, P = [
185
351
  "Пн",
186
352
  "Вт",
187
353
  "Ср",
@@ -189,7 +355,7 @@ var T = {
189
355
  "Пт",
190
356
  "Сб",
191
357
  "Вс"
192
- ], j = [
358
+ ], F = [
193
359
  "Январь",
194
360
  "Февраль",
195
361
  "Март",
@@ -202,11 +368,11 @@ var T = {
202
368
  "Октябрь",
203
369
  "Ноябрь",
204
370
  "Декабрь"
205
- ], M = (e) => String(e).padStart(2, "0"), N = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), P = (e, t) => {
371
+ ], I = (e) => String(e).padStart(2, "0"), L = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), R = (e, t) => {
206
372
  if (!e) return "";
207
- let n = `${e.getFullYear()}-${M(e.getMonth() + 1)}-${M(e.getDate())}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
373
+ let n = `${e.getFullYear()}-${I(e.getMonth() + 1)}-${I(e.getDate())}`, r = `${I(e.getHours())}:${I(e.getMinutes())}`;
208
374
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
209
- }, F = (e, t) => {
375
+ }, z = (e, t) => {
210
376
  if (!e) return null;
211
377
  if (t === "time") {
212
378
  let t = /^(\d{2}):(\d{2})$/.exec(e);
@@ -224,36 +390,36 @@ var T = {
224
390
  }
225
391
  let n = new Date(e);
226
392
  return Number.isNaN(n.getTime()) ? null : n;
227
- }, I = (e, t) => {
393
+ }, B = (e, t) => {
228
394
  if (!e) return "";
229
- let n = `${M(e.getDate())}.${M(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
395
+ let n = `${I(e.getDate())}.${I(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${I(e.getHours())}:${I(e.getMinutes())}`;
230
396
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
231
- }, L = (e) => {
397
+ }, V = (e) => {
232
398
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
233
399
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
234
400
  let n = new Date(r);
235
401
  return n.setDate(r.getDate() + t), n;
236
402
  });
237
- }, R = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), z = (e, t, n) => {
238
- let r = N(e).getTime();
239
- return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
240
- }, B = 8, V = 6, H = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: D = "" }) => {
241
- let O = c(), M = w ?? `ds-date-time-${T ?? O}`, N = g ? `${M}-hint` : void 0, H = _ ? `${M}-error` : void 0, U = d(null), W = d(null), te = d(null), [G, K] = f(!1), [q, J] = f(r ?? /* @__PURE__ */ new Date()), [ne, re] = f(P(r, "time")), [ie, ae] = f(null), oe = u(() => L(q), [q]), se = a !== "time", ce = a !== "date";
403
+ }, H = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ee = (e, t, n) => {
404
+ let r = L(e).getTime();
405
+ return !!(t && r < L(t).getTime() || n && r > L(n).getTime());
406
+ }, U = 8, W = 6, G = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: O = "" }) => {
407
+ let k = c(), j = w ?? `ds-date-time-${T ?? k}`, M = g ? `${j}-hint` : void 0, I = _ ? `${j}-error` : void 0, L = d(null), G = d(null), te = d(null), [K, q] = f(!1), [J, ne] = f(r ?? /* @__PURE__ */ new Date()), [Y, re] = f(R(r, "time")), [ie, ae] = f(null), oe = u(() => V(J), [J]), se = a !== "time", ce = a !== "date";
242
408
  s(() => {
243
- r && J(r), re(P(r, "time"));
409
+ r && ne(r), re(R(r, "time"));
244
410
  }, [r]);
245
411
  let le = o(() => {
246
- let e = W.current, t = te.current;
412
+ let e = G.current, t = te.current;
247
413
  if (!e || !t) return;
248
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - B, o = n.top - B, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(B, n.top - r.height - V) : n.bottom + V, u = n.left, d = i - r.width - B;
414
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - U, o = n.top - U, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(U, n.top - r.height - W) : n.bottom + W, u = n.left, d = i - r.width - U;
249
415
  ae({
250
416
  top: l,
251
- left: Math.max(B, Math.min(u, d)),
417
+ left: Math.max(U, Math.min(u, d)),
252
418
  maxHeight: c
253
419
  });
254
420
  }, []);
255
421
  l(() => {
256
- if (!G) {
422
+ if (!K) {
257
423
  ae(null);
258
424
  return;
259
425
  }
@@ -261,38 +427,38 @@ var T = {
261
427
  window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
262
428
  };
263
429
  }, [
264
- G,
430
+ K,
265
431
  le,
266
- q,
267
- ne
432
+ J,
433
+ Y
268
434
  ]), s(() => {
269
- if (!G) return;
435
+ if (!K) return;
270
436
  let e = (e) => {
271
- let t = e.target, n = U.current?.contains(t), r = te.current?.contains(t);
272
- !n && !r && K(!1);
437
+ let t = e.target, n = L.current?.contains(t), r = te.current?.contains(t);
438
+ !n && !r && q(!1);
273
439
  }, t = (e) => {
274
- e.key === "Escape" && (K(!1), W.current?.focus());
440
+ e.key === "Escape" && (q(!1), G.current?.focus());
275
441
  };
276
442
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
277
443
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
278
444
  };
279
- }, [G]);
445
+ }, [K]);
280
446
  let ue = (e) => {
281
- if (z(e, x, S)) return;
282
- let t = a === "date" ? F(P(e, "date"), "date") : new Date(e);
283
- t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && K(!1));
284
- }, Y = (e) => {
447
+ if (ee(e, x, S)) return;
448
+ let t = a === "date" ? z(R(e, "date"), "date") : new Date(e);
449
+ t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && q(!1));
450
+ }, X = (e) => {
285
451
  if (re(e), !e) {
286
452
  i?.(null);
287
453
  return;
288
454
  }
289
- let t = F(e, "time");
455
+ let t = z(e, "time");
290
456
  if (!t) return;
291
- let n = new Date(a === "datetime" ? r ?? q : /* @__PURE__ */ new Date());
457
+ let n = new Date(a === "datetime" ? r ?? J : /* @__PURE__ */ new Date());
292
458
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
293
- }, de = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), fe = [N, H].filter(Boolean).join(" ") || void 0, pe = G && !y ? /* @__PURE__ */ n("div", {
459
+ }, de = h ?? (a === "date" ? "--.--.----" : a === "time" ? "--:--" : "--.--.---- --:--"), fe = [M, I].filter(Boolean).join(" ") || void 0, pe = K && !y ? /* @__PURE__ */ n("div", {
294
460
  ref: te,
295
- className: k.panel,
461
+ className: N.panel,
296
462
  role: "dialog",
297
463
  "aria-label": m ?? de,
298
464
  style: ie ? {
@@ -306,53 +472,63 @@ var T = {
306
472
  },
307
473
  children: [se && /* @__PURE__ */ n(e, { children: [
308
474
  /* @__PURE__ */ n("div", {
309
- className: k.calendarHeader,
475
+ className: N.calendarHeader,
310
476
  children: [
311
477
  /* @__PURE__ */ t("button", {
312
478
  type: "button",
313
- className: k.nav,
479
+ className: N.nav,
314
480
  "aria-label": "Предыдущий месяц",
315
- onClick: () => J(new Date(q.getFullYear(), q.getMonth() - 1, 1)),
316
- children: "‹"
481
+ onClick: () => ne(new Date(J.getFullYear(), J.getMonth() - 1, 1)),
482
+ children: /* @__PURE__ */ t(A, {
483
+ name: "IconChevron",
484
+ width: 20,
485
+ height: 20,
486
+ className: N.previousMonth
487
+ })
317
488
  }),
318
489
  /* @__PURE__ */ t("select", {
319
- className: k.monthSelect,
490
+ className: N.monthSelect,
320
491
  "aria-label": "Месяц",
321
- value: q.getMonth(),
322
- onChange: (e) => J(new Date(q.getFullYear(), Number(e.target.value), 1)),
323
- children: j.map((e, n) => /* @__PURE__ */ t("option", {
492
+ value: J.getMonth(),
493
+ onChange: (e) => ne(new Date(J.getFullYear(), Number(e.target.value), 1)),
494
+ children: F.map((e, n) => /* @__PURE__ */ t("option", {
324
495
  value: n,
325
496
  children: e
326
497
  }, e))
327
498
  }),
328
499
  /* @__PURE__ */ t("input", {
329
- className: k.yearInput,
500
+ className: N.yearInput,
330
501
  type: "number",
331
502
  "aria-label": "Год",
332
- value: q.getFullYear(),
333
- onChange: (e) => J(new Date(Number(e.target.value), q.getMonth(), 1))
503
+ value: J.getFullYear(),
504
+ onChange: (e) => ne(new Date(Number(e.target.value), J.getMonth(), 1))
334
505
  }),
335
506
  /* @__PURE__ */ t("button", {
336
507
  type: "button",
337
- className: k.nav,
508
+ className: N.nav,
338
509
  "aria-label": "Следующий месяц",
339
- onClick: () => J(new Date(q.getFullYear(), q.getMonth() + 1, 1)),
340
- children: "›"
510
+ onClick: () => ne(new Date(J.getFullYear(), J.getMonth() + 1, 1)),
511
+ children: /* @__PURE__ */ t(A, {
512
+ name: "IconChevron",
513
+ width: 20,
514
+ height: 20,
515
+ className: N.nextMonth
516
+ })
341
517
  })
342
518
  ]
343
519
  }),
344
520
  /* @__PURE__ */ t("div", {
345
- className: k.weekdays,
346
- children: A.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
521
+ className: N.weekdays,
522
+ children: P.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
347
523
  }),
348
524
  /* @__PURE__ */ t("div", {
349
- className: k.days,
525
+ className: N.days,
350
526
  children: oe.map((e) => {
351
- let n = R(r, e);
527
+ let n = H(r, e);
352
528
  return /* @__PURE__ */ t("button", {
353
529
  type: "button",
354
- className: `${k.day} ${e.getMonth() === q.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
355
- disabled: z(e, x, S),
530
+ className: `${N.day} ${e.getMonth() === J.getMonth() ? "" : N.outside} ${n ? N.selected : ""}`,
531
+ disabled: ee(e, x, S),
356
532
  "aria-pressed": n,
357
533
  onClick: () => ue(e),
358
534
  children: e.getDate()
@@ -360,84 +536,78 @@ var T = {
360
536
  })
361
537
  })
362
538
  ] }), ce && /* @__PURE__ */ n("label", {
363
- className: k.timeLabel,
539
+ className: N.timeLabel,
364
540
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
365
- className: k.timeInput,
541
+ className: N.timeInput,
366
542
  type: "time",
367
- value: ne,
368
- onChange: (e) => Y(e.target.value)
543
+ value: Y,
544
+ onChange: (e) => X(e.target.value)
369
545
  })]
370
546
  })]
371
547
  }) : null;
372
548
  return /* @__PURE__ */ n("div", {
373
- ref: U,
374
- className: `${k.wrapper} ${D}`,
549
+ ref: L,
550
+ className: `${N.wrapper} ${O}`,
375
551
  children: [
376
- m && /* @__PURE__ */ t(ee, {
377
- htmlFor: M,
552
+ m && /* @__PURE__ */ t(E, {
553
+ htmlFor: j,
378
554
  required: b,
379
555
  disabled: v,
380
556
  children: m
381
557
  }),
382
558
  /* @__PURE__ */ n("button", {
383
- ref: W,
384
- id: M,
559
+ ref: G,
560
+ id: j,
385
561
  name: T,
386
562
  type: "button",
387
- className: `${k.trigger} ${k[C]} ${_ ? k.error : ""}`,
563
+ className: `${N.trigger} ${N[C]} ${_ ? N.error : ""}`,
388
564
  disabled: v,
389
565
  "aria-readonly": y || void 0,
390
- "aria-expanded": G,
566
+ "aria-expanded": K,
391
567
  "aria-haspopup": "dialog",
392
568
  "aria-describedby": fe,
393
569
  onClick: () => {
394
- y || K((e) => !e);
570
+ y || q((e) => !e);
395
571
  },
396
572
  children: [/* @__PURE__ */ t("span", {
397
- className: r ? k.value : k.placeholder,
398
- children: I(r, a) || de
573
+ className: r ? N.value : N.placeholder,
574
+ children: B(r, a) || de
399
575
  }), /* @__PURE__ */ t("span", {
400
- className: [k.chevron, pe ? k.chevronOpen : ""].filter(Boolean).join(" "),
576
+ className: [N.chevron, pe ? N.chevronOpen : ""].filter(Boolean).join(" "),
401
577
  "aria-hidden": "true",
402
- children: /* @__PURE__ */ t("svg", {
403
- viewBox: "0 0 20 20",
404
- fill: "none",
405
- children: /* @__PURE__ */ t("path", {
406
- d: "M5 7.5L10 12.5L15 7.5",
407
- stroke: "currentColor",
408
- strokeWidth: "1.8",
409
- strokeLinecap: "round",
410
- strokeLinejoin: "round"
411
- })
578
+ children: /* @__PURE__ */ t(A, {
579
+ name: "IconChevron",
580
+ width: 20,
581
+ height: 20
412
582
  })
413
583
  })]
414
584
  }),
415
585
  pe && p(pe, document.body),
416
- g && !_ && /* @__PURE__ */ t(E, {
417
- id: N,
586
+ g && !_ && /* @__PURE__ */ t(D, {
587
+ id: M,
418
588
  children: g
419
589
  }),
420
- _ && /* @__PURE__ */ t(E, {
421
- id: H,
590
+ _ && /* @__PURE__ */ t(D, {
591
+ id: I,
422
592
  variant: "error",
423
593
  children: _
424
594
  })
425
595
  ]
426
596
  });
427
- }, U = {
597
+ }, te = {
428
598
  root: "_root_1q42e_1",
429
599
  legend: "_legend_1q42e_3",
430
600
  range: "_range_1q42e_5"
431
- }, W = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), te = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
601
+ }, K = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), q = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
432
602
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
433
- i?.(e), W(e) && r?.(e);
603
+ i?.(e), K(e) && r?.(e);
434
604
  };
435
605
  return /* @__PURE__ */ n("fieldset", {
436
- className: `${U.root} ${h}`,
606
+ className: `${te.root} ${h}`,
437
607
  disabled: f,
438
608
  children: [/* @__PURE__ */ n("div", {
439
- className: U.range,
440
- children: [/* @__PURE__ */ t(H, {
609
+ className: te.range,
610
+ children: [/* @__PURE__ */ t(G, {
441
611
  value: e.from,
442
612
  mode: a === "datetime" ? "datetime" : a,
443
613
  label: o,
@@ -451,7 +621,7 @@ var T = {
451
621
  ...e,
452
622
  from: t
453
623
  })
454
- }), /* @__PURE__ */ t(H, {
624
+ }), /* @__PURE__ */ t(G, {
455
625
  value: e.to,
456
626
  mode: a === "datetime" ? "datetime" : a,
457
627
  label: s,
@@ -466,9 +636,9 @@ var T = {
466
636
  to: t
467
637
  })
468
638
  })]
469
- }), c && !g && /* @__PURE__ */ t(E, { children: c })]
639
+ }), c && !g && /* @__PURE__ */ t(D, { children: c })]
470
640
  });
471
- }, G = {
641
+ }, J = {
472
642
  group: "_group_1fs9e_1",
473
643
  skeleton: "_skeleton_1fs9e_3",
474
644
  text: "_text_1fs9e_5",
@@ -476,55 +646,55 @@ var T = {
476
646
  circular: "_circular_1fs9e_9",
477
647
  animated: "_animated_1fs9e_11",
478
648
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
479
- }, K = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
480
- className: `${G.group} ${o}`,
649
+ }, ne = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
650
+ className: `${J.group} ${o}`,
481
651
  "aria-hidden": "true",
482
652
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
483
- className: `${G.skeleton} ${G[e]} ${a ? G.animated : ""}`,
653
+ className: `${J.skeleton} ${J[e]} ${a ? J.animated : ""}`,
484
654
  style: {
485
655
  width: s === i - 1 && i > 1 ? "70%" : n,
486
656
  height: r
487
657
  }
488
658
  }, s))
489
- }), q = {
490
- wrapper: "_wrapper_1f1hc_1",
491
- label: "_label_1f1hc_17",
492
- container: "_container_1f1hc_29",
493
- trigger: "_trigger_1f1hc_37",
494
- disabledText: "_disabledText_1f1hc_39",
495
- sm: "_sm_1f1hc_61",
496
- md: "_md_1f1hc_71",
497
- lg: "_lg_1f1hc_81",
498
- value: "_value_1f1hc_141",
499
- placeholder: "_placeholder_1f1hc_143",
500
- chevron: "_chevron_1f1hc_195",
501
- chevronOpen: "_chevronOpen_1f1hc_221",
502
- menu: "_menu_1f1hc_229",
503
- option: "_option_1f1hc_259",
504
- selected: "_selected_1f1hc_329",
505
- message: "_message_1f1hc_349",
506
- error: "_error_1f1hc_351",
507
- errorState: "_errorState_1f1hc_377"
508
- }, J = 8, ne = 6, re = 120, ie = (e, t, n) => {
659
+ }), Y = {
660
+ wrapper: "_wrapper_jmtfp_1",
661
+ label: "_label_jmtfp_17",
662
+ container: "_container_jmtfp_29",
663
+ trigger: "_trigger_jmtfp_37",
664
+ disabledText: "_disabledText_jmtfp_39",
665
+ sm: "_sm_jmtfp_61",
666
+ md: "_md_jmtfp_71",
667
+ lg: "_lg_jmtfp_81",
668
+ value: "_value_jmtfp_141",
669
+ placeholder: "_placeholder_jmtfp_143",
670
+ chevron: "_chevron_jmtfp_199",
671
+ chevronOpen: "_chevronOpen_jmtfp_225",
672
+ menu: "_menu_jmtfp_233",
673
+ option: "_option_jmtfp_263",
674
+ selected: "_selected_jmtfp_333",
675
+ message: "_message_jmtfp_353",
676
+ error: "_error_jmtfp_355",
677
+ errorState: "_errorState_jmtfp_381"
678
+ }, re = 8, ie = 6, ae = 120, oe = (e, t, n) => {
509
679
  if (!e.length) return -1;
510
680
  for (let r = 0; r < e.length; r += 1) {
511
681
  let i = (t + r * n + e.length) % e.length;
512
682
  if (!e[i]?.disabled) return i;
513
683
  }
514
684
  return -1;
515
- }, ae = (e) => {
685
+ }, se = (e) => {
516
686
  if (typeof e == "number") return e;
517
687
  if (typeof e == "string") {
518
688
  let t = Number.parseFloat(e);
519
689
  if (Number.isFinite(t)) return t;
520
690
  }
521
691
  return Infinity;
522
- }, oe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
523
- let E = c(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = f(!1), [j, M] = f(null), N = d(null), P = d(null), F = d(null), I = d([]), L = u(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = _ ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = m && h, H = o(() => {
524
- let e = P.current, t = F.current;
692
+ }, ce = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
693
+ let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [j, M] = f(!1), [N, P] = f(null), F = d(null), I = d(null), L = d(null), R = d([]), z = u(() => e.find((e) => e.value === r), [e, r]), B = y ? `${O}-hint` : void 0, V = _ ? `${O}-error` : void 0, H = [B, V].filter(Boolean).join(" ") || void 0, ee = m && h, U = o(() => {
694
+ let e = I.current, t = L.current;
525
695
  if (!e || !t) return;
526
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - J, o = n.top - J, s = a < r.height && o > a, c = Math.max(re, s ? o : a), l = ae(T), u = Math.min(c, l), d = n.left, f = i - n.width - J, p = Math.max(J, Math.min(d, f)), m = s ? Math.max(J, n.top - r.height - ne) : n.bottom + ne;
527
- M({
696
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - re, o = n.top - re, s = a < r.height && o > a, c = Math.max(ae, s ? o : a), l = se(T), u = Math.min(c, l), d = n.left, f = i - n.width - re, p = Math.max(re, Math.min(d, f)), m = s ? Math.max(re, n.top - r.height - ie) : n.bottom + ie;
697
+ P({
528
698
  top: m,
529
699
  left: p,
530
700
  width: n.width,
@@ -532,48 +702,48 @@ var T = {
532
702
  });
533
703
  }, [T]);
534
704
  l(() => {
535
- if (!k) {
536
- M(null);
705
+ if (!j) {
706
+ P(null);
537
707
  return;
538
708
  }
539
- return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
540
- window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
709
+ return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
710
+ window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
541
711
  };
542
712
  }, [
543
- k,
544
- H,
713
+ j,
714
+ U,
545
715
  e.length
546
716
  ]), s(() => {
547
- if (!k) return;
717
+ if (!j) return;
548
718
  let e = (e) => {
549
- let t = e.target, n = N.current?.contains(t), r = F.current?.contains(t);
550
- !n && !r && A(!1);
719
+ let t = e.target, n = F.current?.contains(t), r = L.current?.contains(t);
720
+ !n && !r && M(!1);
551
721
  }, t = (e) => {
552
- e.key === "Escape" && (A(!1), P.current?.focus());
722
+ e.key === "Escape" && (M(!1), I.current?.focus());
553
723
  };
554
724
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
555
725
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
556
726
  };
557
- }, [k]);
558
- let U = (t, n) => {
559
- let r = ie(e, t, n);
727
+ }, [j]);
728
+ let W = (t, n) => {
729
+ let r = oe(e, t, n);
560
730
  if (r === -1) return;
561
- let i = I.current[r];
731
+ let i = R.current[r];
562
732
  i?.focus(), i?.scrollIntoView({ block: "nearest" });
563
- }, W = (e) => {
564
- e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
565
- }, te = k ? /* @__PURE__ */ t("ul", {
566
- ref: F,
567
- id: O,
568
- className: q.menu,
733
+ }, G = (e) => {
734
+ e.disabled || (i?.(e.value, e), M(!1), I.current?.focus());
735
+ }, te = j ? /* @__PURE__ */ t("ul", {
736
+ ref: L,
737
+ id: k,
738
+ className: Y.menu,
569
739
  role: "listbox",
570
740
  "aria-label": g,
571
- style: j ? {
741
+ style: N ? {
572
742
  position: "fixed",
573
- top: j.top,
574
- left: j.left,
575
- width: j.width,
576
- maxHeight: j.maxHeight
743
+ top: N.top,
744
+ left: N.left,
745
+ width: N.width,
746
+ maxHeight: N.maxHeight
577
747
  } : {
578
748
  position: "fixed",
579
749
  top: 0,
@@ -587,140 +757,135 @@ var T = {
587
757
  role: "presentation",
588
758
  children: /* @__PURE__ */ n("button", {
589
759
  ref: (e) => {
590
- I.current[a] = e;
760
+ R.current[a] = e;
591
761
  },
592
762
  type: "button",
593
763
  role: "option",
594
764
  "aria-selected": o,
595
765
  disabled: i.disabled,
596
766
  className: [
597
- q[v],
598
- q.option,
599
- o ? q.selected : ""
767
+ Y[v],
768
+ Y.option,
769
+ o ? Y.selected : ""
600
770
  ].filter(Boolean).join(" "),
601
- onClick: () => W(i),
771
+ onClick: () => G(i),
602
772
  onKeyDown: (t) => {
603
773
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
604
774
  t.preventDefault();
605
775
  let e = t.key === "ArrowDown" ? 1 : -1;
606
- U(a + e, e);
776
+ W(a + e, e);
607
777
  }
608
- if (t.key === "Tab" && A(!1), t.key === "Home" || t.key === "End") {
778
+ if (t.key === "Tab" && M(!1), t.key === "Home" || t.key === "End") {
609
779
  t.preventDefault();
610
780
  let n = t.key === "Home" ? 1 : -1;
611
- U(t.key === "Home" ? 0 : e.length - 1, n);
781
+ W(t.key === "Home" ? 0 : e.length - 1, n);
612
782
  }
613
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
783
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), G(i));
614
784
  },
615
- children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t("span", {
616
- "aria-hidden": "true",
617
- children: "✓"
785
+ children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(A, {
786
+ name: "IconCheck",
787
+ width: 16,
788
+ height: 16
618
789
  })]
619
790
  })
620
791
  }, i.value);
621
792
  })
622
793
  }) : null;
623
794
  return /* @__PURE__ */ n("div", {
624
- ref: N,
795
+ ref: F,
625
796
  className: [
626
- q.wrapper,
627
- _ ? q.errorState : "",
797
+ Y.wrapper,
798
+ _ ? Y.errorState : "",
628
799
  b
629
800
  ].filter(Boolean).join(" "),
630
801
  children: [
631
- g && /* @__PURE__ */ t(ee, {
802
+ g && /* @__PURE__ */ t(E, {
632
803
  required: x,
633
804
  disabled: m,
634
- htmlFor: V ? void 0 : D,
805
+ htmlFor: ee ? void 0 : O,
635
806
  children: g
636
807
  }),
637
808
  /* @__PURE__ */ t("div", {
638
- className: q.container,
639
- children: V ? /* @__PURE__ */ t("div", {
640
- id: D,
641
- className: q.disabledText,
642
- "aria-describedby": B,
643
- children: L?.label ?? a
809
+ className: Y.container,
810
+ children: ee ? /* @__PURE__ */ t("div", {
811
+ id: O,
812
+ className: Y.disabledText,
813
+ "aria-describedby": H,
814
+ children: z?.label ?? a
644
815
  }) : /* @__PURE__ */ n("button", {
645
- ref: P,
646
- id: D,
816
+ ref: I,
817
+ id: O,
647
818
  type: "button",
648
819
  name: S,
649
- className: `${q.trigger} ${q[v]}`,
820
+ className: `${Y.trigger} ${Y[v]}`,
650
821
  disabled: m,
651
822
  "aria-haspopup": "listbox",
652
- "aria-expanded": k,
653
- "aria-controls": O,
654
- "aria-describedby": B,
823
+ "aria-expanded": j,
824
+ "aria-controls": k,
825
+ "aria-describedby": H,
655
826
  "aria-invalid": !!_,
656
- onClick: () => A((e) => !e),
827
+ onClick: () => M((e) => !e),
657
828
  onKeyDown: (t) => {
658
829
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
659
- t.preventDefault(), A(!0);
830
+ t.preventDefault(), M(!0);
660
831
  let n = t.key === "ArrowDown" ? 1 : -1;
661
832
  requestAnimationFrame(() => {
662
- U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
833
+ W(t.key === "ArrowDown" ? 0 : e.length - 1, n);
663
834
  });
664
835
  }
665
- if (t.key === "Enter" && k) {
836
+ if (t.key === "Enter" && j) {
666
837
  t.preventDefault();
667
838
  let n = e.findIndex((e) => e.value === r);
668
- U(n >= 0 ? n : 0, 1);
839
+ W(n >= 0 ? n : 0, 1);
669
840
  }
670
841
  },
671
842
  children: [/* @__PURE__ */ t("span", {
672
- className: `${L ? q.value : q.placeholder}
673
- ${q[v]}`,
674
- children: L?.label ?? a
843
+ className: `${z ? Y.value : Y.placeholder}
844
+ ${Y[v]}`,
845
+ children: z?.label ?? a
675
846
  }), /* @__PURE__ */ t("span", {
676
- className: [q.chevron, k ? q.chevronOpen : ""].filter(Boolean).join(" "),
847
+ className: [Y.chevron, j ? Y.chevronOpen : ""].filter(Boolean).join(" "),
677
848
  "aria-hidden": "true",
678
- children: /* @__PURE__ */ t("svg", {
679
- viewBox: "0 0 20 20",
680
- fill: "none",
681
- children: /* @__PURE__ */ t("path", {
682
- d: "M5 7.5L10 12.5L15 7.5",
683
- stroke: "currentColor",
684
- strokeWidth: "1.8",
685
- strokeLinecap: "round",
686
- strokeLinejoin: "round"
687
- })
849
+ children: /* @__PURE__ */ t(A, {
850
+ name: "IconChevron",
851
+ width: 20,
852
+ height: 20
688
853
  })
689
854
  })]
690
855
  })
691
856
  }),
692
- k && p(te, document.body),
857
+ j && p(te, document.body),
693
858
  y && !_ && /* @__PURE__ */ t("span", {
694
- id: R,
695
- className: q.message,
859
+ id: B,
860
+ className: Y.message,
696
861
  children: y
697
862
  }),
698
863
  _ && /* @__PURE__ */ t("span", {
699
- id: z,
700
- className: q.error,
864
+ id: V,
865
+ className: Y.error,
701
866
  children: _
702
867
  })
703
868
  ]
704
869
  });
705
- }, se = (e) => `${e.id}:${e.direction}`, ce = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
870
+ }, le = (e) => `${e.id}:${e.direction}`, ue = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
706
871
  let c = e.flatMap((e) => [{
707
- value: se({
872
+ value: le({
708
873
  id: e.id,
709
874
  direction: "asc"
710
875
  }),
711
876
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
712
877
  disabled: e.disabled
713
878
  }, {
714
- value: se({
879
+ value: le({
715
880
  id: e.id,
716
881
  direction: "desc"
717
882
  }),
718
883
  label: e.descLabel ?? `${e.label} · по убыванию`,
719
884
  disabled: e.disabled
720
885
  }]);
721
- return /* @__PURE__ */ t(oe, {
886
+ return /* @__PURE__ */ t(ce, {
722
887
  options: c,
723
- value: n ? se(n) : "",
888
+ value: n ? le(n) : "",
724
889
  label: i,
725
890
  placeholder: a,
726
891
  disabled: o,
@@ -733,30 +898,7 @@ var T = {
733
898
  });
734
899
  }
735
900
  });
736
- }, le = {
737
- approve: "M4 12l5 5L20 6",
738
- reject: "M5 5l14 14M19 5L5 19",
739
- edit: "M4 20h4L19 9l-4-4L4 16v4z",
740
- cross: "M5 5l14 14M19 5L5 19",
741
- chevron: "M6 9l6 6 6-6",
742
- basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
743
- info: "M12 10v7m0-10v.01",
744
- warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
745
- }, ue = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
746
- viewBox: "0 0 24 24",
747
- width: i,
748
- height: a,
749
- fill: "none",
750
- stroke: "currentColor",
751
- strokeWidth: "1.8",
752
- strokeLinecap: "round",
753
- strokeLinejoin: "round",
754
- role: r ? "img" : void 0,
755
- "aria-hidden": !r || void 0,
756
- focusable: "false",
757
- ...o,
758
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: le[e] })]
759
- }), Y = {
901
+ }, X = {
760
902
  root: "_root_l2civ_1",
761
903
  tableWrap: "_tableWrap_l2civ_3",
762
904
  table: "_table_l2civ_3",
@@ -859,138 +1001,139 @@ var T = {
859
1001
  sortDescFirst: e.sortDescFirst
860
1002
  };
861
1003
  return n !== void 0 && (i.sortFn = n), i;
862
- }, Se = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: ee }) => {
863
- let [E, D] = f([]), [O, k] = f(0), A = o ?? E, j = A.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), M = Number.isFinite(T) && T > 0 ? Math.floor(T) : 30, N = u(() => {
864
- if (ee === void 0) return e;
865
- let t = new Set(ee);
1004
+ }, Se = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: E }) => {
1005
+ let [D, O] = f([]), [k, j] = f(0), M = o ?? D, N = M.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), P = Number.isFinite(T) && T > 0 ? Math.floor(T) : 30, F = u(() => {
1006
+ if (E === void 0) return e;
1007
+ let t = new Set(E);
866
1008
  return e.filter((e) => t.has(e.id));
867
- }, [e, ee]), P = u(() => N.length === 0 ? "Должна быть видима хотя бы одна колонка" : pe(N, r), [r, N]), F = u(() => N.map(xe), [N]), I = _({
1009
+ }, [e, E]), I = u(() => F.length === 0 ? "Должна быть видима хотя бы одна колонка" : pe(F, r), [r, F]), L = u(() => F.map(xe), [F]), R = _({
868
1010
  features: de,
869
- columns: F,
1011
+ columns: L,
870
1012
  data: r,
871
- state: { sorting: A },
1013
+ state: { sorting: M },
872
1014
  onSortingChange: (e) => {
873
- let t = typeof e == "function" ? e(A) : e;
874
- o === void 0 && D(t), k(0), c?.(t);
1015
+ let t = typeof e == "function" ? e(M) : e;
1016
+ o === void 0 && O(t), j(0), c?.(t);
875
1017
  },
876
1018
  getRowId: d
877
- }), L = I.getRowModel().rows, R = C ? Math.max(1, Math.ceil(L.length / M)) : 1, z = Math.min(O, R - 1), B = u(() => C ? L.slice(z * M, (z + 1) * M) : L, [
878
- M,
1019
+ }), z = R.getRowModel().rows, B = C ? Math.max(1, Math.ceil(z.length / P)) : 1, V = Math.min(k, B - 1), H = u(() => C ? z.slice(V * P, (V + 1) * P) : z, [
1020
+ P,
879
1021
  C,
880
- z,
881
- L
882
- ]), V = u(() => N.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
1022
+ V,
1023
+ z
1024
+ ]), ee = u(() => F.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
883
1025
  id: e.id,
884
1026
  label: typeof e.header == "string" ? e.header : e.id
885
- })), [N]), H = u(() => fe(z, R), [R, z]), U = [
886
- Y.root,
887
- a === "wide" ? Y.wide : Y.default,
888
- i ? Y.tableOnMobile : "",
1027
+ })), [F]), U = u(() => fe(V, B), [B, V]), W = [
1028
+ X.root,
1029
+ a === "wide" ? X.wide : X.default,
1030
+ i ? X.tableOnMobile : "",
889
1031
  x
890
- ].filter(Boolean).join(" "), W = P ?? g, te = C && !h && !W && L.length > M, G = z * M + 1, q = Math.min((z + 1) * M, L.length);
1032
+ ].filter(Boolean).join(" "), G = I ?? g, te = C && !h && !G && z.length > P, K = V * P + 1, q = Math.min((V + 1) * P, z.length);
891
1033
  return s(() => {
892
- k(0);
1034
+ j(0);
893
1035
  }, [
894
1036
  r,
895
- M,
1037
+ P,
896
1038
  C,
897
- j
1039
+ N
898
1040
  ]), s(() => {
899
- O >= R && k(R - 1);
900
- }, [R, O]), /* @__PURE__ */ n("section", {
901
- className: U,
1041
+ k >= B && j(B - 1);
1042
+ }, [B, k]), /* @__PURE__ */ n("section", {
1043
+ className: W,
902
1044
  "aria-busy": h,
903
1045
  children: [
904
- !i && !h && !W && B.length > 0 && V.length > 0 && /* @__PURE__ */ t(ce, {
905
- className: Y.mobileSort,
906
- options: V,
907
- value: A[0] ? {
908
- id: A[0].id,
909
- direction: A[0].desc ? "desc" : "asc"
1046
+ !i && !h && !G && H.length > 0 && ee.length > 0 && /* @__PURE__ */ t(ue, {
1047
+ className: X.mobileSort,
1048
+ options: ee,
1049
+ value: M[0] ? {
1050
+ id: M[0].id,
1051
+ direction: M[0].desc ? "desc" : "asc"
910
1052
  } : null,
911
- onChange: (e) => I.setSorting([{
1053
+ onChange: (e) => R.setSorting([{
912
1054
  id: e.id,
913
1055
  desc: e.direction === "desc"
914
1056
  }])
915
1057
  }),
916
1058
  /* @__PURE__ */ t("div", {
917
- className: Y.tableWrap,
1059
+ className: X.tableWrap,
918
1060
  style: { maxHeight: b },
919
1061
  children: /* @__PURE__ */ n("table", {
920
- className: Y.table,
1062
+ className: X.table,
921
1063
  "aria-label": m,
922
1064
  children: [
923
1065
  p && /* @__PURE__ */ t("caption", { children: p }),
924
1066
  /* @__PURE__ */ t("thead", {
925
- className: y ? Y.sticky : "",
926
- children: I.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
1067
+ className: y ? X.sticky : "",
1068
+ children: R.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
927
1069
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
928
1070
  return /* @__PURE__ */ t("th", {
929
1071
  scope: "col",
930
1072
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
931
1073
  children: /* @__PURE__ */ n("button", {
932
1074
  type: "button",
933
- className: Y.sortButton,
1075
+ className: X.sortButton,
934
1076
  disabled: !i,
935
1077
  onClick: a,
936
- children: [/* @__PURE__ */ t(I.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
937
- "aria-hidden": "true",
938
- children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
1078
+ children: [/* @__PURE__ */ t(R.FlexRender, { header: e }), /* @__PURE__ */ t(A, {
1079
+ name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
1080
+ width: 16,
1081
+ height: 16
939
1082
  })]
940
1083
  })
941
1084
  }, e.id);
942
1085
  }) }, e.id))
943
1086
  }),
944
1087
  /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
945
- colSpan: N.length,
946
- children: /* @__PURE__ */ t(K, { lines: 3 })
947
- }) }) : W ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
948
- className: Y.state,
949
- colSpan: N.length,
950
- children: W
951
- }) }) : B.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
952
- className: Y.state,
953
- colSpan: N.length,
1088
+ colSpan: F.length,
1089
+ children: /* @__PURE__ */ t(ne, { lines: 3 })
1090
+ }) }) : G ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1091
+ className: X.state,
1092
+ colSpan: F.length,
1093
+ children: G
1094
+ }) }) : H.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1095
+ className: X.state,
1096
+ colSpan: F.length,
954
1097
  children: v
955
- }) }) : B.map((e) => /* @__PURE__ */ t("tr", {
956
- className: S ? Y.clickableRow : void 0,
1098
+ }) }) : H.map((e) => /* @__PURE__ */ t("tr", {
1099
+ className: S ? X.clickableRow : void 0,
957
1100
  onClick: () => S?.(e.original),
958
1101
  onKeyDown: (t) => {
959
1102
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
960
1103
  },
961
1104
  tabIndex: S ? 0 : void 0,
962
1105
  role: S ? "button" : void 0,
963
- children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(I.FlexRender, { cell: e }) }, e.id))
1106
+ children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(R.FlexRender, { cell: e }) }, e.id))
964
1107
  }, e.id)) })
965
1108
  ]
966
1109
  })
967
1110
  }),
968
1111
  !i && /* @__PURE__ */ t("div", {
969
- className: Y.cards,
1112
+ className: X.cards,
970
1113
  role: "list",
971
1114
  "aria-label": m ?? p,
972
- children: h ? /* @__PURE__ */ t(K, { lines: 4 }) : W ? /* @__PURE__ */ t("div", {
973
- className: Y.state,
974
- children: W
975
- }) : B.length === 0 ? /* @__PURE__ */ t("div", {
976
- className: Y.state,
1115
+ children: h ? /* @__PURE__ */ t(ne, { lines: 4 }) : G ? /* @__PURE__ */ t("div", {
1116
+ className: X.state,
1117
+ children: G
1118
+ }) : H.length === 0 ? /* @__PURE__ */ t("div", {
1119
+ className: X.state,
977
1120
  children: v
978
- }) : B.map((e) => {
1121
+ }) : H.map((e) => {
979
1122
  if (l) return /* @__PURE__ */ t("div", {
980
1123
  role: "listitem",
981
1124
  children: l({
982
1125
  row: e.original,
983
- columns: N
1126
+ columns: F
984
1127
  })
985
1128
  }, e.id);
986
- let r = N.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => me(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
1129
+ let r = F.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => me(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
987
1130
  return /* @__PURE__ */ n("article", {
988
1131
  role: "listitem",
989
- className: Y.card,
1132
+ className: X.card,
990
1133
  children: [
991
1134
  /* @__PURE__ */ t("h3", { children: i ? o(i) : `Строка ${e.index + 1}` }),
992
1135
  /* @__PURE__ */ t("dl", { children: r.filter((e) => e !== i && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
993
- className: e.mobile?.mobileSpan === 2 ? Y.spanTwo : "",
1136
+ className: e.mobile?.mobileSpan === 2 ? X.spanTwo : "",
994
1137
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: o(e) })]
995
1138
  }, e.id)) }),
996
1139
  r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
@@ -999,53 +1142,53 @@ var T = {
999
1142
  })
1000
1143
  }),
1001
1144
  te && /* @__PURE__ */ n("nav", {
1002
- className: Y.pagination,
1145
+ className: X.pagination,
1003
1146
  "aria-label": "Пагинация таблицы",
1004
1147
  children: [/* @__PURE__ */ n("span", {
1005
- className: Y.paginationRange,
1148
+ className: X.paginationRange,
1006
1149
  "aria-live": "polite",
1007
1150
  children: [
1008
- G,
1151
+ K,
1009
1152
  "–",
1010
1153
  q,
1011
1154
  " из ",
1012
- L.length
1155
+ z.length
1013
1156
  ]
1014
1157
  }), /* @__PURE__ */ n("div", {
1015
- className: Y.paginationControls,
1158
+ className: X.paginationControls,
1016
1159
  children: [
1017
1160
  /* @__PURE__ */ n(w, {
1018
1161
  variant: "empty",
1019
1162
  size: "md",
1020
- disabled: z === 0,
1163
+ disabled: V === 0,
1021
1164
  "aria-label": "Предыдущая страница",
1022
1165
  onClick: () => {
1023
- k((e) => Math.max(0, e - 1));
1166
+ j((e) => Math.max(0, e - 1));
1024
1167
  },
1025
- children: [/* @__PURE__ */ t(ue, {
1026
- name: "chevron",
1168
+ children: [/* @__PURE__ */ t(A, {
1169
+ name: "IconChevron",
1027
1170
  width: 18,
1028
1171
  height: 18,
1029
- className: Y.previousIcon
1172
+ className: X.previousIcon
1030
1173
  }), /* @__PURE__ */ t("span", {
1031
- className: Y.paginationButtonLabel,
1174
+ className: X.paginationButtonLabel,
1032
1175
  children: "Назад"
1033
1176
  })]
1034
1177
  }),
1035
1178
  /* @__PURE__ */ t("div", {
1036
- className: Y.pageNumbers,
1037
- children: H.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
1038
- variant: e === z ? "secondary" : "empty",
1179
+ className: X.pageNumbers,
1180
+ children: U.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
1181
+ variant: e === V ? "secondary" : "empty",
1039
1182
  size: "md",
1040
- className: Y.pageButton,
1183
+ className: X.pageButton,
1041
1184
  "aria-label": `Перейти на страницу ${e + 1}`,
1042
- "aria-current": e === z ? "page" : void 0,
1185
+ "aria-current": e === V ? "page" : void 0,
1043
1186
  onClick: () => {
1044
- k(e);
1187
+ j(e);
1045
1188
  },
1046
1189
  children: e + 1
1047
1190
  }, e) : /* @__PURE__ */ t("span", {
1048
- className: Y.ellipsis,
1191
+ className: X.ellipsis,
1049
1192
  "aria-hidden": "true",
1050
1193
  children: "…"
1051
1194
  }, e))
@@ -1053,19 +1196,19 @@ var T = {
1053
1196
  /* @__PURE__ */ n(w, {
1054
1197
  variant: "empty",
1055
1198
  size: "md",
1056
- disabled: z === R - 1,
1199
+ disabled: V === B - 1,
1057
1200
  "aria-label": "Следующая страница",
1058
1201
  onClick: () => {
1059
- k((e) => Math.min(R - 1, e + 1));
1202
+ j((e) => Math.min(B - 1, e + 1));
1060
1203
  },
1061
1204
  children: [/* @__PURE__ */ t("span", {
1062
- className: Y.paginationButtonLabel,
1205
+ className: X.paginationButtonLabel,
1063
1206
  children: "Вперёд"
1064
- }), /* @__PURE__ */ t(ue, {
1065
- name: "chevron",
1207
+ }), /* @__PURE__ */ t(A, {
1208
+ name: "IconChevron",
1066
1209
  width: 18,
1067
1210
  height: 18,
1068
- className: Y.nextIcon
1211
+ className: X.nextIcon
1069
1212
  })]
1070
1213
  })
1071
1214
  ]
@@ -1080,62 +1223,62 @@ var T = {
1080
1223
  if (Number.isFinite(t)) return t;
1081
1224
  }
1082
1225
  return Infinity;
1083
- }, De = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
1084
- let D = c(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = _ ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, H = m && h, U = o(() => {
1085
- let e = F.current, t = I.current;
1226
+ }, De = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: D }) => {
1227
+ let O = c(), k = C ?? `ds-dropdown-multiple-${S ?? O}`, j = `${k}-listbox`, [M, N] = f(!1), [P, F] = f(null), I = d(null), L = d(null), R = d(null), z = d([]), B = u(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), V = b ? `${k}-hint` : void 0, H = _ ? `${k}-error` : void 0, ee = [V, H].filter(Boolean).join(" ") || void 0, U = m && h, W = o(() => {
1228
+ let e = L.current, t = R.current;
1086
1229
  if (!e || !t) return;
1087
1230
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - Ce, a = n.top - Ce, o = i < r.height && a > i, s = Math.max(Te, o ? a : i), c = window.innerWidth - n.width - Ce;
1088
- N({
1231
+ F({
1089
1232
  top: o ? Math.max(Ce, n.top - r.height - we) : n.bottom + we,
1090
1233
  left: Math.max(Ce, Math.min(n.left, c)),
1091
1234
  width: n.width,
1092
- maxHeight: Math.min(s, Ee(E))
1235
+ maxHeight: Math.min(s, Ee(D))
1093
1236
  });
1094
- }, [E]);
1237
+ }, [D]);
1095
1238
  l(() => {
1096
- if (!A) {
1097
- N(null);
1239
+ if (!M) {
1240
+ F(null);
1098
1241
  return;
1099
1242
  }
1100
- return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
1101
- window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
1243
+ return W(), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
1244
+ window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
1102
1245
  };
1103
1246
  }, [
1104
- A,
1247
+ M,
1105
1248
  e.length,
1106
- U
1249
+ W
1107
1250
  ]), s(() => {
1108
- if (!A) return;
1251
+ if (!M) return;
1109
1252
  let e = (e) => {
1110
1253
  let t = e.target;
1111
- !P.current?.contains(t) && !I.current?.contains(t) && j(!1);
1254
+ !I.current?.contains(t) && !R.current?.contains(t) && N(!1);
1112
1255
  }, t = (e) => {
1113
- e.key === "Escape" && (j(!1), F.current?.focus());
1256
+ e.key === "Escape" && (N(!1), L.current?.focus());
1114
1257
  };
1115
1258
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
1116
1259
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
1117
1260
  };
1118
- }, [A]);
1119
- let W = (t, n) => {
1120
- let r = ie(e, t, n);
1121
- r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
1261
+ }, [M]);
1262
+ let G = (t, n) => {
1263
+ let r = oe(e, t, n);
1264
+ r !== -1 && (z.current[r]?.focus(), z.current[r]?.scrollIntoView({ block: "nearest" }));
1122
1265
  }, te = (t) => {
1123
1266
  if (t.disabled) return;
1124
1267
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
1125
- i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
1126
- }, G = A ? /* @__PURE__ */ t("ul", {
1127
- ref: I,
1128
- id: k,
1129
- className: q.menu,
1268
+ i?.(n, e.filter((e) => n.includes(e.value))), w && (N(!1), L.current?.focus());
1269
+ }, K = M ? /* @__PURE__ */ t("ul", {
1270
+ ref: R,
1271
+ id: j,
1272
+ className: Y.menu,
1130
1273
  role: "listbox",
1131
1274
  "aria-label": g,
1132
1275
  "aria-multiselectable": "true",
1133
- style: M ? {
1276
+ style: P ? {
1134
1277
  position: "fixed",
1135
- top: M.top,
1136
- left: M.left,
1137
- width: M.width,
1138
- maxHeight: M.maxHeight
1278
+ top: P.top,
1279
+ left: P.left,
1280
+ width: P.width,
1281
+ maxHeight: P.maxHeight
1139
1282
  } : {
1140
1283
  position: "fixed",
1141
1284
  top: 0,
@@ -1149,156 +1292,151 @@ var T = {
1149
1292
  role: "presentation",
1150
1293
  children: /* @__PURE__ */ n("button", {
1151
1294
  ref: (e) => {
1152
- L.current[a] = e;
1295
+ z.current[a] = e;
1153
1296
  },
1154
1297
  type: "button",
1155
1298
  role: "option",
1156
1299
  "aria-selected": o,
1157
1300
  disabled: i.disabled,
1158
1301
  className: [
1159
- q[v],
1160
- q.option,
1161
- o ? q.selected : ""
1302
+ Y[v],
1303
+ Y.option,
1304
+ o ? Y.selected : ""
1162
1305
  ].filter(Boolean).join(" "),
1163
1306
  onClick: () => te(i),
1164
1307
  onKeyDown: (t) => {
1165
1308
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1166
1309
  t.preventDefault();
1167
1310
  let e = t.key === "ArrowDown" ? 1 : -1;
1168
- W(a + e, e);
1311
+ G(a + e, e);
1169
1312
  }
1170
1313
  if (t.key === "Home" || t.key === "End") {
1171
1314
  t.preventDefault();
1172
1315
  let n = t.key === "Home" ? 1 : -1;
1173
- W(t.key === "Home" ? 0 : e.length - 1, n);
1316
+ G(t.key === "Home" ? 0 : e.length - 1, n);
1174
1317
  }
1175
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), te(i)), t.key === "Tab" && j(!1);
1318
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), te(i)), t.key === "Tab" && N(!1);
1176
1319
  },
1177
- children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t("span", {
1178
- "aria-hidden": "true",
1179
- children: "✓"
1320
+ children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(A, {
1321
+ name: "IconCheck",
1322
+ width: 16,
1323
+ height: 16
1180
1324
  })]
1181
1325
  })
1182
1326
  }, i.value);
1183
1327
  })
1184
1328
  }) : null;
1185
1329
  return /* @__PURE__ */ n("div", {
1186
- ref: P,
1330
+ ref: I,
1187
1331
  className: [
1188
- q.wrapper,
1189
- _ ? q.errorState : "",
1332
+ Y.wrapper,
1333
+ _ ? Y.errorState : "",
1190
1334
  x
1191
1335
  ].filter(Boolean).join(" "),
1192
1336
  children: [
1193
- g && /* @__PURE__ */ t(ee, {
1194
- htmlFor: H ? void 0 : O,
1337
+ g && /* @__PURE__ */ t(E, {
1338
+ htmlFor: U ? void 0 : k,
1195
1339
  required: y,
1196
1340
  disabled: m,
1197
1341
  children: g
1198
1342
  }),
1199
1343
  /* @__PURE__ */ t("div", {
1200
- className: q.container,
1201
- children: H ? /* @__PURE__ */ t("div", {
1202
- id: O,
1203
- className: `${q.disabledText} ${q[v]}`,
1204
- "aria-describedby": V,
1205
- children: R || a
1344
+ className: Y.container,
1345
+ children: U ? /* @__PURE__ */ t("div", {
1346
+ id: k,
1347
+ className: `${Y.disabledText} ${Y[v]}`,
1348
+ "aria-describedby": ee,
1349
+ children: B || a
1206
1350
  }) : /* @__PURE__ */ n("button", {
1207
- ref: F,
1208
- id: O,
1351
+ ref: L,
1352
+ id: k,
1209
1353
  type: "button",
1210
1354
  name: S,
1211
- className: `${q.trigger} ${q[v]}`,
1355
+ className: `${Y.trigger} ${Y[v]}`,
1212
1356
  disabled: m,
1213
1357
  "aria-haspopup": "listbox",
1214
- "aria-expanded": A,
1215
- "aria-controls": k,
1216
- "aria-describedby": V,
1358
+ "aria-expanded": M,
1359
+ "aria-controls": j,
1360
+ "aria-describedby": ee,
1217
1361
  "aria-invalid": !!_,
1218
- onClick: () => j((e) => !e),
1362
+ onClick: () => N((e) => !e),
1219
1363
  onKeyDown: (t) => {
1220
1364
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1221
- t.preventDefault(), j(!0);
1365
+ t.preventDefault(), N(!0);
1222
1366
  let n = t.key === "ArrowDown" ? 1 : -1;
1223
- requestAnimationFrame(() => W(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1367
+ requestAnimationFrame(() => G(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1224
1368
  }
1225
1369
  },
1226
1370
  children: [/* @__PURE__ */ t("span", {
1227
- className: `${R ? q.value : q.placeholder} ${q[v]}`,
1228
- children: R || a
1371
+ className: `${B ? Y.value : Y.placeholder} ${Y[v]}`,
1372
+ children: B || a
1229
1373
  }), /* @__PURE__ */ t("span", {
1230
- className: [q.chevron, A ? q.chevronOpen : ""].filter(Boolean).join(" "),
1374
+ className: [Y.chevron, M ? Y.chevronOpen : ""].filter(Boolean).join(" "),
1231
1375
  "aria-hidden": "true",
1232
- children: /* @__PURE__ */ t("svg", {
1233
- viewBox: "0 0 20 20",
1234
- fill: "none",
1235
- children: /* @__PURE__ */ t("path", {
1236
- d: "M5 7.5L10 12.5L15 7.5",
1237
- stroke: "currentColor",
1238
- strokeWidth: "1.8",
1239
- strokeLinecap: "round",
1240
- strokeLinejoin: "round"
1241
- })
1376
+ children: /* @__PURE__ */ t(A, {
1377
+ name: "IconChevron",
1378
+ width: 20,
1379
+ height: 20
1242
1380
  })
1243
1381
  })]
1244
1382
  })
1245
1383
  }),
1246
- A && p(G, document.body),
1384
+ M && p(K, document.body),
1247
1385
  b && !_ && /* @__PURE__ */ t("span", {
1248
- id: z,
1249
- className: q.message,
1386
+ id: V,
1387
+ className: Y.message,
1250
1388
  children: b
1251
1389
  }),
1252
1390
  _ && /* @__PURE__ */ t("span", {
1253
- id: B,
1254
- className: q.error,
1391
+ id: H,
1392
+ className: Y.error,
1255
1393
  children: _
1256
1394
  })
1257
1395
  ]
1258
1396
  });
1259
1397
  }, Oe = {
1260
- wrapper: "_wrapper_kz2dd_1",
1261
- control: "_control_kz2dd_3",
1262
- input: "_input_kz2dd_5",
1263
- disabledText: "_disabledText_kz2dd_5",
1264
- sm: "_sm_kz2dd_41",
1265
- md: "_md_kz2dd_53",
1266
- lg: "_lg_kz2dd_65",
1267
- inputError: "_inputError_kz2dd_77",
1268
- trailingAction: "_trailingAction_kz2dd_79"
1269
- }, ke = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: D, ...O }) => {
1270
- let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = d(null), [M, N] = f(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? M ? "text" : "password" : i;
1398
+ wrapper: "_wrapper_yuep3_1",
1399
+ control: "_control_yuep3_3",
1400
+ input: "_input_yuep3_7",
1401
+ disabledText: "_disabledText_yuep3_7",
1402
+ sm: "_sm_yuep3_45",
1403
+ md: "_md_yuep3_57",
1404
+ lg: "_lg_yuep3_69",
1405
+ inputError: "_inputError_yuep3_81",
1406
+ trailingAction: "_trailingAction_yuep3_83"
1407
+ }, ke = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
1408
+ let j = c(), M = v ?? `ds-input-${_ ?? j}`, N = d(null), [P, F] = f(!1), I = h ? `${M}-hint` : void 0, L = m ? `${M}-error` : void 0, R = String(e ?? ""), z = [I, L].filter(Boolean).join(" ") || void 0, B = C ? P ? "text" : "password" : i;
1271
1409
  return s(() => {
1272
- C || N(!1);
1410
+ C || F(!1);
1273
1411
  }, [C]), /* @__PURE__ */ n("div", {
1274
1412
  className: `${Oe.wrapper} ${g}`,
1275
1413
  children: [
1276
- p && /* @__PURE__ */ t(ee, {
1277
- htmlFor: A,
1414
+ p && /* @__PURE__ */ t(E, {
1415
+ htmlFor: M,
1278
1416
  required: x,
1279
1417
  disabled: o,
1280
1418
  children: p
1281
1419
  }),
1282
1420
  o && u ? /* @__PURE__ */ t("div", {
1283
- id: A,
1421
+ id: M,
1284
1422
  className: Oe.disabledText,
1285
- "aria-describedby": L,
1286
- children: I || a
1423
+ "aria-describedby": z,
1424
+ children: R || a
1287
1425
  }) : /* @__PURE__ */ n("div", {
1288
1426
  className: Oe.control,
1289
1427
  children: [
1290
1428
  /* @__PURE__ */ t("input", {
1291
- ref: j,
1292
- id: A,
1429
+ ref: N,
1430
+ id: M,
1293
1431
  name: _,
1294
- type: R,
1295
- value: I,
1432
+ type: B,
1433
+ value: R,
1296
1434
  placeholder: a,
1297
1435
  disabled: o,
1298
1436
  readOnly: l,
1299
1437
  required: x,
1300
1438
  "aria-invalid": !!m,
1301
- "aria-describedby": L,
1439
+ "aria-describedby": z,
1302
1440
  className: `${Oe.input} ${Oe[y]} ${m ? Oe.inputError : ""}`,
1303
1441
  onChange: (e) => {
1304
1442
  if (i === "number" && !C) {
@@ -1309,49 +1447,45 @@ var T = {
1309
1447
  r?.(e.target.value, e);
1310
1448
  },
1311
1449
  onFocus: (e) => {
1312
- S && e.currentTarget.value && e.currentTarget.select(), D?.(e);
1450
+ S && e.currentTarget.value && e.currentTarget.select(), O?.(e);
1313
1451
  },
1314
- ...O
1452
+ ...k
1315
1453
  }),
1316
1454
  C && /* @__PURE__ */ t("button", {
1317
1455
  type: "button",
1318
1456
  className: Oe.trailingAction,
1319
1457
  disabled: o,
1320
- "aria-label": M ? w : T,
1321
- "aria-pressed": M,
1322
- onClick: () => N((e) => !e),
1323
- children: M ? /* @__PURE__ */ t("svg", {
1324
- viewBox: "0 0 24 24",
1325
- "aria-hidden": "true",
1326
- children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
1327
- }) : /* @__PURE__ */ n("svg", {
1328
- viewBox: "0 0 24 24",
1329
- "aria-hidden": "true",
1330
- children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
1331
- cx: "12",
1332
- cy: "12",
1333
- r: "2.5"
1334
- })]
1458
+ "aria-label": P ? w : T,
1459
+ "aria-pressed": P,
1460
+ onClick: () => F((e) => !e),
1461
+ children: /* @__PURE__ */ t(A, {
1462
+ name: P ? "IconEyeOff" : "IconEye",
1463
+ width: 20,
1464
+ height: 20
1335
1465
  })
1336
1466
  }),
1337
- !C && b && I && !o && !l && /* @__PURE__ */ t("button", {
1467
+ !C && b && R && !o && !l && /* @__PURE__ */ t("button", {
1338
1468
  type: "button",
1339
1469
  className: Oe.trailingAction,
1340
1470
  "aria-label": "Очистить поле",
1341
1471
  onClick: () => {
1342
- let e = j.current;
1472
+ let e = N.current;
1343
1473
  e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
1344
1474
  },
1345
- children: "×"
1475
+ children: /* @__PURE__ */ t(A, {
1476
+ name: "IconCross",
1477
+ width: 20,
1478
+ height: 20
1479
+ })
1346
1480
  })
1347
1481
  ]
1348
1482
  }),
1349
- h && !m && /* @__PURE__ */ t(E, {
1350
- id: P,
1483
+ h && !m && /* @__PURE__ */ t(D, {
1484
+ id: I,
1351
1485
  children: h
1352
1486
  }),
1353
- m && /* @__PURE__ */ t(E, {
1354
- id: F,
1487
+ m && /* @__PURE__ */ t(D, {
1488
+ id: L,
1355
1489
  variant: "error",
1356
1490
  children: m
1357
1491
  })
@@ -1367,7 +1501,7 @@ var T = {
1367
1501
  if (!e[i]?.disabled) return i;
1368
1502
  }
1369
1503
  return -1;
1370
- }, X = {
1504
+ }, Z = {
1371
1505
  wrapper: "_wrapper_1uxs8_1",
1372
1506
  control: "_control_1uxs8_5",
1373
1507
  inputHost: "_inputHost_1uxs8_9",
@@ -1388,19 +1522,19 @@ var T = {
1388
1522
  sm: 20,
1389
1523
  md: 30,
1390
1524
  lg: 40
1391
- }, Ie = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: m = "Ничего не найдено", disabled: h = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: D = !0 }) => {
1392
- let O = c(), k = T ?? `ds-search-dropdown-${w ?? O}`, A = `${k}-listbox`, j = `${k}-status`, M = b ? `${k}-hint` : void 0, N = y ? `${k}-error` : void 0, P = [
1393
- j,
1394
- M,
1395
- N
1396
- ].filter(Boolean).join(" "), F = d(null), I = d(null), L = d([]), [R, z] = f(!1), [B, V] = f(""), [H, U] = f(-1), [W, te] = f(null), G = u(() => e.find((e) => e.value === r), [e, r]), K = u(() => Ae(e, B), [e, B]), q = h && _, J = H >= 0 ? K[H] : void 0;
1397
- s(() => V(G?.label ?? ""), [G?.label, r]);
1398
- let ne = o(() => F.current?.querySelector("input") ?? null, []), re = o((e, t) => je(K, e, t), [K]), ie = o((e) => {
1399
- U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
1525
+ }, Ie = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: m = "Ничего не найдено", disabled: h = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: O = !0 }) => {
1526
+ let k = c(), j = T ?? `ds-search-dropdown-${w ?? k}`, M = `${j}-listbox`, N = `${j}-status`, P = b ? `${j}-hint` : void 0, F = y ? `${j}-error` : void 0, I = [
1527
+ N,
1528
+ P,
1529
+ F
1530
+ ].filter(Boolean).join(" "), L = d(null), R = d(null), z = d([]), [B, V] = f(!1), [H, ee] = f(""), [U, W] = f(-1), [G, te] = f(null), K = u(() => e.find((e) => e.value === r), [e, r]), q = u(() => Ae(e, H), [e, H]), J = h && _, ne = U >= 0 ? q[U] : void 0;
1531
+ s(() => ee(K?.label ?? ""), [K?.label, r]);
1532
+ let Y = o(() => L.current?.querySelector("input") ?? null, []), re = o((e, t) => je(q, e, t), [q]), ie = o((e) => {
1533
+ W(e), !(e < 0) && requestAnimationFrame(() => z.current[e]?.scrollIntoView({ block: "nearest" }));
1400
1534
  }, []), ae = o(() => {
1401
- let e = ne();
1535
+ let e = Y();
1402
1536
  if (!e) return;
1403
- let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(K.length, Pe)) * Fe[x] + 2, r = window.innerHeight - t.bottom - Me, i = t.top - Me, a = r < n && i > r, o = a ? i : r, s = Math.max(Fe[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - Me, l = Math.max(Me, Math.min(t.left, c)), u = a ? Math.max(Me, t.top - s - Ne) : t.bottom + Ne;
1537
+ let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(q.length, Pe)) * Fe[x] + 2, r = window.innerHeight - t.bottom - Me, i = t.top - Me, a = r < n && i > r, o = a ? i : r, s = Math.max(Fe[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - Me, l = Math.max(Me, Math.min(t.left, c)), u = a ? Math.max(Me, t.top - s - Ne) : t.bottom + Ne;
1404
1538
  te({
1405
1539
  top: u,
1406
1540
  left: l,
@@ -1408,59 +1542,59 @@ var T = {
1408
1542
  maxHeight: s
1409
1543
  });
1410
1544
  }, [
1411
- K.length,
1412
- ne,
1545
+ q.length,
1546
+ Y,
1413
1547
  x
1414
1548
  ]);
1415
1549
  l(() => {
1416
- if (!R) {
1550
+ if (!B) {
1417
1551
  te(null);
1418
1552
  return;
1419
1553
  }
1420
1554
  return ae(), window.addEventListener("resize", ae), window.addEventListener("scroll", ae, !0), () => {
1421
1555
  window.removeEventListener("resize", ae), window.removeEventListener("scroll", ae, !0);
1422
1556
  };
1423
- }, [R, ae]), s(() => {
1424
- if (!R) return;
1557
+ }, [B, ae]), s(() => {
1558
+ if (!B) return;
1425
1559
  let e = (e) => {
1426
1560
  let t = e.target;
1427
- !F.current?.contains(t) && !I.current?.contains(t) && (z(!1), U(-1));
1561
+ !L.current?.contains(t) && !R.current?.contains(t) && (V(!1), W(-1));
1428
1562
  };
1429
1563
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1430
- }, [R]);
1564
+ }, [B]);
1431
1565
  let oe = () => {
1432
- h || g || (z(!0), U(re(0, 1)));
1566
+ h || g || (V(!0), W(re(0, 1)));
1433
1567
  }, se = (e) => {
1434
- e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), ne()?.focus());
1435
- }, ce = R ? /* @__PURE__ */ t("ul", {
1436
- ref: I,
1437
- id: A,
1438
- className: X.menu,
1568
+ e.disabled || (ee(e.label), V(!1), W(-1), i?.(e.value, e), Y()?.focus());
1569
+ }, ce = B ? /* @__PURE__ */ t("ul", {
1570
+ ref: R,
1571
+ id: M,
1572
+ className: Z.menu,
1439
1573
  role: "listbox",
1440
1574
  "aria-label": v,
1441
- style: W ? {
1442
- top: W.top,
1443
- left: W.left,
1444
- width: W.width,
1445
- maxHeight: W.maxHeight
1575
+ style: G ? {
1576
+ top: G.top,
1577
+ left: G.left,
1578
+ width: G.width,
1579
+ maxHeight: G.maxHeight
1446
1580
  } : {
1447
1581
  top: 0,
1448
1582
  left: 0,
1449
1583
  visibility: "hidden",
1450
1584
  maxHeight: 0
1451
1585
  },
1452
- children: K.length === 0 ? /* @__PURE__ */ t("li", {
1453
- className: `${X.empty} ${X[x]}`,
1586
+ children: q.length === 0 ? /* @__PURE__ */ t("li", {
1587
+ className: `${Z.empty} ${Z[x]}`,
1454
1588
  children: m
1455
- }) : K.map((e, i) => {
1456
- let a = e.value === r, o = i === H;
1589
+ }) : q.map((e, i) => {
1590
+ let a = e.value === r, o = i === U;
1457
1591
  return /* @__PURE__ */ t("li", {
1458
1592
  role: "presentation",
1459
1593
  children: /* @__PURE__ */ n("button", {
1460
1594
  ref: (e) => {
1461
- L.current[i] = e;
1595
+ z.current[i] = e;
1462
1596
  },
1463
- id: `${k}-option-${i}`,
1597
+ id: `${j}-option-${i}`,
1464
1598
  type: "button",
1465
1599
  role: "option",
1466
1600
  tabIndex: -1,
@@ -1468,46 +1602,47 @@ var T = {
1468
1602
  "aria-disabled": e.disabled,
1469
1603
  "aria-selected": a,
1470
1604
  className: [
1471
- X.option,
1472
- X[x],
1473
- a ? X.selected : "",
1474
- o ? X.active : ""
1605
+ Z.option,
1606
+ Z[x],
1607
+ a ? Z.selected : "",
1608
+ o ? Z.active : ""
1475
1609
  ].filter(Boolean).join(" "),
1476
1610
  onPointerMove: () => {
1477
- e.disabled || U(i);
1611
+ e.disabled || W(i);
1478
1612
  },
1479
1613
  onClick: () => se(e),
1480
- children: [/* @__PURE__ */ t("span", { children: e.label }), a && D && /* @__PURE__ */ t("span", {
1481
- "aria-hidden": "true",
1482
- children: "✓"
1614
+ children: [/* @__PURE__ */ t("span", { children: e.label }), a && O && /* @__PURE__ */ t(A, {
1615
+ name: "IconCheck",
1616
+ width: 16,
1617
+ height: 16
1483
1618
  })]
1484
1619
  })
1485
1620
  }, e.value);
1486
1621
  })
1487
1622
  }) : null;
1488
1623
  return /* @__PURE__ */ n("div", {
1489
- ref: F,
1624
+ ref: L,
1490
1625
  className: [
1491
- X.wrapper,
1492
- y ? X.errorState : "",
1626
+ Z.wrapper,
1627
+ y ? Z.errorState : "",
1493
1628
  C
1494
1629
  ].filter(Boolean).join(" "),
1495
1630
  children: [
1496
- v && /* @__PURE__ */ t(ee, {
1497
- htmlFor: q ? void 0 : k,
1631
+ v && /* @__PURE__ */ t(E, {
1632
+ htmlFor: J ? void 0 : j,
1498
1633
  required: S,
1499
1634
  disabled: h,
1500
1635
  children: v
1501
1636
  }),
1502
- q ? /* @__PURE__ */ t("div", {
1503
- className: `${X.disabledText} ${X[x]}`,
1504
- children: G?.label ?? a
1637
+ J ? /* @__PURE__ */ t("div", {
1638
+ className: `${Z.disabledText} ${Z[x]}`,
1639
+ children: K?.label ?? a
1505
1640
  }) : /* @__PURE__ */ n("div", {
1506
- className: X.control,
1641
+ className: Z.control,
1507
1642
  children: [/* @__PURE__ */ t(ke, {
1508
- id: k,
1643
+ id: j,
1509
1644
  name: w,
1510
- value: B,
1645
+ value: H,
1511
1646
  placeholder: a,
1512
1647
  disabled: h,
1513
1648
  readOnly: g,
@@ -1515,74 +1650,68 @@ var T = {
1515
1650
  size: x,
1516
1651
  clearable: !1,
1517
1652
  autoComplete: "off",
1518
- className: `${X.inputHost} ${X[x]}`,
1653
+ className: `${Z.inputHost} ${Z[x]}`,
1519
1654
  onFocus: oe,
1520
1655
  onChange: (t) => {
1521
1656
  let n = String(t), r = Ae(e, n);
1522
- V(n), z(!0), U(je(r, 0, 1));
1657
+ ee(n), V(!0), W(je(r, 0, 1));
1523
1658
  },
1524
1659
  role: "combobox",
1525
1660
  "aria-autocomplete": "list",
1526
- "aria-expanded": R,
1527
- "aria-controls": A,
1528
- "aria-activedescendant": J ? `${k}-option-${H}` : void 0,
1661
+ "aria-expanded": B,
1662
+ "aria-controls": M,
1663
+ "aria-activedescendant": ne ? `${j}-option-${U}` : void 0,
1529
1664
  "aria-invalid": !!y,
1530
- "aria-describedby": P,
1665
+ "aria-describedby": I,
1531
1666
  onClick: oe,
1532
1667
  onKeyDown: (e) => {
1533
1668
  if (!(h || g)) {
1534
1669
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1535
1670
  e.preventDefault();
1536
- let t = e.key === "ArrowDown" ? 1 : -1, n = H >= 0 ? H + t : t === 1 ? 0 : K.length - 1;
1537
- z(!0), ie(re(n, t));
1671
+ let t = e.key === "ArrowDown" ? 1 : -1, n = U >= 0 ? U + t : t === 1 ? 0 : q.length - 1;
1672
+ V(!0), ie(re(n, t));
1538
1673
  } else if (e.key === "Home" || e.key === "End") {
1539
- if (!R) return;
1674
+ if (!B) return;
1540
1675
  e.preventDefault();
1541
1676
  let t = e.key === "Home" ? 1 : -1;
1542
- ie(re(e.key === "Home" ? 0 : K.length - 1, t));
1543
- } else e.key === "Enter" && R && J ? (e.preventDefault(), se(J)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
1677
+ ie(re(e.key === "Home" ? 0 : q.length - 1, t));
1678
+ } else e.key === "Enter" && B && ne ? (e.preventDefault(), se(ne)) : e.key === "Escape" && B ? (e.preventDefault(), V(!1), W(-1)) : e.key === "Tab" && (V(!1), W(-1));
1544
1679
  }
1545
1680
  }
1546
1681
  }), /* @__PURE__ */ t("span", {
1547
- className: `${X.chevron} ${R ? X.chevronOpen : ""}`,
1682
+ className: `${Z.chevron} ${B ? Z.chevronOpen : ""}`,
1548
1683
  "aria-hidden": "true",
1549
- children: /* @__PURE__ */ t("svg", {
1550
- viewBox: "0 0 20 20",
1551
- fill: "none",
1552
- children: /* @__PURE__ */ t("path", {
1553
- d: "M5 7.5L10 12.5L15 7.5",
1554
- stroke: "currentColor",
1555
- strokeWidth: "1.8",
1556
- strokeLinecap: "round",
1557
- strokeLinejoin: "round"
1558
- })
1684
+ children: /* @__PURE__ */ t(A, {
1685
+ name: "IconChevron",
1686
+ width: 20,
1687
+ height: 20
1559
1688
  })
1560
1689
  })]
1561
1690
  }),
1562
- R && typeof document < "u" && p(ce, document.body),
1691
+ B && typeof document < "u" && p(ce, document.body),
1563
1692
  /* @__PURE__ */ n("span", {
1564
- id: j,
1565
- className: X.visuallyHidden,
1693
+ id: N,
1694
+ className: Z.visuallyHidden,
1566
1695
  "aria-live": "polite",
1567
- children: ["Найдено вариантов: ", K.length]
1696
+ children: ["Найдено вариантов: ", q.length]
1568
1697
  }),
1569
- b && !y && /* @__PURE__ */ t(E, {
1570
- id: M,
1698
+ b && !y && /* @__PURE__ */ t(D, {
1699
+ id: P,
1571
1700
  children: b
1572
1701
  }),
1573
- y && /* @__PURE__ */ t(E, {
1574
- id: N,
1702
+ y && /* @__PURE__ */ t(D, {
1703
+ id: F,
1575
1704
  variant: "error",
1576
1705
  children: y
1577
1706
  })
1578
1707
  ]
1579
1708
  });
1580
1709
  }, Le = {
1581
- root: "_root_1y2s8_1",
1582
- header: "_header_1y2s8_21",
1583
- title: "_title_1y2s8_41",
1584
- dismiss: "_dismiss_1y2s8_55",
1585
- content: "_content_1y2s8_113"
1710
+ root: "_root_1gjqg_1",
1711
+ header: "_header_1gjqg_21",
1712
+ title: "_title_1gjqg_41",
1713
+ dismiss: "_dismiss_1gjqg_55",
1714
+ content: "_content_1gjqg_65"
1586
1715
  }, Re = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
1587
1716
  let u = `ds-info-block-${c()}`;
1588
1717
  return /* @__PURE__ */ n("section", {
@@ -1594,21 +1723,15 @@ var T = {
1594
1723
  id: u,
1595
1724
  className: Le.title,
1596
1725
  children: e
1597
- }), i && /* @__PURE__ */ t("button", {
1598
- type: "button",
1726
+ }), i && /* @__PURE__ */ t(w, {
1599
1727
  className: Le.dismiss,
1728
+ variant: "empty",
1600
1729
  onClick: a,
1601
1730
  "aria-label": o,
1602
- children: /* @__PURE__ */ t("svg", {
1603
- viewBox: "0 0 20 20",
1604
- "aria-hidden": "true",
1605
- children: /* @__PURE__ */ t("path", {
1606
- d: "M5 5L15 15M15 5L5 15",
1607
- fill: "none",
1608
- stroke: "currentColor",
1609
- strokeWidth: "1.8",
1610
- strokeLinecap: "round"
1611
- })
1731
+ children: /* @__PURE__ */ t(A, {
1732
+ name: "IconCross",
1733
+ width: 20,
1734
+ height: 20
1612
1735
  })
1613
1736
  })]
1614
1737
  }), /* @__PURE__ */ t("div", {
@@ -1655,9 +1778,9 @@ var T = {
1655
1778
  ]
1656
1779
  });
1657
1780
  }, Ve = {
1658
- root: "_root_kepgo_1",
1659
- grid: "_grid_kepgo_3",
1660
- actions: "_actions_kepgo_5"
1781
+ root: "_root_13nj5_1",
1782
+ grid: "_grid_13nj5_3",
1783
+ actions: "_actions_13nj5_5"
1661
1784
  }, He = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1662
1785
  let d = (e, t) => {
1663
1786
  let n = {
@@ -1693,7 +1816,8 @@ var T = {
1693
1816
  onChange: (t) => d(e.id, t)
1694
1817
  }, e.id);
1695
1818
  }
1696
- if (e.type === "dropdown") return /* @__PURE__ */ t(oe, {
1819
+ if (e.type === "dropdown") return /* @__PURE__ */ t(ce, {
1820
+ size: "lg",
1697
1821
  label: e.label,
1698
1822
  hint: e.hint,
1699
1823
  placeholder: e.placeholder,
@@ -1703,6 +1827,7 @@ var T = {
1703
1827
  onChange: (t) => d(e.id, t)
1704
1828
  }, e.id);
1705
1829
  if (e.type === "multiple") return /* @__PURE__ */ t(De, {
1830
+ size: "lg",
1706
1831
  label: e.label,
1707
1832
  hint: e.hint,
1708
1833
  placeholder: e.placeholder,
@@ -1711,7 +1836,7 @@ var T = {
1711
1836
  disabled: n,
1712
1837
  onChange: (t) => d(e.id, t)
1713
1838
  }, e.id);
1714
- if (e.type === "checkbox") return /* @__PURE__ */ t(O, {
1839
+ if (e.type === "checkbox") return /* @__PURE__ */ t(M, {
1715
1840
  label: e.label,
1716
1841
  hint: e.hint,
1717
1842
  checked: !!i,
@@ -1728,7 +1853,7 @@ var T = {
1728
1853
  from: null,
1729
1854
  to: null
1730
1855
  };
1731
- return /* @__PURE__ */ t(te, {
1856
+ return /* @__PURE__ */ t(q, {
1732
1857
  hint: e.hint,
1733
1858
  mode: e.mode,
1734
1859
  min: e.min,
@@ -1753,7 +1878,7 @@ var T = {
1753
1878
  })]
1754
1879
  })]
1755
1880
  });
1756
- }, Z = {
1881
+ }, Ue = {
1757
1882
  wrapper: "_wrapper_8w6xl_1",
1758
1883
  dropzone: "_dropzone_8w6xl_3",
1759
1884
  dragActive: "_dragActive_8w6xl_5",
@@ -1766,125 +1891,133 @@ var T = {
1766
1891
  file: "_file_8w6xl_17",
1767
1892
  fileName: "_fileName_8w6xl_21",
1768
1893
  fileSize: "_fileSize_8w6xl_23"
1769
- }, Ue = (e) => `${e.name}:${e.size}:${e.lastModified}`, We = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ge = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), Ke = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: u, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: T }) => {
1770
- let D = c(), O = y ?? `ds-file-input-${v ?? D}`, k = d(null), A = d(0), [j, M] = f(!1), N = p ? `${O}-hint` : void 0, P = m ? `${O}-error` : void 0, F = [N, P].filter(Boolean).join(" ") || void 0, I = !g && !_, L = (e) => {
1771
- let t = [], n = new Set(r.map(Ue)), c = e.filter((e) => Ge(e, o) ? s !== void 0 && e.size > s ? (t.push({
1894
+ }, We = (e) => `${e.name}:${e.size}:${e.lastModified}`, Ge = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ke = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), qe = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: u, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: T }) => {
1895
+ let O = c(), k = y ?? `ds-file-input-${v ?? O}`, j = d(null), M = d(0), [N, P] = f(!1), F = p ? `${k}-hint` : void 0, I = m ? `${k}-error` : void 0, L = [F, I].filter(Boolean).join(" ") || void 0, R = !g && !_, z = (e) => {
1896
+ let t = [], n = new Set(r.map(We)), c = e.filter((e) => Ke(e, o) ? s !== void 0 && e.size > s ? (t.push({
1772
1897
  file: e,
1773
1898
  reason: "maxSize"
1774
- }), !1) : !n.has(Ue(e)) && (n.add(Ue(e)), !0) : (t.push({
1899
+ }), !1) : !n.has(We(e)) && (n.add(We(e)), !0) : (t.push({
1775
1900
  file: e,
1776
1901
  reason: "accept"
1777
1902
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
1778
1903
  u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
1779
1904
  file: e,
1780
1905
  reason: "maxFiles"
1781
- })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), k.current && (k.current.value = "");
1906
+ })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), j.current && (j.current.value = "");
1782
1907
  };
1783
1908
  return /* @__PURE__ */ n("div", {
1784
- className: `${Z.wrapper} ${b}`,
1909
+ className: `${Ue.wrapper} ${b}`,
1785
1910
  children: [
1786
- u && /* @__PURE__ */ t(ee, {
1787
- htmlFor: O,
1911
+ u && /* @__PURE__ */ t(E, {
1912
+ htmlFor: k,
1788
1913
  required: h,
1789
1914
  disabled: g,
1790
1915
  children: u
1791
1916
  }),
1792
1917
  /* @__PURE__ */ n("div", {
1793
- className: `${Z.dropzone} ${j ? Z.dragActive : ""} ${g ? Z.disabled : ""} ${m ? Z.error : ""}`,
1918
+ className: `${Ue.dropzone} ${N ? Ue.dragActive : ""} ${g ? Ue.disabled : ""} ${m ? Ue.error : ""}`,
1794
1919
  onDragEnter: (e) => {
1795
- e.preventDefault(), I && ++A.current === 1 && M(!0);
1920
+ e.preventDefault(), R && ++M.current === 1 && P(!0);
1796
1921
  },
1797
1922
  onDragOver: (e) => e.preventDefault(),
1798
1923
  onDragLeave: (e) => {
1799
- e.preventDefault(), --A.current <= 0 && (A.current = 0, M(!1));
1924
+ e.preventDefault(), --M.current <= 0 && (M.current = 0, P(!1));
1800
1925
  },
1801
1926
  onDrop: (e) => {
1802
- e.preventDefault(), A.current = 0, M(!1), I && L(Array.from(e.dataTransfer.files));
1927
+ e.preventDefault(), M.current = 0, P(!1), R && z(Array.from(e.dataTransfer.files));
1803
1928
  },
1804
1929
  children: [/* @__PURE__ */ t("input", {
1805
- ref: k,
1806
- id: O,
1930
+ ref: j,
1931
+ id: k,
1807
1932
  name: v,
1808
- className: Z.nativeInput,
1933
+ className: Ue.nativeInput,
1809
1934
  type: "file",
1810
1935
  multiple: a,
1811
1936
  accept: o,
1812
1937
  required: h && r.length === 0,
1813
- disabled: !I,
1814
- "aria-describedby": F,
1938
+ disabled: !R,
1939
+ "aria-describedby": L,
1815
1940
  "aria-invalid": !!m,
1816
- onChange: (e) => L(Array.from(e.target.files ?? []))
1941
+ onChange: (e) => z(Array.from(e.target.files ?? []))
1817
1942
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1818
1943
  /* @__PURE__ */ t("ul", {
1819
- className: Z.files,
1944
+ className: Ue.files,
1820
1945
  "aria-live": "polite",
1821
1946
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1822
- className: Z.file,
1947
+ className: Ue.file,
1823
1948
  children: [
1824
1949
  /* @__PURE__ */ t("span", {
1825
- className: Z.fileName,
1950
+ className: Ue.fileName,
1826
1951
  title: e.name,
1827
1952
  children: e.name
1828
1953
  }),
1829
1954
  /* @__PURE__ */ t("span", {
1830
- className: Z.fileSize,
1831
- children: We(e.size)
1955
+ className: Ue.fileSize,
1956
+ children: Ge(e.size)
1832
1957
  }),
1833
- I && /* @__PURE__ */ t(w, {
1958
+ R && /* @__PURE__ */ t(w, {
1834
1959
  variant: "empty",
1835
1960
  size: "sm",
1836
1961
  "aria-label": `Удалить файл ${e.name}`,
1837
1962
  onClick: () => i?.(r.filter((e, t) => t !== a)),
1838
- children: "×"
1963
+ children: /* @__PURE__ */ t(A, {
1964
+ name: "IconCross",
1965
+ width: 16,
1966
+ height: 16
1967
+ })
1839
1968
  })
1840
1969
  ]
1841
- }, Ue(e)))
1970
+ }, We(e)))
1842
1971
  }),
1843
- I && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1844
- className: Z.browseButton,
1972
+ R && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1973
+ className: Ue.browseButton,
1845
1974
  size: "sm",
1846
- onClick: () => k.current?.click(),
1975
+ onClick: () => j.current?.click(),
1847
1976
  children: C
1848
1977
  }),
1849
- I && !a && /* @__PURE__ */ t(w, {
1850
- className: Z.browseButton,
1978
+ R && !a && /* @__PURE__ */ t(w, {
1979
+ className: Ue.browseButton,
1851
1980
  size: "sm",
1852
- onClick: () => k.current?.click(),
1981
+ onClick: () => j.current?.click(),
1853
1982
  children: S
1854
1983
  })
1855
1984
  ] }) : /* @__PURE__ */ n("div", {
1856
- className: Z.empty,
1985
+ className: Ue.empty,
1857
1986
  children: [
1858
1987
  /* @__PURE__ */ t("span", {
1859
- className: Z.uploadIcon,
1988
+ className: Ue.uploadIcon,
1860
1989
  "aria-hidden": "true",
1861
- children: "↑"
1990
+ children: /* @__PURE__ */ t(A, {
1991
+ name: "IconUpload",
1992
+ width: 24,
1993
+ height: 24
1994
+ })
1862
1995
  }),
1863
- /* @__PURE__ */ t("strong", { children: j ? "Отпустите файлы здесь" : x }),
1864
- !j && I && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1865
- onClick: () => k.current?.click(),
1996
+ /* @__PURE__ */ t("strong", { children: N ? "Отпустите файлы здесь" : x }),
1997
+ !N && R && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1998
+ onClick: () => j.current?.click(),
1866
1999
  children: S
1867
2000
  })] })
1868
2001
  ]
1869
2002
  })]
1870
2003
  }),
1871
- p && !m && /* @__PURE__ */ t(E, {
1872
- id: N,
2004
+ p && !m && /* @__PURE__ */ t(D, {
2005
+ id: F,
1873
2006
  children: p
1874
2007
  }),
1875
- m && /* @__PURE__ */ t(E, {
1876
- id: P,
2008
+ m && /* @__PURE__ */ t(D, {
2009
+ id: I,
1877
2010
  variant: "error",
1878
2011
  live: !0,
1879
2012
  children: m
1880
2013
  })
1881
2014
  ]
1882
2015
  });
1883
- }, qe = 0, Q = v((e) => ({
2016
+ }, Je = 0, Q = v((e) => ({
1884
2017
  modals: [],
1885
2018
  openModal: (t, n = {}, r = {}) => {
1886
- qe += 1;
1887
- let i = `ds-modal-${qe}`;
2019
+ Je += 1;
2020
+ let i = `ds-modal-${Je}`;
1888
2021
  return e((e) => ({ modals: [...e.modals, {
1889
2022
  id: i,
1890
2023
  name: t,
@@ -1896,22 +2029,23 @@ var T = {
1896
2029
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1897
2030
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1898
2031
  closeAllModals: () => e({ modals: [] })
1899
- })), Je = () => Q.setState({ modals: [] }), Ye = {
1900
- layer: "_layer_p0e8j_1",
1901
- backdrop: "_backdrop_p0e8j_3",
1902
- panel: "_panel_p0e8j_5",
1903
- header: "_header_p0e8j_9",
1904
- title: "_title_p0e8j_11",
1905
- description: "_description_p0e8j_13",
1906
- content: "_content_p0e8j_15"
1907
- }, Xe = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ze = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
2032
+ })), Ye = () => Q.setState({ modals: [] }), Xe = {
2033
+ layer: "_layer_1opno_1",
2034
+ backdrop: "_backdrop_1opno_3",
2035
+ panel: "_panel_1opno_5",
2036
+ header: "_header_1opno_9",
2037
+ title: "_title_1opno_11",
2038
+ description: "_description_1opno_13",
2039
+ content: "_content_1opno_15",
2040
+ close: "_close_1opno_17"
2041
+ }, Ze = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Qe = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1908
2042
  let f = c(), p = c(), m = d(null), h = Q((e) => e.closeModal);
1909
2043
  return s(() => {
1910
2044
  let e = document.activeElement, t = m.current;
1911
- return (t?.querySelector(Xe) ?? t)?.focus(), () => e?.focus();
2045
+ return (t?.querySelector(Ze) ?? t)?.focus(), () => e?.focus();
1912
2046
  }, []), /* @__PURE__ */ n("div", {
1913
2047
  ref: m,
1914
- className: `${Ye.panel} ${l}`,
2048
+ className: `${Xe.panel} ${l}`,
1915
2049
  role: u,
1916
2050
  "aria-modal": "true",
1917
2051
  "aria-labelledby": r ? f : void 0,
@@ -1919,7 +2053,7 @@ var T = {
1919
2053
  tabIndex: -1,
1920
2054
  onKeyDown: (e) => {
1921
2055
  if (e.key !== "Tab") return;
1922
- let t = Array.from(m.current?.querySelectorAll(Xe) ?? []);
2056
+ let t = Array.from(m.current?.querySelectorAll(Ze) ?? []);
1923
2057
  if (!t.length) {
1924
2058
  e.preventDefault();
1925
2059
  return;
@@ -1929,42 +2063,36 @@ var T = {
1929
2063
  },
1930
2064
  children: [
1931
2065
  (r || o) && /* @__PURE__ */ n("header", {
1932
- className: Ye.header,
2066
+ className: Xe.header,
1933
2067
  children: [r && /* @__PURE__ */ t("h2", {
1934
2068
  id: f,
1935
- className: Ye.title,
2069
+ className: Xe.title,
1936
2070
  children: r
1937
2071
  }), /* @__PURE__ */ t(w, {
2072
+ className: Xe.close,
1938
2073
  variant: "empty",
1939
2074
  size: "sm",
1940
2075
  "aria-label": o,
1941
2076
  onClick: () => h(a),
1942
- children: /* @__PURE__ */ n("svg", {
1943
- xmlns: "http://www.w3.org/2000/svg",
1944
- width: "24",
1945
- height: "24",
1946
- viewBox: "0 0 24 24",
1947
- fill: "none",
1948
- stroke: "currentColor",
1949
- strokeWidth: "2",
1950
- strokeLinecap: "round",
1951
- strokeLinejoin: "round",
1952
- children: [/* @__PURE__ */ t("path", { d: "M18 6 6 18" }), /* @__PURE__ */ t("path", { d: "m6 6 12 12" })]
2077
+ children: /* @__PURE__ */ t(A, {
2078
+ name: "IconCross",
2079
+ width: 24,
2080
+ height: 24
1953
2081
  })
1954
2082
  })]
1955
2083
  }),
1956
2084
  i && /* @__PURE__ */ t("p", {
1957
2085
  id: p,
1958
- className: Ye.description,
2086
+ className: Xe.description,
1959
2087
  children: i
1960
2088
  }),
1961
2089
  /* @__PURE__ */ t("div", {
1962
- className: Ye.content,
2090
+ className: Xe.content,
1963
2091
  children: e
1964
2092
  })
1965
2093
  ]
1966
2094
  });
1967
- }, Qe = ({ registry: e }) => {
2095
+ }, $e = ({ registry: e }) => {
1968
2096
  let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
1969
2097
  return s(() => {
1970
2098
  let e = (e) => {
@@ -1974,12 +2102,12 @@ var T = {
1974
2102
  };
1975
2103
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1976
2104
  }, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
1977
- className: Ye.layer,
2105
+ className: Xe.layer,
1978
2106
  "aria-label": "Модальные окна",
1979
2107
  children: n.map((a, o) => {
1980
2108
  let s = e[a.name];
1981
2109
  return s ? /* @__PURE__ */ t("div", {
1982
- className: Ye.backdrop,
2110
+ className: Xe.backdrop,
1983
2111
  "aria-hidden": o !== n.length - 1 || void 0,
1984
2112
  onMouseDown: (e) => {
1985
2113
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1993,7 +2121,7 @@ var T = {
1993
2121
  }, a.id) : null;
1994
2122
  })
1995
2123
  }), document.body);
1996
- }, $e = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
2124
+ }, et = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1997
2125
  let o = Q((e) => e.modals.length);
1998
2126
  return s(() => {
1999
2127
  if (!a || o === 0) return;
@@ -2001,23 +2129,23 @@ var T = {
2001
2129
  return document.body.style.overflow = "hidden", () => {
2002
2130
  document.body.style.overflow = e;
2003
2131
  };
2004
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Qe, { registry: r })] });
2005
- }, et = (e) => e, tt = {
2132
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t($e, { registry: r })] });
2133
+ }, tt = (e) => e, nt = {
2006
2134
  message: "_message_1vtru_1",
2007
2135
  actions: "_actions_1vtru_3"
2008
- }, nt = /* @__PURE__ */ new Map(), rt = 0, it = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
2136
+ }, rt = /* @__PURE__ */ new Map(), it = 0, at = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
2009
2137
  let u = (e) => {
2010
- nt.get(l)?.(e), nt.delete(l), r();
2138
+ rt.get(l)?.(e), rt.delete(l), r();
2011
2139
  };
2012
- return /* @__PURE__ */ n(Ze, {
2140
+ return /* @__PURE__ */ n(Qe, {
2013
2141
  modalId: e,
2014
2142
  title: i,
2015
2143
  role: "alertdialog",
2016
2144
  children: [/* @__PURE__ */ t("p", {
2017
- className: tt.message,
2145
+ className: nt.message,
2018
2146
  children: a
2019
2147
  }), /* @__PURE__ */ n("div", {
2020
- className: tt.actions,
2148
+ className: nt.actions,
2021
2149
  children: [/* @__PURE__ */ t(w, {
2022
2150
  variant: "outline",
2023
2151
  onClick: () => u(!1),
@@ -2029,40 +2157,40 @@ var T = {
2029
2157
  })]
2030
2158
  })]
2031
2159
  });
2032
- }, at = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ze, {
2160
+ }, ot = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Qe, {
2033
2161
  modalId: e,
2034
2162
  title: i,
2035
2163
  role: "alertdialog",
2036
2164
  children: [/* @__PURE__ */ t("p", {
2037
- className: tt.message,
2165
+ className: nt.message,
2038
2166
  children: a
2039
2167
  }), /* @__PURE__ */ t("div", {
2040
- className: tt.actions,
2168
+ className: nt.actions,
2041
2169
  children: /* @__PURE__ */ t(w, {
2042
2170
  onClick: r,
2043
2171
  children: o
2044
2172
  })
2045
2173
  })]
2046
- }), ot = et({
2047
- ConfirmModal: it,
2048
- ErrorModal: at
2049
- }), st = () => {
2174
+ }), st = tt({
2175
+ ConfirmModal: at,
2176
+ ErrorModal: ot
2177
+ }), ct = () => {
2050
2178
  let e = Q((e) => e.openModal);
2051
2179
  return (t = {}) => new Promise((n) => {
2052
- rt += 1;
2053
- let r = `confirm-${rt}`;
2054
- nt.set(r, n), e("ConfirmModal", {
2180
+ it += 1;
2181
+ let r = `confirm-${it}`;
2182
+ rt.set(r, n), e("ConfirmModal", {
2055
2183
  ...t,
2056
2184
  requestId: r
2057
2185
  }, { closeOnEscape: !1 });
2058
2186
  });
2059
- }, ct = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", lt = () => {
2187
+ }, lt = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", ut = () => {
2060
2188
  let e = Q((e) => e.openModal);
2061
2189
  return { showError: (t, n) => e("ErrorModal", {
2062
2190
  title: n,
2063
- message: ct(t)
2191
+ message: lt(t)
2064
2192
  }) };
2065
- }, ut = v(() => ({})), dt = v(() => ({})), ft = () => {
2193
+ }, dt = v(() => ({})), ft = v(() => ({})), pt = () => {
2066
2194
  let e = Q((e) => e.modals), t = Q((e) => e.openModal);
2067
2195
  return {
2068
2196
  openModal: (e, n = {}, r) => t(e, n, r),
@@ -2072,7 +2200,7 @@ var T = {
2072
2200
  isOpen: (t) => e.some((e) => e.name === t),
2073
2201
  count: e.length
2074
2202
  };
2075
- }, pt = {
2203
+ }, mt = {
2076
2204
  wrapper: "_wrapper_1qbyz_1",
2077
2205
  container: "_container_1qbyz_15",
2078
2206
  inner: "_inner_1qbyz_35",
@@ -2080,29 +2208,29 @@ var T = {
2080
2208
  jump: "_jump_1qbyz_1",
2081
2209
  cube__inner: "_cube__inner_1qbyz_67",
2082
2210
  morph: "_morph_1qbyz_1"
2083
- }, mt = () => /* @__PURE__ */ t("div", {
2084
- className: pt.wrapper,
2211
+ }, ht = () => /* @__PURE__ */ t("div", {
2212
+ className: mt.wrapper,
2085
2213
  children: /* @__PURE__ */ t("div", {
2086
- className: pt.container,
2214
+ className: mt.container,
2087
2215
  children: /* @__PURE__ */ n("div", {
2088
- className: pt.inner,
2216
+ className: mt.inner,
2089
2217
  children: [
2090
2218
  /* @__PURE__ */ t("div", {
2091
- className: pt.cube,
2092
- children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
2219
+ className: mt.cube,
2220
+ children: /* @__PURE__ */ t("div", { className: mt.cube__inner })
2093
2221
  }),
2094
2222
  /* @__PURE__ */ t("div", {
2095
- className: pt.cube,
2096
- children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
2223
+ className: mt.cube,
2224
+ children: /* @__PURE__ */ t("div", { className: mt.cube__inner })
2097
2225
  }),
2098
2226
  /* @__PURE__ */ t("div", {
2099
- className: pt.cube,
2100
- children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
2227
+ className: mt.cube,
2228
+ children: /* @__PURE__ */ t("div", { className: mt.cube__inner })
2101
2229
  })
2102
2230
  ]
2103
2231
  })
2104
2232
  })
2105
- }), ht = {
2233
+ }), gt = {
2106
2234
  viewport: "_viewport_15mi5_1",
2107
2235
  "top-right": "_top-right_15mi5_3",
2108
2236
  "top-left": "_top-left_15mi5_5",
@@ -2115,93 +2243,24 @@ var T = {
2115
2243
  success: "_success_15mi5_19",
2116
2244
  warning: "_warning_15mi5_21",
2117
2245
  error: "_error_15mi5_23"
2118
- }, gt = (e) => {
2119
- let r;
2120
- return r = e === "info" ? /* @__PURE__ */ n("svg", {
2121
- xmlns: "http://www.w3.org/2000/svg",
2122
- width: "24",
2123
- height: "24",
2124
- viewBox: "0 0 24 24",
2125
- fill: "none",
2126
- stroke: "#179cf0",
2127
- strokeWidth: "2",
2128
- strokeLinecap: "round",
2129
- strokeLinejoin: "round",
2130
- children: [
2131
- /* @__PURE__ */ t("circle", {
2132
- cx: "12",
2133
- cy: "12",
2134
- r: "10"
2135
- }),
2136
- /* @__PURE__ */ t("path", { d: "M12 16v-4" }),
2137
- /* @__PURE__ */ t("path", { d: "M12 8h.01" })
2138
- ]
2139
- }) : e === "success" ? /* @__PURE__ */ n("svg", {
2140
- xmlns: "http://www.w3.org/2000/svg",
2141
- width: "24",
2142
- height: "24",
2143
- viewBox: "0 0 24 24",
2144
- fill: "none",
2145
- stroke: "#179c66",
2146
- strokeWidth: "2",
2147
- strokeLinecap: "round",
2148
- strokeLinejoin: "round",
2149
- children: [/* @__PURE__ */ t("circle", {
2150
- cx: "12",
2151
- cy: "12",
2152
- r: "10"
2153
- }), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
2154
- }) : e === "warning" ? /* @__PURE__ */ n("svg", {
2155
- xmlns: "http://www.w3.org/2000/svg",
2156
- width: "24",
2157
- height: "24",
2158
- viewBox: "0 0 24 24",
2159
- fill: "none",
2160
- stroke: "#f59e0b",
2161
- strokeWidth: "2",
2162
- strokeLinecap: "round",
2163
- strokeLinejoin: "round",
2164
- children: [
2165
- /* @__PURE__ */ t("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
2166
- /* @__PURE__ */ t("path", { d: "M12 9v4" }),
2167
- /* @__PURE__ */ t("path", { d: "M12 17h.01" })
2168
- ]
2169
- }) : e === "error" ? /* @__PURE__ */ n("svg", {
2170
- xmlns: "http://www.w3.org/2000/svg",
2171
- width: "24",
2172
- height: "24",
2173
- viewBox: "0 0 24 24",
2174
- fill: "none",
2175
- stroke: "#dc2626",
2176
- strokeWidth: "2",
2177
- strokeLinecap: "round",
2178
- strokeLinejoin: "round",
2179
- children: [
2180
- /* @__PURE__ */ t("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
2181
- /* @__PURE__ */ t("path", { d: "M12 9v4" }),
2182
- /* @__PURE__ */ t("path", { d: "M12 17h.01" })
2183
- ]
2184
- }) : /* @__PURE__ */ n("svg", {
2185
- xmlns: "http://www.w3.org/2000/svg",
2186
- width: "24",
2187
- height: "24",
2188
- viewBox: "0 0 24 24",
2189
- fill: "none",
2190
- stroke: "currentColor",
2191
- strokeWidth: "2",
2192
- strokeLinecap: "round",
2193
- strokeLinejoin: "round",
2194
- children: [
2195
- /* @__PURE__ */ t("circle", {
2196
- cx: "12",
2197
- cy: "12",
2198
- r: "10"
2199
- }),
2200
- /* @__PURE__ */ t("path", { d: "m15 9-6 6" }),
2201
- /* @__PURE__ */ t("path", { d: "m9 9 6 6" })
2202
- ]
2203
- }), r;
2204
- }, _t = ({ toast: e, onClose: r }) => {
2246
+ }, _t = {
2247
+ info: {
2248
+ name: "IconInfoCircle",
2249
+ color: "var(--color-primary)"
2250
+ },
2251
+ success: {
2252
+ name: "IconSuccessCircle",
2253
+ color: "var(--color-success)"
2254
+ },
2255
+ warning: {
2256
+ name: "IconWarning",
2257
+ color: "var(--color-warning)"
2258
+ },
2259
+ error: {
2260
+ name: "IconWarning",
2261
+ color: "var(--color-error)"
2262
+ }
2263
+ }, vt = ({ toast: e, onClose: r }) => {
2205
2264
  let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
2206
2265
  return s(() => {
2207
2266
  if (i || e.duration <= 0) return;
@@ -2216,7 +2275,7 @@ var T = {
2216
2275
  e.duration,
2217
2276
  e.id
2218
2277
  ]), /* @__PURE__ */ n("article", {
2219
- className: `${ht.toast} ${ht[e.variant]}`,
2278
+ className: `${gt.toast} ${gt[e.variant]}`,
2220
2279
  role: e.variant === "error" ? "alert" : "status",
2221
2280
  "aria-live": e.variant === "error" ? "assertive" : "polite",
2222
2281
  onMouseEnter: () => a(!0),
@@ -2224,9 +2283,13 @@ var T = {
2224
2283
  onFocus: () => a(!0),
2225
2284
  onBlur: () => a(!1),
2226
2285
  children: [
2227
- /* @__PURE__ */ t("div", { children: gt(e.variant) }),
2286
+ /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(A, {
2287
+ ..._t[e.variant],
2288
+ width: 24,
2289
+ height: 24
2290
+ }) }),
2228
2291
  /* @__PURE__ */ n("div", {
2229
- className: ht.body,
2292
+ className: gt.body,
2230
2293
  children: [
2231
2294
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
2232
2295
  /* @__PURE__ */ t("div", { children: e.message }),
@@ -2245,26 +2308,19 @@ var T = {
2245
2308
  size: "sm",
2246
2309
  "aria-label": "Закрыть уведомление",
2247
2310
  onClick: () => r(e.id),
2248
- children: /* @__PURE__ */ n("svg", {
2249
- xmlns: "http://www.w3.org/2000/svg",
2250
- width: "24",
2251
- height: "24",
2252
- viewBox: "0 0 24 24",
2253
- fill: "none",
2254
- stroke: "currentColor",
2255
- strokeWidth: "2",
2256
- strokeLinecap: "round",
2257
- strokeLinejoin: "round",
2258
- children: [/* @__PURE__ */ t("path", { d: "M18 6 6 18" }), /* @__PURE__ */ t("path", { d: "m6 6 12 12" })]
2311
+ children: /* @__PURE__ */ t(A, {
2312
+ name: "IconCross",
2313
+ width: 24,
2314
+ height: 24
2259
2315
  })
2260
2316
  })
2261
2317
  ]
2262
2318
  });
2263
- }, vt = 0, yt = v((e) => ({
2319
+ }, yt = 0, bt = v((e) => ({
2264
2320
  toasts: [],
2265
2321
  showToast: (t) => {
2266
- vt += 1;
2267
- let n = `ds-toast-${vt}`;
2322
+ yt += 1;
2323
+ let n = `ds-toast-${yt}`;
2268
2324
  return e((e) => ({ toasts: [...e.toasts, {
2269
2325
  variant: "info",
2270
2326
  duration: 5e3,
@@ -2275,18 +2331,18 @@ var T = {
2275
2331
  },
2276
2332
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
2277
2333
  clearToasts: () => e({ toasts: [] })
2278
- })), bt = () => yt.setState({ toasts: [] }), xt = ({ position: e = "top-right" }) => {
2279
- let n = yt((e) => e.toasts), r = yt((e) => e.removeToast);
2334
+ })), xt = () => bt.setState({ toasts: [] }), St = ({ position: e = "top-right" }) => {
2335
+ let n = bt((e) => e.toasts), r = bt((e) => e.removeToast);
2280
2336
  return /* @__PURE__ */ t("div", {
2281
- className: `${ht.viewport} ${ht[e]}`,
2337
+ className: `${gt.viewport} ${gt[e]}`,
2282
2338
  "aria-label": "Уведомления",
2283
- children: n.map((e) => /* @__PURE__ */ t(_t, {
2339
+ children: n.map((e) => /* @__PURE__ */ t(vt, {
2284
2340
  toast: e,
2285
2341
  onClose: r
2286
2342
  }, e.id))
2287
2343
  });
2288
- }, St = () => {
2289
- let e = yt((e) => e.showToast), t = yt((e) => e.removeToast), n = yt((e) => e.clearToasts), r = o((t) => e({
2344
+ }, Ct = () => {
2345
+ let e = bt((e) => e.showToast), t = bt((e) => e.removeToast), n = bt((e) => e.clearToasts), r = o((t) => e({
2290
2346
  ...t,
2291
2347
  variant: "info"
2292
2348
  }), [e]), i = o((t) => e({
@@ -2316,7 +2372,7 @@ var T = {
2316
2372
  i,
2317
2373
  a
2318
2374
  ]);
2319
- }, Ct = {
2375
+ }, wt = {
2320
2376
  root: "_root_s9o0g_1",
2321
2377
  tooltip: "_tooltip_s9o0g_3",
2322
2378
  "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
@@ -2324,7 +2380,7 @@ var T = {
2324
2380
  bottom: "_bottom_s9o0g_7",
2325
2381
  left: "_left_s9o0g_9",
2326
2382
  right: "_right_s9o0g_11"
2327
- }, wt = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
2383
+ }, Tt = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
2328
2384
  let h = c(), [g, _] = f(!1), v = d(null), y = () => {
2329
2385
  u || !e || (v.current = setTimeout(() => _(!0), l));
2330
2386
  }, b = () => {
@@ -2346,120 +2402,211 @@ var T = {
2346
2402
  onBlur: b
2347
2403
  });
2348
2404
  return /* @__PURE__ */ n("span", {
2349
- className: `${Ct.root} ${m}`,
2405
+ className: `${wt.root} ${m}`,
2350
2406
  onPointerDown: g ? b : y,
2351
2407
  children: [x, g && /* @__PURE__ */ t("span", {
2352
2408
  id: h,
2353
2409
  role: "tooltip",
2354
- className: `${Ct.tooltip} ${Ct[o]}`,
2410
+ className: `${wt.tooltip} ${wt[o]}`,
2355
2411
  style: { maxWidth: p },
2356
2412
  children: e
2357
2413
  })]
2358
2414
  });
2415
+ }, Et = (e) => {
2416
+ if (!Number.isFinite(e) || e < 0) return "00:00";
2417
+ let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
2418
+ return n ? `${n}:${a}` : a;
2359
2419
  }, $ = {
2360
- root: "_root_3casy_1",
2361
- frame: "_frame_3casy_15",
2362
- video: "_video_3casy_35",
2363
- overlay: "_overlay_3casy_49",
2364
- state: "_state_3casy_51",
2365
- loaderViewport: "_loaderViewport_3casy_89",
2366
- loaderScale: "_loaderScale_3casy_101",
2367
- stateIcon: "_stateIcon_3casy_115",
2368
- empty: "_empty_3casy_147",
2369
- error: "_error_3casy_157",
2370
- caption: "_caption_3casy_167"
2371
- }, Tt = () => /* @__PURE__ */ n("svg", {
2372
- className: $.stateIcon,
2373
- viewBox: "0 0 24 24",
2374
- fill: "none",
2375
- "aria-hidden": "true",
2376
- children: [
2377
- /* @__PURE__ */ t("circle", {
2378
- cx: "12",
2379
- cy: "12",
2380
- r: "9",
2381
- stroke: "currentColor",
2382
- strokeWidth: "1.7"
2383
- }),
2384
- /* @__PURE__ */ t("path", {
2385
- d: "M12 10.5V16",
2386
- stroke: "currentColor",
2387
- strokeWidth: "1.7",
2388
- strokeLinecap: "round"
2389
- }),
2390
- /* @__PURE__ */ t("circle", {
2391
- cx: "12",
2392
- cy: "7.5",
2393
- r: "1",
2394
- fill: "currentColor"
2395
- })
2396
- ]
2397
- }), Et = () => /* @__PURE__ */ n("svg", {
2398
- className: $.stateIcon,
2399
- viewBox: "0 0 24 24",
2400
- fill: "none",
2401
- "aria-hidden": "true",
2402
- children: [
2403
- /* @__PURE__ */ t("path", {
2404
- d: "M12 3.5L21 19H3L12 3.5Z",
2405
- stroke: "currentColor",
2406
- strokeWidth: "1.7",
2407
- strokeLinejoin: "round"
2408
- }),
2409
- /* @__PURE__ */ t("path", {
2410
- d: "M12 9V13.5",
2411
- stroke: "currentColor",
2412
- strokeWidth: "1.7",
2413
- strokeLinecap: "round"
2414
- }),
2415
- /* @__PURE__ */ t("circle", {
2416
- cx: "12",
2417
- cy: "16.5",
2418
- r: "1",
2419
- fill: "currentColor"
2420
- })
2421
- ]
2422
- }), Dt = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: c = "contain", loading: l = !1, error: u, fallback: d, className: p = "", controls: m = !0, playsInline: h = !0, ...g }) => {
2423
- let [_, v] = f(!1), [y, b] = f(r.length > 0), x = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|");
2420
+ root: "_root_1oxvl_1",
2421
+ frame: "_frame_1oxvl_35",
2422
+ video: "_video_1oxvl_65",
2423
+ overlay: "_overlay_1oxvl_79",
2424
+ state: "_state_1oxvl_81",
2425
+ buffering: "_buffering_1oxvl_83",
2426
+ loaderViewport: "_loaderViewport_1oxvl_143",
2427
+ loaderScale: "_loaderScale_1oxvl_155",
2428
+ stateIcon: "_stateIcon_1oxvl_169",
2429
+ empty: "_empty_1oxvl_201",
2430
+ error: "_error_1oxvl_211",
2431
+ replay: "_replay_1oxvl_223",
2432
+ controlsLayer: "_controlsLayer_1oxvl_259",
2433
+ controlsVisible: "_controlsVisible_1oxvl_285",
2434
+ controls: "_controls_1oxvl_259",
2435
+ controlGroup: "_controlGroup_1oxvl_309",
2436
+ controlButton: "_controlButton_1oxvl_335",
2437
+ settingsAction: "_settingsAction_1oxvl_367",
2438
+ timeline: "_timeline_1oxvl_385",
2439
+ volume: "_volume_1oxvl_387",
2440
+ settings: "_settings_1oxvl_367",
2441
+ playButton: "_playButton_1oxvl_401",
2442
+ volumeGroup: "_volumeGroup_1oxvl_415",
2443
+ timelineGroup: "_timelineGroup_1oxvl_439",
2444
+ time: "_time_1oxvl_385",
2445
+ settingsActionLabel: "_settingsActionLabel_1oxvl_677",
2446
+ caption: "_caption_1oxvl_689",
2447
+ fullscreen: "_fullscreen_1oxvl_703"
2448
+ }, Dt = 2500, Ot = 5, kt = .05, At = [
2449
+ .5,
2450
+ .75,
2451
+ 1,
2452
+ 1.25,
2453
+ 1.5,
2454
+ 2
2455
+ ], jt = ({ sources: r, tracks: i = [], title: a, aspectRatio: c = "16 / 9", objectFit: l = "contain", loading: u = !1, error: p, fallback: m, className: h = "", controls: g = !0, playsInline: _ = !0, ...v }) => {
2456
+ let y = d(null), b = d(null), x = d(null), C = d(void 0), [T, E] = f(!1), [D, O] = f(r.length > 0), [k, j] = f(!1), [M, N] = f(!1), [P, F] = f(!1), [I, L] = f(0), [R, z] = f(0), [B, V] = f(0), [H, ee] = f(1), [U, W] = f(!!v.muted), [G, te] = f(1), [K, q] = f(!!v.loop), [J, ne] = f(-1), [Y, re] = f(!1), [ie, ae] = f(!0), [oe, se] = f(!1), [ce, le] = f(!1), ue = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), X = i.map((e, t) => ({
2457
+ track: e,
2458
+ index: t
2459
+ })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), de = p ?? (T ? "Не удалось воспроизвести видео" : void 0), fe = u || D && !de && r.length > 0, pe = !fe && !de && r.length === 0, me = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, he = o(() => {
2460
+ ae(!0), window.clearTimeout(C.current), M && !Y && (C.current = window.setTimeout(() => ae(!1), Dt));
2461
+ }, [M, Y]);
2424
2462
  s(() => {
2425
- v(!1), b(r.length > 0);
2426
- }, [x, r.length]);
2427
- let S = u ?? (_ ? "Не удалось воспроизвести видео" : void 0), C = l || y && !S && r.length > 0, w = !C && !S && r.length === 0;
2463
+ E(!1), O(r.length > 0), j(!1), N(!1), F(!1), L(0), z(0), V(0);
2464
+ }, [ue, r.length]), s(() => (he(), () => window.clearTimeout(C.current)), [he]), s(() => {
2465
+ let e = () => se(document.fullscreenElement === b.current), t = () => le(document.pictureInPictureElement === x.current);
2466
+ return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
2467
+ document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
2468
+ };
2469
+ }, []), s(() => {
2470
+ if (!Y) return;
2471
+ let e = (e) => {
2472
+ y.current?.contains(e.target) || re(!1);
2473
+ };
2474
+ return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
2475
+ }, [Y]);
2476
+ let ge = async () => {
2477
+ let e = x.current;
2478
+ if (!(!e || de || fe)) {
2479
+ if (e.paused || e.ended) {
2480
+ e.ended && (e.currentTime = 0);
2481
+ try {
2482
+ await e.play();
2483
+ } catch {
2484
+ E(!0);
2485
+ }
2486
+ } else e.pause();
2487
+ }
2488
+ }, _e = () => {
2489
+ let e = x.current;
2490
+ e && (e.muted = !e.muted);
2491
+ }, ve = (e) => {
2492
+ let t = x.current;
2493
+ t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
2494
+ }, ye = (e) => {
2495
+ let t = x.current;
2496
+ !t || !R || (t.currentTime = Math.min(R, Math.max(0, e)), L(t.currentTime));
2497
+ }, be = async () => {
2498
+ if (b.current) try {
2499
+ document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
2500
+ } catch {
2501
+ se(!1);
2502
+ }
2503
+ }, xe = async () => {
2504
+ let e = x.current;
2505
+ if (!(!e || !me)) try {
2506
+ document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
2507
+ } catch {
2508
+ le(!1);
2509
+ }
2510
+ }, Se = (e) => {
2511
+ let t = x.current;
2512
+ t && (Array.from(t.textTracks).forEach((t, n) => {
2513
+ t.mode = n === e ? "showing" : "disabled";
2514
+ }), ne(e));
2515
+ }, Ce = (e) => {
2516
+ let t = e.target;
2517
+ if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
2518
+ let n = e.key.toLowerCase();
2519
+ n === " " || n === "k" ? (e.preventDefault(), ge()) : n === "m" ? (e.preventDefault(), _e()) : n === "f" ? (e.preventDefault(), be()) : n === "c" && X.length ? (e.preventDefault(), Se(J === -1 ? X[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), ye(I + (e.key === "ArrowRight" ? Ot : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), ve(H + (e.key === "ArrowUp" ? kt : -.05))) : e.key === "Escape" && re(!1), he();
2520
+ }, we = () => {
2521
+ let e = x.current;
2522
+ E(!1), O(!0), e?.load();
2523
+ }, Te = {
2524
+ "--video-progress": `${R ? I / R * 100 : 0}%`,
2525
+ "--video-buffered": `${B * 100}%`
2526
+ };
2428
2527
  return /* @__PURE__ */ n("figure", {
2429
- className: `${$.root} ${p}`,
2528
+ ref: y,
2529
+ className: `${$.root} ${h}`,
2530
+ onKeyDown: Ce,
2430
2531
  children: [/* @__PURE__ */ n("div", {
2431
- className: $.frame,
2432
- style: { aspectRatio: o },
2433
- "aria-busy": C || void 0,
2532
+ ref: b,
2533
+ className: `${$.frame} ${oe ? $.fullscreen : ""}`,
2534
+ style: { aspectRatio: c },
2535
+ "aria-busy": fe || void 0,
2536
+ tabIndex: g && r.length ? 0 : void 0,
2537
+ onPointerMove: he,
2538
+ onPointerDown: he,
2539
+ onFocusCapture: he,
2540
+ onMouseLeave: () => {
2541
+ M && !Y && ae(!1);
2542
+ },
2434
2543
  children: [
2435
- !S && r.length > 0 && /* @__PURE__ */ n("video", {
2436
- ...g,
2544
+ r.length > 0 && /* @__PURE__ */ n("video", {
2545
+ ...v,
2546
+ ref: x,
2437
2547
  "aria-label": a,
2438
- controls: m,
2439
- playsInline: h,
2548
+ controls: !1,
2549
+ playsInline: _,
2550
+ loop: K,
2440
2551
  className: $.video,
2441
- style: { objectFit: c },
2552
+ style: { objectFit: l },
2553
+ onClick: (e) => {
2554
+ v.onClick?.(e), ge();
2555
+ },
2556
+ onDoubleClick: (e) => {
2557
+ v.onDoubleClick?.(e), be();
2558
+ },
2442
2559
  onLoadStart: (e) => {
2443
- b(!0), g.onLoadStart?.(e);
2560
+ O(!0), v.onLoadStart?.(e);
2561
+ },
2562
+ onLoadedMetadata: (e) => {
2563
+ z(e.currentTarget.duration || 0);
2564
+ let t = X.find(({ track: e }) => e.default);
2565
+ Se(t?.index ?? -1), v.onLoadedMetadata?.(e);
2566
+ },
2567
+ onDurationChange: (e) => {
2568
+ z(e.currentTarget.duration || 0), v.onDurationChange?.(e);
2569
+ },
2570
+ onTimeUpdate: (e) => {
2571
+ L(e.currentTarget.currentTime), v.onTimeUpdate?.(e);
2572
+ },
2573
+ onProgress: (e) => {
2574
+ let t = e.currentTarget;
2575
+ t.duration && t.buffered.length && V(t.buffered.end(t.buffered.length - 1) / t.duration), v.onProgress?.(e);
2444
2576
  },
2445
2577
  onLoadedData: (e) => {
2446
- b(!1), g.onLoadedData?.(e);
2578
+ O(!1), j(!1), v.onLoadedData?.(e);
2447
2579
  },
2448
2580
  onCanPlay: (e) => {
2449
- b(!1), g.onCanPlay?.(e);
2581
+ O(!1), j(!1), v.onCanPlay?.(e);
2450
2582
  },
2451
2583
  onWaiting: (e) => {
2452
- b(!0), g.onWaiting?.(e);
2584
+ j(!0), v.onWaiting?.(e);
2453
2585
  },
2454
2586
  onPlaying: (e) => {
2455
- b(!1), g.onPlaying?.(e);
2587
+ N(!0), F(!1), j(!1), v.onPlaying?.(e);
2588
+ },
2589
+ onPlay: (e) => {
2590
+ N(!0), v.onPlay?.(e);
2591
+ },
2592
+ onPause: (e) => {
2593
+ N(!1), v.onPause?.(e);
2594
+ },
2595
+ onEnded: (e) => {
2596
+ N(!1), F(!0), ae(!0), v.onEnded?.(e);
2597
+ },
2598
+ onVolumeChange: (e) => {
2599
+ ee(e.currentTarget.volume), W(e.currentTarget.muted), v.onVolumeChange?.(e);
2600
+ },
2601
+ onRateChange: (e) => {
2602
+ te(e.currentTarget.playbackRate), v.onRateChange?.(e);
2456
2603
  },
2457
2604
  onError: (e) => {
2458
- b(!1), v(!0), g.onError?.(e);
2605
+ O(!1), j(!1), E(!0), v.onError?.(e);
2459
2606
  },
2460
2607
  children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
2461
2608
  }),
2462
- C && /* @__PURE__ */ n("div", {
2609
+ fe && /* @__PURE__ */ n("div", {
2463
2610
  className: $.overlay,
2464
2611
  role: "status",
2465
2612
  "aria-live": "polite",
@@ -2468,23 +2615,210 @@ var T = {
2468
2615
  "aria-hidden": "true",
2469
2616
  children: /* @__PURE__ */ t("div", {
2470
2617
  className: $.loaderScale,
2471
- children: /* @__PURE__ */ t(mt, {})
2618
+ children: /* @__PURE__ */ t(ht, {})
2472
2619
  })
2473
2620
  }), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
2474
2621
  }),
2475
- w && /* @__PURE__ */ n("div", {
2622
+ !fe && k && !de && /* @__PURE__ */ t("div", {
2623
+ className: $.buffering,
2624
+ role: "status",
2625
+ "aria-label": "Буферизация видео",
2626
+ children: /* @__PURE__ */ t(S, { variant: "empty" })
2627
+ }),
2628
+ pe && /* @__PURE__ */ n("div", {
2476
2629
  className: `${$.state} ${$.empty}`,
2477
2630
  role: "status",
2478
2631
  children: [
2479
- /* @__PURE__ */ t(Tt, {}),
2632
+ /* @__PURE__ */ t(A, {
2633
+ name: "IconInfoCircle",
2634
+ className: $.stateIcon,
2635
+ width: 40,
2636
+ height: 40
2637
+ }),
2480
2638
  /* @__PURE__ */ t("strong", { children: "Видео отсутствует" }),
2481
- d ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
2639
+ m ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
2482
2640
  ]
2483
2641
  }),
2484
- !C && S && /* @__PURE__ */ n("div", {
2642
+ !fe && de && /* @__PURE__ */ n("div", {
2485
2643
  className: `${$.state} ${$.error}`,
2486
2644
  role: "alert",
2487
- children: [/* @__PURE__ */ t(Et, {}), d ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: S })] })]
2645
+ children: [
2646
+ /* @__PURE__ */ t(A, {
2647
+ name: "IconWarning",
2648
+ className: $.stateIcon,
2649
+ width: 40,
2650
+ height: 40
2651
+ }),
2652
+ m ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: de })] }),
2653
+ r.length > 0 && /* @__PURE__ */ t(w, {
2654
+ size: "sm",
2655
+ variant: "secondary",
2656
+ onClick: we,
2657
+ children: "Повторить"
2658
+ })
2659
+ ]
2660
+ }),
2661
+ !fe && !de && P && /* @__PURE__ */ t("button", {
2662
+ type: "button",
2663
+ className: $.replay,
2664
+ "aria-label": "Воспроизвести заново",
2665
+ onClick: () => void ge(),
2666
+ children: /* @__PURE__ */ t(A, {
2667
+ name: "IconReplay",
2668
+ width: 28,
2669
+ height: 28
2670
+ })
2671
+ }),
2672
+ g && r.length > 0 && !fe && !de && /* @__PURE__ */ n("div", {
2673
+ className: `${$.controlsLayer} ${ie || !M ? $.controlsVisible : ""}`,
2674
+ onClick: (e) => e.stopPropagation(),
2675
+ children: [Y && /* @__PURE__ */ n("div", {
2676
+ className: $.settings,
2677
+ role: "dialog",
2678
+ "aria-label": "Настройки видео",
2679
+ children: [
2680
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
2681
+ value: G,
2682
+ onChange: (e) => {
2683
+ let t = Number(e.target.value);
2684
+ x.current && (x.current.playbackRate = t);
2685
+ },
2686
+ children: At.map((e) => /* @__PURE__ */ n("option", {
2687
+ value: e,
2688
+ children: [e, "×"]
2689
+ }, e))
2690
+ })] }),
2691
+ X.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
2692
+ value: J,
2693
+ onChange: (e) => Se(Number(e.target.value)),
2694
+ children: [/* @__PURE__ */ t("option", {
2695
+ value: -1,
2696
+ children: "Выключены"
2697
+ }), X.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
2698
+ value: n,
2699
+ children: e.label
2700
+ }, `${e.srcLang}-${e.label}`))]
2701
+ })] }),
2702
+ /* @__PURE__ */ n("button", {
2703
+ type: "button",
2704
+ className: $.settingsAction,
2705
+ "aria-pressed": K,
2706
+ onClick: () => q((e) => !e),
2707
+ children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: K ? "Вкл." : "Выкл." })]
2708
+ }),
2709
+ me && /* @__PURE__ */ t("button", {
2710
+ type: "button",
2711
+ className: $.settingsAction,
2712
+ "aria-pressed": ce,
2713
+ onClick: () => void xe(),
2714
+ children: /* @__PURE__ */ n("span", {
2715
+ className: $.settingsActionLabel,
2716
+ children: [/* @__PURE__ */ t(A, {
2717
+ name: "IconPictureInPicture",
2718
+ width: 18,
2719
+ height: 18
2720
+ }), "Картинка в картинке"]
2721
+ })
2722
+ })
2723
+ ]
2724
+ }), /* @__PURE__ */ n("div", {
2725
+ className: $.controls,
2726
+ children: [
2727
+ /* @__PURE__ */ t("div", {
2728
+ className: $.controlGroup,
2729
+ children: /* @__PURE__ */ t("button", {
2730
+ type: "button",
2731
+ className: `${$.controlButton} ${$.playButton}`,
2732
+ "aria-label": M ? "Пауза" : "Воспроизвести",
2733
+ title: M ? "Пауза (K)" : "Воспроизвести (K)",
2734
+ onClick: () => void ge(),
2735
+ children: /* @__PURE__ */ t(A, {
2736
+ name: M ? "IconPause" : "IconPlay",
2737
+ width: 24,
2738
+ height: 24
2739
+ })
2740
+ })
2741
+ }),
2742
+ /* @__PURE__ */ n("div", {
2743
+ className: `${$.controlGroup} ${$.volumeGroup}`,
2744
+ children: [/* @__PURE__ */ t("button", {
2745
+ type: "button",
2746
+ className: $.controlButton,
2747
+ "aria-label": U ? "Включить звук" : "Выключить звук",
2748
+ "aria-pressed": U,
2749
+ title: "Звук (M)",
2750
+ onClick: _e,
2751
+ children: /* @__PURE__ */ t(A, {
2752
+ name: U || H === 0 ? "IconVolumeMuted" : "IconVolume",
2753
+ width: 22,
2754
+ height: 22
2755
+ })
2756
+ }), /* @__PURE__ */ t("input", {
2757
+ className: $.volume,
2758
+ type: "range",
2759
+ min: 0,
2760
+ max: 1,
2761
+ step: .05,
2762
+ value: U ? 0 : H,
2763
+ "aria-label": "Громкость",
2764
+ "aria-valuetext": `${Math.round((U ? 0 : H) * 100)}%`,
2765
+ onChange: (e) => ve(Number(e.target.value))
2766
+ })]
2767
+ }),
2768
+ /* @__PURE__ */ n("div", {
2769
+ className: `${$.controlGroup} ${$.timelineGroup}`,
2770
+ children: [
2771
+ /* @__PURE__ */ t("span", {
2772
+ className: $.time,
2773
+ children: Et(I)
2774
+ }),
2775
+ /* @__PURE__ */ t("input", {
2776
+ className: $.timeline,
2777
+ style: Te,
2778
+ type: "range",
2779
+ min: 0,
2780
+ max: R || 0,
2781
+ step: .01,
2782
+ value: Math.min(I, R || 0),
2783
+ "aria-label": "Позиция воспроизведения",
2784
+ "aria-valuetext": `${Et(I)} из ${Et(R)}`,
2785
+ onChange: (e) => ye(Number(e.target.value))
2786
+ }),
2787
+ /* @__PURE__ */ t("span", {
2788
+ className: $.time,
2789
+ children: Et(R)
2790
+ })
2791
+ ]
2792
+ }),
2793
+ /* @__PURE__ */ n("div", {
2794
+ className: $.controlGroup,
2795
+ children: [/* @__PURE__ */ t("button", {
2796
+ type: "button",
2797
+ className: $.controlButton,
2798
+ "aria-label": "Настройки",
2799
+ "aria-expanded": Y,
2800
+ title: "Настройки",
2801
+ onClick: () => re((e) => !e),
2802
+ children: /* @__PURE__ */ t(A, {
2803
+ name: "IconSettings",
2804
+ width: 22,
2805
+ height: 22
2806
+ })
2807
+ }), /* @__PURE__ */ t("button", {
2808
+ type: "button",
2809
+ className: $.controlButton,
2810
+ "aria-label": oe ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
2811
+ title: "Полноэкранный режим (F)",
2812
+ onClick: () => void be(),
2813
+ children: /* @__PURE__ */ t(A, {
2814
+ name: oe ? "IconFullscreenExit" : "IconFullscreen",
2815
+ width: 22,
2816
+ height: 22
2817
+ })
2818
+ })]
2819
+ })
2820
+ ]
2821
+ })]
2488
2822
  })
2489
2823
  ]
2490
2824
  }), /* @__PURE__ */ t("figcaption", {
@@ -2492,7 +2826,7 @@ var T = {
2492
2826
  children: a
2493
2827
  })]
2494
2828
  });
2495
- }, Ot = {
2829
+ }, Mt = {
2496
2830
  root: "_root_1tdda_1",
2497
2831
  trigger: "_trigger_1tdda_15",
2498
2832
  heading: "_heading_1tdda_41",
@@ -2502,7 +2836,7 @@ var T = {
2502
2836
  open: "_open_1tdda_91",
2503
2837
  content: "_content_1tdda_99",
2504
2838
  contentInner: "_contentInner_1tdda_119"
2505
- }, kt = (e, t, n, r = 16) => {
2839
+ }, Nt = (e, t, n, r = 16) => {
2506
2840
  if (t > Math.max(0, n - r * 2)) {
2507
2841
  let t = e - r;
2508
2842
  return Math.abs(t) <= 1 ? {
@@ -2524,7 +2858,7 @@ var T = {
2524
2858
  alignment: "none",
2525
2859
  delta: 0
2526
2860
  };
2527
- }, At = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: l, autoScrollOnOpen: u = !0, scrollOffset: p = 16, className: m = "" }) => {
2861
+ }, Pt = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: l, autoScrollOnOpen: u = !0, scrollOffset: p = 16, className: m = "" }) => {
2528
2862
  let h = c(), [g, _] = f(a), v = o ?? g, y = d(null), b = d(null), x = d(v);
2529
2863
  return s(() => {
2530
2864
  let e = x.current;
@@ -2534,7 +2868,7 @@ var T = {
2534
2868
  let r = !1, i = () => {
2535
2869
  if (r) return;
2536
2870
  r = !0;
2537
- let e = t.getBoundingClientRect(), n = kt(e.top, e.height, window.innerHeight, p);
2871
+ let e = t.getBoundingClientRect(), n = Nt(e.top, e.height, window.innerHeight, p);
2538
2872
  if (n.alignment === "none") return;
2539
2873
  let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
2540
2874
  window.scrollBy({
@@ -2555,10 +2889,10 @@ var T = {
2555
2889
  p
2556
2890
  ]), /* @__PURE__ */ n("section", {
2557
2891
  ref: y,
2558
- className: `${Ot.root} ${v ? Ot.open : ""} ${m}`,
2892
+ className: `${Mt.root} ${v ? Mt.open : ""} ${m}`,
2559
2893
  children: [/* @__PURE__ */ n("button", {
2560
2894
  type: "button",
2561
- className: Ot.trigger,
2895
+ className: Mt.trigger,
2562
2896
  "aria-expanded": v,
2563
2897
  "aria-controls": h,
2564
2898
  onClick: () => {
@@ -2566,41 +2900,35 @@ var T = {
2566
2900
  o === void 0 && _(e), l?.(e);
2567
2901
  },
2568
2902
  children: [/* @__PURE__ */ n("span", {
2569
- className: Ot.heading,
2903
+ className: Mt.heading,
2570
2904
  children: [/* @__PURE__ */ t("span", {
2571
- className: Ot.title,
2905
+ className: Mt.title,
2572
2906
  children: e
2573
2907
  }), r && /* @__PURE__ */ t("span", {
2574
- className: Ot.subtitle,
2908
+ className: Mt.subtitle,
2575
2909
  children: r
2576
2910
  })]
2577
2911
  }), /* @__PURE__ */ t("span", {
2578
- className: Ot.icon,
2912
+ className: Mt.icon,
2579
2913
  "aria-hidden": "true",
2580
- children: /* @__PURE__ */ t("svg", {
2581
- viewBox: "0 0 20 20",
2582
- fill: "none",
2583
- children: /* @__PURE__ */ t("path", {
2584
- d: "M5 7.5L10 12.5L15 7.5",
2585
- stroke: "currentColor",
2586
- strokeWidth: "1.8",
2587
- strokeLinecap: "round",
2588
- strokeLinejoin: "round"
2589
- })
2914
+ children: /* @__PURE__ */ t(A, {
2915
+ name: "IconChevron",
2916
+ width: 20,
2917
+ height: 20
2590
2918
  })
2591
2919
  })]
2592
2920
  }), /* @__PURE__ */ t("div", {
2593
2921
  ref: b,
2594
2922
  id: h,
2595
- className: Ot.content,
2923
+ className: Mt.content,
2596
2924
  "aria-hidden": !v,
2597
2925
  children: /* @__PURE__ */ t("div", {
2598
- className: Ot.contentInner,
2926
+ className: Mt.contentInner,
2599
2927
  children: i
2600
2928
  })
2601
2929
  })]
2602
2930
  });
2603
- }, jt = ({ children: e, containerId: t = "overlay-root" }) => {
2931
+ }, Ft = ({ children: e, containerId: t = "overlay-root" }) => {
2604
2932
  let [n, r] = f(null);
2605
2933
  return s(() => {
2606
2934
  let e = document.getElementById(t);
@@ -2615,4 +2943,4 @@ var T = {
2615
2943
  }, [t]), n ? p(e, n) : null;
2616
2944
  };
2617
2945
  //#endregion
2618
- export { it as ConfirmModal, At as DSAccordion, b as DSBadge, w as DSButton, O as DSCheckbox, Se as DSDataTable, te as DSDateRange, H as DSDateTimePicker, oe as DSDropDown, De as DSDropDownMultiple, ee as DSFieldLabel, E as DSFieldMessage, Ke as DSFileInput, He as DSFilters, ue as DSIcon, Re as DSInfoBlock, ke as DSInput, S as DSLoader, Qe as DSModal, Ze as DSModalFrame, mt as DSPageLoader, jt as DSPortal, Be as DSRadioButton, Ie as DSSearchDropDown, K as DSSkeleton, ce as DSSort, _t as DSToast, xt as DSToastProvider, wt as DSTooltip, Dt as DSVideoPlayerFrame, at as ErrorModal, $e as ModalSystemProvider, ot as builtInModalRegistry, et as defineModalRegistry, P as formatDateTimeLocalValue, kt as getDSAccordionScrollTarget, fe as getDSDataTablePaginationItems, ct as getErrorMessage, ie as getNextEnabledOptionIndex, W as isValidDateRange, F as parseDateTimeLocalValue, Je as resetModalStore, bt as resetToastStore, st as useConfirmModal, ut as useConfirmModalStore, lt as useErrorModal, dt as useErrorModalStore, ft as useModals, Q as useModalsStore, St as useToast, yt as useToastStore, pe as validateDSDataTableData };
2946
+ export { at as ConfirmModal, Pt as DSAccordion, b as DSBadge, w as DSButton, M as DSCheckbox, Se as DSDataTable, q as DSDateRange, G as DSDateTimePicker, ce as DSDropDown, De as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, qe as DSFileInput, He as DSFilters, A as DSIcon, Re as DSInfoBlock, ke as DSInput, S as DSLoader, $e as DSModal, Qe as DSModalFrame, ht as DSPageLoader, Ft as DSPortal, Be as DSRadioButton, Ie as DSSearchDropDown, ne as DSSkeleton, ue as DSSort, vt as DSToast, St as DSToastProvider, Tt as DSTooltip, jt as DSVideoPlayerFrame, ot as ErrorModal, et as ModalSystemProvider, st as builtInModalRegistry, tt as defineModalRegistry, R as formatDateTimeLocalValue, Nt as getDSAccordionScrollTarget, fe as getDSDataTablePaginationItems, lt as getErrorMessage, oe as getNextEnabledOptionIndex, K as isValidDateRange, z as parseDateTimeLocalValue, Ye as resetModalStore, xt as resetToastStore, ct as useConfirmModal, dt as useConfirmModalStore, ut as useErrorModal, ft as useErrorModalStore, pt as useModals, Q as useModalsStore, Ct as useToast, bt as useToastStore, pe as validateDSDataTableData };