@andreyfedkovich/cozy-ui 0.10.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as l from "react";
2
- import T, { useMemo as Ce, forwardRef as zt, useState as R, useRef as ge, useEffect as De, useCallback as W, useId as Go, memo as Jt, Children as Wt, isValidElement as Tr, useLayoutEffect as Hn, createElement as Do, createContext as Ta, useContext as Ra, useImperativeHandle as Rl } from "react";
2
+ import T, { useMemo as Ce, forwardRef as zt, useState as R, useRef as ve, useEffect as De, useCallback as W, useId as Go, memo as Jt, Children as Wt, isValidElement as Tr, useLayoutEffect as Hn, createElement as Do, createContext as Ta, useContext as Ra, useImperativeHandle as Rl } from "react";
3
3
  import { jsxs as E, jsx as d, Fragment as ze } from "react/jsx-runtime";
4
4
  import * as Aa from "react-dom";
5
5
  import Ia, { createPortal as La } from "react-dom";
@@ -535,14 +535,14 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
535
535
  u,
536
536
  z,
537
537
  B
538
- ], fe = () => ["", ie, En, qt], xe = () => ["solid", "dashed", "dotted", "double"], Ie = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], le = () => [ie, co, Ws, Ls], Oe = () => [
538
+ ], fe = () => ["", ie, En, qt], Ne = () => ["solid", "dashed", "dotted", "double"], Pe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], le = () => [ie, co, Ws, Ls], ke = () => [
539
539
  // Deprecated since Tailwind CSS v4.0.0
540
540
  "",
541
541
  "none",
542
542
  b,
543
543
  z,
544
544
  B
545
- ], ve = () => ["none", ie, z, B], me = () => ["none", ie, z, B], Ne = () => [ie, z, B], Te = () => [Tt, "full", ...M()];
545
+ ], _e = () => ["none", ie, z, B], pe = () => ["none", ie, z, B], Ee = () => [ie, z, B], Re = () => [Tt, "full", ...M()];
546
546
  return {
547
547
  cacheSize: 500,
548
548
  theme: {
@@ -1479,7 +1479,7 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
1479
1479
  * @see https://tailwindcss.com/docs/text-decoration-style
1480
1480
  */
1481
1481
  "text-decoration-style": [{
1482
- decoration: [...xe(), "wavy"]
1482
+ decoration: [...Ne(), "wavy"]
1483
1483
  }],
1484
1484
  /**
1485
1485
  * Text Decoration Thickness
@@ -1889,14 +1889,14 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
1889
1889
  * @see https://tailwindcss.com/docs/border-style
1890
1890
  */
1891
1891
  "border-style": [{
1892
- border: [...xe(), "hidden", "none"]
1892
+ border: [...Ne(), "hidden", "none"]
1893
1893
  }],
1894
1894
  /**
1895
1895
  * Divide Style
1896
1896
  * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1897
1897
  */
1898
1898
  "divide-style": [{
1899
- divide: [...xe(), "hidden", "none"]
1899
+ divide: [...Ne(), "hidden", "none"]
1900
1900
  }],
1901
1901
  /**
1902
1902
  * Border Color
@@ -1987,7 +1987,7 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
1987
1987
  * @see https://tailwindcss.com/docs/outline-style
1988
1988
  */
1989
1989
  "outline-style": [{
1990
- outline: [...xe(), "none", "hidden"]
1990
+ outline: [...Ne(), "none", "hidden"]
1991
1991
  }],
1992
1992
  /**
1993
1993
  * Outline Offset
@@ -2127,14 +2127,14 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2127
2127
  * @see https://tailwindcss.com/docs/mix-blend-mode
2128
2128
  */
2129
2129
  "mix-blend": [{
2130
- "mix-blend": [...Ie(), "plus-darker", "plus-lighter"]
2130
+ "mix-blend": [...Pe(), "plus-darker", "plus-lighter"]
2131
2131
  }],
2132
2132
  /**
2133
2133
  * Background Blend Mode
2134
2134
  * @see https://tailwindcss.com/docs/background-blend-mode
2135
2135
  */
2136
2136
  "bg-blend": [{
2137
- "bg-blend": Ie()
2137
+ "bg-blend": Pe()
2138
2138
  }],
2139
2139
  /**
2140
2140
  * Mask Clip
@@ -2353,7 +2353,7 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2353
2353
  * @see https://tailwindcss.com/docs/blur
2354
2354
  */
2355
2355
  blur: [{
2356
- blur: Oe()
2356
+ blur: ke()
2357
2357
  }],
2358
2358
  /**
2359
2359
  * Brightness
@@ -2443,7 +2443,7 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2443
2443
  * @see https://tailwindcss.com/docs/backdrop-blur
2444
2444
  */
2445
2445
  "backdrop-blur": [{
2446
- "backdrop-blur": Oe()
2446
+ "backdrop-blur": ke()
2447
2447
  }],
2448
2448
  /**
2449
2449
  * Backdrop Brightness
@@ -2620,56 +2620,56 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2620
2620
  * @see https://tailwindcss.com/docs/rotate
2621
2621
  */
2622
2622
  rotate: [{
2623
- rotate: ve()
2623
+ rotate: _e()
2624
2624
  }],
2625
2625
  /**
2626
2626
  * Rotate X
2627
2627
  * @see https://tailwindcss.com/docs/rotate
2628
2628
  */
2629
2629
  "rotate-x": [{
2630
- "rotate-x": ve()
2630
+ "rotate-x": _e()
2631
2631
  }],
2632
2632
  /**
2633
2633
  * Rotate Y
2634
2634
  * @see https://tailwindcss.com/docs/rotate
2635
2635
  */
2636
2636
  "rotate-y": [{
2637
- "rotate-y": ve()
2637
+ "rotate-y": _e()
2638
2638
  }],
2639
2639
  /**
2640
2640
  * Rotate Z
2641
2641
  * @see https://tailwindcss.com/docs/rotate
2642
2642
  */
2643
2643
  "rotate-z": [{
2644
- "rotate-z": ve()
2644
+ "rotate-z": _e()
2645
2645
  }],
2646
2646
  /**
2647
2647
  * Scale
2648
2648
  * @see https://tailwindcss.com/docs/scale
2649
2649
  */
2650
2650
  scale: [{
2651
- scale: me()
2651
+ scale: pe()
2652
2652
  }],
2653
2653
  /**
2654
2654
  * Scale X
2655
2655
  * @see https://tailwindcss.com/docs/scale
2656
2656
  */
2657
2657
  "scale-x": [{
2658
- "scale-x": me()
2658
+ "scale-x": pe()
2659
2659
  }],
2660
2660
  /**
2661
2661
  * Scale Y
2662
2662
  * @see https://tailwindcss.com/docs/scale
2663
2663
  */
2664
2664
  "scale-y": [{
2665
- "scale-y": me()
2665
+ "scale-y": pe()
2666
2666
  }],
2667
2667
  /**
2668
2668
  * Scale Z
2669
2669
  * @see https://tailwindcss.com/docs/scale
2670
2670
  */
2671
2671
  "scale-z": [{
2672
- "scale-z": me()
2672
+ "scale-z": pe()
2673
2673
  }],
2674
2674
  /**
2675
2675
  * Scale 3D
@@ -2681,21 +2681,21 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2681
2681
  * @see https://tailwindcss.com/docs/skew
2682
2682
  */
2683
2683
  skew: [{
2684
- skew: Ne()
2684
+ skew: Ee()
2685
2685
  }],
2686
2686
  /**
2687
2687
  * Skew X
2688
2688
  * @see https://tailwindcss.com/docs/skew
2689
2689
  */
2690
2690
  "skew-x": [{
2691
- "skew-x": Ne()
2691
+ "skew-x": Ee()
2692
2692
  }],
2693
2693
  /**
2694
2694
  * Skew Y
2695
2695
  * @see https://tailwindcss.com/docs/skew
2696
2696
  */
2697
2697
  "skew-y": [{
2698
- "skew-y": Ne()
2698
+ "skew-y": Ee()
2699
2699
  }],
2700
2700
  /**
2701
2701
  * Transform
@@ -2723,28 +2723,28 @@ const Ds = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ps = za, j
2723
2723
  * @see https://tailwindcss.com/docs/translate
2724
2724
  */
2725
2725
  translate: [{
2726
- translate: Te()
2726
+ translate: Re()
2727
2727
  }],
2728
2728
  /**
2729
2729
  * Translate X
2730
2730
  * @see https://tailwindcss.com/docs/translate
2731
2731
  */
2732
2732
  "translate-x": [{
2733
- "translate-x": Te()
2733
+ "translate-x": Re()
2734
2734
  }],
2735
2735
  /**
2736
2736
  * Translate Y
2737
2737
  * @see https://tailwindcss.com/docs/translate
2738
2738
  */
2739
2739
  "translate-y": [{
2740
- "translate-y": Te()
2740
+ "translate-y": Re()
2741
2741
  }],
2742
2742
  /**
2743
2743
  * Translate Z
2744
2744
  * @see https://tailwindcss.com/docs/translate
2745
2745
  */
2746
2746
  "translate-z": [{
2747
- "translate-z": Te()
2747
+ "translate-z": Re()
2748
2748
  }],
2749
2749
  /**
2750
2750
  * Translate None
@@ -3215,7 +3215,7 @@ const lt = ({
3215
3215
  "button--loading": "_button--loading_sby7s_186",
3216
3216
  button__loader: Jd,
3217
3217
  button__content: eu
3218
- }, Re = zt(
3218
+ }, Ae = zt(
3219
3219
  ({
3220
3220
  variant: e = "default",
3221
3221
  size: t = "medium",
@@ -3254,9 +3254,9 @@ const lt = ({
3254
3254
  );
3255
3255
  }
3256
3256
  );
3257
- Re.displayName = "Button";
3257
+ Ae.displayName = "Button";
3258
3258
  const tu = (e) => {
3259
- const [t, n] = R(0), [r, o] = R(0), s = ge(null);
3259
+ const [t, n] = R(0), [r, o] = R(0), s = ve(null);
3260
3260
  return De(() => {
3261
3261
  if (!e)
3262
3262
  return;
@@ -3289,7 +3289,7 @@ const tu = (e) => {
3289
3289
  enabled: r = !0,
3290
3290
  onAnchorFrame: o
3291
3291
  }) => {
3292
- const [s, a] = R("bottom"), i = ge(null), c = W(() => {
3292
+ const [s, a] = R("bottom"), i = ve(null), c = W(() => {
3293
3293
  if (!e.current)
3294
3294
  return "bottom";
3295
3295
  const f = e.current.getBoundingClientRect(), h = window.innerHeight, p = f.top - n;
@@ -3504,7 +3504,7 @@ function e6(e = {}) {
3504
3504
  );
3505
3505
  }
3506
3506
  function t6(e) {
3507
- const [t, n] = R(!1), r = ge(0), o = W((a) => a !== r.current, []);
3507
+ const [t, n] = R(!1), r = ve(0), o = W((a) => a !== r.current, []);
3508
3508
  return {
3509
3509
  validate: W(async () => {
3510
3510
  const a = ++r.current;
@@ -3605,7 +3605,7 @@ const bu = "_container_1dkro_1", yu = "_activeButton_1dkro_16", wu = "_slider_1d
3605
3605
  id: _.value,
3606
3606
  label: _.label,
3607
3607
  additionalComponent: _.additionalComponent
3608
- })) : r ?? [], [e, r]), [c, u] = R(() => n ?? s ?? i[0]?.id), [f, h] = R({ transform: "translateX(0)", width: 0 }), p = ge(/* @__PURE__ */ new Map()), m = t ?? o ?? c, { width: b } = tu(
3608
+ })) : r ?? [], [e, r]), [c, u] = R(() => n ?? s ?? i[0]?.id), [f, h] = R({ transform: "translateX(0)", width: 0 }), p = ve(/* @__PURE__ */ new Map()), m = t ?? o ?? c, { width: b } = tu(
3609
3609
  p.current.get(m)
3610
3610
  ), v = (_) => {
3611
3611
  _.id !== m && (a?.(_.id), u(_.id));
@@ -3627,7 +3627,7 @@ const bu = "_container_1dkro_1", yu = "_activeButton_1dkro_16", wu = "_slider_1d
3627
3627
  }
3628
3628
  }, [m, b, i]), /* @__PURE__ */ E("div", { className: uo.container, children: [
3629
3629
  i.map((_) => /* @__PURE__ */ d("div", { ref: (w) => g(w, _.id), children: /* @__PURE__ */ E(
3630
- Re,
3630
+ Ae,
3631
3631
  {
3632
3632
  size: "small",
3633
3633
  onClick: () => v(_),
@@ -3820,7 +3820,7 @@ const Xo = Jt(
3820
3820
  m || v(S), i?.(S);
3821
3821
  },
3822
3822
  [m, i]
3823
- ), w = ge(null), [y, C] = R(null), x = ge(null), k = ge(null), N = Array.isArray(o) ? o : [o], M = N.includes("hover"), P = N.includes("click"), D = W(() => {
3823
+ ), w = ve(null), [y, C] = R(null), x = ve(null), k = ve(null), N = Array.isArray(o) ? o : [o], M = N.includes("hover"), P = N.includes("click"), D = W(() => {
3824
3824
  x.current && (clearTimeout(x.current), x.current = null);
3825
3825
  }, []), A = W(() => {
3826
3826
  k.current && (clearTimeout(k.current), k.current = null);
@@ -5615,7 +5615,7 @@ var ss = "PopperContent", [C1, k1] = Mi(ss), Ri = l.forwardRef(
5615
5615
  updatePositionStrategy: m = "optimized",
5616
5616
  onPlaced: b,
5617
5617
  ...v
5618
- } = e, g = Oi(ss, n), [_, w] = l.useState(null), y = tt(t, (xe) => w(xe)), [C, x] = l.useState(null), k = y1(C), N = k?.width ?? 0, M = k?.height ?? 0, P = r + (s !== "center" ? "-" + s : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, A = Array.isArray(u) ? u : [u], $ = A.length > 0, I = {
5618
+ } = e, g = Oi(ss, n), [_, w] = l.useState(null), y = tt(t, (Ne) => w(Ne)), [C, x] = l.useState(null), k = y1(C), N = k?.width ?? 0, M = k?.height ?? 0, P = r + (s !== "center" ? "-" + s : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, A = Array.isArray(u) ? u : [u], $ = A.length > 0, I = {
5619
5619
  padding: D,
5620
5620
  boundary: A.filter(N1),
5621
5621
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -5624,7 +5624,7 @@ var ss = "PopperContent", [C1, k1] = Mi(ss), Ri = l.forwardRef(
5624
5624
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
5625
5625
  strategy: "fixed",
5626
5626
  placement: P,
5627
- whileElementsMounted: (...xe) => wi(...xe, {
5627
+ whileElementsMounted: (...Ne) => wi(...Ne, {
5628
5628
  animationFrame: m === "always"
5629
5629
  }),
5630
5630
  elements: {
@@ -5641,9 +5641,9 @@ var ss = "PopperContent", [C1, k1] = Mi(ss), Ri = l.forwardRef(
5641
5641
  c && Ni({ ...I }),
5642
5642
  Ei({
5643
5643
  ...I,
5644
- apply: ({ elements: xe, rects: Ie, availableWidth: le, availableHeight: Oe }) => {
5645
- const { width: ve, height: me } = Ie.reference, Ne = xe.floating.style;
5646
- Ne.setProperty("--radix-popper-available-width", `${le}px`), Ne.setProperty("--radix-popper-available-height", `${Oe}px`), Ne.setProperty("--radix-popper-anchor-width", `${ve}px`), Ne.setProperty("--radix-popper-anchor-height", `${me}px`);
5644
+ apply: ({ elements: Ne, rects: Pe, availableWidth: le, availableHeight: ke }) => {
5645
+ const { width: _e, height: pe } = Pe.reference, Ee = Ne.floating.style;
5646
+ Ee.setProperty("--radix-popper-available-width", `${le}px`), Ee.setProperty("--radix-popper-available-height", `${ke}px`), Ee.setProperty("--radix-popper-anchor-width", `${_e}px`), Ee.setProperty("--radix-popper-anchor-height", `${pe}px`);
5647
5647
  }
5648
5648
  }),
5649
5649
  C && v1({ element: C, padding: i }),
@@ -7334,7 +7334,7 @@ const Cm = "_anchor_1p8x5_5", km = "_triggerWrap_1p8x5_10", xm = "_popover_1p8x5
7334
7334
  contentClassName: c,
7335
7335
  iconClassName: u
7336
7336
  }) => {
7337
- const [f, h] = R(s), p = ge(!1), m = typeof o == "boolean" ? o : f, b = ge(null), v = typeof e == "string" ? /* @__PURE__ */ d("div", { className: ht.header_text, children: /* @__PURE__ */ d("span", { children: e }) }) : e, g = typeof n == "string" ? /* @__PURE__ */ d("span", { className: ht.content_text, children: n }) : n;
7337
+ const [f, h] = R(s), p = ve(!1), m = typeof o == "boolean" ? o : f, b = ve(null), v = typeof e == "string" ? /* @__PURE__ */ d("div", { className: ht.header_text, children: /* @__PURE__ */ d("span", { children: e }) }) : e, g = typeof n == "string" ? /* @__PURE__ */ d("span", { className: ht.content_text, children: n }) : n;
7338
7338
  De(() => {
7339
7339
  const w = b.current;
7340
7340
  if (w) {
@@ -7710,7 +7710,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
7710
7710
  className: s,
7711
7711
  labelClassName: a
7712
7712
  }) => {
7713
- const i = ge(null), c = typeof t == "string" && n ? `${t} *` : t;
7713
+ const i = ve(null), c = typeof t == "string" && n ? `${t} *` : t;
7714
7714
  return r ? /* @__PURE__ */ E("div", { className: O(xo.labelRow, s), children: [
7715
7715
  /* @__PURE__ */ d(
7716
7716
  Or,
@@ -7986,31 +7986,31 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
7986
7986
  }), re = Ar({
7987
7987
  onValueChange: o,
7988
7988
  onChange: s
7989
- }), [ce, X] = R(!1), [he, se] = R(!1), fe = ge(null), xe = ge(null), Ie = ge(null), [le, Oe] = R(""), ve = $ ?? (he && typeof document < "u" ? document.body : void 0);
7989
+ }), [ce, X] = R(!1), [he, se] = R(!1), fe = ve(null), Ne = ve(null), Pe = ve(null), [le, ke] = R(""), _e = $ ?? (he && typeof document < "u" ? document.body : void 0);
7990
7990
  De(() => {
7991
7991
  se(!0);
7992
7992
  }, []);
7993
- const me = W(
7994
- (_e) => {
7995
- Oe(_e), k?.(_e);
7993
+ const pe = W(
7994
+ (be) => {
7995
+ ke(be), k?.(be);
7996
7996
  },
7997
7997
  [k]
7998
7998
  );
7999
7999
  De(() => {
8000
8000
  if (!ce)
8001
8001
  return;
8002
- const _e = (Be) => {
8003
- fe.current && !fe.current.contains(Be.target) && (!xe.current || !xe.current.contains(Be.target)) && (me(""), X(!1), A?.());
8002
+ const be = (Be) => {
8003
+ fe.current && !fe.current.contains(Be.target) && (!Ne.current || !Ne.current.contains(Be.target)) && (pe(""), X(!1), A?.());
8004
8004
  };
8005
- return document.addEventListener("mousedown", _e, !0), () => {
8006
- document.removeEventListener("mousedown", _e, !0);
8005
+ return document.addEventListener("mousedown", be, !0), () => {
8006
+ document.removeEventListener("mousedown", be, !0);
8007
8007
  };
8008
- }, [me, ce, A]);
8009
- const { refs: Ne, floatingStyles: Te, update: je } = ap({
8008
+ }, [pe, ce, A]);
8009
+ const { refs: Ee, floatingStyles: Re, update: je } = ap({
8010
8010
  strategy: "absolute",
8011
8011
  placement: "bottom-start",
8012
8012
  open: ce,
8013
- whileElementsMounted: (_e, Be, ot) => wi(_e, Be, ot, {
8013
+ whileElementsMounted: (be, Be, ot) => wi(be, Be, ot, {
8014
8014
  ancestorScroll: !1,
8015
8015
  elementResize: !0,
8016
8016
  ancestorResize: !0,
@@ -8022,33 +8022,33 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8022
8022
  fallbackPlacements: ["top-start", "bottom-start"]
8023
8023
  }),
8024
8024
  Ei({
8025
- apply({ rects: _e, elements: Be }) {
8026
- const ot = `${Math.round(_e.reference.width)}px`;
8025
+ apply({ rects: be, elements: Be }) {
8026
+ const ot = `${Math.round(be.reference.width)}px`;
8027
8027
  Be.floating.style.width !== ot && (Be.floating.style.width = ot);
8028
8028
  }
8029
8029
  })
8030
8030
  ]
8031
8031
  }), ft = W(
8032
- (_e) => {
8033
- Ie.current = _e, Ne.setReference(_e);
8032
+ (be) => {
8033
+ Pe.current = be, Ee.setReference(be);
8034
8034
  },
8035
- [Ne]
8035
+ [Ee]
8036
8036
  ), rt = W(
8037
- (_e) => {
8038
- xe.current = _e, Ne.setFloating(_e);
8037
+ (be) => {
8038
+ Ne.current = be, Ee.setFloating(be);
8039
8039
  },
8040
- [Ne]
8040
+ [Ee]
8041
8041
  );
8042
8042
  De(() => {
8043
8043
  ce && je();
8044
8044
  }, [ce, je]);
8045
8045
  const Z = W(
8046
- (_e) => {
8047
- re?.(_e), me(""), A?.(), n === "single" && X(!1);
8046
+ (be) => {
8047
+ re?.(be), pe(""), A?.(), n === "single" && X(!1);
8048
8048
  },
8049
- [me, re, n, A]
8049
+ [pe, re, n, A]
8050
8050
  ), Ge = W(() => {
8051
- const _e = /* @__PURE__ */ d(
8051
+ const be = /* @__PURE__ */ d(
8052
8052
  "div",
8053
8053
  {
8054
8054
  ref: rt,
@@ -8060,7 +8060,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8060
8060
  },
8061
8061
  m
8062
8062
  ),
8063
- style: Te,
8063
+ style: Re,
8064
8064
  onClick: (Be) => Be.stopPropagation(),
8065
8065
  children: /* @__PURE__ */ d(
8066
8066
  "div",
@@ -8077,7 +8077,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8077
8077
  options: e,
8078
8078
  onChange: Z,
8079
8079
  onDelete: _,
8080
- ...k && { onSearch: me },
8080
+ ...k && { onSearch: pe },
8081
8081
  searchClassName: N,
8082
8082
  isLoading: P,
8083
8083
  searchValue: le,
@@ -8094,7 +8094,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8094
8094
  optionClassName: b,
8095
8095
  optionRender: u,
8096
8096
  onChange: Z,
8097
- ...k && { onSearch: me },
8097
+ ...k && { onSearch: pe },
8098
8098
  searchClassName: N,
8099
8099
  isLoading: P,
8100
8100
  searchValue: le,
@@ -8107,20 +8107,20 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8107
8107
  )
8108
8108
  }
8109
8109
  );
8110
- return ve ? Ia.createPortal(_e, ve) : _e;
8110
+ return _e ? Ia.createPortal(be, _e) : be;
8111
8111
  }, [
8112
8112
  m,
8113
8113
  c,
8114
- Te,
8114
+ Re,
8115
8115
  Z,
8116
- me,
8116
+ pe,
8117
8117
  P,
8118
8118
  ce,
8119
8119
  k,
8120
8120
  b,
8121
8121
  u,
8122
8122
  e,
8123
- ve,
8123
+ _e,
8124
8124
  K,
8125
8125
  F,
8126
8126
  J,
@@ -8164,7 +8164,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8164
8164
  onBlur: a,
8165
8165
  onFocus: i,
8166
8166
  onClick: () => {
8167
- D || (t && (me(""), A?.()), X((_e) => !_e));
8167
+ D || (t && (pe(""), A?.()), X((be) => !be));
8168
8168
  },
8169
8169
  children: [
8170
8170
  /* @__PURE__ */ d("div", { className: ue.selectedOptionContainer, children: sn ? /* @__PURE__ */ d(
@@ -8179,12 +8179,12 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8179
8179
  /* @__PURE__ */ E("div", { className: ue.iconContainer, children: [
8180
8180
  w && sn && /* @__PURE__ */ E(ze, { children: [
8181
8181
  /* @__PURE__ */ d(
8182
- Re,
8182
+ Ae,
8183
8183
  {
8184
8184
  variant: "text",
8185
8185
  className: O(ue.deleteIcon, g),
8186
- onClick: (_e) => {
8187
- _e.stopPropagation(), w();
8186
+ onClick: (be) => {
8187
+ be.stopPropagation(), w();
8188
8188
  },
8189
8189
  children: /* @__PURE__ */ d("span", { children: /* @__PURE__ */ d(St, {}) })
8190
8190
  }
@@ -8192,7 +8192,7 @@ const Ep = "_label_uh1zg_5", Sp = "_label__text_uh1zg_15", Mp = "_label_inline_u
8192
8192
  /* @__PURE__ */ d("div", { className: ue.divider, children: /* @__PURE__ */ d("div", {}) })
8193
8193
  ] }),
8194
8194
  h || /* @__PURE__ */ d(
8195
- Re,
8195
+ Ae,
8196
8196
  {
8197
8197
  variant: "text",
8198
8198
  className: O(ue.arrowIcon, {
@@ -8531,7 +8531,7 @@ const z0 = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d(
8531
8531
  }
8532
8532
  ));
8533
8533
  z0.displayName = jc.displayName;
8534
- const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0 = "_disabled_1jie0_37", q0 = "_selectedOption_1jie0_43", G0 = "_placeholder_1jie0_54", U0 = "_actions_1jie0_58", Z0 = "_clearButton_1jie0_65", K0 = "_selectButton_1jie0_74", X0 = "_dialogContent_1jie0_81", Q0 = "_dialogHeader_1jie0_96", J0 = "_dialogTitle_1jie0_101", eg = "_search_1jie0_108", tg = "_searchIcon_1jie0_124", ng = "_searchInput_1jie0_135", rg = "_searchSpinner_1jie0_166", og = "_tableContainer_1jie0_170", sg = "_table_1jie0_170", ag = "_activeRow_1jie0_213", ig = "_emptyState_1jie0_220", cg = "_dialogFooter_1jie0_227", lg = "_pagination_1jie0_235", dg = "_footerActions_1jie0_236", ug = "_pageInfo_1jie0_255", ke = {
8534
+ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0 = "_disabled_1jie0_37", q0 = "_selectedOption_1jie0_43", G0 = "_placeholder_1jie0_54", U0 = "_actions_1jie0_58", Z0 = "_clearButton_1jie0_65", K0 = "_selectButton_1jie0_74", X0 = "_dialogContent_1jie0_81", Q0 = "_dialogHeader_1jie0_96", J0 = "_dialogTitle_1jie0_101", eg = "_search_1jie0_108", tg = "_searchIcon_1jie0_124", ng = "_searchInput_1jie0_135", rg = "_searchSpinner_1jie0_166", og = "_tableContainer_1jie0_170", sg = "_table_1jie0_170", ag = "_activeRow_1jie0_213", ig = "_emptyState_1jie0_220", cg = "_dialogFooter_1jie0_227", lg = "_pagination_1jie0_235", dg = "_footerActions_1jie0_236", ug = "_pageInfo_1jie0_255", xe = {
8535
8535
  wrapper: j0,
8536
8536
  input: H0,
8537
8537
  error: V0,
@@ -8595,7 +8595,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8595
8595
  }), I = Ar({
8596
8596
  onValueChange: r,
8597
8597
  onChange: o
8598
- }), [V, te] = R(!1), [L, K] = R(""), [F, J] = R(""), [S, re] = R(1), [ce, X] = R([]), [he, se] = R(), [fe, xe] = R(!1), [Ie, le] = R(!1), Oe = ge(0), ve = Ce(
8598
+ }), [V, te] = R(!1), [L, K] = R(""), [F, J] = R(""), [S, re] = R(1), [ce, X] = R([]), [he, se] = R(), [fe, Ne] = R(!1), [Pe, le] = R(!1), ke = ve(0), _e = Ce(
8599
8599
  () => c ?? [
8600
8600
  {
8601
8601
  key: "label",
@@ -8609,7 +8609,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8609
8609
  }
8610
8610
  ],
8611
8611
  [c]
8612
- ), me = he ? Math.max(1, Math.ceil(he / w)) : void 0, Ne = S > 1, Te = me ? S < me : fe;
8612
+ ), pe = he ? Math.max(1, Math.ceil(he / w)) : void 0, Ee = S > 1, Re = pe ? S < pe : fe;
8613
8613
  De(() => {
8614
8614
  const Z = window.setTimeout(() => {
8615
8615
  J(L.trim()), re(1);
@@ -8618,11 +8618,11 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8618
8618
  }, [y, L]), De(() => {
8619
8619
  if (!V)
8620
8620
  return;
8621
- const Z = Oe.current + 1;
8622
- Oe.current = Z, le(!0), n({ search: F, page: S, pageSize: w }).then((Ge) => {
8623
- Oe.current === Z && (X(Ge.options), se(Ge.total), xe(Ge.hasNextPage ?? !1));
8621
+ const Z = ke.current + 1;
8622
+ ke.current = Z, le(!0), n({ search: F, page: S, pageSize: w }).then((Ge) => {
8623
+ ke.current === Z && (X(Ge.options), se(Ge.total), Ne(Ge.hasNextPage ?? !1));
8624
8624
  }).finally(() => {
8625
- Oe.current === Z && le(!1);
8625
+ ke.current === Z && le(!1);
8626
8626
  });
8627
8627
  }, [F, V, n, S, w]);
8628
8628
  const je = W((Z) => {
@@ -8633,7 +8633,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8633
8633
  },
8634
8634
  [je, I]
8635
8635
  ), rt = e ? A ? A(e) : e.label : t;
8636
- return /* @__PURE__ */ E("div", { className: O(ke.wrapper, P), children: [
8636
+ return /* @__PURE__ */ E("div", { className: O(xe.wrapper, P), children: [
8637
8637
  u && /* @__PURE__ */ d(
8638
8638
  Yt,
8639
8639
  {
@@ -8652,8 +8652,8 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8652
8652
  "aria-invalid": $.ariaInvalid,
8653
8653
  "aria-describedby": $.ariaDescribedBy,
8654
8654
  className: O(
8655
- ke.input,
8656
- { [ke.disabled]: C, [ke.error]: $.showError },
8655
+ xe.input,
8656
+ { [xe.disabled]: C, [xe.error]: $.showError },
8657
8657
  D
8658
8658
  ),
8659
8659
  onBlur: s,
@@ -8663,13 +8663,13 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8663
8663
  !C && (Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), je(!0));
8664
8664
  },
8665
8665
  children: [
8666
- /* @__PURE__ */ d("span", { className: O(ke.selectedOption, { [ke.placeholder]: !e }), children: rt }),
8667
- /* @__PURE__ */ E("span", { className: ke.actions, children: [
8666
+ /* @__PURE__ */ d("span", { className: O(xe.selectedOption, { [xe.placeholder]: !e }), children: rt }),
8667
+ /* @__PURE__ */ E("span", { className: xe.actions, children: [
8668
8668
  i && e && /* @__PURE__ */ d(
8669
- Re,
8669
+ Ae,
8670
8670
  {
8671
8671
  variant: "text",
8672
- className: ke.clearButton,
8672
+ className: xe.clearButton,
8673
8673
  "aria-label": "Очистить выбранное значение",
8674
8674
  onClick: (Z) => {
8675
8675
  Z.stopPropagation(), i();
@@ -8678,10 +8678,10 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8678
8678
  }
8679
8679
  ),
8680
8680
  /* @__PURE__ */ d(
8681
- Re,
8681
+ Ae,
8682
8682
  {
8683
8683
  variant: "link",
8684
- className: ke.selectButton,
8684
+ className: xe.selectButton,
8685
8685
  disabled: C,
8686
8686
  onClick: (Z) => {
8687
8687
  Z.stopPropagation(), je(!0);
@@ -8693,39 +8693,39 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8693
8693
  ]
8694
8694
  }
8695
8695
  ),
8696
- /* @__PURE__ */ d(Ur, { open: V, onOpenChange: je, children: /* @__PURE__ */ E(Zn, { className: ke.dialogContent, children: [
8697
- /* @__PURE__ */ d(Kn, { className: ke.dialogHeader, children: /* @__PURE__ */ d(Xn, { className: ke.dialogTitle, children: p }) }),
8698
- /* @__PURE__ */ E("div", { className: ke.search, children: [
8699
- /* @__PURE__ */ d(Uo, { className: ke.searchIcon }),
8696
+ /* @__PURE__ */ d(Ur, { open: V, onOpenChange: je, children: /* @__PURE__ */ E(Zn, { className: xe.dialogContent, children: [
8697
+ /* @__PURE__ */ d(Kn, { className: xe.dialogHeader, children: /* @__PURE__ */ d(Xn, { className: xe.dialogTitle, children: p }) }),
8698
+ /* @__PURE__ */ E("div", { className: xe.search, children: [
8699
+ /* @__PURE__ */ d(Uo, { className: xe.searchIcon }),
8700
8700
  /* @__PURE__ */ d(
8701
8701
  "input",
8702
8702
  {
8703
- className: ke.searchInput,
8703
+ className: xe.searchInput,
8704
8704
  value: L,
8705
8705
  onChange: (Z) => K(Z.target.value),
8706
8706
  placeholder: m,
8707
8707
  autoFocus: !0
8708
8708
  }
8709
8709
  ),
8710
- Ie && /* @__PURE__ */ d(lt, { size: "extraSmall", className: ke.searchSpinner })
8710
+ Pe && /* @__PURE__ */ d(lt, { size: "extraSmall", className: xe.searchSpinner })
8711
8711
  ] }),
8712
- /* @__PURE__ */ E("div", { className: ke.tableContainer, children: [
8713
- /* @__PURE__ */ E("table", { className: ke.table, children: [
8714
- /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: ve.map((Z) => /* @__PURE__ */ d("th", { className: Z.className, children: Z.title }, Z.key)) }) }),
8712
+ /* @__PURE__ */ E("div", { className: xe.tableContainer, children: [
8713
+ /* @__PURE__ */ E("table", { className: xe.table, children: [
8714
+ /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: _e.map((Z) => /* @__PURE__ */ d("th", { className: Z.className, children: Z.title }, Z.key)) }) }),
8715
8715
  /* @__PURE__ */ d("tbody", { children: ce.map((Z) => {
8716
8716
  const Ge = e?.value === Z.value;
8717
8717
  return /* @__PURE__ */ d(
8718
8718
  "tr",
8719
8719
  {
8720
- className: O({ [ke.activeRow]: Ge }),
8720
+ className: O({ [xe.activeRow]: Ge }),
8721
8721
  onClick: () => ft(Z),
8722
- children: ve.map((wt) => /* @__PURE__ */ d("td", { className: wt.className, children: wt.render(Z) }, wt.key))
8722
+ children: _e.map((wt) => /* @__PURE__ */ d("td", { className: wt.className, children: wt.render(Z) }, wt.key))
8723
8723
  },
8724
8724
  String(Z.value)
8725
8725
  );
8726
8726
  }) })
8727
8727
  ] }),
8728
- !Ie && !ce.length && /* @__PURE__ */ d("div", { className: ke.emptyState, children: /* @__PURE__ */ d(
8728
+ !Pe && !ce.length && /* @__PURE__ */ d("div", { className: xe.emptyState, children: /* @__PURE__ */ d(
8729
8729
  on,
8730
8730
  {
8731
8731
  title: "Ничего не найдено",
@@ -8733,37 +8733,37 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8733
8733
  }
8734
8734
  ) })
8735
8735
  ] }),
8736
- /* @__PURE__ */ E(Zr, { className: ke.dialogFooter, children: [
8737
- /* @__PURE__ */ E("div", { className: ke.pagination, children: [
8736
+ /* @__PURE__ */ E(Zr, { className: xe.dialogFooter, children: [
8737
+ /* @__PURE__ */ E("div", { className: xe.pagination, children: [
8738
8738
  /* @__PURE__ */ d(
8739
- Re,
8739
+ Ae,
8740
8740
  {
8741
8741
  variant: "secondary",
8742
8742
  size: "small",
8743
- disabled: !Ne || Ie,
8743
+ disabled: !Ee || Pe,
8744
8744
  onClick: () => re((Z) => Math.max(1, Z - 1)),
8745
8745
  children: "Назад"
8746
8746
  }
8747
8747
  ),
8748
- /* @__PURE__ */ E("span", { className: ke.pageInfo, children: [
8748
+ /* @__PURE__ */ E("span", { className: xe.pageInfo, children: [
8749
8749
  "Страница ",
8750
8750
  S,
8751
- me ? ` из ${me}` : ""
8751
+ pe ? ` из ${pe}` : ""
8752
8752
  ] }),
8753
8753
  /* @__PURE__ */ d(
8754
- Re,
8754
+ Ae,
8755
8755
  {
8756
8756
  variant: "secondary",
8757
8757
  size: "small",
8758
- disabled: !Te || Ie,
8758
+ disabled: !Re || Pe,
8759
8759
  onClick: () => re((Z) => Z + 1),
8760
8760
  children: "Вперёд"
8761
8761
  }
8762
8762
  )
8763
8763
  ] }),
8764
- /* @__PURE__ */ E("div", { className: ke.footerActions, children: [
8765
- _ && /* @__PURE__ */ d(Re, { variant: "primary", onClick: _, children: g }),
8766
- /* @__PURE__ */ d(Re, { variant: "secondary", onClick: () => je(!1), children: v })
8764
+ /* @__PURE__ */ E("div", { className: xe.footerActions, children: [
8765
+ _ && /* @__PURE__ */ d(Ae, { variant: "primary", onClick: _, children: g }),
8766
+ /* @__PURE__ */ d(Ae, { variant: "secondary", onClick: () => je(!1), children: v })
8767
8767
  ] })
8768
8768
  ] })
8769
8769
  ] }) }),
@@ -8840,22 +8840,22 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8840
8840
  onChange: a
8841
8841
  }), te = r ?? n, [L, K] = R(!1), [F, J] = R(""), [S, re] = R(""), [ce, X] = R(
8842
8842
  () => /* @__PURE__ */ new Map()
8843
- ), [he, se] = R(() => /* @__PURE__ */ new Set()), [fe, xe] = R(() => /* @__PURE__ */ new Set()), [Ie, le] = R(() => /* @__PURE__ */ new Set()), [Oe, ve] = R(() => /* @__PURE__ */ new Set()), [me, Ne] = R(!1), [Te, je] = R(null), ft = ge(0), rt = ge(0);
8843
+ ), [he, se] = R(() => /* @__PURE__ */ new Set()), [fe, Ne] = R(() => /* @__PURE__ */ new Set()), [Pe, le] = R(() => /* @__PURE__ */ new Set()), [ke, _e] = R(() => /* @__PURE__ */ new Set()), [pe, Ee] = R(!1), [Re, je] = R(null), ft = ve(0), rt = ve(0);
8844
8844
  De(() => {
8845
8845
  if (!L || ce.has(kt)) return;
8846
8846
  const q = ft.current + 1;
8847
- ft.current = q, se((Ee) => {
8848
- const be = new Set(Ee);
8849
- return be.add(kt), be;
8850
- }), te({ parentId: null, search: "" }).then((Ee) => {
8851
- ft.current === q && X((be) => {
8852
- const Le = new Map(be);
8853
- return Le.set(kt, Ee.nodes), Le;
8847
+ ft.current = q, se((Se) => {
8848
+ const me = new Set(Se);
8849
+ return me.add(kt), me;
8850
+ }), te({ parentId: null, search: "" }).then((Se) => {
8851
+ ft.current === q && X((me) => {
8852
+ const Le = new Map(me);
8853
+ return Le.set(kt, Se.nodes), Le;
8854
8854
  });
8855
8855
  }).finally(() => {
8856
- ft.current === q && se((Ee) => {
8857
- const be = new Set(Ee);
8858
- return be.delete(kt), be;
8856
+ ft.current === q && se((Se) => {
8857
+ const me = new Set(Se);
8858
+ return me.delete(kt), me;
8859
8859
  });
8860
8860
  });
8861
8861
  }, [L, te, ce]), De(() => {
@@ -8864,83 +8864,87 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8864
8864
  }, [F, w]), De(() => {
8865
8865
  if (!L || !o) return;
8866
8866
  if (!S) {
8867
- ve(/* @__PURE__ */ new Set()), le(/* @__PURE__ */ new Set());
8867
+ _e(/* @__PURE__ */ new Set()), le(/* @__PURE__ */ new Set());
8868
8868
  return;
8869
8869
  }
8870
8870
  const q = rt.current + 1;
8871
- rt.current = q, Ne(!0), o(S).then((Ee) => {
8871
+ rt.current = q, Ee(!0), o(S).then((Se) => {
8872
8872
  if (rt.current !== q) return;
8873
- const be = /* @__PURE__ */ new Set(), Le = /* @__PURE__ */ new Set(), Fe = /* @__PURE__ */ new Map();
8874
- for (const st of Ee.matches) {
8875
- be.add(st.node.value);
8873
+ const me = /* @__PURE__ */ new Set(), Le = /* @__PURE__ */ new Set(), Fe = /* @__PURE__ */ new Map();
8874
+ for (const st of Se.matches) {
8875
+ me.add(st.node.value);
8876
8876
  const j = [...st.path, st.node];
8877
8877
  for (let Q = 0; Q < j.length - 1; Q++) {
8878
8878
  const G = j[Q], ae = j[Q + 1];
8879
8879
  Le.add(G.value);
8880
- const Se = G.value;
8881
- Fe.has(Se) || Fe.set(Se, /* @__PURE__ */ new Map()), Fe.get(Se).set(ae.value, ae);
8880
+ const Me = G.value;
8881
+ Fe.has(Me) || Fe.set(Me, /* @__PURE__ */ new Map()), Fe.get(Me).set(ae.value, ae);
8882
8882
  }
8883
8883
  if (j.length > 0) {
8884
8884
  const Q = j[0];
8885
8885
  Fe.has(kt) || Fe.set(kt, /* @__PURE__ */ new Map()), Fe.get(kt).set(Q.value, Q);
8886
8886
  }
8887
8887
  }
8888
- ve(be), le(Le), X((st) => {
8888
+ _e(me), le(Le), X((st) => {
8889
8889
  const j = new Map(st);
8890
8890
  return Fe.forEach((Q, G) => {
8891
- const ae = j.get(G) ?? [], Se = /* @__PURE__ */ new Map();
8892
- ae.forEach((ne) => Se.set(ne.value, ne)), Q.forEach((ne, ro) => Se.set(ro, ne)), j.set(G, Array.from(Se.values()));
8891
+ const ae = j.get(G) ?? [], Me = /* @__PURE__ */ new Map();
8892
+ ae.forEach((ne) => Me.set(ne.value, ne)), Q.forEach((ne, ro) => Me.set(ro, ne)), j.set(G, Array.from(Me.values()));
8893
8893
  }), j;
8894
8894
  });
8895
8895
  }).finally(() => {
8896
- rt.current === q && Ne(!1);
8896
+ rt.current === q && Ee(!1);
8897
8897
  });
8898
8898
  }, [S, L, o]);
8899
8899
  const Z = W((q) => {
8900
- K(q), q || (J(""), re(""), je(null), ve(/* @__PURE__ */ new Set()), le(/* @__PURE__ */ new Set()));
8900
+ K(q), q || (J(""), re(""), je(null), _e(/* @__PURE__ */ new Set()), le(/* @__PURE__ */ new Set()));
8901
8901
  }, []), Ge = W(
8902
8902
  (q) => {
8903
- const Ee = q.value;
8904
- ce.has(Ee) || he.has(Ee) || (se((be) => {
8905
- const Le = new Set(be);
8906
- return Le.add(Ee), Le;
8907
- }), te({ parentId: q.value, search: "" }).then((be) => {
8903
+ const Se = q.value;
8904
+ ce.has(Se) || he.has(Se) || (se((me) => {
8905
+ const Le = new Set(me);
8906
+ return Le.add(Se), Le;
8907
+ }), te({ parentId: q.value, search: "" }).then((me) => {
8908
8908
  X((Le) => {
8909
- const Fe = new Map(Le), st = Fe.get(Ee) ?? [], j = /* @__PURE__ */ new Map();
8910
- return st.forEach((Q) => j.set(Q.value, Q)), be.nodes.forEach((Q) => j.set(Q.value, Q)), Fe.set(Ee, Array.from(j.values())), Fe;
8909
+ const Fe = new Map(Le), st = Fe.get(Se) ?? [], j = /* @__PURE__ */ new Map();
8910
+ return st.forEach((Q) => j.set(Q.value, Q)), me.nodes.forEach((Q) => j.set(Q.value, Q)), Fe.set(Se, Array.from(j.values())), Fe;
8911
8911
  });
8912
8912
  }).finally(() => {
8913
- se((be) => {
8914
- const Le = new Set(be);
8915
- return Le.delete(Ee), Le;
8913
+ se((me) => {
8914
+ const Le = new Set(me);
8915
+ return Le.delete(Se), Le;
8916
8916
  });
8917
8917
  }));
8918
8918
  },
8919
8919
  [ce, te, he]
8920
8920
  ), wt = W(
8921
8921
  (q) => {
8922
- xe((Ee) => {
8923
- const be = new Set(Ee);
8924
- return be.has(q.value) ? be.delete(q.value) : (be.add(q.value), Ge(q)), be;
8922
+ Ne((Se) => {
8923
+ const me = new Set(Se);
8924
+ return me.has(q.value) ? me.delete(q.value) : (me.add(q.value), Ge(q)), me;
8925
8925
  });
8926
8926
  },
8927
8927
  [Ge]
8928
8928
  ), sn = W((q) => {
8929
8929
  je(q);
8930
- }, []), _e = W(() => {
8931
- $ && (!Te || Te.hasChildren === !0) || (Te && V?.(Te), Z(!1));
8932
- }, [Z, V, $, Te]), Be = W(
8933
- (q) => fe.has(q) || Ie.has(q),
8934
- [fe, Ie]
8930
+ }, []), be = W(() => {
8931
+ $ && (!Re || Re.hasChildren === !0) || (Re && V?.(Re), Z(!1));
8932
+ }, [Z, V, $, Re]), Be = W(
8933
+ (q) => fe.has(q) || Pe.has(q),
8934
+ [fe, Pe]
8935
8935
  ), ot = W(
8936
8936
  (q) => {
8937
- if (!S || o) return q;
8938
- const Ee = S.toLowerCase();
8939
- return q.filter((be) => be.label.toLowerCase().includes(Ee));
8937
+ if (!S) return q;
8938
+ if (o)
8939
+ return q.filter(
8940
+ (me) => ke.has(me.value) || Pe.has(me.value)
8941
+ );
8942
+ const Se = S.toLowerCase();
8943
+ return q.filter((me) => me.label.toLowerCase().includes(Se));
8940
8944
  },
8941
- [S, o]
8942
- ), an = (q, Ee) => {
8943
- const be = q.value, Le = ce.get(be), Fe = Be(q.value), st = he.has(be), j = Te?.value === q.value, Q = e?.value === q.value, G = Oe.has(q.value), ae = Fe && Le && Le.length > 0, Se = ae ? ot(Le) : [];
8945
+ [S, Pe, ke, o]
8946
+ ), an = (q, Se) => {
8947
+ const me = q.value, Le = ce.get(me), Fe = Be(q.value), st = he.has(me), j = Re?.value === q.value, Q = e?.value === q.value, G = ke.has(q.value), ae = Fe && Le && Le.length > 0, Me = ae ? ot(Le) : [];
8944
8948
  return /* @__PURE__ */ E(T.Fragment, { children: [
8945
8949
  /* @__PURE__ */ E(
8946
8950
  "div",
@@ -8949,7 +8953,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8949
8953
  [ye.row_active]: j || Q,
8950
8954
  [ye.row_match]: G
8951
8955
  }),
8952
- style: { paddingLeft: 16 + Ee * 20 },
8956
+ style: { paddingLeft: 16 + Se * 20 },
8953
8957
  onClick: () => sn(q),
8954
8958
  children: [
8955
8959
  q.hasChildren ? /* @__PURE__ */ d(
@@ -8969,12 +8973,12 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
8969
8973
  ]
8970
8974
  }
8971
8975
  ),
8972
- ae && Se.map((ne) => an(ne, Ee + 1))
8976
+ ae && Me.map((ne) => an(ne, Se + 1))
8973
8977
  ] }, String(q.value));
8974
- }, rr = ce.get(kt) ?? [], or = ot(rr), cn = he.has(kt), Jr = e ? D ? D(e) : e.label : t, eo = !cn && !me && or.length === 0, to = Ce(
8975
- () => me || cn && !!S,
8976
- [me, cn, S]
8977
- ), no = !Te || $ && Te.hasChildren === !0;
8978
+ }, rr = ce.get(kt) ?? [], or = ot(rr), cn = he.has(kt), Jr = e ? D ? D(e) : e.label : t, eo = !cn && !pe && or.length === 0, to = Ce(
8979
+ () => pe || cn && !!S,
8980
+ [pe, cn, S]
8981
+ ), no = !Re || $ && Re.hasChildren === !0;
8978
8982
  return /* @__PURE__ */ E("div", { className: O(ye.wrapper, M), children: [
8979
8983
  f && /* @__PURE__ */ d(
8980
8984
  Yt,
@@ -9008,7 +9012,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
9008
9012
  /* @__PURE__ */ d("span", { className: O(ye.selectedOption, { [ye.placeholder]: !e }), children: Jr }),
9009
9013
  /* @__PURE__ */ E("span", { className: ye.actions, children: [
9010
9014
  u && e && /* @__PURE__ */ d(
9011
- Re,
9015
+ Ae,
9012
9016
  {
9013
9017
  variant: "text",
9014
9018
  className: ye.clearButton,
@@ -9020,7 +9024,7 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
9020
9024
  }
9021
9025
  ),
9022
9026
  /* @__PURE__ */ d(
9023
- Re,
9027
+ Ae,
9024
9028
  {
9025
9029
  variant: "link",
9026
9030
  className: ye.selectButton,
@@ -9059,8 +9063,8 @@ const j0 = "_wrapper_1jie0_5", H0 = "_input_1jie0_9", V0 = "_error_1jie0_29", Y0
9059
9063
  }
9060
9064
  ) }) : or.map((q) => an(q, 0)) }),
9061
9065
  /* @__PURE__ */ E(Zr, { className: ye.dialogFooter, children: [
9062
- /* @__PURE__ */ d(Re, { variant: "secondary", onClick: () => Z(!1), children: g }),
9063
- /* @__PURE__ */ d(Re, { variant: "primary", disabled: no, onClick: _e, children: _ })
9066
+ /* @__PURE__ */ d(Ae, { variant: "secondary", onClick: () => Z(!1), children: g }),
9067
+ /* @__PURE__ */ d(Ae, { variant: "primary", disabled: no, onClick: be, children: _ })
9064
9068
  ] })
9065
9069
  ] }) }),
9066
9070
  /* @__PURE__ */ d(rn, { id: I.errorId, message: I.errorMessage })
@@ -9155,7 +9159,7 @@ const h6 = l.memo(
9155
9159
  labelMaxWidth: o = 140,
9156
9160
  className: s
9157
9161
  }) => {
9158
- const a = !!n, i = e.some((g) => !!g.label), c = e.length - 1, u = ge(null), f = ge([]), [h, p] = R({ left: 0, right: 0 }), m = typeof o == "number" ? `${o}px` : o, b = e.flatMap((g, _) => _ === c ? ["32px"] : ["32px", "minmax(0, 1fr)"]).join(" "), v = W(() => {
9162
+ const a = !!n, i = e.some((g) => !!g.label), c = e.length - 1, u = ve(null), f = ve([]), [h, p] = R({ left: 0, right: 0 }), m = typeof o == "number" ? `${o}px` : o, b = e.flatMap((g, _) => _ === c ? ["32px"] : ["32px", "minmax(0, 1fr)"]).join(" "), v = W(() => {
9159
9163
  if (!i) {
9160
9164
  p({ left: 0, right: 0 });
9161
9165
  return;
@@ -9285,7 +9289,7 @@ const p6 = l.memo(
9285
9289
  return g >= 0 ? g : 0;
9286
9290
  }
9287
9291
  return r !== void 0 ? r : 0;
9288
- }, [t, r, f]), p = ge(null), m = ge(null), [b, v] = R({ left: 0, width: 0 });
9292
+ }, [t, r, f]), p = ve(null), m = ve(null), [b, v] = R({ left: 0, width: 0 });
9289
9293
  return De(() => {
9290
9294
  const g = p.current;
9291
9295
  if (!g)
@@ -9614,22 +9618,22 @@ class He extends vt {
9614
9618
  //#endregion
9615
9619
  }
9616
9620
  const qc = 6048e5, Wv = 864e5, va = /* @__PURE__ */ Symbol.for("constructDateFrom");
9617
- function Ae(e, t) {
9621
+ function Ie(e, t) {
9618
9622
  return typeof e == "function" ? e(t) : e && typeof e == "object" && va in e ? e[va](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
9619
9623
  }
9620
9624
  function we(e, t) {
9621
- return Ae(t || e, e);
9625
+ return Ie(t || e, e);
9622
9626
  }
9623
9627
  function Gc(e, t, n) {
9624
9628
  const r = we(e, n?.in);
9625
- return isNaN(t) ? Ae(e, NaN) : (t && r.setDate(r.getDate() + t), r);
9629
+ return isNaN(t) ? Ie(e, NaN) : (t && r.setDate(r.getDate() + t), r);
9626
9630
  }
9627
9631
  function Uc(e, t, n) {
9628
9632
  const r = we(e, n?.in);
9629
- if (isNaN(t)) return Ae(e, NaN);
9633
+ if (isNaN(t)) return Ie(e, NaN);
9630
9634
  if (!t)
9631
9635
  return r;
9632
- const o = r.getDate(), s = Ae(e, r.getTime());
9636
+ const o = r.getDate(), s = Ie(e, r.getTime());
9633
9637
  s.setMonth(r.getMonth() + t + 1, 0);
9634
9638
  const a = s.getDate();
9635
9639
  return o >= a ? s : (r.setFullYear(
@@ -9650,9 +9654,9 @@ function zn(e, t) {
9650
9654
  return Cn(e, { ...t, weekStartsOn: 1 });
9651
9655
  }
9652
9656
  function Zc(e, t) {
9653
- const n = we(e, t?.in), r = n.getFullYear(), o = Ae(n, 0);
9657
+ const n = we(e, t?.in), r = n.getFullYear(), o = Ie(n, 0);
9654
9658
  o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
9655
- const s = zn(o), a = Ae(n, 0);
9659
+ const s = zn(o), a = Ie(n, 0);
9656
9660
  a.setFullYear(r, 0, 4), a.setHours(0, 0, 0, 0);
9657
9661
  const i = zn(a);
9658
9662
  return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
@@ -9672,7 +9676,7 @@ function _a(e) {
9672
9676
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
9673
9677
  }
9674
9678
  function Nn(e, ...t) {
9675
- const n = Ae.bind(
9679
+ const n = Ie.bind(
9676
9680
  null,
9677
9681
  t.find((r) => typeof r == "object")
9678
9682
  );
@@ -9691,7 +9695,7 @@ function vs(e, t, n) {
9691
9695
  return Math.round((i - c) / Wv);
9692
9696
  }
9693
9697
  function Fv(e, t) {
9694
- const n = Zc(e, t), r = Ae(e, 0);
9698
+ const n = Zc(e, t), r = Ie(e, 0);
9695
9699
  return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), zn(r);
9696
9700
  }
9697
9701
  function Bv(e, t, n) {
@@ -9703,18 +9707,18 @@ function zv(e, t, n) {
9703
9707
  function jv(e, t) {
9704
9708
  let n, r = t?.in;
9705
9709
  return e.forEach((o) => {
9706
- !r && typeof o == "object" && (r = Ae.bind(null, o));
9710
+ !r && typeof o == "object" && (r = Ie.bind(null, o));
9707
9711
  const s = we(o, r);
9708
9712
  (!n || n < s || isNaN(+s)) && (n = s);
9709
- }), Ae(r, n || NaN);
9713
+ }), Ie(r, n || NaN);
9710
9714
  }
9711
9715
  function Hv(e, t) {
9712
9716
  let n, r = t?.in;
9713
9717
  return e.forEach((o) => {
9714
- !r && typeof o == "object" && (r = Ae.bind(null, o));
9718
+ !r && typeof o == "object" && (r = Ie.bind(null, o));
9715
9719
  const s = we(o, r);
9716
9720
  (!n || n > s || isNaN(+s)) && (n = s);
9717
- }), Ae(r, n || NaN);
9721
+ }), Ie(r, n || NaN);
9718
9722
  }
9719
9723
  function Vv(e, t, n) {
9720
9724
  const [r, o] = Nn(
@@ -9754,7 +9758,7 @@ function Gv(e, t) {
9754
9758
  let i = 1;
9755
9759
  const c = [];
9756
9760
  for (; +a <= s; )
9757
- c.push(Ae(n, a)), a.setMonth(a.getMonth() + i);
9761
+ c.push(Ie(n, a)), a.setMonth(a.getMonth() + i);
9758
9762
  return o ? c.reverse() : c;
9759
9763
  }
9760
9764
  function Uv(e, t) {
@@ -9777,7 +9781,7 @@ function Kv(e, t) {
9777
9781
  let i = 1;
9778
9782
  const c = [];
9779
9783
  for (; +a <= s; )
9780
- c.push(Ae(n, a)), a.setFullYear(a.getFullYear() + i);
9784
+ c.push(Ie(n, a)), a.setFullYear(a.getFullYear() + i);
9781
9785
  return o ? c.reverse() : c;
9782
9786
  }
9783
9787
  function el(e, t) {
@@ -10227,22 +10231,22 @@ function _s(e, t) {
10227
10231
  return Math.round(r / qc) + 1;
10228
10232
  }
10229
10233
  function tl(e, t) {
10230
- const n = we(e, t?.in), r = n.getFullYear(), o = Qn(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = Ae(t?.in || e, 0);
10234
+ const n = we(e, t?.in), r = n.getFullYear(), o = Qn(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = Ie(t?.in || e, 0);
10231
10235
  a.setFullYear(r + 1, 0, s), a.setHours(0, 0, 0, 0);
10232
- const i = Cn(a, t), c = Ae(t?.in || e, 0);
10236
+ const i = Cn(a, t), c = Ie(t?.in || e, 0);
10233
10237
  c.setFullYear(r, 0, s), c.setHours(0, 0, 0, 0);
10234
10238
  const u = Cn(c, t);
10235
10239
  return +n >= +i ? r + 1 : +n >= +u ? r : r - 1;
10236
10240
  }
10237
10241
  function P2(e, t) {
10238
- const n = Qn(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = tl(e, t), s = Ae(t?.in || e, 0);
10242
+ const n = Qn(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = tl(e, t), s = Ie(t?.in || e, 0);
10239
10243
  return s.setFullYear(o, 0, r), s.setHours(0, 0, 0, 0), Cn(s, t);
10240
10244
  }
10241
10245
  function bs(e, t) {
10242
10246
  const n = we(e, t?.in), r = +Cn(n, t) - +P2(n, t);
10243
10247
  return Math.round(r / qc) + 1;
10244
10248
  }
10245
- function pe(e, t) {
10249
+ function ge(e, t) {
10246
10250
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
10247
10251
  return n + r;
10248
10252
  }
@@ -10250,16 +10254,16 @@ const It = {
10250
10254
  // Year
10251
10255
  y(e, t) {
10252
10256
  const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
10253
- return pe(t === "yy" ? r % 100 : r, t.length);
10257
+ return ge(t === "yy" ? r % 100 : r, t.length);
10254
10258
  },
10255
10259
  // Month
10256
10260
  M(e, t) {
10257
10261
  const n = e.getMonth();
10258
- return t === "M" ? String(n + 1) : pe(n + 1, 2);
10262
+ return t === "M" ? String(n + 1) : ge(n + 1, 2);
10259
10263
  },
10260
10264
  // Day of the month
10261
10265
  d(e, t) {
10262
- return pe(e.getDate(), t.length);
10266
+ return ge(e.getDate(), t.length);
10263
10267
  },
10264
10268
  // AM or PM
10265
10269
  a(e, t) {
@@ -10278,26 +10282,26 @@ const It = {
10278
10282
  },
10279
10283
  // Hour [1-12]
10280
10284
  h(e, t) {
10281
- return pe(e.getHours() % 12 || 12, t.length);
10285
+ return ge(e.getHours() % 12 || 12, t.length);
10282
10286
  },
10283
10287
  // Hour [0-23]
10284
10288
  H(e, t) {
10285
- return pe(e.getHours(), t.length);
10289
+ return ge(e.getHours(), t.length);
10286
10290
  },
10287
10291
  // Minute
10288
10292
  m(e, t) {
10289
- return pe(e.getMinutes(), t.length);
10293
+ return ge(e.getMinutes(), t.length);
10290
10294
  },
10291
10295
  // Second
10292
10296
  s(e, t) {
10293
- return pe(e.getSeconds(), t.length);
10297
+ return ge(e.getSeconds(), t.length);
10294
10298
  },
10295
10299
  // Fraction of second
10296
10300
  S(e, t) {
10297
10301
  const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
10298
10302
  r * Math.pow(10, n - 3)
10299
10303
  );
10300
- return pe(o, t.length);
10304
+ return ge(o, t.length);
10301
10305
  }
10302
10306
  }, hn = {
10303
10307
  midnight: "midnight",
@@ -10336,14 +10340,14 @@ const It = {
10336
10340
  const o = tl(e, r), s = o > 0 ? o : 1 - o;
10337
10341
  if (t === "YY") {
10338
10342
  const a = s % 100;
10339
- return pe(a, 2);
10343
+ return ge(a, 2);
10340
10344
  }
10341
- return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : pe(s, t.length);
10345
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : ge(s, t.length);
10342
10346
  },
10343
10347
  // ISO week-numbering year
10344
10348
  R: function(e, t) {
10345
10349
  const n = Zc(e);
10346
- return pe(n, t.length);
10350
+ return ge(n, t.length);
10347
10351
  },
10348
10352
  // Extended year. This is a single number designating the year of this calendar system.
10349
10353
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -10356,7 +10360,7 @@ const It = {
10356
10360
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
10357
10361
  u: function(e, t) {
10358
10362
  const n = e.getFullYear();
10359
- return pe(n, t.length);
10363
+ return ge(n, t.length);
10360
10364
  },
10361
10365
  // Quarter
10362
10366
  Q: function(e, t, n) {
@@ -10367,7 +10371,7 @@ const It = {
10367
10371
  return String(r);
10368
10372
  // 01, 02, 03, 04
10369
10373
  case "QQ":
10370
- return pe(r, 2);
10374
+ return ge(r, 2);
10371
10375
  // 1st, 2nd, 3rd, 4th
10372
10376
  case "Qo":
10373
10377
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -10399,7 +10403,7 @@ const It = {
10399
10403
  return String(r);
10400
10404
  // 01, 02, 03, 04
10401
10405
  case "qq":
10402
- return pe(r, 2);
10406
+ return ge(r, 2);
10403
10407
  // 1st, 2nd, 3rd, 4th
10404
10408
  case "qo":
10405
10409
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -10457,7 +10461,7 @@ const It = {
10457
10461
  return String(r + 1);
10458
10462
  // 01, 02, ..., 12
10459
10463
  case "LL":
10460
- return pe(r + 1, 2);
10464
+ return ge(r + 1, 2);
10461
10465
  // 1st, 2nd, ..., 12th
10462
10466
  case "Lo":
10463
10467
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -10480,12 +10484,12 @@ const It = {
10480
10484
  // Local week of year
10481
10485
  w: function(e, t, n, r) {
10482
10486
  const o = bs(e, r);
10483
- return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : pe(o, t.length);
10487
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : ge(o, t.length);
10484
10488
  },
10485
10489
  // ISO week of year
10486
10490
  I: function(e, t, n) {
10487
10491
  const r = _s(e);
10488
- return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : pe(r, t.length);
10492
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : ge(r, t.length);
10489
10493
  },
10490
10494
  // Day of the month
10491
10495
  d: function(e, t, n) {
@@ -10494,7 +10498,7 @@ const It = {
10494
10498
  // Day of year
10495
10499
  D: function(e, t, n) {
10496
10500
  const r = D2(e);
10497
- return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : pe(r, t.length);
10501
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : ge(r, t.length);
10498
10502
  },
10499
10503
  // Day of week
10500
10504
  E: function(e, t, n) {
@@ -10536,7 +10540,7 @@ const It = {
10536
10540
  return String(s);
10537
10541
  // Padded numerical value
10538
10542
  case "ee":
10539
- return pe(s, 2);
10543
+ return ge(s, 2);
10540
10544
  // 1st, 2nd, ..., 7th
10541
10545
  case "eo":
10542
10546
  return n.ordinalNumber(s, { unit: "day" });
@@ -10573,7 +10577,7 @@ const It = {
10573
10577
  return String(s);
10574
10578
  // Padded numerical value
10575
10579
  case "cc":
10576
- return pe(s, t.length);
10580
+ return ge(s, t.length);
10577
10581
  // 1st, 2nd, ..., 7th
10578
10582
  case "co":
10579
10583
  return n.ordinalNumber(s, { unit: "day" });
@@ -10610,7 +10614,7 @@ const It = {
10610
10614
  return String(o);
10611
10615
  // 02
10612
10616
  case "ii":
10613
- return pe(o, t.length);
10617
+ return ge(o, t.length);
10614
10618
  // 2nd
10615
10619
  case "io":
10616
10620
  return n.ordinalNumber(o, { unit: "day" });
@@ -10733,12 +10737,12 @@ const It = {
10733
10737
  // Hour [0-11]
10734
10738
  K: function(e, t, n) {
10735
10739
  const r = e.getHours() % 12;
10736
- return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : pe(r, t.length);
10740
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : ge(r, t.length);
10737
10741
  },
10738
10742
  // Hour [1-24]
10739
10743
  k: function(e, t, n) {
10740
10744
  let r = e.getHours();
10741
- return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : pe(r, t.length);
10745
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : ge(r, t.length);
10742
10746
  },
10743
10747
  // Minute
10744
10748
  m: function(e, t, n) {
@@ -10819,22 +10823,22 @@ const It = {
10819
10823
  // Seconds timestamp
10820
10824
  t: function(e, t, n) {
10821
10825
  const r = Math.trunc(+e / 1e3);
10822
- return pe(r, t.length);
10826
+ return ge(r, t.length);
10823
10827
  },
10824
10828
  // Milliseconds timestamp
10825
10829
  T: function(e, t, n) {
10826
- return pe(+e, t.length);
10830
+ return ge(+e, t.length);
10827
10831
  }
10828
10832
  };
10829
10833
  function ya(e, t = "") {
10830
10834
  const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), s = r % 60;
10831
- return s === 0 ? n + String(o) : n + String(o) + t + pe(s, 2);
10835
+ return s === 0 ? n + String(o) : n + String(o) + t + ge(s, 2);
10832
10836
  }
10833
10837
  function wa(e, t) {
10834
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + pe(Math.abs(e) / 60, 2) : Zt(e, t);
10838
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + ge(Math.abs(e) / 60, 2) : Zt(e, t);
10835
10839
  }
10836
10840
  function Zt(e, t = "") {
10837
- const n = e > 0 ? "-" : "+", r = Math.abs(e), o = pe(Math.trunc(r / 60), 2), s = pe(r % 60, 2);
10841
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), o = ge(Math.trunc(r / 60), 2), s = ge(r % 60, 2);
10838
10842
  return n + o + t + s;
10839
10843
  }
10840
10844
  const Ca = (e, t) => {
@@ -10942,7 +10946,7 @@ function q2(e) {
10942
10946
  return t ? t[1].replace(V2, "'") : e;
10943
10947
  }
10944
10948
  function G2(e, t) {
10945
- const n = we(e, t?.in), r = n.getFullYear(), o = n.getMonth(), s = Ae(n, 0);
10949
+ const n = we(e, t?.in), r = n.getFullYear(), o = n.getMonth(), s = Ie(n, 0);
10946
10950
  return s.setFullYear(r, o + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
10947
10951
  }
10948
10952
  function U2(e, t) {
@@ -10974,14 +10978,14 @@ function J2(e, t, n) {
10974
10978
  return r.getFullYear() === o.getFullYear();
10975
10979
  }
10976
10980
  function e_(e, t, n) {
10977
- const r = we(e, n?.in), o = r.getFullYear(), s = r.getDate(), a = Ae(e, 0);
10981
+ const r = we(e, n?.in), o = r.getFullYear(), s = r.getDate(), a = Ie(e, 0);
10978
10982
  a.setFullYear(o, t, 15), a.setHours(0, 0, 0, 0);
10979
10983
  const i = G2(a);
10980
10984
  return r.setMonth(t, Math.min(s, i)), r;
10981
10985
  }
10982
10986
  function t_(e, t, n) {
10983
10987
  const r = we(e, n?.in);
10984
- return isNaN(+r) ? Ae(e, NaN) : (r.setFullYear(t), r);
10988
+ return isNaN(+r) ? Ie(e, NaN) : (r.setFullYear(t), r);
10985
10989
  }
10986
10990
  const ka = 5, n_ = 4;
10987
10991
  function r_(e, t) {
@@ -11193,10 +11197,10 @@ var Y;
11193
11197
  (function(e) {
11194
11198
  e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
11195
11199
  })(Y || (Y = {}));
11196
- var Me;
11200
+ var Oe;
11197
11201
  (function(e) {
11198
11202
  e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
11199
- })(Me || (Me = {}));
11203
+ })(Oe || (Oe = {}));
11200
11204
  var ct;
11201
11205
  (function(e) {
11202
11206
  e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
@@ -11391,11 +11395,11 @@ function Et(e, t, n = yt) {
11391
11395
  }
11392
11396
  function A_(e, t, n, r, o) {
11393
11397
  const { disabled: s, hidden: a, modifiers: i, showOutsideDays: c, broadcastCalendar: u, today: f = o.today() } = t, { isSameDay: h, isSameMonth: p, startOfMonth: m, isBefore: b, endOfMonth: v, isAfter: g } = o, _ = n && m(n), w = r && v(r), y = {
11394
- [Me.focused]: [],
11395
- [Me.outside]: [],
11396
- [Me.disabled]: [],
11397
- [Me.hidden]: [],
11398
- [Me.today]: []
11398
+ [Oe.focused]: [],
11399
+ [Oe.outside]: [],
11400
+ [Oe.disabled]: [],
11401
+ [Oe.hidden]: [],
11402
+ [Oe.today]: []
11399
11403
  }, C = {};
11400
11404
  for (const x of e) {
11401
11405
  const { date: k, displayMonth: N } = x, M = !!(N && !p(k, N)), P = !!(_ && b(k, _)), D = !!(w && g(k, w)), A = !!(s && Et(k, s, o)), $ = !!(a && Et(k, a, o)) || P || D || // Broadcast calendar will show outside days as default
@@ -11407,11 +11411,11 @@ function A_(e, t, n, r, o) {
11407
11411
  }
11408
11412
  return (x) => {
11409
11413
  const k = {
11410
- [Me.focused]: !1,
11411
- [Me.disabled]: !1,
11412
- [Me.hidden]: !1,
11413
- [Me.outside]: !1,
11414
- [Me.today]: !1
11414
+ [Oe.focused]: !1,
11415
+ [Oe.disabled]: !1,
11416
+ [Oe.hidden]: !1,
11417
+ [Oe.outside]: !1,
11418
+ [Oe.today]: !1
11415
11419
  }, N = {};
11416
11420
  for (const M in y) {
11417
11421
  const P = y[M];
@@ -11427,7 +11431,7 @@ function A_(e, t, n, r, o) {
11427
11431
  };
11428
11432
  }
11429
11433
  function I_(e, t, n = {}) {
11430
- return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [s]) => (n[s] ? o.push(n[s]) : t[Me[s]] ? o.push(t[Me[s]]) : t[ct[s]] && o.push(t[ct[s]]), o), [t[Y.Day]]);
11434
+ return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [s]) => (n[s] ? o.push(n[s]) : t[Oe[s]] ? o.push(t[Oe[s]]) : t[ct[s]] && o.push(t[ct[s]]), o), [t[Y.Day]]);
11431
11435
  }
11432
11436
  function L_(e) {
11433
11437
  return {
@@ -11452,8 +11456,8 @@ function ks() {
11452
11456
  const e = {};
11453
11457
  for (const t in Y)
11454
11458
  e[Y[t]] = `rdp-${Y[t]}`;
11455
- for (const t in Me)
11456
- e[Me[t]] = `rdp-${Me[t]}`;
11459
+ for (const t in Oe)
11460
+ e[Oe[t]] = `rdp-${Oe[t]}`;
11457
11461
  for (const t in ct)
11458
11462
  e[ct[t]] = `rdp-${ct[t]}`;
11459
11463
  for (const t in Xe)
@@ -11711,7 +11715,7 @@ const er = (e) => e instanceof HTMLElement ? e : null, Eo = (e) => [
11711
11715
  ...e.querySelectorAll("[data-animated-month]") ?? []
11712
11716
  ], rb = (e) => er(e.querySelector("[data-animated-month]")), So = (e) => er(e.querySelector("[data-animated-caption]")), Mo = (e) => er(e.querySelector("[data-animated-weeks]")), ob = (e) => er(e.querySelector("[data-animated-nav]")), sb = (e) => er(e.querySelector("[data-animated-weekdays]"));
11713
11717
  function ab(e, t, { classNames: n, months: r, focused: o, dateLib: s }) {
11714
- const a = ge(null), i = ge(r), c = ge(!1);
11718
+ const a = ve(null), i = ve(r), c = ve(!1);
11715
11719
  Hn(() => {
11716
11720
  const u = i.current;
11717
11721
  if (i.current = r, !t || !e.current || // safety check because the ref can be set to anything by consumers
@@ -11921,13 +11925,13 @@ var mt;
11921
11925
  e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
11922
11926
  })(mt || (mt = {}));
11923
11927
  function Na(e) {
11924
- return !e[Me.disabled] && !e[Me.hidden] && !e[Me.outside];
11928
+ return !e[Oe.disabled] && !e[Oe.hidden] && !e[Oe.outside];
11925
11929
  }
11926
11930
  function gb(e, t, n, r) {
11927
11931
  let o, s = -1;
11928
11932
  for (const a of e) {
11929
11933
  const i = t(a);
11930
- Na(i) && (i[Me.focused] && s < mt.FocusedModifier ? (o = a, s = mt.FocusedModifier) : r?.isEqualTo(a) && s < mt.LastFocused ? (o = a, s = mt.LastFocused) : n(a.date) && s < mt.Selected ? (o = a, s = mt.Selected) : i[Me.today] && s < mt.Today && (o = a, s = mt.Today));
11934
+ Na(i) && (i[Oe.focused] && s < mt.FocusedModifier ? (o = a, s = mt.FocusedModifier) : r?.isEqualTo(a) && s < mt.LastFocused ? (o = a, s = mt.LastFocused) : n(a.date) && s < mt.Selected ? (o = a, s = mt.Selected) : i[Oe.today] && s < mt.Today && (o = a, s = mt.Today));
11931
11935
  }
11932
11936
  return o || (o = e.find((a) => Na(t(a)))), o;
11933
11937
  }
@@ -12126,7 +12130,7 @@ function Eb(e) {
12126
12130
  const j = { ...ol, ...t.locale }, Q = t.broadcastCalendar ? 1 : t.weekStartsOn, G = t.noonSafe && t.timeZone ? nb(t.timeZone, {
12127
12131
  weekStartsOn: Q,
12128
12132
  locale: j
12129
- }) : void 0, ae = t.dateLib && G ? { ...G, ...t.dateLib } : t.dateLib ?? G, Se = new et({
12133
+ }) : void 0, ae = t.dateLib && G ? { ...G, ...t.dateLib } : t.dateLib ?? G, Me = new et({
12130
12134
  locale: j,
12131
12135
  weekStartsOn: Q,
12132
12136
  firstWeekContainsDate: t.firstWeekContainsDate,
@@ -12136,10 +12140,10 @@ function Eb(e) {
12136
12140
  numerals: t.numerals
12137
12141
  }, ae);
12138
12142
  return {
12139
- dateLib: Se,
12143
+ dateLib: Me,
12140
12144
  components: L_(t.components),
12141
12145
  formatters: q_(t.formatters),
12142
- labels: X_(t.labels, Se.options),
12146
+ labels: X_(t.labels, Me.options),
12143
12147
  locale: j,
12144
12148
  classNames: { ...ks(), ...t.classNames }
12145
12149
  };
@@ -12160,15 +12164,15 @@ function Eb(e) {
12160
12164
  t.classNames
12161
12165
  ]);
12162
12166
  t.today || (t = { ...t, today: a.today() });
12163
- const { captionLayout: u, mode: f, navLayout: h, numberOfMonths: p = 1, onDayBlur: m, onDayClick: b, onDayFocus: v, onDayKeyDown: g, onDayMouseEnter: _, onDayMouseLeave: w, onNextClick: y, onPrevClick: C, showWeekNumber: x, styles: k } = t, { formatCaption: N, formatDay: M, formatMonthDropdown: P, formatWeekNumber: D, formatWeekNumberHeader: A, formatWeekdayName: $, formatYearDropdown: I } = o, V = pb(t, a), { days: te, months: L, navStart: K, navEnd: F, previousMonth: J, nextMonth: S, goToMonth: re } = V, ce = A_(te, t, K, F, a), { isSelected: X, select: he, selected: se } = Nb(t, a) ?? {}, { blur: fe, focused: xe, isFocusTarget: Ie, moveFocus: le, setFocused: Oe } = _b(t, V, ce, X ?? (() => !1), a), { labelDayButton: ve, labelGridcell: me, labelGrid: Ne, labelMonthDropdown: Te, labelNav: je, labelPrevious: ft, labelNext: rt, labelWeekday: Z, labelWeekNumber: Ge, labelWeekNumberHeader: wt, labelYearDropdown: sn } = s, _e = Ce(() => eb(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Be = f !== void 0 || b !== void 0, ot = W(() => {
12167
+ const { captionLayout: u, mode: f, navLayout: h, numberOfMonths: p = 1, onDayBlur: m, onDayClick: b, onDayFocus: v, onDayKeyDown: g, onDayMouseEnter: _, onDayMouseLeave: w, onNextClick: y, onPrevClick: C, showWeekNumber: x, styles: k } = t, { formatCaption: N, formatDay: M, formatMonthDropdown: P, formatWeekNumber: D, formatWeekNumberHeader: A, formatWeekdayName: $, formatYearDropdown: I } = o, V = pb(t, a), { days: te, months: L, navStart: K, navEnd: F, previousMonth: J, nextMonth: S, goToMonth: re } = V, ce = A_(te, t, K, F, a), { isSelected: X, select: he, selected: se } = Nb(t, a) ?? {}, { blur: fe, focused: Ne, isFocusTarget: Pe, moveFocus: le, setFocused: ke } = _b(t, V, ce, X ?? (() => !1), a), { labelDayButton: _e, labelGridcell: pe, labelGrid: Ee, labelMonthDropdown: Re, labelNav: je, labelPrevious: ft, labelNext: rt, labelWeekday: Z, labelWeekNumber: Ge, labelWeekNumberHeader: wt, labelYearDropdown: sn } = s, be = Ce(() => eb(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Be = f !== void 0 || b !== void 0, ot = W(() => {
12164
12168
  J && (re(J), C?.(J));
12165
12169
  }, [J, re, C]), an = W(() => {
12166
12170
  S && (re(S), y?.(S));
12167
12171
  }, [re, S, y]), rr = W((j, Q) => (G) => {
12168
- G.preventDefault(), G.stopPropagation(), Oe(j), !Q.disabled && (he?.(j.date, Q, G), b?.(j.date, Q, G));
12169
- }, [he, b, Oe]), or = W((j, Q) => (G) => {
12170
- Oe(j), v?.(j.date, Q, G);
12171
- }, [v, Oe]), cn = W((j, Q) => (G) => {
12172
+ G.preventDefault(), G.stopPropagation(), ke(j), !Q.disabled && (he?.(j.date, Q, G), b?.(j.date, Q, G));
12173
+ }, [he, b, ke]), or = W((j, Q) => (G) => {
12174
+ ke(j), v?.(j.date, Q, G);
12175
+ }, [v, ke]), cn = W((j, Q) => (G) => {
12172
12176
  fe(), m?.(j.date, Q, G);
12173
12177
  }, [fe, m]), Jr = W((j, Q) => (G) => {
12174
12178
  const ae = {
@@ -12189,8 +12193,8 @@ function Eb(e) {
12189
12193
  };
12190
12194
  if (ae[G.key]) {
12191
12195
  G.preventDefault(), G.stopPropagation();
12192
- const [Se, ne] = ae[G.key];
12193
- le(Se, ne);
12196
+ const [Me, ne] = ae[G.key];
12197
+ le(Me, ne);
12194
12198
  }
12195
12199
  g?.(j.date, Q, G);
12196
12200
  }, [le, g, t.dir]), eo = W((j, Q) => (G) => {
@@ -12203,14 +12207,14 @@ function Eb(e) {
12203
12207
  }, [a, re]), q = W((j) => (Q) => {
12204
12208
  const G = Number(Q.target.value), ae = a.setYear(a.startOfMonth(j), G);
12205
12209
  re(ae);
12206
- }, [a, re]), { className: Ee, style: be } = Ce(() => ({
12210
+ }, [a, re]), { className: Se, style: me } = Ce(() => ({
12207
12211
  className: [c[Y.Root], t.className].filter(Boolean).join(" "),
12208
12212
  style: { ...k?.[Y.Root], ...t.style }
12209
- }), [c, t.className, t.style, k]), Le = W_(t), Fe = ge(null);
12213
+ }), [c, t.className, t.style, k]), Le = W_(t), Fe = ve(null);
12210
12214
  ab(Fe, !!t.animate, {
12211
12215
  classNames: c,
12212
12216
  months: L,
12213
- focused: xe,
12217
+ focused: Ne,
12214
12218
  dateLib: a
12215
12219
  });
12216
12220
  const st = {
@@ -12234,7 +12238,7 @@ function Eb(e) {
12234
12238
  { value: st },
12235
12239
  T.createElement(
12236
12240
  r.Root,
12237
- { rootRef: t.animate ? Fe : void 0, className: Ee, style: be, dir: t.dir, id: t.id, lang: t.lang ?? i.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...Le },
12241
+ { rootRef: t.animate ? Fe : void 0, className: Se, style: me, dir: t.dir, id: t.id, lang: t.lang ?? i.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...Le },
12238
12242
  T.createElement(
12239
12243
  r.Months,
12240
12244
  { className: c[Y.Months], style: k?.[Y.Months] },
@@ -12259,7 +12263,7 @@ function Eb(e) {
12259
12263
  r.DropdownNav,
12260
12264
  { className: c[Y.Dropdowns], style: k?.[Y.Dropdowns] },
12261
12265
  (() => {
12262
- const G = u === "dropdown" || u === "dropdown-months" ? T.createElement(r.MonthsDropdown, { key: "month", className: c[Y.MonthsDropdown], "aria-label": Te(), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: no(j.date), options: Q_(j.date, K, F, o, a), style: k?.[Y.Dropdown], value: a.getMonth(j.date) }) : T.createElement("span", { key: "month" }, P(j.date, a)), ae = u === "dropdown" || u === "dropdown-years" ? T.createElement(r.YearsDropdown, { key: "year", className: c[Y.YearsDropdown], "aria-label": sn(a.options), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: q(j.date), options: tb(K, F, o, a, !!t.reverseYears), style: k?.[Y.Dropdown], value: a.getYear(j.date) }) : T.createElement("span", { key: "year" }, I(j.date, a));
12266
+ const G = u === "dropdown" || u === "dropdown-months" ? T.createElement(r.MonthsDropdown, { key: "month", className: c[Y.MonthsDropdown], "aria-label": Re(), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: no(j.date), options: Q_(j.date, K, F, o, a), style: k?.[Y.Dropdown], value: a.getMonth(j.date) }) : T.createElement("span", { key: "month" }, P(j.date, a)), ae = u === "dropdown" || u === "dropdown-years" ? T.createElement(r.YearsDropdown, { key: "year", className: c[Y.YearsDropdown], "aria-label": sn(a.options), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: q(j.date), options: tb(K, F, o, a, !!t.reverseYears), style: k?.[Y.Dropdown], value: a.getYear(j.date) }) : T.createElement("span", { key: "year" }, I(j.date, a));
12263
12267
  return a.getMonthYearOrder() === "year-first" ? [ae, G] : [G, ae];
12264
12268
  })(),
12265
12269
  T.createElement("span", { role: "status", "aria-live": "polite", style: {
@@ -12283,12 +12287,12 @@ function Eb(e) {
12283
12287
  Q === p - 1 && h === "after" && !t.hideNavigation && T.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[Y.Nav], style: k?.[Y.Nav], "aria-label": je(), onPreviousClick: ot, onNextClick: an, previousMonth: J, nextMonth: S }),
12284
12288
  T.createElement(
12285
12289
  r.MonthGrid,
12286
- { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Ne(j.date, a.options, a) || void 0, className: c[Y.MonthGrid], style: k?.[Y.MonthGrid] },
12290
+ { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Ee(j.date, a.options, a) || void 0, className: c[Y.MonthGrid], style: k?.[Y.MonthGrid] },
12287
12291
  !t.hideWeekdays && T.createElement(
12288
12292
  r.Weekdays,
12289
12293
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: c[Y.Weekdays], style: k?.[Y.Weekdays] },
12290
12294
  x && T.createElement(r.WeekNumberHeader, { "aria-label": wt(a.options), className: c[Y.WeekNumberHeader], style: k?.[Y.WeekNumberHeader], scope: "col" }, A()),
12291
- _e.map((G) => T.createElement(r.Weekday, { "aria-label": Z(G, a.options, a), className: c[Y.Weekday], key: String(G), style: k?.[Y.Weekday], scope: "col" }, $(G, a.options, a)))
12295
+ be.map((G) => T.createElement(r.Weekday, { "aria-label": Z(G, a.options, a), className: c[Y.Weekday], key: String(G), style: k?.[Y.Weekday], scope: "col" }, $(G, a.options, a)))
12292
12296
  ),
12293
12297
  T.createElement(r.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[Y.Weeks], style: k?.[Y.Weeks] }, j.weeks.map((G) => T.createElement(
12294
12298
  r.Week,
@@ -12297,13 +12301,13 @@ function Eb(e) {
12297
12301
  locale: i
12298
12302
  }), className: c[Y.WeekNumber], scope: "row", role: "rowheader" }, D(G.weekNumber, a)),
12299
12303
  G.days.map((ae) => {
12300
- const { date: Se } = ae, ne = ce(ae);
12301
- if (ne[Me.focused] = !ne.hidden && !!xe?.isEqualTo(ae), ne[ct.selected] = X?.(Se) || ne.selected, Kr(se)) {
12304
+ const { date: Me } = ae, ne = ce(ae);
12305
+ if (ne[Oe.focused] = !ne.hidden && !!Ne?.isEqualTo(ae), ne[ct.selected] = X?.(Me) || ne.selected, Kr(se)) {
12302
12306
  const { from: oo, to: so } = se;
12303
- ne[ct.range_start] = !!(oo && so && a.isSameDay(Se, oo)), ne[ct.range_end] = !!(oo && so && a.isSameDay(Se, so)), ne[ct.range_middle] = Nt(se, Se, !0, a);
12307
+ ne[ct.range_start] = !!(oo && so && a.isSameDay(Me, oo)), ne[ct.range_end] = !!(oo && so && a.isSameDay(Me, so)), ne[ct.range_middle] = Nt(se, Me, !0, a);
12304
12308
  }
12305
- const ro = J_(ne, k, t.modifiersStyles), Pl = I_(ne, c, t.modifiersClassNames), Tl = !Be && !ne.hidden ? me(Se, ne, a.options, a) : void 0;
12306
- return T.createElement(r.Day, { key: `${ae.isoDate}_${ae.displayMonthId}`, day: ae, modifiers: ne, className: Pl.join(" "), style: ro, role: "gridcell", "aria-selected": ne.selected || void 0, "aria-label": Tl, "data-day": ae.isoDate, "data-month": ae.outside ? ae.dateMonthId : void 0, "data-selected": ne.selected || void 0, "data-disabled": ne.disabled || void 0, "data-hidden": ne.hidden || void 0, "data-outside": ae.outside || void 0, "data-focused": ne.focused || void 0, "data-today": ne.today || void 0 }, !ne.hidden && Be ? T.createElement(r.DayButton, { className: c[Y.DayButton], style: k?.[Y.DayButton], type: "button", day: ae, modifiers: ne, disabled: !ne.focused && ne.disabled || void 0, "aria-disabled": ne.focused && ne.disabled || void 0, tabIndex: Ie(ae) ? 0 : -1, "aria-label": ve(Se, ne, a.options, a), onClick: rr(ae, ne), onBlur: cn(ae, ne), onFocus: or(ae, ne), onKeyDown: Jr(ae, ne), onMouseEnter: eo(ae, ne), onMouseLeave: to(ae, ne) }, M(Se, a.options, a)) : !ne.hidden && M(ae.date, a.options, a));
12309
+ const ro = J_(ne, k, t.modifiersStyles), Pl = I_(ne, c, t.modifiersClassNames), Tl = !Be && !ne.hidden ? pe(Me, ne, a.options, a) : void 0;
12310
+ return T.createElement(r.Day, { key: `${ae.isoDate}_${ae.displayMonthId}`, day: ae, modifiers: ne, className: Pl.join(" "), style: ro, role: "gridcell", "aria-selected": ne.selected || void 0, "aria-label": Tl, "data-day": ae.isoDate, "data-month": ae.outside ? ae.dateMonthId : void 0, "data-selected": ne.selected || void 0, "data-disabled": ne.disabled || void 0, "data-hidden": ne.hidden || void 0, "data-outside": ae.outside || void 0, "data-focused": ne.focused || void 0, "data-today": ne.today || void 0 }, !ne.hidden && Be ? T.createElement(r.DayButton, { className: c[Y.DayButton], style: k?.[Y.DayButton], type: "button", day: ae, modifiers: ne, disabled: !ne.focused && ne.disabled || void 0, "aria-disabled": ne.focused && ne.disabled || void 0, tabIndex: Pe(ae) ? 0 : -1, "aria-label": _e(Me, ne, a.options, a), onClick: rr(ae, ne), onBlur: cn(ae, ne), onFocus: or(ae, ne), onKeyDown: Jr(ae, ne), onMouseEnter: eo(ae, ne), onMouseLeave: to(ae, ne) }, M(Me, a.options, a)) : !ne.hidden && M(ae.date, a.options, a));
12307
12311
  })
12308
12312
  )))
12309
12313
  )
@@ -12722,8 +12726,8 @@ function Ma({
12722
12726
  }
12723
12727
  ),
12724
12728
  /* @__PURE__ */ E("div", { className: U.dialogActions, children: [
12725
- /* @__PURE__ */ d(Re, { variant: "secondary", onClick: o, children: "Отмена" }),
12726
- /* @__PURE__ */ d(Re, { variant: "primary", onClick: i, disabled: !s.trim(), children: "Добавить" })
12729
+ /* @__PURE__ */ d(Ae, { variant: "secondary", onClick: o, children: "Отмена" }),
12730
+ /* @__PURE__ */ d(Ae, { variant: "primary", onClick: i, disabled: !s.trim(), children: "Добавить" })
12727
12731
  ] })
12728
12732
  ] })
12729
12733
  ] }) });
@@ -12935,7 +12939,7 @@ const _6 = ({
12935
12939
  }
12936
12940
  )
12937
12941
  ] });
12938
- }, Fy = "_root_bcbvh_5", By = "_card_bcbvh_12", zy = "_size_lg_bcbvh_19", jy = "_section_bcbvh_23", Hy = "_sectionHeader_bcbvh_33", Vy = "_sectionTitle_bcbvh_40", Yy = "_sectionDescription_bcbvh_50", qy = "_fields_bcbvh_58", Gy = "_fields_2col_bcbvh_66", Uy = "_field_bcbvh_58", Zy = "_field_span2_bcbvh_88", Ky = "_field_interactive_bcbvh_92", Xy = "_label_bcbvh_96", Qy = "_value_bcbvh_104", Jy = "_valueRow_bcbvh_117", ew = "_copyTrigger_bcbvh_124", tw = "_copyableValue_bcbvh_130", nw = "_hint_bcbvh_135", rw = "_empty_bcbvh_143", ow = "_divider_bcbvh_147", sw = "_loading_bcbvh_154", Pe = {
12942
+ }, Fy = "_root_bcbvh_5", By = "_card_bcbvh_12", zy = "_size_lg_bcbvh_19", jy = "_section_bcbvh_23", Hy = "_sectionHeader_bcbvh_33", Vy = "_sectionTitle_bcbvh_40", Yy = "_sectionDescription_bcbvh_50", qy = "_fields_bcbvh_58", Gy = "_fields_2col_bcbvh_66", Uy = "_field_bcbvh_58", Zy = "_field_span2_bcbvh_88", Ky = "_field_interactive_bcbvh_92", Xy = "_label_bcbvh_96", Qy = "_value_bcbvh_104", Jy = "_valueRow_bcbvh_117", ew = "_copyTrigger_bcbvh_124", tw = "_copyableValue_bcbvh_130", nw = "_hint_bcbvh_135", rw = "_empty_bcbvh_143", ow = "_divider_bcbvh_147", sw = "_loading_bcbvh_154", Te = {
12939
12943
  root: Fy,
12940
12944
  card: By,
12941
12945
  size_lg: zy,
@@ -12977,22 +12981,22 @@ const _6 = ({
12977
12981
  });
12978
12982
  }, [s, t, n]);
12979
12983
  if (i) return null;
12980
- const b = n ?? t, v = aw(b) ? /* @__PURE__ */ d("span", { className: Pe.empty, children: u }) : b;
12984
+ const b = n ?? t, v = aw(b) ? /* @__PURE__ */ d("span", { className: Te.empty, children: u }) : b;
12981
12985
  return a ? /* @__PURE__ */ d(ze, { children: a({ label: e, value: v }) }) : /* @__PURE__ */ E(
12982
12986
  "div",
12983
12987
  {
12984
12988
  className: O(
12985
- Pe.field,
12986
- c === 2 && Pe.field_span2,
12987
- o && Pe.field_interactive,
12989
+ Te.field,
12990
+ c === 2 && Te.field_span2,
12991
+ o && Te.field_interactive,
12988
12992
  f
12989
12993
  ),
12990
12994
  children: [
12991
- /* @__PURE__ */ d("div", { className: Pe.label, children: e }),
12992
- /* @__PURE__ */ E("div", { className: Pe.value, children: [
12993
- /* @__PURE__ */ d("div", { className: Pe.valueRow, children: o ? /* @__PURE__ */ E(ze, { children: [
12994
- /* @__PURE__ */ d("span", { className: Pe.copyableValue, children: v }),
12995
- /* @__PURE__ */ d("span", { className: Pe.copyTrigger, children: /* @__PURE__ */ d(
12995
+ /* @__PURE__ */ d("div", { className: Te.label, children: e }),
12996
+ /* @__PURE__ */ E("div", { className: Te.value, children: [
12997
+ /* @__PURE__ */ d("div", { className: Te.valueRow, children: o ? /* @__PURE__ */ E(ze, { children: [
12998
+ /* @__PURE__ */ d("span", { className: Te.copyableValue, children: v }),
12999
+ /* @__PURE__ */ d("span", { className: Te.copyTrigger, children: /* @__PURE__ */ d(
12996
13000
  ii,
12997
13001
  {
12998
13002
  iconOnly: !0,
@@ -13002,7 +13006,7 @@ const _6 = ({
13002
13006
  }
13003
13007
  ) })
13004
13008
  ] }) : v }),
13005
- r && /* @__PURE__ */ d("div", { className: Pe.hint, children: r })
13009
+ r && /* @__PURE__ */ d("div", { className: Te.hint, children: r })
13006
13010
  ] })
13007
13011
  ]
13008
13012
  }
@@ -13017,12 +13021,12 @@ const _6 = ({
13017
13021
  className: a
13018
13022
  }) => {
13019
13023
  const i = (r ?? []).filter((c) => !c.hidden);
13020
- return /* @__PURE__ */ E("section", { id: e, className: O(Pe.section, a), children: [
13021
- (t || n) && /* @__PURE__ */ E("div", { className: Pe.sectionHeader, children: [
13022
- t && /* @__PURE__ */ d("div", { className: Pe.sectionTitle, children: t }),
13023
- n && /* @__PURE__ */ d("div", { className: Pe.sectionDescription, children: n })
13024
+ return /* @__PURE__ */ E("section", { id: e, className: O(Te.section, a), children: [
13025
+ (t || n) && /* @__PURE__ */ E("div", { className: Te.sectionHeader, children: [
13026
+ t && /* @__PURE__ */ d("div", { className: Te.sectionTitle, children: t }),
13027
+ n && /* @__PURE__ */ d("div", { className: Te.sectionDescription, children: n })
13024
13028
  ] }),
13025
- (i.length > 0 || o) && /* @__PURE__ */ E("div", { className: O(Pe.fields, s === 2 && Pe.fields_2col), children: [
13029
+ (i.length > 0 || o) && /* @__PURE__ */ E("div", { className: O(Te.fields, s === 2 && Te.fields_2col), children: [
13026
13030
  i.map((c, u) => /* @__PURE__ */ d(
13027
13031
  wl,
13028
13032
  {
@@ -13033,7 +13037,7 @@ const _6 = ({
13033
13037
  o
13034
13038
  ] })
13035
13039
  ] });
13036
- }, cw = ({ className: e }) => /* @__PURE__ */ d("hr", { className: O(Pe.divider, e) }), lw = ({
13040
+ }, cw = ({ className: e }) => /* @__PURE__ */ d("hr", { className: O(Te.divider, e) }), lw = ({
13037
13041
  sections: e,
13038
13042
  children: t,
13039
13043
  variant: n = "card",
@@ -13045,15 +13049,15 @@ const _6 = ({
13045
13049
  id: c
13046
13050
  }) => {
13047
13051
  const u = typeof r == "number" ? `${r}px` : r, f = O(
13048
- Pe.root,
13049
- n === "card" && Pe.card,
13050
- o === "lg" && Pe.size_lg,
13052
+ Te.root,
13053
+ n === "card" && Te.card,
13054
+ o === "lg" && Te.size_lg,
13051
13055
  i
13052
13056
  ), h = {
13053
13057
  "--cozy-detail-label-width": u
13054
13058
  };
13055
13059
  if (s)
13056
- return /* @__PURE__ */ d("div", { className: f, style: h, id: c, children: /* @__PURE__ */ d("div", { className: Pe.loading, children: /* @__PURE__ */ d(lt, {}) }) });
13060
+ return /* @__PURE__ */ d("div", { className: f, style: h, id: c, children: /* @__PURE__ */ d("div", { className: Te.loading, children: /* @__PURE__ */ d(lt, {}) }) });
13057
13061
  const p = e && e.length > 0, m = Wt.count(t) > 0;
13058
13062
  return !p && !m ? /* @__PURE__ */ d("div", { className: f, style: h, id: c, children: a ?? /* @__PURE__ */ d(on, {}) }) : /* @__PURE__ */ E("div", { className: f, style: h, id: c, children: [
13059
13063
  p && e.map((b, v) => /* @__PURE__ */ d(Cl, { ...b }, b.id ?? `section-${v}`)),
@@ -13134,7 +13138,7 @@ function br(e) {
13134
13138
  );
13135
13139
  }
13136
13140
  function i3(e, t) {
13137
- const [n, r] = R({}), o = ge({}), s = W(
13141
+ const [n, r] = R({}), o = ve({}), s = W(
13138
13142
  (m, b) => {
13139
13143
  const v = In(m);
13140
13144
  r((g) => {
@@ -13255,8 +13259,8 @@ function xl({
13255
13259
  /* @__PURE__ */ d(Kn, { children: /* @__PURE__ */ d(Xn, { children: t }) }),
13256
13260
  /* @__PURE__ */ d("div", { className: H.dialogContent, children: n }),
13257
13261
  /* @__PURE__ */ E(Zr, { className: H.dialogActions, children: [
13258
- /* @__PURE__ */ d(Re, { variant: "secondary", onClick: i, children: o }),
13259
- /* @__PURE__ */ d(Re, { variant: s ? "danger" : "primary", onClick: a, children: r })
13262
+ /* @__PURE__ */ d(Ae, { variant: "secondary", onClick: i, children: o }),
13263
+ /* @__PURE__ */ d(Ae, { variant: s ? "danger" : "primary", onClick: a, children: r })
13260
13264
  ] })
13261
13265
  ] }) });
13262
13266
  }
@@ -13274,7 +13278,7 @@ function Yo({
13274
13278
  onCancel: f,
13275
13279
  submitting: h
13276
13280
  }) {
13277
- const [p, m] = R(t), [b, v] = R(n), [g, _] = R(r), [w, y] = R(!1), [C, x] = R(null), k = ge(null), N = async (D) => {
13281
+ const [p, m] = R(t), [b, v] = R(n), [g, _] = R(r), [w, y] = R(!1), [C, x] = R(null), k = ve(null), N = async (D) => {
13278
13282
  if (!(!D || !i)) {
13279
13283
  y(!0);
13280
13284
  try {
@@ -13390,9 +13394,9 @@ function Yo({
13390
13394
  )
13391
13395
  ] }),
13392
13396
  /* @__PURE__ */ E("div", { className: H.formActions, children: [
13393
- f && /* @__PURE__ */ d(Re, { variant: "secondary", size: "small", onClick: f, children: "Отмена" }),
13397
+ f && /* @__PURE__ */ d(Ae, { variant: "secondary", size: "small", onClick: f, children: "Отмена" }),
13394
13398
  /* @__PURE__ */ d(
13395
- Re,
13399
+ Ae,
13396
13400
  {
13397
13401
  variant: "primary",
13398
13402
  size: "small",
@@ -13927,21 +13931,21 @@ const b6 = zt(function({
13927
13931
  }, [M, N, h]), [D, A] = R(qo), $ = {
13928
13932
  "--cozy-sidenav-w": Da(m, "280px"),
13929
13933
  "--cozy-sidenav-w-collapsed": Da(b, "76px")
13930
- }, I = n && n.length > 0, V = Wt.count(r) > 0, te = Wt.count(r), L = ge(null), K = ge(null), F = ge(null), J = W(() => {
13934
+ }, I = n && n.length > 0, V = Wt.count(r) > 0, te = Wt.count(r), L = ve(null), K = ve(null), F = ve(null), J = W(() => {
13931
13935
  const X = L.current;
13932
13936
  if (!X) return;
13933
- const { scrollTop: he, scrollHeight: se, clientHeight: fe } = X, xe = se > fe + Pa, Ie = he + fe < se - Pa;
13934
- if (!xe || !Ie) {
13935
- A((ve) => ve.size === 0 ? ve : qo);
13937
+ const { scrollTop: he, scrollHeight: se, clientHeight: fe } = X, Ne = se > fe + Pa, Pe = he + fe < se - Pa;
13938
+ if (!Ne || !Pe) {
13939
+ A((_e) => _e.size === 0 ? _e : qo);
13936
13940
  return;
13937
13941
  }
13938
- const le = X.getBoundingClientRect(), Oe = /* @__PURE__ */ new Set();
13939
- X.querySelectorAll(`.${ee.item}[data-id]`).forEach((ve) => {
13940
- const me = ve.dataset.id;
13941
- if (!me) return;
13942
- const Ne = ve.getBoundingClientRect();
13943
- Ne.bottom > le.bottom - t4 && Ne.top < le.bottom && Oe.add(me);
13944
- }), A((ve) => n4(ve, Oe) ? ve : Oe);
13942
+ const le = X.getBoundingClientRect(), ke = /* @__PURE__ */ new Set();
13943
+ X.querySelectorAll(`.${ee.item}[data-id]`).forEach((_e) => {
13944
+ const pe = _e.dataset.id;
13945
+ if (!pe) return;
13946
+ const Ee = _e.getBoundingClientRect();
13947
+ Ee.bottom > le.bottom - t4 && Ee.top < le.bottom && ke.add(pe);
13948
+ }), A((_e) => n4(_e, ke) ? _e : ke);
13945
13949
  }, []), S = W(() => {
13946
13950
  F.current !== null && cancelAnimationFrame(F.current), F.current = requestAnimationFrame(() => {
13947
13951
  F.current = null, J();
@@ -14352,7 +14356,7 @@ export {
14352
14356
  Mt as ArrowDownIcon,
14353
14357
  L5 as ArrowRightIcon,
14354
14358
  X5 as BaseBlock,
14355
- Re as Button,
14359
+ Ae as Button,
14356
14360
  v6 as Calendar,
14357
14361
  V5 as CameraIcon,
14358
14362
  Il as CancelIcon,