@rinzai/zen 0.1.8 → 0.1.9
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/zen.css +1 -1
- package/dist/zen.js +595 -563
- package/package.json +24 -23
package/dist/zen.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as b, jsxs as W, Fragment as
|
|
1
|
+
import { jsx as b, jsxs as W, Fragment as Ve } from "react/jsx-runtime";
|
|
2
2
|
import * as C from "react";
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
import * as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
if ((o == null ? void 0 : o.variants) == null) return
|
|
9
|
-
const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((
|
|
10
|
-
const u = t == null ? void 0 : t[
|
|
3
|
+
import { useLayoutEffect as ot, useEffect as re, useState as de, useId as it, useMemo as ve, useRef as Ee } from "react";
|
|
4
|
+
import * as st from "react-dom";
|
|
5
|
+
import { createPortal as rt, flushSync as lt } from "react-dom";
|
|
6
|
+
const M = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + M(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [i, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + i + "-" + s : typeof s == "boolean" && s ? n + " " + i : n, "") : o, ""), Ae = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, We = (e, o) => (t) => {
|
|
7
|
+
var a;
|
|
8
|
+
if ((o == null ? void 0 : o.variants) == null) return M(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
9
|
+
const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((c) => {
|
|
10
|
+
const u = t == null ? void 0 : t[c], d = i == null ? void 0 : i[c];
|
|
11
11
|
if (u === null) return null;
|
|
12
|
-
const
|
|
13
|
-
return n[
|
|
12
|
+
const h = Ae(u) || Ae(d);
|
|
13
|
+
return n[c][h];
|
|
14
14
|
}), r = t && Object.entries(t).reduce(
|
|
15
|
-
(
|
|
15
|
+
(c, [u, d]) => (d === void 0 || (c[u] = d), c),
|
|
16
16
|
{}
|
|
17
|
-
), l = (
|
|
18
|
-
(
|
|
17
|
+
), l = (a = o == null ? void 0 : o.compoundVariants) == null ? void 0 : a.reduce(
|
|
18
|
+
(c, { class: u, className: d, ...h }) => Object.entries(h).every(
|
|
19
19
|
([f, g]) => Array.isArray(g) ? g.includes(
|
|
20
20
|
{
|
|
21
21
|
...i,
|
|
@@ -25,22 +25,22 @@ const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "
|
|
|
25
25
|
...i,
|
|
26
26
|
...r
|
|
27
27
|
}[f] === g
|
|
28
|
-
) ? [...
|
|
28
|
+
) ? [...c, u, d] : c,
|
|
29
29
|
[]
|
|
30
30
|
);
|
|
31
|
-
return
|
|
31
|
+
return M(e, s, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
32
32
|
};
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ b("span", { ...t, className:
|
|
33
|
+
function Be({ variant: e, className: o, ...t }) {
|
|
34
|
+
return /* @__PURE__ */ b("span", { ...t, className: ct({ variant: e, className: o }) });
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const ct = We(
|
|
37
37
|
"zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
|
|
38
38
|
{
|
|
39
39
|
variants: {
|
|
40
40
|
variant: {
|
|
41
|
-
default: "border-transparent bg-primary text-primary-foreground shadow",
|
|
41
|
+
default: "border-transparent bg-primary text-primary-foreground shadow-sm",
|
|
42
42
|
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
43
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
|
|
43
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow-sm",
|
|
44
44
|
outline: "text-foreground"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
@@ -49,18 +49,18 @@ const rt = Ve(
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */ b("button", { className:
|
|
52
|
+
function at({ className: e, variant: o, size: t, ...n }) {
|
|
53
|
+
return /* @__PURE__ */ b("button", { className: ut({ variant: o, size: t, className: e }), ...n });
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
"zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-
|
|
55
|
+
const ut = We(
|
|
56
|
+
"zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
57
57
|
{
|
|
58
58
|
variants: {
|
|
59
59
|
variant: {
|
|
60
|
-
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
61
|
-
destructive: "bg-destructive text-destructive-foreground shadow-
|
|
62
|
-
outline: "border border-input bg-background shadow-
|
|
63
|
-
secondary: "bg-secondary text-secondary-foreground shadow-
|
|
60
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
61
|
+
destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
|
|
62
|
+
outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
63
|
+
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
64
64
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
65
65
|
link: "text-primary underline-offset-4 hover:underline",
|
|
66
66
|
icon: ""
|
|
@@ -80,16 +80,16 @@ const ct = Ve(
|
|
|
80
80
|
), le = Math.min, H = Math.max, ce = Math.round, ie = Math.floor, _ = (e) => ({
|
|
81
81
|
x: e,
|
|
82
82
|
y: e
|
|
83
|
-
}),
|
|
83
|
+
}), ft = {
|
|
84
84
|
left: "right",
|
|
85
85
|
right: "left",
|
|
86
86
|
bottom: "top",
|
|
87
87
|
top: "bottom"
|
|
88
|
-
},
|
|
88
|
+
}, dt = {
|
|
89
89
|
start: "end",
|
|
90
90
|
end: "start"
|
|
91
91
|
};
|
|
92
|
-
function
|
|
92
|
+
function Te(e, o, t) {
|
|
93
93
|
return H(e, le(o, t));
|
|
94
94
|
}
|
|
95
95
|
function he(e, o) {
|
|
@@ -101,32 +101,32 @@ function U(e) {
|
|
|
101
101
|
function me(e) {
|
|
102
102
|
return e.split("-")[1];
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function je(e) {
|
|
105
105
|
return e === "x" ? "y" : "x";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function $e(e) {
|
|
108
108
|
return e === "y" ? "height" : "width";
|
|
109
109
|
}
|
|
110
110
|
function G(e) {
|
|
111
111
|
return ["top", "bottom"].includes(U(e)) ? "y" : "x";
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function He(e) {
|
|
114
|
+
return je(G(e));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ht(e, o, t) {
|
|
117
117
|
t === void 0 && (t = !1);
|
|
118
|
-
const n = me(e), i =
|
|
118
|
+
const n = me(e), i = He(e), s = $e(i);
|
|
119
119
|
let r = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
120
120
|
return o.reference[s] > o.floating[s] && (r = ae(r)), [r, ae(r)];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function mt(e) {
|
|
123
123
|
const o = ae(e);
|
|
124
124
|
return [Se(e), o, Se(o)];
|
|
125
125
|
}
|
|
126
126
|
function Se(e) {
|
|
127
|
-
return e.replace(/start|end/g, (o) =>
|
|
127
|
+
return e.replace(/start|end/g, (o) => dt[o]);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function gt(e, o, t) {
|
|
130
130
|
const n = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
131
131
|
switch (e) {
|
|
132
132
|
case "top":
|
|
@@ -139,15 +139,15 @@ function ht(e, o, t) {
|
|
|
139
139
|
return [];
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function pt(e, o, t, n) {
|
|
143
143
|
const i = me(e);
|
|
144
|
-
let s =
|
|
144
|
+
let s = gt(U(e), t === "start", n);
|
|
145
145
|
return i && (s = s.map((r) => r + "-" + i), o && (s = s.concat(s.map(Se)))), s;
|
|
146
146
|
}
|
|
147
147
|
function ae(e) {
|
|
148
|
-
return e.replace(/left|right|bottom|top/g, (o) =>
|
|
148
|
+
return e.replace(/left|right|bottom|top/g, (o) => ft[o]);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function xt(e) {
|
|
151
151
|
return {
|
|
152
152
|
top: 0,
|
|
153
153
|
right: 0,
|
|
@@ -156,8 +156,8 @@ function gt(e) {
|
|
|
156
156
|
...e
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return typeof e != "number" ?
|
|
159
|
+
function wt(e) {
|
|
160
|
+
return typeof e != "number" ? xt(e) : {
|
|
161
161
|
top: e,
|
|
162
162
|
right: e,
|
|
163
163
|
bottom: e,
|
|
@@ -187,9 +187,9 @@ function ze(e, o, t) {
|
|
|
187
187
|
reference: n,
|
|
188
188
|
floating: i
|
|
189
189
|
} = e;
|
|
190
|
-
const s = G(o), r =
|
|
190
|
+
const s = G(o), r = He(o), l = $e(r), a = U(o), c = s === "y", u = n.x + n.width / 2 - i.width / 2, d = n.y + n.height / 2 - i.height / 2, h = n[l] / 2 - i[l] / 2;
|
|
191
191
|
let f;
|
|
192
|
-
switch (
|
|
192
|
+
switch (a) {
|
|
193
193
|
case "top":
|
|
194
194
|
f = {
|
|
195
195
|
x: u,
|
|
@@ -222,46 +222,46 @@ function ze(e, o, t) {
|
|
|
222
222
|
}
|
|
223
223
|
switch (me(o)) {
|
|
224
224
|
case "start":
|
|
225
|
-
f[r] -=
|
|
225
|
+
f[r] -= h * (t && c ? -1 : 1);
|
|
226
226
|
break;
|
|
227
227
|
case "end":
|
|
228
|
-
f[r] +=
|
|
228
|
+
f[r] += h * (t && c ? -1 : 1);
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
231
|
return f;
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const yt = async (e, o, t) => {
|
|
234
234
|
const {
|
|
235
235
|
placement: n = "bottom",
|
|
236
236
|
strategy: i = "absolute",
|
|
237
237
|
middleware: s = [],
|
|
238
238
|
platform: r
|
|
239
|
-
} = t, l = s.filter(Boolean),
|
|
240
|
-
let
|
|
239
|
+
} = t, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(o));
|
|
240
|
+
let c = await r.getElementRects({
|
|
241
241
|
reference: e,
|
|
242
242
|
floating: o,
|
|
243
243
|
strategy: i
|
|
244
244
|
}), {
|
|
245
245
|
x: u,
|
|
246
246
|
y: d
|
|
247
|
-
} = ze(
|
|
248
|
-
for (let
|
|
247
|
+
} = ze(c, n, a), h = n, f = {}, g = 0;
|
|
248
|
+
for (let x = 0; x < l.length; x++) {
|
|
249
249
|
const {
|
|
250
|
-
name:
|
|
251
|
-
fn:
|
|
252
|
-
} = l[
|
|
250
|
+
name: w,
|
|
251
|
+
fn: m
|
|
252
|
+
} = l[x], {
|
|
253
253
|
x: p,
|
|
254
254
|
y: v,
|
|
255
255
|
data: E,
|
|
256
256
|
reset: y
|
|
257
|
-
} = await
|
|
257
|
+
} = await m({
|
|
258
258
|
x: u,
|
|
259
259
|
y: d,
|
|
260
260
|
initialPlacement: n,
|
|
261
|
-
placement:
|
|
261
|
+
placement: h,
|
|
262
262
|
strategy: i,
|
|
263
263
|
middlewareData: f,
|
|
264
|
-
rects:
|
|
264
|
+
rects: c,
|
|
265
265
|
platform: r,
|
|
266
266
|
elements: {
|
|
267
267
|
reference: e,
|
|
@@ -270,28 +270,28 @@ const wt = async (e, o, t) => {
|
|
|
270
270
|
});
|
|
271
271
|
u = p ?? u, d = v ?? d, f = {
|
|
272
272
|
...f,
|
|
273
|
-
[
|
|
274
|
-
...f[
|
|
273
|
+
[w]: {
|
|
274
|
+
...f[w],
|
|
275
275
|
...E
|
|
276
276
|
}
|
|
277
|
-
}, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (
|
|
277
|
+
}, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (h = y.placement), y.rects && (c = y.rects === !0 ? await r.getElementRects({
|
|
278
278
|
reference: e,
|
|
279
279
|
floating: o,
|
|
280
280
|
strategy: i
|
|
281
281
|
}) : y.rects), {
|
|
282
282
|
x: u,
|
|
283
283
|
y: d
|
|
284
|
-
} = ze(
|
|
284
|
+
} = ze(c, h, a)), x = -1);
|
|
285
285
|
}
|
|
286
286
|
return {
|
|
287
287
|
x: u,
|
|
288
288
|
y: d,
|
|
289
|
-
placement:
|
|
289
|
+
placement: h,
|
|
290
290
|
strategy: i,
|
|
291
291
|
middlewareData: f
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
|
-
async function
|
|
294
|
+
async function Ue(e, o) {
|
|
295
295
|
var t;
|
|
296
296
|
o === void 0 && (o = {});
|
|
297
297
|
const {
|
|
@@ -300,18 +300,18 @@ async function He(e, o) {
|
|
|
300
300
|
platform: s,
|
|
301
301
|
rects: r,
|
|
302
302
|
elements: l,
|
|
303
|
-
strategy:
|
|
303
|
+
strategy: a
|
|
304
304
|
} = e, {
|
|
305
|
-
boundary:
|
|
305
|
+
boundary: c = "clippingAncestors",
|
|
306
306
|
rootBoundary: u = "viewport",
|
|
307
307
|
elementContext: d = "floating",
|
|
308
|
-
altBoundary:
|
|
308
|
+
altBoundary: h = !1,
|
|
309
309
|
padding: f = 0
|
|
310
|
-
} = he(o, e), g =
|
|
311
|
-
element: (t = await (s.isElement == null ? void 0 : s.isElement(
|
|
312
|
-
boundary:
|
|
310
|
+
} = he(o, e), g = wt(f), w = l[h ? d === "floating" ? "reference" : "floating" : d], m = ue(await s.getClippingRect({
|
|
311
|
+
element: (t = await (s.isElement == null ? void 0 : s.isElement(w))) == null || t ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
312
|
+
boundary: c,
|
|
313
313
|
rootBoundary: u,
|
|
314
|
-
strategy:
|
|
314
|
+
strategy: a
|
|
315
315
|
})), p = d === "floating" ? {
|
|
316
316
|
x: n,
|
|
317
317
|
y: i,
|
|
@@ -327,16 +327,16 @@ async function He(e, o) {
|
|
|
327
327
|
elements: l,
|
|
328
328
|
rect: p,
|
|
329
329
|
offsetParent: v,
|
|
330
|
-
strategy:
|
|
330
|
+
strategy: a
|
|
331
331
|
}) : p);
|
|
332
332
|
return {
|
|
333
|
-
top: (
|
|
334
|
-
bottom: (y.bottom -
|
|
335
|
-
left: (
|
|
336
|
-
right: (y.right -
|
|
333
|
+
top: (m.top - y.top + g.top) / E.y,
|
|
334
|
+
bottom: (y.bottom - m.bottom + g.bottom) / E.y,
|
|
335
|
+
left: (m.left - y.left + g.left) / E.x,
|
|
336
|
+
right: (y.right - m.right + g.right) / E.x
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const bt = function(e) {
|
|
340
340
|
return e === void 0 && (e = {}), {
|
|
341
341
|
name: "flip",
|
|
342
342
|
options: e,
|
|
@@ -347,68 +347,68 @@ const xt = function(e) {
|
|
|
347
347
|
middlewareData: s,
|
|
348
348
|
rects: r,
|
|
349
349
|
initialPlacement: l,
|
|
350
|
-
platform:
|
|
351
|
-
elements:
|
|
350
|
+
platform: a,
|
|
351
|
+
elements: c
|
|
352
352
|
} = o, {
|
|
353
353
|
mainAxis: u = !0,
|
|
354
354
|
crossAxis: d = !0,
|
|
355
|
-
fallbackPlacements:
|
|
355
|
+
fallbackPlacements: h,
|
|
356
356
|
fallbackStrategy: f = "bestFit",
|
|
357
357
|
fallbackAxisSideDirection: g = "none",
|
|
358
|
-
flipAlignment:
|
|
359
|
-
...
|
|
358
|
+
flipAlignment: x = !0,
|
|
359
|
+
...w
|
|
360
360
|
} = he(e, o);
|
|
361
361
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
362
362
|
return {};
|
|
363
|
-
const
|
|
364
|
-
!
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
if (u &&
|
|
368
|
-
const
|
|
369
|
-
|
|
363
|
+
const m = U(i), p = G(l), v = U(l) === l, E = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = h || (v || !x ? [ae(l)] : mt(l)), R = g !== "none";
|
|
364
|
+
!h && R && y.push(...pt(l, x, g, E));
|
|
365
|
+
const O = [l, ...y], z = await Ue(o, w), K = [];
|
|
366
|
+
let P = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
+
if (u && K.push(z[m]), d) {
|
|
368
|
+
const N = ht(i, r, E);
|
|
369
|
+
K.push(z[N[0]], z[N[1]]);
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
371
|
+
if (P = [...P, {
|
|
372
372
|
placement: i,
|
|
373
|
-
overflows:
|
|
374
|
-
}], !
|
|
375
|
-
var
|
|
376
|
-
const
|
|
373
|
+
overflows: K
|
|
374
|
+
}], !K.every((N) => N <= 0)) {
|
|
375
|
+
var Y, ee;
|
|
376
|
+
const N = (((Y = s.flip) == null ? void 0 : Y.index) || 0) + 1, te = O[N];
|
|
377
377
|
if (te)
|
|
378
378
|
return {
|
|
379
379
|
data: {
|
|
380
|
-
index:
|
|
381
|
-
overflows:
|
|
380
|
+
index: N,
|
|
381
|
+
overflows: P
|
|
382
382
|
},
|
|
383
383
|
reset: {
|
|
384
384
|
placement: te
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
let
|
|
388
|
-
if (!
|
|
387
|
+
let k = (ee = P.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
|
|
388
|
+
if (!k)
|
|
389
389
|
switch (f) {
|
|
390
390
|
case "bestFit": {
|
|
391
391
|
var B;
|
|
392
|
-
const V = (B =
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
return
|
|
392
|
+
const V = (B = P.filter((S) => {
|
|
393
|
+
if (R) {
|
|
394
|
+
const A = G(S.placement);
|
|
395
|
+
return A === p || // Create a bias to the `y` side axis due to horizontal
|
|
396
396
|
// reading directions favoring greater width.
|
|
397
|
-
|
|
397
|
+
A === "y";
|
|
398
398
|
}
|
|
399
399
|
return !0;
|
|
400
|
-
}).map((S) => [S.placement, S.overflows.filter((
|
|
401
|
-
V && (
|
|
400
|
+
}).map((S) => [S.placement, S.overflows.filter((A) => A > 0).reduce((A, j) => A + j, 0)]).sort((S, A) => S[1] - A[1])[0]) == null ? void 0 : B[0];
|
|
401
|
+
V && (k = V);
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
404
|
case "initialPlacement":
|
|
405
|
-
|
|
405
|
+
k = l;
|
|
406
406
|
break;
|
|
407
407
|
}
|
|
408
|
-
if (i !==
|
|
408
|
+
if (i !== k)
|
|
409
409
|
return {
|
|
410
410
|
reset: {
|
|
411
|
-
placement:
|
|
411
|
+
placement: k
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
}
|
|
@@ -416,14 +416,14 @@ const xt = function(e) {
|
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
418
|
};
|
|
419
|
-
async function
|
|
419
|
+
async function vt(e, o) {
|
|
420
420
|
const {
|
|
421
421
|
placement: t,
|
|
422
422
|
platform: n,
|
|
423
423
|
elements: i
|
|
424
|
-
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t),
|
|
424
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t), a = G(t) === "y", c = ["left", "top"].includes(r) ? -1 : 1, u = s && a ? -1 : 1, d = he(o, e);
|
|
425
425
|
let {
|
|
426
|
-
mainAxis:
|
|
426
|
+
mainAxis: h,
|
|
427
427
|
crossAxis: f,
|
|
428
428
|
alignmentAxis: g
|
|
429
429
|
} = typeof d == "number" ? {
|
|
@@ -435,15 +435,15 @@ async function yt(e, o) {
|
|
|
435
435
|
crossAxis: d.crossAxis || 0,
|
|
436
436
|
alignmentAxis: d.alignmentAxis
|
|
437
437
|
};
|
|
438
|
-
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g),
|
|
438
|
+
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), a ? {
|
|
439
439
|
x: f * u,
|
|
440
|
-
y:
|
|
440
|
+
y: h * c
|
|
441
441
|
} : {
|
|
442
|
-
x:
|
|
442
|
+
x: h * c,
|
|
443
443
|
y: f * u
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const Et = function(e) {
|
|
447
447
|
return e === void 0 && (e = 0), {
|
|
448
448
|
name: "offset",
|
|
449
449
|
options: e,
|
|
@@ -454,18 +454,18 @@ const bt = function(e) {
|
|
|
454
454
|
y: s,
|
|
455
455
|
placement: r,
|
|
456
456
|
middlewareData: l
|
|
457
|
-
} = o,
|
|
457
|
+
} = o, a = await vt(o, e);
|
|
458
458
|
return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
459
|
-
x: i +
|
|
460
|
-
y: s +
|
|
459
|
+
x: i + a.x,
|
|
460
|
+
y: s + a.y,
|
|
461
461
|
data: {
|
|
462
|
-
...
|
|
462
|
+
...a,
|
|
463
463
|
placement: r
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
};
|
|
468
|
-
},
|
|
468
|
+
}, St = function(e) {
|
|
469
469
|
return e === void 0 && (e = {}), {
|
|
470
470
|
name: "shift",
|
|
471
471
|
options: e,
|
|
@@ -478,43 +478,43 @@ const bt = function(e) {
|
|
|
478
478
|
mainAxis: s = !0,
|
|
479
479
|
crossAxis: r = !1,
|
|
480
480
|
limiter: l = {
|
|
481
|
-
fn: (
|
|
481
|
+
fn: (w) => {
|
|
482
482
|
let {
|
|
483
|
-
x:
|
|
483
|
+
x: m,
|
|
484
484
|
y: p
|
|
485
|
-
} =
|
|
485
|
+
} = w;
|
|
486
486
|
return {
|
|
487
|
-
x:
|
|
487
|
+
x: m,
|
|
488
488
|
y: p
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
},
|
|
492
|
-
...
|
|
493
|
-
} = he(e, o),
|
|
492
|
+
...a
|
|
493
|
+
} = he(e, o), c = {
|
|
494
494
|
x: t,
|
|
495
495
|
y: n
|
|
496
|
-
}, u = await
|
|
497
|
-
let f =
|
|
496
|
+
}, u = await Ue(o, a), d = G(U(i)), h = je(d);
|
|
497
|
+
let f = c[h], g = c[d];
|
|
498
498
|
if (s) {
|
|
499
|
-
const
|
|
500
|
-
f =
|
|
499
|
+
const w = h === "y" ? "top" : "left", m = h === "y" ? "bottom" : "right", p = f + u[w], v = f - u[m];
|
|
500
|
+
f = Te(p, f, v);
|
|
501
501
|
}
|
|
502
502
|
if (r) {
|
|
503
|
-
const
|
|
504
|
-
g =
|
|
503
|
+
const w = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", p = g + u[w], v = g - u[m];
|
|
504
|
+
g = Te(p, g, v);
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const x = l.fn({
|
|
507
507
|
...o,
|
|
508
|
-
[
|
|
508
|
+
[h]: f,
|
|
509
509
|
[d]: g
|
|
510
510
|
});
|
|
511
511
|
return {
|
|
512
|
-
...
|
|
512
|
+
...x,
|
|
513
513
|
data: {
|
|
514
|
-
x:
|
|
515
|
-
y:
|
|
514
|
+
x: x.x - t,
|
|
515
|
+
y: x.y - n,
|
|
516
516
|
enabled: {
|
|
517
|
-
[
|
|
517
|
+
[h]: s,
|
|
518
518
|
[d]: r
|
|
519
519
|
}
|
|
520
520
|
}
|
|
@@ -526,27 +526,27 @@ function ge() {
|
|
|
526
526
|
return typeof window < "u";
|
|
527
527
|
}
|
|
528
528
|
function Q(e) {
|
|
529
|
-
return
|
|
529
|
+
return qe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function T(e) {
|
|
532
532
|
var o;
|
|
533
533
|
return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function F(e) {
|
|
536
536
|
var o;
|
|
537
|
-
return (o = (
|
|
537
|
+
return (o = (qe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
return ge() ? e instanceof Node || e instanceof
|
|
539
|
+
function qe(e) {
|
|
540
|
+
return ge() ? e instanceof Node || e instanceof T(e).Node : !1;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return ge() ? e instanceof Element || e instanceof
|
|
542
|
+
function I(e) {
|
|
543
|
+
return ge() ? e instanceof Element || e instanceof T(e).Element : !1;
|
|
544
544
|
}
|
|
545
545
|
function D(e) {
|
|
546
|
-
return ge() ? e instanceof HTMLElement || e instanceof
|
|
546
|
+
return ge() ? e instanceof HTMLElement || e instanceof T(e).HTMLElement : !1;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
548
|
+
function Ne(e) {
|
|
549
|
+
return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof T(e).ShadowRoot;
|
|
550
550
|
}
|
|
551
551
|
function oe(e) {
|
|
552
552
|
const {
|
|
@@ -557,7 +557,7 @@ function oe(e) {
|
|
|
557
557
|
} = L(e);
|
|
558
558
|
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(i);
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Ot(e) {
|
|
561
561
|
return ["table", "td", "th"].includes(Q(e));
|
|
562
562
|
}
|
|
563
563
|
function pe(e) {
|
|
@@ -569,14 +569,14 @@ function pe(e) {
|
|
|
569
569
|
}
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const o = Re(), t =
|
|
574
|
-
return
|
|
572
|
+
function Ce(e) {
|
|
573
|
+
const o = Re(), t = I(e) ? L(e) : e;
|
|
574
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function Ct(e) {
|
|
577
577
|
let o = $(e);
|
|
578
578
|
for (; D(o) && !J(o); ) {
|
|
579
|
-
if (
|
|
579
|
+
if (Ce(o))
|
|
580
580
|
return o;
|
|
581
581
|
if (pe(o))
|
|
582
582
|
return null;
|
|
@@ -591,10 +591,10 @@ function J(e) {
|
|
|
591
591
|
return ["html", "body", "#document"].includes(Q(e));
|
|
592
592
|
}
|
|
593
593
|
function L(e) {
|
|
594
|
-
return
|
|
594
|
+
return T(e).getComputedStyle(e);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
596
|
+
function xe(e) {
|
|
597
|
+
return I(e) ? {
|
|
598
598
|
scrollLeft: e.scrollLeft,
|
|
599
599
|
scrollTop: e.scrollTop
|
|
600
600
|
} : {
|
|
@@ -609,10 +609,10 @@ function $(e) {
|
|
|
609
609
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
610
610
|
e.assignedSlot || // DOM Element detected.
|
|
611
611
|
e.parentNode || // ShadowRoot detected.
|
|
612
|
-
|
|
613
|
-
|
|
612
|
+
Ne(e) && e.host || // Fallback.
|
|
613
|
+
F(e)
|
|
614
614
|
);
|
|
615
|
-
return
|
|
615
|
+
return Ne(o) ? o.host : o;
|
|
616
616
|
}
|
|
617
617
|
function Ke(e) {
|
|
618
618
|
const o = $(e);
|
|
@@ -621,14 +621,14 @@ function Ke(e) {
|
|
|
621
621
|
function ne(e, o, t) {
|
|
622
622
|
var n;
|
|
623
623
|
o === void 0 && (o = []), t === void 0 && (t = !0);
|
|
624
|
-
const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r =
|
|
624
|
+
const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r = T(i);
|
|
625
625
|
if (s) {
|
|
626
|
-
const l =
|
|
626
|
+
const l = Oe(r);
|
|
627
627
|
return o.concat(r, r.visualViewport || [], oe(i) ? i : [], l && t ? ne(l) : []);
|
|
628
628
|
}
|
|
629
629
|
return o.concat(i, ne(i, [], t));
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Oe(e) {
|
|
632
632
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
633
633
|
}
|
|
634
634
|
function Ye(e) {
|
|
@@ -641,11 +641,11 @@ function Ye(e) {
|
|
|
641
641
|
$: l
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
644
|
+
function Me(e) {
|
|
645
|
+
return I(e) ? e : e.contextElement;
|
|
646
646
|
}
|
|
647
647
|
function Z(e) {
|
|
648
|
-
const o =
|
|
648
|
+
const o = Me(e);
|
|
649
649
|
if (!D(o))
|
|
650
650
|
return _(1);
|
|
651
651
|
const t = o.getBoundingClientRect(), {
|
|
@@ -659,87 +659,87 @@ function Z(e) {
|
|
|
659
659
|
y: l
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
const
|
|
663
|
-
function
|
|
664
|
-
const o =
|
|
665
|
-
return !Re() || !o.visualViewport ?
|
|
662
|
+
const Rt = /* @__PURE__ */ _(0);
|
|
663
|
+
function Xe(e) {
|
|
664
|
+
const o = T(e);
|
|
665
|
+
return !Re() || !o.visualViewport ? Rt : {
|
|
666
666
|
x: o.visualViewport.offsetLeft,
|
|
667
667
|
y: o.visualViewport.offsetTop
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
return o === void 0 && (o = !1), !t || o && t !==
|
|
670
|
+
function Mt(e, o, t) {
|
|
671
|
+
return o === void 0 && (o = !1), !t || o && t !== T(e) ? !1 : o;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function q(e, o, t, n) {
|
|
674
674
|
o === void 0 && (o = !1), t === void 0 && (t = !1);
|
|
675
|
-
const i = e.getBoundingClientRect(), s =
|
|
675
|
+
const i = e.getBoundingClientRect(), s = Me(e);
|
|
676
676
|
let r = _(1);
|
|
677
|
-
o && (n ?
|
|
678
|
-
const l =
|
|
679
|
-
let
|
|
677
|
+
o && (n ? I(n) && (r = Z(n)) : r = Z(e));
|
|
678
|
+
const l = Mt(s, t, n) ? Xe(s) : _(0);
|
|
679
|
+
let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
|
|
680
680
|
if (s) {
|
|
681
|
-
const
|
|
682
|
-
let g =
|
|
683
|
-
for (;
|
|
684
|
-
const
|
|
685
|
-
|
|
681
|
+
const h = T(s), f = n && I(n) ? T(n) : n;
|
|
682
|
+
let g = h, x = Oe(g);
|
|
683
|
+
for (; x && n && f !== g; ) {
|
|
684
|
+
const w = Z(x), m = x.getBoundingClientRect(), p = L(x), v = m.left + (x.clientLeft + parseFloat(p.paddingLeft)) * w.x, E = m.top + (x.clientTop + parseFloat(p.paddingTop)) * w.y;
|
|
685
|
+
a *= w.x, c *= w.y, u *= w.x, d *= w.y, a += v, c += E, g = T(x), x = Oe(g);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
return ue({
|
|
689
689
|
width: u,
|
|
690
690
|
height: d,
|
|
691
|
-
x:
|
|
692
|
-
y:
|
|
691
|
+
x: a,
|
|
692
|
+
y: c
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
function
|
|
696
|
-
const t =
|
|
697
|
-
return o ? o.left + t :
|
|
695
|
+
function ke(e, o) {
|
|
696
|
+
const t = xe(e).scrollLeft;
|
|
697
|
+
return o ? o.left + t : q(F(e)).left + t;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Ze(e, o, t) {
|
|
700
700
|
t === void 0 && (t = !1);
|
|
701
701
|
const n = e.getBoundingClientRect(), i = n.left + o.scrollLeft - (t ? 0 : (
|
|
702
702
|
// RTL <body> scrollbar.
|
|
703
|
-
|
|
703
|
+
ke(e, n)
|
|
704
704
|
)), s = n.top + o.scrollTop;
|
|
705
705
|
return {
|
|
706
706
|
x: i,
|
|
707
707
|
y: s
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function kt(e) {
|
|
711
711
|
let {
|
|
712
712
|
elements: o,
|
|
713
713
|
rect: t,
|
|
714
714
|
offsetParent: n,
|
|
715
715
|
strategy: i
|
|
716
716
|
} = e;
|
|
717
|
-
const s = i === "fixed", r =
|
|
717
|
+
const s = i === "fixed", r = F(n), l = o ? pe(o.floating) : !1;
|
|
718
718
|
if (n === r || l && s)
|
|
719
719
|
return t;
|
|
720
|
-
let
|
|
720
|
+
let a = {
|
|
721
721
|
scrollLeft: 0,
|
|
722
722
|
scrollTop: 0
|
|
723
|
-
},
|
|
723
|
+
}, c = _(1);
|
|
724
724
|
const u = _(0), d = D(n);
|
|
725
|
-
if ((d || !d && !s) && ((Q(n) !== "body" || oe(r)) && (
|
|
726
|
-
const f =
|
|
727
|
-
|
|
725
|
+
if ((d || !d && !s) && ((Q(n) !== "body" || oe(r)) && (a = xe(n)), D(n))) {
|
|
726
|
+
const f = q(n);
|
|
727
|
+
c = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const h = r && !d && !s ? Ze(r, a, !0) : _(0);
|
|
730
730
|
return {
|
|
731
|
-
width: t.width *
|
|
732
|
-
height: t.height *
|
|
733
|
-
x: t.x *
|
|
734
|
-
y: t.y *
|
|
731
|
+
width: t.width * c.x,
|
|
732
|
+
height: t.height * c.y,
|
|
733
|
+
x: t.x * c.x - a.scrollLeft * c.x + u.x + h.x,
|
|
734
|
+
y: t.y * c.y - a.scrollTop * c.y + u.y + h.y
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function At(e) {
|
|
738
738
|
return Array.from(e.getClientRects());
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
const o =
|
|
742
|
-
let r = -t.scrollLeft +
|
|
740
|
+
function Tt(e) {
|
|
741
|
+
const o = F(e), t = xe(e), n = e.ownerDocument.body, i = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
|
|
742
|
+
let r = -t.scrollLeft + ke(e);
|
|
743
743
|
const l = -t.scrollTop;
|
|
744
744
|
return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - i), {
|
|
745
745
|
width: i,
|
|
@@ -748,40 +748,40 @@ function Mt(e) {
|
|
|
748
748
|
y: l
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
function
|
|
752
|
-
const t =
|
|
753
|
-
let s = n.clientWidth, r = n.clientHeight, l = 0,
|
|
751
|
+
function zt(e, o) {
|
|
752
|
+
const t = T(e), n = F(e), i = t.visualViewport;
|
|
753
|
+
let s = n.clientWidth, r = n.clientHeight, l = 0, a = 0;
|
|
754
754
|
if (i) {
|
|
755
755
|
s = i.width, r = i.height;
|
|
756
|
-
const
|
|
757
|
-
(!
|
|
756
|
+
const c = Re();
|
|
757
|
+
(!c || c && o === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
758
758
|
}
|
|
759
759
|
return {
|
|
760
760
|
width: s,
|
|
761
761
|
height: r,
|
|
762
762
|
x: l,
|
|
763
|
-
y:
|
|
763
|
+
y: a
|
|
764
764
|
};
|
|
765
765
|
}
|
|
766
|
-
function
|
|
767
|
-
const t =
|
|
766
|
+
function Nt(e, o) {
|
|
767
|
+
const t = q(e, !0, o === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, s = D(e) ? Z(e) : _(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, a = i * s.x, c = n * s.y;
|
|
768
768
|
return {
|
|
769
769
|
width: r,
|
|
770
770
|
height: l,
|
|
771
|
-
x:
|
|
772
|
-
y:
|
|
771
|
+
x: a,
|
|
772
|
+
y: c
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Ie(e, o, t) {
|
|
776
776
|
let n;
|
|
777
777
|
if (o === "viewport")
|
|
778
|
-
n =
|
|
778
|
+
n = zt(e, t);
|
|
779
779
|
else if (o === "document")
|
|
780
|
-
n =
|
|
781
|
-
else if (
|
|
782
|
-
n =
|
|
780
|
+
n = Tt(F(e));
|
|
781
|
+
else if (I(o))
|
|
782
|
+
n = Nt(o, t);
|
|
783
783
|
else {
|
|
784
|
-
const i =
|
|
784
|
+
const i = Xe(e);
|
|
785
785
|
n = {
|
|
786
786
|
x: o.x - i.x,
|
|
787
787
|
y: o.y - i.y,
|
|
@@ -791,42 +791,42 @@ function Ne(e, o, t) {
|
|
|
791
791
|
}
|
|
792
792
|
return ue(n);
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Ge(e, o) {
|
|
795
795
|
const t = $(e);
|
|
796
|
-
return t === o || !
|
|
796
|
+
return t === o || !I(t) || J(t) ? !1 : L(t).position === "fixed" || Ge(t, o);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function It(e, o) {
|
|
799
799
|
const t = o.get(e);
|
|
800
800
|
if (t)
|
|
801
801
|
return t;
|
|
802
|
-
let n = ne(e, [], !1).filter((l) =>
|
|
802
|
+
let n = ne(e, [], !1).filter((l) => I(l) && Q(l) !== "body"), i = null;
|
|
803
803
|
const s = L(e).position === "fixed";
|
|
804
804
|
let r = s ? $(e) : e;
|
|
805
|
-
for (;
|
|
806
|
-
const l = L(r),
|
|
807
|
-
!
|
|
805
|
+
for (; I(r) && !J(r); ) {
|
|
806
|
+
const l = L(r), a = Ce(r);
|
|
807
|
+
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || oe(r) && !a && Ge(e, r)) ? n = n.filter((u) => u !== r) : i = l, r = $(r);
|
|
808
808
|
}
|
|
809
809
|
return o.set(e, n), n;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Lt(e) {
|
|
812
812
|
let {
|
|
813
813
|
element: o,
|
|
814
814
|
boundary: t,
|
|
815
815
|
rootBoundary: n,
|
|
816
816
|
strategy: i
|
|
817
817
|
} = e;
|
|
818
|
-
const r = [...t === "clippingAncestors" ? pe(o) ? [] :
|
|
819
|
-
const d =
|
|
820
|
-
return
|
|
821
|
-
},
|
|
818
|
+
const r = [...t === "clippingAncestors" ? pe(o) ? [] : It(o, this._c) : [].concat(t), n], l = r[0], a = r.reduce((c, u) => {
|
|
819
|
+
const d = Ie(o, u, i);
|
|
820
|
+
return c.top = H(d.top, c.top), c.right = le(d.right, c.right), c.bottom = le(d.bottom, c.bottom), c.left = H(d.left, c.left), c;
|
|
821
|
+
}, Ie(o, l, i));
|
|
822
822
|
return {
|
|
823
|
-
width:
|
|
824
|
-
height:
|
|
825
|
-
x:
|
|
826
|
-
y:
|
|
823
|
+
width: a.right - a.left,
|
|
824
|
+
height: a.bottom - a.top,
|
|
825
|
+
x: a.left,
|
|
826
|
+
y: a.top
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function _t(e) {
|
|
830
830
|
const {
|
|
831
831
|
width: o,
|
|
832
832
|
height: t
|
|
@@ -836,19 +836,19 @@ function Nt(e) {
|
|
|
836
836
|
height: t
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
const n = D(o), i =
|
|
839
|
+
function Dt(e, o, t) {
|
|
840
|
+
const n = D(o), i = F(o), s = t === "fixed", r = q(e, !0, s, o);
|
|
841
841
|
let l = {
|
|
842
842
|
scrollLeft: 0,
|
|
843
843
|
scrollTop: 0
|
|
844
844
|
};
|
|
845
|
-
const
|
|
845
|
+
const a = _(0);
|
|
846
846
|
if (n || !n && !s)
|
|
847
|
-
if ((Q(o) !== "body" || oe(i)) && (l =
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
} else i && (
|
|
851
|
-
const
|
|
847
|
+
if ((Q(o) !== "body" || oe(i)) && (l = xe(o)), n) {
|
|
848
|
+
const h = q(o, !0, s, o);
|
|
849
|
+
a.x = h.x + o.clientLeft, a.y = h.y + o.clientTop;
|
|
850
|
+
} else i && (a.x = ke(i));
|
|
851
|
+
const c = i && !n && !s ? Ze(i, l) : _(0), u = r.left + l.scrollLeft - a.x - c.x, d = r.top + l.scrollTop - a.y - c.y;
|
|
852
852
|
return {
|
|
853
853
|
x: u,
|
|
854
854
|
y: d,
|
|
@@ -856,7 +856,7 @@ function Lt(e, o, t) {
|
|
|
856
856
|
height: r.height
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function we(e) {
|
|
860
860
|
return L(e).position === "static";
|
|
861
861
|
}
|
|
862
862
|
function Le(e, o) {
|
|
@@ -865,30 +865,30 @@ function Le(e, o) {
|
|
|
865
865
|
if (o)
|
|
866
866
|
return o(e);
|
|
867
867
|
let t = e.offsetParent;
|
|
868
|
-
return
|
|
868
|
+
return F(e) === t && (t = t.ownerDocument.body), t;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
const t =
|
|
870
|
+
function Je(e, o) {
|
|
871
|
+
const t = T(e);
|
|
872
872
|
if (pe(e))
|
|
873
873
|
return t;
|
|
874
874
|
if (!D(e)) {
|
|
875
875
|
let i = $(e);
|
|
876
876
|
for (; i && !J(i); ) {
|
|
877
|
-
if (
|
|
877
|
+
if (I(i) && !we(i))
|
|
878
878
|
return i;
|
|
879
879
|
i = $(i);
|
|
880
880
|
}
|
|
881
881
|
return t;
|
|
882
882
|
}
|
|
883
883
|
let n = Le(e, o);
|
|
884
|
-
for (; n &&
|
|
884
|
+
for (; n && Ot(n) && we(n); )
|
|
885
885
|
n = Le(n, o);
|
|
886
|
-
return n && J(n) &&
|
|
886
|
+
return n && J(n) && we(n) && !Ce(n) ? t : n || Ct(e) || t;
|
|
887
887
|
}
|
|
888
|
-
const
|
|
889
|
-
const o = this.getOffsetParent ||
|
|
888
|
+
const Ft = async function(e) {
|
|
889
|
+
const o = this.getOffsetParent || Je, t = this.getDimensions, n = await t(e.floating);
|
|
890
890
|
return {
|
|
891
|
-
reference:
|
|
891
|
+
reference: Dt(e.reference, await o(e.floating), e.strategy),
|
|
892
892
|
floating: {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
@@ -897,117 +897,120 @@ const _t = async function(e) {
|
|
|
897
897
|
}
|
|
898
898
|
};
|
|
899
899
|
};
|
|
900
|
-
function
|
|
900
|
+
function Pt(e) {
|
|
901
901
|
return L(e).direction === "rtl";
|
|
902
902
|
}
|
|
903
|
-
const
|
|
904
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
905
|
-
getDocumentElement:
|
|
906
|
-
getClippingRect:
|
|
907
|
-
getOffsetParent:
|
|
908
|
-
getElementRects:
|
|
909
|
-
getClientRects:
|
|
910
|
-
getDimensions:
|
|
903
|
+
const Vt = {
|
|
904
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: kt,
|
|
905
|
+
getDocumentElement: F,
|
|
906
|
+
getClippingRect: Lt,
|
|
907
|
+
getOffsetParent: Je,
|
|
908
|
+
getElementRects: Ft,
|
|
909
|
+
getClientRects: At,
|
|
910
|
+
getDimensions: _t,
|
|
911
911
|
getScale: Z,
|
|
912
|
-
isElement:
|
|
913
|
-
isRTL:
|
|
912
|
+
isElement: I,
|
|
913
|
+
isRTL: Pt
|
|
914
914
|
};
|
|
915
|
-
function
|
|
915
|
+
function Qe(e, o) {
|
|
916
|
+
return e.x === o.x && e.y === o.y && e.width === o.width && e.height === o.height;
|
|
917
|
+
}
|
|
918
|
+
function Wt(e, o) {
|
|
916
919
|
let t = null, n;
|
|
917
|
-
const i =
|
|
920
|
+
const i = F(e);
|
|
918
921
|
function s() {
|
|
919
922
|
var l;
|
|
920
923
|
clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
|
|
921
924
|
}
|
|
922
|
-
function r(l,
|
|
923
|
-
l === void 0 && (l = !1),
|
|
924
|
-
const {
|
|
925
|
-
left:
|
|
926
|
-
top:
|
|
927
|
-
width:
|
|
928
|
-
height:
|
|
929
|
-
} =
|
|
930
|
-
if (l || o(), !
|
|
925
|
+
function r(l, a) {
|
|
926
|
+
l === void 0 && (l = !1), a === void 0 && (a = 1), s();
|
|
927
|
+
const c = e.getBoundingClientRect(), {
|
|
928
|
+
left: u,
|
|
929
|
+
top: d,
|
|
930
|
+
width: h,
|
|
931
|
+
height: f
|
|
932
|
+
} = c;
|
|
933
|
+
if (l || o(), !h || !f)
|
|
931
934
|
return;
|
|
932
|
-
const
|
|
933
|
-
rootMargin: -
|
|
934
|
-
threshold: H(0, le(1,
|
|
935
|
+
const g = ie(d), x = ie(i.clientWidth - (u + h)), w = ie(i.clientHeight - (d + f)), m = ie(u), v = {
|
|
936
|
+
rootMargin: -g + "px " + -x + "px " + -w + "px " + -m + "px",
|
|
937
|
+
threshold: H(0, le(1, a)) || 1
|
|
935
938
|
};
|
|
936
|
-
let
|
|
937
|
-
function
|
|
938
|
-
const O =
|
|
939
|
-
if (O !==
|
|
940
|
-
if (!
|
|
939
|
+
let E = !0;
|
|
940
|
+
function y(R) {
|
|
941
|
+
const O = R[0].intersectionRatio;
|
|
942
|
+
if (O !== a) {
|
|
943
|
+
if (!E)
|
|
941
944
|
return r();
|
|
942
945
|
O ? r(!1, O) : n = setTimeout(() => {
|
|
943
946
|
r(!1, 1e-7);
|
|
944
947
|
}, 1e3);
|
|
945
948
|
}
|
|
946
|
-
|
|
949
|
+
O === 1 && !Qe(c, e.getBoundingClientRect()) && r(), E = !1;
|
|
947
950
|
}
|
|
948
951
|
try {
|
|
949
|
-
t = new IntersectionObserver(
|
|
950
|
-
...
|
|
952
|
+
t = new IntersectionObserver(y, {
|
|
953
|
+
...v,
|
|
951
954
|
// Handle <iframe>s
|
|
952
955
|
root: i.ownerDocument
|
|
953
956
|
});
|
|
954
957
|
} catch {
|
|
955
|
-
t = new IntersectionObserver(
|
|
958
|
+
t = new IntersectionObserver(y, v);
|
|
956
959
|
}
|
|
957
960
|
t.observe(e);
|
|
958
961
|
}
|
|
959
962
|
return r(!0), s;
|
|
960
963
|
}
|
|
961
|
-
function
|
|
964
|
+
function Bt(e, o, t, n) {
|
|
962
965
|
n === void 0 && (n = {});
|
|
963
966
|
const {
|
|
964
967
|
ancestorScroll: i = !0,
|
|
965
968
|
ancestorResize: s = !0,
|
|
966
969
|
elementResize: r = typeof ResizeObserver == "function",
|
|
967
970
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
968
|
-
animationFrame:
|
|
969
|
-
} = n,
|
|
970
|
-
u.forEach((
|
|
971
|
-
i &&
|
|
971
|
+
animationFrame: a = !1
|
|
972
|
+
} = n, c = Me(e), u = i || s ? [...c ? ne(c) : [], ...ne(o)] : [];
|
|
973
|
+
u.forEach((m) => {
|
|
974
|
+
i && m.addEventListener("scroll", t, {
|
|
972
975
|
passive: !0
|
|
973
|
-
}), s &&
|
|
976
|
+
}), s && m.addEventListener("resize", t);
|
|
974
977
|
});
|
|
975
|
-
const d =
|
|
976
|
-
let
|
|
977
|
-
r && (f = new ResizeObserver((
|
|
978
|
-
let [p] =
|
|
979
|
-
p && p.target ===
|
|
978
|
+
const d = c && l ? Wt(c, t) : null;
|
|
979
|
+
let h = -1, f = null;
|
|
980
|
+
r && (f = new ResizeObserver((m) => {
|
|
981
|
+
let [p] = m;
|
|
982
|
+
p && p.target === c && f && (f.unobserve(o), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
980
983
|
var v;
|
|
981
984
|
(v = f) == null || v.observe(o);
|
|
982
985
|
})), t();
|
|
983
|
-
}),
|
|
984
|
-
let g,
|
|
985
|
-
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
|
|
986
|
+
}), c && !a && f.observe(c), f.observe(o));
|
|
987
|
+
let g, x = a ? q(e) : null;
|
|
988
|
+
a && w();
|
|
989
|
+
function w() {
|
|
990
|
+
const m = q(e);
|
|
991
|
+
x && !Qe(x, m) && t(), x = m, g = requestAnimationFrame(w);
|
|
989
992
|
}
|
|
990
993
|
return t(), () => {
|
|
991
|
-
var
|
|
994
|
+
var m;
|
|
992
995
|
u.forEach((p) => {
|
|
993
996
|
i && p.removeEventListener("scroll", t), s && p.removeEventListener("resize", t);
|
|
994
|
-
}), d == null || d(), (
|
|
997
|
+
}), d == null || d(), (m = f) == null || m.disconnect(), f = null, a && cancelAnimationFrame(g);
|
|
995
998
|
};
|
|
996
999
|
}
|
|
997
|
-
const
|
|
1000
|
+
const jt = Et, $t = St, Ht = bt, Ut = (e, o, t) => {
|
|
998
1001
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
999
|
-
platform:
|
|
1002
|
+
platform: Vt,
|
|
1000
1003
|
...t
|
|
1001
1004
|
}, s = {
|
|
1002
1005
|
...i.platform,
|
|
1003
1006
|
_c: n
|
|
1004
1007
|
};
|
|
1005
|
-
return
|
|
1008
|
+
return yt(e, o, {
|
|
1006
1009
|
...i,
|
|
1007
1010
|
platform: s
|
|
1008
1011
|
});
|
|
1009
1012
|
};
|
|
1010
|
-
var se = typeof document < "u" ?
|
|
1013
|
+
var se = typeof document < "u" ? ot : re;
|
|
1011
1014
|
function fe(e, o) {
|
|
1012
1015
|
if (e === o)
|
|
1013
1016
|
return !0;
|
|
@@ -1038,11 +1041,11 @@ function fe(e, o) {
|
|
|
1038
1041
|
}
|
|
1039
1042
|
return e !== e && o !== o;
|
|
1040
1043
|
}
|
|
1041
|
-
function
|
|
1044
|
+
function et(e) {
|
|
1042
1045
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1043
1046
|
}
|
|
1044
1047
|
function _e(e, o) {
|
|
1045
|
-
const t =
|
|
1048
|
+
const t = et(e);
|
|
1046
1049
|
return Math.round(o * t) / t;
|
|
1047
1050
|
}
|
|
1048
1051
|
function ye(e) {
|
|
@@ -1051,7 +1054,7 @@ function ye(e) {
|
|
|
1051
1054
|
o.current = e;
|
|
1052
1055
|
}), o;
|
|
1053
1056
|
}
|
|
1054
|
-
function
|
|
1057
|
+
function qt(e) {
|
|
1055
1058
|
e === void 0 && (e = {});
|
|
1056
1059
|
const {
|
|
1057
1060
|
placement: o = "bottom",
|
|
@@ -1063,8 +1066,8 @@ function Ht(e) {
|
|
|
1063
1066
|
floating: r
|
|
1064
1067
|
} = {},
|
|
1065
1068
|
transform: l = !0,
|
|
1066
|
-
whileElementsMounted:
|
|
1067
|
-
open:
|
|
1069
|
+
whileElementsMounted: a,
|
|
1070
|
+
open: c
|
|
1068
1071
|
} = e, [u, d] = C.useState({
|
|
1069
1072
|
x: 0,
|
|
1070
1073
|
y: 0,
|
|
@@ -1072,56 +1075,56 @@ function Ht(e) {
|
|
|
1072
1075
|
placement: o,
|
|
1073
1076
|
middlewareData: {},
|
|
1074
1077
|
isPositioned: !1
|
|
1075
|
-
}), [
|
|
1076
|
-
fe(
|
|
1077
|
-
const [g,
|
|
1078
|
-
S !==
|
|
1078
|
+
}), [h, f] = C.useState(n);
|
|
1079
|
+
fe(h, n) || f(n);
|
|
1080
|
+
const [g, x] = C.useState(null), [w, m] = C.useState(null), p = C.useCallback((S) => {
|
|
1081
|
+
S !== R.current && (R.current = S, x(S));
|
|
1079
1082
|
}, []), v = C.useCallback((S) => {
|
|
1080
|
-
S !==
|
|
1081
|
-
}, []), E = s || g, y = r ||
|
|
1082
|
-
if (!
|
|
1083
|
+
S !== O.current && (O.current = S, m(S));
|
|
1084
|
+
}, []), E = s || g, y = r || w, R = C.useRef(null), O = C.useRef(null), z = C.useRef(u), K = a != null, P = ye(a), Y = ye(i), ee = ye(c), B = C.useCallback(() => {
|
|
1085
|
+
if (!R.current || !O.current)
|
|
1083
1086
|
return;
|
|
1084
1087
|
const S = {
|
|
1085
1088
|
placement: o,
|
|
1086
1089
|
strategy: t,
|
|
1087
|
-
middleware:
|
|
1090
|
+
middleware: h
|
|
1088
1091
|
};
|
|
1089
|
-
|
|
1092
|
+
Y.current && (S.platform = Y.current), Ut(R.current, O.current, S).then((A) => {
|
|
1090
1093
|
const j = {
|
|
1091
|
-
...
|
|
1094
|
+
...A,
|
|
1092
1095
|
// The floating element's position may be recomputed while it's closed
|
|
1093
1096
|
// but still mounted (such as when transitioning out). To ensure
|
|
1094
1097
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1095
1098
|
// setting it to `true` when `open === false` (must be specified).
|
|
1096
1099
|
isPositioned: ee.current !== !1
|
|
1097
1100
|
};
|
|
1098
|
-
|
|
1101
|
+
N.current && !fe(z.current, j) && (z.current = j, st.flushSync(() => {
|
|
1099
1102
|
d(j);
|
|
1100
1103
|
}));
|
|
1101
1104
|
});
|
|
1102
|
-
}, [
|
|
1105
|
+
}, [h, o, t, Y, ee]);
|
|
1103
1106
|
se(() => {
|
|
1104
|
-
|
|
1107
|
+
c === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
|
|
1105
1108
|
...S,
|
|
1106
1109
|
isPositioned: !1
|
|
1107
1110
|
})));
|
|
1108
|
-
}, [
|
|
1109
|
-
const
|
|
1110
|
-
se(() => (
|
|
1111
|
-
|
|
1111
|
+
}, [c]);
|
|
1112
|
+
const N = C.useRef(!1);
|
|
1113
|
+
se(() => (N.current = !0, () => {
|
|
1114
|
+
N.current = !1;
|
|
1112
1115
|
}), []), se(() => {
|
|
1113
|
-
if (E && (
|
|
1114
|
-
if (
|
|
1115
|
-
return
|
|
1116
|
+
if (E && (R.current = E), y && (O.current = y), E && y) {
|
|
1117
|
+
if (P.current)
|
|
1118
|
+
return P.current(E, y, B);
|
|
1116
1119
|
B();
|
|
1117
1120
|
}
|
|
1118
|
-
}, [E, y, B,
|
|
1121
|
+
}, [E, y, B, P, K]);
|
|
1119
1122
|
const te = C.useMemo(() => ({
|
|
1120
|
-
reference:
|
|
1121
|
-
floating:
|
|
1123
|
+
reference: R,
|
|
1124
|
+
floating: O,
|
|
1122
1125
|
setReference: p,
|
|
1123
1126
|
setFloating: v
|
|
1124
|
-
}), [p, v]),
|
|
1127
|
+
}), [p, v]), k = C.useMemo(() => ({
|
|
1125
1128
|
reference: E,
|
|
1126
1129
|
floating: y
|
|
1127
1130
|
}), [E, y]), V = C.useMemo(() => {
|
|
@@ -1130,40 +1133,40 @@ function Ht(e) {
|
|
|
1130
1133
|
left: 0,
|
|
1131
1134
|
top: 0
|
|
1132
1135
|
};
|
|
1133
|
-
if (!
|
|
1136
|
+
if (!k.floating)
|
|
1134
1137
|
return S;
|
|
1135
|
-
const
|
|
1138
|
+
const A = _e(k.floating, u.x), j = _e(k.floating, u.y);
|
|
1136
1139
|
return l ? {
|
|
1137
1140
|
...S,
|
|
1138
|
-
transform: "translate(" +
|
|
1139
|
-
...
|
|
1141
|
+
transform: "translate(" + A + "px, " + j + "px)",
|
|
1142
|
+
...et(k.floating) >= 1.5 && {
|
|
1140
1143
|
willChange: "transform"
|
|
1141
1144
|
}
|
|
1142
1145
|
} : {
|
|
1143
1146
|
position: t,
|
|
1144
|
-
left:
|
|
1147
|
+
left: A,
|
|
1145
1148
|
top: j
|
|
1146
1149
|
};
|
|
1147
|
-
}, [t, l,
|
|
1150
|
+
}, [t, l, k.floating, u.x, u.y]);
|
|
1148
1151
|
return C.useMemo(() => ({
|
|
1149
1152
|
...u,
|
|
1150
1153
|
update: B,
|
|
1151
1154
|
refs: te,
|
|
1152
|
-
elements:
|
|
1155
|
+
elements: k,
|
|
1153
1156
|
floatingStyles: V
|
|
1154
|
-
}), [u, B, te,
|
|
1157
|
+
}), [u, B, te, k, V]);
|
|
1155
1158
|
}
|
|
1156
|
-
const
|
|
1157
|
-
...
|
|
1158
|
-
options: [e, o]
|
|
1159
|
-
}), Kt = (e, o) => ({
|
|
1160
|
-
...Bt(e),
|
|
1159
|
+
const Kt = (e, o) => ({
|
|
1160
|
+
...jt(e),
|
|
1161
1161
|
options: [e, o]
|
|
1162
1162
|
}), Yt = (e, o) => ({
|
|
1163
|
-
|
|
1163
|
+
...$t(e),
|
|
1164
|
+
options: [e, o]
|
|
1165
|
+
}), Xt = (e, o) => ({
|
|
1166
|
+
...Ht(e),
|
|
1164
1167
|
options: [e, o]
|
|
1165
1168
|
});
|
|
1166
|
-
function
|
|
1169
|
+
function Zt(e, o) {
|
|
1167
1170
|
return () => {
|
|
1168
1171
|
if (typeof document > "u")
|
|
1169
1172
|
return;
|
|
@@ -1175,7 +1178,7 @@ function qt(e, o) {
|
|
|
1175
1178
|
};
|
|
1176
1179
|
};
|
|
1177
1180
|
}
|
|
1178
|
-
function
|
|
1181
|
+
function tt(e) {
|
|
1179
1182
|
const {
|
|
1180
1183
|
className: o,
|
|
1181
1184
|
placement: t = "bottom-start",
|
|
@@ -1184,56 +1187,56 @@ function Qe(e) {
|
|
|
1184
1187
|
children: s,
|
|
1185
1188
|
onClose: r,
|
|
1186
1189
|
onOpen: l,
|
|
1187
|
-
disabled:
|
|
1188
|
-
show:
|
|
1190
|
+
disabled: a = !1,
|
|
1191
|
+
show: c = !1,
|
|
1189
1192
|
setShow: u,
|
|
1190
1193
|
role: d = "tooltip",
|
|
1191
|
-
style:
|
|
1194
|
+
style: h,
|
|
1192
1195
|
...f
|
|
1193
|
-
} = e, [g,
|
|
1194
|
-
open:
|
|
1195
|
-
middleware: [
|
|
1196
|
-
whileElementsMounted:
|
|
1196
|
+
} = e, [g, x] = de(c), w = () => u !== void 0 && c !== void 0 ? c : g, m = () => u !== void 0 && c !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: y } = qt({
|
|
1197
|
+
open: w(),
|
|
1198
|
+
middleware: [Kt(4), Xt(), Yt()],
|
|
1199
|
+
whileElementsMounted: Bt,
|
|
1197
1200
|
placement: t
|
|
1198
|
-
}),
|
|
1201
|
+
}), R = it();
|
|
1199
1202
|
return re(
|
|
1200
|
-
|
|
1201
|
-
|
|
1203
|
+
Zt(y.floating, (O) => {
|
|
1204
|
+
O && m()(!1);
|
|
1202
1205
|
}),
|
|
1203
1206
|
[]
|
|
1204
|
-
), /* @__PURE__ */ W(
|
|
1207
|
+
), /* @__PURE__ */ W(Ve, { children: [
|
|
1205
1208
|
/* @__PURE__ */ b(
|
|
1206
1209
|
"div",
|
|
1207
1210
|
{
|
|
1208
1211
|
className: "z-auto min-w-fit max-w-fit",
|
|
1209
|
-
id: `zen__popover-${
|
|
1212
|
+
id: `zen__popover-${R}`,
|
|
1210
1213
|
ref: y.setReference,
|
|
1211
|
-
onClick: (
|
|
1214
|
+
onClick: (O) => {
|
|
1212
1215
|
if (n === "click") {
|
|
1213
|
-
if (
|
|
1216
|
+
if (a)
|
|
1214
1217
|
return;
|
|
1215
|
-
|
|
1218
|
+
w() ? (m()(!1), r == null || r()) : (m()(!0), l == null || l());
|
|
1216
1219
|
}
|
|
1217
|
-
|
|
1220
|
+
O.stopPropagation();
|
|
1218
1221
|
},
|
|
1219
1222
|
role: d,
|
|
1220
1223
|
children: s
|
|
1221
1224
|
}
|
|
1222
1225
|
),
|
|
1223
|
-
|
|
1226
|
+
w() && rt(
|
|
1224
1227
|
/* @__PURE__ */ b(
|
|
1225
1228
|
"div",
|
|
1226
1229
|
{
|
|
1227
1230
|
...f,
|
|
1228
|
-
onClick: (
|
|
1231
|
+
onClick: (O) => O.stopPropagation(),
|
|
1229
1232
|
role: "tooltip",
|
|
1230
|
-
className:
|
|
1233
|
+
className: M(
|
|
1231
1234
|
"zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
|
|
1232
1235
|
o
|
|
1233
1236
|
),
|
|
1234
1237
|
ref: y.setFloating,
|
|
1235
1238
|
style: {
|
|
1236
|
-
...
|
|
1239
|
+
...h,
|
|
1237
1240
|
position: E,
|
|
1238
1241
|
top: v ?? 0,
|
|
1239
1242
|
left: p ?? 0
|
|
@@ -1245,66 +1248,66 @@ function Qe(e) {
|
|
|
1245
1248
|
)
|
|
1246
1249
|
] });
|
|
1247
1250
|
}
|
|
1248
|
-
function
|
|
1249
|
-
var
|
|
1251
|
+
function Gt(e) {
|
|
1252
|
+
var x, w;
|
|
1250
1253
|
const {
|
|
1251
1254
|
items: o = [],
|
|
1252
1255
|
children: t,
|
|
1253
1256
|
moreItemsLabel: n = "",
|
|
1254
1257
|
parentRef: i,
|
|
1255
1258
|
data: s,
|
|
1256
|
-
estimator: r = (
|
|
1259
|
+
estimator: r = (m, p) => p + 30,
|
|
1257
1260
|
font: l = "12px Inter",
|
|
1258
|
-
badgeVariant:
|
|
1259
|
-
badgeStyles:
|
|
1261
|
+
badgeVariant: a = "secondary",
|
|
1262
|
+
badgeStyles: c
|
|
1260
1263
|
} = e, [u, d] = de({
|
|
1261
1264
|
visible: o,
|
|
1262
1265
|
hidden: []
|
|
1263
|
-
}),
|
|
1266
|
+
}), h = ve(() => {
|
|
1264
1267
|
if (typeof document > "u")
|
|
1265
1268
|
return null;
|
|
1266
1269
|
const p = document.createElement("canvas").getContext("2d");
|
|
1267
1270
|
return p && (p.font = l), p;
|
|
1268
1271
|
}, []), f = () => {
|
|
1269
|
-
const
|
|
1270
|
-
if (!
|
|
1272
|
+
const m = i == null ? void 0 : i.current;
|
|
1273
|
+
if (!m)
|
|
1271
1274
|
return;
|
|
1272
|
-
const p =
|
|
1275
|
+
const p = m.offsetWidth, v = [], E = [], y = r(
|
|
1273
1276
|
n,
|
|
1274
|
-
((
|
|
1277
|
+
((h == null ? void 0 : h.measureText(n).width) ?? 0) + 10
|
|
1275
1278
|
);
|
|
1276
|
-
g == null || g.reduce((
|
|
1279
|
+
g == null || g.reduce((R, O, z) => (R + O + y > p - 20 ? E.push(o[z]) : v.push(o[z]), R + O), 0), d({
|
|
1277
1280
|
visible: v,
|
|
1278
1281
|
hidden: E
|
|
1279
1282
|
});
|
|
1280
1283
|
}, g = ve(
|
|
1281
|
-
() => (o == null ? void 0 : o.map((
|
|
1284
|
+
() => (o == null ? void 0 : o.map((m) => r(m, (h == null ? void 0 : h.measureText(m).width) ?? 0))) ?? [],
|
|
1282
1285
|
[o]
|
|
1283
1286
|
);
|
|
1284
1287
|
return re(() => {
|
|
1285
1288
|
f();
|
|
1286
1289
|
}, [o]), re(() => {
|
|
1287
1290
|
if (!(i != null && i.current)) return;
|
|
1288
|
-
const
|
|
1291
|
+
const m = new ResizeObserver(() => {
|
|
1289
1292
|
f();
|
|
1290
1293
|
});
|
|
1291
|
-
return
|
|
1292
|
-
|
|
1294
|
+
return m.observe(i.current), () => {
|
|
1295
|
+
m.disconnect();
|
|
1293
1296
|
};
|
|
1294
|
-
}, [o]), /* @__PURE__ */ W(
|
|
1295
|
-
(
|
|
1296
|
-
((
|
|
1297
|
-
|
|
1297
|
+
}, [o]), /* @__PURE__ */ W(Ve, { children: [
|
|
1298
|
+
(x = u.visible) == null ? void 0 : x.map((m, p) => t(m, p, s == null ? void 0 : s[p])),
|
|
1299
|
+
((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
|
|
1300
|
+
tt,
|
|
1298
1301
|
{
|
|
1299
1302
|
trigger: "click",
|
|
1300
1303
|
content: /* @__PURE__ */ b("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
|
|
1301
|
-
(
|
|
1302
|
-
|
|
1304
|
+
(m, p) => t(
|
|
1305
|
+
m,
|
|
1303
1306
|
u.visible.length + p,
|
|
1304
1307
|
s == null ? void 0 : s[u.visible.length + p]
|
|
1305
1308
|
)
|
|
1306
1309
|
) }),
|
|
1307
|
-
children: /* @__PURE__ */ b(
|
|
1310
|
+
children: /* @__PURE__ */ b(Be, { className: c, variant: a, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
|
|
1308
1311
|
}
|
|
1309
1312
|
)
|
|
1310
1313
|
] });
|
|
@@ -1312,33 +1315,33 @@ function Xt(e) {
|
|
|
1312
1315
|
function X(e, o, t) {
|
|
1313
1316
|
let n = t.initialDeps ?? [], i;
|
|
1314
1317
|
return () => {
|
|
1315
|
-
var s, r, l,
|
|
1316
|
-
let
|
|
1317
|
-
t.key && ((s = t.debug) != null && s.call(t)) && (
|
|
1318
|
+
var s, r, l, a;
|
|
1319
|
+
let c;
|
|
1320
|
+
t.key && ((s = t.debug) != null && s.call(t)) && (c = Date.now());
|
|
1318
1321
|
const u = e();
|
|
1319
1322
|
if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
|
|
1320
1323
|
return i;
|
|
1321
1324
|
n = u;
|
|
1322
|
-
let
|
|
1323
|
-
if (t.key && ((r = t.debug) != null && r.call(t)) && (
|
|
1324
|
-
const f = Math.round((Date.now() -
|
|
1325
|
-
for (
|
|
1326
|
-
|
|
1327
|
-
return
|
|
1325
|
+
let h;
|
|
1326
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (h = Date.now()), i = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
1327
|
+
const f = Math.round((Date.now() - c) * 100) / 100, g = Math.round((Date.now() - h) * 100) / 100, x = g / 16, w = (m, p) => {
|
|
1328
|
+
for (m = String(m); m.length < p; )
|
|
1329
|
+
m = " " + m;
|
|
1330
|
+
return m;
|
|
1328
1331
|
};
|
|
1329
1332
|
console.info(
|
|
1330
|
-
`%c⏱ ${
|
|
1333
|
+
`%c⏱ ${w(g, 5)} /${w(f, 5)} ms`,
|
|
1331
1334
|
`
|
|
1332
1335
|
font-size: .6rem;
|
|
1333
1336
|
font-weight: bold;
|
|
1334
1337
|
color: hsl(${Math.max(
|
|
1335
1338
|
0,
|
|
1336
|
-
Math.min(120 - 120 *
|
|
1339
|
+
Math.min(120 - 120 * x, 120)
|
|
1337
1340
|
)}deg 100% 31%);`,
|
|
1338
1341
|
t == null ? void 0 : t.key
|
|
1339
1342
|
);
|
|
1340
1343
|
}
|
|
1341
|
-
return (
|
|
1344
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, i), i;
|
|
1342
1345
|
};
|
|
1343
1346
|
}
|
|
1344
1347
|
function be(e, o) {
|
|
@@ -1346,17 +1349,17 @@ function be(e, o) {
|
|
|
1346
1349
|
throw new Error("Unexpected undefined");
|
|
1347
1350
|
return e;
|
|
1348
1351
|
}
|
|
1349
|
-
const
|
|
1352
|
+
const Jt = (e, o) => Math.abs(e - o) < 1, Qt = (e, o, t) => {
|
|
1350
1353
|
let n;
|
|
1351
1354
|
return function(...i) {
|
|
1352
1355
|
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, i), t);
|
|
1353
1356
|
};
|
|
1354
|
-
},
|
|
1357
|
+
}, en = (e) => e, tn = (e) => {
|
|
1355
1358
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
1356
1359
|
for (let i = o; i <= t; i++)
|
|
1357
1360
|
n.push(i);
|
|
1358
1361
|
return n;
|
|
1359
|
-
},
|
|
1362
|
+
}, nn = (e, o) => {
|
|
1360
1363
|
const t = e.scrollElement;
|
|
1361
1364
|
if (!t)
|
|
1362
1365
|
return;
|
|
@@ -1364,29 +1367,32 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1364
1367
|
if (!n)
|
|
1365
1368
|
return;
|
|
1366
1369
|
const i = (r) => {
|
|
1367
|
-
const { width: l, height:
|
|
1368
|
-
o({ width: Math.round(l), height: Math.round(
|
|
1370
|
+
const { width: l, height: a } = r;
|
|
1371
|
+
o({ width: Math.round(l), height: Math.round(a) });
|
|
1369
1372
|
};
|
|
1370
1373
|
if (i(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
1371
1374
|
return () => {
|
|
1372
1375
|
};
|
|
1373
1376
|
const s = new n.ResizeObserver((r) => {
|
|
1374
|
-
const l =
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1377
|
+
const l = () => {
|
|
1378
|
+
const a = r[0];
|
|
1379
|
+
if (a != null && a.borderBoxSize) {
|
|
1380
|
+
const c = a.borderBoxSize[0];
|
|
1381
|
+
if (c) {
|
|
1382
|
+
i({ width: c.inlineSize, height: c.blockSize });
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1380
1385
|
}
|
|
1381
|
-
|
|
1382
|
-
|
|
1386
|
+
i(t.getBoundingClientRect());
|
|
1387
|
+
};
|
|
1388
|
+
e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
|
|
1383
1389
|
});
|
|
1384
1390
|
return s.observe(t, { box: "border-box" }), () => {
|
|
1385
1391
|
s.unobserve(t);
|
|
1386
1392
|
};
|
|
1387
1393
|
}, De = {
|
|
1388
1394
|
passive: !0
|
|
1389
|
-
},
|
|
1395
|
+
}, Fe = typeof window > "u" ? !0 : "onscrollend" in window, on = (e, o) => {
|
|
1390
1396
|
const t = e.scrollElement;
|
|
1391
1397
|
if (!t)
|
|
1392
1398
|
return;
|
|
@@ -1394,21 +1400,23 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1394
1400
|
if (!n)
|
|
1395
1401
|
return;
|
|
1396
1402
|
let i = 0;
|
|
1397
|
-
const s = e.options.useScrollendEvent &&
|
|
1398
|
-
} :
|
|
1403
|
+
const s = e.options.useScrollendEvent && Fe ? () => {
|
|
1404
|
+
} : Qt(
|
|
1399
1405
|
n,
|
|
1400
1406
|
() => {
|
|
1401
1407
|
o(i, !1);
|
|
1402
1408
|
},
|
|
1403
1409
|
e.options.isScrollingResetDelay
|
|
1404
|
-
), r = (
|
|
1405
|
-
const { horizontal:
|
|
1406
|
-
i =
|
|
1407
|
-
}, l = r(!0),
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
+
), r = (u) => () => {
|
|
1411
|
+
const { horizontal: d, isRtl: h } = e.options;
|
|
1412
|
+
i = d ? t.scrollLeft * (h && -1 || 1) : t.scrollTop, s(), o(i, u);
|
|
1413
|
+
}, l = r(!0), a = r(!1);
|
|
1414
|
+
a(), t.addEventListener("scroll", l, De);
|
|
1415
|
+
const c = e.options.useScrollendEvent && Fe;
|
|
1416
|
+
return c && t.addEventListener("scrollend", a, De), () => {
|
|
1417
|
+
t.removeEventListener("scroll", l), c && t.removeEventListener("scrollend", a);
|
|
1410
1418
|
};
|
|
1411
|
-
},
|
|
1419
|
+
}, sn = (e, o, t) => {
|
|
1412
1420
|
if (o != null && o.borderBoxSize) {
|
|
1413
1421
|
const n = o.borderBoxSize[0];
|
|
1414
1422
|
if (n)
|
|
@@ -1419,7 +1427,7 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1419
1427
|
return Math.round(
|
|
1420
1428
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
1421
1429
|
);
|
|
1422
|
-
},
|
|
1430
|
+
}, rn = (e, {
|
|
1423
1431
|
adjustments: o = 0,
|
|
1424
1432
|
behavior: t
|
|
1425
1433
|
}, n) => {
|
|
@@ -1430,13 +1438,16 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1430
1438
|
behavior: t
|
|
1431
1439
|
});
|
|
1432
1440
|
};
|
|
1433
|
-
class
|
|
1441
|
+
class ln {
|
|
1434
1442
|
constructor(o) {
|
|
1435
1443
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
1436
1444
|
let t = null;
|
|
1437
1445
|
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((i) => {
|
|
1438
1446
|
i.forEach((s) => {
|
|
1439
|
-
|
|
1447
|
+
const r = () => {
|
|
1448
|
+
this._measureElement(s.target, s);
|
|
1449
|
+
};
|
|
1450
|
+
this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(r) : r();
|
|
1440
1451
|
});
|
|
1441
1452
|
}));
|
|
1442
1453
|
return {
|
|
@@ -1465,11 +1476,11 @@ class rn {
|
|
|
1465
1476
|
scrollPaddingStart: 0,
|
|
1466
1477
|
scrollPaddingEnd: 0,
|
|
1467
1478
|
horizontal: !1,
|
|
1468
|
-
getItemKey:
|
|
1469
|
-
rangeExtractor:
|
|
1479
|
+
getItemKey: en,
|
|
1480
|
+
rangeExtractor: tn,
|
|
1470
1481
|
onChange: () => {
|
|
1471
1482
|
},
|
|
1472
|
-
measureElement:
|
|
1483
|
+
measureElement: sn,
|
|
1473
1484
|
initialRect: { width: 0, height: 0 },
|
|
1474
1485
|
scrollMargin: 0,
|
|
1475
1486
|
gap: 0,
|
|
@@ -1480,6 +1491,7 @@ class rn {
|
|
|
1480
1491
|
enabled: !0,
|
|
1481
1492
|
isRtl: !1,
|
|
1482
1493
|
useScrollendEvent: !0,
|
|
1494
|
+
useAnimationFrameWithResizeObserver: !1,
|
|
1483
1495
|
...t
|
|
1484
1496
|
};
|
|
1485
1497
|
}, this.notify = (t) => {
|
|
@@ -1536,10 +1548,10 @@ class rn {
|
|
|
1536
1548
|
const l = t[r];
|
|
1537
1549
|
if (i.has(l.lane))
|
|
1538
1550
|
continue;
|
|
1539
|
-
const
|
|
1551
|
+
const a = s.get(
|
|
1540
1552
|
l.lane
|
|
1541
1553
|
);
|
|
1542
|
-
if (
|
|
1554
|
+
if (a == null || l.end > a.end ? s.set(l.lane, l) : l.end < a.end && i.set(l.lane, !0), i.size === this.options.lanes)
|
|
1543
1555
|
break;
|
|
1544
1556
|
}
|
|
1545
1557
|
return s.size === this.options.lanes ? Array.from(s.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
|
|
@@ -1569,52 +1581,63 @@ class rn {
|
|
|
1569
1581
|
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
|
|
1570
1582
|
this.itemSizeCache.set(u.key, u.size);
|
|
1571
1583
|
}));
|
|
1572
|
-
const
|
|
1584
|
+
const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
1573
1585
|
this.pendingMeasuredCacheIndexes = [];
|
|
1574
|
-
const
|
|
1575
|
-
for (let u =
|
|
1576
|
-
const d = s(u),
|
|
1577
|
-
|
|
1586
|
+
const c = this.measurementsCache.slice(0, a);
|
|
1587
|
+
for (let u = a; u < t; u++) {
|
|
1588
|
+
const d = s(u), h = this.options.lanes === 1 ? c[u - 1] : this.getFurthestMeasurement(c, u), f = h ? h.end + this.options.gap : n + i, g = l.get(d), x = typeof g == "number" ? g : this.options.estimateSize(u), w = f + x, m = h ? h.lane : u % this.options.lanes;
|
|
1589
|
+
c[u] = {
|
|
1578
1590
|
index: u,
|
|
1579
1591
|
start: f,
|
|
1580
|
-
size:
|
|
1581
|
-
end:
|
|
1592
|
+
size: x,
|
|
1593
|
+
end: w,
|
|
1582
1594
|
key: d,
|
|
1583
|
-
lane:
|
|
1595
|
+
lane: m
|
|
1584
1596
|
};
|
|
1585
1597
|
}
|
|
1586
|
-
return this.measurementsCache =
|
|
1598
|
+
return this.measurementsCache = c, c;
|
|
1587
1599
|
},
|
|
1588
1600
|
{
|
|
1589
1601
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
1590
1602
|
debug: () => this.options.debug
|
|
1591
1603
|
}
|
|
1592
1604
|
), this.calculateRange = X(
|
|
1593
|
-
() => [
|
|
1594
|
-
|
|
1605
|
+
() => [
|
|
1606
|
+
this.getMeasurements(),
|
|
1607
|
+
this.getSize(),
|
|
1608
|
+
this.getScrollOffset(),
|
|
1609
|
+
this.options.lanes
|
|
1610
|
+
],
|
|
1611
|
+
(t, n, i, s) => this.range = t.length > 0 && n > 0 ? cn({
|
|
1595
1612
|
measurements: t,
|
|
1596
1613
|
outerSize: n,
|
|
1597
|
-
scrollOffset: i
|
|
1614
|
+
scrollOffset: i,
|
|
1615
|
+
lanes: s
|
|
1598
1616
|
}) : null,
|
|
1599
1617
|
{
|
|
1600
1618
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
1601
1619
|
debug: () => this.options.debug
|
|
1602
1620
|
}
|
|
1603
|
-
), this.
|
|
1604
|
-
() =>
|
|
1605
|
-
|
|
1606
|
-
this.calculateRange()
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1621
|
+
), this.getVirtualIndexes = X(
|
|
1622
|
+
() => {
|
|
1623
|
+
let t = null, n = null;
|
|
1624
|
+
const i = this.calculateRange();
|
|
1625
|
+
return i && (t = i.startIndex, n = i.endIndex), [
|
|
1626
|
+
this.options.rangeExtractor,
|
|
1627
|
+
this.options.overscan,
|
|
1628
|
+
this.options.count,
|
|
1629
|
+
t,
|
|
1630
|
+
n
|
|
1631
|
+
];
|
|
1632
|
+
},
|
|
1633
|
+
(t, n, i, s, r) => s === null || r === null ? [] : t({
|
|
1634
|
+
startIndex: s,
|
|
1635
|
+
endIndex: r,
|
|
1636
|
+
overscan: n,
|
|
1637
|
+
count: i
|
|
1615
1638
|
}),
|
|
1616
1639
|
{
|
|
1617
|
-
key: process.env.NODE_ENV !== "production" && "
|
|
1640
|
+
key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
|
|
1618
1641
|
debug: () => this.options.debug
|
|
1619
1642
|
}
|
|
1620
1643
|
), this.indexFromElement = (t) => {
|
|
@@ -1646,12 +1669,12 @@ class rn {
|
|
|
1646
1669
|
}
|
|
1647
1670
|
this._measureElement(t, void 0);
|
|
1648
1671
|
}, this.getVirtualItems = X(
|
|
1649
|
-
() => [this.
|
|
1672
|
+
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
1650
1673
|
(t, n) => {
|
|
1651
1674
|
const i = [];
|
|
1652
1675
|
for (let s = 0, r = t.length; s < r; s++) {
|
|
1653
|
-
const l = t[s],
|
|
1654
|
-
i.push(
|
|
1676
|
+
const l = t[s], a = n[l];
|
|
1677
|
+
i.push(a);
|
|
1655
1678
|
}
|
|
1656
1679
|
return i;
|
|
1657
1680
|
},
|
|
@@ -1663,17 +1686,17 @@ class rn {
|
|
|
1663
1686
|
const n = this.getMeasurements();
|
|
1664
1687
|
if (n.length !== 0)
|
|
1665
1688
|
return be(
|
|
1666
|
-
n[
|
|
1689
|
+
n[nt(
|
|
1667
1690
|
0,
|
|
1668
1691
|
n.length - 1,
|
|
1669
1692
|
(i) => be(n[i]).start,
|
|
1670
1693
|
t
|
|
1671
1694
|
)]
|
|
1672
1695
|
);
|
|
1673
|
-
}, this.getOffsetForAlignment = (t, n) => {
|
|
1674
|
-
const
|
|
1675
|
-
n === "auto" && (
|
|
1676
|
-
const
|
|
1696
|
+
}, this.getOffsetForAlignment = (t, n, i = 0) => {
|
|
1697
|
+
const s = this.getSize(), r = this.getScrollOffset();
|
|
1698
|
+
n === "auto" && (n = t >= r + s ? "end" : "start"), n === "center" ? t += (i - s) / 2 : n === "end" && (t -= s);
|
|
1699
|
+
const l = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[l] : this.scrollElement[l] : 0) - s;
|
|
1677
1700
|
return Math.max(Math.min(c, t), 0);
|
|
1678
1701
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
1679
1702
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
@@ -1689,7 +1712,10 @@ class rn {
|
|
|
1689
1712
|
else
|
|
1690
1713
|
return [r, n];
|
|
1691
1714
|
const l = n === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
|
|
1692
|
-
return [
|
|
1715
|
+
return [
|
|
1716
|
+
this.getOffsetForAlignment(l, n, i.size),
|
|
1717
|
+
n
|
|
1718
|
+
];
|
|
1693
1719
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
1694
1720
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
1695
1721
|
}, this.scrollToOffset = (t, { align: n = "start", behavior: i } = {}) => {
|
|
@@ -1710,10 +1736,10 @@ class rn {
|
|
|
1710
1736
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
1711
1737
|
this.options.getItemKey(t)
|
|
1712
1738
|
)) {
|
|
1713
|
-
const [
|
|
1739
|
+
const [c] = be(
|
|
1714
1740
|
this.getOffsetForIndex(t, l)
|
|
1715
1741
|
);
|
|
1716
|
-
|
|
1742
|
+
Jt(c, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
|
|
1717
1743
|
} else
|
|
1718
1744
|
this.scrollToIndex(t, { align: l, behavior: i });
|
|
1719
1745
|
}));
|
|
@@ -1744,7 +1770,7 @@ class rn {
|
|
|
1744
1770
|
}, this.setOptions(o);
|
|
1745
1771
|
}
|
|
1746
1772
|
}
|
|
1747
|
-
const
|
|
1773
|
+
const nt = (e, o, t, n) => {
|
|
1748
1774
|
for (; e <= o; ) {
|
|
1749
1775
|
const i = (e + o) / 2 | 0, s = t(i);
|
|
1750
1776
|
if (s < n)
|
|
@@ -1756,39 +1782,45 @@ const et = (e, o, t, n) => {
|
|
|
1756
1782
|
}
|
|
1757
1783
|
return e > 0 ? e - 1 : 0;
|
|
1758
1784
|
};
|
|
1759
|
-
function
|
|
1785
|
+
function cn({
|
|
1760
1786
|
measurements: e,
|
|
1761
1787
|
outerSize: o,
|
|
1762
|
-
scrollOffset: t
|
|
1788
|
+
scrollOffset: t,
|
|
1789
|
+
lanes: n
|
|
1763
1790
|
}) {
|
|
1764
|
-
const
|
|
1765
|
-
let r =
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1791
|
+
const i = e.length - 1;
|
|
1792
|
+
let r = nt(
|
|
1793
|
+
0,
|
|
1794
|
+
i,
|
|
1795
|
+
(a) => e[a].start,
|
|
1796
|
+
t
|
|
1797
|
+
), l = r;
|
|
1798
|
+
for (; l < i && e[l].end < t + o; )
|
|
1799
|
+
l++;
|
|
1800
|
+
return n > 1 && (r = Math.max(0, r - r % n), l = Math.min(i, l + (n - 1 - l % n))), { startIndex: r, endIndex: l };
|
|
1769
1801
|
}
|
|
1770
1802
|
const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
|
|
1771
|
-
function
|
|
1803
|
+
function an(e) {
|
|
1772
1804
|
const o = C.useReducer(() => ({}), {})[1], t = {
|
|
1773
1805
|
...e,
|
|
1774
1806
|
onChange: (i, s) => {
|
|
1775
1807
|
var r;
|
|
1776
|
-
s ?
|
|
1808
|
+
s ? lt(o) : o(), (r = e.onChange) == null || r.call(e, i, s);
|
|
1777
1809
|
}
|
|
1778
1810
|
}, [n] = C.useState(
|
|
1779
|
-
() => new
|
|
1811
|
+
() => new ln(t)
|
|
1780
1812
|
);
|
|
1781
1813
|
return n.setOptions(t), Pe(() => n._didMount(), []), Pe(() => n._willUpdate()), n;
|
|
1782
1814
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return
|
|
1785
|
-
observeElementRect:
|
|
1786
|
-
observeElementOffset:
|
|
1787
|
-
scrollToFn:
|
|
1815
|
+
function un(e) {
|
|
1816
|
+
return an({
|
|
1817
|
+
observeElementRect: nn,
|
|
1818
|
+
observeElementOffset: on,
|
|
1819
|
+
scrollToFn: rn,
|
|
1788
1820
|
...e
|
|
1789
1821
|
});
|
|
1790
1822
|
}
|
|
1791
|
-
function
|
|
1823
|
+
function fn(e) {
|
|
1792
1824
|
return /* @__PURE__ */ b(
|
|
1793
1825
|
"svg",
|
|
1794
1826
|
{
|
|
@@ -1803,7 +1835,7 @@ function un(e) {
|
|
|
1803
1835
|
}
|
|
1804
1836
|
);
|
|
1805
1837
|
}
|
|
1806
|
-
function
|
|
1838
|
+
function dn(e) {
|
|
1807
1839
|
return /* @__PURE__ */ b(
|
|
1808
1840
|
"svg",
|
|
1809
1841
|
{
|
|
@@ -1825,7 +1857,7 @@ function fn(e) {
|
|
|
1825
1857
|
}
|
|
1826
1858
|
);
|
|
1827
1859
|
}
|
|
1828
|
-
function
|
|
1860
|
+
function hn(e) {
|
|
1829
1861
|
return /* @__PURE__ */ b(
|
|
1830
1862
|
"svg",
|
|
1831
1863
|
{
|
|
@@ -1850,35 +1882,35 @@ function wn(e) {
|
|
|
1850
1882
|
disabled: s,
|
|
1851
1883
|
placeholder: r = "Select an Item",
|
|
1852
1884
|
multiple: l,
|
|
1853
|
-
mutable:
|
|
1854
|
-
onAdd:
|
|
1855
|
-
} = e, u = Ee(null), [d,
|
|
1885
|
+
mutable: a,
|
|
1886
|
+
onAdd: c
|
|
1887
|
+
} = e, u = Ee(null), [d, h] = de(!1), f = Ee(null);
|
|
1856
1888
|
return /* @__PURE__ */ b(
|
|
1857
|
-
|
|
1889
|
+
tt,
|
|
1858
1890
|
{
|
|
1859
1891
|
placement: "bottom",
|
|
1860
1892
|
trigger: "click",
|
|
1861
1893
|
show: d,
|
|
1862
|
-
setShow:
|
|
1894
|
+
setShow: h,
|
|
1863
1895
|
role: "combobox",
|
|
1864
1896
|
disabled: s,
|
|
1865
1897
|
style: {
|
|
1866
1898
|
"--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
|
|
1867
1899
|
},
|
|
1868
1900
|
content: /* @__PURE__ */ b(
|
|
1869
|
-
|
|
1901
|
+
mn,
|
|
1870
1902
|
{
|
|
1871
|
-
...
|
|
1903
|
+
...a ? { mutable: a, onAdd: c } : { mutable: a },
|
|
1872
1904
|
...l ? { multiple: l, items: o, onChange: i, selected: t } : { items: o, onChange: i, selected: t }
|
|
1873
1905
|
}
|
|
1874
1906
|
),
|
|
1875
1907
|
children: /* @__PURE__ */ W(
|
|
1876
1908
|
"div",
|
|
1877
1909
|
{
|
|
1878
|
-
className:
|
|
1910
|
+
className: M(
|
|
1879
1911
|
"inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1880
1912
|
s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
|
|
1881
|
-
d && "border-primary shadow-
|
|
1913
|
+
d && "border-primary shadow-xs shadow-ring",
|
|
1882
1914
|
n
|
|
1883
1915
|
),
|
|
1884
1916
|
ref: f,
|
|
@@ -1886,51 +1918,51 @@ function wn(e) {
|
|
|
1886
1918
|
/* @__PURE__ */ b(
|
|
1887
1919
|
"div",
|
|
1888
1920
|
{
|
|
1889
|
-
className:
|
|
1921
|
+
className: M(
|
|
1890
1922
|
"flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
|
|
1891
1923
|
s ? "text-muted-foreground" : "text-foreground"
|
|
1892
1924
|
),
|
|
1893
1925
|
ref: u,
|
|
1894
1926
|
children: l ? /* @__PURE__ */ b(
|
|
1895
|
-
|
|
1927
|
+
Gt,
|
|
1896
1928
|
{
|
|
1897
|
-
items: t.map((
|
|
1929
|
+
items: t.map((x) => x.text),
|
|
1898
1930
|
data: t,
|
|
1899
1931
|
parentRef: u,
|
|
1900
|
-
estimator: (
|
|
1932
|
+
estimator: (x, w) => w + 40,
|
|
1901
1933
|
badgeVariant: "secondary",
|
|
1902
|
-
badgeStyles: "
|
|
1903
|
-
children: (
|
|
1904
|
-
|
|
1934
|
+
badgeStyles: "bg-input! h-6 min-w-min gap-2 bg-input!",
|
|
1935
|
+
children: (x, w, m) => /* @__PURE__ */ W(
|
|
1936
|
+
Be,
|
|
1905
1937
|
{
|
|
1906
|
-
className: "flex h-6 min-w-min gap-2
|
|
1938
|
+
className: "flex h-6 min-w-min gap-2 bg-input! pr-1",
|
|
1907
1939
|
variant: "secondary",
|
|
1908
1940
|
children: [
|
|
1909
|
-
|
|
1941
|
+
x,
|
|
1910
1942
|
/* @__PURE__ */ b(
|
|
1911
|
-
|
|
1943
|
+
at,
|
|
1912
1944
|
{
|
|
1913
1945
|
onClick: () => {
|
|
1914
|
-
i(t.filter((p) => p.key !== (
|
|
1946
|
+
i(t.filter((p) => p.key !== (m == null ? void 0 : m.key)));
|
|
1915
1947
|
},
|
|
1916
1948
|
variant: "icon",
|
|
1917
1949
|
size: "icon",
|
|
1918
1950
|
className: "group bg-muted p-0.5 hover:bg-muted-foreground",
|
|
1919
|
-
children: /* @__PURE__ */ b(
|
|
1951
|
+
children: /* @__PURE__ */ b(hn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
|
|
1920
1952
|
}
|
|
1921
1953
|
)
|
|
1922
1954
|
]
|
|
1923
1955
|
},
|
|
1924
|
-
`collapsed_item_${
|
|
1956
|
+
`collapsed_item_${w}`
|
|
1925
1957
|
)
|
|
1926
1958
|
}
|
|
1927
1959
|
) : t.text ?? r
|
|
1928
1960
|
}
|
|
1929
1961
|
),
|
|
1930
1962
|
/* @__PURE__ */ b(
|
|
1931
|
-
|
|
1963
|
+
fn,
|
|
1932
1964
|
{
|
|
1933
|
-
className:
|
|
1965
|
+
className: M(
|
|
1934
1966
|
"size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
|
|
1935
1967
|
d ? "rotate-180" : "rotate-0",
|
|
1936
1968
|
s ? "text-muted-foreground" : "text-foreground"
|
|
@@ -1943,33 +1975,33 @@ function wn(e) {
|
|
|
1943
1975
|
}
|
|
1944
1976
|
);
|
|
1945
1977
|
}
|
|
1946
|
-
function
|
|
1947
|
-
const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l,
|
|
1978
|
+
function mn(e) {
|
|
1979
|
+
const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l, a] = de(""), c = Ee(null), u = ve(
|
|
1948
1980
|
() => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
|
|
1949
1981
|
[o, l]
|
|
1950
|
-
), d =
|
|
1982
|
+
), d = un({
|
|
1951
1983
|
count: u.length,
|
|
1952
|
-
getScrollElement: () =>
|
|
1984
|
+
getScrollElement: () => c.current,
|
|
1953
1985
|
estimateSize: () => 35
|
|
1954
|
-
}),
|
|
1986
|
+
}), h = n instanceof Array ? n.map((f) => f.key) : [n.key];
|
|
1955
1987
|
return /* @__PURE__ */ W("div", { className: "flex min-w-[var(--input-width)] flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background", children: [
|
|
1956
|
-
/* @__PURE__ */ W("div", { className:
|
|
1957
|
-
/* @__PURE__ */ b(
|
|
1988
|
+
/* @__PURE__ */ W("div", { className: M("inline-flex grow items-center rounded px-3 py-2"), children: [
|
|
1989
|
+
/* @__PURE__ */ b(dn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
|
|
1958
1990
|
/* @__PURE__ */ b(
|
|
1959
1991
|
"input",
|
|
1960
1992
|
{
|
|
1961
|
-
className: "inline-flex grow bg-transparent text-sm text-foreground outline-
|
|
1993
|
+
className: "inline-flex grow bg-transparent text-sm text-foreground outline-hidden",
|
|
1962
1994
|
placeholder: "Search",
|
|
1963
1995
|
value: l,
|
|
1964
|
-
onChange: (f) =>
|
|
1996
|
+
onChange: (f) => a(f.target.value)
|
|
1965
1997
|
}
|
|
1966
1998
|
)
|
|
1967
1999
|
] }),
|
|
1968
2000
|
/* @__PURE__ */ W(
|
|
1969
2001
|
"ul",
|
|
1970
2002
|
{
|
|
1971
|
-
className:
|
|
1972
|
-
ref:
|
|
2003
|
+
className: M("max-h-60 grow overflow-auto shadow-sm", "focus:outline-hidden focus:ring-0"),
|
|
2004
|
+
ref: c,
|
|
1973
2005
|
children: [
|
|
1974
2006
|
/* @__PURE__ */ b(
|
|
1975
2007
|
"div",
|
|
@@ -1986,12 +2018,12 @@ function hn(e) {
|
|
|
1986
2018
|
height: `${f.size}px`,
|
|
1987
2019
|
transform: `translateY(${f.start}px)`
|
|
1988
2020
|
},
|
|
1989
|
-
className:
|
|
2021
|
+
className: M(
|
|
1990
2022
|
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
1991
|
-
|
|
2023
|
+
h.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
1992
2024
|
),
|
|
1993
2025
|
onClick: () => {
|
|
1994
|
-
t ?
|
|
2026
|
+
t ? h.includes(u[f.index].key) ? i(
|
|
1995
2027
|
structuredClone(
|
|
1996
2028
|
n.filter(
|
|
1997
2029
|
(g) => g.key !== u[f.index].key
|
|
@@ -2008,22 +2040,22 @@ function hn(e) {
|
|
|
2008
2040
|
l.length > 0 && u.length === 0 && (s ? /* @__PURE__ */ W(
|
|
2009
2041
|
"li",
|
|
2010
2042
|
{
|
|
2011
|
-
className:
|
|
2043
|
+
className: M("px-3 py-2 text-sm text-foreground"),
|
|
2012
2044
|
onClick: () => {
|
|
2013
|
-
r({ text: l, key: l }),
|
|
2045
|
+
r({ text: l, key: l }), a("");
|
|
2014
2046
|
},
|
|
2015
2047
|
children: [
|
|
2016
2048
|
"Add ",
|
|
2017
2049
|
l
|
|
2018
2050
|
]
|
|
2019
2051
|
}
|
|
2020
|
-
) : /* @__PURE__ */ b("li", { className:
|
|
2052
|
+
) : /* @__PURE__ */ b("li", { className: M("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
|
|
2021
2053
|
]
|
|
2022
2054
|
}
|
|
2023
2055
|
)
|
|
2024
2056
|
] });
|
|
2025
2057
|
}
|
|
2026
|
-
function
|
|
2058
|
+
function yn(e) {
|
|
2027
2059
|
return /* @__PURE__ */ b(
|
|
2028
2060
|
"svg",
|
|
2029
2061
|
{
|
|
@@ -2038,15 +2070,15 @@ function xn(e) {
|
|
|
2038
2070
|
}
|
|
2039
2071
|
);
|
|
2040
2072
|
}
|
|
2041
|
-
function
|
|
2073
|
+
function bn(e) {
|
|
2042
2074
|
const { className: o, ...t } = e;
|
|
2043
2075
|
return /* @__PURE__ */ b(
|
|
2044
2076
|
"input",
|
|
2045
2077
|
{
|
|
2046
|
-
className:
|
|
2078
|
+
className: M(
|
|
2047
2079
|
"h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
|
|
2048
|
-
"focus-visible:border-primary focus-visible:shadow-
|
|
2049
|
-
"read-only:cursor-pointer read-only
|
|
2080
|
+
"focus-visible:border-primary focus-visible:shadow-xs focus-visible:shadow-ring focus-visible:outline-hidden",
|
|
2081
|
+
"read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:text-foreground read-only:shadow-none! read-only:outline-hidden!",
|
|
2050
2082
|
"disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted",
|
|
2051
2083
|
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
2052
2084
|
o
|
|
@@ -2055,12 +2087,12 @@ function yn(e) {
|
|
|
2055
2087
|
}
|
|
2056
2088
|
);
|
|
2057
2089
|
}
|
|
2058
|
-
function
|
|
2090
|
+
function vn(e) {
|
|
2059
2091
|
const { className: o, checked: t, onChange: n, defaultChecked: i, ...s } = e;
|
|
2060
2092
|
return /* @__PURE__ */ W(
|
|
2061
2093
|
"div",
|
|
2062
2094
|
{
|
|
2063
|
-
className:
|
|
2095
|
+
className: M(
|
|
2064
2096
|
"rounded-full",
|
|
2065
2097
|
"h-5 w-10",
|
|
2066
2098
|
"border border-muted bg-secondary",
|
|
@@ -2073,7 +2105,7 @@ function bn(e) {
|
|
|
2073
2105
|
/* @__PURE__ */ b(
|
|
2074
2106
|
"div",
|
|
2075
2107
|
{
|
|
2076
|
-
className:
|
|
2108
|
+
className: M(
|
|
2077
2109
|
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
|
|
2078
2110
|
t ? "translate-x-5" : "translate-x-1"
|
|
2079
2111
|
)
|
|
@@ -2084,16 +2116,16 @@ function bn(e) {
|
|
|
2084
2116
|
);
|
|
2085
2117
|
}
|
|
2086
2118
|
export {
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2119
|
+
Be as Badge,
|
|
2120
|
+
at as Button,
|
|
2121
|
+
yn as ChevronDown,
|
|
2122
|
+
fn as ChevronUp,
|
|
2123
|
+
Gt as Collapse,
|
|
2092
2124
|
wn as Dropdown,
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2125
|
+
bn as Input,
|
|
2126
|
+
tt as Popover,
|
|
2127
|
+
dn as Search,
|
|
2128
|
+
vn as Toggle,
|
|
2129
|
+
We as cva,
|
|
2130
|
+
M as cx
|
|
2099
2131
|
};
|