@mcp-use/inspector 20.0.0-beta.14 → 20.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cdn/inspector.js +76909 -9272
- package/dist/cli.js +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-3XD7J5NX.js → chunk-FHC5ZGMM.js} +1 -1
- package/dist/server/{chunk-N3VXWLT6.js → chunk-QXOCY5ZE.js} +1 -1
- package/dist/server/{chunk-DLHO3Q42.js → chunk-R5ZEVRE5.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/web/assets/index-BgHcVJO3.js +643 -0
- package/dist/web/index.html +2 -10
- package/package.json +4 -4
- package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
- package/dist/cdn/ChatTab-D_2TXR3X.js +0 -6811
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
- package/dist/cdn/ConnectionSettingsForm-BqH0PcZF.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-Duhb1uQP.js +0 -151
- package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
- package/dist/cdn/FormContext-NtUiZclE.js +0 -135
- package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
- package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
- package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
- package/dist/cdn/MCPAppsDebugControls-w5NRWhlZ.js +0 -2174
- package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
- package/dist/cdn/MarkdownRenderer-BIsUE0bf.js +0 -3610
- package/dist/cdn/McpAppsViewPanel-B3_76u7O.js +0 -56
- package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
- package/dist/cdn/OAuthCallback-CtLoXa3h.js +0 -58
- package/dist/cdn/PromptsTab-DpE0XLzk.js +0 -902
- package/dist/cdn/ResourcesTab-DQS24z5p.js +0 -566
- package/dist/cdn/SamplingTab-ZDeu0CjJ.js +0 -659
- package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
- package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
- package/dist/cdn/ToolsTab-LtviZSWA.js +0 -2045
- package/dist/cdn/ViewPreview-BwC_tbF_.js +0 -238
- package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-GrTZcnD2.js +0 -10
- package/dist/cdn/browser-DG2Z8392.js +0 -42
- package/dist/cdn/brush-CelVvMGp.js +0 -17
- package/dist/cdn/button-CB4uOoUV.js +0 -2509
- package/dist/cdn/card-BA-DQk-G.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-YMF8Gtw5.js +0 -12
- package/dist/cdn/code-C8sN2OGR.js +0 -10
- package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
- package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
- package/dist/cdn/dist-CHKts0NS.js +0 -2307
- package/dist/cdn/dist-CTJnCYmk.js +0 -616
- package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
- package/dist/cdn/eye-pSGG7nvf.js +0 -29
- package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
- package/dist/cdn/hash-DDs2vE1k.js +0 -33
- package/dist/cdn/history-BfUFpL1d.js +0 -17
- package/dist/cdn/index-browser-DO-sd0TA.js +0 -1853
- package/dist/cdn/info-BMkB68mB.js +0 -19
- package/dist/cdn/input-BCpgLXU1.js +0 -9654
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/label-A0UGV8FE.js +0 -60
- package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
- package/dist/cdn/maximize-hSOCz133.js +0 -21
- package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
- package/dist/cdn/not-found-BajFyZpp.js +0 -32
- package/dist/cdn/play-B1leulYf.js +0 -7
- package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
- package/dist/cdn/react-BDA-xrgK.js +0 -5421
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
- package/dist/cdn/save-CmdEPUAm.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-CCFHjOGk.js +0 -2595
- package/dist/cdn/servers-Dd0Vcp81.js +0 -30
- package/dist/cdn/shared-CJVHJhag.js +0 -1700
- package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
- package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
- package/dist/cdn/spinner-Be1GlSGX.js +0 -15
- package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
- package/dist/cdn/switch-DHXEA_N5.js +0 -665
- package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
- package/dist/cdn/telemetry-e4uEESP7.js +0 -208
- package/dist/cdn/textarea-CwmI8_uI.js +0 -14
- package/dist/cdn/trash-2-BhumJAFE.js +0 -25
- package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
- package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
- package/dist/cdn/useConfig-Dw_6Ztzr.js +0 -235
- package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
- package/dist/cdn/useViewHostProps-BPApUBaM.js +0 -364
- package/dist/cdn/wrench-DvK20LUT.js +0 -7
- package/dist/cdn/x-EilKPiCX.js +0 -10
- package/dist/cdn/zap-0Wr9QO7N.js +0 -10
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
- package/dist/web/assets/ChatTab-BhoU_ges.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-vJcr7uI3.js +0 -1
- package/dist/web/assets/ElicitationTab-4my-wtXf.js +0 -1
- package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
- package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
- package/dist/web/assets/MCPAppsDebugControls-Cd4s9mr1.js +0 -34
- package/dist/web/assets/ManufactOAuthCallback-CCRWJhuT.js +0 -1
- package/dist/web/assets/MarkdownRenderer-BUDZYHqm.js +0 -47
- package/dist/web/assets/McpAppsViewPanel-Cil7Fdy4.js +0 -1
- package/dist/web/assets/NotificationsTab-Bl3O5PRb.js +0 -1
- package/dist/web/assets/OAuthCallback-CceVgo-9.js +0 -1
- package/dist/web/assets/PromptsTab-8lSxb8x-.js +0 -15
- package/dist/web/assets/ResourcesTab-DtGfgsPv.js +0 -2
- package/dist/web/assets/SamplingTab-XC-DTfOo.js +0 -1
- package/dist/web/assets/ServerMetadataTab-C5d_dI3_.js +0 -1
- package/dist/web/assets/ToolsTab-DuHPXItY.js +0 -8
- package/dist/web/assets/ViewPreview-DXswO9q8.js +0 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
- package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
- package/dist/web/assets/button-C8Xa2k4x.js +0 -1
- package/dist/web/assets/checkbox-DAfdiGl1.js +0 -1
- package/dist/web/assets/code-B14rVdNt.js +0 -1
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
- package/dist/web/assets/dist-C2Y1wkk6.js +0 -21
- package/dist/web/assets/index-tu5-QdSJ.js +0 -499
- package/dist/web/assets/input-C0OQCUZy.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/label-CI7JWQOo.js +0 -1
- package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
- package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
- package/dist/web/assets/save-TM6fvNrt.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-D6jzbLJn.js +0 -1
- package/dist/web/assets/shared-c1Yr-wvV.js +0 -1
- package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
- package/dist/web/assets/tabs-subtle-CHvFXVIA.js +0 -1
- package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
- package/dist/web/assets/useConfig-9UVqLmR_.js +0 -1
- package/dist/web/assets/useViewHostProps-BBoPQYEl.js +0 -1
- package/dist/web/assets/zap-BDWHCVHU.js +0 -1
|
@@ -1,2595 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { $t as n, An as r, Bt as i, Cn as a, Dt as o, En as s, Et as c, Fn as l, Ft as u, Ht as d, In as f, J as p, Jt as m, Kn as h, Ln as g, Lt as _, Mn as v, Mt as y, Nn as b, On as x, Pt as S, Qt as ee, Sn as C, Tn as w, Tt as T, Un as E, Ut as te, Vt as D, Wt as O, X as k, Xt as A, Yn as j, Yt as M, Z as N, Zt as ne, _n as re, an as ie, bn as P, bt as F, cn as I, dn as ae, en as L, er as R, f as z, fn as B, gn as V, hn as oe, in as H, ir as se, jn as ce, jt as le, kn as ue, ln as de, mn as U, nn as fe, nt as pe, o as me, on as W, or as he, pn as ge, q as _e, qn as ve, qt as ye, rn as be, rr as xe, s as Se, sn as Ce, st as we, tn as Te, tr as G, un as Ee, vn as K, wn as De, wt as q, xn as Oe, xt as J, yn as ke, zn as Ae, zt as je } from "./input-BCpgLXU1.js";
|
|
3
|
-
import { n as Me } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
-
import { F as Ne, H as Pe, I as Fe, M as Ie, T as Le, U as Re, W as ze, a as Be, c as Ve, d as He, g as Y, h as Ue, j as We, k as Ge, l as Ke, m as qe, o as Je, s as Ye, u as Xe, v as X, y as Ze } from "./button-CB4uOoUV.js";
|
|
5
|
-
import { n as Qe } from "./label-A0UGV8FE.js";
|
|
6
|
-
import { b as $e, l as et, n as tt, r as nt, t as rt, y as it } from "./AnimatePresence-D1bZ5_-l.js";
|
|
7
|
-
import { c as at, i as ot, l as st, o as ct, r as lt, t as ut } from "./FormContext-NtUiZclE.js";
|
|
8
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/utils/enqueueFocus.mjs
|
|
9
|
-
var Z = /* @__PURE__ */ e(t(), 1), dt = 0;
|
|
10
|
-
function ft(e, t = {}) {
|
|
11
|
-
let { preventScroll: n = !1, sync: r = !1, shouldFocus: i } = t;
|
|
12
|
-
cancelAnimationFrame(dt);
|
|
13
|
-
function a() {
|
|
14
|
-
i && !i() || e?.focus({ preventScroll: n });
|
|
15
|
-
}
|
|
16
|
-
if (r) return a(), Ve;
|
|
17
|
-
let o = requestAnimationFrame(a);
|
|
18
|
-
return dt = o, () => {
|
|
19
|
-
dt === o && (cancelAnimationFrame(o), dt = 0);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/utils/markOthers.mjs
|
|
24
|
-
var pt = {
|
|
25
|
-
inert: /* @__PURE__ */ new WeakMap(),
|
|
26
|
-
"aria-hidden": /* @__PURE__ */ new WeakMap()
|
|
27
|
-
}, mt = "data-base-ui-inert", ht = {
|
|
28
|
-
inert: /* @__PURE__ */ new WeakSet(),
|
|
29
|
-
"aria-hidden": /* @__PURE__ */ new WeakSet()
|
|
30
|
-
}, gt = /* @__PURE__ */ new WeakMap(), _t = 0;
|
|
31
|
-
function vt(e) {
|
|
32
|
-
return ht[e];
|
|
33
|
-
}
|
|
34
|
-
function yt(e) {
|
|
35
|
-
return e ? Fe(e) ? e.host : yt(e.parentNode) : null;
|
|
36
|
-
}
|
|
37
|
-
var bt = (e, t) => t.map((t) => {
|
|
38
|
-
if (e.contains(t)) return t;
|
|
39
|
-
let n = yt(t);
|
|
40
|
-
return e.contains(n) ? n : null;
|
|
41
|
-
}).filter((e) => e != null), xt = (e) => {
|
|
42
|
-
let t = /* @__PURE__ */ new Set();
|
|
43
|
-
return e.forEach((e) => {
|
|
44
|
-
let n = e;
|
|
45
|
-
for (; n && !t.has(n);) t.add(n), n = n.parentNode;
|
|
46
|
-
}), t;
|
|
47
|
-
}, St = (e, t, n) => {
|
|
48
|
-
let r = [], i = (e) => {
|
|
49
|
-
!e || n.has(e) || Array.from(e.children).forEach((e) => {
|
|
50
|
-
Le(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
return i(e), r;
|
|
54
|
-
};
|
|
55
|
-
function Ct(e, t, n, r, { mark: i = !0 }) {
|
|
56
|
-
let a = null;
|
|
57
|
-
r ? a = "inert" : n && (a = "aria-hidden");
|
|
58
|
-
let o = null, s = null, c = bt(t, e), l = i ? St(t, xt(c), new Set(c)) : [], u = [], d = [];
|
|
59
|
-
if (a) {
|
|
60
|
-
let e = pt[a], n = vt(a);
|
|
61
|
-
s = n, o = e;
|
|
62
|
-
let r = bt(t, Array.from(t.querySelectorAll("[aria-live]"))), i = c.concat(r);
|
|
63
|
-
St(t, xt(i), new Set(i)).forEach((t) => {
|
|
64
|
-
let r = t.getAttribute(a), i = r !== null && r !== "false", o = (e.get(t) || 0) + 1;
|
|
65
|
-
e.set(t, o), u.push(t), o === 1 && i && n.add(t), i || t.setAttribute(a, a === "inert" ? "" : "true");
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return i && l.forEach((e) => {
|
|
69
|
-
let t = (gt.get(e) || 0) + 1;
|
|
70
|
-
gt.set(e, t), d.push(e), t === 1 && e.setAttribute(mt, "");
|
|
71
|
-
}), _t += 1, () => {
|
|
72
|
-
o && u.forEach((e) => {
|
|
73
|
-
let t = (o.get(e) || 0) - 1;
|
|
74
|
-
o.set(e, t), t || (!s?.has(e) && a && e.removeAttribute(a), s?.delete(e));
|
|
75
|
-
}), i && d.forEach((e) => {
|
|
76
|
-
let t = (gt.get(e) || 0) - 1;
|
|
77
|
-
gt.set(e, t), t || e.removeAttribute(mt);
|
|
78
|
-
}), --_t, _t || (pt.inert = /* @__PURE__ */ new WeakMap(), pt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), ht.inert = /* @__PURE__ */ new WeakSet(), ht["aria-hidden"] = /* @__PURE__ */ new WeakSet(), gt = /* @__PURE__ */ new WeakMap());
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function wt(e, t = {}) {
|
|
82
|
-
let { ariaHidden: n = !1, inert: r = !1, mark: i = !0 } = t, a = W(e[0]).body;
|
|
83
|
-
return Ct(e, a, n, r, { mark: i });
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs
|
|
87
|
-
var Q = Me();
|
|
88
|
-
function Tt(e, t) {
|
|
89
|
-
let n = Ge(oe(e));
|
|
90
|
-
return e instanceof n.KeyboardEvent ? "keyboard" : e instanceof n.FocusEvent ? t || "keyboard" : "pointerType" in e ? e.pointerType || "keyboard" : "touches" in e ? "touch" : e instanceof n.MouseEvent ? t || (e.detail === 0 ? "keyboard" : "mouse") : "";
|
|
91
|
-
}
|
|
92
|
-
var Et = 20, Dt = [];
|
|
93
|
-
function Ot() {
|
|
94
|
-
Dt = Dt.filter((e) => e.deref()?.isConnected);
|
|
95
|
-
}
|
|
96
|
-
function kt(e) {
|
|
97
|
-
Ot(), e && Le(e) !== "body" && (Dt.push(new WeakRef(e)), Dt.length > Et && (Dt = Dt.slice(-20)));
|
|
98
|
-
}
|
|
99
|
-
function At() {
|
|
100
|
-
return Ot(), Dt[Dt.length - 1]?.deref();
|
|
101
|
-
}
|
|
102
|
-
function jt(e) {
|
|
103
|
-
return e ? m(e) ? e : M(e)[0] || e : null;
|
|
104
|
-
}
|
|
105
|
-
function Mt(e) {
|
|
106
|
-
if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !e.getAttribute("role")?.includes("dialog")) return;
|
|
107
|
-
let t = d(e).filter((e) => {
|
|
108
|
-
let t = e.getAttribute("data-tabindex") || "";
|
|
109
|
-
return m(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
|
|
110
|
-
}), n = e.getAttribute("tabindex");
|
|
111
|
-
t.length === 0 ? n !== "0" && (e.setAttribute("tabindex", "0"), e.setAttribute("data-tabindex", "0")) : (n !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
|
|
112
|
-
}
|
|
113
|
-
function Nt(e) {
|
|
114
|
-
let { context: t, children: r, disabled: o = !1, initialFocus: s = !0, returnFocus: c = !0, restoreFocus: l = !1, modal: d = !0, closeOnFocusOut: p = !0, openInteractionType: h = "", nextFocusableElement: g, previousFocusableElement: _, beforeContentFocusGuardRef: b, externalTree: S, getInsideElements: ee } = e, T = "rootStore" in t ? t.rootStore : t, k = T.useState("open"), A = T.useState("domReferenceElement"), j = T.useState("floatingElement"), { events: N, dataRef: ne } = T.context, re = X(() => ne.current.floatingContext?.nodeId), ie = s === !1, P = ae(A) && ie, F = Ce(s), L = Ce(c), R = Ce(h), z = Ce(k), V = y(S), H = u(), se = Z.useRef(!1), le = Z.useRef(!1), ue = Z.useRef(!1), fe = Z.useRef(null), pe = Z.useRef(""), me = Z.useRef(""), he = Z.useRef(null), _e = Z.useRef(null), ve = Xe(he, b, H?.beforeInsideRef), xe = Xe(_e, H?.afterInsideRef), Se = w(), we = w(), Te = ce(), G = H != null, K = Ee(j), De = X((e = K) => e ? M(e) : []), q = X(() => ee?.().filter((e) => e != null) ?? []);
|
|
115
|
-
Z.useEffect(() => {
|
|
116
|
-
if (o || !d) return;
|
|
117
|
-
function e(e) {
|
|
118
|
-
e.key === "Tab" && U(K, ge(W(K))) && De().length === 0 && !P && a(e);
|
|
119
|
-
}
|
|
120
|
-
return de(W(K), "keydown", e);
|
|
121
|
-
}, [
|
|
122
|
-
o,
|
|
123
|
-
K,
|
|
124
|
-
d,
|
|
125
|
-
P,
|
|
126
|
-
De
|
|
127
|
-
]), Z.useEffect(() => {
|
|
128
|
-
if (o || !k) return;
|
|
129
|
-
let e = W(K);
|
|
130
|
-
function t() {
|
|
131
|
-
ue.current = !1;
|
|
132
|
-
}
|
|
133
|
-
function n(e) {
|
|
134
|
-
let t = oe(e), n = q();
|
|
135
|
-
ue.current = !(U(j, t) || U(A, t) || U(H?.portalNode, t) || n.some((e) => e === t || U(e, t))), me.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (le.current = !0, we.start(0, () => {
|
|
136
|
-
le.current = !1;
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
function r() {
|
|
140
|
-
me.current = "keyboard";
|
|
141
|
-
}
|
|
142
|
-
return I(de(e, "pointerdown", n, !0), de(e, "pointerup", t, !0), de(e, "pointercancel", t, !0), de(e, "keydown", r, !0), t);
|
|
143
|
-
}, [
|
|
144
|
-
o,
|
|
145
|
-
j,
|
|
146
|
-
A,
|
|
147
|
-
K,
|
|
148
|
-
k,
|
|
149
|
-
H,
|
|
150
|
-
we,
|
|
151
|
-
q
|
|
152
|
-
]), Z.useEffect(() => {
|
|
153
|
-
if (o || !p) return;
|
|
154
|
-
let e = W(K);
|
|
155
|
-
function t() {
|
|
156
|
-
le.current = !0, we.start(0, () => {
|
|
157
|
-
le.current = !1;
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function r(e) {
|
|
161
|
-
let t = oe(e);
|
|
162
|
-
m(t) && (fe.current = t);
|
|
163
|
-
}
|
|
164
|
-
function a(t) {
|
|
165
|
-
let r = t.relatedTarget, a = t.currentTarget, o = oe(t);
|
|
166
|
-
d && r == null && o != null && U(j, o) && kt(o), queueMicrotask(() => {
|
|
167
|
-
let s = re(), c = T.context.triggerElements, u = q(), f = r?.hasAttribute(je("focus-guard")) && [
|
|
168
|
-
he.current,
|
|
169
|
-
_e.current,
|
|
170
|
-
H?.beforeInsideRef.current,
|
|
171
|
-
H?.afterInsideRef.current,
|
|
172
|
-
H?.beforeOutsideRef.current,
|
|
173
|
-
H?.afterOutsideRef.current,
|
|
174
|
-
x(_),
|
|
175
|
-
x(g)
|
|
176
|
-
].includes(r), p = !(U(A, r) || U(j, r) || U(r, j) || U(H?.portalNode, r) || u.some((e) => e === r || U(e, r)) || r != null && c.hasElement(r) || c.hasMatchingElement((e) => U(e, r)) || f || V && (D(V.nodesRef.current, s).find((e) => U(e.context?.elements.floating, r) || U(e.context?.elements.domReference, r)) || i(V.nodesRef.current, s).find((e) => [e.context?.elements.floating, Ee(e.context?.elements.floating)].includes(r) || e.context?.elements.domReference === r)));
|
|
177
|
-
if (a === A && K && Mt(K), l && a !== A && !n(o) && ge(e) === e.body) {
|
|
178
|
-
if (Ie(K) && (K.focus(), l === "popup")) {
|
|
179
|
-
Te.request(() => {
|
|
180
|
-
K.focus();
|
|
181
|
-
});
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
let e = De(), t = fe.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || K;
|
|
185
|
-
Ie(n) && n.focus();
|
|
186
|
-
}
|
|
187
|
-
if (ne.current.insideReactTree) {
|
|
188
|
-
ne.current.insideReactTree = !1;
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
(P || !d) && r && p && !le.current && (P || r !== At()) && (se.current = !0, T.setOpen(!1, v(E, t)));
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function s() {
|
|
195
|
-
ue.current || (ne.current.insideReactTree = !0, Se.start(0, () => {
|
|
196
|
-
ne.current.insideReactTree = !1;
|
|
197
|
-
}));
|
|
198
|
-
}
|
|
199
|
-
let c = Ie(A) ? A : null;
|
|
200
|
-
if (!(!j && !c)) return I(c && de(c, "focusout", a), c && de(c, "pointerdown", t), j && de(j, "focusin", r), j && de(j, "focusout", a), j && H && de(j, "focusout", s, !0));
|
|
201
|
-
}, [
|
|
202
|
-
o,
|
|
203
|
-
A,
|
|
204
|
-
j,
|
|
205
|
-
K,
|
|
206
|
-
d,
|
|
207
|
-
V,
|
|
208
|
-
H,
|
|
209
|
-
T,
|
|
210
|
-
p,
|
|
211
|
-
l,
|
|
212
|
-
De,
|
|
213
|
-
P,
|
|
214
|
-
re,
|
|
215
|
-
ne,
|
|
216
|
-
Se,
|
|
217
|
-
we,
|
|
218
|
-
Te,
|
|
219
|
-
g,
|
|
220
|
-
_,
|
|
221
|
-
q
|
|
222
|
-
]), Z.useEffect(() => {
|
|
223
|
-
if (o || !j || !k) return;
|
|
224
|
-
let e = Array.from(H?.portalNode?.querySelectorAll(`[${je("portal")}]`) || []), t = (V ? i(V.nodesRef.current, re()) : []).find((e) => ae(e.context?.elements.domReference || null))?.context?.elements.domReference, n = wt([
|
|
225
|
-
j,
|
|
226
|
-
...e,
|
|
227
|
-
he.current,
|
|
228
|
-
_e.current,
|
|
229
|
-
H?.beforeOutsideRef.current,
|
|
230
|
-
H?.afterOutsideRef.current,
|
|
231
|
-
...q(),
|
|
232
|
-
t,
|
|
233
|
-
x(_),
|
|
234
|
-
x(g),
|
|
235
|
-
P ? A : null
|
|
236
|
-
].filter((e) => e != null), {
|
|
237
|
-
ariaHidden: d || P,
|
|
238
|
-
mark: !1
|
|
239
|
-
}), r = wt([j, ...e].filter((e) => e != null));
|
|
240
|
-
return () => {
|
|
241
|
-
r(), n();
|
|
242
|
-
};
|
|
243
|
-
}, [
|
|
244
|
-
k,
|
|
245
|
-
o,
|
|
246
|
-
A,
|
|
247
|
-
j,
|
|
248
|
-
d,
|
|
249
|
-
H,
|
|
250
|
-
P,
|
|
251
|
-
V,
|
|
252
|
-
re,
|
|
253
|
-
g,
|
|
254
|
-
_,
|
|
255
|
-
q
|
|
256
|
-
]), Y(() => {
|
|
257
|
-
if (!k || o || !Ie(K)) return;
|
|
258
|
-
let e = W(K), t = ge(e);
|
|
259
|
-
queueMicrotask(() => {
|
|
260
|
-
let n = F.current, r = typeof n == "function" ? n(R.current || "") : n;
|
|
261
|
-
if (r === void 0 || r === !1 || U(K, t)) return;
|
|
262
|
-
let i = null, a = () => (i ??= De(K), i[0] || K), o;
|
|
263
|
-
o = r === !0 || r === null ? a() : x(r), o ||= a();
|
|
264
|
-
let s = U(K, ge(e));
|
|
265
|
-
ft(o, {
|
|
266
|
-
preventScroll: o === K,
|
|
267
|
-
shouldFocus() {
|
|
268
|
-
if (!z.current) return !1;
|
|
269
|
-
if (s) return !0;
|
|
270
|
-
let t = ge(e);
|
|
271
|
-
return !(t !== o && U(K, t));
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
}, [
|
|
276
|
-
o,
|
|
277
|
-
k,
|
|
278
|
-
K,
|
|
279
|
-
De,
|
|
280
|
-
F,
|
|
281
|
-
R,
|
|
282
|
-
z
|
|
283
|
-
]), Y(() => {
|
|
284
|
-
if (o || !K) return;
|
|
285
|
-
let e = W(K), t = ge(e), n = R.current == null;
|
|
286
|
-
kt(t);
|
|
287
|
-
function r(e) {
|
|
288
|
-
if (e.open || (pe.current = Tt(e.nativeEvent, me.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (se.current = !0), e.reason === "outside-press") if (e.nested) se.current = !1;
|
|
289
|
-
else if (Oe(e.nativeEvent) || C(e.nativeEvent)) se.current = !1;
|
|
290
|
-
else {
|
|
291
|
-
let e = !1;
|
|
292
|
-
W(K).createElement("div").focus({ get preventScroll() {
|
|
293
|
-
return e = !0, !1;
|
|
294
|
-
} }), e ? se.current = !1 : se.current = !0;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
N.on("openchange", r);
|
|
298
|
-
function i() {
|
|
299
|
-
let e = L.current, r = typeof e == "function" ? e(pe.current) : e;
|
|
300
|
-
if (r === void 0 || r === !1) return null;
|
|
301
|
-
r === null && (r = !0);
|
|
302
|
-
let i = A?.isConnected ? A : null, a = t?.isConnected && Le(t) !== "body" ? t : null, o = n ? a || i : i || a;
|
|
303
|
-
return o ||= At() || null, typeof r == "boolean" ? o : x(r) || o || null;
|
|
304
|
-
}
|
|
305
|
-
return () => {
|
|
306
|
-
N.off("openchange", r);
|
|
307
|
-
let t = ge(e), n = q(), a = U(j, t) || n.some((e) => e === t || U(e, t)) || V && D(V.nodesRef.current, re(), !1).some((e) => U(e.context?.elements.floating, t)), o = L.current, s = i();
|
|
308
|
-
queueMicrotask(() => {
|
|
309
|
-
let n = jt(s), r = typeof o != "boolean";
|
|
310
|
-
o && !se.current && Ie(n) && (!(!r && n !== t && t !== e.body) || a) && n.focus({ preventScroll: !0 }), se.current = !1;
|
|
311
|
-
});
|
|
312
|
-
};
|
|
313
|
-
}, [
|
|
314
|
-
o,
|
|
315
|
-
j,
|
|
316
|
-
K,
|
|
317
|
-
L,
|
|
318
|
-
R,
|
|
319
|
-
N,
|
|
320
|
-
V,
|
|
321
|
-
A,
|
|
322
|
-
re,
|
|
323
|
-
q
|
|
324
|
-
]), Y(() => {
|
|
325
|
-
if (!f || k || !j) return;
|
|
326
|
-
let e = ge(W(j));
|
|
327
|
-
!Ie(e) || !B(e) || U(j, e) && e.blur();
|
|
328
|
-
}, [k, j]), Y(() => {
|
|
329
|
-
if (!(o || !H)) return H.setFocusManagerState({
|
|
330
|
-
modal: d,
|
|
331
|
-
closeOnFocusOut: p,
|
|
332
|
-
open: k,
|
|
333
|
-
onOpenChange: T.setOpen,
|
|
334
|
-
domReference: A
|
|
335
|
-
}), () => {
|
|
336
|
-
H.setFocusManagerState(null);
|
|
337
|
-
};
|
|
338
|
-
}, [
|
|
339
|
-
o,
|
|
340
|
-
H,
|
|
341
|
-
d,
|
|
342
|
-
k,
|
|
343
|
-
T,
|
|
344
|
-
p,
|
|
345
|
-
A
|
|
346
|
-
]), Y(() => {
|
|
347
|
-
if (!(o || !K)) return Mt(K), () => {
|
|
348
|
-
queueMicrotask(Ot);
|
|
349
|
-
};
|
|
350
|
-
}, [o, K]);
|
|
351
|
-
let J = !o && (d ? !P : !0) && (G || d);
|
|
352
|
-
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [
|
|
353
|
-
J && /*#__PURE__*/ (0, Q.jsx)(be, {
|
|
354
|
-
"data-type": "inside",
|
|
355
|
-
ref: ve,
|
|
356
|
-
onFocus: (e) => {
|
|
357
|
-
if (d) {
|
|
358
|
-
let e = De();
|
|
359
|
-
ft(e[e.length - 1]);
|
|
360
|
-
} else H?.portalNode && (se.current = !1, ye(e, H.portalNode) ? te(A)?.focus() : x(_ ?? H.beforeOutsideRef)?.focus());
|
|
361
|
-
}
|
|
362
|
-
}),
|
|
363
|
-
r,
|
|
364
|
-
J && /*#__PURE__*/ (0, Q.jsx)(be, {
|
|
365
|
-
"data-type": "inside",
|
|
366
|
-
ref: xe,
|
|
367
|
-
onFocus: (e) => {
|
|
368
|
-
d ? ft(De()[0]) : H?.portalNode && (p && (se.current = !0), ye(e, H.portalNode) ? O(A)?.focus() : x(g ?? H.afterOutsideRef)?.focus());
|
|
369
|
-
}
|
|
370
|
-
})
|
|
371
|
-
] });
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useClick.mjs
|
|
375
|
-
function Pt(e, t = {}) {
|
|
376
|
-
let { enabled: n = !0, event: r = "click", toggle: i = !0, ignoreMouse: a = !1, stickIfOpen: o = !0, touchOpenDelay: s = 0, reason: c = R } = t, l = "rootStore" in e ? e.rootStore : e, u = l.context.dataRef, d = Z.useRef(void 0), f = ce(), p = w(), m = Z.useMemo(() => {
|
|
377
|
-
function e(e, t, n, r) {
|
|
378
|
-
let i = v(c, t, n);
|
|
379
|
-
e && r === "touch" && s > 0 ? p.start(s, () => {
|
|
380
|
-
l.setOpen(!0, i);
|
|
381
|
-
}) : l.setOpen(e, i);
|
|
382
|
-
}
|
|
383
|
-
function t(e, t, n) {
|
|
384
|
-
let r = u.current.openEvent, a = l.select("domReferenceElement") !== t;
|
|
385
|
-
return e && a || !e || !i ? !0 : r && o ? !n(r.type) : !1;
|
|
386
|
-
}
|
|
387
|
-
return {
|
|
388
|
-
onPointerDown(e) {
|
|
389
|
-
d.current = e.pointerType;
|
|
390
|
-
},
|
|
391
|
-
onMouseDown(n) {
|
|
392
|
-
let i = d.current, o = n.nativeEvent, s = l.select("open");
|
|
393
|
-
if (n.button !== 0 || r === "click" || P(i, !0) && a) return;
|
|
394
|
-
let c = t(s, n.currentTarget, (e) => e === "click" || e === "mousedown"), u = oe(o);
|
|
395
|
-
if (B(u)) {
|
|
396
|
-
e(c, o, u, i);
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
let p = n.currentTarget;
|
|
400
|
-
f.request(() => {
|
|
401
|
-
e(c, o, p, i);
|
|
402
|
-
});
|
|
403
|
-
},
|
|
404
|
-
onClick(n) {
|
|
405
|
-
if (r === "mousedown-only") return;
|
|
406
|
-
let i = d.current;
|
|
407
|
-
if (r === "mousedown" && i) {
|
|
408
|
-
d.current = void 0;
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
P(i, !0) && a || e(t(l.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, i);
|
|
412
|
-
},
|
|
413
|
-
onKeyDown() {
|
|
414
|
-
d.current = void 0;
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
}, [
|
|
418
|
-
u,
|
|
419
|
-
r,
|
|
420
|
-
a,
|
|
421
|
-
c,
|
|
422
|
-
l,
|
|
423
|
-
o,
|
|
424
|
-
i,
|
|
425
|
-
f,
|
|
426
|
-
p,
|
|
427
|
-
s
|
|
428
|
-
]);
|
|
429
|
-
return Z.useMemo(() => n ? { reference: m } : Ye, [n, m]);
|
|
430
|
-
}
|
|
431
|
-
//#endregion
|
|
432
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs
|
|
433
|
-
var Ft = "Escape";
|
|
434
|
-
function It(e, t, n) {
|
|
435
|
-
switch (e) {
|
|
436
|
-
case "vertical": return t;
|
|
437
|
-
case "horizontal": return n;
|
|
438
|
-
default: return t || n;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
function Lt(e, t) {
|
|
442
|
-
return It(t, e === "ArrowUp" || e === "ArrowDown", e === "ArrowLeft" || e === "ArrowRight");
|
|
443
|
-
}
|
|
444
|
-
function Rt(e, t, n) {
|
|
445
|
-
return It(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
|
|
446
|
-
}
|
|
447
|
-
function zt(e, t, n) {
|
|
448
|
-
return It(t, n ? e === re : e === K, e === V);
|
|
449
|
-
}
|
|
450
|
-
function Bt(e, t, n, r) {
|
|
451
|
-
return t === "both" || t === "horizontal" && r ? e === Ft : It(t, n ? e === K : e === re, e === ke);
|
|
452
|
-
}
|
|
453
|
-
function Vt(e, t) {
|
|
454
|
-
let { listRef: n, activeIndex: r, onNavigate: i = () => {}, enabled: o = !0, selectedIndex: s = null, allowEscape: c = !1, loopFocus: l = !1, nested: u = !1, rtl: d = !1, virtual: f = !1, focusItemOnOpen: p = "auto", focusItemOnHover: m = !0, openOnArrowKeyDown: h = !0, disabledIndices: g = void 0, orientation: _ = "vertical", parentOrientation: b, id: x, resetOnPointerLeave: S = !0, externalTree: w, grid: T } = t, te = T != null;
|
|
455
|
-
process.env.NODE_ENV !== "production" && (c && (l || console.warn("`useListNavigation` looping must be enabled to allow escaping."), f || console.warn("`useListNavigation` must be virtual to allow escaping.")), _ === "vertical" && te && console.warn("In grid list navigation mode, the `orientation` should", "be either \"horizontal\" or \"both\"."));
|
|
456
|
-
let D = "rootStore" in e ? e.rootStore : e, O = D.useState("open"), k = D.useState("floatingElement"), j = D.useState("domReferenceElement"), M = D.context.dataRef, N = Ee(k), re = ae(j), ie = Ce(N), P = le(), F = y(w), I = Z.useRef(p), R = Z.useRef(s ?? -1), z = Z.useRef(null), B = Z.useRef(!0), V = X((e) => {
|
|
457
|
-
i(R.current === -1 ? null : R.current, e);
|
|
458
|
-
}), H = Z.useRef(!!k), se = Z.useRef(O), ue = Z.useRef(!1), de = Z.useRef(!1), fe = Z.useRef(null), pe = Ce(g), me = Ce(O), he = Ce(s), _e = Ce(S), ye = ce(), be = ce(), xe = X(() => {
|
|
459
|
-
function e(e) {
|
|
460
|
-
f ? F?.events.emit("virtualfocus", e) : fe.current = ft(e, {
|
|
461
|
-
sync: ue.current,
|
|
462
|
-
preventScroll: !0
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
let t = n.current[R.current], r = de.current;
|
|
466
|
-
t && e(t), (ue.current ? (e) => e() : (e) => ye.request(e))(() => {
|
|
467
|
-
let i = n.current[R.current] || t;
|
|
468
|
-
i && (t || e(i), De && (r || !B.current) && i.scrollIntoView?.({
|
|
469
|
-
block: "nearest",
|
|
470
|
-
inline: "nearest"
|
|
471
|
-
}));
|
|
472
|
-
});
|
|
473
|
-
});
|
|
474
|
-
Y(() => {
|
|
475
|
-
M.current.orientation = _;
|
|
476
|
-
}, [M, _]), Y(() => {
|
|
477
|
-
o && (O && k ? (R.current = s ?? -1, I.current && s != null && (de.current = !0, V())) : H.current && (R.current = -1, V()));
|
|
478
|
-
}, [
|
|
479
|
-
o,
|
|
480
|
-
O,
|
|
481
|
-
k,
|
|
482
|
-
s,
|
|
483
|
-
V
|
|
484
|
-
]), Y(() => {
|
|
485
|
-
if (o) {
|
|
486
|
-
if (!O) {
|
|
487
|
-
ue.current = !1;
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
if (k) if (r == null) {
|
|
491
|
-
if (ue.current = !1, he.current != null) return;
|
|
492
|
-
if (H.current && (R.current = -1, xe()), (!se.current || !H.current) && I.current && (z.current != null || I.current === !0 && z.current == null)) {
|
|
493
|
-
let e = 0, t = () => {
|
|
494
|
-
n.current[0] == null ? (e < 2 && (e ? (e) => be.request(e) : queueMicrotask)(t), e += 1) : (R.current = z.current == null || Rt(z.current, _, d) || u ? ee(n) : ne(n), z.current = null, V());
|
|
495
|
-
};
|
|
496
|
-
t();
|
|
497
|
-
}
|
|
498
|
-
} else L(n.current, r) || (R.current = r, xe(), de.current = !1);
|
|
499
|
-
}
|
|
500
|
-
}, [
|
|
501
|
-
o,
|
|
502
|
-
O,
|
|
503
|
-
k,
|
|
504
|
-
r,
|
|
505
|
-
he,
|
|
506
|
-
u,
|
|
507
|
-
n,
|
|
508
|
-
_,
|
|
509
|
-
d,
|
|
510
|
-
V,
|
|
511
|
-
xe,
|
|
512
|
-
be
|
|
513
|
-
]), Y(() => {
|
|
514
|
-
if (!o || k || !F || f || !H.current) return;
|
|
515
|
-
let e = F.nodesRef.current, t = e.find((e) => e.id === P)?.context?.elements.floating, n = ge(W(j ?? t ?? null)), r = e.some((e) => e.context && U(e.context.elements.floating, n));
|
|
516
|
-
t && !r && B.current && t.focus({ preventScroll: !0 });
|
|
517
|
-
}, [
|
|
518
|
-
o,
|
|
519
|
-
k,
|
|
520
|
-
j,
|
|
521
|
-
F,
|
|
522
|
-
P,
|
|
523
|
-
f
|
|
524
|
-
]), Y(() => {
|
|
525
|
-
se.current = O, H.current = !!k;
|
|
526
|
-
}), Y(() => {
|
|
527
|
-
O || (z.current = null, I.current = p);
|
|
528
|
-
}, [O, p]);
|
|
529
|
-
let Se = r != null, we = X((e) => {
|
|
530
|
-
if (!me.current) return;
|
|
531
|
-
let t = n.current.indexOf(e.currentTarget);
|
|
532
|
-
t !== -1 && (R.current !== t || r !== t) && (R.current = t, V(e));
|
|
533
|
-
}), Te = X(() => b ?? F?.nodesRef.current.find((e) => e.id === P)?.context?.dataRef?.current.orientation), G = X(() => ee(n, pe.current)), K = X((e) => {
|
|
534
|
-
if (B.current = !1, ue.current = !0, e.which === 229 || !me.current && e.currentTarget === ie.current) return;
|
|
535
|
-
if (u && Bt(e.key, _, d, te)) {
|
|
536
|
-
Lt(e.key, Te()) || a(e), D.setOpen(!1, v(ve, e.nativeEvent)), Ie(j) && (f ? F?.events.emit("virtualfocus", j) : j.focus());
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
let t = R.current, r = ee(n, g), i = ne(n, g);
|
|
540
|
-
if (re || (e.key === "Home" && (a(e), R.current = r, V(e)), e.key === "End" && (a(e), R.current = i, V(e))), T != null) {
|
|
541
|
-
let t = T(e, R.current, n, _, l, d, g, r, i);
|
|
542
|
-
if (t != null && (R.current = t, V(e)), _ === "both") return;
|
|
543
|
-
}
|
|
544
|
-
if (Lt(e.key, _)) {
|
|
545
|
-
if (a(e), O && !f && ge(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
546
|
-
R.current = Rt(e.key, _, d) ? r : i, V(e);
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
Rt(e.key, _, d) ? l ? t >= i ? c && t !== n.current.length ? R.current = -1 : (ue.current = !1, R.current = r) : R.current = A(n.current, {
|
|
550
|
-
startingIndex: t,
|
|
551
|
-
disabledIndices: g
|
|
552
|
-
}) : R.current = Math.min(i, A(n.current, {
|
|
553
|
-
startingIndex: t,
|
|
554
|
-
disabledIndices: g
|
|
555
|
-
})) : l ? t <= r ? c && t !== -1 ? R.current = n.current.length : (ue.current = !1, R.current = i) : R.current = A(n.current, {
|
|
556
|
-
startingIndex: t,
|
|
557
|
-
decrement: !0,
|
|
558
|
-
disabledIndices: g
|
|
559
|
-
}) : R.current = Math.max(r, A(n.current, {
|
|
560
|
-
startingIndex: t,
|
|
561
|
-
decrement: !0,
|
|
562
|
-
disabledIndices: g
|
|
563
|
-
})), L(n.current, R.current) && (R.current = -1), V(e);
|
|
564
|
-
}
|
|
565
|
-
}), De = Z.useMemo(() => ({
|
|
566
|
-
onFocus(e) {
|
|
567
|
-
ue.current = !0, we(e);
|
|
568
|
-
},
|
|
569
|
-
onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
|
|
570
|
-
onMouseMove(e) {
|
|
571
|
-
ue.current = !0, de.current = !1, m && we(e);
|
|
572
|
-
},
|
|
573
|
-
onPointerLeave(e) {
|
|
574
|
-
if (!me.current || !B.current || e.pointerType === "touch") return;
|
|
575
|
-
ue.current = !0;
|
|
576
|
-
let t = e.relatedTarget;
|
|
577
|
-
if (!(!m || n.current.includes(t)) && _e.current && (fe.current?.(), fe.current = null, R.current = -1, V(e), !f)) {
|
|
578
|
-
let e = ie.current, t = ge(W(e));
|
|
579
|
-
e && U(e, t) && e.focus({ preventScroll: !0 });
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}), [
|
|
583
|
-
we,
|
|
584
|
-
me,
|
|
585
|
-
ie,
|
|
586
|
-
m,
|
|
587
|
-
n,
|
|
588
|
-
V,
|
|
589
|
-
_e,
|
|
590
|
-
f
|
|
591
|
-
]), q = Z.useMemo(() => f && O && Se && { "aria-activedescendant": `${x}-${r}` }, [
|
|
592
|
-
f,
|
|
593
|
-
O,
|
|
594
|
-
Se,
|
|
595
|
-
x,
|
|
596
|
-
r
|
|
597
|
-
]), J = Z.useMemo(() => ({
|
|
598
|
-
"aria-orientation": _ === "both" ? void 0 : _,
|
|
599
|
-
...re ? {} : q,
|
|
600
|
-
onKeyDown(e) {
|
|
601
|
-
if (e.key === "Tab" && e.shiftKey && O && !f) {
|
|
602
|
-
let t = oe(e.nativeEvent);
|
|
603
|
-
if (t && !U(ie.current, t)) return;
|
|
604
|
-
a(e), D.setOpen(!1, v(E, e.nativeEvent)), Ie(j) && j.focus();
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
K(e);
|
|
608
|
-
},
|
|
609
|
-
onPointerMove() {
|
|
610
|
-
B.current = !0;
|
|
611
|
-
}
|
|
612
|
-
}), [
|
|
613
|
-
q,
|
|
614
|
-
K,
|
|
615
|
-
ie,
|
|
616
|
-
_,
|
|
617
|
-
re,
|
|
618
|
-
D,
|
|
619
|
-
O,
|
|
620
|
-
f,
|
|
621
|
-
j
|
|
622
|
-
]), ke = Z.useMemo(() => {
|
|
623
|
-
function e(e) {
|
|
624
|
-
D.setOpen(!0, v(ve, e.nativeEvent, e.currentTarget));
|
|
625
|
-
}
|
|
626
|
-
function t(e) {
|
|
627
|
-
p === "auto" && Oe(e.nativeEvent) && (I.current = !f);
|
|
628
|
-
}
|
|
629
|
-
function n(e) {
|
|
630
|
-
I.current = p, p === "auto" && C(e.nativeEvent) && (I.current = !0);
|
|
631
|
-
}
|
|
632
|
-
return {
|
|
633
|
-
onKeyDown(t) {
|
|
634
|
-
let n = D.select("open");
|
|
635
|
-
B.current = !1;
|
|
636
|
-
let r = t.key.startsWith("Arrow"), i = zt(t.key, Te(), d), o = Lt(t.key, _), s = (u ? i : o) || t.key === "Enter" || t.key.trim() === "";
|
|
637
|
-
if (f && n) return K(t);
|
|
638
|
-
if (!(!n && !h && r)) {
|
|
639
|
-
if (s) {
|
|
640
|
-
let e = Lt(t.key, Te());
|
|
641
|
-
z.current = u && e ? null : t.key;
|
|
642
|
-
}
|
|
643
|
-
if (u) {
|
|
644
|
-
i && (a(t), n ? (R.current = G(), V(t)) : e(t));
|
|
645
|
-
return;
|
|
646
|
-
}
|
|
647
|
-
o && (he.current != null && (R.current = he.current), a(t), !n && h ? e(t) : K(t), n && V(t));
|
|
648
|
-
}
|
|
649
|
-
},
|
|
650
|
-
onFocus(e) {
|
|
651
|
-
D.select("open") && !f && (R.current = -1, V(e));
|
|
652
|
-
},
|
|
653
|
-
onPointerDown: n,
|
|
654
|
-
onPointerEnter: n,
|
|
655
|
-
onMouseDown: t,
|
|
656
|
-
onClick: t
|
|
657
|
-
};
|
|
658
|
-
}, [
|
|
659
|
-
K,
|
|
660
|
-
p,
|
|
661
|
-
G,
|
|
662
|
-
u,
|
|
663
|
-
V,
|
|
664
|
-
D,
|
|
665
|
-
h,
|
|
666
|
-
_,
|
|
667
|
-
Te,
|
|
668
|
-
d,
|
|
669
|
-
he,
|
|
670
|
-
f
|
|
671
|
-
]), Ae = Z.useMemo(() => ({
|
|
672
|
-
...q,
|
|
673
|
-
...ke
|
|
674
|
-
}), [q, ke]);
|
|
675
|
-
return Z.useMemo(() => o ? {
|
|
676
|
-
reference: Ae,
|
|
677
|
-
floating: J,
|
|
678
|
-
item: De,
|
|
679
|
-
trigger: ke
|
|
680
|
-
} : {}, [
|
|
681
|
-
o,
|
|
682
|
-
Ae,
|
|
683
|
-
J,
|
|
684
|
-
ke,
|
|
685
|
-
De
|
|
686
|
-
]);
|
|
687
|
-
}
|
|
688
|
-
//#endregion
|
|
689
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs
|
|
690
|
-
function Ht(e, t) {
|
|
691
|
-
let { listRef: r, elementsRef: i, activeIndex: o, onMatch: s, disabledIndices: c, onTyping: l, enabled: u = !0, resetMs: d = 750, selectedIndex: f = null } = t, p = "rootStore" in e ? e.rootStore : e, m = p.useState("open"), h = w(), g = Z.useRef(""), _ = Z.useRef(f ?? o ?? -1), v = Z.useRef(null), y = X((e) => {
|
|
692
|
-
function t(e) {
|
|
693
|
-
let t = i?.current[e];
|
|
694
|
-
return !t || n(t);
|
|
695
|
-
}
|
|
696
|
-
function u(e) {
|
|
697
|
-
return t(e) ? c == null || !Te(Je, e, c) : !1;
|
|
698
|
-
}
|
|
699
|
-
function p(e, t, n = 0) {
|
|
700
|
-
if (e.length === 0) return -1;
|
|
701
|
-
let r = (n % e.length + e.length) % e.length, i = t.toLowerCase();
|
|
702
|
-
for (let t = 0; t < e.length; t += 1) {
|
|
703
|
-
let n = (r + t) % e.length;
|
|
704
|
-
if (!(!e[n]?.toLowerCase().startsWith(i) || !u(n))) return n;
|
|
705
|
-
}
|
|
706
|
-
return -1;
|
|
707
|
-
}
|
|
708
|
-
let y = r.current;
|
|
709
|
-
if (g.current.length > 0 && e.key === " " && (a(e), l?.(!0)), g.current.length > 0 && g.current[0] !== " " && p(y, g.current) === -1 && e.key !== " " && l?.(!1), y == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
710
|
-
m && e.key !== " " && (a(e), l?.(!0));
|
|
711
|
-
let b = g.current === "";
|
|
712
|
-
b && (_.current = f ?? o ?? -1), y.every((e, t) => e && u(t) ? e[0]?.toLowerCase() !== e[1]?.toLowerCase() : !0) && g.current === e.key && (g.current = "", _.current = v.current), g.current += e.key, h.start(d, () => {
|
|
713
|
-
g.current = "", _.current = v.current, l?.(!1);
|
|
714
|
-
});
|
|
715
|
-
let x = ((b ? f ?? o ?? -1 : _.current) ?? 0) + 1, S = p(y, g.current, x);
|
|
716
|
-
S === -1 ? e.key !== " " && (g.current = "", l?.(!1)) : (s?.(S), v.current = S);
|
|
717
|
-
}), b = X((e) => {
|
|
718
|
-
let t = e.relatedTarget, n = p.select("domReferenceElement"), r = p.select("floatingElement");
|
|
719
|
-
U(n, t) || U(r, t) || (h.clear(), g.current = "", _.current = v.current, l?.(!1));
|
|
720
|
-
});
|
|
721
|
-
Y(() => {
|
|
722
|
-
!m && f !== null || (h.clear(), v.current = null, g.current !== "" && (g.current = ""));
|
|
723
|
-
}, [
|
|
724
|
-
m,
|
|
725
|
-
f,
|
|
726
|
-
h
|
|
727
|
-
]), Y(() => {
|
|
728
|
-
m && g.current === "" && (_.current = f ?? o ?? -1);
|
|
729
|
-
}, [
|
|
730
|
-
m,
|
|
731
|
-
f,
|
|
732
|
-
o
|
|
733
|
-
]);
|
|
734
|
-
let x = Z.useMemo(() => ({
|
|
735
|
-
onKeyDown: y,
|
|
736
|
-
onBlur: b
|
|
737
|
-
}), [y, b]);
|
|
738
|
-
return Z.useMemo(() => u ? {
|
|
739
|
-
reference: x,
|
|
740
|
-
floating: x
|
|
741
|
-
} : {}, [u, x]);
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs
|
|
745
|
-
var Ut = /*#__PURE__*/ Z.createContext(void 0);
|
|
746
|
-
process.env.NODE_ENV !== "production" && (Ut.displayName = "ToolbarRootContext");
|
|
747
|
-
function Wt(e) {
|
|
748
|
-
let t = Z.useContext(Ut);
|
|
749
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? qe(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
|
|
750
|
-
return t;
|
|
751
|
-
}
|
|
752
|
-
//#endregion
|
|
753
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/inertValue.mjs
|
|
754
|
-
function Gt(e) {
|
|
755
|
-
return Ke(19) ? e : e ? "true" : void 0;
|
|
756
|
-
}
|
|
757
|
-
//#endregion
|
|
758
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/InternalBackdrop.mjs
|
|
759
|
-
var Kt = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
760
|
-
let { cutout: n, ...r } = e, i;
|
|
761
|
-
if (n) {
|
|
762
|
-
let e = n.getBoundingClientRect();
|
|
763
|
-
i = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`;
|
|
764
|
-
}
|
|
765
|
-
return /*#__PURE__*/ (0, Q.jsx)("div", {
|
|
766
|
-
ref: t,
|
|
767
|
-
role: "presentation",
|
|
768
|
-
"data-base-ui-inert": "",
|
|
769
|
-
...r,
|
|
770
|
-
style: {
|
|
771
|
-
position: "fixed",
|
|
772
|
-
inset: 0,
|
|
773
|
-
userSelect: "none",
|
|
774
|
-
WebkitUserSelect: "none",
|
|
775
|
-
clipPath: i
|
|
776
|
-
}
|
|
777
|
-
});
|
|
778
|
-
});
|
|
779
|
-
process.env.NODE_ENV !== "production" && (Kt.displayName = "InternalBackdrop");
|
|
780
|
-
//#endregion
|
|
781
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/useScrollLock.mjs
|
|
782
|
-
var qt = {}, Jt = {}, Yt = "";
|
|
783
|
-
function Xt(e) {
|
|
784
|
-
if (typeof document > "u") return !1;
|
|
785
|
-
let t = W(e);
|
|
786
|
-
return Ge(t).innerWidth - t.documentElement.clientWidth > 0;
|
|
787
|
-
}
|
|
788
|
-
function Zt(e) {
|
|
789
|
-
if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
|
|
790
|
-
let t = W(e), n = t.documentElement, r = t.body, i = Ne(n) ? n : r, a = i.style.overflowY, o = n.style.scrollbarGutter;
|
|
791
|
-
n.style.scrollbarGutter = "stable", i.style.overflowY = "scroll";
|
|
792
|
-
let s = i.offsetWidth;
|
|
793
|
-
i.style.overflowY = "hidden";
|
|
794
|
-
let c = i.offsetWidth;
|
|
795
|
-
return i.style.overflowY = a, n.style.scrollbarGutter = o, s === c;
|
|
796
|
-
}
|
|
797
|
-
function Qt(e) {
|
|
798
|
-
let t = W(e), n = t.documentElement, r = t.body, i = Ne(n) ? n : r, a = {
|
|
799
|
-
overflowY: i.style.overflowY,
|
|
800
|
-
overflowX: i.style.overflowX
|
|
801
|
-
};
|
|
802
|
-
return Object.assign(i.style, {
|
|
803
|
-
overflowY: "hidden",
|
|
804
|
-
overflowX: "hidden"
|
|
805
|
-
}), () => {
|
|
806
|
-
Object.assign(i.style, a);
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
function $t(e) {
|
|
810
|
-
let t = W(e), n = t.documentElement, i = t.body, a = Ge(n), o = 0, s = 0, c = !1, l = r.create();
|
|
811
|
-
if (f && (a.visualViewport?.scale ?? 1) !== 1) return () => {};
|
|
812
|
-
function u() {
|
|
813
|
-
let t = a.getComputedStyle(n), r = a.getComputedStyle(i), l = (t.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
|
|
814
|
-
o = n.scrollTop, s = n.scrollLeft, qt = {
|
|
815
|
-
scrollbarGutter: n.style.scrollbarGutter,
|
|
816
|
-
overflowY: n.style.overflowY,
|
|
817
|
-
overflowX: n.style.overflowX
|
|
818
|
-
}, Yt = n.style.scrollBehavior, Jt = {
|
|
819
|
-
position: i.style.position,
|
|
820
|
-
height: i.style.height,
|
|
821
|
-
width: i.style.width,
|
|
822
|
-
boxSizing: i.style.boxSizing,
|
|
823
|
-
overflowY: i.style.overflowY,
|
|
824
|
-
overflowX: i.style.overflowX,
|
|
825
|
-
scrollBehavior: i.style.scrollBehavior
|
|
826
|
-
};
|
|
827
|
-
let u = n.scrollHeight > n.clientHeight, d = n.scrollWidth > n.clientWidth, f = t.overflowY === "scroll" || r.overflowY === "scroll", p = t.overflowX === "scroll" || r.overflowX === "scroll", m = Math.max(0, a.innerWidth - i.clientWidth), h = Math.max(0, a.innerHeight - i.clientHeight), g = parseFloat(r.marginTop) + parseFloat(r.marginBottom), _ = parseFloat(r.marginLeft) + parseFloat(r.marginRight), v = Ne(n) ? n : i;
|
|
828
|
-
if (c = Zt(e), c) {
|
|
829
|
-
n.style.scrollbarGutter = l, v.style.overflowY = "hidden", v.style.overflowX = "hidden";
|
|
830
|
-
return;
|
|
831
|
-
}
|
|
832
|
-
Object.assign(n.style, {
|
|
833
|
-
scrollbarGutter: l,
|
|
834
|
-
overflowY: "hidden",
|
|
835
|
-
overflowX: "hidden"
|
|
836
|
-
}), (u || f) && (n.style.overflowY = "scroll"), (d || p) && (n.style.overflowX = "scroll"), Object.assign(i.style, {
|
|
837
|
-
position: "relative",
|
|
838
|
-
height: g || h ? `calc(100dvh - ${g + h}px)` : "100dvh",
|
|
839
|
-
width: _ || m ? `calc(100vw - ${_ + m}px)` : "100vw",
|
|
840
|
-
boxSizing: "border-box",
|
|
841
|
-
overflow: "hidden",
|
|
842
|
-
scrollBehavior: "unset"
|
|
843
|
-
}), i.scrollTop = o, i.scrollLeft = s, n.setAttribute("data-base-ui-scroll-locked", ""), n.style.scrollBehavior = "unset";
|
|
844
|
-
}
|
|
845
|
-
function d() {
|
|
846
|
-
Object.assign(n.style, qt), Object.assign(i.style, Jt), c || (n.scrollTop = o, n.scrollLeft = s, n.removeAttribute("data-base-ui-scroll-locked"), n.style.scrollBehavior = Yt);
|
|
847
|
-
}
|
|
848
|
-
function p() {
|
|
849
|
-
d(), l.request(u);
|
|
850
|
-
}
|
|
851
|
-
u();
|
|
852
|
-
let m = de(a, "resize", p);
|
|
853
|
-
return () => {
|
|
854
|
-
l.cancel(), d(), typeof a.removeEventListener == "function" && m();
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
var en = new class {
|
|
858
|
-
lockCount = 0;
|
|
859
|
-
restore = null;
|
|
860
|
-
timeoutLock = De.create();
|
|
861
|
-
timeoutUnlock = De.create();
|
|
862
|
-
acquire(e) {
|
|
863
|
-
return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
|
|
864
|
-
}
|
|
865
|
-
release = () => {
|
|
866
|
-
--this.lockCount, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
|
|
867
|
-
};
|
|
868
|
-
unlock = () => {
|
|
869
|
-
this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
|
|
870
|
-
};
|
|
871
|
-
lock(e) {
|
|
872
|
-
if (this.lockCount === 0 || this.restore !== null) return;
|
|
873
|
-
let t = W(e).documentElement, n = Ge(t).getComputedStyle(t).overflowY;
|
|
874
|
-
if (n === "hidden" || n === "clip") {
|
|
875
|
-
this.restore = Ve;
|
|
876
|
-
return;
|
|
877
|
-
}
|
|
878
|
-
let r = g || !Xt(e);
|
|
879
|
-
this.restore = r ? Qt(e) : $t(e);
|
|
880
|
-
}
|
|
881
|
-
}();
|
|
882
|
-
function tn(e = !0, t = null) {
|
|
883
|
-
Y(() => {
|
|
884
|
-
if (e) return en.acquire(t);
|
|
885
|
-
}, [e, t]);
|
|
886
|
-
}
|
|
887
|
-
//#endregion
|
|
888
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs
|
|
889
|
-
var nn = 20;
|
|
890
|
-
function rn(e, t, n, r) {
|
|
891
|
-
let [i, a] = Z.useState(!1);
|
|
892
|
-
Y(() => {
|
|
893
|
-
if (!e || !t || n == null) {
|
|
894
|
-
a(!1);
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
let r = W(n).documentElement.clientWidth, i = n.offsetWidth;
|
|
898
|
-
a(r > 0 && i > 0 && i >= r - nn);
|
|
899
|
-
}, [
|
|
900
|
-
e,
|
|
901
|
-
t,
|
|
902
|
-
n
|
|
903
|
-
]), tn(e && (!t || i), r);
|
|
904
|
-
}
|
|
905
|
-
//#endregion
|
|
906
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/useEnhancedClickHandler.mjs
|
|
907
|
-
function an(e) {
|
|
908
|
-
let t = Z.useRef(""), n = Z.useCallback((n) => {
|
|
909
|
-
n.defaultPrevented || (t.current = n.pointerType, e(n, n.pointerType));
|
|
910
|
-
}, [e]);
|
|
911
|
-
return {
|
|
912
|
-
onClick: Z.useCallback((n) => {
|
|
913
|
-
if (n.detail === 0) {
|
|
914
|
-
e(n, "keyboard");
|
|
915
|
-
return;
|
|
916
|
-
}
|
|
917
|
-
"pointerType" in n ? e(n, n.pointerType) : e(n, t.current), t.current = "";
|
|
918
|
-
}, [e]),
|
|
919
|
-
onPointerDown: n
|
|
920
|
-
};
|
|
921
|
-
}
|
|
922
|
-
//#endregion
|
|
923
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/useOpenInteractionType.mjs
|
|
924
|
-
function on(e, t) {
|
|
925
|
-
let { onClick: n, onPointerDown: r } = an(X((n, r) => {
|
|
926
|
-
(typeof e == "function" ? e() : e) || t(r || (g ? "touch" : ""));
|
|
927
|
-
}));
|
|
928
|
-
return Z.useMemo(() => ({
|
|
929
|
-
onClick: n,
|
|
930
|
-
onPointerDown: r
|
|
931
|
-
}), [n, r]);
|
|
932
|
-
}
|
|
933
|
-
function sn(e) {
|
|
934
|
-
let [t, n] = Z.useState(null), r = on(e, n);
|
|
935
|
-
return st(e, (t) => {
|
|
936
|
-
t && !e && n(null);
|
|
937
|
-
}), Z.useMemo(() => ({
|
|
938
|
-
openMethod: t,
|
|
939
|
-
triggerProps: r
|
|
940
|
-
}), [t, r]);
|
|
941
|
-
}
|
|
942
|
-
//#endregion
|
|
943
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs
|
|
944
|
-
function cn(e) {
|
|
945
|
-
let t = e.getBoundingClientRect(), n = Ge(e);
|
|
946
|
-
if (l) return t;
|
|
947
|
-
let r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
|
|
948
|
-
if (!(r.content !== "none" || i.content !== "none")) return t;
|
|
949
|
-
let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, u = Math.max(t.width, a, s), d = Math.max(t.height, o, c), f = u - t.width, p = d - t.height;
|
|
950
|
-
return {
|
|
951
|
-
left: t.left - f / 2,
|
|
952
|
-
right: t.right + f / 2,
|
|
953
|
-
top: t.top - p / 2,
|
|
954
|
-
bottom: t.bottom + p / 2
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
//#endregion
|
|
958
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/usePreviousValue.mjs
|
|
959
|
-
function ln(e) {
|
|
960
|
-
let [t, n] = Z.useState({
|
|
961
|
-
current: e,
|
|
962
|
-
previous: null
|
|
963
|
-
});
|
|
964
|
-
return e !== t.current && n({
|
|
965
|
-
current: e,
|
|
966
|
-
previous: t.current
|
|
967
|
-
}), t.previous;
|
|
968
|
-
}
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/client/hooks/use-proximity-hover.ts
|
|
971
|
-
function un(e, t) {
|
|
972
|
-
let n = e.getBoundingClientRect(), r = t === "x" ? e.offsetWidth : e.offsetHeight, i = t === "x" ? n.width : n.height;
|
|
973
|
-
return r > 0 ? i / r : 1;
|
|
974
|
-
}
|
|
975
|
-
function dn(e, t) {
|
|
976
|
-
let n = e.getBoundingClientRect(), r = un(e, "x"), i = un(e, "y"), a = [];
|
|
977
|
-
return t.forEach((t, o) => {
|
|
978
|
-
let s = t.getBoundingClientRect();
|
|
979
|
-
a[o] = {
|
|
980
|
-
top: (s.top - n.top) / i + e.scrollTop,
|
|
981
|
-
left: (s.left - n.left) / r + e.scrollLeft,
|
|
982
|
-
width: t.offsetWidth,
|
|
983
|
-
height: t.offsetHeight
|
|
984
|
-
};
|
|
985
|
-
}), a;
|
|
986
|
-
}
|
|
987
|
-
function fn(e, t, n, r) {
|
|
988
|
-
let i = r === "x" ? t : n, a = null, o = Infinity, s = null;
|
|
989
|
-
return e.forEach((e, t) => {
|
|
990
|
-
let n = e.getBoundingClientRect(), c = r === "x" ? n.left : n.top, l = r === "x" ? n.right : n.bottom;
|
|
991
|
-
i >= c && i <= l && (s = t);
|
|
992
|
-
let u = (c + l) / 2, d = Math.abs(i - u);
|
|
993
|
-
d < o && (o = d, a = t);
|
|
994
|
-
}), s ?? a;
|
|
995
|
-
}
|
|
996
|
-
function pn(e, t) {
|
|
997
|
-
if (e.length !== t.length) return !0;
|
|
998
|
-
for (let n = 0; n < t.length; n++) {
|
|
999
|
-
let r = e[n], i = t[n];
|
|
1000
|
-
if (r !== i && (!r || !i || r.top !== i.top || r.left !== i.left || r.width !== i.width || r.height !== i.height)) return !0;
|
|
1001
|
-
}
|
|
1002
|
-
return !1;
|
|
1003
|
-
}
|
|
1004
|
-
function mn(e, t = {}) {
|
|
1005
|
-
let { axis: n = "y" } = t, r = (0, Z.useRef)(/* @__PURE__ */ new Map()), [i, a] = (0, Z.useState)(null), [o, s] = (0, Z.useState)([]), c = (0, Z.useRef)([]), l = (0, Z.useRef)(0), u = (0, Z.useRef)(null), d = (0, Z.useRef)(null), f = (0, Z.useRef)(null), p = (0, Z.useCallback)(() => {
|
|
1006
|
-
let t = e.current;
|
|
1007
|
-
if (!t) return;
|
|
1008
|
-
let n = dn(t, r.current);
|
|
1009
|
-
pn(c.current, n) && (c.current = n, s(n));
|
|
1010
|
-
}, [e]), m = (0, Z.useCallback)((e, t) => {
|
|
1011
|
-
a(fn(r.current, e, t, n));
|
|
1012
|
-
}, [n]), h = (0, Z.useCallback)((e, t) => {
|
|
1013
|
-
t ? r.current.set(e, t) : r.current.delete(e), d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
1014
|
-
d.current = null, p();
|
|
1015
|
-
});
|
|
1016
|
-
}, [p]), g = (0, Z.useCallback)((e) => {
|
|
1017
|
-
f.current = {
|
|
1018
|
-
x: e.clientX,
|
|
1019
|
-
y: e.clientY
|
|
1020
|
-
}, u.current !== null && cancelAnimationFrame(u.current), u.current = requestAnimationFrame(() => {
|
|
1021
|
-
u.current = null, p(), m(e.clientX, e.clientY);
|
|
1022
|
-
});
|
|
1023
|
-
}, [p, m]), _ = (0, Z.useCallback)(() => {
|
|
1024
|
-
l.current += 1;
|
|
1025
|
-
}, []), v = (0, Z.useCallback)(() => {
|
|
1026
|
-
u.current !== null && (cancelAnimationFrame(u.current), u.current = null), f.current = null, a(null);
|
|
1027
|
-
}, []);
|
|
1028
|
-
return (0, Z.useEffect)(() => {
|
|
1029
|
-
let t = e.current;
|
|
1030
|
-
if (!t || typeof ResizeObserver > "u") return;
|
|
1031
|
-
let n = new ResizeObserver(() => {
|
|
1032
|
-
d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
1033
|
-
d.current = null, p();
|
|
1034
|
-
});
|
|
1035
|
-
});
|
|
1036
|
-
return n.observe(t), () => n.disconnect();
|
|
1037
|
-
}, [e, p]), (0, Z.useEffect)(() => {
|
|
1038
|
-
let t = e.current;
|
|
1039
|
-
if (!t) return;
|
|
1040
|
-
let n = () => {
|
|
1041
|
-
p();
|
|
1042
|
-
let e = f.current;
|
|
1043
|
-
e && m(e.x, e.y);
|
|
1044
|
-
};
|
|
1045
|
-
return t.addEventListener("scroll", n, {
|
|
1046
|
-
capture: !0,
|
|
1047
|
-
passive: !0
|
|
1048
|
-
}), () => t.removeEventListener("scroll", n, { capture: !0 });
|
|
1049
|
-
}, [
|
|
1050
|
-
e,
|
|
1051
|
-
p,
|
|
1052
|
-
m
|
|
1053
|
-
]), (0, Z.useEffect)(() => () => {
|
|
1054
|
-
u.current !== null && cancelAnimationFrame(u.current), d.current !== null && cancelAnimationFrame(d.current);
|
|
1055
|
-
}, []), {
|
|
1056
|
-
activeIndex: i,
|
|
1057
|
-
setActiveIndex: a,
|
|
1058
|
-
itemRects: o,
|
|
1059
|
-
sessionRef: l,
|
|
1060
|
-
handlers: {
|
|
1061
|
-
onMouseMove: g,
|
|
1062
|
-
onMouseEnter: _,
|
|
1063
|
-
onMouseLeave: v
|
|
1064
|
-
},
|
|
1065
|
-
registerItem: h,
|
|
1066
|
-
measureItems: p
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
//#endregion
|
|
1070
|
-
//#region src/client/lib/surface-context.tsx
|
|
1071
|
-
var hn = (0, Z.createContext)(1);
|
|
1072
|
-
function gn() {
|
|
1073
|
-
return (0, Z.useContext)(hn);
|
|
1074
|
-
}
|
|
1075
|
-
function _n({ value: e, children: t }) {
|
|
1076
|
-
return /* @__PURE__ */ (0, Q.jsx)(hn.Provider, {
|
|
1077
|
-
value: Math.max(1, Math.min(8, e)),
|
|
1078
|
-
children: t
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
//#endregion
|
|
1082
|
-
//#region src/client/lib/surface-classes.ts
|
|
1083
|
-
var vn = {
|
|
1084
|
-
1: "bg-surface-1",
|
|
1085
|
-
2: "bg-surface-2",
|
|
1086
|
-
3: "bg-surface-3",
|
|
1087
|
-
4: "bg-surface-4",
|
|
1088
|
-
5: "bg-surface-5",
|
|
1089
|
-
6: "bg-surface-6",
|
|
1090
|
-
7: "bg-surface-7",
|
|
1091
|
-
8: "bg-surface-8"
|
|
1092
|
-
}, yn = {
|
|
1093
|
-
1: "shadow-surface-1",
|
|
1094
|
-
2: "shadow-surface-2",
|
|
1095
|
-
3: "shadow-surface-3",
|
|
1096
|
-
4: "shadow-surface-4",
|
|
1097
|
-
5: "shadow-surface-5",
|
|
1098
|
-
6: "shadow-surface-6",
|
|
1099
|
-
7: "shadow-surface-7",
|
|
1100
|
-
8: "shadow-surface-8"
|
|
1101
|
-
};
|
|
1102
|
-
function bn(e, t = e) {
|
|
1103
|
-
let n = Math.round(Math.max(1, Math.min(8, e))), r = Math.round(Math.max(1, Math.min(8, t)));
|
|
1104
|
-
return `${vn[n]} ${yn[r]}`;
|
|
1105
|
-
}
|
|
1106
|
-
//#endregion
|
|
1107
|
-
//#region src/client/lib/elevated.tsx
|
|
1108
|
-
var xn = (0, Z.forwardRef)(({ offset: e, shadowLevel: t, className: n, children: r, ...i }, a) => {
|
|
1109
|
-
let o = gn(), s = Math.min(o + e, 8);
|
|
1110
|
-
return /* @__PURE__ */ (0, Q.jsx)(_n, {
|
|
1111
|
-
value: s,
|
|
1112
|
-
children: /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
1113
|
-
ref: a,
|
|
1114
|
-
className: Re(bn(s, t ?? s), n),
|
|
1115
|
-
...i,
|
|
1116
|
-
children: r
|
|
1117
|
-
})
|
|
1118
|
-
});
|
|
1119
|
-
});
|
|
1120
|
-
xn.displayName = "Elevated";
|
|
1121
|
-
//#endregion
|
|
1122
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/root/SelectRootContext.mjs
|
|
1123
|
-
var Sn = /*#__PURE__*/ Z.createContext(null);
|
|
1124
|
-
process.env.NODE_ENV !== "production" && (Sn.displayName = "SelectRootContext");
|
|
1125
|
-
var Cn = /*#__PURE__*/ Z.createContext(null);
|
|
1126
|
-
process.env.NODE_ENV !== "production" && (Cn.displayName = "SelectFloatingContext");
|
|
1127
|
-
function wn() {
|
|
1128
|
-
let e = Z.useContext(Sn);
|
|
1129
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ? qe(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1130
|
-
return e;
|
|
1131
|
-
}
|
|
1132
|
-
function Tn() {
|
|
1133
|
-
let e = Z.useContext(Cn);
|
|
1134
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ? qe(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1135
|
-
return e;
|
|
1136
|
-
}
|
|
1137
|
-
//#endregion
|
|
1138
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
|
|
1139
|
-
function En(e = {}) {
|
|
1140
|
-
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = lt(), o = b(t), s = n ? i : void 0, c = Ze(() => Symbol("labelable-control")), l = Z.useRef(!1), u = Z.useRef(t != null), d = X(() => {
|
|
1141
|
-
!l.current || a === Ve || (l.current = !1, a(c.current, void 0));
|
|
1142
|
-
});
|
|
1143
|
-
return Y(() => {
|
|
1144
|
-
if (a === Ve) return;
|
|
1145
|
-
let e;
|
|
1146
|
-
if (n) {
|
|
1147
|
-
let n = r?.current;
|
|
1148
|
-
e = We(n) && n.closest("label") != null ? t ?? null : s ?? o;
|
|
1149
|
-
} else if (t != null) u.current = !0, e = t;
|
|
1150
|
-
else if (u.current) e = o;
|
|
1151
|
-
else {
|
|
1152
|
-
d();
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
if (e === void 0) {
|
|
1156
|
-
d();
|
|
1157
|
-
return;
|
|
1158
|
-
}
|
|
1159
|
-
l.current = !0, a(c.current, e);
|
|
1160
|
-
}, [
|
|
1161
|
-
t,
|
|
1162
|
-
r,
|
|
1163
|
-
s,
|
|
1164
|
-
a,
|
|
1165
|
-
n,
|
|
1166
|
-
o,
|
|
1167
|
-
c,
|
|
1168
|
-
d
|
|
1169
|
-
]), Z.useEffect(() => d, [d]), i ?? o;
|
|
1170
|
-
}
|
|
1171
|
-
//#endregion
|
|
1172
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/itemEquality.mjs
|
|
1173
|
-
var Dn = (e, t) => Object.is(e, t);
|
|
1174
|
-
function On(e, t, n) {
|
|
1175
|
-
return e == null || t == null ? Object.is(e, t) : n(e, t);
|
|
1176
|
-
}
|
|
1177
|
-
function kn(e, t, n) {
|
|
1178
|
-
return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : On(t, e, n));
|
|
1179
|
-
}
|
|
1180
|
-
function An(e, t, n) {
|
|
1181
|
-
return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : On(e, t, n));
|
|
1182
|
-
}
|
|
1183
|
-
function jn(e, t, n) {
|
|
1184
|
-
return e.filter((e) => !On(t, e, n));
|
|
1185
|
-
}
|
|
1186
|
-
//#endregion
|
|
1187
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/serializeValue.mjs
|
|
1188
|
-
function Mn(e) {
|
|
1189
|
-
if (e == null) return "";
|
|
1190
|
-
if (typeof e == "string") return e;
|
|
1191
|
-
try {
|
|
1192
|
-
return JSON.stringify(e);
|
|
1193
|
-
} catch {
|
|
1194
|
-
return String(e);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
//#endregion
|
|
1198
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/resolveValueLabel.mjs
|
|
1199
|
-
function Nn(e) {
|
|
1200
|
-
return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
|
|
1201
|
-
}
|
|
1202
|
-
function Pn(e) {
|
|
1203
|
-
if (!Array.isArray(e)) return e != null && "null" in e;
|
|
1204
|
-
let t = e;
|
|
1205
|
-
if (Nn(t)) {
|
|
1206
|
-
for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
|
|
1207
|
-
return !1;
|
|
1208
|
-
}
|
|
1209
|
-
for (let e of t) if (e && e.value == null && e.label != null) return !0;
|
|
1210
|
-
return !1;
|
|
1211
|
-
}
|
|
1212
|
-
function Fn(e, t) {
|
|
1213
|
-
if (t && e != null) return t(e) ?? "";
|
|
1214
|
-
if (e && typeof e == "object") {
|
|
1215
|
-
if ("label" in e && e.label != null) return String(e.label);
|
|
1216
|
-
if ("value" in e) return String(e.value);
|
|
1217
|
-
}
|
|
1218
|
-
return Mn(e);
|
|
1219
|
-
}
|
|
1220
|
-
function In(e, t) {
|
|
1221
|
-
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? Mn(e.value) : Mn(e);
|
|
1222
|
-
}
|
|
1223
|
-
function Ln(e, t, n) {
|
|
1224
|
-
function r() {
|
|
1225
|
-
return Fn(e, n);
|
|
1226
|
-
}
|
|
1227
|
-
if (n && e != null) return n(e);
|
|
1228
|
-
if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
|
|
1229
|
-
if (t && !Array.isArray(t)) return t[e] ?? r();
|
|
1230
|
-
if (Array.isArray(t)) {
|
|
1231
|
-
let n = t, i = Nn(n) ? n.flatMap((e) => e.items) : n;
|
|
1232
|
-
if (typeof e != "object" || !e) {
|
|
1233
|
-
let t = i.find((t) => t.value === e);
|
|
1234
|
-
return t && t.label != null ? t.label : r();
|
|
1235
|
-
}
|
|
1236
|
-
if ("value" in e) {
|
|
1237
|
-
let t = i.find((t) => t && t.value === e.value);
|
|
1238
|
-
if (t && t.label != null) return t.label;
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
return r();
|
|
1242
|
-
}
|
|
1243
|
-
function Rn(e, t, n) {
|
|
1244
|
-
return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/*#__PURE__*/ (0, Q.jsx)(Z.Fragment, { children: Ln(r, t, n) }, i)), e), []);
|
|
1245
|
-
}
|
|
1246
|
-
//#endregion
|
|
1247
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/store.mjs
|
|
1248
|
-
var $ = {
|
|
1249
|
-
id: q((e) => e.id),
|
|
1250
|
-
labelId: q((e) => e.labelId),
|
|
1251
|
-
modal: q((e) => e.modal),
|
|
1252
|
-
multiple: q((e) => e.multiple),
|
|
1253
|
-
items: q((e) => e.items),
|
|
1254
|
-
itemToStringLabel: q((e) => e.itemToStringLabel),
|
|
1255
|
-
itemToStringValue: q((e) => e.itemToStringValue),
|
|
1256
|
-
isItemEqualToValue: q((e) => e.isItemEqualToValue),
|
|
1257
|
-
value: q((e) => e.value),
|
|
1258
|
-
hasSelectedValue: q((e) => {
|
|
1259
|
-
let { value: t, multiple: n, itemToStringValue: r } = e;
|
|
1260
|
-
return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : In(t, r) !== "";
|
|
1261
|
-
}),
|
|
1262
|
-
hasNullItemLabel: q((e, t) => t ? Pn(e.items) : !1),
|
|
1263
|
-
open: q((e) => e.open),
|
|
1264
|
-
mounted: q((e) => e.mounted),
|
|
1265
|
-
forceMount: q((e) => e.forceMount),
|
|
1266
|
-
transitionStatus: q((e) => e.transitionStatus),
|
|
1267
|
-
openMethod: q((e) => e.openMethod),
|
|
1268
|
-
activeIndex: q((e) => e.activeIndex),
|
|
1269
|
-
selectedIndex: q((e) => e.selectedIndex),
|
|
1270
|
-
isActive: q((e, t) => e.activeIndex === t),
|
|
1271
|
-
isSelected: q((e, t) => {
|
|
1272
|
-
let n = e.isItemEqualToValue, r = e.value;
|
|
1273
|
-
return e.multiple ? Array.isArray(r) && r.some((e) => On(t, e, n)) : On(t, r, n);
|
|
1274
|
-
}),
|
|
1275
|
-
isSelectedByFocus: q((e, t) => e.selectedIndex === t),
|
|
1276
|
-
popupProps: q((e) => e.popupProps),
|
|
1277
|
-
triggerProps: q((e) => e.triggerProps),
|
|
1278
|
-
triggerElement: q((e) => e.triggerElement),
|
|
1279
|
-
positionerElement: q((e) => e.positionerElement),
|
|
1280
|
-
listElement: q((e) => e.listElement),
|
|
1281
|
-
popupSide: q((e) => e.popupSide),
|
|
1282
|
-
scrollUpArrowVisible: q((e) => e.scrollUpArrowVisible),
|
|
1283
|
-
scrollDownArrowVisible: q((e) => e.scrollDownArrowVisible),
|
|
1284
|
-
hasScrollArrows: q((e) => e.hasScrollArrows)
|
|
1285
|
-
};
|
|
1286
|
-
//#endregion
|
|
1287
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/areArraysEqual.mjs
|
|
1288
|
-
function zn(e, t, n = (e, t) => e === t) {
|
|
1289
|
-
return e.length === t.length && e.every((e, r) => n(e, t[r]));
|
|
1290
|
-
}
|
|
1291
|
-
//#endregion
|
|
1292
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/clamp.mjs
|
|
1293
|
-
function Bn(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
1294
|
-
return Math.max(t, Math.min(e, n));
|
|
1295
|
-
}
|
|
1296
|
-
function Vn(e, t) {
|
|
1297
|
-
return Math.max(0, e - t);
|
|
1298
|
-
}
|
|
1299
|
-
function Hn(e, t) {
|
|
1300
|
-
if (t <= 0) return 0;
|
|
1301
|
-
let n = Bn(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
|
|
1302
|
-
return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
|
|
1303
|
-
}
|
|
1304
|
-
//#endregion
|
|
1305
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/root/SelectRoot.mjs
|
|
1306
|
-
function Un(e) {
|
|
1307
|
-
let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: c = !1, onOpenChange: l, name: u, form: d, autoComplete: f, disabled: p = !1, readOnly: m = !1, required: h = !1, modal: g = !0, actionsRef: _, inputRef: y, onOpenChangeComplete: b, items: x, multiple: S = !1, itemToStringLabel: ee, itemToStringValue: C, isItemEqualToValue: w = Dn, highlightItemOnHover: E = !0, children: te } = e, { clearErrors: D } = ut(), { setDirty: O, setTouched: k, setFocused: A, validityData: M, setFilled: N, name: ne, disabled: re, validation: P, validationMode: I } = ct(), ae = En({ id: t }), L = re || p, R = ne ?? u, [z, B] = Qe({
|
|
1308
|
-
controlled: n,
|
|
1309
|
-
default: S ? r ?? Je : r,
|
|
1310
|
-
name: "Select",
|
|
1311
|
-
state: "value"
|
|
1312
|
-
}), [V, oe] = Qe({
|
|
1313
|
-
controlled: a,
|
|
1314
|
-
default: c,
|
|
1315
|
-
name: "Select",
|
|
1316
|
-
state: "open"
|
|
1317
|
-
}), se = Z.useRef([]), ce = Z.useRef([]), le = Z.useRef(null), de = Z.useRef(null), U = Z.useRef(0), fe = Z.useRef(null), me = Z.useRef([]), W = Z.useRef(!1), he = Z.useRef(null), ge = Z.useRef(null), _e = Z.useRef({
|
|
1318
|
-
allowSelectedMouseUp: !1,
|
|
1319
|
-
allowUnselectedMouseUp: !1,
|
|
1320
|
-
dragY: 0
|
|
1321
|
-
}), ve = Z.useRef(!1), { mounted: ye, setMounted: be, transitionStatus: xe } = ue(V), { openMethod: Se, triggerProps: Te } = sn(V), G = Ze(() => new F({
|
|
1322
|
-
id: ae,
|
|
1323
|
-
labelId: void 0,
|
|
1324
|
-
modal: g,
|
|
1325
|
-
multiple: S,
|
|
1326
|
-
itemToStringLabel: ee,
|
|
1327
|
-
itemToStringValue: C,
|
|
1328
|
-
isItemEqualToValue: w,
|
|
1329
|
-
value: z,
|
|
1330
|
-
open: V,
|
|
1331
|
-
mounted: ye,
|
|
1332
|
-
transitionStatus: xe,
|
|
1333
|
-
items: x,
|
|
1334
|
-
forceMount: !1,
|
|
1335
|
-
openMethod: null,
|
|
1336
|
-
activeIndex: null,
|
|
1337
|
-
selectedIndex: null,
|
|
1338
|
-
popupProps: {},
|
|
1339
|
-
triggerProps: {},
|
|
1340
|
-
triggerElement: null,
|
|
1341
|
-
positionerElement: null,
|
|
1342
|
-
listElement: null,
|
|
1343
|
-
popupSide: null,
|
|
1344
|
-
scrollUpArrowVisible: !1,
|
|
1345
|
-
scrollDownArrowVisible: !1,
|
|
1346
|
-
hasScrollArrows: !1
|
|
1347
|
-
})).current, Ee = J(G, $.activeIndex), K = J(G, $.selectedIndex), De = J(G, $.triggerElement), q = J(G, $.positionerElement), Oe = ln(Se), ke = Se ?? Oe ?? null, Ae = Z.useMemo(() => S ? "" : In(z, C), [
|
|
1348
|
-
S,
|
|
1349
|
-
z,
|
|
1350
|
-
C
|
|
1351
|
-
]), je = Z.useMemo(() => S && Array.isArray(z) ? z.map((e) => In(e, C)) : In(z, C), [
|
|
1352
|
-
S,
|
|
1353
|
-
z,
|
|
1354
|
-
C
|
|
1355
|
-
]);
|
|
1356
|
-
ot(Ce(G.state.triggerElement), ae, z, X(() => je), !L, u);
|
|
1357
|
-
let Me = Z.useRef(z), Ne = S ? Array.isArray(z) && z.length > 0 : z != null && In(z, C) !== "";
|
|
1358
|
-
Y(() => {
|
|
1359
|
-
z !== Me.current && G.set("forceMount", !0);
|
|
1360
|
-
}, [G, z]), Y(() => {
|
|
1361
|
-
N(Ne);
|
|
1362
|
-
}, [Ne, N]), Y(function() {
|
|
1363
|
-
let e = me.current, t;
|
|
1364
|
-
if (S) {
|
|
1365
|
-
let n = Array.isArray(z) ? z : [];
|
|
1366
|
-
if (n.length === 0) t = null;
|
|
1367
|
-
else {
|
|
1368
|
-
let r = n[n.length - 1], i = An(e, r, w);
|
|
1369
|
-
t = i === -1 ? null : i;
|
|
1370
|
-
}
|
|
1371
|
-
} else {
|
|
1372
|
-
let n = An(e, z, w);
|
|
1373
|
-
t = n === -1 ? null : n;
|
|
1374
|
-
}
|
|
1375
|
-
t === null && (ge.current = null), !V && G.set("selectedIndex", t);
|
|
1376
|
-
}, [
|
|
1377
|
-
Ne,
|
|
1378
|
-
S,
|
|
1379
|
-
V,
|
|
1380
|
-
z,
|
|
1381
|
-
me,
|
|
1382
|
-
w,
|
|
1383
|
-
G,
|
|
1384
|
-
ge
|
|
1385
|
-
]);
|
|
1386
|
-
function Pe(e) {
|
|
1387
|
-
let t = M.initialValue;
|
|
1388
|
-
return Array.isArray(e) && Array.isArray(t) ? !zn(e, t, (e, t) => On(e, t, w)) : e !== t;
|
|
1389
|
-
}
|
|
1390
|
-
st(z, () => {
|
|
1391
|
-
D(R), O(Pe(z)), P.change(z);
|
|
1392
|
-
});
|
|
1393
|
-
let Fe = X((e, t) => {
|
|
1394
|
-
l?.(e, t), !t.isCanceled && (oe(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (k(!0), A(!1), I === "onBlur" && P.commit(z)));
|
|
1395
|
-
}), Ie = X(() => {
|
|
1396
|
-
be(!1), G.update({
|
|
1397
|
-
activeIndex: null,
|
|
1398
|
-
openMethod: null
|
|
1399
|
-
}), b?.(!1);
|
|
1400
|
-
});
|
|
1401
|
-
s({
|
|
1402
|
-
enabled: !_,
|
|
1403
|
-
open: V,
|
|
1404
|
-
ref: le,
|
|
1405
|
-
onComplete() {
|
|
1406
|
-
V || Ie();
|
|
1407
|
-
}
|
|
1408
|
-
}), Z.useImperativeHandle(_, () => ({ unmount: Ie }), [Ie]);
|
|
1409
|
-
let Le = X((e, t) => {
|
|
1410
|
-
i?.(e, t), !t.isCanceled && B(e);
|
|
1411
|
-
}), Re = X(() => {
|
|
1412
|
-
let e = G.state.listElement || le.current;
|
|
1413
|
-
if (!e) return;
|
|
1414
|
-
let t = Vn(e.scrollHeight, e.clientHeight), n = Hn(e.scrollTop, t), r = n > 0, i = n < t;
|
|
1415
|
-
G.state.scrollUpArrowVisible !== r && G.set("scrollUpArrowVisible", r), G.state.scrollDownArrowVisible !== i && G.set("scrollDownArrowVisible", i);
|
|
1416
|
-
}), ze = pe({
|
|
1417
|
-
open: V,
|
|
1418
|
-
onOpenChange: Fe,
|
|
1419
|
-
elements: {
|
|
1420
|
-
reference: De,
|
|
1421
|
-
floating: q
|
|
1422
|
-
}
|
|
1423
|
-
}), Be = Pt(ze, {
|
|
1424
|
-
enabled: !m && !L,
|
|
1425
|
-
event: "mousedown"
|
|
1426
|
-
}), Ve = o(ze), He = Vt(ze, {
|
|
1427
|
-
enabled: !m && !L,
|
|
1428
|
-
listRef: se,
|
|
1429
|
-
activeIndex: Ee,
|
|
1430
|
-
selectedIndex: K,
|
|
1431
|
-
disabledIndices: Je,
|
|
1432
|
-
onNavigate(e) {
|
|
1433
|
-
e === null && !V || G.set("activeIndex", e);
|
|
1434
|
-
},
|
|
1435
|
-
focusItemOnHover: E
|
|
1436
|
-
}), We = Ht(ze, {
|
|
1437
|
-
enabled: !m && !L && (V || !S),
|
|
1438
|
-
listRef: ce,
|
|
1439
|
-
activeIndex: Ee,
|
|
1440
|
-
selectedIndex: K,
|
|
1441
|
-
disabledIndices: (e) => tt(se.current[e]),
|
|
1442
|
-
onMatch(e) {
|
|
1443
|
-
V ? G.set("activeIndex", e) : Le(me.current[e], v("none"));
|
|
1444
|
-
},
|
|
1445
|
-
onTyping(e) {
|
|
1446
|
-
W.current = e;
|
|
1447
|
-
}
|
|
1448
|
-
}), Ge = Z.useMemo(() => {
|
|
1449
|
-
let e = Ue(We.reference, He.reference, Ve.reference, Be.reference, Te);
|
|
1450
|
-
return ae && (e.id = ae), e;
|
|
1451
|
-
}, [
|
|
1452
|
-
Be.reference,
|
|
1453
|
-
We.reference,
|
|
1454
|
-
He.reference,
|
|
1455
|
-
Ve.reference,
|
|
1456
|
-
Te,
|
|
1457
|
-
ae
|
|
1458
|
-
]), Ke = Z.useMemo(() => Ue(we, We.floating, He.floating, Ve.floating), [
|
|
1459
|
-
We.floating,
|
|
1460
|
-
He.floating,
|
|
1461
|
-
Ve.floating
|
|
1462
|
-
]), qe = He.item ?? Ye;
|
|
1463
|
-
T(() => {
|
|
1464
|
-
G.update({
|
|
1465
|
-
popupProps: Ke,
|
|
1466
|
-
triggerProps: Ge
|
|
1467
|
-
});
|
|
1468
|
-
}), Y(() => {
|
|
1469
|
-
G.update({
|
|
1470
|
-
id: ae,
|
|
1471
|
-
modal: g,
|
|
1472
|
-
multiple: S,
|
|
1473
|
-
value: z,
|
|
1474
|
-
open: V,
|
|
1475
|
-
mounted: ye,
|
|
1476
|
-
transitionStatus: xe,
|
|
1477
|
-
popupProps: Ke,
|
|
1478
|
-
triggerProps: Ge,
|
|
1479
|
-
items: x,
|
|
1480
|
-
itemToStringLabel: ee,
|
|
1481
|
-
itemToStringValue: C,
|
|
1482
|
-
isItemEqualToValue: w,
|
|
1483
|
-
openMethod: ke
|
|
1484
|
-
});
|
|
1485
|
-
}, [
|
|
1486
|
-
G,
|
|
1487
|
-
ae,
|
|
1488
|
-
g,
|
|
1489
|
-
S,
|
|
1490
|
-
z,
|
|
1491
|
-
V,
|
|
1492
|
-
ye,
|
|
1493
|
-
xe,
|
|
1494
|
-
Ke,
|
|
1495
|
-
Ge,
|
|
1496
|
-
x,
|
|
1497
|
-
ee,
|
|
1498
|
-
C,
|
|
1499
|
-
w,
|
|
1500
|
-
ke
|
|
1501
|
-
]);
|
|
1502
|
-
let $e = Z.useMemo(() => ({
|
|
1503
|
-
store: G,
|
|
1504
|
-
name: R,
|
|
1505
|
-
required: h,
|
|
1506
|
-
disabled: L,
|
|
1507
|
-
readOnly: m,
|
|
1508
|
-
multiple: S,
|
|
1509
|
-
highlightItemOnHover: E,
|
|
1510
|
-
setValue: Le,
|
|
1511
|
-
setOpen: Fe,
|
|
1512
|
-
listRef: se,
|
|
1513
|
-
popupRef: le,
|
|
1514
|
-
scrollHandlerRef: de,
|
|
1515
|
-
handleScrollArrowVisibility: Re,
|
|
1516
|
-
scrollArrowsMountedCountRef: U,
|
|
1517
|
-
itemProps: qe,
|
|
1518
|
-
valueRef: fe,
|
|
1519
|
-
valuesRef: me,
|
|
1520
|
-
labelsRef: ce,
|
|
1521
|
-
typingRef: W,
|
|
1522
|
-
selectionRef: _e,
|
|
1523
|
-
firstItemTextRef: he,
|
|
1524
|
-
selectedItemTextRef: ge,
|
|
1525
|
-
validation: P,
|
|
1526
|
-
onOpenChangeComplete: b,
|
|
1527
|
-
alignItemWithTriggerActiveRef: ve,
|
|
1528
|
-
initialValueRef: Me
|
|
1529
|
-
}), [
|
|
1530
|
-
G,
|
|
1531
|
-
R,
|
|
1532
|
-
h,
|
|
1533
|
-
L,
|
|
1534
|
-
m,
|
|
1535
|
-
S,
|
|
1536
|
-
E,
|
|
1537
|
-
Le,
|
|
1538
|
-
Fe,
|
|
1539
|
-
qe,
|
|
1540
|
-
P,
|
|
1541
|
-
b,
|
|
1542
|
-
Re
|
|
1543
|
-
]), et = Xe(y, P.inputRef), nt = S && Array.isArray(z) && z.length > 0, rt = S ? void 0 : R, it = Z.useMemo(() => !S || !Array.isArray(z) || !R ? null : z.map((e) => {
|
|
1544
|
-
let t = In(e, C);
|
|
1545
|
-
return /*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1546
|
-
type: "hidden",
|
|
1547
|
-
form: d,
|
|
1548
|
-
name: R,
|
|
1549
|
-
value: t,
|
|
1550
|
-
disabled: L
|
|
1551
|
-
}, t);
|
|
1552
|
-
}), [
|
|
1553
|
-
S,
|
|
1554
|
-
z,
|
|
1555
|
-
d,
|
|
1556
|
-
R,
|
|
1557
|
-
C,
|
|
1558
|
-
L
|
|
1559
|
-
]);
|
|
1560
|
-
return /*#__PURE__*/ (0, Q.jsx)(Sn.Provider, {
|
|
1561
|
-
value: $e,
|
|
1562
|
-
children: /*#__PURE__*/ (0, Q.jsxs)(Cn.Provider, {
|
|
1563
|
-
value: ze,
|
|
1564
|
-
children: [
|
|
1565
|
-
te,
|
|
1566
|
-
/*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1567
|
-
...P.getValidationProps(L, {
|
|
1568
|
-
onFocus() {
|
|
1569
|
-
G.state.triggerElement?.focus({ focusVisible: !0 });
|
|
1570
|
-
},
|
|
1571
|
-
onChange(e) {
|
|
1572
|
-
if (e.nativeEvent.defaultPrevented || L || m) return;
|
|
1573
|
-
let t = e.currentTarget.value, n = v(j, e.nativeEvent);
|
|
1574
|
-
function r() {
|
|
1575
|
-
if (S) return;
|
|
1576
|
-
let e = t.toLowerCase(), r = me.current.findIndex((t) => In(t, C).toLowerCase() === e || Fn(t, ee).toLowerCase() === e);
|
|
1577
|
-
r === -1 && (r = me.current.findIndex((t, n) => {
|
|
1578
|
-
let r = ce.current[n];
|
|
1579
|
-
return r != null && r.toLowerCase() === e;
|
|
1580
|
-
}));
|
|
1581
|
-
let i = r === -1 ? void 0 : me.current[r];
|
|
1582
|
-
i != null && Le(i, n);
|
|
1583
|
-
}
|
|
1584
|
-
G.set("forceMount", !0), queueMicrotask(r);
|
|
1585
|
-
}
|
|
1586
|
-
}),
|
|
1587
|
-
id: ae && rt == null ? `${ae}-hidden-input` : void 0,
|
|
1588
|
-
form: d,
|
|
1589
|
-
name: rt,
|
|
1590
|
-
autoComplete: f,
|
|
1591
|
-
value: Ae,
|
|
1592
|
-
disabled: L,
|
|
1593
|
-
required: h && !nt,
|
|
1594
|
-
readOnly: m,
|
|
1595
|
-
ref: et,
|
|
1596
|
-
style: R ? ie : H,
|
|
1597
|
-
tabIndex: -1,
|
|
1598
|
-
"aria-hidden": !0,
|
|
1599
|
-
suppressHydrationWarning: !0
|
|
1600
|
-
}),
|
|
1601
|
-
it
|
|
1602
|
-
]
|
|
1603
|
-
})
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
//#endregion
|
|
1607
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs
|
|
1608
|
-
function Wn(e, t) {
|
|
1609
|
-
return e ?? t;
|
|
1610
|
-
}
|
|
1611
|
-
//#endregion
|
|
1612
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
|
|
1613
|
-
var Gn = 2, Kn = 400, qn = {
|
|
1614
|
-
...se,
|
|
1615
|
-
...at,
|
|
1616
|
-
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
1617
|
-
value: () => null
|
|
1618
|
-
}, Jn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1619
|
-
let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = ct(), { labelId: m } = lt(), { store: h, setOpen: g, selectionRef: _, validation: y, readOnly: b, required: x, alignItemWithTriggerActiveRef: S, disabled: ee } = wn(), C = p || ee || a, T = J(h, $.open), E = J(h, $.mounted), te = J(h, $.value), D = J(h, $.triggerProps), O = J(h, $.positionerElement), k = J(h, $.listElement), A = J(h, $.popupSide), M = J(h, $.id), N = J(h, $.labelId), ne = J(h, $.hasSelectedValue), re = E && O ? A : null, ie = i ?? M, P = Wn(m, N);
|
|
1620
|
-
En({ id: ie });
|
|
1621
|
-
let F = Ce(O), I = Z.useRef(null), { getButtonProps: ae, buttonRef: L } = He({
|
|
1622
|
-
disabled: C,
|
|
1623
|
-
native: o
|
|
1624
|
-
}), R = X((e) => {
|
|
1625
|
-
h.set("triggerElement", e);
|
|
1626
|
-
}), z = w(), B = w(), V = w();
|
|
1627
|
-
Z.useEffect(() => {
|
|
1628
|
-
if (T) return V.start(Kn, () => {
|
|
1629
|
-
_.current.allowUnselectedMouseUp = !0, _.current.allowSelectedMouseUp = !0;
|
|
1630
|
-
}), () => {
|
|
1631
|
-
V.clear();
|
|
1632
|
-
};
|
|
1633
|
-
_.current = {
|
|
1634
|
-
allowSelectedMouseUp: !1,
|
|
1635
|
-
allowUnselectedMouseUp: !1,
|
|
1636
|
-
dragY: 0
|
|
1637
|
-
}, B.clear();
|
|
1638
|
-
}, [
|
|
1639
|
-
T,
|
|
1640
|
-
_,
|
|
1641
|
-
B,
|
|
1642
|
-
V
|
|
1643
|
-
]);
|
|
1644
|
-
let oe = Ue(D, {
|
|
1645
|
-
id: ie,
|
|
1646
|
-
role: "combobox",
|
|
1647
|
-
"aria-expanded": T ? "true" : "false",
|
|
1648
|
-
"aria-haspopup": "listbox",
|
|
1649
|
-
"aria-controls": T ? k?.id ?? Ee(O)?.id : void 0,
|
|
1650
|
-
"aria-labelledby": P,
|
|
1651
|
-
"aria-readonly": b || void 0,
|
|
1652
|
-
"aria-required": x || void 0,
|
|
1653
|
-
tabIndex: C ? -1 : 0,
|
|
1654
|
-
onFocus(e) {
|
|
1655
|
-
u(!0), T && S.current && g(!1, v(j, e.nativeEvent)), z.start(0, () => {
|
|
1656
|
-
h.set("forceMount", !0);
|
|
1657
|
-
});
|
|
1658
|
-
},
|
|
1659
|
-
onBlur(e) {
|
|
1660
|
-
U(O, e.relatedTarget) || (l(!0), u(!1), d === "onBlur" && y.commit(te));
|
|
1661
|
-
},
|
|
1662
|
-
onMouseDown(e) {
|
|
1663
|
-
if (T) return;
|
|
1664
|
-
let t = W(e.currentTarget);
|
|
1665
|
-
function n(e) {
|
|
1666
|
-
if (!I.current) return;
|
|
1667
|
-
let t = e.target;
|
|
1668
|
-
if (U(I.current, t) || U(F.current, t)) return;
|
|
1669
|
-
let n = cn(I.current);
|
|
1670
|
-
e.clientX >= n.left - Gn && e.clientX <= n.right + Gn && e.clientY >= n.top - Gn && e.clientY <= n.bottom + Gn || g(!1, v(Ae, e));
|
|
1671
|
-
}
|
|
1672
|
-
B.start(0, () => {
|
|
1673
|
-
t.addEventListener("mouseup", n, { once: !0 });
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
}, c, ae), H = y.getValidationProps(C, oe);
|
|
1677
|
-
H.role = "combobox";
|
|
1678
|
-
let se = {
|
|
1679
|
-
...f,
|
|
1680
|
-
open: T,
|
|
1681
|
-
disabled: C,
|
|
1682
|
-
value: te,
|
|
1683
|
-
readOnly: b,
|
|
1684
|
-
popupSide: re,
|
|
1685
|
-
placeholder: !ne
|
|
1686
|
-
};
|
|
1687
|
-
return Be("button", e, {
|
|
1688
|
-
ref: [
|
|
1689
|
-
t,
|
|
1690
|
-
I,
|
|
1691
|
-
L,
|
|
1692
|
-
R
|
|
1693
|
-
],
|
|
1694
|
-
state: se,
|
|
1695
|
-
stateAttributesMapping: qn,
|
|
1696
|
-
props: H
|
|
1697
|
-
});
|
|
1698
|
-
});
|
|
1699
|
-
process.env.NODE_ENV !== "production" && (Jn.displayName = "SelectTrigger");
|
|
1700
|
-
//#endregion
|
|
1701
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/value/SelectValue.mjs
|
|
1702
|
-
var Yn = { value: () => null }, Xn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1703
|
-
let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = wn(), u = J(c, $.value), d = J(c, $.items), f = J(c, $.itemToStringLabel), p = J(c, $.hasSelectedValue), m = !p && a != null && i == null, h = J(c, $.hasNullItemLabel, m), g = {
|
|
1704
|
-
value: u,
|
|
1705
|
-
placeholder: !p
|
|
1706
|
-
}, _ = null;
|
|
1707
|
-
return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? Rn(u, d, f) : Ln(u, d, f)), Be("span", e, {
|
|
1708
|
-
state: g,
|
|
1709
|
-
ref: [t, l],
|
|
1710
|
-
props: [{ children: _ }, s],
|
|
1711
|
-
stateAttributesMapping: Yn
|
|
1712
|
-
});
|
|
1713
|
-
});
|
|
1714
|
-
process.env.NODE_ENV !== "production" && (Xn.displayName = "SelectValue");
|
|
1715
|
-
//#endregion
|
|
1716
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs
|
|
1717
|
-
var Zn = /*#__PURE__*/ Z.createContext(void 0);
|
|
1718
|
-
process.env.NODE_ENV !== "production" && (Zn.displayName = "SelectPortalContext");
|
|
1719
|
-
//#endregion
|
|
1720
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
1721
|
-
var Qn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1722
|
-
let { store: n } = wn(), r = J(n, $.mounted), i = J(n, $.forceMount);
|
|
1723
|
-
return r || i ? /*#__PURE__*/ (0, Q.jsx)(Zn.Provider, {
|
|
1724
|
-
value: !0,
|
|
1725
|
-
children: /*#__PURE__*/ (0, Q.jsx)(S, {
|
|
1726
|
-
ref: t,
|
|
1727
|
-
...e
|
|
1728
|
-
})
|
|
1729
|
-
}) : null;
|
|
1730
|
-
});
|
|
1731
|
-
process.env.NODE_ENV !== "production" && (Qn.displayName = "SelectPortal");
|
|
1732
|
-
//#endregion
|
|
1733
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
|
|
1734
|
-
var $n = /*#__PURE__*/ Z.createContext(void 0);
|
|
1735
|
-
process.env.NODE_ENV !== "production" && ($n.displayName = "SelectPositionerContext");
|
|
1736
|
-
function er() {
|
|
1737
|
-
let e = Z.useContext($n);
|
|
1738
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ? qe(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
1739
|
-
return e;
|
|
1740
|
-
}
|
|
1741
|
-
//#endregion
|
|
1742
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/popup/utils.mjs
|
|
1743
|
-
function tr(e, t) {
|
|
1744
|
-
e && Object.assign(e.style, t);
|
|
1745
|
-
}
|
|
1746
|
-
var nr = {
|
|
1747
|
-
position: "relative",
|
|
1748
|
-
maxHeight: "100%",
|
|
1749
|
-
overflowX: "hidden",
|
|
1750
|
-
overflowY: "auto"
|
|
1751
|
-
}, rr = { position: "fixed" }, ir = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1752
|
-
let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: m = !1, disableAnchorTracking: h, alignItemWithTrigger: g = !0, collisionAvoidance: y = _, style: b, ...x } = e, { store: S, listRef: ee, labelsRef: C, alignItemWithTriggerActiveRef: w, selectedItemTextRef: T, valuesRef: E, initialValueRef: te, popupRef: D, setValue: O } = wn(), k = Tn(), A = J(S, $.open), M = J(S, $.mounted), N = J(S, $.modal), ne = J(S, $.value), re = J(S, $.openMethod), ie = J(S, $.positionerElement), P = J(S, $.triggerElement), F = J(S, $.isItemEqualToValue), I = J(S, $.transitionStatus), ae = Z.useRef(null), L = Z.useRef(null), [R, z] = Z.useState(g), B = M && R && re !== "touch";
|
|
1753
|
-
!M && R !== g && z(g), Y(() => {
|
|
1754
|
-
M || ($.scrollUpArrowVisible(S.state) && S.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(S.state) && S.set("scrollDownArrowVisible", !1));
|
|
1755
|
-
}, [S, M]), Z.useImperativeHandle(w, () => B), rn((B || N) && A, re === "touch", ie, P);
|
|
1756
|
-
let V = p({
|
|
1757
|
-
anchor: n,
|
|
1758
|
-
floatingRootContext: k,
|
|
1759
|
-
positionMethod: r,
|
|
1760
|
-
mounted: M,
|
|
1761
|
-
side: o,
|
|
1762
|
-
sideOffset: c,
|
|
1763
|
-
align: s,
|
|
1764
|
-
alignOffset: l,
|
|
1765
|
-
arrowPadding: f,
|
|
1766
|
-
collisionBoundary: u,
|
|
1767
|
-
collisionPadding: d,
|
|
1768
|
-
sticky: m,
|
|
1769
|
-
disableAnchorTracking: h ?? B,
|
|
1770
|
-
collisionAvoidance: y,
|
|
1771
|
-
keepMounted: !0
|
|
1772
|
-
}), oe = B ? "none" : V.side, H = B ? rr : V.positionerStyles, se = {
|
|
1773
|
-
open: A,
|
|
1774
|
-
side: oe,
|
|
1775
|
-
align: V.align,
|
|
1776
|
-
anchorHidden: V.anchorHidden
|
|
1777
|
-
};
|
|
1778
|
-
Y(() => {
|
|
1779
|
-
S.set("popupSide", V.side);
|
|
1780
|
-
}, [S, V.side]);
|
|
1781
|
-
let ce = _e(e, se, {
|
|
1782
|
-
styles: H,
|
|
1783
|
-
transitionStatus: I,
|
|
1784
|
-
props: x,
|
|
1785
|
-
refs: [t, X((e) => {
|
|
1786
|
-
S.set("positionerElement", e);
|
|
1787
|
-
})],
|
|
1788
|
-
hidden: !M,
|
|
1789
|
-
inert: !A
|
|
1790
|
-
}), le = Z.useRef(0), ue = X((e) => {
|
|
1791
|
-
if (e.size === 0 && le.current === 0 || E.current.length === 0) return;
|
|
1792
|
-
let t = le.current;
|
|
1793
|
-
if (le.current = e.size, e.size === t) return;
|
|
1794
|
-
let n = v(j);
|
|
1795
|
-
if (t !== 0 && !S.state.multiple && ne !== null && An(E.current, ne, F) === -1) {
|
|
1796
|
-
let e = te.current, t = e != null && An(E.current, e, F) !== -1 ? e : null;
|
|
1797
|
-
O(t, n), t === null && (S.set("selectedIndex", null), T.current = null);
|
|
1798
|
-
}
|
|
1799
|
-
if (t !== 0 && S.state.multiple && Array.isArray(ne)) {
|
|
1800
|
-
let e = (e) => An(E.current, e, F) !== -1, t = ne.filter((t) => e(t));
|
|
1801
|
-
(t.length !== ne.length || t.some((e) => !kn(ne, e, F))) && (O(t, n), t.length === 0 && (S.set("selectedIndex", null), T.current = null));
|
|
1802
|
-
}
|
|
1803
|
-
if (A && B) {
|
|
1804
|
-
S.update({
|
|
1805
|
-
scrollUpArrowVisible: !1,
|
|
1806
|
-
scrollDownArrowVisible: !1
|
|
1807
|
-
});
|
|
1808
|
-
let e = { height: "" };
|
|
1809
|
-
tr(ie, e), tr(D.current, e);
|
|
1810
|
-
}
|
|
1811
|
-
}), de = Z.useMemo(() => ({
|
|
1812
|
-
...V,
|
|
1813
|
-
side: oe,
|
|
1814
|
-
alignItemWithTriggerActive: B,
|
|
1815
|
-
setControlledAlignItemWithTrigger: z,
|
|
1816
|
-
scrollUpArrowRef: ae,
|
|
1817
|
-
scrollDownArrowRef: L
|
|
1818
|
-
}), [
|
|
1819
|
-
V,
|
|
1820
|
-
oe,
|
|
1821
|
-
B,
|
|
1822
|
-
z
|
|
1823
|
-
]);
|
|
1824
|
-
return /*#__PURE__*/ (0, Q.jsx)(nt, {
|
|
1825
|
-
elementsRef: ee,
|
|
1826
|
-
labelsRef: C,
|
|
1827
|
-
onMapChange: ue,
|
|
1828
|
-
children: /*#__PURE__*/ (0, Q.jsxs)($n.Provider, {
|
|
1829
|
-
value: de,
|
|
1830
|
-
children: [M && N && /*#__PURE__*/ (0, Q.jsx)(Kt, {
|
|
1831
|
-
inert: Gt(!A),
|
|
1832
|
-
cutout: P
|
|
1833
|
-
}), ce]
|
|
1834
|
-
})
|
|
1835
|
-
});
|
|
1836
|
-
});
|
|
1837
|
-
process.env.NODE_ENV !== "production" && (ir.displayName = "SelectPositioner");
|
|
1838
|
-
//#endregion
|
|
1839
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/styles.mjs
|
|
1840
|
-
var ar = "base-ui-disable-scrollbar", or = {
|
|
1841
|
-
className: ar,
|
|
1842
|
-
getElement(e) {
|
|
1843
|
-
return /*#__PURE__*/ (0, Q.jsx)("style", {
|
|
1844
|
-
nonce: e,
|
|
1845
|
-
href: ar,
|
|
1846
|
-
precedence: "base-ui:low",
|
|
1847
|
-
children: `.${ar}{scrollbar-width:none}.${ar}::-webkit-scrollbar{display:none}`
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
};
|
|
1851
|
-
process.env.NODE_ENV !== "production" && (or.getElement.displayName = "styleDisableScrollbar.getElement");
|
|
1852
|
-
//#endregion
|
|
1853
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
|
|
1854
|
-
var sr = /*#__PURE__*/ Z.createContext(void 0);
|
|
1855
|
-
process.env.NODE_ENV !== "production" && (sr.displayName = "CSPContext");
|
|
1856
|
-
var cr = { disableStyleElements: !1 };
|
|
1857
|
-
function lr() {
|
|
1858
|
-
return Z.useContext(sr) ?? cr;
|
|
1859
|
-
}
|
|
1860
|
-
//#endregion
|
|
1861
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/popup/SelectPopup.mjs
|
|
1862
|
-
var ur = {
|
|
1863
|
-
...xe,
|
|
1864
|
-
...he
|
|
1865
|
-
}, dr = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1866
|
-
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: c, popupRef: l, onOpenChangeComplete: u, setOpen: d, valueRef: p, firstItemTextRef: m, selectedItemTextRef: h, multiple: g, handleScrollArrowVisibility: _, scrollHandlerRef: y, listRef: b, highlightItemOnHover: x } = wn(), { side: S, align: ee, alignItemWithTriggerActive: C, isPositioned: w, setControlledAlignItemWithTrigger: T } = er(), E = Wt(!0) != null, te = Tn(), D = k(), { nonce: O, disableStyleElements: A } = lr(), j = J(c, $.id), M = J(c, $.open), ne = J(c, $.openMethod), re = J(c, $.mounted), ie = J(c, $.popupProps), P = J(c, $.transitionStatus), F = J(c, $.triggerElement), I = J(c, $.positionerElement), ae = J(c, $.listElement), L = Z.useRef(!1), R = Z.useRef(!1), z = Z.useRef({}), B = ce(), V = X((e) => {
|
|
1867
|
-
if (!I || !l.current || !R.current) return;
|
|
1868
|
-
if (L.current || !C) {
|
|
1869
|
-
_();
|
|
1870
|
-
return;
|
|
1871
|
-
}
|
|
1872
|
-
let t = I.style.top === "0px", n = I.style.bottom === "0px";
|
|
1873
|
-
if (!t && !n) {
|
|
1874
|
-
_();
|
|
1875
|
-
return;
|
|
1876
|
-
}
|
|
1877
|
-
let r = mr(I), i = hr(I.getBoundingClientRect().height, "y", r), a = W(I), o = Ge(I), s = o.getComputedStyle(I), c = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = fr(o.getComputedStyle(l.current)), f = Math.min(a.documentElement.clientHeight - c - u, d), p = e.scrollTop, m = pr(e), h = 0, g = null, v = !1, y = !1, b = (e) => {
|
|
1878
|
-
I.style.height = `${e}px`;
|
|
1879
|
-
}, x = (t, n) => {
|
|
1880
|
-
let r = Bn(t, 0, f - i);
|
|
1881
|
-
r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (L.current = !0), _();
|
|
1882
|
-
}, S = t ? m - p : p, ee = Math.min(i + S, f);
|
|
1883
|
-
if (h = ee, S <= 1) {
|
|
1884
|
-
x(S, t ? m : 0);
|
|
1885
|
-
return;
|
|
1886
|
-
}
|
|
1887
|
-
if (f - ee > 1 ? t ? y = !0 : g = 0 : (v = !0, n && p < m && (g = p - (S - (i + S - f)))), h = Math.ceil(h), h !== 0 && b(h), y || g != null) {
|
|
1888
|
-
let t = pr(e), n = y ? t : Bn(g, 0, t);
|
|
1889
|
-
Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
|
|
1890
|
-
}
|
|
1891
|
-
(v || h >= f - 1) && (L.current = !0), _();
|
|
1892
|
-
});
|
|
1893
|
-
Z.useImperativeHandle(y, () => V, [V]), s({
|
|
1894
|
-
open: M,
|
|
1895
|
-
ref: l,
|
|
1896
|
-
onComplete() {
|
|
1897
|
-
M && u?.(!0);
|
|
1898
|
-
}
|
|
1899
|
-
});
|
|
1900
|
-
let oe = {
|
|
1901
|
-
open: M,
|
|
1902
|
-
transitionStatus: P,
|
|
1903
|
-
side: S,
|
|
1904
|
-
align: ee
|
|
1905
|
-
};
|
|
1906
|
-
Y(() => {
|
|
1907
|
-
!I || !l.current || Object.keys(z.current).length || (z.current = {
|
|
1908
|
-
top: I.style.top || "0",
|
|
1909
|
-
left: I.style.left || "0",
|
|
1910
|
-
right: I.style.right,
|
|
1911
|
-
height: I.style.height,
|
|
1912
|
-
bottom: I.style.bottom,
|
|
1913
|
-
minHeight: I.style.minHeight,
|
|
1914
|
-
maxHeight: I.style.maxHeight,
|
|
1915
|
-
marginTop: I.style.marginTop,
|
|
1916
|
-
marginBottom: I.style.marginBottom
|
|
1917
|
-
});
|
|
1918
|
-
}, [l, I]), Y(() => {
|
|
1919
|
-
M || C || (R.current = !1, L.current = !1, tr(I, z.current));
|
|
1920
|
-
}, [
|
|
1921
|
-
M,
|
|
1922
|
-
C,
|
|
1923
|
-
I,
|
|
1924
|
-
l
|
|
1925
|
-
]), Y(() => {
|
|
1926
|
-
let e = l.current;
|
|
1927
|
-
if (!M || !F || !I || !e || C && !w || c.state.transitionStatus === "ending") return;
|
|
1928
|
-
if (!C) {
|
|
1929
|
-
R.current = !0, B.request(_), e.style.removeProperty("--transform-origin");
|
|
1930
|
-
return;
|
|
1931
|
-
}
|
|
1932
|
-
let t = vr(e);
|
|
1933
|
-
e.style.removeProperty("--transform-origin");
|
|
1934
|
-
try {
|
|
1935
|
-
let t = h.current;
|
|
1936
|
-
t?.isConnected || (t = !$.hasSelectedValue(c.state) && m.current?.isConnected ? m.current : null);
|
|
1937
|
-
let n = p.current, r = Ge(I), i = r.getComputedStyle(I), a = r.getComputedStyle(e), o = W(F), s = mr(F), l = gr(F.getBoundingClientRect(), s), u = gr(I.getBoundingClientRect(), s), d = l.height, g = ae || e, v = g.scrollHeight, y = parseFloat(a.borderBottomWidth), S = parseFloat(i.marginTop) || 10, ee = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, w = fr(a), E = o.documentElement.clientHeight - S - ee, te = o.documentElement.clientWidth, O = E - l.bottom + d, k, A = D === "rtl" ? l.right - u.width : l.left, j = 0;
|
|
1938
|
-
if (t && n) {
|
|
1939
|
-
let e = gr(n.getBoundingClientRect(), s);
|
|
1940
|
-
k = gr(t.getBoundingClientRect(), s), A = u.left + (D === "rtl" ? e.right - k.right : e.left - k.left);
|
|
1941
|
-
let r = e.top - l.top + e.height / 2;
|
|
1942
|
-
j = k.top - u.top + k.height / 2 - r;
|
|
1943
|
-
}
|
|
1944
|
-
let M = O + j + ee + y, N = Math.min(E, M), ne = E - S - ee, re = M - N, ie = te - 5;
|
|
1945
|
-
I.style.left = `${Bn(A, 5, ie - u.width)}px`, I.style.height = `${N}px`, I.style.maxHeight = "none", I.style.marginTop = `${S}px`, I.style.marginBottom = `${ee}px`, e.style.height = "100%";
|
|
1946
|
-
let P = pr(g), B = re >= P - 1;
|
|
1947
|
-
B && (N = Math.min(E, u.height) - (re - P));
|
|
1948
|
-
let V = l.top < 20 || l.bottom > E - 20 || Math.ceil(N) + 1 < Math.min(v, C), oe = (r.visualViewport?.scale ?? 1) !== 1 && f;
|
|
1949
|
-
if (V || oe) {
|
|
1950
|
-
R.current = !0, tr(I, z.current), T(!1);
|
|
1951
|
-
return;
|
|
1952
|
-
}
|
|
1953
|
-
let H = Math.max(C, N);
|
|
1954
|
-
if (B) {
|
|
1955
|
-
let e = Math.max(0, E - M);
|
|
1956
|
-
I.style.top = u.height >= ne ? "0" : `${e}px`, I.style.height = `${N}px`, g.scrollTop = pr(g);
|
|
1957
|
-
} else I.style.bottom = "0", g.scrollTop = re;
|
|
1958
|
-
if (k) {
|
|
1959
|
-
let t = u.top, n = u.height, r = k.top + k.height / 2, i = Bn(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
|
|
1960
|
-
e.style.setProperty("--transform-origin", `50% ${i}%`);
|
|
1961
|
-
}
|
|
1962
|
-
(H === E || N >= w) && (L.current = !0), _(), x && c.state.selectedIndex === null && c.state.activeIndex === null && b.current[0] != null && c.set("activeIndex", 0), R.current = !0;
|
|
1963
|
-
} finally {
|
|
1964
|
-
t();
|
|
1965
|
-
}
|
|
1966
|
-
}, [
|
|
1967
|
-
c,
|
|
1968
|
-
M,
|
|
1969
|
-
I,
|
|
1970
|
-
F,
|
|
1971
|
-
p,
|
|
1972
|
-
m,
|
|
1973
|
-
h,
|
|
1974
|
-
l,
|
|
1975
|
-
_,
|
|
1976
|
-
C,
|
|
1977
|
-
T,
|
|
1978
|
-
B,
|
|
1979
|
-
ae,
|
|
1980
|
-
b,
|
|
1981
|
-
x,
|
|
1982
|
-
D,
|
|
1983
|
-
w
|
|
1984
|
-
]), Z.useEffect(() => {
|
|
1985
|
-
if (!C || !I || !M) return;
|
|
1986
|
-
let e = Ge(I);
|
|
1987
|
-
function t(e) {
|
|
1988
|
-
d(!1, v(G, e));
|
|
1989
|
-
}
|
|
1990
|
-
return de(e, "resize", t);
|
|
1991
|
-
}, [
|
|
1992
|
-
d,
|
|
1993
|
-
C,
|
|
1994
|
-
I,
|
|
1995
|
-
M
|
|
1996
|
-
]);
|
|
1997
|
-
let H = {
|
|
1998
|
-
...ae ? {
|
|
1999
|
-
role: "presentation",
|
|
2000
|
-
"aria-orientation": void 0
|
|
2001
|
-
} : {
|
|
2002
|
-
role: "listbox",
|
|
2003
|
-
"aria-multiselectable": g || void 0,
|
|
2004
|
-
id: `${j}-list`
|
|
2005
|
-
},
|
|
2006
|
-
onKeyDown(e) {
|
|
2007
|
-
E && et.has(e.key) && e.stopPropagation();
|
|
2008
|
-
},
|
|
2009
|
-
onScroll(e) {
|
|
2010
|
-
ae || V(e.currentTarget);
|
|
2011
|
-
},
|
|
2012
|
-
...C && { style: ae ? { height: "100%" } : nr }
|
|
2013
|
-
}, se = Be("div", e, {
|
|
2014
|
-
ref: [t, l],
|
|
2015
|
-
state: oe,
|
|
2016
|
-
stateAttributesMapping: ur,
|
|
2017
|
-
props: [
|
|
2018
|
-
ie,
|
|
2019
|
-
H,
|
|
2020
|
-
N(P),
|
|
2021
|
-
{ className: !ae && C ? or.className : void 0 },
|
|
2022
|
-
o
|
|
2023
|
-
]
|
|
2024
|
-
});
|
|
2025
|
-
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [!A && or.getElement(O), /*#__PURE__*/ (0, Q.jsx)(Nt, {
|
|
2026
|
-
context: te,
|
|
2027
|
-
modal: !1,
|
|
2028
|
-
disabled: !re,
|
|
2029
|
-
openInteractionType: ne,
|
|
2030
|
-
returnFocus: a,
|
|
2031
|
-
restoreFocus: !0,
|
|
2032
|
-
children: se
|
|
2033
|
-
})] });
|
|
2034
|
-
});
|
|
2035
|
-
process.env.NODE_ENV !== "production" && (dr.displayName = "SelectPopup");
|
|
2036
|
-
function fr(e) {
|
|
2037
|
-
let t = e.maxHeight || "";
|
|
2038
|
-
return t.endsWith("px") && parseFloat(t) || Infinity;
|
|
2039
|
-
}
|
|
2040
|
-
function pr(e) {
|
|
2041
|
-
return Vn(e.scrollHeight, e.clientHeight);
|
|
2042
|
-
}
|
|
2043
|
-
function mr(e) {
|
|
2044
|
-
return c.getScale(e);
|
|
2045
|
-
}
|
|
2046
|
-
function hr(e, t, n) {
|
|
2047
|
-
return e / n[t];
|
|
2048
|
-
}
|
|
2049
|
-
function gr(e, t) {
|
|
2050
|
-
return fe({
|
|
2051
|
-
x: hr(e.x, "x", t),
|
|
2052
|
-
y: hr(e.y, "y", t),
|
|
2053
|
-
width: hr(e.width, "x", t),
|
|
2054
|
-
height: hr(e.height, "y", t)
|
|
2055
|
-
});
|
|
2056
|
-
}
|
|
2057
|
-
var _r = [
|
|
2058
|
-
["transform", "none"],
|
|
2059
|
-
["scale", "1"],
|
|
2060
|
-
["translate", "0 0"]
|
|
2061
|
-
];
|
|
2062
|
-
function vr(e) {
|
|
2063
|
-
let { style: t } = e, n = {};
|
|
2064
|
-
for (let [e, r] of _r) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
|
|
2065
|
-
return () => {
|
|
2066
|
-
for (let [e] of _r) {
|
|
2067
|
-
let r = n[e];
|
|
2068
|
-
r ? t.setProperty(e, r) : t.removeProperty(e);
|
|
2069
|
-
}
|
|
2070
|
-
};
|
|
2071
|
-
}
|
|
2072
|
-
//#endregion
|
|
2073
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item/SelectItemContext.mjs
|
|
2074
|
-
var yr = /*#__PURE__*/ Z.createContext(void 0);
|
|
2075
|
-
process.env.NODE_ENV !== "production" && (yr.displayName = "SelectItemContext");
|
|
2076
|
-
function br() {
|
|
2077
|
-
let e = Z.useContext(yr);
|
|
2078
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ? qe(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
|
|
2079
|
-
return e;
|
|
2080
|
-
}
|
|
2081
|
-
//#endregion
|
|
2082
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item/SelectItem.mjs
|
|
2083
|
-
var xr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
2084
|
-
let { render: n, className: r, style: i, value: a = null, label: o, disabled: s = !1, nativeButton: c = !1, ...l } = e, u = Z.useRef(null), d = $e({
|
|
2085
|
-
label: o,
|
|
2086
|
-
textRef: u,
|
|
2087
|
-
indexGuessBehavior: it.GuessFromOrder
|
|
2088
|
-
}), { store: f, itemProps: p, setOpen: m, setValue: g, selectionRef: _, typingRef: y, valuesRef: b, multiple: x, selectedItemTextRef: S, disabled: ee, readOnly: C } = wn(), w = J(f, $.isActive, d.index), T = J(f, $.open), E = J(f, $.isSelected, a), te = J(f, $.isSelectedByFocus, d.index), D = J(f, $.isItemEqualToValue), O = d.index, k = O !== -1, A = Z.useRef(null);
|
|
2089
|
-
Y(() => {
|
|
2090
|
-
if (!k) return;
|
|
2091
|
-
let e = b.current;
|
|
2092
|
-
return e[O] = a, () => {
|
|
2093
|
-
delete e[O];
|
|
2094
|
-
};
|
|
2095
|
-
}, [
|
|
2096
|
-
k,
|
|
2097
|
-
O,
|
|
2098
|
-
a,
|
|
2099
|
-
b
|
|
2100
|
-
]), Y(() => {
|
|
2101
|
-
if (!k) return;
|
|
2102
|
-
let e = f.state.value, t = e;
|
|
2103
|
-
x && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && On(a, t, D) && (f.set("selectedIndex", O), u.current && (S.current = u.current));
|
|
2104
|
-
}, [
|
|
2105
|
-
k,
|
|
2106
|
-
O,
|
|
2107
|
-
x,
|
|
2108
|
-
D,
|
|
2109
|
-
f,
|
|
2110
|
-
a,
|
|
2111
|
-
S
|
|
2112
|
-
]);
|
|
2113
|
-
let j = Z.useRef(null), M = Z.useRef("mouse"), N = Z.useRef(!1), { getButtonProps: ne, buttonRef: re } = He({
|
|
2114
|
-
disabled: s,
|
|
2115
|
-
focusableWhenDisabled: !0,
|
|
2116
|
-
native: c,
|
|
2117
|
-
composite: !0
|
|
2118
|
-
}), ie = {
|
|
2119
|
-
disabled: s,
|
|
2120
|
-
selected: E,
|
|
2121
|
-
highlighted: w
|
|
2122
|
-
};
|
|
2123
|
-
function P(e) {
|
|
2124
|
-
if (ee || C) return;
|
|
2125
|
-
let t = f.state.value;
|
|
2126
|
-
if (x) {
|
|
2127
|
-
let n = Array.isArray(t) ? t : [];
|
|
2128
|
-
g(E ? jn(n, a, D) : [...n, a], v(h, e));
|
|
2129
|
-
} else g(a, v(h, e)), m(!1, v(h, e));
|
|
2130
|
-
}
|
|
2131
|
-
function F() {
|
|
2132
|
-
_.current.dragY = 0;
|
|
2133
|
-
}
|
|
2134
|
-
let I = {
|
|
2135
|
-
role: "option",
|
|
2136
|
-
"aria-selected": E,
|
|
2137
|
-
tabIndex: T && w ? 0 : -1,
|
|
2138
|
-
onKeyDown(e) {
|
|
2139
|
-
j.current = e.key, f.set("activeIndex", O), e.key === " " && y.current && e.preventDefault();
|
|
2140
|
-
},
|
|
2141
|
-
onClick(e) {
|
|
2142
|
-
let t = e.type === "click" && M.current !== "touch", n = e.nativeEvent.pointerType, r = t && Oe(e.nativeEvent) && (n !== void 0 || w), i = t && !r && !N.current;
|
|
2143
|
-
N.current = !1, !(e.type === "keydown" && j.current === null) && (s || e.type === "keydown" && j.current === " " && y.current || i || (j.current = null, P(e.nativeEvent)));
|
|
2144
|
-
},
|
|
2145
|
-
onPointerEnter(e) {
|
|
2146
|
-
M.current = e.pointerType;
|
|
2147
|
-
},
|
|
2148
|
-
onPointerMove(e) {
|
|
2149
|
-
if (e.pointerType === "mouse" && e.buttons === 1) {
|
|
2150
|
-
let t = _.current;
|
|
2151
|
-
t.dragY += e.movementY, t.dragY ** 2 >= 64 && (t.allowUnselectedMouseUp = !0);
|
|
2152
|
-
}
|
|
2153
|
-
},
|
|
2154
|
-
onPointerDown(e) {
|
|
2155
|
-
M.current = e.pointerType, N.current = !0, F();
|
|
2156
|
-
},
|
|
2157
|
-
onMouseUp() {
|
|
2158
|
-
if (F(), s || M.current === "touch" || N.current) return;
|
|
2159
|
-
let e = !_.current.allowSelectedMouseUp && E, t = !_.current.allowUnselectedMouseUp && !E;
|
|
2160
|
-
e || t || (N.current = !0, A.current?.click(), N.current = !1);
|
|
2161
|
-
}
|
|
2162
|
-
}, ae = Be("div", e, {
|
|
2163
|
-
ref: [
|
|
2164
|
-
re,
|
|
2165
|
-
t,
|
|
2166
|
-
d.ref,
|
|
2167
|
-
A
|
|
2168
|
-
],
|
|
2169
|
-
state: ie,
|
|
2170
|
-
props: [
|
|
2171
|
-
p,
|
|
2172
|
-
I,
|
|
2173
|
-
l,
|
|
2174
|
-
ne
|
|
2175
|
-
]
|
|
2176
|
-
}), L = Z.useMemo(() => ({
|
|
2177
|
-
selected: E,
|
|
2178
|
-
index: O,
|
|
2179
|
-
textRef: u,
|
|
2180
|
-
selectedByFocus: te,
|
|
2181
|
-
hasRegistered: k
|
|
2182
|
-
}), [
|
|
2183
|
-
E,
|
|
2184
|
-
O,
|
|
2185
|
-
u,
|
|
2186
|
-
te,
|
|
2187
|
-
k
|
|
2188
|
-
]);
|
|
2189
|
-
return /*#__PURE__*/ (0, Q.jsx)(yr.Provider, {
|
|
2190
|
-
value: L,
|
|
2191
|
-
children: ae
|
|
2192
|
-
});
|
|
2193
|
-
}));
|
|
2194
|
-
process.env.NODE_ENV !== "production" && (xr.displayName = "SelectItem");
|
|
2195
|
-
//#endregion
|
|
2196
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
|
|
2197
|
-
var Sr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
2198
|
-
let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = br(), { firstItemTextRef: o, selectedItemTextRef: s } = wn(), { render: c, className: l, style: u, ...d } = e;
|
|
2199
|
-
return Be("div", e, {
|
|
2200
|
-
ref: [
|
|
2201
|
-
Z.useCallback((e) => {
|
|
2202
|
-
e && (a && n === 0 && (o.current = e), a && i && (s.current = e));
|
|
2203
|
-
}, [
|
|
2204
|
-
o,
|
|
2205
|
-
s,
|
|
2206
|
-
n,
|
|
2207
|
-
i,
|
|
2208
|
-
a
|
|
2209
|
-
]),
|
|
2210
|
-
t,
|
|
2211
|
-
r
|
|
2212
|
-
],
|
|
2213
|
-
props: d
|
|
2214
|
-
});
|
|
2215
|
-
}));
|
|
2216
|
-
process.env.NODE_ENV !== "production" && (Sr.displayName = "SelectItemText");
|
|
2217
|
-
//#endregion
|
|
2218
|
-
//#region src/client/components/ui/select.tsx
|
|
2219
|
-
var Cr = (0, Z.createContext)(null);
|
|
2220
|
-
function wr() {
|
|
2221
|
-
let e = (0, Z.useContext)(Cr);
|
|
2222
|
-
if (!e) throw Error("Select compound components must be inside <Select>");
|
|
2223
|
-
return e;
|
|
2224
|
-
}
|
|
2225
|
-
var Tr = (0, Z.createContext)(null);
|
|
2226
|
-
function Er(e, t = []) {
|
|
2227
|
-
return Z.Children.forEach(e, (e) => {
|
|
2228
|
-
if (!(0, Z.isValidElement)(e)) return;
|
|
2229
|
-
let n = e.props;
|
|
2230
|
-
typeof n.value == "string" ? t.push({
|
|
2231
|
-
value: n.value,
|
|
2232
|
-
label: n.label ?? (typeof n.children == "string" ? n.children : n.value)
|
|
2233
|
-
}) : n.children && Er(n.children, t);
|
|
2234
|
-
}), t;
|
|
2235
|
-
}
|
|
2236
|
-
function Dr({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i = !1, name: a, required: o }) {
|
|
2237
|
-
let [s, c] = (0, Z.useState)(n ?? ""), [l, u] = (0, Z.useState)(!1), d = (0, Z.useRef)(null), f = t === void 0 ? s : t, p = (0, Z.useMemo)(() => Er(e), [e]), m = (0, Z.useCallback)((e) => {
|
|
2238
|
-
let n = e ?? "";
|
|
2239
|
-
t === void 0 && c(n), r?.(n);
|
|
2240
|
-
}, [t, r]), h = (0, Z.useMemo)(() => ({
|
|
2241
|
-
value: f,
|
|
2242
|
-
open: l,
|
|
2243
|
-
actionsRef: d
|
|
2244
|
-
}), [f, l]);
|
|
2245
|
-
return /* @__PURE__ */ (0, Q.jsx)(Cr.Provider, {
|
|
2246
|
-
value: h,
|
|
2247
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Un, {
|
|
2248
|
-
value: f === "" ? null : f,
|
|
2249
|
-
onValueChange: m,
|
|
2250
|
-
open: l,
|
|
2251
|
-
onOpenChange: u,
|
|
2252
|
-
actionsRef: d,
|
|
2253
|
-
items: p,
|
|
2254
|
-
disabled: i,
|
|
2255
|
-
name: a,
|
|
2256
|
-
required: o,
|
|
2257
|
-
modal: !1,
|
|
2258
|
-
children: e
|
|
2259
|
-
})
|
|
2260
|
-
});
|
|
2261
|
-
}
|
|
2262
|
-
Dr.displayName = "Select";
|
|
2263
|
-
var Or = ze([
|
|
2264
|
-
"group inline-flex items-center justify-between gap-2 outline-none cursor-pointer",
|
|
2265
|
-
"text-[13px] h-9 px-3 min-w-[160px]",
|
|
2266
|
-
"transition-all duration-80",
|
|
2267
|
-
"disabled:opacity-50 disabled:pointer-events-none",
|
|
2268
|
-
"focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)]"
|
|
2269
|
-
], {
|
|
2270
|
-
variants: { variant: {
|
|
2271
|
-
bordered: "border border-border bg-transparent text-foreground hover:bg-hover",
|
|
2272
|
-
borderless: "border border-transparent bg-transparent text-foreground hover:bg-hover"
|
|
2273
|
-
} },
|
|
2274
|
-
defaultVariants: { variant: "bordered" }
|
|
2275
|
-
}), kr = (0, Z.forwardRef)(({ className: e, variant: t, icon: n, leading: r, placeholder: i = "Select…", error: a, ...o }, s) => {
|
|
2276
|
-
let c = Pe();
|
|
2277
|
-
return /* @__PURE__ */ (0, Q.jsxs)("div", {
|
|
2278
|
-
className: "flex flex-col gap-1",
|
|
2279
|
-
children: [/* @__PURE__ */ (0, Q.jsxs)(Jn, {
|
|
2280
|
-
ref: s,
|
|
2281
|
-
"aria-invalid": !!a || void 0,
|
|
2282
|
-
className: Re(Or({ variant: t }), c.input, a && "border-destructive/50 hover:border-destructive/50", e),
|
|
2283
|
-
...o,
|
|
2284
|
-
children: [/* @__PURE__ */ (0, Q.jsxs)("span", {
|
|
2285
|
-
className: "flex items-center gap-2 min-w-0 flex-1",
|
|
2286
|
-
children: [
|
|
2287
|
-
r,
|
|
2288
|
-
!r && n && /* @__PURE__ */ (0, Q.jsx)(n, {
|
|
2289
|
-
size: 16,
|
|
2290
|
-
strokeWidth: 1.5,
|
|
2291
|
-
className: "shrink-0 text-muted-foreground transition-[color,stroke-width] duration-80 group-hover:text-foreground group-hover:stroke-[2]"
|
|
2292
|
-
}),
|
|
2293
|
-
/* @__PURE__ */ (0, Q.jsx)(Xn, {
|
|
2294
|
-
placeholder: i,
|
|
2295
|
-
className: "min-w-0 flex-1 text-left truncate [text-box:trim-both_cap_alphabetic] py-1 -my-1 data-[placeholder]:text-muted-foreground"
|
|
2296
|
-
})
|
|
2297
|
-
]
|
|
2298
|
-
}), /* @__PURE__ */ (0, Q.jsx)("svg", {
|
|
2299
|
-
width: 16,
|
|
2300
|
-
height: 16,
|
|
2301
|
-
viewBox: "0 0 24 24",
|
|
2302
|
-
fill: "none",
|
|
2303
|
-
stroke: "currentColor",
|
|
2304
|
-
strokeWidth: 2,
|
|
2305
|
-
strokeLinecap: "round",
|
|
2306
|
-
strokeLinejoin: "round",
|
|
2307
|
-
className: "shrink-0 text-muted-foreground transition-colors duration-80 group-hover:text-foreground",
|
|
2308
|
-
children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
2309
|
-
})]
|
|
2310
|
-
}), a && /* @__PURE__ */ (0, Q.jsx)("span", {
|
|
2311
|
-
className: "text-[12px] text-destructive pl-3",
|
|
2312
|
-
children: a
|
|
2313
|
-
})]
|
|
2314
|
-
});
|
|
2315
|
-
});
|
|
2316
|
-
kr.displayName = "SelectTrigger";
|
|
2317
|
-
var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
2318
|
-
let { open: r, value: i, actionsRef: a } = wr(), o = Pe(), s = (0, Z.useRef)(null), { activeIndex: c, setActiveIndex: l, itemRects: u, sessionRef: d, handlers: f, registerItem: p, measureItems: m } = mn(s), [h, g] = (0, Z.useState)(null), [_, v] = (0, Z.useState)(void 0);
|
|
2319
|
-
(0, Z.useEffect)(() => {
|
|
2320
|
-
if (r) return;
|
|
2321
|
-
let e = setTimeout(() => a.current?.unmount(), me(Se.fast));
|
|
2322
|
-
return () => clearTimeout(e);
|
|
2323
|
-
}, [r, a]), (0, Z.useEffect)(() => {
|
|
2324
|
-
if (!r) return;
|
|
2325
|
-
let e, t = requestAnimationFrame(() => {
|
|
2326
|
-
e = requestAnimationFrame(() => {
|
|
2327
|
-
m();
|
|
2328
|
-
let e = s.current;
|
|
2329
|
-
if (e) {
|
|
2330
|
-
let t = Array.from(e.querySelectorAll("[data-proximity-index]")).findIndex((e) => e.getAttribute("data-value") === i);
|
|
2331
|
-
v(t === -1 ? void 0 : t);
|
|
2332
|
-
}
|
|
2333
|
-
});
|
|
2334
|
-
});
|
|
2335
|
-
return () => {
|
|
2336
|
-
cancelAnimationFrame(t), cancelAnimationFrame(e);
|
|
2337
|
-
};
|
|
2338
|
-
}, [
|
|
2339
|
-
r,
|
|
2340
|
-
m,
|
|
2341
|
-
i
|
|
2342
|
-
]);
|
|
2343
|
-
let y = c === null ? null : u[c], b = _ == null ? null : u[_], x = h === null ? null : u[h], S = c !== null && c !== _, ee = (0, Z.useMemo)(() => ({
|
|
2344
|
-
registerItem: p,
|
|
2345
|
-
activeIndex: c,
|
|
2346
|
-
checkedIndex: _
|
|
2347
|
-
}), [
|
|
2348
|
-
p,
|
|
2349
|
-
c,
|
|
2350
|
-
_
|
|
2351
|
-
]);
|
|
2352
|
-
return /* @__PURE__ */ (0, Q.jsx)(Qn, { children: /* @__PURE__ */ (0, Q.jsx)(ir, {
|
|
2353
|
-
side: "bottom",
|
|
2354
|
-
align: "start",
|
|
2355
|
-
sideOffset: 6,
|
|
2356
|
-
alignItemWithTrigger: !1,
|
|
2357
|
-
className: "z-50 outline-none",
|
|
2358
|
-
children: /* @__PURE__ */ (0, Q.jsx)(z.div, {
|
|
2359
|
-
initial: {
|
|
2360
|
-
opacity: 0,
|
|
2361
|
-
y: -4,
|
|
2362
|
-
scaleY: .96
|
|
2363
|
-
},
|
|
2364
|
-
animate: r ? {
|
|
2365
|
-
opacity: 1,
|
|
2366
|
-
y: 0,
|
|
2367
|
-
scaleY: 1
|
|
2368
|
-
} : {
|
|
2369
|
-
opacity: 0,
|
|
2370
|
-
y: -4,
|
|
2371
|
-
scaleY: .96
|
|
2372
|
-
},
|
|
2373
|
-
transition: r ? Se.fast : Se.fast.exit,
|
|
2374
|
-
style: { transformOrigin: "top center" },
|
|
2375
|
-
onAnimationComplete: () => {
|
|
2376
|
-
r || a.current?.unmount();
|
|
2377
|
-
},
|
|
2378
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Tr.Provider, {
|
|
2379
|
-
value: ee,
|
|
2380
|
-
children: /* @__PURE__ */ (0, Q.jsxs)(dr, {
|
|
2381
|
-
render: /* @__PURE__ */ (0, Q.jsx)(xn, {
|
|
2382
|
-
offset: 2,
|
|
2383
|
-
shadowLevel: 3,
|
|
2384
|
-
ref: (e) => {
|
|
2385
|
-
s.current = e, typeof n == "function" ? n(e) : n && (n.current = e);
|
|
2386
|
-
}
|
|
2387
|
-
}),
|
|
2388
|
-
onMouseEnter: () => {
|
|
2389
|
-
f.onMouseEnter(), g(null);
|
|
2390
|
-
},
|
|
2391
|
-
onMouseMove: f.onMouseMove,
|
|
2392
|
-
onMouseLeave: f.onMouseLeave,
|
|
2393
|
-
onFocus: (e) => {
|
|
2394
|
-
let t = e.target.closest("[data-proximity-index]")?.getAttribute("data-proximity-index");
|
|
2395
|
-
if (t != null) {
|
|
2396
|
-
let n = Number(t);
|
|
2397
|
-
l(n), g(e.target.matches(":focus-visible") ? n : null);
|
|
2398
|
-
}
|
|
2399
|
-
},
|
|
2400
|
-
onBlur: (e) => {
|
|
2401
|
-
s.current?.contains(e.relatedTarget) || (g(null), l(null));
|
|
2402
|
-
},
|
|
2403
|
-
className: Re(`relative flex flex-col gap-0.5 min-w-[var(--anchor-width)] max-h-[min(300px,var(--available-height))] overflow-y-auto ${o.container} p-1 select-none outline-none`, e),
|
|
2404
|
-
children: [
|
|
2405
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: b && /* @__PURE__ */ (0, Q.jsx)(z.div, {
|
|
2406
|
-
className: `absolute ${o.bg} bg-active pointer-events-none`,
|
|
2407
|
-
initial: !1,
|
|
2408
|
-
animate: {
|
|
2409
|
-
top: b.top,
|
|
2410
|
-
left: b.left,
|
|
2411
|
-
width: b.width,
|
|
2412
|
-
height: b.height,
|
|
2413
|
-
opacity: S ? .8 : 1
|
|
2414
|
-
},
|
|
2415
|
-
exit: {
|
|
2416
|
-
opacity: 0,
|
|
2417
|
-
transition: Se.moderate.exit
|
|
2418
|
-
},
|
|
2419
|
-
transition: {
|
|
2420
|
-
...Se.moderate,
|
|
2421
|
-
opacity: { duration: .08 }
|
|
2422
|
-
}
|
|
2423
|
-
}) }),
|
|
2424
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: y && /* @__PURE__ */ (0, Q.jsx)(z.div, {
|
|
2425
|
-
className: `absolute ${o.bg} bg-hover pointer-events-none`,
|
|
2426
|
-
initial: {
|
|
2427
|
-
opacity: 0,
|
|
2428
|
-
top: b?.top ?? y.top,
|
|
2429
|
-
left: b?.left ?? y.left,
|
|
2430
|
-
width: b?.width ?? y.width,
|
|
2431
|
-
height: b?.height ?? y.height
|
|
2432
|
-
},
|
|
2433
|
-
animate: {
|
|
2434
|
-
opacity: 1,
|
|
2435
|
-
top: y.top,
|
|
2436
|
-
left: y.left,
|
|
2437
|
-
width: y.width,
|
|
2438
|
-
height: y.height
|
|
2439
|
-
},
|
|
2440
|
-
exit: {
|
|
2441
|
-
opacity: 0,
|
|
2442
|
-
transition: Se.fast.exit
|
|
2443
|
-
},
|
|
2444
|
-
transition: {
|
|
2445
|
-
...Se.fast,
|
|
2446
|
-
opacity: { duration: .08 }
|
|
2447
|
-
}
|
|
2448
|
-
}, d.current) }),
|
|
2449
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: x && /* @__PURE__ */ (0, Q.jsx)(z.div, {
|
|
2450
|
-
className: `absolute ${o.focusRing} pointer-events-none z-20 border border-[color:var(--focus-ring,#6B97FF)]`,
|
|
2451
|
-
initial: !1,
|
|
2452
|
-
animate: {
|
|
2453
|
-
left: x.left - 2,
|
|
2454
|
-
top: x.top - 2,
|
|
2455
|
-
width: x.width + 4,
|
|
2456
|
-
height: x.height + 4
|
|
2457
|
-
},
|
|
2458
|
-
exit: {
|
|
2459
|
-
opacity: 0,
|
|
2460
|
-
transition: Se.fast.exit
|
|
2461
|
-
},
|
|
2462
|
-
transition: {
|
|
2463
|
-
...Se.fast,
|
|
2464
|
-
opacity: { duration: .08 }
|
|
2465
|
-
}
|
|
2466
|
-
}) }),
|
|
2467
|
-
t
|
|
2468
|
-
]
|
|
2469
|
-
})
|
|
2470
|
-
})
|
|
2471
|
-
})
|
|
2472
|
-
}) });
|
|
2473
|
-
});
|
|
2474
|
-
Ar.displayName = "SelectContent";
|
|
2475
|
-
var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, index: i, disabled: a = !1, ...o }, s) => {
|
|
2476
|
-
let c = wr(), l = (0, Z.useContext)(Tr), u = (0, Z.useRef)(null), d = Pe(), f = (0, Z.useRef)(!1);
|
|
2477
|
-
(0, Z.useEffect)(() => {
|
|
2478
|
-
f.current = !0;
|
|
2479
|
-
}, []), (0, Z.useEffect)(() => (l?.registerItem(i, u.current), () => l?.registerItem(i, null)), [i, l]);
|
|
2480
|
-
let p = l?.activeIndex === i, m = c.value === r, h = !f.current;
|
|
2481
|
-
return /* @__PURE__ */ (0, Q.jsxs)(xr, {
|
|
2482
|
-
value: r,
|
|
2483
|
-
disabled: a,
|
|
2484
|
-
label: typeof t == "string" ? t : void 0,
|
|
2485
|
-
render: /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2486
|
-
ref: (e) => {
|
|
2487
|
-
u.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
2488
|
-
},
|
|
2489
|
-
"data-proximity-index": i,
|
|
2490
|
-
"data-value": r,
|
|
2491
|
-
className: Re(`relative z-10 flex h-9 items-center gap-2 ${d.item} px-2 text-[13px] cursor-pointer outline-none select-none`, "transition-[color] duration-80", p || m ? "text-foreground" : "text-muted-foreground", a && "opacity-50 pointer-events-none", e),
|
|
2492
|
-
...o
|
|
2493
|
-
}),
|
|
2494
|
-
children: [
|
|
2495
|
-
n && /* @__PURE__ */ (0, Q.jsx)(n, {
|
|
2496
|
-
size: 16,
|
|
2497
|
-
strokeWidth: p || m ? 2 : 1.5,
|
|
2498
|
-
className: "shrink-0 transition-[color,stroke-width] duration-80"
|
|
2499
|
-
}),
|
|
2500
|
-
/* @__PURE__ */ (0, Q.jsx)(Sr, {
|
|
2501
|
-
render: /* @__PURE__ */ (0, Q.jsx)("span", { className: "flex-1 min-w-0 truncate [text-box:trim-both_cap_alphabetic] py-1 -my-1" }),
|
|
2502
|
-
children: t
|
|
2503
|
-
}),
|
|
2504
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: m && /* @__PURE__ */ (0, Q.jsx)(z.svg, {
|
|
2505
|
-
width: 16,
|
|
2506
|
-
height: 16,
|
|
2507
|
-
viewBox: "0 0 24 24",
|
|
2508
|
-
fill: "none",
|
|
2509
|
-
stroke: "currentColor",
|
|
2510
|
-
strokeWidth: 2,
|
|
2511
|
-
strokeLinecap: "round",
|
|
2512
|
-
strokeLinejoin: "round",
|
|
2513
|
-
className: "shrink-0 text-foreground",
|
|
2514
|
-
initial: { opacity: 1 },
|
|
2515
|
-
animate: { opacity: 1 },
|
|
2516
|
-
exit: { opacity: 1 },
|
|
2517
|
-
children: /* @__PURE__ */ (0, Q.jsx)(z.path, {
|
|
2518
|
-
d: "M4 12L9 17L20 6",
|
|
2519
|
-
initial: { pathLength: +!!h },
|
|
2520
|
-
animate: {
|
|
2521
|
-
pathLength: 1,
|
|
2522
|
-
transition: {
|
|
2523
|
-
duration: .08,
|
|
2524
|
-
ease: "easeOut"
|
|
2525
|
-
}
|
|
2526
|
-
},
|
|
2527
|
-
exit: {
|
|
2528
|
-
pathLength: 0,
|
|
2529
|
-
transition: {
|
|
2530
|
-
duration: .04,
|
|
2531
|
-
ease: "easeIn"
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
})
|
|
2535
|
-
}, "check") })
|
|
2536
|
-
]
|
|
2537
|
-
});
|
|
2538
|
-
});
|
|
2539
|
-
jr.displayName = "SelectItem";
|
|
2540
|
-
function Mr({ children: e, className: t, ...n }) {
|
|
2541
|
-
return /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2542
|
-
role: "group",
|
|
2543
|
-
className: t,
|
|
2544
|
-
...n,
|
|
2545
|
-
children: e
|
|
2546
|
-
});
|
|
2547
|
-
}
|
|
2548
|
-
Mr.displayName = "SelectGroup";
|
|
2549
|
-
var Nr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2550
|
-
ref: n,
|
|
2551
|
-
className: Re("px-2 py-1.5 text-[11px] text-muted-foreground", e),
|
|
2552
|
-
...t
|
|
2553
|
-
}));
|
|
2554
|
-
Nr.displayName = "SelectLabel";
|
|
2555
|
-
var Pr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2556
|
-
ref: n,
|
|
2557
|
-
role: "separator",
|
|
2558
|
-
className: Re("my-1 -mx-1 h-px bg-border/60", e),
|
|
2559
|
-
...t
|
|
2560
|
-
}));
|
|
2561
|
-
Pr.displayName = "SelectSeparator";
|
|
2562
|
-
var Fr = (0, Z.createContext)(null);
|
|
2563
|
-
function Ir({ placeholder: e }) {
|
|
2564
|
-
return null;
|
|
2565
|
-
}
|
|
2566
|
-
Ir.displayName = "SelectValue";
|
|
2567
|
-
function Lr({ children: e, ...t }) {
|
|
2568
|
-
let n = (0, Z.useRef)(0), r = (0, Z.useMemo)(() => ({ next: () => n.current++ }), []);
|
|
2569
|
-
return n.current = 0, /* @__PURE__ */ (0, Q.jsx)(Fr.Provider, {
|
|
2570
|
-
value: r,
|
|
2571
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Ar, {
|
|
2572
|
-
...t,
|
|
2573
|
-
children: e
|
|
2574
|
-
})
|
|
2575
|
-
});
|
|
2576
|
-
}
|
|
2577
|
-
function Rr({ index: e, label: t, children: n, ...r }) {
|
|
2578
|
-
let i = (0, Z.useContext)(Fr);
|
|
2579
|
-
return /* @__PURE__ */ (0, Q.jsx)(jr, {
|
|
2580
|
-
index: e ?? i?.next() ?? 0,
|
|
2581
|
-
...r,
|
|
2582
|
-
children: n
|
|
2583
|
-
});
|
|
2584
|
-
}
|
|
2585
|
-
function zr({ children: e, placeholder: t, ...n }) {
|
|
2586
|
-
let r = t;
|
|
2587
|
-
return Z.Children.forEach(e, (e) => {
|
|
2588
|
-
(0, Z.isValidElement)(e) && e.type === Ir && (r = e.props.placeholder ?? r);
|
|
2589
|
-
}), /* @__PURE__ */ (0, Q.jsx)(kr, {
|
|
2590
|
-
placeholder: r,
|
|
2591
|
-
...n
|
|
2592
|
-
});
|
|
2593
|
-
}
|
|
2594
|
-
//#endregion
|
|
2595
|
-
export { Vt as C, Ht as S, Nt as T, rn as _, Ir as a, Gt as b, En as c, _n as d, gn as f, on as g, sn as h, zr as i, xn as l, cn as m, Lr as n, zn as o, mn as p, Rr as r, Mn as s, Dr as t, bn as u, tn as v, Pt as w, Wt as x, Kt as y };
|