highsoft-ui 1.0.104 → 1.0.106

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,15 +1,15 @@
1
- import { jsx as w, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { z as Qe, c as qe } from "../../utils-BKDJp1i0.js";
1
+ import { jsx as w, jsxs as q, Fragment as ee } from "react/jsx-runtime";
2
+ import { z as Ke, c as Qe } from "../../utils-BKDJp1i0.js";
3
3
  import * as g from "react";
4
- import { useLayoutEffect as Ge } from "react";
5
- import { C as Ue } from "../../Check-Cm4roSEj.js";
6
- import { _ as yt } from "../../extends-hS2Bh-Yp.js";
7
- import { c as Ze } from "../../clsx-OuTLNxxd.js";
8
- import { Button as Je } from "../Button/index.js";
9
- import { h as Mt, P as ft, u as bt, c as oe, f as tn, e as en, b as nn, d as st, g as re, i as on, j as rn, R as sn, a as cn, k as an, F as ln, D as fn } from "../../index-CYz8LhDn.js";
10
- import * as un from "react-dom";
11
- var dn = function(e) {
12
- return /* @__PURE__ */ w("svg", yt({
4
+ import { useLayoutEffect as qe } from "react";
5
+ import { C as Ge } from "../../Check-Cm4roSEj.js";
6
+ import { _ as xt } from "../../extends-hS2Bh-Yp.js";
7
+ import { c as Ue } from "../../clsx-OuTLNxxd.js";
8
+ import { Button as Ze } from "../Button/index.js";
9
+ import { h as kt, P as lt, u as yt, c as ne, f as Je, e as tn, b as en, d as st, g as oe, i as nn, j as on, R as rn, a as sn, k as cn, F as an, D as ln } from "../../index-CYz8LhDn.js";
10
+ import * as fn from "react-dom";
11
+ var un = function(e) {
12
+ return /* @__PURE__ */ w("svg", xt({
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  width: 24,
15
15
  height: 24,
@@ -24,8 +24,8 @@ var dn = function(e) {
24
24
  d: "M15 17v4H9v-4m-3.8 0h13.6c1.1201 0 1.6802 0 2.108-.218a2 2 0 0 0 .874-.874C22 15.4802 22 14.9201 22 13.8V6.2c0-1.1201 0-1.6802-.218-2.108a2 2 0 0 0-.874-.874C20.4802 3 19.9201 3 18.8 3H5.2c-1.1201 0-1.6802 0-2.108.218a2 2 0 0 0-.874.874C2 4.5198 2 5.08 2 6.2v7.6c0 1.1201 0 1.6802.218 2.108.1917.3763.4977.6823.874.874C3.5198 17 4.08 17 5.2 17"
25
25
  })
26
26
  }));
27
- }, pn = function(e) {
28
- return /* @__PURE__ */ w("svg", yt({
27
+ }, dn = function(e) {
28
+ return /* @__PURE__ */ w("svg", xt({
29
29
  xmlns: "http://www.w3.org/2000/svg",
30
30
  width: 24,
31
31
  height: 24,
@@ -40,8 +40,8 @@ var dn = function(e) {
40
40
  d: "M21.9548 12.9564c-1.3769 2.4153-3.9757 4.0437-6.9548 4.0437-4.4183 0-8-3.5817-8-8 0-2.9794 1.6287-5.5783 4.0443-6.9552C5.9698 2.5261 2 6.7994 2 11.9998c0 5.5229 4.4772 10 10 10 5.2002 0 9.4733-3.9693 9.9548-9.0434"
41
41
  })
42
42
  }));
43
- }, hn = function(e) {
44
- return /* @__PURE__ */ w("svg", yt({
43
+ }, pn = function(e) {
44
+ return /* @__PURE__ */ w("svg", xt({
45
45
  xmlns: "http://www.w3.org/2000/svg",
46
46
  width: 24,
47
47
  height: 24,
@@ -56,8 +56,8 @@ var dn = function(e) {
56
56
  d: "M3 8h12m0 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3-1.3431-3-3-3-3 1.3431-3 3m-6 8h12M9 16c0 1.6569-1.3431 3-3 3s-3-1.3431-3-3 1.3431-3 3-3 3 1.3431 3 3"
57
57
  })
58
58
  }));
59
- }, mn = function(e) {
60
- return /* @__PURE__ */ w("svg", yt({
59
+ }, hn = function(e) {
60
+ return /* @__PURE__ */ w("svg", xt({
61
61
  xmlns: "http://www.w3.org/2000/svg",
62
62
  width: 24,
63
63
  height: 24,
@@ -73,9 +73,9 @@ var dn = function(e) {
73
73
  })
74
74
  }));
75
75
  };
76
- function gn(t) {
76
+ function mn(t) {
77
77
  const [e, n] = g.useState(void 0);
78
- return Mt(() => {
78
+ return kt(() => {
79
79
  if (t) {
80
80
  n({ width: t.offsetWidth, height: t.offsetHeight });
81
81
  const o = new ResizeObserver((r) => {
@@ -95,19 +95,19 @@ function gn(t) {
95
95
  n(void 0);
96
96
  }, [t]), e;
97
97
  }
98
- const wn = ["top", "right", "bottom", "left"], G = Math.min, W = Math.max, gt = Math.round, ht = Math.floor, j = (t) => ({
98
+ const gn = ["top", "right", "bottom", "left"], G = Math.min, W = Math.max, mt = Math.round, pt = Math.floor, j = (t) => ({
99
99
  x: t,
100
100
  y: t
101
- }), vn = {
101
+ }), wn = {
102
102
  left: "right",
103
103
  right: "left",
104
104
  bottom: "top",
105
105
  top: "bottom"
106
- }, xn = {
106
+ }, vn = {
107
107
  start: "end",
108
108
  end: "start"
109
109
  };
110
- function Dt(t, e, n) {
110
+ function Mt(t, e, n) {
111
111
  return W(t, G(e, n));
112
112
  }
113
113
  function K(t, e) {
@@ -119,54 +119,54 @@ function Q(t) {
119
119
  function ot(t) {
120
120
  return t.split("-")[1];
121
121
  }
122
- function Tt(t) {
122
+ function _t(t) {
123
123
  return t === "x" ? "y" : "x";
124
124
  }
125
- function Nt(t) {
125
+ function Tt(t) {
126
126
  return t === "y" ? "height" : "width";
127
127
  }
128
- const yn = /* @__PURE__ */ new Set(["top", "bottom"]);
128
+ const xn = /* @__PURE__ */ new Set(["top", "bottom"]);
129
129
  function V(t) {
130
- return yn.has(Q(t)) ? "y" : "x";
130
+ return xn.has(Q(t)) ? "y" : "x";
131
131
  }
132
- function Ft(t) {
133
- return Tt(V(t));
132
+ function Nt(t) {
133
+ return _t(V(t));
134
134
  }
135
- function bn(t, e, n) {
135
+ function yn(t, e, n) {
136
136
  n === void 0 && (n = !1);
137
- const o = ot(t), r = Ft(t), i = Nt(r);
137
+ const o = ot(t), r = Nt(t), i = Tt(r);
138
138
  let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
139
- return e.reference[i] > e.floating[i] && (s = wt(s)), [s, wt(s)];
139
+ return e.reference[i] > e.floating[i] && (s = gt(s)), [s, gt(s)];
140
140
  }
141
- function An(t) {
142
- const e = wt(t);
143
- return [Lt(t), e, Lt(e)];
141
+ function bn(t) {
142
+ const e = gt(t);
143
+ return [Dt(t), e, Dt(e)];
144
144
  }
145
- function Lt(t) {
146
- return t.replace(/start|end/g, (e) => xn[e]);
145
+ function Dt(t) {
146
+ return t.replace(/start|end/g, (e) => vn[e]);
147
147
  }
148
- const Xt = ["left", "right"], Yt = ["right", "left"], Pn = ["top", "bottom"], Cn = ["bottom", "top"];
149
- function Rn(t, e, n) {
148
+ const jt = ["left", "right"], Xt = ["right", "left"], An = ["top", "bottom"], Pn = ["bottom", "top"];
149
+ function Cn(t, e, n) {
150
150
  switch (t) {
151
151
  case "top":
152
152
  case "bottom":
153
- return n ? e ? Yt : Xt : e ? Xt : Yt;
153
+ return n ? e ? Xt : jt : e ? jt : Xt;
154
154
  case "left":
155
155
  case "right":
156
- return e ? Pn : Cn;
156
+ return e ? An : Pn;
157
157
  default:
158
158
  return [];
159
159
  }
160
160
  }
161
- function On(t, e, n, o) {
161
+ function Rn(t, e, n, o) {
162
162
  const r = ot(t);
163
- let i = Rn(Q(t), n === "start", o);
164
- return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Lt)))), i;
163
+ let i = Cn(Q(t), n === "start", o);
164
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
165
165
  }
166
- function wt(t) {
167
- return t.replace(/left|right|bottom|top/g, (e) => vn[e]);
166
+ function gt(t) {
167
+ return t.replace(/left|right|bottom|top/g, (e) => wn[e]);
168
168
  }
169
- function Sn(t) {
169
+ function On(t) {
170
170
  return {
171
171
  top: 0,
172
172
  right: 0,
@@ -175,15 +175,15 @@ function Sn(t) {
175
175
  ...t
176
176
  };
177
177
  }
178
- function ie(t) {
179
- return typeof t != "number" ? Sn(t) : {
178
+ function re(t) {
179
+ return typeof t != "number" ? On(t) : {
180
180
  top: t,
181
181
  right: t,
182
182
  bottom: t,
183
183
  left: t
184
184
  };
185
185
  }
186
- function vt(t) {
186
+ function wt(t) {
187
187
  const {
188
188
  x: e,
189
189
  y: n,
@@ -201,12 +201,12 @@ function vt(t) {
201
201
  y: n
202
202
  };
203
203
  }
204
- function Kt(t, e, n) {
204
+ function Yt(t, e, n) {
205
205
  let {
206
206
  reference: o,
207
207
  floating: r
208
208
  } = t;
209
- const i = V(e), s = Ft(e), c = Nt(s), a = Q(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
209
+ const i = V(e), s = Nt(e), c = Tt(s), a = Q(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
210
210
  let d;
211
211
  switch (a) {
212
212
  case "top":
@@ -249,6 +249,51 @@ function Kt(t, e, n) {
249
249
  }
250
250
  return d;
251
251
  }
252
+ async function Sn(t, e) {
253
+ var n;
254
+ e === void 0 && (e = {});
255
+ const {
256
+ x: o,
257
+ y: r,
258
+ platform: i,
259
+ rects: s,
260
+ elements: c,
261
+ strategy: a
262
+ } = t, {
263
+ boundary: l = "clippingAncestors",
264
+ rootBoundary: f = "viewport",
265
+ elementContext: u = "floating",
266
+ altBoundary: p = !1,
267
+ padding: d = 0
268
+ } = K(e, t), h = re(d), x = c[p ? u === "floating" ? "reference" : "floating" : u], v = wt(await i.getClippingRect({
269
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
270
+ boundary: l,
271
+ rootBoundary: f,
272
+ strategy: a
273
+ })), A = u === "floating" ? {
274
+ x: o,
275
+ y: r,
276
+ width: s.floating.width,
277
+ height: s.floating.height
278
+ } : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), y = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
279
+ x: 1,
280
+ y: 1
281
+ } : {
282
+ x: 1,
283
+ y: 1
284
+ }, C = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
285
+ elements: c,
286
+ rect: A,
287
+ offsetParent: b,
288
+ strategy: a
289
+ }) : A);
290
+ return {
291
+ top: (v.top - C.top + h.top) / y.y,
292
+ bottom: (C.bottom - v.bottom + h.bottom) / y.y,
293
+ left: (v.left - C.left + h.left) / y.x,
294
+ right: (C.right - v.right + h.right) / y.x
295
+ };
296
+ }
252
297
  const En = async (t, e, n) => {
253
298
  const {
254
299
  placement: o = "bottom",
@@ -263,17 +308,18 @@ const En = async (t, e, n) => {
263
308
  }), {
264
309
  x: f,
265
310
  y: u
266
- } = Kt(l, o, a), p = o, d = {}, h = 0;
267
- for (let m = 0; m < c.length; m++) {
311
+ } = Yt(l, o, a), p = o, d = {}, h = 0;
312
+ for (let x = 0; x < c.length; x++) {
313
+ var m;
268
314
  const {
269
- name: x,
270
- fn: v
271
- } = c[m], {
272
- x: y,
273
- y: P,
274
- data: b,
275
- reset: A
276
- } = await v({
315
+ name: v,
316
+ fn: A
317
+ } = c[x], {
318
+ x: b,
319
+ y,
320
+ data: C,
321
+ reset: R
322
+ } = await A({
277
323
  x: f,
278
324
  y: u,
279
325
  initialPlacement: o,
@@ -281,26 +327,29 @@ const En = async (t, e, n) => {
281
327
  strategy: r,
282
328
  middlewareData: d,
283
329
  rects: l,
284
- platform: s,
330
+ platform: {
331
+ ...s,
332
+ detectOverflow: (m = s.detectOverflow) != null ? m : Sn
333
+ },
285
334
  elements: {
286
335
  reference: t,
287
336
  floating: e
288
337
  }
289
338
  });
290
- f = y ?? f, u = P ?? u, d = {
339
+ f = b ?? f, u = y ?? u, d = {
291
340
  ...d,
292
- [x]: {
293
- ...d[x],
294
- ...b
341
+ [v]: {
342
+ ...d[v],
343
+ ...C
295
344
  }
296
- }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
345
+ }, R && h <= 50 && (h++, typeof R == "object" && (R.placement && (p = R.placement), R.rects && (l = R.rects === !0 ? await s.getElementRects({
297
346
  reference: t,
298
347
  floating: e,
299
348
  strategy: r
300
- }) : A.rects), {
349
+ }) : R.rects), {
301
350
  x: f,
302
351
  y: u
303
- } = Kt(l, p, a)), m = -1);
352
+ } = Yt(l, p, a)), x = -1);
304
353
  }
305
354
  return {
306
355
  x: f,
@@ -309,53 +358,7 @@ const En = async (t, e, n) => {
309
358
  strategy: r,
310
359
  middlewareData: d
311
360
  };
312
- };
313
- async function at(t, e) {
314
- var n;
315
- e === void 0 && (e = {});
316
- const {
317
- x: o,
318
- y: r,
319
- platform: i,
320
- rects: s,
321
- elements: c,
322
- strategy: a
323
- } = t, {
324
- boundary: l = "clippingAncestors",
325
- rootBoundary: f = "viewport",
326
- elementContext: u = "floating",
327
- altBoundary: p = !1,
328
- padding: d = 0
329
- } = K(e, t), h = ie(d), x = c[p ? u === "floating" ? "reference" : "floating" : u], v = vt(await i.getClippingRect({
330
- element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
331
- boundary: l,
332
- rootBoundary: f,
333
- strategy: a
334
- })), y = u === "floating" ? {
335
- x: o,
336
- y: r,
337
- width: s.floating.width,
338
- height: s.floating.height
339
- } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(P)) ? await (i.getScale == null ? void 0 : i.getScale(P)) || {
340
- x: 1,
341
- y: 1
342
- } : {
343
- x: 1,
344
- y: 1
345
- }, A = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
346
- elements: c,
347
- rect: y,
348
- offsetParent: P,
349
- strategy: a
350
- }) : y);
351
- return {
352
- top: (v.top - A.top + h.top) / b.y,
353
- bottom: (A.bottom - v.bottom + h.bottom) / b.y,
354
- left: (v.left - A.left + h.left) / b.x,
355
- right: (A.right - v.right + h.right) / b.x
356
- };
357
- }
358
- const kn = (t) => ({
361
+ }, kn = (t) => ({
359
362
  name: "arrow",
360
363
  options: t,
361
364
  async fn(e) {
@@ -373,13 +376,13 @@ const kn = (t) => ({
373
376
  } = K(t, e) || {};
374
377
  if (l == null)
375
378
  return {};
376
- const u = ie(f), p = {
379
+ const u = re(f), p = {
377
380
  x: n,
378
381
  y: o
379
- }, d = Ft(r), h = Nt(d), m = await s.getDimensions(l), x = d === "y", v = x ? "top" : "left", y = x ? "bottom" : "right", P = x ? "clientHeight" : "clientWidth", b = i.reference[h] + i.reference[d] - p[d] - i.floating[h], A = p[d] - i.reference[d], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
380
- let R = O ? O[P] : 0;
381
- (!R || !await (s.isElement == null ? void 0 : s.isElement(O))) && (R = c.floating[P] || i.floating[h]);
382
- const L = b / 2 - A / 2, F = R / 2 - m[h] / 2 - 1, D = G(u[v], F), T = G(u[y], F), N = D, E = R - m[h] - T, S = R / 2 - m[h] / 2 + L, $ = Dt(N, S, E), k = !a.arrow && ot(r) != null && S !== $ && i.reference[h] / 2 - (S < N ? D : T) - m[h] / 2 < 0, M = k ? S < N ? S - N : S - E : 0;
382
+ }, d = Nt(r), h = Tt(d), m = await s.getDimensions(l), x = d === "y", v = x ? "top" : "left", A = x ? "bottom" : "right", b = x ? "clientHeight" : "clientWidth", y = i.reference[h] + i.reference[d] - p[d] - i.floating[h], C = p[d] - i.reference[d], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
383
+ let O = R ? R[b] : 0;
384
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[b] || i.floating[h]);
385
+ const L = y / 2 - C / 2, F = O / 2 - m[h] / 2 - 1, D = G(u[v], F), T = G(u[A], F), N = D, E = O - m[h] - T, S = O / 2 - m[h] / 2 + L, $ = Mt(N, S, E), k = !a.arrow && ot(r) != null && S !== $ && i.reference[h] / 2 - (S < N ? D : T) - m[h] / 2 < 0, M = k ? S < N ? S - N : S - E : 0;
383
386
  return {
384
387
  [d]: p[d] + M,
385
388
  data: {
@@ -416,12 +419,12 @@ const kn = (t) => ({
416
419
  } = K(t, e);
417
420
  if ((n = i.arrow) != null && n.alignmentOffset)
418
421
  return {};
419
- const v = Q(r), y = V(c), P = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), A = p || (P || !m ? [wt(c)] : An(c)), O = h !== "none";
420
- !p && O && A.push(...On(c, m, h, b));
421
- const R = [c, ...A], L = await at(e, x), F = [];
422
+ const v = Q(r), A = V(c), b = Q(c) === c, y = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), C = p || (b || !m ? [gt(c)] : bn(c)), R = h !== "none";
423
+ !p && R && C.push(...Rn(c, m, h, y));
424
+ const O = [c, ...C], L = await a.detectOverflow(e, x), F = [];
422
425
  let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
423
426
  if (f && F.push(L[v]), u) {
424
- const S = bn(r, s, b);
427
+ const S = yn(r, s, y);
425
428
  F.push(L[S[0]], L[S[1]]);
426
429
  }
427
430
  if (D = [...D, {
@@ -429,10 +432,10 @@ const kn = (t) => ({
429
432
  overflows: F
430
433
  }], !F.every((S) => S <= 0)) {
431
434
  var T, N;
432
- const S = (((T = i.flip) == null ? void 0 : T.index) || 0) + 1, $ = R[S];
433
- if ($ && (!(u === "alignment" ? y !== V($) : !1) || // We leave the current main axis only if every placement on that axis
435
+ const S = (((T = i.flip) == null ? void 0 : T.index) || 0) + 1, $ = O[S];
436
+ if ($ && (!(u === "alignment" ? A !== V($) : !1) || // We leave the current main axis only if every placement on that axis
434
437
  // overflows the main axis.
435
- D.every((C) => V(C.placement) === y ? C.overflows[0] > 0 : !0)))
438
+ D.every((P) => V(P.placement) === A ? P.overflows[0] > 0 : !0)))
436
439
  return {
437
440
  data: {
438
441
  index: S,
@@ -442,20 +445,20 @@ const kn = (t) => ({
442
445
  placement: $
443
446
  }
444
447
  };
445
- let k = (N = D.filter((M) => M.overflows[0] <= 0).sort((M, C) => M.overflows[1] - C.overflows[1])[0]) == null ? void 0 : N.placement;
448
+ let k = (N = D.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : N.placement;
446
449
  if (!k)
447
450
  switch (d) {
448
451
  case "bestFit": {
449
452
  var E;
450
- const M = (E = D.filter((C) => {
451
- if (O) {
452
- const _ = V(C.placement);
453
- return _ === y || // Create a bias to the `y` side axis due to horizontal
453
+ const M = (E = D.filter((P) => {
454
+ if (R) {
455
+ const _ = V(P.placement);
456
+ return _ === A || // Create a bias to the `y` side axis due to horizontal
454
457
  // reading directions favoring greater width.
455
458
  _ === "y";
456
459
  }
457
460
  return !0;
458
- }).map((C) => [C.placement, C.overflows.filter((_) => _ > 0).reduce((_, z) => _ + z, 0)]).sort((C, _) => C[1] - _[1])[0]) == null ? void 0 : E[0];
461
+ }).map((P) => [P.placement, P.overflows.filter((_) => _ > 0).reduce((_, z) => _ + z, 0)]).sort((P, _) => P[1] - _[1])[0]) == null ? void 0 : E[0];
459
462
  M && (k = M);
460
463
  break;
461
464
  }
@@ -474,7 +477,7 @@ const kn = (t) => ({
474
477
  }
475
478
  };
476
479
  };
477
- function Qt(t, e) {
480
+ function Kt(t, e) {
478
481
  return {
479
482
  top: t.top - e.height,
480
483
  right: t.right - e.width,
@@ -482,8 +485,8 @@ function Qt(t, e) {
482
485
  left: t.left - e.width
483
486
  };
484
487
  }
485
- function qt(t) {
486
- return wn.some((e) => t[e] >= 0);
488
+ function Qt(t) {
489
+ return gn.some((e) => t[e] >= 0);
487
490
  }
488
491
  const Dn = function(t) {
489
492
  return t === void 0 && (t = {}), {
@@ -491,33 +494,34 @@ const Dn = function(t) {
491
494
  options: t,
492
495
  async fn(e) {
493
496
  const {
494
- rects: n
497
+ rects: n,
498
+ platform: o
495
499
  } = e, {
496
- strategy: o = "referenceHidden",
497
- ...r
500
+ strategy: r = "referenceHidden",
501
+ ...i
498
502
  } = K(t, e);
499
- switch (o) {
503
+ switch (r) {
500
504
  case "referenceHidden": {
501
- const i = await at(e, {
502
- ...r,
505
+ const s = await o.detectOverflow(e, {
506
+ ...i,
503
507
  elementContext: "reference"
504
- }), s = Qt(i, n.reference);
508
+ }), c = Kt(s, n.reference);
505
509
  return {
506
510
  data: {
507
- referenceHiddenOffsets: s,
508
- referenceHidden: qt(s)
511
+ referenceHiddenOffsets: c,
512
+ referenceHidden: Qt(c)
509
513
  }
510
514
  };
511
515
  }
512
516
  case "escaped": {
513
- const i = await at(e, {
514
- ...r,
517
+ const s = await o.detectOverflow(e, {
518
+ ...i,
515
519
  altBoundary: !0
516
- }), s = Qt(i, n.floating);
520
+ }), c = Kt(s, n.floating);
517
521
  return {
518
522
  data: {
519
- escapedOffsets: s,
520
- escaped: qt(s)
523
+ escapedOffsets: c,
524
+ escaped: Qt(c)
521
525
  }
522
526
  };
523
527
  }
@@ -526,13 +530,13 @@ const Dn = function(t) {
526
530
  }
527
531
  }
528
532
  };
529
- }, se = /* @__PURE__ */ new Set(["left", "top"]);
533
+ }, ie = /* @__PURE__ */ new Set(["left", "top"]);
530
534
  async function Ln(t, e) {
531
535
  const {
532
536
  placement: n,
533
537
  platform: o,
534
538
  elements: r
535
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = Q(n), c = ot(n), a = V(n) === "y", l = se.has(s) ? -1 : 1, f = i && a ? -1 : 1, u = K(e, t);
539
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = Q(n), c = ot(n), a = V(n) === "y", l = ie.has(s) ? -1 : 1, f = i && a ? -1 : 1, u = K(e, t);
536
540
  let {
537
541
  mainAxis: p,
538
542
  crossAxis: d,
@@ -584,49 +588,50 @@ const _n = function(t) {
584
588
  const {
585
589
  x: n,
586
590
  y: o,
587
- placement: r
591
+ placement: r,
592
+ platform: i
588
593
  } = e, {
589
- mainAxis: i = !0,
590
- crossAxis: s = !1,
591
- limiter: c = {
592
- fn: (x) => {
594
+ mainAxis: s = !0,
595
+ crossAxis: c = !1,
596
+ limiter: a = {
597
+ fn: (v) => {
593
598
  let {
594
- x: v,
595
- y
596
- } = x;
599
+ x: A,
600
+ y: b
601
+ } = v;
597
602
  return {
598
- x: v,
599
- y
603
+ x: A,
604
+ y: b
600
605
  };
601
606
  }
602
607
  },
603
- ...a
604
- } = K(t, e), l = {
608
+ ...l
609
+ } = K(t, e), f = {
605
610
  x: n,
606
611
  y: o
607
- }, f = await at(e, a), u = V(Q(r)), p = Tt(u);
608
- let d = l[p], h = l[u];
609
- if (i) {
610
- const x = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", y = d + f[x], P = d - f[v];
611
- d = Dt(y, d, P);
612
- }
612
+ }, u = await i.detectOverflow(e, l), p = V(Q(r)), d = _t(p);
613
+ let h = f[d], m = f[p];
613
614
  if (s) {
614
- const x = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", y = h + f[x], P = h - f[v];
615
- h = Dt(y, h, P);
615
+ const v = d === "y" ? "top" : "left", A = d === "y" ? "bottom" : "right", b = h + u[v], y = h - u[A];
616
+ h = Mt(b, h, y);
617
+ }
618
+ if (c) {
619
+ const v = p === "y" ? "top" : "left", A = p === "y" ? "bottom" : "right", b = m + u[v], y = m - u[A];
620
+ m = Mt(b, m, y);
616
621
  }
617
- const m = c.fn({
622
+ const x = a.fn({
618
623
  ...e,
619
- [p]: d,
620
- [u]: h
624
+ [d]: h,
625
+ [p]: m
621
626
  });
622
627
  return {
623
- ...m,
628
+ ...x,
624
629
  data: {
625
- x: m.x - n,
626
- y: m.y - o,
630
+ x: x.x - n,
631
+ y: x.y - o,
627
632
  enabled: {
628
- [p]: i,
629
- [u]: s
633
+ [d]: s,
634
+ [p]: c
630
635
  }
631
636
  }
632
637
  };
@@ -649,7 +654,7 @@ const _n = function(t) {
649
654
  } = K(t, e), f = {
650
655
  x: n,
651
656
  y: o
652
- }, u = V(r), p = Tt(u);
657
+ }, u = V(r), p = _t(u);
653
658
  let d = f[p], h = f[u];
654
659
  const m = K(c, e), x = typeof m == "number" ? {
655
660
  mainAxis: m,
@@ -660,13 +665,13 @@ const _n = function(t) {
660
665
  ...m
661
666
  };
662
667
  if (a) {
663
- const P = p === "y" ? "height" : "width", b = i.reference[p] - i.floating[P] + x.mainAxis, A = i.reference[p] + i.reference[P] - x.mainAxis;
664
- d < b ? d = b : d > A && (d = A);
668
+ const b = p === "y" ? "height" : "width", y = i.reference[p] - i.floating[b] + x.mainAxis, C = i.reference[p] + i.reference[b] - x.mainAxis;
669
+ d < y ? d = y : d > C && (d = C);
665
670
  }
666
671
  if (l) {
667
- var v, y;
668
- const P = p === "y" ? "width" : "height", b = se.has(Q(r)), A = i.reference[u] - i.floating[P] + (b && ((v = s.offset) == null ? void 0 : v[u]) || 0) + (b ? 0 : x.crossAxis), O = i.reference[u] + i.reference[P] + (b ? 0 : ((y = s.offset) == null ? void 0 : y[u]) || 0) - (b ? x.crossAxis : 0);
669
- h < A ? h = A : h > O && (h = O);
672
+ var v, A;
673
+ const b = p === "y" ? "width" : "height", y = ie.has(Q(r)), C = i.reference[u] - i.floating[b] + (y && ((v = s.offset) == null ? void 0 : v[u]) || 0) + (y ? 0 : x.crossAxis), R = i.reference[u] + i.reference[b] + (y ? 0 : ((A = s.offset) == null ? void 0 : A[u]) || 0) - (y ? x.crossAxis : 0);
674
+ h < C ? h = C : h > R && (h = R);
670
675
  }
671
676
  return {
672
677
  [p]: d,
@@ -689,22 +694,22 @@ const _n = function(t) {
689
694
  apply: a = () => {
690
695
  },
691
696
  ...l
692
- } = K(t, e), f = await at(e, l), u = Q(r), p = ot(r), d = V(r) === "y", {
697
+ } = K(t, e), f = await s.detectOverflow(e, l), u = Q(r), p = ot(r), d = V(r) === "y", {
693
698
  width: h,
694
699
  height: m
695
700
  } = i.floating;
696
701
  let x, v;
697
702
  u === "top" || u === "bottom" ? (x = u, v = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (v = u, x = p === "end" ? "top" : "bottom");
698
- const y = m - f.top - f.bottom, P = h - f.left - f.right, b = G(m - f[x], y), A = G(h - f[v], P), O = !e.middlewareData.shift;
699
- let R = b, L = A;
700
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (L = P), (o = e.middlewareData.shift) != null && o.enabled.y && (R = y), O && !p) {
703
+ const A = m - f.top - f.bottom, b = h - f.left - f.right, y = G(m - f[x], A), C = G(h - f[v], b), R = !e.middlewareData.shift;
704
+ let O = y, L = C;
705
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (L = b), (o = e.middlewareData.shift) != null && o.enabled.y && (O = A), R && !p) {
701
706
  const D = W(f.left, 0), T = W(f.right, 0), N = W(f.top, 0), E = W(f.bottom, 0);
702
- d ? L = h - 2 * (D !== 0 || T !== 0 ? D + T : W(f.left, f.right)) : R = m - 2 * (N !== 0 || E !== 0 ? N + E : W(f.top, f.bottom));
707
+ d ? L = h - 2 * (D !== 0 || T !== 0 ? D + T : W(f.left, f.right)) : O = m - 2 * (N !== 0 || E !== 0 ? N + E : W(f.top, f.bottom));
703
708
  }
704
709
  await a({
705
710
  ...e,
706
711
  availableWidth: L,
707
- availableHeight: R
712
+ availableHeight: O
708
713
  });
709
714
  const F = await s.getDimensions(c.floating);
710
715
  return h !== F.width || m !== F.height ? {
@@ -715,11 +720,11 @@ const _n = function(t) {
715
720
  }
716
721
  };
717
722
  };
718
- function At() {
723
+ function bt() {
719
724
  return typeof window < "u";
720
725
  }
721
726
  function rt(t) {
722
- return ce(t) ? (t.nodeName || "").toLowerCase() : "#document";
727
+ return se(t) ? (t.nodeName || "").toLowerCase() : "#document";
723
728
  }
724
729
  function H(t) {
725
730
  var e;
@@ -727,22 +732,22 @@ function H(t) {
727
732
  }
728
733
  function Y(t) {
729
734
  var e;
730
- return (e = (ce(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
735
+ return (e = (se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
731
736
  }
732
- function ce(t) {
733
- return At() ? t instanceof Node || t instanceof H(t).Node : !1;
737
+ function se(t) {
738
+ return bt() ? t instanceof Node || t instanceof H(t).Node : !1;
734
739
  }
735
740
  function I(t) {
736
- return At() ? t instanceof Element || t instanceof H(t).Element : !1;
741
+ return bt() ? t instanceof Element || t instanceof H(t).Element : !1;
737
742
  }
738
743
  function X(t) {
739
- return At() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
744
+ return bt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
740
745
  }
741
- function Gt(t) {
742
- return !At() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
746
+ function qt(t) {
747
+ return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
743
748
  }
744
749
  const $n = /* @__PURE__ */ new Set(["inline", "contents"]);
745
- function ut(t) {
750
+ function ft(t) {
746
751
  const {
747
752
  overflow: e,
748
753
  overflowX: n,
@@ -756,7 +761,7 @@ function Hn(t) {
756
761
  return Wn.has(rt(t));
757
762
  }
758
763
  const In = [":popover-open", ":modal"];
759
- function Pt(t) {
764
+ function At(t) {
760
765
  return In.some((e) => {
761
766
  try {
762
767
  return t.matches(e);
@@ -766,22 +771,22 @@ function Pt(t) {
766
771
  });
767
772
  }
768
773
  const Bn = ["transform", "translate", "scale", "rotate", "perspective"], zn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vn = ["paint", "layout", "strict", "content"];
769
- function $t(t) {
770
- const e = Wt(), n = I(t) ? B(t) : t;
774
+ function Ft(t) {
775
+ const e = $t(), n = I(t) ? B(t) : t;
771
776
  return Bn.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) || zn.some((o) => (n.willChange || "").includes(o)) || Vn.some((o) => (n.contain || "").includes(o));
772
777
  }
773
778
  function jn(t) {
774
779
  let e = U(t);
775
780
  for (; X(e) && !et(e); ) {
776
- if ($t(e))
781
+ if (Ft(e))
777
782
  return e;
778
- if (Pt(e))
783
+ if (At(e))
779
784
  return null;
780
785
  e = U(e);
781
786
  }
782
787
  return null;
783
788
  }
784
- function Wt() {
789
+ function $t() {
785
790
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
786
791
  }
787
792
  const Xn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
@@ -791,7 +796,7 @@ function et(t) {
791
796
  function B(t) {
792
797
  return H(t).getComputedStyle(t);
793
798
  }
794
- function Ct(t) {
799
+ function Pt(t) {
795
800
  return I(t) ? {
796
801
  scrollLeft: t.scrollLeft,
797
802
  scrollTop: t.scrollTop
@@ -807,60 +812,60 @@ function U(t) {
807
812
  // Step into the shadow DOM of the parent of a slotted node.
808
813
  t.assignedSlot || // DOM Element detected.
809
814
  t.parentNode || // ShadowRoot detected.
810
- Gt(t) && t.host || // Fallback.
815
+ qt(t) && t.host || // Fallback.
811
816
  Y(t)
812
817
  );
813
- return Gt(e) ? e.host : e;
818
+ return qt(e) ? e.host : e;
814
819
  }
815
- function ae(t) {
820
+ function ce(t) {
816
821
  const e = U(t);
817
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && ut(e) ? e : ae(e);
822
+ return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && ft(e) ? e : ce(e);
818
823
  }
819
- function lt(t, e, n) {
824
+ function at(t, e, n) {
820
825
  var o;
821
826
  e === void 0 && (e = []), n === void 0 && (n = !0);
822
- const r = ae(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
827
+ const r = ce(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = H(r);
823
828
  if (i) {
824
- const c = _t(s);
825
- return e.concat(s, s.visualViewport || [], ut(r) ? r : [], c && n ? lt(c) : []);
829
+ const c = Lt(s);
830
+ return e.concat(s, s.visualViewport || [], ft(r) ? r : [], c && n ? at(c) : []);
826
831
  }
827
- return e.concat(r, lt(r, [], n));
832
+ return e.concat(r, at(r, [], n));
828
833
  }
829
- function _t(t) {
834
+ function Lt(t) {
830
835
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
831
836
  }
832
- function le(t) {
837
+ function ae(t) {
833
838
  const e = B(t);
834
839
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
835
- const r = X(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = gt(n) !== i || gt(o) !== s;
840
+ const r = X(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = mt(n) !== i || mt(o) !== s;
836
841
  return c && (n = i, o = s), {
837
842
  width: n,
838
843
  height: o,
839
844
  $: c
840
845
  };
841
846
  }
842
- function Ht(t) {
847
+ function Wt(t) {
843
848
  return I(t) ? t : t.contextElement;
844
849
  }
845
850
  function tt(t) {
846
- const e = Ht(t);
851
+ const e = Wt(t);
847
852
  if (!X(e))
848
853
  return j(1);
849
854
  const n = e.getBoundingClientRect(), {
850
855
  width: o,
851
856
  height: r,
852
857
  $: i
853
- } = le(e);
854
- let s = (i ? gt(n.width) : n.width) / o, c = (i ? gt(n.height) : n.height) / r;
858
+ } = ae(e);
859
+ let s = (i ? mt(n.width) : n.width) / o, c = (i ? mt(n.height) : n.height) / r;
855
860
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
856
861
  x: s,
857
862
  y: c
858
863
  };
859
864
  }
860
865
  const Yn = /* @__PURE__ */ j(0);
861
- function fe(t) {
866
+ function le(t) {
862
867
  const e = H(t);
863
- return !Wt() || !e.visualViewport ? Yn : {
868
+ return !$t() || !e.visualViewport ? Yn : {
864
869
  x: e.visualViewport.offsetLeft,
865
870
  y: e.visualViewport.offsetTop
866
871
  };
@@ -870,32 +875,32 @@ function Kn(t, e, n) {
870
875
  }
871
876
  function J(t, e, n, o) {
872
877
  e === void 0 && (e = !1), n === void 0 && (n = !1);
873
- const r = t.getBoundingClientRect(), i = Ht(t);
878
+ const r = t.getBoundingClientRect(), i = Wt(t);
874
879
  let s = j(1);
875
880
  e && (o ? I(o) && (s = tt(o)) : s = tt(t));
876
- const c = Kn(i, n, o) ? fe(i) : j(0);
881
+ const c = Kn(i, n, o) ? le(i) : j(0);
877
882
  let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
878
883
  if (i) {
879
884
  const p = H(i), d = o && I(o) ? H(o) : o;
880
- let h = p, m = _t(h);
885
+ let h = p, m = Lt(h);
881
886
  for (; m && o && d !== h; ) {
882
- const x = tt(m), v = m.getBoundingClientRect(), y = B(m), P = v.left + (m.clientLeft + parseFloat(y.paddingLeft)) * x.x, b = v.top + (m.clientTop + parseFloat(y.paddingTop)) * x.y;
883
- a *= x.x, l *= x.y, f *= x.x, u *= x.y, a += P, l += b, h = H(m), m = _t(h);
887
+ const x = tt(m), v = m.getBoundingClientRect(), A = B(m), b = v.left + (m.clientLeft + parseFloat(A.paddingLeft)) * x.x, y = v.top + (m.clientTop + parseFloat(A.paddingTop)) * x.y;
888
+ a *= x.x, l *= x.y, f *= x.x, u *= x.y, a += b, l += y, h = H(m), m = Lt(h);
884
889
  }
885
890
  }
886
- return vt({
891
+ return wt({
887
892
  width: f,
888
893
  height: u,
889
894
  x: a,
890
895
  y: l
891
896
  });
892
897
  }
893
- function Rt(t, e) {
894
- const n = Ct(t).scrollLeft;
898
+ function Ct(t, e) {
899
+ const n = Pt(t).scrollLeft;
895
900
  return e ? e.left + n : J(Y(t)).left + n;
896
901
  }
897
- function ue(t, e) {
898
- const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - Rt(t, n), r = n.top + e.scrollTop;
902
+ function fe(t, e) {
903
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - Ct(t, n), r = n.top + e.scrollTop;
899
904
  return {
900
905
  x: o,
901
906
  y: r
@@ -908,7 +913,7 @@ function Qn(t) {
908
913
  offsetParent: o,
909
914
  strategy: r
910
915
  } = t;
911
- const i = r === "fixed", s = Y(o), c = e ? Pt(e.floating) : !1;
916
+ const i = r === "fixed", s = Y(o), c = e ? At(e.floating) : !1;
912
917
  if (o === s || c && i)
913
918
  return n;
914
919
  let a = {
@@ -916,11 +921,11 @@ function Qn(t) {
916
921
  scrollTop: 0
917
922
  }, l = j(1);
918
923
  const f = j(0), u = X(o);
919
- if ((u || !u && !i) && ((rt(o) !== "body" || ut(s)) && (a = Ct(o)), X(o))) {
924
+ if ((u || !u && !i) && ((rt(o) !== "body" || ft(s)) && (a = Pt(o)), X(o))) {
920
925
  const d = J(o);
921
926
  l = tt(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
922
927
  }
923
- const p = s && !u && !i ? ue(s, a) : j(0);
928
+ const p = s && !u && !i ? fe(s, a) : j(0);
924
929
  return {
925
930
  width: n.width * l.x,
926
931
  height: n.height * l.y,
@@ -932,8 +937,8 @@ function qn(t) {
932
937
  return Array.from(t.getClientRects());
933
938
  }
934
939
  function Gn(t) {
935
- const e = Y(t), n = Ct(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
936
- let s = -n.scrollLeft + Rt(t);
940
+ const e = Y(t), n = Pt(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
941
+ let s = -n.scrollLeft + Ct(t);
937
942
  const c = -n.scrollTop;
938
943
  return B(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
939
944
  width: r,
@@ -942,20 +947,20 @@ function Gn(t) {
942
947
  y: c
943
948
  };
944
949
  }
945
- const Ut = 25;
950
+ const Gt = 25;
946
951
  function Un(t, e) {
947
952
  const n = H(t), o = Y(t), r = n.visualViewport;
948
953
  let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
949
954
  if (r) {
950
955
  i = r.width, s = r.height;
951
- const f = Wt();
956
+ const f = $t();
952
957
  (!f || f && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
953
958
  }
954
- const l = Rt(o);
959
+ const l = Ct(o);
955
960
  if (l <= 0) {
956
961
  const f = o.ownerDocument, u = f.body, p = getComputedStyle(u), d = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
957
- h <= Ut && (i -= h);
958
- } else l <= Ut && (i += l);
962
+ h <= Gt && (i -= h);
963
+ } else l <= Gt && (i += l);
959
964
  return {
960
965
  width: i,
961
966
  height: s,
@@ -973,7 +978,7 @@ function Jn(t, e) {
973
978
  y: l
974
979
  };
975
980
  }
976
- function Zt(t, e, n) {
981
+ function Ut(t, e, n) {
977
982
  let o;
978
983
  if (e === "viewport")
979
984
  o = Un(t, n);
@@ -982,7 +987,7 @@ function Zt(t, e, n) {
982
987
  else if (I(e))
983
988
  o = Jn(e, n);
984
989
  else {
985
- const r = fe(t);
990
+ const r = le(t);
986
991
  o = {
987
992
  x: e.x - r.x,
988
993
  y: e.y - r.y,
@@ -990,22 +995,22 @@ function Zt(t, e, n) {
990
995
  height: e.height
991
996
  };
992
997
  }
993
- return vt(o);
998
+ return wt(o);
994
999
  }
995
- function de(t, e) {
1000
+ function ue(t, e) {
996
1001
  const n = U(t);
997
- return n === e || !I(n) || et(n) ? !1 : B(n).position === "fixed" || de(n, e);
1002
+ return n === e || !I(n) || et(n) ? !1 : B(n).position === "fixed" || ue(n, e);
998
1003
  }
999
1004
  function to(t, e) {
1000
1005
  const n = e.get(t);
1001
1006
  if (n)
1002
1007
  return n;
1003
- let o = lt(t, [], !1).filter((c) => I(c) && rt(c) !== "body"), r = null;
1008
+ let o = at(t, [], !1).filter((c) => I(c) && rt(c) !== "body"), r = null;
1004
1009
  const i = B(t).position === "fixed";
1005
1010
  let s = i ? U(t) : t;
1006
1011
  for (; I(s) && !et(s); ) {
1007
- const c = B(s), a = $t(s);
1008
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && Zn.has(r.position) || ut(s) && !a && de(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = U(s);
1012
+ const c = B(s), a = Ft(s);
1013
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && Zn.has(r.position) || ft(s) && !a && ue(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = U(s);
1009
1014
  }
1010
1015
  return e.set(t, o), o;
1011
1016
  }
@@ -1016,10 +1021,10 @@ function eo(t) {
1016
1021
  rootBoundary: o,
1017
1022
  strategy: r
1018
1023
  } = t;
1019
- const s = [...n === "clippingAncestors" ? Pt(e) ? [] : to(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
1020
- const u = Zt(e, f, r);
1024
+ const s = [...n === "clippingAncestors" ? At(e) ? [] : to(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
1025
+ const u = Ut(e, f, r);
1021
1026
  return l.top = W(u.top, l.top), l.right = G(u.right, l.right), l.bottom = G(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
1022
- }, Zt(e, c, r));
1027
+ }, Ut(e, c, r));
1023
1028
  return {
1024
1029
  width: a.right - a.left,
1025
1030
  height: a.bottom - a.top,
@@ -1031,7 +1036,7 @@ function no(t) {
1031
1036
  const {
1032
1037
  width: e,
1033
1038
  height: n
1034
- } = le(t);
1039
+ } = ae(t);
1035
1040
  return {
1036
1041
  width: e,
1037
1042
  height: n
@@ -1045,15 +1050,15 @@ function oo(t, e, n) {
1045
1050
  };
1046
1051
  const a = j(0);
1047
1052
  function l() {
1048
- a.x = Rt(r);
1053
+ a.x = Ct(r);
1049
1054
  }
1050
1055
  if (o || !o && !i)
1051
- if ((rt(e) !== "body" || ut(r)) && (c = Ct(e)), o) {
1056
+ if ((rt(e) !== "body" || ft(r)) && (c = Pt(e)), o) {
1052
1057
  const d = J(e, !0, i, e);
1053
1058
  a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
1054
1059
  } else r && l();
1055
1060
  i && !o && r && l();
1056
- const f = r && !o && !i ? ue(r, c) : j(0), u = s.left + c.scrollLeft - a.x - f.x, p = s.top + c.scrollTop - a.y - f.y;
1061
+ const f = r && !o && !i ? fe(r, c) : j(0), u = s.left + c.scrollLeft - a.x - f.x, p = s.top + c.scrollTop - a.y - f.y;
1057
1062
  return {
1058
1063
  x: u,
1059
1064
  y: p,
@@ -1061,10 +1066,10 @@ function oo(t, e, n) {
1061
1066
  height: s.height
1062
1067
  };
1063
1068
  }
1064
- function St(t) {
1069
+ function Ot(t) {
1065
1070
  return B(t).position === "static";
1066
1071
  }
1067
- function Jt(t, e) {
1072
+ function Zt(t, e) {
1068
1073
  if (!X(t) || B(t).position === "fixed")
1069
1074
  return null;
1070
1075
  if (e)
@@ -1072,26 +1077,26 @@ function Jt(t, e) {
1072
1077
  let n = t.offsetParent;
1073
1078
  return Y(t) === n && (n = n.ownerDocument.body), n;
1074
1079
  }
1075
- function pe(t, e) {
1080
+ function de(t, e) {
1076
1081
  const n = H(t);
1077
- if (Pt(t))
1082
+ if (At(t))
1078
1083
  return n;
1079
1084
  if (!X(t)) {
1080
1085
  let r = U(t);
1081
1086
  for (; r && !et(r); ) {
1082
- if (I(r) && !St(r))
1087
+ if (I(r) && !Ot(r))
1083
1088
  return r;
1084
1089
  r = U(r);
1085
1090
  }
1086
1091
  return n;
1087
1092
  }
1088
- let o = Jt(t, e);
1089
- for (; o && Hn(o) && St(o); )
1090
- o = Jt(o, e);
1091
- return o && et(o) && St(o) && !$t(o) ? n : o || jn(t) || n;
1093
+ let o = Zt(t, e);
1094
+ for (; o && Hn(o) && Ot(o); )
1095
+ o = Zt(o, e);
1096
+ return o && et(o) && Ot(o) && !Ft(o) ? n : o || jn(t) || n;
1092
1097
  }
1093
1098
  const ro = async function(t) {
1094
- const e = this.getOffsetParent || pe, n = this.getDimensions, o = await n(t.floating);
1099
+ const e = this.getOffsetParent || de, n = this.getDimensions, o = await n(t.floating);
1095
1100
  return {
1096
1101
  reference: oo(t.reference, await e(t.floating), t.strategy),
1097
1102
  floating: {
@@ -1109,7 +1114,7 @@ const so = {
1109
1114
  convertOffsetParentRelativeRectToViewportRelativeRect: Qn,
1110
1115
  getDocumentElement: Y,
1111
1116
  getClippingRect: eo,
1112
- getOffsetParent: pe,
1117
+ getOffsetParent: de,
1113
1118
  getElementRects: ro,
1114
1119
  getClientRects: qn,
1115
1120
  getDimensions: no,
@@ -1117,7 +1122,7 @@ const so = {
1117
1122
  isElement: I,
1118
1123
  isRTL: io
1119
1124
  };
1120
- function he(t, e) {
1125
+ function pe(t, e) {
1121
1126
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1122
1127
  }
1123
1128
  function co(t, e) {
@@ -1137,30 +1142,30 @@ function co(t, e) {
1137
1142
  } = l;
1138
1143
  if (c || e(), !p || !d)
1139
1144
  return;
1140
- const h = ht(u), m = ht(r.clientWidth - (f + p)), x = ht(r.clientHeight - (u + d)), v = ht(f), P = {
1145
+ const h = pt(u), m = pt(r.clientWidth - (f + p)), x = pt(r.clientHeight - (u + d)), v = pt(f), b = {
1141
1146
  rootMargin: -h + "px " + -m + "px " + -x + "px " + -v + "px",
1142
1147
  threshold: W(0, G(1, a)) || 1
1143
1148
  };
1144
- let b = !0;
1145
- function A(O) {
1146
- const R = O[0].intersectionRatio;
1147
- if (R !== a) {
1148
- if (!b)
1149
+ let y = !0;
1150
+ function C(R) {
1151
+ const O = R[0].intersectionRatio;
1152
+ if (O !== a) {
1153
+ if (!y)
1149
1154
  return s();
1150
- R ? s(!1, R) : o = setTimeout(() => {
1155
+ O ? s(!1, O) : o = setTimeout(() => {
1151
1156
  s(!1, 1e-7);
1152
1157
  }, 1e3);
1153
1158
  }
1154
- R === 1 && !he(l, t.getBoundingClientRect()) && s(), b = !1;
1159
+ O === 1 && !pe(l, t.getBoundingClientRect()) && s(), y = !1;
1155
1160
  }
1156
1161
  try {
1157
- n = new IntersectionObserver(A, {
1158
- ...P,
1162
+ n = new IntersectionObserver(C, {
1163
+ ...b,
1159
1164
  // Handle <iframe>s
1160
1165
  root: r.ownerDocument
1161
1166
  });
1162
1167
  } catch {
1163
- n = new IntersectionObserver(A, P);
1168
+ n = new IntersectionObserver(C, b);
1164
1169
  }
1165
1170
  n.observe(t);
1166
1171
  }
@@ -1174,7 +1179,7 @@ function ao(t, e, n, o) {
1174
1179
  elementResize: s = typeof ResizeObserver == "function",
1175
1180
  layoutShift: c = typeof IntersectionObserver == "function",
1176
1181
  animationFrame: a = !1
1177
- } = o, l = Ht(t), f = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
1182
+ } = o, l = Wt(t), f = r || i ? [...l ? at(l) : [], ...at(e)] : [];
1178
1183
  f.forEach((v) => {
1179
1184
  r && v.addEventListener("scroll", n, {
1180
1185
  passive: !0
@@ -1183,26 +1188,26 @@ function ao(t, e, n, o) {
1183
1188
  const u = l && c ? co(l, n) : null;
1184
1189
  let p = -1, d = null;
1185
1190
  s && (d = new ResizeObserver((v) => {
1186
- let [y] = v;
1187
- y && y.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1188
- var P;
1189
- (P = d) == null || P.observe(e);
1191
+ let [A] = v;
1192
+ A && A.target === l && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1193
+ var b;
1194
+ (b = d) == null || b.observe(e);
1190
1195
  })), n();
1191
1196
  }), l && !a && d.observe(l), d.observe(e));
1192
1197
  let h, m = a ? J(t) : null;
1193
1198
  a && x();
1194
1199
  function x() {
1195
1200
  const v = J(t);
1196
- m && !he(m, v) && n(), m = v, h = requestAnimationFrame(x);
1201
+ m && !pe(m, v) && n(), m = v, h = requestAnimationFrame(x);
1197
1202
  }
1198
1203
  return n(), () => {
1199
1204
  var v;
1200
- f.forEach((y) => {
1201
- r && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
1205
+ f.forEach((A) => {
1206
+ r && A.removeEventListener("scroll", n), i && A.removeEventListener("resize", n);
1202
1207
  }), u?.(), (v = d) == null || v.disconnect(), d = null, a && cancelAnimationFrame(h);
1203
1208
  };
1204
1209
  }
1205
- const lo = _n, fo = Tn, uo = Mn, po = Fn, ho = Dn, te = kn, mo = Nn, go = (t, e, n) => {
1210
+ const lo = _n, fo = Tn, uo = Mn, po = Fn, ho = Dn, Jt = kn, mo = Nn, go = (t, e, n) => {
1206
1211
  const o = /* @__PURE__ */ new Map(), r = {
1207
1212
  platform: so,
1208
1213
  ...n
@@ -1216,8 +1221,8 @@ const lo = _n, fo = Tn, uo = Mn, po = Fn, ho = Dn, te = kn, mo = Nn, go = (t, e,
1216
1221
  });
1217
1222
  };
1218
1223
  var wo = typeof document < "u", vo = function() {
1219
- }, mt = wo ? Ge : vo;
1220
- function xt(t, e) {
1224
+ }, ht = wo ? qe : vo;
1225
+ function vt(t, e) {
1221
1226
  if (t === e)
1222
1227
  return !0;
1223
1228
  if (typeof t != typeof e)
@@ -1229,7 +1234,7 @@ function xt(t, e) {
1229
1234
  if (Array.isArray(t)) {
1230
1235
  if (n = t.length, n !== e.length) return !1;
1231
1236
  for (o = n; o-- !== 0; )
1232
- if (!xt(t[o], e[o]))
1237
+ if (!vt(t[o], e[o]))
1233
1238
  return !1;
1234
1239
  return !0;
1235
1240
  }
@@ -1240,23 +1245,23 @@ function xt(t, e) {
1240
1245
  return !1;
1241
1246
  for (o = n; o-- !== 0; ) {
1242
1247
  const i = r[o];
1243
- if (!(i === "_owner" && t.$$typeof) && !xt(t[i], e[i]))
1248
+ if (!(i === "_owner" && t.$$typeof) && !vt(t[i], e[i]))
1244
1249
  return !1;
1245
1250
  }
1246
1251
  return !0;
1247
1252
  }
1248
1253
  return t !== t && e !== e;
1249
1254
  }
1250
- function me(t) {
1255
+ function he(t) {
1251
1256
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1252
1257
  }
1253
- function ee(t, e) {
1254
- const n = me(t);
1258
+ function te(t, e) {
1259
+ const n = he(t);
1255
1260
  return Math.round(e * n) / n;
1256
1261
  }
1257
- function Et(t) {
1262
+ function St(t) {
1258
1263
  const e = g.useRef(t);
1259
- return mt(() => {
1264
+ return ht(() => {
1260
1265
  e.current = t;
1261
1266
  }), e;
1262
1267
  }
@@ -1282,20 +1287,20 @@ function xo(t) {
1282
1287
  middlewareData: {},
1283
1288
  isPositioned: !1
1284
1289
  }), [p, d] = g.useState(o);
1285
- xt(p, o) || d(o);
1286
- const [h, m] = g.useState(null), [x, v] = g.useState(null), y = g.useCallback((C) => {
1287
- C !== O.current && (O.current = C, m(C));
1288
- }, []), P = g.useCallback((C) => {
1289
- C !== R.current && (R.current = C, v(C));
1290
- }, []), b = i || h, A = s || x, O = g.useRef(null), R = g.useRef(null), L = g.useRef(f), F = a != null, D = Et(a), T = Et(r), N = Et(l), E = g.useCallback(() => {
1291
- if (!O.current || !R.current)
1290
+ vt(p, o) || d(o);
1291
+ const [h, m] = g.useState(null), [x, v] = g.useState(null), A = g.useCallback((P) => {
1292
+ P !== R.current && (R.current = P, m(P));
1293
+ }, []), b = g.useCallback((P) => {
1294
+ P !== O.current && (O.current = P, v(P));
1295
+ }, []), y = i || h, C = s || x, R = g.useRef(null), O = g.useRef(null), L = g.useRef(f), F = a != null, D = St(a), T = St(r), N = St(l), E = g.useCallback(() => {
1296
+ if (!R.current || !O.current)
1292
1297
  return;
1293
- const C = {
1298
+ const P = {
1294
1299
  placement: e,
1295
1300
  strategy: n,
1296
1301
  middleware: p
1297
1302
  };
1298
- T.current && (C.platform = T.current), go(O.current, R.current, C).then((_) => {
1303
+ T.current && (P.platform = T.current), go(R.current, O.current, P).then((_) => {
1299
1304
  const z = {
1300
1305
  ..._,
1301
1306
  // The floating element's position may be recomputed while it's closed
@@ -1304,48 +1309,48 @@ function xo(t) {
1304
1309
  // setting it to `true` when `open === false` (must be specified).
1305
1310
  isPositioned: N.current !== !1
1306
1311
  };
1307
- S.current && !xt(L.current, z) && (L.current = z, un.flushSync(() => {
1312
+ S.current && !vt(L.current, z) && (L.current = z, fn.flushSync(() => {
1308
1313
  u(z);
1309
1314
  }));
1310
1315
  });
1311
1316
  }, [p, e, n, T, N]);
1312
- mt(() => {
1313
- l === !1 && L.current.isPositioned && (L.current.isPositioned = !1, u((C) => ({
1314
- ...C,
1317
+ ht(() => {
1318
+ l === !1 && L.current.isPositioned && (L.current.isPositioned = !1, u((P) => ({
1319
+ ...P,
1315
1320
  isPositioned: !1
1316
1321
  })));
1317
1322
  }, [l]);
1318
1323
  const S = g.useRef(!1);
1319
- mt(() => (S.current = !0, () => {
1324
+ ht(() => (S.current = !0, () => {
1320
1325
  S.current = !1;
1321
- }), []), mt(() => {
1322
- if (b && (O.current = b), A && (R.current = A), b && A) {
1326
+ }), []), ht(() => {
1327
+ if (y && (R.current = y), C && (O.current = C), y && C) {
1323
1328
  if (D.current)
1324
- return D.current(b, A, E);
1329
+ return D.current(y, C, E);
1325
1330
  E();
1326
1331
  }
1327
- }, [b, A, E, D, F]);
1332
+ }, [y, C, E, D, F]);
1328
1333
  const $ = g.useMemo(() => ({
1329
- reference: O,
1330
- floating: R,
1331
- setReference: y,
1332
- setFloating: P
1333
- }), [y, P]), k = g.useMemo(() => ({
1334
- reference: b,
1335
- floating: A
1336
- }), [b, A]), M = g.useMemo(() => {
1337
- const C = {
1334
+ reference: R,
1335
+ floating: O,
1336
+ setReference: A,
1337
+ setFloating: b
1338
+ }), [A, b]), k = g.useMemo(() => ({
1339
+ reference: y,
1340
+ floating: C
1341
+ }), [y, C]), M = g.useMemo(() => {
1342
+ const P = {
1338
1343
  position: n,
1339
1344
  left: 0,
1340
1345
  top: 0
1341
1346
  };
1342
1347
  if (!k.floating)
1343
- return C;
1344
- const _ = ee(k.floating, f.x), z = ee(k.floating, f.y);
1348
+ return P;
1349
+ const _ = te(k.floating, f.x), z = te(k.floating, f.y);
1345
1350
  return c ? {
1346
- ...C,
1351
+ ...P,
1347
1352
  transform: "translate(" + _ + "px, " + z + "px)",
1348
- ...me(k.floating) >= 1.5 && {
1353
+ ...he(k.floating) >= 1.5 && {
1349
1354
  willChange: "transform"
1350
1355
  }
1351
1356
  } : {
@@ -1374,10 +1379,10 @@ const yo = (t) => {
1374
1379
  element: o,
1375
1380
  padding: r
1376
1381
  } = typeof t == "function" ? t(n) : t;
1377
- return o && e(o) ? o.current != null ? te({
1382
+ return o && e(o) ? o.current != null ? Jt({
1378
1383
  element: o.current,
1379
1384
  padding: r
1380
- }).fn(n) : {} : o ? te({
1385
+ }).fn(n) : {} : o ? Jt({
1381
1386
  element: o,
1382
1387
  padding: r
1383
1388
  }).fn(n) : {};
@@ -1405,10 +1410,10 @@ const yo = (t) => {
1405
1410
  ...yo(t),
1406
1411
  options: [t, e]
1407
1412
  });
1408
- var Eo = "Arrow", ge = g.forwardRef((t, e) => {
1413
+ var Eo = "Arrow", me = g.forwardRef((t, e) => {
1409
1414
  const { children: n, width: o = 10, height: r = 5, ...i } = t;
1410
1415
  return /* @__PURE__ */ w(
1411
- ft.svg,
1416
+ lt.svg,
1412
1417
  {
1413
1418
  ...i,
1414
1419
  ref: e,
@@ -1420,23 +1425,23 @@ var Eo = "Arrow", ge = g.forwardRef((t, e) => {
1420
1425
  }
1421
1426
  );
1422
1427
  });
1423
- ge.displayName = Eo;
1424
- var ko = ge, It = "Popper", [we, ve] = oe(It), [Mo, xe] = we(It), ye = (t) => {
1428
+ me.displayName = Eo;
1429
+ var ko = me, Ht = "Popper", [ge, we] = ne(Ht), [Mo, ve] = ge(Ht), xe = (t) => {
1425
1430
  const { __scopePopper: e, children: n } = t, [o, r] = g.useState(null);
1426
1431
  return /* @__PURE__ */ w(Mo, { scope: e, anchor: o, onAnchorChange: r, children: n });
1427
1432
  };
1428
- ye.displayName = It;
1429
- var be = "PopperAnchor", Ae = g.forwardRef(
1433
+ xe.displayName = Ht;
1434
+ var ye = "PopperAnchor", be = g.forwardRef(
1430
1435
  (t, e) => {
1431
- const { __scopePopper: n, virtualRef: o, ...r } = t, i = xe(be, n), s = g.useRef(null), c = bt(e, s), a = g.useRef(null);
1436
+ const { __scopePopper: n, virtualRef: o, ...r } = t, i = ve(ye, n), s = g.useRef(null), c = yt(e, s), a = g.useRef(null);
1432
1437
  return g.useEffect(() => {
1433
1438
  const l = a.current;
1434
1439
  a.current = o?.current || s.current, l !== a.current && i.onAnchorChange(a.current);
1435
- }), o ? null : /* @__PURE__ */ w(ft.div, { ...r, ref: c });
1440
+ }), o ? null : /* @__PURE__ */ w(lt.div, { ...r, ref: c });
1436
1441
  }
1437
1442
  );
1438
- Ae.displayName = be;
1439
- var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1443
+ be.displayName = ye;
1444
+ var It = "PopperContent", [Do, Lo] = ge(It), Ae = g.forwardRef(
1440
1445
  (t, e) => {
1441
1446
  const {
1442
1447
  __scopePopper: n,
@@ -1453,12 +1458,12 @@ var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1453
1458
  updatePositionStrategy: d = "optimized",
1454
1459
  onPlaced: h,
1455
1460
  ...m
1456
- } = t, x = xe(Bt, n), [v, y] = g.useState(null), P = bt(e, (it) => y(it)), [b, A] = g.useState(null), O = gn(b), R = O?.width ?? 0, L = O?.height ?? 0, F = o + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, T = Array.isArray(l) ? l : [l], N = T.length > 0, E = {
1461
+ } = t, x = ve(It, n), [v, A] = g.useState(null), b = yt(e, (it) => A(it)), [y, C] = g.useState(null), R = mn(y), O = R?.width ?? 0, L = R?.height ?? 0, F = o + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, T = Array.isArray(l) ? l : [l], N = T.length > 0, E = {
1457
1462
  padding: D,
1458
1463
  boundary: T.filter(To),
1459
1464
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1460
1465
  altBoundary: N
1461
- }, { refs: S, floatingStyles: $, placement: k, isPositioned: M, middlewareData: C } = xo({
1466
+ }, { refs: S, floatingStyles: $, placement: k, isPositioned: M, middlewareData: P } = xo({
1462
1467
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1463
1468
  strategy: "fixed",
1464
1469
  placement: F,
@@ -1479,22 +1484,22 @@ var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1479
1484
  a && Co({ ...E }),
1480
1485
  Ro({
1481
1486
  ...E,
1482
- apply: ({ elements: it, rects: jt, availableWidth: je, availableHeight: Xe }) => {
1483
- const { width: Ye, height: Ke } = jt.reference, pt = it.floating.style;
1484
- pt.setProperty("--radix-popper-available-width", `${je}px`), pt.setProperty("--radix-popper-available-height", `${Xe}px`), pt.setProperty("--radix-popper-anchor-width", `${Ye}px`), pt.setProperty("--radix-popper-anchor-height", `${Ke}px`);
1487
+ apply: ({ elements: it, rects: Vt, availableWidth: Ve, availableHeight: je }) => {
1488
+ const { width: Xe, height: Ye } = Vt.reference, dt = it.floating.style;
1489
+ dt.setProperty("--radix-popper-available-width", `${Ve}px`), dt.setProperty("--radix-popper-available-height", `${je}px`), dt.setProperty("--radix-popper-anchor-width", `${Xe}px`), dt.setProperty("--radix-popper-anchor-height", `${Ye}px`);
1485
1490
  }
1486
1491
  }),
1487
- b && So({ element: b, padding: c }),
1488
- No({ arrowWidth: R, arrowHeight: L }),
1492
+ y && So({ element: y, padding: c }),
1493
+ No({ arrowWidth: O, arrowHeight: L }),
1489
1494
  p && Oo({ strategy: "referenceHidden", ...E })
1490
1495
  ]
1491
- }), [_, z] = Oe(k), Vt = tn(h);
1492
- Mt(() => {
1493
- M && Vt?.();
1494
- }, [M, Vt]);
1495
- const He = C.arrow?.x, Ie = C.arrow?.y, Be = C.arrow?.centerOffset !== 0, [ze, Ve] = g.useState();
1496
- return Mt(() => {
1497
- v && Ve(window.getComputedStyle(v).zIndex);
1496
+ }), [_, z] = Re(k), zt = Je(h);
1497
+ kt(() => {
1498
+ M && zt?.();
1499
+ }, [M, zt]);
1500
+ const We = P.arrow?.x, He = P.arrow?.y, Ie = P.arrow?.centerOffset !== 0, [Be, ze] = g.useState();
1501
+ return kt(() => {
1502
+ v && ze(window.getComputedStyle(v).zIndex);
1498
1503
  }, [v]), /* @__PURE__ */ w(
1499
1504
  "div",
1500
1505
  {
@@ -1505,15 +1510,15 @@ var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1505
1510
  transform: M ? $.transform : "translate(0, -200%)",
1506
1511
  // keep off the page when measuring
1507
1512
  minWidth: "max-content",
1508
- zIndex: ze,
1513
+ zIndex: Be,
1509
1514
  "--radix-popper-transform-origin": [
1510
- C.transformOrigin?.x,
1511
- C.transformOrigin?.y
1515
+ P.transformOrigin?.x,
1516
+ P.transformOrigin?.y
1512
1517
  ].join(" "),
1513
1518
  // hide the content if using the hide middleware and should be hidden
1514
1519
  // set visibility to hidden and disable pointer events so the UI behaves
1515
1520
  // as if the PopperContent isn't there at all
1516
- ...C.hide?.referenceHidden && {
1521
+ ...P.hide?.referenceHidden && {
1517
1522
  visibility: "hidden",
1518
1523
  pointerEvents: "none"
1519
1524
  }
@@ -1524,17 +1529,17 @@ var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1524
1529
  {
1525
1530
  scope: n,
1526
1531
  placedSide: _,
1527
- onArrowChange: A,
1528
- arrowX: He,
1529
- arrowY: Ie,
1530
- shouldHideArrow: Be,
1532
+ onArrowChange: C,
1533
+ arrowX: We,
1534
+ arrowY: He,
1535
+ shouldHideArrow: Ie,
1531
1536
  children: /* @__PURE__ */ w(
1532
- ft.div,
1537
+ lt.div,
1533
1538
  {
1534
1539
  "data-side": _,
1535
1540
  "data-align": z,
1536
1541
  ...m,
1537
- ref: P,
1542
+ ref: b,
1538
1543
  style: {
1539
1544
  ...m.style,
1540
1545
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -1549,14 +1554,14 @@ var Bt = "PopperContent", [Do, Lo] = we(Bt), Pe = g.forwardRef(
1549
1554
  );
1550
1555
  }
1551
1556
  );
1552
- Pe.displayName = Bt;
1553
- var Ce = "PopperArrow", _o = {
1557
+ Ae.displayName = It;
1558
+ var Pe = "PopperArrow", _o = {
1554
1559
  top: "bottom",
1555
1560
  right: "left",
1556
1561
  bottom: "top",
1557
1562
  left: "right"
1558
- }, Re = g.forwardRef(function(e, n) {
1559
- const { __scopePopper: o, ...r } = e, i = Lo(Ce, o), s = _o[i.placedSide];
1563
+ }, Ce = g.forwardRef(function(e, n) {
1564
+ const { __scopePopper: o, ...r } = e, i = Lo(Pe, o), s = _o[i.placedSide];
1560
1565
  return (
1561
1566
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1562
1567
  // doesn't report size as we'd expect on SVG elements.
@@ -1600,7 +1605,7 @@ var Ce = "PopperArrow", _o = {
1600
1605
  )
1601
1606
  );
1602
1607
  });
1603
- Re.displayName = Ce;
1608
+ Ce.displayName = Pe;
1604
1609
  function To(t) {
1605
1610
  return t !== null;
1606
1611
  }
@@ -1608,18 +1613,18 @@ var No = (t) => ({
1608
1613
  name: "transformOrigin",
1609
1614
  options: t,
1610
1615
  fn(e) {
1611
- const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, a = s ? 0 : t.arrowHeight, [l, f] = Oe(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + a / 2;
1616
+ const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, a = s ? 0 : t.arrowHeight, [l, f] = Re(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + a / 2;
1612
1617
  let h = "", m = "";
1613
1618
  return l === "bottom" ? (h = s ? u : `${p}px`, m = `${-a}px`) : l === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + a}px`) : l === "right" ? (h = `${-a}px`, m = s ? u : `${d}px`) : l === "left" && (h = `${o.floating.width + a}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
1614
1619
  }
1615
1620
  });
1616
- function Oe(t) {
1621
+ function Re(t) {
1617
1622
  const [e, n = "center"] = t.split("-");
1618
1623
  return [e, n];
1619
1624
  }
1620
- var Fo = ye, Se = Ae, $o = Pe, Wo = Re, Ot = "Popover", [Ee] = oe(Ot, [
1621
- ve
1622
- ]), dt = ve(), [Ho, Z] = Ee(Ot), ke = (t) => {
1625
+ var Fo = xe, Oe = be, $o = Ae, Wo = Ce, Rt = "Popover", [Se] = ne(Rt, [
1626
+ we
1627
+ ]), ut = we(), [Ho, Z] = Se(Rt), Ee = (t) => {
1623
1628
  const {
1624
1629
  __scopePopover: e,
1625
1630
  children: n,
@@ -1627,17 +1632,17 @@ var Fo = ye, Se = Ae, $o = Pe, Wo = Re, Ot = "Popover", [Ee] = oe(Ot, [
1627
1632
  defaultOpen: r,
1628
1633
  onOpenChange: i,
1629
1634
  modal: s = !1
1630
- } = t, c = dt(e), a = g.useRef(null), [l, f] = g.useState(!1), [u, p] = en({
1635
+ } = t, c = ut(e), a = g.useRef(null), [l, f] = g.useState(!1), [u, p] = tn({
1631
1636
  prop: o,
1632
1637
  defaultProp: r ?? !1,
1633
1638
  onChange: i,
1634
- caller: Ot
1639
+ caller: Rt
1635
1640
  });
1636
1641
  return /* @__PURE__ */ w(Fo, { ...c, children: /* @__PURE__ */ w(
1637
1642
  Ho,
1638
1643
  {
1639
1644
  scope: e,
1640
- contentId: nn(),
1645
+ contentId: en(),
1641
1646
  triggerRef: a,
1642
1647
  open: u,
1643
1648
  onOpenChange: p,
@@ -1650,55 +1655,55 @@ var Fo = ye, Se = Ae, $o = Pe, Wo = Re, Ot = "Popover", [Ee] = oe(Ot, [
1650
1655
  }
1651
1656
  ) });
1652
1657
  };
1653
- ke.displayName = Ot;
1654
- var Me = "PopoverAnchor", De = g.forwardRef(
1658
+ Ee.displayName = Rt;
1659
+ var ke = "PopoverAnchor", Me = g.forwardRef(
1655
1660
  (t, e) => {
1656
- const { __scopePopover: n, ...o } = t, r = Z(Me, n), i = dt(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = r;
1657
- return g.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ w(Se, { ...i, ...o, ref: e });
1661
+ const { __scopePopover: n, ...o } = t, r = Z(ke, n), i = ut(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = r;
1662
+ return g.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ w(Oe, { ...i, ...o, ref: e });
1658
1663
  }
1659
1664
  );
1660
- De.displayName = Me;
1661
- var Le = "PopoverTrigger", _e = g.forwardRef(
1665
+ Me.displayName = ke;
1666
+ var De = "PopoverTrigger", Le = g.forwardRef(
1662
1667
  (t, e) => {
1663
- const { __scopePopover: n, ...o } = t, r = Z(Le, n), i = dt(n), s = bt(e, r.triggerRef), c = /* @__PURE__ */ w(
1664
- ft.button,
1668
+ const { __scopePopover: n, ...o } = t, r = Z(De, n), i = ut(n), s = yt(e, r.triggerRef), c = /* @__PURE__ */ w(
1669
+ lt.button,
1665
1670
  {
1666
1671
  type: "button",
1667
1672
  "aria-haspopup": "dialog",
1668
1673
  "aria-expanded": r.open,
1669
1674
  "aria-controls": r.contentId,
1670
- "data-state": We(r.open),
1675
+ "data-state": $e(r.open),
1671
1676
  ...o,
1672
1677
  ref: s,
1673
1678
  onClick: st(t.onClick, r.onOpenToggle)
1674
1679
  }
1675
1680
  );
1676
- return r.hasCustomAnchor ? c : /* @__PURE__ */ w(Se, { asChild: !0, ...i, children: c });
1681
+ return r.hasCustomAnchor ? c : /* @__PURE__ */ w(Oe, { asChild: !0, ...i, children: c });
1677
1682
  }
1678
1683
  );
1679
- _e.displayName = Le;
1680
- var zt = "PopoverPortal", [Io, Bo] = Ee(zt, {
1684
+ Le.displayName = De;
1685
+ var Bt = "PopoverPortal", [Io, Bo] = Se(Bt, {
1681
1686
  forceMount: void 0
1682
- }), Te = (t) => {
1683
- const { __scopePopover: e, forceMount: n, children: o, container: r } = t, i = Z(zt, e);
1684
- return /* @__PURE__ */ w(Io, { scope: e, forceMount: n, children: /* @__PURE__ */ w(re, { present: n || i.open, children: /* @__PURE__ */ w(on, { asChild: !0, container: r, children: o }) }) });
1687
+ }), _e = (t) => {
1688
+ const { __scopePopover: e, forceMount: n, children: o, container: r } = t, i = Z(Bt, e);
1689
+ return /* @__PURE__ */ w(Io, { scope: e, forceMount: n, children: /* @__PURE__ */ w(oe, { present: n || i.open, children: /* @__PURE__ */ w(nn, { asChild: !0, container: r, children: o }) }) });
1685
1690
  };
1686
- Te.displayName = zt;
1687
- var nt = "PopoverContent", Ne = g.forwardRef(
1691
+ _e.displayName = Bt;
1692
+ var nt = "PopoverContent", Te = g.forwardRef(
1688
1693
  (t, e) => {
1689
1694
  const n = Bo(nt, t.__scopePopover), { forceMount: o = n.forceMount, ...r } = t, i = Z(nt, t.__scopePopover);
1690
- return /* @__PURE__ */ w(re, { present: o || i.open, children: i.modal ? /* @__PURE__ */ w(Vo, { ...r, ref: e }) : /* @__PURE__ */ w(jo, { ...r, ref: e }) });
1695
+ return /* @__PURE__ */ w(oe, { present: o || i.open, children: i.modal ? /* @__PURE__ */ w(Vo, { ...r, ref: e }) : /* @__PURE__ */ w(jo, { ...r, ref: e }) });
1691
1696
  }
1692
1697
  );
1693
- Ne.displayName = nt;
1694
- var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1698
+ Te.displayName = nt;
1699
+ var zo = sn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1695
1700
  (t, e) => {
1696
- const n = Z(nt, t.__scopePopover), o = g.useRef(null), r = bt(e, o), i = g.useRef(!1);
1701
+ const n = Z(nt, t.__scopePopover), o = g.useRef(null), r = yt(e, o), i = g.useRef(!1);
1697
1702
  return g.useEffect(() => {
1698
1703
  const s = o.current;
1699
- if (s) return rn(s);
1700
- }, []), /* @__PURE__ */ w(sn, { as: zo, allowPinchZoom: !0, children: /* @__PURE__ */ w(
1701
- Fe,
1704
+ if (s) return on(s);
1705
+ }, []), /* @__PURE__ */ w(rn, { as: zo, allowPinchZoom: !0, children: /* @__PURE__ */ w(
1706
+ Ne,
1702
1707
  {
1703
1708
  ...t,
1704
1709
  ref: r,
@@ -1727,7 +1732,7 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1727
1732
  (t, e) => {
1728
1733
  const n = Z(nt, t.__scopePopover), o = g.useRef(!1), r = g.useRef(!1);
1729
1734
  return /* @__PURE__ */ w(
1730
- Fe,
1735
+ Ne,
1731
1736
  {
1732
1737
  ...t,
1733
1738
  ref: e,
@@ -1744,7 +1749,7 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1744
1749
  }
1745
1750
  );
1746
1751
  }
1747
- ), Fe = g.forwardRef(
1752
+ ), Ne = g.forwardRef(
1748
1753
  (t, e) => {
1749
1754
  const {
1750
1755
  __scopePopover: n,
@@ -1757,9 +1762,9 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1757
1762
  onFocusOutside: l,
1758
1763
  onInteractOutside: f,
1759
1764
  ...u
1760
- } = t, p = Z(nt, n), d = dt(n);
1761
- return an(), /* @__PURE__ */ w(
1762
- ln,
1765
+ } = t, p = Z(nt, n), d = ut(n);
1766
+ return cn(), /* @__PURE__ */ w(
1767
+ an,
1763
1768
  {
1764
1769
  asChild: !0,
1765
1770
  loop: !0,
@@ -1767,7 +1772,7 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1767
1772
  onMountAutoFocus: r,
1768
1773
  onUnmountAutoFocus: i,
1769
1774
  children: /* @__PURE__ */ w(
1770
- fn,
1775
+ ln,
1771
1776
  {
1772
1777
  asChild: !0,
1773
1778
  disableOutsidePointerEvents: s,
@@ -1779,7 +1784,7 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1779
1784
  children: /* @__PURE__ */ w(
1780
1785
  $o,
1781
1786
  {
1782
- "data-state": We(p.open),
1787
+ "data-state": $e(p.open),
1783
1788
  role: "dialog",
1784
1789
  id: p.contentId,
1785
1790
  ...d,
@@ -1800,11 +1805,11 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1800
1805
  }
1801
1806
  );
1802
1807
  }
1803
- ), $e = "PopoverClose", Xo = g.forwardRef(
1808
+ ), Fe = "PopoverClose", Xo = g.forwardRef(
1804
1809
  (t, e) => {
1805
- const { __scopePopover: n, ...o } = t, r = Z($e, n);
1810
+ const { __scopePopover: n, ...o } = t, r = Z(Fe, n);
1806
1811
  return /* @__PURE__ */ w(
1807
- ft.button,
1812
+ lt.button,
1808
1813
  {
1809
1814
  type: "button",
1810
1815
  ...o,
@@ -1814,18 +1819,18 @@ var zo = cn("PopoverContent.RemoveScroll"), Vo = g.forwardRef(
1814
1819
  );
1815
1820
  }
1816
1821
  );
1817
- Xo.displayName = $e;
1822
+ Xo.displayName = Fe;
1818
1823
  var Yo = "PopoverArrow", Ko = g.forwardRef(
1819
1824
  (t, e) => {
1820
- const { __scopePopover: n, ...o } = t, r = dt(n);
1825
+ const { __scopePopover: n, ...o } = t, r = ut(n);
1821
1826
  return /* @__PURE__ */ w(Wo, { ...r, ...o, ref: e });
1822
1827
  }
1823
1828
  );
1824
1829
  Ko.displayName = Yo;
1825
- function We(t) {
1830
+ function $e(t) {
1826
1831
  return t ? "open" : "closed";
1827
1832
  }
1828
- var Qo = ke, qo = De, Go = _e, Uo = Te, Zo = Ne;
1833
+ var Qo = Ee, qo = Me, Go = Le, Uo = _e, Zo = Te;
1829
1834
  const Jo = "gQIKVa_anchor", tr = "gQIKVa_check", er = "gQIKVa_container", nr = "gQIKVa_radio", or = "gQIKVa_radioInput", ct = {
1830
1835
  anchor: Jo,
1831
1836
  check: tr,
@@ -1833,28 +1838,28 @@ const Jo = "gQIKVa_anchor", tr = "gQIKVa_check", er = "gQIKVa_container", nr = "
1833
1838
  radio: nr,
1834
1839
  radioInput: or
1835
1840
  };
1836
- function kt({ children: t, id: e, ...n }) {
1837
- return /* @__PURE__ */ q(ne, { children: [
1841
+ function Et({ children: t, id: e, ...n }) {
1842
+ return /* @__PURE__ */ q(ee, { children: [
1838
1843
  /* @__PURE__ */ w(
1839
1844
  "input",
1840
1845
  {
1841
1846
  type: "radio",
1842
1847
  id: e,
1843
- className: Ze(ct.radioInput, "sr-only"),
1848
+ className: Ue(ct.radioInput, "sr-only"),
1844
1849
  ...n
1845
1850
  }
1846
1851
  ),
1847
1852
  /* @__PURE__ */ q("label", { htmlFor: e, className: ct.radio, children: [
1848
1853
  t,
1849
- /* @__PURE__ */ w(Ue, { className: ct.check })
1854
+ /* @__PURE__ */ w(Ge, { className: ct.check })
1850
1855
  ] })
1851
1856
  ] });
1852
1857
  }
1853
1858
  function dr() {
1854
- const { theme: t, systemTheme: e, setTheme: n } = Qe(), o = qe();
1859
+ const { theme: t, systemTheme: e, setTheme: n } = Ke(), o = Qe();
1855
1860
  return /* @__PURE__ */ q(Qo, { children: [
1856
- /* @__PURE__ */ w(Go, { asChild: !0, children: /* @__PURE__ */ q(Je, { variant: "transparent", "aria-label": "Preferences", children: [
1857
- /* @__PURE__ */ w(hn, {}),
1861
+ /* @__PURE__ */ w(Go, { asChild: !0, children: /* @__PURE__ */ q(Ze, { variant: "transparent", "aria-label": "Preferences", children: [
1862
+ /* @__PURE__ */ w(pn, {}),
1858
1863
  /* @__PURE__ */ w(qo, { className: ct.anchor })
1859
1864
  ] }) }),
1860
1865
  /* @__PURE__ */ w(Uo, { children: /* @__PURE__ */ w(
@@ -1863,17 +1868,17 @@ function dr() {
1863
1868
  sideOffset: 8,
1864
1869
  hideWhenDetached: !0,
1865
1870
  className: ct.container,
1866
- children: o && /* @__PURE__ */ q(ne, { children: [
1871
+ children: o && /* @__PURE__ */ q(ee, { children: [
1867
1872
  /* @__PURE__ */ w("span", { children: "Appearance" }),
1868
1873
  /* @__PURE__ */ q(
1869
- kt,
1874
+ Et,
1870
1875
  {
1871
1876
  id: "system",
1872
1877
  name: "theme",
1873
1878
  checked: t === "system",
1874
1879
  onChange: () => n("system"),
1875
1880
  children: [
1876
- /* @__PURE__ */ w(dn, {}),
1881
+ /* @__PURE__ */ w(un, {}),
1877
1882
  "Auto (",
1878
1883
  e,
1879
1884
  ")"
@@ -1881,27 +1886,27 @@ function dr() {
1881
1886
  }
1882
1887
  ),
1883
1888
  /* @__PURE__ */ q(
1884
- kt,
1889
+ Et,
1885
1890
  {
1886
1891
  id: "light",
1887
1892
  name: "theme",
1888
1893
  checked: t === "light",
1889
1894
  onChange: () => n("light"),
1890
1895
  children: [
1891
- /* @__PURE__ */ w(mn, {}),
1896
+ /* @__PURE__ */ w(hn, {}),
1892
1897
  "Light"
1893
1898
  ]
1894
1899
  }
1895
1900
  ),
1896
1901
  /* @__PURE__ */ q(
1897
- kt,
1902
+ Et,
1898
1903
  {
1899
1904
  id: "dark",
1900
1905
  name: "theme",
1901
1906
  checked: t === "dark",
1902
1907
  onChange: () => n("dark"),
1903
1908
  children: [
1904
- /* @__PURE__ */ w(pn, {}),
1909
+ /* @__PURE__ */ w(dn, {}),
1905
1910
  "Dark"
1906
1911
  ]
1907
1912
  }
@@ -1913,5 +1918,5 @@ function dr() {
1913
1918
  }
1914
1919
  export {
1915
1920
  dr as PrefPanel,
1916
- kt as PrefRadio
1921
+ Et as PrefRadio
1917
1922
  };