@rinzai/zen 0.1.5 → 0.1.7
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/dropdown/index.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/popover/index.d.ts +2 -1
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/zen.css +1 -1
- package/dist/zen.js +1058 -1499
- package/package.json +12 -10
package/dist/zen.js
CHANGED
|
@@ -1,479 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function Ut() {
|
|
17
|
-
if (at) return xe;
|
|
18
|
-
at = 1;
|
|
19
|
-
var e = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
|
|
20
|
-
function t(n, r, s) {
|
|
21
|
-
var l = null;
|
|
22
|
-
if (s !== void 0 && (l = "" + s), r.key !== void 0 && (l = "" + r.key), "key" in r) {
|
|
23
|
-
s = {};
|
|
24
|
-
for (var c in r)
|
|
25
|
-
c !== "key" && (s[c] = r[c]);
|
|
26
|
-
} else s = r;
|
|
27
|
-
return r = s.ref, {
|
|
28
|
-
$$typeof: e,
|
|
29
|
-
type: n,
|
|
30
|
-
key: l,
|
|
31
|
-
ref: r !== void 0 ? r : null,
|
|
32
|
-
props: s
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return xe.Fragment = o, xe.jsx = t, xe.jsxs = t, xe;
|
|
36
|
-
}
|
|
37
|
-
var ve = {};
|
|
38
|
-
/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-jsx-runtime.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/
|
|
47
|
-
var ut;
|
|
48
|
-
function qt() {
|
|
49
|
-
return ut || (ut = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
-
function e(i) {
|
|
51
|
-
if (i == null) return null;
|
|
52
|
-
if (typeof i == "function")
|
|
53
|
-
return i.$$typeof === k ? null : i.displayName || i.name || null;
|
|
54
|
-
if (typeof i == "string") return i;
|
|
55
|
-
switch (i) {
|
|
56
|
-
case j:
|
|
57
|
-
return "Fragment";
|
|
58
|
-
case S:
|
|
59
|
-
return "Portal";
|
|
60
|
-
case W:
|
|
61
|
-
return "Profiler";
|
|
62
|
-
case D:
|
|
63
|
-
return "StrictMode";
|
|
64
|
-
case Z:
|
|
65
|
-
return "Suspense";
|
|
66
|
-
case $:
|
|
67
|
-
return "SuspenseList";
|
|
68
|
-
}
|
|
69
|
-
if (typeof i == "object")
|
|
70
|
-
switch (typeof i.tag == "number" && console.error(
|
|
71
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
-
), i.$$typeof) {
|
|
73
|
-
case F:
|
|
74
|
-
return (i.displayName || "Context") + ".Provider";
|
|
75
|
-
case K:
|
|
76
|
-
return (i._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case q:
|
|
78
|
-
var x = i.render;
|
|
79
|
-
return i = i.displayName, i || (i = x.displayName || x.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
80
|
-
case z:
|
|
81
|
-
return x = i.displayName || null, x !== null ? x : e(i.type) || "Memo";
|
|
82
|
-
case Q:
|
|
83
|
-
x = i._payload, i = i._init;
|
|
84
|
-
try {
|
|
85
|
-
return e(i(x));
|
|
86
|
-
} catch {
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
function o(i) {
|
|
92
|
-
return "" + i;
|
|
93
|
-
}
|
|
94
|
-
function t(i) {
|
|
95
|
-
try {
|
|
96
|
-
o(i);
|
|
97
|
-
var x = !1;
|
|
98
|
-
} catch {
|
|
99
|
-
x = !0;
|
|
100
|
-
}
|
|
101
|
-
if (x) {
|
|
102
|
-
x = console;
|
|
103
|
-
var v = x.error, T = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
104
|
-
return v.call(
|
|
105
|
-
x,
|
|
106
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
T
|
|
108
|
-
), o(i);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function n() {
|
|
112
|
-
}
|
|
113
|
-
function r() {
|
|
114
|
-
if (ge === 0) {
|
|
115
|
-
Ke = console.log, Ze = console.info, Qe = console.warn, et = console.error, tt = console.group, nt = console.groupCollapsed, ot = console.groupEnd;
|
|
116
|
-
var i = {
|
|
117
|
-
configurable: !0,
|
|
118
|
-
enumerable: !0,
|
|
119
|
-
value: n,
|
|
120
|
-
writable: !0
|
|
121
|
-
};
|
|
122
|
-
Object.defineProperties(console, {
|
|
123
|
-
info: i,
|
|
124
|
-
log: i,
|
|
125
|
-
warn: i,
|
|
126
|
-
error: i,
|
|
127
|
-
group: i,
|
|
128
|
-
groupCollapsed: i,
|
|
129
|
-
groupEnd: i
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
ge++;
|
|
133
|
-
}
|
|
134
|
-
function s() {
|
|
135
|
-
if (ge--, ge === 0) {
|
|
136
|
-
var i = { configurable: !0, enumerable: !0, writable: !0 };
|
|
137
|
-
Object.defineProperties(console, {
|
|
138
|
-
log: re({}, i, { value: Ke }),
|
|
139
|
-
info: re({}, i, { value: Ze }),
|
|
140
|
-
warn: re({}, i, { value: Qe }),
|
|
141
|
-
error: re({}, i, { value: et }),
|
|
142
|
-
group: re({}, i, { value: tt }),
|
|
143
|
-
groupCollapsed: re({}, i, { value: nt }),
|
|
144
|
-
groupEnd: re({}, i, { value: ot })
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
0 > ge && console.error(
|
|
148
|
-
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
function l(i) {
|
|
152
|
-
if (De === void 0)
|
|
153
|
-
try {
|
|
154
|
-
throw Error();
|
|
155
|
-
} catch (v) {
|
|
156
|
-
var x = v.stack.trim().match(/\n( *(at )?)/);
|
|
157
|
-
De = x && x[1] || "", rt = -1 < v.stack.indexOf(`
|
|
158
|
-
at`) ? " (<anonymous>)" : -1 < v.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
159
|
-
}
|
|
160
|
-
return `
|
|
161
|
-
` + De + i + rt;
|
|
162
|
-
}
|
|
163
|
-
function c(i, x) {
|
|
164
|
-
if (!i || We) return "";
|
|
165
|
-
var v = Ve.get(i);
|
|
166
|
-
if (v !== void 0) return v;
|
|
167
|
-
We = !0, v = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
168
|
-
var T = null;
|
|
169
|
-
T = _.H, _.H = null, r();
|
|
170
|
-
try {
|
|
171
|
-
var N = {
|
|
172
|
-
DetermineComponentFrameRoot: function() {
|
|
173
|
-
try {
|
|
174
|
-
if (x) {
|
|
175
|
-
var ne = function() {
|
|
176
|
-
throw Error();
|
|
177
|
-
};
|
|
178
|
-
if (Object.defineProperty(ne.prototype, "props", {
|
|
179
|
-
set: function() {
|
|
180
|
-
throw Error();
|
|
181
|
-
}
|
|
182
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
183
|
-
try {
|
|
184
|
-
Reflect.construct(ne, []);
|
|
185
|
-
} catch (te) {
|
|
186
|
-
var ye = te;
|
|
187
|
-
}
|
|
188
|
-
Reflect.construct(i, [], ne);
|
|
189
|
-
} else {
|
|
190
|
-
try {
|
|
191
|
-
ne.call();
|
|
192
|
-
} catch (te) {
|
|
193
|
-
ye = te;
|
|
194
|
-
}
|
|
195
|
-
i.call(ne.prototype);
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
try {
|
|
199
|
-
throw Error();
|
|
200
|
-
} catch (te) {
|
|
201
|
-
ye = te;
|
|
202
|
-
}
|
|
203
|
-
(ne = i()) && typeof ne.catch == "function" && ne.catch(function() {
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
} catch (te) {
|
|
207
|
-
if (te && ye && typeof te.stack == "string")
|
|
208
|
-
return [te.stack, ye.stack];
|
|
209
|
-
}
|
|
210
|
-
return [null, null];
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
N.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
214
|
-
var A = Object.getOwnPropertyDescriptor(
|
|
215
|
-
N.DetermineComponentFrameRoot,
|
|
216
|
-
"name"
|
|
217
|
-
);
|
|
218
|
-
A && A.configurable && Object.defineProperty(
|
|
219
|
-
N.DetermineComponentFrameRoot,
|
|
220
|
-
"name",
|
|
221
|
-
{ value: "DetermineComponentFrameRoot" }
|
|
222
|
-
);
|
|
223
|
-
var C = N.DetermineComponentFrameRoot(), ee = C[0], ae = C[1];
|
|
224
|
-
if (ee && ae) {
|
|
225
|
-
var P = ee.split(`
|
|
226
|
-
`), se = ae.split(`
|
|
227
|
-
`);
|
|
228
|
-
for (C = A = 0; A < P.length && !P[A].includes(
|
|
229
|
-
"DetermineComponentFrameRoot"
|
|
230
|
-
); )
|
|
231
|
-
A++;
|
|
232
|
-
for (; C < se.length && !se[C].includes(
|
|
233
|
-
"DetermineComponentFrameRoot"
|
|
234
|
-
); )
|
|
235
|
-
C++;
|
|
236
|
-
if (A === P.length || C === se.length)
|
|
237
|
-
for (A = P.length - 1, C = se.length - 1; 1 <= A && 0 <= C && P[A] !== se[C]; )
|
|
238
|
-
C--;
|
|
239
|
-
for (; 1 <= A && 0 <= C; A--, C--)
|
|
240
|
-
if (P[A] !== se[C]) {
|
|
241
|
-
if (A !== 1 || C !== 1)
|
|
242
|
-
do
|
|
243
|
-
if (A--, C--, 0 > C || P[A] !== se[C]) {
|
|
244
|
-
var pe = `
|
|
245
|
-
` + P[A].replace(
|
|
246
|
-
" at new ",
|
|
247
|
-
" at "
|
|
248
|
-
);
|
|
249
|
-
return i.displayName && pe.includes("<anonymous>") && (pe = pe.replace("<anonymous>", i.displayName)), typeof i == "function" && Ve.set(i, pe), pe;
|
|
250
|
-
}
|
|
251
|
-
while (1 <= A && 0 <= C);
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
} finally {
|
|
256
|
-
We = !1, _.H = T, s(), Error.prepareStackTrace = v;
|
|
257
|
-
}
|
|
258
|
-
return P = (P = i ? i.displayName || i.name : "") ? l(P) : "", typeof i == "function" && Ve.set(i, P), P;
|
|
259
|
-
}
|
|
260
|
-
function a(i) {
|
|
261
|
-
if (i == null) return "";
|
|
262
|
-
if (typeof i == "function") {
|
|
263
|
-
var x = i.prototype;
|
|
264
|
-
return c(
|
|
265
|
-
i,
|
|
266
|
-
!(!x || !x.isReactComponent)
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
if (typeof i == "string") return l(i);
|
|
270
|
-
switch (i) {
|
|
271
|
-
case Z:
|
|
272
|
-
return l("Suspense");
|
|
273
|
-
case $:
|
|
274
|
-
return l("SuspenseList");
|
|
275
|
-
}
|
|
276
|
-
if (typeof i == "object")
|
|
277
|
-
switch (i.$$typeof) {
|
|
278
|
-
case q:
|
|
279
|
-
return i = c(i.render, !1), i;
|
|
280
|
-
case z:
|
|
281
|
-
return a(i.type);
|
|
282
|
-
case Q:
|
|
283
|
-
x = i._payload, i = i._init;
|
|
284
|
-
try {
|
|
285
|
-
return a(i(x));
|
|
286
|
-
} catch {
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
return "";
|
|
290
|
-
}
|
|
291
|
-
function u() {
|
|
292
|
-
var i = _.A;
|
|
293
|
-
return i === null ? null : i.getOwner();
|
|
294
|
-
}
|
|
295
|
-
function f(i) {
|
|
296
|
-
if (Y.call(i, "key")) {
|
|
297
|
-
var x = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
298
|
-
if (x && x.isReactWarning) return !1;
|
|
299
|
-
}
|
|
300
|
-
return i.key !== void 0;
|
|
301
|
-
}
|
|
302
|
-
function d(i, x) {
|
|
303
|
-
function v() {
|
|
304
|
-
st || (st = !0, console.error(
|
|
305
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
306
|
-
x
|
|
307
|
-
));
|
|
308
|
-
}
|
|
309
|
-
v.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
310
|
-
get: v,
|
|
311
|
-
configurable: !0
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
function p() {
|
|
315
|
-
var i = e(this.type);
|
|
316
|
-
return it[i] || (it[i] = !0, console.error(
|
|
317
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
318
|
-
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
319
|
-
}
|
|
320
|
-
function m(i, x, v, T, N, A) {
|
|
321
|
-
return v = A.ref, i = {
|
|
322
|
-
$$typeof: R,
|
|
323
|
-
type: i,
|
|
324
|
-
key: x,
|
|
325
|
-
props: A,
|
|
326
|
-
_owner: N
|
|
327
|
-
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(i, "ref", {
|
|
328
|
-
enumerable: !1,
|
|
329
|
-
get: p
|
|
330
|
-
}) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
331
|
-
configurable: !1,
|
|
332
|
-
enumerable: !1,
|
|
333
|
-
writable: !0,
|
|
334
|
-
value: 0
|
|
335
|
-
}), Object.defineProperty(i, "_debugInfo", {
|
|
336
|
-
configurable: !1,
|
|
337
|
-
enumerable: !1,
|
|
338
|
-
writable: !0,
|
|
339
|
-
value: null
|
|
340
|
-
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
341
|
-
}
|
|
342
|
-
function h(i, x, v, T, N, A) {
|
|
343
|
-
if (typeof i == "string" || typeof i == "function" || i === j || i === W || i === D || i === Z || i === $ || i === I || typeof i == "object" && i !== null && (i.$$typeof === Q || i.$$typeof === z || i.$$typeof === F || i.$$typeof === K || i.$$typeof === q || i.$$typeof === Dt || i.getModuleId !== void 0)) {
|
|
344
|
-
var C = x.children;
|
|
345
|
-
if (C !== void 0)
|
|
346
|
-
if (T)
|
|
347
|
-
if (Le(C)) {
|
|
348
|
-
for (T = 0; T < C.length; T++)
|
|
349
|
-
b(C[T], i);
|
|
350
|
-
Object.freeze && Object.freeze(C);
|
|
351
|
-
} else
|
|
352
|
-
console.error(
|
|
353
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
354
|
-
);
|
|
355
|
-
else b(C, i);
|
|
356
|
-
} else
|
|
357
|
-
C = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? T = "null" : Le(i) ? T = "array" : i !== void 0 && i.$$typeof === R ? (T = "<" + (e(i.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : T = typeof i, console.error(
|
|
358
|
-
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
359
|
-
T,
|
|
360
|
-
C
|
|
361
|
-
);
|
|
362
|
-
if (Y.call(x, "key")) {
|
|
363
|
-
C = e(i);
|
|
364
|
-
var ee = Object.keys(x).filter(function(P) {
|
|
365
|
-
return P !== "key";
|
|
366
|
-
});
|
|
367
|
-
T = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", lt[C + T] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
368
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
369
|
-
let props = %s;
|
|
370
|
-
<%s {...props} />
|
|
371
|
-
React keys must be passed directly to JSX without using spread:
|
|
372
|
-
let props = %s;
|
|
373
|
-
<%s key={someKey} {...props} />`,
|
|
374
|
-
T,
|
|
375
|
-
C,
|
|
376
|
-
ee,
|
|
377
|
-
C
|
|
378
|
-
), lt[C + T] = !0);
|
|
379
|
-
}
|
|
380
|
-
if (C = null, v !== void 0 && (t(v), C = "" + v), f(x) && (t(x.key), C = "" + x.key), "key" in x) {
|
|
381
|
-
v = {};
|
|
382
|
-
for (var ae in x)
|
|
383
|
-
ae !== "key" && (v[ae] = x[ae]);
|
|
384
|
-
} else v = x;
|
|
385
|
-
return C && d(
|
|
386
|
-
v,
|
|
387
|
-
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
388
|
-
), m(i, C, A, N, u(), v);
|
|
389
|
-
}
|
|
390
|
-
function b(i, x) {
|
|
391
|
-
if (typeof i == "object" && i && i.$$typeof !== Wt) {
|
|
392
|
-
if (Le(i))
|
|
393
|
-
for (var v = 0; v < i.length; v++) {
|
|
394
|
-
var T = i[v];
|
|
395
|
-
y(T) && g(T, x);
|
|
396
|
-
}
|
|
397
|
-
else if (y(i))
|
|
398
|
-
i._store && (i._store.validated = 1);
|
|
399
|
-
else if (i === null || typeof i != "object" ? v = null : (v = B && i[B] || i["@@iterator"], v = typeof v == "function" ? v : null), typeof v == "function" && v !== i.entries && (v = v.call(i), v !== i))
|
|
400
|
-
for (; !(i = v.next()).done; )
|
|
401
|
-
y(i.value) && g(i.value, x);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
function y(i) {
|
|
405
|
-
return typeof i == "object" && i !== null && i.$$typeof === R;
|
|
406
|
-
}
|
|
407
|
-
function g(i, x) {
|
|
408
|
-
if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x = w(x), !ct[x])) {
|
|
409
|
-
ct[x] = !0;
|
|
410
|
-
var v = "";
|
|
411
|
-
i && i._owner != null && i._owner !== u() && (v = null, typeof i._owner.tag == "number" ? v = e(i._owner.type) : typeof i._owner.name == "string" && (v = i._owner.name), v = " It was passed a child from " + v + ".");
|
|
412
|
-
var T = _.getCurrentStack;
|
|
413
|
-
_.getCurrentStack = function() {
|
|
414
|
-
var N = a(i.type);
|
|
415
|
-
return T && (N += T() || ""), N;
|
|
416
|
-
}, console.error(
|
|
417
|
-
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
418
|
-
x,
|
|
419
|
-
v
|
|
420
|
-
), _.getCurrentStack = T;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
function w(i) {
|
|
424
|
-
var x = "", v = u();
|
|
425
|
-
return v && (v = e(v.type)) && (x = `
|
|
426
|
-
|
|
427
|
-
Check the render method of \`` + v + "`."), x || (i = e(i)) && (x = `
|
|
428
|
-
|
|
429
|
-
Check the top-level render call using <` + i + ">."), x;
|
|
430
|
-
}
|
|
431
|
-
var O = Vt, R = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), K = Symbol.for("react.consumer"), F = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), B = Symbol.iterator, k = Symbol.for("react.client.reference"), _ = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, re = Object.assign, Dt = Symbol.for("react.client.reference"), Le = Array.isArray, ge = 0, Ke, Ze, Qe, et, tt, nt, ot;
|
|
432
|
-
n.__reactDisabledLog = !0;
|
|
433
|
-
var De, rt, We = !1, Ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), Wt = Symbol.for("react.client.reference"), st, it = {}, lt = {}, ct = {};
|
|
434
|
-
ve.Fragment = j, ve.jsx = function(i, x, v, T, N) {
|
|
435
|
-
return h(i, x, v, !1, T, N);
|
|
436
|
-
}, ve.jsxs = function(i, x, v, T, N) {
|
|
437
|
-
return h(i, x, v, !0, T, N);
|
|
438
|
-
};
|
|
439
|
-
}()), ve;
|
|
440
|
-
}
|
|
441
|
-
var ft;
|
|
442
|
-
function Xt() {
|
|
443
|
-
return ft || (ft = 1, process.env.NODE_ENV === "production" ? Ee.exports = Ut() : Ee.exports = qt()), Ee.exports;
|
|
444
|
-
}
|
|
445
|
-
var E = Xt();
|
|
446
|
-
const L = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + L(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [r, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + r + "-" + s : typeof s == "boolean" && s ? n + " " + r : n, "") : o, ""), dt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Et = (e, o) => (t) => {
|
|
447
|
-
var a;
|
|
448
|
-
if ((o == null ? void 0 : o.variants) == null) return L(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
449
|
-
const { variants: n, defaultVariants: r } = o, s = Object.keys(n).map((u) => {
|
|
450
|
-
const f = t == null ? void 0 : t[u], d = r == null ? void 0 : r[u];
|
|
451
|
-
if (f === null) return null;
|
|
452
|
-
const p = dt(f) || dt(d);
|
|
453
|
-
return n[u][p];
|
|
454
|
-
}), l = t && Object.entries(t).reduce(
|
|
455
|
-
(u, [f, d]) => (d === void 0 || (u[f] = d), u),
|
|
1
|
+
import { jsx as b, jsxs as W, Fragment as Fe } from "react/jsx-runtime";
|
|
2
|
+
import * as C from "react";
|
|
3
|
+
import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as Ee } from "react";
|
|
4
|
+
import * as ot from "react-dom";
|
|
5
|
+
import { createPortal as st, flushSync as it } from "react-dom";
|
|
6
|
+
const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + k(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [s, i]) => i == null || i === !1 ? n : typeof i == "string" || typeof i == "number" ? n + " " + s + "-" + i : typeof i == "boolean" && i ? n + " " + s : n, "") : o, ""), Te = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
|
|
7
|
+
var c;
|
|
8
|
+
if ((o == null ? void 0 : o.variants) == null) return k(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
9
|
+
const { variants: n, defaultVariants: s } = o, i = Object.keys(n).map((a) => {
|
|
10
|
+
const u = t == null ? void 0 : t[a], d = s == null ? void 0 : s[a];
|
|
11
|
+
if (u === null) return null;
|
|
12
|
+
const m = Te(u) || Te(d);
|
|
13
|
+
return n[a][m];
|
|
14
|
+
}), r = t && Object.entries(t).reduce(
|
|
15
|
+
(a, [u, d]) => (d === void 0 || (a[u] = d), a),
|
|
456
16
|
{}
|
|
457
|
-
),
|
|
458
|
-
(
|
|
459
|
-
([
|
|
17
|
+
), l = (c = o == null ? void 0 : o.compoundVariants) == null ? void 0 : c.reduce(
|
|
18
|
+
(a, { class: u, className: d, ...m }) => Object.entries(m).every(
|
|
19
|
+
([f, g]) => Array.isArray(g) ? g.includes(
|
|
460
20
|
{
|
|
461
|
-
...
|
|
462
|
-
...
|
|
463
|
-
}[
|
|
21
|
+
...s,
|
|
22
|
+
...r
|
|
23
|
+
}[f]
|
|
464
24
|
) : {
|
|
465
|
-
...
|
|
466
|
-
...
|
|
467
|
-
}[
|
|
468
|
-
) ? [...
|
|
25
|
+
...s,
|
|
26
|
+
...r
|
|
27
|
+
}[f] === g
|
|
28
|
+
) ? [...a, u, d] : a,
|
|
469
29
|
[]
|
|
470
30
|
);
|
|
471
|
-
return
|
|
31
|
+
return k(e, i, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
472
32
|
};
|
|
473
|
-
function
|
|
474
|
-
return /* @__PURE__ */
|
|
33
|
+
function We({ variant: e, className: o, ...t }) {
|
|
34
|
+
return /* @__PURE__ */ b("span", { ...t, className: rt({ variant: e, className: o }) });
|
|
475
35
|
}
|
|
476
|
-
const
|
|
36
|
+
const rt = Ve(
|
|
477
37
|
"zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
|
|
478
38
|
{
|
|
479
39
|
variants: {
|
|
@@ -489,10 +49,10 @@ const Jt = Et(
|
|
|
489
49
|
}
|
|
490
50
|
}
|
|
491
51
|
);
|
|
492
|
-
function
|
|
493
|
-
return /* @__PURE__ */
|
|
52
|
+
function lt({ className: e, variant: o, size: t, ...n }) {
|
|
53
|
+
return /* @__PURE__ */ b("button", { className: ct({ variant: o, size: t, className: e }), ...n });
|
|
494
54
|
}
|
|
495
|
-
const
|
|
55
|
+
const ct = Ve(
|
|
496
56
|
"zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
497
57
|
{
|
|
498
58
|
variants: {
|
|
@@ -517,77 +77,77 @@ const Kt = Et(
|
|
|
517
77
|
size: "default"
|
|
518
78
|
}
|
|
519
79
|
}
|
|
520
|
-
),
|
|
80
|
+
), le = Math.min, H = Math.max, ce = Math.round, se = Math.floor, _ = (e) => ({
|
|
521
81
|
x: e,
|
|
522
82
|
y: e
|
|
523
|
-
}),
|
|
83
|
+
}), at = {
|
|
524
84
|
left: "right",
|
|
525
85
|
right: "left",
|
|
526
86
|
bottom: "top",
|
|
527
87
|
top: "bottom"
|
|
528
|
-
},
|
|
88
|
+
}, ut = {
|
|
529
89
|
start: "end",
|
|
530
90
|
end: "start"
|
|
531
91
|
};
|
|
532
|
-
function
|
|
533
|
-
return
|
|
92
|
+
function Ae(e, o, t) {
|
|
93
|
+
return H(e, le(o, t));
|
|
534
94
|
}
|
|
535
|
-
function
|
|
95
|
+
function he(e, o) {
|
|
536
96
|
return typeof e == "function" ? e(o) : e;
|
|
537
97
|
}
|
|
538
|
-
function
|
|
98
|
+
function U(e) {
|
|
539
99
|
return e.split("-")[0];
|
|
540
100
|
}
|
|
541
|
-
function
|
|
101
|
+
function me(e) {
|
|
542
102
|
return e.split("-")[1];
|
|
543
103
|
}
|
|
544
|
-
function
|
|
104
|
+
function Be(e) {
|
|
545
105
|
return e === "x" ? "y" : "x";
|
|
546
106
|
}
|
|
547
|
-
function
|
|
107
|
+
function je(e) {
|
|
548
108
|
return e === "y" ? "height" : "width";
|
|
549
109
|
}
|
|
550
|
-
function
|
|
551
|
-
return ["top", "bottom"].includes(
|
|
110
|
+
function G(e) {
|
|
111
|
+
return ["top", "bottom"].includes(U(e)) ? "y" : "x";
|
|
552
112
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
113
|
+
function $e(e) {
|
|
114
|
+
return Be(G(e));
|
|
555
115
|
}
|
|
556
|
-
function
|
|
116
|
+
function ft(e, o, t) {
|
|
557
117
|
t === void 0 && (t = !1);
|
|
558
|
-
const n =
|
|
559
|
-
let
|
|
560
|
-
return o.reference[
|
|
118
|
+
const n = me(e), s = $e(e), i = je(s);
|
|
119
|
+
let r = s === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
120
|
+
return o.reference[i] > o.floating[i] && (r = ae(r)), [r, ae(r)];
|
|
561
121
|
}
|
|
562
|
-
function
|
|
563
|
-
const o =
|
|
564
|
-
return [
|
|
122
|
+
function dt(e) {
|
|
123
|
+
const o = ae(e);
|
|
124
|
+
return [Se(e), o, Se(o)];
|
|
565
125
|
}
|
|
566
|
-
function
|
|
567
|
-
return e.replace(/start|end/g, (o) =>
|
|
126
|
+
function Se(e) {
|
|
127
|
+
return e.replace(/start|end/g, (o) => ut[o]);
|
|
568
128
|
}
|
|
569
|
-
function
|
|
570
|
-
const n = ["left", "right"],
|
|
129
|
+
function ht(e, o, t) {
|
|
130
|
+
const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
571
131
|
switch (e) {
|
|
572
132
|
case "top":
|
|
573
133
|
case "bottom":
|
|
574
|
-
return t ? o ?
|
|
134
|
+
return t ? o ? s : n : o ? n : s;
|
|
575
135
|
case "left":
|
|
576
136
|
case "right":
|
|
577
|
-
return o ?
|
|
137
|
+
return o ? i : r;
|
|
578
138
|
default:
|
|
579
139
|
return [];
|
|
580
140
|
}
|
|
581
141
|
}
|
|
582
|
-
function
|
|
583
|
-
const
|
|
584
|
-
let
|
|
585
|
-
return
|
|
142
|
+
function mt(e, o, t, n) {
|
|
143
|
+
const s = me(e);
|
|
144
|
+
let i = ht(U(e), t === "start", n);
|
|
145
|
+
return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(Se)))), i;
|
|
586
146
|
}
|
|
587
|
-
function
|
|
588
|
-
return e.replace(/left|right|bottom|top/g, (o) =>
|
|
147
|
+
function ae(e) {
|
|
148
|
+
return e.replace(/left|right|bottom|top/g, (o) => at[o]);
|
|
589
149
|
}
|
|
590
|
-
function
|
|
150
|
+
function gt(e) {
|
|
591
151
|
return {
|
|
592
152
|
top: 0,
|
|
593
153
|
right: 0,
|
|
@@ -596,259 +156,259 @@ function rn(e) {
|
|
|
596
156
|
...e
|
|
597
157
|
};
|
|
598
158
|
}
|
|
599
|
-
function
|
|
600
|
-
return typeof e != "number" ?
|
|
159
|
+
function pt(e) {
|
|
160
|
+
return typeof e != "number" ? gt(e) : {
|
|
601
161
|
top: e,
|
|
602
162
|
right: e,
|
|
603
163
|
bottom: e,
|
|
604
164
|
left: e
|
|
605
165
|
};
|
|
606
166
|
}
|
|
607
|
-
function
|
|
167
|
+
function ue(e) {
|
|
608
168
|
const {
|
|
609
169
|
x: o,
|
|
610
170
|
y: t,
|
|
611
171
|
width: n,
|
|
612
|
-
height:
|
|
172
|
+
height: s
|
|
613
173
|
} = e;
|
|
614
174
|
return {
|
|
615
175
|
width: n,
|
|
616
|
-
height:
|
|
176
|
+
height: s,
|
|
617
177
|
top: t,
|
|
618
178
|
left: o,
|
|
619
179
|
right: o + n,
|
|
620
|
-
bottom: t +
|
|
180
|
+
bottom: t + s,
|
|
621
181
|
x: o,
|
|
622
182
|
y: t
|
|
623
183
|
};
|
|
624
184
|
}
|
|
625
|
-
function
|
|
185
|
+
function ze(e, o, t) {
|
|
626
186
|
let {
|
|
627
187
|
reference: n,
|
|
628
|
-
floating:
|
|
188
|
+
floating: s
|
|
629
189
|
} = e;
|
|
630
|
-
const
|
|
631
|
-
let
|
|
632
|
-
switch (
|
|
190
|
+
const i = G(o), r = $e(o), l = je(r), c = U(o), a = i === "y", u = n.x + n.width / 2 - s.width / 2, d = n.y + n.height / 2 - s.height / 2, m = n[l] / 2 - s[l] / 2;
|
|
191
|
+
let f;
|
|
192
|
+
switch (c) {
|
|
633
193
|
case "top":
|
|
634
|
-
|
|
635
|
-
x:
|
|
636
|
-
y: n.y -
|
|
194
|
+
f = {
|
|
195
|
+
x: u,
|
|
196
|
+
y: n.y - s.height
|
|
637
197
|
};
|
|
638
198
|
break;
|
|
639
199
|
case "bottom":
|
|
640
|
-
|
|
641
|
-
x:
|
|
200
|
+
f = {
|
|
201
|
+
x: u,
|
|
642
202
|
y: n.y + n.height
|
|
643
203
|
};
|
|
644
204
|
break;
|
|
645
205
|
case "right":
|
|
646
|
-
|
|
206
|
+
f = {
|
|
647
207
|
x: n.x + n.width,
|
|
648
208
|
y: d
|
|
649
209
|
};
|
|
650
210
|
break;
|
|
651
211
|
case "left":
|
|
652
|
-
|
|
653
|
-
x: n.x -
|
|
212
|
+
f = {
|
|
213
|
+
x: n.x - s.width,
|
|
654
214
|
y: d
|
|
655
215
|
};
|
|
656
216
|
break;
|
|
657
217
|
default:
|
|
658
|
-
|
|
218
|
+
f = {
|
|
659
219
|
x: n.x,
|
|
660
220
|
y: n.y
|
|
661
221
|
};
|
|
662
222
|
}
|
|
663
|
-
switch (
|
|
223
|
+
switch (me(o)) {
|
|
664
224
|
case "start":
|
|
665
|
-
|
|
225
|
+
f[r] -= m * (t && a ? -1 : 1);
|
|
666
226
|
break;
|
|
667
227
|
case "end":
|
|
668
|
-
|
|
228
|
+
f[r] += m * (t && a ? -1 : 1);
|
|
669
229
|
break;
|
|
670
230
|
}
|
|
671
|
-
return
|
|
231
|
+
return f;
|
|
672
232
|
}
|
|
673
|
-
const
|
|
233
|
+
const xt = async (e, o, t) => {
|
|
674
234
|
const {
|
|
675
235
|
placement: n = "bottom",
|
|
676
|
-
strategy:
|
|
677
|
-
middleware:
|
|
678
|
-
platform:
|
|
679
|
-
} = t,
|
|
680
|
-
let
|
|
236
|
+
strategy: s = "absolute",
|
|
237
|
+
middleware: i = [],
|
|
238
|
+
platform: r
|
|
239
|
+
} = t, l = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
|
|
240
|
+
let a = await r.getElementRects({
|
|
681
241
|
reference: e,
|
|
682
242
|
floating: o,
|
|
683
|
-
strategy:
|
|
243
|
+
strategy: s
|
|
684
244
|
}), {
|
|
685
|
-
x:
|
|
245
|
+
x: u,
|
|
686
246
|
y: d
|
|
687
|
-
} =
|
|
688
|
-
for (let
|
|
247
|
+
} = ze(a, n, c), m = n, f = {}, g = 0;
|
|
248
|
+
for (let x = 0; x < l.length; x++) {
|
|
689
249
|
const {
|
|
690
|
-
name:
|
|
691
|
-
fn:
|
|
692
|
-
} =
|
|
693
|
-
x:
|
|
694
|
-
y:
|
|
695
|
-
data:
|
|
696
|
-
reset:
|
|
697
|
-
} = await
|
|
698
|
-
x:
|
|
250
|
+
name: w,
|
|
251
|
+
fn: h
|
|
252
|
+
} = l[x], {
|
|
253
|
+
x: p,
|
|
254
|
+
y: v,
|
|
255
|
+
data: E,
|
|
256
|
+
reset: y
|
|
257
|
+
} = await h({
|
|
258
|
+
x: u,
|
|
699
259
|
y: d,
|
|
700
260
|
initialPlacement: n,
|
|
701
|
-
placement:
|
|
702
|
-
strategy:
|
|
703
|
-
middlewareData:
|
|
704
|
-
rects:
|
|
705
|
-
platform:
|
|
261
|
+
placement: m,
|
|
262
|
+
strategy: s,
|
|
263
|
+
middlewareData: f,
|
|
264
|
+
rects: a,
|
|
265
|
+
platform: r,
|
|
706
266
|
elements: {
|
|
707
267
|
reference: e,
|
|
708
268
|
floating: o
|
|
709
269
|
}
|
|
710
270
|
});
|
|
711
|
-
|
|
712
|
-
...
|
|
713
|
-
[
|
|
714
|
-
...
|
|
715
|
-
...
|
|
271
|
+
u = p ?? u, d = v ?? d, f = {
|
|
272
|
+
...f,
|
|
273
|
+
[w]: {
|
|
274
|
+
...f[w],
|
|
275
|
+
...E
|
|
716
276
|
}
|
|
717
|
-
},
|
|
277
|
+
}, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (m = y.placement), y.rects && (a = y.rects === !0 ? await r.getElementRects({
|
|
718
278
|
reference: e,
|
|
719
279
|
floating: o,
|
|
720
|
-
strategy:
|
|
721
|
-
}) :
|
|
722
|
-
x:
|
|
280
|
+
strategy: s
|
|
281
|
+
}) : y.rects), {
|
|
282
|
+
x: u,
|
|
723
283
|
y: d
|
|
724
|
-
} =
|
|
284
|
+
} = ze(a, m, c)), x = -1);
|
|
725
285
|
}
|
|
726
286
|
return {
|
|
727
|
-
x:
|
|
287
|
+
x: u,
|
|
728
288
|
y: d,
|
|
729
|
-
placement:
|
|
730
|
-
strategy:
|
|
731
|
-
middlewareData:
|
|
289
|
+
placement: m,
|
|
290
|
+
strategy: s,
|
|
291
|
+
middlewareData: f
|
|
732
292
|
};
|
|
733
293
|
};
|
|
734
|
-
async function
|
|
294
|
+
async function He(e, o) {
|
|
735
295
|
var t;
|
|
736
296
|
o === void 0 && (o = {});
|
|
737
297
|
const {
|
|
738
298
|
x: n,
|
|
739
|
-
y:
|
|
740
|
-
platform:
|
|
741
|
-
rects:
|
|
742
|
-
elements:
|
|
743
|
-
strategy:
|
|
299
|
+
y: s,
|
|
300
|
+
platform: i,
|
|
301
|
+
rects: r,
|
|
302
|
+
elements: l,
|
|
303
|
+
strategy: c
|
|
744
304
|
} = e, {
|
|
745
|
-
boundary:
|
|
746
|
-
rootBoundary:
|
|
305
|
+
boundary: a = "clippingAncestors",
|
|
306
|
+
rootBoundary: u = "viewport",
|
|
747
307
|
elementContext: d = "floating",
|
|
748
|
-
altBoundary:
|
|
749
|
-
padding:
|
|
750
|
-
} =
|
|
751
|
-
element: (t = await (
|
|
752
|
-
boundary:
|
|
753
|
-
rootBoundary:
|
|
754
|
-
strategy:
|
|
755
|
-
})),
|
|
308
|
+
altBoundary: m = !1,
|
|
309
|
+
padding: f = 0
|
|
310
|
+
} = he(o, e), g = pt(f), w = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await i.getClippingRect({
|
|
311
|
+
element: (t = await (i.isElement == null ? void 0 : i.isElement(w))) == null || t ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
312
|
+
boundary: a,
|
|
313
|
+
rootBoundary: u,
|
|
314
|
+
strategy: c
|
|
315
|
+
})), p = d === "floating" ? {
|
|
756
316
|
x: n,
|
|
757
|
-
y:
|
|
758
|
-
width:
|
|
759
|
-
height:
|
|
760
|
-
} :
|
|
317
|
+
y: s,
|
|
318
|
+
width: r.floating.width,
|
|
319
|
+
height: r.floating.height
|
|
320
|
+
} : r.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
761
321
|
x: 1,
|
|
762
322
|
y: 1
|
|
763
323
|
} : {
|
|
764
324
|
x: 1,
|
|
765
325
|
y: 1
|
|
766
|
-
},
|
|
767
|
-
elements:
|
|
768
|
-
rect:
|
|
769
|
-
offsetParent:
|
|
770
|
-
strategy:
|
|
771
|
-
}) :
|
|
326
|
+
}, y = ue(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
327
|
+
elements: l,
|
|
328
|
+
rect: p,
|
|
329
|
+
offsetParent: v,
|
|
330
|
+
strategy: c
|
|
331
|
+
}) : p);
|
|
772
332
|
return {
|
|
773
|
-
top: (
|
|
774
|
-
bottom: (
|
|
775
|
-
left: (
|
|
776
|
-
right: (
|
|
333
|
+
top: (h.top - y.top + g.top) / E.y,
|
|
334
|
+
bottom: (y.bottom - h.bottom + g.bottom) / E.y,
|
|
335
|
+
left: (h.left - y.left + g.left) / E.x,
|
|
336
|
+
right: (y.right - h.right + g.right) / E.x
|
|
777
337
|
};
|
|
778
338
|
}
|
|
779
|
-
const
|
|
339
|
+
const wt = function(e) {
|
|
780
340
|
return e === void 0 && (e = {}), {
|
|
781
341
|
name: "flip",
|
|
782
342
|
options: e,
|
|
783
343
|
async fn(o) {
|
|
784
344
|
var t, n;
|
|
785
345
|
const {
|
|
786
|
-
placement:
|
|
787
|
-
middlewareData:
|
|
788
|
-
rects:
|
|
789
|
-
initialPlacement:
|
|
790
|
-
platform:
|
|
791
|
-
elements:
|
|
346
|
+
placement: s,
|
|
347
|
+
middlewareData: i,
|
|
348
|
+
rects: r,
|
|
349
|
+
initialPlacement: l,
|
|
350
|
+
platform: c,
|
|
351
|
+
elements: a
|
|
792
352
|
} = o, {
|
|
793
|
-
mainAxis:
|
|
353
|
+
mainAxis: u = !0,
|
|
794
354
|
crossAxis: d = !0,
|
|
795
|
-
fallbackPlacements:
|
|
796
|
-
fallbackStrategy:
|
|
797
|
-
fallbackAxisSideDirection:
|
|
798
|
-
flipAlignment:
|
|
799
|
-
...
|
|
800
|
-
} =
|
|
801
|
-
if ((t =
|
|
355
|
+
fallbackPlacements: m,
|
|
356
|
+
fallbackStrategy: f = "bestFit",
|
|
357
|
+
fallbackAxisSideDirection: g = "none",
|
|
358
|
+
flipAlignment: x = !0,
|
|
359
|
+
...w
|
|
360
|
+
} = he(e, o);
|
|
361
|
+
if ((t = i.arrow) != null && t.alignmentOffset)
|
|
802
362
|
return {};
|
|
803
|
-
const
|
|
804
|
-
!
|
|
805
|
-
const
|
|
806
|
-
let F = ((n =
|
|
807
|
-
if (
|
|
808
|
-
const
|
|
809
|
-
|
|
363
|
+
const h = U(s), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !x ? [ae(l)] : dt(l)), O = g !== "none";
|
|
364
|
+
!m && O && y.push(...mt(l, x, g, E));
|
|
365
|
+
const R = [l, ...y], z = await He(o, w), Y = [];
|
|
366
|
+
let F = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
+
if (u && Y.push(z[h]), d) {
|
|
368
|
+
const I = ft(s, r, E);
|
|
369
|
+
Y.push(z[I[0]], z[I[1]]);
|
|
810
370
|
}
|
|
811
371
|
if (F = [...F, {
|
|
812
|
-
placement:
|
|
813
|
-
overflows:
|
|
814
|
-
}], !
|
|
815
|
-
var q,
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
372
|
+
placement: s,
|
|
373
|
+
overflows: Y
|
|
374
|
+
}], !Y.every((I) => I <= 0)) {
|
|
375
|
+
var q, ee;
|
|
376
|
+
const I = (((q = i.flip) == null ? void 0 : q.index) || 0) + 1, te = R[I];
|
|
377
|
+
if (te)
|
|
818
378
|
return {
|
|
819
379
|
data: {
|
|
820
|
-
index:
|
|
380
|
+
index: I,
|
|
821
381
|
overflows: F
|
|
822
382
|
},
|
|
823
383
|
reset: {
|
|
824
|
-
placement:
|
|
384
|
+
placement: te
|
|
825
385
|
}
|
|
826
386
|
};
|
|
827
|
-
let
|
|
828
|
-
if (!
|
|
829
|
-
switch (
|
|
387
|
+
let M = (ee = F.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
|
|
388
|
+
if (!M)
|
|
389
|
+
switch (f) {
|
|
830
390
|
case "bestFit": {
|
|
831
|
-
var
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
834
|
-
const
|
|
835
|
-
return
|
|
391
|
+
var B;
|
|
392
|
+
const V = (B = F.filter((S) => {
|
|
393
|
+
if (O) {
|
|
394
|
+
const T = G(S.placement);
|
|
395
|
+
return T === p || // Create a bias to the `y` side axis due to horizontal
|
|
836
396
|
// reading directions favoring greater width.
|
|
837
|
-
|
|
397
|
+
T === "y";
|
|
838
398
|
}
|
|
839
399
|
return !0;
|
|
840
|
-
}).map((
|
|
841
|
-
|
|
400
|
+
}).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, j) => T + j, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : B[0];
|
|
401
|
+
V && (M = V);
|
|
842
402
|
break;
|
|
843
403
|
}
|
|
844
404
|
case "initialPlacement":
|
|
845
|
-
|
|
405
|
+
M = l;
|
|
846
406
|
break;
|
|
847
407
|
}
|
|
848
|
-
if (
|
|
408
|
+
if (s !== M)
|
|
849
409
|
return {
|
|
850
410
|
reset: {
|
|
851
|
-
placement:
|
|
411
|
+
placement: M
|
|
852
412
|
}
|
|
853
413
|
};
|
|
854
414
|
}
|
|
@@ -856,16 +416,16 @@ const cn = function(e) {
|
|
|
856
416
|
}
|
|
857
417
|
};
|
|
858
418
|
};
|
|
859
|
-
async function
|
|
419
|
+
async function yt(e, o) {
|
|
860
420
|
const {
|
|
861
421
|
placement: t,
|
|
862
422
|
platform: n,
|
|
863
|
-
elements:
|
|
864
|
-
} = e,
|
|
423
|
+
elements: s
|
|
424
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = i && c ? -1 : 1, d = he(o, e);
|
|
865
425
|
let {
|
|
866
|
-
mainAxis:
|
|
867
|
-
crossAxis:
|
|
868
|
-
alignmentAxis:
|
|
426
|
+
mainAxis: m,
|
|
427
|
+
crossAxis: f,
|
|
428
|
+
alignmentAxis: g
|
|
869
429
|
} = typeof d == "number" ? {
|
|
870
430
|
mainAxis: d,
|
|
871
431
|
crossAxis: 0,
|
|
@@ -875,37 +435,37 @@ async function an(e, o) {
|
|
|
875
435
|
crossAxis: d.crossAxis || 0,
|
|
876
436
|
alignmentAxis: d.alignmentAxis
|
|
877
437
|
};
|
|
878
|
-
return
|
|
879
|
-
x:
|
|
880
|
-
y:
|
|
438
|
+
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), c ? {
|
|
439
|
+
x: f * u,
|
|
440
|
+
y: m * a
|
|
881
441
|
} : {
|
|
882
|
-
x:
|
|
883
|
-
y:
|
|
442
|
+
x: m * a,
|
|
443
|
+
y: f * u
|
|
884
444
|
};
|
|
885
445
|
}
|
|
886
|
-
const
|
|
446
|
+
const bt = function(e) {
|
|
887
447
|
return e === void 0 && (e = 0), {
|
|
888
448
|
name: "offset",
|
|
889
449
|
options: e,
|
|
890
450
|
async fn(o) {
|
|
891
451
|
var t, n;
|
|
892
452
|
const {
|
|
893
|
-
x:
|
|
894
|
-
y:
|
|
895
|
-
placement:
|
|
896
|
-
middlewareData:
|
|
897
|
-
} = o,
|
|
898
|
-
return
|
|
899
|
-
x:
|
|
900
|
-
y:
|
|
453
|
+
x: s,
|
|
454
|
+
y: i,
|
|
455
|
+
placement: r,
|
|
456
|
+
middlewareData: l
|
|
457
|
+
} = o, c = await yt(o, e);
|
|
458
|
+
return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
459
|
+
x: s + c.x,
|
|
460
|
+
y: i + c.y,
|
|
901
461
|
data: {
|
|
902
|
-
...
|
|
903
|
-
placement:
|
|
462
|
+
...c,
|
|
463
|
+
placement: r
|
|
904
464
|
}
|
|
905
465
|
};
|
|
906
466
|
}
|
|
907
467
|
};
|
|
908
|
-
},
|
|
468
|
+
}, vt = function(e) {
|
|
909
469
|
return e === void 0 && (e = {}), {
|
|
910
470
|
name: "shift",
|
|
911
471
|
options: e,
|
|
@@ -913,94 +473,94 @@ const un = function(e) {
|
|
|
913
473
|
const {
|
|
914
474
|
x: t,
|
|
915
475
|
y: n,
|
|
916
|
-
placement:
|
|
476
|
+
placement: s
|
|
917
477
|
} = o, {
|
|
918
|
-
mainAxis:
|
|
919
|
-
crossAxis:
|
|
920
|
-
limiter:
|
|
921
|
-
fn: (
|
|
478
|
+
mainAxis: i = !0,
|
|
479
|
+
crossAxis: r = !1,
|
|
480
|
+
limiter: l = {
|
|
481
|
+
fn: (w) => {
|
|
922
482
|
let {
|
|
923
|
-
x:
|
|
924
|
-
y:
|
|
925
|
-
} =
|
|
483
|
+
x: h,
|
|
484
|
+
y: p
|
|
485
|
+
} = w;
|
|
926
486
|
return {
|
|
927
|
-
x:
|
|
928
|
-
y:
|
|
487
|
+
x: h,
|
|
488
|
+
y: p
|
|
929
489
|
};
|
|
930
490
|
}
|
|
931
491
|
},
|
|
932
|
-
...
|
|
933
|
-
} =
|
|
492
|
+
...c
|
|
493
|
+
} = he(e, o), a = {
|
|
934
494
|
x: t,
|
|
935
495
|
y: n
|
|
936
|
-
},
|
|
937
|
-
let
|
|
938
|
-
if (
|
|
939
|
-
const
|
|
940
|
-
|
|
496
|
+
}, u = await He(o, c), d = G(U(s)), m = Be(d);
|
|
497
|
+
let f = a[m], g = a[d];
|
|
498
|
+
if (i) {
|
|
499
|
+
const w = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[w], v = f - u[h];
|
|
500
|
+
f = Ae(p, f, v);
|
|
941
501
|
}
|
|
942
|
-
if (
|
|
943
|
-
const
|
|
944
|
-
|
|
502
|
+
if (r) {
|
|
503
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[w], v = g - u[h];
|
|
504
|
+
g = Ae(p, g, v);
|
|
945
505
|
}
|
|
946
|
-
const
|
|
506
|
+
const x = l.fn({
|
|
947
507
|
...o,
|
|
948
|
-
[
|
|
949
|
-
[d]:
|
|
508
|
+
[m]: f,
|
|
509
|
+
[d]: g
|
|
950
510
|
});
|
|
951
511
|
return {
|
|
952
|
-
...
|
|
512
|
+
...x,
|
|
953
513
|
data: {
|
|
954
|
-
x:
|
|
955
|
-
y:
|
|
514
|
+
x: x.x - t,
|
|
515
|
+
y: x.y - n,
|
|
956
516
|
enabled: {
|
|
957
|
-
[
|
|
958
|
-
[d]:
|
|
517
|
+
[m]: i,
|
|
518
|
+
[d]: r
|
|
959
519
|
}
|
|
960
520
|
}
|
|
961
521
|
};
|
|
962
522
|
}
|
|
963
523
|
};
|
|
964
524
|
};
|
|
965
|
-
function
|
|
525
|
+
function ge() {
|
|
966
526
|
return typeof window < "u";
|
|
967
527
|
}
|
|
968
|
-
function
|
|
969
|
-
return
|
|
528
|
+
function Q(e) {
|
|
529
|
+
return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
970
530
|
}
|
|
971
|
-
function
|
|
531
|
+
function A(e) {
|
|
972
532
|
var o;
|
|
973
533
|
return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
|
|
974
534
|
}
|
|
975
|
-
function
|
|
535
|
+
function P(e) {
|
|
976
536
|
var o;
|
|
977
|
-
return (o = (
|
|
537
|
+
return (o = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
|
|
978
538
|
}
|
|
979
|
-
function
|
|
980
|
-
return
|
|
539
|
+
function Ue(e) {
|
|
540
|
+
return ge() ? e instanceof Node || e instanceof A(e).Node : !1;
|
|
981
541
|
}
|
|
982
|
-
function
|
|
983
|
-
return
|
|
542
|
+
function N(e) {
|
|
543
|
+
return ge() ? e instanceof Element || e instanceof A(e).Element : !1;
|
|
984
544
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
545
|
+
function D(e) {
|
|
546
|
+
return ge() ? e instanceof HTMLElement || e instanceof A(e).HTMLElement : !1;
|
|
987
547
|
}
|
|
988
|
-
function
|
|
989
|
-
return !
|
|
548
|
+
function Ie(e) {
|
|
549
|
+
return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof A(e).ShadowRoot;
|
|
990
550
|
}
|
|
991
|
-
function
|
|
551
|
+
function oe(e) {
|
|
992
552
|
const {
|
|
993
553
|
overflow: o,
|
|
994
554
|
overflowX: t,
|
|
995
555
|
overflowY: n,
|
|
996
|
-
display:
|
|
997
|
-
} =
|
|
998
|
-
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(
|
|
556
|
+
display: s
|
|
557
|
+
} = L(e);
|
|
558
|
+
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(s);
|
|
999
559
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return ["table", "td", "th"].includes(
|
|
560
|
+
function Et(e) {
|
|
561
|
+
return ["table", "td", "th"].includes(Q(e));
|
|
1002
562
|
}
|
|
1003
|
-
function
|
|
563
|
+
function pe(e) {
|
|
1004
564
|
return [":popover-open", ":modal"].some((o) => {
|
|
1005
565
|
try {
|
|
1006
566
|
return e.matches(o);
|
|
@@ -1009,32 +569,32 @@ function Ie(e) {
|
|
|
1009
569
|
}
|
|
1010
570
|
});
|
|
1011
571
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const o =
|
|
572
|
+
function Oe(e) {
|
|
573
|
+
const o = Re(), t = N(e) ? L(e) : e;
|
|
1014
574
|
return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
|
|
1015
575
|
}
|
|
1016
|
-
function
|
|
1017
|
-
let o =
|
|
1018
|
-
for (;
|
|
1019
|
-
if (
|
|
576
|
+
function St(e) {
|
|
577
|
+
let o = $(e);
|
|
578
|
+
for (; D(o) && !J(o); ) {
|
|
579
|
+
if (Oe(o))
|
|
1020
580
|
return o;
|
|
1021
|
-
if (
|
|
581
|
+
if (pe(o))
|
|
1022
582
|
return null;
|
|
1023
|
-
o =
|
|
583
|
+
o = $(o);
|
|
1024
584
|
}
|
|
1025
585
|
return null;
|
|
1026
586
|
}
|
|
1027
|
-
function
|
|
587
|
+
function Re() {
|
|
1028
588
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1029
589
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return ["html", "body", "#document"].includes(
|
|
590
|
+
function J(e) {
|
|
591
|
+
return ["html", "body", "#document"].includes(Q(e));
|
|
1032
592
|
}
|
|
1033
|
-
function
|
|
1034
|
-
return
|
|
593
|
+
function L(e) {
|
|
594
|
+
return A(e).getComputedStyle(e);
|
|
1035
595
|
}
|
|
1036
|
-
function
|
|
1037
|
-
return
|
|
596
|
+
function xe(e) {
|
|
597
|
+
return N(e) ? {
|
|
1038
598
|
scrollLeft: e.scrollLeft,
|
|
1039
599
|
scrollTop: e.scrollTop
|
|
1040
600
|
} : {
|
|
@@ -1042,293 +602,293 @@ function Pe(e) {
|
|
|
1042
602
|
scrollTop: e.scrollY
|
|
1043
603
|
};
|
|
1044
604
|
}
|
|
1045
|
-
function
|
|
1046
|
-
if (
|
|
605
|
+
function $(e) {
|
|
606
|
+
if (Q(e) === "html")
|
|
1047
607
|
return e;
|
|
1048
608
|
const o = (
|
|
1049
609
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1050
610
|
e.assignedSlot || // DOM Element detected.
|
|
1051
611
|
e.parentNode || // ShadowRoot detected.
|
|
1052
|
-
|
|
1053
|
-
|
|
612
|
+
Ie(e) && e.host || // Fallback.
|
|
613
|
+
P(e)
|
|
1054
614
|
);
|
|
1055
|
-
return
|
|
615
|
+
return Ie(o) ? o.host : o;
|
|
1056
616
|
}
|
|
1057
|
-
function
|
|
1058
|
-
const o =
|
|
1059
|
-
return
|
|
617
|
+
function Ke(e) {
|
|
618
|
+
const o = $(e);
|
|
619
|
+
return J(o) ? e.ownerDocument ? e.ownerDocument.body : e.body : D(o) && oe(o) ? o : Ke(o);
|
|
1060
620
|
}
|
|
1061
|
-
function
|
|
621
|
+
function ne(e, o, t) {
|
|
1062
622
|
var n;
|
|
1063
623
|
o === void 0 && (o = []), t === void 0 && (t = !0);
|
|
1064
|
-
const
|
|
1065
|
-
if (
|
|
1066
|
-
const
|
|
1067
|
-
return o.concat(
|
|
624
|
+
const s = Ke(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(s);
|
|
625
|
+
if (i) {
|
|
626
|
+
const l = Ce(r);
|
|
627
|
+
return o.concat(r, r.visualViewport || [], oe(s) ? s : [], l && t ? ne(l) : []);
|
|
1068
628
|
}
|
|
1069
|
-
return o.concat(
|
|
629
|
+
return o.concat(s, ne(s, [], t));
|
|
1070
630
|
}
|
|
1071
|
-
function
|
|
631
|
+
function Ce(e) {
|
|
1072
632
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1073
633
|
}
|
|
1074
|
-
function
|
|
1075
|
-
const o =
|
|
634
|
+
function Ye(e) {
|
|
635
|
+
const o = L(e);
|
|
1076
636
|
let t = parseFloat(o.width) || 0, n = parseFloat(o.height) || 0;
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
637
|
+
const s = D(e), i = s ? e.offsetWidth : t, r = s ? e.offsetHeight : n, l = ce(t) !== i || ce(n) !== r;
|
|
638
|
+
return l && (t = i, n = r), {
|
|
1079
639
|
width: t,
|
|
1080
640
|
height: n,
|
|
1081
|
-
$:
|
|
641
|
+
$: l
|
|
1082
642
|
};
|
|
1083
643
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return
|
|
644
|
+
function ke(e) {
|
|
645
|
+
return N(e) ? e : e.contextElement;
|
|
1086
646
|
}
|
|
1087
|
-
function
|
|
1088
|
-
const o =
|
|
1089
|
-
if (!
|
|
1090
|
-
return
|
|
647
|
+
function Z(e) {
|
|
648
|
+
const o = ke(e);
|
|
649
|
+
if (!D(o))
|
|
650
|
+
return _(1);
|
|
1091
651
|
const t = o.getBoundingClientRect(), {
|
|
1092
652
|
width: n,
|
|
1093
|
-
height:
|
|
1094
|
-
$:
|
|
1095
|
-
} =
|
|
1096
|
-
let
|
|
1097
|
-
return (!
|
|
1098
|
-
x:
|
|
1099
|
-
y:
|
|
653
|
+
height: s,
|
|
654
|
+
$: i
|
|
655
|
+
} = Ye(o);
|
|
656
|
+
let r = (i ? ce(t.width) : t.width) / n, l = (i ? ce(t.height) : t.height) / s;
|
|
657
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
658
|
+
x: r,
|
|
659
|
+
y: l
|
|
1100
660
|
};
|
|
1101
661
|
}
|
|
1102
|
-
const
|
|
1103
|
-
function
|
|
1104
|
-
const o =
|
|
1105
|
-
return !
|
|
662
|
+
const Ct = /* @__PURE__ */ _(0);
|
|
663
|
+
function qe(e) {
|
|
664
|
+
const o = A(e);
|
|
665
|
+
return !Re() || !o.visualViewport ? Ct : {
|
|
1106
666
|
x: o.visualViewport.offsetLeft,
|
|
1107
667
|
y: o.visualViewport.offsetTop
|
|
1108
668
|
};
|
|
1109
669
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return o === void 0 && (o = !1), !t || o && t !==
|
|
670
|
+
function Ot(e, o, t) {
|
|
671
|
+
return o === void 0 && (o = !1), !t || o && t !== A(e) ? !1 : o;
|
|
1112
672
|
}
|
|
1113
|
-
function
|
|
673
|
+
function K(e, o, t, n) {
|
|
1114
674
|
o === void 0 && (o = !1), t === void 0 && (t = !1);
|
|
1115
|
-
const
|
|
1116
|
-
let
|
|
1117
|
-
o && (n ?
|
|
1118
|
-
const
|
|
1119
|
-
let
|
|
1120
|
-
if (
|
|
1121
|
-
const
|
|
1122
|
-
let
|
|
1123
|
-
for (;
|
|
1124
|
-
const
|
|
1125
|
-
|
|
675
|
+
const s = e.getBoundingClientRect(), i = ke(e);
|
|
676
|
+
let r = _(1);
|
|
677
|
+
o && (n ? N(n) && (r = Z(n)) : r = Z(e));
|
|
678
|
+
const l = Ot(i, t, n) ? qe(i) : _(0);
|
|
679
|
+
let c = (s.left + l.x) / r.x, a = (s.top + l.y) / r.y, u = s.width / r.x, d = s.height / r.y;
|
|
680
|
+
if (i) {
|
|
681
|
+
const m = A(i), f = n && N(n) ? A(n) : n;
|
|
682
|
+
let g = m, x = Ce(g);
|
|
683
|
+
for (; x && n && f !== g; ) {
|
|
684
|
+
const w = Z(x), h = x.getBoundingClientRect(), p = L(x), v = h.left + (x.clientLeft + parseFloat(p.paddingLeft)) * w.x, E = h.top + (x.clientTop + parseFloat(p.paddingTop)) * w.y;
|
|
685
|
+
c *= w.x, a *= w.y, u *= w.x, d *= w.y, c += v, a += E, g = A(x), x = Ce(g);
|
|
1126
686
|
}
|
|
1127
687
|
}
|
|
1128
|
-
return
|
|
1129
|
-
width:
|
|
688
|
+
return ue({
|
|
689
|
+
width: u,
|
|
1130
690
|
height: d,
|
|
1131
|
-
x:
|
|
1132
|
-
y:
|
|
691
|
+
x: c,
|
|
692
|
+
y: a
|
|
1133
693
|
});
|
|
1134
694
|
}
|
|
1135
|
-
function
|
|
1136
|
-
const t =
|
|
1137
|
-
return o ? o.left + t :
|
|
695
|
+
function Me(e, o) {
|
|
696
|
+
const t = xe(e).scrollLeft;
|
|
697
|
+
return o ? o.left + t : K(P(e)).left + t;
|
|
1138
698
|
}
|
|
1139
|
-
function
|
|
699
|
+
function Xe(e, o, t) {
|
|
1140
700
|
t === void 0 && (t = !1);
|
|
1141
|
-
const n = e.getBoundingClientRect(),
|
|
701
|
+
const n = e.getBoundingClientRect(), s = n.left + o.scrollLeft - (t ? 0 : (
|
|
1142
702
|
// RTL <body> scrollbar.
|
|
1143
|
-
|
|
1144
|
-
)),
|
|
703
|
+
Me(e, n)
|
|
704
|
+
)), i = n.top + o.scrollTop;
|
|
1145
705
|
return {
|
|
1146
|
-
x:
|
|
1147
|
-
y:
|
|
706
|
+
x: s,
|
|
707
|
+
y: i
|
|
1148
708
|
};
|
|
1149
709
|
}
|
|
1150
|
-
function
|
|
710
|
+
function Rt(e) {
|
|
1151
711
|
let {
|
|
1152
712
|
elements: o,
|
|
1153
713
|
rect: t,
|
|
1154
714
|
offsetParent: n,
|
|
1155
|
-
strategy:
|
|
715
|
+
strategy: s
|
|
1156
716
|
} = e;
|
|
1157
|
-
const
|
|
1158
|
-
if (n ===
|
|
717
|
+
const i = s === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
|
|
718
|
+
if (n === r || l && i)
|
|
1159
719
|
return t;
|
|
1160
|
-
let
|
|
720
|
+
let c = {
|
|
1161
721
|
scrollLeft: 0,
|
|
1162
722
|
scrollTop: 0
|
|
1163
|
-
},
|
|
1164
|
-
const
|
|
1165
|
-
if ((d || !d && !
|
|
1166
|
-
const
|
|
1167
|
-
|
|
723
|
+
}, a = _(1);
|
|
724
|
+
const u = _(0), d = D(n);
|
|
725
|
+
if ((d || !d && !i) && ((Q(n) !== "body" || oe(r)) && (c = xe(n)), D(n))) {
|
|
726
|
+
const f = K(n);
|
|
727
|
+
a = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
|
|
1168
728
|
}
|
|
1169
|
-
const
|
|
729
|
+
const m = r && !d && !i ? Xe(r, c, !0) : _(0);
|
|
1170
730
|
return {
|
|
1171
|
-
width: t.width *
|
|
1172
|
-
height: t.height *
|
|
1173
|
-
x: t.x *
|
|
1174
|
-
y: t.y *
|
|
731
|
+
width: t.width * a.x,
|
|
732
|
+
height: t.height * a.y,
|
|
733
|
+
x: t.x * a.x - c.scrollLeft * a.x + u.x + m.x,
|
|
734
|
+
y: t.y * a.y - c.scrollTop * a.y + u.y + m.y
|
|
1175
735
|
};
|
|
1176
736
|
}
|
|
1177
|
-
function
|
|
737
|
+
function kt(e) {
|
|
1178
738
|
return Array.from(e.getClientRects());
|
|
1179
739
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const o =
|
|
1182
|
-
let
|
|
1183
|
-
const
|
|
1184
|
-
return
|
|
1185
|
-
width:
|
|
1186
|
-
height:
|
|
740
|
+
function Mt(e) {
|
|
741
|
+
const o = P(e), t = xe(e), n = e.ownerDocument.body, s = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), i = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
|
|
742
|
+
let r = -t.scrollLeft + Me(e);
|
|
743
|
+
const l = -t.scrollTop;
|
|
744
|
+
return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - s), {
|
|
745
|
+
width: s,
|
|
746
|
+
height: i,
|
|
747
|
+
x: r,
|
|
748
|
+
y: l
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
function Tt(e, o) {
|
|
752
|
+
const t = A(e), n = P(e), s = t.visualViewport;
|
|
753
|
+
let i = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
|
|
754
|
+
if (s) {
|
|
755
|
+
i = s.width, r = s.height;
|
|
756
|
+
const a = Re();
|
|
757
|
+
(!a || a && o === "fixed") && (l = s.offsetLeft, c = s.offsetTop);
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
width: i,
|
|
761
|
+
height: r,
|
|
1187
762
|
x: l,
|
|
1188
763
|
y: c
|
|
1189
764
|
};
|
|
1190
765
|
}
|
|
1191
|
-
function
|
|
1192
|
-
const t =
|
|
1193
|
-
let s = n.clientWidth, l = n.clientHeight, c = 0, a = 0;
|
|
1194
|
-
if (r) {
|
|
1195
|
-
s = r.width, l = r.height;
|
|
1196
|
-
const u = Xe();
|
|
1197
|
-
(!u || u && o === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
1198
|
-
}
|
|
766
|
+
function At(e, o) {
|
|
767
|
+
const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, s = t.left + e.clientLeft, i = D(e) ? Z(e) : _(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, c = s * i.x, a = n * i.y;
|
|
1199
768
|
return {
|
|
1200
|
-
width:
|
|
769
|
+
width: r,
|
|
1201
770
|
height: l,
|
|
1202
771
|
x: c,
|
|
1203
772
|
y: a
|
|
1204
773
|
};
|
|
1205
774
|
}
|
|
1206
|
-
function
|
|
1207
|
-
const t = ce(e, !0, o === "fixed"), n = t.top + e.clientTop, r = t.left + e.clientLeft, s = J(e) ? fe(e) : X(1), l = e.clientWidth * s.x, c = e.clientHeight * s.y, a = r * s.x, u = n * s.y;
|
|
1208
|
-
return {
|
|
1209
|
-
width: l,
|
|
1210
|
-
height: c,
|
|
1211
|
-
x: a,
|
|
1212
|
-
y: u
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
function pt(e, o, t) {
|
|
775
|
+
function Ne(e, o, t) {
|
|
1216
776
|
let n;
|
|
1217
777
|
if (o === "viewport")
|
|
1218
|
-
n =
|
|
778
|
+
n = Tt(e, t);
|
|
1219
779
|
else if (o === "document")
|
|
1220
|
-
n =
|
|
1221
|
-
else if (
|
|
1222
|
-
n =
|
|
780
|
+
n = Mt(P(e));
|
|
781
|
+
else if (N(o))
|
|
782
|
+
n = At(o, t);
|
|
1223
783
|
else {
|
|
1224
|
-
const
|
|
784
|
+
const s = qe(e);
|
|
1225
785
|
n = {
|
|
1226
|
-
x: o.x -
|
|
1227
|
-
y: o.y -
|
|
786
|
+
x: o.x - s.x,
|
|
787
|
+
y: o.y - s.y,
|
|
1228
788
|
width: o.width,
|
|
1229
789
|
height: o.height
|
|
1230
790
|
};
|
|
1231
791
|
}
|
|
1232
|
-
return
|
|
792
|
+
return ue(n);
|
|
1233
793
|
}
|
|
1234
|
-
function
|
|
1235
|
-
const t =
|
|
1236
|
-
return t === o || !
|
|
794
|
+
function Ze(e, o) {
|
|
795
|
+
const t = $(e);
|
|
796
|
+
return t === o || !N(t) || J(t) ? !1 : L(t).position === "fixed" || Ze(t, o);
|
|
1237
797
|
}
|
|
1238
|
-
function
|
|
798
|
+
function zt(e, o) {
|
|
1239
799
|
const t = o.get(e);
|
|
1240
800
|
if (t)
|
|
1241
801
|
return t;
|
|
1242
|
-
let n =
|
|
1243
|
-
const
|
|
1244
|
-
let
|
|
1245
|
-
for (;
|
|
1246
|
-
const
|
|
1247
|
-
!
|
|
802
|
+
let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), s = null;
|
|
803
|
+
const i = L(e).position === "fixed";
|
|
804
|
+
let r = i ? $(e) : e;
|
|
805
|
+
for (; N(r) && !J(r); ) {
|
|
806
|
+
const l = L(r), c = Oe(r);
|
|
807
|
+
!c && l.position === "fixed" && (s = null), (i ? !c && !s : !c && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : s = l, r = $(r);
|
|
1248
808
|
}
|
|
1249
809
|
return o.set(e, n), n;
|
|
1250
810
|
}
|
|
1251
|
-
function
|
|
811
|
+
function It(e) {
|
|
1252
812
|
let {
|
|
1253
813
|
element: o,
|
|
1254
814
|
boundary: t,
|
|
1255
815
|
rootBoundary: n,
|
|
1256
|
-
strategy:
|
|
816
|
+
strategy: s
|
|
1257
817
|
} = e;
|
|
1258
|
-
const
|
|
1259
|
-
const d =
|
|
1260
|
-
return
|
|
1261
|
-
},
|
|
818
|
+
const r = [...t === "clippingAncestors" ? pe(o) ? [] : zt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((a, u) => {
|
|
819
|
+
const d = Ne(o, u, s);
|
|
820
|
+
return a.top = H(d.top, a.top), a.right = le(d.right, a.right), a.bottom = le(d.bottom, a.bottom), a.left = H(d.left, a.left), a;
|
|
821
|
+
}, Ne(o, l, s));
|
|
1262
822
|
return {
|
|
1263
|
-
width:
|
|
1264
|
-
height:
|
|
1265
|
-
x:
|
|
1266
|
-
y:
|
|
823
|
+
width: c.right - c.left,
|
|
824
|
+
height: c.bottom - c.top,
|
|
825
|
+
x: c.left,
|
|
826
|
+
y: c.top
|
|
1267
827
|
};
|
|
1268
828
|
}
|
|
1269
|
-
function
|
|
829
|
+
function Nt(e) {
|
|
1270
830
|
const {
|
|
1271
831
|
width: o,
|
|
1272
832
|
height: t
|
|
1273
|
-
} =
|
|
833
|
+
} = Ye(e);
|
|
1274
834
|
return {
|
|
1275
835
|
width: o,
|
|
1276
836
|
height: t
|
|
1277
837
|
};
|
|
1278
838
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const n =
|
|
1281
|
-
let
|
|
839
|
+
function Lt(e, o, t) {
|
|
840
|
+
const n = D(o), s = P(o), i = t === "fixed", r = K(e, !0, i, o);
|
|
841
|
+
let l = {
|
|
1282
842
|
scrollLeft: 0,
|
|
1283
843
|
scrollTop: 0
|
|
1284
844
|
};
|
|
1285
|
-
const
|
|
1286
|
-
if (n || !n && !
|
|
1287
|
-
if ((
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1290
|
-
} else
|
|
1291
|
-
const
|
|
845
|
+
const c = _(0);
|
|
846
|
+
if (n || !n && !i)
|
|
847
|
+
if ((Q(o) !== "body" || oe(s)) && (l = xe(o)), n) {
|
|
848
|
+
const m = K(o, !0, i, o);
|
|
849
|
+
c.x = m.x + o.clientLeft, c.y = m.y + o.clientTop;
|
|
850
|
+
} else s && (c.x = Me(s));
|
|
851
|
+
const a = s && !n && !i ? Xe(s, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, d = r.top + l.scrollTop - c.y - a.y;
|
|
1292
852
|
return {
|
|
1293
|
-
x:
|
|
853
|
+
x: u,
|
|
1294
854
|
y: d,
|
|
1295
|
-
width:
|
|
1296
|
-
height:
|
|
855
|
+
width: r.width,
|
|
856
|
+
height: r.height
|
|
1297
857
|
};
|
|
1298
858
|
}
|
|
1299
|
-
function
|
|
1300
|
-
return
|
|
859
|
+
function we(e) {
|
|
860
|
+
return L(e).position === "static";
|
|
1301
861
|
}
|
|
1302
|
-
function
|
|
1303
|
-
if (!
|
|
862
|
+
function Le(e, o) {
|
|
863
|
+
if (!D(e) || L(e).position === "fixed")
|
|
1304
864
|
return null;
|
|
1305
865
|
if (o)
|
|
1306
866
|
return o(e);
|
|
1307
867
|
let t = e.offsetParent;
|
|
1308
|
-
return
|
|
868
|
+
return P(e) === t && (t = t.ownerDocument.body), t;
|
|
1309
869
|
}
|
|
1310
|
-
function
|
|
1311
|
-
const t =
|
|
1312
|
-
if (
|
|
870
|
+
function Ge(e, o) {
|
|
871
|
+
const t = A(e);
|
|
872
|
+
if (pe(e))
|
|
1313
873
|
return t;
|
|
1314
|
-
if (!
|
|
1315
|
-
let
|
|
1316
|
-
for (;
|
|
1317
|
-
if (
|
|
1318
|
-
return
|
|
1319
|
-
|
|
874
|
+
if (!D(e)) {
|
|
875
|
+
let s = $(e);
|
|
876
|
+
for (; s && !J(s); ) {
|
|
877
|
+
if (N(s) && !we(s))
|
|
878
|
+
return s;
|
|
879
|
+
s = $(s);
|
|
1320
880
|
}
|
|
1321
881
|
return t;
|
|
1322
882
|
}
|
|
1323
|
-
let n =
|
|
1324
|
-
for (; n &&
|
|
1325
|
-
n =
|
|
1326
|
-
return n &&
|
|
883
|
+
let n = Le(e, o);
|
|
884
|
+
for (; n && Et(n) && we(n); )
|
|
885
|
+
n = Le(n, o);
|
|
886
|
+
return n && J(n) && we(n) && !Oe(n) ? t : n || St(e) || t;
|
|
1327
887
|
}
|
|
1328
|
-
const
|
|
1329
|
-
const o = this.getOffsetParent ||
|
|
888
|
+
const _t = async function(e) {
|
|
889
|
+
const o = this.getOffsetParent || Ge, t = this.getDimensions, n = await t(e.floating);
|
|
1330
890
|
return {
|
|
1331
|
-
reference:
|
|
891
|
+
reference: Lt(e.reference, await o(e.floating), e.strategy),
|
|
1332
892
|
floating: {
|
|
1333
893
|
x: 0,
|
|
1334
894
|
y: 0,
|
|
@@ -1337,273 +897,273 @@ const On = async function(e) {
|
|
|
1337
897
|
}
|
|
1338
898
|
};
|
|
1339
899
|
};
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1342
|
-
}
|
|
1343
|
-
const
|
|
1344
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1345
|
-
getDocumentElement:
|
|
1346
|
-
getClippingRect:
|
|
1347
|
-
getOffsetParent:
|
|
1348
|
-
getElementRects:
|
|
1349
|
-
getClientRects:
|
|
1350
|
-
getDimensions:
|
|
1351
|
-
getScale:
|
|
1352
|
-
isElement:
|
|
1353
|
-
isRTL:
|
|
900
|
+
function Dt(e) {
|
|
901
|
+
return L(e).direction === "rtl";
|
|
902
|
+
}
|
|
903
|
+
const Pt = {
|
|
904
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Rt,
|
|
905
|
+
getDocumentElement: P,
|
|
906
|
+
getClippingRect: It,
|
|
907
|
+
getOffsetParent: Ge,
|
|
908
|
+
getElementRects: _t,
|
|
909
|
+
getClientRects: kt,
|
|
910
|
+
getDimensions: Nt,
|
|
911
|
+
getScale: Z,
|
|
912
|
+
isElement: N,
|
|
913
|
+
isRTL: Dt
|
|
1354
914
|
};
|
|
1355
|
-
function
|
|
915
|
+
function Ft(e, o) {
|
|
1356
916
|
let t = null, n;
|
|
1357
|
-
const
|
|
1358
|
-
function
|
|
1359
|
-
var
|
|
1360
|
-
clearTimeout(n), (
|
|
917
|
+
const s = P(e);
|
|
918
|
+
function i() {
|
|
919
|
+
var l;
|
|
920
|
+
clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
|
|
1361
921
|
}
|
|
1362
|
-
function l
|
|
1363
|
-
|
|
922
|
+
function r(l, c) {
|
|
923
|
+
l === void 0 && (l = !1), c === void 0 && (c = 1), i();
|
|
1364
924
|
const {
|
|
1365
|
-
left:
|
|
1366
|
-
top:
|
|
925
|
+
left: a,
|
|
926
|
+
top: u,
|
|
1367
927
|
width: d,
|
|
1368
|
-
height:
|
|
928
|
+
height: m
|
|
1369
929
|
} = e.getBoundingClientRect();
|
|
1370
|
-
if (
|
|
930
|
+
if (l || o(), !d || !m)
|
|
1371
931
|
return;
|
|
1372
|
-
const
|
|
1373
|
-
rootMargin: -
|
|
1374
|
-
threshold:
|
|
932
|
+
const f = se(u), g = se(s.clientWidth - (a + d)), x = se(s.clientHeight - (u + m)), w = se(a), p = {
|
|
933
|
+
rootMargin: -f + "px " + -g + "px " + -x + "px " + -w + "px",
|
|
934
|
+
threshold: H(0, le(1, c)) || 1
|
|
1375
935
|
};
|
|
1376
|
-
let
|
|
1377
|
-
function
|
|
1378
|
-
const
|
|
1379
|
-
if (
|
|
1380
|
-
if (!
|
|
1381
|
-
return
|
|
1382
|
-
|
|
1383
|
-
|
|
936
|
+
let v = !0;
|
|
937
|
+
function E(y) {
|
|
938
|
+
const O = y[0].intersectionRatio;
|
|
939
|
+
if (O !== c) {
|
|
940
|
+
if (!v)
|
|
941
|
+
return r();
|
|
942
|
+
O ? r(!1, O) : n = setTimeout(() => {
|
|
943
|
+
r(!1, 1e-7);
|
|
1384
944
|
}, 1e3);
|
|
1385
945
|
}
|
|
1386
|
-
|
|
946
|
+
v = !1;
|
|
1387
947
|
}
|
|
1388
948
|
try {
|
|
1389
|
-
t = new IntersectionObserver(
|
|
1390
|
-
...
|
|
949
|
+
t = new IntersectionObserver(E, {
|
|
950
|
+
...p,
|
|
1391
951
|
// Handle <iframe>s
|
|
1392
|
-
root:
|
|
952
|
+
root: s.ownerDocument
|
|
1393
953
|
});
|
|
1394
954
|
} catch {
|
|
1395
|
-
t = new IntersectionObserver(
|
|
955
|
+
t = new IntersectionObserver(E, p);
|
|
1396
956
|
}
|
|
1397
957
|
t.observe(e);
|
|
1398
958
|
}
|
|
1399
|
-
return
|
|
959
|
+
return r(!0), i;
|
|
1400
960
|
}
|
|
1401
|
-
function
|
|
961
|
+
function Vt(e, o, t, n) {
|
|
1402
962
|
n === void 0 && (n = {});
|
|
1403
963
|
const {
|
|
1404
|
-
ancestorScroll:
|
|
1405
|
-
ancestorResize:
|
|
1406
|
-
elementResize:
|
|
1407
|
-
layoutShift:
|
|
1408
|
-
animationFrame:
|
|
1409
|
-
} = n,
|
|
1410
|
-
|
|
1411
|
-
|
|
964
|
+
ancestorScroll: s = !0,
|
|
965
|
+
ancestorResize: i = !0,
|
|
966
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
967
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
968
|
+
animationFrame: c = !1
|
|
969
|
+
} = n, a = ke(e), u = s || i ? [...a ? ne(a) : [], ...ne(o)] : [];
|
|
970
|
+
u.forEach((h) => {
|
|
971
|
+
s && h.addEventListener("scroll", t, {
|
|
1412
972
|
passive: !0
|
|
1413
|
-
}),
|
|
973
|
+
}), i && h.addEventListener("resize", t);
|
|
1414
974
|
});
|
|
1415
|
-
const d =
|
|
1416
|
-
let
|
|
1417
|
-
|
|
1418
|
-
let [
|
|
1419
|
-
|
|
1420
|
-
var
|
|
1421
|
-
(
|
|
975
|
+
const d = a && l ? Ft(a, t) : null;
|
|
976
|
+
let m = -1, f = null;
|
|
977
|
+
r && (f = new ResizeObserver((h) => {
|
|
978
|
+
let [p] = h;
|
|
979
|
+
p && p.target === a && f && (f.unobserve(o), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
980
|
+
var v;
|
|
981
|
+
(v = f) == null || v.observe(o);
|
|
1422
982
|
})), t();
|
|
1423
|
-
}),
|
|
1424
|
-
let
|
|
1425
|
-
|
|
1426
|
-
function
|
|
1427
|
-
const
|
|
1428
|
-
|
|
983
|
+
}), a && !c && f.observe(a), f.observe(o));
|
|
984
|
+
let g, x = c ? K(e) : null;
|
|
985
|
+
c && w();
|
|
986
|
+
function w() {
|
|
987
|
+
const h = K(e);
|
|
988
|
+
x && (h.x !== x.x || h.y !== x.y || h.width !== x.width || h.height !== x.height) && t(), x = h, g = requestAnimationFrame(w);
|
|
1429
989
|
}
|
|
1430
990
|
return t(), () => {
|
|
1431
|
-
var
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
}), d == null || d(), (
|
|
991
|
+
var h;
|
|
992
|
+
u.forEach((p) => {
|
|
993
|
+
s && p.removeEventListener("scroll", t), i && p.removeEventListener("resize", t);
|
|
994
|
+
}), d == null || d(), (h = f) == null || h.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
1435
995
|
};
|
|
1436
996
|
}
|
|
1437
|
-
const
|
|
1438
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1439
|
-
platform:
|
|
997
|
+
const Wt = bt, Bt = vt, jt = wt, $t = (e, o, t) => {
|
|
998
|
+
const n = /* @__PURE__ */ new Map(), s = {
|
|
999
|
+
platform: Pt,
|
|
1440
1000
|
...t
|
|
1441
|
-
},
|
|
1442
|
-
...
|
|
1001
|
+
}, i = {
|
|
1002
|
+
...s.platform,
|
|
1443
1003
|
_c: n
|
|
1444
1004
|
};
|
|
1445
|
-
return
|
|
1446
|
-
...
|
|
1447
|
-
platform:
|
|
1005
|
+
return xt(e, o, {
|
|
1006
|
+
...s,
|
|
1007
|
+
platform: i
|
|
1448
1008
|
});
|
|
1449
1009
|
};
|
|
1450
|
-
var
|
|
1451
|
-
function
|
|
1010
|
+
var ie = typeof document < "u" ? tt : re;
|
|
1011
|
+
function fe(e, o) {
|
|
1452
1012
|
if (e === o)
|
|
1453
1013
|
return !0;
|
|
1454
1014
|
if (typeof e != typeof o)
|
|
1455
1015
|
return !1;
|
|
1456
1016
|
if (typeof e == "function" && e.toString() === o.toString())
|
|
1457
1017
|
return !0;
|
|
1458
|
-
let t, n,
|
|
1018
|
+
let t, n, s;
|
|
1459
1019
|
if (e && o && typeof e == "object") {
|
|
1460
1020
|
if (Array.isArray(e)) {
|
|
1461
1021
|
if (t = e.length, t !== o.length) return !1;
|
|
1462
1022
|
for (n = t; n-- !== 0; )
|
|
1463
|
-
if (!
|
|
1023
|
+
if (!fe(e[n], o[n]))
|
|
1464
1024
|
return !1;
|
|
1465
1025
|
return !0;
|
|
1466
1026
|
}
|
|
1467
|
-
if (
|
|
1027
|
+
if (s = Object.keys(e), t = s.length, t !== Object.keys(o).length)
|
|
1468
1028
|
return !1;
|
|
1469
1029
|
for (n = t; n-- !== 0; )
|
|
1470
|
-
if (!{}.hasOwnProperty.call(o,
|
|
1030
|
+
if (!{}.hasOwnProperty.call(o, s[n]))
|
|
1471
1031
|
return !1;
|
|
1472
1032
|
for (n = t; n-- !== 0; ) {
|
|
1473
|
-
const
|
|
1474
|
-
if (!(
|
|
1033
|
+
const i = s[n];
|
|
1034
|
+
if (!(i === "_owner" && e.$$typeof) && !fe(e[i], o[i]))
|
|
1475
1035
|
return !1;
|
|
1476
1036
|
}
|
|
1477
1037
|
return !0;
|
|
1478
1038
|
}
|
|
1479
1039
|
return e !== e && o !== o;
|
|
1480
1040
|
}
|
|
1481
|
-
function
|
|
1041
|
+
function Je(e) {
|
|
1482
1042
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1483
1043
|
}
|
|
1484
|
-
function
|
|
1485
|
-
const t =
|
|
1044
|
+
function _e(e, o) {
|
|
1045
|
+
const t = Je(e);
|
|
1486
1046
|
return Math.round(o * t) / t;
|
|
1487
1047
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const o =
|
|
1490
|
-
return
|
|
1048
|
+
function ye(e) {
|
|
1049
|
+
const o = C.useRef(e);
|
|
1050
|
+
return ie(() => {
|
|
1491
1051
|
o.current = e;
|
|
1492
1052
|
}), o;
|
|
1493
1053
|
}
|
|
1494
|
-
function
|
|
1054
|
+
function Ht(e) {
|
|
1495
1055
|
e === void 0 && (e = {});
|
|
1496
1056
|
const {
|
|
1497
1057
|
placement: o = "bottom",
|
|
1498
1058
|
strategy: t = "absolute",
|
|
1499
1059
|
middleware: n = [],
|
|
1500
|
-
platform:
|
|
1060
|
+
platform: s,
|
|
1501
1061
|
elements: {
|
|
1502
|
-
reference:
|
|
1503
|
-
floating:
|
|
1062
|
+
reference: i,
|
|
1063
|
+
floating: r
|
|
1504
1064
|
} = {},
|
|
1505
|
-
transform:
|
|
1506
|
-
whileElementsMounted:
|
|
1507
|
-
open:
|
|
1508
|
-
} = e, [
|
|
1065
|
+
transform: l = !0,
|
|
1066
|
+
whileElementsMounted: c,
|
|
1067
|
+
open: a
|
|
1068
|
+
} = e, [u, d] = C.useState({
|
|
1509
1069
|
x: 0,
|
|
1510
1070
|
y: 0,
|
|
1511
1071
|
strategy: t,
|
|
1512
1072
|
placement: o,
|
|
1513
1073
|
middlewareData: {},
|
|
1514
1074
|
isPositioned: !1
|
|
1515
|
-
}), [
|
|
1516
|
-
|
|
1517
|
-
const [
|
|
1518
|
-
|
|
1519
|
-
}, []),
|
|
1520
|
-
|
|
1521
|
-
}, []),
|
|
1522
|
-
if (!
|
|
1075
|
+
}), [m, f] = C.useState(n);
|
|
1076
|
+
fe(m, n) || f(n);
|
|
1077
|
+
const [g, x] = C.useState(null), [w, h] = C.useState(null), p = C.useCallback((S) => {
|
|
1078
|
+
S !== O.current && (O.current = S, x(S));
|
|
1079
|
+
}, []), v = C.useCallback((S) => {
|
|
1080
|
+
S !== R.current && (R.current = S, h(S));
|
|
1081
|
+
}, []), E = i || g, y = r || w, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(s), ee = ye(a), B = C.useCallback(() => {
|
|
1082
|
+
if (!O.current || !R.current)
|
|
1523
1083
|
return;
|
|
1524
|
-
const
|
|
1084
|
+
const S = {
|
|
1525
1085
|
placement: o,
|
|
1526
1086
|
strategy: t,
|
|
1527
|
-
middleware:
|
|
1087
|
+
middleware: m
|
|
1528
1088
|
};
|
|
1529
|
-
q.current && (
|
|
1530
|
-
const
|
|
1531
|
-
...
|
|
1089
|
+
q.current && (S.platform = q.current), $t(O.current, R.current, S).then((T) => {
|
|
1090
|
+
const j = {
|
|
1091
|
+
...T,
|
|
1532
1092
|
// The floating element's position may be recomputed while it's closed
|
|
1533
1093
|
// but still mounted (such as when transitioning out). To ensure
|
|
1534
1094
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1535
1095
|
// setting it to `true` when `open === false` (must be specified).
|
|
1536
|
-
isPositioned:
|
|
1096
|
+
isPositioned: ee.current !== !1
|
|
1537
1097
|
};
|
|
1538
|
-
|
|
1539
|
-
d(
|
|
1098
|
+
I.current && !fe(z.current, j) && (z.current = j, ot.flushSync(() => {
|
|
1099
|
+
d(j);
|
|
1540
1100
|
}));
|
|
1541
1101
|
});
|
|
1542
|
-
}, [
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
...
|
|
1102
|
+
}, [m, o, t, q, ee]);
|
|
1103
|
+
ie(() => {
|
|
1104
|
+
a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
|
|
1105
|
+
...S,
|
|
1546
1106
|
isPositioned: !1
|
|
1547
1107
|
})));
|
|
1548
|
-
}, [
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
}), []),
|
|
1553
|
-
if (
|
|
1108
|
+
}, [a]);
|
|
1109
|
+
const I = C.useRef(!1);
|
|
1110
|
+
ie(() => (I.current = !0, () => {
|
|
1111
|
+
I.current = !1;
|
|
1112
|
+
}), []), ie(() => {
|
|
1113
|
+
if (E && (O.current = E), y && (R.current = y), E && y) {
|
|
1554
1114
|
if (F.current)
|
|
1555
|
-
return F.current(
|
|
1556
|
-
|
|
1115
|
+
return F.current(E, y, B);
|
|
1116
|
+
B();
|
|
1557
1117
|
}
|
|
1558
|
-
}, [
|
|
1559
|
-
const
|
|
1560
|
-
reference:
|
|
1561
|
-
floating:
|
|
1562
|
-
setReference:
|
|
1563
|
-
setFloating:
|
|
1564
|
-
}), [
|
|
1565
|
-
reference:
|
|
1566
|
-
floating:
|
|
1567
|
-
}), [
|
|
1568
|
-
const
|
|
1118
|
+
}, [E, y, B, F, Y]);
|
|
1119
|
+
const te = C.useMemo(() => ({
|
|
1120
|
+
reference: O,
|
|
1121
|
+
floating: R,
|
|
1122
|
+
setReference: p,
|
|
1123
|
+
setFloating: v
|
|
1124
|
+
}), [p, v]), M = C.useMemo(() => ({
|
|
1125
|
+
reference: E,
|
|
1126
|
+
floating: y
|
|
1127
|
+
}), [E, y]), V = C.useMemo(() => {
|
|
1128
|
+
const S = {
|
|
1569
1129
|
position: t,
|
|
1570
1130
|
left: 0,
|
|
1571
1131
|
top: 0
|
|
1572
1132
|
};
|
|
1573
|
-
if (!
|
|
1574
|
-
return
|
|
1575
|
-
const
|
|
1576
|
-
return
|
|
1577
|
-
...
|
|
1578
|
-
transform: "translate(" +
|
|
1579
|
-
...
|
|
1133
|
+
if (!M.floating)
|
|
1134
|
+
return S;
|
|
1135
|
+
const T = _e(M.floating, u.x), j = _e(M.floating, u.y);
|
|
1136
|
+
return l ? {
|
|
1137
|
+
...S,
|
|
1138
|
+
transform: "translate(" + T + "px, " + j + "px)",
|
|
1139
|
+
...Je(M.floating) >= 1.5 && {
|
|
1580
1140
|
willChange: "transform"
|
|
1581
1141
|
}
|
|
1582
1142
|
} : {
|
|
1583
1143
|
position: t,
|
|
1584
|
-
left:
|
|
1585
|
-
top:
|
|
1144
|
+
left: T,
|
|
1145
|
+
top: j
|
|
1586
1146
|
};
|
|
1587
|
-
}, [t,
|
|
1588
|
-
return
|
|
1589
|
-
...
|
|
1590
|
-
update:
|
|
1591
|
-
refs:
|
|
1592
|
-
elements:
|
|
1593
|
-
floatingStyles:
|
|
1594
|
-
}), [
|
|
1595
|
-
}
|
|
1596
|
-
const
|
|
1597
|
-
...
|
|
1147
|
+
}, [t, l, M.floating, u.x, u.y]);
|
|
1148
|
+
return C.useMemo(() => ({
|
|
1149
|
+
...u,
|
|
1150
|
+
update: B,
|
|
1151
|
+
refs: te,
|
|
1152
|
+
elements: M,
|
|
1153
|
+
floatingStyles: V
|
|
1154
|
+
}), [u, B, te, M, V]);
|
|
1155
|
+
}
|
|
1156
|
+
const Ut = (e, o) => ({
|
|
1157
|
+
...Wt(e),
|
|
1598
1158
|
options: [e, o]
|
|
1599
|
-
}),
|
|
1600
|
-
...
|
|
1159
|
+
}), Kt = (e, o) => ({
|
|
1160
|
+
...Bt(e),
|
|
1601
1161
|
options: [e, o]
|
|
1602
|
-
}),
|
|
1603
|
-
...
|
|
1162
|
+
}), Yt = (e, o) => ({
|
|
1163
|
+
...jt(e),
|
|
1604
1164
|
options: [e, o]
|
|
1605
1165
|
});
|
|
1606
|
-
function
|
|
1166
|
+
function qt(e, o) {
|
|
1607
1167
|
return () => {
|
|
1608
1168
|
if (typeof document > "u")
|
|
1609
1169
|
return;
|
|
@@ -1615,233 +1175,237 @@ function Dn(e, o) {
|
|
|
1615
1175
|
};
|
|
1616
1176
|
};
|
|
1617
1177
|
}
|
|
1618
|
-
function
|
|
1178
|
+
function Qe(e) {
|
|
1619
1179
|
const {
|
|
1620
1180
|
className: o,
|
|
1621
1181
|
placement: t = "bottom-start",
|
|
1622
1182
|
trigger: n = "hover",
|
|
1623
|
-
content:
|
|
1624
|
-
children:
|
|
1625
|
-
onClose:
|
|
1626
|
-
onOpen:
|
|
1627
|
-
disabled:
|
|
1628
|
-
show:
|
|
1629
|
-
setShow:
|
|
1630
|
-
role: d = "tooltip"
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1183
|
+
content: s,
|
|
1184
|
+
children: i,
|
|
1185
|
+
onClose: r,
|
|
1186
|
+
onOpen: l,
|
|
1187
|
+
disabled: c = !1,
|
|
1188
|
+
show: a = !1,
|
|
1189
|
+
setShow: u,
|
|
1190
|
+
role: d = "tooltip",
|
|
1191
|
+
style: m,
|
|
1192
|
+
...f
|
|
1193
|
+
} = e, [g, x] = de(a), w = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: y } = Ht({
|
|
1194
|
+
open: w(),
|
|
1195
|
+
middleware: [Ut(4), Yt(), Kt()],
|
|
1196
|
+
whileElementsMounted: Vt,
|
|
1635
1197
|
placement: t
|
|
1636
|
-
}),
|
|
1637
|
-
return
|
|
1638
|
-
|
|
1639
|
-
|
|
1198
|
+
}), O = nt();
|
|
1199
|
+
return re(
|
|
1200
|
+
qt(y.floating, (R) => {
|
|
1201
|
+
R && h()(!1);
|
|
1640
1202
|
}),
|
|
1641
1203
|
[]
|
|
1642
|
-
), /* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
1204
|
+
), /* @__PURE__ */ W(Fe, { children: [
|
|
1205
|
+
/* @__PURE__ */ b(
|
|
1644
1206
|
"div",
|
|
1645
1207
|
{
|
|
1646
|
-
className: "z-auto
|
|
1647
|
-
id: `zen__popover-${
|
|
1648
|
-
ref:
|
|
1649
|
-
onClick: (
|
|
1208
|
+
className: "z-auto min-w-fit max-w-fit",
|
|
1209
|
+
id: `zen__popover-${O}`,
|
|
1210
|
+
ref: y.setReference,
|
|
1211
|
+
onClick: (R) => {
|
|
1650
1212
|
if (n === "click") {
|
|
1651
|
-
if (
|
|
1213
|
+
if (c)
|
|
1652
1214
|
return;
|
|
1653
|
-
|
|
1215
|
+
w() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
|
|
1654
1216
|
}
|
|
1655
|
-
|
|
1217
|
+
R.stopPropagation();
|
|
1656
1218
|
},
|
|
1657
1219
|
role: d,
|
|
1658
|
-
children:
|
|
1220
|
+
children: i
|
|
1659
1221
|
}
|
|
1660
1222
|
),
|
|
1661
|
-
|
|
1662
|
-
/* @__PURE__ */
|
|
1223
|
+
w() && st(
|
|
1224
|
+
/* @__PURE__ */ b(
|
|
1663
1225
|
"div",
|
|
1664
1226
|
{
|
|
1665
|
-
|
|
1227
|
+
...f,
|
|
1228
|
+
onClick: (R) => R.stopPropagation(),
|
|
1666
1229
|
role: "tooltip",
|
|
1667
|
-
className:
|
|
1230
|
+
className: k(
|
|
1668
1231
|
"zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
|
|
1669
1232
|
o
|
|
1670
1233
|
),
|
|
1671
|
-
ref:
|
|
1234
|
+
ref: y.setFloating,
|
|
1672
1235
|
style: {
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1236
|
+
...m,
|
|
1237
|
+
position: E,
|
|
1238
|
+
top: v ?? 0,
|
|
1239
|
+
left: p ?? 0
|
|
1676
1240
|
},
|
|
1677
|
-
children:
|
|
1241
|
+
children: s
|
|
1678
1242
|
}
|
|
1679
1243
|
),
|
|
1680
1244
|
document.body
|
|
1681
1245
|
)
|
|
1682
1246
|
] });
|
|
1683
1247
|
}
|
|
1684
|
-
function
|
|
1685
|
-
var
|
|
1248
|
+
function Xt(e) {
|
|
1249
|
+
var x, w;
|
|
1686
1250
|
const {
|
|
1687
1251
|
items: o = [],
|
|
1688
1252
|
children: t,
|
|
1689
1253
|
moreItemsLabel: n = "",
|
|
1690
|
-
parentRef:
|
|
1691
|
-
data:
|
|
1692
|
-
estimator:
|
|
1693
|
-
font:
|
|
1694
|
-
badgeVariant:
|
|
1695
|
-
badgeStyles:
|
|
1696
|
-
} = e, [
|
|
1254
|
+
parentRef: s,
|
|
1255
|
+
data: i,
|
|
1256
|
+
estimator: r = (h, p) => p + 30,
|
|
1257
|
+
font: l = "12px Inter",
|
|
1258
|
+
badgeVariant: c = "secondary",
|
|
1259
|
+
badgeStyles: a
|
|
1260
|
+
} = e, [u, d] = de({
|
|
1697
1261
|
visible: o,
|
|
1698
1262
|
hidden: []
|
|
1699
|
-
}),
|
|
1263
|
+
}), m = ve(() => {
|
|
1700
1264
|
if (typeof document > "u")
|
|
1701
1265
|
return null;
|
|
1702
|
-
const
|
|
1703
|
-
return
|
|
1704
|
-
}, []),
|
|
1705
|
-
const
|
|
1706
|
-
if (!
|
|
1266
|
+
const p = document.createElement("canvas").getContext("2d");
|
|
1267
|
+
return p && (p.font = l), p;
|
|
1268
|
+
}, []), f = () => {
|
|
1269
|
+
const h = s == null ? void 0 : s.current;
|
|
1270
|
+
if (!h)
|
|
1707
1271
|
return;
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1710
|
-
visible:
|
|
1711
|
-
hidden:
|
|
1272
|
+
const p = h.offsetWidth, v = [], E = [], y = r(n, m.measureText(n).width + 10);
|
|
1273
|
+
g == null || g.reduce((O, R, z) => (O + R + y > p - 20 ? E.push(o[z]) : v.push(o[z]), O + R), 0), d({
|
|
1274
|
+
visible: v,
|
|
1275
|
+
hidden: E
|
|
1712
1276
|
});
|
|
1713
|
-
},
|
|
1714
|
-
() => (o == null ? void 0 : o.map((
|
|
1277
|
+
}, g = ve(
|
|
1278
|
+
() => (o == null ? void 0 : o.map((h) => r(h, m.measureText(h).width))) ?? [],
|
|
1715
1279
|
[o]
|
|
1716
1280
|
);
|
|
1717
|
-
return
|
|
1718
|
-
|
|
1719
|
-
}, [o]),
|
|
1720
|
-
if (!(
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1281
|
+
return re(() => {
|
|
1282
|
+
f();
|
|
1283
|
+
}, [o]), re(() => {
|
|
1284
|
+
if (!(s != null && s.current)) return;
|
|
1285
|
+
const h = new ResizeObserver(() => {
|
|
1286
|
+
f();
|
|
1723
1287
|
});
|
|
1724
|
-
return
|
|
1725
|
-
|
|
1288
|
+
return h.observe(s.current), () => {
|
|
1289
|
+
h.disconnect();
|
|
1726
1290
|
};
|
|
1727
|
-
}, [o]), /* @__PURE__ */
|
|
1728
|
-
(
|
|
1729
|
-
((
|
|
1730
|
-
|
|
1291
|
+
}, [o]), /* @__PURE__ */ W(Fe, { children: [
|
|
1292
|
+
(x = u.visible) == null ? void 0 : x.map((h, p) => t(h, p, i == null ? void 0 : i[p])),
|
|
1293
|
+
((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
|
|
1294
|
+
Qe,
|
|
1731
1295
|
{
|
|
1732
1296
|
trigger: "click",
|
|
1733
|
-
content: /* @__PURE__ */
|
|
1734
|
-
(
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1297
|
+
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(
|
|
1298
|
+
(h, p) => t(
|
|
1299
|
+
h,
|
|
1300
|
+
u.visible.length + p,
|
|
1301
|
+
i == null ? void 0 : i[u.visible.length + p]
|
|
1738
1302
|
)
|
|
1739
1303
|
) }),
|
|
1740
|
-
children: /* @__PURE__ */
|
|
1304
|
+
children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
|
|
1741
1305
|
}
|
|
1742
1306
|
)
|
|
1743
1307
|
] });
|
|
1744
1308
|
}
|
|
1745
|
-
function
|
|
1746
|
-
let n = t.initialDeps ?? [],
|
|
1309
|
+
function X(e, o, t) {
|
|
1310
|
+
let n = t.initialDeps ?? [], s;
|
|
1747
1311
|
return () => {
|
|
1748
|
-
var
|
|
1749
|
-
let
|
|
1750
|
-
t.key && ((
|
|
1751
|
-
const
|
|
1752
|
-
if (!(
|
|
1753
|
-
return
|
|
1754
|
-
n =
|
|
1755
|
-
let
|
|
1756
|
-
if (t.key && ((
|
|
1757
|
-
const
|
|
1758
|
-
for (
|
|
1759
|
-
|
|
1760
|
-
return
|
|
1312
|
+
var i, r, l, c;
|
|
1313
|
+
let a;
|
|
1314
|
+
t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
|
|
1315
|
+
const u = e();
|
|
1316
|
+
if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
|
|
1317
|
+
return s;
|
|
1318
|
+
n = u;
|
|
1319
|
+
let m;
|
|
1320
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), s = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
1321
|
+
const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, x = g / 16, w = (h, p) => {
|
|
1322
|
+
for (h = String(h); h.length < p; )
|
|
1323
|
+
h = " " + h;
|
|
1324
|
+
return h;
|
|
1761
1325
|
};
|
|
1762
1326
|
console.info(
|
|
1763
|
-
`%c⏱ ${
|
|
1327
|
+
`%c⏱ ${w(g, 5)} /${w(f, 5)} ms`,
|
|
1764
1328
|
`
|
|
1765
1329
|
font-size: .6rem;
|
|
1766
1330
|
font-weight: bold;
|
|
1767
1331
|
color: hsl(${Math.max(
|
|
1768
1332
|
0,
|
|
1769
|
-
Math.min(120 - 120 *
|
|
1333
|
+
Math.min(120 - 120 * x, 120)
|
|
1770
1334
|
)}deg 100% 31%);`,
|
|
1771
1335
|
t == null ? void 0 : t.key
|
|
1772
1336
|
);
|
|
1773
1337
|
}
|
|
1774
|
-
return (
|
|
1338
|
+
return (c = t == null ? void 0 : t.onChange) == null || c.call(t, s), s;
|
|
1775
1339
|
};
|
|
1776
1340
|
}
|
|
1777
|
-
function
|
|
1341
|
+
function be(e, o) {
|
|
1778
1342
|
if (e === void 0)
|
|
1779
1343
|
throw new Error("Unexpected undefined");
|
|
1780
1344
|
return e;
|
|
1781
1345
|
}
|
|
1782
|
-
const
|
|
1346
|
+
const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
1783
1347
|
let n;
|
|
1784
|
-
return function(...
|
|
1785
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
1348
|
+
return function(...s) {
|
|
1349
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
|
|
1786
1350
|
};
|
|
1787
|
-
},
|
|
1351
|
+
}, Jt = (e) => e, Qt = (e) => {
|
|
1788
1352
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
1789
|
-
for (let
|
|
1790
|
-
n.push(
|
|
1353
|
+
for (let s = o; s <= t; s++)
|
|
1354
|
+
n.push(s);
|
|
1791
1355
|
return n;
|
|
1792
|
-
},
|
|
1356
|
+
}, en = (e, o) => {
|
|
1793
1357
|
const t = e.scrollElement;
|
|
1794
1358
|
if (!t)
|
|
1795
1359
|
return;
|
|
1796
1360
|
const n = e.targetWindow;
|
|
1797
1361
|
if (!n)
|
|
1798
1362
|
return;
|
|
1799
|
-
const
|
|
1800
|
-
const { width:
|
|
1801
|
-
o({ width: Math.round(
|
|
1363
|
+
const s = (r) => {
|
|
1364
|
+
const { width: l, height: c } = r;
|
|
1365
|
+
o({ width: Math.round(l), height: Math.round(c) });
|
|
1802
1366
|
};
|
|
1803
|
-
if (
|
|
1367
|
+
if (s(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
1804
1368
|
return () => {
|
|
1805
1369
|
};
|
|
1806
|
-
const
|
|
1807
|
-
const
|
|
1808
|
-
if (
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
|
|
1370
|
+
const i = new n.ResizeObserver((r) => {
|
|
1371
|
+
const l = r[0];
|
|
1372
|
+
if (l != null && l.borderBoxSize) {
|
|
1373
|
+
const c = l.borderBoxSize[0];
|
|
1374
|
+
if (c) {
|
|
1375
|
+
s({ width: c.inlineSize, height: c.blockSize });
|
|
1812
1376
|
return;
|
|
1813
1377
|
}
|
|
1814
1378
|
}
|
|
1815
|
-
|
|
1379
|
+
s(t.getBoundingClientRect());
|
|
1816
1380
|
});
|
|
1817
|
-
return
|
|
1818
|
-
|
|
1381
|
+
return i.observe(t, { box: "border-box" }), () => {
|
|
1382
|
+
i.unobserve(t);
|
|
1819
1383
|
};
|
|
1820
|
-
},
|
|
1384
|
+
}, De = {
|
|
1821
1385
|
passive: !0
|
|
1822
|
-
},
|
|
1386
|
+
}, tn = typeof window > "u" ? !0 : "onscrollend" in window, nn = (e, o) => {
|
|
1823
1387
|
const t = e.scrollElement;
|
|
1824
1388
|
if (!t)
|
|
1825
1389
|
return;
|
|
1826
1390
|
const n = e.targetWindow;
|
|
1827
1391
|
if (!n)
|
|
1828
1392
|
return;
|
|
1829
|
-
let
|
|
1830
|
-
const
|
|
1831
|
-
} :
|
|
1393
|
+
let s = 0;
|
|
1394
|
+
const i = e.options.useScrollendEvent && tn ? () => {
|
|
1395
|
+
} : Gt(
|
|
1832
1396
|
n,
|
|
1833
1397
|
() => {
|
|
1834
|
-
o(
|
|
1398
|
+
o(s, !1);
|
|
1835
1399
|
},
|
|
1836
1400
|
e.options.isScrollingResetDelay
|
|
1837
|
-
),
|
|
1838
|
-
const { horizontal:
|
|
1839
|
-
|
|
1840
|
-
},
|
|
1841
|
-
return
|
|
1842
|
-
t.removeEventListener("scroll",
|
|
1401
|
+
), r = (a) => () => {
|
|
1402
|
+
const { horizontal: u, isRtl: d } = e.options;
|
|
1403
|
+
s = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, i(), o(s, a);
|
|
1404
|
+
}, l = r(!0), c = r(!1);
|
|
1405
|
+
return c(), t.addEventListener("scroll", l, De), t.addEventListener("scrollend", c, De), () => {
|
|
1406
|
+
t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
|
|
1843
1407
|
};
|
|
1844
|
-
},
|
|
1408
|
+
}, on = (e, o, t) => {
|
|
1845
1409
|
if (o != null && o.borderBoxSize) {
|
|
1846
1410
|
const n = o.borderBoxSize[0];
|
|
1847
1411
|
if (n)
|
|
@@ -1852,43 +1416,43 @@ const Vn = (e, o) => Math.abs(e - o) < 1, Fn = (e, o, t) => {
|
|
|
1852
1416
|
return Math.round(
|
|
1853
1417
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
1854
1418
|
);
|
|
1855
|
-
},
|
|
1419
|
+
}, sn = (e, {
|
|
1856
1420
|
adjustments: o = 0,
|
|
1857
1421
|
behavior: t
|
|
1858
1422
|
}, n) => {
|
|
1859
|
-
var
|
|
1860
|
-
const
|
|
1861
|
-
(
|
|
1862
|
-
[n.options.horizontal ? "left" : "top"]:
|
|
1423
|
+
var s, i;
|
|
1424
|
+
const r = e + o;
|
|
1425
|
+
(i = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
|
|
1426
|
+
[n.options.horizontal ? "left" : "top"]: r,
|
|
1863
1427
|
behavior: t
|
|
1864
1428
|
});
|
|
1865
1429
|
};
|
|
1866
|
-
class
|
|
1430
|
+
class rn {
|
|
1867
1431
|
constructor(o) {
|
|
1868
1432
|
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__ */ (() => {
|
|
1869
1433
|
let t = null;
|
|
1870
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
1871
|
-
|
|
1872
|
-
this._measureElement(
|
|
1434
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
|
|
1435
|
+
s.forEach((i) => {
|
|
1436
|
+
this._measureElement(i.target, i);
|
|
1873
1437
|
});
|
|
1874
1438
|
}));
|
|
1875
1439
|
return {
|
|
1876
1440
|
disconnect: () => {
|
|
1877
|
-
var r;
|
|
1878
|
-
(r = n()) == null || r.disconnect(), t = null;
|
|
1879
|
-
},
|
|
1880
|
-
observe: (r) => {
|
|
1881
1441
|
var s;
|
|
1882
|
-
|
|
1442
|
+
(s = n()) == null || s.disconnect(), t = null;
|
|
1883
1443
|
},
|
|
1884
|
-
|
|
1885
|
-
var
|
|
1886
|
-
return (
|
|
1444
|
+
observe: (s) => {
|
|
1445
|
+
var i;
|
|
1446
|
+
return (i = n()) == null ? void 0 : i.observe(s, { box: "border-box" });
|
|
1447
|
+
},
|
|
1448
|
+
unobserve: (s) => {
|
|
1449
|
+
var i;
|
|
1450
|
+
return (i = n()) == null ? void 0 : i.unobserve(s);
|
|
1887
1451
|
}
|
|
1888
1452
|
};
|
|
1889
1453
|
})(), this.range = null, this.setOptions = (t) => {
|
|
1890
|
-
Object.entries(t).forEach(([n,
|
|
1891
|
-
typeof
|
|
1454
|
+
Object.entries(t).forEach(([n, s]) => {
|
|
1455
|
+
typeof s > "u" && delete t[n];
|
|
1892
1456
|
}), this.options = {
|
|
1893
1457
|
debug: !1,
|
|
1894
1458
|
initialOffset: 0,
|
|
@@ -1898,11 +1462,11 @@ class Jn {
|
|
|
1898
1462
|
scrollPaddingStart: 0,
|
|
1899
1463
|
scrollPaddingEnd: 0,
|
|
1900
1464
|
horizontal: !1,
|
|
1901
|
-
getItemKey:
|
|
1902
|
-
rangeExtractor:
|
|
1465
|
+
getItemKey: Jt,
|
|
1466
|
+
rangeExtractor: Qt,
|
|
1903
1467
|
onChange: () => {
|
|
1904
1468
|
},
|
|
1905
|
-
measureElement:
|
|
1469
|
+
measureElement: on,
|
|
1906
1470
|
initialRect: { width: 0, height: 0 },
|
|
1907
1471
|
scrollMargin: 0,
|
|
1908
1472
|
gap: 0,
|
|
@@ -1916,9 +1480,9 @@ class Jn {
|
|
|
1916
1480
|
...t
|
|
1917
1481
|
};
|
|
1918
1482
|
}, this.notify = (t) => {
|
|
1919
|
-
var n,
|
|
1920
|
-
(
|
|
1921
|
-
}, this.maybeNotify =
|
|
1483
|
+
var n, s;
|
|
1484
|
+
(s = (n = this.options).onChange) == null || s.call(n, this, t);
|
|
1485
|
+
}, this.maybeNotify = X(
|
|
1922
1486
|
() => (this.calculateRange(), [
|
|
1923
1487
|
this.isScrolling,
|
|
1924
1488
|
this.range ? this.range.startIndex : null,
|
|
@@ -1948,35 +1512,35 @@ class Jn {
|
|
|
1948
1512
|
this.maybeNotify();
|
|
1949
1513
|
return;
|
|
1950
1514
|
}
|
|
1951
|
-
this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((
|
|
1952
|
-
this.observer.observe(
|
|
1515
|
+
this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((s) => {
|
|
1516
|
+
this.observer.observe(s);
|
|
1953
1517
|
}), this._scrollToOffset(this.getScrollOffset(), {
|
|
1954
1518
|
adjustments: void 0,
|
|
1955
1519
|
behavior: void 0
|
|
1956
1520
|
}), this.unsubs.push(
|
|
1957
|
-
this.options.observeElementRect(this, (
|
|
1958
|
-
this.scrollRect =
|
|
1521
|
+
this.options.observeElementRect(this, (s) => {
|
|
1522
|
+
this.scrollRect = s, this.maybeNotify();
|
|
1959
1523
|
})
|
|
1960
1524
|
), this.unsubs.push(
|
|
1961
|
-
this.options.observeElementOffset(this, (
|
|
1962
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
1525
|
+
this.options.observeElementOffset(this, (s, i) => {
|
|
1526
|
+
this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = i, this.maybeNotify();
|
|
1963
1527
|
})
|
|
1964
1528
|
);
|
|
1965
1529
|
}
|
|
1966
1530
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
1967
|
-
const
|
|
1968
|
-
for (let
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
1531
|
+
const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
1532
|
+
for (let r = n - 1; r >= 0; r--) {
|
|
1533
|
+
const l = t[r];
|
|
1534
|
+
if (s.has(l.lane))
|
|
1971
1535
|
continue;
|
|
1972
|
-
const
|
|
1973
|
-
|
|
1536
|
+
const c = i.get(
|
|
1537
|
+
l.lane
|
|
1974
1538
|
);
|
|
1975
|
-
if (
|
|
1539
|
+
if (c == null || l.end > c.end ? i.set(l.lane, l) : l.end < c.end && s.set(l.lane, !0), s.size === this.options.lanes)
|
|
1976
1540
|
break;
|
|
1977
1541
|
}
|
|
1978
|
-
return
|
|
1979
|
-
}, this.getMeasurementOptions =
|
|
1542
|
+
return i.size === this.options.lanes ? Array.from(i.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
|
|
1543
|
+
}, this.getMeasurementOptions = X(
|
|
1980
1544
|
() => [
|
|
1981
1545
|
this.options.count,
|
|
1982
1546
|
this.options.paddingStart,
|
|
@@ -1984,109 +1548,109 @@ class Jn {
|
|
|
1984
1548
|
this.options.getItemKey,
|
|
1985
1549
|
this.options.enabled
|
|
1986
1550
|
],
|
|
1987
|
-
(t, n,
|
|
1551
|
+
(t, n, s, i, r) => (this.pendingMeasuredCacheIndexes = [], {
|
|
1988
1552
|
count: t,
|
|
1989
1553
|
paddingStart: n,
|
|
1990
|
-
scrollMargin:
|
|
1991
|
-
getItemKey:
|
|
1992
|
-
enabled:
|
|
1554
|
+
scrollMargin: s,
|
|
1555
|
+
getItemKey: i,
|
|
1556
|
+
enabled: r
|
|
1993
1557
|
}),
|
|
1994
1558
|
{
|
|
1995
1559
|
key: !1
|
|
1996
1560
|
}
|
|
1997
|
-
), this.getMeasurements =
|
|
1561
|
+
), this.getMeasurements = X(
|
|
1998
1562
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
1999
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
2000
|
-
if (!
|
|
1563
|
+
({ count: t, paddingStart: n, scrollMargin: s, getItemKey: i, enabled: r }, l) => {
|
|
1564
|
+
if (!r)
|
|
2001
1565
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
2002
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
2003
|
-
this.itemSizeCache.set(
|
|
1566
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
|
|
1567
|
+
this.itemSizeCache.set(u.key, u.size);
|
|
2004
1568
|
}));
|
|
2005
|
-
const
|
|
1569
|
+
const c = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
2006
1570
|
this.pendingMeasuredCacheIndexes = [];
|
|
2007
|
-
const
|
|
2008
|
-
for (let
|
|
2009
|
-
const d =
|
|
2010
|
-
u
|
|
2011
|
-
index:
|
|
2012
|
-
start:
|
|
2013
|
-
size:
|
|
2014
|
-
end:
|
|
1571
|
+
const a = this.measurementsCache.slice(0, c);
|
|
1572
|
+
for (let u = c; u < t; u++) {
|
|
1573
|
+
const d = i(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + s, g = l.get(d), x = typeof g == "number" ? g : this.options.estimateSize(u), w = f + x, h = m ? m.lane : u % this.options.lanes;
|
|
1574
|
+
a[u] = {
|
|
1575
|
+
index: u,
|
|
1576
|
+
start: f,
|
|
1577
|
+
size: x,
|
|
1578
|
+
end: w,
|
|
2015
1579
|
key: d,
|
|
2016
|
-
lane:
|
|
1580
|
+
lane: h
|
|
2017
1581
|
};
|
|
2018
1582
|
}
|
|
2019
|
-
return this.measurementsCache =
|
|
1583
|
+
return this.measurementsCache = a, a;
|
|
2020
1584
|
},
|
|
2021
1585
|
{
|
|
2022
1586
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
2023
1587
|
debug: () => this.options.debug
|
|
2024
1588
|
}
|
|
2025
|
-
), this.calculateRange =
|
|
1589
|
+
), this.calculateRange = X(
|
|
2026
1590
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
2027
|
-
(t, n,
|
|
1591
|
+
(t, n, s) => this.range = t.length > 0 && n > 0 ? ln({
|
|
2028
1592
|
measurements: t,
|
|
2029
1593
|
outerSize: n,
|
|
2030
|
-
scrollOffset:
|
|
1594
|
+
scrollOffset: s
|
|
2031
1595
|
}) : null,
|
|
2032
1596
|
{
|
|
2033
1597
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
2034
1598
|
debug: () => this.options.debug
|
|
2035
1599
|
}
|
|
2036
|
-
), this.getIndexes =
|
|
1600
|
+
), this.getIndexes = X(
|
|
2037
1601
|
() => [
|
|
2038
1602
|
this.options.rangeExtractor,
|
|
2039
1603
|
this.calculateRange(),
|
|
2040
1604
|
this.options.overscan,
|
|
2041
1605
|
this.options.count
|
|
2042
1606
|
],
|
|
2043
|
-
(t, n,
|
|
1607
|
+
(t, n, s, i) => n === null ? [] : t({
|
|
2044
1608
|
startIndex: n.startIndex,
|
|
2045
1609
|
endIndex: n.endIndex,
|
|
2046
|
-
overscan:
|
|
2047
|
-
count:
|
|
1610
|
+
overscan: s,
|
|
1611
|
+
count: i
|
|
2048
1612
|
}),
|
|
2049
1613
|
{
|
|
2050
1614
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
2051
1615
|
debug: () => this.options.debug
|
|
2052
1616
|
}
|
|
2053
1617
|
), this.indexFromElement = (t) => {
|
|
2054
|
-
const n = this.options.indexAttribute,
|
|
2055
|
-
return
|
|
1618
|
+
const n = this.options.indexAttribute, s = t.getAttribute(n);
|
|
1619
|
+
return s ? parseInt(s, 10) : (console.warn(
|
|
2056
1620
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
2057
1621
|
), -1);
|
|
2058
1622
|
}, this._measureElement = (t, n) => {
|
|
2059
|
-
const
|
|
2060
|
-
if (!
|
|
1623
|
+
const s = this.indexFromElement(t), i = this.measurementsCache[s];
|
|
1624
|
+
if (!i)
|
|
2061
1625
|
return;
|
|
2062
|
-
const
|
|
2063
|
-
|
|
1626
|
+
const r = i.key, l = this.elementsCache.get(r);
|
|
1627
|
+
l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(s, this.options.measureElement(t, n, this));
|
|
2064
1628
|
}, this.resizeItem = (t, n) => {
|
|
2065
|
-
const
|
|
2066
|
-
if (!
|
|
1629
|
+
const s = this.measurementsCache[t];
|
|
1630
|
+
if (!s)
|
|
2067
1631
|
return;
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
adjustments: this.scrollAdjustments +=
|
|
1632
|
+
const i = this.itemSizeCache.get(s.key) ?? s.size, r = n - i;
|
|
1633
|
+
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, r, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
1634
|
+
adjustments: this.scrollAdjustments += r,
|
|
2071
1635
|
behavior: void 0
|
|
2072
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
1636
|
+
})), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
|
|
2073
1637
|
}, this.measureElement = (t) => {
|
|
2074
1638
|
if (!t) {
|
|
2075
|
-
this.elementsCache.forEach((n,
|
|
2076
|
-
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(
|
|
1639
|
+
this.elementsCache.forEach((n, s) => {
|
|
1640
|
+
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
|
|
2077
1641
|
});
|
|
2078
1642
|
return;
|
|
2079
1643
|
}
|
|
2080
1644
|
this._measureElement(t, void 0);
|
|
2081
|
-
}, this.getVirtualItems =
|
|
1645
|
+
}, this.getVirtualItems = X(
|
|
2082
1646
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
2083
1647
|
(t, n) => {
|
|
2084
|
-
const
|
|
2085
|
-
for (let
|
|
2086
|
-
const
|
|
2087
|
-
|
|
1648
|
+
const s = [];
|
|
1649
|
+
for (let i = 0, r = t.length; i < r; i++) {
|
|
1650
|
+
const l = t[i], c = n[l];
|
|
1651
|
+
s.push(c);
|
|
2088
1652
|
}
|
|
2089
|
-
return
|
|
1653
|
+
return s;
|
|
2090
1654
|
},
|
|
2091
1655
|
{
|
|
2092
1656
|
key: process.env.NODE_ENV !== "production" && "getVirtualItems",
|
|
@@ -2095,60 +1659,60 @@ class Jn {
|
|
|
2095
1659
|
), this.getVirtualItemForOffset = (t) => {
|
|
2096
1660
|
const n = this.getMeasurements();
|
|
2097
1661
|
if (n.length !== 0)
|
|
2098
|
-
return
|
|
2099
|
-
n[
|
|
1662
|
+
return be(
|
|
1663
|
+
n[et(
|
|
2100
1664
|
0,
|
|
2101
1665
|
n.length - 1,
|
|
2102
|
-
(
|
|
1666
|
+
(s) => be(n[s]).start,
|
|
2103
1667
|
t
|
|
2104
1668
|
)]
|
|
2105
1669
|
);
|
|
2106
1670
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
2107
|
-
const
|
|
2108
|
-
n === "auto" && (t <=
|
|
2109
|
-
const
|
|
2110
|
-
return Math.max(Math.min(
|
|
1671
|
+
const s = this.getSize(), i = this.getScrollOffset();
|
|
1672
|
+
n === "auto" && (t <= i ? n = "start" : t >= i + s ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - s : n === "center" && (t = t - s / 2);
|
|
1673
|
+
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - s;
|
|
1674
|
+
return Math.max(Math.min(c, t), 0);
|
|
2111
1675
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
2112
1676
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
2113
|
-
const
|
|
2114
|
-
if (!
|
|
1677
|
+
const s = this.measurementsCache[t];
|
|
1678
|
+
if (!s)
|
|
2115
1679
|
return;
|
|
2116
|
-
const
|
|
1680
|
+
const i = this.getSize(), r = this.getScrollOffset();
|
|
2117
1681
|
if (n === "auto")
|
|
2118
|
-
if (
|
|
1682
|
+
if (s.end >= r + i - this.options.scrollPaddingEnd)
|
|
2119
1683
|
n = "end";
|
|
2120
|
-
else if (
|
|
1684
|
+
else if (s.start <= r + this.options.scrollPaddingStart)
|
|
2121
1685
|
n = "start";
|
|
2122
1686
|
else
|
|
2123
|
-
return [
|
|
2124
|
-
const
|
|
2125
|
-
return [this.getOffsetForAlignment(
|
|
1687
|
+
return [r, n];
|
|
1688
|
+
const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
|
|
1689
|
+
return [this.getOffsetForAlignment(l, n), n];
|
|
2126
1690
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
2127
1691
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
2128
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
2129
|
-
this.cancelScrollToIndex(),
|
|
1692
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
|
|
1693
|
+
this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
|
|
2130
1694
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
2131
1695
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
2132
1696
|
adjustments: void 0,
|
|
2133
|
-
behavior:
|
|
1697
|
+
behavior: s
|
|
2134
1698
|
});
|
|
2135
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
2136
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
1699
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
|
|
1700
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
|
|
2137
1701
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
2138
1702
|
);
|
|
2139
|
-
const
|
|
2140
|
-
if (!
|
|
2141
|
-
const [
|
|
2142
|
-
this._scrollToOffset(
|
|
1703
|
+
const i = this.getOffsetForIndex(t, n);
|
|
1704
|
+
if (!i) return;
|
|
1705
|
+
const [r, l] = i;
|
|
1706
|
+
this._scrollToOffset(r, { adjustments: void 0, behavior: s }), s !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
2143
1707
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
2144
1708
|
this.options.getItemKey(t)
|
|
2145
1709
|
)) {
|
|
2146
|
-
const [
|
|
2147
|
-
this.getOffsetForIndex(t,
|
|
1710
|
+
const [a] = be(
|
|
1711
|
+
this.getOffsetForIndex(t, l)
|
|
2148
1712
|
);
|
|
2149
|
-
|
|
1713
|
+
Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: s });
|
|
2150
1714
|
} else
|
|
2151
|
-
this.scrollToIndex(t, { align:
|
|
1715
|
+
this.scrollToIndex(t, { align: l, behavior: s });
|
|
2152
1716
|
}));
|
|
2153
1717
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
2154
1718
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -2160,69 +1724,69 @@ class Jn {
|
|
|
2160
1724
|
}, this.getTotalSize = () => {
|
|
2161
1725
|
var t;
|
|
2162
1726
|
const n = this.getMeasurements();
|
|
2163
|
-
let
|
|
2164
|
-
return n.length === 0 ?
|
|
2165
|
-
...n.slice(-this.options.lanes).map((
|
|
1727
|
+
let s;
|
|
1728
|
+
return n.length === 0 ? s = this.options.paddingStart : s = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
1729
|
+
...n.slice(-this.options.lanes).map((i) => i.end)
|
|
2166
1730
|
), Math.max(
|
|
2167
|
-
|
|
1731
|
+
s - this.options.scrollMargin + this.options.paddingEnd,
|
|
2168
1732
|
0
|
|
2169
1733
|
);
|
|
2170
1734
|
}, this._scrollToOffset = (t, {
|
|
2171
1735
|
adjustments: n,
|
|
2172
|
-
behavior:
|
|
1736
|
+
behavior: s
|
|
2173
1737
|
}) => {
|
|
2174
|
-
this.options.scrollToFn(t, { behavior:
|
|
1738
|
+
this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
|
|
2175
1739
|
}, this.measure = () => {
|
|
2176
1740
|
this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
|
|
2177
1741
|
}, this.setOptions(o);
|
|
2178
1742
|
}
|
|
2179
1743
|
}
|
|
2180
|
-
const
|
|
1744
|
+
const et = (e, o, t, n) => {
|
|
2181
1745
|
for (; e <= o; ) {
|
|
2182
|
-
const
|
|
2183
|
-
if (
|
|
2184
|
-
e =
|
|
2185
|
-
else if (
|
|
2186
|
-
o =
|
|
1746
|
+
const s = (e + o) / 2 | 0, i = t(s);
|
|
1747
|
+
if (i < n)
|
|
1748
|
+
e = s + 1;
|
|
1749
|
+
else if (i > n)
|
|
1750
|
+
o = s - 1;
|
|
2187
1751
|
else
|
|
2188
|
-
return
|
|
1752
|
+
return s;
|
|
2189
1753
|
}
|
|
2190
1754
|
return e > 0 ? e - 1 : 0;
|
|
2191
1755
|
};
|
|
2192
|
-
function
|
|
1756
|
+
function ln({
|
|
2193
1757
|
measurements: e,
|
|
2194
1758
|
outerSize: o,
|
|
2195
1759
|
scrollOffset: t
|
|
2196
1760
|
}) {
|
|
2197
|
-
const n = e.length - 1,
|
|
2198
|
-
let
|
|
2199
|
-
for (;
|
|
2200
|
-
|
|
2201
|
-
return { startIndex:
|
|
2202
|
-
}
|
|
2203
|
-
const
|
|
2204
|
-
function
|
|
2205
|
-
const o =
|
|
1761
|
+
const n = e.length - 1, i = et(0, n, (l) => e[l].start, t);
|
|
1762
|
+
let r = i;
|
|
1763
|
+
for (; r < n && e[r].end < t + o; )
|
|
1764
|
+
r++;
|
|
1765
|
+
return { startIndex: i, endIndex: r };
|
|
1766
|
+
}
|
|
1767
|
+
const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
|
|
1768
|
+
function cn(e) {
|
|
1769
|
+
const o = C.useReducer(() => ({}), {})[1], t = {
|
|
2206
1770
|
...e,
|
|
2207
|
-
onChange: (
|
|
2208
|
-
var
|
|
2209
|
-
|
|
1771
|
+
onChange: (s, i) => {
|
|
1772
|
+
var r;
|
|
1773
|
+
i ? it(o) : o(), (r = e.onChange) == null || r.call(e, s, i);
|
|
2210
1774
|
}
|
|
2211
|
-
}, [n] =
|
|
2212
|
-
() => new
|
|
1775
|
+
}, [n] = C.useState(
|
|
1776
|
+
() => new rn(t)
|
|
2213
1777
|
);
|
|
2214
|
-
return n.setOptions(t),
|
|
1778
|
+
return n.setOptions(t), Pe(() => n._didMount(), []), Pe(() => n._willUpdate()), n;
|
|
2215
1779
|
}
|
|
2216
|
-
function
|
|
2217
|
-
return
|
|
2218
|
-
observeElementRect:
|
|
2219
|
-
observeElementOffset:
|
|
2220
|
-
scrollToFn:
|
|
1780
|
+
function an(e) {
|
|
1781
|
+
return cn({
|
|
1782
|
+
observeElementRect: en,
|
|
1783
|
+
observeElementOffset: nn,
|
|
1784
|
+
scrollToFn: sn,
|
|
2221
1785
|
...e
|
|
2222
1786
|
});
|
|
2223
1787
|
}
|
|
2224
|
-
function
|
|
2225
|
-
return /* @__PURE__ */
|
|
1788
|
+
function un(e) {
|
|
1789
|
+
return /* @__PURE__ */ b(
|
|
2226
1790
|
"svg",
|
|
2227
1791
|
{
|
|
2228
1792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2232,12 +1796,12 @@ function Qn(e) {
|
|
|
2232
1796
|
stroke: "currentColor",
|
|
2233
1797
|
className: "h-6 w-6",
|
|
2234
1798
|
...e,
|
|
2235
|
-
children: /* @__PURE__ */
|
|
1799
|
+
children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
|
|
2236
1800
|
}
|
|
2237
1801
|
);
|
|
2238
1802
|
}
|
|
2239
|
-
function
|
|
2240
|
-
return /* @__PURE__ */
|
|
1803
|
+
function fn(e) {
|
|
1804
|
+
return /* @__PURE__ */ b(
|
|
2241
1805
|
"svg",
|
|
2242
1806
|
{
|
|
2243
1807
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2247,7 +1811,7 @@ function eo(e) {
|
|
|
2247
1811
|
stroke: "currentColor",
|
|
2248
1812
|
className: "h-6 w-6",
|
|
2249
1813
|
...e,
|
|
2250
|
-
children: /* @__PURE__ */
|
|
1814
|
+
children: /* @__PURE__ */ b(
|
|
2251
1815
|
"path",
|
|
2252
1816
|
{
|
|
2253
1817
|
strokeLinecap: "round",
|
|
@@ -2258,8 +1822,8 @@ function eo(e) {
|
|
|
2258
1822
|
}
|
|
2259
1823
|
);
|
|
2260
1824
|
}
|
|
2261
|
-
function
|
|
2262
|
-
return /* @__PURE__ */
|
|
1825
|
+
function dn(e) {
|
|
1826
|
+
return /* @__PURE__ */ b(
|
|
2263
1827
|
"svg",
|
|
2264
1828
|
{
|
|
2265
1829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2269,102 +1833,104 @@ function to(e) {
|
|
|
2269
1833
|
stroke: "currentColor",
|
|
2270
1834
|
className: "h-6 w-6",
|
|
2271
1835
|
...e,
|
|
2272
|
-
children: /* @__PURE__ */
|
|
1836
|
+
children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
|
|
2273
1837
|
}
|
|
2274
1838
|
);
|
|
2275
1839
|
}
|
|
2276
|
-
function
|
|
1840
|
+
function xn(e) {
|
|
1841
|
+
var g;
|
|
2277
1842
|
const {
|
|
2278
1843
|
items: o,
|
|
2279
1844
|
selected: t,
|
|
2280
1845
|
className: n,
|
|
2281
|
-
onChange:
|
|
2282
|
-
disabled:
|
|
2283
|
-
placeholder:
|
|
2284
|
-
multiple:
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
return /* @__PURE__ */ E.jsx(
|
|
2291
|
-
Pt,
|
|
1846
|
+
onChange: s,
|
|
1847
|
+
disabled: i,
|
|
1848
|
+
placeholder: r = "Select an Item",
|
|
1849
|
+
multiple: l,
|
|
1850
|
+
mutable: c,
|
|
1851
|
+
onAdd: a
|
|
1852
|
+
} = e, u = Ee(null), [d, m] = de(!1), f = Ee(null);
|
|
1853
|
+
return /* @__PURE__ */ b(
|
|
1854
|
+
Qe,
|
|
2292
1855
|
{
|
|
2293
1856
|
placement: "bottom",
|
|
2294
1857
|
trigger: "click",
|
|
2295
|
-
show:
|
|
2296
|
-
setShow:
|
|
1858
|
+
show: d,
|
|
1859
|
+
setShow: m,
|
|
2297
1860
|
role: "combobox",
|
|
2298
|
-
disabled:
|
|
2299
|
-
|
|
2300
|
-
|
|
1861
|
+
disabled: i,
|
|
1862
|
+
style: {
|
|
1863
|
+
"--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
|
|
1864
|
+
},
|
|
1865
|
+
content: /* @__PURE__ */ b(
|
|
1866
|
+
hn,
|
|
2301
1867
|
{
|
|
2302
|
-
...
|
|
2303
|
-
...
|
|
2304
|
-
width: a
|
|
1868
|
+
...c ? { mutable: c, onAdd: a } : { mutable: c },
|
|
1869
|
+
...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t }
|
|
2305
1870
|
}
|
|
2306
1871
|
),
|
|
2307
|
-
children: /* @__PURE__ */
|
|
1872
|
+
children: /* @__PURE__ */ W(
|
|
2308
1873
|
"div",
|
|
2309
1874
|
{
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
m && "border-primary shadow-sm shadow-ring",
|
|
1875
|
+
className: k(
|
|
1876
|
+
"inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1877
|
+
i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
|
|
1878
|
+
d && "border-primary shadow-sm shadow-ring",
|
|
2315
1879
|
n
|
|
2316
1880
|
),
|
|
1881
|
+
ref: f,
|
|
2317
1882
|
children: [
|
|
2318
|
-
/* @__PURE__ */
|
|
1883
|
+
/* @__PURE__ */ b(
|
|
2319
1884
|
"div",
|
|
2320
1885
|
{
|
|
2321
|
-
className:
|
|
1886
|
+
className: k(
|
|
2322
1887
|
"flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
|
|
2323
|
-
|
|
1888
|
+
i ? "text-muted-foreground" : "text-foreground"
|
|
2324
1889
|
),
|
|
2325
|
-
ref:
|
|
2326
|
-
children:
|
|
2327
|
-
|
|
1890
|
+
ref: u,
|
|
1891
|
+
children: l ? /* @__PURE__ */ b(
|
|
1892
|
+
Xt,
|
|
2328
1893
|
{
|
|
2329
|
-
items: t.map((
|
|
1894
|
+
items: t.map((x) => x.text),
|
|
2330
1895
|
data: t,
|
|
2331
|
-
parentRef:
|
|
1896
|
+
parentRef: u,
|
|
1897
|
+
estimator: (x, w) => w + 40,
|
|
2332
1898
|
badgeVariant: "secondary",
|
|
2333
1899
|
badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
|
|
2334
|
-
children: (
|
|
2335
|
-
|
|
1900
|
+
children: (x, w, h) => /* @__PURE__ */ W(
|
|
1901
|
+
We,
|
|
2336
1902
|
{
|
|
2337
1903
|
className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
|
|
2338
1904
|
variant: "secondary",
|
|
2339
1905
|
children: [
|
|
2340
|
-
|
|
2341
|
-
/* @__PURE__ */
|
|
2342
|
-
|
|
1906
|
+
x,
|
|
1907
|
+
/* @__PURE__ */ b(
|
|
1908
|
+
lt,
|
|
2343
1909
|
{
|
|
2344
1910
|
onClick: () => {
|
|
2345
|
-
|
|
1911
|
+
s(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
|
|
2346
1912
|
},
|
|
2347
1913
|
variant: "icon",
|
|
2348
1914
|
size: "icon",
|
|
2349
1915
|
className: "group bg-muted p-0.5 hover:bg-muted-foreground",
|
|
2350
|
-
children: /* @__PURE__ */
|
|
1916
|
+
children: /* @__PURE__ */ b(dn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
|
|
2351
1917
|
}
|
|
2352
1918
|
)
|
|
2353
1919
|
]
|
|
2354
1920
|
},
|
|
2355
|
-
`collapsed_item_${
|
|
1921
|
+
`collapsed_item_${w}`
|
|
2356
1922
|
)
|
|
2357
1923
|
}
|
|
2358
|
-
) : t.text ??
|
|
1924
|
+
) : t.text ?? r
|
|
2359
1925
|
}
|
|
2360
1926
|
),
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
|
|
1927
|
+
/* @__PURE__ */ b(
|
|
1928
|
+
un,
|
|
2363
1929
|
{
|
|
2364
|
-
className:
|
|
1930
|
+
className: k(
|
|
2365
1931
|
"size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
|
|
2366
|
-
|
|
2367
|
-
|
|
1932
|
+
d ? "rotate-180" : "rotate-0",
|
|
1933
|
+
i ? "text-muted-foreground" : "text-foreground"
|
|
2368
1934
|
)
|
|
2369
1935
|
}
|
|
2370
1936
|
)
|
|
@@ -2374,95 +1940,88 @@ function so(e) {
|
|
|
2374
1940
|
}
|
|
2375
1941
|
);
|
|
2376
1942
|
}
|
|
2377
|
-
function
|
|
2378
|
-
const { items: o, multiple: t, selected: n, onChange:
|
|
2379
|
-
() => o.reduce((
|
|
2380
|
-
[o,
|
|
2381
|
-
),
|
|
2382
|
-
count:
|
|
2383
|
-
getScrollElement: () =>
|
|
1943
|
+
function hn(e) {
|
|
1944
|
+
const { items: o, multiple: t, selected: n, onChange: s, mutable: i, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
|
|
1945
|
+
() => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
|
|
1946
|
+
[o, l]
|
|
1947
|
+
), d = an({
|
|
1948
|
+
count: u.length,
|
|
1949
|
+
getScrollElement: () => a.current,
|
|
2384
1950
|
estimateSize: () => 35
|
|
2385
|
-
}), m = n instanceof Array ? n.map((
|
|
2386
|
-
return /* @__PURE__ */
|
|
2387
|
-
"div",
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
1951
|
+
}), m = n instanceof Array ? n.map((f) => f.key) : [n.key];
|
|
1952
|
+
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: [
|
|
1953
|
+
/* @__PURE__ */ W("div", { className: k("inline-flex grow items-center rounded px-3 py-2"), children: [
|
|
1954
|
+
/* @__PURE__ */ b(fn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
|
|
1955
|
+
/* @__PURE__ */ b(
|
|
1956
|
+
"input",
|
|
1957
|
+
{
|
|
1958
|
+
className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
|
|
1959
|
+
placeholder: "Search",
|
|
1960
|
+
value: l,
|
|
1961
|
+
onChange: (f) => c(f.target.value)
|
|
1962
|
+
}
|
|
1963
|
+
)
|
|
1964
|
+
] }),
|
|
1965
|
+
/* @__PURE__ */ W(
|
|
1966
|
+
"ul",
|
|
1967
|
+
{
|
|
1968
|
+
className: k("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
|
|
1969
|
+
ref: a,
|
|
1970
|
+
children: [
|
|
1971
|
+
/* @__PURE__ */ b(
|
|
1972
|
+
"div",
|
|
2396
1973
|
{
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
/* @__PURE__ */ E.jsxs(
|
|
2405
|
-
"ul",
|
|
2406
|
-
{
|
|
2407
|
-
className: L("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
|
|
2408
|
-
ref: f,
|
|
2409
|
-
children: [
|
|
2410
|
-
/* @__PURE__ */ E.jsx(
|
|
2411
|
-
"div",
|
|
1974
|
+
style: {
|
|
1975
|
+
height: `${d.getTotalSize()}px`,
|
|
1976
|
+
width: "100%",
|
|
1977
|
+
position: "relative"
|
|
1978
|
+
},
|
|
1979
|
+
children: d.getVirtualItems().map((f) => /* @__PURE__ */ b(
|
|
1980
|
+
"li",
|
|
2412
1981
|
{
|
|
2413
1982
|
style: {
|
|
2414
|
-
height: `${
|
|
2415
|
-
|
|
2416
|
-
position: "relative"
|
|
1983
|
+
height: `${f.size}px`,
|
|
1984
|
+
transform: `translateY(${f.start}px)`
|
|
2417
1985
|
},
|
|
2418
|
-
|
|
2419
|
-
"
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
height: `${h.size}px`,
|
|
2423
|
-
transform: `translateY(${h.start}px)`
|
|
2424
|
-
},
|
|
2425
|
-
className: L(
|
|
2426
|
-
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
2427
|
-
m.includes(d[h.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
2428
|
-
),
|
|
2429
|
-
onClick: () => {
|
|
2430
|
-
t ? m.includes(d[h.index].key) ? r(
|
|
2431
|
-
structuredClone(
|
|
2432
|
-
n.filter(
|
|
2433
|
-
(b) => b.key !== d[h.index].key
|
|
2434
|
-
)
|
|
2435
|
-
)
|
|
2436
|
-
) : r(structuredClone([...n, d[h.index]])) : r(d[h.index]);
|
|
2437
|
-
},
|
|
2438
|
-
children: d[h.index].text
|
|
2439
|
-
},
|
|
2440
|
-
h.key
|
|
2441
|
-
))
|
|
2442
|
-
}
|
|
2443
|
-
),
|
|
2444
|
-
a.length > 0 && d.length === 0 && (l ? /* @__PURE__ */ E.jsxs(
|
|
2445
|
-
"li",
|
|
2446
|
-
{
|
|
2447
|
-
className: L("px-3 py-2 text-sm text-foreground"),
|
|
1986
|
+
className: k(
|
|
1987
|
+
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
1988
|
+
m.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
1989
|
+
),
|
|
2448
1990
|
onClick: () => {
|
|
2449
|
-
|
|
1991
|
+
t ? m.includes(u[f.index].key) ? s(
|
|
1992
|
+
structuredClone(
|
|
1993
|
+
n.filter(
|
|
1994
|
+
(g) => g.key !== u[f.index].key
|
|
1995
|
+
)
|
|
1996
|
+
)
|
|
1997
|
+
) : s(structuredClone([...n, u[f.index]])) : s(u[f.index]);
|
|
2450
1998
|
},
|
|
2451
|
-
children: [
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
1999
|
+
children: u[f.index].text
|
|
2000
|
+
},
|
|
2001
|
+
f.key
|
|
2002
|
+
))
|
|
2003
|
+
}
|
|
2004
|
+
),
|
|
2005
|
+
l.length > 0 && u.length === 0 && (i ? /* @__PURE__ */ W(
|
|
2006
|
+
"li",
|
|
2007
|
+
{
|
|
2008
|
+
className: k("px-3 py-2 text-sm text-foreground"),
|
|
2009
|
+
onClick: () => {
|
|
2010
|
+
r({ text: l, key: l }), c("");
|
|
2011
|
+
},
|
|
2012
|
+
children: [
|
|
2013
|
+
"Add ",
|
|
2014
|
+
l
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
) : /* @__PURE__ */ b("li", { className: k("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
)
|
|
2021
|
+
] });
|
|
2463
2022
|
}
|
|
2464
|
-
function
|
|
2465
|
-
return /* @__PURE__ */
|
|
2023
|
+
function wn(e) {
|
|
2024
|
+
return /* @__PURE__ */ b(
|
|
2466
2025
|
"svg",
|
|
2467
2026
|
{
|
|
2468
2027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2472,16 +2031,16 @@ function io(e) {
|
|
|
2472
2031
|
stroke: "currentColor",
|
|
2473
2032
|
className: "h-6 w-6",
|
|
2474
2033
|
...e,
|
|
2475
|
-
children: /* @__PURE__ */
|
|
2034
|
+
children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
|
|
2476
2035
|
}
|
|
2477
2036
|
);
|
|
2478
2037
|
}
|
|
2479
|
-
function
|
|
2038
|
+
function yn(e) {
|
|
2480
2039
|
const { className: o, ...t } = e;
|
|
2481
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ b(
|
|
2482
2041
|
"input",
|
|
2483
2042
|
{
|
|
2484
|
-
className:
|
|
2043
|
+
className: k(
|
|
2485
2044
|
"h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
|
|
2486
2045
|
"focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
|
|
2487
2046
|
"read-only:cursor-pointer read-only:!border-none read-only:bg-transparent read-only:text-foreground read-only:!shadow-none read-only:!outline-none",
|
|
@@ -2493,12 +2052,12 @@ function lo(e) {
|
|
|
2493
2052
|
}
|
|
2494
2053
|
);
|
|
2495
2054
|
}
|
|
2496
|
-
function
|
|
2497
|
-
const { className: o, checked: t, onChange: n, defaultChecked:
|
|
2498
|
-
return /* @__PURE__ */
|
|
2055
|
+
function bn(e) {
|
|
2056
|
+
const { className: o, checked: t, onChange: n, defaultChecked: s, ...i } = e;
|
|
2057
|
+
return /* @__PURE__ */ W(
|
|
2499
2058
|
"div",
|
|
2500
2059
|
{
|
|
2501
|
-
className:
|
|
2060
|
+
className: k(
|
|
2502
2061
|
"rounded-full",
|
|
2503
2062
|
"h-5 w-10",
|
|
2504
2063
|
"border border-muted bg-secondary",
|
|
@@ -2507,11 +2066,11 @@ function co(e) {
|
|
|
2507
2066
|
),
|
|
2508
2067
|
onClick: () => n == null ? void 0 : n(!t),
|
|
2509
2068
|
children: [
|
|
2510
|
-
/* @__PURE__ */
|
|
2511
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...i, defaultChecked: s, checked: t }),
|
|
2070
|
+
/* @__PURE__ */ b(
|
|
2512
2071
|
"div",
|
|
2513
2072
|
{
|
|
2514
|
-
className:
|
|
2073
|
+
className: k(
|
|
2515
2074
|
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
|
|
2516
2075
|
t ? "translate-x-5" : "translate-x-1"
|
|
2517
2076
|
)
|
|
@@ -2522,16 +2081,16 @@ function co(e) {
|
|
|
2522
2081
|
);
|
|
2523
2082
|
}
|
|
2524
2083
|
export {
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2084
|
+
We as Badge,
|
|
2085
|
+
lt as Button,
|
|
2086
|
+
wn as ChevronDown,
|
|
2087
|
+
un as ChevronUp,
|
|
2088
|
+
Xt as Collapse,
|
|
2089
|
+
xn as Dropdown,
|
|
2090
|
+
yn as Input,
|
|
2091
|
+
Qe as Popover,
|
|
2092
|
+
fn as Search,
|
|
2093
|
+
bn as Toggle,
|
|
2094
|
+
Ve as cva,
|
|
2095
|
+
k as cx
|
|
2537
2096
|
};
|