@krosoft/react 0.0.71 → 0.0.73
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/KpiCards-Bjsd4bSz.js +40 -0
- package/dist/{SearchInput-LIey3bo9.js → SearchInput-Bu4wb0gI.js} +10 -9
- package/dist/ThemeSelector-DMgBLEYm.js +49 -0
- package/dist/Topbar-CFALRIJn.js +168 -0
- package/dist/{badge-Cj2EQgcL.js → badge-C4pCH7IL.js} +1 -1
- package/dist/components/core/cards/KpiCards.d.ts.map +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +10 -8
- package/dist/components/core/inputs/index.js +1 -1
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/theme/ThemeSelector.d.ts +8 -0
- package/dist/components/core/theme/ThemeSelector.d.ts.map +1 -0
- package/dist/components/core/theme/index.d.ts +3 -0
- package/dist/components/core/theme/index.d.ts.map +1 -0
- package/dist/components/core/theme/index.js +4 -0
- package/dist/components/index.js +41 -30
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +27 -18
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +16 -112
- package/dist/hooks/ui/useTheme.d.ts +20 -0
- package/dist/hooks/ui/useTheme.d.ts.map +1 -0
- package/dist/index-BQOmHRsD.js +1662 -0
- package/dist/select-CdiR6cO0.js +2020 -0
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/tailwind/index.js +3 -1
- package/dist/{toast-B6CC_ory.js → toast-BypnW71k.js} +1 -1
- package/dist/tooltip-Dep8OR3c.js +779 -0
- package/dist/useTheme-D__o7mLN.js +122 -0
- package/package.json +10 -2
- package/dist/KpiCards-D4Cy8CLT.js +0 -38
- package/dist/Topbar-CtXJ337W.js +0 -2314
- package/dist/index-BNCR478R.js +0 -272
|
@@ -0,0 +1,2020 @@
|
|
|
1
|
+
import { jsx as v, jsxs as ie, Fragment as Ze } from "react/jsx-runtime";
|
|
2
|
+
import { c as te } from "./index-gWiv5-6R.js";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import ae, { useState as _n } from "react";
|
|
5
|
+
import * as qe from "react-dom";
|
|
6
|
+
import Mn from "react-dom";
|
|
7
|
+
import { q as Qe, u as k, a as Ae, d as Ln, e as M, f as ve, g as Dn, h as kn, p as G, o as Bn, s as Fn, i as Wn, j as Hn, k as Vn, m as Un, n as $n, l as Kn, t as Je, v as rt, C as gt } from "./index-BQOmHRsD.js";
|
|
8
|
+
import { c as yt } from "./createLucideIcon-CRdjzt2A.js";
|
|
9
|
+
/**
|
|
10
|
+
* @license lucide-react v1.16.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const Yn = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], jn = yt("check", Yn);
|
|
16
|
+
/**
|
|
17
|
+
* @license lucide-react v1.16.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
const zn = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Xn = yt("chevron-up", zn);
|
|
23
|
+
function ot(e, [t, n]) {
|
|
24
|
+
return Math.min(n, Math.max(t, e));
|
|
25
|
+
}
|
|
26
|
+
function Gn(e) {
|
|
27
|
+
const t = e + "CollectionProvider", [n, r] = Qe(t), [a, s] = n(
|
|
28
|
+
t,
|
|
29
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
30
|
+
), l = (c) => {
|
|
31
|
+
const { scope: p, children: g } = c, f = ae.useRef(null), m = ae.useRef(/* @__PURE__ */ new Map()).current;
|
|
32
|
+
return /* @__PURE__ */ v(a, { scope: p, itemMap: m, collectionRef: f, children: g });
|
|
33
|
+
};
|
|
34
|
+
l.displayName = t;
|
|
35
|
+
const i = e + "CollectionSlot", u = Ae(i), d = ae.forwardRef(
|
|
36
|
+
(c, p) => {
|
|
37
|
+
const { scope: g, children: f } = c, m = s(i, g), b = k(p, m.collectionRef);
|
|
38
|
+
return /* @__PURE__ */ v(u, { ref: b, children: f });
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
d.displayName = i;
|
|
42
|
+
const h = e + "CollectionItemSlot", y = "data-radix-collection-item", w = Ae(h), S = ae.forwardRef(
|
|
43
|
+
(c, p) => {
|
|
44
|
+
const { scope: g, children: f, ...m } = c, b = ae.useRef(null), P = k(p, b), R = s(h, g);
|
|
45
|
+
return ae.useEffect(() => (R.itemMap.set(b, { ref: b, ...m }), () => void R.itemMap.delete(b))), /* @__PURE__ */ v(w, { [y]: "", ref: P, children: f });
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
S.displayName = h;
|
|
49
|
+
function E(c) {
|
|
50
|
+
const p = s(e + "CollectionConsumer", c);
|
|
51
|
+
return ae.useCallback(() => {
|
|
52
|
+
const f = p.collectionRef.current;
|
|
53
|
+
if (!f) return [];
|
|
54
|
+
const m = Array.from(f.querySelectorAll(`[${y}]`));
|
|
55
|
+
return Array.from(p.itemMap.values()).sort(
|
|
56
|
+
(R, C) => m.indexOf(R.ref.current) - m.indexOf(C.ref.current)
|
|
57
|
+
);
|
|
58
|
+
}, [p.collectionRef, p.itemMap]);
|
|
59
|
+
}
|
|
60
|
+
return [
|
|
61
|
+
{ Provider: l, Slot: d, ItemSlot: S },
|
|
62
|
+
E,
|
|
63
|
+
r
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
var Zn = o.createContext(void 0);
|
|
67
|
+
function qn(e) {
|
|
68
|
+
const t = o.useContext(Zn);
|
|
69
|
+
return e || t || "ltr";
|
|
70
|
+
}
|
|
71
|
+
var Qn = [
|
|
72
|
+
"a",
|
|
73
|
+
"button",
|
|
74
|
+
"div",
|
|
75
|
+
"form",
|
|
76
|
+
"h2",
|
|
77
|
+
"h3",
|
|
78
|
+
"img",
|
|
79
|
+
"input",
|
|
80
|
+
"label",
|
|
81
|
+
"li",
|
|
82
|
+
"nav",
|
|
83
|
+
"ol",
|
|
84
|
+
"p",
|
|
85
|
+
"select",
|
|
86
|
+
"span",
|
|
87
|
+
"svg",
|
|
88
|
+
"ul"
|
|
89
|
+
], _ = Qn.reduce((e, t) => {
|
|
90
|
+
const n = Ae(`Primitive.${t}`), r = o.forwardRef((a, s) => {
|
|
91
|
+
const { asChild: l, ...i } = a, u = l ? n : t;
|
|
92
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(u, { ...i, ref: s });
|
|
93
|
+
});
|
|
94
|
+
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
95
|
+
}, {});
|
|
96
|
+
function Jn(e, t) {
|
|
97
|
+
e && qe.flushSync(() => e.dispatchEvent(t));
|
|
98
|
+
}
|
|
99
|
+
var er = "DismissableLayer", $e = "dismissableLayer.update", tr = "dismissableLayer.pointerDownOutside", nr = "dismissableLayer.focusOutside", at, wt = o.createContext({
|
|
100
|
+
layers: /* @__PURE__ */ new Set(),
|
|
101
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
102
|
+
branches: /* @__PURE__ */ new Set()
|
|
103
|
+
}), St = o.forwardRef(
|
|
104
|
+
(e, t) => {
|
|
105
|
+
const {
|
|
106
|
+
disableOutsidePointerEvents: n = !1,
|
|
107
|
+
onEscapeKeyDown: r,
|
|
108
|
+
onPointerDownOutside: a,
|
|
109
|
+
onFocusOutside: s,
|
|
110
|
+
onInteractOutside: l,
|
|
111
|
+
onDismiss: i,
|
|
112
|
+
...u
|
|
113
|
+
} = e, d = o.useContext(wt), [h, y] = o.useState(null), w = (h == null ? void 0 : h.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, S] = o.useState({}), E = k(t, (C) => y(C)), c = Array.from(d.layers), [p] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), g = c.indexOf(p), f = h ? c.indexOf(h) : -1, m = d.layersWithOutsidePointerEventsDisabled.size > 0, b = f >= g, P = ar((C) => {
|
|
114
|
+
const O = C.target, L = [...d.branches].some((H) => H.contains(O));
|
|
115
|
+
!b || L || (a == null || a(C), l == null || l(C), C.defaultPrevented || i == null || i());
|
|
116
|
+
}, w), R = ir((C) => {
|
|
117
|
+
const O = C.target;
|
|
118
|
+
[...d.branches].some((H) => H.contains(O)) || (s == null || s(C), l == null || l(C), C.defaultPrevented || i == null || i());
|
|
119
|
+
}, w);
|
|
120
|
+
return Ln((C) => {
|
|
121
|
+
f === d.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && i && (C.preventDefault(), i()));
|
|
122
|
+
}, w), o.useEffect(() => {
|
|
123
|
+
if (h)
|
|
124
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (at = w.body.style.pointerEvents, w.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(h)), d.layers.add(h), it(), () => {
|
|
125
|
+
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (w.body.style.pointerEvents = at);
|
|
126
|
+
};
|
|
127
|
+
}, [h, w, n, d]), o.useEffect(() => () => {
|
|
128
|
+
h && (d.layers.delete(h), d.layersWithOutsidePointerEventsDisabled.delete(h), it());
|
|
129
|
+
}, [h, d]), o.useEffect(() => {
|
|
130
|
+
const C = () => S({});
|
|
131
|
+
return document.addEventListener($e, C), () => document.removeEventListener($e, C);
|
|
132
|
+
}, []), /* @__PURE__ */ v(
|
|
133
|
+
_.div,
|
|
134
|
+
{
|
|
135
|
+
...u,
|
|
136
|
+
ref: E,
|
|
137
|
+
style: {
|
|
138
|
+
pointerEvents: m ? b ? "auto" : "none" : void 0,
|
|
139
|
+
...e.style
|
|
140
|
+
},
|
|
141
|
+
onFocusCapture: M(e.onFocusCapture, R.onFocusCapture),
|
|
142
|
+
onBlurCapture: M(e.onBlurCapture, R.onBlurCapture),
|
|
143
|
+
onPointerDownCapture: M(
|
|
144
|
+
e.onPointerDownCapture,
|
|
145
|
+
P.onPointerDownCapture
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
St.displayName = er;
|
|
152
|
+
var rr = "DismissableLayerBranch", or = o.forwardRef((e, t) => {
|
|
153
|
+
const n = o.useContext(wt), r = o.useRef(null), a = k(t, r);
|
|
154
|
+
return o.useEffect(() => {
|
|
155
|
+
const s = r.current;
|
|
156
|
+
if (s)
|
|
157
|
+
return n.branches.add(s), () => {
|
|
158
|
+
n.branches.delete(s);
|
|
159
|
+
};
|
|
160
|
+
}, [n.branches]), /* @__PURE__ */ v(_.div, { ...e, ref: a });
|
|
161
|
+
});
|
|
162
|
+
or.displayName = rr;
|
|
163
|
+
function ar(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
164
|
+
const n = ve(e), r = o.useRef(!1), a = o.useRef(() => {
|
|
165
|
+
});
|
|
166
|
+
return o.useEffect(() => {
|
|
167
|
+
const s = (i) => {
|
|
168
|
+
if (i.target && !r.current) {
|
|
169
|
+
let u = function() {
|
|
170
|
+
bt(
|
|
171
|
+
tr,
|
|
172
|
+
n,
|
|
173
|
+
d,
|
|
174
|
+
{ discrete: !0 }
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
const d = { originalEvent: i };
|
|
178
|
+
i.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = u, t.addEventListener("click", a.current, { once: !0 })) : u();
|
|
179
|
+
} else
|
|
180
|
+
t.removeEventListener("click", a.current);
|
|
181
|
+
r.current = !1;
|
|
182
|
+
}, l = window.setTimeout(() => {
|
|
183
|
+
t.addEventListener("pointerdown", s);
|
|
184
|
+
}, 0);
|
|
185
|
+
return () => {
|
|
186
|
+
window.clearTimeout(l), t.removeEventListener("pointerdown", s), t.removeEventListener("click", a.current);
|
|
187
|
+
};
|
|
188
|
+
}, [t, n]), {
|
|
189
|
+
// ensures we check React component tree (not just DOM tree)
|
|
190
|
+
onPointerDownCapture: () => r.current = !0
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function ir(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
194
|
+
const n = ve(e), r = o.useRef(!1);
|
|
195
|
+
return o.useEffect(() => {
|
|
196
|
+
const a = (s) => {
|
|
197
|
+
s.target && !r.current && bt(nr, n, { originalEvent: s }, {
|
|
198
|
+
discrete: !1
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
return t.addEventListener("focusin", a), () => t.removeEventListener("focusin", a);
|
|
202
|
+
}, [t, n]), {
|
|
203
|
+
onFocusCapture: () => r.current = !0,
|
|
204
|
+
onBlurCapture: () => r.current = !1
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function it() {
|
|
208
|
+
const e = new CustomEvent($e);
|
|
209
|
+
document.dispatchEvent(e);
|
|
210
|
+
}
|
|
211
|
+
function bt(e, t, n, { discrete: r }) {
|
|
212
|
+
const a = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
213
|
+
t && a.addEventListener(e, t, { once: !0 }), r ? Jn(a, s) : a.dispatchEvent(s);
|
|
214
|
+
}
|
|
215
|
+
var ke = 0;
|
|
216
|
+
function sr() {
|
|
217
|
+
o.useEffect(() => {
|
|
218
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
219
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? st()), document.body.insertAdjacentElement("beforeend", e[1] ?? st()), ke++, () => {
|
|
220
|
+
ke === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ke--;
|
|
221
|
+
};
|
|
222
|
+
}, []);
|
|
223
|
+
}
|
|
224
|
+
function st() {
|
|
225
|
+
const e = document.createElement("span");
|
|
226
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
227
|
+
}
|
|
228
|
+
var Be = "focusScope.autoFocusOnMount", Fe = "focusScope.autoFocusOnUnmount", ct = { bubbles: !1, cancelable: !0 }, cr = "FocusScope", Ct = o.forwardRef((e, t) => {
|
|
229
|
+
const {
|
|
230
|
+
loop: n = !1,
|
|
231
|
+
trapped: r = !1,
|
|
232
|
+
onMountAutoFocus: a,
|
|
233
|
+
onUnmountAutoFocus: s,
|
|
234
|
+
...l
|
|
235
|
+
} = e, [i, u] = o.useState(null), d = ve(a), h = ve(s), y = o.useRef(null), w = k(t, (c) => u(c)), S = o.useRef({
|
|
236
|
+
paused: !1,
|
|
237
|
+
pause() {
|
|
238
|
+
this.paused = !0;
|
|
239
|
+
},
|
|
240
|
+
resume() {
|
|
241
|
+
this.paused = !1;
|
|
242
|
+
}
|
|
243
|
+
}).current;
|
|
244
|
+
o.useEffect(() => {
|
|
245
|
+
if (r) {
|
|
246
|
+
let c = function(m) {
|
|
247
|
+
if (S.paused || !i) return;
|
|
248
|
+
const b = m.target;
|
|
249
|
+
i.contains(b) ? y.current = b : ee(y.current, { select: !0 });
|
|
250
|
+
}, p = function(m) {
|
|
251
|
+
if (S.paused || !i) return;
|
|
252
|
+
const b = m.relatedTarget;
|
|
253
|
+
b !== null && (i.contains(b) || ee(y.current, { select: !0 }));
|
|
254
|
+
}, g = function(m) {
|
|
255
|
+
if (document.activeElement === document.body)
|
|
256
|
+
for (const P of m)
|
|
257
|
+
P.removedNodes.length > 0 && ee(i);
|
|
258
|
+
};
|
|
259
|
+
document.addEventListener("focusin", c), document.addEventListener("focusout", p);
|
|
260
|
+
const f = new MutationObserver(g);
|
|
261
|
+
return i && f.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
262
|
+
document.removeEventListener("focusin", c), document.removeEventListener("focusout", p), f.disconnect();
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}, [r, i, S.paused]), o.useEffect(() => {
|
|
266
|
+
if (i) {
|
|
267
|
+
ut.add(S);
|
|
268
|
+
const c = document.activeElement;
|
|
269
|
+
if (!i.contains(c)) {
|
|
270
|
+
const g = new CustomEvent(Be, ct);
|
|
271
|
+
i.addEventListener(Be, d), i.dispatchEvent(g), g.defaultPrevented || (lr(vr(Et(i)), { select: !0 }), document.activeElement === c && ee(i));
|
|
272
|
+
}
|
|
273
|
+
return () => {
|
|
274
|
+
i.removeEventListener(Be, d), setTimeout(() => {
|
|
275
|
+
const g = new CustomEvent(Fe, ct);
|
|
276
|
+
i.addEventListener(Fe, h), i.dispatchEvent(g), g.defaultPrevented || ee(c ?? document.body, { select: !0 }), i.removeEventListener(Fe, h), ut.remove(S);
|
|
277
|
+
}, 0);
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
}, [i, d, h, S]);
|
|
281
|
+
const E = o.useCallback(
|
|
282
|
+
(c) => {
|
|
283
|
+
if (!n && !r || S.paused) return;
|
|
284
|
+
const p = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, g = document.activeElement;
|
|
285
|
+
if (p && g) {
|
|
286
|
+
const f = c.currentTarget, [m, b] = ur(f);
|
|
287
|
+
m && b ? !c.shiftKey && g === b ? (c.preventDefault(), n && ee(m, { select: !0 })) : c.shiftKey && g === m && (c.preventDefault(), n && ee(b, { select: !0 })) : g === f && c.preventDefault();
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
[n, r, S.paused]
|
|
291
|
+
);
|
|
292
|
+
return /* @__PURE__ */ v(_.div, { tabIndex: -1, ...l, ref: w, onKeyDown: E });
|
|
293
|
+
});
|
|
294
|
+
Ct.displayName = cr;
|
|
295
|
+
function lr(e, { select: t = !1 } = {}) {
|
|
296
|
+
const n = document.activeElement;
|
|
297
|
+
for (const r of e)
|
|
298
|
+
if (ee(r, { select: t }), document.activeElement !== n) return;
|
|
299
|
+
}
|
|
300
|
+
function ur(e) {
|
|
301
|
+
const t = Et(e), n = lt(t, e), r = lt(t.reverse(), e);
|
|
302
|
+
return [n, r];
|
|
303
|
+
}
|
|
304
|
+
function Et(e) {
|
|
305
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
306
|
+
acceptNode: (r) => {
|
|
307
|
+
const a = r.tagName === "INPUT" && r.type === "hidden";
|
|
308
|
+
return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
312
|
+
return t;
|
|
313
|
+
}
|
|
314
|
+
function lt(e, t) {
|
|
315
|
+
for (const n of e)
|
|
316
|
+
if (!dr(n, { upTo: t })) return n;
|
|
317
|
+
}
|
|
318
|
+
function dr(e, { upTo: t }) {
|
|
319
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
320
|
+
for (; e; ) {
|
|
321
|
+
if (t !== void 0 && e === t) return !1;
|
|
322
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
323
|
+
e = e.parentElement;
|
|
324
|
+
}
|
|
325
|
+
return !1;
|
|
326
|
+
}
|
|
327
|
+
function fr(e) {
|
|
328
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
329
|
+
}
|
|
330
|
+
function ee(e, { select: t = !1 } = {}) {
|
|
331
|
+
if (e && e.focus) {
|
|
332
|
+
const n = document.activeElement;
|
|
333
|
+
e.focus({ preventScroll: !0 }), e !== n && fr(e) && t && e.select();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
var ut = pr();
|
|
337
|
+
function pr() {
|
|
338
|
+
let e = [];
|
|
339
|
+
return {
|
|
340
|
+
add(t) {
|
|
341
|
+
const n = e[0];
|
|
342
|
+
t !== n && (n == null || n.pause()), e = dt(e, t), e.unshift(t);
|
|
343
|
+
},
|
|
344
|
+
remove(t) {
|
|
345
|
+
var n;
|
|
346
|
+
e = dt(e, t), (n = e[0]) == null || n.resume();
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function dt(e, t) {
|
|
351
|
+
const n = [...e], r = n.indexOf(t);
|
|
352
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
353
|
+
}
|
|
354
|
+
function vr(e) {
|
|
355
|
+
return e.filter((t) => t.tagName !== "A");
|
|
356
|
+
}
|
|
357
|
+
var hr = "Arrow", xt = o.forwardRef((e, t) => {
|
|
358
|
+
const { children: n, width: r = 10, height: a = 5, ...s } = e;
|
|
359
|
+
return /* @__PURE__ */ v(
|
|
360
|
+
_.svg,
|
|
361
|
+
{
|
|
362
|
+
...s,
|
|
363
|
+
ref: t,
|
|
364
|
+
width: r,
|
|
365
|
+
height: a,
|
|
366
|
+
viewBox: "0 0 30 10",
|
|
367
|
+
preserveAspectRatio: "none",
|
|
368
|
+
children: e.asChild ? n : /* @__PURE__ */ v("polygon", { points: "0,0 30,0 15,10" })
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
});
|
|
372
|
+
xt.displayName = hr;
|
|
373
|
+
var mr = xt, et = "Popper", [Pt, Rt] = Qe(et), [gr, Nt] = Pt(et), Tt = (e) => {
|
|
374
|
+
const { __scopePopper: t, children: n } = e, [r, a] = o.useState(null);
|
|
375
|
+
return /* @__PURE__ */ v(gr, { scope: t, anchor: r, onAnchorChange: a, children: n });
|
|
376
|
+
};
|
|
377
|
+
Tt.displayName = et;
|
|
378
|
+
var It = "PopperAnchor", At = o.forwardRef(
|
|
379
|
+
(e, t) => {
|
|
380
|
+
const { __scopePopper: n, virtualRef: r, ...a } = e, s = Nt(It, n), l = o.useRef(null), i = k(t, l), u = o.useRef(null);
|
|
381
|
+
return o.useEffect(() => {
|
|
382
|
+
const d = u.current;
|
|
383
|
+
u.current = (r == null ? void 0 : r.current) || l.current, d !== u.current && s.onAnchorChange(u.current);
|
|
384
|
+
}), r ? null : /* @__PURE__ */ v(_.div, { ...a, ref: i });
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
At.displayName = It;
|
|
388
|
+
var tt = "PopperContent", [yr, wr] = Pt(tt), Ot = o.forwardRef(
|
|
389
|
+
(e, t) => {
|
|
390
|
+
var x, A, W, I, N, T;
|
|
391
|
+
const {
|
|
392
|
+
__scopePopper: n,
|
|
393
|
+
side: r = "bottom",
|
|
394
|
+
sideOffset: a = 0,
|
|
395
|
+
align: s = "center",
|
|
396
|
+
alignOffset: l = 0,
|
|
397
|
+
arrowPadding: i = 0,
|
|
398
|
+
avoidCollisions: u = !0,
|
|
399
|
+
collisionBoundary: d = [],
|
|
400
|
+
collisionPadding: h = 0,
|
|
401
|
+
sticky: y = "partial",
|
|
402
|
+
hideWhenDetached: w = !1,
|
|
403
|
+
updatePositionStrategy: S = "optimized",
|
|
404
|
+
onPlaced: E,
|
|
405
|
+
...c
|
|
406
|
+
} = e, p = Nt(tt, n), [g, f] = o.useState(null), m = k(t, (K) => f(K)), [b, P] = o.useState(null), R = Dn(b), C = (R == null ? void 0 : R.width) ?? 0, O = (R == null ? void 0 : R.height) ?? 0, L = r + (s !== "center" ? "-" + s : ""), H = typeof h == "number" ? h : { top: 0, right: 0, bottom: 0, left: 0, ...h }, D = Array.isArray(d) ? d : [d], U = D.length > 0, $ = {
|
|
407
|
+
padding: H,
|
|
408
|
+
boundary: D.filter(br),
|
|
409
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
410
|
+
altBoundary: U
|
|
411
|
+
}, { refs: j, floatingStyles: Y, placement: B, isPositioned: V, middlewareData: F } = kn({
|
|
412
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
413
|
+
strategy: "fixed",
|
|
414
|
+
placement: L,
|
|
415
|
+
whileElementsMounted: (...K) => $n(...K, {
|
|
416
|
+
animationFrame: S === "always"
|
|
417
|
+
}),
|
|
418
|
+
elements: {
|
|
419
|
+
reference: p.anchor
|
|
420
|
+
},
|
|
421
|
+
middleware: [
|
|
422
|
+
Bn({ mainAxis: a + O, alignmentAxis: l }),
|
|
423
|
+
u && Fn({
|
|
424
|
+
mainAxis: !0,
|
|
425
|
+
crossAxis: !1,
|
|
426
|
+
limiter: y === "partial" ? Kn() : void 0,
|
|
427
|
+
...$
|
|
428
|
+
}),
|
|
429
|
+
u && Wn({ ...$ }),
|
|
430
|
+
Hn({
|
|
431
|
+
...$,
|
|
432
|
+
apply: ({ elements: K, rects: Z, availableWidth: we, availableHeight: Se }) => {
|
|
433
|
+
const { width: be, height: On } = Z.reference, Ee = K.floating.style;
|
|
434
|
+
Ee.setProperty("--radix-popper-available-width", `${we}px`), Ee.setProperty("--radix-popper-available-height", `${Se}px`), Ee.setProperty("--radix-popper-anchor-width", `${be}px`), Ee.setProperty("--radix-popper-anchor-height", `${On}px`);
|
|
435
|
+
}
|
|
436
|
+
}),
|
|
437
|
+
b && Vn({ element: b, padding: i }),
|
|
438
|
+
Cr({ arrowWidth: C, arrowHeight: O }),
|
|
439
|
+
w && Un({ strategy: "referenceHidden", ...$ })
|
|
440
|
+
]
|
|
441
|
+
}), [z, me] = Lt(B), Q = ve(E);
|
|
442
|
+
G(() => {
|
|
443
|
+
V && (Q == null || Q());
|
|
444
|
+
}, [V, Q]);
|
|
445
|
+
const ge = (x = F.arrow) == null ? void 0 : x.x, ye = (A = F.arrow) == null ? void 0 : A.y, J = ((W = F.arrow) == null ? void 0 : W.centerOffset) !== 0, [le, oe] = o.useState();
|
|
446
|
+
return G(() => {
|
|
447
|
+
g && oe(window.getComputedStyle(g).zIndex);
|
|
448
|
+
}, [g]), /* @__PURE__ */ v(
|
|
449
|
+
"div",
|
|
450
|
+
{
|
|
451
|
+
ref: j.setFloating,
|
|
452
|
+
"data-radix-popper-content-wrapper": "",
|
|
453
|
+
style: {
|
|
454
|
+
...Y,
|
|
455
|
+
transform: V ? Y.transform : "translate(0, -200%)",
|
|
456
|
+
// keep off the page when measuring
|
|
457
|
+
minWidth: "max-content",
|
|
458
|
+
zIndex: le,
|
|
459
|
+
"--radix-popper-transform-origin": [
|
|
460
|
+
(I = F.transformOrigin) == null ? void 0 : I.x,
|
|
461
|
+
(N = F.transformOrigin) == null ? void 0 : N.y
|
|
462
|
+
].join(" "),
|
|
463
|
+
// hide the content if using the hide middleware and should be hidden
|
|
464
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
465
|
+
// as if the PopperContent isn't there at all
|
|
466
|
+
...((T = F.hide) == null ? void 0 : T.referenceHidden) && {
|
|
467
|
+
visibility: "hidden",
|
|
468
|
+
pointerEvents: "none"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
dir: e.dir,
|
|
472
|
+
children: /* @__PURE__ */ v(
|
|
473
|
+
yr,
|
|
474
|
+
{
|
|
475
|
+
scope: n,
|
|
476
|
+
placedSide: z,
|
|
477
|
+
onArrowChange: P,
|
|
478
|
+
arrowX: ge,
|
|
479
|
+
arrowY: ye,
|
|
480
|
+
shouldHideArrow: J,
|
|
481
|
+
children: /* @__PURE__ */ v(
|
|
482
|
+
_.div,
|
|
483
|
+
{
|
|
484
|
+
"data-side": z,
|
|
485
|
+
"data-align": me,
|
|
486
|
+
...c,
|
|
487
|
+
ref: m,
|
|
488
|
+
style: {
|
|
489
|
+
...c.style,
|
|
490
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
491
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
492
|
+
animation: V ? void 0 : "none"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
}
|
|
497
|
+
)
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
Ot.displayName = tt;
|
|
503
|
+
var _t = "PopperArrow", Sr = {
|
|
504
|
+
top: "bottom",
|
|
505
|
+
right: "left",
|
|
506
|
+
bottom: "top",
|
|
507
|
+
left: "right"
|
|
508
|
+
}, Mt = o.forwardRef(function(t, n) {
|
|
509
|
+
const { __scopePopper: r, ...a } = t, s = wr(_t, r), l = Sr[s.placedSide];
|
|
510
|
+
return (
|
|
511
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
512
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
513
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
514
|
+
/* @__PURE__ */ v(
|
|
515
|
+
"span",
|
|
516
|
+
{
|
|
517
|
+
ref: s.onArrowChange,
|
|
518
|
+
style: {
|
|
519
|
+
position: "absolute",
|
|
520
|
+
left: s.arrowX,
|
|
521
|
+
top: s.arrowY,
|
|
522
|
+
[l]: 0,
|
|
523
|
+
transformOrigin: {
|
|
524
|
+
top: "",
|
|
525
|
+
right: "0 0",
|
|
526
|
+
bottom: "center 0",
|
|
527
|
+
left: "100% 0"
|
|
528
|
+
}[s.placedSide],
|
|
529
|
+
transform: {
|
|
530
|
+
top: "translateY(100%)",
|
|
531
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
532
|
+
bottom: "rotate(180deg)",
|
|
533
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
534
|
+
}[s.placedSide],
|
|
535
|
+
visibility: s.shouldHideArrow ? "hidden" : void 0
|
|
536
|
+
},
|
|
537
|
+
children: /* @__PURE__ */ v(
|
|
538
|
+
mr,
|
|
539
|
+
{
|
|
540
|
+
...a,
|
|
541
|
+
ref: n,
|
|
542
|
+
style: {
|
|
543
|
+
...a.style,
|
|
544
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
545
|
+
display: "block"
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
)
|
|
549
|
+
}
|
|
550
|
+
)
|
|
551
|
+
);
|
|
552
|
+
});
|
|
553
|
+
Mt.displayName = _t;
|
|
554
|
+
function br(e) {
|
|
555
|
+
return e !== null;
|
|
556
|
+
}
|
|
557
|
+
var Cr = (e) => ({
|
|
558
|
+
name: "transformOrigin",
|
|
559
|
+
options: e,
|
|
560
|
+
fn(t) {
|
|
561
|
+
var p, g, f;
|
|
562
|
+
const { placement: n, rects: r, middlewareData: a } = t, l = ((p = a.arrow) == null ? void 0 : p.centerOffset) !== 0, i = l ? 0 : e.arrowWidth, u = l ? 0 : e.arrowHeight, [d, h] = Lt(n), y = { start: "0%", center: "50%", end: "100%" }[h], w = (((g = a.arrow) == null ? void 0 : g.x) ?? 0) + i / 2, S = (((f = a.arrow) == null ? void 0 : f.y) ?? 0) + u / 2;
|
|
563
|
+
let E = "", c = "";
|
|
564
|
+
return d === "bottom" ? (E = l ? y : `${w}px`, c = `${-u}px`) : d === "top" ? (E = l ? y : `${w}px`, c = `${r.floating.height + u}px`) : d === "right" ? (E = `${-u}px`, c = l ? y : `${S}px`) : d === "left" && (E = `${r.floating.width + u}px`, c = l ? y : `${S}px`), { data: { x: E, y: c } };
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
function Lt(e) {
|
|
568
|
+
const [t, n = "center"] = e.split("-");
|
|
569
|
+
return [t, n];
|
|
570
|
+
}
|
|
571
|
+
var Er = Tt, xr = At, Pr = Ot, Rr = Mt, Nr = "Portal", Dt = o.forwardRef((e, t) => {
|
|
572
|
+
var i;
|
|
573
|
+
const { container: n, ...r } = e, [a, s] = o.useState(!1);
|
|
574
|
+
G(() => s(!0), []);
|
|
575
|
+
const l = n || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
576
|
+
return l ? Mn.createPortal(/* @__PURE__ */ v(_.div, { ...r, ref: t }), l) : null;
|
|
577
|
+
});
|
|
578
|
+
Dt.displayName = Nr;
|
|
579
|
+
function Tr(e) {
|
|
580
|
+
const t = o.useRef({ value: e, previous: e });
|
|
581
|
+
return o.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
582
|
+
}
|
|
583
|
+
var kt = Object.freeze({
|
|
584
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
585
|
+
position: "absolute",
|
|
586
|
+
border: 0,
|
|
587
|
+
width: 1,
|
|
588
|
+
height: 1,
|
|
589
|
+
padding: 0,
|
|
590
|
+
margin: -1,
|
|
591
|
+
overflow: "hidden",
|
|
592
|
+
clip: "rect(0, 0, 0, 0)",
|
|
593
|
+
whiteSpace: "nowrap",
|
|
594
|
+
wordWrap: "normal"
|
|
595
|
+
}), Ir = "VisuallyHidden", Ar = o.forwardRef(
|
|
596
|
+
(e, t) => /* @__PURE__ */ v(
|
|
597
|
+
_.span,
|
|
598
|
+
{
|
|
599
|
+
...e,
|
|
600
|
+
ref: t,
|
|
601
|
+
style: { ...kt, ...e.style }
|
|
602
|
+
}
|
|
603
|
+
)
|
|
604
|
+
);
|
|
605
|
+
Ar.displayName = Ir;
|
|
606
|
+
var Or = function(e) {
|
|
607
|
+
if (typeof document > "u")
|
|
608
|
+
return null;
|
|
609
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
610
|
+
return t.ownerDocument.body;
|
|
611
|
+
}, ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Pe = {}, We = 0, Bt = function(e) {
|
|
612
|
+
return e && (e.host || Bt(e.parentNode));
|
|
613
|
+
}, _r = function(e, t) {
|
|
614
|
+
return t.map(function(n) {
|
|
615
|
+
if (e.contains(n))
|
|
616
|
+
return n;
|
|
617
|
+
var r = Bt(n);
|
|
618
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
619
|
+
}).filter(function(n) {
|
|
620
|
+
return !!n;
|
|
621
|
+
});
|
|
622
|
+
}, Mr = function(e, t, n, r) {
|
|
623
|
+
var a = _r(t, Array.isArray(e) ? e : [e]);
|
|
624
|
+
Pe[n] || (Pe[n] = /* @__PURE__ */ new WeakMap());
|
|
625
|
+
var s = Pe[n], l = [], i = /* @__PURE__ */ new Set(), u = new Set(a), d = function(y) {
|
|
626
|
+
!y || i.has(y) || (i.add(y), d(y.parentNode));
|
|
627
|
+
};
|
|
628
|
+
a.forEach(d);
|
|
629
|
+
var h = function(y) {
|
|
630
|
+
!y || u.has(y) || Array.prototype.forEach.call(y.children, function(w) {
|
|
631
|
+
if (i.has(w))
|
|
632
|
+
h(w);
|
|
633
|
+
else
|
|
634
|
+
try {
|
|
635
|
+
var S = w.getAttribute(r), E = S !== null && S !== "false", c = (ue.get(w) || 0) + 1, p = (s.get(w) || 0) + 1;
|
|
636
|
+
ue.set(w, c), s.set(w, p), l.push(w), c === 1 && E && xe.set(w, !0), p === 1 && w.setAttribute(n, "true"), E || w.setAttribute(r, "true");
|
|
637
|
+
} catch (g) {
|
|
638
|
+
console.error("aria-hidden: cannot operate on ", w, g);
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
return h(t), i.clear(), We++, function() {
|
|
643
|
+
l.forEach(function(y) {
|
|
644
|
+
var w = ue.get(y) - 1, S = s.get(y) - 1;
|
|
645
|
+
ue.set(y, w), s.set(y, S), w || (xe.has(y) || y.removeAttribute(r), xe.delete(y)), S || y.removeAttribute(n);
|
|
646
|
+
}), We--, We || (ue = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Pe = {});
|
|
647
|
+
};
|
|
648
|
+
}, Lr = function(e, t, n) {
|
|
649
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
650
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), a = Or(e);
|
|
651
|
+
return a ? (r.push.apply(r, Array.from(a.querySelectorAll("[aria-live], script"))), Mr(r, a, n, "aria-hidden")) : function() {
|
|
652
|
+
return null;
|
|
653
|
+
};
|
|
654
|
+
}, q = function() {
|
|
655
|
+
return q = Object.assign || function(t) {
|
|
656
|
+
for (var n, r = 1, a = arguments.length; r < a; r++) {
|
|
657
|
+
n = arguments[r];
|
|
658
|
+
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
|
|
659
|
+
}
|
|
660
|
+
return t;
|
|
661
|
+
}, q.apply(this, arguments);
|
|
662
|
+
};
|
|
663
|
+
function Ft(e, t) {
|
|
664
|
+
var n = {};
|
|
665
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
666
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
667
|
+
for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
668
|
+
t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
|
|
669
|
+
return n;
|
|
670
|
+
}
|
|
671
|
+
function Dr(e, t, n) {
|
|
672
|
+
if (n || arguments.length === 2) for (var r = 0, a = t.length, s; r < a; r++)
|
|
673
|
+
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
674
|
+
return e.concat(s || Array.prototype.slice.call(t));
|
|
675
|
+
}
|
|
676
|
+
var Te = "right-scroll-bar-position", Ie = "width-before-scroll-bar", kr = "with-scroll-bars-hidden", Br = "--removed-body-scroll-bar-size";
|
|
677
|
+
function He(e, t) {
|
|
678
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
679
|
+
}
|
|
680
|
+
function Fr(e, t) {
|
|
681
|
+
var n = _n(function() {
|
|
682
|
+
return {
|
|
683
|
+
// value
|
|
684
|
+
value: e,
|
|
685
|
+
// last callback
|
|
686
|
+
callback: t,
|
|
687
|
+
// "memoized" public interface
|
|
688
|
+
facade: {
|
|
689
|
+
get current() {
|
|
690
|
+
return n.value;
|
|
691
|
+
},
|
|
692
|
+
set current(r) {
|
|
693
|
+
var a = n.value;
|
|
694
|
+
a !== r && (n.value = r, n.callback(r, a));
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
})[0];
|
|
699
|
+
return n.callback = t, n.facade;
|
|
700
|
+
}
|
|
701
|
+
var Wr = typeof window < "u" ? o.useLayoutEffect : o.useEffect, ft = /* @__PURE__ */ new WeakMap();
|
|
702
|
+
function Hr(e, t) {
|
|
703
|
+
var n = Fr(null, function(r) {
|
|
704
|
+
return e.forEach(function(a) {
|
|
705
|
+
return He(a, r);
|
|
706
|
+
});
|
|
707
|
+
});
|
|
708
|
+
return Wr(function() {
|
|
709
|
+
var r = ft.get(n);
|
|
710
|
+
if (r) {
|
|
711
|
+
var a = new Set(r), s = new Set(e), l = n.current;
|
|
712
|
+
a.forEach(function(i) {
|
|
713
|
+
s.has(i) || He(i, null);
|
|
714
|
+
}), s.forEach(function(i) {
|
|
715
|
+
a.has(i) || He(i, l);
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
ft.set(n, e);
|
|
719
|
+
}, [e]), n;
|
|
720
|
+
}
|
|
721
|
+
function Vr(e) {
|
|
722
|
+
return e;
|
|
723
|
+
}
|
|
724
|
+
function Ur(e, t) {
|
|
725
|
+
t === void 0 && (t = Vr);
|
|
726
|
+
var n = [], r = !1, a = {
|
|
727
|
+
read: function() {
|
|
728
|
+
if (r)
|
|
729
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
730
|
+
return n.length ? n[n.length - 1] : e;
|
|
731
|
+
},
|
|
732
|
+
useMedium: function(s) {
|
|
733
|
+
var l = t(s, r);
|
|
734
|
+
return n.push(l), function() {
|
|
735
|
+
n = n.filter(function(i) {
|
|
736
|
+
return i !== l;
|
|
737
|
+
});
|
|
738
|
+
};
|
|
739
|
+
},
|
|
740
|
+
assignSyncMedium: function(s) {
|
|
741
|
+
for (r = !0; n.length; ) {
|
|
742
|
+
var l = n;
|
|
743
|
+
n = [], l.forEach(s);
|
|
744
|
+
}
|
|
745
|
+
n = {
|
|
746
|
+
push: function(i) {
|
|
747
|
+
return s(i);
|
|
748
|
+
},
|
|
749
|
+
filter: function() {
|
|
750
|
+
return n;
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
},
|
|
754
|
+
assignMedium: function(s) {
|
|
755
|
+
r = !0;
|
|
756
|
+
var l = [];
|
|
757
|
+
if (n.length) {
|
|
758
|
+
var i = n;
|
|
759
|
+
n = [], i.forEach(s), l = n;
|
|
760
|
+
}
|
|
761
|
+
var u = function() {
|
|
762
|
+
var h = l;
|
|
763
|
+
l = [], h.forEach(s);
|
|
764
|
+
}, d = function() {
|
|
765
|
+
return Promise.resolve().then(u);
|
|
766
|
+
};
|
|
767
|
+
d(), n = {
|
|
768
|
+
push: function(h) {
|
|
769
|
+
l.push(h), d();
|
|
770
|
+
},
|
|
771
|
+
filter: function(h) {
|
|
772
|
+
return l = l.filter(h), n;
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
return a;
|
|
778
|
+
}
|
|
779
|
+
function $r(e) {
|
|
780
|
+
e === void 0 && (e = {});
|
|
781
|
+
var t = Ur(null);
|
|
782
|
+
return t.options = q({ async: !0, ssr: !1 }, e), t;
|
|
783
|
+
}
|
|
784
|
+
var Wt = function(e) {
|
|
785
|
+
var t = e.sideCar, n = Ft(e, ["sideCar"]);
|
|
786
|
+
if (!t)
|
|
787
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
788
|
+
var r = t.read();
|
|
789
|
+
if (!r)
|
|
790
|
+
throw new Error("Sidecar medium not found");
|
|
791
|
+
return o.createElement(r, q({}, n));
|
|
792
|
+
};
|
|
793
|
+
Wt.isSideCarExport = !0;
|
|
794
|
+
function Kr(e, t) {
|
|
795
|
+
return e.useMedium(t), Wt;
|
|
796
|
+
}
|
|
797
|
+
var Ht = $r(), Ve = function() {
|
|
798
|
+
}, _e = o.forwardRef(function(e, t) {
|
|
799
|
+
var n = o.useRef(null), r = o.useState({
|
|
800
|
+
onScrollCapture: Ve,
|
|
801
|
+
onWheelCapture: Ve,
|
|
802
|
+
onTouchMoveCapture: Ve
|
|
803
|
+
}), a = r[0], s = r[1], l = e.forwardProps, i = e.children, u = e.className, d = e.removeScrollBar, h = e.enabled, y = e.shards, w = e.sideCar, S = e.noRelative, E = e.noIsolation, c = e.inert, p = e.allowPinchZoom, g = e.as, f = g === void 0 ? "div" : g, m = e.gapMode, b = Ft(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), P = w, R = Hr([n, t]), C = q(q({}, b), a);
|
|
804
|
+
return o.createElement(
|
|
805
|
+
o.Fragment,
|
|
806
|
+
null,
|
|
807
|
+
h && o.createElement(P, { sideCar: Ht, removeScrollBar: d, shards: y, noRelative: S, noIsolation: E, inert: c, setCallbacks: s, allowPinchZoom: !!p, lockRef: n, gapMode: m }),
|
|
808
|
+
l ? o.cloneElement(o.Children.only(i), q(q({}, C), { ref: R })) : o.createElement(f, q({}, C, { className: u, ref: R }), i)
|
|
809
|
+
);
|
|
810
|
+
});
|
|
811
|
+
_e.defaultProps = {
|
|
812
|
+
enabled: !0,
|
|
813
|
+
removeScrollBar: !0,
|
|
814
|
+
inert: !1
|
|
815
|
+
};
|
|
816
|
+
_e.classNames = {
|
|
817
|
+
fullWidth: Ie,
|
|
818
|
+
zeroRight: Te
|
|
819
|
+
};
|
|
820
|
+
var Yr = function() {
|
|
821
|
+
if (typeof __webpack_nonce__ < "u")
|
|
822
|
+
return __webpack_nonce__;
|
|
823
|
+
};
|
|
824
|
+
function jr() {
|
|
825
|
+
if (!document)
|
|
826
|
+
return null;
|
|
827
|
+
var e = document.createElement("style");
|
|
828
|
+
e.type = "text/css";
|
|
829
|
+
var t = Yr();
|
|
830
|
+
return t && e.setAttribute("nonce", t), e;
|
|
831
|
+
}
|
|
832
|
+
function zr(e, t) {
|
|
833
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
834
|
+
}
|
|
835
|
+
function Xr(e) {
|
|
836
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
837
|
+
t.appendChild(e);
|
|
838
|
+
}
|
|
839
|
+
var Gr = function() {
|
|
840
|
+
var e = 0, t = null;
|
|
841
|
+
return {
|
|
842
|
+
add: function(n) {
|
|
843
|
+
e == 0 && (t = jr()) && (zr(t, n), Xr(t)), e++;
|
|
844
|
+
},
|
|
845
|
+
remove: function() {
|
|
846
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
}, Zr = function() {
|
|
850
|
+
var e = Gr();
|
|
851
|
+
return function(t, n) {
|
|
852
|
+
o.useEffect(function() {
|
|
853
|
+
return e.add(t), function() {
|
|
854
|
+
e.remove();
|
|
855
|
+
};
|
|
856
|
+
}, [t && n]);
|
|
857
|
+
};
|
|
858
|
+
}, Vt = function() {
|
|
859
|
+
var e = Zr(), t = function(n) {
|
|
860
|
+
var r = n.styles, a = n.dynamic;
|
|
861
|
+
return e(r, a), null;
|
|
862
|
+
};
|
|
863
|
+
return t;
|
|
864
|
+
}, qr = {
|
|
865
|
+
left: 0,
|
|
866
|
+
top: 0,
|
|
867
|
+
right: 0,
|
|
868
|
+
gap: 0
|
|
869
|
+
}, Ue = function(e) {
|
|
870
|
+
return parseInt(e || "", 10) || 0;
|
|
871
|
+
}, Qr = function(e) {
|
|
872
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
873
|
+
return [Ue(n), Ue(r), Ue(a)];
|
|
874
|
+
}, Jr = function(e) {
|
|
875
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
876
|
+
return qr;
|
|
877
|
+
var t = Qr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
878
|
+
return {
|
|
879
|
+
left: t[0],
|
|
880
|
+
top: t[1],
|
|
881
|
+
right: t[2],
|
|
882
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
883
|
+
};
|
|
884
|
+
}, eo = Vt(), pe = "data-scroll-locked", to = function(e, t, n, r) {
|
|
885
|
+
var a = e.left, s = e.top, l = e.right, i = e.gap;
|
|
886
|
+
return n === void 0 && (n = "margin"), `
|
|
887
|
+
.`.concat(kr, ` {
|
|
888
|
+
overflow: hidden `).concat(r, `;
|
|
889
|
+
padding-right: `).concat(i, "px ").concat(r, `;
|
|
890
|
+
}
|
|
891
|
+
body[`).concat(pe, `] {
|
|
892
|
+
overflow: hidden `).concat(r, `;
|
|
893
|
+
overscroll-behavior: contain;
|
|
894
|
+
`).concat([
|
|
895
|
+
t && "position: relative ".concat(r, ";"),
|
|
896
|
+
n === "margin" && `
|
|
897
|
+
padding-left: `.concat(a, `px;
|
|
898
|
+
padding-top: `).concat(s, `px;
|
|
899
|
+
padding-right: `).concat(l, `px;
|
|
900
|
+
margin-left:0;
|
|
901
|
+
margin-top:0;
|
|
902
|
+
margin-right: `).concat(i, "px ").concat(r, `;
|
|
903
|
+
`),
|
|
904
|
+
n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
|
|
905
|
+
].filter(Boolean).join(""), `
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.`).concat(Te, ` {
|
|
909
|
+
right: `).concat(i, "px ").concat(r, `;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.`).concat(Ie, ` {
|
|
913
|
+
margin-right: `).concat(i, "px ").concat(r, `;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.`).concat(Te, " .").concat(Te, ` {
|
|
917
|
+
right: 0 `).concat(r, `;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.`).concat(Ie, " .").concat(Ie, ` {
|
|
921
|
+
margin-right: 0 `).concat(r, `;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
body[`).concat(pe, `] {
|
|
925
|
+
`).concat(Br, ": ").concat(i, `px;
|
|
926
|
+
}
|
|
927
|
+
`);
|
|
928
|
+
}, pt = function() {
|
|
929
|
+
var e = parseInt(document.body.getAttribute(pe) || "0", 10);
|
|
930
|
+
return isFinite(e) ? e : 0;
|
|
931
|
+
}, no = function() {
|
|
932
|
+
o.useEffect(function() {
|
|
933
|
+
return document.body.setAttribute(pe, (pt() + 1).toString()), function() {
|
|
934
|
+
var e = pt() - 1;
|
|
935
|
+
e <= 0 ? document.body.removeAttribute(pe) : document.body.setAttribute(pe, e.toString());
|
|
936
|
+
};
|
|
937
|
+
}, []);
|
|
938
|
+
}, ro = function(e) {
|
|
939
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
|
|
940
|
+
no();
|
|
941
|
+
var s = o.useMemo(function() {
|
|
942
|
+
return Jr(a);
|
|
943
|
+
}, [a]);
|
|
944
|
+
return o.createElement(eo, { styles: to(s, !t, a, n ? "" : "!important") });
|
|
945
|
+
}, Ke = !1;
|
|
946
|
+
if (typeof window < "u")
|
|
947
|
+
try {
|
|
948
|
+
var Re = Object.defineProperty({}, "passive", {
|
|
949
|
+
get: function() {
|
|
950
|
+
return Ke = !0, !0;
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
window.addEventListener("test", Re, Re), window.removeEventListener("test", Re, Re);
|
|
954
|
+
} catch {
|
|
955
|
+
Ke = !1;
|
|
956
|
+
}
|
|
957
|
+
var de = Ke ? { passive: !1 } : !1, oo = function(e) {
|
|
958
|
+
return e.tagName === "TEXTAREA";
|
|
959
|
+
}, Ut = function(e, t) {
|
|
960
|
+
if (!(e instanceof Element))
|
|
961
|
+
return !1;
|
|
962
|
+
var n = window.getComputedStyle(e);
|
|
963
|
+
return (
|
|
964
|
+
// not-not-scrollable
|
|
965
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
966
|
+
!(n.overflowY === n.overflowX && !oo(e) && n[t] === "visible")
|
|
967
|
+
);
|
|
968
|
+
}, ao = function(e) {
|
|
969
|
+
return Ut(e, "overflowY");
|
|
970
|
+
}, io = function(e) {
|
|
971
|
+
return Ut(e, "overflowX");
|
|
972
|
+
}, vt = function(e, t) {
|
|
973
|
+
var n = t.ownerDocument, r = t;
|
|
974
|
+
do {
|
|
975
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
976
|
+
var a = $t(e, r);
|
|
977
|
+
if (a) {
|
|
978
|
+
var s = Kt(e, r), l = s[1], i = s[2];
|
|
979
|
+
if (l > i)
|
|
980
|
+
return !0;
|
|
981
|
+
}
|
|
982
|
+
r = r.parentNode;
|
|
983
|
+
} while (r && r !== n.body);
|
|
984
|
+
return !1;
|
|
985
|
+
}, so = function(e) {
|
|
986
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
987
|
+
return [
|
|
988
|
+
t,
|
|
989
|
+
n,
|
|
990
|
+
r
|
|
991
|
+
];
|
|
992
|
+
}, co = function(e) {
|
|
993
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
994
|
+
return [
|
|
995
|
+
t,
|
|
996
|
+
n,
|
|
997
|
+
r
|
|
998
|
+
];
|
|
999
|
+
}, $t = function(e, t) {
|
|
1000
|
+
return e === "v" ? ao(t) : io(t);
|
|
1001
|
+
}, Kt = function(e, t) {
|
|
1002
|
+
return e === "v" ? so(t) : co(t);
|
|
1003
|
+
}, lo = function(e, t) {
|
|
1004
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1005
|
+
}, uo = function(e, t, n, r, a) {
|
|
1006
|
+
var s = lo(e, window.getComputedStyle(t).direction), l = s * r, i = n.target, u = t.contains(i), d = !1, h = l > 0, y = 0, w = 0;
|
|
1007
|
+
do {
|
|
1008
|
+
if (!i)
|
|
1009
|
+
break;
|
|
1010
|
+
var S = Kt(e, i), E = S[0], c = S[1], p = S[2], g = c - p - s * E;
|
|
1011
|
+
(E || g) && $t(e, i) && (y += g, w += E);
|
|
1012
|
+
var f = i.parentNode;
|
|
1013
|
+
i = f && f.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? f.host : f;
|
|
1014
|
+
} while (
|
|
1015
|
+
// portaled content
|
|
1016
|
+
!u && i !== document.body || // self content
|
|
1017
|
+
u && (t.contains(i) || t === i)
|
|
1018
|
+
);
|
|
1019
|
+
return (h && Math.abs(y) < 1 || !h && Math.abs(w) < 1) && (d = !0), d;
|
|
1020
|
+
}, Ne = function(e) {
|
|
1021
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1022
|
+
}, ht = function(e) {
|
|
1023
|
+
return [e.deltaX, e.deltaY];
|
|
1024
|
+
}, mt = function(e) {
|
|
1025
|
+
return e && "current" in e ? e.current : e;
|
|
1026
|
+
}, fo = function(e, t) {
|
|
1027
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
1028
|
+
}, po = function(e) {
|
|
1029
|
+
return `
|
|
1030
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1031
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1032
|
+
`);
|
|
1033
|
+
}, vo = 0, fe = [];
|
|
1034
|
+
function ho(e) {
|
|
1035
|
+
var t = o.useRef([]), n = o.useRef([0, 0]), r = o.useRef(), a = o.useState(vo++)[0], s = o.useState(Vt)[0], l = o.useRef(e);
|
|
1036
|
+
o.useEffect(function() {
|
|
1037
|
+
l.current = e;
|
|
1038
|
+
}, [e]), o.useEffect(function() {
|
|
1039
|
+
if (e.inert) {
|
|
1040
|
+
document.body.classList.add("block-interactivity-".concat(a));
|
|
1041
|
+
var c = Dr([e.lockRef.current], (e.shards || []).map(mt), !0).filter(Boolean);
|
|
1042
|
+
return c.forEach(function(p) {
|
|
1043
|
+
return p.classList.add("allow-interactivity-".concat(a));
|
|
1044
|
+
}), function() {
|
|
1045
|
+
document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(p) {
|
|
1046
|
+
return p.classList.remove("allow-interactivity-".concat(a));
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1051
|
+
var i = o.useCallback(function(c, p) {
|
|
1052
|
+
if ("touches" in c && c.touches.length === 2 || c.type === "wheel" && c.ctrlKey)
|
|
1053
|
+
return !l.current.allowPinchZoom;
|
|
1054
|
+
var g = Ne(c), f = n.current, m = "deltaX" in c ? c.deltaX : f[0] - g[0], b = "deltaY" in c ? c.deltaY : f[1] - g[1], P, R = c.target, C = Math.abs(m) > Math.abs(b) ? "h" : "v";
|
|
1055
|
+
if ("touches" in c && C === "h" && R.type === "range")
|
|
1056
|
+
return !1;
|
|
1057
|
+
var O = window.getSelection(), L = O && O.anchorNode, H = L ? L === R || L.contains(R) : !1;
|
|
1058
|
+
if (H)
|
|
1059
|
+
return !1;
|
|
1060
|
+
var D = vt(C, R);
|
|
1061
|
+
if (!D)
|
|
1062
|
+
return !0;
|
|
1063
|
+
if (D ? P = C : (P = C === "v" ? "h" : "v", D = vt(C, R)), !D)
|
|
1064
|
+
return !1;
|
|
1065
|
+
if (!r.current && "changedTouches" in c && (m || b) && (r.current = P), !P)
|
|
1066
|
+
return !0;
|
|
1067
|
+
var U = r.current || P;
|
|
1068
|
+
return uo(U, p, c, U === "h" ? m : b);
|
|
1069
|
+
}, []), u = o.useCallback(function(c) {
|
|
1070
|
+
var p = c;
|
|
1071
|
+
if (!(!fe.length || fe[fe.length - 1] !== s)) {
|
|
1072
|
+
var g = "deltaY" in p ? ht(p) : Ne(p), f = t.current.filter(function(P) {
|
|
1073
|
+
return P.name === p.type && (P.target === p.target || p.target === P.shadowParent) && fo(P.delta, g);
|
|
1074
|
+
})[0];
|
|
1075
|
+
if (f && f.should) {
|
|
1076
|
+
p.cancelable && p.preventDefault();
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
if (!f) {
|
|
1080
|
+
var m = (l.current.shards || []).map(mt).filter(Boolean).filter(function(P) {
|
|
1081
|
+
return P.contains(p.target);
|
|
1082
|
+
}), b = m.length > 0 ? i(p, m[0]) : !l.current.noIsolation;
|
|
1083
|
+
b && p.cancelable && p.preventDefault();
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}, []), d = o.useCallback(function(c, p, g, f) {
|
|
1087
|
+
var m = { name: c, delta: p, target: g, should: f, shadowParent: mo(g) };
|
|
1088
|
+
t.current.push(m), setTimeout(function() {
|
|
1089
|
+
t.current = t.current.filter(function(b) {
|
|
1090
|
+
return b !== m;
|
|
1091
|
+
});
|
|
1092
|
+
}, 1);
|
|
1093
|
+
}, []), h = o.useCallback(function(c) {
|
|
1094
|
+
n.current = Ne(c), r.current = void 0;
|
|
1095
|
+
}, []), y = o.useCallback(function(c) {
|
|
1096
|
+
d(c.type, ht(c), c.target, i(c, e.lockRef.current));
|
|
1097
|
+
}, []), w = o.useCallback(function(c) {
|
|
1098
|
+
d(c.type, Ne(c), c.target, i(c, e.lockRef.current));
|
|
1099
|
+
}, []);
|
|
1100
|
+
o.useEffect(function() {
|
|
1101
|
+
return fe.push(s), e.setCallbacks({
|
|
1102
|
+
onScrollCapture: y,
|
|
1103
|
+
onWheelCapture: y,
|
|
1104
|
+
onTouchMoveCapture: w
|
|
1105
|
+
}), document.addEventListener("wheel", u, de), document.addEventListener("touchmove", u, de), document.addEventListener("touchstart", h, de), function() {
|
|
1106
|
+
fe = fe.filter(function(c) {
|
|
1107
|
+
return c !== s;
|
|
1108
|
+
}), document.removeEventListener("wheel", u, de), document.removeEventListener("touchmove", u, de), document.removeEventListener("touchstart", h, de);
|
|
1109
|
+
};
|
|
1110
|
+
}, []);
|
|
1111
|
+
var S = e.removeScrollBar, E = e.inert;
|
|
1112
|
+
return o.createElement(
|
|
1113
|
+
o.Fragment,
|
|
1114
|
+
null,
|
|
1115
|
+
E ? o.createElement(s, { styles: po(a) }) : null,
|
|
1116
|
+
S ? o.createElement(ro, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1117
|
+
);
|
|
1118
|
+
}
|
|
1119
|
+
function mo(e) {
|
|
1120
|
+
for (var t = null; e !== null; )
|
|
1121
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1122
|
+
return t;
|
|
1123
|
+
}
|
|
1124
|
+
const go = Kr(Ht, ho);
|
|
1125
|
+
var Yt = o.forwardRef(function(e, t) {
|
|
1126
|
+
return o.createElement(_e, q({}, e, { ref: t, sideCar: go }));
|
|
1127
|
+
});
|
|
1128
|
+
Yt.classNames = _e.classNames;
|
|
1129
|
+
var yo = [" ", "Enter", "ArrowUp", "ArrowDown"], wo = [" ", "Enter"], se = "Select", [Me, Le, So] = Gn(se), [he] = Qe(se, [
|
|
1130
|
+
So,
|
|
1131
|
+
Rt
|
|
1132
|
+
]), De = Rt(), [bo, ne] = he(se), [Co, Eo] = he(se), jt = (e) => {
|
|
1133
|
+
const {
|
|
1134
|
+
__scopeSelect: t,
|
|
1135
|
+
children: n,
|
|
1136
|
+
open: r,
|
|
1137
|
+
defaultOpen: a,
|
|
1138
|
+
onOpenChange: s,
|
|
1139
|
+
value: l,
|
|
1140
|
+
defaultValue: i,
|
|
1141
|
+
onValueChange: u,
|
|
1142
|
+
dir: d,
|
|
1143
|
+
name: h,
|
|
1144
|
+
autoComplete: y,
|
|
1145
|
+
disabled: w,
|
|
1146
|
+
required: S,
|
|
1147
|
+
form: E
|
|
1148
|
+
} = e, c = De(t), [p, g] = o.useState(null), [f, m] = o.useState(null), [b, P] = o.useState(!1), R = qn(d), [C, O] = rt({
|
|
1149
|
+
prop: r,
|
|
1150
|
+
defaultProp: a ?? !1,
|
|
1151
|
+
onChange: s,
|
|
1152
|
+
caller: se
|
|
1153
|
+
}), [L, H] = rt({
|
|
1154
|
+
prop: l,
|
|
1155
|
+
defaultProp: i,
|
|
1156
|
+
onChange: u,
|
|
1157
|
+
caller: se
|
|
1158
|
+
}), D = o.useRef(null), U = p ? E || !!p.closest("form") : !0, [$, j] = o.useState(/* @__PURE__ */ new Set()), Y = Array.from($).map((B) => B.props.value).join(";");
|
|
1159
|
+
return /* @__PURE__ */ v(Er, { ...c, children: /* @__PURE__ */ ie(
|
|
1160
|
+
bo,
|
|
1161
|
+
{
|
|
1162
|
+
required: S,
|
|
1163
|
+
scope: t,
|
|
1164
|
+
trigger: p,
|
|
1165
|
+
onTriggerChange: g,
|
|
1166
|
+
valueNode: f,
|
|
1167
|
+
onValueNodeChange: m,
|
|
1168
|
+
valueNodeHasChildren: b,
|
|
1169
|
+
onValueNodeHasChildrenChange: P,
|
|
1170
|
+
contentId: Je(),
|
|
1171
|
+
value: L,
|
|
1172
|
+
onValueChange: H,
|
|
1173
|
+
open: C,
|
|
1174
|
+
onOpenChange: O,
|
|
1175
|
+
dir: R,
|
|
1176
|
+
triggerPointerDownPosRef: D,
|
|
1177
|
+
disabled: w,
|
|
1178
|
+
children: [
|
|
1179
|
+
/* @__PURE__ */ v(Me.Provider, { scope: t, children: /* @__PURE__ */ v(
|
|
1180
|
+
Co,
|
|
1181
|
+
{
|
|
1182
|
+
scope: e.__scopeSelect,
|
|
1183
|
+
onNativeOptionAdd: o.useCallback((B) => {
|
|
1184
|
+
j((V) => new Set(V).add(B));
|
|
1185
|
+
}, []),
|
|
1186
|
+
onNativeOptionRemove: o.useCallback((B) => {
|
|
1187
|
+
j((V) => {
|
|
1188
|
+
const F = new Set(V);
|
|
1189
|
+
return F.delete(B), F;
|
|
1190
|
+
});
|
|
1191
|
+
}, []),
|
|
1192
|
+
children: n
|
|
1193
|
+
}
|
|
1194
|
+
) }),
|
|
1195
|
+
U ? /* @__PURE__ */ ie(
|
|
1196
|
+
yn,
|
|
1197
|
+
{
|
|
1198
|
+
"aria-hidden": !0,
|
|
1199
|
+
required: S,
|
|
1200
|
+
tabIndex: -1,
|
|
1201
|
+
name: h,
|
|
1202
|
+
autoComplete: y,
|
|
1203
|
+
value: L,
|
|
1204
|
+
onChange: (B) => H(B.target.value),
|
|
1205
|
+
disabled: w,
|
|
1206
|
+
form: E,
|
|
1207
|
+
children: [
|
|
1208
|
+
L === void 0 ? /* @__PURE__ */ v("option", { value: "" }) : null,
|
|
1209
|
+
Array.from($)
|
|
1210
|
+
]
|
|
1211
|
+
},
|
|
1212
|
+
Y
|
|
1213
|
+
) : null
|
|
1214
|
+
]
|
|
1215
|
+
}
|
|
1216
|
+
) });
|
|
1217
|
+
};
|
|
1218
|
+
jt.displayName = se;
|
|
1219
|
+
var zt = "SelectTrigger", Xt = o.forwardRef(
|
|
1220
|
+
(e, t) => {
|
|
1221
|
+
const { __scopeSelect: n, disabled: r = !1, ...a } = e, s = De(n), l = ne(zt, n), i = l.disabled || r, u = k(t, l.onTriggerChange), d = Le(n), h = o.useRef("touch"), [y, w, S] = Sn((c) => {
|
|
1222
|
+
const p = d().filter((m) => !m.disabled), g = p.find((m) => m.value === l.value), f = bn(p, c, g);
|
|
1223
|
+
f !== void 0 && l.onValueChange(f.value);
|
|
1224
|
+
}), E = (c) => {
|
|
1225
|
+
i || (l.onOpenChange(!0), S()), c && (l.triggerPointerDownPosRef.current = {
|
|
1226
|
+
x: Math.round(c.pageX),
|
|
1227
|
+
y: Math.round(c.pageY)
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
return /* @__PURE__ */ v(xr, { asChild: !0, ...s, children: /* @__PURE__ */ v(
|
|
1231
|
+
_.button,
|
|
1232
|
+
{
|
|
1233
|
+
type: "button",
|
|
1234
|
+
role: "combobox",
|
|
1235
|
+
"aria-controls": l.contentId,
|
|
1236
|
+
"aria-expanded": l.open,
|
|
1237
|
+
"aria-required": l.required,
|
|
1238
|
+
"aria-autocomplete": "none",
|
|
1239
|
+
dir: l.dir,
|
|
1240
|
+
"data-state": l.open ? "open" : "closed",
|
|
1241
|
+
disabled: i,
|
|
1242
|
+
"data-disabled": i ? "" : void 0,
|
|
1243
|
+
"data-placeholder": wn(l.value) ? "" : void 0,
|
|
1244
|
+
...a,
|
|
1245
|
+
ref: u,
|
|
1246
|
+
onClick: M(a.onClick, (c) => {
|
|
1247
|
+
c.currentTarget.focus(), h.current !== "mouse" && E(c);
|
|
1248
|
+
}),
|
|
1249
|
+
onPointerDown: M(a.onPointerDown, (c) => {
|
|
1250
|
+
h.current = c.pointerType;
|
|
1251
|
+
const p = c.target;
|
|
1252
|
+
p.hasPointerCapture(c.pointerId) && p.releasePointerCapture(c.pointerId), c.button === 0 && c.ctrlKey === !1 && c.pointerType === "mouse" && (E(c), c.preventDefault());
|
|
1253
|
+
}),
|
|
1254
|
+
onKeyDown: M(a.onKeyDown, (c) => {
|
|
1255
|
+
const p = y.current !== "";
|
|
1256
|
+
!(c.ctrlKey || c.altKey || c.metaKey) && c.key.length === 1 && w(c.key), !(p && c.key === " ") && yo.includes(c.key) && (E(), c.preventDefault());
|
|
1257
|
+
})
|
|
1258
|
+
}
|
|
1259
|
+
) });
|
|
1260
|
+
}
|
|
1261
|
+
);
|
|
1262
|
+
Xt.displayName = zt;
|
|
1263
|
+
var Gt = "SelectValue", Zt = o.forwardRef(
|
|
1264
|
+
(e, t) => {
|
|
1265
|
+
const { __scopeSelect: n, className: r, style: a, children: s, placeholder: l = "", ...i } = e, u = ne(Gt, n), { onValueNodeHasChildrenChange: d } = u, h = s !== void 0, y = k(t, u.onValueNodeChange);
|
|
1266
|
+
return G(() => {
|
|
1267
|
+
d(h);
|
|
1268
|
+
}, [d, h]), /* @__PURE__ */ v(
|
|
1269
|
+
_.span,
|
|
1270
|
+
{
|
|
1271
|
+
...i,
|
|
1272
|
+
ref: y,
|
|
1273
|
+
style: { pointerEvents: "none" },
|
|
1274
|
+
children: wn(u.value) ? /* @__PURE__ */ v(Ze, { children: l }) : s
|
|
1275
|
+
}
|
|
1276
|
+
);
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1279
|
+
Zt.displayName = Gt;
|
|
1280
|
+
var xo = "SelectIcon", qt = o.forwardRef(
|
|
1281
|
+
(e, t) => {
|
|
1282
|
+
const { __scopeSelect: n, children: r, ...a } = e;
|
|
1283
|
+
return /* @__PURE__ */ v(_.span, { "aria-hidden": !0, ...a, ref: t, children: r || "▼" });
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
qt.displayName = xo;
|
|
1287
|
+
var Po = "SelectPortal", Qt = (e) => /* @__PURE__ */ v(Dt, { asChild: !0, ...e });
|
|
1288
|
+
Qt.displayName = Po;
|
|
1289
|
+
var ce = "SelectContent", Jt = o.forwardRef(
|
|
1290
|
+
(e, t) => {
|
|
1291
|
+
const n = ne(ce, e.__scopeSelect), [r, a] = o.useState();
|
|
1292
|
+
if (G(() => {
|
|
1293
|
+
a(new DocumentFragment());
|
|
1294
|
+
}, []), !n.open) {
|
|
1295
|
+
const s = r;
|
|
1296
|
+
return s ? qe.createPortal(
|
|
1297
|
+
/* @__PURE__ */ v(en, { scope: e.__scopeSelect, children: /* @__PURE__ */ v(Me.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ v("div", { children: e.children }) }) }),
|
|
1298
|
+
s
|
|
1299
|
+
) : null;
|
|
1300
|
+
}
|
|
1301
|
+
return /* @__PURE__ */ v(tn, { ...e, ref: t });
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
Jt.displayName = ce;
|
|
1305
|
+
var X = 10, [en, re] = he(ce), Ro = "SelectContentImpl", No = Ae("SelectContent.RemoveScroll"), tn = o.forwardRef(
|
|
1306
|
+
(e, t) => {
|
|
1307
|
+
const {
|
|
1308
|
+
__scopeSelect: n,
|
|
1309
|
+
position: r = "item-aligned",
|
|
1310
|
+
onCloseAutoFocus: a,
|
|
1311
|
+
onEscapeKeyDown: s,
|
|
1312
|
+
onPointerDownOutside: l,
|
|
1313
|
+
//
|
|
1314
|
+
// PopperContent props
|
|
1315
|
+
side: i,
|
|
1316
|
+
sideOffset: u,
|
|
1317
|
+
align: d,
|
|
1318
|
+
alignOffset: h,
|
|
1319
|
+
arrowPadding: y,
|
|
1320
|
+
collisionBoundary: w,
|
|
1321
|
+
collisionPadding: S,
|
|
1322
|
+
sticky: E,
|
|
1323
|
+
hideWhenDetached: c,
|
|
1324
|
+
avoidCollisions: p,
|
|
1325
|
+
//
|
|
1326
|
+
...g
|
|
1327
|
+
} = e, f = ne(ce, n), [m, b] = o.useState(null), [P, R] = o.useState(null), C = k(t, (x) => b(x)), [O, L] = o.useState(null), [H, D] = o.useState(
|
|
1328
|
+
null
|
|
1329
|
+
), U = Le(n), [$, j] = o.useState(!1), Y = o.useRef(!1);
|
|
1330
|
+
o.useEffect(() => {
|
|
1331
|
+
if (m) return Lr(m);
|
|
1332
|
+
}, [m]), sr();
|
|
1333
|
+
const B = o.useCallback(
|
|
1334
|
+
(x) => {
|
|
1335
|
+
const [A, ...W] = U().map((T) => T.ref.current), [I] = W.slice(-1), N = document.activeElement;
|
|
1336
|
+
for (const T of x)
|
|
1337
|
+
if (T === N || (T == null || T.scrollIntoView({ block: "nearest" }), T === A && P && (P.scrollTop = 0), T === I && P && (P.scrollTop = P.scrollHeight), T == null || T.focus(), document.activeElement !== N)) return;
|
|
1338
|
+
},
|
|
1339
|
+
[U, P]
|
|
1340
|
+
), V = o.useCallback(
|
|
1341
|
+
() => B([O, m]),
|
|
1342
|
+
[B, O, m]
|
|
1343
|
+
);
|
|
1344
|
+
o.useEffect(() => {
|
|
1345
|
+
$ && V();
|
|
1346
|
+
}, [$, V]);
|
|
1347
|
+
const { onOpenChange: F, triggerPointerDownPosRef: z } = f;
|
|
1348
|
+
o.useEffect(() => {
|
|
1349
|
+
if (m) {
|
|
1350
|
+
let x = { x: 0, y: 0 };
|
|
1351
|
+
const A = (I) => {
|
|
1352
|
+
var N, T;
|
|
1353
|
+
x = {
|
|
1354
|
+
x: Math.abs(Math.round(I.pageX) - (((N = z.current) == null ? void 0 : N.x) ?? 0)),
|
|
1355
|
+
y: Math.abs(Math.round(I.pageY) - (((T = z.current) == null ? void 0 : T.y) ?? 0))
|
|
1356
|
+
};
|
|
1357
|
+
}, W = (I) => {
|
|
1358
|
+
x.x <= 10 && x.y <= 10 ? I.preventDefault() : m.contains(I.target) || F(!1), document.removeEventListener("pointermove", A), z.current = null;
|
|
1359
|
+
};
|
|
1360
|
+
return z.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", W, { capture: !0, once: !0 })), () => {
|
|
1361
|
+
document.removeEventListener("pointermove", A), document.removeEventListener("pointerup", W, { capture: !0 });
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
}, [m, F, z]), o.useEffect(() => {
|
|
1365
|
+
const x = () => F(!1);
|
|
1366
|
+
return window.addEventListener("blur", x), window.addEventListener("resize", x), () => {
|
|
1367
|
+
window.removeEventListener("blur", x), window.removeEventListener("resize", x);
|
|
1368
|
+
};
|
|
1369
|
+
}, [F]);
|
|
1370
|
+
const [me, Q] = Sn((x) => {
|
|
1371
|
+
const A = U().filter((N) => !N.disabled), W = A.find((N) => N.ref.current === document.activeElement), I = bn(A, x, W);
|
|
1372
|
+
I && setTimeout(() => I.ref.current.focus());
|
|
1373
|
+
}), ge = o.useCallback(
|
|
1374
|
+
(x, A, W) => {
|
|
1375
|
+
const I = !Y.current && !W;
|
|
1376
|
+
(f.value !== void 0 && f.value === A || I) && (L(x), I && (Y.current = !0));
|
|
1377
|
+
},
|
|
1378
|
+
[f.value]
|
|
1379
|
+
), ye = o.useCallback(() => m == null ? void 0 : m.focus(), [m]), J = o.useCallback(
|
|
1380
|
+
(x, A, W) => {
|
|
1381
|
+
const I = !Y.current && !W;
|
|
1382
|
+
(f.value !== void 0 && f.value === A || I) && D(x);
|
|
1383
|
+
},
|
|
1384
|
+
[f.value]
|
|
1385
|
+
), le = r === "popper" ? Ye : nn, oe = le === Ye ? {
|
|
1386
|
+
side: i,
|
|
1387
|
+
sideOffset: u,
|
|
1388
|
+
align: d,
|
|
1389
|
+
alignOffset: h,
|
|
1390
|
+
arrowPadding: y,
|
|
1391
|
+
collisionBoundary: w,
|
|
1392
|
+
collisionPadding: S,
|
|
1393
|
+
sticky: E,
|
|
1394
|
+
hideWhenDetached: c,
|
|
1395
|
+
avoidCollisions: p
|
|
1396
|
+
} : {};
|
|
1397
|
+
return /* @__PURE__ */ v(
|
|
1398
|
+
en,
|
|
1399
|
+
{
|
|
1400
|
+
scope: n,
|
|
1401
|
+
content: m,
|
|
1402
|
+
viewport: P,
|
|
1403
|
+
onViewportChange: R,
|
|
1404
|
+
itemRefCallback: ge,
|
|
1405
|
+
selectedItem: O,
|
|
1406
|
+
onItemLeave: ye,
|
|
1407
|
+
itemTextRefCallback: J,
|
|
1408
|
+
focusSelectedItem: V,
|
|
1409
|
+
selectedItemText: H,
|
|
1410
|
+
position: r,
|
|
1411
|
+
isPositioned: $,
|
|
1412
|
+
searchRef: me,
|
|
1413
|
+
children: /* @__PURE__ */ v(Yt, { as: No, allowPinchZoom: !0, children: /* @__PURE__ */ v(
|
|
1414
|
+
Ct,
|
|
1415
|
+
{
|
|
1416
|
+
asChild: !0,
|
|
1417
|
+
trapped: f.open,
|
|
1418
|
+
onMountAutoFocus: (x) => {
|
|
1419
|
+
x.preventDefault();
|
|
1420
|
+
},
|
|
1421
|
+
onUnmountAutoFocus: M(a, (x) => {
|
|
1422
|
+
var A;
|
|
1423
|
+
(A = f.trigger) == null || A.focus({ preventScroll: !0 }), x.preventDefault();
|
|
1424
|
+
}),
|
|
1425
|
+
children: /* @__PURE__ */ v(
|
|
1426
|
+
St,
|
|
1427
|
+
{
|
|
1428
|
+
asChild: !0,
|
|
1429
|
+
disableOutsidePointerEvents: !0,
|
|
1430
|
+
onEscapeKeyDown: s,
|
|
1431
|
+
onPointerDownOutside: l,
|
|
1432
|
+
onFocusOutside: (x) => x.preventDefault(),
|
|
1433
|
+
onDismiss: () => f.onOpenChange(!1),
|
|
1434
|
+
children: /* @__PURE__ */ v(
|
|
1435
|
+
le,
|
|
1436
|
+
{
|
|
1437
|
+
role: "listbox",
|
|
1438
|
+
id: f.contentId,
|
|
1439
|
+
"data-state": f.open ? "open" : "closed",
|
|
1440
|
+
dir: f.dir,
|
|
1441
|
+
onContextMenu: (x) => x.preventDefault(),
|
|
1442
|
+
...g,
|
|
1443
|
+
...oe,
|
|
1444
|
+
onPlaced: () => j(!0),
|
|
1445
|
+
ref: C,
|
|
1446
|
+
style: {
|
|
1447
|
+
// flex layout so we can place the scroll buttons properly
|
|
1448
|
+
display: "flex",
|
|
1449
|
+
flexDirection: "column",
|
|
1450
|
+
// reset the outline by default as the content MAY get focused
|
|
1451
|
+
outline: "none",
|
|
1452
|
+
...g.style
|
|
1453
|
+
},
|
|
1454
|
+
onKeyDown: M(g.onKeyDown, (x) => {
|
|
1455
|
+
const A = x.ctrlKey || x.altKey || x.metaKey;
|
|
1456
|
+
if (x.key === "Tab" && x.preventDefault(), !A && x.key.length === 1 && Q(x.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(x.key)) {
|
|
1457
|
+
let I = U().filter((N) => !N.disabled).map((N) => N.ref.current);
|
|
1458
|
+
if (["ArrowUp", "End"].includes(x.key) && (I = I.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(x.key)) {
|
|
1459
|
+
const N = x.target, T = I.indexOf(N);
|
|
1460
|
+
I = I.slice(T + 1);
|
|
1461
|
+
}
|
|
1462
|
+
setTimeout(() => B(I)), x.preventDefault();
|
|
1463
|
+
}
|
|
1464
|
+
})
|
|
1465
|
+
}
|
|
1466
|
+
)
|
|
1467
|
+
}
|
|
1468
|
+
)
|
|
1469
|
+
}
|
|
1470
|
+
) })
|
|
1471
|
+
}
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
1475
|
+
tn.displayName = Ro;
|
|
1476
|
+
var To = "SelectItemAlignedPosition", nn = o.forwardRef((e, t) => {
|
|
1477
|
+
const { __scopeSelect: n, onPlaced: r, ...a } = e, s = ne(ce, n), l = re(ce, n), [i, u] = o.useState(null), [d, h] = o.useState(null), y = k(t, (C) => h(C)), w = Le(n), S = o.useRef(!1), E = o.useRef(!0), { viewport: c, selectedItem: p, selectedItemText: g, focusSelectedItem: f } = l, m = o.useCallback(() => {
|
|
1478
|
+
if (s.trigger && s.valueNode && i && d && c && p && g) {
|
|
1479
|
+
const C = s.trigger.getBoundingClientRect(), O = d.getBoundingClientRect(), L = s.valueNode.getBoundingClientRect(), H = g.getBoundingClientRect();
|
|
1480
|
+
if (s.dir !== "rtl") {
|
|
1481
|
+
const N = H.left - O.left, T = L.left - N, K = C.left - T, Z = C.width + K, we = Math.max(Z, O.width), Se = window.innerWidth - X, be = ot(T, [
|
|
1482
|
+
X,
|
|
1483
|
+
// Prevents the content from going off the starting edge of the
|
|
1484
|
+
// viewport. It may still go off the ending edge, but this can be
|
|
1485
|
+
// controlled by the user since they may want to manage overflow in a
|
|
1486
|
+
// specific way.
|
|
1487
|
+
// https://github.com/radix-ui/primitives/issues/2049
|
|
1488
|
+
Math.max(X, Se - we)
|
|
1489
|
+
]);
|
|
1490
|
+
i.style.minWidth = Z + "px", i.style.left = be + "px";
|
|
1491
|
+
} else {
|
|
1492
|
+
const N = O.right - H.right, T = window.innerWidth - L.right - N, K = window.innerWidth - C.right - T, Z = C.width + K, we = Math.max(Z, O.width), Se = window.innerWidth - X, be = ot(T, [
|
|
1493
|
+
X,
|
|
1494
|
+
Math.max(X, Se - we)
|
|
1495
|
+
]);
|
|
1496
|
+
i.style.minWidth = Z + "px", i.style.right = be + "px";
|
|
1497
|
+
}
|
|
1498
|
+
const D = w(), U = window.innerHeight - X * 2, $ = c.scrollHeight, j = window.getComputedStyle(d), Y = parseInt(j.borderTopWidth, 10), B = parseInt(j.paddingTop, 10), V = parseInt(j.borderBottomWidth, 10), F = parseInt(j.paddingBottom, 10), z = Y + B + $ + F + V, me = Math.min(p.offsetHeight * 5, z), Q = window.getComputedStyle(c), ge = parseInt(Q.paddingTop, 10), ye = parseInt(Q.paddingBottom, 10), J = C.top + C.height / 2 - X, le = U - J, oe = p.offsetHeight / 2, x = p.offsetTop + oe, A = Y + B + x, W = z - A;
|
|
1499
|
+
if (A <= J) {
|
|
1500
|
+
const N = D.length > 0 && p === D[D.length - 1].ref.current;
|
|
1501
|
+
i.style.bottom = "0px";
|
|
1502
|
+
const T = d.clientHeight - c.offsetTop - c.offsetHeight, K = Math.max(
|
|
1503
|
+
le,
|
|
1504
|
+
oe + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
1505
|
+
(N ? ye : 0) + T + V
|
|
1506
|
+
), Z = A + K;
|
|
1507
|
+
i.style.height = Z + "px";
|
|
1508
|
+
} else {
|
|
1509
|
+
const N = D.length > 0 && p === D[0].ref.current;
|
|
1510
|
+
i.style.top = "0px";
|
|
1511
|
+
const K = Math.max(
|
|
1512
|
+
J,
|
|
1513
|
+
Y + c.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
1514
|
+
(N ? ge : 0) + oe
|
|
1515
|
+
) + W;
|
|
1516
|
+
i.style.height = K + "px", c.scrollTop = A - J + c.offsetTop;
|
|
1517
|
+
}
|
|
1518
|
+
i.style.margin = `${X}px 0`, i.style.minHeight = me + "px", i.style.maxHeight = U + "px", r == null || r(), requestAnimationFrame(() => S.current = !0);
|
|
1519
|
+
}
|
|
1520
|
+
}, [
|
|
1521
|
+
w,
|
|
1522
|
+
s.trigger,
|
|
1523
|
+
s.valueNode,
|
|
1524
|
+
i,
|
|
1525
|
+
d,
|
|
1526
|
+
c,
|
|
1527
|
+
p,
|
|
1528
|
+
g,
|
|
1529
|
+
s.dir,
|
|
1530
|
+
r
|
|
1531
|
+
]);
|
|
1532
|
+
G(() => m(), [m]);
|
|
1533
|
+
const [b, P] = o.useState();
|
|
1534
|
+
G(() => {
|
|
1535
|
+
d && P(window.getComputedStyle(d).zIndex);
|
|
1536
|
+
}, [d]);
|
|
1537
|
+
const R = o.useCallback(
|
|
1538
|
+
(C) => {
|
|
1539
|
+
C && E.current === !0 && (m(), f == null || f(), E.current = !1);
|
|
1540
|
+
},
|
|
1541
|
+
[m, f]
|
|
1542
|
+
);
|
|
1543
|
+
return /* @__PURE__ */ v(
|
|
1544
|
+
Ao,
|
|
1545
|
+
{
|
|
1546
|
+
scope: n,
|
|
1547
|
+
contentWrapper: i,
|
|
1548
|
+
shouldExpandOnScrollRef: S,
|
|
1549
|
+
onScrollButtonChange: R,
|
|
1550
|
+
children: /* @__PURE__ */ v(
|
|
1551
|
+
"div",
|
|
1552
|
+
{
|
|
1553
|
+
ref: u,
|
|
1554
|
+
style: {
|
|
1555
|
+
display: "flex",
|
|
1556
|
+
flexDirection: "column",
|
|
1557
|
+
position: "fixed",
|
|
1558
|
+
zIndex: b
|
|
1559
|
+
},
|
|
1560
|
+
children: /* @__PURE__ */ v(
|
|
1561
|
+
_.div,
|
|
1562
|
+
{
|
|
1563
|
+
...a,
|
|
1564
|
+
ref: y,
|
|
1565
|
+
style: {
|
|
1566
|
+
// When we get the height of the content, it includes borders. If we were to set
|
|
1567
|
+
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
1568
|
+
boxSizing: "border-box",
|
|
1569
|
+
// We need to ensure the content doesn't get taller than the wrapper
|
|
1570
|
+
maxHeight: "100%",
|
|
1571
|
+
...a.style
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
)
|
|
1575
|
+
}
|
|
1576
|
+
)
|
|
1577
|
+
}
|
|
1578
|
+
);
|
|
1579
|
+
});
|
|
1580
|
+
nn.displayName = To;
|
|
1581
|
+
var Io = "SelectPopperPosition", Ye = o.forwardRef((e, t) => {
|
|
1582
|
+
const {
|
|
1583
|
+
__scopeSelect: n,
|
|
1584
|
+
align: r = "start",
|
|
1585
|
+
collisionPadding: a = X,
|
|
1586
|
+
...s
|
|
1587
|
+
} = e, l = De(n);
|
|
1588
|
+
return /* @__PURE__ */ v(
|
|
1589
|
+
Pr,
|
|
1590
|
+
{
|
|
1591
|
+
...l,
|
|
1592
|
+
...s,
|
|
1593
|
+
ref: t,
|
|
1594
|
+
align: r,
|
|
1595
|
+
collisionPadding: a,
|
|
1596
|
+
style: {
|
|
1597
|
+
// Ensure border-box for floating-ui calculations
|
|
1598
|
+
boxSizing: "border-box",
|
|
1599
|
+
...s.style,
|
|
1600
|
+
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1601
|
+
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
1602
|
+
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
1603
|
+
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1604
|
+
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
);
|
|
1608
|
+
});
|
|
1609
|
+
Ye.displayName = Io;
|
|
1610
|
+
var [Ao, nt] = he(ce, {}), je = "SelectViewport", rn = o.forwardRef(
|
|
1611
|
+
(e, t) => {
|
|
1612
|
+
const { __scopeSelect: n, nonce: r, ...a } = e, s = re(je, n), l = nt(je, n), i = k(t, s.onViewportChange), u = o.useRef(0);
|
|
1613
|
+
return /* @__PURE__ */ ie(Ze, { children: [
|
|
1614
|
+
/* @__PURE__ */ v(
|
|
1615
|
+
"style",
|
|
1616
|
+
{
|
|
1617
|
+
dangerouslySetInnerHTML: {
|
|
1618
|
+
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
1619
|
+
},
|
|
1620
|
+
nonce: r
|
|
1621
|
+
}
|
|
1622
|
+
),
|
|
1623
|
+
/* @__PURE__ */ v(Me.Slot, { scope: n, children: /* @__PURE__ */ v(
|
|
1624
|
+
_.div,
|
|
1625
|
+
{
|
|
1626
|
+
"data-radix-select-viewport": "",
|
|
1627
|
+
role: "presentation",
|
|
1628
|
+
...a,
|
|
1629
|
+
ref: i,
|
|
1630
|
+
style: {
|
|
1631
|
+
// we use position: 'relative' here on the `viewport` so that when we call
|
|
1632
|
+
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
1633
|
+
// (independent of the scrollUpButton).
|
|
1634
|
+
position: "relative",
|
|
1635
|
+
flex: 1,
|
|
1636
|
+
// Viewport should only be scrollable in the vertical direction.
|
|
1637
|
+
// This won't work in vertical writing modes, so we'll need to
|
|
1638
|
+
// revisit this if/when that is supported
|
|
1639
|
+
// https://developer.chrome.com/blog/vertical-form-controls
|
|
1640
|
+
overflow: "hidden auto",
|
|
1641
|
+
...a.style
|
|
1642
|
+
},
|
|
1643
|
+
onScroll: M(a.onScroll, (d) => {
|
|
1644
|
+
const h = d.currentTarget, { contentWrapper: y, shouldExpandOnScrollRef: w } = l;
|
|
1645
|
+
if (w != null && w.current && y) {
|
|
1646
|
+
const S = Math.abs(u.current - h.scrollTop);
|
|
1647
|
+
if (S > 0) {
|
|
1648
|
+
const E = window.innerHeight - X * 2, c = parseFloat(y.style.minHeight), p = parseFloat(y.style.height), g = Math.max(c, p);
|
|
1649
|
+
if (g < E) {
|
|
1650
|
+
const f = g + S, m = Math.min(E, f), b = f - m;
|
|
1651
|
+
y.style.height = m + "px", y.style.bottom === "0px" && (h.scrollTop = b > 0 ? b : 0, y.style.justifyContent = "flex-end");
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
u.current = h.scrollTop;
|
|
1656
|
+
})
|
|
1657
|
+
}
|
|
1658
|
+
) })
|
|
1659
|
+
] });
|
|
1660
|
+
}
|
|
1661
|
+
);
|
|
1662
|
+
rn.displayName = je;
|
|
1663
|
+
var on = "SelectGroup", [Oo, _o] = he(on), an = o.forwardRef(
|
|
1664
|
+
(e, t) => {
|
|
1665
|
+
const { __scopeSelect: n, ...r } = e, a = Je();
|
|
1666
|
+
return /* @__PURE__ */ v(Oo, { scope: n, id: a, children: /* @__PURE__ */ v(_.div, { role: "group", "aria-labelledby": a, ...r, ref: t }) });
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
an.displayName = on;
|
|
1670
|
+
var sn = "SelectLabel", cn = o.forwardRef(
|
|
1671
|
+
(e, t) => {
|
|
1672
|
+
const { __scopeSelect: n, ...r } = e, a = _o(sn, n);
|
|
1673
|
+
return /* @__PURE__ */ v(_.div, { id: a.id, ...r, ref: t });
|
|
1674
|
+
}
|
|
1675
|
+
);
|
|
1676
|
+
cn.displayName = sn;
|
|
1677
|
+
var Oe = "SelectItem", [Mo, ln] = he(Oe), un = o.forwardRef(
|
|
1678
|
+
(e, t) => {
|
|
1679
|
+
const {
|
|
1680
|
+
__scopeSelect: n,
|
|
1681
|
+
value: r,
|
|
1682
|
+
disabled: a = !1,
|
|
1683
|
+
textValue: s,
|
|
1684
|
+
...l
|
|
1685
|
+
} = e, i = ne(Oe, n), u = re(Oe, n), d = i.value === r, [h, y] = o.useState(s ?? ""), [w, S] = o.useState(!1), E = k(
|
|
1686
|
+
t,
|
|
1687
|
+
(f) => {
|
|
1688
|
+
var m;
|
|
1689
|
+
return (m = u.itemRefCallback) == null ? void 0 : m.call(u, f, r, a);
|
|
1690
|
+
}
|
|
1691
|
+
), c = Je(), p = o.useRef("touch"), g = () => {
|
|
1692
|
+
a || (i.onValueChange(r), i.onOpenChange(!1));
|
|
1693
|
+
};
|
|
1694
|
+
if (r === "")
|
|
1695
|
+
throw new Error(
|
|
1696
|
+
"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."
|
|
1697
|
+
);
|
|
1698
|
+
return /* @__PURE__ */ v(
|
|
1699
|
+
Mo,
|
|
1700
|
+
{
|
|
1701
|
+
scope: n,
|
|
1702
|
+
value: r,
|
|
1703
|
+
disabled: a,
|
|
1704
|
+
textId: c,
|
|
1705
|
+
isSelected: d,
|
|
1706
|
+
onItemTextChange: o.useCallback((f) => {
|
|
1707
|
+
y((m) => m || ((f == null ? void 0 : f.textContent) ?? "").trim());
|
|
1708
|
+
}, []),
|
|
1709
|
+
children: /* @__PURE__ */ v(
|
|
1710
|
+
Me.ItemSlot,
|
|
1711
|
+
{
|
|
1712
|
+
scope: n,
|
|
1713
|
+
value: r,
|
|
1714
|
+
disabled: a,
|
|
1715
|
+
textValue: h,
|
|
1716
|
+
children: /* @__PURE__ */ v(
|
|
1717
|
+
_.div,
|
|
1718
|
+
{
|
|
1719
|
+
role: "option",
|
|
1720
|
+
"aria-labelledby": c,
|
|
1721
|
+
"data-highlighted": w ? "" : void 0,
|
|
1722
|
+
"aria-selected": d && w,
|
|
1723
|
+
"data-state": d ? "checked" : "unchecked",
|
|
1724
|
+
"aria-disabled": a || void 0,
|
|
1725
|
+
"data-disabled": a ? "" : void 0,
|
|
1726
|
+
tabIndex: a ? void 0 : -1,
|
|
1727
|
+
...l,
|
|
1728
|
+
ref: E,
|
|
1729
|
+
onFocus: M(l.onFocus, () => S(!0)),
|
|
1730
|
+
onBlur: M(l.onBlur, () => S(!1)),
|
|
1731
|
+
onClick: M(l.onClick, () => {
|
|
1732
|
+
p.current !== "mouse" && g();
|
|
1733
|
+
}),
|
|
1734
|
+
onPointerUp: M(l.onPointerUp, () => {
|
|
1735
|
+
p.current === "mouse" && g();
|
|
1736
|
+
}),
|
|
1737
|
+
onPointerDown: M(l.onPointerDown, (f) => {
|
|
1738
|
+
p.current = f.pointerType;
|
|
1739
|
+
}),
|
|
1740
|
+
onPointerMove: M(l.onPointerMove, (f) => {
|
|
1741
|
+
var m;
|
|
1742
|
+
p.current = f.pointerType, a ? (m = u.onItemLeave) == null || m.call(u) : p.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
1743
|
+
}),
|
|
1744
|
+
onPointerLeave: M(l.onPointerLeave, (f) => {
|
|
1745
|
+
var m;
|
|
1746
|
+
f.currentTarget === document.activeElement && ((m = u.onItemLeave) == null || m.call(u));
|
|
1747
|
+
}),
|
|
1748
|
+
onKeyDown: M(l.onKeyDown, (f) => {
|
|
1749
|
+
var b;
|
|
1750
|
+
((b = u.searchRef) == null ? void 0 : b.current) !== "" && f.key === " " || (wo.includes(f.key) && g(), f.key === " " && f.preventDefault());
|
|
1751
|
+
})
|
|
1752
|
+
}
|
|
1753
|
+
)
|
|
1754
|
+
}
|
|
1755
|
+
)
|
|
1756
|
+
}
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
);
|
|
1760
|
+
un.displayName = Oe;
|
|
1761
|
+
var Ce = "SelectItemText", dn = o.forwardRef(
|
|
1762
|
+
(e, t) => {
|
|
1763
|
+
const { __scopeSelect: n, className: r, style: a, ...s } = e, l = ne(Ce, n), i = re(Ce, n), u = ln(Ce, n), d = Eo(Ce, n), [h, y] = o.useState(null), w = k(
|
|
1764
|
+
t,
|
|
1765
|
+
(g) => y(g),
|
|
1766
|
+
u.onItemTextChange,
|
|
1767
|
+
(g) => {
|
|
1768
|
+
var f;
|
|
1769
|
+
return (f = i.itemTextRefCallback) == null ? void 0 : f.call(i, g, u.value, u.disabled);
|
|
1770
|
+
}
|
|
1771
|
+
), S = h == null ? void 0 : h.textContent, E = o.useMemo(
|
|
1772
|
+
() => /* @__PURE__ */ v("option", { value: u.value, disabled: u.disabled, children: S }, u.value),
|
|
1773
|
+
[u.disabled, u.value, S]
|
|
1774
|
+
), { onNativeOptionAdd: c, onNativeOptionRemove: p } = d;
|
|
1775
|
+
return G(() => (c(E), () => p(E)), [c, p, E]), /* @__PURE__ */ ie(Ze, { children: [
|
|
1776
|
+
/* @__PURE__ */ v(_.span, { id: u.textId, ...s, ref: w }),
|
|
1777
|
+
u.isSelected && l.valueNode && !l.valueNodeHasChildren ? qe.createPortal(s.children, l.valueNode) : null
|
|
1778
|
+
] });
|
|
1779
|
+
}
|
|
1780
|
+
);
|
|
1781
|
+
dn.displayName = Ce;
|
|
1782
|
+
var fn = "SelectItemIndicator", pn = o.forwardRef(
|
|
1783
|
+
(e, t) => {
|
|
1784
|
+
const { __scopeSelect: n, ...r } = e;
|
|
1785
|
+
return ln(fn, n).isSelected ? /* @__PURE__ */ v(_.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
pn.displayName = fn;
|
|
1789
|
+
var ze = "SelectScrollUpButton", vn = o.forwardRef((e, t) => {
|
|
1790
|
+
const n = re(ze, e.__scopeSelect), r = nt(ze, e.__scopeSelect), [a, s] = o.useState(!1), l = k(t, r.onScrollButtonChange);
|
|
1791
|
+
return G(() => {
|
|
1792
|
+
if (n.viewport && n.isPositioned) {
|
|
1793
|
+
let i = function() {
|
|
1794
|
+
const d = u.scrollTop > 0;
|
|
1795
|
+
s(d);
|
|
1796
|
+
};
|
|
1797
|
+
const u = n.viewport;
|
|
1798
|
+
return i(), u.addEventListener("scroll", i), () => u.removeEventListener("scroll", i);
|
|
1799
|
+
}
|
|
1800
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ v(
|
|
1801
|
+
mn,
|
|
1802
|
+
{
|
|
1803
|
+
...e,
|
|
1804
|
+
ref: l,
|
|
1805
|
+
onAutoScroll: () => {
|
|
1806
|
+
const { viewport: i, selectedItem: u } = n;
|
|
1807
|
+
i && u && (i.scrollTop = i.scrollTop - u.offsetHeight);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
) : null;
|
|
1811
|
+
});
|
|
1812
|
+
vn.displayName = ze;
|
|
1813
|
+
var Xe = "SelectScrollDownButton", hn = o.forwardRef((e, t) => {
|
|
1814
|
+
const n = re(Xe, e.__scopeSelect), r = nt(Xe, e.__scopeSelect), [a, s] = o.useState(!1), l = k(t, r.onScrollButtonChange);
|
|
1815
|
+
return G(() => {
|
|
1816
|
+
if (n.viewport && n.isPositioned) {
|
|
1817
|
+
let i = function() {
|
|
1818
|
+
const d = u.scrollHeight - u.clientHeight, h = Math.ceil(u.scrollTop) < d;
|
|
1819
|
+
s(h);
|
|
1820
|
+
};
|
|
1821
|
+
const u = n.viewport;
|
|
1822
|
+
return i(), u.addEventListener("scroll", i), () => u.removeEventListener("scroll", i);
|
|
1823
|
+
}
|
|
1824
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ v(
|
|
1825
|
+
mn,
|
|
1826
|
+
{
|
|
1827
|
+
...e,
|
|
1828
|
+
ref: l,
|
|
1829
|
+
onAutoScroll: () => {
|
|
1830
|
+
const { viewport: i, selectedItem: u } = n;
|
|
1831
|
+
i && u && (i.scrollTop = i.scrollTop + u.offsetHeight);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
) : null;
|
|
1835
|
+
});
|
|
1836
|
+
hn.displayName = Xe;
|
|
1837
|
+
var mn = o.forwardRef((e, t) => {
|
|
1838
|
+
const { __scopeSelect: n, onAutoScroll: r, ...a } = e, s = re("SelectScrollButton", n), l = o.useRef(null), i = Le(n), u = o.useCallback(() => {
|
|
1839
|
+
l.current !== null && (window.clearInterval(l.current), l.current = null);
|
|
1840
|
+
}, []);
|
|
1841
|
+
return o.useEffect(() => () => u(), [u]), G(() => {
|
|
1842
|
+
var h;
|
|
1843
|
+
const d = i().find((y) => y.ref.current === document.activeElement);
|
|
1844
|
+
(h = d == null ? void 0 : d.ref.current) == null || h.scrollIntoView({ block: "nearest" });
|
|
1845
|
+
}, [i]), /* @__PURE__ */ v(
|
|
1846
|
+
_.div,
|
|
1847
|
+
{
|
|
1848
|
+
"aria-hidden": !0,
|
|
1849
|
+
...a,
|
|
1850
|
+
ref: t,
|
|
1851
|
+
style: { flexShrink: 0, ...a.style },
|
|
1852
|
+
onPointerDown: M(a.onPointerDown, () => {
|
|
1853
|
+
l.current === null && (l.current = window.setInterval(r, 50));
|
|
1854
|
+
}),
|
|
1855
|
+
onPointerMove: M(a.onPointerMove, () => {
|
|
1856
|
+
var d;
|
|
1857
|
+
(d = s.onItemLeave) == null || d.call(s), l.current === null && (l.current = window.setInterval(r, 50));
|
|
1858
|
+
}),
|
|
1859
|
+
onPointerLeave: M(a.onPointerLeave, () => {
|
|
1860
|
+
u();
|
|
1861
|
+
})
|
|
1862
|
+
}
|
|
1863
|
+
);
|
|
1864
|
+
}), Lo = "SelectSeparator", gn = o.forwardRef(
|
|
1865
|
+
(e, t) => {
|
|
1866
|
+
const { __scopeSelect: n, ...r } = e;
|
|
1867
|
+
return /* @__PURE__ */ v(_.div, { "aria-hidden": !0, ...r, ref: t });
|
|
1868
|
+
}
|
|
1869
|
+
);
|
|
1870
|
+
gn.displayName = Lo;
|
|
1871
|
+
var Ge = "SelectArrow", Do = o.forwardRef(
|
|
1872
|
+
(e, t) => {
|
|
1873
|
+
const { __scopeSelect: n, ...r } = e, a = De(n), s = ne(Ge, n), l = re(Ge, n);
|
|
1874
|
+
return s.open && l.position === "popper" ? /* @__PURE__ */ v(Rr, { ...a, ...r, ref: t }) : null;
|
|
1875
|
+
}
|
|
1876
|
+
);
|
|
1877
|
+
Do.displayName = Ge;
|
|
1878
|
+
var ko = "SelectBubbleInput", yn = o.forwardRef(
|
|
1879
|
+
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
1880
|
+
const a = o.useRef(null), s = k(r, a), l = Tr(t);
|
|
1881
|
+
return o.useEffect(() => {
|
|
1882
|
+
const i = a.current;
|
|
1883
|
+
if (!i) return;
|
|
1884
|
+
const u = window.HTMLSelectElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
1885
|
+
u,
|
|
1886
|
+
"value"
|
|
1887
|
+
).set;
|
|
1888
|
+
if (l !== t && h) {
|
|
1889
|
+
const y = new Event("change", { bubbles: !0 });
|
|
1890
|
+
h.call(i, t), i.dispatchEvent(y);
|
|
1891
|
+
}
|
|
1892
|
+
}, [l, t]), /* @__PURE__ */ v(
|
|
1893
|
+
_.select,
|
|
1894
|
+
{
|
|
1895
|
+
...n,
|
|
1896
|
+
style: { ...kt, ...n.style },
|
|
1897
|
+
ref: s,
|
|
1898
|
+
defaultValue: t
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
);
|
|
1903
|
+
yn.displayName = ko;
|
|
1904
|
+
function wn(e) {
|
|
1905
|
+
return e === "" || e === void 0;
|
|
1906
|
+
}
|
|
1907
|
+
function Sn(e) {
|
|
1908
|
+
const t = ve(e), n = o.useRef(""), r = o.useRef(0), a = o.useCallback(
|
|
1909
|
+
(l) => {
|
|
1910
|
+
const i = n.current + l;
|
|
1911
|
+
t(i), (function u(d) {
|
|
1912
|
+
n.current = d, window.clearTimeout(r.current), d !== "" && (r.current = window.setTimeout(() => u(""), 1e3));
|
|
1913
|
+
})(i);
|
|
1914
|
+
},
|
|
1915
|
+
[t]
|
|
1916
|
+
), s = o.useCallback(() => {
|
|
1917
|
+
n.current = "", window.clearTimeout(r.current);
|
|
1918
|
+
}, []);
|
|
1919
|
+
return o.useEffect(() => () => window.clearTimeout(r.current), []), [n, a, s];
|
|
1920
|
+
}
|
|
1921
|
+
function bn(e, t, n) {
|
|
1922
|
+
const a = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1923
|
+
let l = Bo(e, Math.max(s, 0));
|
|
1924
|
+
a.length === 1 && (l = l.filter((d) => d !== n));
|
|
1925
|
+
const u = l.find(
|
|
1926
|
+
(d) => d.textValue.toLowerCase().startsWith(a.toLowerCase())
|
|
1927
|
+
);
|
|
1928
|
+
return u !== n ? u : void 0;
|
|
1929
|
+
}
|
|
1930
|
+
function Bo(e, t) {
|
|
1931
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1932
|
+
}
|
|
1933
|
+
var Fo = jt, Cn = Xt, Wo = Zt, Ho = qt, Vo = Qt, En = Jt, Uo = rn, $o = an, xn = cn, Pn = un, Ko = dn, Yo = pn, Rn = vn, Nn = hn, Tn = gn;
|
|
1934
|
+
const ra = Fo, oa = $o, aa = Wo, jo = o.forwardRef(
|
|
1935
|
+
({ className: e, children: t, ...n }, r) => /* @__PURE__ */ ie(
|
|
1936
|
+
Cn,
|
|
1937
|
+
{
|
|
1938
|
+
ref: r,
|
|
1939
|
+
className: te(
|
|
1940
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1941
|
+
e
|
|
1942
|
+
),
|
|
1943
|
+
...n,
|
|
1944
|
+
children: [
|
|
1945
|
+
t,
|
|
1946
|
+
/* @__PURE__ */ v(Ho, { asChild: !0, children: /* @__PURE__ */ v(gt, { className: "h-4 w-4 opacity-50" }) })
|
|
1947
|
+
]
|
|
1948
|
+
}
|
|
1949
|
+
)
|
|
1950
|
+
);
|
|
1951
|
+
jo.displayName = Cn.displayName;
|
|
1952
|
+
const In = o.forwardRef(
|
|
1953
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ v(Rn, { ref: n, className: te("flex cursor-default items-center justify-center py-1", e), ...t, children: /* @__PURE__ */ v(Xn, { className: "h-4 w-4" }) })
|
|
1954
|
+
);
|
|
1955
|
+
In.displayName = Rn.displayName;
|
|
1956
|
+
const An = o.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(Nn, { ref: n, className: te("flex cursor-default items-center justify-center py-1", e), ...t, children: /* @__PURE__ */ v(gt, { className: "h-4 w-4" }) }));
|
|
1957
|
+
An.displayName = Nn.displayName;
|
|
1958
|
+
const zo = o.forwardRef(
|
|
1959
|
+
({ className: e, children: t, position: n = "popper", ...r }, a) => /* @__PURE__ */ v(Vo, { children: /* @__PURE__ */ ie(
|
|
1960
|
+
En,
|
|
1961
|
+
{
|
|
1962
|
+
ref: a,
|
|
1963
|
+
className: te(
|
|
1964
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
1965
|
+
n === "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",
|
|
1966
|
+
e
|
|
1967
|
+
),
|
|
1968
|
+
position: n,
|
|
1969
|
+
...r,
|
|
1970
|
+
children: [
|
|
1971
|
+
/* @__PURE__ */ v(In, {}),
|
|
1972
|
+
/* @__PURE__ */ v(
|
|
1973
|
+
Uo,
|
|
1974
|
+
{
|
|
1975
|
+
className: te("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
1976
|
+
children: t
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1979
|
+
/* @__PURE__ */ v(An, {})
|
|
1980
|
+
]
|
|
1981
|
+
}
|
|
1982
|
+
) })
|
|
1983
|
+
);
|
|
1984
|
+
zo.displayName = En.displayName;
|
|
1985
|
+
const Xo = o.forwardRef(
|
|
1986
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ v(xn, { ref: n, className: te("py-1.5 pl-8 pr-2 text-sm font-semibold", e), ...t })
|
|
1987
|
+
);
|
|
1988
|
+
Xo.displayName = xn.displayName;
|
|
1989
|
+
const Go = o.forwardRef(
|
|
1990
|
+
({ className: e, children: t, ...n }, r) => /* @__PURE__ */ ie(
|
|
1991
|
+
Pn,
|
|
1992
|
+
{
|
|
1993
|
+
ref: r,
|
|
1994
|
+
className: te(
|
|
1995
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1996
|
+
e
|
|
1997
|
+
),
|
|
1998
|
+
...n,
|
|
1999
|
+
children: [
|
|
2000
|
+
/* @__PURE__ */ v("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ v(Yo, { children: /* @__PURE__ */ v(jn, { className: "h-4 w-4" }) }) }),
|
|
2001
|
+
/* @__PURE__ */ v(Ko, { children: t })
|
|
2002
|
+
]
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
);
|
|
2006
|
+
Go.displayName = Pn.displayName;
|
|
2007
|
+
const Zo = o.forwardRef(
|
|
2008
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ v(Tn, { ref: n, className: te("-mx-1 my-1 h-px bg-muted", e), ...t })
|
|
2009
|
+
);
|
|
2010
|
+
Zo.displayName = Tn.displayName;
|
|
2011
|
+
export {
|
|
2012
|
+
ra as S,
|
|
2013
|
+
zo as a,
|
|
2014
|
+
oa as b,
|
|
2015
|
+
Go as c,
|
|
2016
|
+
Xo as d,
|
|
2017
|
+
Zo as e,
|
|
2018
|
+
jo as f,
|
|
2019
|
+
aa as g
|
|
2020
|
+
};
|