@moises.ai/design-system 1.0.23 → 1.0.25
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/Readme.md +2 -0
- package/dist/colors/custom-styles.css +108 -0
- package/dist/index-BIjOAs1j.js +9205 -0
- package/dist/index.js +988 -1945
- package/dist/primitives.js +1449 -2262
- package/package.json +8 -8
- package/dist/index-CpglT-SS.js +0 -8383
package/dist/primitives.js
CHANGED
|
@@ -1,286 +1,286 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b9 as rt, l as se, s as ie, ba as ae, j as D, bb as Fr, aB as P, u as Y, bc as ot, bd as Ae, be as To, bf as yo, bg as Eo, bh as wo, bi as Ro, bj as _o, bk as Io, bl as Ao, bm as So, m as de, t as nt, bn as xo, bo as Mo, bp as Po, bq as Fo, br as No, bs as Oo, bt as Do, o as Se, bu as Lo, bv as ko, bw as Vo, bx as Nr, by as Or, b3 as Re, bz as Go, bA as $o, bB as Dr, bC as Ko, k as Bo, bD as Lr, aD as jo, aC as Ho } from "./index-BIjOAs1j.js";
|
|
2
|
+
import { bE as As, bF as Ss, bG as xs, bH as Ms, bI as Ps, bJ as Fs, bK as Ns, r as Os, bL as Ds, bM as Ls, bN as ks, bO as Vs, bP as Gs, bQ as $s, bR as Ks, bS as Bs, bT as js, bU as Hs, bV as zs, bW as Us, bX as Ws, bY as qs, bZ as Ys, b_ as Xs, b$ as Zs } from "./index-BIjOAs1j.js";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import
|
|
5
|
-
import { jsx as i, Fragment as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
if (typeof
|
|
11
|
-
return
|
|
12
|
-
const
|
|
4
|
+
import q from "react";
|
|
5
|
+
import { jsx as i, Fragment as at, jsxs as st } from "react/jsx-runtime";
|
|
6
|
+
import * as zo from "react-dom";
|
|
7
|
+
import { flushSync as ue } from "react-dom";
|
|
8
|
+
var Rr = a[" useEffectEvent ".trim().toString()], _r = a[" useInsertionEffect ".trim().toString()];
|
|
9
|
+
function kr(e) {
|
|
10
|
+
if (typeof Rr == "function")
|
|
11
|
+
return Rr(e);
|
|
12
|
+
const r = a.useRef(() => {
|
|
13
13
|
throw new Error("Cannot call an event handler while rendering.");
|
|
14
14
|
});
|
|
15
|
-
return typeof
|
|
16
|
-
|
|
17
|
-
}) :
|
|
18
|
-
|
|
19
|
-
}), a.useMemo(() => (...
|
|
20
|
-
var
|
|
21
|
-
return (
|
|
15
|
+
return typeof _r == "function" ? _r(() => {
|
|
16
|
+
r.current = e;
|
|
17
|
+
}) : rt(() => {
|
|
18
|
+
r.current = e;
|
|
19
|
+
}), a.useMemo(() => (...t) => {
|
|
20
|
+
var o;
|
|
21
|
+
return (o = r.current) == null ? void 0 : o.call(r, ...t);
|
|
22
22
|
}, []);
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
(e,
|
|
24
|
+
var xe = "Collapsible", [Uo, it] = se(xe), [Wo, ct] = Uo(xe), lt = a.forwardRef(
|
|
25
|
+
(e, r) => {
|
|
26
26
|
const {
|
|
27
|
-
__scopeCollapsible:
|
|
28
|
-
open:
|
|
27
|
+
__scopeCollapsible: t,
|
|
28
|
+
open: o,
|
|
29
29
|
defaultOpen: n,
|
|
30
30
|
disabled: s,
|
|
31
|
-
onOpenChange:
|
|
32
|
-
...
|
|
33
|
-
} = e, [
|
|
34
|
-
prop:
|
|
31
|
+
onOpenChange: u,
|
|
32
|
+
...c
|
|
33
|
+
} = e, [f, d] = ie({
|
|
34
|
+
prop: o,
|
|
35
35
|
defaultProp: n ?? !1,
|
|
36
|
-
onChange:
|
|
37
|
-
caller:
|
|
36
|
+
onChange: u,
|
|
37
|
+
caller: xe
|
|
38
38
|
});
|
|
39
39
|
return /* @__PURE__ */ i(
|
|
40
|
-
|
|
40
|
+
Wo,
|
|
41
41
|
{
|
|
42
|
-
scope:
|
|
42
|
+
scope: t,
|
|
43
43
|
disabled: s,
|
|
44
|
-
contentId:
|
|
45
|
-
open:
|
|
46
|
-
onOpenToggle: a.useCallback(() => d((
|
|
44
|
+
contentId: ae(),
|
|
45
|
+
open: f,
|
|
46
|
+
onOpenToggle: a.useCallback(() => d((b) => !b), [d]),
|
|
47
47
|
children: /* @__PURE__ */ i(
|
|
48
|
-
|
|
48
|
+
D.div,
|
|
49
49
|
{
|
|
50
|
-
"data-state":
|
|
50
|
+
"data-state": pt(f),
|
|
51
51
|
"data-disabled": s ? "" : void 0,
|
|
52
|
-
...
|
|
53
|
-
ref:
|
|
52
|
+
...c,
|
|
53
|
+
ref: r
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
(e,
|
|
63
|
-
const { __scopeCollapsible:
|
|
60
|
+
lt.displayName = xe;
|
|
61
|
+
var Vr = "CollapsibleTrigger", ut = a.forwardRef(
|
|
62
|
+
(e, r) => {
|
|
63
|
+
const { __scopeCollapsible: t, ...o } = e, n = ct(Vr, t);
|
|
64
64
|
return /* @__PURE__ */ i(
|
|
65
|
-
|
|
65
|
+
D.button,
|
|
66
66
|
{
|
|
67
67
|
type: "button",
|
|
68
68
|
"aria-controls": n.contentId,
|
|
69
69
|
"aria-expanded": n.open || !1,
|
|
70
|
-
"data-state":
|
|
70
|
+
"data-state": pt(n.open),
|
|
71
71
|
"data-disabled": n.disabled ? "" : void 0,
|
|
72
72
|
disabled: n.disabled,
|
|
73
|
-
...
|
|
74
|
-
ref:
|
|
75
|
-
onClick:
|
|
73
|
+
...o,
|
|
74
|
+
ref: r,
|
|
75
|
+
onClick: P(e.onClick, n.onOpenToggle)
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
(e,
|
|
83
|
-
const { forceMount:
|
|
84
|
-
return /* @__PURE__ */ i(
|
|
80
|
+
ut.displayName = Vr;
|
|
81
|
+
var dt = "CollapsibleContent", ft = a.forwardRef(
|
|
82
|
+
(e, r) => {
|
|
83
|
+
const { forceMount: t, ...o } = e, n = ct(dt, e.__scopeCollapsible);
|
|
84
|
+
return /* @__PURE__ */ i(Fr, { present: t || n.open, children: ({ present: s }) => /* @__PURE__ */ i(qo, { ...o, ref: r, present: s }) });
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
const { __scopeCollapsible:
|
|
87
|
+
ft.displayName = dt;
|
|
88
|
+
var qo = a.forwardRef((e, r) => {
|
|
89
|
+
const { __scopeCollapsible: t, present: o, children: n, ...s } = e, u = ct(dt, t), [c, f] = a.useState(o), d = a.useRef(null), b = Y(r, d), w = a.useRef(0), I = w.current, R = a.useRef(0), _ = R.current, m = u.open || c, p = a.useRef(m), T = a.useRef(void 0);
|
|
90
90
|
return a.useEffect(() => {
|
|
91
|
-
const
|
|
92
|
-
return () => cancelAnimationFrame(
|
|
93
|
-
}, []),
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
transitionDuration:
|
|
98
|
-
animationName:
|
|
99
|
-
},
|
|
100
|
-
const
|
|
101
|
-
|
|
91
|
+
const l = requestAnimationFrame(() => p.current = !1);
|
|
92
|
+
return () => cancelAnimationFrame(l);
|
|
93
|
+
}, []), rt(() => {
|
|
94
|
+
const l = d.current;
|
|
95
|
+
if (l) {
|
|
96
|
+
T.current = T.current || {
|
|
97
|
+
transitionDuration: l.style.transitionDuration,
|
|
98
|
+
animationName: l.style.animationName
|
|
99
|
+
}, l.style.transitionDuration = "0s", l.style.animationName = "none";
|
|
100
|
+
const h = l.getBoundingClientRect();
|
|
101
|
+
w.current = h.height, R.current = h.width, p.current || (l.style.transitionDuration = T.current.transitionDuration, l.style.animationName = T.current.animationName), f(o);
|
|
102
102
|
}
|
|
103
|
-
}, [
|
|
104
|
-
|
|
103
|
+
}, [u.open, o]), /* @__PURE__ */ i(
|
|
104
|
+
D.div,
|
|
105
105
|
{
|
|
106
|
-
"data-state":
|
|
107
|
-
"data-disabled":
|
|
108
|
-
id:
|
|
109
|
-
hidden: !
|
|
106
|
+
"data-state": pt(u.open),
|
|
107
|
+
"data-disabled": u.disabled ? "" : void 0,
|
|
108
|
+
id: u.contentId,
|
|
109
|
+
hidden: !m,
|
|
110
110
|
...s,
|
|
111
|
-
ref:
|
|
111
|
+
ref: b,
|
|
112
112
|
style: {
|
|
113
|
-
"--radix-collapsible-content-height":
|
|
114
|
-
"--radix-collapsible-content-width":
|
|
113
|
+
"--radix-collapsible-content-height": I ? `${I}px` : void 0,
|
|
114
|
+
"--radix-collapsible-content-width": _ ? `${_}px` : void 0,
|
|
115
115
|
...e.style
|
|
116
116
|
},
|
|
117
|
-
children:
|
|
117
|
+
children: m && n
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
});
|
|
121
|
-
function
|
|
121
|
+
function pt(e) {
|
|
122
122
|
return e ? "open" : "closed";
|
|
123
123
|
}
|
|
124
|
-
var
|
|
125
|
-
const
|
|
124
|
+
var Gr = lt, $r = ut, Kr = ft;
|
|
125
|
+
const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
126
126
|
__proto__: null,
|
|
127
|
-
Collapsible:
|
|
128
|
-
CollapsibleContent:
|
|
129
|
-
CollapsibleTrigger:
|
|
130
|
-
Content:
|
|
131
|
-
Root:
|
|
132
|
-
Trigger:
|
|
133
|
-
createCollapsibleScope:
|
|
127
|
+
Collapsible: lt,
|
|
128
|
+
CollapsibleContent: ft,
|
|
129
|
+
CollapsibleTrigger: ut,
|
|
130
|
+
Content: Kr,
|
|
131
|
+
Root: Gr,
|
|
132
|
+
Trigger: $r,
|
|
133
|
+
createCollapsibleScope: it
|
|
134
134
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
]),
|
|
139
|
-
(e,
|
|
140
|
-
const { type:
|
|
141
|
-
return /* @__PURE__ */ i(
|
|
135
|
+
var J = "Accordion", Yo = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [mt, Xo, Zo] = ot(J), [Me, Jo] = se(J, [
|
|
136
|
+
Zo,
|
|
137
|
+
it
|
|
138
|
+
]), vt = it(), bt = q.forwardRef(
|
|
139
|
+
(e, r) => {
|
|
140
|
+
const { type: t, ...o } = e, n = o, s = o;
|
|
141
|
+
return /* @__PURE__ */ i(mt.Provider, { scope: e.__scopeAccordion, children: t === "multiple" ? /* @__PURE__ */ i(rn, { ...s, ref: r }) : /* @__PURE__ */ i(tn, { ...n, ref: r }) });
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
|
|
145
|
-
var [
|
|
146
|
-
|
|
144
|
+
bt.displayName = J;
|
|
145
|
+
var [Br, Qo] = Me(J), [jr, en] = Me(
|
|
146
|
+
J,
|
|
147
147
|
{ collapsible: !1 }
|
|
148
|
-
),
|
|
149
|
-
(e,
|
|
148
|
+
), tn = q.forwardRef(
|
|
149
|
+
(e, r) => {
|
|
150
150
|
const {
|
|
151
|
-
value:
|
|
152
|
-
defaultValue:
|
|
151
|
+
value: t,
|
|
152
|
+
defaultValue: o,
|
|
153
153
|
onValueChange: n = () => {
|
|
154
154
|
},
|
|
155
155
|
collapsible: s = !1,
|
|
156
|
-
...
|
|
157
|
-
} = e, [
|
|
158
|
-
prop:
|
|
159
|
-
defaultProp:
|
|
156
|
+
...u
|
|
157
|
+
} = e, [c, f] = ie({
|
|
158
|
+
prop: t,
|
|
159
|
+
defaultProp: o ?? "",
|
|
160
160
|
onChange: n,
|
|
161
|
-
caller:
|
|
161
|
+
caller: J
|
|
162
162
|
});
|
|
163
163
|
return /* @__PURE__ */ i(
|
|
164
|
-
|
|
164
|
+
Br,
|
|
165
165
|
{
|
|
166
166
|
scope: e.__scopeAccordion,
|
|
167
|
-
value:
|
|
168
|
-
onItemOpen:
|
|
169
|
-
onItemClose:
|
|
170
|
-
children: /* @__PURE__ */ i(
|
|
167
|
+
value: q.useMemo(() => c ? [c] : [], [c]),
|
|
168
|
+
onItemOpen: f,
|
|
169
|
+
onItemClose: q.useCallback(() => s && f(""), [s, f]),
|
|
170
|
+
children: /* @__PURE__ */ i(jr, { scope: e.__scopeAccordion, collapsible: s, children: /* @__PURE__ */ i(Hr, { ...u, ref: r }) })
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
),
|
|
174
|
+
), rn = q.forwardRef((e, r) => {
|
|
175
175
|
const {
|
|
176
|
-
value:
|
|
177
|
-
defaultValue:
|
|
176
|
+
value: t,
|
|
177
|
+
defaultValue: o,
|
|
178
178
|
onValueChange: n = () => {
|
|
179
179
|
},
|
|
180
180
|
...s
|
|
181
|
-
} = e, [
|
|
182
|
-
prop:
|
|
183
|
-
defaultProp:
|
|
181
|
+
} = e, [u, c] = ie({
|
|
182
|
+
prop: t,
|
|
183
|
+
defaultProp: o ?? [],
|
|
184
184
|
onChange: n,
|
|
185
|
-
caller:
|
|
186
|
-
}),
|
|
187
|
-
(
|
|
188
|
-
[
|
|
189
|
-
), d =
|
|
190
|
-
(
|
|
191
|
-
[
|
|
185
|
+
caller: J
|
|
186
|
+
}), f = q.useCallback(
|
|
187
|
+
(b) => c((w = []) => [...w, b]),
|
|
188
|
+
[c]
|
|
189
|
+
), d = q.useCallback(
|
|
190
|
+
(b) => c((w = []) => w.filter((I) => I !== b)),
|
|
191
|
+
[c]
|
|
192
192
|
);
|
|
193
193
|
return /* @__PURE__ */ i(
|
|
194
|
-
|
|
194
|
+
Br,
|
|
195
195
|
{
|
|
196
196
|
scope: e.__scopeAccordion,
|
|
197
|
-
value:
|
|
198
|
-
onItemOpen:
|
|
197
|
+
value: u,
|
|
198
|
+
onItemOpen: f,
|
|
199
199
|
onItemClose: d,
|
|
200
|
-
children: /* @__PURE__ */ i(
|
|
200
|
+
children: /* @__PURE__ */ i(jr, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ i(Hr, { ...s, ref: r }) })
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
}), [
|
|
204
|
-
(e,
|
|
205
|
-
const { __scopeAccordion:
|
|
206
|
-
var
|
|
207
|
-
if (!
|
|
208
|
-
const
|
|
209
|
-
var
|
|
210
|
-
return !((
|
|
211
|
-
}),
|
|
212
|
-
if (
|
|
213
|
-
|
|
214
|
-
let
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
|
|
203
|
+
}), [on, Pe] = Me(J), Hr = q.forwardRef(
|
|
204
|
+
(e, r) => {
|
|
205
|
+
const { __scopeAccordion: t, disabled: o, dir: n, orientation: s = "vertical", ...u } = e, c = q.useRef(null), f = Y(c, r), d = Xo(t), w = Ae(n) === "ltr", I = P(e.onKeyDown, (R) => {
|
|
206
|
+
var N;
|
|
207
|
+
if (!Yo.includes(R.key)) return;
|
|
208
|
+
const _ = R.target, m = d().filter((M) => {
|
|
209
|
+
var v;
|
|
210
|
+
return !((v = M.ref.current) != null && v.disabled);
|
|
211
|
+
}), p = m.findIndex((M) => M.ref.current === _), T = m.length;
|
|
212
|
+
if (p === -1) return;
|
|
213
|
+
R.preventDefault();
|
|
214
|
+
let l = p;
|
|
215
|
+
const h = 0, S = T - 1, F = () => {
|
|
216
|
+
l = p + 1, l > S && (l = h);
|
|
217
|
+
}, x = () => {
|
|
218
|
+
l = p - 1, l < h && (l = S);
|
|
219
219
|
};
|
|
220
|
-
switch (
|
|
220
|
+
switch (R.key) {
|
|
221
221
|
case "Home":
|
|
222
|
-
|
|
222
|
+
l = h;
|
|
223
223
|
break;
|
|
224
224
|
case "End":
|
|
225
|
-
|
|
225
|
+
l = S;
|
|
226
226
|
break;
|
|
227
227
|
case "ArrowRight":
|
|
228
|
-
s === "horizontal" && (
|
|
228
|
+
s === "horizontal" && (w ? F() : x());
|
|
229
229
|
break;
|
|
230
230
|
case "ArrowDown":
|
|
231
|
-
s === "vertical" &&
|
|
231
|
+
s === "vertical" && F();
|
|
232
232
|
break;
|
|
233
233
|
case "ArrowLeft":
|
|
234
|
-
s === "horizontal" && (
|
|
234
|
+
s === "horizontal" && (w ? x() : F());
|
|
235
235
|
break;
|
|
236
236
|
case "ArrowUp":
|
|
237
|
-
s === "vertical" &&
|
|
237
|
+
s === "vertical" && x();
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
|
-
const
|
|
241
|
-
(
|
|
240
|
+
const V = l % T;
|
|
241
|
+
(N = m[V].ref.current) == null || N.focus();
|
|
242
242
|
});
|
|
243
243
|
return /* @__PURE__ */ i(
|
|
244
|
-
|
|
244
|
+
on,
|
|
245
245
|
{
|
|
246
|
-
scope:
|
|
247
|
-
disabled:
|
|
246
|
+
scope: t,
|
|
247
|
+
disabled: o,
|
|
248
248
|
direction: n,
|
|
249
249
|
orientation: s,
|
|
250
|
-
children: /* @__PURE__ */ i(
|
|
251
|
-
|
|
250
|
+
children: /* @__PURE__ */ i(mt.Slot, { scope: t, children: /* @__PURE__ */ i(
|
|
251
|
+
D.div,
|
|
252
252
|
{
|
|
253
|
-
...
|
|
253
|
+
...u,
|
|
254
254
|
"data-orientation": s,
|
|
255
|
-
ref:
|
|
256
|
-
onKeyDown:
|
|
255
|
+
ref: f,
|
|
256
|
+
onKeyDown: o ? void 0 : I
|
|
257
257
|
}
|
|
258
258
|
) })
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
|
-
),
|
|
263
|
-
(e,
|
|
264
|
-
const { __scopeAccordion:
|
|
262
|
+
), _e = "AccordionItem", [nn, gt] = Me(_e), ht = q.forwardRef(
|
|
263
|
+
(e, r) => {
|
|
264
|
+
const { __scopeAccordion: t, value: o, ...n } = e, s = Pe(_e, t), u = Qo(_e, t), c = vt(t), f = ae(), d = o && u.value.includes(o) || !1, b = s.disabled || e.disabled;
|
|
265
265
|
return /* @__PURE__ */ i(
|
|
266
|
-
|
|
266
|
+
nn,
|
|
267
267
|
{
|
|
268
|
-
scope:
|
|
268
|
+
scope: t,
|
|
269
269
|
open: d,
|
|
270
|
-
disabled:
|
|
271
|
-
triggerId:
|
|
270
|
+
disabled: b,
|
|
271
|
+
triggerId: f,
|
|
272
272
|
children: /* @__PURE__ */ i(
|
|
273
|
-
|
|
273
|
+
Gr,
|
|
274
274
|
{
|
|
275
275
|
"data-orientation": s.orientation,
|
|
276
|
-
"data-state":
|
|
277
|
-
...
|
|
276
|
+
"data-state": Wr(d),
|
|
277
|
+
...c,
|
|
278
278
|
...n,
|
|
279
|
-
ref:
|
|
280
|
-
disabled:
|
|
279
|
+
ref: r,
|
|
280
|
+
disabled: b,
|
|
281
281
|
open: d,
|
|
282
|
-
onOpenChange: (
|
|
283
|
-
|
|
282
|
+
onOpenChange: (w) => {
|
|
283
|
+
w ? u.onItemOpen(o) : u.onItemClose(o);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
)
|
|
@@ -288,52 +288,52 @@ var [Pr, ia] = je(re), [xr, ca] = je(
|
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
|
-
|
|
292
|
-
var
|
|
293
|
-
(e,
|
|
294
|
-
const { __scopeAccordion:
|
|
291
|
+
ht.displayName = _e;
|
|
292
|
+
var zr = "AccordionHeader", Ct = q.forwardRef(
|
|
293
|
+
(e, r) => {
|
|
294
|
+
const { __scopeAccordion: t, ...o } = e, n = Pe(J, t), s = gt(zr, t);
|
|
295
295
|
return /* @__PURE__ */ i(
|
|
296
|
-
|
|
296
|
+
D.h3,
|
|
297
297
|
{
|
|
298
298
|
"data-orientation": n.orientation,
|
|
299
|
-
"data-state":
|
|
299
|
+
"data-state": Wr(s.open),
|
|
300
300
|
"data-disabled": s.disabled ? "" : void 0,
|
|
301
|
-
...
|
|
302
|
-
ref:
|
|
301
|
+
...o,
|
|
302
|
+
ref: r
|
|
303
303
|
}
|
|
304
304
|
);
|
|
305
305
|
}
|
|
306
306
|
);
|
|
307
|
-
|
|
308
|
-
var
|
|
309
|
-
(e,
|
|
310
|
-
const { __scopeAccordion:
|
|
311
|
-
return /* @__PURE__ */ i(
|
|
312
|
-
|
|
307
|
+
Ct.displayName = zr;
|
|
308
|
+
var Ke = "AccordionTrigger", Tt = q.forwardRef(
|
|
309
|
+
(e, r) => {
|
|
310
|
+
const { __scopeAccordion: t, ...o } = e, n = Pe(J, t), s = gt(Ke, t), u = en(Ke, t), c = vt(t);
|
|
311
|
+
return /* @__PURE__ */ i(mt.ItemSlot, { scope: t, children: /* @__PURE__ */ i(
|
|
312
|
+
$r,
|
|
313
313
|
{
|
|
314
|
-
"aria-disabled": s.open && !
|
|
314
|
+
"aria-disabled": s.open && !u.collapsible || void 0,
|
|
315
315
|
"data-orientation": n.orientation,
|
|
316
316
|
id: s.triggerId,
|
|
317
|
-
...
|
|
318
|
-
...
|
|
319
|
-
ref:
|
|
317
|
+
...c,
|
|
318
|
+
...o,
|
|
319
|
+
ref: r
|
|
320
320
|
}
|
|
321
321
|
) });
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
|
-
|
|
325
|
-
var
|
|
326
|
-
(e,
|
|
327
|
-
const { __scopeAccordion:
|
|
324
|
+
Tt.displayName = Ke;
|
|
325
|
+
var Ur = "AccordionContent", yt = q.forwardRef(
|
|
326
|
+
(e, r) => {
|
|
327
|
+
const { __scopeAccordion: t, ...o } = e, n = Pe(J, t), s = gt(Ur, t), u = vt(t);
|
|
328
328
|
return /* @__PURE__ */ i(
|
|
329
|
-
|
|
329
|
+
Kr,
|
|
330
330
|
{
|
|
331
331
|
role: "region",
|
|
332
332
|
"aria-labelledby": s.triggerId,
|
|
333
333
|
"data-orientation": n.orientation,
|
|
334
|
-
...
|
|
335
|
-
...
|
|
336
|
-
ref:
|
|
334
|
+
...u,
|
|
335
|
+
...o,
|
|
336
|
+
ref: r,
|
|
337
337
|
style: {
|
|
338
338
|
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
339
339
|
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
@@ -343,126 +343,126 @@ var Nr = "AccordionContent", Vt = V.forwardRef(
|
|
|
343
343
|
);
|
|
344
344
|
}
|
|
345
345
|
);
|
|
346
|
-
|
|
347
|
-
function
|
|
346
|
+
yt.displayName = Ur;
|
|
347
|
+
function Wr(e) {
|
|
348
348
|
return e ? "open" : "closed";
|
|
349
349
|
}
|
|
350
|
-
var
|
|
351
|
-
const
|
|
350
|
+
var an = bt, sn = ht, cn = Ct, ln = Tt, un = yt;
|
|
351
|
+
const bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
352
352
|
__proto__: null,
|
|
353
|
-
Accordion:
|
|
354
|
-
AccordionContent:
|
|
355
|
-
AccordionHeader:
|
|
356
|
-
AccordionItem:
|
|
357
|
-
AccordionTrigger:
|
|
358
|
-
Content:
|
|
359
|
-
Header:
|
|
360
|
-
Item:
|
|
361
|
-
Root:
|
|
362
|
-
Trigger:
|
|
363
|
-
createAccordionScope:
|
|
353
|
+
Accordion: bt,
|
|
354
|
+
AccordionContent: yt,
|
|
355
|
+
AccordionHeader: Ct,
|
|
356
|
+
AccordionItem: ht,
|
|
357
|
+
AccordionTrigger: Tt,
|
|
358
|
+
Content: un,
|
|
359
|
+
Header: cn,
|
|
360
|
+
Item: sn,
|
|
361
|
+
Root: an,
|
|
362
|
+
Trigger: ln,
|
|
363
|
+
createAccordionScope: Jo
|
|
364
364
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
365
|
-
var
|
|
366
|
-
|
|
365
|
+
var dn = "Label", Fe = a.forwardRef((e, r) => /* @__PURE__ */ i(
|
|
366
|
+
D.label,
|
|
367
367
|
{
|
|
368
368
|
...e,
|
|
369
|
-
ref:
|
|
370
|
-
onMouseDown: (
|
|
369
|
+
ref: r,
|
|
370
|
+
onMouseDown: (t) => {
|
|
371
371
|
var n;
|
|
372
|
-
|
|
372
|
+
t.target.closest("button, input, select, textarea") || ((n = e.onMouseDown) == null || n.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
));
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
const
|
|
376
|
+
Fe.displayName = dn;
|
|
377
|
+
var fn = Fe;
|
|
378
|
+
const gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
379
379
|
__proto__: null,
|
|
380
|
-
Label:
|
|
381
|
-
Root:
|
|
380
|
+
Label: Fe,
|
|
381
|
+
Root: fn
|
|
382
382
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
383
|
-
var [
|
|
384
|
-
(e,
|
|
385
|
-
const { __scopeForm:
|
|
386
|
-
}, ...n } = e, s = a.useRef(null),
|
|
387
|
-
(
|
|
388
|
-
[
|
|
389
|
-
),
|
|
390
|
-
(
|
|
391
|
-
...
|
|
392
|
-
[
|
|
383
|
+
var [Et, pn] = se("Form"), wt = "Form", [mn, fe] = Et(wt), [vn, qr] = Et(wt), Rt = a.forwardRef(
|
|
384
|
+
(e, r) => {
|
|
385
|
+
const { __scopeForm: t, onClearServerErrors: o = () => {
|
|
386
|
+
}, ...n } = e, s = a.useRef(null), u = Y(r, s), [c, f] = a.useState({}), d = a.useCallback(
|
|
387
|
+
(v) => c[v],
|
|
388
|
+
[c]
|
|
389
|
+
), b = a.useCallback(
|
|
390
|
+
(v, g) => f((y) => ({
|
|
391
|
+
...y,
|
|
392
|
+
[v]: { ...y[v] ?? {}, ...g }
|
|
393
393
|
})),
|
|
394
394
|
[]
|
|
395
|
-
),
|
|
396
|
-
|
|
397
|
-
}, []), [
|
|
398
|
-
(
|
|
399
|
-
[
|
|
400
|
-
),
|
|
401
|
-
|
|
402
|
-
...
|
|
403
|
-
[
|
|
395
|
+
), w = a.useCallback((v) => {
|
|
396
|
+
f((g) => ({ ...g, [v]: void 0 })), l((g) => ({ ...g, [v]: {} }));
|
|
397
|
+
}, []), [I, R] = a.useState({}), _ = a.useCallback(
|
|
398
|
+
(v) => I[v] ?? [],
|
|
399
|
+
[I]
|
|
400
|
+
), m = a.useCallback((v, g) => {
|
|
401
|
+
R((y) => ({
|
|
402
|
+
...y,
|
|
403
|
+
[v]: [...y[v] ?? [], g]
|
|
404
404
|
}));
|
|
405
|
-
}, []),
|
|
406
|
-
|
|
407
|
-
...
|
|
408
|
-
[
|
|
409
|
-
(
|
|
405
|
+
}, []), p = a.useCallback((v, g) => {
|
|
406
|
+
R((y) => ({
|
|
407
|
+
...y,
|
|
408
|
+
[v]: (y[v] ?? []).filter(
|
|
409
|
+
(O) => O.id !== g
|
|
410
410
|
)
|
|
411
411
|
}));
|
|
412
|
-
}, []), [
|
|
413
|
-
(
|
|
414
|
-
[
|
|
415
|
-
),
|
|
416
|
-
|
|
417
|
-
...
|
|
418
|
-
[
|
|
412
|
+
}, []), [T, l] = a.useState({}), h = a.useCallback(
|
|
413
|
+
(v) => T[v] ?? {},
|
|
414
|
+
[T]
|
|
415
|
+
), S = a.useCallback((v, g) => {
|
|
416
|
+
l((y) => ({
|
|
417
|
+
...y,
|
|
418
|
+
[v]: { ...y[v] ?? {}, ...g }
|
|
419
419
|
}));
|
|
420
|
-
}, []), [
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
return { ...
|
|
420
|
+
}, []), [F, x] = a.useState({}), V = a.useCallback((v, g) => {
|
|
421
|
+
x((y) => {
|
|
422
|
+
const O = new Set(y[v]).add(g);
|
|
423
|
+
return { ...y, [v]: O };
|
|
424
424
|
});
|
|
425
|
-
}, []),
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
return
|
|
425
|
+
}, []), N = a.useCallback((v, g) => {
|
|
426
|
+
x((y) => {
|
|
427
|
+
const O = new Set(y[v]);
|
|
428
|
+
return O.delete(g), { ...y, [v]: O };
|
|
429
429
|
});
|
|
430
|
-
}, []),
|
|
431
|
-
(
|
|
432
|
-
[
|
|
430
|
+
}, []), M = a.useCallback(
|
|
431
|
+
(v) => Array.from(F[v] ?? []).join(" ") || void 0,
|
|
432
|
+
[F]
|
|
433
433
|
);
|
|
434
434
|
return /* @__PURE__ */ i(
|
|
435
|
-
|
|
435
|
+
mn,
|
|
436
436
|
{
|
|
437
|
-
scope:
|
|
437
|
+
scope: t,
|
|
438
438
|
getFieldValidity: d,
|
|
439
|
-
onFieldValidityChange:
|
|
440
|
-
getFieldCustomMatcherEntries:
|
|
441
|
-
onFieldCustomMatcherEntryAdd:
|
|
442
|
-
onFieldCustomMatcherEntryRemove:
|
|
443
|
-
getFieldCustomErrors:
|
|
444
|
-
onFieldCustomErrorsChange:
|
|
445
|
-
onFieldValiditionClear:
|
|
439
|
+
onFieldValidityChange: b,
|
|
440
|
+
getFieldCustomMatcherEntries: _,
|
|
441
|
+
onFieldCustomMatcherEntryAdd: m,
|
|
442
|
+
onFieldCustomMatcherEntryRemove: p,
|
|
443
|
+
getFieldCustomErrors: h,
|
|
444
|
+
onFieldCustomErrorsChange: S,
|
|
445
|
+
onFieldValiditionClear: w,
|
|
446
446
|
children: /* @__PURE__ */ i(
|
|
447
|
-
|
|
447
|
+
vn,
|
|
448
448
|
{
|
|
449
|
-
scope:
|
|
450
|
-
onFieldMessageIdAdd:
|
|
451
|
-
onFieldMessageIdRemove:
|
|
452
|
-
getFieldDescription:
|
|
449
|
+
scope: t,
|
|
450
|
+
onFieldMessageIdAdd: V,
|
|
451
|
+
onFieldMessageIdRemove: N,
|
|
452
|
+
getFieldDescription: M,
|
|
453
453
|
children: /* @__PURE__ */ i(
|
|
454
|
-
|
|
454
|
+
D.form,
|
|
455
455
|
{
|
|
456
456
|
...n,
|
|
457
|
-
ref:
|
|
458
|
-
onInvalid:
|
|
459
|
-
const
|
|
460
|
-
|
|
457
|
+
ref: u,
|
|
458
|
+
onInvalid: P(e.onInvalid, (v) => {
|
|
459
|
+
const g = Yr(v.currentTarget);
|
|
460
|
+
g === v.target && g.focus(), v.preventDefault();
|
|
461
461
|
}),
|
|
462
|
-
onSubmit:
|
|
462
|
+
onSubmit: P(e.onSubmit, o, {
|
|
463
463
|
checkForDefaultPrevented: !1
|
|
464
464
|
}),
|
|
465
|
-
onReset:
|
|
465
|
+
onReset: P(e.onReset, o)
|
|
466
466
|
}
|
|
467
467
|
)
|
|
468
468
|
}
|
|
@@ -471,115 +471,115 @@ var [Gt, Ta] = oe("Form"), $t = "Form", [wa, Te] = Gt($t), [ya, Or] = Gt($t), Kt
|
|
|
471
471
|
);
|
|
472
472
|
}
|
|
473
473
|
);
|
|
474
|
-
|
|
475
|
-
var
|
|
476
|
-
(e,
|
|
477
|
-
const { __scopeForm:
|
|
478
|
-
return /* @__PURE__ */ i(
|
|
479
|
-
|
|
474
|
+
Rt.displayName = wt;
|
|
475
|
+
var _t = "FormField", [bn, Ne] = Et(_t), It = a.forwardRef(
|
|
476
|
+
(e, r) => {
|
|
477
|
+
const { __scopeForm: t, name: o, serverInvalid: n = !1, ...s } = e, c = fe(_t, t).getFieldValidity(o), f = ae();
|
|
478
|
+
return /* @__PURE__ */ i(bn, { scope: t, id: f, name: o, serverInvalid: n, children: /* @__PURE__ */ i(
|
|
479
|
+
D.div,
|
|
480
480
|
{
|
|
481
|
-
"data-valid":
|
|
482
|
-
"data-invalid":
|
|
481
|
+
"data-valid": Nt(c, n),
|
|
482
|
+
"data-invalid": Ot(c, n),
|
|
483
483
|
...s,
|
|
484
|
-
ref:
|
|
484
|
+
ref: r
|
|
485
485
|
}
|
|
486
486
|
) });
|
|
487
487
|
}
|
|
488
488
|
);
|
|
489
|
-
|
|
490
|
-
var
|
|
491
|
-
(e,
|
|
492
|
-
const { __scopeForm:
|
|
489
|
+
It.displayName = _t;
|
|
490
|
+
var Be = "FormLabel", At = a.forwardRef(
|
|
491
|
+
(e, r) => {
|
|
492
|
+
const { __scopeForm: t, ...o } = e, n = fe(Be, t), s = Ne(Be, t), u = o.htmlFor || s.id, c = n.getFieldValidity(s.name);
|
|
493
493
|
return /* @__PURE__ */ i(
|
|
494
|
-
|
|
494
|
+
Fe,
|
|
495
495
|
{
|
|
496
|
-
"data-valid":
|
|
497
|
-
"data-invalid":
|
|
498
|
-
...
|
|
499
|
-
ref:
|
|
500
|
-
htmlFor:
|
|
496
|
+
"data-valid": Nt(c, s.serverInvalid),
|
|
497
|
+
"data-invalid": Ot(c, s.serverInvalid),
|
|
498
|
+
...o,
|
|
499
|
+
ref: r,
|
|
500
|
+
htmlFor: u
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
504
|
);
|
|
505
|
-
|
|
506
|
-
var
|
|
507
|
-
(e,
|
|
508
|
-
const { __scopeForm:
|
|
509
|
-
async (
|
|
510
|
-
if (
|
|
511
|
-
const
|
|
512
|
-
|
|
505
|
+
At.displayName = Be;
|
|
506
|
+
var we = "FormControl", St = a.forwardRef(
|
|
507
|
+
(e, r) => {
|
|
508
|
+
const { __scopeForm: t, ...o } = e, n = fe(we, t), s = Ne(we, t), u = qr(we, t), c = a.useRef(null), f = Y(r, c), d = o.name || s.name, b = o.id || s.id, w = n.getFieldCustomMatcherEntries(d), { onFieldValidityChange: I, onFieldCustomErrorsChange: R, onFieldValiditionClear: _ } = n, m = a.useCallback(
|
|
509
|
+
async (l) => {
|
|
510
|
+
if (Xr(l.validity)) {
|
|
511
|
+
const y = Ge(l.validity);
|
|
512
|
+
I(d, y);
|
|
513
513
|
return;
|
|
514
514
|
}
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
const h = l.form ? new FormData(l.form) : new FormData(), S = [l.value, h], F = [], x = [];
|
|
516
|
+
w.forEach((y) => {
|
|
517
|
+
Rn(y, S) ? x.push(y) : _n(y) && F.push(y);
|
|
518
518
|
});
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
523
|
-
const
|
|
524
|
-
({ id:
|
|
525
|
-
),
|
|
526
|
-
|
|
527
|
-
const
|
|
528
|
-
|
|
519
|
+
const V = F.map(({ id: y, match: O }) => [y, O(...S)]), N = Object.fromEntries(V), M = Object.values(N).some(Boolean), v = M;
|
|
520
|
+
l.setCustomValidity(v ? ge : "");
|
|
521
|
+
const g = Ge(l.validity);
|
|
522
|
+
if (I(d, g), R(d, N), !M && x.length > 0) {
|
|
523
|
+
const y = x.map(
|
|
524
|
+
({ id: H, match: Q }) => Q(...S).then((W) => [H, W])
|
|
525
|
+
), O = await Promise.all(y), C = Object.fromEntries(O), k = Object.values(C).some(Boolean);
|
|
526
|
+
l.setCustomValidity(k ? ge : "");
|
|
527
|
+
const X = Ge(l.validity);
|
|
528
|
+
I(d, X), R(d, C);
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
|
-
[
|
|
531
|
+
[w, d, R, I]
|
|
532
532
|
);
|
|
533
533
|
a.useEffect(() => {
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return
|
|
534
|
+
const l = c.current;
|
|
535
|
+
if (l) {
|
|
536
|
+
const h = () => m(l);
|
|
537
|
+
return l.addEventListener("change", h), () => l.removeEventListener("change", h);
|
|
538
538
|
}
|
|
539
|
-
}, [
|
|
540
|
-
const
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
}, [d,
|
|
539
|
+
}, [m]);
|
|
540
|
+
const p = a.useCallback(() => {
|
|
541
|
+
const l = c.current;
|
|
542
|
+
l && (l.setCustomValidity(""), _(d));
|
|
543
|
+
}, [d, _]);
|
|
544
544
|
a.useEffect(() => {
|
|
545
|
-
var
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
548
|
-
return
|
|
549
|
-
}, [
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
|
|
545
|
+
var h;
|
|
546
|
+
const l = (h = c.current) == null ? void 0 : h.form;
|
|
547
|
+
if (l)
|
|
548
|
+
return l.addEventListener("reset", p), () => l.removeEventListener("reset", p);
|
|
549
|
+
}, [p]), a.useEffect(() => {
|
|
550
|
+
const l = c.current, h = l == null ? void 0 : l.closest("form");
|
|
551
|
+
if (h && s.serverInvalid) {
|
|
552
|
+
const S = Yr(h);
|
|
553
|
+
S === l && S.focus();
|
|
554
554
|
}
|
|
555
555
|
}, [s.serverInvalid]);
|
|
556
|
-
const
|
|
556
|
+
const T = n.getFieldValidity(d);
|
|
557
557
|
return /* @__PURE__ */ i(
|
|
558
|
-
|
|
558
|
+
D.input,
|
|
559
559
|
{
|
|
560
|
-
"data-valid":
|
|
561
|
-
"data-invalid":
|
|
560
|
+
"data-valid": Nt(T, s.serverInvalid),
|
|
561
|
+
"data-invalid": Ot(T, s.serverInvalid),
|
|
562
562
|
"aria-invalid": s.serverInvalid ? !0 : void 0,
|
|
563
|
-
"aria-describedby":
|
|
563
|
+
"aria-describedby": u.getFieldDescription(d),
|
|
564
564
|
title: "",
|
|
565
|
-
...
|
|
566
|
-
ref:
|
|
567
|
-
id:
|
|
565
|
+
...o,
|
|
566
|
+
ref: f,
|
|
567
|
+
id: b,
|
|
568
568
|
name: d,
|
|
569
|
-
onInvalid:
|
|
570
|
-
const
|
|
571
|
-
|
|
569
|
+
onInvalid: P(e.onInvalid, (l) => {
|
|
570
|
+
const h = l.currentTarget;
|
|
571
|
+
m(h);
|
|
572
572
|
}),
|
|
573
|
-
onChange:
|
|
574
|
-
|
|
573
|
+
onChange: P(e.onChange, (l) => {
|
|
574
|
+
p();
|
|
575
575
|
})
|
|
576
576
|
}
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
579
|
);
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
badInput:
|
|
580
|
+
St.displayName = we;
|
|
581
|
+
var ge = "This value is not valid", gn = {
|
|
582
|
+
badInput: ge,
|
|
583
583
|
patternMismatch: "This value does not match the required pattern",
|
|
584
584
|
rangeOverflow: "This value is too large",
|
|
585
585
|
rangeUnderflow: "This value is too small",
|
|
@@ -589,284 +589,284 @@ var Me = "This value is not valid", Ra = {
|
|
|
589
589
|
typeMismatch: "This value does not match the required type",
|
|
590
590
|
valid: void 0,
|
|
591
591
|
valueMissing: "This value is missing"
|
|
592
|
-
},
|
|
593
|
-
(e,
|
|
594
|
-
const { match:
|
|
595
|
-
return
|
|
592
|
+
}, he = "FormMessage", xt = a.forwardRef(
|
|
593
|
+
(e, r) => {
|
|
594
|
+
const { match: t, name: o, ...n } = e, s = Ne(he, e.__scopeForm), u = o ?? s.name;
|
|
595
|
+
return t === void 0 ? /* @__PURE__ */ i(Mt, { ...n, ref: r, name: u, children: e.children || ge }) : typeof t == "function" ? /* @__PURE__ */ i(Cn, { match: t, ...n, ref: r, name: u }) : /* @__PURE__ */ i(hn, { match: t, ...n, ref: r, name: u });
|
|
596
596
|
}
|
|
597
597
|
);
|
|
598
|
-
|
|
599
|
-
var
|
|
600
|
-
(e,
|
|
601
|
-
const { match:
|
|
602
|
-
return
|
|
603
|
-
}
|
|
604
|
-
),
|
|
605
|
-
(e,
|
|
606
|
-
const { match:
|
|
607
|
-
a.useEffect(() => (
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
}
|
|
611
|
-
),
|
|
612
|
-
(e,
|
|
613
|
-
const { __scopeForm:
|
|
614
|
-
return a.useEffect(() => (d(n,
|
|
615
|
-
}
|
|
616
|
-
),
|
|
617
|
-
const { __scopeForm:
|
|
618
|
-
return /* @__PURE__ */ i(
|
|
598
|
+
xt.displayName = he;
|
|
599
|
+
var hn = a.forwardRef(
|
|
600
|
+
(e, r) => {
|
|
601
|
+
const { match: t, forceMatch: o = !1, name: n, children: s, ...u } = e, f = fe(he, u.__scopeForm).getFieldValidity(n);
|
|
602
|
+
return o || (f == null ? void 0 : f[t]) ? /* @__PURE__ */ i(Mt, { ref: r, ...u, name: n, children: s ?? gn[t] }) : null;
|
|
603
|
+
}
|
|
604
|
+
), Cn = a.forwardRef(
|
|
605
|
+
(e, r) => {
|
|
606
|
+
const { match: t, forceMatch: o = !1, name: n, id: s, children: u, ...c } = e, f = fe(he, c.__scopeForm), d = a.useRef(null), b = Y(r, d), w = ae(), I = s ?? w, R = a.useMemo(() => ({ id: I, match: t }), [I, t]), { onFieldCustomMatcherEntryAdd: _, onFieldCustomMatcherEntryRemove: m } = f;
|
|
607
|
+
a.useEffect(() => (_(n, R), () => m(n, R.id)), [R, n, _, m]);
|
|
608
|
+
const p = f.getFieldValidity(n), l = f.getFieldCustomErrors(n)[I];
|
|
609
|
+
return o || p && !Xr(p) && l ? /* @__PURE__ */ i(Mt, { id: I, ref: b, ...c, name: n, children: u ?? ge }) : null;
|
|
610
|
+
}
|
|
611
|
+
), Mt = a.forwardRef(
|
|
612
|
+
(e, r) => {
|
|
613
|
+
const { __scopeForm: t, id: o, name: n, ...s } = e, u = qr(he, t), c = ae(), f = o ?? c, { onFieldMessageIdAdd: d, onFieldMessageIdRemove: b } = u;
|
|
614
|
+
return a.useEffect(() => (d(n, f), () => b(n, f)), [n, f, d, b]), /* @__PURE__ */ i(D.span, { id: f, ...s, ref: r });
|
|
615
|
+
}
|
|
616
|
+
), je = "FormValidityState", Pt = (e) => {
|
|
617
|
+
const { __scopeForm: r, name: t, children: o } = e, n = fe(je, r), s = Ne(je, r), u = t ?? s.name, c = n.getFieldValidity(u);
|
|
618
|
+
return /* @__PURE__ */ i(at, { children: o(c) });
|
|
619
619
|
};
|
|
620
|
-
|
|
621
|
-
var
|
|
622
|
-
(e,
|
|
623
|
-
const { __scopeForm:
|
|
624
|
-
return /* @__PURE__ */ i(
|
|
620
|
+
Pt.displayName = je;
|
|
621
|
+
var Tn = "FormSubmit", Ft = a.forwardRef(
|
|
622
|
+
(e, r) => {
|
|
623
|
+
const { __scopeForm: t, ...o } = e;
|
|
624
|
+
return /* @__PURE__ */ i(D.button, { type: "submit", ...o, ref: r });
|
|
625
625
|
}
|
|
626
626
|
);
|
|
627
|
-
|
|
628
|
-
function
|
|
629
|
-
const
|
|
630
|
-
for (const
|
|
631
|
-
t
|
|
632
|
-
return
|
|
627
|
+
Ft.displayName = Tn;
|
|
628
|
+
function Ge(e) {
|
|
629
|
+
const r = {};
|
|
630
|
+
for (const t in e)
|
|
631
|
+
r[t] = e[t];
|
|
632
|
+
return r;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function yn(e) {
|
|
635
635
|
return e instanceof HTMLElement;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function En(e) {
|
|
638
638
|
return "validity" in e;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
640
|
+
function wn(e) {
|
|
641
|
+
return En(e) && (e.validity.valid === !1 || e.getAttribute("aria-invalid") === "true");
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
return
|
|
643
|
+
function Yr(e) {
|
|
644
|
+
const r = e.elements, [t] = Array.from(r).filter(yn).filter(wn);
|
|
645
|
+
return t;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
return e.match.constructor.name === "AsyncFunction" ||
|
|
647
|
+
function Rn(e, r) {
|
|
648
|
+
return e.match.constructor.name === "AsyncFunction" || In(e.match, r);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function _n(e) {
|
|
651
651
|
return e.match.constructor.name === "Function";
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return e(...
|
|
653
|
+
function In(e, r) {
|
|
654
|
+
return e(...r) instanceof Promise;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
let
|
|
658
|
-
for (const
|
|
659
|
-
const
|
|
660
|
-
if (
|
|
661
|
-
|
|
656
|
+
function Xr(e) {
|
|
657
|
+
let r = !1;
|
|
658
|
+
for (const t in e) {
|
|
659
|
+
const o = t;
|
|
660
|
+
if (o !== "valid" && o !== "customError" && e[o]) {
|
|
661
|
+
r = !0;
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
return
|
|
665
|
+
return r;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
if ((e == null ? void 0 : e.valid) === !0 && !
|
|
667
|
+
function Nt(e, r) {
|
|
668
|
+
if ((e == null ? void 0 : e.valid) === !0 && !r) return !0;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
if ((e == null ? void 0 : e.valid) === !1 ||
|
|
670
|
+
function Ot(e, r) {
|
|
671
|
+
if ((e == null ? void 0 : e.valid) === !1 || r) return !0;
|
|
672
672
|
}
|
|
673
|
-
var
|
|
674
|
-
const
|
|
673
|
+
var An = Rt, Sn = It, xn = At, Mn = St, Pn = xt, Fn = Pt, Nn = Ft;
|
|
674
|
+
const hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
675
675
|
__proto__: null,
|
|
676
|
-
Control:
|
|
677
|
-
Field:
|
|
678
|
-
Form:
|
|
679
|
-
FormControl:
|
|
680
|
-
FormField:
|
|
681
|
-
FormLabel:
|
|
682
|
-
FormMessage:
|
|
683
|
-
FormSubmit:
|
|
684
|
-
FormValidityState:
|
|
685
|
-
Label:
|
|
686
|
-
Message:
|
|
687
|
-
Root:
|
|
688
|
-
Submit:
|
|
689
|
-
ValidityState:
|
|
690
|
-
createFormScope:
|
|
676
|
+
Control: Mn,
|
|
677
|
+
Field: Sn,
|
|
678
|
+
Form: Rt,
|
|
679
|
+
FormControl: St,
|
|
680
|
+
FormField: It,
|
|
681
|
+
FormLabel: At,
|
|
682
|
+
FormMessage: xt,
|
|
683
|
+
FormSubmit: Ft,
|
|
684
|
+
FormValidityState: Pt,
|
|
685
|
+
Label: xn,
|
|
686
|
+
Message: Pn,
|
|
687
|
+
Root: An,
|
|
688
|
+
Submit: Nn,
|
|
689
|
+
ValidityState: Fn,
|
|
690
|
+
createFormScope: pn
|
|
691
691
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
692
|
-
var
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
]),
|
|
696
|
-
(e,
|
|
692
|
+
var Ce = "Menubar", [He, On, Dn] = ot(Ce), [Zr, Ln] = se(Ce, [
|
|
693
|
+
Dn,
|
|
694
|
+
de
|
|
695
|
+
]), j = To(), Jr = de(), [kn, Dt] = Zr(Ce), Lt = a.forwardRef(
|
|
696
|
+
(e, r) => {
|
|
697
697
|
const {
|
|
698
|
-
__scopeMenubar:
|
|
699
|
-
value:
|
|
698
|
+
__scopeMenubar: t,
|
|
699
|
+
value: o,
|
|
700
700
|
onValueChange: n,
|
|
701
701
|
defaultValue: s,
|
|
702
|
-
loop:
|
|
703
|
-
dir:
|
|
704
|
-
...
|
|
705
|
-
} = e, d =
|
|
706
|
-
prop:
|
|
702
|
+
loop: u = !0,
|
|
703
|
+
dir: c,
|
|
704
|
+
...f
|
|
705
|
+
} = e, d = Ae(c), b = Jr(t), [w, I] = ie({
|
|
706
|
+
prop: o,
|
|
707
707
|
onChange: n,
|
|
708
708
|
defaultProp: s ?? "",
|
|
709
|
-
caller:
|
|
710
|
-
}), [
|
|
709
|
+
caller: Ce
|
|
710
|
+
}), [R, _] = a.useState(null);
|
|
711
711
|
return /* @__PURE__ */ i(
|
|
712
|
-
|
|
712
|
+
kn,
|
|
713
713
|
{
|
|
714
|
-
scope:
|
|
715
|
-
value:
|
|
714
|
+
scope: t,
|
|
715
|
+
value: w,
|
|
716
716
|
onMenuOpen: a.useCallback(
|
|
717
|
-
(
|
|
718
|
-
|
|
717
|
+
(m) => {
|
|
718
|
+
I(m), _(m);
|
|
719
719
|
},
|
|
720
|
-
[
|
|
720
|
+
[I]
|
|
721
721
|
),
|
|
722
|
-
onMenuClose: a.useCallback(() =>
|
|
722
|
+
onMenuClose: a.useCallback(() => I(""), [I]),
|
|
723
723
|
onMenuToggle: a.useCallback(
|
|
724
|
-
(
|
|
725
|
-
|
|
724
|
+
(m) => {
|
|
725
|
+
I((p) => p ? "" : m), _(m);
|
|
726
726
|
},
|
|
727
|
-
[
|
|
727
|
+
[I]
|
|
728
728
|
),
|
|
729
729
|
dir: d,
|
|
730
|
-
loop:
|
|
731
|
-
children: /* @__PURE__ */ i(
|
|
732
|
-
|
|
730
|
+
loop: u,
|
|
731
|
+
children: /* @__PURE__ */ i(He.Provider, { scope: t, children: /* @__PURE__ */ i(He.Slot, { scope: t, children: /* @__PURE__ */ i(
|
|
732
|
+
nt,
|
|
733
733
|
{
|
|
734
734
|
asChild: !0,
|
|
735
|
-
...
|
|
735
|
+
...b,
|
|
736
736
|
orientation: "horizontal",
|
|
737
|
-
loop:
|
|
737
|
+
loop: u,
|
|
738
738
|
dir: d,
|
|
739
|
-
currentTabStopId:
|
|
740
|
-
onCurrentTabStopIdChange:
|
|
741
|
-
children: /* @__PURE__ */ i(
|
|
739
|
+
currentTabStopId: R,
|
|
740
|
+
onCurrentTabStopIdChange: _,
|
|
741
|
+
children: /* @__PURE__ */ i(D.div, { role: "menubar", ...f, ref: r })
|
|
742
742
|
}
|
|
743
743
|
) }) })
|
|
744
744
|
}
|
|
745
745
|
);
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
|
-
|
|
749
|
-
var
|
|
750
|
-
const { __scopeMenubar:
|
|
748
|
+
Lt.displayName = Ce;
|
|
749
|
+
var kt = "MenubarMenu", [Vn, Qr] = Zr(kt), Vt = (e) => {
|
|
750
|
+
const { __scopeMenubar: r, value: t, ...o } = e, n = ae(), s = t || n || "LEGACY_REACT_AUTO_VALUE", u = Dt(kt, r), c = j(r), f = a.useRef(null), d = a.useRef(!1), b = u.value === s;
|
|
751
751
|
return a.useEffect(() => {
|
|
752
|
-
|
|
753
|
-
}, [
|
|
754
|
-
|
|
752
|
+
b || (d.current = !1);
|
|
753
|
+
}, [b]), /* @__PURE__ */ i(
|
|
754
|
+
Vn,
|
|
755
755
|
{
|
|
756
|
-
scope:
|
|
756
|
+
scope: r,
|
|
757
757
|
value: s,
|
|
758
|
-
triggerId:
|
|
759
|
-
triggerRef:
|
|
760
|
-
contentId:
|
|
758
|
+
triggerId: ae(),
|
|
759
|
+
triggerRef: f,
|
|
760
|
+
contentId: ae(),
|
|
761
761
|
wasKeyboardTriggerOpenRef: d,
|
|
762
762
|
children: /* @__PURE__ */ i(
|
|
763
|
-
|
|
763
|
+
So,
|
|
764
764
|
{
|
|
765
|
-
...
|
|
766
|
-
open:
|
|
767
|
-
onOpenChange: (
|
|
768
|
-
|
|
765
|
+
...c,
|
|
766
|
+
open: b,
|
|
767
|
+
onOpenChange: (w) => {
|
|
768
|
+
w || u.onMenuClose();
|
|
769
769
|
},
|
|
770
770
|
modal: !1,
|
|
771
|
-
dir:
|
|
772
|
-
...
|
|
771
|
+
dir: u.dir,
|
|
772
|
+
...o
|
|
773
773
|
}
|
|
774
774
|
)
|
|
775
775
|
}
|
|
776
776
|
);
|
|
777
777
|
};
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
(e,
|
|
781
|
-
const { __scopeMenubar:
|
|
782
|
-
return /* @__PURE__ */ i(
|
|
783
|
-
|
|
778
|
+
Vt.displayName = kt;
|
|
779
|
+
var ze = "MenubarTrigger", Gt = a.forwardRef(
|
|
780
|
+
(e, r) => {
|
|
781
|
+
const { __scopeMenubar: t, disabled: o = !1, ...n } = e, s = Jr(t), u = j(t), c = Dt(ze, t), f = Qr(ze, t), d = a.useRef(null), b = Y(r, d, f.triggerRef), [w, I] = a.useState(!1), R = c.value === f.value;
|
|
782
|
+
return /* @__PURE__ */ i(He.ItemSlot, { scope: t, value: f.value, disabled: o, children: /* @__PURE__ */ i(
|
|
783
|
+
Se,
|
|
784
784
|
{
|
|
785
785
|
asChild: !0,
|
|
786
786
|
...s,
|
|
787
|
-
focusable: !
|
|
788
|
-
tabStopId:
|
|
789
|
-
children: /* @__PURE__ */ i(
|
|
790
|
-
|
|
787
|
+
focusable: !o,
|
|
788
|
+
tabStopId: f.value,
|
|
789
|
+
children: /* @__PURE__ */ i(Lo, { asChild: !0, ...u, children: /* @__PURE__ */ i(
|
|
790
|
+
D.button,
|
|
791
791
|
{
|
|
792
792
|
type: "button",
|
|
793
793
|
role: "menuitem",
|
|
794
|
-
id:
|
|
794
|
+
id: f.triggerId,
|
|
795
795
|
"aria-haspopup": "menu",
|
|
796
|
-
"aria-expanded":
|
|
797
|
-
"aria-controls":
|
|
798
|
-
"data-highlighted":
|
|
799
|
-
"data-state":
|
|
800
|
-
"data-disabled":
|
|
801
|
-
disabled:
|
|
796
|
+
"aria-expanded": R,
|
|
797
|
+
"aria-controls": R ? f.contentId : void 0,
|
|
798
|
+
"data-highlighted": w ? "" : void 0,
|
|
799
|
+
"data-state": R ? "open" : "closed",
|
|
800
|
+
"data-disabled": o ? "" : void 0,
|
|
801
|
+
disabled: o,
|
|
802
802
|
...n,
|
|
803
|
-
ref:
|
|
804
|
-
onPointerDown:
|
|
805
|
-
!
|
|
803
|
+
ref: b,
|
|
804
|
+
onPointerDown: P(e.onPointerDown, (_) => {
|
|
805
|
+
!o && _.button === 0 && _.ctrlKey === !1 && (c.onMenuOpen(f.value), R || _.preventDefault());
|
|
806
806
|
}),
|
|
807
|
-
onPointerEnter:
|
|
808
|
-
var
|
|
809
|
-
!!
|
|
807
|
+
onPointerEnter: P(e.onPointerEnter, () => {
|
|
808
|
+
var m;
|
|
809
|
+
!!c.value && !R && (c.onMenuOpen(f.value), (m = d.current) == null || m.focus());
|
|
810
810
|
}),
|
|
811
|
-
onKeyDown:
|
|
812
|
-
|
|
811
|
+
onKeyDown: P(e.onKeyDown, (_) => {
|
|
812
|
+
o || (["Enter", " "].includes(_.key) && c.onMenuToggle(f.value), _.key === "ArrowDown" && c.onMenuOpen(f.value), ["Enter", " ", "ArrowDown"].includes(_.key) && (f.wasKeyboardTriggerOpenRef.current = !0, _.preventDefault()));
|
|
813
813
|
}),
|
|
814
|
-
onFocus:
|
|
815
|
-
onBlur:
|
|
814
|
+
onFocus: P(e.onFocus, () => I(!0)),
|
|
815
|
+
onBlur: P(e.onBlur, () => I(!1))
|
|
816
816
|
}
|
|
817
817
|
) })
|
|
818
818
|
}
|
|
819
819
|
) });
|
|
820
820
|
}
|
|
821
821
|
);
|
|
822
|
-
|
|
823
|
-
var
|
|
824
|
-
const { __scopeMenubar:
|
|
825
|
-
return /* @__PURE__ */ i(
|
|
822
|
+
Gt.displayName = ze;
|
|
823
|
+
var Gn = "MenubarPortal", $t = (e) => {
|
|
824
|
+
const { __scopeMenubar: r, ...t } = e, o = j(r);
|
|
825
|
+
return /* @__PURE__ */ i(xo, { ...o, ...t });
|
|
826
826
|
};
|
|
827
|
-
|
|
828
|
-
var
|
|
829
|
-
(e,
|
|
830
|
-
const { __scopeMenubar:
|
|
827
|
+
$t.displayName = Gn;
|
|
828
|
+
var Ue = "MenubarContent", Kt = a.forwardRef(
|
|
829
|
+
(e, r) => {
|
|
830
|
+
const { __scopeMenubar: t, align: o = "start", ...n } = e, s = j(t), u = Dt(Ue, t), c = Qr(Ue, t), f = On(t), d = a.useRef(!1);
|
|
831
831
|
return /* @__PURE__ */ i(
|
|
832
|
-
|
|
832
|
+
wo,
|
|
833
833
|
{
|
|
834
|
-
id:
|
|
835
|
-
"aria-labelledby":
|
|
834
|
+
id: c.contentId,
|
|
835
|
+
"aria-labelledby": c.triggerId,
|
|
836
836
|
"data-radix-menubar-content": "",
|
|
837
837
|
...s,
|
|
838
838
|
...n,
|
|
839
|
-
ref:
|
|
840
|
-
align:
|
|
841
|
-
onCloseAutoFocus:
|
|
842
|
-
var
|
|
843
|
-
!!!
|
|
839
|
+
ref: r,
|
|
840
|
+
align: o,
|
|
841
|
+
onCloseAutoFocus: P(e.onCloseAutoFocus, (b) => {
|
|
842
|
+
var I;
|
|
843
|
+
!!!u.value && !d.current && ((I = c.triggerRef.current) == null || I.focus()), d.current = !1, b.preventDefault();
|
|
844
844
|
}),
|
|
845
|
-
onFocusOutside:
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
var
|
|
849
|
-
return (
|
|
850
|
-
}) &&
|
|
845
|
+
onFocusOutside: P(e.onFocusOutside, (b) => {
|
|
846
|
+
const w = b.target;
|
|
847
|
+
f().some((R) => {
|
|
848
|
+
var _;
|
|
849
|
+
return (_ = R.ref.current) == null ? void 0 : _.contains(w);
|
|
850
|
+
}) && b.preventDefault();
|
|
851
851
|
}),
|
|
852
|
-
onInteractOutside:
|
|
852
|
+
onInteractOutside: P(e.onInteractOutside, () => {
|
|
853
853
|
d.current = !0;
|
|
854
854
|
}),
|
|
855
|
-
onEntryFocus: (
|
|
856
|
-
|
|
855
|
+
onEntryFocus: (b) => {
|
|
856
|
+
c.wasKeyboardTriggerOpenRef.current || b.preventDefault();
|
|
857
857
|
},
|
|
858
|
-
onKeyDown:
|
|
858
|
+
onKeyDown: P(
|
|
859
859
|
e.onKeyDown,
|
|
860
|
-
(
|
|
861
|
-
if (["ArrowRight", "ArrowLeft"].includes(
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
864
|
-
let
|
|
865
|
-
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
const [
|
|
869
|
-
|
|
860
|
+
(b) => {
|
|
861
|
+
if (["ArrowRight", "ArrowLeft"].includes(b.key)) {
|
|
862
|
+
const w = b.target, I = w.hasAttribute("data-radix-menubar-subtrigger"), R = w.closest("[data-radix-menubar-content]") !== b.currentTarget, m = (u.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === b.key;
|
|
863
|
+
if (!m && I || R && m) return;
|
|
864
|
+
let l = f().filter((F) => !F.disabled).map((F) => F.value);
|
|
865
|
+
m && l.reverse();
|
|
866
|
+
const h = l.indexOf(c.value);
|
|
867
|
+
l = u.loop ? Zn(l, h + 1) : l.slice(h + 1);
|
|
868
|
+
const [S] = l;
|
|
869
|
+
S && u.onMenuOpen(S);
|
|
870
870
|
}
|
|
871
871
|
},
|
|
872
872
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -883,103 +883,103 @@ var lt = "MenubarContent", no = a.forwardRef(
|
|
|
883
883
|
);
|
|
884
884
|
}
|
|
885
885
|
);
|
|
886
|
-
|
|
887
|
-
var
|
|
888
|
-
(e,
|
|
889
|
-
const { __scopeMenubar:
|
|
890
|
-
return /* @__PURE__ */ i(
|
|
886
|
+
Kt.displayName = Ue;
|
|
887
|
+
var $n = "MenubarGroup", Bt = a.forwardRef(
|
|
888
|
+
(e, r) => {
|
|
889
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
890
|
+
return /* @__PURE__ */ i(Ro, { ...n, ...o, ref: r });
|
|
891
891
|
}
|
|
892
892
|
);
|
|
893
|
-
|
|
894
|
-
var
|
|
895
|
-
(e,
|
|
896
|
-
const { __scopeMenubar:
|
|
897
|
-
return /* @__PURE__ */ i(
|
|
893
|
+
Bt.displayName = $n;
|
|
894
|
+
var Kn = "MenubarLabel", jt = a.forwardRef(
|
|
895
|
+
(e, r) => {
|
|
896
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
897
|
+
return /* @__PURE__ */ i(Ao, { ...n, ...o, ref: r });
|
|
898
898
|
}
|
|
899
899
|
);
|
|
900
|
-
|
|
901
|
-
var
|
|
902
|
-
(e,
|
|
903
|
-
const { __scopeMenubar:
|
|
904
|
-
return /* @__PURE__ */ i(
|
|
900
|
+
jt.displayName = Kn;
|
|
901
|
+
var Bn = "MenubarItem", Ht = a.forwardRef(
|
|
902
|
+
(e, r) => {
|
|
903
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
904
|
+
return /* @__PURE__ */ i(_o, { ...n, ...o, ref: r });
|
|
905
905
|
}
|
|
906
906
|
);
|
|
907
|
-
|
|
908
|
-
var
|
|
909
|
-
(e,
|
|
910
|
-
const { __scopeMenubar:
|
|
911
|
-
return /* @__PURE__ */ i(
|
|
907
|
+
Ht.displayName = Bn;
|
|
908
|
+
var jn = "MenubarCheckboxItem", zt = a.forwardRef(
|
|
909
|
+
(e, r) => {
|
|
910
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
911
|
+
return /* @__PURE__ */ i(Eo, { ...n, ...o, ref: r });
|
|
912
912
|
}
|
|
913
913
|
);
|
|
914
|
-
|
|
915
|
-
var
|
|
916
|
-
(e,
|
|
917
|
-
const { __scopeMenubar:
|
|
918
|
-
return /* @__PURE__ */ i(
|
|
914
|
+
zt.displayName = jn;
|
|
915
|
+
var Hn = "MenubarRadioGroup", Ut = a.forwardRef(
|
|
916
|
+
(e, r) => {
|
|
917
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
918
|
+
return /* @__PURE__ */ i(Mo, { ...n, ...o, ref: r });
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
|
-
|
|
922
|
-
var
|
|
923
|
-
(e,
|
|
924
|
-
const { __scopeMenubar:
|
|
925
|
-
return /* @__PURE__ */ i(
|
|
921
|
+
Ut.displayName = Hn;
|
|
922
|
+
var zn = "MenubarRadioItem", Wt = a.forwardRef(
|
|
923
|
+
(e, r) => {
|
|
924
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
925
|
+
return /* @__PURE__ */ i(Po, { ...n, ...o, ref: r });
|
|
926
926
|
}
|
|
927
927
|
);
|
|
928
|
-
|
|
929
|
-
var
|
|
930
|
-
const { __scopeMenubar:
|
|
931
|
-
return /* @__PURE__ */ i(
|
|
928
|
+
Wt.displayName = zn;
|
|
929
|
+
var Un = "MenubarItemIndicator", qt = a.forwardRef((e, r) => {
|
|
930
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
931
|
+
return /* @__PURE__ */ i(Io, { ...n, ...o, ref: r });
|
|
932
932
|
});
|
|
933
|
-
|
|
934
|
-
var
|
|
935
|
-
(e,
|
|
936
|
-
const { __scopeMenubar:
|
|
937
|
-
return /* @__PURE__ */ i(
|
|
933
|
+
qt.displayName = Un;
|
|
934
|
+
var Wn = "MenubarSeparator", Yt = a.forwardRef(
|
|
935
|
+
(e, r) => {
|
|
936
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
937
|
+
return /* @__PURE__ */ i(Fo, { ...n, ...o, ref: r });
|
|
938
938
|
}
|
|
939
939
|
);
|
|
940
|
-
|
|
941
|
-
var
|
|
942
|
-
(e,
|
|
943
|
-
const { __scopeMenubar:
|
|
944
|
-
return /* @__PURE__ */ i(
|
|
940
|
+
Yt.displayName = Wn;
|
|
941
|
+
var qn = "MenubarArrow", Xt = a.forwardRef(
|
|
942
|
+
(e, r) => {
|
|
943
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
944
|
+
return /* @__PURE__ */ i(yo, { ...n, ...o, ref: r });
|
|
945
945
|
}
|
|
946
946
|
);
|
|
947
|
-
|
|
948
|
-
var
|
|
949
|
-
const { __scopeMenubar:
|
|
950
|
-
prop:
|
|
947
|
+
Xt.displayName = qn;
|
|
948
|
+
var eo = "MenubarSub", Zt = (e) => {
|
|
949
|
+
const { __scopeMenubar: r, children: t, open: o, onOpenChange: n, defaultOpen: s } = e, u = j(r), [c, f] = ie({
|
|
950
|
+
prop: o,
|
|
951
951
|
defaultProp: s ?? !1,
|
|
952
952
|
onChange: n,
|
|
953
|
-
caller:
|
|
953
|
+
caller: eo
|
|
954
954
|
});
|
|
955
|
-
return /* @__PURE__ */ i(
|
|
955
|
+
return /* @__PURE__ */ i(No, { ...u, open: c, onOpenChange: f, children: t });
|
|
956
956
|
};
|
|
957
|
-
|
|
958
|
-
var
|
|
959
|
-
(e,
|
|
960
|
-
const { __scopeMenubar:
|
|
957
|
+
Zt.displayName = eo;
|
|
958
|
+
var Yn = "MenubarSubTrigger", Jt = a.forwardRef(
|
|
959
|
+
(e, r) => {
|
|
960
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
961
961
|
return /* @__PURE__ */ i(
|
|
962
|
-
|
|
962
|
+
Do,
|
|
963
963
|
{
|
|
964
964
|
"data-radix-menubar-subtrigger": "",
|
|
965
965
|
...n,
|
|
966
|
-
...
|
|
967
|
-
ref:
|
|
966
|
+
...o,
|
|
967
|
+
ref: r
|
|
968
968
|
}
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
|
-
|
|
973
|
-
var
|
|
974
|
-
(e,
|
|
975
|
-
const { __scopeMenubar:
|
|
972
|
+
Jt.displayName = Yn;
|
|
973
|
+
var Xn = "MenubarSubContent", Qt = a.forwardRef(
|
|
974
|
+
(e, r) => {
|
|
975
|
+
const { __scopeMenubar: t, ...o } = e, n = j(t);
|
|
976
976
|
return /* @__PURE__ */ i(
|
|
977
|
-
|
|
977
|
+
Oo,
|
|
978
978
|
{
|
|
979
979
|
...n,
|
|
980
980
|
"data-radix-menubar-content": "",
|
|
981
|
-
...
|
|
982
|
-
ref:
|
|
981
|
+
...o,
|
|
982
|
+
ref: r,
|
|
983
983
|
style: {
|
|
984
984
|
...e.style,
|
|
985
985
|
"--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
@@ -992,643 +992,50 @@ var rs = "MenubarSubContent", bo = a.forwardRef(
|
|
|
992
992
|
);
|
|
993
993
|
}
|
|
994
994
|
);
|
|
995
|
-
|
|
996
|
-
function
|
|
997
|
-
return e.map((
|
|
995
|
+
Qt.displayName = Xn;
|
|
996
|
+
function Zn(e, r) {
|
|
997
|
+
return e.map((t, o) => e[(r + o) % e.length]);
|
|
998
998
|
}
|
|
999
|
-
var
|
|
1000
|
-
const
|
|
999
|
+
var Jn = Lt, Qn = Vt, ea = Gt, ta = $t, ra = Kt, oa = Bt, na = jt, aa = Ht, sa = zt, ia = Ut, ca = Wt, la = qt, ua = Yt, da = Xt, fa = Zt, pa = Jt, ma = Qt;
|
|
1000
|
+
const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1001
1001
|
__proto__: null,
|
|
1002
|
-
Arrow:
|
|
1003
|
-
CheckboxItem:
|
|
1004
|
-
Content:
|
|
1005
|
-
Group:
|
|
1006
|
-
Item:
|
|
1007
|
-
ItemIndicator:
|
|
1008
|
-
Label:
|
|
1009
|
-
Menu:
|
|
1010
|
-
Menubar:
|
|
1011
|
-
MenubarArrow:
|
|
1012
|
-
MenubarCheckboxItem:
|
|
1013
|
-
MenubarContent:
|
|
1014
|
-
MenubarGroup:
|
|
1015
|
-
MenubarItem:
|
|
1016
|
-
MenubarItemIndicator:
|
|
1017
|
-
MenubarLabel:
|
|
1018
|
-
MenubarMenu:
|
|
1019
|
-
MenubarPortal:
|
|
1020
|
-
MenubarRadioGroup:
|
|
1021
|
-
MenubarRadioItem:
|
|
1022
|
-
MenubarSeparator:
|
|
1023
|
-
MenubarSub:
|
|
1024
|
-
MenubarSubContent:
|
|
1025
|
-
MenubarSubTrigger:
|
|
1026
|
-
MenubarTrigger:
|
|
1027
|
-
Portal:
|
|
1028
|
-
RadioGroup:
|
|
1029
|
-
RadioItem:
|
|
1030
|
-
Root:
|
|
1031
|
-
Separator:
|
|
1032
|
-
Sub:
|
|
1033
|
-
SubContent:
|
|
1034
|
-
SubTrigger:
|
|
1035
|
-
Trigger:
|
|
1036
|
-
createMenubarScope:
|
|
1002
|
+
Arrow: da,
|
|
1003
|
+
CheckboxItem: sa,
|
|
1004
|
+
Content: ra,
|
|
1005
|
+
Group: oa,
|
|
1006
|
+
Item: aa,
|
|
1007
|
+
ItemIndicator: la,
|
|
1008
|
+
Label: na,
|
|
1009
|
+
Menu: Qn,
|
|
1010
|
+
Menubar: Lt,
|
|
1011
|
+
MenubarArrow: Xt,
|
|
1012
|
+
MenubarCheckboxItem: zt,
|
|
1013
|
+
MenubarContent: Kt,
|
|
1014
|
+
MenubarGroup: Bt,
|
|
1015
|
+
MenubarItem: Ht,
|
|
1016
|
+
MenubarItemIndicator: qt,
|
|
1017
|
+
MenubarLabel: jt,
|
|
1018
|
+
MenubarMenu: Vt,
|
|
1019
|
+
MenubarPortal: $t,
|
|
1020
|
+
MenubarRadioGroup: Ut,
|
|
1021
|
+
MenubarRadioItem: Wt,
|
|
1022
|
+
MenubarSeparator: Yt,
|
|
1023
|
+
MenubarSub: Zt,
|
|
1024
|
+
MenubarSubContent: Qt,
|
|
1025
|
+
MenubarSubTrigger: Jt,
|
|
1026
|
+
MenubarTrigger: Gt,
|
|
1027
|
+
Portal: ta,
|
|
1028
|
+
RadioGroup: ia,
|
|
1029
|
+
RadioItem: ca,
|
|
1030
|
+
Root: Jn,
|
|
1031
|
+
Separator: ua,
|
|
1032
|
+
Sub: fa,
|
|
1033
|
+
SubContent: ma,
|
|
1034
|
+
SubTrigger: pa,
|
|
1035
|
+
Trigger: ea,
|
|
1036
|
+
createMenubarScope: Ln
|
|
1037
1037
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1038
|
-
var
|
|
1039
|
-
pe,
|
|
1040
|
-
[ys, Rs]
|
|
1041
|
-
), [Is, Q] = ho(pe), [Ms, Ps] = ho(pe), To = a.forwardRef(
|
|
1042
|
-
(e, t) => {
|
|
1043
|
-
const {
|
|
1044
|
-
__scopeNavigationMenu: o,
|
|
1045
|
-
value: r,
|
|
1046
|
-
onValueChange: n,
|
|
1047
|
-
defaultValue: s,
|
|
1048
|
-
delayDuration: c = 200,
|
|
1049
|
-
skipDelayDuration: l = 300,
|
|
1050
|
-
orientation: u = "horizontal",
|
|
1051
|
-
dir: d,
|
|
1052
|
-
...f
|
|
1053
|
-
} = e, [b, w] = a.useState(null), E = K(t, (I) => w(I)), C = he(d), v = a.useRef(0), m = a.useRef(0), h = a.useRef(0), [p, g] = a.useState(!0), [y, R] = X({
|
|
1054
|
-
prop: r,
|
|
1055
|
-
onChange: (I) => {
|
|
1056
|
-
const T = I !== "", _ = l > 0;
|
|
1057
|
-
T ? (window.clearTimeout(h.current), _ && g(!1)) : (window.clearTimeout(h.current), h.current = window.setTimeout(
|
|
1058
|
-
() => g(!0),
|
|
1059
|
-
l
|
|
1060
|
-
)), n == null || n(I);
|
|
1061
|
-
},
|
|
1062
|
-
defaultProp: s ?? "",
|
|
1063
|
-
caller: pe
|
|
1064
|
-
}), P = a.useCallback(() => {
|
|
1065
|
-
window.clearTimeout(m.current), m.current = window.setTimeout(() => R(""), 150);
|
|
1066
|
-
}, [R]), D = a.useCallback(
|
|
1067
|
-
(I) => {
|
|
1068
|
-
window.clearTimeout(m.current), R(I);
|
|
1069
|
-
},
|
|
1070
|
-
[R]
|
|
1071
|
-
), F = a.useCallback(
|
|
1072
|
-
(I) => {
|
|
1073
|
-
y === I ? window.clearTimeout(m.current) : v.current = window.setTimeout(() => {
|
|
1074
|
-
window.clearTimeout(m.current), R(I);
|
|
1075
|
-
}, c);
|
|
1076
|
-
},
|
|
1077
|
-
[y, R, c]
|
|
1078
|
-
);
|
|
1079
|
-
return a.useEffect(() => () => {
|
|
1080
|
-
window.clearTimeout(v.current), window.clearTimeout(m.current), window.clearTimeout(h.current);
|
|
1081
|
-
}, []), /* @__PURE__ */ i(
|
|
1082
|
-
Br,
|
|
1083
|
-
{
|
|
1084
|
-
scope: o,
|
|
1085
|
-
isRootMenu: !0,
|
|
1086
|
-
value: y,
|
|
1087
|
-
dir: C,
|
|
1088
|
-
orientation: u,
|
|
1089
|
-
rootNavigationMenu: b,
|
|
1090
|
-
onTriggerEnter: (I) => {
|
|
1091
|
-
window.clearTimeout(v.current), p ? F(I) : D(I);
|
|
1092
|
-
},
|
|
1093
|
-
onTriggerLeave: () => {
|
|
1094
|
-
window.clearTimeout(v.current), P();
|
|
1095
|
-
},
|
|
1096
|
-
onContentEnter: () => window.clearTimeout(m.current),
|
|
1097
|
-
onContentLeave: P,
|
|
1098
|
-
onItemSelect: (I) => {
|
|
1099
|
-
R((T) => T === I ? "" : I);
|
|
1100
|
-
},
|
|
1101
|
-
onItemDismiss: () => R(""),
|
|
1102
|
-
children: /* @__PURE__ */ i(
|
|
1103
|
-
O.nav,
|
|
1104
|
-
{
|
|
1105
|
-
"aria-label": "Main",
|
|
1106
|
-
"data-orientation": u,
|
|
1107
|
-
dir: C,
|
|
1108
|
-
...f,
|
|
1109
|
-
ref: E
|
|
1110
|
-
}
|
|
1111
|
-
)
|
|
1112
|
-
}
|
|
1113
|
-
);
|
|
1114
|
-
}
|
|
1115
|
-
);
|
|
1116
|
-
To.displayName = pe;
|
|
1117
|
-
var dt = "NavigationMenuSub", wo = a.forwardRef(
|
|
1118
|
-
(e, t) => {
|
|
1119
|
-
const {
|
|
1120
|
-
__scopeNavigationMenu: o,
|
|
1121
|
-
value: r,
|
|
1122
|
-
onValueChange: n,
|
|
1123
|
-
defaultValue: s,
|
|
1124
|
-
orientation: c = "horizontal",
|
|
1125
|
-
...l
|
|
1126
|
-
} = e, u = Q(dt, o), [d, f] = X({
|
|
1127
|
-
prop: r,
|
|
1128
|
-
onChange: n,
|
|
1129
|
-
defaultProp: s ?? "",
|
|
1130
|
-
caller: dt
|
|
1131
|
-
});
|
|
1132
|
-
return /* @__PURE__ */ i(
|
|
1133
|
-
Br,
|
|
1134
|
-
{
|
|
1135
|
-
scope: o,
|
|
1136
|
-
isRootMenu: !1,
|
|
1137
|
-
value: d,
|
|
1138
|
-
dir: u.dir,
|
|
1139
|
-
orientation: c,
|
|
1140
|
-
rootNavigationMenu: u.rootNavigationMenu,
|
|
1141
|
-
onTriggerEnter: (b) => f(b),
|
|
1142
|
-
onItemSelect: (b) => f(b),
|
|
1143
|
-
onItemDismiss: () => f(""),
|
|
1144
|
-
children: /* @__PURE__ */ i(O.div, { "data-orientation": c, ...l, ref: t })
|
|
1145
|
-
}
|
|
1146
|
-
);
|
|
1147
|
-
}
|
|
1148
|
-
);
|
|
1149
|
-
wo.displayName = dt;
|
|
1150
|
-
var Br = (e) => {
|
|
1151
|
-
const {
|
|
1152
|
-
scope: t,
|
|
1153
|
-
isRootMenu: o,
|
|
1154
|
-
rootNavigationMenu: r,
|
|
1155
|
-
dir: n,
|
|
1156
|
-
orientation: s,
|
|
1157
|
-
children: c,
|
|
1158
|
-
value: l,
|
|
1159
|
-
onItemSelect: u,
|
|
1160
|
-
onItemDismiss: d,
|
|
1161
|
-
onTriggerEnter: f,
|
|
1162
|
-
onTriggerLeave: b,
|
|
1163
|
-
onContentEnter: w,
|
|
1164
|
-
onContentLeave: E
|
|
1165
|
-
} = e, [C, v] = a.useState(null), [m, h] = a.useState(/* @__PURE__ */ new Map()), [p, g] = a.useState(null);
|
|
1166
|
-
return /* @__PURE__ */ i(
|
|
1167
|
-
Is,
|
|
1168
|
-
{
|
|
1169
|
-
scope: t,
|
|
1170
|
-
isRootMenu: o,
|
|
1171
|
-
rootNavigationMenu: r,
|
|
1172
|
-
value: l,
|
|
1173
|
-
previousValue: jn(l),
|
|
1174
|
-
baseId: te(),
|
|
1175
|
-
dir: n,
|
|
1176
|
-
orientation: s,
|
|
1177
|
-
viewport: C,
|
|
1178
|
-
onViewportChange: v,
|
|
1179
|
-
indicatorTrack: p,
|
|
1180
|
-
onIndicatorTrackChange: g,
|
|
1181
|
-
onTriggerEnter: ee(f),
|
|
1182
|
-
onTriggerLeave: ee(b),
|
|
1183
|
-
onContentEnter: ee(w),
|
|
1184
|
-
onContentLeave: ee(E),
|
|
1185
|
-
onItemSelect: ee(u),
|
|
1186
|
-
onItemDismiss: ee(d),
|
|
1187
|
-
onViewportContentChange: a.useCallback((y, R) => {
|
|
1188
|
-
h((P) => (P.set(y, R), new Map(P)));
|
|
1189
|
-
}, []),
|
|
1190
|
-
onViewportContentRemove: a.useCallback((y) => {
|
|
1191
|
-
h((R) => R.has(y) ? (R.delete(y), new Map(R)) : R);
|
|
1192
|
-
}, []),
|
|
1193
|
-
children: /* @__PURE__ */ i(Co.Provider, { scope: t, children: /* @__PURE__ */ i(Ms, { scope: t, items: m, children: c }) })
|
|
1194
|
-
}
|
|
1195
|
-
);
|
|
1196
|
-
}, Hr = "NavigationMenuList", yo = a.forwardRef(
|
|
1197
|
-
(e, t) => {
|
|
1198
|
-
const { __scopeNavigationMenu: o, ...r } = e, n = Q(Hr, o), s = /* @__PURE__ */ i(O.ul, { "data-orientation": n.orientation, ...r, ref: t });
|
|
1199
|
-
return /* @__PURE__ */ i(O.div, { style: { position: "relative" }, ref: n.onIndicatorTrackChange, children: /* @__PURE__ */ i(Co.Slot, { scope: o, children: n.isRootMenu ? /* @__PURE__ */ i(Wr, { asChild: !0, children: s }) : s }) });
|
|
1200
|
-
}
|
|
1201
|
-
);
|
|
1202
|
-
yo.displayName = Hr;
|
|
1203
|
-
var jr = "NavigationMenuItem", [xs, zr] = ho(jr), Eo = a.forwardRef(
|
|
1204
|
-
(e, t) => {
|
|
1205
|
-
const { __scopeNavigationMenu: o, value: r, ...n } = e, s = te(), c = r || s || "LEGACY_REACT_AUTO_VALUE", l = a.useRef(null), u = a.useRef(null), d = a.useRef(null), f = a.useRef(() => {
|
|
1206
|
-
}), b = a.useRef(!1), w = a.useCallback((C = "start") => {
|
|
1207
|
-
if (l.current) {
|
|
1208
|
-
f.current();
|
|
1209
|
-
const v = pt(l.current);
|
|
1210
|
-
v.length && Ao(C === "start" ? v : v.reverse());
|
|
1211
|
-
}
|
|
1212
|
-
}, []), E = a.useCallback(() => {
|
|
1213
|
-
if (l.current) {
|
|
1214
|
-
const C = pt(l.current);
|
|
1215
|
-
C.length && (f.current = Ls(C));
|
|
1216
|
-
}
|
|
1217
|
-
}, []);
|
|
1218
|
-
return /* @__PURE__ */ i(
|
|
1219
|
-
xs,
|
|
1220
|
-
{
|
|
1221
|
-
scope: o,
|
|
1222
|
-
value: c,
|
|
1223
|
-
triggerRef: u,
|
|
1224
|
-
contentRef: l,
|
|
1225
|
-
focusProxyRef: d,
|
|
1226
|
-
wasEscapeCloseRef: b,
|
|
1227
|
-
onEntryKeyDown: w,
|
|
1228
|
-
onFocusProxyEnter: w,
|
|
1229
|
-
onRootContentClose: E,
|
|
1230
|
-
onContentFocusOutside: E,
|
|
1231
|
-
children: /* @__PURE__ */ i(O.li, { ...n, ref: t })
|
|
1232
|
-
}
|
|
1233
|
-
);
|
|
1234
|
-
}
|
|
1235
|
-
);
|
|
1236
|
-
Eo.displayName = jr;
|
|
1237
|
-
var ft = "NavigationMenuTrigger", Ro = a.forwardRef((e, t) => {
|
|
1238
|
-
const { __scopeNavigationMenu: o, disabled: r, ...n } = e, s = Q(ft, e.__scopeNavigationMenu), c = zr(ft, e.__scopeNavigationMenu), l = a.useRef(null), u = K(l, c.triggerRef, t), d = Yr(s.baseId, c.value), f = Xr(s.baseId, c.value), b = a.useRef(!1), w = a.useRef(!1), E = c.value === s.value;
|
|
1239
|
-
return /* @__PURE__ */ Ie(_e, { children: [
|
|
1240
|
-
/* @__PURE__ */ i(Co.ItemSlot, { scope: o, value: c.value, children: /* @__PURE__ */ i(qr, { asChild: !0, children: /* @__PURE__ */ i(
|
|
1241
|
-
O.button,
|
|
1242
|
-
{
|
|
1243
|
-
id: d,
|
|
1244
|
-
disabled: r,
|
|
1245
|
-
"data-disabled": r ? "" : void 0,
|
|
1246
|
-
"data-state": No(E),
|
|
1247
|
-
"aria-expanded": E,
|
|
1248
|
-
"aria-controls": f,
|
|
1249
|
-
...n,
|
|
1250
|
-
ref: u,
|
|
1251
|
-
onPointerEnter: A(e.onPointerEnter, () => {
|
|
1252
|
-
w.current = !1, c.wasEscapeCloseRef.current = !1;
|
|
1253
|
-
}),
|
|
1254
|
-
onPointerMove: A(
|
|
1255
|
-
e.onPointerMove,
|
|
1256
|
-
Ve(() => {
|
|
1257
|
-
r || w.current || c.wasEscapeCloseRef.current || b.current || (s.onTriggerEnter(c.value), b.current = !0);
|
|
1258
|
-
})
|
|
1259
|
-
),
|
|
1260
|
-
onPointerLeave: A(
|
|
1261
|
-
e.onPointerLeave,
|
|
1262
|
-
Ve(() => {
|
|
1263
|
-
r || (s.onTriggerLeave(), b.current = !1);
|
|
1264
|
-
})
|
|
1265
|
-
),
|
|
1266
|
-
onClick: A(e.onClick, () => {
|
|
1267
|
-
s.onItemSelect(c.value), w.current = E;
|
|
1268
|
-
}),
|
|
1269
|
-
onKeyDown: A(e.onKeyDown, (C) => {
|
|
1270
|
-
const m = { horizontal: "ArrowDown", vertical: s.dir === "rtl" ? "ArrowLeft" : "ArrowRight" }[s.orientation];
|
|
1271
|
-
E && C.key === m && (c.onEntryKeyDown(), C.preventDefault());
|
|
1272
|
-
})
|
|
1273
|
-
}
|
|
1274
|
-
) }) }),
|
|
1275
|
-
E && /* @__PURE__ */ Ie(_e, { children: [
|
|
1276
|
-
/* @__PURE__ */ i(
|
|
1277
|
-
Bn,
|
|
1278
|
-
{
|
|
1279
|
-
"aria-hidden": !0,
|
|
1280
|
-
tabIndex: 0,
|
|
1281
|
-
ref: c.focusProxyRef,
|
|
1282
|
-
onFocus: (C) => {
|
|
1283
|
-
const v = c.contentRef.current, m = C.relatedTarget, h = m === l.current, p = v == null ? void 0 : v.contains(m);
|
|
1284
|
-
(h || !p) && c.onFocusProxyEnter(h ? "start" : "end");
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
),
|
|
1288
|
-
s.viewport && /* @__PURE__ */ i("span", { "aria-owns": f })
|
|
1289
|
-
] })
|
|
1290
|
-
] });
|
|
1291
|
-
});
|
|
1292
|
-
Ro.displayName = ft;
|
|
1293
|
-
var Ss = "NavigationMenuLink", ur = "navigationMenu.linkSelect", _o = a.forwardRef(
|
|
1294
|
-
(e, t) => {
|
|
1295
|
-
const { __scopeNavigationMenu: o, active: r, onSelect: n, ...s } = e;
|
|
1296
|
-
return /* @__PURE__ */ i(qr, { asChild: !0, children: /* @__PURE__ */ i(
|
|
1297
|
-
O.a,
|
|
1298
|
-
{
|
|
1299
|
-
"data-active": r ? "" : void 0,
|
|
1300
|
-
"aria-current": r ? "page" : void 0,
|
|
1301
|
-
...s,
|
|
1302
|
-
ref: t,
|
|
1303
|
-
onClick: A(
|
|
1304
|
-
e.onClick,
|
|
1305
|
-
(c) => {
|
|
1306
|
-
const l = c.target, u = new CustomEvent(ur, {
|
|
1307
|
-
bubbles: !0,
|
|
1308
|
-
cancelable: !0
|
|
1309
|
-
});
|
|
1310
|
-
if (l.addEventListener(ur, (d) => n == null ? void 0 : n(d), { once: !0 }), rt(l, u), !u.defaultPrevented && !c.metaKey) {
|
|
1311
|
-
const d = new CustomEvent(Le, {
|
|
1312
|
-
bubbles: !0,
|
|
1313
|
-
cancelable: !0
|
|
1314
|
-
});
|
|
1315
|
-
rt(l, d);
|
|
1316
|
-
}
|
|
1317
|
-
},
|
|
1318
|
-
{ checkForDefaultPrevented: !1 }
|
|
1319
|
-
)
|
|
1320
|
-
}
|
|
1321
|
-
) });
|
|
1322
|
-
}
|
|
1323
|
-
);
|
|
1324
|
-
_o.displayName = Ss;
|
|
1325
|
-
var Io = "NavigationMenuIndicator", Mo = a.forwardRef((e, t) => {
|
|
1326
|
-
const { forceMount: o, ...r } = e, n = Q(Io, e.__scopeNavigationMenu), s = !!n.value;
|
|
1327
|
-
return n.indicatorTrack ? Qn.createPortal(
|
|
1328
|
-
/* @__PURE__ */ i(Ce, { present: o || s, children: /* @__PURE__ */ i(As, { ...r, ref: t }) }),
|
|
1329
|
-
n.indicatorTrack
|
|
1330
|
-
) : null;
|
|
1331
|
-
});
|
|
1332
|
-
Mo.displayName = Io;
|
|
1333
|
-
var As = a.forwardRef((e, t) => {
|
|
1334
|
-
const { __scopeNavigationMenu: o, ...r } = e, n = Q(Io, o), s = Kr(o), [c, l] = a.useState(
|
|
1335
|
-
null
|
|
1336
|
-
), [u, d] = a.useState(null), f = n.orientation === "horizontal", b = !!n.value;
|
|
1337
|
-
a.useEffect(() => {
|
|
1338
|
-
var v;
|
|
1339
|
-
const C = (v = s().find((m) => m.value === n.value)) == null ? void 0 : v.ref.current;
|
|
1340
|
-
C && l(C);
|
|
1341
|
-
}, [s, n.value]);
|
|
1342
|
-
const w = () => {
|
|
1343
|
-
c && d({
|
|
1344
|
-
size: f ? c.offsetWidth : c.offsetHeight,
|
|
1345
|
-
offset: f ? c.offsetLeft : c.offsetTop
|
|
1346
|
-
});
|
|
1347
|
-
};
|
|
1348
|
-
return vt(c, w), vt(n.indicatorTrack, w), u ? /* @__PURE__ */ i(
|
|
1349
|
-
O.div,
|
|
1350
|
-
{
|
|
1351
|
-
"aria-hidden": !0,
|
|
1352
|
-
"data-state": b ? "visible" : "hidden",
|
|
1353
|
-
"data-orientation": n.orientation,
|
|
1354
|
-
...r,
|
|
1355
|
-
ref: t,
|
|
1356
|
-
style: {
|
|
1357
|
-
position: "absolute",
|
|
1358
|
-
...f ? {
|
|
1359
|
-
left: 0,
|
|
1360
|
-
width: u.size + "px",
|
|
1361
|
-
transform: `translateX(${u.offset}px)`
|
|
1362
|
-
} : {
|
|
1363
|
-
top: 0,
|
|
1364
|
-
height: u.size + "px",
|
|
1365
|
-
transform: `translateY(${u.offset}px)`
|
|
1366
|
-
},
|
|
1367
|
-
...r.style
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
) : null;
|
|
1371
|
-
}), be = "NavigationMenuContent", Po = a.forwardRef((e, t) => {
|
|
1372
|
-
const { forceMount: o, ...r } = e, n = Q(be, e.__scopeNavigationMenu), s = zr(be, e.__scopeNavigationMenu), c = K(s.contentRef, t), l = s.value === n.value, u = {
|
|
1373
|
-
value: s.value,
|
|
1374
|
-
triggerRef: s.triggerRef,
|
|
1375
|
-
focusProxyRef: s.focusProxyRef,
|
|
1376
|
-
wasEscapeCloseRef: s.wasEscapeCloseRef,
|
|
1377
|
-
onContentFocusOutside: s.onContentFocusOutside,
|
|
1378
|
-
onRootContentClose: s.onRootContentClose,
|
|
1379
|
-
...r
|
|
1380
|
-
};
|
|
1381
|
-
return n.viewport ? /* @__PURE__ */ i(Ns, { forceMount: o, ...u, ref: c }) : /* @__PURE__ */ i(Ce, { present: o || l, children: /* @__PURE__ */ i(
|
|
1382
|
-
Ur,
|
|
1383
|
-
{
|
|
1384
|
-
"data-state": No(l),
|
|
1385
|
-
...u,
|
|
1386
|
-
ref: c,
|
|
1387
|
-
onPointerEnter: A(e.onPointerEnter, n.onContentEnter),
|
|
1388
|
-
onPointerLeave: A(
|
|
1389
|
-
e.onPointerLeave,
|
|
1390
|
-
Ve(n.onContentLeave)
|
|
1391
|
-
),
|
|
1392
|
-
style: {
|
|
1393
|
-
// Prevent interaction when animating out
|
|
1394
|
-
pointerEvents: !l && n.isRootMenu ? "none" : void 0,
|
|
1395
|
-
...u.style
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
) });
|
|
1399
|
-
});
|
|
1400
|
-
Po.displayName = be;
|
|
1401
|
-
var Ns = a.forwardRef((e, t) => {
|
|
1402
|
-
const o = Q(be, e.__scopeNavigationMenu), { onViewportContentChange: r, onViewportContentRemove: n } = o;
|
|
1403
|
-
return ge(() => {
|
|
1404
|
-
r(e.value, {
|
|
1405
|
-
ref: t,
|
|
1406
|
-
...e
|
|
1407
|
-
});
|
|
1408
|
-
}, [e, t, r]), ge(() => () => n(e.value), [e.value, n]), null;
|
|
1409
|
-
}), Le = "navigationMenu.rootContentDismiss", Ur = a.forwardRef((e, t) => {
|
|
1410
|
-
const {
|
|
1411
|
-
__scopeNavigationMenu: o,
|
|
1412
|
-
value: r,
|
|
1413
|
-
triggerRef: n,
|
|
1414
|
-
focusProxyRef: s,
|
|
1415
|
-
wasEscapeCloseRef: c,
|
|
1416
|
-
onRootContentClose: l,
|
|
1417
|
-
onContentFocusOutside: u,
|
|
1418
|
-
...d
|
|
1419
|
-
} = e, f = Q(be, o), b = a.useRef(null), w = K(b, t), E = Yr(f.baseId, r), C = Xr(f.baseId, r), v = Kr(o), m = a.useRef(null), { onItemDismiss: h } = f;
|
|
1420
|
-
a.useEffect(() => {
|
|
1421
|
-
const g = b.current;
|
|
1422
|
-
if (f.isRootMenu && g) {
|
|
1423
|
-
const y = () => {
|
|
1424
|
-
var R;
|
|
1425
|
-
h(), l(), g.contains(document.activeElement) && ((R = n.current) == null || R.focus());
|
|
1426
|
-
};
|
|
1427
|
-
return g.addEventListener(Le, y), () => g.removeEventListener(Le, y);
|
|
1428
|
-
}
|
|
1429
|
-
}, [f.isRootMenu, e.value, n, h, l]);
|
|
1430
|
-
const p = a.useMemo(() => {
|
|
1431
|
-
const y = v().map((T) => T.value);
|
|
1432
|
-
f.dir === "rtl" && y.reverse();
|
|
1433
|
-
const R = y.indexOf(f.value), P = y.indexOf(f.previousValue), D = r === f.value, F = P === y.indexOf(r);
|
|
1434
|
-
if (!D && !F) return m.current;
|
|
1435
|
-
const I = (() => {
|
|
1436
|
-
if (R !== P) {
|
|
1437
|
-
if (D && P !== -1) return R > P ? "from-end" : "from-start";
|
|
1438
|
-
if (F && R !== -1) return R > P ? "to-start" : "to-end";
|
|
1439
|
-
}
|
|
1440
|
-
return null;
|
|
1441
|
-
})();
|
|
1442
|
-
return m.current = I, I;
|
|
1443
|
-
}, [f.previousValue, f.value, f.dir, v, r]);
|
|
1444
|
-
return /* @__PURE__ */ i(Wr, { asChild: !0, children: /* @__PURE__ */ i(
|
|
1445
|
-
Hn,
|
|
1446
|
-
{
|
|
1447
|
-
id: C,
|
|
1448
|
-
"aria-labelledby": E,
|
|
1449
|
-
"data-motion": p,
|
|
1450
|
-
"data-orientation": f.orientation,
|
|
1451
|
-
...d,
|
|
1452
|
-
ref: w,
|
|
1453
|
-
disableOutsidePointerEvents: !1,
|
|
1454
|
-
onDismiss: () => {
|
|
1455
|
-
var y;
|
|
1456
|
-
const g = new Event(Le, {
|
|
1457
|
-
bubbles: !0,
|
|
1458
|
-
cancelable: !0
|
|
1459
|
-
});
|
|
1460
|
-
(y = b.current) == null || y.dispatchEvent(g);
|
|
1461
|
-
},
|
|
1462
|
-
onFocusOutside: A(e.onFocusOutside, (g) => {
|
|
1463
|
-
var R;
|
|
1464
|
-
u();
|
|
1465
|
-
const y = g.target;
|
|
1466
|
-
(R = f.rootNavigationMenu) != null && R.contains(y) && g.preventDefault();
|
|
1467
|
-
}),
|
|
1468
|
-
onPointerDownOutside: A(e.onPointerDownOutside, (g) => {
|
|
1469
|
-
var D;
|
|
1470
|
-
const y = g.target, R = v().some((F) => {
|
|
1471
|
-
var I;
|
|
1472
|
-
return (I = F.ref.current) == null ? void 0 : I.contains(y);
|
|
1473
|
-
}), P = f.isRootMenu && ((D = f.viewport) == null ? void 0 : D.contains(y));
|
|
1474
|
-
(R || P || !f.isRootMenu) && g.preventDefault();
|
|
1475
|
-
}),
|
|
1476
|
-
onKeyDown: A(e.onKeyDown, (g) => {
|
|
1477
|
-
var P;
|
|
1478
|
-
const y = g.altKey || g.ctrlKey || g.metaKey;
|
|
1479
|
-
if (g.key === "Tab" && !y) {
|
|
1480
|
-
const D = pt(g.currentTarget), F = document.activeElement, I = D.findIndex((x) => x === F), _ = g.shiftKey ? D.slice(0, I).reverse() : D.slice(I + 1, D.length);
|
|
1481
|
-
Ao(_) ? g.preventDefault() : (P = s.current) == null || P.focus();
|
|
1482
|
-
}
|
|
1483
|
-
}),
|
|
1484
|
-
onEscapeKeyDown: A(e.onEscapeKeyDown, (g) => {
|
|
1485
|
-
c.current = !0;
|
|
1486
|
-
})
|
|
1487
|
-
}
|
|
1488
|
-
) });
|
|
1489
|
-
}), xo = "NavigationMenuViewport", So = a.forwardRef((e, t) => {
|
|
1490
|
-
const { forceMount: o, ...r } = e, s = !!Q(xo, e.__scopeNavigationMenu).value;
|
|
1491
|
-
return /* @__PURE__ */ i(Ce, { present: o || s, children: /* @__PURE__ */ i(Fs, { ...r, ref: t }) });
|
|
1492
|
-
});
|
|
1493
|
-
So.displayName = xo;
|
|
1494
|
-
var Fs = a.forwardRef((e, t) => {
|
|
1495
|
-
const { __scopeNavigationMenu: o, children: r, ...n } = e, s = Q(xo, o), c = K(t, s.onViewportChange), l = Ps(
|
|
1496
|
-
be,
|
|
1497
|
-
e.__scopeNavigationMenu
|
|
1498
|
-
), [u, d] = a.useState(null), [f, b] = a.useState(null), w = u ? (u == null ? void 0 : u.width) + "px" : void 0, E = u ? (u == null ? void 0 : u.height) + "px" : void 0, C = !!s.value, v = C ? s.value : s.previousValue;
|
|
1499
|
-
return vt(f, () => {
|
|
1500
|
-
f && d({ width: f.offsetWidth, height: f.offsetHeight });
|
|
1501
|
-
}), /* @__PURE__ */ i(
|
|
1502
|
-
O.div,
|
|
1503
|
-
{
|
|
1504
|
-
"data-state": No(C),
|
|
1505
|
-
"data-orientation": s.orientation,
|
|
1506
|
-
...n,
|
|
1507
|
-
ref: c,
|
|
1508
|
-
style: {
|
|
1509
|
-
// Prevent interaction when animating out
|
|
1510
|
-
pointerEvents: !C && s.isRootMenu ? "none" : void 0,
|
|
1511
|
-
"--radix-navigation-menu-viewport-width": w,
|
|
1512
|
-
"--radix-navigation-menu-viewport-height": E,
|
|
1513
|
-
...n.style
|
|
1514
|
-
},
|
|
1515
|
-
onPointerEnter: A(e.onPointerEnter, s.onContentEnter),
|
|
1516
|
-
onPointerLeave: A(e.onPointerLeave, Ve(s.onContentLeave)),
|
|
1517
|
-
children: Array.from(l.items).map(([h, { ref: p, forceMount: g, ...y }]) => {
|
|
1518
|
-
const R = v === h;
|
|
1519
|
-
return /* @__PURE__ */ i(Ce, { present: g || R, children: /* @__PURE__ */ i(
|
|
1520
|
-
Ur,
|
|
1521
|
-
{
|
|
1522
|
-
...y,
|
|
1523
|
-
ref: zn(p, (P) => {
|
|
1524
|
-
R && P && b(P);
|
|
1525
|
-
})
|
|
1526
|
-
}
|
|
1527
|
-
) }, h);
|
|
1528
|
-
})
|
|
1529
|
-
}
|
|
1530
|
-
);
|
|
1531
|
-
}), Os = "FocusGroup", Wr = a.forwardRef(
|
|
1532
|
-
(e, t) => {
|
|
1533
|
-
const { __scopeNavigationMenu: o, ...r } = e, n = Q(Os, o);
|
|
1534
|
-
return /* @__PURE__ */ i(ut.Provider, { scope: o, children: /* @__PURE__ */ i(ut.Slot, { scope: o, children: /* @__PURE__ */ i(O.div, { dir: n.dir, ...r, ref: t }) }) });
|
|
1535
|
-
}
|
|
1536
|
-
), dr = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], Ds = "FocusGroupItem", qr = a.forwardRef(
|
|
1537
|
-
(e, t) => {
|
|
1538
|
-
const { __scopeNavigationMenu: o, ...r } = e, n = Es(o), s = Q(Ds, o);
|
|
1539
|
-
return /* @__PURE__ */ i(ut.ItemSlot, { scope: o, children: /* @__PURE__ */ i(
|
|
1540
|
-
O.button,
|
|
1541
|
-
{
|
|
1542
|
-
...r,
|
|
1543
|
-
ref: t,
|
|
1544
|
-
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1545
|
-
if (["Home", "End", ...dr].includes(c.key)) {
|
|
1546
|
-
let u = n().map((b) => b.ref.current);
|
|
1547
|
-
if ([s.dir === "rtl" ? "ArrowRight" : "ArrowLeft", "ArrowUp", "End"].includes(c.key) && u.reverse(), dr.includes(c.key)) {
|
|
1548
|
-
const b = u.indexOf(c.currentTarget);
|
|
1549
|
-
u = u.slice(b + 1);
|
|
1550
|
-
}
|
|
1551
|
-
setTimeout(() => Ao(u)), c.preventDefault();
|
|
1552
|
-
}
|
|
1553
|
-
})
|
|
1554
|
-
}
|
|
1555
|
-
) });
|
|
1556
|
-
}
|
|
1557
|
-
);
|
|
1558
|
-
function pt(e) {
|
|
1559
|
-
const t = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
1560
|
-
acceptNode: (r) => {
|
|
1561
|
-
const n = r.tagName === "INPUT" && r.type === "hidden";
|
|
1562
|
-
return r.disabled || r.hidden || n ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1563
|
-
}
|
|
1564
|
-
});
|
|
1565
|
-
for (; o.nextNode(); ) t.push(o.currentNode);
|
|
1566
|
-
return t;
|
|
1567
|
-
}
|
|
1568
|
-
function Ao(e) {
|
|
1569
|
-
const t = document.activeElement;
|
|
1570
|
-
return e.some((o) => o === t ? !0 : (o.focus(), document.activeElement !== t));
|
|
1571
|
-
}
|
|
1572
|
-
function Ls(e) {
|
|
1573
|
-
return e.forEach((t) => {
|
|
1574
|
-
t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
|
|
1575
|
-
}), () => {
|
|
1576
|
-
e.forEach((t) => {
|
|
1577
|
-
const o = t.dataset.tabindex;
|
|
1578
|
-
t.setAttribute("tabindex", o);
|
|
1579
|
-
});
|
|
1580
|
-
};
|
|
1581
|
-
}
|
|
1582
|
-
function vt(e, t) {
|
|
1583
|
-
const o = ee(t);
|
|
1584
|
-
ge(() => {
|
|
1585
|
-
let r = 0;
|
|
1586
|
-
if (e) {
|
|
1587
|
-
const n = new ResizeObserver(() => {
|
|
1588
|
-
cancelAnimationFrame(r), r = window.requestAnimationFrame(o);
|
|
1589
|
-
});
|
|
1590
|
-
return n.observe(e), () => {
|
|
1591
|
-
window.cancelAnimationFrame(r), n.unobserve(e);
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
}, [e, o]);
|
|
1595
|
-
}
|
|
1596
|
-
function No(e) {
|
|
1597
|
-
return e ? "open" : "closed";
|
|
1598
|
-
}
|
|
1599
|
-
function Yr(e, t) {
|
|
1600
|
-
return `${e}-trigger-${t}`;
|
|
1601
|
-
}
|
|
1602
|
-
function Xr(e, t) {
|
|
1603
|
-
return `${e}-content-${t}`;
|
|
1604
|
-
}
|
|
1605
|
-
function Ve(e) {
|
|
1606
|
-
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1607
|
-
}
|
|
1608
|
-
var ks = To, Vs = wo, Gs = yo, $s = Eo, Ks = Ro, Bs = _o, Hs = Mo, js = Po, zs = So;
|
|
1609
|
-
const cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1610
|
-
__proto__: null,
|
|
1611
|
-
Content: js,
|
|
1612
|
-
Indicator: Hs,
|
|
1613
|
-
Item: $s,
|
|
1614
|
-
Link: Bs,
|
|
1615
|
-
List: Gs,
|
|
1616
|
-
NavigationMenu: To,
|
|
1617
|
-
NavigationMenuContent: Po,
|
|
1618
|
-
NavigationMenuIndicator: Mo,
|
|
1619
|
-
NavigationMenuItem: Eo,
|
|
1620
|
-
NavigationMenuLink: _o,
|
|
1621
|
-
NavigationMenuList: yo,
|
|
1622
|
-
NavigationMenuSub: wo,
|
|
1623
|
-
NavigationMenuTrigger: Ro,
|
|
1624
|
-
NavigationMenuViewport: So,
|
|
1625
|
-
Root: ks,
|
|
1626
|
-
Sub: Vs,
|
|
1627
|
-
Trigger: Ks,
|
|
1628
|
-
Viewport: zs,
|
|
1629
|
-
createNavigationMenuScope: _s
|
|
1630
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1631
|
-
var Ge = {
|
|
1038
|
+
var Ie = {
|
|
1632
1039
|
numeric: {
|
|
1633
1040
|
type: "numeric",
|
|
1634
1041
|
regexp: /[^\d]/g,
|
|
@@ -1648,181 +1055,181 @@ var Ge = {
|
|
|
1648
1055
|
inputMode: "text"
|
|
1649
1056
|
},
|
|
1650
1057
|
none: null
|
|
1651
|
-
},
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
]),
|
|
1058
|
+
}, er = "OneTimePasswordField", [We, { useCollection: va, createCollectionScope: ba, useInitCollection: ga }] = ko(er), [ha] = se(er, [
|
|
1059
|
+
ba,
|
|
1060
|
+
de
|
|
1061
|
+
]), to = de(), [Ca, ro] = ha(er), Ir = a.forwardRef(
|
|
1655
1062
|
function({
|
|
1656
|
-
__scopeOneTimePasswordField:
|
|
1657
|
-
defaultValue:
|
|
1658
|
-
value:
|
|
1063
|
+
__scopeOneTimePasswordField: r,
|
|
1064
|
+
defaultValue: t,
|
|
1065
|
+
value: o,
|
|
1659
1066
|
onValueChange: n,
|
|
1660
1067
|
autoSubmit: s = !1,
|
|
1661
|
-
children:
|
|
1662
|
-
onPaste:
|
|
1663
|
-
onAutoSubmit:
|
|
1068
|
+
children: u,
|
|
1069
|
+
onPaste: c,
|
|
1070
|
+
onAutoSubmit: f,
|
|
1664
1071
|
disabled: d = !1,
|
|
1665
|
-
readOnly:
|
|
1666
|
-
autoComplete:
|
|
1667
|
-
autoFocus:
|
|
1668
|
-
form:
|
|
1669
|
-
name:
|
|
1670
|
-
placeholder:
|
|
1671
|
-
type:
|
|
1072
|
+
readOnly: b = !1,
|
|
1073
|
+
autoComplete: w = "one-time-code",
|
|
1074
|
+
autoFocus: I = !1,
|
|
1075
|
+
form: R,
|
|
1076
|
+
name: _,
|
|
1077
|
+
placeholder: m,
|
|
1078
|
+
type: p = "text",
|
|
1672
1079
|
// TODO: Change default to vertical when inputs use vertical writing mode
|
|
1673
|
-
orientation:
|
|
1674
|
-
dir:
|
|
1675
|
-
validationType:
|
|
1676
|
-
sanitizeValue:
|
|
1677
|
-
...
|
|
1678
|
-
},
|
|
1679
|
-
var
|
|
1680
|
-
const
|
|
1681
|
-
(
|
|
1682
|
-
if (Array.isArray(
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1685
|
-
} else
|
|
1686
|
-
return
|
|
1080
|
+
orientation: T = "horizontal",
|
|
1081
|
+
dir: l,
|
|
1082
|
+
validationType: h = "numeric",
|
|
1083
|
+
sanitizeValue: S,
|
|
1084
|
+
...F
|
|
1085
|
+
}, x) {
|
|
1086
|
+
var me;
|
|
1087
|
+
const V = to(r), N = Ae(l), M = ga(), [v] = M, g = Ie[h] ? Ie[h] : null, y = a.useCallback(
|
|
1088
|
+
(A) => {
|
|
1089
|
+
if (Array.isArray(A) ? A = A.map(xr).join("") : A = xr(A), g) {
|
|
1090
|
+
const $ = new RegExp(g.regexp);
|
|
1091
|
+
A = A.replace($, "");
|
|
1092
|
+
} else S && (A = S(A));
|
|
1093
|
+
return A.split("");
|
|
1687
1094
|
},
|
|
1688
|
-
[
|
|
1689
|
-
),
|
|
1095
|
+
[g, S]
|
|
1096
|
+
), O = a.useMemo(() => o != null ? y(o) : void 0, [o, y]), [C, L] = ie({
|
|
1690
1097
|
caller: "OneTimePasswordField",
|
|
1691
|
-
prop:
|
|
1692
|
-
defaultProp:
|
|
1098
|
+
prop: O,
|
|
1099
|
+
defaultProp: t != null ? y(t) : [],
|
|
1693
1100
|
onChange: a.useCallback(
|
|
1694
|
-
(
|
|
1101
|
+
(A) => n == null ? void 0 : n(A.join("")),
|
|
1695
1102
|
[n]
|
|
1696
1103
|
)
|
|
1697
|
-
}),
|
|
1698
|
-
var
|
|
1699
|
-
switch (
|
|
1104
|
+
}), k = kr((A) => {
|
|
1105
|
+
var $, ve, gr, hr, Cr, Tr, yr, Er, wr;
|
|
1106
|
+
switch (A.type) {
|
|
1700
1107
|
case "SET_CHAR": {
|
|
1701
|
-
const { index:
|
|
1702
|
-
if (
|
|
1703
|
-
const
|
|
1704
|
-
|
|
1108
|
+
const { index: te, char: U } = A, Z = ($ = v.at(te)) == null ? void 0 : $.element;
|
|
1109
|
+
if (C[te] === U) {
|
|
1110
|
+
const ne = Z && ((ve = v.from(Z, 1)) == null ? void 0 : ve.element);
|
|
1111
|
+
re(ne);
|
|
1705
1112
|
return;
|
|
1706
1113
|
}
|
|
1707
|
-
if (
|
|
1114
|
+
if (U === "")
|
|
1708
1115
|
return;
|
|
1709
|
-
if (
|
|
1710
|
-
const
|
|
1711
|
-
if (
|
|
1116
|
+
if (g) {
|
|
1117
|
+
const ne = new RegExp(g.regexp);
|
|
1118
|
+
if (U.replace(ne, "") !== U)
|
|
1712
1119
|
return;
|
|
1713
1120
|
}
|
|
1714
|
-
if (
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1121
|
+
if (C.length >= v.size) {
|
|
1122
|
+
const ne = [...C];
|
|
1123
|
+
ne[te] = U, ue(() => L(ne));
|
|
1124
|
+
const ye = Z && ((gr = v.from(Z, 1)) == null ? void 0 : gr.element);
|
|
1125
|
+
re(ye);
|
|
1719
1126
|
return;
|
|
1720
1127
|
}
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
const
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1128
|
+
const le = [...C];
|
|
1129
|
+
le[te] = U;
|
|
1130
|
+
const Ve = (hr = v.at(-1)) == null ? void 0 : hr.element;
|
|
1131
|
+
if (ue(() => L(le)), Z !== Ve) {
|
|
1132
|
+
const ne = Z && ((Cr = v.from(Z, 1)) == null ? void 0 : Cr.element);
|
|
1133
|
+
re(ne);
|
|
1727
1134
|
} else
|
|
1728
|
-
|
|
1135
|
+
Z == null || Z.select();
|
|
1729
1136
|
return;
|
|
1730
1137
|
}
|
|
1731
1138
|
case "CLEAR_CHAR": {
|
|
1732
|
-
const { index:
|
|
1733
|
-
if (!
|
|
1139
|
+
const { index: te, reason: U } = A;
|
|
1140
|
+
if (!C[te])
|
|
1734
1141
|
return;
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1142
|
+
const Z = C.filter((ne, ye) => ye !== te), le = (Tr = v.at(te)) == null ? void 0 : Tr.element, Ve = le && ((yr = v.from(le, -1)) == null ? void 0 : yr.element);
|
|
1143
|
+
ue(() => L(Z)), U === "Backspace" ? re(Ve) : (U === "Delete" || U === "Cut") && re(le);
|
|
1737
1144
|
return;
|
|
1738
1145
|
}
|
|
1739
1146
|
case "CLEAR": {
|
|
1740
|
-
if (
|
|
1147
|
+
if (C.length === 0)
|
|
1741
1148
|
return;
|
|
1742
|
-
|
|
1149
|
+
A.reason === "Backspace" || A.reason === "Delete" ? (ue(() => L([])), re((Er = v.at(0)) == null ? void 0 : Er.element)) : L([]);
|
|
1743
1150
|
return;
|
|
1744
1151
|
}
|
|
1745
1152
|
case "PASTE": {
|
|
1746
|
-
const { value:
|
|
1747
|
-
if (!
|
|
1153
|
+
const { value: te } = A, U = y(te);
|
|
1154
|
+
if (!U)
|
|
1748
1155
|
return;
|
|
1749
|
-
|
|
1156
|
+
ue(() => L(U)), re((wr = v.at(U.length - 1)) == null ? void 0 : wr.element);
|
|
1750
1157
|
return;
|
|
1751
1158
|
}
|
|
1752
1159
|
}
|
|
1753
|
-
}),
|
|
1160
|
+
}), X = a.useRef(g);
|
|
1754
1161
|
a.useEffect(() => {
|
|
1755
|
-
var
|
|
1756
|
-
|
|
1757
|
-
}, [
|
|
1758
|
-
const
|
|
1759
|
-
var
|
|
1760
|
-
let
|
|
1761
|
-
if (
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
} else
|
|
1765
|
-
return
|
|
1766
|
-
}, [
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1769
|
-
}, [
|
|
1162
|
+
var A;
|
|
1163
|
+
g && ((A = X.current) == null ? void 0 : A.type) !== g.type && (X.current = g, L(y(C.join(""))));
|
|
1164
|
+
}, [y, L, g, C]);
|
|
1165
|
+
const H = a.useRef(null), Q = a.useRef(null), W = a.useRef(null), pe = Y(x, W), oe = (me = v.at(0)) == null ? void 0 : me.element, z = a.useCallback(() => {
|
|
1166
|
+
var $;
|
|
1167
|
+
let A;
|
|
1168
|
+
if (R) {
|
|
1169
|
+
const ve = ((($ = W.current) == null ? void 0 : $.ownerDocument) ?? document).getElementById(R);
|
|
1170
|
+
Ta(ve) && (A = ve);
|
|
1171
|
+
} else H.current ? A = H.current.form : oe && (A = oe.form);
|
|
1172
|
+
return A ?? null;
|
|
1173
|
+
}, [R, oe]), E = a.useCallback(() => {
|
|
1174
|
+
const A = z();
|
|
1175
|
+
A == null || A.requestSubmit();
|
|
1176
|
+
}, [z]);
|
|
1770
1177
|
a.useEffect(() => {
|
|
1771
|
-
const
|
|
1772
|
-
if (
|
|
1773
|
-
const
|
|
1774
|
-
return
|
|
1178
|
+
const A = z();
|
|
1179
|
+
if (A) {
|
|
1180
|
+
const $ = () => k({ type: "CLEAR", reason: "Reset" });
|
|
1181
|
+
return A.addEventListener("reset", $), () => A.removeEventListener("reset", $);
|
|
1775
1182
|
}
|
|
1776
|
-
}, [
|
|
1777
|
-
const
|
|
1183
|
+
}, [k, z]);
|
|
1184
|
+
const K = C.join(""), B = a.useRef(K), G = v.size;
|
|
1778
1185
|
a.useEffect(() => {
|
|
1779
|
-
const
|
|
1780
|
-
|
|
1781
|
-
}, [
|
|
1782
|
-
const
|
|
1186
|
+
const A = B.current;
|
|
1187
|
+
B.current = K, A !== K && s && C.every(($) => $ !== "") && C.length === G && (f == null || f(C.join("")), E());
|
|
1188
|
+
}, [E, s, K, G, f, C]);
|
|
1189
|
+
const ee = Or();
|
|
1783
1190
|
return /* @__PURE__ */ i(
|
|
1784
|
-
|
|
1191
|
+
Ca,
|
|
1785
1192
|
{
|
|
1786
|
-
scope:
|
|
1787
|
-
value:
|
|
1788
|
-
attemptSubmit:
|
|
1193
|
+
scope: r,
|
|
1194
|
+
value: C,
|
|
1195
|
+
attemptSubmit: E,
|
|
1789
1196
|
disabled: d,
|
|
1790
|
-
readOnly:
|
|
1791
|
-
autoComplete:
|
|
1792
|
-
autoFocus:
|
|
1793
|
-
form:
|
|
1794
|
-
name:
|
|
1795
|
-
placeholder:
|
|
1796
|
-
type:
|
|
1797
|
-
hiddenInputRef:
|
|
1798
|
-
userActionRef:
|
|
1799
|
-
dispatch:
|
|
1800
|
-
validationType:
|
|
1801
|
-
orientation:
|
|
1802
|
-
isHydrated:
|
|
1803
|
-
sanitizeValue:
|
|
1804
|
-
children: /* @__PURE__ */ i(
|
|
1805
|
-
|
|
1197
|
+
readOnly: b,
|
|
1198
|
+
autoComplete: w,
|
|
1199
|
+
autoFocus: I,
|
|
1200
|
+
form: R,
|
|
1201
|
+
name: _,
|
|
1202
|
+
placeholder: m,
|
|
1203
|
+
type: p,
|
|
1204
|
+
hiddenInputRef: H,
|
|
1205
|
+
userActionRef: Q,
|
|
1206
|
+
dispatch: k,
|
|
1207
|
+
validationType: h,
|
|
1208
|
+
orientation: T,
|
|
1209
|
+
isHydrated: ee,
|
|
1210
|
+
sanitizeValue: y,
|
|
1211
|
+
children: /* @__PURE__ */ i(We.Provider, { scope: r, state: M, children: /* @__PURE__ */ i(We.Slot, { scope: r, children: /* @__PURE__ */ i(
|
|
1212
|
+
nt,
|
|
1806
1213
|
{
|
|
1807
1214
|
asChild: !0,
|
|
1808
|
-
...
|
|
1809
|
-
orientation:
|
|
1810
|
-
dir:
|
|
1215
|
+
...V,
|
|
1216
|
+
orientation: T,
|
|
1217
|
+
dir: N,
|
|
1811
1218
|
children: /* @__PURE__ */ i(
|
|
1812
|
-
|
|
1219
|
+
Nr.div,
|
|
1813
1220
|
{
|
|
1814
|
-
...
|
|
1221
|
+
...F,
|
|
1815
1222
|
role: "group",
|
|
1816
|
-
ref:
|
|
1817
|
-
onPaste:
|
|
1818
|
-
|
|
1819
|
-
(
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1223
|
+
ref: pe,
|
|
1224
|
+
onPaste: P(
|
|
1225
|
+
c,
|
|
1226
|
+
(A) => {
|
|
1227
|
+
A.preventDefault();
|
|
1228
|
+
const $ = A.clipboardData.getData("Text");
|
|
1229
|
+
k({ type: "PASTE", value: $ });
|
|
1823
1230
|
}
|
|
1824
1231
|
),
|
|
1825
|
-
children:
|
|
1232
|
+
children: u
|
|
1826
1233
|
}
|
|
1827
1234
|
)
|
|
1828
1235
|
}
|
|
@@ -1830,16 +1237,16 @@ var Ge = {
|
|
|
1830
1237
|
}
|
|
1831
1238
|
);
|
|
1832
1239
|
}
|
|
1833
|
-
),
|
|
1834
|
-
const { value: n, hiddenInputRef: s, name:
|
|
1240
|
+
), Ar = a.forwardRef(function({ __scopeOneTimePasswordField: r, ...t }, o) {
|
|
1241
|
+
const { value: n, hiddenInputRef: s, name: u } = ro(
|
|
1835
1242
|
"OneTimePasswordFieldHiddenInput",
|
|
1836
|
-
|
|
1837
|
-
),
|
|
1243
|
+
r
|
|
1244
|
+
), c = Y(s, o);
|
|
1838
1245
|
return /* @__PURE__ */ i(
|
|
1839
1246
|
"input",
|
|
1840
1247
|
{
|
|
1841
|
-
ref:
|
|
1842
|
-
name:
|
|
1248
|
+
ref: c,
|
|
1249
|
+
name: u,
|
|
1843
1250
|
value: n.join("").trim(),
|
|
1844
1251
|
autoComplete: "off",
|
|
1845
1252
|
autoFocus: !1,
|
|
@@ -1847,193 +1254,193 @@ var Ge = {
|
|
|
1847
1254
|
autoCorrect: "off",
|
|
1848
1255
|
autoSave: "off",
|
|
1849
1256
|
spellCheck: !1,
|
|
1850
|
-
...
|
|
1257
|
+
...t,
|
|
1851
1258
|
type: "hidden",
|
|
1852
1259
|
readOnly: !0
|
|
1853
1260
|
}
|
|
1854
1261
|
);
|
|
1855
|
-
}),
|
|
1856
|
-
__scopeOneTimePasswordField:
|
|
1857
|
-
onInvalidChange:
|
|
1858
|
-
index:
|
|
1262
|
+
}), Sr = a.forwardRef(function({
|
|
1263
|
+
__scopeOneTimePasswordField: r,
|
|
1264
|
+
onInvalidChange: t,
|
|
1265
|
+
index: o,
|
|
1859
1266
|
...n
|
|
1860
1267
|
}, s) {
|
|
1861
1268
|
const {
|
|
1862
|
-
value:
|
|
1863
|
-
defaultValue:
|
|
1864
|
-
disabled:
|
|
1269
|
+
value: u,
|
|
1270
|
+
defaultValue: c,
|
|
1271
|
+
disabled: f,
|
|
1865
1272
|
readOnly: d,
|
|
1866
|
-
autoComplete:
|
|
1867
|
-
autoFocus:
|
|
1868
|
-
form:
|
|
1869
|
-
name:
|
|
1870
|
-
placeholder:
|
|
1871
|
-
type:
|
|
1872
|
-
...
|
|
1873
|
-
} = n,
|
|
1273
|
+
autoComplete: b,
|
|
1274
|
+
autoFocus: w,
|
|
1275
|
+
form: I,
|
|
1276
|
+
name: R,
|
|
1277
|
+
placeholder: _,
|
|
1278
|
+
type: m,
|
|
1279
|
+
...p
|
|
1280
|
+
} = n, T = ro(
|
|
1874
1281
|
"OneTimePasswordFieldInput",
|
|
1875
|
-
|
|
1876
|
-
), { dispatch:
|
|
1877
|
-
let
|
|
1878
|
-
|
|
1879
|
-
const
|
|
1282
|
+
r
|
|
1283
|
+
), { dispatch: l, userActionRef: h, validationType: S, isHydrated: F } = T, x = va(r), V = to(r), N = a.useRef(null), [M, v] = a.useState(null), g = o ?? (M ? x.indexOf(M) : -1), y = o != null || F;
|
|
1284
|
+
let O;
|
|
1285
|
+
y && T.placeholder && T.value.length === 0 && (O = T.placeholder[g]);
|
|
1286
|
+
const C = Y(s, N, v), L = T.value[g] ?? "", k = a.useRef(null);
|
|
1880
1287
|
a.useEffect(() => () => {
|
|
1881
|
-
window.clearTimeout(
|
|
1288
|
+
window.clearTimeout(k.current);
|
|
1882
1289
|
}, []);
|
|
1883
|
-
const
|
|
1884
|
-
return /* @__PURE__ */ i(
|
|
1885
|
-
|
|
1290
|
+
const X = T.value.join("").trim(), H = Vo(X.length, [0, x.size - 1]), Q = g <= H, W = S in Ie ? Ie[S] : void 0;
|
|
1291
|
+
return /* @__PURE__ */ i(We.ItemSlot, { scope: r, children: /* @__PURE__ */ i(
|
|
1292
|
+
Se,
|
|
1886
1293
|
{
|
|
1887
|
-
...
|
|
1294
|
+
...V,
|
|
1888
1295
|
asChild: !0,
|
|
1889
|
-
focusable: !
|
|
1890
|
-
active:
|
|
1891
|
-
children: ({ hasTabStop:
|
|
1892
|
-
const
|
|
1296
|
+
focusable: !T.disabled && Q,
|
|
1297
|
+
active: g === H,
|
|
1298
|
+
children: ({ hasTabStop: pe, isCurrentTabStop: oe }) => {
|
|
1299
|
+
const z = pe ? oe : g === 0;
|
|
1893
1300
|
return /* @__PURE__ */ i(
|
|
1894
|
-
|
|
1301
|
+
Nr.input,
|
|
1895
1302
|
{
|
|
1896
|
-
ref:
|
|
1897
|
-
type:
|
|
1898
|
-
"aria-label": `Character ${
|
|
1899
|
-
autoComplete:
|
|
1900
|
-
"data-1p-ignore":
|
|
1901
|
-
"data-lpignore":
|
|
1902
|
-
"data-protonpass-ignore":
|
|
1903
|
-
"data-bwignore":
|
|
1904
|
-
inputMode:
|
|
1303
|
+
ref: C,
|
|
1304
|
+
type: T.type,
|
|
1305
|
+
"aria-label": `Character ${g + 1} of ${x.size}`,
|
|
1306
|
+
autoComplete: z ? T.autoComplete : "off",
|
|
1307
|
+
"data-1p-ignore": z ? void 0 : "true",
|
|
1308
|
+
"data-lpignore": z ? void 0 : "true",
|
|
1309
|
+
"data-protonpass-ignore": z ? void 0 : "true",
|
|
1310
|
+
"data-bwignore": z ? void 0 : "true",
|
|
1311
|
+
inputMode: W == null ? void 0 : W.inputMode,
|
|
1905
1312
|
maxLength: 1,
|
|
1906
|
-
pattern:
|
|
1907
|
-
readOnly:
|
|
1908
|
-
value:
|
|
1909
|
-
placeholder:
|
|
1313
|
+
pattern: W == null ? void 0 : W.pattern,
|
|
1314
|
+
readOnly: T.readOnly,
|
|
1315
|
+
value: L,
|
|
1316
|
+
placeholder: O,
|
|
1910
1317
|
"data-radix-otp-input": "",
|
|
1911
|
-
"data-radix-index":
|
|
1912
|
-
...
|
|
1913
|
-
onFocus:
|
|
1914
|
-
|
|
1318
|
+
"data-radix-index": g,
|
|
1319
|
+
...p,
|
|
1320
|
+
onFocus: P(n.onFocus, (E) => {
|
|
1321
|
+
E.currentTarget.select();
|
|
1915
1322
|
}),
|
|
1916
|
-
onCut:
|
|
1917
|
-
|
|
1323
|
+
onCut: P(n.onCut, (E) => {
|
|
1324
|
+
E.currentTarget.value !== "" && (h.current = {
|
|
1918
1325
|
type: "cut"
|
|
1919
|
-
},
|
|
1920
|
-
|
|
1326
|
+
}, k.current = window.setTimeout(() => {
|
|
1327
|
+
h.current = null;
|
|
1921
1328
|
}, 10));
|
|
1922
1329
|
}),
|
|
1923
|
-
onInput:
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1330
|
+
onInput: P(n.onInput, (E) => {
|
|
1331
|
+
const K = E.currentTarget.value;
|
|
1332
|
+
K.length > 1 && (E.preventDefault(), l({ type: "PASTE", value: K }));
|
|
1926
1333
|
}),
|
|
1927
|
-
onChange:
|
|
1928
|
-
const
|
|
1929
|
-
|
|
1930
|
-
const
|
|
1931
|
-
if (
|
|
1932
|
-
switch (
|
|
1334
|
+
onChange: P(n.onChange, (E) => {
|
|
1335
|
+
const K = E.target.value;
|
|
1336
|
+
E.preventDefault();
|
|
1337
|
+
const B = h.current;
|
|
1338
|
+
if (h.current = null, B)
|
|
1339
|
+
switch (B.type) {
|
|
1933
1340
|
case "cut":
|
|
1934
|
-
|
|
1341
|
+
l({ type: "CLEAR_CHAR", index: g, reason: "Cut" });
|
|
1935
1342
|
return;
|
|
1936
1343
|
case "keydown": {
|
|
1937
|
-
if (
|
|
1344
|
+
if (B.key === "Char")
|
|
1938
1345
|
return;
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1346
|
+
const G = B.key === "Backspace" && (B.metaKey || B.ctrlKey);
|
|
1347
|
+
B.key === "Clear" || G ? l({ type: "CLEAR", reason: "Backspace" }) : l({ type: "CLEAR_CHAR", index: g, reason: B.key });
|
|
1941
1348
|
return;
|
|
1942
1349
|
}
|
|
1943
1350
|
default:
|
|
1944
1351
|
return;
|
|
1945
1352
|
}
|
|
1946
|
-
if (
|
|
1947
|
-
if (
|
|
1948
|
-
let
|
|
1949
|
-
if (
|
|
1950
|
-
const
|
|
1951
|
-
|
|
1353
|
+
if (E.target.validity.valid)
|
|
1354
|
+
if (K === "") {
|
|
1355
|
+
let G = "Backspace";
|
|
1356
|
+
if (ya(E.nativeEvent)) {
|
|
1357
|
+
const ee = E.nativeEvent.inputType;
|
|
1358
|
+
ee === "deleteContentBackward" ? G = "Backspace" : ee === "deleteByCut" && (G = "Cut");
|
|
1952
1359
|
}
|
|
1953
|
-
|
|
1360
|
+
l({ type: "CLEAR_CHAR", index: g, reason: G });
|
|
1954
1361
|
} else
|
|
1955
|
-
|
|
1362
|
+
l({ type: "SET_CHAR", char: K, index: g, event: E });
|
|
1956
1363
|
else {
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1959
|
-
|
|
1364
|
+
const G = E.target;
|
|
1365
|
+
t == null || t(G.value), requestAnimationFrame(() => {
|
|
1366
|
+
G.ownerDocument.activeElement === G && G.select();
|
|
1960
1367
|
});
|
|
1961
1368
|
}
|
|
1962
1369
|
}),
|
|
1963
|
-
onKeyDown:
|
|
1964
|
-
var
|
|
1965
|
-
switch (
|
|
1370
|
+
onKeyDown: P(n.onKeyDown, (E) => {
|
|
1371
|
+
var K, B, G;
|
|
1372
|
+
switch (E.key) {
|
|
1966
1373
|
case "Clear":
|
|
1967
1374
|
case "Delete":
|
|
1968
1375
|
case "Backspace": {
|
|
1969
|
-
if (
|
|
1970
|
-
if (
|
|
1971
|
-
if (
|
|
1972
|
-
|
|
1376
|
+
if (E.currentTarget.value === "") {
|
|
1377
|
+
if (E.key === "Delete") return;
|
|
1378
|
+
if (E.key === "Clear" || E.metaKey || E.ctrlKey)
|
|
1379
|
+
l({ type: "CLEAR", reason: "Backspace" });
|
|
1973
1380
|
else {
|
|
1974
|
-
const
|
|
1381
|
+
const A = E.currentTarget;
|
|
1975
1382
|
requestAnimationFrame(() => {
|
|
1976
|
-
var
|
|
1977
|
-
|
|
1383
|
+
var $;
|
|
1384
|
+
re(($ = x.from(A, -1)) == null ? void 0 : $.element);
|
|
1978
1385
|
});
|
|
1979
1386
|
}
|
|
1980
1387
|
} else
|
|
1981
|
-
|
|
1388
|
+
h.current = {
|
|
1982
1389
|
type: "keydown",
|
|
1983
|
-
key:
|
|
1984
|
-
metaKey:
|
|
1985
|
-
ctrlKey:
|
|
1986
|
-
},
|
|
1987
|
-
|
|
1390
|
+
key: E.key,
|
|
1391
|
+
metaKey: E.metaKey,
|
|
1392
|
+
ctrlKey: E.ctrlKey
|
|
1393
|
+
}, k.current = window.setTimeout(() => {
|
|
1394
|
+
h.current = null;
|
|
1988
1395
|
}, 10);
|
|
1989
1396
|
return;
|
|
1990
1397
|
}
|
|
1991
1398
|
case "Enter": {
|
|
1992
|
-
|
|
1399
|
+
E.preventDefault(), T.attemptSubmit();
|
|
1993
1400
|
return;
|
|
1994
1401
|
}
|
|
1995
1402
|
case "ArrowDown":
|
|
1996
1403
|
case "ArrowUp": {
|
|
1997
|
-
|
|
1404
|
+
T.orientation === "horizontal" && E.preventDefault();
|
|
1998
1405
|
return;
|
|
1999
1406
|
}
|
|
2000
1407
|
default:
|
|
2001
|
-
if (
|
|
2002
|
-
const
|
|
2003
|
-
|
|
1408
|
+
if (E.currentTarget.value === E.key) {
|
|
1409
|
+
const ee = E.currentTarget;
|
|
1410
|
+
E.preventDefault(), re((K = x.from(ee, 1)) == null ? void 0 : K.element);
|
|
2004
1411
|
return;
|
|
2005
1412
|
} else if (
|
|
2006
1413
|
// input already has a value, but...
|
|
2007
|
-
|
|
2008
|
-
!(
|
|
1414
|
+
E.currentTarget.value && // the value is not selected
|
|
1415
|
+
!(E.currentTarget.selectionStart === 0 && E.currentTarget.selectionEnd != null && E.currentTarget.selectionEnd > 0)
|
|
2009
1416
|
) {
|
|
2010
|
-
const
|
|
2011
|
-
if (
|
|
1417
|
+
const ee = E.key;
|
|
1418
|
+
if (E.key.length > 1 || E.key === " ")
|
|
2012
1419
|
return;
|
|
2013
1420
|
{
|
|
2014
|
-
const
|
|
2015
|
-
|
|
1421
|
+
const me = (B = x.from(E.currentTarget, 1)) == null ? void 0 : B.element, A = (G = x.at(-1)) == null ? void 0 : G.element;
|
|
1422
|
+
me !== A && E.currentTarget !== A && (E.currentTarget.selectionStart === 0 ? l({ type: "SET_CHAR", char: ee, index: g, event: E }) : l({
|
|
2016
1423
|
type: "SET_CHAR",
|
|
2017
|
-
char:
|
|
2018
|
-
index:
|
|
2019
|
-
event:
|
|
2020
|
-
}),
|
|
1424
|
+
char: ee,
|
|
1425
|
+
index: g + 1,
|
|
1426
|
+
event: E
|
|
1427
|
+
}), h.current = {
|
|
2021
1428
|
type: "keydown",
|
|
2022
1429
|
key: "Char",
|
|
2023
|
-
metaKey:
|
|
2024
|
-
ctrlKey:
|
|
2025
|
-
},
|
|
2026
|
-
|
|
1430
|
+
metaKey: E.metaKey,
|
|
1431
|
+
ctrlKey: E.ctrlKey
|
|
1432
|
+
}, k.current = window.setTimeout(() => {
|
|
1433
|
+
h.current = null;
|
|
2027
1434
|
}, 10));
|
|
2028
1435
|
}
|
|
2029
1436
|
}
|
|
2030
1437
|
}
|
|
2031
1438
|
}),
|
|
2032
|
-
onPointerDown:
|
|
2033
|
-
var
|
|
2034
|
-
|
|
2035
|
-
const
|
|
2036
|
-
|
|
1439
|
+
onPointerDown: P(n.onPointerDown, (E) => {
|
|
1440
|
+
var G;
|
|
1441
|
+
E.preventDefault();
|
|
1442
|
+
const K = Math.min(g, H), B = (G = x.at(K)) == null ? void 0 : G.element;
|
|
1443
|
+
re(B);
|
|
2037
1444
|
})
|
|
2038
1445
|
}
|
|
2039
1446
|
);
|
|
@@ -2041,474 +1448,414 @@ var Ge = {
|
|
|
2041
1448
|
}
|
|
2042
1449
|
) });
|
|
2043
1450
|
});
|
|
2044
|
-
function
|
|
1451
|
+
function Ta(e) {
|
|
2045
1452
|
return (e == null ? void 0 : e.tagName) === "FORM";
|
|
2046
1453
|
}
|
|
2047
|
-
function
|
|
1454
|
+
function xr(e) {
|
|
2048
1455
|
return e.replace(/\s/g, "");
|
|
2049
1456
|
}
|
|
2050
|
-
function
|
|
1457
|
+
function re(e) {
|
|
2051
1458
|
e && (e.ownerDocument.activeElement === e ? window.requestAnimationFrame(() => {
|
|
2052
|
-
var
|
|
2053
|
-
(
|
|
1459
|
+
var r;
|
|
1460
|
+
(r = e.select) == null || r.call(e);
|
|
2054
1461
|
}) : e.focus());
|
|
2055
1462
|
}
|
|
2056
|
-
function
|
|
1463
|
+
function ya(e) {
|
|
2057
1464
|
return e.type === "input";
|
|
2058
1465
|
}
|
|
2059
|
-
const
|
|
1466
|
+
const Ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2060
1467
|
__proto__: null,
|
|
2061
|
-
HiddenInput:
|
|
2062
|
-
Input:
|
|
2063
|
-
OneTimePasswordField:
|
|
2064
|
-
OneTimePasswordFieldHiddenInput:
|
|
2065
|
-
OneTimePasswordFieldInput:
|
|
2066
|
-
Root:
|
|
1468
|
+
HiddenInput: Ar,
|
|
1469
|
+
Input: Sr,
|
|
1470
|
+
OneTimePasswordField: Ir,
|
|
1471
|
+
OneTimePasswordFieldHiddenInput: Ar,
|
|
1472
|
+
OneTimePasswordFieldInput: Sr,
|
|
1473
|
+
Root: Ir
|
|
2067
1474
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2068
|
-
var
|
|
1475
|
+
var ce = "PasswordToggleField", [Ea] = se(ce), [wa, Oe] = Ea(ce), be = {
|
|
2069
1476
|
clickTriggered: !1,
|
|
2070
1477
|
selectionStart: null,
|
|
2071
1478
|
selectionEnd: null
|
|
2072
|
-
},
|
|
1479
|
+
}, qe = ({
|
|
2073
1480
|
__scopePasswordToggleField: e,
|
|
2074
|
-
...
|
|
1481
|
+
...r
|
|
2075
1482
|
}) => {
|
|
2076
|
-
const
|
|
2077
|
-
(
|
|
1483
|
+
const o = `${ae(r.id)}-input`, [n, s] = a.useState(o), u = n ?? o, c = a.useCallback(
|
|
1484
|
+
(p) => s(p != null ? String(p) : null),
|
|
2078
1485
|
[]
|
|
2079
|
-
), { visible:
|
|
2080
|
-
caller:
|
|
2081
|
-
prop:
|
|
1486
|
+
), { visible: f, defaultVisible: d, onVisiblityChange: b, children: w } = r, [I = !1, R] = ie({
|
|
1487
|
+
caller: ce,
|
|
1488
|
+
prop: f,
|
|
2082
1489
|
defaultProp: d ?? !1,
|
|
2083
|
-
onChange:
|
|
2084
|
-
}),
|
|
1490
|
+
onChange: b
|
|
1491
|
+
}), _ = a.useRef(null), m = a.useRef(be);
|
|
2085
1492
|
return /* @__PURE__ */ i(
|
|
2086
|
-
|
|
1493
|
+
wa,
|
|
2087
1494
|
{
|
|
2088
1495
|
scope: e,
|
|
2089
|
-
inputId:
|
|
2090
|
-
inputRef:
|
|
2091
|
-
setVisible:
|
|
2092
|
-
syncInputId:
|
|
2093
|
-
visible:
|
|
2094
|
-
focusState:
|
|
2095
|
-
children:
|
|
1496
|
+
inputId: u,
|
|
1497
|
+
inputRef: _,
|
|
1498
|
+
setVisible: R,
|
|
1499
|
+
syncInputId: c,
|
|
1500
|
+
visible: I,
|
|
1501
|
+
focusState: m,
|
|
1502
|
+
children: w
|
|
2096
1503
|
}
|
|
2097
1504
|
);
|
|
2098
1505
|
};
|
|
2099
|
-
|
|
2100
|
-
var
|
|
1506
|
+
qe.displayName = ce;
|
|
1507
|
+
var oo = ce + "Input", Ye = a.forwardRef(
|
|
2101
1508
|
({
|
|
2102
1509
|
__scopePasswordToggleField: e,
|
|
2103
|
-
autoComplete:
|
|
2104
|
-
autoCapitalize:
|
|
2105
|
-
spellCheck:
|
|
1510
|
+
autoComplete: r = "current-password",
|
|
1511
|
+
autoCapitalize: t = "off",
|
|
1512
|
+
spellCheck: o = !1,
|
|
2106
1513
|
id: n,
|
|
2107
1514
|
...s
|
|
2108
|
-
},
|
|
2109
|
-
const { visible:
|
|
1515
|
+
}, u) => {
|
|
1516
|
+
const { visible: c, inputRef: f, inputId: d, syncInputId: b, setVisible: w, focusState: I } = Oe(oo, e);
|
|
2110
1517
|
a.useEffect(() => {
|
|
2111
|
-
|
|
2112
|
-
}, [n,
|
|
2113
|
-
const
|
|
1518
|
+
b(n);
|
|
1519
|
+
}, [n, b]);
|
|
1520
|
+
const R = kr(w);
|
|
2114
1521
|
return a.useEffect(() => {
|
|
2115
|
-
const
|
|
2116
|
-
if (!
|
|
1522
|
+
const _ = f.current, m = _ == null ? void 0 : _.form;
|
|
1523
|
+
if (!m)
|
|
2117
1524
|
return;
|
|
2118
|
-
const
|
|
2119
|
-
return
|
|
1525
|
+
const p = new AbortController();
|
|
1526
|
+
return m.addEventListener(
|
|
2120
1527
|
"reset",
|
|
2121
|
-
(
|
|
2122
|
-
|
|
1528
|
+
(T) => {
|
|
1529
|
+
T.defaultPrevented || R(!1);
|
|
2123
1530
|
},
|
|
2124
|
-
{ signal:
|
|
2125
|
-
),
|
|
1531
|
+
{ signal: p.signal }
|
|
1532
|
+
), m.addEventListener(
|
|
2126
1533
|
"submit",
|
|
2127
1534
|
() => {
|
|
2128
|
-
|
|
1535
|
+
R(!1);
|
|
2129
1536
|
},
|
|
2130
|
-
{ signal:
|
|
1537
|
+
{ signal: p.signal }
|
|
2131
1538
|
), () => {
|
|
2132
|
-
|
|
1539
|
+
p.abort();
|
|
2133
1540
|
};
|
|
2134
|
-
}, [
|
|
2135
|
-
|
|
1541
|
+
}, [f, R]), /* @__PURE__ */ i(
|
|
1542
|
+
D.input,
|
|
2136
1543
|
{
|
|
2137
1544
|
...s,
|
|
2138
1545
|
id: n ?? d,
|
|
2139
|
-
autoCapitalize:
|
|
2140
|
-
autoComplete:
|
|
2141
|
-
ref:
|
|
2142
|
-
spellCheck:
|
|
2143
|
-
type:
|
|
2144
|
-
onBlur:
|
|
2145
|
-
const { selectionStart:
|
|
2146
|
-
|
|
1546
|
+
autoCapitalize: t,
|
|
1547
|
+
autoComplete: r,
|
|
1548
|
+
ref: Y(u, f),
|
|
1549
|
+
spellCheck: o,
|
|
1550
|
+
type: c ? "text" : "password",
|
|
1551
|
+
onBlur: P(s.onBlur, (_) => {
|
|
1552
|
+
const { selectionStart: m, selectionEnd: p } = _.currentTarget;
|
|
1553
|
+
I.current.selectionStart = m, I.current.selectionEnd = p;
|
|
2147
1554
|
})
|
|
2148
1555
|
}
|
|
2149
1556
|
);
|
|
2150
1557
|
}
|
|
2151
1558
|
);
|
|
2152
|
-
|
|
2153
|
-
var
|
|
1559
|
+
Ye.displayName = oo;
|
|
1560
|
+
var no = ce + "Toggle", Xe = a.forwardRef(
|
|
2154
1561
|
({
|
|
2155
1562
|
__scopePasswordToggleField: e,
|
|
2156
|
-
onClick:
|
|
2157
|
-
onPointerDown:
|
|
2158
|
-
onPointerCancel:
|
|
1563
|
+
onClick: r,
|
|
1564
|
+
onPointerDown: t,
|
|
1565
|
+
onPointerCancel: o,
|
|
2159
1566
|
onPointerUp: n,
|
|
2160
1567
|
onFocus: s,
|
|
2161
|
-
children:
|
|
2162
|
-
"aria-label":
|
|
2163
|
-
"aria-controls":
|
|
1568
|
+
children: u,
|
|
1569
|
+
"aria-label": c,
|
|
1570
|
+
"aria-controls": f,
|
|
2164
1571
|
"aria-hidden": d,
|
|
2165
|
-
tabIndex:
|
|
2166
|
-
...
|
|
2167
|
-
},
|
|
2168
|
-
const { setVisible:
|
|
2169
|
-
|
|
1572
|
+
tabIndex: b,
|
|
1573
|
+
...w
|
|
1574
|
+
}, I) => {
|
|
1575
|
+
const { setVisible: R, visible: _, inputRef: m, inputId: p, focusState: T } = Oe(
|
|
1576
|
+
no,
|
|
2170
1577
|
e
|
|
2171
|
-
), [
|
|
1578
|
+
), [l, h] = a.useState(void 0), S = a.useRef(null), F = Y(I, S), x = Or();
|
|
2172
1579
|
a.useEffect(() => {
|
|
2173
|
-
const
|
|
2174
|
-
if (!
|
|
2175
|
-
|
|
1580
|
+
const N = S.current;
|
|
1581
|
+
if (!N || c) {
|
|
1582
|
+
h(void 0);
|
|
2176
1583
|
return;
|
|
2177
1584
|
}
|
|
2178
|
-
const
|
|
2179
|
-
function
|
|
2180
|
-
|
|
1585
|
+
const M = _ ? "Hide password" : "Show password";
|
|
1586
|
+
function v(y) {
|
|
1587
|
+
h(y || void 0 ? void 0 : M);
|
|
2181
1588
|
}
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2184
|
-
let
|
|
2185
|
-
for (const
|
|
2186
|
-
|
|
2187
|
-
|
|
1589
|
+
v(N.textContent);
|
|
1590
|
+
const g = new MutationObserver((y) => {
|
|
1591
|
+
let O;
|
|
1592
|
+
for (const C of y)
|
|
1593
|
+
C.type === "characterData" && N.textContent && (O = N.textContent);
|
|
1594
|
+
v(O);
|
|
2188
1595
|
});
|
|
2189
|
-
return
|
|
2190
|
-
|
|
1596
|
+
return g.observe(N, { characterData: !0, subtree: !0 }), () => {
|
|
1597
|
+
g.disconnect();
|
|
2191
1598
|
};
|
|
2192
|
-
}, [
|
|
2193
|
-
const
|
|
2194
|
-
return
|
|
2195
|
-
var
|
|
2196
|
-
let
|
|
1599
|
+
}, [_, c]);
|
|
1600
|
+
const V = c || l;
|
|
1601
|
+
return x ? f ?? (f = p) : (d ?? (d = !0), b ?? (b = -1)), a.useEffect(() => {
|
|
1602
|
+
var y, O;
|
|
1603
|
+
let N = () => {
|
|
2197
1604
|
};
|
|
2198
|
-
const
|
|
2199
|
-
return
|
|
2200
|
-
|
|
1605
|
+
const M = ((O = (y = S.current) == null ? void 0 : y.ownerDocument) == null ? void 0 : O.defaultView) || window, v = () => T.current.clickTriggered = !1, g = () => N = Ra(M, v);
|
|
1606
|
+
return M.addEventListener("pointerup", g), () => {
|
|
1607
|
+
N(), M.removeEventListener("pointerup", g);
|
|
2201
1608
|
};
|
|
2202
|
-
}, [
|
|
2203
|
-
|
|
1609
|
+
}, [T]), /* @__PURE__ */ i(
|
|
1610
|
+
D.button,
|
|
2204
1611
|
{
|
|
2205
|
-
"aria-controls":
|
|
1612
|
+
"aria-controls": f,
|
|
2206
1613
|
"aria-hidden": d,
|
|
2207
|
-
"aria-label":
|
|
2208
|
-
ref:
|
|
2209
|
-
id:
|
|
2210
|
-
...
|
|
2211
|
-
onPointerDown:
|
|
2212
|
-
|
|
1614
|
+
"aria-label": V,
|
|
1615
|
+
ref: F,
|
|
1616
|
+
id: p,
|
|
1617
|
+
...w,
|
|
1618
|
+
onPointerDown: P(t, () => {
|
|
1619
|
+
T.current.clickTriggered = !0;
|
|
2213
1620
|
}),
|
|
2214
|
-
onPointerCancel: (
|
|
2215
|
-
|
|
1621
|
+
onPointerCancel: (N) => {
|
|
1622
|
+
o == null || o(N), T.current = be;
|
|
2216
1623
|
},
|
|
2217
|
-
onClick: (
|
|
2218
|
-
if (
|
|
2219
|
-
|
|
1624
|
+
onClick: (N) => {
|
|
1625
|
+
if (r == null || r(N), N.defaultPrevented) {
|
|
1626
|
+
T.current = be;
|
|
2220
1627
|
return;
|
|
2221
1628
|
}
|
|
2222
|
-
if (
|
|
2223
|
-
|
|
2224
|
-
}),
|
|
2225
|
-
const
|
|
2226
|
-
if (
|
|
2227
|
-
const { selectionStart:
|
|
2228
|
-
|
|
2229
|
-
|
|
1629
|
+
if (ue(() => {
|
|
1630
|
+
R((M) => !M);
|
|
1631
|
+
}), T.current.clickTriggered) {
|
|
1632
|
+
const M = m.current;
|
|
1633
|
+
if (M) {
|
|
1634
|
+
const { selectionStart: v, selectionEnd: g } = T.current;
|
|
1635
|
+
M.focus(), (v !== null || g !== null) && requestAnimationFrame(() => {
|
|
1636
|
+
M.ownerDocument.activeElement === M && (M.selectionStart = v, M.selectionEnd = g);
|
|
2230
1637
|
});
|
|
2231
1638
|
}
|
|
2232
1639
|
}
|
|
2233
|
-
|
|
1640
|
+
T.current = be;
|
|
2234
1641
|
},
|
|
2235
|
-
onPointerUp: (
|
|
2236
|
-
n == null || n(
|
|
2237
|
-
|
|
1642
|
+
onPointerUp: (N) => {
|
|
1643
|
+
n == null || n(N), setTimeout(() => {
|
|
1644
|
+
T.current = be;
|
|
2238
1645
|
}, 50);
|
|
2239
1646
|
},
|
|
2240
1647
|
type: "button",
|
|
2241
|
-
children:
|
|
1648
|
+
children: u
|
|
2242
1649
|
}
|
|
2243
1650
|
);
|
|
2244
1651
|
}
|
|
2245
1652
|
);
|
|
2246
|
-
|
|
2247
|
-
var
|
|
1653
|
+
Xe.displayName = no;
|
|
1654
|
+
var ao = ce + "Slot", Ze = ({
|
|
2248
1655
|
__scopePasswordToggleField: e,
|
|
2249
|
-
...
|
|
1656
|
+
...r
|
|
2250
1657
|
}) => {
|
|
2251
|
-
const { visible:
|
|
2252
|
-
|
|
1658
|
+
const { visible: t } = Oe(
|
|
1659
|
+
ao,
|
|
2253
1660
|
e
|
|
2254
1661
|
);
|
|
2255
|
-
return "render" in
|
|
1662
|
+
return "render" in r ? (
|
|
2256
1663
|
//
|
|
2257
|
-
|
|
2258
|
-
) :
|
|
1664
|
+
r.render({ visible: t })
|
|
1665
|
+
) : t ? r.visible : r.hidden;
|
|
2259
1666
|
};
|
|
2260
|
-
|
|
2261
|
-
var
|
|
1667
|
+
Ze.displayName = ao;
|
|
1668
|
+
var so = ce + "Icon", Je = a.forwardRef(
|
|
2262
1669
|
({
|
|
2263
1670
|
__scopePasswordToggleField: e,
|
|
2264
1671
|
// @ts-expect-error
|
|
2265
|
-
children:
|
|
2266
|
-
...
|
|
2267
|
-
},
|
|
2268
|
-
const { visible: n } =
|
|
2269
|
-
|
|
1672
|
+
children: r,
|
|
1673
|
+
...t
|
|
1674
|
+
}, o) => {
|
|
1675
|
+
const { visible: n } = Oe(
|
|
1676
|
+
so,
|
|
2270
1677
|
e
|
|
2271
|
-
), { visible: s, hidden:
|
|
2272
|
-
return /* @__PURE__ */ i(
|
|
1678
|
+
), { visible: s, hidden: u, ...c } = t;
|
|
1679
|
+
return /* @__PURE__ */ i(D.svg, { ...c, ref: o, "aria-hidden": !0, asChild: !0, children: n ? s : u });
|
|
2273
1680
|
}
|
|
2274
1681
|
);
|
|
2275
|
-
|
|
2276
|
-
function
|
|
1682
|
+
Je.displayName = so;
|
|
1683
|
+
function Ra(e, r, t) {
|
|
2277
1684
|
if (e.requestIdleCallback) {
|
|
2278
|
-
const s = e.requestIdleCallback(
|
|
1685
|
+
const s = e.requestIdleCallback(r, t);
|
|
2279
1686
|
return () => {
|
|
2280
1687
|
e.cancelIdleCallback(s);
|
|
2281
1688
|
};
|
|
2282
1689
|
}
|
|
2283
|
-
const
|
|
2284
|
-
|
|
1690
|
+
const o = Date.now(), n = e.setTimeout(() => {
|
|
1691
|
+
r({ didTimeout: !1, timeRemaining: () => Math.max(0, 50 - (Date.now() - o)) });
|
|
2285
1692
|
}, 1);
|
|
2286
1693
|
return () => {
|
|
2287
1694
|
e.clearTimeout(n);
|
|
2288
1695
|
};
|
|
2289
1696
|
}
|
|
2290
|
-
const
|
|
1697
|
+
const ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2291
1698
|
__proto__: null,
|
|
2292
|
-
Icon:
|
|
2293
|
-
Input:
|
|
2294
|
-
PasswordToggleField:
|
|
2295
|
-
PasswordToggleFieldIcon:
|
|
2296
|
-
PasswordToggleFieldInput:
|
|
2297
|
-
PasswordToggleFieldSlot:
|
|
2298
|
-
PasswordToggleFieldToggle:
|
|
2299
|
-
Root:
|
|
2300
|
-
Slot:
|
|
2301
|
-
Toggle:
|
|
1699
|
+
Icon: Je,
|
|
1700
|
+
Input: Ye,
|
|
1701
|
+
PasswordToggleField: qe,
|
|
1702
|
+
PasswordToggleFieldIcon: Je,
|
|
1703
|
+
PasswordToggleFieldInput: Ye,
|
|
1704
|
+
PasswordToggleFieldSlot: Ze,
|
|
1705
|
+
PasswordToggleFieldToggle: Xe,
|
|
1706
|
+
Root: qe,
|
|
1707
|
+
Slot: Ze,
|
|
1708
|
+
Toggle: Xe
|
|
2302
1709
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
...
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
{
|
|
2319
|
-
"aria-valuemax": l,
|
|
2320
|
-
"aria-valuemin": 0,
|
|
2321
|
-
"aria-valuenow": $e(u) ? u : void 0,
|
|
2322
|
-
"aria-valuetext": d,
|
|
2323
|
-
role: "progressbar",
|
|
2324
|
-
"data-state": nn(u, l),
|
|
2325
|
-
"data-value": u ?? void 0,
|
|
2326
|
-
"data-max": l,
|
|
2327
|
-
...c,
|
|
2328
|
-
ref: t
|
|
2329
|
-
}
|
|
2330
|
-
) });
|
|
2331
|
-
}
|
|
2332
|
-
);
|
|
2333
|
-
Lo.displayName = Oo;
|
|
2334
|
-
var rn = "ProgressIndicator", ko = a.forwardRef(
|
|
2335
|
-
(e, t) => {
|
|
2336
|
-
const { __scopeProgress: o, ...r } = e, n = ai(rn, o);
|
|
2337
|
-
return /* @__PURE__ */ i(
|
|
2338
|
-
O.div,
|
|
2339
|
-
{
|
|
2340
|
-
"data-state": nn(n.value, n.max),
|
|
2341
|
-
"data-value": n.value ?? void 0,
|
|
2342
|
-
"data-max": n.max,
|
|
2343
|
-
...r,
|
|
2344
|
-
ref: t
|
|
2345
|
-
}
|
|
2346
|
-
);
|
|
2347
|
-
}
|
|
2348
|
-
);
|
|
2349
|
-
ko.displayName = rn;
|
|
2350
|
-
function si(e, t) {
|
|
2351
|
-
return `${Math.round(e / t * 100)}%`;
|
|
2352
|
-
}
|
|
2353
|
-
function nn(e, t) {
|
|
2354
|
-
return e == null ? "indeterminate" : e === t ? "complete" : "loading";
|
|
2355
|
-
}
|
|
2356
|
-
function $e(e) {
|
|
2357
|
-
return typeof e == "number";
|
|
2358
|
-
}
|
|
2359
|
-
function gr(e) {
|
|
2360
|
-
return $e(e) && !isNaN(e) && e > 0;
|
|
2361
|
-
}
|
|
2362
|
-
function br(e, t) {
|
|
2363
|
-
return $e(e) && !isNaN(e) && e <= t && e >= 0;
|
|
2364
|
-
}
|
|
2365
|
-
function ii(e, t) {
|
|
2366
|
-
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Do}\`.`;
|
|
2367
|
-
}
|
|
2368
|
-
function ci(e, t) {
|
|
2369
|
-
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2370
|
-
- a positive number
|
|
2371
|
-
- less than the value passed to \`max\` (or ${Do} if no \`max\` prop is set)
|
|
2372
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
2373
|
-
|
|
2374
|
-
Defaulting to \`null\`.`;
|
|
1710
|
+
var _a = "Separator", Mr = "horizontal", Ia = ["horizontal", "vertical"], tr = a.forwardRef((e, r) => {
|
|
1711
|
+
const { decorative: t, orientation: o = Mr, ...n } = e, s = Aa(o) ? o : Mr, c = t ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
1712
|
+
return /* @__PURE__ */ i(
|
|
1713
|
+
D.div,
|
|
1714
|
+
{
|
|
1715
|
+
"data-orientation": s,
|
|
1716
|
+
...c,
|
|
1717
|
+
...n,
|
|
1718
|
+
ref: r
|
|
1719
|
+
}
|
|
1720
|
+
);
|
|
1721
|
+
});
|
|
1722
|
+
tr.displayName = _a;
|
|
1723
|
+
function Aa(e) {
|
|
1724
|
+
return Ia.includes(e);
|
|
2375
1725
|
}
|
|
2376
|
-
var
|
|
2377
|
-
const
|
|
1726
|
+
var io = tr;
|
|
1727
|
+
const Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2378
1728
|
__proto__: null,
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
ProgressIndicator: ko,
|
|
2382
|
-
Root: li,
|
|
2383
|
-
createProgressScope: ri
|
|
1729
|
+
Root: io,
|
|
1730
|
+
Separator: tr
|
|
2384
1731
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2385
|
-
var
|
|
1732
|
+
var rr = "ToastProvider", [or, Sa, xa] = ot("Toast"), [co, Ma] = se("Toast", [xa]), [Pa, De] = co(rr), nr = (e) => {
|
|
2386
1733
|
const {
|
|
2387
|
-
__scopeToast:
|
|
2388
|
-
label:
|
|
2389
|
-
duration:
|
|
1734
|
+
__scopeToast: r,
|
|
1735
|
+
label: t = "Notification",
|
|
1736
|
+
duration: o = 5e3,
|
|
2390
1737
|
swipeDirection: n = "right",
|
|
2391
1738
|
swipeThreshold: s = 50,
|
|
2392
|
-
children:
|
|
2393
|
-
} = e, [
|
|
2394
|
-
return
|
|
2395
|
-
`Invalid prop \`label\` supplied to \`${
|
|
2396
|
-
), /* @__PURE__ */ i(
|
|
2397
|
-
|
|
1739
|
+
children: u
|
|
1740
|
+
} = e, [c, f] = a.useState(null), [d, b] = a.useState(0), w = a.useRef(!1), I = a.useRef(!1);
|
|
1741
|
+
return t.trim() || console.error(
|
|
1742
|
+
`Invalid prop \`label\` supplied to \`${rr}\`. Expected non-empty \`string\`.`
|
|
1743
|
+
), /* @__PURE__ */ i(or.Provider, { scope: r, children: /* @__PURE__ */ i(
|
|
1744
|
+
Pa,
|
|
2398
1745
|
{
|
|
2399
|
-
scope:
|
|
2400
|
-
label:
|
|
2401
|
-
duration:
|
|
1746
|
+
scope: r,
|
|
1747
|
+
label: t,
|
|
1748
|
+
duration: o,
|
|
2402
1749
|
swipeDirection: n,
|
|
2403
1750
|
swipeThreshold: s,
|
|
2404
1751
|
toastCount: d,
|
|
2405
|
-
viewport:
|
|
2406
|
-
onViewportChange:
|
|
2407
|
-
onToastAdd: a.useCallback(() =>
|
|
2408
|
-
onToastRemove: a.useCallback(() =>
|
|
2409
|
-
isFocusedToastEscapeKeyDownRef:
|
|
2410
|
-
isClosePausedRef:
|
|
2411
|
-
children:
|
|
1752
|
+
viewport: c,
|
|
1753
|
+
onViewportChange: f,
|
|
1754
|
+
onToastAdd: a.useCallback(() => b((R) => R + 1), []),
|
|
1755
|
+
onToastRemove: a.useCallback(() => b((R) => R - 1), []),
|
|
1756
|
+
isFocusedToastEscapeKeyDownRef: w,
|
|
1757
|
+
isClosePausedRef: I,
|
|
1758
|
+
children: u
|
|
2412
1759
|
}
|
|
2413
1760
|
) });
|
|
2414
1761
|
};
|
|
2415
|
-
|
|
2416
|
-
var
|
|
2417
|
-
(e,
|
|
1762
|
+
nr.displayName = rr;
|
|
1763
|
+
var lo = "ToastViewport", Fa = ["F8"], Qe = "toast.viewportPause", et = "toast.viewportResume", ar = a.forwardRef(
|
|
1764
|
+
(e, r) => {
|
|
2418
1765
|
const {
|
|
2419
|
-
__scopeToast:
|
|
2420
|
-
hotkey:
|
|
1766
|
+
__scopeToast: t,
|
|
1767
|
+
hotkey: o = Fa,
|
|
2421
1768
|
label: n = "Notifications ({hotkey})",
|
|
2422
1769
|
...s
|
|
2423
|
-
} = e,
|
|
1770
|
+
} = e, u = De(lo, t), c = Sa(t), f = a.useRef(null), d = a.useRef(null), b = a.useRef(null), w = a.useRef(null), I = Y(r, w, u.onViewportChange), R = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = u.toastCount > 0;
|
|
2424
1771
|
a.useEffect(() => {
|
|
2425
|
-
const
|
|
2426
|
-
var
|
|
2427
|
-
|
|
1772
|
+
const p = (T) => {
|
|
1773
|
+
var h;
|
|
1774
|
+
o.length !== 0 && o.every((S) => T[S] || T.code === S) && ((h = w.current) == null || h.focus());
|
|
2428
1775
|
};
|
|
2429
|
-
return document.addEventListener("keydown",
|
|
2430
|
-
}, [
|
|
2431
|
-
const
|
|
2432
|
-
if (
|
|
2433
|
-
const
|
|
2434
|
-
if (!
|
|
2435
|
-
const
|
|
2436
|
-
|
|
1776
|
+
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
1777
|
+
}, [o]), a.useEffect(() => {
|
|
1778
|
+
const p = f.current, T = w.current;
|
|
1779
|
+
if (_ && p && T) {
|
|
1780
|
+
const l = () => {
|
|
1781
|
+
if (!u.isClosePausedRef.current) {
|
|
1782
|
+
const x = new CustomEvent(Qe);
|
|
1783
|
+
T.dispatchEvent(x), u.isClosePausedRef.current = !0;
|
|
2437
1784
|
}
|
|
2438
|
-
},
|
|
2439
|
-
if (
|
|
2440
|
-
const
|
|
2441
|
-
|
|
1785
|
+
}, h = () => {
|
|
1786
|
+
if (u.isClosePausedRef.current) {
|
|
1787
|
+
const x = new CustomEvent(et);
|
|
1788
|
+
T.dispatchEvent(x), u.isClosePausedRef.current = !1;
|
|
2442
1789
|
}
|
|
2443
|
-
},
|
|
2444
|
-
!
|
|
2445
|
-
},
|
|
2446
|
-
|
|
1790
|
+
}, S = (x) => {
|
|
1791
|
+
!p.contains(x.relatedTarget) && h();
|
|
1792
|
+
}, F = () => {
|
|
1793
|
+
p.contains(document.activeElement) || h();
|
|
2447
1794
|
};
|
|
2448
|
-
return
|
|
2449
|
-
|
|
1795
|
+
return p.addEventListener("focusin", l), p.addEventListener("focusout", S), p.addEventListener("pointermove", l), p.addEventListener("pointerleave", F), window.addEventListener("blur", l), window.addEventListener("focus", h), () => {
|
|
1796
|
+
p.removeEventListener("focusin", l), p.removeEventListener("focusout", S), p.removeEventListener("pointermove", l), p.removeEventListener("pointerleave", F), window.removeEventListener("blur", l), window.removeEventListener("focus", h);
|
|
2450
1797
|
};
|
|
2451
1798
|
}
|
|
2452
|
-
}, [
|
|
2453
|
-
const
|
|
2454
|
-
({ tabbingDirection:
|
|
2455
|
-
const
|
|
2456
|
-
const
|
|
2457
|
-
return
|
|
1799
|
+
}, [_, u.isClosePausedRef]);
|
|
1800
|
+
const m = a.useCallback(
|
|
1801
|
+
({ tabbingDirection: p }) => {
|
|
1802
|
+
const l = c().map((h) => {
|
|
1803
|
+
const S = h.ref.current, F = [S, ...za(S)];
|
|
1804
|
+
return p === "forwards" ? F : F.reverse();
|
|
2458
1805
|
});
|
|
2459
|
-
return (
|
|
1806
|
+
return (p === "forwards" ? l.reverse() : l).flat();
|
|
2460
1807
|
},
|
|
2461
|
-
[
|
|
1808
|
+
[c]
|
|
2462
1809
|
);
|
|
2463
1810
|
return a.useEffect(() => {
|
|
2464
|
-
const
|
|
2465
|
-
if (
|
|
2466
|
-
const
|
|
2467
|
-
var
|
|
2468
|
-
const
|
|
2469
|
-
if (
|
|
2470
|
-
const
|
|
2471
|
-
if (
|
|
2472
|
-
(
|
|
1811
|
+
const p = w.current;
|
|
1812
|
+
if (p) {
|
|
1813
|
+
const T = (l) => {
|
|
1814
|
+
var F, x, V;
|
|
1815
|
+
const h = l.altKey || l.ctrlKey || l.metaKey;
|
|
1816
|
+
if (l.key === "Tab" && !h) {
|
|
1817
|
+
const N = document.activeElement, M = l.shiftKey;
|
|
1818
|
+
if (l.target === p && M) {
|
|
1819
|
+
(F = d.current) == null || F.focus();
|
|
2473
1820
|
return;
|
|
2474
1821
|
}
|
|
2475
|
-
const
|
|
2476
|
-
|
|
1822
|
+
const y = m({ tabbingDirection: M ? "backwards" : "forwards" }), O = y.findIndex((C) => C === N);
|
|
1823
|
+
$e(y.slice(O + 1)) ? l.preventDefault() : M ? (x = d.current) == null || x.focus() : (V = b.current) == null || V.focus();
|
|
2477
1824
|
}
|
|
2478
1825
|
};
|
|
2479
|
-
return
|
|
1826
|
+
return p.addEventListener("keydown", T), () => p.removeEventListener("keydown", T);
|
|
2480
1827
|
}
|
|
2481
|
-
}, [
|
|
2482
|
-
|
|
1828
|
+
}, [c, m]), /* @__PURE__ */ st(
|
|
1829
|
+
Go,
|
|
2483
1830
|
{
|
|
2484
|
-
ref:
|
|
1831
|
+
ref: f,
|
|
2485
1832
|
role: "region",
|
|
2486
|
-
"aria-label": n.replace("{hotkey}",
|
|
1833
|
+
"aria-label": n.replace("{hotkey}", R),
|
|
2487
1834
|
tabIndex: -1,
|
|
2488
|
-
style: { pointerEvents:
|
|
1835
|
+
style: { pointerEvents: _ ? void 0 : "none" },
|
|
2489
1836
|
children: [
|
|
2490
|
-
|
|
2491
|
-
|
|
1837
|
+
_ && /* @__PURE__ */ i(
|
|
1838
|
+
tt,
|
|
2492
1839
|
{
|
|
2493
1840
|
ref: d,
|
|
2494
1841
|
onFocusFromOutsideViewport: () => {
|
|
2495
|
-
const
|
|
1842
|
+
const p = m({
|
|
2496
1843
|
tabbingDirection: "forwards"
|
|
2497
1844
|
});
|
|
2498
|
-
|
|
1845
|
+
$e(p);
|
|
2499
1846
|
}
|
|
2500
1847
|
}
|
|
2501
1848
|
),
|
|
2502
|
-
/* @__PURE__ */ i(
|
|
2503
|
-
|
|
2504
|
-
|
|
1849
|
+
/* @__PURE__ */ i(or.Slot, { scope: t, children: /* @__PURE__ */ i(D.ol, { tabIndex: -1, ...s, ref: I }) }),
|
|
1850
|
+
_ && /* @__PURE__ */ i(
|
|
1851
|
+
tt,
|
|
2505
1852
|
{
|
|
2506
|
-
ref:
|
|
1853
|
+
ref: b,
|
|
2507
1854
|
onFocusFromOutsideViewport: () => {
|
|
2508
|
-
const
|
|
1855
|
+
const p = m({
|
|
2509
1856
|
tabbingDirection: "backwards"
|
|
2510
1857
|
});
|
|
2511
|
-
|
|
1858
|
+
$e(p);
|
|
2512
1859
|
}
|
|
2513
1860
|
}
|
|
2514
1861
|
)
|
|
@@ -2517,169 +1864,169 @@ var sn = "ToastViewport", mi = ["F8"], wt = "toast.viewportPause", yt = "toast.v
|
|
|
2517
1864
|
);
|
|
2518
1865
|
}
|
|
2519
1866
|
);
|
|
2520
|
-
|
|
2521
|
-
var
|
|
2522
|
-
(e,
|
|
2523
|
-
const { __scopeToast:
|
|
1867
|
+
ar.displayName = lo;
|
|
1868
|
+
var uo = "ToastFocusProxy", tt = a.forwardRef(
|
|
1869
|
+
(e, r) => {
|
|
1870
|
+
const { __scopeToast: t, onFocusFromOutsideViewport: o, ...n } = e, s = De(uo, t);
|
|
2524
1871
|
return /* @__PURE__ */ i(
|
|
2525
|
-
|
|
1872
|
+
Dr,
|
|
2526
1873
|
{
|
|
2527
1874
|
"aria-hidden": !0,
|
|
2528
1875
|
tabIndex: 0,
|
|
2529
1876
|
...n,
|
|
2530
|
-
ref:
|
|
1877
|
+
ref: r,
|
|
2531
1878
|
style: { position: "fixed" },
|
|
2532
|
-
onFocus: (
|
|
1879
|
+
onFocus: (u) => {
|
|
2533
1880
|
var d;
|
|
2534
|
-
const
|
|
2535
|
-
!((d = s.viewport) != null && d.contains(
|
|
1881
|
+
const c = u.relatedTarget;
|
|
1882
|
+
!((d = s.viewport) != null && d.contains(c)) && o();
|
|
2536
1883
|
}
|
|
2537
1884
|
}
|
|
2538
1885
|
);
|
|
2539
1886
|
}
|
|
2540
1887
|
);
|
|
2541
|
-
|
|
2542
|
-
var
|
|
2543
|
-
(e,
|
|
2544
|
-
const { forceMount:
|
|
2545
|
-
prop:
|
|
1888
|
+
tt.displayName = uo;
|
|
1889
|
+
var Te = "Toast", Na = "toast.swipeStart", Oa = "toast.swipeMove", Da = "toast.swipeCancel", La = "toast.swipeEnd", sr = a.forwardRef(
|
|
1890
|
+
(e, r) => {
|
|
1891
|
+
const { forceMount: t, open: o, defaultOpen: n, onOpenChange: s, ...u } = e, [c, f] = ie({
|
|
1892
|
+
prop: o,
|
|
2546
1893
|
defaultProp: n ?? !0,
|
|
2547
1894
|
onChange: s,
|
|
2548
|
-
caller:
|
|
1895
|
+
caller: Te
|
|
2549
1896
|
});
|
|
2550
|
-
return /* @__PURE__ */ i(
|
|
2551
|
-
|
|
1897
|
+
return /* @__PURE__ */ i(Fr, { present: t || c, children: /* @__PURE__ */ i(
|
|
1898
|
+
Ga,
|
|
2552
1899
|
{
|
|
2553
|
-
open:
|
|
2554
|
-
...
|
|
2555
|
-
ref:
|
|
2556
|
-
onClose: () =>
|
|
2557
|
-
onPause:
|
|
2558
|
-
onResume:
|
|
2559
|
-
onSwipeStart:
|
|
1900
|
+
open: c,
|
|
1901
|
+
...u,
|
|
1902
|
+
ref: r,
|
|
1903
|
+
onClose: () => f(!1),
|
|
1904
|
+
onPause: Re(e.onPause),
|
|
1905
|
+
onResume: Re(e.onResume),
|
|
1906
|
+
onSwipeStart: P(e.onSwipeStart, (d) => {
|
|
2560
1907
|
d.currentTarget.setAttribute("data-swipe", "start");
|
|
2561
1908
|
}),
|
|
2562
|
-
onSwipeMove:
|
|
2563
|
-
const { x:
|
|
2564
|
-
d.currentTarget.setAttribute("data-swipe", "move"), d.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${
|
|
1909
|
+
onSwipeMove: P(e.onSwipeMove, (d) => {
|
|
1910
|
+
const { x: b, y: w } = d.detail.delta;
|
|
1911
|
+
d.currentTarget.setAttribute("data-swipe", "move"), d.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${b}px`), d.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${w}px`);
|
|
2565
1912
|
}),
|
|
2566
|
-
onSwipeCancel:
|
|
1913
|
+
onSwipeCancel: P(e.onSwipeCancel, (d) => {
|
|
2567
1914
|
d.currentTarget.setAttribute("data-swipe", "cancel"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
2568
1915
|
}),
|
|
2569
|
-
onSwipeEnd:
|
|
2570
|
-
const { x:
|
|
2571
|
-
d.currentTarget.setAttribute("data-swipe", "end"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), d.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${
|
|
1916
|
+
onSwipeEnd: P(e.onSwipeEnd, (d) => {
|
|
1917
|
+
const { x: b, y: w } = d.detail.delta;
|
|
1918
|
+
d.currentTarget.setAttribute("data-swipe", "end"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), d.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${b}px`), d.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${w}px`), f(!1);
|
|
2572
1919
|
})
|
|
2573
1920
|
}
|
|
2574
1921
|
) });
|
|
2575
1922
|
}
|
|
2576
1923
|
);
|
|
2577
|
-
|
|
2578
|
-
var [
|
|
1924
|
+
sr.displayName = Te;
|
|
1925
|
+
var [ka, Va] = co(Te, {
|
|
2579
1926
|
onClose() {
|
|
2580
1927
|
}
|
|
2581
|
-
}),
|
|
2582
|
-
(e,
|
|
1928
|
+
}), Ga = a.forwardRef(
|
|
1929
|
+
(e, r) => {
|
|
2583
1930
|
const {
|
|
2584
|
-
__scopeToast:
|
|
2585
|
-
type:
|
|
1931
|
+
__scopeToast: t,
|
|
1932
|
+
type: o = "foreground",
|
|
2586
1933
|
duration: n,
|
|
2587
1934
|
open: s,
|
|
2588
|
-
onClose:
|
|
2589
|
-
onEscapeKeyDown:
|
|
2590
|
-
onPause:
|
|
1935
|
+
onClose: u,
|
|
1936
|
+
onEscapeKeyDown: c,
|
|
1937
|
+
onPause: f,
|
|
2591
1938
|
onResume: d,
|
|
2592
|
-
onSwipeStart:
|
|
2593
|
-
onSwipeMove:
|
|
2594
|
-
onSwipeCancel:
|
|
2595
|
-
onSwipeEnd:
|
|
2596
|
-
...
|
|
2597
|
-
} = e,
|
|
2598
|
-
var
|
|
2599
|
-
(
|
|
2600
|
-
}),
|
|
2601
|
-
(
|
|
2602
|
-
!
|
|
1939
|
+
onSwipeStart: b,
|
|
1940
|
+
onSwipeMove: w,
|
|
1941
|
+
onSwipeCancel: I,
|
|
1942
|
+
onSwipeEnd: R,
|
|
1943
|
+
..._
|
|
1944
|
+
} = e, m = De(Te, t), [p, T] = a.useState(null), l = Y(r, (C) => T(C)), h = a.useRef(null), S = a.useRef(null), F = n || m.duration, x = a.useRef(0), V = a.useRef(F), N = a.useRef(0), { onToastAdd: M, onToastRemove: v } = m, g = Re(() => {
|
|
1945
|
+
var L;
|
|
1946
|
+
(p == null ? void 0 : p.contains(document.activeElement)) && ((L = m.viewport) == null || L.focus()), u();
|
|
1947
|
+
}), y = a.useCallback(
|
|
1948
|
+
(C) => {
|
|
1949
|
+
!C || C === 1 / 0 || (window.clearTimeout(N.current), x.current = (/* @__PURE__ */ new Date()).getTime(), N.current = window.setTimeout(g, C));
|
|
2603
1950
|
},
|
|
2604
|
-
[
|
|
1951
|
+
[g]
|
|
2605
1952
|
);
|
|
2606
1953
|
a.useEffect(() => {
|
|
2607
|
-
const
|
|
2608
|
-
if (
|
|
2609
|
-
const
|
|
2610
|
-
|
|
2611
|
-
},
|
|
2612
|
-
const
|
|
2613
|
-
|
|
1954
|
+
const C = m.viewport;
|
|
1955
|
+
if (C) {
|
|
1956
|
+
const L = () => {
|
|
1957
|
+
y(V.current), d == null || d();
|
|
1958
|
+
}, k = () => {
|
|
1959
|
+
const X = (/* @__PURE__ */ new Date()).getTime() - x.current;
|
|
1960
|
+
V.current = V.current - X, window.clearTimeout(N.current), f == null || f();
|
|
2614
1961
|
};
|
|
2615
|
-
return
|
|
2616
|
-
|
|
1962
|
+
return C.addEventListener(Qe, k), C.addEventListener(et, L), () => {
|
|
1963
|
+
C.removeEventListener(Qe, k), C.removeEventListener(et, L);
|
|
2617
1964
|
};
|
|
2618
1965
|
}
|
|
2619
|
-
}, [
|
|
2620
|
-
s && !
|
|
2621
|
-
}, [s,
|
|
2622
|
-
const
|
|
2623
|
-
return
|
|
2624
|
-
|
|
2625
|
-
|
|
1966
|
+
}, [m.viewport, F, f, d, y]), a.useEffect(() => {
|
|
1967
|
+
s && !m.isClosePausedRef.current && y(F);
|
|
1968
|
+
}, [s, F, m.isClosePausedRef, y]), a.useEffect(() => (M(), () => v()), [M, v]);
|
|
1969
|
+
const O = a.useMemo(() => p ? vo(p) : null, [p]);
|
|
1970
|
+
return m.viewport ? /* @__PURE__ */ st(at, { children: [
|
|
1971
|
+
O && /* @__PURE__ */ i(
|
|
1972
|
+
$a,
|
|
2626
1973
|
{
|
|
2627
|
-
__scopeToast:
|
|
1974
|
+
__scopeToast: t,
|
|
2628
1975
|
role: "status",
|
|
2629
|
-
"aria-live":
|
|
1976
|
+
"aria-live": o === "foreground" ? "assertive" : "polite",
|
|
2630
1977
|
"aria-atomic": !0,
|
|
2631
|
-
children:
|
|
1978
|
+
children: O
|
|
2632
1979
|
}
|
|
2633
1980
|
),
|
|
2634
|
-
/* @__PURE__ */ i(
|
|
2635
|
-
/* @__PURE__ */ i(
|
|
2636
|
-
|
|
1981
|
+
/* @__PURE__ */ i(ka, { scope: t, onClose: g, children: zo.createPortal(
|
|
1982
|
+
/* @__PURE__ */ i(or.ItemSlot, { scope: t, children: /* @__PURE__ */ i(
|
|
1983
|
+
$o,
|
|
2637
1984
|
{
|
|
2638
1985
|
asChild: !0,
|
|
2639
|
-
onEscapeKeyDown:
|
|
2640
|
-
|
|
1986
|
+
onEscapeKeyDown: P(c, () => {
|
|
1987
|
+
m.isFocusedToastEscapeKeyDownRef.current || g(), m.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
2641
1988
|
}),
|
|
2642
1989
|
children: /* @__PURE__ */ i(
|
|
2643
|
-
|
|
1990
|
+
D.li,
|
|
2644
1991
|
{
|
|
2645
1992
|
role: "status",
|
|
2646
1993
|
"aria-live": "off",
|
|
2647
1994
|
"aria-atomic": !0,
|
|
2648
1995
|
tabIndex: 0,
|
|
2649
1996
|
"data-state": s ? "open" : "closed",
|
|
2650
|
-
"data-swipe-direction":
|
|
2651
|
-
...
|
|
2652
|
-
ref:
|
|
1997
|
+
"data-swipe-direction": m.swipeDirection,
|
|
1998
|
+
..._,
|
|
1999
|
+
ref: l,
|
|
2653
2000
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
2654
|
-
onKeyDown:
|
|
2655
|
-
|
|
2001
|
+
onKeyDown: P(e.onKeyDown, (C) => {
|
|
2002
|
+
C.key === "Escape" && (c == null || c(C.nativeEvent), C.nativeEvent.defaultPrevented || (m.isFocusedToastEscapeKeyDownRef.current = !0, g()));
|
|
2656
2003
|
}),
|
|
2657
|
-
onPointerDown:
|
|
2658
|
-
|
|
2004
|
+
onPointerDown: P(e.onPointerDown, (C) => {
|
|
2005
|
+
C.button === 0 && (h.current = { x: C.clientX, y: C.clientY });
|
|
2659
2006
|
}),
|
|
2660
|
-
onPointerMove:
|
|
2661
|
-
if (!
|
|
2662
|
-
const
|
|
2663
|
-
|
|
2007
|
+
onPointerMove: P(e.onPointerMove, (C) => {
|
|
2008
|
+
if (!h.current) return;
|
|
2009
|
+
const L = C.clientX - h.current.x, k = C.clientY - h.current.y, X = !!S.current, H = ["left", "right"].includes(m.swipeDirection), Q = ["left", "up"].includes(m.swipeDirection) ? Math.min : Math.max, W = H ? Q(0, L) : 0, pe = H ? 0 : Q(0, k), oe = C.pointerType === "touch" ? 10 : 2, z = { x: W, y: pe }, E = { originalEvent: C, delta: z };
|
|
2010
|
+
X ? (S.current = z, Ee(Oa, w, E, {
|
|
2664
2011
|
discrete: !1
|
|
2665
|
-
})) :
|
|
2012
|
+
})) : Pr(z, m.swipeDirection, oe) ? (S.current = z, Ee(Na, b, E, {
|
|
2666
2013
|
discrete: !1
|
|
2667
|
-
}),
|
|
2014
|
+
}), C.target.setPointerCapture(C.pointerId)) : (Math.abs(L) > oe || Math.abs(k) > oe) && (h.current = null);
|
|
2668
2015
|
}),
|
|
2669
|
-
onPointerUp:
|
|
2670
|
-
const
|
|
2671
|
-
if (
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2016
|
+
onPointerUp: P(e.onPointerUp, (C) => {
|
|
2017
|
+
const L = S.current, k = C.target;
|
|
2018
|
+
if (k.hasPointerCapture(C.pointerId) && k.releasePointerCapture(C.pointerId), S.current = null, h.current = null, L) {
|
|
2019
|
+
const X = C.currentTarget, H = { originalEvent: C, delta: L };
|
|
2020
|
+
Pr(L, m.swipeDirection, m.swipeThreshold) ? Ee(La, R, H, {
|
|
2674
2021
|
discrete: !0
|
|
2675
|
-
}) :
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2022
|
+
}) : Ee(
|
|
2023
|
+
Da,
|
|
2024
|
+
I,
|
|
2025
|
+
H,
|
|
2679
2026
|
{
|
|
2680
2027
|
discrete: !0
|
|
2681
2028
|
}
|
|
2682
|
-
),
|
|
2029
|
+
), X.addEventListener("click", (Q) => Q.preventDefault(), {
|
|
2683
2030
|
once: !0
|
|
2684
2031
|
});
|
|
2685
2032
|
}
|
|
@@ -2688,439 +2035,279 @@ var [Ti, wi] = an(Ne, {
|
|
|
2688
2035
|
)
|
|
2689
2036
|
}
|
|
2690
2037
|
) }),
|
|
2691
|
-
|
|
2038
|
+
m.viewport
|
|
2692
2039
|
) })
|
|
2693
2040
|
] }) : null;
|
|
2694
2041
|
}
|
|
2695
|
-
),
|
|
2696
|
-
const { __scopeToast:
|
|
2697
|
-
return
|
|
2698
|
-
const d = window.setTimeout(() =>
|
|
2042
|
+
), $a = (e) => {
|
|
2043
|
+
const { __scopeToast: r, children: t, ...o } = e, n = De(Te, r), [s, u] = a.useState(!1), [c, f] = a.useState(!1);
|
|
2044
|
+
return ja(() => u(!0)), a.useEffect(() => {
|
|
2045
|
+
const d = window.setTimeout(() => f(!0), 1e3);
|
|
2699
2046
|
return () => window.clearTimeout(d);
|
|
2700
|
-
}, []),
|
|
2047
|
+
}, []), c ? null : /* @__PURE__ */ i(Ko, { asChild: !0, children: /* @__PURE__ */ i(Dr, { ...o, children: s && /* @__PURE__ */ st(at, { children: [
|
|
2701
2048
|
n.label,
|
|
2702
2049
|
" ",
|
|
2703
|
-
|
|
2050
|
+
t
|
|
2704
2051
|
] }) }) });
|
|
2705
|
-
},
|
|
2706
|
-
(e,
|
|
2707
|
-
const { __scopeToast:
|
|
2708
|
-
return /* @__PURE__ */ i(
|
|
2052
|
+
}, Ka = "ToastTitle", ir = a.forwardRef(
|
|
2053
|
+
(e, r) => {
|
|
2054
|
+
const { __scopeToast: t, ...o } = e;
|
|
2055
|
+
return /* @__PURE__ */ i(D.div, { ...o, ref: r });
|
|
2709
2056
|
}
|
|
2710
2057
|
);
|
|
2711
|
-
|
|
2712
|
-
var
|
|
2713
|
-
(e,
|
|
2714
|
-
const { __scopeToast:
|
|
2715
|
-
return /* @__PURE__ */ i(
|
|
2058
|
+
ir.displayName = Ka;
|
|
2059
|
+
var Ba = "ToastDescription", cr = a.forwardRef(
|
|
2060
|
+
(e, r) => {
|
|
2061
|
+
const { __scopeToast: t, ...o } = e;
|
|
2062
|
+
return /* @__PURE__ */ i(D.div, { ...o, ref: r });
|
|
2716
2063
|
}
|
|
2717
2064
|
);
|
|
2718
|
-
|
|
2719
|
-
var
|
|
2720
|
-
(e,
|
|
2721
|
-
const { altText:
|
|
2722
|
-
return
|
|
2723
|
-
`Invalid prop \`altText\` supplied to \`${
|
|
2065
|
+
cr.displayName = Ba;
|
|
2066
|
+
var fo = "ToastAction", lr = a.forwardRef(
|
|
2067
|
+
(e, r) => {
|
|
2068
|
+
const { altText: t, ...o } = e;
|
|
2069
|
+
return t.trim() ? /* @__PURE__ */ i(mo, { altText: t, asChild: !0, children: /* @__PURE__ */ i(Le, { ...o, ref: r }) }) : (console.error(
|
|
2070
|
+
`Invalid prop \`altText\` supplied to \`${fo}\`. Expected non-empty \`string\`.`
|
|
2724
2071
|
), null);
|
|
2725
2072
|
}
|
|
2726
2073
|
);
|
|
2727
|
-
|
|
2728
|
-
var
|
|
2729
|
-
(e,
|
|
2730
|
-
const { __scopeToast:
|
|
2731
|
-
return /* @__PURE__ */ i(
|
|
2732
|
-
|
|
2074
|
+
lr.displayName = fo;
|
|
2075
|
+
var po = "ToastClose", Le = a.forwardRef(
|
|
2076
|
+
(e, r) => {
|
|
2077
|
+
const { __scopeToast: t, ...o } = e, n = Va(po, t);
|
|
2078
|
+
return /* @__PURE__ */ i(mo, { asChild: !0, children: /* @__PURE__ */ i(
|
|
2079
|
+
D.button,
|
|
2733
2080
|
{
|
|
2734
2081
|
type: "button",
|
|
2735
|
-
...
|
|
2736
|
-
ref:
|
|
2737
|
-
onClick:
|
|
2082
|
+
...o,
|
|
2083
|
+
ref: r,
|
|
2084
|
+
onClick: P(e.onClick, n.onClose)
|
|
2738
2085
|
}
|
|
2739
2086
|
) });
|
|
2740
2087
|
}
|
|
2741
2088
|
);
|
|
2742
|
-
|
|
2743
|
-
var
|
|
2744
|
-
const { __scopeToast:
|
|
2089
|
+
Le.displayName = po;
|
|
2090
|
+
var mo = a.forwardRef((e, r) => {
|
|
2091
|
+
const { __scopeToast: t, altText: o, ...n } = e;
|
|
2745
2092
|
return /* @__PURE__ */ i(
|
|
2746
|
-
|
|
2093
|
+
D.div,
|
|
2747
2094
|
{
|
|
2748
2095
|
"data-radix-toast-announce-exclude": "",
|
|
2749
|
-
"data-radix-toast-announce-alt":
|
|
2096
|
+
"data-radix-toast-announce-alt": o || void 0,
|
|
2750
2097
|
...n,
|
|
2751
|
-
ref:
|
|
2098
|
+
ref: r
|
|
2752
2099
|
}
|
|
2753
2100
|
);
|
|
2754
2101
|
});
|
|
2755
|
-
function
|
|
2756
|
-
const
|
|
2757
|
-
return Array.from(e.childNodes).forEach((
|
|
2758
|
-
if (
|
|
2759
|
-
const n =
|
|
2102
|
+
function vo(e) {
|
|
2103
|
+
const r = [];
|
|
2104
|
+
return Array.from(e.childNodes).forEach((o) => {
|
|
2105
|
+
if (o.nodeType === o.TEXT_NODE && o.textContent && r.push(o.textContent), Ha(o)) {
|
|
2106
|
+
const n = o.ariaHidden || o.hidden || o.style.display === "none", s = o.dataset.radixToastAnnounceExclude === "";
|
|
2760
2107
|
if (!n)
|
|
2761
2108
|
if (s) {
|
|
2762
|
-
const
|
|
2763
|
-
|
|
2109
|
+
const u = o.dataset.radixToastAnnounceAlt;
|
|
2110
|
+
u && r.push(u);
|
|
2764
2111
|
} else
|
|
2765
|
-
|
|
2112
|
+
r.push(...vo(o));
|
|
2766
2113
|
}
|
|
2767
|
-
}),
|
|
2114
|
+
}), r;
|
|
2768
2115
|
}
|
|
2769
|
-
function
|
|
2770
|
-
const n =
|
|
2771
|
-
|
|
2116
|
+
function Ee(e, r, t, { discrete: o }) {
|
|
2117
|
+
const n = t.originalEvent.currentTarget, s = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: t });
|
|
2118
|
+
r && n.addEventListener(e, r, { once: !0 }), o ? Bo(n, s) : n.dispatchEvent(s);
|
|
2772
2119
|
}
|
|
2773
|
-
var
|
|
2774
|
-
const
|
|
2775
|
-
return
|
|
2120
|
+
var Pr = (e, r, t = 0) => {
|
|
2121
|
+
const o = Math.abs(e.x), n = Math.abs(e.y), s = o > n;
|
|
2122
|
+
return r === "left" || r === "right" ? s && o > t : !s && n > t;
|
|
2776
2123
|
};
|
|
2777
|
-
function
|
|
2124
|
+
function ja(e = () => {
|
|
2778
2125
|
}) {
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2781
|
-
let
|
|
2782
|
-
return
|
|
2783
|
-
window.cancelAnimationFrame(
|
|
2126
|
+
const r = Re(e);
|
|
2127
|
+
rt(() => {
|
|
2128
|
+
let t = 0, o = 0;
|
|
2129
|
+
return t = window.requestAnimationFrame(() => o = window.requestAnimationFrame(r)), () => {
|
|
2130
|
+
window.cancelAnimationFrame(t), window.cancelAnimationFrame(o);
|
|
2784
2131
|
};
|
|
2785
|
-
}, [
|
|
2132
|
+
}, [r]);
|
|
2786
2133
|
}
|
|
2787
|
-
function
|
|
2134
|
+
function Ha(e) {
|
|
2788
2135
|
return e.nodeType === e.ELEMENT_NODE;
|
|
2789
2136
|
}
|
|
2790
|
-
function
|
|
2791
|
-
const
|
|
2792
|
-
acceptNode: (
|
|
2793
|
-
const n =
|
|
2794
|
-
return
|
|
2137
|
+
function za(e) {
|
|
2138
|
+
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
2139
|
+
acceptNode: (o) => {
|
|
2140
|
+
const n = o.tagName === "INPUT" && o.type === "hidden";
|
|
2141
|
+
return o.disabled || o.hidden || n ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
2795
2142
|
}
|
|
2796
2143
|
});
|
|
2797
|
-
for (;
|
|
2798
|
-
return
|
|
2144
|
+
for (; t.nextNode(); ) r.push(t.currentNode);
|
|
2145
|
+
return r;
|
|
2799
2146
|
}
|
|
2800
|
-
function
|
|
2801
|
-
const
|
|
2802
|
-
return e.some((
|
|
2147
|
+
function $e(e) {
|
|
2148
|
+
const r = document.activeElement;
|
|
2149
|
+
return e.some((t) => t === r ? !0 : (t.focus(), document.activeElement !== r));
|
|
2803
2150
|
}
|
|
2804
|
-
var
|
|
2805
|
-
const
|
|
2806
|
-
__proto__: null,
|
|
2807
|
-
Action: Oi,
|
|
2808
|
-
Close: Di,
|
|
2809
|
-
Description: Fi,
|
|
2810
|
-
Provider: xi,
|
|
2811
|
-
Root: Ai,
|
|
2812
|
-
Title: Ni,
|
|
2813
|
-
Toast: Bo,
|
|
2814
|
-
ToastAction: zo,
|
|
2815
|
-
ToastClose: Xe,
|
|
2816
|
-
ToastDescription: jo,
|
|
2817
|
-
ToastProvider: $o,
|
|
2818
|
-
ToastTitle: Ho,
|
|
2819
|
-
ToastViewport: Ko,
|
|
2820
|
-
Viewport: Si,
|
|
2821
|
-
createToastScope: pi
|
|
2822
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2823
|
-
var pn = "Toggle", Ze = a.forwardRef((e, t) => {
|
|
2824
|
-
const { pressed: o, defaultPressed: r, onPressedChange: n, ...s } = e, [c, l] = X({
|
|
2825
|
-
prop: o,
|
|
2826
|
-
onChange: n,
|
|
2827
|
-
defaultProp: r ?? !1,
|
|
2828
|
-
caller: pn
|
|
2829
|
-
});
|
|
2830
|
-
return /* @__PURE__ */ i(
|
|
2831
|
-
O.button,
|
|
2832
|
-
{
|
|
2833
|
-
type: "button",
|
|
2834
|
-
"aria-pressed": c,
|
|
2835
|
-
"data-state": c ? "on" : "off",
|
|
2836
|
-
"data-disabled": e.disabled ? "" : void 0,
|
|
2837
|
-
...s,
|
|
2838
|
-
ref: t,
|
|
2839
|
-
onClick: A(e.onClick, () => {
|
|
2840
|
-
e.disabled || l(!c);
|
|
2841
|
-
})
|
|
2842
|
-
}
|
|
2843
|
-
);
|
|
2844
|
-
});
|
|
2845
|
-
Ze.displayName = pn;
|
|
2846
|
-
var Li = Ze;
|
|
2847
|
-
const pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2151
|
+
var Ua = nr, Wa = ar, qa = sr, Ya = ir, Xa = cr, Za = lr, Ja = Le;
|
|
2152
|
+
const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2848
2153
|
__proto__: null,
|
|
2849
|
-
|
|
2850
|
-
|
|
2154
|
+
Action: Za,
|
|
2155
|
+
Close: Ja,
|
|
2156
|
+
Description: Xa,
|
|
2157
|
+
Provider: Ua,
|
|
2158
|
+
Root: qa,
|
|
2159
|
+
Title: Ya,
|
|
2160
|
+
Toast: sr,
|
|
2161
|
+
ToastAction: lr,
|
|
2162
|
+
ToastClose: Le,
|
|
2163
|
+
ToastDescription: cr,
|
|
2164
|
+
ToastProvider: nr,
|
|
2165
|
+
ToastTitle: ir,
|
|
2166
|
+
ToastViewport: ar,
|
|
2167
|
+
Viewport: Wa,
|
|
2168
|
+
createToastScope: Ma
|
|
2851
2169
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2852
|
-
var
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
throw new Error(`Missing prop \`type\` expected on \`${fe}\``);
|
|
2861
|
-
});
|
|
2862
|
-
Je.displayName = fe;
|
|
2863
|
-
var [gn, bn] = vn(fe), ki = V.forwardRef((e, t) => {
|
|
2864
|
-
const {
|
|
2865
|
-
value: o,
|
|
2866
|
-
defaultValue: r,
|
|
2867
|
-
onValueChange: n = () => {
|
|
2868
|
-
},
|
|
2869
|
-
...s
|
|
2870
|
-
} = e, [c, l] = X({
|
|
2871
|
-
prop: o,
|
|
2872
|
-
defaultProp: r ?? "",
|
|
2873
|
-
onChange: n,
|
|
2874
|
-
caller: fe
|
|
2875
|
-
});
|
|
2876
|
-
return /* @__PURE__ */ i(
|
|
2877
|
-
gn,
|
|
2878
|
-
{
|
|
2879
|
-
scope: e.__scopeToggleGroup,
|
|
2880
|
-
type: "single",
|
|
2881
|
-
value: V.useMemo(() => c ? [c] : [], [c]),
|
|
2882
|
-
onItemActivate: l,
|
|
2883
|
-
onItemDeactivate: V.useCallback(() => l(""), [l]),
|
|
2884
|
-
children: /* @__PURE__ */ i(Cn, { ...s, ref: t })
|
|
2885
|
-
}
|
|
2886
|
-
);
|
|
2887
|
-
}), Vi = V.forwardRef((e, t) => {
|
|
2888
|
-
const {
|
|
2889
|
-
value: o,
|
|
2890
|
-
defaultValue: r,
|
|
2891
|
-
onValueChange: n = () => {
|
|
2892
|
-
},
|
|
2893
|
-
...s
|
|
2894
|
-
} = e, [c, l] = X({
|
|
2895
|
-
prop: o,
|
|
2896
|
-
defaultProp: r ?? [],
|
|
2897
|
-
onChange: n,
|
|
2898
|
-
caller: fe
|
|
2899
|
-
}), u = V.useCallback(
|
|
2900
|
-
(f) => l((b = []) => [...b, f]),
|
|
2901
|
-
[l]
|
|
2902
|
-
), d = V.useCallback(
|
|
2903
|
-
(f) => l((b = []) => b.filter((w) => w !== f)),
|
|
2904
|
-
[l]
|
|
2905
|
-
);
|
|
2906
|
-
return /* @__PURE__ */ i(
|
|
2907
|
-
gn,
|
|
2908
|
-
{
|
|
2909
|
-
scope: e.__scopeToggleGroup,
|
|
2910
|
-
type: "multiple",
|
|
2911
|
-
value: c,
|
|
2912
|
-
onItemActivate: u,
|
|
2913
|
-
onItemDeactivate: d,
|
|
2914
|
-
children: /* @__PURE__ */ i(Cn, { ...s, ref: t })
|
|
2915
|
-
}
|
|
2916
|
-
);
|
|
2917
|
-
});
|
|
2918
|
-
Je.displayName = fe;
|
|
2919
|
-
var [Gi, $i] = vn(fe), Cn = V.forwardRef(
|
|
2920
|
-
(e, t) => {
|
|
2921
|
-
const {
|
|
2922
|
-
__scopeToggleGroup: o,
|
|
2923
|
-
disabled: r = !1,
|
|
2924
|
-
rovingFocus: n = !0,
|
|
2925
|
-
orientation: s,
|
|
2926
|
-
dir: c,
|
|
2927
|
-
loop: l = !0,
|
|
2928
|
-
...u
|
|
2929
|
-
} = e, d = mn(o), f = he(c), b = { role: "group", dir: f, ...u };
|
|
2930
|
-
return /* @__PURE__ */ i(Gi, { scope: o, rovingFocus: n, disabled: r, children: n ? /* @__PURE__ */ i(
|
|
2931
|
-
Be,
|
|
2170
|
+
var ur = "Toolbar", [Qa, es] = se(ur, [
|
|
2171
|
+
de,
|
|
2172
|
+
Lr
|
|
2173
|
+
]), dr = de(), bo = Lr(), [ts, go] = Qa(ur), fr = a.forwardRef(
|
|
2174
|
+
(e, r) => {
|
|
2175
|
+
const { __scopeToolbar: t, orientation: o = "horizontal", dir: n, loop: s = !0, ...u } = e, c = dr(t), f = Ae(n);
|
|
2176
|
+
return /* @__PURE__ */ i(ts, { scope: t, orientation: o, dir: f, children: /* @__PURE__ */ i(
|
|
2177
|
+
nt,
|
|
2932
2178
|
{
|
|
2933
2179
|
asChild: !0,
|
|
2934
|
-
...
|
|
2935
|
-
orientation:
|
|
2180
|
+
...c,
|
|
2181
|
+
orientation: o,
|
|
2936
2182
|
dir: f,
|
|
2937
|
-
loop: l,
|
|
2938
|
-
children: /* @__PURE__ */ i(O.div, { ...b, ref: t })
|
|
2939
|
-
}
|
|
2940
|
-
) : /* @__PURE__ */ i(O.div, { ...b, ref: t }) });
|
|
2941
|
-
}
|
|
2942
|
-
), Ke = "ToggleGroupItem", Wo = V.forwardRef(
|
|
2943
|
-
(e, t) => {
|
|
2944
|
-
const o = bn(Ke, e.__scopeToggleGroup), r = $i(Ke, e.__scopeToggleGroup), n = mn(e.__scopeToggleGroup), s = o.value.includes(e.value), c = r.disabled || e.disabled, l = { ...e, pressed: s, disabled: c }, u = V.useRef(null);
|
|
2945
|
-
return r.rovingFocus ? /* @__PURE__ */ i(
|
|
2946
|
-
xe,
|
|
2947
|
-
{
|
|
2948
|
-
asChild: !0,
|
|
2949
|
-
...n,
|
|
2950
|
-
focusable: !c,
|
|
2951
|
-
active: s,
|
|
2952
|
-
ref: u,
|
|
2953
|
-
children: /* @__PURE__ */ i(hr, { ...l, ref: t })
|
|
2954
|
-
}
|
|
2955
|
-
) : /* @__PURE__ */ i(hr, { ...l, ref: t });
|
|
2956
|
-
}
|
|
2957
|
-
);
|
|
2958
|
-
Wo.displayName = Ke;
|
|
2959
|
-
var hr = V.forwardRef(
|
|
2960
|
-
(e, t) => {
|
|
2961
|
-
const { __scopeToggleGroup: o, value: r, ...n } = e, s = bn(Ke, o), c = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? c : void 0;
|
|
2962
|
-
return /* @__PURE__ */ i(
|
|
2963
|
-
Ze,
|
|
2964
|
-
{
|
|
2965
|
-
...l,
|
|
2966
|
-
...n,
|
|
2967
|
-
ref: t,
|
|
2968
|
-
onPressedChange: (u) => {
|
|
2969
|
-
u ? s.onItemActivate(r) : s.onItemDeactivate(r);
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
);
|
|
2973
|
-
}
|
|
2974
|
-
), hn = Je, Tn = Wo;
|
|
2975
|
-
const vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2976
|
-
__proto__: null,
|
|
2977
|
-
Item: Tn,
|
|
2978
|
-
Root: hn,
|
|
2979
|
-
ToggleGroup: Je,
|
|
2980
|
-
ToggleGroupItem: Wo,
|
|
2981
|
-
createToggleGroupScope: Uo
|
|
2982
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2983
|
-
var qo = "Toolbar", [Ki, Bi] = oe(qo, [
|
|
2984
|
-
ue,
|
|
2985
|
-
Uo
|
|
2986
|
-
]), Yo = ue(), wn = Uo(), [Hi, yn] = Ki(qo), Xo = a.forwardRef(
|
|
2987
|
-
(e, t) => {
|
|
2988
|
-
const { __scopeToolbar: o, orientation: r = "horizontal", dir: n, loop: s = !0, ...c } = e, l = Yo(o), u = he(n);
|
|
2989
|
-
return /* @__PURE__ */ i(Hi, { scope: o, orientation: r, dir: u, children: /* @__PURE__ */ i(
|
|
2990
|
-
Be,
|
|
2991
|
-
{
|
|
2992
|
-
asChild: !0,
|
|
2993
|
-
...l,
|
|
2994
|
-
orientation: r,
|
|
2995
|
-
dir: u,
|
|
2996
2183
|
loop: s,
|
|
2997
2184
|
children: /* @__PURE__ */ i(
|
|
2998
|
-
|
|
2185
|
+
D.div,
|
|
2999
2186
|
{
|
|
3000
2187
|
role: "toolbar",
|
|
3001
|
-
"aria-orientation":
|
|
3002
|
-
dir:
|
|
3003
|
-
...
|
|
3004
|
-
ref:
|
|
2188
|
+
"aria-orientation": o,
|
|
2189
|
+
dir: f,
|
|
2190
|
+
...u,
|
|
2191
|
+
ref: r
|
|
3005
2192
|
}
|
|
3006
2193
|
)
|
|
3007
2194
|
}
|
|
3008
2195
|
) });
|
|
3009
2196
|
}
|
|
3010
2197
|
);
|
|
3011
|
-
|
|
3012
|
-
var
|
|
3013
|
-
(e,
|
|
3014
|
-
const { __scopeToolbar:
|
|
2198
|
+
fr.displayName = ur;
|
|
2199
|
+
var ho = "ToolbarSeparator", pr = a.forwardRef(
|
|
2200
|
+
(e, r) => {
|
|
2201
|
+
const { __scopeToolbar: t, ...o } = e, n = go(ho, t);
|
|
3015
2202
|
return /* @__PURE__ */ i(
|
|
3016
|
-
|
|
2203
|
+
io,
|
|
3017
2204
|
{
|
|
3018
2205
|
orientation: n.orientation === "horizontal" ? "vertical" : "horizontal",
|
|
3019
|
-
...
|
|
3020
|
-
ref:
|
|
2206
|
+
...o,
|
|
2207
|
+
ref: r
|
|
3021
2208
|
}
|
|
3022
2209
|
);
|
|
3023
2210
|
}
|
|
3024
2211
|
);
|
|
3025
|
-
|
|
3026
|
-
var
|
|
3027
|
-
(e,
|
|
3028
|
-
const { __scopeToolbar:
|
|
3029
|
-
return /* @__PURE__ */ i(
|
|
2212
|
+
pr.displayName = ho;
|
|
2213
|
+
var rs = "ToolbarButton", ke = a.forwardRef(
|
|
2214
|
+
(e, r) => {
|
|
2215
|
+
const { __scopeToolbar: t, ...o } = e, n = dr(t);
|
|
2216
|
+
return /* @__PURE__ */ i(Se, { asChild: !0, ...n, focusable: !e.disabled, children: /* @__PURE__ */ i(D.button, { type: "button", ...o, ref: r }) });
|
|
3030
2217
|
}
|
|
3031
2218
|
);
|
|
3032
|
-
|
|
3033
|
-
var
|
|
3034
|
-
(e,
|
|
3035
|
-
const { __scopeToolbar:
|
|
3036
|
-
return /* @__PURE__ */ i(
|
|
3037
|
-
|
|
2219
|
+
ke.displayName = rs;
|
|
2220
|
+
var os = "ToolbarLink", mr = a.forwardRef(
|
|
2221
|
+
(e, r) => {
|
|
2222
|
+
const { __scopeToolbar: t, ...o } = e, n = dr(t);
|
|
2223
|
+
return /* @__PURE__ */ i(Se, { asChild: !0, ...n, focusable: !0, children: /* @__PURE__ */ i(
|
|
2224
|
+
D.a,
|
|
3038
2225
|
{
|
|
3039
|
-
...
|
|
3040
|
-
ref:
|
|
3041
|
-
onKeyDown:
|
|
2226
|
+
...o,
|
|
2227
|
+
ref: r,
|
|
2228
|
+
onKeyDown: P(e.onKeyDown, (s) => {
|
|
3042
2229
|
s.key === " " && s.currentTarget.click();
|
|
3043
2230
|
})
|
|
3044
2231
|
}
|
|
3045
2232
|
) });
|
|
3046
2233
|
}
|
|
3047
2234
|
);
|
|
3048
|
-
|
|
3049
|
-
var
|
|
3050
|
-
(e,
|
|
3051
|
-
const { __scopeToolbar:
|
|
2235
|
+
mr.displayName = os;
|
|
2236
|
+
var Co = "ToolbarToggleGroup", vr = a.forwardRef(
|
|
2237
|
+
(e, r) => {
|
|
2238
|
+
const { __scopeToolbar: t, ...o } = e, n = go(Co, t), s = bo(t);
|
|
3052
2239
|
return /* @__PURE__ */ i(
|
|
3053
|
-
|
|
2240
|
+
jo,
|
|
3054
2241
|
{
|
|
3055
2242
|
"data-orientation": n.orientation,
|
|
3056
2243
|
dir: n.dir,
|
|
3057
2244
|
...s,
|
|
3058
|
-
...
|
|
3059
|
-
ref:
|
|
2245
|
+
...o,
|
|
2246
|
+
ref: r,
|
|
3060
2247
|
rovingFocus: !1
|
|
3061
2248
|
}
|
|
3062
2249
|
);
|
|
3063
2250
|
}
|
|
3064
2251
|
);
|
|
3065
|
-
|
|
3066
|
-
var
|
|
3067
|
-
(e,
|
|
3068
|
-
const { __scopeToolbar:
|
|
3069
|
-
return /* @__PURE__ */ i(
|
|
2252
|
+
vr.displayName = Co;
|
|
2253
|
+
var ns = "ToolbarToggleItem", br = a.forwardRef(
|
|
2254
|
+
(e, r) => {
|
|
2255
|
+
const { __scopeToolbar: t, ...o } = e, n = bo(t), s = { __scopeToolbar: e.__scopeToolbar };
|
|
2256
|
+
return /* @__PURE__ */ i(ke, { asChild: !0, ...s, children: /* @__PURE__ */ i(Ho, { ...n, ...o, ref: r }) });
|
|
3070
2257
|
}
|
|
3071
2258
|
);
|
|
3072
|
-
|
|
3073
|
-
var
|
|
3074
|
-
const
|
|
2259
|
+
br.displayName = ns;
|
|
2260
|
+
var as = fr, ss = pr, is = ke, cs = mr, ls = vr, us = br;
|
|
2261
|
+
const Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3075
2262
|
__proto__: null,
|
|
3076
|
-
Button:
|
|
3077
|
-
Link:
|
|
3078
|
-
Root:
|
|
3079
|
-
Separator:
|
|
3080
|
-
ToggleGroup:
|
|
3081
|
-
ToggleItem:
|
|
3082
|
-
Toolbar:
|
|
3083
|
-
ToolbarButton:
|
|
3084
|
-
ToolbarLink:
|
|
3085
|
-
ToolbarSeparator:
|
|
3086
|
-
ToolbarToggleGroup:
|
|
3087
|
-
ToolbarToggleItem:
|
|
3088
|
-
createToolbarScope:
|
|
2263
|
+
Button: is,
|
|
2264
|
+
Link: cs,
|
|
2265
|
+
Root: as,
|
|
2266
|
+
Separator: ss,
|
|
2267
|
+
ToggleGroup: ls,
|
|
2268
|
+
ToggleItem: us,
|
|
2269
|
+
Toolbar: fr,
|
|
2270
|
+
ToolbarButton: ke,
|
|
2271
|
+
ToolbarLink: mr,
|
|
2272
|
+
ToolbarSeparator: pr,
|
|
2273
|
+
ToolbarToggleGroup: vr,
|
|
2274
|
+
ToolbarToggleItem: br,
|
|
2275
|
+
createToolbarScope: es
|
|
3089
2276
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3090
2277
|
export {
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
2278
|
+
As as AccessibleIcon,
|
|
2279
|
+
bs as Accordion,
|
|
2280
|
+
Ss as AlertDialog,
|
|
2281
|
+
xs as AspectRatio,
|
|
2282
|
+
Ms as Avatar,
|
|
2283
|
+
Ps as Checkbox,
|
|
2284
|
+
vs as Collapsible,
|
|
2285
|
+
Fs as ContextMenu,
|
|
2286
|
+
Ns as Dialog,
|
|
2287
|
+
Os as Direction,
|
|
2288
|
+
Ds as DropdownMenu,
|
|
2289
|
+
hs as Form,
|
|
2290
|
+
Ls as HoverCard,
|
|
2291
|
+
gs as Label,
|
|
2292
|
+
Cs as Menubar,
|
|
2293
|
+
ks as NavigationMenu,
|
|
2294
|
+
Vs as Popover,
|
|
2295
|
+
Gs as Portal,
|
|
2296
|
+
$s as Progress,
|
|
2297
|
+
Ks as RadioGroup,
|
|
2298
|
+
Bs as ScrollArea,
|
|
2299
|
+
js as Select,
|
|
2300
|
+
Es as Separator,
|
|
2301
|
+
Hs as Slider,
|
|
2302
|
+
zs as Slot,
|
|
2303
|
+
Us as Switch,
|
|
2304
|
+
Ws as Tabs,
|
|
2305
|
+
ws as Toast,
|
|
2306
|
+
qs as Toggle,
|
|
2307
|
+
Ys as ToggleGroup,
|
|
2308
|
+
Rs as Toolbar,
|
|
2309
|
+
Xs as Tooltip,
|
|
2310
|
+
Zs as VisuallyHidden,
|
|
2311
|
+
Ts as unstable_OneTimePasswordField,
|
|
2312
|
+
ys as unstable_PasswordToggleField
|
|
3126
2313
|
};
|