@ptengine/design-components 0.5.2 → 0.5.3

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.js CHANGED
@@ -1856,15 +1856,15 @@ var __defProp$28 = Object.defineProperty, __name$28 = (e, t) => __defProp$28(e,
1856
1856
  if (i && M.current) return;
1857
1857
  let t = e.target;
1858
1858
  [..._.branches].some((e) => e.contains(t)) || (d?.(e), f?.(e), e.defaultPrevented || h?.());
1859
- }, b), V = v ? O === C.length - 1 : !1, mG = useCallbackRef$1((e) => {
1859
+ }, b), V = v ? O === C.length - 1 : !1, gG = useCallbackRef$1((e) => {
1860
1860
  e.key === "Escape" && (o?.(e), !e.defaultPrevented && h && (e.preventDefault(), h()));
1861
1861
  });
1862
1862
  return React$1.useEffect(() => {
1863
- if (V) return b.addEventListener("keydown", mG, { capture: !0 }), () => b.removeEventListener("keydown", mG, { capture: !0 });
1863
+ if (V) return b.addEventListener("keydown", gG, { capture: !0 }), () => b.removeEventListener("keydown", gG, { capture: !0 });
1864
1864
  }, [
1865
1865
  b,
1866
1866
  V,
1867
- mG
1867
+ gG
1868
1868
  ]), React$1.useEffect(() => {
1869
1869
  if (v) return n && (_.layersWithOutsidePointerEventsDisabled.size === 0 && (originalBodyPointerEvents = b.body.style.pointerEvents, b.body.style.pointerEvents = "none"), _.layersWithOutsidePointerEventsDisabled.add(v)), _.layers.add(v), dispatchUpdate(), () => {
1870
1870
  n && (_.layersWithOutsidePointerEventsDisabled.delete(v), _.layersWithOutsidePointerEventsDisabled.size === 0 && (b.body.style.pointerEvents = originalBodyPointerEvents));
@@ -2210,15 +2210,15 @@ var MAX_RESET_COUNT = 50, computePosition$1 = async (e, t, n) => {
2210
2210
  y: r
2211
2211
  }, y = getAlignmentAxis(i), b = getAxisLength(y), x = await l.getDimensions(h), S = y === "y", C = S ? "top" : "left", w = S ? "bottom" : "right", E = S ? "clientHeight" : "clientWidth", O = o.reference[b] + o.reference[y] - v[y] - o.floating[b], A = v[y] - o.reference[y], j = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(h)), M = j ? j[E] : 0;
2212
2212
  (!M || !await (l.isElement == null ? void 0 : l.isElement(j))) && (M = d.floating[E] || o.floating[b]);
2213
- let I = O / 2 - A / 2, R = M / 2 - x[b] / 2 - 1, z = min$1(_[C], R), V = min$1(_[w], R), mG = M - x[b] - V, q = M / 2 - x[b] / 2 + I, Q = clamp$1(z, q, mG), hG = !f.arrow && getAlignment(i) != null && q !== Q && o.reference[b] / 2 - (q < z ? z : V) - x[b] / 2 < 0, gG = hG ? q < z ? q - z : q - mG : 0;
2213
+ let I = O / 2 - A / 2, R = M / 2 - x[b] / 2 - 1, z = min$1(_[C], R), V = min$1(_[w], R), gG = M - x[b] - V, q = M / 2 - x[b] / 2 + I, Q = clamp$1(z, q, gG), _G = !f.arrow && getAlignment(i) != null && q !== Q && o.reference[b] / 2 - (q < z ? z : V) - x[b] / 2 < 0, vG = _G ? q < z ? q - z : q - gG : 0;
2214
2214
  return {
2215
- [y]: v[y] + gG,
2215
+ [y]: v[y] + vG,
2216
2216
  data: {
2217
2217
  [y]: Q,
2218
- centerOffset: q - Q - gG,
2219
- ...hG && { alignmentOffset: gG }
2218
+ centerOffset: q - Q - vG,
2219
+ ..._G && { alignmentOffset: vG }
2220
2220
  },
2221
- reset: hG
2221
+ reset: _G
2222
2222
  };
2223
2223
  }
2224
2224
  }), flip$2 = function(e) {
@@ -2888,7 +2888,7 @@ function useFloating(e) {
2888
2888
  e !== M.current && (M.current = e, S(e));
2889
2889
  }, []), O = React$1.useCallback((e) => {
2890
2890
  e !== I.current && (I.current = e, w(e));
2891
- }, []), A = l || x, j = d || C, M = React$1.useRef(null), I = React$1.useRef(null), R = React$1.useRef(_), z = h != null, mG = useLatestRef(h), q = useLatestRef(o), Q = useLatestRef(g), hG = React$1.useCallback(() => {
2891
+ }, []), A = l || x, j = d || C, M = React$1.useRef(null), I = React$1.useRef(null), R = React$1.useRef(_), z = h != null, gG = useLatestRef(h), q = useLatestRef(o), Q = useLatestRef(g), _G = React$1.useCallback(() => {
2892
2892
  if (!M.current || !I.current) return;
2893
2893
  let e = {
2894
2894
  placement: t,
@@ -2900,7 +2900,7 @@ function useFloating(e) {
2900
2900
  ...e,
2901
2901
  isPositioned: Q.current !== !1
2902
2902
  };
2903
- gG.current && !deepEqual(R.current, t) && (R.current = t, ReactDOM$1.flushSync(() => {
2903
+ vG.current && !deepEqual(R.current, t) && (R.current = t, ReactDOM$1.flushSync(() => {
2904
2904
  v(t);
2905
2905
  }));
2906
2906
  });
@@ -2917,41 +2917,41 @@ function useFloating(e) {
2917
2917
  isPositioned: !1
2918
2918
  })));
2919
2919
  }, [g]);
2920
- let gG = React$1.useRef(!1);
2921
- index(() => (gG.current = !0, () => {
2922
- gG.current = !1;
2920
+ let vG = React$1.useRef(!1);
2921
+ index(() => (vG.current = !0, () => {
2922
+ vG.current = !1;
2923
2923
  }), []), index(() => {
2924
2924
  if (A && (M.current = A), j && (I.current = j), A && j) {
2925
- if (mG.current) return mG.current(A, j, hG);
2926
- hG();
2925
+ if (gG.current) return gG.current(A, j, _G);
2926
+ _G();
2927
2927
  }
2928
2928
  }, [
2929
2929
  A,
2930
2930
  j,
2931
- hG,
2932
- mG,
2931
+ _G,
2932
+ gG,
2933
2933
  z
2934
2934
  ]);
2935
- let _G = React$1.useMemo(() => ({
2935
+ let yG = React$1.useMemo(() => ({
2936
2936
  reference: M,
2937
2937
  floating: I,
2938
2938
  setReference: E,
2939
2939
  setFloating: O
2940
- }), [E, O]), vG = React$1.useMemo(() => ({
2940
+ }), [E, O]), bG = React$1.useMemo(() => ({
2941
2941
  reference: A,
2942
2942
  floating: j
2943
- }), [A, j]), yG = React$1.useMemo(() => {
2943
+ }), [A, j]), xG = React$1.useMemo(() => {
2944
2944
  let e = {
2945
2945
  position: n,
2946
2946
  left: 0,
2947
2947
  top: 0
2948
2948
  };
2949
- if (!vG.floating) return e;
2950
- let t = roundByDPR(vG.floating, _.x), r = roundByDPR(vG.floating, _.y);
2949
+ if (!bG.floating) return e;
2950
+ let t = roundByDPR(bG.floating, _.x), r = roundByDPR(bG.floating, _.y);
2951
2951
  return f ? {
2952
2952
  ...e,
2953
2953
  transform: "translate(" + t + "px, " + r + "px)",
2954
- ...getDPR(vG.floating) >= 1.5 && { willChange: "transform" }
2954
+ ...getDPR(bG.floating) >= 1.5 && { willChange: "transform" }
2955
2955
  } : {
2956
2956
  position: n,
2957
2957
  left: t,
@@ -2960,22 +2960,22 @@ function useFloating(e) {
2960
2960
  }, [
2961
2961
  n,
2962
2962
  f,
2963
- vG.floating,
2963
+ bG.floating,
2964
2964
  _.x,
2965
2965
  _.y
2966
2966
  ]);
2967
2967
  return React$1.useMemo(() => ({
2968
2968
  ..._,
2969
- update: hG,
2970
- refs: _G,
2971
- elements: vG,
2972
- floatingStyles: yG
2969
+ update: _G,
2970
+ refs: yG,
2971
+ elements: bG,
2972
+ floatingStyles: xG
2973
2973
  }), [
2974
2974
  _,
2975
- hG,
2976
2975
  _G,
2977
- vG,
2978
- yG
2976
+ yG,
2977
+ bG,
2978
+ xG
2979
2979
  ]);
2980
2980
  }
2981
2981
  var arrow$1$1 = (e) => {
@@ -3071,17 +3071,17 @@ var arrow$1$1 = (e) => {
3071
3071
  ref: g
3072
3072
  });
3073
3073
  }, "PopperAnchor")), CONTENT_NAME$12 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$12), PopperContent = /* @__PURE__ */ React$1.forwardRef(/* @__PURE__ */ __name$27(function(e, t) {
3074
- let { __scopePopper: n, side: i = "bottom", sideOffset: o = 0, align: l = "center", alignOffset: d = 0, arrowPadding: f = 0, avoidCollisions: h = !0, collisionBoundary: g = [], collisionPadding: _ = 0, sticky: v = "partial", hideWhenDetached: y = !1, updatePositionStrategy: b = "optimized", onPlaced: x,...S } = e, C = usePopperContext(CONTENT_NAME$12, n), [w, E] = React$1.useState(null), O = useComposedRefs$1(t, E), [A, j] = React$1.useState(null), M = useSize(A), R = M?.width ?? 0, z = M?.height ?? 0, V = i + (l === "center" ? "" : "-" + l), mG = typeof _ == "number" ? _ : {
3074
+ let { __scopePopper: n, side: i = "bottom", sideOffset: o = 0, align: l = "center", alignOffset: d = 0, arrowPadding: f = 0, avoidCollisions: h = !0, collisionBoundary: g = [], collisionPadding: _ = 0, sticky: v = "partial", hideWhenDetached: y = !1, updatePositionStrategy: b = "optimized", onPlaced: x,...S } = e, C = usePopperContext(CONTENT_NAME$12, n), [w, E] = React$1.useState(null), O = useComposedRefs$1(t, E), [A, j] = React$1.useState(null), M = useSize(A), R = M?.width ?? 0, z = M?.height ?? 0, V = i + (l === "center" ? "" : "-" + l), gG = typeof _ == "number" ? _ : {
3075
3075
  top: 0,
3076
3076
  right: 0,
3077
3077
  bottom: 0,
3078
3078
  left: 0,
3079
3079
  ..._
3080
- }, q = Array.isArray(g) ? g : [g], Q = q.length > 0, hG = {
3081
- padding: mG,
3080
+ }, q = Array.isArray(g) ? g : [g], Q = q.length > 0, _G = {
3081
+ padding: gG,
3082
3082
  boundary: q.filter(isNotNull),
3083
3083
  altBoundary: Q
3084
- }, { refs: gG, floatingStyles: _G, placement: vG, isPositioned: yG, middlewareData: bG } = useFloating({
3084
+ }, { refs: vG, floatingStyles: yG, placement: bG, isPositioned: xG, middlewareData: SG } = useFloating({
3085
3085
  strategy: "fixed",
3086
3086
  placement: V,
3087
3087
  whileElementsMounted: /* @__PURE__ */ __name$27((...e) => autoUpdate(...e, { animationFrame: b === "always" }), "whileElementsMounted"),
@@ -3095,11 +3095,11 @@ var arrow$1$1 = (e) => {
3095
3095
  mainAxis: !0,
3096
3096
  crossAxis: !1,
3097
3097
  limiter: v === "partial" ? limitShift() : void 0,
3098
- ...hG
3098
+ ..._G
3099
3099
  }),
3100
- h && flip({ ...hG }),
3100
+ h && flip({ ..._G }),
3101
3101
  size({
3102
- ...hG,
3102
+ ..._G,
3103
3103
  apply: /* @__PURE__ */ __name$27(({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
3104
3104
  let { width: i, height: o } = t.reference, l = e.floating.style;
3105
3105
  l.setProperty("--radix-popper-available-width", `${n}px`), l.setProperty("--radix-popper-available-height", `${r}px`), l.setProperty("--radix-popper-anchor-width", `${i}px`), l.setProperty("--radix-popper-anchor-height", `${o}px`);
@@ -3115,31 +3115,31 @@ var arrow$1$1 = (e) => {
3115
3115
  }),
3116
3116
  y && hide({
3117
3117
  strategy: "referenceHidden",
3118
- ...hG,
3119
- boundary: Q ? hG.boundary : void 0
3118
+ ..._G,
3119
+ boundary: Q ? _G.boundary : void 0
3120
3120
  })
3121
3121
  ]
3122
- }), xG = C.setPlacementState;
3123
- useLayoutEffect2(() => (xG(vG), () => {
3124
- xG(void 0);
3125
- }), [vG, xG]);
3126
- let [SG, CG] = getSideAndAlignFromPlacement(vG), wG = useCallbackRef$1(x);
3122
+ }), CG = C.setPlacementState;
3123
+ useLayoutEffect2(() => (CG(bG), () => {
3124
+ CG(void 0);
3125
+ }), [bG, CG]);
3126
+ let [wG, TG] = getSideAndAlignFromPlacement(bG), EG = useCallbackRef$1(x);
3127
3127
  useLayoutEffect2(() => {
3128
- yG && wG?.();
3129
- }, [yG, wG]);
3130
- let TG = bG.arrow?.x, EG = bG.arrow?.y, DG = bG.arrow?.centerOffset !== 0, [OG, kG] = React$1.useState();
3128
+ xG && EG?.();
3129
+ }, [xG, EG]);
3130
+ let DG = SG.arrow?.x, OG = SG.arrow?.y, kG = SG.arrow?.centerOffset !== 0, [AG, jG] = React$1.useState();
3131
3131
  return useLayoutEffect2(() => {
3132
- w && kG(window.getComputedStyle(w).zIndex);
3132
+ w && jG(window.getComputedStyle(w).zIndex);
3133
3133
  }, [w]), /* @__PURE__ */ jsx("div", {
3134
- ref: gG.setFloating,
3134
+ ref: vG.setFloating,
3135
3135
  "data-radix-popper-content-wrapper": "",
3136
3136
  style: {
3137
- ..._G,
3138
- transform: yG ? _G.transform : "translate(0, -200%)",
3137
+ ...yG,
3138
+ transform: xG ? yG.transform : "translate(0, -200%)",
3139
3139
  minWidth: "max-content",
3140
- zIndex: OG,
3141
- "--radix-popper-transform-origin": [bG.transformOrigin?.x, bG.transformOrigin?.y].join(" "),
3142
- ...bG.hide?.referenceHidden && {
3140
+ zIndex: AG,
3141
+ "--radix-popper-transform-origin": [SG.transformOrigin?.x, SG.transformOrigin?.y].join(" "),
3142
+ ...SG.hide?.referenceHidden && {
3143
3143
  visibility: "hidden",
3144
3144
  pointerEvents: "none"
3145
3145
  }
@@ -3147,20 +3147,20 @@ var arrow$1$1 = (e) => {
3147
3147
  dir: e.dir,
3148
3148
  children: /* @__PURE__ */ jsx(PopperContentProvider, {
3149
3149
  scope: n,
3150
- placedSide: SG,
3151
- placedAlign: CG,
3150
+ placedSide: wG,
3151
+ placedAlign: TG,
3152
3152
  onArrowChange: j,
3153
- arrowX: TG,
3154
- arrowY: EG,
3155
- shouldHideArrow: DG,
3153
+ arrowX: DG,
3154
+ arrowY: OG,
3155
+ shouldHideArrow: kG,
3156
3156
  children: /* @__PURE__ */ jsx(Primitive.div, {
3157
- "data-side": SG,
3158
- "data-align": CG,
3157
+ "data-side": wG,
3158
+ "data-align": TG,
3159
3159
  ...S,
3160
3160
  ref: O,
3161
3161
  style: {
3162
3162
  ...S.style,
3163
- animation: yG ? S.style?.animation : "none"
3163
+ animation: xG ? S.style?.animation : "none"
3164
3164
  }
3165
3165
  })
3166
3166
  })
@@ -4510,16 +4510,16 @@ function SelectProvider(e) {
4510
4510
  defaultProp: o ?? !1,
4511
4511
  onChange: l,
4512
4512
  caller: SELECT_NAME
4513
- }), [mG, q] = useControllableState$1({
4513
+ }), [gG, q] = useControllableState$1({
4514
4514
  prop: d,
4515
4515
  defaultProp: f,
4516
4516
  onChange: h,
4517
4517
  caller: SELECT_NAME
4518
- }), Q = React$1.useRef(null), hG = React$1.useRef(mG);
4518
+ }), Q = React$1.useRef(null), _G = React$1.useRef(gG);
4519
4519
  React$1.useEffect(() => {
4520
4520
  let e = x ? w?.ownerDocument.getElementById(x) : w?.form;
4521
4521
  if (e instanceof HTMLFormElement) {
4522
- let t = /* @__PURE__ */ __name$18(() => q(hG.current), "reset");
4522
+ let t = /* @__PURE__ */ __name$18(() => q(_G.current), "reset");
4523
4523
  return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
4524
4524
  }
4525
4525
  }, [
@@ -4527,14 +4527,14 @@ function SelectProvider(e) {
4527
4527
  w,
4528
4528
  q
4529
4529
  ]);
4530
- let gG = w ? !!x || !!w.closest("form") : !0, [_G, vG] = React$1.useState(/* @__PURE__ */ new Set()), yG = useId$1(), bG = Array.from(_G).map((e) => e.props.value).join(";"), xG = React$1.useCallback((e) => {
4531
- vG((t) => new Set(t).add(e));
4532
- }, []), SG = React$1.useCallback((e) => {
4533
- vG((t) => {
4530
+ let vG = w ? !!x || !!w.closest("form") : !0, [yG, bG] = React$1.useState(/* @__PURE__ */ new Set()), xG = useId$1(), SG = Array.from(yG).map((e) => e.props.value).join(";"), CG = React$1.useCallback((e) => {
4531
+ bG((t) => new Set(t).add(e));
4532
+ }, []), wG = React$1.useCallback((e) => {
4533
+ bG((t) => {
4534
4534
  let n = new Set(t);
4535
4535
  return n.delete(e), n;
4536
4536
  });
4537
- }, []), CG = {
4537
+ }, []), TG = {
4538
4538
  required: b,
4539
4539
  trigger: w,
4540
4540
  onTriggerChange: E,
@@ -4542,8 +4542,8 @@ function SelectProvider(e) {
4542
4542
  onValueNodeChange: A,
4543
4543
  valueNodeHasChildren: j,
4544
4544
  onValueNodeHasChildrenChange: M,
4545
- contentId: yG,
4546
- value: mG,
4545
+ contentId: xG,
4546
+ value: gG,
4547
4547
  onValueChange: q,
4548
4548
  open: z,
4549
4549
  onOpenChange: V,
@@ -4553,22 +4553,22 @@ function SelectProvider(e) {
4553
4553
  name: _,
4554
4554
  autoComplete: v,
4555
4555
  form: x,
4556
- nativeOptions: _G,
4557
- nativeSelectKey: bG,
4558
- isFormControl: gG
4556
+ nativeOptions: yG,
4557
+ nativeSelectKey: SG,
4558
+ isFormControl: vG
4559
4559
  };
4560
4560
  return /* @__PURE__ */ jsx(Root2$7, {
4561
4561
  ...C,
4562
4562
  children: /* @__PURE__ */ jsx(SelectProviderImpl, {
4563
4563
  scope: t,
4564
- ...CG,
4564
+ ...TG,
4565
4565
  children: /* @__PURE__ */ jsx(Collection$5.Provider, {
4566
4566
  scope: t,
4567
4567
  children: /* @__PURE__ */ jsx(SelectNativeOptionsProvider, {
4568
4568
  scope: t,
4569
- onNativeOptionAdd: xG,
4570
- onNativeOptionRemove: SG,
4571
- children: isFunction$7(S) ? S(CG) : n
4569
+ onNativeOptionAdd: CG,
4570
+ onNativeOptionRemove: wG,
4571
+ children: isFunction$7(S) ? S(TG) : n
4572
4572
  })
4573
4573
  })
4574
4574
  })
@@ -4681,22 +4681,22 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4681
4681
  })
4682
4682
  }), i) : null;
4683
4683
  }, "SelectContentFragment")), CONTENT_MARGIN = 10, [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$9), Slot$3 = createSlot("SelectContent.RemoveScroll"), SelectContentImpl = /* @__PURE__ */ React$1.forwardRef(/* @__PURE__ */ __name$18(function(e, t) {
4684
- let { __scopeSelect: n } = e, { position: i = "item-aligned", onCloseAutoFocus: o, onEscapeKeyDown: l, onPointerDownOutside: d, side: f, sideOffset: h, align: g, alignOffset: _, arrowPadding: v, collisionBoundary: y, collisionPadding: b, sticky: x, hideWhenDetached: S, avoidCollisions: C,...w } = e, E = useSelectContext(CONTENT_NAME$9, n), [O, A] = React$1.useState(null), [j, M] = React$1.useState(null), R = useComposedRefs$1(t, A), [z, V] = React$1.useState(null), [mG, q] = React$1.useState(null), Q = useCollection$5(n), [hG, gG] = React$1.useState(!1), _G = React$1.useRef(!1);
4684
+ let { __scopeSelect: n } = e, { position: i = "item-aligned", onCloseAutoFocus: o, onEscapeKeyDown: l, onPointerDownOutside: d, side: f, sideOffset: h, align: g, alignOffset: _, arrowPadding: v, collisionBoundary: y, collisionPadding: b, sticky: x, hideWhenDetached: S, avoidCollisions: C,...w } = e, E = useSelectContext(CONTENT_NAME$9, n), [O, A] = React$1.useState(null), [j, M] = React$1.useState(null), R = useComposedRefs$1(t, A), [z, V] = React$1.useState(null), [gG, q] = React$1.useState(null), Q = useCollection$5(n), [_G, vG] = React$1.useState(!1), yG = React$1.useRef(!1);
4685
4685
  React$1.useEffect(() => {
4686
4686
  if (O) return hideOthers(O);
4687
4687
  }, [O]), useFocusGuards();
4688
- let vG = React$1.useCallback((e) => {
4688
+ let bG = React$1.useCallback((e) => {
4689
4689
  let [t, ...n] = Q().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
4690
4690
  for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && j && (j.scrollTop = 0), n === r && j && (j.scrollTop = j.scrollHeight), n?.focus(), document.activeElement !== i)) return;
4691
- }, [Q, j]), yG = React$1.useCallback(() => vG([z, O]), [
4692
- vG,
4691
+ }, [Q, j]), xG = React$1.useCallback(() => bG([z, O]), [
4692
+ bG,
4693
4693
  z,
4694
4694
  O
4695
4695
  ]);
4696
4696
  React$1.useEffect(() => {
4697
- hG && yG();
4698
- }, [hG, yG]);
4699
- let { onOpenChange: bG, triggerPointerDownPosRef: xG } = E;
4697
+ _G && xG();
4698
+ }, [_G, xG]);
4699
+ let { onOpenChange: SG, triggerPointerDownPosRef: CG } = E;
4700
4700
  React$1.useEffect(() => {
4701
4701
  if (O) {
4702
4702
  let e = {
@@ -4704,13 +4704,13 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4704
4704
  y: 0
4705
4705
  }, t = /* @__PURE__ */ __name$18((t) => {
4706
4706
  e = {
4707
- x: Math.abs(Math.round(t.pageX) - (xG.current?.x ?? 0)),
4708
- y: Math.abs(Math.round(t.pageY) - (xG.current?.y ?? 0))
4707
+ x: Math.abs(Math.round(t.pageX) - (CG.current?.x ?? 0)),
4708
+ y: Math.abs(Math.round(t.pageY) - (CG.current?.y ?? 0))
4709
4709
  };
4710
4710
  }, "handlePointerMove"), n = /* @__PURE__ */ __name$18((n) => {
4711
- e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(O) || bG(!1), document.removeEventListener("pointermove", t), xG.current = null;
4711
+ e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(O) || SG(!1), document.removeEventListener("pointermove", t), CG.current = null;
4712
4712
  }, "handlePointerUp");
4713
- return xG.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
4713
+ return CG.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
4714
4714
  capture: !0,
4715
4715
  once: !0
4716
4716
  })), () => {
@@ -4719,24 +4719,24 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4719
4719
  }
4720
4720
  }, [
4721
4721
  O,
4722
- bG,
4723
- xG
4722
+ SG,
4723
+ CG
4724
4724
  ]), React$1.useEffect(() => {
4725
- let e = /* @__PURE__ */ __name$18(() => bG(!1), "close");
4725
+ let e = /* @__PURE__ */ __name$18(() => SG(!1), "close");
4726
4726
  return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
4727
4727
  window.removeEventListener("blur", e), window.removeEventListener("resize", e);
4728
4728
  };
4729
- }, [bG]);
4730
- let [SG, CG] = useTypeaheadSearch((e) => {
4729
+ }, [SG]);
4730
+ let [wG, TG] = useTypeaheadSearch((e) => {
4731
4731
  let t = Q().filter((e) => !e.disabled), n = t.find((e) => e.ref.current === document.activeElement), r = findNextItem(t, e, n);
4732
4732
  r && setTimeout(() => r.ref.current?.focus());
4733
- }), wG = React$1.useCallback((e, t, n) => {
4734
- let r = !_G.current && !n;
4735
- (E.value !== void 0 && E.value === t || r) && (V(e), r && (_G.current = !0));
4736
- }, [E.value]), TG = React$1.useCallback(() => O?.focus(), [O]), EG = React$1.useCallback((e, t, n) => {
4737
- let r = !_G.current && !n;
4733
+ }), EG = React$1.useCallback((e, t, n) => {
4734
+ let r = !yG.current && !n;
4735
+ (E.value !== void 0 && E.value === t || r) && (V(e), r && (yG.current = !0));
4736
+ }, [E.value]), DG = React$1.useCallback(() => O?.focus(), [O]), OG = React$1.useCallback((e, t, n) => {
4737
+ let r = !yG.current && !n;
4738
4738
  (E.value !== void 0 && E.value === t || r) && q(e);
4739
- }, [E.value]), DG = i === "popper" ? SelectPopperPosition : SelectItemAlignedPosition, OG = DG === SelectPopperPosition ? {
4739
+ }, [E.value]), kG = i === "popper" ? SelectPopperPosition : SelectItemAlignedPosition, AG = kG === SelectPopperPosition ? {
4740
4740
  side: f,
4741
4741
  sideOffset: h,
4742
4742
  align: g,
@@ -4753,15 +4753,15 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4753
4753
  content: O,
4754
4754
  viewport: j,
4755
4755
  onViewportChange: M,
4756
- itemRefCallback: wG,
4756
+ itemRefCallback: EG,
4757
4757
  selectedItem: z,
4758
- onItemLeave: TG,
4759
- itemTextRefCallback: EG,
4760
- focusSelectedItem: yG,
4761
- selectedItemText: mG,
4758
+ onItemLeave: DG,
4759
+ itemTextRefCallback: OG,
4760
+ focusSelectedItem: xG,
4761
+ selectedItemText: gG,
4762
4762
  position: i,
4763
- isPositioned: hG,
4764
- searchRef: SG,
4763
+ isPositioned: _G,
4764
+ searchRef: wG,
4765
4765
  children: /* @__PURE__ */ jsx(Combination_default, {
4766
4766
  as: Slot$3,
4767
4767
  allowPinchZoom: !0,
@@ -4781,15 +4781,15 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4781
4781
  onPointerDownOutside: d,
4782
4782
  onFocusOutside: (e) => e.preventDefault(),
4783
4783
  onDismiss: () => E.onOpenChange(!1),
4784
- children: /* @__PURE__ */ jsx(DG, {
4784
+ children: /* @__PURE__ */ jsx(kG, {
4785
4785
  role: "listbox",
4786
4786
  id: E.contentId,
4787
4787
  "data-state": E.open ? "open" : "closed",
4788
4788
  dir: E.dir,
4789
4789
  onContextMenu: (e) => e.preventDefault(),
4790
4790
  ...w,
4791
- ...OG,
4792
- onPlaced: () => gG(!0),
4791
+ ...AG,
4792
+ onPlaced: () => vG(!0),
4793
4793
  ref: R,
4794
4794
  style: {
4795
4795
  display: "flex",
@@ -4799,7 +4799,7 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4799
4799
  },
4800
4800
  onKeyDown: composeEventHandlers(w.onKeyDown, (e) => {
4801
4801
  let t = e.ctrlKey || e.altKey || e.metaKey;
4802
- if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && CG(e.key), [
4802
+ if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && TG(e.key), [
4803
4803
  "ArrowUp",
4804
4804
  "ArrowDown",
4805
4805
  "Home",
@@ -4810,7 +4810,7 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4810
4810
  let n = e.target, r = t.indexOf(n);
4811
4811
  t = t.slice(r + 1);
4812
4812
  }
4813
- setTimeout(() => vG(t)), e.preventDefault();
4813
+ setTimeout(() => bG(t)), e.preventDefault();
4814
4814
  }
4815
4815
  })
4816
4816
  })
@@ -4829,16 +4829,16 @@ var Select$2 = /* @__PURE__ */ __name$18((e) => {
4829
4829
  let i = t.right - r.right, o = window.innerWidth - n.right - i, l = window.innerWidth - e.right - o, d = e.width + l, h = Math.max(d, t.width), g = window.innerWidth - CONTENT_MARGIN, _ = clamp(o, [CONTENT_MARGIN, Math.max(CONTENT_MARGIN, g - h)]);
4830
4830
  f.style.minWidth = d + "px", f.style.right = _ + "px";
4831
4831
  }
4832
- let o = y(), d = window.innerHeight - CONTENT_MARGIN * 2, h = S.scrollHeight, _ = window.getComputedStyle(g), v = parseInt(_.borderTopWidth, 10), x = parseInt(_.paddingTop, 10), E = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10), A = v + x + h + O + E, j = Math.min(C.offsetHeight * 5, A), M = window.getComputedStyle(S), I = parseInt(M.paddingTop, 10), R = parseInt(M.paddingBottom, 10), z = e.top + e.height / 2 - CONTENT_MARGIN, V = d - z, mG = C.offsetHeight / 2, q = C.offsetTop + mG, Q = v + x + q, hG = A - Q;
4832
+ let o = y(), d = window.innerHeight - CONTENT_MARGIN * 2, h = S.scrollHeight, _ = window.getComputedStyle(g), v = parseInt(_.borderTopWidth, 10), x = parseInt(_.paddingTop, 10), E = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10), A = v + x + h + O + E, j = Math.min(C.offsetHeight * 5, A), M = window.getComputedStyle(S), I = parseInt(M.paddingTop, 10), R = parseInt(M.paddingBottom, 10), z = e.top + e.height / 2 - CONTENT_MARGIN, V = d - z, gG = C.offsetHeight / 2, q = C.offsetTop + gG, Q = v + x + q, _G = A - Q;
4833
4833
  if (Q <= z) {
4834
4834
  let e = o.length > 0 && C === o[o.length - 1].ref.current;
4835
4835
  f.style.bottom = "0px";
4836
- let t = g.clientHeight - S.offsetTop - S.offsetHeight, n = Math.max(V, mG + (e ? R : 0) + t + E), r = Q + n;
4836
+ let t = g.clientHeight - S.offsetTop - S.offsetHeight, n = Math.max(V, gG + (e ? R : 0) + t + E), r = Q + n;
4837
4837
  f.style.height = r + "px";
4838
4838
  } else {
4839
4839
  let e = o.length > 0 && C === o[0].ref.current;
4840
4840
  f.style.top = "0px";
4841
- let t = Math.max(z, v + S.offsetTop + (e ? I : 0) + mG) + hG;
4841
+ let t = Math.max(z, v + S.offsetTop + (e ? I : 0) + gG) + _G;
4842
4842
  f.style.height = t + "px", S.scrollTop = Q - z + S.offsetTop;
4843
4843
  }
4844
4844
  f.style.margin = `${CONTENT_MARGIN}px 0`, f.style.minHeight = j + "px", f.style.maxHeight = d + "px", i?.(), requestAnimationFrame(() => b.current = !0);
@@ -5357,35 +5357,35 @@ var __defProp$17 = Object.defineProperty, __name$17 = (e, t) => __defProp$17(e,
5357
5357
  onDismiss: () => n.onOpenChange(!1)
5358
5358
  });
5359
5359
  }, "MenuRootContentNonModal")), Slot$2 = createSlot("MenuContent.ScrollLock"), MenuContentImpl = /* @__PURE__ */ React$1.forwardRef(/* @__PURE__ */ __name$17(function(e, t) {
5360
- let { __scopeMenu: n, loop: i = !1, trapFocus: o, onOpenAutoFocus: l, onCloseAutoFocus: d, disableOutsidePointerEvents: f, onEntryFocus: h, onEscapeKeyDown: g, onPointerDownOutside: _, onFocusOutside: v, onInteractOutside: y, onDismiss: b, disableOutsideScroll: x,...S } = e, C = useMenuContext(CONTENT_NAME$8, n), w = useMenuRootContext(CONTENT_NAME$8, n), E = usePopperScope$2(n), O = useRovingFocusGroupScope$2(n), A = useCollection$4(n), [j, M] = React$1.useState(null), R = React$1.useRef(null), z = useComposedRefs$1(t, R, C.onContentChange), V = React$1.useRef(0), mG = React$1.useRef(""), q = React$1.useRef(0), Q = React$1.useRef(null), hG = React$1.useRef("right"), gG = React$1.useRef(0), _G = x ? Combination_default : React$1.Fragment, vG = x ? {
5360
+ let { __scopeMenu: n, loop: i = !1, trapFocus: o, onOpenAutoFocus: l, onCloseAutoFocus: d, disableOutsidePointerEvents: f, onEntryFocus: h, onEscapeKeyDown: g, onPointerDownOutside: _, onFocusOutside: v, onInteractOutside: y, onDismiss: b, disableOutsideScroll: x,...S } = e, C = useMenuContext(CONTENT_NAME$8, n), w = useMenuRootContext(CONTENT_NAME$8, n), E = usePopperScope$2(n), O = useRovingFocusGroupScope$2(n), A = useCollection$4(n), [j, M] = React$1.useState(null), R = React$1.useRef(null), z = useComposedRefs$1(t, R, C.onContentChange), V = React$1.useRef(0), gG = React$1.useRef(""), q = React$1.useRef(0), Q = React$1.useRef(null), _G = React$1.useRef("right"), vG = React$1.useRef(0), yG = x ? Combination_default : React$1.Fragment, bG = x ? {
5361
5361
  as: Slot$2,
5362
5362
  allowPinchZoom: !0
5363
- } : void 0, yG = /* @__PURE__ */ __name$17((e) => {
5364
- let t = mG.current + e, n = A().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, o = n.map((e) => e.textValue), l = getNextMatch(o, t, i), d = n.find((e) => e.textValue === l)?.ref.current;
5363
+ } : void 0, xG = /* @__PURE__ */ __name$17((e) => {
5364
+ let t = gG.current + e, n = A().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, o = n.map((e) => e.textValue), l = getNextMatch(o, t, i), d = n.find((e) => e.textValue === l)?.ref.current;
5365
5365
  (/* @__PURE__ */ __name$17((function e(t) {
5366
- mG.current = t, window.clearTimeout(V.current), t !== "" && (V.current = window.setTimeout(() => e(""), 1e3));
5366
+ gG.current = t, window.clearTimeout(V.current), t !== "" && (V.current = window.setTimeout(() => e(""), 1e3));
5367
5367
  }), "updateSearch"))(t), d && setTimeout(() => d.focus());
5368
5368
  }, "handleTypeaheadSearch");
5369
5369
  React$1.useEffect(() => () => window.clearTimeout(V.current), []), useFocusGuards();
5370
- let bG = React$1.useCallback((e) => hG.current === Q.current?.side && isPointerInGraceArea(e, Q.current?.area), []);
5370
+ let SG = React$1.useCallback((e) => _G.current === Q.current?.side && isPointerInGraceArea(e, Q.current?.area), []);
5371
5371
  return /* @__PURE__ */ jsx(MenuContentProvider, {
5372
5372
  scope: n,
5373
- searchRef: mG,
5373
+ searchRef: gG,
5374
5374
  onItemEnter: React$1.useCallback((e) => {
5375
- bG(e) && e.preventDefault();
5376
- }, [bG]),
5375
+ SG(e) && e.preventDefault();
5376
+ }, [SG]),
5377
5377
  onItemLeave: React$1.useCallback((e) => {
5378
- bG(e) || (R.current?.focus(), M(null));
5379
- }, [bG]),
5378
+ SG(e) || (R.current?.focus(), M(null));
5379
+ }, [SG]),
5380
5380
  onTriggerLeave: React$1.useCallback((e) => {
5381
- bG(e) && e.preventDefault();
5382
- }, [bG]),
5381
+ SG(e) && e.preventDefault();
5382
+ }, [SG]),
5383
5383
  pointerGraceTimerRef: q,
5384
5384
  onPointerGraceIntentChange: React$1.useCallback((e) => {
5385
5385
  Q.current = e;
5386
5386
  }, []),
5387
- children: /* @__PURE__ */ jsx(_G, {
5388
- ...vG,
5387
+ children: /* @__PURE__ */ jsx(yG, {
5388
+ ...bG,
5389
5389
  children: /* @__PURE__ */ jsx(FocusScope, {
5390
5390
  asChild: !0,
5391
5391
  trapped: o,
@@ -5428,7 +5428,7 @@ var __defProp$17 = Object.defineProperty, __name$17 = (e, t) => __defProp$17(e,
5428
5428
  },
5429
5429
  onKeyDown: composeEventHandlers(S.onKeyDown, (e) => {
5430
5430
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
5431
- t && (e.key === "Tab" && e.preventDefault(), !n && r && yG(e.key));
5431
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && xG(e.key));
5432
5432
  let i = R.current;
5433
5433
  if (e.target !== i || !FIRST_LAST_KEYS.includes(e.key)) return;
5434
5434
  e.preventDefault();
@@ -5436,11 +5436,11 @@ var __defProp$17 = Object.defineProperty, __name$17 = (e, t) => __defProp$17(e,
5436
5436
  LAST_KEYS.includes(e.key) && o.reverse(), focusFirst$1(o);
5437
5437
  }),
5438
5438
  onBlur: composeEventHandlers(e.onBlur, (e) => {
5439
- e.currentTarget.contains(e.target) || (window.clearTimeout(V.current), mG.current = "");
5439
+ e.currentTarget.contains(e.target) || (window.clearTimeout(V.current), gG.current = "");
5440
5440
  }),
5441
5441
  onPointerMove: composeEventHandlers(e.onPointerMove, whenMouse$1((e) => {
5442
- let t = e.target, n = gG.current !== e.clientX;
5443
- e.currentTarget.contains(t) && n && (hG.current = e.clientX > gG.current ? "right" : "left", gG.current = e.clientX);
5442
+ let t = e.target, n = vG.current !== e.clientX;
5443
+ e.currentTarget.contains(t) && n && (_G.current = e.clientX > vG.current ? "right" : "left", vG.current = e.clientX);
5444
5444
  }))
5445
5445
  })
5446
5446
  })
@@ -6444,27 +6444,27 @@ function getDefaultSwipeDirections(e) {
6444
6444
  return t && r.push(t), n && r.push(n), r;
6445
6445
  }
6446
6446
  var Toast = (e) => {
6447
- let { invert: t, toast: n, unstyled: r, interacting: o, setHeights: l, visibleToasts: d, heights: f, index: h, toasts: g, expanded: _, removeToast: v, defaultRichColors: y, closeButton: b, style: x, cancelButtonStyle: S, actionButtonStyle: C, className: w = "", descriptionClassName: E = "", duration: O, position: A, gap: j, expandByDefault: M, classNames: I, icons: R, closeButtonAriaLabel: z = "Close toast" } = e, [V, mG] = React.useState(null), [q, Q] = React.useState(null), [hG, gG] = React.useState(!1), [_G, vG] = React.useState(!1), [yG, bG] = React.useState(!1), [xG, SG] = React.useState(!1), [CG, wG] = React.useState(!1), [TG, EG] = React.useState(0), [DG, OG] = React.useState(0), kG = React.useRef(n.duration || O || TOAST_LIFETIME), AG = React.useRef(null), jG = React.useRef(null), MG = h === 0, NG = h + 1 <= d, PG = n.type, FG = PG ?? "default", IG = n.dismissible !== !1, LG = n.className || "", RG = n.descriptionClassName || "", zG = React.useMemo(() => f.findIndex((e) => e.toastId === n.id) || 0, [f, n.id]), BG = React.useMemo(() => n.closeButton ?? b, [n.closeButton, b]), VG = React.useMemo(() => n.duration || O || TOAST_LIFETIME, [n.duration, O]), HG = React.useRef(0), UG = React.useRef(0), WG = React.useRef(0), GG = React.useRef(null), [KG, qG] = A.split("-"), JG = React.useMemo(() => f.reduce((e, t, n) => n >= zG ? e : e + t.height, 0), [f, zG]), YG = useIsDocumentHidden(), XG = React.useMemo(() => e.swipeDirections ?? getDefaultSwipeDirections(A), [e.swipeDirections, A]), ZG = n.invert || t, QG = PG === "loading";
6448
- UG.current = React.useMemo(() => zG * j + JG, [zG, JG]), React.useEffect(() => {
6449
- kG.current = VG;
6450
- }, [VG]), React.useEffect(() => {
6451
- gG(!0);
6447
+ let { invert: t, toast: n, unstyled: r, interacting: o, setHeights: l, visibleToasts: d, heights: f, index: h, toasts: g, expanded: _, removeToast: v, defaultRichColors: y, closeButton: b, style: x, cancelButtonStyle: S, actionButtonStyle: C, className: w = "", descriptionClassName: E = "", duration: O, position: A, gap: j, expandByDefault: M, classNames: I, icons: R, closeButtonAriaLabel: z = "Close toast" } = e, [V, gG] = React.useState(null), [q, Q] = React.useState(null), [_G, vG] = React.useState(!1), [yG, bG] = React.useState(!1), [xG, SG] = React.useState(!1), [CG, wG] = React.useState(!1), [TG, EG] = React.useState(!1), [DG, OG] = React.useState(0), [kG, AG] = React.useState(0), jG = React.useRef(n.duration || O || TOAST_LIFETIME), MG = React.useRef(null), NG = React.useRef(null), PG = h === 0, FG = h + 1 <= d, IG = n.type, LG = IG ?? "default", RG = n.dismissible !== !1, zG = n.className || "", BG = n.descriptionClassName || "", VG = React.useMemo(() => f.findIndex((e) => e.toastId === n.id) || 0, [f, n.id]), HG = React.useMemo(() => n.closeButton ?? b, [n.closeButton, b]), UG = React.useMemo(() => n.duration || O || TOAST_LIFETIME, [n.duration, O]), WG = React.useRef(0), GG = React.useRef(0), KG = React.useRef(0), qG = React.useRef(null), [JG, YG] = A.split("-"), XG = React.useMemo(() => f.reduce((e, t, n) => n >= VG ? e : e + t.height, 0), [f, VG]), ZG = useIsDocumentHidden(), QG = React.useMemo(() => e.swipeDirections ?? getDefaultSwipeDirections(A), [e.swipeDirections, A]), $G = n.invert || t, eK = IG === "loading";
6448
+ GG.current = React.useMemo(() => VG * j + XG, [VG, XG]), React.useEffect(() => {
6449
+ jG.current = UG;
6450
+ }, [UG]), React.useEffect(() => {
6451
+ vG(!0);
6452
6452
  }, []), React.useEffect(() => {
6453
- let e = jG.current;
6453
+ let e = NG.current;
6454
6454
  if (e) {
6455
6455
  let t = e.getBoundingClientRect().height;
6456
- return OG(t), l((e) => [{
6456
+ return AG(t), l((e) => [{
6457
6457
  toastId: n.id,
6458
6458
  height: t,
6459
6459
  position: n.position
6460
6460
  }, ...e]), () => l((e) => e.filter((e) => e.toastId !== n.id));
6461
6461
  }
6462
6462
  }, [l, n.id]), React.useLayoutEffect(() => {
6463
- if (!hG) return;
6464
- let e = jG.current, t = e.style.height;
6463
+ if (!_G) return;
6464
+ let e = NG.current, t = e.style.height;
6465
6465
  e.style.height = "auto";
6466
6466
  let r = e.getBoundingClientRect().height;
6467
- e.style.height = t, OG(r), l((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
6467
+ e.style.height = t, AG(r), l((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
6468
6468
  ...e,
6469
6469
  height: r
6470
6470
  } : e) : [{
@@ -6473,7 +6473,7 @@ var Toast = (e) => {
6473
6473
  position: n.position
6474
6474
  }, ...e]);
6475
6475
  }, [
6476
- hG,
6476
+ _G,
6477
6477
  n.title,
6478
6478
  n.description,
6479
6479
  l,
@@ -6482,137 +6482,137 @@ var Toast = (e) => {
6482
6482
  n.action,
6483
6483
  n.cancel
6484
6484
  ]);
6485
- let $G = React.useCallback(() => {
6486
- vG(!0), EG(UG.current), l((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
6485
+ let tK = React.useCallback(() => {
6486
+ bG(!0), OG(GG.current), l((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
6487
6487
  v(n);
6488
6488
  }, TIME_BEFORE_UNMOUNT);
6489
6489
  }, [
6490
6490
  n,
6491
6491
  v,
6492
6492
  l,
6493
- UG
6493
+ GG
6494
6494
  ]);
6495
6495
  React.useEffect(() => {
6496
- if (n.promise && PG === "loading" || n.duration === Infinity || n.type === "loading") return;
6496
+ if (n.promise && IG === "loading" || n.duration === Infinity || n.type === "loading") return;
6497
6497
  let e;
6498
- return _ || o || YG ? (() => {
6499
- if (WG.current < HG.current) {
6500
- let e = (/* @__PURE__ */ new Date()).getTime() - HG.current;
6501
- kG.current -= e;
6498
+ return _ || o || ZG ? (() => {
6499
+ if (KG.current < WG.current) {
6500
+ let e = (/* @__PURE__ */ new Date()).getTime() - WG.current;
6501
+ jG.current -= e;
6502
6502
  }
6503
- WG.current = (/* @__PURE__ */ new Date()).getTime();
6504
- })() : kG.current !== Infinity && (HG.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
6505
- n.onAutoClose == null || n.onAutoClose.call(n, n), $G();
6506
- }, kG.current)), () => clearTimeout(e);
6503
+ KG.current = (/* @__PURE__ */ new Date()).getTime();
6504
+ })() : jG.current !== Infinity && (WG.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
6505
+ n.onAutoClose == null || n.onAutoClose.call(n, n), tK();
6506
+ }, jG.current)), () => clearTimeout(e);
6507
6507
  }, [
6508
6508
  _,
6509
6509
  o,
6510
6510
  n,
6511
- PG,
6512
- YG,
6513
- $G
6511
+ IG,
6512
+ ZG,
6513
+ tK
6514
6514
  ]), React.useEffect(() => {
6515
- n.delete && ($G(), n.onDismiss == null || n.onDismiss.call(n, n));
6516
- }, [$G, n.delete]);
6517
- function eK() {
6515
+ n.delete && (tK(), n.onDismiss == null || n.onDismiss.call(n, n));
6516
+ }, [tK, n.delete]);
6517
+ function nK() {
6518
6518
  return R?.loading ? /* @__PURE__ */ React.createElement("div", {
6519
6519
  className: cn$1(I?.loader, n?.classNames?.loader, "sonner-loader"),
6520
- "data-visible": PG === "loading"
6520
+ "data-visible": IG === "loading"
6521
6521
  }, R.loading) : /* @__PURE__ */ React.createElement(Loader, {
6522
6522
  className: cn$1(I?.loader, n?.classNames?.loader),
6523
- visible: PG === "loading"
6523
+ visible: IG === "loading"
6524
6524
  });
6525
6525
  }
6526
- let tK = n.icon || R?.[PG] || getAsset(PG);
6526
+ let rK = n.icon || R?.[IG] || getAsset(IG);
6527
6527
  return /* @__PURE__ */ React.createElement("li", {
6528
6528
  tabIndex: 0,
6529
- ref: jG,
6530
- className: cn$1(w, LG, I?.toast, n?.classNames?.toast, I?.[FG], n?.classNames?.[FG]),
6529
+ ref: NG,
6530
+ className: cn$1(w, zG, I?.toast, n?.classNames?.toast, I?.[LG], n?.classNames?.[LG]),
6531
6531
  "data-sonner-toast": "",
6532
6532
  "data-rich-colors": n.richColors ?? y,
6533
6533
  "data-styled": !(n.jsx || n.unstyled || r),
6534
- "data-mounted": hG,
6534
+ "data-mounted": _G,
6535
6535
  "data-promise": !!n.promise,
6536
- "data-swiped": CG,
6537
- "data-removed": _G,
6538
- "data-visible": NG,
6539
- "data-y-position": KG,
6540
- "data-x-position": qG,
6536
+ "data-swiped": TG,
6537
+ "data-removed": yG,
6538
+ "data-visible": FG,
6539
+ "data-y-position": JG,
6540
+ "data-x-position": YG,
6541
6541
  "data-index": h,
6542
- "data-front": MG,
6543
- "data-swiping": yG,
6544
- "data-dismissible": IG,
6545
- "data-type": PG,
6546
- "data-invert": ZG,
6547
- "data-swipe-out": xG,
6542
+ "data-front": PG,
6543
+ "data-swiping": xG,
6544
+ "data-dismissible": RG,
6545
+ "data-type": IG,
6546
+ "data-invert": $G,
6547
+ "data-swipe-out": CG,
6548
6548
  "data-swipe-direction": q,
6549
- "data-expanded": !!(_ || M && hG),
6549
+ "data-expanded": !!(_ || M && _G),
6550
6550
  "data-testid": n.testId,
6551
6551
  style: {
6552
6552
  "--index": h,
6553
6553
  "--toasts-before": h,
6554
6554
  "--z-index": g.length - h,
6555
- "--offset": `${_G ? TG : UG.current}px`,
6556
- "--initial-height": M ? "auto" : `${DG}px`,
6555
+ "--offset": `${yG ? DG : GG.current}px`,
6556
+ "--initial-height": M ? "auto" : `${kG}px`,
6557
6557
  ...x,
6558
6558
  ...n.style
6559
6559
  },
6560
6560
  onDragEnd: () => {
6561
- bG(!1), mG(null), GG.current = null;
6561
+ SG(!1), gG(null), qG.current = null;
6562
6562
  },
6563
6563
  onPointerDown: (e) => {
6564
- e.button !== 2 && (QG || !IG || (AG.current = /* @__PURE__ */ new Date(), EG(UG.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (bG(!0), GG.current = {
6564
+ e.button !== 2 && (eK || !RG || (MG.current = /* @__PURE__ */ new Date(), OG(GG.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (SG(!0), qG.current = {
6565
6565
  x: e.clientX,
6566
6566
  y: e.clientY
6567
6567
  })));
6568
6568
  },
6569
6569
  onPointerUp: () => {
6570
- if (xG || !IG) return;
6571
- GG.current = null;
6572
- let e = Number(jG.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(jG.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - AG.current?.getTime(), i = V === "x" ? e : t, o = Math.abs(i) / r;
6573
- if ((V === "x" ? XG.includes(e > 0 ? "right" : "left") : XG.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= SWIPE_THRESHOLD || o > .11)) {
6574
- EG(UG.current), n.onDismiss == null || n.onDismiss.call(n, n), Q(V === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $G(), SG(!0);
6570
+ if (CG || !RG) return;
6571
+ qG.current = null;
6572
+ let e = Number(NG.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(NG.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - MG.current?.getTime(), i = V === "x" ? e : t, o = Math.abs(i) / r;
6573
+ if ((V === "x" ? QG.includes(e > 0 ? "right" : "left") : QG.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= SWIPE_THRESHOLD || o > .11)) {
6574
+ OG(GG.current), n.onDismiss == null || n.onDismiss.call(n, n), Q(V === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), tK(), wG(!0);
6575
6575
  return;
6576
6576
  } else {
6577
6577
  var l, d;
6578
- (l = jG.current) == null || l.style.setProperty("--swipe-amount-x", "0px"), (d = jG.current) == null || d.style.setProperty("--swipe-amount-y", "0px");
6578
+ (l = NG.current) == null || l.style.setProperty("--swipe-amount-x", "0px"), (d = NG.current) == null || d.style.setProperty("--swipe-amount-y", "0px");
6579
6579
  }
6580
- wG(!1), bG(!1), mG(null);
6580
+ EG(!1), SG(!1), gG(null);
6581
6581
  },
6582
6582
  onPointerMove: (e) => {
6583
6583
  var t, n;
6584
- if (!GG.current || !IG || window.getSelection()?.toString().length > 0) return;
6585
- let r = e.clientY - GG.current.y, i = e.clientX - GG.current.x;
6586
- !V && (Math.abs(i) > 1 || Math.abs(r) > 1) && mG(Math.abs(i) > Math.abs(r) ? "x" : "y");
6584
+ if (!qG.current || !RG || window.getSelection()?.toString().length > 0) return;
6585
+ let r = e.clientY - qG.current.y, i = e.clientX - qG.current.x;
6586
+ !V && (Math.abs(i) > 1 || Math.abs(r) > 1) && gG(Math.abs(i) > Math.abs(r) ? "x" : "y");
6587
6587
  let o = {
6588
6588
  x: 0,
6589
6589
  y: 0
6590
6590
  }, l = (e) => 1 / (1.5 + Math.abs(e) / 20);
6591
6591
  if (V === "y") {
6592
- if (XG.includes("top") || XG.includes("bottom")) if (XG.includes("top") && r < 0 || XG.includes("bottom") && r > 0) o.y = r;
6592
+ if (QG.includes("top") || QG.includes("bottom")) if (QG.includes("top") && r < 0 || QG.includes("bottom") && r > 0) o.y = r;
6593
6593
  else {
6594
6594
  let e = r * l(r);
6595
6595
  o.y = Math.abs(e) < Math.abs(r) ? e : r;
6596
6596
  }
6597
- } else if (V === "x" && (XG.includes("left") || XG.includes("right"))) if (XG.includes("left") && i < 0 || XG.includes("right") && i > 0) o.x = i;
6597
+ } else if (V === "x" && (QG.includes("left") || QG.includes("right"))) if (QG.includes("left") && i < 0 || QG.includes("right") && i > 0) o.x = i;
6598
6598
  else {
6599
6599
  let e = i * l(i);
6600
6600
  o.x = Math.abs(e) < Math.abs(i) ? e : i;
6601
6601
  }
6602
- (Math.abs(o.x) > 0 || Math.abs(o.y) > 0) && wG(!0), (t = jG.current) == null || t.style.setProperty("--swipe-amount-x", `${o.x}px`), (n = jG.current) == null || n.style.setProperty("--swipe-amount-y", `${o.y}px`);
6602
+ (Math.abs(o.x) > 0 || Math.abs(o.y) > 0) && EG(!0), (t = NG.current) == null || t.style.setProperty("--swipe-amount-x", `${o.x}px`), (n = NG.current) == null || n.style.setProperty("--swipe-amount-y", `${o.y}px`);
6603
6603
  }
6604
- }, BG && !n.jsx && PG !== "loading" ? /* @__PURE__ */ React.createElement("button", {
6604
+ }, HG && !n.jsx && IG !== "loading" ? /* @__PURE__ */ React.createElement("button", {
6605
6605
  "aria-label": z,
6606
- "data-disabled": QG,
6606
+ "data-disabled": eK,
6607
6607
  "data-close-button": !0,
6608
- onClick: QG || !IG ? () => {} : () => {
6609
- $G(), n.onDismiss == null || n.onDismiss.call(n, n);
6608
+ onClick: eK || !RG ? () => {} : () => {
6609
+ tK(), n.onDismiss == null || n.onDismiss.call(n, n);
6610
6610
  },
6611
6611
  className: cn$1(I?.closeButton, n?.classNames?.closeButton)
6612
- }, R?.close ?? CloseIcon) : null, (PG || n.icon || n.promise) && n.icon !== null && (R?.[PG] !== null || n.icon) ? /* @__PURE__ */ React.createElement("div", {
6612
+ }, R?.close ?? CloseIcon) : null, (IG || n.icon || n.promise) && n.icon !== null && (R?.[IG] !== null || n.icon) ? /* @__PURE__ */ React.createElement("div", {
6613
6613
  "data-icon": "",
6614
6614
  className: cn$1(I?.icon, n?.classNames?.icon)
6615
- }, PG === "loading" ? n.icon || eK() : n.promise ? eK() : null, PG === "loading" ? null : tK) : null, /* @__PURE__ */ React.createElement("div", {
6615
+ }, IG === "loading" ? n.icon || nK() : n.promise ? nK() : null, IG === "loading" ? null : rK) : null, /* @__PURE__ */ React.createElement("div", {
6616
6616
  "data-content": "",
6617
6617
  className: cn$1(I?.content, n?.classNames?.content)
6618
6618
  }, /* @__PURE__ */ React.createElement("div", {
@@ -6620,13 +6620,13 @@ var Toast = (e) => {
6620
6620
  className: cn$1(I?.title, n?.classNames?.title)
6621
6621
  }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /* @__PURE__ */ React.createElement("div", {
6622
6622
  "data-description": "",
6623
- className: cn$1(E, RG, I?.description, n?.classNames?.description)
6623
+ className: cn$1(E, BG, I?.description, n?.classNames?.description)
6624
6624
  }, typeof n.description == "function" ? n.description() : n.description) : null), /* @__PURE__ */ React.isValidElement(n.cancel) ? n.cancel : n.cancel && isAction(n.cancel) ? /* @__PURE__ */ React.createElement("button", {
6625
6625
  "data-button": !0,
6626
6626
  "data-cancel": !0,
6627
6627
  style: n.cancelButtonStyle || S,
6628
6628
  onClick: (e) => {
6629
- isAction(n.cancel) && IG && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $G());
6629
+ isAction(n.cancel) && RG && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), tK());
6630
6630
  },
6631
6631
  className: cn$1(I?.cancelButton, n?.classNames?.cancelButton)
6632
6632
  }, n.cancel.label) : null, /* @__PURE__ */ React.isValidElement(n.action) ? n.action : n.action && isAction(n.action) ? /* @__PURE__ */ React.createElement("button", {
@@ -6634,7 +6634,7 @@ var Toast = (e) => {
6634
6634
  "data-action": !0,
6635
6635
  style: n.actionButtonStyle || C,
6636
6636
  onClick: (e) => {
6637
- isAction(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && $G());
6637
+ isAction(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && tK());
6638
6638
  },
6639
6639
  className: cn$1(I?.actionButton, n?.classNames?.actionButton)
6640
6640
  }, n.action.label) : null);
@@ -6669,7 +6669,7 @@ function assignOffset(e, t) {
6669
6669
  }), n;
6670
6670
  }
6671
6671
  var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6672
- let { id: n, invert: r, position: o = "bottom-right", hotkey: l = ["altKey", "KeyT"], expand: d, closeButton: f, className: h, offset: g, mobileOffset: _, theme: v = "light", richColors: y, duration: b, style: x, visibleToasts: S = VISIBLE_TOASTS_AMOUNT, toastOptions: C, dir: w = getDocumentDirection(), gap: E = GAP, icons: O, customAriaLabel: A, containerAriaLabel: j = "Notifications" } = e, [M, I] = React.useState([]), R = React.useMemo(() => n ? M.filter((e) => e.toasterId === n) : M.filter((e) => !e.toasterId), [M, n]), z = React.useMemo(() => Array.from(new Set([o].concat(R.filter((e) => e.position).map((e) => e.position)))), [R, o]), [V, q] = React.useState([]), [Q, hG] = React.useState(!1), [gG, _G] = React.useState(!1), [vG, yG] = React.useState(v === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : v), bG = React.useRef(null), xG = l.join("+").replace(/Key/g, "").replace(/Digit/g, ""), SG = React.useRef(null), CG = React.useRef(!1), wG = React.useCallback((e) => {
6672
+ let { id: n, invert: r, position: o = "bottom-right", hotkey: l = ["altKey", "KeyT"], expand: d, closeButton: f, className: h, offset: g, mobileOffset: _, theme: v = "light", richColors: y, duration: b, style: x, visibleToasts: S = VISIBLE_TOASTS_AMOUNT, toastOptions: C, dir: w = getDocumentDirection(), gap: E = GAP, icons: O, customAriaLabel: A, containerAriaLabel: j = "Notifications" } = e, [M, I] = React.useState([]), R = React.useMemo(() => n ? M.filter((e) => e.toasterId === n) : M.filter((e) => !e.toasterId), [M, n]), z = React.useMemo(() => Array.from(new Set([o].concat(R.filter((e) => e.position).map((e) => e.position)))), [R, o]), [V, q] = React.useState([]), [Q, _G] = React.useState(!1), [vG, yG] = React.useState(!1), [bG, xG] = React.useState(v === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : v), SG = React.useRef(null), CG = l.join("+").replace(/Key/g, "").replace(/Digit/g, ""), wG = React.useRef(null), TG = React.useRef(!1), EG = React.useCallback((e) => {
6673
6673
  I((t) => (t.find((t) => t.id === e.id)?.delete || ToastState.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
6674
6674
  }, []);
6675
6675
  return React.useEffect(() => ToastState.subscribe((e) => {
@@ -6699,42 +6699,42 @@ var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6699
6699
  });
6700
6700
  }), []), React.useEffect(() => {
6701
6701
  if (v !== "system") {
6702
- yG(v);
6702
+ xG(v);
6703
6703
  return;
6704
6704
  }
6705
- if (v === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? yG("dark") : yG("light")), typeof window > "u") return;
6705
+ if (v === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? xG("dark") : xG("light")), typeof window > "u") return;
6706
6706
  let e = window.matchMedia("(prefers-color-scheme: dark)");
6707
6707
  try {
6708
6708
  e.addEventListener("change", ({ matches: e }) => {
6709
- yG(e ? "dark" : "light");
6709
+ xG(e ? "dark" : "light");
6710
6710
  });
6711
6711
  } catch {
6712
6712
  e.addListener(({ matches: e }) => {
6713
6713
  try {
6714
- yG(e ? "dark" : "light");
6714
+ xG(e ? "dark" : "light");
6715
6715
  } catch (e) {
6716
6716
  console.error(e);
6717
6717
  }
6718
6718
  });
6719
6719
  }
6720
6720
  }, [v]), React.useEffect(() => {
6721
- M.length <= 1 && hG(!1);
6721
+ M.length <= 1 && _G(!1);
6722
6722
  }, [M]), React.useEffect(() => {
6723
6723
  let e = (e) => {
6724
6724
  if (l.length > 0 && l.every((t) => e[t] || e.code === t)) {
6725
6725
  var t;
6726
- hG(!0), (t = bG.current) == null || t.focus();
6726
+ _G(!0), (t = SG.current) == null || t.focus();
6727
6727
  }
6728
- e.code === "Escape" && (document.activeElement === bG.current || bG.current?.contains(document.activeElement)) && hG(!1);
6728
+ e.code === "Escape" && (document.activeElement === SG.current || SG.current?.contains(document.activeElement)) && _G(!1);
6729
6729
  };
6730
6730
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
6731
6731
  }, [l]), React.useEffect(() => {
6732
- if (bG.current) return () => {
6733
- SG.current && (SG.current.focus({ preventScroll: !0 }), SG.current = null, CG.current = !1);
6732
+ if (SG.current) return () => {
6733
+ wG.current && (wG.current.focus({ preventScroll: !0 }), wG.current = null, TG.current = !1);
6734
6734
  };
6735
- }, [bG.current]), /* @__PURE__ */ React.createElement("section", {
6735
+ }, [SG.current]), /* @__PURE__ */ React.createElement("section", {
6736
6736
  ref: t,
6737
- "aria-label": A ?? `${j} ${xG}`,
6737
+ "aria-label": A ?? `${j} ${CG}`,
6738
6738
  tabIndex: -1,
6739
6739
  "aria-live": "polite",
6740
6740
  "aria-relevant": "additions text",
@@ -6747,10 +6747,10 @@ var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6747
6747
  key: t,
6748
6748
  dir: w === "auto" ? getDocumentDirection() : w,
6749
6749
  tabIndex: -1,
6750
- ref: bG,
6750
+ ref: SG,
6751
6751
  className: h,
6752
6752
  "data-sonner-toaster": !0,
6753
- "data-sonner-theme": vG,
6753
+ "data-sonner-theme": bG,
6754
6754
  "data-y-position": o,
6755
6755
  "data-x-position": l,
6756
6756
  style: {
@@ -6761,21 +6761,21 @@ var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6761
6761
  ...assignOffset(g, _)
6762
6762
  },
6763
6763
  onBlur: (e) => {
6764
- CG.current && !e.currentTarget.contains(e.relatedTarget) && (CG.current = !1, SG.current &&= (SG.current.focus({ preventScroll: !0 }), null));
6764
+ TG.current && !e.currentTarget.contains(e.relatedTarget) && (TG.current = !1, wG.current &&= (wG.current.focus({ preventScroll: !0 }), null));
6765
6765
  },
6766
6766
  onFocus: (e) => {
6767
- e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || CG.current || (CG.current = !0, SG.current = e.relatedTarget);
6767
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || TG.current || (TG.current = !0, wG.current = e.relatedTarget);
6768
6768
  },
6769
- onMouseEnter: () => hG(!0),
6770
- onMouseMove: () => hG(!0),
6769
+ onMouseEnter: () => _G(!0),
6770
+ onMouseMove: () => _G(!0),
6771
6771
  onMouseLeave: () => {
6772
- gG || hG(!1);
6772
+ vG || _G(!1);
6773
6773
  },
6774
- onDragEnd: () => hG(!1),
6774
+ onDragEnd: () => _G(!1),
6775
6775
  onPointerDown: (e) => {
6776
- e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || _G(!0);
6776
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || yG(!0);
6777
6777
  },
6778
- onPointerUp: () => _G(!1)
6778
+ onPointerUp: () => yG(!1)
6779
6779
  }, R.filter((e) => !e.position && n === 0 || e.position === t).map((n, o) => /* @__PURE__ */ React.createElement(Toast, {
6780
6780
  key: n.id,
6781
6781
  icons: O,
@@ -6788,7 +6788,7 @@ var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6788
6788
  invert: r,
6789
6789
  visibleToasts: S,
6790
6790
  closeButton: C?.closeButton ?? f,
6791
- interacting: gG,
6791
+ interacting: vG,
6792
6792
  position: t,
6793
6793
  style: C?.style,
6794
6794
  unstyled: C?.unstyled,
@@ -6796,7 +6796,7 @@ var Toaster$1 = /* @__PURE__ */ React.forwardRef(function(e, t) {
6796
6796
  cancelButtonStyle: C?.cancelButtonStyle,
6797
6797
  actionButtonStyle: C?.actionButtonStyle,
6798
6798
  closeButtonAriaLabel: C?.closeButtonAriaLabel,
6799
- removeToast: wG,
6799
+ removeToast: EG,
6800
6800
  toasts: R.filter((e) => e.position == n.position),
6801
6801
  heights: V.filter((e) => e.position == n.position),
6802
6802
  setHeights: q,
@@ -9324,11 +9324,11 @@ function useStateMachine(e, t) {
9324
9324
  }
9325
9325
  __name$3(useStateMachine, "useStateMachine");
9326
9326
  var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = /* @__PURE__ */ createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea$1 = /* @__PURE__ */ React$1.forwardRef(/* @__PURE__ */ __name$3(function(e, t) {
9327
- let { __scopeScrollArea: n, type: i = "hover", dir: o, scrollHideDelay: l = 600,...d } = e, [f, h] = React$1.useState(null), [g, _] = React$1.useState(null), [v, y] = React$1.useState(null), [b, x] = React$1.useState(null), [S, C] = React$1.useState(null), [w, E] = React$1.useState(0), [O, A] = React$1.useState(0), [j, M] = React$1.useState(!1), [R, z] = React$1.useState(!1), V = useComposedRefs$1(t, h), mG = useDirection(o);
9327
+ let { __scopeScrollArea: n, type: i = "hover", dir: o, scrollHideDelay: l = 600,...d } = e, [f, h] = React$1.useState(null), [g, _] = React$1.useState(null), [v, y] = React$1.useState(null), [b, x] = React$1.useState(null), [S, C] = React$1.useState(null), [w, E] = React$1.useState(0), [O, A] = React$1.useState(0), [j, M] = React$1.useState(!1), [R, z] = React$1.useState(!1), V = useComposedRefs$1(t, h), gG = useDirection(o);
9328
9328
  return /* @__PURE__ */ jsx(ScrollAreaProvider, {
9329
9329
  scope: n,
9330
9330
  type: i,
9331
- dir: mG,
9331
+ dir: gG,
9332
9332
  scrollHideDelay: l,
9333
9333
  scrollArea: f,
9334
9334
  viewport: g,
@@ -9346,7 +9346,7 @@ var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaS
9346
9346
  onCornerWidthChange: E,
9347
9347
  onCornerHeightChange: A,
9348
9348
  children: /* @__PURE__ */ jsx(Primitive.div, {
9349
- dir: mG,
9349
+ dir: gG,
9350
9350
  ...d,
9351
9351
  ref: V,
9352
9352
  style: {
@@ -9930,11 +9930,11 @@ var __defProp$2 = Object.defineProperty, __name$2 = (e, t) => __defProp$2(e, "na
9930
9930
  focusVisible: E.current
9931
9931
  }), E.current = !1, v(e);
9932
9932
  }, "onChange")
9933
- }), V = React$1.useRef(R), mG = React$1.useRef(R);
9933
+ }), V = React$1.useRef(R), gG = React$1.useRef(R);
9934
9934
  React$1.useEffect(() => {
9935
9935
  let e = x ? A?.ownerDocument.getElementById(x) : A?.closest("form");
9936
9936
  if (e instanceof HTMLFormElement) {
9937
- let t = /* @__PURE__ */ __name$2(() => z(mG.current), "reset");
9937
+ let t = /* @__PURE__ */ __name$2(() => z(gG.current), "reset");
9938
9938
  return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
9939
9939
  }
9940
9940
  }, [
@@ -9944,18 +9944,18 @@ var __defProp$2 = Object.defineProperty, __name$2 = (e, t) => __defProp$2(e, "na
9944
9944
  ]);
9945
9945
  function q(e) {
9946
9946
  let t = getClosestValueIndex(R, e);
9947
- gG(e, t);
9947
+ vG(e, t);
9948
9948
  }
9949
9949
  __name$2(q, "handleSlideStart");
9950
9950
  function Q(e) {
9951
- gG(e, w.current);
9951
+ vG(e, w.current);
9952
9952
  }
9953
9953
  __name$2(Q, "handleSlideMove");
9954
- function hG() {
9954
+ function _G() {
9955
9955
  String(R) !== String(V.current) && y(R);
9956
9956
  }
9957
- __name$2(hG, "handleSlideEnd");
9958
- function gG(e, t, { commit: n } = { commit: !1 }) {
9957
+ __name$2(_G, "handleSlideEnd");
9958
+ function vG(e, t, { commit: n } = { commit: !1 }) {
9959
9959
  let r = getDecimalCount(l), d = roundValue(Math.round((e - i) / l) * l + i, r), f = clamp(d, [i, o]);
9960
9960
  z((e = []) => {
9961
9961
  let r = getNextSortedValues(e, f, t);
@@ -9966,7 +9966,7 @@ var __defProp$2 = Object.defineProperty, __name$2 = (e, t) => __defProp$2(e, "na
9966
9966
  } else return e;
9967
9967
  });
9968
9968
  }
9969
- return __name$2(gG, "updateValues"), /* @__PURE__ */ jsx(SliderProvider, {
9969
+ return __name$2(vG, "updateValues"), /* @__PURE__ */ jsx(SliderProvider, {
9970
9970
  scope: e.__scopeSlider,
9971
9971
  name: n,
9972
9972
  disabled: f,
@@ -9994,12 +9994,12 @@ var __defProp$2 = Object.defineProperty, __name$2 = (e, t) => __defProp$2(e, "na
9994
9994
  inverted: b,
9995
9995
  onSlideStart: f ? void 0 : q,
9996
9996
  onSlideMove: f ? void 0 : Q,
9997
- onSlideEnd: f ? void 0 : hG,
9997
+ onSlideEnd: f ? void 0 : _G,
9998
9998
  onHomeKeyDown: () => {
9999
- f || (E.current = !0, gG(i, 0, { commit: !0 }));
9999
+ f || (E.current = !0, vG(i, 0, { commit: !0 }));
10000
10000
  },
10001
10001
  onEndKeyDown: () => {
10002
- f || (E.current = !0, gG(o, R.length - 1, { commit: !0 }));
10002
+ f || (E.current = !0, vG(o, R.length - 1, { commit: !0 }));
10003
10003
  },
10004
10004
  onStepKeyDown: ({ event: e, direction: t }) => {
10005
10005
  if (!f) {
@@ -10010,7 +10010,7 @@ var __defProp$2 = Object.defineProperty, __name$2 = (e, t) => __defProp$2(e, "na
10010
10010
  direction: t,
10011
10011
  multiplier: n
10012
10012
  });
10013
- gG(d, r, { commit: !0 });
10013
+ vG(d, r, { commit: !0 });
10014
10014
  }
10015
10015
  }
10016
10016
  })
@@ -13049,34 +13049,34 @@ function DayPicker(e) {
13049
13049
  ...t,
13050
13050
  today: d.today()
13051
13051
  });
13052
- let { captionLayout: g, mode: v, navLayout: y, numberOfMonths: b = 1, onDayBlur: x, onDayClick: w, onDayFocus: E, onDayKeyDown: O, onDayMouseEnter: A, onDayMouseLeave: j, onNextClick: M, onPrevClick: I, showWeekNumber: R, styles: z } = t, { formatCaption: V, formatDay: mG, formatMonthDropdown: q, formatWeekNumber: Q, formatWeekNumberHeader: hG, formatWeekdayName: gG, formatYearDropdown: _G } = o, vG = useCalendar(t, d), { days: yG, months: bG, navStart: xG, navEnd: SG, previousMonth: CG, nextMonth: wG, goToMonth: TG } = vG, EG = createGetModifiers(yG, t, xG, SG, d), { isSelected: DG, select: OG, selected: kG } = useSelection(t, d) ?? {}, { blur: AG, focused: jG, isFocusTarget: MG, moveFocus: NG, setFocused: PG } = useFocus(t, vG, EG, DG ?? (() => !1), d), { labelDayButton: FG, labelGridcell: IG, labelGrid: LG, labelMonthDropdown: RG, labelNav: zG, labelPrevious: BG, labelNext: VG, labelWeekday: HG, labelWeekNumber: UG, labelWeekNumberHeader: WG, labelYearDropdown: GG } = l, KG = useMemo(() => getWeekdays(d, t.ISOWeek, t.broadcastCalendar, t.today), [
13052
+ let { captionLayout: g, mode: v, navLayout: y, numberOfMonths: b = 1, onDayBlur: x, onDayClick: w, onDayFocus: E, onDayKeyDown: O, onDayMouseEnter: A, onDayMouseLeave: j, onNextClick: M, onPrevClick: I, showWeekNumber: R, styles: z } = t, { formatCaption: V, formatDay: gG, formatMonthDropdown: q, formatWeekNumber: Q, formatWeekNumberHeader: _G, formatWeekdayName: vG, formatYearDropdown: yG } = o, bG = useCalendar(t, d), { days: xG, months: SG, navStart: CG, navEnd: wG, previousMonth: TG, nextMonth: EG, goToMonth: DG } = bG, OG = createGetModifiers(xG, t, CG, wG, d), { isSelected: kG, select: AG, selected: jG } = useSelection(t, d) ?? {}, { blur: MG, focused: NG, isFocusTarget: PG, moveFocus: FG, setFocused: IG } = useFocus(t, bG, OG, kG ?? (() => !1), d), { labelDayButton: LG, labelGridcell: RG, labelGrid: zG, labelMonthDropdown: BG, labelNav: VG, labelPrevious: HG, labelNext: UG, labelWeekday: WG, labelWeekNumber: GG, labelWeekNumberHeader: KG, labelYearDropdown: qG } = l, JG = useMemo(() => getWeekdays(d, t.ISOWeek, t.broadcastCalendar, t.today), [
13053
13053
  d,
13054
13054
  t.ISOWeek,
13055
13055
  t.broadcastCalendar,
13056
13056
  t.today
13057
- ]), qG = v !== void 0 || w !== void 0, JG = useCallback(() => {
13058
- CG && (TG(CG), I?.(CG));
13057
+ ]), YG = v !== void 0 || w !== void 0, XG = useCallback(() => {
13058
+ TG && (DG(TG), I?.(TG));
13059
13059
  }, [
13060
- CG,
13061
13060
  TG,
13061
+ DG,
13062
13062
  I
13063
- ]), YG = useCallback(() => {
13064
- wG && (TG(wG), M?.(wG));
13063
+ ]), ZG = useCallback(() => {
13064
+ EG && (DG(EG), M?.(EG));
13065
13065
  }, [
13066
- TG,
13067
- wG,
13066
+ DG,
13067
+ EG,
13068
13068
  M
13069
- ]), XG = useCallback((e, t) => (n) => {
13070
- n.preventDefault(), n.stopPropagation(), PG(e), !t.disabled && (OG?.(e.date, t, n), w?.(e.date, t, n));
13069
+ ]), QG = useCallback((e, t) => (n) => {
13070
+ n.preventDefault(), n.stopPropagation(), IG(e), !t.disabled && (AG?.(e.date, t, n), w?.(e.date, t, n));
13071
13071
  }, [
13072
- OG,
13072
+ AG,
13073
13073
  w,
13074
- PG
13075
- ]), ZG = useCallback((e, t) => (n) => {
13076
- PG(e), E?.(e.date, t, n);
13077
- }, [E, PG]), QG = useCallback((e, t) => (n) => {
13078
- AG(), x?.(e.date, t, n);
13079
- }, [AG, x]), $G = useCallback((e, n) => (r) => {
13074
+ IG
13075
+ ]), $G = useCallback((e, t) => (n) => {
13076
+ IG(e), E?.(e.date, t, n);
13077
+ }, [E, IG]), eK = useCallback((e, t) => (n) => {
13078
+ MG(), x?.(e.date, t, n);
13079
+ }, [MG, x]), tK = useCallback((e, n) => (r) => {
13080
13080
  let i = {
13081
13081
  ArrowLeft: [r.shiftKey ? "month" : "day", t.dir === "rtl" ? "after" : "before"],
13082
13082
  ArrowRight: [r.shiftKey ? "month" : "day", t.dir === "rtl" ? "before" : "after"],
@@ -13090,24 +13090,24 @@ function DayPicker(e) {
13090
13090
  if (i[r.key]) {
13091
13091
  r.preventDefault(), r.stopPropagation();
13092
13092
  let [e, t] = i[r.key];
13093
- NG(e, t);
13093
+ FG(e, t);
13094
13094
  }
13095
13095
  O?.(e.date, n, r);
13096
13096
  }, [
13097
- NG,
13097
+ FG,
13098
13098
  O,
13099
13099
  t.dir
13100
- ]), eK = useCallback((e, t) => (n) => {
13100
+ ]), nK = useCallback((e, t) => (n) => {
13101
13101
  A?.(e.date, t, n);
13102
- }, [A]), tK = useCallback((e, t) => (n) => {
13102
+ }, [A]), rK = useCallback((e, t) => (n) => {
13103
13103
  j?.(e.date, t, n);
13104
- }, [j]), nK = useCallback((e, t) => (n) => {
13104
+ }, [j]), iK = useCallback((e, t) => (n) => {
13105
13105
  let r = Number(n.target.value), i = d.setMonth(d.startOfMonth(e), r);
13106
- TG(d.addMonths(i, -t));
13107
- }, [d, TG]), rK = useCallback((e, t) => (n) => {
13106
+ DG(d.addMonths(i, -t));
13107
+ }, [d, DG]), aK = useCallback((e, t) => (n) => {
13108
13108
  let r = Number(n.target.value), i = d.setYear(d.startOfMonth(e), r);
13109
- TG(d.addMonths(i, -t));
13110
- }, [d, TG]), { className: iK, style: aK } = useMemo(() => ({
13109
+ DG(d.addMonths(i, -t));
13110
+ }, [d, DG]), { className: oK, style: sK } = useMemo(() => ({
13111
13111
  className: [h[UI.Root], t.className].filter(Boolean).join(" "),
13112
13112
  style: {
13113
13113
  ...z?.[UI.Root],
@@ -13118,39 +13118,39 @@ function DayPicker(e) {
13118
13118
  t.className,
13119
13119
  t.style,
13120
13120
  z
13121
- ]), oK = getDataAttributes(t), sK = (e) => {
13121
+ ]), cK = getDataAttributes(t), lK = (e) => {
13122
13122
  let t = z?.[UI.Dropdown], n = z?.[e];
13123
13123
  if (!(!t && !n)) return {
13124
13124
  ...t,
13125
13125
  ...n
13126
13126
  };
13127
- }, cK = useRef(null);
13128
- useAnimation(cK, !!t.animate, {
13127
+ }, uK = useRef(null);
13128
+ useAnimation(uK, !!t.animate, {
13129
13129
  classNames: h,
13130
- months: bG,
13131
- focused: jG,
13130
+ months: SG,
13131
+ focused: NG,
13132
13132
  dateLib: d
13133
13133
  });
13134
- let lK = {
13134
+ let dK = {
13135
13135
  dayPickerProps: t,
13136
- selected: kG,
13137
- select: OG,
13138
- isSelected: DG,
13139
- months: bG,
13140
- nextMonth: wG,
13141
- previousMonth: CG,
13142
- goToMonth: TG,
13143
- getModifiers: EG,
13136
+ selected: jG,
13137
+ select: AG,
13138
+ isSelected: kG,
13139
+ months: SG,
13140
+ nextMonth: EG,
13141
+ previousMonth: TG,
13142
+ goToMonth: DG,
13143
+ getModifiers: OG,
13144
13144
  components: r,
13145
13145
  classNames: h,
13146
13146
  styles: z,
13147
13147
  labels: l,
13148
13148
  formatters: o
13149
13149
  };
13150
- return React.createElement(dayPickerContext.Provider, { value: lK }, React.createElement(r.Root, {
13151
- rootRef: t.animate ? cK : void 0,
13152
- className: iK,
13153
- style: aK,
13150
+ return React.createElement(dayPickerContext.Provider, { value: dK }, React.createElement(r.Root, {
13151
+ rootRef: t.animate ? uK : void 0,
13152
+ className: oK,
13153
+ style: sK,
13154
13154
  dir: t.dir,
13155
13155
  id: t.id,
13156
13156
  lang: t.lang ?? f.code,
@@ -13159,7 +13159,7 @@ function DayPicker(e) {
13159
13159
  role: t.role,
13160
13160
  "aria-label": t["aria-label"],
13161
13161
  "aria-labelledby": t["aria-labelledby"],
13162
- ...oK
13162
+ ...cK
13163
13163
  }, React.createElement(r.Months, {
13164
13164
  className: h[UI.Months],
13165
13165
  style: z?.[UI.Months]
@@ -13167,13 +13167,13 @@ function DayPicker(e) {
13167
13167
  "data-animated-nav": t.animate ? "true" : void 0,
13168
13168
  className: h[UI.Nav],
13169
13169
  style: z?.[UI.Nav],
13170
- "aria-label": zG(),
13171
- onPreviousClick: JG,
13172
- onNextClick: YG,
13173
- previousMonth: CG,
13174
- nextMonth: wG
13175
- }), bG.map((e, n) => {
13176
- let l = t.reverseMonths ? bG.length - 1 - n : n;
13170
+ "aria-label": VG(),
13171
+ onPreviousClick: XG,
13172
+ onNextClick: ZG,
13173
+ previousMonth: TG,
13174
+ nextMonth: EG
13175
+ }), SG.map((e, n) => {
13176
+ let l = t.reverseMonths ? SG.length - 1 - n : n;
13177
13177
  return React.createElement(r.Month, {
13178
13178
  "data-animated-month": t.animate ? "true" : void 0,
13179
13179
  className: h[UI.Month],
@@ -13185,13 +13185,13 @@ function DayPicker(e) {
13185
13185
  type: "button",
13186
13186
  className: h[UI.PreviousMonthButton],
13187
13187
  style: z?.[UI.PreviousMonthButton],
13188
- tabIndex: CG ? void 0 : -1,
13189
- "aria-disabled": CG ? void 0 : !0,
13190
- "aria-label": BG(CG),
13191
- onClick: JG,
13188
+ tabIndex: TG ? void 0 : -1,
13189
+ "aria-disabled": TG ? void 0 : !0,
13190
+ "aria-label": HG(TG),
13191
+ onClick: XG,
13192
13192
  "data-animated-button": t.animate ? "true" : void 0
13193
13193
  }, React.createElement(r.Chevron, {
13194
- disabled: CG ? void 0 : !0,
13194
+ disabled: TG ? void 0 : !0,
13195
13195
  className: h[UI.Chevron],
13196
13196
  style: z?.[UI.Chevron],
13197
13197
  orientation: t.dir === "rtl" ? "right" : "left"
@@ -13208,22 +13208,22 @@ function DayPicker(e) {
13208
13208
  let n = g === "dropdown" || g === "dropdown-months" ? React.createElement(r.MonthsDropdown, {
13209
13209
  key: "month",
13210
13210
  className: h[UI.MonthsDropdown],
13211
- "aria-label": RG(),
13211
+ "aria-label": BG(),
13212
13212
  disabled: !!t.disableNavigation,
13213
- onChange: nK(e.date, l),
13214
- options: getMonthOptions(e.date, xG, SG, o, d),
13215
- style: sK(UI.MonthsDropdown),
13213
+ onChange: iK(e.date, l),
13214
+ options: getMonthOptions(e.date, CG, wG, o, d),
13215
+ style: lK(UI.MonthsDropdown),
13216
13216
  value: d.getMonth(e.date)
13217
13217
  }) : React.createElement("span", { key: "month" }, q(e.date, d)), f = g === "dropdown" || g === "dropdown-years" ? React.createElement(r.YearsDropdown, {
13218
13218
  key: "year",
13219
13219
  className: h[UI.YearsDropdown],
13220
- "aria-label": GG(d.options),
13220
+ "aria-label": qG(d.options),
13221
13221
  disabled: !!t.disableNavigation,
13222
- onChange: rK(e.date, l),
13223
- options: getYearOptions(xG, SG, o, d, !!t.reverseYears),
13224
- style: sK(UI.YearsDropdown),
13222
+ onChange: aK(e.date, l),
13223
+ options: getYearOptions(CG, wG, o, d, !!t.reverseYears),
13224
+ style: lK(UI.YearsDropdown),
13225
13225
  value: d.getYear(e.date)
13226
- }) : React.createElement("span", { key: "year" }, _G(e.date, d));
13226
+ }) : React.createElement("span", { key: "year" }, yG(e.date, d));
13227
13227
  return d.getMonthYearOrder() === "year-first" ? [f, n] : [n, f];
13228
13228
  })(), React.createElement("span", {
13229
13229
  role: "status",
@@ -13249,13 +13249,13 @@ function DayPicker(e) {
13249
13249
  type: "button",
13250
13250
  className: h[UI.NextMonthButton],
13251
13251
  style: z?.[UI.NextMonthButton],
13252
- tabIndex: wG ? void 0 : -1,
13253
- "aria-disabled": wG ? void 0 : !0,
13254
- "aria-label": VG(wG),
13255
- onClick: YG,
13252
+ tabIndex: EG ? void 0 : -1,
13253
+ "aria-disabled": EG ? void 0 : !0,
13254
+ "aria-label": UG(EG),
13255
+ onClick: ZG,
13256
13256
  "data-animated-button": t.animate ? "true" : void 0
13257
13257
  }, React.createElement(r.Chevron, {
13258
- disabled: wG ? void 0 : !0,
13258
+ disabled: EG ? void 0 : !0,
13259
13259
  className: h[UI.Chevron],
13260
13260
  style: z?.[UI.Chevron],
13261
13261
  orientation: t.dir === "rtl" ? "left" : "right"
@@ -13263,15 +13263,15 @@ function DayPicker(e) {
13263
13263
  "data-animated-nav": t.animate ? "true" : void 0,
13264
13264
  className: h[UI.Nav],
13265
13265
  style: z?.[UI.Nav],
13266
- "aria-label": zG(),
13267
- onPreviousClick: JG,
13268
- onNextClick: YG,
13269
- previousMonth: CG,
13270
- nextMonth: wG
13266
+ "aria-label": VG(),
13267
+ onPreviousClick: XG,
13268
+ onNextClick: ZG,
13269
+ previousMonth: TG,
13270
+ nextMonth: EG
13271
13271
  }), React.createElement(r.MonthGrid, {
13272
13272
  role: "grid",
13273
13273
  "aria-multiselectable": v === "multiple" || v === "range",
13274
- "aria-label": LG(e.date, d.options, d) || void 0,
13274
+ "aria-label": zG(e.date, d.options, d) || void 0,
13275
13275
  className: h[UI.MonthGrid],
13276
13276
  style: z?.[UI.MonthGrid]
13277
13277
  }, !t.hideWeekdays && React.createElement(r.Weekdays, {
@@ -13279,17 +13279,17 @@ function DayPicker(e) {
13279
13279
  className: h[UI.Weekdays],
13280
13280
  style: z?.[UI.Weekdays]
13281
13281
  }, R && React.createElement(r.WeekNumberHeader, {
13282
- "aria-label": WG(d.options),
13282
+ "aria-label": KG(d.options),
13283
13283
  className: h[UI.WeekNumberHeader],
13284
13284
  style: z?.[UI.WeekNumberHeader],
13285
13285
  scope: "col"
13286
- }, hG()), KG.map((e) => React.createElement(r.Weekday, {
13287
- "aria-label": HG(e, d.options, d),
13286
+ }, _G()), JG.map((e) => React.createElement(r.Weekday, {
13287
+ "aria-label": WG(e, d.options, d),
13288
13288
  className: h[UI.Weekday],
13289
13289
  key: String(e),
13290
13290
  style: z?.[UI.Weekday],
13291
13291
  scope: "col"
13292
- }, gG(e, d.options, d)))), React.createElement(r.Weeks, {
13292
+ }, vG(e, d.options, d)))), React.createElement(r.Weeks, {
13293
13293
  "data-animated-weeks": t.animate ? "true" : void 0,
13294
13294
  className: h[UI.Weeks],
13295
13295
  style: z?.[UI.Weeks]
@@ -13301,17 +13301,17 @@ function DayPicker(e) {
13301
13301
  }, R && React.createElement(r.WeekNumber, {
13302
13302
  week: e,
13303
13303
  style: z?.[UI.WeekNumber],
13304
- "aria-label": UG(e.weekNumber, { locale: f }),
13304
+ "aria-label": GG(e.weekNumber, { locale: f }),
13305
13305
  className: h[UI.WeekNumber],
13306
13306
  scope: "row",
13307
13307
  role: "rowheader"
13308
13308
  }, Q(e.weekNumber, d)), e.days.map((e) => {
13309
- let { date: n } = e, o = EG(e);
13310
- if (o[DayFlag.focused] = !o.hidden && !!jG?.isEqualTo(e), o[SelectionState.selected] = DG?.(n) || o.selected, isDateRange(kG)) {
13311
- let { from: e, to: t } = kG;
13312
- o[SelectionState.range_start] = !!(e && t && d.isSameDay(n, e)), o[SelectionState.range_end] = !!(e && t && d.isSameDay(n, t)), o[SelectionState.range_middle] = rangeIncludesDate(kG, n, !0, d);
13309
+ let { date: n } = e, o = OG(e);
13310
+ if (o[DayFlag.focused] = !o.hidden && !!NG?.isEqualTo(e), o[SelectionState.selected] = kG?.(n) || o.selected, isDateRange(jG)) {
13311
+ let { from: e, to: t } = jG;
13312
+ o[SelectionState.range_start] = !!(e && t && d.isSameDay(n, e)), o[SelectionState.range_end] = !!(e && t && d.isSameDay(n, t)), o[SelectionState.range_middle] = rangeIncludesDate(jG, n, !0, d);
13313
13313
  }
13314
- let l = getStyleForModifiers(o, z, t.modifiersStyles), f = getClassNamesForModifiers(o, h, t.modifiersClassNames), g = !qG && !o.hidden ? IG(n, o, d.options, d) : void 0;
13314
+ let l = getStyleForModifiers(o, z, t.modifiersStyles), f = getClassNamesForModifiers(o, h, t.modifiersClassNames), g = !YG && !o.hidden ? RG(n, o, d.options, d) : void 0;
13315
13315
  return React.createElement(r.Day, {
13316
13316
  key: `${e.isoDate}_${e.displayMonthId}`,
13317
13317
  day: e,
@@ -13329,7 +13329,7 @@ function DayPicker(e) {
13329
13329
  "data-outside": e.outside || void 0,
13330
13330
  "data-focused": o.focused || void 0,
13331
13331
  "data-today": o.today || void 0
13332
- }, !o.hidden && qG ? React.createElement(r.DayButton, {
13332
+ }, !o.hidden && YG ? React.createElement(r.DayButton, {
13333
13333
  className: h[UI.DayButton],
13334
13334
  style: z?.[UI.DayButton],
13335
13335
  type: "button",
@@ -13337,15 +13337,15 @@ function DayPicker(e) {
13337
13337
  modifiers: o,
13338
13338
  disabled: !o.focused && o.disabled || void 0,
13339
13339
  "aria-disabled": o.focused && o.disabled || void 0,
13340
- tabIndex: MG(e) ? 0 : -1,
13341
- "aria-label": FG(n, o, d.options, d),
13342
- onClick: XG(e, o),
13343
- onBlur: QG(e, o),
13344
- onFocus: ZG(e, o),
13345
- onKeyDown: $G(e, o),
13346
- onMouseEnter: eK(e, o),
13347
- onMouseLeave: tK(e, o)
13348
- }, mG(n, d.options, d)) : !o.hidden && mG(e.date, d.options, d));
13340
+ tabIndex: PG(e) ? 0 : -1,
13341
+ "aria-label": LG(n, o, d.options, d),
13342
+ onClick: QG(e, o),
13343
+ onBlur: eK(e, o),
13344
+ onFocus: $G(e, o),
13345
+ onKeyDown: tK(e, o),
13346
+ onMouseEnter: nK(e, o),
13347
+ onMouseLeave: rK(e, o)
13348
+ }, gG(n, d.options, d)) : !o.hidden && gG(e.date, d.options, d));
13349
13349
  }))))));
13350
13350
  })), t.footer && React.createElement(r.Footer, {
13351
13351
  className: h[UI.Footer],
@@ -13636,58 +13636,58 @@ function DragHandler(e, t, n, r, i, o, l, d, f, h, g, _, v, y, b, x, S, C, w) {
13636
13636
  }, V = {
13637
13637
  mouse: 500,
13638
13638
  touch: 600
13639
- }, mG = b ? 43 : 25, q = !1, Q = 0, hG = 0, gG = !1, _G = !1, vG = !1, yG = !1;
13640
- function bG(e) {
13639
+ }, gG = b ? 43 : 25, q = !1, Q = 0, _G = 0, vG = !1, yG = !1, bG = !1, xG = !1;
13640
+ function SG(e) {
13641
13641
  if (!w) return;
13642
13642
  function n(t) {
13643
- (isBoolean(w) || w(e, t)) && EG(t);
13643
+ (isBoolean(w) || w(e, t)) && OG(t);
13644
13644
  }
13645
13645
  let r = t;
13646
- M.add(r, "dragstart", (e) => e.preventDefault(), j).add(r, "touchmove", () => void 0, j).add(r, "touchend", () => void 0).add(r, "touchstart", n).add(r, "mousedown", n).add(r, "touchcancel", OG).add(r, "contextmenu", OG).add(r, "click", kG, !0);
13646
+ M.add(r, "dragstart", (e) => e.preventDefault(), j).add(r, "touchmove", () => void 0, j).add(r, "touchend", () => void 0).add(r, "touchstart", n).add(r, "mousedown", n).add(r, "touchcancel", AG).add(r, "contextmenu", AG).add(r, "click", jG, !0);
13647
13647
  }
13648
- function xG() {
13648
+ function CG() {
13649
13649
  M.clear(), I.clear();
13650
13650
  }
13651
- function SG() {
13652
- let e = yG ? n : t;
13653
- I.add(e, "touchmove", DG, j).add(e, "touchend", OG).add(e, "mousemove", DG, j).add(e, "mouseup", OG);
13651
+ function wG() {
13652
+ let e = xG ? n : t;
13653
+ I.add(e, "touchmove", kG, j).add(e, "touchend", AG).add(e, "mousemove", kG, j).add(e, "mouseup", AG);
13654
13654
  }
13655
- function CG(e) {
13655
+ function TG(e) {
13656
13656
  let t = e.nodeName || "";
13657
13657
  return A.includes(t);
13658
13658
  }
13659
- function wG() {
13660
- return (b ? V : z)[yG ? "mouse" : "touch"];
13659
+ function EG() {
13660
+ return (b ? V : z)[xG ? "mouse" : "touch"];
13661
13661
  }
13662
- function TG(e, t) {
13662
+ function DG(e, t) {
13663
13663
  let n = _.add(mathSign(e) * -1), r = g.byDistance(e, !b).distance;
13664
13664
  return b || mathAbs(e) < R ? r : S && t ? r * .5 : g.byIndex(n.get(), 0).distance;
13665
13665
  }
13666
- function EG(e) {
13666
+ function OG(e) {
13667
13667
  let t = isMouseEvent$1(e, r);
13668
- yG = t, vG = b && t && !e.buttons && q, q = deltaAbs(i.get(), l.get()) >= 2, !(t && e.button !== 0) && (CG(e.target) || (gG = !0, o.pointerDown(e), h.useFriction(0).useDuration(0), i.set(l), SG(), Q = o.readPoint(e), hG = o.readPoint(e, E), v.emit("pointerDown")));
13668
+ xG = t, bG = b && t && !e.buttons && q, q = deltaAbs(i.get(), l.get()) >= 2, !(t && e.button !== 0) && (TG(e.target) || (vG = !0, o.pointerDown(e), h.useFriction(0).useDuration(0), i.set(l), wG(), Q = o.readPoint(e), _G = o.readPoint(e, E), v.emit("pointerDown")));
13669
13669
  }
13670
- function DG(e) {
13671
- if (!isMouseEvent$1(e, r) && e.touches.length >= 2) return OG(e);
13672
- let t = o.readPoint(e), n = o.readPoint(e, E), l = deltaAbs(t, Q), f = deltaAbs(n, hG);
13673
- if (!_G && !yG && (!e.cancelable || (_G = l > f, !_G))) return OG(e);
13670
+ function kG(e) {
13671
+ if (!isMouseEvent$1(e, r) && e.touches.length >= 2) return AG(e);
13672
+ let t = o.readPoint(e), n = o.readPoint(e, E), l = deltaAbs(t, Q), f = deltaAbs(n, _G);
13673
+ if (!yG && !xG && (!e.cancelable || (yG = l > f, !yG))) return AG(e);
13674
13674
  let g = o.pointerMove(e);
13675
- l > x && (vG = !0), h.useFriction(.3).useDuration(.75), d.start(), i.add(O(g)), e.preventDefault();
13675
+ l > x && (bG = !0), h.useFriction(.3).useDuration(.75), d.start(), i.add(O(g)), e.preventDefault();
13676
13676
  }
13677
- function OG(e) {
13678
- let t = g.byDistance(0, !1).index !== _.get(), n = o.pointerUp(e) * wG(), r = TG(O(n), t), i = factorAbs(n, r), l = mG - 10 * i, d = C + i / 50;
13679
- _G = !1, gG = !1, I.clear(), h.useDuration(l).useFriction(d), f.distance(r, !b), yG = !1, v.emit("pointerUp");
13677
+ function AG(e) {
13678
+ let t = g.byDistance(0, !1).index !== _.get(), n = o.pointerUp(e) * EG(), r = DG(O(n), t), i = factorAbs(n, r), l = gG - 10 * i, d = C + i / 50;
13679
+ yG = !1, vG = !1, I.clear(), h.useDuration(l).useFriction(d), f.distance(r, !b), xG = !1, v.emit("pointerUp");
13680
13680
  }
13681
- function kG(e) {
13682
- vG &&= (e.stopPropagation(), e.preventDefault(), !1);
13681
+ function jG(e) {
13682
+ bG &&= (e.stopPropagation(), e.preventDefault(), !1);
13683
13683
  }
13684
- function AG() {
13685
- return gG;
13684
+ function MG() {
13685
+ return vG;
13686
13686
  }
13687
13687
  return {
13688
- init: bG,
13689
- destroy: xG,
13690
- pointerDown: AG
13688
+ init: SG,
13689
+ destroy: CG,
13690
+ pointerDown: MG
13691
13691
  };
13692
13692
  }
13693
13693
  function DragTracker(e, t) {
@@ -14218,56 +14218,56 @@ function SlidesToScroll(e, t, n, r, i, o, l, d, f) {
14218
14218
  return { groupSlides: x };
14219
14219
  }
14220
14220
  function Engine(e, t, n, r, i, o, l) {
14221
- let { align: d, axis: f, direction: h, startIndex: g, loop: _, duration: v, dragFree: y, dragThreshold: b, inViewThreshold: x, slidesToScroll: S, skipSnaps: C, containScroll: w, watchResize: E, watchSlides: O, watchDrag: A, watchFocus: j } = o, M = NodeRects(), I = M.measure(t), R = n.map(M.measure), z = Axis(f, h), V = z.measureSize(I), mG = PercentOfView(V), q = Alignment(d, V), Q = !_ && !!w, { slideSizes: hG, slideSizesWithGaps: gG, startGap: _G, endGap: vG } = SlideSizes(z, I, R, n, _ || !!w, i), yG = SlidesToScroll(z, V, S, _, I, R, _G, vG, 2), { snaps: bG, snapsAligned: xG } = ScrollSnaps(z, q, I, R, yG), SG = -arrayLast(bG) + arrayLast(gG), { snapsContained: CG, scrollContainLimit: wG } = ScrollContain(V, SG, xG, w, 2), TG = Q ? CG : xG, { limit: EG } = ScrollLimit(SG, TG, _), DG = Counter(arrayLastIndex(TG), g, _), OG = DG.clone(), kG = arrayKeys(n), AG = ({ dragHandler: e, scrollBody: t, scrollBounds: n, options: { loop: r } }) => {
14221
+ let { align: d, axis: f, direction: h, startIndex: g, loop: _, duration: v, dragFree: y, dragThreshold: b, inViewThreshold: x, slidesToScroll: S, skipSnaps: C, containScroll: w, watchResize: E, watchSlides: O, watchDrag: A, watchFocus: j } = o, M = NodeRects(), I = M.measure(t), R = n.map(M.measure), z = Axis(f, h), V = z.measureSize(I), gG = PercentOfView(V), q = Alignment(d, V), Q = !_ && !!w, { slideSizes: _G, slideSizesWithGaps: vG, startGap: yG, endGap: bG } = SlideSizes(z, I, R, n, _ || !!w, i), xG = SlidesToScroll(z, V, S, _, I, R, yG, bG, 2), { snaps: SG, snapsAligned: CG } = ScrollSnaps(z, q, I, R, xG), wG = -arrayLast(SG) + arrayLast(vG), { snapsContained: TG, scrollContainLimit: EG } = ScrollContain(V, wG, CG, w, 2), DG = Q ? TG : CG, { limit: OG } = ScrollLimit(wG, DG, _), kG = Counter(arrayLastIndex(DG), g, _), AG = kG.clone(), jG = arrayKeys(n), MG = ({ dragHandler: e, scrollBody: t, scrollBounds: n, options: { loop: r } }) => {
14222
14222
  r || n.constrain(e.pointerDown()), t.seek();
14223
- }, jG = ({ scrollBody: e, translate: t, location: n, offsetLocation: r, previousLocation: i, scrollLooper: o, slideLooper: l, dragHandler: d, animation: f, eventHandler: h, scrollBounds: g, options: { loop: _ } }, v) => {
14223
+ }, NG = ({ scrollBody: e, translate: t, location: n, offsetLocation: r, previousLocation: i, scrollLooper: o, slideLooper: l, dragHandler: d, animation: f, eventHandler: h, scrollBounds: g, options: { loop: _ } }, v) => {
14224
14224
  let y = e.settled(), b = !g.shouldConstrain(), x = _ ? y : y && b, S = x && !d.pointerDown();
14225
14225
  S && f.stop();
14226
14226
  let C = n.get() * v + i.get() * (1 - v);
14227
14227
  r.set(C), _ && (o.loop(e.direction()), l.loop()), t.to(r.get()), S && h.emit("settle"), x || h.emit("scroll");
14228
- }, MG = Animations(r, i, () => AG(qG), (e) => jG(qG, e)), NG = .68, PG = TG[DG.get()], FG = Vector1D(PG), IG = Vector1D(PG), LG = Vector1D(PG), RG = Vector1D(PG), zG = ScrollBody(FG, LG, IG, RG, v, NG), BG = ScrollTarget(_, TG, SG, EG, RG), VG = ScrollTo(MG, DG, OG, zG, BG, RG, l), HG = ScrollProgress(EG), UG = EventStore(), WG = SlidesInView(t, n, l, x), { slideRegistry: GG } = SlideRegistry(Q, w, TG, wG, yG, kG), KG = SlideFocus(e, n, GG, VG, zG, UG, l, j), qG = {
14228
+ }, PG = Animations(r, i, () => MG(YG), (e) => NG(YG, e)), FG = .68, IG = DG[kG.get()], LG = Vector1D(IG), RG = Vector1D(IG), zG = Vector1D(IG), BG = Vector1D(IG), VG = ScrollBody(LG, zG, RG, BG, v, FG), HG = ScrollTarget(_, DG, wG, OG, BG), UG = ScrollTo(PG, kG, AG, VG, HG, BG, l), WG = ScrollProgress(OG), GG = EventStore(), KG = SlidesInView(t, n, l, x), { slideRegistry: qG } = SlideRegistry(Q, w, DG, EG, xG, jG), JG = SlideFocus(e, n, qG, UG, VG, GG, l, j), YG = {
14229
14229
  ownerDocument: r,
14230
14230
  ownerWindow: i,
14231
14231
  eventHandler: l,
14232
14232
  containerRect: I,
14233
14233
  slideRects: R,
14234
- animation: MG,
14234
+ animation: PG,
14235
14235
  axis: z,
14236
- dragHandler: DragHandler(z, e, r, i, RG, DragTracker(z, i), FG, MG, VG, zG, BG, DG, l, mG, y, b, C, NG, A),
14237
- eventStore: UG,
14238
- percentOfView: mG,
14239
- index: DG,
14240
- indexPrevious: OG,
14241
- limit: EG,
14242
- location: FG,
14243
- offsetLocation: LG,
14244
- previousLocation: IG,
14236
+ dragHandler: DragHandler(z, e, r, i, BG, DragTracker(z, i), LG, PG, UG, VG, HG, kG, l, gG, y, b, C, FG, A),
14237
+ eventStore: GG,
14238
+ percentOfView: gG,
14239
+ index: kG,
14240
+ indexPrevious: AG,
14241
+ limit: OG,
14242
+ location: LG,
14243
+ offsetLocation: zG,
14244
+ previousLocation: RG,
14245
14245
  options: o,
14246
14246
  resizeHandler: ResizeHandler(t, l, i, n, z, E, M),
14247
- scrollBody: zG,
14248
- scrollBounds: ScrollBounds(EG, LG, RG, zG, mG),
14249
- scrollLooper: ScrollLooper(SG, EG, LG, [
14250
- FG,
14247
+ scrollBody: VG,
14248
+ scrollBounds: ScrollBounds(OG, zG, BG, VG, gG),
14249
+ scrollLooper: ScrollLooper(wG, OG, zG, [
14251
14250
  LG,
14252
- IG,
14253
- RG
14251
+ zG,
14252
+ RG,
14253
+ BG
14254
14254
  ]),
14255
- scrollProgress: HG,
14256
- scrollSnapList: TG.map(HG.get),
14257
- scrollSnaps: TG,
14258
- scrollTarget: BG,
14259
- scrollTo: VG,
14260
- slideLooper: SlideLooper(z, V, SG, hG, gG, bG, TG, LG, n),
14261
- slideFocus: KG,
14255
+ scrollProgress: WG,
14256
+ scrollSnapList: DG.map(WG.get),
14257
+ scrollSnaps: DG,
14258
+ scrollTarget: HG,
14259
+ scrollTo: UG,
14260
+ slideLooper: SlideLooper(z, V, wG, _G, vG, SG, DG, zG, n),
14261
+ slideFocus: JG,
14262
14262
  slidesHandler: SlidesHandler(t, l, O),
14263
- slidesInView: WG,
14264
- slideIndexes: kG,
14265
- slideRegistry: GG,
14266
- slidesToScroll: yG,
14267
- target: RG,
14263
+ slidesInView: KG,
14264
+ slideIndexes: jG,
14265
+ slideRegistry: qG,
14266
+ slidesToScroll: xG,
14267
+ target: BG,
14268
14268
  translate: Translate(z, t)
14269
14269
  };
14270
- return qG;
14270
+ return YG;
14271
14271
  }
14272
14272
  function EventHandler() {
14273
14273
  let e = {}, t;
@@ -14367,92 +14367,92 @@ function EmblaCarousel(e, t, n) {
14367
14367
  return n;
14368
14368
  }
14369
14369
  function z(e, t) {
14370
- S || (w = h(w, e), E = g(w), O = t || O, I(), C = R(E), _([w, ...O.map(({ options: e }) => e)]).forEach((e) => d.add(e, "change", V)), E.active && (C.translate.to(C.location.get()), C.animation.init(), C.slidesInView.init(), C.slideFocus.init(AG), C.eventHandler.init(AG), C.resizeHandler.init(AG), C.slidesHandler.init(AG), C.options.loop && C.slideLooper.loop(), j.offsetParent && M.length && C.dragHandler.init(AG), A = l.init(AG, O)));
14370
+ S || (w = h(w, e), E = g(w), O = t || O, I(), C = R(E), _([w, ...O.map(({ options: e }) => e)]).forEach((e) => d.add(e, "change", V)), E.active && (C.translate.to(C.location.get()), C.animation.init(), C.slidesInView.init(), C.slideFocus.init(MG), C.eventHandler.init(MG), C.resizeHandler.init(MG), C.slidesHandler.init(MG), C.options.loop && C.slideLooper.loop(), j.offsetParent && M.length && C.dragHandler.init(MG), A = l.init(MG, O)));
14371
14371
  }
14372
14372
  function V(e, t) {
14373
- let n = xG();
14374
- mG(), z(h({ startIndex: n }, e), t), f.emit("reInit");
14373
+ let n = CG();
14374
+ gG(), z(h({ startIndex: n }, e), t), f.emit("reInit");
14375
14375
  }
14376
- function mG() {
14376
+ function gG() {
14377
14377
  C.dragHandler.destroy(), C.eventStore.clear(), C.translate.clear(), C.slideLooper.clear(), C.resizeHandler.destroy(), C.slidesHandler.destroy(), C.slidesInView.destroy(), C.animation.destroy(), l.destroy(), d.clear();
14378
14378
  }
14379
14379
  function q() {
14380
- S || (S = !0, d.clear(), mG(), f.emit("destroy"), f.clear());
14380
+ S || (S = !0, d.clear(), gG(), f.emit("destroy"), f.clear());
14381
14381
  }
14382
14382
  function Q(e, t, n) {
14383
14383
  !E.active || S || (C.scrollBody.useBaseFriction().useDuration(t === !0 ? 0 : E.duration), C.scrollTo.index(e, n || 0));
14384
14384
  }
14385
- function hG(e) {
14385
+ function _G(e) {
14386
14386
  let t = C.index.add(1).get();
14387
14387
  Q(t, e, -1);
14388
14388
  }
14389
- function gG(e) {
14389
+ function vG(e) {
14390
14390
  let t = C.index.add(-1).get();
14391
14391
  Q(t, e, 1);
14392
14392
  }
14393
- function _G() {
14394
- return C.index.add(1).get() !== xG();
14393
+ function yG() {
14394
+ return C.index.add(1).get() !== CG();
14395
14395
  }
14396
- function vG() {
14397
- return C.index.add(-1).get() !== xG();
14396
+ function bG() {
14397
+ return C.index.add(-1).get() !== CG();
14398
14398
  }
14399
- function yG() {
14399
+ function xG() {
14400
14400
  return C.scrollSnapList;
14401
14401
  }
14402
- function bG() {
14402
+ function SG() {
14403
14403
  return C.scrollProgress.get(C.offsetLocation.get());
14404
14404
  }
14405
- function xG() {
14405
+ function CG() {
14406
14406
  return C.index.get();
14407
14407
  }
14408
- function SG() {
14408
+ function wG() {
14409
14409
  return C.indexPrevious.get();
14410
14410
  }
14411
- function CG() {
14411
+ function TG() {
14412
14412
  return C.slidesInView.get();
14413
14413
  }
14414
- function wG() {
14414
+ function EG() {
14415
14415
  return C.slidesInView.get(!1);
14416
14416
  }
14417
- function TG() {
14417
+ function DG() {
14418
14418
  return A;
14419
14419
  }
14420
- function EG() {
14420
+ function OG() {
14421
14421
  return C;
14422
14422
  }
14423
- function DG() {
14423
+ function kG() {
14424
14424
  return e;
14425
14425
  }
14426
- function OG() {
14426
+ function AG() {
14427
14427
  return j;
14428
14428
  }
14429
- function kG() {
14429
+ function jG() {
14430
14430
  return M;
14431
14431
  }
14432
- let AG = {
14433
- canScrollNext: _G,
14434
- canScrollPrev: vG,
14435
- containerNode: OG,
14436
- internalEngine: EG,
14432
+ let MG = {
14433
+ canScrollNext: yG,
14434
+ canScrollPrev: bG,
14435
+ containerNode: AG,
14436
+ internalEngine: OG,
14437
14437
  destroy: q,
14438
14438
  off: y,
14439
14439
  on: v,
14440
14440
  emit: b,
14441
- plugins: TG,
14442
- previousScrollSnap: SG,
14441
+ plugins: DG,
14442
+ previousScrollSnap: wG,
14443
14443
  reInit: x,
14444
- rootNode: DG,
14445
- scrollNext: hG,
14446
- scrollPrev: gG,
14447
- scrollProgress: bG,
14448
- scrollSnapList: yG,
14444
+ rootNode: kG,
14445
+ scrollNext: _G,
14446
+ scrollPrev: vG,
14447
+ scrollProgress: SG,
14448
+ scrollSnapList: xG,
14449
14449
  scrollTo: Q,
14450
- selectedScrollSnap: xG,
14451
- slideNodes: kG,
14452
- slidesInView: CG,
14453
- slidesNotInView: wG
14450
+ selectedScrollSnap: CG,
14451
+ slideNodes: jG,
14452
+ slidesInView: TG,
14453
+ slidesNotInView: EG
14454
14454
  };
14455
- return z(t, n), setTimeout(() => f.emit("init"), 0), AG;
14455
+ return z(t, n), setTimeout(() => f.emit("init"), 0), MG;
14456
14456
  }
14457
14457
  EmblaCarousel.globalOptions = void 0;
14458
14458
  function useEmblaCarousel(e = {}, t = []) {
@@ -14980,50 +14980,50 @@ var require_isArray = /* @__PURE__ */ __commonJSMin(((e, t) => {
14980
14980
  }
14981
14981
  }
14982
14982
  }
14983
- var M = d, I = l, R = t, z = h, V = r, mG = y, q = v, Q = n, hG = o, gG = i, _G = g, vG = _, yG = !1, bG = !1;
14984
- function xG(e) {
14985
- return yG || (yG = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
14983
+ var M = d, I = l, R = t, z = h, V = r, gG = y, q = v, Q = n, _G = o, vG = i, yG = g, bG = _, xG = !1, SG = !1;
14984
+ function CG(e) {
14985
+ return xG || (xG = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
14986
14986
  }
14987
- function SG(e) {
14988
- return bG || (bG = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
14987
+ function wG(e) {
14988
+ return SG || (SG = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
14989
14989
  }
14990
- function CG(e) {
14990
+ function TG(e) {
14991
14991
  return j(e) === d;
14992
14992
  }
14993
- function wG(e) {
14993
+ function EG(e) {
14994
14994
  return j(e) === l;
14995
14995
  }
14996
- function TG(e) {
14996
+ function DG(e) {
14997
14997
  return typeof e == "object" && !!e && e.$$typeof === t;
14998
14998
  }
14999
- function EG(e) {
14999
+ function OG(e) {
15000
15000
  return j(e) === h;
15001
15001
  }
15002
- function DG(e) {
15002
+ function kG(e) {
15003
15003
  return j(e) === r;
15004
15004
  }
15005
- function OG(e) {
15005
+ function AG(e) {
15006
15006
  return j(e) === y;
15007
15007
  }
15008
- function kG(e) {
15008
+ function jG(e) {
15009
15009
  return j(e) === v;
15010
15010
  }
15011
- function AG(e) {
15011
+ function MG(e) {
15012
15012
  return j(e) === n;
15013
15013
  }
15014
- function jG(e) {
15014
+ function NG(e) {
15015
15015
  return j(e) === o;
15016
15016
  }
15017
- function MG(e) {
15017
+ function PG(e) {
15018
15018
  return j(e) === i;
15019
15019
  }
15020
- function NG(e) {
15020
+ function FG(e) {
15021
15021
  return j(e) === g;
15022
15022
  }
15023
- function PG(e) {
15023
+ function IG(e) {
15024
15024
  return j(e) === _;
15025
15025
  }
15026
- e.ContextConsumer = M, e.ContextProvider = I, e.Element = R, e.ForwardRef = z, e.Fragment = V, e.Lazy = mG, e.Memo = q, e.Portal = Q, e.Profiler = hG, e.StrictMode = gG, e.Suspense = _G, e.SuspenseList = vG, e.isAsyncMode = xG, e.isConcurrentMode = SG, e.isContextConsumer = CG, e.isContextProvider = wG, e.isElement = TG, e.isForwardRef = EG, e.isFragment = DG, e.isLazy = OG, e.isMemo = kG, e.isPortal = AG, e.isProfiler = jG, e.isStrictMode = MG, e.isSuspense = NG, e.isSuspenseList = PG, e.isValidElementType = A, e.typeOf = j;
15026
+ e.ContextConsumer = M, e.ContextProvider = I, e.Element = R, e.ForwardRef = z, e.Fragment = V, e.Lazy = gG, e.Memo = q, e.Portal = Q, e.Profiler = _G, e.StrictMode = vG, e.Suspense = yG, e.SuspenseList = bG, e.isAsyncMode = CG, e.isConcurrentMode = wG, e.isContextConsumer = TG, e.isContextProvider = EG, e.isElement = DG, e.isForwardRef = OG, e.isFragment = kG, e.isLazy = AG, e.isMemo = jG, e.isPortal = MG, e.isProfiler = NG, e.isStrictMode = PG, e.isSuspense = FG, e.isSuspenseList = IG, e.isValidElementType = A, e.typeOf = j;
15027
15027
  })();
15028
15028
  })), require_react_is = /* @__PURE__ */ __commonJSMin(((e, t) => {
15029
15029
  process.env.NODE_ENV === "production" ? t.exports = require_react_is_production_min() : t.exports = require_react_is_development();
@@ -15821,8 +15821,8 @@ var require__stackClear = /* @__PURE__ */ __commonJSMin(((e, t) => {
15821
15821
  case S:
15822
15822
  var V = A & f;
15823
15823
  if (z ||= d, e.size != t.size && !V) return !1;
15824
- var mG = R.get(e);
15825
- if (mG) return mG == t;
15824
+ var gG = R.get(e);
15825
+ if (gG) return gG == t;
15826
15826
  A |= h, R.set(e, t);
15827
15827
  var q = o(z(e), z(t), A, M, I, R);
15828
15828
  return R.delete(e), q;
@@ -15906,8 +15906,8 @@ var require__stackClear = /* @__PURE__ */ __commonJSMin(((e, t) => {
15906
15906
  }
15907
15907
  t.exports = r;
15908
15908
  })), require__baseIsTypedArray = /* @__PURE__ */ __commonJSMin(((e, t) => {
15909
- var n = require__baseGetTag(), r = require_isLength(), i = require_isObjectLike(), o = "[object Arguments]", l = "[object Array]", d = "[object Boolean]", f = "[object Date]", h = "[object Error]", g = "[object Function]", _ = "[object Map]", v = "[object Number]", y = "[object Object]", b = "[object RegExp]", x = "[object Set]", S = "[object String]", C = "[object WeakMap]", w = "[object ArrayBuffer]", E = "[object DataView]", O = "[object Float32Array]", A = "[object Float64Array]", j = "[object Int8Array]", M = "[object Int16Array]", I = "[object Int32Array]", R = "[object Uint8Array]", z = "[object Uint8ClampedArray]", V = "[object Uint16Array]", mG = "[object Uint32Array]", q = {};
15910
- q[O] = q[A] = q[j] = q[M] = q[I] = q[R] = q[z] = q[V] = q[mG] = !0, q[o] = q[l] = q[w] = q[d] = q[E] = q[f] = q[h] = q[g] = q[_] = q[v] = q[y] = q[b] = q[x] = q[S] = q[C] = !1;
15909
+ var n = require__baseGetTag(), r = require_isLength(), i = require_isObjectLike(), o = "[object Arguments]", l = "[object Array]", d = "[object Boolean]", f = "[object Date]", h = "[object Error]", g = "[object Function]", _ = "[object Map]", v = "[object Number]", y = "[object Object]", b = "[object RegExp]", x = "[object Set]", S = "[object String]", C = "[object WeakMap]", w = "[object ArrayBuffer]", E = "[object DataView]", O = "[object Float32Array]", A = "[object Float64Array]", j = "[object Int8Array]", M = "[object Int16Array]", I = "[object Int32Array]", R = "[object Uint8Array]", z = "[object Uint8ClampedArray]", V = "[object Uint16Array]", gG = "[object Uint32Array]", q = {};
15910
+ q[O] = q[A] = q[j] = q[M] = q[I] = q[R] = q[z] = q[V] = q[gG] = !0, q[o] = q[l] = q[w] = q[d] = q[E] = q[f] = q[h] = q[g] = q[_] = q[v] = q[y] = q[b] = q[x] = q[S] = q[C] = !1;
15911
15911
  function Q(e) {
15912
15912
  return i(e) && r(e.length) && !!q[n(e)];
15913
15913
  }
@@ -16049,8 +16049,8 @@ var require__stackClear = /* @__PURE__ */ __commonJSMin(((e, t) => {
16049
16049
  if (!(x & g)) {
16050
16050
  var z = M && b.call(e, "__wrapped__"), V = I && b.call(t, "__wrapped__");
16051
16051
  if (z || V) {
16052
- var mG = z ? e.value() : e, q = V ? t.value() : t;
16053
- return w ||= new n(), C(mG, q, x, S, w);
16052
+ var gG = z ? e.value() : e, q = V ? t.value() : t;
16053
+ return w ||= new n(), C(gG, q, x, S, w);
16054
16054
  }
16055
16055
  }
16056
16056
  return R ? (w ||= new n(), o(e, t, x, S, C, w)) : !1;
@@ -17497,8 +17497,8 @@ var ResponsiveContainer = /* @__PURE__ */ forwardRef(function(t, n) {
17497
17497
  var r = t.aspect, o = t.initialDimension, d = o === void 0 ? {
17498
17498
  width: -1,
17499
17499
  height: -1
17500
- } : o, f = t.width, h = f === void 0 ? "100%" : f, g = t.height, v = g === void 0 ? "100%" : g, x = t.minWidth, E = x === void 0 ? 0 : x, O = t.minHeight, A = t.maxHeight, j = t.children, M = t.debounce, I = M === void 0 ? 0 : M, R = t.id, z = t.className, V = t.onResize, mG = t.style, q = mG === void 0 ? {} : mG, Q = useRef(null), hG = useRef();
17501
- hG.current = V, useImperativeHandle(n, function() {
17500
+ } : o, f = t.width, h = f === void 0 ? "100%" : f, g = t.height, v = g === void 0 ? "100%" : g, x = t.minWidth, E = x === void 0 ? 0 : x, O = t.minHeight, A = t.maxHeight, j = t.children, M = t.debounce, I = M === void 0 ? 0 : M, R = t.id, z = t.className, V = t.onResize, gG = t.style, q = gG === void 0 ? {} : gG, Q = useRef(null), _G = useRef();
17501
+ _G.current = V, useImperativeHandle(n, function() {
17502
17502
  return Object.defineProperty(Q.current, "current", {
17503
17503
  get: function() {
17504
17504
  return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."), Q.current;
@@ -17506,11 +17506,11 @@ var ResponsiveContainer = /* @__PURE__ */ forwardRef(function(t, n) {
17506
17506
  configurable: !0
17507
17507
  });
17508
17508
  });
17509
- var gG = useState({
17509
+ var vG = useState({
17510
17510
  containerWidth: d.width,
17511
17511
  containerHeight: d.height
17512
- }), _G = _slicedToArray(gG, 2), vG = _G[0], yG = _G[1], bG = useCallback(function(e, t) {
17513
- yG(function(n) {
17512
+ }), yG = _slicedToArray(vG, 2), bG = yG[0], xG = yG[1], SG = useCallback(function(e, t) {
17513
+ xG(function(n) {
17514
17514
  var r = Math.round(e), i = Math.round(t);
17515
17515
  return n.containerWidth === r && n.containerHeight === i ? n : {
17516
17516
  containerWidth: r,
@@ -17521,19 +17521,19 @@ var ResponsiveContainer = /* @__PURE__ */ forwardRef(function(t, n) {
17521
17521
  useEffect(function() {
17522
17522
  var e = function(e) {
17523
17523
  var t, n = e[0].contentRect, r = n.width, i = n.height;
17524
- bG(r, i), (t = hG.current) == null || t.call(hG, r, i);
17524
+ SG(r, i), (t = _G.current) == null || t.call(_G, r, i);
17525
17525
  };
17526
17526
  I > 0 && (e = (0, import_throttle.default)(e, I, {
17527
17527
  trailing: !0,
17528
17528
  leading: !1
17529
17529
  }));
17530
17530
  var t = new ResizeObserver(e), n = Q.current.getBoundingClientRect(), r = n.width, i = n.height;
17531
- return bG(r, i), t.observe(Q.current), function() {
17531
+ return SG(r, i), t.observe(Q.current), function() {
17532
17532
  t.disconnect();
17533
17533
  };
17534
- }, [bG, I]);
17535
- var xG = useMemo(function() {
17536
- var e = vG.containerWidth, t = vG.containerHeight;
17534
+ }, [SG, I]);
17535
+ var CG = useMemo(function() {
17536
+ var e = bG.containerWidth, t = bG.containerHeight;
17537
17537
  if (e < 0 || t < 0) return null;
17538
17538
  warn(isPercent(h) || isPercent(v), "The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.", h, v), warn(!r || r > 0, "The aspect(%s) must be greater than zero.", r);
17539
17539
  var n = isPercent(h) ? e : h, o = isPercent(v) ? t : v;
@@ -17557,7 +17557,7 @@ var ResponsiveContainer = /* @__PURE__ */ forwardRef(function(t, n) {
17557
17557
  A,
17558
17558
  O,
17559
17559
  E,
17560
- vG,
17560
+ bG,
17561
17561
  h
17562
17562
  ]);
17563
17563
  return /* @__PURE__ */ React.createElement("div", {
@@ -17571,7 +17571,7 @@ var ResponsiveContainer = /* @__PURE__ */ forwardRef(function(t, n) {
17571
17571
  maxHeight: A
17572
17572
  }),
17573
17573
  ref: Q
17574
- }, xG);
17574
+ }, CG);
17575
17575
  }), THEMES = {
17576
17576
  light: "",
17577
17577
  dark: ".dark"
@@ -17731,14 +17731,14 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17731
17731
  setState: (e, t, r) => {
17732
17732
  var i, o, l;
17733
17733
  if (!Object.is(n.current[e], t)) {
17734
- if (n.current[e] = t, e === "search") q(), V(), M(1, mG);
17734
+ if (n.current[e] = t, e === "search") q(), V(), M(1, gG);
17735
17735
  else if (e === "value") {
17736
17736
  if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
17737
17737
  let e = document.getElementById(A);
17738
17738
  e ? e.focus() : (i = document.getElementById(E)) == null || i.focus();
17739
17739
  }
17740
17740
  if (M(7, () => {
17741
- n.current.selectedItemId = hG()?.id, I.emit();
17741
+ n.current.selectedItemId = _G()?.id, I.emit();
17742
17742
  }), r || M(5, Q), f.current?.value !== void 0) {
17743
17743
  let e = t ?? "";
17744
17744
  (l = (o = f.current).onValueChange) == null || l.call(o, e);
@@ -17761,12 +17761,12 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17761
17761
  }));
17762
17762
  },
17763
17763
  item: (e, t) => (i.current.add(e), t && (o.current.has(t) ? o.current.get(t).add(e) : o.current.set(t, new Set([e]))), M(3, () => {
17764
- q(), V(), n.current.value || mG(), I.emit();
17764
+ q(), V(), n.current.value || gG(), I.emit();
17765
17765
  }), () => {
17766
17766
  l.current.delete(e), i.current.delete(e), n.current.filtered.items.delete(e);
17767
- let t = hG();
17767
+ let t = _G();
17768
17768
  M(4, () => {
17769
- q(), t?.getAttribute("id") === e && mG(), I.emit();
17769
+ q(), t?.getAttribute("id") === e && gG(), I.emit();
17770
17770
  });
17771
17771
  }),
17772
17772
  group: (e) => (o.current.has(e) || o.current.set(e, /* @__PURE__ */ new Set()), () => {
@@ -17795,7 +17795,7 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17795
17795
  }), t.push([n, i]);
17796
17796
  });
17797
17797
  let r = j.current;
17798
- gG().sort((t, n) => {
17798
+ vG().sort((t, n) => {
17799
17799
  let r = t.getAttribute("id"), i = n.getAttribute("id");
17800
17800
  return (e.get(i) ?? 0) - (e.get(r) ?? 0);
17801
17801
  }).forEach((e) => {
@@ -17806,8 +17806,8 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17806
17806
  t?.parentElement.appendChild(t);
17807
17807
  });
17808
17808
  }
17809
- function mG() {
17810
- let e = gG().find((e) => e.getAttribute("aria-disabled") !== "true")?.getAttribute(T);
17809
+ function gG() {
17810
+ let e = vG().find((e) => e.getAttribute("aria-disabled") !== "true")?.getAttribute(T);
17811
17811
  I.setState("value", e || void 0);
17812
17812
  }
17813
17813
  function q() {
@@ -17829,33 +17829,33 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17829
17829
  }
17830
17830
  function Q() {
17831
17831
  var e;
17832
- let t = hG();
17832
+ let t = _G();
17833
17833
  t && (t.parentElement?.firstChild === t && ((e = t.closest(N)?.querySelector(be)) == null || e.scrollIntoView({ block: "nearest" })), t.scrollIntoView({ block: "nearest" }));
17834
17834
  }
17835
- function hG() {
17835
+ function _G() {
17836
17836
  return j.current?.querySelector(`${le}[aria-selected="true"]`);
17837
17837
  }
17838
- function gG() {
17838
+ function vG() {
17839
17839
  return Array.from(j.current?.querySelectorAll(ce) || []);
17840
17840
  }
17841
- function _G(e) {
17842
- let t = gG()[e];
17841
+ function yG(e) {
17842
+ let t = vG()[e];
17843
17843
  t && I.setState("value", t.getAttribute(T));
17844
17844
  }
17845
- function vG(e) {
17845
+ function bG(e) {
17846
17846
  var t;
17847
- let n = hG(), r = gG(), i = r.findIndex((e) => e === n), o = r[i + e];
17847
+ let n = _G(), r = vG(), i = r.findIndex((e) => e === n), o = r[i + e];
17848
17848
  (t = f.current) != null && t.loop && (o = i + e < 0 ? r[r.length - 1] : i + e === r.length ? r[0] : r[i + e]), o && I.setState("value", o.getAttribute(T));
17849
17849
  }
17850
- function yG(e) {
17851
- let t = hG()?.closest(N), n;
17850
+ function xG(e) {
17851
+ let t = _G()?.closest(N), n;
17852
17852
  for (; t && !n;) t = e > 0 ? we(t, N) : De(t, N), n = t?.querySelector(ce);
17853
- n ? I.setState("value", n.getAttribute(T)) : vG(e);
17853
+ n ? I.setState("value", n.getAttribute(T)) : bG(e);
17854
17854
  }
17855
- let bG = () => _G(gG().length - 1), xG = (e) => {
17856
- e.preventDefault(), e.metaKey ? bG() : e.altKey ? yG(1) : vG(1);
17857
- }, SG = (e) => {
17858
- e.preventDefault(), e.metaKey ? _G(0) : e.altKey ? yG(-1) : vG(-1);
17855
+ let SG = () => yG(vG().length - 1), CG = (e) => {
17856
+ e.preventDefault(), e.metaKey ? SG() : e.altKey ? xG(1) : bG(1);
17857
+ }, wG = (e) => {
17858
+ e.preventDefault(), e.metaKey ? yG(0) : e.altKey ? xG(-1) : bG(-1);
17859
17859
  };
17860
17860
  return React$1.createElement(Primitive.div, {
17861
17861
  ref: t,
@@ -17869,27 +17869,27 @@ var N = "[cmdk-group=\"\"]", Y = "[cmdk-group-items=\"\"]", be = "[cmdk-group-he
17869
17869
  if (!(e.defaultPrevented || n)) switch (e.key) {
17870
17870
  case "n":
17871
17871
  case "j":
17872
- C && e.ctrlKey && xG(e);
17872
+ C && e.ctrlKey && CG(e);
17873
17873
  break;
17874
17874
  case "ArrowDown":
17875
- xG(e);
17875
+ CG(e);
17876
17876
  break;
17877
17877
  case "p":
17878
17878
  case "k":
17879
- C && e.ctrlKey && SG(e);
17879
+ C && e.ctrlKey && wG(e);
17880
17880
  break;
17881
17881
  case "ArrowUp":
17882
- SG(e);
17882
+ wG(e);
17883
17883
  break;
17884
17884
  case "Home":
17885
- e.preventDefault(), _G(0);
17885
+ e.preventDefault(), yG(0);
17886
17886
  break;
17887
17887
  case "End":
17888
- e.preventDefault(), bG();
17888
+ e.preventDefault(), SG();
17889
17889
  break;
17890
17890
  case "Enter": {
17891
17891
  e.preventDefault();
17892
- let t = hG();
17892
+ let t = _G();
17893
17893
  if (t) {
17894
17894
  let e = new Event(Z);
17895
17895
  t.dispatchEvent(e);
@@ -18669,80 +18669,80 @@ function usePositionFixed({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, pr
18669
18669
  _
18670
18670
  ]), { restorePositionSetting: _ };
18671
18671
  }
18672
- function Root({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: l, shouldScaleBackground: d = !1, setBackgroundColorOnScale: f = !0, closeThreshold: h = CLOSE_THRESHOLD, scrollLockTimeout: g = SCROLL_LOCK_TIMEOUT, dismissible: _ = !0, handleOnly: v = !1, fadeFromIndex: y = l && l.length - 1, activeSnapPoint: b, setActiveSnapPoint: x, fixed: S, modal: C = !0, onClose: w, nested: E, noBodyStyles: O = !1, direction: A = "bottom", defaultOpen: j = !1, disablePreventScroll: M = !0, snapToSequentialPoint: I = !1, preventScrollRestoration: R = !1, repositionInputs: z = !0, onAnimationEnd: V, container: mG, autoFocus: q = !1 }) {
18673
- let [Q = !1, hG] = useControllableState({
18672
+ function Root({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: l, shouldScaleBackground: d = !1, setBackgroundColorOnScale: f = !0, closeThreshold: h = CLOSE_THRESHOLD, scrollLockTimeout: g = SCROLL_LOCK_TIMEOUT, dismissible: _ = !0, handleOnly: v = !1, fadeFromIndex: y = l && l.length - 1, activeSnapPoint: b, setActiveSnapPoint: x, fixed: S, modal: C = !0, onClose: w, nested: E, noBodyStyles: O = !1, direction: A = "bottom", defaultOpen: j = !1, disablePreventScroll: M = !0, snapToSequentialPoint: I = !1, preventScrollRestoration: R = !1, repositionInputs: z = !0, onAnimationEnd: V, container: gG, autoFocus: q = !1 }) {
18673
+ let [Q = !1, _G] = useControllableState({
18674
18674
  defaultProp: j,
18675
18675
  prop: e,
18676
18676
  onChange: (e) => {
18677
- t?.(e), !e && !E && KG(), setTimeout(() => {
18677
+ t?.(e), !e && !E && JG(), setTimeout(() => {
18678
18678
  V?.(e);
18679
18679
  }, TRANSITIONS.DURATION * 1e3), e && !C && typeof window < "u" && window.requestAnimationFrame(() => {
18680
18680
  document.body.style.pointerEvents = "auto";
18681
18681
  }), e || (document.body.style.pointerEvents = "auto");
18682
18682
  }
18683
- }), [gG, _G] = React.useState(!1), [vG, yG] = React.useState(!1), [bG, xG] = React.useState(!1), SG = React.useRef(null), CG = React.useRef(null), wG = React.useRef(null), TG = React.useRef(null), EG = React.useRef(null), DG = React.useRef(!1), OG = React.useRef(null), kG = React.useRef(0), AG = React.useRef(!1), jG = React.useRef(!j), MG = React.useRef(0), NG = React.useRef(null), PG = React.useRef(NG.current?.getBoundingClientRect().height || 0), FG = React.useRef(NG.current?.getBoundingClientRect().width || 0), IG = React.useRef(0), LG = React.useCallback((e) => {
18684
- l && e === HG.length - 1 && (CG.current = /* @__PURE__ */ new Date());
18685
- }, []), { activeSnapPoint: RG, activeSnapPointIndex: zG, setActiveSnapPoint: BG, onRelease: VG, snapPointsOffset: HG, onDrag: UG, shouldFade: WG, getPercentageDragged: GG } = useSnapPoints({
18683
+ }), [vG, yG] = React.useState(!1), [bG, xG] = React.useState(!1), [SG, CG] = React.useState(!1), wG = React.useRef(null), TG = React.useRef(null), EG = React.useRef(null), DG = React.useRef(null), OG = React.useRef(null), kG = React.useRef(!1), AG = React.useRef(null), jG = React.useRef(0), MG = React.useRef(!1), NG = React.useRef(!j), PG = React.useRef(0), FG = React.useRef(null), IG = React.useRef(FG.current?.getBoundingClientRect().height || 0), LG = React.useRef(FG.current?.getBoundingClientRect().width || 0), RG = React.useRef(0), zG = React.useCallback((e) => {
18684
+ l && e === WG.length - 1 && (TG.current = /* @__PURE__ */ new Date());
18685
+ }, []), { activeSnapPoint: BG, activeSnapPointIndex: VG, setActiveSnapPoint: HG, onRelease: UG, snapPointsOffset: WG, onDrag: GG, shouldFade: KG, getPercentageDragged: qG } = useSnapPoints({
18686
18686
  snapPoints: l,
18687
18687
  activeSnapPointProp: b,
18688
18688
  setActiveSnapPointProp: x,
18689
- drawerRef: NG,
18689
+ drawerRef: FG,
18690
18690
  fadeFromIndex: y,
18691
- overlayRef: SG,
18692
- onSnapPointChange: LG,
18691
+ overlayRef: wG,
18692
+ onSnapPointChange: zG,
18693
18693
  direction: A,
18694
- container: mG,
18694
+ container: gG,
18695
18695
  snapToSequentialPoint: I
18696
18696
  });
18697
- usePreventScroll({ isDisabled: !Q || vG || !C || bG || !gG || !z || !M });
18698
- let { restorePositionSetting: KG } = usePositionFixed({
18697
+ usePreventScroll({ isDisabled: !Q || bG || !C || SG || !vG || !z || !M });
18698
+ let { restorePositionSetting: JG } = usePositionFixed({
18699
18699
  isOpen: Q,
18700
18700
  modal: C,
18701
18701
  nested: E ?? !1,
18702
- hasBeenOpened: gG,
18702
+ hasBeenOpened: vG,
18703
18703
  preventScrollRestoration: R,
18704
18704
  noBodyStyles: O
18705
18705
  });
18706
- function qG() {
18706
+ function YG() {
18707
18707
  return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth;
18708
18708
  }
18709
- function JG(e) {
18710
- !_ && !l || NG.current && !NG.current.contains(e.target) || (PG.current = NG.current?.getBoundingClientRect().height || 0, FG.current = NG.current?.getBoundingClientRect().width || 0, yG(!0), wG.current = /* @__PURE__ */ new Date(), isIOS() && window.addEventListener("touchend", () => DG.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), kG.current = isVertical(A) ? e.pageY : e.pageX);
18709
+ function XG(e) {
18710
+ !_ && !l || FG.current && !FG.current.contains(e.target) || (IG.current = FG.current?.getBoundingClientRect().height || 0, LG.current = FG.current?.getBoundingClientRect().width || 0, xG(!0), EG.current = /* @__PURE__ */ new Date(), isIOS() && window.addEventListener("touchend", () => kG.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), jG.current = isVertical(A) ? e.pageY : e.pageX);
18711
18711
  }
18712
- function YG(e, t) {
18713
- let n = e, r = window.getSelection()?.toString(), i = NG.current ? getTranslate(NG.current, A) : null, o = /* @__PURE__ */ new Date();
18712
+ function ZG(e, t) {
18713
+ let n = e, r = window.getSelection()?.toString(), i = FG.current ? getTranslate(FG.current, A) : null, o = /* @__PURE__ */ new Date();
18714
18714
  if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
18715
18715
  if (A === "right" || A === "left") return !0;
18716
- if (CG.current && o.getTime() - CG.current.getTime() < 500) return !1;
18716
+ if (TG.current && o.getTime() - TG.current.getTime() < 500) return !1;
18717
18717
  if (i !== null && (A === "bottom" ? i > 0 : i < 0)) return !0;
18718
18718
  if (r && r.length > 0) return !1;
18719
- if (EG.current && o.getTime() - EG.current.getTime() < g && i === 0 || t) return EG.current = o, !1;
18719
+ if (OG.current && o.getTime() - OG.current.getTime() < g && i === 0 || t) return OG.current = o, !1;
18720
18720
  for (; n;) {
18721
18721
  if (n.scrollHeight > n.clientHeight) {
18722
- if (n.scrollTop !== 0) return EG.current = /* @__PURE__ */ new Date(), !1;
18722
+ if (n.scrollTop !== 0) return OG.current = /* @__PURE__ */ new Date(), !1;
18723
18723
  if (n.getAttribute("role") === "dialog") return !0;
18724
18724
  }
18725
18725
  n = n.parentNode;
18726
18726
  }
18727
18727
  return !0;
18728
18728
  }
18729
- function XG(e) {
18730
- if (NG.current && vG) {
18731
- let t = A === "bottom" || A === "right" ? 1 : -1, n = (kG.current - (isVertical(A) ? e.pageY : e.pageX)) * t, i = n > 0, o = l && !_ && !i;
18732
- if (o && zG === 0) return;
18733
- let f = Math.abs(n), h = document.querySelector("[data-vaul-drawer-wrapper]"), g = A === "bottom" || A === "top" ? PG.current : FG.current, v = f / g, b = GG(f, i);
18734
- if (b !== null && (v = b), o && v >= 1 || !DG.current && !YG(e.target, i)) return;
18735
- if (NG.current.classList.add(DRAG_CLASS), DG.current = !0, set(NG.current, { transition: "none" }), set(SG.current, { transition: "none" }), l && UG({ draggedDistance: n }), i && !l) {
18729
+ function QG(e) {
18730
+ if (FG.current && bG) {
18731
+ let t = A === "bottom" || A === "right" ? 1 : -1, n = (jG.current - (isVertical(A) ? e.pageY : e.pageX)) * t, i = n > 0, o = l && !_ && !i;
18732
+ if (o && VG === 0) return;
18733
+ let f = Math.abs(n), h = document.querySelector("[data-vaul-drawer-wrapper]"), g = A === "bottom" || A === "top" ? IG.current : LG.current, v = f / g, b = qG(f, i);
18734
+ if (b !== null && (v = b), o && v >= 1 || !kG.current && !ZG(e.target, i)) return;
18735
+ if (FG.current.classList.add(DRAG_CLASS), kG.current = !0, set(FG.current, { transition: "none" }), set(wG.current, { transition: "none" }), l && GG({ draggedDistance: n }), i && !l) {
18736
18736
  let e = dampenValue(n), r = Math.min(e * -1, 0) * t;
18737
- set(NG.current, { transform: isVertical(A) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
18737
+ set(FG.current, { transform: isVertical(A) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
18738
18738
  return;
18739
18739
  }
18740
18740
  let x = 1 - v;
18741
- if ((WG || y && zG === y - 1) && (r?.(e, v), set(SG.current, {
18741
+ if ((KG || y && VG === y - 1) && (r?.(e, v), set(wG.current, {
18742
18742
  opacity: `${x}`,
18743
18743
  transition: "none"
18744
- }, !0)), h && SG.current && d) {
18745
- let e = Math.min(qG() + v * (1 - qG()), 1), t = 8 - v * 8, n = Math.max(0, 14 - v * 14);
18744
+ }, !0)), h && wG.current && d) {
18745
+ let e = Math.min(YG() + v * (1 - YG()), 1), t = 8 - v * 8, n = Math.max(0, 14 - v * 14);
18746
18746
  set(h, {
18747
18747
  borderRadius: `${t}px`,
18748
18748
  transform: isVertical(A) ? `scale(${e}) translate3d(0, ${n}px, 0)` : `scale(${e}) translate3d(${n}px, 0, 0)`,
@@ -18751,62 +18751,62 @@ function Root({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o,
18751
18751
  }
18752
18752
  if (!l) {
18753
18753
  let e = f * t;
18754
- set(NG.current, { transform: isVertical(A) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
18754
+ set(FG.current, { transform: isVertical(A) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
18755
18755
  }
18756
18756
  }
18757
18757
  }
18758
18758
  React.useEffect(() => {
18759
18759
  window.requestAnimationFrame(() => {
18760
- jG.current = !0;
18760
+ NG.current = !0;
18761
18761
  });
18762
18762
  }, []), React.useEffect(() => {
18763
18763
  var e;
18764
18764
  function t() {
18765
- if (!NG.current || !z) return;
18765
+ if (!FG.current || !z) return;
18766
18766
  let e = document.activeElement;
18767
- if (isInput(e) || AG.current) {
18768
- let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = NG.current.getBoundingClientRect().height || 0, i = r > t * .8;
18769
- IG.current ||= r;
18770
- let o = NG.current.getBoundingClientRect().top;
18771
- if (Math.abs(MG.current - n) > 60 && (AG.current = !AG.current), l && l.length > 0 && HG && zG) {
18772
- let e = HG[zG] || 0;
18767
+ if (isInput(e) || MG.current) {
18768
+ let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = FG.current.getBoundingClientRect().height || 0, i = r > t * .8;
18769
+ RG.current ||= r;
18770
+ let o = FG.current.getBoundingClientRect().top;
18771
+ if (Math.abs(PG.current - n) > 60 && (MG.current = !MG.current), l && l.length > 0 && WG && VG) {
18772
+ let e = WG[VG] || 0;
18773
18773
  n += e;
18774
18774
  }
18775
- if (MG.current = n, r > e || AG.current) {
18776
- let t = NG.current.getBoundingClientRect().height, r = t;
18777
- t > e && (r = e - (i ? o : WINDOW_TOP_OFFSET)), S ? NG.current.style.height = `${t - Math.max(n, 0)}px` : NG.current.style.height = `${Math.max(r, e - o)}px`;
18778
- } else isMobileFirefox() || (NG.current.style.height = `${IG.current}px`);
18779
- l && l.length > 0 && !AG.current ? NG.current.style.bottom = "0px" : NG.current.style.bottom = `${Math.max(n, 0)}px`;
18775
+ if (PG.current = n, r > e || MG.current) {
18776
+ let t = FG.current.getBoundingClientRect().height, r = t;
18777
+ t > e && (r = e - (i ? o : WINDOW_TOP_OFFSET)), S ? FG.current.style.height = `${t - Math.max(n, 0)}px` : FG.current.style.height = `${Math.max(r, e - o)}px`;
18778
+ } else isMobileFirefox() || (FG.current.style.height = `${RG.current}px`);
18779
+ l && l.length > 0 && !MG.current ? FG.current.style.bottom = "0px" : FG.current.style.bottom = `${Math.max(n, 0)}px`;
18780
18780
  }
18781
18781
  }
18782
18782
  return (e = window.visualViewport) == null || e.addEventListener("resize", t), () => window.visualViewport?.removeEventListener("resize", t);
18783
18783
  }, [
18784
- zG,
18784
+ VG,
18785
18785
  l,
18786
- HG
18786
+ WG
18787
18787
  ]);
18788
- function ZG(e) {
18789
- $G(), w?.(), e || hG(!1), setTimeout(() => {
18790
- l && BG(l[0]);
18788
+ function $G(e) {
18789
+ tK(), w?.(), e || _G(!1), setTimeout(() => {
18790
+ l && HG(l[0]);
18791
18791
  }, TRANSITIONS.DURATION * 1e3);
18792
18792
  }
18793
- function QG() {
18794
- if (!NG.current) return;
18795
- let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = getTranslate(NG.current, A);
18796
- set(NG.current, {
18793
+ function eK() {
18794
+ if (!FG.current) return;
18795
+ let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = getTranslate(FG.current, A);
18796
+ set(FG.current, {
18797
18797
  transform: "translate3d(0, 0, 0)",
18798
18798
  transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`
18799
- }), set(SG.current, {
18799
+ }), set(wG.current, {
18800
18800
  transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
18801
18801
  opacity: "1"
18802
18802
  }), d && t && t > 0 && Q && set(e, {
18803
18803
  borderRadius: `${BORDER_RADIUS}px`,
18804
18804
  overflow: "hidden",
18805
18805
  ...isVertical(A) ? {
18806
- transform: `scale(${qG()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
18806
+ transform: `scale(${YG()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
18807
18807
  transformOrigin: "top"
18808
18808
  } : {
18809
- transform: `scale(${qG()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
18809
+ transform: `scale(${YG()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
18810
18810
  transformOrigin: "left"
18811
18811
  },
18812
18812
  transitionProperty: "transform, border-radius",
@@ -18814,68 +18814,68 @@ function Root({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o,
18814
18814
  transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`
18815
18815
  }, !0);
18816
18816
  }
18817
- function $G() {
18818
- !vG || !NG.current || (NG.current.classList.remove(DRAG_CLASS), DG.current = !1, yG(!1), TG.current = /* @__PURE__ */ new Date());
18819
- }
18820
- function eK(e) {
18821
- if (!vG || !NG.current) return;
18822
- NG.current.classList.remove(DRAG_CLASS), DG.current = !1, yG(!1), TG.current = /* @__PURE__ */ new Date();
18823
- let t = getTranslate(NG.current, A);
18824
- if (!e || !YG(e.target, !1) || !t || Number.isNaN(t) || wG.current === null) return;
18825
- let n = TG.current.getTime() - wG.current.getTime(), r = kG.current - (isVertical(A) ? e.pageY : e.pageX), i = Math.abs(r) / n;
18826
- if (i > .05 && (xG(!0), setTimeout(() => {
18827
- xG(!1);
18817
+ function tK() {
18818
+ !bG || !FG.current || (FG.current.classList.remove(DRAG_CLASS), kG.current = !1, xG(!1), DG.current = /* @__PURE__ */ new Date());
18819
+ }
18820
+ function nK(e) {
18821
+ if (!bG || !FG.current) return;
18822
+ FG.current.classList.remove(DRAG_CLASS), kG.current = !1, xG(!1), DG.current = /* @__PURE__ */ new Date();
18823
+ let t = getTranslate(FG.current, A);
18824
+ if (!e || !ZG(e.target, !1) || !t || Number.isNaN(t) || EG.current === null) return;
18825
+ let n = DG.current.getTime() - EG.current.getTime(), r = jG.current - (isVertical(A) ? e.pageY : e.pageX), i = Math.abs(r) / n;
18826
+ if (i > .05 && (CG(!0), setTimeout(() => {
18827
+ CG(!1);
18828
18828
  }, 200)), l) {
18829
- VG({
18829
+ UG({
18830
18830
  draggedDistance: r * (A === "bottom" || A === "right" ? 1 : -1),
18831
- closeDrawer: ZG,
18831
+ closeDrawer: $G,
18832
18832
  velocity: i,
18833
18833
  dismissible: _
18834
18834
  }), o?.(e, !0);
18835
18835
  return;
18836
18836
  }
18837
18837
  if (A === "bottom" || A === "right" ? r > 0 : r < 0) {
18838
- QG(), o?.(e, !0);
18838
+ eK(), o?.(e, !0);
18839
18839
  return;
18840
18840
  }
18841
18841
  if (i > VELOCITY_THRESHOLD) {
18842
- ZG(), o?.(e, !1);
18842
+ $G(), o?.(e, !1);
18843
18843
  return;
18844
18844
  }
18845
- let d = Math.min(NG.current.getBoundingClientRect().height ?? 0, window.innerHeight), f = Math.min(NG.current.getBoundingClientRect().width ?? 0, window.innerWidth), g = A === "left" || A === "right";
18845
+ let d = Math.min(FG.current.getBoundingClientRect().height ?? 0, window.innerHeight), f = Math.min(FG.current.getBoundingClientRect().width ?? 0, window.innerWidth), g = A === "left" || A === "right";
18846
18846
  if (Math.abs(t) >= (g ? f : d) * h) {
18847
- ZG(), o?.(e, !1);
18847
+ $G(), o?.(e, !1);
18848
18848
  return;
18849
18849
  }
18850
- o?.(e, !0), QG();
18850
+ o?.(e, !0), eK();
18851
18851
  }
18852
- React.useEffect(() => (Q && (set(document.documentElement, { scrollBehavior: "auto" }), CG.current = /* @__PURE__ */ new Date()), () => {
18852
+ React.useEffect(() => (Q && (set(document.documentElement, { scrollBehavior: "auto" }), TG.current = /* @__PURE__ */ new Date()), () => {
18853
18853
  reset(document.documentElement, "scrollBehavior");
18854
18854
  }), [Q]);
18855
- function tK(e) {
18855
+ function rK(e) {
18856
18856
  let t = e ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth : 1, n = e ? -NESTED_DISPLACEMENT : 0;
18857
- OG.current && window.clearTimeout(OG.current), set(NG.current, {
18857
+ AG.current && window.clearTimeout(AG.current), set(FG.current, {
18858
18858
  transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
18859
18859
  transform: isVertical(A) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
18860
- }), !e && NG.current && (OG.current = setTimeout(() => {
18861
- let e = getTranslate(NG.current, A);
18862
- set(NG.current, {
18860
+ }), !e && FG.current && (AG.current = setTimeout(() => {
18861
+ let e = getTranslate(FG.current, A);
18862
+ set(FG.current, {
18863
18863
  transition: "none",
18864
18864
  transform: isVertical(A) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
18865
18865
  });
18866
18866
  }, 500));
18867
18867
  }
18868
- function nK(e, t) {
18868
+ function iK(e, t) {
18869
18869
  if (t < 0) return;
18870
18870
  let n = (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth, r = n + t * (1 - n), i = -NESTED_DISPLACEMENT + t * NESTED_DISPLACEMENT;
18871
- set(NG.current, {
18871
+ set(FG.current, {
18872
18872
  transform: isVertical(A) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
18873
18873
  transition: "none"
18874
18874
  });
18875
18875
  }
18876
- function rK(e, t) {
18876
+ function aK(e, t) {
18877
18877
  let n = isVertical(A) ? window.innerHeight : window.innerWidth, r = t ? (n - NESTED_DISPLACEMENT) / n : 1, i = t ? -NESTED_DISPLACEMENT : 0;
18878
- t && set(NG.current, {
18878
+ t && set(FG.current, {
18879
18879
  transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,
18880
18880
  transform: isVertical(A) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
18881
18881
  });
@@ -18887,38 +18887,38 @@ function Root({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o,
18887
18887
  }, [C]), /* @__PURE__ */ React.createElement(Dialog$1, {
18888
18888
  defaultOpen: j,
18889
18889
  onOpenChange: (e) => {
18890
- !_ && !e || (e ? _G(!0) : ZG(!0), hG(e));
18890
+ !_ && !e || (e ? yG(!0) : $G(!0), _G(e));
18891
18891
  },
18892
18892
  open: Q
18893
18893
  }, /* @__PURE__ */ React.createElement(DrawerContext.Provider, { value: {
18894
- activeSnapPoint: RG,
18894
+ activeSnapPoint: BG,
18895
18895
  snapPoints: l,
18896
- setActiveSnapPoint: BG,
18897
- drawerRef: NG,
18898
- overlayRef: SG,
18896
+ setActiveSnapPoint: HG,
18897
+ drawerRef: FG,
18898
+ overlayRef: wG,
18899
18899
  onOpenChange: t,
18900
- onPress: JG,
18901
- onRelease: eK,
18902
- onDrag: XG,
18900
+ onPress: XG,
18901
+ onRelease: nK,
18902
+ onDrag: QG,
18903
18903
  dismissible: _,
18904
- shouldAnimate: jG,
18904
+ shouldAnimate: NG,
18905
18905
  handleOnly: v,
18906
18906
  isOpen: Q,
18907
- isDragging: vG,
18908
- shouldFade: WG,
18909
- closeDrawer: ZG,
18910
- onNestedDrag: nK,
18911
- onNestedOpenChange: tK,
18912
- onNestedRelease: rK,
18913
- keyboardIsOpen: AG,
18907
+ isDragging: bG,
18908
+ shouldFade: KG,
18909
+ closeDrawer: $G,
18910
+ onNestedDrag: iK,
18911
+ onNestedOpenChange: rK,
18912
+ onNestedRelease: aK,
18913
+ keyboardIsOpen: MG,
18914
18914
  modal: C,
18915
- snapPointsOffset: HG,
18916
- activeSnapPointIndex: zG,
18915
+ snapPointsOffset: WG,
18916
+ activeSnapPointIndex: VG,
18917
18917
  direction: A,
18918
18918
  shouldScaleBackground: d,
18919
18919
  setBackgroundColorOnScale: f,
18920
18920
  noBodyStyles: O,
18921
- container: mG,
18921
+ container: gG,
18922
18922
  autoFocus: q
18923
18923
  } }, n));
18924
18924
  }
@@ -18940,7 +18940,7 @@ Overlay.displayName = "Drawer.Overlay";
18940
18940
  var Content = /* @__PURE__ */ React.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n,...r }, o) {
18941
18941
  let { drawerRef: l, onPress: d, onRelease: f, onDrag: h, keyboardIsOpen: g, snapPointsOffset: _, activeSnapPointIndex: v, modal: y, isOpen: b, direction: x, snapPoints: S, container: C, handleOnly: w, shouldAnimate: E, autoFocus: O } = useDrawerContext(), [A, j] = React.useState(!1), M = useComposedRefs(o, l), I = React.useRef(null), R = React.useRef(null), z = React.useRef(!1), V = S && S.length > 0;
18942
18942
  useScaleBackground();
18943
- let mG = (e, t, n = 0) => {
18943
+ let gG = (e, t, n = 0) => {
18944
18944
  if (z.current) return !0;
18945
18945
  let r = Math.abs(e.y), i = Math.abs(e.x), o = i > r, l = ["bottom", "right"].includes(t) ? 1 : -1;
18946
18946
  if (t === "left" || t === "right") {
@@ -18994,7 +18994,7 @@ var Content = /* @__PURE__ */ React.forwardRef(function({ onPointerDownOutside:
18994
18994
  onPointerMove: (e) => {
18995
18995
  if (R.current = e, w || (r.onPointerMove == null || r.onPointerMove.call(r, e), !I.current)) return;
18996
18996
  let t = e.pageY - I.current.y, n = e.pageX - I.current.x, i = e.pointerType === "touch" ? 10 : 2;
18997
- mG({
18997
+ gG({
18998
18998
  x: n,
18999
18999
  y: t
19000
19000
  }, x, i) ? h(e) : (Math.abs(n) > i || Math.abs(t) > i) && (I.current = null);
@@ -19256,7 +19256,7 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19256
19256
  ]), O;
19257
19257
  let [A, j] = React$1.useState(typeof E.defaultValue == "string" ? E.defaultValue : ""), M = i ?? A, I = Tt(M), R = React$1.useCallback((e) => {
19258
19258
  o?.(e), j(e);
19259
- }, [o]), z = React$1.useMemo(() => f ? typeof f == "string" ? new RegExp(f) : f : null, [f]), V = React$1.useRef(null), mG = React$1.useRef(null), q = React$1.useRef({
19259
+ }, [o]), z = React$1.useMemo(() => f ? typeof f == "string" ? new RegExp(f) : f : null, [f]), V = React$1.useRef(null), gG = React$1.useRef(null), q = React$1.useRef({
19260
19260
  value: M,
19261
19261
  onChange: R,
19262
19262
  isIOS: typeof window < "u" && ((O = window == null ? void 0 : window.CSS)?.supports)?.call(O, "-webkit-touch-callout", "none")
@@ -19266,7 +19266,7 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19266
19266
  V.current?.selectionDirection
19267
19267
  ] });
19268
19268
  React$1.useImperativeHandle(t, () => V.current, []), React$1.useEffect(() => {
19269
- let e = V.current, t = mG.current;
19269
+ let e = V.current, t = gG.current;
19270
19270
  if (!e || !t) return;
19271
19271
  q.current.value !== e.value && q.current.onChange(e.value), Q.current.prev = [
19272
19272
  e.selectionStart,
@@ -19275,7 +19275,7 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19275
19275
  ];
19276
19276
  function n() {
19277
19277
  if (document.activeElement !== e) {
19278
- bG(null), SG(null);
19278
+ SG(null), wG(null);
19279
19279
  return;
19280
19280
  }
19281
19281
  let t = e.selectionStart, n = e.selectionEnd, r = e.selectionDirection, i = e.maxLength, o = e.value, l = Q.current.prev, d = -1, f = -1, h;
@@ -19298,13 +19298,13 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19298
19298
  d !== -1 && f !== -1 && d !== f && e.setSelectionRange(d, f, h);
19299
19299
  }
19300
19300
  let g = d === -1 ? t : d, _ = f === -1 ? n : f, v = h ?? r;
19301
- bG(g), SG(_), Q.current.prev = [
19301
+ SG(g), wG(_), Q.current.prev = [
19302
19302
  g,
19303
19303
  _,
19304
19304
  v
19305
19305
  ];
19306
19306
  }
19307
- if (document.addEventListener("selectionchange", n, { capture: !0 }), n(), document.activeElement === e && vG(!0), !document.getElementById("input-otp-style")) {
19307
+ if (document.addEventListener("selectionchange", n, { capture: !0 }), n(), document.activeElement === e && bG(!0), !document.getElementById("input-otp-style")) {
19308
19308
  let e = document.createElement("style");
19309
19309
  if (e.id = "input-otp-style", S && e.setAttribute("nonce", S), document.head.appendChild(e), e.sheet) {
19310
19310
  let t = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
@@ -19320,13 +19320,13 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19320
19320
  document.removeEventListener("selectionchange", n, { capture: !0 }), i?.disconnect();
19321
19321
  };
19322
19322
  }, []);
19323
- let [hG, gG] = React$1.useState(!1), [_G, vG] = React$1.useState(!1), [yG, bG] = React$1.useState(null), [xG, SG] = React$1.useState(null);
19323
+ let [_G, vG] = React$1.useState(!1), [yG, bG] = React$1.useState(!1), [xG, SG] = React$1.useState(null), [CG, wG] = React$1.useState(null);
19324
19324
  React$1.useEffect(() => {
19325
19325
  let e = _t(() => {
19326
19326
  var e;
19327
19327
  (e = V.current) == null || e.dispatchEvent(new Event("input"));
19328
19328
  let t = V.current?.selectionStart, n = V.current?.selectionEnd, r = V.current?.selectionDirection;
19329
- t !== null && n !== null && (bG(t), SG(n), Q.current.prev = [
19329
+ t !== null && n !== null && (SG(t), wG(n), Q.current.prev = [
19330
19330
  t,
19331
19331
  n,
19332
19332
  r
@@ -19335,7 +19335,7 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19335
19335
  return () => {
19336
19336
  e.forEach((e) => clearTimeout(e));
19337
19337
  };
19338
- }, [M, _G]), React$1.useEffect(() => {
19338
+ }, [M, yG]), React$1.useEffect(() => {
19339
19339
  I !== void 0 && M !== I && I.length < l && M.length === l && _?.(M);
19340
19340
  }, [
19341
19341
  l,
@@ -19343,12 +19343,12 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19343
19343
  I,
19344
19344
  M
19345
19345
  ]);
19346
- let CG = Mt({
19347
- containerRef: mG,
19346
+ let TG = Mt({
19347
+ containerRef: gG,
19348
19348
  inputRef: V,
19349
19349
  pushPasswordManagerStrategy: v,
19350
- isFocused: _G
19351
- }), wG = React$1.useCallback((e) => {
19350
+ isFocused: yG
19351
+ }), EG = React$1.useCallback((e) => {
19352
19352
  let t = e.currentTarget.value.slice(0, l);
19353
19353
  if (t.length > 0 && z && !z.test(t)) {
19354
19354
  e.preventDefault();
@@ -19360,14 +19360,14 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19360
19360
  R,
19361
19361
  I,
19362
19362
  z
19363
- ]), TG = React$1.useCallback(() => {
19363
+ ]), DG = React$1.useCallback(() => {
19364
19364
  var e;
19365
19365
  if (V.current) {
19366
19366
  let t = Math.min(V.current.value.length, l - 1), n = V.current.value.length;
19367
- (e = V.current) == null || e.setSelectionRange(t, n), bG(t), SG(n);
19367
+ (e = V.current) == null || e.setSelectionRange(t, n), SG(t), wG(n);
19368
19368
  }
19369
- vG(!0);
19370
- }, [l]), EG = React$1.useCallback((e) => {
19369
+ bG(!0);
19370
+ }, [l]), OG = React$1.useCallback((e) => {
19371
19371
  let t = V.current;
19372
19372
  if (!y && (!q.current.isIOS || !e.clipboardData || !t)) return;
19373
19373
  let n = e.clipboardData.getData("text/plain"), r = y ? y(n) : n;
@@ -19376,24 +19376,24 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19376
19376
  if (d.length > 0 && z && !z.test(d)) return;
19377
19377
  t.value = d, R(d);
19378
19378
  let f = Math.min(d.length, l - 1), h = d.length;
19379
- t.setSelectionRange(f, h), bG(f), SG(h);
19379
+ t.setSelectionRange(f, h), SG(f), wG(h);
19380
19380
  }, [
19381
19381
  l,
19382
19382
  R,
19383
19383
  y,
19384
19384
  z,
19385
19385
  M
19386
- ]), DG = React$1.useMemo(() => ({
19386
+ ]), kG = React$1.useMemo(() => ({
19387
19387
  position: "relative",
19388
19388
  cursor: E.disabled ? "default" : "text",
19389
19389
  userSelect: "none",
19390
19390
  WebkitUserSelect: "none",
19391
19391
  pointerEvents: "none"
19392
- }), [E.disabled]), OG = React$1.useMemo(() => ({
19392
+ }), [E.disabled]), AG = React$1.useMemo(() => ({
19393
19393
  position: "absolute",
19394
19394
  inset: 0,
19395
- width: CG.willPushPWMBadge ? `calc(100% + ${CG.PWM_BADGE_SPACE_WIDTH})` : "100%",
19396
- clipPath: CG.willPushPWMBadge ? `inset(0 ${CG.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0,
19395
+ width: TG.willPushPWMBadge ? `calc(100% + ${TG.PWM_BADGE_SPACE_WIDTH})` : "100%",
19396
+ clipPath: TG.willPushPWMBadge ? `inset(0 ${TG.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0,
19397
19397
  height: "100%",
19398
19398
  display: "flex",
19399
19399
  textAlign: d,
@@ -19411,59 +19411,59 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19411
19411
  fontFamily: "monospace",
19412
19412
  fontVariantNumeric: "tabular-nums"
19413
19413
  }), [
19414
- CG.PWM_BADGE_SPACE_WIDTH,
19415
- CG.willPushPWMBadge,
19414
+ TG.PWM_BADGE_SPACE_WIDTH,
19415
+ TG.willPushPWMBadge,
19416
19416
  d
19417
- ]), kG = React$1.useMemo(() => React$1.createElement("input", Pt(bt({ autoComplete: E.autoComplete || "one-time-code" }, E), {
19417
+ ]), jG = React$1.useMemo(() => React$1.createElement("input", Pt(bt({ autoComplete: E.autoComplete || "one-time-code" }, E), {
19418
19418
  "data-input-otp": !0,
19419
19419
  "data-input-otp-placeholder-shown": M.length === 0 || void 0,
19420
- "data-input-otp-mss": yG,
19421
- "data-input-otp-mse": xG,
19420
+ "data-input-otp-mss": xG,
19421
+ "data-input-otp-mse": CG,
19422
19422
  inputMode: g,
19423
19423
  pattern: z?.source,
19424
19424
  "aria-placeholder": h,
19425
- style: OG,
19425
+ style: AG,
19426
19426
  maxLength: l,
19427
19427
  value: M,
19428
19428
  ref: V,
19429
19429
  spellCheck: E.spellCheck ?? !1,
19430
19430
  onPaste: (e) => {
19431
19431
  var t;
19432
- EG(e), (t = E.onPaste) == null || t.call(E, e);
19432
+ OG(e), (t = E.onPaste) == null || t.call(E, e);
19433
19433
  },
19434
- onChange: wG,
19434
+ onChange: EG,
19435
19435
  onMouseOver: (e) => {
19436
19436
  var t;
19437
- gG(!0), (t = E.onMouseOver) == null || t.call(E, e);
19437
+ vG(!0), (t = E.onMouseOver) == null || t.call(E, e);
19438
19438
  },
19439
19439
  onMouseLeave: (e) => {
19440
19440
  var t;
19441
- gG(!1), (t = E.onMouseLeave) == null || t.call(E, e);
19441
+ vG(!1), (t = E.onMouseLeave) == null || t.call(E, e);
19442
19442
  },
19443
19443
  onFocus: (e) => {
19444
19444
  var t;
19445
- TG(), (t = E.onFocus) == null || t.call(E, e);
19445
+ DG(), (t = E.onFocus) == null || t.call(E, e);
19446
19446
  },
19447
19447
  onBlur: (e) => {
19448
19448
  var t;
19449
- vG(!1), (t = E.onBlur) == null || t.call(E, e);
19449
+ bG(!1), (t = E.onBlur) == null || t.call(E, e);
19450
19450
  }
19451
19451
  })), [
19452
- wG,
19453
- TG,
19454
19452
  EG,
19455
- g,
19453
+ DG,
19456
19454
  OG,
19455
+ g,
19456
+ AG,
19457
19457
  l,
19458
+ CG,
19458
19459
  xG,
19459
- yG,
19460
19460
  h,
19461
19461
  E,
19462
19462
  z?.source,
19463
19463
  M
19464
- ]), AG = React$1.useMemo(() => ({
19464
+ ]), MG = React$1.useMemo(() => ({
19465
19465
  slots: Array.from({ length: l }).map((e, t) => {
19466
- let n = _G && yG !== null && xG !== null && (yG === xG && t === yG || t >= yG && t < xG), r = M[t] === void 0 ? null : M[t], i = M[0] === void 0 ? h?.[t] ?? null : null;
19466
+ let n = yG && xG !== null && CG !== null && (xG === CG && t === xG || t >= xG && t < CG), r = M[t] === void 0 ? null : M[t], i = M[0] === void 0 ? h?.[t] ?? null : null;
19467
19467
  return {
19468
19468
  char: r,
19469
19469
  placeholderChar: i,
@@ -19471,33 +19471,33 @@ var Nt = React$1.createContext({}), $t = React$1.forwardRef((e, t) => {
19471
19471
  hasFakeCaret: n && r === null
19472
19472
  };
19473
19473
  }),
19474
- isFocused: _G,
19475
- isHovering: !E.disabled && hG
19474
+ isFocused: yG,
19475
+ isHovering: !E.disabled && _G
19476
19476
  }), [
19477
+ yG,
19477
19478
  _G,
19478
- hG,
19479
19479
  l,
19480
+ CG,
19480
19481
  xG,
19481
- yG,
19482
19482
  h,
19483
19483
  E.disabled,
19484
19484
  M
19485
- ]), jG = React$1.useMemo(() => C ? C(AG) : React$1.createElement(Nt.Provider, { value: AG }, w), [
19485
+ ]), NG = React$1.useMemo(() => C ? C(MG) : React$1.createElement(Nt.Provider, { value: MG }, w), [
19486
19486
  w,
19487
- AG,
19487
+ MG,
19488
19488
  C
19489
19489
  ]);
19490
19490
  return React$1.createElement(React$1.Fragment, null, x !== null && React$1.createElement("noscript", null, React$1.createElement("style", null, x)), React$1.createElement("div", {
19491
- ref: mG,
19491
+ ref: gG,
19492
19492
  "data-input-otp-container": !0,
19493
19493
  translate: "no",
19494
- style: DG,
19494
+ style: kG,
19495
19495
  className: b
19496
- }, jG, React$1.createElement("div", { style: {
19496
+ }, NG, React$1.createElement("div", { style: {
19497
19497
  position: "absolute",
19498
19498
  inset: 0,
19499
19499
  pointerEvents: "none"
19500
- } }, kG)));
19500
+ } }, jG)));
19501
19501
  });
19502
19502
  $t.displayName = "Input";
19503
19503
  function F(e, t) {
@@ -19564,7 +19564,7 @@ function useUniqueId(e = null) {
19564
19564
  function PanelWithForwardedRef({ children: e, className: t = "", collapsedSize: n, collapsible: r, defaultSize: i, forwardedRef: o, id: l, maxSize: d, minSize: h, onCollapse: g, onExpand: _, onResize: y, order: x, style: S, tagName: w = "div",...E }) {
19565
19565
  let O = useContext(PanelGroupContext);
19566
19566
  if (O === null) throw Error("Panel components must be rendered within a PanelGroup container");
19567
- let { collapsePanel: A, expandPanel: j, getPanelSize: M, getPanelStyle: I, groupId: R, isPanelCollapsed: z, reevaluatePanelConstraints: V, registerPanel: mG, resizePanel: q, unregisterPanel: Q } = O, hG = useUniqueId(l), gG = useRef({
19567
+ let { collapsePanel: A, expandPanel: j, getPanelSize: M, getPanelStyle: I, groupId: R, isPanelCollapsed: z, reevaluatePanelConstraints: V, registerPanel: gG, resizePanel: q, unregisterPanel: Q } = O, _G = useUniqueId(l), vG = useRef({
19568
19568
  callbacks: {
19569
19569
  onCollapse: g,
19570
19570
  onExpand: _,
@@ -19577,68 +19577,68 @@ function PanelWithForwardedRef({ children: e, className: t = "", collapsedSize:
19577
19577
  maxSize: d,
19578
19578
  minSize: h
19579
19579
  },
19580
- id: hG,
19580
+ id: _G,
19581
19581
  idIsFromProps: l !== void 0,
19582
19582
  order: x
19583
19583
  });
19584
19584
  useRef({ didLogMissingDefaultSizeWarning: !1 }), useIsomorphicLayoutEffect(() => {
19585
- let { callbacks: e, constraints: t } = gG.current, o = { ...t };
19586
- gG.current.id = hG, gG.current.idIsFromProps = l !== void 0, gG.current.order = x, e.onCollapse = g, e.onExpand = _, e.onResize = y, t.collapsedSize = n, t.collapsible = r, t.defaultSize = i, t.maxSize = d, t.minSize = h, (o.collapsedSize !== t.collapsedSize || o.collapsible !== t.collapsible || o.maxSize !== t.maxSize || o.minSize !== t.minSize) && V(gG.current, o);
19585
+ let { callbacks: e, constraints: t } = vG.current, o = { ...t };
19586
+ vG.current.id = _G, vG.current.idIsFromProps = l !== void 0, vG.current.order = x, e.onCollapse = g, e.onExpand = _, e.onResize = y, t.collapsedSize = n, t.collapsible = r, t.defaultSize = i, t.maxSize = d, t.minSize = h, (o.collapsedSize !== t.collapsedSize || o.collapsible !== t.collapsible || o.maxSize !== t.maxSize || o.minSize !== t.minSize) && V(vG.current, o);
19587
19587
  }), useIsomorphicLayoutEffect(() => {
19588
- let e = gG.current;
19589
- return mG(e), () => {
19588
+ let e = vG.current;
19589
+ return gG(e), () => {
19590
19590
  Q(e);
19591
19591
  };
19592
19592
  }, [
19593
19593
  x,
19594
- hG,
19595
- mG,
19594
+ _G,
19595
+ gG,
19596
19596
  Q
19597
19597
  ]), useImperativeHandle(o, () => ({
19598
19598
  collapse: () => {
19599
- A(gG.current);
19599
+ A(vG.current);
19600
19600
  },
19601
19601
  expand: (e) => {
19602
- j(gG.current, e);
19602
+ j(vG.current, e);
19603
19603
  },
19604
19604
  getId() {
19605
- return hG;
19605
+ return _G;
19606
19606
  },
19607
19607
  getSize() {
19608
- return M(gG.current);
19608
+ return M(vG.current);
19609
19609
  },
19610
19610
  isCollapsed() {
19611
- return z(gG.current);
19611
+ return z(vG.current);
19612
19612
  },
19613
19613
  isExpanded() {
19614
- return !z(gG.current);
19614
+ return !z(vG.current);
19615
19615
  },
19616
19616
  resize: (e) => {
19617
- q(gG.current, e);
19617
+ q(vG.current, e);
19618
19618
  }
19619
19619
  }), [
19620
19620
  A,
19621
19621
  j,
19622
19622
  M,
19623
19623
  z,
19624
- hG,
19624
+ _G,
19625
19625
  q
19626
19626
  ]);
19627
- let _G = I(gG.current, i);
19627
+ let yG = I(vG.current, i);
19628
19628
  return createElement(w, {
19629
19629
  ...E,
19630
19630
  children: e,
19631
19631
  className: t,
19632
- id: hG,
19632
+ id: _G,
19633
19633
  style: {
19634
- ..._G,
19634
+ ...yG,
19635
19635
  ...S
19636
19636
  },
19637
19637
  [DATA_ATTRIBUTES.groupId]: R,
19638
19638
  [DATA_ATTRIBUTES.panel]: "",
19639
19639
  [DATA_ATTRIBUTES.panelCollapsible]: r || void 0,
19640
- [DATA_ATTRIBUTES.panelId]: hG,
19641
- [DATA_ATTRIBUTES.panelSize]: parseFloat("" + _G.flexGrow).toFixed(1)
19640
+ [DATA_ATTRIBUTES.panelId]: _G,
19641
+ [DATA_ATTRIBUTES.panelSize]: parseFloat("" + yG.flexGrow).toFixed(1)
19642
19642
  });
19643
19643
  }
19644
19644
  var Panel = forwardRef((e, t) => createElement(PanelWithForwardedRef, {
@@ -20293,7 +20293,7 @@ var LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100, defaultStorage = {
20293
20293
  }
20294
20294
  }, debounceMap = {};
20295
20295
  function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, className: n = "", direction: r, forwardedRef: i, id: o = null, onLayout: l = null, keyboardResizeBy: d = null, storage: h = defaultStorage, style: g, tagName: v = "div",...x }) {
20296
- let E = useUniqueId(o), O = useRef(null), [A, j] = useState(null), [M, I] = useState([]), R = useForceUpdate(), z = useRef({}), V = useRef(/* @__PURE__ */ new Map()), mG = useRef(0), q = useRef({
20296
+ let E = useUniqueId(o), O = useRef(null), [A, j] = useState(null), [M, I] = useState([]), R = useForceUpdate(), z = useRef({}), V = useRef(/* @__PURE__ */ new Map()), gG = useRef(0), q = useRef({
20297
20297
  autoSaveId: e,
20298
20298
  direction: r,
20299
20299
  dragState: A,
@@ -20347,7 +20347,7 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20347
20347
  M,
20348
20348
  h
20349
20349
  ]), useEffect(() => {});
20350
- let hG = useCallback((e) => {
20350
+ let _G = useCallback((e) => {
20351
20351
  let { onLayout: t } = q.current, { layout: n, panelDataArray: r } = Q.current;
20352
20352
  if (e.constraints.collapsible) {
20353
20353
  let i = r.map((e) => e.constraints), { collapsedSize: o = 0, panelSize: l, pivotIndices: d } = panelDataHelper(r, e, n);
@@ -20364,7 +20364,7 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20364
20364
  compareLayouts(n, h) || (I(h), Q.current.layout = h, t && t(h), callPanelCallbacks(r, h, z.current));
20365
20365
  }
20366
20366
  }
20367
- }, []), gG = useCallback((e, t) => {
20367
+ }, []), vG = useCallback((e, t) => {
20368
20368
  let { onLayout: n } = q.current, { layout: r, panelDataArray: i } = Q.current;
20369
20369
  if (e.constraints.collapsible) {
20370
20370
  let o = i.map((e) => e.constraints), { collapsedSize: l = 0, panelSize: d = 0, minSize: f = 0, pivotIndices: h } = panelDataHelper(i, e, r), g = t ?? f;
@@ -20380,10 +20380,10 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20380
20380
  compareLayouts(r, _) || (I(_), Q.current.layout = _, n && n(_), callPanelCallbacks(i, _, z.current));
20381
20381
  }
20382
20382
  }
20383
- }, []), _G = useCallback((e) => {
20383
+ }, []), yG = useCallback((e) => {
20384
20384
  let { layout: t, panelDataArray: n } = Q.current, { panelSize: r } = panelDataHelper(n, e, t);
20385
20385
  return assert(r != null, `Panel size not found for panel "${e.id}"`), r;
20386
- }, []), vG = useCallback((e, t) => {
20386
+ }, []), bG = useCallback((e, t) => {
20387
20387
  let { panelDataArray: n } = Q.current, r = findPanelDataIndex(n, e);
20388
20388
  return computePanelFlexBoxStyle({
20389
20389
  defaultSize: t,
@@ -20392,13 +20392,13 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20392
20392
  panelData: n,
20393
20393
  panelIndex: r
20394
20394
  });
20395
- }, [A, M]), yG = useCallback((e) => {
20395
+ }, [A, M]), xG = useCallback((e) => {
20396
20396
  let { layout: t, panelDataArray: n } = Q.current, { collapsedSize: r = 0, collapsible: i, panelSize: o } = panelDataHelper(n, e, t);
20397
20397
  return assert(o != null, `Panel size not found for panel "${e.id}"`), i === !0 && fuzzyNumbersEqual$1(o, r);
20398
- }, []), bG = useCallback((e) => {
20398
+ }, []), SG = useCallback((e) => {
20399
20399
  let { layout: t, panelDataArray: n } = Q.current, { collapsedSize: r = 0, collapsible: i, panelSize: o } = panelDataHelper(n, e, t);
20400
20400
  return assert(o != null, `Panel size not found for panel "${e.id}"`), !i || fuzzyCompareNumbers(o, r) > 0;
20401
- }, []), xG = useCallback((e) => {
20401
+ }, []), CG = useCallback((e) => {
20402
20402
  let { panelDataArray: t } = Q.current;
20403
20403
  t.push(e), t.sort((e, t) => {
20404
20404
  let n = e.order, r = t.order;
@@ -20426,7 +20426,7 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20426
20426
  e.layout = [];
20427
20427
  };
20428
20428
  }, []);
20429
- let SG = useCallback((e) => {
20429
+ let wG = useCallback((e) => {
20430
20430
  let t = !1, n = O.current;
20431
20431
  return n && window.getComputedStyle(n, null).getPropertyValue("direction") === "rtl" && (t = !0), function(n) {
20432
20432
  n.preventDefault();
@@ -20442,9 +20442,9 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20442
20442
  prevLayout: h,
20443
20443
  trigger: isKeyDown(n) ? "keyboard" : "mouse-or-touch"
20444
20444
  }), C = !compareLayouts(h, S);
20445
- (isPointerEvent(n) || isMouseEvent(n)) && mG.current != y && (mG.current = y, !C && y !== 0 ? b ? reportConstraintsViolation(e, y < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(e, y < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(e, 0)), C && (I(S), Q.current.layout = S, f && f(S), callPanelCallbacks(g, S, z.current));
20445
+ (isPointerEvent(n) || isMouseEvent(n)) && gG.current != y && (gG.current = y, !C && y !== 0 ? b ? reportConstraintsViolation(e, y < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX) : reportConstraintsViolation(e, y < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX) : reportConstraintsViolation(e, 0)), C && (I(S), Q.current.layout = S, f && f(S), callPanelCallbacks(g, S, z.current));
20446
20446
  };
20447
- }, []), CG = useCallback((e, t) => {
20447
+ }, []), TG = useCallback((e, t) => {
20448
20448
  let { onLayout: n } = q.current, { layout: r, panelDataArray: i } = Q.current, o = i.map((e) => e.constraints), { panelSize: l, pivotIndices: d } = panelDataHelper(i, e, r);
20449
20449
  assert(l != null, `Panel size not found for panel "${e.id}"`);
20450
20450
  let f = findPanelDataIndex(i, e) === i.length - 1 ? l - t : t - l, h = adjustLayoutByDelta({
@@ -20456,10 +20456,10 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20456
20456
  trigger: "imperative-api"
20457
20457
  });
20458
20458
  compareLayouts(r, h) || (I(h), Q.current.layout = h, n && n(h), callPanelCallbacks(i, h, z.current));
20459
- }, []), wG = useCallback((e, t) => {
20459
+ }, []), EG = useCallback((e, t) => {
20460
20460
  let { layout: n, panelDataArray: r } = Q.current, { collapsedSize: i = 0, collapsible: o } = t, { collapsedSize: l = 0, collapsible: d, maxSize: f = 100, minSize: h = 0 } = e.constraints, { panelSize: g } = panelDataHelper(r, e, n);
20461
- g != null && (o && d && fuzzyNumbersEqual$1(g, i) ? fuzzyNumbersEqual$1(i, l) || CG(e, l) : g < h ? CG(e, h) : g > f && CG(e, f));
20462
- }, [CG]), TG = useCallback((e, t) => {
20461
+ g != null && (o && d && fuzzyNumbersEqual$1(g, i) ? fuzzyNumbersEqual$1(i, l) || TG(e, l) : g < h ? TG(e, h) : g > f && TG(e, f));
20462
+ }, [TG]), DG = useCallback((e, t) => {
20463
20463
  let { direction: n } = q.current, { layout: r } = Q.current;
20464
20464
  if (!O.current) return;
20465
20465
  let i = getResizeHandleElement(e, O.current);
@@ -20471,61 +20471,61 @@ function PanelGroupWithForwardedRef({ autoSaveId: e = null, children: t, classNa
20471
20471
  initialCursorPosition: o,
20472
20472
  initialLayout: r
20473
20473
  });
20474
- }, []), EG = useCallback(() => {
20474
+ }, []), OG = useCallback(() => {
20475
20475
  j(null);
20476
- }, []), DG = useCallback((e) => {
20476
+ }, []), kG = useCallback((e) => {
20477
20477
  let { panelDataArray: t } = Q.current, n = findPanelDataIndex(t, e);
20478
20478
  n >= 0 && (t.splice(n, 1), delete z.current[e.id], Q.current.panelDataArrayChanged = !0, R());
20479
- }, [R]), OG = useMemo(() => ({
20480
- collapsePanel: hG,
20479
+ }, [R]), AG = useMemo(() => ({
20480
+ collapsePanel: _G,
20481
20481
  direction: r,
20482
20482
  dragState: A,
20483
- expandPanel: gG,
20484
- getPanelSize: _G,
20485
- getPanelStyle: vG,
20483
+ expandPanel: vG,
20484
+ getPanelSize: yG,
20485
+ getPanelStyle: bG,
20486
20486
  groupId: E,
20487
- isPanelCollapsed: yG,
20488
- isPanelExpanded: bG,
20489
- reevaluatePanelConstraints: wG,
20490
- registerPanel: xG,
20491
- registerResizeHandle: SG,
20492
- resizePanel: CG,
20493
- startDragging: TG,
20494
- stopDragging: EG,
20495
- unregisterPanel: DG,
20487
+ isPanelCollapsed: xG,
20488
+ isPanelExpanded: SG,
20489
+ reevaluatePanelConstraints: EG,
20490
+ registerPanel: CG,
20491
+ registerResizeHandle: wG,
20492
+ resizePanel: TG,
20493
+ startDragging: DG,
20494
+ stopDragging: OG,
20495
+ unregisterPanel: kG,
20496
20496
  panelGroupElement: O.current
20497
20497
  }), [
20498
- hG,
20498
+ _G,
20499
20499
  A,
20500
20500
  r,
20501
- gG,
20502
- _G,
20503
20501
  vG,
20504
- E,
20505
20502
  yG,
20506
20503
  bG,
20507
- wG,
20504
+ E,
20508
20505
  xG,
20509
20506
  SG,
20507
+ EG,
20510
20508
  CG,
20509
+ wG,
20511
20510
  TG,
20512
- EG,
20513
- DG
20514
- ]), kG = {
20511
+ DG,
20512
+ OG,
20513
+ kG
20514
+ ]), jG = {
20515
20515
  display: "flex",
20516
20516
  flexDirection: r === "horizontal" ? "row" : "column",
20517
20517
  height: "100%",
20518
20518
  overflow: "hidden",
20519
20519
  width: "100%"
20520
20520
  };
20521
- return createElement(PanelGroupContext.Provider, { value: OG }, createElement(v, {
20521
+ return createElement(PanelGroupContext.Provider, { value: AG }, createElement(v, {
20522
20522
  ...x,
20523
20523
  children: t,
20524
20524
  className: n,
20525
20525
  id: o,
20526
20526
  ref: O,
20527
20527
  style: {
20528
- ...kG,
20528
+ ...jG,
20529
20529
  ...g
20530
20530
  },
20531
20531
  [DATA_ATTRIBUTES.group]: "",
@@ -20598,48 +20598,48 @@ function PanelResizeHandle({ children: e = null, className: t = "", disabled: n
20598
20598
  });
20599
20599
  let j = useContext(PanelGroupContext);
20600
20600
  if (j === null) throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
20601
- let { direction: M, groupId: I, registerResizeHandle: R, startDragging: z, stopDragging: V, panelGroupElement: mG } = j, q = useUniqueId(i), [Q, hG] = useState("inactive"), [gG, _G] = useState(!1), [vG, yG] = useState(null), bG = useRef({ state: Q });
20601
+ let { direction: M, groupId: I, registerResizeHandle: R, startDragging: z, stopDragging: V, panelGroupElement: gG } = j, q = useUniqueId(i), [Q, _G] = useState("inactive"), [vG, yG] = useState(!1), [bG, xG] = useState(null), SG = useRef({ state: Q });
20602
20602
  useIsomorphicLayoutEffect(() => {
20603
- bG.current.state = Q;
20603
+ SG.current.state = Q;
20604
20604
  }), useEffect(() => {
20605
- if (n) yG(null);
20605
+ if (n) xG(null);
20606
20606
  else {
20607
20607
  let e = R(q);
20608
- yG(() => e);
20608
+ xG(() => e);
20609
20609
  }
20610
20610
  }, [
20611
20611
  n,
20612
20612
  q,
20613
20613
  R
20614
20614
  ]);
20615
- let xG = r?.coarse ?? 15, SG = r?.fine ?? 5;
20615
+ let CG = r?.coarse ?? 15, wG = r?.fine ?? 5;
20616
20616
  useEffect(() => {
20617
- if (n || vG == null) return;
20617
+ if (n || bG == null) return;
20618
20618
  let e = O.current;
20619
20619
  assert(e, "Element ref not attached");
20620
20620
  let t = !1;
20621
20621
  return registerResizeHandle(q, e, M, {
20622
- coarse: xG,
20623
- fine: SG
20622
+ coarse: CG,
20623
+ fine: wG
20624
20624
  }, (e, n, r) => {
20625
20625
  if (!n) {
20626
- hG("inactive");
20626
+ _G("inactive");
20627
20627
  return;
20628
20628
  }
20629
20629
  switch (e) {
20630
20630
  case "down": {
20631
- hG("drag"), t = !1, assert(r, "Expected event to be defined for \"down\" action"), z(q, r);
20631
+ _G("drag"), t = !1, assert(r, "Expected event to be defined for \"down\" action"), z(q, r);
20632
20632
  let { onDragging: e, onPointerDown: n } = A.current;
20633
20633
  e?.(!0), n?.();
20634
20634
  break;
20635
20635
  }
20636
20636
  case "move": {
20637
- let { state: e } = bG.current;
20638
- t = !0, e !== "drag" && hG("hover"), assert(r, "Expected event to be defined for \"move\" action"), vG(r);
20637
+ let { state: e } = SG.current;
20638
+ t = !0, e !== "drag" && _G("hover"), assert(r, "Expected event to be defined for \"move\" action"), bG(r);
20639
20639
  break;
20640
20640
  }
20641
20641
  case "up": {
20642
- hG("hover"), V();
20642
+ _G("hover"), V();
20643
20643
  let { onClick: e, onDragging: n, onPointerUp: r } = A.current;
20644
20644
  n?.(!1), r?.(), t || e?.();
20645
20645
  break;
@@ -20647,22 +20647,22 @@ function PanelResizeHandle({ children: e = null, className: t = "", disabled: n
20647
20647
  }
20648
20648
  });
20649
20649
  }, [
20650
- xG,
20650
+ CG,
20651
20651
  M,
20652
20652
  n,
20653
- SG,
20653
+ wG,
20654
20654
  R,
20655
20655
  q,
20656
- vG,
20656
+ bG,
20657
20657
  z,
20658
20658
  V
20659
20659
  ]), useWindowSplitterResizeHandlerBehavior({
20660
20660
  disabled: n,
20661
20661
  handleId: q,
20662
- resizeHandler: vG,
20663
- panelGroupElement: mG
20662
+ resizeHandler: bG,
20663
+ panelGroupElement: gG
20664
20664
  });
20665
- let CG = {
20665
+ let TG = {
20666
20666
  touchAction: "none",
20667
20667
  userSelect: "none"
20668
20668
  };
@@ -20672,22 +20672,22 @@ function PanelResizeHandle({ children: e = null, className: t = "", disabled: n
20672
20672
  className: t,
20673
20673
  id: i,
20674
20674
  onBlur: () => {
20675
- _G(!1), o?.();
20675
+ yG(!1), o?.();
20676
20676
  },
20677
20677
  onFocus: () => {
20678
- _G(!0), h?.();
20678
+ yG(!0), h?.();
20679
20679
  },
20680
20680
  ref: O,
20681
20681
  role: "separator",
20682
20682
  style: {
20683
- ...CG,
20683
+ ...TG,
20684
20684
  ...b
20685
20685
  },
20686
20686
  tabIndex: x,
20687
20687
  [DATA_ATTRIBUTES.groupDirection]: M,
20688
20688
  [DATA_ATTRIBUTES.groupId]: I,
20689
20689
  [DATA_ATTRIBUTES.resizeHandle]: "",
20690
- [DATA_ATTRIBUTES.resizeHandleActive]: Q === "drag" ? "pointer" : gG ? "keyboard" : void 0,
20690
+ [DATA_ATTRIBUTES.resizeHandleActive]: Q === "drag" ? "pointer" : vG ? "keyboard" : void 0,
20691
20691
  [DATA_ATTRIBUTES.resizeHandleEnabled]: !n,
20692
20692
  [DATA_ATTRIBUTES.resizeHandleId]: q,
20693
20693
  [DATA_ATTRIBUTES.resizeHandleState]: Q
@@ -21360,7 +21360,7 @@ function MarkerContent({ className: e,...t }) {
21360
21360
  ...t
21361
21361
  });
21362
21362
  }
21363
- var CHIP_BASE = "inline-flex h-[32px] max-w-full items-center gap-[8px] rounded-[var(--pt-radius-md)] border px-[12px] text-left text-[13px] leading-[20px] transition-colors [&>svg]:size-[16px] [&>svg]:shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", CHIP_IDLE = "state-layer [--pt-state-layer-border:1px] border-input bg-background text-foreground hover:border-neutral", CHIP_CRUMB = "border-neutral bg-selected text-foreground", PromptPicker = React$1.forwardRef(({ items: e, onPick: t, hasContent: n, onClear: i, lead: o, backLabel: l = "Back", className: d,...f }, h) => {
21363
+ var CHIP_BASE = "inline-flex h-[32px] max-w-full items-center gap-[8px] rounded-[var(--pt-radius-md)] border px-[12px] text-left text-[13px] leading-[20px] transition-colors [&>svg]:size-[16px] [&>svg]:shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", CHIP_IDLE = "state-layer [--pt-state-layer-border:1px] border-input bg-background text-foreground hover:border-neutral", CHIP_DISABLED = "border-input bg-background text-[rgb(var(--pt-text-tage))]", CHIP_BADGE = "ml-[8px] shrink-0 whitespace-nowrap rounded-[var(--pt-radius-sm)] bg-muted px-[6px] text-[11px] leading-[16px] text-[rgb(var(--pt-text-tage))]", CHIP_CRUMB = "border-neutral bg-selected text-foreground", PromptPicker = React$1.forwardRef(({ items: e, onPick: t, hasContent: n, onClear: i, lead: o, backLabel: l = "Back", className: d,...f }, h) => {
21364
21364
  let [g, _] = React$1.useState(null), v = React$1.useMemo(() => g ? e.find((e) => e.id === g) ?? null : null, [e, g]);
21365
21365
  React$1.useEffect(() => {
21366
21366
  g && !e.some((e) => e.id === g) && _(null);
@@ -21397,15 +21397,37 @@ var CHIP_BASE = "inline-flex h-[32px] max-w-full items-center gap-[8px] rounded-
21397
21397
  children: [o && /* @__PURE__ */ jsx("p", {
21398
21398
  className: "text-[13px] leading-[20px] text-[rgb(var(--pt-text-tage))]",
21399
21399
  children: o
21400
- }), x.map((e) => /* @__PURE__ */ jsxs("button", {
21400
+ }), x.map((e) => e.disabled ? /* @__PURE__ */ jsxs("div", {
21401
+ "aria-disabled": "true",
21402
+ title: e.hint ?? e.label,
21403
+ className: cn(CHIP_BASE, CHIP_DISABLED),
21404
+ children: [
21405
+ e.icon,
21406
+ /* @__PURE__ */ jsx("span", {
21407
+ className: cn("min-w-0 truncate", e.badge && "flex-1"),
21408
+ children: e.label
21409
+ }),
21410
+ e.badge && /* @__PURE__ */ jsx("span", {
21411
+ className: CHIP_BADGE,
21412
+ children: e.badge
21413
+ })
21414
+ ]
21415
+ }, e.id) : /* @__PURE__ */ jsxs("button", {
21401
21416
  type: "button",
21402
21417
  title: e.hint ?? e.label,
21403
21418
  onClick: () => y(e),
21404
21419
  className: cn(CHIP_BASE, CHIP_IDLE),
21405
- children: [e.icon, /* @__PURE__ */ jsx("span", {
21406
- className: "min-w-0 truncate",
21407
- children: e.label
21408
- })]
21420
+ children: [
21421
+ e.icon,
21422
+ /* @__PURE__ */ jsx("span", {
21423
+ className: cn("min-w-0 truncate", e.badge && "flex-1"),
21424
+ children: e.label
21425
+ }),
21426
+ e.badge && /* @__PURE__ */ jsx("span", {
21427
+ className: CHIP_BADGE,
21428
+ children: e.badge
21429
+ })
21430
+ ]
21409
21431
  }, e.id))]
21410
21432
  })]
21411
21433
  });