@clubmed/trident-ui 2.0.0-beta.22 → 2.0.0-beta.23
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/chunks/Tooltip.js +4461 -0
- package/chunks/Tooltip.js.map +1 -0
- package/examples/scrollbar-demo.d.ts +1 -0
- package/examples/scrollbar-demo.js +23 -0
- package/examples/scrollbar-demo.js.map +1 -0
- package/examples/tooltip-demo.d.ts +1 -0
- package/examples/tooltip-demo.js +103 -0
- package/examples/tooltip-demo.js.map +1 -0
- package/package.json +2 -1
- package/styles/components.css +72 -0
- package/ui/Scrollbar.d.ts +14 -0
- package/ui/Scrollbar.js +39 -0
- package/ui/Scrollbar.js.map +1 -0
- package/ui/Tooltip.d.ts +8 -0
- package/ui/Tooltip.js +2 -0
- package/ui/forms/TextField.js +1 -1
- package/ui/forms/TextField.js.map +1 -1
|
@@ -0,0 +1,4461 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as e, t } from "./chunk.js";
|
|
3
|
+
import { t as n } from "./clsx.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { createElement as i, useLayoutEffect as a } from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import * as c from "react-dom";
|
|
8
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useRefWithInit.js
|
|
9
|
+
var l = {};
|
|
10
|
+
function u(e, t) {
|
|
11
|
+
let n = r.useRef(l);
|
|
12
|
+
return n.current === l && (n.current = e(t)), n;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/fastHooks.js
|
|
16
|
+
var d = [], f = void 0;
|
|
17
|
+
function p() {
|
|
18
|
+
return f;
|
|
19
|
+
}
|
|
20
|
+
function m(e) {
|
|
21
|
+
d.push(e);
|
|
22
|
+
}
|
|
23
|
+
function h(e) {
|
|
24
|
+
let t = (t, n) => {
|
|
25
|
+
let r = u(_).current, i;
|
|
26
|
+
try {
|
|
27
|
+
f = r;
|
|
28
|
+
for (let e of d) e.before(r);
|
|
29
|
+
i = e(t, n);
|
|
30
|
+
for (let e of d) e.after(r);
|
|
31
|
+
r.didInitialize = !0;
|
|
32
|
+
} finally {
|
|
33
|
+
f = void 0;
|
|
34
|
+
}
|
|
35
|
+
return i;
|
|
36
|
+
};
|
|
37
|
+
return t.displayName = e.displayName || e.name, t;
|
|
38
|
+
}
|
|
39
|
+
function g(e) {
|
|
40
|
+
return /* @__PURE__ */ r.forwardRef(h(e));
|
|
41
|
+
}
|
|
42
|
+
function _() {
|
|
43
|
+
return { didInitialize: !1 };
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useOnFirstRender.js
|
|
47
|
+
function v(e) {
|
|
48
|
+
let t = r.useRef(!0);
|
|
49
|
+
t.current && (t.current = !1, e());
|
|
50
|
+
}
|
|
51
|
+
var y = typeof document < "u" ? r.useLayoutEffect : () => {};
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/formatErrorMessage.js
|
|
54
|
+
function b(e, t) {
|
|
55
|
+
return function(n, ...r) {
|
|
56
|
+
let i = new URL(e);
|
|
57
|
+
return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
var x = b("https://base-ui.com/production-error", "Base UI"), S = /* @__PURE__ */ r.createContext(void 0);
|
|
61
|
+
process.env.NODE_ENV !== "production" && (S.displayName = "TooltipRootContext");
|
|
62
|
+
function C(e) {
|
|
63
|
+
let t = r.useContext(S);
|
|
64
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? x(72) : "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useOnMount.js
|
|
69
|
+
var w = [];
|
|
70
|
+
function T(e) {
|
|
71
|
+
r.useEffect(e, w);
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useTimeout.js
|
|
75
|
+
var E = 0, D = class e {
|
|
76
|
+
static create() {
|
|
77
|
+
return new e();
|
|
78
|
+
}
|
|
79
|
+
currentId = E;
|
|
80
|
+
start(e, t) {
|
|
81
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
82
|
+
this.currentId = E, t();
|
|
83
|
+
}, e);
|
|
84
|
+
}
|
|
85
|
+
isStarted() {
|
|
86
|
+
return this.currentId !== E;
|
|
87
|
+
}
|
|
88
|
+
clear = () => {
|
|
89
|
+
this.currentId !== E && (clearTimeout(this.currentId), this.currentId = E);
|
|
90
|
+
};
|
|
91
|
+
disposeEffect = () => this.clear;
|
|
92
|
+
};
|
|
93
|
+
function O() {
|
|
94
|
+
let e = u(D.create).current;
|
|
95
|
+
return T(e.disposeEffect), e;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/detectBrowser.js
|
|
99
|
+
var k = typeof navigator < "u", A = I(), j = te(), M = ee();
|
|
100
|
+
typeof CSS > "u" || !CSS.supports || CSS.supports("-webkit-backdrop-filter:none"), A.platform === "MacIntel" && A.maxTouchPoints > 1 || /iP(hone|ad|od)|iOS/.test(A.platform), k && /firefox/i.test(M);
|
|
101
|
+
var N = k && /apple/i.test(navigator.vendor);
|
|
102
|
+
k && /Edg/i.test(M), k && /android/i.test(j) || /android/i.test(M);
|
|
103
|
+
var P = k && j.toLowerCase().startsWith("mac") && !navigator.maxTouchPoints, F = M.includes("jsdom/");
|
|
104
|
+
function I() {
|
|
105
|
+
if (!k) return {
|
|
106
|
+
platform: "",
|
|
107
|
+
maxTouchPoints: -1
|
|
108
|
+
};
|
|
109
|
+
let e = navigator.userAgentData;
|
|
110
|
+
return e?.platform ? {
|
|
111
|
+
platform: e.platform,
|
|
112
|
+
maxTouchPoints: navigator.maxTouchPoints
|
|
113
|
+
} : {
|
|
114
|
+
platform: navigator.platform ?? "",
|
|
115
|
+
maxTouchPoints: navigator.maxTouchPoints ?? -1
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function ee() {
|
|
119
|
+
if (!k) return "";
|
|
120
|
+
let e = navigator.userAgentData;
|
|
121
|
+
return e && Array.isArray(e.brands) ? e.brands.map(({ brand: e, version: t }) => `${e}/${t}`).join(" ") : navigator.userAgent;
|
|
122
|
+
}
|
|
123
|
+
function te() {
|
|
124
|
+
if (!k) return "";
|
|
125
|
+
let e = navigator.userAgentData;
|
|
126
|
+
return e?.platform ? e.platform : navigator.platform ?? "";
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
|
|
130
|
+
function ne(e) {
|
|
131
|
+
return "nativeEvent" in e;
|
|
132
|
+
}
|
|
133
|
+
function re(e, t) {
|
|
134
|
+
let n = ["mouse", "pen"];
|
|
135
|
+
return t || n.push("", void 0), n.includes(e);
|
|
136
|
+
}
|
|
137
|
+
function ie(e) {
|
|
138
|
+
let t = e.type;
|
|
139
|
+
return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverShared.js
|
|
143
|
+
function L(e, t) {
|
|
144
|
+
return t != null && !re(t) ? 0 : typeof e == "function" ? e() : e;
|
|
145
|
+
}
|
|
146
|
+
function ae(e, t, n) {
|
|
147
|
+
let r = L(e, n);
|
|
148
|
+
return typeof r == "number" ? r : r?.[t];
|
|
149
|
+
}
|
|
150
|
+
function oe(e) {
|
|
151
|
+
return typeof e == "function" ? e() : e;
|
|
152
|
+
}
|
|
153
|
+
function se(e, t) {
|
|
154
|
+
return t || e === "click" || e === "mousedown";
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/empty.js
|
|
158
|
+
function ce() {}
|
|
159
|
+
Object.freeze([]);
|
|
160
|
+
var R = Object.freeze({}), le = { style: { transition: "none" } }, ue = { fallbackAxisSide: "end" }, de = {
|
|
161
|
+
clipPath: "inset(50%)",
|
|
162
|
+
position: "fixed",
|
|
163
|
+
top: 0,
|
|
164
|
+
left: 0
|
|
165
|
+
}, fe = "none", pe = "trigger-press", me = "trigger-hover", he = "trigger-focus", ge = "outside-press", _e = "escape-key", ve = "disabled", ye = "imperative-action";
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js
|
|
168
|
+
function z(e, t, n, r) {
|
|
169
|
+
let i = !1, a = !1, o = r ?? R;
|
|
170
|
+
return {
|
|
171
|
+
reason: e,
|
|
172
|
+
event: t ?? new Event("base-ui"),
|
|
173
|
+
cancel() {
|
|
174
|
+
i = !0;
|
|
175
|
+
},
|
|
176
|
+
allowPropagation() {
|
|
177
|
+
a = !0;
|
|
178
|
+
},
|
|
179
|
+
get isCanceled() {
|
|
180
|
+
return i;
|
|
181
|
+
},
|
|
182
|
+
get isPropagationAllowed() {
|
|
183
|
+
return a;
|
|
184
|
+
},
|
|
185
|
+
trigger: n,
|
|
186
|
+
...o
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingDelayGroup.js
|
|
191
|
+
var be = /* @__PURE__ */ r.createContext({
|
|
192
|
+
hasProvider: !1,
|
|
193
|
+
timeoutMs: 0,
|
|
194
|
+
delayRef: { current: 0 },
|
|
195
|
+
initialDelayRef: { current: 0 },
|
|
196
|
+
timeout: new D(),
|
|
197
|
+
currentIdRef: { current: null },
|
|
198
|
+
currentContextRef: { current: null }
|
|
199
|
+
});
|
|
200
|
+
process.env.NODE_ENV !== "production" && (be.displayName = "FloatingDelayGroupContext");
|
|
201
|
+
function xe(e) {
|
|
202
|
+
let { children: t, delay: n, timeoutMs: i = 0 } = e, a = r.useRef(n), s = r.useRef(n), c = r.useRef(null), l = r.useRef(null), u = O();
|
|
203
|
+
return /* @__PURE__ */ o(be.Provider, {
|
|
204
|
+
value: r.useMemo(() => ({
|
|
205
|
+
hasProvider: !0,
|
|
206
|
+
delayRef: a,
|
|
207
|
+
initialDelayRef: s,
|
|
208
|
+
currentIdRef: c,
|
|
209
|
+
timeoutMs: i,
|
|
210
|
+
currentContextRef: l,
|
|
211
|
+
timeout: u
|
|
212
|
+
}), [i, u]),
|
|
213
|
+
children: t
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function Se(e, t = { open: !1 }) {
|
|
217
|
+
let n = "rootStore" in e ? e.rootStore : e, i = n.useState("floatingId"), { open: a } = t, { currentIdRef: o, delayRef: s, timeoutMs: c, initialDelayRef: l, currentContextRef: u, hasProvider: d, timeout: f } = r.useContext(be), [p, m] = r.useState(!1);
|
|
218
|
+
return y(() => {
|
|
219
|
+
function e() {
|
|
220
|
+
m(!1), u.current?.setIsInstantPhase(!1), o.current = null, u.current = null, s.current = l.current;
|
|
221
|
+
}
|
|
222
|
+
if (o.current && !a && o.current === i) {
|
|
223
|
+
if (m(!1), c) {
|
|
224
|
+
let t = i;
|
|
225
|
+
return f.start(c, () => {
|
|
226
|
+
n.select("open") || o.current && o.current !== t || e();
|
|
227
|
+
}), () => {
|
|
228
|
+
f.clear();
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
e();
|
|
232
|
+
}
|
|
233
|
+
}, [
|
|
234
|
+
a,
|
|
235
|
+
i,
|
|
236
|
+
o,
|
|
237
|
+
s,
|
|
238
|
+
c,
|
|
239
|
+
l,
|
|
240
|
+
u,
|
|
241
|
+
f,
|
|
242
|
+
n
|
|
243
|
+
]), y(() => {
|
|
244
|
+
if (!a) return;
|
|
245
|
+
let e = u.current, t = o.current;
|
|
246
|
+
f.clear(), u.current = {
|
|
247
|
+
onOpenChange: n.setOpen,
|
|
248
|
+
setIsInstantPhase: m
|
|
249
|
+
}, o.current = i, s.current = {
|
|
250
|
+
open: 0,
|
|
251
|
+
close: ae(l.current, "close")
|
|
252
|
+
}, t !== null && t !== i ? (m(!0), e?.setIsInstantPhase(!0), e?.onOpenChange(!1, z(fe))) : (m(!1), e?.setIsInstantPhase(!1));
|
|
253
|
+
}, [
|
|
254
|
+
a,
|
|
255
|
+
i,
|
|
256
|
+
n,
|
|
257
|
+
o,
|
|
258
|
+
s,
|
|
259
|
+
c,
|
|
260
|
+
l,
|
|
261
|
+
u,
|
|
262
|
+
f
|
|
263
|
+
]), y(() => () => {
|
|
264
|
+
u.current = null;
|
|
265
|
+
}, [u]), r.useMemo(() => ({
|
|
266
|
+
hasProvider: d,
|
|
267
|
+
delayRef: s,
|
|
268
|
+
isInstantPhase: p
|
|
269
|
+
}), [
|
|
270
|
+
d,
|
|
271
|
+
s,
|
|
272
|
+
p
|
|
273
|
+
]);
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
277
|
+
function Ce() {
|
|
278
|
+
return typeof window < "u";
|
|
279
|
+
}
|
|
280
|
+
function B(e) {
|
|
281
|
+
return we(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
282
|
+
}
|
|
283
|
+
function V(e) {
|
|
284
|
+
var t;
|
|
285
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
286
|
+
}
|
|
287
|
+
function H(e) {
|
|
288
|
+
return ((we(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
289
|
+
}
|
|
290
|
+
function we(e) {
|
|
291
|
+
return Ce() ? e instanceof Node || e instanceof V(e).Node : !1;
|
|
292
|
+
}
|
|
293
|
+
function U(e) {
|
|
294
|
+
return Ce() ? e instanceof Element || e instanceof V(e).Element : !1;
|
|
295
|
+
}
|
|
296
|
+
function W(e) {
|
|
297
|
+
return Ce() ? e instanceof HTMLElement || e instanceof V(e).HTMLElement : !1;
|
|
298
|
+
}
|
|
299
|
+
function Te(e) {
|
|
300
|
+
return !Ce() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof V(e).ShadowRoot;
|
|
301
|
+
}
|
|
302
|
+
function Ee(e) {
|
|
303
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = G(e);
|
|
304
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
305
|
+
}
|
|
306
|
+
function De(e) {
|
|
307
|
+
return /^(table|td|th)$/.test(B(e));
|
|
308
|
+
}
|
|
309
|
+
function Oe(e) {
|
|
310
|
+
try {
|
|
311
|
+
if (e.matches(":popover-open")) return !0;
|
|
312
|
+
} catch {}
|
|
313
|
+
try {
|
|
314
|
+
return e.matches(":modal");
|
|
315
|
+
} catch {
|
|
316
|
+
return !1;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
var ke = /transform|translate|scale|rotate|perspective|filter/, Ae = /paint|layout|strict|content/, je = (e) => !!e && e !== "none", Me;
|
|
320
|
+
function Ne(e) {
|
|
321
|
+
let t = U(e) ? G(e) : e;
|
|
322
|
+
return je(t.transform) || je(t.translate) || je(t.scale) || je(t.rotate) || je(t.perspective) || !Fe() && (je(t.backdropFilter) || je(t.filter)) || ke.test(t.willChange || "") || Ae.test(t.contain || "");
|
|
323
|
+
}
|
|
324
|
+
function Pe(e) {
|
|
325
|
+
let t = Re(e);
|
|
326
|
+
for (; W(t) && !Ie(t);) {
|
|
327
|
+
if (Ne(t)) return t;
|
|
328
|
+
if (Oe(t)) return null;
|
|
329
|
+
t = Re(t);
|
|
330
|
+
}
|
|
331
|
+
return null;
|
|
332
|
+
}
|
|
333
|
+
function Fe() {
|
|
334
|
+
return Me ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Me;
|
|
335
|
+
}
|
|
336
|
+
function Ie(e) {
|
|
337
|
+
return /^(html|body|#document)$/.test(B(e));
|
|
338
|
+
}
|
|
339
|
+
function G(e) {
|
|
340
|
+
return V(e).getComputedStyle(e);
|
|
341
|
+
}
|
|
342
|
+
function Le(e) {
|
|
343
|
+
return U(e) ? {
|
|
344
|
+
scrollLeft: e.scrollLeft,
|
|
345
|
+
scrollTop: e.scrollTop
|
|
346
|
+
} : {
|
|
347
|
+
scrollLeft: e.scrollX,
|
|
348
|
+
scrollTop: e.scrollY
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function Re(e) {
|
|
352
|
+
if (B(e) === "html") return e;
|
|
353
|
+
let t = e.assignedSlot || e.parentNode || Te(e) && e.host || H(e);
|
|
354
|
+
return Te(t) ? t.host : t;
|
|
355
|
+
}
|
|
356
|
+
function ze(e) {
|
|
357
|
+
let t = Re(e);
|
|
358
|
+
return Ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && Ee(t) ? t : ze(t);
|
|
359
|
+
}
|
|
360
|
+
function Be(e, t, n) {
|
|
361
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
362
|
+
let r = ze(e), i = r === e.ownerDocument?.body, a = V(r);
|
|
363
|
+
if (i) {
|
|
364
|
+
let e = Ve(a);
|
|
365
|
+
return t.concat(a, a.visualViewport || [], Ee(r) ? r : [], e && n ? Be(e) : []);
|
|
366
|
+
} else return t.concat(r, Be(r, [], n));
|
|
367
|
+
}
|
|
368
|
+
function Ve(e) {
|
|
369
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
370
|
+
}
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/addEventListener.js
|
|
373
|
+
function K(e, t, n, r) {
|
|
374
|
+
return e.addEventListener(t, n, r), () => {
|
|
375
|
+
e.removeEventListener(t, n, r);
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/mergeCleanups.js
|
|
380
|
+
function He(...e) {
|
|
381
|
+
return () => {
|
|
382
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
383
|
+
let n = e[t];
|
|
384
|
+
n && n();
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
390
|
+
function Ue(e, t, n, r) {
|
|
391
|
+
let i = u(Ge).current;
|
|
392
|
+
return Ke(i, e, t, n, r) && Je(i, [
|
|
393
|
+
e,
|
|
394
|
+
t,
|
|
395
|
+
n,
|
|
396
|
+
r
|
|
397
|
+
]), i.callback;
|
|
398
|
+
}
|
|
399
|
+
function We(e) {
|
|
400
|
+
let t = u(Ge).current;
|
|
401
|
+
return qe(t, e) && Je(t, e), t.callback;
|
|
402
|
+
}
|
|
403
|
+
function Ge() {
|
|
404
|
+
return {
|
|
405
|
+
callback: null,
|
|
406
|
+
cleanup: null,
|
|
407
|
+
refs: []
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function Ke(e, t, n, r, i) {
|
|
411
|
+
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
|
|
412
|
+
}
|
|
413
|
+
function qe(e, t) {
|
|
414
|
+
return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
|
|
415
|
+
}
|
|
416
|
+
function Je(e, t) {
|
|
417
|
+
if (e.refs = t, t.every((e) => e == null)) {
|
|
418
|
+
e.callback = null;
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
e.callback = (n) => {
|
|
422
|
+
if (e.cleanup &&= (e.cleanup(), null), n != null) {
|
|
423
|
+
let r = Array(t.length).fill(null);
|
|
424
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
425
|
+
let i = t[e];
|
|
426
|
+
if (i != null) switch (typeof i) {
|
|
427
|
+
case "function": {
|
|
428
|
+
let t = i(n);
|
|
429
|
+
typeof t == "function" && (r[e] = t);
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
case "object":
|
|
433
|
+
i.current = n;
|
|
434
|
+
break;
|
|
435
|
+
default:
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
e.cleanup = () => {
|
|
439
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
440
|
+
let n = t[e];
|
|
441
|
+
if (n != null) switch (typeof n) {
|
|
442
|
+
case "function": {
|
|
443
|
+
let t = r[e];
|
|
444
|
+
typeof t == "function" ? t() : n(null);
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
case "object":
|
|
448
|
+
n.current = null;
|
|
449
|
+
break;
|
|
450
|
+
default:
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useValueAsRef.js
|
|
459
|
+
function Ye(e) {
|
|
460
|
+
let t = u(Xe, e).current;
|
|
461
|
+
return t.next = e, y(t.effect), t;
|
|
462
|
+
}
|
|
463
|
+
function Xe(e) {
|
|
464
|
+
let t = {
|
|
465
|
+
current: e,
|
|
466
|
+
next: e,
|
|
467
|
+
effect: () => {
|
|
468
|
+
t.current = t.next;
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
return t;
|
|
472
|
+
}
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useStableCallback.js
|
|
475
|
+
var Ze = r[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], Qe = Ze && Ze !== r.useLayoutEffect ? Ze : (e) => e();
|
|
476
|
+
function q(e) {
|
|
477
|
+
let t = u($e).current;
|
|
478
|
+
return t.next = e, Qe(t.effect), t.trampoline;
|
|
479
|
+
}
|
|
480
|
+
function $e() {
|
|
481
|
+
let e = {
|
|
482
|
+
next: void 0,
|
|
483
|
+
callback: et,
|
|
484
|
+
trampoline: (...t) => e.callback?.(...t),
|
|
485
|
+
effect: () => {
|
|
486
|
+
e.callback = e.next;
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
return e;
|
|
490
|
+
}
|
|
491
|
+
function et() {
|
|
492
|
+
if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
|
|
493
|
+
}
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/useAnimationFrame.js
|
|
496
|
+
var tt = null, nt = globalThis.requestAnimationFrame, rt = new class {
|
|
497
|
+
callbacks = [];
|
|
498
|
+
callbacksCount = 0;
|
|
499
|
+
nextId = 1;
|
|
500
|
+
startId = 1;
|
|
501
|
+
isScheduled = !1;
|
|
502
|
+
tick = (e) => {
|
|
503
|
+
this.isScheduled = !1;
|
|
504
|
+
let t = this.callbacks, n = this.callbacksCount;
|
|
505
|
+
if (this.callbacks = [], this.callbacksCount = 0, this.startId = this.nextId, n > 0) for (let n = 0; n < t.length; n += 1) t[n]?.(e);
|
|
506
|
+
};
|
|
507
|
+
request(e) {
|
|
508
|
+
let t = this.nextId;
|
|
509
|
+
this.nextId += 1, this.callbacks.push(e), this.callbacksCount += 1;
|
|
510
|
+
let n = process.env.NODE_ENV !== "production" && nt !== requestAnimationFrame && (nt = requestAnimationFrame, !0);
|
|
511
|
+
return (!this.isScheduled || n) && (requestAnimationFrame(this.tick), this.isScheduled = !0), t;
|
|
512
|
+
}
|
|
513
|
+
cancel(e) {
|
|
514
|
+
let t = e - this.startId;
|
|
515
|
+
t < 0 || t >= this.callbacks.length || (this.callbacks[t] = null, --this.callbacksCount);
|
|
516
|
+
}
|
|
517
|
+
}(), it = class e {
|
|
518
|
+
static create() {
|
|
519
|
+
return new e();
|
|
520
|
+
}
|
|
521
|
+
static request(e) {
|
|
522
|
+
return rt.request(e);
|
|
523
|
+
}
|
|
524
|
+
static cancel(e) {
|
|
525
|
+
return rt.cancel(e);
|
|
526
|
+
}
|
|
527
|
+
currentId = tt;
|
|
528
|
+
request(e) {
|
|
529
|
+
this.cancel(), this.currentId = rt.request(() => {
|
|
530
|
+
this.currentId = tt, e();
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
cancel = () => {
|
|
534
|
+
this.currentId !== tt && (rt.cancel(this.currentId), this.currentId = tt);
|
|
535
|
+
};
|
|
536
|
+
disposeEffect = () => this.cancel;
|
|
537
|
+
};
|
|
538
|
+
function at() {
|
|
539
|
+
let e = u(it.create).current;
|
|
540
|
+
return T(e.disposeEffect), e;
|
|
541
|
+
}
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/owner.js
|
|
544
|
+
function J(e) {
|
|
545
|
+
return e?.ownerDocument || document;
|
|
546
|
+
}
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/visuallyHidden.js
|
|
549
|
+
var ot = {
|
|
550
|
+
clipPath: "inset(50%)",
|
|
551
|
+
overflow: "hidden",
|
|
552
|
+
whiteSpace: "nowrap",
|
|
553
|
+
border: 0,
|
|
554
|
+
padding: 0,
|
|
555
|
+
width: 1,
|
|
556
|
+
height: 1,
|
|
557
|
+
margin: -1
|
|
558
|
+
}, st = {
|
|
559
|
+
...ot,
|
|
560
|
+
position: "fixed",
|
|
561
|
+
top: 0,
|
|
562
|
+
left: 0
|
|
563
|
+
};
|
|
564
|
+
({ ...ot });
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/FocusGuard.js
|
|
567
|
+
var ct = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
568
|
+
let [n, i] = r.useState();
|
|
569
|
+
y(() => {
|
|
570
|
+
N && i("button");
|
|
571
|
+
}, []);
|
|
572
|
+
let a = {
|
|
573
|
+
tabIndex: 0,
|
|
574
|
+
role: n
|
|
575
|
+
};
|
|
576
|
+
return /* @__PURE__ */ o("span", {
|
|
577
|
+
...e,
|
|
578
|
+
ref: t,
|
|
579
|
+
style: st,
|
|
580
|
+
"aria-hidden": n ? void 0 : !0,
|
|
581
|
+
...a,
|
|
582
|
+
"data-base-ui-focus-guard": ""
|
|
583
|
+
});
|
|
584
|
+
});
|
|
585
|
+
process.env.NODE_ENV !== "production" && (ct.displayName = "FocusGuard");
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js
|
|
588
|
+
var lt = "data-base-ui-focusable", ut = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/shadowDom.js
|
|
591
|
+
function dt(e) {
|
|
592
|
+
let t = e.activeElement;
|
|
593
|
+
for (; t?.shadowRoot?.activeElement != null;) t = t.shadowRoot.activeElement;
|
|
594
|
+
return t;
|
|
595
|
+
}
|
|
596
|
+
function Y(e, t) {
|
|
597
|
+
if (!e || !t) return !1;
|
|
598
|
+
let n = t.getRootNode?.();
|
|
599
|
+
if (e.contains(t)) return !0;
|
|
600
|
+
if (n && Te(n)) {
|
|
601
|
+
let n = t;
|
|
602
|
+
for (; n;) {
|
|
603
|
+
if (e === n) return !0;
|
|
604
|
+
n = n.parentNode || n.host;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
return !1;
|
|
608
|
+
}
|
|
609
|
+
function ft(e) {
|
|
610
|
+
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
611
|
+
}
|
|
612
|
+
//#endregion
|
|
613
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js
|
|
614
|
+
function pt(e, t) {
|
|
615
|
+
if (!U(e)) return !1;
|
|
616
|
+
let n = e;
|
|
617
|
+
if (t.hasElement(n)) return !n.hasAttribute("data-trigger-disabled");
|
|
618
|
+
for (let [, e] of t.entries()) if (Y(e, n)) return !e.hasAttribute("data-trigger-disabled");
|
|
619
|
+
return !1;
|
|
620
|
+
}
|
|
621
|
+
function mt(e, t) {
|
|
622
|
+
if (t == null) return !1;
|
|
623
|
+
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
624
|
+
let n = e;
|
|
625
|
+
return n.target != null && t.contains(n.target);
|
|
626
|
+
}
|
|
627
|
+
function ht(e) {
|
|
628
|
+
return e.matches("html,body");
|
|
629
|
+
}
|
|
630
|
+
function gt(e) {
|
|
631
|
+
return W(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
632
|
+
}
|
|
633
|
+
function _t(e) {
|
|
634
|
+
return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ut}`) != null;
|
|
635
|
+
}
|
|
636
|
+
function vt(e) {
|
|
637
|
+
if (!e || F) return !0;
|
|
638
|
+
try {
|
|
639
|
+
return e.matches(":focus-visible");
|
|
640
|
+
} catch {
|
|
641
|
+
return !0;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
//#endregion
|
|
645
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
646
|
+
var yt = [
|
|
647
|
+
"top",
|
|
648
|
+
"right",
|
|
649
|
+
"bottom",
|
|
650
|
+
"left"
|
|
651
|
+
], bt = Math.min, X = Math.max, xt = Math.round, St = Math.floor, Ct = (e) => ({
|
|
652
|
+
x: e,
|
|
653
|
+
y: e
|
|
654
|
+
}), wt = {
|
|
655
|
+
left: "right",
|
|
656
|
+
right: "left",
|
|
657
|
+
bottom: "top",
|
|
658
|
+
top: "bottom"
|
|
659
|
+
};
|
|
660
|
+
function Tt(e, t, n) {
|
|
661
|
+
return X(e, bt(t, n));
|
|
662
|
+
}
|
|
663
|
+
function Et(e, t) {
|
|
664
|
+
return typeof e == "function" ? e(t) : e;
|
|
665
|
+
}
|
|
666
|
+
function Z(e) {
|
|
667
|
+
return e.split("-")[0];
|
|
668
|
+
}
|
|
669
|
+
function Dt(e) {
|
|
670
|
+
return e.split("-")[1];
|
|
671
|
+
}
|
|
672
|
+
function Ot(e) {
|
|
673
|
+
return e === "x" ? "y" : "x";
|
|
674
|
+
}
|
|
675
|
+
function kt(e) {
|
|
676
|
+
return e === "y" ? "height" : "width";
|
|
677
|
+
}
|
|
678
|
+
function At(e) {
|
|
679
|
+
let t = e[0];
|
|
680
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
681
|
+
}
|
|
682
|
+
function jt(e) {
|
|
683
|
+
return Ot(At(e));
|
|
684
|
+
}
|
|
685
|
+
function Mt(e, t, n) {
|
|
686
|
+
n === void 0 && (n = !1);
|
|
687
|
+
let r = Dt(e), i = jt(e), a = kt(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
688
|
+
return t.reference[a] > t.floating[a] && (o = Vt(o)), [o, Vt(o)];
|
|
689
|
+
}
|
|
690
|
+
function Nt(e) {
|
|
691
|
+
let t = Vt(e);
|
|
692
|
+
return [
|
|
693
|
+
Pt(e),
|
|
694
|
+
t,
|
|
695
|
+
Pt(t)
|
|
696
|
+
];
|
|
697
|
+
}
|
|
698
|
+
function Pt(e) {
|
|
699
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
700
|
+
}
|
|
701
|
+
var Ft = ["left", "right"], It = ["right", "left"], Lt = ["top", "bottom"], Rt = ["bottom", "top"];
|
|
702
|
+
function zt(e, t, n) {
|
|
703
|
+
switch (e) {
|
|
704
|
+
case "top":
|
|
705
|
+
case "bottom": return n ? t ? It : Ft : t ? Ft : It;
|
|
706
|
+
case "left":
|
|
707
|
+
case "right": return t ? Lt : Rt;
|
|
708
|
+
default: return [];
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
function Bt(e, t, n, r) {
|
|
712
|
+
let i = Dt(e), a = zt(Z(e), n === "start", r);
|
|
713
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Pt)))), a;
|
|
714
|
+
}
|
|
715
|
+
function Vt(e) {
|
|
716
|
+
let t = Z(e);
|
|
717
|
+
return wt[t] + e.slice(t.length);
|
|
718
|
+
}
|
|
719
|
+
function Ht(e) {
|
|
720
|
+
return {
|
|
721
|
+
top: 0,
|
|
722
|
+
right: 0,
|
|
723
|
+
bottom: 0,
|
|
724
|
+
left: 0,
|
|
725
|
+
...e
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
function Ut(e) {
|
|
729
|
+
return typeof e == "number" ? {
|
|
730
|
+
top: e,
|
|
731
|
+
right: e,
|
|
732
|
+
bottom: e,
|
|
733
|
+
left: e
|
|
734
|
+
} : Ht(e);
|
|
735
|
+
}
|
|
736
|
+
function Wt(e) {
|
|
737
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
738
|
+
return {
|
|
739
|
+
width: r,
|
|
740
|
+
height: i,
|
|
741
|
+
top: n,
|
|
742
|
+
left: t,
|
|
743
|
+
right: t + r,
|
|
744
|
+
bottom: n + i,
|
|
745
|
+
x: t,
|
|
746
|
+
y: n
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js
|
|
751
|
+
function Gt(e) {
|
|
752
|
+
return typeof e.checkVisibility == "function" ? e.checkVisibility() : G(e).display !== "none";
|
|
753
|
+
}
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js
|
|
756
|
+
var Kt = "a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]";
|
|
757
|
+
function qt(e) {
|
|
758
|
+
let t = e.assignedSlot;
|
|
759
|
+
if (t) return t;
|
|
760
|
+
if (e.parentElement) return e.parentElement;
|
|
761
|
+
let n = e.getRootNode();
|
|
762
|
+
return Te(n) ? n.host : null;
|
|
763
|
+
}
|
|
764
|
+
function Jt(e) {
|
|
765
|
+
for (let t of Array.from(e.children)) if (B(t) === "summary") return t;
|
|
766
|
+
return null;
|
|
767
|
+
}
|
|
768
|
+
function Yt(e, t) {
|
|
769
|
+
let n = Jt(t);
|
|
770
|
+
return !!n && (e === n || Y(n, e));
|
|
771
|
+
}
|
|
772
|
+
function Xt(e) {
|
|
773
|
+
let t = e ? B(e) : "";
|
|
774
|
+
return e != null && e.matches(Kt) && (t !== "summary" || e.parentElement != null && B(e.parentElement) === "details" && Jt(e.parentElement) === e) && (t !== "details" || Jt(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
775
|
+
}
|
|
776
|
+
function Zt(e) {
|
|
777
|
+
if (!Xt(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
778
|
+
for (let t = e; t; t = qt(t)) {
|
|
779
|
+
let n = B(t) === "slot";
|
|
780
|
+
if (t.hasAttribute("inert") || t !== e && B(t) === "details" && !t.open && !Yt(e, t) || t.hasAttribute("hidden") || !n && !Gt(t)) return !1;
|
|
781
|
+
}
|
|
782
|
+
return !0;
|
|
783
|
+
}
|
|
784
|
+
function Qt(e) {
|
|
785
|
+
let t = e.tabIndex;
|
|
786
|
+
if (t < 0) {
|
|
787
|
+
let t = B(e);
|
|
788
|
+
if (t === "details" || t === "audio" || t === "video" || W(e) && e.isContentEditable) return 0;
|
|
789
|
+
}
|
|
790
|
+
return t;
|
|
791
|
+
}
|
|
792
|
+
function $t(e) {
|
|
793
|
+
if (B(e) !== "input") return null;
|
|
794
|
+
let t = e;
|
|
795
|
+
return t.type === "radio" && t.name !== "" ? t : null;
|
|
796
|
+
}
|
|
797
|
+
function en(e, t) {
|
|
798
|
+
let n = $t(e);
|
|
799
|
+
if (!n) return !0;
|
|
800
|
+
let r = t.find((e) => {
|
|
801
|
+
let t = $t(e);
|
|
802
|
+
return t?.name === n.name && t.form === n.form && t.checked;
|
|
803
|
+
});
|
|
804
|
+
return r ? r === n : t.find((e) => {
|
|
805
|
+
let t = $t(e);
|
|
806
|
+
return t?.name === n.name && t.form === n.form;
|
|
807
|
+
}) === n;
|
|
808
|
+
}
|
|
809
|
+
function tn(e) {
|
|
810
|
+
if (W(e) && B(e) === "slot") {
|
|
811
|
+
let t = e.assignedElements({ flatten: !0 });
|
|
812
|
+
if (t.length > 0) return t;
|
|
813
|
+
}
|
|
814
|
+
return W(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
815
|
+
}
|
|
816
|
+
function nn(e, t) {
|
|
817
|
+
tn(e).forEach((e) => {
|
|
818
|
+
Xt(e) && t.push(e), nn(e, t);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
function rn(e, t, n) {
|
|
822
|
+
tn(e).forEach((e) => {
|
|
823
|
+
W(e) && e.matches(t) && n.push(e), rn(e, t, n);
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function an(e) {
|
|
827
|
+
let t = [];
|
|
828
|
+
return nn(e, t), t.filter(Zt);
|
|
829
|
+
}
|
|
830
|
+
function on(e) {
|
|
831
|
+
let t = an(e);
|
|
832
|
+
return t.filter((e) => Qt(e) >= 0 && en(e, t));
|
|
833
|
+
}
|
|
834
|
+
function sn(e, t) {
|
|
835
|
+
let n = on(e), r = n.length;
|
|
836
|
+
if (r === 0) return;
|
|
837
|
+
let i = dt(J(e)), a = n.indexOf(i);
|
|
838
|
+
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
839
|
+
}
|
|
840
|
+
function cn(e) {
|
|
841
|
+
return sn(J(e).body, 1) || e;
|
|
842
|
+
}
|
|
843
|
+
function ln(e) {
|
|
844
|
+
return sn(J(e).body, -1) || e;
|
|
845
|
+
}
|
|
846
|
+
function un(e, t) {
|
|
847
|
+
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
848
|
+
return !r || !Y(n, r);
|
|
849
|
+
}
|
|
850
|
+
function dn(e) {
|
|
851
|
+
on(e).forEach((e) => {
|
|
852
|
+
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
function fn(e) {
|
|
856
|
+
let t = [];
|
|
857
|
+
rn(e, "[data-tabindex]", t), t.forEach((e) => {
|
|
858
|
+
let t = e.dataset.tabindex;
|
|
859
|
+
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
//#endregion
|
|
863
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes.js
|
|
864
|
+
function pn(e, t, n = !0) {
|
|
865
|
+
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...pn(e, t.id, n)]);
|
|
866
|
+
}
|
|
867
|
+
//#endregion
|
|
868
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js
|
|
869
|
+
function mn(e) {
|
|
870
|
+
return `data-base-ui-${e}`;
|
|
871
|
+
}
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/safeReact.js
|
|
874
|
+
var hn = { ...r }, gn = 0;
|
|
875
|
+
function _n(e, t = "mui") {
|
|
876
|
+
let [n, i] = r.useState(e), a = e || n;
|
|
877
|
+
return r.useEffect(() => {
|
|
878
|
+
n ?? (gn += 1, i(`${t}-${gn}`));
|
|
879
|
+
}, [n, t]), a;
|
|
880
|
+
}
|
|
881
|
+
var vn = hn.useId;
|
|
882
|
+
function yn(e, t) {
|
|
883
|
+
if (vn !== void 0) {
|
|
884
|
+
let n = vn();
|
|
885
|
+
return e ?? (t ? `${t}-${n}` : n);
|
|
886
|
+
}
|
|
887
|
+
return _n(e, t);
|
|
888
|
+
}
|
|
889
|
+
//#endregion
|
|
890
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/reactVersion.js
|
|
891
|
+
var bn = parseInt(r.version, 10);
|
|
892
|
+
function xn(e) {
|
|
893
|
+
return bn >= e;
|
|
894
|
+
}
|
|
895
|
+
//#endregion
|
|
896
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
897
|
+
function Sn(e) {
|
|
898
|
+
if (!/* @__PURE__ */ r.isValidElement(e)) return null;
|
|
899
|
+
let t = e, n = t.props;
|
|
900
|
+
return (xn(19) ? n?.ref : t.ref) ?? null;
|
|
901
|
+
}
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
904
|
+
function Cn(e, t) {
|
|
905
|
+
if (e && !t) return e;
|
|
906
|
+
if (!e && t) return t;
|
|
907
|
+
if (e || t) return {
|
|
908
|
+
...e,
|
|
909
|
+
...t
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/warn.js
|
|
914
|
+
var wn;
|
|
915
|
+
process.env.NODE_ENV !== "production" && (wn = /* @__PURE__ */ new Set());
|
|
916
|
+
function Tn(...e) {
|
|
917
|
+
if (process.env.NODE_ENV !== "production") {
|
|
918
|
+
let t = e.join(" ");
|
|
919
|
+
wn.has(t) || (wn.add(t), console.warn(`Base UI: ${t}`));
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
|
|
924
|
+
function En(e, t) {
|
|
925
|
+
let n = {};
|
|
926
|
+
for (let r in e) {
|
|
927
|
+
let i = e[r];
|
|
928
|
+
if (t?.hasOwnProperty(r)) {
|
|
929
|
+
let e = t[r](i);
|
|
930
|
+
e != null && Object.assign(n, e);
|
|
931
|
+
continue;
|
|
932
|
+
}
|
|
933
|
+
i === !0 ? n[`data-${r.toLowerCase()}`] = "" : i && (n[`data-${r.toLowerCase()}`] = i.toString());
|
|
934
|
+
}
|
|
935
|
+
return n;
|
|
936
|
+
}
|
|
937
|
+
//#endregion
|
|
938
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/resolveClassName.js
|
|
939
|
+
function Dn(e, t) {
|
|
940
|
+
return typeof e == "function" ? e(t) : e;
|
|
941
|
+
}
|
|
942
|
+
//#endregion
|
|
943
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/resolveStyle.js
|
|
944
|
+
function On(e, t) {
|
|
945
|
+
return typeof e == "function" ? e(t) : e;
|
|
946
|
+
}
|
|
947
|
+
//#endregion
|
|
948
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
949
|
+
var kn = {};
|
|
950
|
+
function An(e, t, n, r, i) {
|
|
951
|
+
if (!n && !r && !i && !e) return Mn(t);
|
|
952
|
+
let a = Mn(e);
|
|
953
|
+
return t && (a = Nn(a, t)), n && (a = Nn(a, n)), r && (a = Nn(a, r)), i && (a = Nn(a, i)), a;
|
|
954
|
+
}
|
|
955
|
+
function jn(e) {
|
|
956
|
+
if (e.length === 0) return kn;
|
|
957
|
+
if (e.length === 1) return Mn(e[0]);
|
|
958
|
+
let t = Mn(e[0]);
|
|
959
|
+
for (let n = 1; n < e.length; n += 1) t = Nn(t, e[n]);
|
|
960
|
+
return t;
|
|
961
|
+
}
|
|
962
|
+
function Mn(e) {
|
|
963
|
+
return Ln(e) ? { ...Rn(e, kn) } : Pn(e);
|
|
964
|
+
}
|
|
965
|
+
function Nn(e, t) {
|
|
966
|
+
return Ln(t) ? Rn(t, e) : Fn(e, t);
|
|
967
|
+
}
|
|
968
|
+
function Pn(e) {
|
|
969
|
+
let t = { ...e };
|
|
970
|
+
for (let e in t) {
|
|
971
|
+
let n = t[e];
|
|
972
|
+
In(e, n) && (t[e] = Bn(n));
|
|
973
|
+
}
|
|
974
|
+
return t;
|
|
975
|
+
}
|
|
976
|
+
function Fn(e, t) {
|
|
977
|
+
if (!t) return e;
|
|
978
|
+
for (let n in t) {
|
|
979
|
+
let r = t[n];
|
|
980
|
+
switch (n) {
|
|
981
|
+
case "style":
|
|
982
|
+
e[n] = Cn(e.style, r);
|
|
983
|
+
break;
|
|
984
|
+
case "className":
|
|
985
|
+
e[n] = Hn(e.className, r);
|
|
986
|
+
break;
|
|
987
|
+
default: In(n, r) ? e[n] = zn(e[n], r) : e[n] = r;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return e;
|
|
991
|
+
}
|
|
992
|
+
function In(e, t) {
|
|
993
|
+
let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
|
|
994
|
+
return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
|
|
995
|
+
}
|
|
996
|
+
function Ln(e) {
|
|
997
|
+
return typeof e == "function";
|
|
998
|
+
}
|
|
999
|
+
function Rn(e, t) {
|
|
1000
|
+
return Ln(e) ? e(t) : e ?? kn;
|
|
1001
|
+
}
|
|
1002
|
+
function zn(e, t) {
|
|
1003
|
+
return t ? e ? (n) => {
|
|
1004
|
+
if (Un(n)) {
|
|
1005
|
+
let r = n;
|
|
1006
|
+
Vn(r);
|
|
1007
|
+
let i = t(r);
|
|
1008
|
+
return r.baseUIHandlerPrevented || e?.(r), i;
|
|
1009
|
+
}
|
|
1010
|
+
let r = t(n);
|
|
1011
|
+
return e?.(n), r;
|
|
1012
|
+
} : Bn(t) : e;
|
|
1013
|
+
}
|
|
1014
|
+
function Bn(e) {
|
|
1015
|
+
return e && ((t) => (Un(t) && Vn(t), e(t)));
|
|
1016
|
+
}
|
|
1017
|
+
function Vn(e) {
|
|
1018
|
+
return e.preventBaseUIHandler = () => {
|
|
1019
|
+
e.baseUIHandlerPrevented = !0;
|
|
1020
|
+
}, e;
|
|
1021
|
+
}
|
|
1022
|
+
function Hn(e, t) {
|
|
1023
|
+
return t ? e ? t + " " + e : t : e;
|
|
1024
|
+
}
|
|
1025
|
+
function Un(e) {
|
|
1026
|
+
return typeof e == "object" && !!e && "nativeEvent" in e;
|
|
1027
|
+
}
|
|
1028
|
+
//#endregion
|
|
1029
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useRenderElement.js
|
|
1030
|
+
function Wn(e, t, n = {}) {
|
|
1031
|
+
let r = t.render, i = Gn(t, n);
|
|
1032
|
+
return n.enabled === !1 ? null : Xn(e, r, i, n.state ?? R);
|
|
1033
|
+
}
|
|
1034
|
+
function Gn(e, t = {}) {
|
|
1035
|
+
let { className: n, style: r, render: i } = e, { state: a = R, ref: o, props: s, stateAttributesMapping: c, enabled: l = !0 } = t, u = l ? Dn(n, a) : void 0, d = l ? On(r, a) : void 0, f = l ? En(a, c) : R, p = l && s ? Kn(s) : void 0, m = l ? Cn(f, p) ?? {} : R;
|
|
1036
|
+
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref = We([
|
|
1037
|
+
m.ref,
|
|
1038
|
+
Sn(i),
|
|
1039
|
+
...o
|
|
1040
|
+
]) : m.ref = Ue(m.ref, Sn(i), o) : Ue(null, null)), l ? (u !== void 0 && (m.className = Hn(m.className, u)), d !== void 0 && (m.style = Cn(m.style, d)), m) : R;
|
|
1041
|
+
}
|
|
1042
|
+
function Kn(e) {
|
|
1043
|
+
return Array.isArray(e) ? jn(e) : An(void 0, e);
|
|
1044
|
+
}
|
|
1045
|
+
var qn = Symbol.for("react.lazy"), Jn = /^[A-Z][A-Za-z0-9$]*$/, Yn = /[a-z]/;
|
|
1046
|
+
function Xn(e, t, n, i) {
|
|
1047
|
+
if (t) {
|
|
1048
|
+
if (typeof t == "function") return process.env.NODE_ENV !== "production" && Zn(t), t(n, i);
|
|
1049
|
+
let e = An(n, t.props);
|
|
1050
|
+
e.ref = n.ref;
|
|
1051
|
+
let a = t;
|
|
1052
|
+
if (a?.$$typeof === qn && (a = r.Children.toArray(t)[0]), process.env.NODE_ENV !== "production" && !/* @__PURE__ */ r.isValidElement(a)) throw Error([
|
|
1053
|
+
"Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
|
|
1054
|
+
"A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
|
|
1055
|
+
"https://base-ui.com/r/invalid-render-prop"
|
|
1056
|
+
].join("\n"));
|
|
1057
|
+
return /* @__PURE__ */ r.cloneElement(a, e);
|
|
1058
|
+
}
|
|
1059
|
+
if (e && typeof e == "string") return Qn(e, n);
|
|
1060
|
+
throw Error(process.env.NODE_ENV === "production" ? x(8) : "Base UI: Render element or function are not defined.");
|
|
1061
|
+
}
|
|
1062
|
+
function Zn(e) {
|
|
1063
|
+
let t = e.name;
|
|
1064
|
+
t.length !== 0 && Jn.test(t) && Yn.test(t) && Tn(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
1065
|
+
}
|
|
1066
|
+
function Qn(e, t) {
|
|
1067
|
+
return e === "button" ? /* @__PURE__ */ i("button", {
|
|
1068
|
+
type: "button",
|
|
1069
|
+
...t,
|
|
1070
|
+
key: t.key
|
|
1071
|
+
}) : e === "img" ? /* @__PURE__ */ i("img", {
|
|
1072
|
+
alt: "",
|
|
1073
|
+
...t,
|
|
1074
|
+
key: t.key
|
|
1075
|
+
}) : /* @__PURE__ */ r.createElement(e, t);
|
|
1076
|
+
}
|
|
1077
|
+
//#endregion
|
|
1078
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js
|
|
1079
|
+
var $n = /* @__PURE__ */ r.createContext(null);
|
|
1080
|
+
process.env.NODE_ENV !== "production" && ($n.displayName = "PortalContext");
|
|
1081
|
+
var er = () => r.useContext($n), tr = mn("portal");
|
|
1082
|
+
function nr(e = {}) {
|
|
1083
|
+
let { ref: t, container: n, componentProps: i = R, elementProps: a } = e, o = yn(), s = er()?.portalNode, [l, u] = r.useState(null), [d, f] = r.useState(null), p = q((e) => {
|
|
1084
|
+
e !== null && f(e);
|
|
1085
|
+
}), m = r.useRef(null);
|
|
1086
|
+
y(() => {
|
|
1087
|
+
if (n === null) {
|
|
1088
|
+
m.current && (m.current = null, f(null), u(null));
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
if (o == null) return;
|
|
1092
|
+
let e = (n && (we(n) ? n : n.current)) ?? s ?? document.body;
|
|
1093
|
+
if (e == null) {
|
|
1094
|
+
m.current && (m.current = null, f(null), u(null));
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
m.current !== e && (m.current = e, f(null), u(e));
|
|
1098
|
+
}, [
|
|
1099
|
+
n,
|
|
1100
|
+
s,
|
|
1101
|
+
o
|
|
1102
|
+
]);
|
|
1103
|
+
let h = Wn("div", i, {
|
|
1104
|
+
ref: [t, p],
|
|
1105
|
+
props: [{
|
|
1106
|
+
id: o,
|
|
1107
|
+
[tr]: ""
|
|
1108
|
+
}, a]
|
|
1109
|
+
});
|
|
1110
|
+
return {
|
|
1111
|
+
portalNode: d,
|
|
1112
|
+
portalSubtree: l && h ? /* @__PURE__ */ c.createPortal(h, l) : null
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
var rr = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
1116
|
+
let { children: n, container: i, className: a, render: l, renderGuards: u, style: d, ...f } = e, { portalNode: p, portalSubtree: m } = nr({
|
|
1117
|
+
container: i,
|
|
1118
|
+
ref: t,
|
|
1119
|
+
componentProps: e,
|
|
1120
|
+
elementProps: f
|
|
1121
|
+
}), h = r.useRef(null), g = r.useRef(null), _ = r.useRef(null), v = r.useRef(null), [y, b] = r.useState(null), x = r.useRef(!1), S = y?.modal, C = y?.open, w = typeof u == "boolean" ? u : !!y && !y.modal && y.open && !!p;
|
|
1122
|
+
r.useEffect(() => {
|
|
1123
|
+
if (!p || S) return;
|
|
1124
|
+
function e(e) {
|
|
1125
|
+
p && e.relatedTarget && un(e) && (e.type === "focusin" ? x.current &&= (fn(p), !1) : (dn(p), x.current = !0));
|
|
1126
|
+
}
|
|
1127
|
+
return He(K(p, "focusin", e, !0), K(p, "focusout", e, !0));
|
|
1128
|
+
}, [p, S]), r.useEffect(() => {
|
|
1129
|
+
!p || C !== !1 || (fn(p), x.current = !1);
|
|
1130
|
+
}, [C, p]);
|
|
1131
|
+
let T = r.useMemo(() => ({
|
|
1132
|
+
beforeOutsideRef: h,
|
|
1133
|
+
afterOutsideRef: g,
|
|
1134
|
+
beforeInsideRef: _,
|
|
1135
|
+
afterInsideRef: v,
|
|
1136
|
+
portalNode: p,
|
|
1137
|
+
setFocusManagerState: b
|
|
1138
|
+
}), [p]);
|
|
1139
|
+
return /* @__PURE__ */ s(r.Fragment, { children: [m, /* @__PURE__ */ s($n.Provider, {
|
|
1140
|
+
value: T,
|
|
1141
|
+
children: [
|
|
1142
|
+
w && p && /* @__PURE__ */ o(ct, {
|
|
1143
|
+
"data-type": "outside",
|
|
1144
|
+
ref: h,
|
|
1145
|
+
onFocus: (e) => {
|
|
1146
|
+
un(e, p) ? _.current?.focus() : ln(y ? y.domReference : null)?.focus();
|
|
1147
|
+
}
|
|
1148
|
+
}),
|
|
1149
|
+
w && p && /* @__PURE__ */ o("span", {
|
|
1150
|
+
"aria-owns": p.id,
|
|
1151
|
+
style: de
|
|
1152
|
+
}),
|
|
1153
|
+
p && /* @__PURE__ */ c.createPortal(n, p),
|
|
1154
|
+
w && p && /* @__PURE__ */ o(ct, {
|
|
1155
|
+
"data-type": "outside",
|
|
1156
|
+
ref: g,
|
|
1157
|
+
onFocus: (e) => {
|
|
1158
|
+
un(e, p) ? v.current?.focus() : (cn(y ? y.domReference : null)?.focus(), y?.closeOnFocusOut && y?.onOpenChange(!1, z("focus-out", e.nativeEvent)));
|
|
1159
|
+
}
|
|
1160
|
+
})
|
|
1161
|
+
]
|
|
1162
|
+
})] });
|
|
1163
|
+
});
|
|
1164
|
+
process.env.NODE_ENV !== "production" && (rr.displayName = "FloatingPortal");
|
|
1165
|
+
//#endregion
|
|
1166
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter.js
|
|
1167
|
+
function ir() {
|
|
1168
|
+
let e = /* @__PURE__ */ new Map();
|
|
1169
|
+
return {
|
|
1170
|
+
emit(t, n) {
|
|
1171
|
+
e.get(t)?.forEach((e) => e(n));
|
|
1172
|
+
},
|
|
1173
|
+
on(t, n) {
|
|
1174
|
+
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
1175
|
+
},
|
|
1176
|
+
off(t, n) {
|
|
1177
|
+
e.get(t)?.delete(n);
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
//#endregion
|
|
1182
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree.js
|
|
1183
|
+
var ar = /* @__PURE__ */ r.createContext(null);
|
|
1184
|
+
process.env.NODE_ENV !== "production" && (ar.displayName = "FloatingNodeContext");
|
|
1185
|
+
var or = /* @__PURE__ */ r.createContext(null);
|
|
1186
|
+
process.env.NODE_ENV !== "production" && (or.displayName = "FloatingTreeContext");
|
|
1187
|
+
var sr = () => r.useContext(ar)?.id || null, cr = (e) => {
|
|
1188
|
+
let t = r.useContext(or);
|
|
1189
|
+
return e ?? t;
|
|
1190
|
+
};
|
|
1191
|
+
//#endregion
|
|
1192
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/resolveRef.js
|
|
1193
|
+
function lr(e) {
|
|
1194
|
+
return e == null ? e : "current" in e ? e.current : e;
|
|
1195
|
+
}
|
|
1196
|
+
//#endregion
|
|
1197
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClientPoint.js
|
|
1198
|
+
function ur(e, t) {
|
|
1199
|
+
let n = null, r = null, i = !1;
|
|
1200
|
+
return {
|
|
1201
|
+
contextElement: e || void 0,
|
|
1202
|
+
getBoundingClientRect() {
|
|
1203
|
+
let a = e?.getBoundingClientRect() || {
|
|
1204
|
+
width: 0,
|
|
1205
|
+
height: 0,
|
|
1206
|
+
x: 0,
|
|
1207
|
+
y: 0
|
|
1208
|
+
}, o = t.axis === "x" || t.axis === "both", s = t.axis === "y" || t.axis === "both", c = ["mouseenter", "mousemove"].includes(t.dataRef.current.openEvent?.type || "") && t.pointerType !== "touch", l = a.width, u = a.height, d = a.x, f = a.y;
|
|
1209
|
+
return n == null && t.x && o && (n = a.x - t.x), r == null && t.y && s && (r = a.y - t.y), d -= n || 0, f -= r || 0, l = 0, u = 0, !i || c ? (l = t.axis === "y" ? a.width : 0, u = t.axis === "x" ? a.height : 0, d = o && t.x != null ? t.x : d, f = s && t.y != null ? t.y : f) : i && !c && (u = t.axis === "x" ? a.height : u, l = t.axis === "y" ? a.width : l), i = !0, {
|
|
1210
|
+
width: l,
|
|
1211
|
+
height: u,
|
|
1212
|
+
x: d,
|
|
1213
|
+
y: f,
|
|
1214
|
+
top: f,
|
|
1215
|
+
right: d + l,
|
|
1216
|
+
bottom: f + u,
|
|
1217
|
+
left: d
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
function dr(e) {
|
|
1223
|
+
return e != null && e.clientX != null;
|
|
1224
|
+
}
|
|
1225
|
+
function fr(e, t = {}) {
|
|
1226
|
+
let n = "rootStore" in e ? e.rootStore : e, i = n.useState("open"), a = n.useState("floatingElement"), o = n.useState("domReferenceElement"), s = n.context.dataRef, { enabled: c = !0, axis: l = "both" } = t, u = r.useRef(!1), d = r.useRef(null), [f, p] = r.useState(), [m, h] = r.useState([]), g = q((e, t, r) => {
|
|
1227
|
+
u.current || s.current.openEvent && !dr(s.current.openEvent) || n.set("positionReference", ur(r ?? o, {
|
|
1228
|
+
x: e,
|
|
1229
|
+
y: t,
|
|
1230
|
+
axis: l,
|
|
1231
|
+
dataRef: s,
|
|
1232
|
+
pointerType: f
|
|
1233
|
+
}));
|
|
1234
|
+
}), _ = q((e) => {
|
|
1235
|
+
i ? d.current || h([]) : g(e.clientX, e.clientY, e.currentTarget);
|
|
1236
|
+
}), v = re(f) ? a : i, y = r.useCallback(() => {
|
|
1237
|
+
if (!v || !c) return;
|
|
1238
|
+
let e = V(a);
|
|
1239
|
+
function t(e) {
|
|
1240
|
+
Y(a, ft(e)) ? (d.current?.(), d.current = null) : g(e.clientX, e.clientY);
|
|
1241
|
+
}
|
|
1242
|
+
if (!s.current.openEvent || dr(s.current.openEvent)) return d.current = K(e, "mousemove", t), () => {
|
|
1243
|
+
d.current?.(), d.current = null;
|
|
1244
|
+
};
|
|
1245
|
+
n.set("positionReference", o);
|
|
1246
|
+
}, [
|
|
1247
|
+
v,
|
|
1248
|
+
c,
|
|
1249
|
+
a,
|
|
1250
|
+
s,
|
|
1251
|
+
o,
|
|
1252
|
+
n,
|
|
1253
|
+
g
|
|
1254
|
+
]);
|
|
1255
|
+
r.useEffect(() => y(), [y, m]), r.useEffect(() => {
|
|
1256
|
+
c && !a && (u.current = !1);
|
|
1257
|
+
}, [c, a]), r.useEffect(() => {
|
|
1258
|
+
!c && i && (u.current = !0);
|
|
1259
|
+
}, [c, i]);
|
|
1260
|
+
let b = r.useMemo(() => {
|
|
1261
|
+
function e(e) {
|
|
1262
|
+
p(e.pointerType);
|
|
1263
|
+
}
|
|
1264
|
+
return {
|
|
1265
|
+
onPointerDown: e,
|
|
1266
|
+
onPointerEnter: e,
|
|
1267
|
+
onMouseMove: _,
|
|
1268
|
+
onMouseEnter: _
|
|
1269
|
+
};
|
|
1270
|
+
}, [_]);
|
|
1271
|
+
return r.useMemo(() => c ? {
|
|
1272
|
+
reference: b,
|
|
1273
|
+
trigger: b
|
|
1274
|
+
} : {}, [c, b]);
|
|
1275
|
+
}
|
|
1276
|
+
//#endregion
|
|
1277
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js
|
|
1278
|
+
var pr = {
|
|
1279
|
+
intentional: "onClick",
|
|
1280
|
+
sloppy: "onPointerDown"
|
|
1281
|
+
};
|
|
1282
|
+
function mr() {
|
|
1283
|
+
return !1;
|
|
1284
|
+
}
|
|
1285
|
+
function hr(e) {
|
|
1286
|
+
return {
|
|
1287
|
+
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
1288
|
+
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
function gr(e, t = {}) {
|
|
1292
|
+
let n = "rootStore" in e ? e.rootStore : e, i = n.useState("open"), a = n.useState("floatingElement"), { dataRef: o } = n.context, { enabled: s = !0, escapeKey: c = !0, outsidePress: l = !0, outsidePressEvent: u = "sloppy", referencePress: d = mr, referencePressEvent: f = "sloppy", bubbles: p, externalTree: m } = t, h = cr(m), g = q(typeof l == "function" ? l : () => !1), _ = typeof l == "function" ? g : l, v = _ !== !1, y = q(() => u), b = r.useRef(!1), x = r.useRef(!1), S = r.useRef(!1), { escapeKey: C, outsidePress: w } = hr(p), T = r.useRef(null), E = O(), k = O(), A = q(() => {
|
|
1293
|
+
k.clear(), o.current.insideReactTree = !1;
|
|
1294
|
+
}), j = r.useRef(!1), M = r.useRef(""), N = q(d), P = q((e) => {
|
|
1295
|
+
if (!i || !s || !c || e.key !== "Escape" || j.current) return;
|
|
1296
|
+
let t = o.current.floatingContext?.nodeId, r = h ? pn(h.nodesRef.current, t) : [];
|
|
1297
|
+
if (!C && r.length > 0) {
|
|
1298
|
+
let e = !0;
|
|
1299
|
+
if (r.forEach((t) => {
|
|
1300
|
+
t.context?.open && !t.context.dataRef.current.__escapeKeyBubbles && (e = !1);
|
|
1301
|
+
}), !e) return;
|
|
1302
|
+
}
|
|
1303
|
+
let a = z(_e, ne(e) ? e.nativeEvent : e);
|
|
1304
|
+
n.setOpen(!1, a), !C && !a.isPropagationAllowed && e.stopPropagation();
|
|
1305
|
+
}), F = q(() => {
|
|
1306
|
+
o.current.insideReactTree = !0, k.start(0, A);
|
|
1307
|
+
});
|
|
1308
|
+
r.useEffect(() => {
|
|
1309
|
+
if (!i || !s) return;
|
|
1310
|
+
o.current.__escapeKeyBubbles = C, o.current.__outsidePressBubbles = w;
|
|
1311
|
+
let e = new D(), t = new D();
|
|
1312
|
+
function r() {
|
|
1313
|
+
e.clear(), j.current = !0;
|
|
1314
|
+
}
|
|
1315
|
+
function l() {
|
|
1316
|
+
e.start(Fe() ? 5 : 0, () => {
|
|
1317
|
+
j.current = !1;
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
function u() {
|
|
1321
|
+
S.current = !0, t.start(0, () => {
|
|
1322
|
+
S.current = !1;
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
function d() {
|
|
1326
|
+
b.current = !1, x.current = !1;
|
|
1327
|
+
}
|
|
1328
|
+
function f() {
|
|
1329
|
+
let e = M.current, t = e === "pen" || !e ? "mouse" : e, n = y(), r = typeof n == "function" ? n() : n;
|
|
1330
|
+
return typeof r == "string" ? r : r[t];
|
|
1331
|
+
}
|
|
1332
|
+
function p(e) {
|
|
1333
|
+
let t = f();
|
|
1334
|
+
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
1335
|
+
}
|
|
1336
|
+
function m(e) {
|
|
1337
|
+
let t = o.current.floatingContext?.nodeId, r = h && pn(h.nodesRef.current, t).some((t) => mt(e, t.context?.elements.floating));
|
|
1338
|
+
return mt(e, n.select("floatingElement")) || mt(e, n.select("domReferenceElement")) || r;
|
|
1339
|
+
}
|
|
1340
|
+
function g(e) {
|
|
1341
|
+
if (p(e)) {
|
|
1342
|
+
A();
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
if (o.current.insideReactTree) {
|
|
1346
|
+
A();
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
let r = ft(e), i = `[${mn("inert")}]`, a = U(r) ? r.getRootNode() : null, s = Array.from((Te(a) ? a : J(n.select("floatingElement"))).querySelectorAll(i)), c = n.context.triggerElements;
|
|
1350
|
+
if (r && (c.hasElement(r) || c.hasMatchingElement((e) => Y(e, r)))) return;
|
|
1351
|
+
let l = U(r) ? r : null;
|
|
1352
|
+
for (; l && !Ie(l);) {
|
|
1353
|
+
let e = Re(l);
|
|
1354
|
+
if (Ie(e) || !U(e)) break;
|
|
1355
|
+
l = e;
|
|
1356
|
+
}
|
|
1357
|
+
if (s.length && U(r) && !ht(r) && !Y(r, n.select("floatingElement")) && s.every((e) => !Y(l, e))) return;
|
|
1358
|
+
if (W(r) && !("touches" in e)) {
|
|
1359
|
+
let t = Ie(r), n = G(r), i = /auto|scroll/, a = t || i.test(n.overflowX), o = t || i.test(n.overflowY), s = a && r.clientWidth > 0 && r.scrollWidth > r.clientWidth, c = o && r.clientHeight > 0 && r.scrollHeight > r.clientHeight, l = n.direction === "rtl", u = c && (l ? e.offsetX <= r.offsetWidth - r.clientWidth : e.offsetX > r.clientWidth), d = s && e.offsetY > r.clientHeight;
|
|
1360
|
+
if (u || d) return;
|
|
1361
|
+
}
|
|
1362
|
+
if (m(e)) return;
|
|
1363
|
+
if (f() === "intentional" && S.current) {
|
|
1364
|
+
t.clear(), S.current = !1;
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
if (typeof _ == "function" && !_(e)) return;
|
|
1368
|
+
let u = o.current.floatingContext?.nodeId, d = h ? pn(h.nodesRef.current, u) : [];
|
|
1369
|
+
if (d.length > 0) {
|
|
1370
|
+
let e = !0;
|
|
1371
|
+
if (d.forEach((t) => {
|
|
1372
|
+
t.context?.open && !t.context.dataRef.current.__outsidePressBubbles && (e = !1);
|
|
1373
|
+
}), !e) return;
|
|
1374
|
+
}
|
|
1375
|
+
n.setOpen(!1, z(ge, e)), A();
|
|
1376
|
+
}
|
|
1377
|
+
function O(e) {
|
|
1378
|
+
f() !== "sloppy" || e.pointerType === "touch" || !n.select("open") || !s || mt(e, n.select("floatingElement")) || mt(e, n.select("domReferenceElement")) || g(e);
|
|
1379
|
+
}
|
|
1380
|
+
function k(e) {
|
|
1381
|
+
if (f() !== "sloppy" || !n.select("open") || !s || mt(e, n.select("floatingElement")) || mt(e, n.select("domReferenceElement"))) return;
|
|
1382
|
+
let t = e.touches[0];
|
|
1383
|
+
t && (T.current = {
|
|
1384
|
+
startTime: Date.now(),
|
|
1385
|
+
startX: t.clientX,
|
|
1386
|
+
startY: t.clientY,
|
|
1387
|
+
dismissOnTouchEnd: !1,
|
|
1388
|
+
dismissOnMouseDown: !0
|
|
1389
|
+
}, E.start(1e3, () => {
|
|
1390
|
+
T.current && (T.current.dismissOnTouchEnd = !1, T.current.dismissOnMouseDown = !1);
|
|
1391
|
+
}));
|
|
1392
|
+
}
|
|
1393
|
+
function N(e, t) {
|
|
1394
|
+
let n = ft(e);
|
|
1395
|
+
if (!n) return;
|
|
1396
|
+
let r = K(n, e.type, () => {
|
|
1397
|
+
t(e), r();
|
|
1398
|
+
});
|
|
1399
|
+
}
|
|
1400
|
+
function F(e) {
|
|
1401
|
+
M.current = "touch", N(e, k);
|
|
1402
|
+
}
|
|
1403
|
+
function I(e) {
|
|
1404
|
+
E.clear(), e.type === "pointerdown" && (M.current = e.pointerType), !(e.type === "mousedown" && T.current && !T.current.dismissOnMouseDown) && N(e, (e) => {
|
|
1405
|
+
e.type === "pointerdown" ? O(e) : g(e);
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
function ee(e) {
|
|
1409
|
+
if (!b.current) return;
|
|
1410
|
+
let n = x.current;
|
|
1411
|
+
if (d(), f() === "intentional") {
|
|
1412
|
+
if (e.type === "pointercancel") {
|
|
1413
|
+
n && u();
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
if (!m(e)) {
|
|
1417
|
+
if (n) {
|
|
1418
|
+
u();
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
typeof _ == "function" && !_(e) || (t.clear(), S.current = !0, A());
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
function te(e) {
|
|
1426
|
+
if (f() !== "sloppy" || !T.current || mt(e, n.select("floatingElement")) || mt(e, n.select("domReferenceElement"))) return;
|
|
1427
|
+
let t = e.touches[0];
|
|
1428
|
+
if (!t) return;
|
|
1429
|
+
let r = Math.abs(t.clientX - T.current.startX), i = Math.abs(t.clientY - T.current.startY), a = Math.sqrt(r * r + i * i);
|
|
1430
|
+
a > 5 && (T.current.dismissOnTouchEnd = !0), a > 10 && (g(e), E.clear(), T.current = null);
|
|
1431
|
+
}
|
|
1432
|
+
function ne(e) {
|
|
1433
|
+
N(e, te);
|
|
1434
|
+
}
|
|
1435
|
+
function re(e) {
|
|
1436
|
+
f() !== "sloppy" || !T.current || mt(e, n.select("floatingElement")) || mt(e, n.select("domReferenceElement")) || (T.current.dismissOnTouchEnd && g(e), E.clear(), T.current = null);
|
|
1437
|
+
}
|
|
1438
|
+
function ie(e) {
|
|
1439
|
+
N(e, re);
|
|
1440
|
+
}
|
|
1441
|
+
let L = J(a), ae = He(c && He(K(L, "keydown", P), K(L, "compositionstart", r), K(L, "compositionend", l)), v && He(K(L, "click", I, !0), K(L, "pointerdown", I, !0), K(L, "pointerup", ee, !0), K(L, "pointercancel", ee, !0), K(L, "mousedown", I, !0), K(L, "mouseup", ee, !0), K(L, "touchstart", F, !0), K(L, "touchmove", ne, !0), K(L, "touchend", ie, !0)));
|
|
1442
|
+
return () => {
|
|
1443
|
+
ae(), e.clear(), t.clear(), d(), S.current = !1;
|
|
1444
|
+
};
|
|
1445
|
+
}, [
|
|
1446
|
+
o,
|
|
1447
|
+
a,
|
|
1448
|
+
c,
|
|
1449
|
+
v,
|
|
1450
|
+
_,
|
|
1451
|
+
i,
|
|
1452
|
+
s,
|
|
1453
|
+
C,
|
|
1454
|
+
w,
|
|
1455
|
+
P,
|
|
1456
|
+
A,
|
|
1457
|
+
y,
|
|
1458
|
+
h,
|
|
1459
|
+
n,
|
|
1460
|
+
E
|
|
1461
|
+
]), r.useEffect(A, [_, A]);
|
|
1462
|
+
let I = r.useMemo(() => ({
|
|
1463
|
+
onKeyDown: P,
|
|
1464
|
+
[pr[f]]: (e) => {
|
|
1465
|
+
N() && n.setOpen(!1, z(pe, e.nativeEvent));
|
|
1466
|
+
},
|
|
1467
|
+
...f !== "intentional" && { onClick(e) {
|
|
1468
|
+
N() && n.setOpen(!1, z("trigger-press", e.nativeEvent));
|
|
1469
|
+
} }
|
|
1470
|
+
}), [
|
|
1471
|
+
P,
|
|
1472
|
+
n,
|
|
1473
|
+
f,
|
|
1474
|
+
N
|
|
1475
|
+
]), ee = q((e) => {
|
|
1476
|
+
if (!i || !s || e.button !== 0) return;
|
|
1477
|
+
let t = ft(e.nativeEvent);
|
|
1478
|
+
Y(n.select("floatingElement"), t) && (b.current || (b.current = !0, x.current = !1));
|
|
1479
|
+
}), te = q((e) => {
|
|
1480
|
+
!i || !s || (e.defaultPrevented || e.nativeEvent.defaultPrevented) && b.current && (x.current = !0);
|
|
1481
|
+
}), re = r.useMemo(() => ({
|
|
1482
|
+
onKeyDown: P,
|
|
1483
|
+
onPointerDown: te,
|
|
1484
|
+
onMouseDown: te,
|
|
1485
|
+
onClickCapture: F,
|
|
1486
|
+
onMouseDownCapture(e) {
|
|
1487
|
+
F(), ee(e);
|
|
1488
|
+
},
|
|
1489
|
+
onPointerDownCapture(e) {
|
|
1490
|
+
F(), ee(e);
|
|
1491
|
+
},
|
|
1492
|
+
onMouseUpCapture: F,
|
|
1493
|
+
onTouchEndCapture: F,
|
|
1494
|
+
onTouchMoveCapture: F
|
|
1495
|
+
}), [
|
|
1496
|
+
P,
|
|
1497
|
+
F,
|
|
1498
|
+
ee,
|
|
1499
|
+
te
|
|
1500
|
+
]);
|
|
1501
|
+
return r.useMemo(() => s ? {
|
|
1502
|
+
reference: I,
|
|
1503
|
+
floating: re,
|
|
1504
|
+
trigger: I
|
|
1505
|
+
} : {}, [
|
|
1506
|
+
s,
|
|
1507
|
+
I,
|
|
1508
|
+
re
|
|
1509
|
+
]);
|
|
1510
|
+
}
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
1513
|
+
function _r(e, t, n) {
|
|
1514
|
+
let { reference: r, floating: i } = e, a = At(t), o = jt(t), s = kt(o), c = Z(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
1515
|
+
switch (c) {
|
|
1516
|
+
case "top":
|
|
1517
|
+
p = {
|
|
1518
|
+
x: u,
|
|
1519
|
+
y: r.y - i.height
|
|
1520
|
+
};
|
|
1521
|
+
break;
|
|
1522
|
+
case "bottom":
|
|
1523
|
+
p = {
|
|
1524
|
+
x: u,
|
|
1525
|
+
y: r.y + r.height
|
|
1526
|
+
};
|
|
1527
|
+
break;
|
|
1528
|
+
case "right":
|
|
1529
|
+
p = {
|
|
1530
|
+
x: r.x + r.width,
|
|
1531
|
+
y: d
|
|
1532
|
+
};
|
|
1533
|
+
break;
|
|
1534
|
+
case "left":
|
|
1535
|
+
p = {
|
|
1536
|
+
x: r.x - i.width,
|
|
1537
|
+
y: d
|
|
1538
|
+
};
|
|
1539
|
+
break;
|
|
1540
|
+
default: p = {
|
|
1541
|
+
x: r.x,
|
|
1542
|
+
y: r.y
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
switch (Dt(t)) {
|
|
1546
|
+
case "start":
|
|
1547
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
1548
|
+
break;
|
|
1549
|
+
case "end":
|
|
1550
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
1551
|
+
break;
|
|
1552
|
+
}
|
|
1553
|
+
return p;
|
|
1554
|
+
}
|
|
1555
|
+
async function vr(e, t) {
|
|
1556
|
+
t === void 0 && (t = {});
|
|
1557
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Et(t, e), p = Ut(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Wt(await i.getClippingRect({
|
|
1558
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
1559
|
+
boundary: c,
|
|
1560
|
+
rootBoundary: l,
|
|
1561
|
+
strategy: s
|
|
1562
|
+
})), g = u === "floating" ? {
|
|
1563
|
+
x: n,
|
|
1564
|
+
y: r,
|
|
1565
|
+
width: a.floating.width,
|
|
1566
|
+
height: a.floating.height
|
|
1567
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
1568
|
+
x: 1,
|
|
1569
|
+
y: 1
|
|
1570
|
+
}, y = Wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1571
|
+
elements: o,
|
|
1572
|
+
rect: g,
|
|
1573
|
+
offsetParent: _,
|
|
1574
|
+
strategy: s
|
|
1575
|
+
}) : g);
|
|
1576
|
+
return {
|
|
1577
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
1578
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
1579
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
1580
|
+
right: (y.right - h.right + p.right) / v.x
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
var yr = 50, br = async (e, t, n) => {
|
|
1584
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
1585
|
+
...o,
|
|
1586
|
+
detectOverflow: vr
|
|
1587
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
1588
|
+
reference: e,
|
|
1589
|
+
floating: t,
|
|
1590
|
+
strategy: i
|
|
1591
|
+
}), { x: u, y: d } = _r(l, r, c), f = r, p = 0, m = {};
|
|
1592
|
+
for (let n = 0; n < a.length; n++) {
|
|
1593
|
+
let h = a[n];
|
|
1594
|
+
if (!h) continue;
|
|
1595
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
1596
|
+
x: u,
|
|
1597
|
+
y: d,
|
|
1598
|
+
initialPlacement: r,
|
|
1599
|
+
placement: f,
|
|
1600
|
+
strategy: i,
|
|
1601
|
+
middlewareData: m,
|
|
1602
|
+
rects: l,
|
|
1603
|
+
platform: s,
|
|
1604
|
+
elements: {
|
|
1605
|
+
reference: e,
|
|
1606
|
+
floating: t
|
|
1607
|
+
}
|
|
1608
|
+
});
|
|
1609
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
1610
|
+
...m[g],
|
|
1611
|
+
...b
|
|
1612
|
+
}, x && p < yr && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
1613
|
+
reference: e,
|
|
1614
|
+
floating: t,
|
|
1615
|
+
strategy: i
|
|
1616
|
+
}) : x.rects), {x: u, y: d} = _r(l, f, c)), n = -1);
|
|
1617
|
+
}
|
|
1618
|
+
return {
|
|
1619
|
+
x: u,
|
|
1620
|
+
y: d,
|
|
1621
|
+
placement: f,
|
|
1622
|
+
strategy: i,
|
|
1623
|
+
middlewareData: m
|
|
1624
|
+
};
|
|
1625
|
+
}, xr = function(e) {
|
|
1626
|
+
return e === void 0 && (e = {}), {
|
|
1627
|
+
name: "flip",
|
|
1628
|
+
options: e,
|
|
1629
|
+
async fn(t) {
|
|
1630
|
+
var n;
|
|
1631
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Et(e, t);
|
|
1632
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
1633
|
+
let g = Z(r), _ = At(o), v = Z(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Vt(o)] : Nt(o)), x = p !== "none";
|
|
1634
|
+
!d && x && b.push(...Bt(o, m, p, y));
|
|
1635
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
1636
|
+
if (l && w.push(C[g]), u) {
|
|
1637
|
+
let e = Mt(r, a, y);
|
|
1638
|
+
w.push(C[e[0]], C[e[1]]);
|
|
1639
|
+
}
|
|
1640
|
+
if (T = [...T, {
|
|
1641
|
+
placement: r,
|
|
1642
|
+
overflows: w
|
|
1643
|
+
}], !w.every((e) => e <= 0)) {
|
|
1644
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
1645
|
+
if (t && (!(u === "alignment" && _ !== At(t)) || T.every((e) => At(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
1646
|
+
data: {
|
|
1647
|
+
index: e,
|
|
1648
|
+
overflows: T
|
|
1649
|
+
},
|
|
1650
|
+
reset: { placement: t }
|
|
1651
|
+
};
|
|
1652
|
+
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
1653
|
+
if (!n) switch (f) {
|
|
1654
|
+
case "bestFit": {
|
|
1655
|
+
let e = T.filter((e) => {
|
|
1656
|
+
if (x) {
|
|
1657
|
+
let t = At(e.placement);
|
|
1658
|
+
return t === _ || t === "y";
|
|
1659
|
+
}
|
|
1660
|
+
return !0;
|
|
1661
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
1662
|
+
e && (n = e);
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1665
|
+
case "initialPlacement":
|
|
1666
|
+
n = o;
|
|
1667
|
+
break;
|
|
1668
|
+
}
|
|
1669
|
+
if (r !== n) return { reset: { placement: n } };
|
|
1670
|
+
}
|
|
1671
|
+
return {};
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
function Sr(e, t) {
|
|
1676
|
+
return {
|
|
1677
|
+
top: e.top - t.height,
|
|
1678
|
+
right: e.right - t.width,
|
|
1679
|
+
bottom: e.bottom - t.height,
|
|
1680
|
+
left: e.left - t.width
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
function Cr(e) {
|
|
1684
|
+
return yt.some((t) => e[t] >= 0);
|
|
1685
|
+
}
|
|
1686
|
+
var wr = function(e) {
|
|
1687
|
+
return e === void 0 && (e = {}), {
|
|
1688
|
+
name: "hide",
|
|
1689
|
+
options: e,
|
|
1690
|
+
async fn(t) {
|
|
1691
|
+
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = Et(e, t);
|
|
1692
|
+
switch (i) {
|
|
1693
|
+
case "referenceHidden": {
|
|
1694
|
+
let e = Sr(await r.detectOverflow(t, {
|
|
1695
|
+
...a,
|
|
1696
|
+
elementContext: "reference"
|
|
1697
|
+
}), n.reference);
|
|
1698
|
+
return { data: {
|
|
1699
|
+
referenceHiddenOffsets: e,
|
|
1700
|
+
referenceHidden: Cr(e)
|
|
1701
|
+
} };
|
|
1702
|
+
}
|
|
1703
|
+
case "escaped": {
|
|
1704
|
+
let e = Sr(await r.detectOverflow(t, {
|
|
1705
|
+
...a,
|
|
1706
|
+
altBoundary: !0
|
|
1707
|
+
}), n.floating);
|
|
1708
|
+
return { data: {
|
|
1709
|
+
escapedOffsets: e,
|
|
1710
|
+
escaped: Cr(e)
|
|
1711
|
+
} };
|
|
1712
|
+
}
|
|
1713
|
+
default: return {};
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
};
|
|
1717
|
+
}, Tr = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1718
|
+
async function Er(e, t) {
|
|
1719
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = Z(n), s = Dt(n), c = At(n) === "y", l = Tr.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Et(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
1720
|
+
mainAxis: d,
|
|
1721
|
+
crossAxis: 0,
|
|
1722
|
+
alignmentAxis: null
|
|
1723
|
+
} : {
|
|
1724
|
+
mainAxis: d.mainAxis || 0,
|
|
1725
|
+
crossAxis: d.crossAxis || 0,
|
|
1726
|
+
alignmentAxis: d.alignmentAxis
|
|
1727
|
+
};
|
|
1728
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
1729
|
+
x: p * u,
|
|
1730
|
+
y: f * l
|
|
1731
|
+
} : {
|
|
1732
|
+
x: f * l,
|
|
1733
|
+
y: p * u
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
var Dr = function(e) {
|
|
1737
|
+
return e === void 0 && (e = 0), {
|
|
1738
|
+
name: "offset",
|
|
1739
|
+
options: e,
|
|
1740
|
+
async fn(t) {
|
|
1741
|
+
var n;
|
|
1742
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Er(t, e);
|
|
1743
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
1744
|
+
x: r + s.x,
|
|
1745
|
+
y: i + s.y,
|
|
1746
|
+
data: {
|
|
1747
|
+
...s,
|
|
1748
|
+
placement: a
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
}
|
|
1752
|
+
};
|
|
1753
|
+
}, Or = function(e) {
|
|
1754
|
+
return e === void 0 && (e = {}), {
|
|
1755
|
+
name: "shift",
|
|
1756
|
+
options: e,
|
|
1757
|
+
async fn(t) {
|
|
1758
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
1759
|
+
let { x: t, y: n } = e;
|
|
1760
|
+
return {
|
|
1761
|
+
x: t,
|
|
1762
|
+
y: n
|
|
1763
|
+
};
|
|
1764
|
+
} }, ...l } = Et(e, t), u = {
|
|
1765
|
+
x: n,
|
|
1766
|
+
y: r
|
|
1767
|
+
}, d = await a.detectOverflow(t, l), f = At(Z(i)), p = Ot(f), m = u[p], h = u[f];
|
|
1768
|
+
if (o) {
|
|
1769
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
1770
|
+
m = Tt(n, m, r);
|
|
1771
|
+
}
|
|
1772
|
+
if (s) {
|
|
1773
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
1774
|
+
h = Tt(n, h, r);
|
|
1775
|
+
}
|
|
1776
|
+
let g = c.fn({
|
|
1777
|
+
...t,
|
|
1778
|
+
[p]: m,
|
|
1779
|
+
[f]: h
|
|
1780
|
+
});
|
|
1781
|
+
return {
|
|
1782
|
+
...g,
|
|
1783
|
+
data: {
|
|
1784
|
+
x: g.x - n,
|
|
1785
|
+
y: g.y - r,
|
|
1786
|
+
enabled: {
|
|
1787
|
+
[p]: o,
|
|
1788
|
+
[f]: s
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
};
|
|
1794
|
+
}, kr = function(e) {
|
|
1795
|
+
return e === void 0 && (e = {}), {
|
|
1796
|
+
options: e,
|
|
1797
|
+
fn(t) {
|
|
1798
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = Et(e, t), u = {
|
|
1799
|
+
x: n,
|
|
1800
|
+
y: r
|
|
1801
|
+
}, d = At(i), f = Ot(d), p = u[f], m = u[d], h = Et(s, t), g = typeof h == "number" ? {
|
|
1802
|
+
mainAxis: h,
|
|
1803
|
+
crossAxis: 0
|
|
1804
|
+
} : {
|
|
1805
|
+
mainAxis: 0,
|
|
1806
|
+
crossAxis: 0,
|
|
1807
|
+
...h
|
|
1808
|
+
};
|
|
1809
|
+
if (c) {
|
|
1810
|
+
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
1811
|
+
p < t ? p = t : p > n && (p = n);
|
|
1812
|
+
}
|
|
1813
|
+
if (l) {
|
|
1814
|
+
let e = f === "y" ? "width" : "height", t = Tr.has(Z(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
|
|
1815
|
+
m < n ? m = n : m > r && (m = r);
|
|
1816
|
+
}
|
|
1817
|
+
return {
|
|
1818
|
+
[f]: p,
|
|
1819
|
+
[d]: m
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
}, Ar = function(e) {
|
|
1824
|
+
return e === void 0 && (e = {}), {
|
|
1825
|
+
name: "size",
|
|
1826
|
+
options: e,
|
|
1827
|
+
async fn(t) {
|
|
1828
|
+
var n, r;
|
|
1829
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = Et(e, t), u = await o.detectOverflow(t, l), d = Z(i), f = Dt(i), p = At(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
1830
|
+
d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
|
|
1831
|
+
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = bt(h - u[g], v), x = bt(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
|
|
1832
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
|
|
1833
|
+
let e = X(u.left, 0), t = X(u.right, 0), n = X(u.top, 0), r = X(u.bottom, 0);
|
|
1834
|
+
p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : X(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : X(u.top, u.bottom));
|
|
1835
|
+
}
|
|
1836
|
+
await c({
|
|
1837
|
+
...t,
|
|
1838
|
+
availableWidth: w,
|
|
1839
|
+
availableHeight: C
|
|
1840
|
+
});
|
|
1841
|
+
let T = await o.getDimensions(s.floating);
|
|
1842
|
+
return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
};
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
1848
|
+
function jr(e) {
|
|
1849
|
+
let t = G(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = W(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = xt(n) !== a || xt(r) !== o;
|
|
1850
|
+
return s && (n = a, r = o), {
|
|
1851
|
+
width: n,
|
|
1852
|
+
height: r,
|
|
1853
|
+
$: s
|
|
1854
|
+
};
|
|
1855
|
+
}
|
|
1856
|
+
function Mr(e) {
|
|
1857
|
+
return U(e) ? e : e.contextElement;
|
|
1858
|
+
}
|
|
1859
|
+
function Nr(e) {
|
|
1860
|
+
let t = Mr(e);
|
|
1861
|
+
if (!W(t)) return Ct(1);
|
|
1862
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = jr(t), o = (a ? xt(n.width) : n.width) / r, s = (a ? xt(n.height) : n.height) / i;
|
|
1863
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1864
|
+
x: o,
|
|
1865
|
+
y: s
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
var Pr = /* @__PURE__ */ Ct(0);
|
|
1869
|
+
function Fr(e) {
|
|
1870
|
+
let t = V(e);
|
|
1871
|
+
return !Fe() || !t.visualViewport ? Pr : {
|
|
1872
|
+
x: t.visualViewport.offsetLeft,
|
|
1873
|
+
y: t.visualViewport.offsetTop
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
function Ir(e, t, n) {
|
|
1877
|
+
return t === void 0 && (t = !1), !n || t && n !== V(e) ? !1 : t;
|
|
1878
|
+
}
|
|
1879
|
+
function Lr(e, t, n, r) {
|
|
1880
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1881
|
+
let i = e.getBoundingClientRect(), a = Mr(e), o = Ct(1);
|
|
1882
|
+
t && (r ? U(r) && (o = Nr(r)) : o = Nr(e));
|
|
1883
|
+
let s = Ir(a, n, r) ? Fr(a) : Ct(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
1884
|
+
if (a) {
|
|
1885
|
+
let e = V(a), t = r && U(r) ? V(r) : r, n = e, i = Ve(n);
|
|
1886
|
+
for (; i && r && t !== n;) {
|
|
1887
|
+
let e = Nr(i), t = i.getBoundingClientRect(), r = G(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
1888
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = V(i), i = Ve(n);
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
return Wt({
|
|
1892
|
+
width: u,
|
|
1893
|
+
height: d,
|
|
1894
|
+
x: c,
|
|
1895
|
+
y: l
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
function Rr(e, t) {
|
|
1899
|
+
let n = Le(e).scrollLeft;
|
|
1900
|
+
return t ? t.left + n : Lr(H(e)).left + n;
|
|
1901
|
+
}
|
|
1902
|
+
function zr(e, t) {
|
|
1903
|
+
let n = e.getBoundingClientRect();
|
|
1904
|
+
return {
|
|
1905
|
+
x: n.left + t.scrollLeft - Rr(e, n),
|
|
1906
|
+
y: n.top + t.scrollTop
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
function Br(e) {
|
|
1910
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = H(r), s = t ? Oe(t.floating) : !1;
|
|
1911
|
+
if (r === o || s && a) return n;
|
|
1912
|
+
let c = {
|
|
1913
|
+
scrollLeft: 0,
|
|
1914
|
+
scrollTop: 0
|
|
1915
|
+
}, l = Ct(1), u = Ct(0), d = W(r);
|
|
1916
|
+
if ((d || !d && !a) && ((B(r) !== "body" || Ee(o)) && (c = Le(r)), d)) {
|
|
1917
|
+
let e = Lr(r);
|
|
1918
|
+
l = Nr(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
1919
|
+
}
|
|
1920
|
+
let f = o && !d && !a ? zr(o, c) : Ct(0);
|
|
1921
|
+
return {
|
|
1922
|
+
width: n.width * l.x,
|
|
1923
|
+
height: n.height * l.y,
|
|
1924
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
1925
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
1926
|
+
};
|
|
1927
|
+
}
|
|
1928
|
+
function Vr(e) {
|
|
1929
|
+
return Array.from(e.getClientRects());
|
|
1930
|
+
}
|
|
1931
|
+
function Hr(e) {
|
|
1932
|
+
let t = H(e), n = Le(e), r = e.ownerDocument.body, i = X(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = X(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Rr(e), s = -n.scrollTop;
|
|
1933
|
+
return G(r).direction === "rtl" && (o += X(t.clientWidth, r.clientWidth) - i), {
|
|
1934
|
+
width: i,
|
|
1935
|
+
height: a,
|
|
1936
|
+
x: o,
|
|
1937
|
+
y: s
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
var Ur = 25;
|
|
1941
|
+
function Wr(e, t) {
|
|
1942
|
+
let n = V(e), r = H(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
1943
|
+
if (i) {
|
|
1944
|
+
a = i.width, o = i.height;
|
|
1945
|
+
let e = Fe();
|
|
1946
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
1947
|
+
}
|
|
1948
|
+
let l = Rr(r);
|
|
1949
|
+
if (l <= 0) {
|
|
1950
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
1951
|
+
o <= Ur && (a -= o);
|
|
1952
|
+
} else l <= Ur && (a += l);
|
|
1953
|
+
return {
|
|
1954
|
+
width: a,
|
|
1955
|
+
height: o,
|
|
1956
|
+
x: s,
|
|
1957
|
+
y: c
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
function Gr(e, t) {
|
|
1961
|
+
let n = Lr(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = W(e) ? Nr(e) : Ct(1);
|
|
1962
|
+
return {
|
|
1963
|
+
width: e.clientWidth * a.x,
|
|
1964
|
+
height: e.clientHeight * a.y,
|
|
1965
|
+
x: i * a.x,
|
|
1966
|
+
y: r * a.y
|
|
1967
|
+
};
|
|
1968
|
+
}
|
|
1969
|
+
function Kr(e, t, n) {
|
|
1970
|
+
let r;
|
|
1971
|
+
if (t === "viewport") r = Wr(e, n);
|
|
1972
|
+
else if (t === "document") r = Hr(H(e));
|
|
1973
|
+
else if (U(t)) r = Gr(t, n);
|
|
1974
|
+
else {
|
|
1975
|
+
let n = Fr(e);
|
|
1976
|
+
r = {
|
|
1977
|
+
x: t.x - n.x,
|
|
1978
|
+
y: t.y - n.y,
|
|
1979
|
+
width: t.width,
|
|
1980
|
+
height: t.height
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
return Wt(r);
|
|
1984
|
+
}
|
|
1985
|
+
function qr(e, t) {
|
|
1986
|
+
let n = Re(e);
|
|
1987
|
+
return n === t || !U(n) || Ie(n) ? !1 : G(n).position === "fixed" || qr(n, t);
|
|
1988
|
+
}
|
|
1989
|
+
function Jr(e, t) {
|
|
1990
|
+
let n = t.get(e);
|
|
1991
|
+
if (n) return n;
|
|
1992
|
+
let r = Be(e, [], !1).filter((e) => U(e) && B(e) !== "body"), i = null, a = G(e).position === "fixed", o = a ? Re(e) : e;
|
|
1993
|
+
for (; U(o) && !Ie(o);) {
|
|
1994
|
+
let t = G(o), n = Ne(o);
|
|
1995
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || Ee(o) && !n && qr(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Re(o);
|
|
1996
|
+
}
|
|
1997
|
+
return t.set(e, r), r;
|
|
1998
|
+
}
|
|
1999
|
+
function Yr(e) {
|
|
2000
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? Oe(t) ? [] : Jr(t, this._c) : [].concat(n), r], o = Kr(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
2001
|
+
for (let e = 1; e < a.length; e++) {
|
|
2002
|
+
let n = Kr(t, a[e], i);
|
|
2003
|
+
s = X(n.top, s), c = bt(n.right, c), l = bt(n.bottom, l), u = X(n.left, u);
|
|
2004
|
+
}
|
|
2005
|
+
return {
|
|
2006
|
+
width: c - u,
|
|
2007
|
+
height: l - s,
|
|
2008
|
+
x: u,
|
|
2009
|
+
y: s
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
function Xr(e) {
|
|
2013
|
+
let { width: t, height: n } = jr(e);
|
|
2014
|
+
return {
|
|
2015
|
+
width: t,
|
|
2016
|
+
height: n
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
function Zr(e, t, n) {
|
|
2020
|
+
let r = W(t), i = H(t), a = n === "fixed", o = Lr(e, !0, a, t), s = {
|
|
2021
|
+
scrollLeft: 0,
|
|
2022
|
+
scrollTop: 0
|
|
2023
|
+
}, c = Ct(0);
|
|
2024
|
+
function l() {
|
|
2025
|
+
c.x = Rr(i);
|
|
2026
|
+
}
|
|
2027
|
+
if (r || !r && !a) if ((B(t) !== "body" || Ee(i)) && (s = Le(t)), r) {
|
|
2028
|
+
let e = Lr(t, !0, a, t);
|
|
2029
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
2030
|
+
} else i && l();
|
|
2031
|
+
a && !r && i && l();
|
|
2032
|
+
let u = i && !r && !a ? zr(i, s) : Ct(0);
|
|
2033
|
+
return {
|
|
2034
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
2035
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
2036
|
+
width: o.width,
|
|
2037
|
+
height: o.height
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
function Qr(e) {
|
|
2041
|
+
return G(e).position === "static";
|
|
2042
|
+
}
|
|
2043
|
+
function $r(e, t) {
|
|
2044
|
+
if (!W(e) || G(e).position === "fixed") return null;
|
|
2045
|
+
if (t) return t(e);
|
|
2046
|
+
let n = e.offsetParent;
|
|
2047
|
+
return H(e) === n && (n = n.ownerDocument.body), n;
|
|
2048
|
+
}
|
|
2049
|
+
function ei(e, t) {
|
|
2050
|
+
let n = V(e);
|
|
2051
|
+
if (Oe(e)) return n;
|
|
2052
|
+
if (!W(e)) {
|
|
2053
|
+
let t = Re(e);
|
|
2054
|
+
for (; t && !Ie(t);) {
|
|
2055
|
+
if (U(t) && !Qr(t)) return t;
|
|
2056
|
+
t = Re(t);
|
|
2057
|
+
}
|
|
2058
|
+
return n;
|
|
2059
|
+
}
|
|
2060
|
+
let r = $r(e, t);
|
|
2061
|
+
for (; r && De(r) && Qr(r);) r = $r(r, t);
|
|
2062
|
+
return r && Ie(r) && Qr(r) && !Ne(r) ? n : r || Pe(e) || n;
|
|
2063
|
+
}
|
|
2064
|
+
var ti = async function(e) {
|
|
2065
|
+
let t = this.getOffsetParent || ei, n = this.getDimensions, r = await n(e.floating);
|
|
2066
|
+
return {
|
|
2067
|
+
reference: Zr(e.reference, await t(e.floating), e.strategy),
|
|
2068
|
+
floating: {
|
|
2069
|
+
x: 0,
|
|
2070
|
+
y: 0,
|
|
2071
|
+
width: r.width,
|
|
2072
|
+
height: r.height
|
|
2073
|
+
}
|
|
2074
|
+
};
|
|
2075
|
+
};
|
|
2076
|
+
function ni(e) {
|
|
2077
|
+
return G(e).direction === "rtl";
|
|
2078
|
+
}
|
|
2079
|
+
var ri = {
|
|
2080
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Br,
|
|
2081
|
+
getDocumentElement: H,
|
|
2082
|
+
getClippingRect: Yr,
|
|
2083
|
+
getOffsetParent: ei,
|
|
2084
|
+
getElementRects: ti,
|
|
2085
|
+
getClientRects: Vr,
|
|
2086
|
+
getDimensions: Xr,
|
|
2087
|
+
getScale: Nr,
|
|
2088
|
+
isElement: U,
|
|
2089
|
+
isRTL: ni
|
|
2090
|
+
};
|
|
2091
|
+
function ii(e, t) {
|
|
2092
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2093
|
+
}
|
|
2094
|
+
function ai(e, t) {
|
|
2095
|
+
let n = null, r, i = H(e);
|
|
2096
|
+
function a() {
|
|
2097
|
+
var e;
|
|
2098
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
2099
|
+
}
|
|
2100
|
+
function o(s, c) {
|
|
2101
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
2102
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
2103
|
+
if (s || t(), !f || !p) return;
|
|
2104
|
+
let m = St(d), h = St(i.clientWidth - (u + f)), g = St(i.clientHeight - (d + p)), _ = St(u), v = {
|
|
2105
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
2106
|
+
threshold: X(0, bt(1, c)) || 1
|
|
2107
|
+
}, y = !0;
|
|
2108
|
+
function b(t) {
|
|
2109
|
+
let n = t[0].intersectionRatio;
|
|
2110
|
+
if (n !== c) {
|
|
2111
|
+
if (!y) return o();
|
|
2112
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
2113
|
+
o(!1, 1e-7);
|
|
2114
|
+
}, 1e3);
|
|
2115
|
+
}
|
|
2116
|
+
n === 1 && !ii(l, e.getBoundingClientRect()) && o(), y = !1;
|
|
2117
|
+
}
|
|
2118
|
+
try {
|
|
2119
|
+
n = new IntersectionObserver(b, {
|
|
2120
|
+
...v,
|
|
2121
|
+
root: i.ownerDocument
|
|
2122
|
+
});
|
|
2123
|
+
} catch {
|
|
2124
|
+
n = new IntersectionObserver(b, v);
|
|
2125
|
+
}
|
|
2126
|
+
n.observe(e);
|
|
2127
|
+
}
|
|
2128
|
+
return o(!0), a;
|
|
2129
|
+
}
|
|
2130
|
+
function oi(e, t, n, r) {
|
|
2131
|
+
r === void 0 && (r = {});
|
|
2132
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Mr(e), u = i || a ? [...l ? Be(l) : [], ...t ? Be(t) : []] : [];
|
|
2133
|
+
u.forEach((e) => {
|
|
2134
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
2135
|
+
});
|
|
2136
|
+
let d = l && s ? ai(l, n) : null, f = -1, p = null;
|
|
2137
|
+
o && (p = new ResizeObserver((e) => {
|
|
2138
|
+
let [r] = e;
|
|
2139
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
2140
|
+
var e;
|
|
2141
|
+
(e = p) == null || e.observe(t);
|
|
2142
|
+
})), n();
|
|
2143
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
2144
|
+
let m, h = c ? Lr(e) : null;
|
|
2145
|
+
c && g();
|
|
2146
|
+
function g() {
|
|
2147
|
+
let t = Lr(e);
|
|
2148
|
+
h && !ii(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
2149
|
+
}
|
|
2150
|
+
return n(), () => {
|
|
2151
|
+
var e;
|
|
2152
|
+
u.forEach((e) => {
|
|
2153
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
2154
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
2155
|
+
};
|
|
2156
|
+
}
|
|
2157
|
+
var si = Dr, ci = Or, li = xr, ui = Ar, di = wr, fi = kr, pi = (e, t, n) => {
|
|
2158
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
2159
|
+
platform: ri,
|
|
2160
|
+
...n
|
|
2161
|
+
}, a = {
|
|
2162
|
+
...i.platform,
|
|
2163
|
+
_c: r
|
|
2164
|
+
};
|
|
2165
|
+
return br(e, t, {
|
|
2166
|
+
...i,
|
|
2167
|
+
platform: a
|
|
2168
|
+
});
|
|
2169
|
+
}, mi = typeof document < "u" ? a : function() {};
|
|
2170
|
+
function hi(e, t) {
|
|
2171
|
+
if (e === t) return !0;
|
|
2172
|
+
if (typeof e != typeof t) return !1;
|
|
2173
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
2174
|
+
let n, r, i;
|
|
2175
|
+
if (e && t && typeof e == "object") {
|
|
2176
|
+
if (Array.isArray(e)) {
|
|
2177
|
+
if (n = e.length, n !== t.length) return !1;
|
|
2178
|
+
for (r = n; r-- !== 0;) if (!hi(e[r], t[r])) return !1;
|
|
2179
|
+
return !0;
|
|
2180
|
+
}
|
|
2181
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
2182
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
2183
|
+
for (r = n; r-- !== 0;) {
|
|
2184
|
+
let n = i[r];
|
|
2185
|
+
if (!(n === "_owner" && e.$$typeof) && !hi(e[n], t[n])) return !1;
|
|
2186
|
+
}
|
|
2187
|
+
return !0;
|
|
2188
|
+
}
|
|
2189
|
+
return e !== e && t !== t;
|
|
2190
|
+
}
|
|
2191
|
+
function gi(e) {
|
|
2192
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2193
|
+
}
|
|
2194
|
+
function _i(e, t) {
|
|
2195
|
+
let n = gi(e);
|
|
2196
|
+
return Math.round(t * n) / n;
|
|
2197
|
+
}
|
|
2198
|
+
function vi(e) {
|
|
2199
|
+
let t = r.useRef(e);
|
|
2200
|
+
return mi(() => {
|
|
2201
|
+
t.current = e;
|
|
2202
|
+
}), t;
|
|
2203
|
+
}
|
|
2204
|
+
function yi(e) {
|
|
2205
|
+
e === void 0 && (e = {});
|
|
2206
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: i = [], platform: a, elements: { reference: o, floating: s } = {}, transform: l = !0, whileElementsMounted: u, open: d } = e, [f, p] = r.useState({
|
|
2207
|
+
x: 0,
|
|
2208
|
+
y: 0,
|
|
2209
|
+
strategy: n,
|
|
2210
|
+
placement: t,
|
|
2211
|
+
middlewareData: {},
|
|
2212
|
+
isPositioned: !1
|
|
2213
|
+
}), [m, h] = r.useState(i);
|
|
2214
|
+
hi(m, i) || h(i);
|
|
2215
|
+
let [g, _] = r.useState(null), [v, y] = r.useState(null), b = r.useCallback((e) => {
|
|
2216
|
+
e !== w.current && (w.current = e, _(e));
|
|
2217
|
+
}, []), x = r.useCallback((e) => {
|
|
2218
|
+
e !== T.current && (T.current = e, y(e));
|
|
2219
|
+
}, []), S = o || g, C = s || v, w = r.useRef(null), T = r.useRef(null), E = r.useRef(f), D = u != null, O = vi(u), k = vi(a), A = vi(d), j = r.useCallback(() => {
|
|
2220
|
+
if (!w.current || !T.current) return;
|
|
2221
|
+
let e = {
|
|
2222
|
+
placement: t,
|
|
2223
|
+
strategy: n,
|
|
2224
|
+
middleware: m
|
|
2225
|
+
};
|
|
2226
|
+
k.current && (e.platform = k.current), pi(w.current, T.current, e).then((e) => {
|
|
2227
|
+
let t = {
|
|
2228
|
+
...e,
|
|
2229
|
+
isPositioned: A.current !== !1
|
|
2230
|
+
};
|
|
2231
|
+
M.current && !hi(E.current, t) && (E.current = t, c.flushSync(() => {
|
|
2232
|
+
p(t);
|
|
2233
|
+
}));
|
|
2234
|
+
});
|
|
2235
|
+
}, [
|
|
2236
|
+
m,
|
|
2237
|
+
t,
|
|
2238
|
+
n,
|
|
2239
|
+
k,
|
|
2240
|
+
A
|
|
2241
|
+
]);
|
|
2242
|
+
mi(() => {
|
|
2243
|
+
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
|
|
2244
|
+
...e,
|
|
2245
|
+
isPositioned: !1
|
|
2246
|
+
})));
|
|
2247
|
+
}, [d]);
|
|
2248
|
+
let M = r.useRef(!1);
|
|
2249
|
+
mi(() => (M.current = !0, () => {
|
|
2250
|
+
M.current = !1;
|
|
2251
|
+
}), []), mi(() => {
|
|
2252
|
+
if (S && (w.current = S), C && (T.current = C), S && C) {
|
|
2253
|
+
if (O.current) return O.current(S, C, j);
|
|
2254
|
+
j();
|
|
2255
|
+
}
|
|
2256
|
+
}, [
|
|
2257
|
+
S,
|
|
2258
|
+
C,
|
|
2259
|
+
j,
|
|
2260
|
+
O,
|
|
2261
|
+
D
|
|
2262
|
+
]);
|
|
2263
|
+
let N = r.useMemo(() => ({
|
|
2264
|
+
reference: w,
|
|
2265
|
+
floating: T,
|
|
2266
|
+
setReference: b,
|
|
2267
|
+
setFloating: x
|
|
2268
|
+
}), [b, x]), P = r.useMemo(() => ({
|
|
2269
|
+
reference: S,
|
|
2270
|
+
floating: C
|
|
2271
|
+
}), [S, C]), F = r.useMemo(() => {
|
|
2272
|
+
let e = {
|
|
2273
|
+
position: n,
|
|
2274
|
+
left: 0,
|
|
2275
|
+
top: 0
|
|
2276
|
+
};
|
|
2277
|
+
if (!P.floating) return e;
|
|
2278
|
+
let t = _i(P.floating, f.x), r = _i(P.floating, f.y);
|
|
2279
|
+
return l ? {
|
|
2280
|
+
...e,
|
|
2281
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
2282
|
+
...gi(P.floating) >= 1.5 && { willChange: "transform" }
|
|
2283
|
+
} : {
|
|
2284
|
+
position: n,
|
|
2285
|
+
left: t,
|
|
2286
|
+
top: r
|
|
2287
|
+
};
|
|
2288
|
+
}, [
|
|
2289
|
+
n,
|
|
2290
|
+
l,
|
|
2291
|
+
P.floating,
|
|
2292
|
+
f.x,
|
|
2293
|
+
f.y
|
|
2294
|
+
]);
|
|
2295
|
+
return r.useMemo(() => ({
|
|
2296
|
+
...f,
|
|
2297
|
+
update: j,
|
|
2298
|
+
refs: N,
|
|
2299
|
+
elements: P,
|
|
2300
|
+
floatingStyles: F
|
|
2301
|
+
}), [
|
|
2302
|
+
f,
|
|
2303
|
+
j,
|
|
2304
|
+
N,
|
|
2305
|
+
P,
|
|
2306
|
+
F
|
|
2307
|
+
]);
|
|
2308
|
+
}
|
|
2309
|
+
var bi = (e, t) => {
|
|
2310
|
+
let n = si(e);
|
|
2311
|
+
return {
|
|
2312
|
+
name: n.name,
|
|
2313
|
+
fn: n.fn,
|
|
2314
|
+
options: [e, t]
|
|
2315
|
+
};
|
|
2316
|
+
}, xi = (e, t) => {
|
|
2317
|
+
let n = ci(e);
|
|
2318
|
+
return {
|
|
2319
|
+
name: n.name,
|
|
2320
|
+
fn: n.fn,
|
|
2321
|
+
options: [e, t]
|
|
2322
|
+
};
|
|
2323
|
+
}, Si = (e, t) => ({
|
|
2324
|
+
fn: fi(e).fn,
|
|
2325
|
+
options: [e, t]
|
|
2326
|
+
}), Ci = (e, t) => {
|
|
2327
|
+
let n = li(e);
|
|
2328
|
+
return {
|
|
2329
|
+
name: n.name,
|
|
2330
|
+
fn: n.fn,
|
|
2331
|
+
options: [e, t]
|
|
2332
|
+
};
|
|
2333
|
+
}, wi = (e, t) => {
|
|
2334
|
+
let n = ui(e);
|
|
2335
|
+
return {
|
|
2336
|
+
name: n.name,
|
|
2337
|
+
fn: n.fn,
|
|
2338
|
+
options: [e, t]
|
|
2339
|
+
};
|
|
2340
|
+
}, Ti = (e, t) => {
|
|
2341
|
+
let n = di(e);
|
|
2342
|
+
return {
|
|
2343
|
+
name: n.name,
|
|
2344
|
+
fn: n.fn,
|
|
2345
|
+
options: [e, t]
|
|
2346
|
+
};
|
|
2347
|
+
}, Q = (e, t, n, r, i, a, ...o) => {
|
|
2348
|
+
if (o.length > 0) throw Error(process.env.NODE_ENV === "production" ? x(1) : "Unsupported number of selectors");
|
|
2349
|
+
let s;
|
|
2350
|
+
if (e && t && n && r && i && a) s = (o, s, c, l) => a(e(o, s, c, l), t(o, s, c, l), n(o, s, c, l), r(o, s, c, l), i(o, s, c, l), s, c, l);
|
|
2351
|
+
else if (e && t && n && r && i) s = (a, o, s, c) => i(e(a, o, s, c), t(a, o, s, c), n(a, o, s, c), r(a, o, s, c), o, s, c);
|
|
2352
|
+
else if (e && t && n && r) s = (i, a, o, s) => r(e(i, a, o, s), t(i, a, o, s), n(i, a, o, s), a, o, s);
|
|
2353
|
+
else if (e && t && n) s = (r, i, a, o) => n(e(r, i, a, o), t(r, i, a, o), i, a, o);
|
|
2354
|
+
else if (e && t) s = (n, r, i, a) => t(e(n, r, i, a), r, i, a);
|
|
2355
|
+
else if (e) s = e;
|
|
2356
|
+
else throw Error("Missing arguments");
|
|
2357
|
+
return s;
|
|
2358
|
+
}, Ei = /* @__PURE__ */ t(((t) => {
|
|
2359
|
+
var n = e("react");
|
|
2360
|
+
function r(e, t) {
|
|
2361
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
2362
|
+
}
|
|
2363
|
+
var i = typeof Object.is == "function" ? Object.is : r, a = n.useState, o = n.useEffect, s = n.useLayoutEffect, c = n.useDebugValue;
|
|
2364
|
+
function l(e, t) {
|
|
2365
|
+
var n = t(), r = a({ inst: {
|
|
2366
|
+
value: n,
|
|
2367
|
+
getSnapshot: t
|
|
2368
|
+
} }), i = r[0].inst, l = r[1];
|
|
2369
|
+
return s(function() {
|
|
2370
|
+
i.value = n, i.getSnapshot = t, u(i) && l({ inst: i });
|
|
2371
|
+
}, [
|
|
2372
|
+
e,
|
|
2373
|
+
n,
|
|
2374
|
+
t
|
|
2375
|
+
]), o(function() {
|
|
2376
|
+
return u(i) && l({ inst: i }), e(function() {
|
|
2377
|
+
u(i) && l({ inst: i });
|
|
2378
|
+
});
|
|
2379
|
+
}, [e]), c(n), n;
|
|
2380
|
+
}
|
|
2381
|
+
function u(e) {
|
|
2382
|
+
var t = e.getSnapshot;
|
|
2383
|
+
e = e.value;
|
|
2384
|
+
try {
|
|
2385
|
+
var n = t();
|
|
2386
|
+
return !i(e, n);
|
|
2387
|
+
} catch {
|
|
2388
|
+
return !0;
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
function d(e, t) {
|
|
2392
|
+
return t();
|
|
2393
|
+
}
|
|
2394
|
+
var f = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? d : l;
|
|
2395
|
+
t.useSyncExternalStore = n.useSyncExternalStore === void 0 ? f : n.useSyncExternalStore;
|
|
2396
|
+
})), Di = /* @__PURE__ */ t(((t) => {
|
|
2397
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
2398
|
+
function n(e, t) {
|
|
2399
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
2400
|
+
}
|
|
2401
|
+
function r(e, t) {
|
|
2402
|
+
f || o.startTransition === void 0 || (f = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
2403
|
+
var n = t();
|
|
2404
|
+
if (!p) {
|
|
2405
|
+
var r = t();
|
|
2406
|
+
s(n, r) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), p = !0);
|
|
2407
|
+
}
|
|
2408
|
+
r = c({ inst: {
|
|
2409
|
+
value: n,
|
|
2410
|
+
getSnapshot: t
|
|
2411
|
+
} });
|
|
2412
|
+
var a = r[0].inst, m = r[1];
|
|
2413
|
+
return u(function() {
|
|
2414
|
+
a.value = n, a.getSnapshot = t, i(a) && m({ inst: a });
|
|
2415
|
+
}, [
|
|
2416
|
+
e,
|
|
2417
|
+
n,
|
|
2418
|
+
t
|
|
2419
|
+
]), l(function() {
|
|
2420
|
+
return i(a) && m({ inst: a }), e(function() {
|
|
2421
|
+
i(a) && m({ inst: a });
|
|
2422
|
+
});
|
|
2423
|
+
}, [e]), d(n), n;
|
|
2424
|
+
}
|
|
2425
|
+
function i(e) {
|
|
2426
|
+
var t = e.getSnapshot;
|
|
2427
|
+
e = e.value;
|
|
2428
|
+
try {
|
|
2429
|
+
var n = t();
|
|
2430
|
+
return !s(e, n);
|
|
2431
|
+
} catch {
|
|
2432
|
+
return !0;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
function a(e, t) {
|
|
2436
|
+
return t();
|
|
2437
|
+
}
|
|
2438
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
2439
|
+
var o = e("react"), s = typeof Object.is == "function" ? Object.is : n, c = o.useState, l = o.useEffect, u = o.useLayoutEffect, d = o.useDebugValue, f = !1, p = !1, m = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? a : r;
|
|
2440
|
+
t.useSyncExternalStore = o.useSyncExternalStore === void 0 ? m : o.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2441
|
+
})();
|
|
2442
|
+
})), Oi = /* @__PURE__ */ t(((e, t) => {
|
|
2443
|
+
process.env.NODE_ENV === "production" ? t.exports = Ei() : t.exports = Di();
|
|
2444
|
+
})), ki = /* @__PURE__ */ t(((t) => {
|
|
2445
|
+
var n = e("react"), r = Oi();
|
|
2446
|
+
function i(e, t) {
|
|
2447
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
2448
|
+
}
|
|
2449
|
+
var a = typeof Object.is == "function" ? Object.is : i, o = r.useSyncExternalStore, s = n.useRef, c = n.useEffect, l = n.useMemo, u = n.useDebugValue;
|
|
2450
|
+
t.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
|
|
2451
|
+
var d = s(null);
|
|
2452
|
+
if (d.current === null) {
|
|
2453
|
+
var f = {
|
|
2454
|
+
hasValue: !1,
|
|
2455
|
+
value: null
|
|
2456
|
+
};
|
|
2457
|
+
d.current = f;
|
|
2458
|
+
} else f = d.current;
|
|
2459
|
+
d = l(function() {
|
|
2460
|
+
function e(e) {
|
|
2461
|
+
if (!o) {
|
|
2462
|
+
if (o = !0, s = e, e = r(e), i !== void 0 && f.hasValue) {
|
|
2463
|
+
var t = f.value;
|
|
2464
|
+
if (i(t, e)) return c = t;
|
|
2465
|
+
}
|
|
2466
|
+
return c = e;
|
|
2467
|
+
}
|
|
2468
|
+
if (t = c, a(s, e)) return t;
|
|
2469
|
+
var n = r(e);
|
|
2470
|
+
return i !== void 0 && i(t, n) ? (s = e, t) : (s = e, c = n);
|
|
2471
|
+
}
|
|
2472
|
+
var o = !1, s, c, l = n === void 0 ? null : n;
|
|
2473
|
+
return [function() {
|
|
2474
|
+
return e(t());
|
|
2475
|
+
}, l === null ? void 0 : function() {
|
|
2476
|
+
return e(l());
|
|
2477
|
+
}];
|
|
2478
|
+
}, [
|
|
2479
|
+
t,
|
|
2480
|
+
n,
|
|
2481
|
+
r,
|
|
2482
|
+
i
|
|
2483
|
+
]);
|
|
2484
|
+
var p = o(e, d[0], d[1]);
|
|
2485
|
+
return c(function() {
|
|
2486
|
+
f.hasValue = !0, f.value = p;
|
|
2487
|
+
}, [p]), u(p), p;
|
|
2488
|
+
};
|
|
2489
|
+
})), Ai = /* @__PURE__ */ t(((t) => {
|
|
2490
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
2491
|
+
function n(e, t) {
|
|
2492
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
2493
|
+
}
|
|
2494
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
2495
|
+
var r = e("react"), i = Oi(), a = typeof Object.is == "function" ? Object.is : n, o = i.useSyncExternalStore, s = r.useRef, c = r.useEffect, l = r.useMemo, u = r.useDebugValue;
|
|
2496
|
+
t.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
|
|
2497
|
+
var d = s(null);
|
|
2498
|
+
if (d.current === null) {
|
|
2499
|
+
var f = {
|
|
2500
|
+
hasValue: !1,
|
|
2501
|
+
value: null
|
|
2502
|
+
};
|
|
2503
|
+
d.current = f;
|
|
2504
|
+
} else f = d.current;
|
|
2505
|
+
d = l(function() {
|
|
2506
|
+
function e(e) {
|
|
2507
|
+
if (!o) {
|
|
2508
|
+
if (o = !0, s = e, e = r(e), i !== void 0 && f.hasValue) {
|
|
2509
|
+
var t = f.value;
|
|
2510
|
+
if (i(t, e)) return c = t;
|
|
2511
|
+
}
|
|
2512
|
+
return c = e;
|
|
2513
|
+
}
|
|
2514
|
+
if (t = c, a(s, e)) return t;
|
|
2515
|
+
var n = r(e);
|
|
2516
|
+
return i !== void 0 && i(t, n) ? (s = e, t) : (s = e, c = n);
|
|
2517
|
+
}
|
|
2518
|
+
var o = !1, s, c, l = n === void 0 ? null : n;
|
|
2519
|
+
return [function() {
|
|
2520
|
+
return e(t());
|
|
2521
|
+
}, l === null ? void 0 : function() {
|
|
2522
|
+
return e(l());
|
|
2523
|
+
}];
|
|
2524
|
+
}, [
|
|
2525
|
+
t,
|
|
2526
|
+
n,
|
|
2527
|
+
r,
|
|
2528
|
+
i
|
|
2529
|
+
]);
|
|
2530
|
+
var p = o(e, d[0], d[1]);
|
|
2531
|
+
return c(function() {
|
|
2532
|
+
f.hasValue = !0, f.value = p;
|
|
2533
|
+
}, [p]), u(p), p;
|
|
2534
|
+
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2535
|
+
})();
|
|
2536
|
+
})), ji = /* @__PURE__ */ t(((e, t) => {
|
|
2537
|
+
process.env.NODE_ENV === "production" ? t.exports = ki() : t.exports = Ai();
|
|
2538
|
+
})), Mi = Oi(), Ni = ji(), Pi = xn(19) ? Li : Ri;
|
|
2539
|
+
function Fi(e, t, n, r, i) {
|
|
2540
|
+
return Pi(e, t, n, r, i);
|
|
2541
|
+
}
|
|
2542
|
+
function Ii(e, t, n, i, a) {
|
|
2543
|
+
let o = r.useCallback(() => t(e.getSnapshot(), n, i, a), [
|
|
2544
|
+
e,
|
|
2545
|
+
t,
|
|
2546
|
+
n,
|
|
2547
|
+
i,
|
|
2548
|
+
a
|
|
2549
|
+
]);
|
|
2550
|
+
return (0, Mi.useSyncExternalStore)(e.subscribe, o, o);
|
|
2551
|
+
}
|
|
2552
|
+
m({
|
|
2553
|
+
before(e) {
|
|
2554
|
+
e.syncIndex = 0, e.didInitialize || (e.syncTick = 1, e.syncHooks = [], e.didChangeStore = !0, e.getSnapshot = () => {
|
|
2555
|
+
let t = !1;
|
|
2556
|
+
for (let n = 0; n < e.syncHooks.length; n += 1) {
|
|
2557
|
+
let r = e.syncHooks[n], i = r.selector(r.store.state, r.a1, r.a2, r.a3);
|
|
2558
|
+
(r.didChange || !Object.is(r.value, i)) && (t = !0, r.value = i, r.didChange = !1);
|
|
2559
|
+
}
|
|
2560
|
+
return t && (e.syncTick += 1), e.syncTick;
|
|
2561
|
+
});
|
|
2562
|
+
},
|
|
2563
|
+
after(e) {
|
|
2564
|
+
e.syncHooks.length > 0 && (e.didChangeStore && (e.didChangeStore = !1, e.subscribe = (t) => {
|
|
2565
|
+
let n = /* @__PURE__ */ new Set();
|
|
2566
|
+
for (let t of e.syncHooks) n.add(t.store);
|
|
2567
|
+
let r = [];
|
|
2568
|
+
for (let e of n) r.push(e.subscribe(t));
|
|
2569
|
+
return () => {
|
|
2570
|
+
for (let e of r) e();
|
|
2571
|
+
};
|
|
2572
|
+
}), (0, Mi.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
2573
|
+
}
|
|
2574
|
+
});
|
|
2575
|
+
function Li(e, t, n, r, i) {
|
|
2576
|
+
let a = p();
|
|
2577
|
+
if (!a) return Ii(e, t, n, r, i);
|
|
2578
|
+
let o = a.syncIndex;
|
|
2579
|
+
a.syncIndex += 1;
|
|
2580
|
+
let s;
|
|
2581
|
+
return a.didInitialize ? (s = a.syncHooks[o], (s.store !== e || s.selector !== t || !Object.is(s.a1, n) || !Object.is(s.a2, r) || !Object.is(s.a3, i)) && (s.store !== e && (a.didChangeStore = !0), s.store = e, s.selector = t, s.a1 = n, s.a2 = r, s.a3 = i, s.didChange = !0)) : (s = {
|
|
2582
|
+
store: e,
|
|
2583
|
+
selector: t,
|
|
2584
|
+
a1: n,
|
|
2585
|
+
a2: r,
|
|
2586
|
+
a3: i,
|
|
2587
|
+
value: t(e.getSnapshot(), n, r, i),
|
|
2588
|
+
didChange: !1
|
|
2589
|
+
}, a.syncHooks.push(s)), s.value;
|
|
2590
|
+
}
|
|
2591
|
+
function Ri(e, t, n, r, i) {
|
|
2592
|
+
return (0, Ni.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
2593
|
+
}
|
|
2594
|
+
//#endregion
|
|
2595
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.2.7_@types+react@19.2.13_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/esm/store/Store.js
|
|
2596
|
+
var zi = class {
|
|
2597
|
+
constructor(e) {
|
|
2598
|
+
this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
2599
|
+
}
|
|
2600
|
+
subscribe = (e) => (this.listeners.add(e), () => {
|
|
2601
|
+
this.listeners.delete(e);
|
|
2602
|
+
});
|
|
2603
|
+
getSnapshot = () => this.state;
|
|
2604
|
+
setState(e) {
|
|
2605
|
+
if (this.state === e) return;
|
|
2606
|
+
this.state = e, this.updateTick += 1;
|
|
2607
|
+
let t = this.updateTick;
|
|
2608
|
+
for (let n of this.listeners) {
|
|
2609
|
+
if (t !== this.updateTick) return;
|
|
2610
|
+
n(e);
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
update(e) {
|
|
2614
|
+
for (let t in e) if (!Object.is(this.state[t], e[t])) {
|
|
2615
|
+
this.setState({
|
|
2616
|
+
...this.state,
|
|
2617
|
+
...e
|
|
2618
|
+
});
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
set(e, t) {
|
|
2623
|
+
Object.is(this.state[e], t) || this.setState({
|
|
2624
|
+
...this.state,
|
|
2625
|
+
[e]: t
|
|
2626
|
+
});
|
|
2627
|
+
}
|
|
2628
|
+
notifyAll() {
|
|
2629
|
+
let e = { ...this.state };
|
|
2630
|
+
this.setState(e);
|
|
2631
|
+
}
|
|
2632
|
+
use(e, t, n, r) {
|
|
2633
|
+
return Fi(this, e, t, n, r);
|
|
2634
|
+
}
|
|
2635
|
+
}, Bi = class extends zi {
|
|
2636
|
+
constructor(e, t = {}, n) {
|
|
2637
|
+
super(e), this.context = t, this.selectors = n;
|
|
2638
|
+
}
|
|
2639
|
+
useSyncedValue(e, t) {
|
|
2640
|
+
r.useDebugValue(e), y(() => {
|
|
2641
|
+
this.state[e] !== t && this.set(e, t);
|
|
2642
|
+
}, [e, t]);
|
|
2643
|
+
}
|
|
2644
|
+
useSyncedValueWithCleanup(e, t) {
|
|
2645
|
+
let n = this;
|
|
2646
|
+
y(() => (n.state[e] !== t && n.set(e, t), () => {
|
|
2647
|
+
n.set(e, void 0);
|
|
2648
|
+
}), [
|
|
2649
|
+
n,
|
|
2650
|
+
e,
|
|
2651
|
+
t
|
|
2652
|
+
]);
|
|
2653
|
+
}
|
|
2654
|
+
useSyncedValues(e) {
|
|
2655
|
+
let t = this;
|
|
2656
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2657
|
+
r.useDebugValue(e, (e) => Object.keys(e));
|
|
2658
|
+
let t = r.useRef(Object.keys(e)).current, n = Object.keys(e);
|
|
2659
|
+
(t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
2660
|
+
}
|
|
2661
|
+
y(() => {
|
|
2662
|
+
t.update(e);
|
|
2663
|
+
}, [t, ...Object.values(e)]);
|
|
2664
|
+
}
|
|
2665
|
+
useControlledProp(e, t) {
|
|
2666
|
+
r.useDebugValue(e);
|
|
2667
|
+
let n = t !== void 0;
|
|
2668
|
+
if (y(() => {
|
|
2669
|
+
n && !Object.is(this.state[e], t) && super.setState({
|
|
2670
|
+
...this.state,
|
|
2671
|
+
[e]: t
|
|
2672
|
+
});
|
|
2673
|
+
}, [
|
|
2674
|
+
e,
|
|
2675
|
+
t,
|
|
2676
|
+
n
|
|
2677
|
+
]), process.env.NODE_ENV !== "production") {
|
|
2678
|
+
let t = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
2679
|
+
t.has(e) || t.set(e, n);
|
|
2680
|
+
let r = t.get(e);
|
|
2681
|
+
r !== void 0 && r !== n && console.error(`A component is changing the ${n ? "" : "un"}controlled state of ${e.toString()} to be ${n ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
select(e, t, n, r) {
|
|
2685
|
+
let i = this.selectors[e];
|
|
2686
|
+
return i(this.state, t, n, r);
|
|
2687
|
+
}
|
|
2688
|
+
useState(e, t, n, i) {
|
|
2689
|
+
return r.useDebugValue(e), Fi(this, this.selectors[e], t, n, i);
|
|
2690
|
+
}
|
|
2691
|
+
useContextCallback(e, t) {
|
|
2692
|
+
r.useDebugValue(e);
|
|
2693
|
+
let n = q(t ?? ce);
|
|
2694
|
+
this.context[e] = n;
|
|
2695
|
+
}
|
|
2696
|
+
useStateSetter(e) {
|
|
2697
|
+
let t = r.useRef(void 0);
|
|
2698
|
+
return t.current === void 0 && (t.current = (t) => {
|
|
2699
|
+
this.set(e, t);
|
|
2700
|
+
}), t.current;
|
|
2701
|
+
}
|
|
2702
|
+
observe(e, t) {
|
|
2703
|
+
let n;
|
|
2704
|
+
n = typeof e == "function" ? e : this.selectors[e];
|
|
2705
|
+
let r = n(this.state);
|
|
2706
|
+
return t(r, r, this), this.subscribe((e) => {
|
|
2707
|
+
let i = n(e);
|
|
2708
|
+
if (!Object.is(r, i)) {
|
|
2709
|
+
let e = r;
|
|
2710
|
+
r = i, t(i, e, this);
|
|
2711
|
+
}
|
|
2712
|
+
});
|
|
2713
|
+
}
|
|
2714
|
+
}, Vi = {
|
|
2715
|
+
open: Q((e) => e.open),
|
|
2716
|
+
transitionStatus: Q((e) => e.transitionStatus),
|
|
2717
|
+
domReferenceElement: Q((e) => e.domReferenceElement),
|
|
2718
|
+
referenceElement: Q((e) => e.positionReference ?? e.referenceElement),
|
|
2719
|
+
floatingElement: Q((e) => e.floatingElement),
|
|
2720
|
+
floatingId: Q((e) => e.floatingId)
|
|
2721
|
+
}, Hi = class extends Bi {
|
|
2722
|
+
constructor(e) {
|
|
2723
|
+
let { syncOnly: t, nested: n, onOpenChange: r, triggerElements: i, ...a } = e;
|
|
2724
|
+
super({
|
|
2725
|
+
...a,
|
|
2726
|
+
positionReference: a.referenceElement,
|
|
2727
|
+
domReferenceElement: a.referenceElement
|
|
2728
|
+
}, {
|
|
2729
|
+
onOpenChange: r,
|
|
2730
|
+
dataRef: { current: {} },
|
|
2731
|
+
events: ir(),
|
|
2732
|
+
nested: n,
|
|
2733
|
+
triggerElements: i
|
|
2734
|
+
}, Vi), this.syncOnly = t;
|
|
2735
|
+
}
|
|
2736
|
+
syncOpenEvent = (e, t) => {
|
|
2737
|
+
(!e || !this.state.open || t != null && ie(t)) && (this.context.dataRef.current.openEvent = e ? t : void 0);
|
|
2738
|
+
};
|
|
2739
|
+
dispatchOpenChange = (e, t) => {
|
|
2740
|
+
this.syncOpenEvent(e, t.event);
|
|
2741
|
+
let n = {
|
|
2742
|
+
open: e,
|
|
2743
|
+
reason: t.reason,
|
|
2744
|
+
nativeEvent: t.event,
|
|
2745
|
+
nested: this.context.nested,
|
|
2746
|
+
triggerElement: t.trigger
|
|
2747
|
+
};
|
|
2748
|
+
this.context.events.emit("openchange", n);
|
|
2749
|
+
};
|
|
2750
|
+
setOpen = (e, t) => {
|
|
2751
|
+
if (this.syncOnly) {
|
|
2752
|
+
this.context.onOpenChange?.(e, t);
|
|
2753
|
+
return;
|
|
2754
|
+
}
|
|
2755
|
+
this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
|
|
2756
|
+
};
|
|
2757
|
+
};
|
|
2758
|
+
//#endregion
|
|
2759
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useTransitionStatus.js
|
|
2760
|
+
function Ui(e, t = !1, n = !1) {
|
|
2761
|
+
let [i, a] = r.useState(e && t ? "idle" : void 0), [o, s] = r.useState(e);
|
|
2762
|
+
return e && !o && (s(!0), a("starting")), !e && o && i !== "ending" && !n && a("ending"), !e && !o && i === "ending" && a(void 0), y(() => {
|
|
2763
|
+
if (!e && o && i !== "ending" && n) {
|
|
2764
|
+
let e = it.request(() => {
|
|
2765
|
+
a("ending");
|
|
2766
|
+
});
|
|
2767
|
+
return () => {
|
|
2768
|
+
it.cancel(e);
|
|
2769
|
+
};
|
|
2770
|
+
}
|
|
2771
|
+
}, [
|
|
2772
|
+
e,
|
|
2773
|
+
o,
|
|
2774
|
+
i,
|
|
2775
|
+
n
|
|
2776
|
+
]), y(() => {
|
|
2777
|
+
if (!e || t) return;
|
|
2778
|
+
let n = it.request(() => {
|
|
2779
|
+
a(void 0);
|
|
2780
|
+
});
|
|
2781
|
+
return () => {
|
|
2782
|
+
it.cancel(n);
|
|
2783
|
+
};
|
|
2784
|
+
}, [t, e]), y(() => {
|
|
2785
|
+
if (!e || !t) return;
|
|
2786
|
+
e && o && i !== "idle" && a("starting");
|
|
2787
|
+
let n = it.request(() => {
|
|
2788
|
+
a("idle");
|
|
2789
|
+
});
|
|
2790
|
+
return () => {
|
|
2791
|
+
it.cancel(n);
|
|
2792
|
+
};
|
|
2793
|
+
}, [
|
|
2794
|
+
t,
|
|
2795
|
+
e,
|
|
2796
|
+
o,
|
|
2797
|
+
i
|
|
2798
|
+
]), {
|
|
2799
|
+
mounted: o,
|
|
2800
|
+
setMounted: s,
|
|
2801
|
+
transitionStatus: i
|
|
2802
|
+
};
|
|
2803
|
+
}
|
|
2804
|
+
//#endregion
|
|
2805
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/stateAttributesMapping.js
|
|
2806
|
+
var Wi = /* @__PURE__ */ function(e) {
|
|
2807
|
+
return e.startingStyle = "data-starting-style", e.endingStyle = "data-ending-style", e;
|
|
2808
|
+
}({}), Gi = { [Wi.startingStyle]: "" }, Ki = { [Wi.endingStyle]: "" }, qi = { transitionStatus(e) {
|
|
2809
|
+
return e === "starting" ? Gi : e === "ending" ? Ki : null;
|
|
2810
|
+
} };
|
|
2811
|
+
//#endregion
|
|
2812
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useAnimationsFinished.js
|
|
2813
|
+
function Ji(e, t = !1, n = !0) {
|
|
2814
|
+
let r = at();
|
|
2815
|
+
return q((i, a = null) => {
|
|
2816
|
+
r.cancel();
|
|
2817
|
+
let o = lr(e);
|
|
2818
|
+
if (o == null) return;
|
|
2819
|
+
let s = o, l = () => {
|
|
2820
|
+
c.flushSync(i);
|
|
2821
|
+
};
|
|
2822
|
+
if (typeof s.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
2823
|
+
i();
|
|
2824
|
+
return;
|
|
2825
|
+
}
|
|
2826
|
+
function u() {
|
|
2827
|
+
Promise.all(s.getAnimations().map((e) => e.finished)).then(() => {
|
|
2828
|
+
a?.aborted || l();
|
|
2829
|
+
}).catch(() => {
|
|
2830
|
+
if (n) {
|
|
2831
|
+
a?.aborted || l();
|
|
2832
|
+
return;
|
|
2833
|
+
}
|
|
2834
|
+
let e = s.getAnimations();
|
|
2835
|
+
!a?.aborted && e.length > 0 && e.some((e) => e.pending || e.playState !== "finished") && u();
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
if (t) {
|
|
2839
|
+
let e = Wi.startingStyle;
|
|
2840
|
+
if (!s.hasAttribute(e)) {
|
|
2841
|
+
r.request(u);
|
|
2842
|
+
return;
|
|
2843
|
+
}
|
|
2844
|
+
let t = new MutationObserver(() => {
|
|
2845
|
+
s.hasAttribute(e) || (t.disconnect(), u());
|
|
2846
|
+
});
|
|
2847
|
+
t.observe(s, {
|
|
2848
|
+
attributes: !0,
|
|
2849
|
+
attributeFilter: [e]
|
|
2850
|
+
}), a?.addEventListener("abort", () => t.disconnect(), { once: !0 });
|
|
2851
|
+
return;
|
|
2852
|
+
}
|
|
2853
|
+
r.request(u);
|
|
2854
|
+
});
|
|
2855
|
+
}
|
|
2856
|
+
//#endregion
|
|
2857
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useOpenChangeComplete.js
|
|
2858
|
+
function Yi(e) {
|
|
2859
|
+
let { enabled: t = !0, open: n, ref: i, onComplete: a } = e, o = q(a), s = Ji(i, n, !1);
|
|
2860
|
+
r.useEffect(() => {
|
|
2861
|
+
if (!t) return;
|
|
2862
|
+
let e = new AbortController();
|
|
2863
|
+
return s(o, e.signal), () => {
|
|
2864
|
+
e.abort();
|
|
2865
|
+
};
|
|
2866
|
+
}, [
|
|
2867
|
+
t,
|
|
2868
|
+
n,
|
|
2869
|
+
o,
|
|
2870
|
+
s
|
|
2871
|
+
]);
|
|
2872
|
+
}
|
|
2873
|
+
//#endregion
|
|
2874
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/popups/popupStoreUtils.js
|
|
2875
|
+
function Xi(e, t) {
|
|
2876
|
+
let n = r.useRef(null), i = r.useRef(null);
|
|
2877
|
+
return r.useCallback((r) => {
|
|
2878
|
+
if (e !== void 0) {
|
|
2879
|
+
if (n.current !== null) {
|
|
2880
|
+
let e = n.current, r = i.current, a = t.context.triggerElements.getById(e);
|
|
2881
|
+
r && a === r && t.context.triggerElements.delete(e), n.current = null, i.current = null;
|
|
2882
|
+
}
|
|
2883
|
+
r !== null && (n.current = e, i.current = r, t.context.triggerElements.add(e, r));
|
|
2884
|
+
}
|
|
2885
|
+
}, [t, e]);
|
|
2886
|
+
}
|
|
2887
|
+
function Zi(e, t, n, r) {
|
|
2888
|
+
let i = n.useState("isMountedByTrigger", e), a = Xi(e, n), o = q((t) => {
|
|
2889
|
+
if (a(t), !t || !n.select("open")) return;
|
|
2890
|
+
let i = n.select("activeTriggerId");
|
|
2891
|
+
if (i === e) {
|
|
2892
|
+
n.update({
|
|
2893
|
+
activeTriggerElement: t,
|
|
2894
|
+
...r
|
|
2895
|
+
});
|
|
2896
|
+
return;
|
|
2897
|
+
}
|
|
2898
|
+
i ?? n.update({
|
|
2899
|
+
activeTriggerId: e,
|
|
2900
|
+
activeTriggerElement: t,
|
|
2901
|
+
...r
|
|
2902
|
+
});
|
|
2903
|
+
});
|
|
2904
|
+
return y(() => {
|
|
2905
|
+
i && n.update({
|
|
2906
|
+
activeTriggerElement: t.current,
|
|
2907
|
+
...r
|
|
2908
|
+
});
|
|
2909
|
+
}, [
|
|
2910
|
+
i,
|
|
2911
|
+
n,
|
|
2912
|
+
t,
|
|
2913
|
+
...Object.values(r)
|
|
2914
|
+
]), {
|
|
2915
|
+
registerTrigger: o,
|
|
2916
|
+
isMountedByThisTrigger: i
|
|
2917
|
+
};
|
|
2918
|
+
}
|
|
2919
|
+
function Qi(e) {
|
|
2920
|
+
let t = e.useState("open");
|
|
2921
|
+
y(() => {
|
|
2922
|
+
if (t && !e.select("activeTriggerId") && e.context.triggerElements.size === 1) {
|
|
2923
|
+
let t = e.context.triggerElements.entries().next();
|
|
2924
|
+
if (!t.done) {
|
|
2925
|
+
let [n, r] = t.value;
|
|
2926
|
+
e.update({
|
|
2927
|
+
activeTriggerId: n,
|
|
2928
|
+
activeTriggerElement: r
|
|
2929
|
+
});
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
}, [t, e]);
|
|
2933
|
+
}
|
|
2934
|
+
function $i(e, t, n) {
|
|
2935
|
+
let { mounted: r, setMounted: i, transitionStatus: a } = Ui(e);
|
|
2936
|
+
t.useSyncedValues({
|
|
2937
|
+
mounted: r,
|
|
2938
|
+
transitionStatus: a
|
|
2939
|
+
});
|
|
2940
|
+
let o = q(() => {
|
|
2941
|
+
i(!1), t.update({
|
|
2942
|
+
activeTriggerId: null,
|
|
2943
|
+
activeTriggerElement: null,
|
|
2944
|
+
mounted: !1
|
|
2945
|
+
}), n?.(), t.context.onOpenChangeComplete?.(!1);
|
|
2946
|
+
});
|
|
2947
|
+
return Yi({
|
|
2948
|
+
enabled: !t.useState("preventUnmountingOnClose"),
|
|
2949
|
+
open: e,
|
|
2950
|
+
ref: t.context.popupRef,
|
|
2951
|
+
onComplete() {
|
|
2952
|
+
e || o();
|
|
2953
|
+
}
|
|
2954
|
+
}), {
|
|
2955
|
+
forceUnmount: o,
|
|
2956
|
+
transitionStatus: a
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
//#endregion
|
|
2960
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/popups/popupTriggerMap.js
|
|
2961
|
+
var ea = class {
|
|
2962
|
+
constructor() {
|
|
2963
|
+
this.elementsSet = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
|
|
2964
|
+
}
|
|
2965
|
+
add(e, t) {
|
|
2966
|
+
let n = this.idMap.get(e);
|
|
2967
|
+
if (n !== t && (n !== void 0 && this.elementsSet.delete(n), this.elementsSet.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elementsSet.size !== this.idMap.size)) throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
2968
|
+
}
|
|
2969
|
+
delete(e) {
|
|
2970
|
+
let t = this.idMap.get(e);
|
|
2971
|
+
t && (this.elementsSet.delete(t), this.idMap.delete(e));
|
|
2972
|
+
}
|
|
2973
|
+
hasElement(e) {
|
|
2974
|
+
return this.elementsSet.has(e);
|
|
2975
|
+
}
|
|
2976
|
+
hasMatchingElement(e) {
|
|
2977
|
+
for (let t of this.elementsSet) if (e(t)) return !0;
|
|
2978
|
+
return !1;
|
|
2979
|
+
}
|
|
2980
|
+
getById(e) {
|
|
2981
|
+
return this.idMap.get(e);
|
|
2982
|
+
}
|
|
2983
|
+
entries() {
|
|
2984
|
+
return this.idMap.entries();
|
|
2985
|
+
}
|
|
2986
|
+
elements() {
|
|
2987
|
+
return this.elementsSet.values();
|
|
2988
|
+
}
|
|
2989
|
+
get size() {
|
|
2990
|
+
return this.idMap.size;
|
|
2991
|
+
}
|
|
2992
|
+
};
|
|
2993
|
+
//#endregion
|
|
2994
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js
|
|
2995
|
+
function ta() {
|
|
2996
|
+
return new Hi({
|
|
2997
|
+
open: !1,
|
|
2998
|
+
transitionStatus: void 0,
|
|
2999
|
+
floatingElement: null,
|
|
3000
|
+
referenceElement: null,
|
|
3001
|
+
triggerElements: new ea(),
|
|
3002
|
+
floatingId: "",
|
|
3003
|
+
syncOnly: !1,
|
|
3004
|
+
nested: !1,
|
|
3005
|
+
onOpenChange: void 0
|
|
3006
|
+
});
|
|
3007
|
+
}
|
|
3008
|
+
//#endregion
|
|
3009
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/popups/store.js
|
|
3010
|
+
function na() {
|
|
3011
|
+
return {
|
|
3012
|
+
open: !1,
|
|
3013
|
+
openProp: void 0,
|
|
3014
|
+
mounted: !1,
|
|
3015
|
+
transitionStatus: void 0,
|
|
3016
|
+
floatingRootContext: ta(),
|
|
3017
|
+
preventUnmountingOnClose: !1,
|
|
3018
|
+
payload: void 0,
|
|
3019
|
+
activeTriggerId: null,
|
|
3020
|
+
activeTriggerElement: null,
|
|
3021
|
+
triggerIdProp: void 0,
|
|
3022
|
+
popupElement: null,
|
|
3023
|
+
positionerElement: null,
|
|
3024
|
+
activeTriggerProps: R,
|
|
3025
|
+
inactiveTriggerProps: R,
|
|
3026
|
+
popupProps: R
|
|
3027
|
+
};
|
|
3028
|
+
}
|
|
3029
|
+
var ra = Q((e) => e.triggerIdProp ?? e.activeTriggerId), ia = {
|
|
3030
|
+
open: Q((e) => e.openProp ?? e.open),
|
|
3031
|
+
mounted: Q((e) => e.mounted),
|
|
3032
|
+
transitionStatus: Q((e) => e.transitionStatus),
|
|
3033
|
+
floatingRootContext: Q((e) => e.floatingRootContext),
|
|
3034
|
+
preventUnmountingOnClose: Q((e) => e.preventUnmountingOnClose),
|
|
3035
|
+
payload: Q((e) => e.payload),
|
|
3036
|
+
activeTriggerId: ra,
|
|
3037
|
+
activeTriggerElement: Q((e) => e.mounted ? e.activeTriggerElement : null),
|
|
3038
|
+
isTriggerActive: Q((e, t) => t !== void 0 && ra(e) === t),
|
|
3039
|
+
isOpenedByTrigger: Q((e, t) => t !== void 0 && ra(e) === t && e.open),
|
|
3040
|
+
isMountedByTrigger: Q((e, t) => t !== void 0 && ra(e) === t && e.mounted),
|
|
3041
|
+
triggerProps: Q((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
|
|
3042
|
+
popupProps: Q((e) => e.popupProps),
|
|
3043
|
+
popupElement: Q((e) => e.popupElement),
|
|
3044
|
+
positionerElement: Q((e) => e.positionerElement)
|
|
3045
|
+
};
|
|
3046
|
+
//#endregion
|
|
3047
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
|
|
3048
|
+
function aa(e) {
|
|
3049
|
+
let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i = yn(), a = sr() != null;
|
|
3050
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3051
|
+
let e = r.reference;
|
|
3052
|
+
e && !U(e) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
|
|
3053
|
+
}
|
|
3054
|
+
let o = u(() => new Hi({
|
|
3055
|
+
open: t,
|
|
3056
|
+
transitionStatus: void 0,
|
|
3057
|
+
onOpenChange: n,
|
|
3058
|
+
referenceElement: r.reference ?? null,
|
|
3059
|
+
floatingElement: r.floating ?? null,
|
|
3060
|
+
triggerElements: new ea(),
|
|
3061
|
+
floatingId: i,
|
|
3062
|
+
syncOnly: !1,
|
|
3063
|
+
nested: a
|
|
3064
|
+
})).current;
|
|
3065
|
+
return y(() => {
|
|
3066
|
+
let e = {
|
|
3067
|
+
open: t,
|
|
3068
|
+
floatingId: i
|
|
3069
|
+
};
|
|
3070
|
+
r.reference !== void 0 && (e.referenceElement = r.reference, e.domReferenceElement = U(r.reference) ? r.reference : null), r.floating !== void 0 && (e.floatingElement = r.floating), o.update(e);
|
|
3071
|
+
}, [
|
|
3072
|
+
t,
|
|
3073
|
+
i,
|
|
3074
|
+
r.reference,
|
|
3075
|
+
r.floating,
|
|
3076
|
+
o
|
|
3077
|
+
]), o.context.onOpenChange = n, o.context.nested = a, o;
|
|
3078
|
+
}
|
|
3079
|
+
//#endregion
|
|
3080
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloating.js
|
|
3081
|
+
function oa(e = {}) {
|
|
3082
|
+
let { nodeId: t, externalTree: n } = e, i = aa(e), a = e.rootContext || i, o = {
|
|
3083
|
+
reference: a.useState("referenceElement"),
|
|
3084
|
+
floating: a.useState("floatingElement"),
|
|
3085
|
+
domReference: a.useState("domReferenceElement")
|
|
3086
|
+
}, [s, c] = r.useState(null), l = r.useRef(null), u = cr(n);
|
|
3087
|
+
y(() => {
|
|
3088
|
+
o.domReference && (l.current = o.domReference);
|
|
3089
|
+
}, [o.domReference]);
|
|
3090
|
+
let d = yi({
|
|
3091
|
+
...e,
|
|
3092
|
+
elements: {
|
|
3093
|
+
...o,
|
|
3094
|
+
...s && { reference: s }
|
|
3095
|
+
}
|
|
3096
|
+
}), f = r.useCallback((e) => {
|
|
3097
|
+
let t = U(e) ? {
|
|
3098
|
+
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
3099
|
+
getClientRects: () => e.getClientRects(),
|
|
3100
|
+
contextElement: e
|
|
3101
|
+
} : e;
|
|
3102
|
+
c(t), d.refs.setReference(t);
|
|
3103
|
+
}, [d.refs]), [p, m] = r.useState(void 0), [h, g] = r.useState(null);
|
|
3104
|
+
a.useSyncedValue("referenceElement", p ?? null);
|
|
3105
|
+
let _ = U(p) ? p : null;
|
|
3106
|
+
a.useSyncedValue("domReferenceElement", p === void 0 ? o.domReference : _), a.useSyncedValue("floatingElement", h);
|
|
3107
|
+
let v = r.useCallback((e) => {
|
|
3108
|
+
(U(e) || e === null) && (l.current = e, m(e)), (U(d.refs.reference.current) || d.refs.reference.current === null || e !== null && !U(e)) && d.refs.setReference(e);
|
|
3109
|
+
}, [d.refs, m]), b = r.useCallback((e) => {
|
|
3110
|
+
g(e), d.refs.setFloating(e);
|
|
3111
|
+
}, [d.refs]), x = r.useMemo(() => ({
|
|
3112
|
+
...d.refs,
|
|
3113
|
+
setReference: v,
|
|
3114
|
+
setFloating: b,
|
|
3115
|
+
setPositionReference: f,
|
|
3116
|
+
domReference: l
|
|
3117
|
+
}), [
|
|
3118
|
+
d.refs,
|
|
3119
|
+
v,
|
|
3120
|
+
b,
|
|
3121
|
+
f
|
|
3122
|
+
]), S = r.useMemo(() => ({
|
|
3123
|
+
...d.elements,
|
|
3124
|
+
domReference: o.domReference
|
|
3125
|
+
}), [d.elements, o.domReference]), C = a.useState("open"), w = a.useState("floatingId"), T = r.useMemo(() => ({
|
|
3126
|
+
...d,
|
|
3127
|
+
dataRef: a.context.dataRef,
|
|
3128
|
+
open: C,
|
|
3129
|
+
onOpenChange: a.setOpen,
|
|
3130
|
+
events: a.context.events,
|
|
3131
|
+
floatingId: w,
|
|
3132
|
+
refs: x,
|
|
3133
|
+
elements: S,
|
|
3134
|
+
nodeId: t,
|
|
3135
|
+
rootStore: a
|
|
3136
|
+
}), [
|
|
3137
|
+
d,
|
|
3138
|
+
x,
|
|
3139
|
+
S,
|
|
3140
|
+
t,
|
|
3141
|
+
a,
|
|
3142
|
+
C,
|
|
3143
|
+
w
|
|
3144
|
+
]);
|
|
3145
|
+
return y(() => {
|
|
3146
|
+
a.context.dataRef.current.floatingContext = T;
|
|
3147
|
+
let e = u?.nodesRef.current.find((e) => e.id === t);
|
|
3148
|
+
e && (e.context = T);
|
|
3149
|
+
}), r.useMemo(() => ({
|
|
3150
|
+
...d,
|
|
3151
|
+
context: T,
|
|
3152
|
+
refs: x,
|
|
3153
|
+
elements: S,
|
|
3154
|
+
rootStore: a
|
|
3155
|
+
}), [
|
|
3156
|
+
d,
|
|
3157
|
+
x,
|
|
3158
|
+
S,
|
|
3159
|
+
T,
|
|
3160
|
+
a
|
|
3161
|
+
]);
|
|
3162
|
+
}
|
|
3163
|
+
//#endregion
|
|
3164
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js
|
|
3165
|
+
function sa(e) {
|
|
3166
|
+
let { popupStore: t, treatPopupAsFloatingElement: n = !1, onOpenChange: r } = e, i = yn(), a = sr() != null, o = t.useState("open"), s = t.useState("activeTriggerElement"), c = t.useState(n ? "popupElement" : "positionerElement"), l = t.context.triggerElements, d = u(() => new Hi({
|
|
3167
|
+
open: o,
|
|
3168
|
+
transitionStatus: void 0,
|
|
3169
|
+
referenceElement: s,
|
|
3170
|
+
floatingElement: c,
|
|
3171
|
+
triggerElements: l,
|
|
3172
|
+
onOpenChange: r,
|
|
3173
|
+
floatingId: i,
|
|
3174
|
+
syncOnly: !0,
|
|
3175
|
+
nested: a
|
|
3176
|
+
})).current;
|
|
3177
|
+
return y(() => {
|
|
3178
|
+
let e = {
|
|
3179
|
+
open: o,
|
|
3180
|
+
floatingId: i,
|
|
3181
|
+
referenceElement: s,
|
|
3182
|
+
floatingElement: c
|
|
3183
|
+
};
|
|
3184
|
+
U(s) && (e.domReferenceElement = s), d.state.positionReference === d.state.referenceElement && (e.positionReference = s), d.update(e);
|
|
3185
|
+
}, [
|
|
3186
|
+
o,
|
|
3187
|
+
i,
|
|
3188
|
+
s,
|
|
3189
|
+
c,
|
|
3190
|
+
d
|
|
3191
|
+
]), d.context.onOpenChange = r, d.context.nested = a, d;
|
|
3192
|
+
}
|
|
3193
|
+
//#endregion
|
|
3194
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js
|
|
3195
|
+
var ca = P && N;
|
|
3196
|
+
function la(e, t = {}) {
|
|
3197
|
+
let n = "rootStore" in e ? e.rootStore : e, { events: i, dataRef: a } = n.context, { enabled: o = !0, delay: s } = t, c = r.useRef(!1), l = r.useRef(null), u = O(), d = r.useRef(!0);
|
|
3198
|
+
r.useEffect(() => {
|
|
3199
|
+
let e = n.select("domReferenceElement");
|
|
3200
|
+
if (!o) return;
|
|
3201
|
+
let t = V(e);
|
|
3202
|
+
function r() {
|
|
3203
|
+
let e = n.select("domReferenceElement");
|
|
3204
|
+
!n.select("open") && W(e) && e === dt(J(e)) && (c.current = !0);
|
|
3205
|
+
}
|
|
3206
|
+
function i() {
|
|
3207
|
+
d.current = !0;
|
|
3208
|
+
}
|
|
3209
|
+
function a() {
|
|
3210
|
+
d.current = !1;
|
|
3211
|
+
}
|
|
3212
|
+
return He(K(t, "blur", r), ca && K(t, "keydown", i, !0), ca && K(t, "pointerdown", a, !0));
|
|
3213
|
+
}, [n, o]), r.useEffect(() => {
|
|
3214
|
+
if (!o) return;
|
|
3215
|
+
function e(e) {
|
|
3216
|
+
if (e.reason === "trigger-press" || e.reason === "escape-key") {
|
|
3217
|
+
let e = n.select("domReferenceElement");
|
|
3218
|
+
U(e) && (l.current = e, c.current = !0);
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
return i.on("openchange", e), () => {
|
|
3222
|
+
i.off("openchange", e);
|
|
3223
|
+
};
|
|
3224
|
+
}, [
|
|
3225
|
+
i,
|
|
3226
|
+
o,
|
|
3227
|
+
n
|
|
3228
|
+
]);
|
|
3229
|
+
let f = r.useMemo(() => ({
|
|
3230
|
+
onMouseLeave() {
|
|
3231
|
+
c.current = !1, l.current = null;
|
|
3232
|
+
},
|
|
3233
|
+
onFocus(e) {
|
|
3234
|
+
let t = e.currentTarget;
|
|
3235
|
+
if (c.current) {
|
|
3236
|
+
if (l.current === t) return;
|
|
3237
|
+
c.current = !1, l.current = null;
|
|
3238
|
+
}
|
|
3239
|
+
let r = ft(e.nativeEvent);
|
|
3240
|
+
if (U(r)) {
|
|
3241
|
+
if (ca && !e.relatedTarget) {
|
|
3242
|
+
if (!d.current && !gt(r)) return;
|
|
3243
|
+
} else if (!vt(r)) return;
|
|
3244
|
+
}
|
|
3245
|
+
let i = pt(e.relatedTarget, n.context.triggerElements), { nativeEvent: a, currentTarget: o } = e, f = typeof s == "function" ? s() : s;
|
|
3246
|
+
if (n.select("open") && i || f === 0 || f === void 0) {
|
|
3247
|
+
n.setOpen(!0, z(he, a, o));
|
|
3248
|
+
return;
|
|
3249
|
+
}
|
|
3250
|
+
u.start(f, () => {
|
|
3251
|
+
c.current || n.setOpen(!0, z(he, a, o));
|
|
3252
|
+
});
|
|
3253
|
+
},
|
|
3254
|
+
onBlur(e) {
|
|
3255
|
+
c.current = !1, l.current = null;
|
|
3256
|
+
let t = e.relatedTarget, r = e.nativeEvent, i = U(t) && t.hasAttribute(mn("focus-guard")) && t.getAttribute("data-type") === "outside";
|
|
3257
|
+
u.start(0, () => {
|
|
3258
|
+
let e = n.select("domReferenceElement"), o = dt(J(e));
|
|
3259
|
+
!t && o === e || Y(a.current.floatingContext?.refs.floating.current, o) || Y(e, o) || i || pt(t ?? o, n.context.triggerElements) || n.setOpen(!1, z(he, r));
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
}), [
|
|
3263
|
+
a,
|
|
3264
|
+
n,
|
|
3265
|
+
u,
|
|
3266
|
+
s
|
|
3267
|
+
]);
|
|
3268
|
+
return r.useMemo(() => o ? {
|
|
3269
|
+
reference: f,
|
|
3270
|
+
trigger: f
|
|
3271
|
+
} : {}, [o, f]);
|
|
3272
|
+
}
|
|
3273
|
+
//#endregion
|
|
3274
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js
|
|
3275
|
+
var ua = class e {
|
|
3276
|
+
constructor() {
|
|
3277
|
+
this.pointerType = void 0, this.interactedInside = !1, this.handler = void 0, this.blockMouseMove = !0, this.performedPointerEventsMutation = !1, this.pointerEventsScopeElement = null, this.pointerEventsReferenceElement = null, this.pointerEventsFloatingElement = null, this.restTimeoutPending = !1, this.openChangeTimeout = new D(), this.restTimeout = new D(), this.handleCloseOptions = void 0;
|
|
3278
|
+
}
|
|
3279
|
+
static create() {
|
|
3280
|
+
return new e();
|
|
3281
|
+
}
|
|
3282
|
+
dispose = () => {
|
|
3283
|
+
this.openChangeTimeout.clear(), this.restTimeout.clear();
|
|
3284
|
+
};
|
|
3285
|
+
disposeEffect = () => this.dispose;
|
|
3286
|
+
}, da = /* @__PURE__ */ new WeakMap();
|
|
3287
|
+
function fa(e) {
|
|
3288
|
+
if (!e.performedPointerEventsMutation) return;
|
|
3289
|
+
let t = e.pointerEventsScopeElement;
|
|
3290
|
+
t && da.get(t) === e && (e.pointerEventsScopeElement?.style.removeProperty("pointer-events"), e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"), e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"), da.delete(t)), e.performedPointerEventsMutation = !1, e.pointerEventsScopeElement = null, e.pointerEventsReferenceElement = null, e.pointerEventsFloatingElement = null;
|
|
3291
|
+
}
|
|
3292
|
+
function pa(e, t) {
|
|
3293
|
+
let { scopeElement: n, referenceElement: r, floatingElement: i } = t, a = da.get(n);
|
|
3294
|
+
a && a !== e && fa(a), fa(e), e.performedPointerEventsMutation = !0, e.pointerEventsScopeElement = n, e.pointerEventsReferenceElement = r, e.pointerEventsFloatingElement = i, da.set(n, e), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", i.style.pointerEvents = "auto";
|
|
3295
|
+
}
|
|
3296
|
+
function ma(e) {
|
|
3297
|
+
let t = u(ua.create).current, n = e.context.dataRef.current;
|
|
3298
|
+
return n.hoverInteractionState ||= t, T(n.hoverInteractionState.disposeEffect), n.hoverInteractionState;
|
|
3299
|
+
}
|
|
3300
|
+
//#endregion
|
|
3301
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js
|
|
3302
|
+
function ha(e, t = {}) {
|
|
3303
|
+
let n = "rootStore" in e ? e.rootStore : e, i = n.useState("open"), a = n.useState("floatingElement"), o = n.useState("domReferenceElement"), { dataRef: s } = n.context, { enabled: c = !0, closeDelay: l = 0, nodeId: u } = t, d = ma(n), f = cr(), p = sr(), m = q(() => se(s.current.openEvent?.type, d.interactedInside)), h = q(() => {
|
|
3304
|
+
let e = s.current.openEvent?.type;
|
|
3305
|
+
return e?.includes("mouse") && e !== "mousedown";
|
|
3306
|
+
}), g = q((e) => pt(e, n.context.triggerElements)), _ = r.useCallback((e) => {
|
|
3307
|
+
let t = ae(l, "close", d.pointerType), r = () => {
|
|
3308
|
+
n.setOpen(!1, z(me, e)), f?.events.emit("floating.closed", e);
|
|
3309
|
+
};
|
|
3310
|
+
t ? d.openChangeTimeout.start(t, r) : (d.openChangeTimeout.clear(), r());
|
|
3311
|
+
}, [
|
|
3312
|
+
l,
|
|
3313
|
+
n,
|
|
3314
|
+
d,
|
|
3315
|
+
f
|
|
3316
|
+
]), v = q(() => {
|
|
3317
|
+
fa(d);
|
|
3318
|
+
}), b = q((e) => {
|
|
3319
|
+
let t = ft(e);
|
|
3320
|
+
if (!_t(t)) {
|
|
3321
|
+
d.interactedInside = !1;
|
|
3322
|
+
return;
|
|
3323
|
+
}
|
|
3324
|
+
d.interactedInside = t?.closest("[aria-haspopup]") != null;
|
|
3325
|
+
});
|
|
3326
|
+
y(() => {
|
|
3327
|
+
i || (d.pointerType = void 0, d.restTimeoutPending = !1, d.interactedInside = !1, v());
|
|
3328
|
+
}, [
|
|
3329
|
+
i,
|
|
3330
|
+
d,
|
|
3331
|
+
v
|
|
3332
|
+
]), r.useEffect(() => v, [v]), y(() => {
|
|
3333
|
+
if (c && i && d.handleCloseOptions?.blockPointerEvents && h() && U(o) && a) {
|
|
3334
|
+
let e = o, t = a, n = J(a), r = f?.nodesRef.current.find((e) => e.id === p)?.context?.elements.floating;
|
|
3335
|
+
return r && (r.style.pointerEvents = ""), pa(d, {
|
|
3336
|
+
scopeElement: d.handleCloseOptions?.getScope?.() ?? d.pointerEventsScopeElement ?? r ?? e.closest("[data-rootownerid]") ?? n.body,
|
|
3337
|
+
referenceElement: e,
|
|
3338
|
+
floatingElement: t
|
|
3339
|
+
}), () => {
|
|
3340
|
+
v();
|
|
3341
|
+
};
|
|
3342
|
+
}
|
|
3343
|
+
}, [
|
|
3344
|
+
c,
|
|
3345
|
+
i,
|
|
3346
|
+
o,
|
|
3347
|
+
a,
|
|
3348
|
+
d,
|
|
3349
|
+
h,
|
|
3350
|
+
f,
|
|
3351
|
+
p,
|
|
3352
|
+
v
|
|
3353
|
+
]);
|
|
3354
|
+
let x = O();
|
|
3355
|
+
r.useEffect(() => {
|
|
3356
|
+
if (!c) return;
|
|
3357
|
+
function e() {
|
|
3358
|
+
d.openChangeTimeout.clear(), x.clear(), f?.events.off("floating.closed", r), v();
|
|
3359
|
+
}
|
|
3360
|
+
function t(e) {
|
|
3361
|
+
if (f && p && pn(f.nodesRef.current, p).length > 0) {
|
|
3362
|
+
f.events.on("floating.closed", r);
|
|
3363
|
+
return;
|
|
3364
|
+
}
|
|
3365
|
+
if (g(e.relatedTarget)) return;
|
|
3366
|
+
let t = s.current.floatingContext?.nodeId ?? u, n = e.relatedTarget;
|
|
3367
|
+
if (!(f && t && U(n) && pn(f.nodesRef.current, t, !1).some((e) => Y(e.context?.elements.floating, n)))) {
|
|
3368
|
+
if (d.handler) {
|
|
3369
|
+
d.handler(e);
|
|
3370
|
+
return;
|
|
3371
|
+
}
|
|
3372
|
+
v(), m() || _(e);
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
function r(e) {
|
|
3376
|
+
!f || !p || pn(f.nodesRef.current, p).length > 0 || x.start(0, () => {
|
|
3377
|
+
f.events.off("floating.closed", r), n.setOpen(!1, z(me, e)), f.events.emit("floating.closed", e);
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
let i = a;
|
|
3381
|
+
return He(i && K(i, "mouseenter", e), i && K(i, "mouseleave", t), i && K(i, "pointerdown", b, !0), () => {
|
|
3382
|
+
f?.events.off("floating.closed", r);
|
|
3383
|
+
});
|
|
3384
|
+
}, [
|
|
3385
|
+
c,
|
|
3386
|
+
a,
|
|
3387
|
+
n,
|
|
3388
|
+
s,
|
|
3389
|
+
u,
|
|
3390
|
+
m,
|
|
3391
|
+
g,
|
|
3392
|
+
_,
|
|
3393
|
+
v,
|
|
3394
|
+
b,
|
|
3395
|
+
d,
|
|
3396
|
+
f,
|
|
3397
|
+
p,
|
|
3398
|
+
x
|
|
3399
|
+
]);
|
|
3400
|
+
}
|
|
3401
|
+
//#endregion
|
|
3402
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js
|
|
3403
|
+
var ga = { current: null };
|
|
3404
|
+
function _a(e, t = {}) {
|
|
3405
|
+
let n = "rootStore" in e ? e.rootStore : e, { dataRef: i, events: a } = n.context, { enabled: o = !0, delay: s = 0, handleClose: l = null, mouseOnly: u = !1, restMs: d = 0, move: f = !0, triggerElementRef: p = ga, externalTree: m, isActiveTrigger: h = !0, getHandleCloseContext: g, isClosing: _ } = t, v = cr(m), y = ma(n), b = r.useRef(!1), x = Ye(l), S = Ye(s), C = Ye(d), w = Ye(o), T = Ye(_);
|
|
3406
|
+
h && (y.handleCloseOptions = x.current?.__options);
|
|
3407
|
+
let E = q(() => se(i.current.openEvent?.type, y.interactedInside)), D = q((e) => pt(e, n.context.triggerElements)), O = q((e, t, r) => {
|
|
3408
|
+
let i = n.context.triggerElements;
|
|
3409
|
+
if (i.hasElement(t)) return !e || !Y(e, t);
|
|
3410
|
+
if (!U(r)) return !1;
|
|
3411
|
+
let a = r;
|
|
3412
|
+
return i.hasMatchingElement((e) => Y(e, a)) && (!e || !Y(e, a));
|
|
3413
|
+
}), k = q((e, t = !0) => {
|
|
3414
|
+
let r = ae(S.current, "close", y.pointerType);
|
|
3415
|
+
r ? y.openChangeTimeout.start(r, () => {
|
|
3416
|
+
n.setOpen(!1, z(me, e)), v?.events.emit("floating.closed", e);
|
|
3417
|
+
}) : t && (y.openChangeTimeout.clear(), n.setOpen(!1, z(me, e)), v?.events.emit("floating.closed", e));
|
|
3418
|
+
}), A = q(() => {
|
|
3419
|
+
y.handler &&= (J(n.select("domReferenceElement")).removeEventListener("mousemove", y.handler), void 0);
|
|
3420
|
+
}), j = q(() => {
|
|
3421
|
+
fa(y);
|
|
3422
|
+
});
|
|
3423
|
+
return r.useEffect(() => A, [A]), r.useEffect(() => {
|
|
3424
|
+
if (!o) return;
|
|
3425
|
+
function e(e) {
|
|
3426
|
+
e.open ? b.current = !1 : (b.current = e.reason === me, A(), y.openChangeTimeout.clear(), y.restTimeout.clear(), y.blockMouseMove = !0, y.restTimeoutPending = !1);
|
|
3427
|
+
}
|
|
3428
|
+
return a.on("openchange", e), () => {
|
|
3429
|
+
a.off("openchange", e);
|
|
3430
|
+
};
|
|
3431
|
+
}, [
|
|
3432
|
+
o,
|
|
3433
|
+
a,
|
|
3434
|
+
y,
|
|
3435
|
+
A
|
|
3436
|
+
]), r.useEffect(() => {
|
|
3437
|
+
if (!o) return;
|
|
3438
|
+
let e = p.current ?? (h ? n.select("domReferenceElement") : null);
|
|
3439
|
+
if (!U(e)) return;
|
|
3440
|
+
function t(e) {
|
|
3441
|
+
if (y.openChangeTimeout.clear(), y.blockMouseMove = !1, u && !re(y.pointerType)) return;
|
|
3442
|
+
let t = oe(C.current), r = ae(S.current, "open", y.pointerType), i = ft(e), a = e.currentTarget ?? null, o = n.select("domReferenceElement"), s = a;
|
|
3443
|
+
if (U(i) && !n.context.triggerElements.hasElement(i)) {
|
|
3444
|
+
for (let e of n.context.triggerElements.elements()) if (Y(e, i)) {
|
|
3445
|
+
s = e;
|
|
3446
|
+
break;
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
U(a) && U(o) && !n.context.triggerElements.hasElement(a) && Y(a, o) && (s = o);
|
|
3450
|
+
let c = s == null ? !1 : O(o, s, i), l = n.select("open"), d = T.current?.() ?? n.select("transitionStatus") === "ending", f = !l && d && b.current, p = !c && U(s) && U(o) && Y(o, s) && f, m = t > 0 && !r, h = c && (l || f) || p, g = !l || c;
|
|
3451
|
+
if (h) {
|
|
3452
|
+
n.setOpen(!0, z(me, e, s));
|
|
3453
|
+
return;
|
|
3454
|
+
}
|
|
3455
|
+
m || (r ? y.openChangeTimeout.start(r, () => {
|
|
3456
|
+
g && n.setOpen(!0, z(me, e, s));
|
|
3457
|
+
}) : g && n.setOpen(!0, z(me, e, s)));
|
|
3458
|
+
}
|
|
3459
|
+
function r(e) {
|
|
3460
|
+
if (E()) {
|
|
3461
|
+
j();
|
|
3462
|
+
return;
|
|
3463
|
+
}
|
|
3464
|
+
A();
|
|
3465
|
+
let t = J(n.select("domReferenceElement"));
|
|
3466
|
+
y.restTimeout.clear(), y.restTimeoutPending = !1;
|
|
3467
|
+
let r = i.current.floatingContext ?? g?.();
|
|
3468
|
+
if (!D(e.relatedTarget)) {
|
|
3469
|
+
if (x.current && r) {
|
|
3470
|
+
n.select("open") || y.openChangeTimeout.clear();
|
|
3471
|
+
let i = p.current;
|
|
3472
|
+
y.handler = x.current({
|
|
3473
|
+
...r,
|
|
3474
|
+
tree: v,
|
|
3475
|
+
x: e.clientX,
|
|
3476
|
+
y: e.clientY,
|
|
3477
|
+
onClose() {
|
|
3478
|
+
j(), A(), w.current && !E() && i === n.select("domReferenceElement") && k(e, !0);
|
|
3479
|
+
}
|
|
3480
|
+
}), t.addEventListener("mousemove", y.handler), y.handler(e);
|
|
3481
|
+
return;
|
|
3482
|
+
}
|
|
3483
|
+
(y.pointerType !== "touch" || !Y(n.select("floatingElement"), e.relatedTarget)) && k(e);
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
return f ? He(K(e, "mousemove", t, { once: !0 }), K(e, "mouseenter", t), K(e, "mouseleave", r)) : He(K(e, "mouseenter", t), K(e, "mouseleave", r));
|
|
3487
|
+
}, [
|
|
3488
|
+
A,
|
|
3489
|
+
j,
|
|
3490
|
+
i,
|
|
3491
|
+
S,
|
|
3492
|
+
k,
|
|
3493
|
+
n,
|
|
3494
|
+
o,
|
|
3495
|
+
x,
|
|
3496
|
+
y,
|
|
3497
|
+
h,
|
|
3498
|
+
O,
|
|
3499
|
+
E,
|
|
3500
|
+
D,
|
|
3501
|
+
u,
|
|
3502
|
+
f,
|
|
3503
|
+
C,
|
|
3504
|
+
p,
|
|
3505
|
+
v,
|
|
3506
|
+
w,
|
|
3507
|
+
g,
|
|
3508
|
+
T
|
|
3509
|
+
]), r.useMemo(() => {
|
|
3510
|
+
if (!o) return;
|
|
3511
|
+
function e(e) {
|
|
3512
|
+
y.pointerType = e.pointerType;
|
|
3513
|
+
}
|
|
3514
|
+
return {
|
|
3515
|
+
onPointerDown: e,
|
|
3516
|
+
onPointerEnter: e,
|
|
3517
|
+
onMouseMove(e) {
|
|
3518
|
+
let { nativeEvent: t } = e, r = e.currentTarget, i = n.select("domReferenceElement"), a = n.select("open"), o = O(i, r, e.target);
|
|
3519
|
+
if (u && !re(y.pointerType)) return;
|
|
3520
|
+
if (a && o && y.handleCloseOptions?.blockPointerEvents) {
|
|
3521
|
+
let e = n.select("floatingElement");
|
|
3522
|
+
e && pa(y, {
|
|
3523
|
+
scopeElement: y.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body,
|
|
3524
|
+
referenceElement: r,
|
|
3525
|
+
floatingElement: e
|
|
3526
|
+
});
|
|
3527
|
+
}
|
|
3528
|
+
let s = oe(C.current);
|
|
3529
|
+
if (a && !o || s === 0 || !o && y.restTimeoutPending && e.movementX ** 2 + e.movementY ** 2 < 2) return;
|
|
3530
|
+
y.restTimeout.clear();
|
|
3531
|
+
function l() {
|
|
3532
|
+
if (y.restTimeoutPending = !1, E()) return;
|
|
3533
|
+
let e = n.select("open");
|
|
3534
|
+
!y.blockMouseMove && (!e || o) && n.setOpen(!0, z(me, t, r));
|
|
3535
|
+
}
|
|
3536
|
+
y.pointerType === "touch" ? c.flushSync(() => {
|
|
3537
|
+
l();
|
|
3538
|
+
}) : o && a ? l() : (y.restTimeoutPending = !0, y.restTimeout.start(s, l));
|
|
3539
|
+
}
|
|
3540
|
+
};
|
|
3541
|
+
}, [
|
|
3542
|
+
o,
|
|
3543
|
+
y,
|
|
3544
|
+
E,
|
|
3545
|
+
O,
|
|
3546
|
+
u,
|
|
3547
|
+
n,
|
|
3548
|
+
C
|
|
3549
|
+
]);
|
|
3550
|
+
}
|
|
3551
|
+
//#endregion
|
|
3552
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useInteractions.js
|
|
3553
|
+
function va(e = []) {
|
|
3554
|
+
let t = e.map((e) => e?.reference), n = e.map((e) => e?.floating), i = e.map((e) => e?.item), a = e.map((e) => e?.trigger), o = r.useCallback((t) => ya(t, e, "reference"), t), s = r.useCallback((t) => ya(t, e, "floating"), n), c = r.useCallback((t) => ya(t, e, "item"), i), l = r.useCallback((t) => ya(t, e, "trigger"), a);
|
|
3555
|
+
return r.useMemo(() => ({
|
|
3556
|
+
getReferenceProps: o,
|
|
3557
|
+
getFloatingProps: s,
|
|
3558
|
+
getItemProps: c,
|
|
3559
|
+
getTriggerProps: l
|
|
3560
|
+
}), [
|
|
3561
|
+
o,
|
|
3562
|
+
s,
|
|
3563
|
+
c,
|
|
3564
|
+
l
|
|
3565
|
+
]);
|
|
3566
|
+
}
|
|
3567
|
+
function ya(e, t, n) {
|
|
3568
|
+
let r = /* @__PURE__ */ new Map(), i = n === "item", a = {};
|
|
3569
|
+
n === "floating" && (a.tabIndex = -1, a[lt] = "");
|
|
3570
|
+
for (let t in e) i && e && (t === "active" || t === "selected") || (a[t] = e[t]);
|
|
3571
|
+
for (let o = 0; o < t.length; o += 1) {
|
|
3572
|
+
let s, c = t[o]?.[n];
|
|
3573
|
+
s = typeof c == "function" ? e ? c(e) : null : c, s && ba(a, s, i, r);
|
|
3574
|
+
}
|
|
3575
|
+
return ba(a, e, i, r), a;
|
|
3576
|
+
}
|
|
3577
|
+
function ba(e, t, n, r) {
|
|
3578
|
+
for (let i in t) {
|
|
3579
|
+
let a = t[i];
|
|
3580
|
+
n && (i === "active" || i === "selected") || (i.startsWith("on") ? (r.has(i) || r.set(i, []), typeof a == "function" && (r.get(i)?.push(a), e[i] = (...e) => r.get(i)?.map((t) => t(...e)).find((e) => e !== void 0))) : e[i] = a);
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
//#endregion
|
|
3584
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/safePolygon.js
|
|
3585
|
+
var xa = .1, Sa = xa * xa, $ = .5;
|
|
3586
|
+
function Ca(e, t, n, r, i, a) {
|
|
3587
|
+
return r >= t != a >= t && e <= (i - n) * (t - r) / (a - r) + n;
|
|
3588
|
+
}
|
|
3589
|
+
function wa(e, t, n, r, i, a, o, s, c, l) {
|
|
3590
|
+
let u = !1;
|
|
3591
|
+
return Ca(e, t, n, r, i, a) && (u = !u), Ca(e, t, i, a, o, s) && (u = !u), Ca(e, t, o, s, c, l) && (u = !u), Ca(e, t, c, l, n, r) && (u = !u), u;
|
|
3592
|
+
}
|
|
3593
|
+
function Ta(e, t, n) {
|
|
3594
|
+
return e >= n.x && e <= n.x + n.width && t >= n.y && t <= n.y + n.height;
|
|
3595
|
+
}
|
|
3596
|
+
function Ea(e, t, n, r, i, a) {
|
|
3597
|
+
return e >= Math.min(n, i) && e <= Math.max(n, i) && t >= Math.min(r, a) && t <= Math.max(r, a);
|
|
3598
|
+
}
|
|
3599
|
+
function Da(e = {}) {
|
|
3600
|
+
let { blockPointerEvents: t = !1 } = e, n = new D(), r = ({ x: e, y: t, placement: r, elements: i, onClose: a, nodeId: o, tree: s }) => {
|
|
3601
|
+
let c = r?.split("-")[0], l = !1, u = null, d = null, f = typeof performance < "u" ? performance.now() : 0;
|
|
3602
|
+
function p(e, t) {
|
|
3603
|
+
let n = performance.now(), r = n - f;
|
|
3604
|
+
if (u === null || d === null || r === 0) return u = e, d = t, f = n, !1;
|
|
3605
|
+
let i = e - u, a = t - d, o = i * i + a * a, s = r * r * Sa;
|
|
3606
|
+
return u = e, d = t, f = n, o < s;
|
|
3607
|
+
}
|
|
3608
|
+
function m() {
|
|
3609
|
+
n.clear(), a();
|
|
3610
|
+
}
|
|
3611
|
+
return function(r) {
|
|
3612
|
+
n.clear();
|
|
3613
|
+
let a = i.domReference, u = i.floating;
|
|
3614
|
+
if (!a || !u || c == null || e == null || t == null) return;
|
|
3615
|
+
let { clientX: d, clientY: f } = r, h = ft(r), g = r.type === "mouseleave", _ = Y(u, h), v = Y(a, h);
|
|
3616
|
+
if (_ && (l = !0, !g)) return;
|
|
3617
|
+
if (v && (l = !1, !g)) {
|
|
3618
|
+
l = !0;
|
|
3619
|
+
return;
|
|
3620
|
+
}
|
|
3621
|
+
if (g && U(r.relatedTarget) && Y(u, r.relatedTarget)) return;
|
|
3622
|
+
function y() {
|
|
3623
|
+
return !!(s && pn(s.nodesRef.current, o).length > 0);
|
|
3624
|
+
}
|
|
3625
|
+
function b() {
|
|
3626
|
+
y() || m();
|
|
3627
|
+
}
|
|
3628
|
+
if (y()) return;
|
|
3629
|
+
let x = a.getBoundingClientRect(), S = u.getBoundingClientRect(), C = e > S.right - S.width / 2, w = t > S.bottom - S.height / 2, T = S.width > x.width, E = S.height > x.height, D = (T ? x : S).left, O = (T ? x : S).right, k = (E ? x : S).top, A = (E ? x : S).bottom;
|
|
3630
|
+
if (c === "top" && t >= x.bottom - 1 || c === "bottom" && t <= x.top + 1 || c === "left" && e >= x.right - 1 || c === "right" && e <= x.left + 1) {
|
|
3631
|
+
b();
|
|
3632
|
+
return;
|
|
3633
|
+
}
|
|
3634
|
+
let j = !1;
|
|
3635
|
+
switch (c) {
|
|
3636
|
+
case "top":
|
|
3637
|
+
j = Ea(d, f, D, x.top + 1, O, S.bottom - 1);
|
|
3638
|
+
break;
|
|
3639
|
+
case "bottom":
|
|
3640
|
+
j = Ea(d, f, D, S.top + 1, O, x.bottom - 1);
|
|
3641
|
+
break;
|
|
3642
|
+
case "left":
|
|
3643
|
+
j = Ea(d, f, S.right - 1, A, x.left + 1, k);
|
|
3644
|
+
break;
|
|
3645
|
+
case "right":
|
|
3646
|
+
j = Ea(d, f, x.right - 1, A, S.left + 1, k);
|
|
3647
|
+
break;
|
|
3648
|
+
default:
|
|
3649
|
+
}
|
|
3650
|
+
if (j) return;
|
|
3651
|
+
if (l && !Ta(d, f, x)) {
|
|
3652
|
+
b();
|
|
3653
|
+
return;
|
|
3654
|
+
}
|
|
3655
|
+
if (!g && p(d, f)) {
|
|
3656
|
+
b();
|
|
3657
|
+
return;
|
|
3658
|
+
}
|
|
3659
|
+
let M = !1;
|
|
3660
|
+
switch (c) {
|
|
3661
|
+
case "top": {
|
|
3662
|
+
let n = T ? $ / 2 : $ * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t + $ + 1, o = C || T ? S.bottom - $ : S.top, s = C ? T ? S.bottom - $ : S.top : S.bottom - $;
|
|
3663
|
+
M = wa(d, f, r, a, i, a, S.left, o, S.right, s);
|
|
3664
|
+
break;
|
|
3665
|
+
}
|
|
3666
|
+
case "bottom": {
|
|
3667
|
+
let n = T ? $ / 2 : $ * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t - $, o = C || T ? S.top + $ : S.bottom, s = C ? T ? S.top + $ : S.bottom : S.top + $;
|
|
3668
|
+
M = wa(d, f, r, a, i, a, S.left, o, S.right, s);
|
|
3669
|
+
break;
|
|
3670
|
+
}
|
|
3671
|
+
case "left": {
|
|
3672
|
+
let n = E ? $ / 2 : $ * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e + $ + 1, o = w || E ? S.right - $ : S.left, s = w ? E ? S.right - $ : S.left : S.right - $;
|
|
3673
|
+
M = wa(d, f, o, S.top, s, S.bottom, a, r, a, i);
|
|
3674
|
+
break;
|
|
3675
|
+
}
|
|
3676
|
+
case "right": {
|
|
3677
|
+
let n = E ? $ / 2 : $ * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e - $, o = w || E ? S.left + $ : S.right, s = w ? E ? S.left + $ : S.right : S.left + $;
|
|
3678
|
+
M = wa(d, f, a, r, a, i, o, S.top, s, S.bottom);
|
|
3679
|
+
break;
|
|
3680
|
+
}
|
|
3681
|
+
default:
|
|
3682
|
+
}
|
|
3683
|
+
M ? l || n.start(40, b) : b();
|
|
3684
|
+
};
|
|
3685
|
+
};
|
|
3686
|
+
return r.__options = {
|
|
3687
|
+
...e,
|
|
3688
|
+
blockPointerEvents: t
|
|
3689
|
+
}, r;
|
|
3690
|
+
}
|
|
3691
|
+
//#endregion
|
|
3692
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/store/TooltipStore.js
|
|
3693
|
+
var Oa = {
|
|
3694
|
+
...ia,
|
|
3695
|
+
disabled: Q((e) => e.disabled),
|
|
3696
|
+
instantType: Q((e) => e.instantType),
|
|
3697
|
+
isInstantPhase: Q((e) => e.isInstantPhase),
|
|
3698
|
+
trackCursorAxis: Q((e) => e.trackCursorAxis),
|
|
3699
|
+
disableHoverablePopup: Q((e) => e.disableHoverablePopup),
|
|
3700
|
+
lastOpenChangeReason: Q((e) => e.openChangeReason),
|
|
3701
|
+
closeOnClick: Q((e) => e.closeOnClick),
|
|
3702
|
+
closeDelay: Q((e) => e.closeDelay),
|
|
3703
|
+
hasViewport: Q((e) => e.hasViewport)
|
|
3704
|
+
}, ka = class e extends Bi {
|
|
3705
|
+
constructor(e) {
|
|
3706
|
+
super({
|
|
3707
|
+
...Aa(),
|
|
3708
|
+
...e
|
|
3709
|
+
}, {
|
|
3710
|
+
popupRef: /* @__PURE__ */ r.createRef(),
|
|
3711
|
+
onOpenChange: void 0,
|
|
3712
|
+
onOpenChangeComplete: void 0,
|
|
3713
|
+
triggerElements: new ea()
|
|
3714
|
+
}, Oa);
|
|
3715
|
+
}
|
|
3716
|
+
setOpen = (e, t) => {
|
|
3717
|
+
let n = t.reason, r = n === me, i = e && n === "trigger-focus", a = !e && (n === "trigger-press" || n === "escape-key");
|
|
3718
|
+
if (t.preventUnmountOnClose = () => {
|
|
3719
|
+
this.set("preventUnmountingOnClose", !0);
|
|
3720
|
+
}, this.context.onOpenChange?.(e, t), t.isCanceled) return;
|
|
3721
|
+
this.state.floatingRootContext.dispatchOpenChange(e, t);
|
|
3722
|
+
let o = () => {
|
|
3723
|
+
let r = {
|
|
3724
|
+
open: e,
|
|
3725
|
+
openChangeReason: n
|
|
3726
|
+
};
|
|
3727
|
+
i ? r.instantType = "focus" : a ? r.instantType = "dismiss" : n === "trigger-hover" && (r.instantType = void 0);
|
|
3728
|
+
let o = t.trigger?.id ?? null;
|
|
3729
|
+
(o || e) && (r.activeTriggerId = o, r.activeTriggerElement = t.trigger ?? null), this.update(r);
|
|
3730
|
+
};
|
|
3731
|
+
r ? c.flushSync(o) : o();
|
|
3732
|
+
};
|
|
3733
|
+
static useStore(t, n) {
|
|
3734
|
+
let r = u(() => new e(n)).current, i = t ?? r, a = sa({
|
|
3735
|
+
popupStore: i,
|
|
3736
|
+
onOpenChange: i.setOpen
|
|
3737
|
+
});
|
|
3738
|
+
return i.state.floatingRootContext = a, i;
|
|
3739
|
+
}
|
|
3740
|
+
};
|
|
3741
|
+
function Aa() {
|
|
3742
|
+
return {
|
|
3743
|
+
...na(),
|
|
3744
|
+
disabled: !1,
|
|
3745
|
+
instantType: void 0,
|
|
3746
|
+
isInstantPhase: !1,
|
|
3747
|
+
trackCursorAxis: "none",
|
|
3748
|
+
disableHoverablePopup: !1,
|
|
3749
|
+
openChangeReason: null,
|
|
3750
|
+
closeOnClick: !0,
|
|
3751
|
+
closeDelay: 0,
|
|
3752
|
+
hasViewport: !1
|
|
3753
|
+
};
|
|
3754
|
+
}
|
|
3755
|
+
//#endregion
|
|
3756
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
|
|
3757
|
+
var ja = h(function(e) {
|
|
3758
|
+
let { disabled: t = !1, defaultOpen: n = !1, open: i, disableHoverablePopup: a = !1, trackCursorAxis: s = "none", actionsRef: c, onOpenChange: l, onOpenChangeComplete: u, handle: d, triggerId: f, defaultTriggerId: p = null, children: m } = e, h = ka.useStore(d?.store, {
|
|
3759
|
+
open: n,
|
|
3760
|
+
openProp: i,
|
|
3761
|
+
activeTriggerId: p,
|
|
3762
|
+
triggerIdProp: f
|
|
3763
|
+
});
|
|
3764
|
+
v(() => {
|
|
3765
|
+
i === void 0 && h.state.open === !1 && n === !0 && h.update({
|
|
3766
|
+
open: !0,
|
|
3767
|
+
activeTriggerId: p
|
|
3768
|
+
});
|
|
3769
|
+
}), h.useControlledProp("openProp", i), h.useControlledProp("triggerIdProp", f), h.useContextCallback("onOpenChange", l), h.useContextCallback("onOpenChangeComplete", u);
|
|
3770
|
+
let g = h.useState("open"), _ = !t && g, b = h.useState("activeTriggerId"), x = h.useState("payload");
|
|
3771
|
+
h.useSyncedValues({
|
|
3772
|
+
trackCursorAxis: s,
|
|
3773
|
+
disableHoverablePopup: a
|
|
3774
|
+
}), y(() => {
|
|
3775
|
+
g && t && h.setOpen(!1, z(ve));
|
|
3776
|
+
}, [
|
|
3777
|
+
g,
|
|
3778
|
+
t,
|
|
3779
|
+
h
|
|
3780
|
+
]), h.useSyncedValue("disabled", t), Qi(h);
|
|
3781
|
+
let { forceUnmount: C, transitionStatus: w } = $i(_, h), T = h.select("floatingRootContext"), E = h.useState("isInstantPhase"), D = h.useState("instantType"), O = h.useState("lastOpenChangeReason"), k = r.useRef(null);
|
|
3782
|
+
y(() => {
|
|
3783
|
+
w === "ending" && O === "none" || w !== "ending" && E ? (D !== "delay" && (k.current = D), h.set("instantType", "delay")) : k.current !== null && (h.set("instantType", k.current), k.current = null);
|
|
3784
|
+
}, [
|
|
3785
|
+
w,
|
|
3786
|
+
E,
|
|
3787
|
+
O,
|
|
3788
|
+
D,
|
|
3789
|
+
h
|
|
3790
|
+
]), y(() => {
|
|
3791
|
+
_ && (b ?? h.set("payload", void 0));
|
|
3792
|
+
}, [
|
|
3793
|
+
h,
|
|
3794
|
+
b,
|
|
3795
|
+
_
|
|
3796
|
+
]);
|
|
3797
|
+
let A = r.useCallback(() => {
|
|
3798
|
+
h.setOpen(!1, Ma(h, ye));
|
|
3799
|
+
}, [h]);
|
|
3800
|
+
r.useImperativeHandle(c, () => ({
|
|
3801
|
+
unmount: C,
|
|
3802
|
+
close: A
|
|
3803
|
+
}), [C, A]);
|
|
3804
|
+
let { getReferenceProps: j, getFloatingProps: M, getTriggerProps: N } = va([gr(T, {
|
|
3805
|
+
enabled: !t,
|
|
3806
|
+
referencePress: () => h.select("closeOnClick")
|
|
3807
|
+
}), fr(T, {
|
|
3808
|
+
enabled: !t && s !== "none",
|
|
3809
|
+
axis: s === "none" ? void 0 : s
|
|
3810
|
+
})]), P = r.useMemo(() => j(), [j]), F = r.useMemo(() => N(), [N]), I = r.useMemo(() => M(), [M]);
|
|
3811
|
+
return h.useSyncedValues({
|
|
3812
|
+
activeTriggerProps: P,
|
|
3813
|
+
inactiveTriggerProps: F,
|
|
3814
|
+
popupProps: I
|
|
3815
|
+
}), /* @__PURE__ */ o(S.Provider, {
|
|
3816
|
+
value: h,
|
|
3817
|
+
children: typeof m == "function" ? m({ payload: x }) : m
|
|
3818
|
+
});
|
|
3819
|
+
});
|
|
3820
|
+
process.env.NODE_ENV !== "production" && (ja.displayName = "TooltipRoot");
|
|
3821
|
+
function Ma(e, t) {
|
|
3822
|
+
let n = z(t);
|
|
3823
|
+
return n.preventUnmountOnClose = () => {
|
|
3824
|
+
e.set("preventUnmountingOnClose", !0);
|
|
3825
|
+
}, n;
|
|
3826
|
+
}
|
|
3827
|
+
//#endregion
|
|
3828
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/popupStateMapping.js
|
|
3829
|
+
var Na = function(e) {
|
|
3830
|
+
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = Wi.startingStyle] = "startingStyle", e[e.endingStyle = Wi.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
|
|
3831
|
+
}({}), Pa = /* @__PURE__ */ function(e) {
|
|
3832
|
+
return e.popupOpen = "data-popup-open", e.pressed = "data-pressed", e;
|
|
3833
|
+
}({}), Fa = { [Pa.popupOpen]: "" };
|
|
3834
|
+
Pa.popupOpen, Pa.pressed;
|
|
3835
|
+
var Ia = { [Na.open]: "" }, La = { [Na.closed]: "" }, Ra = { [Na.anchorHidden]: "" }, za = { open(e) {
|
|
3836
|
+
return e ? Fa : null;
|
|
3837
|
+
} }, Ba = {
|
|
3838
|
+
open(e) {
|
|
3839
|
+
return e ? Ia : La;
|
|
3840
|
+
},
|
|
3841
|
+
anchorHidden(e) {
|
|
3842
|
+
return e ? Ra : null;
|
|
3843
|
+
}
|
|
3844
|
+
};
|
|
3845
|
+
//#endregion
|
|
3846
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useBaseUiId.js
|
|
3847
|
+
function Va(e) {
|
|
3848
|
+
return yn(e, "base-ui");
|
|
3849
|
+
}
|
|
3850
|
+
//#endregion
|
|
3851
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/provider/TooltipProviderContext.js
|
|
3852
|
+
var Ha = /* @__PURE__ */ r.createContext(void 0);
|
|
3853
|
+
process.env.NODE_ENV !== "production" && (Ha.displayName = "TooltipProviderContext");
|
|
3854
|
+
function Ua() {
|
|
3855
|
+
return r.useContext(Ha);
|
|
3856
|
+
}
|
|
3857
|
+
//#endregion
|
|
3858
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTriggerDataAttributes.js
|
|
3859
|
+
var Wa = function(e) {
|
|
3860
|
+
return e[e.popupOpen = Pa.popupOpen] = "popupOpen", e.triggerDisabled = "data-trigger-disabled", e;
|
|
3861
|
+
}({}), Ga = g(function(e, t) {
|
|
3862
|
+
let { className: n, render: i, handle: a, payload: o, disabled: s, delay: c, closeOnClick: l = !0, closeDelay: u, id: d, style: f, ...p } = e, m = C(!0), h = a?.store ?? m;
|
|
3863
|
+
if (!h) throw Error(process.env.NODE_ENV === "production" ? x(82) : "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");
|
|
3864
|
+
let g = Va(d), _ = h.useState("isTriggerActive", g), v = h.useState("isOpenedByTrigger", g), y = h.useState("floatingRootContext"), b = r.useRef(null), S = c ?? 600, w = u ?? 0, { registerTrigger: T, isMountedByThisTrigger: E } = Zi(g, b, h, {
|
|
3865
|
+
payload: o,
|
|
3866
|
+
closeOnClick: l,
|
|
3867
|
+
closeDelay: w
|
|
3868
|
+
}), D = Ua(), { delayRef: O, isInstantPhase: k, hasProvider: A } = Se(y, { open: v });
|
|
3869
|
+
h.useSyncedValue("isInstantPhase", k);
|
|
3870
|
+
let j = h.useState("disabled"), M = s ?? j, N = h.useState("trackCursorAxis"), P = h.useState("disableHoverablePopup"), F = _a(y, {
|
|
3871
|
+
enabled: !M,
|
|
3872
|
+
mouseOnly: !0,
|
|
3873
|
+
move: !1,
|
|
3874
|
+
handleClose: !P && N !== "both" ? Da() : null,
|
|
3875
|
+
restMs() {
|
|
3876
|
+
let e = D?.delay, t = typeof O.current == "object" ? O.current.open : void 0, n = S;
|
|
3877
|
+
return A && (n = t === 0 ? 0 : c ?? e ?? S), n;
|
|
3878
|
+
},
|
|
3879
|
+
delay() {
|
|
3880
|
+
let e = typeof O.current == "object" ? O.current.close : void 0, t = w;
|
|
3881
|
+
return u == null && A && (t = e), { close: t };
|
|
3882
|
+
},
|
|
3883
|
+
triggerElementRef: b,
|
|
3884
|
+
isActiveTrigger: _,
|
|
3885
|
+
isClosing: () => h.select("transitionStatus") === "ending"
|
|
3886
|
+
}), I = la(y, { enabled: !M }).reference, ee = { open: v }, te = h.useState("triggerProps", E);
|
|
3887
|
+
return Wn("button", e, {
|
|
3888
|
+
state: ee,
|
|
3889
|
+
ref: [
|
|
3890
|
+
t,
|
|
3891
|
+
T,
|
|
3892
|
+
b
|
|
3893
|
+
],
|
|
3894
|
+
props: [
|
|
3895
|
+
F,
|
|
3896
|
+
I,
|
|
3897
|
+
te,
|
|
3898
|
+
{
|
|
3899
|
+
onPointerDown() {
|
|
3900
|
+
h.set("closeOnClick", l);
|
|
3901
|
+
},
|
|
3902
|
+
id: g,
|
|
3903
|
+
[Wa.triggerDisabled]: M ? "" : void 0
|
|
3904
|
+
},
|
|
3905
|
+
p
|
|
3906
|
+
],
|
|
3907
|
+
stateAttributesMapping: za
|
|
3908
|
+
});
|
|
3909
|
+
});
|
|
3910
|
+
process.env.NODE_ENV !== "production" && (Ga.displayName = "TooltipTrigger");
|
|
3911
|
+
//#endregion
|
|
3912
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortalContext.js
|
|
3913
|
+
var Ka = /* @__PURE__ */ r.createContext(void 0);
|
|
3914
|
+
process.env.NODE_ENV !== "production" && (Ka.displayName = "TooltipPortalContext");
|
|
3915
|
+
function qa() {
|
|
3916
|
+
let e = r.useContext(Ka);
|
|
3917
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? x(70) : "Base UI: <Tooltip.Portal> is missing.");
|
|
3918
|
+
return e;
|
|
3919
|
+
}
|
|
3920
|
+
//#endregion
|
|
3921
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/FloatingPortalLite.js
|
|
3922
|
+
var Ja = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3923
|
+
let { children: n, container: i, className: a, render: o, style: l, ...u } = e, { portalNode: d, portalSubtree: f } = nr({
|
|
3924
|
+
container: i,
|
|
3925
|
+
ref: t,
|
|
3926
|
+
componentProps: e,
|
|
3927
|
+
elementProps: u
|
|
3928
|
+
});
|
|
3929
|
+
return !f && !d ? null : /* @__PURE__ */ s(r.Fragment, { children: [f, d && /* @__PURE__ */ c.createPortal(n, d)] });
|
|
3930
|
+
});
|
|
3931
|
+
process.env.NODE_ENV !== "production" && (Ja.displayName = "FloatingPortalLite");
|
|
3932
|
+
//#endregion
|
|
3933
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
|
|
3934
|
+
var Ya = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
3935
|
+
let { keepMounted: n = !1, ...r } = e;
|
|
3936
|
+
return C().useState("mounted") || n ? /* @__PURE__ */ o(Ka.Provider, {
|
|
3937
|
+
value: n,
|
|
3938
|
+
children: /* @__PURE__ */ o(Ja, {
|
|
3939
|
+
ref: t,
|
|
3940
|
+
...r
|
|
3941
|
+
})
|
|
3942
|
+
}) : null;
|
|
3943
|
+
});
|
|
3944
|
+
process.env.NODE_ENV !== "production" && (Ya.displayName = "TooltipPortal");
|
|
3945
|
+
//#endregion
|
|
3946
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositionerContext.js
|
|
3947
|
+
var Xa = /* @__PURE__ */ r.createContext(void 0);
|
|
3948
|
+
process.env.NODE_ENV !== "production" && (Xa.displayName = "TooltipPositionerContext");
|
|
3949
|
+
function Za() {
|
|
3950
|
+
let e = r.useContext(Xa);
|
|
3951
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? x(71) : "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");
|
|
3952
|
+
return e;
|
|
3953
|
+
}
|
|
3954
|
+
//#endregion
|
|
3955
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/direction-provider/DirectionContext.js
|
|
3956
|
+
var Qa = /* @__PURE__ */ r.createContext(void 0);
|
|
3957
|
+
process.env.NODE_ENV !== "production" && (Qa.displayName = "DirectionContext");
|
|
3958
|
+
function $a() {
|
|
3959
|
+
return r.useContext(Qa)?.direction ?? "ltr";
|
|
3960
|
+
}
|
|
3961
|
+
//#endregion
|
|
3962
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/floating-ui-react/middleware/arrow.js
|
|
3963
|
+
var eo = (e) => ({
|
|
3964
|
+
name: "arrow",
|
|
3965
|
+
options: e,
|
|
3966
|
+
async fn(t) {
|
|
3967
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0, offsetParent: d = "real" } = Et(e, t) || {};
|
|
3968
|
+
if (l == null) return {};
|
|
3969
|
+
let f = Ut(u), p = {
|
|
3970
|
+
x: n,
|
|
3971
|
+
y: r
|
|
3972
|
+
}, m = jt(i), h = kt(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = d === "real" ? await o.getOffsetParent?.(l) : s.floating, w = s.floating[b] || a.floating[h];
|
|
3973
|
+
(!w || !await o.isElement?.(C)) && (w = s.floating[b] || a.floating[h]);
|
|
3974
|
+
let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = Math.min(f[v], E), O = Math.min(f[y], E), k = D, A = w - g[h] - O, j = w / 2 - g[h] / 2 + T, M = Tt(k, j, A), N = !c.arrow && Dt(i) != null && j !== M && a.reference[h] / 2 - (j < k ? D : O) - g[h] / 2 < 0, P = N ? j < k ? j - k : j - A : 0;
|
|
3975
|
+
return {
|
|
3976
|
+
[m]: p[m] + P,
|
|
3977
|
+
data: {
|
|
3978
|
+
[m]: M,
|
|
3979
|
+
centerOffset: j - M - P,
|
|
3980
|
+
...N && { alignmentOffset: P }
|
|
3981
|
+
},
|
|
3982
|
+
reset: N
|
|
3983
|
+
};
|
|
3984
|
+
}
|
|
3985
|
+
}), to = (e, t) => ({
|
|
3986
|
+
...eo(e),
|
|
3987
|
+
options: [e, t]
|
|
3988
|
+
}), no = {
|
|
3989
|
+
name: "hide",
|
|
3990
|
+
async fn(e) {
|
|
3991
|
+
let { width: t, height: n, x: r, y: i } = e.rects.reference, a = t === 0 && n === 0 && r === 0 && i === 0;
|
|
3992
|
+
return { data: { referenceHidden: (await Ti().fn(e)).data?.referenceHidden || a } };
|
|
3993
|
+
}
|
|
3994
|
+
}, ro = {
|
|
3995
|
+
sideX: "left",
|
|
3996
|
+
sideY: "top"
|
|
3997
|
+
}, io = {
|
|
3998
|
+
name: "adaptiveOrigin",
|
|
3999
|
+
async fn(e) {
|
|
4000
|
+
let { x: t, y: n, rects: { floating: r }, elements: { floating: i }, platform: a, strategy: o, placement: s } = e, c = V(i), l = c.getComputedStyle(i);
|
|
4001
|
+
if (!(l.transitionDuration !== "0s" && l.transitionDuration !== "")) return {
|
|
4002
|
+
x: t,
|
|
4003
|
+
y: n,
|
|
4004
|
+
data: ro
|
|
4005
|
+
};
|
|
4006
|
+
let u = await a.getOffsetParent?.(i), d = {
|
|
4007
|
+
width: 0,
|
|
4008
|
+
height: 0
|
|
4009
|
+
};
|
|
4010
|
+
if (o === "fixed" && c?.visualViewport) d = {
|
|
4011
|
+
width: c.visualViewport.width,
|
|
4012
|
+
height: c.visualViewport.height
|
|
4013
|
+
};
|
|
4014
|
+
else if (u === c) {
|
|
4015
|
+
let e = J(i);
|
|
4016
|
+
d = {
|
|
4017
|
+
width: e.documentElement.clientWidth,
|
|
4018
|
+
height: e.documentElement.clientHeight
|
|
4019
|
+
};
|
|
4020
|
+
} else await a.isElement?.(u) && (d = await a.getDimensions(u));
|
|
4021
|
+
let f = Z(s), p = t, m = n;
|
|
4022
|
+
f === "left" && (p = d.width - (t + r.width)), f === "top" && (m = d.height - (n + r.height));
|
|
4023
|
+
let h = f === "left" ? "right" : ro.sideX, g = f === "top" ? "bottom" : ro.sideY;
|
|
4024
|
+
return {
|
|
4025
|
+
x: p,
|
|
4026
|
+
y: m,
|
|
4027
|
+
data: {
|
|
4028
|
+
sideX: h,
|
|
4029
|
+
sideY: g
|
|
4030
|
+
}
|
|
4031
|
+
};
|
|
4032
|
+
}
|
|
4033
|
+
};
|
|
4034
|
+
//#endregion
|
|
4035
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/useAnchorPositioning.js
|
|
4036
|
+
function ao(e, t, n) {
|
|
4037
|
+
let r = e === "inline-start" || e === "inline-end";
|
|
4038
|
+
return {
|
|
4039
|
+
top: "top",
|
|
4040
|
+
right: r ? n ? "inline-start" : "inline-end" : "right",
|
|
4041
|
+
bottom: "bottom",
|
|
4042
|
+
left: r ? n ? "inline-end" : "inline-start" : "left"
|
|
4043
|
+
}[t];
|
|
4044
|
+
}
|
|
4045
|
+
function oo(e, t, n) {
|
|
4046
|
+
let { rects: r, placement: i } = e;
|
|
4047
|
+
return {
|
|
4048
|
+
side: ao(t, Z(i), n),
|
|
4049
|
+
align: Dt(i) || "center",
|
|
4050
|
+
anchor: {
|
|
4051
|
+
width: r.reference.width,
|
|
4052
|
+
height: r.reference.height
|
|
4053
|
+
},
|
|
4054
|
+
positioner: {
|
|
4055
|
+
width: r.floating.width,
|
|
4056
|
+
height: r.floating.height
|
|
4057
|
+
}
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
function so(e) {
|
|
4061
|
+
let { anchor: t, positionMethod: n = "absolute", side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, collisionBoundary: c, collisionPadding: l = 5, sticky: u = !1, arrowPadding: d = 5, disableAnchorTracking: f = !1, keepMounted: p = !1, floatingRootContext: m, mounted: h, collisionAvoidance: g, shiftCrossAxis: _ = !1, nodeId: v, adaptiveOrigin: b, lazyFlip: x = !1, externalTree: S } = e, [C, w] = r.useState(null);
|
|
4062
|
+
!h && C !== null && w(null);
|
|
4063
|
+
let T = g.side || "flip", E = g.align || "flip", D = g.fallbackAxisSide || "end", O = typeof t == "function" ? t : void 0, k = q(O), A = O ? k : t, j = Ye(t), M = Ye(h), N = $a() === "rtl", P = C || {
|
|
4064
|
+
top: "top",
|
|
4065
|
+
right: "right",
|
|
4066
|
+
bottom: "bottom",
|
|
4067
|
+
left: "left",
|
|
4068
|
+
"inline-end": N ? "left" : "right",
|
|
4069
|
+
"inline-start": N ? "right" : "left"
|
|
4070
|
+
}[i], F = o === "center" ? P : `${P}-${o}`, I = l, ee = i === "bottom" ? 1 : 0, te = i === "top" ? 1 : 0, ne = i === "right" ? 1 : 0, re = i === "left" ? 1 : 0;
|
|
4071
|
+
typeof I == "number" ? I = {
|
|
4072
|
+
top: I + ee,
|
|
4073
|
+
right: I + re,
|
|
4074
|
+
bottom: I + te,
|
|
4075
|
+
left: I + ne
|
|
4076
|
+
} : I &&= {
|
|
4077
|
+
top: (I.top || 0) + ee,
|
|
4078
|
+
right: (I.right || 0) + re,
|
|
4079
|
+
bottom: (I.bottom || 0) + te,
|
|
4080
|
+
left: (I.left || 0) + ne
|
|
4081
|
+
};
|
|
4082
|
+
let ie = {
|
|
4083
|
+
boundary: c === "clipping-ancestors" ? "clippingAncestors" : c,
|
|
4084
|
+
padding: I
|
|
4085
|
+
}, L = r.useRef(null), ae = Ye(a), oe = Ye(s), se = [bi((e) => {
|
|
4086
|
+
let t = oo(e, i, N), n = typeof ae.current == "function" ? ae.current(t) : ae.current, r = typeof oe.current == "function" ? oe.current(t) : oe.current;
|
|
4087
|
+
return {
|
|
4088
|
+
mainAxis: n,
|
|
4089
|
+
crossAxis: r,
|
|
4090
|
+
alignmentAxis: r
|
|
4091
|
+
};
|
|
4092
|
+
}, [
|
|
4093
|
+
typeof a == "function" ? 0 : a,
|
|
4094
|
+
typeof s == "function" ? 0 : s,
|
|
4095
|
+
N,
|
|
4096
|
+
i
|
|
4097
|
+
])], ce = E === "none" && T !== "shift", R = !ce && (u || _ || T === "shift"), le = T === "none" ? null : Ci({
|
|
4098
|
+
...ie,
|
|
4099
|
+
padding: {
|
|
4100
|
+
top: I.top + 1,
|
|
4101
|
+
right: I.right + 1,
|
|
4102
|
+
bottom: I.bottom + 1,
|
|
4103
|
+
left: I.left + 1
|
|
4104
|
+
},
|
|
4105
|
+
mainAxis: !_ && T === "flip",
|
|
4106
|
+
crossAxis: E === "flip" ? "alignment" : !1,
|
|
4107
|
+
fallbackAxisSideDirection: D
|
|
4108
|
+
}), ue = ce ? null : xi((e) => {
|
|
4109
|
+
let t = J(e.elements.floating).documentElement;
|
|
4110
|
+
return {
|
|
4111
|
+
...ie,
|
|
4112
|
+
rootBoundary: _ ? {
|
|
4113
|
+
x: 0,
|
|
4114
|
+
y: 0,
|
|
4115
|
+
width: t.clientWidth,
|
|
4116
|
+
height: t.clientHeight
|
|
4117
|
+
} : void 0,
|
|
4118
|
+
mainAxis: E !== "none",
|
|
4119
|
+
crossAxis: R,
|
|
4120
|
+
limiter: u || _ ? void 0 : Si((e) => {
|
|
4121
|
+
if (!L.current) return {};
|
|
4122
|
+
let { width: t, height: n } = L.current.getBoundingClientRect(), r = At(Z(e.placement)), i = r === "y" ? t : n, a = r === "y" ? I.left + I.right : I.top + I.bottom;
|
|
4123
|
+
return { offset: i / 2 + a / 2 };
|
|
4124
|
+
})
|
|
4125
|
+
};
|
|
4126
|
+
}, [
|
|
4127
|
+
ie,
|
|
4128
|
+
u,
|
|
4129
|
+
_,
|
|
4130
|
+
I,
|
|
4131
|
+
E
|
|
4132
|
+
]);
|
|
4133
|
+
T === "shift" || E === "shift" || o === "center" ? se.push(ue, le) : se.push(le, ue), se.push(wi({
|
|
4134
|
+
...ie,
|
|
4135
|
+
apply({ elements: { floating: e }, availableWidth: t, availableHeight: n, rects: r }) {
|
|
4136
|
+
if (!M.current) return;
|
|
4137
|
+
let i = e.style;
|
|
4138
|
+
i.setProperty("--available-width", `${t}px`), i.setProperty("--available-height", `${n}px`);
|
|
4139
|
+
let a = V(e).devicePixelRatio || 1, { x: o, y: s, width: c, height: l } = r.reference, u = (Math.round((o + c) * a) - Math.round(o * a)) / a, d = (Math.round((s + l) * a) - Math.round(s * a)) / a;
|
|
4140
|
+
i.setProperty("--anchor-width", `${u}px`), i.setProperty("--anchor-height", `${d}px`);
|
|
4141
|
+
}
|
|
4142
|
+
}), to(() => ({
|
|
4143
|
+
element: L.current || J(L.current).createElement("div"),
|
|
4144
|
+
padding: d,
|
|
4145
|
+
offsetParent: "floating"
|
|
4146
|
+
}), [d]), {
|
|
4147
|
+
name: "transformOrigin",
|
|
4148
|
+
fn(e) {
|
|
4149
|
+
let { elements: t, middlewareData: n, placement: r, rects: o, y: s } = e, c = Z(r), l = At(c), u = L.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, p = u?.clientWidth || 0, m = u?.clientHeight || 0, h = d + p / 2, g = f + m / 2, _ = Math.abs(n.shift?.y || 0), v = o.reference.height / 2, y = typeof a == "function" ? a(oo(e, i, N)) : a, b = _ > y, x = {
|
|
4150
|
+
top: `${h}px calc(100% + ${y}px)`,
|
|
4151
|
+
bottom: `${h}px ${-y}px`,
|
|
4152
|
+
left: `calc(100% + ${y}px) ${g}px`,
|
|
4153
|
+
right: `${-y}px ${g}px`
|
|
4154
|
+
}[c], S = `${h}px ${o.reference.y + v - s}px`;
|
|
4155
|
+
return t.floating.style.setProperty("--transform-origin", R && l === "y" && b ? S : x), {};
|
|
4156
|
+
}
|
|
4157
|
+
}, no, b), y(() => {
|
|
4158
|
+
!h && m && m.update({
|
|
4159
|
+
referenceElement: null,
|
|
4160
|
+
floatingElement: null,
|
|
4161
|
+
domReferenceElement: null,
|
|
4162
|
+
positionReference: null
|
|
4163
|
+
});
|
|
4164
|
+
}, [h, m]);
|
|
4165
|
+
let de = r.useMemo(() => ({
|
|
4166
|
+
elementResize: !f && typeof ResizeObserver < "u",
|
|
4167
|
+
layoutShift: !f && typeof IntersectionObserver < "u"
|
|
4168
|
+
}), [f]), { refs: fe, elements: pe, x: me, y: he, middlewareData: ge, update: _e, placement: ve, context: ye, isPositioned: z, floatingStyles: be } = oa({
|
|
4169
|
+
rootContext: m,
|
|
4170
|
+
open: p ? h : void 0,
|
|
4171
|
+
placement: F,
|
|
4172
|
+
middleware: se,
|
|
4173
|
+
strategy: n,
|
|
4174
|
+
whileElementsMounted: p ? void 0 : (...e) => oi(...e, de),
|
|
4175
|
+
nodeId: v,
|
|
4176
|
+
externalTree: S
|
|
4177
|
+
}), { sideX: xe, sideY: Se } = ge.adaptiveOrigin || ro, Ce = z ? n : "fixed", B = r.useMemo(() => {
|
|
4178
|
+
let e = b ? {
|
|
4179
|
+
position: Ce,
|
|
4180
|
+
[xe]: me,
|
|
4181
|
+
[Se]: he
|
|
4182
|
+
} : {
|
|
4183
|
+
position: Ce,
|
|
4184
|
+
...be
|
|
4185
|
+
};
|
|
4186
|
+
return z || (e.opacity = 0), e;
|
|
4187
|
+
}, [
|
|
4188
|
+
b,
|
|
4189
|
+
Ce,
|
|
4190
|
+
xe,
|
|
4191
|
+
me,
|
|
4192
|
+
Se,
|
|
4193
|
+
he,
|
|
4194
|
+
be,
|
|
4195
|
+
z
|
|
4196
|
+
]), H = r.useRef(null);
|
|
4197
|
+
y(() => {
|
|
4198
|
+
if (!h) return;
|
|
4199
|
+
let e = j.current, t = typeof e == "function" ? e() : e, n = (co(t) ? t.current : t) || null;
|
|
4200
|
+
n !== H.current && (fe.setPositionReference(n), H.current = n);
|
|
4201
|
+
}, [
|
|
4202
|
+
h,
|
|
4203
|
+
fe,
|
|
4204
|
+
A,
|
|
4205
|
+
j
|
|
4206
|
+
]), r.useEffect(() => {
|
|
4207
|
+
if (!h) return;
|
|
4208
|
+
let e = j.current;
|
|
4209
|
+
typeof e != "function" && co(e) && e.current !== H.current && (fe.setPositionReference(e.current), H.current = e.current);
|
|
4210
|
+
}, [
|
|
4211
|
+
h,
|
|
4212
|
+
fe,
|
|
4213
|
+
A,
|
|
4214
|
+
j
|
|
4215
|
+
]), r.useEffect(() => {
|
|
4216
|
+
if (p && h && pe.domReference && pe.floating) return oi(pe.domReference, pe.floating, _e, de);
|
|
4217
|
+
}, [
|
|
4218
|
+
p,
|
|
4219
|
+
h,
|
|
4220
|
+
pe,
|
|
4221
|
+
_e,
|
|
4222
|
+
de
|
|
4223
|
+
]);
|
|
4224
|
+
let we = Z(ve), U = ao(i, we, N), W = Dt(ve) || "center", Te = !!ge.hide?.referenceHidden;
|
|
4225
|
+
y(() => {
|
|
4226
|
+
x && h && z && w(we);
|
|
4227
|
+
}, [
|
|
4228
|
+
x,
|
|
4229
|
+
h,
|
|
4230
|
+
z,
|
|
4231
|
+
we
|
|
4232
|
+
]);
|
|
4233
|
+
let Ee = r.useMemo(() => ({
|
|
4234
|
+
position: "absolute",
|
|
4235
|
+
top: ge.arrow?.y,
|
|
4236
|
+
left: ge.arrow?.x
|
|
4237
|
+
}), [ge.arrow]), De = ge.arrow?.centerOffset !== 0;
|
|
4238
|
+
return r.useMemo(() => ({
|
|
4239
|
+
positionerStyles: B,
|
|
4240
|
+
arrowStyles: Ee,
|
|
4241
|
+
arrowRef: L,
|
|
4242
|
+
arrowUncentered: De,
|
|
4243
|
+
side: U,
|
|
4244
|
+
align: W,
|
|
4245
|
+
physicalSide: we,
|
|
4246
|
+
anchorHidden: Te,
|
|
4247
|
+
refs: fe,
|
|
4248
|
+
context: ye,
|
|
4249
|
+
isPositioned: z,
|
|
4250
|
+
update: _e
|
|
4251
|
+
}), [
|
|
4252
|
+
B,
|
|
4253
|
+
Ee,
|
|
4254
|
+
L,
|
|
4255
|
+
De,
|
|
4256
|
+
U,
|
|
4257
|
+
W,
|
|
4258
|
+
we,
|
|
4259
|
+
Te,
|
|
4260
|
+
fe,
|
|
4261
|
+
ye,
|
|
4262
|
+
z,
|
|
4263
|
+
_e
|
|
4264
|
+
]);
|
|
4265
|
+
}
|
|
4266
|
+
function co(e) {
|
|
4267
|
+
return e != null && "current" in e;
|
|
4268
|
+
}
|
|
4269
|
+
//#endregion
|
|
4270
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/getDisabledMountTransitionStyles.js
|
|
4271
|
+
function lo(e) {
|
|
4272
|
+
return e === "starting" ? le : R;
|
|
4273
|
+
}
|
|
4274
|
+
//#endregion
|
|
4275
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/utils/usePositioner.js
|
|
4276
|
+
function uo(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o, inert: s = !1 }) {
|
|
4277
|
+
let c = { ...n };
|
|
4278
|
+
return s && (c.pointerEvents = "none"), Wn("div", e, {
|
|
4279
|
+
state: t,
|
|
4280
|
+
ref: a,
|
|
4281
|
+
props: [
|
|
4282
|
+
{
|
|
4283
|
+
role: "presentation",
|
|
4284
|
+
hidden: o,
|
|
4285
|
+
style: c
|
|
4286
|
+
},
|
|
4287
|
+
lo(r),
|
|
4288
|
+
i
|
|
4289
|
+
],
|
|
4290
|
+
stateAttributesMapping: Ba
|
|
4291
|
+
});
|
|
4292
|
+
}
|
|
4293
|
+
//#endregion
|
|
4294
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
|
|
4295
|
+
var fo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
4296
|
+
let { render: n, className: i, anchor: a, positionMethod: s = "absolute", side: c = "top", align: l = "center", sideOffset: u = 0, alignOffset: d = 0, collisionBoundary: f = "clipping-ancestors", collisionPadding: p = 5, arrowPadding: m = 5, sticky: h = !1, disableAnchorTracking: g = !1, collisionAvoidance: _ = ue, style: v, ...y } = e, b = C(), x = qa(), S = b.useState("open"), w = b.useState("mounted"), T = b.useState("trackCursorAxis"), E = b.useState("disableHoverablePopup"), D = b.useState("floatingRootContext"), O = b.useState("instantType"), k = b.useState("transitionStatus"), A = so({
|
|
4297
|
+
anchor: a,
|
|
4298
|
+
positionMethod: s,
|
|
4299
|
+
floatingRootContext: D,
|
|
4300
|
+
mounted: w,
|
|
4301
|
+
side: c,
|
|
4302
|
+
sideOffset: u,
|
|
4303
|
+
align: l,
|
|
4304
|
+
alignOffset: d,
|
|
4305
|
+
collisionBoundary: f,
|
|
4306
|
+
collisionPadding: p,
|
|
4307
|
+
sticky: h,
|
|
4308
|
+
arrowPadding: m,
|
|
4309
|
+
disableAnchorTracking: g,
|
|
4310
|
+
keepMounted: x,
|
|
4311
|
+
collisionAvoidance: _,
|
|
4312
|
+
adaptiveOrigin: b.useState("hasViewport") ? io : void 0
|
|
4313
|
+
}), j = uo(e, r.useMemo(() => ({
|
|
4314
|
+
open: S,
|
|
4315
|
+
side: A.side,
|
|
4316
|
+
align: A.align,
|
|
4317
|
+
anchorHidden: A.anchorHidden,
|
|
4318
|
+
instant: T === "none" ? O : "tracking-cursor"
|
|
4319
|
+
}), [
|
|
4320
|
+
S,
|
|
4321
|
+
A.side,
|
|
4322
|
+
A.align,
|
|
4323
|
+
A.anchorHidden,
|
|
4324
|
+
T,
|
|
4325
|
+
O
|
|
4326
|
+
]), {
|
|
4327
|
+
styles: A.positionerStyles,
|
|
4328
|
+
transitionStatus: k,
|
|
4329
|
+
props: y,
|
|
4330
|
+
refs: [t, b.useStateSetter("positionerElement")],
|
|
4331
|
+
hidden: !w,
|
|
4332
|
+
inert: !S || T === "both" || E
|
|
4333
|
+
});
|
|
4334
|
+
return /* @__PURE__ */ o(Xa.Provider, {
|
|
4335
|
+
value: A,
|
|
4336
|
+
children: j
|
|
4337
|
+
});
|
|
4338
|
+
});
|
|
4339
|
+
process.env.NODE_ENV !== "production" && (fo.displayName = "TooltipPositioner");
|
|
4340
|
+
//#endregion
|
|
4341
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js
|
|
4342
|
+
var po = {
|
|
4343
|
+
...Ba,
|
|
4344
|
+
...qi
|
|
4345
|
+
}, mo = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
4346
|
+
let { className: n, render: r, style: i, ...a } = e, o = C(), { side: s, align: c } = Za(), l = o.useState("open"), u = o.useState("instantType"), d = o.useState("transitionStatus"), f = o.useState("popupProps"), p = o.useState("floatingRootContext");
|
|
4347
|
+
Yi({
|
|
4348
|
+
open: l,
|
|
4349
|
+
ref: o.context.popupRef,
|
|
4350
|
+
onComplete() {
|
|
4351
|
+
l && o.context.onOpenChangeComplete?.(!0);
|
|
4352
|
+
}
|
|
4353
|
+
});
|
|
4354
|
+
let m = o.useState("disabled"), h = o.useState("closeDelay");
|
|
4355
|
+
return ha(p, {
|
|
4356
|
+
enabled: !m,
|
|
4357
|
+
closeDelay: h
|
|
4358
|
+
}), Wn("div", e, {
|
|
4359
|
+
state: {
|
|
4360
|
+
open: l,
|
|
4361
|
+
side: s,
|
|
4362
|
+
align: c,
|
|
4363
|
+
instant: u,
|
|
4364
|
+
transitionStatus: d
|
|
4365
|
+
},
|
|
4366
|
+
ref: [
|
|
4367
|
+
t,
|
|
4368
|
+
o.context.popupRef,
|
|
4369
|
+
o.useStateSetter("popupElement")
|
|
4370
|
+
],
|
|
4371
|
+
props: [
|
|
4372
|
+
f,
|
|
4373
|
+
lo(d),
|
|
4374
|
+
a
|
|
4375
|
+
],
|
|
4376
|
+
stateAttributesMapping: po
|
|
4377
|
+
});
|
|
4378
|
+
});
|
|
4379
|
+
process.env.NODE_ENV !== "production" && (mo.displayName = "TooltipPopup");
|
|
4380
|
+
//#endregion
|
|
4381
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/arrow/TooltipArrow.js
|
|
4382
|
+
var ho = /* @__PURE__ */ r.forwardRef(function(e, t) {
|
|
4383
|
+
let { className: n, render: r, style: i, ...a } = e, o = C(), s = o.useState("open"), c = o.useState("instantType"), { arrowRef: l, side: u, align: d, arrowUncentered: f, arrowStyles: p } = Za();
|
|
4384
|
+
return Wn("div", e, {
|
|
4385
|
+
state: {
|
|
4386
|
+
open: s,
|
|
4387
|
+
side: u,
|
|
4388
|
+
align: d,
|
|
4389
|
+
uncentered: f,
|
|
4390
|
+
instant: c
|
|
4391
|
+
},
|
|
4392
|
+
ref: [t, l],
|
|
4393
|
+
props: [{
|
|
4394
|
+
style: p,
|
|
4395
|
+
"aria-hidden": !0
|
|
4396
|
+
}, a],
|
|
4397
|
+
stateAttributesMapping: Ba
|
|
4398
|
+
});
|
|
4399
|
+
});
|
|
4400
|
+
process.env.NODE_ENV !== "production" && (ho.displayName = "TooltipArrow");
|
|
4401
|
+
//#endregion
|
|
4402
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.4.0_@date-fns+tz@1.4.1_@types+react@19.2.13_date-fns@4.1.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js
|
|
4403
|
+
var go = function(e) {
|
|
4404
|
+
let { delay: t, closeDelay: n, timeout: i = 400 } = e, a = r.useMemo(() => ({
|
|
4405
|
+
delay: t,
|
|
4406
|
+
closeDelay: n
|
|
4407
|
+
}), [t, n]), s = r.useMemo(() => ({
|
|
4408
|
+
open: t,
|
|
4409
|
+
close: n
|
|
4410
|
+
}), [t, n]);
|
|
4411
|
+
return /* @__PURE__ */ o(Ha.Provider, {
|
|
4412
|
+
value: a,
|
|
4413
|
+
children: /* @__PURE__ */ o(xe, {
|
|
4414
|
+
delay: s,
|
|
4415
|
+
timeoutMs: i,
|
|
4416
|
+
children: e.children
|
|
4417
|
+
})
|
|
4418
|
+
});
|
|
4419
|
+
};
|
|
4420
|
+
process.env.NODE_ENV !== "production" && (go.displayName = "TooltipProvider");
|
|
4421
|
+
//#endregion
|
|
4422
|
+
//#region lib/ui/Tooltip.tsx
|
|
4423
|
+
function _o({ delay: e = 300, ...t }) {
|
|
4424
|
+
return /* @__PURE__ */ o(go, {
|
|
4425
|
+
"data-slot": "tooltip-provider",
|
|
4426
|
+
delay: e,
|
|
4427
|
+
...t
|
|
4428
|
+
});
|
|
4429
|
+
}
|
|
4430
|
+
function vo({ ...e }) {
|
|
4431
|
+
return /* @__PURE__ */ o(ja, {
|
|
4432
|
+
"data-slot": "tooltip",
|
|
4433
|
+
...e
|
|
4434
|
+
});
|
|
4435
|
+
}
|
|
4436
|
+
function yo({ ...e }) {
|
|
4437
|
+
return /* @__PURE__ */ o(Ga, {
|
|
4438
|
+
"data-slot": "tooltip-trigger",
|
|
4439
|
+
...e,
|
|
4440
|
+
delay: 300
|
|
4441
|
+
});
|
|
4442
|
+
}
|
|
4443
|
+
function bo({ className: e, side: t = "top", sideOffset: r = 4, align: i = "center", alignOffset: a = 0, theme: c = "dark", children: l, ...u }) {
|
|
4444
|
+
return /* @__PURE__ */ o(Ya, { children: /* @__PURE__ */ o(fo, {
|
|
4445
|
+
align: i,
|
|
4446
|
+
alignOffset: a,
|
|
4447
|
+
side: t,
|
|
4448
|
+
sideOffset: r,
|
|
4449
|
+
className: "isolate z-50",
|
|
4450
|
+
children: /* @__PURE__ */ s(mo, {
|
|
4451
|
+
"data-slot": "tooltip-content",
|
|
4452
|
+
className: n("z-50 inline-flex w-fit max-w-[965px] origin-(--transform-origin) items-center gap-6 rounded-8 p-8 text-xs text-center has-data-[slot=kbd]:pr-6 data-[side=bottom]:slide-in-from-top-8 data-[side=inline-end]:slide-in-from-left-8 data-[side=inline-start]:slide-in-from-right-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 text-b4", c === "dark" ? "bg-black text-white" : "bg-lightGrey text-black", e),
|
|
4453
|
+
...u,
|
|
4454
|
+
children: [l, /* @__PURE__ */ o(ho, { className: n("z-50 size-10 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-4 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-4 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-4 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-4 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-4 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-10", c === "dark" ? "bg-black fill-black" : "bg-lightGrey fill-lightGrey") })]
|
|
4455
|
+
})
|
|
4456
|
+
}) });
|
|
4457
|
+
}
|
|
4458
|
+
//#endregion
|
|
4459
|
+
export { yo as i, bo as n, _o as r, vo as t };
|
|
4460
|
+
|
|
4461
|
+
//# sourceMappingURL=Tooltip.js.map
|