@imj_media/ui 1.0.50 → 1.0.51

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsxs as u, jsx as i, Fragment as k1 } from "react/jsx-runtime";
2
- import f1, { useState as J, useRef as o1, useEffect as W, useCallback as P, useMemo as M1, useImperativeHandle as Q1, forwardRef as E1, useId as a0, createContext as k0, useContext as Z0 } from "react";
2
+ import f1, { useState as X, useRef as o1, useEffect as W, useCallback as N, useMemo as M1, useImperativeHandle as Q1, forwardRef as E1, useId as a0, createContext as k0, useContext as Z0 } from "react";
3
3
  import { clsx as I0 } from "clsx";
4
4
  import { twMerge as B0 } from "tailwind-merge";
5
5
  import { cva as c1 } from "class-variance-authority";
@@ -18347,7 +18347,7 @@ const y8 = ({
18347
18347
  );
18348
18348
  return /* @__PURE__ */ i("span", { className: _(s({ color: o, border: t, size: l }), n), ...e, children: r });
18349
18349
  }, O8 = ({ slot: r, className: o, size: t, fallback: n = "" }) => {
18350
- const [e, a] = J(!1), [c, l] = J(!1), s = o1(null), p = c1("inner-avatar", {
18350
+ const [e, a] = X(!1), [c, l] = X(!1), s = o1(null), p = c1("inner-avatar", {
18351
18351
  variants: {
18352
18352
  size: {
18353
18353
  xs: "ui-w-2.5 ui-h-2.5 ui-text-[6px]",
@@ -18748,204 +18748,204 @@ const y8 = ({
18748
18748
  }
18749
18749
  ) : null;
18750
18750
  }, Z8 = (r = "top", o = "center", t = !1, n = 0, e = !1) => {
18751
- const [a, c] = J(!1), [l, s] = J({ top: 0, left: 0 }), [L, p] = J({ width: 0, height: 0 }), [d, C] = J(r), h = o1(null), w = o1(null), f = o1(null), j = o1(null), x = o1(null), v = o1(null), H = o1(null), b = o1({ top: 0, left: 0 }), V = o1({ count: 0, lastTime: 0 }), O = P(() => {
18752
- c(!1), s({ top: 0, left: 0 }), C(r), H.current = null, V.current.count = 0, V.current.lastTime = 0, b.current = { top: 0, left: 0 };
18753
- }, [r]), T = P(() => {
18751
+ const [a, c] = X(!1), [l, s] = X({ top: 0, left: 0 }), [L, p] = X({ width: 0, height: 0 }), [d, C] = X(r), h = o1(null), w = o1(null), m = o1(null), j = o1(null), x = o1(null), v = o1(null), V = o1(null), b = o1({ top: 0, left: 0 }), H = o1({ count: 0, lastTime: 0 }), O = N(() => {
18752
+ c(!1), s({ top: 0, left: 0 }), C(r), V.current = null, H.current.count = 0, H.current.lastTime = 0, b.current = { top: 0, left: 0 };
18753
+ }, [r]), P = N(() => {
18754
18754
  if (!h.current || !a) return;
18755
18755
  const M = h.current.getBoundingClientRect(), g = { top: M.top, left: M.left };
18756
- if (H.current) {
18757
- const k = H.current, y = 2;
18758
- if (Math.abs(g.top - k.top) > y || Math.abs(g.left - k.left) > y) {
18756
+ if (V.current) {
18757
+ const Z = V.current, y = 2;
18758
+ if (Math.abs(g.top - Z.top) > y || Math.abs(g.left - Z.left) > y) {
18759
18759
  O();
18760
18760
  return;
18761
18761
  }
18762
18762
  }
18763
- H.current = g;
18764
- }, [a, O]), U = P(() => {
18765
- var G, D, Q, X, q, R;
18763
+ V.current = g;
18764
+ }, [a, O]), F = N(() => {
18765
+ var q, A, K, Y, J, R;
18766
18766
  if (!h.current || !w.current) return;
18767
- const M = h.current.getBoundingClientRect(), g = w.current.getBoundingClientRect(), k = 8;
18768
- let y = 0, m = 0;
18767
+ const M = h.current.getBoundingClientRect(), g = w.current.getBoundingClientRect(), Z = 8;
18768
+ let y = 0, f = 0;
18769
18769
  if (t) {
18770
- const Z = (G = f.current) == null ? void 0 : G.getBoundingClientRect();
18771
- if (!Z) return;
18772
- const B = M.top - Z.top, A = M.left - Z.left;
18770
+ const k = (q = m.current) == null ? void 0 : q.getBoundingClientRect();
18771
+ if (!k) return;
18772
+ const B = M.top - k.top, z = M.left - k.left;
18773
18773
  switch (r) {
18774
18774
  case "top":
18775
- y = B - g.height - k, m = A + M.width / 2 - g.width / 2;
18775
+ y = B - g.height - Z, f = z + M.width / 2 - g.width / 2;
18776
18776
  break;
18777
18777
  case "bottom":
18778
- y = B + M.height + k, m = A + M.width / 2 - g.width / 2;
18778
+ y = B + M.height + Z, f = z + M.width / 2 - g.width / 2;
18779
18779
  break;
18780
18780
  case "left":
18781
- y = B + M.height / 2 - g.height / 2, m = A - g.width - k;
18781
+ y = B + M.height / 2 - g.height / 2, f = z - g.width - Z;
18782
18782
  break;
18783
18783
  case "right":
18784
- y = B + M.height / 2 - g.height / 2, m = A + M.width + k;
18784
+ y = B + M.height / 2 - g.height / 2, f = z + M.width + Z;
18785
18785
  break;
18786
18786
  case "top-left":
18787
- y = B - g.height - k, m = A;
18787
+ y = B - g.height - Z, f = z;
18788
18788
  break;
18789
18789
  case "top-right":
18790
- y = B - g.height - k, m = A + M.width - g.width;
18790
+ y = B - g.height - Z, f = z + M.width - g.width;
18791
18791
  break;
18792
18792
  case "bottom-left":
18793
- y = B + M.height + k, m = A;
18793
+ y = B + M.height + Z, f = z;
18794
18794
  break;
18795
18795
  case "bottom-right":
18796
- y = B + M.height + k, m = A + M.width - g.width;
18796
+ y = B + M.height + Z, f = z + M.width - g.width;
18797
18797
  break;
18798
18798
  case "right-top":
18799
- y = B, m = A + M.width + k;
18799
+ y = B, f = z + M.width + Z;
18800
18800
  break;
18801
18801
  case "right-bottom":
18802
- y = B + M.height - g.height, m = A + M.width + k;
18802
+ y = B + M.height - g.height, f = z + M.width + Z;
18803
18803
  break;
18804
18804
  case "left-top":
18805
- y = B, m = A - g.width - k;
18805
+ y = B, f = z - g.width - Z;
18806
18806
  break;
18807
18807
  case "left-bottom":
18808
- y = B + M.height - g.height, m = A - g.width - k;
18808
+ y = B + M.height - g.height, f = z - g.width - Z;
18809
18809
  break;
18810
18810
  }
18811
- y < 0 && (y = 0), m < 0 && (m = 0), (() => {
18812
- var Y;
18813
- const u1 = (Y = f.current) == null ? void 0 : Y.getBoundingClientRect();
18811
+ y < 0 && (y = 0), f < 0 && (f = 0), (() => {
18812
+ var G;
18813
+ const u1 = (G = m.current) == null ? void 0 : G.getBoundingClientRect();
18814
18814
  if (!u1) return;
18815
- let F = r, i1 = !1;
18815
+ let U = r, i1 = !1;
18816
18816
  if (!(() => {
18817
18817
  switch (r) {
18818
18818
  case "top":
18819
- return B >= g.height + k;
18819
+ return B >= g.height + Z;
18820
18820
  case "bottom":
18821
- return B + M.height + k + g.height <= u1.height;
18821
+ return B + M.height + Z + g.height <= u1.height;
18822
18822
  case "left":
18823
- return A >= g.width + k;
18823
+ return z >= g.width + Z;
18824
18824
  case "right":
18825
- return A + M.width + k + g.width <= u1.width;
18825
+ return z + M.width + Z + g.width <= u1.width;
18826
18826
  default:
18827
18827
  return !0;
18828
18828
  }
18829
- })() && (r === "top" ? B + M.height + k + g.height <= u1.height && (F = "bottom", i1 = !0) : r === "bottom" ? B >= g.height + k && (F = "top", i1 = !0) : r === "left" ? A + M.width + k + g.width <= u1.width && (F = "right", i1 = !0) : r === "right" && A >= g.width + k && (F = "left", i1 = !0), i1)) {
18830
- switch (F) {
18829
+ })() && (r === "top" ? B + M.height + Z + g.height <= u1.height && (U = "bottom", i1 = !0) : r === "bottom" ? B >= g.height + Z && (U = "top", i1 = !0) : r === "left" ? z + M.width + Z + g.width <= u1.width && (U = "right", i1 = !0) : r === "right" && z >= g.width + Z && (U = "left", i1 = !0), i1)) {
18830
+ switch (U) {
18831
18831
  case "top":
18832
- y = B - g.height - k, m = A + M.width / 2 - g.width / 2;
18832
+ y = B - g.height - Z, f = z + M.width / 2 - g.width / 2;
18833
18833
  break;
18834
18834
  case "bottom":
18835
- y = B + M.height + k, m = A + M.width / 2 - g.width / 2;
18835
+ y = B + M.height + Z, f = z + M.width / 2 - g.width / 2;
18836
18836
  break;
18837
18837
  case "left":
18838
- y = B + M.height / 2 - g.height / 2, m = A - g.width - k;
18838
+ y = B + M.height / 2 - g.height / 2, f = z - g.width - Z;
18839
18839
  break;
18840
18840
  case "right":
18841
- y = B + M.height / 2 - g.height / 2, m = A + M.width + k;
18841
+ y = B + M.height / 2 - g.height / 2, f = z + M.width + Z;
18842
18842
  break;
18843
18843
  }
18844
- C(F);
18844
+ C(U);
18845
18845
  }
18846
18846
  })();
18847
18847
  } else
18848
18848
  switch (r) {
18849
18849
  case "top":
18850
- y = M.top - g.height - k, m = M.left + M.width / 2 - g.width / 2;
18850
+ y = M.top - g.height - Z, f = M.left + M.width / 2 - g.width / 2;
18851
18851
  break;
18852
18852
  case "bottom":
18853
- y = M.bottom + k, m = M.left + M.width / 2 - g.width / 2;
18853
+ y = M.bottom + Z, f = M.left + M.width / 2 - g.width / 2;
18854
18854
  break;
18855
18855
  case "left":
18856
- y = M.top + M.height / 2 - g.height / 2, m = M.left - g.width - k;
18856
+ y = M.top + M.height / 2 - g.height / 2, f = M.left - g.width - Z;
18857
18857
  break;
18858
18858
  case "right":
18859
- y = M.top + M.height / 2 - g.height / 2, m = M.right + k;
18859
+ y = M.top + M.height / 2 - g.height / 2, f = M.right + Z;
18860
18860
  break;
18861
18861
  case "top-left":
18862
- y = M.top - g.height - k, m = M.left;
18862
+ y = M.top - g.height - Z, f = M.left;
18863
18863
  break;
18864
18864
  case "top-right":
18865
- y = M.top - g.height - k, m = M.right - g.width;
18865
+ y = M.top - g.height - Z, f = M.right - g.width;
18866
18866
  break;
18867
18867
  case "bottom-left":
18868
- y = M.bottom + k, m = M.left;
18868
+ y = M.bottom + Z, f = M.left;
18869
18869
  break;
18870
18870
  case "bottom-right":
18871
- y = M.bottom + k, m = M.right - g.width;
18871
+ y = M.bottom + Z, f = M.right - g.width;
18872
18872
  break;
18873
18873
  case "right-top":
18874
- y = M.top, m = M.right + k;
18874
+ y = M.top, f = M.right + Z;
18875
18875
  break;
18876
18876
  case "right-bottom":
18877
- y = M.bottom - g.height, m = M.right + k;
18877
+ y = M.bottom - g.height, f = M.right + Z;
18878
18878
  break;
18879
18879
  case "left-top":
18880
- y = M.top, m = M.left - g.width - k;
18880
+ y = M.top, f = M.left - g.width - Z;
18881
18881
  break;
18882
18882
  case "left-bottom":
18883
- y = M.bottom - g.height, m = M.left - g.width - k;
18883
+ y = M.bottom - g.height, f = M.left - g.width - Z;
18884
18884
  break;
18885
18885
  }
18886
18886
  if (r.includes("top") || r.includes("bottom"))
18887
18887
  switch (o) {
18888
18888
  case "start":
18889
18889
  if (t) {
18890
- const Z = (D = f.current) == null ? void 0 : D.getBoundingClientRect();
18891
- Z && (m = M.left - Z.left);
18890
+ const k = (A = m.current) == null ? void 0 : A.getBoundingClientRect();
18891
+ k && (f = M.left - k.left);
18892
18892
  } else
18893
- m = M.left;
18893
+ f = M.left;
18894
18894
  break;
18895
18895
  case "end":
18896
18896
  if (t) {
18897
- const Z = (Q = f.current) == null ? void 0 : Q.getBoundingClientRect();
18898
- Z && (m = M.right - Z.left - g.width);
18897
+ const k = (K = m.current) == null ? void 0 : K.getBoundingClientRect();
18898
+ k && (f = M.right - k.left - g.width);
18899
18899
  } else
18900
- m = M.right - g.width;
18900
+ f = M.right - g.width;
18901
18901
  break;
18902
18902
  }
18903
18903
  else if (r.includes("left") || r.includes("right"))
18904
18904
  switch (o) {
18905
18905
  case "start":
18906
18906
  if (t) {
18907
- const Z = (X = f.current) == null ? void 0 : X.getBoundingClientRect();
18908
- Z && (y = M.top - Z.top);
18907
+ const k = (Y = m.current) == null ? void 0 : Y.getBoundingClientRect();
18908
+ k && (y = M.top - k.top);
18909
18909
  } else
18910
18910
  y = M.top;
18911
18911
  break;
18912
18912
  case "end":
18913
18913
  if (t) {
18914
- const Z = (q = f.current) == null ? void 0 : q.getBoundingClientRect();
18915
- Z && (y = M.bottom - Z.top - g.height);
18914
+ const k = (J = m.current) == null ? void 0 : J.getBoundingClientRect();
18915
+ k && (y = M.bottom - k.top - g.height);
18916
18916
  } else
18917
18917
  y = M.bottom - g.height;
18918
18918
  break;
18919
18919
  }
18920
18920
  if (t) {
18921
- const Z = (R = f.current) == null ? void 0 : R.getBoundingClientRect();
18922
- Z && (m < 8 && (m = 8), m + g.width > Z.width - 8 && (m = Z.width - g.width - 8), y < 8 && (y = 8), y + g.height > Z.height - 8 && (y = Z.height - g.height - 8));
18921
+ const k = (R = m.current) == null ? void 0 : R.getBoundingClientRect();
18922
+ k && (f < 8 && (f = 8), f + g.width > k.width - 8 && (f = k.width - g.width - 8), y < 8 && (y = 8), y + g.height > k.height - 8 && (y = k.height - g.height - 8));
18923
18923
  } else {
18924
- const Z = window.innerWidth, B = window.innerHeight, A = 8;
18925
- m < A && (m = A), m + g.width > Z - A && (m = Z - g.width - A), y < A && (y = A), y + g.height > B - A && (y = B - g.height - A);
18924
+ const k = window.innerWidth, B = window.innerHeight, z = 8;
18925
+ f < z && (f = z), f + g.width > k - z && (f = k - g.width - z), y < z && (y = z), y + g.height > B - z && (y = B - g.height - z);
18926
18926
  }
18927
- if (isNaN(y) || isNaN(m) || y < 0 || m < 0) {
18927
+ if (isNaN(y) || isNaN(f) || y < 0 || f < 0) {
18928
18928
  O();
18929
18929
  return;
18930
18930
  }
18931
18931
  const I = Date.now();
18932
- if (I - V.current.lastTime < 100) {
18933
- if (V.current.count++, V.current.count > 5) {
18932
+ if (I - H.current.lastTime < 100) {
18933
+ if (H.current.count++, H.current.count > 5) {
18934
18934
  O();
18935
18935
  return;
18936
18936
  }
18937
18937
  } else
18938
- V.current.count = 0;
18939
- V.current.lastTime = I, b.current = { top: y, left: m }, s({ top: y, left: m });
18938
+ H.current.count = 0;
18939
+ H.current.lastTime = I, b.current = { top: y, left: f }, s({ top: y, left: f });
18940
18940
  }, [r, o, t, O]);
18941
18941
  W(() => (a && w.current ? (requestAnimationFrame(() => {
18942
- if (U(), h.current) {
18942
+ if (F(), h.current) {
18943
18943
  const M = h.current.getBoundingClientRect();
18944
- H.current = { top: M.top, left: M.left };
18944
+ V.current = { top: M.top, left: M.left };
18945
18945
  }
18946
- }), v.current = setInterval(T, 100)) : v.current && (clearInterval(v.current), v.current = null), () => {
18946
+ }), v.current = setInterval(P, 100)) : v.current && (clearInterval(v.current), v.current = null), () => {
18947
18947
  v.current && (clearInterval(v.current), v.current = null);
18948
- }), [a, U, T]), W(() => {
18948
+ }), [a, F, P]), W(() => {
18949
18949
  if (h.current)
18950
18950
  return x.current = new IntersectionObserver(
18951
18951
  (M) => {
@@ -18971,11 +18971,11 @@ const y8 = ({
18971
18971
  window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", g);
18972
18972
  };
18973
18973
  }, [a, t, O]);
18974
- const z = P(() => {
18974
+ const D = N(() => {
18975
18975
  e || (j.current && (clearTimeout(j.current), j.current = null), n > 0 ? j.current = setTimeout(() => {
18976
18976
  c(!0);
18977
18977
  }, n) : c(!0));
18978
- }, [e, n]), S = P(() => {
18978
+ }, [e, n]), S = N(() => {
18979
18979
  j.current && (clearTimeout(j.current), j.current = null), c(!1), s({ top: 0, left: 0 });
18980
18980
  }, []);
18981
18981
  return W(() => () => {
@@ -18987,10 +18987,10 @@ const y8 = ({
18987
18987
  adjustedPosition: d,
18988
18988
  triggerRef: h,
18989
18989
  tooltipRef: w,
18990
- containerRef: f,
18991
- handleMouseEnter: z,
18990
+ containerRef: m,
18991
+ handleMouseEnter: D,
18992
18992
  handleMouseLeave: S,
18993
- calculatePosition: U
18993
+ calculatePosition: F
18994
18994
  };
18995
18995
  }, I8 = {
18996
18996
  white: { bg: "ui-bg-white", text: "ui-text-gray-900", arrow: "var(--ui-color-white)" },
@@ -19203,23 +19203,23 @@ const y8 = ({
19203
19203
  }) => {
19204
19204
  const {
19205
19205
  isVisible: w,
19206
- coords: f,
19206
+ coords: m,
19207
19207
  adjustedPosition: j,
19208
19208
  triggerRef: x,
19209
19209
  tooltipRef: v,
19210
- containerRef: H,
19210
+ containerRef: V,
19211
19211
  handleMouseEnter: b,
19212
- handleMouseLeave: V
19213
- } = Z8(t, n, C, c, l), O = $8(e, C), T = B8(j, e);
19214
- return /* @__PURE__ */ u("div", { ref: H, className: C ? "ui-relative" : "", children: [
19212
+ handleMouseLeave: H
19213
+ } = Z8(t, n, C, c, l), O = $8(e, C), P = B8(j, e);
19214
+ return /* @__PURE__ */ u("div", { ref: V, className: C ? "ui-relative" : "", children: [
19215
19215
  /* @__PURE__ */ i(
19216
19216
  "div",
19217
19217
  {
19218
19218
  ref: x,
19219
19219
  onMouseEnter: b,
19220
- onMouseLeave: V,
19220
+ onMouseLeave: H,
19221
19221
  onFocus: b,
19222
- onBlur: V,
19222
+ onBlur: H,
19223
19223
  className: _("ui-inline-block ui-h-fit ui-w-fit", L ? "ui-w-full" : "ui-w-fit"),
19224
19224
  children: r
19225
19225
  }
@@ -19235,9 +19235,9 @@ const y8 = ({
19235
19235
  s
19236
19236
  ),
19237
19237
  style: {
19238
- top: `${f.top}px`,
19239
- left: `${f.left}px`,
19240
- opacity: f.top === 0 && f.left === 0 ? 0 : 1,
19238
+ top: `${m.top}px`,
19239
+ left: `${m.left}px`,
19240
+ opacity: m.top === 0 && m.left === 0 ? 0 : 1,
19241
19241
  ...p
19242
19242
  },
19243
19243
  role: "tooltip",
@@ -19245,7 +19245,7 @@ const y8 = ({
19245
19245
  ...h,
19246
19246
  children: [
19247
19247
  o,
19248
- /* @__PURE__ */ i("div", { className: _("tooltip-imj-ui-arrow", d), style: T })
19248
+ /* @__PURE__ */ i("div", { className: _("tooltip-imj-ui-arrow", d), style: P })
19249
19249
  ]
19250
19250
  }
19251
19251
  ) : B1(
@@ -19260,9 +19260,9 @@ const y8 = ({
19260
19260
  s
19261
19261
  ),
19262
19262
  style: {
19263
- top: `${f.top}px`,
19264
- left: `${f.left}px`,
19265
- opacity: f.top === 0 && f.left === 0 ? 0 : 1,
19263
+ top: `${m.top}px`,
19264
+ left: `${m.left}px`,
19265
+ opacity: m.top === 0 && m.left === 0 ? 0 : 1,
19266
19266
  ...p
19267
19267
  },
19268
19268
  role: "tooltip",
@@ -19270,7 +19270,7 @@ const y8 = ({
19270
19270
  ...h,
19271
19271
  children: [
19272
19272
  o,
19273
- /* @__PURE__ */ i("div", { className: _("tooltip-imj-ui-arrow", d), style: T })
19273
+ /* @__PURE__ */ i("div", { className: _("tooltip-imj-ui-arrow", d), style: P })
19274
19274
  ]
19275
19275
  }
19276
19276
  ),
@@ -19393,43 +19393,43 @@ const y8 = ({
19393
19393
  textColor: C,
19394
19394
  clickable: h = !0,
19395
19395
  icon: w,
19396
- link: f,
19396
+ link: m,
19397
19397
  size: j,
19398
19398
  square: x = !1,
19399
19399
  target: v = "_self",
19400
- onClickIcon: H,
19400
+ onClickIcon: V,
19401
19401
  onClickLeftSlot: b,
19402
- onClickRightSlot: V,
19402
+ onClickRightSlot: H,
19403
19403
  disabled: O,
19404
- colorIcon: T,
19405
- showShadow: U = !1,
19406
- borderable: z,
19404
+ colorIcon: P,
19405
+ showShadow: F = !1,
19406
+ borderable: D,
19407
19407
  iconSizeExtended: S = "none",
19408
19408
  defaultSizeIcon: M = !0,
19409
19409
  defaultTooltipColor: g = !0,
19410
- as: k = "button",
19410
+ as: Z = "button",
19411
19411
  classNameId: y = "imj-ui-inner-button",
19412
- tooltip: m = "",
19412
+ tooltip: f = "",
19413
19413
  tooltipPosition: I,
19414
- tooltipAlignment: N,
19415
- tooltipColor: G = "neutral",
19416
- tooltipDelay: D,
19417
- tooltipAbsolute: Q,
19418
- classNameTooltip: X,
19419
- stopPropagation: q = !0,
19414
+ tooltipAlignment: T,
19415
+ tooltipColor: q = "neutral",
19416
+ tooltipDelay: A,
19417
+ tooltipAbsolute: K,
19418
+ classNameTooltip: Y,
19419
+ stopPropagation: J = !0,
19420
19420
  pointer: R = !1,
19421
- ref: Z,
19421
+ ref: k,
19422
19422
  onClick: B,
19423
- textAlign: A = "center",
19423
+ textAlign: z = "center",
19424
19424
  whiteBackground: e1 = !1,
19425
19425
  strokeWidth: u1 = 2,
19426
- transition: F = !0,
19426
+ transition: U = !0,
19427
19427
  ...i1
19428
19428
  }) => {
19429
19429
  const $ = {
19430
19430
  disabled: O
19431
- }, Y = a === "icon", r1 = Y ? !0 : M, n1 = Y ? "xs" : j, p1 = (L1) => {
19432
- q && L1.stopPropagation(), B && B(L1);
19431
+ }, G = a === "icon", r1 = G ? !0 : M, n1 = G ? "xs" : j, p1 = (L1) => {
19432
+ J && L1.stopPropagation(), B && B(L1);
19433
19433
  }, s1 = c1("", {
19434
19434
  variants: {
19435
19435
  color: {
@@ -19461,7 +19461,7 @@ const y8 = ({
19461
19461
  {
19462
19462
  slot: n,
19463
19463
  size: j,
19464
- colorIcon: T,
19464
+ colorIcon: P,
19465
19465
  className: r,
19466
19466
  onClick: b,
19467
19467
  defaultSizeIcon: r1,
@@ -19474,7 +19474,7 @@ const y8 = ({
19474
19474
  className: _(
19475
19475
  "ui-relative ui-leading-none",
19476
19476
  n || e ? "" : "ui-w-full",
19477
- s1({ color: C, textAlign: A })
19477
+ s1({ color: C, textAlign: z })
19478
19478
  ),
19479
19479
  children: [
19480
19480
  d,
@@ -19489,8 +19489,8 @@ const y8 = ({
19489
19489
  strokeWidth: u1,
19490
19490
  name: w,
19491
19491
  size: a === "icon" ? j : S !== "none" ? S : j,
19492
- color: T,
19493
- onClick: a === "icon" ? B || H : void 0
19492
+ color: P,
19493
+ onClick: a === "icon" ? B || V : void 0
19494
19494
  }
19495
19495
  ) : w),
19496
19496
  d && e && /* @__PURE__ */ i(
@@ -19498,15 +19498,15 @@ const y8 = ({
19498
19498
  {
19499
19499
  slot: e,
19500
19500
  size: S !== "none" ? S : j,
19501
- colorIcon: T,
19501
+ colorIcon: P,
19502
19502
  className: r,
19503
- onClick: V,
19503
+ onClick: H,
19504
19504
  defaultSizeIcon: r1,
19505
19505
  strokeWidth: u1
19506
19506
  }
19507
19507
  )
19508
- ] }), a1 = x ? "!ui-p-0 ui-flex ui-justify-center ui-items-center" : "", x1 = g ? G || "neutral" : L, m1 = c1(
19509
- `${y} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-border-[1.5px] ui-font-bold ui-cursor-default ${U && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${R && Y ? "!ui-cursor-pointer" : ""} ${F ? "ui-transition-all ui-duration-300" : ""}`,
19508
+ ] }), a1 = x ? "!ui-p-0 ui-flex ui-justify-center ui-items-center" : "", x1 = g ? q || "neutral" : L, m1 = c1(
19509
+ `${y} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-border-[1.5px] ui-font-bold ui-cursor-default ${F && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${R && G ? "!ui-cursor-pointer" : ""} ${U ? "ui-transition-all ui-duration-300" : ""}`,
19510
19510
  {
19511
19511
  variants: {
19512
19512
  variant: {
@@ -19526,17 +19526,17 @@ const y8 = ({
19526
19526
  "3xl": `ui-max-h-[62px] ui-min-h-[62px] ui-min-w-[62px] ${d ? "ui-px-7 ui-py-3.5" : "ui-p-3.5 ui-w-[62px] ui-flex ui-justify-center ui-items-center"} ui-h-[62px] ui-text-[20px] ${x ? `ui-max-w-[62px] ui-min-h-[62px] ${a1}` : ""}`
19527
19527
  },
19528
19528
  color: {
19529
- blue: C1(a, h, z, e1).blue,
19530
- "blue-dark": C1(a, h, z, e1)["blue-dark"],
19531
- orange: C1(a, h, z, e1).orange,
19532
- red: C1(a, h, z, e1).red,
19533
- green: C1(a, h, z, e1).green,
19534
- white: C1(a, h, z, e1).white,
19535
- yellow: C1(a, h, z, e1).yellow,
19536
- "blue-light": C1(a, h, z, e1)["blue-light"],
19537
- neutral: C1(a, h, z, e1).neutral,
19538
- black: C1(a, h, z, e1).black,
19539
- transparent: C1(a, h, z, e1).transparent
19529
+ blue: C1(a, h, D, e1).blue,
19530
+ "blue-dark": C1(a, h, D, e1)["blue-dark"],
19531
+ orange: C1(a, h, D, e1).orange,
19532
+ red: C1(a, h, D, e1).red,
19533
+ green: C1(a, h, D, e1).green,
19534
+ white: C1(a, h, D, e1).white,
19535
+ yellow: C1(a, h, D, e1).yellow,
19536
+ "blue-light": C1(a, h, D, e1)["blue-light"],
19537
+ neutral: C1(a, h, D, e1).neutral,
19538
+ black: C1(a, h, D, e1).black,
19539
+ transparent: C1(a, h, D, e1).transparent
19540
19540
  },
19541
19541
  rounded: {
19542
19542
  false: "ui-rounded-sm",
@@ -19562,30 +19562,30 @@ const y8 = ({
19562
19562
  variant: a,
19563
19563
  className: _(r)
19564
19564
  });
19565
- return f ? /* @__PURE__ */ i(
19565
+ return m ? /* @__PURE__ */ i(
19566
19566
  "a",
19567
19567
  {
19568
- ref: Z,
19569
- href: f,
19568
+ ref: k,
19569
+ href: m,
19570
19570
  target: v,
19571
19571
  className: _(m1, r),
19572
19572
  children: d1()
19573
19573
  }
19574
- ) : k === "div" ? /* @__PURE__ */ i(
19574
+ ) : Z === "div" ? /* @__PURE__ */ i(
19575
19575
  o0,
19576
19576
  {
19577
- label: m,
19577
+ label: f,
19578
19578
  position: I,
19579
- alignment: N,
19580
- absolute: Q,
19579
+ alignment: T,
19580
+ absolute: K,
19581
19581
  color: x1,
19582
- delay: D,
19583
- className: X,
19582
+ delay: A,
19583
+ className: Y,
19584
19584
  fullWidth: t,
19585
19585
  children: /* @__PURE__ */ i(
19586
19586
  "div",
19587
19587
  {
19588
- ref: Z,
19588
+ ref: k,
19589
19589
  className: _(m1, r),
19590
19590
  ...i1,
19591
19591
  children: d1()
@@ -19595,17 +19595,17 @@ const y8 = ({
19595
19595
  ) : /* @__PURE__ */ i(
19596
19596
  o0,
19597
19597
  {
19598
- label: m,
19598
+ label: f,
19599
19599
  position: I,
19600
- alignment: N,
19600
+ alignment: T,
19601
19601
  color: x1,
19602
- delay: D,
19603
- className: X,
19602
+ delay: A,
19603
+ className: Y,
19604
19604
  fullWidth: t,
19605
19605
  children: /* @__PURE__ */ i(
19606
19606
  "button",
19607
19607
  {
19608
- ref: Z,
19608
+ ref: k,
19609
19609
  className: _(m1, r),
19610
19610
  ...$,
19611
19611
  ...i1,
@@ -19650,7 +19650,7 @@ const y8 = ({
19650
19650
  headerClassName: a,
19651
19651
  defaultOpen: c = !1
19652
19652
  }) => {
19653
- const [l, s] = J(c);
19653
+ const [l, s] = X(c);
19654
19654
  return /* @__PURE__ */ u(
19655
19655
  "div",
19656
19656
  {
@@ -19925,7 +19925,7 @@ const y8 = ({
19925
19925
  }
19926
19926
  }[r][o]}`;
19927
19927
  }, F8 = ({ open: r, externalIsLeaving: o }) => {
19928
- const [t, n] = J(!1), [e, a] = J(!1), c = o !== void 0 ? o : e;
19928
+ const [t, n] = X(!1), [e, a] = X(!1), c = o !== void 0 ? o : e;
19929
19929
  return W(() => {
19930
19930
  r ? (n(!0), a(!1)) : (a(!0), o === void 0 && setTimeout(() => {
19931
19931
  n(!1);
@@ -20054,7 +20054,7 @@ const y8 = ({
20054
20054
  }
20055
20055
  }
20056
20056
  }
20057
- ), f = c1(
20057
+ ), m = c1(
20058
20058
  "ui-absolute ui-border-[3px] ui-p-3.5 ui-rounded-full ui-border-white",
20059
20059
  {
20060
20060
  variants: {
@@ -20069,7 +20069,7 @@ const y8 = ({
20069
20069
  return /* @__PURE__ */ u("div", { className: _("ui-relative ui-flex ui-w-full ui-gap-2 ui-p-1", r), children: [
20070
20070
  (d || C) && /* @__PURE__ */ u("div", { className: _(w({ status: o })), children: [
20071
20071
  d && /* @__PURE__ */ i(j1, { name: d, size: "2xl", color: "white", strokeWidth: 4 }),
20072
- /* @__PURE__ */ i("div", { className: _(f({ borderStyle: p })) })
20072
+ /* @__PURE__ */ i("div", { className: _(m({ borderStyle: p })) })
20073
20073
  ] }),
20074
20074
  /* @__PURE__ */ u("div", { className: "ui-relative ui-flex ui-w-full ui-flex-col ui-gap-1.5", children: [
20075
20075
  /* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-justify-between ui-gap-2", children: [
@@ -20111,14 +20111,14 @@ const y8 = ({
20111
20111
  secondaryButtonText: C = "Cancelar",
20112
20112
  animation: h = "none",
20113
20113
  isLeaving: w,
20114
- progressBarColor: f = !1,
20114
+ progressBarColor: m = !1,
20115
20115
  duration: j = 3e3
20116
20116
  }) => {
20117
20117
  const { isVisible: x, isLeaving: v } = F8({ open: r, externalIsLeaving: w });
20118
20118
  if (!x)
20119
20119
  return null;
20120
- const H = !!s, b = (V) => {
20121
- s && (V.stopPropagation(), s());
20120
+ const V = !!s, b = (H) => {
20121
+ s && (H.stopPropagation(), s());
20122
20122
  };
20123
20123
  return /* @__PURE__ */ u(
20124
20124
  "div",
@@ -20127,7 +20127,7 @@ const y8 = ({
20127
20127
  "ui-imj-alert ui-relative ui-overflow-hidden",
20128
20128
  n,
20129
20129
  R8({ color: o, variant: t, isLeaving: v, animation: h }),
20130
- H ? "ui-hover:ui-brightness-110 ui-cursor-pointer ui-transition-all ui-duration-300 ui-ease-in-out" : ""
20130
+ V ? "ui-hover:ui-brightness-110 ui-cursor-pointer ui-transition-all ui-duration-300 ui-ease-in-out" : ""
20131
20131
  ),
20132
20132
  onClick: b,
20133
20133
  children: [
@@ -20155,7 +20155,7 @@ const y8 = ({
20155
20155
  }
20156
20156
  )
20157
20157
  ] }),
20158
- f && /* @__PURE__ */ i("div", { className: _("ui-absolute ui-bottom-0 ui-w-full ui-opacity-80"), children: /* @__PURE__ */ i(
20158
+ m && /* @__PURE__ */ i("div", { className: _("ui-absolute ui-bottom-0 ui-w-full ui-opacity-80"), children: /* @__PURE__ */ i(
20159
20159
  _8,
20160
20160
  {
20161
20161
  progress: 100,
@@ -20184,17 +20184,17 @@ const y8 = ({
20184
20184
  children: C,
20185
20185
  icon: h,
20186
20186
  link: w,
20187
- size: f,
20187
+ size: m,
20188
20188
  target: j = "_self",
20189
20189
  onClickIcon: x,
20190
20190
  disabled: v,
20191
- colorIcon: H,
20191
+ colorIcon: V,
20192
20192
  tooltip: b,
20193
- tooltipPosition: V,
20193
+ tooltipPosition: H,
20194
20194
  tooltipAlignment: O,
20195
- tooltipColor: T,
20196
- tooltipDelay: U,
20197
- ...z
20195
+ tooltipColor: P,
20196
+ tooltipDelay: F,
20197
+ ...D
20198
20198
  }) => /* @__PURE__ */ i(
20199
20199
  t1,
20200
20200
  {
@@ -20203,7 +20203,7 @@ const y8 = ({
20203
20203
  color: p,
20204
20204
  rounded: d,
20205
20205
  fullWidth: t,
20206
- size: f,
20206
+ size: m,
20207
20207
  clickable: L,
20208
20208
  children: C,
20209
20209
  icon: h,
@@ -20216,14 +20216,14 @@ const y8 = ({
20216
20216
  target: j,
20217
20217
  onClickIcon: x,
20218
20218
  disabled: v,
20219
- colorIcon: H,
20219
+ colorIcon: V,
20220
20220
  className: o,
20221
20221
  tooltip: b,
20222
- tooltipPosition: V,
20222
+ tooltipPosition: H,
20223
20223
  tooltipAlignment: O,
20224
- tooltipColor: T,
20225
- tooltipDelay: U,
20226
- ...z
20224
+ tooltipColor: P,
20225
+ tooltipDelay: F,
20226
+ ...D
20227
20227
  }
20228
20228
  ), b5 = ({
20229
20229
  children: r,
@@ -20314,7 +20314,7 @@ const G8 = (r) => {
20314
20314
  initialViewMode: e = "days",
20315
20315
  closeOnSelect: a = !1,
20316
20316
  autoCloseRange: c = !0
20317
- } = r, [l, s] = J({
20317
+ } = r, [l, s] = X({
20318
20318
  isOpen: !1,
20319
20319
  currentDate: /* @__PURE__ */ new Date(),
20320
20320
  viewMode: e,
@@ -20322,109 +20322,109 @@ const G8 = (r) => {
20322
20322
  internalRange: { start: null, end: null },
20323
20323
  hoverDate: null,
20324
20324
  portalPosition: { top: 0, left: 0 }
20325
- }), [L, p] = J(!1), d = o1(null), C = o === "single" ? t !== void 0 : n !== void 0, h = o === "single" ? t == null : n === void 0, w = o === "single" ? h ? l.internalDate : t : null, f = o === "range" ? h ? l.internalRange : n : { start: null, end: null }, j = (m) => m && m instanceof Date && !isNaN(m.getTime()), x = j(w) ? w : null, v = {
20326
- start: j(f == null ? void 0 : f.start) ? f.start : null,
20327
- end: j(f == null ? void 0 : f.end) ? f.end : null
20328
- }, H = P(() => {
20325
+ }), [L, p] = X(!1), d = o1(null), C = o === "single" ? t !== void 0 : n !== void 0, h = o === "single" ? t == null : n === void 0, w = o === "single" ? h ? l.internalDate : t : null, m = o === "range" ? h ? l.internalRange : n : { start: null, end: null }, j = (f) => f && f instanceof Date && !isNaN(f.getTime()), x = j(w) ? w : null, v = {
20326
+ start: j(m == null ? void 0 : m.start) ? m.start : null,
20327
+ end: j(m == null ? void 0 : m.end) ? m.end : null
20328
+ }, V = N(() => {
20329
20329
  if (d.current) {
20330
- const m = d.current.getInputElement();
20331
- if (m) {
20332
- const I = m.getBoundingClientRect(), N = window.innerHeight, G = window.innerWidth, D = 320, Q = 256, X = 8;
20333
- let q, R = I.left;
20334
- const Z = N - I.bottom, B = I.top;
20335
- Z >= D + X ? q = I.bottom + X : B >= D + X ? q = I.top - D + X : Z > B ? q = I.bottom + X : q = I.top - D + X, I.left + Q > G && (R = I.right - Q), R = Math.max(0, Math.min(R, G - Q)), s((A) => ({
20336
- ...A,
20330
+ const f = d.current.getInputElement();
20331
+ if (f) {
20332
+ const I = f.getBoundingClientRect(), T = window.innerHeight, q = window.innerWidth, A = 320, K = 256, Y = 8;
20333
+ let J, R = I.left;
20334
+ const k = T - I.bottom, B = I.top;
20335
+ k >= A + Y ? J = I.bottom + Y : B >= A + Y ? J = I.top - A + Y : k > B ? J = I.bottom + Y : J = I.top - A + Y, I.left + K > q && (R = I.right - K), R = Math.max(0, Math.min(R, q - K)), s((z) => ({
20336
+ ...z,
20337
20337
  isOpen: !0,
20338
- portalPosition: { top: q, left: R }
20338
+ portalPosition: { top: J, left: R }
20339
20339
  })), p(!0);
20340
20340
  return;
20341
20341
  }
20342
20342
  }
20343
- s((m) => ({ ...m, isOpen: !0 })), p(!1);
20344
- }, []), b = P(() => {
20345
- s((m) => ({ ...m, isOpen: !1 })), p(!1);
20346
- }, []), V = P((m) => {
20347
- s((I) => ({ ...I, currentDate: m }));
20348
- }, []), O = P((m) => {
20349
- s((I) => ({ ...I, viewMode: m }));
20350
- }, []), T = P((m) => {
20343
+ s((f) => ({ ...f, isOpen: !0 })), p(!1);
20344
+ }, []), b = N(() => {
20345
+ s((f) => ({ ...f, isOpen: !1 })), p(!1);
20346
+ }, []), H = N((f) => {
20347
+ s((I) => ({ ...I, currentDate: f }));
20348
+ }, []), O = N((f) => {
20349
+ s((I) => ({ ...I, viewMode: f }));
20350
+ }, []), P = N((f) => {
20351
20351
  s((I) => {
20352
- const N = new Date(I.currentDate);
20352
+ const T = new Date(I.currentDate);
20353
20353
  switch (I.viewMode) {
20354
20354
  case "days":
20355
- N.setMonth(N.getMonth() + (m === "next" ? 1 : -1));
20355
+ T.setMonth(T.getMonth() + (f === "next" ? 1 : -1));
20356
20356
  break;
20357
20357
  case "months":
20358
- N.setFullYear(N.getFullYear() + (m === "next" ? 1 : -1));
20358
+ T.setFullYear(T.getFullYear() + (f === "next" ? 1 : -1));
20359
20359
  break;
20360
20360
  case "years":
20361
- N.setFullYear(N.getFullYear() + (m === "next" ? 12 : -12));
20361
+ T.setFullYear(T.getFullYear() + (f === "next" ? 12 : -12));
20362
20362
  break;
20363
20363
  }
20364
- return { ...I, currentDate: N };
20364
+ return { ...I, currentDate: T };
20365
20365
  });
20366
- }, []), U = P(
20367
- (m) => {
20366
+ }, []), F = N(
20367
+ (f) => {
20368
20368
  var I;
20369
- o === "single" && (h && s((N) => ({ ...N, internalDate: m })), (I = r.onDateChange) == null || I.call(r, m), a && b());
20369
+ o === "single" && (h && s((T) => ({ ...T, internalDate: f })), (I = r.onDateChange) == null || I.call(r, f), a && b());
20370
20370
  },
20371
20371
  [o, h, r.onDateChange, a, b]
20372
- ), z = P(
20373
- (m) => {
20372
+ ), D = N(
20373
+ (f) => {
20374
20374
  var I;
20375
- o === "range" && (C || s((N) => ({ ...N, internalRange: m })), (I = r.onRangeChange) == null || I.call(r, m), c && m.start && m.end && b());
20375
+ o === "range" && (C || s((T) => ({ ...T, internalRange: f })), (I = r.onRangeChange) == null || I.call(r, f), c && f.start && f.end && b());
20376
20376
  },
20377
20377
  [o, C, r.onRangeChange, c, b]
20378
- ), S = P((m) => {
20379
- s((I) => ({ ...I, hoverDate: m }));
20380
- }, []), M = P((m) => {
20378
+ ), S = N((f) => {
20379
+ s((I) => ({ ...I, hoverDate: f }));
20380
+ }, []), M = N((f) => {
20381
20381
  s((I) => {
20382
- const N = new Date(I.currentDate);
20383
- return N.setMonth(m), {
20382
+ const T = new Date(I.currentDate);
20383
+ return T.setMonth(f), {
20384
20384
  ...I,
20385
- currentDate: N,
20385
+ currentDate: T,
20386
20386
  viewMode: "days"
20387
20387
  };
20388
20388
  });
20389
- }, []), g = P((m) => {
20389
+ }, []), g = N((f) => {
20390
20390
  s((I) => {
20391
- const N = new Date(I.currentDate);
20392
- return N.setFullYear(m), {
20391
+ const T = new Date(I.currentDate);
20392
+ return T.setFullYear(f), {
20393
20393
  ...I,
20394
- currentDate: N,
20394
+ currentDate: T,
20395
20395
  viewMode: "months"
20396
20396
  };
20397
20397
  });
20398
- }, []), k = P(() => {
20399
- const m = /* @__PURE__ */ new Date();
20398
+ }, []), Z = N(() => {
20399
+ const f = /* @__PURE__ */ new Date();
20400
20400
  s((I) => ({
20401
20401
  ...I,
20402
- currentDate: m,
20402
+ currentDate: f,
20403
20403
  viewMode: "days"
20404
20404
  }));
20405
- }, []), y = P(() => {
20405
+ }, []), y = N(() => {
20406
20406
  if (!d.current)
20407
20407
  return;
20408
- const m = d.current.getInputElement();
20409
- if (!m)
20408
+ const f = d.current.getInputElement();
20409
+ if (!f)
20410
20410
  return;
20411
- const I = m.getBoundingClientRect(), N = window.innerHeight, G = window.innerWidth, D = 320, Q = 256, X = 8;
20412
- let q, R = I.left;
20413
- const Z = N - I.bottom, B = I.top;
20414
- Z >= D + X ? q = I.bottom + X : B >= D + X ? q = I.top - D + X : Z > B ? q = I.bottom + X : q = I.top - D + X, I.left + Q > G && (R = I.right - Q), R = Math.max(0, Math.min(R, G - Q)), s((A) => ({ ...A, portalPosition: { top: q, left: R } })), p(!0);
20411
+ const I = f.getBoundingClientRect(), T = window.innerHeight, q = window.innerWidth, A = 320, K = 256, Y = 8;
20412
+ let J, R = I.left;
20413
+ const k = T - I.bottom, B = I.top;
20414
+ k >= A + Y ? J = I.bottom + Y : B >= A + Y ? J = I.top - A + Y : k > B ? J = I.bottom + Y : J = I.top - A + Y, I.left + K > q && (R = I.right - K), R = Math.max(0, Math.min(R, q - K)), s((z) => ({ ...z, portalPosition: { top: J, left: R } })), p(!0);
20415
20415
  }, []);
20416
20416
  return W(() => {
20417
20417
  if (!l.isOpen) return;
20418
- const m = () => y(), I = () => y();
20419
- return window.addEventListener("scroll", m, !0), window.addEventListener("resize", I), () => {
20420
- window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", I);
20418
+ const f = () => y(), I = () => y();
20419
+ return window.addEventListener("scroll", f, !0), window.addEventListener("resize", I), () => {
20420
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", I);
20421
20421
  };
20422
20422
  }, [l.isOpen, y]), W(() => {
20423
20423
  if (l.isOpen) {
20424
- const m = setTimeout(() => {
20424
+ const f = setTimeout(() => {
20425
20425
  y();
20426
20426
  }, 0);
20427
- return () => clearTimeout(m);
20427
+ return () => clearTimeout(f);
20428
20428
  }
20429
20429
  }, [l.isOpen, y]), {
20430
20430
  state: l,
@@ -20433,25 +20433,25 @@ const G8 = (r) => {
20433
20433
  inputRef: d,
20434
20434
  isPortalReady: L,
20435
20435
  actions: {
20436
- openPicker: H,
20436
+ openPicker: V,
20437
20437
  closePicker: b,
20438
- setCurrentDate: V,
20438
+ setCurrentDate: H,
20439
20439
  setViewMode: O,
20440
- setSelectedDate: U,
20441
- setSelectedRange: z,
20440
+ setSelectedDate: F,
20441
+ setSelectedRange: D,
20442
20442
  setHoverDate: S,
20443
20443
  updatePortalPosition: y,
20444
- navigate: T,
20444
+ navigate: P,
20445
20445
  handleMonthSelect: M,
20446
20446
  handleYearSelect: g,
20447
- goToToday: k
20447
+ goToToday: Z
20448
20448
  }
20449
20449
  };
20450
20450
  }, v1 = (r) => r && r instanceof Date && !isNaN(r.getTime()), c0 = (r, o, t, n, e) => {
20451
- const a = P((d, C) => !C.start || !C.end || !v1(C.start) || !v1(C.end) ? !1 : d >= C.start && d <= C.end, []), c = P((d, C) => !C.start || !v1(C.start) ? !1 : d.getTime() === C.start.getTime(), []), l = P((d, C) => !C.end || !v1(C.end) ? !1 : d.getTime() === C.end.getTime(), []), s = P(
20451
+ const a = N((d, C) => !C.start || !C.end || !v1(C.start) || !v1(C.end) ? !1 : d >= C.start && d <= C.end, []), c = N((d, C) => !C.start || !v1(C.start) ? !1 : d.getTime() === C.start.getTime(), []), l = N((d, C) => !C.end || !v1(C.end) ? !1 : d.getTime() === C.end.getTime(), []), s = N(
20452
20452
  (d) => !!(!v1(d) || t && v1(t) && d < t || n && v1(n) && d > n),
20453
20453
  [t, n]
20454
- ), L = P(
20454
+ ), L = N(
20455
20455
  (d, C, h) => {
20456
20456
  if (!v1(d)) {
20457
20457
  console.warn("useDateRange: Se recibió una fecha inválida:", d);
@@ -20462,42 +20462,42 @@ const G8 = (r) => {
20462
20462
  !r.start || r.start && r.end ? (w.start = d, w.end = null) : d < r.start ? (w.start = d, w.end = r.start) : (w.start = r.start, w.end = d), o(w), e && w.start && w.end && h && h();
20463
20463
  },
20464
20464
  [r, o, s, e]
20465
- ), p = P(
20465
+ ), p = N(
20466
20466
  (d, C) => {
20467
- const h = c(d, r), w = l(d, r), f = a(d, r), j = s(d);
20467
+ const h = c(d, r), w = l(d, r), m = a(d, r), j = s(d);
20468
20468
  let x = !1;
20469
20469
  if (C && r.start && !r.end) {
20470
- const V = {
20470
+ const H = {
20471
20471
  start: r.start < C ? r.start : C,
20472
20472
  end: r.start < C ? C : r.start
20473
20473
  };
20474
- x = a(d, V);
20474
+ x = a(d, H);
20475
20475
  }
20476
20476
  let v = !1;
20477
- if (r.start && r.end && f && !h) {
20478
- const V = new Date(d);
20479
- V.setDate(d.getDate() - 1), v = !a(V, r);
20477
+ if (r.start && r.end && m && !h) {
20478
+ const H = new Date(d);
20479
+ H.setDate(d.getDate() - 1), v = !a(H, r);
20480
20480
  } else if (r.start && !r.end && C && x) {
20481
- const V = new Date(d);
20482
- V.setDate(d.getDate() - 1);
20481
+ const H = new Date(d);
20482
+ H.setDate(d.getDate() - 1);
20483
20483
  const O = {
20484
20484
  start: r.start < C ? r.start : C,
20485
20485
  end: r.start < C ? C : r.start
20486
20486
  };
20487
- v = !a(V, O);
20487
+ v = !a(H, O);
20488
20488
  }
20489
- let H = !1;
20490
- if (r.start && r.end && f && !w) {
20491
- const V = new Date(d);
20492
- V.setDate(d.getDate() + 1), H = !a(V, r);
20489
+ let V = !1;
20490
+ if (r.start && r.end && m && !w) {
20491
+ const H = new Date(d);
20492
+ H.setDate(d.getDate() + 1), V = !a(H, r);
20493
20493
  } else if (r.start && !r.end && C && x) {
20494
- const V = new Date(d);
20495
- V.setDate(d.getDate() + 1);
20494
+ const H = new Date(d);
20495
+ H.setDate(d.getDate() + 1);
20496
20496
  const O = {
20497
20497
  start: r.start < C ? r.start : C,
20498
20498
  end: r.start < C ? C : r.start
20499
20499
  };
20500
- H = !a(V, O);
20500
+ V = !a(H, O);
20501
20501
  }
20502
20502
  let b = !0;
20503
20503
  return r.start && !r.end && C ? b = C >= r.start : r.start && r.end && (b = d >= r.start), {
@@ -20505,9 +20505,9 @@ const G8 = (r) => {
20505
20505
  isSelectingEnd: !!r.start && !r.end,
20506
20506
  isStart: h,
20507
20507
  isEnd: w,
20508
- isInRange: f,
20508
+ isInRange: m,
20509
20509
  isFirstInRange: v,
20510
- isLastInRange: H,
20510
+ isLastInRange: V,
20511
20511
  afterSelected: b,
20512
20512
  isDisabled: j,
20513
20513
  isHovered: x
@@ -20524,7 +20524,7 @@ const G8 = (r) => {
20524
20524
  getRangeState: p
20525
20525
  };
20526
20526
  }, R1 = (r, o, t) => {
20527
- const n = P(
20527
+ const n = N(
20528
20528
  (p) => {
20529
20529
  const d = new Date(r);
20530
20530
  switch (p) {
@@ -20538,38 +20538,38 @@ const G8 = (r) => {
20538
20538
  o(p);
20539
20539
  },
20540
20540
  [r, o]
20541
- ), e = P((p) => {
20542
- const d = p.getFullYear(), C = p.getMonth(), h = new Date(d, C, 1), w = new Date(d, C + 1, 0), f = w.getDate(), j = h.getDay();
20543
- return { firstDay: h, lastDay: w, daysInMonth: f, startOfWeek: j };
20544
- }, []), a = P(
20541
+ ), e = N((p) => {
20542
+ const d = p.getFullYear(), C = p.getMonth(), h = new Date(d, C, 1), w = new Date(d, C + 1, 0), m = w.getDate(), j = h.getDay();
20543
+ return { firstDay: h, lastDay: w, daysInMonth: m, startOfWeek: j };
20544
+ }, []), a = N(
20545
20545
  (p, d = 1) => {
20546
- const { firstDay: C, lastDay: h, daysInMonth: w, startOfWeek: f } = e(p), j = [], x = (f - d + 7) % 7;
20547
- for (let H = 0; H < x; H++)
20546
+ const { firstDay: C, lastDay: h, daysInMonth: w, startOfWeek: m } = e(p), j = [], x = (m - d + 7) % 7;
20547
+ for (let V = 0; V < x; V++)
20548
20548
  j.push(null);
20549
- for (let H = 1; H <= w; H++)
20550
- j.push(H);
20549
+ for (let V = 1; V <= w; V++)
20550
+ j.push(V);
20551
20551
  const v = (7 - j.length % 7) % 7;
20552
- for (let H = 0; H < v; H++)
20552
+ for (let V = 0; V < v; V++)
20553
20553
  j.push(null);
20554
20554
  return j;
20555
20555
  },
20556
20556
  [e]
20557
- ), c = P((p = "es-ES") => {
20557
+ ), c = N((p = "es-ES") => {
20558
20558
  const d = [];
20559
20559
  for (let C = 0; C < 12; C++) {
20560
20560
  const h = new Date(2024, C, 1);
20561
20561
  d.push(h.toLocaleDateString(p, { month: "long" }));
20562
20562
  }
20563
20563
  return d;
20564
- }, []), l = P((p, d = 12) => {
20564
+ }, []), l = N((p, d = 12) => {
20565
20565
  const C = [], h = p - Math.floor(d / 2);
20566
20566
  for (let w = 0; w < d; w++)
20567
20567
  C.push(h + w);
20568
20568
  return C;
20569
- }, []), s = P((p) => {
20569
+ }, []), s = N((p) => {
20570
20570
  const d = /* @__PURE__ */ new Date();
20571
20571
  return p.getDate() === d.getDate() && p.getMonth() === d.getMonth() && p.getFullYear() === d.getFullYear();
20572
- }, []), L = P((p, d) => p.toLocaleDateString("es-ES", d), []);
20572
+ }, []), L = N((p, d) => p.toLocaleDateString("es-ES", d), []);
20573
20573
  return {
20574
20574
  navigate: n,
20575
20575
  getDaysInMonth: e,
@@ -20580,34 +20580,34 @@ const G8 = (r) => {
20580
20580
  formatDate: L
20581
20581
  };
20582
20582
  }, j5 = (r = "", o = "dd/MM/yyyy", t = "es-ES") => {
20583
- const [n, e] = J({
20583
+ const [n, e] = X({
20584
20584
  isFocused: !1,
20585
20585
  inputValue: r
20586
- }), a = P((h) => {
20586
+ }), a = N((h) => {
20587
20587
  e((w) => ({ ...w, isFocused: h }));
20588
- }, []), c = P((h) => {
20588
+ }, []), c = N((h) => {
20589
20589
  e((w) => ({ ...w, inputValue: h }));
20590
- }, []), l = P((h, w) => {
20590
+ }, []), l = N((h, w) => {
20591
20591
  if (!h) return "";
20592
- const f = h.getDate().toString().padStart(2, "0"), j = (h.getMonth() + 1).toString().padStart(2, "0"), x = h.getFullYear();
20593
- return w.format.replace("dd", f).replace("MM", j).replace("yyyy", x.toString());
20594
- }, []), s = P((h, w) => {
20592
+ const m = h.getDate().toString().padStart(2, "0"), j = (h.getMonth() + 1).toString().padStart(2, "0"), x = h.getFullYear();
20593
+ return w.format.replace("dd", m).replace("MM", j).replace("yyyy", x.toString());
20594
+ }, []), s = N((h, w) => {
20595
20595
  if (!h) return null;
20596
- const f = w.replace("dd", "(\\d{2})").replace("MM", "(\\d{2})").replace("yyyy", "(\\d{4})"), j = new RegExp(`^${f}$`), x = h.match(j);
20596
+ const m = w.replace("dd", "(\\d{2})").replace("MM", "(\\d{2})").replace("yyyy", "(\\d{4})"), j = new RegExp(`^${m}$`), x = h.match(j);
20597
20597
  if (!x) return null;
20598
- const [, v, H, b] = x, V = new Date(parseInt(b), parseInt(H) - 1, parseInt(v));
20599
- return isNaN(V.getTime()) ? null : V;
20600
- }, []), L = P(
20598
+ const [, v, V, b] = x, H = new Date(parseInt(b), parseInt(V) - 1, parseInt(v));
20599
+ return isNaN(H.getTime()) ? null : H;
20600
+ }, []), L = N(
20601
20601
  (h, w) => s(h, w) !== null,
20602
20602
  [s]
20603
- ), p = P(
20603
+ ), p = N(
20604
20604
  (h) => {
20605
20605
  c(h);
20606
20606
  },
20607
20607
  [c]
20608
- ), d = P(() => {
20608
+ ), d = N(() => {
20609
20609
  a(!0);
20610
- }, [a]), C = P(() => {
20610
+ }, [a]), C = N(() => {
20611
20611
  a(!1);
20612
20612
  }, [a]);
20613
20613
  return {
@@ -20622,12 +20622,12 @@ const G8 = (r) => {
20622
20622
  handleInputBlur: C
20623
20623
  };
20624
20624
  }, q8 = (r, o, t, n = 1e3) => {
20625
- const e = o1(null), a = P(
20625
+ const e = o1(null), a = N(
20626
20626
  (s) => {
20627
20627
  e.current && !e.current.contains(s.target) && o();
20628
20628
  },
20629
20629
  [o]
20630
- ), c = P(
20630
+ ), c = N(
20631
20631
  (s) => {
20632
20632
  s.key === "Escape" && o();
20633
20633
  },
@@ -20639,7 +20639,7 @@ const G8 = (r) => {
20639
20639
  document.removeEventListener("mousedown", a), document.removeEventListener("keydown", c);
20640
20640
  };
20641
20641
  }, [r, a, c]);
20642
- const l = P(
20642
+ const l = N(
20643
20643
  (s) => r ? B1(
20644
20644
  f1.createElement(
20645
20645
  "div",
@@ -20679,7 +20679,7 @@ const G8 = (r) => {
20679
20679
  onClick: C,
20680
20680
  onMouseEnter: h,
20681
20681
  onMouseLeave: w,
20682
- className: f = "",
20682
+ className: m = "",
20683
20683
  renderDay: j
20684
20684
  }) => {
20685
20685
  const x = o1(null);
@@ -20687,15 +20687,15 @@ const G8 = (r) => {
20687
20687
  return /* @__PURE__ */ i("div", { className: "ui-h-8 ui-w-8" });
20688
20688
  const v = (O) => {
20689
20689
  O.stopPropagation(), L || C(o);
20690
- }, H = () => {
20690
+ }, V = () => {
20691
20691
  !L && h && (x.current && (clearTimeout(x.current), x.current = null), h(o));
20692
20692
  }, b = () => {
20693
20693
  !L && w && (t || n || e || a ? x.current = setTimeout(() => {
20694
20694
  w(), x.current = null;
20695
20695
  }, 100) : w());
20696
- }, V = () => {
20696
+ }, H = () => {
20697
20697
  let O = `ui-w-8 ui-h-8 ui-flex ui-items-center ui-select-none ui-justify-center ui-font-medium ${!l && !n && !c ? "hover:ui-bg-blue-50 hover:ui-text-blue-500 hover:ui-rounded-lg hover:ui-cursor-pointer" : ""} ui-text-xs ui-transition-colors ui-transition-500`;
20698
- return L ? O += " ui-text-gray-400 ui-cursor-not-allowed" : t ? O += " ui-bg-blue-500 ui-text-white" : e ? O += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-l-lg" : "ui-rounded-r-lg"}` : a ? O += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-r-lg" : "ui-rounded-l-lg"}` : n ? O += " ui-bg-blue-50 ui-text-blue-500" : d ? O += " ui-bg-blue-50" : p ? O += " ui-text-blue-500" : O += "hover:ui-bg-neutral-50", `${O} ${f}`;
20698
+ return L ? O += " ui-text-gray-400 ui-cursor-not-allowed" : t ? O += " ui-bg-blue-500 ui-text-white" : e ? O += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-l-lg" : "ui-rounded-r-lg"}` : a ? O += ` ui-bg-blue-500 ui-text-white ${s ? "ui-rounded-r-lg" : "ui-rounded-l-lg"}` : n ? O += " ui-bg-blue-50 ui-text-blue-500" : d ? O += " ui-bg-blue-50" : p ? O += " ui-text-blue-500" : O += "hover:ui-bg-neutral-50", `${O} ${m}`;
20699
20699
  };
20700
20700
  return j ? j({
20701
20701
  day: r,
@@ -20712,9 +20712,9 @@ const G8 = (r) => {
20712
20712
  }) : /* @__PURE__ */ i(
20713
20713
  "div",
20714
20714
  {
20715
- className: V(),
20715
+ className: H(),
20716
20716
  onClick: v,
20717
- onMouseEnter: H,
20717
+ onMouseEnter: V,
20718
20718
  onMouseLeave: b,
20719
20719
  role: "button",
20720
20720
  tabIndex: L ? -1 : 0,
@@ -20905,13 +20905,13 @@ const G8 = (r) => {
20905
20905
  },
20906
20906
  a,
20907
20907
  c
20908
- ), f = (v) => o ? v.getTime() === o.getTime() : !1, j = (v) => !!(a && v < a || c && v > c), x = C(r, s);
20908
+ ), m = (v) => o ? v.getTime() === o.getTime() : !1, j = (v) => !!(a && v < a || c && v > c), x = C(r, s);
20909
20909
  return /* @__PURE__ */ u("div", { className: "ui-mx-auto ui-grid ui-w-fit ui-grid-cols-7 ui-gap-y-0.5", children: [
20910
- l.map((v, H) => /* @__PURE__ */ i(Q8, { day: v }, H)),
20911
- x.map((v, H) => {
20910
+ l.map((v, V) => /* @__PURE__ */ i(Q8, { day: v }, V)),
20911
+ x.map((v, V) => {
20912
20912
  if (v === null)
20913
- return /* @__PURE__ */ i("div", { className: "ui-h-8 ui-w-8" }, H);
20914
- const b = new Date(r.getFullYear(), r.getMonth(), v), V = t ? w(b, p || null) : {
20913
+ return /* @__PURE__ */ i("div", { className: "ui-h-8 ui-w-8" }, V);
20914
+ const b = new Date(r.getFullYear(), r.getMonth(), v), H = t ? w(b, p || null) : {
20915
20915
  isStart: !1,
20916
20916
  isEnd: !1,
20917
20917
  isInRange: !1,
@@ -20926,22 +20926,22 @@ const G8 = (r) => {
20926
20926
  {
20927
20927
  day: v,
20928
20928
  date: b,
20929
- isSelected: f(b),
20930
- isInRange: V.isInRange,
20931
- isStart: V.isStart,
20932
- isEnd: V.isEnd,
20933
- isFirstInRange: V.isFirstInRange,
20934
- isLastInRange: V.isLastInRange,
20935
- afterSelected: V.afterSelected,
20936
- isDisabled: V.isDisabled,
20929
+ isSelected: m(b),
20930
+ isInRange: H.isInRange,
20931
+ isStart: H.isStart,
20932
+ isEnd: H.isEnd,
20933
+ isFirstInRange: H.isFirstInRange,
20934
+ isLastInRange: H.isLastInRange,
20935
+ afterSelected: H.afterSelected,
20936
+ isDisabled: H.isDisabled,
20937
20937
  isToday: h(b),
20938
- isHovered: V.isHovered,
20938
+ isHovered: H.isHovered,
20939
20939
  onClick: n,
20940
20940
  onMouseEnter: e,
20941
20941
  onMouseLeave: () => e == null ? void 0 : e(null),
20942
20942
  renderDay: d
20943
20943
  },
20944
- H
20944
+ V
20945
20945
  );
20946
20946
  })
20947
20947
  ] });
@@ -21004,12 +21004,12 @@ const G8 = (r) => {
21004
21004
  l
21005
21005
  )) });
21006
21006
  }, n3 = (r) => {
21007
- const { value: o, defaultValue: t, onChange: n, initialValue: e } = r, a = o !== void 0, c = t !== void 0 ? t : e, [l, s] = J(c), L = a ? o : l, p = P(
21007
+ const { value: o, defaultValue: t, onChange: n, initialValue: e } = r, a = o !== void 0, c = t !== void 0 ? t : e, [l, s] = X(c), L = a ? o : l, p = N(
21008
21008
  (C) => {
21009
21009
  a || s(C), n == null || n(C);
21010
21010
  },
21011
21011
  [a, n]
21012
- ), d = P(() => {
21012
+ ), d = N(() => {
21013
21013
  const C = t !== void 0 ? t : e;
21014
21014
  a || s(C), n == null || n(C);
21015
21015
  }, [a, t, e, n]);
@@ -21075,18 +21075,18 @@ const G8 = (r) => {
21075
21075
  isControlled: n,
21076
21076
  inputId: e
21077
21077
  }) => {
21078
- const a = P(() => {
21078
+ const a = N(() => {
21079
21079
  const d = e || "default-input";
21080
21080
  return document.querySelector(`input[data-input-id="${d}"]`);
21081
- }, [e]), c = P(() => {
21081
+ }, [e]), c = N(() => {
21082
21082
  const d = a();
21083
21083
  d == null || d.focus();
21084
- }, [a]), l = P(() => {
21084
+ }, [a]), l = N(() => {
21085
21085
  const d = a();
21086
21086
  d == null || d.blur();
21087
- }, [a]), s = P(() => {
21087
+ }, [a]), s = N(() => {
21088
21088
  t("");
21089
- }, [t]), L = P(() => o, [o]), p = P(
21089
+ }, [t]), L = N(() => o, [o]), p = N(
21090
21090
  (d) => {
21091
21091
  t(d);
21092
21092
  },
@@ -21179,45 +21179,45 @@ const G8 = (r) => {
21179
21179
  disabled: C = !1,
21180
21180
  onValueChange: h,
21181
21181
  onChange: w,
21182
- onClickExtraSlot: f,
21182
+ onClickExtraSlot: m,
21183
21183
  className: j,
21184
21184
  style: x,
21185
21185
  name: v,
21186
- autosize: H = !1,
21186
+ autosize: V = !1,
21187
21187
  colorLeftIcon: b,
21188
- infoTooltip: V = "",
21188
+ infoTooltip: H = "",
21189
21189
  ...O
21190
- }, T) => {
21190
+ }, P) => {
21191
21191
  const {
21192
- value: U,
21193
- setValue: z,
21192
+ value: F,
21193
+ setValue: D,
21194
21194
  isControlled: S
21195
21195
  } = e3({
21196
21196
  value: L,
21197
21197
  defaultValue: d,
21198
21198
  onChange: h
21199
- }), M = (N) => {
21200
- const G = N.target.value;
21201
- z(G), w == null || w(N);
21202
- }, { paddingClasses: g, getIconPosition: k } = i3({
21199
+ }), M = (T) => {
21200
+ const q = T.target.value;
21201
+ D(q), w == null || w(T);
21202
+ }, { paddingClasses: g, getIconPosition: Z } = i3({
21203
21203
  size: n,
21204
21204
  leftSlot: a,
21205
21205
  rightSlot: c,
21206
21206
  extraSlot: l,
21207
21207
  value: L
21208
- }), { baseClasses: y, containerClasses: m, labelClasses: I } = o3({
21208
+ }), { baseClasses: y, containerClasses: f, labelClasses: I } = o3({
21209
21209
  size: n,
21210
21210
  error: o,
21211
21211
  disabled: C,
21212
21212
  fullWidth: p,
21213
21213
  caret: s,
21214
21214
  paddingClasses: g,
21215
- autosize: H
21215
+ autosize: V
21216
21216
  });
21217
21217
  return r3({
21218
- ref: T,
21219
- currentValue: U,
21220
- setValue: z,
21218
+ ref: P,
21219
+ currentValue: F,
21220
+ setValue: D,
21221
21221
  isControlled: S,
21222
21222
  inputId: O.id
21223
21223
  }), /* @__PURE__ */ u(
@@ -21230,29 +21230,29 @@ const G8 = (r) => {
21230
21230
  ),
21231
21231
  style: x,
21232
21232
  children: [
21233
- (r || V) && /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-row ui-items-center ui-gap-1 ui-leading-tight", children: [
21233
+ (r || H) && /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-row ui-items-center ui-gap-1 ui-leading-tight", children: [
21234
21234
  r && /* @__PURE__ */ i("label", { className: I, children: r }),
21235
- V && /* @__PURE__ */ i(
21235
+ H && /* @__PURE__ */ i(
21236
21236
  H1,
21237
21237
  {
21238
21238
  variant: "icon",
21239
21239
  size: "sm",
21240
21240
  color: "white",
21241
21241
  as: "div",
21242
- tooltip: V,
21242
+ tooltip: H,
21243
21243
  clickable: !1,
21244
21244
  pointer: !1,
21245
21245
  icon: "InfoCircleOutlined"
21246
21246
  }
21247
21247
  )
21248
21248
  ] }),
21249
- /* @__PURE__ */ u("div", { className: m, children: [
21249
+ /* @__PURE__ */ u("div", { className: f, children: [
21250
21250
  a && L && /* @__PURE__ */ i(
21251
21251
  b1,
21252
21252
  {
21253
21253
  slot: a,
21254
21254
  colorIcon: b,
21255
- className: `ui-absolute ${k("left")} ui-top-1/2 ui--translate-y-1/2`,
21255
+ className: `ui-absolute ${Z("left")} ui-top-1/2 ui--translate-y-1/2`,
21256
21256
  fallback: (L == null ? void 0 : L.toString().substring(0, 1)) || ""
21257
21257
  }
21258
21258
  ),
@@ -21261,7 +21261,7 @@ const G8 = (r) => {
21261
21261
  {
21262
21262
  placeholder: "Placeholder",
21263
21263
  disabled: C,
21264
- value: U,
21264
+ value: F,
21265
21265
  onChange: M,
21266
21266
  name: v,
21267
21267
  "data-input-id": O.id || "default-input",
@@ -21273,20 +21273,20 @@ const G8 = (r) => {
21273
21273
  b1,
21274
21274
  {
21275
21275
  slot: c,
21276
- className: `ui-absolute ${k("right")} ui-top-1/2 ui--translate-y-1/2`
21276
+ className: `ui-absolute ${Z("right")} ui-top-1/2 ui--translate-y-1/2`
21277
21277
  }
21278
21278
  ),
21279
21279
  c && l && /* @__PURE__ */ i(
21280
21280
  "div",
21281
21281
  {
21282
- className: `ui-absolute ${k("separator")} ui-top-1/2 ui-h-5 ui-w-[1px] ui--translate-y-1/2 ${o ? "ui-bg-red-500" : "ui-bg-neutral-100"}`
21282
+ className: `ui-absolute ${Z("separator")} ui-top-1/2 ui-h-5 ui-w-[1px] ui--translate-y-1/2 ${o ? "ui-bg-red-500" : "ui-bg-neutral-100"}`
21283
21283
  }
21284
21284
  ),
21285
21285
  l && /* @__PURE__ */ i(
21286
21286
  "button",
21287
21287
  {
21288
- onClick: f,
21289
- className: `ui-absolute ${k("extra")} ui-top-1/2 ui-flex ui--translate-y-1/2 ui-place-items-center`,
21288
+ onClick: m,
21289
+ className: `ui-absolute ${Z("extra")} ui-top-1/2 ui-flex ui--translate-y-1/2 ui-place-items-center`,
21290
21290
  type: "button",
21291
21291
  children: /* @__PURE__ */ i(b1, { slot: l })
21292
21292
  }
@@ -21373,7 +21373,7 @@ const t3 = E1(
21373
21373
  const h = a[d.getMonth()], w = d.getFullYear();
21374
21374
  switch (C) {
21375
21375
  case "years":
21376
- const f = s(w, c), j = f[0], x = f[f.length - 1];
21376
+ const m = s(w, c), j = m[0], x = m[m.length - 1];
21377
21377
  return `${j} - ${x}`;
21378
21378
  case "months":
21379
21379
  return `${w}`;
@@ -21443,13 +21443,13 @@ const t3 = E1(
21443
21443
  yearRange: C = 12,
21444
21444
  hoverDate: h,
21445
21445
  onMonthSelect: w,
21446
- onYearSelect: f,
21446
+ onYearSelect: m,
21447
21447
  renderDay: j
21448
21448
  }) => {
21449
21449
  const x = (b) => {
21450
21450
  w == null || w(b);
21451
21451
  }, v = (b) => {
21452
- f == null || f(b);
21452
+ m == null || m(b);
21453
21453
  };
21454
21454
  return /* @__PURE__ */ i("div", { className: "ui-flex ui-h-full ui-justify-center ui-p-3", children: (() => {
21455
21455
  switch (l) {
@@ -21511,7 +21511,7 @@ const t3 = E1(
21511
21511
  onGoToToday: C,
21512
21512
  locale: h = "es-ES",
21513
21513
  weekDays: w = ["D", "L", "M", "M", "J", "V", "S"],
21514
- monthNames: f = [
21514
+ monthNames: m = [
21515
21515
  "Enero",
21516
21516
  "Febrero",
21517
21517
  "Marzo",
@@ -21528,15 +21528,15 @@ const t3 = E1(
21528
21528
  startOfWeek: j = 1,
21529
21529
  showWeekNumbers: x = !1,
21530
21530
  yearRange: v = 12,
21531
- hoverDate: H,
21531
+ hoverDate: V,
21532
21532
  closeOnSelect: b,
21533
- autoCloseRange: V,
21533
+ autoCloseRange: H,
21534
21534
  renderHeader: O,
21535
- renderDay: T
21535
+ renderDay: P
21536
21536
  }) => {
21537
- const U = (k) => {
21538
- L == null || L(k);
21539
- }, z = () => {
21537
+ const F = (Z) => {
21538
+ L == null || L(Z);
21539
+ }, D = () => {
21540
21540
  switch (l) {
21541
21541
  case "days":
21542
21542
  s("months");
@@ -21548,10 +21548,10 @@ const t3 = E1(
21548
21548
  s("days");
21549
21549
  break;
21550
21550
  }
21551
- }, S = (k) => {
21552
- p == null || p(k);
21553
- }, M = (k) => {
21554
- d == null || d(k);
21551
+ }, S = (Z) => {
21552
+ p == null || p(Z);
21553
+ }, M = (Z) => {
21554
+ d == null || d(Z);
21555
21555
  }, g = () => {
21556
21556
  switch (l) {
21557
21557
  case "days":
@@ -21568,8 +21568,8 @@ const t3 = E1(
21568
21568
  weekDays: w,
21569
21569
  startOfWeek: j,
21570
21570
  showWeekNumbers: x,
21571
- hoverDate: H,
21572
- renderDay: T
21571
+ hoverDate: V,
21572
+ renderDay: P
21573
21573
  }
21574
21574
  );
21575
21575
  case "months":
@@ -21579,7 +21579,7 @@ const t3 = E1(
21579
21579
  currentDate: r,
21580
21580
  selectedMonth: r.getMonth(),
21581
21581
  onMonthSelect: S,
21582
- monthNames: f
21582
+ monthNames: m
21583
21583
  }
21584
21584
  );
21585
21585
  case "years":
@@ -21609,10 +21609,10 @@ const t3 = E1(
21609
21609
  {
21610
21610
  currentDate: r,
21611
21611
  viewMode: l,
21612
- onNavigate: U,
21613
- onToggleViewMode: z,
21612
+ onNavigate: F,
21613
+ onToggleViewMode: D,
21614
21614
  onGoToToday: C,
21615
- monthNames: f,
21615
+ monthNames: m,
21616
21616
  renderHeader: O
21617
21617
  }
21618
21618
  ),
@@ -21640,44 +21640,44 @@ const t3 = E1(
21640
21640
  onGoToToday: C,
21641
21641
  viewMode: h,
21642
21642
  minDate: w,
21643
- maxDate: f,
21643
+ maxDate: m,
21644
21644
  locale: j,
21645
21645
  weekDays: x,
21646
21646
  monthNames: v,
21647
- startOfWeek: H,
21647
+ startOfWeek: V,
21648
21648
  showWeekNumbers: b,
21649
- yearRange: V,
21649
+ yearRange: H,
21650
21650
  hoverDate: O,
21651
- closeOnSelect: T,
21652
- autoCloseRange: U,
21653
- calendarsCount: z = 1,
21651
+ closeOnSelect: P,
21652
+ autoCloseRange: F,
21653
+ calendarsCount: D = 1,
21654
21654
  mode: S = "single",
21655
21655
  onClickSelected: M = !1,
21656
21656
  renderHeader: g,
21657
- renderDay: k
21657
+ renderDay: Z
21658
21658
  }) => {
21659
- const [y, m] = J(Array(z).fill(h)), [I, N] = J(() => {
21659
+ const [y, f] = X(Array(D).fill(h)), [I, T] = X(() => {
21660
21660
  const R = [];
21661
- for (let Z = 0; Z < z; Z++) {
21661
+ for (let k = 0; k < D; k++) {
21662
21662
  const B = new Date(n);
21663
- B.setMonth(B.getMonth() + Z), R.push(B);
21663
+ B.setMonth(B.getMonth() + k), R.push(B);
21664
21664
  }
21665
21665
  return R;
21666
- }), { renderPortal: G } = q8(r, o, t, 1100);
21666
+ }), { renderPortal: q } = q8(r, o, t, 1100);
21667
21667
  W(() => {
21668
- m(Array(z).fill(h));
21669
- }, [h, z]), W(() => {
21668
+ f(Array(D).fill(h));
21669
+ }, [h, D]), W(() => {
21670
21670
  const R = [];
21671
- for (let Z = 0; Z < z; Z++) {
21671
+ for (let k = 0; k < D; k++) {
21672
21672
  const B = new Date(n);
21673
- B.setMonth(B.getMonth() + Z), R.push(B);
21673
+ B.setMonth(B.getMonth() + k), R.push(B);
21674
21674
  }
21675
- N(R);
21676
- }, [n, z]);
21677
- const D = (R) => {
21678
- const Z = y[R];
21675
+ T(R);
21676
+ }, [n, D]);
21677
+ const A = (R) => {
21678
+ const k = y[R];
21679
21679
  let B;
21680
- switch (Z) {
21680
+ switch (k) {
21681
21681
  case "days":
21682
21682
  B = "months";
21683
21683
  break;
@@ -21690,27 +21690,27 @@ const t3 = E1(
21690
21690
  default:
21691
21691
  B = "days";
21692
21692
  }
21693
- const A = [...y];
21694
- A[R] = B, m(A);
21695
- }, Q = (R, Z) => {
21693
+ const z = [...y];
21694
+ z[R] = B, f(z);
21695
+ }, K = (R, k) => {
21696
21696
  const B = [...I];
21697
21697
  B[R] = new Date(
21698
21698
  I[R].getFullYear(),
21699
- Z,
21699
+ k,
21700
21700
  1
21701
- ), N(B);
21702
- const A = [...y];
21703
- A[R] = "days", m(A), p == null || p(Z);
21704
- }, X = (R, Z) => {
21701
+ ), T(B);
21702
+ const z = [...y];
21703
+ z[R] = "days", f(z), p == null || p(k);
21704
+ }, Y = (R, k) => {
21705
21705
  const B = [...I];
21706
- B[R] = new Date(Z, I[R].getMonth(), 1), N(B);
21707
- const A = [...y];
21708
- A[R] = "months", m(A), d == null || d(Z);
21709
- }, q = (R) => {
21710
- const Z = [...I];
21711
- Z.forEach((B, A) => {
21706
+ B[R] = new Date(k, I[R].getMonth(), 1), T(B);
21707
+ const z = [...y];
21708
+ z[R] = "months", f(z), d == null || d(k);
21709
+ }, J = (R) => {
21710
+ const k = [...I];
21711
+ k.forEach((B, z) => {
21712
21712
  const e1 = new Date(B);
21713
- switch (y[A]) {
21713
+ switch (y[z]) {
21714
21714
  case "days":
21715
21715
  e1.setMonth(e1.getMonth() + (R === "next" ? 1 : -1));
21716
21716
  break;
@@ -21721,25 +21721,25 @@ const t3 = E1(
21721
21721
  e1.setFullYear(e1.getFullYear() + (R === "next" ? 12 : -12));
21722
21722
  break;
21723
21723
  }
21724
- Z[A] = e1;
21725
- }), N(Z), L(R);
21724
+ k[z] = e1;
21725
+ }), T(k), L(R);
21726
21726
  };
21727
- return G(
21728
- /* @__PURE__ */ i("div", { className: "ui-relative", children: S === "range" && z > 1 ? /* @__PURE__ */ u("div", { className: "ui-overflow-hidden ui-rounded-lg ui-border ui-bg-white ui-shadow-lg", children: [
21727
+ return q(
21728
+ /* @__PURE__ */ i("div", { className: "ui-relative", children: S === "range" && D > 1 ? /* @__PURE__ */ u("div", { className: "ui-overflow-hidden ui-rounded-lg ui-border ui-bg-white ui-shadow-lg", children: [
21729
21729
  /* @__PURE__ */ i(
21730
21730
  u3,
21731
21731
  {
21732
21732
  calendarDates: I,
21733
21733
  viewModes: y,
21734
- onNavigate: q,
21735
- onToggleViewMode: D,
21734
+ onNavigate: J,
21735
+ onToggleViewMode: A,
21736
21736
  onGoToToday: C,
21737
21737
  monthNames: v,
21738
- yearRange: V,
21738
+ yearRange: H,
21739
21739
  renderHeader: g
21740
21740
  }
21741
21741
  ),
21742
- /* @__PURE__ */ i("div", { className: "ui-flex ui-flex-col ui-flex-wrap ui-gap-4 ui-p-4 md:ui-flex-row", children: I.map((R, Z) => /* @__PURE__ */ i("div", { className: "ui-flex-shrink-0", children: /* @__PURE__ */ i("div", { className: "ui-w-full ui-overflow-hidden ui-rounded-lg ui-bg-white", children: /* @__PURE__ */ i(
21742
+ /* @__PURE__ */ i("div", { className: "ui-flex ui-flex-col ui-flex-wrap ui-gap-4 ui-p-4 md:ui-flex-row", children: I.map((R, k) => /* @__PURE__ */ i("div", { className: "ui-flex-shrink-0", children: /* @__PURE__ */ i("div", { className: "ui-w-full ui-overflow-hidden ui-rounded-lg ui-bg-white", children: /* @__PURE__ */ i(
21743
21743
  a3,
21744
21744
  {
21745
21745
  currentDate: R,
@@ -21748,19 +21748,19 @@ const t3 = E1(
21748
21748
  onDateSelect: c,
21749
21749
  onDateHover: l,
21750
21750
  minDate: w,
21751
- maxDate: f,
21752
- viewMode: y[Z],
21751
+ maxDate: m,
21752
+ viewMode: y[k],
21753
21753
  weekDays: x,
21754
21754
  monthNames: v,
21755
- startOfWeek: H,
21755
+ startOfWeek: V,
21756
21756
  showWeekNumbers: b,
21757
- yearRange: V,
21757
+ yearRange: H,
21758
21758
  hoverDate: O,
21759
- onMonthSelect: (B) => Q(Z, B),
21760
- onYearSelect: (B) => X(Z, B),
21761
- renderDay: k
21759
+ onMonthSelect: (B) => K(k, B),
21760
+ onYearSelect: (B) => Y(k, B),
21761
+ renderDay: Z
21762
21762
  }
21763
- ) }) }, Z)) }),
21763
+ ) }) }, k)) }),
21764
21764
  /* @__PURE__ */ u("div", { className: "ui-flex ui-justify-end ui-gap-2 ui-border-t ui-border-neutral-100 ui-p-3", children: [
21765
21765
  /* @__PURE__ */ i(t1, { variant: "outlined", size: "md", color: "white", children: "Cancelar" }),
21766
21766
  /* @__PURE__ */ i(t1, { size: "md", children: "Aceptar" })
@@ -21774,7 +21774,7 @@ const t3 = E1(
21774
21774
  onDateSelect: c,
21775
21775
  onDateHover: l,
21776
21776
  minDate: w,
21777
- maxDate: f,
21777
+ maxDate: m,
21778
21778
  viewMode: h,
21779
21779
  onViewModeChange: s,
21780
21780
  onNavigate: L,
@@ -21784,14 +21784,14 @@ const t3 = E1(
21784
21784
  locale: j,
21785
21785
  weekDays: x,
21786
21786
  monthNames: v,
21787
- startOfWeek: H,
21787
+ startOfWeek: V,
21788
21788
  showWeekNumbers: b,
21789
- yearRange: V,
21789
+ yearRange: H,
21790
21790
  hoverDate: O,
21791
- closeOnSelect: T,
21792
- autoCloseRange: U,
21791
+ closeOnSelect: P,
21792
+ autoCloseRange: F,
21793
21793
  renderHeader: g,
21794
- renderDay: k
21794
+ renderDay: Z
21795
21795
  }
21796
21796
  ) })
21797
21797
  );
@@ -21824,96 +21824,96 @@ const t3 = E1(
21824
21824
  className: C = "",
21825
21825
  inputClassName: h = "",
21826
21826
  headerClassName: w = "",
21827
- dayClassName: f = "",
21827
+ dayClassName: m = "",
21828
21828
  monthClassName: j = "",
21829
21829
  yearClassName: x = "",
21830
21830
  disabledDayClassName: v = "text-gray-400 cursor-not-allowed",
21831
- rangeClassName: H = "bg-blue-100",
21831
+ rangeClassName: V = "bg-blue-100",
21832
21832
  rangeStartClassName: b = "bg-blue-500 text-white rounded-l-full",
21833
- rangeEndClassName: V = "bg-blue-500 text-white rounded-r-full",
21833
+ rangeEndClassName: H = "bg-blue-500 text-white rounded-r-full",
21834
21834
  todayClassName: O = "border border-blue-500",
21835
- showWeekNumbers: T = !1,
21836
- yearRange: U = 12,
21837
- initialViewMode: z = "days",
21835
+ showWeekNumbers: P = !1,
21836
+ yearRange: F = 12,
21837
+ initialViewMode: D = "days",
21838
21838
  closeOnSelect: S = !1,
21839
21839
  autoCloseRange: M = !0,
21840
21840
  placeholder: g = "Seleccionar fecha",
21841
- format: k = "dd/MM/yyyy",
21841
+ format: Z = "dd/MM/yyyy",
21842
21842
  calendarsCount: y = 1,
21843
- renderHeader: m,
21843
+ renderHeader: f,
21844
21844
  renderDay: I
21845
- } = r, { state: N, selectedDate: G, selectedRange: D, inputRef: Q, isPortalReady: X, actions: q } = G8(r), { handleRangeSelection: R } = c0(
21846
- D,
21847
- q.setSelectedRange,
21845
+ } = r, { state: T, selectedDate: q, selectedRange: A, inputRef: K, isPortalReady: Y, actions: J } = G8(r), { handleRangeSelection: R } = c0(
21846
+ A,
21847
+ J.setSelectedRange,
21848
21848
  c,
21849
21849
  l,
21850
21850
  M
21851
- ), Z = (F) => {
21852
- if (!F || !(F instanceof Date) || isNaN(F.getTime()))
21851
+ ), k = (U) => {
21852
+ if (!U || !(U instanceof Date) || isNaN(U.getTime()))
21853
21853
  return "";
21854
- const i1 = F.getDate().toString().padStart(2, "0"), $ = (F.getMonth() + 1).toString().padStart(2, "0"), Y = F.getFullYear();
21855
- return k.replace("dd", i1).replace("MM", $).replace("yyyy", Y.toString());
21856
- }, B = (F) => {
21857
- if (!F || !F.start && !F.end) return "";
21858
- const i1 = F.start && F.start instanceof Date && !isNaN(F.start.getTime()), $ = F.end && F.end instanceof Date && !isNaN(F.end.getTime());
21859
- return i1 && $ ? `${Z(F.start)} - ${Z(F.end)}` : i1 ? Z(F.start) : $ ? Z(F.end) : "";
21860
- }, A = (F) => {
21861
- if (!F || !(F instanceof Date) || isNaN(F.getTime())) {
21862
- console.warn("DatePicker: Se recibió una fecha inválida:", F);
21854
+ const i1 = U.getDate().toString().padStart(2, "0"), $ = (U.getMonth() + 1).toString().padStart(2, "0"), G = U.getFullYear();
21855
+ return Z.replace("dd", i1).replace("MM", $).replace("yyyy", G.toString());
21856
+ }, B = (U) => {
21857
+ if (!U || !U.start && !U.end) return "";
21858
+ const i1 = U.start && U.start instanceof Date && !isNaN(U.start.getTime()), $ = U.end && U.end instanceof Date && !isNaN(U.end.getTime());
21859
+ return i1 && $ ? `${k(U.start)} - ${k(U.end)}` : i1 ? k(U.start) : $ ? k(U.end) : "";
21860
+ }, z = (U) => {
21861
+ if (!U || !(U instanceof Date) || isNaN(U.getTime())) {
21862
+ console.warn("DatePicker: Se recibió una fecha inválida:", U);
21863
21863
  return;
21864
21864
  }
21865
- o === "single" ? q.setSelectedDate(F) : R(F, N.hoverDate, q.closePicker);
21866
- }, e1 = (F) => {
21867
- if (F !== null && (!(F instanceof Date) || isNaN(F.getTime()))) {
21868
- console.warn("DatePicker: Se recibió una fecha inválida en hover:", F);
21865
+ o === "single" ? J.setSelectedDate(U) : R(U, T.hoverDate, J.closePicker);
21866
+ }, e1 = (U) => {
21867
+ if (U !== null && (!(U instanceof Date) || isNaN(U.getTime()))) {
21868
+ console.warn("DatePicker: Se recibió una fecha inválida en hover:", U);
21869
21869
  return;
21870
21870
  }
21871
- q.setHoverDate(F);
21872
- }, u1 = () => o === "single" ? Z(G) : B(D);
21871
+ J.setHoverDate(U);
21872
+ }, u1 = () => o === "single" ? k(q) : B(A);
21873
21873
  return /* @__PURE__ */ u("div", { className: `relative ${C}`, children: [
21874
21874
  /* @__PURE__ */ i(
21875
21875
  t3,
21876
21876
  {
21877
- ref: Q,
21877
+ ref: K,
21878
21878
  value: u1(),
21879
21879
  placeholder: g,
21880
- isOpen: N.isOpen,
21881
- onInputClick: q.openPicker,
21880
+ isOpen: T.isOpen,
21881
+ onInputClick: J.openPicker,
21882
21882
  className: h,
21883
- format: k
21883
+ format: Z
21884
21884
  }
21885
21885
  ),
21886
21886
  /* @__PURE__ */ i(
21887
21887
  d3,
21888
21888
  {
21889
- isOpen: N.isOpen && X,
21890
- onClose: q.closePicker,
21891
- portalPosition: N.portalPosition,
21892
- currentDate: N.currentDate,
21893
- selectedDate: G,
21894
- selectedRange: D,
21895
- onDateSelect: A,
21889
+ isOpen: T.isOpen && Y,
21890
+ onClose: J.closePicker,
21891
+ portalPosition: T.portalPosition,
21892
+ currentDate: T.currentDate,
21893
+ selectedDate: q,
21894
+ selectedRange: A,
21895
+ onDateSelect: z,
21896
21896
  onDateHover: e1,
21897
- onViewModeChange: q.setViewMode,
21898
- onNavigate: q.navigate,
21899
- onMonthSelect: q.handleMonthSelect,
21900
- onYearSelect: q.handleYearSelect,
21901
- onGoToToday: q.goToToday,
21902
- viewMode: N.viewMode,
21897
+ onViewModeChange: J.setViewMode,
21898
+ onNavigate: J.navigate,
21899
+ onMonthSelect: J.handleMonthSelect,
21900
+ onYearSelect: J.handleYearSelect,
21901
+ onGoToToday: J.goToToday,
21902
+ viewMode: T.viewMode,
21903
21903
  minDate: c,
21904
21904
  maxDate: l,
21905
21905
  locale: s,
21906
21906
  weekDays: L,
21907
21907
  monthNames: p,
21908
21908
  startOfWeek: d,
21909
- showWeekNumbers: T,
21910
- yearRange: U,
21911
- hoverDate: N.hoverDate,
21909
+ showWeekNumbers: P,
21910
+ yearRange: F,
21911
+ hoverDate: T.hoverDate,
21912
21912
  closeOnSelect: S,
21913
21913
  autoCloseRange: M,
21914
21914
  calendarsCount: y,
21915
21915
  mode: o,
21916
- renderHeader: m,
21916
+ renderHeader: f,
21917
21917
  renderDay: I
21918
21918
  }
21919
21919
  )
@@ -21922,7 +21922,7 @@ const t3 = E1(
21922
21922
  t && /* @__PURE__ */ i(j1, { name: t, background: !0, color: "blue" }),
21923
21923
  /* @__PURE__ */ i("h2", { className: _("ui-text-2xl ui-font-bold", o), children: r })
21924
21924
  ] }), h0 = (r, o = {}) => {
21925
- const { enterDelay: t = 10, exitDelay: n = 300 } = o, [e, a] = J(!1), [c, l] = J(!1);
21925
+ const { enterDelay: t = 10, exitDelay: n = 300 } = o, [e, a] = X(!1), [c, l] = X(!1);
21926
21926
  return W(() => {
21927
21927
  if (r) {
21928
21928
  a(!0);
@@ -21977,7 +21977,7 @@ const t3 = E1(
21977
21977
  });
21978
21978
  }, [r, o]);
21979
21979
  }, f0 = () => {
21980
- const r = typeof window < "u", [o] = J(() => r ? document.createElement("div") : null);
21980
+ const r = typeof window < "u", [o] = X(() => r ? document.createElement("div") : null);
21981
21981
  return W(() => {
21982
21982
  if (!(!o || !r))
21983
21983
  return document.body.appendChild(o), () => {
@@ -22010,9 +22010,9 @@ const t3 = E1(
22010
22010
  W(() => {
22011
22011
  if (!r || o || !c) return;
22012
22012
  const L = (d) => {
22013
- var v, H;
22014
- const C = d.target, h = (v = t.current) == null ? void 0 : v.contains(C), w = (H = n == null ? void 0 : n.current) == null ? void 0 : H.contains(C), f = e ? C.closest(`[data-${a}-id="${e}"]`) : !1, j = a ? C.closest(`[data-${a}-container-id]`) : !1, x = l.some((b) => C.closest(b));
22015
- h || w || f || j || x || s();
22013
+ var v, V;
22014
+ const C = d.target, h = (v = t.current) == null ? void 0 : v.contains(C), w = (V = n == null ? void 0 : n.current) == null ? void 0 : V.contains(C), m = e ? C.closest(`[data-${a}-id="${e}"]`) : !1, j = a ? C.closest(`[data-${a}-container-id]`) : !1, x = l.some((b) => C.closest(b));
22015
+ h || w || m || j || x || s();
22016
22016
  }, p = (d) => {
22017
22017
  d.detail.id === e && s();
22018
22018
  };
@@ -22051,23 +22051,23 @@ const t3 = E1(
22051
22051
  successButtonText: h = "Guardar",
22052
22052
  onCancel: w = () => {
22053
22053
  },
22054
- onSuccess: f = () => {
22054
+ onSuccess: m = () => {
22055
22055
  },
22056
22056
  showCancelButton: j = !0,
22057
22057
  showSuccessButton: x = !0,
22058
22058
  closeAtSuccess: v = !1,
22059
- closeAtCancel: H = !0,
22059
+ closeAtCancel: V = !0,
22060
22060
  disabledSuccessButton: b = !1,
22061
- disabledCancelButton: V = !1
22061
+ disabledCancelButton: H = !1
22062
22062
  }) => {
22063
- const O = f0(), { isVisible: T, isAnimating: U } = h0(r), z = o1(null);
22064
- w0(r), W1(r, o, l), g0(r, z, !s);
22063
+ const O = f0(), { isVisible: P, isAnimating: F } = h0(r), D = o1(null);
22064
+ w0(r), W1(r, o, l), g0(r, D, !s);
22065
22065
  const S = () => {
22066
- w && w(), H && o();
22066
+ w && w(), V && o();
22067
22067
  }, M = () => {
22068
- f && f(), v && o();
22068
+ m && m(), v && o();
22069
22069
  };
22070
- if (!O || !T) return null;
22070
+ if (!O || !P) return null;
22071
22071
  const g = /* @__PURE__ */ u(
22072
22072
  "div",
22073
22073
  {
@@ -22088,16 +22088,16 @@ const t3 = E1(
22088
22088
  /* @__PURE__ */ i(
22089
22089
  "div",
22090
22090
  {
22091
- ref: z,
22091
+ ref: D,
22092
22092
  tabIndex: -1,
22093
- onClick: (k) => k.stopPropagation(),
22093
+ onClick: (Z) => Z.stopPropagation(),
22094
22094
  className: _(
22095
22095
  "ui-relative ui-z-10 ui-flex ui-flex-col ui-bg-white ui-shadow-xl ui-outline-none ui-transition-transform ui-duration-300 ui-ease-in-out",
22096
22096
  C3[n],
22097
22097
  L === "right" ? "ui-ml-auto" : "ui-mr-auto"
22098
22098
  ),
22099
22099
  style: {
22100
- transform: L === "right" ? U ? "translateX(0)" : "translateX(100%)" : U ? "translateX(0)" : "translateX(-100%)"
22100
+ transform: L === "right" ? F ? "translateX(0)" : "translateX(100%)" : F ? "translateX(0)" : "translateX(-100%)"
22101
22101
  },
22102
22102
  children: /* @__PURE__ */ u(g1, { rounded: !1, padding: !1, gap: !1, className: _(p), children: [
22103
22103
  /* @__PURE__ */ i(g1.Header, { children: /* @__PURE__ */ i("div", { className: "ui-flex ui-items-center ui-justify-between ui-p-4", children: t && /* @__PURE__ */ i(s3, { title: t, icon: a }) }) }),
@@ -22114,7 +22114,7 @@ const t3 = E1(
22114
22114
  (j || x) && /* @__PURE__ */ u(k1, { children: [
22115
22115
  /* @__PURE__ */ i(g1.Separator, { padding: !1 }),
22116
22116
  /* @__PURE__ */ u(g1.Footer, { className: "ui-flex ui-items-center ui-justify-end ui-gap-x-4 ui-p-4", children: [
22117
- j && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "outlined", color: "white", onClick: S, disabled: V, children: C }),
22117
+ j && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "outlined", color: "white", onClick: S, disabled: H, children: C }),
22118
22118
  x && /* @__PURE__ */ i(H1, { fullWidth: !0, variant: "button", onClick: M, disabled: b, children: h })
22119
22119
  ] })
22120
22120
  ] })
@@ -22138,7 +22138,7 @@ const t3 = E1(
22138
22138
  }) => {
22139
22139
  const L = (w) => {
22140
22140
  n || t == null || t(w);
22141
- }, [p, d] = J(!1), C = c1(
22141
+ }, [p, d] = X(!1), C = c1(
22142
22142
  "ui-flex ui-items-center ui-gap-x-4 ui-text-sm ui-transition-all duration-300 ui-font-semibold ui-px-4 ui-h-8 ui-py-1",
22143
22143
  {
22144
22144
  variants: {
@@ -22198,7 +22198,7 @@ const t3 = E1(
22198
22198
  iconColor: l,
22199
22199
  checkboxProps: s
22200
22200
  }) => {
22201
- const [L, p] = J(!1), d = c1(
22201
+ const [L, p] = X(!1), d = c1(
22202
22202
  "ui-flex ui-items-center ui-gap-x-4 ui-text-sm ui-transition-all duration-300 ui-font-semibold ui-px-4 ui-h-8 ui-py-1",
22203
22203
  {
22204
22204
  variants: {
@@ -22323,60 +22323,60 @@ const t3 = E1(
22323
22323
  absolute: h = !1,
22324
22324
  onOpenChange: w
22325
22325
  }) => {
22326
- const f = a0(), j = L || `dropdown-${f}`, [x, v] = J(!1), [H, b] = J(!1), [V, O] = J(""), [T, U] = J("bottom"), [z, S] = J({}), M = o1(null), g = o1(null), k = o1(null), y = P(
22326
+ const m = a0(), j = L || `dropdown-${m}`, [x, v] = X(!1), [V, b] = X(!1), [H, O] = X(""), [P, F] = X("bottom"), [D, S] = X({}), M = o1(null), g = o1(null), Z = o1(null), y = N(
22327
22327
  ($) => $ == null ? [] : Array.isArray($) ? $ : [$],
22328
22328
  []
22329
- ), m = P(
22329
+ ), f = N(
22330
22330
  ($) => $ == null || $ === "" ? "" : Array.isArray($) ? $[0] || "" : $,
22331
22331
  []
22332
- ), [I, N] = J(() => d ? y(o) : m(o)), G = r !== void 0, D = G ? r : I, Q = P(
22332
+ ), [I, T] = X(() => d ? y(o) : f(o)), q = r !== void 0, A = q ? r : I, K = N(
22333
22333
  ($) => {
22334
- G || N($), a == null || a($);
22334
+ q || T($), a == null || a($);
22335
22335
  },
22336
- [G, a]
22336
+ [q, a]
22337
22337
  );
22338
22338
  W(() => {
22339
- if (G && r !== void 0)
22339
+ if (q && r !== void 0)
22340
22340
  if (d) {
22341
22341
  const $ = y(r);
22342
- N((Y) => JSON.stringify(Y) !== JSON.stringify($) ? $ : Y);
22342
+ T((G) => JSON.stringify(G) !== JSON.stringify($) ? $ : G);
22343
22343
  } else {
22344
- const $ = m(r);
22345
- N((Y) => Y !== $ ? $ : Y);
22344
+ const $ = f(r);
22345
+ T((G) => G !== $ ? $ : G);
22346
22346
  }
22347
- }, [r, G, d, y, m]);
22348
- const X = d ? t.filter(($) => y(D).includes($[e])) : [
22349
- t.find(($) => D === "" || D === null || D === void 0 ? !1 : $[e] === -1 ? D === -1 || D === "-1" : $[e] === D)
22350
- ].filter(Boolean), q = t.filter(($) => {
22351
- const Y = l ? $[n].toLowerCase().includes(V.toLowerCase()) : !0;
22347
+ }, [r, q, d, y, f]);
22348
+ const Y = d ? t.filter(($) => y(A).includes($[e])) : [
22349
+ t.find(($) => A === "" || A === null || A === void 0 ? !1 : $[e] === -1 ? A === -1 || A === "-1" : $[e] === A)
22350
+ ].filter(Boolean), J = t.filter(($) => {
22351
+ const G = l ? $[n].toLowerCase().includes(H.toLowerCase()) : !0;
22352
22352
  if (d) {
22353
- const r1 = y(D).includes($[e]);
22354
- return Y && !r1;
22353
+ const r1 = y(A).includes($[e]);
22354
+ return G && !r1;
22355
22355
  }
22356
- return $[e] === -1 && (D === -1 || D === "-1") ? !1 : Y;
22357
- }), R = P(() => {
22356
+ return $[e] === -1 && (A === -1 || A === "-1") ? !1 : G;
22357
+ }), R = N(() => {
22358
22358
  var r1, n1;
22359
- const $ = (r1 = k.current) == null ? void 0 : r1.querySelector("input");
22360
- return $ || ((n1 = k.current) == null ? void 0 : n1.querySelector(
22359
+ const $ = (r1 = Z.current) == null ? void 0 : r1.querySelector("input");
22360
+ return $ || ((n1 = Z.current) == null ? void 0 : n1.querySelector(
22361
22361
  '[data-dropdown-input="true"]'
22362
22362
  ));
22363
- }, []), Z = P(() => {
22363
+ }, []), k = N(() => {
22364
22364
  const $ = R();
22365
22365
  $ && requestAnimationFrame(() => {
22366
22366
  var $1;
22367
- const Y = $.getBoundingClientRect(), r1 = window.innerHeight;
22367
+ const G = $.getBoundingClientRect(), r1 = window.innerHeight;
22368
22368
  let n1 = 0;
22369
- g.current && (n1 = g.current.offsetHeight), n1 === 0 && (n1 = Math.min(200, q.length * 40));
22370
- const p1 = r1 - Y.bottom, s1 = Y.top, d1 = p1 < n1 && s1 > p1 ? "top" : "bottom";
22371
- U(d1);
22372
- let a1 = 0, x1 = 0, S1 = Y.width;
22369
+ g.current && (n1 = g.current.offsetHeight), n1 === 0 && (n1 = Math.min(200, J.length * 40));
22370
+ const p1 = r1 - G.bottom, s1 = G.top, d1 = p1 < n1 && s1 > p1 ? "top" : "bottom";
22371
+ F(d1);
22372
+ let a1 = 0, x1 = 0, S1 = G.width;
22373
22373
  if (!h)
22374
- d1 === "bottom" ? a1 = Y.bottom + 4 : a1 = Y.top - n1 - 4, x1 = Y.left;
22374
+ d1 === "bottom" ? a1 = G.bottom + 4 : a1 = G.top - n1 - 4, x1 = G.left;
22375
22375
  else {
22376
- const h1 = ($1 = k.current) == null ? void 0 : $1.getBoundingClientRect();
22376
+ const h1 = ($1 = Z.current) == null ? void 0 : $1.getBoundingClientRect();
22377
22377
  if (!h1) return;
22378
- const I1 = Y.top - h1.top, y1 = Y.left - h1.left;
22379
- d1 === "bottom" ? a1 = I1 + Y.height + 4 : a1 = I1 - n1 - 4, x1 = y1;
22378
+ const I1 = G.top - h1.top, y1 = G.left - h1.left;
22379
+ d1 === "bottom" ? a1 = I1 + G.height + 4 : a1 = I1 - n1 - 4, x1 = y1;
22380
22380
  }
22381
22381
  const m1 = 1100, L1 = parseInt(j.replace(/\D/g, "")) || 0, Z1 = m1 + L1 % 100, _1 = {
22382
22382
  position: h ? "absolute" : "fixed",
@@ -22387,28 +22387,28 @@ const t3 = E1(
22387
22387
  };
22388
22388
  S(_1);
22389
22389
  });
22390
- }, [R, q.length, j, h]), B = P(() => {
22391
- if (!g.current || !X.length)
22390
+ }, [R, J.length, j, h]), B = N(() => {
22391
+ if (!g.current || !Y.length)
22392
22392
  return;
22393
- const Y = g.current.querySelector(".ui-overflow-y-auto");
22394
- if (!Y)
22393
+ const G = g.current.querySelector(".ui-overflow-y-auto");
22394
+ if (!G)
22395
22395
  return;
22396
- const r1 = X[0];
22396
+ const r1 = Y[0];
22397
22397
  if (!r1) return;
22398
- const n1 = Y.querySelector(
22398
+ const n1 = G.querySelector(
22399
22399
  `[data-option-value="${r1[e]}"]`
22400
22400
  );
22401
22401
  if (!n1)
22402
22402
  return;
22403
- const p1 = Y.clientHeight, s1 = n1.offsetTop, d1 = n1.clientHeight, a1 = s1 - p1 / 2 + d1 / 2;
22404
- Y.scrollTo({
22403
+ const p1 = G.clientHeight, s1 = n1.offsetTop, d1 = n1.clientHeight, a1 = s1 - p1 / 2 + d1 / 2;
22404
+ G.scrollTo({
22405
22405
  top: Math.max(0, a1),
22406
22406
  behavior: "smooth"
22407
22407
  });
22408
- }, [X, n]), A = ($) => {
22409
- $ && $.stopPropagation(), !p && (x ? e1() : (L3(j), O(""), b(!1), Z(), setTimeout(() => {
22408
+ }, [Y, n]), z = ($) => {
22409
+ $ && $.stopPropagation(), !p && (x ? e1() : (L3(j), O(""), b(!1), k(), setTimeout(() => {
22410
22410
  v(!0), J1.add(j), setTimeout(() => {
22411
- Z(), setTimeout(() => {
22411
+ k(), setTimeout(() => {
22412
22412
  B();
22413
22413
  }, 50);
22414
22414
  }, 50);
@@ -22417,24 +22417,24 @@ const t3 = E1(
22417
22417
  b(!0), setTimeout(() => {
22418
22418
  v(!1), b(!1), J1.delete(j);
22419
22419
  }, 150);
22420
- }, u1 = ($, Y) => {
22421
- if (Y.stopPropagation(), !$.disabled) {
22420
+ }, u1 = ($, G) => {
22421
+ if (G.stopPropagation(), !$.disabled) {
22422
22422
  if (d) {
22423
- const r1 = y(D), n1 = $[e];
22423
+ const r1 = y(A), n1 = $[e];
22424
22424
  if (C && r1.length >= C && !r1.includes(n1))
22425
22425
  return;
22426
22426
  const p1 = r1.includes(n1) ? r1.filter((s1) => s1 !== n1) : [...r1, n1];
22427
- Q(p1);
22427
+ K(p1);
22428
22428
  } else {
22429
22429
  const r1 = $[e] === -1 ? -1 : $[e];
22430
- Q(r1), O(""), e1();
22430
+ K(r1), O(""), e1();
22431
22431
  }
22432
22432
  c == null || c($);
22433
22433
  }
22434
- }, F = ($) => {
22434
+ }, U = ($) => {
22435
22435
  O($.target.value);
22436
22436
  }, i1 = ($) => {
22437
- $.stopPropagation(), Q(d ? [] : ""), O("");
22437
+ $.stopPropagation(), K(d ? [] : ""), O("");
22438
22438
  };
22439
22439
  return W(() => {
22440
22440
  w == null || w(x);
@@ -22443,7 +22443,7 @@ const t3 = E1(
22443
22443
  // Simplificar condición para mejorar detección
22444
22444
  disabled: p,
22445
22445
  elementRef: g,
22446
- containerRef: k,
22446
+ containerRef: Z,
22447
22447
  elementId: j,
22448
22448
  elementType: "dropdown",
22449
22449
  closeOnClickOutside: s,
@@ -22455,39 +22455,39 @@ const t3 = E1(
22455
22455
  }), W(() => {
22456
22456
  if (x) {
22457
22457
  const $ = () => {
22458
- Z();
22459
- }, Y = () => {
22460
- x && !H && Z();
22458
+ k();
22459
+ }, G = () => {
22460
+ x && !V && k();
22461
22461
  };
22462
- return window.addEventListener("resize", $), window.addEventListener("scroll", Y, !1), document.addEventListener("scroll", Y, !1), () => {
22463
- window.removeEventListener("resize", $), window.removeEventListener("scroll", Y, !1), document.removeEventListener("scroll", Y, !1);
22462
+ return window.addEventListener("resize", $), window.addEventListener("scroll", G, !1), document.addEventListener("scroll", G, !1), () => {
22463
+ window.removeEventListener("resize", $), window.removeEventListener("scroll", G, !1), document.removeEventListener("scroll", G, !1);
22464
22464
  };
22465
22465
  }
22466
- }, [x, Z, H]), {
22466
+ }, [x, k, V]), {
22467
22467
  // Estado
22468
22468
  isOpen: x,
22469
- isClosing: H,
22470
- searchValue: V,
22471
- selectedValue: D,
22472
- selectedOptions: X,
22473
- filteredOptions: q,
22474
- position: T,
22475
- dropdownStyle: z,
22476
- isControlled: G,
22469
+ isClosing: V,
22470
+ searchValue: H,
22471
+ selectedValue: A,
22472
+ selectedOptions: Y,
22473
+ filteredOptions: J,
22474
+ position: P,
22475
+ dropdownStyle: D,
22476
+ isControlled: q,
22477
22477
  multiple: d,
22478
22478
  // Referencias
22479
22479
  inputRef: M,
22480
22480
  dropdownRef: g,
22481
- containerRef: k,
22481
+ containerRef: Z,
22482
22482
  dropdownUniqueId: j,
22483
22483
  // Funciones
22484
- toggleDropdown: A,
22484
+ toggleDropdown: z,
22485
22485
  closeDropdown: e1,
22486
22486
  handleOptionSelect: u1,
22487
- handleSearchChange: F,
22487
+ handleSearchChange: U,
22488
22488
  handleClear: i1,
22489
- calculatePosition: Z,
22490
- setValue: Q,
22489
+ calculatePosition: k,
22490
+ setValue: K,
22491
22491
  scrollToSelectedOption: B,
22492
22492
  normalizeToArray: y
22493
22493
  };
@@ -22537,25 +22537,25 @@ const t3 = E1(
22537
22537
  valueName: h,
22538
22538
  idName: w
22539
22539
  }) => {
22540
- const [f, j] = J(!1), [x, v] = J(null), H = o1(null);
22540
+ const [m, j] = X(!1), [x, v] = X(null), V = o1(null);
22541
22541
  return W(() => {
22542
- if (!H.current || t.length === 0) {
22542
+ if (!V.current || t.length === 0) {
22543
22543
  j(!1), v(null);
22544
22544
  return;
22545
22545
  }
22546
- const V = setTimeout(() => {
22547
- const O = H.current;
22546
+ const H = setTimeout(() => {
22547
+ const O = V.current;
22548
22548
  if (O) {
22549
- const T = O.scrollHeight, U = O.clientHeight;
22549
+ const P = O.scrollHeight, F = O.clientHeight;
22550
22550
  if (x === null) {
22551
- v(U);
22551
+ v(F);
22552
22552
  return;
22553
22553
  }
22554
- const z = T > x;
22555
- j(z);
22554
+ const D = P > x;
22555
+ j(D);
22556
22556
  }
22557
22557
  }, 100);
22558
- return () => clearTimeout(V);
22558
+ return () => clearTimeout(H);
22559
22559
  }, [t.length, x]), // Input personalizado con tags para modo tags
22560
22560
  /* @__PURE__ */ u("div", { className: "ui-w-full", children: [
22561
22561
  r && /* @__PURE__ */ i("label", { className: "ui-mb-1 ui-block ui-text-sm ui-font-bold ui-text-gray-700", children: r }),
@@ -22564,7 +22564,7 @@ const t3 = E1(
22564
22564
  {
22565
22565
  ref: s,
22566
22566
  "data-dropdown-input": "true",
22567
- className: `ui-flex ui-min-h-[32px] ui-cursor-pointer ui-items-center ui-gap-1 ui-rounded-md ui-border ui-border-gray-300 ui-bg-white ui-px-2 ${f ? "ui-py-2" : "ui-py-0.5"} ui-transition-[padding] ui-duration-150 ui-ease-out focus-within:ui-border-blue-500 focus-within:ui-ring-2 focus-within:ui-ring-blue-200 hover:ui-border-gray-400`,
22567
+ className: `ui-flex ui-min-h-[32px] ui-cursor-pointer ui-items-center ui-gap-1 ui-rounded-md ui-border ui-border-gray-300 ui-bg-white ui-px-2 ${m ? "ui-py-2" : "ui-py-0.5"} ui-transition-[padding] ui-duration-150 ui-ease-out focus-within:ui-border-blue-500 focus-within:ui-ring-2 focus-within:ui-ring-blue-200 hover:ui-border-gray-400`,
22568
22568
  onClick: (b) => {
22569
22569
  c || e(b);
22570
22570
  },
@@ -22576,8 +22576,8 @@ const t3 = E1(
22576
22576
  t.length > 0 ? /* @__PURE__ */ i(
22577
22577
  "div",
22578
22578
  {
22579
- ref: H,
22580
- className: `ui-flex ui-flex-wrap ui-gap-1 ${f ? "ui-max-h-auto" : "ui-max-h-[40px]"} ui-overflow-hidden`,
22579
+ ref: V,
22580
+ className: `ui-flex ui-flex-wrap ui-gap-1 ${m ? "ui-max-h-auto" : "ui-max-h-[40px]"} ui-overflow-hidden`,
22581
22581
  children: t.map((b) => b ? /* @__PURE__ */ i(
22582
22582
  v0,
22583
22583
  {
@@ -22585,8 +22585,8 @@ const t3 = E1(
22585
22585
  label: b[h],
22586
22586
  color: "blue",
22587
22587
  size: "xs",
22588
- onClick: (V) => {
22589
- V.stopPropagation(), n(b[w]);
22588
+ onClick: (H) => {
22589
+ H.stopPropagation(), n(b[w]);
22590
22590
  }
22591
22591
  },
22592
22592
  b[h]
@@ -22629,43 +22629,43 @@ const t3 = E1(
22629
22629
  value: C,
22630
22630
  defaultValue: h = "",
22631
22631
  disabled: w = !1,
22632
- placeholder: f = "",
22632
+ placeholder: m = "",
22633
22633
  options: j = [],
22634
22634
  valueName: x = "label",
22635
22635
  idName: v = "value",
22636
- onValueChange: H,
22636
+ onValueChange: V,
22637
22637
  onOptionSelect: b,
22638
- onCheckboxChange: V,
22638
+ onCheckboxChange: H,
22639
22639
  searchable: O = !1,
22640
- maxHeight: T = "200px",
22641
- closeOnClickOutside: U = !0,
22642
- dropdownId: z,
22640
+ maxHeight: P = "200px",
22641
+ closeOnClickOutside: F = !0,
22642
+ dropdownId: D,
22643
22643
  multiple: S = !1,
22644
22644
  maxSelectedItems: M,
22645
22645
  selectedItemsDisplay: g = "tags",
22646
- absolute: k = !1,
22646
+ absolute: Z = !1,
22647
22647
  footer: y = !1,
22648
- defaultOptionSelected: m = !1,
22648
+ defaultOptionSelected: f = !1,
22649
22649
  withCheckbox: I = !1,
22650
- ...N
22651
- }, G) => {
22652
- const D = o1(null), [Q, X] = J(c), [q, R] = J(null), [Z, B] = J(!1), u1 = S ? j : !S && m ? [
22650
+ ...T
22651
+ }, q) => {
22652
+ const A = o1(null), [K, Y] = X(c), [J, R] = X(null), [k, B] = X(!1), u1 = S ? j : !S && f ? [
22653
22653
  {
22654
22654
  ...{
22655
- label: f || "Selecciona una opción",
22655
+ label: m || "Selecciona una opción",
22656
22656
  value: -1,
22657
22657
  disabled: !1
22658
22658
  },
22659
22659
  [v]: -1,
22660
22660
  value: -1,
22661
- label: f || "Selecciona una opción"
22661
+ label: m || "Selecciona una opción"
22662
22662
  },
22663
22663
  ...j.filter((E) => E[v] !== -1)
22664
- ] : j, F = C !== void 0 ? C : m && !S ? -1 : h, {
22664
+ ] : j, U = C !== void 0 ? C : f && !S ? -1 : h, {
22665
22665
  // Estado
22666
22666
  isOpen: i1,
22667
22667
  isClosing: $,
22668
- searchValue: Y,
22668
+ searchValue: G,
22669
22669
  selectedValue: r1,
22670
22670
  selectedOptions: n1,
22671
22671
  filteredOptions: p1,
@@ -22688,19 +22688,19 @@ const t3 = E1(
22688
22688
  normalizeToArray: H0
22689
22689
  } = h3({
22690
22690
  value: C,
22691
- defaultValue: F,
22691
+ defaultValue: U,
22692
22692
  options: u1,
22693
22693
  valueName: x,
22694
22694
  idName: v,
22695
- onValueChange: H,
22695
+ onValueChange: V,
22696
22696
  onOptionSelect: b,
22697
22697
  searchable: O,
22698
- closeOnClickOutside: U,
22699
- dropdownId: z,
22698
+ closeOnClickOutside: F,
22699
+ dropdownId: D,
22700
22700
  disabled: w,
22701
22701
  multiple: S,
22702
22702
  maxSelectedItems: M,
22703
- absolute: k,
22703
+ absolute: Z,
22704
22704
  onOpenChange: (E) => {
22705
22705
  E && setTimeout(() => {
22706
22706
  B(!1);
@@ -22710,33 +22710,33 @@ const t3 = E1(
22710
22710
  W(() => {
22711
22711
  if (d1 && C !== void 0)
22712
22712
  if (C === "" || C === -1 || C === "-1")
22713
- X((E) => E !== c ? c : E), R((E) => E !== null ? null : E);
22713
+ Y((E) => E !== c ? c : E), R((E) => E !== null ? null : E);
22714
22714
  else {
22715
22715
  const E = u1.find(
22716
22716
  (l1) => l1[x] === C || l1[v] === C
22717
22717
  );
22718
22718
  if (E) {
22719
22719
  const l1 = E.icon || c, V1 = E.iconColor || null;
22720
- X((K) => K !== l1 ? l1 : K), R((K) => K !== V1 ? V1 : K);
22720
+ Y((Q) => Q !== l1 ? l1 : Q), R((Q) => Q !== V1 ? V1 : Q);
22721
22721
  }
22722
22722
  }
22723
22723
  }, [C, d1, u1, x, v, c]), Q1(
22724
- G,
22724
+ q,
22725
22725
  () => ({
22726
22726
  getValue: () => r1,
22727
22727
  setValue: (E) => {
22728
- d1 || y1(E), H == null || H(E);
22728
+ d1 || y1(E), V == null || V(E);
22729
22729
  },
22730
22730
  focus: () => {
22731
22731
  var E, l1;
22732
- S && g === "tags" ? (E = D.current) == null || E.focus() : (l1 = a1.current) == null || l1.focus();
22732
+ S && g === "tags" ? (E = A.current) == null || E.focus() : (l1 = a1.current) == null || l1.focus();
22733
22733
  },
22734
22734
  blur: () => {
22735
22735
  var E, l1;
22736
- S && g === "tags" ? (E = D.current) == null || E.blur() : (l1 = a1.current) == null || l1.blur();
22736
+ S && g === "tags" ? (E = A.current) == null || E.blur() : (l1 = a1.current) == null || l1.blur();
22737
22737
  },
22738
22738
  clear: () => {
22739
- d1 || y1(S ? [] : ""), H == null || H(S ? [] : "");
22739
+ d1 || y1(S ? [] : ""), V == null || V(S ? [] : "");
22740
22740
  },
22741
22741
  open: () => {
22742
22742
  w || (h1(), setTimeout(() => {
@@ -22752,7 +22752,7 @@ const t3 = E1(
22752
22752
  d1,
22753
22753
  w,
22754
22754
  h1,
22755
- H,
22755
+ V,
22756
22756
  Z1,
22757
22757
  S,
22758
22758
  y1,
@@ -22768,7 +22768,7 @@ const t3 = E1(
22768
22768
  }
22769
22769
  }, [i1, n1, I1]), W(() => {
22770
22770
  if (i1 && S && g === "tags") {
22771
- const E = D.current;
22771
+ const E = A.current;
22772
22772
  if (!E) return;
22773
22773
  const l1 = new ResizeObserver(() => {
22774
22774
  setTimeout(() => {
@@ -22789,7 +22789,7 @@ const t3 = E1(
22789
22789
  }, [n1, i1, S, g, h1]);
22790
22790
  const r0 = (E) => {
22791
22791
  if (S) {
22792
- const V1 = H0(r1).filter((K) => K !== E);
22792
+ const V1 = H0(r1).filter((Q) => Q !== E);
22793
22793
  y1(V1);
22794
22794
  }
22795
22795
  }, y0 = () => {
@@ -22806,12 +22806,12 @@ const t3 = E1(
22806
22806
  }
22807
22807
  } else {
22808
22808
  const E = n1[0];
22809
- return E ? E[v] === -1 || E[x] === -1 || E[x] === "-1" ? f : E[x] || "" : "";
22809
+ return E ? E[v] === -1 || E[x] === -1 || E[x] === "-1" ? m : E[x] || "" : "";
22810
22810
  }
22811
22811
  }, O0 = () => {
22812
22812
  if (!i1 || !s1.top) return null;
22813
- const E = $ ? "animate-dropdown-exit" : "animate-dropdown-enter", l1 = (K, P1) => {
22814
- i0(K, P1), K.icon && X(K.icon), K.iconColor && R(K.iconColor);
22813
+ const E = $ ? "animate-dropdown-exit" : "animate-dropdown-enter", l1 = (Q, P1) => {
22814
+ i0(Q, P1), Q.icon && Y(Q.icon), Q.iconColor && R(Q.iconColor);
22815
22815
  }, V1 = /* @__PURE__ */ u(
22816
22816
  "div",
22817
22817
  {
@@ -22826,12 +22826,12 @@ const t3 = E1(
22826
22826
  zIndex: s1.zIndex
22827
22827
  },
22828
22828
  className: `py-2 ui-min-w-fit ui-overflow-hidden ui-rounded-sm ui-border ui-border-neutral-200 ui-bg-white ui-shadow-lg ${E}`,
22829
- onClick: (K) => K.stopPropagation(),
22829
+ onClick: (Q) => Q.stopPropagation(),
22830
22830
  children: [
22831
- /* @__PURE__ */ i("div", { children: O && /* @__PURE__ */ i("div", { className: "ui-p-2", onClick: (K) => K.stopPropagation(), children: /* @__PURE__ */ i(
22831
+ /* @__PURE__ */ i("div", { children: O && /* @__PURE__ */ i("div", { className: "ui-p-2", onClick: (Q) => Q.stopPropagation(), children: /* @__PURE__ */ i(
22832
22832
  A1,
22833
22833
  {
22834
- value: Y,
22834
+ value: G,
22835
22835
  onChange: _1,
22836
22836
  placeholder: s,
22837
22837
  leftSlot: "SearchOutlined",
@@ -22841,45 +22841,45 @@ const t3 = E1(
22841
22841
  }
22842
22842
  ) }) }),
22843
22843
  O && /* @__PURE__ */ i(q1, {}),
22844
- /* @__PURE__ */ i("div", { className: "no-scrollbar ui-max-h-[200px] ui-overflow-y-auto ui-py-2", children: p1.length > 0 ? p1.map((K) => {
22844
+ /* @__PURE__ */ i("div", { className: "no-scrollbar ui-max-h-[200px] ui-overflow-y-auto ui-py-2", children: p1.length > 0 ? p1.map((Q) => {
22845
22845
  const P1 = S ? n1.some(
22846
- (O1) => O1 && O1[v] === K[v]
22847
- ) : K[v] === -1 && (r1 === -1 || r1 === "-1") || K[v] === r1;
22846
+ (O1) => O1 && O1[v] === Q[v]
22847
+ ) : Q[v] === -1 && (r1 === -1 || r1 === "-1") || Q[v] === r1;
22848
22848
  return I ? /* @__PURE__ */ i(
22849
22849
  x0,
22850
22850
  {
22851
- disabled: K.disabled,
22851
+ disabled: Q.disabled,
22852
22852
  current: P1 ? "blue" : !1,
22853
- "data-option-value": K[v],
22854
- icon: K.icon,
22855
- iconColor: K.iconColor,
22853
+ "data-option-value": Q[v],
22854
+ icon: Q.icon,
22855
+ iconColor: Q.iconColor,
22856
22856
  checkboxProps: {
22857
- checked: K.checked || !1,
22858
- onChange: (O1) => V == null ? void 0 : V(K, O1),
22859
- disabled: K.disabled
22857
+ checked: Q.checked || !1,
22858
+ onChange: (O1) => H == null ? void 0 : H(Q, O1),
22859
+ disabled: Q.disabled
22860
22860
  },
22861
- children: K[x]
22861
+ children: Q[x]
22862
22862
  },
22863
- K[v] || K[x]
22863
+ Q[v] || Q[x]
22864
22864
  ) : /* @__PURE__ */ i(
22865
22865
  M0,
22866
22866
  {
22867
- onClick: (O1) => l1(K, O1),
22868
- disabled: K.disabled,
22867
+ onClick: (O1) => l1(Q, O1),
22868
+ disabled: Q.disabled,
22869
22869
  current: P1 ? "blue" : !1,
22870
- "data-option-value": K[v],
22871
- icon: K.icon,
22872
- iconColor: K.iconColor,
22873
- children: K[x]
22870
+ "data-option-value": Q[v],
22871
+ icon: Q.icon,
22872
+ iconColor: Q.iconColor,
22873
+ children: Q[x]
22874
22874
  },
22875
- K[v] || K[x]
22875
+ Q[v] || Q[x]
22876
22876
  );
22877
- }) : Y ? /* @__PURE__ */ u("div", { className: "ui-mx-auto ui-max-w-[300px] ui-break-words ui-px-3 ui-py-2 ui-text-center ui-text-sm ui-text-neutral-500", children: [
22877
+ }) : G ? /* @__PURE__ */ u("div", { className: "ui-mx-auto ui-max-w-[300px] ui-break-words ui-px-3 ui-py-2 ui-text-center ui-text-sm ui-text-neutral-500", children: [
22878
22878
  /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(j1, { name: "SearchOutlined", size: "5xl", color: "neutral" }) }),
22879
22879
  /* @__PURE__ */ u("p", { className: "ui-font-semibold ui-text-neutral-800", children: [
22880
22880
  L,
22881
22881
  ' "',
22882
- Y,
22882
+ G,
22883
22883
  '"'
22884
22884
  ] }),
22885
22885
  /* @__PURE__ */ i("p", { className: "ui-mt-2 ui-text-xs ui-text-neutral-500", children: p })
@@ -22905,10 +22905,10 @@ const t3 = E1(
22905
22905
  ]
22906
22906
  }
22907
22907
  );
22908
- return k ? V1 : B1(V1, document.body);
22908
+ return Z ? V1 : B1(V1, document.body);
22909
22909
  };
22910
22910
  return W(() => {
22911
- c && X(c);
22911
+ c && Y(c);
22912
22912
  }, [c]), /* @__PURE__ */ u(
22913
22913
  "div",
22914
22914
  {
@@ -22920,14 +22920,14 @@ const t3 = E1(
22920
22920
  w3,
22921
22921
  {
22922
22922
  label: o,
22923
- placeholder: f,
22923
+ placeholder: m,
22924
22924
  selectedOptions: n1,
22925
22925
  handleRemoveSelected: r0,
22926
22926
  toggleDropdown: L1,
22927
22927
  isOpen: i1,
22928
- isOpening: Z,
22928
+ isOpening: k,
22929
22929
  setIsOpening: B,
22930
- customInputRef: D,
22930
+ customInputRef: A,
22931
22931
  disabled: w,
22932
22932
  error: t,
22933
22933
  helperText: n || "",
@@ -22946,13 +22946,13 @@ const t3 = E1(
22946
22946
  helperText: n,
22947
22947
  size: e,
22948
22948
  color: a,
22949
- leftSlot: Q || void 0,
22950
- colorLeftIcon: q || void 0,
22949
+ leftSlot: K || void 0,
22950
+ colorLeftIcon: J || void 0,
22951
22951
  rightSlot: l,
22952
22952
  fullWidth: !0,
22953
22953
  caret: d,
22954
22954
  disabled: w,
22955
- placeholder: f,
22955
+ placeholder: m,
22956
22956
  value: y0(),
22957
22957
  readOnly: !0,
22958
22958
  onClick: (E) => L1(E),
@@ -22960,7 +22960,7 @@ const t3 = E1(
22960
22960
  extraSlot: i1 ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
22961
22961
  name: r,
22962
22962
  autosize: !0,
22963
- ...N
22963
+ ...T
22964
22964
  }
22965
22965
  )
22966
22966
  ),
@@ -23015,16 +23015,18 @@ const g3 = {
23015
23015
  closeAtCorner: C = !0,
23016
23016
  title: h,
23017
23017
  tabs: w,
23018
- defaultValueTab: f,
23018
+ defaultValueTab: m,
23019
23019
  onChangeTab: j,
23020
23020
  headerButtonIcon: x,
23021
23021
  headerButtonOnClick: v,
23022
- footerButtonIcon: H,
23022
+ footerButtonIcon: V,
23023
23023
  footerButtonOnClick: b,
23024
- cancelButtonSlotLeft: V,
23025
- successButtonSlotRight: O
23024
+ cancelButtonSlotLeft: H,
23025
+ successButtonSlotRight: O,
23026
+ disableCancelButton: P,
23027
+ disableSuccessButton: F
23026
23028
  }) => {
23027
- const T = {
23029
+ const D = {
23028
23030
  onClose: o,
23029
23031
  showCloseButton: d,
23030
23032
  closeAtCorner: C,
@@ -23039,16 +23041,18 @@ const g3 = {
23039
23041
  title: h,
23040
23042
  icon: n,
23041
23043
  tabs: w,
23042
- defaultValueTab: f,
23044
+ defaultValueTab: m,
23043
23045
  onChangeTab: j,
23044
23046
  headerButtonIcon: x,
23045
23047
  headerButtonOnClick: v,
23046
- footerButtonIcon: H,
23048
+ footerButtonIcon: V,
23047
23049
  footerButtonOnClick: b,
23048
- cancelButtonSlotLeft: V,
23049
- successButtonSlotRight: O
23050
+ cancelButtonSlotLeft: H,
23051
+ successButtonSlotRight: O,
23052
+ disableCancelButton: P,
23053
+ disableSuccessButton: F
23050
23054
  };
23051
- return /* @__PURE__ */ i(j0.Provider, { value: T, children: r });
23055
+ return /* @__PURE__ */ i(j0.Provider, { value: D, children: r });
23052
23056
  }, V0 = () => {
23053
23057
  const r = Z0(j0);
23054
23058
  if (!r)
@@ -23079,7 +23083,7 @@ const g3 = {
23079
23083
  size: "sm",
23080
23084
  fullWidth: !1
23081
23085
  }
23082
- }), [l, s] = J(o || ((d = r[0]) == null ? void 0 : d.value) || ""), L = (C) => {
23086
+ }), [l, s] = X(o || ((d = r[0]) == null ? void 0 : d.value) || ""), L = (C) => {
23083
23087
  l !== C && (s(C), t && t(C));
23084
23088
  }, p = c({ size: n, fullWidth: a });
23085
23089
  return /* @__PURE__ */ i("div", { className: _("ui-relative ui-flex ui-rounded-md ui-bg-neutral-50", p), children: r.map((C) => /* @__PURE__ */ i(
@@ -23118,9 +23122,9 @@ const g3 = {
23118
23122
  defaultValueTab: C,
23119
23123
  onChangeTab: h,
23120
23124
  headerButtonIcon: w,
23121
- headerButtonOnClick: f
23122
- } = V0(), j = o ?? L, x = c ?? w, v = l ?? f, H = (n == null ? void 0 : n.length) > 0 ? n : d, b = (H == null ? void 0 : H.length) ?? !1, V = a ?? h, O = e ?? C, T = (U) => {
23123
- V && V(U);
23125
+ headerButtonOnClick: m
23126
+ } = V0(), j = o ?? L, x = c ?? w, v = l ?? m, V = (n == null ? void 0 : n.length) > 0 ? n : d, b = (V == null ? void 0 : V.length) ?? !1, H = a ?? h, O = e ?? C, P = (F) => {
23127
+ H && H(F);
23124
23128
  };
23125
23129
  return /* @__PURE__ */ u("div", { className: "ui-relative ui-flex ui-flex-wrap ui-items-center ui-justify-between ui-gap-x-md ui-border-b ui-border-neutral-100 ui-p-4", children: [
23126
23130
  p && /* @__PURE__ */ i("div", { className: "ui-flex ui-h-8 ui-w-8 ui-items-center ui-justify-center ui-gap-2 ui-rounded-full ui-bg-blue-50 ui-text-blue-500", children: /* @__PURE__ */ i(b1, { slot: p, size: "lg" }) }),
@@ -23154,11 +23158,11 @@ const g3 = {
23154
23158
  b ? /* @__PURE__ */ i("div", { className: "ui-z-0 ui-mt-2 ui-flex ui-w-full ui-justify-center ui-overflow-x-auto sm:ui-absolute", children: /* @__PURE__ */ i(
23155
23159
  M3,
23156
23160
  {
23157
- options: H ?? [],
23161
+ options: V ?? [],
23158
23162
  defaultValue: O,
23159
23163
  size: "sm",
23160
- onChange: (U) => {
23161
- T(U);
23164
+ onChange: (F) => {
23165
+ P(F);
23162
23166
  }
23163
23167
  }
23164
23168
  ) }) : null
@@ -23183,29 +23187,31 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23183
23187
  closeAtSuccess: C,
23184
23188
  closeAtCancel: h,
23185
23189
  footerButtonIcon: w,
23186
- footerButtonOnClick: f,
23190
+ footerButtonOnClick: m,
23187
23191
  cancelButtonSlotLeft: j,
23188
- successButtonSlotRight: x
23189
- } = V0(), v = () => {
23192
+ successButtonSlotRight: x,
23193
+ disableCancelButton: v,
23194
+ disableSuccessButton: V
23195
+ } = V0(), b = () => {
23190
23196
  s && s(), h && a();
23191
23197
  }, H = () => {
23192
23198
  L && L(), C && a();
23193
- }, b = o ?? w, V = t ?? f;
23199
+ }, O = o ?? w, P = t ?? m;
23194
23200
  return /* @__PURE__ */ u(
23195
23201
  "div",
23196
23202
  {
23197
- className: `ui-flex ui-border-t ui-border-neutral-100 ui-p-4 ${V ? "ui-justify-between" : "ui-justify-end"} ui-items-center ui-gap-2`,
23203
+ className: `ui-flex ui-border-t ui-border-neutral-100 ui-p-4 ${P ? "ui-justify-between" : "ui-justify-end"} ui-items-center ui-gap-2`,
23198
23204
  children: [
23199
- V && /* @__PURE__ */ i(
23205
+ P && /* @__PURE__ */ i(
23200
23206
  t1,
23201
23207
  {
23202
23208
  "aria-label": "Header button",
23203
23209
  variant: "outlined",
23204
23210
  rounded: !0,
23205
23211
  color: "white",
23206
- icon: b ?? "AlignJustifyOutlined",
23212
+ icon: O ?? "AlignJustifyOutlined",
23207
23213
  size: "lg",
23208
- onClick: V
23214
+ onClick: P
23209
23215
  }
23210
23216
  ),
23211
23217
  r || /* @__PURE__ */ u("div", { className: "ui-flex ui-gap-2", children: [
@@ -23215,7 +23221,8 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23215
23221
  slotLeft: n ?? j,
23216
23222
  color: "white",
23217
23223
  variant: "outlined",
23218
- onClick: v,
23224
+ onClick: b,
23225
+ disabled: v,
23219
23226
  children: c
23220
23227
  }
23221
23228
  ),
@@ -23224,6 +23231,7 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23224
23231
  {
23225
23232
  slotLeft: e ?? x,
23226
23233
  onClick: H,
23234
+ disabled: V,
23227
23235
  children: l
23228
23236
  }
23229
23237
  )
@@ -23259,29 +23267,31 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23259
23267
  onCancel: C,
23260
23268
  onSuccess: h,
23261
23269
  title: w,
23262
- showCancelButton: f,
23270
+ showCancelButton: m,
23263
23271
  showSuccessButton: j,
23264
23272
  closeAtSuccess: x,
23265
23273
  closeAtCancel: v,
23266
- tabs: H,
23274
+ tabs: V,
23267
23275
  defaultValueTab: b,
23268
- onChangeTab: V,
23276
+ onChangeTab: H,
23269
23277
  headerButtonIcon: O,
23270
- headerButtonOnClick: T,
23271
- footerButtonIcon: U,
23272
- footerButtonOnClick: z,
23278
+ headerButtonOnClick: P,
23279
+ footerButtonIcon: F,
23280
+ footerButtonOnClick: D,
23273
23281
  cancelButtonSlotLeft: S,
23274
- successButtonSlotRight: M
23282
+ successButtonSlotRight: M,
23283
+ disableCancelButton: g,
23284
+ disableSuccessButton: Z
23275
23285
  }) => {
23276
- const { isVisible: g, animateIn: k, container: y, modalRef: m } = f3({
23286
+ const { isVisible: y, animateIn: f, container: I, modalRef: T } = f3({
23277
23287
  isOpen: r,
23278
23288
  onClose: o,
23279
23289
  disableEscapeClose: c,
23280
23290
  disableOutsideTab: l,
23281
23291
  disableOutsideClick: s
23282
23292
  });
23283
- if (!y || !r && !g) return null;
23284
- const I = b3(e), N = j3(e), G = /* @__PURE__ */ u(
23293
+ if (!I || !r && !y) return null;
23294
+ const q = b3(e), A = j3(e), K = /* @__PURE__ */ u(
23285
23295
  "div",
23286
23296
  {
23287
23297
  "aria-modal": "true",
@@ -23294,22 +23304,22 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23294
23304
  {
23295
23305
  className: _(
23296
23306
  "ui-fixed ui-inset-0 ui-bg-black ui-backdrop-blur-sm ui-transition-opacity ui-duration-200",
23297
- k ? "ui-opacity-40" : "ui-opacity-0"
23307
+ f ? "ui-opacity-40" : "ui-opacity-0"
23298
23308
  ),
23299
- onClick: s ? (D) => D.stopPropagation() : o
23309
+ onClick: s ? (Y) => Y.stopPropagation() : o
23300
23310
  }
23301
23311
  ),
23302
23312
  /* @__PURE__ */ i("div", { className: "ui-flex ui-min-h-full ui-items-start ui-justify-center ui-px-4 ui-py-8", children: /* @__PURE__ */ i(
23303
23313
  "div",
23304
23314
  {
23305
- ref: m,
23315
+ ref: T,
23306
23316
  tabIndex: -1,
23307
23317
  className: _(
23308
23318
  "ui-relative ui-z-10 ui-my-auto ui-flex ui-w-full ui-transform ui-flex-col ui-rounded-lg ui-bg-white ui-shadow-md ui-outline-none ui-transition-all ui-duration-200",
23309
23319
  v3[n],
23310
- k ? "ui-translate-y-0 ui-scale-100 ui-opacity-100" : "ui-translate-y-4 ui-scale-95 ui-opacity-0"
23320
+ f ? "ui-translate-y-0 ui-scale-100 ui-opacity-100" : "ui-translate-y-4 ui-scale-95 ui-opacity-0"
23311
23321
  ),
23312
- onClick: (D) => D.stopPropagation(),
23322
+ onClick: (Y) => Y.stopPropagation(),
23313
23323
  children: /* @__PURE__ */ u(
23314
23324
  m3,
23315
23325
  {
@@ -23321,25 +23331,27 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23321
23331
  successButtonText: d,
23322
23332
  onCancel: C,
23323
23333
  onSuccess: h,
23324
- showCancelButton: f,
23334
+ showCancelButton: m,
23325
23335
  showSuccessButton: j,
23326
23336
  closeAtSuccess: x,
23327
23337
  closeAtCancel: v,
23328
23338
  title: w,
23329
23339
  icon: t,
23330
23340
  headerButtonIcon: O,
23331
- headerButtonOnClick: T,
23332
- footerButtonIcon: U,
23333
- footerButtonOnClick: z,
23334
- tabs: H,
23341
+ headerButtonOnClick: P,
23342
+ footerButtonIcon: F,
23343
+ footerButtonOnClick: D,
23344
+ tabs: V,
23335
23345
  defaultValueTab: b,
23336
- onChangeTab: V,
23346
+ onChangeTab: H,
23337
23347
  cancelButtonSlotLeft: S,
23338
23348
  successButtonSlotRight: M,
23349
+ disableCancelButton: g,
23350
+ disableSuccessButton: Z,
23339
23351
  children: [
23340
- !I && (a || w ? /* @__PURE__ */ i(F1, { title: w }) : null),
23352
+ !q && (a || w ? /* @__PURE__ */ i(F1, { title: w }) : null),
23341
23353
  e && e,
23342
- !N && /* @__PURE__ */ i(n0, {})
23354
+ !A && /* @__PURE__ */ i(n0, {})
23343
23355
  ]
23344
23356
  }
23345
23357
  )
@@ -23348,7 +23360,7 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23348
23360
  ]
23349
23361
  }
23350
23362
  );
23351
- return l0.createPortal(G, y);
23363
+ return l0.createPortal(K, I);
23352
23364
  }, Z5 = Object.assign(V3, {
23353
23365
  Header: F1,
23354
23366
  Body: x3,
@@ -23371,104 +23383,104 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23371
23383
  disabled: l = !1,
23372
23384
  absolute: s = !1
23373
23385
  }) => {
23374
- const L = a0(), p = e || `popup-${L}`, [d, C] = J(!1), [h, w] = J({}), [f, j] = J(!1), x = o1(null), v = o1(null), H = o1(null), b = P(() => {
23375
- const T = x.current, U = v.current;
23376
- if (!T || !U) return;
23377
- const z = T.getBoundingClientRect(), S = U.getBoundingClientRect();
23386
+ const L = a0(), p = e || `popup-${L}`, [d, C] = X(!1), [h, w] = X({}), [m, j] = X(!1), x = o1(null), v = o1(null), V = o1(null), b = N(() => {
23387
+ const P = x.current, F = v.current;
23388
+ if (!P || !F) return;
23389
+ const D = P.getBoundingClientRect(), S = F.getBoundingClientRect();
23378
23390
  if (S.width === 0 || S.height === 0)
23379
23391
  return;
23380
23392
  let M = 0, g = 0;
23381
23393
  if (s) {
23382
- const N = T.offsetTop, G = T.offsetLeft, D = T.offsetWidth, Q = T.offsetHeight;
23394
+ const T = P.offsetTop, q = P.offsetLeft, A = P.offsetWidth, K = P.offsetHeight;
23383
23395
  switch (r) {
23384
23396
  case "top":
23385
- M = N - S.height - o, g = G + (D - S.width) / 2;
23397
+ M = T - S.height - o, g = q + (A - S.width) / 2;
23386
23398
  break;
23387
23399
  case "bottom":
23388
23400
  case "bottom-center":
23389
- M = N + Q + o, g = G + (D - S.width) / 2;
23401
+ M = T + K + o, g = q + (A - S.width) / 2;
23390
23402
  break;
23391
23403
  case "bottom-left":
23392
- M = N + Q + o, g = G;
23404
+ M = T + K + o, g = q;
23393
23405
  break;
23394
23406
  case "bottom-right":
23395
- M = N + Q + o, g = G + D - S.width;
23407
+ M = T + K + o, g = q + A - S.width;
23396
23408
  break;
23397
23409
  case "left":
23398
- M = N, g = G - S.width - o;
23410
+ M = T, g = q - S.width - o;
23399
23411
  break;
23400
23412
  case "right":
23401
- M = N, g = G + D + o;
23413
+ M = T, g = q + A + o;
23402
23414
  break;
23403
23415
  }
23404
23416
  } else {
23405
- const N = window.innerWidth, G = window.innerHeight, D = z.top, Q = z.left, X = z.width, q = z.height;
23417
+ const T = window.innerWidth, q = window.innerHeight, A = D.top, K = D.left, Y = D.width, J = D.height;
23406
23418
  switch (r) {
23407
23419
  case "top":
23408
- M = D - S.height - o, g = Q + (X - S.width) / 2;
23420
+ M = A - S.height - o, g = K + (Y - S.width) / 2;
23409
23421
  break;
23410
23422
  case "bottom":
23411
23423
  case "bottom-center":
23412
- M = D + q + o, g = Q + (X - S.width) / 2;
23424
+ M = A + J + o, g = K + (Y - S.width) / 2;
23413
23425
  break;
23414
23426
  case "bottom-left":
23415
- M = D + q + o, g = Q;
23427
+ M = A + J + o, g = K;
23416
23428
  break;
23417
23429
  case "bottom-right":
23418
- M = D + q + o, g = Q + X - S.width;
23430
+ M = A + J + o, g = K + Y - S.width;
23419
23431
  break;
23420
23432
  case "left":
23421
- M = D, g = Q - S.width - o;
23433
+ M = A, g = K - S.width - o;
23422
23434
  break;
23423
23435
  case "right":
23424
- M = D, g = Q + X + o;
23436
+ M = A, g = K + Y + o;
23425
23437
  break;
23426
23438
  }
23427
- g < 0 && (g = 0), g + S.width > N && (g = N - S.width), M < 0 && (M = 0), M + S.height > G && (M = G - S.height), r === "bottom-right" && S.width > z.width && (g = z.right - S.width, g < 0 && (g = 0));
23439
+ g < 0 && (g = 0), g + S.width > T && (g = T - S.width), M < 0 && (M = 0), M + S.height > q && (M = q - S.height), r === "bottom-right" && S.width > D.width && (g = D.right - S.width, g < 0 && (g = 0));
23428
23440
  }
23429
- const k = 1e3, y = parseInt(p.replace(/\D/g, "")) || 0, m = k + y % 100, I = {
23441
+ const Z = 1e3, y = parseInt(p.replace(/\D/g, "")) || 0, f = Z + y % 100, I = {
23430
23442
  position: s ? "absolute" : "fixed",
23431
23443
  top: `${M}px`,
23432
23444
  left: `${g}px`,
23433
- zIndex: m
23445
+ zIndex: f
23434
23446
  };
23435
23447
  w(I), j(!0);
23436
- }, [r, o, p, s]), V = (T) => {
23437
- T && T.stopPropagation(), !l && (d ? O() : (H3(p), w({}), j(!1), C(!0), X1.add(p), a == null || a()));
23448
+ }, [r, o, p, s]), H = (P) => {
23449
+ P && P.stopPropagation(), !l && (d ? O() : (H3(p), w({}), j(!1), C(!0), X1.add(p), a == null || a()));
23438
23450
  }, O = () => {
23439
23451
  C(!1), j(!1), X1.delete(p), c == null || c();
23440
23452
  };
23441
23453
  return W(() => {
23442
23454
  if (d) {
23443
- const T = () => {
23444
- const U = v.current;
23445
- if (U) {
23446
- const z = U.getBoundingClientRect();
23447
- z.width > 0 && z.height > 0 && z.width !== 0 && z.height !== 0 ? b() : setTimeout(() => {
23448
- requestAnimationFrame(T);
23455
+ const P = () => {
23456
+ const F = v.current;
23457
+ if (F) {
23458
+ const D = F.getBoundingClientRect();
23459
+ D.width > 0 && D.height > 0 && D.width !== 0 && D.height !== 0 ? b() : setTimeout(() => {
23460
+ requestAnimationFrame(P);
23449
23461
  }, 10);
23450
23462
  }
23451
23463
  };
23452
23464
  setTimeout(() => {
23453
- requestAnimationFrame(T);
23465
+ requestAnimationFrame(P);
23454
23466
  }, 0);
23455
23467
  }
23456
23468
  }, [d, b]), W(() => {
23457
- if (!d || !f || s) return;
23458
- let T = !1;
23459
- const U = () => {
23460
- T || (requestAnimationFrame(() => {
23461
- b(), T = !1;
23462
- }), T = !0);
23469
+ if (!d || !m || s) return;
23470
+ let P = !1;
23471
+ const F = () => {
23472
+ P || (requestAnimationFrame(() => {
23473
+ b(), P = !1;
23474
+ }), P = !0);
23463
23475
  };
23464
- return window.addEventListener("scroll", U, { passive: !0 }), window.addEventListener("resize", U, { passive: !0 }), () => {
23465
- window.removeEventListener("scroll", U), window.removeEventListener("resize", U);
23476
+ return window.addEventListener("scroll", F, { passive: !0 }), window.addEventListener("resize", F, { passive: !0 }), () => {
23477
+ window.removeEventListener("scroll", F), window.removeEventListener("resize", F);
23466
23478
  };
23467
- }, [d, f, s, b]), m0({
23479
+ }, [d, m, s, b]), m0({
23468
23480
  isActive: d,
23469
23481
  disabled: l,
23470
23482
  elementRef: v,
23471
- containerRef: H,
23483
+ containerRef: V,
23472
23484
  elementId: p,
23473
23485
  elementType: "popup",
23474
23486
  closeOnClickOutside: t,
@@ -23476,12 +23488,12 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23476
23488
  }), W1(d, O, !n), {
23477
23489
  isOpen: d,
23478
23490
  popupStyle: h,
23479
- isPositioned: f,
23491
+ isPositioned: m,
23480
23492
  triggerRef: x,
23481
23493
  popupRef: v,
23482
- containerRef: H,
23494
+ containerRef: V,
23483
23495
  popupUniqueId: p,
23484
- togglePopup: V,
23496
+ togglePopup: H,
23485
23497
  closePopup: O
23486
23498
  };
23487
23499
  }, O3 = (r) => ({
@@ -23508,35 +23520,35 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23508
23520
  color: C = "white",
23509
23521
  size: h = "md",
23510
23522
  textColor: w = "inherit",
23511
- rounded: f = !1,
23523
+ rounded: m = !1,
23512
23524
  slotLeft: j,
23513
23525
  borderRadius: x = "sm",
23514
23526
  slotRight: v,
23515
- icon: H,
23527
+ icon: V,
23516
23528
  colorIcon: b,
23517
- tooltip: V,
23529
+ tooltip: H,
23518
23530
  tooltipPosition: O,
23519
- tooltipAlignment: T,
23520
- tooltipColor: U,
23521
- tooltipDelay: z,
23531
+ tooltipAlignment: P,
23532
+ tooltipColor: F,
23533
+ tooltipDelay: D,
23522
23534
  absolute: S = !1,
23523
23535
  closeOnClick: M = !0,
23524
23536
  buttonClassName: g,
23525
- containerClassName: k,
23537
+ containerClassName: Z,
23526
23538
  buttonTransition: y = !0,
23527
- buttonStyle: m,
23539
+ buttonStyle: f,
23528
23540
  ...I
23529
- }, N) => {
23541
+ }, T) => {
23530
23542
  const {
23531
- isOpen: G,
23532
- popupStyle: D,
23533
- isPositioned: Q,
23534
- triggerRef: X,
23535
- popupRef: q,
23543
+ isOpen: q,
23544
+ popupStyle: A,
23545
+ isPositioned: K,
23546
+ triggerRef: Y,
23547
+ popupRef: J,
23536
23548
  containerRef: R,
23537
- popupUniqueId: Z,
23549
+ popupUniqueId: k,
23538
23550
  togglePopup: B,
23539
- closePopup: A
23551
+ closePopup: z
23540
23552
  } = y3({
23541
23553
  position: t,
23542
23554
  offset: n,
@@ -23549,39 +23561,39 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23549
23561
  absolute: S
23550
23562
  });
23551
23563
  Q1(
23552
- N,
23564
+ T,
23553
23565
  () => ({
23554
23566
  open: () => {
23555
23567
  p || B();
23556
23568
  },
23557
23569
  close: () => {
23558
- A();
23570
+ z();
23559
23571
  },
23560
- isOpen: () => G
23572
+ isOpen: () => q
23561
23573
  }),
23562
- [p, B, A, G]
23574
+ [p, B, z, q]
23563
23575
  );
23564
23576
  const e1 = () => {
23565
- if (!G)
23577
+ if (!q)
23566
23578
  return null;
23567
23579
  const u1 = {
23568
23580
  position: S ? "absolute" : "fixed",
23569
23581
  top: S ? "auto" : "-9999px",
23570
23582
  left: S ? "auto" : "-9999px",
23571
- visibility: Q ? "visible" : "hidden",
23572
- opacity: Q ? 1 : 0,
23583
+ visibility: K ? "visible" : "hidden",
23584
+ opacity: K ? 1 : 0,
23573
23585
  transition: "opacity 0.1s ease-out",
23574
- ...D
23575
- }, F = O3(x), i1 = /* @__PURE__ */ i(
23586
+ ...A
23587
+ }, U = O3(x), i1 = /* @__PURE__ */ i(
23576
23588
  "div",
23577
23589
  {
23578
- ref: q,
23579
- id: Z,
23580
- "data-popup-id": Z,
23590
+ ref: J,
23591
+ id: k,
23592
+ "data-popup-id": k,
23581
23593
  style: u1,
23582
- className: `ui-border ui-border-neutral-100 ui-bg-white ${F} ui-overflow-hidden ui-shadow-lg ${l}`,
23594
+ className: `ui-border ui-border-neutral-100 ui-bg-white ${U} ui-overflow-hidden ui-shadow-lg ${l}`,
23583
23595
  onClick: () => {
23584
- M && A();
23596
+ M && z();
23585
23597
  },
23586
23598
  ...I,
23587
23599
  children: r
@@ -23594,9 +23606,9 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23594
23606
  {
23595
23607
  ref: R,
23596
23608
  className: _("ui-relative ui-h-max"),
23597
- "data-popup-container-id": Z,
23609
+ "data-popup-container-id": k,
23598
23610
  children: [
23599
- /* @__PURE__ */ i("div", { ref: X, className: _("ui-w-fit", k), children: /* @__PURE__ */ i(
23611
+ /* @__PURE__ */ i("div", { ref: Y, className: _("ui-w-fit", Z), children: /* @__PURE__ */ i(
23600
23612
  H1,
23601
23613
  {
23602
23614
  className: g,
@@ -23605,19 +23617,19 @@ const x3 = ({ children: r, withPadding: o = !0 }) => /* @__PURE__ */ i("div", {
23605
23617
  variant: d,
23606
23618
  color: C,
23607
23619
  size: h,
23608
- rounded: f,
23609
- icon: H,
23620
+ rounded: m,
23621
+ icon: V,
23610
23622
  slotLeft: j,
23611
23623
  slotRight: v,
23612
23624
  colorIcon: b,
23613
23625
  textColor: w,
23614
- tooltip: V,
23626
+ tooltip: H,
23615
23627
  tooltipPosition: O,
23616
- tooltipAlignment: T,
23617
- tooltipColor: U,
23618
- tooltipDelay: z,
23628
+ tooltipAlignment: P,
23629
+ tooltipColor: F,
23630
+ tooltipDelay: D,
23619
23631
  transition: y,
23620
- style: m,
23632
+ style: f,
23621
23633
  children: o || ""
23622
23634
  }
23623
23635
  ) }),
@@ -23655,15 +23667,15 @@ const Z3 = [
23655
23667
  }, [r, o, l]);
23656
23668
  const h = (b) => {
23657
23669
  b >= 1 && b <= o && l(b);
23658
- }, [w, f] = J(t);
23670
+ }, [w, m] = X(t);
23659
23671
  W(() => {
23660
- f(t);
23672
+ m(t);
23661
23673
  }, [t]);
23662
23674
  const j = Math.min(r * (t || 0), n || 0) || 0, v = (() => {
23663
- const b = Math.min(Math.max(r, 1), Math.max(o - p + 1, 1)), V = Math.min(b + p - 1, o);
23664
- return Array.from({ length: V - b + 1 }, (O, T) => b + T);
23665
- })(), H = (b) => {
23666
- f(b), s(b), h(1);
23675
+ const b = Math.min(Math.max(r, 1), Math.max(o - p + 1, 1)), H = Math.min(b + p - 1, o);
23676
+ return Array.from({ length: H - b + 1 }, (O, P) => b + P);
23677
+ })(), V = (b) => {
23678
+ m(b), s(b), h(1);
23667
23679
  };
23668
23680
  return /* @__PURE__ */ i(
23669
23681
  "div",
@@ -23785,7 +23797,7 @@ const Z3 = [
23785
23797
  options: c,
23786
23798
  value: w,
23787
23799
  valueName: "id",
23788
- onValueChange: (b) => H(Number(b))
23800
+ onValueChange: (b) => V(Number(b))
23789
23801
  }
23790
23802
  )
23791
23803
  ] }) })
@@ -26953,15 +26965,15 @@ const Z3 = [
26953
26965
  name: a,
26954
26966
  id: c
26955
26967
  }) => {
26956
- const [l, s] = J(!1), [L, p] = J(!1), d = c || `radio-${Math.random().toString(36).substr(2, 9)}`, h = r !== void 0 ? r : o !== void 0 ? o : !1, w = P(() => t ? h ? "disabledChecked" : "disabledUnchecked" : l ? h ? "checkedActive" : "uncheckedActive" : L ? h ? "checkedHover" : "uncheckedHover" : h ? "checked" : "unchecked", [t, h, l, L]), f = P(() => {
26968
+ const [l, s] = X(!1), [L, p] = X(!1), d = c || `radio-${Math.random().toString(36).substr(2, 9)}`, h = r !== void 0 ? r : o !== void 0 ? o : !1, w = N(() => t ? h ? "disabledChecked" : "disabledUnchecked" : l ? h ? "checkedActive" : "uncheckedActive" : L ? h ? "checkedHover" : "uncheckedHover" : h ? "checked" : "unchecked", [t, h, l, L]), m = N(() => {
26957
26969
  t || s(!0);
26958
- }, [t]), j = P(() => {
26970
+ }, [t]), j = N(() => {
26959
26971
  s(!1);
26960
- }, []), x = P(() => {
26972
+ }, []), x = N(() => {
26961
26973
  t || p(!0);
26962
- }, [t]), v = P(() => {
26974
+ }, [t]), v = N(() => {
26963
26975
  p(!1), s(!1);
26964
- }, []), H = P(
26976
+ }, []), V = N(
26965
26977
  (b) => {
26966
26978
  t || (b.preventDefault(), n && n({
26967
26979
  target: {
@@ -26980,11 +26992,11 @@ const Z3 = [
26980
26992
  isActive: l,
26981
26993
  isHovered: L,
26982
26994
  handlers: {
26983
- handleMouseDown: f,
26995
+ handleMouseDown: m,
26984
26996
  handleMouseUp: j,
26985
26997
  handleMouseEnter: x,
26986
26998
  handleMouseLeave: v,
26987
- handleClick: H
26999
+ handleClick: V
26988
27000
  }
26989
27001
  };
26990
27002
  }, q3 = ({
@@ -27000,7 +27012,7 @@ const Z3 = [
27000
27012
  defaultChecked: L,
27001
27013
  ...p
27002
27014
  }) => {
27003
- const d = l !== void 0, C = d ? l : L !== void 0 ? L : !1, { state: h, radioId: w, handlers: f } = G3({
27015
+ const d = l !== void 0, C = d ? l : L !== void 0 ? L : !1, { state: h, radioId: w, handlers: m } = G3({
27004
27016
  checked: l,
27005
27017
  defaultChecked: L,
27006
27018
  disabled: n,
@@ -27027,11 +27039,11 @@ const Z3 = [
27027
27039
  "label",
27028
27040
  {
27029
27041
  htmlFor: w,
27030
- onClick: f.handleClick,
27031
- onMouseDown: f.handleMouseDown,
27032
- onMouseUp: f.handleMouseUp,
27033
- onMouseEnter: f.handleMouseEnter,
27034
- onMouseLeave: f.handleMouseLeave,
27042
+ onClick: m.handleClick,
27043
+ onMouseDown: m.handleMouseDown,
27044
+ onMouseUp: m.handleMouseUp,
27045
+ onMouseEnter: m.handleMouseEnter,
27046
+ onMouseLeave: m.handleMouseLeave,
27035
27047
  className: _(
27036
27048
  "ui-relative ui-inline-flex ui-cursor-pointer ui-items-center",
27037
27049
  n && "ui-cursor-not-allowed"
@@ -27068,7 +27080,7 @@ const Z3 = [
27068
27080
  onChange: o,
27069
27081
  options: t
27070
27082
  }) => {
27071
- const [n, e] = J(r), a = r !== void 0 ? r : n, c = P(
27083
+ const [n, e] = X(r), a = r !== void 0 ? r : n, c = N(
27072
27084
  (l) => {
27073
27085
  o ? o(l) : e(l);
27074
27086
  },
@@ -27128,7 +27140,7 @@ const Z3 = [
27128
27140
  onClickStep: t,
27129
27141
  onStepChange: n
27130
27142
  }) => {
27131
- const [e, a] = J(0), c = o !== void 0 ? o : e;
27143
+ const [e, a] = X(0), c = o !== void 0 ? o : e;
27132
27144
  return {
27133
27145
  currentStep: c,
27134
27146
  getColorClasses: (p) => {
@@ -27322,22 +27334,22 @@ const Z3 = [
27322
27334
  vertical: C = !1,
27323
27335
  stepClickable: h = !1
27324
27336
  }) => {
27325
- const { currentStep: w, getColorClasses: f, handleStepClick: j, getStepStatus: x } = X3({
27337
+ const { currentStep: w, getColorClasses: m, handleStepClick: j, getStepStatus: x } = X3({
27326
27338
  steps: r,
27327
27339
  currentStep: s,
27328
27340
  onClickStep: L,
27329
27341
  onStepChange: p
27330
- }), v = f(o || "blue");
27331
- return /* @__PURE__ */ i("div", { className: `${C ? `ui-flex ui-flex-col ui-items-center ui-min-h-0 ${d ? "ui-overflow-y-auto ui-overflow-x-hidden" : ""}` : `ui-flex ui-items-center ui-min-w-0 ${d ? "ui-overflow-x-auto ui-overflow-y-hidden" : ""}`} ${e5({ color: o, size: t, className: n })}`, children: r.map((b, V) => {
27332
- const O = x(V), T = V === r.length - 1;
27342
+ }), v = m(o || "blue");
27343
+ return /* @__PURE__ */ i("div", { className: `${C ? `ui-flex ui-flex-col ui-items-center ui-min-h-0 ${d ? "ui-overflow-y-auto ui-overflow-x-hidden" : ""}` : `ui-flex ui-items-center ui-min-w-0 ${d ? "ui-overflow-x-auto ui-overflow-y-hidden" : ""}`} ${e5({ color: o, size: t, className: n })}`, children: r.map((b, H) => {
27344
+ const O = x(H), P = H === r.length - 1;
27333
27345
  return /* @__PURE__ */ i(
27334
27346
  n5,
27335
27347
  {
27336
27348
  step: b,
27337
- stepIndex: V,
27349
+ stepIndex: H,
27338
27350
  status: O,
27339
27351
  colorClasses: v,
27340
- isLast: T,
27352
+ isLast: P,
27341
27353
  onStepClick: j,
27342
27354
  classNameStep: e,
27343
27355
  classNameStepLabel: a,
@@ -27346,7 +27358,7 @@ const Z3 = [
27346
27358
  vertical: C,
27347
27359
  stepClickable: h
27348
27360
  },
27349
- V
27361
+ H
27350
27362
  );
27351
27363
  }) });
27352
27364
  }, u0 = {
@@ -27539,7 +27551,7 @@ const T1 = /* @__PURE__ */ new Map(), K1 = {
27539
27551
  return Y1;
27540
27552
  }
27541
27553
  }, l5 = () => {
27542
- const [r, o] = J([]), t = o1(/* @__PURE__ */ new Map()), n = o1(null);
27554
+ const [r, o] = X([]), t = o1(/* @__PURE__ */ new Map()), n = o1(null);
27543
27555
  return W(() => {
27544
27556
  const a = K1.getListeners();
27545
27557
  if (n.current) {
@@ -27590,7 +27602,7 @@ const T1 = /* @__PURE__ */ new Map(), K1 = {
27590
27602
  "bottom-right": "ui-fixed ui-bottom-5 ui-right-5"
27591
27603
  })[o]
27592
27604
  }), s5 = ({ toastItem: r }) => {
27593
- const [o, t] = J(!0);
27605
+ const [o, t] = X(!0);
27594
27606
  W(() => {
27595
27607
  r.isLeaving && setTimeout(() => {
27596
27608
  t(!1);