@gv-tech/ui-web 2.19.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
|
@@ -0,0 +1,1282 @@
|
|
|
1
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
+
import { n as t } from "./dist-Cvwtowos.mjs";
|
|
3
|
+
import { n } from "./dist-BC_VB6JL.mjs";
|
|
4
|
+
import { t as r } from "./dist-bDoR0CBU.mjs";
|
|
5
|
+
import { t as i } from "./dist-BmjFh8i_.mjs";
|
|
6
|
+
import { t as a } from "./dist-ALQAoSGx.mjs";
|
|
7
|
+
import { t as o } from "./dist-FGQAMrhH.mjs";
|
|
8
|
+
import * as s from "react";
|
|
9
|
+
import { useLayoutEffect as c } from "react";
|
|
10
|
+
import * as l from "react-dom";
|
|
11
|
+
//#region ../../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
12
|
+
var u = [
|
|
13
|
+
"top",
|
|
14
|
+
"right",
|
|
15
|
+
"bottom",
|
|
16
|
+
"left"
|
|
17
|
+
], d = Math.min, f = Math.max, p = Math.round, m = Math.floor, h = (e) => ({
|
|
18
|
+
x: e,
|
|
19
|
+
y: e
|
|
20
|
+
}), g = {
|
|
21
|
+
left: "right",
|
|
22
|
+
right: "left",
|
|
23
|
+
bottom: "top",
|
|
24
|
+
top: "bottom"
|
|
25
|
+
};
|
|
26
|
+
function _(e, t, n) {
|
|
27
|
+
return f(e, d(t, n));
|
|
28
|
+
}
|
|
29
|
+
function v(e, t) {
|
|
30
|
+
return typeof e == "function" ? e(t) : e;
|
|
31
|
+
}
|
|
32
|
+
function y(e) {
|
|
33
|
+
return e.split("-")[0];
|
|
34
|
+
}
|
|
35
|
+
function b(e) {
|
|
36
|
+
return e.split("-")[1];
|
|
37
|
+
}
|
|
38
|
+
function x(e) {
|
|
39
|
+
return e === "x" ? "y" : "x";
|
|
40
|
+
}
|
|
41
|
+
function S(e) {
|
|
42
|
+
return e === "y" ? "height" : "width";
|
|
43
|
+
}
|
|
44
|
+
function C(e) {
|
|
45
|
+
let t = e[0];
|
|
46
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
47
|
+
}
|
|
48
|
+
function w(e) {
|
|
49
|
+
return x(C(e));
|
|
50
|
+
}
|
|
51
|
+
function T(e, t, n) {
|
|
52
|
+
n === void 0 && (n = !1);
|
|
53
|
+
let r = b(e), i = w(e), a = S(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
54
|
+
return t.reference[a] > t.floating[a] && (o = P(o)), [o, P(o)];
|
|
55
|
+
}
|
|
56
|
+
function E(e) {
|
|
57
|
+
let t = P(e);
|
|
58
|
+
return [
|
|
59
|
+
D(e),
|
|
60
|
+
t,
|
|
61
|
+
D(t)
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
function D(e) {
|
|
65
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
66
|
+
}
|
|
67
|
+
var O = ["left", "right"], k = ["right", "left"], A = ["top", "bottom"], j = ["bottom", "top"];
|
|
68
|
+
function M(e, t, n) {
|
|
69
|
+
switch (e) {
|
|
70
|
+
case "top":
|
|
71
|
+
case "bottom": return n ? t ? k : O : t ? O : k;
|
|
72
|
+
case "left":
|
|
73
|
+
case "right": return t ? A : j;
|
|
74
|
+
default: return [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function N(e, t, n, r) {
|
|
78
|
+
let i = b(e), a = M(y(e), n === "start", r);
|
|
79
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(D)))), a;
|
|
80
|
+
}
|
|
81
|
+
function P(e) {
|
|
82
|
+
let t = y(e);
|
|
83
|
+
return g[t] + e.slice(t.length);
|
|
84
|
+
}
|
|
85
|
+
function F(e) {
|
|
86
|
+
return {
|
|
87
|
+
top: 0,
|
|
88
|
+
right: 0,
|
|
89
|
+
bottom: 0,
|
|
90
|
+
left: 0,
|
|
91
|
+
...e
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function ee(e) {
|
|
95
|
+
return typeof e == "number" ? {
|
|
96
|
+
top: e,
|
|
97
|
+
right: e,
|
|
98
|
+
bottom: e,
|
|
99
|
+
left: e
|
|
100
|
+
} : F(e);
|
|
101
|
+
}
|
|
102
|
+
function I(e) {
|
|
103
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
104
|
+
return {
|
|
105
|
+
width: r,
|
|
106
|
+
height: i,
|
|
107
|
+
top: n,
|
|
108
|
+
left: t,
|
|
109
|
+
right: t + r,
|
|
110
|
+
bottom: n + i,
|
|
111
|
+
x: t,
|
|
112
|
+
y: n
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region ../../node_modules/.bun/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
117
|
+
function L(e, t, n) {
|
|
118
|
+
let { reference: r, floating: i } = e, a = C(t), o = w(t), s = S(o), c = y(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;
|
|
119
|
+
switch (c) {
|
|
120
|
+
case "top":
|
|
121
|
+
p = {
|
|
122
|
+
x: u,
|
|
123
|
+
y: r.y - i.height
|
|
124
|
+
};
|
|
125
|
+
break;
|
|
126
|
+
case "bottom":
|
|
127
|
+
p = {
|
|
128
|
+
x: u,
|
|
129
|
+
y: r.y + r.height
|
|
130
|
+
};
|
|
131
|
+
break;
|
|
132
|
+
case "right":
|
|
133
|
+
p = {
|
|
134
|
+
x: r.x + r.width,
|
|
135
|
+
y: d
|
|
136
|
+
};
|
|
137
|
+
break;
|
|
138
|
+
case "left":
|
|
139
|
+
p = {
|
|
140
|
+
x: r.x - i.width,
|
|
141
|
+
y: d
|
|
142
|
+
};
|
|
143
|
+
break;
|
|
144
|
+
default: p = {
|
|
145
|
+
x: r.x,
|
|
146
|
+
y: r.y
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
switch (b(t)) {
|
|
150
|
+
case "start":
|
|
151
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
152
|
+
break;
|
|
153
|
+
case "end":
|
|
154
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
return p;
|
|
158
|
+
}
|
|
159
|
+
async function R(e, t) {
|
|
160
|
+
t === void 0 && (t = {});
|
|
161
|
+
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 } = v(t, e), p = ee(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = I(await i.getClippingRect({
|
|
162
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
163
|
+
boundary: c,
|
|
164
|
+
rootBoundary: l,
|
|
165
|
+
strategy: s
|
|
166
|
+
})), g = u === "floating" ? {
|
|
167
|
+
x: n,
|
|
168
|
+
y: r,
|
|
169
|
+
width: a.floating.width,
|
|
170
|
+
height: a.floating.height
|
|
171
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), y = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
172
|
+
x: 1,
|
|
173
|
+
y: 1
|
|
174
|
+
}, b = I(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
175
|
+
elements: o,
|
|
176
|
+
rect: g,
|
|
177
|
+
offsetParent: _,
|
|
178
|
+
strategy: s
|
|
179
|
+
}) : g);
|
|
180
|
+
return {
|
|
181
|
+
top: (h.top - b.top + p.top) / y.y,
|
|
182
|
+
bottom: (b.bottom - h.bottom + p.bottom) / y.y,
|
|
183
|
+
left: (h.left - b.left + p.left) / y.x,
|
|
184
|
+
right: (b.right - h.right + p.right) / y.x
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
var z = 50, te = async (e, t, n) => {
|
|
188
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
189
|
+
...o,
|
|
190
|
+
detectOverflow: R
|
|
191
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
192
|
+
reference: e,
|
|
193
|
+
floating: t,
|
|
194
|
+
strategy: i
|
|
195
|
+
}), { x: u, y: d } = L(l, r, c), f = r, p = 0, m = {};
|
|
196
|
+
for (let n = 0; n < a.length; n++) {
|
|
197
|
+
let h = a[n];
|
|
198
|
+
if (!h) continue;
|
|
199
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
200
|
+
x: u,
|
|
201
|
+
y: d,
|
|
202
|
+
initialPlacement: r,
|
|
203
|
+
placement: f,
|
|
204
|
+
strategy: i,
|
|
205
|
+
middlewareData: m,
|
|
206
|
+
rects: l,
|
|
207
|
+
platform: s,
|
|
208
|
+
elements: {
|
|
209
|
+
reference: e,
|
|
210
|
+
floating: t
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
214
|
+
...m[g],
|
|
215
|
+
...b
|
|
216
|
+
}, x && p < z && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
217
|
+
reference: e,
|
|
218
|
+
floating: t,
|
|
219
|
+
strategy: i
|
|
220
|
+
}) : x.rects), {x: u, y: d} = L(l, f, c)), n = -1);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
x: u,
|
|
224
|
+
y: d,
|
|
225
|
+
placement: f,
|
|
226
|
+
strategy: i,
|
|
227
|
+
middlewareData: m
|
|
228
|
+
};
|
|
229
|
+
}, ne = (e) => ({
|
|
230
|
+
name: "arrow",
|
|
231
|
+
options: e,
|
|
232
|
+
async fn(t) {
|
|
233
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = v(e, t) || {};
|
|
234
|
+
if (l == null) return {};
|
|
235
|
+
let f = ee(u), p = {
|
|
236
|
+
x: n,
|
|
237
|
+
y: r
|
|
238
|
+
}, m = w(i), h = S(m), g = await o.getDimensions(l), y = m === "y", x = y ? "top" : "left", C = y ? "bottom" : "right", T = y ? "clientHeight" : "clientWidth", E = a.reference[h] + a.reference[m] - p[m] - a.floating[h], D = p[m] - a.reference[m], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), k = O ? O[T] : 0;
|
|
239
|
+
(!k || !await (o.isElement == null ? void 0 : o.isElement(O))) && (k = s.floating[T] || a.floating[h]);
|
|
240
|
+
let A = E / 2 - D / 2, j = k / 2 - g[h] / 2 - 1, M = d(f[x], j), N = d(f[C], j), P = M, F = k - g[h] - N, I = k / 2 - g[h] / 2 + A, L = _(P, I, F), R = !c.arrow && b(i) != null && I !== L && a.reference[h] / 2 - (I < P ? M : N) - g[h] / 2 < 0, z = R ? I < P ? I - P : I - F : 0;
|
|
241
|
+
return {
|
|
242
|
+
[m]: p[m] + z,
|
|
243
|
+
data: {
|
|
244
|
+
[m]: L,
|
|
245
|
+
centerOffset: I - L - z,
|
|
246
|
+
...R && { alignmentOffset: z }
|
|
247
|
+
},
|
|
248
|
+
reset: R
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}), re = function(e) {
|
|
252
|
+
return e === void 0 && (e = {}), {
|
|
253
|
+
name: "flip",
|
|
254
|
+
options: e,
|
|
255
|
+
async fn(t) {
|
|
256
|
+
var n;
|
|
257
|
+
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 } = v(e, t);
|
|
258
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
259
|
+
let g = y(r), _ = C(o), b = y(o) === o, x = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), S = d || (b || !m ? [P(o)] : E(o)), w = p !== "none";
|
|
260
|
+
!d && w && S.push(...N(o, m, p, x));
|
|
261
|
+
let D = [o, ...S], O = await s.detectOverflow(t, h), k = [], A = i.flip?.overflows || [];
|
|
262
|
+
if (l && k.push(O[g]), u) {
|
|
263
|
+
let e = T(r, a, x);
|
|
264
|
+
k.push(O[e[0]], O[e[1]]);
|
|
265
|
+
}
|
|
266
|
+
if (A = [...A, {
|
|
267
|
+
placement: r,
|
|
268
|
+
overflows: k
|
|
269
|
+
}], !k.every((e) => e <= 0)) {
|
|
270
|
+
let e = (i.flip?.index || 0) + 1, t = D[e];
|
|
271
|
+
if (t && (!(u === "alignment" && _ !== C(t)) || A.every((e) => C(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
272
|
+
data: {
|
|
273
|
+
index: e,
|
|
274
|
+
overflows: A
|
|
275
|
+
},
|
|
276
|
+
reset: { placement: t }
|
|
277
|
+
};
|
|
278
|
+
let n = A.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
279
|
+
if (!n) switch (f) {
|
|
280
|
+
case "bestFit": {
|
|
281
|
+
let e = A.filter((e) => {
|
|
282
|
+
if (w) {
|
|
283
|
+
let t = C(e.placement);
|
|
284
|
+
return t === _ || t === "y";
|
|
285
|
+
}
|
|
286
|
+
return !0;
|
|
287
|
+
}).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];
|
|
288
|
+
e && (n = e);
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
case "initialPlacement":
|
|
292
|
+
n = o;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
if (r !== n) return { reset: { placement: n } };
|
|
296
|
+
}
|
|
297
|
+
return {};
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
function ie(e, t) {
|
|
302
|
+
return {
|
|
303
|
+
top: e.top - t.height,
|
|
304
|
+
right: e.right - t.width,
|
|
305
|
+
bottom: e.bottom - t.height,
|
|
306
|
+
left: e.left - t.width
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function ae(e) {
|
|
310
|
+
return u.some((t) => e[t] >= 0);
|
|
311
|
+
}
|
|
312
|
+
var oe = function(e) {
|
|
313
|
+
return e === void 0 && (e = {}), {
|
|
314
|
+
name: "hide",
|
|
315
|
+
options: e,
|
|
316
|
+
async fn(t) {
|
|
317
|
+
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = v(e, t);
|
|
318
|
+
switch (i) {
|
|
319
|
+
case "referenceHidden": {
|
|
320
|
+
let e = ie(await r.detectOverflow(t, {
|
|
321
|
+
...a,
|
|
322
|
+
elementContext: "reference"
|
|
323
|
+
}), n.reference);
|
|
324
|
+
return { data: {
|
|
325
|
+
referenceHiddenOffsets: e,
|
|
326
|
+
referenceHidden: ae(e)
|
|
327
|
+
} };
|
|
328
|
+
}
|
|
329
|
+
case "escaped": {
|
|
330
|
+
let e = ie(await r.detectOverflow(t, {
|
|
331
|
+
...a,
|
|
332
|
+
altBoundary: !0
|
|
333
|
+
}), n.floating);
|
|
334
|
+
return { data: {
|
|
335
|
+
escapedOffsets: e,
|
|
336
|
+
escaped: ae(e)
|
|
337
|
+
} };
|
|
338
|
+
}
|
|
339
|
+
default: return {};
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
}, se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
344
|
+
async function ce(e, t) {
|
|
345
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = y(n), s = b(n), c = C(n) === "y", l = se.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = v(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
346
|
+
mainAxis: d,
|
|
347
|
+
crossAxis: 0,
|
|
348
|
+
alignmentAxis: null
|
|
349
|
+
} : {
|
|
350
|
+
mainAxis: d.mainAxis || 0,
|
|
351
|
+
crossAxis: d.crossAxis || 0,
|
|
352
|
+
alignmentAxis: d.alignmentAxis
|
|
353
|
+
};
|
|
354
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
355
|
+
x: p * u,
|
|
356
|
+
y: f * l
|
|
357
|
+
} : {
|
|
358
|
+
x: f * l,
|
|
359
|
+
y: p * u
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
var le = function(e) {
|
|
363
|
+
return e === void 0 && (e = 0), {
|
|
364
|
+
name: "offset",
|
|
365
|
+
options: e,
|
|
366
|
+
async fn(t) {
|
|
367
|
+
var n;
|
|
368
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ce(t, e);
|
|
369
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
370
|
+
x: r + s.x,
|
|
371
|
+
y: i + s.y,
|
|
372
|
+
data: {
|
|
373
|
+
...s,
|
|
374
|
+
placement: a
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}, ue = function(e) {
|
|
380
|
+
return e === void 0 && (e = {}), {
|
|
381
|
+
name: "shift",
|
|
382
|
+
options: e,
|
|
383
|
+
async fn(t) {
|
|
384
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
385
|
+
let { x: t, y: n } = e;
|
|
386
|
+
return {
|
|
387
|
+
x: t,
|
|
388
|
+
y: n
|
|
389
|
+
};
|
|
390
|
+
} }, ...l } = v(e, t), u = {
|
|
391
|
+
x: n,
|
|
392
|
+
y: r
|
|
393
|
+
}, d = await a.detectOverflow(t, l), f = C(y(i)), p = x(f), m = u[p], h = u[f];
|
|
394
|
+
if (o) {
|
|
395
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
396
|
+
m = _(n, m, r);
|
|
397
|
+
}
|
|
398
|
+
if (s) {
|
|
399
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
400
|
+
h = _(n, h, r);
|
|
401
|
+
}
|
|
402
|
+
let g = c.fn({
|
|
403
|
+
...t,
|
|
404
|
+
[p]: m,
|
|
405
|
+
[f]: h
|
|
406
|
+
});
|
|
407
|
+
return {
|
|
408
|
+
...g,
|
|
409
|
+
data: {
|
|
410
|
+
x: g.x - n,
|
|
411
|
+
y: g.y - r,
|
|
412
|
+
enabled: {
|
|
413
|
+
[p]: o,
|
|
414
|
+
[f]: s
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
}, de = function(e) {
|
|
421
|
+
return e === void 0 && (e = {}), {
|
|
422
|
+
options: e,
|
|
423
|
+
fn(t) {
|
|
424
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = v(e, t), u = {
|
|
425
|
+
x: n,
|
|
426
|
+
y: r
|
|
427
|
+
}, d = C(i), f = x(d), p = u[f], m = u[d], h = v(s, t), g = typeof h == "number" ? {
|
|
428
|
+
mainAxis: h,
|
|
429
|
+
crossAxis: 0
|
|
430
|
+
} : {
|
|
431
|
+
mainAxis: 0,
|
|
432
|
+
crossAxis: 0,
|
|
433
|
+
...h
|
|
434
|
+
};
|
|
435
|
+
if (c) {
|
|
436
|
+
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
437
|
+
p < t ? p = t : p > n && (p = n);
|
|
438
|
+
}
|
|
439
|
+
if (l) {
|
|
440
|
+
let e = f === "y" ? "width" : "height", t = se.has(y(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);
|
|
441
|
+
m < n ? m = n : m > r && (m = r);
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
[f]: p,
|
|
445
|
+
[d]: m
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
}, fe = function(e) {
|
|
450
|
+
return e === void 0 && (e = {}), {
|
|
451
|
+
name: "size",
|
|
452
|
+
options: e,
|
|
453
|
+
async fn(t) {
|
|
454
|
+
var n, r;
|
|
455
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = v(e, t), u = await o.detectOverflow(t, l), p = y(i), m = b(i), h = C(i) === "y", { width: g, height: _ } = a.floating, x, S;
|
|
456
|
+
p === "top" || p === "bottom" ? (x = p, S = m === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (S = p, x = m === "end" ? "top" : "bottom");
|
|
457
|
+
let w = _ - u.top - u.bottom, T = g - u.left - u.right, E = d(_ - u[x], w), D = d(g - u[S], T), O = !t.middlewareData.shift, k = E, A = D;
|
|
458
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = T), (r = t.middlewareData.shift) != null && r.enabled.y && (k = w), O && !m) {
|
|
459
|
+
let e = f(u.left, 0), t = f(u.right, 0), n = f(u.top, 0), r = f(u.bottom, 0);
|
|
460
|
+
h ? A = g - 2 * (e !== 0 || t !== 0 ? e + t : f(u.left, u.right)) : k = _ - 2 * (n !== 0 || r !== 0 ? n + r : f(u.top, u.bottom));
|
|
461
|
+
}
|
|
462
|
+
await c({
|
|
463
|
+
...t,
|
|
464
|
+
availableWidth: A,
|
|
465
|
+
availableHeight: k
|
|
466
|
+
});
|
|
467
|
+
let j = await o.getDimensions(s.floating);
|
|
468
|
+
return g !== j.width || _ !== j.height ? { reset: { rects: !0 } } : {};
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
//#endregion
|
|
473
|
+
//#region ../../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
474
|
+
function pe() {
|
|
475
|
+
return typeof window < "u";
|
|
476
|
+
}
|
|
477
|
+
function B(e) {
|
|
478
|
+
return me(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
479
|
+
}
|
|
480
|
+
function V(e) {
|
|
481
|
+
var t;
|
|
482
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
483
|
+
}
|
|
484
|
+
function H(e) {
|
|
485
|
+
return ((me(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
486
|
+
}
|
|
487
|
+
function me(e) {
|
|
488
|
+
return pe() ? e instanceof Node || e instanceof V(e).Node : !1;
|
|
489
|
+
}
|
|
490
|
+
function U(e) {
|
|
491
|
+
return pe() ? e instanceof Element || e instanceof V(e).Element : !1;
|
|
492
|
+
}
|
|
493
|
+
function W(e) {
|
|
494
|
+
return pe() ? e instanceof HTMLElement || e instanceof V(e).HTMLElement : !1;
|
|
495
|
+
}
|
|
496
|
+
function he(e) {
|
|
497
|
+
return !pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof V(e).ShadowRoot;
|
|
498
|
+
}
|
|
499
|
+
function G(e) {
|
|
500
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = J(e);
|
|
501
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
502
|
+
}
|
|
503
|
+
function ge(e) {
|
|
504
|
+
return /^(table|td|th)$/.test(B(e));
|
|
505
|
+
}
|
|
506
|
+
function _e(e) {
|
|
507
|
+
try {
|
|
508
|
+
if (e.matches(":popover-open")) return !0;
|
|
509
|
+
} catch {}
|
|
510
|
+
try {
|
|
511
|
+
return e.matches(":modal");
|
|
512
|
+
} catch {
|
|
513
|
+
return !1;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
var ve = /transform|translate|scale|rotate|perspective|filter/, ye = /paint|layout|strict|content/, K = (e) => !!e && e !== "none", be;
|
|
517
|
+
function xe(e) {
|
|
518
|
+
let t = U(e) ? J(e) : e;
|
|
519
|
+
return K(t.transform) || K(t.translate) || K(t.scale) || K(t.rotate) || K(t.perspective) || !Ce() && (K(t.backdropFilter) || K(t.filter)) || ve.test(t.willChange || "") || ye.test(t.contain || "");
|
|
520
|
+
}
|
|
521
|
+
function Se(e) {
|
|
522
|
+
let t = Y(e);
|
|
523
|
+
for (; W(t) && !q(t);) {
|
|
524
|
+
if (xe(t)) return t;
|
|
525
|
+
if (_e(t)) return null;
|
|
526
|
+
t = Y(t);
|
|
527
|
+
}
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
function Ce() {
|
|
531
|
+
return be ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), be;
|
|
532
|
+
}
|
|
533
|
+
function q(e) {
|
|
534
|
+
return /^(html|body|#document)$/.test(B(e));
|
|
535
|
+
}
|
|
536
|
+
function J(e) {
|
|
537
|
+
return V(e).getComputedStyle(e);
|
|
538
|
+
}
|
|
539
|
+
function we(e) {
|
|
540
|
+
return U(e) ? {
|
|
541
|
+
scrollLeft: e.scrollLeft,
|
|
542
|
+
scrollTop: e.scrollTop
|
|
543
|
+
} : {
|
|
544
|
+
scrollLeft: e.scrollX,
|
|
545
|
+
scrollTop: e.scrollY
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
function Y(e) {
|
|
549
|
+
if (B(e) === "html") return e;
|
|
550
|
+
let t = e.assignedSlot || e.parentNode || he(e) && e.host || H(e);
|
|
551
|
+
return he(t) ? t.host : t;
|
|
552
|
+
}
|
|
553
|
+
function Te(e) {
|
|
554
|
+
let t = Y(e);
|
|
555
|
+
return q(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && G(t) ? t : Te(t);
|
|
556
|
+
}
|
|
557
|
+
function X(e, t, n) {
|
|
558
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
559
|
+
let r = Te(e), i = r === e.ownerDocument?.body, a = V(r);
|
|
560
|
+
if (i) {
|
|
561
|
+
let e = Ee(a);
|
|
562
|
+
return t.concat(a, a.visualViewport || [], G(r) ? r : [], e && n ? X(e) : []);
|
|
563
|
+
} else return t.concat(r, X(r, [], n));
|
|
564
|
+
}
|
|
565
|
+
function Ee(e) {
|
|
566
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
567
|
+
}
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region ../../node_modules/.bun/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
570
|
+
function De(e) {
|
|
571
|
+
let t = J(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 = p(n) !== a || p(r) !== o;
|
|
572
|
+
return s && (n = a, r = o), {
|
|
573
|
+
width: n,
|
|
574
|
+
height: r,
|
|
575
|
+
$: s
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
function Oe(e) {
|
|
579
|
+
return U(e) ? e : e.contextElement;
|
|
580
|
+
}
|
|
581
|
+
function Z(e) {
|
|
582
|
+
let t = Oe(e);
|
|
583
|
+
if (!W(t)) return h(1);
|
|
584
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = De(t), o = (a ? p(n.width) : n.width) / r, s = (a ? p(n.height) : n.height) / i;
|
|
585
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
586
|
+
x: o,
|
|
587
|
+
y: s
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
var ke = /* @__PURE__ */ h(0);
|
|
591
|
+
function Ae(e) {
|
|
592
|
+
let t = V(e);
|
|
593
|
+
return !Ce() || !t.visualViewport ? ke : {
|
|
594
|
+
x: t.visualViewport.offsetLeft,
|
|
595
|
+
y: t.visualViewport.offsetTop
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function je(e, t, n) {
|
|
599
|
+
return t === void 0 && (t = !1), !n || t && n !== V(e) ? !1 : t;
|
|
600
|
+
}
|
|
601
|
+
function Q(e, t, n, r) {
|
|
602
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
603
|
+
let i = e.getBoundingClientRect(), a = Oe(e), o = h(1);
|
|
604
|
+
t && (r ? U(r) && (o = Z(r)) : o = Z(e));
|
|
605
|
+
let s = je(a, n, r) ? Ae(a) : h(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;
|
|
606
|
+
if (a) {
|
|
607
|
+
let e = V(a), t = r && U(r) ? V(r) : r, n = e, i = Ee(n);
|
|
608
|
+
for (; i && r && t !== n;) {
|
|
609
|
+
let e = Z(i), t = i.getBoundingClientRect(), r = J(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
610
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = V(i), i = Ee(n);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return I({
|
|
614
|
+
width: u,
|
|
615
|
+
height: d,
|
|
616
|
+
x: c,
|
|
617
|
+
y: l
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
function Me(e, t) {
|
|
621
|
+
let n = we(e).scrollLeft;
|
|
622
|
+
return t ? t.left + n : Q(H(e)).left + n;
|
|
623
|
+
}
|
|
624
|
+
function Ne(e, t) {
|
|
625
|
+
let n = e.getBoundingClientRect();
|
|
626
|
+
return {
|
|
627
|
+
x: n.left + t.scrollLeft - Me(e, n),
|
|
628
|
+
y: n.top + t.scrollTop
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
function Pe(e) {
|
|
632
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = H(r), s = t ? _e(t.floating) : !1;
|
|
633
|
+
if (r === o || s && a) return n;
|
|
634
|
+
let c = {
|
|
635
|
+
scrollLeft: 0,
|
|
636
|
+
scrollTop: 0
|
|
637
|
+
}, l = h(1), u = h(0), d = W(r);
|
|
638
|
+
if ((d || !d && !a) && ((B(r) !== "body" || G(o)) && (c = we(r)), d)) {
|
|
639
|
+
let e = Q(r);
|
|
640
|
+
l = Z(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
641
|
+
}
|
|
642
|
+
let f = o && !d && !a ? Ne(o, c) : h(0);
|
|
643
|
+
return {
|
|
644
|
+
width: n.width * l.x,
|
|
645
|
+
height: n.height * l.y,
|
|
646
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
647
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
function Fe(e) {
|
|
651
|
+
return Array.from(e.getClientRects());
|
|
652
|
+
}
|
|
653
|
+
function Ie(e) {
|
|
654
|
+
let t = H(e), n = we(e), r = e.ownerDocument.body, i = f(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = f(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Me(e), s = -n.scrollTop;
|
|
655
|
+
return J(r).direction === "rtl" && (o += f(t.clientWidth, r.clientWidth) - i), {
|
|
656
|
+
width: i,
|
|
657
|
+
height: a,
|
|
658
|
+
x: o,
|
|
659
|
+
y: s
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
var Le = 25;
|
|
663
|
+
function Re(e, t) {
|
|
664
|
+
let n = V(e), r = H(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
665
|
+
if (i) {
|
|
666
|
+
a = i.width, o = i.height;
|
|
667
|
+
let e = Ce();
|
|
668
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
669
|
+
}
|
|
670
|
+
let l = Me(r);
|
|
671
|
+
if (l <= 0) {
|
|
672
|
+
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);
|
|
673
|
+
o <= Le && (a -= o);
|
|
674
|
+
} else l <= Le && (a += l);
|
|
675
|
+
return {
|
|
676
|
+
width: a,
|
|
677
|
+
height: o,
|
|
678
|
+
x: s,
|
|
679
|
+
y: c
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
function ze(e, t) {
|
|
683
|
+
let n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = W(e) ? Z(e) : h(1);
|
|
684
|
+
return {
|
|
685
|
+
width: e.clientWidth * a.x,
|
|
686
|
+
height: e.clientHeight * a.y,
|
|
687
|
+
x: i * a.x,
|
|
688
|
+
y: r * a.y
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
function Be(e, t, n) {
|
|
692
|
+
let r;
|
|
693
|
+
if (t === "viewport") r = Re(e, n);
|
|
694
|
+
else if (t === "document") r = Ie(H(e));
|
|
695
|
+
else if (U(t)) r = ze(t, n);
|
|
696
|
+
else {
|
|
697
|
+
let n = Ae(e);
|
|
698
|
+
r = {
|
|
699
|
+
x: t.x - n.x,
|
|
700
|
+
y: t.y - n.y,
|
|
701
|
+
width: t.width,
|
|
702
|
+
height: t.height
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
return I(r);
|
|
706
|
+
}
|
|
707
|
+
function Ve(e, t) {
|
|
708
|
+
let n = Y(e);
|
|
709
|
+
return n === t || !U(n) || q(n) ? !1 : J(n).position === "fixed" || Ve(n, t);
|
|
710
|
+
}
|
|
711
|
+
function He(e, t) {
|
|
712
|
+
let n = t.get(e);
|
|
713
|
+
if (n) return n;
|
|
714
|
+
let r = X(e, [], !1).filter((e) => U(e) && B(e) !== "body"), i = null, a = J(e).position === "fixed", o = a ? Y(e) : e;
|
|
715
|
+
for (; U(o) && !q(o);) {
|
|
716
|
+
let t = J(o), n = xe(o);
|
|
717
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || G(o) && !n && Ve(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Y(o);
|
|
718
|
+
}
|
|
719
|
+
return t.set(e, r), r;
|
|
720
|
+
}
|
|
721
|
+
function Ue(e) {
|
|
722
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? _e(t) ? [] : He(t, this._c) : [].concat(n), r], o = Be(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
723
|
+
for (let e = 1; e < a.length; e++) {
|
|
724
|
+
let n = Be(t, a[e], i);
|
|
725
|
+
s = f(n.top, s), c = d(n.right, c), l = d(n.bottom, l), u = f(n.left, u);
|
|
726
|
+
}
|
|
727
|
+
return {
|
|
728
|
+
width: c - u,
|
|
729
|
+
height: l - s,
|
|
730
|
+
x: u,
|
|
731
|
+
y: s
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
function We(e) {
|
|
735
|
+
let { width: t, height: n } = De(e);
|
|
736
|
+
return {
|
|
737
|
+
width: t,
|
|
738
|
+
height: n
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
function Ge(e, t, n) {
|
|
742
|
+
let r = W(t), i = H(t), a = n === "fixed", o = Q(e, !0, a, t), s = {
|
|
743
|
+
scrollLeft: 0,
|
|
744
|
+
scrollTop: 0
|
|
745
|
+
}, c = h(0);
|
|
746
|
+
function l() {
|
|
747
|
+
c.x = Me(i);
|
|
748
|
+
}
|
|
749
|
+
if (r || !r && !a) if ((B(t) !== "body" || G(i)) && (s = we(t)), r) {
|
|
750
|
+
let e = Q(t, !0, a, t);
|
|
751
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
752
|
+
} else i && l();
|
|
753
|
+
a && !r && i && l();
|
|
754
|
+
let u = i && !r && !a ? Ne(i, s) : h(0);
|
|
755
|
+
return {
|
|
756
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
757
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
758
|
+
width: o.width,
|
|
759
|
+
height: o.height
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
function Ke(e) {
|
|
763
|
+
return J(e).position === "static";
|
|
764
|
+
}
|
|
765
|
+
function qe(e, t) {
|
|
766
|
+
if (!W(e) || J(e).position === "fixed") return null;
|
|
767
|
+
if (t) return t(e);
|
|
768
|
+
let n = e.offsetParent;
|
|
769
|
+
return H(e) === n && (n = n.ownerDocument.body), n;
|
|
770
|
+
}
|
|
771
|
+
function Je(e, t) {
|
|
772
|
+
let n = V(e);
|
|
773
|
+
if (_e(e)) return n;
|
|
774
|
+
if (!W(e)) {
|
|
775
|
+
let t = Y(e);
|
|
776
|
+
for (; t && !q(t);) {
|
|
777
|
+
if (U(t) && !Ke(t)) return t;
|
|
778
|
+
t = Y(t);
|
|
779
|
+
}
|
|
780
|
+
return n;
|
|
781
|
+
}
|
|
782
|
+
let r = qe(e, t);
|
|
783
|
+
for (; r && ge(r) && Ke(r);) r = qe(r, t);
|
|
784
|
+
return r && q(r) && Ke(r) && !xe(r) ? n : r || Se(e) || n;
|
|
785
|
+
}
|
|
786
|
+
var Ye = async function(e) {
|
|
787
|
+
let t = this.getOffsetParent || Je, n = this.getDimensions, r = await n(e.floating);
|
|
788
|
+
return {
|
|
789
|
+
reference: Ge(e.reference, await t(e.floating), e.strategy),
|
|
790
|
+
floating: {
|
|
791
|
+
x: 0,
|
|
792
|
+
y: 0,
|
|
793
|
+
width: r.width,
|
|
794
|
+
height: r.height
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
function Xe(e) {
|
|
799
|
+
return J(e).direction === "rtl";
|
|
800
|
+
}
|
|
801
|
+
var Ze = {
|
|
802
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Pe,
|
|
803
|
+
getDocumentElement: H,
|
|
804
|
+
getClippingRect: Ue,
|
|
805
|
+
getOffsetParent: Je,
|
|
806
|
+
getElementRects: Ye,
|
|
807
|
+
getClientRects: Fe,
|
|
808
|
+
getDimensions: We,
|
|
809
|
+
getScale: Z,
|
|
810
|
+
isElement: U,
|
|
811
|
+
isRTL: Xe
|
|
812
|
+
};
|
|
813
|
+
function Qe(e, t) {
|
|
814
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
815
|
+
}
|
|
816
|
+
function $e(e, t) {
|
|
817
|
+
let n = null, r, i = H(e);
|
|
818
|
+
function a() {
|
|
819
|
+
var e;
|
|
820
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
821
|
+
}
|
|
822
|
+
function o(s, c) {
|
|
823
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
824
|
+
let l = e.getBoundingClientRect(), { left: u, top: p, width: h, height: g } = l;
|
|
825
|
+
if (s || t(), !h || !g) return;
|
|
826
|
+
let _ = m(p), v = m(i.clientWidth - (u + h)), y = m(i.clientHeight - (p + g)), b = m(u), x = {
|
|
827
|
+
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
|
|
828
|
+
threshold: f(0, d(1, c)) || 1
|
|
829
|
+
}, S = !0;
|
|
830
|
+
function C(t) {
|
|
831
|
+
let n = t[0].intersectionRatio;
|
|
832
|
+
if (n !== c) {
|
|
833
|
+
if (!S) return o();
|
|
834
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
835
|
+
o(!1, 1e-7);
|
|
836
|
+
}, 1e3);
|
|
837
|
+
}
|
|
838
|
+
n === 1 && !Qe(l, e.getBoundingClientRect()) && o(), S = !1;
|
|
839
|
+
}
|
|
840
|
+
try {
|
|
841
|
+
n = new IntersectionObserver(C, {
|
|
842
|
+
...x,
|
|
843
|
+
root: i.ownerDocument
|
|
844
|
+
});
|
|
845
|
+
} catch {
|
|
846
|
+
n = new IntersectionObserver(C, x);
|
|
847
|
+
}
|
|
848
|
+
n.observe(e);
|
|
849
|
+
}
|
|
850
|
+
return o(!0), a;
|
|
851
|
+
}
|
|
852
|
+
function et(e, t, n, r) {
|
|
853
|
+
r === void 0 && (r = {});
|
|
854
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Oe(e), u = i || a ? [...l ? X(l) : [], ...t ? X(t) : []] : [];
|
|
855
|
+
u.forEach((e) => {
|
|
856
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
857
|
+
});
|
|
858
|
+
let d = l && s ? $e(l, n) : null, f = -1, p = null;
|
|
859
|
+
o && (p = new ResizeObserver((e) => {
|
|
860
|
+
let [r] = e;
|
|
861
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
862
|
+
var e;
|
|
863
|
+
(e = p) == null || e.observe(t);
|
|
864
|
+
})), n();
|
|
865
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
866
|
+
let m, h = c ? Q(e) : null;
|
|
867
|
+
c && g();
|
|
868
|
+
function g() {
|
|
869
|
+
let t = Q(e);
|
|
870
|
+
h && !Qe(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
871
|
+
}
|
|
872
|
+
return n(), () => {
|
|
873
|
+
var e;
|
|
874
|
+
u.forEach((e) => {
|
|
875
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
876
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
var tt = le, nt = ue, rt = re, it = fe, at = oe, ot = ne, st = de, ct = (e, t, n) => {
|
|
880
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
881
|
+
platform: Ze,
|
|
882
|
+
...n
|
|
883
|
+
}, a = {
|
|
884
|
+
...i.platform,
|
|
885
|
+
_c: r
|
|
886
|
+
};
|
|
887
|
+
return te(e, t, {
|
|
888
|
+
...i,
|
|
889
|
+
platform: a
|
|
890
|
+
});
|
|
891
|
+
}, lt = typeof document < "u" ? c : function() {};
|
|
892
|
+
function ut(e, t) {
|
|
893
|
+
if (e === t) return !0;
|
|
894
|
+
if (typeof e != typeof t) return !1;
|
|
895
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
896
|
+
let n, r, i;
|
|
897
|
+
if (e && t && typeof e == "object") {
|
|
898
|
+
if (Array.isArray(e)) {
|
|
899
|
+
if (n = e.length, n !== t.length) return !1;
|
|
900
|
+
for (r = n; r-- !== 0;) if (!ut(e[r], t[r])) return !1;
|
|
901
|
+
return !0;
|
|
902
|
+
}
|
|
903
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
904
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
905
|
+
for (r = n; r-- !== 0;) {
|
|
906
|
+
let n = i[r];
|
|
907
|
+
if (!(n === "_owner" && e.$$typeof) && !ut(e[n], t[n])) return !1;
|
|
908
|
+
}
|
|
909
|
+
return !0;
|
|
910
|
+
}
|
|
911
|
+
return e !== e && t !== t;
|
|
912
|
+
}
|
|
913
|
+
function dt(e) {
|
|
914
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
915
|
+
}
|
|
916
|
+
function ft(e, t) {
|
|
917
|
+
let n = dt(e);
|
|
918
|
+
return Math.round(t * n) / n;
|
|
919
|
+
}
|
|
920
|
+
function pt(e) {
|
|
921
|
+
let t = s.useRef(e);
|
|
922
|
+
return lt(() => {
|
|
923
|
+
t.current = e;
|
|
924
|
+
}), t;
|
|
925
|
+
}
|
|
926
|
+
function mt(e) {
|
|
927
|
+
e === void 0 && (e = {});
|
|
928
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: c = !0, whileElementsMounted: u, open: d } = e, [f, p] = s.useState({
|
|
929
|
+
x: 0,
|
|
930
|
+
y: 0,
|
|
931
|
+
strategy: n,
|
|
932
|
+
placement: t,
|
|
933
|
+
middlewareData: {},
|
|
934
|
+
isPositioned: !1
|
|
935
|
+
}), [m, h] = s.useState(r);
|
|
936
|
+
ut(m, r) || h(r);
|
|
937
|
+
let [g, _] = s.useState(null), [v, y] = s.useState(null), b = s.useCallback((e) => {
|
|
938
|
+
e !== w.current && (w.current = e, _(e));
|
|
939
|
+
}, []), x = s.useCallback((e) => {
|
|
940
|
+
e !== T.current && (T.current = e, y(e));
|
|
941
|
+
}, []), S = a || g, C = o || v, w = s.useRef(null), T = s.useRef(null), E = s.useRef(f), D = u != null, O = pt(u), k = pt(i), A = pt(d), j = s.useCallback(() => {
|
|
942
|
+
if (!w.current || !T.current) return;
|
|
943
|
+
let e = {
|
|
944
|
+
placement: t,
|
|
945
|
+
strategy: n,
|
|
946
|
+
middleware: m
|
|
947
|
+
};
|
|
948
|
+
k.current && (e.platform = k.current), ct(w.current, T.current, e).then((e) => {
|
|
949
|
+
let t = {
|
|
950
|
+
...e,
|
|
951
|
+
isPositioned: A.current !== !1
|
|
952
|
+
};
|
|
953
|
+
M.current && !ut(E.current, t) && (E.current = t, l.flushSync(() => {
|
|
954
|
+
p(t);
|
|
955
|
+
}));
|
|
956
|
+
});
|
|
957
|
+
}, [
|
|
958
|
+
m,
|
|
959
|
+
t,
|
|
960
|
+
n,
|
|
961
|
+
k,
|
|
962
|
+
A
|
|
963
|
+
]);
|
|
964
|
+
lt(() => {
|
|
965
|
+
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
|
|
966
|
+
...e,
|
|
967
|
+
isPositioned: !1
|
|
968
|
+
})));
|
|
969
|
+
}, [d]);
|
|
970
|
+
let M = s.useRef(!1);
|
|
971
|
+
lt(() => (M.current = !0, () => {
|
|
972
|
+
M.current = !1;
|
|
973
|
+
}), []), lt(() => {
|
|
974
|
+
if (S && (w.current = S), C && (T.current = C), S && C) {
|
|
975
|
+
if (O.current) return O.current(S, C, j);
|
|
976
|
+
j();
|
|
977
|
+
}
|
|
978
|
+
}, [
|
|
979
|
+
S,
|
|
980
|
+
C,
|
|
981
|
+
j,
|
|
982
|
+
O,
|
|
983
|
+
D
|
|
984
|
+
]);
|
|
985
|
+
let N = s.useMemo(() => ({
|
|
986
|
+
reference: w,
|
|
987
|
+
floating: T,
|
|
988
|
+
setReference: b,
|
|
989
|
+
setFloating: x
|
|
990
|
+
}), [b, x]), P = s.useMemo(() => ({
|
|
991
|
+
reference: S,
|
|
992
|
+
floating: C
|
|
993
|
+
}), [S, C]), F = s.useMemo(() => {
|
|
994
|
+
let e = {
|
|
995
|
+
position: n,
|
|
996
|
+
left: 0,
|
|
997
|
+
top: 0
|
|
998
|
+
};
|
|
999
|
+
if (!P.floating) return e;
|
|
1000
|
+
let t = ft(P.floating, f.x), r = ft(P.floating, f.y);
|
|
1001
|
+
return c ? {
|
|
1002
|
+
...e,
|
|
1003
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
1004
|
+
...dt(P.floating) >= 1.5 && { willChange: "transform" }
|
|
1005
|
+
} : {
|
|
1006
|
+
position: n,
|
|
1007
|
+
left: t,
|
|
1008
|
+
top: r
|
|
1009
|
+
};
|
|
1010
|
+
}, [
|
|
1011
|
+
n,
|
|
1012
|
+
c,
|
|
1013
|
+
P.floating,
|
|
1014
|
+
f.x,
|
|
1015
|
+
f.y
|
|
1016
|
+
]);
|
|
1017
|
+
return s.useMemo(() => ({
|
|
1018
|
+
...f,
|
|
1019
|
+
update: j,
|
|
1020
|
+
refs: N,
|
|
1021
|
+
elements: P,
|
|
1022
|
+
floatingStyles: F
|
|
1023
|
+
}), [
|
|
1024
|
+
f,
|
|
1025
|
+
j,
|
|
1026
|
+
N,
|
|
1027
|
+
P,
|
|
1028
|
+
F
|
|
1029
|
+
]);
|
|
1030
|
+
}
|
|
1031
|
+
var ht = (e) => {
|
|
1032
|
+
function t(e) {
|
|
1033
|
+
return {}.hasOwnProperty.call(e, "current");
|
|
1034
|
+
}
|
|
1035
|
+
return {
|
|
1036
|
+
name: "arrow",
|
|
1037
|
+
options: e,
|
|
1038
|
+
fn(n) {
|
|
1039
|
+
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
1040
|
+
return r && t(r) ? r.current == null ? {} : ot({
|
|
1041
|
+
element: r.current,
|
|
1042
|
+
padding: i
|
|
1043
|
+
}).fn(n) : r ? ot({
|
|
1044
|
+
element: r,
|
|
1045
|
+
padding: i
|
|
1046
|
+
}).fn(n) : {};
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
}, gt = (e, t) => {
|
|
1050
|
+
let n = tt(e);
|
|
1051
|
+
return {
|
|
1052
|
+
name: n.name,
|
|
1053
|
+
fn: n.fn,
|
|
1054
|
+
options: [e, t]
|
|
1055
|
+
};
|
|
1056
|
+
}, _t = (e, t) => {
|
|
1057
|
+
let n = nt(e);
|
|
1058
|
+
return {
|
|
1059
|
+
name: n.name,
|
|
1060
|
+
fn: n.fn,
|
|
1061
|
+
options: [e, t]
|
|
1062
|
+
};
|
|
1063
|
+
}, vt = (e, t) => ({
|
|
1064
|
+
fn: st(e).fn,
|
|
1065
|
+
options: [e, t]
|
|
1066
|
+
}), yt = (e, t) => {
|
|
1067
|
+
let n = rt(e);
|
|
1068
|
+
return {
|
|
1069
|
+
name: n.name,
|
|
1070
|
+
fn: n.fn,
|
|
1071
|
+
options: [e, t]
|
|
1072
|
+
};
|
|
1073
|
+
}, bt = (e, t) => {
|
|
1074
|
+
let n = it(e);
|
|
1075
|
+
return {
|
|
1076
|
+
name: n.name,
|
|
1077
|
+
fn: n.fn,
|
|
1078
|
+
options: [e, t]
|
|
1079
|
+
};
|
|
1080
|
+
}, xt = (e, t) => {
|
|
1081
|
+
let n = at(e);
|
|
1082
|
+
return {
|
|
1083
|
+
name: n.name,
|
|
1084
|
+
fn: n.fn,
|
|
1085
|
+
options: [e, t]
|
|
1086
|
+
};
|
|
1087
|
+
}, St = (e, t) => {
|
|
1088
|
+
let n = ht(e);
|
|
1089
|
+
return {
|
|
1090
|
+
name: n.name,
|
|
1091
|
+
fn: n.fn,
|
|
1092
|
+
options: [e, t]
|
|
1093
|
+
};
|
|
1094
|
+
}, $ = e(), Ct = "Arrow", wt = s.forwardRef((e, t) => {
|
|
1095
|
+
let { children: n, width: i = 10, height: a = 5, ...o } = e;
|
|
1096
|
+
return /* @__PURE__ */ (0, $.jsx)(r.svg, {
|
|
1097
|
+
...o,
|
|
1098
|
+
ref: t,
|
|
1099
|
+
width: i,
|
|
1100
|
+
height: a,
|
|
1101
|
+
viewBox: "0 0 30 10",
|
|
1102
|
+
preserveAspectRatio: "none",
|
|
1103
|
+
children: e.asChild ? n : /* @__PURE__ */ (0, $.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
|
1104
|
+
});
|
|
1105
|
+
});
|
|
1106
|
+
wt.displayName = Ct;
|
|
1107
|
+
var Tt = wt, Et = "Popper", [Dt, Ot] = t(Et), [kt, At] = Dt(Et), jt = (e) => {
|
|
1108
|
+
let { __scopePopper: t, children: n } = e, [r, i] = s.useState(null);
|
|
1109
|
+
return /* @__PURE__ */ (0, $.jsx)(kt, {
|
|
1110
|
+
scope: t,
|
|
1111
|
+
anchor: r,
|
|
1112
|
+
onAnchorChange: i,
|
|
1113
|
+
children: n
|
|
1114
|
+
});
|
|
1115
|
+
};
|
|
1116
|
+
jt.displayName = Et;
|
|
1117
|
+
var Mt = "PopperAnchor", Nt = s.forwardRef((e, t) => {
|
|
1118
|
+
let { __scopePopper: i, virtualRef: a, ...o } = e, c = At(Mt, i), l = s.useRef(null), u = n(t, l), d = s.useRef(null);
|
|
1119
|
+
return s.useEffect(() => {
|
|
1120
|
+
let e = d.current;
|
|
1121
|
+
d.current = a?.current || l.current, e !== d.current && c.onAnchorChange(d.current);
|
|
1122
|
+
}), a ? null : /* @__PURE__ */ (0, $.jsx)(r.div, {
|
|
1123
|
+
...o,
|
|
1124
|
+
ref: u
|
|
1125
|
+
});
|
|
1126
|
+
});
|
|
1127
|
+
Nt.displayName = Mt;
|
|
1128
|
+
var Pt = "PopperContent", [Ft, It] = Dt(Pt), Lt = s.forwardRef((e, t) => {
|
|
1129
|
+
let { __scopePopper: c, side: l = "bottom", sideOffset: u = 0, align: d = "center", alignOffset: f = 0, arrowPadding: p = 0, avoidCollisions: m = !0, collisionBoundary: h = [], collisionPadding: g = 0, sticky: _ = "partial", hideWhenDetached: v = !1, updatePositionStrategy: y = "optimized", onPlaced: b, ...x } = e, S = At(Pt, c), [C, w] = s.useState(null), T = n(t, (e) => w(e)), [E, D] = s.useState(null), O = o(E), k = O?.width ?? 0, A = O?.height ?? 0, j = l + (d === "center" ? "" : "-" + d), M = typeof g == "number" ? g : {
|
|
1130
|
+
top: 0,
|
|
1131
|
+
right: 0,
|
|
1132
|
+
bottom: 0,
|
|
1133
|
+
left: 0,
|
|
1134
|
+
...g
|
|
1135
|
+
}, N = Array.isArray(h) ? h : [h], P = N.length > 0, F = {
|
|
1136
|
+
padding: M,
|
|
1137
|
+
boundary: N.filter(Vt),
|
|
1138
|
+
altBoundary: P
|
|
1139
|
+
}, { refs: ee, floatingStyles: I, placement: L, isPositioned: R, middlewareData: z } = mt({
|
|
1140
|
+
strategy: "fixed",
|
|
1141
|
+
placement: j,
|
|
1142
|
+
whileElementsMounted: (...e) => et(...e, { animationFrame: y === "always" }),
|
|
1143
|
+
elements: { reference: S.anchor },
|
|
1144
|
+
middleware: [
|
|
1145
|
+
gt({
|
|
1146
|
+
mainAxis: u + A,
|
|
1147
|
+
alignmentAxis: f
|
|
1148
|
+
}),
|
|
1149
|
+
m && _t({
|
|
1150
|
+
mainAxis: !0,
|
|
1151
|
+
crossAxis: !1,
|
|
1152
|
+
limiter: _ === "partial" ? vt() : void 0,
|
|
1153
|
+
...F
|
|
1154
|
+
}),
|
|
1155
|
+
m && yt({ ...F }),
|
|
1156
|
+
bt({
|
|
1157
|
+
...F,
|
|
1158
|
+
apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
1159
|
+
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
1160
|
+
o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
|
|
1161
|
+
}
|
|
1162
|
+
}),
|
|
1163
|
+
E && St({
|
|
1164
|
+
element: E,
|
|
1165
|
+
padding: p
|
|
1166
|
+
}),
|
|
1167
|
+
Ht({
|
|
1168
|
+
arrowWidth: k,
|
|
1169
|
+
arrowHeight: A
|
|
1170
|
+
}),
|
|
1171
|
+
v && xt({
|
|
1172
|
+
strategy: "referenceHidden",
|
|
1173
|
+
...F
|
|
1174
|
+
})
|
|
1175
|
+
]
|
|
1176
|
+
}), [te, ne] = Ut(L), re = a(b);
|
|
1177
|
+
i(() => {
|
|
1178
|
+
R && re?.();
|
|
1179
|
+
}, [R, re]);
|
|
1180
|
+
let ie = z.arrow?.x, ae = z.arrow?.y, oe = z.arrow?.centerOffset !== 0, [se, ce] = s.useState();
|
|
1181
|
+
return i(() => {
|
|
1182
|
+
C && ce(window.getComputedStyle(C).zIndex);
|
|
1183
|
+
}, [C]), /* @__PURE__ */ (0, $.jsx)("div", {
|
|
1184
|
+
ref: ee.setFloating,
|
|
1185
|
+
"data-radix-popper-content-wrapper": "",
|
|
1186
|
+
style: {
|
|
1187
|
+
...I,
|
|
1188
|
+
transform: R ? I.transform : "translate(0, -200%)",
|
|
1189
|
+
minWidth: "max-content",
|
|
1190
|
+
zIndex: se,
|
|
1191
|
+
"--radix-popper-transform-origin": [z.transformOrigin?.x, z.transformOrigin?.y].join(" "),
|
|
1192
|
+
...z.hide?.referenceHidden && {
|
|
1193
|
+
visibility: "hidden",
|
|
1194
|
+
pointerEvents: "none"
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
dir: e.dir,
|
|
1198
|
+
children: /* @__PURE__ */ (0, $.jsx)(Ft, {
|
|
1199
|
+
scope: c,
|
|
1200
|
+
placedSide: te,
|
|
1201
|
+
onArrowChange: D,
|
|
1202
|
+
arrowX: ie,
|
|
1203
|
+
arrowY: ae,
|
|
1204
|
+
shouldHideArrow: oe,
|
|
1205
|
+
children: /* @__PURE__ */ (0, $.jsx)(r.div, {
|
|
1206
|
+
"data-side": te,
|
|
1207
|
+
"data-align": ne,
|
|
1208
|
+
...x,
|
|
1209
|
+
ref: T,
|
|
1210
|
+
style: {
|
|
1211
|
+
...x.style,
|
|
1212
|
+
animation: R ? void 0 : "none"
|
|
1213
|
+
}
|
|
1214
|
+
})
|
|
1215
|
+
})
|
|
1216
|
+
});
|
|
1217
|
+
});
|
|
1218
|
+
Lt.displayName = Pt;
|
|
1219
|
+
var Rt = "PopperArrow", zt = {
|
|
1220
|
+
top: "bottom",
|
|
1221
|
+
right: "left",
|
|
1222
|
+
bottom: "top",
|
|
1223
|
+
left: "right"
|
|
1224
|
+
}, Bt = s.forwardRef(function(e, t) {
|
|
1225
|
+
let { __scopePopper: n, ...r } = e, i = It(Rt, n), a = zt[i.placedSide];
|
|
1226
|
+
return /* @__PURE__ */ (0, $.jsx)("span", {
|
|
1227
|
+
ref: i.onArrowChange,
|
|
1228
|
+
style: {
|
|
1229
|
+
position: "absolute",
|
|
1230
|
+
left: i.arrowX,
|
|
1231
|
+
top: i.arrowY,
|
|
1232
|
+
[a]: 0,
|
|
1233
|
+
transformOrigin: {
|
|
1234
|
+
top: "",
|
|
1235
|
+
right: "0 0",
|
|
1236
|
+
bottom: "center 0",
|
|
1237
|
+
left: "100% 0"
|
|
1238
|
+
}[i.placedSide],
|
|
1239
|
+
transform: {
|
|
1240
|
+
top: "translateY(100%)",
|
|
1241
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1242
|
+
bottom: "rotate(180deg)",
|
|
1243
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1244
|
+
}[i.placedSide],
|
|
1245
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1246
|
+
},
|
|
1247
|
+
children: /* @__PURE__ */ (0, $.jsx)(Tt, {
|
|
1248
|
+
...r,
|
|
1249
|
+
ref: t,
|
|
1250
|
+
style: {
|
|
1251
|
+
...r.style,
|
|
1252
|
+
display: "block"
|
|
1253
|
+
}
|
|
1254
|
+
})
|
|
1255
|
+
});
|
|
1256
|
+
});
|
|
1257
|
+
Bt.displayName = Rt;
|
|
1258
|
+
function Vt(e) {
|
|
1259
|
+
return e !== null;
|
|
1260
|
+
}
|
|
1261
|
+
var Ht = (e) => ({
|
|
1262
|
+
name: "transformOrigin",
|
|
1263
|
+
options: e,
|
|
1264
|
+
fn(t) {
|
|
1265
|
+
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = Ut(n), u = {
|
|
1266
|
+
start: "0%",
|
|
1267
|
+
center: "50%",
|
|
1268
|
+
end: "100%"
|
|
1269
|
+
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
|
|
1270
|
+
return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
|
|
1271
|
+
x: p,
|
|
1272
|
+
y: m
|
|
1273
|
+
} };
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
function Ut(e) {
|
|
1277
|
+
let [t, n = "center"] = e.split("-");
|
|
1278
|
+
return [t, n];
|
|
1279
|
+
}
|
|
1280
|
+
var Wt = jt, Gt = Nt, Kt = Lt, qt = Bt;
|
|
1281
|
+
//#endregion
|
|
1282
|
+
export { Ot as a, Wt as i, qt as n, Kt as r, Gt as t };
|