@efficiency-point/design-system 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,120 +1,120 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { cloneElement as r, forwardRef as i, isValidElement as a, useCallback as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { createColumnHelper as f, createSortedRowModel as p, rowSortingFeature as m, tableFeatures as h, useTable as g } from "@tanstack/react-table";
4
- import { createPortal as _ } from "react-dom";
5
- import { create as v } from "zustand";
6
- var y = {
7
- badge: "_badge_l4qbw_1",
8
- sm: "_sm_l4qbw_2",
9
- md: "_md_l4qbw_3",
10
- neutral: "_neutral_l4qbw_4",
11
- info: "_info_l4qbw_5",
12
- success: "_success_l4qbw_6",
13
- warning: "_warning_l4qbw_7",
14
- error: "_error_l4qbw_8",
15
- dot: "_dot_l4qbw_9",
16
- icon: "_icon_l4qbw_10",
17
- label: "_label_l4qbw_11"
18
- }, b = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
- className: `${y.badge} ${y[r]} ${y[i]} ${s}`,
3
+ import { createSortedRowModel as f, rowSortingFeature as p, tableFeatures as m, useTable as h } from "@tanstack/react-table";
4
+ import { createPortal as g } from "react-dom";
5
+ import { create as _ } from "zustand";
6
+ var v = {
7
+ badge: "_badge_1pk53_1",
8
+ sm: "_sm_1pk53_3",
9
+ md: "_md_1pk53_5",
10
+ neutral: "_neutral_1pk53_7",
11
+ info: "_info_1pk53_9",
12
+ success: "_success_1pk53_11",
13
+ warning: "_warning_1pk53_13",
14
+ error: "_error_1pk53_15",
15
+ dot: "_dot_1pk53_17",
16
+ icon: "_icon_1pk53_19",
17
+ label: "_label_1pk53_21"
18
+ }, y = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
+ className: `${v.badge} ${v[r]} ${v[i]} ${s}`,
20
20
  children: [
21
21
  a && /* @__PURE__ */ t("span", {
22
- className: y.dot,
22
+ className: v.dot,
23
23
  "aria-hidden": "true"
24
24
  }),
25
25
  o && /* @__PURE__ */ t("span", {
26
- className: y.icon,
26
+ className: v.icon,
27
27
  "aria-hidden": "true",
28
28
  children: o
29
29
  }),
30
30
  /* @__PURE__ */ t("span", {
31
- className: y.label,
31
+ className: v.label,
32
32
  children: e
33
33
  })
34
34
  ]
35
- }), x = {
36
- loader: "_loader_pslm9_1",
37
- "ds-spin": "_ds-spin_pslm9_1",
38
- primary: "_primary_pslm9_11",
39
- secondary: "_secondary_pslm9_12",
40
- light: "_light_pslm9_13",
41
- danger: "_danger_pslm9_14"
42
- }, S = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
- className: `${x.loader} ${x[e]} ${r}`,
35
+ }), b = {
36
+ loader: "_loader_1tjcf_1",
37
+ "ds-spin": "_ds-spin_1tjcf_1",
38
+ primary: "_primary_1tjcf_21",
39
+ secondary: "_secondary_1tjcf_23",
40
+ light: "_light_1tjcf_25",
41
+ danger: "_danger_1tjcf_27"
42
+ }, x = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
+ className: `${b.loader} ${b[e]} ${r}`,
44
44
  role: i ? void 0 : "status",
45
45
  "aria-label": i ? void 0 : n,
46
46
  "aria-hidden": i || void 0
47
- }), C = {
48
- button: "_button_higub_1",
49
- sm: "_sm_higub_16",
50
- md: "_md_higub_17",
51
- lg: "_lg_higub_18",
52
- primary: "_primary_higub_19",
53
- secondary: "_secondary_higub_20",
54
- outline: "_outline_higub_21",
55
- ghost: "_ghost_higub_23",
56
- empty: "_empty_higub_29",
57
- destructive: "_destructive_higub_34",
58
- destructiveOutline: "_destructiveOutline_higub_35"
59
- }, w = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, loadingLabel: a = "Загрузка", disabled: o, type: s = "button", className: c = "", ...l }, u) => /* @__PURE__ */ t("button", {
47
+ }), S = {
48
+ button: "_button_1jisp_1",
49
+ sm: "_sm_1jisp_31",
50
+ md: "_md_1jisp_33",
51
+ lg: "_lg_1jisp_35",
52
+ primary: "_primary_1jisp_37",
53
+ secondary: "_secondary_1jisp_39",
54
+ outline: "_outline_1jisp_41",
55
+ ghost: "_ghost_1jisp_45",
56
+ empty: "_empty_1jisp_57",
57
+ destructive: "_destructive_1jisp_67",
58
+ destructiveOutline: "_destructiveOutline_1jisp_69"
59
+ }, C = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, loadingLabel: a = "Загрузка", disabled: o, type: s = "button", className: c = "", ...l }, u) => /* @__PURE__ */ t("button", {
60
60
  ref: u,
61
61
  type: s,
62
- className: `${C.button} ${C[n]} ${C[r]} ${c}`,
62
+ className: `${S.button} ${S[n]} ${S[r]} ${c}`,
63
63
  disabled: o || i,
64
64
  "aria-busy": i || void 0,
65
65
  ...l,
66
- children: i ? /* @__PURE__ */ t(S, {
66
+ children: i ? /* @__PURE__ */ t(x, {
67
67
  variant: "light",
68
68
  label: a
69
69
  }) : e
70
70
  }));
71
- w.displayName = "DSButton";
72
- var T = {
73
- label: "_label_5v0ym_1",
74
- required: "_required_5v0ym_12",
75
- error: "_error_5v0ym_13",
76
- optional: "_optional_5v0ym_17",
77
- hint: "_hint_5v0ym_18",
78
- disabled: "_disabled_5v0ym_24",
79
- message: "_message_5v0ym_28",
80
- success: "_success_5v0ym_36"
81
- }, E = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
82
- className: `${T.label} ${a ? T.disabled : ""} ${o}`,
71
+ C.displayName = "DSButton";
72
+ var w = {
73
+ label: "_label_1lsqq_1",
74
+ required: "_required_1lsqq_23",
75
+ error: "_error_1lsqq_25",
76
+ optional: "_optional_1lsqq_33",
77
+ hint: "_hint_1lsqq_35",
78
+ disabled: "_disabled_1lsqq_47",
79
+ message: "_message_1lsqq_55",
80
+ success: "_success_1lsqq_71"
81
+ }, T = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
82
+ className: `${w.label} ${a ? w.disabled : ""} ${o}`,
83
83
  ...s,
84
84
  children: [
85
85
  /* @__PURE__ */ t("span", { children: e }),
86
86
  r && /* @__PURE__ */ t("span", {
87
- className: T.required,
87
+ className: w.required,
88
88
  "aria-hidden": "true",
89
89
  children: "*"
90
90
  }),
91
91
  i && /* @__PURE__ */ t("span", {
92
- className: T.optional,
92
+ className: w.optional,
93
93
  children: i
94
94
  })
95
95
  ]
96
- }), D = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
96
+ }), E = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
97
97
  id: r,
98
- className: `${T.message} ${T[n]} ${a}`,
98
+ className: `${w.message} ${w[n]} ${a}`,
99
99
  role: i && n === "error" ? "alert" : void 0,
100
100
  "aria-live": i && n !== "error" ? "polite" : void 0,
101
101
  children: e
102
- }), O = {
103
- wrapper: "_wrapper_1l5cg_1",
104
- label: "_label_1l5cg_2",
105
- input: "_input_1l5cg_3",
106
- control: "_control_1l5cg_4",
107
- disabled: "_disabled_1l5cg_7",
108
- controlError: "_controlError_1l5cg_9"
109
- }, k = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: d = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
102
+ }), D = {
103
+ wrapper: "_wrapper_1gq36_1",
104
+ label: "_label_1gq36_3",
105
+ input: "_input_1gq36_5",
106
+ control: "_control_1gq36_7",
107
+ disabled: "_disabled_1gq36_13",
108
+ controlError: "_controlError_1gq36_17"
109
+ }, O = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: d = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
110
110
  let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = u(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
111
111
  return s(() => {
112
112
  y.current && (y.current.indeterminate = h && !e);
113
113
  }, [e, h]), /* @__PURE__ */ n("div", {
114
- className: `${O.wrapper} ${f}`,
114
+ className: `${D.wrapper} ${f}`,
115
115
  children: [
116
116
  /* @__PURE__ */ n("label", {
117
- className: `${O.label} ${l ? O.disabled : ""}`,
117
+ className: `${D.label} ${l ? D.disabled : ""}`,
118
118
  htmlFor: v,
119
119
  children: [
120
120
  /* @__PURE__ */ t("input", {
@@ -127,50 +127,50 @@ var T = {
127
127
  "aria-readonly": d || void 0,
128
128
  "aria-invalid": !!o,
129
129
  "aria-describedby": [b, x].filter(Boolean).join(" ") || void 0,
130
- className: O.input,
130
+ className: D.input,
131
131
  onChange: (e) => {
132
132
  d || r?.(e.target.checked, e);
133
133
  },
134
134
  ...g
135
135
  }),
136
136
  /* @__PURE__ */ t("span", {
137
- className: `${O.control} ${o ? O.controlError : ""}`,
137
+ className: `${D.control} ${o ? D.controlError : ""}`,
138
138
  "aria-hidden": "true",
139
139
  children: h && !e ? "−" : e ? "✓" : ""
140
140
  }),
141
141
  i && /* @__PURE__ */ t("span", { children: i })
142
142
  ]
143
143
  }),
144
- a && !o && /* @__PURE__ */ t(D, {
144
+ a && !o && /* @__PURE__ */ t(E, {
145
145
  id: b,
146
146
  children: a
147
147
  }),
148
- o && /* @__PURE__ */ t(D, {
148
+ o && /* @__PURE__ */ t(E, {
149
149
  id: x,
150
150
  variant: "error",
151
151
  children: o
152
152
  })
153
153
  ]
154
154
  });
155
- }, A = {
156
- wrapper: "_wrapper_phf7i_1",
157
- trigger: "_trigger_phf7i_9",
158
- nav: "_nav_phf7i_27",
159
- day: "_day_phf7i_28",
160
- monthSelect: "_monthSelect_phf7i_29",
161
- yearInput: "_yearInput_phf7i_30",
162
- timeInput: "_timeInput_phf7i_31",
163
- value: "_value_phf7i_43",
164
- placeholder: "_placeholder_phf7i_47",
165
- error: "_error_phf7i_51",
166
- panel: "_panel_phf7i_55",
167
- calendarHeader: "_calendarHeader_phf7i_68",
168
- weekdays: "_weekdays_phf7i_113",
169
- days: "_days_phf7i_114",
170
- outside: "_outside_phf7i_132",
171
- selected: "_selected_phf7i_136",
172
- timeLabel: "_timeLabel_phf7i_146"
173
- }, j = [
155
+ }, k = {
156
+ wrapper: "_wrapper_1528c_1",
157
+ trigger: "_trigger_1528c_17",
158
+ nav: "_nav_1528c_53",
159
+ day: "_day_1528c_55",
160
+ monthSelect: "_monthSelect_1528c_57",
161
+ yearInput: "_yearInput_1528c_59",
162
+ timeInput: "_timeInput_1528c_61",
163
+ value: "_value_1528c_85",
164
+ placeholder: "_placeholder_1528c_93",
165
+ error: "_error_1528c_101",
166
+ panel: "_panel_1528c_109",
167
+ calendarHeader: "_calendarHeader_1528c_135",
168
+ weekdays: "_weekdays_1528c_225",
169
+ days: "_days_1528c_227",
170
+ outside: "_outside_1528c_263",
171
+ selected: "_selected_1528c_271",
172
+ timeLabel: "_timeLabel_1528c_291"
173
+ }, A = [
174
174
  "Пн",
175
175
  "Вт",
176
176
  "Ср",
@@ -178,7 +178,7 @@ var T = {
178
178
  "Пт",
179
179
  "Сб",
180
180
  "Вс"
181
- ], M = [
181
+ ], j = [
182
182
  "Январь",
183
183
  "Февраль",
184
184
  "Март",
@@ -191,11 +191,11 @@ var T = {
191
191
  "Октябрь",
192
192
  "Ноябрь",
193
193
  "Декабрь"
194
- ], N = (e) => String(e).padStart(2, "0"), P = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), F = (e, t) => {
194
+ ], M = (e) => String(e).padStart(2, "0"), N = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), P = (e, t) => {
195
195
  if (!e) return "";
196
- let n = `${e.getFullYear()}-${N(e.getMonth() + 1)}-${N(e.getDate())}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
196
+ let n = `${e.getFullYear()}-${M(e.getMonth() + 1)}-${M(e.getDate())}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
197
197
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
198
- }, I = (e, t) => {
198
+ }, F = (e, t) => {
199
199
  if (!e) return null;
200
200
  if (t === "time") {
201
201
  let t = /^(\d{2}):(\d{2})$/.exec(e);
@@ -207,26 +207,26 @@ var T = {
207
207
  }
208
208
  let n = new Date(t === "date" ? `${e}T00:00` : e);
209
209
  return Number.isNaN(n.getTime()) ? null : n;
210
- }, L = (e, t) => {
210
+ }, ee = (e, t) => {
211
211
  if (!e) return "";
212
- let n = `${N(e.getDate())}.${N(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
212
+ let n = `${M(e.getDate())}.${M(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
213
213
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
214
- }, ee = (e) => {
214
+ }, I = (e) => {
215
215
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
216
216
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
217
217
  let n = new Date(r);
218
218
  return n.setDate(r.getDate() + t), n;
219
219
  });
220
220
  }, te = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ne = (e, t, n) => {
221
- let r = P(e).getTime();
222
- return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
223
- }, R = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
- let C = c(), w = b ?? `ds-date-time-${x ?? C}`, T = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, k = u(null), N = u(null), [P, R] = d(!1), [z, B] = d(r ?? /* @__PURE__ */ new Date()), [re, V] = d(F(r, "time")), ie = l(() => ee(z), [z]), H = a !== "time", ae = a !== "date";
221
+ let r = N(e).getTime();
222
+ return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
223
+ }, L = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
+ let C = c(), w = b ?? `ds-date-time-${x ?? C}`, D = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, M = u(null), N = u(null), [L, R] = d(!1), [z, B] = d(r ?? /* @__PURE__ */ new Date()), [V, re] = d(P(r, "time")), H = l(() => I(z), [z]), ie = a !== "time", U = a !== "date";
225
225
  s(() => {
226
- r && B(r), V(F(r, "time"));
226
+ r && B(r), re(P(r, "time"));
227
227
  }, [r]), s(() => {
228
228
  let e = (e) => {
229
- k.current?.contains(e.target) || R(!1);
229
+ M.current?.contains(e.target) || R(!1);
230
230
  }, t = (e) => {
231
231
  e.key === "Escape" && (R(!1), N.current?.focus());
232
232
  };
@@ -234,25 +234,25 @@ var T = {
234
234
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
235
235
  };
236
236
  }, []);
237
- let U = (e) => {
237
+ let ae = (e) => {
238
238
  if (ne(e, v, y)) return;
239
239
  let t = new Date(e);
240
240
  t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && R(!1);
241
241
  }, oe = (e) => {
242
- if (V(e), !e) {
242
+ if (re(e), !e) {
243
243
  i?.(null);
244
244
  return;
245
245
  }
246
- let t = I(e, "time");
246
+ let t = F(e, "time");
247
247
  if (!t) return;
248
248
  let n = new Date(a === "datetime" ? r ?? z : /* @__PURE__ */ new Date());
249
249
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(v && n < v || y && n > y) && i?.(n);
250
- }, se = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), W = [T, O].filter(Boolean).join(" ") || void 0;
250
+ }, W = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), se = [D, O].filter(Boolean).join(" ") || void 0;
251
251
  return /* @__PURE__ */ n("div", {
252
- ref: k,
253
- className: `${A.wrapper} ${S}`,
252
+ ref: M,
253
+ className: `${k.wrapper} ${S}`,
254
254
  children: [
255
- o && /* @__PURE__ */ t(E, {
255
+ o && /* @__PURE__ */ t(T, {
256
256
  htmlFor: w,
257
257
  required: _,
258
258
  disabled: h,
@@ -263,50 +263,50 @@ var T = {
263
263
  id: w,
264
264
  name: x,
265
265
  type: "button",
266
- className: `${A.trigger} ${m ? A.error : ""}`,
266
+ className: `${k.trigger} ${m ? k.error : ""}`,
267
267
  disabled: h,
268
268
  "aria-readonly": g || void 0,
269
- "aria-expanded": P,
269
+ "aria-expanded": L,
270
270
  "aria-haspopup": "dialog",
271
- "aria-describedby": W,
271
+ "aria-describedby": se,
272
272
  onClick: () => {
273
273
  g || R((e) => !e);
274
274
  },
275
275
  children: [/* @__PURE__ */ t("span", {
276
- className: r ? A.value : A.placeholder,
277
- children: L(r, a) || se
276
+ className: r ? k.value : k.placeholder,
277
+ children: ee(r, a) || W
278
278
  }), /* @__PURE__ */ t("span", {
279
279
  "aria-hidden": "true",
280
280
  children: "▾"
281
281
  })]
282
282
  }),
283
- P && !g && /* @__PURE__ */ n("div", {
284
- className: A.panel,
283
+ L && !g && /* @__PURE__ */ n("div", {
284
+ className: k.panel,
285
285
  role: "dialog",
286
- "aria-label": o ?? se,
287
- children: [H && /* @__PURE__ */ n(e, { children: [
286
+ "aria-label": o ?? W,
287
+ children: [ie && /* @__PURE__ */ n(e, { children: [
288
288
  /* @__PURE__ */ n("div", {
289
- className: A.calendarHeader,
289
+ className: k.calendarHeader,
290
290
  children: [
291
291
  /* @__PURE__ */ t("button", {
292
292
  type: "button",
293
- className: A.nav,
293
+ className: k.nav,
294
294
  "aria-label": "Предыдущий месяц",
295
295
  onClick: () => B(new Date(z.getFullYear(), z.getMonth() - 1, 1)),
296
296
  children: "‹"
297
297
  }),
298
298
  /* @__PURE__ */ t("select", {
299
- className: A.monthSelect,
299
+ className: k.monthSelect,
300
300
  "aria-label": "Месяц",
301
301
  value: z.getMonth(),
302
302
  onChange: (e) => B(new Date(z.getFullYear(), Number(e.target.value), 1)),
303
- children: M.map((e, n) => /* @__PURE__ */ t("option", {
303
+ children: j.map((e, n) => /* @__PURE__ */ t("option", {
304
304
  value: n,
305
305
  children: e
306
306
  }, e))
307
307
  }),
308
308
  /* @__PURE__ */ t("input", {
309
- className: A.yearInput,
309
+ className: k.yearInput,
310
310
  type: "number",
311
311
  "aria-label": "Год",
312
312
  value: z.getFullYear(),
@@ -314,7 +314,7 @@ var T = {
314
314
  }),
315
315
  /* @__PURE__ */ t("button", {
316
316
  type: "button",
317
- className: A.nav,
317
+ className: k.nav,
318
318
  "aria-label": "Следующий месяц",
319
319
  onClick: () => B(new Date(z.getFullYear(), z.getMonth() + 1, 1)),
320
320
  children: "›"
@@ -322,58 +322,58 @@ var T = {
322
322
  ]
323
323
  }),
324
324
  /* @__PURE__ */ t("div", {
325
- className: A.weekdays,
326
- children: j.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
325
+ className: k.weekdays,
326
+ children: A.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
327
327
  }),
328
328
  /* @__PURE__ */ t("div", {
329
- className: A.days,
330
- children: ie.map((e) => {
329
+ className: k.days,
330
+ children: H.map((e) => {
331
331
  let n = te(r, e);
332
332
  return /* @__PURE__ */ t("button", {
333
333
  type: "button",
334
- className: `${A.day} ${e.getMonth() === z.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
334
+ className: `${k.day} ${e.getMonth() === z.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
335
335
  disabled: ne(e, v, y),
336
336
  "aria-pressed": n,
337
- onClick: () => U(e),
337
+ onClick: () => ae(e),
338
338
  children: e.getDate()
339
339
  }, e.toISOString());
340
340
  })
341
341
  })
342
- ] }), ae && /* @__PURE__ */ n("label", {
343
- className: A.timeLabel,
342
+ ] }), U && /* @__PURE__ */ n("label", {
343
+ className: k.timeLabel,
344
344
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
345
- className: A.timeInput,
345
+ className: k.timeInput,
346
346
  type: "time",
347
- value: re,
347
+ value: V,
348
348
  onChange: (e) => oe(e.target.value)
349
349
  })]
350
350
  })]
351
351
  }),
352
- p && !m && /* @__PURE__ */ t(D, {
353
- id: T,
352
+ p && !m && /* @__PURE__ */ t(E, {
353
+ id: D,
354
354
  children: p
355
355
  }),
356
- m && /* @__PURE__ */ t(D, {
356
+ m && /* @__PURE__ */ t(E, {
357
357
  id: O,
358
358
  variant: "error",
359
359
  children: m
360
360
  })
361
361
  ]
362
362
  });
363
- }, z = {
364
- root: "_root_9h2e2_1",
365
- legend: "_legend_9h2e2_2",
366
- range: "_range_9h2e2_3"
367
- }, B = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), re = ({ 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 = "" }) => {
363
+ }, R = {
364
+ root: "_root_1q42e_1",
365
+ legend: "_legend_1q42e_3",
366
+ range: "_range_1q42e_5"
367
+ }, z = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), B = ({ 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 = "" }) => {
368
368
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
369
- i?.(e), B(e) && r?.(e);
369
+ i?.(e), z(e) && r?.(e);
370
370
  };
371
371
  return /* @__PURE__ */ n("fieldset", {
372
- className: `${z.root} ${h}`,
372
+ className: `${R.root} ${h}`,
373
373
  disabled: f,
374
374
  children: [/* @__PURE__ */ n("div", {
375
- className: z.range,
376
- children: [/* @__PURE__ */ t(R, {
375
+ className: R.range,
376
+ children: [/* @__PURE__ */ t(L, {
377
377
  value: e.from,
378
378
  mode: a === "datetime" ? "datetime" : a,
379
379
  label: o,
@@ -387,7 +387,7 @@ var T = {
387
387
  ...e,
388
388
  from: t
389
389
  })
390
- }), /* @__PURE__ */ t(R, {
390
+ }), /* @__PURE__ */ t(L, {
391
391
  value: e.to,
392
392
  mode: a === "datetime" ? "datetime" : a,
393
393
  label: s,
@@ -402,17 +402,17 @@ var T = {
402
402
  to: t
403
403
  })
404
404
  })]
405
- }), c && !g && /* @__PURE__ */ t(D, { children: c })]
405
+ }), c && !g && /* @__PURE__ */ t(E, { children: c })]
406
406
  });
407
407
  }, V = {
408
- group: "_group_1st6r_1",
409
- skeleton: "_skeleton_1st6r_2",
410
- text: "_text_1st6r_3",
411
- rectangular: "_rectangular_1st6r_4",
412
- circular: "_circular_1st6r_5",
413
- animated: "_animated_1st6r_6",
414
- "ds-skeleton": "_ds-skeleton_1st6r_1"
415
- }, ie = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
408
+ group: "_group_1fs9e_1",
409
+ skeleton: "_skeleton_1fs9e_3",
410
+ text: "_text_1fs9e_5",
411
+ rectangular: "_rectangular_1fs9e_7",
412
+ circular: "_circular_1fs9e_9",
413
+ animated: "_animated_1fs9e_11",
414
+ "ds-skeleton": "_ds-skeleton_1fs9e_1"
415
+ }, re = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
416
  className: `${V.group} ${o}`,
417
417
  "aria-hidden": "true",
418
418
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
@@ -438,7 +438,7 @@ var T = {
438
438
  message: "_message_dkn63_265",
439
439
  error: "_error_dkn63_267",
440
440
  errorState: "_errorState_dkn63_293"
441
- }, ae = (e, t, n) => {
441
+ }, ie = (e, t, n) => {
442
442
  for (let r = 0; r < e.length; r += 1) {
443
443
  let i = (t + r * n + e.length) % e.length;
444
444
  if (!e[i]?.disabled) return i;
@@ -457,7 +457,7 @@ var T = {
457
457
  };
458
458
  }, [w]);
459
459
  let P = (e, t) => {
460
- let n = ae(r, e, t);
460
+ let n = ie(r, e, t);
461
461
  O.current[n]?.focus(), O.current[n]?.scrollIntoView({ block: "nearest" });
462
462
  }, F = (e) => {
463
463
  e.disabled || (a?.(e.value, e), T(!1), D.current?.focus());
@@ -568,16 +568,16 @@ var T = {
568
568
  })
569
569
  ]
570
570
  });
571
- }, oe = (e) => `${e.id}:${e.direction}`, se = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
571
+ }, ae = (e) => `${e.id}:${e.direction}`, oe = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
572
572
  let c = e.flatMap((e) => [{
573
- value: oe({
573
+ value: ae({
574
574
  id: e.id,
575
575
  direction: "asc"
576
576
  }),
577
577
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
578
578
  disabled: e.disabled
579
579
  }, {
580
- value: oe({
580
+ value: ae({
581
581
  id: e.id,
582
582
  direction: "desc"
583
583
  }),
@@ -586,7 +586,7 @@ var T = {
586
586
  }]);
587
587
  return /* @__PURE__ */ t(U, {
588
588
  options: c,
589
- value: n ? oe(n) : "",
589
+ value: n ? ae(n) : "",
590
590
  label: i,
591
591
  placeholder: a,
592
592
  disabled: o,
@@ -600,96 +600,131 @@ var T = {
600
600
  }
601
601
  });
602
602
  }, W = {
603
- root: "_root_i4d62_1",
604
- tableWrap: "_tableWrap_i4d62_2",
605
- table: "_table_i4d62_2",
606
- sticky: "_sticky_i4d62_8",
607
- sortButton: "_sortButton_i4d62_9",
608
- state: "_state_i4d62_11",
609
- cards: "_cards_i4d62_12",
610
- mobileSort: "_mobileSort_i4d62_12",
611
- card: "_card_i4d62_12",
612
- spanTwo: "_spanTwo_i4d62_19",
613
- default: "_default_i4d62_21",
614
- tableOnMobile: "_tableOnMobile_i4d62_21",
615
- wide: "_wide_i4d62_23"
616
- }, ce = h({
617
- rowSortingFeature: m,
618
- sortedRowModel: p()
619
- }), le = (e, t) => {
603
+ root: "_root_1h9ti_1",
604
+ tableWrap: "_tableWrap_1h9ti_3",
605
+ table: "_table_1h9ti_3",
606
+ sticky: "_sticky_1h9ti_15",
607
+ sortButton: "_sortButton_1h9ti_17",
608
+ state: "_state_1h9ti_21",
609
+ cards: "_cards_1h9ti_23",
610
+ mobileSort: "_mobileSort_1h9ti_23",
611
+ card: "_card_1h9ti_23",
612
+ spanTwo: "_spanTwo_1h9ti_37",
613
+ default: "_default_1h9ti_41",
614
+ tableOnMobile: "_tableOnMobile_1h9ti_41",
615
+ wide: "_wide_1h9ti_45"
616
+ }, se = m({
617
+ rowSortingFeature: p,
618
+ sortedRowModel: f()
619
+ }), ce = (e, t) => {
620
620
  let n = /* @__PURE__ */ new Set();
621
621
  for (let t of e) {
622
622
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
623
623
  if (n.has(t.id)) return `Идентификатор колонки «${t.id}» повторяется`;
624
624
  n.add(t.id);
625
625
  }
626
- for (let n = 0; n < t.length; n += 1) for (let r of e) if (typeof r.accessor == "string" && !(r.accessor in t[n])) return `В строке ${n + 1} отсутствует колонка «${r.id}»`;
626
+ for (let n = 0; n < t.length; n += 1) {
627
+ let r = t[n];
628
+ for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
629
+ }
627
630
  return null;
628
- }, ue = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: p, ariaLabel: m, loading: h = !1, error: _, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "" }) => {
629
- let [S, C] = d([]), w = o ?? S, T = l(() => le(e, r), [e, r]), E = l(() => f(), []), D = l(() => E.columns(e.map((e) => {
630
- let t = e.accessor;
631
- return E.accessor(typeof t == "function" ? t : (e) => e[t], {
632
- id: e.id,
633
- header: () => e.header,
634
- cell: (t) => e.cell?.(t.row.original, t.getValue()) ?? String(t.getValue() ?? ""),
635
- enableSorting: !0,
636
- sortDescFirst: e.sortDescFirst
637
- });
638
- })), [e, E]), O = g({
639
- features: ce,
640
- columns: D,
631
+ }, le = (e, t) => typeof e == "function" ? e(t) : t[e], ue = (e) => {
632
+ if (e == null || e === "") return null;
633
+ let t = Date.parse(String(e));
634
+ return Number.isNaN(t) ? null : t;
635
+ }, de = (e, t, n) => {
636
+ let r = ue(e.getValue(n)), i = ue(t.getValue(n));
637
+ return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
638
+ }, fe = (e, t, n) => {
639
+ let r = e.getValue(n), i = t.getValue(n);
640
+ return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
641
+ }, pe = (e, t, n) => {
642
+ let r = e.getValue(n), i = t.getValue(n);
643
+ return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
644
+ }, me = (e, t, n) => {
645
+ let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
646
+ return r.localeCompare(i, void 0, {
647
+ numeric: !0,
648
+ sensitivity: "base"
649
+ });
650
+ }, he = (e) => {
651
+ switch (e) {
652
+ case "date": return de;
653
+ case "number": return fe;
654
+ case "boolean": return pe;
655
+ case "text": return me;
656
+ default: return;
657
+ }
658
+ }, ge = (e) => {
659
+ let t = (t) => le(e.accessor, t), n = e.sortFn ?? he(e.dataType), r = e.enableSorting ?? n !== void 0, i = {
660
+ id: e.id,
661
+ accessorFn: t,
662
+ header: () => e.header,
663
+ cell: (t) => {
664
+ let n = t.getValue();
665
+ return e.cell?.(t.row.original, n) ?? String(n ?? "");
666
+ },
667
+ enableSorting: r,
668
+ sortDescFirst: e.sortDescFirst
669
+ };
670
+ return n && (i.sortFn = n), i;
671
+ }, _e = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: f, ariaLabel: p, loading: m = !1, error: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "" }) => {
672
+ let [x, S] = d([]), C = o ?? x, w = l(() => ce(e, r), [e, r]), T = l(() => e.map(ge), [e]), E = h({
673
+ features: se,
674
+ columns: T,
641
675
  data: r,
642
- state: { sorting: w },
676
+ state: { sorting: C },
643
677
  onSortingChange: (e) => {
644
- let t = typeof e == "function" ? e(w) : e;
645
- o === void 0 && C(t), s?.(t);
678
+ let t = typeof e == "function" ? e(C) : e;
679
+ o === void 0 && S(t), s?.(t);
646
680
  },
647
681
  getRowId: u
648
- }), k = O.getRowModel().rows, A = e.map((e) => ({
682
+ }), D = E.getRowModel().rows, O = e.filter((e) => e.enableSorting ?? (e.dataType !== void 0 && e.dataType !== "custom")).map((e) => ({
649
683
  id: e.id,
650
684
  label: typeof e.header == "string" ? e.header : e.id
651
- })), j = [
685
+ })), k = [
652
686
  W.root,
653
687
  a === "wide" ? W.wide : W.default,
654
688
  i ? W.tableOnMobile : "",
655
- x
656
- ].filter(Boolean).join(" "), M = T ?? _;
689
+ b
690
+ ].filter(Boolean).join(" "), A = w ?? g;
657
691
  return /* @__PURE__ */ n("section", {
658
- className: j,
659
- "aria-busy": h,
692
+ className: k,
693
+ "aria-busy": m,
660
694
  children: [
661
- !i && !h && !M && k.length > 0 && /* @__PURE__ */ t(se, {
695
+ !i && !m && !A && D.length > 0 && O.length > 0 && /* @__PURE__ */ t(oe, {
662
696
  className: W.mobileSort,
663
- options: A,
664
- value: w[0] ? {
665
- id: w[0].id,
666
- direction: w[0].desc ? "desc" : "asc"
697
+ options: O,
698
+ value: C[0] ? {
699
+ id: C[0].id,
700
+ direction: C[0].desc ? "desc" : "asc"
667
701
  } : null,
668
- onChange: (e) => O.setSorting([{
702
+ onChange: (e) => E.setSorting([{
669
703
  id: e.id,
670
704
  desc: e.direction === "desc"
671
705
  }])
672
706
  }),
673
707
  /* @__PURE__ */ t("div", {
674
708
  className: W.tableWrap,
675
- style: { maxHeight: b },
709
+ style: { maxHeight: y },
676
710
  children: /* @__PURE__ */ n("table", {
677
711
  className: W.table,
678
- "aria-label": m,
712
+ "aria-label": p,
679
713
  children: [
680
- p && /* @__PURE__ */ t("caption", { children: p }),
714
+ f && /* @__PURE__ */ t("caption", { children: f }),
681
715
  /* @__PURE__ */ t("thead", {
682
- className: y ? W.sticky : "",
683
- children: O.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
684
- let r = e.column.getIsSorted();
716
+ className: v ? W.sticky : "",
717
+ children: E.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
718
+ let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
685
719
  return /* @__PURE__ */ t("th", {
686
720
  scope: "col",
687
721
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
688
722
  children: /* @__PURE__ */ n("button", {
689
723
  type: "button",
690
724
  className: W.sortButton,
691
- onClick: e.column.getToggleSortingHandler(),
692
- children: [/* @__PURE__ */ t(O.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
725
+ disabled: !i,
726
+ onClick: a,
727
+ children: [/* @__PURE__ */ t(E.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
693
728
  "aria-hidden": "true",
694
729
  children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
695
730
  })]
@@ -697,32 +732,32 @@ var T = {
697
732
  }, e.id);
698
733
  }) }, e.id))
699
734
  }),
700
- /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
735
+ /* @__PURE__ */ t("tbody", { children: m ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
701
736
  colSpan: e.length,
702
- children: /* @__PURE__ */ t(ie, { lines: 3 })
703
- }) }) : M ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
737
+ children: /* @__PURE__ */ t(re, { lines: 3 })
738
+ }) }) : A ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
704
739
  className: W.state,
705
740
  colSpan: e.length,
706
- children: M
707
- }) }) : k.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
741
+ children: A
742
+ }) }) : D.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
708
743
  className: W.state,
709
744
  colSpan: e.length,
710
- children: v
711
- }) }) : k.map((e) => /* @__PURE__ */ t("tr", { children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(O.FlexRender, { cell: e }) }, e.id)) }, e.id)) })
745
+ children: _
746
+ }) }) : D.map((e) => /* @__PURE__ */ t("tr", { children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(E.FlexRender, { cell: e }) }, e.id)) }, e.id)) })
712
747
  ]
713
748
  })
714
749
  }),
715
750
  !i && /* @__PURE__ */ t("div", {
716
751
  className: W.cards,
717
752
  role: "list",
718
- "aria-label": m ?? p,
719
- children: h ? /* @__PURE__ */ t(ie, { lines: 4 }) : M ? /* @__PURE__ */ t("div", {
753
+ "aria-label": p ?? f,
754
+ children: m ? /* @__PURE__ */ t(re, { lines: 4 }) : A ? /* @__PURE__ */ t("div", {
720
755
  className: W.state,
721
- children: M
722
- }) : k.length === 0 ? /* @__PURE__ */ t("div", {
756
+ children: A
757
+ }) : D.length === 0 ? /* @__PURE__ */ t("div", {
723
758
  className: W.state,
724
- children: v
725
- }) : k.map((r) => {
759
+ children: _
760
+ }) : D.map((r) => {
726
761
  if (c) return /* @__PURE__ */ t("div", {
727
762
  role: "listitem",
728
763
  children: c({
@@ -730,7 +765,7 @@ var T = {
730
765
  columns: e
731
766
  })
732
767
  }, r.id);
733
- let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => typeof e.accessor == "function" ? e.accessor(r.original) : r.original[e.accessor], s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
768
+ let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => le(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
734
769
  return /* @__PURE__ */ n("article", {
735
770
  role: "listitem",
736
771
  className: W.card,
@@ -747,7 +782,7 @@ var T = {
747
782
  })
748
783
  ]
749
784
  });
750
- }, de = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
785
+ }, ve = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
751
786
  let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = d(!1), w = u(null), T = u(null), E = u([]), D = l(() => e.filter((e) => r.includes(e.value)), [e, r]), O = D.map((e) => e.label).join(", "), k = m ? `${x}-hint` : void 0, A = p ? `${x}-error` : void 0;
752
787
  s(() => {
753
788
  let e = (e) => {
@@ -764,7 +799,7 @@ var T = {
764
799
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
765
800
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
766
801
  }, M = (t, n) => {
767
- let r = ae(e, t, n);
802
+ let r = ie(e, t, n);
768
803
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
769
804
  };
770
805
  return /* @__PURE__ */ n("div", {
@@ -865,7 +900,7 @@ var T = {
865
900
  })
866
901
  ]
867
902
  });
868
- }, fe = {
903
+ }, ye = {
869
904
  approve: "M4 12l5 5L20 6",
870
905
  reject: "M5 5l14 14M19 5L5 19",
871
906
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -874,7 +909,7 @@ var T = {
874
909
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
875
910
  info: "M12 10v7m0-10v.01",
876
911
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
877
- }, pe = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
912
+ }, be = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
878
913
  viewBox: "0 0 24 24",
879
914
  width: i,
880
915
  height: a,
@@ -887,14 +922,14 @@ var T = {
887
922
  "aria-hidden": !r || void 0,
888
923
  focusable: "false",
889
924
  ...o,
890
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: fe[e] })]
925
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: ye[e] })]
891
926
  }), G = {
892
- root: "_root_1897l_1",
893
- header: "_header_1897l_11",
894
- title: "_title_1897l_21",
895
- dismiss: "_dismiss_1897l_28",
896
- content: "_content_1897l_57"
897
- }, me = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
927
+ root: "_root_1y2s8_1",
928
+ header: "_header_1y2s8_21",
929
+ title: "_title_1y2s8_41",
930
+ dismiss: "_dismiss_1y2s8_55",
931
+ content: "_content_1y2s8_113"
932
+ }, xe = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
898
933
  let u = `ds-info-block-${c()}`;
899
934
  return /* @__PURE__ */ n("section", {
900
935
  className: `${G.root} ${l}`,
@@ -928,20 +963,20 @@ var T = {
928
963
  })]
929
964
  });
930
965
  }, K = {
931
- wrapper: "_wrapper_15bo7_1",
932
- control: "_control_15bo7_3",
933
- input: "_input_15bo7_5",
934
- disabledText: "_disabledText_15bo7_5",
935
- inputError: "_inputError_15bo7_11",
936
- trailingAction: "_trailingAction_15bo7_13"
937
- }, he = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: f = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, clearable: y = !0, required: b = !1, selectTextOnFocus: x = !1, isPassword: S = !1, passwordVisibleLabel: C = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...O }) => {
938
- let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = u(null), [M, N] = d(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, ee = S ? M ? "text" : "password" : i;
966
+ wrapper: "_wrapper_1tz82_1",
967
+ control: "_control_1tz82_3",
968
+ input: "_input_1tz82_5",
969
+ disabledText: "_disabledText_1tz82_5",
970
+ inputError: "_inputError_1tz82_11",
971
+ trailingAction: "_trailingAction_1tz82_13"
972
+ }, Se = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: f = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, clearable: y = !0, required: b = !1, selectTextOnFocus: x = !1, isPassword: S = !1, passwordVisibleLabel: C = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: D, ...O }) => {
973
+ let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = u(null), [M, N] = d(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, ee = String(e ?? ""), I = [P, F].filter(Boolean).join(" ") || void 0, te = S ? M ? "text" : "password" : i;
939
974
  return s(() => {
940
975
  S || N(!1);
941
976
  }, [S]), /* @__PURE__ */ n("div", {
942
977
  className: `${K.wrapper} ${g}`,
943
978
  children: [
944
- p && /* @__PURE__ */ t(E, {
979
+ p && /* @__PURE__ */ t(T, {
945
980
  htmlFor: A,
946
981
  required: b,
947
982
  disabled: o,
@@ -950,8 +985,8 @@ var T = {
950
985
  o && f ? /* @__PURE__ */ t("div", {
951
986
  id: A,
952
987
  className: K.disabledText,
953
- "aria-describedby": L,
954
- children: I || a
988
+ "aria-describedby": I,
989
+ children: ee || a
955
990
  }) : /* @__PURE__ */ n("div", {
956
991
  className: K.control,
957
992
  children: [
@@ -959,14 +994,14 @@ var T = {
959
994
  ref: j,
960
995
  id: A,
961
996
  name: _,
962
- type: ee,
963
- value: I,
997
+ type: te,
998
+ value: ee,
964
999
  placeholder: a,
965
1000
  disabled: o,
966
1001
  readOnly: l,
967
1002
  required: b,
968
1003
  "aria-invalid": !!m,
969
- "aria-describedby": L,
1004
+ "aria-describedby": I,
970
1005
  className: `${K.input} ${m ? K.inputError : ""}`,
971
1006
  onChange: (e) => {
972
1007
  if (i === "number" && !S) {
@@ -977,7 +1012,7 @@ var T = {
977
1012
  r?.(e.target.value, e);
978
1013
  },
979
1014
  onFocus: (e) => {
980
- x && e.currentTarget.value && e.currentTarget.select(), T?.(e);
1015
+ x && e.currentTarget.value && e.currentTarget.select(), D?.(e);
981
1016
  },
982
1017
  ...O
983
1018
  }),
@@ -1002,7 +1037,7 @@ var T = {
1002
1037
  })]
1003
1038
  })
1004
1039
  }),
1005
- !S && y && I && !o && !l && /* @__PURE__ */ t("button", {
1040
+ !S && y && ee && !o && !l && /* @__PURE__ */ t("button", {
1006
1041
  type: "button",
1007
1042
  className: K.trailingAction,
1008
1043
  "aria-label": "Очистить поле",
@@ -1014,11 +1049,11 @@ var T = {
1014
1049
  })
1015
1050
  ]
1016
1051
  }),
1017
- h && !m && /* @__PURE__ */ t(D, {
1052
+ h && !m && /* @__PURE__ */ t(E, {
1018
1053
  id: P,
1019
1054
  children: h
1020
1055
  }),
1021
- m && /* @__PURE__ */ t(D, {
1056
+ m && /* @__PURE__ */ t(E, {
1022
1057
  id: F,
1023
1058
  variant: "error",
1024
1059
  children: m
@@ -1026,13 +1061,13 @@ var T = {
1026
1061
  ]
1027
1062
  });
1028
1063
  }, q = {
1029
- wrapper: "_wrapper_8srjz_1",
1030
- input: "_input_8srjz_11",
1031
- switch: "_switch_8srjz_18",
1032
- thumb: "_thumb_8srjz_34",
1033
- label: "_label_8srjz_56",
1034
- disabled: "_disabled_8srjz_62"
1035
- }, ge = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1064
+ wrapper: "_wrapper_vu1ob_1",
1065
+ input: "_input_vu1ob_21",
1066
+ switch: "_switch_vu1ob_35",
1067
+ thumb: "_thumb_vu1ob_67",
1068
+ label: "_label_vu1ob_111",
1069
+ disabled: "_disabled_vu1ob_123"
1070
+ }, Ce = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1036
1071
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1037
1072
  return /* @__PURE__ */ n("label", {
1038
1073
  htmlFor: p,
@@ -1063,11 +1098,11 @@ var T = {
1063
1098
  })
1064
1099
  ]
1065
1100
  });
1066
- }, _e = {
1101
+ }, we = {
1067
1102
  root: "_root_kepgo_1",
1068
1103
  grid: "_grid_kepgo_3",
1069
1104
  actions: "_actions_kepgo_5"
1070
- }, ve = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1105
+ }, Te = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1071
1106
  let d = (e, t) => {
1072
1107
  let n = {
1073
1108
  ...r,
@@ -1076,11 +1111,11 @@ var T = {
1076
1111
  i?.(n, e), s === "instant" && a?.(n);
1077
1112
  };
1078
1113
  return /* @__PURE__ */ n("section", {
1079
- className: `${_e.root} ${u}`,
1114
+ className: `${we.root} ${u}`,
1080
1115
  "aria-label": "Фильтры",
1081
1116
  "aria-busy": c,
1082
1117
  children: [/* @__PURE__ */ t("div", {
1083
- className: _e.grid,
1118
+ className: we.grid,
1084
1119
  children: e.filter((e) => !e.hidden).map((e) => {
1085
1120
  let n = l || c || e.disabled, i = r[e.id];
1086
1121
  if (e.type === "input") {
@@ -1091,12 +1126,12 @@ var T = {
1091
1126
  placeholder: e.placeholder,
1092
1127
  disabled: n
1093
1128
  };
1094
- return e.inputType === "number" ? /* @__PURE__ */ t(he, {
1129
+ return e.inputType === "number" ? /* @__PURE__ */ t(Se, {
1095
1130
  ...r,
1096
1131
  type: "number",
1097
1132
  value: i ?? "",
1098
1133
  onChange: (t) => d(e.id, t)
1099
- }) : /* @__PURE__ */ t(he, {
1134
+ }) : /* @__PURE__ */ t(Se, {
1100
1135
  ...r,
1101
1136
  type: "text",
1102
1137
  value: String(i ?? ""),
@@ -1112,7 +1147,7 @@ var T = {
1112
1147
  disabled: n,
1113
1148
  onChange: (t) => d(e.id, t)
1114
1149
  }, e.id);
1115
- if (e.type === "multiple") return /* @__PURE__ */ t(de, {
1150
+ if (e.type === "multiple") return /* @__PURE__ */ t(ve, {
1116
1151
  label: e.label,
1117
1152
  hint: e.hint,
1118
1153
  placeholder: e.placeholder,
@@ -1121,14 +1156,14 @@ var T = {
1121
1156
  disabled: n,
1122
1157
  onChange: (t) => d(e.id, t)
1123
1158
  }, e.id);
1124
- if (e.type === "checkbox") return /* @__PURE__ */ t(k, {
1159
+ if (e.type === "checkbox") return /* @__PURE__ */ t(O, {
1125
1160
  label: e.label,
1126
1161
  hint: e.hint,
1127
1162
  checked: !!i,
1128
1163
  disabled: n,
1129
1164
  onChange: (t) => d(e.id, t)
1130
1165
  }, e.id);
1131
- if (e.type === "radio") return /* @__PURE__ */ t(ge, {
1166
+ if (e.type === "radio") return /* @__PURE__ */ t(Ce, {
1132
1167
  label: e.label,
1133
1168
  checked: !!i,
1134
1169
  disabled: n,
@@ -1138,7 +1173,7 @@ var T = {
1138
1173
  from: null,
1139
1174
  to: null
1140
1175
  };
1141
- return /* @__PURE__ */ t(re, {
1176
+ return /* @__PURE__ */ t(B, {
1142
1177
  hint: e.hint,
1143
1178
  mode: e.mode,
1144
1179
  min: e.min,
@@ -1149,13 +1184,13 @@ var T = {
1149
1184
  }, e.id);
1150
1185
  })
1151
1186
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1152
- className: _e.actions,
1153
- children: [o && /* @__PURE__ */ t(w, {
1187
+ className: we.actions,
1188
+ children: [o && /* @__PURE__ */ t(C, {
1154
1189
  variant: "destructiveOutline",
1155
1190
  disabled: l || c,
1156
1191
  onClick: o,
1157
1192
  children: "Сбросить"
1158
- }), s === "manual" && /* @__PURE__ */ t(w, {
1193
+ }), s === "manual" && /* @__PURE__ */ t(C, {
1159
1194
  isLoading: c,
1160
1195
  disabled: l,
1161
1196
  onClick: () => a?.(r),
@@ -1164,37 +1199,37 @@ var T = {
1164
1199
  })]
1165
1200
  });
1166
1201
  }, J = {
1167
- wrapper: "_wrapper_17rrt_1",
1168
- dropzone: "_dropzone_17rrt_2",
1169
- dragActive: "_dragActive_17rrt_3",
1170
- disabled: "_disabled_17rrt_4",
1171
- error: "_error_17rrt_5",
1172
- nativeInput: "_nativeInput_17rrt_6",
1173
- empty: "_empty_17rrt_7",
1174
- uploadIcon: "_uploadIcon_17rrt_8",
1175
- browseButton: "_browseButton_17rrt_9",
1176
- files: "_files_17rrt_10",
1177
- file: "_file_17rrt_10",
1178
- fileName: "_fileName_17rrt_12",
1179
- fileSize: "_fileSize_17rrt_13"
1180
- }, ye = (e) => `${e.name}:${e.size}:${e.lastModified}`, be = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, xe = (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), Se = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: f, 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 }) => {
1181
- let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, ee = (e) => {
1182
- let t = [], n = new Set(r.map(ye)), c = e.filter((e) => xe(e, o) ? s !== void 0 && e.size > s ? (t.push({
1202
+ wrapper: "_wrapper_1ymdr_1",
1203
+ dropzone: "_dropzone_1ymdr_3",
1204
+ dragActive: "_dragActive_1ymdr_5",
1205
+ disabled: "_disabled_1ymdr_7",
1206
+ error: "_error_1ymdr_9",
1207
+ nativeInput: "_nativeInput_1ymdr_11",
1208
+ empty: "_empty_1ymdr_13",
1209
+ uploadIcon: "_uploadIcon_1ymdr_15",
1210
+ browseButton: "_browseButton_1ymdr_17",
1211
+ files: "_files_1ymdr_19",
1212
+ file: "_file_1ymdr_19",
1213
+ fileName: "_fileName_1ymdr_23",
1214
+ fileSize: "_fileSize_1ymdr_25"
1215
+ }, Ee = (e) => `${e.name}:${e.size}:${e.lastModified}`, De = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Oe = (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: f, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: w = "Добавить ещё", onReject: D }) => {
1216
+ let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, ee = [P, F].filter(Boolean).join(" ") || void 0, I = !g && !_, te = (e) => {
1217
+ let t = [], n = new Set(r.map(Ee)), c = e.filter((e) => Oe(e, o) ? s !== void 0 && e.size > s ? (t.push({
1183
1218
  file: e,
1184
1219
  reason: "maxSize"
1185
- }), !1) : !n.has(ye(e)) && (n.add(ye(e)), !0) : (t.push({
1220
+ }), !1) : !n.has(Ee(e)) && (n.add(Ee(e)), !0) : (t.push({
1186
1221
  file: e,
1187
1222
  reason: "accept"
1188
1223
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
1189
1224
  u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
1190
1225
  file: e,
1191
1226
  reason: "maxFiles"
1192
- })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1227
+ })), d = d.slice(0, u)), t.length && D?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1193
1228
  };
1194
1229
  return /* @__PURE__ */ n("div", {
1195
1230
  className: `${J.wrapper} ${b}`,
1196
1231
  children: [
1197
- f && /* @__PURE__ */ t(E, {
1232
+ f && /* @__PURE__ */ t(T, {
1198
1233
  htmlFor: k,
1199
1234
  required: h,
1200
1235
  disabled: g,
@@ -1203,14 +1238,14 @@ var T = {
1203
1238
  /* @__PURE__ */ n("div", {
1204
1239
  className: `${J.dropzone} ${M ? J.dragActive : ""} ${g ? J.disabled : ""} ${m ? J.error : ""}`,
1205
1240
  onDragEnter: (e) => {
1206
- e.preventDefault(), L && ++j.current === 1 && N(!0);
1241
+ e.preventDefault(), I && ++j.current === 1 && N(!0);
1207
1242
  },
1208
1243
  onDragOver: (e) => e.preventDefault(),
1209
1244
  onDragLeave: (e) => {
1210
1245
  e.preventDefault(), --j.current <= 0 && (j.current = 0, N(!1));
1211
1246
  },
1212
1247
  onDrop: (e) => {
1213
- e.preventDefault(), j.current = 0, N(!1), L && ee(Array.from(e.dataTransfer.files));
1248
+ e.preventDefault(), j.current = 0, N(!1), I && te(Array.from(e.dataTransfer.files));
1214
1249
  },
1215
1250
  children: [/* @__PURE__ */ t("input", {
1216
1251
  ref: A,
@@ -1221,10 +1256,10 @@ var T = {
1221
1256
  multiple: a,
1222
1257
  accept: o,
1223
1258
  required: h && r.length === 0,
1224
- disabled: !L,
1225
- "aria-describedby": I,
1259
+ disabled: !I,
1260
+ "aria-describedby": ee,
1226
1261
  "aria-invalid": !!m,
1227
- onChange: (e) => ee(Array.from(e.target.files ?? []))
1262
+ onChange: (e) => te(Array.from(e.target.files ?? []))
1228
1263
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1229
1264
  /* @__PURE__ */ t("ul", {
1230
1265
  className: J.files,
@@ -1239,9 +1274,9 @@ var T = {
1239
1274
  }),
1240
1275
  /* @__PURE__ */ t("span", {
1241
1276
  className: J.fileSize,
1242
- children: be(e.size)
1277
+ children: De(e.size)
1243
1278
  }),
1244
- L && /* @__PURE__ */ t(w, {
1279
+ I && /* @__PURE__ */ t(C, {
1245
1280
  variant: "empty",
1246
1281
  size: "sm",
1247
1282
  "aria-label": `Удалить файл ${e.name}`,
@@ -1249,15 +1284,15 @@ var T = {
1249
1284
  children: "×"
1250
1285
  })
1251
1286
  ]
1252
- }, ye(e)))
1287
+ }, Ee(e)))
1253
1288
  }),
1254
- L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1289
+ I && (a || r.length === 0) && /* @__PURE__ */ t(C, {
1255
1290
  className: J.browseButton,
1256
1291
  size: "sm",
1257
1292
  onClick: () => A.current?.click(),
1258
- children: C
1293
+ children: w
1259
1294
  }),
1260
- L && !a && /* @__PURE__ */ t(w, {
1295
+ I && !a && /* @__PURE__ */ t(C, {
1261
1296
  className: J.browseButton,
1262
1297
  size: "sm",
1263
1298
  onClick: () => A.current?.click(),
@@ -1272,7 +1307,7 @@ var T = {
1272
1307
  children: "↑"
1273
1308
  }),
1274
1309
  /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1275
- !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1310
+ !M && I && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(C, {
1276
1311
  className: J.browseButton,
1277
1312
  onClick: () => A.current?.click(),
1278
1313
  children: S
@@ -1280,11 +1315,11 @@ var T = {
1280
1315
  ]
1281
1316
  })]
1282
1317
  }),
1283
- p && !m && /* @__PURE__ */ t(D, {
1318
+ p && !m && /* @__PURE__ */ t(E, {
1284
1319
  id: P,
1285
1320
  children: p
1286
1321
  }),
1287
- m && /* @__PURE__ */ t(D, {
1322
+ m && /* @__PURE__ */ t(E, {
1288
1323
  id: F,
1289
1324
  variant: "error",
1290
1325
  live: !0,
@@ -1292,11 +1327,11 @@ var T = {
1292
1327
  })
1293
1328
  ]
1294
1329
  });
1295
- }, Ce = 0, Y = v((e) => ({
1330
+ }, Ae = 0, Y = _((e) => ({
1296
1331
  modals: [],
1297
1332
  openModal: (t, n = {}, r = {}) => {
1298
- Ce += 1;
1299
- let i = `ds-modal-${Ce}`;
1333
+ Ae += 1;
1334
+ let i = `ds-modal-${Ae}`;
1300
1335
  return e((e) => ({ modals: [...e.modals, {
1301
1336
  id: i,
1302
1337
  name: t,
@@ -1308,19 +1343,19 @@ var T = {
1308
1343
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1309
1344
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1310
1345
  closeAllModals: () => e({ modals: [] })
1311
- })), we = () => Y.setState({ modals: [] }), X = {
1312
- layer: "_layer_bl99k_1",
1313
- backdrop: "_backdrop_bl99k_2",
1314
- panel: "_panel_bl99k_3",
1315
- header: "_header_bl99k_5",
1316
- title: "_title_bl99k_6",
1317
- description: "_description_bl99k_7",
1318
- content: "_content_bl99k_8"
1319
- }, Te = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ee = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1346
+ })), je = () => Y.setState({ modals: [] }), X = {
1347
+ layer: "_layer_1nb2z_1",
1348
+ backdrop: "_backdrop_1nb2z_3",
1349
+ panel: "_panel_1nb2z_5",
1350
+ header: "_header_1nb2z_9",
1351
+ title: "_title_1nb2z_11",
1352
+ description: "_description_1nb2z_13",
1353
+ content: "_content_1nb2z_15"
1354
+ }, Me = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ne = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1320
1355
  let f = c(), p = c(), m = u(null), h = Y((e) => e.closeModal);
1321
1356
  return s(() => {
1322
1357
  let e = document.activeElement, t = m.current;
1323
- return (t?.querySelector(Te) ?? t)?.focus(), () => e?.focus();
1358
+ return (t?.querySelector(Me) ?? t)?.focus(), () => e?.focus();
1324
1359
  }, []), /* @__PURE__ */ n("div", {
1325
1360
  ref: m,
1326
1361
  className: `${X.panel} ${l}`,
@@ -1331,7 +1366,7 @@ var T = {
1331
1366
  tabIndex: -1,
1332
1367
  onKeyDown: (e) => {
1333
1368
  if (e.key !== "Tab") return;
1334
- let t = Array.from(m.current?.querySelectorAll(Te) ?? []);
1369
+ let t = Array.from(m.current?.querySelectorAll(Me) ?? []);
1335
1370
  if (!t.length) {
1336
1371
  e.preventDefault();
1337
1372
  return;
@@ -1346,7 +1381,7 @@ var T = {
1346
1381
  id: f,
1347
1382
  className: X.title,
1348
1383
  children: r
1349
- }), /* @__PURE__ */ t(w, {
1384
+ }), /* @__PURE__ */ t(C, {
1350
1385
  variant: "empty",
1351
1386
  size: "sm",
1352
1387
  "aria-label": o,
@@ -1365,7 +1400,7 @@ var T = {
1365
1400
  })
1366
1401
  ]
1367
1402
  });
1368
- }, De = ({ registry: e }) => {
1403
+ }, Pe = ({ registry: e }) => {
1369
1404
  let n = Y((e) => e.modals), r = Y((e) => e.closeModal), i = Y((e) => e.closeAllModals);
1370
1405
  return s(() => {
1371
1406
  let e = (e) => {
@@ -1374,7 +1409,7 @@ var T = {
1374
1409
  t?.closeOnEscape && r(t.id);
1375
1410
  };
1376
1411
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1377
- }, [r]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
1412
+ }, [r]), !n.length || typeof document > "u" ? null : g(/* @__PURE__ */ t("div", {
1378
1413
  className: X.layer,
1379
1414
  "aria-label": "Модальные окна",
1380
1415
  children: n.map((a, o) => {
@@ -1394,7 +1429,7 @@ var T = {
1394
1429
  }, a.id) : null;
1395
1430
  })
1396
1431
  }), document.body);
1397
- }, Oe = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1432
+ }, Fe = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1398
1433
  let o = Y((e) => e.modals.length);
1399
1434
  return s(() => {
1400
1435
  if (!a || o === 0) return;
@@ -1402,68 +1437,68 @@ var T = {
1402
1437
  return document.body.style.overflow = "hidden", () => {
1403
1438
  document.body.style.overflow = e;
1404
1439
  };
1405
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(De, { registry: r })] });
1406
- }, ke = (e) => e, Ae = {
1407
- message: "_message_187g8_1",
1408
- actions: "_actions_187g8_2"
1409
- }, je = /* @__PURE__ */ new Map(), Me = 0, Ne = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1440
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Pe, { registry: r })] });
1441
+ }, Ie = (e) => e, Le = {
1442
+ message: "_message_1vtru_1",
1443
+ actions: "_actions_1vtru_3"
1444
+ }, Re = /* @__PURE__ */ new Map(), ze = 0, Be = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1410
1445
  let u = (e) => {
1411
- je.get(l)?.(e), je.delete(l), r();
1446
+ Re.get(l)?.(e), Re.delete(l), r();
1412
1447
  };
1413
- return /* @__PURE__ */ n(Ee, {
1448
+ return /* @__PURE__ */ n(Ne, {
1414
1449
  modalId: e,
1415
1450
  title: i,
1416
1451
  role: "alertdialog",
1417
1452
  children: [/* @__PURE__ */ t("p", {
1418
- className: Ae.message,
1453
+ className: Le.message,
1419
1454
  children: a
1420
1455
  }), /* @__PURE__ */ n("div", {
1421
- className: Ae.actions,
1422
- children: [/* @__PURE__ */ t(w, {
1456
+ className: Le.actions,
1457
+ children: [/* @__PURE__ */ t(C, {
1423
1458
  variant: "outline",
1424
1459
  onClick: () => u(!1),
1425
1460
  children: s
1426
- }), /* @__PURE__ */ t(w, {
1461
+ }), /* @__PURE__ */ t(C, {
1427
1462
  variant: c === "danger" ? "destructive" : "primary",
1428
1463
  onClick: () => u(!0),
1429
1464
  children: o
1430
1465
  })]
1431
1466
  })]
1432
1467
  });
1433
- }, Pe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ee, {
1468
+ }, Ve = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ne, {
1434
1469
  modalId: e,
1435
1470
  title: i,
1436
1471
  role: "alertdialog",
1437
1472
  children: [/* @__PURE__ */ t("p", {
1438
- className: Ae.message,
1473
+ className: Le.message,
1439
1474
  children: a
1440
1475
  }), /* @__PURE__ */ t("div", {
1441
- className: Ae.actions,
1442
- children: /* @__PURE__ */ t(w, {
1476
+ className: Le.actions,
1477
+ children: /* @__PURE__ */ t(C, {
1443
1478
  onClick: r,
1444
1479
  children: o
1445
1480
  })
1446
1481
  })]
1447
- }), Fe = ke({
1448
- ConfirmModal: Ne,
1449
- ErrorModal: Pe
1450
- }), Ie = () => {
1482
+ }), He = Ie({
1483
+ ConfirmModal: Be,
1484
+ ErrorModal: Ve
1485
+ }), Ue = () => {
1451
1486
  let e = Y((e) => e.openModal);
1452
1487
  return (t = {}) => new Promise((n) => {
1453
- Me += 1;
1454
- let r = `confirm-${Me}`;
1455
- je.set(r, n), e("ConfirmModal", {
1488
+ ze += 1;
1489
+ let r = `confirm-${ze}`;
1490
+ Re.set(r, n), e("ConfirmModal", {
1456
1491
  ...t,
1457
1492
  requestId: r
1458
1493
  }, { closeOnEscape: !1 });
1459
1494
  });
1460
- }, Le = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Re = () => {
1495
+ }, We = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ge = () => {
1461
1496
  let e = Y((e) => e.openModal);
1462
1497
  return { showError: (t, n) => e("ErrorModal", {
1463
1498
  title: n,
1464
- message: Le(t)
1499
+ message: We(t)
1465
1500
  }) };
1466
- }, ze = v(() => ({})), Be = v(() => ({})), Ve = () => {
1501
+ }, Ke = _(() => ({})), qe = _(() => ({})), Je = () => {
1467
1502
  let e = Y((e) => e.modals), t = Y((e) => e.openModal);
1468
1503
  return {
1469
1504
  openModal: (e, n = {}, r) => t(e, n, r),
@@ -1473,16 +1508,16 @@ var T = {
1473
1508
  isOpen: (t) => e.some((e) => e.name === t),
1474
1509
  count: e.length
1475
1510
  };
1476
- }, He = { root: "_root_1j70j_1" }, Ue = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1477
- className: `${He.root} ${r}`,
1511
+ }, Ye = { root: "_root_1x7h7_1" }, Xe = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1512
+ className: `${Ye.root} ${r}`,
1478
1513
  role: "status",
1479
1514
  "aria-label": e,
1480
- children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1481
- }), We = {
1482
- root: "_root_ig8lp_1",
1483
- legend: "_legend_ig8lp_2",
1484
- range: "_range_ig8lp_3"
1485
- }, Ge = [
1515
+ children: [/* @__PURE__ */ t(x, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1516
+ }), Ze = {
1517
+ root: "_root_elask_1",
1518
+ legend: "_legend_elask_3",
1519
+ range: "_range_elask_5"
1520
+ }, Qe = [
1486
1521
  {
1487
1522
  value: "1",
1488
1523
  label: "День"
@@ -1495,16 +1530,16 @@ var T = {
1495
1530
  value: "3",
1496
1531
  label: "Месяц"
1497
1532
  }
1498
- ], Ke = {
1533
+ ], $e = {
1499
1534
  day: 1,
1500
1535
  week: 2,
1501
1536
  month: 3
1502
- }, qe = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = Ge }) => /* @__PURE__ */ n("fieldset", {
1503
- className: `${We.root} ${u}`,
1537
+ }, et = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = Qe }) => /* @__PURE__ */ n("fieldset", {
1538
+ className: `${Ze.root} ${u}`,
1504
1539
  disabled: s,
1505
1540
  children: [
1506
1541
  i && /* @__PURE__ */ t("legend", {
1507
- className: We.legend,
1542
+ className: Ze.legend,
1508
1543
  children: i
1509
1544
  }),
1510
1545
  /* @__PURE__ */ t(U, {
@@ -1518,8 +1553,8 @@ var T = {
1518
1553
  label: "Тип периода"
1519
1554
  }),
1520
1555
  /* @__PURE__ */ n("div", {
1521
- className: We.range,
1522
- children: [/* @__PURE__ */ t(R, {
1556
+ className: Ze.range,
1557
+ children: [/* @__PURE__ */ t(L, {
1523
1558
  value: e.startDate,
1524
1559
  onChange: (t) => r?.({
1525
1560
  ...e,
@@ -1529,7 +1564,7 @@ var T = {
1529
1564
  min: c,
1530
1565
  max: l,
1531
1566
  disabled: s
1532
- }), /* @__PURE__ */ t(R, {
1567
+ }), /* @__PURE__ */ t(L, {
1533
1568
  value: e.endDate,
1534
1569
  onChange: (t) => r?.({
1535
1570
  ...e,
@@ -1541,26 +1576,26 @@ var T = {
1541
1576
  disabled: s
1542
1577
  })]
1543
1578
  }),
1544
- a && !o && /* @__PURE__ */ t(D, { children: a }),
1545
- o && /* @__PURE__ */ t(D, {
1579
+ a && !o && /* @__PURE__ */ t(E, { children: a }),
1580
+ o && /* @__PURE__ */ t(E, {
1546
1581
  variant: "error",
1547
1582
  children: o
1548
1583
  })
1549
1584
  ]
1550
1585
  }), Z = {
1551
- viewport: "_viewport_v7rog_1",
1552
- "top-right": "_top-right_v7rog_2",
1553
- "top-left": "_top-left_v7rog_3",
1554
- "bottom-right": "_bottom-right_v7rog_4",
1555
- "bottom-left": "_bottom-left_v7rog_5",
1556
- toast: "_toast_v7rog_6",
1557
- body: "_body_v7rog_7",
1558
- icon: "_icon_v7rog_8",
1559
- info: "_info_v7rog_9",
1560
- success: "_success_v7rog_10",
1561
- warning: "_warning_v7rog_11",
1562
- error: "_error_v7rog_12"
1563
- }, Je = ({ toast: e, onClose: r }) => {
1586
+ viewport: "_viewport_15mi5_1",
1587
+ "top-right": "_top-right_15mi5_3",
1588
+ "top-left": "_top-left_15mi5_5",
1589
+ "bottom-right": "_bottom-right_15mi5_7",
1590
+ "bottom-left": "_bottom-left_15mi5_9",
1591
+ toast: "_toast_15mi5_11",
1592
+ body: "_body_15mi5_13",
1593
+ icon: "_icon_15mi5_15",
1594
+ info: "_info_15mi5_17",
1595
+ success: "_success_15mi5_19",
1596
+ warning: "_warning_15mi5_21",
1597
+ error: "_error_15mi5_23"
1598
+ }, tt = ({ toast: e, onClose: r }) => {
1564
1599
  let [i, a] = d(!1), o = u(e.duration), c = u(Date.now());
1565
1600
  return s(() => {
1566
1601
  if (i || e.duration <= 0) return;
@@ -1583,7 +1618,7 @@ var T = {
1583
1618
  onFocus: () => a(!0),
1584
1619
  onBlur: () => a(!1),
1585
1620
  children: [
1586
- /* @__PURE__ */ t(pe, {
1621
+ /* @__PURE__ */ t(be, {
1587
1622
  name: e.variant === "warning" ? "warning" : "info",
1588
1623
  className: Z.icon
1589
1624
  }),
@@ -1592,7 +1627,7 @@ var T = {
1592
1627
  children: [
1593
1628
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1594
1629
  /* @__PURE__ */ t("div", { children: e.message }),
1595
- e.action && /* @__PURE__ */ t(w, {
1630
+ e.action && /* @__PURE__ */ t(C, {
1596
1631
  variant: "empty",
1597
1632
  size: "sm",
1598
1633
  onClick: () => {
@@ -1602,7 +1637,7 @@ var T = {
1602
1637
  })
1603
1638
  ]
1604
1639
  }),
1605
- e.closable && /* @__PURE__ */ t(w, {
1640
+ e.closable && /* @__PURE__ */ t(C, {
1606
1641
  variant: "empty",
1607
1642
  size: "sm",
1608
1643
  "aria-label": "Закрыть уведомление",
@@ -1611,11 +1646,11 @@ var T = {
1611
1646
  })
1612
1647
  ]
1613
1648
  });
1614
- }, Ye = 0, Q = v((e) => ({
1649
+ }, nt = 0, Q = _((e) => ({
1615
1650
  toasts: [],
1616
1651
  showToast: (t) => {
1617
- Ye += 1;
1618
- let n = `ds-toast-${Ye}`;
1652
+ nt += 1;
1653
+ let n = `ds-toast-${nt}`;
1619
1654
  return e((e) => ({ toasts: [...e.toasts, {
1620
1655
  variant: "info",
1621
1656
  duration: 5e3,
@@ -1626,17 +1661,17 @@ var T = {
1626
1661
  },
1627
1662
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1628
1663
  clearToasts: () => e({ toasts: [] })
1629
- })), Xe = () => Q.setState({ toasts: [] }), Ze = ({ position: e = "top-right" }) => {
1664
+ })), rt = () => Q.setState({ toasts: [] }), it = ({ position: e = "top-right" }) => {
1630
1665
  let n = Q((e) => e.toasts), r = Q((e) => e.removeToast);
1631
1666
  return /* @__PURE__ */ t("div", {
1632
1667
  className: `${Z.viewport} ${Z[e]}`,
1633
1668
  "aria-label": "Уведомления",
1634
- children: n.map((e) => /* @__PURE__ */ t(Je, {
1669
+ children: n.map((e) => /* @__PURE__ */ t(tt, {
1635
1670
  toast: e,
1636
1671
  onClose: r
1637
1672
  }, e.id))
1638
1673
  });
1639
- }, Qe = () => {
1674
+ }, at = () => {
1640
1675
  let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = o((t) => e({
1641
1676
  ...t,
1642
1677
  variant: "info"
@@ -1667,15 +1702,15 @@ var T = {
1667
1702
  i,
1668
1703
  a
1669
1704
  ]);
1670
- }, $e = {
1671
- root: "_root_2bxal_1",
1672
- tooltip: "_tooltip_2bxal_2",
1673
- "ds-tooltip-in": "_ds-tooltip-in_2bxal_1",
1674
- top: "_top_2bxal_3",
1675
- bottom: "_bottom_2bxal_4",
1676
- left: "_left_2bxal_5",
1677
- right: "_right_2bxal_6"
1678
- }, et = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1705
+ }, ot = {
1706
+ root: "_root_s9o0g_1",
1707
+ tooltip: "_tooltip_s9o0g_3",
1708
+ "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
1709
+ top: "_top_s9o0g_5",
1710
+ bottom: "_bottom_s9o0g_7",
1711
+ left: "_left_s9o0g_9",
1712
+ right: "_right_s9o0g_11"
1713
+ }, st = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1679
1714
  let h = c(), [g, _] = d(!1), v = u(null), y = () => {
1680
1715
  f || !e || (v.current = setTimeout(() => _(!0), l));
1681
1716
  }, b = () => {
@@ -1697,24 +1732,24 @@ var T = {
1697
1732
  onBlur: b
1698
1733
  });
1699
1734
  return /* @__PURE__ */ n("span", {
1700
- className: `${$e.root} ${m}`,
1735
+ className: `${ot.root} ${m}`,
1701
1736
  onPointerDown: g ? b : y,
1702
1737
  children: [x, g && /* @__PURE__ */ t("span", {
1703
1738
  id: h,
1704
1739
  role: "tooltip",
1705
- className: `${$e.tooltip} ${$e[o]}`,
1740
+ className: `${ot.tooltip} ${ot[o]}`,
1706
1741
  style: { maxWidth: p },
1707
1742
  children: e
1708
1743
  })]
1709
1744
  });
1710
1745
  }, $ = {
1711
- root: "_root_tgni1_1",
1712
- frame: "_frame_tgni1_2",
1713
- video: "_video_tgni1_3",
1714
- overlay: "_overlay_tgni1_4",
1715
- error: "_error_tgni1_4",
1716
- caption: "_caption_tgni1_7"
1717
- }, tt = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1746
+ root: "_root_1ue3g_1",
1747
+ frame: "_frame_1ue3g_3",
1748
+ video: "_video_1ue3g_5",
1749
+ overlay: "_overlay_1ue3g_7",
1750
+ error: "_error_1ue3g_7",
1751
+ caption: "_caption_1ue3g_13"
1752
+ }, ct = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1718
1753
  let [h, g] = d(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1719
1754
  return /* @__PURE__ */ n("figure", {
1720
1755
  className: `${$.root} ${u}`,
@@ -1736,7 +1771,7 @@ var T = {
1736
1771
  }),
1737
1772
  s && /* @__PURE__ */ t("div", {
1738
1773
  className: $.overlay,
1739
- children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
1774
+ children: /* @__PURE__ */ t(x, { label: "Загрузка видео" })
1740
1775
  }),
1741
1776
  (_ || e.length === 0) && /* @__PURE__ */ t("div", {
1742
1777
  className: $.error,
@@ -1751,4 +1786,4 @@ var T = {
1751
1786
  });
1752
1787
  };
1753
1788
  //#endregion
1754
- export { Ne as ConfirmModal, b as DSBadge, w as DSButton, k as DSCheckbox, ue as DSDataTable, re as DSDateRange, R as DSDateTimePicker, U as DSDropDown, de as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Se as DSFileInput, ve as DSFilters, pe as DSIcon, me as DSInfoBlock, he as DSInput, S as DSLoader, De as DSModal, Ee as DSModalFrame, Ue as DSPageLoader, ge as DSRadioButton, ie as DSSkeleton, se as DSSort, qe as DSTimePeriodPicker, Je as DSToast, Ze as DSToastProvider, et as DSTooltip, tt as DSVideoPlayerFrame, Ke as DS_PERIOD_TYPE_CODES, Pe as ErrorModal, Oe as ModalSystemProvider, Fe as builtInModalRegistry, ke as defineModalRegistry, F as formatDateTimeLocalValue, Le as getErrorMessage, ae as getNextEnabledOptionIndex, B as isValidDateRange, I as parseDateTimeLocalValue, we as resetModalStore, Xe as resetToastStore, Ie as useConfirmModal, ze as useConfirmModalStore, Re as useErrorModal, Be as useErrorModalStore, Ve as useModals, Y as useModalsStore, Qe as useToast, Q as useToastStore, le as validateDSDataTableData };
1789
+ export { Be as ConfirmModal, y as DSBadge, C as DSButton, O as DSCheckbox, _e as DSDataTable, B as DSDateRange, L as DSDateTimePicker, U as DSDropDown, ve as DSDropDownMultiple, T as DSFieldLabel, E as DSFieldMessage, ke as DSFileInput, Te as DSFilters, be as DSIcon, xe as DSInfoBlock, Se as DSInput, x as DSLoader, Pe as DSModal, Ne as DSModalFrame, Xe as DSPageLoader, Ce as DSRadioButton, re as DSSkeleton, oe as DSSort, et as DSTimePeriodPicker, tt as DSToast, it as DSToastProvider, st as DSTooltip, ct as DSVideoPlayerFrame, $e as DS_PERIOD_TYPE_CODES, Ve as ErrorModal, Fe as ModalSystemProvider, He as builtInModalRegistry, Ie as defineModalRegistry, P as formatDateTimeLocalValue, We as getErrorMessage, ie as getNextEnabledOptionIndex, z as isValidDateRange, F as parseDateTimeLocalValue, je as resetModalStore, rt as resetToastStore, Ue as useConfirmModal, Ke as useConfirmModalStore, Ge as useErrorModal, qe as useErrorModalStore, Je as useModals, Y as useModalsStore, at as useToast, Q as useToastStore, ce as validateDSDataTableData };