@efficiency-point/design-system 0.0.10 → 0.0.12

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
@@ -58,11 +58,11 @@ var v = {
58
58
  destructiveOutline: "_destructiveOutline_1jisp_69"
59
59
  }, C = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, loadingLabel: a = "Загрузка", disabled: o, type: s = "button", className: c = "", ...l }, u) => /* @__PURE__ */ t("button", {
60
60
  ref: u,
61
- type: s,
62
61
  className: `${S.button} ${S[n]} ${S[r]} ${c}`,
63
62
  disabled: o || i,
64
63
  "aria-busy": i || void 0,
65
64
  ...l,
65
+ type: s,
66
66
  children: i ? /* @__PURE__ */ t(x, {
67
67
  variant: "light",
68
68
  label: a
@@ -207,47 +207,47 @@ var w = {
207
207
  }
208
208
  let n = new Date(t === "date" ? `${e}T00:00` : e);
209
209
  return Number.isNaN(n.getTime()) ? null : n;
210
- }, ee = (e, t) => {
210
+ }, I = (e, t) => {
211
211
  if (!e) return "";
212
212
  let n = `${M(e.getDate())}.${M(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
213
213
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
214
- }, I = (e) => {
214
+ }, L = (e) => {
215
215
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
216
216
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
217
217
  let n = new Date(r);
218
218
  return n.setDate(r.getDate() + t), n;
219
219
  });
220
- }, te = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ne = (e, t, n) => {
220
+ }, ee = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), te = (e, t, n) => {
221
221
  let r = N(e).getTime();
222
222
  return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
223
- }, L = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
- let C = c(), w = b ?? `ds-date-time-${x ?? C}`, D = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, M = u(null), N = u(null), [L, R] = d(!1), [z, B] = d(r ?? /* @__PURE__ */ new Date()), [V, re] = d(P(r, "time")), H = l(() => I(z), [z]), ie = a !== "time", U = a !== "date";
223
+ }, R = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
+ let C = c(), w = b ?? `ds-date-time-${x ?? C}`, D = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, M = u(null), N = u(null), [R, z] = d(!1), [B, V] = d(r ?? /* @__PURE__ */ new Date()), [H, ne] = d(P(r, "time")), U = l(() => L(B), [B]), re = a !== "time", W = a !== "date";
225
225
  s(() => {
226
- r && B(r), re(P(r, "time"));
226
+ r && V(r), ne(P(r, "time"));
227
227
  }, [r]), s(() => {
228
228
  let e = (e) => {
229
- M.current?.contains(e.target) || R(!1);
229
+ M.current?.contains(e.target) || z(!1);
230
230
  }, t = (e) => {
231
- e.key === "Escape" && (R(!1), N.current?.focus());
231
+ e.key === "Escape" && (z(!1), N.current?.focus());
232
232
  };
233
233
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
234
234
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
235
235
  };
236
236
  }, []);
237
- let ae = (e) => {
238
- if (ne(e, v, y)) return;
237
+ let ie = (e) => {
238
+ if (te(e, v, y)) return;
239
239
  let t = new Date(e);
240
- t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && R(!1);
241
- }, oe = (e) => {
242
- if (re(e), !e) {
240
+ t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && z(!1);
241
+ }, ae = (e) => {
242
+ if (ne(e), !e) {
243
243
  i?.(null);
244
244
  return;
245
245
  }
246
246
  let t = F(e, "time");
247
247
  if (!t) return;
248
- let n = new Date(a === "datetime" ? r ?? z : /* @__PURE__ */ new Date());
248
+ let n = new Date(a === "datetime" ? r ?? B : /* @__PURE__ */ new Date());
249
249
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(v && n < v || y && n > y) && i?.(n);
250
- }, W = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), se = [D, O].filter(Boolean).join(" ") || void 0;
250
+ }, G = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), oe = [D, O].filter(Boolean).join(" ") || void 0;
251
251
  return /* @__PURE__ */ n("div", {
252
252
  ref: M,
253
253
  className: `${k.wrapper} ${S}`,
@@ -266,25 +266,25 @@ var w = {
266
266
  className: `${k.trigger} ${m ? k.error : ""}`,
267
267
  disabled: h,
268
268
  "aria-readonly": g || void 0,
269
- "aria-expanded": L,
269
+ "aria-expanded": R,
270
270
  "aria-haspopup": "dialog",
271
- "aria-describedby": se,
271
+ "aria-describedby": oe,
272
272
  onClick: () => {
273
- g || R((e) => !e);
273
+ g || z((e) => !e);
274
274
  },
275
275
  children: [/* @__PURE__ */ t("span", {
276
276
  className: r ? k.value : k.placeholder,
277
- children: ee(r, a) || W
277
+ children: I(r, a) || G
278
278
  }), /* @__PURE__ */ t("span", {
279
279
  "aria-hidden": "true",
280
280
  children: "▾"
281
281
  })]
282
282
  }),
283
- L && !g && /* @__PURE__ */ n("div", {
283
+ R && !g && /* @__PURE__ */ n("div", {
284
284
  className: k.panel,
285
285
  role: "dialog",
286
- "aria-label": o ?? W,
287
- children: [ie && /* @__PURE__ */ n(e, { children: [
286
+ "aria-label": o ?? G,
287
+ children: [re && /* @__PURE__ */ n(e, { children: [
288
288
  /* @__PURE__ */ n("div", {
289
289
  className: k.calendarHeader,
290
290
  children: [
@@ -292,14 +292,14 @@ var w = {
292
292
  type: "button",
293
293
  className: k.nav,
294
294
  "aria-label": "Предыдущий месяц",
295
- onClick: () => B(new Date(z.getFullYear(), z.getMonth() - 1, 1)),
295
+ onClick: () => V(new Date(B.getFullYear(), B.getMonth() - 1, 1)),
296
296
  children: "‹"
297
297
  }),
298
298
  /* @__PURE__ */ t("select", {
299
299
  className: k.monthSelect,
300
300
  "aria-label": "Месяц",
301
- value: z.getMonth(),
302
- onChange: (e) => B(new Date(z.getFullYear(), Number(e.target.value), 1)),
301
+ value: B.getMonth(),
302
+ onChange: (e) => V(new Date(B.getFullYear(), Number(e.target.value), 1)),
303
303
  children: j.map((e, n) => /* @__PURE__ */ t("option", {
304
304
  value: n,
305
305
  children: e
@@ -309,14 +309,14 @@ var w = {
309
309
  className: k.yearInput,
310
310
  type: "number",
311
311
  "aria-label": "Год",
312
- value: z.getFullYear(),
313
- onChange: (e) => B(new Date(Number(e.target.value), z.getMonth(), 1))
312
+ value: B.getFullYear(),
313
+ onChange: (e) => V(new Date(Number(e.target.value), B.getMonth(), 1))
314
314
  }),
315
315
  /* @__PURE__ */ t("button", {
316
316
  type: "button",
317
317
  className: k.nav,
318
318
  "aria-label": "Следующий месяц",
319
- onClick: () => B(new Date(z.getFullYear(), z.getMonth() + 1, 1)),
319
+ onClick: () => V(new Date(B.getFullYear(), B.getMonth() + 1, 1)),
320
320
  children: "›"
321
321
  })
322
322
  ]
@@ -327,25 +327,25 @@ var w = {
327
327
  }),
328
328
  /* @__PURE__ */ t("div", {
329
329
  className: k.days,
330
- children: H.map((e) => {
331
- let n = te(r, e);
330
+ children: U.map((e) => {
331
+ let n = ee(r, e);
332
332
  return /* @__PURE__ */ t("button", {
333
333
  type: "button",
334
- className: `${k.day} ${e.getMonth() === z.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
335
- disabled: ne(e, v, y),
334
+ className: `${k.day} ${e.getMonth() === B.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
335
+ disabled: te(e, v, y),
336
336
  "aria-pressed": n,
337
- onClick: () => ae(e),
337
+ onClick: () => ie(e),
338
338
  children: e.getDate()
339
339
  }, e.toISOString());
340
340
  })
341
341
  })
342
- ] }), U && /* @__PURE__ */ n("label", {
342
+ ] }), W && /* @__PURE__ */ n("label", {
343
343
  className: k.timeLabel,
344
344
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
345
345
  className: k.timeInput,
346
346
  type: "time",
347
- value: V,
348
- onChange: (e) => oe(e.target.value)
347
+ value: H,
348
+ onChange: (e) => ae(e.target.value)
349
349
  })]
350
350
  })]
351
351
  }),
@@ -360,20 +360,20 @@ var w = {
360
360
  })
361
361
  ]
362
362
  });
363
- }, R = {
363
+ }, z = {
364
364
  root: "_root_1q42e_1",
365
365
  legend: "_legend_1q42e_3",
366
366
  range: "_range_1q42e_5"
367
- }, z = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), B = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
367
+ }, B = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), V = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
368
368
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
369
- i?.(e), z(e) && r?.(e);
369
+ i?.(e), B(e) && r?.(e);
370
370
  };
371
371
  return /* @__PURE__ */ n("fieldset", {
372
- className: `${R.root} ${h}`,
372
+ className: `${z.root} ${h}`,
373
373
  disabled: f,
374
374
  children: [/* @__PURE__ */ n("div", {
375
- className: R.range,
376
- children: [/* @__PURE__ */ t(L, {
375
+ className: z.range,
376
+ children: [/* @__PURE__ */ t(R, {
377
377
  value: e.from,
378
378
  mode: a === "datetime" ? "datetime" : a,
379
379
  label: o,
@@ -387,7 +387,7 @@ var w = {
387
387
  ...e,
388
388
  from: t
389
389
  })
390
- }), /* @__PURE__ */ t(L, {
390
+ }), /* @__PURE__ */ t(R, {
391
391
  value: e.to,
392
392
  mode: a === "datetime" ? "datetime" : a,
393
393
  label: s,
@@ -404,7 +404,7 @@ var w = {
404
404
  })]
405
405
  }), c && !g && /* @__PURE__ */ t(E, { children: c })]
406
406
  });
407
- }, V = {
407
+ }, H = {
408
408
  group: "_group_1fs9e_1",
409
409
  skeleton: "_skeleton_1fs9e_3",
410
410
  text: "_text_1fs9e_5",
@@ -412,17 +412,17 @@ var w = {
412
412
  circular: "_circular_1fs9e_9",
413
413
  animated: "_animated_1fs9e_11",
414
414
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
415
- }, re = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
- className: `${V.group} ${o}`,
415
+ }, ne = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
+ className: `${H.group} ${o}`,
417
417
  "aria-hidden": "true",
418
418
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
419
- className: `${V.skeleton} ${V[e]} ${a ? V.animated : ""}`,
419
+ className: `${H.skeleton} ${H[e]} ${a ? H.animated : ""}`,
420
420
  style: {
421
421
  width: s === i - 1 && i > 1 ? "70%" : n,
422
422
  height: r
423
423
  }
424
424
  }, s))
425
- }), H = {
425
+ }), U = {
426
426
  wrapper: "_wrapper_dkn63_1",
427
427
  label: "_label_dkn63_17",
428
428
  container: "_container_dkn63_29",
@@ -438,13 +438,13 @@ var w = {
438
438
  message: "_message_dkn63_265",
439
439
  error: "_error_dkn63_267",
440
440
  errorState: "_errorState_dkn63_293"
441
- }, ie = (e, t, n) => {
441
+ }, re = (e, t, n) => {
442
442
  for (let r = 0; r < e.length; r += 1) {
443
443
  let i = (t + r * n + e.length) % e.length;
444
444
  if (!e[i]?.disabled) return i;
445
445
  }
446
446
  return -1;
447
- }, U = ({ options: r, value: i, onChange: a, placeholder: o = "Выберите опцию", disabled: f = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
447
+ }, W = ({ options: r, value: i, onChange: a, placeholder: o = "Выберите опцию", disabled: f = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
448
448
  let S = c(), C = y ?? `ds-dropdown-${v ?? S}`, [w, T] = d(!1), E = u(null), D = u(null), O = u([]), k = l(() => r.find((e) => e.value === i), [r, i]), A = g ? `${C}-hint` : void 0, j = h ? `${C}-error` : void 0, M = [A, j].filter(Boolean).join(" ") || void 0, N = f && p;
449
449
  s(() => {
450
450
  let e = (e) => {
@@ -457,7 +457,7 @@ var w = {
457
457
  };
458
458
  }, [w]);
459
459
  let P = (e, t) => {
460
- let n = ie(r, e, t);
460
+ let n = re(r, e, t);
461
461
  O.current[n]?.focus(), O.current[n]?.scrollIntoView({ block: "nearest" });
462
462
  }, F = (e) => {
463
463
  e.disabled || (a?.(e.value, e), T(!1), D.current?.focus());
@@ -465,21 +465,21 @@ var w = {
465
465
  return /* @__PURE__ */ n("div", {
466
466
  ref: E,
467
467
  className: [
468
- H.wrapper,
469
- h ? H.errorState : "",
468
+ U.wrapper,
469
+ h ? U.errorState : "",
470
470
  _
471
471
  ].filter(Boolean).join(" "),
472
472
  children: [
473
473
  m && /* @__PURE__ */ t("label", {
474
474
  htmlFor: N ? void 0 : C,
475
- className: H.label,
475
+ className: U.label,
476
476
  children: m
477
477
  }),
478
478
  /* @__PURE__ */ t("div", {
479
- className: H.container,
479
+ className: U.container,
480
480
  children: N ? /* @__PURE__ */ t("div", {
481
481
  id: C,
482
- className: H.disabledText,
482
+ className: U.disabledText,
483
483
  "aria-describedby": M,
484
484
  children: k?.label ?? o
485
485
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
@@ -487,7 +487,7 @@ var w = {
487
487
  id: C,
488
488
  type: "button",
489
489
  name: v,
490
- className: H.trigger,
490
+ className: U.trigger,
491
491
  disabled: f,
492
492
  "aria-haspopup": "listbox",
493
493
  "aria-expanded": w,
@@ -503,10 +503,10 @@ var w = {
503
503
  }
504
504
  },
505
505
  children: [/* @__PURE__ */ t("span", {
506
- className: k ? H.value : H.placeholder,
506
+ className: k ? U.value : U.placeholder,
507
507
  children: k?.label ?? o
508
508
  }), /* @__PURE__ */ t("span", {
509
- className: `${H.chevron} ${w ? H.chevronOpen : ""}`,
509
+ className: `${U.chevron} ${w ? U.chevronOpen : ""}`,
510
510
  "aria-hidden": "true",
511
511
  children: /* @__PURE__ */ t("svg", {
512
512
  viewBox: "0 0 20 20",
@@ -522,7 +522,7 @@ var w = {
522
522
  })]
523
523
  }), w && /* @__PURE__ */ t("ul", {
524
524
  id: `${C}-listbox`,
525
- className: H.menu,
525
+ className: U.menu,
526
526
  role: "listbox",
527
527
  "aria-label": m,
528
528
  style: { maxHeight: x },
@@ -538,7 +538,7 @@ var w = {
538
538
  role: "option",
539
539
  "aria-selected": o,
540
540
  disabled: e.disabled,
541
- className: `${H.option} ${o ? H.selected : ""}`,
541
+ className: `${U.option} ${o ? U.selected : ""}`,
542
542
  onClick: () => F(e),
543
543
  onKeyDown: (e) => {
544
544
  if ((e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), P(a + (e.key === "ArrowDown" ? 1 : -1), e.key === "ArrowDown" ? 1 : -1)), e.key === "Tab" && T(!1), e.key === "Home" || e.key === "End") {
@@ -558,35 +558,35 @@ var w = {
558
558
  }),
559
559
  g && !h && /* @__PURE__ */ t("span", {
560
560
  id: A,
561
- className: H.message,
561
+ className: U.message,
562
562
  children: g
563
563
  }),
564
564
  h && /* @__PURE__ */ t("span", {
565
565
  id: j,
566
- className: H.error,
566
+ className: U.error,
567
567
  children: h
568
568
  })
569
569
  ]
570
570
  });
571
- }, ae = (e) => `${e.id}:${e.direction}`, oe = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
571
+ }, ie = (e) => `${e.id}:${e.direction}`, ae = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
572
572
  let c = e.flatMap((e) => [{
573
- value: ae({
573
+ value: ie({
574
574
  id: e.id,
575
575
  direction: "asc"
576
576
  }),
577
577
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
578
578
  disabled: e.disabled
579
579
  }, {
580
- value: ae({
580
+ value: ie({
581
581
  id: e.id,
582
582
  direction: "desc"
583
583
  }),
584
584
  label: e.descLabel ?? `${e.label} · по убыванию`,
585
585
  disabled: e.disabled
586
586
  }]);
587
- return /* @__PURE__ */ t(U, {
587
+ return /* @__PURE__ */ t(W, {
588
588
  options: c,
589
- value: n ? ae(n) : "",
589
+ value: n ? ie(n) : "",
590
590
  label: i,
591
591
  placeholder: a,
592
592
  disabled: o,
@@ -599,7 +599,7 @@ var w = {
599
599
  });
600
600
  }
601
601
  });
602
- }, W = {
602
+ }, G = {
603
603
  root: "_root_1h9ti_1",
604
604
  tableWrap: "_tableWrap_1h9ti_3",
605
605
  table: "_table_1h9ti_3",
@@ -613,10 +613,10 @@ var w = {
613
613
  default: "_default_1h9ti_41",
614
614
  tableOnMobile: "_tableOnMobile_1h9ti_41",
615
615
  wide: "_wide_1h9ti_45"
616
- }, se = m({
616
+ }, oe = m({
617
617
  rowSortingFeature: p,
618
618
  sortedRowModel: f()
619
- }), ce = (e, t) => {
619
+ }), se = (e, t) => {
620
620
  let n = /* @__PURE__ */ new Set();
621
621
  for (let t of e) {
622
622
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -628,35 +628,36 @@ var w = {
628
628
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
629
629
  }
630
630
  return null;
631
- }, le = (e, t) => typeof e == "function" ? e(t) : t[e], ue = (e) => {
631
+ }, ce = (e, t) => typeof e == "function" ? e(t) : t[e], le = (e) => {
632
632
  if (e == null || e === "") return null;
633
633
  let t = Date.parse(String(e));
634
634
  return Number.isNaN(t) ? null : t;
635
- }, de = (e, t, n) => {
636
- let r = ue(e.getValue(n)), i = ue(t.getValue(n));
635
+ }, ue = (e, t, n) => {
636
+ let r = le(e.getValue(n)), i = le(t.getValue(n));
637
637
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
638
- }, fe = (e, t, n) => {
638
+ }, de = (e, t, n) => {
639
639
  let r = e.getValue(n), i = t.getValue(n);
640
640
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
641
- }, pe = (e, t, n) => {
641
+ }, fe = (e, t, n) => {
642
642
  let r = e.getValue(n), i = t.getValue(n);
643
643
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
644
- }, me = (e, t, n) => {
644
+ }, pe = (e, t, n) => {
645
645
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
646
646
  return r.localeCompare(i, void 0, {
647
647
  numeric: !0,
648
648
  sensitivity: "base"
649
649
  });
650
- }, he = (e) => {
650
+ }, me = (e) => {
651
651
  switch (e) {
652
- case "date": return de;
653
- case "number": return fe;
654
- case "boolean": return pe;
655
- case "text": return me;
656
- default: return;
652
+ case "date": return ue;
653
+ case "number": return de;
654
+ case "boolean": return fe;
655
+ case "text":
656
+ case void 0: return pe;
657
+ case "custom": return;
657
658
  }
658
- }, ge = (e) => {
659
- let t = (t) => le(e.accessor, t), n = e.sortFn ?? he(e.dataType), r = e.enableSorting ?? n !== void 0, i = {
659
+ }, he = (e) => {
660
+ let t = (t) => ce(e.accessor, t), n = e.sortFn ?? me(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
660
661
  id: e.id,
661
662
  accessorFn: t,
662
663
  header: () => e.header,
@@ -667,10 +668,10 @@ var w = {
667
668
  enableSorting: r,
668
669
  sortDescFirst: e.sortDescFirst
669
670
  };
670
- return n && (i.sortFn = n), i;
671
- }, _e = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: f, ariaLabel: p, loading: m = !1, error: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "" }) => {
672
- let [x, S] = d([]), C = o ?? x, w = l(() => ce(e, r), [e, r]), T = l(() => e.map(ge), [e]), E = h({
673
- features: se,
671
+ return n !== void 0 && (i.sortFn = n), i;
672
+ }, ge = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: f, ariaLabel: p, loading: m = !1, error: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "" }) => {
673
+ let [x, S] = d([]), C = o ?? x, w = l(() => se(e, r), [e, r]), T = l(() => e.map(he), [e]), E = h({
674
+ features: oe,
674
675
  columns: T,
675
676
  data: r,
676
677
  state: { sorting: C },
@@ -679,21 +680,21 @@ var w = {
679
680
  o === void 0 && S(t), s?.(t);
680
681
  },
681
682
  getRowId: u
682
- }), D = E.getRowModel().rows, O = e.filter((e) => e.enableSorting ?? (e.dataType !== void 0 && e.dataType !== "custom")).map((e) => ({
683
+ }), D = E.getRowModel().rows, O = e.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
683
684
  id: e.id,
684
685
  label: typeof e.header == "string" ? e.header : e.id
685
686
  })), k = [
686
- W.root,
687
- a === "wide" ? W.wide : W.default,
688
- i ? W.tableOnMobile : "",
687
+ G.root,
688
+ a === "wide" ? G.wide : G.default,
689
+ i ? G.tableOnMobile : "",
689
690
  b
690
691
  ].filter(Boolean).join(" "), A = w ?? g;
691
692
  return /* @__PURE__ */ n("section", {
692
693
  className: k,
693
694
  "aria-busy": m,
694
695
  children: [
695
- !i && !m && !A && D.length > 0 && O.length > 0 && /* @__PURE__ */ t(oe, {
696
- className: W.mobileSort,
696
+ !i && !m && !A && D.length > 0 && O.length > 0 && /* @__PURE__ */ t(ae, {
697
+ className: G.mobileSort,
697
698
  options: O,
698
699
  value: C[0] ? {
699
700
  id: C[0].id,
@@ -705,15 +706,15 @@ var w = {
705
706
  }])
706
707
  }),
707
708
  /* @__PURE__ */ t("div", {
708
- className: W.tableWrap,
709
+ className: G.tableWrap,
709
710
  style: { maxHeight: y },
710
711
  children: /* @__PURE__ */ n("table", {
711
- className: W.table,
712
+ className: G.table,
712
713
  "aria-label": p,
713
714
  children: [
714
715
  f && /* @__PURE__ */ t("caption", { children: f }),
715
716
  /* @__PURE__ */ t("thead", {
716
- className: v ? W.sticky : "",
717
+ className: v ? G.sticky : "",
717
718
  children: E.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
718
719
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
719
720
  return /* @__PURE__ */ t("th", {
@@ -721,7 +722,7 @@ var w = {
721
722
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
722
723
  children: /* @__PURE__ */ n("button", {
723
724
  type: "button",
724
- className: W.sortButton,
725
+ className: G.sortButton,
725
726
  disabled: !i,
726
727
  onClick: a,
727
728
  children: [/* @__PURE__ */ t(E.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
@@ -734,13 +735,13 @@ var w = {
734
735
  }),
735
736
  /* @__PURE__ */ t("tbody", { children: m ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
736
737
  colSpan: e.length,
737
- children: /* @__PURE__ */ t(re, { lines: 3 })
738
+ children: /* @__PURE__ */ t(ne, { lines: 3 })
738
739
  }) }) : A ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
739
- className: W.state,
740
+ className: G.state,
740
741
  colSpan: e.length,
741
742
  children: A
742
743
  }) }) : D.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
743
- className: W.state,
744
+ className: G.state,
744
745
  colSpan: e.length,
745
746
  children: _
746
747
  }) }) : D.map((e) => /* @__PURE__ */ t("tr", { children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(E.FlexRender, { cell: e }) }, e.id)) }, e.id)) })
@@ -748,14 +749,14 @@ var w = {
748
749
  })
749
750
  }),
750
751
  !i && /* @__PURE__ */ t("div", {
751
- className: W.cards,
752
+ className: G.cards,
752
753
  role: "list",
753
754
  "aria-label": p ?? f,
754
- children: m ? /* @__PURE__ */ t(re, { lines: 4 }) : A ? /* @__PURE__ */ t("div", {
755
- className: W.state,
755
+ children: m ? /* @__PURE__ */ t(ne, { lines: 4 }) : A ? /* @__PURE__ */ t("div", {
756
+ className: G.state,
756
757
  children: A
757
758
  }) : D.length === 0 ? /* @__PURE__ */ t("div", {
758
- className: W.state,
759
+ className: G.state,
759
760
  children: _
760
761
  }) : D.map((r) => {
761
762
  if (c) return /* @__PURE__ */ t("div", {
@@ -765,14 +766,14 @@ var w = {
765
766
  columns: e
766
767
  })
767
768
  }, r.id);
768
- let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => le(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
769
+ let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => ce(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
769
770
  return /* @__PURE__ */ n("article", {
770
771
  role: "listitem",
771
- className: W.card,
772
+ className: G.card,
772
773
  children: [
773
774
  /* @__PURE__ */ t("h3", { children: a ? s(a) : `Строка ${r.index + 1}` }),
774
775
  /* @__PURE__ */ t("dl", { children: i.filter((e) => e !== a && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
775
- className: e.mobile?.mobileSpan === 2 ? W.spanTwo : "",
776
+ className: e.mobile?.mobileSpan === 2 ? G.spanTwo : "",
776
777
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: s(e) })]
777
778
  }, e.id)) }),
778
779
  i.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: s(e) }, e.id))
@@ -782,7 +783,7 @@ var w = {
782
783
  })
783
784
  ]
784
785
  });
785
- }, ve = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
786
+ }, _e = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
786
787
  let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = d(!1), w = u(null), T = u(null), E = u([]), D = l(() => e.filter((e) => r.includes(e.value)), [e, r]), O = D.map((e) => e.label).join(", "), k = m ? `${x}-hint` : void 0, A = p ? `${x}-error` : void 0;
787
788
  s(() => {
788
789
  let e = (e) => {
@@ -799,30 +800,30 @@ var w = {
799
800
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
800
801
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
801
802
  }, M = (t, n) => {
802
- let r = ie(e, t, n);
803
+ let r = re(e, t, n);
803
804
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
804
805
  };
805
806
  return /* @__PURE__ */ n("div", {
806
807
  ref: w,
807
808
  className: [
808
- H.wrapper,
809
- p ? H.errorState : "",
809
+ U.wrapper,
810
+ p ? U.errorState : "",
810
811
  h
811
812
  ].filter(Boolean).join(" "),
812
813
  children: [
813
814
  f && /* @__PURE__ */ t("label", {
814
815
  htmlFor: x,
815
- className: H.label,
816
+ className: U.label,
816
817
  children: f
817
818
  }),
818
819
  /* @__PURE__ */ n("div", {
819
- className: H.container,
820
+ className: U.container,
820
821
  children: [/* @__PURE__ */ n("button", {
821
822
  ref: T,
822
823
  id: x,
823
824
  type: "button",
824
825
  name: g,
825
- className: H.trigger,
826
+ className: U.trigger,
826
827
  disabled: o,
827
828
  "aria-haspopup": "listbox",
828
829
  "aria-expanded": S,
@@ -838,16 +839,16 @@ var w = {
838
839
  }
839
840
  },
840
841
  children: [/* @__PURE__ */ t("span", {
841
- className: D.length ? H.value : H.placeholder,
842
+ className: D.length ? U.value : U.placeholder,
842
843
  children: O || a
843
844
  }), /* @__PURE__ */ t("span", {
844
- className: `${H.chevron} ${S ? H.chevronOpen : ""}`,
845
+ className: `${U.chevron} ${S ? U.chevronOpen : ""}`,
845
846
  "aria-hidden": "true",
846
847
  children: "⌄"
847
848
  })]
848
849
  }), S && /* @__PURE__ */ t("ul", {
849
850
  id: `${x}-listbox`,
850
- className: H.menu,
851
+ className: U.menu,
851
852
  role: "listbox",
852
853
  "aria-label": f,
853
854
  "aria-multiselectable": "true",
@@ -864,7 +865,7 @@ var w = {
864
865
  role: "option",
865
866
  "aria-selected": o,
866
867
  disabled: i.disabled,
867
- className: `${H.option} ${o ? H.selected : ""}`,
868
+ className: `${U.option} ${o ? U.selected : ""}`,
868
869
  onClick: () => j(i),
869
870
  onKeyDown: (t) => {
870
871
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -890,17 +891,17 @@ var w = {
890
891
  }),
891
892
  m && !p && /* @__PURE__ */ t("span", {
892
893
  id: k,
893
- className: H.message,
894
+ className: U.message,
894
895
  children: m
895
896
  }),
896
897
  p && /* @__PURE__ */ t("span", {
897
898
  id: A,
898
- className: H.error,
899
+ className: U.error,
899
900
  children: p
900
901
  })
901
902
  ]
902
903
  });
903
- }, ye = {
904
+ }, ve = {
904
905
  approve: "M4 12l5 5L20 6",
905
906
  reject: "M5 5l14 14M19 5L5 19",
906
907
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -909,7 +910,7 @@ var w = {
909
910
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
910
911
  info: "M12 10v7m0-10v.01",
911
912
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
912
- }, be = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
913
+ }, ye = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
913
914
  viewBox: "0 0 24 24",
914
915
  width: i,
915
916
  height: a,
@@ -922,27 +923,27 @@ var w = {
922
923
  "aria-hidden": !r || void 0,
923
924
  focusable: "false",
924
925
  ...o,
925
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: ye[e] })]
926
- }), G = {
926
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: ve[e] })]
927
+ }), K = {
927
928
  root: "_root_1y2s8_1",
928
929
  header: "_header_1y2s8_21",
929
930
  title: "_title_1y2s8_41",
930
931
  dismiss: "_dismiss_1y2s8_55",
931
932
  content: "_content_1y2s8_113"
932
- }, xe = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
933
+ }, be = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
933
934
  let u = `ds-info-block-${c()}`;
934
935
  return /* @__PURE__ */ n("section", {
935
- className: `${G.root} ${l}`,
936
+ className: `${K.root} ${l}`,
936
937
  "aria-labelledby": u,
937
938
  children: [/* @__PURE__ */ n("header", {
938
- className: G.header,
939
+ className: K.header,
939
940
  children: [/* @__PURE__ */ t(s, {
940
941
  id: u,
941
- className: G.title,
942
+ className: K.title,
942
943
  children: e
943
944
  }), i && /* @__PURE__ */ t("button", {
944
945
  type: "button",
945
- className: G.dismiss,
946
+ className: K.dismiss,
946
947
  onClick: a,
947
948
  "aria-label": o,
948
949
  children: /* @__PURE__ */ t("svg", {
@@ -958,23 +959,23 @@ var w = {
958
959
  })
959
960
  })]
960
961
  }), /* @__PURE__ */ t("div", {
961
- className: G.content,
962
+ className: K.content,
962
963
  children: r
963
964
  })]
964
965
  });
965
- }, K = {
966
+ }, q = {
966
967
  wrapper: "_wrapper_1tz82_1",
967
968
  control: "_control_1tz82_3",
968
969
  input: "_input_1tz82_5",
969
970
  disabledText: "_disabledText_1tz82_5",
970
971
  inputError: "_inputError_1tz82_11",
971
972
  trailingAction: "_trailingAction_1tz82_13"
972
- }, Se = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: f = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, clearable: y = !0, required: b = !1, selectTextOnFocus: x = !1, isPassword: S = !1, passwordVisibleLabel: C = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: D, ...O }) => {
973
- let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = u(null), [M, N] = d(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, ee = String(e ?? ""), I = [P, F].filter(Boolean).join(" ") || void 0, te = S ? M ? "text" : "password" : i;
973
+ }, xe = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: f = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, clearable: y = !0, required: b = !1, selectTextOnFocus: x = !1, isPassword: S = !1, passwordVisibleLabel: C = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: D, ...O }) => {
974
+ let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = u(null), [M, N] = d(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, ee = S ? M ? "text" : "password" : i;
974
975
  return s(() => {
975
976
  S || N(!1);
976
977
  }, [S]), /* @__PURE__ */ n("div", {
977
- className: `${K.wrapper} ${g}`,
978
+ className: `${q.wrapper} ${g}`,
978
979
  children: [
979
980
  p && /* @__PURE__ */ t(T, {
980
981
  htmlFor: A,
@@ -984,25 +985,25 @@ var w = {
984
985
  }),
985
986
  o && f ? /* @__PURE__ */ t("div", {
986
987
  id: A,
987
- className: K.disabledText,
988
- "aria-describedby": I,
989
- children: ee || a
988
+ className: q.disabledText,
989
+ "aria-describedby": L,
990
+ children: I || a
990
991
  }) : /* @__PURE__ */ n("div", {
991
- className: K.control,
992
+ className: q.control,
992
993
  children: [
993
994
  /* @__PURE__ */ t("input", {
994
995
  ref: j,
995
996
  id: A,
996
997
  name: _,
997
- type: te,
998
- value: ee,
998
+ type: ee,
999
+ value: I,
999
1000
  placeholder: a,
1000
1001
  disabled: o,
1001
1002
  readOnly: l,
1002
1003
  required: b,
1003
1004
  "aria-invalid": !!m,
1004
- "aria-describedby": I,
1005
- className: `${K.input} ${m ? K.inputError : ""}`,
1005
+ "aria-describedby": L,
1006
+ className: `${q.input} ${m ? q.inputError : ""}`,
1006
1007
  onChange: (e) => {
1007
1008
  if (i === "number" && !S) {
1008
1009
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1018,7 +1019,7 @@ var w = {
1018
1019
  }),
1019
1020
  S && /* @__PURE__ */ t("button", {
1020
1021
  type: "button",
1021
- className: K.trailingAction,
1022
+ className: q.trailingAction,
1022
1023
  disabled: o,
1023
1024
  "aria-label": M ? C : w,
1024
1025
  "aria-pressed": M,
@@ -1037,9 +1038,9 @@ var w = {
1037
1038
  })]
1038
1039
  })
1039
1040
  }),
1040
- !S && y && ee && !o && !l && /* @__PURE__ */ t("button", {
1041
+ !S && y && I && !o && !l && /* @__PURE__ */ t("button", {
1041
1042
  type: "button",
1042
- className: K.trailingAction,
1043
+ className: q.trailingAction,
1043
1044
  "aria-label": "Очистить поле",
1044
1045
  onClick: () => {
1045
1046
  let e = j.current;
@@ -1060,22 +1061,22 @@ var w = {
1060
1061
  })
1061
1062
  ]
1062
1063
  });
1063
- }, q = {
1064
+ }, J = {
1064
1065
  wrapper: "_wrapper_vu1ob_1",
1065
1066
  input: "_input_vu1ob_21",
1066
1067
  switch: "_switch_vu1ob_35",
1067
1068
  thumb: "_thumb_vu1ob_67",
1068
1069
  label: "_label_vu1ob_111",
1069
1070
  disabled: "_disabled_vu1ob_123"
1070
- }, Ce = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1071
+ }, Se = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1071
1072
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1072
1073
  return /* @__PURE__ */ n("label", {
1073
1074
  htmlFor: p,
1074
- className: `${q.wrapper} ${a ? q.disabled : ""} ${s}`,
1075
+ className: `${J.wrapper} ${a ? J.disabled : ""} ${s}`,
1075
1076
  children: [
1076
1077
  /* @__PURE__ */ t("input", {
1077
1078
  id: p,
1078
- className: q.input,
1079
+ className: J.input,
1079
1080
  type: "checkbox",
1080
1081
  role: "switch",
1081
1082
  name: l,
@@ -1088,21 +1089,21 @@ var w = {
1088
1089
  }
1089
1090
  }),
1090
1091
  /* @__PURE__ */ t("span", {
1091
- className: q.switch,
1092
+ className: J.switch,
1092
1093
  "aria-hidden": "true",
1093
- children: /* @__PURE__ */ t("span", { className: q.thumb })
1094
+ children: /* @__PURE__ */ t("span", { className: J.thumb })
1094
1095
  }),
1095
1096
  i && /* @__PURE__ */ t("span", {
1096
- className: q.label,
1097
+ className: J.label,
1097
1098
  children: i
1098
1099
  })
1099
1100
  ]
1100
1101
  });
1101
- }, we = {
1102
+ }, Ce = {
1102
1103
  root: "_root_kepgo_1",
1103
1104
  grid: "_grid_kepgo_3",
1104
1105
  actions: "_actions_kepgo_5"
1105
- }, Te = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1106
+ }, we = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1106
1107
  let d = (e, t) => {
1107
1108
  let n = {
1108
1109
  ...r,
@@ -1111,34 +1112,33 @@ var w = {
1111
1112
  i?.(n, e), s === "instant" && a?.(n);
1112
1113
  };
1113
1114
  return /* @__PURE__ */ n("section", {
1114
- className: `${we.root} ${u}`,
1115
+ className: `${Ce.root} ${u}`,
1115
1116
  "aria-label": "Фильтры",
1116
1117
  "aria-busy": c,
1117
1118
  children: [/* @__PURE__ */ t("div", {
1118
- className: we.grid,
1119
+ className: Ce.grid,
1119
1120
  children: e.filter((e) => !e.hidden).map((e) => {
1120
1121
  let n = l || c || e.disabled, i = r[e.id];
1121
1122
  if (e.type === "input") {
1122
1123
  let r = {
1123
- key: e.id,
1124
1124
  label: e.label,
1125
1125
  hint: e.hint,
1126
1126
  placeholder: e.placeholder,
1127
1127
  disabled: n
1128
1128
  };
1129
- return e.inputType === "number" ? /* @__PURE__ */ t(Se, {
1129
+ return e.inputType === "number" ? /* @__PURE__ */ t(xe, {
1130
1130
  ...r,
1131
1131
  type: "number",
1132
1132
  value: i ?? "",
1133
1133
  onChange: (t) => d(e.id, t)
1134
- }) : /* @__PURE__ */ t(Se, {
1134
+ }, e.id) : /* @__PURE__ */ t(xe, {
1135
1135
  ...r,
1136
1136
  type: "text",
1137
1137
  value: String(i ?? ""),
1138
1138
  onChange: (t) => d(e.id, t)
1139
- });
1139
+ }, e.id);
1140
1140
  }
1141
- if (e.type === "dropdown") return /* @__PURE__ */ t(U, {
1141
+ if (e.type === "dropdown") return /* @__PURE__ */ t(W, {
1142
1142
  label: e.label,
1143
1143
  hint: e.hint,
1144
1144
  placeholder: e.placeholder,
@@ -1147,7 +1147,7 @@ var w = {
1147
1147
  disabled: n,
1148
1148
  onChange: (t) => d(e.id, t)
1149
1149
  }, e.id);
1150
- if (e.type === "multiple") return /* @__PURE__ */ t(ve, {
1150
+ if (e.type === "multiple") return /* @__PURE__ */ t(_e, {
1151
1151
  label: e.label,
1152
1152
  hint: e.hint,
1153
1153
  placeholder: e.placeholder,
@@ -1163,7 +1163,7 @@ var w = {
1163
1163
  disabled: n,
1164
1164
  onChange: (t) => d(e.id, t)
1165
1165
  }, e.id);
1166
- if (e.type === "radio") return /* @__PURE__ */ t(Ce, {
1166
+ if (e.type === "radio") return /* @__PURE__ */ t(Se, {
1167
1167
  label: e.label,
1168
1168
  checked: !!i,
1169
1169
  disabled: n,
@@ -1173,7 +1173,7 @@ var w = {
1173
1173
  from: null,
1174
1174
  to: null
1175
1175
  };
1176
- return /* @__PURE__ */ t(B, {
1176
+ return /* @__PURE__ */ t(V, {
1177
1177
  hint: e.hint,
1178
1178
  mode: e.mode,
1179
1179
  min: e.min,
@@ -1184,7 +1184,7 @@ var w = {
1184
1184
  }, e.id);
1185
1185
  })
1186
1186
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1187
- className: we.actions,
1187
+ className: Ce.actions,
1188
1188
  children: [o && /* @__PURE__ */ t(C, {
1189
1189
  variant: "destructiveOutline",
1190
1190
  disabled: l || c,
@@ -1198,7 +1198,7 @@ var w = {
1198
1198
  })]
1199
1199
  })]
1200
1200
  });
1201
- }, J = {
1201
+ }, Y = {
1202
1202
  wrapper: "_wrapper_1ymdr_1",
1203
1203
  dropzone: "_dropzone_1ymdr_3",
1204
1204
  dragActive: "_dragActive_1ymdr_5",
@@ -1212,12 +1212,12 @@ var w = {
1212
1212
  file: "_file_1ymdr_19",
1213
1213
  fileName: "_fileName_1ymdr_23",
1214
1214
  fileSize: "_fileSize_1ymdr_25"
1215
- }, Ee = (e) => `${e.name}:${e.size}:${e.lastModified}`, De = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Oe = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), ke = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: f, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: w = "Добавить ещё", onReject: D }) => {
1216
- let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, ee = [P, F].filter(Boolean).join(" ") || void 0, I = !g && !_, te = (e) => {
1217
- let t = [], n = new Set(r.map(Ee)), c = e.filter((e) => Oe(e, o) ? s !== void 0 && e.size > s ? (t.push({
1215
+ }, Te = (e) => `${e.name}:${e.size}:${e.lastModified}`, Ee = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, De = (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), Oe = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: f, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: w = "Добавить ещё", onReject: D }) => {
1216
+ let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, ee = (e) => {
1217
+ let t = [], n = new Set(r.map(Te)), c = e.filter((e) => De(e, o) ? s !== void 0 && e.size > s ? (t.push({
1218
1218
  file: e,
1219
1219
  reason: "maxSize"
1220
- }), !1) : !n.has(Ee(e)) && (n.add(Ee(e)), !0) : (t.push({
1220
+ }), !1) : !n.has(Te(e)) && (n.add(Te(e)), !0) : (t.push({
1221
1221
  file: e,
1222
1222
  reason: "accept"
1223
1223
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
@@ -1227,7 +1227,7 @@ var w = {
1227
1227
  })), d = d.slice(0, u)), t.length && D?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1228
1228
  };
1229
1229
  return /* @__PURE__ */ n("div", {
1230
- className: `${J.wrapper} ${b}`,
1230
+ className: `${Y.wrapper} ${b}`,
1231
1231
  children: [
1232
1232
  f && /* @__PURE__ */ t(T, {
1233
1233
  htmlFor: k,
@@ -1236,47 +1236,47 @@ var w = {
1236
1236
  children: f
1237
1237
  }),
1238
1238
  /* @__PURE__ */ n("div", {
1239
- className: `${J.dropzone} ${M ? J.dragActive : ""} ${g ? J.disabled : ""} ${m ? J.error : ""}`,
1239
+ className: `${Y.dropzone} ${M ? Y.dragActive : ""} ${g ? Y.disabled : ""} ${m ? Y.error : ""}`,
1240
1240
  onDragEnter: (e) => {
1241
- e.preventDefault(), I && ++j.current === 1 && N(!0);
1241
+ e.preventDefault(), L && ++j.current === 1 && N(!0);
1242
1242
  },
1243
1243
  onDragOver: (e) => e.preventDefault(),
1244
1244
  onDragLeave: (e) => {
1245
1245
  e.preventDefault(), --j.current <= 0 && (j.current = 0, N(!1));
1246
1246
  },
1247
1247
  onDrop: (e) => {
1248
- e.preventDefault(), j.current = 0, N(!1), I && te(Array.from(e.dataTransfer.files));
1248
+ e.preventDefault(), j.current = 0, N(!1), L && ee(Array.from(e.dataTransfer.files));
1249
1249
  },
1250
1250
  children: [/* @__PURE__ */ t("input", {
1251
1251
  ref: A,
1252
1252
  id: k,
1253
1253
  name: v,
1254
- className: J.nativeInput,
1254
+ className: Y.nativeInput,
1255
1255
  type: "file",
1256
1256
  multiple: a,
1257
1257
  accept: o,
1258
1258
  required: h && r.length === 0,
1259
- disabled: !I,
1260
- "aria-describedby": ee,
1259
+ disabled: !L,
1260
+ "aria-describedby": I,
1261
1261
  "aria-invalid": !!m,
1262
- onChange: (e) => te(Array.from(e.target.files ?? []))
1262
+ onChange: (e) => ee(Array.from(e.target.files ?? []))
1263
1263
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1264
1264
  /* @__PURE__ */ t("ul", {
1265
- className: J.files,
1265
+ className: Y.files,
1266
1266
  "aria-live": "polite",
1267
1267
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1268
- className: J.file,
1268
+ className: Y.file,
1269
1269
  children: [
1270
1270
  /* @__PURE__ */ t("span", {
1271
- className: J.fileName,
1271
+ className: Y.fileName,
1272
1272
  title: e.name,
1273
1273
  children: e.name
1274
1274
  }),
1275
1275
  /* @__PURE__ */ t("span", {
1276
- className: J.fileSize,
1277
- children: De(e.size)
1276
+ className: Y.fileSize,
1277
+ children: Ee(e.size)
1278
1278
  }),
1279
- I && /* @__PURE__ */ t(C, {
1279
+ L && /* @__PURE__ */ t(C, {
1280
1280
  variant: "empty",
1281
1281
  size: "sm",
1282
1282
  "aria-label": `Удалить файл ${e.name}`,
@@ -1284,31 +1284,31 @@ var w = {
1284
1284
  children: "×"
1285
1285
  })
1286
1286
  ]
1287
- }, Ee(e)))
1287
+ }, Te(e)))
1288
1288
  }),
1289
- I && (a || r.length === 0) && /* @__PURE__ */ t(C, {
1290
- className: J.browseButton,
1289
+ L && (a || r.length === 0) && /* @__PURE__ */ t(C, {
1290
+ className: Y.browseButton,
1291
1291
  size: "sm",
1292
1292
  onClick: () => A.current?.click(),
1293
1293
  children: w
1294
1294
  }),
1295
- I && !a && /* @__PURE__ */ t(C, {
1296
- className: J.browseButton,
1295
+ L && !a && /* @__PURE__ */ t(C, {
1296
+ className: Y.browseButton,
1297
1297
  size: "sm",
1298
1298
  onClick: () => A.current?.click(),
1299
1299
  children: S
1300
1300
  })
1301
1301
  ] }) : /* @__PURE__ */ n("div", {
1302
- className: J.empty,
1302
+ className: Y.empty,
1303
1303
  children: [
1304
1304
  /* @__PURE__ */ t("span", {
1305
- className: J.uploadIcon,
1305
+ className: Y.uploadIcon,
1306
1306
  "aria-hidden": "true",
1307
1307
  children: "↑"
1308
1308
  }),
1309
1309
  /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1310
- !M && I && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(C, {
1311
- className: J.browseButton,
1310
+ !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(C, {
1311
+ className: Y.browseButton,
1312
1312
  onClick: () => A.current?.click(),
1313
1313
  children: S
1314
1314
  })] })
@@ -1327,11 +1327,11 @@ var w = {
1327
1327
  })
1328
1328
  ]
1329
1329
  });
1330
- }, Ae = 0, Y = _((e) => ({
1330
+ }, ke = 0, X = _((e) => ({
1331
1331
  modals: [],
1332
1332
  openModal: (t, n = {}, r = {}) => {
1333
- Ae += 1;
1334
- let i = `ds-modal-${Ae}`;
1333
+ ke += 1;
1334
+ let i = `ds-modal-${ke}`;
1335
1335
  return e((e) => ({ modals: [...e.modals, {
1336
1336
  id: i,
1337
1337
  name: t,
@@ -1343,7 +1343,7 @@ var w = {
1343
1343
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1344
1344
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1345
1345
  closeAllModals: () => e({ modals: [] })
1346
- })), je = () => Y.setState({ modals: [] }), X = {
1346
+ })), Ae = () => X.setState({ modals: [] }), Z = {
1347
1347
  layer: "_layer_1nb2z_1",
1348
1348
  backdrop: "_backdrop_1nb2z_3",
1349
1349
  panel: "_panel_1nb2z_5",
@@ -1351,14 +1351,14 @@ var w = {
1351
1351
  title: "_title_1nb2z_11",
1352
1352
  description: "_description_1nb2z_13",
1353
1353
  content: "_content_1nb2z_15"
1354
- }, Me = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ne = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1355
- let f = c(), p = c(), m = u(null), h = Y((e) => e.closeModal);
1354
+ }, je = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Me = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1355
+ let f = c(), p = c(), m = u(null), h = X((e) => e.closeModal);
1356
1356
  return s(() => {
1357
1357
  let e = document.activeElement, t = m.current;
1358
- return (t?.querySelector(Me) ?? t)?.focus(), () => e?.focus();
1358
+ return (t?.querySelector(je) ?? t)?.focus(), () => e?.focus();
1359
1359
  }, []), /* @__PURE__ */ n("div", {
1360
1360
  ref: m,
1361
- className: `${X.panel} ${l}`,
1361
+ className: `${Z.panel} ${l}`,
1362
1362
  role: d,
1363
1363
  "aria-modal": "true",
1364
1364
  "aria-labelledby": r ? f : void 0,
@@ -1366,7 +1366,7 @@ var w = {
1366
1366
  tabIndex: -1,
1367
1367
  onKeyDown: (e) => {
1368
1368
  if (e.key !== "Tab") return;
1369
- let t = Array.from(m.current?.querySelectorAll(Me) ?? []);
1369
+ let t = Array.from(m.current?.querySelectorAll(je) ?? []);
1370
1370
  if (!t.length) {
1371
1371
  e.preventDefault();
1372
1372
  return;
@@ -1376,10 +1376,10 @@ var w = {
1376
1376
  },
1377
1377
  children: [
1378
1378
  (r || o) && /* @__PURE__ */ n("header", {
1379
- className: X.header,
1379
+ className: Z.header,
1380
1380
  children: [r && /* @__PURE__ */ t("h2", {
1381
1381
  id: f,
1382
- className: X.title,
1382
+ className: Z.title,
1383
1383
  children: r
1384
1384
  }), /* @__PURE__ */ t(C, {
1385
1385
  variant: "empty",
@@ -1391,31 +1391,31 @@ var w = {
1391
1391
  }),
1392
1392
  i && /* @__PURE__ */ t("p", {
1393
1393
  id: p,
1394
- className: X.description,
1394
+ className: Z.description,
1395
1395
  children: i
1396
1396
  }),
1397
1397
  /* @__PURE__ */ t("div", {
1398
- className: X.content,
1398
+ className: Z.content,
1399
1399
  children: e
1400
1400
  })
1401
1401
  ]
1402
1402
  });
1403
- }, Pe = ({ registry: e }) => {
1404
- let n = Y((e) => e.modals), r = Y((e) => e.closeModal), i = Y((e) => e.closeAllModals);
1403
+ }, Ne = ({ registry: e }) => {
1404
+ let n = X((e) => e.modals), r = X((e) => e.closeModal), i = X((e) => e.closeAllModals);
1405
1405
  return s(() => {
1406
1406
  let e = (e) => {
1407
1407
  if (e.key !== "Escape") return;
1408
- let t = Y.getState().modals.at(-1);
1408
+ let t = X.getState().modals.at(-1);
1409
1409
  t?.closeOnEscape && r(t.id);
1410
1410
  };
1411
1411
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1412
1412
  }, [r]), !n.length || typeof document > "u" ? null : g(/* @__PURE__ */ t("div", {
1413
- className: X.layer,
1413
+ className: Z.layer,
1414
1414
  "aria-label": "Модальные окна",
1415
1415
  children: n.map((a, o) => {
1416
1416
  let s = e[a.name];
1417
1417
  return s ? /* @__PURE__ */ t("div", {
1418
- className: X.backdrop,
1418
+ className: Z.backdrop,
1419
1419
  "aria-hidden": o !== n.length - 1 || void 0,
1420
1420
  onMouseDown: (e) => {
1421
1421
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1429,31 +1429,31 @@ var w = {
1429
1429
  }, a.id) : null;
1430
1430
  })
1431
1431
  }), document.body);
1432
- }, Fe = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1433
- let o = Y((e) => e.modals.length);
1432
+ }, Pe = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1433
+ let o = X((e) => e.modals.length);
1434
1434
  return s(() => {
1435
1435
  if (!a || o === 0) return;
1436
1436
  let e = document.body.style.overflow;
1437
1437
  return document.body.style.overflow = "hidden", () => {
1438
1438
  document.body.style.overflow = e;
1439
1439
  };
1440
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Pe, { registry: r })] });
1441
- }, Ie = (e) => e, Le = {
1440
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Ne, { registry: r })] });
1441
+ }, Fe = (e) => e, Ie = {
1442
1442
  message: "_message_1vtru_1",
1443
1443
  actions: "_actions_1vtru_3"
1444
- }, Re = /* @__PURE__ */ new Map(), ze = 0, Be = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1444
+ }, Le = /* @__PURE__ */ new Map(), Re = 0, ze = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1445
1445
  let u = (e) => {
1446
- Re.get(l)?.(e), Re.delete(l), r();
1446
+ Le.get(l)?.(e), Le.delete(l), r();
1447
1447
  };
1448
- return /* @__PURE__ */ n(Ne, {
1448
+ return /* @__PURE__ */ n(Me, {
1449
1449
  modalId: e,
1450
1450
  title: i,
1451
1451
  role: "alertdialog",
1452
1452
  children: [/* @__PURE__ */ t("p", {
1453
- className: Le.message,
1453
+ className: Ie.message,
1454
1454
  children: a
1455
1455
  }), /* @__PURE__ */ n("div", {
1456
- className: Le.actions,
1456
+ className: Ie.actions,
1457
1457
  children: [/* @__PURE__ */ t(C, {
1458
1458
  variant: "outline",
1459
1459
  onClick: () => u(!1),
@@ -1465,59 +1465,59 @@ var w = {
1465
1465
  })]
1466
1466
  })]
1467
1467
  });
1468
- }, Ve = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ne, {
1468
+ }, Be = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Me, {
1469
1469
  modalId: e,
1470
1470
  title: i,
1471
1471
  role: "alertdialog",
1472
1472
  children: [/* @__PURE__ */ t("p", {
1473
- className: Le.message,
1473
+ className: Ie.message,
1474
1474
  children: a
1475
1475
  }), /* @__PURE__ */ t("div", {
1476
- className: Le.actions,
1476
+ className: Ie.actions,
1477
1477
  children: /* @__PURE__ */ t(C, {
1478
1478
  onClick: r,
1479
1479
  children: o
1480
1480
  })
1481
1481
  })]
1482
- }), He = Ie({
1483
- ConfirmModal: Be,
1484
- ErrorModal: Ve
1485
- }), Ue = () => {
1486
- let e = Y((e) => e.openModal);
1482
+ }), Ve = Fe({
1483
+ ConfirmModal: ze,
1484
+ ErrorModal: Be
1485
+ }), He = () => {
1486
+ let e = X((e) => e.openModal);
1487
1487
  return (t = {}) => new Promise((n) => {
1488
- ze += 1;
1489
- let r = `confirm-${ze}`;
1490
- Re.set(r, n), e("ConfirmModal", {
1488
+ Re += 1;
1489
+ let r = `confirm-${Re}`;
1490
+ Le.set(r, n), e("ConfirmModal", {
1491
1491
  ...t,
1492
1492
  requestId: r
1493
1493
  }, { closeOnEscape: !1 });
1494
1494
  });
1495
- }, We = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ge = () => {
1496
- let e = Y((e) => e.openModal);
1495
+ }, Ue = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", We = () => {
1496
+ let e = X((e) => e.openModal);
1497
1497
  return { showError: (t, n) => e("ErrorModal", {
1498
1498
  title: n,
1499
- message: We(t)
1499
+ message: Ue(t)
1500
1500
  }) };
1501
- }, Ke = _(() => ({})), qe = _(() => ({})), Je = () => {
1502
- let e = Y((e) => e.modals), t = Y((e) => e.openModal);
1501
+ }, Ge = _(() => ({})), Ke = _(() => ({})), qe = () => {
1502
+ let e = X((e) => e.modals), t = X((e) => e.openModal);
1503
1503
  return {
1504
1504
  openModal: (e, n = {}, r) => t(e, n, r),
1505
- closeModal: Y((e) => e.closeModal),
1506
- closeTopModal: Y((e) => e.closeTopModal),
1507
- closeAllModals: Y((e) => e.closeAllModals),
1505
+ closeModal: X((e) => e.closeModal),
1506
+ closeTopModal: X((e) => e.closeTopModal),
1507
+ closeAllModals: X((e) => e.closeAllModals),
1508
1508
  isOpen: (t) => e.some((e) => e.name === t),
1509
1509
  count: e.length
1510
1510
  };
1511
- }, Ye = { root: "_root_1x7h7_1" }, Xe = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1512
- className: `${Ye.root} ${r}`,
1511
+ }, Je = { root: "_root_1x7h7_1" }, Ye = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1512
+ className: `${Je.root} ${r}`,
1513
1513
  role: "status",
1514
1514
  "aria-label": e,
1515
1515
  children: [/* @__PURE__ */ t(x, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1516
- }), Ze = {
1516
+ }), Xe = {
1517
1517
  root: "_root_elask_1",
1518
1518
  legend: "_legend_elask_3",
1519
1519
  range: "_range_elask_5"
1520
- }, Qe = [
1520
+ }, Ze = [
1521
1521
  {
1522
1522
  value: "1",
1523
1523
  label: "День"
@@ -1530,19 +1530,19 @@ var w = {
1530
1530
  value: "3",
1531
1531
  label: "Месяц"
1532
1532
  }
1533
- ], $e = {
1533
+ ], Qe = {
1534
1534
  day: 1,
1535
1535
  week: 2,
1536
1536
  month: 3
1537
- }, et = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = Qe }) => /* @__PURE__ */ n("fieldset", {
1538
- className: `${Ze.root} ${u}`,
1537
+ }, $e = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = Ze }) => /* @__PURE__ */ n("fieldset", {
1538
+ className: `${Xe.root} ${u}`,
1539
1539
  disabled: s,
1540
1540
  children: [
1541
1541
  i && /* @__PURE__ */ t("legend", {
1542
- className: Ze.legend,
1542
+ className: Xe.legend,
1543
1543
  children: i
1544
1544
  }),
1545
- /* @__PURE__ */ t(U, {
1545
+ /* @__PURE__ */ t(W, {
1546
1546
  options: d,
1547
1547
  value: String(e.periodType),
1548
1548
  disabled: s,
@@ -1553,8 +1553,8 @@ var w = {
1553
1553
  label: "Тип периода"
1554
1554
  }),
1555
1555
  /* @__PURE__ */ n("div", {
1556
- className: Ze.range,
1557
- children: [/* @__PURE__ */ t(L, {
1556
+ className: Xe.range,
1557
+ children: [/* @__PURE__ */ t(R, {
1558
1558
  value: e.startDate,
1559
1559
  onChange: (t) => r?.({
1560
1560
  ...e,
@@ -1564,7 +1564,7 @@ var w = {
1564
1564
  min: c,
1565
1565
  max: l,
1566
1566
  disabled: s
1567
- }), /* @__PURE__ */ t(L, {
1567
+ }), /* @__PURE__ */ t(R, {
1568
1568
  value: e.endDate,
1569
1569
  onChange: (t) => r?.({
1570
1570
  ...e,
@@ -1582,7 +1582,7 @@ var w = {
1582
1582
  children: o
1583
1583
  })
1584
1584
  ]
1585
- }), Z = {
1585
+ }), et = {
1586
1586
  viewport: "_viewport_15mi5_1",
1587
1587
  "top-right": "_top-right_15mi5_3",
1588
1588
  "top-left": "_top-left_15mi5_5",
@@ -1595,7 +1595,93 @@ var w = {
1595
1595
  success: "_success_15mi5_19",
1596
1596
  warning: "_warning_15mi5_21",
1597
1597
  error: "_error_15mi5_23"
1598
- }, tt = ({ toast: e, onClose: r }) => {
1598
+ }, tt = (e) => {
1599
+ let r;
1600
+ return r = e === "info" ? /* @__PURE__ */ n("svg", {
1601
+ xmlns: "http://www.w3.org/2000/svg",
1602
+ width: "24",
1603
+ height: "24",
1604
+ viewBox: "0 0 24 24",
1605
+ fill: "none",
1606
+ stroke: "#179cf0",
1607
+ strokeWidth: "2",
1608
+ strokeLinecap: "round",
1609
+ strokeLinejoin: "round",
1610
+ children: [
1611
+ /* @__PURE__ */ t("circle", {
1612
+ cx: "12",
1613
+ cy: "12",
1614
+ r: "10"
1615
+ }),
1616
+ /* @__PURE__ */ t("path", { d: "M12 16v-4" }),
1617
+ /* @__PURE__ */ t("path", { d: "M12 8h.01" })
1618
+ ]
1619
+ }) : e === "success" ? /* @__PURE__ */ n("svg", {
1620
+ xmlns: "http://www.w3.org/2000/svg",
1621
+ width: "24",
1622
+ height: "24",
1623
+ viewBox: "0 0 24 24",
1624
+ fill: "none",
1625
+ stroke: "#179c66",
1626
+ strokeWidth: "2",
1627
+ strokeLinecap: "round",
1628
+ strokeLinejoin: "round",
1629
+ children: [/* @__PURE__ */ t("circle", {
1630
+ cx: "12",
1631
+ cy: "12",
1632
+ r: "10"
1633
+ }), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
1634
+ }) : e === "warning" ? /* @__PURE__ */ n("svg", {
1635
+ xmlns: "http://www.w3.org/2000/svg",
1636
+ width: "24",
1637
+ height: "24",
1638
+ viewBox: "0 0 24 24",
1639
+ fill: "none",
1640
+ stroke: "#f59e0b",
1641
+ strokeWidth: "2",
1642
+ strokeLinecap: "round",
1643
+ strokeLinejoin: "round",
1644
+ children: [
1645
+ /* @__PURE__ */ t("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
1646
+ /* @__PURE__ */ t("path", { d: "M12 9v4" }),
1647
+ /* @__PURE__ */ t("path", { d: "M12 17h.01" })
1648
+ ]
1649
+ }) : e === "error" ? /* @__PURE__ */ n("svg", {
1650
+ xmlns: "http://www.w3.org/2000/svg",
1651
+ width: "24",
1652
+ height: "24",
1653
+ viewBox: "0 0 24 24",
1654
+ fill: "none",
1655
+ stroke: "#dc2626",
1656
+ strokeWidth: "2",
1657
+ strokeLinecap: "round",
1658
+ strokeLinejoin: "round",
1659
+ children: [
1660
+ /* @__PURE__ */ t("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
1661
+ /* @__PURE__ */ t("path", { d: "M12 9v4" }),
1662
+ /* @__PURE__ */ t("path", { d: "M12 17h.01" })
1663
+ ]
1664
+ }) : /* @__PURE__ */ n("svg", {
1665
+ xmlns: "http://www.w3.org/2000/svg",
1666
+ width: "24",
1667
+ height: "24",
1668
+ viewBox: "0 0 24 24",
1669
+ fill: "none",
1670
+ stroke: "currentColor",
1671
+ strokeWidth: "2",
1672
+ strokeLinecap: "round",
1673
+ strokeLinejoin: "round",
1674
+ children: [
1675
+ /* @__PURE__ */ t("circle", {
1676
+ cx: "12",
1677
+ cy: "12",
1678
+ r: "10"
1679
+ }),
1680
+ /* @__PURE__ */ t("path", { d: "m15 9-6 6" }),
1681
+ /* @__PURE__ */ t("path", { d: "m9 9 6 6" })
1682
+ ]
1683
+ }), r;
1684
+ }, nt = ({ toast: e, onClose: r }) => {
1599
1685
  let [i, a] = d(!1), o = u(e.duration), c = u(Date.now());
1600
1686
  return s(() => {
1601
1687
  if (i || e.duration <= 0) return;
@@ -1610,7 +1696,7 @@ var w = {
1610
1696
  e.duration,
1611
1697
  e.id
1612
1698
  ]), /* @__PURE__ */ n("article", {
1613
- className: `${Z.toast} ${Z[e.variant]}`,
1699
+ className: `${et.toast} ${et[e.variant]}`,
1614
1700
  role: e.variant === "error" ? "alert" : "status",
1615
1701
  "aria-live": e.variant === "error" ? "assertive" : "polite",
1616
1702
  onMouseEnter: () => a(!0),
@@ -1618,12 +1704,9 @@ var w = {
1618
1704
  onFocus: () => a(!0),
1619
1705
  onBlur: () => a(!1),
1620
1706
  children: [
1621
- /* @__PURE__ */ t(be, {
1622
- name: e.variant === "warning" ? "warning" : "info",
1623
- className: Z.icon
1624
- }),
1707
+ /* @__PURE__ */ t("div", { children: tt(e.variant) }),
1625
1708
  /* @__PURE__ */ n("div", {
1626
- className: Z.body,
1709
+ className: et.body,
1627
1710
  children: [
1628
1711
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1629
1712
  /* @__PURE__ */ t("div", { children: e.message }),
@@ -1642,15 +1725,26 @@ var w = {
1642
1725
  size: "sm",
1643
1726
  "aria-label": "Закрыть уведомление",
1644
1727
  onClick: () => r(e.id),
1645
- children: "×"
1728
+ children: /* @__PURE__ */ n("svg", {
1729
+ xmlns: "http://www.w3.org/2000/svg",
1730
+ width: "24",
1731
+ height: "24",
1732
+ viewBox: "0 0 24 24",
1733
+ fill: "none",
1734
+ stroke: "currentColor",
1735
+ strokeWidth: "2",
1736
+ strokeLinecap: "round",
1737
+ strokeLinejoin: "round",
1738
+ children: [/* @__PURE__ */ t("path", { d: "M18 6 6 18" }), /* @__PURE__ */ t("path", { d: "m6 6 12 12" })]
1739
+ })
1646
1740
  })
1647
1741
  ]
1648
1742
  });
1649
- }, nt = 0, Q = _((e) => ({
1743
+ }, rt = 0, Q = _((e) => ({
1650
1744
  toasts: [],
1651
1745
  showToast: (t) => {
1652
- nt += 1;
1653
- let n = `ds-toast-${nt}`;
1746
+ rt += 1;
1747
+ let n = `ds-toast-${rt}`;
1654
1748
  return e((e) => ({ toasts: [...e.toasts, {
1655
1749
  variant: "info",
1656
1750
  duration: 5e3,
@@ -1661,17 +1755,17 @@ var w = {
1661
1755
  },
1662
1756
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1663
1757
  clearToasts: () => e({ toasts: [] })
1664
- })), rt = () => Q.setState({ toasts: [] }), it = ({ position: e = "top-right" }) => {
1758
+ })), it = () => Q.setState({ toasts: [] }), at = ({ position: e = "top-right" }) => {
1665
1759
  let n = Q((e) => e.toasts), r = Q((e) => e.removeToast);
1666
1760
  return /* @__PURE__ */ t("div", {
1667
- className: `${Z.viewport} ${Z[e]}`,
1761
+ className: `${et.viewport} ${et[e]}`,
1668
1762
  "aria-label": "Уведомления",
1669
- children: n.map((e) => /* @__PURE__ */ t(tt, {
1763
+ children: n.map((e) => /* @__PURE__ */ t(nt, {
1670
1764
  toast: e,
1671
1765
  onClose: r
1672
1766
  }, e.id))
1673
1767
  });
1674
- }, at = () => {
1768
+ }, ot = () => {
1675
1769
  let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = o((t) => e({
1676
1770
  ...t,
1677
1771
  variant: "info"
@@ -1702,7 +1796,7 @@ var w = {
1702
1796
  i,
1703
1797
  a
1704
1798
  ]);
1705
- }, ot = {
1799
+ }, st = {
1706
1800
  root: "_root_s9o0g_1",
1707
1801
  tooltip: "_tooltip_s9o0g_3",
1708
1802
  "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
@@ -1710,7 +1804,7 @@ var w = {
1710
1804
  bottom: "_bottom_s9o0g_7",
1711
1805
  left: "_left_s9o0g_9",
1712
1806
  right: "_right_s9o0g_11"
1713
- }, st = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1807
+ }, ct = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1714
1808
  let h = c(), [g, _] = d(!1), v = u(null), y = () => {
1715
1809
  f || !e || (v.current = setTimeout(() => _(!0), l));
1716
1810
  }, b = () => {
@@ -1732,12 +1826,12 @@ var w = {
1732
1826
  onBlur: b
1733
1827
  });
1734
1828
  return /* @__PURE__ */ n("span", {
1735
- className: `${ot.root} ${m}`,
1829
+ className: `${st.root} ${m}`,
1736
1830
  onPointerDown: g ? b : y,
1737
1831
  children: [x, g && /* @__PURE__ */ t("span", {
1738
1832
  id: h,
1739
1833
  role: "tooltip",
1740
- className: `${ot.tooltip} ${ot[o]}`,
1834
+ className: `${st.tooltip} ${st[o]}`,
1741
1835
  style: { maxWidth: p },
1742
1836
  children: e
1743
1837
  })]
@@ -1749,7 +1843,7 @@ var w = {
1749
1843
  overlay: "_overlay_1ue3g_7",
1750
1844
  error: "_error_1ue3g_7",
1751
1845
  caption: "_caption_1ue3g_13"
1752
- }, ct = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1846
+ }, lt = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1753
1847
  let [h, g] = d(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1754
1848
  return /* @__PURE__ */ n("figure", {
1755
1849
  className: `${$.root} ${u}`,
@@ -1786,4 +1880,4 @@ var w = {
1786
1880
  });
1787
1881
  };
1788
1882
  //#endregion
1789
- export { Be as ConfirmModal, y as DSBadge, C as DSButton, O as DSCheckbox, _e as DSDataTable, B as DSDateRange, L as DSDateTimePicker, U as DSDropDown, ve as DSDropDownMultiple, T as DSFieldLabel, E as DSFieldMessage, ke as DSFileInput, Te as DSFilters, be as DSIcon, xe as DSInfoBlock, Se as DSInput, x as DSLoader, Pe as DSModal, Ne as DSModalFrame, Xe as DSPageLoader, Ce as DSRadioButton, re as DSSkeleton, oe as DSSort, et as DSTimePeriodPicker, tt as DSToast, it as DSToastProvider, st as DSTooltip, ct as DSVideoPlayerFrame, $e as DS_PERIOD_TYPE_CODES, Ve as ErrorModal, Fe as ModalSystemProvider, He as builtInModalRegistry, Ie as defineModalRegistry, P as formatDateTimeLocalValue, We as getErrorMessage, ie as getNextEnabledOptionIndex, z as isValidDateRange, F as parseDateTimeLocalValue, je as resetModalStore, rt as resetToastStore, Ue as useConfirmModal, Ke as useConfirmModalStore, Ge as useErrorModal, qe as useErrorModalStore, Je as useModals, Y as useModalsStore, at as useToast, Q as useToastStore, ce as validateDSDataTableData };
1883
+ export { ze as ConfirmModal, y as DSBadge, C as DSButton, O as DSCheckbox, ge as DSDataTable, V as DSDateRange, R as DSDateTimePicker, W as DSDropDown, _e as DSDropDownMultiple, T as DSFieldLabel, E as DSFieldMessage, Oe as DSFileInput, we as DSFilters, ye as DSIcon, be as DSInfoBlock, xe as DSInput, x as DSLoader, Ne as DSModal, Me as DSModalFrame, Ye as DSPageLoader, Se as DSRadioButton, ne as DSSkeleton, ae as DSSort, $e as DSTimePeriodPicker, nt as DSToast, at as DSToastProvider, ct as DSTooltip, lt as DSVideoPlayerFrame, Qe as DS_PERIOD_TYPE_CODES, Be as ErrorModal, Pe as ModalSystemProvider, Ve as builtInModalRegistry, Fe as defineModalRegistry, P as formatDateTimeLocalValue, Ue as getErrorMessage, re as getNextEnabledOptionIndex, B as isValidDateRange, F as parseDateTimeLocalValue, Ae as resetModalStore, it as resetToastStore, He as useConfirmModal, Ge as useConfirmModalStore, We as useErrorModal, Ke as useErrorModalStore, qe as useModals, X as useModalsStore, ot as useToast, Q as useToastStore, se as validateDSDataTableData };