v-float 0.2.0 → 0.3.1
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 +249 -109
- package/dist/composables/interactions/index.d.ts +2 -1
- package/dist/composables/interactions/index.d.ts.map +1 -1
- package/dist/composables/interactions/polygon.d.ts +38 -0
- package/dist/composables/interactions/polygon.d.ts.map +1 -0
- package/dist/composables/interactions/use-click.d.ts +78 -10
- package/dist/composables/interactions/use-click.d.ts.map +1 -1
- package/dist/composables/interactions/use-client-point.d.ts +1 -1
- package/dist/composables/interactions/use-client-point.d.ts.map +1 -1
- package/dist/composables/interactions/use-escape-key.d.ts +24 -0
- package/dist/composables/interactions/use-escape-key.d.ts.map +1 -0
- package/dist/composables/interactions/use-focus.d.ts +28 -3
- package/dist/composables/interactions/use-focus.d.ts.map +1 -1
- package/dist/composables/interactions/use-hover.d.ts +32 -18
- package/dist/composables/interactions/use-hover.d.ts.map +1 -1
- package/dist/composables/interactions/utils/browser-detection.d.ts +23 -0
- package/dist/composables/interactions/utils/browser-detection.d.ts.map +1 -0
- package/dist/composables/interactions/utils/element-detection.d.ts +53 -0
- package/dist/composables/interactions/utils/element-detection.d.ts.map +1 -0
- package/dist/composables/interactions/utils/event-utils.d.ts +30 -0
- package/dist/composables/interactions/utils/event-utils.d.ts.map +1 -0
- package/dist/composables/interactions/utils/index.d.ts +11 -0
- package/dist/composables/interactions/utils/index.d.ts.map +1 -0
- package/dist/composables/interactions/utils/tree-context.d.ts +32 -0
- package/dist/composables/interactions/utils/tree-context.d.ts.map +1 -0
- package/dist/composables/middlewares/index.d.ts +0 -1
- package/dist/composables/middlewares/index.d.ts.map +1 -1
- package/dist/composables/use-arrow.d.ts +10 -3
- package/dist/composables/use-arrow.d.ts.map +1 -1
- package/dist/composables/use-floating-tree.d.ts +13 -13
- package/dist/composables/use-floating-tree.d.ts.map +1 -1
- package/dist/composables/use-floating.d.ts +12 -20
- package/dist/composables/use-floating.d.ts.map +1 -1
- package/dist/composables/use-tree.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/v-float.es.js +1457 -1061
- package/dist/v-float.umd.js +1 -1
- package/package.json +34 -21
- package/dist/composables/interactions/use-dismiss.d.ts +0 -68
- package/dist/composables/interactions/use-dismiss.d.ts.map +0 -1
package/dist/v-float.es.js
CHANGED
|
@@ -1,82 +1,83 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Qt = Object.defineProperty;
|
|
2
|
+
var mt = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
5
|
+
var Zt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var ce = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n), $e = (e, t, n) => t.has(e) || mt("Cannot " + n);
|
|
7
|
+
var Xe = (e, t, n) => ($e(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ne = (e, t, n) => t.has(e) ? mt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ye = (e, t, n, o) => ($e(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n), je = (e, t, n) => ($e(e, t, "access private method"), n);
|
|
8
|
+
import { toValue as S, ref as U, computed as I, shallowRef as qe, watch as pe, onWatcherCleanup as ue, onScopeDispose as ge, watchPostEffect as Te, getCurrentScope as en, unref as tn, onMounted as nn, watchEffect as pt, readonly as on, shallowReactive as rn } from "vue";
|
|
9
|
+
const sn = ["top", "right", "bottom", "left"], we = Math.min, fe = Math.max, Re = Math.round, De = Math.floor, K = (e) => ({
|
|
10
10
|
x: e,
|
|
11
11
|
y: e
|
|
12
|
-
}),
|
|
12
|
+
}), ln = {
|
|
13
13
|
left: "right",
|
|
14
14
|
right: "left",
|
|
15
15
|
bottom: "top",
|
|
16
16
|
top: "bottom"
|
|
17
|
-
},
|
|
17
|
+
}, an = {
|
|
18
18
|
start: "end",
|
|
19
19
|
end: "start"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
return
|
|
21
|
+
function Ke(e, t, n) {
|
|
22
|
+
return fe(e, we(t, n));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function be(e, t) {
|
|
25
25
|
return typeof e == "function" ? e(t) : e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function de(e) {
|
|
28
28
|
return e.split("-")[0];
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Me(e) {
|
|
31
31
|
return e.split("-")[1];
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function It(e) {
|
|
34
34
|
return e === "x" ? "y" : "x";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function et(e) {
|
|
37
37
|
return e === "y" ? "height" : "width";
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const cn = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
40
|
+
function ne(e) {
|
|
41
|
+
return cn.has(de(e)) ? "y" : "x";
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
43
|
+
function tt(e) {
|
|
44
|
+
return It(ne(e));
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function un(e, t, n) {
|
|
46
47
|
n === void 0 && (n = !1);
|
|
47
|
-
const o =
|
|
48
|
-
let
|
|
49
|
-
return t.reference[
|
|
48
|
+
const o = Me(e), i = tt(e), r = et(i);
|
|
49
|
+
let l = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
50
|
+
return t.reference[r] > t.floating[r] && (l = ke(l)), [l, ke(l)];
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
-
const t =
|
|
53
|
-
return [
|
|
52
|
+
function fn(e) {
|
|
53
|
+
const t = ke(e);
|
|
54
|
+
return [Ge(e), t, Ge(t)];
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
return e.replace(/start|end/g, (t) =>
|
|
56
|
+
function Ge(e) {
|
|
57
|
+
return e.replace(/start|end/g, (t) => an[t]);
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
const vt = ["left", "right"], gt = ["right", "left"], dn = ["top", "bottom"], hn = ["bottom", "top"];
|
|
60
|
+
function mn(e, t, n) {
|
|
60
61
|
switch (e) {
|
|
61
62
|
case "top":
|
|
62
63
|
case "bottom":
|
|
63
|
-
return n ? t ?
|
|
64
|
+
return n ? t ? gt : vt : t ? vt : gt;
|
|
64
65
|
case "left":
|
|
65
66
|
case "right":
|
|
66
|
-
return t ?
|
|
67
|
+
return t ? dn : hn;
|
|
67
68
|
default:
|
|
68
69
|
return [];
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
const i =
|
|
73
|
-
let
|
|
74
|
-
return i && (
|
|
72
|
+
function pn(e, t, n, o) {
|
|
73
|
+
const i = Me(e);
|
|
74
|
+
let r = mn(de(e), n === "start", o);
|
|
75
|
+
return i && (r = r.map((l) => l + "-" + i), t && (r = r.concat(r.map(Ge)))), r;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
77
|
+
function ke(e) {
|
|
78
|
+
return e.replace(/left|right|bottom|top/g, (t) => ln[t]);
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function vn(e) {
|
|
80
81
|
return {
|
|
81
82
|
top: 0,
|
|
82
83
|
right: 0,
|
|
@@ -85,15 +86,15 @@ function Dt(e) {
|
|
|
85
86
|
...e
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return typeof e != "number" ?
|
|
89
|
+
function Wt(e) {
|
|
90
|
+
return typeof e != "number" ? vn(e) : {
|
|
90
91
|
top: e,
|
|
91
92
|
right: e,
|
|
92
93
|
bottom: e,
|
|
93
94
|
left: e
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function Fe(e) {
|
|
97
98
|
const {
|
|
98
99
|
x: t,
|
|
99
100
|
y: n,
|
|
@@ -111,161 +112,161 @@ function ge(e) {
|
|
|
111
112
|
y: n
|
|
112
113
|
};
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function wt(e, t, n) {
|
|
115
116
|
let {
|
|
116
117
|
reference: o,
|
|
117
118
|
floating: i
|
|
118
119
|
} = e;
|
|
119
|
-
const
|
|
120
|
-
let
|
|
121
|
-
switch (
|
|
120
|
+
const r = ne(t), l = tt(t), a = et(l), u = de(t), c = r === "y", h = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
|
|
121
|
+
let d;
|
|
122
|
+
switch (u) {
|
|
122
123
|
case "top":
|
|
123
|
-
|
|
124
|
-
x:
|
|
124
|
+
d = {
|
|
125
|
+
x: h,
|
|
125
126
|
y: o.y - i.height
|
|
126
127
|
};
|
|
127
128
|
break;
|
|
128
129
|
case "bottom":
|
|
129
|
-
|
|
130
|
-
x:
|
|
130
|
+
d = {
|
|
131
|
+
x: h,
|
|
131
132
|
y: o.y + o.height
|
|
132
133
|
};
|
|
133
134
|
break;
|
|
134
135
|
case "right":
|
|
135
|
-
|
|
136
|
+
d = {
|
|
136
137
|
x: o.x + o.width,
|
|
137
|
-
y:
|
|
138
|
+
y: f
|
|
138
139
|
};
|
|
139
140
|
break;
|
|
140
141
|
case "left":
|
|
141
|
-
|
|
142
|
+
d = {
|
|
142
143
|
x: o.x - i.width,
|
|
143
|
-
y:
|
|
144
|
+
y: f
|
|
144
145
|
};
|
|
145
146
|
break;
|
|
146
147
|
default:
|
|
147
|
-
|
|
148
|
+
d = {
|
|
148
149
|
x: o.x,
|
|
149
150
|
y: o.y
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
|
-
switch (
|
|
153
|
+
switch (Me(t)) {
|
|
153
154
|
case "start":
|
|
154
|
-
|
|
155
|
+
d[l] -= p * (n && c ? -1 : 1);
|
|
155
156
|
break;
|
|
156
157
|
case "end":
|
|
157
|
-
|
|
158
|
+
d[l] += p * (n && c ? -1 : 1);
|
|
158
159
|
break;
|
|
159
160
|
}
|
|
160
|
-
return
|
|
161
|
+
return d;
|
|
161
162
|
}
|
|
162
|
-
const
|
|
163
|
+
const gn = async (e, t, n) => {
|
|
163
164
|
const {
|
|
164
165
|
placement: o = "bottom",
|
|
165
166
|
strategy: i = "absolute",
|
|
166
|
-
middleware:
|
|
167
|
-
platform:
|
|
168
|
-
} = n,
|
|
169
|
-
let c = await
|
|
167
|
+
middleware: r = [],
|
|
168
|
+
platform: l
|
|
169
|
+
} = n, a = r.filter(Boolean), u = await (l.isRTL == null ? void 0 : l.isRTL(t));
|
|
170
|
+
let c = await l.getElementRects({
|
|
170
171
|
reference: e,
|
|
171
172
|
floating: t,
|
|
172
173
|
strategy: i
|
|
173
174
|
}), {
|
|
174
|
-
x:
|
|
175
|
-
y:
|
|
176
|
-
} =
|
|
177
|
-
for (let
|
|
175
|
+
x: h,
|
|
176
|
+
y: f
|
|
177
|
+
} = wt(c, o, u), p = o, d = {}, g = 0;
|
|
178
|
+
for (let m = 0; m < a.length; m++) {
|
|
178
179
|
const {
|
|
179
|
-
name:
|
|
180
|
+
name: b,
|
|
180
181
|
fn: w
|
|
181
|
-
} =
|
|
182
|
-
x:
|
|
183
|
-
y:
|
|
184
|
-
data:
|
|
185
|
-
reset:
|
|
182
|
+
} = a[m], {
|
|
183
|
+
x: y,
|
|
184
|
+
y: C,
|
|
185
|
+
data: P,
|
|
186
|
+
reset: E
|
|
186
187
|
} = await w({
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
188
|
+
x: h,
|
|
189
|
+
y: f,
|
|
189
190
|
initialPlacement: o,
|
|
190
|
-
placement:
|
|
191
|
+
placement: p,
|
|
191
192
|
strategy: i,
|
|
192
|
-
middlewareData:
|
|
193
|
+
middlewareData: d,
|
|
193
194
|
rects: c,
|
|
194
|
-
platform:
|
|
195
|
+
platform: l,
|
|
195
196
|
elements: {
|
|
196
197
|
reference: e,
|
|
197
198
|
floating: t
|
|
198
199
|
}
|
|
199
200
|
});
|
|
200
|
-
|
|
201
|
-
...
|
|
202
|
-
[
|
|
203
|
-
...
|
|
204
|
-
...
|
|
201
|
+
h = y ?? h, f = C ?? f, d = {
|
|
202
|
+
...d,
|
|
203
|
+
[b]: {
|
|
204
|
+
...d[b],
|
|
205
|
+
...P
|
|
205
206
|
}
|
|
206
|
-
},
|
|
207
|
+
}, E && g <= 50 && (g++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (c = E.rects === !0 ? await l.getElementRects({
|
|
207
208
|
reference: e,
|
|
208
209
|
floating: t,
|
|
209
210
|
strategy: i
|
|
210
|
-
}) :
|
|
211
|
-
x:
|
|
212
|
-
y:
|
|
213
|
-
} =
|
|
211
|
+
}) : E.rects), {
|
|
212
|
+
x: h,
|
|
213
|
+
y: f
|
|
214
|
+
} = wt(c, p, u)), m = -1);
|
|
214
215
|
}
|
|
215
216
|
return {
|
|
216
|
-
x:
|
|
217
|
-
y:
|
|
218
|
-
placement:
|
|
217
|
+
x: h,
|
|
218
|
+
y: f,
|
|
219
|
+
placement: p,
|
|
219
220
|
strategy: i,
|
|
220
|
-
middlewareData:
|
|
221
|
+
middlewareData: d
|
|
221
222
|
};
|
|
222
223
|
};
|
|
223
|
-
async function
|
|
224
|
+
async function He(e, t) {
|
|
224
225
|
var n;
|
|
225
226
|
t === void 0 && (t = {});
|
|
226
227
|
const {
|
|
227
228
|
x: o,
|
|
228
229
|
y: i,
|
|
229
|
-
platform:
|
|
230
|
-
rects:
|
|
231
|
-
elements:
|
|
232
|
-
strategy:
|
|
230
|
+
platform: r,
|
|
231
|
+
rects: l,
|
|
232
|
+
elements: a,
|
|
233
|
+
strategy: u
|
|
233
234
|
} = e, {
|
|
234
235
|
boundary: c = "clippingAncestors",
|
|
235
|
-
rootBoundary:
|
|
236
|
-
elementContext:
|
|
237
|
-
altBoundary:
|
|
238
|
-
padding:
|
|
239
|
-
} =
|
|
240
|
-
element: (n = await (
|
|
236
|
+
rootBoundary: h = "viewport",
|
|
237
|
+
elementContext: f = "floating",
|
|
238
|
+
altBoundary: p = !1,
|
|
239
|
+
padding: d = 0
|
|
240
|
+
} = be(t, e), g = Wt(d), b = a[p ? f === "floating" ? "reference" : "floating" : f], w = Fe(await r.getClippingRect({
|
|
241
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(b))) == null || n ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
241
242
|
boundary: c,
|
|
242
|
-
rootBoundary:
|
|
243
|
-
strategy:
|
|
244
|
-
})),
|
|
243
|
+
rootBoundary: h,
|
|
244
|
+
strategy: u
|
|
245
|
+
})), y = f === "floating" ? {
|
|
245
246
|
x: o,
|
|
246
247
|
y: i,
|
|
247
|
-
width:
|
|
248
|
-
height:
|
|
249
|
-
} :
|
|
248
|
+
width: l.floating.width,
|
|
249
|
+
height: l.floating.height
|
|
250
|
+
} : l.reference, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), P = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
|
|
250
251
|
x: 1,
|
|
251
252
|
y: 1
|
|
252
253
|
} : {
|
|
253
254
|
x: 1,
|
|
254
255
|
y: 1
|
|
255
|
-
},
|
|
256
|
-
elements:
|
|
257
|
-
rect:
|
|
258
|
-
offsetParent:
|
|
259
|
-
strategy:
|
|
260
|
-
}) :
|
|
256
|
+
}, E = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
257
|
+
elements: a,
|
|
258
|
+
rect: y,
|
|
259
|
+
offsetParent: C,
|
|
260
|
+
strategy: u
|
|
261
|
+
}) : y);
|
|
261
262
|
return {
|
|
262
|
-
top: (w.top -
|
|
263
|
-
bottom: (
|
|
264
|
-
left: (w.left -
|
|
265
|
-
right: (
|
|
263
|
+
top: (w.top - E.top + g.top) / P.y,
|
|
264
|
+
bottom: (E.bottom - w.bottom + g.bottom) / P.y,
|
|
265
|
+
left: (w.left - E.left + g.left) / P.x,
|
|
266
|
+
right: (E.right - w.right + g.right) / P.x
|
|
266
267
|
};
|
|
267
268
|
}
|
|
268
|
-
const
|
|
269
|
+
const wn = (e) => ({
|
|
269
270
|
name: "arrow",
|
|
270
271
|
options: e,
|
|
271
272
|
async fn(t) {
|
|
@@ -273,36 +274,36 @@ const St = (e) => ({
|
|
|
273
274
|
x: n,
|
|
274
275
|
y: o,
|
|
275
276
|
placement: i,
|
|
276
|
-
rects:
|
|
277
|
-
platform:
|
|
278
|
-
elements:
|
|
279
|
-
middlewareData:
|
|
277
|
+
rects: r,
|
|
278
|
+
platform: l,
|
|
279
|
+
elements: a,
|
|
280
|
+
middlewareData: u
|
|
280
281
|
} = t, {
|
|
281
282
|
element: c,
|
|
282
|
-
padding:
|
|
283
|
-
} =
|
|
283
|
+
padding: h = 0
|
|
284
|
+
} = be(e, t) || {};
|
|
284
285
|
if (c == null)
|
|
285
286
|
return {};
|
|
286
|
-
const
|
|
287
|
+
const f = Wt(h), p = {
|
|
287
288
|
x: n,
|
|
288
289
|
y: o
|
|
289
|
-
},
|
|
290
|
-
let
|
|
291
|
-
(!
|
|
292
|
-
const
|
|
290
|
+
}, d = tt(i), g = et(d), m = await l.getDimensions(c), b = d === "y", w = b ? "top" : "left", y = b ? "bottom" : "right", C = b ? "clientHeight" : "clientWidth", P = r.reference[g] + r.reference[d] - p[d] - r.floating[g], E = p[d] - r.reference[d], T = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(c));
|
|
291
|
+
let A = T ? T[C] : 0;
|
|
292
|
+
(!A || !await (l.isElement == null ? void 0 : l.isElement(T))) && (A = a.floating[C] || r.floating[g]);
|
|
293
|
+
const D = P / 2 - E / 2, R = A / 2 - m[g] / 2 - 1, N = we(f[w], R), M = we(f[y], R), k = N, V = A - m[g] - M, F = A / 2 - m[g] / 2 + D, Y = Ke(k, F, V), x = !u.arrow && Me(i) != null && F !== Y && r.reference[g] / 2 - (F < k ? N : M) - m[g] / 2 < 0, s = x ? F < k ? F - k : F - V : 0;
|
|
293
294
|
return {
|
|
294
|
-
[
|
|
295
|
+
[d]: p[d] + s,
|
|
295
296
|
data: {
|
|
296
|
-
[
|
|
297
|
-
centerOffset:
|
|
298
|
-
...
|
|
299
|
-
alignmentOffset:
|
|
297
|
+
[d]: Y,
|
|
298
|
+
centerOffset: F - Y - s,
|
|
299
|
+
...x && {
|
|
300
|
+
alignmentOffset: s
|
|
300
301
|
}
|
|
301
302
|
},
|
|
302
|
-
reset:
|
|
303
|
+
reset: x
|
|
303
304
|
};
|
|
304
305
|
}
|
|
305
|
-
}),
|
|
306
|
+
}), yn = function(e) {
|
|
306
307
|
return e === void 0 && (e = {}), {
|
|
307
308
|
name: "flip",
|
|
308
309
|
options: e,
|
|
@@ -310,71 +311,73 @@ const St = (e) => ({
|
|
|
310
311
|
var n, o;
|
|
311
312
|
const {
|
|
312
313
|
placement: i,
|
|
313
|
-
middlewareData:
|
|
314
|
-
rects:
|
|
315
|
-
initialPlacement:
|
|
316
|
-
platform:
|
|
314
|
+
middlewareData: r,
|
|
315
|
+
rects: l,
|
|
316
|
+
initialPlacement: a,
|
|
317
|
+
platform: u,
|
|
317
318
|
elements: c
|
|
318
319
|
} = t, {
|
|
319
|
-
mainAxis:
|
|
320
|
-
crossAxis:
|
|
321
|
-
fallbackPlacements:
|
|
322
|
-
fallbackStrategy:
|
|
323
|
-
fallbackAxisSideDirection:
|
|
324
|
-
flipAlignment:
|
|
325
|
-
...
|
|
326
|
-
} =
|
|
327
|
-
if ((n =
|
|
320
|
+
mainAxis: h = !0,
|
|
321
|
+
crossAxis: f = !0,
|
|
322
|
+
fallbackPlacements: p,
|
|
323
|
+
fallbackStrategy: d = "bestFit",
|
|
324
|
+
fallbackAxisSideDirection: g = "none",
|
|
325
|
+
flipAlignment: m = !0,
|
|
326
|
+
...b
|
|
327
|
+
} = be(e, t);
|
|
328
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
328
329
|
return {};
|
|
329
|
-
const w =
|
|
330
|
-
!
|
|
331
|
-
const
|
|
332
|
-
let
|
|
333
|
-
if (
|
|
334
|
-
const
|
|
335
|
-
|
|
330
|
+
const w = de(i), y = ne(a), C = de(a) === a, P = await (u.isRTL == null ? void 0 : u.isRTL(c.floating)), E = p || (C || !m ? [ke(a)] : fn(a)), T = g !== "none";
|
|
331
|
+
!p && T && E.push(...pn(a, m, g, P));
|
|
332
|
+
const A = [a, ...E], D = await He(t, b), R = [];
|
|
333
|
+
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
334
|
+
if (h && R.push(D[w]), f) {
|
|
335
|
+
const F = un(i, l, P);
|
|
336
|
+
R.push(D[F[0]], D[F[1]]);
|
|
336
337
|
}
|
|
337
|
-
if (
|
|
338
|
+
if (N = [...N, {
|
|
338
339
|
placement: i,
|
|
339
|
-
overflows:
|
|
340
|
-
}], !
|
|
341
|
-
var
|
|
342
|
-
const
|
|
343
|
-
if (Y)
|
|
340
|
+
overflows: R
|
|
341
|
+
}], !R.every((F) => F <= 0)) {
|
|
342
|
+
var M, k;
|
|
343
|
+
const F = (((M = r.flip) == null ? void 0 : M.index) || 0) + 1, Y = A[F];
|
|
344
|
+
if (Y && (!(f === "alignment" ? y !== ne(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
345
|
+
// overflows the main axis.
|
|
346
|
+
N.every((v) => ne(v.placement) === y ? v.overflows[0] > 0 : !0)))
|
|
344
347
|
return {
|
|
345
348
|
data: {
|
|
346
|
-
index:
|
|
347
|
-
overflows:
|
|
349
|
+
index: F,
|
|
350
|
+
overflows: N
|
|
348
351
|
},
|
|
349
352
|
reset: {
|
|
350
353
|
placement: Y
|
|
351
354
|
}
|
|
352
355
|
};
|
|
353
|
-
let
|
|
354
|
-
if (!
|
|
355
|
-
switch (
|
|
356
|
+
let x = (k = N.filter((s) => s.overflows[0] <= 0).sort((s, v) => s.overflows[1] - v.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
357
|
+
if (!x)
|
|
358
|
+
switch (d) {
|
|
356
359
|
case "bestFit": {
|
|
357
|
-
var
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
360
|
-
const
|
|
361
|
-
return
|
|
360
|
+
var V;
|
|
361
|
+
const s = (V = N.filter((v) => {
|
|
362
|
+
if (T) {
|
|
363
|
+
const H = ne(v.placement);
|
|
364
|
+
return H === y || // Create a bias to the `y` side axis due to horizontal
|
|
362
365
|
// reading directions favoring greater width.
|
|
363
|
-
|
|
366
|
+
H === "y";
|
|
364
367
|
}
|
|
365
368
|
return !0;
|
|
366
|
-
}).map((
|
|
367
|
-
|
|
369
|
+
}).map((v) => [v.placement, v.overflows.filter((H) => H > 0).reduce((H, X) => H + X, 0)]).sort((v, H) => v[1] - H[1])[0]) == null ? void 0 : V[0];
|
|
370
|
+
s && (x = s);
|
|
368
371
|
break;
|
|
369
372
|
}
|
|
370
373
|
case "initialPlacement":
|
|
371
|
-
|
|
374
|
+
x = a;
|
|
372
375
|
break;
|
|
373
376
|
}
|
|
374
|
-
if (i !==
|
|
377
|
+
if (i !== x)
|
|
375
378
|
return {
|
|
376
379
|
reset: {
|
|
377
|
-
placement:
|
|
380
|
+
placement: x
|
|
378
381
|
}
|
|
379
382
|
};
|
|
380
383
|
}
|
|
@@ -382,7 +385,7 @@ const St = (e) => ({
|
|
|
382
385
|
}
|
|
383
386
|
};
|
|
384
387
|
};
|
|
385
|
-
function
|
|
388
|
+
function yt(e, t) {
|
|
386
389
|
return {
|
|
387
390
|
top: e.top - t.height,
|
|
388
391
|
right: e.right - t.width,
|
|
@@ -390,10 +393,10 @@ function Xe(e, t) {
|
|
|
390
393
|
left: e.left - t.width
|
|
391
394
|
};
|
|
392
395
|
}
|
|
393
|
-
function
|
|
394
|
-
return
|
|
396
|
+
function bt(e) {
|
|
397
|
+
return sn.some((t) => e[t] >= 0);
|
|
395
398
|
}
|
|
396
|
-
const
|
|
399
|
+
const bn = function(e) {
|
|
397
400
|
return e === void 0 && (e = {}), {
|
|
398
401
|
name: "hide",
|
|
399
402
|
options: e,
|
|
@@ -403,29 +406,29 @@ const Ht = function(e) {
|
|
|
403
406
|
} = t, {
|
|
404
407
|
strategy: o = "referenceHidden",
|
|
405
408
|
...i
|
|
406
|
-
} =
|
|
409
|
+
} = be(e, t);
|
|
407
410
|
switch (o) {
|
|
408
411
|
case "referenceHidden": {
|
|
409
|
-
const
|
|
412
|
+
const r = await He(t, {
|
|
410
413
|
...i,
|
|
411
414
|
elementContext: "reference"
|
|
412
|
-
}),
|
|
415
|
+
}), l = yt(r, n.reference);
|
|
413
416
|
return {
|
|
414
417
|
data: {
|
|
415
|
-
referenceHiddenOffsets:
|
|
416
|
-
referenceHidden:
|
|
418
|
+
referenceHiddenOffsets: l,
|
|
419
|
+
referenceHidden: bt(l)
|
|
417
420
|
}
|
|
418
421
|
};
|
|
419
422
|
}
|
|
420
423
|
case "escaped": {
|
|
421
|
-
const
|
|
424
|
+
const r = await He(t, {
|
|
422
425
|
...i,
|
|
423
426
|
altBoundary: !0
|
|
424
|
-
}),
|
|
427
|
+
}), l = yt(r, n.floating);
|
|
425
428
|
return {
|
|
426
429
|
data: {
|
|
427
|
-
escapedOffsets:
|
|
428
|
-
escaped:
|
|
430
|
+
escapedOffsets: l,
|
|
431
|
+
escaped: bt(l)
|
|
429
432
|
}
|
|
430
433
|
};
|
|
431
434
|
}
|
|
@@ -434,35 +437,35 @@ const Ht = function(e) {
|
|
|
434
437
|
}
|
|
435
438
|
}
|
|
436
439
|
};
|
|
437
|
-
};
|
|
438
|
-
async function
|
|
440
|
+
}, xn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
441
|
+
async function En(e, t) {
|
|
439
442
|
const {
|
|
440
443
|
placement: n,
|
|
441
444
|
platform: o,
|
|
442
445
|
elements: i
|
|
443
|
-
} = e,
|
|
446
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), l = de(n), a = Me(n), u = ne(n) === "y", c = xn.has(l) ? -1 : 1, h = r && u ? -1 : 1, f = be(t, e);
|
|
444
447
|
let {
|
|
445
|
-
mainAxis:
|
|
446
|
-
crossAxis:
|
|
447
|
-
alignmentAxis:
|
|
448
|
-
} = typeof
|
|
449
|
-
mainAxis:
|
|
448
|
+
mainAxis: p,
|
|
449
|
+
crossAxis: d,
|
|
450
|
+
alignmentAxis: g
|
|
451
|
+
} = typeof f == "number" ? {
|
|
452
|
+
mainAxis: f,
|
|
450
453
|
crossAxis: 0,
|
|
451
454
|
alignmentAxis: null
|
|
452
455
|
} : {
|
|
453
|
-
mainAxis:
|
|
454
|
-
crossAxis:
|
|
455
|
-
alignmentAxis:
|
|
456
|
+
mainAxis: f.mainAxis || 0,
|
|
457
|
+
crossAxis: f.crossAxis || 0,
|
|
458
|
+
alignmentAxis: f.alignmentAxis
|
|
456
459
|
};
|
|
457
|
-
return
|
|
458
|
-
x:
|
|
459
|
-
y:
|
|
460
|
+
return a && typeof g == "number" && (d = a === "end" ? g * -1 : g), u ? {
|
|
461
|
+
x: d * h,
|
|
462
|
+
y: p * c
|
|
460
463
|
} : {
|
|
461
|
-
x:
|
|
462
|
-
y:
|
|
464
|
+
x: p * c,
|
|
465
|
+
y: d * h
|
|
463
466
|
};
|
|
464
467
|
}
|
|
465
|
-
const
|
|
468
|
+
const Tn = function(e) {
|
|
466
469
|
return e === void 0 && (e = 0), {
|
|
467
470
|
name: "offset",
|
|
468
471
|
options: e,
|
|
@@ -470,21 +473,21 @@ const Bt = function(e) {
|
|
|
470
473
|
var n, o;
|
|
471
474
|
const {
|
|
472
475
|
x: i,
|
|
473
|
-
y:
|
|
474
|
-
placement:
|
|
475
|
-
middlewareData:
|
|
476
|
-
} = t,
|
|
477
|
-
return
|
|
478
|
-
x: i +
|
|
479
|
-
y:
|
|
476
|
+
y: r,
|
|
477
|
+
placement: l,
|
|
478
|
+
middlewareData: a
|
|
479
|
+
} = t, u = await En(t, e);
|
|
480
|
+
return l === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
481
|
+
x: i + u.x,
|
|
482
|
+
y: r + u.y,
|
|
480
483
|
data: {
|
|
481
|
-
...
|
|
482
|
-
placement:
|
|
484
|
+
...u,
|
|
485
|
+
placement: l
|
|
483
486
|
}
|
|
484
487
|
};
|
|
485
488
|
}
|
|
486
489
|
};
|
|
487
|
-
},
|
|
490
|
+
}, Cn = function(e) {
|
|
488
491
|
return e === void 0 && (e = {}), {
|
|
489
492
|
name: "shift",
|
|
490
493
|
options: e,
|
|
@@ -494,93 +497,96 @@ const Bt = function(e) {
|
|
|
494
497
|
y: o,
|
|
495
498
|
placement: i
|
|
496
499
|
} = t, {
|
|
497
|
-
mainAxis:
|
|
498
|
-
crossAxis:
|
|
499
|
-
limiter:
|
|
500
|
-
fn: (
|
|
500
|
+
mainAxis: r = !0,
|
|
501
|
+
crossAxis: l = !1,
|
|
502
|
+
limiter: a = {
|
|
503
|
+
fn: (b) => {
|
|
501
504
|
let {
|
|
502
505
|
x: w,
|
|
503
|
-
y
|
|
504
|
-
} =
|
|
506
|
+
y
|
|
507
|
+
} = b;
|
|
505
508
|
return {
|
|
506
509
|
x: w,
|
|
507
|
-
y
|
|
510
|
+
y
|
|
508
511
|
};
|
|
509
512
|
}
|
|
510
513
|
},
|
|
511
|
-
...
|
|
512
|
-
} =
|
|
514
|
+
...u
|
|
515
|
+
} = be(e, t), c = {
|
|
513
516
|
x: n,
|
|
514
517
|
y: o
|
|
515
|
-
},
|
|
516
|
-
let
|
|
517
|
-
if (s) {
|
|
518
|
-
const v = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", E = h + f[v], x = h - f[w];
|
|
519
|
-
h = De(E, h, x);
|
|
520
|
-
}
|
|
518
|
+
}, h = await He(t, u), f = ne(de(i)), p = It(f);
|
|
519
|
+
let d = c[p], g = c[f];
|
|
521
520
|
if (r) {
|
|
522
|
-
const
|
|
523
|
-
|
|
521
|
+
const b = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", y = d + h[b], C = d - h[w];
|
|
522
|
+
d = Ke(y, d, C);
|
|
523
|
+
}
|
|
524
|
+
if (l) {
|
|
525
|
+
const b = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", y = g + h[b], C = g - h[w];
|
|
526
|
+
g = Ke(y, g, C);
|
|
524
527
|
}
|
|
525
|
-
const
|
|
528
|
+
const m = a.fn({
|
|
526
529
|
...t,
|
|
527
|
-
[
|
|
528
|
-
[
|
|
530
|
+
[p]: d,
|
|
531
|
+
[f]: g
|
|
529
532
|
});
|
|
530
533
|
return {
|
|
531
|
-
...
|
|
534
|
+
...m,
|
|
532
535
|
data: {
|
|
533
|
-
x:
|
|
534
|
-
y:
|
|
536
|
+
x: m.x - n,
|
|
537
|
+
y: m.y - o,
|
|
535
538
|
enabled: {
|
|
536
|
-
[
|
|
537
|
-
[
|
|
539
|
+
[p]: r,
|
|
540
|
+
[f]: l
|
|
538
541
|
}
|
|
539
542
|
}
|
|
540
543
|
};
|
|
541
544
|
}
|
|
542
545
|
};
|
|
543
546
|
};
|
|
544
|
-
function
|
|
547
|
+
function Be() {
|
|
545
548
|
return typeof window < "u";
|
|
546
549
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
550
|
+
function xe(e) {
|
|
551
|
+
return Vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
549
552
|
}
|
|
550
|
-
function
|
|
553
|
+
function j(e) {
|
|
551
554
|
var t;
|
|
552
555
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
553
556
|
}
|
|
554
|
-
function
|
|
557
|
+
function Q(e) {
|
|
555
558
|
var t;
|
|
556
|
-
return (t = (
|
|
559
|
+
return (t = (Vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
557
560
|
}
|
|
558
|
-
function
|
|
559
|
-
return
|
|
561
|
+
function Vt(e) {
|
|
562
|
+
return Be() ? e instanceof Node || e instanceof j(e).Node : !1;
|
|
560
563
|
}
|
|
561
|
-
function
|
|
562
|
-
return
|
|
564
|
+
function _(e) {
|
|
565
|
+
return Be() ? e instanceof Element || e instanceof j(e).Element : !1;
|
|
563
566
|
}
|
|
564
|
-
function
|
|
565
|
-
return
|
|
567
|
+
function G(e) {
|
|
568
|
+
return Be() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
|
|
566
569
|
}
|
|
567
|
-
function
|
|
568
|
-
return !
|
|
570
|
+
function xt(e) {
|
|
571
|
+
return !Be() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof j(e).ShadowRoot;
|
|
569
572
|
}
|
|
570
|
-
|
|
573
|
+
const Ln = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
574
|
+
function Se(e) {
|
|
571
575
|
const {
|
|
572
576
|
overflow: t,
|
|
573
577
|
overflowX: n,
|
|
574
578
|
overflowY: o,
|
|
575
579
|
display: i
|
|
576
|
-
} =
|
|
577
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
580
|
+
} = z(e);
|
|
581
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Ln.has(i);
|
|
578
582
|
}
|
|
579
|
-
|
|
580
|
-
|
|
583
|
+
const Pn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
584
|
+
function On(e) {
|
|
585
|
+
return Pn.has(xe(e));
|
|
581
586
|
}
|
|
582
|
-
|
|
583
|
-
|
|
587
|
+
const Mn = [":popover-open", ":modal"];
|
|
588
|
+
function Ie(e) {
|
|
589
|
+
return Mn.some((t) => {
|
|
584
590
|
try {
|
|
585
591
|
return e.matches(t);
|
|
586
592
|
} catch {
|
|
@@ -588,32 +594,34 @@ function xe(e) {
|
|
|
588
594
|
}
|
|
589
595
|
});
|
|
590
596
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
597
|
+
const Sn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Nn = ["paint", "layout", "strict", "content"];
|
|
598
|
+
function nt(e) {
|
|
599
|
+
const t = ot(), n = _(e) ? z(e) : e;
|
|
600
|
+
return Sn.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) || An.some((o) => (n.willChange || "").includes(o)) || Nn.some((o) => (n.contain || "").includes(o));
|
|
594
601
|
}
|
|
595
|
-
function
|
|
596
|
-
let t =
|
|
597
|
-
for (;
|
|
598
|
-
if (
|
|
602
|
+
function Dn(e) {
|
|
603
|
+
let t = oe(e);
|
|
604
|
+
for (; G(t) && !ye(t); ) {
|
|
605
|
+
if (nt(t))
|
|
599
606
|
return t;
|
|
600
|
-
if (
|
|
607
|
+
if (Ie(t))
|
|
601
608
|
return null;
|
|
602
|
-
t =
|
|
609
|
+
t = oe(t);
|
|
603
610
|
}
|
|
604
611
|
return null;
|
|
605
612
|
}
|
|
606
|
-
function
|
|
613
|
+
function ot() {
|
|
607
614
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
608
615
|
}
|
|
609
|
-
|
|
610
|
-
|
|
616
|
+
const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
617
|
+
function ye(e) {
|
|
618
|
+
return Rn.has(xe(e));
|
|
611
619
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
620
|
+
function z(e) {
|
|
621
|
+
return j(e).getComputedStyle(e);
|
|
614
622
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
623
|
+
function We(e) {
|
|
624
|
+
return _(e) ? {
|
|
617
625
|
scrollLeft: e.scrollLeft,
|
|
618
626
|
scrollTop: e.scrollTop
|
|
619
627
|
} : {
|
|
@@ -621,186 +629,189 @@ function be(e) {
|
|
|
621
629
|
scrollTop: e.scrollY
|
|
622
630
|
};
|
|
623
631
|
}
|
|
624
|
-
function
|
|
625
|
-
if (
|
|
632
|
+
function oe(e) {
|
|
633
|
+
if (xe(e) === "html")
|
|
626
634
|
return e;
|
|
627
635
|
const t = (
|
|
628
636
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
629
637
|
e.assignedSlot || // DOM Element detected.
|
|
630
638
|
e.parentNode || // ShadowRoot detected.
|
|
631
|
-
|
|
632
|
-
|
|
639
|
+
xt(e) && e.host || // Fallback.
|
|
640
|
+
Q(e)
|
|
633
641
|
);
|
|
634
|
-
return
|
|
642
|
+
return xt(t) ? t.host : t;
|
|
635
643
|
}
|
|
636
|
-
function
|
|
637
|
-
const t =
|
|
638
|
-
return
|
|
644
|
+
function $t(e) {
|
|
645
|
+
const t = oe(e);
|
|
646
|
+
return ye(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : G(t) && Se(t) ? t : $t(t);
|
|
639
647
|
}
|
|
640
|
-
function
|
|
648
|
+
function Ce(e, t, n) {
|
|
641
649
|
var o;
|
|
642
650
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
643
|
-
const i =
|
|
644
|
-
if (
|
|
645
|
-
const
|
|
646
|
-
return t.concat(
|
|
651
|
+
const i = $t(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = j(i);
|
|
652
|
+
if (r) {
|
|
653
|
+
const a = Je(l);
|
|
654
|
+
return t.concat(l, l.visualViewport || [], Se(i) ? i : [], a && n ? Ce(a) : []);
|
|
647
655
|
}
|
|
648
|
-
return t.concat(i,
|
|
656
|
+
return t.concat(i, Ce(i, [], n));
|
|
649
657
|
}
|
|
650
|
-
function
|
|
658
|
+
function Je(e) {
|
|
651
659
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
652
660
|
}
|
|
653
|
-
function
|
|
654
|
-
const t =
|
|
661
|
+
function Xt(e) {
|
|
662
|
+
const t = z(e);
|
|
655
663
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
656
|
-
const i =
|
|
657
|
-
return
|
|
664
|
+
const i = G(e), r = i ? e.offsetWidth : n, l = i ? e.offsetHeight : o, a = Re(n) !== r || Re(o) !== l;
|
|
665
|
+
return a && (n = r, o = l), {
|
|
658
666
|
width: n,
|
|
659
667
|
height: o,
|
|
660
|
-
$:
|
|
668
|
+
$: a
|
|
661
669
|
};
|
|
662
670
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
671
|
+
function it(e) {
|
|
672
|
+
return _(e) ? e : e.contextElement;
|
|
665
673
|
}
|
|
666
|
-
function
|
|
667
|
-
const t =
|
|
668
|
-
if (!
|
|
669
|
-
return
|
|
674
|
+
function ve(e) {
|
|
675
|
+
const t = it(e);
|
|
676
|
+
if (!G(t))
|
|
677
|
+
return K(1);
|
|
670
678
|
const n = t.getBoundingClientRect(), {
|
|
671
679
|
width: o,
|
|
672
680
|
height: i,
|
|
673
|
-
$:
|
|
674
|
-
} =
|
|
675
|
-
let
|
|
676
|
-
return (!
|
|
677
|
-
x:
|
|
678
|
-
y:
|
|
681
|
+
$: r
|
|
682
|
+
} = Xt(t);
|
|
683
|
+
let l = (r ? Re(n.width) : n.width) / o, a = (r ? Re(n.height) : n.height) / i;
|
|
684
|
+
return (!l || !Number.isFinite(l)) && (l = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
685
|
+
x: l,
|
|
686
|
+
y: a
|
|
679
687
|
};
|
|
680
688
|
}
|
|
681
|
-
const
|
|
682
|
-
function
|
|
683
|
-
const t =
|
|
684
|
-
return
|
|
689
|
+
const kn = /* @__PURE__ */ K(0);
|
|
690
|
+
function Yt(e) {
|
|
691
|
+
const t = j(e);
|
|
692
|
+
return !ot() || !t.visualViewport ? kn : {
|
|
685
693
|
x: t.visualViewport.offsetLeft,
|
|
686
694
|
y: t.visualViewport.offsetTop
|
|
687
695
|
};
|
|
688
696
|
}
|
|
689
|
-
function
|
|
690
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
697
|
+
function Fn(e, t, n) {
|
|
698
|
+
return t === void 0 && (t = !1), !n || t && n !== j(e) ? !1 : t;
|
|
691
699
|
}
|
|
692
|
-
function
|
|
700
|
+
function he(e, t, n, o) {
|
|
693
701
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
694
|
-
const i = e.getBoundingClientRect(),
|
|
695
|
-
let
|
|
696
|
-
t && (o ?
|
|
697
|
-
const
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
const
|
|
701
|
-
let
|
|
702
|
-
for (;
|
|
703
|
-
const
|
|
704
|
-
|
|
702
|
+
const i = e.getBoundingClientRect(), r = it(e);
|
|
703
|
+
let l = K(1);
|
|
704
|
+
t && (o ? _(o) && (l = ve(o)) : l = ve(e));
|
|
705
|
+
const a = Fn(r, n, o) ? Yt(r) : K(0);
|
|
706
|
+
let u = (i.left + a.x) / l.x, c = (i.top + a.y) / l.y, h = i.width / l.x, f = i.height / l.y;
|
|
707
|
+
if (r) {
|
|
708
|
+
const p = j(r), d = o && _(o) ? j(o) : o;
|
|
709
|
+
let g = p, m = Je(g);
|
|
710
|
+
for (; m && o && d !== g; ) {
|
|
711
|
+
const b = ve(m), w = m.getBoundingClientRect(), y = z(m), C = w.left + (m.clientLeft + parseFloat(y.paddingLeft)) * b.x, P = w.top + (m.clientTop + parseFloat(y.paddingTop)) * b.y;
|
|
712
|
+
u *= b.x, c *= b.y, h *= b.x, f *= b.y, u += C, c += P, g = j(m), m = Je(g);
|
|
705
713
|
}
|
|
706
714
|
}
|
|
707
|
-
return
|
|
708
|
-
width:
|
|
709
|
-
height:
|
|
710
|
-
x:
|
|
715
|
+
return Fe({
|
|
716
|
+
width: h,
|
|
717
|
+
height: f,
|
|
718
|
+
x: u,
|
|
711
719
|
y: c
|
|
712
720
|
});
|
|
713
721
|
}
|
|
714
|
-
function
|
|
715
|
-
const n =
|
|
716
|
-
return t ? t.left + n :
|
|
722
|
+
function Ve(e, t) {
|
|
723
|
+
const n = We(e).scrollLeft;
|
|
724
|
+
return t ? t.left + n : he(Q(e)).left + n;
|
|
717
725
|
}
|
|
718
|
-
function
|
|
719
|
-
n
|
|
720
|
-
const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - (n ? 0 : (
|
|
721
|
-
// RTL <body> scrollbar.
|
|
722
|
-
We(e, o)
|
|
723
|
-
)), s = o.top + t.scrollTop;
|
|
726
|
+
function jt(e, t) {
|
|
727
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ve(e, n), i = n.top + t.scrollTop;
|
|
724
728
|
return {
|
|
725
|
-
x:
|
|
726
|
-
y:
|
|
729
|
+
x: o,
|
|
730
|
+
y: i
|
|
727
731
|
};
|
|
728
732
|
}
|
|
729
|
-
function
|
|
733
|
+
function Hn(e) {
|
|
730
734
|
let {
|
|
731
735
|
elements: t,
|
|
732
736
|
rect: n,
|
|
733
737
|
offsetParent: o,
|
|
734
738
|
strategy: i
|
|
735
739
|
} = e;
|
|
736
|
-
const
|
|
737
|
-
if (o ===
|
|
740
|
+
const r = i === "fixed", l = Q(o), a = t ? Ie(t.floating) : !1;
|
|
741
|
+
if (o === l || a && r)
|
|
738
742
|
return n;
|
|
739
|
-
let
|
|
743
|
+
let u = {
|
|
740
744
|
scrollLeft: 0,
|
|
741
745
|
scrollTop: 0
|
|
742
|
-
}, c =
|
|
743
|
-
const
|
|
744
|
-
if ((
|
|
745
|
-
const
|
|
746
|
-
c =
|
|
746
|
+
}, c = K(1);
|
|
747
|
+
const h = K(0), f = G(o);
|
|
748
|
+
if ((f || !f && !r) && ((xe(o) !== "body" || Se(l)) && (u = We(o)), G(o))) {
|
|
749
|
+
const d = he(o);
|
|
750
|
+
c = ve(o), h.x = d.x + o.clientLeft, h.y = d.y + o.clientTop;
|
|
747
751
|
}
|
|
748
|
-
const
|
|
752
|
+
const p = l && !f && !r ? jt(l, u) : K(0);
|
|
749
753
|
return {
|
|
750
754
|
width: n.width * c.x,
|
|
751
755
|
height: n.height * c.y,
|
|
752
|
-
x: n.x * c.x -
|
|
753
|
-
y: n.y * c.y -
|
|
756
|
+
x: n.x * c.x - u.scrollLeft * c.x + h.x + p.x,
|
|
757
|
+
y: n.y * c.y - u.scrollTop * c.y + h.y + p.y
|
|
754
758
|
};
|
|
755
759
|
}
|
|
756
|
-
function
|
|
760
|
+
function Bn(e) {
|
|
757
761
|
return Array.from(e.getClientRects());
|
|
758
762
|
}
|
|
759
|
-
function
|
|
760
|
-
const t =
|
|
761
|
-
let
|
|
762
|
-
const
|
|
763
|
-
return
|
|
763
|
+
function In(e) {
|
|
764
|
+
const t = Q(e), n = We(e), o = e.ownerDocument.body, i = fe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = fe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
765
|
+
let l = -n.scrollLeft + Ve(e);
|
|
766
|
+
const a = -n.scrollTop;
|
|
767
|
+
return z(o).direction === "rtl" && (l += fe(t.clientWidth, o.clientWidth) - i), {
|
|
764
768
|
width: i,
|
|
765
|
-
height: s,
|
|
766
|
-
x: r,
|
|
767
|
-
y: l
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
|
-
function Kt(e, t) {
|
|
771
|
-
const n = M(e), o = $(e), i = n.visualViewport;
|
|
772
|
-
let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
773
|
-
if (i) {
|
|
774
|
-
s = i.width, r = i.height;
|
|
775
|
-
const c = $e();
|
|
776
|
-
(!c || c && t === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
777
|
-
}
|
|
778
|
-
return {
|
|
779
|
-
width: s,
|
|
780
769
|
height: r,
|
|
781
770
|
x: l,
|
|
782
771
|
y: a
|
|
783
772
|
};
|
|
784
773
|
}
|
|
785
|
-
|
|
786
|
-
|
|
774
|
+
const Et = 25;
|
|
775
|
+
function Wn(e, t) {
|
|
776
|
+
const n = j(e), o = Q(e), i = n.visualViewport;
|
|
777
|
+
let r = o.clientWidth, l = o.clientHeight, a = 0, u = 0;
|
|
778
|
+
if (i) {
|
|
779
|
+
r = i.width, l = i.height;
|
|
780
|
+
const h = ot();
|
|
781
|
+
(!h || h && t === "fixed") && (a = i.offsetLeft, u = i.offsetTop);
|
|
782
|
+
}
|
|
783
|
+
const c = Ve(o);
|
|
784
|
+
if (c <= 0) {
|
|
785
|
+
const h = o.ownerDocument, f = h.body, p = getComputedStyle(f), d = h.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, g = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
786
|
+
g <= Et && (r -= g);
|
|
787
|
+
} else c <= Et && (r += c);
|
|
787
788
|
return {
|
|
788
789
|
width: r,
|
|
789
790
|
height: l,
|
|
790
791
|
x: a,
|
|
792
|
+
y: u
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
const Vn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
796
|
+
function $n(e, t) {
|
|
797
|
+
const n = he(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = G(e) ? ve(e) : K(1), l = e.clientWidth * r.x, a = e.clientHeight * r.y, u = i * r.x, c = o * r.y;
|
|
798
|
+
return {
|
|
799
|
+
width: l,
|
|
800
|
+
height: a,
|
|
801
|
+
x: u,
|
|
791
802
|
y: c
|
|
792
803
|
};
|
|
793
804
|
}
|
|
794
|
-
function
|
|
805
|
+
function Tt(e, t, n) {
|
|
795
806
|
let o;
|
|
796
807
|
if (t === "viewport")
|
|
797
|
-
o =
|
|
808
|
+
o = Wn(e, n);
|
|
798
809
|
else if (t === "document")
|
|
799
|
-
o =
|
|
800
|
-
else if (
|
|
801
|
-
o =
|
|
810
|
+
o = In(Q(e));
|
|
811
|
+
else if (_(t))
|
|
812
|
+
o = $n(t, n);
|
|
802
813
|
else {
|
|
803
|
-
const i =
|
|
814
|
+
const i = Yt(e);
|
|
804
815
|
o = {
|
|
805
816
|
x: t.x - i.x,
|
|
806
817
|
y: t.y - i.y,
|
|
@@ -808,106 +819,110 @@ function Ke(e, t, n) {
|
|
|
808
819
|
height: t.height
|
|
809
820
|
};
|
|
810
821
|
}
|
|
811
|
-
return
|
|
822
|
+
return Fe(o);
|
|
812
823
|
}
|
|
813
|
-
function
|
|
814
|
-
const n =
|
|
815
|
-
return n === t || !
|
|
824
|
+
function _t(e, t) {
|
|
825
|
+
const n = oe(e);
|
|
826
|
+
return n === t || !_(n) || ye(n) ? !1 : z(n).position === "fixed" || _t(n, t);
|
|
816
827
|
}
|
|
817
|
-
function
|
|
828
|
+
function Xn(e, t) {
|
|
818
829
|
const n = t.get(e);
|
|
819
830
|
if (n)
|
|
820
831
|
return n;
|
|
821
|
-
let o =
|
|
822
|
-
const
|
|
823
|
-
let
|
|
824
|
-
for (;
|
|
825
|
-
const
|
|
826
|
-
!
|
|
832
|
+
let o = Ce(e, [], !1).filter((a) => _(a) && xe(a) !== "body"), i = null;
|
|
833
|
+
const r = z(e).position === "fixed";
|
|
834
|
+
let l = r ? oe(e) : e;
|
|
835
|
+
for (; _(l) && !ye(l); ) {
|
|
836
|
+
const a = z(l), u = nt(l);
|
|
837
|
+
!u && a.position === "fixed" && (i = null), (r ? !u && !i : !u && a.position === "static" && !!i && Vn.has(i.position) || Se(l) && !u && _t(e, l)) ? o = o.filter((h) => h !== l) : i = a, l = oe(l);
|
|
827
838
|
}
|
|
828
839
|
return t.set(e, o), o;
|
|
829
840
|
}
|
|
830
|
-
function
|
|
841
|
+
function Yn(e) {
|
|
831
842
|
let {
|
|
832
843
|
element: t,
|
|
833
844
|
boundary: n,
|
|
834
845
|
rootBoundary: o,
|
|
835
846
|
strategy: i
|
|
836
847
|
} = e;
|
|
837
|
-
const
|
|
838
|
-
const
|
|
839
|
-
return c.top =
|
|
840
|
-
},
|
|
848
|
+
const l = [...n === "clippingAncestors" ? Ie(t) ? [] : Xn(t, this._c) : [].concat(n), o], a = l[0], u = l.reduce((c, h) => {
|
|
849
|
+
const f = Tt(t, h, i);
|
|
850
|
+
return c.top = fe(f.top, c.top), c.right = we(f.right, c.right), c.bottom = we(f.bottom, c.bottom), c.left = fe(f.left, c.left), c;
|
|
851
|
+
}, Tt(t, a, i));
|
|
841
852
|
return {
|
|
842
|
-
width:
|
|
843
|
-
height:
|
|
844
|
-
x:
|
|
845
|
-
y:
|
|
853
|
+
width: u.right - u.left,
|
|
854
|
+
height: u.bottom - u.top,
|
|
855
|
+
x: u.left,
|
|
856
|
+
y: u.top
|
|
846
857
|
};
|
|
847
858
|
}
|
|
848
|
-
function
|
|
859
|
+
function jn(e) {
|
|
849
860
|
const {
|
|
850
861
|
width: t,
|
|
851
862
|
height: n
|
|
852
|
-
} =
|
|
863
|
+
} = Xt(e);
|
|
853
864
|
return {
|
|
854
865
|
width: t,
|
|
855
866
|
height: n
|
|
856
867
|
};
|
|
857
868
|
}
|
|
858
|
-
function
|
|
859
|
-
const o =
|
|
860
|
-
let
|
|
869
|
+
function _n(e, t, n) {
|
|
870
|
+
const o = G(t), i = Q(t), r = n === "fixed", l = he(e, !0, r, t);
|
|
871
|
+
let a = {
|
|
861
872
|
scrollLeft: 0,
|
|
862
873
|
scrollTop: 0
|
|
863
874
|
};
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
875
|
+
const u = K(0);
|
|
876
|
+
function c() {
|
|
877
|
+
u.x = Ve(i);
|
|
878
|
+
}
|
|
879
|
+
if (o || !o && !r)
|
|
880
|
+
if ((xe(t) !== "body" || Se(i)) && (a = We(t)), o) {
|
|
881
|
+
const d = he(t, !0, r, t);
|
|
882
|
+
u.x = d.x + t.clientLeft, u.y = d.y + t.clientTop;
|
|
883
|
+
} else i && c();
|
|
884
|
+
r && !o && i && c();
|
|
885
|
+
const h = i && !o && !r ? jt(i, a) : K(0), f = l.left + a.scrollLeft - u.x - h.x, p = l.top + a.scrollTop - u.y - h.y;
|
|
871
886
|
return {
|
|
872
887
|
x: f,
|
|
873
|
-
y:
|
|
874
|
-
width:
|
|
875
|
-
height:
|
|
888
|
+
y: p,
|
|
889
|
+
width: l.width,
|
|
890
|
+
height: l.height
|
|
876
891
|
};
|
|
877
892
|
}
|
|
878
|
-
function
|
|
879
|
-
return
|
|
893
|
+
function _e(e) {
|
|
894
|
+
return z(e).position === "static";
|
|
880
895
|
}
|
|
881
|
-
function
|
|
882
|
-
if (!
|
|
896
|
+
function Ct(e, t) {
|
|
897
|
+
if (!G(e) || z(e).position === "fixed")
|
|
883
898
|
return null;
|
|
884
899
|
if (t)
|
|
885
900
|
return t(e);
|
|
886
901
|
let n = e.offsetParent;
|
|
887
|
-
return
|
|
902
|
+
return Q(e) === n && (n = n.ownerDocument.body), n;
|
|
888
903
|
}
|
|
889
|
-
function
|
|
890
|
-
const n =
|
|
891
|
-
if (
|
|
904
|
+
function zt(e, t) {
|
|
905
|
+
const n = j(e);
|
|
906
|
+
if (Ie(e))
|
|
892
907
|
return n;
|
|
893
|
-
if (!
|
|
894
|
-
let i =
|
|
895
|
-
for (; i && !
|
|
896
|
-
if (
|
|
908
|
+
if (!G(e)) {
|
|
909
|
+
let i = oe(e);
|
|
910
|
+
for (; i && !ye(i); ) {
|
|
911
|
+
if (_(i) && !_e(i))
|
|
897
912
|
return i;
|
|
898
|
-
i =
|
|
913
|
+
i = oe(i);
|
|
899
914
|
}
|
|
900
915
|
return n;
|
|
901
916
|
}
|
|
902
|
-
let o =
|
|
903
|
-
for (; o &&
|
|
904
|
-
o =
|
|
905
|
-
return o &&
|
|
917
|
+
let o = Ct(e, t);
|
|
918
|
+
for (; o && On(o) && _e(o); )
|
|
919
|
+
o = Ct(o, t);
|
|
920
|
+
return o && ye(o) && _e(o) && !nt(o) ? n : o || Dn(e) || n;
|
|
906
921
|
}
|
|
907
|
-
const
|
|
908
|
-
const t = this.getOffsetParent ||
|
|
922
|
+
const zn = async function(e) {
|
|
923
|
+
const t = this.getOffsetParent || zt, n = this.getDimensions, o = await n(e.floating);
|
|
909
924
|
return {
|
|
910
|
-
reference:
|
|
925
|
+
reference: _n(e.reference, await t(e.floating), e.strategy),
|
|
911
926
|
floating: {
|
|
912
927
|
x: 0,
|
|
913
928
|
y: 0,
|
|
@@ -916,348 +931,734 @@ const Zt = async function(e) {
|
|
|
916
931
|
}
|
|
917
932
|
};
|
|
918
933
|
};
|
|
919
|
-
function
|
|
920
|
-
return
|
|
921
|
-
}
|
|
922
|
-
const
|
|
923
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
924
|
-
getDocumentElement:
|
|
925
|
-
getClippingRect:
|
|
926
|
-
getOffsetParent:
|
|
927
|
-
getElementRects:
|
|
928
|
-
getClientRects:
|
|
929
|
-
getDimensions:
|
|
930
|
-
getScale:
|
|
931
|
-
isElement:
|
|
932
|
-
isRTL:
|
|
934
|
+
function Un(e) {
|
|
935
|
+
return z(e).direction === "rtl";
|
|
936
|
+
}
|
|
937
|
+
const qn = {
|
|
938
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Hn,
|
|
939
|
+
getDocumentElement: Q,
|
|
940
|
+
getClippingRect: Yn,
|
|
941
|
+
getOffsetParent: zt,
|
|
942
|
+
getElementRects: zn,
|
|
943
|
+
getClientRects: Bn,
|
|
944
|
+
getDimensions: jn,
|
|
945
|
+
getScale: ve,
|
|
946
|
+
isElement: _,
|
|
947
|
+
isRTL: Un
|
|
933
948
|
};
|
|
934
|
-
function
|
|
949
|
+
function Ut(e, t) {
|
|
935
950
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
936
951
|
}
|
|
937
|
-
function
|
|
952
|
+
function Kn(e, t) {
|
|
938
953
|
let n = null, o;
|
|
939
|
-
const i =
|
|
940
|
-
function
|
|
941
|
-
var
|
|
942
|
-
clearTimeout(o), (
|
|
954
|
+
const i = Q(e);
|
|
955
|
+
function r() {
|
|
956
|
+
var a;
|
|
957
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
943
958
|
}
|
|
944
|
-
function
|
|
945
|
-
|
|
959
|
+
function l(a, u) {
|
|
960
|
+
a === void 0 && (a = !1), u === void 0 && (u = 1), r();
|
|
946
961
|
const c = e.getBoundingClientRect(), {
|
|
947
|
-
left:
|
|
948
|
-
top:
|
|
949
|
-
width:
|
|
950
|
-
height:
|
|
962
|
+
left: h,
|
|
963
|
+
top: f,
|
|
964
|
+
width: p,
|
|
965
|
+
height: d
|
|
951
966
|
} = c;
|
|
952
|
-
if (
|
|
967
|
+
if (a || t(), !p || !d)
|
|
953
968
|
return;
|
|
954
|
-
const
|
|
955
|
-
rootMargin: -
|
|
956
|
-
threshold:
|
|
969
|
+
const g = De(f), m = De(i.clientWidth - (h + p)), b = De(i.clientHeight - (f + d)), w = De(h), C = {
|
|
970
|
+
rootMargin: -g + "px " + -m + "px " + -b + "px " + -w + "px",
|
|
971
|
+
threshold: fe(0, we(1, u)) || 1
|
|
957
972
|
};
|
|
958
|
-
let
|
|
959
|
-
function
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
962
|
-
if (!
|
|
963
|
-
return
|
|
964
|
-
|
|
965
|
-
|
|
973
|
+
let P = !0;
|
|
974
|
+
function E(T) {
|
|
975
|
+
const A = T[0].intersectionRatio;
|
|
976
|
+
if (A !== u) {
|
|
977
|
+
if (!P)
|
|
978
|
+
return l();
|
|
979
|
+
A ? l(!1, A) : o = setTimeout(() => {
|
|
980
|
+
l(!1, 1e-7);
|
|
966
981
|
}, 1e3);
|
|
967
982
|
}
|
|
968
|
-
|
|
983
|
+
A === 1 && !Ut(c, e.getBoundingClientRect()) && l(), P = !1;
|
|
969
984
|
}
|
|
970
985
|
try {
|
|
971
|
-
n = new IntersectionObserver(
|
|
972
|
-
...
|
|
986
|
+
n = new IntersectionObserver(E, {
|
|
987
|
+
...C,
|
|
973
988
|
// Handle <iframe>s
|
|
974
989
|
root: i.ownerDocument
|
|
975
990
|
});
|
|
976
991
|
} catch {
|
|
977
|
-
n = new IntersectionObserver(
|
|
992
|
+
n = new IntersectionObserver(E, C);
|
|
978
993
|
}
|
|
979
994
|
n.observe(e);
|
|
980
995
|
}
|
|
981
|
-
return
|
|
996
|
+
return l(!0), r;
|
|
982
997
|
}
|
|
983
|
-
function
|
|
998
|
+
function Gn(e, t, n, o) {
|
|
984
999
|
o === void 0 && (o = {});
|
|
985
1000
|
const {
|
|
986
1001
|
ancestorScroll: i = !0,
|
|
987
|
-
ancestorResize:
|
|
988
|
-
elementResize:
|
|
989
|
-
layoutShift:
|
|
990
|
-
animationFrame:
|
|
991
|
-
} = o, c =
|
|
992
|
-
|
|
1002
|
+
ancestorResize: r = !0,
|
|
1003
|
+
elementResize: l = typeof ResizeObserver == "function",
|
|
1004
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1005
|
+
animationFrame: u = !1
|
|
1006
|
+
} = o, c = it(e), h = i || r ? [...c ? Ce(c) : [], ...Ce(t)] : [];
|
|
1007
|
+
h.forEach((w) => {
|
|
993
1008
|
i && w.addEventListener("scroll", n, {
|
|
994
1009
|
passive: !0
|
|
995
|
-
}),
|
|
1010
|
+
}), r && w.addEventListener("resize", n);
|
|
996
1011
|
});
|
|
997
|
-
const
|
|
998
|
-
let
|
|
999
|
-
|
|
1000
|
-
let [
|
|
1001
|
-
|
|
1002
|
-
var
|
|
1003
|
-
(
|
|
1012
|
+
const f = c && a ? Kn(c, n) : null;
|
|
1013
|
+
let p = -1, d = null;
|
|
1014
|
+
l && (d = new ResizeObserver((w) => {
|
|
1015
|
+
let [y] = w;
|
|
1016
|
+
y && y.target === c && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1017
|
+
var C;
|
|
1018
|
+
(C = d) == null || C.observe(t);
|
|
1004
1019
|
})), n();
|
|
1005
|
-
}), c && !
|
|
1006
|
-
let
|
|
1007
|
-
|
|
1008
|
-
function
|
|
1009
|
-
const w =
|
|
1010
|
-
|
|
1020
|
+
}), c && !u && d.observe(c), d.observe(t));
|
|
1021
|
+
let g, m = u ? he(e) : null;
|
|
1022
|
+
u && b();
|
|
1023
|
+
function b() {
|
|
1024
|
+
const w = he(e);
|
|
1025
|
+
m && !Ut(m, w) && n(), m = w, g = requestAnimationFrame(b);
|
|
1011
1026
|
}
|
|
1012
1027
|
return n(), () => {
|
|
1013
1028
|
var w;
|
|
1014
|
-
|
|
1015
|
-
i &&
|
|
1016
|
-
}),
|
|
1029
|
+
h.forEach((y) => {
|
|
1030
|
+
i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
|
|
1031
|
+
}), f == null || f(), (w = d) == null || w.disconnect(), d = null, u && cancelAnimationFrame(g);
|
|
1017
1032
|
};
|
|
1018
1033
|
}
|
|
1019
|
-
const
|
|
1034
|
+
const Oo = Tn, Mo = Cn, So = yn, Ao = bn, Jn = wn, Qn = (e, t, n) => {
|
|
1020
1035
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1021
|
-
platform:
|
|
1036
|
+
platform: qn,
|
|
1022
1037
|
...n
|
|
1023
|
-
},
|
|
1038
|
+
}, r = {
|
|
1024
1039
|
...i.platform,
|
|
1025
1040
|
_c: o
|
|
1026
1041
|
};
|
|
1027
|
-
return
|
|
1042
|
+
return gn(e, t, {
|
|
1028
1043
|
...i,
|
|
1029
|
-
platform:
|
|
1044
|
+
platform: r
|
|
1030
1045
|
});
|
|
1031
1046
|
};
|
|
1032
|
-
function
|
|
1047
|
+
function Zn(e) {
|
|
1048
|
+
return {
|
|
1049
|
+
name: "arrow",
|
|
1050
|
+
options: e,
|
|
1051
|
+
fn(t) {
|
|
1052
|
+
const n = S(e.element);
|
|
1053
|
+
return n == null ? {} : Jn({ element: n, padding: e.padding }).fn(t);
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
function Lt(e, t, n = {}) {
|
|
1033
1058
|
const {
|
|
1034
1059
|
transform: o = !0,
|
|
1035
1060
|
middlewares: i,
|
|
1036
|
-
|
|
1037
|
-
open:
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1061
|
+
autoUpdate: r = !0,
|
|
1062
|
+
open: l = U(!1)
|
|
1063
|
+
} = n, a = (E) => {
|
|
1064
|
+
l.value = E;
|
|
1065
|
+
}, u = I(() => S(n.placement) ?? "bottom"), c = I(() => S(n.strategy) ?? "absolute"), h = U(0), f = U(0), p = U(u.value), d = U(c.value), g = qe({}), m = U(!1), b = U(null), w = I(() => {
|
|
1066
|
+
const E = i || [];
|
|
1067
|
+
return b.value && !E.some((A) => A.name === "arrow") ? [...E, Zn({ element: b })] : E;
|
|
1068
|
+
}), y = async () => {
|
|
1042
1069
|
if (!e.value || !t.value) return;
|
|
1043
|
-
const
|
|
1044
|
-
placement:
|
|
1070
|
+
const E = await Qn(e.value, t.value, {
|
|
1071
|
+
placement: u.value,
|
|
1045
1072
|
strategy: c.value,
|
|
1046
|
-
middleware:
|
|
1073
|
+
middleware: w.value
|
|
1047
1074
|
});
|
|
1048
|
-
|
|
1075
|
+
h.value = E.x, f.value = E.y, p.value = E.placement, d.value = E.strategy, g.value = E.middlewareData, m.value = l.value;
|
|
1049
1076
|
};
|
|
1050
|
-
|
|
1051
|
-
|
|
1077
|
+
pe([u, c], () => {
|
|
1078
|
+
l.value && y();
|
|
1052
1079
|
});
|
|
1053
|
-
let
|
|
1054
|
-
|
|
1055
|
-
[e, t,
|
|
1056
|
-
([
|
|
1057
|
-
!
|
|
1058
|
-
|
|
1080
|
+
let C;
|
|
1081
|
+
pe(
|
|
1082
|
+
[e, t, l],
|
|
1083
|
+
([E, T, A]) => {
|
|
1084
|
+
!A || !E || !T || (r && (C = Gn(
|
|
1085
|
+
E,
|
|
1086
|
+
T,
|
|
1087
|
+
y,
|
|
1088
|
+
typeof r == "object" ? r : void 0
|
|
1089
|
+
)), ue(() => {
|
|
1090
|
+
C == null || C(), C = void 0;
|
|
1059
1091
|
}));
|
|
1060
1092
|
},
|
|
1061
1093
|
{ immediate: !0 }
|
|
1062
|
-
),
|
|
1063
|
-
|
|
1094
|
+
), ge(() => C == null ? void 0 : C()), pe(l, (E) => {
|
|
1095
|
+
E || (m.value = !1);
|
|
1064
1096
|
});
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
top: "0"
|
|
1070
|
-
};
|
|
1071
|
-
if (!d.value || !t.value)
|
|
1072
|
-
return x;
|
|
1073
|
-
const g = qe(t.value, f.value), b = qe(t.value, u.value);
|
|
1074
|
-
return T(o) ? {
|
|
1075
|
-
...x,
|
|
1076
|
-
transform: `translate(${g}px, ${b}px)`,
|
|
1077
|
-
...pt(t.value) >= 1.5 && {
|
|
1078
|
-
willChange: "transform"
|
|
1079
|
-
}
|
|
1080
|
-
} : {
|
|
1081
|
-
...x,
|
|
1082
|
-
left: `${g}px`,
|
|
1083
|
-
top: `${b}px`
|
|
1084
|
-
};
|
|
1097
|
+
const P = U({
|
|
1098
|
+
position: c.value,
|
|
1099
|
+
left: "0",
|
|
1100
|
+
top: "0"
|
|
1085
1101
|
});
|
|
1086
|
-
return
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1102
|
+
return pe(
|
|
1103
|
+
[h, f, () => S(o)],
|
|
1104
|
+
([E, T, A]) => {
|
|
1105
|
+
const D = t.value;
|
|
1106
|
+
if (!D) return;
|
|
1107
|
+
const R = {
|
|
1108
|
+
position: d.value,
|
|
1109
|
+
left: "0",
|
|
1110
|
+
top: "0"
|
|
1111
|
+
}, N = Pt(D, E), M = Pt(D, T);
|
|
1112
|
+
A ? P.value = {
|
|
1113
|
+
...R,
|
|
1114
|
+
transform: `translate(${N}px, ${M}px)`,
|
|
1115
|
+
...qt(D) >= 1.5 && {
|
|
1116
|
+
"will-change": "transform"
|
|
1117
|
+
}
|
|
1118
|
+
} : P.value = {
|
|
1119
|
+
...R,
|
|
1120
|
+
left: `${N}px`,
|
|
1121
|
+
top: `${M}px`
|
|
1122
|
+
};
|
|
1123
|
+
},
|
|
1124
|
+
{ immediate: !0 }
|
|
1125
|
+
), {
|
|
1126
|
+
x: h,
|
|
1127
|
+
y: f,
|
|
1128
|
+
strategy: d,
|
|
1129
|
+
placement: p,
|
|
1130
|
+
middlewareData: g,
|
|
1131
|
+
isPositioned: m,
|
|
1132
|
+
floatingStyles: P,
|
|
1133
|
+
update: y,
|
|
1095
1134
|
refs: {
|
|
1096
1135
|
anchorEl: e,
|
|
1097
|
-
floatingEl: t
|
|
1136
|
+
floatingEl: t,
|
|
1137
|
+
arrowEl: b
|
|
1098
1138
|
},
|
|
1099
|
-
open:
|
|
1100
|
-
setOpen:
|
|
1139
|
+
open: l,
|
|
1140
|
+
setOpen: a
|
|
1101
1141
|
};
|
|
1102
1142
|
}
|
|
1103
|
-
function
|
|
1104
|
-
const n =
|
|
1143
|
+
function Pt(e, t) {
|
|
1144
|
+
const n = qt(e);
|
|
1105
1145
|
return Math.round(t * n) / n;
|
|
1106
1146
|
}
|
|
1107
|
-
function
|
|
1147
|
+
function qt(e) {
|
|
1108
1148
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1109
1149
|
}
|
|
1110
|
-
function
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
"inset-inline-start": `${
|
|
1127
|
-
"inset-block-
|
|
1128
|
-
} :
|
|
1129
|
-
"inset-
|
|
1130
|
-
"inset-
|
|
1131
|
-
} :
|
|
1132
|
-
"inset-block-start": `${
|
|
1133
|
-
"inset-inline-
|
|
1150
|
+
function No(e, t, n = {}) {
|
|
1151
|
+
const { offset: o = "-4px", padding: i } = n, { middlewareData: r, placement: l, refs: a } = t;
|
|
1152
|
+
pe(e, (f) => {
|
|
1153
|
+
a.arrowEl.value = f;
|
|
1154
|
+
});
|
|
1155
|
+
const u = I(() => {
|
|
1156
|
+
var f;
|
|
1157
|
+
return ((f = r.value.arrow) == null ? void 0 : f.x) ?? 0;
|
|
1158
|
+
}), c = I(() => {
|
|
1159
|
+
var f;
|
|
1160
|
+
return ((f = r.value.arrow) == null ? void 0 : f.y) ?? 0;
|
|
1161
|
+
}), h = I(() => {
|
|
1162
|
+
if (!(e.value || a.arrowEl.value) || !r.value.arrow)
|
|
1163
|
+
return {};
|
|
1164
|
+
const p = S(l).split("-")[0], d = u.value, g = c.value;
|
|
1165
|
+
return p === "bottom" ? {
|
|
1166
|
+
"inset-inline-start": `${d}px`,
|
|
1167
|
+
"inset-block-start": o
|
|
1168
|
+
} : p === "top" ? {
|
|
1169
|
+
"inset-inline-start": `${d}px`,
|
|
1170
|
+
"inset-block-end": o
|
|
1171
|
+
} : p === "right" ? {
|
|
1172
|
+
"inset-block-start": `${g}px`,
|
|
1173
|
+
"inset-inline-start": o
|
|
1174
|
+
} : p === "left" ? {
|
|
1175
|
+
"inset-block-start": `${g}px`,
|
|
1176
|
+
"inset-inline-end": o
|
|
1134
1177
|
} : {};
|
|
1135
1178
|
});
|
|
1136
1179
|
return {
|
|
1137
|
-
arrowX:
|
|
1138
|
-
arrowY:
|
|
1139
|
-
arrowStyles:
|
|
1180
|
+
arrowX: u,
|
|
1181
|
+
arrowY: c,
|
|
1182
|
+
arrowStyles: h
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
let eo = 0;
|
|
1186
|
+
function to() {
|
|
1187
|
+
return `vfloat-id-${eo++}`;
|
|
1188
|
+
}
|
|
1189
|
+
function Ot(e) {
|
|
1190
|
+
return typeof e == "object" && e instanceof HTMLElement;
|
|
1191
|
+
}
|
|
1192
|
+
function no(e) {
|
|
1193
|
+
return e !== null && typeof e == "object" && "data" in e && "id" in e && "children" in e && "parent" in e;
|
|
1194
|
+
}
|
|
1195
|
+
function rt(e) {
|
|
1196
|
+
return no(e) ? {
|
|
1197
|
+
floatingContext: e.data,
|
|
1198
|
+
treeContext: e
|
|
1199
|
+
} : {
|
|
1200
|
+
floatingContext: e,
|
|
1201
|
+
treeContext: null
|
|
1140
1202
|
};
|
|
1141
1203
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1204
|
+
function J(e, t) {
|
|
1205
|
+
if (!t) return !1;
|
|
1206
|
+
if (typeof t == "object" && t !== null && "contextElement" in t) {
|
|
1207
|
+
const n = t.contextElement;
|
|
1208
|
+
return n instanceof Element ? n.contains(e) : !1;
|
|
1209
|
+
}
|
|
1210
|
+
return t instanceof Element ? t.contains(e) : !1;
|
|
1211
|
+
}
|
|
1212
|
+
function st(e, t) {
|
|
1213
|
+
for (const n of e.children.value)
|
|
1214
|
+
if (n.data.open.value) {
|
|
1215
|
+
if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
|
|
1216
|
+
return n;
|
|
1217
|
+
const o = st(n, t);
|
|
1218
|
+
if (o) return o;
|
|
1219
|
+
}
|
|
1220
|
+
return null;
|
|
1221
|
+
}
|
|
1222
|
+
function Qe(e, t) {
|
|
1223
|
+
if (e === void 0) return !1;
|
|
1224
|
+
const n = e === "mouse";
|
|
1225
|
+
return t ? n : n || e === "pen";
|
|
1226
|
+
}
|
|
1227
|
+
function Kt(e) {
|
|
1228
|
+
return !e || !(e instanceof HTMLElement) ? !1 : e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e.isContentEditable && e.contentEditable !== "false";
|
|
1229
|
+
}
|
|
1230
|
+
function Mt(e) {
|
|
1231
|
+
const t = e.target;
|
|
1232
|
+
return t instanceof HTMLElement ? t.tagName === "BUTTON" || t.tagName === "INPUT" && t.getAttribute("type") === "button" || t.getAttribute("role") === "button" : !1;
|
|
1233
|
+
}
|
|
1234
|
+
function St(e) {
|
|
1235
|
+
return Kt(e);
|
|
1236
|
+
}
|
|
1237
|
+
function oo(e) {
|
|
1238
|
+
return e instanceof Element && e instanceof HTMLElement;
|
|
1239
|
+
}
|
|
1240
|
+
function io(e) {
|
|
1241
|
+
return typeof e == "object" && e !== null && "contextElement" in e;
|
|
1242
|
+
}
|
|
1243
|
+
function At(e, t) {
|
|
1244
|
+
return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
|
|
1245
|
+
}
|
|
1246
|
+
function ro(e, t) {
|
|
1247
|
+
const n = t.getBoundingClientRect(), o = t.offsetWidth - t.clientWidth, i = t.offsetHeight - t.clientHeight, r = e.clientX - n.left, l = e.clientY - n.top;
|
|
1248
|
+
if (o > 0) {
|
|
1249
|
+
const a = t.clientWidth;
|
|
1250
|
+
if (r >= a && r <= t.offsetWidth)
|
|
1251
|
+
return !0;
|
|
1252
|
+
}
|
|
1253
|
+
if (i > 0) {
|
|
1254
|
+
const a = t.clientHeight;
|
|
1255
|
+
if (l >= a && l <= t.offsetHeight)
|
|
1256
|
+
return !0;
|
|
1257
|
+
}
|
|
1258
|
+
return !1;
|
|
1259
|
+
}
|
|
1260
|
+
function Nt() {
|
|
1261
|
+
return typeof navigator > "u" ? !1 : navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
1262
|
+
}
|
|
1263
|
+
function Dt() {
|
|
1264
|
+
return typeof navigator > "u" ? !1 : /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1265
|
+
}
|
|
1266
|
+
function so(e) {
|
|
1267
|
+
return typeof (e == null ? void 0 : e.matches) != "function" ? !1 : e.matches(":focus-visible");
|
|
1268
|
+
}
|
|
1269
|
+
function ze(e, t) {
|
|
1270
|
+
return e.contains(t);
|
|
1271
|
+
}
|
|
1272
|
+
function lo(e) {
|
|
1273
|
+
return e.target;
|
|
1274
|
+
}
|
|
1275
|
+
function Rt() {
|
|
1276
|
+
return typeof performance < "u" ? performance.now() : Date.now();
|
|
1277
|
+
}
|
|
1278
|
+
function kt(e) {
|
|
1279
|
+
e !== -1 && clearTimeout(e);
|
|
1280
|
+
}
|
|
1281
|
+
function Gt(e) {
|
|
1282
|
+
return e.children.value.some(
|
|
1283
|
+
(t) => t.data.open.value || Gt(t)
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
function ao(e, t) {
|
|
1287
|
+
return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
|
|
1145
1288
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1289
|
+
function Ft(e, t) {
|
|
1290
|
+
const [n, o] = e;
|
|
1291
|
+
let i = !1;
|
|
1292
|
+
const r = t.length;
|
|
1293
|
+
for (let l = 0, a = r - 1; l < r; a = l++) {
|
|
1294
|
+
const [u, c] = t[l] || [0, 0], [h, f] = t[a] || [0, 0];
|
|
1295
|
+
c >= o != f >= o && n <= (h - u) * (o - c) / (f - c) + u && (i = !i);
|
|
1296
|
+
}
|
|
1297
|
+
return i;
|
|
1298
|
+
}
|
|
1299
|
+
function co(e = {}) {
|
|
1300
|
+
const { buffer: t = 0.5, blockPointerEvents: n = !1, requireIntent: o = !0 } = e;
|
|
1301
|
+
let i = -1, r = !1;
|
|
1302
|
+
function l(u, c, h, f, p) {
|
|
1303
|
+
const d = Rt(), g = d - p;
|
|
1304
|
+
if (h === null || f === null || g === 0)
|
|
1305
|
+
return {
|
|
1306
|
+
speed: null,
|
|
1307
|
+
lastX: u,
|
|
1308
|
+
lastY: c,
|
|
1309
|
+
lastCursorTime: d
|
|
1310
|
+
};
|
|
1311
|
+
const m = u - h, b = c - f;
|
|
1312
|
+
return {
|
|
1313
|
+
speed: Math.sqrt(m * m + b * b) / g,
|
|
1314
|
+
lastX: u,
|
|
1315
|
+
lastY: c,
|
|
1316
|
+
lastCursorTime: d
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
const a = function(c) {
|
|
1320
|
+
const { x: h, y: f, placement: p, elements: d, buffer: g, onClose: m, nodeId: b, tree: w } = c, y = I(() => {
|
|
1321
|
+
const T = d.domReference;
|
|
1322
|
+
return Ot(T) ? T : (T == null ? void 0 : T.contextElement) ?? null;
|
|
1323
|
+
});
|
|
1324
|
+
let C = null, P = null, E = Rt();
|
|
1325
|
+
return function(A) {
|
|
1326
|
+
var lt, at, ct, ut, ft, dt, ht;
|
|
1327
|
+
function D() {
|
|
1328
|
+
kt(i), i = -1, m();
|
|
1329
|
+
}
|
|
1330
|
+
if (kt(i), i = -1, !d.domReference || !d.floating || p == null || h == null || f == null)
|
|
1331
|
+
return;
|
|
1332
|
+
const { clientX: R, clientY: N } = A, M = [R, N], k = lo(A), V = A.type === "mouseleave", F = d.floating && ze(d.floating, k), Y = y.value && ze(y.value, k), x = (lt = y.value) == null ? void 0 : lt.getBoundingClientRect(), s = (at = d.floating) == null ? void 0 : at.getBoundingClientRect(), v = p.split("-")[0], H = h > ((s == null ? void 0 : s.right) ?? 0) - ((s == null ? void 0 : s.width) ?? 0) / 2, X = f > ((s == null ? void 0 : s.bottom) ?? 0) - ((s == null ? void 0 : s.height) ?? 0) / 2, Z = x ? ao(M, x) : !1, L = ((s == null ? void 0 : s.width) ?? 0) > ((x == null ? void 0 : x.width) ?? 0), W = ((s == null ? void 0 : s.height) ?? 0) > ((x == null ? void 0 : x.height) ?? 0), ie = ((ct = L ? x : s) == null ? void 0 : ct.left) ?? 0, ee = ((ut = L ? x : s) == null ? void 0 : ut.right) ?? 0, re = ((ft = W ? x : s) == null ? void 0 : ft.top) ?? 0, se = ((dt = W ? x : s) == null ? void 0 : dt.bottom) ?? 0;
|
|
1333
|
+
if (F && (r = !0, !V))
|
|
1334
|
+
return;
|
|
1335
|
+
if (Y && (r = !1), Y && !V) {
|
|
1336
|
+
r = !0;
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
if (V && Ot(A.relatedTarget) && d.floating && ze(d.floating, A.relatedTarget))
|
|
1340
|
+
return;
|
|
1341
|
+
if (w && b) {
|
|
1342
|
+
const B = w.nodes.get(b);
|
|
1343
|
+
if (B && Gt(B))
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
if (v === "top" && f >= ((x == null ? void 0 : x.bottom) ?? 0) - 1 || v === "bottom" && f <= ((x == null ? void 0 : x.top) ?? 0) + 1 || v === "left" && h >= ((x == null ? void 0 : x.right) ?? 0) - 1 || v === "right" && h <= ((x == null ? void 0 : x.left) ?? 0) + 1)
|
|
1347
|
+
return D();
|
|
1348
|
+
let te = [];
|
|
1349
|
+
switch (v) {
|
|
1350
|
+
case "top":
|
|
1351
|
+
te = [
|
|
1352
|
+
[ie, ((x == null ? void 0 : x.top) ?? 0) + 1],
|
|
1353
|
+
[ie, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
1354
|
+
[ee, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
1355
|
+
[ee, ((x == null ? void 0 : x.top) ?? 0) + 1]
|
|
1356
|
+
];
|
|
1357
|
+
break;
|
|
1358
|
+
case "bottom":
|
|
1359
|
+
te = [
|
|
1360
|
+
[ie, ((s == null ? void 0 : s.top) ?? 0) + 1],
|
|
1361
|
+
[ie, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
|
|
1362
|
+
[ee, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
|
|
1363
|
+
[ee, ((s == null ? void 0 : s.top) ?? 0) + 1]
|
|
1364
|
+
];
|
|
1365
|
+
break;
|
|
1366
|
+
case "left":
|
|
1367
|
+
te = [
|
|
1368
|
+
[((s == null ? void 0 : s.right) ?? 0) - 1, se],
|
|
1369
|
+
[((s == null ? void 0 : s.right) ?? 0) - 1, re],
|
|
1370
|
+
[((x == null ? void 0 : x.left) ?? 0) + 1, re],
|
|
1371
|
+
[((x == null ? void 0 : x.left) ?? 0) + 1, se]
|
|
1372
|
+
];
|
|
1373
|
+
break;
|
|
1374
|
+
case "right":
|
|
1375
|
+
te = [
|
|
1376
|
+
[((x == null ? void 0 : x.right) ?? 0) - 1, se],
|
|
1377
|
+
[((x == null ? void 0 : x.right) ?? 0) - 1, re],
|
|
1378
|
+
[((s == null ? void 0 : s.left) ?? 0) + 1, re],
|
|
1379
|
+
[((s == null ? void 0 : s.left) ?? 0) + 1, se]
|
|
1380
|
+
];
|
|
1381
|
+
break;
|
|
1382
|
+
}
|
|
1383
|
+
function Ee([B, $]) {
|
|
1384
|
+
const O = g;
|
|
1385
|
+
switch (v) {
|
|
1386
|
+
case "top": {
|
|
1387
|
+
const le = [
|
|
1388
|
+
L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1389
|
+
$ + O + 1
|
|
1390
|
+
], ae = [
|
|
1391
|
+
L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1392
|
+
$ + O + 1
|
|
1393
|
+
], me = [
|
|
1394
|
+
[
|
|
1395
|
+
(s == null ? void 0 : s.left) ?? 0,
|
|
1396
|
+
H || L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0
|
|
1397
|
+
],
|
|
1398
|
+
[
|
|
1399
|
+
(s == null ? void 0 : s.right) ?? 0,
|
|
1400
|
+
H ? L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0 : ((s == null ? void 0 : s.bottom) ?? 0) - O
|
|
1401
|
+
]
|
|
1402
|
+
];
|
|
1403
|
+
return [le, ae, ...me];
|
|
1404
|
+
}
|
|
1405
|
+
case "bottom": {
|
|
1406
|
+
const le = [
|
|
1407
|
+
L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1408
|
+
$ - O
|
|
1409
|
+
], ae = [
|
|
1410
|
+
L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
|
|
1411
|
+
$ - O
|
|
1412
|
+
], me = [
|
|
1413
|
+
[
|
|
1414
|
+
(s == null ? void 0 : s.left) ?? 0,
|
|
1415
|
+
H || L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0
|
|
1416
|
+
],
|
|
1417
|
+
[
|
|
1418
|
+
(s == null ? void 0 : s.right) ?? 0,
|
|
1419
|
+
H ? L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0 : ((s == null ? void 0 : s.top) ?? 0) + O
|
|
1420
|
+
]
|
|
1421
|
+
];
|
|
1422
|
+
return [le, ae, ...me];
|
|
1423
|
+
}
|
|
1424
|
+
case "left": {
|
|
1425
|
+
const le = [
|
|
1426
|
+
B + O + 1,
|
|
1427
|
+
W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1428
|
+
], ae = [
|
|
1429
|
+
B + O + 1,
|
|
1430
|
+
W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1431
|
+
];
|
|
1432
|
+
return [...[
|
|
1433
|
+
[
|
|
1434
|
+
X || W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0,
|
|
1435
|
+
(s == null ? void 0 : s.top) ?? 0
|
|
1436
|
+
],
|
|
1437
|
+
[
|
|
1438
|
+
X ? W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0 : ((s == null ? void 0 : s.right) ?? 0) - O,
|
|
1439
|
+
(s == null ? void 0 : s.bottom) ?? 0
|
|
1440
|
+
]
|
|
1441
|
+
], le, ae];
|
|
1442
|
+
}
|
|
1443
|
+
case "right": {
|
|
1444
|
+
const le = [
|
|
1445
|
+
B - O,
|
|
1446
|
+
W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1447
|
+
], ae = [
|
|
1448
|
+
B - O,
|
|
1449
|
+
W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
|
|
1450
|
+
], me = [
|
|
1451
|
+
[
|
|
1452
|
+
X || W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0,
|
|
1453
|
+
(s == null ? void 0 : s.top) ?? 0
|
|
1454
|
+
],
|
|
1455
|
+
[
|
|
1456
|
+
X ? W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0 : ((s == null ? void 0 : s.left) ?? 0) + O,
|
|
1457
|
+
(s == null ? void 0 : s.bottom) ?? 0
|
|
1458
|
+
]
|
|
1459
|
+
];
|
|
1460
|
+
return [le, ae, ...me];
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
const Ae = Ee([h, f]);
|
|
1465
|
+
if ((ht = e.onPolygonChange) == null || ht.call(e, Ae), !Ft(M, te)) {
|
|
1466
|
+
if (Ft(M, Ae)) {
|
|
1467
|
+
if (!r && o) {
|
|
1468
|
+
const B = l(
|
|
1469
|
+
A.clientX,
|
|
1470
|
+
A.clientY,
|
|
1471
|
+
C,
|
|
1472
|
+
P,
|
|
1473
|
+
E
|
|
1474
|
+
);
|
|
1475
|
+
C = B.lastX, P = B.lastY, E = B.lastCursorTime, B.speed !== null && B.speed < 0.1 && (i = window.setTimeout(D, 40));
|
|
1476
|
+
}
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1479
|
+
if (r && !Z)
|
|
1480
|
+
return D();
|
|
1481
|
+
D();
|
|
1482
|
+
}
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
return a.__options = {
|
|
1486
|
+
blockPointerEvents: n
|
|
1487
|
+
}, a;
|
|
1488
|
+
}
|
|
1489
|
+
const Ht = 10;
|
|
1490
|
+
function uo(e, t, n) {
|
|
1491
|
+
const { delay: o } = n, i = I(() => {
|
|
1492
|
+
const c = S(o);
|
|
1149
1493
|
return (typeof c == "number" ? c : c.open) ?? 0;
|
|
1150
|
-
}),
|
|
1151
|
-
const c =
|
|
1494
|
+
}), r = I(() => {
|
|
1495
|
+
const c = S(o);
|
|
1152
1496
|
return (typeof c == "number" ? c : c.close) ?? 0;
|
|
1153
1497
|
});
|
|
1154
|
-
let
|
|
1155
|
-
const
|
|
1156
|
-
clearTimeout(
|
|
1498
|
+
let l, a;
|
|
1499
|
+
const u = () => {
|
|
1500
|
+
clearTimeout(l), clearTimeout(a);
|
|
1157
1501
|
};
|
|
1158
|
-
return
|
|
1502
|
+
return ge(u), {
|
|
1159
1503
|
show: (c) => {
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1504
|
+
u();
|
|
1505
|
+
const h = c ?? i.value;
|
|
1506
|
+
h === 0 ? e() : l = setTimeout(e, h);
|
|
1163
1507
|
},
|
|
1164
1508
|
hide: (c) => {
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1509
|
+
u();
|
|
1510
|
+
const h = c ?? r.value;
|
|
1511
|
+
h === 0 ? t() : a = setTimeout(t, h);
|
|
1168
1512
|
},
|
|
1169
1513
|
showDelay: i,
|
|
1170
|
-
hideDelay:
|
|
1171
|
-
clearTimeouts:
|
|
1514
|
+
hideDelay: r,
|
|
1515
|
+
clearTimeouts: u
|
|
1172
1516
|
};
|
|
1173
1517
|
}
|
|
1174
|
-
function
|
|
1175
|
-
const {
|
|
1176
|
-
open:
|
|
1177
|
-
setOpen:
|
|
1178
|
-
refs: { anchorEl:
|
|
1179
|
-
} =
|
|
1180
|
-
enabled:
|
|
1181
|
-
delay:
|
|
1182
|
-
restMs:
|
|
1183
|
-
mouseOnly:
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1518
|
+
function Do(e, t = {}) {
|
|
1519
|
+
const { floatingContext: n, treeContext: o } = rt(e), {
|
|
1520
|
+
open: i,
|
|
1521
|
+
setOpen: r,
|
|
1522
|
+
refs: { anchorEl: l, floatingEl: a }
|
|
1523
|
+
} = n, {
|
|
1524
|
+
enabled: u = !0,
|
|
1525
|
+
delay: c = 0,
|
|
1526
|
+
restMs: h = 0,
|
|
1527
|
+
mouseOnly: f = !1,
|
|
1528
|
+
safePolygon: p = !1
|
|
1529
|
+
} = t, d = I(() => S(u)), g = I(() => S(h)), m = I(() => {
|
|
1530
|
+
const v = l.value;
|
|
1531
|
+
return !v || v instanceof HTMLElement ? v : v.contextElement ?? null;
|
|
1532
|
+
}), { hide: b, show: w, showDelay: y, clearTimeouts: C } = uo(
|
|
1188
1533
|
() => {
|
|
1189
|
-
|
|
1534
|
+
i.value || r(!0);
|
|
1190
1535
|
},
|
|
1191
1536
|
() => {
|
|
1192
|
-
|
|
1537
|
+
i.value && r(!1);
|
|
1193
1538
|
},
|
|
1194
|
-
{ delay:
|
|
1539
|
+
{ delay: c }
|
|
1195
1540
|
);
|
|
1196
|
-
let
|
|
1197
|
-
const
|
|
1198
|
-
function
|
|
1199
|
-
if (!
|
|
1200
|
-
const
|
|
1201
|
-
(
|
|
1202
|
-
|
|
1203
|
-
},
|
|
1541
|
+
let P = null, E;
|
|
1542
|
+
const T = I(() => y.value === 0 && g.value > 0);
|
|
1543
|
+
function A(v) {
|
|
1544
|
+
if (!d.value || !N(v) || !T.value || !P) return;
|
|
1545
|
+
const H = { x: v.clientX, y: v.clientY }, X = Math.abs(H.x - P.x), Z = Math.abs(H.y - P.y);
|
|
1546
|
+
(X > Ht || Z > Ht) && (P = H, clearTimeout(E), E = setTimeout(() => {
|
|
1547
|
+
w(0);
|
|
1548
|
+
}, g.value));
|
|
1204
1549
|
}
|
|
1205
|
-
function
|
|
1206
|
-
!
|
|
1207
|
-
|
|
1208
|
-
},
|
|
1550
|
+
function D(v) {
|
|
1551
|
+
!d.value || !N(v) || !T.value || (P = { x: v.clientX, y: v.clientY }, E = setTimeout(() => {
|
|
1552
|
+
w(0);
|
|
1553
|
+
}, g.value));
|
|
1209
1554
|
}
|
|
1210
1555
|
function R() {
|
|
1211
|
-
clearTimeout(E),
|
|
1556
|
+
clearTimeout(E), P = null;
|
|
1212
1557
|
}
|
|
1213
|
-
|
|
1214
|
-
const
|
|
1215
|
-
!
|
|
1216
|
-
|
|
1558
|
+
Te(() => {
|
|
1559
|
+
const v = m.value;
|
|
1560
|
+
!v || !d.value || !T.value || (v.addEventListener("pointerenter", D), v.addEventListener("pointermove", A), v.addEventListener("pointerleave", R), ue(() => {
|
|
1561
|
+
v.removeEventListener("pointerenter", D), v.removeEventListener("pointermove", A), v.removeEventListener("pointerleave", R);
|
|
1217
1562
|
}));
|
|
1218
|
-
}),
|
|
1563
|
+
}), ge(() => {
|
|
1219
1564
|
clearTimeout(E);
|
|
1220
1565
|
});
|
|
1221
|
-
function
|
|
1222
|
-
return
|
|
1566
|
+
function N(v) {
|
|
1567
|
+
return S(f) ? v.pointerType === "mouse" : !0;
|
|
1223
1568
|
}
|
|
1224
|
-
function
|
|
1225
|
-
!
|
|
1569
|
+
function M(v) {
|
|
1570
|
+
!d.value || !N(v) || T.value || (F(), w());
|
|
1226
1571
|
}
|
|
1227
|
-
function k(
|
|
1228
|
-
!
|
|
1572
|
+
function k(v) {
|
|
1573
|
+
!d.value || !N(v) || (C(), F());
|
|
1229
1574
|
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1575
|
+
let V = null;
|
|
1576
|
+
function F() {
|
|
1577
|
+
V && (document.removeEventListener("pointermove", V), V = null);
|
|
1578
|
+
const v = x.value;
|
|
1579
|
+
v != null && v.onPolygonChange && v.onPolygonChange([]);
|
|
1233
1580
|
}
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1581
|
+
const Y = I(() => !!S(p)), x = I(() => {
|
|
1582
|
+
const v = S(p);
|
|
1583
|
+
if (typeof v == "object" && v) return v;
|
|
1584
|
+
if (v === !0) return {};
|
|
1585
|
+
});
|
|
1586
|
+
function s(v) {
|
|
1587
|
+
var L;
|
|
1588
|
+
if (!d.value || !N(v)) return;
|
|
1589
|
+
const { clientX: H, clientY: X } = v, Z = v.relatedTarget;
|
|
1590
|
+
if (Y.value)
|
|
1591
|
+
setTimeout(() => {
|
|
1592
|
+
var se;
|
|
1593
|
+
F();
|
|
1594
|
+
const W = m.value, ie = a.value;
|
|
1595
|
+
if (!W || !ie) {
|
|
1596
|
+
b();
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
let ee, re;
|
|
1600
|
+
if (o) {
|
|
1601
|
+
ee = /* @__PURE__ */ new Map();
|
|
1602
|
+
const te = (Ee) => {
|
|
1603
|
+
ee.set(Ee.id, Ee);
|
|
1604
|
+
for (const Ae of Ee.children.value)
|
|
1605
|
+
te(Ae);
|
|
1606
|
+
};
|
|
1607
|
+
te(o), re = o.id;
|
|
1608
|
+
}
|
|
1609
|
+
V = co(x.value)({
|
|
1610
|
+
x: H,
|
|
1611
|
+
y: X,
|
|
1612
|
+
placement: n.placement.value,
|
|
1613
|
+
elements: {
|
|
1614
|
+
domReference: W,
|
|
1615
|
+
floating: ie
|
|
1616
|
+
},
|
|
1617
|
+
buffer: ((se = x.value) == null ? void 0 : se.buffer) ?? 1,
|
|
1618
|
+
onClose: () => {
|
|
1619
|
+
F(), b();
|
|
1620
|
+
},
|
|
1621
|
+
nodeId: re,
|
|
1622
|
+
tree: ee ? { nodes: ee } : void 0
|
|
1623
|
+
}), V && document.addEventListener("pointermove", V);
|
|
1624
|
+
}, 0);
|
|
1625
|
+
else {
|
|
1626
|
+
if (o) {
|
|
1627
|
+
if (!fo(o, Z))
|
|
1628
|
+
return;
|
|
1629
|
+
} else if ((L = a.value) != null && L.contains(Z))
|
|
1630
|
+
return;
|
|
1631
|
+
b();
|
|
1632
|
+
}
|
|
1237
1633
|
}
|
|
1238
|
-
|
|
1239
|
-
const
|
|
1240
|
-
!
|
|
1241
|
-
|
|
1634
|
+
Te(() => {
|
|
1635
|
+
const v = m.value;
|
|
1636
|
+
!v || !d.value || (v.addEventListener("pointerenter", M), v.addEventListener("pointerleave", s), ue(() => {
|
|
1637
|
+
v.removeEventListener("pointerenter", M), v.removeEventListener("pointerleave", s);
|
|
1242
1638
|
}));
|
|
1243
|
-
}),
|
|
1244
|
-
const
|
|
1245
|
-
!
|
|
1246
|
-
|
|
1639
|
+
}), Te(() => {
|
|
1640
|
+
const v = a.value;
|
|
1641
|
+
!v || !d.value || (v.addEventListener("pointerenter", k), v.addEventListener("pointerleave", s), ue(() => {
|
|
1642
|
+
v.removeEventListener("pointerenter", k), v.removeEventListener("pointerleave", s);
|
|
1247
1643
|
}));
|
|
1644
|
+
}), ge(() => {
|
|
1645
|
+
F();
|
|
1248
1646
|
});
|
|
1249
1647
|
}
|
|
1250
|
-
function
|
|
1251
|
-
return
|
|
1648
|
+
function fo(e, t) {
|
|
1649
|
+
return t ? !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || st(e, t)) : !0;
|
|
1252
1650
|
}
|
|
1253
|
-
|
|
1651
|
+
function ho(e) {
|
|
1652
|
+
return en() ? (ge(e), !0) : !1;
|
|
1653
|
+
}
|
|
1654
|
+
const mo = typeof window < "u" && typeof document < "u";
|
|
1254
1655
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1255
|
-
const
|
|
1256
|
-
function
|
|
1656
|
+
const po = Object.prototype.toString, vo = (e) => po.call(e) === "[object Object]";
|
|
1657
|
+
function Ue(e) {
|
|
1257
1658
|
return Array.isArray(e) ? e : [e];
|
|
1258
1659
|
}
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1660
|
+
function go(e, t, n) {
|
|
1661
|
+
return pe(
|
|
1261
1662
|
e,
|
|
1262
1663
|
t,
|
|
1263
1664
|
{
|
|
@@ -1266,358 +1667,334 @@ function fn(e, t, n) {
|
|
|
1266
1667
|
}
|
|
1267
1668
|
);
|
|
1268
1669
|
}
|
|
1269
|
-
const
|
|
1270
|
-
function
|
|
1670
|
+
const wo = mo ? window : void 0;
|
|
1671
|
+
function yo(e) {
|
|
1271
1672
|
var t;
|
|
1272
|
-
const n =
|
|
1673
|
+
const n = S(e);
|
|
1273
1674
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1274
1675
|
}
|
|
1275
|
-
function
|
|
1676
|
+
function q(...e) {
|
|
1276
1677
|
const t = [], n = () => {
|
|
1277
|
-
t.forEach((
|
|
1278
|
-
}, o = (
|
|
1279
|
-
const
|
|
1280
|
-
return
|
|
1281
|
-
}),
|
|
1678
|
+
t.forEach((a) => a()), t.length = 0;
|
|
1679
|
+
}, o = (a, u, c, h) => (a.addEventListener(u, c, h), () => a.removeEventListener(u, c, h)), i = I(() => {
|
|
1680
|
+
const a = Ue(S(e[0])).filter((u) => u != null);
|
|
1681
|
+
return a.every((u) => typeof u != "string") ? a : void 0;
|
|
1682
|
+
}), r = go(
|
|
1282
1683
|
() => {
|
|
1283
|
-
var
|
|
1684
|
+
var a, u;
|
|
1284
1685
|
return [
|
|
1285
|
-
(
|
|
1286
|
-
|
|
1287
|
-
|
|
1686
|
+
(u = (a = i.value) == null ? void 0 : a.map((c) => yo(c))) != null ? u : [wo].filter((c) => c != null),
|
|
1687
|
+
Ue(S(i.value ? e[1] : e[0])),
|
|
1688
|
+
Ue(tn(i.value ? e[2] : e[1])),
|
|
1288
1689
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1289
|
-
|
|
1690
|
+
S(i.value ? e[3] : e[2])
|
|
1290
1691
|
];
|
|
1291
1692
|
},
|
|
1292
|
-
([
|
|
1293
|
-
if (n(), !(
|
|
1693
|
+
([a, u, c, h]) => {
|
|
1694
|
+
if (n(), !(a != null && a.length) || !(u != null && u.length) || !(c != null && c.length))
|
|
1294
1695
|
return;
|
|
1295
|
-
const
|
|
1696
|
+
const f = vo(h) ? { ...h } : h;
|
|
1296
1697
|
t.push(
|
|
1297
|
-
...
|
|
1298
|
-
(
|
|
1299
|
-
(
|
|
1698
|
+
...a.flatMap(
|
|
1699
|
+
(p) => u.flatMap(
|
|
1700
|
+
(d) => c.map((g) => o(p, d, g, f))
|
|
1300
1701
|
)
|
|
1301
1702
|
)
|
|
1302
1703
|
);
|
|
1303
1704
|
},
|
|
1304
1705
|
{ flush: "post" }
|
|
1305
|
-
),
|
|
1306
|
-
|
|
1706
|
+
), l = () => {
|
|
1707
|
+
r(), n();
|
|
1307
1708
|
};
|
|
1308
|
-
return
|
|
1309
|
-
}
|
|
1310
|
-
function
|
|
1311
|
-
const {
|
|
1312
|
-
open:
|
|
1313
|
-
setOpen:
|
|
1314
|
-
refs: { floatingEl:
|
|
1315
|
-
} =
|
|
1316
|
-
let
|
|
1317
|
-
|
|
1318
|
-
!
|
|
1319
|
-
}),
|
|
1320
|
-
|
|
1321
|
-
}),
|
|
1322
|
-
|
|
1709
|
+
return ho(n), l;
|
|
1710
|
+
}
|
|
1711
|
+
function Ro(e, t = {}) {
|
|
1712
|
+
const { floatingContext: n, treeContext: o } = rt(e), {
|
|
1713
|
+
open: i,
|
|
1714
|
+
setOpen: r,
|
|
1715
|
+
refs: { floatingEl: l, anchorEl: a }
|
|
1716
|
+
} = n, { enabled: u = !0, requireFocusVisible: c = !0 } = t, h = I(() => a.value ? a.value instanceof HTMLElement ? a.value : a.value.contextElement : null);
|
|
1717
|
+
let f = !1, p = !0, d;
|
|
1718
|
+
q(window, "blur", () => {
|
|
1719
|
+
!i.value && h.value && h.value === document.activeElement && (f = !0);
|
|
1720
|
+
}), q(window, "focus", () => {
|
|
1721
|
+
f = !1;
|
|
1722
|
+
}), nn(() => {
|
|
1723
|
+
Nt() && Dt() && (q(
|
|
1323
1724
|
window,
|
|
1324
1725
|
"keydown",
|
|
1325
1726
|
() => {
|
|
1326
|
-
|
|
1727
|
+
p = !0;
|
|
1327
1728
|
},
|
|
1328
1729
|
{ capture: !0 }
|
|
1329
|
-
),
|
|
1730
|
+
), q(
|
|
1330
1731
|
window,
|
|
1331
1732
|
"pointerdown",
|
|
1332
1733
|
() => {
|
|
1333
|
-
|
|
1734
|
+
p = !1;
|
|
1334
1735
|
},
|
|
1335
1736
|
{ capture: !0 }
|
|
1336
1737
|
));
|
|
1337
1738
|
});
|
|
1338
|
-
function
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1739
|
+
function g(b) {
|
|
1740
|
+
if (f) {
|
|
1741
|
+
f = !1;
|
|
1341
1742
|
return;
|
|
1342
1743
|
}
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1345
|
-
if (
|
|
1346
|
-
if (!
|
|
1744
|
+
const w = b.target;
|
|
1745
|
+
if (S(c) && w) {
|
|
1746
|
+
if (Nt() && Dt() && !b.relatedTarget) {
|
|
1747
|
+
if (!p && !Kt(w))
|
|
1347
1748
|
return;
|
|
1348
|
-
} else if (!
|
|
1749
|
+
} else if (!so(w))
|
|
1349
1750
|
return;
|
|
1350
1751
|
}
|
|
1351
|
-
|
|
1752
|
+
r(!0);
|
|
1352
1753
|
}
|
|
1353
|
-
function
|
|
1354
|
-
clearTimeout(
|
|
1355
|
-
var
|
|
1356
|
-
const
|
|
1357
|
-
!
|
|
1754
|
+
function m(b) {
|
|
1755
|
+
clearTimeout(d), d = window.setTimeout(() => {
|
|
1756
|
+
var C;
|
|
1757
|
+
const y = (((C = h.value) == null ? void 0 : C.ownerDocument) ?? document).activeElement;
|
|
1758
|
+
if (!(!b.relatedTarget && y === h.value)) {
|
|
1759
|
+
if (o) {
|
|
1760
|
+
if (y && bo(o, y))
|
|
1761
|
+
return;
|
|
1762
|
+
} else if (l.value && y && l.value.contains(y))
|
|
1763
|
+
return;
|
|
1764
|
+
r(!1);
|
|
1765
|
+
}
|
|
1358
1766
|
}, 0);
|
|
1359
1767
|
}
|
|
1360
|
-
|
|
1361
|
-
if (!
|
|
1362
|
-
const
|
|
1363
|
-
!
|
|
1364
|
-
|
|
1768
|
+
Te(() => {
|
|
1769
|
+
if (!S(u)) return;
|
|
1770
|
+
const b = h.value;
|
|
1771
|
+
!b || !(b instanceof HTMLElement) || (b.addEventListener("focus", g), b.addEventListener("blur", m), ue(() => {
|
|
1772
|
+
b.removeEventListener("focus", g), b.removeEventListener("blur", m);
|
|
1365
1773
|
}));
|
|
1366
|
-
}),
|
|
1367
|
-
clearTimeout(
|
|
1774
|
+
}), ge(() => {
|
|
1775
|
+
clearTimeout(d);
|
|
1368
1776
|
});
|
|
1369
1777
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return
|
|
1778
|
+
function bo(e, t) {
|
|
1779
|
+
return J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) ? !0 : Jt(e, t) !== null;
|
|
1372
1780
|
}
|
|
1373
|
-
function
|
|
1374
|
-
|
|
1781
|
+
function Jt(e, t) {
|
|
1782
|
+
for (const n of e.children.value)
|
|
1783
|
+
if (n.data.open.value) {
|
|
1784
|
+
if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
|
|
1785
|
+
return n;
|
|
1786
|
+
const o = Jt(n, t);
|
|
1787
|
+
if (o) return o;
|
|
1788
|
+
}
|
|
1789
|
+
return null;
|
|
1375
1790
|
}
|
|
1376
|
-
function
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1791
|
+
function ko(e, t = {}) {
|
|
1792
|
+
const { floatingContext: n, treeContext: o } = rt(e), { open: i, setOpen: r, refs: l } = n, {
|
|
1793
|
+
enabled: a = !0,
|
|
1794
|
+
event: u = "click",
|
|
1795
|
+
toggle: c = !0,
|
|
1796
|
+
ignoreMouse: h = !1,
|
|
1797
|
+
ignoreKeyboard: f = !1,
|
|
1798
|
+
ignoreTouch: p = !1,
|
|
1799
|
+
// Outside click options
|
|
1800
|
+
outsideClick: d = !1,
|
|
1801
|
+
outsideEvent: g = "pointerdown",
|
|
1802
|
+
outsideCapture: m = !0,
|
|
1803
|
+
onOutsideClick: b,
|
|
1804
|
+
preventScrollbarClick: w = !0,
|
|
1805
|
+
handleDragEvents: y = !0
|
|
1389
1806
|
} = t;
|
|
1390
|
-
let
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1807
|
+
let C, P = !1, E = !1, T = !1;
|
|
1808
|
+
const A = I(() => S(a)), D = I(() => S(d)), R = I(() => {
|
|
1809
|
+
const L = l.anchorEl.value;
|
|
1810
|
+
return L ? L instanceof HTMLElement ? L : io(L) && L.contextElement instanceof HTMLElement ? L.contextElement : null : null;
|
|
1811
|
+
}), N = I(() => l.floatingEl.value);
|
|
1812
|
+
function M() {
|
|
1813
|
+
T = !0;
|
|
1814
|
+
try {
|
|
1815
|
+
i.value ? S(c) && r(!1) : r(!0);
|
|
1816
|
+
} finally {
|
|
1817
|
+
Promise.resolve().then(() => {
|
|
1818
|
+
T = !1;
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
function k() {
|
|
1823
|
+
C = void 0, P = !1, E = !1;
|
|
1396
1824
|
}
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1825
|
+
function V(L) {
|
|
1826
|
+
C = L.pointerType;
|
|
1399
1827
|
}
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1402
|
-
const b = g.target;
|
|
1403
|
-
!n.value && b === h.value && g.preventDefault(), p();
|
|
1828
|
+
function F(L) {
|
|
1829
|
+
L.button === 0 && S(u) !== "click" && (Z(C) || M());
|
|
1404
1830
|
}
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1831
|
+
function Y() {
|
|
1832
|
+
if (S(u) === "mousedown" && C) {
|
|
1833
|
+
k();
|
|
1408
1834
|
return;
|
|
1409
1835
|
}
|
|
1410
|
-
if (
|
|
1411
|
-
|
|
1836
|
+
if (Z(C)) {
|
|
1837
|
+
k();
|
|
1412
1838
|
return;
|
|
1413
1839
|
}
|
|
1414
|
-
|
|
1840
|
+
M(), k();
|
|
1415
1841
|
}
|
|
1416
|
-
function
|
|
1417
|
-
if (
|
|
1842
|
+
function x(L) {
|
|
1843
|
+
if (C = void 0, L.defaultPrevented || S(f) || Mt(L))
|
|
1418
1844
|
return;
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1845
|
+
const W = R.value;
|
|
1846
|
+
W && (L.key === " " && !St(W) && (L.preventDefault(), P = !0), L.key === "Enter" && M());
|
|
1421
1847
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1848
|
+
function s(L) {
|
|
1849
|
+
const W = R.value;
|
|
1850
|
+
W && (L.defaultPrevented || S(f) || Mt(L) || St(W) || L.key === " " && P && (P = !1, M()));
|
|
1425
1851
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
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);
|
|
1430
|
-
}));
|
|
1431
|
-
});
|
|
1432
|
-
}
|
|
1433
|
-
function Ze(e, t) {
|
|
1434
|
-
return e === void 0 ? !1 : e === "mouse";
|
|
1435
|
-
}
|
|
1436
|
-
function ze(e) {
|
|
1437
|
-
return e.target instanceof HTMLElement && e.target.tagName === "BUTTON";
|
|
1438
|
-
}
|
|
1439
|
-
function mn(e) {
|
|
1440
|
-
return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1441
|
-
}
|
|
1442
|
-
function et(e) {
|
|
1443
|
-
return mn(e);
|
|
1444
|
-
}
|
|
1445
|
-
function Fn(e, t = {}) {
|
|
1446
|
-
const {
|
|
1447
|
-
enabled: n = !0,
|
|
1448
|
-
escapeKey: o = !0,
|
|
1449
|
-
outsidePress: i = !0,
|
|
1450
|
-
outsidePressEvent: s = "pointerdown",
|
|
1451
|
-
anchorPress: r = !1,
|
|
1452
|
-
anchorPressEvent: l = "pointerdown",
|
|
1453
|
-
ancestorScroll: a = !1,
|
|
1454
|
-
capture: c
|
|
1455
|
-
} = t, f = O(() => T(n)), u = e.refs.floatingEl, m = O(() => {
|
|
1456
|
-
const g = e.refs.anchorEl.value;
|
|
1457
|
-
return g ? g instanceof HTMLElement ? g : g.contextElement instanceof HTMLElement ? g.contextElement : null : null;
|
|
1458
|
-
}), { isComposing: h } = yn(), { escapeKey: p, outsidePress: d } = gn(c);
|
|
1459
|
-
let v = !1;
|
|
1460
|
-
const w = (g) => {
|
|
1461
|
-
!f.value || !e.open.value || !T(o) || g.key !== "Escape" || h() || e.setOpen(!1);
|
|
1462
|
-
}, E = (g) => {
|
|
1463
|
-
if (!f.value || !e.open.value)
|
|
1852
|
+
function v(L) {
|
|
1853
|
+
if (!A.value || !D.value || !i.value)
|
|
1464
1854
|
return;
|
|
1465
|
-
if (
|
|
1466
|
-
|
|
1855
|
+
if (S(g) === "click" && S(y) && E) {
|
|
1856
|
+
E = !1;
|
|
1467
1857
|
return;
|
|
1468
1858
|
}
|
|
1469
|
-
|
|
1470
|
-
if (!b || typeof b == "function" && !b(g))
|
|
1859
|
+
if (T)
|
|
1471
1860
|
return;
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1861
|
+
const W = L.target;
|
|
1862
|
+
if (W && !(S(w) && oo(W) && N.value && ro(L, W))) {
|
|
1863
|
+
if (o) {
|
|
1864
|
+
if (!xo(o, W))
|
|
1865
|
+
return;
|
|
1866
|
+
} else if (At(L, R.value) || At(L, N.value))
|
|
1867
|
+
return;
|
|
1868
|
+
b ? b(L, n) : r(!1);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
function H() {
|
|
1872
|
+
E = !0;
|
|
1873
|
+
}
|
|
1874
|
+
function X() {
|
|
1875
|
+
setTimeout(() => {
|
|
1876
|
+
E = !1;
|
|
1877
|
+
}, 0);
|
|
1878
|
+
}
|
|
1879
|
+
function Z(L) {
|
|
1880
|
+
return !!(Qe(L, !0) && S(h) || L === "touch" && S(p));
|
|
1881
|
+
}
|
|
1882
|
+
Te(() => {
|
|
1883
|
+
const L = R.value;
|
|
1884
|
+
!A.value || !L || (L.addEventListener("pointerdown", V), L.addEventListener("mousedown", F), L.addEventListener("click", Y), L.addEventListener("keydown", x), L.addEventListener("keyup", s), ue(() => {
|
|
1885
|
+
L.removeEventListener("pointerdown", V), L.removeEventListener("mousedown", F), L.removeEventListener("click", Y), L.removeEventListener("keydown", x), L.removeEventListener("keyup", s), k();
|
|
1886
|
+
}));
|
|
1887
|
+
}), q(
|
|
1888
|
+
() => A.value && D.value ? document : null,
|
|
1889
|
+
() => S(g),
|
|
1890
|
+
v,
|
|
1891
|
+
{ capture: S(m) }
|
|
1892
|
+
), q(
|
|
1893
|
+
() => A.value && D.value && S(y) ? N.value : null,
|
|
1492
1894
|
"mousedown",
|
|
1493
|
-
|
|
1494
|
-
v = !0;
|
|
1495
|
-
},
|
|
1895
|
+
H,
|
|
1496
1896
|
{ capture: !0 }
|
|
1497
|
-
),
|
|
1498
|
-
|
|
1897
|
+
), q(
|
|
1898
|
+
() => A.value && D.value && S(y) ? N.value : null,
|
|
1499
1899
|
"mouseup",
|
|
1500
|
-
|
|
1501
|
-
v = !0;
|
|
1502
|
-
},
|
|
1900
|
+
X,
|
|
1503
1901
|
{ capture: !0 }
|
|
1504
1902
|
);
|
|
1505
1903
|
}
|
|
1506
|
-
function
|
|
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
|
-
};
|
|
1904
|
+
function xo(e, t) {
|
|
1905
|
+
return !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || st(e, t));
|
|
1531
1906
|
}
|
|
1532
|
-
function
|
|
1907
|
+
function Fo(e, t, n = {}) {
|
|
1533
1908
|
const { open: o, refs: i } = t;
|
|
1534
|
-
let
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1537
|
-
x:
|
|
1538
|
-
y:
|
|
1539
|
-
}, o.value && (i.anchorEl.value =
|
|
1909
|
+
let r;
|
|
1910
|
+
const l = U({ x: null, y: null }), a = I(() => S(n.axis ?? "both")), u = I(() => S(n.enabled ?? !0)), c = I(() => S(n.x ?? null)), h = I(() => S(n.y ?? null)), f = (m, b) => {
|
|
1911
|
+
l.value = {
|
|
1912
|
+
x: m,
|
|
1913
|
+
y: b
|
|
1914
|
+
}, o.value && (i.anchorEl.value = Eo(
|
|
1540
1915
|
e.value,
|
|
1541
|
-
|
|
1542
|
-
|
|
1916
|
+
a.value,
|
|
1917
|
+
l.value
|
|
1543
1918
|
));
|
|
1544
1919
|
};
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1920
|
+
pt(() => {
|
|
1921
|
+
const m = c.value, b = h.value;
|
|
1922
|
+
u.value && m != null && b != null && f(m, b);
|
|
1548
1923
|
});
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
o.value &&
|
|
1924
|
+
const p = (m) => {
|
|
1925
|
+
r = m.pointerType, f(m.clientX, m.clientY);
|
|
1926
|
+
}, d = (m) => {
|
|
1927
|
+
r = m.pointerType, !o.value && Qe(r, !0) && f(m.clientX, m.clientY);
|
|
1928
|
+
}, g = (m) => {
|
|
1929
|
+
o.value && Qe(r, !0) && f(m.clientX, m.clientY);
|
|
1555
1930
|
};
|
|
1556
|
-
return
|
|
1557
|
-
if (c.value != null ||
|
|
1558
|
-
const
|
|
1559
|
-
!
|
|
1560
|
-
|
|
1931
|
+
return pt(() => {
|
|
1932
|
+
if (c.value != null || h.value != null) return;
|
|
1933
|
+
const m = e.value;
|
|
1934
|
+
!m || !u.value || (m.addEventListener("pointerenter", d), m.addEventListener("pointerdown", p), m.addEventListener("pointermove", g), ue(() => {
|
|
1935
|
+
m == null || m.removeEventListener("pointerenter", d), m == null || m.removeEventListener("pointerdown", p), m == null || m.removeEventListener("pointermove", g);
|
|
1561
1936
|
}));
|
|
1562
1937
|
}), {
|
|
1563
|
-
coordinates:
|
|
1564
|
-
updatePosition:
|
|
1938
|
+
coordinates: on(l),
|
|
1939
|
+
updatePosition: f
|
|
1565
1940
|
};
|
|
1566
1941
|
}
|
|
1567
|
-
function
|
|
1942
|
+
function Eo(e, t, n) {
|
|
1568
1943
|
let o = null, i = null;
|
|
1569
|
-
const
|
|
1944
|
+
const r = e;
|
|
1570
1945
|
return {
|
|
1571
|
-
contextElement:
|
|
1946
|
+
contextElement: r || void 0,
|
|
1572
1947
|
getBoundingClientRect: () => {
|
|
1573
|
-
const
|
|
1948
|
+
const l = (r == null ? void 0 : r.getBoundingClientRect()) ?? {
|
|
1574
1949
|
width: 0,
|
|
1575
1950
|
height: 0,
|
|
1576
1951
|
x: 0,
|
|
1577
1952
|
y: 0
|
|
1578
|
-
},
|
|
1579
|
-
let c = 0,
|
|
1580
|
-
return
|
|
1953
|
+
}, a = t === "x" || t === "both", u = t === "y" || t === "both";
|
|
1954
|
+
let c = 0, h = 0, f = l.x, p = l.y;
|
|
1955
|
+
return r && (o == null && n.x != null && a && (o = l.x - n.x), i == null && n.y != null && u && (i = l.y - n.y), f -= o || 0, p -= i || 0), a && n.x != null ? f = n.x : (o = null, c = l.width), u && n.y != null ? p = n.y : (i = null, h = l.height), t === "both" && (c = 0, h = 0), {
|
|
1581
1956
|
width: c,
|
|
1582
|
-
height:
|
|
1583
|
-
x:
|
|
1584
|
-
y:
|
|
1585
|
-
top:
|
|
1586
|
-
right:
|
|
1587
|
-
bottom:
|
|
1588
|
-
left:
|
|
1957
|
+
height: h,
|
|
1958
|
+
x: f,
|
|
1959
|
+
y: p,
|
|
1960
|
+
top: p,
|
|
1961
|
+
right: f + c,
|
|
1962
|
+
bottom: p + h,
|
|
1963
|
+
left: f
|
|
1589
1964
|
};
|
|
1590
1965
|
}
|
|
1591
1966
|
};
|
|
1592
1967
|
}
|
|
1593
|
-
function
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1968
|
+
function Ho(e) {
|
|
1969
|
+
const { enabled: t = !0, onEscape: n, capture: o } = e, { isComposing: i } = To();
|
|
1970
|
+
q(
|
|
1971
|
+
document,
|
|
1972
|
+
"keydown",
|
|
1973
|
+
(r) => {
|
|
1974
|
+
r.key !== "Escape" || !S(t) || i() || n(r);
|
|
1975
|
+
},
|
|
1976
|
+
o
|
|
1977
|
+
);
|
|
1597
1978
|
}
|
|
1598
|
-
function
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1979
|
+
function To() {
|
|
1980
|
+
const e = U(!1);
|
|
1981
|
+
return q(document, "compositionstart", () => {
|
|
1982
|
+
e.value = !0;
|
|
1983
|
+
}), q(document, "compositionend", () => {
|
|
1984
|
+
e.value = !1;
|
|
1985
|
+
}), {
|
|
1986
|
+
isComposing: () => e.value
|
|
1606
1987
|
};
|
|
1607
1988
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
return `vfloat-id-${bn++}`;
|
|
1611
|
-
}
|
|
1612
|
-
var se;
|
|
1613
|
-
class ot {
|
|
1989
|
+
var Le;
|
|
1990
|
+
class Bt {
|
|
1614
1991
|
constructor(t, n = null, o = {}, i = !1) {
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
this.id = o.id ??
|
|
1992
|
+
ce(this, "id");
|
|
1993
|
+
ce(this, "data");
|
|
1994
|
+
ce(this, "parent");
|
|
1995
|
+
ce(this, "children");
|
|
1996
|
+
Ne(this, Le);
|
|
1997
|
+
this.id = o.id ?? to(), this.data = t, this.parent = qe(n), this.children = qe([]), Ye(this, Le, i);
|
|
1621
1998
|
}
|
|
1622
1999
|
/**
|
|
1623
2000
|
* Adds an existing node instance to this node's children array.
|
|
@@ -1688,16 +2065,16 @@ class ot {
|
|
|
1688
2065
|
}
|
|
1689
2066
|
/** Checks if the node is the true root of the tree, distinct from an orphaned node. */
|
|
1690
2067
|
get isRoot() {
|
|
1691
|
-
return
|
|
2068
|
+
return Xe(this, Le);
|
|
1692
2069
|
}
|
|
1693
2070
|
/** Checks if the node is a leaf node (has no children). */
|
|
1694
2071
|
get isLeaf() {
|
|
1695
2072
|
return this.children.value.length === 0;
|
|
1696
2073
|
}
|
|
1697
2074
|
}
|
|
1698
|
-
|
|
1699
|
-
var
|
|
1700
|
-
class
|
|
2075
|
+
Le = new WeakMap();
|
|
2076
|
+
var Pe, Oe, Ze;
|
|
2077
|
+
class Co {
|
|
1701
2078
|
/**
|
|
1702
2079
|
* Creates a new Tree instance.
|
|
1703
2080
|
* @param initialRootData Data for the root node.
|
|
@@ -1710,13 +2087,13 @@ class Tn {
|
|
|
1710
2087
|
* ```
|
|
1711
2088
|
*/
|
|
1712
2089
|
constructor(t, n) {
|
|
1713
|
-
|
|
2090
|
+
Ne(this, Oe);
|
|
1714
2091
|
/** The root node of the tree. */
|
|
1715
|
-
|
|
2092
|
+
ce(this, "root");
|
|
1716
2093
|
/** Readonly reactive map of node IDs to TreeNode instances for quick lookups. */
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
2094
|
+
ce(this, "nodeMap");
|
|
2095
|
+
Ne(this, Pe);
|
|
2096
|
+
Ye(this, Pe, (n == null ? void 0 : n.deleteStrategy) ?? "recursive"), this.nodeMap = rn(/* @__PURE__ */ new Map()), this.root = new Bt(t, null, {}, !0), this.nodeMap.set(this.root.id, this.root);
|
|
1720
2097
|
}
|
|
1721
2098
|
/**
|
|
1722
2099
|
* Finds a node anywhere in the tree by its ID.
|
|
@@ -1738,8 +2115,8 @@ class Tn {
|
|
|
1738
2115
|
if (!i)
|
|
1739
2116
|
return console.error(`Tree addNode: Parent node with ID ${n} not found.`), null;
|
|
1740
2117
|
o.id && this.nodeMap.has(o.id) && (o.id = void 0);
|
|
1741
|
-
const
|
|
1742
|
-
return this.nodeMap.set(
|
|
2118
|
+
const r = new Bt(t, i, o);
|
|
2119
|
+
return this.nodeMap.set(r.id, r), i.addChild(r), r;
|
|
1743
2120
|
}
|
|
1744
2121
|
/**
|
|
1745
2122
|
* Removes a node from the tree by its ID.
|
|
@@ -1749,20 +2126,20 @@ class Tn {
|
|
|
1749
2126
|
* @returns True if the node was successfully removed, false otherwise.
|
|
1750
2127
|
*/
|
|
1751
2128
|
removeNode(t, n) {
|
|
1752
|
-
const o = n ??
|
|
2129
|
+
const o = n ?? Xe(this, Pe), i = this.findNodeById(t);
|
|
1753
2130
|
if (!i)
|
|
1754
2131
|
return !1;
|
|
1755
2132
|
if (i.isRoot)
|
|
1756
2133
|
return console.error("Tree removeNode: Cannot remove the root node."), !1;
|
|
1757
|
-
const
|
|
2134
|
+
const r = i.parent.value;
|
|
1758
2135
|
if (o === "recursive")
|
|
1759
|
-
|
|
2136
|
+
je(this, Oe, Ze).call(this, i);
|
|
1760
2137
|
else {
|
|
1761
|
-
for (const
|
|
1762
|
-
|
|
2138
|
+
for (const l of i.children.value)
|
|
2139
|
+
l.parent.value = null;
|
|
1763
2140
|
i.children.value = [], this.nodeMap.delete(i.id);
|
|
1764
2141
|
}
|
|
1765
|
-
return
|
|
2142
|
+
return r._removeChildInstance(i);
|
|
1766
2143
|
}
|
|
1767
2144
|
/**
|
|
1768
2145
|
* Moves a node to become a child of a new parent.
|
|
@@ -1783,9 +2160,9 @@ class Tn {
|
|
|
1783
2160
|
return console.error(`Tree moveNode: New parent node with ID ${n} not found.`), !1;
|
|
1784
2161
|
if (i.isDescendantOf(o))
|
|
1785
2162
|
return console.error("Tree moveNode: Cannot move a node to become its own descendant."), !1;
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1788
|
-
if (!
|
|
2163
|
+
const r = o.parent.value;
|
|
2164
|
+
if (r) {
|
|
2165
|
+
if (!r._removeChildInstance(o))
|
|
1789
2166
|
return console.error("Tree moveNode: Failed to remove node from its original parent."), !1;
|
|
1790
2167
|
} else if (o.isRoot) {
|
|
1791
2168
|
if (o.isRoot)
|
|
@@ -1806,18 +2183,18 @@ class Tn {
|
|
|
1806
2183
|
if (t === "dfs") {
|
|
1807
2184
|
const i = [n];
|
|
1808
2185
|
for (; i.length > 0; ) {
|
|
1809
|
-
const
|
|
1810
|
-
o.push(
|
|
1811
|
-
for (let
|
|
1812
|
-
i.push(
|
|
2186
|
+
const r = i.pop();
|
|
2187
|
+
o.push(r);
|
|
2188
|
+
for (let l = r.children.value.length - 1; l >= 0; l--)
|
|
2189
|
+
i.push(r.children.value[l]);
|
|
1813
2190
|
}
|
|
1814
2191
|
} else {
|
|
1815
2192
|
const i = [n];
|
|
1816
2193
|
for (; i.length > 0; ) {
|
|
1817
|
-
const
|
|
1818
|
-
o.push(
|
|
1819
|
-
for (const
|
|
1820
|
-
i.push(
|
|
2194
|
+
const r = i.shift();
|
|
2195
|
+
o.push(r);
|
|
2196
|
+
for (const l of r.children.value)
|
|
2197
|
+
i.push(l);
|
|
1821
2198
|
}
|
|
1822
2199
|
}
|
|
1823
2200
|
return o;
|
|
@@ -1832,118 +2209,137 @@ class Tn {
|
|
|
1832
2209
|
this.nodeMap.clear();
|
|
1833
2210
|
}
|
|
1834
2211
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
2212
|
+
Pe = new WeakMap(), Oe = new WeakSet(), // --- Internal Recursive Helper for Deletion/Cleanup ---
|
|
2213
|
+
Ze = function(t) {
|
|
1837
2214
|
const n = [...t.children.value];
|
|
1838
2215
|
for (const o of n)
|
|
1839
|
-
|
|
2216
|
+
je(this, Oe, Ze).call(this, o);
|
|
1840
2217
|
this.nodeMap.delete(t.id), t.children.value = [];
|
|
1841
2218
|
};
|
|
1842
|
-
function
|
|
1843
|
-
const n =
|
|
2219
|
+
function Bo(e, t, n = {}, o = {}) {
|
|
2220
|
+
const { parentId: i, ...r } = n, l = Lt(e, t, r), a = new Co(l, o);
|
|
1844
2221
|
return {
|
|
1845
2222
|
// Wrap original Tree methods in arrow functions to preserve context
|
|
1846
2223
|
get nodeMap() {
|
|
1847
|
-
return
|
|
2224
|
+
return a.nodeMap;
|
|
1848
2225
|
},
|
|
1849
2226
|
get root() {
|
|
1850
|
-
return
|
|
2227
|
+
return a.root;
|
|
1851
2228
|
},
|
|
1852
|
-
findNodeById: (
|
|
1853
|
-
moveNode: (
|
|
1854
|
-
dispose: () =>
|
|
1855
|
-
|
|
1856
|
-
removeNode: (r, l) => n.removeNode(r, l),
|
|
1857
|
-
traverse: (r, l) => n.traverse(r, l),
|
|
1858
|
-
isTopmost: (r) => {
|
|
1859
|
-
const l = n.findNodeById(r);
|
|
1860
|
-
if (!l || !l.data.open.value)
|
|
1861
|
-
return !1;
|
|
1862
|
-
let a = l.parent.value;
|
|
1863
|
-
for (; a; ) {
|
|
1864
|
-
if (a.data.open.value)
|
|
1865
|
-
return !1;
|
|
1866
|
-
a = a.parent.value;
|
|
1867
|
-
}
|
|
1868
|
-
return !0;
|
|
2229
|
+
findNodeById: (w) => a.findNodeById(w),
|
|
2230
|
+
moveNode: (w, y) => a.moveNode(w, y),
|
|
2231
|
+
dispose: () => {
|
|
2232
|
+
a.dispose();
|
|
1869
2233
|
},
|
|
2234
|
+
addNode: (w, y, C = {}) => {
|
|
2235
|
+
const { parentId: P, ...E } = C, T = Lt(w, y, E);
|
|
2236
|
+
return a.addNode(T, P);
|
|
2237
|
+
},
|
|
2238
|
+
removeNode: (w, y) => a.removeNode(w, y),
|
|
2239
|
+
traverse: (w, y) => a.traverse(w, y),
|
|
1870
2240
|
getAllOpenNodes: () => {
|
|
1871
|
-
const
|
|
1872
|
-
for (const
|
|
1873
|
-
|
|
1874
|
-
return
|
|
2241
|
+
const w = [];
|
|
2242
|
+
for (const y of a.nodeMap.values())
|
|
2243
|
+
y.data.open.value && w.push(y);
|
|
2244
|
+
return w;
|
|
2245
|
+
},
|
|
2246
|
+
getTopmostOpenNode: () => {
|
|
2247
|
+
let w = null, y = -1;
|
|
2248
|
+
for (const C of a.nodeMap.values())
|
|
2249
|
+
if (C.data.open.value) {
|
|
2250
|
+
const P = C.getPath().length;
|
|
2251
|
+
P > y && (y = P, w = C);
|
|
2252
|
+
}
|
|
2253
|
+
return w;
|
|
1875
2254
|
},
|
|
1876
|
-
forEach: (
|
|
1877
|
-
const { relationship:
|
|
1878
|
-
if (!
|
|
2255
|
+
forEach: (w, y, C = {}) => {
|
|
2256
|
+
const { relationship: P = "self-and-children", applyToMatching: E = !0 } = C, T = a.findNodeById(w);
|
|
2257
|
+
if (!T)
|
|
1879
2258
|
return;
|
|
1880
|
-
const
|
|
1881
|
-
|
|
1882
|
-
},
|
|
1883
|
-
for (const
|
|
1884
|
-
|
|
2259
|
+
const A = [], D = /* @__PURE__ */ new Set(), R = (M) => {
|
|
2260
|
+
M && !D.has(M.id) && (A.push(M), D.add(M.id));
|
|
2261
|
+
}, N = (M) => {
|
|
2262
|
+
for (const k of M)
|
|
2263
|
+
R(k);
|
|
1885
2264
|
};
|
|
1886
|
-
if (
|
|
1887
|
-
for (const
|
|
1888
|
-
|
|
1889
|
-
else if (
|
|
1890
|
-
if (
|
|
1891
|
-
for (const
|
|
1892
|
-
|
|
1893
|
-
} else if (
|
|
1894
|
-
for (const
|
|
1895
|
-
|
|
1896
|
-
else if (
|
|
1897
|
-
|
|
1898
|
-
else if (
|
|
1899
|
-
|
|
1900
|
-
else if (
|
|
1901
|
-
|
|
1902
|
-
else if (
|
|
1903
|
-
|
|
1904
|
-
else if (
|
|
1905
|
-
|
|
1906
|
-
else if (
|
|
1907
|
-
|
|
1908
|
-
else if (
|
|
1909
|
-
|
|
1910
|
-
else if (
|
|
1911
|
-
const
|
|
1912
|
-
for (const
|
|
1913
|
-
|
|
1914
|
-
for (const
|
|
1915
|
-
|
|
1916
|
-
for (const
|
|
1917
|
-
!
|
|
2265
|
+
if (P === "ancestors-only")
|
|
2266
|
+
for (const M of T.getPath())
|
|
2267
|
+
M.id !== T.id && R(M);
|
|
2268
|
+
else if (P === "siblings-only") {
|
|
2269
|
+
if (T.parent.value)
|
|
2270
|
+
for (const M of T.parent.value.children.value)
|
|
2271
|
+
M.id !== T.id && R(M);
|
|
2272
|
+
} else if (P === "descendants-only")
|
|
2273
|
+
for (const M of a.traverse("dfs", T))
|
|
2274
|
+
M.id !== T.id && R(M);
|
|
2275
|
+
else if (P === "children-only")
|
|
2276
|
+
N(T.children.value);
|
|
2277
|
+
else if (P === "self-and-ancestors")
|
|
2278
|
+
N(T.getPath());
|
|
2279
|
+
else if (P === "self-and-children")
|
|
2280
|
+
R(T), N(T.children.value);
|
|
2281
|
+
else if (P === "self-and-descendants")
|
|
2282
|
+
N(a.traverse("dfs", T));
|
|
2283
|
+
else if (P === "self-and-siblings")
|
|
2284
|
+
R(T), T.parent.value && N(T.parent.value.children.value);
|
|
2285
|
+
else if (P === "self-ancestors-and-children")
|
|
2286
|
+
N(T.getPath()), N(T.children.value);
|
|
2287
|
+
else if (P === "full-branch")
|
|
2288
|
+
N(T.getPath()), N(a.traverse("dfs", T));
|
|
2289
|
+
else if (P === "all-except-branch") {
|
|
2290
|
+
const M = /* @__PURE__ */ new Set();
|
|
2291
|
+
for (const k of T.getPath())
|
|
2292
|
+
M.add(k.id);
|
|
2293
|
+
for (const k of a.traverse("dfs", T))
|
|
2294
|
+
M.add(k.id);
|
|
2295
|
+
for (const k of a.nodeMap.values())
|
|
2296
|
+
!M.has(k.id) === E && y(k);
|
|
1918
2297
|
return;
|
|
1919
2298
|
} else {
|
|
1920
|
-
console.warn(`forEach: Unknown relationship "${
|
|
2299
|
+
console.warn(`forEach: Unknown relationship "${P}".`);
|
|
1921
2300
|
return;
|
|
1922
2301
|
}
|
|
1923
|
-
if (
|
|
1924
|
-
for (const
|
|
1925
|
-
|
|
2302
|
+
if (E)
|
|
2303
|
+
for (const M of A)
|
|
2304
|
+
y(M);
|
|
1926
2305
|
else
|
|
1927
|
-
for (const
|
|
1928
|
-
|
|
2306
|
+
for (const M of a.nodeMap.values())
|
|
2307
|
+
D.has(M.id) || y(M);
|
|
1929
2308
|
}
|
|
1930
2309
|
};
|
|
1931
2310
|
}
|
|
1932
2311
|
export {
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2312
|
+
Co as Tree,
|
|
2313
|
+
Bt as TreeNode,
|
|
2314
|
+
kt as clearTimeoutIfSet,
|
|
2315
|
+
ze as contains,
|
|
2316
|
+
st as findDescendantContainingTarget,
|
|
2317
|
+
So as flip,
|
|
2318
|
+
rt as getContextFromParameter,
|
|
2319
|
+
Rt as getCurrentTime,
|
|
2320
|
+
lo as getTarget,
|
|
2321
|
+
Ao as hide,
|
|
2322
|
+
Mt as isButtonTarget,
|
|
2323
|
+
ro as isClickOnScrollbar,
|
|
2324
|
+
At as isEventTargetWithin,
|
|
2325
|
+
oo as isHTMLElement,
|
|
2326
|
+
Nt as isMac,
|
|
2327
|
+
Qe as isMouseLikePointerType,
|
|
2328
|
+
Dt as isSafari,
|
|
2329
|
+
St as isSpaceIgnored,
|
|
2330
|
+
J as isTargetWithinElement,
|
|
2331
|
+
no as isTreeNode,
|
|
2332
|
+
Kt as isTypeableElement,
|
|
2333
|
+
io as isVirtualElement,
|
|
2334
|
+
so as matchesFocusVisible,
|
|
2335
|
+
Oo as offset,
|
|
2336
|
+
Mo as shift,
|
|
2337
|
+
No as useArrow,
|
|
2338
|
+
ko as useClick,
|
|
2339
|
+
Fo as useClientPoint,
|
|
2340
|
+
Ho as useEscapeKey,
|
|
2341
|
+
Lt as useFloating,
|
|
2342
|
+
Bo as useFloatingTree,
|
|
2343
|
+
Ro as useFocus,
|
|
2344
|
+
Do as useHover
|
|
1949
2345
|
};
|