@krosoft/react 0.0.20 → 0.0.22

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.
Files changed (33) hide show
  1. package/dist/KpiCards-DhstZUeY.js +336 -0
  2. package/dist/{LoadingState-C91zWRVu.js → LoadingState-Br3lWjL2.js} +4 -5
  3. package/dist/badge-CS99D5mG.js +26 -0
  4. package/dist/components/core/cards/KpiCard.d.ts +13 -0
  5. package/dist/components/core/cards/KpiCard.d.ts.map +1 -0
  6. package/dist/components/core/cards/KpiCards.d.ts +7 -0
  7. package/dist/components/core/cards/KpiCards.d.ts.map +1 -0
  8. package/dist/components/core/cards/index.d.ts +4 -0
  9. package/dist/components/core/cards/index.d.ts.map +1 -0
  10. package/dist/components/core/cards/index.js +5 -0
  11. package/dist/components/core/index.d.ts +1 -0
  12. package/dist/components/core/index.d.ts.map +1 -1
  13. package/dist/components/core/index.js +6 -3
  14. package/dist/components/core/states/index.js +1 -1
  15. package/dist/components/index.js +27 -15
  16. package/dist/components/ui/badge.d.ts +1 -1
  17. package/dist/components/ui/button.d.ts +12 -0
  18. package/dist/components/ui/button.d.ts.map +1 -0
  19. package/dist/components/ui/card.d.ts +9 -0
  20. package/dist/components/ui/card.d.ts.map +1 -0
  21. package/dist/components/ui/index.d.ts +3 -0
  22. package/dist/components/ui/index.d.ts.map +1 -1
  23. package/dist/components/ui/index.js +20 -11
  24. package/dist/helpers/index.js +1 -1
  25. package/dist/hooks/index.d.ts +1 -0
  26. package/dist/hooks/index.d.ts.map +1 -1
  27. package/dist/hooks/index.js +28 -38
  28. package/dist/hooks/ui/useMobile.d.ts.map +1 -1
  29. package/dist/hooks/ui/useNotifications.d.ts +5 -4
  30. package/dist/hooks/ui/useNotifications.d.ts.map +1 -1
  31. package/dist/{index-DxGGCUCL.js → index-gWiv5-6R.js} +2 -2
  32. package/dist/{toast-DZWzsFB2.js → toast-CUZ-UU-l.js} +412 -384
  33. package/package.json +7 -3
@@ -1,33 +1,24 @@
1
1
  import { jsx as p, jsxs as re, Fragment as ye } from "react/jsx-runtime";
2
- import * as s from "react";
2
+ import * as o from "react";
3
3
  import F from "react";
4
- import { c as ze, a as O } from "./index-DxGGCUCL.js";
4
+ import { a as Ye, c as R } from "./index-gWiv5-6R.js";
5
5
  import * as we from "react-dom";
6
6
  import qe from "react-dom";
7
7
  import { c as Ze } from "./createLucideIcon-BxMj32TH.js";
8
- /**
9
- * @license lucide-react v1.7.0 - ISC
10
- *
11
- * This source code is licensed under the ISC license.
12
- * See the LICENSE file in the root directory of this source tree.
13
- */
14
- const Ge = [
15
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
16
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
17
- ], Je = Ze("x", Ge), le = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, de = ze, oe = (e, t) => (n) => {
8
+ const le = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, de = Ye, oe = (e, t) => (n) => {
18
9
  var r;
19
10
  if ((t == null ? void 0 : t.variants) == null) return de(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
20
- const { variants: o, defaultVariants: a } = t, u = Object.keys(o).map((i) => {
11
+ const { variants: s, defaultVariants: a } = t, u = Object.keys(s).map((i) => {
21
12
  const l = n == null ? void 0 : n[i], m = a == null ? void 0 : a[i];
22
13
  if (l === null) return null;
23
14
  const y = le(l) || le(m);
24
- return o[i][y];
15
+ return s[i][y];
25
16
  }), c = n && Object.entries(n).reduce((i, l) => {
26
17
  let [m, y] = l;
27
18
  return y === void 0 || (i[m] = y), i;
28
19
  }, {}), f = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((i, l) => {
29
- let { class: m, className: y, ...g } = l;
30
- return Object.entries(g).every((x) => {
20
+ let { class: m, className: y, ...T } = l;
21
+ return Object.entries(T).every((x) => {
31
22
  let [v, d] = x;
32
23
  return Array.isArray(d) ? d.includes({
33
24
  ...a,
@@ -43,7 +34,7 @@ const Ge = [
43
34
  ] : i;
44
35
  }, []);
45
36
  return de(e, u, f, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
46
- }, Qe = oe(
37
+ }, Ge = oe(
47
38
  "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
48
39
  {
49
40
  variants: {
@@ -56,39 +47,14 @@ const Ge = [
56
47
  variant: "default"
57
48
  }
58
49
  }
59
- ), et = s.forwardRef(
60
- ({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ p("div", { ref: r, role: "alert", className: O(Qe({ variant: t }), e), ...n })
50
+ ), Je = o.forwardRef(
51
+ ({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ p("div", { ref: r, role: "alert", className: R(Ge({ variant: t }), e), ...n })
61
52
  );
62
- et.displayName = "Alert";
63
- const tt = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("h5", { ref: n, className: O("mb-1 font-medium leading-none tracking-tight", e), ...t }));
64
- tt.displayName = "AlertTitle";
65
- const nt = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: O("text-sm [&_p]:leading-relaxed", e), ...t }));
66
- nt.displayName = "AlertDescription";
67
- const rt = oe(
68
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
69
- {
70
- variants: {
71
- variant: {
72
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
73
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
74
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
75
- outline: "text-foreground"
76
- }
77
- },
78
- defaultVariants: {
79
- variant: "default"
80
- }
81
- }
82
- );
83
- function cn({ className: e, variant: t, ...n }) {
84
- return /* @__PURE__ */ p("div", { className: O(rt({ variant: t }), e), ...n });
85
- }
86
- function N(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
87
- return function(o) {
88
- if (e == null || e(o), n === !1 || !o.defaultPrevented)
89
- return t == null ? void 0 : t(o);
90
- };
91
- }
53
+ Je.displayName = "Alert";
54
+ const Qe = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("h5", { ref: n, className: R("mb-1 font-medium leading-none tracking-tight", e), ...t }));
55
+ Qe.displayName = "AlertTitle";
56
+ const et = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: R("text-sm [&_p]:leading-relaxed", e), ...t }));
57
+ et.displayName = "AlertDescription";
92
58
  function fe(e, t) {
93
59
  if (typeof e == "function")
94
60
  return e(t);
@@ -97,157 +63,203 @@ function fe(e, t) {
97
63
  function Ee(...e) {
98
64
  return (t) => {
99
65
  let n = !1;
100
- const r = e.map((o) => {
101
- const a = fe(o, t);
66
+ const r = e.map((s) => {
67
+ const a = fe(s, t);
102
68
  return !n && typeof a == "function" && (n = !0), a;
103
69
  });
104
70
  if (n)
105
71
  return () => {
106
- for (let o = 0; o < r.length; o++) {
107
- const a = r[o];
108
- typeof a == "function" ? a() : fe(e[o], null);
72
+ for (let s = 0; s < r.length; s++) {
73
+ const a = r[s];
74
+ typeof a == "function" ? a() : fe(e[s], null);
109
75
  }
110
76
  };
111
77
  };
112
78
  }
113
79
  function k(...e) {
114
- return s.useCallback(Ee(...e), e);
80
+ return o.useCallback(Ee(...e), e);
81
+ }
82
+ // @__NO_SIDE_EFFECTS__
83
+ function q(e) {
84
+ const t = /* @__PURE__ */ nt(e), n = o.forwardRef((r, s) => {
85
+ const { children: a, ...u } = r, c = o.Children.toArray(a), f = c.find(ot);
86
+ if (f) {
87
+ const i = f.props.children, l = c.map((m) => m === f ? o.Children.count(i) > 1 ? o.Children.only(null) : o.isValidElement(i) ? i.props.children : null : m);
88
+ return /* @__PURE__ */ p(t, { ...u, ref: s, children: o.isValidElement(i) ? o.cloneElement(i, void 0, l) : null });
89
+ }
90
+ return /* @__PURE__ */ p(t, { ...u, ref: s, children: a });
91
+ });
92
+ return n.displayName = `${e}.Slot`, n;
93
+ }
94
+ var tt = /* @__PURE__ */ q("Slot");
95
+ // @__NO_SIDE_EFFECTS__
96
+ function nt(e) {
97
+ const t = o.forwardRef((n, r) => {
98
+ const { children: s, ...a } = n;
99
+ if (o.isValidElement(s)) {
100
+ const u = it(s), c = st(a, s.props);
101
+ return s.type !== o.Fragment && (c.ref = r ? Ee(r, u) : u), o.cloneElement(s, c);
102
+ }
103
+ return o.Children.count(s) > 1 ? o.Children.only(null) : null;
104
+ });
105
+ return t.displayName = `${e}.SlotClone`, t;
106
+ }
107
+ var rt = Symbol("radix.slottable");
108
+ function ot(e) {
109
+ return o.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === rt;
110
+ }
111
+ function st(e, t) {
112
+ const n = { ...t };
113
+ for (const r in t) {
114
+ const s = e[r], a = t[r];
115
+ /^on[A-Z]/.test(r) ? s && a ? n[r] = (...c) => {
116
+ const f = a(...c);
117
+ return s(...c), f;
118
+ } : s && (n[r] = s) : r === "style" ? n[r] = { ...s, ...a } : r === "className" && (n[r] = [s, a].filter(Boolean).join(" "));
119
+ }
120
+ return { ...e, ...n };
121
+ }
122
+ function it(e) {
123
+ var r, s;
124
+ let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
125
+ return n ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
126
+ }
127
+ const at = oe(
128
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
129
+ {
130
+ variants: {
131
+ variant: {
132
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
133
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
134
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
135
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
136
+ ghost: "hover:bg-accent hover:text-accent-foreground",
137
+ link: "text-primary underline-offset-4 hover:underline",
138
+ styled: "bg-gradient-to-r from-slate-900 to-purple-700 hover:from-slate-800 hover:to-purple-600 text-white shadow-lg shadow-purple-500/25 px-6 h-12"
139
+ },
140
+ size: {
141
+ default: "h-10 px-4 py-2",
142
+ sm: "h-9 rounded-md px-3",
143
+ lg: "h-11 rounded-md px-8",
144
+ icon: "h-10 w-10"
145
+ }
146
+ },
147
+ defaultVariants: {
148
+ variant: "default",
149
+ size: "default"
150
+ }
151
+ }
152
+ ), ct = o.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...s }, a) => /* @__PURE__ */ p(r ? tt : "button", { className: R(at({ variant: t, size: n, className: e })), ref: a, ...s }));
153
+ ct.displayName = "Button";
154
+ const ut = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: R("rounded-lg border bg-card text-card-foreground shadow-sm", e), ...t }));
155
+ ut.displayName = "Card";
156
+ const lt = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: R("flex flex-col space-y-1.5 p-6", e), ...t }));
157
+ lt.displayName = "CardHeader";
158
+ const dt = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("h3", { ref: n, className: R("text-2xl font-semibold leading-none tracking-tight", e), ...t }));
159
+ dt.displayName = "CardTitle";
160
+ const ft = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("p", { ref: n, className: R("text-sm text-muted-foreground", e), ...t }));
161
+ ft.displayName = "CardDescription";
162
+ const pt = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: R("p-6 pt-0", e), ...t }));
163
+ pt.displayName = "CardContent";
164
+ const mt = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", { ref: n, className: R("flex items-center p-6 pt-0", e), ...t }));
165
+ mt.displayName = "CardFooter";
166
+ function S(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
167
+ return function(s) {
168
+ if (e == null || e(s), n === !1 || !s.defaultPrevented)
169
+ return t == null ? void 0 : t(s);
170
+ };
115
171
  }
116
- function Te(e, t = []) {
172
+ function he(e, t = []) {
117
173
  let n = [];
118
174
  function r(a, u) {
119
- const c = s.createContext(u), f = n.length;
175
+ const c = o.createContext(u), f = n.length;
120
176
  n = [...n, u];
121
177
  const i = (m) => {
122
178
  var C;
123
- const { scope: y, children: g, ...x } = m, v = ((C = y == null ? void 0 : y[e]) == null ? void 0 : C[f]) || c, d = s.useMemo(() => x, Object.values(x));
124
- return /* @__PURE__ */ p(v.Provider, { value: d, children: g });
179
+ const { scope: y, children: T, ...x } = m, v = ((C = y == null ? void 0 : y[e]) == null ? void 0 : C[f]) || c, d = o.useMemo(() => x, Object.values(x));
180
+ return /* @__PURE__ */ p(v.Provider, { value: d, children: T });
125
181
  };
126
182
  i.displayName = a + "Provider";
127
183
  function l(m, y) {
128
184
  var v;
129
- const g = ((v = y == null ? void 0 : y[e]) == null ? void 0 : v[f]) || c, x = s.useContext(g);
185
+ const T = ((v = y == null ? void 0 : y[e]) == null ? void 0 : v[f]) || c, x = o.useContext(T);
130
186
  if (x) return x;
131
187
  if (u !== void 0) return u;
132
188
  throw new Error(`\`${m}\` must be used within \`${a}\``);
133
189
  }
134
190
  return [i, l];
135
191
  }
136
- const o = () => {
137
- const a = n.map((u) => s.createContext(u));
192
+ const s = () => {
193
+ const a = n.map((u) => o.createContext(u));
138
194
  return function(c) {
139
195
  const f = (c == null ? void 0 : c[e]) || a;
140
- return s.useMemo(
196
+ return o.useMemo(
141
197
  () => ({ [`__scope${e}`]: { ...c, [e]: f } }),
142
198
  [c, f]
143
199
  );
144
200
  };
145
201
  };
146
- return o.scopeName = e, [r, ot(o, ...t)];
202
+ return s.scopeName = e, [r, vt(s, ...t)];
147
203
  }
148
- function ot(...e) {
204
+ function vt(...e) {
149
205
  const t = e[0];
150
206
  if (e.length === 1) return t;
151
207
  const n = () => {
152
- const r = e.map((o) => ({
153
- useScope: o(),
154
- scopeName: o.scopeName
208
+ const r = e.map((s) => ({
209
+ useScope: s(),
210
+ scopeName: s.scopeName
155
211
  }));
156
212
  return function(a) {
157
213
  const u = r.reduce((c, { useScope: f, scopeName: i }) => {
158
214
  const m = f(a)[`__scope${i}`];
159
215
  return { ...c, ...m };
160
216
  }, {});
161
- return s.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
217
+ return o.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
162
218
  };
163
219
  };
164
220
  return n.scopeName = t.scopeName, n;
165
221
  }
166
- // @__NO_SIDE_EFFECTS__
167
- function J(e) {
168
- const t = /* @__PURE__ */ st(e), n = s.forwardRef((r, o) => {
169
- const { children: a, ...u } = r, c = s.Children.toArray(a), f = c.find(at);
170
- if (f) {
171
- const i = f.props.children, l = c.map((m) => m === f ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : m);
172
- return /* @__PURE__ */ p(t, { ...u, ref: o, children: s.isValidElement(i) ? s.cloneElement(i, void 0, l) : null });
173
- }
174
- return /* @__PURE__ */ p(t, { ...u, ref: o, children: a });
175
- });
176
- return n.displayName = `${e}.Slot`, n;
177
- }
178
- // @__NO_SIDE_EFFECTS__
179
- function st(e) {
180
- const t = s.forwardRef((n, r) => {
181
- const { children: o, ...a } = n;
182
- if (s.isValidElement(o)) {
183
- const u = ut(o), c = ct(a, o.props);
184
- return o.type !== s.Fragment && (c.ref = r ? Ee(r, u) : u), s.cloneElement(o, c);
185
- }
186
- return s.Children.count(o) > 1 ? s.Children.only(null) : null;
187
- });
188
- return t.displayName = `${e}.SlotClone`, t;
189
- }
190
- var it = Symbol("radix.slottable");
191
- function at(e) {
192
- return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === it;
193
- }
194
- function ct(e, t) {
195
- const n = { ...t };
196
- for (const r in t) {
197
- const o = e[r], a = t[r];
198
- /^on[A-Z]/.test(r) ? o && a ? n[r] = (...c) => {
199
- const f = a(...c);
200
- return o(...c), f;
201
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...a } : r === "className" && (n[r] = [o, a].filter(Boolean).join(" "));
202
- }
203
- return { ...e, ...n };
204
- }
205
- function ut(e) {
206
- var r, o;
207
- let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
208
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
209
- }
210
- function lt(e) {
211
- const t = e + "CollectionProvider", [n, r] = Te(t), [o, a] = n(
222
+ function yt(e) {
223
+ const t = e + "CollectionProvider", [n, r] = he(t), [s, a] = n(
212
224
  t,
213
225
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
214
226
  ), u = (v) => {
215
- const { scope: d, children: C } = v, E = F.useRef(null), T = F.useRef(/* @__PURE__ */ new Map()).current;
216
- return /* @__PURE__ */ p(o, { scope: d, itemMap: T, collectionRef: E, children: C });
227
+ const { scope: d, children: C } = v, E = F.useRef(null), h = F.useRef(/* @__PURE__ */ new Map()).current;
228
+ return /* @__PURE__ */ p(s, { scope: d, itemMap: h, collectionRef: E, children: C });
217
229
  };
218
230
  u.displayName = t;
219
- const c = e + "CollectionSlot", f = /* @__PURE__ */ J(c), i = F.forwardRef(
231
+ const c = e + "CollectionSlot", f = /* @__PURE__ */ q(c), i = F.forwardRef(
220
232
  (v, d) => {
221
- const { scope: C, children: E } = v, T = a(c, C), b = k(d, T.collectionRef);
233
+ const { scope: C, children: E } = v, h = a(c, C), b = k(d, h.collectionRef);
222
234
  return /* @__PURE__ */ p(f, { ref: b, children: E });
223
235
  }
224
236
  );
225
237
  i.displayName = c;
226
- const l = e + "CollectionItemSlot", m = "data-radix-collection-item", y = /* @__PURE__ */ J(l), g = F.forwardRef(
238
+ const l = e + "CollectionItemSlot", m = "data-radix-collection-item", y = /* @__PURE__ */ q(l), T = F.forwardRef(
227
239
  (v, d) => {
228
- const { scope: C, children: E, ...T } = v, b = F.useRef(null), R = k(d, b), P = a(l, C);
229
- return F.useEffect(() => (P.itemMap.set(b, { ref: b, ...T }), () => void P.itemMap.delete(b))), /* @__PURE__ */ p(y, { [m]: "", ref: R, children: E });
240
+ const { scope: C, children: E, ...h } = v, b = F.useRef(null), P = k(d, b), N = a(l, C);
241
+ return F.useEffect(() => (N.itemMap.set(b, { ref: b, ...h }), () => void N.itemMap.delete(b))), /* @__PURE__ */ p(y, { [m]: "", ref: P, children: E });
230
242
  }
231
243
  );
232
- g.displayName = l;
244
+ T.displayName = l;
233
245
  function x(v) {
234
246
  const d = a(e + "CollectionConsumer", v);
235
247
  return F.useCallback(() => {
236
248
  const E = d.collectionRef.current;
237
249
  if (!E) return [];
238
- const T = Array.from(E.querySelectorAll(`[${m}]`));
250
+ const h = Array.from(E.querySelectorAll(`[${m}]`));
239
251
  return Array.from(d.itemMap.values()).sort(
240
- (P, h) => T.indexOf(P.ref.current) - T.indexOf(h.ref.current)
252
+ (N, g) => h.indexOf(N.ref.current) - h.indexOf(g.ref.current)
241
253
  );
242
254
  }, [d.collectionRef, d.itemMap]);
243
255
  }
244
256
  return [
245
- { Provider: u, Slot: i, ItemSlot: g },
257
+ { Provider: u, Slot: i, ItemSlot: T },
246
258
  x,
247
259
  r
248
260
  ];
249
261
  }
250
- var dt = [
262
+ var wt = [
251
263
  "a",
252
264
  "button",
253
265
  "div",
@@ -265,137 +277,137 @@ var dt = [
265
277
  "span",
266
278
  "svg",
267
279
  "ul"
268
- ], I = dt.reduce((e, t) => {
269
- const n = /* @__PURE__ */ J(`Primitive.${t}`), r = s.forwardRef((o, a) => {
270
- const { asChild: u, ...c } = o, f = u ? n : t;
280
+ ], I = wt.reduce((e, t) => {
281
+ const n = /* @__PURE__ */ q(`Primitive.${t}`), r = o.forwardRef((s, a) => {
282
+ const { asChild: u, ...c } = s, f = u ? n : t;
271
283
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(f, { ...c, ref: a });
272
284
  });
273
285
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
274
286
  }, {});
275
- function he(e, t) {
287
+ function ge(e, t) {
276
288
  e && we.flushSync(() => e.dispatchEvent(t));
277
289
  }
278
290
  function V(e) {
279
- const t = s.useRef(e);
280
- return s.useEffect(() => {
291
+ const t = o.useRef(e);
292
+ return o.useEffect(() => {
281
293
  t.current = e;
282
- }), s.useMemo(() => (...n) => {
294
+ }), o.useMemo(() => (...n) => {
283
295
  var r;
284
296
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
285
297
  }, []);
286
298
  }
287
- function ft(e, t = globalThis == null ? void 0 : globalThis.document) {
299
+ function Et(e, t = globalThis == null ? void 0 : globalThis.document) {
288
300
  const n = V(e);
289
- s.useEffect(() => {
290
- const r = (o) => {
291
- o.key === "Escape" && n(o);
301
+ o.useEffect(() => {
302
+ const r = (s) => {
303
+ s.key === "Escape" && n(s);
292
304
  };
293
305
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
294
306
  }, [n, t]);
295
307
  }
296
- var pt = "DismissableLayer", Q = "dismissableLayer.update", mt = "dismissableLayer.pointerDownOutside", vt = "dismissableLayer.focusOutside", pe, ge = s.createContext({
308
+ var ht = "DismissableLayer", Q = "dismissableLayer.update", gt = "dismissableLayer.pointerDownOutside", Tt = "dismissableLayer.focusOutside", pe, Te = o.createContext({
297
309
  layers: /* @__PURE__ */ new Set(),
298
310
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
299
311
  branches: /* @__PURE__ */ new Set()
300
- }), be = s.forwardRef(
312
+ }), be = o.forwardRef(
301
313
  (e, t) => {
302
314
  const {
303
315
  disableOutsidePointerEvents: n = !1,
304
316
  onEscapeKeyDown: r,
305
- onPointerDownOutside: o,
317
+ onPointerDownOutside: s,
306
318
  onFocusOutside: a,
307
319
  onInteractOutside: u,
308
320
  onDismiss: c,
309
321
  ...f
310
- } = e, i = s.useContext(ge), [l, m] = s.useState(null), y = (l == null ? void 0 : l.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), x = k(t, (h) => m(h)), v = Array.from(i.layers), [d] = [...i.layersWithOutsidePointerEventsDisabled].slice(-1), C = v.indexOf(d), E = l ? v.indexOf(l) : -1, T = i.layersWithOutsidePointerEventsDisabled.size > 0, b = E >= C, R = wt((h) => {
311
- const A = h.target, D = [...i.branches].some((L) => L.contains(A));
312
- !b || D || (o == null || o(h), u == null || u(h), h.defaultPrevented || c == null || c());
313
- }, y), P = Et((h) => {
314
- const A = h.target;
315
- [...i.branches].some((L) => L.contains(A)) || (a == null || a(h), u == null || u(h), h.defaultPrevented || c == null || c());
322
+ } = e, i = o.useContext(Te), [l, m] = o.useState(null), y = (l == null ? void 0 : l.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, T] = o.useState({}), x = k(t, (g) => m(g)), v = Array.from(i.layers), [d] = [...i.layersWithOutsidePointerEventsDisabled].slice(-1), C = v.indexOf(d), E = l ? v.indexOf(l) : -1, h = i.layersWithOutsidePointerEventsDisabled.size > 0, b = E >= C, P = Ct((g) => {
323
+ const O = g.target, D = [...i.branches].some((L) => L.contains(O));
324
+ !b || D || (s == null || s(g), u == null || u(g), g.defaultPrevented || c == null || c());
325
+ }, y), N = xt((g) => {
326
+ const O = g.target;
327
+ [...i.branches].some((L) => L.contains(O)) || (a == null || a(g), u == null || u(g), g.defaultPrevented || c == null || c());
316
328
  }, y);
317
- return ft((h) => {
318
- E === i.layers.size - 1 && (r == null || r(h), !h.defaultPrevented && c && (h.preventDefault(), c()));
319
- }, y), s.useEffect(() => {
329
+ return Et((g) => {
330
+ E === i.layers.size - 1 && (r == null || r(g), !g.defaultPrevented && c && (g.preventDefault(), c()));
331
+ }, y), o.useEffect(() => {
320
332
  if (l)
321
333
  return n && (i.layersWithOutsidePointerEventsDisabled.size === 0 && (pe = y.body.style.pointerEvents, y.body.style.pointerEvents = "none"), i.layersWithOutsidePointerEventsDisabled.add(l)), i.layers.add(l), me(), () => {
322
334
  n && i.layersWithOutsidePointerEventsDisabled.size === 1 && (y.body.style.pointerEvents = pe);
323
335
  };
324
- }, [l, y, n, i]), s.useEffect(() => () => {
336
+ }, [l, y, n, i]), o.useEffect(() => () => {
325
337
  l && (i.layers.delete(l), i.layersWithOutsidePointerEventsDisabled.delete(l), me());
326
- }, [l, i]), s.useEffect(() => {
327
- const h = () => g({});
328
- return document.addEventListener(Q, h), () => document.removeEventListener(Q, h);
338
+ }, [l, i]), o.useEffect(() => {
339
+ const g = () => T({});
340
+ return document.addEventListener(Q, g), () => document.removeEventListener(Q, g);
329
341
  }, []), /* @__PURE__ */ p(
330
342
  I.div,
331
343
  {
332
344
  ...f,
333
345
  ref: x,
334
346
  style: {
335
- pointerEvents: T ? b ? "auto" : "none" : void 0,
347
+ pointerEvents: h ? b ? "auto" : "none" : void 0,
336
348
  ...e.style
337
349
  },
338
- onFocusCapture: N(e.onFocusCapture, P.onFocusCapture),
339
- onBlurCapture: N(e.onBlurCapture, P.onBlurCapture),
340
- onPointerDownCapture: N(
350
+ onFocusCapture: S(e.onFocusCapture, N.onFocusCapture),
351
+ onBlurCapture: S(e.onBlurCapture, N.onBlurCapture),
352
+ onPointerDownCapture: S(
341
353
  e.onPointerDownCapture,
342
- R.onPointerDownCapture
354
+ P.onPointerDownCapture
343
355
  )
344
356
  }
345
357
  );
346
358
  }
347
359
  );
348
- be.displayName = pt;
349
- var yt = "DismissableLayerBranch", Ce = s.forwardRef((e, t) => {
350
- const n = s.useContext(ge), r = s.useRef(null), o = k(t, r);
351
- return s.useEffect(() => {
360
+ be.displayName = ht;
361
+ var bt = "DismissableLayerBranch", Ce = o.forwardRef((e, t) => {
362
+ const n = o.useContext(Te), r = o.useRef(null), s = k(t, r);
363
+ return o.useEffect(() => {
352
364
  const a = r.current;
353
365
  if (a)
354
366
  return n.branches.add(a), () => {
355
367
  n.branches.delete(a);
356
368
  };
357
- }, [n.branches]), /* @__PURE__ */ p(I.div, { ...e, ref: o });
369
+ }, [n.branches]), /* @__PURE__ */ p(I.div, { ...e, ref: s });
358
370
  });
359
- Ce.displayName = yt;
360
- function wt(e, t = globalThis == null ? void 0 : globalThis.document) {
361
- const n = V(e), r = s.useRef(!1), o = s.useRef(() => {
371
+ Ce.displayName = bt;
372
+ function Ct(e, t = globalThis == null ? void 0 : globalThis.document) {
373
+ const n = V(e), r = o.useRef(!1), s = o.useRef(() => {
362
374
  });
363
- return s.useEffect(() => {
375
+ return o.useEffect(() => {
364
376
  const a = (c) => {
365
377
  if (c.target && !r.current) {
366
378
  let f = function() {
367
379
  xe(
368
- mt,
380
+ gt,
369
381
  n,
370
382
  i,
371
383
  { discrete: !0 }
372
384
  );
373
385
  };
374
386
  const i = { originalEvent: c };
375
- c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = f, t.addEventListener("click", o.current, { once: !0 })) : f();
387
+ c.pointerType === "touch" ? (t.removeEventListener("click", s.current), s.current = f, t.addEventListener("click", s.current, { once: !0 })) : f();
376
388
  } else
377
- t.removeEventListener("click", o.current);
389
+ t.removeEventListener("click", s.current);
378
390
  r.current = !1;
379
391
  }, u = window.setTimeout(() => {
380
392
  t.addEventListener("pointerdown", a);
381
393
  }, 0);
382
394
  return () => {
383
- window.clearTimeout(u), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
395
+ window.clearTimeout(u), t.removeEventListener("pointerdown", a), t.removeEventListener("click", s.current);
384
396
  };
385
397
  }, [t, n]), {
386
398
  // ensures we check React component tree (not just DOM tree)
387
399
  onPointerDownCapture: () => r.current = !0
388
400
  };
389
401
  }
390
- function Et(e, t = globalThis == null ? void 0 : globalThis.document) {
391
- const n = V(e), r = s.useRef(!1);
392
- return s.useEffect(() => {
393
- const o = (a) => {
394
- a.target && !r.current && xe(vt, n, { originalEvent: a }, {
402
+ function xt(e, t = globalThis == null ? void 0 : globalThis.document) {
403
+ const n = V(e), r = o.useRef(!1);
404
+ return o.useEffect(() => {
405
+ const s = (a) => {
406
+ a.target && !r.current && xe(Tt, n, { originalEvent: a }, {
395
407
  discrete: !1
396
408
  });
397
409
  };
398
- return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
410
+ return t.addEventListener("focusin", s), () => t.removeEventListener("focusin", s);
399
411
  }, [t, n]), {
400
412
  onFocusCapture: () => r.current = !0,
401
413
  onBlurCapture: () => r.current = !1
@@ -406,28 +418,28 @@ function me() {
406
418
  document.dispatchEvent(e);
407
419
  }
408
420
  function xe(e, t, n, { discrete: r }) {
409
- const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
410
- t && o.addEventListener(e, t, { once: !0 }), r ? he(o, a) : o.dispatchEvent(a);
421
+ const s = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
422
+ t && s.addEventListener(e, t, { once: !0 }), r ? ge(s, a) : s.dispatchEvent(a);
411
423
  }
412
- var Tt = be, ht = Ce, B = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
413
- }, gt = "Portal", Pe = s.forwardRef((e, t) => {
424
+ var Nt = be, Pt = Ce, B = globalThis != null && globalThis.document ? o.useLayoutEffect : () => {
425
+ }, Rt = "Portal", Ne = o.forwardRef((e, t) => {
414
426
  var c;
415
- const { container: n, ...r } = e, [o, a] = s.useState(!1);
427
+ const { container: n, ...r } = e, [s, a] = o.useState(!1);
416
428
  B(() => a(!0), []);
417
- const u = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
429
+ const u = n || s && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
418
430
  return u ? qe.createPortal(/* @__PURE__ */ p(I.div, { ...r, ref: t }), u) : null;
419
431
  });
420
- Pe.displayName = gt;
421
- function bt(e, t) {
422
- return s.useReducer((n, r) => t[n][r] ?? n, e);
432
+ Ne.displayName = Rt;
433
+ function St(e, t) {
434
+ return o.useReducer((n, r) => t[n][r] ?? n, e);
423
435
  }
424
- var Re = (e) => {
425
- const { present: t, children: n } = e, r = Ct(t), o = typeof n == "function" ? n({ present: r.isPresent }) : s.Children.only(n), a = k(r.ref, xt(o));
426
- return typeof n == "function" || r.isPresent ? s.cloneElement(o, { ref: a }) : null;
436
+ var Pe = (e) => {
437
+ const { present: t, children: n } = e, r = At(t), s = typeof n == "function" ? n({ present: r.isPresent }) : o.Children.only(n), a = k(r.ref, Ot(s));
438
+ return typeof n == "function" || r.isPresent ? o.cloneElement(s, { ref: a }) : null;
427
439
  };
428
- Re.displayName = "Presence";
429
- function Ct(e) {
430
- const [t, n] = s.useState(), r = s.useRef(null), o = s.useRef(e), a = s.useRef("none"), u = e ? "mounted" : "unmounted", [c, f] = bt(u, {
440
+ Pe.displayName = "Presence";
441
+ function At(e) {
442
+ const [t, n] = o.useState(), r = o.useRef(null), s = o.useRef(e), a = o.useRef("none"), u = e ? "mounted" : "unmounted", [c, f] = St(u, {
431
443
  mounted: {
432
444
  UNMOUNT: "unmounted",
433
445
  ANIMATION_OUT: "unmountSuspended"
@@ -440,28 +452,28 @@ function Ct(e) {
440
452
  MOUNT: "mounted"
441
453
  }
442
454
  });
443
- return s.useEffect(() => {
444
- const i = Y(r.current);
455
+ return o.useEffect(() => {
456
+ const i = X(r.current);
445
457
  a.current = c === "mounted" ? i : "none";
446
458
  }, [c]), B(() => {
447
- const i = r.current, l = o.current;
459
+ const i = r.current, l = s.current;
448
460
  if (l !== e) {
449
- const y = a.current, g = Y(i);
450
- e ? f("MOUNT") : g === "none" || (i == null ? void 0 : i.display) === "none" ? f("UNMOUNT") : f(l && y !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
461
+ const y = a.current, T = X(i);
462
+ e ? f("MOUNT") : T === "none" || (i == null ? void 0 : i.display) === "none" ? f("UNMOUNT") : f(l && y !== T ? "ANIMATION_OUT" : "UNMOUNT"), s.current = e;
451
463
  }
452
464
  }, [e, f]), B(() => {
453
465
  if (t) {
454
466
  let i;
455
- const l = t.ownerDocument.defaultView ?? window, m = (g) => {
456
- const v = Y(r.current).includes(CSS.escape(g.animationName));
457
- if (g.target === t && v && (f("ANIMATION_END"), !o.current)) {
467
+ const l = t.ownerDocument.defaultView ?? window, m = (T) => {
468
+ const v = X(r.current).includes(CSS.escape(T.animationName));
469
+ if (T.target === t && v && (f("ANIMATION_END"), !s.current)) {
458
470
  const d = t.style.animationFillMode;
459
471
  t.style.animationFillMode = "forwards", i = l.setTimeout(() => {
460
472
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = d);
461
473
  });
462
474
  }
463
- }, y = (g) => {
464
- g.target === t && (a.current = Y(r.current));
475
+ }, y = (T) => {
476
+ T.target === t && (a.current = X(r.current));
465
477
  };
466
478
  return t.addEventListener("animationstart", y), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
467
479
  l.clearTimeout(i), t.removeEventListener("animationstart", y), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
@@ -470,45 +482,45 @@ function Ct(e) {
470
482
  f("ANIMATION_END");
471
483
  }, [t, f]), {
472
484
  isPresent: ["mounted", "unmountSuspended"].includes(c),
473
- ref: s.useCallback((i) => {
485
+ ref: o.useCallback((i) => {
474
486
  r.current = i ? getComputedStyle(i) : null, n(i);
475
487
  }, [])
476
488
  };
477
489
  }
478
- function Y(e) {
490
+ function X(e) {
479
491
  return (e == null ? void 0 : e.animationName) || "none";
480
492
  }
481
- function xt(e) {
482
- var r, o;
493
+ function Ot(e) {
494
+ var r, s;
483
495
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
484
- return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
496
+ return n ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
485
497
  }
486
- var Pt = s[" useInsertionEffect ".trim().toString()] || B;
487
- function Rt({
498
+ var It = o[" useInsertionEffect ".trim().toString()] || B;
499
+ function Dt({
488
500
  prop: e,
489
501
  defaultProp: t,
490
502
  onChange: n = () => {
491
503
  },
492
504
  caller: r
493
505
  }) {
494
- const [o, a, u] = Nt({
506
+ const [s, a, u] = _t({
495
507
  defaultProp: t,
496
508
  onChange: n
497
- }), c = e !== void 0, f = c ? e : o;
509
+ }), c = e !== void 0, f = c ? e : s;
498
510
  {
499
- const l = s.useRef(e !== void 0);
500
- s.useEffect(() => {
511
+ const l = o.useRef(e !== void 0);
512
+ o.useEffect(() => {
501
513
  const m = l.current;
502
514
  m !== c && console.warn(
503
515
  `${r} is changing from ${m ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
504
516
  ), l.current = c;
505
517
  }, [c, r]);
506
518
  }
507
- const i = s.useCallback(
519
+ const i = o.useCallback(
508
520
  (l) => {
509
521
  var m;
510
522
  if (c) {
511
- const y = St(l) ? l(e) : l;
523
+ const y = Lt(l) ? l(e) : l;
512
524
  y !== e && ((m = u.current) == null || m.call(u, y));
513
525
  } else
514
526
  a(l);
@@ -517,22 +529,22 @@ function Rt({
517
529
  );
518
530
  return [f, i];
519
531
  }
520
- function Nt({
532
+ function _t({
521
533
  defaultProp: e,
522
534
  onChange: t
523
535
  }) {
524
- const [n, r] = s.useState(e), o = s.useRef(n), a = s.useRef(t);
525
- return Pt(() => {
536
+ const [n, r] = o.useState(e), s = o.useRef(n), a = o.useRef(t);
537
+ return It(() => {
526
538
  a.current = t;
527
- }, [t]), s.useEffect(() => {
539
+ }, [t]), o.useEffect(() => {
528
540
  var u;
529
- o.current !== n && ((u = a.current) == null || u.call(a, n), o.current = n);
530
- }, [n, o]), [n, r, a];
541
+ s.current !== n && ((u = a.current) == null || u.call(a, n), s.current = n);
542
+ }, [n, s]), [n, r, a];
531
543
  }
532
- function St(e) {
544
+ function Lt(e) {
533
545
  return typeof e == "function";
534
546
  }
535
- var At = Object.freeze({
547
+ var Mt = Object.freeze({
536
548
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
537
549
  position: "absolute",
538
550
  border: 0,
@@ -544,41 +556,41 @@ var At = Object.freeze({
544
556
  clip: "rect(0, 0, 0, 0)",
545
557
  whiteSpace: "nowrap",
546
558
  wordWrap: "normal"
547
- }), Ot = "VisuallyHidden", se = s.forwardRef(
559
+ }), Ft = "VisuallyHidden", se = o.forwardRef(
548
560
  (e, t) => /* @__PURE__ */ p(
549
561
  I.span,
550
562
  {
551
563
  ...e,
552
564
  ref: t,
553
- style: { ...At, ...e.style }
565
+ style: { ...Mt, ...e.style }
554
566
  }
555
567
  )
556
568
  );
557
- se.displayName = Ot;
558
- var ie = "ToastProvider", [ae, It, Dt] = lt("Toast"), [Ne] = Te("Toast", [Dt]), [_t, q] = Ne(ie), Se = (e) => {
569
+ se.displayName = Ft;
570
+ var ie = "ToastProvider", [ae, kt, Vt] = yt("Toast"), [Re] = he("Toast", [Vt]), [Wt, Z] = Re(ie), Se = (e) => {
559
571
  const {
560
572
  __scopeToast: t,
561
573
  label: n = "Notification",
562
574
  duration: r = 5e3,
563
- swipeDirection: o = "right",
575
+ swipeDirection: s = "right",
564
576
  swipeThreshold: a = 50,
565
577
  children: u
566
- } = e, [c, f] = s.useState(null), [i, l] = s.useState(0), m = s.useRef(!1), y = s.useRef(!1);
578
+ } = e, [c, f] = o.useState(null), [i, l] = o.useState(0), m = o.useRef(!1), y = o.useRef(!1);
567
579
  return n.trim() || console.error(
568
580
  `Invalid prop \`label\` supplied to \`${ie}\`. Expected non-empty \`string\`.`
569
581
  ), /* @__PURE__ */ p(ae.Provider, { scope: t, children: /* @__PURE__ */ p(
570
- _t,
582
+ Wt,
571
583
  {
572
584
  scope: t,
573
585
  label: n,
574
586
  duration: r,
575
- swipeDirection: o,
587
+ swipeDirection: s,
576
588
  swipeThreshold: a,
577
589
  toastCount: i,
578
590
  viewport: c,
579
591
  onViewportChange: f,
580
- onToastAdd: s.useCallback(() => l((g) => g + 1), []),
581
- onToastRemove: s.useCallback(() => l((g) => g - 1), []),
592
+ onToastAdd: o.useCallback(() => l((T) => T + 1), []),
593
+ onToastRemove: o.useCallback(() => l((T) => T - 1), []),
582
594
  isFocusedToastEscapeKeyDownRef: m,
583
595
  isClosePausedRef: y,
584
596
  children: u
@@ -586,77 +598,77 @@ var ie = "ToastProvider", [ae, It, Dt] = lt("Toast"), [Ne] = Te("Toast", [Dt]),
586
598
  ) });
587
599
  };
588
600
  Se.displayName = ie;
589
- var Ae = "ToastViewport", Lt = ["F8"], ee = "toast.viewportPause", te = "toast.viewportResume", Oe = s.forwardRef(
601
+ var Ae = "ToastViewport", $t = ["F8"], ee = "toast.viewportPause", te = "toast.viewportResume", Oe = o.forwardRef(
590
602
  (e, t) => {
591
603
  const {
592
604
  __scopeToast: n,
593
- hotkey: r = Lt,
594
- label: o = "Notifications ({hotkey})",
605
+ hotkey: r = $t,
606
+ label: s = "Notifications ({hotkey})",
595
607
  ...a
596
- } = e, u = q(Ae, n), c = It(n), f = s.useRef(null), i = s.useRef(null), l = s.useRef(null), m = s.useRef(null), y = k(t, m, u.onViewportChange), g = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = u.toastCount > 0;
597
- s.useEffect(() => {
608
+ } = e, u = Z(Ae, n), c = kt(n), f = o.useRef(null), i = o.useRef(null), l = o.useRef(null), m = o.useRef(null), y = k(t, m, u.onViewportChange), T = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = u.toastCount > 0;
609
+ o.useEffect(() => {
598
610
  const d = (C) => {
599
- var T;
600
- r.length !== 0 && r.every((b) => C[b] || C.code === b) && ((T = m.current) == null || T.focus());
611
+ var h;
612
+ r.length !== 0 && r.every((b) => C[b] || C.code === b) && ((h = m.current) == null || h.focus());
601
613
  };
602
614
  return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
603
- }, [r]), s.useEffect(() => {
615
+ }, [r]), o.useEffect(() => {
604
616
  const d = f.current, C = m.current;
605
617
  if (x && d && C) {
606
618
  const E = () => {
607
619
  if (!u.isClosePausedRef.current) {
608
- const P = new CustomEvent(ee);
609
- C.dispatchEvent(P), u.isClosePausedRef.current = !0;
620
+ const N = new CustomEvent(ee);
621
+ C.dispatchEvent(N), u.isClosePausedRef.current = !0;
610
622
  }
611
- }, T = () => {
623
+ }, h = () => {
612
624
  if (u.isClosePausedRef.current) {
613
- const P = new CustomEvent(te);
614
- C.dispatchEvent(P), u.isClosePausedRef.current = !1;
625
+ const N = new CustomEvent(te);
626
+ C.dispatchEvent(N), u.isClosePausedRef.current = !1;
615
627
  }
616
- }, b = (P) => {
617
- !d.contains(P.relatedTarget) && T();
618
- }, R = () => {
619
- d.contains(document.activeElement) || T();
628
+ }, b = (N) => {
629
+ !d.contains(N.relatedTarget) && h();
630
+ }, P = () => {
631
+ d.contains(document.activeElement) || h();
620
632
  };
621
- return d.addEventListener("focusin", E), d.addEventListener("focusout", b), d.addEventListener("pointermove", E), d.addEventListener("pointerleave", R), window.addEventListener("blur", E), window.addEventListener("focus", T), () => {
622
- d.removeEventListener("focusin", E), d.removeEventListener("focusout", b), d.removeEventListener("pointermove", E), d.removeEventListener("pointerleave", R), window.removeEventListener("blur", E), window.removeEventListener("focus", T);
633
+ return d.addEventListener("focusin", E), d.addEventListener("focusout", b), d.addEventListener("pointermove", E), d.addEventListener("pointerleave", P), window.addEventListener("blur", E), window.addEventListener("focus", h), () => {
634
+ d.removeEventListener("focusin", E), d.removeEventListener("focusout", b), d.removeEventListener("pointermove", E), d.removeEventListener("pointerleave", P), window.removeEventListener("blur", E), window.removeEventListener("focus", h);
623
635
  };
624
636
  }
625
637
  }, [x, u.isClosePausedRef]);
626
- const v = s.useCallback(
638
+ const v = o.useCallback(
627
639
  ({ tabbingDirection: d }) => {
628
- const E = c().map((T) => {
629
- const b = T.ref.current, R = [b, ...Yt(b)];
630
- return d === "forwards" ? R : R.reverse();
640
+ const E = c().map((h) => {
641
+ const b = h.ref.current, P = [b, ...Qt(b)];
642
+ return d === "forwards" ? P : P.reverse();
631
643
  });
632
644
  return (d === "forwards" ? E.reverse() : E).flat();
633
645
  },
634
646
  [c]
635
647
  );
636
- return s.useEffect(() => {
648
+ return o.useEffect(() => {
637
649
  const d = m.current;
638
650
  if (d) {
639
651
  const C = (E) => {
640
- var R, P, h;
641
- const T = E.altKey || E.ctrlKey || E.metaKey;
642
- if (E.key === "Tab" && !T) {
643
- const A = document.activeElement, D = E.shiftKey;
652
+ var P, N, g;
653
+ const h = E.altKey || E.ctrlKey || E.metaKey;
654
+ if (E.key === "Tab" && !h) {
655
+ const O = document.activeElement, D = E.shiftKey;
644
656
  if (E.target === d && D) {
645
- (R = i.current) == null || R.focus();
657
+ (P = i.current) == null || P.focus();
646
658
  return;
647
659
  }
648
- const M = v({ tabbingDirection: D ? "backwards" : "forwards" }), j = M.findIndex((w) => w === A);
649
- G(M.slice(j + 1)) ? E.preventDefault() : D ? (P = i.current) == null || P.focus() : (h = l.current) == null || h.focus();
660
+ const M = v({ tabbingDirection: D ? "backwards" : "forwards" }), j = M.findIndex((w) => w === O);
661
+ J(M.slice(j + 1)) ? E.preventDefault() : D ? (N = i.current) == null || N.focus() : (g = l.current) == null || g.focus();
650
662
  }
651
663
  };
652
664
  return d.addEventListener("keydown", C), () => d.removeEventListener("keydown", C);
653
665
  }
654
666
  }, [c, v]), /* @__PURE__ */ re(
655
- ht,
667
+ Pt,
656
668
  {
657
669
  ref: f,
658
670
  role: "region",
659
- "aria-label": o.replace("{hotkey}", g),
671
+ "aria-label": s.replace("{hotkey}", T),
660
672
  tabIndex: -1,
661
673
  style: { pointerEvents: x ? void 0 : "none" },
662
674
  children: [
@@ -668,7 +680,7 @@ var Ae = "ToastViewport", Lt = ["F8"], ee = "toast.viewportPause", te = "toast.v
668
680
  const d = v({
669
681
  tabbingDirection: "forwards"
670
682
  });
671
- G(d);
683
+ J(d);
672
684
  }
673
685
  }
674
686
  ),
@@ -681,7 +693,7 @@ var Ae = "ToastViewport", Lt = ["F8"], ee = "toast.viewportPause", te = "toast.v
681
693
  const d = v({
682
694
  tabbingDirection: "backwards"
683
695
  });
684
- G(d);
696
+ J(d);
685
697
  }
686
698
  }
687
699
  )
@@ -691,14 +703,14 @@ var Ae = "ToastViewport", Lt = ["F8"], ee = "toast.viewportPause", te = "toast.v
691
703
  }
692
704
  );
693
705
  Oe.displayName = Ae;
694
- var Ie = "ToastFocusProxy", ne = s.forwardRef(
706
+ var Ie = "ToastFocusProxy", ne = o.forwardRef(
695
707
  (e, t) => {
696
- const { __scopeToast: n, onFocusFromOutsideViewport: r, ...o } = e, a = q(Ie, n);
708
+ const { __scopeToast: n, onFocusFromOutsideViewport: r, ...s } = e, a = Z(Ie, n);
697
709
  return /* @__PURE__ */ p(
698
710
  se,
699
711
  {
700
712
  tabIndex: 0,
701
- ...o,
713
+ ...s,
702
714
  ref: t,
703
715
  style: { position: "fixed" },
704
716
  onFocus: (u) => {
@@ -711,16 +723,16 @@ var Ie = "ToastFocusProxy", ne = s.forwardRef(
711
723
  }
712
724
  );
713
725
  ne.displayName = Ie;
714
- var K = "Toast", Mt = "toast.swipeStart", Ft = "toast.swipeMove", kt = "toast.swipeCancel", Vt = "toast.swipeEnd", De = s.forwardRef(
726
+ var K = "Toast", Ut = "toast.swipeStart", Bt = "toast.swipeMove", Kt = "toast.swipeCancel", jt = "toast.swipeEnd", De = o.forwardRef(
715
727
  (e, t) => {
716
- const { forceMount: n, open: r, defaultOpen: o, onOpenChange: a, ...u } = e, [c, f] = Rt({
728
+ const { forceMount: n, open: r, defaultOpen: s, onOpenChange: a, ...u } = e, [c, f] = Dt({
717
729
  prop: r,
718
- defaultProp: o ?? !0,
730
+ defaultProp: s ?? !0,
719
731
  onChange: a,
720
732
  caller: K
721
733
  });
722
- return /* @__PURE__ */ p(Re, { present: n || c, children: /* @__PURE__ */ p(
723
- Ut,
734
+ return /* @__PURE__ */ p(Pe, { present: n || c, children: /* @__PURE__ */ p(
735
+ Xt,
724
736
  {
725
737
  open: c,
726
738
  ...u,
@@ -728,17 +740,17 @@ var K = "Toast", Mt = "toast.swipeStart", Ft = "toast.swipeMove", kt = "toast.sw
728
740
  onClose: () => f(!1),
729
741
  onPause: V(e.onPause),
730
742
  onResume: V(e.onResume),
731
- onSwipeStart: N(e.onSwipeStart, (i) => {
743
+ onSwipeStart: S(e.onSwipeStart, (i) => {
732
744
  i.currentTarget.setAttribute("data-swipe", "start");
733
745
  }),
734
- onSwipeMove: N(e.onSwipeMove, (i) => {
746
+ onSwipeMove: S(e.onSwipeMove, (i) => {
735
747
  const { x: l, y: m } = i.detail.delta;
736
748
  i.currentTarget.setAttribute("data-swipe", "move"), i.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${l}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${m}px`);
737
749
  }),
738
- onSwipeCancel: N(e.onSwipeCancel, (i) => {
750
+ onSwipeCancel: S(e.onSwipeCancel, (i) => {
739
751
  i.currentTarget.setAttribute("data-swipe", "cancel"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
740
752
  }),
741
- onSwipeEnd: N(e.onSwipeEnd, (i) => {
753
+ onSwipeEnd: S(e.onSwipeEnd, (i) => {
742
754
  const { x: l, y: m } = i.detail.delta;
743
755
  i.currentTarget.setAttribute("data-swipe", "end"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${l}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${m}px`), f(!1);
744
756
  })
@@ -747,15 +759,15 @@ var K = "Toast", Mt = "toast.swipeStart", Ft = "toast.swipeMove", kt = "toast.sw
747
759
  }
748
760
  );
749
761
  De.displayName = K;
750
- var [Wt, $t] = Ne(K, {
762
+ var [Ht, zt] = Re(K, {
751
763
  onClose() {
752
764
  }
753
- }), Ut = s.forwardRef(
765
+ }), Xt = o.forwardRef(
754
766
  (e, t) => {
755
767
  const {
756
768
  __scopeToast: n,
757
769
  type: r = "foreground",
758
- duration: o,
770
+ duration: s,
759
771
  open: a,
760
772
  onClose: u,
761
773
  onEscapeKeyDown: c,
@@ -764,37 +776,37 @@ var [Wt, $t] = Ne(K, {
764
776
  onSwipeStart: l,
765
777
  onSwipeMove: m,
766
778
  onSwipeCancel: y,
767
- onSwipeEnd: g,
779
+ onSwipeEnd: T,
768
780
  ...x
769
- } = e, v = q(K, n), [d, C] = s.useState(null), E = k(t, (w) => C(w)), T = s.useRef(null), b = s.useRef(null), R = o || v.duration, P = s.useRef(0), h = s.useRef(R), A = s.useRef(0), { onToastAdd: D, onToastRemove: L } = v, W = V(() => {
770
- var S;
771
- (d == null ? void 0 : d.contains(document.activeElement)) && ((S = v.viewport) == null || S.focus()), u();
772
- }), M = s.useCallback(
781
+ } = e, v = Z(K, n), [d, C] = o.useState(null), E = k(t, (w) => C(w)), h = o.useRef(null), b = o.useRef(null), P = s || v.duration, N = o.useRef(0), g = o.useRef(P), O = o.useRef(0), { onToastAdd: D, onToastRemove: L } = v, W = V(() => {
782
+ var A;
783
+ (d == null ? void 0 : d.contains(document.activeElement)) && ((A = v.viewport) == null || A.focus()), u();
784
+ }), M = o.useCallback(
773
785
  (w) => {
774
- !w || w === 1 / 0 || (window.clearTimeout(A.current), P.current = (/* @__PURE__ */ new Date()).getTime(), A.current = window.setTimeout(W, w));
786
+ !w || w === 1 / 0 || (window.clearTimeout(O.current), N.current = (/* @__PURE__ */ new Date()).getTime(), O.current = window.setTimeout(W, w));
775
787
  },
776
788
  [W]
777
789
  );
778
- s.useEffect(() => {
790
+ o.useEffect(() => {
779
791
  const w = v.viewport;
780
792
  if (w) {
781
- const S = () => {
782
- M(h.current), i == null || i();
793
+ const A = () => {
794
+ M(g.current), i == null || i();
783
795
  }, _ = () => {
784
- const $ = (/* @__PURE__ */ new Date()).getTime() - P.current;
785
- h.current = h.current - $, window.clearTimeout(A.current), f == null || f();
796
+ const $ = (/* @__PURE__ */ new Date()).getTime() - N.current;
797
+ g.current = g.current - $, window.clearTimeout(O.current), f == null || f();
786
798
  };
787
- return w.addEventListener(ee, _), w.addEventListener(te, S), () => {
788
- w.removeEventListener(ee, _), w.removeEventListener(te, S);
799
+ return w.addEventListener(ee, _), w.addEventListener(te, A), () => {
800
+ w.removeEventListener(ee, _), w.removeEventListener(te, A);
789
801
  };
790
802
  }
791
- }, [v.viewport, R, f, i, M]), s.useEffect(() => {
792
- a && !v.isClosePausedRef.current && M(R);
793
- }, [a, R, v.isClosePausedRef, M]), s.useEffect(() => (D(), () => L()), [D, L]);
794
- const j = s.useMemo(() => d ? We(d) : null, [d]);
803
+ }, [v.viewport, P, f, i, M]), o.useEffect(() => {
804
+ a && !v.isClosePausedRef.current && M(P);
805
+ }, [a, P, v.isClosePausedRef, M]), o.useEffect(() => (D(), () => L()), [D, L]);
806
+ const j = o.useMemo(() => d ? We(d) : null, [d]);
795
807
  return v.viewport ? /* @__PURE__ */ re(ye, { children: [
796
808
  j && /* @__PURE__ */ p(
797
- Bt,
809
+ Yt,
798
810
  {
799
811
  __scopeToast: n,
800
812
  role: "status",
@@ -802,12 +814,12 @@ var [Wt, $t] = Ne(K, {
802
814
  children: j
803
815
  }
804
816
  ),
805
- /* @__PURE__ */ p(Wt, { scope: n, onClose: W, children: we.createPortal(
817
+ /* @__PURE__ */ p(Ht, { scope: n, onClose: W, children: we.createPortal(
806
818
  /* @__PURE__ */ p(ae.ItemSlot, { scope: n, children: /* @__PURE__ */ p(
807
- Tt,
819
+ Nt,
808
820
  {
809
821
  asChild: !0,
810
- onEscapeKeyDown: N(c, () => {
822
+ onEscapeKeyDown: S(c, () => {
811
823
  v.isFocusedToastEscapeKeyDownRef.current || W(), v.isFocusedToastEscapeKeyDownRef.current = !1;
812
824
  }),
813
825
  children: /* @__PURE__ */ p(
@@ -819,29 +831,29 @@ var [Wt, $t] = Ne(K, {
819
831
  ...x,
820
832
  ref: E,
821
833
  style: { userSelect: "none", touchAction: "none", ...e.style },
822
- onKeyDown: N(e.onKeyDown, (w) => {
834
+ onKeyDown: S(e.onKeyDown, (w) => {
823
835
  w.key === "Escape" && (c == null || c(w.nativeEvent), w.nativeEvent.defaultPrevented || (v.isFocusedToastEscapeKeyDownRef.current = !0, W()));
824
836
  }),
825
- onPointerDown: N(e.onPointerDown, (w) => {
826
- w.button === 0 && (T.current = { x: w.clientX, y: w.clientY });
837
+ onPointerDown: S(e.onPointerDown, (w) => {
838
+ w.button === 0 && (h.current = { x: w.clientX, y: w.clientY });
827
839
  }),
828
- onPointerMove: N(e.onPointerMove, (w) => {
829
- if (!T.current) return;
830
- const S = w.clientX - T.current.x, _ = w.clientY - T.current.y, $ = !!b.current, U = ["left", "right"].includes(v.swipeDirection), H = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, Xe = U ? H(0, S) : 0, Ye = U ? 0 : H(0, _), Z = w.pointerType === "touch" ? 10 : 2, X = { x: Xe, y: Ye }, ue = { originalEvent: w, delta: X };
831
- $ ? (b.current = X, z(Ft, m, ue, {
840
+ onPointerMove: S(e.onPointerMove, (w) => {
841
+ if (!h.current) return;
842
+ const A = w.clientX - h.current.x, _ = w.clientY - h.current.y, $ = !!b.current, U = ["left", "right"].includes(v.swipeDirection), H = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, ze = U ? H(0, A) : 0, Xe = U ? 0 : H(0, _), G = w.pointerType === "touch" ? 10 : 2, z = { x: ze, y: Xe }, ue = { originalEvent: w, delta: z };
843
+ $ ? (b.current = z, Y(Bt, m, ue, {
832
844
  discrete: !1
833
- })) : ve(X, v.swipeDirection, Z) ? (b.current = X, z(Mt, l, ue, {
845
+ })) : ve(z, v.swipeDirection, G) ? (b.current = z, Y(Ut, l, ue, {
834
846
  discrete: !1
835
- }), w.target.setPointerCapture(w.pointerId)) : (Math.abs(S) > Z || Math.abs(_) > Z) && (T.current = null);
847
+ }), w.target.setPointerCapture(w.pointerId)) : (Math.abs(A) > G || Math.abs(_) > G) && (h.current = null);
836
848
  }),
837
- onPointerUp: N(e.onPointerUp, (w) => {
838
- const S = b.current, _ = w.target;
839
- if (_.hasPointerCapture(w.pointerId) && _.releasePointerCapture(w.pointerId), b.current = null, T.current = null, S) {
840
- const $ = w.currentTarget, U = { originalEvent: w, delta: S };
841
- ve(S, v.swipeDirection, v.swipeThreshold) ? z(Vt, g, U, {
849
+ onPointerUp: S(e.onPointerUp, (w) => {
850
+ const A = b.current, _ = w.target;
851
+ if (_.hasPointerCapture(w.pointerId) && _.releasePointerCapture(w.pointerId), b.current = null, h.current = null, A) {
852
+ const $ = w.currentTarget, U = { originalEvent: w, delta: A };
853
+ ve(A, v.swipeDirection, v.swipeThreshold) ? Y(jt, T, U, {
842
854
  discrete: !0
843
- }) : z(
844
- kt,
855
+ }) : Y(
856
+ Kt,
845
857
  y,
846
858
  U,
847
859
  {
@@ -860,31 +872,31 @@ var [Wt, $t] = Ne(K, {
860
872
  ) })
861
873
  ] }) : null;
862
874
  }
863
- ), Bt = (e) => {
864
- const { __scopeToast: t, children: n, ...r } = e, o = q(K, t), [a, u] = s.useState(!1), [c, f] = s.useState(!1);
865
- return Ht(() => u(!0)), s.useEffect(() => {
875
+ ), Yt = (e) => {
876
+ const { __scopeToast: t, children: n, ...r } = e, s = Z(K, t), [a, u] = o.useState(!1), [c, f] = o.useState(!1);
877
+ return Gt(() => u(!0)), o.useEffect(() => {
866
878
  const i = window.setTimeout(() => f(!0), 1e3);
867
879
  return () => window.clearTimeout(i);
868
- }, []), c ? null : /* @__PURE__ */ p(Pe, { asChild: !0, children: /* @__PURE__ */ p(se, { ...r, children: a && /* @__PURE__ */ re(ye, { children: [
869
- o.label,
880
+ }, []), c ? null : /* @__PURE__ */ p(Ne, { asChild: !0, children: /* @__PURE__ */ p(se, { ...r, children: a && /* @__PURE__ */ re(ye, { children: [
881
+ s.label,
870
882
  " ",
871
883
  n
872
884
  ] }) }) });
873
- }, Kt = "ToastTitle", _e = s.forwardRef(
885
+ }, qt = "ToastTitle", _e = o.forwardRef(
874
886
  (e, t) => {
875
887
  const { __scopeToast: n, ...r } = e;
876
888
  return /* @__PURE__ */ p(I.div, { ...r, ref: t });
877
889
  }
878
890
  );
879
- _e.displayName = Kt;
880
- var jt = "ToastDescription", Le = s.forwardRef(
891
+ _e.displayName = qt;
892
+ var Zt = "ToastDescription", Le = o.forwardRef(
881
893
  (e, t) => {
882
894
  const { __scopeToast: n, ...r } = e;
883
895
  return /* @__PURE__ */ p(I.div, { ...r, ref: t });
884
896
  }
885
897
  );
886
- Le.displayName = jt;
887
- var Me = "ToastAction", Fe = s.forwardRef(
898
+ Le.displayName = Zt;
899
+ var Me = "ToastAction", Fe = o.forwardRef(
888
900
  (e, t) => {
889
901
  const { altText: n, ...r } = e;
890
902
  return n.trim() ? /* @__PURE__ */ p(Ve, { altText: n, asChild: !0, children: /* @__PURE__ */ p(ce, { ...r, ref: t }) }) : (console.error(
@@ -893,29 +905,29 @@ var Me = "ToastAction", Fe = s.forwardRef(
893
905
  }
894
906
  );
895
907
  Fe.displayName = Me;
896
- var ke = "ToastClose", ce = s.forwardRef(
908
+ var ke = "ToastClose", ce = o.forwardRef(
897
909
  (e, t) => {
898
- const { __scopeToast: n, ...r } = e, o = $t(ke, n);
910
+ const { __scopeToast: n, ...r } = e, s = zt(ke, n);
899
911
  return /* @__PURE__ */ p(Ve, { asChild: !0, children: /* @__PURE__ */ p(
900
912
  I.button,
901
913
  {
902
914
  type: "button",
903
915
  ...r,
904
916
  ref: t,
905
- onClick: N(e.onClick, o.onClose)
917
+ onClick: S(e.onClick, s.onClose)
906
918
  }
907
919
  ) });
908
920
  }
909
921
  );
910
922
  ce.displayName = ke;
911
- var Ve = s.forwardRef((e, t) => {
912
- const { __scopeToast: n, altText: r, ...o } = e;
923
+ var Ve = o.forwardRef((e, t) => {
924
+ const { __scopeToast: n, altText: r, ...s } = e;
913
925
  return /* @__PURE__ */ p(
914
926
  I.div,
915
927
  {
916
928
  "data-radix-toast-announce-exclude": "",
917
929
  "data-radix-toast-announce-alt": r || void 0,
918
- ...o,
930
+ ...s,
919
931
  ref: t
920
932
  }
921
933
  );
@@ -923,9 +935,9 @@ var Ve = s.forwardRef((e, t) => {
923
935
  function We(e) {
924
936
  const t = [];
925
937
  return Array.from(e.childNodes).forEach((r) => {
926
- if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent), Xt(r)) {
927
- const o = r.ariaHidden || r.hidden || r.style.display === "none", a = r.dataset.radixToastAnnounceExclude === "";
928
- if (!o)
938
+ if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent), Jt(r)) {
939
+ const s = r.ariaHidden || r.hidden || r.style.display === "none", a = r.dataset.radixToastAnnounceExclude === "";
940
+ if (!s)
929
941
  if (a) {
930
942
  const u = r.dataset.radixToastAnnounceAlt;
931
943
  u && t.push(u);
@@ -934,15 +946,15 @@ function We(e) {
934
946
  }
935
947
  }), t;
936
948
  }
937
- function z(e, t, n, { discrete: r }) {
938
- const o = n.originalEvent.currentTarget, a = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: n });
939
- t && o.addEventListener(e, t, { once: !0 }), r ? he(o, a) : o.dispatchEvent(a);
949
+ function Y(e, t, n, { discrete: r }) {
950
+ const s = n.originalEvent.currentTarget, a = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: n });
951
+ t && s.addEventListener(e, t, { once: !0 }), r ? ge(s, a) : s.dispatchEvent(a);
940
952
  }
941
953
  var ve = (e, t, n = 0) => {
942
- const r = Math.abs(e.x), o = Math.abs(e.y), a = r > o;
943
- return t === "left" || t === "right" ? a && r > n : !a && o > n;
954
+ const r = Math.abs(e.x), s = Math.abs(e.y), a = r > s;
955
+ return t === "left" || t === "right" ? a && r > n : !a && s > n;
944
956
  };
945
- function Ht(e = () => {
957
+ function Gt(e = () => {
946
958
  }) {
947
959
  const t = V(e);
948
960
  B(() => {
@@ -952,37 +964,46 @@ function Ht(e = () => {
952
964
  };
953
965
  }, [t]);
954
966
  }
955
- function Xt(e) {
967
+ function Jt(e) {
956
968
  return e.nodeType === e.ELEMENT_NODE;
957
969
  }
958
- function Yt(e) {
970
+ function Qt(e) {
959
971
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
960
972
  acceptNode: (r) => {
961
- const o = r.tagName === "INPUT" && r.type === "hidden";
962
- return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
973
+ const s = r.tagName === "INPUT" && r.type === "hidden";
974
+ return r.disabled || r.hidden || s ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
963
975
  }
964
976
  });
965
977
  for (; n.nextNode(); ) t.push(n.currentNode);
966
978
  return t;
967
979
  }
968
- function G(e) {
980
+ function J(e) {
969
981
  const t = document.activeElement;
970
982
  return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
971
983
  }
972
- var zt = Se, $e = Oe, Ue = De, Be = _e, Ke = Le, je = Fe, He = ce;
973
- const un = zt, qt = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
984
+ var en = Se, $e = Oe, Ue = De, Be = _e, Ke = Le, je = Fe, He = ce;
985
+ /**
986
+ * @license lucide-react v1.7.0 - ISC
987
+ *
988
+ * This source code is licensed under the ISC license.
989
+ * See the LICENSE file in the root directory of this source tree.
990
+ */
991
+ const tn = [
992
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
993
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
994
+ ], nn = Ze("x", tn), yn = en, rn = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
974
995
  $e,
975
996
  {
976
997
  ref: n,
977
- className: O(
998
+ className: R(
978
999
  "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
979
1000
  e
980
1001
  ),
981
1002
  ...t
982
1003
  }
983
1004
  ));
984
- qt.displayName = $e.displayName;
985
- const Zt = oe(
1005
+ rn.displayName = $e.displayName;
1006
+ const on = oe(
986
1007
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
987
1008
  {
988
1009
  variants: {
@@ -995,70 +1016,77 @@ const Zt = oe(
995
1016
  variant: "default"
996
1017
  }
997
1018
  }
998
- ), Gt = s.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ p(
1019
+ ), sn = o.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ p(
999
1020
  Ue,
1000
1021
  {
1001
1022
  ref: r,
1002
- className: O(Zt({ variant: t }), e),
1023
+ className: R(on({ variant: t }), e),
1003
1024
  ...n
1004
1025
  }
1005
1026
  ));
1006
- Gt.displayName = Ue.displayName;
1007
- const Jt = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1027
+ sn.displayName = Ue.displayName;
1028
+ const an = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1008
1029
  je,
1009
1030
  {
1010
1031
  ref: n,
1011
- className: O(
1032
+ className: R(
1012
1033
  "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",
1013
1034
  e
1014
1035
  ),
1015
1036
  ...t
1016
1037
  }
1017
1038
  ));
1018
- Jt.displayName = je.displayName;
1019
- const Qt = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1039
+ an.displayName = je.displayName;
1040
+ const cn = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1020
1041
  He,
1021
1042
  {
1022
1043
  ref: n,
1023
- className: O(
1044
+ className: R(
1024
1045
  "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
1025
1046
  e
1026
1047
  ),
1027
1048
  "toast-close": "",
1028
1049
  ...t,
1029
- children: /* @__PURE__ */ p(Je, { className: "size-4" })
1050
+ children: /* @__PURE__ */ p(nn, { className: "size-4" })
1030
1051
  }
1031
1052
  ));
1032
- Qt.displayName = He.displayName;
1033
- const en = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1053
+ cn.displayName = He.displayName;
1054
+ const un = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1034
1055
  Be,
1035
1056
  {
1036
1057
  ref: n,
1037
- className: O("text-sm font-semibold", e),
1058
+ className: R("text-sm font-semibold", e),
1038
1059
  ...t
1039
1060
  }
1040
1061
  ));
1041
- en.displayName = Be.displayName;
1042
- const tn = s.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1062
+ un.displayName = Be.displayName;
1063
+ const ln = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
1043
1064
  Ke,
1044
1065
  {
1045
1066
  ref: n,
1046
- className: O("text-sm opacity-90", e),
1067
+ className: R("text-sm opacity-90", e),
1047
1068
  ...t
1048
1069
  }
1049
1070
  ));
1050
- tn.displayName = Ke.displayName;
1071
+ ln.displayName = Ke.displayName;
1051
1072
  export {
1052
- et as A,
1053
- cn as B,
1054
- Gt as T,
1055
- nt as a,
1056
- tt as b,
1057
- Jt as c,
1058
- Qt as d,
1059
- tn as e,
1060
- un as f,
1061
- en as g,
1062
- qt as h,
1063
- rt as i
1073
+ Je as A,
1074
+ ct as B,
1075
+ ut as C,
1076
+ sn as T,
1077
+ et as a,
1078
+ Qe as b,
1079
+ pt as c,
1080
+ ft as d,
1081
+ mt as e,
1082
+ lt as f,
1083
+ dt as g,
1084
+ an as h,
1085
+ cn as i,
1086
+ ln as j,
1087
+ yn as k,
1088
+ un as l,
1089
+ rn as m,
1090
+ at as n,
1091
+ oe as o
1064
1092
  };