v-float 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -68
- package/dist/composables/interactions/use-dismiss.d.ts.map +1 -1
- package/dist/composables/use-arrow.d.ts +9 -2
- package/dist/composables/use-arrow.d.ts.map +1 -1
- package/dist/composables/use-floating.d.ts.map +1 -1
- package/dist/composables/use-tree.d.ts +0 -7
- package/dist/composables/use-tree.d.ts.map +1 -1
- package/dist/utils.d.ts +14 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/v-float.es.js +278 -285
- package/dist/v-float.umd.js +1 -1
- package/package.json +1 -1
- package/dist/composables/utils/dom.d.ts +0 -11
- package/dist/composables/utils/dom.d.ts.map +0 -1
- package/dist/composables/utils/use-composition.d.ts +0 -4
- package/dist/composables/utils/use-composition.d.ts.map +0 -1
- package/dist/utils/dom.d.ts +0 -9
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/id.d.ts +0 -2
- package/dist/utils/id.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/reactivity.d.ts +0 -2
- package/dist/utils/reactivity.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts +0 -8
- package/dist/utils/type-guards.d.ts.map +0 -1
package/dist/v-float.es.js
CHANGED
|
@@ -2,30 +2,19 @@ var gt = Object.defineProperty;
|
|
|
2
2
|
var Ie = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var U = (e, t, n) =>
|
|
5
|
+
var wt = (e, t, n) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var U = (e, t, n) => wt(e, typeof t != "symbol" ? t + "" : t, n), Ee = (e, t, n) => t.has(e) || Ie("Cannot " + n);
|
|
7
7
|
var Te = (e, t, n) => (Ee(e, t, "read from private field"), n ? n.call(e) : t.get(e)), de = (e, t, n) => t.has(e) ? Ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Le = (e, t, n, o) => (Ee(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n), Oe = (e, t, n) => (Ee(e, t, "access private method"), n);
|
|
8
|
-
import { ref as
|
|
9
|
-
|
|
10
|
-
const n = it(e);
|
|
11
|
-
return Math.round(t * n) / n;
|
|
12
|
-
}
|
|
13
|
-
function it(e) {
|
|
14
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
15
|
-
}
|
|
16
|
-
let Lt = 0;
|
|
17
|
-
function Ot() {
|
|
18
|
-
return `vfloat-id-${Lt++}`;
|
|
19
|
-
}
|
|
20
|
-
const Rt = ["top", "right", "bottom", "left"], ee = Math.min, G = Math.max, pe = Math.round, he = Math.floor, F = (e) => ({
|
|
8
|
+
import { ref as j, computed as O, toValue as T, shallowRef as Me, watch as ve, onWatcherCleanup as q, onScopeDispose as ae, watchPostEffect as re, getCurrentScope as yt, unref as xt, onMounted as bt, watchEffect as Ae, readonly as Et, shallowReactive as Tt } from "vue";
|
|
9
|
+
const Lt = ["top", "right", "bottom", "left"], ee = Math.min, G = Math.max, pe = Math.round, he = Math.floor, F = (e) => ({
|
|
21
10
|
x: e,
|
|
22
11
|
y: e
|
|
23
|
-
}),
|
|
12
|
+
}), Ot = {
|
|
24
13
|
left: "right",
|
|
25
14
|
right: "left",
|
|
26
15
|
bottom: "top",
|
|
27
16
|
top: "bottom"
|
|
28
|
-
},
|
|
17
|
+
}, Rt = {
|
|
29
18
|
start: "end",
|
|
30
19
|
end: "start"
|
|
31
20
|
};
|
|
@@ -41,7 +30,7 @@ function J(e) {
|
|
|
41
30
|
function ue(e) {
|
|
42
31
|
return e.split("-")[1];
|
|
43
32
|
}
|
|
44
|
-
function
|
|
33
|
+
function it(e) {
|
|
45
34
|
return e === "x" ? "y" : "x";
|
|
46
35
|
}
|
|
47
36
|
function He(e) {
|
|
@@ -51,22 +40,22 @@ function te(e) {
|
|
|
51
40
|
return ["top", "bottom"].includes(J(e)) ? "y" : "x";
|
|
52
41
|
}
|
|
53
42
|
function Fe(e) {
|
|
54
|
-
return
|
|
43
|
+
return it(te(e));
|
|
55
44
|
}
|
|
56
|
-
function
|
|
45
|
+
function Pt(e, t, n) {
|
|
57
46
|
n === void 0 && (n = !1);
|
|
58
47
|
const o = ue(e), i = Fe(e), s = He(i);
|
|
59
48
|
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
60
49
|
return t.reference[s] > t.floating[s] && (r = me(r)), [r, me(r)];
|
|
61
50
|
}
|
|
62
|
-
function
|
|
51
|
+
function Ct(e) {
|
|
63
52
|
const t = me(e);
|
|
64
53
|
return [Ne(e), t, Ne(t)];
|
|
65
54
|
}
|
|
66
55
|
function Ne(e) {
|
|
67
|
-
return e.replace(/start|end/g, (t) =>
|
|
56
|
+
return e.replace(/start|end/g, (t) => Rt[t]);
|
|
68
57
|
}
|
|
69
|
-
function
|
|
58
|
+
function Mt(e, t, n) {
|
|
70
59
|
const o = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
71
60
|
switch (e) {
|
|
72
61
|
case "top":
|
|
@@ -79,15 +68,15 @@ function Dt(e, t, n) {
|
|
|
79
68
|
return [];
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
|
-
function
|
|
71
|
+
function At(e, t, n, o) {
|
|
83
72
|
const i = ue(e);
|
|
84
|
-
let s =
|
|
73
|
+
let s = Mt(J(e), n === "start", o);
|
|
85
74
|
return i && (s = s.map((r) => r + "-" + i), t && (s = s.concat(s.map(Ne)))), s;
|
|
86
75
|
}
|
|
87
76
|
function me(e) {
|
|
88
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
77
|
+
return e.replace(/left|right|bottom|top/g, (t) => Ot[t]);
|
|
89
78
|
}
|
|
90
|
-
function
|
|
79
|
+
function Dt(e) {
|
|
91
80
|
return {
|
|
92
81
|
top: 0,
|
|
93
82
|
right: 0,
|
|
@@ -96,8 +85,8 @@ function St(e) {
|
|
|
96
85
|
...e
|
|
97
86
|
};
|
|
98
87
|
}
|
|
99
|
-
function
|
|
100
|
-
return typeof e != "number" ?
|
|
88
|
+
function rt(e) {
|
|
89
|
+
return typeof e != "number" ? Dt(e) : {
|
|
101
90
|
top: e,
|
|
102
91
|
right: e,
|
|
103
92
|
bottom: e,
|
|
@@ -122,7 +111,7 @@ function ge(e) {
|
|
|
122
111
|
y: n
|
|
123
112
|
};
|
|
124
113
|
}
|
|
125
|
-
function
|
|
114
|
+
function Ye(e, t, n) {
|
|
126
115
|
let {
|
|
127
116
|
reference: o,
|
|
128
117
|
floating: i
|
|
@@ -170,7 +159,7 @@ function je(e, t, n) {
|
|
|
170
159
|
}
|
|
171
160
|
return h;
|
|
172
161
|
}
|
|
173
|
-
const
|
|
162
|
+
const Nt = async (e, t, n) => {
|
|
174
163
|
const {
|
|
175
164
|
placement: o = "bottom",
|
|
176
165
|
strategy: i = "absolute",
|
|
@@ -184,17 +173,17 @@ const kt = async (e, t, n) => {
|
|
|
184
173
|
}), {
|
|
185
174
|
x: f,
|
|
186
175
|
y: u
|
|
187
|
-
} =
|
|
176
|
+
} = Ye(c, o, a), m = o, h = {}, p = 0;
|
|
188
177
|
for (let d = 0; d < l.length; d++) {
|
|
189
178
|
const {
|
|
190
179
|
name: v,
|
|
191
|
-
fn:
|
|
180
|
+
fn: w
|
|
192
181
|
} = l[d], {
|
|
193
182
|
x: E,
|
|
194
183
|
y: x,
|
|
195
184
|
data: g,
|
|
196
185
|
reset: b
|
|
197
|
-
} = await
|
|
186
|
+
} = await w({
|
|
198
187
|
x: f,
|
|
199
188
|
y: u,
|
|
200
189
|
initialPlacement: o,
|
|
@@ -221,7 +210,7 @@ const kt = async (e, t, n) => {
|
|
|
221
210
|
}) : b.rects), {
|
|
222
211
|
x: f,
|
|
223
212
|
y: u
|
|
224
|
-
} =
|
|
213
|
+
} = Ye(c, m, a)), d = -1);
|
|
225
214
|
}
|
|
226
215
|
return {
|
|
227
216
|
x: f,
|
|
@@ -231,7 +220,7 @@ const kt = async (e, t, n) => {
|
|
|
231
220
|
middlewareData: h
|
|
232
221
|
};
|
|
233
222
|
};
|
|
234
|
-
async function
|
|
223
|
+
async function we(e, t) {
|
|
235
224
|
var n;
|
|
236
225
|
t === void 0 && (t = {});
|
|
237
226
|
const {
|
|
@@ -247,7 +236,7 @@ async function ye(e, t) {
|
|
|
247
236
|
elementContext: u = "floating",
|
|
248
237
|
altBoundary: m = !1,
|
|
249
238
|
padding: h = 0
|
|
250
|
-
} = oe(t, e), p =
|
|
239
|
+
} = oe(t, e), p = rt(h), v = l[m ? u === "floating" ? "reference" : "floating" : u], w = ge(await s.getClippingRect({
|
|
251
240
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(v))) == null || n ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
252
241
|
boundary: c,
|
|
253
242
|
rootBoundary: f,
|
|
@@ -270,13 +259,13 @@ async function ye(e, t) {
|
|
|
270
259
|
strategy: a
|
|
271
260
|
}) : E);
|
|
272
261
|
return {
|
|
273
|
-
top: (
|
|
274
|
-
bottom: (b.bottom -
|
|
275
|
-
left: (
|
|
276
|
-
right: (b.right -
|
|
262
|
+
top: (w.top - b.top + p.top) / g.y,
|
|
263
|
+
bottom: (b.bottom - w.bottom + p.bottom) / g.y,
|
|
264
|
+
left: (w.left - b.left + p.left) / g.x,
|
|
265
|
+
right: (b.right - w.right + p.right) / g.x
|
|
277
266
|
};
|
|
278
267
|
}
|
|
279
|
-
const
|
|
268
|
+
const St = (e) => ({
|
|
280
269
|
name: "arrow",
|
|
281
270
|
options: e,
|
|
282
271
|
async fn(t) {
|
|
@@ -294,13 +283,13 @@ const Ht = (e) => ({
|
|
|
294
283
|
} = oe(e, t) || {};
|
|
295
284
|
if (c == null)
|
|
296
285
|
return {};
|
|
297
|
-
const u =
|
|
286
|
+
const u = rt(f), m = {
|
|
298
287
|
x: n,
|
|
299
288
|
y: o
|
|
300
|
-
}, h = Fe(i), p = He(h), d = await r.getDimensions(c), v = h === "y",
|
|
289
|
+
}, h = Fe(i), p = He(h), d = await r.getDimensions(c), v = h === "y", w = v ? "top" : "left", E = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", g = s.reference[p] + s.reference[h] - m[h] - s.floating[p], b = m[h] - s.reference[h], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
301
290
|
let L = R ? R[x] : 0;
|
|
302
291
|
(!L || !await (r.isElement == null ? void 0 : r.isElement(R))) && (L = l.floating[x] || s.floating[p]);
|
|
303
|
-
const W = g / 2 - b / 2, k = L / 2 - d[p] / 2 - 1, A = ee(u[
|
|
292
|
+
const W = g / 2 - b / 2, k = L / 2 - d[p] / 2 - 1, A = ee(u[w], k), I = ee(u[E], k), y = A, C = L - d[p] - I, P = L / 2 - d[p] / 2 + W, Y = De(y, P, C), V = !a.arrow && ue(i) != null && P !== Y && s.reference[p] / 2 - (P < y ? A : I) - d[p] / 2 < 0, H = V ? P < y ? P - y : P - C : 0;
|
|
304
293
|
return {
|
|
305
294
|
[h]: m[h] + H,
|
|
306
295
|
data: {
|
|
@@ -313,7 +302,7 @@ const Ht = (e) => ({
|
|
|
313
302
|
reset: V
|
|
314
303
|
};
|
|
315
304
|
}
|
|
316
|
-
}),
|
|
305
|
+
}), kt = function(e) {
|
|
317
306
|
return e === void 0 && (e = {}), {
|
|
318
307
|
name: "flip",
|
|
319
308
|
options: e,
|
|
@@ -337,19 +326,19 @@ const Ht = (e) => ({
|
|
|
337
326
|
} = oe(e, t);
|
|
338
327
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
339
328
|
return {};
|
|
340
|
-
const
|
|
341
|
-
!m && R && b.push(...
|
|
342
|
-
const L = [l, ...b], W = await
|
|
329
|
+
const w = J(i), E = te(l), x = J(l) === l, g = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = m || (x || !d ? [me(l)] : Ct(l)), R = p !== "none";
|
|
330
|
+
!m && R && b.push(...At(l, d, p, g));
|
|
331
|
+
const L = [l, ...b], W = await we(t, v), k = [];
|
|
343
332
|
let A = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
344
|
-
if (f && k.push(W[
|
|
345
|
-
const P =
|
|
333
|
+
if (f && k.push(W[w]), u) {
|
|
334
|
+
const P = Pt(i, r, g);
|
|
346
335
|
k.push(W[P[0]], W[P[1]]);
|
|
347
336
|
}
|
|
348
337
|
if (A = [...A, {
|
|
349
338
|
placement: i,
|
|
350
339
|
overflows: k
|
|
351
340
|
}], !k.every((P) => P <= 0)) {
|
|
352
|
-
var I,
|
|
341
|
+
var I, y;
|
|
353
342
|
const P = (((I = s.flip) == null ? void 0 : I.index) || 0) + 1, Y = L[P];
|
|
354
343
|
if (Y)
|
|
355
344
|
return {
|
|
@@ -361,20 +350,20 @@ const Ht = (e) => ({
|
|
|
361
350
|
placement: Y
|
|
362
351
|
}
|
|
363
352
|
};
|
|
364
|
-
let V = (
|
|
353
|
+
let V = (y = A.filter((H) => H.overflows[0] <= 0).sort((H, X) => H.overflows[1] - X.overflows[1])[0]) == null ? void 0 : y.placement;
|
|
365
354
|
if (!V)
|
|
366
355
|
switch (h) {
|
|
367
356
|
case "bestFit": {
|
|
368
357
|
var C;
|
|
369
|
-
const H = (C = A.filter((
|
|
358
|
+
const H = (C = A.filter((X) => {
|
|
370
359
|
if (R) {
|
|
371
|
-
const
|
|
372
|
-
return
|
|
360
|
+
const _ = te(X.placement);
|
|
361
|
+
return _ === E || // Create a bias to the `y` side axis due to horizontal
|
|
373
362
|
// reading directions favoring greater width.
|
|
374
|
-
|
|
363
|
+
_ === "y";
|
|
375
364
|
}
|
|
376
365
|
return !0;
|
|
377
|
-
}).map((
|
|
366
|
+
}).map((X) => [X.placement, X.overflows.filter((_) => _ > 0).reduce((_, mt) => _ + mt, 0)]).sort((X, _) => X[1] - _[1])[0]) == null ? void 0 : C[0];
|
|
378
367
|
H && (V = H);
|
|
379
368
|
break;
|
|
380
369
|
}
|
|
@@ -402,9 +391,9 @@ function Xe(e, t) {
|
|
|
402
391
|
};
|
|
403
392
|
}
|
|
404
393
|
function _e(e) {
|
|
405
|
-
return
|
|
394
|
+
return Lt.some((t) => e[t] >= 0);
|
|
406
395
|
}
|
|
407
|
-
const
|
|
396
|
+
const Ht = function(e) {
|
|
408
397
|
return e === void 0 && (e = {}), {
|
|
409
398
|
name: "hide",
|
|
410
399
|
options: e,
|
|
@@ -417,7 +406,7 @@ const Bt = function(e) {
|
|
|
417
406
|
} = oe(e, t);
|
|
418
407
|
switch (o) {
|
|
419
408
|
case "referenceHidden": {
|
|
420
|
-
const s = await
|
|
409
|
+
const s = await we(t, {
|
|
421
410
|
...i,
|
|
422
411
|
elementContext: "reference"
|
|
423
412
|
}), r = Xe(s, n.reference);
|
|
@@ -429,7 +418,7 @@ const Bt = function(e) {
|
|
|
429
418
|
};
|
|
430
419
|
}
|
|
431
420
|
case "escaped": {
|
|
432
|
-
const s = await
|
|
421
|
+
const s = await we(t, {
|
|
433
422
|
...i,
|
|
434
423
|
altBoundary: !0
|
|
435
424
|
}), r = Xe(s, n.floating);
|
|
@@ -446,7 +435,7 @@ const Bt = function(e) {
|
|
|
446
435
|
}
|
|
447
436
|
};
|
|
448
437
|
};
|
|
449
|
-
async function
|
|
438
|
+
async function Ft(e, t) {
|
|
450
439
|
const {
|
|
451
440
|
placement: n,
|
|
452
441
|
platform: o,
|
|
@@ -473,7 +462,7 @@ async function $t(e, t) {
|
|
|
473
462
|
y: h * f
|
|
474
463
|
};
|
|
475
464
|
}
|
|
476
|
-
const
|
|
465
|
+
const Bt = function(e) {
|
|
477
466
|
return e === void 0 && (e = 0), {
|
|
478
467
|
name: "offset",
|
|
479
468
|
options: e,
|
|
@@ -484,7 +473,7 @@ const Vt = function(e) {
|
|
|
484
473
|
y: s,
|
|
485
474
|
placement: r,
|
|
486
475
|
middlewareData: l
|
|
487
|
-
} = t, a = await
|
|
476
|
+
} = t, a = await Ft(t, e);
|
|
488
477
|
return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
489
478
|
x: i + a.x,
|
|
490
479
|
y: s + a.y,
|
|
@@ -495,7 +484,7 @@ const Vt = function(e) {
|
|
|
495
484
|
};
|
|
496
485
|
}
|
|
497
486
|
};
|
|
498
|
-
},
|
|
487
|
+
}, $t = function(e) {
|
|
499
488
|
return e === void 0 && (e = {}), {
|
|
500
489
|
name: "shift",
|
|
501
490
|
options: e,
|
|
@@ -510,11 +499,11 @@ const Vt = function(e) {
|
|
|
510
499
|
limiter: l = {
|
|
511
500
|
fn: (v) => {
|
|
512
501
|
let {
|
|
513
|
-
x:
|
|
502
|
+
x: w,
|
|
514
503
|
y: E
|
|
515
504
|
} = v;
|
|
516
505
|
return {
|
|
517
|
-
x:
|
|
506
|
+
x: w,
|
|
518
507
|
y: E
|
|
519
508
|
};
|
|
520
509
|
}
|
|
@@ -523,14 +512,14 @@ const Vt = function(e) {
|
|
|
523
512
|
} = oe(e, t), c = {
|
|
524
513
|
x: n,
|
|
525
514
|
y: o
|
|
526
|
-
}, f = await
|
|
515
|
+
}, f = await we(t, a), u = te(J(i)), m = it(u);
|
|
527
516
|
let h = c[m], p = c[u];
|
|
528
517
|
if (s) {
|
|
529
|
-
const v = m === "y" ? "top" : "left",
|
|
518
|
+
const v = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", E = h + f[v], x = h - f[w];
|
|
530
519
|
h = De(E, h, x);
|
|
531
520
|
}
|
|
532
521
|
if (r) {
|
|
533
|
-
const v = u === "y" ? "top" : "left",
|
|
522
|
+
const v = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", E = p + f[v], x = p - f[w];
|
|
534
523
|
p = De(E, p, x);
|
|
535
524
|
}
|
|
536
525
|
const d = l.fn({
|
|
@@ -552,11 +541,11 @@ const Vt = function(e) {
|
|
|
552
541
|
}
|
|
553
542
|
};
|
|
554
543
|
};
|
|
555
|
-
function
|
|
544
|
+
function ye() {
|
|
556
545
|
return typeof window < "u";
|
|
557
546
|
}
|
|
558
547
|
function ie(e) {
|
|
559
|
-
return
|
|
548
|
+
return st(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
560
549
|
}
|
|
561
550
|
function M(e) {
|
|
562
551
|
var t;
|
|
@@ -564,19 +553,19 @@ function M(e) {
|
|
|
564
553
|
}
|
|
565
554
|
function $(e) {
|
|
566
555
|
var t;
|
|
567
|
-
return (t = (
|
|
556
|
+
return (t = (st(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
568
557
|
}
|
|
569
|
-
function
|
|
570
|
-
return
|
|
558
|
+
function st(e) {
|
|
559
|
+
return ye() ? e instanceof Node || e instanceof M(e).Node : !1;
|
|
571
560
|
}
|
|
572
561
|
function N(e) {
|
|
573
|
-
return
|
|
562
|
+
return ye() ? e instanceof Element || e instanceof M(e).Element : !1;
|
|
574
563
|
}
|
|
575
564
|
function B(e) {
|
|
576
|
-
return
|
|
565
|
+
return ye() ? e instanceof HTMLElement || e instanceof M(e).HTMLElement : !1;
|
|
577
566
|
}
|
|
578
|
-
function
|
|
579
|
-
return !
|
|
567
|
+
function je(e) {
|
|
568
|
+
return !ye() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof M(e).ShadowRoot;
|
|
580
569
|
}
|
|
581
570
|
function fe(e) {
|
|
582
571
|
const {
|
|
@@ -587,7 +576,7 @@ function fe(e) {
|
|
|
587
576
|
} = S(e);
|
|
588
577
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
|
|
589
578
|
}
|
|
590
|
-
function
|
|
579
|
+
function Vt(e) {
|
|
591
580
|
return ["table", "td", "th"].includes(ie(e));
|
|
592
581
|
}
|
|
593
582
|
function xe(e) {
|
|
@@ -603,7 +592,7 @@ function Be(e) {
|
|
|
603
592
|
const t = $e(), n = N(e) ? S(e) : e;
|
|
604
593
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
605
594
|
}
|
|
606
|
-
function
|
|
595
|
+
function Wt(e) {
|
|
607
596
|
let t = K(e);
|
|
608
597
|
for (; B(t) && !ne(t); ) {
|
|
609
598
|
if (Be(t))
|
|
@@ -639,19 +628,19 @@ function K(e) {
|
|
|
639
628
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
640
629
|
e.assignedSlot || // DOM Element detected.
|
|
641
630
|
e.parentNode || // ShadowRoot detected.
|
|
642
|
-
|
|
631
|
+
je(e) && e.host || // Fallback.
|
|
643
632
|
$(e)
|
|
644
633
|
);
|
|
645
|
-
return
|
|
634
|
+
return je(t) ? t.host : t;
|
|
646
635
|
}
|
|
647
|
-
function
|
|
636
|
+
function lt(e) {
|
|
648
637
|
const t = K(e);
|
|
649
|
-
return ne(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : B(t) && fe(t) ? t :
|
|
638
|
+
return ne(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : B(t) && fe(t) ? t : lt(t);
|
|
650
639
|
}
|
|
651
640
|
function Q(e, t, n) {
|
|
652
641
|
var o;
|
|
653
642
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
654
|
-
const i =
|
|
643
|
+
const i = lt(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = M(i);
|
|
655
644
|
if (s) {
|
|
656
645
|
const l = Se(r);
|
|
657
646
|
return t.concat(r, r.visualViewport || [], fe(i) ? i : [], l && n ? Q(l) : []);
|
|
@@ -661,7 +650,7 @@ function Q(e, t, n) {
|
|
|
661
650
|
function Se(e) {
|
|
662
651
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
663
652
|
}
|
|
664
|
-
function
|
|
653
|
+
function ct(e) {
|
|
665
654
|
const t = S(e);
|
|
666
655
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
667
656
|
const i = B(e), s = i ? e.offsetWidth : n, r = i ? e.offsetHeight : o, l = pe(n) !== s || pe(o) !== r;
|
|
@@ -682,22 +671,22 @@ function z(e) {
|
|
|
682
671
|
width: o,
|
|
683
672
|
height: i,
|
|
684
673
|
$: s
|
|
685
|
-
} =
|
|
674
|
+
} = ct(t);
|
|
686
675
|
let r = (s ? pe(n.width) : n.width) / o, l = (s ? pe(n.height) : n.height) / i;
|
|
687
676
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
688
677
|
x: r,
|
|
689
678
|
y: l
|
|
690
679
|
};
|
|
691
680
|
}
|
|
692
|
-
const
|
|
693
|
-
function
|
|
681
|
+
const It = /* @__PURE__ */ F(0);
|
|
682
|
+
function at(e) {
|
|
694
683
|
const t = M(e);
|
|
695
|
-
return !$e() || !t.visualViewport ?
|
|
684
|
+
return !$e() || !t.visualViewport ? It : {
|
|
696
685
|
x: t.visualViewport.offsetLeft,
|
|
697
686
|
y: t.visualViewport.offsetTop
|
|
698
687
|
};
|
|
699
688
|
}
|
|
700
|
-
function
|
|
689
|
+
function Yt(e, t, n) {
|
|
701
690
|
return t === void 0 && (t = !1), !n || t && n !== M(e) ? !1 : t;
|
|
702
691
|
}
|
|
703
692
|
function Z(e, t, n, o) {
|
|
@@ -705,13 +694,13 @@ function Z(e, t, n, o) {
|
|
|
705
694
|
const i = e.getBoundingClientRect(), s = Ve(e);
|
|
706
695
|
let r = F(1);
|
|
707
696
|
t && (o ? N(o) && (r = z(o)) : r = z(e));
|
|
708
|
-
const l =
|
|
697
|
+
const l = Yt(s, n, o) ? at(s) : F(0);
|
|
709
698
|
let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, f = i.width / r.x, u = i.height / r.y;
|
|
710
699
|
if (s) {
|
|
711
700
|
const m = M(s), h = o && N(o) ? M(o) : o;
|
|
712
701
|
let p = m, d = Se(p);
|
|
713
702
|
for (; d && o && h !== p; ) {
|
|
714
|
-
const v = z(d),
|
|
703
|
+
const v = z(d), w = d.getBoundingClientRect(), E = S(d), x = w.left + (d.clientLeft + parseFloat(E.paddingLeft)) * v.x, g = w.top + (d.clientTop + parseFloat(E.paddingTop)) * v.y;
|
|
715
704
|
a *= v.x, c *= v.y, f *= v.x, u *= v.y, a += x, c += g, p = M(d), d = Se(p);
|
|
716
705
|
}
|
|
717
706
|
}
|
|
@@ -726,7 +715,7 @@ function We(e, t) {
|
|
|
726
715
|
const n = be(e).scrollLeft;
|
|
727
716
|
return t ? t.left + n : Z($(e)).left + n;
|
|
728
717
|
}
|
|
729
|
-
function
|
|
718
|
+
function ut(e, t, n) {
|
|
730
719
|
n === void 0 && (n = !1);
|
|
731
720
|
const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - (n ? 0 : (
|
|
732
721
|
// RTL <body> scrollbar.
|
|
@@ -737,7 +726,7 @@ function ft(e, t, n) {
|
|
|
737
726
|
y: s
|
|
738
727
|
};
|
|
739
728
|
}
|
|
740
|
-
function
|
|
729
|
+
function Xt(e) {
|
|
741
730
|
let {
|
|
742
731
|
elements: t,
|
|
743
732
|
rect: n,
|
|
@@ -756,7 +745,7 @@ function _t(e) {
|
|
|
756
745
|
const h = Z(o);
|
|
757
746
|
c = z(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
758
747
|
}
|
|
759
|
-
const m = r && !u && !s ?
|
|
748
|
+
const m = r && !u && !s ? ut(r, a, !0) : F(0);
|
|
760
749
|
return {
|
|
761
750
|
width: n.width * c.x,
|
|
762
751
|
height: n.height * c.y,
|
|
@@ -764,10 +753,10 @@ function _t(e) {
|
|
|
764
753
|
y: n.y * c.y - a.scrollTop * c.y + f.y + m.y
|
|
765
754
|
};
|
|
766
755
|
}
|
|
767
|
-
function
|
|
756
|
+
function _t(e) {
|
|
768
757
|
return Array.from(e.getClientRects());
|
|
769
758
|
}
|
|
770
|
-
function
|
|
759
|
+
function jt(e) {
|
|
771
760
|
const t = $(e), n = be(e), o = e.ownerDocument.body, i = G(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = G(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
772
761
|
let r = -n.scrollLeft + We(e);
|
|
773
762
|
const l = -n.scrollTop;
|
|
@@ -778,7 +767,7 @@ function Ut(e) {
|
|
|
778
767
|
y: l
|
|
779
768
|
};
|
|
780
769
|
}
|
|
781
|
-
function
|
|
770
|
+
function Kt(e, t) {
|
|
782
771
|
const n = M(e), o = $(e), i = n.visualViewport;
|
|
783
772
|
let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
784
773
|
if (i) {
|
|
@@ -793,7 +782,7 @@ function qt(e, t) {
|
|
|
793
782
|
y: a
|
|
794
783
|
};
|
|
795
784
|
}
|
|
796
|
-
function
|
|
785
|
+
function Ut(e, t) {
|
|
797
786
|
const n = Z(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, s = B(e) ? z(e) : F(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, a = i * s.x, c = o * s.y;
|
|
798
787
|
return {
|
|
799
788
|
width: r,
|
|
@@ -802,16 +791,16 @@ function Gt(e, t) {
|
|
|
802
791
|
y: c
|
|
803
792
|
};
|
|
804
793
|
}
|
|
805
|
-
function
|
|
794
|
+
function Ke(e, t, n) {
|
|
806
795
|
let o;
|
|
807
796
|
if (t === "viewport")
|
|
808
|
-
o =
|
|
797
|
+
o = Kt(e, n);
|
|
809
798
|
else if (t === "document")
|
|
810
|
-
o =
|
|
799
|
+
o = jt($(e));
|
|
811
800
|
else if (N(t))
|
|
812
|
-
o =
|
|
801
|
+
o = Ut(t, n);
|
|
813
802
|
else {
|
|
814
|
-
const i =
|
|
803
|
+
const i = at(e);
|
|
815
804
|
o = {
|
|
816
805
|
x: t.x - i.x,
|
|
817
806
|
y: t.y - i.y,
|
|
@@ -821,11 +810,11 @@ function Ue(e, t, n) {
|
|
|
821
810
|
}
|
|
822
811
|
return ge(o);
|
|
823
812
|
}
|
|
824
|
-
function
|
|
813
|
+
function ft(e, t) {
|
|
825
814
|
const n = K(e);
|
|
826
|
-
return n === t || !N(n) || ne(n) ? !1 : S(n).position === "fixed" ||
|
|
815
|
+
return n === t || !N(n) || ne(n) ? !1 : S(n).position === "fixed" || ft(n, t);
|
|
827
816
|
}
|
|
828
|
-
function
|
|
817
|
+
function qt(e, t) {
|
|
829
818
|
const n = t.get(e);
|
|
830
819
|
if (n)
|
|
831
820
|
return n;
|
|
@@ -834,21 +823,21 @@ function Jt(e, t) {
|
|
|
834
823
|
let r = s ? K(e) : e;
|
|
835
824
|
for (; N(r) && !ne(r); ) {
|
|
836
825
|
const l = S(r), a = Be(r);
|
|
837
|
-
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || fe(r) && !a &&
|
|
826
|
+
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || fe(r) && !a && ft(e, r)) ? o = o.filter((f) => f !== r) : i = l, r = K(r);
|
|
838
827
|
}
|
|
839
828
|
return t.set(e, o), o;
|
|
840
829
|
}
|
|
841
|
-
function
|
|
830
|
+
function Gt(e) {
|
|
842
831
|
let {
|
|
843
832
|
element: t,
|
|
844
833
|
boundary: n,
|
|
845
834
|
rootBoundary: o,
|
|
846
835
|
strategy: i
|
|
847
836
|
} = e;
|
|
848
|
-
const r = [...n === "clippingAncestors" ? xe(t) ? [] :
|
|
849
|
-
const u =
|
|
837
|
+
const r = [...n === "clippingAncestors" ? xe(t) ? [] : qt(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
|
|
838
|
+
const u = Ke(t, f, i);
|
|
850
839
|
return c.top = G(u.top, c.top), c.right = ee(u.right, c.right), c.bottom = ee(u.bottom, c.bottom), c.left = G(u.left, c.left), c;
|
|
851
|
-
},
|
|
840
|
+
}, Ke(t, l, i));
|
|
852
841
|
return {
|
|
853
842
|
width: a.right - a.left,
|
|
854
843
|
height: a.bottom - a.top,
|
|
@@ -856,17 +845,17 @@ function Qt(e) {
|
|
|
856
845
|
y: a.top
|
|
857
846
|
};
|
|
858
847
|
}
|
|
859
|
-
function
|
|
848
|
+
function Jt(e) {
|
|
860
849
|
const {
|
|
861
850
|
width: t,
|
|
862
851
|
height: n
|
|
863
|
-
} =
|
|
852
|
+
} = ct(e);
|
|
864
853
|
return {
|
|
865
854
|
width: t,
|
|
866
855
|
height: n
|
|
867
856
|
};
|
|
868
857
|
}
|
|
869
|
-
function
|
|
858
|
+
function Qt(e, t, n) {
|
|
870
859
|
const o = B(t), i = $(t), s = n === "fixed", r = Z(e, !0, s, t);
|
|
871
860
|
let l = {
|
|
872
861
|
scrollLeft: 0,
|
|
@@ -878,7 +867,7 @@ function zt(e, t, n) {
|
|
|
878
867
|
const m = Z(t, !0, s, t);
|
|
879
868
|
a.x = m.x + t.clientLeft, a.y = m.y + t.clientTop;
|
|
880
869
|
} else i && (a.x = We(i));
|
|
881
|
-
const c = i && !o && !s ?
|
|
870
|
+
const c = i && !o && !s ? ut(i, l) : F(0), f = r.left + l.scrollLeft - a.x - c.x, u = r.top + l.scrollTop - a.y - c.y;
|
|
882
871
|
return {
|
|
883
872
|
x: f,
|
|
884
873
|
y: u,
|
|
@@ -889,7 +878,7 @@ function zt(e, t, n) {
|
|
|
889
878
|
function Re(e) {
|
|
890
879
|
return S(e).position === "static";
|
|
891
880
|
}
|
|
892
|
-
function
|
|
881
|
+
function Ue(e, t) {
|
|
893
882
|
if (!B(e) || S(e).position === "fixed")
|
|
894
883
|
return null;
|
|
895
884
|
if (t)
|
|
@@ -897,7 +886,7 @@ function qe(e, t) {
|
|
|
897
886
|
let n = e.offsetParent;
|
|
898
887
|
return $(e) === n && (n = n.ownerDocument.body), n;
|
|
899
888
|
}
|
|
900
|
-
function
|
|
889
|
+
function dt(e, t) {
|
|
901
890
|
const n = M(e);
|
|
902
891
|
if (xe(e))
|
|
903
892
|
return n;
|
|
@@ -910,15 +899,15 @@ function ht(e, t) {
|
|
|
910
899
|
}
|
|
911
900
|
return n;
|
|
912
901
|
}
|
|
913
|
-
let o =
|
|
914
|
-
for (; o &&
|
|
915
|
-
o =
|
|
916
|
-
return o && ne(o) && Re(o) && !Be(o) ? n : o ||
|
|
902
|
+
let o = Ue(e, t);
|
|
903
|
+
for (; o && Vt(o) && Re(o); )
|
|
904
|
+
o = Ue(o, t);
|
|
905
|
+
return o && ne(o) && Re(o) && !Be(o) ? n : o || Wt(e) || n;
|
|
917
906
|
}
|
|
918
|
-
const
|
|
919
|
-
const t = this.getOffsetParent ||
|
|
907
|
+
const Zt = async function(e) {
|
|
908
|
+
const t = this.getOffsetParent || dt, n = this.getDimensions, o = await n(e.floating);
|
|
920
909
|
return {
|
|
921
|
-
reference:
|
|
910
|
+
reference: Qt(e.reference, await t(e.floating), e.strategy),
|
|
922
911
|
floating: {
|
|
923
912
|
x: 0,
|
|
924
913
|
y: 0,
|
|
@@ -927,25 +916,25 @@ const en = async function(e) {
|
|
|
927
916
|
}
|
|
928
917
|
};
|
|
929
918
|
};
|
|
930
|
-
function
|
|
919
|
+
function zt(e) {
|
|
931
920
|
return S(e).direction === "rtl";
|
|
932
921
|
}
|
|
933
|
-
const
|
|
934
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
922
|
+
const en = {
|
|
923
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Xt,
|
|
935
924
|
getDocumentElement: $,
|
|
936
|
-
getClippingRect:
|
|
937
|
-
getOffsetParent:
|
|
938
|
-
getElementRects:
|
|
939
|
-
getClientRects:
|
|
940
|
-
getDimensions:
|
|
925
|
+
getClippingRect: Gt,
|
|
926
|
+
getOffsetParent: dt,
|
|
927
|
+
getElementRects: Zt,
|
|
928
|
+
getClientRects: _t,
|
|
929
|
+
getDimensions: Jt,
|
|
941
930
|
getScale: z,
|
|
942
931
|
isElement: N,
|
|
943
|
-
isRTL:
|
|
932
|
+
isRTL: zt
|
|
944
933
|
};
|
|
945
|
-
function
|
|
934
|
+
function ht(e, t) {
|
|
946
935
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
947
936
|
}
|
|
948
|
-
function
|
|
937
|
+
function tn(e, t) {
|
|
949
938
|
let n = null, o;
|
|
950
939
|
const i = $(e);
|
|
951
940
|
function s() {
|
|
@@ -962,8 +951,8 @@ function on(e, t) {
|
|
|
962
951
|
} = c;
|
|
963
952
|
if (l || t(), !m || !h)
|
|
964
953
|
return;
|
|
965
|
-
const p = he(u), d = he(i.clientWidth - (f + m)), v = he(i.clientHeight - (u + h)),
|
|
966
|
-
rootMargin: -p + "px " + -d + "px " + -v + "px " + -
|
|
954
|
+
const p = he(u), d = he(i.clientWidth - (f + m)), v = he(i.clientHeight - (u + h)), w = he(f), x = {
|
|
955
|
+
rootMargin: -p + "px " + -d + "px " + -v + "px " + -w + "px",
|
|
967
956
|
threshold: G(0, ee(1, a)) || 1
|
|
968
957
|
};
|
|
969
958
|
let g = !0;
|
|
@@ -976,7 +965,7 @@ function on(e, t) {
|
|
|
976
965
|
r(!1, 1e-7);
|
|
977
966
|
}, 1e3);
|
|
978
967
|
}
|
|
979
|
-
L === 1 && !
|
|
968
|
+
L === 1 && !ht(c, e.getBoundingClientRect()) && r(), g = !1;
|
|
980
969
|
}
|
|
981
970
|
try {
|
|
982
971
|
n = new IntersectionObserver(b, {
|
|
@@ -991,7 +980,7 @@ function on(e, t) {
|
|
|
991
980
|
}
|
|
992
981
|
return r(!0), s;
|
|
993
982
|
}
|
|
994
|
-
function
|
|
983
|
+
function vt(e, t, n, o) {
|
|
995
984
|
o === void 0 && (o = {});
|
|
996
985
|
const {
|
|
997
986
|
ancestorScroll: i = !0,
|
|
@@ -1000,15 +989,15 @@ function pt(e, t, n, o) {
|
|
|
1000
989
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1001
990
|
animationFrame: a = !1
|
|
1002
991
|
} = o, c = Ve(e), f = i || s ? [...c ? Q(c) : [], ...Q(t)] : [];
|
|
1003
|
-
f.forEach((
|
|
1004
|
-
i &&
|
|
992
|
+
f.forEach((w) => {
|
|
993
|
+
i && w.addEventListener("scroll", n, {
|
|
1005
994
|
passive: !0
|
|
1006
|
-
}), s &&
|
|
995
|
+
}), s && w.addEventListener("resize", n);
|
|
1007
996
|
});
|
|
1008
|
-
const u = c && l ?
|
|
997
|
+
const u = c && l ? tn(c, n) : null;
|
|
1009
998
|
let m = -1, h = null;
|
|
1010
|
-
r && (h = new ResizeObserver((
|
|
1011
|
-
let [E] =
|
|
999
|
+
r && (h = new ResizeObserver((w) => {
|
|
1000
|
+
let [E] = w;
|
|
1012
1001
|
E && E.target === c && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1013
1002
|
var x;
|
|
1014
1003
|
(x = h) == null || x.observe(t);
|
|
@@ -1017,25 +1006,25 @@ function pt(e, t, n, o) {
|
|
|
1017
1006
|
let p, d = a ? Z(e) : null;
|
|
1018
1007
|
a && v();
|
|
1019
1008
|
function v() {
|
|
1020
|
-
const
|
|
1021
|
-
d && !
|
|
1009
|
+
const w = Z(e);
|
|
1010
|
+
d && !ht(d, w) && n(), d = w, p = requestAnimationFrame(v);
|
|
1022
1011
|
}
|
|
1023
1012
|
return n(), () => {
|
|
1024
|
-
var
|
|
1013
|
+
var w;
|
|
1025
1014
|
f.forEach((E) => {
|
|
1026
1015
|
i && E.removeEventListener("scroll", n), s && E.removeEventListener("resize", n);
|
|
1027
|
-
}), u == null || u(), (
|
|
1016
|
+
}), u == null || u(), (w = h) == null || w.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1028
1017
|
};
|
|
1029
1018
|
}
|
|
1030
|
-
const Rn =
|
|
1019
|
+
const Rn = Bt, Pn = $t, Cn = kt, Mn = Ht, nn = St, on = (e, t, n) => {
|
|
1031
1020
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1032
|
-
platform:
|
|
1021
|
+
platform: en,
|
|
1033
1022
|
...n
|
|
1034
1023
|
}, s = {
|
|
1035
1024
|
...i.platform,
|
|
1036
1025
|
_c: o
|
|
1037
1026
|
};
|
|
1038
|
-
return
|
|
1027
|
+
return Nt(e, t, {
|
|
1039
1028
|
...i,
|
|
1040
1029
|
platform: s
|
|
1041
1030
|
});
|
|
@@ -1045,13 +1034,13 @@ function An(e, t, n = {}) {
|
|
|
1045
1034
|
transform: o = !0,
|
|
1046
1035
|
middlewares: i,
|
|
1047
1036
|
whileElementsMounted: s,
|
|
1048
|
-
open: r =
|
|
1037
|
+
open: r = j(!1),
|
|
1049
1038
|
setOpen: l = (x) => {
|
|
1050
1039
|
r.value = x;
|
|
1051
1040
|
}
|
|
1052
|
-
} = n, a = O(() => T(n.placement) ?? "bottom"), c = O(() => T(n.strategy) ?? "absolute"), f =
|
|
1041
|
+
} = n, a = O(() => T(n.placement) ?? "bottom"), c = O(() => T(n.strategy) ?? "absolute"), f = j(0), u = j(0), m = j(a.value), h = j(c.value), p = Me({}), d = j(!1), v = async () => {
|
|
1053
1042
|
if (!e.value || !t.value) return;
|
|
1054
|
-
const x = await
|
|
1043
|
+
const x = await on(e.value, t.value, {
|
|
1055
1044
|
placement: a.value,
|
|
1056
1045
|
strategy: c.value,
|
|
1057
1046
|
middleware: i
|
|
@@ -1061,16 +1050,16 @@ function An(e, t, n = {}) {
|
|
|
1061
1050
|
ve([a, c], () => {
|
|
1062
1051
|
r.value && v();
|
|
1063
1052
|
});
|
|
1064
|
-
let
|
|
1053
|
+
let w;
|
|
1065
1054
|
ve(
|
|
1066
1055
|
[e, t, r],
|
|
1067
1056
|
([x, g, b]) => {
|
|
1068
|
-
!b || !x || !g || (s ?
|
|
1069
|
-
|
|
1057
|
+
!b || !x || !g || (s ? w = s(x, g, v) : w = vt(x, g, v), q(() => {
|
|
1058
|
+
w == null || w(), w = void 0;
|
|
1070
1059
|
}));
|
|
1071
1060
|
},
|
|
1072
1061
|
{ immediate: !0 }
|
|
1073
|
-
), ae(() =>
|
|
1062
|
+
), ae(() => w == null ? void 0 : w()), ve(r, (x) => {
|
|
1074
1063
|
x || (d.value = !1);
|
|
1075
1064
|
});
|
|
1076
1065
|
const E = O(() => {
|
|
@@ -1081,11 +1070,11 @@ function An(e, t, n = {}) {
|
|
|
1081
1070
|
};
|
|
1082
1071
|
if (!d.value || !t.value)
|
|
1083
1072
|
return x;
|
|
1084
|
-
const g =
|
|
1073
|
+
const g = qe(t.value, f.value), b = qe(t.value, u.value);
|
|
1085
1074
|
return T(o) ? {
|
|
1086
1075
|
...x,
|
|
1087
1076
|
transform: `translate(${g}px, ${b}px)`,
|
|
1088
|
-
...
|
|
1077
|
+
...pt(t.value) >= 1.5 && {
|
|
1089
1078
|
willChange: "transform"
|
|
1090
1079
|
}
|
|
1091
1080
|
} : {
|
|
@@ -1111,28 +1100,38 @@ function An(e, t, n = {}) {
|
|
|
1111
1100
|
setOpen: l
|
|
1112
1101
|
};
|
|
1113
1102
|
}
|
|
1103
|
+
function qe(e, t) {
|
|
1104
|
+
const n = pt(e);
|
|
1105
|
+
return Math.round(t * n) / n;
|
|
1106
|
+
}
|
|
1107
|
+
function pt(e) {
|
|
1108
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1109
|
+
}
|
|
1114
1110
|
function Dn(e, t, n, o = {}) {
|
|
1115
|
-
return
|
|
1111
|
+
return vt(e, t, n, o);
|
|
1116
1112
|
}
|
|
1117
1113
|
function Nn(e, t = {}) {
|
|
1118
|
-
const { middlewareData: n, placement: o } = e, { offset: i = "-
|
|
1114
|
+
const { middlewareData: n, placement: o } = e, { offset: i = "-4px" } = t, s = O(() => {
|
|
1119
1115
|
var a;
|
|
1120
1116
|
return ((a = n.value.arrow) == null ? void 0 : a.x) ?? 0;
|
|
1121
1117
|
}), r = O(() => {
|
|
1122
1118
|
var a;
|
|
1123
1119
|
return ((a = n.value.arrow) == null ? void 0 : a.y) ?? 0;
|
|
1124
1120
|
}), l = O(() => {
|
|
1125
|
-
const a =
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
"inset-block-start": f
|
|
1134
|
-
|
|
1135
|
-
}
|
|
1121
|
+
const a = T(o).split("-")[0], c = s.value, f = r.value;
|
|
1122
|
+
return a === "bottom" ? {
|
|
1123
|
+
"inset-inline-start": `${c}px`,
|
|
1124
|
+
"inset-block-start": i
|
|
1125
|
+
} : a === "top" ? {
|
|
1126
|
+
"inset-inline-start": `${c}px`,
|
|
1127
|
+
"inset-block-end": i
|
|
1128
|
+
} : a === "right" ? {
|
|
1129
|
+
"inset-block-start": `${f}px`,
|
|
1130
|
+
"inset-inline-start": i
|
|
1131
|
+
} : a === "left" ? {
|
|
1132
|
+
"inset-block-start": `${f}px`,
|
|
1133
|
+
"inset-inline-end": i
|
|
1134
|
+
} : {};
|
|
1136
1135
|
});
|
|
1137
1136
|
return {
|
|
1138
1137
|
arrowX: s,
|
|
@@ -1141,10 +1140,10 @@ function Nn(e, t = {}) {
|
|
|
1141
1140
|
};
|
|
1142
1141
|
}
|
|
1143
1142
|
const Ge = 10;
|
|
1144
|
-
function
|
|
1143
|
+
function rn(e) {
|
|
1145
1144
|
return e === "mouse" || e === "pen";
|
|
1146
1145
|
}
|
|
1147
|
-
function
|
|
1146
|
+
function sn(e, t, n) {
|
|
1148
1147
|
const { delay: o } = n, i = O(() => {
|
|
1149
1148
|
const c = T(o);
|
|
1150
1149
|
return (typeof c == "number" ? c : c.open) ?? 0;
|
|
@@ -1183,9 +1182,9 @@ function Sn(e, t = {}) {
|
|
|
1183
1182
|
restMs: a = 0,
|
|
1184
1183
|
mouseOnly: c = !1
|
|
1185
1184
|
} = t, f = O(() => T(r)), u = O(() => T(a)), m = O(() => {
|
|
1186
|
-
const
|
|
1187
|
-
return !
|
|
1188
|
-
}), { hide: h, show: p, showDelay: d, clearTimeouts: v } =
|
|
1185
|
+
const y = i.value;
|
|
1186
|
+
return !y || y instanceof HTMLElement ? y : y.contextElement ?? null;
|
|
1187
|
+
}), { hide: h, show: p, showDelay: d, clearTimeouts: v } = sn(
|
|
1189
1188
|
() => {
|
|
1190
1189
|
n.value || o(!0);
|
|
1191
1190
|
},
|
|
@@ -1194,70 +1193,70 @@ function Sn(e, t = {}) {
|
|
|
1194
1193
|
},
|
|
1195
1194
|
{ delay: l }
|
|
1196
1195
|
);
|
|
1197
|
-
let
|
|
1196
|
+
let w = null, E;
|
|
1198
1197
|
const x = O(() => d.value === 0 && u.value > 0);
|
|
1199
|
-
function g(
|
|
1200
|
-
if (!f.value || !L(
|
|
1201
|
-
const C = { x:
|
|
1202
|
-
(P > Ge || Y > Ge) && (
|
|
1198
|
+
function g(y) {
|
|
1199
|
+
if (!f.value || !L(y) || !x.value || !w) return;
|
|
1200
|
+
const C = { x: y.clientX, y: y.clientY }, P = Math.abs(C.x - w.x), Y = Math.abs(C.y - w.y);
|
|
1201
|
+
(P > Ge || Y > Ge) && (w = C, clearTimeout(E), E = setTimeout(() => {
|
|
1203
1202
|
p(0);
|
|
1204
1203
|
}, u.value));
|
|
1205
1204
|
}
|
|
1206
|
-
function b(
|
|
1207
|
-
!f.value || !L(
|
|
1205
|
+
function b(y) {
|
|
1206
|
+
!f.value || !L(y) || !x.value || (w = { x: y.clientX, y: y.clientY }, E = setTimeout(() => {
|
|
1208
1207
|
p(0);
|
|
1209
1208
|
}, u.value));
|
|
1210
1209
|
}
|
|
1211
1210
|
function R() {
|
|
1212
|
-
clearTimeout(E),
|
|
1211
|
+
clearTimeout(E), w = null;
|
|
1213
1212
|
}
|
|
1214
1213
|
re(() => {
|
|
1215
|
-
const
|
|
1216
|
-
!
|
|
1217
|
-
|
|
1214
|
+
const y = m.value;
|
|
1215
|
+
!y || !f.value || !x.value || (y.addEventListener("pointerenter", b), y.addEventListener("pointermove", g), y.addEventListener("pointerleave", R), q(() => {
|
|
1216
|
+
y.removeEventListener("pointerenter", b), y.removeEventListener("pointermove", g), y.removeEventListener("pointerleave", R);
|
|
1218
1217
|
}));
|
|
1219
1218
|
}), ae(() => {
|
|
1220
1219
|
clearTimeout(E);
|
|
1221
1220
|
});
|
|
1222
|
-
function L(
|
|
1223
|
-
return !(T(c) && !
|
|
1221
|
+
function L(y) {
|
|
1222
|
+
return !(T(c) && !rn(y.pointerType));
|
|
1224
1223
|
}
|
|
1225
|
-
function W(
|
|
1226
|
-
!f.value || !L(
|
|
1224
|
+
function W(y) {
|
|
1225
|
+
!f.value || !L(y) || x.value || p();
|
|
1227
1226
|
}
|
|
1228
|
-
function k(
|
|
1229
|
-
!f.value || !L(
|
|
1227
|
+
function k(y) {
|
|
1228
|
+
!f.value || !L(y) || v();
|
|
1230
1229
|
}
|
|
1231
|
-
function A(
|
|
1230
|
+
function A(y) {
|
|
1232
1231
|
var C;
|
|
1233
|
-
!f.value || !L(
|
|
1232
|
+
!f.value || !L(y) || (C = s.value) != null && C.contains(y.relatedTarget) || h();
|
|
1234
1233
|
}
|
|
1235
|
-
function I(
|
|
1234
|
+
function I(y) {
|
|
1236
1235
|
var C;
|
|
1237
|
-
!f.value || !L(
|
|
1236
|
+
!f.value || !L(y) || (C = m.value) != null && C.contains(y.relatedTarget) || h();
|
|
1238
1237
|
}
|
|
1239
1238
|
re(() => {
|
|
1240
|
-
const
|
|
1241
|
-
!
|
|
1242
|
-
|
|
1239
|
+
const y = m.value;
|
|
1240
|
+
!y || !f.value || (y.addEventListener("pointerenter", W), y.addEventListener("pointerleave", A), q(() => {
|
|
1241
|
+
y.removeEventListener("pointerenter", W), y.removeEventListener("pointerleave", A);
|
|
1243
1242
|
}));
|
|
1244
1243
|
}), re(() => {
|
|
1245
|
-
const
|
|
1246
|
-
!
|
|
1247
|
-
|
|
1244
|
+
const y = s.value;
|
|
1245
|
+
!y || !f.value || (y.addEventListener("pointerenter", k), y.addEventListener("pointerleave", I), q(() => {
|
|
1246
|
+
y.removeEventListener("pointerenter", k), y.removeEventListener("pointerleave", I);
|
|
1248
1247
|
}));
|
|
1249
1248
|
});
|
|
1250
1249
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return
|
|
1250
|
+
function ln(e) {
|
|
1251
|
+
return yt() ? (ae(e), !0) : !1;
|
|
1253
1252
|
}
|
|
1254
|
-
const
|
|
1253
|
+
const cn = typeof window < "u" && typeof document < "u";
|
|
1255
1254
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1256
|
-
const
|
|
1255
|
+
const an = Object.prototype.toString, un = (e) => an.call(e) === "[object Object]";
|
|
1257
1256
|
function Pe(e) {
|
|
1258
1257
|
return Array.isArray(e) ? e : [e];
|
|
1259
1258
|
}
|
|
1260
|
-
function
|
|
1259
|
+
function fn(e, t, n) {
|
|
1261
1260
|
return ve(
|
|
1262
1261
|
e,
|
|
1263
1262
|
t,
|
|
@@ -1267,8 +1266,8 @@ function hn(e, t, n) {
|
|
|
1267
1266
|
}
|
|
1268
1267
|
);
|
|
1269
1268
|
}
|
|
1270
|
-
const
|
|
1271
|
-
function
|
|
1269
|
+
const dn = cn ? window : void 0;
|
|
1270
|
+
function hn(e) {
|
|
1272
1271
|
var t;
|
|
1273
1272
|
const n = T(e);
|
|
1274
1273
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
@@ -1279,11 +1278,11 @@ function D(...e) {
|
|
|
1279
1278
|
}, o = (l, a, c, f) => (l.addEventListener(a, c, f), () => l.removeEventListener(a, c, f)), i = O(() => {
|
|
1280
1279
|
const l = Pe(T(e[0])).filter((a) => a != null);
|
|
1281
1280
|
return l.every((a) => typeof a != "string") ? l : void 0;
|
|
1282
|
-
}), s =
|
|
1281
|
+
}), s = fn(
|
|
1283
1282
|
() => {
|
|
1284
1283
|
var l, a;
|
|
1285
1284
|
return [
|
|
1286
|
-
(a = (l = i.value) == null ? void 0 : l.map((c) =>
|
|
1285
|
+
(a = (l = i.value) == null ? void 0 : l.map((c) => hn(c))) != null ? a : [dn].filter((c) => c != null),
|
|
1287
1286
|
Pe(T(i.value ? e[1] : e[0])),
|
|
1288
1287
|
Pe(xt(i.value ? e[2] : e[1])),
|
|
1289
1288
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
@@ -1293,7 +1292,7 @@ function D(...e) {
|
|
|
1293
1292
|
([l, a, c, f]) => {
|
|
1294
1293
|
if (n(), !(l != null && l.length) || !(a != null && a.length) || !(c != null && c.length))
|
|
1295
1294
|
return;
|
|
1296
|
-
const u =
|
|
1295
|
+
const u = un(f) ? { ...f } : f;
|
|
1297
1296
|
t.push(
|
|
1298
1297
|
...l.flatMap(
|
|
1299
1298
|
(m) => a.flatMap(
|
|
@@ -1306,7 +1305,7 @@ function D(...e) {
|
|
|
1306
1305
|
), r = () => {
|
|
1307
1306
|
s(), n();
|
|
1308
1307
|
};
|
|
1309
|
-
return
|
|
1308
|
+
return ln(n), r;
|
|
1310
1309
|
}
|
|
1311
1310
|
function kn(e, t = {}) {
|
|
1312
1311
|
const {
|
|
@@ -1344,17 +1343,17 @@ function kn(e, t = {}) {
|
|
|
1344
1343
|
const d = p.target;
|
|
1345
1344
|
if (T(l) && d) {
|
|
1346
1345
|
if (Je() && Qe() && !p.relatedTarget) {
|
|
1347
|
-
if (!f && !
|
|
1346
|
+
if (!f && !vn(d))
|
|
1348
1347
|
return;
|
|
1349
|
-
} else if (!
|
|
1348
|
+
} else if (!pn(d))
|
|
1350
1349
|
return;
|
|
1351
1350
|
}
|
|
1352
1351
|
o(!0);
|
|
1353
1352
|
}
|
|
1354
1353
|
function h(p) {
|
|
1355
1354
|
clearTimeout(u), u = window.setTimeout(() => {
|
|
1356
|
-
var
|
|
1357
|
-
const v = (((
|
|
1355
|
+
var w;
|
|
1356
|
+
const v = (((w = a.value) == null ? void 0 : w.ownerDocument) ?? document).activeElement;
|
|
1358
1357
|
!p.relatedTarget && v === a.value || i.value && v && i.value.contains(v) || o(!1);
|
|
1359
1358
|
}, 0);
|
|
1360
1359
|
}
|
|
@@ -1374,10 +1373,10 @@ function Je() {
|
|
|
1374
1373
|
function Qe() {
|
|
1375
1374
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1376
1375
|
}
|
|
1377
|
-
function
|
|
1376
|
+
function vn(e) {
|
|
1378
1377
|
return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement;
|
|
1379
1378
|
}
|
|
1380
|
-
function
|
|
1379
|
+
function pn(e) {
|
|
1381
1380
|
return e.matches(":focus-visible");
|
|
1382
1381
|
}
|
|
1383
1382
|
function Hn(e, t = {}) {
|
|
@@ -1403,7 +1402,7 @@ function Hn(e, t = {}) {
|
|
|
1403
1402
|
const b = g.target;
|
|
1404
1403
|
!n.value && b === h.value && g.preventDefault(), p();
|
|
1405
1404
|
}
|
|
1406
|
-
function
|
|
1405
|
+
function w() {
|
|
1407
1406
|
if (T(r) === "mousedown" && f) {
|
|
1408
1407
|
f = void 0;
|
|
1409
1408
|
return;
|
|
@@ -1426,8 +1425,8 @@ function Hn(e, t = {}) {
|
|
|
1426
1425
|
}
|
|
1427
1426
|
re(() => {
|
|
1428
1427
|
const g = h.value;
|
|
1429
|
-
!m.value || !g || (g.addEventListener("pointerdown", d), g.addEventListener("mousedown", v), g.addEventListener("click",
|
|
1430
|
-
g.removeEventListener("pointerdown", d), g.removeEventListener("mousedown", v), g.removeEventListener("click",
|
|
1428
|
+
!m.value || !g || (g.addEventListener("pointerdown", d), g.addEventListener("mousedown", v), g.addEventListener("click", w), g.addEventListener("keydown", E), g.addEventListener("keyup", x), q(() => {
|
|
1429
|
+
g.removeEventListener("pointerdown", d), g.removeEventListener("mousedown", v), g.removeEventListener("click", w), g.removeEventListener("keydown", E), g.removeEventListener("keyup", x);
|
|
1431
1430
|
}));
|
|
1432
1431
|
});
|
|
1433
1432
|
}
|
|
@@ -1437,37 +1436,11 @@ function Ze(e, t) {
|
|
|
1437
1436
|
function ze(e) {
|
|
1438
1437
|
return e.target instanceof HTMLElement && e.target.tagName === "BUTTON";
|
|
1439
1438
|
}
|
|
1440
|
-
function
|
|
1439
|
+
function mn(e) {
|
|
1441
1440
|
return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1442
1441
|
}
|
|
1443
1442
|
function et(e) {
|
|
1444
|
-
return
|
|
1445
|
-
}
|
|
1446
|
-
function wn() {
|
|
1447
|
-
const e = _(!1);
|
|
1448
|
-
return D(document, "compositionstart", () => {
|
|
1449
|
-
e.value = !0;
|
|
1450
|
-
}), D(document, "compositionend", () => {
|
|
1451
|
-
e.value = !1;
|
|
1452
|
-
}), {
|
|
1453
|
-
isComposing: () => e.value
|
|
1454
|
-
};
|
|
1455
|
-
}
|
|
1456
|
-
function xn(e) {
|
|
1457
|
-
return {
|
|
1458
|
-
escapeKey: typeof e == "boolean" ? e : (e == null ? void 0 : e.escapeKey) ?? !1,
|
|
1459
|
-
outsidePress: typeof e == "boolean" ? e : (e == null ? void 0 : e.outsidePress) ?? !0
|
|
1460
|
-
};
|
|
1461
|
-
}
|
|
1462
|
-
function Ce(e) {
|
|
1463
|
-
return e instanceof Element && e instanceof HTMLElement;
|
|
1464
|
-
}
|
|
1465
|
-
function tt(e, t) {
|
|
1466
|
-
return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
|
|
1467
|
-
}
|
|
1468
|
-
function bn(e, t) {
|
|
1469
|
-
const n = t.offsetWidth - t.clientWidth, o = t.offsetHeight - t.clientHeight;
|
|
1470
|
-
return n > 0 && e.clientX > t.clientWidth || o > 0 && e.clientY > t.clientHeight;
|
|
1443
|
+
return mn(e);
|
|
1471
1444
|
}
|
|
1472
1445
|
function Fn(e, t = {}) {
|
|
1473
1446
|
const {
|
|
@@ -1482,9 +1455,9 @@ function Fn(e, t = {}) {
|
|
|
1482
1455
|
} = t, f = O(() => T(n)), u = e.refs.floatingEl, m = O(() => {
|
|
1483
1456
|
const g = e.refs.anchorEl.value;
|
|
1484
1457
|
return g ? g instanceof HTMLElement ? g : g.contextElement instanceof HTMLElement ? g.contextElement : null : null;
|
|
1485
|
-
}), { isComposing: h } =
|
|
1458
|
+
}), { isComposing: h } = yn(), { escapeKey: p, outsidePress: d } = gn(c);
|
|
1486
1459
|
let v = !1;
|
|
1487
|
-
const
|
|
1460
|
+
const w = (g) => {
|
|
1488
1461
|
!f.value || !e.open.value || !T(o) || g.key !== "Escape" || h() || e.setOpen(!1);
|
|
1489
1462
|
}, E = (g) => {
|
|
1490
1463
|
if (!f.value || !e.open.value)
|
|
@@ -1497,7 +1470,7 @@ function Fn(e, t = {}) {
|
|
|
1497
1470
|
if (!b || typeof b == "function" && !b(g))
|
|
1498
1471
|
return;
|
|
1499
1472
|
const R = g.target;
|
|
1500
|
-
R && (Ce(R) && u.value &&
|
|
1473
|
+
R && (Ce(R) && u.value && wn(g, R) || tt(g, m.value) || tt(g, u.value) || e.setOpen(!1));
|
|
1501
1474
|
}, x = () => {
|
|
1502
1475
|
f.value && e.open.value && T(r) && e.setOpen(!1);
|
|
1503
1476
|
};
|
|
@@ -1514,7 +1487,7 @@ function Fn(e, t = {}) {
|
|
|
1514
1487
|
for (const L of R)
|
|
1515
1488
|
L.removeEventListener("scroll", b);
|
|
1516
1489
|
});
|
|
1517
|
-
}), D(document, "keydown",
|
|
1490
|
+
}), D(document, "keydown", w, T(p)), D(document, s, E, T(d)), D(m, l, x), D(
|
|
1518
1491
|
u,
|
|
1519
1492
|
"mousedown",
|
|
1520
1493
|
() => {
|
|
@@ -1530,14 +1503,40 @@ function Fn(e, t = {}) {
|
|
|
1530
1503
|
{ capture: !0 }
|
|
1531
1504
|
);
|
|
1532
1505
|
}
|
|
1506
|
+
function gn(e) {
|
|
1507
|
+
return {
|
|
1508
|
+
escapeKey: typeof e == "boolean" ? e : (e == null ? void 0 : e.escapeKey) ?? !1,
|
|
1509
|
+
outsidePress: typeof e == "boolean" ? e : (e == null ? void 0 : e.outsidePress) ?? !0
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
function Ce(e) {
|
|
1513
|
+
return e instanceof Element && e instanceof HTMLElement;
|
|
1514
|
+
}
|
|
1515
|
+
function tt(e, t) {
|
|
1516
|
+
return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
|
|
1517
|
+
}
|
|
1518
|
+
function wn(e, t) {
|
|
1519
|
+
const n = t.offsetWidth - t.clientWidth, o = t.offsetHeight - t.clientHeight;
|
|
1520
|
+
return n > 0 && e.clientX > t.clientWidth || o > 0 && e.clientY > t.clientHeight;
|
|
1521
|
+
}
|
|
1522
|
+
function yn() {
|
|
1523
|
+
const e = j(!1);
|
|
1524
|
+
return D(document, "compositionstart", () => {
|
|
1525
|
+
e.value = !0;
|
|
1526
|
+
}), D(document, "compositionend", () => {
|
|
1527
|
+
e.value = !1;
|
|
1528
|
+
}), {
|
|
1529
|
+
isComposing: () => e.value
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1533
1532
|
function Bn(e, t, n = {}) {
|
|
1534
1533
|
const { open: o, refs: i } = t;
|
|
1535
1534
|
let s;
|
|
1536
|
-
const r =
|
|
1535
|
+
const r = j({ x: null, y: null }), l = O(() => T(n.axis ?? "both")), a = O(() => T(n.enabled ?? !0)), c = O(() => T(n.x ?? null)), f = O(() => T(n.y ?? null)), u = (d, v) => {
|
|
1537
1536
|
r.value = {
|
|
1538
1537
|
x: d,
|
|
1539
1538
|
y: v
|
|
1540
|
-
}, o.value && (i.anchorEl.value =
|
|
1539
|
+
}, o.value && (i.anchorEl.value = xn(
|
|
1541
1540
|
e.value,
|
|
1542
1541
|
l.value,
|
|
1543
1542
|
r.value
|
|
@@ -1565,7 +1564,7 @@ function Bn(e, t, n = {}) {
|
|
|
1565
1564
|
updatePosition: u
|
|
1566
1565
|
};
|
|
1567
1566
|
}
|
|
1568
|
-
function
|
|
1567
|
+
function xn(e, t, n) {
|
|
1569
1568
|
let o = null, i = null;
|
|
1570
1569
|
const s = e;
|
|
1571
1570
|
return {
|
|
@@ -1602,10 +1601,14 @@ function $n(e) {
|
|
|
1602
1601
|
options: e,
|
|
1603
1602
|
fn(t) {
|
|
1604
1603
|
const n = T(e.element);
|
|
1605
|
-
return n == null ? {} :
|
|
1604
|
+
return n == null ? {} : nn({ element: n, padding: e.padding }).fn(t);
|
|
1606
1605
|
}
|
|
1607
1606
|
};
|
|
1608
1607
|
}
|
|
1608
|
+
let bn = 0;
|
|
1609
|
+
function En() {
|
|
1610
|
+
return `vfloat-id-${bn++}`;
|
|
1611
|
+
}
|
|
1609
1612
|
var se;
|
|
1610
1613
|
class ot {
|
|
1611
1614
|
constructor(t, n = null, o = {}, i = !1) {
|
|
@@ -1614,7 +1617,7 @@ class ot {
|
|
|
1614
1617
|
U(this, "parent");
|
|
1615
1618
|
U(this, "children");
|
|
1616
1619
|
de(this, se);
|
|
1617
|
-
this.id = o.id ??
|
|
1620
|
+
this.id = o.id ?? En(), this.data = t, this.parent = Me(n), this.children = Me([]), Le(this, se, i);
|
|
1618
1621
|
}
|
|
1619
1622
|
/**
|
|
1620
1623
|
* Adds an existing node instance to this node's children array.
|
|
@@ -1634,16 +1637,6 @@ class ot {
|
|
|
1634
1637
|
_removeChildInstance(t) {
|
|
1635
1638
|
return this.children.value.includes(t) ? (this.children.value = this.children.value.filter((n) => n.id !== t.id), t.parent.value = null, !0) : !1;
|
|
1636
1639
|
}
|
|
1637
|
-
/**
|
|
1638
|
-
* Updates the node's data.
|
|
1639
|
-
* If T is an object, performs a shallow merge using Object.assign.
|
|
1640
|
-
* If T is a primitive, replaces the value.
|
|
1641
|
-
* @param newData Partial data for objects, or the new value for primitives.
|
|
1642
|
-
*/
|
|
1643
|
-
updateData(t) {
|
|
1644
|
-
const n = this.data;
|
|
1645
|
-
typeof n == "object" && n !== null && typeof t == "object" && t !== null ? this.data = Object.assign({}, n, t) : this.data = t;
|
|
1646
|
-
}
|
|
1647
1640
|
/**
|
|
1648
1641
|
* Finds the first direct child matching the predicate.
|
|
1649
1642
|
* @param predicate Function to test each child node.
|
|
@@ -1887,8 +1880,8 @@ function Vn(e, t = {}) {
|
|
|
1887
1880
|
const m = [], h = /* @__PURE__ */ new Set(), p = (v) => {
|
|
1888
1881
|
v && !h.has(v.id) && (m.push(v), h.add(v.id));
|
|
1889
1882
|
}, d = (v) => {
|
|
1890
|
-
for (const
|
|
1891
|
-
p(
|
|
1883
|
+
for (const w of v)
|
|
1884
|
+
p(w);
|
|
1892
1885
|
};
|
|
1893
1886
|
if (c === "ancestors-only")
|
|
1894
1887
|
for (const v of u.getPath())
|
|
@@ -1916,12 +1909,12 @@ function Vn(e, t = {}) {
|
|
|
1916
1909
|
d(u.getPath()), d(n.traverse("dfs", u));
|
|
1917
1910
|
else if (c === "all-except-branch") {
|
|
1918
1911
|
const v = /* @__PURE__ */ new Set();
|
|
1919
|
-
for (const
|
|
1920
|
-
v.add(
|
|
1921
|
-
for (const
|
|
1922
|
-
v.add(
|
|
1923
|
-
for (const
|
|
1924
|
-
!v.has(
|
|
1912
|
+
for (const w of u.getPath())
|
|
1913
|
+
v.add(w.id);
|
|
1914
|
+
for (const w of n.traverse("dfs", u))
|
|
1915
|
+
v.add(w.id);
|
|
1916
|
+
for (const w of n.nodeMap.values())
|
|
1917
|
+
!v.has(w.id) === f && l(w);
|
|
1925
1918
|
return;
|
|
1926
1919
|
} else {
|
|
1927
1920
|
console.warn(`forEach: Unknown relationship "${c}".`);
|