highsoft-ui 1.0.111 → 1.0.113
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/Button-Bbc4vmW_.js +45 -0
- package/dist/Container-LAkF4ShX.js +11 -0
- package/dist/CookiePolicyModal-BH2uHybE.js +90 -0
- package/dist/Footer-DY0QJnxb.js +783 -0
- package/dist/GPTInput-DRFGKJ2u.js +66 -0
- package/dist/Header-DbSqXuvO.js +383 -0
- package/dist/Logo-CZ5LYqub.js +194 -0
- package/dist/NewTag-C-3mRyvV.js +26 -0
- package/dist/Notification-_vWBqFiA.js +96 -0
- package/dist/PrefPanel-DmiRZs1n.js +1548 -0
- package/dist/Search-D_fsZ-hm.js +4673 -0
- package/dist/clsx-ROFf4vs9.js +16 -0
- package/dist/components/Button/index.js +2 -81
- package/dist/components/Container/index.js +2 -11
- package/dist/components/Footer/CookiePolicyModal.js +2 -9
- package/dist/components/Footer/index.js +2 -833
- package/dist/components/GPTInput/index.js +2 -86
- package/dist/components/Header/index.js +2 -611
- package/dist/components/Logo/index.js +2 -255
- package/dist/components/NewTag/index.js +2 -54
- package/dist/components/Notification/index.js +2 -100
- package/dist/components/PrefPanel/index.js +2 -1945
- package/dist/components/Search/index.js +2 -9
- package/dist/components/ThemeLoader/index.js +6 -34
- package/dist/components/icons/Bubble.js +37 -52
- package/dist/components/icons/MadeInNorway.js +110 -145
- package/dist/components/icons/Plane.js +17 -23
- package/dist/dist-0f0-S8_q.js +211 -0
- package/dist/dist-CjrKJb_1.js +27 -0
- package/dist/es2015-CzBBLWyD.js +1140 -0
- package/dist/esm-C1TDRARf.js +479 -0
- package/dist/highsoft-ui.css +2 -1
- package/dist/main.js +12 -28
- package/dist/php-client.js +9 -9
- package/dist/php.js +10 -16
- package/dist/utils-C4QGLbxr.js +162 -0
- package/dist/utils.js +2 -11
- package/package.json +14 -8
- package/dist/Announcement03-obPaH4LK.js +0 -23
- package/dist/Check-Cm4roSEj.js +0 -23
- package/dist/CookiePolicyModal-C5FOuvB-.js +0 -82
- package/dist/XClose-CCu1vrNS.js +0 -23
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/extends-hS2Bh-Yp.js +0 -12
- package/dist/index-CUCGgBGk.js +0 -5654
- package/dist/index-CYz8LhDn.js +0 -1110
- package/dist/index-DThcOQDt.js +0 -234
- package/dist/index-hYJmp-0x.js +0 -30
- package/dist/utils-BKDJp1i0.js +0 -140
- /package/dist/{components → lib/components}/Button/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Container/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Footer/CookiePolicyModal.d.ts +0 -0
- /package/dist/{components → lib/components}/Footer/index.d.ts +0 -0
- /package/dist/{components → lib/components}/GPTInput/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Header/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Logo/index.d.ts +0 -0
- /package/dist/{components → lib/components}/NewTag/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Notification/index.d.ts +0 -0
- /package/dist/{components → lib/components}/PrefPanel/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Search/index.d.ts +0 -0
- /package/dist/{components → lib/components}/ThemeLoader/index.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/Bubble.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/MadeInNorway.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/Plane.d.ts +0 -0
- /package/dist/{main.d.ts → lib/main.d.ts} +0 -0
- /package/dist/{php-client.d.ts → lib/php-client.d.ts} +0 -0
- /package/dist/{php.d.ts → lib/php.d.ts} +0 -0
- /package/dist/{utils.d.ts → lib/utils.d.ts} +0 -0
|
@@ -0,0 +1,1548 @@
|
|
|
1
|
+
import { a as e, l as t } from "./utils-C4QGLbxr.js";
|
|
2
|
+
import { t as n } from "./clsx-ROFf4vs9.js";
|
|
3
|
+
import { E as r, g as i, h as a, l as o, r as s } from "./esm-C1TDRARf.js";
|
|
4
|
+
import { t as c } from "./Button-Bbc4vmW_.js";
|
|
5
|
+
import { _ as l, a as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, r as x, s as S, t as C, u as w } from "./es2015-CzBBLWyD.js";
|
|
6
|
+
import * as T from "react";
|
|
7
|
+
import { useLayoutEffect as ee } from "react";
|
|
8
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
9
|
+
import * as k from "react-dom";
|
|
10
|
+
//#region node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
11
|
+
function A(e) {
|
|
12
|
+
let [t, n] = T.useState(void 0);
|
|
13
|
+
return f(() => {
|
|
14
|
+
if (e) {
|
|
15
|
+
n({
|
|
16
|
+
width: e.offsetWidth,
|
|
17
|
+
height: e.offsetHeight
|
|
18
|
+
});
|
|
19
|
+
let t = new ResizeObserver((t) => {
|
|
20
|
+
if (!Array.isArray(t) || !t.length) return;
|
|
21
|
+
let r = t[0], i, a;
|
|
22
|
+
if ("borderBoxSize" in r) {
|
|
23
|
+
let e = r.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
24
|
+
i = t.inlineSize, a = t.blockSize;
|
|
25
|
+
} else i = e.offsetWidth, a = e.offsetHeight;
|
|
26
|
+
n({
|
|
27
|
+
width: i,
|
|
28
|
+
height: a
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return t.observe(e, { box: "border-box" }), () => t.unobserve(e);
|
|
32
|
+
} else n(void 0);
|
|
33
|
+
}, [e]), t;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
37
|
+
var j = [
|
|
38
|
+
"top",
|
|
39
|
+
"right",
|
|
40
|
+
"bottom",
|
|
41
|
+
"left"
|
|
42
|
+
], M = Math.min, N = Math.max, P = Math.round, F = Math.floor, I = (e) => ({
|
|
43
|
+
x: e,
|
|
44
|
+
y: e
|
|
45
|
+
}), te = {
|
|
46
|
+
left: "right",
|
|
47
|
+
right: "left",
|
|
48
|
+
bottom: "top",
|
|
49
|
+
top: "bottom"
|
|
50
|
+
};
|
|
51
|
+
function ne(e, t, n) {
|
|
52
|
+
return N(e, M(t, n));
|
|
53
|
+
}
|
|
54
|
+
function L(e, t) {
|
|
55
|
+
return typeof e == "function" ? e(t) : e;
|
|
56
|
+
}
|
|
57
|
+
function R(e) {
|
|
58
|
+
return e.split("-")[0];
|
|
59
|
+
}
|
|
60
|
+
function z(e) {
|
|
61
|
+
return e.split("-")[1];
|
|
62
|
+
}
|
|
63
|
+
function re(e) {
|
|
64
|
+
return e === "x" ? "y" : "x";
|
|
65
|
+
}
|
|
66
|
+
function ie(e) {
|
|
67
|
+
return e === "y" ? "height" : "width";
|
|
68
|
+
}
|
|
69
|
+
function B(e) {
|
|
70
|
+
let t = e[0];
|
|
71
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
72
|
+
}
|
|
73
|
+
function ae(e) {
|
|
74
|
+
return re(B(e));
|
|
75
|
+
}
|
|
76
|
+
function oe(e, t, n) {
|
|
77
|
+
n === void 0 && (n = !1);
|
|
78
|
+
let r = z(e), i = ae(e), a = ie(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
79
|
+
return t.reference[a] > t.floating[a] && (o = he(o)), [o, he(o)];
|
|
80
|
+
}
|
|
81
|
+
function se(e) {
|
|
82
|
+
let t = he(e);
|
|
83
|
+
return [
|
|
84
|
+
ce(e),
|
|
85
|
+
t,
|
|
86
|
+
ce(t)
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
function ce(e) {
|
|
90
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
91
|
+
}
|
|
92
|
+
var le = ["left", "right"], ue = ["right", "left"], de = ["top", "bottom"], fe = ["bottom", "top"];
|
|
93
|
+
function pe(e, t, n) {
|
|
94
|
+
switch (e) {
|
|
95
|
+
case "top":
|
|
96
|
+
case "bottom": return n ? t ? ue : le : t ? le : ue;
|
|
97
|
+
case "left":
|
|
98
|
+
case "right": return t ? de : fe;
|
|
99
|
+
default: return [];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function me(e, t, n, r) {
|
|
103
|
+
let i = z(e), a = pe(R(e), n === "start", r);
|
|
104
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ce)))), a;
|
|
105
|
+
}
|
|
106
|
+
function he(e) {
|
|
107
|
+
let t = R(e);
|
|
108
|
+
return te[t] + e.slice(t.length);
|
|
109
|
+
}
|
|
110
|
+
function ge(e) {
|
|
111
|
+
return {
|
|
112
|
+
top: 0,
|
|
113
|
+
right: 0,
|
|
114
|
+
bottom: 0,
|
|
115
|
+
left: 0,
|
|
116
|
+
...e
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function _e(e) {
|
|
120
|
+
return typeof e == "number" ? {
|
|
121
|
+
top: e,
|
|
122
|
+
right: e,
|
|
123
|
+
bottom: e,
|
|
124
|
+
left: e
|
|
125
|
+
} : ge(e);
|
|
126
|
+
}
|
|
127
|
+
function ve(e) {
|
|
128
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
129
|
+
return {
|
|
130
|
+
width: r,
|
|
131
|
+
height: i,
|
|
132
|
+
top: n,
|
|
133
|
+
left: t,
|
|
134
|
+
right: t + r,
|
|
135
|
+
bottom: n + i,
|
|
136
|
+
x: t,
|
|
137
|
+
y: n
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
142
|
+
function ye(e, t, n) {
|
|
143
|
+
let { reference: r, floating: i } = e, a = B(t), o = ae(t), s = ie(o), c = R(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;
|
|
144
|
+
switch (c) {
|
|
145
|
+
case "top":
|
|
146
|
+
p = {
|
|
147
|
+
x: u,
|
|
148
|
+
y: r.y - i.height
|
|
149
|
+
};
|
|
150
|
+
break;
|
|
151
|
+
case "bottom":
|
|
152
|
+
p = {
|
|
153
|
+
x: u,
|
|
154
|
+
y: r.y + r.height
|
|
155
|
+
};
|
|
156
|
+
break;
|
|
157
|
+
case "right":
|
|
158
|
+
p = {
|
|
159
|
+
x: r.x + r.width,
|
|
160
|
+
y: d
|
|
161
|
+
};
|
|
162
|
+
break;
|
|
163
|
+
case "left":
|
|
164
|
+
p = {
|
|
165
|
+
x: r.x - i.width,
|
|
166
|
+
y: d
|
|
167
|
+
};
|
|
168
|
+
break;
|
|
169
|
+
default: p = {
|
|
170
|
+
x: r.x,
|
|
171
|
+
y: r.y
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
switch (z(t)) {
|
|
175
|
+
case "start":
|
|
176
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
177
|
+
break;
|
|
178
|
+
case "end":
|
|
179
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
return p;
|
|
183
|
+
}
|
|
184
|
+
async function be(e, t) {
|
|
185
|
+
t === void 0 && (t = {});
|
|
186
|
+
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 } = L(t, e), p = _e(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = ve(await i.getClippingRect({
|
|
187
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
188
|
+
boundary: c,
|
|
189
|
+
rootBoundary: l,
|
|
190
|
+
strategy: s
|
|
191
|
+
})), g = u === "floating" ? {
|
|
192
|
+
x: n,
|
|
193
|
+
y: r,
|
|
194
|
+
width: a.floating.width,
|
|
195
|
+
height: a.floating.height
|
|
196
|
+
} : 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(_)) || {
|
|
197
|
+
x: 1,
|
|
198
|
+
y: 1
|
|
199
|
+
}, y = ve(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
200
|
+
elements: o,
|
|
201
|
+
rect: g,
|
|
202
|
+
offsetParent: _,
|
|
203
|
+
strategy: s
|
|
204
|
+
}) : g);
|
|
205
|
+
return {
|
|
206
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
207
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
208
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
209
|
+
right: (y.right - h.right + p.right) / v.x
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
var xe = 50, Se = async (e, t, n) => {
|
|
213
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
214
|
+
...o,
|
|
215
|
+
detectOverflow: be
|
|
216
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
217
|
+
reference: e,
|
|
218
|
+
floating: t,
|
|
219
|
+
strategy: i
|
|
220
|
+
}), { x: u, y: d } = ye(l, r, c), f = r, p = 0, m = {};
|
|
221
|
+
for (let n = 0; n < a.length; n++) {
|
|
222
|
+
let h = a[n];
|
|
223
|
+
if (!h) continue;
|
|
224
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
225
|
+
x: u,
|
|
226
|
+
y: d,
|
|
227
|
+
initialPlacement: r,
|
|
228
|
+
placement: f,
|
|
229
|
+
strategy: i,
|
|
230
|
+
middlewareData: m,
|
|
231
|
+
rects: l,
|
|
232
|
+
platform: s,
|
|
233
|
+
elements: {
|
|
234
|
+
reference: e,
|
|
235
|
+
floating: t
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
239
|
+
...m[g],
|
|
240
|
+
...b
|
|
241
|
+
}, x && p < xe && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
242
|
+
reference: e,
|
|
243
|
+
floating: t,
|
|
244
|
+
strategy: i
|
|
245
|
+
}) : x.rects), {x: u, y: d} = ye(l, f, c)), n = -1);
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
x: u,
|
|
249
|
+
y: d,
|
|
250
|
+
placement: f,
|
|
251
|
+
strategy: i,
|
|
252
|
+
middlewareData: m
|
|
253
|
+
};
|
|
254
|
+
}, Ce = (e) => ({
|
|
255
|
+
name: "arrow",
|
|
256
|
+
options: e,
|
|
257
|
+
async fn(t) {
|
|
258
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = L(e, t) || {};
|
|
259
|
+
if (l == null) return {};
|
|
260
|
+
let d = _e(u), f = {
|
|
261
|
+
x: n,
|
|
262
|
+
y: r
|
|
263
|
+
}, p = ae(i), m = ie(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
264
|
+
(!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
|
|
265
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, ee = M(d[_], T), E = M(d[v], T), D = ee, O = C - h[m] - E, k = C / 2 - h[m] / 2 + w, A = ne(D, k, O), j = !c.arrow && z(i) != null && k !== A && a.reference[m] / 2 - (k < D ? ee : E) - h[m] / 2 < 0, N = j ? k < D ? k - D : k - O : 0;
|
|
266
|
+
return {
|
|
267
|
+
[p]: f[p] + N,
|
|
268
|
+
data: {
|
|
269
|
+
[p]: A,
|
|
270
|
+
centerOffset: k - A - N,
|
|
271
|
+
...j && { alignmentOffset: N }
|
|
272
|
+
},
|
|
273
|
+
reset: j
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}), we = function(e) {
|
|
277
|
+
return e === void 0 && (e = {}), {
|
|
278
|
+
name: "flip",
|
|
279
|
+
options: e,
|
|
280
|
+
async fn(t) {
|
|
281
|
+
var n;
|
|
282
|
+
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 } = L(e, t);
|
|
283
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
284
|
+
let g = R(r), _ = B(o), v = R(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [he(o)] : se(o)), x = p !== "none";
|
|
285
|
+
!d && x && b.push(...me(o, m, p, y));
|
|
286
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
287
|
+
if (l && w.push(C[g]), u) {
|
|
288
|
+
let e = oe(r, a, y);
|
|
289
|
+
w.push(C[e[0]], C[e[1]]);
|
|
290
|
+
}
|
|
291
|
+
if (T = [...T, {
|
|
292
|
+
placement: r,
|
|
293
|
+
overflows: w
|
|
294
|
+
}], !w.every((e) => e <= 0)) {
|
|
295
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
296
|
+
if (t && (!(u === "alignment" && _ !== B(t)) || T.every((e) => B(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
297
|
+
data: {
|
|
298
|
+
index: e,
|
|
299
|
+
overflows: T
|
|
300
|
+
},
|
|
301
|
+
reset: { placement: t }
|
|
302
|
+
};
|
|
303
|
+
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
304
|
+
if (!n) switch (f) {
|
|
305
|
+
case "bestFit": {
|
|
306
|
+
let e = T.filter((e) => {
|
|
307
|
+
if (x) {
|
|
308
|
+
let t = B(e.placement);
|
|
309
|
+
return t === _ || t === "y";
|
|
310
|
+
}
|
|
311
|
+
return !0;
|
|
312
|
+
}).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];
|
|
313
|
+
e && (n = e);
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
case "initialPlacement":
|
|
317
|
+
n = o;
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
if (r !== n) return { reset: { placement: n } };
|
|
321
|
+
}
|
|
322
|
+
return {};
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
function Te(e, t) {
|
|
327
|
+
return {
|
|
328
|
+
top: e.top - t.height,
|
|
329
|
+
right: e.right - t.width,
|
|
330
|
+
bottom: e.bottom - t.height,
|
|
331
|
+
left: e.left - t.width
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function Ee(e) {
|
|
335
|
+
return j.some((t) => e[t] >= 0);
|
|
336
|
+
}
|
|
337
|
+
var De = function(e) {
|
|
338
|
+
return e === void 0 && (e = {}), {
|
|
339
|
+
name: "hide",
|
|
340
|
+
options: e,
|
|
341
|
+
async fn(t) {
|
|
342
|
+
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = L(e, t);
|
|
343
|
+
switch (i) {
|
|
344
|
+
case "referenceHidden": {
|
|
345
|
+
let e = Te(await r.detectOverflow(t, {
|
|
346
|
+
...a,
|
|
347
|
+
elementContext: "reference"
|
|
348
|
+
}), n.reference);
|
|
349
|
+
return { data: {
|
|
350
|
+
referenceHiddenOffsets: e,
|
|
351
|
+
referenceHidden: Ee(e)
|
|
352
|
+
} };
|
|
353
|
+
}
|
|
354
|
+
case "escaped": {
|
|
355
|
+
let e = Te(await r.detectOverflow(t, {
|
|
356
|
+
...a,
|
|
357
|
+
altBoundary: !0
|
|
358
|
+
}), n.floating);
|
|
359
|
+
return { data: {
|
|
360
|
+
escapedOffsets: e,
|
|
361
|
+
escaped: Ee(e)
|
|
362
|
+
} };
|
|
363
|
+
}
|
|
364
|
+
default: return {};
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
}, Oe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
369
|
+
async function ke(e, t) {
|
|
370
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = R(n), s = z(n), c = B(n) === "y", l = Oe.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = L(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
371
|
+
mainAxis: d,
|
|
372
|
+
crossAxis: 0,
|
|
373
|
+
alignmentAxis: null
|
|
374
|
+
} : {
|
|
375
|
+
mainAxis: d.mainAxis || 0,
|
|
376
|
+
crossAxis: d.crossAxis || 0,
|
|
377
|
+
alignmentAxis: d.alignmentAxis
|
|
378
|
+
};
|
|
379
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
380
|
+
x: p * u,
|
|
381
|
+
y: f * l
|
|
382
|
+
} : {
|
|
383
|
+
x: f * l,
|
|
384
|
+
y: p * u
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
var Ae = function(e) {
|
|
388
|
+
return e === void 0 && (e = 0), {
|
|
389
|
+
name: "offset",
|
|
390
|
+
options: e,
|
|
391
|
+
async fn(t) {
|
|
392
|
+
var n;
|
|
393
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ke(t, e);
|
|
394
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
395
|
+
x: r + s.x,
|
|
396
|
+
y: i + s.y,
|
|
397
|
+
data: {
|
|
398
|
+
...s,
|
|
399
|
+
placement: a
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
}, je = function(e) {
|
|
405
|
+
return e === void 0 && (e = {}), {
|
|
406
|
+
name: "shift",
|
|
407
|
+
options: e,
|
|
408
|
+
async fn(t) {
|
|
409
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
410
|
+
let { x: t, y: n } = e;
|
|
411
|
+
return {
|
|
412
|
+
x: t,
|
|
413
|
+
y: n
|
|
414
|
+
};
|
|
415
|
+
} }, ...l } = L(e, t), u = {
|
|
416
|
+
x: n,
|
|
417
|
+
y: r
|
|
418
|
+
}, d = await a.detectOverflow(t, l), f = B(R(i)), p = re(f), m = u[p], h = u[f];
|
|
419
|
+
if (o) {
|
|
420
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
421
|
+
m = ne(n, m, r);
|
|
422
|
+
}
|
|
423
|
+
if (s) {
|
|
424
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
425
|
+
h = ne(n, h, r);
|
|
426
|
+
}
|
|
427
|
+
let g = c.fn({
|
|
428
|
+
...t,
|
|
429
|
+
[p]: m,
|
|
430
|
+
[f]: h
|
|
431
|
+
});
|
|
432
|
+
return {
|
|
433
|
+
...g,
|
|
434
|
+
data: {
|
|
435
|
+
x: g.x - n,
|
|
436
|
+
y: g.y - r,
|
|
437
|
+
enabled: {
|
|
438
|
+
[p]: o,
|
|
439
|
+
[f]: s
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
}, Me = function(e) {
|
|
446
|
+
return e === void 0 && (e = {}), {
|
|
447
|
+
options: e,
|
|
448
|
+
fn(t) {
|
|
449
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = L(e, t), u = {
|
|
450
|
+
x: n,
|
|
451
|
+
y: r
|
|
452
|
+
}, d = B(i), f = re(d), p = u[f], m = u[d], h = L(s, t), g = typeof h == "number" ? {
|
|
453
|
+
mainAxis: h,
|
|
454
|
+
crossAxis: 0
|
|
455
|
+
} : {
|
|
456
|
+
mainAxis: 0,
|
|
457
|
+
crossAxis: 0,
|
|
458
|
+
...h
|
|
459
|
+
};
|
|
460
|
+
if (c) {
|
|
461
|
+
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
462
|
+
p < t ? p = t : p > n && (p = n);
|
|
463
|
+
}
|
|
464
|
+
if (l) {
|
|
465
|
+
let e = f === "y" ? "width" : "height", t = Oe.has(R(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);
|
|
466
|
+
m < n ? m = n : m > r && (m = r);
|
|
467
|
+
}
|
|
468
|
+
return {
|
|
469
|
+
[f]: p,
|
|
470
|
+
[d]: m
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
}, Ne = function(e) {
|
|
475
|
+
return e === void 0 && (e = {}), {
|
|
476
|
+
name: "size",
|
|
477
|
+
options: e,
|
|
478
|
+
async fn(t) {
|
|
479
|
+
var n, r;
|
|
480
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = L(e, t), u = await o.detectOverflow(t, l), d = R(i), f = z(i), p = B(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
481
|
+
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");
|
|
482
|
+
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = M(h - u[g], v), x = M(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
|
|
483
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
|
|
484
|
+
let e = N(u.left, 0), t = N(u.right, 0), n = N(u.top, 0), r = N(u.bottom, 0);
|
|
485
|
+
p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : N(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : N(u.top, u.bottom));
|
|
486
|
+
}
|
|
487
|
+
await c({
|
|
488
|
+
...t,
|
|
489
|
+
availableWidth: w,
|
|
490
|
+
availableHeight: C
|
|
491
|
+
});
|
|
492
|
+
let T = await o.getDimensions(s.floating);
|
|
493
|
+
return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
499
|
+
function Pe() {
|
|
500
|
+
return typeof window < "u";
|
|
501
|
+
}
|
|
502
|
+
function V(e) {
|
|
503
|
+
return Fe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
504
|
+
}
|
|
505
|
+
function H(e) {
|
|
506
|
+
var t;
|
|
507
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
508
|
+
}
|
|
509
|
+
function U(e) {
|
|
510
|
+
return ((Fe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
511
|
+
}
|
|
512
|
+
function Fe(e) {
|
|
513
|
+
return Pe() ? e instanceof Node || e instanceof H(e).Node : !1;
|
|
514
|
+
}
|
|
515
|
+
function W(e) {
|
|
516
|
+
return Pe() ? e instanceof Element || e instanceof H(e).Element : !1;
|
|
517
|
+
}
|
|
518
|
+
function G(e) {
|
|
519
|
+
return Pe() ? e instanceof HTMLElement || e instanceof H(e).HTMLElement : !1;
|
|
520
|
+
}
|
|
521
|
+
function Ie(e) {
|
|
522
|
+
return !Pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
523
|
+
}
|
|
524
|
+
function Le(e) {
|
|
525
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = J(e);
|
|
526
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
527
|
+
}
|
|
528
|
+
function Re(e) {
|
|
529
|
+
return /^(table|td|th)$/.test(V(e));
|
|
530
|
+
}
|
|
531
|
+
function ze(e) {
|
|
532
|
+
try {
|
|
533
|
+
if (e.matches(":popover-open")) return !0;
|
|
534
|
+
} catch {}
|
|
535
|
+
try {
|
|
536
|
+
return e.matches(":modal");
|
|
537
|
+
} catch {
|
|
538
|
+
return !1;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
var Be = /transform|translate|scale|rotate|perspective|filter/, Ve = /paint|layout|strict|content/, K = (e) => !!e && e !== "none", He;
|
|
542
|
+
function Ue(e) {
|
|
543
|
+
let t = W(e) ? J(e) : e;
|
|
544
|
+
return K(t.transform) || K(t.translate) || K(t.scale) || K(t.rotate) || K(t.perspective) || !Ge() && (K(t.backdropFilter) || K(t.filter)) || Be.test(t.willChange || "") || Ve.test(t.contain || "");
|
|
545
|
+
}
|
|
546
|
+
function We(e) {
|
|
547
|
+
let t = Y(e);
|
|
548
|
+
for (; G(t) && !q(t);) {
|
|
549
|
+
if (Ue(t)) return t;
|
|
550
|
+
if (ze(t)) return null;
|
|
551
|
+
t = Y(t);
|
|
552
|
+
}
|
|
553
|
+
return null;
|
|
554
|
+
}
|
|
555
|
+
function Ge() {
|
|
556
|
+
return He ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), He;
|
|
557
|
+
}
|
|
558
|
+
function q(e) {
|
|
559
|
+
return /^(html|body|#document)$/.test(V(e));
|
|
560
|
+
}
|
|
561
|
+
function J(e) {
|
|
562
|
+
return H(e).getComputedStyle(e);
|
|
563
|
+
}
|
|
564
|
+
function Ke(e) {
|
|
565
|
+
return W(e) ? {
|
|
566
|
+
scrollLeft: e.scrollLeft,
|
|
567
|
+
scrollTop: e.scrollTop
|
|
568
|
+
} : {
|
|
569
|
+
scrollLeft: e.scrollX,
|
|
570
|
+
scrollTop: e.scrollY
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
function Y(e) {
|
|
574
|
+
if (V(e) === "html") return e;
|
|
575
|
+
let t = e.assignedSlot || e.parentNode || Ie(e) && e.host || U(e);
|
|
576
|
+
return Ie(t) ? t.host : t;
|
|
577
|
+
}
|
|
578
|
+
function qe(e) {
|
|
579
|
+
let t = Y(e);
|
|
580
|
+
return q(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : G(t) && Le(t) ? t : qe(t);
|
|
581
|
+
}
|
|
582
|
+
function Je(e, t, n) {
|
|
583
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
584
|
+
let r = qe(e), i = r === e.ownerDocument?.body, a = H(r);
|
|
585
|
+
if (i) {
|
|
586
|
+
let e = Ye(a);
|
|
587
|
+
return t.concat(a, a.visualViewport || [], Le(r) ? r : [], e && n ? Je(e) : []);
|
|
588
|
+
} else return t.concat(r, Je(r, [], n));
|
|
589
|
+
}
|
|
590
|
+
function Ye(e) {
|
|
591
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
592
|
+
}
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
595
|
+
function Xe(e) {
|
|
596
|
+
let t = J(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = G(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = P(n) !== a || P(r) !== o;
|
|
597
|
+
return s && (n = a, r = o), {
|
|
598
|
+
width: n,
|
|
599
|
+
height: r,
|
|
600
|
+
$: s
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function Ze(e) {
|
|
604
|
+
return W(e) ? e : e.contextElement;
|
|
605
|
+
}
|
|
606
|
+
function X(e) {
|
|
607
|
+
let t = Ze(e);
|
|
608
|
+
if (!G(t)) return I(1);
|
|
609
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Xe(t), o = (a ? P(n.width) : n.width) / r, s = (a ? P(n.height) : n.height) / i;
|
|
610
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
611
|
+
x: o,
|
|
612
|
+
y: s
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
var Qe = /* @__PURE__ */ I(0);
|
|
616
|
+
function $e(e) {
|
|
617
|
+
let t = H(e);
|
|
618
|
+
return !Ge() || !t.visualViewport ? Qe : {
|
|
619
|
+
x: t.visualViewport.offsetLeft,
|
|
620
|
+
y: t.visualViewport.offsetTop
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
function et(e, t, n) {
|
|
624
|
+
return t === void 0 && (t = !1), !n || t && n !== H(e) ? !1 : t;
|
|
625
|
+
}
|
|
626
|
+
function Z(e, t, n, r) {
|
|
627
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
628
|
+
let i = e.getBoundingClientRect(), a = Ze(e), o = I(1);
|
|
629
|
+
t && (r ? W(r) && (o = X(r)) : o = X(e));
|
|
630
|
+
let s = et(a, n, r) ? $e(a) : I(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;
|
|
631
|
+
if (a) {
|
|
632
|
+
let e = H(a), t = r && W(r) ? H(r) : r, n = e, i = Ye(n);
|
|
633
|
+
for (; i && r && t !== n;) {
|
|
634
|
+
let e = X(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;
|
|
635
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = H(i), i = Ye(n);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return ve({
|
|
639
|
+
width: u,
|
|
640
|
+
height: d,
|
|
641
|
+
x: c,
|
|
642
|
+
y: l
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
function tt(e, t) {
|
|
646
|
+
let n = Ke(e).scrollLeft;
|
|
647
|
+
return t ? t.left + n : Z(U(e)).left + n;
|
|
648
|
+
}
|
|
649
|
+
function nt(e, t) {
|
|
650
|
+
let n = e.getBoundingClientRect();
|
|
651
|
+
return {
|
|
652
|
+
x: n.left + t.scrollLeft - tt(e, n),
|
|
653
|
+
y: n.top + t.scrollTop
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
function rt(e) {
|
|
657
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = U(r), s = t ? ze(t.floating) : !1;
|
|
658
|
+
if (r === o || s && a) return n;
|
|
659
|
+
let c = {
|
|
660
|
+
scrollLeft: 0,
|
|
661
|
+
scrollTop: 0
|
|
662
|
+
}, l = I(1), u = I(0), d = G(r);
|
|
663
|
+
if ((d || !d && !a) && ((V(r) !== "body" || Le(o)) && (c = Ke(r)), d)) {
|
|
664
|
+
let e = Z(r);
|
|
665
|
+
l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
666
|
+
}
|
|
667
|
+
let f = o && !d && !a ? nt(o, c) : I(0);
|
|
668
|
+
return {
|
|
669
|
+
width: n.width * l.x,
|
|
670
|
+
height: n.height * l.y,
|
|
671
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
672
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function it(e) {
|
|
676
|
+
return Array.from(e.getClientRects());
|
|
677
|
+
}
|
|
678
|
+
function at(e) {
|
|
679
|
+
let t = U(e), n = Ke(e), r = e.ownerDocument.body, i = N(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = N(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + tt(e), s = -n.scrollTop;
|
|
680
|
+
return J(r).direction === "rtl" && (o += N(t.clientWidth, r.clientWidth) - i), {
|
|
681
|
+
width: i,
|
|
682
|
+
height: a,
|
|
683
|
+
x: o,
|
|
684
|
+
y: s
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
var ot = 25;
|
|
688
|
+
function st(e, t) {
|
|
689
|
+
let n = H(e), r = U(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
690
|
+
if (i) {
|
|
691
|
+
a = i.width, o = i.height;
|
|
692
|
+
let e = Ge();
|
|
693
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
694
|
+
}
|
|
695
|
+
let l = tt(r);
|
|
696
|
+
if (l <= 0) {
|
|
697
|
+
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);
|
|
698
|
+
o <= ot && (a -= o);
|
|
699
|
+
} else l <= ot && (a += l);
|
|
700
|
+
return {
|
|
701
|
+
width: a,
|
|
702
|
+
height: o,
|
|
703
|
+
x: s,
|
|
704
|
+
y: c
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
function ct(e, t) {
|
|
708
|
+
let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = G(e) ? X(e) : I(1);
|
|
709
|
+
return {
|
|
710
|
+
width: e.clientWidth * a.x,
|
|
711
|
+
height: e.clientHeight * a.y,
|
|
712
|
+
x: i * a.x,
|
|
713
|
+
y: r * a.y
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function lt(e, t, n) {
|
|
717
|
+
let r;
|
|
718
|
+
if (t === "viewport") r = st(e, n);
|
|
719
|
+
else if (t === "document") r = at(U(e));
|
|
720
|
+
else if (W(t)) r = ct(t, n);
|
|
721
|
+
else {
|
|
722
|
+
let n = $e(e);
|
|
723
|
+
r = {
|
|
724
|
+
x: t.x - n.x,
|
|
725
|
+
y: t.y - n.y,
|
|
726
|
+
width: t.width,
|
|
727
|
+
height: t.height
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
return ve(r);
|
|
731
|
+
}
|
|
732
|
+
function ut(e, t) {
|
|
733
|
+
let n = Y(e);
|
|
734
|
+
return n === t || !W(n) || q(n) ? !1 : J(n).position === "fixed" || ut(n, t);
|
|
735
|
+
}
|
|
736
|
+
function dt(e, t) {
|
|
737
|
+
let n = t.get(e);
|
|
738
|
+
if (n) return n;
|
|
739
|
+
let r = Je(e, [], !1).filter((e) => W(e) && V(e) !== "body"), i = null, a = J(e).position === "fixed", o = a ? Y(e) : e;
|
|
740
|
+
for (; W(o) && !q(o);) {
|
|
741
|
+
let t = J(o), n = Ue(o);
|
|
742
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || Le(o) && !n && ut(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Y(o);
|
|
743
|
+
}
|
|
744
|
+
return t.set(e, r), r;
|
|
745
|
+
}
|
|
746
|
+
function ft(e) {
|
|
747
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? ze(t) ? [] : dt(t, this._c) : [].concat(n), r], o = lt(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
748
|
+
for (let e = 1; e < a.length; e++) {
|
|
749
|
+
let n = lt(t, a[e], i);
|
|
750
|
+
s = N(n.top, s), c = M(n.right, c), l = M(n.bottom, l), u = N(n.left, u);
|
|
751
|
+
}
|
|
752
|
+
return {
|
|
753
|
+
width: c - u,
|
|
754
|
+
height: l - s,
|
|
755
|
+
x: u,
|
|
756
|
+
y: s
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
function pt(e) {
|
|
760
|
+
let { width: t, height: n } = Xe(e);
|
|
761
|
+
return {
|
|
762
|
+
width: t,
|
|
763
|
+
height: n
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
function mt(e, t, n) {
|
|
767
|
+
let r = G(t), i = U(t), a = n === "fixed", o = Z(e, !0, a, t), s = {
|
|
768
|
+
scrollLeft: 0,
|
|
769
|
+
scrollTop: 0
|
|
770
|
+
}, c = I(0);
|
|
771
|
+
function l() {
|
|
772
|
+
c.x = tt(i);
|
|
773
|
+
}
|
|
774
|
+
if (r || !r && !a) if ((V(t) !== "body" || Le(i)) && (s = Ke(t)), r) {
|
|
775
|
+
let e = Z(t, !0, a, t);
|
|
776
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
777
|
+
} else i && l();
|
|
778
|
+
a && !r && i && l();
|
|
779
|
+
let u = i && !r && !a ? nt(i, s) : I(0);
|
|
780
|
+
return {
|
|
781
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
782
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
783
|
+
width: o.width,
|
|
784
|
+
height: o.height
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function ht(e) {
|
|
788
|
+
return J(e).position === "static";
|
|
789
|
+
}
|
|
790
|
+
function gt(e, t) {
|
|
791
|
+
if (!G(e) || J(e).position === "fixed") return null;
|
|
792
|
+
if (t) return t(e);
|
|
793
|
+
let n = e.offsetParent;
|
|
794
|
+
return U(e) === n && (n = n.ownerDocument.body), n;
|
|
795
|
+
}
|
|
796
|
+
function _t(e, t) {
|
|
797
|
+
let n = H(e);
|
|
798
|
+
if (ze(e)) return n;
|
|
799
|
+
if (!G(e)) {
|
|
800
|
+
let t = Y(e);
|
|
801
|
+
for (; t && !q(t);) {
|
|
802
|
+
if (W(t) && !ht(t)) return t;
|
|
803
|
+
t = Y(t);
|
|
804
|
+
}
|
|
805
|
+
return n;
|
|
806
|
+
}
|
|
807
|
+
let r = gt(e, t);
|
|
808
|
+
for (; r && Re(r) && ht(r);) r = gt(r, t);
|
|
809
|
+
return r && q(r) && ht(r) && !Ue(r) ? n : r || We(e) || n;
|
|
810
|
+
}
|
|
811
|
+
var vt = async function(e) {
|
|
812
|
+
let t = this.getOffsetParent || _t, n = this.getDimensions, r = await n(e.floating);
|
|
813
|
+
return {
|
|
814
|
+
reference: mt(e.reference, await t(e.floating), e.strategy),
|
|
815
|
+
floating: {
|
|
816
|
+
x: 0,
|
|
817
|
+
y: 0,
|
|
818
|
+
width: r.width,
|
|
819
|
+
height: r.height
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
function yt(e) {
|
|
824
|
+
return J(e).direction === "rtl";
|
|
825
|
+
}
|
|
826
|
+
var bt = {
|
|
827
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: rt,
|
|
828
|
+
getDocumentElement: U,
|
|
829
|
+
getClippingRect: ft,
|
|
830
|
+
getOffsetParent: _t,
|
|
831
|
+
getElementRects: vt,
|
|
832
|
+
getClientRects: it,
|
|
833
|
+
getDimensions: pt,
|
|
834
|
+
getScale: X,
|
|
835
|
+
isElement: W,
|
|
836
|
+
isRTL: yt
|
|
837
|
+
};
|
|
838
|
+
function xt(e, t) {
|
|
839
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
840
|
+
}
|
|
841
|
+
function St(e, t) {
|
|
842
|
+
let n = null, r, i = U(e);
|
|
843
|
+
function a() {
|
|
844
|
+
var e;
|
|
845
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
846
|
+
}
|
|
847
|
+
function o(s, c) {
|
|
848
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
849
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
850
|
+
if (s || t(), !f || !p) return;
|
|
851
|
+
let m = F(d), h = F(i.clientWidth - (u + f)), g = F(i.clientHeight - (d + p)), _ = F(u), v = {
|
|
852
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
853
|
+
threshold: N(0, M(1, c)) || 1
|
|
854
|
+
}, y = !0;
|
|
855
|
+
function b(t) {
|
|
856
|
+
let n = t[0].intersectionRatio;
|
|
857
|
+
if (n !== c) {
|
|
858
|
+
if (!y) return o();
|
|
859
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
860
|
+
o(!1, 1e-7);
|
|
861
|
+
}, 1e3);
|
|
862
|
+
}
|
|
863
|
+
n === 1 && !xt(l, e.getBoundingClientRect()) && o(), y = !1;
|
|
864
|
+
}
|
|
865
|
+
try {
|
|
866
|
+
n = new IntersectionObserver(b, {
|
|
867
|
+
...v,
|
|
868
|
+
root: i.ownerDocument
|
|
869
|
+
});
|
|
870
|
+
} catch {
|
|
871
|
+
n = new IntersectionObserver(b, v);
|
|
872
|
+
}
|
|
873
|
+
n.observe(e);
|
|
874
|
+
}
|
|
875
|
+
return o(!0), a;
|
|
876
|
+
}
|
|
877
|
+
function Ct(e, t, n, r) {
|
|
878
|
+
r === void 0 && (r = {});
|
|
879
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Ze(e), u = i || a ? [...l ? Je(l) : [], ...t ? Je(t) : []] : [];
|
|
880
|
+
u.forEach((e) => {
|
|
881
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
882
|
+
});
|
|
883
|
+
let d = l && s ? St(l, n) : null, f = -1, p = null;
|
|
884
|
+
o && (p = new ResizeObserver((e) => {
|
|
885
|
+
let [r] = e;
|
|
886
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
887
|
+
var e;
|
|
888
|
+
(e = p) == null || e.observe(t);
|
|
889
|
+
})), n();
|
|
890
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
891
|
+
let m, h = c ? Z(e) : null;
|
|
892
|
+
c && g();
|
|
893
|
+
function g() {
|
|
894
|
+
let t = Z(e);
|
|
895
|
+
h && !xt(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
896
|
+
}
|
|
897
|
+
return n(), () => {
|
|
898
|
+
var e;
|
|
899
|
+
u.forEach((e) => {
|
|
900
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
901
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
var wt = Ae, Tt = je, Et = we, Dt = Ne, Ot = De, kt = Ce, At = Me, jt = (e, t, n) => {
|
|
905
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
906
|
+
platform: bt,
|
|
907
|
+
...n
|
|
908
|
+
}, a = {
|
|
909
|
+
...i.platform,
|
|
910
|
+
_c: r
|
|
911
|
+
};
|
|
912
|
+
return Se(e, t, {
|
|
913
|
+
...i,
|
|
914
|
+
platform: a
|
|
915
|
+
});
|
|
916
|
+
}, Mt = typeof document < "u" ? ee : function() {};
|
|
917
|
+
function Nt(e, t) {
|
|
918
|
+
if (e === t) return !0;
|
|
919
|
+
if (typeof e != typeof t) return !1;
|
|
920
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
921
|
+
let n, r, i;
|
|
922
|
+
if (e && t && typeof e == "object") {
|
|
923
|
+
if (Array.isArray(e)) {
|
|
924
|
+
if (n = e.length, n !== t.length) return !1;
|
|
925
|
+
for (r = n; r-- !== 0;) if (!Nt(e[r], t[r])) return !1;
|
|
926
|
+
return !0;
|
|
927
|
+
}
|
|
928
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
929
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
930
|
+
for (r = n; r-- !== 0;) {
|
|
931
|
+
let n = i[r];
|
|
932
|
+
if (!(n === "_owner" && e.$$typeof) && !Nt(e[n], t[n])) return !1;
|
|
933
|
+
}
|
|
934
|
+
return !0;
|
|
935
|
+
}
|
|
936
|
+
return e !== e && t !== t;
|
|
937
|
+
}
|
|
938
|
+
function Pt(e) {
|
|
939
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
940
|
+
}
|
|
941
|
+
function Ft(e, t) {
|
|
942
|
+
let n = Pt(e);
|
|
943
|
+
return Math.round(t * n) / n;
|
|
944
|
+
}
|
|
945
|
+
function It(e) {
|
|
946
|
+
let t = T.useRef(e);
|
|
947
|
+
return Mt(() => {
|
|
948
|
+
t.current = e;
|
|
949
|
+
}), t;
|
|
950
|
+
}
|
|
951
|
+
function Lt(e) {
|
|
952
|
+
e === void 0 && (e = {});
|
|
953
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: s = !0, whileElementsMounted: c, open: l } = e, [u, d] = T.useState({
|
|
954
|
+
x: 0,
|
|
955
|
+
y: 0,
|
|
956
|
+
strategy: n,
|
|
957
|
+
placement: t,
|
|
958
|
+
middlewareData: {},
|
|
959
|
+
isPositioned: !1
|
|
960
|
+
}), [f, p] = T.useState(r);
|
|
961
|
+
Nt(f, r) || p(r);
|
|
962
|
+
let [m, h] = T.useState(null), [g, _] = T.useState(null), v = T.useCallback((e) => {
|
|
963
|
+
e !== S.current && (S.current = e, h(e));
|
|
964
|
+
}, []), y = T.useCallback((e) => {
|
|
965
|
+
e !== C.current && (C.current = e, _(e));
|
|
966
|
+
}, []), b = a || m, x = o || g, S = T.useRef(null), C = T.useRef(null), w = T.useRef(u), ee = c != null, E = It(c), D = It(i), O = It(l), A = T.useCallback(() => {
|
|
967
|
+
if (!S.current || !C.current) return;
|
|
968
|
+
let e = {
|
|
969
|
+
placement: t,
|
|
970
|
+
strategy: n,
|
|
971
|
+
middleware: f
|
|
972
|
+
};
|
|
973
|
+
D.current && (e.platform = D.current), jt(S.current, C.current, e).then((e) => {
|
|
974
|
+
let t = {
|
|
975
|
+
...e,
|
|
976
|
+
isPositioned: O.current !== !1
|
|
977
|
+
};
|
|
978
|
+
j.current && !Nt(w.current, t) && (w.current = t, k.flushSync(() => {
|
|
979
|
+
d(t);
|
|
980
|
+
}));
|
|
981
|
+
});
|
|
982
|
+
}, [
|
|
983
|
+
f,
|
|
984
|
+
t,
|
|
985
|
+
n,
|
|
986
|
+
D,
|
|
987
|
+
O
|
|
988
|
+
]);
|
|
989
|
+
Mt(() => {
|
|
990
|
+
l === !1 && w.current.isPositioned && (w.current.isPositioned = !1, d((e) => ({
|
|
991
|
+
...e,
|
|
992
|
+
isPositioned: !1
|
|
993
|
+
})));
|
|
994
|
+
}, [l]);
|
|
995
|
+
let j = T.useRef(!1);
|
|
996
|
+
Mt(() => (j.current = !0, () => {
|
|
997
|
+
j.current = !1;
|
|
998
|
+
}), []), Mt(() => {
|
|
999
|
+
if (b && (S.current = b), x && (C.current = x), b && x) {
|
|
1000
|
+
if (E.current) return E.current(b, x, A);
|
|
1001
|
+
A();
|
|
1002
|
+
}
|
|
1003
|
+
}, [
|
|
1004
|
+
b,
|
|
1005
|
+
x,
|
|
1006
|
+
A,
|
|
1007
|
+
E,
|
|
1008
|
+
ee
|
|
1009
|
+
]);
|
|
1010
|
+
let M = T.useMemo(() => ({
|
|
1011
|
+
reference: S,
|
|
1012
|
+
floating: C,
|
|
1013
|
+
setReference: v,
|
|
1014
|
+
setFloating: y
|
|
1015
|
+
}), [v, y]), N = T.useMemo(() => ({
|
|
1016
|
+
reference: b,
|
|
1017
|
+
floating: x
|
|
1018
|
+
}), [b, x]), P = T.useMemo(() => {
|
|
1019
|
+
let e = {
|
|
1020
|
+
position: n,
|
|
1021
|
+
left: 0,
|
|
1022
|
+
top: 0
|
|
1023
|
+
};
|
|
1024
|
+
if (!N.floating) return e;
|
|
1025
|
+
let t = Ft(N.floating, u.x), r = Ft(N.floating, u.y);
|
|
1026
|
+
return s ? {
|
|
1027
|
+
...e,
|
|
1028
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
1029
|
+
...Pt(N.floating) >= 1.5 && { willChange: "transform" }
|
|
1030
|
+
} : {
|
|
1031
|
+
position: n,
|
|
1032
|
+
left: t,
|
|
1033
|
+
top: r
|
|
1034
|
+
};
|
|
1035
|
+
}, [
|
|
1036
|
+
n,
|
|
1037
|
+
s,
|
|
1038
|
+
N.floating,
|
|
1039
|
+
u.x,
|
|
1040
|
+
u.y
|
|
1041
|
+
]);
|
|
1042
|
+
return T.useMemo(() => ({
|
|
1043
|
+
...u,
|
|
1044
|
+
update: A,
|
|
1045
|
+
refs: M,
|
|
1046
|
+
elements: N,
|
|
1047
|
+
floatingStyles: P
|
|
1048
|
+
}), [
|
|
1049
|
+
u,
|
|
1050
|
+
A,
|
|
1051
|
+
M,
|
|
1052
|
+
N,
|
|
1053
|
+
P
|
|
1054
|
+
]);
|
|
1055
|
+
}
|
|
1056
|
+
var Rt = (e) => {
|
|
1057
|
+
function t(e) {
|
|
1058
|
+
return {}.hasOwnProperty.call(e, "current");
|
|
1059
|
+
}
|
|
1060
|
+
return {
|
|
1061
|
+
name: "arrow",
|
|
1062
|
+
options: e,
|
|
1063
|
+
fn(n) {
|
|
1064
|
+
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
1065
|
+
return r && t(r) ? r.current == null ? {} : kt({
|
|
1066
|
+
element: r.current,
|
|
1067
|
+
padding: i
|
|
1068
|
+
}).fn(n) : r ? kt({
|
|
1069
|
+
element: r,
|
|
1070
|
+
padding: i
|
|
1071
|
+
}).fn(n) : {};
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
}, zt = (e, t) => {
|
|
1075
|
+
let n = wt(e);
|
|
1076
|
+
return {
|
|
1077
|
+
name: n.name,
|
|
1078
|
+
fn: n.fn,
|
|
1079
|
+
options: [e, t]
|
|
1080
|
+
};
|
|
1081
|
+
}, Bt = (e, t) => {
|
|
1082
|
+
let n = Tt(e);
|
|
1083
|
+
return {
|
|
1084
|
+
name: n.name,
|
|
1085
|
+
fn: n.fn,
|
|
1086
|
+
options: [e, t]
|
|
1087
|
+
};
|
|
1088
|
+
}, Vt = (e, t) => ({
|
|
1089
|
+
fn: At(e).fn,
|
|
1090
|
+
options: [e, t]
|
|
1091
|
+
}), Ht = (e, t) => {
|
|
1092
|
+
let n = Et(e);
|
|
1093
|
+
return {
|
|
1094
|
+
name: n.name,
|
|
1095
|
+
fn: n.fn,
|
|
1096
|
+
options: [e, t]
|
|
1097
|
+
};
|
|
1098
|
+
}, Ut = (e, t) => {
|
|
1099
|
+
let n = Dt(e);
|
|
1100
|
+
return {
|
|
1101
|
+
name: n.name,
|
|
1102
|
+
fn: n.fn,
|
|
1103
|
+
options: [e, t]
|
|
1104
|
+
};
|
|
1105
|
+
}, Wt = (e, t) => {
|
|
1106
|
+
let n = Ot(e);
|
|
1107
|
+
return {
|
|
1108
|
+
name: n.name,
|
|
1109
|
+
fn: n.fn,
|
|
1110
|
+
options: [e, t]
|
|
1111
|
+
};
|
|
1112
|
+
}, Gt = (e, t) => {
|
|
1113
|
+
let n = Rt(e);
|
|
1114
|
+
return {
|
|
1115
|
+
name: n.name,
|
|
1116
|
+
fn: n.fn,
|
|
1117
|
+
options: [e, t]
|
|
1118
|
+
};
|
|
1119
|
+
}, Kt = "Arrow", qt = T.forwardRef((e, t) => {
|
|
1120
|
+
let { children: n, width: r = 10, height: i = 5, ...a } = e;
|
|
1121
|
+
return /* @__PURE__ */ D(h.svg, {
|
|
1122
|
+
...a,
|
|
1123
|
+
ref: t,
|
|
1124
|
+
width: r,
|
|
1125
|
+
height: i,
|
|
1126
|
+
viewBox: "0 0 30 10",
|
|
1127
|
+
preserveAspectRatio: "none",
|
|
1128
|
+
children: e.asChild ? n : /* @__PURE__ */ D("polygon", { points: "0,0 30,0 15,10" })
|
|
1129
|
+
});
|
|
1130
|
+
});
|
|
1131
|
+
qt.displayName = Kt;
|
|
1132
|
+
var Jt = qt, Yt = "Popper", [Xt, Zt] = v(Yt), [Qt, $t] = Xt(Yt), en = (e) => {
|
|
1133
|
+
let { __scopePopper: t, children: n } = e, [r, i] = T.useState(null);
|
|
1134
|
+
return /* @__PURE__ */ D(Qt, {
|
|
1135
|
+
scope: t,
|
|
1136
|
+
anchor: r,
|
|
1137
|
+
onAnchorChange: i,
|
|
1138
|
+
children: n
|
|
1139
|
+
});
|
|
1140
|
+
};
|
|
1141
|
+
en.displayName = Yt;
|
|
1142
|
+
var tn = "PopperAnchor", nn = T.forwardRef((e, t) => {
|
|
1143
|
+
let { __scopePopper: n, virtualRef: r, ...i } = e, a = $t(tn, n), o = T.useRef(null), s = l(t, o), c = T.useRef(null);
|
|
1144
|
+
return T.useEffect(() => {
|
|
1145
|
+
let e = c.current;
|
|
1146
|
+
c.current = r?.current || o.current, e !== c.current && a.onAnchorChange(c.current);
|
|
1147
|
+
}), r ? null : /* @__PURE__ */ D(h.div, {
|
|
1148
|
+
...i,
|
|
1149
|
+
ref: s
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
nn.displayName = tn;
|
|
1153
|
+
var rn = "PopperContent", [an, on] = Xt(rn), sn = T.forwardRef((e, t) => {
|
|
1154
|
+
let { __scopePopper: n, side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, arrowPadding: s = 0, avoidCollisions: c = !0, collisionBoundary: u = [], collisionPadding: d = 0, sticky: p = "partial", hideWhenDetached: m = !1, updatePositionStrategy: g = "optimized", onPlaced: _, ...v } = e, y = $t(rn, n), [b, x] = T.useState(null), C = l(t, (e) => x(e)), [w, ee] = T.useState(null), E = A(w), O = E?.width ?? 0, k = E?.height ?? 0, j = r + (a === "center" ? "" : "-" + a), M = typeof d == "number" ? d : {
|
|
1155
|
+
top: 0,
|
|
1156
|
+
right: 0,
|
|
1157
|
+
bottom: 0,
|
|
1158
|
+
left: 0,
|
|
1159
|
+
...d
|
|
1160
|
+
}, N = Array.isArray(u) ? u : [u], P = N.length > 0, F = {
|
|
1161
|
+
padding: M,
|
|
1162
|
+
boundary: N.filter(dn),
|
|
1163
|
+
altBoundary: P
|
|
1164
|
+
}, { refs: I, floatingStyles: te, placement: ne, isPositioned: L, middlewareData: R } = Lt({
|
|
1165
|
+
strategy: "fixed",
|
|
1166
|
+
placement: j,
|
|
1167
|
+
whileElementsMounted: (...e) => Ct(...e, { animationFrame: g === "always" }),
|
|
1168
|
+
elements: { reference: y.anchor },
|
|
1169
|
+
middleware: [
|
|
1170
|
+
zt({
|
|
1171
|
+
mainAxis: i + k,
|
|
1172
|
+
alignmentAxis: o
|
|
1173
|
+
}),
|
|
1174
|
+
c && Bt({
|
|
1175
|
+
mainAxis: !0,
|
|
1176
|
+
crossAxis: !1,
|
|
1177
|
+
limiter: p === "partial" ? Vt() : void 0,
|
|
1178
|
+
...F
|
|
1179
|
+
}),
|
|
1180
|
+
c && Ht({ ...F }),
|
|
1181
|
+
Ut({
|
|
1182
|
+
...F,
|
|
1183
|
+
apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
1184
|
+
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
1185
|
+
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`);
|
|
1186
|
+
}
|
|
1187
|
+
}),
|
|
1188
|
+
w && Gt({
|
|
1189
|
+
element: w,
|
|
1190
|
+
padding: s
|
|
1191
|
+
}),
|
|
1192
|
+
fn({
|
|
1193
|
+
arrowWidth: O,
|
|
1194
|
+
arrowHeight: k
|
|
1195
|
+
}),
|
|
1196
|
+
m && Wt({
|
|
1197
|
+
strategy: "referenceHidden",
|
|
1198
|
+
...F
|
|
1199
|
+
})
|
|
1200
|
+
]
|
|
1201
|
+
}), [z, re] = pn(ne), ie = S(_);
|
|
1202
|
+
f(() => {
|
|
1203
|
+
L && ie?.();
|
|
1204
|
+
}, [L, ie]);
|
|
1205
|
+
let B = R.arrow?.x, ae = R.arrow?.y, oe = R.arrow?.centerOffset !== 0, [se, ce] = T.useState();
|
|
1206
|
+
return f(() => {
|
|
1207
|
+
b && ce(window.getComputedStyle(b).zIndex);
|
|
1208
|
+
}, [b]), /* @__PURE__ */ D("div", {
|
|
1209
|
+
ref: I.setFloating,
|
|
1210
|
+
"data-radix-popper-content-wrapper": "",
|
|
1211
|
+
style: {
|
|
1212
|
+
...te,
|
|
1213
|
+
transform: L ? te.transform : "translate(0, -200%)",
|
|
1214
|
+
minWidth: "max-content",
|
|
1215
|
+
zIndex: se,
|
|
1216
|
+
"--radix-popper-transform-origin": [R.transformOrigin?.x, R.transformOrigin?.y].join(" "),
|
|
1217
|
+
...R.hide?.referenceHidden && {
|
|
1218
|
+
visibility: "hidden",
|
|
1219
|
+
pointerEvents: "none"
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
dir: e.dir,
|
|
1223
|
+
children: /* @__PURE__ */ D(an, {
|
|
1224
|
+
scope: n,
|
|
1225
|
+
placedSide: z,
|
|
1226
|
+
onArrowChange: ee,
|
|
1227
|
+
arrowX: B,
|
|
1228
|
+
arrowY: ae,
|
|
1229
|
+
shouldHideArrow: oe,
|
|
1230
|
+
children: /* @__PURE__ */ D(h.div, {
|
|
1231
|
+
"data-side": z,
|
|
1232
|
+
"data-align": re,
|
|
1233
|
+
...v,
|
|
1234
|
+
ref: C,
|
|
1235
|
+
style: {
|
|
1236
|
+
...v.style,
|
|
1237
|
+
animation: L ? void 0 : "none"
|
|
1238
|
+
}
|
|
1239
|
+
})
|
|
1240
|
+
})
|
|
1241
|
+
});
|
|
1242
|
+
});
|
|
1243
|
+
sn.displayName = rn;
|
|
1244
|
+
var cn = "PopperArrow", ln = {
|
|
1245
|
+
top: "bottom",
|
|
1246
|
+
right: "left",
|
|
1247
|
+
bottom: "top",
|
|
1248
|
+
left: "right"
|
|
1249
|
+
}, un = T.forwardRef(function(e, t) {
|
|
1250
|
+
let { __scopePopper: n, ...r } = e, i = on(cn, n), a = ln[i.placedSide];
|
|
1251
|
+
return /* @__PURE__ */ D("span", {
|
|
1252
|
+
ref: i.onArrowChange,
|
|
1253
|
+
style: {
|
|
1254
|
+
position: "absolute",
|
|
1255
|
+
left: i.arrowX,
|
|
1256
|
+
top: i.arrowY,
|
|
1257
|
+
[a]: 0,
|
|
1258
|
+
transformOrigin: {
|
|
1259
|
+
top: "",
|
|
1260
|
+
right: "0 0",
|
|
1261
|
+
bottom: "center 0",
|
|
1262
|
+
left: "100% 0"
|
|
1263
|
+
}[i.placedSide],
|
|
1264
|
+
transform: {
|
|
1265
|
+
top: "translateY(100%)",
|
|
1266
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1267
|
+
bottom: "rotate(180deg)",
|
|
1268
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1269
|
+
}[i.placedSide],
|
|
1270
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1271
|
+
},
|
|
1272
|
+
children: /* @__PURE__ */ D(Jt, {
|
|
1273
|
+
...r,
|
|
1274
|
+
ref: t,
|
|
1275
|
+
style: {
|
|
1276
|
+
...r.style,
|
|
1277
|
+
display: "block"
|
|
1278
|
+
}
|
|
1279
|
+
})
|
|
1280
|
+
});
|
|
1281
|
+
});
|
|
1282
|
+
un.displayName = cn;
|
|
1283
|
+
function dn(e) {
|
|
1284
|
+
return e !== null;
|
|
1285
|
+
}
|
|
1286
|
+
var fn = (e) => ({
|
|
1287
|
+
name: "transformOrigin",
|
|
1288
|
+
options: e,
|
|
1289
|
+
fn(t) {
|
|
1290
|
+
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] = pn(n), u = {
|
|
1291
|
+
start: "0%",
|
|
1292
|
+
center: "50%",
|
|
1293
|
+
end: "100%"
|
|
1294
|
+
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
|
|
1295
|
+
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: {
|
|
1296
|
+
x: p,
|
|
1297
|
+
y: m
|
|
1298
|
+
} };
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
function pn(e) {
|
|
1302
|
+
let [t, n = "center"] = e.split("-");
|
|
1303
|
+
return [t, n];
|
|
1304
|
+
}
|
|
1305
|
+
var mn = en, hn = nn, gn = sn, _n = un, vn = "Popover", [yn, bn] = v(vn, [Zt]), xn = Zt(), [Sn, Q] = yn(vn), Cn = (e) => {
|
|
1306
|
+
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = xn(t), c = T.useRef(null), [l, u] = T.useState(!1), [f, p] = w({
|
|
1307
|
+
prop: r,
|
|
1308
|
+
defaultProp: i ?? !1,
|
|
1309
|
+
onChange: a,
|
|
1310
|
+
caller: vn
|
|
1311
|
+
});
|
|
1312
|
+
return /* @__PURE__ */ D(mn, {
|
|
1313
|
+
...s,
|
|
1314
|
+
children: /* @__PURE__ */ D(Sn, {
|
|
1315
|
+
scope: t,
|
|
1316
|
+
contentId: d(),
|
|
1317
|
+
triggerRef: c,
|
|
1318
|
+
open: f,
|
|
1319
|
+
onOpenChange: p,
|
|
1320
|
+
onOpenToggle: T.useCallback(() => p((e) => !e), [p]),
|
|
1321
|
+
hasCustomAnchor: l,
|
|
1322
|
+
onCustomAnchorAdd: T.useCallback(() => u(!0), []),
|
|
1323
|
+
onCustomAnchorRemove: T.useCallback(() => u(!1), []),
|
|
1324
|
+
modal: o,
|
|
1325
|
+
children: n
|
|
1326
|
+
})
|
|
1327
|
+
});
|
|
1328
|
+
};
|
|
1329
|
+
Cn.displayName = vn;
|
|
1330
|
+
var wn = "PopoverAnchor", Tn = T.forwardRef((e, t) => {
|
|
1331
|
+
let { __scopePopover: n, ...r } = e, i = Q(wn, n), a = xn(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
1332
|
+
return T.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ D(hn, {
|
|
1333
|
+
...a,
|
|
1334
|
+
...r,
|
|
1335
|
+
ref: t
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
Tn.displayName = wn;
|
|
1339
|
+
var En = "PopoverTrigger", Dn = T.forwardRef((e, t) => {
|
|
1340
|
+
let { __scopePopover: n, ...r } = e, i = Q(En, n), a = xn(n), o = l(t, i.triggerRef), s = /* @__PURE__ */ D(h.button, {
|
|
1341
|
+
type: "button",
|
|
1342
|
+
"aria-haspopup": "dialog",
|
|
1343
|
+
"aria-expanded": i.open,
|
|
1344
|
+
"aria-controls": i.contentId,
|
|
1345
|
+
"data-state": Vn(i.open),
|
|
1346
|
+
...r,
|
|
1347
|
+
ref: o,
|
|
1348
|
+
onClick: p(e.onClick, i.onOpenToggle)
|
|
1349
|
+
});
|
|
1350
|
+
return i.hasCustomAnchor ? s : /* @__PURE__ */ D(hn, {
|
|
1351
|
+
asChild: !0,
|
|
1352
|
+
...a,
|
|
1353
|
+
children: s
|
|
1354
|
+
});
|
|
1355
|
+
});
|
|
1356
|
+
Dn.displayName = En;
|
|
1357
|
+
var On = "PopoverPortal", [kn, An] = yn(On, { forceMount: void 0 }), jn = (e) => {
|
|
1358
|
+
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = Q(On, t);
|
|
1359
|
+
return /* @__PURE__ */ D(kn, {
|
|
1360
|
+
scope: t,
|
|
1361
|
+
forceMount: n,
|
|
1362
|
+
children: /* @__PURE__ */ D(_, {
|
|
1363
|
+
present: n || a.open,
|
|
1364
|
+
children: /* @__PURE__ */ D(g, {
|
|
1365
|
+
asChild: !0,
|
|
1366
|
+
container: i,
|
|
1367
|
+
children: r
|
|
1368
|
+
})
|
|
1369
|
+
})
|
|
1370
|
+
});
|
|
1371
|
+
};
|
|
1372
|
+
jn.displayName = On;
|
|
1373
|
+
var $ = "PopoverContent", Mn = T.forwardRef((e, t) => {
|
|
1374
|
+
let n = An($, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = Q($, e.__scopePopover);
|
|
1375
|
+
return /* @__PURE__ */ D(_, {
|
|
1376
|
+
present: r || a.open,
|
|
1377
|
+
children: a.modal ? /* @__PURE__ */ D(Pn, {
|
|
1378
|
+
...i,
|
|
1379
|
+
ref: t
|
|
1380
|
+
}) : /* @__PURE__ */ D(Fn, {
|
|
1381
|
+
...i,
|
|
1382
|
+
ref: t
|
|
1383
|
+
})
|
|
1384
|
+
});
|
|
1385
|
+
});
|
|
1386
|
+
Mn.displayName = $;
|
|
1387
|
+
var Nn = m("PopoverContent.RemoveScroll"), Pn = T.forwardRef((e, t) => {
|
|
1388
|
+
let n = Q($, e.__scopePopover), r = T.useRef(null), i = l(t, r), a = T.useRef(!1);
|
|
1389
|
+
return T.useEffect(() => {
|
|
1390
|
+
let e = r.current;
|
|
1391
|
+
if (e) return C(e);
|
|
1392
|
+
}, []), /* @__PURE__ */ D(y, {
|
|
1393
|
+
as: Nn,
|
|
1394
|
+
allowPinchZoom: !0,
|
|
1395
|
+
children: /* @__PURE__ */ D(In, {
|
|
1396
|
+
...e,
|
|
1397
|
+
ref: i,
|
|
1398
|
+
trapFocus: n.open,
|
|
1399
|
+
disableOutsidePointerEvents: !0,
|
|
1400
|
+
onCloseAutoFocus: p(e.onCloseAutoFocus, (e) => {
|
|
1401
|
+
e.preventDefault(), a.current || n.triggerRef.current?.focus();
|
|
1402
|
+
}),
|
|
1403
|
+
onPointerDownOutside: p(e.onPointerDownOutside, (e) => {
|
|
1404
|
+
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
|
|
1405
|
+
a.current = t.button === 2 || n;
|
|
1406
|
+
}, { checkForDefaultPrevented: !1 }),
|
|
1407
|
+
onFocusOutside: p(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
1408
|
+
})
|
|
1409
|
+
});
|
|
1410
|
+
}), Fn = T.forwardRef((e, t) => {
|
|
1411
|
+
let n = Q($, e.__scopePopover), r = T.useRef(!1), i = T.useRef(!1);
|
|
1412
|
+
return /* @__PURE__ */ D(In, {
|
|
1413
|
+
...e,
|
|
1414
|
+
ref: t,
|
|
1415
|
+
trapFocus: !1,
|
|
1416
|
+
disableOutsidePointerEvents: !1,
|
|
1417
|
+
onCloseAutoFocus: (t) => {
|
|
1418
|
+
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
|
|
1419
|
+
},
|
|
1420
|
+
onInteractOutside: (t) => {
|
|
1421
|
+
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
|
|
1422
|
+
let a = t.target;
|
|
1423
|
+
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
}), In = T.forwardRef((e, t) => {
|
|
1427
|
+
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, disableOutsidePointerEvents: o, onEscapeKeyDown: s, onPointerDownOutside: c, onFocusOutside: l, onInteractOutside: d, ...f } = e, p = Q($, n), m = xn(n);
|
|
1428
|
+
return x(), /* @__PURE__ */ D(u, {
|
|
1429
|
+
asChild: !0,
|
|
1430
|
+
loop: !0,
|
|
1431
|
+
trapped: r,
|
|
1432
|
+
onMountAutoFocus: i,
|
|
1433
|
+
onUnmountAutoFocus: a,
|
|
1434
|
+
children: /* @__PURE__ */ D(b, {
|
|
1435
|
+
asChild: !0,
|
|
1436
|
+
disableOutsidePointerEvents: o,
|
|
1437
|
+
onInteractOutside: d,
|
|
1438
|
+
onEscapeKeyDown: s,
|
|
1439
|
+
onPointerDownOutside: c,
|
|
1440
|
+
onFocusOutside: l,
|
|
1441
|
+
onDismiss: () => p.onOpenChange(!1),
|
|
1442
|
+
children: /* @__PURE__ */ D(gn, {
|
|
1443
|
+
"data-state": Vn(p.open),
|
|
1444
|
+
role: "dialog",
|
|
1445
|
+
id: p.contentId,
|
|
1446
|
+
...m,
|
|
1447
|
+
...f,
|
|
1448
|
+
ref: t,
|
|
1449
|
+
style: {
|
|
1450
|
+
...f.style,
|
|
1451
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1452
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
1453
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
1454
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1455
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1456
|
+
}
|
|
1457
|
+
})
|
|
1458
|
+
})
|
|
1459
|
+
});
|
|
1460
|
+
}), Ln = "PopoverClose", Rn = T.forwardRef((e, t) => {
|
|
1461
|
+
let { __scopePopover: n, ...r } = e, i = Q(Ln, n);
|
|
1462
|
+
return /* @__PURE__ */ D(h.button, {
|
|
1463
|
+
type: "button",
|
|
1464
|
+
...r,
|
|
1465
|
+
ref: t,
|
|
1466
|
+
onClick: p(e.onClick, () => i.onOpenChange(!1))
|
|
1467
|
+
});
|
|
1468
|
+
});
|
|
1469
|
+
Rn.displayName = Ln;
|
|
1470
|
+
var zn = "PopoverArrow", Bn = T.forwardRef((e, t) => {
|
|
1471
|
+
let { __scopePopover: n, ...r } = e;
|
|
1472
|
+
return /* @__PURE__ */ D(_n, {
|
|
1473
|
+
...xn(n),
|
|
1474
|
+
...r,
|
|
1475
|
+
ref: t
|
|
1476
|
+
});
|
|
1477
|
+
});
|
|
1478
|
+
Bn.displayName = zn;
|
|
1479
|
+
function Vn(e) {
|
|
1480
|
+
return e ? "open" : "closed";
|
|
1481
|
+
}
|
|
1482
|
+
var Hn = Cn, Un = Tn, Wn = Dn, Gn = jn, Kn = Mn, qn = {
|
|
1483
|
+
anchor: "gQIKVa_anchor",
|
|
1484
|
+
check: "gQIKVa_check",
|
|
1485
|
+
container: "gQIKVa_container",
|
|
1486
|
+
radio: "gQIKVa_radio",
|
|
1487
|
+
radioInput: "gQIKVa_radioInput"
|
|
1488
|
+
};
|
|
1489
|
+
//#endregion
|
|
1490
|
+
//#region lib/components/PrefPanel/index.tsx
|
|
1491
|
+
function Jn({ children: e, id: t, ...i }) {
|
|
1492
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("input", {
|
|
1493
|
+
type: "radio",
|
|
1494
|
+
id: t,
|
|
1495
|
+
className: n(qn.radioInput, "sr-only"),
|
|
1496
|
+
...i
|
|
1497
|
+
}), /* @__PURE__ */ O("label", {
|
|
1498
|
+
htmlFor: t,
|
|
1499
|
+
className: qn.radio,
|
|
1500
|
+
children: [e, /* @__PURE__ */ D(r, { className: qn.check })]
|
|
1501
|
+
})] });
|
|
1502
|
+
}
|
|
1503
|
+
function Yn() {
|
|
1504
|
+
let { theme: n, systemTheme: r, setTheme: l } = t(), u = e();
|
|
1505
|
+
return /* @__PURE__ */ O(Hn, { children: [/* @__PURE__ */ D(Wn, {
|
|
1506
|
+
asChild: !0,
|
|
1507
|
+
children: /* @__PURE__ */ O(c, {
|
|
1508
|
+
variant: "transparent",
|
|
1509
|
+
"aria-label": "Preferences",
|
|
1510
|
+
children: [/* @__PURE__ */ D(o, {}), /* @__PURE__ */ D(Un, { className: qn.anchor })]
|
|
1511
|
+
})
|
|
1512
|
+
}), /* @__PURE__ */ D(Gn, { children: /* @__PURE__ */ D(Kn, {
|
|
1513
|
+
sideOffset: 8,
|
|
1514
|
+
hideWhenDetached: !0,
|
|
1515
|
+
className: qn.container,
|
|
1516
|
+
children: u && /* @__PURE__ */ O(E, { children: [
|
|
1517
|
+
/* @__PURE__ */ D("span", { children: "Appearance" }),
|
|
1518
|
+
/* @__PURE__ */ O(Jn, {
|
|
1519
|
+
id: "system",
|
|
1520
|
+
name: "theme",
|
|
1521
|
+
checked: n === "system",
|
|
1522
|
+
onChange: () => l("system"),
|
|
1523
|
+
children: [
|
|
1524
|
+
/* @__PURE__ */ D(i, {}),
|
|
1525
|
+
"Auto (",
|
|
1526
|
+
r,
|
|
1527
|
+
")"
|
|
1528
|
+
]
|
|
1529
|
+
}),
|
|
1530
|
+
/* @__PURE__ */ O(Jn, {
|
|
1531
|
+
id: "light",
|
|
1532
|
+
name: "theme",
|
|
1533
|
+
checked: n === "light",
|
|
1534
|
+
onChange: () => l("light"),
|
|
1535
|
+
children: [/* @__PURE__ */ D(s, {}), "Light"]
|
|
1536
|
+
}),
|
|
1537
|
+
/* @__PURE__ */ O(Jn, {
|
|
1538
|
+
id: "dark",
|
|
1539
|
+
name: "theme",
|
|
1540
|
+
checked: n === "dark",
|
|
1541
|
+
onChange: () => l("dark"),
|
|
1542
|
+
children: [/* @__PURE__ */ D(a, {}), "Dark"]
|
|
1543
|
+
})
|
|
1544
|
+
] })
|
|
1545
|
+
}) })] });
|
|
1546
|
+
}
|
|
1547
|
+
//#endregion
|
|
1548
|
+
export { Jn as n, Yn as t };
|