@mcp-use/inspector 20.0.0-beta.0 → 20.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cdn/{AnimatePresence-B4HhIdgq.js → AnimatePresence-Dcw-FOy8.js} +50 -50
- package/dist/cdn/ChatTab-DBl6dHVH.js +6744 -0
- package/dist/cdn/{CheckboxIndicator-BF2cKfbA.js → CheckboxIndicator-Bt4IICtv.js} +77 -77
- package/dist/cdn/{ConnectionSettingsForm-iwNW86ZU.js → ConnectionSettingsForm-BFsZpwK4.js} +348 -292
- package/dist/cdn/ConnectionSettingsTab-DDk06dhT.js +150 -0
- package/dist/cdn/{ElicitationTab-upPXq2q7.js → ElicitationTab-CL1KJ0bz.js} +39 -39
- package/dist/cdn/{FormContext-Cl51-7O7.js → FormContext-tmgN_Vdr.js} +1 -1
- package/dist/cdn/{InspectorContext-DzXtgyTx.js → InspectorContext-UjtEbNod.js} +1 -21
- package/dist/cdn/{JSONDisplay-D3RcyO9z.js → JSONDisplay-BFxf5oEu.js} +18 -18
- package/dist/cdn/{ListTabHeader-8lULn-90.js → ListTabHeader-Cv-GmtGF.js} +19 -19
- package/dist/cdn/{ManufactOAuthCallback-DEM8mhWD.js → ManufactOAuthCallback-B98kSYCj.js} +1 -1
- package/dist/cdn/MarkdownRenderer-DQflNTGo.js +3610 -0
- package/dist/cdn/{NotificationsTab-CWopTIzT.js → NotificationsTab-CeImSrhx.js} +13 -13
- package/dist/cdn/{OAuthCallback-BxuOVgdb.js → OAuthCallback-C4n2hqKU.js} +1 -1
- package/dist/cdn/PromptsTab-C84YLTSM.js +901 -0
- package/dist/cdn/{ResourcesTab-BczUMFil.js → ResourcesTab-CCa5bIHE.js} +35 -55
- package/dist/cdn/{SamplingTab-6u5s845G.js → SamplingTab-Bt9z8yQ2.js} +35 -35
- package/dist/cdn/{ServerMetadataTab-DS0eiyyD.js → ServerMetadataTab-CvrKX8fz.js} +12 -12
- package/dist/cdn/{StatusIcon-BGXOEU2u.js → StatusIcon-D0-ARyOh.js} +6 -6
- package/dist/cdn/{ToolsTab-CUhwP4rZ.js → ToolsTab-v9zgWmM6.js} +103 -137
- package/dist/cdn/{ViewPreview-CxJc1Kht.js → ViewPreview-DsPwZAwO.js} +2 -2
- package/dist/cdn/{WidgetWrapper-BJJtLqMb.js → WidgetWrapper-CwlpDv17.js} +529 -530
- package/dist/cdn/card-DgiYnSg-.js +41 -0
- package/dist/cdn/{checkbox-B4oUG6Rr.js → checkbox-By0FklhG.js} +6 -6
- package/dist/cdn/{dialog-Dnl-pZsY.js → dialog-BsDpuJd3.js} +151 -151
- package/dist/cdn/{dist-mRDqCgKU.js → dist-B0eL32Gb.js} +114 -113
- package/dist/cdn/{dist-DjXr_YO3.js → dist-DaMB0Su9.js} +1 -1
- package/dist/cdn/{index-browser-CVUwR-Bu.js → index-browser-QDjRGsPo.js} +1 -1
- package/dist/cdn/{input-BLxOA7V-.js → input-C2OBd4PJ.js} +4787 -2842
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7424 -7443
- package/dist/cdn/{label-CBvG613A.js → label-B9Jmm9be.js} +10 -10
- package/dist/cdn/{manufact-auth-0TVxpeTA.js → manufact-auth-BQMHhbLV.js} +142 -106
- package/dist/cdn/{not-found-BcNNsTjS.js → not-found-DEtSM_Wd.js} +7 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +379 -0
- package/dist/cdn/{react-yUi9mVK4.js → react-Dn8PWXwP.js} +33 -27
- package/dist/cdn/{select-BZ_IoKxg.js → select-DDdiIPR2.js} +726 -726
- package/dist/cdn/{shared-uMiV6Fx1.js → shared-DaILIQPP.js} +29 -29
- package/dist/cdn/{popover-C_SSrXT0.js → sheet-Br_l2kry.js} +694 -622
- package/dist/cdn/{spinner-CWcJhIY_.js → spinner-jQtC7EBj.js} +5 -5
- package/dist/cdn/{switch-DtQOLb9R.js → switch-C3IyQuid.js} +104 -104
- package/dist/cdn/{tabs-subtle-C5cy35sY.js → tabs-subtle-CkdI6Mac.js} +147 -147
- package/dist/cdn/{telemetry-Ct6pVkM1.js → telemetry-DGoIGfIS.js} +3 -3
- package/dist/cdn/{textarea-Bj-CT7hC.js → textarea-DSbwcFVt.js} +6 -6
- package/dist/cdn/{useAriaLabelledBy-Bm9qHGK6.js → useAriaLabelledBy-DqAdnppm.js} +1 -1
- package/dist/cdn/{useCompositeItem-CNJ6MXdi.js → useCompositeItem-BRqEzYh-.js} +2 -2
- package/dist/cdn/{useConfig-CwxZ6Quj.js → useConfig-CTb6GZbt.js} +73 -46
- package/dist/cdn/{useViewHostProps-C7vjco2m.js → useViewHostProps-DIIlz3tJ.js} +1 -1
- package/dist/cli.js +141 -25
- package/dist/client/auth/manufact-auth.d.ts +3 -1
- package/dist/client/auth/manufact-auth.d.ts.map +1 -1
- package/dist/client/components/ChatTab.d.ts +1 -8
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/ResourcesTab.d.ts.map +1 -1
- package/dist/client/components/chat/ChatHeader.d.ts +7 -2
- package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +4 -2
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +10 -0
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +1 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +7 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +1 -0
- package/dist/client/components/chat/ConfigurationDialog.d.ts +11 -9
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +1 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +11 -0
- package/dist/client/components/chat/chatModeStorage.d.ts.map +1 -0
- package/dist/client/components/chat/managedChatNotice.d.ts +16 -0
- package/dist/client/components/chat/managedChatNotice.d.ts.map +1 -0
- package/dist/client/components/chat/providerMeta.d.ts +11 -0
- package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts +7 -5
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +4 -6
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +1 -0
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -1
- package/dist/client/components/chat/useConfig.d.ts +1 -1
- package/dist/client/components/chat/useConfig.d.ts.map +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +2 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +13 -0
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -0
- package/dist/client/components/ui/chat-message.d.ts +1 -1
- package/dist/client/components/ui/chat-message.d.ts.map +1 -1
- package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +3 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/context/InspectorContext.d.ts.map +1 -1
- package/dist/client/index.js +2577 -2165
- package/dist/client/telemetry/utils.d.ts.map +1 -1
- package/dist/server/asset-urls.d.ts +18 -0
- package/dist/server/asset-urls.d.ts.map +1 -0
- package/dist/server/asset-urls.js +17 -0
- package/dist/server/cdn-shell.d.ts +3 -3
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +5 -3
- package/dist/server/chunk-H6ZCIKBS.js +63 -0
- package/dist/server/{chunk-ESODOPDD.js → chunk-J4FNYLBF.js} +4 -0
- package/dist/server/{chunk-TPHRVELX.js → chunk-K2DPKTIS.js} +27 -9
- package/dist/server/{chunk-THQ67TSE.js → chunk-LIM6NAUS.js} +2 -9
- package/dist/server/chunk-M5TZA42I.js +54 -0
- package/dist/server/{chunk-K2V2SDQD.js → chunk-OWR2BIBW.js} +1 -1
- package/dist/server/{chunk-J67FVPHF.js → chunk-R6RQMIXL.js} +2 -2
- package/dist/server/{chunk-5B3SXGZP.js → chunk-UJLXHNQP.js} +1 -1
- package/dist/server/{chunk-6XWDZEFF.js → chunk-XCNS5CIW.js} +8 -3
- package/dist/server/cli.js +8 -6
- package/dist/server/create-dev-api-app.js +3 -3
- package/dist/server/dev-callback-redirect.d.ts +3 -0
- package/dist/server/dev-callback-redirect.d.ts.map +1 -0
- package/dist/server/dev-callback-redirect.js +18 -0
- package/dist/server/favicon-static.d.ts.map +1 -1
- package/dist/server/favicon-static.js +1 -1
- package/dist/server/index.js +9 -7
- package/dist/server/middleware.js +9 -7
- package/dist/server/proxy/index.js +1 -1
- package/dist/server/proxy/mcp-proxy.d.ts +2 -0
- package/dist/server/proxy/mcp-proxy.d.ts.map +1 -1
- package/dist/server/proxy/mcp-proxy.js +3 -1
- package/dist/server/proxy-routes.js +2 -2
- package/dist/server/server.js +3 -3
- package/dist/server/static-assets.d.ts +5 -0
- package/dist/server/static-assets.d.ts.map +1 -0
- package/dist/server/static-assets.js +9 -0
- package/dist/server/version.js +1 -1
- package/dist/server/vite-dev-api-plugin.js +3 -3
- package/dist/web/assets/{AnimatePresence-CthXziG2.js → AnimatePresence-C5p0yiY1.js} +2 -2
- package/dist/web/assets/ChatTab-C2FtENBM.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-B2sUjytG.js +1 -0
- package/dist/web/assets/ElicitationTab-DwH08kDC.js +1 -0
- package/dist/web/assets/{FormContext-Cqc_A12u.js → FormContext-DH2caWKO.js} +1 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +1 -0
- package/dist/web/assets/{ManufactOAuthCallback-B-tdkUA2.js → ManufactOAuthCallback-Btu4B6u6.js} +1 -1
- package/dist/web/assets/MarkdownRenderer-DpIEt9wb.js +47 -0
- package/dist/web/assets/{NotificationsTab-BgLjxuos.js → NotificationsTab-CHB8mtSz.js} +1 -1
- package/dist/web/assets/{OAuthCallback-Bp-jLoQs.js → OAuthCallback-DV4MgX4Z.js} +1 -1
- package/dist/web/assets/PromptsTab-0GIapoSs.js +15 -0
- package/dist/web/assets/ResourcesTab-N9xjsI_b.js +2 -0
- package/dist/web/assets/SamplingTab-Dw0vpi4t.js +1 -0
- package/dist/web/assets/ServerMetadataTab-D-eQpLBF.js +1 -0
- package/dist/web/assets/ToolsTab-BMrMJ5JV.js +8 -0
- package/dist/web/assets/ViewPreview-N_cpEO0W.js +1 -0
- package/dist/web/assets/WidgetWrapper-pDgNVq9y.js +34 -0
- package/dist/web/assets/checkbox-CrnXSMh2.js +1 -0
- package/dist/web/assets/dist-CeWSydFI.js +21 -0
- package/dist/web/assets/index-Cfuv_gb3.js +475 -0
- package/dist/web/assets/index-fBX3akc8.css +1 -0
- package/dist/web/assets/input-CLYhA7PK.js +1 -0
- package/dist/web/assets/{label-B5Q_Zr8M.js → label-Cdim77Jw.js} +1 -1
- package/dist/web/assets/select-CJ57-Bor.js +1 -0
- package/dist/web/assets/shared-B1GD9FMm.js +1 -0
- package/dist/web/assets/{tabs-subtle-Dxgism9f.js → tabs-subtle-CG5cjC_N.js} +1 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +1 -0
- package/dist/web/assets/useConfig-BTp15Lle.js +1 -0
- package/dist/web/assets/{useViewHostProps-BgsQ2yYl.js → useViewHostProps-BQlaFC2Q.js} +1 -1
- package/dist/web/index.html +8 -9
- package/package.json +5 -12
- package/dist/cdn/ChatTab-5ya_YTFV.js +0 -13218
- package/dist/cdn/ConnectionSettingsTab-CeK83dxn.js +0 -145
- package/dist/cdn/PromptsTab-Cspfnl6n.js +0 -4400
- package/dist/cdn/bundle-mjs-B0nmHDtp.js +0 -1953
- package/dist/cdn/card-DqjqAq0o.js +0 -41
- package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +0 -17500
- package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +0 -36
- package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +0 -2
- package/dist/cdn/pdf-CxFT9FER.js +0 -16291
- package/dist/cdn/sheet-CerCdhxz.js +0 -78
- package/dist/cdn/useHostedSession-BA39Aegc.js +0 -153
- package/dist/cdn/useMCPPrompts-D3_Hla_z.js +0 -104
- package/dist/client/components/chat/streamdown-code-slim.d.ts +0 -4
- package/dist/client/components/chat/streamdown-code-slim.d.ts.map +0 -1
- package/dist/web/assets/ChatTab-CiAqtqhj.js +0 -460
- package/dist/web/assets/ConnectionSettingsTab-CTh6MFKE.js +0 -1
- package/dist/web/assets/ElicitationTab-B3Eg0_Jm.js +0 -1
- package/dist/web/assets/ListTabHeader-G-nQX18m.js +0 -1
- package/dist/web/assets/PromptsTab-CA-SZs43.js +0 -61
- package/dist/web/assets/ResourcesTab-DdMIW_af.js +0 -2
- package/dist/web/assets/SamplingTab-DjyDG01W.js +0 -1
- package/dist/web/assets/ServerMetadataTab-Q4PlqP_B.js +0 -1
- package/dist/web/assets/ToolsTab-BHk8GCmd.js +0 -8
- package/dist/web/assets/ViewPreview-DWtmwzCb.js +0 -1
- package/dist/web/assets/WidgetWrapper-B43lqbld.js +0 -34
- package/dist/web/assets/bundle-mjs-8puS6ou7.js +0 -1
- package/dist/web/assets/checkbox-_GzEPQic.js +0 -1
- package/dist/web/assets/chunk-BO2N2NFS-BdIeB5Lr.js +0 -131
- package/dist/web/assets/dist-DQjEDTKs.js +0 -21
- package/dist/web/assets/highlighted-body-OFNGDK62-Dp3e1QHL.js +0 -1
- package/dist/web/assets/index-Bbn-6QR2.js +0 -475
- package/dist/web/assets/index-BjH-Qp85.css +0 -1
- package/dist/web/assets/input-CjmxOFr6.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-yq1lkD3x.js +0 -1
- package/dist/web/assets/pdf-C3cfS_Ha.js +0 -54
- package/dist/web/assets/select-C0xlfLAa.js +0 -1
- package/dist/web/assets/shared-Dfwy7nyg.js +0 -1
- package/dist/web/assets/sheet-CRPrEqAa.js +0 -1
- package/dist/web/assets/textarea-Ci09-en6.js +0 -1
- package/dist/web/assets/useConfig-b1f_iVFH.js +0 -1
- package/dist/web/assets/useMCPPrompts-CPskz9af.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { t as n } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { n as Qe } from "./label-
|
|
5
|
-
import { b as $e, l as et, n as tt, r as nt, t as rt, y as it } from "./AnimatePresence-
|
|
6
|
-
import { c as at, i as ot, l as st, o as ct, r as lt, t as ut } from "./FormContext-
|
|
2
|
+
import { $t as n, An as r, Ar as i, Bt as a, Cn as o, Dt as s, En as c, Er as l, Et as u, Fn as d, Ft as f, Ht as p, In as m, J as h, Jt as g, Kn as _, Ln as v, Lr as y, Lt as b, Mn as x, Mr as S, Mt as ee, Nn as C, Nr as w, On as te, Or as T, Pt as E, Qt as D, Rr as O, Sn as ne, Sr as k, Tn as A, Tr as j, Tt as M, Un as N, Ut as re, Vt as ie, Wt as ae, X as oe, Xt as P, Yn as F, Yt as I, Z as L, Zt as R, _n as z, _r as B, an as V, bn as H, br as U, bt as se, cn as ce, dn as le, dr as ue, en as de, er as fe, f as W, fn as pe, fr as me, gn as he, gr as ge, hn as _e, hr as ve, in as ye, ir as be, jn as xe, jt as Se, kn as Ce, kr as G, ln as we, mn as K, mr as q, nn as Te, nt as Ee, o as De, on as Oe, or as ke, pn as Ae, pr as je, q as Me, qn as Ne, qt as Pe, rn as Fe, rr as Ie, s as Le, sn as Re, st as ze, tn as Be, tr as Ve, un as He, vn as Ue, wn as We, wr as J, wt as Y, xn as Ge, xr as Ke, xt as X, yn as qe, zn as Je, zr as Ye, zt as Xe } from "./input-C2OBd4PJ.js";
|
|
3
|
+
import { t as Ze } from "./jsx-runtime-CIxvMpEo.js";
|
|
4
|
+
import { n as Qe } from "./label-B9Jmm9be.js";
|
|
5
|
+
import { b as $e, l as et, n as tt, r as nt, t as rt, y as it } from "./AnimatePresence-Dcw-FOy8.js";
|
|
6
|
+
import { c as at, i as ot, l as st, o as ct, r as lt, t as ut } from "./FormContext-tmgN_Vdr.js";
|
|
7
7
|
//#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
|
|
8
8
|
var Z = /* @__PURE__ */ e(t(), 1), dt = 0;
|
|
9
9
|
function ft(e, t = {}) {
|
|
@@ -12,7 +12,7 @@ function ft(e, t = {}) {
|
|
|
12
12
|
function a() {
|
|
13
13
|
i && !i() || e?.focus({ preventScroll: n });
|
|
14
14
|
}
|
|
15
|
-
if (r) return a(),
|
|
15
|
+
if (r) return a(), q;
|
|
16
16
|
let o = requestAnimationFrame(a);
|
|
17
17
|
return dt = o, () => {
|
|
18
18
|
dt === o && (cancelAnimationFrame(o), dt = 0);
|
|
@@ -31,7 +31,7 @@ function vt(e) {
|
|
|
31
31
|
return ht[e];
|
|
32
32
|
}
|
|
33
33
|
function yt(e) {
|
|
34
|
-
return e ?
|
|
34
|
+
return e ? w(e) ? e.host : yt(e.parentNode) : null;
|
|
35
35
|
}
|
|
36
36
|
var bt = (e, t) => t.map((t) => {
|
|
37
37
|
if (e.contains(t)) return t;
|
|
@@ -46,7 +46,7 @@ var bt = (e, t) => t.map((t) => {
|
|
|
46
46
|
}, St = (e, t, n) => {
|
|
47
47
|
let r = [], i = (e) => {
|
|
48
48
|
!e || n.has(e) || Array.from(e.children).forEach((e) => {
|
|
49
|
-
|
|
49
|
+
l(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
return i(e), r;
|
|
@@ -78,14 +78,14 @@ function Ct(e, t, n, r, { mark: i = !0 }) {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function wt(e, t = {}) {
|
|
81
|
-
let { ariaHidden: n = !1, inert: r = !1, mark: i = !0 } = t, a =
|
|
81
|
+
let { ariaHidden: n = !1, inert: r = !1, mark: i = !0 } = t, a = Oe(e[0]).body;
|
|
82
82
|
return Ct(e, a, n, r, { mark: i });
|
|
83
83
|
}
|
|
84
84
|
//#endregion
|
|
85
85
|
//#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
|
|
86
|
-
var Q =
|
|
86
|
+
var Q = Ze();
|
|
87
87
|
function Tt(e, t) {
|
|
88
|
-
let n =
|
|
88
|
+
let n = T(_e(e));
|
|
89
89
|
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") : "";
|
|
90
90
|
}
|
|
91
91
|
var Et = 20, Dt = [];
|
|
@@ -93,278 +93,278 @@ function Ot() {
|
|
|
93
93
|
Dt = Dt.filter((e) => e.deref()?.isConnected);
|
|
94
94
|
}
|
|
95
95
|
function kt(e) {
|
|
96
|
-
Ot(), e &&
|
|
96
|
+
Ot(), e && l(e) !== "body" && (Dt.push(new WeakRef(e)), Dt.length > Et && (Dt = Dt.slice(-20)));
|
|
97
97
|
}
|
|
98
98
|
function At() {
|
|
99
99
|
return Ot(), Dt[Dt.length - 1]?.deref();
|
|
100
100
|
}
|
|
101
101
|
function jt(e) {
|
|
102
|
-
return e ?
|
|
102
|
+
return e ? g(e) ? e : I(e)[0] || e : null;
|
|
103
103
|
}
|
|
104
104
|
function Mt(e) {
|
|
105
105
|
if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !e.getAttribute("role")?.includes("dialog")) return;
|
|
106
|
-
let t =
|
|
106
|
+
let t = p(e).filter((e) => {
|
|
107
107
|
let t = e.getAttribute("data-tabindex") || "";
|
|
108
|
-
return
|
|
108
|
+
return g(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
|
|
109
109
|
}), n = e.getAttribute("tabindex");
|
|
110
110
|
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"));
|
|
111
111
|
}
|
|
112
112
|
function Nt(e) {
|
|
113
|
-
let { context: t, children:
|
|
113
|
+
let { context: t, children: r, disabled: s = !1, initialFocus: c = !0, returnFocus: u = !0, restoreFocus: d = !1, modal: p = !0, closeOnFocusOut: h = !0, openInteractionType: _ = "", nextFocusableElement: v, previousFocusableElement: y, beforeContentFocusGuardRef: b, externalTree: S, getInsideElements: C } = e, w = "rootStore" in t ? t.rootStore : t, T = w.useState("open"), E = w.useState("domReferenceElement"), D = w.useState("floatingElement"), { events: O, dataRef: j } = w.context, M = J(() => j.current.floatingContext?.nodeId), oe = c === !1, P = le(E) && oe, F = Re(c), L = Re(u), R = Re(_), z = Re(T), B = ee(S), V = f(), H = Z.useRef(!1), U = Z.useRef(!1), se = Z.useRef(!1), ue = Z.useRef(null), de = Z.useRef(""), fe = Z.useRef(""), W = Z.useRef(null), me = Z.useRef(null), he = ge(W, b, V?.beforeInsideRef), ve = ge(me, V?.afterInsideRef), ye = A(), be = A(), Se = xe(), Ce = V != null, G = He(D), q = J((e = G) => e ? I(e) : []), Te = J(() => C?.().filter((e) => e != null) ?? []);
|
|
114
114
|
Z.useEffect(() => {
|
|
115
|
-
if (
|
|
115
|
+
if (s || !p) return;
|
|
116
116
|
function e(e) {
|
|
117
|
-
e.key === "Tab" && K(G,
|
|
117
|
+
e.key === "Tab" && K(G, Ae(Oe(G))) && q().length === 0 && !P && o(e);
|
|
118
118
|
}
|
|
119
|
-
return
|
|
119
|
+
return we(Oe(G), "keydown", e);
|
|
120
120
|
}, [
|
|
121
|
-
|
|
121
|
+
s,
|
|
122
122
|
G,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
p,
|
|
124
|
+
P,
|
|
125
|
+
q
|
|
126
126
|
]), Z.useEffect(() => {
|
|
127
|
-
if (
|
|
128
|
-
let e =
|
|
127
|
+
if (s || !T) return;
|
|
128
|
+
let e = Oe(G);
|
|
129
129
|
function t() {
|
|
130
|
-
|
|
130
|
+
se.current = !1;
|
|
131
131
|
}
|
|
132
132
|
function n(e) {
|
|
133
|
-
let t =
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
let t = _e(e), n = Te();
|
|
134
|
+
se.current = !(K(D, t) || K(E, t) || K(V?.portalNode, t) || n.some((e) => e === t || K(e, t))), fe.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (U.current = !0, be.start(0, () => {
|
|
135
|
+
U.current = !1;
|
|
136
136
|
}));
|
|
137
137
|
}
|
|
138
138
|
function r() {
|
|
139
|
-
|
|
139
|
+
fe.current = "keyboard";
|
|
140
140
|
}
|
|
141
|
-
return ce(
|
|
141
|
+
return ce(we(e, "pointerdown", n, !0), we(e, "pointerup", t, !0), we(e, "pointercancel", t, !0), we(e, "keydown", r, !0), t);
|
|
142
142
|
}, [
|
|
143
|
-
|
|
144
|
-
O,
|
|
143
|
+
s,
|
|
145
144
|
D,
|
|
145
|
+
E,
|
|
146
146
|
G,
|
|
147
147
|
T,
|
|
148
|
-
|
|
148
|
+
V,
|
|
149
149
|
be,
|
|
150
|
-
|
|
150
|
+
Te
|
|
151
151
|
]), Z.useEffect(() => {
|
|
152
|
-
if (
|
|
153
|
-
let e =
|
|
152
|
+
if (s || !h) return;
|
|
153
|
+
let e = Oe(G);
|
|
154
154
|
function t() {
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
U.current = !0, be.start(0, () => {
|
|
156
|
+
U.current = !1;
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
let t =
|
|
161
|
-
|
|
159
|
+
function r(e) {
|
|
160
|
+
let t = _e(e);
|
|
161
|
+
g(t) && (ue.current = t);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
let
|
|
165
|
-
|
|
166
|
-
let c =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
].includes(
|
|
176
|
-
if (
|
|
177
|
-
if (
|
|
178
|
-
|
|
163
|
+
function o(t) {
|
|
164
|
+
let r = t.relatedTarget, o = t.currentTarget, s = _e(t);
|
|
165
|
+
p && r == null && s != null && K(D, s) && kt(s), queueMicrotask(() => {
|
|
166
|
+
let c = M(), l = w.context.triggerElements, u = Te(), f = r?.hasAttribute(Xe("focus-guard")) && [
|
|
167
|
+
W.current,
|
|
168
|
+
me.current,
|
|
169
|
+
V?.beforeInsideRef.current,
|
|
170
|
+
V?.afterInsideRef.current,
|
|
171
|
+
V?.beforeOutsideRef.current,
|
|
172
|
+
V?.afterOutsideRef.current,
|
|
173
|
+
te(y),
|
|
174
|
+
te(v)
|
|
175
|
+
].includes(r), m = !(K(E, r) || K(D, r) || K(r, D) || K(V?.portalNode, r) || u.some((e) => e === r || K(e, r)) || r != null && l.hasElement(r) || l.hasMatchingElement((e) => K(e, r)) || f || B && (ie(B.nodesRef.current, c).find((e) => K(e.context?.elements.floating, r) || K(e.context?.elements.domReference, r)) || a(B.nodesRef.current, c).find((e) => [e.context?.elements.floating, He(e.context?.elements.floating)].includes(r) || e.context?.elements.domReference === r)));
|
|
176
|
+
if (o === E && G && Mt(G), d && o !== E && !n(s) && Ae(e) === e.body) {
|
|
177
|
+
if (i(G) && (G.focus(), d === "popup")) {
|
|
178
|
+
Se.request(() => {
|
|
179
179
|
G.focus();
|
|
180
180
|
});
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
let e =
|
|
184
|
-
|
|
183
|
+
let e = q(), t = ue.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || G;
|
|
184
|
+
i(n) && n.focus();
|
|
185
185
|
}
|
|
186
|
-
if (
|
|
187
|
-
|
|
186
|
+
if (j.current.insideReactTree) {
|
|
187
|
+
j.current.insideReactTree = !1;
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
(
|
|
190
|
+
(P || !p) && r && m && !U.current && (P || r !== At()) && (H.current = !0, w.setOpen(!1, x(N, t)));
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
function c() {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
se.current || (j.current.insideReactTree = !0, ye.start(0, () => {
|
|
195
|
+
j.current.insideReactTree = !1;
|
|
196
196
|
}));
|
|
197
197
|
}
|
|
198
|
-
let l =
|
|
199
|
-
if (!(!
|
|
198
|
+
let l = i(E) ? E : null;
|
|
199
|
+
if (!(!D && !l)) return ce(l && we(l, "focusout", o), l && we(l, "pointerdown", t), D && we(D, "focusin", r), D && we(D, "focusout", o), D && V && we(D, "focusout", c, !0));
|
|
200
200
|
}, [
|
|
201
|
-
|
|
201
|
+
s,
|
|
202
|
+
E,
|
|
202
203
|
D,
|
|
203
|
-
O,
|
|
204
204
|
G,
|
|
205
|
-
|
|
205
|
+
p,
|
|
206
|
+
B,
|
|
206
207
|
V,
|
|
207
|
-
H,
|
|
208
208
|
w,
|
|
209
|
-
|
|
209
|
+
h,
|
|
210
210
|
d,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
q,
|
|
212
|
+
P,
|
|
213
|
+
M,
|
|
214
|
+
j,
|
|
215
215
|
ye,
|
|
216
216
|
be,
|
|
217
|
-
|
|
217
|
+
Se,
|
|
218
218
|
v,
|
|
219
219
|
y,
|
|
220
|
-
|
|
220
|
+
Te
|
|
221
221
|
]), Z.useEffect(() => {
|
|
222
|
-
if (
|
|
223
|
-
let e = Array.from(
|
|
224
|
-
|
|
222
|
+
if (s || !D || !T) return;
|
|
223
|
+
let e = Array.from(V?.portalNode?.querySelectorAll(`[${Xe("portal")}]`) || []), t = (B ? a(B.nodesRef.current, M()) : []).find((e) => le(e.context?.elements.domReference || null))?.context?.elements.domReference, n = wt([
|
|
224
|
+
D,
|
|
225
225
|
...e,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
...
|
|
226
|
+
W.current,
|
|
227
|
+
me.current,
|
|
228
|
+
V?.beforeOutsideRef.current,
|
|
229
|
+
V?.afterOutsideRef.current,
|
|
230
|
+
...Te(),
|
|
231
231
|
t,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
te(y),
|
|
233
|
+
te(v),
|
|
234
|
+
P ? E : null
|
|
235
235
|
].filter((e) => e != null), {
|
|
236
|
-
ariaHidden:
|
|
236
|
+
ariaHidden: p || P,
|
|
237
237
|
mark: !1
|
|
238
|
-
}), r = wt([
|
|
238
|
+
}), r = wt([D, ...e].filter((e) => e != null));
|
|
239
239
|
return () => {
|
|
240
240
|
r(), n();
|
|
241
241
|
};
|
|
242
242
|
}, [
|
|
243
243
|
T,
|
|
244
|
-
|
|
244
|
+
s,
|
|
245
|
+
E,
|
|
245
246
|
D,
|
|
246
|
-
|
|
247
|
-
f,
|
|
248
|
-
H,
|
|
249
|
-
I,
|
|
247
|
+
p,
|
|
250
248
|
V,
|
|
251
|
-
|
|
249
|
+
P,
|
|
250
|
+
B,
|
|
251
|
+
M,
|
|
252
252
|
v,
|
|
253
253
|
y,
|
|
254
|
-
|
|
255
|
-
]),
|
|
256
|
-
if (!T ||
|
|
257
|
-
let e =
|
|
254
|
+
Te
|
|
255
|
+
]), k(() => {
|
|
256
|
+
if (!T || s || !i(G)) return;
|
|
257
|
+
let e = Oe(G), t = Ae(e);
|
|
258
258
|
queueMicrotask(() => {
|
|
259
|
-
let n =
|
|
259
|
+
let n = F.current, r = typeof n == "function" ? n(R.current || "") : n;
|
|
260
260
|
if (r === void 0 || r === !1 || K(G, t)) return;
|
|
261
|
-
let i = null, a = () => (i ??=
|
|
262
|
-
o = r === !0 || r === null ? a() :
|
|
263
|
-
let s = K(G,
|
|
261
|
+
let i = null, a = () => (i ??= q(G), i[0] || G), o;
|
|
262
|
+
o = r === !0 || r === null ? a() : te(r), o ||= a();
|
|
263
|
+
let s = K(G, Ae(e));
|
|
264
264
|
ft(o, {
|
|
265
265
|
preventScroll: o === G,
|
|
266
266
|
shouldFocus() {
|
|
267
|
-
if (!
|
|
267
|
+
if (!z.current) return !1;
|
|
268
268
|
if (s) return !0;
|
|
269
|
-
let t =
|
|
269
|
+
let t = Ae(e);
|
|
270
270
|
return !(t !== o && K(G, t));
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
});
|
|
274
274
|
}, [
|
|
275
|
-
|
|
275
|
+
s,
|
|
276
276
|
T,
|
|
277
277
|
G,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
]),
|
|
283
|
-
if (
|
|
284
|
-
let e =
|
|
278
|
+
q,
|
|
279
|
+
F,
|
|
280
|
+
R,
|
|
281
|
+
z
|
|
282
|
+
]), k(() => {
|
|
283
|
+
if (s || !G) return;
|
|
284
|
+
let e = Oe(G), t = Ae(e), n = R.current == null;
|
|
285
285
|
kt(t);
|
|
286
286
|
function r(e) {
|
|
287
|
-
if (e.open || (
|
|
288
|
-
else if (
|
|
287
|
+
if (e.open || (de.current = Tt(e.nativeEvent, fe.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (H.current = !0), e.reason === "outside-press") if (e.nested) H.current = !1;
|
|
288
|
+
else if (Ge(e.nativeEvent) || ne(e.nativeEvent)) H.current = !1;
|
|
289
289
|
else {
|
|
290
290
|
let e = !1;
|
|
291
|
-
|
|
291
|
+
Oe(G).createElement("div").focus({ get preventScroll() {
|
|
292
292
|
return e = !0, !1;
|
|
293
|
-
} }), e ?
|
|
293
|
+
} }), e ? H.current = !1 : H.current = !0;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
|
|
297
|
-
function
|
|
298
|
-
let e =
|
|
296
|
+
O.on("openchange", r);
|
|
297
|
+
function a() {
|
|
298
|
+
let e = L.current, r = typeof e == "function" ? e(de.current) : e;
|
|
299
299
|
if (r === void 0 || r === !1) return null;
|
|
300
300
|
r === null && (r = !0);
|
|
301
|
-
let i =
|
|
302
|
-
return o ||= At() || null, typeof r == "boolean" ? o :
|
|
301
|
+
let i = E?.isConnected ? E : null, a = t?.isConnected && l(t) !== "body" ? t : null, o = n ? a || i : i || a;
|
|
302
|
+
return o ||= At() || null, typeof r == "boolean" ? o : te(r) || o || null;
|
|
303
303
|
}
|
|
304
304
|
return () => {
|
|
305
|
-
|
|
306
|
-
let t =
|
|
305
|
+
O.off("openchange", r);
|
|
306
|
+
let t = Ae(e), n = Te(), o = K(D, t) || n.some((e) => e === t || K(e, t)) || B && ie(B.nodesRef.current, M(), !1).some((e) => K(e.context?.elements.floating, t)), s = L.current, c = a();
|
|
307
307
|
queueMicrotask(() => {
|
|
308
308
|
let n = jt(c), r = typeof s != "boolean";
|
|
309
|
-
s && !
|
|
309
|
+
s && !H.current && i(n) && (!(!r && n !== t && t !== e.body) || o) && n.focus({ preventScroll: !0 }), H.current = !1;
|
|
310
310
|
});
|
|
311
311
|
};
|
|
312
312
|
}, [
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
s,
|
|
314
|
+
D,
|
|
315
315
|
G,
|
|
316
|
+
L,
|
|
316
317
|
R,
|
|
318
|
+
O,
|
|
317
319
|
B,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
!
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
modal: f,
|
|
330
|
-
closeOnFocusOut: m,
|
|
320
|
+
E,
|
|
321
|
+
M,
|
|
322
|
+
Te
|
|
323
|
+
]), k(() => {
|
|
324
|
+
if (!m || T || !D) return;
|
|
325
|
+
let e = Ae(Oe(D));
|
|
326
|
+
!i(e) || !pe(e) || K(D, e) && e.blur();
|
|
327
|
+
}, [T, D]), k(() => {
|
|
328
|
+
if (!(s || !V)) return V.setFocusManagerState({
|
|
329
|
+
modal: p,
|
|
330
|
+
closeOnFocusOut: h,
|
|
331
331
|
open: T,
|
|
332
332
|
onOpenChange: w.setOpen,
|
|
333
|
-
domReference:
|
|
333
|
+
domReference: E
|
|
334
334
|
}), () => {
|
|
335
|
-
|
|
335
|
+
V.setFocusManagerState(null);
|
|
336
336
|
};
|
|
337
337
|
}, [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
s,
|
|
339
|
+
V,
|
|
340
|
+
p,
|
|
341
341
|
T,
|
|
342
342
|
w,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
]),
|
|
346
|
-
if (!(
|
|
343
|
+
h,
|
|
344
|
+
E
|
|
345
|
+
]), k(() => {
|
|
346
|
+
if (!(s || !G)) return Mt(G), () => {
|
|
347
347
|
queueMicrotask(Ot);
|
|
348
348
|
};
|
|
349
|
-
}, [
|
|
350
|
-
let
|
|
349
|
+
}, [s, G]);
|
|
350
|
+
let Ee = !s && (p ? !P : !0) && (Ce || p);
|
|
351
351
|
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [
|
|
352
|
-
|
|
352
|
+
Ee && /*#__PURE__*/ (0, Q.jsx)(Fe, {
|
|
353
353
|
"data-type": "inside",
|
|
354
354
|
ref: he,
|
|
355
355
|
onFocus: (e) => {
|
|
356
|
-
if (
|
|
357
|
-
let e =
|
|
356
|
+
if (p) {
|
|
357
|
+
let e = q();
|
|
358
358
|
ft(e[e.length - 1]);
|
|
359
|
-
} else
|
|
359
|
+
} else V?.portalNode && (H.current = !1, Pe(e, V.portalNode) ? re(E)?.focus() : te(y ?? V.beforeOutsideRef)?.focus());
|
|
360
360
|
}
|
|
361
361
|
}),
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
r,
|
|
363
|
+
Ee && /*#__PURE__*/ (0, Q.jsx)(Fe, {
|
|
364
364
|
"data-type": "inside",
|
|
365
|
-
ref:
|
|
365
|
+
ref: ve,
|
|
366
366
|
onFocus: (e) => {
|
|
367
|
-
|
|
367
|
+
p ? ft(q()[0]) : V?.portalNode && (h && (H.current = !0), Pe(e, V.portalNode) ? ae(E)?.focus() : te(v ?? V.afterOutsideRef)?.focus());
|
|
368
368
|
}
|
|
369
369
|
})
|
|
370
370
|
] });
|
|
@@ -372,9 +372,9 @@ function Nt(e) {
|
|
|
372
372
|
//#endregion
|
|
373
373
|
//#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
|
|
374
374
|
function Pt(e, t = {}) {
|
|
375
|
-
let { enabled: n = !0, event: r = "click", toggle: i = !0, ignoreMouse: a = !1, stickIfOpen: o = !0, touchOpenDelay: s = 0, reason: c = fe } = t, l = "rootStore" in e ? e.rootStore : e, u = l.context.dataRef, d = Z.useRef(void 0), f =
|
|
375
|
+
let { enabled: n = !0, event: r = "click", toggle: i = !0, ignoreMouse: a = !1, stickIfOpen: o = !0, touchOpenDelay: s = 0, reason: c = fe } = t, l = "rootStore" in e ? e.rootStore : e, u = l.context.dataRef, d = Z.useRef(void 0), f = xe(), p = A(), m = Z.useMemo(() => {
|
|
376
376
|
function e(e, t, n, r) {
|
|
377
|
-
let i =
|
|
377
|
+
let i = x(c, t, n);
|
|
378
378
|
e && r === "touch" && s > 0 ? p.start(s, () => {
|
|
379
379
|
l.setOpen(!0, i);
|
|
380
380
|
}) : l.setOpen(e, i);
|
|
@@ -389,9 +389,9 @@ function Pt(e, t = {}) {
|
|
|
389
389
|
},
|
|
390
390
|
onMouseDown(n) {
|
|
391
391
|
let i = d.current, o = n.nativeEvent, s = l.select("open");
|
|
392
|
-
if (n.button !== 0 || r === "click" ||
|
|
393
|
-
let c = t(s, n.currentTarget, (e) => e === "click" || e === "mousedown"), u =
|
|
394
|
-
if (
|
|
392
|
+
if (n.button !== 0 || r === "click" || H(i, !0) && a) return;
|
|
393
|
+
let c = t(s, n.currentTarget, (e) => e === "click" || e === "mousedown"), u = _e(o);
|
|
394
|
+
if (pe(u)) {
|
|
395
395
|
e(c, o, u, i);
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
@@ -407,7 +407,7 @@ function Pt(e, t = {}) {
|
|
|
407
407
|
d.current = void 0;
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
|
-
|
|
410
|
+
H(i, !0) && a || e(t(l.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, i);
|
|
411
411
|
},
|
|
412
412
|
onKeyDown() {
|
|
413
413
|
d.current = void 0;
|
|
@@ -425,7 +425,7 @@ function Pt(e, t = {}) {
|
|
|
425
425
|
p,
|
|
426
426
|
s
|
|
427
427
|
]);
|
|
428
|
-
return Z.useMemo(() => n ? { reference: m } :
|
|
428
|
+
return Z.useMemo(() => n ? { reference: m } : je, [n, m]);
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
431
|
//#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
|
|
@@ -444,210 +444,210 @@ function Rt(e, t, n) {
|
|
|
444
444
|
return It(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
|
|
445
445
|
}
|
|
446
446
|
function zt(e, t, n) {
|
|
447
|
-
return It(t, n ? e ===
|
|
447
|
+
return It(t, n ? e === z : e === Ue, e === he);
|
|
448
448
|
}
|
|
449
449
|
function Bt(e, t, n, r) {
|
|
450
|
-
return t === "both" || t === "horizontal" && r ? e === Ft : It(t, n ? e ===
|
|
450
|
+
return t === "both" || t === "horizontal" && r ? e === Ft : It(t, n ? e === Ue : e === z, e === qe);
|
|
451
451
|
}
|
|
452
452
|
function Vt(e, t) {
|
|
453
|
-
let { listRef: n, activeIndex: r, onNavigate:
|
|
454
|
-
process.env.NODE_ENV !== "production" && (l && (u || console.warn("`useListNavigation` looping must be enabled to allow escaping."), p || console.warn("`useListNavigation` must be virtual to allow escaping.")), v === "vertical" &&
|
|
455
|
-
let
|
|
456
|
-
|
|
457
|
-
}),
|
|
453
|
+
let { listRef: n, activeIndex: r, onNavigate: a = () => {}, enabled: s = !0, selectedIndex: c = null, allowEscape: l = !1, loopFocus: u = !1, nested: d = !1, rtl: f = !1, virtual: p = !1, focusItemOnOpen: m = "auto", focusItemOnHover: h = !0, openOnArrowKeyDown: g = !0, disabledIndices: _ = void 0, orientation: v = "vertical", parentOrientation: y, id: b, resetOnPointerLeave: S = !0, externalTree: C, grid: w } = t, te = w != null;
|
|
454
|
+
process.env.NODE_ENV !== "production" && (l && (u || console.warn("`useListNavigation` looping must be enabled to allow escaping."), p || console.warn("`useListNavigation` must be virtual to allow escaping.")), v === "vertical" && te && console.warn("In grid list navigation mode, the `orientation` should", "be either \"horizontal\" or \"both\"."));
|
|
455
|
+
let T = "rootStore" in e ? e.rootStore : e, E = T.useState("open"), O = T.useState("floatingElement"), A = T.useState("domReferenceElement"), j = T.context.dataRef, M = He(O), re = le(A), ie = Re(M), ae = Se(), oe = ee(C), F = Z.useRef(m), I = Z.useRef(c ?? -1), L = Z.useRef(null), z = Z.useRef(!0), B = J((e) => {
|
|
456
|
+
a(I.current === -1 ? null : I.current, e);
|
|
457
|
+
}), V = Z.useRef(!!O), H = Z.useRef(E), U = Z.useRef(!1), se = Z.useRef(!1), ce = Z.useRef(null), ue = Re(_), fe = Re(E), W = Re(c), pe = Re(S), me = xe(), he = xe(), ge = J(() => {
|
|
458
458
|
function e(e) {
|
|
459
|
-
p ?
|
|
460
|
-
sync:
|
|
459
|
+
p ? oe?.events.emit("virtualfocus", e) : ce.current = ft(e, {
|
|
460
|
+
sync: U.current,
|
|
461
461
|
preventScroll: !0
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
let t = n.current[
|
|
465
|
-
t && e(t), (
|
|
466
|
-
let i = n.current[
|
|
467
|
-
i && (t || e(i), we && (r || !
|
|
464
|
+
let t = n.current[I.current], r = se.current;
|
|
465
|
+
t && e(t), (U.current ? (e) => e() : (e) => me.request(e))(() => {
|
|
466
|
+
let i = n.current[I.current] || t;
|
|
467
|
+
i && (t || e(i), we && (r || !z.current) && i.scrollIntoView?.({
|
|
468
468
|
block: "nearest",
|
|
469
469
|
inline: "nearest"
|
|
470
470
|
}));
|
|
471
471
|
});
|
|
472
472
|
});
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}, [
|
|
476
|
-
|
|
473
|
+
k(() => {
|
|
474
|
+
j.current.orientation = v;
|
|
475
|
+
}, [j, v]), k(() => {
|
|
476
|
+
s && (E && O ? (I.current = c ?? -1, F.current && c != null && (se.current = !0, B())) : V.current && (I.current = -1, B()));
|
|
477
477
|
}, [
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
s,
|
|
479
|
+
E,
|
|
480
480
|
O,
|
|
481
481
|
c,
|
|
482
|
-
|
|
483
|
-
]),
|
|
484
|
-
if (
|
|
485
|
-
if (!
|
|
486
|
-
|
|
482
|
+
B
|
|
483
|
+
]), k(() => {
|
|
484
|
+
if (s) {
|
|
485
|
+
if (!E) {
|
|
486
|
+
U.current = !1;
|
|
487
487
|
return;
|
|
488
488
|
}
|
|
489
489
|
if (O) if (r == null) {
|
|
490
|
-
if (
|
|
491
|
-
if (
|
|
490
|
+
if (U.current = !1, W.current != null) return;
|
|
491
|
+
if (V.current && (I.current = -1, ge()), (!H.current || !V.current) && F.current && (L.current != null || F.current === !0 && L.current == null)) {
|
|
492
492
|
let e = 0, t = () => {
|
|
493
|
-
n.current[0] == null ? (e < 2 && (e ? (e) => he.request(e) : queueMicrotask)(t), e += 1) : (
|
|
493
|
+
n.current[0] == null ? (e < 2 && (e ? (e) => he.request(e) : queueMicrotask)(t), e += 1) : (I.current = L.current == null || Rt(L.current, v, f) || d ? D(n) : R(n), L.current = null, B());
|
|
494
494
|
};
|
|
495
495
|
t();
|
|
496
496
|
}
|
|
497
|
-
} else de(n.current, r) || (
|
|
497
|
+
} else de(n.current, r) || (I.current = r, ge(), se.current = !1);
|
|
498
498
|
}
|
|
499
499
|
}, [
|
|
500
|
-
|
|
501
|
-
|
|
500
|
+
s,
|
|
501
|
+
E,
|
|
502
502
|
O,
|
|
503
503
|
r,
|
|
504
|
-
|
|
504
|
+
W,
|
|
505
505
|
d,
|
|
506
506
|
n,
|
|
507
507
|
v,
|
|
508
508
|
f,
|
|
509
|
-
|
|
509
|
+
B,
|
|
510
510
|
ge,
|
|
511
511
|
he
|
|
512
|
-
]),
|
|
513
|
-
if (!
|
|
514
|
-
let e =
|
|
515
|
-
t && !r &&
|
|
512
|
+
]), k(() => {
|
|
513
|
+
if (!s || O || !oe || p || !V.current) return;
|
|
514
|
+
let e = oe.nodesRef.current, t = e.find((e) => e.id === ae)?.context?.elements.floating, n = Ae(Oe(A ?? t ?? null)), r = e.some((e) => e.context && K(e.context.elements.floating, n));
|
|
515
|
+
t && !r && z.current && t.focus({ preventScroll: !0 });
|
|
516
516
|
}, [
|
|
517
|
-
|
|
517
|
+
s,
|
|
518
518
|
O,
|
|
519
519
|
A,
|
|
520
|
-
|
|
521
|
-
|
|
520
|
+
oe,
|
|
521
|
+
ae,
|
|
522
522
|
p
|
|
523
|
-
]),
|
|
524
|
-
|
|
525
|
-
}),
|
|
526
|
-
|
|
527
|
-
}, [
|
|
528
|
-
let
|
|
529
|
-
if (!
|
|
523
|
+
]), k(() => {
|
|
524
|
+
H.current = E, V.current = !!O;
|
|
525
|
+
}), k(() => {
|
|
526
|
+
E || (L.current = null, F.current = m);
|
|
527
|
+
}, [E, m]);
|
|
528
|
+
let ve = r != null, ye = J((e) => {
|
|
529
|
+
if (!fe.current) return;
|
|
530
530
|
let t = n.current.indexOf(e.currentTarget);
|
|
531
|
-
t !== -1 && (
|
|
532
|
-
}), be = J(() => y ??
|
|
533
|
-
if (
|
|
534
|
-
if (d && Bt(e.key, v, f,
|
|
535
|
-
Lt(e.key, be()) ||
|
|
531
|
+
t !== -1 && (I.current !== t || r !== t) && (I.current = t, B(e));
|
|
532
|
+
}), be = J(() => y ?? oe?.nodesRef.current.find((e) => e.id === ae)?.context?.dataRef?.current.orientation), Ce = J(() => D(n, ue.current)), G = J((e) => {
|
|
533
|
+
if (z.current = !1, U.current = !0, e.which === 229 || !fe.current && e.currentTarget === ie.current) return;
|
|
534
|
+
if (d && Bt(e.key, v, f, te)) {
|
|
535
|
+
Lt(e.key, be()) || o(e), T.setOpen(!1, x(Ne, e.nativeEvent)), i(A) && (p ? oe?.events.emit("virtualfocus", A) : A.focus());
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
|
-
let t =
|
|
539
|
-
if (
|
|
540
|
-
let t = w(e,
|
|
541
|
-
if (t != null && (
|
|
538
|
+
let t = I.current, r = D(n, _), a = R(n, _);
|
|
539
|
+
if (re || (e.key === "Home" && (o(e), I.current = r, B(e)), e.key === "End" && (o(e), I.current = a, B(e))), w != null) {
|
|
540
|
+
let t = w(e, I.current, n, v, u, f, _, r, a);
|
|
541
|
+
if (t != null && (I.current = t, B(e)), v === "both") return;
|
|
542
542
|
}
|
|
543
543
|
if (Lt(e.key, v)) {
|
|
544
|
-
if (
|
|
545
|
-
|
|
544
|
+
if (o(e), E && !p && Ae(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
545
|
+
I.current = Rt(e.key, v, f) ? r : a, B(e);
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
|
-
Rt(e.key, v, f) ? u ? t >=
|
|
548
|
+
Rt(e.key, v, f) ? u ? t >= a ? l && t !== n.current.length ? I.current = -1 : (U.current = !1, I.current = r) : I.current = P(n.current, {
|
|
549
549
|
startingIndex: t,
|
|
550
550
|
disabledIndices: _
|
|
551
|
-
}) :
|
|
551
|
+
}) : I.current = Math.min(a, P(n.current, {
|
|
552
552
|
startingIndex: t,
|
|
553
553
|
disabledIndices: _
|
|
554
|
-
})) : u ? t <= r ? l && t !== -1 ?
|
|
554
|
+
})) : u ? t <= r ? l && t !== -1 ? I.current = n.current.length : (U.current = !1, I.current = a) : I.current = P(n.current, {
|
|
555
555
|
startingIndex: t,
|
|
556
556
|
decrement: !0,
|
|
557
557
|
disabledIndices: _
|
|
558
|
-
}) :
|
|
558
|
+
}) : I.current = Math.max(r, P(n.current, {
|
|
559
559
|
startingIndex: t,
|
|
560
560
|
decrement: !0,
|
|
561
561
|
disabledIndices: _
|
|
562
|
-
})), de(n.current,
|
|
562
|
+
})), de(n.current, I.current) && (I.current = -1), B(e);
|
|
563
563
|
}
|
|
564
564
|
}), we = Z.useMemo(() => ({
|
|
565
565
|
onFocus(e) {
|
|
566
|
-
|
|
566
|
+
U.current = !0, ye(e);
|
|
567
567
|
},
|
|
568
568
|
onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
|
|
569
569
|
onMouseMove(e) {
|
|
570
|
-
|
|
570
|
+
U.current = !0, se.current = !1, h && ye(e);
|
|
571
571
|
},
|
|
572
572
|
onPointerLeave(e) {
|
|
573
|
-
if (!
|
|
574
|
-
|
|
573
|
+
if (!fe.current || !z.current || e.pointerType === "touch") return;
|
|
574
|
+
U.current = !0;
|
|
575
575
|
let t = e.relatedTarget;
|
|
576
|
-
if (!(!h || n.current.includes(t)) && pe.current && (
|
|
577
|
-
let e =
|
|
576
|
+
if (!(!h || n.current.includes(t)) && pe.current && (ce.current?.(), ce.current = null, I.current = -1, B(e), !p)) {
|
|
577
|
+
let e = ie.current, t = Ae(Oe(e));
|
|
578
578
|
e && K(e, t) && e.focus({ preventScroll: !0 });
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
}), [
|
|
582
582
|
ye,
|
|
583
|
-
|
|
584
|
-
|
|
583
|
+
fe,
|
|
584
|
+
ie,
|
|
585
585
|
h,
|
|
586
586
|
n,
|
|
587
|
-
|
|
587
|
+
B,
|
|
588
588
|
pe,
|
|
589
589
|
p
|
|
590
|
-
]),
|
|
590
|
+
]), q = Z.useMemo(() => p && E && ve && { "aria-activedescendant": `${b}-${r}` }, [
|
|
591
591
|
p,
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
E,
|
|
593
|
+
ve,
|
|
594
594
|
b,
|
|
595
595
|
r
|
|
596
|
-
]),
|
|
596
|
+
]), Te = Z.useMemo(() => ({
|
|
597
597
|
"aria-orientation": v === "both" ? void 0 : v,
|
|
598
|
-
...
|
|
598
|
+
...re ? {} : q,
|
|
599
599
|
onKeyDown(e) {
|
|
600
|
-
if (e.key === "Tab" && e.shiftKey &&
|
|
601
|
-
let t =
|
|
602
|
-
if (t && !K(
|
|
603
|
-
|
|
600
|
+
if (e.key === "Tab" && e.shiftKey && E && !p) {
|
|
601
|
+
let t = _e(e.nativeEvent);
|
|
602
|
+
if (t && !K(ie.current, t)) return;
|
|
603
|
+
o(e), T.setOpen(!1, x(N, e.nativeEvent)), i(A) && A.focus();
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
G(e);
|
|
607
607
|
},
|
|
608
608
|
onPointerMove() {
|
|
609
|
-
|
|
609
|
+
z.current = !0;
|
|
610
610
|
}
|
|
611
611
|
}), [
|
|
612
|
-
|
|
612
|
+
q,
|
|
613
613
|
G,
|
|
614
|
-
|
|
614
|
+
ie,
|
|
615
615
|
v,
|
|
616
|
-
|
|
616
|
+
re,
|
|
617
|
+
T,
|
|
617
618
|
E,
|
|
618
|
-
D,
|
|
619
619
|
p,
|
|
620
620
|
A
|
|
621
|
-
]),
|
|
621
|
+
]), Ee = Z.useMemo(() => {
|
|
622
622
|
function e(e) {
|
|
623
|
-
|
|
623
|
+
T.setOpen(!0, x(Ne, e.nativeEvent, e.currentTarget));
|
|
624
624
|
}
|
|
625
625
|
function t(e) {
|
|
626
|
-
m === "auto" &&
|
|
626
|
+
m === "auto" && Ge(e.nativeEvent) && (F.current = !p);
|
|
627
627
|
}
|
|
628
628
|
function n(e) {
|
|
629
|
-
|
|
629
|
+
F.current = m, m === "auto" && ne(e.nativeEvent) && (F.current = !0);
|
|
630
630
|
}
|
|
631
631
|
return {
|
|
632
632
|
onKeyDown(t) {
|
|
633
|
-
let n =
|
|
634
|
-
|
|
635
|
-
let r = t.key.startsWith("Arrow"), i = zt(t.key, be(), f), a = Lt(t.key, v),
|
|
633
|
+
let n = T.select("open");
|
|
634
|
+
z.current = !1;
|
|
635
|
+
let r = t.key.startsWith("Arrow"), i = zt(t.key, be(), f), a = Lt(t.key, v), s = (d ? i : a) || t.key === "Enter" || t.key.trim() === "";
|
|
636
636
|
if (p && n) return G(t);
|
|
637
637
|
if (!(!n && !g && r)) {
|
|
638
|
-
if (
|
|
638
|
+
if (s) {
|
|
639
639
|
let e = Lt(t.key, be());
|
|
640
|
-
|
|
640
|
+
L.current = d && e ? null : t.key;
|
|
641
641
|
}
|
|
642
642
|
if (d) {
|
|
643
|
-
i && (
|
|
643
|
+
i && (o(t), n ? (I.current = Ce(), B(t)) : e(t));
|
|
644
644
|
return;
|
|
645
645
|
}
|
|
646
|
-
a && (
|
|
646
|
+
a && (W.current != null && (I.current = W.current), o(t), !n && g ? e(t) : G(t), n && B(t));
|
|
647
647
|
}
|
|
648
648
|
},
|
|
649
649
|
onFocus(e) {
|
|
650
|
-
|
|
650
|
+
T.select("open") && !p && (I.current = -1, B(e));
|
|
651
651
|
},
|
|
652
652
|
onPointerDown: n,
|
|
653
653
|
onPointerEnter: n,
|
|
@@ -657,43 +657,43 @@ function Vt(e, t) {
|
|
|
657
657
|
}, [
|
|
658
658
|
G,
|
|
659
659
|
m,
|
|
660
|
-
|
|
660
|
+
Ce,
|
|
661
661
|
d,
|
|
662
|
-
|
|
663
|
-
|
|
662
|
+
B,
|
|
663
|
+
T,
|
|
664
664
|
g,
|
|
665
665
|
v,
|
|
666
666
|
be,
|
|
667
667
|
f,
|
|
668
|
-
|
|
668
|
+
W,
|
|
669
669
|
p
|
|
670
|
-
]),
|
|
671
|
-
...
|
|
672
|
-
...
|
|
673
|
-
}), [
|
|
674
|
-
return Z.useMemo(() =>
|
|
675
|
-
reference:
|
|
676
|
-
floating:
|
|
670
|
+
]), De = Z.useMemo(() => ({
|
|
671
|
+
...q,
|
|
672
|
+
...Ee
|
|
673
|
+
}), [q, Ee]);
|
|
674
|
+
return Z.useMemo(() => s ? {
|
|
675
|
+
reference: De,
|
|
676
|
+
floating: Te,
|
|
677
677
|
item: we,
|
|
678
|
-
trigger:
|
|
678
|
+
trigger: Ee
|
|
679
679
|
} : {}, [
|
|
680
|
-
|
|
681
|
-
Oe,
|
|
682
|
-
Ee,
|
|
680
|
+
s,
|
|
683
681
|
De,
|
|
682
|
+
Te,
|
|
683
|
+
Ee,
|
|
684
684
|
we
|
|
685
685
|
]);
|
|
686
686
|
}
|
|
687
687
|
//#endregion
|
|
688
688
|
//#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
|
|
689
689
|
function Ht(e, t) {
|
|
690
|
-
let { listRef:
|
|
690
|
+
let { listRef: r, elementsRef: i, activeIndex: a, 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 = A(), g = Z.useRef(""), _ = Z.useRef(f ?? a ?? -1), v = Z.useRef(null), y = J((e) => {
|
|
691
691
|
function t(e) {
|
|
692
692
|
let t = i?.current[e];
|
|
693
|
-
return !t ||
|
|
693
|
+
return !t || n(t);
|
|
694
694
|
}
|
|
695
695
|
function u(e) {
|
|
696
|
-
return t(e) ? c == null || !
|
|
696
|
+
return t(e) ? c == null || !Be(me, e, c) : !1;
|
|
697
697
|
}
|
|
698
698
|
function p(e, t, n = 0) {
|
|
699
699
|
if (e.length === 0) return -1;
|
|
@@ -704,26 +704,26 @@ function Ht(e, t) {
|
|
|
704
704
|
}
|
|
705
705
|
return -1;
|
|
706
706
|
}
|
|
707
|
-
let y =
|
|
708
|
-
if (g.current.length > 0 && e.key === " " && (
|
|
709
|
-
m && e.key !== " " && (
|
|
707
|
+
let y = r.current;
|
|
708
|
+
if (g.current.length > 0 && e.key === " " && (o(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;
|
|
709
|
+
m && e.key !== " " && (o(e), l?.(!0));
|
|
710
710
|
let b = g.current === "";
|
|
711
711
|
b && (_.current = f ?? a ?? -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, () => {
|
|
712
712
|
g.current = "", _.current = v.current, l?.(!1);
|
|
713
713
|
});
|
|
714
714
|
let x = ((b ? f ?? a ?? -1 : _.current) ?? 0) + 1, S = p(y, g.current, x);
|
|
715
|
-
S === -1 ? e.key !== " " && (g.current = "", l?.(!1)) : (
|
|
715
|
+
S === -1 ? e.key !== " " && (g.current = "", l?.(!1)) : (s?.(S), v.current = S);
|
|
716
716
|
}), b = J((e) => {
|
|
717
717
|
let t = e.relatedTarget, n = p.select("domReferenceElement"), r = p.select("floatingElement");
|
|
718
718
|
K(n, t) || K(r, t) || (h.clear(), g.current = "", _.current = v.current, l?.(!1));
|
|
719
719
|
});
|
|
720
|
-
|
|
720
|
+
k(() => {
|
|
721
721
|
!m && f !== null || (h.clear(), v.current = null, g.current !== "" && (g.current = ""));
|
|
722
722
|
}, [
|
|
723
723
|
m,
|
|
724
724
|
f,
|
|
725
725
|
h
|
|
726
|
-
]),
|
|
726
|
+
]), k(() => {
|
|
727
727
|
m && g.current === "" && (_.current = f ?? a ?? -1);
|
|
728
728
|
}, [
|
|
729
729
|
m,
|
|
@@ -745,13 +745,13 @@ var Ut = /*#__PURE__*/ Z.createContext(void 0);
|
|
|
745
745
|
process.env.NODE_ENV !== "production" && (Ut.displayName = "ToolbarRootContext");
|
|
746
746
|
function Wt(e) {
|
|
747
747
|
let t = Z.useContext(Ut);
|
|
748
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ?
|
|
748
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? U(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
|
|
749
749
|
return t;
|
|
750
750
|
}
|
|
751
751
|
//#endregion
|
|
752
752
|
//#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
|
|
753
753
|
function Gt(e) {
|
|
754
|
-
return
|
|
754
|
+
return ve(19) ? e : e ? "true" : void 0;
|
|
755
755
|
}
|
|
756
756
|
//#endregion
|
|
757
757
|
//#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
|
|
@@ -781,12 +781,12 @@ process.env.NODE_ENV !== "production" && (Kt.displayName = "InternalBackdrop");
|
|
|
781
781
|
var qt = {}, Jt = {}, Yt = "";
|
|
782
782
|
function Xt(e) {
|
|
783
783
|
if (typeof document > "u") return !1;
|
|
784
|
-
let t =
|
|
785
|
-
return
|
|
784
|
+
let t = Oe(e);
|
|
785
|
+
return T(t).innerWidth - t.documentElement.clientWidth > 0;
|
|
786
786
|
}
|
|
787
787
|
function Zt(e) {
|
|
788
788
|
if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
|
|
789
|
-
let t =
|
|
789
|
+
let t = Oe(e), n = t.documentElement, r = t.body, i = S(n) ? n : r, a = i.style.overflowY, o = n.style.scrollbarGutter;
|
|
790
790
|
n.style.scrollbarGutter = "stable", i.style.overflowY = "scroll";
|
|
791
791
|
let s = i.offsetWidth;
|
|
792
792
|
i.style.overflowY = "hidden";
|
|
@@ -794,7 +794,7 @@ function Zt(e) {
|
|
|
794
794
|
return i.style.overflowY = a, n.style.scrollbarGutter = o, s === c;
|
|
795
795
|
}
|
|
796
796
|
function Qt(e) {
|
|
797
|
-
let t =
|
|
797
|
+
let t = Oe(e), n = t.documentElement, r = t.body, i = S(n) ? n : r, a = {
|
|
798
798
|
overflowY: i.style.overflowY,
|
|
799
799
|
overflowX: i.style.overflowX
|
|
800
800
|
};
|
|
@@ -806,24 +806,24 @@ function Qt(e) {
|
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
808
|
function $t(e) {
|
|
809
|
-
let t =
|
|
810
|
-
if (
|
|
809
|
+
let t = Oe(e), n = t.documentElement, i = t.body, a = T(n), o = 0, s = 0, c = !1, l = r.create();
|
|
810
|
+
if (m && (a.visualViewport?.scale ?? 1) !== 1) return () => {};
|
|
811
811
|
function u() {
|
|
812
|
-
let t = a.getComputedStyle(n),
|
|
812
|
+
let t = a.getComputedStyle(n), r = a.getComputedStyle(i), l = (t.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
|
|
813
813
|
o = n.scrollTop, s = n.scrollLeft, qt = {
|
|
814
814
|
scrollbarGutter: n.style.scrollbarGutter,
|
|
815
815
|
overflowY: n.style.overflowY,
|
|
816
816
|
overflowX: n.style.overflowX
|
|
817
817
|
}, Yt = n.style.scrollBehavior, Jt = {
|
|
818
|
-
position:
|
|
819
|
-
height:
|
|
820
|
-
width:
|
|
821
|
-
boxSizing:
|
|
822
|
-
overflowY:
|
|
823
|
-
overflowX:
|
|
824
|
-
scrollBehavior:
|
|
818
|
+
position: i.style.position,
|
|
819
|
+
height: i.style.height,
|
|
820
|
+
width: i.style.width,
|
|
821
|
+
boxSizing: i.style.boxSizing,
|
|
822
|
+
overflowY: i.style.overflowY,
|
|
823
|
+
overflowX: i.style.overflowX,
|
|
824
|
+
scrollBehavior: i.style.scrollBehavior
|
|
825
825
|
};
|
|
826
|
-
let u = n.scrollHeight > n.clientHeight, d = n.scrollWidth > n.clientWidth, f = t.overflowY === "scroll" ||
|
|
826
|
+
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 = S(n) ? n : i;
|
|
827
827
|
if (c = Zt(e), c) {
|
|
828
828
|
n.style.scrollbarGutter = l, v.style.overflowY = "hidden", v.style.overflowX = "hidden";
|
|
829
829
|
return;
|
|
@@ -832,23 +832,23 @@ function $t(e) {
|
|
|
832
832
|
scrollbarGutter: l,
|
|
833
833
|
overflowY: "hidden",
|
|
834
834
|
overflowX: "hidden"
|
|
835
|
-
}), (u || f) && (n.style.overflowY = "scroll"), (d || p) && (n.style.overflowX = "scroll"), Object.assign(
|
|
835
|
+
}), (u || f) && (n.style.overflowY = "scroll"), (d || p) && (n.style.overflowX = "scroll"), Object.assign(i.style, {
|
|
836
836
|
position: "relative",
|
|
837
837
|
height: g || h ? `calc(100dvh - ${g + h}px)` : "100dvh",
|
|
838
838
|
width: _ || m ? `calc(100vw - ${_ + m}px)` : "100vw",
|
|
839
839
|
boxSizing: "border-box",
|
|
840
840
|
overflow: "hidden",
|
|
841
841
|
scrollBehavior: "unset"
|
|
842
|
-
}),
|
|
842
|
+
}), i.scrollTop = o, i.scrollLeft = s, n.setAttribute("data-base-ui-scroll-locked", ""), n.style.scrollBehavior = "unset";
|
|
843
843
|
}
|
|
844
844
|
function d() {
|
|
845
|
-
Object.assign(n.style, qt), Object.assign(
|
|
845
|
+
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);
|
|
846
846
|
}
|
|
847
847
|
function f() {
|
|
848
848
|
d(), l.request(u);
|
|
849
849
|
}
|
|
850
850
|
u();
|
|
851
|
-
let p =
|
|
851
|
+
let p = we(a, "resize", f);
|
|
852
852
|
return () => {
|
|
853
853
|
l.cancel(), d(), typeof a.removeEventListener == "function" && p();
|
|
854
854
|
};
|
|
@@ -856,8 +856,8 @@ function $t(e) {
|
|
|
856
856
|
var en = new class {
|
|
857
857
|
lockCount = 0;
|
|
858
858
|
restore = null;
|
|
859
|
-
timeoutLock =
|
|
860
|
-
timeoutUnlock =
|
|
859
|
+
timeoutLock = We.create();
|
|
860
|
+
timeoutUnlock = We.create();
|
|
861
861
|
acquire(e) {
|
|
862
862
|
return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
|
|
863
863
|
}
|
|
@@ -869,17 +869,17 @@ var en = new class {
|
|
|
869
869
|
};
|
|
870
870
|
lock(e) {
|
|
871
871
|
if (this.lockCount === 0 || this.restore !== null) return;
|
|
872
|
-
let t =
|
|
872
|
+
let t = Oe(e).documentElement, n = T(t).getComputedStyle(t).overflowY;
|
|
873
873
|
if (n === "hidden" || n === "clip") {
|
|
874
|
-
this.restore =
|
|
874
|
+
this.restore = q;
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
|
-
let r =
|
|
877
|
+
let r = v || !Xt(e);
|
|
878
878
|
this.restore = r ? Qt(e) : $t(e);
|
|
879
879
|
}
|
|
880
880
|
}();
|
|
881
881
|
function tn(e = !0, t = null) {
|
|
882
|
-
|
|
882
|
+
k(() => {
|
|
883
883
|
if (e) return en.acquire(t);
|
|
884
884
|
}, [e, t]);
|
|
885
885
|
}
|
|
@@ -888,12 +888,12 @@ function tn(e = !0, t = null) {
|
|
|
888
888
|
var nn = 20;
|
|
889
889
|
function rn(e, t, n, r) {
|
|
890
890
|
let [i, a] = Z.useState(!1);
|
|
891
|
-
|
|
891
|
+
k(() => {
|
|
892
892
|
if (!e || !t || n == null) {
|
|
893
893
|
a(!1);
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
let r =
|
|
896
|
+
let r = Oe(n).documentElement.clientWidth, i = n.offsetWidth;
|
|
897
897
|
a(r > 0 && i > 0 && i >= r - nn);
|
|
898
898
|
}, [
|
|
899
899
|
e,
|
|
@@ -922,7 +922,7 @@ function an(e) {
|
|
|
922
922
|
//#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
|
|
923
923
|
function on(e, t) {
|
|
924
924
|
let { onClick: n, onPointerDown: r } = an(J((n, r) => {
|
|
925
|
-
(typeof e == "function" ? e() : e) || t(r || (
|
|
925
|
+
(typeof e == "function" ? e() : e) || t(r || (v ? "touch" : ""));
|
|
926
926
|
}));
|
|
927
927
|
return Z.useMemo(() => ({
|
|
928
928
|
onClick: n,
|
|
@@ -941,14 +941,14 @@ function sn(e) {
|
|
|
941
941
|
//#endregion
|
|
942
942
|
//#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
|
|
943
943
|
function cn(e) {
|
|
944
|
-
let t = e.getBoundingClientRect(), n =
|
|
945
|
-
if (
|
|
944
|
+
let t = e.getBoundingClientRect(), n = T(e);
|
|
945
|
+
if (d) return t;
|
|
946
946
|
let r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
|
|
947
947
|
if (!(r.content !== "none" || i.content !== "none")) return t;
|
|
948
|
-
let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, l = Math.max(t.width, a, s), u = Math.max(t.height, o, c),
|
|
948
|
+
let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, l = Math.max(t.width, a, s), u = Math.max(t.height, o, c), f = l - t.width, p = u - t.height;
|
|
949
949
|
return {
|
|
950
|
-
left: t.left -
|
|
951
|
-
right: t.right +
|
|
950
|
+
left: t.left - f / 2,
|
|
951
|
+
right: t.right + f / 2,
|
|
952
952
|
top: t.top - p / 2,
|
|
953
953
|
bottom: t.bottom + p / 2
|
|
954
954
|
};
|
|
@@ -1110,7 +1110,7 @@ var xn = (0, Z.forwardRef)(({ offset: e, shadowLevel: t, className: n, children:
|
|
|
1110
1110
|
value: s,
|
|
1111
1111
|
children: /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
1112
1112
|
ref: a,
|
|
1113
|
-
className:
|
|
1113
|
+
className: O(bn(s, t ?? s), n),
|
|
1114
1114
|
...i,
|
|
1115
1115
|
children: r
|
|
1116
1116
|
})
|
|
@@ -1125,26 +1125,26 @@ var Cn = /*#__PURE__*/ Z.createContext(null);
|
|
|
1125
1125
|
process.env.NODE_ENV !== "production" && (Cn.displayName = "SelectFloatingContext");
|
|
1126
1126
|
function wn() {
|
|
1127
1127
|
let e = Z.useContext(Sn);
|
|
1128
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ?
|
|
1128
|
+
if (e === null) throw Error(process.env.NODE_ENV === "production" ? U(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1129
1129
|
return e;
|
|
1130
1130
|
}
|
|
1131
1131
|
function Tn() {
|
|
1132
1132
|
let e = Z.useContext(Cn);
|
|
1133
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ?
|
|
1133
|
+
if (e === null) throw Error(process.env.NODE_ENV === "production" ? U(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1134
1134
|
return e;
|
|
1135
1135
|
}
|
|
1136
1136
|
//#endregion
|
|
1137
1137
|
//#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
|
|
1138
1138
|
function En(e = {}) {
|
|
1139
|
-
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = lt(), o =
|
|
1140
|
-
!l.current || a ===
|
|
1139
|
+
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = lt(), o = C(t), s = n ? i : void 0, c = j(() => Symbol("labelable-control")), l = Z.useRef(!1), u = Z.useRef(t != null), d = J(() => {
|
|
1140
|
+
!l.current || a === q || (l.current = !1, a(c.current, void 0));
|
|
1141
1141
|
});
|
|
1142
|
-
return
|
|
1143
|
-
if (a ===
|
|
1142
|
+
return k(() => {
|
|
1143
|
+
if (a === q) return;
|
|
1144
1144
|
let e;
|
|
1145
1145
|
if (n) {
|
|
1146
1146
|
let n = r?.current;
|
|
1147
|
-
e =
|
|
1147
|
+
e = G(n) && n.closest("label") != null ? t ?? null : s ?? o;
|
|
1148
1148
|
} else if (t != null) u.current = !0, e = t;
|
|
1149
1149
|
else if (u.current) e = o;
|
|
1150
1150
|
else {
|
|
@@ -1303,32 +1303,32 @@ function Hn(e, t) {
|
|
|
1303
1303
|
//#endregion
|
|
1304
1304
|
//#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
|
|
1305
1305
|
function Un(e) {
|
|
1306
|
-
let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange:
|
|
1306
|
+
let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: l, name: u, form: d, autoComplete: f, disabled: p = !1, readOnly: m = !1, required: h = !1, modal: g = !0, actionsRef: _, inputRef: v, onOpenChangeComplete: y, items: b, multiple: S = !1, itemToStringLabel: ee, itemToStringValue: C, isItemEqualToValue: w = Dn, highlightItemOnHover: te = !0, children: T } = e, { clearErrors: E } = ut(), { setDirty: D, setTouched: O, setFocused: ne, validityData: A, setFilled: N, name: re, disabled: ie, validation: ae, validationMode: oe } = ct(), P = En({ id: t }), I = ie || p, L = re ?? u, [R, z] = Qe({
|
|
1307
1307
|
controlled: n,
|
|
1308
|
-
default:
|
|
1308
|
+
default: S ? r ?? me : r,
|
|
1309
1309
|
name: "Select",
|
|
1310
1310
|
state: "value"
|
|
1311
|
-
}), [
|
|
1311
|
+
}), [B, H] = Qe({
|
|
1312
1312
|
controlled: a,
|
|
1313
1313
|
default: o,
|
|
1314
1314
|
name: "Select",
|
|
1315
1315
|
state: "open"
|
|
1316
|
-
}),
|
|
1316
|
+
}), U = Z.useRef([]), ce = Z.useRef([]), le = Z.useRef(null), ue = Z.useRef(null), de = Z.useRef(0), fe = Z.useRef(null), W = Z.useRef([]), pe = Z.useRef(!1), he = Z.useRef(null), _e = Z.useRef(null), ve = Z.useRef({
|
|
1317
1317
|
allowSelectedMouseUp: !1,
|
|
1318
1318
|
allowUnselectedMouseUp: !1,
|
|
1319
1319
|
dragY: 0
|
|
1320
|
-
}),
|
|
1321
|
-
id:
|
|
1320
|
+
}), be = Z.useRef(!1), { mounted: xe, setMounted: Se, transitionStatus: G } = Ce(B), { openMethod: we, triggerProps: K } = sn(B), q = j(() => new se({
|
|
1321
|
+
id: P,
|
|
1322
1322
|
labelId: void 0,
|
|
1323
1323
|
modal: g,
|
|
1324
|
-
multiple:
|
|
1324
|
+
multiple: S,
|
|
1325
1325
|
itemToStringLabel: ee,
|
|
1326
1326
|
itemToStringValue: C,
|
|
1327
1327
|
isItemEqualToValue: w,
|
|
1328
|
-
value:
|
|
1329
|
-
open:
|
|
1328
|
+
value: R,
|
|
1329
|
+
open: B,
|
|
1330
1330
|
mounted: xe,
|
|
1331
|
-
transitionStatus:
|
|
1331
|
+
transitionStatus: G,
|
|
1332
1332
|
items: b,
|
|
1333
1333
|
forceMount: !1,
|
|
1334
1334
|
openMethod: null,
|
|
@@ -1343,256 +1343,256 @@ function Un(e) {
|
|
|
1343
1343
|
scrollUpArrowVisible: !1,
|
|
1344
1344
|
scrollDownArrowVisible: !1,
|
|
1345
1345
|
hasScrollArrows: !1
|
|
1346
|
-
})).current,
|
|
1347
|
-
|
|
1348
|
-
|
|
1346
|
+
})).current, Te = X(q, $.activeIndex), De = X(q, $.selectedIndex), Oe = X(q, $.triggerElement), ke = X(q, $.positionerElement), Ae = ln(we), Me = we ?? Ae ?? null, Ne = Z.useMemo(() => S ? "" : In(R, C), [
|
|
1347
|
+
S,
|
|
1348
|
+
R,
|
|
1349
1349
|
C
|
|
1350
|
-
]), Pe = Z.useMemo(() =>
|
|
1351
|
-
|
|
1352
|
-
|
|
1350
|
+
]), Pe = Z.useMemo(() => S && Array.isArray(R) ? R.map((e) => In(e, C)) : In(R, C), [
|
|
1351
|
+
S,
|
|
1352
|
+
R,
|
|
1353
1353
|
C
|
|
1354
1354
|
]);
|
|
1355
|
-
ot(
|
|
1356
|
-
let Fe = Z.useRef(
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
}, [
|
|
1360
|
-
|
|
1361
|
-
}, [Ie,
|
|
1362
|
-
let e =
|
|
1363
|
-
if (
|
|
1364
|
-
let n = Array.isArray(
|
|
1355
|
+
ot(Re(q.state.triggerElement), P, R, J(() => Pe), !I, u);
|
|
1356
|
+
let Fe = Z.useRef(R), Ie = S ? Array.isArray(R) && R.length > 0 : R != null && In(R, C) !== "";
|
|
1357
|
+
k(() => {
|
|
1358
|
+
R !== Fe.current && q.set("forceMount", !0);
|
|
1359
|
+
}, [q, R]), k(() => {
|
|
1360
|
+
N(Ie);
|
|
1361
|
+
}, [Ie, N]), k(function() {
|
|
1362
|
+
let e = W.current, t;
|
|
1363
|
+
if (S) {
|
|
1364
|
+
let n = Array.isArray(R) ? R : [];
|
|
1365
1365
|
if (n.length === 0) t = null;
|
|
1366
1366
|
else {
|
|
1367
1367
|
let r = n[n.length - 1], i = An(e, r, w);
|
|
1368
1368
|
t = i === -1 ? null : i;
|
|
1369
1369
|
}
|
|
1370
1370
|
} else {
|
|
1371
|
-
let n = An(e,
|
|
1371
|
+
let n = An(e, R, w);
|
|
1372
1372
|
t = n === -1 ? null : n;
|
|
1373
1373
|
}
|
|
1374
|
-
t === null && (
|
|
1374
|
+
t === null && (_e.current = null), !B && q.set("selectedIndex", t);
|
|
1375
1375
|
}, [
|
|
1376
1376
|
Ie,
|
|
1377
|
-
|
|
1378
|
-
V,
|
|
1377
|
+
S,
|
|
1379
1378
|
B,
|
|
1380
|
-
|
|
1379
|
+
R,
|
|
1380
|
+
W,
|
|
1381
1381
|
w,
|
|
1382
|
-
|
|
1383
|
-
|
|
1382
|
+
q,
|
|
1383
|
+
_e
|
|
1384
1384
|
]);
|
|
1385
1385
|
function Le(e) {
|
|
1386
|
-
let t =
|
|
1386
|
+
let t = A.initialValue;
|
|
1387
1387
|
return Array.isArray(e) && Array.isArray(t) ? !zn(e, t, (e, t) => On(e, t, w)) : e !== t;
|
|
1388
1388
|
}
|
|
1389
|
-
st(
|
|
1390
|
-
|
|
1389
|
+
st(R, () => {
|
|
1390
|
+
E(L), D(Le(R)), ae.change(R);
|
|
1391
1391
|
});
|
|
1392
|
-
let
|
|
1393
|
-
|
|
1392
|
+
let Be = J((e, t) => {
|
|
1393
|
+
l?.(e, t), !t.isCanceled && (H(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (O(!0), ne(!1), oe === "onBlur" && ae.commit(R)));
|
|
1394
1394
|
}), Ve = J(() => {
|
|
1395
|
-
Se(!1),
|
|
1395
|
+
Se(!1), q.update({
|
|
1396
1396
|
activeIndex: null,
|
|
1397
1397
|
openMethod: null
|
|
1398
1398
|
}), y?.(!1);
|
|
1399
1399
|
});
|
|
1400
|
-
|
|
1400
|
+
c({
|
|
1401
1401
|
enabled: !_,
|
|
1402
|
-
open:
|
|
1403
|
-
ref:
|
|
1402
|
+
open: B,
|
|
1403
|
+
ref: le,
|
|
1404
1404
|
onComplete() {
|
|
1405
|
-
|
|
1405
|
+
B || Ve();
|
|
1406
1406
|
}
|
|
1407
1407
|
}), Z.useImperativeHandle(_, () => ({ unmount: Ve }), [Ve]);
|
|
1408
1408
|
let He = J((e, t) => {
|
|
1409
|
-
i?.(e, t), !t.isCanceled &&
|
|
1409
|
+
i?.(e, t), !t.isCanceled && z(e);
|
|
1410
1410
|
}), Ue = J(() => {
|
|
1411
|
-
let e =
|
|
1411
|
+
let e = q.state.listElement || le.current;
|
|
1412
1412
|
if (!e) return;
|
|
1413
1413
|
let t = Vn(e.scrollHeight, e.clientHeight), n = Hn(e.scrollTop, t), r = n > 0, i = n < t;
|
|
1414
|
-
|
|
1415
|
-
}), We =
|
|
1416
|
-
open:
|
|
1417
|
-
onOpenChange:
|
|
1414
|
+
q.state.scrollUpArrowVisible !== r && q.set("scrollUpArrowVisible", r), q.state.scrollDownArrowVisible !== i && q.set("scrollDownArrowVisible", i);
|
|
1415
|
+
}), We = Ee({
|
|
1416
|
+
open: B,
|
|
1417
|
+
onOpenChange: Be,
|
|
1418
1418
|
elements: {
|
|
1419
|
-
reference:
|
|
1420
|
-
floating:
|
|
1419
|
+
reference: Oe,
|
|
1420
|
+
floating: ke
|
|
1421
1421
|
}
|
|
1422
|
-
}),
|
|
1423
|
-
enabled: !m && !
|
|
1422
|
+
}), Y = Pt(We, {
|
|
1423
|
+
enabled: !m && !I,
|
|
1424
1424
|
event: "mousedown"
|
|
1425
|
-
}),
|
|
1426
|
-
enabled: !m && !
|
|
1427
|
-
listRef:
|
|
1428
|
-
activeIndex:
|
|
1425
|
+
}), Ge = s(We), qe = Vt(We, {
|
|
1426
|
+
enabled: !m && !I,
|
|
1427
|
+
listRef: U,
|
|
1428
|
+
activeIndex: Te,
|
|
1429
1429
|
selectedIndex: De,
|
|
1430
|
-
disabledIndices:
|
|
1430
|
+
disabledIndices: me,
|
|
1431
1431
|
onNavigate(e) {
|
|
1432
|
-
e === null && !
|
|
1432
|
+
e === null && !B || q.set("activeIndex", e);
|
|
1433
1433
|
},
|
|
1434
|
-
focusItemOnHover:
|
|
1434
|
+
focusItemOnHover: te
|
|
1435
1435
|
}), Je = Ht(We, {
|
|
1436
|
-
enabled: !m && !
|
|
1437
|
-
listRef:
|
|
1438
|
-
activeIndex:
|
|
1436
|
+
enabled: !m && !I && (B || !S),
|
|
1437
|
+
listRef: ce,
|
|
1438
|
+
activeIndex: Te,
|
|
1439
1439
|
selectedIndex: De,
|
|
1440
|
-
disabledIndices: (e) => tt(
|
|
1440
|
+
disabledIndices: (e) => tt(U.current[e]),
|
|
1441
1441
|
onMatch(e) {
|
|
1442
|
-
|
|
1442
|
+
B ? q.set("activeIndex", e) : He(W.current[e], x("none"));
|
|
1443
1443
|
},
|
|
1444
1444
|
onTyping(e) {
|
|
1445
1445
|
pe.current = e;
|
|
1446
1446
|
}
|
|
1447
1447
|
}), Ye = Z.useMemo(() => {
|
|
1448
|
-
let e =
|
|
1449
|
-
return
|
|
1448
|
+
let e = Ke(Je.reference, qe.reference, Ge.reference, Y.reference, K);
|
|
1449
|
+
return P && (e.id = P), e;
|
|
1450
1450
|
}, [
|
|
1451
|
-
Ge.reference,
|
|
1452
|
-
Je.reference,
|
|
1453
|
-
Ke.reference,
|
|
1454
1451
|
Y.reference,
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1452
|
+
Je.reference,
|
|
1453
|
+
qe.reference,
|
|
1454
|
+
Ge.reference,
|
|
1455
|
+
K,
|
|
1456
|
+
P
|
|
1457
|
+
]), Xe = Z.useMemo(() => Ke(ze, Je.floating, qe.floating, Ge.floating), [
|
|
1458
1458
|
Je.floating,
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
]), Ze =
|
|
1462
|
-
|
|
1463
|
-
|
|
1459
|
+
qe.floating,
|
|
1460
|
+
Ge.floating
|
|
1461
|
+
]), Ze = qe.item ?? je;
|
|
1462
|
+
M(() => {
|
|
1463
|
+
q.update({
|
|
1464
1464
|
popupProps: Xe,
|
|
1465
1465
|
triggerProps: Ye
|
|
1466
1466
|
});
|
|
1467
|
-
}),
|
|
1468
|
-
|
|
1469
|
-
id:
|
|
1467
|
+
}), k(() => {
|
|
1468
|
+
q.update({
|
|
1469
|
+
id: P,
|
|
1470
1470
|
modal: g,
|
|
1471
|
-
multiple:
|
|
1472
|
-
value:
|
|
1473
|
-
open:
|
|
1471
|
+
multiple: S,
|
|
1472
|
+
value: R,
|
|
1473
|
+
open: B,
|
|
1474
1474
|
mounted: xe,
|
|
1475
|
-
transitionStatus:
|
|
1475
|
+
transitionStatus: G,
|
|
1476
1476
|
popupProps: Xe,
|
|
1477
1477
|
triggerProps: Ye,
|
|
1478
1478
|
items: b,
|
|
1479
1479
|
itemToStringLabel: ee,
|
|
1480
1480
|
itemToStringValue: C,
|
|
1481
1481
|
isItemEqualToValue: w,
|
|
1482
|
-
openMethod:
|
|
1482
|
+
openMethod: Me
|
|
1483
1483
|
});
|
|
1484
1484
|
}, [
|
|
1485
|
-
|
|
1486
|
-
|
|
1485
|
+
q,
|
|
1486
|
+
P,
|
|
1487
1487
|
g,
|
|
1488
|
-
|
|
1488
|
+
S,
|
|
1489
|
+
R,
|
|
1489
1490
|
B,
|
|
1490
|
-
V,
|
|
1491
1491
|
xe,
|
|
1492
|
-
|
|
1492
|
+
G,
|
|
1493
1493
|
Xe,
|
|
1494
1494
|
Ye,
|
|
1495
1495
|
b,
|
|
1496
1496
|
ee,
|
|
1497
1497
|
C,
|
|
1498
1498
|
w,
|
|
1499
|
-
|
|
1499
|
+
Me
|
|
1500
1500
|
]);
|
|
1501
1501
|
let $e = Z.useMemo(() => ({
|
|
1502
|
-
store:
|
|
1503
|
-
name:
|
|
1502
|
+
store: q,
|
|
1503
|
+
name: L,
|
|
1504
1504
|
required: h,
|
|
1505
|
-
disabled:
|
|
1505
|
+
disabled: I,
|
|
1506
1506
|
readOnly: m,
|
|
1507
|
-
multiple:
|
|
1508
|
-
highlightItemOnHover:
|
|
1507
|
+
multiple: S,
|
|
1508
|
+
highlightItemOnHover: te,
|
|
1509
1509
|
setValue: He,
|
|
1510
|
-
setOpen:
|
|
1511
|
-
listRef:
|
|
1512
|
-
popupRef:
|
|
1513
|
-
scrollHandlerRef:
|
|
1510
|
+
setOpen: Be,
|
|
1511
|
+
listRef: U,
|
|
1512
|
+
popupRef: le,
|
|
1513
|
+
scrollHandlerRef: ue,
|
|
1514
1514
|
handleScrollArrowVisibility: Ue,
|
|
1515
|
-
scrollArrowsMountedCountRef:
|
|
1515
|
+
scrollArrowsMountedCountRef: de,
|
|
1516
1516
|
itemProps: Ze,
|
|
1517
|
-
valueRef:
|
|
1518
|
-
valuesRef:
|
|
1519
|
-
labelsRef:
|
|
1517
|
+
valueRef: fe,
|
|
1518
|
+
valuesRef: W,
|
|
1519
|
+
labelsRef: ce,
|
|
1520
1520
|
typingRef: pe,
|
|
1521
1521
|
selectionRef: ve,
|
|
1522
|
-
firstItemTextRef:
|
|
1523
|
-
selectedItemTextRef:
|
|
1524
|
-
validation:
|
|
1522
|
+
firstItemTextRef: he,
|
|
1523
|
+
selectedItemTextRef: _e,
|
|
1524
|
+
validation: ae,
|
|
1525
1525
|
onOpenChangeComplete: y,
|
|
1526
|
-
alignItemWithTriggerActiveRef:
|
|
1526
|
+
alignItemWithTriggerActiveRef: be,
|
|
1527
1527
|
initialValueRef: Fe
|
|
1528
1528
|
}), [
|
|
1529
|
-
|
|
1530
|
-
z,
|
|
1531
|
-
h,
|
|
1529
|
+
q,
|
|
1532
1530
|
L,
|
|
1531
|
+
h,
|
|
1532
|
+
I,
|
|
1533
1533
|
m,
|
|
1534
|
-
|
|
1535
|
-
|
|
1534
|
+
S,
|
|
1535
|
+
te,
|
|
1536
1536
|
He,
|
|
1537
|
-
|
|
1537
|
+
Be,
|
|
1538
1538
|
Ze,
|
|
1539
|
-
|
|
1539
|
+
ae,
|
|
1540
1540
|
y,
|
|
1541
1541
|
Ue
|
|
1542
|
-
]), et =
|
|
1542
|
+
]), et = ge(v, ae.inputRef), nt = S && Array.isArray(R) && R.length > 0, rt = S ? void 0 : L, it = Z.useMemo(() => !S || !Array.isArray(R) || !L ? null : R.map((e) => {
|
|
1543
1543
|
let t = In(e, C);
|
|
1544
1544
|
return /*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1545
1545
|
type: "hidden",
|
|
1546
1546
|
form: d,
|
|
1547
|
-
name:
|
|
1547
|
+
name: L,
|
|
1548
1548
|
value: t,
|
|
1549
|
-
disabled:
|
|
1549
|
+
disabled: I
|
|
1550
1550
|
}, t);
|
|
1551
1551
|
}), [
|
|
1552
|
-
|
|
1553
|
-
|
|
1552
|
+
S,
|
|
1553
|
+
R,
|
|
1554
1554
|
d,
|
|
1555
|
-
|
|
1555
|
+
L,
|
|
1556
1556
|
C,
|
|
1557
|
-
|
|
1557
|
+
I
|
|
1558
1558
|
]);
|
|
1559
1559
|
return /*#__PURE__*/ (0, Q.jsx)(Sn.Provider, {
|
|
1560
1560
|
value: $e,
|
|
1561
1561
|
children: /*#__PURE__*/ (0, Q.jsxs)(Cn.Provider, {
|
|
1562
1562
|
value: We,
|
|
1563
1563
|
children: [
|
|
1564
|
-
|
|
1564
|
+
T,
|
|
1565
1565
|
/*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1566
|
-
...
|
|
1566
|
+
...ae.getValidationProps(I, {
|
|
1567
1567
|
onFocus() {
|
|
1568
|
-
|
|
1568
|
+
q.state.triggerElement?.focus({ focusVisible: !0 });
|
|
1569
1569
|
},
|
|
1570
1570
|
onChange(e) {
|
|
1571
|
-
if (e.nativeEvent.defaultPrevented ||
|
|
1572
|
-
let t = e.currentTarget.value, n =
|
|
1571
|
+
if (e.nativeEvent.defaultPrevented || I || m) return;
|
|
1572
|
+
let t = e.currentTarget.value, n = x(F, e.nativeEvent);
|
|
1573
1573
|
function r() {
|
|
1574
|
-
if (
|
|
1575
|
-
let e = t.toLowerCase(), r =
|
|
1576
|
-
r === -1 && (r =
|
|
1577
|
-
let r =
|
|
1574
|
+
if (S) return;
|
|
1575
|
+
let e = t.toLowerCase(), r = W.current.findIndex((t) => In(t, C).toLowerCase() === e || Fn(t, ee).toLowerCase() === e);
|
|
1576
|
+
r === -1 && (r = W.current.findIndex((t, n) => {
|
|
1577
|
+
let r = ce.current[n];
|
|
1578
1578
|
return r != null && r.toLowerCase() === e;
|
|
1579
1579
|
}));
|
|
1580
|
-
let i = r === -1 ? void 0 :
|
|
1580
|
+
let i = r === -1 ? void 0 : W.current[r];
|
|
1581
1581
|
i != null && He(i, n);
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1583
|
+
q.set("forceMount", !0), queueMicrotask(r);
|
|
1584
1584
|
}
|
|
1585
1585
|
}),
|
|
1586
|
-
id:
|
|
1586
|
+
id: P && rt == null ? `${P}-hidden-input` : void 0,
|
|
1587
1587
|
form: d,
|
|
1588
1588
|
name: rt,
|
|
1589
1589
|
autoComplete: f,
|
|
1590
1590
|
value: Ne,
|
|
1591
|
-
disabled:
|
|
1591
|
+
disabled: I,
|
|
1592
1592
|
required: h && !nt,
|
|
1593
1593
|
readOnly: m,
|
|
1594
1594
|
ref: et,
|
|
1595
|
-
style:
|
|
1595
|
+
style: L ? V : ye,
|
|
1596
1596
|
tabIndex: -1,
|
|
1597
1597
|
"aria-hidden": !0,
|
|
1598
1598
|
suppressHydrationWarning: !0
|
|
@@ -1610,19 +1610,19 @@ function Wn(e, t) {
|
|
|
1610
1610
|
//#endregion
|
|
1611
1611
|
//#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
|
|
1612
1612
|
var Gn = 2, Kn = 400, qn = {
|
|
1613
|
-
...
|
|
1613
|
+
...be,
|
|
1614
1614
|
...at,
|
|
1615
1615
|
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
1616
1616
|
value: () => null
|
|
1617
1617
|
}, Jn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1618
|
-
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: v, readOnly: y, required: b, alignItemWithTriggerActiveRef:
|
|
1619
|
-
En({ id:
|
|
1620
|
-
let
|
|
1618
|
+
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: v, readOnly: y, required: b, alignItemWithTriggerActiveRef: S, disabled: ee } = wn(), C = p || ee || a, w = X(h, $.open), te = X(h, $.mounted), T = X(h, $.value), E = X(h, $.triggerProps), D = X(h, $.positionerElement), O = X(h, $.listElement), ne = X(h, $.popupSide), k = X(h, $.id), j = X(h, $.labelId), M = X(h, $.hasSelectedValue), N = te && D ? ne : null, re = i ?? k, ie = Wn(m, j);
|
|
1619
|
+
En({ id: re });
|
|
1620
|
+
let ae = Re(D), oe = Z.useRef(null), { getButtonProps: P, buttonRef: I } = B({
|
|
1621
1621
|
disabled: C,
|
|
1622
1622
|
native: o
|
|
1623
|
-
}),
|
|
1623
|
+
}), L = J((e) => {
|
|
1624
1624
|
h.set("triggerElement", e);
|
|
1625
|
-
}),
|
|
1625
|
+
}), R = A(), z = A(), V = A();
|
|
1626
1626
|
Z.useEffect(() => {
|
|
1627
1627
|
if (w) return V.start(Kn, () => {
|
|
1628
1628
|
_.current.allowUnselectedMouseUp = !0, _.current.allowSelectedMouseUp = !0;
|
|
@@ -1633,66 +1633,66 @@ var Gn = 2, Kn = 400, qn = {
|
|
|
1633
1633
|
allowSelectedMouseUp: !1,
|
|
1634
1634
|
allowUnselectedMouseUp: !1,
|
|
1635
1635
|
dragY: 0
|
|
1636
|
-
},
|
|
1636
|
+
}, z.clear();
|
|
1637
1637
|
}, [
|
|
1638
1638
|
w,
|
|
1639
1639
|
_,
|
|
1640
|
-
|
|
1640
|
+
z,
|
|
1641
1641
|
V
|
|
1642
1642
|
]);
|
|
1643
|
-
let
|
|
1644
|
-
id:
|
|
1643
|
+
let H = Ke(E, {
|
|
1644
|
+
id: re,
|
|
1645
1645
|
role: "combobox",
|
|
1646
1646
|
"aria-expanded": w ? "true" : "false",
|
|
1647
1647
|
"aria-haspopup": "listbox",
|
|
1648
|
-
"aria-controls": w ?
|
|
1649
|
-
"aria-labelledby":
|
|
1648
|
+
"aria-controls": w ? O?.id ?? He(D)?.id : void 0,
|
|
1649
|
+
"aria-labelledby": ie,
|
|
1650
1650
|
"aria-readonly": y || void 0,
|
|
1651
1651
|
"aria-required": b || void 0,
|
|
1652
1652
|
tabIndex: C ? -1 : 0,
|
|
1653
1653
|
onFocus(e) {
|
|
1654
|
-
u(!0), w &&
|
|
1654
|
+
u(!0), w && S.current && g(!1, x(F, e.nativeEvent)), R.start(0, () => {
|
|
1655
1655
|
h.set("forceMount", !0);
|
|
1656
1656
|
});
|
|
1657
1657
|
},
|
|
1658
1658
|
onBlur(e) {
|
|
1659
|
-
K(
|
|
1659
|
+
K(D, e.relatedTarget) || (l(!0), u(!1), d === "onBlur" && v.commit(T));
|
|
1660
1660
|
},
|
|
1661
1661
|
onMouseDown(e) {
|
|
1662
1662
|
if (w) return;
|
|
1663
|
-
let t =
|
|
1663
|
+
let t = Oe(e.currentTarget);
|
|
1664
1664
|
function n(e) {
|
|
1665
|
-
if (!
|
|
1665
|
+
if (!oe.current) return;
|
|
1666
1666
|
let t = e.target;
|
|
1667
|
-
if (K(
|
|
1668
|
-
let n = cn(
|
|
1669
|
-
e.clientX >= n.left - Gn && e.clientX <= n.right + Gn && e.clientY >= n.top - Gn && e.clientY <= n.bottom + Gn || g(!1,
|
|
1667
|
+
if (K(oe.current, t) || K(ae.current, t)) return;
|
|
1668
|
+
let n = cn(oe.current);
|
|
1669
|
+
e.clientX >= n.left - Gn && e.clientX <= n.right + Gn && e.clientY >= n.top - Gn && e.clientY <= n.bottom + Gn || g(!1, x(Je, e));
|
|
1670
1670
|
}
|
|
1671
|
-
|
|
1671
|
+
z.start(0, () => {
|
|
1672
1672
|
t.addEventListener("mouseup", n, { once: !0 });
|
|
1673
1673
|
});
|
|
1674
1674
|
}
|
|
1675
|
-
}, c,
|
|
1676
|
-
|
|
1677
|
-
let
|
|
1675
|
+
}, c, P), U = v.getValidationProps(C, H);
|
|
1676
|
+
U.role = "combobox";
|
|
1677
|
+
let se = {
|
|
1678
1678
|
...f,
|
|
1679
1679
|
open: w,
|
|
1680
1680
|
disabled: C,
|
|
1681
|
-
value:
|
|
1681
|
+
value: T,
|
|
1682
1682
|
readOnly: y,
|
|
1683
|
-
popupSide:
|
|
1684
|
-
placeholder: !
|
|
1683
|
+
popupSide: N,
|
|
1684
|
+
placeholder: !M
|
|
1685
1685
|
};
|
|
1686
1686
|
return ue("button", e, {
|
|
1687
1687
|
ref: [
|
|
1688
1688
|
t,
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1689
|
+
oe,
|
|
1690
|
+
I,
|
|
1691
|
+
L
|
|
1692
1692
|
],
|
|
1693
|
-
state:
|
|
1693
|
+
state: se,
|
|
1694
1694
|
stateAttributesMapping: qn,
|
|
1695
|
-
props:
|
|
1695
|
+
props: U
|
|
1696
1696
|
});
|
|
1697
1697
|
});
|
|
1698
1698
|
process.env.NODE_ENV !== "production" && (Jn.displayName = "SelectTrigger");
|
|
@@ -1721,7 +1721,7 @@ var Qn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
|
1721
1721
|
let { store: n } = wn(), r = X(n, $.mounted), i = X(n, $.forceMount);
|
|
1722
1722
|
return r || i ? /*#__PURE__*/ (0, Q.jsx)(Zn.Provider, {
|
|
1723
1723
|
value: !0,
|
|
1724
|
-
children: /*#__PURE__*/ (0, Q.jsx)(
|
|
1724
|
+
children: /*#__PURE__*/ (0, Q.jsx)(E, {
|
|
1725
1725
|
ref: t,
|
|
1726
1726
|
...e
|
|
1727
1727
|
})
|
|
@@ -1734,7 +1734,7 @@ var $n = /*#__PURE__*/ Z.createContext(void 0);
|
|
|
1734
1734
|
process.env.NODE_ENV !== "production" && ($n.displayName = "SelectPositionerContext");
|
|
1735
1735
|
function er() {
|
|
1736
1736
|
let e = Z.useContext($n);
|
|
1737
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
1737
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? U(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
1738
1738
|
return e;
|
|
1739
1739
|
}
|
|
1740
1740
|
//#endregion
|
|
@@ -1748,15 +1748,15 @@ var nr = {
|
|
|
1748
1748
|
overflowX: "hidden",
|
|
1749
1749
|
overflowY: "auto"
|
|
1750
1750
|
}, rr = { position: "fixed" }, ir = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1751
|
-
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: p = !1, disableAnchorTracking: m, alignItemWithTrigger:
|
|
1752
|
-
!
|
|
1753
|
-
|
|
1754
|
-
}, [
|
|
1755
|
-
let
|
|
1751
|
+
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: p = !1, disableAnchorTracking: m, alignItemWithTrigger: g = !0, collisionAvoidance: _ = b, style: v, ...y } = e, { store: S, listRef: ee, labelsRef: C, alignItemWithTriggerActiveRef: w, selectedItemTextRef: te, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = wn(), ne = Tn(), A = X(S, $.open), j = X(S, $.mounted), M = X(S, $.modal), N = X(S, $.value), re = X(S, $.openMethod), ie = X(S, $.positionerElement), ae = X(S, $.triggerElement), oe = X(S, $.isItemEqualToValue), P = X(S, $.transitionStatus), I = Z.useRef(null), L = Z.useRef(null), [R, z] = Z.useState(g), B = j && R && re !== "touch";
|
|
1752
|
+
!j && R !== g && z(g), k(() => {
|
|
1753
|
+
j || ($.scrollUpArrowVisible(S.state) && S.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(S.state) && S.set("scrollDownArrowVisible", !1));
|
|
1754
|
+
}, [S, j]), Z.useImperativeHandle(w, () => B), rn((B || M) && A, re === "touch", ie, ae);
|
|
1755
|
+
let V = h({
|
|
1756
1756
|
anchor: n,
|
|
1757
|
-
floatingRootContext:
|
|
1757
|
+
floatingRootContext: ne,
|
|
1758
1758
|
positionMethod: r,
|
|
1759
|
-
mounted:
|
|
1759
|
+
mounted: j,
|
|
1760
1760
|
side: o,
|
|
1761
1761
|
sideOffset: c,
|
|
1762
1762
|
align: s,
|
|
@@ -1765,71 +1765,71 @@ var nr = {
|
|
|
1765
1765
|
collisionBoundary: u,
|
|
1766
1766
|
collisionPadding: d,
|
|
1767
1767
|
sticky: p,
|
|
1768
|
-
disableAnchorTracking: m ??
|
|
1768
|
+
disableAnchorTracking: m ?? B,
|
|
1769
1769
|
collisionAvoidance: _,
|
|
1770
1770
|
keepMounted: !0
|
|
1771
|
-
}),
|
|
1772
|
-
open:
|
|
1773
|
-
side:
|
|
1774
|
-
align:
|
|
1775
|
-
anchorHidden:
|
|
1771
|
+
}), H = B ? "none" : V.side, U = B ? rr : V.positionerStyles, se = {
|
|
1772
|
+
open: A,
|
|
1773
|
+
side: H,
|
|
1774
|
+
align: V.align,
|
|
1775
|
+
anchorHidden: V.anchorHidden
|
|
1776
1776
|
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
}, [
|
|
1780
|
-
let
|
|
1781
|
-
styles:
|
|
1782
|
-
transitionStatus:
|
|
1777
|
+
k(() => {
|
|
1778
|
+
S.set("popupSide", V.side);
|
|
1779
|
+
}, [S, V.side]);
|
|
1780
|
+
let ce = Me(e, se, {
|
|
1781
|
+
styles: U,
|
|
1782
|
+
transitionStatus: P,
|
|
1783
1783
|
props: y,
|
|
1784
1784
|
refs: [t, J((e) => {
|
|
1785
|
-
|
|
1785
|
+
S.set("positionerElement", e);
|
|
1786
1786
|
})],
|
|
1787
|
-
hidden: !
|
|
1788
|
-
inert: !
|
|
1789
|
-
}),
|
|
1790
|
-
if (e.size === 0 &&
|
|
1791
|
-
let t =
|
|
1792
|
-
if (
|
|
1793
|
-
let n =
|
|
1794
|
-
if (t !== 0 && !
|
|
1795
|
-
let e =
|
|
1796
|
-
|
|
1787
|
+
hidden: !j,
|
|
1788
|
+
inert: !A
|
|
1789
|
+
}), le = Z.useRef(0), ue = J((e) => {
|
|
1790
|
+
if (e.size === 0 && le.current === 0 || T.current.length === 0) return;
|
|
1791
|
+
let t = le.current;
|
|
1792
|
+
if (le.current = e.size, e.size === t) return;
|
|
1793
|
+
let n = x(F);
|
|
1794
|
+
if (t !== 0 && !S.state.multiple && N !== null && An(T.current, N, oe) === -1) {
|
|
1795
|
+
let e = E.current, t = e != null && An(T.current, e, oe) !== -1 ? e : null;
|
|
1796
|
+
O(t, n), t === null && (S.set("selectedIndex", null), te.current = null);
|
|
1797
1797
|
}
|
|
1798
|
-
if (t !== 0 &&
|
|
1799
|
-
let e = (e) => An(
|
|
1800
|
-
(t.length !==
|
|
1798
|
+
if (t !== 0 && S.state.multiple && Array.isArray(N)) {
|
|
1799
|
+
let e = (e) => An(T.current, e, oe) !== -1, t = N.filter((t) => e(t));
|
|
1800
|
+
(t.length !== N.length || t.some((e) => !kn(N, e, oe))) && (O(t, n), t.length === 0 && (S.set("selectedIndex", null), te.current = null));
|
|
1801
1801
|
}
|
|
1802
|
-
if (
|
|
1803
|
-
|
|
1802
|
+
if (A && B) {
|
|
1803
|
+
S.update({
|
|
1804
1804
|
scrollUpArrowVisible: !1,
|
|
1805
1805
|
scrollDownArrowVisible: !1
|
|
1806
1806
|
});
|
|
1807
1807
|
let e = { height: "" };
|
|
1808
|
-
tr(
|
|
1808
|
+
tr(ie, e), tr(D.current, e);
|
|
1809
1809
|
}
|
|
1810
|
-
}),
|
|
1811
|
-
...
|
|
1812
|
-
side:
|
|
1813
|
-
alignItemWithTriggerActive:
|
|
1814
|
-
setControlledAlignItemWithTrigger:
|
|
1815
|
-
scrollUpArrowRef:
|
|
1816
|
-
scrollDownArrowRef:
|
|
1810
|
+
}), de = Z.useMemo(() => ({
|
|
1811
|
+
...V,
|
|
1812
|
+
side: H,
|
|
1813
|
+
alignItemWithTriggerActive: B,
|
|
1814
|
+
setControlledAlignItemWithTrigger: z,
|
|
1815
|
+
scrollUpArrowRef: I,
|
|
1816
|
+
scrollDownArrowRef: L
|
|
1817
1817
|
}), [
|
|
1818
|
-
H,
|
|
1819
|
-
U,
|
|
1820
1818
|
V,
|
|
1821
|
-
|
|
1819
|
+
H,
|
|
1820
|
+
B,
|
|
1821
|
+
z
|
|
1822
1822
|
]);
|
|
1823
1823
|
return /*#__PURE__*/ (0, Q.jsx)(nt, {
|
|
1824
1824
|
elementsRef: ee,
|
|
1825
1825
|
labelsRef: C,
|
|
1826
|
-
onMapChange:
|
|
1826
|
+
onMapChange: ue,
|
|
1827
1827
|
children: /*#__PURE__*/ (0, Q.jsxs)($n.Provider, {
|
|
1828
|
-
value:
|
|
1829
|
-
children: [
|
|
1830
|
-
inert: Gt(!
|
|
1831
|
-
cutout:
|
|
1832
|
-
}),
|
|
1828
|
+
value: de,
|
|
1829
|
+
children: [j && M && /*#__PURE__*/ (0, Q.jsx)(Kt, {
|
|
1830
|
+
inert: Gt(!A),
|
|
1831
|
+
cutout: ae
|
|
1832
|
+
}), ce]
|
|
1833
1833
|
})
|
|
1834
1834
|
});
|
|
1835
1835
|
});
|
|
@@ -1859,25 +1859,25 @@ function lr() {
|
|
|
1859
1859
|
//#endregion
|
|
1860
1860
|
//#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
|
|
1861
1861
|
var ur = {
|
|
1862
|
-
...
|
|
1863
|
-
...
|
|
1862
|
+
...Ie,
|
|
1863
|
+
...ke
|
|
1864
1864
|
}, dr = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1865
|
-
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef:
|
|
1866
|
-
if (!
|
|
1867
|
-
if (
|
|
1865
|
+
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: l, onOpenChangeComplete: u, setOpen: d, valueRef: f, firstItemTextRef: p, selectedItemTextRef: h, multiple: g, handleScrollArrowVisibility: _, scrollHandlerRef: v, listRef: y, highlightItemOnHover: b } = wn(), { side: S, align: ee, alignItemWithTriggerActive: C, isPositioned: w, setControlledAlignItemWithTrigger: te } = er(), E = Wt(!0) != null, D = Tn(), O = oe(), { nonce: ne, disableStyleElements: A } = lr(), j = X(s, $.id), M = X(s, $.open), N = X(s, $.openMethod), re = X(s, $.mounted), ie = X(s, $.popupProps), ae = X(s, $.transitionStatus), P = X(s, $.triggerElement), F = X(s, $.positionerElement), I = X(s, $.listElement), R = Z.useRef(!1), z = Z.useRef(!1), B = Z.useRef({}), V = xe(), H = J((e) => {
|
|
1866
|
+
if (!F || !l.current || !z.current) return;
|
|
1867
|
+
if (R.current || !C) {
|
|
1868
1868
|
_();
|
|
1869
1869
|
return;
|
|
1870
1870
|
}
|
|
1871
|
-
let t =
|
|
1871
|
+
let t = F.style.top === "0px", n = F.style.bottom === "0px";
|
|
1872
1872
|
if (!t && !n) {
|
|
1873
1873
|
_();
|
|
1874
1874
|
return;
|
|
1875
1875
|
}
|
|
1876
|
-
let r = mr(
|
|
1877
|
-
|
|
1876
|
+
let r = mr(F), i = hr(F.getBoundingClientRect().height, "y", r), a = Oe(F), o = T(F), s = o.getComputedStyle(F), 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) => {
|
|
1877
|
+
F.style.height = `${e}px`;
|
|
1878
1878
|
}, x = (t, n) => {
|
|
1879
1879
|
let r = Bn(t, 0, f - i);
|
|
1880
|
-
r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (
|
|
1880
|
+
r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (R.current = !0), _();
|
|
1881
1881
|
}, S = t ? m - p : p, ee = Math.min(i + S, f);
|
|
1882
1882
|
if (h = ee, S <= 1) {
|
|
1883
1883
|
x(S, t ? m : 0);
|
|
@@ -1887,148 +1887,148 @@ var ur = {
|
|
|
1887
1887
|
let t = pr(e), n = y ? t : Bn(g, 0, t);
|
|
1888
1888
|
Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
|
|
1889
1889
|
}
|
|
1890
|
-
(v || h >= f - 1) && (
|
|
1890
|
+
(v || h >= f - 1) && (R.current = !0), _();
|
|
1891
1891
|
});
|
|
1892
|
-
Z.useImperativeHandle(v, () =>
|
|
1893
|
-
open:
|
|
1894
|
-
ref:
|
|
1892
|
+
Z.useImperativeHandle(v, () => H, [H]), c({
|
|
1893
|
+
open: M,
|
|
1894
|
+
ref: l,
|
|
1895
1895
|
onComplete() {
|
|
1896
|
-
|
|
1896
|
+
M && u?.(!0);
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
|
-
let
|
|
1900
|
-
open:
|
|
1901
|
-
transitionStatus:
|
|
1902
|
-
side:
|
|
1899
|
+
let U = {
|
|
1900
|
+
open: M,
|
|
1901
|
+
transitionStatus: ae,
|
|
1902
|
+
side: S,
|
|
1903
1903
|
align: ee
|
|
1904
1904
|
};
|
|
1905
|
-
|
|
1906
|
-
!
|
|
1907
|
-
top:
|
|
1908
|
-
left:
|
|
1909
|
-
right:
|
|
1910
|
-
height:
|
|
1911
|
-
bottom:
|
|
1912
|
-
minHeight:
|
|
1913
|
-
maxHeight:
|
|
1914
|
-
marginTop:
|
|
1915
|
-
marginBottom:
|
|
1905
|
+
k(() => {
|
|
1906
|
+
!F || !l.current || Object.keys(B.current).length || (B.current = {
|
|
1907
|
+
top: F.style.top || "0",
|
|
1908
|
+
left: F.style.left || "0",
|
|
1909
|
+
right: F.style.right,
|
|
1910
|
+
height: F.style.height,
|
|
1911
|
+
bottom: F.style.bottom,
|
|
1912
|
+
minHeight: F.style.minHeight,
|
|
1913
|
+
maxHeight: F.style.maxHeight,
|
|
1914
|
+
marginTop: F.style.marginTop,
|
|
1915
|
+
marginBottom: F.style.marginBottom
|
|
1916
1916
|
});
|
|
1917
|
-
}, [
|
|
1918
|
-
|
|
1917
|
+
}, [l, F]), k(() => {
|
|
1918
|
+
M || C || (z.current = !1, R.current = !1, tr(F, B.current));
|
|
1919
1919
|
}, [
|
|
1920
|
-
|
|
1920
|
+
M,
|
|
1921
1921
|
C,
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
]),
|
|
1925
|
-
let e =
|
|
1926
|
-
if (!
|
|
1922
|
+
F,
|
|
1923
|
+
l
|
|
1924
|
+
]), k(() => {
|
|
1925
|
+
let e = l.current;
|
|
1926
|
+
if (!M || !P || !F || !e || C && !w || s.state.transitionStatus === "ending") return;
|
|
1927
1927
|
if (!C) {
|
|
1928
|
-
|
|
1928
|
+
z.current = !0, V.request(_), e.style.removeProperty("--transform-origin");
|
|
1929
1929
|
return;
|
|
1930
1930
|
}
|
|
1931
1931
|
let t = vr(e);
|
|
1932
1932
|
e.style.removeProperty("--transform-origin");
|
|
1933
1933
|
try {
|
|
1934
|
-
let t =
|
|
1934
|
+
let t = h.current;
|
|
1935
1935
|
t?.isConnected || (t = !$.hasSelectedValue(s.state) && p.current?.isConnected ? p.current : null);
|
|
1936
|
-
let n = f.current, r =
|
|
1936
|
+
let n = f.current, r = T(F), i = r.getComputedStyle(F), a = r.getComputedStyle(e), o = Oe(P), c = mr(P), l = gr(P.getBoundingClientRect(), c), u = gr(F.getBoundingClientRect(), c), d = l.height, g = I || e, v = g.scrollHeight, x = 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, D = o.documentElement.clientWidth, ne = E - l.bottom + d, k, A = O === "rtl" ? l.right - u.width : l.left, j = 0;
|
|
1937
1937
|
if (t && n) {
|
|
1938
1938
|
let e = gr(n.getBoundingClientRect(), c);
|
|
1939
|
-
|
|
1939
|
+
k = gr(t.getBoundingClientRect(), c), A = u.left + (O === "rtl" ? e.right - k.right : e.left - k.left);
|
|
1940
1940
|
let r = e.top - l.top + e.height / 2;
|
|
1941
|
-
|
|
1941
|
+
j = k.top - u.top + k.height / 2 - r;
|
|
1942
1942
|
}
|
|
1943
|
-
let
|
|
1944
|
-
|
|
1945
|
-
let
|
|
1946
|
-
|
|
1947
|
-
let
|
|
1948
|
-
if (
|
|
1949
|
-
|
|
1943
|
+
let M = ne + j + ee + x, N = Math.min(E, M), re = E - S - ee, ie = M - N, ae = D - 5;
|
|
1944
|
+
F.style.left = `${Bn(A, 5, ae - u.width)}px`, F.style.height = `${N}px`, F.style.maxHeight = "none", F.style.marginTop = `${S}px`, F.style.marginBottom = `${ee}px`, e.style.height = "100%";
|
|
1945
|
+
let oe = pr(g), L = ie >= oe - 1;
|
|
1946
|
+
L && (N = Math.min(E, u.height) - (ie - oe));
|
|
1947
|
+
let V = l.top < 20 || l.bottom > E - 20 || Math.ceil(N) + 1 < Math.min(v, C), H = (r.visualViewport?.scale ?? 1) !== 1 && m;
|
|
1948
|
+
if (V || H) {
|
|
1949
|
+
z.current = !0, tr(F, B.current), te(!1);
|
|
1950
1950
|
return;
|
|
1951
1951
|
}
|
|
1952
|
-
let
|
|
1953
|
-
if (
|
|
1954
|
-
let e = Math.max(0, E -
|
|
1955
|
-
|
|
1956
|
-
} else
|
|
1957
|
-
if (
|
|
1958
|
-
let t = u.top, n = u.height, r =
|
|
1952
|
+
let U = Math.max(C, N);
|
|
1953
|
+
if (L) {
|
|
1954
|
+
let e = Math.max(0, E - M);
|
|
1955
|
+
F.style.top = u.height >= re ? "0" : `${e}px`, F.style.height = `${N}px`, g.scrollTop = pr(g);
|
|
1956
|
+
} else F.style.bottom = "0", g.scrollTop = ie;
|
|
1957
|
+
if (k) {
|
|
1958
|
+
let t = u.top, n = u.height, r = k.top + k.height / 2, i = Bn(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
|
|
1959
1959
|
e.style.setProperty("--transform-origin", `50% ${i}%`);
|
|
1960
1960
|
}
|
|
1961
|
-
(
|
|
1961
|
+
(U === E || N >= w) && (R.current = !0), _(), b && s.state.selectedIndex === null && s.state.activeIndex === null && y.current[0] != null && s.set("activeIndex", 0), z.current = !0;
|
|
1962
1962
|
} finally {
|
|
1963
1963
|
t();
|
|
1964
1964
|
}
|
|
1965
1965
|
}, [
|
|
1966
1966
|
s,
|
|
1967
|
-
|
|
1968
|
-
L,
|
|
1967
|
+
M,
|
|
1969
1968
|
F,
|
|
1969
|
+
P,
|
|
1970
1970
|
f,
|
|
1971
1971
|
p,
|
|
1972
|
-
|
|
1973
|
-
|
|
1972
|
+
h,
|
|
1973
|
+
l,
|
|
1974
1974
|
_,
|
|
1975
1975
|
C,
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1976
|
+
te,
|
|
1977
|
+
V,
|
|
1978
|
+
I,
|
|
1979
1979
|
y,
|
|
1980
1980
|
b,
|
|
1981
|
-
|
|
1981
|
+
O,
|
|
1982
1982
|
w
|
|
1983
1983
|
]), Z.useEffect(() => {
|
|
1984
|
-
if (!C || !
|
|
1985
|
-
let e =
|
|
1984
|
+
if (!C || !F || !M) return;
|
|
1985
|
+
let e = T(F);
|
|
1986
1986
|
function t(e) {
|
|
1987
|
-
d(!1,
|
|
1987
|
+
d(!1, x(Ve, e));
|
|
1988
1988
|
}
|
|
1989
|
-
return
|
|
1989
|
+
return we(e, "resize", t);
|
|
1990
1990
|
}, [
|
|
1991
1991
|
d,
|
|
1992
1992
|
C,
|
|
1993
|
-
|
|
1994
|
-
|
|
1993
|
+
F,
|
|
1994
|
+
M
|
|
1995
1995
|
]);
|
|
1996
|
-
let
|
|
1997
|
-
...
|
|
1996
|
+
let se = {
|
|
1997
|
+
...I ? {
|
|
1998
1998
|
role: "presentation",
|
|
1999
1999
|
"aria-orientation": void 0
|
|
2000
2000
|
} : {
|
|
2001
2001
|
role: "listbox",
|
|
2002
2002
|
"aria-multiselectable": g || void 0,
|
|
2003
|
-
id: `${
|
|
2003
|
+
id: `${j}-list`
|
|
2004
2004
|
},
|
|
2005
2005
|
onKeyDown(e) {
|
|
2006
2006
|
E && et.has(e.key) && e.stopPropagation();
|
|
2007
2007
|
},
|
|
2008
2008
|
onScroll(e) {
|
|
2009
|
-
|
|
2009
|
+
I || H(e.currentTarget);
|
|
2010
2010
|
},
|
|
2011
|
-
...C && { style:
|
|
2012
|
-
},
|
|
2013
|
-
ref: [t,
|
|
2014
|
-
state:
|
|
2011
|
+
...C && { style: I ? { height: "100%" } : nr }
|
|
2012
|
+
}, ce = ue("div", e, {
|
|
2013
|
+
ref: [t, l],
|
|
2014
|
+
state: U,
|
|
2015
2015
|
stateAttributesMapping: ur,
|
|
2016
2016
|
props: [
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
{ className: !
|
|
2017
|
+
ie,
|
|
2018
|
+
se,
|
|
2019
|
+
L(ae),
|
|
2020
|
+
{ className: !I && C ? or.className : void 0 },
|
|
2021
2021
|
o
|
|
2022
2022
|
]
|
|
2023
2023
|
});
|
|
2024
|
-
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [!
|
|
2025
|
-
context:
|
|
2024
|
+
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [!A && or.getElement(ne), /*#__PURE__*/ (0, Q.jsx)(Nt, {
|
|
2025
|
+
context: D,
|
|
2026
2026
|
modal: !1,
|
|
2027
|
-
disabled: !
|
|
2028
|
-
openInteractionType:
|
|
2027
|
+
disabled: !re,
|
|
2028
|
+
openInteractionType: N,
|
|
2029
2029
|
returnFocus: a,
|
|
2030
2030
|
restoreFocus: !0,
|
|
2031
|
-
children:
|
|
2031
|
+
children: ce
|
|
2032
2032
|
})] });
|
|
2033
2033
|
});
|
|
2034
2034
|
process.env.NODE_ENV !== "production" && (dr.displayName = "SelectPopup");
|
|
@@ -2040,13 +2040,13 @@ function pr(e) {
|
|
|
2040
2040
|
return Vn(e.scrollHeight, e.clientHeight);
|
|
2041
2041
|
}
|
|
2042
2042
|
function mr(e) {
|
|
2043
|
-
return
|
|
2043
|
+
return u.getScale(e);
|
|
2044
2044
|
}
|
|
2045
2045
|
function hr(e, t, n) {
|
|
2046
2046
|
return e / n[t];
|
|
2047
2047
|
}
|
|
2048
2048
|
function gr(e, t) {
|
|
2049
|
-
return
|
|
2049
|
+
return Te({
|
|
2050
2050
|
x: hr(e.x, "x", t),
|
|
2051
2051
|
y: hr(e.y, "y", t),
|
|
2052
2052
|
width: hr(e.width, "x", t),
|
|
@@ -2074,7 +2074,7 @@ var yr = /*#__PURE__*/ Z.createContext(void 0);
|
|
|
2074
2074
|
process.env.NODE_ENV !== "production" && (yr.displayName = "SelectItemContext");
|
|
2075
2075
|
function br() {
|
|
2076
2076
|
let e = Z.useContext(yr);
|
|
2077
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
2077
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? U(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
|
|
2078
2078
|
return e;
|
|
2079
2079
|
}
|
|
2080
2080
|
//#endregion
|
|
@@ -2084,65 +2084,65 @@ var xr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
|
2084
2084
|
label: o,
|
|
2085
2085
|
textRef: u,
|
|
2086
2086
|
indexGuessBehavior: it.GuessFromOrder
|
|
2087
|
-
}), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef:
|
|
2088
|
-
|
|
2089
|
-
if (!
|
|
2087
|
+
}), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: v, valuesRef: y, multiple: b, selectedItemTextRef: S, disabled: ee, readOnly: C } = wn(), w = X(f, $.isActive, d.index), te = X(f, $.open), T = X(f, $.isSelected, a), E = X(f, $.isSelectedByFocus, d.index), D = X(f, $.isItemEqualToValue), O = d.index, ne = O !== -1, A = Z.useRef(null);
|
|
2088
|
+
k(() => {
|
|
2089
|
+
if (!ne) return;
|
|
2090
2090
|
let e = y.current;
|
|
2091
|
-
return e[
|
|
2092
|
-
delete e[
|
|
2091
|
+
return e[O] = a, () => {
|
|
2092
|
+
delete e[O];
|
|
2093
2093
|
};
|
|
2094
2094
|
}, [
|
|
2095
|
-
|
|
2096
|
-
|
|
2095
|
+
ne,
|
|
2096
|
+
O,
|
|
2097
2097
|
a,
|
|
2098
2098
|
y
|
|
2099
|
-
]),
|
|
2100
|
-
if (!
|
|
2099
|
+
]), k(() => {
|
|
2100
|
+
if (!ne) return;
|
|
2101
2101
|
let e = f.state.value, t = e;
|
|
2102
|
-
b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && On(a, t,
|
|
2102
|
+
b && 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));
|
|
2103
2103
|
}, [
|
|
2104
|
-
|
|
2105
|
-
k,
|
|
2106
|
-
b,
|
|
2104
|
+
ne,
|
|
2107
2105
|
O,
|
|
2106
|
+
b,
|
|
2107
|
+
D,
|
|
2108
2108
|
f,
|
|
2109
2109
|
a,
|
|
2110
|
-
|
|
2110
|
+
S
|
|
2111
2111
|
]);
|
|
2112
|
-
let
|
|
2112
|
+
let j = Z.useRef(null), M = Z.useRef("mouse"), N = Z.useRef(!1), { getButtonProps: re, buttonRef: ie } = B({
|
|
2113
2113
|
disabled: s,
|
|
2114
2114
|
focusableWhenDisabled: !0,
|
|
2115
2115
|
native: c,
|
|
2116
2116
|
composite: !0
|
|
2117
|
-
}),
|
|
2117
|
+
}), ae = {
|
|
2118
2118
|
disabled: s,
|
|
2119
|
-
selected:
|
|
2119
|
+
selected: T,
|
|
2120
2120
|
highlighted: w
|
|
2121
2121
|
};
|
|
2122
|
-
function
|
|
2122
|
+
function oe(e) {
|
|
2123
2123
|
if (ee || C) return;
|
|
2124
2124
|
let t = f.state.value;
|
|
2125
2125
|
if (b) {
|
|
2126
2126
|
let n = Array.isArray(t) ? t : [];
|
|
2127
|
-
h(
|
|
2128
|
-
} else h(a,
|
|
2127
|
+
h(T ? jn(n, a, D) : [...n, a], x(_, e));
|
|
2128
|
+
} else h(a, x(_, e)), m(!1, x(_, e));
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function P() {
|
|
2131
2131
|
g.current.dragY = 0;
|
|
2132
2132
|
}
|
|
2133
|
-
let
|
|
2133
|
+
let F = {
|
|
2134
2134
|
role: "option",
|
|
2135
|
-
"aria-selected":
|
|
2136
|
-
tabIndex:
|
|
2135
|
+
"aria-selected": T,
|
|
2136
|
+
tabIndex: te && w ? 0 : -1,
|
|
2137
2137
|
onKeyDown(e) {
|
|
2138
|
-
|
|
2138
|
+
j.current = e.key, f.set("activeIndex", O), e.key === " " && v.current && e.preventDefault();
|
|
2139
2139
|
},
|
|
2140
2140
|
onClick(e) {
|
|
2141
|
-
let t = e.type === "click" &&
|
|
2142
|
-
|
|
2141
|
+
let t = e.type === "click" && M.current !== "touch", n = e.nativeEvent.pointerType, r = t && Ge(e.nativeEvent) && (n !== void 0 || w), i = t && !r && !N.current;
|
|
2142
|
+
N.current = !1, !(e.type === "keydown" && j.current === null) && (s || e.type === "keydown" && j.current === " " && v.current || i || (j.current = null, oe(e.nativeEvent)));
|
|
2143
2143
|
},
|
|
2144
2144
|
onPointerEnter(e) {
|
|
2145
|
-
|
|
2145
|
+
M.current = e.pointerType;
|
|
2146
2146
|
},
|
|
2147
2147
|
onPointerMove(e) {
|
|
2148
2148
|
if (e.pointerType === "mouse" && e.buttons === 1) {
|
|
@@ -2151,43 +2151,43 @@ var xr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
},
|
|
2153
2153
|
onPointerDown(e) {
|
|
2154
|
-
|
|
2154
|
+
M.current = e.pointerType, N.current = !0, P();
|
|
2155
2155
|
},
|
|
2156
2156
|
onMouseUp() {
|
|
2157
|
-
if (
|
|
2158
|
-
let e = !g.current.allowSelectedMouseUp &&
|
|
2159
|
-
e || t || (
|
|
2157
|
+
if (P(), s || M.current === "touch" || N.current) return;
|
|
2158
|
+
let e = !g.current.allowSelectedMouseUp && T, t = !g.current.allowUnselectedMouseUp && !T;
|
|
2159
|
+
e || t || (N.current = !0, A.current?.click(), N.current = !1);
|
|
2160
2160
|
}
|
|
2161
|
-
},
|
|
2161
|
+
}, I = ue("div", e, {
|
|
2162
2162
|
ref: [
|
|
2163
|
-
|
|
2163
|
+
ie,
|
|
2164
2164
|
t,
|
|
2165
2165
|
d.ref,
|
|
2166
|
-
|
|
2166
|
+
A
|
|
2167
2167
|
],
|
|
2168
|
-
state:
|
|
2168
|
+
state: ae,
|
|
2169
2169
|
props: [
|
|
2170
2170
|
p,
|
|
2171
|
-
|
|
2171
|
+
F,
|
|
2172
2172
|
l,
|
|
2173
|
-
|
|
2173
|
+
re
|
|
2174
2174
|
]
|
|
2175
|
-
}),
|
|
2176
|
-
selected:
|
|
2177
|
-
index:
|
|
2175
|
+
}), L = Z.useMemo(() => ({
|
|
2176
|
+
selected: T,
|
|
2177
|
+
index: O,
|
|
2178
2178
|
textRef: u,
|
|
2179
|
-
selectedByFocus:
|
|
2180
|
-
hasRegistered:
|
|
2179
|
+
selectedByFocus: E,
|
|
2180
|
+
hasRegistered: ne
|
|
2181
2181
|
}), [
|
|
2182
|
-
|
|
2183
|
-
|
|
2182
|
+
T,
|
|
2183
|
+
O,
|
|
2184
2184
|
u,
|
|
2185
|
-
|
|
2186
|
-
|
|
2185
|
+
E,
|
|
2186
|
+
ne
|
|
2187
2187
|
]);
|
|
2188
2188
|
return /*#__PURE__*/ (0, Q.jsx)(yr.Provider, {
|
|
2189
|
-
value:
|
|
2190
|
-
children:
|
|
2189
|
+
value: L,
|
|
2190
|
+
children: I
|
|
2191
2191
|
});
|
|
2192
2192
|
}));
|
|
2193
2193
|
process.env.NODE_ENV !== "production" && (xr.displayName = "SelectItem");
|
|
@@ -2259,7 +2259,7 @@ function Dr({ children: e, value: t, defaultValue: n, onValueChange: r, disabled
|
|
|
2259
2259
|
});
|
|
2260
2260
|
}
|
|
2261
2261
|
Dr.displayName = "Select";
|
|
2262
|
-
var Or =
|
|
2262
|
+
var Or = Ye([
|
|
2263
2263
|
"group inline-flex items-center justify-between gap-2 outline-none cursor-pointer",
|
|
2264
2264
|
"text-[13px] h-9 px-3 min-w-[160px]",
|
|
2265
2265
|
"transition-all duration-80",
|
|
@@ -2272,13 +2272,13 @@ var Or = Xe([
|
|
|
2272
2272
|
} },
|
|
2273
2273
|
defaultVariants: { variant: "bordered" }
|
|
2274
2274
|
}), kr = (0, Z.forwardRef)(({ className: e, variant: t, icon: n, leading: r, placeholder: i = "Select…", error: a, ...o }, s) => {
|
|
2275
|
-
let c =
|
|
2275
|
+
let c = y();
|
|
2276
2276
|
return /* @__PURE__ */ (0, Q.jsxs)("div", {
|
|
2277
2277
|
className: "flex flex-col gap-1",
|
|
2278
2278
|
children: [/* @__PURE__ */ (0, Q.jsxs)(Jn, {
|
|
2279
2279
|
ref: s,
|
|
2280
2280
|
"aria-invalid": !!a || void 0,
|
|
2281
|
-
className:
|
|
2281
|
+
className: O(Or({ variant: t }), c.input, a && "border-destructive/50 hover:border-destructive/50", e),
|
|
2282
2282
|
...o,
|
|
2283
2283
|
children: [/* @__PURE__ */ (0, Q.jsxs)("span", {
|
|
2284
2284
|
className: "flex items-center gap-2 min-w-0 flex-1",
|
|
@@ -2314,10 +2314,10 @@ var Or = Xe([
|
|
|
2314
2314
|
});
|
|
2315
2315
|
kr.displayName = "SelectTrigger";
|
|
2316
2316
|
var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
2317
|
-
let { open: r, value: i, actionsRef: a } = wr(), o =
|
|
2317
|
+
let { open: r, value: i, actionsRef: a } = wr(), o = y(), 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);
|
|
2318
2318
|
(0, Z.useEffect)(() => {
|
|
2319
2319
|
if (r) return;
|
|
2320
|
-
let e = setTimeout(() => a.current?.unmount(),
|
|
2320
|
+
let e = setTimeout(() => a.current?.unmount(), De(Le.fast));
|
|
2321
2321
|
return () => clearTimeout(e);
|
|
2322
2322
|
}, [r, a]), (0, Z.useEffect)(() => {
|
|
2323
2323
|
if (!r) return;
|
|
@@ -2339,7 +2339,7 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2339
2339
|
m,
|
|
2340
2340
|
i
|
|
2341
2341
|
]);
|
|
2342
|
-
let
|
|
2342
|
+
let b = c === null ? null : u[c], x = _ == null ? null : u[_], S = h === null ? null : u[h], ee = c !== null && c !== _, C = (0, Z.useMemo)(() => ({
|
|
2343
2343
|
registerItem: p,
|
|
2344
2344
|
activeIndex: c,
|
|
2345
2345
|
checkedIndex: _
|
|
@@ -2354,7 +2354,7 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2354
2354
|
sideOffset: 6,
|
|
2355
2355
|
alignItemWithTrigger: !1,
|
|
2356
2356
|
className: "z-50 outline-none",
|
|
2357
|
-
children: /* @__PURE__ */ (0, Q.jsx)(
|
|
2357
|
+
children: /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2358
2358
|
initial: {
|
|
2359
2359
|
opacity: 0,
|
|
2360
2360
|
y: -4,
|
|
@@ -2369,7 +2369,7 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2369
2369
|
y: -4,
|
|
2370
2370
|
scaleY: .96
|
|
2371
2371
|
},
|
|
2372
|
-
transition: r ?
|
|
2372
|
+
transition: r ? Le.fast : Le.fast.exit,
|
|
2373
2373
|
style: { transformOrigin: "top center" },
|
|
2374
2374
|
onAnimationComplete: () => {
|
|
2375
2375
|
r || a.current?.unmount();
|
|
@@ -2399,9 +2399,9 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2399
2399
|
onBlur: (e) => {
|
|
2400
2400
|
s.current?.contains(e.relatedTarget) || (g(null), l(null));
|
|
2401
2401
|
},
|
|
2402
|
-
className:
|
|
2402
|
+
className: O(`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),
|
|
2403
2403
|
children: [
|
|
2404
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: x && /* @__PURE__ */ (0, Q.jsx)(
|
|
2404
|
+
/* @__PURE__ */ (0, Q.jsx)(rt, { children: x && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2405
2405
|
className: `absolute ${o.bg} bg-active pointer-events-none`,
|
|
2406
2406
|
initial: !1,
|
|
2407
2407
|
animate: {
|
|
@@ -2413,39 +2413,39 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2413
2413
|
},
|
|
2414
2414
|
exit: {
|
|
2415
2415
|
opacity: 0,
|
|
2416
|
-
transition:
|
|
2416
|
+
transition: Le.moderate.exit
|
|
2417
2417
|
},
|
|
2418
2418
|
transition: {
|
|
2419
|
-
...
|
|
2419
|
+
...Le.moderate,
|
|
2420
2420
|
opacity: { duration: .08 }
|
|
2421
2421
|
}
|
|
2422
2422
|
}) }),
|
|
2423
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children:
|
|
2423
|
+
/* @__PURE__ */ (0, Q.jsx)(rt, { children: b && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2424
2424
|
className: `absolute ${o.bg} bg-hover pointer-events-none`,
|
|
2425
2425
|
initial: {
|
|
2426
2426
|
opacity: 0,
|
|
2427
|
-
top: x?.top ??
|
|
2428
|
-
left: x?.left ??
|
|
2429
|
-
width: x?.width ??
|
|
2430
|
-
height: x?.height ??
|
|
2427
|
+
top: x?.top ?? b.top,
|
|
2428
|
+
left: x?.left ?? b.left,
|
|
2429
|
+
width: x?.width ?? b.width,
|
|
2430
|
+
height: x?.height ?? b.height
|
|
2431
2431
|
},
|
|
2432
2432
|
animate: {
|
|
2433
2433
|
opacity: 1,
|
|
2434
|
-
top:
|
|
2435
|
-
left:
|
|
2436
|
-
width:
|
|
2437
|
-
height:
|
|
2434
|
+
top: b.top,
|
|
2435
|
+
left: b.left,
|
|
2436
|
+
width: b.width,
|
|
2437
|
+
height: b.height
|
|
2438
2438
|
},
|
|
2439
2439
|
exit: {
|
|
2440
2440
|
opacity: 0,
|
|
2441
|
-
transition:
|
|
2441
|
+
transition: Le.fast.exit
|
|
2442
2442
|
},
|
|
2443
2443
|
transition: {
|
|
2444
|
-
...
|
|
2444
|
+
...Le.fast,
|
|
2445
2445
|
opacity: { duration: .08 }
|
|
2446
2446
|
}
|
|
2447
2447
|
}, d.current) }),
|
|
2448
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: S && /* @__PURE__ */ (0, Q.jsx)(
|
|
2448
|
+
/* @__PURE__ */ (0, Q.jsx)(rt, { children: S && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2449
2449
|
className: `absolute ${o.focusRing} pointer-events-none z-20 border border-[color:var(--focus-ring,#6B97FF)]`,
|
|
2450
2450
|
initial: !1,
|
|
2451
2451
|
animate: {
|
|
@@ -2456,10 +2456,10 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2456
2456
|
},
|
|
2457
2457
|
exit: {
|
|
2458
2458
|
opacity: 0,
|
|
2459
|
-
transition:
|
|
2459
|
+
transition: Le.fast.exit
|
|
2460
2460
|
},
|
|
2461
2461
|
transition: {
|
|
2462
|
-
...
|
|
2462
|
+
...Le.fast,
|
|
2463
2463
|
opacity: { duration: .08 }
|
|
2464
2464
|
}
|
|
2465
2465
|
}) }),
|
|
@@ -2472,7 +2472,7 @@ var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
Ar.displayName = "SelectContent";
|
|
2474
2474
|
var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, index: i, disabled: a = !1, ...o }, s) => {
|
|
2475
|
-
let c = wr(), l = (0, Z.useContext)(Tr), u = (0, Z.useRef)(null), d =
|
|
2475
|
+
let c = wr(), l = (0, Z.useContext)(Tr), u = (0, Z.useRef)(null), d = y(), f = (0, Z.useRef)(!1);
|
|
2476
2476
|
(0, Z.useEffect)(() => {
|
|
2477
2477
|
f.current = !0;
|
|
2478
2478
|
}, []), (0, Z.useEffect)(() => (l?.registerItem(i, u.current), () => l?.registerItem(i, null)), [i, l]);
|
|
@@ -2487,7 +2487,7 @@ var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, inde
|
|
|
2487
2487
|
},
|
|
2488
2488
|
"data-proximity-index": i,
|
|
2489
2489
|
"data-value": r,
|
|
2490
|
-
className:
|
|
2490
|
+
className: O(`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),
|
|
2491
2491
|
...o
|
|
2492
2492
|
}),
|
|
2493
2493
|
children: [
|
|
@@ -2500,7 +2500,7 @@ var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, inde
|
|
|
2500
2500
|
render: /* @__PURE__ */ (0, Q.jsx)("span", { className: "flex-1 min-w-0 truncate [text-box:trim-both_cap_alphabetic] py-1 -my-1" }),
|
|
2501
2501
|
children: t
|
|
2502
2502
|
}),
|
|
2503
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: m && /* @__PURE__ */ (0, Q.jsx)(
|
|
2503
|
+
/* @__PURE__ */ (0, Q.jsx)(rt, { children: m && /* @__PURE__ */ (0, Q.jsx)(W.svg, {
|
|
2504
2504
|
width: 16,
|
|
2505
2505
|
height: 16,
|
|
2506
2506
|
viewBox: "0 0 24 24",
|
|
@@ -2513,7 +2513,7 @@ var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, inde
|
|
|
2513
2513
|
initial: { opacity: 1 },
|
|
2514
2514
|
animate: { opacity: 1 },
|
|
2515
2515
|
exit: { opacity: 1 },
|
|
2516
|
-
children: /* @__PURE__ */ (0, Q.jsx)(
|
|
2516
|
+
children: /* @__PURE__ */ (0, Q.jsx)(W.path, {
|
|
2517
2517
|
d: "M4 12L9 17L20 6",
|
|
2518
2518
|
initial: { pathLength: +!!h },
|
|
2519
2519
|
animate: {
|
|
@@ -2547,14 +2547,14 @@ function Mr({ children: e, className: t, ...n }) {
|
|
|
2547
2547
|
Mr.displayName = "SelectGroup";
|
|
2548
2548
|
var Nr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2549
2549
|
ref: n,
|
|
2550
|
-
className:
|
|
2550
|
+
className: O("px-2 py-1.5 text-[11px] text-muted-foreground", e),
|
|
2551
2551
|
...t
|
|
2552
2552
|
}));
|
|
2553
2553
|
Nr.displayName = "SelectLabel";
|
|
2554
2554
|
var Pr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2555
2555
|
ref: n,
|
|
2556
2556
|
role: "separator",
|
|
2557
|
-
className:
|
|
2557
|
+
className: O("my-1 -mx-1 h-px bg-border/60", e),
|
|
2558
2558
|
...t
|
|
2559
2559
|
}));
|
|
2560
2560
|
Pr.displayName = "SelectSeparator";
|