@efficiency-point/design-system 0.1.38 → 0.1.40

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
@@ -15,7 +15,7 @@ var C = {
15
15
  dot: "_dot_1erxk_109",
16
16
  icon: "_icon_1erxk_125",
17
17
  label: "_label_1erxk_135"
18
- }, w = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
18
+ }, ee = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
19
  className: `${C.badge} ${C[r]} ${C[i]} ${s}`,
20
20
  children: [
21
21
  a && /* @__PURE__ */ t("span", {
@@ -32,7 +32,7 @@ var C = {
32
32
  children: e
33
33
  })
34
34
  ]
35
- }), T = {
35
+ }), w = {
36
36
  badge: "_badge_2qg9z_1",
37
37
  sm: "_sm_2qg9z_25",
38
38
  md: "_md_2qg9z_37",
@@ -41,18 +41,18 @@ var C = {
41
41
  success: "_success_2qg9z_75",
42
42
  warning: "_warning_2qg9z_87",
43
43
  error: "_error_2qg9z_99"
44
- }, E = (e, t = 99) => {
44
+ }, T = (e, t = 99) => {
45
45
  let n = Math.max(0, Math.floor(e)), r = Math.max(0, Math.floor(t));
46
46
  return n > r ? `${r}+` : String(n);
47
- }, D = ({ value: e, max: n = 99, label: r = "уведомлений", variant: i = "error", size: a = "sm", className: o = "", "aria-label": s, ...c }) => {
47
+ }, E = ({ value: e, max: n = 99, label: r = "уведомлений", variant: i = "error", size: a = "sm", className: o = "", "aria-label": s, ...c }) => {
48
48
  let l = Math.max(0, Math.floor(e));
49
49
  return /* @__PURE__ */ t("span", {
50
50
  ...c,
51
- className: `${T.badge} ${T[i]} ${T[a]} ${o}`,
51
+ className: `${w.badge} ${w[i]} ${w[a]} ${o}`,
52
52
  "aria-label": s ?? `${l} ${r}`,
53
- children: E(l, n)
53
+ children: T(l, n)
54
54
  });
55
- }, O = {
55
+ }, D = {
56
56
  container: "_container_1jyk1_1",
57
57
  inner: "_inner_1jyk1_21",
58
58
  line: "_line_1jyk1_39",
@@ -64,18 +64,18 @@ var C = {
64
64
  destructive: "_destructive_1jyk1_97",
65
65
  destructiveOutline: "_destructiveOutline_1jyk1_105",
66
66
  grow: "_grow_1jyk1_1"
67
- }, k = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
68
- className: `${O.container} ${O[e]}`,
67
+ }, O = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
68
+ className: `${D.container} ${D[e]}`,
69
69
  children: /* @__PURE__ */ n("div", {
70
- className: `${O.inner} ${O[e]}`,
70
+ className: `${D.inner} ${D[e]}`,
71
71
  children: [
72
- /* @__PURE__ */ t("div", { className: `${O.line} ${O[e]}` }),
73
- /* @__PURE__ */ t("div", { className: `${O.line} ${O[e]}` }),
74
- /* @__PURE__ */ t("div", { className: `${O.line} ${O[e]}` }),
75
- /* @__PURE__ */ t("div", { className: `${O.line} ${O[e]}` })
72
+ /* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
73
+ /* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
74
+ /* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
75
+ /* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` })
76
76
  ]
77
77
  })
78
- }), A = {
78
+ }), k = {
79
79
  button: "_button_8341b_1",
80
80
  sm: "_sm_8341b_59",
81
81
  md: "_md_8341b_73",
@@ -87,17 +87,17 @@ var C = {
87
87
  empty: "_empty_8341b_157",
88
88
  destructive: "_destructive_8341b_171",
89
89
  destructiveOutline: "_destructiveOutline_8341b_183"
90
- }, j = s(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
90
+ }, A = s(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
91
91
  ref: l,
92
- className: `${A.button} ${A[n]} ${A[r]} ${s}`,
92
+ className: `${k.button} ${k[n]} ${k[r]} ${s}`,
93
93
  disabled: a || i,
94
94
  "aria-busy": i || void 0,
95
95
  ...c,
96
96
  type: o,
97
- children: i ? /* @__PURE__ */ t(k, { variant: n }) : e
97
+ children: i ? /* @__PURE__ */ t(O, { variant: n }) : e
98
98
  }));
99
- j.displayName = "DSButton";
100
- var M = {
99
+ A.displayName = "DSButton";
100
+ var j = {
101
101
  label: "_label_1o819_1",
102
102
  required: "_required_1o819_23",
103
103
  error: "_error_1o819_25",
@@ -106,28 +106,28 @@ var M = {
106
106
  disabled: "_disabled_1o819_47",
107
107
  message: "_message_1o819_55",
108
108
  success: "_success_1o819_71"
109
- }, ee = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
110
- className: `${M.label} ${a ? M.disabled : ""} ${o}`,
109
+ }, te = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
110
+ className: `${j.label} ${a ? j.disabled : ""} ${o}`,
111
111
  ...s,
112
112
  children: [
113
113
  /* @__PURE__ */ t("span", { children: e }),
114
114
  r && /* @__PURE__ */ t("span", {
115
- className: M.required,
115
+ className: j.required,
116
116
  "aria-hidden": "true",
117
117
  children: "*"
118
118
  }),
119
119
  i && /* @__PURE__ */ t("span", {
120
- className: M.optional,
120
+ className: j.optional,
121
121
  children: i
122
122
  })
123
123
  ]
124
- }), N = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
124
+ }), M = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
125
125
  id: r,
126
- className: `${M.message} ${M[n]} ${a}`,
126
+ className: `${j.message} ${j[n]} ${a}`,
127
127
  role: i && n === "error" ? "alert" : void 0,
128
128
  "aria-live": i && n !== "error" ? "polite" : void 0,
129
129
  children: e
130
- }), P = ({ width: e = 24, height: r = 24, color: i, title: a, style: o, children: s, ...c }) => /* @__PURE__ */ n("svg", {
130
+ }), N = ({ width: e = 24, height: r = 24, color: i, title: a, style: o, children: s, ...c }) => /* @__PURE__ */ n("svg", {
131
131
  xmlns: "http://www.w3.org/2000/svg",
132
132
  viewBox: "0 0 24 24",
133
133
  width: e,
@@ -146,61 +146,61 @@ var M = {
146
146
  } : o,
147
147
  ...c,
148
148
  children: [a && /* @__PURE__ */ t("title", { children: a }), s]
149
- }), F = (e) => /* @__PURE__ */ t(P, {
149
+ }), P = (e) => /* @__PURE__ */ t(N, {
150
150
  ...e,
151
151
  children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
152
- }), I = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(P, {
152
+ }), F = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(N, {
153
153
  strokeWidth: e,
154
154
  ...r,
155
155
  children: [/* @__PURE__ */ t("path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }), /* @__PURE__ */ t("path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4M12 4v6M2 18h20M5 18v2M19 18v2" })]
156
- }), L = (e) => /* @__PURE__ */ t(P, {
156
+ }), I = (e) => /* @__PURE__ */ t(N, {
157
157
  ...e,
158
158
  children: /* @__PURE__ */ t("path", { d: "m5 12 4 4L19 6" })
159
- }), R = (e) => /* @__PURE__ */ t(P, {
159
+ }), L = (e) => /* @__PURE__ */ t(N, {
160
160
  viewBox: "0 0 20 20",
161
161
  ...e,
162
162
  children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
163
- }), z = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
163
+ }), R = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(N, {
164
164
  strokeWidth: e,
165
165
  ...n,
166
166
  children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
167
- }), B = (e) => /* @__PURE__ */ t(P, {
167
+ }), z = (e) => /* @__PURE__ */ t(N, {
168
168
  ...e,
169
169
  children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
170
- }), te = (e) => /* @__PURE__ */ n(P, {
170
+ }), B = (e) => /* @__PURE__ */ n(N, {
171
171
  ...e,
172
172
  children: [/* @__PURE__ */ t("circle", {
173
173
  cx: "12",
174
174
  cy: "12",
175
175
  r: "10"
176
176
  }), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
177
- }), V = (e) => /* @__PURE__ */ n(P, {
177
+ }), V = (e) => /* @__PURE__ */ n(N, {
178
178
  ...e,
179
179
  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", {
180
180
  cx: "12",
181
181
  cy: "12",
182
182
  r: "2.5"
183
183
  })]
184
- }), H = (e) => /* @__PURE__ */ t(P, {
184
+ }), H = (e) => /* @__PURE__ */ t(N, {
185
185
  ...e,
186
186
  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" })
187
- }), U = (e) => /* @__PURE__ */ t(P, {
187
+ }), ne = (e) => /* @__PURE__ */ t(N, {
188
188
  ...e,
189
189
  children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
190
- }), ne = (e) => /* @__PURE__ */ n(P, {
190
+ }), re = (e) => /* @__PURE__ */ n(N, {
191
191
  ...e,
192
192
  children: [/* @__PURE__ */ t("circle", {
193
193
  cx: "12",
194
194
  cy: "12",
195
195
  r: "10"
196
196
  }), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
197
- }), re = (e) => /* @__PURE__ */ t(P, {
197
+ }), ie = (e) => /* @__PURE__ */ t(N, {
198
198
  ...e,
199
199
  children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
200
- }), W = (e) => /* @__PURE__ */ t(P, {
200
+ }), ae = (e) => /* @__PURE__ */ t(N, {
201
201
  ...e,
202
202
  children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
203
- }), ie = (e) => /* @__PURE__ */ n(P, {
203
+ }), oe = (e) => /* @__PURE__ */ n(N, {
204
204
  ...e,
205
205
  children: [/* @__PURE__ */ t("rect", {
206
206
  width: "18",
@@ -209,135 +209,135 @@ var M = {
209
209
  y: "3",
210
210
  rx: "2"
211
211
  }), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
212
- }), ae = (e) => /* @__PURE__ */ t(P, {
212
+ }), se = (e) => /* @__PURE__ */ t(N, {
213
213
  ...e,
214
214
  children: /* @__PURE__ */ t("path", {
215
215
  d: "M8 5v14M16 5v14",
216
216
  strokeWidth: "3"
217
217
  })
218
- }), oe = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
218
+ }), ce = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(N, {
219
219
  strokeWidth: e,
220
220
  ...n,
221
221
  children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
222
- }), se = (e) => /* @__PURE__ */ t(P, {
222
+ }), le = (e) => /* @__PURE__ */ t(N, {
223
223
  ...e,
224
224
  children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
225
- }), G = (e) => /* @__PURE__ */ t(P, {
225
+ }), ue = (e) => /* @__PURE__ */ t(N, {
226
226
  ...e,
227
227
  children: /* @__PURE__ */ t("path", {
228
228
  d: "m8 5 11 7-11 7V5Z",
229
229
  fill: "currentColor",
230
230
  stroke: "none"
231
231
  })
232
- }), K = (e) => /* @__PURE__ */ t(P, {
232
+ }), U = (e) => /* @__PURE__ */ t(N, {
233
233
  ...e,
234
234
  children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
235
- }), ce = (e) => /* @__PURE__ */ t(P, {
235
+ }), de = (e) => /* @__PURE__ */ t(N, {
236
236
  ...e,
237
237
  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" })
238
- }), le = (e) => /* @__PURE__ */ t(P, {
238
+ }), fe = (e) => /* @__PURE__ */ t(N, {
239
239
  ...e,
240
240
  children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
241
- }), ue = (e) => /* @__PURE__ */ t(P, {
241
+ }), pe = (e) => /* @__PURE__ */ t(N, {
242
242
  ...e,
243
243
  children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
244
- }), de = (e) => /* @__PURE__ */ t(P, {
244
+ }), W = (e) => /* @__PURE__ */ t(N, {
245
245
  ...e,
246
246
  children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
247
- }), fe = (e) => /* @__PURE__ */ t(P, {
247
+ }), me = (e) => /* @__PURE__ */ t(N, {
248
248
  ...e,
249
249
  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" })
250
- }), pe = (e) => /* @__PURE__ */ t(P, {
250
+ }), he = (e) => /* @__PURE__ */ t(N, {
251
251
  ...e,
252
252
  children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
253
- }), me = (e) => /* @__PURE__ */ t(P, {
253
+ }), ge = (e) => /* @__PURE__ */ t(N, {
254
254
  ...e,
255
255
  children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
256
- }), he = (e) => /* @__PURE__ */ t(P, {
256
+ }), _e = (e) => /* @__PURE__ */ t(N, {
257
257
  ...e,
258
258
  children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
259
- }), ge = (e) => /* @__PURE__ */ t(P, {
259
+ }), ve = (e) => /* @__PURE__ */ t(N, {
260
260
  ...e,
261
261
  children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
262
- }), _e = (e) => /* @__PURE__ */ n(P, {
262
+ }), ye = (e) => /* @__PURE__ */ n(N, {
263
263
  ...e,
264
264
  children: [/* @__PURE__ */ t("circle", {
265
265
  cx: "12",
266
266
  cy: "12",
267
267
  r: "10"
268
268
  }), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
269
- }), ve = (e) => /* @__PURE__ */ t(P, {
269
+ }), be = (e) => /* @__PURE__ */ t(N, {
270
270
  ...e,
271
271
  children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
272
- }), ye = (e) => /* @__PURE__ */ n(P, {
272
+ }), xe = (e) => /* @__PURE__ */ n(N, {
273
273
  ...e,
274
274
  children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
275
- }), q = (e) => (n) => /* @__PURE__ */ t(P, {
275
+ }), G = (e) => (n) => /* @__PURE__ */ t(N, {
276
276
  ...n,
277
277
  children: e.map(([e, t], n) => o(e, {
278
278
  ...t,
279
279
  key: t.key ?? `${e}-${n}`
280
280
  }))
281
- }), be = {
282
- IconActivity: q([["path", {
281
+ }), Se = {
282
+ IconActivity: G([["path", {
283
283
  d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
284
284
  key: "169zse"
285
285
  }]]),
286
- IconAlertTriangle: q([
286
+ IconAlertTriangle: G([
287
287
  ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
288
288
  ["path", { d: "M12 9v4" }],
289
289
  ["path", { d: "M12 17h.01" }]
290
290
  ]),
291
- IconArrowDown: q([["path", {
291
+ IconArrowDown: G([["path", {
292
292
  d: "M12 5v14",
293
293
  key: "s699le"
294
294
  }], ["path", {
295
295
  d: "m19 12-7 7-7-7",
296
296
  key: "1idqje"
297
297
  }]]),
298
- IconArrowLeft: q([["path", {
298
+ IconArrowLeft: G([["path", {
299
299
  d: "m12 19-7-7 7-7",
300
300
  key: "1l729n"
301
301
  }], ["path", {
302
302
  d: "M19 12H5",
303
303
  key: "x3x0zl"
304
304
  }]]),
305
- IconArrowRight: q([["path", {
305
+ IconArrowRight: G([["path", {
306
306
  d: "M5 12h14",
307
307
  key: "1ays0h"
308
308
  }], ["path", {
309
309
  d: "m12 5 7 7-7 7",
310
310
  key: "xquz4c"
311
311
  }]]),
312
- IconArrowUp: q([["path", {
312
+ IconArrowUp: G([["path", {
313
313
  d: "m5 12 7-7 7 7",
314
314
  key: "hav0vg"
315
315
  }], ["path", {
316
316
  d: "M12 19V5",
317
317
  key: "x0mq9r"
318
318
  }]]),
319
- IconArrowUpRight: q([["path", {
319
+ IconArrowUpRight: G([["path", {
320
320
  d: "M7 7h10v10",
321
321
  key: "1tivn9"
322
322
  }], ["path", {
323
323
  d: "M7 17 17 7",
324
324
  key: "1vkiza"
325
325
  }]]),
326
- IconBarChart3: q([
326
+ IconBarChart3: G([
327
327
  ["path", { d: "M3 3v18h18" }],
328
328
  ["path", { d: "M18 17V9" }],
329
329
  ["path", { d: "M13 17V5" }],
330
330
  ["path", { d: "M8 17v-3" }]
331
331
  ]),
332
- IconBedDouble: I,
333
- IconBell: q([["path", {
332
+ IconBedDouble: F,
333
+ IconBell: G([["path", {
334
334
  d: "M10.268 21a2 2 0 0 0 3.464 0",
335
335
  key: "vwvbt9"
336
336
  }], ["path", {
337
337
  d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
338
338
  key: "11g9vi"
339
339
  }]]),
340
- IconBoxes: q([
340
+ IconBoxes: G([
341
341
  ["path", {
342
342
  d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
343
343
  key: "lc1i9w"
@@ -387,7 +387,7 @@ var M = {
387
387
  key: "1io7kd"
388
388
  }]
389
389
  ]),
390
- IconBuilding2: q([
390
+ IconBuilding2: G([
391
391
  ["path", {
392
392
  d: "M10 12h4",
393
393
  key: "a56b0p"
@@ -409,7 +409,7 @@ var M = {
409
409
  key: "16ra0t"
410
410
  }]
411
411
  ]),
412
- IconCamera: q([["path", {
412
+ IconCamera: G([["path", {
413
413
  d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
414
414
  key: "18u6gg"
415
415
  }], ["circle", {
@@ -418,7 +418,7 @@ var M = {
418
418
  r: "3",
419
419
  key: "1vg3eu"
420
420
  }]]),
421
- IconChartNoAxesCombined: q([
421
+ IconChartNoAxesCombined: G([
422
422
  ["path", {
423
423
  d: "M12 16v5",
424
424
  key: "zza2cw"
@@ -444,11 +444,11 @@ var M = {
444
444
  key: "1t2idw"
445
445
  }]
446
446
  ]),
447
- IconChevronRight: q([["path", {
447
+ IconChevronRight: G([["path", {
448
448
  d: "m9 18 6-6-6-6",
449
449
  key: "mthhwq"
450
450
  }]]),
451
- IconCircleAlert: q([
451
+ IconCircleAlert: G([
452
452
  ["circle", {
453
453
  cx: "12",
454
454
  cy: "12",
@@ -470,7 +470,7 @@ var M = {
470
470
  key: "4dfq90"
471
471
  }]
472
472
  ]),
473
- IconClock3: q([["circle", {
473
+ IconClock3: G([["circle", {
474
474
  cx: "12",
475
475
  cy: "12",
476
476
  r: "10",
@@ -479,7 +479,7 @@ var M = {
479
479
  d: "M12 6v6h4",
480
480
  key: "135r8i"
481
481
  }]]),
482
- IconDownload: q([
482
+ IconDownload: G([
483
483
  ["path", {
484
484
  d: "M12 15V3",
485
485
  key: "m9g1x1"
@@ -493,7 +493,7 @@ var M = {
493
493
  key: "brsn70"
494
494
  }]
495
495
  ]),
496
- IconExternalLink: q([
496
+ IconExternalLink: G([
497
497
  ["path", {
498
498
  d: "M15 3h6v6",
499
499
  key: "1q9fwt"
@@ -507,7 +507,7 @@ var M = {
507
507
  key: "a6xqqp"
508
508
  }]
509
509
  ]),
510
- IconFactory: q([
510
+ IconFactory: G([
511
511
  ["path", {
512
512
  d: "M12 16h.01",
513
513
  key: "1drbdi"
@@ -525,14 +525,14 @@ var M = {
525
525
  key: "18s6g9"
526
526
  }]
527
527
  ]),
528
- IconGauge: q([["path", {
528
+ IconGauge: G([["path", {
529
529
  d: "m12 14 4-4",
530
530
  key: "9kzdfg"
531
531
  }], ["path", {
532
532
  d: "M3.34 19a10 10 0 1 1 17.32 0",
533
533
  key: "19p75a"
534
534
  }]]),
535
- IconGripVertical: q([
535
+ IconGripVertical: G([
536
536
  ["circle", {
537
537
  cx: "9",
538
538
  cy: "12",
@@ -570,7 +570,7 @@ var M = {
570
570
  key: "f4zoj3"
571
571
  }]
572
572
  ]),
573
- IconLayoutDashboard: q([
573
+ IconLayoutDashboard: G([
574
574
  ["rect", {
575
575
  width: "7",
576
576
  height: "9",
@@ -604,7 +604,7 @@ var M = {
604
604
  key: "ldoo1y"
605
605
  }]
606
606
  ]),
607
- IconLockKeyhole: q([
607
+ IconLockKeyhole: G([
608
608
  ["circle", {
609
609
  cx: "12",
610
610
  cy: "16",
@@ -624,7 +624,7 @@ var M = {
624
624
  key: "1pqi11"
625
625
  }]
626
626
  ]),
627
- IconLogOut: q([
627
+ IconLogOut: G([
628
628
  ["path", {
629
629
  d: "m16 17 5-5-5-5",
630
630
  key: "1bji2h"
@@ -638,7 +638,7 @@ var M = {
638
638
  key: "1uf3rs"
639
639
  }]
640
640
  ]),
641
- IconMaximize2: q([
641
+ IconMaximize2: G([
642
642
  ["path", {
643
643
  d: "M15 3h6v6",
644
644
  key: "1q9fwt"
@@ -656,7 +656,7 @@ var M = {
656
656
  key: "wtvkvv"
657
657
  }]
658
658
  ]),
659
- IconMenu: q([
659
+ IconMenu: G([
660
660
  ["path", {
661
661
  d: "M4 5h16",
662
662
  key: "1tepv9"
@@ -670,7 +670,7 @@ var M = {
670
670
  key: "1djgab"
671
671
  }]
672
672
  ]),
673
- IconPackageCheck: q([
673
+ IconPackageCheck: G([
674
674
  ["path", {
675
675
  d: "M12 22V12",
676
676
  key: "d0xqtd"
@@ -692,7 +692,7 @@ var M = {
692
692
  key: "9yrvtv"
693
693
  }]
694
694
  ]),
695
- IconRefreshCw: q([
695
+ IconRefreshCw: G([
696
696
  ["path", {
697
697
  d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
698
698
  key: "v9h5vc"
@@ -710,14 +710,14 @@ var M = {
710
710
  key: "1cv678"
711
711
  }]
712
712
  ]),
713
- IconRotateCw: q([["path", {
713
+ IconRotateCw: G([["path", {
714
714
  d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
715
715
  key: "1p45f6"
716
716
  }], ["path", {
717
717
  d: "M21 3v5h-5",
718
718
  key: "1q7to0"
719
719
  }]]),
720
- IconSearch: q([["path", {
720
+ IconSearch: G([["path", {
721
721
  d: "m21 21-4.34-4.34",
722
722
  key: "14j7rj"
723
723
  }], ["circle", {
@@ -726,7 +726,7 @@ var M = {
726
726
  r: "8",
727
727
  key: "4ej97u"
728
728
  }]]),
729
- IconSettings2: q([
729
+ IconSettings2: G([
730
730
  ["path", {
731
731
  d: "M14 17H5",
732
732
  key: "gfn3mx"
@@ -748,7 +748,7 @@ var M = {
748
748
  key: "dfmy0x"
749
749
  }]
750
750
  ]),
751
- IconShieldAlert: q([
751
+ IconShieldAlert: G([
752
752
  ["path", {
753
753
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
754
754
  key: "oel41y"
@@ -762,14 +762,14 @@ var M = {
762
762
  key: "1drbdi"
763
763
  }]
764
764
  ]),
765
- IconShieldCheck: q([["path", {
765
+ IconShieldCheck: G([["path", {
766
766
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
767
767
  key: "oel41y"
768
768
  }], ["path", {
769
769
  d: "m9 12 2 2 4-4",
770
770
  key: "dzmm74"
771
771
  }]]),
772
- IconSmartphone: q([["rect", {
772
+ IconSmartphone: G([["rect", {
773
773
  width: "14",
774
774
  height: "20",
775
775
  x: "5",
@@ -781,7 +781,7 @@ var M = {
781
781
  d: "M12 18h.01",
782
782
  key: "mhygvu"
783
783
  }]]),
784
- IconSparkles: q([
784
+ IconSparkles: G([
785
785
  ["path", {
786
786
  d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
787
787
  key: "1s2grr"
@@ -801,22 +801,22 @@ var M = {
801
801
  key: "6kqj1y"
802
802
  }]
803
803
  ]),
804
- IconTable2: q([["path", {
804
+ IconTable2: G([["path", {
805
805
  d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
806
806
  key: "gugj83"
807
807
  }]]),
808
- IconThermometer: q([["path", {
808
+ IconThermometer: G([["path", {
809
809
  d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
810
810
  key: "17jzev"
811
811
  }]]),
812
- IconTrendingUp: q([["path", {
812
+ IconTrendingUp: G([["path", {
813
813
  d: "M16 7h6v6",
814
814
  key: "box55l"
815
815
  }], ["path", {
816
816
  d: "m22 7-8.5 8.5-5-5L2 17",
817
817
  key: "1t1m79"
818
818
  }]]),
819
- IconUserCheck: q([
819
+ IconUserCheck: G([
820
820
  ["path", {
821
821
  d: "m16 11 2 2 4-4",
822
822
  key: "9rsbq5"
@@ -832,7 +832,7 @@ var M = {
832
832
  key: "nufk8"
833
833
  }]
834
834
  ]),
835
- IconUserRound: q([["circle", {
835
+ IconUserRound: G([["circle", {
836
836
  cx: "12",
837
837
  cy: "8",
838
838
  r: "5",
@@ -841,7 +841,7 @@ var M = {
841
841
  d: "M20 21a8 8 0 0 0-16 0",
842
842
  key: "rfgkzh"
843
843
  }]]),
844
- IconUsers: q([
844
+ IconUsers: G([
845
845
  ["path", {
846
846
  d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
847
847
  key: "1yyitq"
@@ -861,7 +861,7 @@ var M = {
861
861
  key: "nufk8"
862
862
  }]
863
863
  ]),
864
- IconUserX: q([
864
+ IconUserX: G([
865
865
  ["path", {
866
866
  d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
867
867
  key: "1yyitq"
@@ -887,7 +887,7 @@ var M = {
887
887
  key: "1swrse"
888
888
  }]
889
889
  ]),
890
- IconVideo: q([["path", {
890
+ IconVideo: G([["path", {
891
891
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
892
892
  key: "ftymec"
893
893
  }], ["rect", {
@@ -898,7 +898,7 @@ var M = {
898
898
  rx: "2",
899
899
  key: "158x01"
900
900
  }]]),
901
- IconVideoOff: q([
901
+ IconVideoOff: G([
902
902
  ["path", {
903
903
  d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
904
904
  key: "w8jjjt"
@@ -912,7 +912,7 @@ var M = {
912
912
  key: "1ooewy"
913
913
  }]
914
914
  ]),
915
- IconVolume2: q([
915
+ IconVolume2: G([
916
916
  ["path", {
917
917
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
918
918
  key: "uqj9uw"
@@ -926,62 +926,62 @@ var M = {
926
926
  key: "ijwkga"
927
927
  }]
928
928
  ]),
929
- IconX: q([["path", {
929
+ IconX: G([["path", {
930
930
  d: "M18 6 6 18",
931
931
  key: "1bl5f8"
932
932
  }], ["path", {
933
933
  d: "m6 6 12 12",
934
934
  key: "d8bk6v"
935
935
  }]]),
936
- IconBasket: F,
937
- IconCheck: L,
938
- IconChevron: R,
939
- IconCross: z,
940
- IconEdit: B,
941
- IconErrorCircle: te,
936
+ IconBasket: P,
937
+ IconCheck: I,
938
+ IconChevron: L,
939
+ IconCross: R,
940
+ IconEdit: z,
941
+ IconErrorCircle: B,
942
942
  IconEye: V,
943
943
  IconEyeOff: H,
944
- IconInfo: U,
945
- IconInfoCircle: ne,
946
- IconMinus: re,
947
- IconList: W,
948
- IconPanelsTopLeft: ie,
949
- IconPause: ae,
950
- IconPlus: oe,
951
- IconPictureInPicture: se,
952
- IconPlay: G,
953
- IconReplay: K,
954
- IconSettings: ce,
955
- IconFullscreen: le,
956
- IconFullscreenExit: ue,
957
- IconCaptions: de,
958
- IconVolume: fe,
959
- IconVolumeMuted: pe,
960
- IconSort: me,
961
- IconSortAscending: he,
962
- IconSortDescending: ge,
963
- IconSuccessCircle: _e,
964
- IconUpload: ve,
965
- IconWarning: ye
966
- }, J = ({ name: e, ...n }) => {
967
- let r = be[e];
944
+ IconInfo: ne,
945
+ IconInfoCircle: re,
946
+ IconMinus: ie,
947
+ IconList: ae,
948
+ IconPanelsTopLeft: oe,
949
+ IconPause: se,
950
+ IconPlus: ce,
951
+ IconPictureInPicture: le,
952
+ IconPlay: ue,
953
+ IconReplay: U,
954
+ IconSettings: de,
955
+ IconFullscreen: fe,
956
+ IconFullscreenExit: pe,
957
+ IconCaptions: W,
958
+ IconVolume: me,
959
+ IconVolumeMuted: he,
960
+ IconSort: ge,
961
+ IconSortAscending: _e,
962
+ IconSortDescending: ve,
963
+ IconSuccessCircle: ye,
964
+ IconUpload: be,
965
+ IconWarning: xe
966
+ }, K = ({ name: e, ...n }) => {
967
+ let r = Se[e];
968
968
  return /* @__PURE__ */ t(r, { ...n });
969
- }, Y = {
969
+ }, Ce = {
970
970
  wrapper: "_wrapper_1seon_1",
971
971
  label: "_label_1seon_13",
972
972
  input: "_input_1seon_35",
973
973
  control: "_control_1seon_49",
974
974
  disabled: "_disabled_1seon_95",
975
975
  controlError: "_controlError_1seon_121"
976
- }, xe = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
976
+ }, we = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
977
977
  let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
978
978
  return d(() => {
979
979
  b.current && (b.current.indeterminate = m && !e);
980
980
  }, [e, m]), /* @__PURE__ */ n("div", {
981
- className: `${Y.wrapper} ${l}`,
981
+ className: `${Ce.wrapper} ${l}`,
982
982
  children: [
983
983
  /* @__PURE__ */ n("label", {
984
- className: `${Y.label} ${s ? Y.disabled : ""}`,
984
+ className: `${Ce.label} ${s ? Ce.disabled : ""}`,
985
985
  htmlFor: y,
986
986
  children: [
987
987
  /* @__PURE__ */ t("input", {
@@ -995,20 +995,20 @@ var M = {
995
995
  "aria-invalid": !!o,
996
996
  "aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
997
997
  "aria-label": g,
998
- className: Y.input,
998
+ className: Ce.input,
999
999
  onChange: (e) => {
1000
1000
  c || r?.(e.target.checked, e);
1001
1001
  },
1002
1002
  ..._
1003
1003
  }),
1004
1004
  /* @__PURE__ */ n("span", {
1005
- className: `${Y.control} ${o ? Y.controlError : ""}`,
1005
+ className: `${Ce.control} ${o ? Ce.controlError : ""}`,
1006
1006
  "aria-hidden": "true",
1007
- children: [m && !e && /* @__PURE__ */ t(J, {
1007
+ children: [m && !e && /* @__PURE__ */ t(K, {
1008
1008
  name: "IconMinus",
1009
1009
  width: 16,
1010
1010
  height: 16
1011
- }), e && /* @__PURE__ */ t(J, {
1011
+ }), e && /* @__PURE__ */ t(K, {
1012
1012
  name: "IconCheck",
1013
1013
  width: 16,
1014
1014
  height: 16
@@ -1017,18 +1017,18 @@ var M = {
1017
1017
  i && /* @__PURE__ */ t("span", { children: i })
1018
1018
  ]
1019
1019
  }),
1020
- a && !o && /* @__PURE__ */ t(N, {
1020
+ a && !o && /* @__PURE__ */ t(M, {
1021
1021
  id: x,
1022
1022
  children: a
1023
1023
  }),
1024
- o && /* @__PURE__ */ t(N, {
1024
+ o && /* @__PURE__ */ t(M, {
1025
1025
  id: S,
1026
1026
  variant: "error",
1027
1027
  children: o
1028
1028
  })
1029
1029
  ]
1030
1030
  });
1031
- }, X = {
1031
+ }, q = {
1032
1032
  wrapper: "_wrapper_su17c_1",
1033
1033
  trigger: "_trigger_su17c_17",
1034
1034
  sm: "_sm_su17c_53",
@@ -1059,7 +1059,7 @@ var M = {
1059
1059
  timeLabel: "_timeLabel_su17c_533",
1060
1060
  previousMonth: "_previousMonth_su17c_593",
1061
1061
  nextMonth: "_nextMonth_su17c_601"
1062
- }, Se = [
1062
+ }, Te = [
1063
1063
  "Пн",
1064
1064
  "Вт",
1065
1065
  "Ср",
@@ -1067,7 +1067,7 @@ var M = {
1067
1067
  "Пт",
1068
1068
  "Сб",
1069
1069
  "Вс"
1070
- ], Ce = [
1070
+ ], Ee = [
1071
1071
  "Январь",
1072
1072
  "Февраль",
1073
1073
  "Март",
@@ -1080,33 +1080,33 @@ var M = {
1080
1080
  "Октябрь",
1081
1081
  "Ноябрь",
1082
1082
  "Декабрь"
1083
- ], we = (e) => String(e).padStart(2, "0"), Te = 8, Ee = "Некорректная дата", De = (e) => e ? `${we(e.getDate())}.${we(e.getMonth() + 1)}.${e.getFullYear()}` : "", Oe = (e) => {
1084
- let t = e.replace(/\D/g, "").slice(0, Te);
1083
+ ], J = (e) => String(e).padStart(2, "0"), Y = 8, De = "Некорректная дата", Oe = (e) => e ? `${J(e.getDate())}.${J(e.getMonth() + 1)}.${e.getFullYear()}` : "", ke = (e) => {
1084
+ let t = e.replace(/\D/g, "").slice(0, Y);
1085
1085
  return [
1086
1086
  t.slice(0, 2),
1087
1087
  t.slice(2, 4),
1088
1088
  t.slice(4, 8)
1089
1089
  ].filter(Boolean).join(".");
1090
- }, ke = (e) => {
1090
+ }, Ae = (e) => {
1091
1091
  if (!e) return !0;
1092
1092
  let t = Number(e.padEnd(4, "0"));
1093
1093
  return Number(e.padEnd(4, "9")) >= 1800 && t <= 2500;
1094
- }, Ae = (e) => {
1094
+ }, je = (e) => {
1095
1095
  if (!/^\d{0,8}$/.test(e)) return !1;
1096
1096
  let t = e.slice(0, 2), n = e.slice(2, 4), r = e.slice(4, 8);
1097
- return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : ke(r);
1098
- }, je = (e) => {
1097
+ return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : Ae(r);
1098
+ }, Me = (e) => {
1099
1099
  let t = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);
1100
1100
  if (!t) return null;
1101
1101
  let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]);
1102
1102
  if (i < 1800 || i > 2500) return null;
1103
1103
  let a = new Date(i, r, n, 12);
1104
1104
  return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
1105
- }, Me = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ne = (e, t) => {
1105
+ }, Ne = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Pe = (e, t) => {
1106
1106
  if (!e) return "";
1107
- let n = `${e.getFullYear()}-${we(e.getMonth() + 1)}-${we(e.getDate())}`, r = `${we(e.getHours())}:${we(e.getMinutes())}`;
1107
+ let n = `${e.getFullYear()}-${J(e.getMonth() + 1)}-${J(e.getDate())}`, r = `${J(e.getHours())}:${J(e.getMinutes())}`;
1108
1108
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
1109
- }, Pe = (e, t) => {
1109
+ }, Fe = (e, t) => {
1110
1110
  if (!e) return null;
1111
1111
  if (t === "time") {
1112
1112
  let t = /^(\d{2}):(\d{2})$/.exec(e);
@@ -1124,244 +1124,244 @@ var M = {
1124
1124
  }
1125
1125
  let n = new Date(e);
1126
1126
  return Number.isNaN(n.getTime()) ? null : n;
1127
- }, Fe = (e, t) => {
1127
+ }, Ie = (e, t) => {
1128
1128
  if (!e) return "";
1129
- let n = `${we(e.getDate())}.${we(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${we(e.getHours())}:${we(e.getMinutes())}`;
1129
+ let n = `${J(e.getDate())}.${J(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${J(e.getHours())}:${J(e.getMinutes())}`;
1130
1130
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
1131
- }, Ie = (e) => {
1131
+ }, Le = (e) => {
1132
1132
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
1133
1133
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
1134
1134
  let n = new Date(r);
1135
1135
  return n.setDate(r.getDate() + t), n;
1136
1136
  });
1137
- }, Le = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), Re = (e, t, n) => {
1138
- let r = Me(e).getTime();
1139
- return !!(t && r < Me(t).getTime() || n && r > Me(n).getTime());
1140
- }, ze = 8, Be = 6, Ve = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
1141
- let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), P = h(null), F = h(null), [I, L] = g(!1), [R, z] = g(r ?? /* @__PURE__ */ new Date()), [B, te] = g(Ne(r, "time")), [V, H] = g(De(r)), [U, ne] = g(""), [re, W] = g(0), [ie, ae] = g(null), oe = m(() => Ie(R), [R]), se = a !== "time", G = a !== "date";
1137
+ }, Re = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ze = (e, t, n) => {
1138
+ let r = Ne(e).getTime();
1139
+ return !!(t && r < Ne(t).getTime() || n && r > Ne(n).getTime());
1140
+ }, Be = 8, Ve = 6, He = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: ee, name: w, className: T = "" }) => {
1141
+ let E = f(), D = ee ?? `ds-date-time-${w ?? E}`, O = c ? `${D}-hint` : void 0, k = u ? `${D}-error` : void 0, A = h(null), j = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, B] = g(Pe(r, "time")), [V, H] = g(Oe(r)), [ne, re] = g(""), [ie, ae] = g(0), [oe, se] = g(null), ce = m(() => Le(L), [L]), le = a !== "time", ue = a !== "date";
1142
1142
  d(() => {
1143
- r && z(r), te(Ne(r, "time")), H(De(r));
1143
+ r && R(r), B(Pe(r, "time")), H(Oe(r));
1144
1144
  }, [r]), d(() => () => {
1145
- F.current && clearTimeout(F.current);
1145
+ P.current && clearTimeout(P.current);
1146
1146
  }, []);
1147
- let K = l(() => {
1148
- let e = M.current, t = P.current;
1147
+ let U = l(() => {
1148
+ let e = j.current, t = N.current;
1149
1149
  if (!e || !t) return;
1150
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - ze, o = n.top - ze, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(ze, n.top - r.height - Be) : n.bottom + Be, u = n.left, d = i - r.width - ze;
1151
- ae({
1150
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Be, o = n.top - Be, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(Be, n.top - r.height - Ve) : n.bottom + Ve, u = n.left, d = i - r.width - Be;
1151
+ se({
1152
1152
  top: l,
1153
- left: Math.max(ze, Math.min(u, d)),
1153
+ left: Math.max(Be, Math.min(u, d)),
1154
1154
  maxHeight: c
1155
1155
  });
1156
1156
  }, []);
1157
1157
  p(() => {
1158
- if (!I) {
1159
- ae(null);
1158
+ if (!F) {
1159
+ se(null);
1160
1160
  return;
1161
1161
  }
1162
- return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
1163
- window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
1162
+ return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
1163
+ window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
1164
1164
  };
1165
1165
  }, [
1166
- I,
1167
- K,
1168
- R,
1169
- B
1166
+ F,
1167
+ U,
1168
+ L,
1169
+ z
1170
1170
  ]), d(() => {
1171
- if (!I) return;
1171
+ if (!F) return;
1172
1172
  let e = (e) => {
1173
- let t = e.target, n = j.current?.contains(t), r = P.current?.contains(t);
1174
- !n && !r && L(!1);
1173
+ let t = e.target, n = A.current?.contains(t), r = N.current?.contains(t);
1174
+ !n && !r && I(!1);
1175
1175
  }, t = (e) => {
1176
- e.key === "Escape" && (L(!1), M.current?.focus());
1176
+ e.key === "Escape" && (I(!1), j.current?.focus());
1177
1177
  };
1178
1178
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
1179
1179
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
1180
1180
  };
1181
- }, [I]);
1182
- let ce = (e) => {
1183
- if (Re(e, x, S)) return;
1184
- let t = a === "date" ? Pe(Ne(e, "date"), "date") : new Date(e);
1185
- t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(De(t)), a === "date" && L(!1));
1186
- }, le = () => {
1187
- ne(Ee), W((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
1188
- ne(""), F.current = null;
1181
+ }, [F]);
1182
+ let de = (e) => {
1183
+ if (ze(e, x, S)) return;
1184
+ let t = a === "date" ? Fe(Pe(e, "date"), "date") : new Date(e);
1185
+ t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(Oe(t)), a === "date" && I(!1));
1186
+ }, fe = () => {
1187
+ re(De), ae((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
1188
+ re(""), P.current = null;
1189
1189
  }, 3e3);
1190
- }, ue = (e) => {
1191
- let t = e.replace(/\D/g, "").slice(0, Te);
1192
- if (!Ae(t)) {
1193
- le();
1190
+ }, pe = (e) => {
1191
+ let t = e.replace(/\D/g, "").slice(0, Y);
1192
+ if (!je(t)) {
1193
+ fe();
1194
1194
  return;
1195
1195
  }
1196
- let n = Oe(t);
1196
+ let n = ke(t);
1197
1197
  if (H(n), !t) {
1198
1198
  i?.(null);
1199
1199
  return;
1200
1200
  }
1201
- if (t.length < Te) return;
1202
- let o = je(n);
1203
- if (!o || Re(o, x, S)) {
1204
- le();
1201
+ if (t.length < Y) return;
1202
+ let o = Me(n);
1203
+ if (!o || ze(o, x, S)) {
1204
+ fe();
1205
1205
  return;
1206
1206
  }
1207
- a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), z(o), L(!1), requestAnimationFrame(() => M.current?.blur());
1208
- }, de = (e) => {
1209
- if (te(e), !e) {
1207
+ a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), R(o), I(!1), requestAnimationFrame(() => j.current?.blur());
1208
+ }, W = (e) => {
1209
+ if (B(e), !e) {
1210
1210
  i?.(null);
1211
1211
  return;
1212
1212
  }
1213
- let t = Pe(e, "time");
1213
+ let t = Fe(e, "time");
1214
1214
  if (!t) return;
1215
- let n = new Date(a === "datetime" ? r ?? R : /* @__PURE__ */ new Date());
1215
+ let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
1216
1216
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
1217
- }, fe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), pe = U ? `${O}-validation` : void 0, me = [
1217
+ }, me = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), he = ne ? `${D}-validation` : void 0, ge = [
1218
+ O,
1218
1219
  k,
1219
- A,
1220
- pe
1221
- ].filter(Boolean).join(" ") || void 0, he = I && !y ? /* @__PURE__ */ n("div", {
1222
- ref: P,
1223
- className: X.panel,
1220
+ he
1221
+ ].filter(Boolean).join(" ") || void 0, _e = F && !y ? /* @__PURE__ */ n("div", {
1222
+ ref: N,
1223
+ className: q.panel,
1224
1224
  role: "dialog",
1225
- "aria-label": o ?? fe,
1226
- style: ie ? {
1227
- top: ie.top,
1228
- left: ie.left,
1229
- maxHeight: ie.maxHeight
1225
+ "aria-label": o ?? me,
1226
+ style: oe ? {
1227
+ top: oe.top,
1228
+ left: oe.left,
1229
+ maxHeight: oe.maxHeight
1230
1230
  } : {
1231
1231
  visibility: "hidden",
1232
1232
  top: 0,
1233
1233
  left: 0
1234
1234
  },
1235
- children: [se && /* @__PURE__ */ n(e, { children: [
1235
+ children: [le && /* @__PURE__ */ n(e, { children: [
1236
1236
  /* @__PURE__ */ n("div", {
1237
- className: X.calendarHeader,
1237
+ className: q.calendarHeader,
1238
1238
  children: [
1239
1239
  /* @__PURE__ */ t("button", {
1240
1240
  type: "button",
1241
- className: X.nav,
1241
+ className: q.nav,
1242
1242
  "aria-label": "Предыдущий месяц",
1243
- onClick: () => z(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
1244
- children: /* @__PURE__ */ t(J, {
1243
+ onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
1244
+ children: /* @__PURE__ */ t(K, {
1245
1245
  name: "IconChevron",
1246
1246
  width: 20,
1247
1247
  height: 20,
1248
- className: X.previousMonth
1248
+ className: q.previousMonth
1249
1249
  })
1250
1250
  }),
1251
1251
  /* @__PURE__ */ t("select", {
1252
- className: X.monthSelect,
1252
+ className: q.monthSelect,
1253
1253
  "aria-label": "Месяц",
1254
- value: R.getMonth(),
1255
- onChange: (e) => z(new Date(R.getFullYear(), Number(e.target.value), 1)),
1256
- children: Ce.map((e, n) => /* @__PURE__ */ t("option", {
1254
+ value: L.getMonth(),
1255
+ onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
1256
+ children: Ee.map((e, n) => /* @__PURE__ */ t("option", {
1257
1257
  value: n,
1258
1258
  children: e
1259
1259
  }, e))
1260
1260
  }),
1261
1261
  /* @__PURE__ */ t("input", {
1262
- className: X.yearInput,
1262
+ className: q.yearInput,
1263
1263
  type: "number",
1264
1264
  "aria-label": "Год",
1265
- value: R.getFullYear(),
1266
- onChange: (e) => z(new Date(Number(e.target.value), R.getMonth(), 1))
1265
+ value: L.getFullYear(),
1266
+ onChange: (e) => R(new Date(Number(e.target.value), L.getMonth(), 1))
1267
1267
  }),
1268
1268
  /* @__PURE__ */ t("button", {
1269
1269
  type: "button",
1270
- className: X.nav,
1270
+ className: q.nav,
1271
1271
  "aria-label": "Следующий месяц",
1272
- onClick: () => z(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
1273
- children: /* @__PURE__ */ t(J, {
1272
+ onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
1273
+ children: /* @__PURE__ */ t(K, {
1274
1274
  name: "IconChevron",
1275
1275
  width: 20,
1276
1276
  height: 20,
1277
- className: X.nextMonth
1277
+ className: q.nextMonth
1278
1278
  })
1279
1279
  })
1280
1280
  ]
1281
1281
  }),
1282
1282
  /* @__PURE__ */ t("div", {
1283
- className: X.weekdays,
1284
- children: Se.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
1283
+ className: q.weekdays,
1284
+ children: Te.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
1285
1285
  }),
1286
1286
  /* @__PURE__ */ t("div", {
1287
- className: X.days,
1288
- children: oe.map((e) => {
1289
- let n = Le(r, e);
1287
+ className: q.days,
1288
+ children: ce.map((e) => {
1289
+ let n = Re(r, e);
1290
1290
  return /* @__PURE__ */ t("button", {
1291
1291
  type: "button",
1292
- className: `${X.day} ${e.getMonth() === R.getMonth() ? "" : X.outside} ${n ? X.selected : ""}`,
1293
- disabled: Re(e, x, S),
1292
+ className: `${q.day} ${e.getMonth() === L.getMonth() ? "" : q.outside} ${n ? q.selected : ""}`,
1293
+ disabled: ze(e, x, S),
1294
1294
  "aria-pressed": n,
1295
- onClick: () => ce(e),
1295
+ onClick: () => de(e),
1296
1296
  children: e.getDate()
1297
1297
  }, e.toISOString());
1298
1298
  })
1299
1299
  })
1300
- ] }), G && /* @__PURE__ */ n("label", {
1301
- className: X.timeLabel,
1300
+ ] }), ue && /* @__PURE__ */ n("label", {
1301
+ className: q.timeLabel,
1302
1302
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
1303
- className: X.timeInput,
1303
+ className: q.timeInput,
1304
1304
  type: "time",
1305
- value: B,
1306
- onChange: (e) => de(e.target.value)
1305
+ value: z,
1306
+ onChange: (e) => W(e.target.value)
1307
1307
  })]
1308
1308
  })]
1309
1309
  }) : null;
1310
1310
  return /* @__PURE__ */ n("div", {
1311
- ref: j,
1312
- className: `${X.wrapper} ${E}`,
1311
+ ref: A,
1312
+ className: `${q.wrapper} ${T}`,
1313
1313
  children: [
1314
- o && /* @__PURE__ */ t(ee, {
1315
- htmlFor: O,
1314
+ o && /* @__PURE__ */ t(te, {
1315
+ htmlFor: D,
1316
1316
  required: b,
1317
1317
  disabled: v,
1318
1318
  children: o
1319
1319
  }),
1320
- se ? /* @__PURE__ */ n("div", {
1321
- className: `${X.trigger} ${X[C]} ${u ? X.error : ""} ${v ? X.disabled : ""}`,
1320
+ le ? /* @__PURE__ */ n("div", {
1321
+ className: `${q.trigger} ${q[C]} ${u ? q.error : ""} ${v ? q.disabled : ""}`,
1322
1322
  children: [
1323
1323
  /* @__PURE__ */ t("input", {
1324
- ref: M,
1325
- id: O,
1326
- name: T,
1327
- className: X.dateInput,
1324
+ ref: j,
1325
+ id: D,
1326
+ name: w,
1327
+ className: q.dateInput,
1328
1328
  value: V,
1329
- placeholder: fe.split(" ")[0],
1329
+ placeholder: me.split(" ")[0],
1330
1330
  inputMode: "numeric",
1331
1331
  autoComplete: "off",
1332
1332
  maxLength: 10,
1333
1333
  disabled: v,
1334
1334
  readOnly: y,
1335
- "aria-expanded": I,
1335
+ "aria-expanded": F,
1336
1336
  "aria-haspopup": "dialog",
1337
- "aria-describedby": me,
1338
- "aria-invalid": !!(u || U) || void 0,
1337
+ "aria-describedby": ge,
1338
+ "aria-invalid": !!(u || ne) || void 0,
1339
1339
  onFocus: () => {
1340
- y || L(!0);
1340
+ y || I(!0);
1341
1341
  },
1342
1342
  onClick: () => {
1343
- y || L(!0);
1343
+ y || I(!0);
1344
1344
  },
1345
- onChange: (e) => ue(e.target.value)
1345
+ onChange: (e) => pe(e.target.value)
1346
1346
  }),
1347
- a === "datetime" && B && /* @__PURE__ */ t("span", {
1348
- className: X.timeValue,
1349
- children: B
1347
+ a === "datetime" && z && /* @__PURE__ */ t("span", {
1348
+ className: q.timeValue,
1349
+ children: z
1350
1350
  }),
1351
1351
  /* @__PURE__ */ t("button", {
1352
1352
  type: "button",
1353
- className: X.chevronButton,
1353
+ className: q.chevronButton,
1354
1354
  disabled: v || y,
1355
- "aria-label": I ? "Закрыть календарь" : "Открыть календарь",
1355
+ "aria-label": F ? "Закрыть календарь" : "Открыть календарь",
1356
1356
  tabIndex: -1,
1357
1357
  onMouseDown: (e) => e.preventDefault(),
1358
1358
  onClick: () => {
1359
- L((e) => !e), M.current?.focus();
1359
+ I((e) => !e), j.current?.focus();
1360
1360
  },
1361
1361
  children: /* @__PURE__ */ t("span", {
1362
- className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
1362
+ className: `${q.chevron} ${_e ? q.chevronOpen : ""}`,
1363
1363
  "aria-hidden": "true",
1364
- children: /* @__PURE__ */ t(J, {
1364
+ children: /* @__PURE__ */ t(K, {
1365
1365
  name: "IconChevron",
1366
1366
  width: 20,
1367
1367
  height: 20
@@ -1370,64 +1370,64 @@ var M = {
1370
1370
  })
1371
1371
  ]
1372
1372
  }) : /* @__PURE__ */ n("button", {
1373
- ref: M,
1374
- id: O,
1375
- name: T,
1373
+ ref: j,
1374
+ id: D,
1375
+ name: w,
1376
1376
  type: "button",
1377
- className: `${X.trigger} ${X[C]} ${u ? X.error : ""}`,
1377
+ className: `${q.trigger} ${q[C]} ${u ? q.error : ""}`,
1378
1378
  disabled: v,
1379
1379
  "aria-readonly": y || void 0,
1380
- "aria-expanded": I,
1380
+ "aria-expanded": F,
1381
1381
  "aria-haspopup": "dialog",
1382
- "aria-describedby": me,
1382
+ "aria-describedby": ge,
1383
1383
  onClick: () => {
1384
- y || L((e) => !e);
1384
+ y || I((e) => !e);
1385
1385
  },
1386
1386
  children: [/* @__PURE__ */ t("span", {
1387
- className: r ? X.value : X.placeholder,
1388
- children: Fe(r, a) || fe
1387
+ className: r ? q.value : q.placeholder,
1388
+ children: Ie(r, a) || me
1389
1389
  }), /* @__PURE__ */ t("span", {
1390
- className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
1390
+ className: `${q.chevron} ${_e ? q.chevronOpen : ""}`,
1391
1391
  "aria-hidden": "true",
1392
- children: /* @__PURE__ */ t(J, {
1392
+ children: /* @__PURE__ */ t(K, {
1393
1393
  name: "IconChevron",
1394
1394
  width: 20,
1395
1395
  height: 20
1396
1396
  })
1397
1397
  })]
1398
1398
  }),
1399
- U && /* @__PURE__ */ t("span", {
1400
- id: pe,
1401
- className: X.validationTooltip,
1399
+ ne && /* @__PURE__ */ t("span", {
1400
+ id: he,
1401
+ className: q.validationTooltip,
1402
1402
  role: "status",
1403
1403
  "aria-live": "polite",
1404
- children: U
1405
- }, re),
1406
- he && _(he, document.body),
1407
- c && !u && /* @__PURE__ */ t(N, {
1408
- id: k,
1404
+ children: ne
1405
+ }, ie),
1406
+ _e && _(_e, document.body),
1407
+ c && !u && /* @__PURE__ */ t(M, {
1408
+ id: O,
1409
1409
  children: c
1410
1410
  }),
1411
- u && /* @__PURE__ */ t(N, {
1412
- id: A,
1411
+ u && /* @__PURE__ */ t(M, {
1412
+ id: k,
1413
1413
  variant: "error",
1414
1414
  children: u
1415
1415
  })
1416
1416
  ]
1417
1417
  });
1418
- }, He = {
1418
+ }, Ue = {
1419
1419
  root: "_root_19vq2_1",
1420
1420
  range: "_range_19vq2_21"
1421
- }, Ue = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), We = ({ 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 = "" }) => {
1421
+ }, We = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), Ge = ({ 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 = "" }) => {
1422
1422
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
1423
- i?.(e), Ue(e) && r?.(e);
1423
+ i?.(e), We(e) && r?.(e);
1424
1424
  };
1425
1425
  return /* @__PURE__ */ n("fieldset", {
1426
- className: `${He.root} ${h}`,
1426
+ className: `${Ue.root} ${h}`,
1427
1427
  disabled: f,
1428
1428
  children: [/* @__PURE__ */ n("div", {
1429
- className: He.range,
1430
- children: [/* @__PURE__ */ t(Ve, {
1429
+ className: Ue.range,
1430
+ children: [/* @__PURE__ */ t(He, {
1431
1431
  value: e.from,
1432
1432
  mode: a === "datetime" ? "datetime" : a,
1433
1433
  label: o,
@@ -1441,7 +1441,7 @@ var M = {
1441
1441
  ...e,
1442
1442
  from: t
1443
1443
  })
1444
- }), /* @__PURE__ */ t(Ve, {
1444
+ }), /* @__PURE__ */ t(He, {
1445
1445
  value: e.to,
1446
1446
  mode: a === "datetime" ? "datetime" : a,
1447
1447
  label: s,
@@ -1456,9 +1456,9 @@ var M = {
1456
1456
  to: t
1457
1457
  })
1458
1458
  })]
1459
- }), c && !g && /* @__PURE__ */ t(N, { children: c })]
1459
+ }), c && !g && /* @__PURE__ */ t(M, { children: c })]
1460
1460
  });
1461
- }, Ge = {
1461
+ }, Ke = {
1462
1462
  group: "_group_ey6uk_1",
1463
1463
  skeleton: "_skeleton_ey6uk_15",
1464
1464
  text: "_text_ey6uk_27",
@@ -1466,103 +1466,104 @@ var M = {
1466
1466
  circular: "_circular_ey6uk_47",
1467
1467
  animated: "_animated_ey6uk_59",
1468
1468
  "ds-skeleton": "_ds-skeleton_ey6uk_1"
1469
- }, Ke = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
1470
- className: `${Ge.group} ${o}`,
1469
+ }, qe = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
1470
+ className: `${Ke.group} ${o}`,
1471
1471
  "aria-hidden": "true",
1472
1472
  children: Array.from({ length: Math.max(1, i) }, (i, o) => /* @__PURE__ */ t("span", {
1473
- className: `${Ge.skeleton} ${Ge[e]} ${a ? Ge.animated : ""}`,
1473
+ className: `${Ke.skeleton} ${Ke[e]} ${a ? Ke.animated : ""}`,
1474
1474
  style: {
1475
1475
  width: n,
1476
1476
  height: r
1477
1477
  }
1478
1478
  }, o))
1479
- }), Z = {
1480
- wrapper: "_wrapper_6g3qd_1",
1481
- container: "_container_6g3qd_17",
1482
- trigger: "_trigger_6g3qd_25",
1483
- disabledText: "_disabledText_6g3qd_27",
1484
- sm: "_sm_6g3qd_53",
1485
- md: "_md_6g3qd_67",
1486
- lg: "_lg_6g3qd_81",
1487
- value: "_value_6g3qd_147",
1488
- placeholder: "_placeholder_6g3qd_149",
1489
- chevron: "_chevron_6g3qd_205",
1490
- chevronOpen: "_chevronOpen_6g3qd_231",
1491
- menu: "_menu_6g3qd_239",
1492
- option: "_option_6g3qd_269",
1493
- selected: "_selected_6g3qd_339",
1494
- message: "_message_6g3qd_359",
1495
- error: "_error_6g3qd_361",
1496
- errorState: "_errorState_6g3qd_387"
1497
- }, qe = 8, Je = 6, Ye = 120, Xe = (e, t, n) => {
1479
+ }), X = {
1480
+ wrapper: "_wrapper_12twc_1",
1481
+ container: "_container_12twc_17",
1482
+ trigger: "_trigger_12twc_25",
1483
+ disabledText: "_disabledText_12twc_27",
1484
+ sm: "_sm_12twc_53",
1485
+ md: "_md_12twc_67",
1486
+ lg: "_lg_12twc_81",
1487
+ value: "_value_12twc_147",
1488
+ placeholder: "_placeholder_12twc_149",
1489
+ chevron: "_chevron_12twc_205",
1490
+ chevronOpen: "_chevronOpen_12twc_231",
1491
+ menu: "_menu_12twc_239",
1492
+ option: "_option_12twc_269",
1493
+ selected: "_selected_12twc_339",
1494
+ actionOption: "_actionOption_12twc_359",
1495
+ message: "_message_12twc_391",
1496
+ error: "_error_12twc_393",
1497
+ errorState: "_errorState_12twc_419"
1498
+ }, Je = 8, Ye = 6, Xe = 120, Ze = (e, t, n) => {
1498
1499
  if (!e.length) return -1;
1499
1500
  for (let r = 0; r < e.length; r += 1) {
1500
1501
  let i = (t + r * n + e.length) % e.length;
1501
1502
  if (!e[i]?.disabled) return i;
1502
1503
  }
1503
1504
  return -1;
1504
- }, Ze = (e) => {
1505
+ }, Qe = (e) => {
1505
1506
  if (typeof e == "number") return e;
1506
1507
  if (typeof e == "string") {
1507
1508
  let t = Number.parseFloat(e);
1508
1509
  if (Number.isFinite(t)) return t;
1509
1510
  }
1510
1511
  return Infinity;
1511
- }, Qe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
1512
- let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, te = o && s, V = l(() => {
1513
- let e = P.current, t = F.current;
1512
+ }, $e = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: ee = !0, maxMenuHeight: w }) => {
1513
+ let T = f(), E = C ?? `ds-dropdown-${S ?? T}`, D = `${E}-listbox`, [O, k] = g(!1), [A, j] = g(null), M = h(null), N = h(null), P = h(null), F = h([]), I = m(() => e.find((e) => e.value === r), [e, r]), L = y ? `${E}-hint` : void 0, R = u ? `${E}-error` : void 0, z = [L, R].filter(Boolean).join(" ") || void 0, B = o && s, V = l(() => {
1514
+ let e = N.current, t = P.current;
1514
1515
  if (!e || !t) return;
1515
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - qe, o = n.top - qe, s = a < r.height && o > a, c = Math.max(Ye, s ? o : a), l = Ze(T), u = Math.min(c, l), d = n.left, f = i - n.width - qe, p = Math.max(qe, Math.min(d, f)), m = s ? Math.max(qe, n.top - r.height - Je) : n.bottom + Je;
1516
- M({
1516
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Je, o = n.top - Je, s = a < r.height && o > a, c = Math.max(Xe, s ? o : a), l = Qe(w), u = Math.min(c, l), d = n.left, f = i - n.width - Je, p = Math.max(Je, Math.min(d, f)), m = s ? Math.max(Je, n.top - r.height - Ye) : n.bottom + Ye;
1517
+ j({
1517
1518
  top: m,
1518
1519
  left: p,
1519
1520
  width: n.width,
1520
1521
  maxHeight: u
1521
1522
  });
1522
- }, [T]);
1523
+ }, [w]);
1523
1524
  p(() => {
1524
- if (!k) {
1525
- M(null);
1525
+ if (!O) {
1526
+ j(null);
1526
1527
  return;
1527
1528
  }
1528
1529
  return V(), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
1529
1530
  window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
1530
1531
  };
1531
1532
  }, [
1532
- k,
1533
+ O,
1533
1534
  V,
1534
1535
  e.length
1535
1536
  ]), d(() => {
1536
- if (!k) return;
1537
+ if (!O) return;
1537
1538
  let e = (e) => {
1538
- let t = e.target, n = N.current?.contains(t), r = F.current?.contains(t);
1539
- !n && !r && A(!1);
1539
+ let t = e.target, n = M.current?.contains(t), r = P.current?.contains(t);
1540
+ !n && !r && k(!1);
1540
1541
  }, t = (e) => {
1541
- e.key === "Escape" && (A(!1), P.current?.focus());
1542
+ e.key === "Escape" && (k(!1), N.current?.focus());
1542
1543
  };
1543
1544
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
1544
1545
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
1545
1546
  };
1546
- }, [k]);
1547
+ }, [O]);
1547
1548
  let H = (t, n) => {
1548
- let r = Xe(e, t, n);
1549
+ let r = Ze(e, t, n);
1549
1550
  if (r === -1) return;
1550
- let i = I.current[r];
1551
+ let i = F.current[r];
1551
1552
  i?.focus(), i?.scrollIntoView({ block: "nearest" });
1552
- }, U = (e) => {
1553
- e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
1554
- }, ne = k ? /* @__PURE__ */ t("ul", {
1555
- ref: F,
1556
- id: O,
1557
- className: Z.menu,
1553
+ }, ne = (e) => {
1554
+ e.disabled || (i?.(e.value, e), k(!1), N.current?.focus());
1555
+ }, re = O ? /* @__PURE__ */ t("ul", {
1556
+ ref: P,
1557
+ id: D,
1558
+ className: X.menu,
1558
1559
  role: "listbox",
1559
1560
  "aria-label": c,
1560
- style: j ? {
1561
+ style: A ? {
1561
1562
  position: "fixed",
1562
- top: j.top,
1563
- left: j.left,
1564
- width: j.width,
1565
- maxHeight: j.maxHeight
1563
+ top: A.top,
1564
+ left: A.left,
1565
+ width: A.width,
1566
+ maxHeight: A.maxHeight
1566
1567
  } : {
1567
1568
  position: "fixed",
1568
1569
  top: 0,
@@ -1576,32 +1577,34 @@ var M = {
1576
1577
  role: "presentation",
1577
1578
  children: /* @__PURE__ */ n("button", {
1578
1579
  ref: (e) => {
1579
- I.current[a] = e;
1580
+ F.current[a] = e;
1580
1581
  },
1581
1582
  type: "button",
1582
1583
  role: "option",
1583
1584
  "aria-selected": o,
1584
1585
  disabled: i.disabled,
1586
+ "data-option-variant": i.variant ?? "default",
1585
1587
  className: [
1586
- Z[v],
1587
- Z.option,
1588
- o ? Z.selected : ""
1588
+ X[v],
1589
+ X.option,
1590
+ i.variant === "action" ? X.actionOption : "",
1591
+ o ? X.selected : ""
1589
1592
  ].filter(Boolean).join(" "),
1590
- onClick: () => U(i),
1593
+ onClick: () => ne(i),
1591
1594
  onKeyDown: (t) => {
1592
1595
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1593
1596
  t.preventDefault();
1594
1597
  let e = t.key === "ArrowDown" ? 1 : -1;
1595
1598
  H(a + e, e);
1596
1599
  }
1597
- if (t.key === "Tab" && A(!1), t.key === "Home" || t.key === "End") {
1600
+ if (t.key === "Tab" && k(!1), t.key === "Home" || t.key === "End") {
1598
1601
  t.preventDefault();
1599
1602
  let n = t.key === "Home" ? 1 : -1;
1600
1603
  H(t.key === "Home" ? 0 : e.length - 1, n);
1601
1604
  }
1602
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), U(i));
1605
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i));
1603
1606
  },
1604
- children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(J, {
1607
+ children: [/* @__PURE__ */ t("span", { children: i.label }), o && ee && /* @__PURE__ */ t(K, {
1605
1608
  name: "IconCheck",
1606
1609
  width: 16,
1607
1610
  height: 16
@@ -1611,61 +1614,61 @@ var M = {
1611
1614
  })
1612
1615
  }) : null;
1613
1616
  return /* @__PURE__ */ n("div", {
1614
- ref: N,
1617
+ ref: M,
1615
1618
  className: [
1616
- Z.wrapper,
1617
- u ? Z.errorState : "",
1619
+ X.wrapper,
1620
+ u ? X.errorState : "",
1618
1621
  b
1619
1622
  ].filter(Boolean).join(" "),
1620
1623
  children: [
1621
- c && /* @__PURE__ */ t(ee, {
1624
+ c && /* @__PURE__ */ t(te, {
1622
1625
  required: x,
1623
1626
  disabled: o,
1624
- htmlFor: te ? void 0 : D,
1627
+ htmlFor: B ? void 0 : E,
1625
1628
  children: c
1626
1629
  }),
1627
1630
  /* @__PURE__ */ t("div", {
1628
- className: Z.container,
1629
- children: te ? /* @__PURE__ */ t("div", {
1630
- id: D,
1631
- className: Z.disabledText,
1632
- "aria-describedby": B,
1633
- children: L?.label ?? a
1631
+ className: X.container,
1632
+ children: B ? /* @__PURE__ */ t("div", {
1633
+ id: E,
1634
+ className: X.disabledText,
1635
+ "aria-describedby": z,
1636
+ children: I?.label ?? a
1634
1637
  }) : /* @__PURE__ */ n("button", {
1635
- ref: P,
1636
- id: D,
1638
+ ref: N,
1639
+ id: E,
1637
1640
  type: "button",
1638
1641
  name: S,
1639
- className: `${Z.trigger} ${Z[v]}`,
1642
+ className: `${X.trigger} ${X[v]}`,
1640
1643
  disabled: o,
1641
1644
  "aria-haspopup": "listbox",
1642
- "aria-expanded": k,
1643
- "aria-controls": O,
1644
- "aria-describedby": B,
1645
+ "aria-expanded": O,
1646
+ "aria-controls": D,
1647
+ "aria-describedby": z,
1645
1648
  "aria-invalid": !!u,
1646
- onClick: () => A((e) => !e),
1649
+ onClick: () => k((e) => !e),
1647
1650
  onKeyDown: (t) => {
1648
1651
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1649
- t.preventDefault(), A(!0);
1652
+ t.preventDefault(), k(!0);
1650
1653
  let n = t.key === "ArrowDown" ? 1 : -1;
1651
1654
  requestAnimationFrame(() => {
1652
1655
  H(t.key === "ArrowDown" ? 0 : e.length - 1, n);
1653
1656
  });
1654
1657
  }
1655
- if (t.key === "Enter" && k) {
1658
+ if (t.key === "Enter" && O) {
1656
1659
  t.preventDefault();
1657
1660
  let n = e.findIndex((e) => e.value === r);
1658
1661
  H(n >= 0 ? n : 0, 1);
1659
1662
  }
1660
1663
  },
1661
1664
  children: [/* @__PURE__ */ t("span", {
1662
- className: `${L ? Z.value : Z.placeholder}
1663
- ${Z[v]}`,
1664
- children: L?.label ?? a
1665
+ className: `${I ? X.value : X.placeholder}
1666
+ ${X[v]}`,
1667
+ children: I?.label ?? a
1665
1668
  }), /* @__PURE__ */ t("span", {
1666
- className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
1669
+ className: [X.chevron, O ? X.chevronOpen : ""].filter(Boolean).join(" "),
1667
1670
  "aria-hidden": "true",
1668
- children: /* @__PURE__ */ t(J, {
1671
+ children: /* @__PURE__ */ t(K, {
1669
1672
  name: "IconChevron",
1670
1673
  width: 20,
1671
1674
  height: 20
@@ -1673,38 +1676,38 @@ var M = {
1673
1676
  })]
1674
1677
  })
1675
1678
  }),
1676
- k && _(ne, document.body),
1679
+ O && _(re, document.body),
1677
1680
  y && !u && /* @__PURE__ */ t("span", {
1678
- id: R,
1679
- className: Z.message,
1681
+ id: L,
1682
+ className: X.message,
1680
1683
  children: y
1681
1684
  }),
1682
1685
  u && /* @__PURE__ */ t("span", {
1683
- id: z,
1684
- className: Z.error,
1686
+ id: R,
1687
+ className: X.error,
1685
1688
  children: u
1686
1689
  })
1687
1690
  ]
1688
1691
  });
1689
- }, $e = (e) => `${e.id}:${e.direction}`, et = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
1692
+ }, et = (e) => `${e.id}:${e.direction}`, tt = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
1690
1693
  let c = e.flatMap((e) => [{
1691
- value: $e({
1694
+ value: et({
1692
1695
  id: e.id,
1693
1696
  direction: "asc"
1694
1697
  }),
1695
1698
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
1696
1699
  disabled: e.disabled
1697
1700
  }, {
1698
- value: $e({
1701
+ value: et({
1699
1702
  id: e.id,
1700
1703
  direction: "desc"
1701
1704
  }),
1702
1705
  label: e.descLabel ?? `${e.label} · по убыванию`,
1703
1706
  disabled: e.disabled
1704
1707
  }]);
1705
- return /* @__PURE__ */ t(Qe, {
1708
+ return /* @__PURE__ */ t($e, {
1706
1709
  options: c,
1707
- value: n ? $e(n) : "",
1710
+ value: n ? et(n) : "",
1708
1711
  label: i,
1709
1712
  placeholder: a,
1710
1713
  disabled: o,
@@ -1717,7 +1720,7 @@ var M = {
1717
1720
  });
1718
1721
  }
1719
1722
  });
1720
- }, tt = {
1723
+ }, nt = {
1721
1724
  wrapper: "_wrapper_1khfq_1",
1722
1725
  control: "_control_1khfq_15",
1723
1726
  input: "_input_1khfq_25",
@@ -1727,40 +1730,40 @@ var M = {
1727
1730
  lg: "_lg_1khfq_139",
1728
1731
  inputError: "_inputError_1khfq_155",
1729
1732
  trailingAction: "_trailingAction_1khfq_163"
1730
- }, nt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: E, ...D }) => {
1731
- let O = f(), k = v ?? `ds-input-${_ ?? O}`, A = h(null), [j, M] = g(!1), P = p ? `${k}-hint` : void 0, F = u ? `${k}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? j ? "text" : "password" : i;
1733
+ }, rt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: ee = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
1734
+ let D = f(), O = v ?? `ds-input-${_ ?? D}`, k = h(null), [A, j] = g(!1), N = p ? `${O}-hint` : void 0, P = u ? `${O}-error` : void 0, F = String(e ?? ""), I = [N, P].filter(Boolean).join(" ") || void 0, L = C ? A ? "text" : "password" : i;
1732
1735
  return d(() => {
1733
- C || M(!1);
1736
+ C || j(!1);
1734
1737
  }, [C]), /* @__PURE__ */ n("div", {
1735
- className: `${tt.wrapper} ${m}`,
1738
+ className: `${nt.wrapper} ${m}`,
1736
1739
  children: [
1737
- l && /* @__PURE__ */ t(ee, {
1738
- htmlFor: k,
1740
+ l && /* @__PURE__ */ t(te, {
1741
+ htmlFor: O,
1739
1742
  required: x,
1740
1743
  disabled: o,
1741
1744
  children: l
1742
1745
  }),
1743
1746
  o && c ? /* @__PURE__ */ t("div", {
1744
- id: k,
1745
- className: tt.disabledText,
1746
- "aria-describedby": L,
1747
- children: I || a
1747
+ id: O,
1748
+ className: nt.disabledText,
1749
+ "aria-describedby": I,
1750
+ children: F || a
1748
1751
  }) : /* @__PURE__ */ n("div", {
1749
- className: tt.control,
1752
+ className: nt.control,
1750
1753
  children: [
1751
1754
  /* @__PURE__ */ t("input", {
1752
- ref: A,
1753
- id: k,
1755
+ ref: k,
1756
+ id: O,
1754
1757
  name: _,
1755
- type: R,
1756
- value: I,
1758
+ type: L,
1759
+ value: F,
1757
1760
  placeholder: a,
1758
1761
  disabled: o,
1759
1762
  readOnly: s,
1760
1763
  required: x,
1761
1764
  "aria-invalid": !!u,
1762
- "aria-describedby": L,
1763
- className: `${tt.input} ${tt[y]} ${u ? tt.inputError : ""}`,
1765
+ "aria-describedby": I,
1766
+ className: `${nt.input} ${nt[y]} ${u ? nt.inputError : ""}`,
1764
1767
  onChange: (e) => {
1765
1768
  if (i === "number" && !C) {
1766
1769
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1770,32 +1773,32 @@ var M = {
1770
1773
  r?.(e.target.value, e);
1771
1774
  },
1772
1775
  onFocus: (e) => {
1773
- S && e.currentTarget.value && e.currentTarget.select(), E?.(e);
1776
+ S && e.currentTarget.value && e.currentTarget.select(), T?.(e);
1774
1777
  },
1775
- ...D
1778
+ ...E
1776
1779
  }),
1777
1780
  C && /* @__PURE__ */ t("button", {
1778
1781
  type: "button",
1779
- className: tt.trailingAction,
1782
+ className: nt.trailingAction,
1780
1783
  disabled: o,
1781
- "aria-label": j ? w : T,
1782
- "aria-pressed": j,
1783
- onClick: () => M((e) => !e),
1784
- children: /* @__PURE__ */ t(J, {
1785
- name: j ? "IconEyeOff" : "IconEye",
1784
+ "aria-label": A ? ee : w,
1785
+ "aria-pressed": A,
1786
+ onClick: () => j((e) => !e),
1787
+ children: /* @__PURE__ */ t(K, {
1788
+ name: A ? "IconEyeOff" : "IconEye",
1786
1789
  width: 20,
1787
1790
  height: 20
1788
1791
  })
1789
1792
  }),
1790
- !C && b && I && !o && !s && /* @__PURE__ */ t("button", {
1793
+ !C && b && F && !o && !s && /* @__PURE__ */ t("button", {
1791
1794
  type: "button",
1792
- className: tt.trailingAction,
1795
+ className: nt.trailingAction,
1793
1796
  "aria-label": "Очистить поле",
1794
1797
  onClick: () => {
1795
- let e = A.current;
1798
+ let e = k.current;
1796
1799
  e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
1797
1800
  },
1798
- children: /* @__PURE__ */ t(J, {
1801
+ children: /* @__PURE__ */ t(K, {
1799
1802
  name: "IconCross",
1800
1803
  width: 20,
1801
1804
  height: 20
@@ -1803,80 +1806,80 @@ var M = {
1803
1806
  })
1804
1807
  ]
1805
1808
  }),
1806
- p && !u && /* @__PURE__ */ t(N, {
1807
- id: P,
1809
+ p && !u && /* @__PURE__ */ t(M, {
1810
+ id: N,
1808
1811
  children: p
1809
1812
  }),
1810
- u && /* @__PURE__ */ t(N, {
1811
- id: F,
1813
+ u && /* @__PURE__ */ t(M, {
1814
+ id: P,
1812
1815
  variant: "error",
1813
1816
  children: u
1814
1817
  })
1815
1818
  ]
1816
1819
  });
1817
- }, rt = 8, it = 6, at = 120, ot = (e) => {
1820
+ }, it = 8, at = 6, ot = 120, st = (e) => {
1818
1821
  if (typeof e == "number") return e;
1819
1822
  if (typeof e == "string") {
1820
1823
  let t = Number.parseFloat(e);
1821
1824
  if (Number.isFinite(t)) return t;
1822
1825
  }
1823
1826
  return Infinity;
1824
- }, st = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
1825
- let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0, te = [z, B].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
1826
- let e = F.current, t = I.current;
1827
+ }, ct = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: ee = !1, needMark: w = !0, maxMenuHeight: T }) => {
1828
+ let E = f(), D = C ?? `ds-dropdown-multiple-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), R = b ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
1829
+ let e = P.current, t = F.current;
1827
1830
  if (!e || !t) return;
1828
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - rt, a = n.top - rt, o = i < r.height && a > i, s = Math.max(at, o ? a : i), c = window.innerWidth - n.width - rt;
1829
- N({
1830
- top: o ? Math.max(rt, n.top - r.height - it) : n.bottom + it,
1831
- left: Math.max(rt, Math.min(n.left, c)),
1831
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - it, a = n.top - it, o = i < r.height && a > i, s = Math.max(ot, o ? a : i), c = window.innerWidth - n.width - it;
1832
+ M({
1833
+ top: o ? Math.max(it, n.top - r.height - at) : n.bottom + at,
1834
+ left: Math.max(it, Math.min(n.left, c)),
1832
1835
  width: n.width,
1833
- maxHeight: Math.min(s, ot(E))
1836
+ maxHeight: Math.min(s, st(T))
1834
1837
  });
1835
- }, [E]);
1838
+ }, [T]);
1836
1839
  p(() => {
1837
- if (!A) {
1838
- N(null);
1840
+ if (!k) {
1841
+ M(null);
1839
1842
  return;
1840
1843
  }
1841
1844
  return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
1842
1845
  window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
1843
1846
  };
1844
1847
  }, [
1845
- A,
1848
+ k,
1846
1849
  e.length,
1847
1850
  H
1848
1851
  ]), d(() => {
1849
- if (!A) return;
1852
+ if (!k) return;
1850
1853
  let e = (e) => {
1851
1854
  let t = e.target;
1852
- !P.current?.contains(t) && !I.current?.contains(t) && j(!1);
1855
+ !N.current?.contains(t) && !F.current?.contains(t) && A(!1);
1853
1856
  }, t = (e) => {
1854
- e.key === "Escape" && (j(!1), F.current?.focus());
1857
+ e.key === "Escape" && (A(!1), P.current?.focus());
1855
1858
  };
1856
1859
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
1857
1860
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
1858
1861
  };
1859
- }, [A]);
1860
- let U = (t, n) => {
1861
- let r = Xe(e, t, n);
1862
- r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
1863
- }, ne = (t) => {
1862
+ }, [k]);
1863
+ let ne = (t, n) => {
1864
+ let r = Ze(e, t, n);
1865
+ r !== -1 && (I.current[r]?.focus(), I.current[r]?.scrollIntoView({ block: "nearest" }));
1866
+ }, re = (t) => {
1864
1867
  if (t.disabled) return;
1865
1868
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
1866
- i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
1867
- }, re = A ? /* @__PURE__ */ t("ul", {
1868
- ref: I,
1869
- id: k,
1870
- className: Z.menu,
1869
+ i?.(n, e.filter((e) => n.includes(e.value))), ee && (A(!1), P.current?.focus());
1870
+ }, ie = k ? /* @__PURE__ */ t("ul", {
1871
+ ref: F,
1872
+ id: O,
1873
+ className: X.menu,
1871
1874
  role: "listbox",
1872
1875
  "aria-label": c,
1873
1876
  "aria-multiselectable": "true",
1874
- style: M ? {
1877
+ style: j ? {
1875
1878
  position: "fixed",
1876
- top: M.top,
1877
- left: M.left,
1878
- width: M.width,
1879
- maxHeight: M.maxHeight
1879
+ top: j.top,
1880
+ left: j.left,
1881
+ width: j.width,
1882
+ maxHeight: j.maxHeight
1880
1883
  } : {
1881
1884
  position: "fixed",
1882
1885
  top: 0,
@@ -1890,32 +1893,34 @@ var M = {
1890
1893
  role: "presentation",
1891
1894
  children: /* @__PURE__ */ n("button", {
1892
1895
  ref: (e) => {
1893
- L.current[a] = e;
1896
+ I.current[a] = e;
1894
1897
  },
1895
1898
  type: "button",
1896
1899
  role: "option",
1897
1900
  "aria-selected": o,
1898
1901
  disabled: i.disabled,
1902
+ "data-option-variant": i.variant ?? "default",
1899
1903
  className: [
1900
- Z[v],
1901
- Z.option,
1902
- o ? Z.selected : ""
1904
+ X[v],
1905
+ X.option,
1906
+ i.variant === "action" ? X.actionOption : "",
1907
+ o ? X.selected : ""
1903
1908
  ].filter(Boolean).join(" "),
1904
- onClick: () => ne(i),
1909
+ onClick: () => re(i),
1905
1910
  onKeyDown: (t) => {
1906
1911
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1907
1912
  t.preventDefault();
1908
1913
  let e = t.key === "ArrowDown" ? 1 : -1;
1909
- U(a + e, e);
1914
+ ne(a + e, e);
1910
1915
  }
1911
1916
  if (t.key === "Home" || t.key === "End") {
1912
1917
  t.preventDefault();
1913
1918
  let n = t.key === "Home" ? 1 : -1;
1914
- U(t.key === "Home" ? 0 : e.length - 1, n);
1919
+ ne(t.key === "Home" ? 0 : e.length - 1, n);
1915
1920
  }
1916
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i)), t.key === "Tab" && j(!1);
1921
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), re(i)), t.key === "Tab" && A(!1);
1917
1922
  },
1918
- children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(J, {
1923
+ children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(K, {
1919
1924
  name: "IconCheck",
1920
1925
  width: 16,
1921
1926
  height: 16
@@ -1925,53 +1930,53 @@ var M = {
1925
1930
  })
1926
1931
  }) : null;
1927
1932
  return /* @__PURE__ */ n("div", {
1928
- ref: P,
1933
+ ref: N,
1929
1934
  className: [
1930
- Z.wrapper,
1931
- u ? Z.errorState : "",
1935
+ X.wrapper,
1936
+ u ? X.errorState : "",
1932
1937
  x
1933
1938
  ].filter(Boolean).join(" "),
1934
1939
  children: [
1935
- c && /* @__PURE__ */ t(ee, {
1936
- htmlFor: V ? void 0 : O,
1940
+ c && /* @__PURE__ */ t(te, {
1941
+ htmlFor: V ? void 0 : D,
1937
1942
  required: y,
1938
1943
  disabled: o,
1939
1944
  children: c
1940
1945
  }),
1941
1946
  /* @__PURE__ */ t("div", {
1942
- className: Z.container,
1947
+ className: X.container,
1943
1948
  children: V ? /* @__PURE__ */ t("div", {
1944
- id: O,
1945
- className: `${Z.disabledText} ${Z[v]}`,
1946
- "aria-describedby": te,
1947
- children: R || a
1949
+ id: D,
1950
+ className: `${X.disabledText} ${X[v]}`,
1951
+ "aria-describedby": B,
1952
+ children: L || a
1948
1953
  }) : /* @__PURE__ */ n("button", {
1949
- ref: F,
1950
- id: O,
1954
+ ref: P,
1955
+ id: D,
1951
1956
  type: "button",
1952
1957
  name: S,
1953
- className: `${Z.trigger} ${Z[v]}`,
1958
+ className: `${X.trigger} ${X[v]}`,
1954
1959
  disabled: o,
1955
1960
  "aria-haspopup": "listbox",
1956
- "aria-expanded": A,
1957
- "aria-controls": k,
1958
- "aria-describedby": te,
1961
+ "aria-expanded": k,
1962
+ "aria-controls": O,
1963
+ "aria-describedby": B,
1959
1964
  "aria-invalid": !!u,
1960
- onClick: () => j((e) => !e),
1965
+ onClick: () => A((e) => !e),
1961
1966
  onKeyDown: (t) => {
1962
1967
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1963
- t.preventDefault(), j(!0);
1968
+ t.preventDefault(), A(!0);
1964
1969
  let n = t.key === "ArrowDown" ? 1 : -1;
1965
- requestAnimationFrame(() => U(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1970
+ requestAnimationFrame(() => ne(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1966
1971
  }
1967
1972
  },
1968
1973
  children: [/* @__PURE__ */ t("span", {
1969
- className: `${R ? Z.value : Z.placeholder} ${Z[v]}`,
1970
- children: R || a
1974
+ className: `${L ? X.value : X.placeholder} ${X[v]}`,
1975
+ children: L || a
1971
1976
  }), /* @__PURE__ */ t("span", {
1972
- className: [Z.chevron, A ? Z.chevronOpen : ""].filter(Boolean).join(" "),
1977
+ className: [X.chevron, k ? X.chevronOpen : ""].filter(Boolean).join(" "),
1973
1978
  "aria-hidden": "true",
1974
- children: /* @__PURE__ */ t(J, {
1979
+ children: /* @__PURE__ */ t(K, {
1975
1980
  name: "IconChevron",
1976
1981
  width: 20,
1977
1982
  height: 20
@@ -1979,35 +1984,35 @@ var M = {
1979
1984
  })]
1980
1985
  })
1981
1986
  }),
1982
- A && _(re, document.body),
1987
+ k && _(ie, document.body),
1983
1988
  b && !u && /* @__PURE__ */ t("span", {
1984
- id: z,
1985
- className: Z.message,
1989
+ id: R,
1990
+ className: X.message,
1986
1991
  children: b
1987
1992
  }),
1988
1993
  u && /* @__PURE__ */ t("span", {
1989
- id: B,
1990
- className: Z.error,
1994
+ id: z,
1995
+ className: X.error,
1991
1996
  children: u
1992
1997
  })
1993
1998
  ]
1994
1999
  });
1995
- }, ct = {
2000
+ }, lt = {
1996
2001
  wrapper: "_wrapper_1jspu_1",
1997
2002
  input: "_input_1jspu_21",
1998
2003
  switch: "_switch_1jspu_35",
1999
2004
  thumb: "_thumb_1jspu_67",
2000
2005
  label: "_label_1jspu_113",
2001
2006
  disabled: "_disabled_1jspu_125"
2002
- }, lt = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
2007
+ }, ut = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
2003
2008
  let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
2004
2009
  return /* @__PURE__ */ n("label", {
2005
2010
  htmlFor: p,
2006
- className: `${ct.wrapper} ${a ? ct.disabled : ""} ${s}`,
2011
+ className: `${lt.wrapper} ${a ? lt.disabled : ""} ${s}`,
2007
2012
  children: [
2008
2013
  /* @__PURE__ */ t("input", {
2009
2014
  id: p,
2010
- className: ct.input,
2015
+ className: lt.input,
2011
2016
  type: "checkbox",
2012
2017
  role: "switch",
2013
2018
  name: c,
@@ -2020,75 +2025,79 @@ var M = {
2020
2025
  }
2021
2026
  }),
2022
2027
  /* @__PURE__ */ t("span", {
2023
- className: ct.switch,
2028
+ className: lt.switch,
2024
2029
  "aria-hidden": "true",
2025
- children: /* @__PURE__ */ t("span", { className: ct.thumb })
2030
+ children: /* @__PURE__ */ t("span", { className: lt.thumb })
2026
2031
  }),
2027
2032
  i && /* @__PURE__ */ t("span", {
2028
- className: ct.label,
2033
+ className: lt.label,
2029
2034
  children: i
2030
2035
  })
2031
2036
  ]
2032
2037
  });
2033
- }, Q = {
2034
- root: "_root_s4pi9_1",
2035
- srOnly: "_srOnly_s4pi9_15",
2036
- bulkActions: "_bulkActions_s4pi9_39",
2037
- filterBar: "_filterBar_s4pi9_61",
2038
- filterFields: "_filterFields_s4pi9_79",
2039
- filterActions: "_filterActions_s4pi9_93",
2040
- pageSizePanel: "_pageSizePanel_s4pi9_105",
2041
- embedded: "_embedded_s4pi9_105",
2042
- pendingChanges: "_pendingChanges_s4pi9_117",
2043
- tableWrap: "_tableWrap_s4pi9_129",
2044
- table: "_table_s4pi9_129",
2045
- compact: "_compact_s4pi9_179",
2046
- selectionColumn: "_selectionColumn_s4pi9_209",
2047
- expansionColumn: "_expansionColumn_s4pi9_217",
2048
- expansionCell: "_expansionCell_s4pi9_219",
2049
- expansionIcon: "_expansionIcon_s4pi9_231",
2050
- expansionIconOpen: "_expansionIconOpen_s4pi9_241",
2051
- detailRow: "_detailRow_s4pi9_251",
2052
- stickyColumn: "_stickyColumn_s4pi9_261",
2053
- selectionHeaderCell: "_selectionHeaderCell_s4pi9_281",
2054
- selectionCell: "_selectionCell_s4pi9_283",
2055
- selectionHeaderControls: "_selectionHeaderControls_s4pi9_295",
2056
- mobileSelectionControls: "_mobileSelectionControls_s4pi9_297",
2057
- cardSelectionControls: "_cardSelectionControls_s4pi9_299",
2058
- selectedRow: "_selectedRow_s4pi9_313",
2059
- sticky: "_sticky_s4pi9_261",
2060
- sortButton: "_sortButton_s4pi9_351",
2061
- state: "_state_s4pi9_389",
2062
- cards: "_cards_s4pi9_401",
2063
- mobileSort: "_mobileSort_s4pi9_401",
2064
- card: "_card_s4pi9_299",
2065
- spanTwo: "_spanTwo_s4pi9_489",
2066
- selectedCard: "_selectedCard_s4pi9_497",
2067
- customCardShell: "_customCardShell_s4pi9_531",
2068
- clickableRow: "_clickableRow_s4pi9_543",
2069
- cardDetail: "_cardDetail_s4pi9_561",
2070
- pagination: "_pagination_s4pi9_587",
2071
- bottom: "_bottom_s4pi9_635",
2072
- pageSizeMain: "_pageSizeMain_s4pi9_649",
2073
- pageSizeOptions: "_pageSizeOptions_s4pi9_651",
2074
- pageSizeFieldset: "_pageSizeFieldset_s4pi9_663",
2075
- pageSizeOption: "_pageSizeOption_s4pi9_651",
2076
- pageSizeOptionActive: "_pageSizeOptionActive_s4pi9_741",
2077
- pageSizeWarning: "_pageSizeWarning_s4pi9_755",
2078
- paginationRange: "_paginationRange_s4pi9_767",
2079
- paginationControls: "_paginationControls_s4pi9_779",
2080
- pageNumbers: "_pageNumbers_s4pi9_781",
2081
- pageButton: "_pageButton_s4pi9_793",
2082
- ellipsis: "_ellipsis_s4pi9_803",
2083
- previousIcon: "_previousIcon_s4pi9_815",
2084
- nextIcon: "_nextIcon_s4pi9_823",
2085
- default: "_default_s4pi9_923",
2086
- tableOnMobile: "_tableOnMobile_s4pi9_923",
2087
- wide: "_wide_s4pi9_953"
2088
- }, ut = b({
2038
+ }, Z = {
2039
+ root: "_root_y4bhr_1",
2040
+ toolbar: "_toolbar_y4bhr_15",
2041
+ totalWidget: "_totalWidget_y4bhr_31",
2042
+ totalLabel: "_totalLabel_y4bhr_53",
2043
+ totalValue: "_totalValue_y4bhr_63",
2044
+ srOnly: "_srOnly_y4bhr_77",
2045
+ bulkActions: "_bulkActions_y4bhr_101",
2046
+ filterBar: "_filterBar_y4bhr_123",
2047
+ filterFields: "_filterFields_y4bhr_141",
2048
+ filterActions: "_filterActions_y4bhr_155",
2049
+ pageSizePanel: "_pageSizePanel_y4bhr_167",
2050
+ embedded: "_embedded_y4bhr_167",
2051
+ pendingChanges: "_pendingChanges_y4bhr_179",
2052
+ tableWrap: "_tableWrap_y4bhr_191",
2053
+ table: "_table_y4bhr_191",
2054
+ compact: "_compact_y4bhr_241",
2055
+ selectionColumn: "_selectionColumn_y4bhr_279",
2056
+ expansionColumn: "_expansionColumn_y4bhr_287",
2057
+ expansionCell: "_expansionCell_y4bhr_289",
2058
+ expansionIcon: "_expansionIcon_y4bhr_301",
2059
+ expansionIconOpen: "_expansionIconOpen_y4bhr_311",
2060
+ detailRow: "_detailRow_y4bhr_321",
2061
+ stickyColumn: "_stickyColumn_y4bhr_331",
2062
+ selectionHeaderCell: "_selectionHeaderCell_y4bhr_367",
2063
+ selectionCell: "_selectionCell_y4bhr_369",
2064
+ selectionHeaderControls: "_selectionHeaderControls_y4bhr_381",
2065
+ mobileSelectionControls: "_mobileSelectionControls_y4bhr_383",
2066
+ cardSelectionControls: "_cardSelectionControls_y4bhr_385",
2067
+ selectedRow: "_selectedRow_y4bhr_399",
2068
+ sticky: "_sticky_y4bhr_331",
2069
+ sortButton: "_sortButton_y4bhr_437",
2070
+ state: "_state_y4bhr_475",
2071
+ cards: "_cards_y4bhr_487",
2072
+ mobileSort: "_mobileSort_y4bhr_487",
2073
+ card: "_card_y4bhr_385",
2074
+ spanTwo: "_spanTwo_y4bhr_575",
2075
+ selectedCard: "_selectedCard_y4bhr_583",
2076
+ customCardShell: "_customCardShell_y4bhr_617",
2077
+ clickableRow: "_clickableRow_y4bhr_631",
2078
+ cardDetail: "_cardDetail_y4bhr_649",
2079
+ pagination: "_pagination_y4bhr_675",
2080
+ bottom: "_bottom_y4bhr_723",
2081
+ pageSizeMain: "_pageSizeMain_y4bhr_737",
2082
+ pageSizeOptions: "_pageSizeOptions_y4bhr_739",
2083
+ pageSizeFieldset: "_pageSizeFieldset_y4bhr_751",
2084
+ pageSizeOption: "_pageSizeOption_y4bhr_739",
2085
+ pageSizeOptionActive: "_pageSizeOptionActive_y4bhr_829",
2086
+ pageSizeWarning: "_pageSizeWarning_y4bhr_843",
2087
+ paginationRange: "_paginationRange_y4bhr_855",
2088
+ paginationControls: "_paginationControls_y4bhr_867",
2089
+ pageNumbers: "_pageNumbers_y4bhr_869",
2090
+ pageButton: "_pageButton_y4bhr_881",
2091
+ ellipsis: "_ellipsis_y4bhr_891",
2092
+ previousIcon: "_previousIcon_y4bhr_903",
2093
+ nextIcon: "_nextIcon_y4bhr_911",
2094
+ default: "_default_y4bhr_1011",
2095
+ tableOnMobile: "_tableOnMobile_y4bhr_1011",
2096
+ wide: "_wide_y4bhr_1041"
2097
+ }, dt = b({
2089
2098
  rowSortingFeature: y,
2090
2099
  sortedRowModel: v()
2091
- }), dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
2100
+ }), ft = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
2092
2101
  let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
2093
2102
  return d(() => {
2094
2103
  if (o === void 0) return;
@@ -2104,7 +2113,7 @@ var M = {
2104
2113
  }), () => {
2105
2114
  e = !1;
2106
2115
  };
2107
- }, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(st, {
2116
+ }, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(ct, {
2108
2117
  label: e.label,
2109
2118
  options: s,
2110
2119
  value: Array.isArray(n) ? n.map(String) : [],
@@ -2112,7 +2121,7 @@ var M = {
2112
2121
  placeholder: l ? "Загрузка…" : e.placeholder,
2113
2122
  error: a,
2114
2123
  onChange: (e) => r(e)
2115
- }) : e.type === "switch" ? /* @__PURE__ */ t(lt, {
2124
+ }) : e.type === "switch" ? /* @__PURE__ */ t(ut, {
2116
2125
  label: e.label,
2117
2126
  checked: !!n,
2118
2127
  disabled: i,
@@ -2122,7 +2131,7 @@ var M = {
2122
2131
  setValue: r,
2123
2132
  disabled: i,
2124
2133
  error: a
2125
- }) : /* @__PURE__ */ t(nt, {
2134
+ }) : /* @__PURE__ */ t(rt, {
2126
2135
  label: e.label,
2127
2136
  type: e.type === "search" ? "search" : "text",
2128
2137
  value: String(n ?? ""),
@@ -2131,20 +2140,20 @@ var M = {
2131
2140
  error: a,
2132
2141
  onChange: (e) => r(e)
2133
2142
  });
2134
- }, ft = (e, t, n) => {
2143
+ }, pt = (e, t, n) => {
2135
2144
  let r = new Set(e);
2136
2145
  return t.forEach((e) => {
2137
2146
  n ? r.add(e) : r.delete(e);
2138
2147
  }), Array.from(r);
2139
- }, pt = (e) => {
2148
+ }, mt = (e) => {
2140
2149
  if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
2141
2150
  width: e.width,
2142
2151
  minWidth: e.minWidth,
2143
2152
  maxWidth: e.maxWidth
2144
2153
  };
2145
- }, mt = (e) => {
2154
+ }, ht = (e) => {
2146
2155
  if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
2147
- }, ht = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
2156
+ }, gt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
2148
2157
  0,
2149
2158
  1,
2150
2159
  2,
@@ -2168,7 +2177,7 @@ var M = {
2168
2177
  e + 1,
2169
2178
  "ellipsis-end",
2170
2179
  t - 1
2171
- ], gt = (e, t) => {
2180
+ ], _t = (e, t) => {
2172
2181
  let n = /* @__PURE__ */ new Set();
2173
2182
  for (let t of e) {
2174
2183
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -2180,36 +2189,36 @@ var M = {
2180
2189
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
2181
2190
  }
2182
2191
  return null;
2183
- }, _t = (e, t) => typeof e == "function" ? e(t) : t[e], vt = (e) => {
2192
+ }, vt = (e, t) => typeof e == "function" ? e(t) : t[e], yt = (e) => {
2184
2193
  if (e == null || e === "") return null;
2185
2194
  let t = Date.parse(String(e));
2186
2195
  return Number.isNaN(t) ? null : t;
2187
- }, yt = (e, t, n) => {
2188
- let r = vt(e.getValue(n)), i = vt(t.getValue(n));
2189
- return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
2190
2196
  }, bt = (e, t, n) => {
2197
+ let r = yt(e.getValue(n)), i = yt(t.getValue(n));
2198
+ return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
2199
+ }, xt = (e, t, n) => {
2191
2200
  let r = e.getValue(n), i = t.getValue(n);
2192
2201
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
2193
- }, xt = (e, t, n) => {
2202
+ }, St = (e, t, n) => {
2194
2203
  let r = e.getValue(n), i = t.getValue(n);
2195
2204
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
2196
- }, St = (e, t, n) => {
2205
+ }, Ct = (e, t, n) => {
2197
2206
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
2198
2207
  return r.localeCompare(i, void 0, {
2199
2208
  numeric: !0,
2200
2209
  sensitivity: "base"
2201
2210
  });
2202
- }, Ct = (e) => {
2211
+ }, wt = (e) => {
2203
2212
  switch (e) {
2204
- case "date": return yt;
2205
- case "number": return bt;
2206
- case "boolean": return xt;
2213
+ case "date": return bt;
2214
+ case "number": return xt;
2215
+ case "boolean": return St;
2207
2216
  case "text":
2208
- case void 0: return St;
2217
+ case void 0: return Ct;
2209
2218
  case "custom": return;
2210
2219
  }
2211
- }, wt = (e) => {
2212
- let t = (t) => _t(e.accessor, t), n = e.sortFn ?? Ct(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
2220
+ }, Tt = (e) => {
2221
+ let t = (t) => vt(e.accessor, t), n = e.sortFn ?? wt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
2213
2222
  id: e.id,
2214
2223
  accessorFn: t,
2215
2224
  header: () => e.header,
@@ -2221,276 +2230,290 @@ var M = {
2221
2230
  sortDescFirst: e.sortDescFirst
2222
2231
  };
2223
2232
  return n !== void 0 && (i.sortFn = n), i;
2224
- }, Tt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, caption: p, ariaLabel: h, loading: _ = !1, error: v, emptyState: y = "Нет данных", stickyHeader: b = !1, maxHeight: S, className: C = "", onRowClick: w, selectable: T = !1, selectedRowIds: E, onSelectedRowIdsChange: D, onRowDoubleClick: O, getRowSelectionLabel: k, selectAllRowsLabel: A = "Выбрать все строки на этой странице", resetSelectionLabel: M = "Сбросить выбор", openRowLabel: ee = "Открыть строку", pagination: N = !1, paginationMode: P = "client", page: F = 1, pageSize: I = 30, onPageSizeChange: L, pageSizeOptions: R = [
2233
+ }, Et = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: ee, emptyState: w = "Нет данных", stickyHeader: T = !1, maxHeight: E, className: D = "", onRowClick: O, selectable: k = !1, selectedRowIds: j, onSelectedRowIdsChange: te, onRowDoubleClick: M, getRowSelectionLabel: N, selectAllRowsLabel: P = "Выбрать все строки на этой странице", resetSelectionLabel: F = "Сбросить выбор", openRowLabel: I = "Открыть строку", pagination: L = !1, paginationMode: R = "client", page: z = 1, pageSize: B = 30, onPageSizeChange: V, pageSizeOptions: H = [
2225
2234
  10,
2226
2235
  30,
2227
2236
  50,
2228
2237
  -1
2229
- ], pageSizeDraft: z, onPageSizeDraftChange: B, pageSizeApplyMode: te = "table", totalCount: V, onPageChange: H, visibleColumnIds: U, density: ne = "comfortable", renderBulkActions: re, renderExpandedRow: W, expandedRowIds: ie, onExpandedRowIdsChange: ae, getRowExpansionLabel: oe, resultsAnnouncement: se, filterBar: G }) => {
2230
- let [K, ce] = g([]), [le, ue] = g([]), [de, fe] = g([]), [pe, me] = g(0), [he, ge] = g(I === -1 ? -1 : [
2238
+ ], pageSizeDraft: ne, onPageSizeDraftChange: re, pageSizeApplyMode: ie = "table", totalCount: ae, onPageChange: oe, visibleColumnIds: se, density: ce = "comfortable", renderBulkActions: le, renderExpandedRow: ue, expandedRowIds: U, onExpandedRowIdsChange: de, getRowExpansionLabel: fe, resultsAnnouncement: pe, filterBar: W }) => {
2239
+ let [me, he] = g([]), [ge, _e] = g([]), [ve, ye] = g([]), [be, xe] = g(0), [G, Se] = g(B === -1 ? -1 : [
2231
2240
  10,
2232
2241
  30,
2233
2242
  50
2234
- ].includes(I) ? I : 30), _e = c ?? K, ve = _e.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), ye = I === -1, q = ye ? Math.max(1, (P === "server" ? Number(V) : i.length) || i.length || 1) : Number.isFinite(I) && I > 0 ? Math.floor(I) : 30, be = N && P === "server", Y = m(() => {
2235
- if (U === void 0) return e;
2236
- let t = new Set(U);
2243
+ ].includes(B) ? B : 30), Ce = c ?? me, q = Ce.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Te = B === -1, Ee = Te ? Math.max(1, (R === "server" ? Number(ae) : i.length) || i.length || 1) : Number.isFinite(B) && B > 0 ? Math.floor(B) : 30, J = L && R === "server", Y = m(() => {
2244
+ if (se === void 0) return e;
2245
+ let t = new Set(se);
2237
2246
  return e.filter((e) => t.has(e.id));
2238
- }, [e, U]), X = m(() => Y.length === 0 ? "Должна быть видима хотя бы одна колонка" : gt(Y, i), [i, Y]), Se = m(() => Y.map(wt), [Y]), Ce = Y.some((e) => pt(e) !== void 0), we = x({
2239
- features: ut,
2240
- columns: Se,
2247
+ }, [e, se]), De = m(() => Y.length === 0 ? "Должна быть видима хотя бы одна колонка" : _t(Y, i), [i, Y]), Oe = m(() => Y.map(Tt), [Y]), ke = Y.some((e) => mt(e) !== void 0), Ae = x({
2248
+ features: dt,
2249
+ columns: Oe,
2241
2250
  data: i,
2242
- state: { sorting: _e },
2251
+ state: { sorting: Ce },
2243
2252
  onSortingChange: (e) => {
2244
- let t = typeof e == "function" ? e(_e) : e;
2245
- c === void 0 && ce(t), me(0), l?.(t);
2253
+ let t = typeof e == "function" ? e(Ce) : e;
2254
+ c === void 0 && he(t), xe(0), l?.(t);
2246
2255
  },
2247
2256
  getRowId: f
2248
- }), Te = we.getRowModel().rows, Ee = be && Number.isFinite(V) && Number(V) >= 0 ? Math.floor(Number(V)) : Te.length, De = N ? Math.max(1, Math.ceil(Ee / q)) : 1, Oe = Number.isFinite(F) && F > 0 ? Math.floor(F) - 1 : 0, ke = Math.min(be ? Oe : pe, De - 1), Ae = m(() => N && !be ? Te.slice(ke * q, (ke + 1) * q) : Te, [
2249
- be,
2250
- q,
2251
- N,
2252
- ke,
2253
- Te
2254
- ]), je = E ?? le, Me = m(() => new Set(je), [je]), Ne = ie ?? de, Pe = m(() => new Set(Ne), [Ne]), Fe = m(() => Ae.map((e) => e.id), [Ae]), Ie = Fe.filter((e) => Me.has(e)).length, Le = Fe.length > 0 && Ie === Fe.length, Re = Ie > 0 && !Le, ze = m(() => Y.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
2257
+ }), je = Ae.getRowModel().rows, Me = J && Number.isFinite(ae) && Number(ae) >= 0 ? Math.floor(Number(ae)) : je.length, Ne = L ? Math.max(1, Math.ceil(Me / Ee)) : 1, Pe = Number.isFinite(z) && z > 0 ? Math.floor(z) - 1 : 0, Fe = Math.min(J ? Pe : be, Ne - 1), Ie = m(() => L && !J ? je.slice(Fe * Ee, (Fe + 1) * Ee) : je, [
2258
+ J,
2259
+ Ee,
2260
+ L,
2261
+ Fe,
2262
+ je
2263
+ ]), Le = j ?? ge, Re = m(() => new Set(Le), [Le]), ze = U ?? ve, Be = m(() => new Set(ze), [ze]), Ve = m(() => Ie.map((e) => e.id), [Ie]), He = Ve.filter((e) => Re.has(e)).length, Ue = Ve.length > 0 && He === Ve.length, We = He > 0 && !Ue, Ge = m(() => Y.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
2255
2264
  id: e.id,
2256
2265
  label: typeof e.header == "string" ? e.header : e.id
2257
- })), [Y]), Be = m(() => ht(ke, De), [De, ke]), Ve = o === void 0 ? a : o === "table", He = [
2258
- Q.root,
2259
- s === "wide" ? Q.wide : Q.default,
2260
- Ve ? Q.tableOnMobile : "",
2261
- ne === "compact" ? Q.compact : "",
2262
- C
2263
- ].filter(Boolean).join(" "), Ue = X ?? v, We = N && !ye && !Ue && Ee > q && (!_ || be), Ge = N && !!(L || B || G), Z = z ?? he, qe = G ? (typeof G.validation == "function" ? G.validation(G.draftValues) : G.validation) ?? {} : {}, Je = G ? JSON.stringify(G.draftValues) !== JSON.stringify(G.appliedValues) || Z !== I : !1, Ye = Object.values(qe).some(Boolean), Xe = Ee === 0 ? 0 : ke * q + 1, Ze = Math.min((ke + 1) * q, Ee), Qe = () => {
2264
- Z !== I && (me(0), H?.(1), L?.(Z));
2265
- }, $e = (e, r = !1) => {
2266
- let i = Z !== I, a = `ds-data-table-page-size-warning-${e}`;
2266
+ })), [Y]), Ke = m(() => gt(Fe, Ne), [Ne, Fe]), X = o === void 0 ? a : o === "table", Je = [
2267
+ Z.root,
2268
+ s === "wide" ? Z.wide : Z.default,
2269
+ X ? Z.tableOnMobile : "",
2270
+ ce === "compact" ? Z.compact : "",
2271
+ D
2272
+ ].filter(Boolean).join(" "), Ye = De ?? ee, Xe = L && !Te && !Ye && Me > Ee && (!C || J), Ze = L && !!(V || re || W), Qe = ne ?? G, $e = W ? (typeof W.validation == "function" ? W.validation(W.draftValues) : W.validation) ?? {} : {}, et = W ? JSON.stringify(W.draftValues) !== JSON.stringify(W.appliedValues) || Qe !== B : !1, nt = Object.values($e).some(Boolean), rt = Me === 0 ? 0 : Fe * Ee + 1, it = Math.min((Fe + 1) * Ee, Me), at = () => {
2273
+ Qe !== B && (xe(0), oe?.(1), V?.(Qe));
2274
+ }, ot = (e, r = !1) => {
2275
+ let i = Qe !== B, a = `ds-data-table-page-size-warning-${e}`;
2267
2276
  return /* @__PURE__ */ n("div", {
2268
- className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
2277
+ className: `${Z.pageSizePanel} ${Z[e]} ${r ? Z.embedded : ""}`,
2269
2278
  children: [
2270
2279
  /* @__PURE__ */ n("div", {
2271
- className: Q.pageSizeMain,
2280
+ className: Z.pageSizeMain,
2272
2281
  children: [/* @__PURE__ */ n("fieldset", {
2273
- className: Q.pageSizeFieldset,
2274
- disabled: _ || G?.applying,
2282
+ className: Z.pageSizeFieldset,
2283
+ disabled: C || W?.applying,
2275
2284
  children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
2276
- className: Q.pageSizeOptions,
2277
- children: R.map((e) => /* @__PURE__ */ t("button", {
2285
+ className: Z.pageSizeOptions,
2286
+ children: H.map((e) => /* @__PURE__ */ t("button", {
2278
2287
  type: "button",
2279
- className: `${Q.pageSizeOption} ${Z === e ? Q.pageSizeOptionActive : ""}`,
2280
- "aria-pressed": Z === e,
2288
+ className: `${Z.pageSizeOption} ${Qe === e ? Z.pageSizeOptionActive : ""}`,
2289
+ "aria-pressed": Qe === e,
2281
2290
  onClick: () => {
2282
- z === void 0 && ge(e), B?.(e);
2291
+ ne === void 0 && Se(e), re?.(e);
2283
2292
  },
2284
2293
  children: e === -1 ? "Все" : e
2285
2294
  }, e))
2286
2295
  })]
2287
- }), te === "table" && !G && /* @__PURE__ */ t(j, {
2296
+ }), ie === "table" && !W && /* @__PURE__ */ t(A, {
2288
2297
  size: "sm",
2289
- disabled: _ || !i,
2290
- "aria-describedby": Z === -1 && i && e === "top" ? a : void 0,
2291
- onClick: Qe,
2298
+ disabled: C || !i,
2299
+ "aria-describedby": Qe === -1 && i && e === "top" ? a : void 0,
2300
+ onClick: at,
2292
2301
  children: "Применить"
2293
2302
  })]
2294
2303
  }),
2295
2304
  /* @__PURE__ */ n("span", {
2296
- className: Q.paginationRange,
2305
+ className: Z.paginationRange,
2297
2306
  children: [
2298
2307
  "Показано ",
2299
- Xe,
2308
+ rt,
2300
2309
  "–",
2301
- Ze,
2310
+ it,
2302
2311
  " из ",
2303
- Ee
2312
+ Me
2304
2313
  ]
2305
2314
  }),
2306
- Je && e === "top" && /* @__PURE__ */ t("span", {
2307
- className: Q.pendingChanges,
2315
+ et && e === "top" && /* @__PURE__ */ t("span", {
2316
+ className: Z.pendingChanges,
2308
2317
  role: "status",
2309
2318
  children: "Есть неприменённые изменения"
2310
2319
  }),
2311
- be && Z === -1 && i && /* @__PURE__ */ n("span", {
2320
+ J && Qe === -1 && i && /* @__PURE__ */ n("span", {
2312
2321
  id: a,
2313
- className: Q.pageSizeWarning,
2322
+ className: Z.pageSizeWarning,
2314
2323
  "aria-hidden": e === "bottom" || void 0,
2315
2324
  children: [
2316
2325
  "Будут загружены все ",
2317
- Ee,
2326
+ Me,
2318
2327
  " записей"
2319
2328
  ]
2320
2329
  })
2321
2330
  ]
2322
2331
  });
2323
- }, tt = (e) => {
2324
- let t = Math.max(0, Math.min(De - 1, e));
2325
- if (be) {
2326
- t !== ke && H?.(t + 1);
2332
+ }, st = (e) => {
2333
+ let t = Math.max(0, Math.min(Ne - 1, e));
2334
+ if (J) {
2335
+ t !== Fe && oe?.(t + 1);
2327
2336
  return;
2328
2337
  }
2329
- me(t);
2330
- }, nt = (e) => {
2338
+ xe(t);
2339
+ }, ct = (e) => {
2331
2340
  let t = Array.from(e);
2332
- E === void 0 && ue(t), D?.(t);
2333
- }, rt = (e) => {
2334
- let t = new Set(Me);
2335
- t.has(e) ? t.delete(e) : t.add(e), nt(t);
2336
- }, it = () => {
2337
- let e = ft(Me, Fe, !Le);
2338
- E === void 0 && ue(e), D?.(e);
2339
- }, at = () => nt(/* @__PURE__ */ new Set()), ot = (e) => {
2340
- let t = new Set(Pe);
2341
+ j === void 0 && _e(t), te?.(t);
2342
+ }, lt = (e) => {
2343
+ let t = new Set(Re);
2344
+ t.has(e) ? t.delete(e) : t.add(e), ct(t);
2345
+ }, ut = () => {
2346
+ let e = pt(Re, Ve, !Ue);
2347
+ j === void 0 && _e(e), te?.(e);
2348
+ }, yt = () => ct(/* @__PURE__ */ new Set()), bt = (e) => {
2349
+ let t = new Set(Be);
2341
2350
  t.has(e) ? t.delete(e) : t.add(e);
2342
2351
  let n = Array.from(t);
2343
- ie === void 0 && fe(n), ae?.(n);
2344
- }, st = i.filter((e, t) => Me.has(f?.(e, t) ?? String(t))), ct = se?.({
2345
- visibleCount: Ae.length,
2346
- totalCount: Ee,
2347
- selectedCount: Me.size
2348
- }) ?? `Показано строк: ${Ae.length} из ${Ee}. Выбрано: ${Me.size}.`;
2352
+ U === void 0 && ye(n), de?.(n);
2353
+ }, xt = i.filter((e, t) => Re.has(f?.(e, t) ?? String(t))), St = pe?.({
2354
+ visibleCount: Ie.length,
2355
+ totalCount: Me,
2356
+ selectedCount: Re.size
2357
+ }) ?? `Показано строк: ${Ie.length} из ${Me}. Выбрано: ${Re.size}.`;
2349
2358
  return d(() => {
2350
- be || me(0);
2359
+ J || xe(0);
2351
2360
  }, [
2352
2361
  i,
2353
- be,
2354
- q,
2355
- N,
2356
- ve
2362
+ J,
2363
+ Ee,
2364
+ L,
2365
+ q
2357
2366
  ]), d(() => {
2358
- !be && pe >= De && me(De - 1);
2367
+ !J && be >= Ne && xe(Ne - 1);
2359
2368
  }, [
2360
- be,
2361
- De,
2362
- pe
2369
+ J,
2370
+ Ne,
2371
+ be
2363
2372
  ]), d(() => {
2364
- ge(I === -1 ? -1 : [
2373
+ Se(B === -1 ? -1 : [
2365
2374
  10,
2366
2375
  30,
2367
2376
  50
2368
- ].includes(I) ? I : 30);
2369
- }, [I]), /* @__PURE__ */ n("section", {
2370
- className: He,
2371
- "aria-busy": _,
2377
+ ].includes(B) ? B : 30);
2378
+ }, [B]), /* @__PURE__ */ n("section", {
2379
+ className: Je,
2380
+ "aria-busy": C,
2372
2381
  children: [
2373
2382
  /* @__PURE__ */ t("div", {
2374
- className: Q.srOnly,
2383
+ className: Z.srOnly,
2375
2384
  "aria-live": "polite",
2376
2385
  "aria-atomic": "true",
2377
- children: ct
2386
+ children: St
2378
2387
  }),
2379
- re && Me.size > 0 && /* @__PURE__ */ t("div", {
2380
- className: Q.bulkActions,
2388
+ le && Re.size > 0 && /* @__PURE__ */ t("div", {
2389
+ className: Z.bulkActions,
2381
2390
  role: "region",
2382
2391
  "aria-label": "Действия с выбранными строками",
2383
- children: re({
2384
- selectedRowIds: Array.from(Me),
2385
- selectedRows: st,
2386
- clearSelection: at
2392
+ children: le({
2393
+ selectedRowIds: Array.from(Re),
2394
+ selectedRows: xt,
2395
+ clearSelection: yt
2387
2396
  })
2388
2397
  }),
2389
- G && /* @__PURE__ */ n("form", {
2390
- className: Q.filterBar,
2398
+ W && /* @__PURE__ */ n("form", {
2399
+ className: Z.filterBar,
2391
2400
  role: "search",
2392
2401
  "aria-label": "Фильтры таблицы",
2393
2402
  onSubmit: (e) => {
2394
- e.preventDefault(), !(!Je || Ye || G.applying || _) && (me(0), H?.(1), G.onApply({
2395
- filters: G.draftValues,
2396
- pageSize: Z
2403
+ e.preventDefault(), !(!et || nt || W.applying || C) && (xe(0), oe?.(1), W.onApply({
2404
+ filters: W.draftValues,
2405
+ pageSize: Qe
2397
2406
  }));
2398
2407
  },
2399
2408
  children: [
2400
2409
  /* @__PURE__ */ t("div", {
2401
- className: Q.filterFields,
2402
- children: G.fields.map((e) => /* @__PURE__ */ t(dt, {
2410
+ className: Z.filterFields,
2411
+ children: W.fields.map((e) => /* @__PURE__ */ t(ft, {
2403
2412
  field: e,
2404
- value: G.draftValues[e.key],
2405
- disabled: !!(e.disabled || G.applying || _),
2406
- error: qe[e.key],
2407
- setValue: (t) => G.onDraftValuesChange({
2408
- ...G.draftValues,
2413
+ value: W.draftValues[e.key],
2414
+ disabled: !!(e.disabled || W.applying || C),
2415
+ error: $e[e.key],
2416
+ setValue: (t) => W.onDraftValuesChange({
2417
+ ...W.draftValues,
2409
2418
  [e.key]: t
2410
2419
  })
2411
2420
  }, e.key))
2412
2421
  }),
2413
- Ge && $e("top", !0),
2422
+ Ze && ot("top", !0),
2414
2423
  /* @__PURE__ */ n("div", {
2415
- className: Q.filterActions,
2416
- children: [/* @__PURE__ */ t(j, {
2424
+ className: Z.filterActions,
2425
+ children: [/* @__PURE__ */ t(A, {
2417
2426
  variant: "empty",
2418
- disabled: G.applying || _,
2427
+ disabled: W.applying || C,
2419
2428
  onClick: () => {
2420
- let e = G.resetValues ?? G.appliedValues;
2421
- G.onDraftValuesChange(e);
2422
- let t = G.resetPageSize ?? R[0] ?? 30;
2423
- z === void 0 && ge(t), B?.(t), G.onReset?.({
2429
+ let e = W.resetValues ?? W.appliedValues;
2430
+ W.onDraftValuesChange(e);
2431
+ let t = W.resetPageSize ?? H[0] ?? 30;
2432
+ ne === void 0 && Se(t), re?.(t), W.onReset?.({
2424
2433
  filters: e,
2425
2434
  pageSize: t
2426
2435
  });
2427
2436
  },
2428
- children: G.resetLabel ?? "Сбросить"
2429
- }), /* @__PURE__ */ t(j, {
2437
+ children: W.resetLabel ?? "Сбросить"
2438
+ }), /* @__PURE__ */ t(A, {
2430
2439
  type: "submit",
2431
- isLoading: G.applying,
2432
- disabled: !Je || Ye || _,
2433
- children: G.applyLabel ?? "Применить"
2440
+ isLoading: W.applying,
2441
+ disabled: !et || nt || C,
2442
+ children: W.applyLabel ?? "Применить"
2434
2443
  })]
2435
2444
  })
2436
2445
  ]
2437
2446
  }),
2438
- Ge && !G && $e("top"),
2439
- !Ve && !_ && !Ue && Ae.length > 0 && ze.length > 0 && /* @__PURE__ */ t(et, {
2440
- className: Q.mobileSort,
2441
- options: ze,
2442
- value: _e[0] ? {
2443
- id: _e[0].id,
2444
- direction: _e[0].desc ? "desc" : "asc"
2447
+ Ze && !W && ot("top"),
2448
+ (v === "highlighted" || _ != null) && /* @__PURE__ */ n("div", {
2449
+ className: Z.toolbar,
2450
+ children: [v === "highlighted" && /* @__PURE__ */ n("div", {
2451
+ className: Z.totalWidget,
2452
+ "aria-label": `${y}: ${Me}`,
2453
+ children: [/* @__PURE__ */ t("span", {
2454
+ className: Z.totalLabel,
2455
+ children: y
2456
+ }), /* @__PURE__ */ t("strong", {
2457
+ className: Z.totalValue,
2458
+ children: Me
2459
+ })]
2460
+ }), _]
2461
+ }),
2462
+ !X && !C && !Ye && Ie.length > 0 && Ge.length > 0 && /* @__PURE__ */ t(tt, {
2463
+ className: Z.mobileSort,
2464
+ options: Ge,
2465
+ value: Ce[0] ? {
2466
+ id: Ce[0].id,
2467
+ direction: Ce[0].desc ? "desc" : "asc"
2445
2468
  } : null,
2446
- onChange: (e) => we.setSorting([{
2469
+ onChange: (e) => Ae.setSorting([{
2447
2470
  id: e.id,
2448
2471
  desc: e.direction === "desc"
2449
2472
  }])
2450
2473
  }),
2451
2474
  /* @__PURE__ */ t("div", {
2452
- className: Q.tableWrap,
2453
- style: { maxHeight: S },
2475
+ className: Z.tableWrap,
2476
+ style: { maxHeight: E },
2454
2477
  children: /* @__PURE__ */ n("table", {
2455
- className: Q.table,
2456
- "aria-label": h,
2478
+ className: Z.table,
2479
+ "aria-label": S,
2457
2480
  children: [
2458
- p && /* @__PURE__ */ t("caption", { children: p }),
2459
- (Ce || T || !!W) && /* @__PURE__ */ n("colgroup", { children: [
2460
- W && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
2461
- T && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
2462
- Y.map((e) => /* @__PURE__ */ t("col", { style: pt(e) }, e.id))
2481
+ b && /* @__PURE__ */ t("caption", { children: b }),
2482
+ (ke || k || !!ue) && /* @__PURE__ */ n("colgroup", { children: [
2483
+ ue && /* @__PURE__ */ t("col", { className: Z.expansionColumn }),
2484
+ k && /* @__PURE__ */ t("col", { className: Z.selectionColumn }),
2485
+ Y.map((e) => /* @__PURE__ */ t("col", { style: mt(e) }, e.id))
2463
2486
  ] }),
2464
2487
  /* @__PURE__ */ t("thead", {
2465
- className: b ? Q.sticky : "",
2466
- children: we.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
2467
- W && /* @__PURE__ */ t("th", {
2468
- className: Q.expansionCell,
2488
+ className: T ? Z.sticky : "",
2489
+ children: Ae.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
2490
+ ue && /* @__PURE__ */ t("th", {
2491
+ className: Z.expansionCell,
2469
2492
  scope: "col",
2470
2493
  children: /* @__PURE__ */ t("span", {
2471
- className: Q.srOnly,
2494
+ className: Z.srOnly,
2472
2495
  children: "Подробности"
2473
2496
  })
2474
2497
  }),
2475
- T && /* @__PURE__ */ t("th", {
2476
- className: Q.selectionHeaderCell,
2498
+ k && /* @__PURE__ */ t("th", {
2499
+ className: Z.selectionHeaderCell,
2477
2500
  scope: "col",
2478
2501
  children: /* @__PURE__ */ n("div", {
2479
- className: Q.selectionHeaderControls,
2480
- children: [/* @__PURE__ */ t(xe, {
2481
- checked: Le,
2482
- indeterminate: Re,
2483
- disabled: _ || Fe.length === 0,
2484
- ariaLabel: A,
2485
- onChange: it
2486
- }), /* @__PURE__ */ t(j, {
2502
+ className: Z.selectionHeaderControls,
2503
+ children: [/* @__PURE__ */ t(we, {
2504
+ checked: Ue,
2505
+ indeterminate: We,
2506
+ disabled: C || Ve.length === 0,
2507
+ ariaLabel: P,
2508
+ onChange: ut
2509
+ }), /* @__PURE__ */ t(A, {
2487
2510
  size: "sm",
2488
2511
  variant: "empty",
2489
- disabled: Me.size === 0,
2490
- "aria-label": M,
2491
- title: M,
2492
- onClick: at,
2493
- children: /* @__PURE__ */ t(J, {
2512
+ disabled: Re.size === 0,
2513
+ "aria-label": F,
2514
+ title: F,
2515
+ onClick: yt,
2516
+ children: /* @__PURE__ */ t(K, {
2494
2517
  name: "IconX",
2495
2518
  width: 16,
2496
2519
  height: 16
@@ -2503,17 +2526,17 @@ var M = {
2503
2526
  return /* @__PURE__ */ t("th", {
2504
2527
  scope: "col",
2505
2528
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
2506
- className: Y.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
2529
+ className: Y.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
2507
2530
  style: {
2508
- ...pt(Y.find((t) => t.id === e.column.id)),
2509
- ...mt(Y.find((t) => t.id === e.column.id))
2531
+ ...mt(Y.find((t) => t.id === e.column.id)),
2532
+ ...ht(Y.find((t) => t.id === e.column.id))
2510
2533
  },
2511
2534
  children: /* @__PURE__ */ n("button", {
2512
2535
  type: "button",
2513
- className: Q.sortButton,
2536
+ className: Z.sortButton,
2514
2537
  disabled: !i,
2515
2538
  onClick: a,
2516
- children: [/* @__PURE__ */ t(we.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
2539
+ children: [/* @__PURE__ */ t(Ae.FlexRender, { header: e }), /* @__PURE__ */ t(K, {
2517
2540
  name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
2518
2541
  width: 16,
2519
2542
  height: 16
@@ -2523,82 +2546,87 @@ var M = {
2523
2546
  })
2524
2547
  ] }, e.id))
2525
2548
  }),
2526
- /* @__PURE__ */ t("tbody", { children: _ ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2527
- colSpan: Y.length + +!!T + +!!W,
2528
- children: /* @__PURE__ */ t(Ke, {
2549
+ /* @__PURE__ */ t("tbody", { children: C ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2550
+ colSpan: Y.length + +!!k + +!!ue,
2551
+ children: /* @__PURE__ */ t(qe, {
2529
2552
  lines: 3,
2530
2553
  height: 65
2531
2554
  })
2532
- }) }) : Ue ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2533
- className: Q.state,
2534
- colSpan: Y.length + +!!T + +!!W,
2535
- children: Ue
2536
- }) }) : Ae.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2537
- className: Q.state,
2538
- colSpan: Y.length + +!!T + +!!W,
2539
- children: y
2540
- }) }) : Ae.map((e) => {
2541
- let i = Me.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = Pe.has(e.id);
2555
+ }) }) : Ye ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2556
+ className: Z.state,
2557
+ colSpan: Y.length + +!!k + +!!ue,
2558
+ children: Ye
2559
+ }) }) : Ie.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
2560
+ className: Z.state,
2561
+ colSpan: Y.length + +!!k + +!!ue,
2562
+ children: w
2563
+ }) }) : Ie.map((e) => {
2564
+ let i = Re.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = Be.has(e.id);
2542
2565
  return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
2543
- className: [w || T ? Q.clickableRow : "", i ? Q.selectedRow : ""].filter(Boolean).join(" "),
2544
- "aria-selected": T ? i : void 0,
2566
+ className: [
2567
+ O || k ? Z.clickableRow : "",
2568
+ i ? Z.selectedRow : "",
2569
+ p?.(e.original)
2570
+ ].filter(Boolean).join(" "),
2571
+ style: h?.(e.original),
2572
+ "aria-selected": k ? i : void 0,
2545
2573
  onClick: () => {
2546
- T ? rt(e.id) : w?.(e.original);
2574
+ k ? lt(e.id) : O?.(e.original);
2547
2575
  },
2548
2576
  onDoubleClick: () => {
2549
- T && O?.(e.original);
2577
+ k && M?.(e.original);
2550
2578
  },
2551
2579
  onKeyDown: (t) => {
2552
- t.key === "Enter" ? (t.preventDefault(), T ? O?.(e.original) : w?.(e.original)) : t.key === " " && T && (t.preventDefault(), rt(e.id));
2580
+ t.key === "Enter" ? (t.preventDefault(), k ? M?.(e.original) : O?.(e.original)) : t.key === " " && k && (t.preventDefault(), lt(e.id));
2553
2581
  },
2554
- tabIndex: w || T || O ? 0 : void 0,
2555
- role: !T && w ? "button" : void 0,
2582
+ tabIndex: O || k || M ? 0 : void 0,
2583
+ role: !k && O ? "button" : void 0,
2556
2584
  children: [
2557
- W && /* @__PURE__ */ t("td", {
2558
- className: Q.expansionCell,
2585
+ ue && /* @__PURE__ */ t("td", {
2586
+ className: Z.expansionCell,
2559
2587
  onClick: (e) => e.stopPropagation(),
2560
- children: /* @__PURE__ */ t(j, {
2588
+ children: /* @__PURE__ */ t(A, {
2561
2589
  size: "sm",
2562
2590
  variant: "empty",
2563
2591
  "aria-expanded": o,
2564
- "aria-label": oe?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
2565
- onClick: () => ot(e.id),
2566
- children: /* @__PURE__ */ t(J, {
2592
+ "aria-label": fe?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
2593
+ onClick: () => bt(e.id),
2594
+ children: /* @__PURE__ */ t(K, {
2567
2595
  name: "IconChevron",
2568
2596
  width: 16,
2569
2597
  height: 16,
2570
- className: o ? Q.expansionIconOpen : Q.expansionIcon
2598
+ className: o ? Z.expansionIconOpen : Z.expansionIcon
2571
2599
  })
2572
2600
  })
2573
2601
  }),
2574
- T && /* @__PURE__ */ t("td", {
2575
- className: Q.selectionCell,
2602
+ k && /* @__PURE__ */ t("td", {
2603
+ className: Z.selectionCell,
2576
2604
  children: /* @__PURE__ */ t("div", {
2577
2605
  onClick: (e) => e.stopPropagation(),
2578
- children: /* @__PURE__ */ t(xe, {
2606
+ children: /* @__PURE__ */ t(we, {
2579
2607
  checked: i,
2580
2608
  ariaLabel: a,
2581
- onChange: () => rt(e.id)
2609
+ onChange: () => lt(e.id)
2582
2610
  })
2583
2611
  })
2584
2612
  }),
2585
2613
  e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
2586
- className: Y.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
2614
+ className: Y.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
2587
2615
  style: {
2588
- ...pt(Y.find((t) => t.id === e.column.id)),
2589
- ...mt(Y.find((t) => t.id === e.column.id))
2616
+ ...mt(Y.find((t) => t.id === e.column.id)),
2617
+ ...ht(Y.find((t) => t.id === e.column.id))
2590
2618
  },
2591
- children: /* @__PURE__ */ t(we.FlexRender, { cell: e })
2619
+ children: /* @__PURE__ */ t(Ae.FlexRender, { cell: e })
2592
2620
  }, e.id))
2593
2621
  ]
2594
- }), o && W && /* @__PURE__ */ t("tr", {
2595
- className: Q.detailRow,
2622
+ }), o && ue && /* @__PURE__ */ t("tr", {
2623
+ className: Z.detailRow,
2596
2624
  children: /* @__PURE__ */ t("td", {
2597
- colSpan: Y.length + +!!T + 1,
2598
- children: W({
2625
+ colSpan: Y.length + +!!k + 1,
2626
+ children: ue({
2599
2627
  row: e.original,
2600
2628
  rowId: e.id,
2601
- collapse: () => ot(e.id)
2629
+ collapse: () => bt(e.id)
2602
2630
  })
2603
2631
  })
2604
2632
  })] }, e.id);
@@ -2606,69 +2634,74 @@ var M = {
2606
2634
  ]
2607
2635
  })
2608
2636
  }),
2609
- !Ve && /* @__PURE__ */ n("div", {
2610
- className: Q.cards,
2637
+ !X && /* @__PURE__ */ n("div", {
2638
+ className: Z.cards,
2611
2639
  role: "list",
2612
- "aria-label": h ?? p,
2613
- children: [T && !_ && !Ue && Ae.length > 0 && /* @__PURE__ */ n("div", {
2614
- className: Q.mobileSelectionControls,
2615
- children: [/* @__PURE__ */ t(xe, {
2616
- checked: Le,
2617
- indeterminate: Re,
2618
- ariaLabel: A,
2619
- label: A,
2620
- onChange: it
2621
- }), /* @__PURE__ */ t(j, {
2640
+ "aria-label": S ?? b,
2641
+ children: [k && !C && !Ye && Ie.length > 0 && /* @__PURE__ */ n("div", {
2642
+ className: Z.mobileSelectionControls,
2643
+ children: [/* @__PURE__ */ t(we, {
2644
+ checked: Ue,
2645
+ indeterminate: We,
2646
+ ariaLabel: P,
2647
+ label: P,
2648
+ onChange: ut
2649
+ }), /* @__PURE__ */ t(A, {
2622
2650
  size: "sm",
2623
2651
  variant: "empty",
2624
- disabled: Me.size === 0,
2625
- onClick: at,
2626
- children: M
2652
+ disabled: Re.size === 0,
2653
+ onClick: yt,
2654
+ children: F
2627
2655
  })]
2628
- }), _ ? /* @__PURE__ */ t(Ke, {
2656
+ }), C ? /* @__PURE__ */ t(qe, {
2629
2657
  lines: 4,
2630
2658
  height: 65
2631
- }) : Ue ? /* @__PURE__ */ t("div", {
2632
- className: Q.state,
2633
- children: Ue
2634
- }) : Ae.length === 0 ? /* @__PURE__ */ t("div", {
2635
- className: Q.state,
2636
- children: y
2637
- }) : Ae.map((e) => {
2638
- let r = Me.has(e.id), i = Pe.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = T && /* @__PURE__ */ n("div", {
2639
- className: Q.cardSelectionControls,
2659
+ }) : Ye ? /* @__PURE__ */ t("div", {
2660
+ className: Z.state,
2661
+ children: Ye
2662
+ }) : Ie.length === 0 ? /* @__PURE__ */ t("div", {
2663
+ className: Z.state,
2664
+ children: w
2665
+ }) : Ie.map((e) => {
2666
+ let r = Re.has(e.id), i = Be.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = k && /* @__PURE__ */ n("div", {
2667
+ className: Z.cardSelectionControls,
2640
2668
  onClick: (e) => e.stopPropagation(),
2641
- children: [/* @__PURE__ */ t(xe, {
2669
+ children: [/* @__PURE__ */ t(we, {
2642
2670
  checked: r,
2643
2671
  ariaLabel: a,
2644
- onChange: () => rt(e.id)
2645
- }), O && /* @__PURE__ */ t(j, {
2672
+ onChange: () => lt(e.id)
2673
+ }), M && /* @__PURE__ */ t(A, {
2646
2674
  size: "sm",
2647
2675
  variant: "empty",
2648
- onClick: () => O(e.original),
2649
- children: ee
2676
+ onClick: () => M(e.original),
2677
+ children: I
2650
2678
  })]
2651
- }), s = W && /* @__PURE__ */ t(j, {
2679
+ }), s = ue && /* @__PURE__ */ t(A, {
2652
2680
  size: "sm",
2653
2681
  variant: "empty",
2654
2682
  "aria-expanded": i,
2655
- "aria-label": oe?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
2683
+ "aria-label": fe?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
2656
2684
  onClick: (t) => {
2657
- t.stopPropagation(), ot(e.id);
2685
+ t.stopPropagation(), bt(e.id);
2658
2686
  },
2659
- children: /* @__PURE__ */ t(J, {
2687
+ children: /* @__PURE__ */ t(K, {
2660
2688
  name: "IconChevron",
2661
2689
  width: 16,
2662
2690
  height: 16,
2663
- className: i ? Q.expansionIconOpen : Q.expansionIcon
2691
+ className: i ? Z.expansionIconOpen : Z.expansionIcon
2664
2692
  })
2665
2693
  });
2666
2694
  if (u) return /* @__PURE__ */ n("div", {
2667
2695
  role: "listitem",
2668
- className: `${Q.customCardShell} ${r ? Q.selectedCard : ""}`,
2669
- "aria-selected": T ? r : void 0,
2696
+ className: [
2697
+ Z.customCardShell,
2698
+ r ? Z.selectedCard : "",
2699
+ p?.(e.original)
2700
+ ].filter(Boolean).join(" "),
2701
+ style: h?.(e.original),
2702
+ "aria-selected": k ? r : void 0,
2670
2703
  onClick: () => {
2671
- T && rt(e.id);
2704
+ k && lt(e.id);
2672
2705
  },
2673
2706
  children: [
2674
2707
  o,
@@ -2678,113 +2711,118 @@ var M = {
2678
2711
  }),
2679
2712
  s,
2680
2713
  i && /* @__PURE__ */ t("div", {
2681
- className: Q.cardDetail,
2682
- children: W?.({
2714
+ className: Z.cardDetail,
2715
+ children: ue?.({
2683
2716
  row: e.original,
2684
2717
  rowId: e.id,
2685
- collapse: () => ot(e.id)
2718
+ collapse: () => bt(e.id)
2686
2719
  })
2687
2720
  })
2688
2721
  ]
2689
2722
  }, e.id);
2690
- let c = Y.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => _t(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
2723
+ let c = Y.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => vt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
2691
2724
  return /* @__PURE__ */ n("article", {
2692
2725
  role: "listitem",
2693
- className: `${Q.card} ${r ? Q.selectedCard : ""}`,
2694
- "aria-selected": T ? r : void 0,
2726
+ className: [
2727
+ Z.card,
2728
+ r ? Z.selectedCard : "",
2729
+ p?.(e.original)
2730
+ ].filter(Boolean).join(" "),
2731
+ style: h?.(e.original),
2732
+ "aria-selected": k ? r : void 0,
2695
2733
  onClick: () => {
2696
- T && rt(e.id);
2734
+ k && lt(e.id);
2697
2735
  },
2698
2736
  children: [
2699
2737
  o,
2700
2738
  s,
2701
2739
  /* @__PURE__ */ t("h3", { children: l ? f(l) : `Строка ${e.index + 1}` }),
2702
2740
  /* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
2703
- className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
2741
+ className: e.mobile?.mobileSpan === 2 ? Z.spanTwo : "",
2704
2742
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
2705
2743
  }, e.id)) }),
2706
2744
  c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
2707
2745
  i && /* @__PURE__ */ t("div", {
2708
- className: Q.cardDetail,
2709
- children: W?.({
2746
+ className: Z.cardDetail,
2747
+ children: ue?.({
2710
2748
  row: e.original,
2711
2749
  rowId: e.id,
2712
- collapse: () => ot(e.id)
2750
+ collapse: () => bt(e.id)
2713
2751
  })
2714
2752
  })
2715
2753
  ]
2716
2754
  }, e.id);
2717
2755
  })]
2718
2756
  }),
2719
- (We || Ge && !_ && !Ue && Ae.length > 0) && /* @__PURE__ */ n("nav", {
2720
- className: Q.pagination,
2757
+ (Xe || Ze && !C && !Ye && Ie.length > 0) && /* @__PURE__ */ n("nav", {
2758
+ className: Z.pagination,
2721
2759
  "aria-label": "Пагинация таблицы",
2722
- children: [Ge ? $e("bottom") : /* @__PURE__ */ n("span", {
2723
- className: Q.paginationRange,
2760
+ children: [Ze ? ot("bottom") : /* @__PURE__ */ n("span", {
2761
+ className: Z.paginationRange,
2724
2762
  "aria-live": "polite",
2725
2763
  children: [
2726
- Xe,
2764
+ rt,
2727
2765
  "–",
2728
- Ze,
2766
+ it,
2729
2767
  " из ",
2730
- Ee
2768
+ Me
2731
2769
  ]
2732
- }), We && /* @__PURE__ */ n("div", {
2733
- className: Q.paginationControls,
2770
+ }), Xe && /* @__PURE__ */ n("div", {
2771
+ className: Z.paginationControls,
2734
2772
  children: [
2735
- /* @__PURE__ */ n(j, {
2773
+ /* @__PURE__ */ n(A, {
2736
2774
  variant: "empty",
2737
2775
  size: "md",
2738
- disabled: _ || ke === 0,
2776
+ disabled: C || Fe === 0,
2739
2777
  "aria-label": "Предыдущая страница",
2740
2778
  onClick: () => {
2741
- tt(ke - 1);
2779
+ st(Fe - 1);
2742
2780
  },
2743
- children: [/* @__PURE__ */ t(J, {
2781
+ children: [/* @__PURE__ */ t(K, {
2744
2782
  name: "IconChevron",
2745
2783
  width: 18,
2746
2784
  height: 18,
2747
- className: Q.previousIcon
2785
+ className: Z.previousIcon
2748
2786
  }), /* @__PURE__ */ t("span", {
2749
- className: Q.paginationButtonLabel,
2787
+ className: Z.paginationButtonLabel,
2750
2788
  children: "Назад"
2751
2789
  })]
2752
2790
  }),
2753
2791
  /* @__PURE__ */ t("div", {
2754
- className: Q.pageNumbers,
2755
- children: Be.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
2756
- variant: e === ke ? "secondary" : "empty",
2792
+ className: Z.pageNumbers,
2793
+ children: Ke.map((e) => typeof e == "number" ? /* @__PURE__ */ t(A, {
2794
+ variant: e === Fe ? "secondary" : "empty",
2757
2795
  size: "md",
2758
- className: Q.pageButton,
2796
+ className: Z.pageButton,
2759
2797
  "aria-label": `Перейти на страницу ${e + 1}`,
2760
- "aria-current": e === ke ? "page" : void 0,
2761
- disabled: _,
2798
+ "aria-current": e === Fe ? "page" : void 0,
2799
+ disabled: C,
2762
2800
  onClick: () => {
2763
- tt(e);
2801
+ st(e);
2764
2802
  },
2765
2803
  children: e + 1
2766
2804
  }, e) : /* @__PURE__ */ t("span", {
2767
- className: Q.ellipsis,
2805
+ className: Z.ellipsis,
2768
2806
  "aria-hidden": "true",
2769
2807
  children: "…"
2770
2808
  }, e))
2771
2809
  }),
2772
- /* @__PURE__ */ n(j, {
2810
+ /* @__PURE__ */ n(A, {
2773
2811
  variant: "empty",
2774
2812
  size: "md",
2775
- disabled: _ || ke === De - 1,
2813
+ disabled: C || Fe === Ne - 1,
2776
2814
  "aria-label": "Следующая страница",
2777
2815
  onClick: () => {
2778
- tt(ke + 1);
2816
+ st(Fe + 1);
2779
2817
  },
2780
2818
  children: [/* @__PURE__ */ t("span", {
2781
- className: Q.paginationButtonLabel,
2819
+ className: Z.paginationButtonLabel,
2782
2820
  children: "Вперёд"
2783
- }), /* @__PURE__ */ t(J, {
2821
+ }), /* @__PURE__ */ t(K, {
2784
2822
  name: "IconChevron",
2785
2823
  width: 18,
2786
2824
  height: 18,
2787
- className: Q.nextIcon
2825
+ className: Z.nextIcon
2788
2826
  })]
2789
2827
  })
2790
2828
  ]
@@ -2792,128 +2830,131 @@ var M = {
2792
2830
  })
2793
2831
  ]
2794
2832
  });
2795
- }, Et = (e, t) => {
2833
+ }, Dt = (e, t) => {
2796
2834
  let n = t.trim().toLocaleLowerCase();
2797
2835
  return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
2798
- }, Dt = (e, t, n) => {
2836
+ }, Ot = (e, t, n) => {
2799
2837
  if (!e.length) return -1;
2800
2838
  for (let r = 0; r < e.length; r += 1) {
2801
2839
  let i = (t + r * n + e.length) % e.length;
2802
2840
  if (!e[i]?.disabled) return i;
2803
2841
  }
2804
2842
  return -1;
2805
- }, Ot = {
2806
- wrapper: "_wrapper_1v2s8_1",
2807
- control: "_control_1v2s8_17",
2808
- inputHost: "_inputHost_1v2s8_25",
2809
- sm: "_sm_1v2s8_41",
2810
- md: "_md_1v2s8_57",
2811
- lg: "_lg_1v2s8_71",
2812
- errorState: "_errorState_1v2s8_85",
2813
- disabledText: "_disabledText_1v2s8_93",
2814
- chevron: "_chevron_1v2s8_163",
2815
- chevronOpen: "_chevronOpen_1v2s8_197",
2816
- menu: "_menu_1v2s8_205",
2817
- menuEmpty: "_menuEmpty_1v2s8_233",
2818
- option: "_option_1v2s8_241",
2819
- empty: "_empty_1v2s8_241",
2820
- selected: "_selected_1v2s8_321",
2821
- active: "_active_1v2s8_321",
2822
- visuallyHidden: "_visuallyHidden_1v2s8_341"
2843
+ }, Q = {
2844
+ wrapper: "_wrapper_1os84_1",
2845
+ control: "_control_1os84_17",
2846
+ inputHost: "_inputHost_1os84_25",
2847
+ sm: "_sm_1os84_41",
2848
+ md: "_md_1os84_57",
2849
+ lg: "_lg_1os84_71",
2850
+ errorState: "_errorState_1os84_85",
2851
+ disabledText: "_disabledText_1os84_93",
2852
+ chevron: "_chevron_1os84_163",
2853
+ chevronOpen: "_chevronOpen_1os84_197",
2854
+ menu: "_menu_1os84_205",
2855
+ menuEmpty: "_menuEmpty_1os84_233",
2856
+ option: "_option_1os84_241",
2857
+ empty: "_empty_1os84_241",
2858
+ selected: "_selected_1os84_321",
2859
+ active: "_active_1os84_321",
2860
+ actionOption: "_actionOption_1os84_341",
2861
+ visuallyHidden: "_visuallyHidden_1os84_375"
2823
2862
  }, kt = 8, At = 6, jt = 5, Mt = 10, Nt = {
2824
2863
  sm: 30,
2825
2864
  md: 40,
2826
2865
  lg: 50
2827
- }, Pt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
2828
- let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, P = [
2866
+ }, Pt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: ee, id: w, needMark: T = !0 }) => {
2867
+ let E = f(), D = w ?? `ds-search-dropdown-${ee ?? E}`, O = `${D}-listbox`, k = `${D}-status`, A = b ? `${D}-hint` : void 0, j = y ? `${D}-error` : void 0, N = [
2868
+ k,
2829
2869
  A,
2830
- j,
2831
- M
2832
- ].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, te] = g(""), [V, H] = g(-1), [U, ne] = g(null), re = m(() => e.find((e) => e.value === r), [e, r]), W = m(() => Et(e, B), [e, B]), ie = s && u, ae = V >= 0 ? W[V] : void 0;
2833
- d(() => te(re?.label ?? ""), [re?.label, r]);
2834
- let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => Dt(W, e, t), [W]), G = l((e) => {
2835
- H(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
2836
- }, []), K = l(() => {
2837
- let e = oe();
2870
+ j
2871
+ ].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(-1), [ne, re] = g(null), ie = m(() => e.find((e) => e.value === r), [e, r]), ae = m(() => Dt(e, z), [e, z]), oe = s && u, se = V >= 0 ? ae[V] : void 0;
2872
+ d(() => B(ie?.label ?? ""), [ie?.label, r]);
2873
+ let ce = l(() => P.current?.querySelector("input") ?? null, []), le = l((e, t) => Ot(ae, e, t), [ae]), ue = l((e) => {
2874
+ H(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
2875
+ }, []), U = l(() => {
2876
+ let e = ce();
2838
2877
  if (!e) return;
2839
- let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(W.length, jt)) * Nt[x] + Mt, r = window.innerHeight - t.bottom - kt, i = t.top - kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Nt[x] + Mt, Math.min(n, o)), c = window.innerWidth - t.width - kt, l = Math.max(kt, Math.min(t.left, c)), u = a ? Math.max(kt, t.top - s - At) : t.bottom + At;
2840
- ne({
2878
+ let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(ae.length, jt)) * Nt[x] + Mt, r = window.innerHeight - t.bottom - kt, i = t.top - kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Nt[x] + Mt, Math.min(n, o)), c = window.innerWidth - t.width - kt, l = Math.max(kt, Math.min(t.left, c)), u = a ? Math.max(kt, t.top - s - At) : t.bottom + At;
2879
+ re({
2841
2880
  top: u,
2842
2881
  left: l,
2843
2882
  width: t.width,
2844
2883
  maxHeight: s
2845
2884
  });
2846
2885
  }, [
2847
- W.length,
2848
- oe,
2886
+ ae.length,
2887
+ ce,
2849
2888
  x
2850
2889
  ]);
2851
2890
  p(() => {
2852
- if (!R) {
2853
- ne(null);
2891
+ if (!L) {
2892
+ re(null);
2854
2893
  return;
2855
2894
  }
2856
- return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
2857
- window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
2895
+ return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
2896
+ window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
2858
2897
  };
2859
- }, [R, K]), d(() => {
2860
- if (!R) return;
2898
+ }, [L, U]), d(() => {
2899
+ if (!L) return;
2861
2900
  let e = (e) => {
2862
2901
  let t = e.target;
2863
- !F.current?.contains(t) && !I.current?.contains(t) && (z(!1), H(-1));
2902
+ !P.current?.contains(t) && !F.current?.contains(t) && (R(!1), H(-1));
2864
2903
  };
2865
2904
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
2866
- }, [R]);
2867
- let ce = () => {
2868
- s || c || (z(!0), H(se(0, 1)));
2869
- }, le = (e) => {
2870
- e.disabled || (te(e.label), z(!1), H(-1), i?.(e.value, e), oe()?.focus());
2871
- }, ue = R ? /* @__PURE__ */ t("ul", {
2872
- ref: I,
2873
- id: k,
2874
- className: `${Ot.menu} ${W.length === 0 ? Ot.menuEmpty : ""}`,
2905
+ }, [L]);
2906
+ let de = () => {
2907
+ s || c || (R(!0), H(le(0, 1)));
2908
+ }, fe = (e) => {
2909
+ e.disabled || (B(e.label), R(!1), H(-1), i?.(e.value, e), ce()?.focus());
2910
+ }, pe = L ? /* @__PURE__ */ t("ul", {
2911
+ ref: F,
2912
+ id: O,
2913
+ className: `${Q.menu} ${ae.length === 0 ? Q.menuEmpty : ""}`,
2875
2914
  role: "listbox",
2876
2915
  "aria-label": v,
2877
- style: U ? {
2878
- top: U.top,
2879
- left: U.left,
2880
- width: U.width,
2881
- maxHeight: U.maxHeight
2916
+ style: ne ? {
2917
+ top: ne.top,
2918
+ left: ne.left,
2919
+ width: ne.width,
2920
+ maxHeight: ne.maxHeight
2882
2921
  } : {
2883
2922
  top: 0,
2884
2923
  left: 0,
2885
2924
  visibility: "hidden",
2886
2925
  maxHeight: 0
2887
2926
  },
2888
- children: W.length === 0 ? /* @__PURE__ */ t("li", {
2889
- className: `${Ot.empty} ${Ot[x]}`,
2927
+ children: ae.length === 0 ? /* @__PURE__ */ t("li", {
2928
+ className: `${Q.empty} ${Q[x]}`,
2890
2929
  children: o
2891
- }) : W.map((e, i) => {
2930
+ }) : ae.map((e, i) => {
2892
2931
  let a = e.value === r, o = i === V;
2893
2932
  return /* @__PURE__ */ t("li", {
2894
2933
  role: "presentation",
2895
2934
  children: /* @__PURE__ */ n("button", {
2896
2935
  ref: (e) => {
2897
- L.current[i] = e;
2936
+ I.current[i] = e;
2898
2937
  },
2899
- id: `${O}-option-${i}`,
2938
+ id: `${D}-option-${i}`,
2900
2939
  type: "button",
2901
2940
  role: "option",
2902
2941
  tabIndex: -1,
2903
2942
  disabled: e.disabled,
2904
2943
  "aria-disabled": e.disabled,
2905
2944
  "aria-selected": a,
2945
+ "data-option-variant": e.variant ?? "default",
2906
2946
  className: [
2907
- Ot.option,
2908
- Ot[x],
2909
- a ? Ot.selected : "",
2910
- o ? Ot.active : ""
2947
+ Q.option,
2948
+ Q[x],
2949
+ e.variant === "action" ? Q.actionOption : "",
2950
+ a ? Q.selected : "",
2951
+ o ? Q.active : ""
2911
2952
  ].filter(Boolean).join(" "),
2912
2953
  onPointerMove: () => {
2913
2954
  e.disabled || H(i);
2914
2955
  },
2915
- onClick: () => le(e),
2916
- children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(J, {
2956
+ onClick: () => fe(e),
2957
+ children: [/* @__PURE__ */ t("span", { children: e.label }), a && T && /* @__PURE__ */ t(K, {
2917
2958
  name: "IconCheck",
2918
2959
  width: 16,
2919
2960
  height: 16
@@ -2923,28 +2964,28 @@ var M = {
2923
2964
  })
2924
2965
  }) : null;
2925
2966
  return /* @__PURE__ */ n("div", {
2926
- ref: F,
2967
+ ref: P,
2927
2968
  className: [
2928
- Ot.wrapper,
2929
- y ? Ot.errorState : "",
2969
+ Q.wrapper,
2970
+ y ? Q.errorState : "",
2930
2971
  C
2931
2972
  ].filter(Boolean).join(" "),
2932
2973
  children: [
2933
- v && /* @__PURE__ */ t(ee, {
2934
- htmlFor: ie ? void 0 : O,
2974
+ v && /* @__PURE__ */ t(te, {
2975
+ htmlFor: oe ? void 0 : D,
2935
2976
  required: S,
2936
2977
  disabled: s,
2937
2978
  children: v
2938
2979
  }),
2939
- ie ? /* @__PURE__ */ t("div", {
2940
- className: `${Ot.disabledText} ${Ot[x]}`,
2941
- children: re?.label ?? a
2980
+ oe ? /* @__PURE__ */ t("div", {
2981
+ className: `${Q.disabledText} ${Q[x]}`,
2982
+ children: ie?.label ?? a
2942
2983
  }) : /* @__PURE__ */ n("div", {
2943
- className: Ot.control,
2944
- children: [/* @__PURE__ */ t(nt, {
2945
- id: O,
2946
- name: w,
2947
- value: B,
2984
+ className: Q.control,
2985
+ children: [/* @__PURE__ */ t(rt, {
2986
+ id: D,
2987
+ name: ee,
2988
+ value: z,
2948
2989
  placeholder: a,
2949
2990
  disabled: s,
2950
2991
  readOnly: c,
@@ -2952,57 +2993,57 @@ var M = {
2952
2993
  size: x,
2953
2994
  clearable: !1,
2954
2995
  autoComplete: "off",
2955
- className: `${Ot.inputHost} ${Ot[x]}`,
2956
- onFocus: ce,
2996
+ className: `${Q.inputHost} ${Q[x]}`,
2997
+ onFocus: de,
2957
2998
  onChange: (t) => {
2958
- let n = String(t), r = Et(e, n);
2959
- te(n), z(!0), H(Dt(r, 0, 1));
2999
+ let n = String(t), r = Dt(e, n);
3000
+ B(n), R(!0), H(Ot(r, 0, 1));
2960
3001
  },
2961
3002
  role: "combobox",
2962
3003
  "aria-autocomplete": "list",
2963
- "aria-expanded": R,
2964
- "aria-controls": k,
2965
- "aria-activedescendant": ae ? `${O}-option-${V}` : void 0,
3004
+ "aria-expanded": L,
3005
+ "aria-controls": O,
3006
+ "aria-activedescendant": se ? `${D}-option-${V}` : void 0,
2966
3007
  "aria-invalid": !!y,
2967
- "aria-describedby": P,
2968
- onClick: ce,
3008
+ "aria-describedby": N,
3009
+ onClick: de,
2969
3010
  onKeyDown: (e) => {
2970
3011
  if (!(s || c)) {
2971
3012
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
2972
3013
  e.preventDefault();
2973
- let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : W.length - 1;
2974
- z(!0), G(se(n, t));
3014
+ let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : ae.length - 1;
3015
+ R(!0), ue(le(n, t));
2975
3016
  } else if (e.key === "Home" || e.key === "End") {
2976
- if (!R) return;
3017
+ if (!L) return;
2977
3018
  e.preventDefault();
2978
3019
  let t = e.key === "Home" ? 1 : -1;
2979
- G(se(e.key === "Home" ? 0 : W.length - 1, t));
2980
- } else e.key === "Enter" && R && ae ? (e.preventDefault(), le(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), H(-1)) : e.key === "Tab" && (z(!1), H(-1));
3020
+ ue(le(e.key === "Home" ? 0 : ae.length - 1, t));
3021
+ } else e.key === "Enter" && L && se ? (e.preventDefault(), fe(se)) : e.key === "Escape" && L ? (e.preventDefault(), R(!1), H(-1)) : e.key === "Tab" && (R(!1), H(-1));
2981
3022
  }
2982
3023
  }
2983
3024
  }), /* @__PURE__ */ t("span", {
2984
- className: `${Ot.chevron} ${R ? Ot.chevronOpen : ""}`,
3025
+ className: `${Q.chevron} ${L ? Q.chevronOpen : ""}`,
2985
3026
  "aria-hidden": "true",
2986
- children: /* @__PURE__ */ t(J, {
3027
+ children: /* @__PURE__ */ t(K, {
2987
3028
  name: "IconChevron",
2988
3029
  width: 20,
2989
3030
  height: 20
2990
3031
  })
2991
3032
  })]
2992
3033
  }),
2993
- R && typeof document < "u" && _(ue, document.body),
3034
+ L && typeof document < "u" && _(pe, document.body),
2994
3035
  /* @__PURE__ */ n("span", {
2995
- id: A,
2996
- className: Ot.visuallyHidden,
3036
+ id: k,
3037
+ className: Q.visuallyHidden,
2997
3038
  "aria-live": "polite",
2998
- children: ["Найдено вариантов: ", W.length]
3039
+ children: ["Найдено вариантов: ", ae.length]
2999
3040
  }),
3000
- b && !y && /* @__PURE__ */ t(N, {
3001
- id: j,
3041
+ b && !y && /* @__PURE__ */ t(M, {
3042
+ id: A,
3002
3043
  children: b
3003
3044
  }),
3004
- y && /* @__PURE__ */ t(N, {
3005
- id: M,
3045
+ y && /* @__PURE__ */ t(M, {
3046
+ id: j,
3006
3047
  variant: "error",
3007
3048
  children: y
3008
3049
  })
@@ -3025,12 +3066,12 @@ var M = {
3025
3066
  id: l,
3026
3067
  className: Ft.title,
3027
3068
  children: e
3028
- }), i && /* @__PURE__ */ t(j, {
3069
+ }), i && /* @__PURE__ */ t(A, {
3029
3070
  className: Ft.dismiss,
3030
3071
  variant: "empty",
3031
3072
  onClick: a,
3032
3073
  "aria-label": o,
3033
- children: /* @__PURE__ */ t(J, {
3074
+ children: /* @__PURE__ */ t(K, {
3034
3075
  name: "IconCross",
3035
3076
  width: 20,
3036
3077
  height: 20
@@ -3068,19 +3109,19 @@ var M = {
3068
3109
  placeholder: e.placeholder,
3069
3110
  disabled: n
3070
3111
  };
3071
- return e.inputType === "number" ? /* @__PURE__ */ t(nt, {
3112
+ return e.inputType === "number" ? /* @__PURE__ */ t(rt, {
3072
3113
  ...r,
3073
3114
  type: "number",
3074
3115
  value: i ?? "",
3075
3116
  onChange: (t) => d(e.id, t)
3076
- }, e.id) : /* @__PURE__ */ t(nt, {
3117
+ }, e.id) : /* @__PURE__ */ t(rt, {
3077
3118
  ...r,
3078
3119
  type: "text",
3079
3120
  value: String(i ?? ""),
3080
3121
  onChange: (t) => d(e.id, t)
3081
3122
  }, e.id);
3082
3123
  }
3083
- if (e.type === "dropdown") return /* @__PURE__ */ t(Qe, {
3124
+ if (e.type === "dropdown") return /* @__PURE__ */ t($e, {
3084
3125
  label: e.label,
3085
3126
  hint: e.hint,
3086
3127
  placeholder: e.placeholder,
@@ -3089,7 +3130,7 @@ var M = {
3089
3130
  disabled: n,
3090
3131
  onChange: (t) => d(e.id, t)
3091
3132
  }, e.id);
3092
- if (e.type === "multiple") return /* @__PURE__ */ t(st, {
3133
+ if (e.type === "multiple") return /* @__PURE__ */ t(ct, {
3093
3134
  label: e.label,
3094
3135
  hint: e.hint,
3095
3136
  placeholder: e.placeholder,
@@ -3098,14 +3139,14 @@ var M = {
3098
3139
  disabled: n,
3099
3140
  onChange: (t) => d(e.id, t)
3100
3141
  }, e.id);
3101
- if (e.type === "checkbox") return /* @__PURE__ */ t(xe, {
3142
+ if (e.type === "checkbox") return /* @__PURE__ */ t(we, {
3102
3143
  label: e.label,
3103
3144
  hint: e.hint,
3104
3145
  checked: !!i,
3105
3146
  disabled: n,
3106
3147
  onChange: (t) => d(e.id, t)
3107
3148
  }, e.id);
3108
- if (e.type === "radio") return /* @__PURE__ */ t(lt, {
3149
+ if (e.type === "radio") return /* @__PURE__ */ t(ut, {
3109
3150
  label: e.label,
3110
3151
  checked: !!i,
3111
3152
  disabled: n,
@@ -3115,7 +3156,7 @@ var M = {
3115
3156
  from: null,
3116
3157
  to: null
3117
3158
  };
3118
- return /* @__PURE__ */ t(We, {
3159
+ return /* @__PURE__ */ t(Ge, {
3119
3160
  hint: e.hint,
3120
3161
  mode: e.mode,
3121
3162
  min: e.min,
@@ -3127,12 +3168,12 @@ var M = {
3127
3168
  })
3128
3169
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
3129
3170
  className: Lt.actions,
3130
- children: [o && /* @__PURE__ */ t(j, {
3171
+ children: [o && /* @__PURE__ */ t(A, {
3131
3172
  variant: "destructiveOutline",
3132
3173
  disabled: l || c,
3133
3174
  onClick: o,
3134
3175
  children: "Сбросить"
3135
- }), s === "manual" && /* @__PURE__ */ t(j, {
3176
+ }), s === "manual" && /* @__PURE__ */ t(A, {
3136
3177
  isLoading: c,
3137
3178
  disabled: l,
3138
3179
  onClick: () => a?.(r),
@@ -3195,8 +3236,8 @@ var M = {
3195
3236
  file: "_file_i20hz_133",
3196
3237
  fileName: "_fileName_i20hz_175",
3197
3238
  fileSize: "_fileSize_i20hz_187"
3198
- }, Wt = (e) => `${e.name}:${e.size}:${e.lastModified}`, Gt = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Kt = (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), qt = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
3199
- let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), M = u ? `${E}-hint` : void 0, P = d ? `${E}-error` : void 0, F = [M, P].filter(Boolean).join(" ") || void 0, I = !m && !_, L = (e) => {
3239
+ }, Wt = (e) => `${e.name}:${e.size}:${e.lastModified}`, Gt = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Kt = (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), qt = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: ee }) => {
3240
+ let w = f(), T = y ?? `ds-file-input-${v ?? w}`, E = h(null), D = h(0), [O, k] = g(!1), j = u ? `${T}-hint` : void 0, N = d ? `${T}-error` : void 0, P = [j, N].filter(Boolean).join(" ") || void 0, F = !m && !_, I = (e) => {
3200
3241
  let t = [], n = new Set(r.map(Wt)), l = e.filter((e) => Kt(e, o) ? s !== void 0 && e.size > s ? (t.push({
3201
3242
  file: e,
3202
3243
  reason: "maxSize"
@@ -3207,42 +3248,42 @@ var M = {
3207
3248
  u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
3208
3249
  file: e,
3209
3250
  reason: "maxFiles"
3210
- })), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
3251
+ })), d = d.slice(0, u)), t.length && ee?.(t), l.length && i?.(d), E.current && (E.current.value = "");
3211
3252
  };
3212
3253
  return /* @__PURE__ */ n("div", {
3213
3254
  className: `${Ut.wrapper} ${b}`,
3214
3255
  children: [
3215
- l && /* @__PURE__ */ t(ee, {
3216
- htmlFor: E,
3256
+ l && /* @__PURE__ */ t(te, {
3257
+ htmlFor: T,
3217
3258
  required: p,
3218
3259
  disabled: m,
3219
3260
  children: l
3220
3261
  }),
3221
3262
  /* @__PURE__ */ n("div", {
3222
- className: `${Ut.dropzone} ${k ? Ut.dragActive : ""} ${m ? Ut.disabled : ""} ${d ? Ut.error : ""}`,
3263
+ className: `${Ut.dropzone} ${O ? Ut.dragActive : ""} ${m ? Ut.disabled : ""} ${d ? Ut.error : ""}`,
3223
3264
  onDragEnter: (e) => {
3224
- e.preventDefault(), I && ++O.current === 1 && A(!0);
3265
+ e.preventDefault(), F && ++D.current === 1 && k(!0);
3225
3266
  },
3226
3267
  onDragOver: (e) => e.preventDefault(),
3227
3268
  onDragLeave: (e) => {
3228
- e.preventDefault(), --O.current <= 0 && (O.current = 0, A(!1));
3269
+ e.preventDefault(), --D.current <= 0 && (D.current = 0, k(!1));
3229
3270
  },
3230
3271
  onDrop: (e) => {
3231
- e.preventDefault(), O.current = 0, A(!1), I && L(Array.from(e.dataTransfer.files));
3272
+ e.preventDefault(), D.current = 0, k(!1), F && I(Array.from(e.dataTransfer.files));
3232
3273
  },
3233
3274
  children: [/* @__PURE__ */ t("input", {
3234
- ref: D,
3235
- id: E,
3275
+ ref: E,
3276
+ id: T,
3236
3277
  name: v,
3237
3278
  className: Ut.nativeInput,
3238
3279
  type: "file",
3239
3280
  multiple: a,
3240
3281
  accept: o,
3241
3282
  required: p && r.length === 0,
3242
- disabled: !I,
3243
- "aria-describedby": F,
3283
+ disabled: !F,
3284
+ "aria-describedby": P,
3244
3285
  "aria-invalid": !!d,
3245
- onChange: (e) => L(Array.from(e.target.files ?? []))
3286
+ onChange: (e) => I(Array.from(e.target.files ?? []))
3246
3287
  }), r.length ? /* @__PURE__ */ n(e, { children: [
3247
3288
  /* @__PURE__ */ t("ul", {
3248
3289
  className: Ut.files,
@@ -3259,12 +3300,12 @@ var M = {
3259
3300
  className: Ut.fileSize,
3260
3301
  children: Gt(e.size)
3261
3302
  }),
3262
- I && /* @__PURE__ */ t(j, {
3303
+ F && /* @__PURE__ */ t(A, {
3263
3304
  variant: "empty",
3264
3305
  size: "sm",
3265
3306
  "aria-label": `Удалить файл ${e.name}`,
3266
3307
  onClick: () => i?.(r.filter((e, t) => t !== a)),
3267
- children: /* @__PURE__ */ t(J, {
3308
+ children: /* @__PURE__ */ t(K, {
3268
3309
  name: "IconCross",
3269
3310
  width: 16,
3270
3311
  height: 16
@@ -3273,16 +3314,16 @@ var M = {
3273
3314
  ]
3274
3315
  }, Wt(e)))
3275
3316
  }),
3276
- I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
3317
+ F && (a || r.length === 0) && /* @__PURE__ */ t(A, {
3277
3318
  className: Ut.browseButton,
3278
3319
  size: "sm",
3279
- onClick: () => D.current?.click(),
3320
+ onClick: () => E.current?.click(),
3280
3321
  children: C
3281
3322
  }),
3282
- I && !a && /* @__PURE__ */ t(j, {
3323
+ F && !a && /* @__PURE__ */ t(A, {
3283
3324
  className: Ut.browseButton,
3284
3325
  size: "sm",
3285
- onClick: () => D.current?.click(),
3326
+ onClick: () => E.current?.click(),
3286
3327
  children: S
3287
3328
  })
3288
3329
  ] }) : /* @__PURE__ */ n("div", {
@@ -3291,26 +3332,26 @@ var M = {
3291
3332
  /* @__PURE__ */ t("span", {
3292
3333
  className: Ut.uploadIcon,
3293
3334
  "aria-hidden": "true",
3294
- children: /* @__PURE__ */ t(J, {
3335
+ children: /* @__PURE__ */ t(K, {
3295
3336
  name: "IconUpload",
3296
3337
  width: 24,
3297
3338
  height: 24
3298
3339
  })
3299
3340
  }),
3300
- /* @__PURE__ */ t("strong", { children: k ? "Отпустите файлы здесь" : x }),
3301
- !k && I && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(j, {
3302
- onClick: () => D.current?.click(),
3341
+ /* @__PURE__ */ t("strong", { children: O ? "Отпустите файлы здесь" : x }),
3342
+ !O && F && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(A, {
3343
+ onClick: () => E.current?.click(),
3303
3344
  children: S
3304
3345
  })] })
3305
3346
  ]
3306
3347
  })]
3307
3348
  }),
3308
- u && !d && /* @__PURE__ */ t(N, {
3309
- id: M,
3349
+ u && !d && /* @__PURE__ */ t(M, {
3350
+ id: j,
3310
3351
  children: u
3311
3352
  }),
3312
- d && /* @__PURE__ */ t(N, {
3313
- id: P,
3353
+ d && /* @__PURE__ */ t(M, {
3354
+ id: N,
3314
3355
  variant: "error",
3315
3356
  live: !0,
3316
3357
  children: d
@@ -3379,65 +3420,65 @@ function Qt(e) {
3379
3420
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
3380
3421
  return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
3381
3422
  }
3382
- function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Zt, maxRows: w, autoResize: T = !0, ...E }) {
3383
- let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, P = [
3423
+ function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Zt, maxRows: ee, autoResize: w = !0, ...T }) {
3424
+ let E = f(), D = _ ?? `ds-textarea-${g ?? E}`, O = h(null), k = p ? `${D}-hint` : void 0, A = u ? `${D}-error` : void 0, j = S && x ? `${D}-count` : void 0, N = [
3425
+ k,
3384
3426
  A,
3385
- j,
3386
- M
3387
- ].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
3388
- let e = k.current;
3389
- if (!e || !T) return;
3390
- let t = window.getComputedStyle(e), n = Qt(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
3427
+ j
3428
+ ].filter(Boolean).join(" ") || void 0, P = Math.max(1, C), F = ee === void 0 ? void 0 : Math.max(P, ee), I = l(() => {
3429
+ let e = O.current;
3430
+ if (!e || !w) return;
3431
+ let t = window.getComputedStyle(e), n = Qt(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * P + r, a = F === void 0 ? Infinity : n * F + r;
3391
3432
  e.style.height = "auto";
3392
3433
  let o = Math.min(Math.max(e.scrollHeight, i), a);
3393
3434
  e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
3394
3435
  }, [
3395
- T,
3396
- I,
3397
- F
3436
+ w,
3437
+ F,
3438
+ P
3398
3439
  ]);
3399
3440
  d(() => {
3400
- L();
3401
- }, [L, e]), d(() => {
3402
- if (!T) return;
3403
- window.addEventListener("resize", L);
3404
- let e = k.current?.parentElement, t;
3441
+ I();
3442
+ }, [I, e]), d(() => {
3443
+ if (!w) return;
3444
+ window.addEventListener("resize", I);
3445
+ let e = O.current?.parentElement, t;
3405
3446
  if (e && typeof ResizeObserver < "u") {
3406
3447
  let n = e.getBoundingClientRect().width;
3407
3448
  t = new ResizeObserver(([e]) => {
3408
- !e || e.contentRect.width === n || (n = e.contentRect.width, L());
3449
+ !e || e.contentRect.width === n || (n = e.contentRect.width, I());
3409
3450
  }), t.observe(e);
3410
3451
  }
3411
3452
  return () => {
3412
- window.removeEventListener("resize", L), t?.disconnect();
3453
+ window.removeEventListener("resize", I), t?.disconnect();
3413
3454
  };
3414
- }, [T, L]);
3415
- let R = (e) => {
3416
- r?.(e.target.value, e), L();
3417
- }, z = () => {
3418
- let e = k.current;
3419
- e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
3420
- }, B = { "--ds-textarea-min-rows": F };
3455
+ }, [w, I]);
3456
+ let L = (e) => {
3457
+ r?.(e.target.value, e), I();
3458
+ }, R = () => {
3459
+ let e = O.current;
3460
+ e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), I());
3461
+ }, z = { "--ds-textarea-min-rows": P };
3421
3462
  return /* @__PURE__ */ n("div", {
3422
3463
  className: `${Xt.wrapper} ${m}`,
3423
3464
  children: [
3424
- c && /* @__PURE__ */ t(ee, {
3425
- htmlFor: O,
3465
+ c && /* @__PURE__ */ t(te, {
3466
+ htmlFor: D,
3426
3467
  required: b,
3427
3468
  disabled: a,
3428
3469
  children: c
3429
3470
  }),
3430
3471
  a && s ? /* @__PURE__ */ t("div", {
3431
- id: O,
3472
+ id: D,
3432
3473
  className: `${Xt.disabledText} ${Xt[v]}`,
3433
- style: B,
3434
- "aria-describedby": P,
3474
+ style: z,
3475
+ "aria-describedby": N,
3435
3476
  children: e || i
3436
3477
  }) : /* @__PURE__ */ n("div", {
3437
3478
  className: Xt.control,
3438
3479
  children: [/* @__PURE__ */ t("textarea", {
3439
- ref: k,
3440
- id: O,
3480
+ ref: O,
3481
+ id: D,
3441
3482
  name: g,
3442
3483
  value: e,
3443
3484
  placeholder: i,
@@ -3445,39 +3486,39 @@ function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3445
3486
  readOnly: o,
3446
3487
  required: b,
3447
3488
  maxLength: x,
3448
- rows: F,
3449
- style: B,
3489
+ rows: P,
3490
+ style: z,
3450
3491
  "aria-invalid": !!u,
3451
- "aria-describedby": P,
3452
- className: `${Xt.textarea} ${Xt[v]} ${T ? Xt.autoResize : Xt.manualResize} ${u ? Xt.textareaError : ""}`,
3453
- onChange: R,
3454
- ...E
3492
+ "aria-describedby": N,
3493
+ className: `${Xt.textarea} ${Xt[v]} ${w ? Xt.autoResize : Xt.manualResize} ${u ? Xt.textareaError : ""}`,
3494
+ onChange: L,
3495
+ ...T
3455
3496
  }), y && e && !a && !o && /* @__PURE__ */ t("button", {
3456
3497
  type: "button",
3457
3498
  className: Xt.clearAction,
3458
3499
  "aria-label": "Очистить поле",
3459
- onClick: z,
3460
- children: /* @__PURE__ */ t(J, {
3500
+ onClick: R,
3501
+ children: /* @__PURE__ */ t(K, {
3461
3502
  name: "IconCross",
3462
3503
  width: 20,
3463
3504
  height: 20
3464
3505
  })
3465
3506
  })]
3466
3507
  }),
3467
- (p || u || M) && /* @__PURE__ */ n("div", {
3508
+ (p || u || j) && /* @__PURE__ */ n("div", {
3468
3509
  className: Xt.messages,
3469
3510
  children: [
3470
- p && !u && /* @__PURE__ */ t(N, {
3471
- id: A,
3511
+ p && !u && /* @__PURE__ */ t(M, {
3512
+ id: k,
3472
3513
  children: p
3473
3514
  }),
3474
- u && /* @__PURE__ */ t(N, {
3475
- id: j,
3515
+ u && /* @__PURE__ */ t(M, {
3516
+ id: A,
3476
3517
  variant: "error",
3477
3518
  children: u
3478
3519
  }),
3479
- M && /* @__PURE__ */ n("span", {
3480
- id: M,
3520
+ j && /* @__PURE__ */ n("span", {
3521
+ id: j,
3481
3522
  className: Xt.counter,
3482
3523
  children: [
3483
3524
  e.length,
@@ -3565,24 +3606,24 @@ function pn(e) {
3565
3606
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
3566
3607
  }
3567
3608
  var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
3568
- let l = u(fn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = tn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
3609
+ let l = u(fn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [ee, w] = g(!1), T = tn((e) => e.closeModal), E = l.requestClose ?? (() => T(a)), D = p != null, O = m != null;
3569
3610
  d(() => {
3570
3611
  let e = document.activeElement, t = y.current;
3571
3612
  return (t?.querySelector(dn) ?? t)?.focus(), () => e?.focus();
3572
3613
  }, []);
3573
- let A = (e) => {
3574
- e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
3614
+ let k = (e) => {
3615
+ e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, w(!1), C(0);
3575
3616
  };
3576
3617
  return /* @__PURE__ */ n("div", {
3577
3618
  ref: y,
3578
3619
  className: `${un.panel} ${s}`,
3579
3620
  "data-closing": l.closing || void 0,
3580
- "data-dragging": w || void 0,
3621
+ "data-dragging": ee || void 0,
3581
3622
  style: { "--ds-modal-drag-offset": `${S}px` },
3582
3623
  role: c,
3583
3624
  "aria-modal": "true",
3584
- "aria-labelledby": O ? _ : void 0,
3585
- "aria-describedby": k ? v : void 0,
3625
+ "aria-labelledby": D ? _ : void 0,
3626
+ "aria-describedby": O ? v : void 0,
3586
3627
  tabIndex: -1,
3587
3628
  onKeyDown: pn,
3588
3629
  children: [
@@ -3596,36 +3637,36 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3596
3637
  onPointerMove: (e) => {
3597
3638
  if (e.pointerId !== x.current || !b.current) return;
3598
3639
  let t = cn(b.current, e.clientX, e.clientY);
3599
- b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
3640
+ b.current.intent === "vertical" && (e.preventDefault(), w(!0), C(t));
3600
3641
  },
3601
3642
  onPointerUp: (e) => {
3602
3643
  if (e.pointerId !== x.current || !b.current) return;
3603
3644
  let t = ln(b.current, e.clientY, e.timeStamp);
3604
- A(e.currentTarget), t && D();
3645
+ k(e.currentTarget), t && E();
3605
3646
  },
3606
- onPointerCancel: (e) => A(e.currentTarget),
3647
+ onPointerCancel: (e) => k(e.currentTarget),
3607
3648
  children: /* @__PURE__ */ t("span", {})
3608
3649
  }),
3609
- (O || o) && /* @__PURE__ */ n("header", {
3650
+ (D || o) && /* @__PURE__ */ n("header", {
3610
3651
  className: un.header,
3611
- children: [O && /* @__PURE__ */ t("h2", {
3652
+ children: [D && /* @__PURE__ */ t("h2", {
3612
3653
  id: _,
3613
3654
  className: un.title,
3614
3655
  children: p
3615
- }), /* @__PURE__ */ t(j, {
3656
+ }), /* @__PURE__ */ t(A, {
3616
3657
  className: un.close,
3617
3658
  variant: "empty",
3618
3659
  size: "sm",
3619
3660
  "aria-label": o,
3620
- onClick: D,
3621
- children: /* @__PURE__ */ t(J, {
3661
+ onClick: E,
3662
+ children: /* @__PURE__ */ t(K, {
3622
3663
  name: "IconCross",
3623
3664
  width: 24,
3624
3665
  height: 24
3625
3666
  })
3626
3667
  })]
3627
3668
  }),
3628
- k && /* @__PURE__ */ t("p", {
3669
+ O && /* @__PURE__ */ t("p", {
3629
3670
  id: v,
3630
3671
  className: un.description,
3631
3672
  children: m
@@ -3722,11 +3763,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3722
3763
  children: a
3723
3764
  }), /* @__PURE__ */ n("div", {
3724
3765
  className: vn.actions,
3725
- children: [/* @__PURE__ */ t(j, {
3766
+ children: [/* @__PURE__ */ t(A, {
3726
3767
  variant: "outline",
3727
3768
  onClick: () => u(!1),
3728
3769
  children: s
3729
- }), /* @__PURE__ */ t(j, {
3770
+ }), /* @__PURE__ */ t(A, {
3730
3771
  variant: c === "danger" ? "destructive" : "primary",
3731
3772
  onClick: () => u(!0),
3732
3773
  children: o
@@ -3742,7 +3783,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3742
3783
  children: a
3743
3784
  }), /* @__PURE__ */ t("div", {
3744
3785
  className: vn.actions,
3745
- children: /* @__PURE__ */ t(j, {
3786
+ children: /* @__PURE__ */ t(A, {
3746
3787
  onClick: r,
3747
3788
  children: o
3748
3789
  })
@@ -3818,7 +3859,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3818
3859
  let n = t[0], r = t.at(-1);
3819
3860
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
3820
3861
  }, Pn = () => u(Mn), Fn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
3821
- let S = h(null), C = f(), w = f(), T = (e) => {
3862
+ let S = h(null), C = f(), ee = f(), w = (e) => {
3822
3863
  g || r(e);
3823
3864
  };
3824
3865
  return d(() => {
@@ -3845,17 +3886,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3845
3886
  children: /* @__PURE__ */ t("div", {
3846
3887
  className: An.backdrop,
3847
3888
  onMouseDown: (e) => {
3848
- e.target === e.currentTarget && m && T("backdrop");
3889
+ e.target === e.currentTarget && m && w("backdrop");
3849
3890
  },
3850
3891
  children: /* @__PURE__ */ t(Mn.Provider, {
3851
- value: { requestClose: T },
3892
+ value: { requestClose: w },
3852
3893
  children: /* @__PURE__ */ n("section", {
3853
3894
  ref: S,
3854
3895
  className: `${An.panel} ${An[l]} ${An[u]} ${x}`,
3855
3896
  role: "dialog",
3856
3897
  "aria-modal": "true",
3857
3898
  "aria-labelledby": a ? C : void 0,
3858
- "aria-describedby": o ? w : void 0,
3899
+ "aria-describedby": o ? ee : void 0,
3859
3900
  tabIndex: -1,
3860
3901
  onKeyDown: Nn,
3861
3902
  children: [
@@ -3868,7 +3909,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3868
3909
  id: C,
3869
3910
  children: a
3870
3911
  }), o && /* @__PURE__ */ t("p", {
3871
- id: w,
3912
+ id: ee,
3872
3913
  children: o
3873
3914
  })]
3874
3915
  }),
@@ -3876,13 +3917,13 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3876
3917
  className: An.headerActions,
3877
3918
  children: s
3878
3919
  }),
3879
- /* @__PURE__ */ t(j, {
3920
+ /* @__PURE__ */ t(A, {
3880
3921
  variant: "empty",
3881
3922
  size: "sm",
3882
3923
  "aria-label": v,
3883
3924
  disabled: g,
3884
- onClick: () => T("close-button"),
3885
- children: /* @__PURE__ */ t(J, {
3925
+ onClick: () => w("close-button"),
3926
+ children: /* @__PURE__ */ t(K, {
3886
3927
  name: "IconCross",
3887
3928
  width: 20,
3888
3929
  height: 20
@@ -4002,7 +4043,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4002
4043
  /* @__PURE__ */ t("div", {
4003
4044
  className: Vn.icon,
4004
4045
  "aria-hidden": "true",
4005
- children: /* @__PURE__ */ t(J, {
4046
+ children: /* @__PURE__ */ t(K, {
4006
4047
  name: Hn[e.variant],
4007
4048
  color: "var(--ds-toast-accent)",
4008
4049
  width: 20,
@@ -4020,7 +4061,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4020
4061
  className: Vn.message,
4021
4062
  children: e.message
4022
4063
  }),
4023
- e.action && /* @__PURE__ */ t(j, {
4064
+ e.action && /* @__PURE__ */ t(A, {
4024
4065
  variant: "empty",
4025
4066
  size: "sm",
4026
4067
  onClick: () => {
@@ -4030,12 +4071,12 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4030
4071
  })
4031
4072
  ]
4032
4073
  }),
4033
- e.closable && /* @__PURE__ */ t(j, {
4074
+ e.closable && /* @__PURE__ */ t(A, {
4034
4075
  variant: "empty",
4035
4076
  size: "sm",
4036
4077
  "aria-label": "Закрыть уведомление",
4037
4078
  onClick: () => r(e.id),
4038
- children: /* @__PURE__ */ t(J, {
4079
+ children: /* @__PURE__ */ t(K, {
4039
4080
  name: "IconCross",
4040
4081
  width: 20,
4041
4082
  height: 20
@@ -4263,92 +4304,92 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4263
4304
  1.5,
4264
4305
  2
4265
4306
  ], ir = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
4266
- let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, te] = g(1), [V, H] = g(!!v.muted), [U, ne] = g(1), [re, W] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [G, K] = g(!0), [ce, le] = g(!1), [ue, de] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
4307
+ let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, ee] = g(!1), [w, T] = g(r.length > 0), [E, D] = g(!1), [k, j] = g(!1), [te, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, B] = g(1), [V, H] = g(!!v.muted), [ne, re] = g(1), [ie, ae] = g(!!v.loop), [oe, se] = g(-1), [ce, le] = g(!1), [ue, U] = g(!0), [de, fe] = g(!1), [pe, W] = g(!1), me = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), he = i.map((e, t) => ({
4267
4308
  track: e,
4268
4309
  index: t
4269
- })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, ge = !he && !me && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
4270
- K(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => K(!1), er));
4271
- }, [A, oe]);
4310
+ })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), ge = u ?? (C ? "Не удалось воспроизвести видео" : void 0), _e = c || w && !ge && r.length > 0, ve = !_e && !ge && r.length === 0, ye = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, be = l(() => {
4311
+ U(!0), window.clearTimeout(S.current), k && !ce && (S.current = window.setTimeout(() => U(!1), er));
4312
+ }, [k, ce]);
4272
4313
  d(() => {
4273
- w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
4274
- }, [fe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
4275
- let e = () => le(document.fullscreenElement === b.current), t = () => de(document.pictureInPictureElement === x.current);
4314
+ ee(!1), T(r.length > 0), D(!1), j(!1), M(!1), P(0), I(0), R(0);
4315
+ }, [me, r.length]), d(() => (be(), () => window.clearTimeout(S.current)), [be]), d(() => {
4316
+ let e = () => fe(document.fullscreenElement === b.current), t = () => W(document.pictureInPictureElement === x.current);
4276
4317
  return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
4277
4318
  document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
4278
4319
  };
4279
4320
  }, []), d(() => {
4280
- if (!oe) return;
4321
+ if (!ce) return;
4281
4322
  let e = (e) => {
4282
- y.current?.contains(e.target) || se(!1);
4323
+ y.current?.contains(e.target) || le(!1);
4283
4324
  };
4284
4325
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
4285
- }, [oe]);
4286
- let ye = async () => {
4326
+ }, [ce]);
4327
+ let xe = async () => {
4287
4328
  let e = x.current;
4288
- if (!(!e || me || he)) {
4329
+ if (!(!e || ge || _e)) {
4289
4330
  if (e.paused || e.ended) {
4290
4331
  e.ended && (e.currentTime = 0);
4291
4332
  try {
4292
4333
  await e.play();
4293
4334
  } catch {
4294
- w(!0);
4335
+ ee(!0);
4295
4336
  }
4296
4337
  } else e.pause();
4297
4338
  }
4298
- }, q = () => {
4339
+ }, G = () => {
4299
4340
  let e = x.current;
4300
4341
  e && (e.muted = !e.muted);
4301
- }, be = (e) => {
4342
+ }, Se = (e) => {
4302
4343
  let t = x.current;
4303
4344
  t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
4304
- }, Y = (e) => {
4345
+ }, Ce = (e) => {
4305
4346
  let t = x.current;
4306
- !t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
4307
- }, xe = async () => {
4347
+ !t || !F || (t.currentTime = Math.min(F, Math.max(0, e)), P(t.currentTime));
4348
+ }, we = async () => {
4308
4349
  if (b.current) try {
4309
4350
  document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
4310
4351
  } catch {
4311
- le(!1);
4352
+ fe(!1);
4312
4353
  }
4313
- }, X = async () => {
4354
+ }, q = async () => {
4314
4355
  let e = x.current;
4315
- if (!(!e || !_e)) try {
4356
+ if (!(!e || !ye)) try {
4316
4357
  document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
4317
4358
  } catch {
4318
- de(!1);
4359
+ W(!1);
4319
4360
  }
4320
- }, Se = (e) => {
4361
+ }, Te = (e) => {
4321
4362
  let t = x.current;
4322
4363
  t && (Array.from(t.textTracks).forEach((t, n) => {
4323
4364
  t.mode = n === e ? "showing" : "disabled";
4324
- }), ae(e));
4325
- }, Ce = (e) => {
4365
+ }), se(e));
4366
+ }, Ee = (e) => {
4326
4367
  let t = e.target;
4327
4368
  if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
4328
4369
  let n = e.key.toLowerCase();
4329
- n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), q()) : n === "f" ? (e.preventDefault(), xe()) : n === "c" && pe.length ? (e.preventDefault(), Se(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Y(P + (e.key === "ArrowRight" ? tr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), be(B + (e.key === "ArrowUp" ? nr : -.05))) : e.key === "Escape" && se(!1), ve();
4330
- }, we = () => {
4370
+ n === " " || n === "k" ? (e.preventDefault(), xe()) : n === "m" ? (e.preventDefault(), G()) : n === "f" ? (e.preventDefault(), we()) : n === "c" && he.length ? (e.preventDefault(), Te(oe === -1 ? he[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Ce(N + (e.key === "ArrowRight" ? tr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), Se(z + (e.key === "ArrowUp" ? nr : -.05))) : e.key === "Escape" && le(!1), be();
4371
+ }, J = () => {
4331
4372
  let e = x.current;
4332
- w(!1), E(!0), e?.load();
4333
- }, Te = {
4334
- "--video-progress": `${I ? P / I * 100 : 0}%`,
4335
- "--video-buffered": `${R * 100}%`
4373
+ ee(!1), T(!0), e?.load();
4374
+ }, Y = {
4375
+ "--video-progress": `${F ? N / F * 100 : 0}%`,
4376
+ "--video-buffered": `${L * 100}%`
4336
4377
  };
4337
4378
  return /* @__PURE__ */ n("figure", {
4338
4379
  ref: y,
4339
4380
  className: `${$.root} ${p}`,
4340
- onKeyDown: Ce,
4381
+ onKeyDown: Ee,
4341
4382
  children: [/* @__PURE__ */ n("div", {
4342
4383
  ref: b,
4343
- className: `${$.frame} ${ce ? $.fullscreen : ""}`,
4384
+ className: `${$.frame} ${de ? $.fullscreen : ""}`,
4344
4385
  style: { aspectRatio: o },
4345
- "aria-busy": he || void 0,
4386
+ "aria-busy": _e || void 0,
4346
4387
  tabIndex: m && r.length ? 0 : void 0,
4347
- onPointerMove: ve,
4348
- onPointerDown: ve,
4349
- onFocusCapture: ve,
4388
+ onPointerMove: be,
4389
+ onPointerDown: be,
4390
+ onFocusCapture: be,
4350
4391
  onMouseLeave: () => {
4351
- A && !oe && K(!1);
4392
+ k && !ce && U(!1);
4352
4393
  },
4353
4394
  children: [
4354
4395
  r.length > 0 && /* @__PURE__ */ n("video", {
@@ -4357,66 +4398,66 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4357
4398
  "aria-label": a,
4358
4399
  controls: !1,
4359
4400
  playsInline: _,
4360
- loop: re,
4401
+ loop: ie,
4361
4402
  className: $.video,
4362
4403
  style: { objectFit: s },
4363
4404
  onClick: (e) => {
4364
- v.onClick?.(e), ye();
4405
+ v.onClick?.(e), xe();
4365
4406
  },
4366
4407
  onDoubleClick: (e) => {
4367
- v.onDoubleClick?.(e), xe();
4408
+ v.onDoubleClick?.(e), we();
4368
4409
  },
4369
4410
  onLoadStart: (e) => {
4370
- E(!0), v.onLoadStart?.(e);
4411
+ T(!0), v.onLoadStart?.(e);
4371
4412
  },
4372
4413
  onLoadedMetadata: (e) => {
4373
- L(e.currentTarget.duration || 0);
4374
- let t = pe.find(({ track: e }) => e.default);
4375
- Se(t?.index ?? -1), v.onLoadedMetadata?.(e);
4414
+ I(e.currentTarget.duration || 0);
4415
+ let t = he.find(({ track: e }) => e.default);
4416
+ Te(t?.index ?? -1), v.onLoadedMetadata?.(e);
4376
4417
  },
4377
4418
  onDurationChange: (e) => {
4378
- L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
4419
+ I(e.currentTarget.duration || 0), v.onDurationChange?.(e);
4379
4420
  },
4380
4421
  onTimeUpdate: (e) => {
4381
- F(e.currentTarget.currentTime), v.onTimeUpdate?.(e);
4422
+ P(e.currentTarget.currentTime), v.onTimeUpdate?.(e);
4382
4423
  },
4383
4424
  onProgress: (e) => {
4384
4425
  let t = e.currentTarget;
4385
- t.duration && t.buffered.length && z(t.buffered.end(t.buffered.length - 1) / t.duration), v.onProgress?.(e);
4426
+ t.duration && t.buffered.length && R(t.buffered.end(t.buffered.length - 1) / t.duration), v.onProgress?.(e);
4386
4427
  },
4387
4428
  onLoadedData: (e) => {
4388
- E(!1), O(!1), v.onLoadedData?.(e);
4429
+ T(!1), D(!1), v.onLoadedData?.(e);
4389
4430
  },
4390
4431
  onCanPlay: (e) => {
4391
- E(!1), O(!1), v.onCanPlay?.(e);
4432
+ T(!1), D(!1), v.onCanPlay?.(e);
4392
4433
  },
4393
4434
  onWaiting: (e) => {
4394
- O(!0), v.onWaiting?.(e);
4435
+ D(!0), v.onWaiting?.(e);
4395
4436
  },
4396
4437
  onPlaying: (e) => {
4397
- M(!0), N(!1), O(!1), v.onPlaying?.(e);
4438
+ j(!0), M(!1), D(!1), v.onPlaying?.(e);
4398
4439
  },
4399
4440
  onPlay: (e) => {
4400
- M(!0), v.onPlay?.(e);
4441
+ j(!0), v.onPlay?.(e);
4401
4442
  },
4402
4443
  onPause: (e) => {
4403
- M(!1), v.onPause?.(e);
4444
+ j(!1), v.onPause?.(e);
4404
4445
  },
4405
4446
  onEnded: (e) => {
4406
- M(!1), N(!0), K(!0), v.onEnded?.(e);
4447
+ j(!1), M(!0), U(!0), v.onEnded?.(e);
4407
4448
  },
4408
4449
  onVolumeChange: (e) => {
4409
- te(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
4450
+ B(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
4410
4451
  },
4411
4452
  onRateChange: (e) => {
4412
- ne(e.currentTarget.playbackRate), v.onRateChange?.(e);
4453
+ re(e.currentTarget.playbackRate), v.onRateChange?.(e);
4413
4454
  },
4414
4455
  onError: (e) => {
4415
- E(!1), O(!1), w(!0), v.onError?.(e);
4456
+ T(!1), D(!1), ee(!0), v.onError?.(e);
4416
4457
  },
4417
4458
  children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
4418
4459
  }),
4419
- he && /* @__PURE__ */ n("div", {
4460
+ _e && /* @__PURE__ */ n("div", {
4420
4461
  className: $.overlay,
4421
4462
  role: "status",
4422
4463
  "aria-live": "polite",
@@ -4429,17 +4470,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4429
4470
  })
4430
4471
  }), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
4431
4472
  }),
4432
- !he && D && !me && /* @__PURE__ */ t("div", {
4473
+ !_e && E && !ge && /* @__PURE__ */ t("div", {
4433
4474
  className: $.buffering,
4434
4475
  role: "status",
4435
4476
  "aria-label": "Буферизация видео",
4436
- children: /* @__PURE__ */ t(k, { variant: "primary" })
4477
+ children: /* @__PURE__ */ t(O, { variant: "primary" })
4437
4478
  }),
4438
- ge && /* @__PURE__ */ n("div", {
4479
+ ve && /* @__PURE__ */ n("div", {
4439
4480
  className: `${$.state} ${$.empty}`,
4440
4481
  role: "status",
4441
4482
  children: [
4442
- /* @__PURE__ */ t(J, {
4483
+ /* @__PURE__ */ t(K, {
4443
4484
  name: "IconInfoCircle",
4444
4485
  className: $.stateIcon,
4445
4486
  width: 40,
@@ -4449,46 +4490,46 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4449
4490
  f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
4450
4491
  ]
4451
4492
  }),
4452
- !he && me && /* @__PURE__ */ n("div", {
4493
+ !_e && ge && /* @__PURE__ */ n("div", {
4453
4494
  className: `${$.state} ${$.error}`,
4454
4495
  role: "alert",
4455
4496
  children: [
4456
- /* @__PURE__ */ t(J, {
4497
+ /* @__PURE__ */ t(K, {
4457
4498
  name: "IconWarning",
4458
4499
  className: $.stateIcon,
4459
4500
  width: 40,
4460
4501
  height: 40
4461
4502
  }),
4462
- f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: me })] }),
4463
- r.length > 0 && /* @__PURE__ */ t(j, {
4503
+ f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: ge })] }),
4504
+ r.length > 0 && /* @__PURE__ */ t(A, {
4464
4505
  size: "sm",
4465
4506
  variant: "secondary",
4466
- onClick: we,
4507
+ onClick: J,
4467
4508
  children: "Повторить"
4468
4509
  })
4469
4510
  ]
4470
4511
  }),
4471
- !he && !me && ee && /* @__PURE__ */ t("button", {
4512
+ !_e && !ge && te && /* @__PURE__ */ t("button", {
4472
4513
  type: "button",
4473
4514
  className: $.replay,
4474
4515
  "aria-label": "Воспроизвести заново",
4475
- onClick: () => void ye(),
4476
- children: /* @__PURE__ */ t(J, {
4516
+ onClick: () => void xe(),
4517
+ children: /* @__PURE__ */ t(K, {
4477
4518
  name: "IconReplay",
4478
4519
  width: 28,
4479
4520
  height: 28
4480
4521
  })
4481
4522
  }),
4482
- m && r.length > 0 && !he && !me && /* @__PURE__ */ n("div", {
4483
- className: `${$.controlsLayer} ${G || !A ? $.controlsVisible : ""}`,
4523
+ m && r.length > 0 && !_e && !ge && /* @__PURE__ */ n("div", {
4524
+ className: `${$.controlsLayer} ${ue || !k ? $.controlsVisible : ""}`,
4484
4525
  onClick: (e) => e.stopPropagation(),
4485
- children: [oe && /* @__PURE__ */ n("div", {
4526
+ children: [ce && /* @__PURE__ */ n("div", {
4486
4527
  className: $.settings,
4487
4528
  role: "dialog",
4488
4529
  "aria-label": "Настройки видео",
4489
4530
  children: [
4490
4531
  /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
4491
- value: U,
4532
+ value: ne,
4492
4533
  onChange: (e) => {
4493
4534
  let t = Number(e.target.value);
4494
4535
  x.current && (x.current.playbackRate = t);
@@ -4498,13 +4539,13 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4498
4539
  children: [e, "×"]
4499
4540
  }, e))
4500
4541
  })] }),
4501
- pe.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
4502
- value: ie,
4503
- onChange: (e) => Se(Number(e.target.value)),
4542
+ he.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
4543
+ value: oe,
4544
+ onChange: (e) => Te(Number(e.target.value)),
4504
4545
  children: [/* @__PURE__ */ t("option", {
4505
4546
  value: -1,
4506
4547
  children: "Выключены"
4507
- }), pe.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
4548
+ }), he.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
4508
4549
  value: n,
4509
4550
  children: e.label
4510
4551
  }, `${e.srcLang}-${e.label}`))]
@@ -4512,18 +4553,18 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4512
4553
  /* @__PURE__ */ n("button", {
4513
4554
  type: "button",
4514
4555
  className: $.settingsAction,
4515
- "aria-pressed": re,
4516
- onClick: () => W((e) => !e),
4517
- children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: re ? "Вкл." : "Выкл." })]
4556
+ "aria-pressed": ie,
4557
+ onClick: () => ae((e) => !e),
4558
+ children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ie ? "Вкл." : "Выкл." })]
4518
4559
  }),
4519
- _e && /* @__PURE__ */ t("button", {
4560
+ ye && /* @__PURE__ */ t("button", {
4520
4561
  type: "button",
4521
4562
  className: $.settingsAction,
4522
- "aria-pressed": ue,
4523
- onClick: () => void X(),
4563
+ "aria-pressed": pe,
4564
+ onClick: () => void q(),
4524
4565
  children: /* @__PURE__ */ n("span", {
4525
4566
  className: $.settingsActionLabel,
4526
- children: [/* @__PURE__ */ t(J, {
4567
+ children: [/* @__PURE__ */ t(K, {
4527
4568
  name: "IconPictureInPicture",
4528
4569
  width: 18,
4529
4570
  height: 18
@@ -4539,11 +4580,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4539
4580
  children: /* @__PURE__ */ t("button", {
4540
4581
  type: "button",
4541
4582
  className: `${$.controlButton} ${$.playButton}`,
4542
- "aria-label": A ? "Пауза" : "Воспроизвести",
4543
- title: A ? "Пауза (K)" : "Воспроизвести (K)",
4544
- onClick: () => void ye(),
4545
- children: /* @__PURE__ */ t(J, {
4546
- name: A ? "IconPause" : "IconPlay",
4583
+ "aria-label": k ? "Пауза" : "Воспроизвести",
4584
+ title: k ? "Пауза (K)" : "Воспроизвести (K)",
4585
+ onClick: () => void xe(),
4586
+ children: /* @__PURE__ */ t(K, {
4587
+ name: k ? "IconPause" : "IconPlay",
4547
4588
  width: 24,
4548
4589
  height: 24
4549
4590
  })
@@ -4557,9 +4598,9 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4557
4598
  "aria-label": V ? "Включить звук" : "Выключить звук",
4558
4599
  "aria-pressed": V,
4559
4600
  title: "Звук (M)",
4560
- onClick: q,
4561
- children: /* @__PURE__ */ t(J, {
4562
- name: V || B === 0 ? "IconVolumeMuted" : "IconVolume",
4601
+ onClick: G,
4602
+ children: /* @__PURE__ */ t(K, {
4603
+ name: V || z === 0 ? "IconVolumeMuted" : "IconVolume",
4563
4604
  width: 22,
4564
4605
  height: 22
4565
4606
  })
@@ -4569,10 +4610,10 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4569
4610
  min: 0,
4570
4611
  max: 1,
4571
4612
  step: .05,
4572
- value: V ? 0 : B,
4613
+ value: V ? 0 : z,
4573
4614
  "aria-label": "Громкость",
4574
- "aria-valuetext": `${Math.round((V ? 0 : B) * 100)}%`,
4575
- onChange: (e) => be(Number(e.target.value))
4615
+ "aria-valuetext": `${Math.round((V ? 0 : z) * 100)}%`,
4616
+ onChange: (e) => Se(Number(e.target.value))
4576
4617
  })]
4577
4618
  }),
4578
4619
  /* @__PURE__ */ n("div", {
@@ -4580,23 +4621,23 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4580
4621
  children: [
4581
4622
  /* @__PURE__ */ t("span", {
4582
4623
  className: $.time,
4583
- children: $n(P)
4624
+ children: $n(N)
4584
4625
  }),
4585
4626
  /* @__PURE__ */ t("input", {
4586
4627
  className: $.timeline,
4587
- style: Te,
4628
+ style: Y,
4588
4629
  type: "range",
4589
4630
  min: 0,
4590
- max: I || 0,
4631
+ max: F || 0,
4591
4632
  step: .01,
4592
- value: Math.min(P, I || 0),
4633
+ value: Math.min(N, F || 0),
4593
4634
  "aria-label": "Позиция воспроизведения",
4594
- "aria-valuetext": `${$n(P)} из ${$n(I)}`,
4595
- onChange: (e) => Y(Number(e.target.value))
4635
+ "aria-valuetext": `${$n(N)} из ${$n(F)}`,
4636
+ onChange: (e) => Ce(Number(e.target.value))
4596
4637
  }),
4597
4638
  /* @__PURE__ */ t("span", {
4598
4639
  className: $.time,
4599
- children: $n(I)
4640
+ children: $n(F)
4600
4641
  })
4601
4642
  ]
4602
4643
  }),
@@ -4606,10 +4647,10 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4606
4647
  type: "button",
4607
4648
  className: $.controlButton,
4608
4649
  "aria-label": "Настройки",
4609
- "aria-expanded": oe,
4650
+ "aria-expanded": ce,
4610
4651
  title: "Настройки",
4611
- onClick: () => se((e) => !e),
4612
- children: /* @__PURE__ */ t(J, {
4652
+ onClick: () => le((e) => !e),
4653
+ children: /* @__PURE__ */ t(K, {
4613
4654
  name: "IconSettings",
4614
4655
  width: 22,
4615
4656
  height: 22
@@ -4617,11 +4658,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4617
4658
  }), /* @__PURE__ */ t("button", {
4618
4659
  type: "button",
4619
4660
  className: $.controlButton,
4620
- "aria-label": ce ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
4661
+ "aria-label": de ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
4621
4662
  title: "Полноэкранный режим (F)",
4622
- onClick: () => void xe(),
4623
- children: /* @__PURE__ */ t(J, {
4624
- name: ce ? "IconFullscreenExit" : "IconFullscreen",
4663
+ onClick: () => void we(),
4664
+ children: /* @__PURE__ */ t(K, {
4665
+ name: de ? "IconFullscreenExit" : "IconFullscreen",
4625
4666
  width: 22,
4626
4667
  height: 22
4627
4668
  })
@@ -4721,7 +4762,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4721
4762
  }), /* @__PURE__ */ t("span", {
4722
4763
  className: ar.icon,
4723
4764
  "aria-hidden": "true",
4724
- children: /* @__PURE__ */ t(J, {
4765
+ children: /* @__PURE__ */ t(K, {
4725
4766
  name: "IconChevron",
4726
4767
  width: 20,
4727
4768
  height: 20
@@ -4963,4 +5004,4 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4963
5004
  });
4964
5005
  };
4965
5006
  //#endregion
4966
- export { xn as ConfirmModal, sr as DSAccordion, w as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, j as DSButton, xe as DSCheckbox, D as DSCounterBadge, Tt as DSDataTable, We as DSDateRange, Ve as DSDateTimePicker, In as DSDrawer, Qe as DSDropDown, st as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, qt as DSFileInput, Rt as DSFilters, Yt as DSFloatingMenu, Bt as DSFormGrid, Vt as DSFormGridItem, Rn as DSFullscreenDialog, J as DSIcon, It as DSInfoBlock, nt as DSInput, k as DSLoader, hn as DSModal, mn as DSModalFrame, ur as DSNavigationSurface, Fn as DSOverlay, Bn as DSPageLoader, Jt as DSPortal, lt as DSRadioButton, Pt as DSSearchDropDown, Ke as DSSkeleton, et as DSSort, Qn as DSTabs, $t as DSTextarea, Un as DSToast, qn as DSToastProvider, Xn as DSTooltip, Ht as DSValidationSummary, ir as DSVideoPlayerFrame, Sn as ErrorModal, gn as ModalSystemProvider, Cn as builtInModalRegistry, _n as defineModalRegistry, E as formatDSCounterValue, De as formatDateInputValue, Ne as formatDateTimeLocalValue, or as getDSAccordionScrollTarget, pt as getDSDataTableColumnStyle, ht as getDSDataTablePaginationItems, mt as getDSDataTableStickyColumnStyle, Tn as getErrorMessage, ft as getNextDSDataTablePageSelection, Xe as getNextEnabledOptionIndex, Ae as isValidDateInputPrefix, Ue as isValidDateRange, Oe as maskDateInputValue, je as parseDateInputValue, Pe as parseDateTimeLocalValue, nn as resetModalStore, Kn as resetToastStore, wn as useConfirmModal, Dn as useConfirmModalStore, Pn as useDSOverlay, En as useErrorModal, On as useErrorModalStore, kn as useModals, tn as useModalsStore, Jn as useToast, Gn as useToastStore, gt as validateDSDataTableData };
5007
+ export { xn as ConfirmModal, sr as DSAccordion, ee as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, A as DSButton, we as DSCheckbox, E as DSCounterBadge, Et as DSDataTable, Ge as DSDateRange, He as DSDateTimePicker, In as DSDrawer, $e as DSDropDown, ct as DSDropDownMultiple, te as DSFieldLabel, M as DSFieldMessage, qt as DSFileInput, Rt as DSFilters, Yt as DSFloatingMenu, Bt as DSFormGrid, Vt as DSFormGridItem, Rn as DSFullscreenDialog, K as DSIcon, It as DSInfoBlock, rt as DSInput, O as DSLoader, hn as DSModal, mn as DSModalFrame, ur as DSNavigationSurface, Fn as DSOverlay, Bn as DSPageLoader, Jt as DSPortal, ut as DSRadioButton, Pt as DSSearchDropDown, qe as DSSkeleton, tt as DSSort, Qn as DSTabs, $t as DSTextarea, Un as DSToast, qn as DSToastProvider, Xn as DSTooltip, Ht as DSValidationSummary, ir as DSVideoPlayerFrame, Sn as ErrorModal, gn as ModalSystemProvider, Cn as builtInModalRegistry, _n as defineModalRegistry, T as formatDSCounterValue, Oe as formatDateInputValue, Pe as formatDateTimeLocalValue, or as getDSAccordionScrollTarget, mt as getDSDataTableColumnStyle, gt as getDSDataTablePaginationItems, ht as getDSDataTableStickyColumnStyle, Tn as getErrorMessage, pt as getNextDSDataTablePageSelection, Ze as getNextEnabledOptionIndex, je as isValidDateInputPrefix, We as isValidDateRange, ke as maskDateInputValue, Me as parseDateInputValue, Fe as parseDateTimeLocalValue, nn as resetModalStore, Kn as resetToastStore, wn as useConfirmModal, Dn as useConfirmModalStore, Pn as useDSOverlay, En as useErrorModal, On as useErrorModalStore, kn as useModals, tn as useModalsStore, Jn as useToast, Gn as useToastStore, _t as validateDSDataTableData };