@rinzai/zen 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zen.js CHANGED
@@ -1,21 +1,21 @@
1
- import { jsx as b, jsxs as W, Fragment as Fe } from "react/jsx-runtime";
1
+ import { jsx as y, jsxs as W, Fragment as Ve } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
- import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as Ee } from "react";
4
- import * as ot from "react-dom";
5
- import { createPortal as it, flushSync as st } from "react-dom";
6
- const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + k(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [i, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + i + "-" + s : typeof s == "boolean" && s ? n + " " + i : n, "") : o, ""), Te = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
7
- var c;
8
- if ((o == null ? void 0 : o.variants) == null) return k(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
9
- const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((a) => {
10
- const u = t == null ? void 0 : t[a], d = i == null ? void 0 : i[a];
3
+ import { useLayoutEffect as ot, useEffect as re, useState as de, useId as it, useMemo as ve, useRef as Ee } from "react";
4
+ import * as st from "react-dom";
5
+ import { createPortal as rt, flushSync as lt } from "react-dom";
6
+ const M = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + M(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [i, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + i + "-" + s : typeof s == "boolean" && s ? n + " " + i : n, "") : o, ""), Ae = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, We = (e, o) => (t) => {
7
+ var a;
8
+ if ((o == null ? void 0 : o.variants) == null) return M(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
9
+ const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((c) => {
10
+ const u = t == null ? void 0 : t[c], d = i == null ? void 0 : i[c];
11
11
  if (u === null) return null;
12
- const m = Te(u) || Te(d);
13
- return n[a][m];
12
+ const h = Ae(u) || Ae(d);
13
+ return n[c][h];
14
14
  }), r = t && Object.entries(t).reduce(
15
- (a, [u, d]) => (d === void 0 || (a[u] = d), a),
15
+ (c, [u, d]) => (d === void 0 || (c[u] = d), c),
16
16
  {}
17
- ), l = (c = o == null ? void 0 : o.compoundVariants) == null ? void 0 : c.reduce(
18
- (a, { class: u, className: d, ...m }) => Object.entries(m).every(
17
+ ), l = (a = o == null ? void 0 : o.compoundVariants) == null ? void 0 : a.reduce(
18
+ (c, { class: u, className: d, ...h }) => Object.entries(h).every(
19
19
  ([f, g]) => Array.isArray(g) ? g.includes(
20
20
  {
21
21
  ...i,
@@ -25,22 +25,22 @@ const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "
25
25
  ...i,
26
26
  ...r
27
27
  }[f] === g
28
- ) ? [...a, u, d] : a,
28
+ ) ? [...c, u, d] : c,
29
29
  []
30
30
  );
31
- return k(e, s, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
31
+ return M(e, s, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
32
32
  };
33
- function We({ variant: e, className: o, ...t }) {
34
- return /* @__PURE__ */ b("span", { ...t, className: rt({ variant: e, className: o }) });
33
+ function Be({ variant: e, className: o, ...t }) {
34
+ return /* @__PURE__ */ y("span", { ...t, className: ct({ variant: e, className: o }) });
35
35
  }
36
- const rt = Ve(
36
+ const ct = We(
37
37
  "zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
38
38
  {
39
39
  variants: {
40
40
  variant: {
41
- default: "border-transparent bg-primary text-primary-foreground shadow",
41
+ default: "border-transparent bg-primary text-primary-foreground shadow-sm",
42
42
  secondary: "border-transparent bg-secondary text-secondary-foreground",
43
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
43
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow-sm",
44
44
  outline: "text-foreground"
45
45
  }
46
46
  },
@@ -49,18 +49,18 @@ const rt = Ve(
49
49
  }
50
50
  }
51
51
  );
52
- function lt({ className: e, variant: o, size: t, ...n }) {
53
- return /* @__PURE__ */ b("button", { className: ct({ variant: o, size: t, className: e }), ...n });
52
+ function at({ className: e, variant: o, size: t, ...n }) {
53
+ return /* @__PURE__ */ y("button", { className: ut({ variant: o, size: t, className: e }), ...n });
54
54
  }
55
- const ct = Ve(
56
- "zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
55
+ const ut = We(
56
+ "zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
57
57
  {
58
58
  variants: {
59
59
  variant: {
60
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
61
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
62
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
63
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
60
+ default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
61
+ destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
62
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
63
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
64
64
  ghost: "hover:bg-accent hover:text-accent-foreground",
65
65
  link: "text-primary underline-offset-4 hover:underline",
66
66
  icon: ""
@@ -80,16 +80,16 @@ const ct = Ve(
80
80
  ), le = Math.min, H = Math.max, ce = Math.round, ie = Math.floor, _ = (e) => ({
81
81
  x: e,
82
82
  y: e
83
- }), at = {
83
+ }), ft = {
84
84
  left: "right",
85
85
  right: "left",
86
86
  bottom: "top",
87
87
  top: "bottom"
88
- }, ut = {
88
+ }, dt = {
89
89
  start: "end",
90
90
  end: "start"
91
91
  };
92
- function Ae(e, o, t) {
92
+ function Te(e, o, t) {
93
93
  return H(e, le(o, t));
94
94
  }
95
95
  function he(e, o) {
@@ -101,32 +101,32 @@ function U(e) {
101
101
  function me(e) {
102
102
  return e.split("-")[1];
103
103
  }
104
- function Be(e) {
104
+ function je(e) {
105
105
  return e === "x" ? "y" : "x";
106
106
  }
107
- function je(e) {
107
+ function $e(e) {
108
108
  return e === "y" ? "height" : "width";
109
109
  }
110
110
  function G(e) {
111
111
  return ["top", "bottom"].includes(U(e)) ? "y" : "x";
112
112
  }
113
- function $e(e) {
114
- return Be(G(e));
113
+ function He(e) {
114
+ return je(G(e));
115
115
  }
116
- function ft(e, o, t) {
116
+ function ht(e, o, t) {
117
117
  t === void 0 && (t = !1);
118
- const n = me(e), i = $e(e), s = je(i);
118
+ const n = me(e), i = He(e), s = $e(i);
119
119
  let r = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
120
120
  return o.reference[s] > o.floating[s] && (r = ae(r)), [r, ae(r)];
121
121
  }
122
- function dt(e) {
122
+ function mt(e) {
123
123
  const o = ae(e);
124
124
  return [Se(e), o, Se(o)];
125
125
  }
126
126
  function Se(e) {
127
- return e.replace(/start|end/g, (o) => ut[o]);
127
+ return e.replace(/start|end/g, (o) => dt[o]);
128
128
  }
129
- function ht(e, o, t) {
129
+ function gt(e, o, t) {
130
130
  const n = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
131
131
  switch (e) {
132
132
  case "top":
@@ -139,15 +139,15 @@ function ht(e, o, t) {
139
139
  return [];
140
140
  }
141
141
  }
142
- function mt(e, o, t, n) {
142
+ function pt(e, o, t, n) {
143
143
  const i = me(e);
144
- let s = ht(U(e), t === "start", n);
144
+ let s = gt(U(e), t === "start", n);
145
145
  return i && (s = s.map((r) => r + "-" + i), o && (s = s.concat(s.map(Se)))), s;
146
146
  }
147
147
  function ae(e) {
148
- return e.replace(/left|right|bottom|top/g, (o) => at[o]);
148
+ return e.replace(/left|right|bottom|top/g, (o) => ft[o]);
149
149
  }
150
- function gt(e) {
150
+ function xt(e) {
151
151
  return {
152
152
  top: 0,
153
153
  right: 0,
@@ -156,8 +156,8 @@ function gt(e) {
156
156
  ...e
157
157
  };
158
158
  }
159
- function pt(e) {
160
- return typeof e != "number" ? gt(e) : {
159
+ function wt(e) {
160
+ return typeof e != "number" ? xt(e) : {
161
161
  top: e,
162
162
  right: e,
163
163
  bottom: e,
@@ -187,9 +187,9 @@ function ze(e, o, t) {
187
187
  reference: n,
188
188
  floating: i
189
189
  } = e;
190
- const s = G(o), r = $e(o), l = je(r), c = U(o), a = s === "y", u = n.x + n.width / 2 - i.width / 2, d = n.y + n.height / 2 - i.height / 2, m = n[l] / 2 - i[l] / 2;
190
+ const s = G(o), r = He(o), l = $e(r), a = U(o), c = s === "y", u = n.x + n.width / 2 - i.width / 2, d = n.y + n.height / 2 - i.height / 2, h = n[l] / 2 - i[l] / 2;
191
191
  let f;
192
- switch (c) {
192
+ switch (a) {
193
193
  case "top":
194
194
  f = {
195
195
  x: u,
@@ -222,46 +222,46 @@ function ze(e, o, t) {
222
222
  }
223
223
  switch (me(o)) {
224
224
  case "start":
225
- f[r] -= m * (t && a ? -1 : 1);
225
+ f[r] -= h * (t && c ? -1 : 1);
226
226
  break;
227
227
  case "end":
228
- f[r] += m * (t && a ? -1 : 1);
228
+ f[r] += h * (t && c ? -1 : 1);
229
229
  break;
230
230
  }
231
231
  return f;
232
232
  }
233
- const wt = async (e, o, t) => {
233
+ const bt = async (e, o, t) => {
234
234
  const {
235
235
  placement: n = "bottom",
236
236
  strategy: i = "absolute",
237
237
  middleware: s = [],
238
238
  platform: r
239
- } = t, l = s.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
240
- let a = await r.getElementRects({
239
+ } = t, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(o));
240
+ let c = await r.getElementRects({
241
241
  reference: e,
242
242
  floating: o,
243
243
  strategy: i
244
244
  }), {
245
245
  x: u,
246
246
  y: d
247
- } = ze(a, n, c), m = n, f = {}, g = 0;
248
- for (let w = 0; w < l.length; w++) {
247
+ } = ze(c, n, a), h = n, f = {}, g = 0;
248
+ for (let x = 0; x < l.length; x++) {
249
249
  const {
250
- name: x,
251
- fn: h
252
- } = l[w], {
250
+ name: w,
251
+ fn: m
252
+ } = l[x], {
253
253
  x: p,
254
254
  y: v,
255
255
  data: E,
256
- reset: y
257
- } = await h({
256
+ reset: b
257
+ } = await m({
258
258
  x: u,
259
259
  y: d,
260
260
  initialPlacement: n,
261
- placement: m,
261
+ placement: h,
262
262
  strategy: i,
263
263
  middlewareData: f,
264
- rects: a,
264
+ rects: c,
265
265
  platform: r,
266
266
  elements: {
267
267
  reference: e,
@@ -270,28 +270,28 @@ const wt = async (e, o, t) => {
270
270
  });
271
271
  u = p ?? u, d = v ?? d, f = {
272
272
  ...f,
273
- [x]: {
274
- ...f[x],
273
+ [w]: {
274
+ ...f[w],
275
275
  ...E
276
276
  }
277
- }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (m = y.placement), y.rects && (a = y.rects === !0 ? await r.getElementRects({
277
+ }, b && g <= 50 && (g++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
278
278
  reference: e,
279
279
  floating: o,
280
280
  strategy: i
281
- }) : y.rects), {
281
+ }) : b.rects), {
282
282
  x: u,
283
283
  y: d
284
- } = ze(a, m, c)), w = -1);
284
+ } = ze(c, h, a)), x = -1);
285
285
  }
286
286
  return {
287
287
  x: u,
288
288
  y: d,
289
- placement: m,
289
+ placement: h,
290
290
  strategy: i,
291
291
  middlewareData: f
292
292
  };
293
293
  };
294
- async function He(e, o) {
294
+ async function Ue(e, o) {
295
295
  var t;
296
296
  o === void 0 && (o = {});
297
297
  const {
@@ -300,18 +300,18 @@ async function He(e, o) {
300
300
  platform: s,
301
301
  rects: r,
302
302
  elements: l,
303
- strategy: c
303
+ strategy: a
304
304
  } = e, {
305
- boundary: a = "clippingAncestors",
305
+ boundary: c = "clippingAncestors",
306
306
  rootBoundary: u = "viewport",
307
307
  elementContext: d = "floating",
308
- altBoundary: m = !1,
308
+ altBoundary: h = !1,
309
309
  padding: f = 0
310
- } = he(o, e), g = pt(f), x = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await s.getClippingRect({
311
- element: (t = await (s.isElement == null ? void 0 : s.isElement(x))) == null || t ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
312
- boundary: a,
310
+ } = he(o, e), g = wt(f), w = l[h ? d === "floating" ? "reference" : "floating" : d], m = ue(await s.getClippingRect({
311
+ element: (t = await (s.isElement == null ? void 0 : s.isElement(w))) == null || t ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
312
+ boundary: c,
313
313
  rootBoundary: u,
314
- strategy: c
314
+ strategy: a
315
315
  })), p = d === "floating" ? {
316
316
  x: n,
317
317
  y: i,
@@ -323,20 +323,20 @@ async function He(e, o) {
323
323
  } : {
324
324
  x: 1,
325
325
  y: 1
326
- }, y = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
326
+ }, b = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
327
327
  elements: l,
328
328
  rect: p,
329
329
  offsetParent: v,
330
- strategy: c
330
+ strategy: a
331
331
  }) : p);
332
332
  return {
333
- top: (h.top - y.top + g.top) / E.y,
334
- bottom: (y.bottom - h.bottom + g.bottom) / E.y,
335
- left: (h.left - y.left + g.left) / E.x,
336
- right: (y.right - h.right + g.right) / E.x
333
+ top: (m.top - b.top + g.top) / E.y,
334
+ bottom: (b.bottom - m.bottom + g.bottom) / E.y,
335
+ left: (m.left - b.left + g.left) / E.x,
336
+ right: (b.right - m.right + g.right) / E.x
337
337
  };
338
338
  }
339
- const xt = function(e) {
339
+ const yt = function(e) {
340
340
  return e === void 0 && (e = {}), {
341
341
  name: "flip",
342
342
  options: e,
@@ -347,68 +347,68 @@ const xt = function(e) {
347
347
  middlewareData: s,
348
348
  rects: r,
349
349
  initialPlacement: l,
350
- platform: c,
351
- elements: a
350
+ platform: a,
351
+ elements: c
352
352
  } = o, {
353
353
  mainAxis: u = !0,
354
354
  crossAxis: d = !0,
355
- fallbackPlacements: m,
355
+ fallbackPlacements: h,
356
356
  fallbackStrategy: f = "bestFit",
357
357
  fallbackAxisSideDirection: g = "none",
358
- flipAlignment: w = !0,
359
- ...x
358
+ flipAlignment: x = !0,
359
+ ...w
360
360
  } = he(e, o);
361
361
  if ((t = s.arrow) != null && t.alignmentOffset)
362
362
  return {};
363
- const h = U(i), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !w ? [ae(l)] : dt(l)), O = g !== "none";
364
- !m && O && y.push(...mt(l, w, g, E));
365
- const R = [l, ...y], z = await He(o, x), Y = [];
366
- let F = ((n = s.flip) == null ? void 0 : n.overflows) || [];
367
- if (u && Y.push(z[h]), d) {
368
- const I = ft(i, r, E);
369
- Y.push(z[I[0]], z[I[1]]);
363
+ const m = U(i), p = G(l), v = U(l) === l, E = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = h || (v || !x ? [ae(l)] : mt(l)), R = g !== "none";
364
+ !h && R && b.push(...pt(l, x, g, E));
365
+ const O = [l, ...b], z = await Ue(o, w), K = [];
366
+ let P = ((n = s.flip) == null ? void 0 : n.overflows) || [];
367
+ if (u && K.push(z[m]), d) {
368
+ const N = ht(i, r, E);
369
+ K.push(z[N[0]], z[N[1]]);
370
370
  }
371
- if (F = [...F, {
371
+ if (P = [...P, {
372
372
  placement: i,
373
- overflows: Y
374
- }], !Y.every((I) => I <= 0)) {
375
- var q, ee;
376
- const I = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, te = R[I];
373
+ overflows: K
374
+ }], !K.every((N) => N <= 0)) {
375
+ var Y, ee;
376
+ const N = (((Y = s.flip) == null ? void 0 : Y.index) || 0) + 1, te = O[N];
377
377
  if (te)
378
378
  return {
379
379
  data: {
380
- index: I,
381
- overflows: F
380
+ index: N,
381
+ overflows: P
382
382
  },
383
383
  reset: {
384
384
  placement: te
385
385
  }
386
386
  };
387
- let M = (ee = F.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
388
- if (!M)
387
+ let k = (ee = P.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
388
+ if (!k)
389
389
  switch (f) {
390
390
  case "bestFit": {
391
391
  var B;
392
- const V = (B = F.filter((S) => {
393
- if (O) {
394
- const T = G(S.placement);
395
- return T === p || // Create a bias to the `y` side axis due to horizontal
392
+ const V = (B = P.filter((S) => {
393
+ if (R) {
394
+ const A = G(S.placement);
395
+ return A === p || // Create a bias to the `y` side axis due to horizontal
396
396
  // reading directions favoring greater width.
397
- T === "y";
397
+ A === "y";
398
398
  }
399
399
  return !0;
400
- }).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, j) => T + j, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : B[0];
401
- V && (M = V);
400
+ }).map((S) => [S.placement, S.overflows.filter((A) => A > 0).reduce((A, j) => A + j, 0)]).sort((S, A) => S[1] - A[1])[0]) == null ? void 0 : B[0];
401
+ V && (k = V);
402
402
  break;
403
403
  }
404
404
  case "initialPlacement":
405
- M = l;
405
+ k = l;
406
406
  break;
407
407
  }
408
- if (i !== M)
408
+ if (i !== k)
409
409
  return {
410
410
  reset: {
411
- placement: M
411
+ placement: k
412
412
  }
413
413
  };
414
414
  }
@@ -416,14 +416,14 @@ const xt = function(e) {
416
416
  }
417
417
  };
418
418
  };
419
- async function yt(e, o) {
419
+ async function vt(e, o) {
420
420
  const {
421
421
  placement: t,
422
422
  platform: n,
423
423
  elements: i
424
- } = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = s && c ? -1 : 1, d = he(o, e);
424
+ } = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t), a = G(t) === "y", c = ["left", "top"].includes(r) ? -1 : 1, u = s && a ? -1 : 1, d = he(o, e);
425
425
  let {
426
- mainAxis: m,
426
+ mainAxis: h,
427
427
  crossAxis: f,
428
428
  alignmentAxis: g
429
429
  } = typeof d == "number" ? {
@@ -435,15 +435,15 @@ async function yt(e, o) {
435
435
  crossAxis: d.crossAxis || 0,
436
436
  alignmentAxis: d.alignmentAxis
437
437
  };
438
- return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), c ? {
438
+ return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), a ? {
439
439
  x: f * u,
440
- y: m * a
440
+ y: h * c
441
441
  } : {
442
- x: m * a,
442
+ x: h * c,
443
443
  y: f * u
444
444
  };
445
445
  }
446
- const bt = function(e) {
446
+ const Et = function(e) {
447
447
  return e === void 0 && (e = 0), {
448
448
  name: "offset",
449
449
  options: e,
@@ -454,18 +454,18 @@ const bt = function(e) {
454
454
  y: s,
455
455
  placement: r,
456
456
  middlewareData: l
457
- } = o, c = await yt(o, e);
457
+ } = o, a = await vt(o, e);
458
458
  return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
459
- x: i + c.x,
460
- y: s + c.y,
459
+ x: i + a.x,
460
+ y: s + a.y,
461
461
  data: {
462
- ...c,
462
+ ...a,
463
463
  placement: r
464
464
  }
465
465
  };
466
466
  }
467
467
  };
468
- }, vt = function(e) {
468
+ }, St = function(e) {
469
469
  return e === void 0 && (e = {}), {
470
470
  name: "shift",
471
471
  options: e,
@@ -478,43 +478,43 @@ const bt = function(e) {
478
478
  mainAxis: s = !0,
479
479
  crossAxis: r = !1,
480
480
  limiter: l = {
481
- fn: (x) => {
481
+ fn: (w) => {
482
482
  let {
483
- x: h,
483
+ x: m,
484
484
  y: p
485
- } = x;
485
+ } = w;
486
486
  return {
487
- x: h,
487
+ x: m,
488
488
  y: p
489
489
  };
490
490
  }
491
491
  },
492
- ...c
493
- } = he(e, o), a = {
492
+ ...a
493
+ } = he(e, o), c = {
494
494
  x: t,
495
495
  y: n
496
- }, u = await He(o, c), d = G(U(i)), m = Be(d);
497
- let f = a[m], g = a[d];
496
+ }, u = await Ue(o, a), d = G(U(i)), h = je(d);
497
+ let f = c[h], g = c[d];
498
498
  if (s) {
499
- const x = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[x], v = f - u[h];
500
- f = Ae(p, f, v);
499
+ const w = h === "y" ? "top" : "left", m = h === "y" ? "bottom" : "right", p = f + u[w], v = f - u[m];
500
+ f = Te(p, f, v);
501
501
  }
502
502
  if (r) {
503
- const x = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[x], v = g - u[h];
504
- g = Ae(p, g, v);
503
+ const w = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", p = g + u[w], v = g - u[m];
504
+ g = Te(p, g, v);
505
505
  }
506
- const w = l.fn({
506
+ const x = l.fn({
507
507
  ...o,
508
- [m]: f,
508
+ [h]: f,
509
509
  [d]: g
510
510
  });
511
511
  return {
512
- ...w,
512
+ ...x,
513
513
  data: {
514
- x: w.x - t,
515
- y: w.y - n,
514
+ x: x.x - t,
515
+ y: x.y - n,
516
516
  enabled: {
517
- [m]: s,
517
+ [h]: s,
518
518
  [d]: r
519
519
  }
520
520
  }
@@ -526,27 +526,27 @@ function ge() {
526
526
  return typeof window < "u";
527
527
  }
528
528
  function Q(e) {
529
- return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
529
+ return qe(e) ? (e.nodeName || "").toLowerCase() : "#document";
530
530
  }
531
- function A(e) {
531
+ function T(e) {
532
532
  var o;
533
533
  return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
534
534
  }
535
- function P(e) {
535
+ function F(e) {
536
536
  var o;
537
- return (o = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
537
+ return (o = (qe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
538
538
  }
539
- function Ue(e) {
540
- return ge() ? e instanceof Node || e instanceof A(e).Node : !1;
539
+ function qe(e) {
540
+ return ge() ? e instanceof Node || e instanceof T(e).Node : !1;
541
541
  }
542
- function N(e) {
543
- return ge() ? e instanceof Element || e instanceof A(e).Element : !1;
542
+ function I(e) {
543
+ return ge() ? e instanceof Element || e instanceof T(e).Element : !1;
544
544
  }
545
545
  function D(e) {
546
- return ge() ? e instanceof HTMLElement || e instanceof A(e).HTMLElement : !1;
546
+ return ge() ? e instanceof HTMLElement || e instanceof T(e).HTMLElement : !1;
547
547
  }
548
- function Ie(e) {
549
- return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof A(e).ShadowRoot;
548
+ function Ne(e) {
549
+ return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof T(e).ShadowRoot;
550
550
  }
551
551
  function oe(e) {
552
552
  const {
@@ -557,7 +557,7 @@ function oe(e) {
557
557
  } = L(e);
558
558
  return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(i);
559
559
  }
560
- function Et(e) {
560
+ function Ot(e) {
561
561
  return ["table", "td", "th"].includes(Q(e));
562
562
  }
563
563
  function pe(e) {
@@ -569,14 +569,14 @@ function pe(e) {
569
569
  }
570
570
  });
571
571
  }
572
- function Oe(e) {
573
- const o = Re(), t = N(e) ? L(e) : e;
574
- return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
572
+ function Ce(e) {
573
+ const o = Re(), t = I(e) ? L(e) : e;
574
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
575
575
  }
576
- function St(e) {
576
+ function Ct(e) {
577
577
  let o = $(e);
578
578
  for (; D(o) && !J(o); ) {
579
- if (Oe(o))
579
+ if (Ce(o))
580
580
  return o;
581
581
  if (pe(o))
582
582
  return null;
@@ -591,10 +591,10 @@ function J(e) {
591
591
  return ["html", "body", "#document"].includes(Q(e));
592
592
  }
593
593
  function L(e) {
594
- return A(e).getComputedStyle(e);
594
+ return T(e).getComputedStyle(e);
595
595
  }
596
- function we(e) {
597
- return N(e) ? {
596
+ function xe(e) {
597
+ return I(e) ? {
598
598
  scrollLeft: e.scrollLeft,
599
599
  scrollTop: e.scrollTop
600
600
  } : {
@@ -609,10 +609,10 @@ function $(e) {
609
609
  // Step into the shadow DOM of the parent of a slotted node.
610
610
  e.assignedSlot || // DOM Element detected.
611
611
  e.parentNode || // ShadowRoot detected.
612
- Ie(e) && e.host || // Fallback.
613
- P(e)
612
+ Ne(e) && e.host || // Fallback.
613
+ F(e)
614
614
  );
615
- return Ie(o) ? o.host : o;
615
+ return Ne(o) ? o.host : o;
616
616
  }
617
617
  function Ke(e) {
618
618
  const o = $(e);
@@ -621,14 +621,14 @@ function Ke(e) {
621
621
  function ne(e, o, t) {
622
622
  var n;
623
623
  o === void 0 && (o = []), t === void 0 && (t = !0);
624
- const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(i);
624
+ const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r = T(i);
625
625
  if (s) {
626
- const l = Ce(r);
626
+ const l = Oe(r);
627
627
  return o.concat(r, r.visualViewport || [], oe(i) ? i : [], l && t ? ne(l) : []);
628
628
  }
629
629
  return o.concat(i, ne(i, [], t));
630
630
  }
631
- function Ce(e) {
631
+ function Oe(e) {
632
632
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
633
633
  }
634
634
  function Ye(e) {
@@ -641,11 +641,11 @@ function Ye(e) {
641
641
  $: l
642
642
  };
643
643
  }
644
- function ke(e) {
645
- return N(e) ? e : e.contextElement;
644
+ function Me(e) {
645
+ return I(e) ? e : e.contextElement;
646
646
  }
647
647
  function Z(e) {
648
- const o = ke(e);
648
+ const o = Me(e);
649
649
  if (!D(o))
650
650
  return _(1);
651
651
  const t = o.getBoundingClientRect(), {
@@ -659,87 +659,87 @@ function Z(e) {
659
659
  y: l
660
660
  };
661
661
  }
662
- const Ct = /* @__PURE__ */ _(0);
663
- function qe(e) {
664
- const o = A(e);
665
- return !Re() || !o.visualViewport ? Ct : {
662
+ const Rt = /* @__PURE__ */ _(0);
663
+ function Xe(e) {
664
+ const o = T(e);
665
+ return !Re() || !o.visualViewport ? Rt : {
666
666
  x: o.visualViewport.offsetLeft,
667
667
  y: o.visualViewport.offsetTop
668
668
  };
669
669
  }
670
- function Ot(e, o, t) {
671
- return o === void 0 && (o = !1), !t || o && t !== A(e) ? !1 : o;
670
+ function Mt(e, o, t) {
671
+ return o === void 0 && (o = !1), !t || o && t !== T(e) ? !1 : o;
672
672
  }
673
- function K(e, o, t, n) {
673
+ function q(e, o, t, n) {
674
674
  o === void 0 && (o = !1), t === void 0 && (t = !1);
675
- const i = e.getBoundingClientRect(), s = ke(e);
675
+ const i = e.getBoundingClientRect(), s = Me(e);
676
676
  let r = _(1);
677
- o && (n ? N(n) && (r = Z(n)) : r = Z(e));
678
- const l = Ot(s, t, n) ? qe(s) : _(0);
679
- let c = (i.left + l.x) / r.x, a = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
677
+ o && (n ? I(n) && (r = Z(n)) : r = Z(e));
678
+ const l = Mt(s, t, n) ? Xe(s) : _(0);
679
+ let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
680
680
  if (s) {
681
- const m = A(s), f = n && N(n) ? A(n) : n;
682
- let g = m, w = Ce(g);
683
- for (; w && n && f !== g; ) {
684
- const x = Z(w), h = w.getBoundingClientRect(), p = L(w), v = h.left + (w.clientLeft + parseFloat(p.paddingLeft)) * x.x, E = h.top + (w.clientTop + parseFloat(p.paddingTop)) * x.y;
685
- c *= x.x, a *= x.y, u *= x.x, d *= x.y, c += v, a += E, g = A(w), w = Ce(g);
681
+ const h = T(s), f = n && I(n) ? T(n) : n;
682
+ let g = h, x = Oe(g);
683
+ for (; x && n && f !== g; ) {
684
+ const w = Z(x), m = x.getBoundingClientRect(), p = L(x), v = m.left + (x.clientLeft + parseFloat(p.paddingLeft)) * w.x, E = m.top + (x.clientTop + parseFloat(p.paddingTop)) * w.y;
685
+ a *= w.x, c *= w.y, u *= w.x, d *= w.y, a += v, c += E, g = T(x), x = Oe(g);
686
686
  }
687
687
  }
688
688
  return ue({
689
689
  width: u,
690
690
  height: d,
691
- x: c,
692
- y: a
691
+ x: a,
692
+ y: c
693
693
  });
694
694
  }
695
- function Me(e, o) {
696
- const t = we(e).scrollLeft;
697
- return o ? o.left + t : K(P(e)).left + t;
695
+ function ke(e, o) {
696
+ const t = xe(e).scrollLeft;
697
+ return o ? o.left + t : q(F(e)).left + t;
698
698
  }
699
- function Xe(e, o, t) {
699
+ function Ze(e, o, t) {
700
700
  t === void 0 && (t = !1);
701
701
  const n = e.getBoundingClientRect(), i = n.left + o.scrollLeft - (t ? 0 : (
702
702
  // RTL <body> scrollbar.
703
- Me(e, n)
703
+ ke(e, n)
704
704
  )), s = n.top + o.scrollTop;
705
705
  return {
706
706
  x: i,
707
707
  y: s
708
708
  };
709
709
  }
710
- function Rt(e) {
710
+ function kt(e) {
711
711
  let {
712
712
  elements: o,
713
713
  rect: t,
714
714
  offsetParent: n,
715
715
  strategy: i
716
716
  } = e;
717
- const s = i === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
717
+ const s = i === "fixed", r = F(n), l = o ? pe(o.floating) : !1;
718
718
  if (n === r || l && s)
719
719
  return t;
720
- let c = {
720
+ let a = {
721
721
  scrollLeft: 0,
722
722
  scrollTop: 0
723
- }, a = _(1);
723
+ }, c = _(1);
724
724
  const u = _(0), d = D(n);
725
- if ((d || !d && !s) && ((Q(n) !== "body" || oe(r)) && (c = we(n)), D(n))) {
726
- const f = K(n);
727
- a = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
725
+ if ((d || !d && !s) && ((Q(n) !== "body" || oe(r)) && (a = xe(n)), D(n))) {
726
+ const f = q(n);
727
+ c = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
728
728
  }
729
- const m = r && !d && !s ? Xe(r, c, !0) : _(0);
729
+ const h = r && !d && !s ? Ze(r, a, !0) : _(0);
730
730
  return {
731
- width: t.width * a.x,
732
- height: t.height * a.y,
733
- x: t.x * a.x - c.scrollLeft * a.x + u.x + m.x,
734
- y: t.y * a.y - c.scrollTop * a.y + u.y + m.y
731
+ width: t.width * c.x,
732
+ height: t.height * c.y,
733
+ x: t.x * c.x - a.scrollLeft * c.x + u.x + h.x,
734
+ y: t.y * c.y - a.scrollTop * c.y + u.y + h.y
735
735
  };
736
736
  }
737
- function kt(e) {
737
+ function At(e) {
738
738
  return Array.from(e.getClientRects());
739
739
  }
740
- function Mt(e) {
741
- const o = P(e), t = we(e), n = e.ownerDocument.body, i = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
742
- let r = -t.scrollLeft + Me(e);
740
+ function Tt(e) {
741
+ const o = F(e), t = xe(e), n = e.ownerDocument.body, i = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
742
+ let r = -t.scrollLeft + ke(e);
743
743
  const l = -t.scrollTop;
744
744
  return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - i), {
745
745
  width: i,
@@ -748,40 +748,40 @@ function Mt(e) {
748
748
  y: l
749
749
  };
750
750
  }
751
- function Tt(e, o) {
752
- const t = A(e), n = P(e), i = t.visualViewport;
753
- let s = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
751
+ function zt(e, o) {
752
+ const t = T(e), n = F(e), i = t.visualViewport;
753
+ let s = n.clientWidth, r = n.clientHeight, l = 0, a = 0;
754
754
  if (i) {
755
755
  s = i.width, r = i.height;
756
- const a = Re();
757
- (!a || a && o === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
756
+ const c = Re();
757
+ (!c || c && o === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
758
758
  }
759
759
  return {
760
760
  width: s,
761
761
  height: r,
762
762
  x: l,
763
- y: c
763
+ y: a
764
764
  };
765
765
  }
766
- function At(e, o) {
767
- const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, s = D(e) ? Z(e) : _(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, c = i * s.x, a = n * s.y;
766
+ function Nt(e, o) {
767
+ const t = q(e, !0, o === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, s = D(e) ? Z(e) : _(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, a = i * s.x, c = n * s.y;
768
768
  return {
769
769
  width: r,
770
770
  height: l,
771
- x: c,
772
- y: a
771
+ x: a,
772
+ y: c
773
773
  };
774
774
  }
775
- function Ne(e, o, t) {
775
+ function Ie(e, o, t) {
776
776
  let n;
777
777
  if (o === "viewport")
778
- n = Tt(e, t);
778
+ n = zt(e, t);
779
779
  else if (o === "document")
780
- n = Mt(P(e));
781
- else if (N(o))
782
- n = At(o, t);
780
+ n = Tt(F(e));
781
+ else if (I(o))
782
+ n = Nt(o, t);
783
783
  else {
784
- const i = qe(e);
784
+ const i = Xe(e);
785
785
  n = {
786
786
  x: o.x - i.x,
787
787
  y: o.y - i.y,
@@ -791,42 +791,42 @@ function Ne(e, o, t) {
791
791
  }
792
792
  return ue(n);
793
793
  }
794
- function Ze(e, o) {
794
+ function Ge(e, o) {
795
795
  const t = $(e);
796
- return t === o || !N(t) || J(t) ? !1 : L(t).position === "fixed" || Ze(t, o);
796
+ return t === o || !I(t) || J(t) ? !1 : L(t).position === "fixed" || Ge(t, o);
797
797
  }
798
- function zt(e, o) {
798
+ function It(e, o) {
799
799
  const t = o.get(e);
800
800
  if (t)
801
801
  return t;
802
- let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), i = null;
802
+ let n = ne(e, [], !1).filter((l) => I(l) && Q(l) !== "body"), i = null;
803
803
  const s = L(e).position === "fixed";
804
804
  let r = s ? $(e) : e;
805
- for (; N(r) && !J(r); ) {
806
- const l = L(r), c = Oe(r);
807
- !c && l.position === "fixed" && (i = null), (s ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : i = l, r = $(r);
805
+ for (; I(r) && !J(r); ) {
806
+ const l = L(r), a = Ce(r);
807
+ !a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || oe(r) && !a && Ge(e, r)) ? n = n.filter((u) => u !== r) : i = l, r = $(r);
808
808
  }
809
809
  return o.set(e, n), n;
810
810
  }
811
- function It(e) {
811
+ function Lt(e) {
812
812
  let {
813
813
  element: o,
814
814
  boundary: t,
815
815
  rootBoundary: n,
816
816
  strategy: i
817
817
  } = e;
818
- const r = [...t === "clippingAncestors" ? pe(o) ? [] : zt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((a, u) => {
819
- const d = Ne(o, u, i);
820
- return a.top = H(d.top, a.top), a.right = le(d.right, a.right), a.bottom = le(d.bottom, a.bottom), a.left = H(d.left, a.left), a;
821
- }, Ne(o, l, i));
818
+ const r = [...t === "clippingAncestors" ? pe(o) ? [] : It(o, this._c) : [].concat(t), n], l = r[0], a = r.reduce((c, u) => {
819
+ const d = Ie(o, u, i);
820
+ return c.top = H(d.top, c.top), c.right = le(d.right, c.right), c.bottom = le(d.bottom, c.bottom), c.left = H(d.left, c.left), c;
821
+ }, Ie(o, l, i));
822
822
  return {
823
- width: c.right - c.left,
824
- height: c.bottom - c.top,
825
- x: c.left,
826
- y: c.top
823
+ width: a.right - a.left,
824
+ height: a.bottom - a.top,
825
+ x: a.left,
826
+ y: a.top
827
827
  };
828
828
  }
829
- function Nt(e) {
829
+ function _t(e) {
830
830
  const {
831
831
  width: o,
832
832
  height: t
@@ -836,19 +836,19 @@ function Nt(e) {
836
836
  height: t
837
837
  };
838
838
  }
839
- function Lt(e, o, t) {
840
- const n = D(o), i = P(o), s = t === "fixed", r = K(e, !0, s, o);
839
+ function Dt(e, o, t) {
840
+ const n = D(o), i = F(o), s = t === "fixed", r = q(e, !0, s, o);
841
841
  let l = {
842
842
  scrollLeft: 0,
843
843
  scrollTop: 0
844
844
  };
845
- const c = _(0);
845
+ const a = _(0);
846
846
  if (n || !n && !s)
847
- if ((Q(o) !== "body" || oe(i)) && (l = we(o)), n) {
848
- const m = K(o, !0, s, o);
849
- c.x = m.x + o.clientLeft, c.y = m.y + o.clientTop;
850
- } else i && (c.x = Me(i));
851
- const a = i && !n && !s ? Xe(i, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, d = r.top + l.scrollTop - c.y - a.y;
847
+ if ((Q(o) !== "body" || oe(i)) && (l = xe(o)), n) {
848
+ const h = q(o, !0, s, o);
849
+ a.x = h.x + o.clientLeft, a.y = h.y + o.clientTop;
850
+ } else i && (a.x = ke(i));
851
+ const c = i && !n && !s ? Ze(i, l) : _(0), u = r.left + l.scrollLeft - a.x - c.x, d = r.top + l.scrollTop - a.y - c.y;
852
852
  return {
853
853
  x: u,
854
854
  y: d,
@@ -856,7 +856,7 @@ function Lt(e, o, t) {
856
856
  height: r.height
857
857
  };
858
858
  }
859
- function xe(e) {
859
+ function we(e) {
860
860
  return L(e).position === "static";
861
861
  }
862
862
  function Le(e, o) {
@@ -865,30 +865,30 @@ function Le(e, o) {
865
865
  if (o)
866
866
  return o(e);
867
867
  let t = e.offsetParent;
868
- return P(e) === t && (t = t.ownerDocument.body), t;
868
+ return F(e) === t && (t = t.ownerDocument.body), t;
869
869
  }
870
- function Ge(e, o) {
871
- const t = A(e);
870
+ function Je(e, o) {
871
+ const t = T(e);
872
872
  if (pe(e))
873
873
  return t;
874
874
  if (!D(e)) {
875
875
  let i = $(e);
876
876
  for (; i && !J(i); ) {
877
- if (N(i) && !xe(i))
877
+ if (I(i) && !we(i))
878
878
  return i;
879
879
  i = $(i);
880
880
  }
881
881
  return t;
882
882
  }
883
883
  let n = Le(e, o);
884
- for (; n && Et(n) && xe(n); )
884
+ for (; n && Ot(n) && we(n); )
885
885
  n = Le(n, o);
886
- return n && J(n) && xe(n) && !Oe(n) ? t : n || St(e) || t;
886
+ return n && J(n) && we(n) && !Ce(n) ? t : n || Ct(e) || t;
887
887
  }
888
- const _t = async function(e) {
889
- const o = this.getOffsetParent || Ge, t = this.getDimensions, n = await t(e.floating);
888
+ const Ft = async function(e) {
889
+ const o = this.getOffsetParent || Je, t = this.getDimensions, n = await t(e.floating);
890
890
  return {
891
- reference: Lt(e.reference, await o(e.floating), e.strategy),
891
+ reference: Dt(e.reference, await o(e.floating), e.strategy),
892
892
  floating: {
893
893
  x: 0,
894
894
  y: 0,
@@ -897,117 +897,120 @@ const _t = async function(e) {
897
897
  }
898
898
  };
899
899
  };
900
- function Dt(e) {
900
+ function Pt(e) {
901
901
  return L(e).direction === "rtl";
902
902
  }
903
- const Pt = {
904
- convertOffsetParentRelativeRectToViewportRelativeRect: Rt,
905
- getDocumentElement: P,
906
- getClippingRect: It,
907
- getOffsetParent: Ge,
908
- getElementRects: _t,
909
- getClientRects: kt,
910
- getDimensions: Nt,
903
+ const Vt = {
904
+ convertOffsetParentRelativeRectToViewportRelativeRect: kt,
905
+ getDocumentElement: F,
906
+ getClippingRect: Lt,
907
+ getOffsetParent: Je,
908
+ getElementRects: Ft,
909
+ getClientRects: At,
910
+ getDimensions: _t,
911
911
  getScale: Z,
912
- isElement: N,
913
- isRTL: Dt
912
+ isElement: I,
913
+ isRTL: Pt
914
914
  };
915
- function Ft(e, o) {
915
+ function Qe(e, o) {
916
+ return e.x === o.x && e.y === o.y && e.width === o.width && e.height === o.height;
917
+ }
918
+ function Wt(e, o) {
916
919
  let t = null, n;
917
- const i = P(e);
920
+ const i = F(e);
918
921
  function s() {
919
922
  var l;
920
923
  clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
921
924
  }
922
- function r(l, c) {
923
- l === void 0 && (l = !1), c === void 0 && (c = 1), s();
924
- const {
925
- left: a,
926
- top: u,
927
- width: d,
928
- height: m
929
- } = e.getBoundingClientRect();
930
- if (l || o(), !d || !m)
925
+ function r(l, a) {
926
+ l === void 0 && (l = !1), a === void 0 && (a = 1), s();
927
+ const c = e.getBoundingClientRect(), {
928
+ left: u,
929
+ top: d,
930
+ width: h,
931
+ height: f
932
+ } = c;
933
+ if (l || o(), !h || !f)
931
934
  return;
932
- const f = ie(u), g = ie(i.clientWidth - (a + d)), w = ie(i.clientHeight - (u + m)), x = ie(a), p = {
933
- rootMargin: -f + "px " + -g + "px " + -w + "px " + -x + "px",
934
- threshold: H(0, le(1, c)) || 1
935
+ const g = ie(d), x = ie(i.clientWidth - (u + h)), w = ie(i.clientHeight - (d + f)), m = ie(u), v = {
936
+ rootMargin: -g + "px " + -x + "px " + -w + "px " + -m + "px",
937
+ threshold: H(0, le(1, a)) || 1
935
938
  };
936
- let v = !0;
937
- function E(y) {
938
- const O = y[0].intersectionRatio;
939
- if (O !== c) {
940
- if (!v)
939
+ let E = !0;
940
+ function b(R) {
941
+ const O = R[0].intersectionRatio;
942
+ if (O !== a) {
943
+ if (!E)
941
944
  return r();
942
945
  O ? r(!1, O) : n = setTimeout(() => {
943
946
  r(!1, 1e-7);
944
947
  }, 1e3);
945
948
  }
946
- v = !1;
949
+ O === 1 && !Qe(c, e.getBoundingClientRect()) && r(), E = !1;
947
950
  }
948
951
  try {
949
- t = new IntersectionObserver(E, {
950
- ...p,
952
+ t = new IntersectionObserver(b, {
953
+ ...v,
951
954
  // Handle <iframe>s
952
955
  root: i.ownerDocument
953
956
  });
954
957
  } catch {
955
- t = new IntersectionObserver(E, p);
958
+ t = new IntersectionObserver(b, v);
956
959
  }
957
960
  t.observe(e);
958
961
  }
959
962
  return r(!0), s;
960
963
  }
961
- function Vt(e, o, t, n) {
964
+ function Bt(e, o, t, n) {
962
965
  n === void 0 && (n = {});
963
966
  const {
964
967
  ancestorScroll: i = !0,
965
968
  ancestorResize: s = !0,
966
969
  elementResize: r = typeof ResizeObserver == "function",
967
970
  layoutShift: l = typeof IntersectionObserver == "function",
968
- animationFrame: c = !1
969
- } = n, a = ke(e), u = i || s ? [...a ? ne(a) : [], ...ne(o)] : [];
970
- u.forEach((h) => {
971
- i && h.addEventListener("scroll", t, {
971
+ animationFrame: a = !1
972
+ } = n, c = Me(e), u = i || s ? [...c ? ne(c) : [], ...ne(o)] : [];
973
+ u.forEach((m) => {
974
+ i && m.addEventListener("scroll", t, {
972
975
  passive: !0
973
- }), s && h.addEventListener("resize", t);
976
+ }), s && m.addEventListener("resize", t);
974
977
  });
975
- const d = a && l ? Ft(a, t) : null;
976
- let m = -1, f = null;
977
- r && (f = new ResizeObserver((h) => {
978
- let [p] = h;
979
- p && p.target === a && f && (f.unobserve(o), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
978
+ const d = c && l ? Wt(c, t) : null;
979
+ let h = -1, f = null;
980
+ r && (f = new ResizeObserver((m) => {
981
+ let [p] = m;
982
+ p && p.target === c && f && (f.unobserve(o), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
980
983
  var v;
981
984
  (v = f) == null || v.observe(o);
982
985
  })), t();
983
- }), a && !c && f.observe(a), f.observe(o));
984
- let g, w = c ? K(e) : null;
985
- c && x();
986
- function x() {
987
- const h = K(e);
988
- w && (h.x !== w.x || h.y !== w.y || h.width !== w.width || h.height !== w.height) && t(), w = h, g = requestAnimationFrame(x);
986
+ }), c && !a && f.observe(c), f.observe(o));
987
+ let g, x = a ? q(e) : null;
988
+ a && w();
989
+ function w() {
990
+ const m = q(e);
991
+ x && !Qe(x, m) && t(), x = m, g = requestAnimationFrame(w);
989
992
  }
990
993
  return t(), () => {
991
- var h;
994
+ var m;
992
995
  u.forEach((p) => {
993
996
  i && p.removeEventListener("scroll", t), s && p.removeEventListener("resize", t);
994
- }), d == null || d(), (h = f) == null || h.disconnect(), f = null, c && cancelAnimationFrame(g);
997
+ }), d == null || d(), (m = f) == null || m.disconnect(), f = null, a && cancelAnimationFrame(g);
995
998
  };
996
999
  }
997
- const Wt = bt, Bt = vt, jt = xt, $t = (e, o, t) => {
1000
+ const jt = Et, $t = St, Ht = yt, Ut = (e, o, t) => {
998
1001
  const n = /* @__PURE__ */ new Map(), i = {
999
- platform: Pt,
1002
+ platform: Vt,
1000
1003
  ...t
1001
1004
  }, s = {
1002
1005
  ...i.platform,
1003
1006
  _c: n
1004
1007
  };
1005
- return wt(e, o, {
1008
+ return bt(e, o, {
1006
1009
  ...i,
1007
1010
  platform: s
1008
1011
  });
1009
1012
  };
1010
- var se = typeof document < "u" ? tt : re;
1013
+ var se = typeof document < "u" ? ot : re;
1011
1014
  function fe(e, o) {
1012
1015
  if (e === o)
1013
1016
  return !0;
@@ -1038,20 +1041,20 @@ function fe(e, o) {
1038
1041
  }
1039
1042
  return e !== e && o !== o;
1040
1043
  }
1041
- function Je(e) {
1044
+ function et(e) {
1042
1045
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1043
1046
  }
1044
1047
  function _e(e, o) {
1045
- const t = Je(e);
1048
+ const t = et(e);
1046
1049
  return Math.round(o * t) / t;
1047
1050
  }
1048
- function ye(e) {
1051
+ function be(e) {
1049
1052
  const o = C.useRef(e);
1050
1053
  return se(() => {
1051
1054
  o.current = e;
1052
1055
  }), o;
1053
1056
  }
1054
- function Ht(e) {
1057
+ function qt(e) {
1055
1058
  e === void 0 && (e = {});
1056
1059
  const {
1057
1060
  placement: o = "bottom",
@@ -1063,8 +1066,8 @@ function Ht(e) {
1063
1066
  floating: r
1064
1067
  } = {},
1065
1068
  transform: l = !0,
1066
- whileElementsMounted: c,
1067
- open: a
1069
+ whileElementsMounted: a,
1070
+ open: c
1068
1071
  } = e, [u, d] = C.useState({
1069
1072
  x: 0,
1070
1073
  y: 0,
@@ -1072,98 +1075,98 @@ function Ht(e) {
1072
1075
  placement: o,
1073
1076
  middlewareData: {},
1074
1077
  isPositioned: !1
1075
- }), [m, f] = C.useState(n);
1076
- fe(m, n) || f(n);
1077
- const [g, w] = C.useState(null), [x, h] = C.useState(null), p = C.useCallback((S) => {
1078
- S !== O.current && (O.current = S, w(S));
1078
+ }), [h, f] = C.useState(n);
1079
+ fe(h, n) || f(n);
1080
+ const [g, x] = C.useState(null), [w, m] = C.useState(null), p = C.useCallback((S) => {
1081
+ S !== R.current && (R.current = S, x(S));
1079
1082
  }, []), v = C.useCallback((S) => {
1080
- S !== R.current && (R.current = S, h(S));
1081
- }, []), E = s || g, y = r || x, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(i), ee = ye(a), B = C.useCallback(() => {
1082
- if (!O.current || !R.current)
1083
+ S !== O.current && (O.current = S, m(S));
1084
+ }, []), E = s || g, b = r || w, R = C.useRef(null), O = C.useRef(null), z = C.useRef(u), K = a != null, P = be(a), Y = be(i), ee = be(c), B = C.useCallback(() => {
1085
+ if (!R.current || !O.current)
1083
1086
  return;
1084
1087
  const S = {
1085
1088
  placement: o,
1086
1089
  strategy: t,
1087
- middleware: m
1090
+ middleware: h
1088
1091
  };
1089
- q.current && (S.platform = q.current), $t(O.current, R.current, S).then((T) => {
1092
+ Y.current && (S.platform = Y.current), Ut(R.current, O.current, S).then((A) => {
1090
1093
  const j = {
1091
- ...T,
1094
+ ...A,
1092
1095
  // The floating element's position may be recomputed while it's closed
1093
1096
  // but still mounted (such as when transitioning out). To ensure
1094
1097
  // `isPositioned` will be `false` initially on the next open, avoid
1095
1098
  // setting it to `true` when `open === false` (must be specified).
1096
1099
  isPositioned: ee.current !== !1
1097
1100
  };
1098
- I.current && !fe(z.current, j) && (z.current = j, ot.flushSync(() => {
1101
+ N.current && !fe(z.current, j) && (z.current = j, st.flushSync(() => {
1099
1102
  d(j);
1100
1103
  }));
1101
1104
  });
1102
- }, [m, o, t, q, ee]);
1105
+ }, [h, o, t, Y, ee]);
1103
1106
  se(() => {
1104
- a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
1107
+ c === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
1105
1108
  ...S,
1106
1109
  isPositioned: !1
1107
1110
  })));
1108
- }, [a]);
1109
- const I = C.useRef(!1);
1110
- se(() => (I.current = !0, () => {
1111
- I.current = !1;
1111
+ }, [c]);
1112
+ const N = C.useRef(!1);
1113
+ se(() => (N.current = !0, () => {
1114
+ N.current = !1;
1112
1115
  }), []), se(() => {
1113
- if (E && (O.current = E), y && (R.current = y), E && y) {
1114
- if (F.current)
1115
- return F.current(E, y, B);
1116
+ if (E && (R.current = E), b && (O.current = b), E && b) {
1117
+ if (P.current)
1118
+ return P.current(E, b, B);
1116
1119
  B();
1117
1120
  }
1118
- }, [E, y, B, F, Y]);
1121
+ }, [E, b, B, P, K]);
1119
1122
  const te = C.useMemo(() => ({
1120
- reference: O,
1121
- floating: R,
1123
+ reference: R,
1124
+ floating: O,
1122
1125
  setReference: p,
1123
1126
  setFloating: v
1124
- }), [p, v]), M = C.useMemo(() => ({
1127
+ }), [p, v]), k = C.useMemo(() => ({
1125
1128
  reference: E,
1126
- floating: y
1127
- }), [E, y]), V = C.useMemo(() => {
1129
+ floating: b
1130
+ }), [E, b]), V = C.useMemo(() => {
1128
1131
  const S = {
1129
1132
  position: t,
1130
1133
  left: 0,
1131
1134
  top: 0
1132
1135
  };
1133
- if (!M.floating)
1136
+ if (!k.floating)
1134
1137
  return S;
1135
- const T = _e(M.floating, u.x), j = _e(M.floating, u.y);
1138
+ const A = _e(k.floating, u.x), j = _e(k.floating, u.y);
1136
1139
  return l ? {
1137
1140
  ...S,
1138
- transform: "translate(" + T + "px, " + j + "px)",
1139
- ...Je(M.floating) >= 1.5 && {
1141
+ transform: "translate(" + A + "px, " + j + "px)",
1142
+ ...et(k.floating) >= 1.5 && {
1140
1143
  willChange: "transform"
1141
1144
  }
1142
1145
  } : {
1143
1146
  position: t,
1144
- left: T,
1147
+ left: A,
1145
1148
  top: j
1146
1149
  };
1147
- }, [t, l, M.floating, u.x, u.y]);
1150
+ }, [t, l, k.floating, u.x, u.y]);
1148
1151
  return C.useMemo(() => ({
1149
1152
  ...u,
1150
1153
  update: B,
1151
1154
  refs: te,
1152
- elements: M,
1155
+ elements: k,
1153
1156
  floatingStyles: V
1154
- }), [u, B, te, M, V]);
1157
+ }), [u, B, te, k, V]);
1155
1158
  }
1156
- const Ut = (e, o) => ({
1157
- ...Wt(e),
1158
- options: [e, o]
1159
- }), Kt = (e, o) => ({
1160
- ...Bt(e),
1159
+ const Kt = (e, o) => ({
1160
+ ...jt(e),
1161
1161
  options: [e, o]
1162
1162
  }), Yt = (e, o) => ({
1163
- ...jt(e),
1163
+ ...$t(e),
1164
+ options: [e, o]
1165
+ }), Xt = (e, o) => ({
1166
+ ...Ht(e),
1164
1167
  options: [e, o]
1165
1168
  });
1166
- function qt(e, o) {
1169
+ function Zt(e, o) {
1167
1170
  return () => {
1168
1171
  if (typeof document > "u")
1169
1172
  return;
@@ -1175,7 +1178,7 @@ function qt(e, o) {
1175
1178
  };
1176
1179
  };
1177
1180
  }
1178
- function Qe(e) {
1181
+ function tt(e) {
1179
1182
  const {
1180
1183
  className: o,
1181
1184
  placement: t = "bottom-start",
@@ -1184,56 +1187,56 @@ function Qe(e) {
1184
1187
  children: s,
1185
1188
  onClose: r,
1186
1189
  onOpen: l,
1187
- disabled: c = !1,
1188
- show: a = !1,
1190
+ disabled: a = !1,
1191
+ show: c = !1,
1189
1192
  setShow: u,
1190
1193
  role: d = "tooltip",
1191
- style: m,
1194
+ style: h,
1192
1195
  ...f
1193
- } = e, [g, w] = de(a), x = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : w, { x: p, y: v, strategy: E, refs: y } = Ht({
1194
- open: x(),
1195
- middleware: [Ut(4), Yt(), Kt()],
1196
- whileElementsMounted: Vt,
1196
+ } = e, [g, x] = de(c), w = () => u !== void 0 && c !== void 0 ? c : g, m = () => u !== void 0 && c !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: b } = qt({
1197
+ open: w(),
1198
+ middleware: [Kt(4), Xt(), Yt()],
1199
+ whileElementsMounted: Bt,
1197
1200
  placement: t
1198
- }), O = nt();
1201
+ }), R = it();
1199
1202
  return re(
1200
- qt(y.floating, (R) => {
1201
- R && h()(!1);
1203
+ Zt(b.floating, (O) => {
1204
+ O && m()(!1);
1202
1205
  }),
1203
1206
  []
1204
- ), /* @__PURE__ */ W(Fe, { children: [
1205
- /* @__PURE__ */ b(
1207
+ ), /* @__PURE__ */ W(Ve, { children: [
1208
+ /* @__PURE__ */ y(
1206
1209
  "div",
1207
1210
  {
1208
1211
  className: "z-auto min-w-fit max-w-fit",
1209
- id: `zen__popover-${O}`,
1210
- ref: y.setReference,
1211
- onClick: (R) => {
1212
+ id: `zen__popover-${R}`,
1213
+ ref: b.setReference,
1214
+ onClick: (O) => {
1212
1215
  if (n === "click") {
1213
- if (c)
1216
+ if (a)
1214
1217
  return;
1215
- x() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
1218
+ w() ? (m()(!1), r == null || r()) : (m()(!0), l == null || l());
1216
1219
  }
1217
- R.stopPropagation();
1220
+ O.stopPropagation();
1218
1221
  },
1219
1222
  role: d,
1220
1223
  children: s
1221
1224
  }
1222
1225
  ),
1223
- x() && it(
1224
- /* @__PURE__ */ b(
1226
+ w() && rt(
1227
+ /* @__PURE__ */ y(
1225
1228
  "div",
1226
1229
  {
1227
1230
  ...f,
1228
- onClick: (R) => R.stopPropagation(),
1231
+ onClick: (O) => O.stopPropagation(),
1229
1232
  role: "tooltip",
1230
- className: k(
1233
+ className: M(
1231
1234
  "zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
1232
1235
  o
1233
1236
  ),
1234
- ref: y.setFloating,
1237
+ ref: b.setFloating,
1235
1238
  style: {
1236
- ...m,
1239
+ ...h,
1237
1240
  position: E,
1238
1241
  top: v ?? 0,
1239
1242
  left: p ?? 0
@@ -1245,66 +1248,66 @@ function Qe(e) {
1245
1248
  )
1246
1249
  ] });
1247
1250
  }
1248
- function Xt(e) {
1249
- var w, x;
1251
+ function Gt(e) {
1252
+ var x, w;
1250
1253
  const {
1251
1254
  items: o = [],
1252
1255
  children: t,
1253
1256
  moreItemsLabel: n = "",
1254
1257
  parentRef: i,
1255
1258
  data: s,
1256
- estimator: r = (h, p) => p + 30,
1259
+ estimator: r = (m, p) => p + 30,
1257
1260
  font: l = "12px Inter",
1258
- badgeVariant: c = "secondary",
1259
- badgeStyles: a
1261
+ badgeVariant: a = "secondary",
1262
+ badgeStyles: c
1260
1263
  } = e, [u, d] = de({
1261
1264
  visible: o,
1262
1265
  hidden: []
1263
- }), m = ve(() => {
1266
+ }), h = ve(() => {
1264
1267
  if (typeof document > "u")
1265
1268
  return null;
1266
1269
  const p = document.createElement("canvas").getContext("2d");
1267
1270
  return p && (p.font = l), p;
1268
1271
  }, []), f = () => {
1269
- const h = i == null ? void 0 : i.current;
1270
- if (!h)
1272
+ const m = i == null ? void 0 : i.current;
1273
+ if (!m)
1271
1274
  return;
1272
- const p = h.offsetWidth, v = [], E = [], y = r(
1275
+ const p = m.offsetWidth, v = [], E = [], b = r(
1273
1276
  n,
1274
- ((m == null ? void 0 : m.measureText(n).width) ?? 0) + 10
1277
+ ((h == null ? void 0 : h.measureText(n).width) ?? 0) + 10
1275
1278
  );
1276
- g == null || g.reduce((O, R, z) => (O + R + y > p - 20 ? E.push(o[z]) : v.push(o[z]), O + R), 0), d({
1279
+ g == null || g.reduce((R, O, z) => (R + O + b > p - 20 ? E.push(o[z]) : v.push(o[z]), R + O), 0), d({
1277
1280
  visible: v,
1278
1281
  hidden: E
1279
1282
  });
1280
1283
  }, g = ve(
1281
- () => (o == null ? void 0 : o.map((h) => r(h, (m == null ? void 0 : m.measureText(h).width) ?? 0))) ?? [],
1284
+ () => (o == null ? void 0 : o.map((m) => r(m, (h == null ? void 0 : h.measureText(m).width) ?? 0))) ?? [],
1282
1285
  [o]
1283
1286
  );
1284
1287
  return re(() => {
1285
1288
  f();
1286
1289
  }, [o]), re(() => {
1287
1290
  if (!(i != null && i.current)) return;
1288
- const h = new ResizeObserver(() => {
1291
+ const m = new ResizeObserver(() => {
1289
1292
  f();
1290
1293
  });
1291
- return h.observe(i.current), () => {
1292
- h.disconnect();
1294
+ return m.observe(i.current), () => {
1295
+ m.disconnect();
1293
1296
  };
1294
- }, [o]), /* @__PURE__ */ W(Fe, { children: [
1295
- (w = u.visible) == null ? void 0 : w.map((h, p) => t(h, p, s == null ? void 0 : s[p])),
1296
- ((x = u.hidden) == null ? void 0 : x.length) > 0 && /* @__PURE__ */ b(
1297
- Qe,
1297
+ }, [o]), /* @__PURE__ */ W(Ve, { children: [
1298
+ (x = u.visible) == null ? void 0 : x.map((m, p) => t(m, p, s == null ? void 0 : s[p])),
1299
+ ((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ y(
1300
+ tt,
1298
1301
  {
1299
1302
  trigger: "click",
1300
- content: /* @__PURE__ */ b("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
1301
- (h, p) => t(
1302
- h,
1303
+ content: /* @__PURE__ */ y("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
1304
+ (m, p) => t(
1305
+ m,
1303
1306
  u.visible.length + p,
1304
1307
  s == null ? void 0 : s[u.visible.length + p]
1305
1308
  )
1306
1309
  ) }),
1307
- children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
1310
+ children: /* @__PURE__ */ y(Be, { className: c, variant: a, children: /* @__PURE__ */ y("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
1308
1311
  }
1309
1312
  )
1310
1313
  ] });
@@ -1312,51 +1315,51 @@ function Xt(e) {
1312
1315
  function X(e, o, t) {
1313
1316
  let n = t.initialDeps ?? [], i;
1314
1317
  return () => {
1315
- var s, r, l, c;
1316
- let a;
1317
- t.key && ((s = t.debug) != null && s.call(t)) && (a = Date.now());
1318
+ var s, r, l, a;
1319
+ let c;
1320
+ t.key && ((s = t.debug) != null && s.call(t)) && (c = Date.now());
1318
1321
  const u = e();
1319
1322
  if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
1320
1323
  return i;
1321
1324
  n = u;
1322
- let m;
1323
- if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), i = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
1324
- const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, w = g / 16, x = (h, p) => {
1325
- for (h = String(h); h.length < p; )
1326
- h = " " + h;
1327
- return h;
1325
+ let h;
1326
+ if (t.key && ((r = t.debug) != null && r.call(t)) && (h = Date.now()), i = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
1327
+ const f = Math.round((Date.now() - c) * 100) / 100, g = Math.round((Date.now() - h) * 100) / 100, x = g / 16, w = (m, p) => {
1328
+ for (m = String(m); m.length < p; )
1329
+ m = " " + m;
1330
+ return m;
1328
1331
  };
1329
1332
  console.info(
1330
- `%c⏱ ${x(g, 5)} /${x(f, 5)} ms`,
1333
+ `%c⏱ ${w(g, 5)} /${w(f, 5)} ms`,
1331
1334
  `
1332
1335
  font-size: .6rem;
1333
1336
  font-weight: bold;
1334
1337
  color: hsl(${Math.max(
1335
1338
  0,
1336
- Math.min(120 - 120 * w, 120)
1339
+ Math.min(120 - 120 * x, 120)
1337
1340
  )}deg 100% 31%);`,
1338
1341
  t == null ? void 0 : t.key
1339
1342
  );
1340
1343
  }
1341
- return (c = t == null ? void 0 : t.onChange) == null || c.call(t, i), i;
1344
+ return (a = t == null ? void 0 : t.onChange) == null || a.call(t, i), i;
1342
1345
  };
1343
1346
  }
1344
- function be(e, o) {
1347
+ function ye(e, o) {
1345
1348
  if (e === void 0)
1346
1349
  throw new Error("Unexpected undefined");
1347
1350
  return e;
1348
1351
  }
1349
- const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1352
+ const Jt = (e, o) => Math.abs(e - o) < 1, Qt = (e, o, t) => {
1350
1353
  let n;
1351
1354
  return function(...i) {
1352
1355
  e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, i), t);
1353
1356
  };
1354
- }, Jt = (e) => e, Qt = (e) => {
1357
+ }, en = (e) => e, tn = (e) => {
1355
1358
  const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
1356
1359
  for (let i = o; i <= t; i++)
1357
1360
  n.push(i);
1358
1361
  return n;
1359
- }, en = (e, o) => {
1362
+ }, nn = (e, o) => {
1360
1363
  const t = e.scrollElement;
1361
1364
  if (!t)
1362
1365
  return;
@@ -1364,29 +1367,32 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1364
1367
  if (!n)
1365
1368
  return;
1366
1369
  const i = (r) => {
1367
- const { width: l, height: c } = r;
1368
- o({ width: Math.round(l), height: Math.round(c) });
1370
+ const { width: l, height: a } = r;
1371
+ o({ width: Math.round(l), height: Math.round(a) });
1369
1372
  };
1370
1373
  if (i(t.getBoundingClientRect()), !n.ResizeObserver)
1371
1374
  return () => {
1372
1375
  };
1373
1376
  const s = new n.ResizeObserver((r) => {
1374
- const l = r[0];
1375
- if (l != null && l.borderBoxSize) {
1376
- const c = l.borderBoxSize[0];
1377
- if (c) {
1378
- i({ width: c.inlineSize, height: c.blockSize });
1379
- return;
1377
+ const l = () => {
1378
+ const a = r[0];
1379
+ if (a != null && a.borderBoxSize) {
1380
+ const c = a.borderBoxSize[0];
1381
+ if (c) {
1382
+ i({ width: c.inlineSize, height: c.blockSize });
1383
+ return;
1384
+ }
1380
1385
  }
1381
- }
1382
- i(t.getBoundingClientRect());
1386
+ i(t.getBoundingClientRect());
1387
+ };
1388
+ e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
1383
1389
  });
1384
1390
  return s.observe(t, { box: "border-box" }), () => {
1385
1391
  s.unobserve(t);
1386
1392
  };
1387
1393
  }, De = {
1388
1394
  passive: !0
1389
- }, tn = typeof window > "u" ? !0 : "onscrollend" in window, nn = (e, o) => {
1395
+ }, Fe = typeof window > "u" ? !0 : "onscrollend" in window, on = (e, o) => {
1390
1396
  const t = e.scrollElement;
1391
1397
  if (!t)
1392
1398
  return;
@@ -1394,21 +1400,23 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1394
1400
  if (!n)
1395
1401
  return;
1396
1402
  let i = 0;
1397
- const s = e.options.useScrollendEvent && tn ? () => {
1398
- } : Gt(
1403
+ const s = e.options.useScrollendEvent && Fe ? () => {
1404
+ } : Qt(
1399
1405
  n,
1400
1406
  () => {
1401
1407
  o(i, !1);
1402
1408
  },
1403
1409
  e.options.isScrollingResetDelay
1404
- ), r = (a) => () => {
1405
- const { horizontal: u, isRtl: d } = e.options;
1406
- i = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, s(), o(i, a);
1407
- }, l = r(!0), c = r(!1);
1408
- return c(), t.addEventListener("scroll", l, De), t.addEventListener("scrollend", c, De), () => {
1409
- t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
1410
+ ), r = (u) => () => {
1411
+ const { horizontal: d, isRtl: h } = e.options;
1412
+ i = d ? t.scrollLeft * (h && -1 || 1) : t.scrollTop, s(), o(i, u);
1413
+ }, l = r(!0), a = r(!1);
1414
+ a(), t.addEventListener("scroll", l, De);
1415
+ const c = e.options.useScrollendEvent && Fe;
1416
+ return c && t.addEventListener("scrollend", a, De), () => {
1417
+ t.removeEventListener("scroll", l), c && t.removeEventListener("scrollend", a);
1410
1418
  };
1411
- }, on = (e, o, t) => {
1419
+ }, sn = (e, o, t) => {
1412
1420
  if (o != null && o.borderBoxSize) {
1413
1421
  const n = o.borderBoxSize[0];
1414
1422
  if (n)
@@ -1419,7 +1427,7 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1419
1427
  return Math.round(
1420
1428
  e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
1421
1429
  );
1422
- }, sn = (e, {
1430
+ }, rn = (e, {
1423
1431
  adjustments: o = 0,
1424
1432
  behavior: t
1425
1433
  }, n) => {
@@ -1430,13 +1438,16 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
1430
1438
  behavior: t
1431
1439
  });
1432
1440
  };
1433
- class rn {
1441
+ class ln {
1434
1442
  constructor(o) {
1435
1443
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
1436
1444
  let t = null;
1437
1445
  const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((i) => {
1438
1446
  i.forEach((s) => {
1439
- this._measureElement(s.target, s);
1447
+ const r = () => {
1448
+ this._measureElement(s.target, s);
1449
+ };
1450
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(r) : r();
1440
1451
  });
1441
1452
  }));
1442
1453
  return {
@@ -1465,11 +1476,11 @@ class rn {
1465
1476
  scrollPaddingStart: 0,
1466
1477
  scrollPaddingEnd: 0,
1467
1478
  horizontal: !1,
1468
- getItemKey: Jt,
1469
- rangeExtractor: Qt,
1479
+ getItemKey: en,
1480
+ rangeExtractor: tn,
1470
1481
  onChange: () => {
1471
1482
  },
1472
- measureElement: on,
1483
+ measureElement: sn,
1473
1484
  initialRect: { width: 0, height: 0 },
1474
1485
  scrollMargin: 0,
1475
1486
  gap: 0,
@@ -1480,6 +1491,7 @@ class rn {
1480
1491
  enabled: !0,
1481
1492
  isRtl: !1,
1482
1493
  useScrollendEvent: !0,
1494
+ useAnimationFrameWithResizeObserver: !1,
1483
1495
  ...t
1484
1496
  };
1485
1497
  }, this.notify = (t) => {
@@ -1536,10 +1548,10 @@ class rn {
1536
1548
  const l = t[r];
1537
1549
  if (i.has(l.lane))
1538
1550
  continue;
1539
- const c = s.get(
1551
+ const a = s.get(
1540
1552
  l.lane
1541
1553
  );
1542
- if (c == null || l.end > c.end ? s.set(l.lane, l) : l.end < c.end && i.set(l.lane, !0), i.size === this.options.lanes)
1554
+ if (a == null || l.end > a.end ? s.set(l.lane, l) : l.end < a.end && i.set(l.lane, !0), i.size === this.options.lanes)
1543
1555
  break;
1544
1556
  }
1545
1557
  return s.size === this.options.lanes ? Array.from(s.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
@@ -1569,52 +1581,63 @@ class rn {
1569
1581
  this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
1570
1582
  this.itemSizeCache.set(u.key, u.size);
1571
1583
  }));
1572
- const c = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1584
+ const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1573
1585
  this.pendingMeasuredCacheIndexes = [];
1574
- const a = this.measurementsCache.slice(0, c);
1575
- for (let u = c; u < t; u++) {
1576
- const d = s(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + i, g = l.get(d), w = typeof g == "number" ? g : this.options.estimateSize(u), x = f + w, h = m ? m.lane : u % this.options.lanes;
1577
- a[u] = {
1586
+ const c = this.measurementsCache.slice(0, a);
1587
+ for (let u = a; u < t; u++) {
1588
+ const d = s(u), h = this.options.lanes === 1 ? c[u - 1] : this.getFurthestMeasurement(c, u), f = h ? h.end + this.options.gap : n + i, g = l.get(d), x = typeof g == "number" ? g : this.options.estimateSize(u), w = f + x, m = h ? h.lane : u % this.options.lanes;
1589
+ c[u] = {
1578
1590
  index: u,
1579
1591
  start: f,
1580
- size: w,
1581
- end: x,
1592
+ size: x,
1593
+ end: w,
1582
1594
  key: d,
1583
- lane: h
1595
+ lane: m
1584
1596
  };
1585
1597
  }
1586
- return this.measurementsCache = a, a;
1598
+ return this.measurementsCache = c, c;
1587
1599
  },
1588
1600
  {
1589
1601
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
1590
1602
  debug: () => this.options.debug
1591
1603
  }
1592
1604
  ), this.calculateRange = X(
1593
- () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
1594
- (t, n, i) => this.range = t.length > 0 && n > 0 ? ln({
1605
+ () => [
1606
+ this.getMeasurements(),
1607
+ this.getSize(),
1608
+ this.getScrollOffset(),
1609
+ this.options.lanes
1610
+ ],
1611
+ (t, n, i, s) => this.range = t.length > 0 && n > 0 ? cn({
1595
1612
  measurements: t,
1596
1613
  outerSize: n,
1597
- scrollOffset: i
1614
+ scrollOffset: i,
1615
+ lanes: s
1598
1616
  }) : null,
1599
1617
  {
1600
1618
  key: process.env.NODE_ENV !== "production" && "calculateRange",
1601
1619
  debug: () => this.options.debug
1602
1620
  }
1603
- ), this.getIndexes = X(
1604
- () => [
1605
- this.options.rangeExtractor,
1606
- this.calculateRange(),
1607
- this.options.overscan,
1608
- this.options.count
1609
- ],
1610
- (t, n, i, s) => n === null ? [] : t({
1611
- startIndex: n.startIndex,
1612
- endIndex: n.endIndex,
1613
- overscan: i,
1614
- count: s
1621
+ ), this.getVirtualIndexes = X(
1622
+ () => {
1623
+ let t = null, n = null;
1624
+ const i = this.calculateRange();
1625
+ return i && (t = i.startIndex, n = i.endIndex), [
1626
+ this.options.rangeExtractor,
1627
+ this.options.overscan,
1628
+ this.options.count,
1629
+ t,
1630
+ n
1631
+ ];
1632
+ },
1633
+ (t, n, i, s, r) => s === null || r === null ? [] : t({
1634
+ startIndex: s,
1635
+ endIndex: r,
1636
+ overscan: n,
1637
+ count: i
1615
1638
  }),
1616
1639
  {
1617
- key: process.env.NODE_ENV !== "production" && "getIndexes",
1640
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
1618
1641
  debug: () => this.options.debug
1619
1642
  }
1620
1643
  ), this.indexFromElement = (t) => {
@@ -1646,12 +1669,12 @@ class rn {
1646
1669
  }
1647
1670
  this._measureElement(t, void 0);
1648
1671
  }, this.getVirtualItems = X(
1649
- () => [this.getIndexes(), this.getMeasurements()],
1672
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
1650
1673
  (t, n) => {
1651
1674
  const i = [];
1652
1675
  for (let s = 0, r = t.length; s < r; s++) {
1653
- const l = t[s], c = n[l];
1654
- i.push(c);
1676
+ const l = t[s], a = n[l];
1677
+ i.push(a);
1655
1678
  }
1656
1679
  return i;
1657
1680
  },
@@ -1662,18 +1685,18 @@ class rn {
1662
1685
  ), this.getVirtualItemForOffset = (t) => {
1663
1686
  const n = this.getMeasurements();
1664
1687
  if (n.length !== 0)
1665
- return be(
1666
- n[et(
1688
+ return ye(
1689
+ n[nt(
1667
1690
  0,
1668
1691
  n.length - 1,
1669
- (i) => be(n[i]).start,
1692
+ (i) => ye(n[i]).start,
1670
1693
  t
1671
1694
  )]
1672
1695
  );
1673
- }, this.getOffsetForAlignment = (t, n) => {
1674
- const i = this.getSize(), s = this.getScrollOffset();
1675
- n === "auto" && (t <= s ? n = "start" : t >= s + i ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - i : n === "center" && (t = t - i / 2);
1676
- const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - i;
1696
+ }, this.getOffsetForAlignment = (t, n, i = 0) => {
1697
+ const s = this.getSize(), r = this.getScrollOffset();
1698
+ n === "auto" && (n = t >= r + s ? "end" : "start"), n === "center" ? t += (i - s) / 2 : n === "end" && (t -= s);
1699
+ const l = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[l] : this.scrollElement[l] : 0) - s;
1677
1700
  return Math.max(Math.min(c, t), 0);
1678
1701
  }, this.getOffsetForIndex = (t, n = "auto") => {
1679
1702
  t = Math.max(0, Math.min(t, this.options.count - 1));
@@ -1689,7 +1712,10 @@ class rn {
1689
1712
  else
1690
1713
  return [r, n];
1691
1714
  const l = n === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
1692
- return [this.getOffsetForAlignment(l, n), n];
1715
+ return [
1716
+ this.getOffsetForAlignment(l, n, i.size),
1717
+ n
1718
+ ];
1693
1719
  }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
1694
1720
  this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
1695
1721
  }, this.scrollToOffset = (t, { align: n = "start", behavior: i } = {}) => {
@@ -1710,10 +1736,10 @@ class rn {
1710
1736
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
1711
1737
  this.options.getItemKey(t)
1712
1738
  )) {
1713
- const [a] = be(
1739
+ const [c] = ye(
1714
1740
  this.getOffsetForIndex(t, l)
1715
1741
  );
1716
- Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
1742
+ Jt(c, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
1717
1743
  } else
1718
1744
  this.scrollToIndex(t, { align: l, behavior: i });
1719
1745
  }));
@@ -1744,7 +1770,7 @@ class rn {
1744
1770
  }, this.setOptions(o);
1745
1771
  }
1746
1772
  }
1747
- const et = (e, o, t, n) => {
1773
+ const nt = (e, o, t, n) => {
1748
1774
  for (; e <= o; ) {
1749
1775
  const i = (e + o) / 2 | 0, s = t(i);
1750
1776
  if (s < n)
@@ -1756,40 +1782,46 @@ const et = (e, o, t, n) => {
1756
1782
  }
1757
1783
  return e > 0 ? e - 1 : 0;
1758
1784
  };
1759
- function ln({
1785
+ function cn({
1760
1786
  measurements: e,
1761
1787
  outerSize: o,
1762
- scrollOffset: t
1788
+ scrollOffset: t,
1789
+ lanes: n
1763
1790
  }) {
1764
- const n = e.length - 1, s = et(0, n, (l) => e[l].start, t);
1765
- let r = s;
1766
- for (; r < n && e[r].end < t + o; )
1767
- r++;
1768
- return { startIndex: s, endIndex: r };
1791
+ const i = e.length - 1;
1792
+ let r = nt(
1793
+ 0,
1794
+ i,
1795
+ (a) => e[a].start,
1796
+ t
1797
+ ), l = r;
1798
+ for (; l < i && e[l].end < t + o; )
1799
+ l++;
1800
+ return n > 1 && (r = Math.max(0, r - r % n), l = Math.min(i, l + (n - 1 - l % n))), { startIndex: r, endIndex: l };
1769
1801
  }
1770
1802
  const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
1771
- function cn(e) {
1803
+ function an(e) {
1772
1804
  const o = C.useReducer(() => ({}), {})[1], t = {
1773
1805
  ...e,
1774
1806
  onChange: (i, s) => {
1775
1807
  var r;
1776
- s ? st(o) : o(), (r = e.onChange) == null || r.call(e, i, s);
1808
+ s ? lt(o) : o(), (r = e.onChange) == null || r.call(e, i, s);
1777
1809
  }
1778
1810
  }, [n] = C.useState(
1779
- () => new rn(t)
1811
+ () => new ln(t)
1780
1812
  );
1781
1813
  return n.setOptions(t), Pe(() => n._didMount(), []), Pe(() => n._willUpdate()), n;
1782
1814
  }
1783
- function an(e) {
1784
- return cn({
1785
- observeElementRect: en,
1786
- observeElementOffset: nn,
1787
- scrollToFn: sn,
1815
+ function un(e) {
1816
+ return an({
1817
+ observeElementRect: nn,
1818
+ observeElementOffset: on,
1819
+ scrollToFn: rn,
1788
1820
  ...e
1789
1821
  });
1790
1822
  }
1791
- function un(e) {
1792
- return /* @__PURE__ */ b(
1823
+ function fn(e) {
1824
+ return /* @__PURE__ */ y(
1793
1825
  "svg",
1794
1826
  {
1795
1827
  xmlns: "http://www.w3.org/2000/svg",
@@ -1799,12 +1831,12 @@ function un(e) {
1799
1831
  stroke: "currentColor",
1800
1832
  className: "h-6 w-6",
1801
1833
  ...e,
1802
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1834
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1803
1835
  }
1804
1836
  );
1805
1837
  }
1806
- function fn(e) {
1807
- return /* @__PURE__ */ b(
1838
+ function dn(e) {
1839
+ return /* @__PURE__ */ y(
1808
1840
  "svg",
1809
1841
  {
1810
1842
  xmlns: "http://www.w3.org/2000/svg",
@@ -1814,7 +1846,7 @@ function fn(e) {
1814
1846
  stroke: "currentColor",
1815
1847
  className: "h-6 w-6",
1816
1848
  ...e,
1817
- children: /* @__PURE__ */ b(
1849
+ children: /* @__PURE__ */ y(
1818
1850
  "path",
1819
1851
  {
1820
1852
  strokeLinecap: "round",
@@ -1825,8 +1857,8 @@ function fn(e) {
1825
1857
  }
1826
1858
  );
1827
1859
  }
1828
- function dn(e) {
1829
- return /* @__PURE__ */ b(
1860
+ function hn(e) {
1861
+ return /* @__PURE__ */ y(
1830
1862
  "svg",
1831
1863
  {
1832
1864
  xmlns: "http://www.w3.org/2000/svg",
@@ -1836,7 +1868,7 @@ function dn(e) {
1836
1868
  stroke: "currentColor",
1837
1869
  className: "h-6 w-6",
1838
1870
  ...e,
1839
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1871
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1840
1872
  }
1841
1873
  );
1842
1874
  }
@@ -1850,87 +1882,87 @@ function wn(e) {
1850
1882
  disabled: s,
1851
1883
  placeholder: r = "Select an Item",
1852
1884
  multiple: l,
1853
- mutable: c,
1854
- onAdd: a
1855
- } = e, u = Ee(null), [d, m] = de(!1), f = Ee(null);
1856
- return /* @__PURE__ */ b(
1857
- Qe,
1885
+ mutable: a,
1886
+ onAdd: c
1887
+ } = e, u = Ee(null), [d, h] = de(!1), f = Ee(null);
1888
+ return /* @__PURE__ */ y(
1889
+ tt,
1858
1890
  {
1859
1891
  placement: "bottom",
1860
1892
  trigger: "click",
1861
1893
  show: d,
1862
- setShow: m,
1894
+ setShow: h,
1863
1895
  role: "combobox",
1864
1896
  disabled: s,
1865
1897
  style: {
1866
1898
  "--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
1867
1899
  },
1868
- content: /* @__PURE__ */ b(
1869
- hn,
1900
+ content: /* @__PURE__ */ y(
1901
+ mn,
1870
1902
  {
1871
- ...c ? { mutable: c, onAdd: a } : { mutable: c },
1903
+ ...a ? { mutable: a, onAdd: c } : { mutable: a },
1872
1904
  ...l ? { multiple: l, items: o, onChange: i, selected: t } : { items: o, onChange: i, selected: t }
1873
1905
  }
1874
1906
  ),
1875
1907
  children: /* @__PURE__ */ W(
1876
1908
  "div",
1877
1909
  {
1878
- className: k(
1910
+ className: M(
1879
1911
  "inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
1880
1912
  s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
1881
- d && "border-primary shadow-sm shadow-ring",
1913
+ d && "border-primary shadow-xs shadow-ring",
1882
1914
  n
1883
1915
  ),
1884
1916
  ref: f,
1885
1917
  children: [
1886
- /* @__PURE__ */ b(
1918
+ /* @__PURE__ */ y(
1887
1919
  "div",
1888
1920
  {
1889
- className: k(
1921
+ className: M(
1890
1922
  "flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
1891
1923
  s ? "text-muted-foreground" : "text-foreground"
1892
1924
  ),
1893
1925
  ref: u,
1894
- children: l ? /* @__PURE__ */ b(
1895
- Xt,
1926
+ children: l ? /* @__PURE__ */ y(
1927
+ Gt,
1896
1928
  {
1897
- items: t.map((w) => w.text),
1929
+ items: t.map((x) => x.text),
1898
1930
  data: t,
1899
1931
  parentRef: u,
1900
- estimator: (w, x) => x + 40,
1932
+ estimator: (x, w) => w + 40,
1901
1933
  badgeVariant: "secondary",
1902
- badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
1903
- children: (w, x, h) => /* @__PURE__ */ W(
1904
- We,
1934
+ badgeStyles: "bg-input! h-6 min-w-min gap-2 bg-input!",
1935
+ children: (x, w, m) => /* @__PURE__ */ W(
1936
+ Be,
1905
1937
  {
1906
- className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
1938
+ className: "flex h-6 min-w-min gap-2 bg-input! pr-1",
1907
1939
  variant: "secondary",
1908
1940
  children: [
1909
- w,
1910
- /* @__PURE__ */ b(
1911
- lt,
1941
+ x,
1942
+ /* @__PURE__ */ y(
1943
+ at,
1912
1944
  {
1913
1945
  onClick: () => {
1914
- i(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
1946
+ i(t.filter((p) => p.key !== (m == null ? void 0 : m.key)));
1915
1947
  },
1916
1948
  variant: "icon",
1917
1949
  size: "icon",
1918
1950
  className: "group bg-muted p-0.5 hover:bg-muted-foreground",
1919
- children: /* @__PURE__ */ b(dn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
1951
+ children: /* @__PURE__ */ y(hn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
1920
1952
  }
1921
1953
  )
1922
1954
  ]
1923
1955
  },
1924
- `collapsed_item_${x}`
1956
+ `collapsed_item_${w}`
1925
1957
  )
1926
1958
  }
1927
1959
  ) : t.text ?? r
1928
1960
  }
1929
1961
  ),
1930
- /* @__PURE__ */ b(
1931
- un,
1962
+ /* @__PURE__ */ y(
1963
+ fn,
1932
1964
  {
1933
- className: k(
1965
+ className: M(
1934
1966
  "size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
1935
1967
  d ? "rotate-180" : "rotate-0",
1936
1968
  s ? "text-muted-foreground" : "text-foreground"
@@ -1943,35 +1975,35 @@ function wn(e) {
1943
1975
  }
1944
1976
  );
1945
1977
  }
1946
- function hn(e) {
1947
- const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
1978
+ function mn(e) {
1979
+ const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l, a] = de(""), c = Ee(null), u = ve(
1948
1980
  () => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
1949
1981
  [o, l]
1950
- ), d = an({
1982
+ ), d = un({
1951
1983
  count: u.length,
1952
- getScrollElement: () => a.current,
1984
+ getScrollElement: () => c.current,
1953
1985
  estimateSize: () => 35
1954
- }), m = n instanceof Array ? n.map((f) => f.key) : [n.key];
1986
+ }), h = n instanceof Array ? n.map((f) => f.key) : [n.key];
1955
1987
  return /* @__PURE__ */ W("div", { className: "flex min-w-[var(--input-width)] flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background", children: [
1956
- /* @__PURE__ */ W("div", { className: k("inline-flex grow items-center rounded px-3 py-2"), children: [
1957
- /* @__PURE__ */ b(fn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
1958
- /* @__PURE__ */ b(
1988
+ /* @__PURE__ */ W("div", { className: M("inline-flex grow items-center rounded px-3 py-2"), children: [
1989
+ /* @__PURE__ */ y(dn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
1990
+ /* @__PURE__ */ y(
1959
1991
  "input",
1960
1992
  {
1961
- className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
1993
+ className: "inline-flex grow bg-transparent text-sm text-foreground outline-hidden",
1962
1994
  placeholder: "Search",
1963
1995
  value: l,
1964
- onChange: (f) => c(f.target.value)
1996
+ onChange: (f) => a(f.target.value)
1965
1997
  }
1966
1998
  )
1967
1999
  ] }),
1968
2000
  /* @__PURE__ */ W(
1969
2001
  "ul",
1970
2002
  {
1971
- className: k("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
1972
- ref: a,
2003
+ className: M("max-h-60 grow overflow-auto shadow-sm", "focus:outline-hidden focus:ring-0"),
2004
+ ref: c,
1973
2005
  children: [
1974
- /* @__PURE__ */ b(
2006
+ /* @__PURE__ */ y(
1975
2007
  "div",
1976
2008
  {
1977
2009
  style: {
@@ -1979,19 +2011,19 @@ function hn(e) {
1979
2011
  width: "100%",
1980
2012
  position: "relative"
1981
2013
  },
1982
- children: d.getVirtualItems().map((f) => /* @__PURE__ */ b(
2014
+ children: d.getVirtualItems().map((f) => /* @__PURE__ */ y(
1983
2015
  "li",
1984
2016
  {
1985
2017
  style: {
1986
2018
  height: `${f.size}px`,
1987
2019
  transform: `translateY(${f.start}px)`
1988
2020
  },
1989
- className: k(
2021
+ className: M(
1990
2022
  "absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
1991
- m.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
2023
+ h.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
1992
2024
  ),
1993
2025
  onClick: () => {
1994
- t ? m.includes(u[f.index].key) ? i(
2026
+ t ? h.includes(u[f.index].key) ? i(
1995
2027
  structuredClone(
1996
2028
  n.filter(
1997
2029
  (g) => g.key !== u[f.index].key
@@ -2008,23 +2040,23 @@ function hn(e) {
2008
2040
  l.length > 0 && u.length === 0 && (s ? /* @__PURE__ */ W(
2009
2041
  "li",
2010
2042
  {
2011
- className: k("px-3 py-2 text-sm text-foreground"),
2043
+ className: M("px-3 py-2 text-sm text-foreground"),
2012
2044
  onClick: () => {
2013
- r({ text: l, key: l }), c("");
2045
+ r({ text: l, key: l }), a("");
2014
2046
  },
2015
2047
  children: [
2016
2048
  "Add ",
2017
2049
  l
2018
2050
  ]
2019
2051
  }
2020
- ) : /* @__PURE__ */ b("li", { className: k("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2052
+ ) : /* @__PURE__ */ y("li", { className: M("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2021
2053
  ]
2022
2054
  }
2023
2055
  )
2024
2056
  ] });
2025
2057
  }
2026
- function xn(e) {
2027
- return /* @__PURE__ */ b(
2058
+ function bn(e) {
2059
+ return /* @__PURE__ */ y(
2028
2060
  "svg",
2029
2061
  {
2030
2062
  xmlns: "http://www.w3.org/2000/svg",
@@ -2034,19 +2066,19 @@ function xn(e) {
2034
2066
  stroke: "currentColor",
2035
2067
  className: "h-6 w-6",
2036
2068
  ...e,
2037
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2069
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2038
2070
  }
2039
2071
  );
2040
2072
  }
2041
2073
  function yn(e) {
2042
2074
  const { className: o, ...t } = e;
2043
- return /* @__PURE__ */ b(
2075
+ return /* @__PURE__ */ y(
2044
2076
  "input",
2045
2077
  {
2046
- className: k(
2078
+ className: M(
2047
2079
  "h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
2048
- "focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
2049
- "read-only:cursor-pointer read-only:!border-none read-only:bg-transparent read-only:text-foreground read-only:!shadow-none read-only:!outline-none",
2080
+ "focus-visible:border-primary focus-visible:shadow-xs focus-visible:shadow-ring focus-visible:outline-hidden",
2081
+ "read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:text-foreground read-only:shadow-none! read-only:outline-hidden!",
2050
2082
  "disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted",
2051
2083
  "file:border-0 file:bg-transparent file:text-sm file:font-medium",
2052
2084
  o
@@ -2055,12 +2087,12 @@ function yn(e) {
2055
2087
  }
2056
2088
  );
2057
2089
  }
2058
- function bn(e) {
2090
+ function vn(e) {
2059
2091
  const { className: o, checked: t, onChange: n, defaultChecked: i, ...s } = e;
2060
2092
  return /* @__PURE__ */ W(
2061
2093
  "div",
2062
2094
  {
2063
- className: k(
2095
+ className: M(
2064
2096
  "rounded-full",
2065
2097
  "h-5 w-10",
2066
2098
  "border border-muted bg-secondary",
@@ -2069,11 +2101,11 @@ function bn(e) {
2069
2101
  ),
2070
2102
  onClick: () => n == null ? void 0 : n(!t),
2071
2103
  children: [
2072
- /* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
2073
- /* @__PURE__ */ b(
2104
+ /* @__PURE__ */ y("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
2105
+ /* @__PURE__ */ y(
2074
2106
  "div",
2075
2107
  {
2076
- className: k(
2108
+ className: M(
2077
2109
  "[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
2078
2110
  t ? "translate-x-5" : "translate-x-1"
2079
2111
  )
@@ -2083,17 +2115,35 @@ function bn(e) {
2083
2115
  }
2084
2116
  );
2085
2117
  }
2118
+ function En(e) {
2119
+ const { className: o, ...t } = e;
2120
+ return /* @__PURE__ */ y(
2121
+ "textarea",
2122
+ {
2123
+ className: M(
2124
+ "border-input bg-background text-foreground h-10 w-full rounded border-2 px-3 py-2 text-sm transition",
2125
+ "focus-visible:border-primary focus-visible:shadow-ring focus-visible:shadow-xs focus-visible:outline-hidden",
2126
+ "read-only:text-foreground read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:shadow-none! read-only:outline-hidden!",
2127
+ "disabled:bg-muted disabled:text-muted disabled:cursor-not-allowed",
2128
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
2129
+ o
2130
+ ),
2131
+ ...t
2132
+ }
2133
+ );
2134
+ }
2086
2135
  export {
2087
- We as Badge,
2088
- lt as Button,
2089
- xn as ChevronDown,
2090
- un as ChevronUp,
2091
- Xt as Collapse,
2136
+ Be as Badge,
2137
+ at as Button,
2138
+ bn as ChevronDown,
2139
+ fn as ChevronUp,
2140
+ Gt as Collapse,
2092
2141
  wn as Dropdown,
2093
2142
  yn as Input,
2094
- Qe as Popover,
2095
- fn as Search,
2096
- bn as Toggle,
2097
- Ve as cva,
2098
- k as cx
2143
+ tt as Popover,
2144
+ dn as Search,
2145
+ En as TextArea,
2146
+ vn as Toggle,
2147
+ We as cva,
2148
+ M as cx
2099
2149
  };