@still-forest/canopy 0.41.1 → 0.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{Switch--oDkbenp.js → Switch-BoWnMtmg.js} +615 -603
- package/dist/forms.d.ts +2 -1
- package/dist/forms.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-B0GD0xBr.js";
|
|
2
|
-
import { e as Q, J as ve, aa as dt, K as te, M as j, U as P, ab as V, G as Me, H as de, ac as yt, B as Ae, Q as Ct, ad as De, L as ue, ae as It, af as Rt, ag as kt, ah as
|
|
2
|
+
import { e as Q, J as ve, aa as dt, K as te, M as j, U as P, ab as V, G as Me, H as de, ac as yt, B as Ae, Q as Ct, ad as De, L as ue, ae as It, af as Rt, ag as kt, ah as ar, b as Oe, c as Pe, ai as Et, aj as sr, ak as ir, al as re, am as cr, an as lr, ao as dr, ap as ur, aq as pr, ar as fr, as as mr, at as hr, au as vr, av as gr, aw as _t, R as xr, P as br, O as Sr, w as wr, ax as Re, ay as yr } from "./sidebar-5TOTH-eb.js";
|
|
3
3
|
import * as c from "react";
|
|
4
|
-
import { useState as ke, useEffect as jt, useRef as
|
|
5
|
-
import { F as pe, G as
|
|
4
|
+
import { useState as ke, useEffect as jt, useRef as Cr, useMemo as Ir, useId as Rr } from "react";
|
|
5
|
+
import { F as pe, G as kr } from "./Layout-CvVv48kM.js";
|
|
6
6
|
import { T as Pt } from "./Heading-DjVutKs1.js";
|
|
7
|
-
import { L as
|
|
8
|
-
import { c as
|
|
7
|
+
import { L as Er } from "./Loader-DW_x9PM7.js";
|
|
8
|
+
import { c as L } from "./index-CRiPKpXj.js";
|
|
9
9
|
import * as Nt from "react-dom";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -13,50 +13,50 @@ import * as Nt from "react-dom";
|
|
|
13
13
|
* This source code is licensed under the ISC license.
|
|
14
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const _r = [
|
|
17
17
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
18
18
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
19
19
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
20
20
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
21
|
-
],
|
|
21
|
+
], jr = Q("calendar", _r);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.544.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const Pr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], ut = Q("check", Pr);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.544.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const Nr = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Tr = Q("chevron-up", Nr);
|
|
36
36
|
/**
|
|
37
37
|
* @license lucide-react v0.544.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const Mr = [
|
|
43
43
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
44
44
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
45
|
-
],
|
|
45
|
+
], Ar = Q("chevrons-up-down", Mr);
|
|
46
46
|
/**
|
|
47
47
|
* @license lucide-react v0.544.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
51
|
*/
|
|
52
|
-
const
|
|
52
|
+
const Dr = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Or = Q("circle", Dr);
|
|
53
53
|
/**
|
|
54
54
|
* @license lucide-react v0.544.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
const
|
|
59
|
+
const Lr = [
|
|
60
60
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
61
61
|
[
|
|
62
62
|
"path",
|
|
@@ -66,7 +66,7 @@ const Or = [
|
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
|
|
69
|
-
],
|
|
69
|
+
], Fr = Q("clipboard-check", Lr);
|
|
70
70
|
/**
|
|
71
71
|
* @license lucide-react v0.544.0 - ISC
|
|
72
72
|
*
|
|
@@ -82,14 +82,14 @@ const Br = [
|
|
|
82
82
|
key: "116196"
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
|
-
],
|
|
85
|
+
], $r = Q("clipboard", Br);
|
|
86
86
|
/**
|
|
87
87
|
* @license lucide-react v0.544.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const Vr = [
|
|
93
93
|
[
|
|
94
94
|
"path",
|
|
95
95
|
{
|
|
@@ -106,14 +106,14 @@ const $r = [
|
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
108
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
109
|
-
],
|
|
109
|
+
], Kr = Q("eye-off", Vr);
|
|
110
110
|
/**
|
|
111
111
|
* @license lucide-react v0.544.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
115
|
*/
|
|
116
|
-
const
|
|
116
|
+
const Hr = [
|
|
117
117
|
[
|
|
118
118
|
"path",
|
|
119
119
|
{
|
|
@@ -122,14 +122,14 @@ const Kr = [
|
|
|
122
122
|
}
|
|
123
123
|
],
|
|
124
124
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
125
|
-
],
|
|
125
|
+
], Ur = Q("eye", Hr);
|
|
126
126
|
/**
|
|
127
127
|
* @license lucide-react v0.544.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
131
|
*/
|
|
132
|
-
const
|
|
132
|
+
const Gr = [
|
|
133
133
|
[
|
|
134
134
|
"path",
|
|
135
135
|
{
|
|
@@ -139,24 +139,24 @@ const Ur = [
|
|
|
139
139
|
],
|
|
140
140
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
141
141
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
142
|
-
],
|
|
142
|
+
], zr = Q("save", Gr);
|
|
143
143
|
/**
|
|
144
144
|
* @license lucide-react v0.544.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
148
|
*/
|
|
149
|
-
const
|
|
149
|
+
const Wr = [
|
|
150
150
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
151
151
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
152
|
-
],
|
|
152
|
+
], qr = Q("search", Wr);
|
|
153
153
|
/**
|
|
154
154
|
* @license lucide-react v0.544.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
158
|
*/
|
|
159
|
-
const
|
|
159
|
+
const Yr = [
|
|
160
160
|
[
|
|
161
161
|
"path",
|
|
162
162
|
{
|
|
@@ -165,28 +165,28 @@ const qr = [
|
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
167
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
168
|
-
], qe = Q("send",
|
|
168
|
+
], qe = Q("send", Yr);
|
|
169
169
|
/**
|
|
170
170
|
* @license lucide-react v0.544.0 - ISC
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
174
|
*/
|
|
175
|
-
const
|
|
175
|
+
const Xr = [
|
|
176
176
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
177
177
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
178
178
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
179
179
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
180
180
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
181
|
-
],
|
|
182
|
-
var Ye = "rovingFocusGroup.onEntryFocus",
|
|
181
|
+
], Zr = Q("trash-2", Xr);
|
|
182
|
+
var Ye = "rovingFocusGroup.onEntryFocus", Jr = { bubbles: !1, cancelable: !0 }, Ee = "RovingFocusGroup", [Qe, Tt, Qr] = dt(Ee), [eo, Mt] = ve(
|
|
183
183
|
Ee,
|
|
184
|
-
[
|
|
185
|
-
), [
|
|
186
|
-
(e, n) => /* @__PURE__ */ a.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(
|
|
184
|
+
[Qr]
|
|
185
|
+
), [to, no] = eo(Ee), At = c.forwardRef(
|
|
186
|
+
(e, n) => /* @__PURE__ */ a.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(ro, { ...e, ref: n }) }) })
|
|
187
187
|
);
|
|
188
188
|
At.displayName = Ee;
|
|
189
|
-
var
|
|
189
|
+
var ro = c.forwardRef((e, n) => {
|
|
190
190
|
const {
|
|
191
191
|
__scopeRovingFocusGroup: t,
|
|
192
192
|
orientation: o,
|
|
@@ -196,37 +196,37 @@ var no = c.forwardRef((e, n) => {
|
|
|
196
196
|
defaultCurrentTabStopId: l,
|
|
197
197
|
onCurrentTabStopIdChange: d,
|
|
198
198
|
onEntryFocus: u,
|
|
199
|
-
preventScrollOnEntryFocus:
|
|
200
|
-
...
|
|
201
|
-
} = e, g = c.useRef(null), x = V(n, g), S = Me(i), [
|
|
199
|
+
preventScrollOnEntryFocus: f = !1,
|
|
200
|
+
...p
|
|
201
|
+
} = e, g = c.useRef(null), x = V(n, g), S = Me(i), [m, h] = de({
|
|
202
202
|
prop: s,
|
|
203
203
|
defaultProp: l ?? null,
|
|
204
204
|
onChange: d,
|
|
205
205
|
caller: Ee
|
|
206
206
|
}), [b, w] = c.useState(!1), y = yt(u), R = Tt(t), A = c.useRef(!1), [N, _] = c.useState(0);
|
|
207
207
|
return c.useEffect(() => {
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
return
|
|
208
|
+
const F = g.current;
|
|
209
|
+
if (F)
|
|
210
|
+
return F.addEventListener(Ye, y), () => F.removeEventListener(Ye, y);
|
|
211
211
|
}, [y]), /* @__PURE__ */ a.jsx(
|
|
212
|
-
|
|
212
|
+
to,
|
|
213
213
|
{
|
|
214
214
|
scope: t,
|
|
215
215
|
orientation: o,
|
|
216
216
|
dir: S,
|
|
217
217
|
loop: r,
|
|
218
|
-
currentTabStopId:
|
|
218
|
+
currentTabStopId: m,
|
|
219
219
|
onItemFocus: c.useCallback(
|
|
220
|
-
(
|
|
221
|
-
[
|
|
220
|
+
(F) => h(F),
|
|
221
|
+
[h]
|
|
222
222
|
),
|
|
223
223
|
onItemShiftTab: c.useCallback(() => w(!0), []),
|
|
224
224
|
onFocusableItemAdd: c.useCallback(
|
|
225
|
-
() => _((
|
|
225
|
+
() => _((F) => F + 1),
|
|
226
226
|
[]
|
|
227
227
|
),
|
|
228
228
|
onFocusableItemRemove: c.useCallback(
|
|
229
|
-
() => _((
|
|
229
|
+
() => _((F) => F - 1),
|
|
230
230
|
[]
|
|
231
231
|
),
|
|
232
232
|
children: /* @__PURE__ */ a.jsx(
|
|
@@ -234,21 +234,21 @@ var no = c.forwardRef((e, n) => {
|
|
|
234
234
|
{
|
|
235
235
|
tabIndex: b || N === 0 ? -1 : 0,
|
|
236
236
|
"data-orientation": o,
|
|
237
|
-
...
|
|
237
|
+
...p,
|
|
238
238
|
ref: x,
|
|
239
239
|
style: { outline: "none", ...e.style },
|
|
240
240
|
onMouseDown: P(e.onMouseDown, () => {
|
|
241
241
|
A.current = !0;
|
|
242
242
|
}),
|
|
243
|
-
onFocus: P(e.onFocus, (
|
|
243
|
+
onFocus: P(e.onFocus, (F) => {
|
|
244
244
|
const Z = !A.current;
|
|
245
|
-
if (
|
|
246
|
-
const z = new CustomEvent(Ye,
|
|
247
|
-
if (
|
|
248
|
-
const D = R().filter((O) => O.focusable), K = D.find((O) => O.active), X = D.find((O) => O.id ===
|
|
245
|
+
if (F.target === F.currentTarget && Z && !b) {
|
|
246
|
+
const z = new CustomEvent(Ye, Jr);
|
|
247
|
+
if (F.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
|
|
248
|
+
const D = R().filter((O) => O.focusable), K = D.find((O) => O.active), X = D.find((O) => O.id === m), U = [K, X, ...D].filter(
|
|
249
249
|
Boolean
|
|
250
250
|
).map((O) => O.ref.current);
|
|
251
|
-
Lt(U,
|
|
251
|
+
Lt(U, f);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
A.current = !1;
|
|
@@ -267,7 +267,7 @@ var no = c.forwardRef((e, n) => {
|
|
|
267
267
|
tabStopId: i,
|
|
268
268
|
children: s,
|
|
269
269
|
...l
|
|
270
|
-
} = e, d = te(), u = i || d,
|
|
270
|
+
} = e, d = te(), u = i || d, f = no(Dt, t), p = f.currentTabStopId === u, g = Tt(t), { onFocusableItemAdd: x, onFocusableItemRemove: S, currentTabStopId: m } = f;
|
|
271
271
|
return c.useEffect(() => {
|
|
272
272
|
if (o)
|
|
273
273
|
return x(), () => S();
|
|
@@ -281,35 +281,35 @@ var no = c.forwardRef((e, n) => {
|
|
|
281
281
|
children: /* @__PURE__ */ a.jsx(
|
|
282
282
|
j.span,
|
|
283
283
|
{
|
|
284
|
-
tabIndex:
|
|
285
|
-
"data-orientation":
|
|
284
|
+
tabIndex: p ? 0 : -1,
|
|
285
|
+
"data-orientation": f.orientation,
|
|
286
286
|
...l,
|
|
287
287
|
ref: n,
|
|
288
|
-
onMouseDown: P(e.onMouseDown, (
|
|
289
|
-
o ?
|
|
288
|
+
onMouseDown: P(e.onMouseDown, (h) => {
|
|
289
|
+
o ? f.onItemFocus(u) : h.preventDefault();
|
|
290
290
|
}),
|
|
291
|
-
onFocus: P(e.onFocus, () =>
|
|
292
|
-
onKeyDown: P(e.onKeyDown, (
|
|
293
|
-
if (
|
|
294
|
-
|
|
291
|
+
onFocus: P(e.onFocus, () => f.onItemFocus(u)),
|
|
292
|
+
onKeyDown: P(e.onKeyDown, (h) => {
|
|
293
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
294
|
+
f.onItemShiftTab();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
298
|
-
const b =
|
|
297
|
+
if (h.target !== h.currentTarget) return;
|
|
298
|
+
const b = so(h, f.orientation, f.dir);
|
|
299
299
|
if (b !== void 0) {
|
|
300
|
-
if (
|
|
301
|
-
|
|
300
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
301
|
+
h.preventDefault();
|
|
302
302
|
let y = g().filter((R) => R.focusable).map((R) => R.ref.current);
|
|
303
303
|
if (b === "last") y.reverse();
|
|
304
304
|
else if (b === "prev" || b === "next") {
|
|
305
305
|
b === "prev" && y.reverse();
|
|
306
|
-
const R = y.indexOf(
|
|
307
|
-
y =
|
|
306
|
+
const R = y.indexOf(h.currentTarget);
|
|
307
|
+
y = f.loop ? io(y, R + 1) : y.slice(R + 1);
|
|
308
308
|
}
|
|
309
309
|
setTimeout(() => Lt(y));
|
|
310
310
|
}
|
|
311
311
|
}),
|
|
312
|
-
children: typeof s == "function" ? s({ isCurrentTabStop:
|
|
312
|
+
children: typeof s == "function" ? s({ isCurrentTabStop: p, hasTabStop: m != null }) : s
|
|
313
313
|
}
|
|
314
314
|
)
|
|
315
315
|
}
|
|
@@ -317,7 +317,7 @@ var no = c.forwardRef((e, n) => {
|
|
|
317
317
|
}
|
|
318
318
|
);
|
|
319
319
|
Ot.displayName = Dt;
|
|
320
|
-
var
|
|
320
|
+
var oo = {
|
|
321
321
|
ArrowLeft: "prev",
|
|
322
322
|
ArrowUp: "prev",
|
|
323
323
|
ArrowRight: "next",
|
|
@@ -327,28 +327,28 @@ var ro = {
|
|
|
327
327
|
PageDown: "last",
|
|
328
328
|
End: "last"
|
|
329
329
|
};
|
|
330
|
-
function
|
|
330
|
+
function ao(e, n) {
|
|
331
331
|
return n !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
const o =
|
|
333
|
+
function so(e, n, t) {
|
|
334
|
+
const o = ao(e.key, t);
|
|
335
335
|
if (!(n === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(n === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
336
|
-
return
|
|
336
|
+
return oo[o];
|
|
337
337
|
}
|
|
338
338
|
function Lt(e, n = !1) {
|
|
339
339
|
const t = document.activeElement;
|
|
340
340
|
for (const o of e)
|
|
341
341
|
if (o === t || (o.focus({ preventScroll: n }), document.activeElement !== t)) return;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function io(e, n) {
|
|
344
344
|
return e.map((t, o) => e[(n + o) % e.length]);
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
const
|
|
346
|
+
var co = At, lo = Ot;
|
|
347
|
+
const Ps = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.jsx(
|
|
348
348
|
Ae,
|
|
349
349
|
{
|
|
350
350
|
disabled: e,
|
|
351
|
-
icon: /* @__PURE__ */ a.jsx(
|
|
351
|
+
icon: /* @__PURE__ */ a.jsx(Zr, {}),
|
|
352
352
|
onClick: n,
|
|
353
353
|
variant: "outline",
|
|
354
354
|
...t,
|
|
@@ -358,9 +358,9 @@ const _s = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
358
358
|
), gt = {
|
|
359
359
|
default: { label: "Submit", submittingLabel: "Submitting", IconComponent: qe },
|
|
360
360
|
submit: { label: "Submit", submittingLabel: "Submitting", IconComponent: qe },
|
|
361
|
-
save: { label: "Save", submittingLabel: "Saving", IconComponent:
|
|
361
|
+
save: { label: "Save", submittingLabel: "Saving", IconComponent: zr },
|
|
362
362
|
send: { label: "Send", submittingLabel: "Sending", IconComponent: qe }
|
|
363
|
-
},
|
|
363
|
+
}, Ns = ({
|
|
364
364
|
submitting: e = !1,
|
|
365
365
|
disabled: n = !1,
|
|
366
366
|
submittingIcon: t,
|
|
@@ -373,7 +373,7 @@ const _s = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
373
373
|
}) => {
|
|
374
374
|
if (!gt[o])
|
|
375
375
|
throw new Error(`Invalid action: ${o}`);
|
|
376
|
-
const u = gt[o],
|
|
376
|
+
const u = gt[o], f = r || u.label, p = i || u.submittingLabel, g = s || u.IconComponent, x = e ? /* @__PURE__ */ a.jsx(Er, { icon: t }) : /* @__PURE__ */ a.jsx(g, {});
|
|
377
377
|
return /* @__PURE__ */ a.jsx(
|
|
378
378
|
Ae,
|
|
379
379
|
{
|
|
@@ -382,7 +382,7 @@ const _s = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
382
382
|
type: "submit",
|
|
383
383
|
variant: "primary",
|
|
384
384
|
...d,
|
|
385
|
-
children: e ?
|
|
385
|
+
children: e ? p : f
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
};
|
|
@@ -390,8 +390,8 @@ function _e(e) {
|
|
|
390
390
|
const n = c.useRef({ value: e, previous: e });
|
|
391
391
|
return c.useMemo(() => (n.current.value !== e && (n.current.previous = n.current.value, n.current.value = e), n.current.previous), [e]);
|
|
392
392
|
}
|
|
393
|
-
var Le = "Checkbox", [
|
|
394
|
-
function
|
|
393
|
+
var Le = "Checkbox", [uo, Ts] = ve(Le), [po, pt] = uo(Le);
|
|
394
|
+
function fo(e) {
|
|
395
395
|
const {
|
|
396
396
|
__scopeCheckbox: n,
|
|
397
397
|
checked: t,
|
|
@@ -402,15 +402,15 @@ function po(e) {
|
|
|
402
402
|
name: l,
|
|
403
403
|
onCheckedChange: d,
|
|
404
404
|
required: u,
|
|
405
|
-
value:
|
|
405
|
+
value: f = "on",
|
|
406
406
|
// @ts-expect-error
|
|
407
|
-
internal_do_not_use_render:
|
|
407
|
+
internal_do_not_use_render: p
|
|
408
408
|
} = e, [g, x] = de({
|
|
409
409
|
prop: t,
|
|
410
410
|
defaultProp: r ?? !1,
|
|
411
411
|
onChange: d,
|
|
412
412
|
caller: Le
|
|
413
|
-
}), [S,
|
|
413
|
+
}), [S, m] = c.useState(null), [h, b] = c.useState(null), w = c.useRef(!1), y = S ? !!s || !!S.closest("form") : (
|
|
414
414
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
415
415
|
!0
|
|
416
416
|
), R = {
|
|
@@ -418,27 +418,27 @@ function po(e) {
|
|
|
418
418
|
disabled: i,
|
|
419
419
|
setChecked: x,
|
|
420
420
|
control: S,
|
|
421
|
-
setControl:
|
|
421
|
+
setControl: m,
|
|
422
422
|
name: l,
|
|
423
423
|
form: s,
|
|
424
|
-
value:
|
|
424
|
+
value: f,
|
|
425
425
|
hasConsumerStoppedPropagationRef: w,
|
|
426
426
|
required: u,
|
|
427
427
|
defaultChecked: ne(r) ? !1 : r,
|
|
428
428
|
isFormControl: y,
|
|
429
|
-
bubbleInput:
|
|
429
|
+
bubbleInput: h,
|
|
430
430
|
setBubbleInput: b
|
|
431
431
|
};
|
|
432
432
|
return /* @__PURE__ */ a.jsx(
|
|
433
|
-
|
|
433
|
+
po,
|
|
434
434
|
{
|
|
435
435
|
scope: n,
|
|
436
436
|
...R,
|
|
437
|
-
children:
|
|
437
|
+
children: mo(p) ? p(R) : o
|
|
438
438
|
}
|
|
439
439
|
);
|
|
440
440
|
}
|
|
441
|
-
var
|
|
441
|
+
var Ft = "CheckboxTrigger", Bt = c.forwardRef(
|
|
442
442
|
({ __scopeCheckbox: e, onKeyDown: n, onClick: t, ...o }, r) => {
|
|
443
443
|
const {
|
|
444
444
|
control: i,
|
|
@@ -446,19 +446,19 @@ var Bt = "CheckboxTrigger", Ft = c.forwardRef(
|
|
|
446
446
|
disabled: l,
|
|
447
447
|
checked: d,
|
|
448
448
|
required: u,
|
|
449
|
-
setControl:
|
|
450
|
-
setChecked:
|
|
449
|
+
setControl: f,
|
|
450
|
+
setChecked: p,
|
|
451
451
|
hasConsumerStoppedPropagationRef: g,
|
|
452
452
|
isFormControl: x,
|
|
453
453
|
bubbleInput: S
|
|
454
|
-
} = pt(
|
|
454
|
+
} = pt(Ft, e), m = V(r, f), h = c.useRef(d);
|
|
455
455
|
return c.useEffect(() => {
|
|
456
456
|
const b = i?.form;
|
|
457
457
|
if (b) {
|
|
458
|
-
const w = () =>
|
|
458
|
+
const w = () => p(h.current);
|
|
459
459
|
return b.addEventListener("reset", w), () => b.removeEventListener("reset", w);
|
|
460
460
|
}
|
|
461
|
-
}, [i,
|
|
461
|
+
}, [i, p]), /* @__PURE__ */ a.jsx(
|
|
462
462
|
j.button,
|
|
463
463
|
{
|
|
464
464
|
type: "button",
|
|
@@ -470,18 +470,18 @@ var Bt = "CheckboxTrigger", Ft = c.forwardRef(
|
|
|
470
470
|
disabled: l,
|
|
471
471
|
value: s,
|
|
472
472
|
...o,
|
|
473
|
-
ref:
|
|
473
|
+
ref: m,
|
|
474
474
|
onKeyDown: P(n, (b) => {
|
|
475
475
|
b.key === "Enter" && b.preventDefault();
|
|
476
476
|
}),
|
|
477
477
|
onClick: P(t, (b) => {
|
|
478
|
-
|
|
478
|
+
p((w) => ne(w) ? !0 : !w), S && x && (g.current = b.isPropagationStopped(), g.current || b.stopPropagation());
|
|
479
479
|
})
|
|
480
480
|
}
|
|
481
481
|
);
|
|
482
482
|
}
|
|
483
483
|
);
|
|
484
|
-
|
|
484
|
+
Bt.displayName = Ft;
|
|
485
485
|
var $t = c.forwardRef(
|
|
486
486
|
(e, n) => {
|
|
487
487
|
const {
|
|
@@ -493,11 +493,11 @@ var $t = c.forwardRef(
|
|
|
493
493
|
disabled: l,
|
|
494
494
|
value: d,
|
|
495
495
|
onCheckedChange: u,
|
|
496
|
-
form:
|
|
497
|
-
...
|
|
496
|
+
form: f,
|
|
497
|
+
...p
|
|
498
498
|
} = e;
|
|
499
499
|
return /* @__PURE__ */ a.jsx(
|
|
500
|
-
|
|
500
|
+
fo,
|
|
501
501
|
{
|
|
502
502
|
__scopeCheckbox: t,
|
|
503
503
|
checked: r,
|
|
@@ -506,13 +506,13 @@ var $t = c.forwardRef(
|
|
|
506
506
|
required: s,
|
|
507
507
|
onCheckedChange: u,
|
|
508
508
|
name: o,
|
|
509
|
-
form:
|
|
509
|
+
form: f,
|
|
510
510
|
value: d,
|
|
511
511
|
internal_do_not_use_render: ({ isFormControl: g }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
512
512
|
/* @__PURE__ */ a.jsx(
|
|
513
|
-
|
|
513
|
+
Bt,
|
|
514
514
|
{
|
|
515
|
-
...
|
|
515
|
+
...p,
|
|
516
516
|
ref: n,
|
|
517
517
|
__scopeCheckbox: t
|
|
518
518
|
}
|
|
@@ -561,11 +561,11 @@ var Ht = "CheckboxBubbleInput", Ut = c.forwardRef(
|
|
|
561
561
|
required: l,
|
|
562
562
|
disabled: d,
|
|
563
563
|
name: u,
|
|
564
|
-
value:
|
|
565
|
-
form:
|
|
564
|
+
value: f,
|
|
565
|
+
form: p,
|
|
566
566
|
bubbleInput: g,
|
|
567
567
|
setBubbleInput: x
|
|
568
|
-
} = pt(Ht, e), S = V(t, x),
|
|
568
|
+
} = pt(Ht, e), S = V(t, x), m = _e(i), h = De(o);
|
|
569
569
|
c.useEffect(() => {
|
|
570
570
|
const w = g;
|
|
571
571
|
if (!w) return;
|
|
@@ -573,11 +573,11 @@ var Ht = "CheckboxBubbleInput", Ut = c.forwardRef(
|
|
|
573
573
|
y,
|
|
574
574
|
"checked"
|
|
575
575
|
).set, N = !r.current;
|
|
576
|
-
if (
|
|
576
|
+
if (m !== i && A) {
|
|
577
577
|
const _ = new Event("click", { bubbles: N });
|
|
578
578
|
w.indeterminate = ne(i), A.call(w, ne(i) ? !1 : i), w.dispatchEvent(_);
|
|
579
579
|
}
|
|
580
|
-
}, [g,
|
|
580
|
+
}, [g, m, i, r]);
|
|
581
581
|
const b = c.useRef(ne(i) ? !1 : i);
|
|
582
582
|
return /* @__PURE__ */ a.jsx(
|
|
583
583
|
j.input,
|
|
@@ -588,14 +588,14 @@ var Ht = "CheckboxBubbleInput", Ut = c.forwardRef(
|
|
|
588
588
|
required: l,
|
|
589
589
|
disabled: d,
|
|
590
590
|
name: u,
|
|
591
|
-
value:
|
|
592
|
-
form:
|
|
591
|
+
value: f,
|
|
592
|
+
form: p,
|
|
593
593
|
...n,
|
|
594
594
|
tabIndex: -1,
|
|
595
595
|
ref: S,
|
|
596
596
|
style: {
|
|
597
597
|
...n.style,
|
|
598
|
-
...
|
|
598
|
+
...h,
|
|
599
599
|
position: "absolute",
|
|
600
600
|
pointerEvents: "none",
|
|
601
601
|
opacity: 0,
|
|
@@ -610,7 +610,7 @@ var Ht = "CheckboxBubbleInput", Ut = c.forwardRef(
|
|
|
610
610
|
}
|
|
611
611
|
);
|
|
612
612
|
Ut.displayName = Ht;
|
|
613
|
-
function
|
|
613
|
+
function mo(e) {
|
|
614
614
|
return typeof e == "function";
|
|
615
615
|
}
|
|
616
616
|
function ne(e) {
|
|
@@ -619,11 +619,11 @@ function ne(e) {
|
|
|
619
619
|
function Gt(e) {
|
|
620
620
|
return ne(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function ho({ className: e, ...n }) {
|
|
623
623
|
return /* @__PURE__ */ a.jsx(
|
|
624
624
|
$t,
|
|
625
625
|
{
|
|
626
|
-
className:
|
|
626
|
+
className: L(
|
|
627
627
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
628
628
|
e
|
|
629
629
|
),
|
|
@@ -640,7 +640,7 @@ function mo({ className: e, ...n }) {
|
|
|
640
640
|
}
|
|
641
641
|
);
|
|
642
642
|
}
|
|
643
|
-
const
|
|
643
|
+
const Ms = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) => {
|
|
644
644
|
const [i, s] = ke(o);
|
|
645
645
|
jt(() => {
|
|
646
646
|
s(o);
|
|
@@ -648,12 +648,12 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
648
648
|
let l = n;
|
|
649
649
|
const d = t || n;
|
|
650
650
|
t && (l += `[${t}]`);
|
|
651
|
-
const u = (
|
|
652
|
-
s(
|
|
651
|
+
const u = (f) => {
|
|
652
|
+
s(f), r?.(f);
|
|
653
653
|
};
|
|
654
654
|
return /* @__PURE__ */ a.jsxs(pe, { align: "center", gap: "2", children: [
|
|
655
655
|
/* @__PURE__ */ a.jsx(
|
|
656
|
-
|
|
656
|
+
ho,
|
|
657
657
|
{
|
|
658
658
|
checked: i,
|
|
659
659
|
id: l,
|
|
@@ -664,8 +664,8 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
664
664
|
),
|
|
665
665
|
/* @__PURE__ */ a.jsx(ue, { className: "cursor-pointer", htmlFor: l, children: e })
|
|
666
666
|
] });
|
|
667
|
-
},
|
|
668
|
-
const [r, i] = ke(!1), s =
|
|
667
|
+
}, As = ({ content: e, className: n, size: t = "md", ...o }) => {
|
|
668
|
+
const [r, i] = ke(!1), s = Cr(null);
|
|
669
669
|
jt(() => () => {
|
|
670
670
|
s.current && clearTimeout(s.current);
|
|
671
671
|
}, []);
|
|
@@ -682,7 +682,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
682
682
|
return /* @__PURE__ */ a.jsx(
|
|
683
683
|
Ae,
|
|
684
684
|
{
|
|
685
|
-
className:
|
|
685
|
+
className: L(
|
|
686
686
|
{
|
|
687
687
|
"w-[88px]": t === "xs",
|
|
688
688
|
"w-[96px]": t === "sm",
|
|
@@ -694,14 +694,14 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
694
694
|
n
|
|
695
695
|
),
|
|
696
696
|
disabled: r,
|
|
697
|
-
icon: r ? /* @__PURE__ */ a.jsx(
|
|
697
|
+
icon: r ? /* @__PURE__ */ a.jsx(Fr, {}) : /* @__PURE__ */ a.jsx($r, {}),
|
|
698
698
|
label: r ? "Copied" : "Copy",
|
|
699
699
|
onClick: l,
|
|
700
700
|
size: t,
|
|
701
701
|
...o
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
|
-
},
|
|
704
|
+
}, Ds = ({ onDateSelection: e, initialValue: n, className: t, size: o = "default", error: r }) => {
|
|
705
705
|
const [i, s] = ke(n), l = (d) => {
|
|
706
706
|
s(d), d && e(d);
|
|
707
707
|
};
|
|
@@ -710,20 +710,20 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
710
710
|
/* @__PURE__ */ a.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ a.jsxs(
|
|
711
711
|
Ae,
|
|
712
712
|
{
|
|
713
|
-
className:
|
|
713
|
+
className: L("w-[280px] justify-start text-left font-normal", !i && "text-muted-foreground", t),
|
|
714
714
|
size: o,
|
|
715
715
|
variant: "outline",
|
|
716
716
|
children: [
|
|
717
|
-
/* @__PURE__ */ a.jsx(
|
|
717
|
+
/* @__PURE__ */ a.jsx(jr, { className: "mr-2 h-4 w-4" }),
|
|
718
718
|
i ? i.toISOString().split("T")[0] : /* @__PURE__ */ a.jsx("span", { children: "Select a date" })
|
|
719
719
|
]
|
|
720
720
|
}
|
|
721
721
|
) }),
|
|
722
|
-
/* @__PURE__ */ a.jsx(kt, { className: "w-auto p-0", children: /* @__PURE__ */ a.jsx(
|
|
722
|
+
/* @__PURE__ */ a.jsx(kt, { className: "w-auto p-0", children: /* @__PURE__ */ a.jsx(ar, { autoFocus: !0, mode: "single", onSelect: l, selected: i }) })
|
|
723
723
|
] }),
|
|
724
724
|
r && /* @__PURE__ */ a.jsx(Oe, { message: r })
|
|
725
725
|
] });
|
|
726
|
-
},
|
|
726
|
+
}, vo = ({
|
|
727
727
|
label: e,
|
|
728
728
|
labelFor: n,
|
|
729
729
|
className: t = "",
|
|
@@ -732,7 +732,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
732
732
|
}) => /* @__PURE__ */ a.jsxs(pe, { direction: "col", gap: "2", children: [
|
|
733
733
|
e && /* @__PURE__ */ a.jsx(ue, { className: o, htmlFor: n, children: e }),
|
|
734
734
|
/* @__PURE__ */ a.jsx(pe, { className: `rounded-md border border-input bg-card p-2 shadow-xs ${t}`, gapY: "1", children: r })
|
|
735
|
-
] }),
|
|
735
|
+
] }), Os = ({
|
|
736
736
|
name: e,
|
|
737
737
|
size: n = "md",
|
|
738
738
|
label: t,
|
|
@@ -756,7 +756,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
756
756
|
onClick: u,
|
|
757
757
|
size: "xs",
|
|
758
758
|
variant: "ghost",
|
|
759
|
-
children: l ? /* @__PURE__ */ a.jsx(
|
|
759
|
+
children: l ? /* @__PURE__ */ a.jsx(Ur, {}) : /* @__PURE__ */ a.jsx(Kr, {})
|
|
760
760
|
}
|
|
761
761
|
) })
|
|
762
762
|
] }),
|
|
@@ -764,7 +764,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
764
764
|
i && /* @__PURE__ */ a.jsx(Oe, { message: i })
|
|
765
765
|
] });
|
|
766
766
|
};
|
|
767
|
-
var ft = "Radio", [
|
|
767
|
+
var ft = "Radio", [go, zt] = ve(ft), [xo, bo] = go(ft), Wt = c.forwardRef(
|
|
768
768
|
(e, n) => {
|
|
769
769
|
const {
|
|
770
770
|
__scopeRadio: t,
|
|
@@ -775,9 +775,9 @@ var ft = "Radio", [vo, zt] = ve(ft), [go, xo] = vo(ft), Wt = c.forwardRef(
|
|
|
775
775
|
value: l = "on",
|
|
776
776
|
onCheck: d,
|
|
777
777
|
form: u,
|
|
778
|
-
...
|
|
779
|
-
} = e, [
|
|
780
|
-
return /* @__PURE__ */ a.jsxs(
|
|
778
|
+
...f
|
|
779
|
+
} = e, [p, g] = c.useState(null), x = V(n, (h) => g(h)), S = c.useRef(!1), m = p ? u || !!p.closest("form") : !0;
|
|
780
|
+
return /* @__PURE__ */ a.jsxs(xo, { scope: t, checked: r, disabled: s, children: [
|
|
781
781
|
/* @__PURE__ */ a.jsx(
|
|
782
782
|
j.button,
|
|
783
783
|
{
|
|
@@ -788,17 +788,17 @@ var ft = "Radio", [vo, zt] = ve(ft), [go, xo] = vo(ft), Wt = c.forwardRef(
|
|
|
788
788
|
"data-disabled": s ? "" : void 0,
|
|
789
789
|
disabled: s,
|
|
790
790
|
value: l,
|
|
791
|
-
...
|
|
791
|
+
...f,
|
|
792
792
|
ref: x,
|
|
793
|
-
onClick: P(e.onClick, (
|
|
794
|
-
r || d?.(),
|
|
793
|
+
onClick: P(e.onClick, (h) => {
|
|
794
|
+
r || d?.(), m && (S.current = h.isPropagationStopped(), S.current || h.stopPropagation());
|
|
795
795
|
})
|
|
796
796
|
}
|
|
797
797
|
),
|
|
798
|
-
|
|
798
|
+
m && /* @__PURE__ */ a.jsx(
|
|
799
799
|
Xt,
|
|
800
800
|
{
|
|
801
|
-
control:
|
|
801
|
+
control: p,
|
|
802
802
|
bubbles: !S.current,
|
|
803
803
|
name: o,
|
|
804
804
|
value: l,
|
|
@@ -815,7 +815,7 @@ var ft = "Radio", [vo, zt] = ve(ft), [go, xo] = vo(ft), Wt = c.forwardRef(
|
|
|
815
815
|
Wt.displayName = ft;
|
|
816
816
|
var qt = "RadioIndicator", Yt = c.forwardRef(
|
|
817
817
|
(e, n) => {
|
|
818
|
-
const { __scopeRadio: t, forceMount: o, ...r } = e, i =
|
|
818
|
+
const { __scopeRadio: t, forceMount: o, ...r } = e, i = bo(qt, t);
|
|
819
819
|
return /* @__PURE__ */ a.jsx(Ct, { present: o || i.checked, children: /* @__PURE__ */ a.jsx(
|
|
820
820
|
j.span,
|
|
821
821
|
{
|
|
@@ -828,7 +828,7 @@ var qt = "RadioIndicator", Yt = c.forwardRef(
|
|
|
828
828
|
}
|
|
829
829
|
);
|
|
830
830
|
Yt.displayName = qt;
|
|
831
|
-
var
|
|
831
|
+
var So = "RadioBubbleInput", Xt = c.forwardRef(
|
|
832
832
|
({
|
|
833
833
|
__scopeRadio: e,
|
|
834
834
|
control: n,
|
|
@@ -838,15 +838,15 @@ var bo = "RadioBubbleInput", Xt = c.forwardRef(
|
|
|
838
838
|
}, i) => {
|
|
839
839
|
const s = c.useRef(null), l = V(s, i), d = _e(t), u = De(n);
|
|
840
840
|
return c.useEffect(() => {
|
|
841
|
-
const
|
|
842
|
-
if (!
|
|
843
|
-
const
|
|
844
|
-
|
|
841
|
+
const f = s.current;
|
|
842
|
+
if (!f) return;
|
|
843
|
+
const p = window.HTMLInputElement.prototype, x = Object.getOwnPropertyDescriptor(
|
|
844
|
+
p,
|
|
845
845
|
"checked"
|
|
846
846
|
).set;
|
|
847
847
|
if (d !== t && x) {
|
|
848
848
|
const S = new Event("click", { bubbles: o });
|
|
849
|
-
x.call(
|
|
849
|
+
x.call(f, t), f.dispatchEvent(S);
|
|
850
850
|
}
|
|
851
851
|
}, [d, t, o]), /* @__PURE__ */ a.jsx(
|
|
852
852
|
j.input,
|
|
@@ -869,14 +869,14 @@ var bo = "RadioBubbleInput", Xt = c.forwardRef(
|
|
|
869
869
|
);
|
|
870
870
|
}
|
|
871
871
|
);
|
|
872
|
-
Xt.displayName =
|
|
872
|
+
Xt.displayName = So;
|
|
873
873
|
function Zt(e) {
|
|
874
874
|
return e ? "checked" : "unchecked";
|
|
875
875
|
}
|
|
876
|
-
var
|
|
876
|
+
var wo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Fe = "RadioGroup", [yo, Ls] = ve(Fe, [
|
|
877
877
|
Mt,
|
|
878
878
|
zt
|
|
879
|
-
]), Jt = Mt(), Qt = zt(), [
|
|
879
|
+
]), Jt = Mt(), Qt = zt(), [Co, Io] = yo(Fe), en = c.forwardRef(
|
|
880
880
|
(e, n) => {
|
|
881
881
|
const {
|
|
882
882
|
__scopeRadioGroup: t,
|
|
@@ -887,32 +887,32 @@ var So = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup",
|
|
|
887
887
|
disabled: l = !1,
|
|
888
888
|
orientation: d,
|
|
889
889
|
dir: u,
|
|
890
|
-
loop:
|
|
891
|
-
onValueChange:
|
|
890
|
+
loop: f = !0,
|
|
891
|
+
onValueChange: p,
|
|
892
892
|
...g
|
|
893
|
-
} = e, x = Jt(t), S = Me(u), [
|
|
893
|
+
} = e, x = Jt(t), S = Me(u), [m, h] = de({
|
|
894
894
|
prop: i,
|
|
895
895
|
defaultProp: r ?? null,
|
|
896
|
-
onChange:
|
|
897
|
-
caller:
|
|
896
|
+
onChange: p,
|
|
897
|
+
caller: Fe
|
|
898
898
|
});
|
|
899
899
|
return /* @__PURE__ */ a.jsx(
|
|
900
|
-
|
|
900
|
+
Co,
|
|
901
901
|
{
|
|
902
902
|
scope: t,
|
|
903
903
|
name: o,
|
|
904
904
|
required: s,
|
|
905
905
|
disabled: l,
|
|
906
|
-
value:
|
|
907
|
-
onValueChange:
|
|
906
|
+
value: m,
|
|
907
|
+
onValueChange: h,
|
|
908
908
|
children: /* @__PURE__ */ a.jsx(
|
|
909
|
-
|
|
909
|
+
co,
|
|
910
910
|
{
|
|
911
911
|
asChild: !0,
|
|
912
912
|
...x,
|
|
913
913
|
orientation: d,
|
|
914
914
|
dir: S,
|
|
915
|
-
loop:
|
|
915
|
+
loop: f,
|
|
916
916
|
children: /* @__PURE__ */ a.jsx(
|
|
917
917
|
j.div,
|
|
918
918
|
{
|
|
@@ -931,34 +931,34 @@ var So = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup",
|
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
);
|
|
934
|
-
en.displayName =
|
|
934
|
+
en.displayName = Fe;
|
|
935
935
|
var tn = "RadioGroupItem", nn = c.forwardRef(
|
|
936
936
|
(e, n) => {
|
|
937
|
-
const { __scopeRadioGroup: t, disabled: o, ...r } = e, i =
|
|
937
|
+
const { __scopeRadioGroup: t, disabled: o, ...r } = e, i = Io(tn, t), s = i.disabled || o, l = Jt(t), d = Qt(t), u = c.useRef(null), f = V(n, u), p = i.value === r.value, g = c.useRef(!1);
|
|
938
938
|
return c.useEffect(() => {
|
|
939
|
-
const x = (
|
|
940
|
-
|
|
939
|
+
const x = (m) => {
|
|
940
|
+
wo.includes(m.key) && (g.current = !0);
|
|
941
941
|
}, S = () => g.current = !1;
|
|
942
942
|
return document.addEventListener("keydown", x), document.addEventListener("keyup", S), () => {
|
|
943
943
|
document.removeEventListener("keydown", x), document.removeEventListener("keyup", S);
|
|
944
944
|
};
|
|
945
945
|
}, []), /* @__PURE__ */ a.jsx(
|
|
946
|
-
|
|
946
|
+
lo,
|
|
947
947
|
{
|
|
948
948
|
asChild: !0,
|
|
949
949
|
...l,
|
|
950
950
|
focusable: !s,
|
|
951
|
-
active:
|
|
951
|
+
active: p,
|
|
952
952
|
children: /* @__PURE__ */ a.jsx(
|
|
953
953
|
Wt,
|
|
954
954
|
{
|
|
955
955
|
disabled: s,
|
|
956
956
|
required: i.required,
|
|
957
|
-
checked:
|
|
957
|
+
checked: p,
|
|
958
958
|
...d,
|
|
959
959
|
...r,
|
|
960
960
|
name: i.name,
|
|
961
|
-
ref:
|
|
961
|
+
ref: f,
|
|
962
962
|
onCheck: () => i.onValueChange(r.value),
|
|
963
963
|
onKeyDown: P((x) => {
|
|
964
964
|
x.key === "Enter" && x.preventDefault();
|
|
@@ -973,41 +973,41 @@ var tn = "RadioGroupItem", nn = c.forwardRef(
|
|
|
973
973
|
}
|
|
974
974
|
);
|
|
975
975
|
nn.displayName = tn;
|
|
976
|
-
var
|
|
976
|
+
var Ro = "RadioGroupIndicator", rn = c.forwardRef(
|
|
977
977
|
(e, n) => {
|
|
978
978
|
const { __scopeRadioGroup: t, ...o } = e, r = Qt(t);
|
|
979
979
|
return /* @__PURE__ */ a.jsx(Yt, { ...r, ...o, ref: n });
|
|
980
980
|
}
|
|
981
981
|
);
|
|
982
|
-
rn.displayName =
|
|
983
|
-
var
|
|
984
|
-
function _o({ className: e, ...n }) {
|
|
985
|
-
return /* @__PURE__ */ a.jsx(Ro, { className: B("grid gap-3", e), "data-slot": "radio-group", ...n });
|
|
986
|
-
}
|
|
982
|
+
rn.displayName = Ro;
|
|
983
|
+
var ko = en, Eo = nn, _o = rn;
|
|
987
984
|
function jo({ className: e, ...n }) {
|
|
985
|
+
return /* @__PURE__ */ a.jsx(ko, { className: L("grid gap-3", e), "data-slot": "radio-group", ...n });
|
|
986
|
+
}
|
|
987
|
+
function Po({ className: e, ...n }) {
|
|
988
988
|
return /* @__PURE__ */ a.jsx(
|
|
989
|
-
|
|
989
|
+
Eo,
|
|
990
990
|
{
|
|
991
|
-
className:
|
|
991
|
+
className: L(
|
|
992
992
|
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
993
993
|
e
|
|
994
994
|
),
|
|
995
995
|
"data-slot": "radio-group-item",
|
|
996
996
|
...n,
|
|
997
997
|
children: /* @__PURE__ */ a.jsx(
|
|
998
|
-
|
|
998
|
+
_o,
|
|
999
999
|
{
|
|
1000
1000
|
className: "relative flex items-center justify-center",
|
|
1001
1001
|
"data-slot": "radio-group-indicator",
|
|
1002
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1002
|
+
children: /* @__PURE__ */ a.jsx(Or, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
1003
1003
|
}
|
|
1004
1004
|
)
|
|
1005
1005
|
}
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
|
-
const
|
|
1009
|
-
/* @__PURE__ */ a.jsx(
|
|
1010
|
-
/* @__PURE__ */ a.jsx(
|
|
1008
|
+
const Fs = ({ label: e, name: n, options: t, value: o, onChange: r, error: i }) => /* @__PURE__ */ a.jsxs(vo, { className: "flex flex-col gap-4 px-2 py-1", label: e, labelFor: n, children: [
|
|
1009
|
+
/* @__PURE__ */ a.jsx(jo, { className: "w-full", name: n, onValueChange: r, value: o, children: /* @__PURE__ */ a.jsx(kr, { cols: "2", children: t.map((s, l) => /* @__PURE__ */ a.jsxs(pe, { align: "center", gap: "2", justify: "start", children: [
|
|
1010
|
+
/* @__PURE__ */ a.jsx(Po, { id: s.value, value: s.value }),
|
|
1011
1011
|
/* @__PURE__ */ a.jsx(ue, { htmlFor: s.value, children: s.label })
|
|
1012
1012
|
] }, l)) }) }),
|
|
1013
1013
|
i && /* @__PURE__ */ a.jsx(Oe, { message: i })
|
|
@@ -1015,10 +1015,10 @@ const Os = ({ label: e, name: n, options: t, value: o, onChange: r, error: i })
|
|
|
1015
1015
|
function Ne(e, [n, t]) {
|
|
1016
1016
|
return Math.min(t, Math.max(n, e));
|
|
1017
1017
|
}
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1018
|
+
var No = [" ", "Enter", "ArrowUp", "ArrowDown"], To = [" ", "Enter"], fe = "Select", [Be, $e, Mo] = dt(fe), [Se, Bs] = ve(fe, [
|
|
1019
|
+
Mo,
|
|
1020
1020
|
Et
|
|
1021
|
-
]), Ve = Et(), [
|
|
1021
|
+
]), Ve = Et(), [Ao, ae] = Se(fe), [Do, Oo] = Se(fe), on = (e) => {
|
|
1022
1022
|
const {
|
|
1023
1023
|
__scopeSelect: n,
|
|
1024
1024
|
children: t,
|
|
@@ -1029,12 +1029,12 @@ var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Sele
|
|
|
1029
1029
|
defaultValue: l,
|
|
1030
1030
|
onValueChange: d,
|
|
1031
1031
|
dir: u,
|
|
1032
|
-
name:
|
|
1033
|
-
autoComplete:
|
|
1032
|
+
name: f,
|
|
1033
|
+
autoComplete: p,
|
|
1034
1034
|
disabled: g,
|
|
1035
1035
|
required: x,
|
|
1036
1036
|
form: S
|
|
1037
|
-
} = e,
|
|
1037
|
+
} = e, m = Ve(n), [h, b] = c.useState(null), [w, y] = c.useState(null), [R, A] = c.useState(!1), N = Me(u), [_, F] = de({
|
|
1038
1038
|
prop: o,
|
|
1039
1039
|
defaultProp: r ?? !1,
|
|
1040
1040
|
onChange: i,
|
|
@@ -1044,13 +1044,13 @@ var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Sele
|
|
|
1044
1044
|
defaultProp: l,
|
|
1045
1045
|
onChange: d,
|
|
1046
1046
|
caller: fe
|
|
1047
|
-
}), D = c.useRef(null), K =
|
|
1048
|
-
return /* @__PURE__ */ a.jsx(
|
|
1049
|
-
|
|
1047
|
+
}), D = c.useRef(null), K = h ? S || !!h.closest("form") : !0, [X, W] = c.useState(/* @__PURE__ */ new Set()), U = Array.from(X).map((O) => O.props.value).join(";");
|
|
1048
|
+
return /* @__PURE__ */ a.jsx(sr, { ...m, children: /* @__PURE__ */ a.jsxs(
|
|
1049
|
+
Ao,
|
|
1050
1050
|
{
|
|
1051
1051
|
required: x,
|
|
1052
1052
|
scope: n,
|
|
1053
|
-
trigger:
|
|
1053
|
+
trigger: h,
|
|
1054
1054
|
onTriggerChange: b,
|
|
1055
1055
|
valueNode: w,
|
|
1056
1056
|
onValueNodeChange: y,
|
|
@@ -1060,13 +1060,13 @@ var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Sele
|
|
|
1060
1060
|
value: Z,
|
|
1061
1061
|
onValueChange: z,
|
|
1062
1062
|
open: _,
|
|
1063
|
-
onOpenChange:
|
|
1063
|
+
onOpenChange: F,
|
|
1064
1064
|
dir: N,
|
|
1065
1065
|
triggerPointerDownPosRef: D,
|
|
1066
1066
|
disabled: g,
|
|
1067
1067
|
children: [
|
|
1068
|
-
/* @__PURE__ */ a.jsx(
|
|
1069
|
-
|
|
1068
|
+
/* @__PURE__ */ a.jsx(Be.Provider, { scope: n, children: /* @__PURE__ */ a.jsx(
|
|
1069
|
+
Do,
|
|
1070
1070
|
{
|
|
1071
1071
|
scope: e.__scopeSelect,
|
|
1072
1072
|
onNativeOptionAdd: c.useCallback((O) => {
|
|
@@ -1082,13 +1082,13 @@ var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Sele
|
|
|
1082
1082
|
}
|
|
1083
1083
|
) }),
|
|
1084
1084
|
K ? /* @__PURE__ */ a.jsxs(
|
|
1085
|
-
|
|
1085
|
+
_n,
|
|
1086
1086
|
{
|
|
1087
1087
|
"aria-hidden": !0,
|
|
1088
1088
|
required: x,
|
|
1089
1089
|
tabIndex: -1,
|
|
1090
|
-
name:
|
|
1091
|
-
autoComplete:
|
|
1090
|
+
name: f,
|
|
1091
|
+
autoComplete: p,
|
|
1092
1092
|
value: Z,
|
|
1093
1093
|
onChange: (O) => z(O.target.value),
|
|
1094
1094
|
disabled: g,
|
|
@@ -1107,16 +1107,16 @@ var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Sele
|
|
|
1107
1107
|
on.displayName = fe;
|
|
1108
1108
|
var an = "SelectTrigger", sn = c.forwardRef(
|
|
1109
1109
|
(e, n) => {
|
|
1110
|
-
const { __scopeSelect: t, disabled: o = !1, ...r } = e, i = Ve(t), s = ae(an, t), l = s.disabled || o, d = V(n, s.onTriggerChange), u = $e(t),
|
|
1111
|
-
const
|
|
1110
|
+
const { __scopeSelect: t, disabled: o = !1, ...r } = e, i = Ve(t), s = ae(an, t), l = s.disabled || o, d = V(n, s.onTriggerChange), u = $e(t), f = c.useRef("touch"), [p, g, x] = Pn((m) => {
|
|
1111
|
+
const h = u().filter((y) => !y.disabled), b = h.find((y) => y.value === s.value), w = Nn(h, m, b);
|
|
1112
1112
|
w !== void 0 && s.onValueChange(w.value);
|
|
1113
|
-
}), S = (
|
|
1114
|
-
l || (s.onOpenChange(!0), x()),
|
|
1115
|
-
x: Math.round(
|
|
1116
|
-
y: Math.round(
|
|
1113
|
+
}), S = (m) => {
|
|
1114
|
+
l || (s.onOpenChange(!0), x()), m && (s.triggerPointerDownPosRef.current = {
|
|
1115
|
+
x: Math.round(m.pageX),
|
|
1116
|
+
y: Math.round(m.pageY)
|
|
1117
1117
|
});
|
|
1118
1118
|
};
|
|
1119
|
-
return /* @__PURE__ */ a.jsx(
|
|
1119
|
+
return /* @__PURE__ */ a.jsx(ir, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1120
1120
|
j.button,
|
|
1121
1121
|
{
|
|
1122
1122
|
type: "button",
|
|
@@ -1129,20 +1129,20 @@ var an = "SelectTrigger", sn = c.forwardRef(
|
|
|
1129
1129
|
"data-state": s.open ? "open" : "closed",
|
|
1130
1130
|
disabled: l,
|
|
1131
1131
|
"data-disabled": l ? "" : void 0,
|
|
1132
|
-
"data-placeholder":
|
|
1132
|
+
"data-placeholder": jn(s.value) ? "" : void 0,
|
|
1133
1133
|
...r,
|
|
1134
1134
|
ref: d,
|
|
1135
|
-
onClick: P(r.onClick, (
|
|
1136
|
-
|
|
1135
|
+
onClick: P(r.onClick, (m) => {
|
|
1136
|
+
m.currentTarget.focus(), f.current !== "mouse" && S(m);
|
|
1137
1137
|
}),
|
|
1138
|
-
onPointerDown: P(r.onPointerDown, (
|
|
1139
|
-
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1138
|
+
onPointerDown: P(r.onPointerDown, (m) => {
|
|
1139
|
+
f.current = m.pointerType;
|
|
1140
|
+
const h = m.target;
|
|
1141
|
+
h.hasPointerCapture(m.pointerId) && h.releasePointerCapture(m.pointerId), m.button === 0 && m.ctrlKey === !1 && m.pointerType === "mouse" && (S(m), m.preventDefault());
|
|
1142
1142
|
}),
|
|
1143
|
-
onKeyDown: P(r.onKeyDown, (
|
|
1144
|
-
const
|
|
1145
|
-
!(
|
|
1143
|
+
onKeyDown: P(r.onKeyDown, (m) => {
|
|
1144
|
+
const h = p.current !== "";
|
|
1145
|
+
!(m.ctrlKey || m.altKey || m.metaKey) && m.key.length === 1 && g(m.key), !(h && m.key === " ") && No.includes(m.key) && (S(), m.preventDefault());
|
|
1146
1146
|
})
|
|
1147
1147
|
}
|
|
1148
1148
|
) });
|
|
@@ -1151,30 +1151,30 @@ var an = "SelectTrigger", sn = c.forwardRef(
|
|
|
1151
1151
|
sn.displayName = an;
|
|
1152
1152
|
var cn = "SelectValue", ln = c.forwardRef(
|
|
1153
1153
|
(e, n) => {
|
|
1154
|
-
const { __scopeSelect: t, className: o, style: r, children: i, placeholder: s = "", ...l } = e, d = ae(cn, t), { onValueNodeHasChildrenChange: u } = d,
|
|
1154
|
+
const { __scopeSelect: t, className: o, style: r, children: i, placeholder: s = "", ...l } = e, d = ae(cn, t), { onValueNodeHasChildrenChange: u } = d, f = i !== void 0, p = V(n, d.onValueNodeChange);
|
|
1155
1155
|
return re(() => {
|
|
1156
|
-
u(
|
|
1157
|
-
}, [u,
|
|
1156
|
+
u(f);
|
|
1157
|
+
}, [u, f]), /* @__PURE__ */ a.jsx(
|
|
1158
1158
|
j.span,
|
|
1159
1159
|
{
|
|
1160
1160
|
...l,
|
|
1161
|
-
ref:
|
|
1161
|
+
ref: p,
|
|
1162
1162
|
style: { pointerEvents: "none" },
|
|
1163
|
-
children:
|
|
1163
|
+
children: jn(d.value) ? /* @__PURE__ */ a.jsx(a.Fragment, { children: s }) : i
|
|
1164
1164
|
}
|
|
1165
1165
|
);
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
1168
|
ln.displayName = cn;
|
|
1169
|
-
var
|
|
1169
|
+
var Lo = "SelectIcon", dn = c.forwardRef(
|
|
1170
1170
|
(e, n) => {
|
|
1171
1171
|
const { __scopeSelect: t, children: o, ...r } = e;
|
|
1172
1172
|
return /* @__PURE__ */ a.jsx(j.span, { "aria-hidden": !0, ...r, ref: n, children: o || "▼" });
|
|
1173
1173
|
}
|
|
1174
1174
|
);
|
|
1175
|
-
dn.displayName =
|
|
1176
|
-
var
|
|
1177
|
-
un.displayName =
|
|
1175
|
+
dn.displayName = Lo;
|
|
1176
|
+
var Fo = "SelectPortal", un = (e) => /* @__PURE__ */ a.jsx(cr, { asChild: !0, ...e });
|
|
1177
|
+
un.displayName = Fo;
|
|
1178
1178
|
var me = "SelectContent", pn = c.forwardRef(
|
|
1179
1179
|
(e, n) => {
|
|
1180
1180
|
const t = ae(me, e.__scopeSelect), [o, r] = c.useState();
|
|
@@ -1183,7 +1183,7 @@ var me = "SelectContent", pn = c.forwardRef(
|
|
|
1183
1183
|
}, []), !t.open) {
|
|
1184
1184
|
const i = o;
|
|
1185
1185
|
return i ? Nt.createPortal(
|
|
1186
|
-
/* @__PURE__ */ a.jsx(fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ a.jsx(
|
|
1186
|
+
/* @__PURE__ */ a.jsx(fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ a.jsx(Be.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ a.jsx("div", { children: e.children }) }) }),
|
|
1187
1187
|
i
|
|
1188
1188
|
) : null;
|
|
1189
1189
|
}
|
|
@@ -1191,7 +1191,7 @@ var me = "SelectContent", pn = c.forwardRef(
|
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
pn.displayName = me;
|
|
1194
|
-
var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl",
|
|
1194
|
+
var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", $o = fr("SelectContent.RemoveScroll"), mn = c.forwardRef(
|
|
1195
1195
|
(e, n) => {
|
|
1196
1196
|
const {
|
|
1197
1197
|
__scopeSelect: t,
|
|
@@ -1204,31 +1204,31 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1204
1204
|
side: l,
|
|
1205
1205
|
sideOffset: d,
|
|
1206
1206
|
align: u,
|
|
1207
|
-
alignOffset:
|
|
1208
|
-
arrowPadding:
|
|
1207
|
+
alignOffset: f,
|
|
1208
|
+
arrowPadding: p,
|
|
1209
1209
|
collisionBoundary: g,
|
|
1210
1210
|
collisionPadding: x,
|
|
1211
1211
|
sticky: S,
|
|
1212
|
-
hideWhenDetached:
|
|
1213
|
-
avoidCollisions:
|
|
1212
|
+
hideWhenDetached: m,
|
|
1213
|
+
avoidCollisions: h,
|
|
1214
1214
|
//
|
|
1215
1215
|
...b
|
|
1216
|
-
} = e, w = ae(me, t), [y, R] = c.useState(null), [A, N] = c.useState(null), _ = V(n, (C) => R(C)), [
|
|
1216
|
+
} = e, w = ae(me, t), [y, R] = c.useState(null), [A, N] = c.useState(null), _ = V(n, (C) => R(C)), [F, Z] = c.useState(null), [z, D] = c.useState(
|
|
1217
1217
|
null
|
|
1218
1218
|
), K = $e(t), [X, W] = c.useState(!1), U = c.useRef(!1);
|
|
1219
1219
|
c.useEffect(() => {
|
|
1220
|
-
if (y) return
|
|
1221
|
-
}, [y]),
|
|
1220
|
+
if (y) return dr(y);
|
|
1221
|
+
}, [y]), ur();
|
|
1222
1222
|
const O = c.useCallback(
|
|
1223
1223
|
(C) => {
|
|
1224
|
-
const [M, ...
|
|
1224
|
+
const [M, ...B] = K().map((Y) => Y.ref.current), [$] = B.slice(-1), H = document.activeElement;
|
|
1225
1225
|
for (const Y of C)
|
|
1226
1226
|
if (Y === H || (Y?.scrollIntoView({ block: "nearest" }), Y === M && A && (A.scrollTop = 0), Y === $ && A && (A.scrollTop = A.scrollHeight), Y?.focus(), document.activeElement !== H)) return;
|
|
1227
1227
|
},
|
|
1228
1228
|
[K, A]
|
|
1229
1229
|
), G = c.useCallback(
|
|
1230
|
-
() => O([
|
|
1231
|
-
[O,
|
|
1230
|
+
() => O([F, y]),
|
|
1231
|
+
[O, F, y]
|
|
1232
1232
|
);
|
|
1233
1233
|
c.useEffect(() => {
|
|
1234
1234
|
X && G();
|
|
@@ -1242,11 +1242,11 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1242
1242
|
x: Math.abs(Math.round($.pageX) - (J.current?.x ?? 0)),
|
|
1243
1243
|
y: Math.abs(Math.round($.pageY) - (J.current?.y ?? 0))
|
|
1244
1244
|
};
|
|
1245
|
-
},
|
|
1245
|
+
}, B = ($) => {
|
|
1246
1246
|
C.x <= 10 && C.y <= 10 ? $.preventDefault() : y.contains($.target) || q(!1), document.removeEventListener("pointermove", M), J.current = null;
|
|
1247
1247
|
};
|
|
1248
|
-
return J.current !== null && (document.addEventListener("pointermove", M), document.addEventListener("pointerup",
|
|
1249
|
-
document.removeEventListener("pointermove", M), document.removeEventListener("pointerup",
|
|
1248
|
+
return J.current !== null && (document.addEventListener("pointermove", M), document.addEventListener("pointerup", B, { capture: !0, once: !0 })), () => {
|
|
1249
|
+
document.removeEventListener("pointermove", M), document.removeEventListener("pointerup", B, { capture: !0 });
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
1252
|
}, [y, q, J]), c.useEffect(() => {
|
|
@@ -1255,18 +1255,18 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1255
1255
|
window.removeEventListener("blur", C), window.removeEventListener("resize", C);
|
|
1256
1256
|
};
|
|
1257
1257
|
}, [q]);
|
|
1258
|
-
const [ge, ie] =
|
|
1259
|
-
const M = K().filter((H) => !H.disabled),
|
|
1258
|
+
const [ge, ie] = Pn((C) => {
|
|
1259
|
+
const M = K().filter((H) => !H.disabled), B = M.find((H) => H.ref.current === document.activeElement), $ = Nn(M, C, B);
|
|
1260
1260
|
$ && setTimeout(() => $.ref.current.focus());
|
|
1261
1261
|
}), v = c.useCallback(
|
|
1262
|
-
(C, M,
|
|
1263
|
-
const $ = !U.current && !
|
|
1262
|
+
(C, M, B) => {
|
|
1263
|
+
const $ = !U.current && !B;
|
|
1264
1264
|
(w.value !== void 0 && w.value === M || $) && (Z(C), $ && (U.current = !0));
|
|
1265
1265
|
},
|
|
1266
1266
|
[w.value]
|
|
1267
1267
|
), k = c.useCallback(() => y?.focus(), [y]), E = c.useCallback(
|
|
1268
|
-
(C, M,
|
|
1269
|
-
const $ = !U.current && !
|
|
1268
|
+
(C, M, B) => {
|
|
1269
|
+
const $ = !U.current && !B;
|
|
1270
1270
|
(w.value !== void 0 && w.value === M || $) && D(C);
|
|
1271
1271
|
},
|
|
1272
1272
|
[w.value]
|
|
@@ -1274,13 +1274,13 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1274
1274
|
side: l,
|
|
1275
1275
|
sideOffset: d,
|
|
1276
1276
|
align: u,
|
|
1277
|
-
alignOffset:
|
|
1278
|
-
arrowPadding:
|
|
1277
|
+
alignOffset: f,
|
|
1278
|
+
arrowPadding: p,
|
|
1279
1279
|
collisionBoundary: g,
|
|
1280
1280
|
collisionPadding: x,
|
|
1281
1281
|
sticky: S,
|
|
1282
|
-
hideWhenDetached:
|
|
1283
|
-
avoidCollisions:
|
|
1282
|
+
hideWhenDetached: m,
|
|
1283
|
+
avoidCollisions: h
|
|
1284
1284
|
} : {};
|
|
1285
1285
|
return /* @__PURE__ */ a.jsx(
|
|
1286
1286
|
fn,
|
|
@@ -1290,7 +1290,7 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1290
1290
|
viewport: A,
|
|
1291
1291
|
onViewportChange: N,
|
|
1292
1292
|
itemRefCallback: v,
|
|
1293
|
-
selectedItem:
|
|
1293
|
+
selectedItem: F,
|
|
1294
1294
|
onItemLeave: k,
|
|
1295
1295
|
itemTextRefCallback: E,
|
|
1296
1296
|
focusSelectedItem: G,
|
|
@@ -1298,8 +1298,8 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1298
1298
|
position: o,
|
|
1299
1299
|
isPositioned: X,
|
|
1300
1300
|
searchRef: ge,
|
|
1301
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1302
|
-
|
|
1301
|
+
children: /* @__PURE__ */ a.jsx(pr, { as: $o, allowPinchZoom: !0, children: /* @__PURE__ */ a.jsx(
|
|
1302
|
+
mr,
|
|
1303
1303
|
{
|
|
1304
1304
|
asChild: !0,
|
|
1305
1305
|
trapped: w.open,
|
|
@@ -1310,7 +1310,7 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1310
1310
|
w.trigger?.focus({ preventScroll: !0 }), C.preventDefault();
|
|
1311
1311
|
}),
|
|
1312
1312
|
children: /* @__PURE__ */ a.jsx(
|
|
1313
|
-
|
|
1313
|
+
hr,
|
|
1314
1314
|
{
|
|
1315
1315
|
asChild: !0,
|
|
1316
1316
|
disableOutsidePointerEvents: !0,
|
|
@@ -1360,12 +1360,12 @@ var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent
|
|
|
1360
1360
|
}
|
|
1361
1361
|
);
|
|
1362
1362
|
mn.displayName = Bo;
|
|
1363
|
-
var
|
|
1364
|
-
const { __scopeSelect: t, onPlaced: o, ...r } = e, i = ae(me, t), s = se(me, t), [l, d] = c.useState(null), [u,
|
|
1365
|
-
if (i.trigger && i.valueNode && l && u &&
|
|
1366
|
-
const _ = i.trigger.getBoundingClientRect(),
|
|
1363
|
+
var Vo = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
1364
|
+
const { __scopeSelect: t, onPlaced: o, ...r } = e, i = ae(me, t), s = se(me, t), [l, d] = c.useState(null), [u, f] = c.useState(null), p = V(n, (_) => f(_)), g = $e(t), x = c.useRef(!1), S = c.useRef(!0), { viewport: m, selectedItem: h, selectedItemText: b, focusSelectedItem: w } = s, y = c.useCallback(() => {
|
|
1365
|
+
if (i.trigger && i.valueNode && l && u && m && h && b) {
|
|
1366
|
+
const _ = i.trigger.getBoundingClientRect(), F = u.getBoundingClientRect(), Z = i.valueNode.getBoundingClientRect(), z = b.getBoundingClientRect();
|
|
1367
1367
|
if (i.dir !== "rtl") {
|
|
1368
|
-
const H = z.left -
|
|
1368
|
+
const H = z.left - F.left, Y = Z.left - H, ce = _.left - Y, le = _.width + ce, Ge = Math.max(le, F.width), ze = window.innerWidth - ee, We = Ne(Y, [
|
|
1369
1369
|
ee,
|
|
1370
1370
|
// Prevents the content from going off the starting edge of the
|
|
1371
1371
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -1376,31 +1376,31 @@ var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
|
1376
1376
|
]);
|
|
1377
1377
|
l.style.minWidth = le + "px", l.style.left = We + "px";
|
|
1378
1378
|
} else {
|
|
1379
|
-
const H =
|
|
1379
|
+
const H = F.right - z.right, Y = window.innerWidth - Z.right - H, ce = window.innerWidth - _.right - Y, le = _.width + ce, Ge = Math.max(le, F.width), ze = window.innerWidth - ee, We = Ne(Y, [
|
|
1380
1380
|
ee,
|
|
1381
1381
|
Math.max(ee, ze - Ge)
|
|
1382
1382
|
]);
|
|
1383
1383
|
l.style.minWidth = le + "px", l.style.right = We + "px";
|
|
1384
1384
|
}
|
|
1385
|
-
const D = g(), K = window.innerHeight - ee * 2, X =
|
|
1385
|
+
const D = g(), K = window.innerHeight - ee * 2, X = m.scrollHeight, W = window.getComputedStyle(u), U = parseInt(W.borderTopWidth, 10), O = parseInt(W.paddingTop, 10), G = parseInt(W.borderBottomWidth, 10), q = parseInt(W.paddingBottom, 10), J = U + O + X + q + G, ge = Math.min(h.offsetHeight * 5, J), ie = window.getComputedStyle(m), v = parseInt(ie.paddingTop, 10), k = parseInt(ie.paddingBottom, 10), E = _.top + _.height / 2 - ee, I = K - E, T = h.offsetHeight / 2, C = h.offsetTop + T, M = U + O + C, B = J - M;
|
|
1386
1386
|
if (M <= E) {
|
|
1387
|
-
const H = D.length > 0 &&
|
|
1387
|
+
const H = D.length > 0 && h === D[D.length - 1].ref.current;
|
|
1388
1388
|
l.style.bottom = "0px";
|
|
1389
|
-
const Y = u.clientHeight -
|
|
1389
|
+
const Y = u.clientHeight - m.offsetTop - m.offsetHeight, ce = Math.max(
|
|
1390
1390
|
I,
|
|
1391
1391
|
T + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
1392
1392
|
(H ? k : 0) + Y + G
|
|
1393
1393
|
), le = M + ce;
|
|
1394
1394
|
l.style.height = le + "px";
|
|
1395
1395
|
} else {
|
|
1396
|
-
const H = D.length > 0 &&
|
|
1396
|
+
const H = D.length > 0 && h === D[0].ref.current;
|
|
1397
1397
|
l.style.top = "0px";
|
|
1398
1398
|
const ce = Math.max(
|
|
1399
1399
|
E,
|
|
1400
|
-
U +
|
|
1400
|
+
U + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
1401
1401
|
(H ? v : 0) + T
|
|
1402
|
-
) +
|
|
1403
|
-
l.style.height = ce + "px",
|
|
1402
|
+
) + B;
|
|
1403
|
+
l.style.height = ce + "px", m.scrollTop = M - E + m.offsetTop;
|
|
1404
1404
|
}
|
|
1405
1405
|
l.style.margin = `${ee}px 0`, l.style.minHeight = ge + "px", l.style.maxHeight = K + "px", o?.(), requestAnimationFrame(() => x.current = !0);
|
|
1406
1406
|
}
|
|
@@ -1410,8 +1410,8 @@ var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
|
1410
1410
|
i.valueNode,
|
|
1411
1411
|
l,
|
|
1412
1412
|
u,
|
|
1413
|
-
h,
|
|
1414
1413
|
m,
|
|
1414
|
+
h,
|
|
1415
1415
|
b,
|
|
1416
1416
|
i.dir,
|
|
1417
1417
|
o
|
|
@@ -1428,7 +1428,7 @@ var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
|
1428
1428
|
[y, w]
|
|
1429
1429
|
);
|
|
1430
1430
|
return /* @__PURE__ */ a.jsx(
|
|
1431
|
-
|
|
1431
|
+
Ho,
|
|
1432
1432
|
{
|
|
1433
1433
|
scope: t,
|
|
1434
1434
|
contentWrapper: l,
|
|
@@ -1448,7 +1448,7 @@ var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
|
1448
1448
|
j.div,
|
|
1449
1449
|
{
|
|
1450
1450
|
...r,
|
|
1451
|
-
ref:
|
|
1451
|
+
ref: p,
|
|
1452
1452
|
style: {
|
|
1453
1453
|
// When we get the height of the content, it includes borders. If we were to set
|
|
1454
1454
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
@@ -1464,8 +1464,8 @@ var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
1466
|
});
|
|
1467
|
-
hn.displayName =
|
|
1468
|
-
var
|
|
1467
|
+
hn.displayName = Vo;
|
|
1468
|
+
var Ko = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
1469
1469
|
const {
|
|
1470
1470
|
__scopeSelect: t,
|
|
1471
1471
|
align: o = "start",
|
|
@@ -1473,7 +1473,7 @@ var Vo = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
|
1473
1473
|
...i
|
|
1474
1474
|
} = e, s = Ve(t);
|
|
1475
1475
|
return /* @__PURE__ */ a.jsx(
|
|
1476
|
-
|
|
1476
|
+
vr,
|
|
1477
1477
|
{
|
|
1478
1478
|
...s,
|
|
1479
1479
|
...i,
|
|
@@ -1493,8 +1493,8 @@ var Vo = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
);
|
|
1495
1495
|
});
|
|
1496
|
-
et.displayName =
|
|
1497
|
-
var [
|
|
1496
|
+
et.displayName = Ko;
|
|
1497
|
+
var [Ho, mt] = Se(me, {}), tt = "SelectViewport", vn = c.forwardRef(
|
|
1498
1498
|
(e, n) => {
|
|
1499
1499
|
const { __scopeSelect: t, nonce: o, ...r } = e, i = se(tt, t), s = mt(tt, t), l = V(n, i.onViewportChange), d = c.useRef(0);
|
|
1500
1500
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -1507,7 +1507,7 @@ var [Ko, mt] = Se(me, {}), tt = "SelectViewport", vn = c.forwardRef(
|
|
|
1507
1507
|
nonce: o
|
|
1508
1508
|
}
|
|
1509
1509
|
),
|
|
1510
|
-
/* @__PURE__ */ a.jsx(
|
|
1510
|
+
/* @__PURE__ */ a.jsx(Be.Slot, { scope: t, children: /* @__PURE__ */ a.jsx(
|
|
1511
1511
|
j.div,
|
|
1512
1512
|
{
|
|
1513
1513
|
"data-radix-select-viewport": "",
|
|
@@ -1528,18 +1528,18 @@ var [Ko, mt] = Se(me, {}), tt = "SelectViewport", vn = c.forwardRef(
|
|
|
1528
1528
|
...r.style
|
|
1529
1529
|
},
|
|
1530
1530
|
onScroll: P(r.onScroll, (u) => {
|
|
1531
|
-
const
|
|
1532
|
-
if (g?.current &&
|
|
1533
|
-
const x = Math.abs(d.current -
|
|
1531
|
+
const f = u.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: g } = s;
|
|
1532
|
+
if (g?.current && p) {
|
|
1533
|
+
const x = Math.abs(d.current - f.scrollTop);
|
|
1534
1534
|
if (x > 0) {
|
|
1535
|
-
const S = window.innerHeight - ee * 2,
|
|
1535
|
+
const S = window.innerHeight - ee * 2, m = parseFloat(p.style.minHeight), h = parseFloat(p.style.height), b = Math.max(m, h);
|
|
1536
1536
|
if (b < S) {
|
|
1537
1537
|
const w = b + x, y = Math.min(S, w), R = w - y;
|
|
1538
|
-
|
|
1538
|
+
p.style.height = y + "px", p.style.bottom === "0px" && (f.scrollTop = R > 0 ? R : 0, p.style.justifyContent = "flex-end");
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
|
-
d.current =
|
|
1542
|
+
d.current = f.scrollTop;
|
|
1543
1543
|
})
|
|
1544
1544
|
}
|
|
1545
1545
|
) })
|
|
@@ -1547,21 +1547,21 @@ var [Ko, mt] = Se(me, {}), tt = "SelectViewport", vn = c.forwardRef(
|
|
|
1547
1547
|
}
|
|
1548
1548
|
);
|
|
1549
1549
|
vn.displayName = tt;
|
|
1550
|
-
var gn = "SelectGroup", [
|
|
1550
|
+
var gn = "SelectGroup", [Uo, Go] = Se(gn), zo = c.forwardRef(
|
|
1551
1551
|
(e, n) => {
|
|
1552
1552
|
const { __scopeSelect: t, ...o } = e, r = te();
|
|
1553
|
-
return /* @__PURE__ */ a.jsx(
|
|
1553
|
+
return /* @__PURE__ */ a.jsx(Uo, { scope: t, id: r, children: /* @__PURE__ */ a.jsx(j.div, { role: "group", "aria-labelledby": r, ...o, ref: n }) });
|
|
1554
1554
|
}
|
|
1555
1555
|
);
|
|
1556
|
-
|
|
1557
|
-
var xn = "SelectLabel",
|
|
1556
|
+
zo.displayName = gn;
|
|
1557
|
+
var xn = "SelectLabel", Wo = c.forwardRef(
|
|
1558
1558
|
(e, n) => {
|
|
1559
|
-
const { __scopeSelect: t, ...o } = e, r =
|
|
1559
|
+
const { __scopeSelect: t, ...o } = e, r = Go(xn, t);
|
|
1560
1560
|
return /* @__PURE__ */ a.jsx(j.div, { id: r.id, ...o, ref: n });
|
|
1561
1561
|
}
|
|
1562
1562
|
);
|
|
1563
|
-
|
|
1564
|
-
var Te = "SelectItem", [
|
|
1563
|
+
Wo.displayName = xn;
|
|
1564
|
+
var Te = "SelectItem", [qo, bn] = Se(Te), Sn = c.forwardRef(
|
|
1565
1565
|
(e, n) => {
|
|
1566
1566
|
const {
|
|
1567
1567
|
__scopeSelect: t,
|
|
@@ -1569,10 +1569,10 @@ var Te = "SelectItem", [Wo, bn] = Se(Te), Sn = c.forwardRef(
|
|
|
1569
1569
|
disabled: r = !1,
|
|
1570
1570
|
textValue: i,
|
|
1571
1571
|
...s
|
|
1572
|
-
} = e, l = ae(Te, t), d = se(Te, t), u = l.value === o, [
|
|
1572
|
+
} = e, l = ae(Te, t), d = se(Te, t), u = l.value === o, [f, p] = c.useState(i ?? ""), [g, x] = c.useState(!1), S = V(
|
|
1573
1573
|
n,
|
|
1574
1574
|
(w) => d.itemRefCallback?.(w, o, r)
|
|
1575
|
-
),
|
|
1575
|
+
), m = te(), h = c.useRef("touch"), b = () => {
|
|
1576
1576
|
r || (l.onValueChange(o), l.onOpenChange(!1));
|
|
1577
1577
|
};
|
|
1578
1578
|
if (o === "")
|
|
@@ -1580,28 +1580,28 @@ var Te = "SelectItem", [Wo, bn] = Se(Te), Sn = c.forwardRef(
|
|
|
1580
1580
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
1581
1581
|
);
|
|
1582
1582
|
return /* @__PURE__ */ a.jsx(
|
|
1583
|
-
|
|
1583
|
+
qo,
|
|
1584
1584
|
{
|
|
1585
1585
|
scope: t,
|
|
1586
1586
|
value: o,
|
|
1587
1587
|
disabled: r,
|
|
1588
|
-
textId:
|
|
1588
|
+
textId: m,
|
|
1589
1589
|
isSelected: u,
|
|
1590
1590
|
onItemTextChange: c.useCallback((w) => {
|
|
1591
|
-
|
|
1591
|
+
p((y) => y || (w?.textContent ?? "").trim());
|
|
1592
1592
|
}, []),
|
|
1593
1593
|
children: /* @__PURE__ */ a.jsx(
|
|
1594
|
-
|
|
1594
|
+
Be.ItemSlot,
|
|
1595
1595
|
{
|
|
1596
1596
|
scope: t,
|
|
1597
1597
|
value: o,
|
|
1598
1598
|
disabled: r,
|
|
1599
|
-
textValue:
|
|
1599
|
+
textValue: f,
|
|
1600
1600
|
children: /* @__PURE__ */ a.jsx(
|
|
1601
1601
|
j.div,
|
|
1602
1602
|
{
|
|
1603
1603
|
role: "option",
|
|
1604
|
-
"aria-labelledby":
|
|
1604
|
+
"aria-labelledby": m,
|
|
1605
1605
|
"data-highlighted": g ? "" : void 0,
|
|
1606
1606
|
"aria-selected": u && g,
|
|
1607
1607
|
"data-state": u ? "checked" : "unchecked",
|
|
@@ -1613,22 +1613,22 @@ var Te = "SelectItem", [Wo, bn] = Se(Te), Sn = c.forwardRef(
|
|
|
1613
1613
|
onFocus: P(s.onFocus, () => x(!0)),
|
|
1614
1614
|
onBlur: P(s.onBlur, () => x(!1)),
|
|
1615
1615
|
onClick: P(s.onClick, () => {
|
|
1616
|
-
|
|
1616
|
+
h.current !== "mouse" && b();
|
|
1617
1617
|
}),
|
|
1618
1618
|
onPointerUp: P(s.onPointerUp, () => {
|
|
1619
|
-
|
|
1619
|
+
h.current === "mouse" && b();
|
|
1620
1620
|
}),
|
|
1621
1621
|
onPointerDown: P(s.onPointerDown, (w) => {
|
|
1622
|
-
|
|
1622
|
+
h.current = w.pointerType;
|
|
1623
1623
|
}),
|
|
1624
1624
|
onPointerMove: P(s.onPointerMove, (w) => {
|
|
1625
|
-
|
|
1625
|
+
h.current = w.pointerType, r ? d.onItemLeave?.() : h.current === "mouse" && w.currentTarget.focus({ preventScroll: !0 });
|
|
1626
1626
|
}),
|
|
1627
1627
|
onPointerLeave: P(s.onPointerLeave, (w) => {
|
|
1628
1628
|
w.currentTarget === document.activeElement && d.onItemLeave?.();
|
|
1629
1629
|
}),
|
|
1630
1630
|
onKeyDown: P(s.onKeyDown, (w) => {
|
|
1631
|
-
d.searchRef?.current !== "" && w.key === " " || (
|
|
1631
|
+
d.searchRef?.current !== "" && w.key === " " || (To.includes(w.key) && b(), w.key === " " && w.preventDefault());
|
|
1632
1632
|
})
|
|
1633
1633
|
}
|
|
1634
1634
|
)
|
|
@@ -1641,16 +1641,16 @@ var Te = "SelectItem", [Wo, bn] = Se(Te), Sn = c.forwardRef(
|
|
|
1641
1641
|
Sn.displayName = Te;
|
|
1642
1642
|
var Ie = "SelectItemText", wn = c.forwardRef(
|
|
1643
1643
|
(e, n) => {
|
|
1644
|
-
const { __scopeSelect: t, className: o, style: r, ...i } = e, s = ae(Ie, t), l = se(Ie, t), d = bn(Ie, t), u =
|
|
1644
|
+
const { __scopeSelect: t, className: o, style: r, ...i } = e, s = ae(Ie, t), l = se(Ie, t), d = bn(Ie, t), u = Oo(Ie, t), [f, p] = c.useState(null), g = V(
|
|
1645
1645
|
n,
|
|
1646
|
-
(b) =>
|
|
1646
|
+
(b) => p(b),
|
|
1647
1647
|
d.onItemTextChange,
|
|
1648
1648
|
(b) => l.itemTextRefCallback?.(b, d.value, d.disabled)
|
|
1649
|
-
), x =
|
|
1649
|
+
), x = f?.textContent, S = c.useMemo(
|
|
1650
1650
|
() => /* @__PURE__ */ a.jsx("option", { value: d.value, disabled: d.disabled, children: x }, d.value),
|
|
1651
1651
|
[d.disabled, d.value, x]
|
|
1652
|
-
), { onNativeOptionAdd:
|
|
1653
|
-
return re(() => (
|
|
1652
|
+
), { onNativeOptionAdd: m, onNativeOptionRemove: h } = u;
|
|
1653
|
+
return re(() => (m(S), () => h(S)), [m, h, S]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1654
1654
|
/* @__PURE__ */ a.jsx(j.span, { id: d.textId, ...i, ref: g }),
|
|
1655
1655
|
d.isSelected && s.valueNode && !s.valueNodeHasChildren ? Nt.createPortal(i.children, s.valueNode) : null
|
|
1656
1656
|
] });
|
|
@@ -1693,8 +1693,8 @@ var rt = "SelectScrollDownButton", Rn = c.forwardRef((e, n) => {
|
|
|
1693
1693
|
return re(() => {
|
|
1694
1694
|
if (t.viewport && t.isPositioned) {
|
|
1695
1695
|
let l = function() {
|
|
1696
|
-
const u = d.scrollHeight - d.clientHeight,
|
|
1697
|
-
i(
|
|
1696
|
+
const u = d.scrollHeight - d.clientHeight, f = Math.ceil(d.scrollTop) < u;
|
|
1697
|
+
i(f);
|
|
1698
1698
|
};
|
|
1699
1699
|
const d = t.viewport;
|
|
1700
1700
|
return l(), d.addEventListener("scroll", l), () => d.removeEventListener("scroll", l);
|
|
@@ -1717,7 +1717,7 @@ var kn = c.forwardRef((e, n) => {
|
|
|
1717
1717
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
1718
1718
|
}, []);
|
|
1719
1719
|
return c.useEffect(() => () => d(), [d]), re(() => {
|
|
1720
|
-
l().find((
|
|
1720
|
+
l().find((f) => f.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1721
1721
|
}, [l]), /* @__PURE__ */ a.jsx(
|
|
1722
1722
|
j.div,
|
|
1723
1723
|
{
|
|
@@ -1736,50 +1736,50 @@ var kn = c.forwardRef((e, n) => {
|
|
|
1736
1736
|
})
|
|
1737
1737
|
}
|
|
1738
1738
|
);
|
|
1739
|
-
}),
|
|
1739
|
+
}), Yo = "SelectSeparator", En = c.forwardRef(
|
|
1740
1740
|
(e, n) => {
|
|
1741
1741
|
const { __scopeSelect: t, ...o } = e;
|
|
1742
1742
|
return /* @__PURE__ */ a.jsx(j.div, { "aria-hidden": !0, ...o, ref: n });
|
|
1743
1743
|
}
|
|
1744
1744
|
);
|
|
1745
|
-
|
|
1745
|
+
En.displayName = Yo;
|
|
1746
1746
|
var ot = "SelectArrow", Xo = c.forwardRef(
|
|
1747
1747
|
(e, n) => {
|
|
1748
1748
|
const { __scopeSelect: t, ...o } = e, r = Ve(t), i = ae(ot, t), s = se(ot, t);
|
|
1749
|
-
return i.open && s.position === "popper" ? /* @__PURE__ */ a.jsx(
|
|
1749
|
+
return i.open && s.position === "popper" ? /* @__PURE__ */ a.jsx(gr, { ...r, ...o, ref: n }) : null;
|
|
1750
1750
|
}
|
|
1751
1751
|
);
|
|
1752
1752
|
Xo.displayName = ot;
|
|
1753
|
-
var Zo = "SelectBubbleInput",
|
|
1753
|
+
var Zo = "SelectBubbleInput", _n = c.forwardRef(
|
|
1754
1754
|
({ __scopeSelect: e, value: n, ...t }, o) => {
|
|
1755
1755
|
const r = c.useRef(null), i = V(o, r), s = _e(n);
|
|
1756
1756
|
return c.useEffect(() => {
|
|
1757
1757
|
const l = r.current;
|
|
1758
1758
|
if (!l) return;
|
|
1759
|
-
const d = window.HTMLSelectElement.prototype,
|
|
1759
|
+
const d = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
|
|
1760
1760
|
d,
|
|
1761
1761
|
"value"
|
|
1762
1762
|
).set;
|
|
1763
|
-
if (s !== n &&
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1763
|
+
if (s !== n && f) {
|
|
1764
|
+
const p = new Event("change", { bubbles: !0 });
|
|
1765
|
+
f.call(l, n), l.dispatchEvent(p);
|
|
1766
1766
|
}
|
|
1767
1767
|
}, [s, n]), /* @__PURE__ */ a.jsx(
|
|
1768
1768
|
j.select,
|
|
1769
1769
|
{
|
|
1770
1770
|
...t,
|
|
1771
|
-
style: { ...
|
|
1771
|
+
style: { ...lr, ...t.style },
|
|
1772
1772
|
ref: i,
|
|
1773
1773
|
defaultValue: n
|
|
1774
1774
|
}
|
|
1775
1775
|
);
|
|
1776
1776
|
}
|
|
1777
1777
|
);
|
|
1778
|
-
|
|
1779
|
-
function
|
|
1778
|
+
_n.displayName = Zo;
|
|
1779
|
+
function jn(e) {
|
|
1780
1780
|
return e === "" || e === void 0;
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function Pn(e) {
|
|
1783
1783
|
const n = yt(e), t = c.useRef(""), o = c.useRef(0), r = c.useCallback(
|
|
1784
1784
|
(s) => {
|
|
1785
1785
|
const l = t.current + s;
|
|
@@ -1793,7 +1793,7 @@ function jn(e) {
|
|
|
1793
1793
|
}, []);
|
|
1794
1794
|
return c.useEffect(() => () => window.clearTimeout(o.current), []), [t, r, i];
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function Nn(e, n, t) {
|
|
1797
1797
|
const r = n.length > 1 && Array.from(n).every((u) => u === n[0]) ? n[0] : n, i = t ? e.indexOf(t) : -1;
|
|
1798
1798
|
let s = Jo(e, Math.max(i, 0));
|
|
1799
1799
|
r.length === 1 && (s = s.filter((u) => u !== t));
|
|
@@ -1805,14 +1805,14 @@ function Pn(e, n, t) {
|
|
|
1805
1805
|
function Jo(e, n) {
|
|
1806
1806
|
return e.map((t, o) => e[(n + o) % e.length]);
|
|
1807
1807
|
}
|
|
1808
|
-
var Qo = on, ea = sn, ta = ln, na = dn, ra = un, oa = pn, aa = vn, sa = Sn, ia = wn, ca = Cn, la = In, da = Rn;
|
|
1809
|
-
function
|
|
1808
|
+
var Qo = on, ea = sn, ta = ln, na = dn, ra = un, oa = pn, aa = vn, sa = Sn, ia = wn, ca = Cn, la = In, da = Rn, ua = En;
|
|
1809
|
+
function pa({ ...e }) {
|
|
1810
1810
|
return /* @__PURE__ */ a.jsx(Qo, { "data-slot": "select", ...e });
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function fa({ ...e }) {
|
|
1813
1813
|
return /* @__PURE__ */ a.jsx(ta, { "data-slot": "select-value", ...e });
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function ma({
|
|
1816
1816
|
className: e,
|
|
1817
1817
|
size: n = "default",
|
|
1818
1818
|
children: t,
|
|
@@ -1821,7 +1821,7 @@ function fa({
|
|
|
1821
1821
|
return /* @__PURE__ */ a.jsxs(
|
|
1822
1822
|
ea,
|
|
1823
1823
|
{
|
|
1824
|
-
className:
|
|
1824
|
+
className: L(
|
|
1825
1825
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1826
1826
|
e
|
|
1827
1827
|
),
|
|
@@ -1835,7 +1835,7 @@ function fa({
|
|
|
1835
1835
|
}
|
|
1836
1836
|
);
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function ha({
|
|
1839
1839
|
className: e,
|
|
1840
1840
|
children: n,
|
|
1841
1841
|
position: t = "popper",
|
|
@@ -1846,7 +1846,7 @@ function ma({
|
|
|
1846
1846
|
oa,
|
|
1847
1847
|
{
|
|
1848
1848
|
align: o,
|
|
1849
|
-
className:
|
|
1849
|
+
className: L(
|
|
1850
1850
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
1851
1851
|
t === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1852
1852
|
e
|
|
@@ -1855,18 +1855,18 @@ function ma({
|
|
|
1855
1855
|
position: t,
|
|
1856
1856
|
...r,
|
|
1857
1857
|
children: [
|
|
1858
|
-
/* @__PURE__ */ a.jsx(
|
|
1858
|
+
/* @__PURE__ */ a.jsx(ga, {}),
|
|
1859
1859
|
/* @__PURE__ */ a.jsx(
|
|
1860
1860
|
aa,
|
|
1861
1861
|
{
|
|
1862
|
-
className:
|
|
1862
|
+
className: L(
|
|
1863
1863
|
"p-1",
|
|
1864
1864
|
t === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1865
1865
|
),
|
|
1866
1866
|
children: n
|
|
1867
1867
|
}
|
|
1868
1868
|
),
|
|
1869
|
-
/* @__PURE__ */ a.jsx(
|
|
1869
|
+
/* @__PURE__ */ a.jsx(xa, {})
|
|
1870
1870
|
]
|
|
1871
1871
|
}
|
|
1872
1872
|
) });
|
|
@@ -1875,7 +1875,7 @@ function xt({ className: e, children: n, ...t }) {
|
|
|
1875
1875
|
return /* @__PURE__ */ a.jsxs(
|
|
1876
1876
|
sa,
|
|
1877
1877
|
{
|
|
1878
|
-
className:
|
|
1878
|
+
className: L(
|
|
1879
1879
|
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1880
1880
|
e
|
|
1881
1881
|
),
|
|
@@ -1888,32 +1888,42 @@ function xt({ className: e, children: n, ...t }) {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
);
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function va({ className: e, ...n }) {
|
|
1892
|
+
return /* @__PURE__ */ a.jsx(
|
|
1893
|
+
ua,
|
|
1894
|
+
{
|
|
1895
|
+
className: L("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
1896
|
+
"data-slot": "select-separator",
|
|
1897
|
+
...n
|
|
1898
|
+
}
|
|
1899
|
+
);
|
|
1900
|
+
}
|
|
1901
|
+
function ga({ className: e, ...n }) {
|
|
1892
1902
|
return /* @__PURE__ */ a.jsx(
|
|
1893
1903
|
la,
|
|
1894
1904
|
{
|
|
1895
|
-
className:
|
|
1905
|
+
className: L("flex cursor-default items-center justify-center py-1", e),
|
|
1896
1906
|
"data-slot": "select-scroll-up-button",
|
|
1897
1907
|
...n,
|
|
1898
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1908
|
+
children: /* @__PURE__ */ a.jsx(Tr, { className: "size-4" })
|
|
1899
1909
|
}
|
|
1900
1910
|
);
|
|
1901
1911
|
}
|
|
1902
|
-
function
|
|
1912
|
+
function xa({
|
|
1903
1913
|
className: e,
|
|
1904
1914
|
...n
|
|
1905
1915
|
}) {
|
|
1906
1916
|
return /* @__PURE__ */ a.jsx(
|
|
1907
1917
|
da,
|
|
1908
1918
|
{
|
|
1909
|
-
className:
|
|
1919
|
+
className: L("flex cursor-default items-center justify-center py-1", e),
|
|
1910
1920
|
"data-slot": "select-scroll-down-button",
|
|
1911
1921
|
...n,
|
|
1912
1922
|
children: /* @__PURE__ */ a.jsx(_t, { className: "size-4" })
|
|
1913
1923
|
}
|
|
1914
1924
|
);
|
|
1915
1925
|
}
|
|
1916
|
-
const
|
|
1926
|
+
const $s = ({
|
|
1917
1927
|
name: e,
|
|
1918
1928
|
defaultValue: n,
|
|
1919
1929
|
options: t,
|
|
@@ -1924,10 +1934,11 @@ const Bs = ({
|
|
|
1924
1934
|
value: l,
|
|
1925
1935
|
onValueChange: d,
|
|
1926
1936
|
error: u,
|
|
1937
|
+
emptyOptionLabel: f,
|
|
1927
1938
|
size: p = "md",
|
|
1928
|
-
...
|
|
1939
|
+
...g
|
|
1929
1940
|
}) => {
|
|
1930
|
-
const
|
|
1941
|
+
const x = L(
|
|
1931
1942
|
"min-w-[180px]",
|
|
1932
1943
|
p === "xs" && "h-7 text-xs md:text-xs",
|
|
1933
1944
|
p === "sm" && "h-8 text-sm md:text-xs",
|
|
@@ -1935,24 +1946,25 @@ const Bs = ({
|
|
|
1935
1946
|
p === "lg" && "h-10 text-lg md:text-base",
|
|
1936
1947
|
p === "xl" && "h-11 text-xl md:text-lg",
|
|
1937
1948
|
s
|
|
1938
|
-
),
|
|
1939
|
-
d(
|
|
1949
|
+
), S = p === "xs" || p === "sm" ? "sm" : "default", m = "__none__", h = (b) => {
|
|
1950
|
+
d(b === m ? "" : b);
|
|
1940
1951
|
};
|
|
1941
1952
|
return /* @__PURE__ */ a.jsxs(pe, { className: "w-full", direction: "col", gap: "2", children: [
|
|
1942
1953
|
o && /* @__PURE__ */ a.jsx(ue, { htmlFor: e, children: o }),
|
|
1943
1954
|
/* @__PURE__ */ a.jsxs(
|
|
1944
|
-
|
|
1955
|
+
pa,
|
|
1945
1956
|
{
|
|
1946
1957
|
defaultValue: n,
|
|
1947
1958
|
name: e,
|
|
1948
1959
|
onValueChange: h,
|
|
1949
1960
|
value: l,
|
|
1950
|
-
...
|
|
1961
|
+
...g,
|
|
1951
1962
|
children: [
|
|
1952
|
-
/* @__PURE__ */ a.jsx(
|
|
1953
|
-
/* @__PURE__ */ a.jsxs(
|
|
1954
|
-
/* @__PURE__ */ a.jsx(xt, {
|
|
1955
|
-
|
|
1963
|
+
/* @__PURE__ */ a.jsx(ma, { className: x, "data-testid": `select-input-${e}`, size: S, children: /* @__PURE__ */ a.jsx(fa, { placeholder: r }) }),
|
|
1964
|
+
/* @__PURE__ */ a.jsxs(ha, { children: [
|
|
1965
|
+
/* @__PURE__ */ a.jsx(xt, { value: m, children: f || /* @__PURE__ */ a.jsx(a.Fragment, { children: " " }) }, "empty-option"),
|
|
1966
|
+
/* @__PURE__ */ a.jsx(va, {}),
|
|
1967
|
+
t.map(({ value: b, label: w }) => /* @__PURE__ */ a.jsx(xt, { value: b, children: w }, `option-${b}`))
|
|
1956
1968
|
] })
|
|
1957
1969
|
]
|
|
1958
1970
|
}
|
|
@@ -1961,31 +1973,31 @@ const Bs = ({
|
|
|
1961
1973
|
u && /* @__PURE__ */ a.jsx(Oe, { message: u })
|
|
1962
1974
|
] });
|
|
1963
1975
|
};
|
|
1964
|
-
var bt = 1,
|
|
1976
|
+
var bt = 1, ba = 0.9, Sa = 0.8, wa = 0.17, Xe = 0.1, Ze = 0.999, ya = 0.9999, Ca = 0.99, Ia = /[\\\/_+.#"@\[\(\{&]/, Ra = /[\\\/_+.#"@\[\(\{&]/g, ka = /[\s-]/, Tn = /[\s-]/g;
|
|
1965
1977
|
function at(e, n, t, o, r, i, s) {
|
|
1966
|
-
if (i === n.length) return r === e.length ? bt :
|
|
1978
|
+
if (i === n.length) return r === e.length ? bt : Ca;
|
|
1967
1979
|
var l = `${r},${i}`;
|
|
1968
1980
|
if (s[l] !== void 0) return s[l];
|
|
1969
|
-
for (var d = o.charAt(i), u = t.indexOf(d, r),
|
|
1970
|
-
return s[l] =
|
|
1981
|
+
for (var d = o.charAt(i), u = t.indexOf(d, r), f = 0, p, g, x, S; u >= 0; ) p = at(e, n, t, o, u + 1, i + 1, s), p > f && (u === r ? p *= bt : Ia.test(e.charAt(u - 1)) ? (p *= Sa, x = e.slice(r, u - 1).match(Ra), x && r > 0 && (p *= Math.pow(Ze, x.length))) : ka.test(e.charAt(u - 1)) ? (p *= ba, S = e.slice(r, u - 1).match(Tn), S && r > 0 && (p *= Math.pow(Ze, S.length))) : (p *= wa, r > 0 && (p *= Math.pow(Ze, u - r))), e.charAt(u) !== n.charAt(i) && (p *= ya)), (p < Xe && t.charAt(u - 1) === o.charAt(i + 1) || o.charAt(i + 1) === o.charAt(i) && t.charAt(u - 1) !== o.charAt(i)) && (g = at(e, n, t, o, u + 1, i + 2, s), g * Xe > p && (p = g * Xe)), p > f && (f = p), u = t.indexOf(d, u + 1);
|
|
1982
|
+
return s[l] = f, f;
|
|
1971
1983
|
}
|
|
1972
1984
|
function St(e) {
|
|
1973
|
-
return e.toLowerCase().replace(
|
|
1985
|
+
return e.toLowerCase().replace(Tn, " ");
|
|
1974
1986
|
}
|
|
1975
|
-
function
|
|
1987
|
+
function Ea(e, n, t) {
|
|
1976
1988
|
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, at(e, n, St(e), St(n), 0, 0, {});
|
|
1977
1989
|
}
|
|
1978
|
-
var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]',
|
|
1990
|
+
var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', _a = '[cmdk-group-heading=""]', Mn = '[cmdk-item=""]', wt = `${Mn}:not([aria-disabled="true"])`, st = "cmdk-item-select", xe = "data-value", ja = (e, n, t) => Ea(e, n, t), An = c.createContext(void 0), je = () => c.useContext(An), Dn = c.createContext(void 0), ht = () => c.useContext(Dn), On = c.createContext(void 0), Ln = c.forwardRef((e, n) => {
|
|
1979
1991
|
let t = be(() => {
|
|
1980
1992
|
var v, k;
|
|
1981
1993
|
return { search: "", value: (k = (v = e.value) != null ? v : e.defaultValue) != null ? k : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
1982
|
-
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), i = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Set()), l =
|
|
1994
|
+
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), i = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Set()), l = Fn(e), { label: d, children: u, value: f, onValueChange: p, filter: g, shouldFilter: x, loop: S, disablePointerSelection: m = !1, vimBindings: h = !0, ...b } = e, w = te(), y = te(), R = te(), A = c.useRef(null), N = $a();
|
|
1983
1995
|
he(() => {
|
|
1984
|
-
if (
|
|
1985
|
-
let v =
|
|
1996
|
+
if (f !== void 0) {
|
|
1997
|
+
let v = f.trim();
|
|
1986
1998
|
t.current.value = v, _.emit();
|
|
1987
1999
|
}
|
|
1988
|
-
}, [
|
|
2000
|
+
}, [f]), he(() => {
|
|
1989
2001
|
N(6, X);
|
|
1990
2002
|
}, []);
|
|
1991
2003
|
let _ = c.useMemo(() => ({ subscribe: (v) => (s.current.add(v), () => s.current.delete(v)), snapshot: () => t.current, setState: (v, k, E) => {
|
|
@@ -1994,15 +2006,15 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
1994
2006
|
if (t.current[v] = k, v === "search") K(), z(), N(1, D);
|
|
1995
2007
|
else if (v === "value") {
|
|
1996
2008
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
1997
|
-
let
|
|
1998
|
-
|
|
2009
|
+
let B = document.getElementById(R);
|
|
2010
|
+
B ? B.focus() : (I = document.getElementById(w)) == null || I.focus();
|
|
1999
2011
|
}
|
|
2000
2012
|
if (N(7, () => {
|
|
2001
|
-
var
|
|
2002
|
-
t.current.selectedItemId = (
|
|
2013
|
+
var B;
|
|
2014
|
+
t.current.selectedItemId = (B = W()) == null ? void 0 : B.id, _.emit();
|
|
2003
2015
|
}), E || N(5, X), ((T = l.current) == null ? void 0 : T.value) !== void 0) {
|
|
2004
|
-
let
|
|
2005
|
-
(M = (C = l.current).onValueChange) == null || M.call(C,
|
|
2016
|
+
let B = k ?? "";
|
|
2017
|
+
(M = (C = l.current).onValueChange) == null || M.call(C, B);
|
|
2006
2018
|
return;
|
|
2007
2019
|
}
|
|
2008
2020
|
}
|
|
@@ -2010,7 +2022,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2010
2022
|
}
|
|
2011
2023
|
}, emit: () => {
|
|
2012
2024
|
s.current.forEach((v) => v());
|
|
2013
|
-
} }), []),
|
|
2025
|
+
} }), []), F = c.useMemo(() => ({ value: (v, k, E) => {
|
|
2014
2026
|
var I;
|
|
2015
2027
|
k !== ((I = i.current.get(v)) == null ? void 0 : I.value) && (i.current.set(v, { value: k, keywords: E }), t.current.filtered.items.set(v, Z(k, E)), N(2, () => {
|
|
2016
2028
|
z(), _.emit();
|
|
@@ -2028,7 +2040,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2028
2040
|
}), filter: () => l.current.shouldFilter, label: d || e["aria-label"], getDisablePointerSelection: () => l.current.disablePointerSelection, listId: w, inputId: R, labelId: y, listInnerRef: A }), []);
|
|
2029
2041
|
function Z(v, k) {
|
|
2030
2042
|
var E, I;
|
|
2031
|
-
let T = (I = (E = l.current) == null ? void 0 : E.filter) != null ? I :
|
|
2043
|
+
let T = (I = (E = l.current) == null ? void 0 : E.filter) != null ? I : ja;
|
|
2032
2044
|
return v ? T(v, t.current.search, k) : 0;
|
|
2033
2045
|
}
|
|
2034
2046
|
function z() {
|
|
@@ -2037,15 +2049,15 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2037
2049
|
t.current.filtered.groups.forEach((I) => {
|
|
2038
2050
|
let T = r.current.get(I), C = 0;
|
|
2039
2051
|
T.forEach((M) => {
|
|
2040
|
-
let
|
|
2041
|
-
C = Math.max(
|
|
2052
|
+
let B = v.get(M);
|
|
2053
|
+
C = Math.max(B, C);
|
|
2042
2054
|
}), k.push([I, C]);
|
|
2043
2055
|
});
|
|
2044
2056
|
let E = A.current;
|
|
2045
2057
|
U().sort((I, T) => {
|
|
2046
2058
|
var C, M;
|
|
2047
|
-
let
|
|
2048
|
-
return ((C = v.get($)) != null ? C : 0) - ((M = v.get(
|
|
2059
|
+
let B = I.getAttribute("id"), $ = T.getAttribute("id");
|
|
2060
|
+
return ((C = v.get($)) != null ? C : 0) - ((M = v.get(B)) != null ? M : 0);
|
|
2049
2061
|
}).forEach((I) => {
|
|
2050
2062
|
let T = I.closest(Je);
|
|
2051
2063
|
T ? T.appendChild(I.parentElement === T ? I : I.closest(`${Je} > *`)) : E.appendChild(I.parentElement === E ? I : I.closest(`${Je} > *`));
|
|
@@ -2068,10 +2080,10 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2068
2080
|
t.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
2069
2081
|
let T = 0;
|
|
2070
2082
|
for (let C of o.current) {
|
|
2071
|
-
let M = (k = (v = i.current.get(C)) == null ? void 0 : v.value) != null ? k : "",
|
|
2083
|
+
let M = (k = (v = i.current.get(C)) == null ? void 0 : v.value) != null ? k : "", B = (I = (E = i.current.get(C)) == null ? void 0 : E.keywords) != null ? I : [], $ = Z(M, B);
|
|
2072
2084
|
t.current.filtered.items.set(C, $), $ > 0 && T++;
|
|
2073
2085
|
}
|
|
2074
|
-
for (let [C, M] of r.current) for (let
|
|
2086
|
+
for (let [C, M] of r.current) for (let B of M) if (t.current.filtered.items.get(B) > 0) {
|
|
2075
2087
|
t.current.filtered.groups.add(C);
|
|
2076
2088
|
break;
|
|
2077
2089
|
}
|
|
@@ -2080,11 +2092,11 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2080
2092
|
function X() {
|
|
2081
2093
|
var v, k, E;
|
|
2082
2094
|
let I = W();
|
|
2083
|
-
I && (((v = I.parentElement) == null ? void 0 : v.firstChild) === I && ((E = (k = I.closest(Ce)) == null ? void 0 : k.querySelector(
|
|
2095
|
+
I && (((v = I.parentElement) == null ? void 0 : v.firstChild) === I && ((E = (k = I.closest(Ce)) == null ? void 0 : k.querySelector(_a)) == null || E.scrollIntoView({ block: "nearest" })), I.scrollIntoView({ block: "nearest" }));
|
|
2084
2096
|
}
|
|
2085
2097
|
function W() {
|
|
2086
2098
|
var v;
|
|
2087
|
-
return (v = A.current) == null ? void 0 : v.querySelector(`${
|
|
2099
|
+
return (v = A.current) == null ? void 0 : v.querySelector(`${Mn}[aria-selected="true"]`);
|
|
2088
2100
|
}
|
|
2089
2101
|
function U() {
|
|
2090
2102
|
var v;
|
|
@@ -2101,7 +2113,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2101
2113
|
}
|
|
2102
2114
|
function q(v) {
|
|
2103
2115
|
let k = W(), E = k?.closest(Ce), I;
|
|
2104
|
-
for (; E && !I; ) E = v > 0 ?
|
|
2116
|
+
for (; E && !I; ) E = v > 0 ? Fa(E, Ce) : Ba(E, Ce), I = E?.querySelector(wt);
|
|
2105
2117
|
I ? _.setState("value", I.getAttribute(xe)) : G(v);
|
|
2106
2118
|
}
|
|
2107
2119
|
let J = () => O(U().length - 1), ge = (v) => {
|
|
@@ -2116,7 +2128,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2116
2128
|
if (!(v.defaultPrevented || E)) switch (v.key) {
|
|
2117
2129
|
case "n":
|
|
2118
2130
|
case "j": {
|
|
2119
|
-
|
|
2131
|
+
h && v.ctrlKey && ge(v);
|
|
2120
2132
|
break;
|
|
2121
2133
|
}
|
|
2122
2134
|
case "ArrowDown": {
|
|
@@ -2125,7 +2137,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2125
2137
|
}
|
|
2126
2138
|
case "p":
|
|
2127
2139
|
case "k": {
|
|
2128
|
-
|
|
2140
|
+
h && v.ctrlKey && ie(v);
|
|
2129
2141
|
break;
|
|
2130
2142
|
}
|
|
2131
2143
|
case "ArrowUp": {
|
|
@@ -2149,80 +2161,80 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2149
2161
|
}
|
|
2150
2162
|
}
|
|
2151
2163
|
}
|
|
2152
|
-
} }, c.createElement("label", { "cmdk-label": "", htmlFor:
|
|
2153
|
-
}),
|
|
2164
|
+
} }, c.createElement("label", { "cmdk-label": "", htmlFor: F.inputId, id: F.labelId, style: Ka }, d), Ke(e, (v) => c.createElement(Dn.Provider, { value: _ }, c.createElement(An.Provider, { value: F }, v))));
|
|
2165
|
+
}), Pa = c.forwardRef((e, n) => {
|
|
2154
2166
|
var t, o;
|
|
2155
|
-
let r = te(), i = c.useRef(null), s = c.useContext(
|
|
2167
|
+
let r = te(), i = c.useRef(null), s = c.useContext(On), l = je(), d = Fn(e), u = (o = (t = d.current) == null ? void 0 : t.forceMount) != null ? o : s?.forceMount;
|
|
2156
2168
|
he(() => {
|
|
2157
2169
|
if (!u) return l.item(r, s?.id);
|
|
2158
2170
|
}, [u]);
|
|
2159
|
-
let
|
|
2171
|
+
let f = Bn(r, i, [e.value, e.children, i], e.keywords), p = ht(), g = oe((N) => N.value && N.value === f.current), x = oe((N) => u || l.filter() === !1 ? !0 : N.search ? N.filtered.items.get(r) > 0 : !0);
|
|
2160
2172
|
c.useEffect(() => {
|
|
2161
2173
|
let N = i.current;
|
|
2162
2174
|
if (!(!N || e.disabled)) return N.addEventListener(st, S), () => N.removeEventListener(st, S);
|
|
2163
2175
|
}, [x, e.onSelect, e.disabled]);
|
|
2164
2176
|
function S() {
|
|
2165
2177
|
var N, _;
|
|
2166
|
-
|
|
2178
|
+
m(), (_ = (N = d.current).onSelect) == null || _.call(N, f.current);
|
|
2167
2179
|
}
|
|
2168
|
-
function
|
|
2169
|
-
|
|
2180
|
+
function m() {
|
|
2181
|
+
p.setState("value", f.current, !0);
|
|
2170
2182
|
}
|
|
2171
2183
|
if (!x) return null;
|
|
2172
|
-
let { disabled:
|
|
2173
|
-
return c.createElement(j.div, { ref: Re(i, n), ...A, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!
|
|
2174
|
-
}),
|
|
2175
|
-
let { heading: t, children: o, forceMount: r, ...i } = e, s = te(), l = c.useRef(null), d = c.useRef(null), u = te(),
|
|
2176
|
-
he(() =>
|
|
2184
|
+
let { disabled: h, value: b, onSelect: w, forceMount: y, keywords: R, ...A } = e;
|
|
2185
|
+
return c.createElement(j.div, { ref: Re(i, n), ...A, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!h, "aria-selected": !!g, "data-disabled": !!h, "data-selected": !!g, onPointerMove: h || l.getDisablePointerSelection() ? void 0 : m, onClick: h ? void 0 : S }, e.children);
|
|
2186
|
+
}), Na = c.forwardRef((e, n) => {
|
|
2187
|
+
let { heading: t, children: o, forceMount: r, ...i } = e, s = te(), l = c.useRef(null), d = c.useRef(null), u = te(), f = je(), p = oe((x) => r || f.filter() === !1 ? !0 : x.search ? x.filtered.groups.has(s) : !0);
|
|
2188
|
+
he(() => f.group(s), []), Bn(s, l, [e.value, e.heading, d]);
|
|
2177
2189
|
let g = c.useMemo(() => ({ id: s, forceMount: r }), [r]);
|
|
2178
|
-
return c.createElement(j.div, { ref: Re(l, n), ...i, "cmdk-group": "", role: "presentation", hidden:
|
|
2179
|
-
}),
|
|
2190
|
+
return c.createElement(j.div, { ref: Re(l, n), ...i, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, t && c.createElement("div", { ref: d, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), Ke(e, (x) => c.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, c.createElement(On.Provider, { value: g }, x))));
|
|
2191
|
+
}), Ta = c.forwardRef((e, n) => {
|
|
2180
2192
|
let { alwaysRender: t, ...o } = e, r = c.useRef(null), i = oe((s) => !s.search);
|
|
2181
2193
|
return !t && !i ? null : c.createElement(j.div, { ref: Re(r, n), ...o, "cmdk-separator": "", role: "separator" });
|
|
2182
|
-
}),
|
|
2194
|
+
}), Ma = c.forwardRef((e, n) => {
|
|
2183
2195
|
let { onValueChange: t, ...o } = e, r = e.value != null, i = ht(), s = oe((u) => u.search), l = oe((u) => u.selectedItemId), d = je();
|
|
2184
2196
|
return c.useEffect(() => {
|
|
2185
2197
|
e.value != null && i.setState("search", e.value);
|
|
2186
2198
|
}, [e.value]), c.createElement(j.input, { ref: n, ...o, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": d.listId, "aria-labelledby": d.labelId, "aria-activedescendant": l, id: d.inputId, type: "text", value: r ? e.value : s, onChange: (u) => {
|
|
2187
2199
|
r || i.setState("search", u.target.value), t?.(u.target.value);
|
|
2188
2200
|
} });
|
|
2189
|
-
}),
|
|
2201
|
+
}), Aa = c.forwardRef((e, n) => {
|
|
2190
2202
|
let { children: t, label: o = "Suggestions", ...r } = e, i = c.useRef(null), s = c.useRef(null), l = oe((u) => u.selectedItemId), d = je();
|
|
2191
2203
|
return c.useEffect(() => {
|
|
2192
2204
|
if (s.current && i.current) {
|
|
2193
|
-
let u = s.current,
|
|
2194
|
-
|
|
2205
|
+
let u = s.current, f = i.current, p, g = new ResizeObserver(() => {
|
|
2206
|
+
p = requestAnimationFrame(() => {
|
|
2195
2207
|
let x = u.offsetHeight;
|
|
2196
|
-
|
|
2208
|
+
f.style.setProperty("--cmdk-list-height", x.toFixed(1) + "px");
|
|
2197
2209
|
});
|
|
2198
2210
|
});
|
|
2199
2211
|
return g.observe(u), () => {
|
|
2200
|
-
cancelAnimationFrame(
|
|
2212
|
+
cancelAnimationFrame(p), g.unobserve(u);
|
|
2201
2213
|
};
|
|
2202
2214
|
}
|
|
2203
2215
|
}, []), c.createElement(j.div, { ref: Re(i, n), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": l, "aria-label": o, id: d.listId }, Ke(e, (u) => c.createElement("div", { ref: Re(s, d.listInnerRef), "cmdk-list-sizer": "" }, u)));
|
|
2204
|
-
}),
|
|
2216
|
+
}), Da = c.forwardRef((e, n) => {
|
|
2205
2217
|
let { open: t, onOpenChange: o, overlayClassName: r, contentClassName: i, container: s, ...l } = e;
|
|
2206
|
-
return c.createElement(
|
|
2207
|
-
}),
|
|
2218
|
+
return c.createElement(xr, { open: t, onOpenChange: o }, c.createElement(br, { container: s }, c.createElement(Sr, { "cmdk-overlay": "", className: r }), c.createElement(wr, { "aria-label": e.label, "cmdk-dialog": "", className: i }, c.createElement(Ln, { ref: n, ...l }))));
|
|
2219
|
+
}), Oa = c.forwardRef((e, n) => oe((t) => t.filtered.count === 0) ? c.createElement(j.div, { ref: n, ...e, "cmdk-empty": "", role: "presentation" }) : null), La = c.forwardRef((e, n) => {
|
|
2208
2220
|
let { progress: t, children: o, label: r = "Loading...", ...i } = e;
|
|
2209
2221
|
return c.createElement(j.div, { ref: n, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": r }, Ke(e, (s) => c.createElement("div", { "aria-hidden": !0 }, s)));
|
|
2210
|
-
}), we = Object.assign(
|
|
2211
|
-
function
|
|
2222
|
+
}), we = Object.assign(Ln, { List: Aa, Item: Pa, Input: Ma, Group: Na, Separator: Ta, Dialog: Da, Empty: Oa, Loading: La });
|
|
2223
|
+
function Fa(e, n) {
|
|
2212
2224
|
let t = e.nextElementSibling;
|
|
2213
2225
|
for (; t; ) {
|
|
2214
2226
|
if (t.matches(n)) return t;
|
|
2215
2227
|
t = t.nextElementSibling;
|
|
2216
2228
|
}
|
|
2217
2229
|
}
|
|
2218
|
-
function
|
|
2230
|
+
function Ba(e, n) {
|
|
2219
2231
|
let t = e.previousElementSibling;
|
|
2220
2232
|
for (; t; ) {
|
|
2221
2233
|
if (t.matches(n)) return t;
|
|
2222
2234
|
t = t.previousElementSibling;
|
|
2223
2235
|
}
|
|
2224
2236
|
}
|
|
2225
|
-
function
|
|
2237
|
+
function Fn(e) {
|
|
2226
2238
|
let n = c.useRef(e);
|
|
2227
2239
|
return he(() => {
|
|
2228
2240
|
n.current = e;
|
|
@@ -2243,15 +2255,15 @@ function Bn(e, n, t, o = []) {
|
|
|
2243
2255
|
var s;
|
|
2244
2256
|
let l = (() => {
|
|
2245
2257
|
var u;
|
|
2246
|
-
for (let
|
|
2247
|
-
if (typeof
|
|
2248
|
-
if (typeof
|
|
2258
|
+
for (let f of t) {
|
|
2259
|
+
if (typeof f == "string") return f.trim();
|
|
2260
|
+
if (typeof f == "object" && "current" in f) return f.current ? (u = f.current.textContent) == null ? void 0 : u.trim() : r.current;
|
|
2249
2261
|
}
|
|
2250
2262
|
})(), d = o.map((u) => u.trim());
|
|
2251
2263
|
i.value(e, l, d), (s = n.current) == null || s.setAttribute(xe, l), r.current = l;
|
|
2252
2264
|
}), r;
|
|
2253
2265
|
}
|
|
2254
|
-
var
|
|
2266
|
+
var $a = () => {
|
|
2255
2267
|
let [e, n] = c.useState(), t = be(() => /* @__PURE__ */ new Map());
|
|
2256
2268
|
return he(() => {
|
|
2257
2269
|
t.current.forEach((o) => o()), t.current = /* @__PURE__ */ new Map();
|
|
@@ -2259,19 +2271,19 @@ var Ba = () => {
|
|
|
2259
2271
|
t.current.set(o, r), n({});
|
|
2260
2272
|
};
|
|
2261
2273
|
};
|
|
2262
|
-
function
|
|
2274
|
+
function Va(e) {
|
|
2263
2275
|
let n = e.type;
|
|
2264
2276
|
return typeof n == "function" ? n(e.props) : "render" in n ? n.render(e.props) : e;
|
|
2265
2277
|
}
|
|
2266
2278
|
function Ke({ asChild: e, children: n }, t) {
|
|
2267
|
-
return e && c.isValidElement(n) ? c.cloneElement(
|
|
2279
|
+
return e && c.isValidElement(n) ? c.cloneElement(Va(n), { ref: n.ref }, t(n.props.children)) : t(n);
|
|
2268
2280
|
}
|
|
2269
|
-
var
|
|
2270
|
-
function
|
|
2281
|
+
var Ka = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
2282
|
+
function Ha({ className: e, ...n }) {
|
|
2271
2283
|
return /* @__PURE__ */ a.jsx(
|
|
2272
2284
|
we,
|
|
2273
2285
|
{
|
|
2274
|
-
className:
|
|
2286
|
+
className: L(
|
|
2275
2287
|
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
2276
2288
|
e
|
|
2277
2289
|
),
|
|
@@ -2280,13 +2292,13 @@ function Va({ className: e, ...n }) {
|
|
|
2280
2292
|
}
|
|
2281
2293
|
);
|
|
2282
2294
|
}
|
|
2283
|
-
function
|
|
2295
|
+
function Ua({ className: e, ...n }) {
|
|
2284
2296
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-9 items-center gap-2 border-b px-3", "data-slot": "command-input-wrapper", children: [
|
|
2285
|
-
/* @__PURE__ */ a.jsx(
|
|
2297
|
+
/* @__PURE__ */ a.jsx(qr, { className: "size-4 shrink-0 opacity-50" }),
|
|
2286
2298
|
/* @__PURE__ */ a.jsx(
|
|
2287
2299
|
we.Input,
|
|
2288
2300
|
{
|
|
2289
|
-
className:
|
|
2301
|
+
className: L(
|
|
2290
2302
|
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
2291
2303
|
e
|
|
2292
2304
|
),
|
|
@@ -2296,24 +2308,24 @@ function Ka({ className: e, ...n }) {
|
|
|
2296
2308
|
)
|
|
2297
2309
|
] });
|
|
2298
2310
|
}
|
|
2299
|
-
function
|
|
2311
|
+
function Ga({ className: e, ...n }) {
|
|
2300
2312
|
return /* @__PURE__ */ a.jsx(
|
|
2301
2313
|
we.List,
|
|
2302
2314
|
{
|
|
2303
|
-
className:
|
|
2315
|
+
className: L("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", e),
|
|
2304
2316
|
"data-slot": "command-list",
|
|
2305
2317
|
...n
|
|
2306
2318
|
}
|
|
2307
2319
|
);
|
|
2308
2320
|
}
|
|
2309
|
-
function
|
|
2321
|
+
function za({ ...e }) {
|
|
2310
2322
|
return /* @__PURE__ */ a.jsx(we.Empty, { className: "py-6 text-center text-sm", "data-slot": "command-empty", ...e });
|
|
2311
2323
|
}
|
|
2312
|
-
function
|
|
2324
|
+
function Wa({ className: e, ...n }) {
|
|
2313
2325
|
return /* @__PURE__ */ a.jsx(
|
|
2314
2326
|
we.Group,
|
|
2315
2327
|
{
|
|
2316
|
-
className:
|
|
2328
|
+
className: L(
|
|
2317
2329
|
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs",
|
|
2318
2330
|
e
|
|
2319
2331
|
),
|
|
@@ -2322,11 +2334,11 @@ function Ga({ className: e, ...n }) {
|
|
|
2322
2334
|
}
|
|
2323
2335
|
);
|
|
2324
2336
|
}
|
|
2325
|
-
function
|
|
2337
|
+
function qa({ className: e, ...n }) {
|
|
2326
2338
|
return /* @__PURE__ */ a.jsx(
|
|
2327
2339
|
we.Item,
|
|
2328
2340
|
{
|
|
2329
|
-
className:
|
|
2341
|
+
className: L(
|
|
2330
2342
|
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2331
2343
|
e
|
|
2332
2344
|
),
|
|
@@ -2335,16 +2347,16 @@ function za({ className: e, ...n }) {
|
|
|
2335
2347
|
}
|
|
2336
2348
|
);
|
|
2337
2349
|
}
|
|
2338
|
-
const
|
|
2350
|
+
const Ya = ({
|
|
2339
2351
|
placeholder: e,
|
|
2340
2352
|
selected: n,
|
|
2341
2353
|
className: t,
|
|
2342
2354
|
open: o,
|
|
2343
2355
|
renderSelected: r = (i) => i.label
|
|
2344
|
-
}) => /* @__PURE__ */ a.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ a.jsxs(
|
|
2356
|
+
}) => /* @__PURE__ */ a.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ a.jsxs(yr, { "aria-expanded": o, className: `justify-between ${t}`, role: "combobox", variant: "outline", children: [
|
|
2345
2357
|
r(n || { label: e, value: "" }),
|
|
2346
|
-
/* @__PURE__ */ a.jsx(
|
|
2347
|
-
] }) }),
|
|
2358
|
+
/* @__PURE__ */ a.jsx(Ar, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
2359
|
+
] }) }), Vs = ({
|
|
2348
2360
|
options: e,
|
|
2349
2361
|
value: n = "",
|
|
2350
2362
|
placeholder: t = "Select a value...",
|
|
@@ -2353,10 +2365,10 @@ const Wa = ({
|
|
|
2353
2365
|
},
|
|
2354
2366
|
renderSelected: i = (s) => s.label
|
|
2355
2367
|
}) => {
|
|
2356
|
-
const [s, l] = ke(!1), d =
|
|
2368
|
+
const [s, l] = ke(!1), d = Ir(() => e.find((u) => u.value === n), [e, n]);
|
|
2357
2369
|
return /* @__PURE__ */ a.jsxs(It, { onOpenChange: l, open: s, children: [
|
|
2358
2370
|
/* @__PURE__ */ a.jsx(
|
|
2359
|
-
|
|
2371
|
+
Ya,
|
|
2360
2372
|
{
|
|
2361
2373
|
className: `w-full ${o}`,
|
|
2362
2374
|
open: s,
|
|
@@ -2365,12 +2377,12 @@ const Wa = ({
|
|
|
2365
2377
|
selected: d
|
|
2366
2378
|
}
|
|
2367
2379
|
),
|
|
2368
|
-
/* @__PURE__ */ a.jsx(kt, { className: "w-full p-0", children: /* @__PURE__ */ a.jsxs(
|
|
2369
|
-
/* @__PURE__ */ a.jsx(
|
|
2370
|
-
/* @__PURE__ */ a.jsxs(
|
|
2371
|
-
/* @__PURE__ */ a.jsx(
|
|
2372
|
-
/* @__PURE__ */ a.jsx(
|
|
2373
|
-
|
|
2380
|
+
/* @__PURE__ */ a.jsx(kt, { className: "w-full p-0", children: /* @__PURE__ */ a.jsxs(Ha, { value: n, children: [
|
|
2381
|
+
/* @__PURE__ */ a.jsx(Ua, { "aria-label": "Search options", className: "h-9", placeholder: "Search" }),
|
|
2382
|
+
/* @__PURE__ */ a.jsxs(Ga, { children: [
|
|
2383
|
+
/* @__PURE__ */ a.jsx(za, { children: "No results found" }),
|
|
2384
|
+
/* @__PURE__ */ a.jsx(Wa, { children: e.map((u) => /* @__PURE__ */ a.jsxs(
|
|
2385
|
+
qa,
|
|
2374
2386
|
{
|
|
2375
2387
|
onSelect: () => {
|
|
2376
2388
|
l(!1), r(u.value);
|
|
@@ -2379,7 +2391,7 @@ const Wa = ({
|
|
|
2379
2391
|
children: [
|
|
2380
2392
|
u.icon ? /* @__PURE__ */ a.jsx("span", { className: "mr-2", children: u.icon }) : "",
|
|
2381
2393
|
u.label,
|
|
2382
|
-
/* @__PURE__ */ a.jsx(ut, { className:
|
|
2394
|
+
/* @__PURE__ */ a.jsx(ut, { className: L("ml-auto", u.value === n ? "opacity-100" : "opacity-0") })
|
|
2383
2395
|
]
|
|
2384
2396
|
},
|
|
2385
2397
|
u.value
|
|
@@ -2388,14 +2400,14 @@ const Wa = ({
|
|
|
2388
2400
|
] }) })
|
|
2389
2401
|
] });
|
|
2390
2402
|
};
|
|
2391
|
-
var
|
|
2403
|
+
var $n = ["PageUp", "PageDown"], Vn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Kn = {
|
|
2392
2404
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2393
2405
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
2394
2406
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2395
2407
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
2396
|
-
}, ye = "Slider", [it,
|
|
2397
|
-
|
|
2398
|
-
]), [
|
|
2408
|
+
}, ye = "Slider", [it, Xa, Za] = dt(ye), [Hn, Ks] = ve(ye, [
|
|
2409
|
+
Za
|
|
2410
|
+
]), [Ja, He] = Hn(ye), Un = c.forwardRef(
|
|
2399
2411
|
(e, n) => {
|
|
2400
2412
|
const {
|
|
2401
2413
|
name: t,
|
|
@@ -2406,26 +2418,26 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2406
2418
|
disabled: l = !1,
|
|
2407
2419
|
minStepsBetweenThumbs: d = 0,
|
|
2408
2420
|
defaultValue: u = [o],
|
|
2409
|
-
value:
|
|
2410
|
-
onValueChange:
|
|
2421
|
+
value: f,
|
|
2422
|
+
onValueChange: p = () => {
|
|
2411
2423
|
},
|
|
2412
2424
|
onValueCommit: g = () => {
|
|
2413
2425
|
},
|
|
2414
2426
|
inverted: x = !1,
|
|
2415
2427
|
form: S,
|
|
2416
|
-
...
|
|
2417
|
-
} = e,
|
|
2418
|
-
prop:
|
|
2428
|
+
...m
|
|
2429
|
+
} = e, h = c.useRef(/* @__PURE__ */ new Set()), b = c.useRef(0), y = s === "horizontal" ? Qa : es, [R = [], A] = de({
|
|
2430
|
+
prop: f,
|
|
2419
2431
|
defaultProp: u,
|
|
2420
2432
|
onChange: (D) => {
|
|
2421
|
-
[...
|
|
2433
|
+
[...h.current][b.current]?.focus(), p(D);
|
|
2422
2434
|
}
|
|
2423
2435
|
}), N = c.useRef(R);
|
|
2424
2436
|
function _(D) {
|
|
2425
|
-
const K =
|
|
2437
|
+
const K = as(R, D);
|
|
2426
2438
|
z(D, K);
|
|
2427
2439
|
}
|
|
2428
|
-
function
|
|
2440
|
+
function F(D) {
|
|
2429
2441
|
z(D, b.current);
|
|
2430
2442
|
}
|
|
2431
2443
|
function Z() {
|
|
@@ -2433,10 +2445,10 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2433
2445
|
R[b.current] !== D && g(R);
|
|
2434
2446
|
}
|
|
2435
2447
|
function z(D, K, { commit: X } = { commit: !1 }) {
|
|
2436
|
-
const W =
|
|
2448
|
+
const W = ls(i), U = ds(Math.round((D - o) / i) * i + o, W), O = Ne(U, [o, r]);
|
|
2437
2449
|
A((G = []) => {
|
|
2438
|
-
const q =
|
|
2439
|
-
if (
|
|
2450
|
+
const q = rs(G, O, K);
|
|
2451
|
+
if (cs(q, d * i)) {
|
|
2440
2452
|
b.current = q.indexOf(O);
|
|
2441
2453
|
const J = String(q) !== String(G);
|
|
2442
2454
|
return J && X && g(q), J ? q : G;
|
|
@@ -2445,7 +2457,7 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2445
2457
|
});
|
|
2446
2458
|
}
|
|
2447
2459
|
return /* @__PURE__ */ a.jsx(
|
|
2448
|
-
|
|
2460
|
+
Ja,
|
|
2449
2461
|
{
|
|
2450
2462
|
scope: e.__scopeSlider,
|
|
2451
2463
|
name: t,
|
|
@@ -2453,7 +2465,7 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2453
2465
|
min: o,
|
|
2454
2466
|
max: r,
|
|
2455
2467
|
valueIndexToChangeRef: b,
|
|
2456
|
-
thumbs:
|
|
2468
|
+
thumbs: h.current,
|
|
2457
2469
|
values: R,
|
|
2458
2470
|
orientation: s,
|
|
2459
2471
|
form: S,
|
|
@@ -2462,22 +2474,22 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2462
2474
|
{
|
|
2463
2475
|
"aria-disabled": l,
|
|
2464
2476
|
"data-disabled": l ? "" : void 0,
|
|
2465
|
-
...
|
|
2477
|
+
...m,
|
|
2466
2478
|
ref: n,
|
|
2467
|
-
onPointerDown: P(
|
|
2479
|
+
onPointerDown: P(m.onPointerDown, () => {
|
|
2468
2480
|
l || (N.current = R);
|
|
2469
2481
|
}),
|
|
2470
2482
|
min: o,
|
|
2471
2483
|
max: r,
|
|
2472
2484
|
inverted: x,
|
|
2473
2485
|
onSlideStart: l ? void 0 : _,
|
|
2474
|
-
onSlideMove: l ? void 0 :
|
|
2486
|
+
onSlideMove: l ? void 0 : F,
|
|
2475
2487
|
onSlideEnd: l ? void 0 : Z,
|
|
2476
2488
|
onHomeKeyDown: () => !l && z(o, 0, { commit: !0 }),
|
|
2477
2489
|
onEndKeyDown: () => !l && z(r, R.length - 1, { commit: !0 }),
|
|
2478
2490
|
onStepKeyDown: ({ event: D, direction: K }) => {
|
|
2479
2491
|
if (!l) {
|
|
2480
|
-
const U =
|
|
2492
|
+
const U = $n.includes(D.key) || D.shiftKey && Vn.includes(D.key) ? 10 : 1, O = b.current, G = R[O], q = i * U * K;
|
|
2481
2493
|
z(G + q, O, { commit: !0 });
|
|
2482
2494
|
}
|
|
2483
2495
|
}
|
|
@@ -2487,13 +2499,13 @@ var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2487
2499
|
);
|
|
2488
2500
|
}
|
|
2489
2501
|
);
|
|
2490
|
-
|
|
2491
|
-
var [
|
|
2502
|
+
Un.displayName = ye;
|
|
2503
|
+
var [Gn, zn] = Hn(ye, {
|
|
2492
2504
|
startEdge: "left",
|
|
2493
2505
|
endEdge: "right",
|
|
2494
2506
|
size: "width",
|
|
2495
2507
|
direction: 1
|
|
2496
|
-
}),
|
|
2508
|
+
}), Qa = c.forwardRef(
|
|
2497
2509
|
(e, n) => {
|
|
2498
2510
|
const {
|
|
2499
2511
|
min: t,
|
|
@@ -2504,14 +2516,14 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2504
2516
|
onSlideMove: l,
|
|
2505
2517
|
onSlideEnd: d,
|
|
2506
2518
|
onStepKeyDown: u,
|
|
2507
|
-
...
|
|
2508
|
-
} = e, [
|
|
2519
|
+
...f
|
|
2520
|
+
} = e, [p, g] = c.useState(null), x = V(n, (y) => g(y)), S = c.useRef(void 0), m = Me(r), h = m === "ltr", b = h && !i || !h && i;
|
|
2509
2521
|
function w(y) {
|
|
2510
|
-
const R = S.current ||
|
|
2522
|
+
const R = S.current || p.getBoundingClientRect(), A = [0, R.width], _ = vt(A, b ? [t, o] : [o, t]);
|
|
2511
2523
|
return S.current = R, _(y - R.left);
|
|
2512
2524
|
}
|
|
2513
2525
|
return /* @__PURE__ */ a.jsx(
|
|
2514
|
-
|
|
2526
|
+
Gn,
|
|
2515
2527
|
{
|
|
2516
2528
|
scope: e.__scopeSlider,
|
|
2517
2529
|
startEdge: b ? "left" : "right",
|
|
@@ -2519,14 +2531,14 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2519
2531
|
direction: b ? 1 : -1,
|
|
2520
2532
|
size: "width",
|
|
2521
2533
|
children: /* @__PURE__ */ a.jsx(
|
|
2522
|
-
|
|
2534
|
+
Wn,
|
|
2523
2535
|
{
|
|
2524
|
-
dir:
|
|
2536
|
+
dir: m,
|
|
2525
2537
|
"data-orientation": "horizontal",
|
|
2526
|
-
...
|
|
2538
|
+
...f,
|
|
2527
2539
|
ref: x,
|
|
2528
2540
|
style: {
|
|
2529
|
-
...
|
|
2541
|
+
...f.style,
|
|
2530
2542
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
2531
2543
|
},
|
|
2532
2544
|
onSlideStart: (y) => {
|
|
@@ -2541,7 +2553,7 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2541
2553
|
S.current = void 0, d?.();
|
|
2542
2554
|
},
|
|
2543
2555
|
onStepKeyDown: (y) => {
|
|
2544
|
-
const A =
|
|
2556
|
+
const A = Kn[b ? "from-left" : "from-right"].includes(y.key);
|
|
2545
2557
|
u?.({ event: y, direction: A ? -1 : 1 });
|
|
2546
2558
|
}
|
|
2547
2559
|
}
|
|
@@ -2549,7 +2561,7 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2549
2561
|
}
|
|
2550
2562
|
);
|
|
2551
2563
|
}
|
|
2552
|
-
),
|
|
2564
|
+
), es = c.forwardRef(
|
|
2553
2565
|
(e, n) => {
|
|
2554
2566
|
const {
|
|
2555
2567
|
min: t,
|
|
@@ -2560,13 +2572,13 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2560
2572
|
onSlideEnd: l,
|
|
2561
2573
|
onStepKeyDown: d,
|
|
2562
2574
|
...u
|
|
2563
|
-
} = e,
|
|
2564
|
-
function S(
|
|
2565
|
-
const
|
|
2566
|
-
return g.current =
|
|
2575
|
+
} = e, f = c.useRef(null), p = V(n, f), g = c.useRef(void 0), x = !r;
|
|
2576
|
+
function S(m) {
|
|
2577
|
+
const h = g.current || f.current.getBoundingClientRect(), b = [0, h.height], y = vt(b, x ? [o, t] : [t, o]);
|
|
2578
|
+
return g.current = h, y(m - h.top);
|
|
2567
2579
|
}
|
|
2568
2580
|
return /* @__PURE__ */ a.jsx(
|
|
2569
|
-
|
|
2581
|
+
Gn,
|
|
2570
2582
|
{
|
|
2571
2583
|
scope: e.__scopeSlider,
|
|
2572
2584
|
startEdge: x ? "bottom" : "top",
|
|
@@ -2574,36 +2586,36 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2574
2586
|
size: "height",
|
|
2575
2587
|
direction: x ? 1 : -1,
|
|
2576
2588
|
children: /* @__PURE__ */ a.jsx(
|
|
2577
|
-
|
|
2589
|
+
Wn,
|
|
2578
2590
|
{
|
|
2579
2591
|
"data-orientation": "vertical",
|
|
2580
2592
|
...u,
|
|
2581
|
-
ref:
|
|
2593
|
+
ref: p,
|
|
2582
2594
|
style: {
|
|
2583
2595
|
...u.style,
|
|
2584
2596
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
2585
2597
|
},
|
|
2586
|
-
onSlideStart: (
|
|
2587
|
-
const
|
|
2588
|
-
i?.(
|
|
2598
|
+
onSlideStart: (m) => {
|
|
2599
|
+
const h = S(m.clientY);
|
|
2600
|
+
i?.(h);
|
|
2589
2601
|
},
|
|
2590
|
-
onSlideMove: (
|
|
2591
|
-
const
|
|
2592
|
-
s?.(
|
|
2602
|
+
onSlideMove: (m) => {
|
|
2603
|
+
const h = S(m.clientY);
|
|
2604
|
+
s?.(h);
|
|
2593
2605
|
},
|
|
2594
2606
|
onSlideEnd: () => {
|
|
2595
2607
|
g.current = void 0, l?.();
|
|
2596
2608
|
},
|
|
2597
|
-
onStepKeyDown: (
|
|
2598
|
-
const b =
|
|
2599
|
-
d?.({ event:
|
|
2609
|
+
onStepKeyDown: (m) => {
|
|
2610
|
+
const b = Kn[x ? "from-bottom" : "from-top"].includes(m.key);
|
|
2611
|
+
d?.({ event: m, direction: b ? -1 : 1 });
|
|
2600
2612
|
}
|
|
2601
2613
|
}
|
|
2602
2614
|
)
|
|
2603
2615
|
}
|
|
2604
2616
|
);
|
|
2605
2617
|
}
|
|
2606
|
-
),
|
|
2618
|
+
), Wn = c.forwardRef(
|
|
2607
2619
|
(e, n) => {
|
|
2608
2620
|
const {
|
|
2609
2621
|
__scopeSlider: t,
|
|
@@ -2614,32 +2626,32 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2614
2626
|
onEndKeyDown: l,
|
|
2615
2627
|
onStepKeyDown: d,
|
|
2616
2628
|
...u
|
|
2617
|
-
} = e,
|
|
2629
|
+
} = e, f = He(ye, t);
|
|
2618
2630
|
return /* @__PURE__ */ a.jsx(
|
|
2619
2631
|
j.span,
|
|
2620
2632
|
{
|
|
2621
2633
|
...u,
|
|
2622
2634
|
ref: n,
|
|
2623
|
-
onKeyDown: P(e.onKeyDown, (
|
|
2624
|
-
|
|
2635
|
+
onKeyDown: P(e.onKeyDown, (p) => {
|
|
2636
|
+
p.key === "Home" ? (s(p), p.preventDefault()) : p.key === "End" ? (l(p), p.preventDefault()) : $n.concat(Vn).includes(p.key) && (d(p), p.preventDefault());
|
|
2625
2637
|
}),
|
|
2626
|
-
onPointerDown: P(e.onPointerDown, (
|
|
2627
|
-
const g =
|
|
2628
|
-
g.setPointerCapture(
|
|
2638
|
+
onPointerDown: P(e.onPointerDown, (p) => {
|
|
2639
|
+
const g = p.target;
|
|
2640
|
+
g.setPointerCapture(p.pointerId), p.preventDefault(), f.thumbs.has(g) ? g.focus() : o(p);
|
|
2629
2641
|
}),
|
|
2630
|
-
onPointerMove: P(e.onPointerMove, (
|
|
2631
|
-
|
|
2642
|
+
onPointerMove: P(e.onPointerMove, (p) => {
|
|
2643
|
+
p.target.hasPointerCapture(p.pointerId) && r(p);
|
|
2632
2644
|
}),
|
|
2633
|
-
onPointerUp: P(e.onPointerUp, (
|
|
2634
|
-
const g =
|
|
2635
|
-
g.hasPointerCapture(
|
|
2645
|
+
onPointerUp: P(e.onPointerUp, (p) => {
|
|
2646
|
+
const g = p.target;
|
|
2647
|
+
g.hasPointerCapture(p.pointerId) && (g.releasePointerCapture(p.pointerId), i(p));
|
|
2636
2648
|
})
|
|
2637
2649
|
}
|
|
2638
2650
|
);
|
|
2639
2651
|
}
|
|
2640
|
-
),
|
|
2652
|
+
), qn = "SliderTrack", Yn = c.forwardRef(
|
|
2641
2653
|
(e, n) => {
|
|
2642
|
-
const { __scopeSlider: t, ...o } = e, r = He(
|
|
2654
|
+
const { __scopeSlider: t, ...o } = e, r = He(qn, t);
|
|
2643
2655
|
return /* @__PURE__ */ a.jsx(
|
|
2644
2656
|
j.span,
|
|
2645
2657
|
{
|
|
@@ -2651,12 +2663,12 @@ var [Un, Gn] = Kn(ye, {
|
|
|
2651
2663
|
);
|
|
2652
2664
|
}
|
|
2653
2665
|
);
|
|
2654
|
-
|
|
2655
|
-
var ct = "SliderRange",
|
|
2666
|
+
Yn.displayName = qn;
|
|
2667
|
+
var ct = "SliderRange", Xn = c.forwardRef(
|
|
2656
2668
|
(e, n) => {
|
|
2657
|
-
const { __scopeSlider: t, ...o } = e, r = He(ct, t), i =
|
|
2658
|
-
(g) =>
|
|
2659
|
-
),
|
|
2669
|
+
const { __scopeSlider: t, ...o } = e, r = He(ct, t), i = zn(ct, t), s = c.useRef(null), l = V(n, s), d = r.values.length, u = r.values.map(
|
|
2670
|
+
(g) => Qn(g, r.min, r.max)
|
|
2671
|
+
), f = d > 1 ? Math.min(...u) : 0, p = 100 - Math.max(...u);
|
|
2660
2672
|
return /* @__PURE__ */ a.jsx(
|
|
2661
2673
|
j.span,
|
|
2662
2674
|
{
|
|
@@ -2666,25 +2678,25 @@ var ct = "SliderRange", Yn = c.forwardRef(
|
|
|
2666
2678
|
ref: l,
|
|
2667
2679
|
style: {
|
|
2668
2680
|
...e.style,
|
|
2669
|
-
[i.startEdge]:
|
|
2670
|
-
[i.endEdge]:
|
|
2681
|
+
[i.startEdge]: f + "%",
|
|
2682
|
+
[i.endEdge]: p + "%"
|
|
2671
2683
|
}
|
|
2672
2684
|
}
|
|
2673
2685
|
);
|
|
2674
2686
|
}
|
|
2675
2687
|
);
|
|
2676
|
-
|
|
2677
|
-
var lt = "SliderThumb",
|
|
2688
|
+
Xn.displayName = ct;
|
|
2689
|
+
var lt = "SliderThumb", Zn = c.forwardRef(
|
|
2678
2690
|
(e, n) => {
|
|
2679
|
-
const t =
|
|
2691
|
+
const t = Xa(e.__scopeSlider), [o, r] = c.useState(null), i = V(n, (l) => r(l)), s = c.useMemo(
|
|
2680
2692
|
() => o ? t().findIndex((l) => l.ref.current === o) : -1,
|
|
2681
2693
|
[t, o]
|
|
2682
2694
|
);
|
|
2683
|
-
return /* @__PURE__ */ a.jsx(
|
|
2695
|
+
return /* @__PURE__ */ a.jsx(ts, { ...e, ref: i, index: s });
|
|
2684
2696
|
}
|
|
2685
|
-
),
|
|
2697
|
+
), ts = c.forwardRef(
|
|
2686
2698
|
(e, n) => {
|
|
2687
|
-
const { __scopeSlider: t, index: o, name: r, ...i } = e, s = He(lt, t), l =
|
|
2699
|
+
const { __scopeSlider: t, index: o, name: r, ...i } = e, s = He(lt, t), l = zn(lt, t), [d, u] = c.useState(null), f = V(n, (w) => u(w)), p = d ? s.form || !!d.closest("form") : !0, g = De(d), x = s.values[o], S = x === void 0 ? 0 : Qn(x, s.min, s.max), m = os(o, s.values.length), h = g?.[l.size], b = h ? ss(h, S, l.direction) : 0;
|
|
2688
2700
|
return c.useEffect(() => {
|
|
2689
2701
|
if (d)
|
|
2690
2702
|
return s.thumbs.add(d), () => {
|
|
@@ -2703,7 +2715,7 @@ var lt = "SliderThumb", Xn = c.forwardRef(
|
|
|
2703
2715
|
j.span,
|
|
2704
2716
|
{
|
|
2705
2717
|
role: "slider",
|
|
2706
|
-
"aria-label": e["aria-label"] ||
|
|
2718
|
+
"aria-label": e["aria-label"] || m,
|
|
2707
2719
|
"aria-valuemin": s.min,
|
|
2708
2720
|
"aria-valuenow": x,
|
|
2709
2721
|
"aria-valuemax": s.max,
|
|
@@ -2712,15 +2724,15 @@ var lt = "SliderThumb", Xn = c.forwardRef(
|
|
|
2712
2724
|
"data-disabled": s.disabled ? "" : void 0,
|
|
2713
2725
|
tabIndex: s.disabled ? void 0 : 0,
|
|
2714
2726
|
...i,
|
|
2715
|
-
ref:
|
|
2727
|
+
ref: f,
|
|
2716
2728
|
style: x === void 0 ? { display: "none" } : e.style,
|
|
2717
2729
|
onFocus: P(e.onFocus, () => {
|
|
2718
2730
|
s.valueIndexToChangeRef.current = o;
|
|
2719
2731
|
})
|
|
2720
2732
|
}
|
|
2721
2733
|
) }),
|
|
2722
|
-
|
|
2723
|
-
|
|
2734
|
+
p && /* @__PURE__ */ a.jsx(
|
|
2735
|
+
Jn,
|
|
2724
2736
|
{
|
|
2725
2737
|
name: r ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
2726
2738
|
form: s.form,
|
|
@@ -2733,17 +2745,17 @@ var lt = "SliderThumb", Xn = c.forwardRef(
|
|
|
2733
2745
|
);
|
|
2734
2746
|
}
|
|
2735
2747
|
);
|
|
2736
|
-
|
|
2737
|
-
var
|
|
2748
|
+
Zn.displayName = lt;
|
|
2749
|
+
var ns = "RadioBubbleInput", Jn = c.forwardRef(
|
|
2738
2750
|
({ __scopeSlider: e, value: n, ...t }, o) => {
|
|
2739
2751
|
const r = c.useRef(null), i = V(r, o), s = _e(n);
|
|
2740
2752
|
return c.useEffect(() => {
|
|
2741
2753
|
const l = r.current;
|
|
2742
2754
|
if (!l) return;
|
|
2743
|
-
const d = window.HTMLInputElement.prototype,
|
|
2744
|
-
if (s !== n &&
|
|
2745
|
-
const
|
|
2746
|
-
|
|
2755
|
+
const d = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(d, "value").set;
|
|
2756
|
+
if (s !== n && f) {
|
|
2757
|
+
const p = new Event("input", { bubbles: !0 });
|
|
2758
|
+
f.call(l, n), l.dispatchEvent(p);
|
|
2747
2759
|
}
|
|
2748
2760
|
}, [s, n]), /* @__PURE__ */ a.jsx(
|
|
2749
2761
|
j.input,
|
|
@@ -2756,33 +2768,33 @@ var es = "RadioBubbleInput", Zn = c.forwardRef(
|
|
|
2756
2768
|
);
|
|
2757
2769
|
}
|
|
2758
2770
|
);
|
|
2759
|
-
|
|
2760
|
-
function
|
|
2771
|
+
Jn.displayName = ns;
|
|
2772
|
+
function rs(e = [], n, t) {
|
|
2761
2773
|
const o = [...e];
|
|
2762
2774
|
return o[t] = n, o.sort((r, i) => r - i);
|
|
2763
2775
|
}
|
|
2764
|
-
function
|
|
2776
|
+
function Qn(e, n, t) {
|
|
2765
2777
|
const i = 100 / (t - n) * (e - n);
|
|
2766
2778
|
return Ne(i, [0, 100]);
|
|
2767
2779
|
}
|
|
2768
|
-
function
|
|
2780
|
+
function os(e, n) {
|
|
2769
2781
|
return n > 2 ? `Value ${e + 1} of ${n}` : n === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
2770
2782
|
}
|
|
2771
|
-
function
|
|
2783
|
+
function as(e, n) {
|
|
2772
2784
|
if (e.length === 1) return 0;
|
|
2773
2785
|
const t = e.map((r) => Math.abs(r - n)), o = Math.min(...t);
|
|
2774
2786
|
return t.indexOf(o);
|
|
2775
2787
|
}
|
|
2776
|
-
function
|
|
2788
|
+
function ss(e, n, t) {
|
|
2777
2789
|
const o = e / 2, i = vt([0, 50], [0, o]);
|
|
2778
2790
|
return (o - i(n) * t) * t;
|
|
2779
2791
|
}
|
|
2780
|
-
function
|
|
2792
|
+
function is(e) {
|
|
2781
2793
|
return e.slice(0, -1).map((n, t) => e[t + 1] - n);
|
|
2782
2794
|
}
|
|
2783
|
-
function
|
|
2795
|
+
function cs(e, n) {
|
|
2784
2796
|
if (n > 0) {
|
|
2785
|
-
const t =
|
|
2797
|
+
const t = is(e);
|
|
2786
2798
|
return Math.min(...t) >= n;
|
|
2787
2799
|
}
|
|
2788
2800
|
return !0;
|
|
@@ -2794,15 +2806,15 @@ function vt(e, n) {
|
|
|
2794
2806
|
return n[0] + o * (t - e[0]);
|
|
2795
2807
|
};
|
|
2796
2808
|
}
|
|
2797
|
-
function
|
|
2809
|
+
function ls(e) {
|
|
2798
2810
|
return (String(e).split(".")[1] || "").length;
|
|
2799
2811
|
}
|
|
2800
|
-
function
|
|
2812
|
+
function ds(e, n) {
|
|
2801
2813
|
const t = Math.pow(10, n);
|
|
2802
2814
|
return Math.round(e * t) / t;
|
|
2803
2815
|
}
|
|
2804
|
-
var
|
|
2805
|
-
function
|
|
2816
|
+
var us = Un, ps = Yn, fs = Xn, ms = Zn;
|
|
2817
|
+
function hs({
|
|
2806
2818
|
className: e,
|
|
2807
2819
|
trackClassName: n,
|
|
2808
2820
|
thumbClassName: t,
|
|
@@ -2817,9 +2829,9 @@ function fs({
|
|
|
2817
2829
|
[r, o, i, s]
|
|
2818
2830
|
);
|
|
2819
2831
|
return /* @__PURE__ */ a.jsxs(
|
|
2820
|
-
|
|
2832
|
+
us,
|
|
2821
2833
|
{
|
|
2822
|
-
className:
|
|
2834
|
+
className: L(
|
|
2823
2835
|
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
2824
2836
|
e
|
|
2825
2837
|
),
|
|
@@ -2831,44 +2843,44 @@ function fs({
|
|
|
2831
2843
|
...l,
|
|
2832
2844
|
children: [
|
|
2833
2845
|
/* @__PURE__ */ a.jsx(
|
|
2834
|
-
|
|
2846
|
+
ps,
|
|
2835
2847
|
{
|
|
2836
|
-
className:
|
|
2848
|
+
className: L(
|
|
2837
2849
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
2838
2850
|
n
|
|
2839
2851
|
),
|
|
2840
2852
|
"data-slot": "slider-track",
|
|
2841
2853
|
children: /* @__PURE__ */ a.jsx(
|
|
2842
|
-
|
|
2854
|
+
fs,
|
|
2843
2855
|
{
|
|
2844
|
-
className:
|
|
2856
|
+
className: L("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"),
|
|
2845
2857
|
"data-slot": "slider-range"
|
|
2846
2858
|
}
|
|
2847
2859
|
)
|
|
2848
2860
|
}
|
|
2849
2861
|
),
|
|
2850
|
-
Array.from({ length: d.length }, (u,
|
|
2851
|
-
|
|
2862
|
+
Array.from({ length: d.length }, (u, f) => /* @__PURE__ */ a.jsx(
|
|
2863
|
+
ms,
|
|
2852
2864
|
{
|
|
2853
|
-
className:
|
|
2865
|
+
className: L(
|
|
2854
2866
|
"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",
|
|
2855
2867
|
t
|
|
2856
2868
|
),
|
|
2857
2869
|
"data-slot": "slider-thumb"
|
|
2858
2870
|
},
|
|
2859
|
-
|
|
2871
|
+
f
|
|
2860
2872
|
))
|
|
2861
2873
|
]
|
|
2862
2874
|
}
|
|
2863
2875
|
);
|
|
2864
2876
|
}
|
|
2865
|
-
const
|
|
2877
|
+
const Hs = ({ size: e = "md", thumbClassName: n, trackClassName: t, value: o, defaultValue: r, ...i }) => {
|
|
2866
2878
|
const s = r !== void 0 ? Array.isArray(r) ? r : [r] : void 0, l = o !== void 0 ? Array.isArray(o) ? o : [o] : void 0;
|
|
2867
2879
|
return /* @__PURE__ */ a.jsx(
|
|
2868
|
-
|
|
2880
|
+
hs,
|
|
2869
2881
|
{
|
|
2870
2882
|
defaultValue: s,
|
|
2871
|
-
thumbClassName:
|
|
2883
|
+
thumbClassName: L(
|
|
2872
2884
|
{
|
|
2873
2885
|
"size-2": e === "xs",
|
|
2874
2886
|
"size-3": e === "sm",
|
|
@@ -2879,7 +2891,7 @@ const Vs = ({ size: e = "md", thumbClassName: n, trackClassName: t, value: o, de
|
|
|
2879
2891
|
"bg-primary",
|
|
2880
2892
|
n
|
|
2881
2893
|
),
|
|
2882
|
-
trackClassName:
|
|
2894
|
+
trackClassName: L(
|
|
2883
2895
|
{
|
|
2884
2896
|
"data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1": e === "xs",
|
|
2885
2897
|
"data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5": e === "sm",
|
|
@@ -2894,7 +2906,7 @@ const Vs = ({ size: e = "md", thumbClassName: n, trackClassName: t, value: o, de
|
|
|
2894
2906
|
}
|
|
2895
2907
|
);
|
|
2896
2908
|
};
|
|
2897
|
-
var Ue = "Switch", [
|
|
2909
|
+
var Ue = "Switch", [vs, Us] = ve(Ue), [gs, xs] = vs(Ue), er = c.forwardRef(
|
|
2898
2910
|
(e, n) => {
|
|
2899
2911
|
const {
|
|
2900
2912
|
__scopeSwitch: t,
|
|
@@ -2905,15 +2917,15 @@ var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Qn = c.forwardRef(
|
|
|
2905
2917
|
disabled: l,
|
|
2906
2918
|
value: d = "on",
|
|
2907
2919
|
onCheckedChange: u,
|
|
2908
|
-
form:
|
|
2909
|
-
...
|
|
2910
|
-
} = e, [g, x] = c.useState(null), S = V(n, (y) => x(y)),
|
|
2920
|
+
form: f,
|
|
2921
|
+
...p
|
|
2922
|
+
} = e, [g, x] = c.useState(null), S = V(n, (y) => x(y)), m = c.useRef(!1), h = g ? f || !!g.closest("form") : !0, [b, w] = de({
|
|
2911
2923
|
prop: r,
|
|
2912
2924
|
defaultProp: i ?? !1,
|
|
2913
2925
|
onChange: u,
|
|
2914
2926
|
caller: Ue
|
|
2915
2927
|
});
|
|
2916
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2928
|
+
return /* @__PURE__ */ a.jsxs(gs, { scope: t, checked: b, disabled: l, children: [
|
|
2917
2929
|
/* @__PURE__ */ a.jsx(
|
|
2918
2930
|
j.button,
|
|
2919
2931
|
{
|
|
@@ -2921,42 +2933,42 @@ var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Qn = c.forwardRef(
|
|
|
2921
2933
|
role: "switch",
|
|
2922
2934
|
"aria-checked": b,
|
|
2923
2935
|
"aria-required": s,
|
|
2924
|
-
"data-state":
|
|
2936
|
+
"data-state": or(b),
|
|
2925
2937
|
"data-disabled": l ? "" : void 0,
|
|
2926
2938
|
disabled: l,
|
|
2927
2939
|
value: d,
|
|
2928
|
-
...
|
|
2940
|
+
...p,
|
|
2929
2941
|
ref: S,
|
|
2930
2942
|
onClick: P(e.onClick, (y) => {
|
|
2931
|
-
w((R) => !R),
|
|
2943
|
+
w((R) => !R), h && (m.current = y.isPropagationStopped(), m.current || y.stopPropagation());
|
|
2932
2944
|
})
|
|
2933
2945
|
}
|
|
2934
2946
|
),
|
|
2935
|
-
|
|
2936
|
-
|
|
2947
|
+
h && /* @__PURE__ */ a.jsx(
|
|
2948
|
+
rr,
|
|
2937
2949
|
{
|
|
2938
2950
|
control: g,
|
|
2939
|
-
bubbles: !
|
|
2951
|
+
bubbles: !m.current,
|
|
2940
2952
|
name: o,
|
|
2941
2953
|
value: d,
|
|
2942
2954
|
checked: b,
|
|
2943
2955
|
required: s,
|
|
2944
2956
|
disabled: l,
|
|
2945
|
-
form:
|
|
2957
|
+
form: f,
|
|
2946
2958
|
style: { transform: "translateX(-100%)" }
|
|
2947
2959
|
}
|
|
2948
2960
|
)
|
|
2949
2961
|
] });
|
|
2950
2962
|
}
|
|
2951
2963
|
);
|
|
2952
|
-
|
|
2953
|
-
var
|
|
2964
|
+
er.displayName = Ue;
|
|
2965
|
+
var tr = "SwitchThumb", nr = c.forwardRef(
|
|
2954
2966
|
(e, n) => {
|
|
2955
|
-
const { __scopeSwitch: t, ...o } = e, r =
|
|
2967
|
+
const { __scopeSwitch: t, ...o } = e, r = xs(tr, t);
|
|
2956
2968
|
return /* @__PURE__ */ a.jsx(
|
|
2957
2969
|
j.span,
|
|
2958
2970
|
{
|
|
2959
|
-
"data-state":
|
|
2971
|
+
"data-state": or(r.checked),
|
|
2960
2972
|
"data-disabled": r.disabled ? "" : void 0,
|
|
2961
2973
|
...o,
|
|
2962
2974
|
ref: n
|
|
@@ -2964,8 +2976,8 @@ var er = "SwitchThumb", tr = c.forwardRef(
|
|
|
2964
2976
|
);
|
|
2965
2977
|
}
|
|
2966
2978
|
);
|
|
2967
|
-
|
|
2968
|
-
var
|
|
2979
|
+
nr.displayName = tr;
|
|
2980
|
+
var bs = "SwitchBubbleInput", rr = c.forwardRef(
|
|
2969
2981
|
({
|
|
2970
2982
|
__scopeSwitch: e,
|
|
2971
2983
|
control: n,
|
|
@@ -2975,15 +2987,15 @@ var gs = "SwitchBubbleInput", nr = c.forwardRef(
|
|
|
2975
2987
|
}, i) => {
|
|
2976
2988
|
const s = c.useRef(null), l = V(s, i), d = _e(t), u = De(n);
|
|
2977
2989
|
return c.useEffect(() => {
|
|
2978
|
-
const
|
|
2979
|
-
if (!
|
|
2980
|
-
const
|
|
2981
|
-
|
|
2990
|
+
const f = s.current;
|
|
2991
|
+
if (!f) return;
|
|
2992
|
+
const p = window.HTMLInputElement.prototype, x = Object.getOwnPropertyDescriptor(
|
|
2993
|
+
p,
|
|
2982
2994
|
"checked"
|
|
2983
2995
|
).set;
|
|
2984
2996
|
if (d !== t && x) {
|
|
2985
2997
|
const S = new Event("click", { bubbles: o });
|
|
2986
|
-
x.call(
|
|
2998
|
+
x.call(f, t), f.dispatchEvent(S);
|
|
2987
2999
|
}
|
|
2988
3000
|
}, [d, t, o]), /* @__PURE__ */ a.jsx(
|
|
2989
3001
|
"input",
|
|
@@ -3006,29 +3018,29 @@ var gs = "SwitchBubbleInput", nr = c.forwardRef(
|
|
|
3006
3018
|
);
|
|
3007
3019
|
}
|
|
3008
3020
|
);
|
|
3009
|
-
|
|
3010
|
-
function
|
|
3021
|
+
rr.displayName = bs;
|
|
3022
|
+
function or(e) {
|
|
3011
3023
|
return e ? "checked" : "unchecked";
|
|
3012
3024
|
}
|
|
3013
|
-
var
|
|
3014
|
-
function
|
|
3025
|
+
var Ss = er, ws = nr;
|
|
3026
|
+
function ys({
|
|
3015
3027
|
className: e,
|
|
3016
3028
|
thumbClassName: n,
|
|
3017
3029
|
...t
|
|
3018
3030
|
}) {
|
|
3019
3031
|
return /* @__PURE__ */ a.jsx(
|
|
3020
|
-
|
|
3032
|
+
Ss,
|
|
3021
3033
|
{
|
|
3022
|
-
className:
|
|
3034
|
+
className: L(
|
|
3023
3035
|
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
3024
3036
|
e
|
|
3025
3037
|
),
|
|
3026
3038
|
"data-slot": "switch",
|
|
3027
3039
|
...t,
|
|
3028
3040
|
children: /* @__PURE__ */ a.jsx(
|
|
3029
|
-
|
|
3041
|
+
ws,
|
|
3030
3042
|
{
|
|
3031
|
-
className:
|
|
3043
|
+
className: L(
|
|
3032
3044
|
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0",
|
|
3033
3045
|
n
|
|
3034
3046
|
),
|
|
@@ -3038,7 +3050,7 @@ function Ss({
|
|
|
3038
3050
|
}
|
|
3039
3051
|
);
|
|
3040
3052
|
}
|
|
3041
|
-
const
|
|
3053
|
+
const Gs = ({
|
|
3042
3054
|
id: e,
|
|
3043
3055
|
label: n,
|
|
3044
3056
|
className: t,
|
|
@@ -3047,13 +3059,13 @@ const Hs = ({
|
|
|
3047
3059
|
size: i = "md",
|
|
3048
3060
|
...s
|
|
3049
3061
|
}) => {
|
|
3050
|
-
const l =
|
|
3062
|
+
const l = Rr(), d = e || l, [u, f] = Array.isArray(n) ? n : [null, n], p = "cursor-pointer", g = r && Array.isArray(r) ? r[0] : r, x = r && Array.isArray(r) ? r[1] : r;
|
|
3051
3063
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3052
|
-
u && /* @__PURE__ */ a.jsx(ue, { className:
|
|
3064
|
+
u && /* @__PURE__ */ a.jsx(ue, { className: L(p, g), htmlFor: d, size: i, children: u }),
|
|
3053
3065
|
/* @__PURE__ */ a.jsx(
|
|
3054
|
-
|
|
3066
|
+
ys,
|
|
3055
3067
|
{
|
|
3056
|
-
className:
|
|
3068
|
+
className: L(
|
|
3057
3069
|
{
|
|
3058
3070
|
"h-[10px] w-4": i === "xs",
|
|
3059
3071
|
"h-[14px] w-6": i === "sm",
|
|
@@ -3064,7 +3076,7 @@ const Hs = ({
|
|
|
3064
3076
|
t
|
|
3065
3077
|
),
|
|
3066
3078
|
id: d,
|
|
3067
|
-
thumbClassName:
|
|
3079
|
+
thumbClassName: L(
|
|
3068
3080
|
{
|
|
3069
3081
|
"size-2": i === "xs",
|
|
3070
3082
|
"size-3": i === "sm",
|
|
@@ -3077,23 +3089,23 @@ const Hs = ({
|
|
|
3077
3089
|
...s
|
|
3078
3090
|
}
|
|
3079
3091
|
),
|
|
3080
|
-
/* @__PURE__ */ a.jsx(ue, { className:
|
|
3092
|
+
/* @__PURE__ */ a.jsx(ue, { className: L(p, x), htmlFor: d, size: i, children: f })
|
|
3081
3093
|
] });
|
|
3082
3094
|
};
|
|
3083
3095
|
export {
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3096
|
+
Ms as C,
|
|
3097
|
+
Ps as D,
|
|
3098
|
+
lo as I,
|
|
3099
|
+
vo as L,
|
|
3100
|
+
Os as P,
|
|
3101
|
+
Fs as R,
|
|
3102
|
+
Ns as S,
|
|
3103
|
+
As as a,
|
|
3104
|
+
Ds as b,
|
|
3105
|
+
$s as c,
|
|
3106
|
+
Vs as d,
|
|
3107
|
+
Hs as e,
|
|
3108
|
+
Gs as f,
|
|
3097
3109
|
Mt as g,
|
|
3098
|
-
|
|
3110
|
+
co as h
|
|
3099
3111
|
};
|