@leaflink/stash 52.0.0 → 52.0.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.
@@ -1,60 +1,60 @@
1
- import { computed as z, ref as et, shallowRef as It, watch as mt, getCurrentScope as jt, onScopeDispose as Xt, shallowReadonly as G, unref as Yt } from "vue";
2
- const j = Math.min, E = Math.max, st = Math.round, rt = Math.floor, W = (t) => ({
1
+ import { computed as I, ref as nt, shallowRef as Xt, watch as mt, getCurrentScope as Yt, onScopeDispose as qt, shallowReadonly as G, unref as Ut } from "vue";
2
+ const j = Math.min, E = Math.max, st = Math.round, rt = Math.floor, k = (t) => ({
3
3
  x: t,
4
4
  y: t
5
- }), qt = {
5
+ }), Kt = {
6
6
  left: "right",
7
7
  right: "left",
8
8
  bottom: "top",
9
9
  top: "bottom"
10
- }, Ut = {
10
+ }, Gt = {
11
11
  start: "end",
12
12
  end: "start"
13
13
  };
14
- function Kt(t, e, n) {
14
+ function gt(t, e, n) {
15
15
  return E(t, j(e, n));
16
16
  }
17
- function ot(t, e) {
17
+ function tt(t, e) {
18
18
  return typeof t == "function" ? t(e) : t;
19
19
  }
20
- function q(t) {
20
+ function X(t) {
21
21
  return t.split("-")[0];
22
22
  }
23
- function tt(t) {
23
+ function et(t) {
24
24
  return t.split("-")[1];
25
25
  }
26
- function Gt(t) {
26
+ function Vt(t) {
27
27
  return t === "x" ? "y" : "x";
28
28
  }
29
29
  function yt(t) {
30
30
  return t === "y" ? "height" : "width";
31
31
  }
32
32
  const Jt = /* @__PURE__ */ new Set(["top", "bottom"]);
33
- function I(t) {
34
- return Jt.has(q(t)) ? "y" : "x";
33
+ function $(t) {
34
+ return Jt.has(X(t)) ? "y" : "x";
35
35
  }
36
36
  function vt(t) {
37
- return Gt(I(t));
37
+ return Vt($(t));
38
38
  }
39
39
  function Qt(t, e, n) {
40
40
  n === void 0 && (n = !1);
41
- const o = tt(t), i = vt(t), s = yt(i);
41
+ const o = et(t), i = vt(t), s = yt(i);
42
42
  let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
43
43
  return e.reference[s] > e.floating[s] && (r = lt(r)), [r, lt(r)];
44
44
  }
45
45
  function Zt(t) {
46
46
  const e = lt(t);
47
- return [gt(t), e, gt(e)];
47
+ return [pt(t), e, pt(e)];
48
48
  }
49
- function gt(t) {
50
- return t.replace(/start|end/g, (e) => Ut[e]);
49
+ function pt(t) {
50
+ return t.replace(/start|end/g, (e) => Gt[e]);
51
51
  }
52
- const At = ["left", "right"], Ct = ["right", "left"], te = ["top", "bottom"], ee = ["bottom", "top"];
52
+ const St = ["left", "right"], Et = ["right", "left"], te = ["top", "bottom"], ee = ["bottom", "top"];
53
53
  function ne(t, e, n) {
54
54
  switch (t) {
55
55
  case "top":
56
56
  case "bottom":
57
- return n ? e ? Ct : At : e ? At : Ct;
57
+ return n ? e ? Et : St : e ? St : Et;
58
58
  case "left":
59
59
  case "right":
60
60
  return e ? te : ee;
@@ -63,12 +63,12 @@ function ne(t, e, n) {
63
63
  }
64
64
  }
65
65
  function oe(t, e, n, o) {
66
- const i = tt(t);
67
- let s = ne(q(t), n === "start", o);
68
- return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(gt)))), s;
66
+ const i = et(t);
67
+ let s = ne(X(t), n === "start", o);
68
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(pt)))), s;
69
69
  }
70
70
  function lt(t) {
71
- return t.replace(/left|right|bottom|top/g, (e) => qt[e]);
71
+ return t.replace(/left|right|bottom|top/g, (e) => Kt[e]);
72
72
  }
73
73
  function ie(t) {
74
74
  return {
@@ -79,7 +79,7 @@ function ie(t) {
79
79
  ...t
80
80
  };
81
81
  }
82
- function Mt(t) {
82
+ function kt(t) {
83
83
  return typeof t != "number" ? ie(t) : {
84
84
  top: t,
85
85
  right: t,
@@ -105,23 +105,23 @@ function ct(t) {
105
105
  y: n
106
106
  };
107
107
  }
108
- function St(t, e, n) {
108
+ function Dt(t, e, n) {
109
109
  let {
110
110
  reference: o,
111
111
  floating: i
112
112
  } = t;
113
- const s = I(e), r = vt(e), l = yt(r), f = q(e), c = s === "y", a = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[l] / 2 - i[l] / 2;
113
+ const s = $(e), r = vt(e), l = yt(r), f = X(e), a = s === "y", c = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[l] / 2 - i[l] / 2;
114
114
  let u;
115
115
  switch (f) {
116
116
  case "top":
117
117
  u = {
118
- x: a,
118
+ x: c,
119
119
  y: o.y - i.height
120
120
  };
121
121
  break;
122
122
  case "bottom":
123
123
  u = {
124
- x: a,
124
+ x: c,
125
125
  y: o.y + o.height
126
126
  };
127
127
  break;
@@ -143,12 +143,12 @@ function St(t, e, n) {
143
143
  y: o.y
144
144
  };
145
145
  }
146
- switch (tt(e)) {
146
+ switch (et(e)) {
147
147
  case "start":
148
- u[r] -= h * (n && c ? -1 : 1);
148
+ u[r] -= h * (n && a ? -1 : 1);
149
149
  break;
150
150
  case "end":
151
- u[r] += h * (n && c ? -1 : 1);
151
+ u[r] += h * (n && a ? -1 : 1);
152
152
  break;
153
153
  }
154
154
  return u;
@@ -160,61 +160,61 @@ const re = async (t, e, n) => {
160
160
  middleware: s = [],
161
161
  platform: r
162
162
  } = n, l = s.filter(Boolean), f = await (r.isRTL == null ? void 0 : r.isRTL(e));
163
- let c = await r.getElementRects({
163
+ let a = await r.getElementRects({
164
164
  reference: t,
165
165
  floating: e,
166
166
  strategy: i
167
167
  }), {
168
- x: a,
168
+ x: c,
169
169
  y: d
170
- } = St(c, o, f), h = o, u = {}, m = 0;
170
+ } = Dt(a, o, f), h = o, u = {}, m = 0;
171
171
  for (let g = 0; g < l.length; g++) {
172
172
  const {
173
- name: w,
174
- fn: y
173
+ name: p,
174
+ fn: w
175
175
  } = l[g], {
176
- x: v,
177
- y: x,
178
- data: R,
176
+ x,
177
+ y: v,
178
+ data: A,
179
179
  reset: b
180
- } = await y({
181
- x: a,
180
+ } = await w({
181
+ x: c,
182
182
  y: d,
183
183
  initialPlacement: o,
184
184
  placement: h,
185
185
  strategy: i,
186
186
  middlewareData: u,
187
- rects: c,
187
+ rects: a,
188
188
  platform: r,
189
189
  elements: {
190
190
  reference: t,
191
191
  floating: e
192
192
  }
193
193
  });
194
- a = v ?? a, d = x ?? d, u = {
194
+ c = x ?? c, d = v ?? d, u = {
195
195
  ...u,
196
- [w]: {
197
- ...u[w],
198
- ...R
196
+ [p]: {
197
+ ...u[p],
198
+ ...A
199
199
  }
200
- }, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
200
+ }, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
201
201
  reference: t,
202
202
  floating: e,
203
203
  strategy: i
204
204
  }) : b.rects), {
205
- x: a,
205
+ x: c,
206
206
  y: d
207
- } = St(c, h, f)), g = -1);
207
+ } = Dt(a, h, f)), g = -1);
208
208
  }
209
209
  return {
210
- x: a,
210
+ x: c,
211
211
  y: d,
212
212
  placement: h,
213
213
  strategy: i,
214
214
  middlewareData: u
215
215
  };
216
216
  };
217
- async function Ft(t, e) {
217
+ async function bt(t, e) {
218
218
  var n;
219
219
  e === void 0 && (e = {});
220
220
  const {
@@ -225,22 +225,22 @@ async function Ft(t, e) {
225
225
  elements: l,
226
226
  strategy: f
227
227
  } = t, {
228
- boundary: c = "clippingAncestors",
229
- rootBoundary: a = "viewport",
228
+ boundary: a = "clippingAncestors",
229
+ rootBoundary: c = "viewport",
230
230
  elementContext: d = "floating",
231
231
  altBoundary: h = !1,
232
232
  padding: u = 0
233
- } = ot(e, t), m = Mt(u), w = l[h ? d === "floating" ? "reference" : "floating" : d], y = ct(await s.getClippingRect({
234
- element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
235
- boundary: c,
236
- rootBoundary: a,
233
+ } = tt(e, t), m = kt(u), p = l[h ? d === "floating" ? "reference" : "floating" : d], w = ct(await s.getClippingRect({
234
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
235
+ boundary: a,
236
+ rootBoundary: c,
237
237
  strategy: f
238
- })), v = d === "floating" ? {
238
+ })), x = d === "floating" ? {
239
239
  x: o,
240
240
  y: i,
241
241
  width: r.floating.width,
242
242
  height: r.floating.height
243
- } : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
243
+ } : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), A = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
244
244
  x: 1,
245
245
  y: 1
246
246
  } : {
@@ -248,15 +248,15 @@ async function Ft(t, e) {
248
248
  y: 1
249
249
  }, b = ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
250
250
  elements: l,
251
- rect: v,
252
- offsetParent: x,
251
+ rect: x,
252
+ offsetParent: v,
253
253
  strategy: f
254
- }) : v);
254
+ }) : x);
255
255
  return {
256
- top: (y.top - b.top + m.top) / R.y,
257
- bottom: (b.bottom - y.bottom + m.bottom) / R.y,
258
- left: (y.left - b.left + m.left) / R.x,
259
- right: (b.right - y.right + m.right) / R.x
256
+ top: (w.top - b.top + m.top) / A.y,
257
+ bottom: (b.bottom - w.bottom + m.bottom) / A.y,
258
+ left: (w.left - b.left + m.left) / A.x,
259
+ right: (b.right - w.right + m.right) / A.x
260
260
  };
261
261
  }
262
262
  const se = (t) => ({
@@ -272,23 +272,23 @@ const se = (t) => ({
272
272
  elements: l,
273
273
  middlewareData: f
274
274
  } = e, {
275
- element: c,
276
- padding: a = 0
277
- } = ot(t, e) || {};
278
- if (c == null)
275
+ element: a,
276
+ padding: c = 0
277
+ } = tt(t, e) || {};
278
+ if (a == null)
279
279
  return {};
280
- const d = Mt(a), h = {
280
+ const d = kt(c), h = {
281
281
  x: n,
282
282
  y: o
283
- }, u = vt(i), m = yt(u), g = await r.getDimensions(c), w = u === "y", y = w ? "top" : "left", v = w ? "bottom" : "right", x = w ? "clientHeight" : "clientWidth", R = s.reference[m] + s.reference[u] - h[u] - s.floating[m], b = h[u] - s.reference[u], C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
284
- let p = C ? C[x] : 0;
285
- (!p || !await (r.isElement == null ? void 0 : r.isElement(C))) && (p = l.floating[x] || s.floating[m]);
286
- const O = R / 2 - b / 2, S = p / 2 - g[m] / 2 - 1, L = j(d[y], S), $ = j(d[v], S), V = L, _ = p - g[m] - $, A = p / 2 - g[m] / 2 + O, Y = Kt(V, A, _), N = !f.arrow && tt(i) != null && A !== Y && s.reference[m] / 2 - (A < V ? L : $) - g[m] / 2 < 0, T = N ? A < V ? A - V : A - _ : 0;
283
+ }, u = vt(i), m = yt(u), g = await r.getDimensions(a), p = u === "y", w = p ? "top" : "left", x = p ? "bottom" : "right", v = p ? "clientHeight" : "clientWidth", A = s.reference[m] + s.reference[u] - h[u] - s.floating[m], b = h[u] - s.reference[u], C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
284
+ let y = C ? C[v] : 0;
285
+ (!y || !await (r.isElement == null ? void 0 : r.isElement(C))) && (y = l.floating[v] || s.floating[m]);
286
+ const O = A / 2 - b / 2, S = y / 2 - g[m] / 2 - 1, L = j(d[w], S), _ = j(d[x], S), V = L, H = y - g[m] - _, R = y / 2 - g[m] / 2 + O, q = gt(V, R, H), N = !f.arrow && et(i) != null && R !== q && s.reference[m] / 2 - (R < V ? L : _) - g[m] / 2 < 0, T = N ? R < V ? R - V : R - H : 0;
287
287
  return {
288
288
  [u]: h[u] + T,
289
289
  data: {
290
- [u]: Y,
291
- centerOffset: A - Y - T,
290
+ [u]: q,
291
+ centerOffset: R - q - T,
292
292
  ...N && {
293
293
  alignmentOffset: T
294
294
  }
@@ -308,58 +308,58 @@ const se = (t) => ({
308
308
  rects: r,
309
309
  initialPlacement: l,
310
310
  platform: f,
311
- elements: c
311
+ elements: a
312
312
  } = e, {
313
- mainAxis: a = !0,
313
+ mainAxis: c = !0,
314
314
  crossAxis: d = !0,
315
315
  fallbackPlacements: h,
316
316
  fallbackStrategy: u = "bestFit",
317
317
  fallbackAxisSideDirection: m = "none",
318
318
  flipAlignment: g = !0,
319
- ...w
320
- } = ot(t, e);
319
+ ...p
320
+ } = tt(t, e);
321
321
  if ((n = s.arrow) != null && n.alignmentOffset)
322
322
  return {};
323
- const y = q(i), v = I(l), x = q(l) === l, R = await (f.isRTL == null ? void 0 : f.isRTL(c.floating)), b = h || (x || !g ? [lt(l)] : Zt(l)), C = m !== "none";
324
- !h && C && b.push(...oe(l, g, m, R));
325
- const p = [l, ...b], O = await Ft(e, w), S = [];
323
+ const w = X(i), x = $(l), v = X(l) === l, A = await (f.isRTL == null ? void 0 : f.isRTL(a.floating)), b = h || (v || !g ? [lt(l)] : Zt(l)), C = m !== "none";
324
+ !h && C && b.push(...oe(l, g, m, A));
325
+ const y = [l, ...b], O = await bt(e, p), S = [];
326
326
  let L = ((o = s.flip) == null ? void 0 : o.overflows) || [];
327
- if (a && S.push(O[y]), d) {
328
- const A = Qt(i, r, R);
329
- S.push(O[A[0]], O[A[1]]);
327
+ if (c && S.push(O[w]), d) {
328
+ const R = Qt(i, r, A);
329
+ S.push(O[R[0]], O[R[1]]);
330
330
  }
331
331
  if (L = [...L, {
332
332
  placement: i,
333
333
  overflows: S
334
- }], !S.every((A) => A <= 0)) {
335
- var $, V;
336
- const A = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, Y = p[A];
337
- if (Y && (!(d === "alignment" ? v !== I(Y) : !1) || // We leave the current main axis only if every placement on that axis
334
+ }], !S.every((R) => R <= 0)) {
335
+ var _, V;
336
+ const R = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, q = y[R];
337
+ if (q && (!(d === "alignment" ? x !== $(q) : !1) || // We leave the current main axis only if every placement on that axis
338
338
  // overflows the main axis.
339
- L.every((P) => I(P.placement) === v ? P.overflows[0] > 0 : !0)))
339
+ L.every((P) => $(P.placement) === x ? P.overflows[0] > 0 : !0)))
340
340
  return {
341
341
  data: {
342
- index: A,
342
+ index: R,
343
343
  overflows: L
344
344
  },
345
345
  reset: {
346
- placement: Y
346
+ placement: q
347
347
  }
348
348
  };
349
349
  let N = (V = L.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : V.placement;
350
350
  if (!N)
351
351
  switch (u) {
352
352
  case "bestFit": {
353
- var _;
354
- const T = (_ = L.filter((P) => {
353
+ var H;
354
+ const T = (H = L.filter((P) => {
355
355
  if (C) {
356
- const H = I(P.placement);
357
- return H === v || // Create a bias to the `y` side axis due to horizontal
356
+ const z = $(P.placement);
357
+ return z === x || // Create a bias to the `y` side axis due to horizontal
358
358
  // reading directions favoring greater width.
359
- H === "y";
359
+ z === "y";
360
360
  }
361
361
  return !0;
362
- }).map((P) => [P.placement, P.overflows.filter((H) => H > 0).reduce((H, zt) => H + zt, 0)]).sort((P, H) => P[1] - H[1])[0]) == null ? void 0 : _[0];
362
+ }).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, jt) => z + jt, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : H[0];
363
363
  T && (N = T);
364
364
  break;
365
365
  }
@@ -383,7 +383,7 @@ async function ae(t, e) {
383
383
  placement: n,
384
384
  platform: o,
385
385
  elements: i
386
- } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = q(n), l = tt(n), f = I(n) === "y", c = ce.has(r) ? -1 : 1, a = s && f ? -1 : 1, d = ot(e, t);
386
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = X(n), l = et(n), f = $(n) === "y", a = ce.has(r) ? -1 : 1, c = s && f ? -1 : 1, d = tt(e, t);
387
387
  let {
388
388
  mainAxis: h,
389
389
  crossAxis: u,
@@ -398,11 +398,11 @@ async function ae(t, e) {
398
398
  alignmentAxis: d.alignmentAxis
399
399
  };
400
400
  return l && typeof m == "number" && (u = l === "end" ? m * -1 : m), f ? {
401
- x: u * a,
402
- y: h * c
401
+ x: u * c,
402
+ y: h * a
403
403
  } : {
404
- x: h * c,
405
- y: u * a
404
+ x: h * a,
405
+ y: u * c
406
406
  };
407
407
  }
408
408
  const fe = function(t) {
@@ -428,6 +428,62 @@ const fe = function(t) {
428
428
  }
429
429
  };
430
430
  }, ue = function(t) {
431
+ return t === void 0 && (t = {}), {
432
+ name: "shift",
433
+ options: t,
434
+ async fn(e) {
435
+ const {
436
+ x: n,
437
+ y: o,
438
+ placement: i
439
+ } = e, {
440
+ mainAxis: s = !0,
441
+ crossAxis: r = !1,
442
+ limiter: l = {
443
+ fn: (p) => {
444
+ let {
445
+ x: w,
446
+ y: x
447
+ } = p;
448
+ return {
449
+ x: w,
450
+ y: x
451
+ };
452
+ }
453
+ },
454
+ ...f
455
+ } = tt(t, e), a = {
456
+ x: n,
457
+ y: o
458
+ }, c = await bt(e, f), d = $(X(i)), h = Vt(d);
459
+ let u = a[h], m = a[d];
460
+ if (s) {
461
+ const p = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", x = u + c[p], v = u - c[w];
462
+ u = gt(x, u, v);
463
+ }
464
+ if (r) {
465
+ const p = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", x = m + c[p], v = m - c[w];
466
+ m = gt(x, m, v);
467
+ }
468
+ const g = l.fn({
469
+ ...e,
470
+ [h]: u,
471
+ [d]: m
472
+ });
473
+ return {
474
+ ...g,
475
+ data: {
476
+ x: g.x - n,
477
+ y: g.y - o,
478
+ enabled: {
479
+ [h]: s,
480
+ [d]: r
481
+ }
482
+ }
483
+ };
484
+ }
485
+ };
486
+ }, de = function(t) {
431
487
  return t === void 0 && (t = {}), {
432
488
  name: "size",
433
489
  options: t,
@@ -441,23 +497,23 @@ const fe = function(t) {
441
497
  } = e, {
442
498
  apply: f = () => {
443
499
  },
444
- ...c
445
- } = ot(t, e), a = await Ft(e, c), d = q(i), h = tt(i), u = I(i) === "y", {
500
+ ...a
501
+ } = tt(t, e), c = await bt(e, a), d = X(i), h = et(i), u = $(i) === "y", {
446
502
  width: m,
447
503
  height: g
448
504
  } = s.floating;
449
- let w, y;
450
- d === "top" || d === "bottom" ? (w = d, y = h === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = d, w = h === "end" ? "top" : "bottom");
451
- const v = g - a.top - a.bottom, x = m - a.left - a.right, R = j(g - a[w], v), b = j(m - a[y], x), C = !e.middlewareData.shift;
452
- let p = R, O = b;
453
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = x), (o = e.middlewareData.shift) != null && o.enabled.y && (p = v), C && !h) {
454
- const L = E(a.left, 0), $ = E(a.right, 0), V = E(a.top, 0), _ = E(a.bottom, 0);
455
- u ? O = m - 2 * (L !== 0 || $ !== 0 ? L + $ : E(a.left, a.right)) : p = g - 2 * (V !== 0 || _ !== 0 ? V + _ : E(a.top, a.bottom));
505
+ let p, w;
506
+ d === "top" || d === "bottom" ? (p = d, w = h === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = d, p = h === "end" ? "top" : "bottom");
507
+ const x = g - c.top - c.bottom, v = m - c.left - c.right, A = j(g - c[p], x), b = j(m - c[w], v), C = !e.middlewareData.shift;
508
+ let y = A, O = b;
509
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = v), (o = e.middlewareData.shift) != null && o.enabled.y && (y = x), C && !h) {
510
+ const L = E(c.left, 0), _ = E(c.right, 0), V = E(c.top, 0), H = E(c.bottom, 0);
511
+ u ? O = m - 2 * (L !== 0 || _ !== 0 ? L + _ : E(c.left, c.right)) : y = g - 2 * (V !== 0 || H !== 0 ? V + H : E(c.top, c.bottom));
456
512
  }
457
513
  await f({
458
514
  ...e,
459
515
  availableWidth: O,
460
- availableHeight: p
516
+ availableHeight: y
461
517
  });
462
518
  const S = await r.getDimensions(l.floating);
463
519
  return m !== S.width || g !== S.height ? {
@@ -472,7 +528,7 @@ function at() {
472
528
  return typeof window < "u";
473
529
  }
474
530
  function K(t) {
475
- return xt(t) ? (t.nodeName || "").toLowerCase() : "#document";
531
+ return At(t) ? (t.nodeName || "").toLowerCase() : "#document";
476
532
  }
477
533
  function D(t) {
478
534
  var e;
@@ -480,21 +536,21 @@ function D(t) {
480
536
  }
481
537
  function B(t) {
482
538
  var e;
483
- return (e = (xt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
539
+ return (e = (At(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
484
540
  }
485
- function xt(t) {
541
+ function At(t) {
486
542
  return at() ? t instanceof Node || t instanceof D(t).Node : !1;
487
543
  }
488
544
  function M(t) {
489
545
  return at() ? t instanceof Element || t instanceof D(t).Element : !1;
490
546
  }
491
- function k(t) {
547
+ function W(t) {
492
548
  return at() ? t instanceof HTMLElement || t instanceof D(t).HTMLElement : !1;
493
549
  }
494
- function Et(t) {
550
+ function Lt(t) {
495
551
  return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof D(t).ShadowRoot;
496
552
  }
497
- const de = /* @__PURE__ */ new Set(["inline", "contents"]);
553
+ const me = /* @__PURE__ */ new Set(["inline", "contents"]);
498
554
  function it(t) {
499
555
  const {
500
556
  overflow: e,
@@ -502,15 +558,15 @@ function it(t) {
502
558
  overflowY: o,
503
559
  display: i
504
560
  } = F(t);
505
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !de.has(i);
561
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !me.has(i);
506
562
  }
507
- const me = /* @__PURE__ */ new Set(["table", "td", "th"]);
508
- function he(t) {
509
- return me.has(K(t));
563
+ const he = /* @__PURE__ */ new Set(["table", "td", "th"]);
564
+ function ge(t) {
565
+ return he.has(K(t));
510
566
  }
511
- const ge = [":popover-open", ":modal"];
567
+ const pe = [":popover-open", ":modal"];
512
568
  function ft(t) {
513
- return ge.some((e) => {
569
+ return pe.some((e) => {
514
570
  try {
515
571
  return t.matches(e);
516
572
  } catch {
@@ -518,28 +574,28 @@ function ft(t) {
518
574
  }
519
575
  });
520
576
  }
521
- const pe = ["transform", "translate", "scale", "rotate", "perspective"], we = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ye = ["paint", "layout", "strict", "content"];
522
- function bt(t) {
577
+ const we = ["transform", "translate", "scale", "rotate", "perspective"], xe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ye = ["paint", "layout", "strict", "content"];
578
+ function Ot(t) {
523
579
  const e = Rt(), n = M(t) ? F(t) : t;
524
- return pe.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || we.some((o) => (n.willChange || "").includes(o)) || ye.some((o) => (n.contain || "").includes(o));
580
+ return we.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || xe.some((o) => (n.willChange || "").includes(o)) || ye.some((o) => (n.contain || "").includes(o));
525
581
  }
526
582
  function ve(t) {
527
- let e = X(t);
528
- for (; k(e) && !Z(e); ) {
529
- if (bt(e))
583
+ let e = Y(t);
584
+ for (; W(e) && !Z(e); ) {
585
+ if (Ot(e))
530
586
  return e;
531
587
  if (ft(e))
532
588
  return null;
533
- e = X(e);
589
+ e = Y(e);
534
590
  }
535
591
  return null;
536
592
  }
537
593
  function Rt() {
538
594
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
539
595
  }
540
- const xe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
596
+ const be = /* @__PURE__ */ new Set(["html", "body", "#document"]);
541
597
  function Z(t) {
542
- return xe.has(K(t));
598
+ return be.has(K(t));
543
599
  }
544
600
  function F(t) {
545
601
  return D(t).getComputedStyle(t);
@@ -553,108 +609,108 @@ function ut(t) {
553
609
  scrollTop: t.scrollY
554
610
  };
555
611
  }
556
- function X(t) {
612
+ function Y(t) {
557
613
  if (K(t) === "html")
558
614
  return t;
559
615
  const e = (
560
616
  // Step into the shadow DOM of the parent of a slotted node.
561
617
  t.assignedSlot || // DOM Element detected.
562
618
  t.parentNode || // ShadowRoot detected.
563
- Et(t) && t.host || // Fallback.
619
+ Lt(t) && t.host || // Fallback.
564
620
  B(t)
565
621
  );
566
- return Et(e) ? e.host : e;
622
+ return Lt(e) ? e.host : e;
567
623
  }
568
- function Vt(t) {
569
- const e = X(t);
570
- return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && it(e) ? e : Vt(e);
624
+ function Wt(t) {
625
+ const e = Y(t);
626
+ return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && it(e) ? e : Wt(e);
571
627
  }
572
- function nt(t, e, n) {
628
+ function ot(t, e, n) {
573
629
  var o;
574
630
  e === void 0 && (e = []), n === void 0 && (n = !0);
575
- const i = Vt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = D(i);
631
+ const i = Wt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = D(i);
576
632
  if (s) {
577
- const l = pt(r);
578
- return e.concat(r, r.visualViewport || [], it(i) ? i : [], l && n ? nt(l) : []);
633
+ const l = wt(r);
634
+ return e.concat(r, r.visualViewport || [], it(i) ? i : [], l && n ? ot(l) : []);
579
635
  }
580
- return e.concat(i, nt(i, [], n));
636
+ return e.concat(i, ot(i, [], n));
581
637
  }
582
- function pt(t) {
638
+ function wt(t) {
583
639
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
584
640
  }
585
- function Wt(t) {
641
+ function Bt(t) {
586
642
  const e = F(t);
587
643
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
588
- const i = k(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = st(n) !== s || st(o) !== r;
644
+ const i = W(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = st(n) !== s || st(o) !== r;
589
645
  return l && (n = s, o = r), {
590
646
  width: n,
591
647
  height: o,
592
648
  $: l
593
649
  };
594
650
  }
595
- function Ot(t) {
651
+ function Ct(t) {
596
652
  return M(t) ? t : t.contextElement;
597
653
  }
598
654
  function Q(t) {
599
- const e = Ot(t);
600
- if (!k(e))
601
- return W(1);
655
+ const e = Ct(t);
656
+ if (!W(e))
657
+ return k(1);
602
658
  const n = e.getBoundingClientRect(), {
603
659
  width: o,
604
660
  height: i,
605
661
  $: s
606
- } = Wt(e);
662
+ } = Bt(e);
607
663
  let r = (s ? st(n.width) : n.width) / o, l = (s ? st(n.height) : n.height) / i;
608
664
  return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
609
665
  x: r,
610
666
  y: l
611
667
  };
612
668
  }
613
- const be = /* @__PURE__ */ W(0);
614
- function kt(t) {
669
+ const Ae = /* @__PURE__ */ k(0);
670
+ function Nt(t) {
615
671
  const e = D(t);
616
- return !Rt() || !e.visualViewport ? be : {
672
+ return !Rt() || !e.visualViewport ? Ae : {
617
673
  x: e.visualViewport.offsetLeft,
618
674
  y: e.visualViewport.offsetTop
619
675
  };
620
676
  }
621
- function Re(t, e, n) {
677
+ function Oe(t, e, n) {
622
678
  return e === void 0 && (e = !1), !n || e && n !== D(t) ? !1 : e;
623
679
  }
624
680
  function U(t, e, n, o) {
625
681
  e === void 0 && (e = !1), n === void 0 && (n = !1);
626
- const i = t.getBoundingClientRect(), s = Ot(t);
627
- let r = W(1);
682
+ const i = t.getBoundingClientRect(), s = Ct(t);
683
+ let r = k(1);
628
684
  e && (o ? M(o) && (r = Q(o)) : r = Q(t));
629
- const l = Re(s, n, o) ? kt(s) : W(0);
630
- let f = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, a = i.width / r.x, d = i.height / r.y;
685
+ const l = Oe(s, n, o) ? Nt(s) : k(0);
686
+ let f = (i.left + l.x) / r.x, a = (i.top + l.y) / r.y, c = i.width / r.x, d = i.height / r.y;
631
687
  if (s) {
632
688
  const h = D(s), u = o && M(o) ? D(o) : o;
633
- let m = h, g = pt(m);
689
+ let m = h, g = wt(m);
634
690
  for (; g && o && u !== m; ) {
635
- const w = Q(g), y = g.getBoundingClientRect(), v = F(g), x = y.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, R = y.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
636
- f *= w.x, c *= w.y, a *= w.x, d *= w.y, f += x, c += R, m = D(g), g = pt(m);
691
+ const p = Q(g), w = g.getBoundingClientRect(), x = F(g), v = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * p.x, A = w.top + (g.clientTop + parseFloat(x.paddingTop)) * p.y;
692
+ f *= p.x, a *= p.y, c *= p.x, d *= p.y, f += v, a += A, m = D(g), g = wt(m);
637
693
  }
638
694
  }
639
695
  return ct({
640
- width: a,
696
+ width: c,
641
697
  height: d,
642
698
  x: f,
643
- y: c
699
+ y: a
644
700
  });
645
701
  }
646
702
  function dt(t, e) {
647
703
  const n = ut(t).scrollLeft;
648
704
  return e ? e.left + n : U(B(t)).left + n;
649
705
  }
650
- function Bt(t, e) {
706
+ function $t(t, e) {
651
707
  const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - dt(t, n), i = n.top + e.scrollTop;
652
708
  return {
653
709
  x: o,
654
710
  y: i
655
711
  };
656
712
  }
657
- function Oe(t) {
713
+ function Re(t) {
658
714
  let {
659
715
  elements: e,
660
716
  rect: n,
@@ -667,24 +723,24 @@ function Oe(t) {
667
723
  let f = {
668
724
  scrollLeft: 0,
669
725
  scrollTop: 0
670
- }, c = W(1);
671
- const a = W(0), d = k(o);
672
- if ((d || !d && !s) && ((K(o) !== "body" || it(r)) && (f = ut(o)), k(o))) {
726
+ }, a = k(1);
727
+ const c = k(0), d = W(o);
728
+ if ((d || !d && !s) && ((K(o) !== "body" || it(r)) && (f = ut(o)), W(o))) {
673
729
  const u = U(o);
674
- c = Q(o), a.x = u.x + o.clientLeft, a.y = u.y + o.clientTop;
730
+ a = Q(o), c.x = u.x + o.clientLeft, c.y = u.y + o.clientTop;
675
731
  }
676
- const h = r && !d && !s ? Bt(r, f) : W(0);
732
+ const h = r && !d && !s ? $t(r, f) : k(0);
677
733
  return {
678
- width: n.width * c.x,
679
- height: n.height * c.y,
680
- x: n.x * c.x - f.scrollLeft * c.x + a.x + h.x,
681
- y: n.y * c.y - f.scrollTop * c.y + a.y + h.y
734
+ width: n.width * a.x,
735
+ height: n.height * a.y,
736
+ x: n.x * a.x - f.scrollLeft * a.x + c.x + h.x,
737
+ y: n.y * a.y - f.scrollTop * a.y + c.y + h.y
682
738
  };
683
739
  }
684
- function Ae(t) {
740
+ function Ce(t) {
685
741
  return Array.from(t.getClientRects());
686
742
  }
687
- function Ce(t) {
743
+ function Se(t) {
688
744
  const e = B(t), n = ut(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
689
745
  let r = -n.scrollLeft + dt(t);
690
746
  const l = -n.scrollTop;
@@ -695,20 +751,20 @@ function Ce(t) {
695
751
  y: l
696
752
  };
697
753
  }
698
- const Dt = 25;
699
- function Se(t, e) {
754
+ const Tt = 25;
755
+ function Ee(t, e) {
700
756
  const n = D(t), o = B(t), i = n.visualViewport;
701
757
  let s = o.clientWidth, r = o.clientHeight, l = 0, f = 0;
702
758
  if (i) {
703
759
  s = i.width, r = i.height;
704
- const a = Rt();
705
- (!a || a && e === "fixed") && (l = i.offsetLeft, f = i.offsetTop);
760
+ const c = Rt();
761
+ (!c || c && e === "fixed") && (l = i.offsetLeft, f = i.offsetTop);
706
762
  }
707
- const c = dt(o);
708
- if (c <= 0) {
709
- const a = o.ownerDocument, d = a.body, h = getComputedStyle(d), u = a.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - d.clientWidth - u);
710
- m <= Dt && (s -= m);
711
- } else c <= Dt && (s += c);
763
+ const a = dt(o);
764
+ if (a <= 0) {
765
+ const c = o.ownerDocument, d = c.body, h = getComputedStyle(d), u = c.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - d.clientWidth - u);
766
+ m <= Tt && (s -= m);
767
+ } else a <= Tt && (s += a);
712
768
  return {
713
769
  width: s,
714
770
  height: r,
@@ -716,26 +772,26 @@ function Se(t, e) {
716
772
  y: f
717
773
  };
718
774
  }
719
- const Ee = /* @__PURE__ */ new Set(["absolute", "fixed"]);
720
- function De(t, e) {
721
- const n = U(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = k(t) ? Q(t) : W(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, f = i * s.x, c = o * s.y;
775
+ const De = /* @__PURE__ */ new Set(["absolute", "fixed"]);
776
+ function Le(t, e) {
777
+ const n = U(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = W(t) ? Q(t) : k(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, f = i * s.x, a = o * s.y;
722
778
  return {
723
779
  width: r,
724
780
  height: l,
725
781
  x: f,
726
- y: c
782
+ y: a
727
783
  };
728
784
  }
729
- function Lt(t, e, n) {
785
+ function Pt(t, e, n) {
730
786
  let o;
731
787
  if (e === "viewport")
732
- o = Se(t, n);
788
+ o = Ee(t, n);
733
789
  else if (e === "document")
734
- o = Ce(B(t));
790
+ o = Se(B(t));
735
791
  else if (M(e))
736
- o = De(e, n);
792
+ o = Le(e, n);
737
793
  else {
738
- const i = kt(t);
794
+ const i = Nt(t);
739
795
  o = {
740
796
  x: e.x - i.x,
741
797
  y: e.y - i.y,
@@ -745,34 +801,34 @@ function Lt(t, e, n) {
745
801
  }
746
802
  return ct(o);
747
803
  }
748
- function Nt(t, e) {
749
- const n = X(t);
750
- return n === e || !M(n) || Z(n) ? !1 : F(n).position === "fixed" || Nt(n, e);
804
+ function _t(t, e) {
805
+ const n = Y(t);
806
+ return n === e || !M(n) || Z(n) ? !1 : F(n).position === "fixed" || _t(n, e);
751
807
  }
752
- function Le(t, e) {
808
+ function Te(t, e) {
753
809
  const n = e.get(t);
754
810
  if (n)
755
811
  return n;
756
- let o = nt(t, [], !1).filter((l) => M(l) && K(l) !== "body"), i = null;
812
+ let o = ot(t, [], !1).filter((l) => M(l) && K(l) !== "body"), i = null;
757
813
  const s = F(t).position === "fixed";
758
- let r = s ? X(t) : t;
814
+ let r = s ? Y(t) : t;
759
815
  for (; M(r) && !Z(r); ) {
760
- const l = F(r), f = bt(r);
761
- !f && l.position === "fixed" && (i = null), (s ? !f && !i : !f && l.position === "static" && !!i && Ee.has(i.position) || it(r) && !f && Nt(t, r)) ? o = o.filter((a) => a !== r) : i = l, r = X(r);
816
+ const l = F(r), f = Ot(r);
817
+ !f && l.position === "fixed" && (i = null), (s ? !f && !i : !f && l.position === "static" && !!i && De.has(i.position) || it(r) && !f && _t(t, r)) ? o = o.filter((c) => c !== r) : i = l, r = Y(r);
762
818
  }
763
819
  return e.set(t, o), o;
764
820
  }
765
- function Te(t) {
821
+ function Pe(t) {
766
822
  let {
767
823
  element: e,
768
824
  boundary: n,
769
825
  rootBoundary: o,
770
826
  strategy: i
771
827
  } = t;
772
- const r = [...n === "clippingAncestors" ? ft(e) ? [] : Le(e, this._c) : [].concat(n), o], l = r[0], f = r.reduce((c, a) => {
773
- const d = Lt(e, a, i);
774
- return c.top = E(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = E(d.left, c.left), c;
775
- }, Lt(e, l, i));
828
+ const r = [...n === "clippingAncestors" ? ft(e) ? [] : Te(e, this._c) : [].concat(n), o], l = r[0], f = r.reduce((a, c) => {
829
+ const d = Pt(e, c, i);
830
+ return a.top = E(d.top, a.top), a.right = j(d.right, a.right), a.bottom = j(d.bottom, a.bottom), a.left = E(d.left, a.left), a;
831
+ }, Pt(e, l, i));
776
832
  return {
777
833
  width: f.right - f.left,
778
834
  height: f.bottom - f.top,
@@ -780,33 +836,33 @@ function Te(t) {
780
836
  y: f.top
781
837
  };
782
838
  }
783
- function Pe(t) {
839
+ function Me(t) {
784
840
  const {
785
841
  width: e,
786
842
  height: n
787
- } = Wt(t);
843
+ } = Bt(t);
788
844
  return {
789
845
  width: e,
790
846
  height: n
791
847
  };
792
848
  }
793
- function Me(t, e, n) {
794
- const o = k(e), i = B(e), s = n === "fixed", r = U(t, !0, s, e);
849
+ function Fe(t, e, n) {
850
+ const o = W(e), i = B(e), s = n === "fixed", r = U(t, !0, s, e);
795
851
  let l = {
796
852
  scrollLeft: 0,
797
853
  scrollTop: 0
798
854
  };
799
- const f = W(0);
800
- function c() {
855
+ const f = k(0);
856
+ function a() {
801
857
  f.x = dt(i);
802
858
  }
803
859
  if (o || !o && !s)
804
860
  if ((K(e) !== "body" || it(i)) && (l = ut(e)), o) {
805
861
  const u = U(e, !0, s, e);
806
862
  f.x = u.x + e.clientLeft, f.y = u.y + e.clientTop;
807
- } else i && c();
808
- s && !o && i && c();
809
- const a = i && !o && !s ? Bt(i, l) : W(0), d = r.left + l.scrollLeft - f.x - a.x, h = r.top + l.scrollTop - f.y - a.y;
863
+ } else i && a();
864
+ s && !o && i && a();
865
+ const c = i && !o && !s ? $t(i, l) : k(0), d = r.left + l.scrollLeft - f.x - c.x, h = r.top + l.scrollTop - f.y - c.y;
810
866
  return {
811
867
  x: d,
812
868
  y: h,
@@ -817,36 +873,36 @@ function Me(t, e, n) {
817
873
  function ht(t) {
818
874
  return F(t).position === "static";
819
875
  }
820
- function Tt(t, e) {
821
- if (!k(t) || F(t).position === "fixed")
876
+ function Mt(t, e) {
877
+ if (!W(t) || F(t).position === "fixed")
822
878
  return null;
823
879
  if (e)
824
880
  return e(t);
825
881
  let n = t.offsetParent;
826
882
  return B(t) === n && (n = n.ownerDocument.body), n;
827
883
  }
828
- function $t(t, e) {
884
+ function Ht(t, e) {
829
885
  const n = D(t);
830
886
  if (ft(t))
831
887
  return n;
832
- if (!k(t)) {
833
- let i = X(t);
888
+ if (!W(t)) {
889
+ let i = Y(t);
834
890
  for (; i && !Z(i); ) {
835
891
  if (M(i) && !ht(i))
836
892
  return i;
837
- i = X(i);
893
+ i = Y(i);
838
894
  }
839
895
  return n;
840
896
  }
841
- let o = Tt(t, e);
842
- for (; o && he(o) && ht(o); )
843
- o = Tt(o, e);
844
- return o && Z(o) && ht(o) && !bt(o) ? n : o || ve(t) || n;
897
+ let o = Mt(t, e);
898
+ for (; o && ge(o) && ht(o); )
899
+ o = Mt(o, e);
900
+ return o && Z(o) && ht(o) && !Ot(o) ? n : o || ve(t) || n;
845
901
  }
846
- const Fe = async function(t) {
847
- const e = this.getOffsetParent || $t, n = this.getDimensions, o = await n(t.floating);
902
+ const Ve = async function(t) {
903
+ const e = this.getOffsetParent || Ht, n = this.getDimensions, o = await n(t.floating);
848
904
  return {
849
- reference: Me(t.reference, await e(t.floating), t.strategy),
905
+ reference: Fe(t.reference, await e(t.floating), t.strategy),
850
906
  floating: {
851
907
  x: 0,
852
908
  y: 0,
@@ -855,25 +911,25 @@ const Fe = async function(t) {
855
911
  }
856
912
  };
857
913
  };
858
- function Ve(t) {
914
+ function ke(t) {
859
915
  return F(t).direction === "rtl";
860
916
  }
861
917
  const We = {
862
- convertOffsetParentRelativeRectToViewportRelativeRect: Oe,
918
+ convertOffsetParentRelativeRectToViewportRelativeRect: Re,
863
919
  getDocumentElement: B,
864
- getClippingRect: Te,
865
- getOffsetParent: $t,
866
- getElementRects: Fe,
867
- getClientRects: Ae,
868
- getDimensions: Pe,
920
+ getClippingRect: Pe,
921
+ getOffsetParent: Ht,
922
+ getElementRects: Ve,
923
+ getClientRects: Ce,
924
+ getDimensions: Me,
869
925
  getScale: Q,
870
926
  isElement: M,
871
- isRTL: Ve
927
+ isRTL: ke
872
928
  };
873
- function _t(t, e) {
929
+ function zt(t, e) {
874
930
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
875
931
  }
876
- function ke(t, e) {
932
+ function Be(t, e) {
877
933
  let n = null, o;
878
934
  const i = B(t);
879
935
  function s() {
@@ -882,44 +938,44 @@ function ke(t, e) {
882
938
  }
883
939
  function r(l, f) {
884
940
  l === void 0 && (l = !1), f === void 0 && (f = 1), s();
885
- const c = t.getBoundingClientRect(), {
886
- left: a,
941
+ const a = t.getBoundingClientRect(), {
942
+ left: c,
887
943
  top: d,
888
944
  width: h,
889
945
  height: u
890
- } = c;
946
+ } = a;
891
947
  if (l || e(), !h || !u)
892
948
  return;
893
- const m = rt(d), g = rt(i.clientWidth - (a + h)), w = rt(i.clientHeight - (d + u)), y = rt(a), x = {
894
- rootMargin: -m + "px " + -g + "px " + -w + "px " + -y + "px",
949
+ const m = rt(d), g = rt(i.clientWidth - (c + h)), p = rt(i.clientHeight - (d + u)), w = rt(c), v = {
950
+ rootMargin: -m + "px " + -g + "px " + -p + "px " + -w + "px",
895
951
  threshold: E(0, j(1, f)) || 1
896
952
  };
897
- let R = !0;
953
+ let A = !0;
898
954
  function b(C) {
899
- const p = C[0].intersectionRatio;
900
- if (p !== f) {
901
- if (!R)
955
+ const y = C[0].intersectionRatio;
956
+ if (y !== f) {
957
+ if (!A)
902
958
  return r();
903
- p ? r(!1, p) : o = setTimeout(() => {
959
+ y ? r(!1, y) : o = setTimeout(() => {
904
960
  r(!1, 1e-7);
905
961
  }, 1e3);
906
962
  }
907
- p === 1 && !_t(c, t.getBoundingClientRect()) && r(), R = !1;
963
+ y === 1 && !zt(a, t.getBoundingClientRect()) && r(), A = !1;
908
964
  }
909
965
  try {
910
966
  n = new IntersectionObserver(b, {
911
- ...x,
967
+ ...v,
912
968
  // Handle <iframe>s
913
969
  root: i.ownerDocument
914
970
  });
915
971
  } catch {
916
- n = new IntersectionObserver(b, x);
972
+ n = new IntersectionObserver(b, v);
917
973
  }
918
974
  n.observe(t);
919
975
  }
920
976
  return r(!0), s;
921
977
  }
922
- function He(t, e, n, o) {
978
+ function ze(t, e, n, o) {
923
979
  o === void 0 && (o = {});
924
980
  const {
925
981
  ancestorScroll: i = !0,
@@ -927,35 +983,35 @@ function He(t, e, n, o) {
927
983
  elementResize: r = typeof ResizeObserver == "function",
928
984
  layoutShift: l = typeof IntersectionObserver == "function",
929
985
  animationFrame: f = !1
930
- } = o, c = Ot(t), a = i || s ? [...c ? nt(c) : [], ...nt(e)] : [];
931
- a.forEach((y) => {
932
- i && y.addEventListener("scroll", n, {
986
+ } = o, a = Ct(t), c = i || s ? [...a ? ot(a) : [], ...ot(e)] : [];
987
+ c.forEach((w) => {
988
+ i && w.addEventListener("scroll", n, {
933
989
  passive: !0
934
- }), s && y.addEventListener("resize", n);
990
+ }), s && w.addEventListener("resize", n);
935
991
  });
936
- const d = c && l ? ke(c, n) : null;
992
+ const d = a && l ? Be(a, n) : null;
937
993
  let h = -1, u = null;
938
- r && (u = new ResizeObserver((y) => {
939
- let [v] = y;
940
- v && v.target === c && u && (u.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
941
- var x;
942
- (x = u) == null || x.observe(e);
994
+ r && (u = new ResizeObserver((w) => {
995
+ let [x] = w;
996
+ x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
997
+ var v;
998
+ (v = u) == null || v.observe(e);
943
999
  })), n();
944
- }), c && !f && u.observe(c), u.observe(e));
1000
+ }), a && !f && u.observe(a), u.observe(e));
945
1001
  let m, g = f ? U(t) : null;
946
- f && w();
947
- function w() {
948
- const y = U(t);
949
- g && !_t(g, y) && n(), g = y, m = requestAnimationFrame(w);
1002
+ f && p();
1003
+ function p() {
1004
+ const w = U(t);
1005
+ g && !zt(g, w) && n(), g = w, m = requestAnimationFrame(p);
950
1006
  }
951
1007
  return n(), () => {
952
- var y;
953
- a.forEach((v) => {
954
- i && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
955
- }), d == null || d(), (y = u) == null || y.disconnect(), u = null, f && cancelAnimationFrame(m);
1008
+ var w;
1009
+ c.forEach((x) => {
1010
+ i && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
1011
+ }), d == null || d(), (w = u) == null || w.disconnect(), u = null, f && cancelAnimationFrame(m);
956
1012
  };
957
1013
  }
958
- const ze = fe, Ie = le, je = ue, Be = se, Ne = (t, e, n) => {
1014
+ const Ie = fe, je = ue, Xe = le, Ye = de, Ne = se, $e = (t, e, n) => {
959
1015
  const o = /* @__PURE__ */ new Map(), i = {
960
1016
  platform: We,
961
1017
  ...n
@@ -968,66 +1024,66 @@ const ze = fe, Ie = le, je = ue, Be = se, Ne = (t, e, n) => {
968
1024
  platform: s
969
1025
  });
970
1026
  };
971
- function $e(t) {
1027
+ function _e(t) {
972
1028
  return t != null && typeof t == "object" && "$el" in t;
973
1029
  }
974
- function wt(t) {
975
- if ($e(t)) {
1030
+ function xt(t) {
1031
+ if (_e(t)) {
976
1032
  const e = t.$el;
977
- return xt(e) && K(e) === "#comment" ? null : e;
1033
+ return At(e) && K(e) === "#comment" ? null : e;
978
1034
  }
979
1035
  return t;
980
1036
  }
981
1037
  function J(t) {
982
- return typeof t == "function" ? t() : Yt(t);
1038
+ return typeof t == "function" ? t() : Ut(t);
983
1039
  }
984
- function Xe(t) {
1040
+ function qe(t) {
985
1041
  return {
986
1042
  name: "arrow",
987
1043
  options: t,
988
1044
  fn(e) {
989
- const n = wt(J(t.element));
990
- return n == null ? {} : Be({
1045
+ const n = xt(J(t.element));
1046
+ return n == null ? {} : Ne({
991
1047
  element: n,
992
1048
  padding: t.padding
993
1049
  }).fn(e);
994
1050
  }
995
1051
  };
996
1052
  }
997
- function Ht(t) {
1053
+ function It(t) {
998
1054
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
999
1055
  }
1000
- function Pt(t, e) {
1001
- const n = Ht(t);
1056
+ function Ft(t, e) {
1057
+ const n = It(t);
1002
1058
  return Math.round(e * n) / n;
1003
1059
  }
1004
- function Ye(t, e, n) {
1060
+ function Ue(t, e, n) {
1005
1061
  n === void 0 && (n = {});
1006
- const o = n.whileElementsMounted, i = z(() => {
1007
- var p;
1008
- return (p = J(n.open)) != null ? p : !0;
1009
- }), s = z(() => J(n.middleware)), r = z(() => {
1010
- var p;
1011
- return (p = J(n.placement)) != null ? p : "bottom";
1012
- }), l = z(() => {
1013
- var p;
1014
- return (p = J(n.strategy)) != null ? p : "absolute";
1015
- }), f = z(() => {
1016
- var p;
1017
- return (p = J(n.transform)) != null ? p : !0;
1018
- }), c = z(() => wt(t.value)), a = z(() => wt(e.value)), d = et(0), h = et(0), u = et(l.value), m = et(r.value), g = It({}), w = et(!1), y = z(() => {
1019
- const p = {
1062
+ const o = n.whileElementsMounted, i = I(() => {
1063
+ var y;
1064
+ return (y = J(n.open)) != null ? y : !0;
1065
+ }), s = I(() => J(n.middleware)), r = I(() => {
1066
+ var y;
1067
+ return (y = J(n.placement)) != null ? y : "bottom";
1068
+ }), l = I(() => {
1069
+ var y;
1070
+ return (y = J(n.strategy)) != null ? y : "absolute";
1071
+ }), f = I(() => {
1072
+ var y;
1073
+ return (y = J(n.transform)) != null ? y : !0;
1074
+ }), a = I(() => xt(t.value)), c = I(() => xt(e.value)), d = nt(0), h = nt(0), u = nt(l.value), m = nt(r.value), g = Xt({}), p = nt(!1), w = I(() => {
1075
+ const y = {
1020
1076
  position: u.value,
1021
1077
  left: "0",
1022
1078
  top: "0"
1023
1079
  };
1024
- if (!a.value)
1025
- return p;
1026
- const O = Pt(a.value, d.value), S = Pt(a.value, h.value);
1080
+ if (!c.value)
1081
+ return y;
1082
+ const O = Ft(c.value, d.value), S = Ft(c.value, h.value);
1027
1083
  return f.value ? {
1028
- ...p,
1084
+ ...y,
1029
1085
  transform: "translate(" + O + "px, " + S + "px)",
1030
- ...Ht(a.value) >= 1.5 && {
1086
+ ...It(c.value) >= 1.5 && {
1031
1087
  willChange: "transform"
1032
1088
  }
1033
1089
  } : {
@@ -1036,58 +1092,59 @@ function Ye(t, e, n) {
1036
1092
  top: S + "px"
1037
1093
  };
1038
1094
  });
1039
- let v;
1040
- function x() {
1041
- if (c.value == null || a.value == null)
1095
+ let x;
1096
+ function v() {
1097
+ if (a.value == null || c.value == null)
1042
1098
  return;
1043
- const p = i.value;
1044
- Ne(c.value, a.value, {
1099
+ const y = i.value;
1100
+ $e(a.value, c.value, {
1045
1101
  middleware: s.value,
1046
1102
  placement: r.value,
1047
1103
  strategy: l.value
1048
1104
  }).then((O) => {
1049
- d.value = O.x, h.value = O.y, u.value = O.strategy, m.value = O.placement, g.value = O.middlewareData, w.value = p !== !1;
1105
+ d.value = O.x, h.value = O.y, u.value = O.strategy, m.value = O.placement, g.value = O.middlewareData, p.value = y !== !1;
1050
1106
  });
1051
1107
  }
1052
- function R() {
1053
- typeof v == "function" && (v(), v = void 0);
1108
+ function A() {
1109
+ typeof x == "function" && (x(), x = void 0);
1054
1110
  }
1055
1111
  function b() {
1056
- if (R(), o === void 0) {
1057
- x();
1112
+ if (A(), o === void 0) {
1113
+ v();
1058
1114
  return;
1059
1115
  }
1060
- if (c.value != null && a.value != null) {
1061
- v = o(c.value, a.value, x);
1116
+ if (a.value != null && c.value != null) {
1117
+ x = o(a.value, c.value, v);
1062
1118
  return;
1063
1119
  }
1064
1120
  }
1065
1121
  function C() {
1066
- i.value || (w.value = !1);
1122
+ i.value || (p.value = !1);
1067
1123
  }
1068
- return mt([s, r, l, i], x, {
1124
+ return mt([s, r, l, i], v, {
1069
1125
  flush: "sync"
1070
- }), mt([c, a], b, {
1126
+ }), mt([a, c], b, {
1071
1127
  flush: "sync"
1072
1128
  }), mt(i, C, {
1073
1129
  flush: "sync"
1074
- }), jt() && Xt(R), {
1130
+ }), Yt() && qt(A), {
1075
1131
  x: G(d),
1076
1132
  y: G(h),
1077
1133
  strategy: G(u),
1078
1134
  placement: G(m),
1079
1135
  middlewareData: G(g),
1080
- isPositioned: G(w),
1081
- floatingStyles: y,
1082
- update: x
1136
+ isPositioned: G(p),
1137
+ floatingStyles: w,
1138
+ update: v
1083
1139
  };
1084
1140
  }
1085
1141
  export {
1086
- He as a,
1087
- Xe as b,
1088
- Ie as f,
1089
- ze as o,
1142
+ ze as a,
1143
+ qe as b,
1144
+ Ye as c,
1145
+ Xe as f,
1146
+ Ie as o,
1090
1147
  je as s,
1091
- Ye as u
1148
+ Ue as u
1092
1149
  };
1093
- //# sourceMappingURL=floating-ui.vue-DLFiymOf.js.map
1150
+ //# sourceMappingURL=floating-ui.vue-CuGrC-z8.js.map