@inkorange/space-ui 1.11.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { forwardRef as ae, createElement as rt, isValidElement as Re, cloneElement as Ye, useId as se, useMemo as _e, Children as _t, useRef as P, useState as Q, useCallback as pe, useLayoutEffect as ye, useEffect as te, createContext as Ee, useContext as Ie } from "react";
3
- import { jsx as n, jsxs as R, Fragment as he } from "react/jsx-runtime";
2
+ import { forwardRef as ae, createElement as rt, isValidElement as Re, cloneElement as Ye, useId as se, useMemo as _e, Children as _t, useRef as P, useState as Q, useCallback as pe, useLayoutEffect as ye, useEffect as te, createContext as Ee, useContext as De } from "react";
3
+ import { jsx as n, jsxs as E, Fragment as he } from "react/jsx-runtime";
4
4
  const He = {
5
5
  0: "0",
6
6
  1: "var(--spacing-xs)",
@@ -10,7 +10,7 @@ const He = {
10
10
  5: "var(--spacing-lg)",
11
11
  6: "var(--spacing-xl)"
12
12
  };
13
- function ve({ m: e, mt: t, mb: o, p: r, pb: a }, l) {
13
+ function Ce({ m: e, mt: t, mb: o, p: r, pb: a }, l) {
14
14
  const s = {
15
15
  ...e !== void 0 && { margin: He[e] },
16
16
  ...t !== void 0 && { marginTop: He[t] },
@@ -21,7 +21,7 @@ function ve({ m: e, mt: t, mb: o, p: r, pb: a }, l) {
21
21
  };
22
22
  return Object.keys(s).length > 0 ? s : void 0;
23
23
  }
24
- function E(...e) {
24
+ function H(...e) {
25
25
  return e.filter(Boolean).join(" ");
26
26
  }
27
27
  const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At = "_size3_rzzow_16", Ot = "_size4_rzzow_21", Bt = "_size5_rzzow_27", Zt = "_size6_rzzow_33", Vt = "_medium_rzzow_39", Wt = "_bold_rzzow_43", Pt = "_colorMuted_rzzow_47", Ft = "_colorDanger_rzzow_51", jt = "_colorSuccess_rzzow_55", Gt = "_colorWarning_rzzow_59", Pe = {
@@ -38,22 +38,22 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
38
38
  colorDanger: Ft,
39
39
  colorSuccess: jt,
40
40
  colorWarning: Gt
41
- }, Ut = ae(function({ as: t = "span", size: o, weight: r, color: a, className: l, style: s, m: c, mt: h, mb: m, p: d, pb: C, ...$ }, y) {
41
+ }, Ut = ae(function({ as: t = "span", size: o, weight: r, color: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
42
42
  return rt(t, {
43
- ...$,
44
- ref: y,
45
- className: E(
43
+ ...x,
44
+ ref: M,
45
+ className: H(
46
46
  Pe.text,
47
47
  o && Pe[`size${o}`],
48
48
  r && Pe[r],
49
49
  a && Pe[`color${a[0].toUpperCase()}${a.slice(1)}`],
50
50
  l
51
51
  ),
52
- style: ve({ m: c, mt: h, mb: m, p: d, pb: C }, s)
52
+ style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
53
53
  });
54
- }), Kt = "_heading_15fm0_1", Xt = "_size4_15fm0_7", Yt = "_size5_15fm0_13", Qt = "_size6_15fm0_19", Jt = "_size7_15fm0_25", en = "_size8_15fm0_31", tn = "_size9_15fm0_37", nn = "_colorMuted_15fm0_43", on = "_colorDanger_15fm0_47", rn = "_alignCenter_15fm0_51", Se = {
55
- heading: Kt,
56
- size4: Xt,
54
+ }), Xt = "_heading_15fm0_1", Kt = "_size4_15fm0_7", Yt = "_size5_15fm0_13", Qt = "_size6_15fm0_19", Jt = "_size7_15fm0_25", en = "_size8_15fm0_31", tn = "_size9_15fm0_37", nn = "_colorMuted_15fm0_43", on = "_colorDanger_15fm0_47", rn = "_alignCenter_15fm0_51", Se = {
55
+ heading: Xt,
56
+ size4: Kt,
57
57
  size5: Yt,
58
58
  size6: Qt,
59
59
  size7: Jt,
@@ -62,11 +62,11 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
62
62
  colorMuted: nn,
63
63
  colorDanger: on,
64
64
  alignCenter: rn
65
- }, sn = ae(function({ as: t = "h2", size: o, color: r, align: a, className: l, style: s, m: c, mt: h, mb: m, p: d, pb: C, ...$ }, y) {
65
+ }, sn = ae(function({ as: t = "h2", size: o, color: r, align: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
66
66
  return rt(t, {
67
- ...$,
68
- ref: y,
69
- className: E(
67
+ ...x,
68
+ ref: M,
69
+ className: H(
70
70
  Se.heading,
71
71
  o && Se[`size${o}`],
72
72
  r === "muted" && Se.colorMuted,
@@ -74,25 +74,25 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
74
74
  a === "center" && Se.alignCenter,
75
75
  l
76
76
  ),
77
- style: ve({ m: c, mt: h, mb: m, p: d, pb: C }, s)
77
+ style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
78
78
  });
79
79
  }), an = "_link_1o4sa_1", ln = "_size1_1o4sa_10", cn = "_size2_1o4sa_16", dn = "_size3_1o4sa_21", lt = {
80
80
  link: an,
81
81
  size1: ln,
82
82
  size2: cn,
83
83
  size3: dn
84
- }, ll = ae(function({ asChild: t, size: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, children: d, ...C }, $) {
85
- const y = E(lt.link, o && lt[`size${o}`], r), u = ve({ m: l, mt: s, mb: c, p: h, pb: m }, a);
86
- if (t && Re(d)) {
87
- const b = d;
88
- return Ye(b, {
84
+ }, ll = ae(function({ asChild: t, size: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, children: u, ...C }, x) {
85
+ const M = H(lt.link, o && lt[`size${o}`], r), _ = Ce({ m: l, mt: s, mb: c, p: h, pb: m }, a);
86
+ if (t && Re(u)) {
87
+ const y = u;
88
+ return Ye(y, {
89
89
  ...C,
90
- className: E(y, b.props.className),
91
- style: { ...u, ...b.props.style }
90
+ className: H(M, y.props.className),
91
+ style: { ..._, ...y.props.style }
92
92
  });
93
93
  }
94
- return /* @__PURE__ */ n("a", { ...C, ref: $, className: y, style: u, children: d });
95
- }), un = "_flex_v4ziu_1", fn = "_gap1_v4ziu_5", pn = "_gap2_v4ziu_9", _n = "_gap3_v4ziu_13", hn = "_gap4_v4ziu_17", mn = "_gap5_v4ziu_21", gn = "_gap6_v4ziu_25", Cn = "_directionRow_v4ziu_29", vn = "_directionColumn_v4ziu_33", bn = "_alignStart_v4ziu_37", wn = "_alignCenter_v4ziu_41", $n = "_alignEnd_v4ziu_45", yn = "_alignBaseline_v4ziu_49", xn = "_alignStretch_v4ziu_53", Nn = "_justifyStart_v4ziu_57", Mn = "_justifyCenter_v4ziu_61", Ln = "_justifyEnd_v4ziu_65", kn = "_justifyBetween_v4ziu_69", zn = "_wrapWrap_v4ziu_73", Rn = "_wrapNowrap_v4ziu_77", xe = {
94
+ return /* @__PURE__ */ n("a", { ...C, ref: x, className: M, style: _, children: u });
95
+ }), un = "_flex_v4ziu_1", fn = "_gap1_v4ziu_5", pn = "_gap2_v4ziu_9", _n = "_gap3_v4ziu_13", hn = "_gap4_v4ziu_17", mn = "_gap5_v4ziu_21", gn = "_gap6_v4ziu_25", vn = "_directionRow_v4ziu_29", Cn = "_directionColumn_v4ziu_33", bn = "_alignStart_v4ziu_37", wn = "_alignCenter_v4ziu_41", $n = "_alignEnd_v4ziu_45", yn = "_alignBaseline_v4ziu_49", xn = "_alignStretch_v4ziu_53", Nn = "_justifyStart_v4ziu_57", Mn = "_justifyCenter_v4ziu_61", Ln = "_justifyEnd_v4ziu_65", kn = "_justifyBetween_v4ziu_69", zn = "_wrapWrap_v4ziu_73", Rn = "_wrapNowrap_v4ziu_77", xe = {
96
96
  flex: un,
97
97
  gap1: fn,
98
98
  gap2: pn,
@@ -100,8 +100,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
100
100
  gap4: hn,
101
101
  gap5: mn,
102
102
  gap6: gn,
103
- directionRow: Cn,
104
- directionColumn: vn,
103
+ directionRow: vn,
104
+ directionColumn: Cn,
105
105
  alignStart: bn,
106
106
  alignCenter: wn,
107
107
  alignEnd: $n,
@@ -113,8 +113,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
113
113
  justifyBetween: kn,
114
114
  wrapWrap: zn,
115
115
  wrapNowrap: Rn
116
- }, Fe = (e) => e[0].toUpperCase() + e.slice(1), cl = ae(function({ asChild: t, gap: o, direction: r, align: a, justify: l, wrap: s, className: c, style: h, m, mt: d, mb: C, p: $, pb: y, children: u, ...b }, g) {
117
- const N = E(
116
+ }, Fe = (e) => e[0].toUpperCase() + e.slice(1), cl = ae(function({ asChild: t, gap: o, direction: r, align: a, justify: l, wrap: s, className: c, style: h, m, mt: u, mb: C, p: x, pb: M, children: _, ...y }, g) {
117
+ const L = H(
118
118
  xe.flex,
119
119
  o && xe[`gap${o}`],
120
120
  r && xe[`direction${Fe(r)}`],
@@ -122,22 +122,22 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
122
122
  l && xe[`justify${Fe(l)}`],
123
123
  s && xe[`wrap${Fe(s)}`],
124
124
  c
125
- ), I = ve({ m, mt: d, mb: C, p: $, pb: y }, h);
126
- if (t && Re(u)) {
127
- const T = u;
128
- return Ye(T, {
129
- ...b,
130
- className: E(N, T.props.className),
131
- style: { ...I, ...T.props.style }
125
+ ), T = Ce({ m, mt: u, mb: C, p: x, pb: M }, h);
126
+ if (t && Re(_)) {
127
+ const q = _;
128
+ return Ye(q, {
129
+ ...y,
130
+ className: H(L, q.props.className),
131
+ style: { ...T, ...q.props.style }
132
132
  });
133
133
  }
134
- return /* @__PURE__ */ n("div", { ...b, ref: g, className: N, style: I, children: u });
134
+ return /* @__PURE__ */ n("div", { ...y, ref: g, className: L, style: T, children: _ });
135
135
  }), il = ae(function({ style: t, m: o, mt: r, mb: a, p: l, pb: s, ...c }, h) {
136
- return /* @__PURE__ */ n("div", { ...c, ref: h, style: ve({ m: o, mt: r, mb: a, p: l, pb: s }, t) });
137
- }), En = "_grid_erpqq_1", In = "_cols1_erpqq_5", Dn = "_cols2_erpqq_9", Hn = "_cols3_erpqq_13", Sn = "_smCols2_erpqq_18", Tn = "_smCols3_erpqq_21", qn = "_mdCols2_erpqq_26", An = "_mdCols3_erpqq_29", On = "_gap1_erpqq_33", Bn = "_gap2_erpqq_37", Zn = "_gap3_erpqq_41", Vn = "_gap4_erpqq_45", Wn = "_gap5_erpqq_49", Pn = "_gap6_erpqq_53", Ne = {
136
+ return /* @__PURE__ */ n("div", { ...c, ref: h, style: Ce({ m: o, mt: r, mb: a, p: l, pb: s }, t) });
137
+ }), En = "_grid_erpqq_1", Dn = "_cols1_erpqq_5", In = "_cols2_erpqq_9", Hn = "_cols3_erpqq_13", Sn = "_smCols2_erpqq_18", Tn = "_smCols3_erpqq_21", qn = "_mdCols2_erpqq_26", An = "_mdCols3_erpqq_29", On = "_gap1_erpqq_33", Bn = "_gap2_erpqq_37", Zn = "_gap3_erpqq_41", Vn = "_gap4_erpqq_45", Wn = "_gap5_erpqq_49", Pn = "_gap6_erpqq_53", Ne = {
138
138
  grid: En,
139
- cols1: In,
140
- cols2: Dn,
139
+ cols1: Dn,
140
+ cols2: In,
141
141
  cols3: Hn,
142
142
  smCols2: Sn,
143
143
  smCols3: Tn,
@@ -149,8 +149,8 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
149
149
  gap4: Vn,
150
150
  gap5: Wn,
151
151
  gap6: Pn
152
- }, dl = ae(function({ columns: t, gap: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, ...d }, C) {
153
- const $ = typeof t == "string" ? [Ne[`cols${t}`]] : t ? [
152
+ }, dl = ae(function({ columns: t, gap: o, className: r, style: a, m: l, mt: s, mb: c, p: h, pb: m, ...u }, C) {
153
+ const x = typeof t == "string" ? [Ne[`cols${t}`]] : t ? [
154
154
  t.initial && Ne[`cols${t.initial}`],
155
155
  t.sm && Ne[`smCols${t.sm}`],
156
156
  t.md && Ne[`mdCols${t.md}`]
@@ -158,19 +158,19 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
158
158
  return /* @__PURE__ */ n(
159
159
  "div",
160
160
  {
161
- ...d,
161
+ ...u,
162
162
  ref: C,
163
- className: E(Ne.grid, ...$, o && Ne[`gap${o}`], r),
164
- style: ve({ m: l, mt: s, mb: c, p: h, pb: m }, a)
163
+ className: H(Ne.grid, ...x, o && Ne[`gap${o}`], r),
164
+ style: Ce({ m: l, mt: s, mb: c, p: h, pb: m }, a)
165
165
  }
166
166
  );
167
- }), Fn = "_badge_3q9da_2", jn = "_size1_3q9da_10", Gn = "_size2_3q9da_17", Un = "_colorMuted_3q9da_24", Kn = "_colorPrimary_3q9da_29", Xn = "_colorSuccess_3q9da_34", Yn = "_colorDanger_3q9da_39", Qn = "_colorWarning_3q9da_44", Jn = "_colorCyan_3q9da_49", eo = "_colorPurple_3q9da_54", to = "_colorOrange_3q9da_59", no = "_colorAccent_3q9da_64", oo = "_colorYellow_3q9da_69", ro = "_solid_3q9da_77", so = "_wrap_3q9da_85", Te = {
167
+ }), Fn = "_badge_3q9da_2", jn = "_size1_3q9da_10", Gn = "_size2_3q9da_17", Un = "_colorMuted_3q9da_24", Xn = "_colorPrimary_3q9da_29", Kn = "_colorSuccess_3q9da_34", Yn = "_colorDanger_3q9da_39", Qn = "_colorWarning_3q9da_44", Jn = "_colorCyan_3q9da_49", eo = "_colorPurple_3q9da_54", to = "_colorOrange_3q9da_59", no = "_colorAccent_3q9da_64", oo = "_colorYellow_3q9da_69", ro = "_solid_3q9da_77", so = "_wrap_3q9da_85", Te = {
168
168
  badge: Fn,
169
169
  size1: jn,
170
170
  size2: Gn,
171
171
  colorMuted: Un,
172
- colorPrimary: Kn,
173
- colorSuccess: Xn,
172
+ colorPrimary: Xn,
173
+ colorSuccess: Kn,
174
174
  colorDanger: Yn,
175
175
  colorWarning: Qn,
176
176
  colorCyan: Jn,
@@ -180,13 +180,13 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
180
180
  colorYellow: oo,
181
181
  solid: ro,
182
182
  wrap: so
183
- }, ao = (e) => e[0].toUpperCase() + e.slice(1), ul = ae(function({ color: t = "primary", variant: o = "soft", size: r = "1", wrap: a, className: l, style: s, m: c, mt: h, mb: m, p: d, pb: C, ...$ }, y) {
183
+ }, ao = (e) => e[0].toUpperCase() + e.slice(1), ul = ae(function({ color: t = "primary", variant: o = "soft", size: r = "1", wrap: a, className: l, style: s, m: c, mt: h, mb: m, p: u, pb: C, ...x }, M) {
184
184
  return /* @__PURE__ */ n(
185
185
  "span",
186
186
  {
187
- ...$,
188
- ref: y,
189
- className: E(
187
+ ...x,
188
+ ref: M,
189
+ className: H(
190
190
  Te.badge,
191
191
  Te[`color${ao(t)}`],
192
192
  o === "solid" && Te.solid,
@@ -194,7 +194,7 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
194
194
  a && Te.wrap,
195
195
  l
196
196
  ),
197
- style: ve({ m: c, mt: h, mb: m, p: d, pb: C }, s)
197
+ style: Ce({ m: c, mt: h, mb: m, p: u, pb: C }, s)
198
198
  }
199
199
  );
200
200
  }), lo = "_separator_vao01_1", co = "_full_vao01_7", ct = {
@@ -207,35 +207,35 @@ const St = "_text_rzzow_1", Tt = "_size1_rzzow_5", qt = "_size2_rzzow_11", At =
207
207
  ...r,
208
208
  ref: a,
209
209
  role: "separator",
210
- className: E(ct.separator, t === "4" && ct.full, o)
210
+ className: H(ct.separator, t === "4" && ct.full, o)
211
211
  }
212
212
  );
213
213
  }), io = "_card_4k34c_2", uo = "_image_4k34c_14", fo = "_hasImage_4k34c_41", et = {
214
214
  card: io,
215
215
  image: uo,
216
216
  hasImage: fo
217
- }, pl = ae(function({ className: t, style: o, image: r, children: a, m: l, mt: s, mb: c, p: h, pb: m, ...d }, C) {
218
- return /* @__PURE__ */ R(
217
+ }, pl = ae(function({ className: t, style: o, image: r, children: a, m: l, mt: s, mb: c, p: h, pb: m, ...u }, C) {
218
+ return /* @__PURE__ */ E(
219
219
  "div",
220
220
  {
221
- ...d,
221
+ ...u,
222
222
  ref: C,
223
- className: E(et.card, r != null && et.hasImage, t),
224
- style: ve({ m: l, mt: s, mb: c, p: h, pb: m }, o),
223
+ className: H(et.card, r != null && et.hasImage, t),
224
+ style: Ce({ m: l, mt: s, mb: c, p: h, pb: m }, o),
225
225
  children: [
226
226
  r != null && /* @__PURE__ */ n("div", { className: et.image, children: r }),
227
227
  a
228
228
  ]
229
229
  }
230
230
  );
231
- }), po = "_spaceButton_1ewbr_14", _o = "_rimRotate_1ewbr_1", ho = "_glintSweep_1ewbr_1", mo = "_iconOnly_1ewbr_105", go = "_lg_1ewbr_113", Co = "_sm_1ewbr_120", vo = "_micro_1ewbr_133", bo = "_stars_1ewbr_150", wo = "_fullWidth_1ewbr_155", $o = "_ember_1ewbr_161", yo = "_label_1ewbr_171", xo = "_star_1ewbr_150", No = "_twinkle_1ewbr_1", ge = {
231
+ }), po = "_spaceButton_1ewbr_14", _o = "_rimRotate_1ewbr_1", ho = "_glintSweep_1ewbr_1", mo = "_iconOnly_1ewbr_105", go = "_lg_1ewbr_113", vo = "_sm_1ewbr_120", Co = "_micro_1ewbr_133", bo = "_stars_1ewbr_150", wo = "_fullWidth_1ewbr_155", $o = "_ember_1ewbr_161", yo = "_label_1ewbr_171", xo = "_star_1ewbr_150", No = "_twinkle_1ewbr_1", ge = {
232
232
  spaceButton: po,
233
233
  rimRotate: _o,
234
234
  glintSweep: ho,
235
235
  iconOnly: mo,
236
236
  lg: go,
237
- sm: Co,
238
- micro: vo,
237
+ sm: vo,
238
+ micro: Co,
239
239
  stars: bo,
240
240
  fullWidth: wo,
241
241
  ember: $o,
@@ -256,17 +256,17 @@ function Lo(e) {
256
256
  t ^= e.charCodeAt(o), t = Math.imul(t, 16777619);
257
257
  return t >>> 0;
258
258
  }
259
- const Ke = ae(
259
+ const Xe = ae(
260
260
  function({ iconOnly: t, ember: o, size: r = "md", fullWidth: a, animated: l = !0, className: s, children: c, ...h }, m) {
261
- const d = se(), C = _e(() => {
262
- const y = Mo(Lo(d));
261
+ const u = se(), C = _e(() => {
262
+ const M = Mo(Lo(u));
263
263
  return Array.from({ length: 3 }, () => ({
264
- top: `${12 + y() * 58}%`,
265
- left: `${8 + y() * 80}%`,
266
- animationDelay: `${(y() * 3.2).toFixed(2)}s`,
267
- animationDuration: `${(2.8 + y() * 1.8).toFixed(2)}s`
264
+ top: `${12 + M() * 58}%`,
265
+ left: `${8 + M() * 80}%`,
266
+ animationDelay: `${(M() * 3.2).toFixed(2)}s`,
267
+ animationDuration: `${(2.8 + M() * 1.8).toFixed(2)}s`
268
268
  }));
269
- }, [d]), $ = [
269
+ }, [u]), x = [
270
270
  ge.spaceButton,
271
271
  t ? ge.iconOnly : "",
272
272
  o ? ge.ember : "",
@@ -274,15 +274,15 @@ const Ke = ae(
274
274
  a ? ge.fullWidth : "",
275
275
  s ?? ""
276
276
  ].filter(Boolean).join(" ");
277
- return /* @__PURE__ */ R(
277
+ return /* @__PURE__ */ E(
278
278
  "button",
279
279
  {
280
280
  ref: m,
281
- className: $,
281
+ className: x,
282
282
  "data-animated": l ? void 0 : "false",
283
283
  ...h,
284
284
  children: [
285
- r !== "micro" && /* @__PURE__ */ n("span", { className: ge.stars, "aria-hidden": !0, children: C.map((y, u) => /* @__PURE__ */ n("i", { className: ge.star, style: y }, u)) }),
285
+ r !== "micro" && /* @__PURE__ */ n("span", { className: ge.stars, "aria-hidden": !0, children: C.map((M, _) => /* @__PURE__ */ n("i", { className: ge.star, style: M }, _)) }),
286
286
  /* @__PURE__ */ n("span", { className: ge.label, children: c })
287
287
  ]
288
288
  }
@@ -340,7 +340,7 @@ function gl(e) {
340
340
  }
341
341
  ) });
342
342
  }
343
- function Cl(e) {
343
+ function vl(e) {
344
344
  return /* @__PURE__ */ n("svg", { ...J, ...e, children: /* @__PURE__ */ n(
345
345
  "path",
346
346
  {
@@ -351,7 +351,7 @@ function Cl(e) {
351
351
  }
352
352
  ) });
353
353
  }
354
- function vl(e) {
354
+ function Cl(e) {
355
355
  return /* @__PURE__ */ n("svg", { ...J, ...e, children: /* @__PURE__ */ n(
356
356
  "path",
357
357
  {
@@ -547,9 +547,9 @@ function Eo(e) {
547
547
  }
548
548
  ) });
549
549
  }
550
- const Io = "_root_tv9ho_12", Do = "_viewport_tv9ho_17", Ho = "_track_tv9ho_21", So = "_slide_tv9ho_66", To = "_arrow_tv9ho_78", qo = "_prev_tv9ho_99", Ao = "_next_tv9ho_104", Oo = "_arrowButton_tv9ho_109", Bo = "_dots_tv9ho_115", Zo = "_dot_tv9ho_115", le = {
551
- root: Io,
552
- viewport: Do,
550
+ const Do = "_root_tv9ho_12", Io = "_viewport_tv9ho_17", Ho = "_track_tv9ho_21", So = "_slide_tv9ho_66", To = "_arrow_tv9ho_78", qo = "_prev_tv9ho_99", Ao = "_next_tv9ho_104", Oo = "_arrowButton_tv9ho_109", Bo = "_dots_tv9ho_115", Zo = "_dot_tv9ho_115", le = {
551
+ root: Do,
552
+ viewport: Io,
553
553
  track: Ho,
554
554
  slide: So,
555
555
  arrow: To,
@@ -569,167 +569,167 @@ function El({
569
569
  "aria-label": s = "Carousel",
570
570
  ...c
571
571
  }) {
572
- const h = _t.toArray(e), m = h.length, d = se(), C = P(null), $ = o === "page" ? Math.max(1, Math.floor(t)) : 1, y = m <= t ? 1 : o === "page" ? Math.ceil((m - t) / $) + 1 : Math.ceil(m - t) + 1, [u, b] = Q($), [g, N] = Q(Math.max(1, y)), [I, T] = Q(0), [X, G] = Q(!0), [D, q] = Q(m <= t), V = P([0]), K = P(0), x = P(0), k = P(() => {
573
- }), w = pe(() => {
574
- const v = C.current;
575
- if (!v) return;
576
- const M = v.scrollLeft, W = Math.max(0, v.scrollWidth - v.clientWidth);
577
- if (Math.abs(W - K.current) > 1) {
578
- k.current();
572
+ const h = _t.toArray(e), m = h.length, u = se(), C = P(null), x = o === "page" ? Math.max(1, Math.floor(t)) : 1, M = m <= t ? 1 : o === "page" ? Math.ceil((m - t) / x) + 1 : Math.ceil(m - t) + 1, [_, y] = Q(x), [g, L] = Q(Math.max(1, M)), [T, q] = Q(0), [X, U] = Q(!0), [D, A] = Q(m <= t), F = P([0]), K = P(0), k = P(0), z = P(() => {
573
+ }), B = pe(() => {
574
+ const b = C.current;
575
+ if (!b) return;
576
+ const R = b.scrollLeft, w = Math.max(0, b.scrollWidth - b.clientWidth);
577
+ if (Math.abs(w - K.current) > 1) {
578
+ z.current();
579
579
  return;
580
580
  }
581
- const F = M <= 1, U = M >= x.current - 1;
582
- let _ = 0;
583
- U ? _ = V.current.length - 1 : F || V.current.forEach((L, f) => {
584
- Math.abs(L - M) <= Math.abs(V.current[_] - M) && (_ = f);
585
- }), T(_), G(F), q(U);
586
- }, []), H = pe(() => {
587
- const v = C.current;
588
- if (!v) return;
589
- const M = Array.from(v.children);
590
- if (!M.length) return;
591
- const W = Math.max(0, v.scrollWidth - v.clientWidth), F = M[0], U = M.length > 1 ? M[1].offsetLeft - F.offsetLeft - F.offsetWidth : 0, _ = (v.clientWidth + U) / (F.offsetWidth + U), L = o === "page" ? Math.max(1, Math.floor(_ + 0.01)) : 1, f = M[M.length - 1], p = Math.round(
592
- Math.max(0, Math.min(W, f.offsetLeft - F.offsetLeft + f.offsetWidth - v.clientWidth))
581
+ const v = R <= 1, N = R >= k.current - 1;
582
+ let d = 0;
583
+ N ? d = F.current.length - 1 : v || F.current.forEach(($, i) => {
584
+ Math.abs($ - R) <= Math.abs(F.current[d] - R) && (d = i);
585
+ }), q(d), U(v), A(N);
586
+ }, []), j = pe(() => {
587
+ const b = C.current;
588
+ if (!b) return;
589
+ const R = Array.from(b.children);
590
+ if (!R.length) return;
591
+ const w = Math.max(0, b.scrollWidth - b.clientWidth), v = R[0], N = R.length > 1 ? R[1].offsetLeft - v.offsetLeft - v.offsetWidth : 0, d = (b.clientWidth + N) / (v.offsetWidth + N), $ = o === "page" ? Math.max(1, Math.floor(d + 0.01)) : 1, i = R[R.length - 1], f = Math.round(
592
+ Math.max(0, Math.min(w, i.offsetLeft - v.offsetLeft + i.offsetWidth - b.clientWidth))
593
593
  ), S = [];
594
- M.forEach((B, Z) => {
595
- if (Z % L !== 0) return;
596
- const j = Math.round(Math.min(B.offsetLeft - F.offsetLeft, p));
597
- S[S.length - 1] !== j && S.push(j);
598
- }), p > 0 && S[S.length - 1] < p - 1 && S.push(p), V.current = S, K.current = Math.round(W), x.current = p, b(L), N(S.length), w();
599
- }, [o, w]);
594
+ R.forEach((O, V) => {
595
+ if (V % $ !== 0) return;
596
+ const G = Math.round(Math.min(O.offsetLeft - v.offsetLeft, f));
597
+ S[S.length - 1] !== G && S.push(G);
598
+ }), f > 0 && S[S.length - 1] < f - 1 && S.push(f), F.current = S, K.current = Math.round(w), k.current = f, y($), L(S.length), B();
599
+ }, [o, B]);
600
600
  ye(() => {
601
- k.current = H, H();
602
- }, [H, m]), te(() => {
603
- const v = C.current;
604
- if (!v) return;
605
- const M = new ResizeObserver(() => H());
606
- M.observe(v);
607
- const W = v.firstElementChild;
608
- W && M.observe(W);
609
- let F = 0;
610
- const U = () => {
611
- cancelAnimationFrame(F), F = requestAnimationFrame(w);
601
+ z.current = j, j();
602
+ }, [j, m]), te(() => {
603
+ const b = C.current;
604
+ if (!b) return;
605
+ const R = new ResizeObserver(() => j());
606
+ R.observe(b);
607
+ const w = b.firstElementChild;
608
+ w && R.observe(w);
609
+ let v = 0;
610
+ const N = () => {
611
+ cancelAnimationFrame(v), v = requestAnimationFrame(B);
612
612
  };
613
- return v.addEventListener("scroll", U, { passive: !0 }), () => {
614
- M.disconnect(), cancelAnimationFrame(F), v.removeEventListener("scroll", U);
613
+ return b.addEventListener("scroll", N, { passive: !0 }), () => {
614
+ R.disconnect(), cancelAnimationFrame(v), b.removeEventListener("scroll", N);
615
615
  };
616
- }, [H, w, m]), te(() => {
617
- const v = C.current;
618
- if (!v) return;
619
- const M = 4;
620
- let W = null, F = 0, U = 0, _ = !1, L = 0;
621
- const f = () => {
622
- clearTimeout(L), delete v.dataset.settling;
623
- }, p = (O) => {
624
- O.pointerType !== "mouse" || O.button !== 0 || v.scrollWidth <= v.clientWidth || (f(), W = O.pointerId, F = O.clientX, U = v.scrollLeft, _ = !1);
625
- }, S = (O) => {
626
- if (O.pointerId !== W) return;
627
- const ee = O.clientX - F;
628
- if (!_) {
629
- if (Math.abs(ee) < M) return;
630
- _ = !0, v.setPointerCapture(O.pointerId), v.dataset.dragging = "";
616
+ }, [j, B, m]), te(() => {
617
+ const b = C.current;
618
+ if (!b) return;
619
+ const R = 4;
620
+ let w = null, v = 0, N = 0, d = !1, $ = 0;
621
+ const i = () => {
622
+ clearTimeout($), delete b.dataset.settling;
623
+ }, f = (W) => {
624
+ W.pointerType !== "mouse" || W.button !== 0 || b.scrollWidth <= b.clientWidth || (i(), w = W.pointerId, v = W.clientX, N = b.scrollLeft, d = !1);
625
+ }, S = (W) => {
626
+ if (W.pointerId !== w) return;
627
+ const ee = W.clientX - v;
628
+ if (!d) {
629
+ if (Math.abs(ee) < R) return;
630
+ d = !0, b.setPointerCapture(W.pointerId), b.dataset.dragging = "";
631
631
  }
632
- v.scrollLeft = U - ee;
633
- }, B = (O) => {
634
- if (O.pointerId !== W || (W = null, !_)) return;
635
- delete v.dataset.dragging;
636
- const ee = v.scrollLeft, ne = V.current;
637
- let ie = ne.reduce((me, De) => Math.abs(De - ee) < Math.abs(me - ee) ? De : me, ne[0]);
638
- ee > U + 1 && ie <= U + 1 ? ie = ne.find((me) => me > U + 1) ?? ie : ee < U - 1 && ie >= U - 1 && (ie = [...ne].reverse().find((me) => me < U - 1) ?? ie), v.dataset.settling = "";
632
+ b.scrollLeft = N - ee;
633
+ }, O = (W) => {
634
+ if (W.pointerId !== w || (w = null, !d)) return;
635
+ delete b.dataset.dragging;
636
+ const ee = b.scrollLeft, ne = F.current;
637
+ let ie = ne.reduce((me, Ie) => Math.abs(Ie - ee) < Math.abs(me - ee) ? Ie : me, ne[0]);
638
+ ee > N + 1 && ie <= N + 1 ? ie = ne.find((me) => me > N + 1) ?? ie : ee < N - 1 && ie >= N - 1 && (ie = [...ne].reverse().find((me) => me < N - 1) ?? ie), b.dataset.settling = "";
639
639
  const Je = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
640
- v.scrollTo({ left: ie, behavior: Je ? "auto" : "smooth" }), v.addEventListener("scrollend", f, { once: !0 }), L = window.setTimeout(f, 700);
641
- }, Z = (O) => {
642
- _ && (_ = !1, O.preventDefault(), O.stopPropagation());
643
- }, j = (O) => O.preventDefault();
644
- return v.addEventListener("pointerdown", p), v.addEventListener("pointermove", S), v.addEventListener("pointerup", B), v.addEventListener("pointercancel", B), v.addEventListener("click", Z, !0), v.addEventListener("dragstart", j), () => {
645
- f(), v.removeEventListener("pointerdown", p), v.removeEventListener("pointermove", S), v.removeEventListener("pointerup", B), v.removeEventListener("pointercancel", B), v.removeEventListener("click", Z, !0), v.removeEventListener("dragstart", j);
640
+ b.scrollTo({ left: ie, behavior: Je ? "auto" : "smooth" }), b.addEventListener("scrollend", i, { once: !0 }), $ = window.setTimeout(i, 700);
641
+ }, V = (W) => {
642
+ d && (d = !1, W.preventDefault(), W.stopPropagation());
643
+ }, G = (W) => W.preventDefault();
644
+ return b.addEventListener("pointerdown", f), b.addEventListener("pointermove", S), b.addEventListener("pointerup", O), b.addEventListener("pointercancel", O), b.addEventListener("click", V, !0), b.addEventListener("dragstart", G), () => {
645
+ i(), b.removeEventListener("pointerdown", f), b.removeEventListener("pointermove", S), b.removeEventListener("pointerup", O), b.removeEventListener("pointercancel", O), b.removeEventListener("click", V, !0), b.removeEventListener("dragstart", G);
646
646
  };
647
647
  }, []);
648
- const i = (v) => {
649
- var M;
650
- return (M = C.current) == null ? void 0 : M.scrollTo({ left: v });
651
- }, z = (v) => {
652
- const M = C.current;
653
- if (!M) return;
654
- const W = M.scrollLeft, F = v > 0 ? V.current.find((U) => U > W + 1) : [...V.current].reverse().find((U) => U < W - 1);
655
- F !== void 0 && i(F);
656
- }, A = g > 1;
657
- return /* @__PURE__ */ R(
648
+ const p = (b) => {
649
+ var R;
650
+ return (R = C.current) == null ? void 0 : R.scrollTo({ left: b });
651
+ }, I = (b) => {
652
+ const R = C.current;
653
+ if (!R) return;
654
+ const w = R.scrollLeft, v = b > 0 ? F.current.find((N) => N > w + 1) : [...F.current].reverse().find((N) => N < w - 1);
655
+ v !== void 0 && p(v);
656
+ }, Z = g > 1;
657
+ return /* @__PURE__ */ E(
658
658
  "section",
659
659
  {
660
660
  ...c,
661
661
  "aria-roledescription": "carousel",
662
662
  "aria-label": s,
663
- className: E(le.root, l),
664
- "data-scrollable": A ? "" : void 0,
663
+ className: H(le.root, l),
664
+ "data-scrollable": Z ? "" : void 0,
665
665
  children: [
666
- /* @__PURE__ */ R("div", { className: le.viewport, children: [
666
+ /* @__PURE__ */ E("div", { className: le.viewport, children: [
667
667
  /* @__PURE__ */ n(
668
668
  "div",
669
669
  {
670
670
  ref: C,
671
- id: d,
671
+ id: u,
672
672
  className: le.track,
673
673
  tabIndex: 0,
674
674
  style: { "--_view-count-default": t },
675
- children: h.map((v, M) => /* @__PURE__ */ n(
675
+ children: h.map((b, R) => /* @__PURE__ */ n(
676
676
  "div",
677
677
  {
678
678
  className: le.slide,
679
679
  role: "group",
680
680
  "aria-roledescription": "slide",
681
- "aria-label": `${M + 1} of ${m}`,
682
- "data-snap": M % u === 0 ? "" : void 0,
683
- children: v
681
+ "aria-label": `${R + 1} of ${m}`,
682
+ "data-snap": R % _ === 0 ? "" : void 0,
683
+ children: b
684
684
  },
685
- v.key ?? M
685
+ b.key ?? R
686
686
  ))
687
687
  }
688
688
  ),
689
- /* @__PURE__ */ n("span", { className: E(le.arrow, le.prev), children: /* @__PURE__ */ n(
690
- Ke,
689
+ /* @__PURE__ */ n("span", { className: H(le.arrow, le.prev), children: /* @__PURE__ */ n(
690
+ Xe,
691
691
  {
692
692
  iconOnly: !0,
693
693
  className: le.arrowButton,
694
694
  animated: a,
695
695
  "aria-label": "Previous",
696
- "aria-controls": d,
696
+ "aria-controls": u,
697
697
  disabled: X,
698
- onClick: () => z(-1),
698
+ onClick: () => I(-1),
699
699
  children: /* @__PURE__ */ n(mt, { "aria-hidden": "true" })
700
700
  }
701
701
  ) }),
702
- /* @__PURE__ */ n("span", { className: E(le.arrow, le.next), children: /* @__PURE__ */ n(
703
- Ke,
702
+ /* @__PURE__ */ n("span", { className: H(le.arrow, le.next), children: /* @__PURE__ */ n(
703
+ Xe,
704
704
  {
705
705
  iconOnly: !0,
706
706
  className: le.arrowButton,
707
707
  animated: a,
708
708
  "aria-label": "Next",
709
- "aria-controls": d,
709
+ "aria-controls": u,
710
710
  disabled: D,
711
- onClick: () => z(1),
711
+ onClick: () => I(1),
712
712
  children: /* @__PURE__ */ n(ht, { "aria-hidden": "true" })
713
713
  }
714
714
  ) })
715
715
  ] }),
716
- r && A && /* @__PURE__ */ n("div", { className: le.dots, children: Array.from({ length: g }, (v, M) => /* @__PURE__ */ n(
716
+ r && Z && /* @__PURE__ */ n("div", { className: le.dots, children: Array.from({ length: g }, (b, R) => /* @__PURE__ */ n(
717
717
  "button",
718
718
  {
719
719
  type: "button",
720
720
  className: le.dot,
721
- "aria-label": o === "page" ? `Page ${M + 1} of ${g}` : `Position ${M + 1} of ${g}`,
722
- "aria-controls": d,
723
- "aria-current": M === I ? "true" : void 0,
724
- onClick: () => i(V.current[M] ?? 0)
721
+ "aria-label": o === "page" ? `Page ${R + 1} of ${g}` : `Position ${R + 1} of ${g}`,
722
+ "aria-controls": u,
723
+ "aria-current": R === T ? "true" : void 0,
724
+ onClick: () => p(F.current[R] ?? 0)
725
725
  },
726
- M
726
+ R
727
727
  )) })
728
728
  ]
729
729
  }
730
730
  );
731
731
  }
732
- const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "_current_mwel8_48", jo = "_page_mwel8_21", Go = "_gap_mwel8_82", Uo = "_stepText_mwel8_92", Ko = "_step_mwel8_92", ce = {
732
+ const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "_current_mwel8_48", jo = "_page_mwel8_21", Go = "_gap_mwel8_82", Uo = "_stepText_mwel8_92", Xo = "_step_mwel8_92", ce = {
733
733
  nav: Vo,
734
734
  pages: Wo,
735
735
  item: Po,
@@ -737,9 +737,9 @@ const Vo = "_nav_mwel8_6", Wo = "_pages_mwel8_21", Po = "_item_mwel8_30", Fo = "
737
737
  page: jo,
738
738
  gap: Go,
739
739
  stepText: Uo,
740
- step: Ko
741
- }, Xo = "_spaceControl_1e9gg_17", Yo = "_spaceSlider_1e9gg_74", Qo = "_spacePanel_1e9gg_111", Jo = "_spaceInput_1e9gg_34", er = "_spaceTextArea_1e9gg_226", tr = {
742
- spaceControl: Xo,
740
+ step: Xo
741
+ }, Ko = "_spaceControl_1e9gg_17", Yo = "_spaceSlider_1e9gg_74", Qo = "_spacePanel_1e9gg_111", Jo = "_spaceInput_1e9gg_34", er = "_spaceTextArea_1e9gg_226", tr = {
742
+ spaceControl: Ko,
743
743
  spaceSlider: Yo,
744
744
  spacePanel: Qo,
745
745
  spaceInput: Jo,
@@ -749,12 +749,12 @@ function nr({ pageSize: e, totalItems: t }) {
749
749
  return e <= 0 ? 1 : Math.max(1, Math.ceil(t / e));
750
750
  }
751
751
  function or(e, t, o = 1) {
752
- const r = (C, $) => Array.from({ length: Math.max(0, $ - C + 1) }, (y, u) => C + u), a = o * 2 + 5;
752
+ const r = (C, x) => Array.from({ length: Math.max(0, x - C + 1) }, (M, _) => C + _), a = o * 2 + 5;
753
753
  if (t <= a) return r(1, t);
754
- const l = Math.min(Math.max(e, 1), t), s = Math.max(l - o, 1), c = Math.min(l + o, t), h = s > 3, m = c < t - 2, d = o * 2 + 3;
755
- return h ? m ? [1, null, ...r(s, c), null, t] : [1, null, ...r(t - d + 1, t)] : [...r(1, d), null, t];
754
+ const l = Math.min(Math.max(e, 1), t), s = Math.max(l - o, 1), c = Math.min(l + o, t), h = s > 3, m = c < t - 2, u = o * 2 + 3;
755
+ return h ? m ? [1, null, ...r(s, c), null, t] : [1, null, ...r(t - u + 1, t)] : [...r(1, u), null, t];
756
756
  }
757
- function Il({
757
+ function Dl({
758
758
  pagination: e,
759
759
  onPageClick: t,
760
760
  siblings: o = 1,
@@ -765,15 +765,15 @@ function Il({
765
765
  }) {
766
766
  const c = nr(e);
767
767
  if (c <= 1) return null;
768
- const h = Math.min(Math.max(e.page, 1), c), m = (d) => {
769
- d !== h && d >= 1 && d <= c && t(d);
768
+ const h = Math.min(Math.max(e.page, 1), c), m = (u) => {
769
+ u !== h && u >= 1 && u <= c && t(u);
770
770
  };
771
- return /* @__PURE__ */ R("nav", { ...s, "aria-label": l, className: E(ce.nav, a), children: [
772
- /* @__PURE__ */ R(
771
+ return /* @__PURE__ */ E("nav", { ...s, "aria-label": l, className: H(ce.nav, a), children: [
772
+ /* @__PURE__ */ E(
773
773
  "button",
774
774
  {
775
775
  type: "button",
776
- className: E(ue.spaceControl, ce.item, ce.step),
776
+ className: H(ue.spaceControl, ce.item, ce.step),
777
777
  disabled: h <= 1,
778
778
  "aria-label": "Previous page",
779
779
  onClick: () => m(h - 1),
@@ -784,7 +784,7 @@ function Il({
784
784
  }
785
785
  ),
786
786
  /* @__PURE__ */ n("ol", { className: ce.pages, children: or(h, c, o).map(
787
- (d, C) => d === null ? (
787
+ (u, C) => u === null ? (
788
788
  // Presentational: "ellipsis" read aloud between page numbers tells
789
789
  // nobody anything.
790
790
  // eslint-disable-next-line react/no-array-index-key
@@ -793,25 +793,25 @@ function Il({
793
793
  "button",
794
794
  {
795
795
  type: "button",
796
- className: E(
796
+ className: H(
797
797
  ue.spaceControl,
798
798
  ce.item,
799
799
  ce.page,
800
- d === h && ce.current
800
+ u === h && ce.current
801
801
  ),
802
- "data-animated": d === h && !r ? "false" : void 0,
803
- "aria-label": `Page ${d}`,
804
- "aria-current": d === h ? "page" : void 0,
805
- onClick: () => m(d),
806
- children: d
802
+ "data-animated": u === h && !r ? "false" : void 0,
803
+ "aria-label": `Page ${u}`,
804
+ "aria-current": u === h ? "page" : void 0,
805
+ onClick: () => m(u),
806
+ children: u
807
807
  }
808
- ) }, d)
808
+ ) }, u)
809
809
  ) }),
810
- /* @__PURE__ */ R(
810
+ /* @__PURE__ */ E(
811
811
  "button",
812
812
  {
813
813
  type: "button",
814
- className: E(ue.spaceControl, ce.item, ce.step),
814
+ className: H(ue.spaceControl, ce.item, ce.step),
815
815
  disabled: h >= c,
816
816
  "aria-label": "Next page",
817
817
  onClick: () => m(h + 1),
@@ -836,16 +836,16 @@ const rr = "_wrap_dwcut_5", sr = "_sm_dwcut_30", ar = "_md_dwcut_36", lr = "_lg_
836
836
  label: ur,
837
837
  "sp-loader-reduced-pulse": "_sp-loader-reduced-pulse_dwcut_1"
838
838
  };
839
- function Dl({ size: e = "md", label: t, className: o }) {
840
- return /* @__PURE__ */ R(
839
+ function Il({ size: e = "md", label: t, className: o }) {
840
+ return /* @__PURE__ */ E(
841
841
  "div",
842
842
  {
843
- className: E(Me.wrap, Me[e], o),
843
+ className: H(Me.wrap, Me[e], o),
844
844
  role: "status",
845
845
  "aria-live": "polite",
846
846
  "aria-label": t ?? "Loading",
847
847
  children: [
848
- /* @__PURE__ */ R("span", { className: Me.orbit, children: [
848
+ /* @__PURE__ */ E("span", { className: Me.orbit, children: [
849
849
  /* @__PURE__ */ n("span", { className: Me.planet }),
850
850
  /* @__PURE__ */ n("span", { className: Me.moon })
851
851
  ] }),
@@ -894,51 +894,51 @@ function mr({ triggerRef: e, tooltipId: t, show: o, hide: r, children: a }) {
894
894
  });
895
895
  }
896
896
  function gr({ label: e, side: t = "bottom", children: o }) {
897
- const r = se(), [a, l] = Q(!1), [s, c] = Q(null), h = P(null), m = P(null), d = P(null), C = P(null), $ = () => {
898
- d.current && (clearTimeout(d.current), d.current = null), C.current && (clearTimeout(C.current), C.current = null);
899
- }, y = (b = !1) => {
900
- if ($(), b) {
897
+ const r = se(), [a, l] = Q(!1), [s, c] = Q(null), h = P(null), m = P(null), u = P(null), C = P(null), x = () => {
898
+ u.current && (clearTimeout(u.current), u.current = null), C.current && (clearTimeout(C.current), C.current = null);
899
+ }, M = (y = !1) => {
900
+ if (x(), y) {
901
901
  l(!0);
902
902
  return;
903
903
  }
904
- d.current = setTimeout(() => l(!0), _r);
905
- }, u = () => {
906
- $(), C.current = setTimeout(() => l(!1), hr);
904
+ u.current = setTimeout(() => l(!0), _r);
905
+ }, _ = () => {
906
+ x(), C.current = setTimeout(() => l(!1), hr);
907
907
  };
908
- return te(() => $, []), ye(() => {
909
- const b = m.current;
910
- if (!b) return;
908
+ return te(() => x, []), ye(() => {
909
+ const y = m.current;
910
+ if (!y) return;
911
911
  if (!a) {
912
- b.matches(":popover-open") && b.hidePopover();
912
+ y.matches(":popover-open") && y.hidePopover();
913
913
  return;
914
914
  }
915
915
  const g = h.current;
916
916
  if (!g) return;
917
- const N = () => {
918
- const I = g.getBoundingClientRect(), T = b.offsetWidth, X = b.offsetHeight, G = (w, H, i, z) => Math.min(
919
- Math.max(w + H / 2 - i / 2, qe),
920
- Math.max(z - i - qe, qe)
921
- ), D = (w, H, i, z) => ({
922
- fitsNear: w >= qe,
923
- fitsFar: H + i <= z - qe
917
+ const L = () => {
918
+ const T = g.getBoundingClientRect(), q = y.offsetWidth, X = y.offsetHeight, U = (B, j, p, I) => Math.min(
919
+ Math.max(B + j / 2 - p / 2, qe),
920
+ Math.max(I - p - qe, qe)
921
+ ), D = (B, j, p, I) => ({
922
+ fitsNear: B >= qe,
923
+ fitsFar: j + p <= I - qe
924
924
  });
925
925
  if (t === "left" || t === "right") {
926
- const w = I.right + je, H = I.left - T - je, { fitsNear: i, fitsFar: z } = D(H, w, T, window.innerWidth), A = t === "right" ? z || !i ? w : H : i || !z ? H : w;
927
- b.dataset.side = A === w ? "right" : "left", c({ top: G(I.top, I.height, X, window.innerHeight), left: A });
926
+ const B = T.right + je, j = T.left - q - je, { fitsNear: p, fitsFar: I } = D(j, B, q, window.innerWidth), Z = t === "right" ? I || !p ? B : j : p || !I ? j : B;
927
+ y.dataset.side = Z === B ? "right" : "left", c({ top: U(T.top, T.height, X, window.innerHeight), left: Z });
928
928
  return;
929
929
  }
930
- const q = I.bottom + je, V = I.top - X - je, { fitsNear: K, fitsFar: x } = D(V, q, X, window.innerHeight), k = t === "bottom" ? x || !K ? q : V : K || !x ? V : q;
931
- b.dataset.side = k === q ? "bottom" : "top", c({ top: k, left: G(I.left, I.width, T, window.innerWidth) });
930
+ const A = T.bottom + je, F = T.top - X - je, { fitsNear: K, fitsFar: k } = D(F, A, X, window.innerHeight), z = t === "bottom" ? k || !K ? A : F : K || !k ? F : A;
931
+ y.dataset.side = z === A ? "bottom" : "top", c({ top: z, left: U(T.left, T.width, q, window.innerWidth) });
932
932
  };
933
- b.matches(":popover-open") ? N() : Qe(b, N);
934
- }, [a, t, e]), !e || !Re(o) ? /* @__PURE__ */ n(he, { children: o }) : /* @__PURE__ */ R(he, { children: [
933
+ y.matches(":popover-open") ? L() : Qe(y, L);
934
+ }, [a, t, e]), !e || !Re(o) ? /* @__PURE__ */ n(he, { children: o }) : /* @__PURE__ */ E(he, { children: [
935
935
  /* @__PURE__ */ n(
936
936
  mr,
937
937
  {
938
938
  triggerRef: h,
939
939
  tooltipId: r,
940
- show: y,
941
- hide: u,
940
+ show: M,
941
+ hide: _,
942
942
  children: o
943
943
  }
944
944
  ),
@@ -951,17 +951,17 @@ function gr({ label: e, side: t = "bottom", children: o }) {
951
951
  role: "tooltip",
952
952
  className: pr.content,
953
953
  style: s ? { top: s.top, left: s.left } : void 0,
954
- onToggle: (b) => {
955
- b.nativeEvent.newState === "closed" && a && l(!1);
954
+ onToggle: (y) => {
955
+ y.nativeEvent.newState === "closed" && a && l(!1);
956
956
  },
957
957
  children: e
958
958
  }
959
959
  )
960
960
  ] });
961
961
  }
962
- const Cr = "_group_14c05_4", vr = "_segment_14c05_15", br = "_active_14c05_35", wr = "_vertical_14c05_46", Ge = {
963
- group: Cr,
964
- segment: vr,
962
+ const vr = "_group_14c05_4", Cr = "_segment_14c05_15", br = "_active_14c05_35", wr = "_vertical_14c05_46", Ge = {
963
+ group: vr,
964
+ segment: Cr,
965
965
  active: br,
966
966
  vertical: wr
967
967
  };
@@ -1000,7 +1000,7 @@ function Hl({
1000
1000
  }
1001
1001
  );
1002
1002
  }
1003
- const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30", Nr = "_sizer_10w57_8", Mr = "_triggerLabel_10w57_70", Lr = "_chevron_10w57_77", kr = "_listbox_10w57_82", zr = "_item_10w57_178", Ce = {
1003
+ const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30", Nr = "_sizer_10w57_8", Mr = "_triggerLabel_10w57_70", Lr = "_chevron_10w57_77", kr = "_listbox_10w57_82", zr = "_item_10w57_178", ve = {
1004
1004
  root: $r,
1005
1005
  trigger: yr,
1006
1006
  labelWrap: xr,
@@ -1010,21 +1010,21 @@ const $r = "_root_10w57_2", yr = "_trigger_10w57_7", xr = "_labelWrap_10w57_30",
1010
1010
  listbox: kr,
1011
1011
  item: zr
1012
1012
  }, gt = Ee(null), Rr = () => {
1013
- const e = Ie(gt);
1013
+ const e = De(gt);
1014
1014
  if (!e) throw new Error("Select.Item must be inside a Select");
1015
1015
  return e;
1016
- }, Ct = (e, t) => `${e}-${encodeURIComponent(t)}`, Ae = 4, Le = 8;
1016
+ }, vt = (e, t) => `${e}-${encodeURIComponent(t)}`, Ae = 4, Le = 8;
1017
1017
  function Er(e) {
1018
1018
  const t = [], o = (r) => {
1019
1019
  _t.forEach(r, (a) => {
1020
1020
  if (!Re(a)) return;
1021
1021
  const l = a.props;
1022
- a.type === vt && typeof l.value == "string" ? t.push({ value: l.value, label: l.children, disabled: l.disabled }) : l.children && o(l.children);
1022
+ a.type === Ct && typeof l.value == "string" ? t.push({ value: l.value, label: l.children, disabled: l.disabled }) : l.children && o(l.children);
1023
1023
  });
1024
1024
  };
1025
1025
  return o(e), t;
1026
1026
  }
1027
- function Ir({
1027
+ function Dr({
1028
1028
  value: e,
1029
1029
  onValueChange: t,
1030
1030
  disabled: o,
@@ -1034,58 +1034,58 @@ function Ir({
1034
1034
  children: s,
1035
1035
  ...c
1036
1036
  }) {
1037
- const [h, m] = Q(!1), [d, C] = Q(null), $ = se(), y = P(null), u = P(null), b = P(null), [g, N] = Q(null), [I, T] = Q(null), [X, G] = Q(null), D = _e(() => Er(s), [s]), q = _e(() => D.filter((i) => !i.disabled).map((i) => i.value), [D]), V = _e(() => D.map((i) => i.label), [D]), K = pe(
1038
- (i) => {
1039
- var z;
1040
- return ((z = D.find((A) => A.value === i)) == null ? void 0 : z.label) ?? null;
1037
+ const [h, m] = Q(!1), [u, C] = Q(null), x = se(), M = P(null), _ = P(null), y = P(null), [g, L] = Q(null), [T, q] = Q(null), [X, U] = Q(null), D = _e(() => Er(s), [s]), A = _e(() => D.filter((p) => !p.disabled).map((p) => p.value), [D]), F = _e(() => D.map((p) => p.label), [D]), K = pe(
1038
+ (p) => {
1039
+ var I;
1040
+ return ((I = D.find((Z) => Z.value === p)) == null ? void 0 : I.label) ?? null;
1041
1041
  },
1042
1042
  [D]
1043
1043
  );
1044
1044
  te(() => {
1045
1045
  if (!h) return;
1046
- const i = (z) => {
1047
- u.current && !u.current.contains(z.target) && m(!1);
1046
+ const p = (I) => {
1047
+ _.current && !_.current.contains(I.target) && m(!1);
1048
1048
  };
1049
- return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
1049
+ return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
1050
1050
  }, [h]);
1051
- const x = pe(() => {
1052
- const i = y.current, z = b.current;
1053
- if (!i || !z) return;
1054
- const A = i.getBoundingClientRect();
1055
- N(i.offsetWidth);
1056
- const v = window.innerHeight - A.bottom - Le, M = A.top - Le, W = v < Math.min(z.offsetHeight + Ae, 200) && M > v, F = Math.max(120, Math.min(380, W ? M - Ae : v - Ae));
1057
- T(F), z.dataset.side = W ? "top" : "bottom";
1058
- const U = Math.min(z.offsetHeight, F), _ = W ? Math.max(Le, A.top - Ae - U) : A.bottom + Ae, L = Math.min(
1059
- Math.max(A.left, Le),
1060
- Math.max(window.innerWidth - z.offsetWidth - Le, Le)
1051
+ const k = pe(() => {
1052
+ const p = M.current, I = y.current;
1053
+ if (!p || !I) return;
1054
+ const Z = p.getBoundingClientRect();
1055
+ L(p.offsetWidth);
1056
+ const b = window.innerHeight - Z.bottom - Le, R = Z.top - Le, w = b < Math.min(I.offsetHeight + Ae, 200) && R > b, v = Math.max(120, Math.min(380, w ? R - Ae : b - Ae));
1057
+ q(v), I.dataset.side = w ? "top" : "bottom";
1058
+ const N = Math.min(I.offsetHeight, v), d = w ? Math.max(Le, Z.top - Ae - N) : Z.bottom + Ae, $ = Math.min(
1059
+ Math.max(Z.left, Le),
1060
+ Math.max(window.innerWidth - I.offsetWidth - Le, Le)
1061
1061
  );
1062
- G((f) => f && f.top === _ && f.left === L ? f : { top: _, left: L });
1062
+ U((i) => i && i.top === d && i.left === $ ? i : { top: d, left: $ });
1063
1063
  }, []);
1064
1064
  ye(() => {
1065
- const i = b.current;
1066
- i && (h ? (Qe(i, x), x()) : i.matches(":popover-open") && i.hidePopover());
1067
- }, [h, x]), te(() => {
1065
+ const p = y.current;
1066
+ p && (h ? (Qe(p, k), k()) : p.matches(":popover-open") && p.hidePopover());
1067
+ }, [h, k]), te(() => {
1068
1068
  if (!h) return;
1069
- let i = 0, z = "";
1070
- const A = () => {
1071
- const v = y.current;
1072
- if (v) {
1073
- const M = v.getBoundingClientRect(), W = `${M.top}|${M.left}|${M.width}|${window.innerWidth}|${window.innerHeight}`;
1074
- W !== z && (z = W, x());
1069
+ let p = 0, I = "";
1070
+ const Z = () => {
1071
+ const b = M.current;
1072
+ if (b) {
1073
+ const R = b.getBoundingClientRect(), w = `${R.top}|${R.left}|${R.width}|${window.innerWidth}|${window.innerHeight}`;
1074
+ w !== I && (I = w, k());
1075
1075
  }
1076
- i = requestAnimationFrame(A);
1076
+ p = requestAnimationFrame(Z);
1077
1077
  };
1078
- return i = requestAnimationFrame(A), () => cancelAnimationFrame(i);
1079
- }, [h, x]), te(() => {
1080
- var i;
1081
- h && ((i = b.current) == null || i.focus());
1078
+ return p = requestAnimationFrame(Z), () => cancelAnimationFrame(p);
1079
+ }, [h, k]), te(() => {
1080
+ var p;
1081
+ h && ((p = y.current) == null || p.focus());
1082
1082
  }, [h]);
1083
- const k = (i) => {
1084
- C(i ?? q[0] ?? null), m(!0);
1085
- }, w = (i) => {
1086
- const z = d ? q.indexOf(d) : -1, A = Math.min(Math.max(z + i, 0), q.length - 1);
1087
- C(q[A] ?? null);
1088
- }, H = e ? K(e) : null;
1083
+ const z = (p) => {
1084
+ C(p ?? A[0] ?? null), m(!0);
1085
+ }, B = (p) => {
1086
+ const I = u ? A.indexOf(u) : -1, Z = Math.min(Math.max(I + p, 0), A.length - 1);
1087
+ C(A[Z] ?? null);
1088
+ }, j = e ? K(e) : null;
1089
1089
  return /* @__PURE__ */ n(
1090
1090
  gt.Provider,
1091
1091
  {
@@ -1095,66 +1095,66 @@ function Ir({
1095
1095
  disabled: o,
1096
1096
  open: h,
1097
1097
  setOpen: m,
1098
- highlighted: d,
1098
+ highlighted: u,
1099
1099
  setHighlighted: C,
1100
- listboxId: $,
1101
- values: q,
1100
+ listboxId: x,
1101
+ values: A,
1102
1102
  labelFor: K,
1103
- triggerRef: y
1103
+ triggerRef: M
1104
1104
  },
1105
- children: /* @__PURE__ */ R("div", { ref: u, className: Ce.root, children: [
1106
- /* @__PURE__ */ R(
1105
+ children: /* @__PURE__ */ E("div", { ref: _, className: ve.root, children: [
1106
+ /* @__PURE__ */ E(
1107
1107
  "button",
1108
1108
  {
1109
1109
  type: "button",
1110
1110
  ...c,
1111
- ref: y,
1111
+ ref: M,
1112
1112
  disabled: o,
1113
- className: E(Ce.trigger, ue.spaceControl, "spSelectTrigger", l),
1113
+ className: H(ve.trigger, ue.spaceControl, "spSelectTrigger", l),
1114
1114
  "data-animated": a ? void 0 : "false",
1115
1115
  "data-state": h ? "open" : "closed",
1116
1116
  "aria-haspopup": "listbox",
1117
1117
  "aria-expanded": h,
1118
- "aria-controls": $,
1119
- onClick: () => h ? m(!1) : k(e || null),
1120
- onKeyDown: (i) => {
1121
- (i.key === "ArrowDown" || i.key === "Enter" || i.key === " ") && (i.preventDefault(), k(e || null));
1118
+ "aria-controls": x,
1119
+ onClick: () => h ? m(!1) : z(e || null),
1120
+ onKeyDown: (p) => {
1121
+ (p.key === "ArrowDown" || p.key === "Enter" || p.key === " ") && (p.preventDefault(), z(e || null));
1122
1122
  },
1123
1123
  children: [
1124
- /* @__PURE__ */ R("span", { className: Ce.labelWrap, children: [
1125
- /* @__PURE__ */ R("span", { className: Ce.sizer, "data-sizer": "", "aria-hidden": "true", children: [
1126
- V.map((i, z) => (
1124
+ /* @__PURE__ */ E("span", { className: ve.labelWrap, children: [
1125
+ /* @__PURE__ */ E("span", { className: ve.sizer, "data-sizer": "", "aria-hidden": "true", children: [
1126
+ F.map((p, I) => (
1127
1127
  // eslint-disable-next-line react/no-array-index-key
1128
- /* @__PURE__ */ n("span", { children: i }, z)
1128
+ /* @__PURE__ */ n("span", { children: p }, I)
1129
1129
  )),
1130
1130
  r && /* @__PURE__ */ n("span", { children: r })
1131
1131
  ] }),
1132
- /* @__PURE__ */ n("span", { className: Ce.triggerLabel, children: H ?? r ?? "" })
1132
+ /* @__PURE__ */ n("span", { className: ve.triggerLabel, children: j ?? r ?? "" })
1133
1133
  ] }),
1134
- /* @__PURE__ */ n("svg", { className: Ce.chevron, width: "9", height: "9", viewBox: "0 0 9 9", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M0.5 3 L4.5 7 L8.5 3", fill: "none", stroke: "currentColor", strokeWidth: "1.2" }) })
1134
+ /* @__PURE__ */ n("svg", { className: ve.chevron, width: "9", height: "9", viewBox: "0 0 9 9", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M0.5 3 L4.5 7 L8.5 3", fill: "none", stroke: "currentColor", strokeWidth: "1.2" }) })
1135
1135
  ]
1136
1136
  }
1137
1137
  ),
1138
1138
  /* @__PURE__ */ n(
1139
1139
  "div",
1140
1140
  {
1141
- ref: b,
1142
- id: $,
1141
+ ref: y,
1142
+ id: x,
1143
1143
  role: "listbox",
1144
1144
  tabIndex: -1,
1145
1145
  popover: "manual",
1146
1146
  "data-side": "bottom",
1147
- "aria-activedescendant": d ? Ct($, d) : void 0,
1148
- className: E(Ce.listbox, ue.spacePanel),
1147
+ "aria-activedescendant": u ? vt(x, u) : void 0,
1148
+ className: H(ve.listbox, ue.spacePanel),
1149
1149
  "data-animated": a ? void 0 : "false",
1150
1150
  style: {
1151
1151
  ...g != null ? { "--_select-trigger-width": `${g}px` } : {},
1152
- ...I != null ? { maxHeight: `${I}px` } : {},
1152
+ ...T != null ? { maxHeight: `${T}px` } : {},
1153
1153
  ...X ? { top: X.top, left: X.left } : {}
1154
1154
  },
1155
- onKeyDown: (i) => {
1156
- var z, A;
1157
- i.key === "Escape" ? (i.stopPropagation(), m(!1), (z = y.current) == null || z.focus()) : i.key === "ArrowDown" ? (i.preventDefault(), w(1)) : i.key === "ArrowUp" ? (i.preventDefault(), w(-1)) : i.key === "Home" ? (i.preventDefault(), C(q[0] ?? null)) : i.key === "End" ? (i.preventDefault(), C(q[q.length - 1] ?? null)) : i.key === "Enter" || i.key === " " ? (i.preventDefault(), d && (t(d), m(!1), (A = y.current) == null || A.focus())) : i.key === "Tab" && m(!1);
1155
+ onKeyDown: (p) => {
1156
+ var I, Z;
1157
+ p.key === "Escape" ? (p.stopPropagation(), m(!1), (I = M.current) == null || I.focus()) : p.key === "ArrowDown" ? (p.preventDefault(), B(1)) : p.key === "ArrowUp" ? (p.preventDefault(), B(-1)) : p.key === "Home" ? (p.preventDefault(), C(A[0] ?? null)) : p.key === "End" ? (p.preventDefault(), C(A[A.length - 1] ?? null)) : p.key === "Enter" || p.key === " " ? (p.preventDefault(), u && (t(u), m(!1), (Z = M.current) == null || Z.focus())) : p.key === "Tab" && m(!1);
1158
1158
  },
1159
1159
  children: s
1160
1160
  }
@@ -1163,17 +1163,17 @@ function Ir({
1163
1163
  }
1164
1164
  );
1165
1165
  }
1166
- function vt({ value: e, disabled: t, children: o }) {
1166
+ function Ct({ value: e, disabled: t, children: o }) {
1167
1167
  const r = Rr(), a = r.value === e, l = r.highlighted === e;
1168
1168
  return /* @__PURE__ */ n(
1169
1169
  "div",
1170
1170
  {
1171
- id: Ct(r.listboxId, e),
1171
+ id: vt(r.listboxId, e),
1172
1172
  role: "option",
1173
1173
  "aria-selected": a,
1174
1174
  "aria-disabled": t || void 0,
1175
1175
  "data-highlighted": l ? "" : void 0,
1176
- className: E(Ce.item, "spSelectItem"),
1176
+ className: H(ve.item, "spSelectItem"),
1177
1177
  onMouseEnter: () => !t && r.setHighlighted(e),
1178
1178
  onClick: () => {
1179
1179
  var s;
@@ -1183,20 +1183,20 @@ function vt({ value: e, disabled: t, children: o }) {
1183
1183
  }
1184
1184
  );
1185
1185
  }
1186
- const Sl = Object.assign(Ir, { Item: vt }), Dr = "_root_1hali_1", Hr = "_input_1hali_7", Sr = "_slot_1hali_17", nt = {
1187
- root: Dr,
1186
+ const Sl = Object.assign(Dr, { Item: Ct }), Ir = "_root_1hali_1", Hr = "_input_1hali_7", Sr = "_slot_1hali_17", nt = {
1187
+ root: Ir,
1188
1188
  input: Hr,
1189
1189
  slot: Sr
1190
1190
  }, Tr = ae(function({ className: t, style: o, animated: r = !0, children: a, ...l }, s) {
1191
- return /* @__PURE__ */ R(
1191
+ return /* @__PURE__ */ E(
1192
1192
  "div",
1193
1193
  {
1194
- className: E(nt.root, ue.spaceInput, "spTextFieldRoot", t),
1194
+ className: H(nt.root, ue.spaceInput, "spTextFieldRoot", t),
1195
1195
  "data-animated": r ? void 0 : "false",
1196
1196
  style: o,
1197
1197
  children: [
1198
1198
  a,
1199
- /* @__PURE__ */ n("input", { ...l, ref: s, className: E(nt.input, "spTextFieldInput") })
1199
+ /* @__PURE__ */ n("input", { ...l, ref: s, className: H(nt.input, "spTextFieldInput") })
1200
1200
  ]
1201
1201
  }
1202
1202
  );
@@ -1213,13 +1213,13 @@ const it = Object.assign(Tr, { Slot: qr }), Ar = "_root_1qu6w_1", Or = "_textare
1213
1213
  return /* @__PURE__ */ n(
1214
1214
  "div",
1215
1215
  {
1216
- className: E(dt.root, ue.spaceInput, ue.spaceTextArea, "spTextFieldRoot", t),
1216
+ className: H(dt.root, ue.spaceInput, ue.spaceTextArea, "spTextFieldRoot", t),
1217
1217
  "data-animated": r ? void 0 : "false",
1218
1218
  style: o,
1219
- children: /* @__PURE__ */ n("textarea", { ...a, ref: l, className: E(dt.textarea, "spTextAreaInput") })
1219
+ children: /* @__PURE__ */ n("textarea", { ...a, ref: l, className: H(dt.textarea, "spTextAreaInput") })
1220
1220
  }
1221
1221
  );
1222
- }), Br = "_wrap_sccqq_12", Zr = "_field_sccqq_16", Vr = "_panel_sccqq_25", Wr = "_status_sccqq_91", Pr = "_list_sccqq_101", Fr = "_option_sccqq_114", jr = "_active_sccqq_126", Gr = "_label_sccqq_136", Ur = "_meta_sccqq_143", Kr = "_footer_sccqq_149", de = {
1222
+ }), Br = "_wrap_sccqq_12", Zr = "_field_sccqq_16", Vr = "_panel_sccqq_25", Wr = "_status_sccqq_91", Pr = "_list_sccqq_101", Fr = "_option_sccqq_114", jr = "_active_sccqq_126", Gr = "_label_sccqq_136", Ur = "_meta_sccqq_143", Xr = "_footer_sccqq_149", de = {
1223
1223
  wrap: Br,
1224
1224
  field: Zr,
1225
1225
  panel: Vr,
@@ -1229,7 +1229,7 @@ const it = Object.assign(Tr, { Slot: qr }), Ar = "_root_1qu6w_1", Or = "_textare
1229
1229
  active: jr,
1230
1230
  label: Gr,
1231
1231
  meta: Ur,
1232
- footer: Kr
1232
+ footer: Xr
1233
1233
  }, ut = 8, tt = 8;
1234
1234
  function ql({
1235
1235
  value: e,
@@ -1242,182 +1242,182 @@ function ql({
1242
1242
  loading: c = !1,
1243
1243
  loadingMessage: h = "Loading…",
1244
1244
  emptyMessage: m,
1245
- footer: d,
1245
+ footer: u,
1246
1246
  animated: C = !0,
1247
- className: $,
1248
- style: y,
1249
- ...u
1247
+ className: x,
1248
+ style: M,
1249
+ ..._
1250
1250
  }) {
1251
- const [b, g] = Q(!1), [N, I] = Q(0), T = P(null), X = P(null), G = P(null), D = se(), [q, V] = Q(null), K = (_) => typeof _.label == "string" ? _.label : _.search ?? _.value, x = e.trim() !== "", k = _e(() => {
1252
- if (!x) return [];
1251
+ const [y, g] = Q(!1), [L, T] = Q(0), q = P(null), X = P(null), U = P(null), D = se(), [A, F] = Q(null), K = (d) => typeof d.label == "string" ? d.label : d.search ?? d.value, k = e.trim() !== "", z = _e(() => {
1252
+ if (!k) return [];
1253
1253
  if (s) return o;
1254
- const _ = l ? e : e.toLowerCase();
1255
- return o.filter((L) => (l ? K(L) : K(L).toLowerCase()).includes(_));
1256
- }, [o, e, l, s, x]), w = _e(() => k.filter((_) => !_.disabled), [k]), H = x && (k.length > 0 || c || m != null), i = b && H;
1257
- te(() => I(0), [k]), te(() => {
1258
- var L;
1259
- if (!i) return;
1260
- const _ = (L = G.current) == null ? void 0 : L.querySelector(`[data-index="${N}"]`);
1261
- _ == null || _.scrollIntoView({ block: "nearest" });
1262
- }, [N, i]);
1263
- const z = pe(() => {
1264
- const _ = T.current, L = X.current;
1265
- if (!_ || !L) return;
1266
- const p = (_.firstElementChild ?? _).getBoundingClientRect(), S = L.offsetHeight, B = window.innerHeight - p.bottom - tt, Z = B < S && p.top - tt > B;
1267
- L.dataset.side = Z ? "top" : "bottom";
1268
- const j = Z ? Math.max(tt, p.top - ut - S) : p.bottom + ut;
1269
- V(
1270
- (O) => O && O.top === j && O.left === p.left && O.width === p.width ? O : { top: j, left: p.left, width: p.width }
1254
+ const d = l ? e : e.toLowerCase();
1255
+ return o.filter(($) => (l ? K($) : K($).toLowerCase()).includes(d));
1256
+ }, [o, e, l, s, k]), B = _e(() => z.filter((d) => !d.disabled), [z]), j = k && (z.length > 0 || c || m != null), p = y && j;
1257
+ te(() => T(0), [z]), te(() => {
1258
+ var $;
1259
+ if (!p) return;
1260
+ const d = ($ = U.current) == null ? void 0 : $.querySelector(`[data-index="${L}"]`);
1261
+ d == null || d.scrollIntoView({ block: "nearest" });
1262
+ }, [L, p]);
1263
+ const I = pe(() => {
1264
+ const d = q.current, $ = X.current;
1265
+ if (!d || !$) return;
1266
+ const f = (d.firstElementChild ?? d).getBoundingClientRect(), S = $.offsetHeight, O = window.innerHeight - f.bottom - tt, V = O < S && f.top - tt > O;
1267
+ $.dataset.side = V ? "top" : "bottom";
1268
+ const G = V ? Math.max(tt, f.top - ut - S) : f.bottom + ut;
1269
+ F(
1270
+ (W) => W && W.top === G && W.left === f.left && W.width === f.width ? W : { top: G, left: f.left, width: f.width }
1271
1271
  );
1272
1272
  }, []);
1273
1273
  ye(() => {
1274
- const _ = X.current;
1275
- _ && (i ? (Qe(_, z), z()) : _.matches(":popover-open") && _.hidePopover());
1276
- }, [i, z]), te(() => {
1277
- if (!i) return;
1278
- let _ = 0, L = "";
1279
- const f = () => {
1280
- const p = T.current, S = X.current;
1281
- if (p && S) {
1282
- const B = (p.firstElementChild ?? p).getBoundingClientRect(), Z = `${B.top}|${B.left}|${B.width}|${S.offsetHeight}|${window.innerHeight}`;
1283
- Z !== L && (L = Z, z());
1274
+ const d = X.current;
1275
+ d && (p ? (Qe(d, I), I()) : d.matches(":popover-open") && d.hidePopover());
1276
+ }, [p, I]), te(() => {
1277
+ if (!p) return;
1278
+ let d = 0, $ = "";
1279
+ const i = () => {
1280
+ const f = q.current, S = X.current;
1281
+ if (f && S) {
1282
+ const O = (f.firstElementChild ?? f).getBoundingClientRect(), V = `${O.top}|${O.left}|${O.width}|${S.offsetHeight}|${window.innerHeight}`;
1283
+ V !== $ && ($ = V, I());
1284
1284
  }
1285
- _ = requestAnimationFrame(f);
1285
+ d = requestAnimationFrame(i);
1286
1286
  };
1287
- return _ = requestAnimationFrame(f), () => cancelAnimationFrame(_);
1288
- }, [i, z]);
1289
- const A = pe(() => g(!1), []);
1287
+ return d = requestAnimationFrame(i), () => cancelAnimationFrame(d);
1288
+ }, [p, I]);
1289
+ const Z = pe(() => g(!1), []);
1290
1290
  te(() => {
1291
- if (!i) return;
1292
- const _ = (L) => {
1293
- const f = T.current;
1294
- f && L.target instanceof Node && !f.contains(L.target) && A();
1291
+ if (!p) return;
1292
+ const d = ($) => {
1293
+ const i = q.current;
1294
+ i && $.target instanceof Node && !i.contains($.target) && Z();
1295
1295
  };
1296
- return document.addEventListener("pointerdown", _), () => document.removeEventListener("pointerdown", _);
1297
- }, [i, A]);
1298
- const v = P(!1), M = (_) => {
1299
- _.disabled || (t(K(_)), r(_.value, _), v.current = !1, g(!1));
1300
- }, W = (_) => {
1301
- if (w.length === 0) return;
1302
- const L = k[N], p = ((L && !L.disabled ? w.indexOf(L) : -1) + _ + w.length) % w.length, S = w[p];
1303
- S && I(k.indexOf(S));
1304
- }, F = (_) => {
1305
- if (_.key === "Escape") {
1306
- i && _.stopPropagation(), g(!1);
1296
+ return document.addEventListener("pointerdown", d), () => document.removeEventListener("pointerdown", d);
1297
+ }, [p, Z]);
1298
+ const b = P(!1), R = (d) => {
1299
+ d.disabled || (t(K(d)), r(d.value, d), b.current = !1, g(!1));
1300
+ }, w = (d) => {
1301
+ if (B.length === 0) return;
1302
+ const $ = z[L], f = (($ && !$.disabled ? B.indexOf($) : -1) + d + B.length) % B.length, S = B[f];
1303
+ S && T(z.indexOf(S));
1304
+ }, v = (d) => {
1305
+ if (d.key === "Escape") {
1306
+ p && d.stopPropagation(), g(!1);
1307
1307
  return;
1308
1308
  }
1309
- if (_.key === "Tab") {
1309
+ if (d.key === "Tab") {
1310
1310
  g(!1);
1311
1311
  return;
1312
1312
  }
1313
- if (!i) {
1314
- _.key === "ArrowDown" && g(!0);
1313
+ if (!p) {
1314
+ d.key === "ArrowDown" && g(!0);
1315
1315
  return;
1316
1316
  }
1317
- if (_.key === "ArrowDown")
1318
- _.preventDefault(), v.current = !0, W(1);
1319
- else if (_.key === "ArrowUp")
1320
- _.preventDefault(), v.current = !0, W(-1);
1321
- else if (_.key === "Home") {
1322
- _.preventDefault(), v.current = !0;
1323
- const L = w[0];
1324
- L && I(k.indexOf(L));
1325
- } else if (_.key === "End") {
1326
- _.preventDefault(), v.current = !0;
1327
- const L = w[w.length - 1];
1328
- L && I(k.indexOf(L));
1329
- } else if (_.key === "Enter" || _.key === " " && v.current) {
1330
- const L = k[N];
1331
- L && !L.disabled && (_.preventDefault(), M(L));
1317
+ if (d.key === "ArrowDown")
1318
+ d.preventDefault(), b.current = !0, w(1);
1319
+ else if (d.key === "ArrowUp")
1320
+ d.preventDefault(), b.current = !0, w(-1);
1321
+ else if (d.key === "Home") {
1322
+ d.preventDefault(), b.current = !0;
1323
+ const $ = B[0];
1324
+ $ && T(z.indexOf($));
1325
+ } else if (d.key === "End") {
1326
+ d.preventDefault(), b.current = !0;
1327
+ const $ = B[B.length - 1];
1328
+ $ && T(z.indexOf($));
1329
+ } else if (d.key === "Enter" || d.key === " " && b.current) {
1330
+ const $ = z[L];
1331
+ $ && !$.disabled && (d.preventDefault(), R($));
1332
1332
  }
1333
- }, U = i ? k[N] : void 0;
1334
- return /* @__PURE__ */ R("div", { ref: T, className: E(de.wrap, $), style: y, children: [
1333
+ }, N = p ? z[L] : void 0;
1334
+ return /* @__PURE__ */ E("div", { ref: q, className: H(de.wrap, x), style: M, children: [
1335
1335
  /* @__PURE__ */ n(
1336
1336
  it,
1337
1337
  {
1338
- ...u,
1339
- type: u.type ?? "text",
1338
+ ..._,
1339
+ type: _.type ?? "text",
1340
1340
  role: "combobox",
1341
1341
  animated: C,
1342
1342
  className: de.field,
1343
1343
  autoComplete: "off",
1344
- "aria-expanded": i,
1344
+ "aria-expanded": p,
1345
1345
  "aria-controls": D,
1346
1346
  "aria-autocomplete": "list",
1347
- "aria-activedescendant": U && !U.disabled ? `${D}-${N}` : void 0,
1347
+ "aria-activedescendant": N && !N.disabled ? `${D}-${L}` : void 0,
1348
1348
  value: e,
1349
- onFocus: (_) => {
1350
- var L;
1351
- (L = u.onFocus) == null || L.call(u, _), g(!0);
1349
+ onFocus: (d) => {
1350
+ var $;
1351
+ ($ = _.onFocus) == null || $.call(_, d), g(!0);
1352
1352
  },
1353
- onClick: (_) => {
1354
- var L;
1355
- (L = u.onClick) == null || L.call(u, _), g(!0);
1353
+ onClick: (d) => {
1354
+ var $;
1355
+ ($ = _.onClick) == null || $.call(_, d), g(!0);
1356
1356
  },
1357
- onKeyDown: (_) => {
1358
- var L;
1359
- (L = u.onKeyDown) == null || L.call(u, _), F(_);
1357
+ onKeyDown: (d) => {
1358
+ var $;
1359
+ ($ = _.onKeyDown) == null || $.call(_, d), v(d);
1360
1360
  },
1361
- onChange: (_) => {
1362
- v.current = !1, t(_.target.value), g(!0);
1361
+ onChange: (d) => {
1362
+ b.current = !1, t(d.target.value), g(!0);
1363
1363
  },
1364
1364
  children: a != null && /* @__PURE__ */ n(it.Slot, { children: a })
1365
1365
  }
1366
1366
  ),
1367
- /* @__PURE__ */ R(
1367
+ /* @__PURE__ */ E(
1368
1368
  "div",
1369
1369
  {
1370
1370
  ref: X,
1371
1371
  popover: "manual",
1372
1372
  "data-side": "bottom",
1373
- className: E(de.panel, ue.spacePanel),
1373
+ className: H(de.panel, ue.spacePanel),
1374
1374
  "data-animated": C ? void 0 : "false",
1375
- style: q ? { top: q.top, left: q.left, width: q.width } : void 0,
1375
+ style: A ? { top: A.top, left: A.left, width: A.width } : void 0,
1376
1376
  children: [
1377
- x && c && /* @__PURE__ */ n("p", { className: de.status, children: h }),
1378
- x && !c && k.length === 0 && m != null && /* @__PURE__ */ n("p", { className: de.status, children: m }),
1377
+ k && c && /* @__PURE__ */ n("p", { className: de.status, children: h }),
1378
+ k && !c && z.length === 0 && m != null && /* @__PURE__ */ n("p", { className: de.status, children: m }),
1379
1379
  /* @__PURE__ */ n(
1380
1380
  "ul",
1381
1381
  {
1382
- ref: G,
1382
+ ref: U,
1383
1383
  id: D,
1384
1384
  role: "listbox",
1385
1385
  className: de.list,
1386
- hidden: c || k.length === 0,
1387
- children: k.map((_, L) => /* @__PURE__ */ R(
1386
+ hidden: c || z.length === 0,
1387
+ children: z.map((d, $) => /* @__PURE__ */ E(
1388
1388
  "li",
1389
1389
  {
1390
- id: `${D}-${L}`,
1391
- "data-index": L,
1390
+ id: `${D}-${$}`,
1391
+ "data-index": $,
1392
1392
  role: "option",
1393
- "aria-selected": L === N,
1394
- "aria-disabled": _.disabled || void 0,
1395
- className: E(
1393
+ "aria-selected": $ === L,
1394
+ "aria-disabled": d.disabled || void 0,
1395
+ className: H(
1396
1396
  de.option,
1397
- L === N && !_.disabled && de.active,
1397
+ $ === L && !d.disabled && de.active,
1398
1398
  "spAutocompleteOption"
1399
1399
  ),
1400
- onMouseEnter: () => !_.disabled && I(L),
1401
- onPointerDown: (f) => {
1402
- f.preventDefault(), M(_);
1400
+ onMouseEnter: () => !d.disabled && T($),
1401
+ onPointerDown: (i) => {
1402
+ i.preventDefault(), R(d);
1403
1403
  },
1404
1404
  children: [
1405
- /* @__PURE__ */ n("span", { className: de.label, children: _.label }),
1406
- _.meta != null && /* @__PURE__ */ n("span", { className: de.meta, children: _.meta })
1405
+ /* @__PURE__ */ n("span", { className: de.label, children: d.label }),
1406
+ d.meta != null && /* @__PURE__ */ n("span", { className: de.meta, children: d.meta })
1407
1407
  ]
1408
1408
  },
1409
- _.value
1409
+ d.value
1410
1410
  ))
1411
1411
  }
1412
1412
  ),
1413
- d != null && /* @__PURE__ */ n("div", { className: de.footer, children: d })
1413
+ u != null && /* @__PURE__ */ n("div", { className: de.footer, children: u })
1414
1414
  ]
1415
1415
  }
1416
1416
  )
1417
1417
  ] });
1418
1418
  }
1419
- const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr = "_thumb_1x14g_32", es = "_input_1x14g_44", Oe = {
1420
- root: Xr,
1419
+ const Kr = "_root_1csru_2", Yr = "_track_1csru_19", Qr = "_range_1csru_31", Jr = "_thumb_1csru_42", es = "_input_1csru_65", Oe = {
1420
+ root: Kr,
1421
1421
  track: Yr,
1422
1422
  range: Qr,
1423
1423
  thumb: Jr,
@@ -1432,76 +1432,129 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
1432
1432
  disabled: c,
1433
1433
  className: h,
1434
1434
  "aria-label": m,
1435
- thumbLabels: d
1435
+ thumbLabels: u
1436
1436
  }, C) {
1437
- const $ = P(null), y = P([]), u = t.length > 1, b = a - r || 1, g = be(t[0] ?? r, r, a), N = u ? be(t[1] ?? a, r, a) : g, I = u ? [g, N] : [g], T = (w) => (w - r) / b * 100, X = (w) => r + Math.floor(Number(((w - r) / l).toFixed(8))) * l, G = (w) => r + Math.ceil(Number(((w - r) / l).toFixed(8))) * l, D = (w, H) => u ? w === 0 ? be(H, r, Math.max(r, X(N - s))) : be(H, Math.min(a, G(g + s)), a) : be(H, r, a), q = (w, H) => {
1438
- const i = D(w, H);
1439
- if (i === I[w]) return;
1440
- const z = [...I];
1441
- z[w] = i, o(z);
1442
- }, V = (w) => {
1443
- if (!u) return 0;
1444
- const H = Math.abs(w - g), i = Math.abs(w - N);
1445
- return H === i ? w < g ? 0 : 1 : H < i ? 0 : 1;
1437
+ const x = P(null), M = P([]), _ = P([]), y = P(null), g = P(null), L = t.length > 1, T = a - r || 1, q = be(t[0] ?? r, r, a), X = L ? be(t[1] ?? a, r, a) : q, U = L ? [q, X] : [q], D = (w) => (w - r) / T * 100, A = P({ values: U, min: r, max: a, span: T, step: l, minDistance: s, isRange: L, onValueChange: o });
1438
+ A.current = { values: U, min: r, max: a, span: T, step: l, minDistance: s, isRange: L, onValueChange: o };
1439
+ const F = (w) => {
1440
+ const v = A.current;
1441
+ return v.min + Math.floor(Number(((w - v.min) / v.step).toFixed(8))) * v.step;
1446
1442
  }, K = (w) => {
1447
- var M, W;
1448
- if (!u || c || w.target.tagName === "INPUT") return;
1449
- const H = (M = $.current) == null ? void 0 : M.getBoundingClientRect();
1450
- if (!H || H.width === 0) return;
1451
- const i = be((w.clientX - H.left) / H.width, 0, 1), z = r + i * b, A = be(r + Math.round((z - r) / l) * l, r, a), v = V(A);
1452
- q(v, A), (W = y.current[v]) == null || W.focus();
1453
- }, x = (w) => d ? d[w] : u ? m ? `${m} ${w === 0 ? "minimum" : "maximum"}` : w === 0 ? "Minimum" : "Maximum" : m, k = u && g === N ? N >= a ? 0 : 1 : -1;
1454
- return /* @__PURE__ */ R(
1443
+ const v = A.current;
1444
+ return v.min + Math.ceil(Number(((w - v.min) / v.step).toFixed(8))) * v.step;
1445
+ }, k = (w, v) => {
1446
+ const N = A.current;
1447
+ return N.isRange ? w === 0 ? be(v, N.min, Math.max(N.min, F(N.values[1] - N.minDistance))) : be(v, Math.min(N.max, K(N.values[0] + N.minDistance)), N.max) : be(v, N.min, N.max);
1448
+ }, z = (w, v) => {
1449
+ const N = A.current, d = k(w, v);
1450
+ if (d === N.values[w]) return;
1451
+ const $ = [...N.values];
1452
+ $[w] = d, N.onValueChange($);
1453
+ }, B = (w) => {
1454
+ var i;
1455
+ const v = A.current, N = (i = x.current) == null ? void 0 : i.getBoundingClientRect();
1456
+ if (!N || N.width === 0) return v.values[0];
1457
+ const d = be((w - N.left) / N.width, 0, 1), $ = v.min + d * v.span;
1458
+ return be(v.min + Math.round(($ - v.min) / v.step) * v.step, v.min, v.max);
1459
+ }, j = (w) => {
1460
+ var v;
1461
+ return (v = _.current[w]) == null ? void 0 : v.getBoundingClientRect();
1462
+ }, p = (w) => {
1463
+ if (!A.current.isRange) return 0;
1464
+ const v = j(0), N = j(1);
1465
+ if (!v || !N) return 0;
1466
+ const d = v.left + v.width / 2, $ = Math.abs(w - d), i = Math.abs(w - (N.left + N.width / 2));
1467
+ return $ !== i ? $ < i ? 0 : 1 : Math.abs(w - d) <= 1 ? null : w < d ? 0 : 1;
1468
+ }, I = (w, v) => {
1469
+ const N = j(w);
1470
+ return N ? Math.abs(v - (N.left + N.width / 2)) <= N.width / 2 : !1;
1471
+ }, Z = () => {
1472
+ var w, v;
1473
+ y.current = null, (w = x.current) == null || w.removeAttribute("data-dragging"), (v = g.current) == null || v.call(g);
1474
+ }, b = (w) => {
1475
+ var d, $, i, f;
1476
+ if (c || w.button !== 0) return;
1477
+ (d = g.current) == null || d.call(g);
1478
+ const v = p(w.clientX);
1479
+ y.current = { index: v, startX: w.clientX }, ($ = x.current) == null || $.setAttribute("data-dragging", ""), v !== null && (I(v, w.clientX) || z(v, B(w.clientX)), (i = M.current[v]) == null || i.focus());
1480
+ try {
1481
+ (f = x.current) == null || f.setPointerCapture(w.pointerId);
1482
+ } catch {
1483
+ }
1484
+ const N = (S) => {
1485
+ var V;
1486
+ const O = y.current;
1487
+ if (O) {
1488
+ if (O.index === null) {
1489
+ const G = S.clientX - O.startX;
1490
+ if (Math.abs(G) < 1) return;
1491
+ O.index = G < 0 ? 0 : 1, (V = M.current[O.index]) == null || V.focus();
1492
+ }
1493
+ z(O.index, B(S.clientX));
1494
+ }
1495
+ };
1496
+ window.addEventListener("pointermove", N), window.addEventListener("pointerup", Z), window.addEventListener("pointercancel", Z), g.current = () => {
1497
+ window.removeEventListener("pointermove", N), window.removeEventListener("pointerup", Z), window.removeEventListener("pointercancel", Z), g.current = null;
1498
+ }, w.preventDefault();
1499
+ };
1500
+ te(() => () => {
1501
+ var w;
1502
+ return (w = g.current) == null ? void 0 : w.call(g);
1503
+ }, []);
1504
+ const R = (w) => u ? u[w] : L ? m ? `${m} ${w === 0 ? "minimum" : "maximum"}` : w === 0 ? "Minimum" : "Maximum" : m;
1505
+ return /* @__PURE__ */ E(
1455
1506
  "span",
1456
1507
  {
1457
- ref: $,
1458
- className: E(Oe.root, ue.spaceSlider, h),
1508
+ ref: x,
1509
+ className: H(Oe.root, ue.spaceSlider, h),
1459
1510
  "data-disabled": c || void 0,
1460
- "data-range": u || void 0,
1461
- onPointerDown: K,
1511
+ "data-range": L || void 0,
1512
+ onPointerDown: b,
1462
1513
  children: [
1463
- /* @__PURE__ */ n("span", { className: E(Oe.track, "spSliderTrack"), children: /* @__PURE__ */ n(
1514
+ /* @__PURE__ */ n("span", { className: H(Oe.track, "spSliderTrack"), children: /* @__PURE__ */ n(
1464
1515
  "span",
1465
1516
  {
1466
- className: E(Oe.range, "spSliderRange"),
1517
+ className: H(Oe.range, "spSliderRange"),
1467
1518
  style: {
1468
- insetInlineStart: `${u ? T(g) : 0}%`,
1469
- width: `${u ? T(N) - T(g) : T(g)}%`
1519
+ insetInlineStart: `${L ? D(q) : 0}%`,
1520
+ width: `${L ? D(X) - D(q) : D(q)}%`
1470
1521
  }
1471
1522
  }
1472
1523
  ) }),
1473
- I.map((w, H) => /* @__PURE__ */ n(
1524
+ U.map((w, v) => /* @__PURE__ */ n(
1474
1525
  "span",
1475
1526
  {
1476
- className: E(Oe.thumb, "spSliderThumb"),
1477
- style: { left: `${T(w)}%` },
1478
- "data-thumb": H
1527
+ ref: (N) => {
1528
+ _.current[v] = N;
1529
+ },
1530
+ className: H(Oe.thumb, "spSliderThumb"),
1531
+ style: { left: `${D(w)}%` },
1532
+ "data-thumb": v
1479
1533
  },
1480
- H
1534
+ v
1481
1535
  )),
1482
- I.map((w, H) => /* @__PURE__ */ n(
1536
+ U.map((w, v) => /* @__PURE__ */ n(
1483
1537
  "input",
1484
1538
  {
1485
- ref: (i) => {
1486
- y.current[H] = i, H === 0 && (typeof C == "function" ? C(i) : C && (C.current = i));
1539
+ ref: (N) => {
1540
+ M.current[v] = N, v === 0 && (typeof C == "function" ? C(N) : C && (C.current = N));
1487
1541
  },
1488
1542
  type: "range",
1489
- className: E(Oe.input, "spSliderInput"),
1543
+ className: H(Oe.input, "spSliderInput"),
1490
1544
  value: w,
1491
1545
  min: r,
1492
1546
  max: a,
1493
1547
  step: l,
1494
1548
  disabled: c,
1495
- "aria-label": x(H),
1496
- style: k === H ? { zIndex: 1 } : void 0,
1497
- onChange: (i) => q(H, Number(i.target.value))
1549
+ "aria-label": R(v),
1550
+ onChange: (N) => z(v, Number(N.target.value))
1498
1551
  },
1499
- H
1552
+ v
1500
1553
  ))
1501
1554
  ]
1502
1555
  }
1503
1556
  );
1504
- }), ts = "_root_1fiei_15", ns = "_plot_1fiei_24", os = "_svg_1fiei_30", rs = "_grid_1fiei_35", ss = "_zeroLine_1fiei_42", as = "_axisLabel_1fiei_46", ls = "_bar_1fiei_56", cs = "_hatch_1fiei_76", is = "_partialNote_1fiei_80", ds = "_line_1fiei_85", us = "_area_1fiei_119", fs = "_dot_1fiei_125", ps = "_crosshair_1fiei_136", _s = "_clickable_1fiei_143", hs = "_tooltip_1fiei_150", ms = "_tooltipHead_1fiei_164", gs = "_tooltipList_1fiei_170", Cs = "_tooltipRow_1fiei_178", vs = "_tooltipName_1fiei_186", bs = "_tooltipValue_1fiei_190", ws = "_swatch_1fiei_195", $s = "_legend_1fiei_202", ys = "_legendItem_1fiei_211", xs = "_data_1fiei_220", Y = {
1557
+ }), ts = "_root_1fiei_15", ns = "_plot_1fiei_24", os = "_svg_1fiei_30", rs = "_grid_1fiei_35", ss = "_zeroLine_1fiei_42", as = "_axisLabel_1fiei_46", ls = "_bar_1fiei_56", cs = "_hatch_1fiei_76", is = "_partialNote_1fiei_80", ds = "_line_1fiei_85", us = "_area_1fiei_119", fs = "_dot_1fiei_125", ps = "_crosshair_1fiei_136", _s = "_clickable_1fiei_143", hs = "_tooltip_1fiei_150", ms = "_tooltipHead_1fiei_164", gs = "_tooltipList_1fiei_170", vs = "_tooltipRow_1fiei_178", Cs = "_tooltipName_1fiei_186", bs = "_tooltipValue_1fiei_190", ws = "_swatch_1fiei_195", $s = "_legend_1fiei_202", ys = "_legendItem_1fiei_211", xs = "_data_1fiei_220", Y = {
1505
1558
  root: ts,
1506
1559
  plot: ns,
1507
1560
  svg: os,
@@ -1519,8 +1572,8 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
1519
1572
  tooltip: hs,
1520
1573
  tooltipHead: ms,
1521
1574
  tooltipList: gs,
1522
- tooltipRow: Cs,
1523
- tooltipName: vs,
1575
+ tooltipRow: vs,
1576
+ tooltipName: Cs,
1524
1577
  tooltipValue: bs,
1525
1578
  swatch: ws,
1526
1579
  legend: $s,
@@ -1535,20 +1588,20 @@ const Xr = "_root_1x14g_2", Yr = "_track_1x14g_13", Qr = "_range_1x14g_25", Jr =
1535
1588
  "var(--sp-chart-series-6-color)",
1536
1589
  "var(--sp-chart-series-7-color)",
1537
1590
  "var(--sp-chart-series-8-color)"
1538
- ], ot = bt.length, Xe = (e) => bt[e % ot];
1591
+ ], ot = bt.length, Ke = (e) => bt[e % ot];
1539
1592
  function Ns(e) {
1540
1593
  if (e <= 0) return 1;
1541
1594
  const t = 10 ** Math.floor(Math.log10(e)), o = e / t;
1542
1595
  return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * t;
1543
1596
  }
1544
1597
  function Ms(e, { tickCount: t = 5, zeroBased: o = !0 } = {}) {
1545
- const r = e.filter((u) => Number.isFinite(u)), a = r.length ? Math.min(...r) : 0, l = r.length ? Math.max(...r) : 0;
1598
+ const r = e.filter((_) => Number.isFinite(_)), a = r.length ? Math.min(...r) : 0, l = r.length ? Math.max(...r) : 0;
1546
1599
  let s = o ? Math.min(0, a) : a, c = o ? Math.max(0, l) : l;
1547
1600
  s === c && (s === 0 ? c = 1 : (s = Math.min(0, s), c = Math.max(0, c)));
1548
- const h = Ns((c - s) / Math.max(1, t)), m = Math.floor(s / h) * h, d = Math.ceil(c / h) * h, C = [], $ = Math.round((d - m) / h);
1549
- for (let u = 0; u <= $; u++) C.push(Number((m + u * h).toPrecision(12)));
1550
- const y = d - m || 1;
1551
- return { min: m, max: d, ticks: C, ratio: (u) => (u - m) / y };
1601
+ const h = Ns((c - s) / Math.max(1, t)), m = Math.floor(s / h) * h, u = Math.ceil(c / h) * h, C = [], x = Math.round((u - m) / h);
1602
+ for (let _ = 0; _ <= x; _++) C.push(Number((m + _ * h).toPrecision(12)));
1603
+ const M = u - m || 1;
1604
+ return { min: m, max: u, ticks: C, ratio: (_) => (_ - m) / M };
1552
1605
  }
1553
1606
  function Ls(e, t = 0.25) {
1554
1607
  if (e <= 0) return { centre: [], width: 0 };
@@ -1580,258 +1633,258 @@ function Ol({
1580
1633
  formatValue: c = st,
1581
1634
  tickCount: h = 5,
1582
1635
  animated: m = !0,
1583
- partialFrom: d,
1636
+ partialFrom: u,
1584
1637
  onPointClick: C,
1585
- className: $,
1586
- "aria-label": y,
1587
- ...u
1638
+ className: x,
1639
+ "aria-label": M,
1640
+ ..._
1588
1641
  }) {
1589
- const b = se(), g = P(null), [N, I] = Q(0), [T, X] = Q(null);
1642
+ const y = se(), g = P(null), [L, T] = Q(0), [q, X] = Q(null);
1590
1643
  te(() => {
1591
- const f = g.current;
1592
- if (!f) return;
1593
- const p = new ResizeObserver(([S]) => {
1594
- I(Math.round(S.contentRect.width));
1644
+ const i = g.current;
1645
+ if (!i) return;
1646
+ const f = new ResizeObserver(([S]) => {
1647
+ T(Math.round(S.contentRect.width));
1595
1648
  });
1596
- return p.observe(f), I(Math.round(f.getBoundingClientRect().width)), () => p.disconnect();
1649
+ return f.observe(i), T(Math.round(i.getBoundingClientRect().width)), () => f.disconnect();
1597
1650
  }, []), te(() => {
1598
1651
  if (!Rs()) return;
1599
1652
  o.length > ot && console.warn(
1600
1653
  `Chart: ${o.length} series, but the palette names ${ot}. Past that the colours repeat. Group the tail into an "Other" series, or split the chart.`
1601
1654
  );
1602
- const f = o.filter((p) => p.data.length !== t.length);
1603
- f.length && console.warn(
1604
- `Chart: ${f.map((p) => `"${p.name}"`).join(", ")} ${f.length === 1 ? "has" : "have"} a different number of values than there are categories (${t.length}). Values line up with categories by position, so the tail will be missing.`
1655
+ const i = o.filter((f) => f.data.length !== t.length);
1656
+ i.length && console.warn(
1657
+ `Chart: ${i.map((f) => `"${f.name}"`).join(", ")} ${i.length === 1 ? "has" : "have"} a different number of values than there are categories (${t.length}). Values line up with categories by position, so the tail will be missing.`
1605
1658
  );
1606
1659
  }, [o, t.length]);
1607
- const G = a && (e === "bar" || e === "area"), D = e === "bar" && typeof d == "number" && d >= 0, q = (f) => D && f >= d, V = _e(() => {
1608
- const f = [];
1609
- return G ? t.forEach((p, S) => {
1610
- let B = 0, Z = 0;
1611
- o.forEach((j) => {
1612
- const O = j.data[S];
1613
- typeof O == "number" && (O >= 0 ? B += O : Z += O);
1614
- }), f.push(B, Z);
1615
- }) : o.forEach((p) => p.data.forEach((S) => {
1616
- typeof S == "number" && f.push(S);
1617
- })), Ms(f, { tickCount: h, zeroBased: e !== "line" || f.some((p) => p < 0) });
1618
- }, [o, t, G, h, e]), K = _e(() => V.ticks.map(c), [V.ticks, c]), x = Math.max(...K.map((f) => f.length * 7), 24) + ft, k = Math.max(0, N - x - we.right), w = Math.max(0, r - we.top - we.bottom), H = e === "bar" ? 0 : 16, i = (f) => x + H + f * Math.max(0, k - H * 2), z = (f) => we.top + (1 - V.ratio(f)) * w, A = Ls(t.length), v = zs(t.length), M = (f) => {
1619
- var p;
1620
- return ((p = o[f]) == null ? void 0 : p.color) ?? Xe(f);
1621
- }, W = l ?? o.length > 1, F = _e(() => {
1622
- const f = o.map(() => []);
1623
- return t.forEach((p, S) => {
1624
- let B = 0, Z = 0;
1625
- o.forEach((j, O) => {
1626
- const ee = j.data[S];
1627
- if (!G || typeof ee != "number") {
1628
- f[O][S] = 0;
1660
+ const U = a && (e === "bar" || e === "area"), D = e === "bar" && typeof u == "number" && u >= 0, A = (i) => D && i >= u, F = _e(() => {
1661
+ const i = [];
1662
+ return U ? t.forEach((f, S) => {
1663
+ let O = 0, V = 0;
1664
+ o.forEach((G) => {
1665
+ const W = G.data[S];
1666
+ typeof W == "number" && (W >= 0 ? O += W : V += W);
1667
+ }), i.push(O, V);
1668
+ }) : o.forEach((f) => f.data.forEach((S) => {
1669
+ typeof S == "number" && i.push(S);
1670
+ })), Ms(i, { tickCount: h, zeroBased: e !== "line" || i.some((f) => f < 0) });
1671
+ }, [o, t, U, h, e]), K = _e(() => F.ticks.map(c), [F.ticks, c]), k = Math.max(...K.map((i) => i.length * 7), 24) + ft, z = Math.max(0, L - k - we.right), B = Math.max(0, r - we.top - we.bottom), j = e === "bar" ? 0 : 16, p = (i) => k + j + i * Math.max(0, z - j * 2), I = (i) => we.top + (1 - F.ratio(i)) * B, Z = Ls(t.length), b = zs(t.length), R = (i) => {
1672
+ var f;
1673
+ return ((f = o[i]) == null ? void 0 : f.color) ?? Ke(i);
1674
+ }, w = l ?? o.length > 1, v = _e(() => {
1675
+ const i = o.map(() => []);
1676
+ return t.forEach((f, S) => {
1677
+ let O = 0, V = 0;
1678
+ o.forEach((G, W) => {
1679
+ const ee = G.data[S];
1680
+ if (!U || typeof ee != "number") {
1681
+ i[W][S] = 0;
1629
1682
  return;
1630
1683
  }
1631
- ee >= 0 ? (f[O][S] = B, B += ee) : (f[O][S] = Z, Z += ee);
1684
+ ee >= 0 ? (i[W][S] = O, O += ee) : (i[W][S] = V, V += ee);
1632
1685
  });
1633
- }), f;
1634
- }, [o, t, G]), U = pe(
1635
- (f) => {
1636
- const p = g.current;
1637
- if (!p || !t.length || k <= 0) return null;
1638
- const S = p.getBoundingClientRect(), B = e === "bar" ? k : Math.max(1, k - 32), Z = (f - S.left - x - (e === "bar" ? 0 : 16)) / B, j = e === "bar" ? A.centre : v;
1639
- let O = 0;
1640
- return j.forEach((ee, ne) => {
1641
- Math.abs(ee - Z) < Math.abs(j[O] - Z) && (O = ne);
1642
- }), { index: O, x: i(j[O]) };
1686
+ }), i;
1687
+ }, [o, t, U]), N = pe(
1688
+ (i) => {
1689
+ const f = g.current;
1690
+ if (!f || !t.length || z <= 0) return null;
1691
+ const S = f.getBoundingClientRect(), O = e === "bar" ? z : Math.max(1, z - 32), V = (i - S.left - k - (e === "bar" ? 0 : 16)) / O, G = e === "bar" ? Z.centre : b;
1692
+ let W = 0;
1693
+ return G.forEach((ee, ne) => {
1694
+ Math.abs(ee - V) < Math.abs(G[W] - V) && (W = ne);
1695
+ }), { index: W, x: p(G[W]) };
1643
1696
  },
1644
1697
  // x and the position arrays are derived from these; listing them keeps the
1645
1698
  // callback honest without re-creating it on every render.
1646
- [t.length, x, k, e, A.centre, v]
1699
+ [t.length, k, z, e, Z.centre, b]
1647
1700
  // eslint-disable-line react-hooks/exhaustive-deps
1648
- ), _ = (f, p) => {
1649
- var B;
1650
- const S = (B = o[f]) == null ? void 0 : B.data[p];
1701
+ ), d = (i, f) => {
1702
+ var O;
1703
+ const S = (O = o[i]) == null ? void 0 : O.data[f];
1651
1704
  typeof S != "number" || !C || C({
1652
- series: o[f].name,
1653
- seriesIndex: f,
1654
- category: t[p],
1655
- categoryIndex: p,
1705
+ series: o[i].name,
1706
+ seriesIndex: i,
1707
+ category: t[f],
1708
+ categoryIndex: f,
1656
1709
  value: S
1657
1710
  });
1658
- }, L = G || o.length === 1 ? A.width * k : A.width * k / o.length;
1659
- return /* @__PURE__ */ R(
1711
+ }, $ = U || o.length === 1 ? Z.width * z : Z.width * z / o.length;
1712
+ return /* @__PURE__ */ E(
1660
1713
  "div",
1661
1714
  {
1662
- ...u,
1663
- className: E(Y.root, $),
1715
+ ..._,
1716
+ className: H(Y.root, x),
1664
1717
  "data-type": e,
1665
1718
  "data-animated": m ? "" : void 0,
1666
- style: { ...u.style },
1719
+ style: { ..._.style },
1667
1720
  children: [
1668
- /* @__PURE__ */ R(
1721
+ /* @__PURE__ */ E(
1669
1722
  "div",
1670
1723
  {
1671
1724
  ref: g,
1672
1725
  className: Y.plot,
1673
1726
  style: { height: r },
1674
- onPointerMove: (f) => {
1675
- f.pointerType !== "touch" && X(U(f.clientX));
1727
+ onPointerMove: (i) => {
1728
+ i.pointerType !== "touch" && X(N(i.clientX));
1676
1729
  },
1677
1730
  onPointerLeave: () => X(null),
1678
1731
  children: [
1679
- /* @__PURE__ */ R(
1732
+ /* @__PURE__ */ E(
1680
1733
  "svg",
1681
1734
  {
1682
1735
  className: Y.svg,
1683
- width: N || void 0,
1736
+ width: L || void 0,
1684
1737
  height: r,
1685
- viewBox: N ? `0 0 ${N} ${r}` : void 0,
1738
+ viewBox: L ? `0 0 ${L} ${r}` : void 0,
1686
1739
  role: "img",
1687
- "aria-labelledby": y ? void 0 : b,
1688
- "aria-label": y,
1740
+ "aria-labelledby": M ? void 0 : y,
1741
+ "aria-label": M,
1689
1742
  children: [
1690
- /* @__PURE__ */ R("defs", { children: [
1691
- o.map((f, p) => /* @__PURE__ */ R("linearGradient", { id: `${b}-grad-${p}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1692
- /* @__PURE__ */ n("stop", { offset: "0%", stopColor: M(p), stopOpacity: "1" }),
1693
- /* @__PURE__ */ n("stop", { offset: "100%", stopColor: M(p), stopOpacity: "0.55" })
1694
- ] }, `grad-${p}`)),
1695
- o.map((f, p) => /* @__PURE__ */ R("linearGradient", { id: `${b}-area-${p}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1696
- /* @__PURE__ */ n("stop", { offset: "0%", stopColor: M(p), stopOpacity: "0.45" }),
1697
- /* @__PURE__ */ n("stop", { offset: "100%", stopColor: M(p), stopOpacity: "0.02" })
1698
- ] }, `area-${p}`))
1743
+ /* @__PURE__ */ E("defs", { children: [
1744
+ o.map((i, f) => /* @__PURE__ */ E("linearGradient", { id: `${y}-grad-${f}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1745
+ /* @__PURE__ */ n("stop", { offset: "0%", stopColor: R(f), stopOpacity: "1" }),
1746
+ /* @__PURE__ */ n("stop", { offset: "100%", stopColor: R(f), stopOpacity: "0.55" })
1747
+ ] }, `grad-${f}`)),
1748
+ o.map((i, f) => /* @__PURE__ */ E("linearGradient", { id: `${y}-area-${f}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1749
+ /* @__PURE__ */ n("stop", { offset: "0%", stopColor: R(f), stopOpacity: "0.45" }),
1750
+ /* @__PURE__ */ n("stop", { offset: "100%", stopColor: R(f), stopOpacity: "0.02" })
1751
+ ] }, `area-${f}`))
1699
1752
  ] }),
1700
- D && /* @__PURE__ */ n("defs", { children: o.map((f, p) => /* @__PURE__ */ R(
1753
+ D && /* @__PURE__ */ n("defs", { children: o.map((i, f) => /* @__PURE__ */ E(
1701
1754
  "pattern",
1702
1755
  {
1703
- id: `${b}-hatch-${p}`,
1756
+ id: `${y}-hatch-${f}`,
1704
1757
  width: "8",
1705
1758
  height: "8",
1706
1759
  patternUnits: "userSpaceOnUse",
1707
1760
  patternTransform: "rotate(45)",
1708
1761
  children: [
1709
1762
  /* @__PURE__ */ n("rect", { width: "8", height: "8", fill: "transparent" }),
1710
- /* @__PURE__ */ n("line", { className: Y.hatch, x1: "2", y1: "0", x2: "2", y2: "8", stroke: M(p) }),
1711
- /* @__PURE__ */ n("line", { className: Y.hatch, x1: "6", y1: "0", x2: "6", y2: "8", stroke: M(p) })
1763
+ /* @__PURE__ */ n("line", { className: Y.hatch, x1: "2", y1: "0", x2: "2", y2: "8", stroke: R(f) }),
1764
+ /* @__PURE__ */ n("line", { className: Y.hatch, x1: "6", y1: "0", x2: "6", y2: "8", stroke: R(f) })
1712
1765
  ]
1713
1766
  },
1714
- `hatch-${p}`
1767
+ `hatch-${f}`
1715
1768
  )) }),
1716
- s && V.ticks.map((f) => /* @__PURE__ */ n(
1769
+ s && F.ticks.map((i) => /* @__PURE__ */ n(
1717
1770
  "line",
1718
1771
  {
1719
- className: E(Y.grid, f === 0 && V.min < 0 && Y.zeroLine),
1720
- x1: x,
1721
- x2: x + k,
1722
- y1: z(f),
1723
- y2: z(f)
1772
+ className: H(Y.grid, i === 0 && F.min < 0 && Y.zeroLine),
1773
+ x1: k,
1774
+ x2: k + z,
1775
+ y1: I(i),
1776
+ y2: I(i)
1724
1777
  },
1725
- `grid-${f}`
1778
+ `grid-${i}`
1726
1779
  )),
1727
- V.ticks.map((f, p) => /* @__PURE__ */ n("text", { className: Y.axisLabel, x: x - ft, y: z(f), textAnchor: "end", dominantBaseline: "middle", children: K[p] }, `label-${f}`)),
1728
- t.map((f, p) => /* @__PURE__ */ n(
1780
+ F.ticks.map((i, f) => /* @__PURE__ */ n("text", { className: Y.axisLabel, x: k - ft, y: I(i), textAnchor: "end", dominantBaseline: "middle", children: K[f] }, `label-${i}`)),
1781
+ t.map((i, f) => /* @__PURE__ */ n(
1729
1782
  "text",
1730
1783
  {
1731
1784
  className: Y.axisLabel,
1732
- x: i(e === "bar" ? A.centre[p] : v[p]),
1785
+ x: p(e === "bar" ? Z.centre[f] : b[f]),
1733
1786
  y: r - we.bottom / 2,
1734
1787
  textAnchor: "middle",
1735
1788
  dominantBaseline: "middle",
1736
- children: f
1789
+ children: i
1737
1790
  },
1738
- `cat-${f}-${p}`
1791
+ `cat-${i}-${f}`
1739
1792
  )),
1740
- e === "bar" && o.map((f, p) => /* @__PURE__ */ n("g", { children: t.map((S, B) => {
1741
- const Z = f.data[B];
1742
- if (typeof Z != "number") return null;
1743
- const j = F[p][B], O = z(j + Z), ee = z(j), ne = i(A.centre[B]) - A.width * k / 2, ie = G || o.length === 1 ? ne : ne + p * L, Je = Math.max(1, L - (o.length > 1 && !G ? 2 : 0)), me = Math.max(1, Math.abs(ee - O)), De = D && B >= d;
1793
+ e === "bar" && o.map((i, f) => /* @__PURE__ */ n("g", { children: t.map((S, O) => {
1794
+ const V = i.data[O];
1795
+ if (typeof V != "number") return null;
1796
+ const G = v[f][O], W = I(G + V), ee = I(G), ne = p(Z.centre[O]) - Z.width * z / 2, ie = U || o.length === 1 ? ne : ne + f * $, Je = Math.max(1, $ - (o.length > 1 && !U ? 2 : 0)), me = Math.max(1, Math.abs(ee - W)), Ie = D && O >= u;
1744
1797
  return /* @__PURE__ */ n(
1745
1798
  "path",
1746
1799
  {
1747
- className: E(Y.bar, C && Y.clickable),
1748
- d: ks(ie, Math.min(O, ee), Je, me, 4, Z >= 0),
1749
- fill: De ? `url(#${b}-hatch-${p})` : `url(#${b}-grad-${p})`,
1750
- color: M(p),
1751
- "data-dim": T && T.index !== B ? "" : void 0,
1752
- onClick: () => _(p, B),
1753
- children: /* @__PURE__ */ n("title", { children: `${f.name}, ${S}: ${c(Z)}${De ? " so far" : ""}` })
1800
+ className: H(Y.bar, C && Y.clickable),
1801
+ d: ks(ie, Math.min(W, ee), Je, me, 4, V >= 0),
1802
+ fill: Ie ? `url(#${y}-hatch-${f})` : `url(#${y}-grad-${f})`,
1803
+ color: R(f),
1804
+ "data-dim": q && q.index !== O ? "" : void 0,
1805
+ onClick: () => d(f, O),
1806
+ children: /* @__PURE__ */ n("title", { children: `${i.name}, ${S}: ${c(V)}${Ie ? " so far" : ""}` })
1754
1807
  },
1755
- `bar-${S}-${B}`
1808
+ `bar-${S}-${O}`
1756
1809
  );
1757
- }) }, `bars-${f.name}-${p}`)),
1758
- e !== "bar" && o.map((f, p) => {
1810
+ }) }, `bars-${i.name}-${f}`)),
1811
+ e !== "bar" && o.map((i, f) => {
1759
1812
  const S = [];
1760
- let B = [];
1761
- return f.data.forEach((Z, j) => {
1762
- if (typeof Z != "number") {
1763
- B.length && S.push(B), B = [];
1813
+ let O = [];
1814
+ return i.data.forEach((V, G) => {
1815
+ if (typeof V != "number") {
1816
+ O.length && S.push(O), O = [];
1764
1817
  return;
1765
1818
  }
1766
- B.push({ i: j, value: Z, base: F[p][j] });
1767
- }), B.length && S.push(B), /* @__PURE__ */ R("g", { children: [
1768
- S.map((Z, j) => {
1769
- const O = Z.map((ne, ie) => `${ie === 0 ? "M" : "L"}${i(v[ne.i])},${z(ne.base + ne.value)}`).join(" "), ee = e === "area" ? `${O} L${i(v[Z[Z.length - 1].i])},${z(Z[Z.length - 1].base)} ` + Z.slice().reverse().map((ne) => `L${i(v[ne.i])},${z(ne.base)}`).join(" ") + " Z" : null;
1770
- return /* @__PURE__ */ R("g", { children: [
1771
- ee && /* @__PURE__ */ n("path", { className: Y.area, d: ee, fill: `url(#${b}-area-${p})` }),
1819
+ O.push({ i: G, value: V, base: v[f][G] });
1820
+ }), O.length && S.push(O), /* @__PURE__ */ E("g", { children: [
1821
+ S.map((V, G) => {
1822
+ const W = V.map((ne, ie) => `${ie === 0 ? "M" : "L"}${p(b[ne.i])},${I(ne.base + ne.value)}`).join(" "), ee = e === "area" ? `${W} L${p(b[V[V.length - 1].i])},${I(V[V.length - 1].base)} ` + V.slice().reverse().map((ne) => `L${p(b[ne.i])},${I(ne.base)}`).join(" ") + " Z" : null;
1823
+ return /* @__PURE__ */ E("g", { children: [
1824
+ ee && /* @__PURE__ */ n("path", { className: Y.area, d: ee, fill: `url(#${y}-area-${f})` }),
1772
1825
  /* @__PURE__ */ n(
1773
1826
  "path",
1774
1827
  {
1775
1828
  className: Y.line,
1776
- d: O,
1777
- stroke: M(p),
1778
- color: M(p),
1829
+ d: W,
1830
+ stroke: R(f),
1831
+ color: R(f),
1779
1832
  fill: "none",
1780
1833
  pathLength: 1
1781
1834
  }
1782
1835
  )
1783
- ] }, `run-${j}`);
1836
+ ] }, `run-${G}`);
1784
1837
  }),
1785
- f.data.map(
1786
- (Z, j) => typeof Z == "number" ? /* @__PURE__ */ n(
1838
+ i.data.map(
1839
+ (V, G) => typeof V == "number" ? /* @__PURE__ */ n(
1787
1840
  "circle",
1788
1841
  {
1789
- className: E(Y.dot, C && Y.clickable),
1790
- cx: i(v[j]),
1791
- cy: z(F[p][j] + Z),
1842
+ className: H(Y.dot, C && Y.clickable),
1843
+ cx: p(b[G]),
1844
+ cy: I(v[f][G] + V),
1792
1845
  r: 4,
1793
- fill: M(p),
1794
- color: M(p),
1795
- "data-on": (T == null ? void 0 : T.index) === j ? "" : void 0,
1796
- onClick: () => _(p, j),
1797
- children: /* @__PURE__ */ n("title", { children: `${f.name}, ${t[j]}: ${c(Z)}` })
1846
+ fill: R(f),
1847
+ color: R(f),
1848
+ "data-on": (q == null ? void 0 : q.index) === G ? "" : void 0,
1849
+ onClick: () => d(f, G),
1850
+ children: /* @__PURE__ */ n("title", { children: `${i.name}, ${t[G]}: ${c(V)}` })
1798
1851
  },
1799
- `dot-${j}`
1852
+ `dot-${G}`
1800
1853
  ) : null
1801
1854
  )
1802
- ] }, `line-${f.name}-${p}`);
1855
+ ] }, `line-${i.name}-${f}`);
1803
1856
  }),
1804
- T && /* @__PURE__ */ n(
1857
+ q && /* @__PURE__ */ n(
1805
1858
  "line",
1806
1859
  {
1807
1860
  className: Y.crosshair,
1808
- x1: T.x,
1809
- x2: T.x,
1861
+ x1: q.x,
1862
+ x2: q.x,
1810
1863
  y1: we.top,
1811
- y2: we.top + w
1864
+ y2: we.top + B
1812
1865
  }
1813
1866
  )
1814
1867
  ]
1815
1868
  }
1816
1869
  ),
1817
- T && /* @__PURE__ */ R(
1870
+ q && /* @__PURE__ */ E(
1818
1871
  "div",
1819
1872
  {
1820
1873
  className: Y.tooltip,
1821
- style: T.x > x + k / 2 ? { right: Math.max(0, N - T.x + 12) } : { left: T.x + 12 },
1874
+ style: q.x > k + z / 2 ? { right: Math.max(0, L - q.x + 12) } : { left: q.x + 12 },
1822
1875
  role: "status",
1823
1876
  children: [
1824
- /* @__PURE__ */ n("p", { className: Y.tooltipHead, children: t[T.index] }),
1825
- /* @__PURE__ */ n("ul", { className: Y.tooltipList, children: o.map((f, p) => {
1826
- const S = f.data[T.index];
1827
- return /* @__PURE__ */ R("li", { className: Y.tooltipRow, children: [
1828
- /* @__PURE__ */ n("span", { className: Y.swatch, style: { background: M(p) }, "aria-hidden": "true" }),
1829
- /* @__PURE__ */ n("span", { className: Y.tooltipName, children: f.name }),
1830
- /* @__PURE__ */ R("span", { className: Y.tooltipValue, children: [
1877
+ /* @__PURE__ */ n("p", { className: Y.tooltipHead, children: t[q.index] }),
1878
+ /* @__PURE__ */ n("ul", { className: Y.tooltipList, children: o.map((i, f) => {
1879
+ const S = i.data[q.index];
1880
+ return /* @__PURE__ */ E("li", { className: Y.tooltipRow, children: [
1881
+ /* @__PURE__ */ n("span", { className: Y.swatch, style: { background: R(f) }, "aria-hidden": "true" }),
1882
+ /* @__PURE__ */ n("span", { className: Y.tooltipName, children: i.name }),
1883
+ /* @__PURE__ */ E("span", { className: Y.tooltipValue, children: [
1831
1884
  typeof S == "number" ? c(S) : "—",
1832
- q(T.index) && typeof S == "number" && /* @__PURE__ */ n("span", { className: Y.partialNote, children: "so far" })
1885
+ A(q.index) && typeof S == "number" && /* @__PURE__ */ n("span", { className: Y.partialNote, children: "so far" })
1833
1886
  ] })
1834
- ] }, f.name);
1887
+ ] }, i.name);
1835
1888
  }) })
1836
1889
  ]
1837
1890
  }
@@ -1839,32 +1892,32 @@ function Ol({
1839
1892
  ]
1840
1893
  }
1841
1894
  ),
1842
- W && /* @__PURE__ */ n("ul", { className: Y.legend, children: o.map((f, p) => /* @__PURE__ */ R("li", { className: Y.legendItem, children: [
1843
- /* @__PURE__ */ n("span", { className: Y.swatch, style: { background: M(p) }, "aria-hidden": "true" }),
1844
- f.name
1845
- ] }, f.name)) }),
1846
- /* @__PURE__ */ R("table", { className: Y.data, id: b, children: [
1847
- /* @__PURE__ */ n("caption", { children: y ?? "Chart data" }),
1848
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ R("tr", { children: [
1895
+ w && /* @__PURE__ */ n("ul", { className: Y.legend, children: o.map((i, f) => /* @__PURE__ */ E("li", { className: Y.legendItem, children: [
1896
+ /* @__PURE__ */ n("span", { className: Y.swatch, style: { background: R(f) }, "aria-hidden": "true" }),
1897
+ i.name
1898
+ ] }, i.name)) }),
1899
+ /* @__PURE__ */ E("table", { className: Y.data, id: y, children: [
1900
+ /* @__PURE__ */ n("caption", { children: M ?? "Chart data" }),
1901
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ E("tr", { children: [
1849
1902
  /* @__PURE__ */ n("th", { scope: "col", children: "Category" }),
1850
- o.map((f) => /* @__PURE__ */ n("th", { scope: "col", children: f.name }, f.name))
1903
+ o.map((i) => /* @__PURE__ */ n("th", { scope: "col", children: i.name }, i.name))
1851
1904
  ] }) }),
1852
- /* @__PURE__ */ n("tbody", { children: t.map((f, p) => /* @__PURE__ */ R("tr", { children: [
1853
- /* @__PURE__ */ n("th", { scope: "row", children: f }),
1854
- o.map((S) => /* @__PURE__ */ R("td", { children: [
1855
- typeof S.data[p] == "number" ? c(S.data[p]) : "—",
1856
- q(p) && typeof S.data[p] == "number" ? " so far" : ""
1905
+ /* @__PURE__ */ n("tbody", { children: t.map((i, f) => /* @__PURE__ */ E("tr", { children: [
1906
+ /* @__PURE__ */ n("th", { scope: "row", children: i }),
1907
+ o.map((S) => /* @__PURE__ */ E("td", { children: [
1908
+ typeof S.data[f] == "number" ? c(S.data[f]) : "—",
1909
+ A(f) && typeof S.data[f] == "number" ? " so far" : ""
1857
1910
  ] }, S.name))
1858
- ] }, f)) })
1911
+ ] }, i)) })
1859
1912
  ] })
1860
1913
  ]
1861
1914
  }
1862
1915
  );
1863
1916
  }
1864
- const Es = "_root_1v7ph_8", Is = "_row_1v7ph_15", Ds = "_line_1v7ph_21", Hs = "_pressable_1v7ph_36", Ss = "_fill_1v7ph_50", Ts = "_label_1v7ph_58", qs = "_track_1v7ph_66", As = "_value_1v7ph_101", Os = "_percent_1v7ph_106", fe = {
1917
+ const Es = "_root_1v7ph_8", Ds = "_row_1v7ph_15", Is = "_line_1v7ph_21", Hs = "_pressable_1v7ph_36", Ss = "_fill_1v7ph_50", Ts = "_label_1v7ph_58", qs = "_track_1v7ph_66", As = "_value_1v7ph_101", Os = "_percent_1v7ph_106", fe = {
1865
1918
  root: Es,
1866
- row: Is,
1867
- line: Ds,
1919
+ row: Ds,
1920
+ line: Is,
1868
1921
  pressable: Hs,
1869
1922
  fill: Ss,
1870
1923
  label: Ts,
@@ -1884,37 +1937,37 @@ function Bl({
1884
1937
  "aria-label": h,
1885
1938
  ...m
1886
1939
  }) {
1887
- const d = t ?? Math.max(0, ...e.map(($) => $.value)), C = e.reduce(($, y) => $ + (y.value > 0 ? y.value : 0), 0);
1940
+ const u = t ?? Math.max(0, ...e.map((x) => x.value)), C = e.reduce((x, M) => x + (M.value > 0 ? M.value : 0), 0);
1888
1941
  return /* @__PURE__ */ n(
1889
1942
  "div",
1890
1943
  {
1891
1944
  ...m,
1892
- className: E(fe.root, c),
1945
+ className: H(fe.root, c),
1893
1946
  role: "list",
1894
1947
  "aria-label": h,
1895
1948
  "data-animated": l ? "" : void 0,
1896
- children: e.map(($, y) => {
1897
- const u = d > 0 ? Math.max(0, $.value) / d : 0, b = C > 0 ? $.value / C * 100 : 0, g = $.color ?? (a ? Xe(y) : "var(--sp-chart-series-1-color)"), N = /* @__PURE__ */ R(he, { children: [
1898
- /* @__PURE__ */ n("span", { className: fe.label, children: $.label }),
1949
+ children: e.map((x, M) => {
1950
+ const _ = u > 0 ? Math.max(0, x.value) / u : 0, y = C > 0 ? x.value / C * 100 : 0, g = x.color ?? (a ? Ke(M) : "var(--sp-chart-series-1-color)"), L = /* @__PURE__ */ E(he, { children: [
1951
+ /* @__PURE__ */ n("span", { className: fe.label, children: x.label }),
1899
1952
  /* @__PURE__ */ n("span", { className: fe.track, children: /* @__PURE__ */ n(
1900
1953
  "span",
1901
1954
  {
1902
1955
  className: fe.fill,
1903
1956
  style: {
1904
- width: `${u * 100}%`,
1957
+ width: `${_ * 100}%`,
1905
1958
  background: g,
1906
1959
  // Each row starts a little after the one above, so a poll
1907
1960
  // reads as counting up rather than snapping into place.
1908
1961
  // Capped, or a long list would still be filling when the
1909
1962
  // reader has finished reading it.
1910
- animationDelay: `${Math.min(y * 60, 360)}ms`
1963
+ animationDelay: `${Math.min(M * 60, 360)}ms`
1911
1964
  }
1912
1965
  }
1913
1966
  ) }),
1914
- /* @__PURE__ */ R("span", { className: fe.value, children: [
1915
- r($.value),
1916
- o && /* @__PURE__ */ R("span", { className: fe.percent, children: [
1917
- Math.round(b),
1967
+ /* @__PURE__ */ E("span", { className: fe.value, children: [
1968
+ r(x.value),
1969
+ o && /* @__PURE__ */ E("span", { className: fe.percent, children: [
1970
+ Math.round(y),
1918
1971
  "%"
1919
1972
  ] })
1920
1973
  ] })
@@ -1923,16 +1976,16 @@ function Bl({
1923
1976
  "button",
1924
1977
  {
1925
1978
  type: "button",
1926
- className: E(fe.line, fe.pressable),
1927
- onClick: () => s($, y),
1928
- children: N
1979
+ className: H(fe.line, fe.pressable),
1980
+ onClick: () => s(x, M),
1981
+ children: L
1929
1982
  }
1930
- ) : /* @__PURE__ */ n("span", { className: fe.line, children: N }) }, `${$.label}-${y}`);
1983
+ ) : /* @__PURE__ */ n("span", { className: fe.line, children: L }) }, `${x.label}-${M}`);
1931
1984
  })
1932
1985
  }
1933
1986
  );
1934
1987
  }
1935
- const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_hole_ep6xn_25", Ps = "_slice_ep6xn_35", Fs = "_sweep_ep6xn_57", js = "_clickable_ep6xn_70", Gs = "_total_ep6xn_76", Us = "_totalLabel_ep6xn_84", Ks = "_legend_ep6xn_89", Xs = "_legendItem_ep6xn_98", Ys = "_legendName_ep6xn_113", Qs = "_legendValue_ep6xn_121", Js = "_legendPercent_ep6xn_126", ea = "_swatch_ep6xn_131", oe = {
1988
+ const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_hole_ep6xn_25", Ps = "_slice_ep6xn_35", Fs = "_sweep_ep6xn_57", js = "_clickable_ep6xn_70", Gs = "_total_ep6xn_76", Us = "_totalLabel_ep6xn_84", Xs = "_legend_ep6xn_89", Ks = "_legendItem_ep6xn_98", Ys = "_legendName_ep6xn_113", Qs = "_legendValue_ep6xn_121", Js = "_legendPercent_ep6xn_126", ea = "_swatch_ep6xn_131", oe = {
1936
1989
  root: Bs,
1937
1990
  svg: Zs,
1938
1991
  face: Vs,
@@ -1942,8 +1995,8 @@ const Bs = "_root_ep6xn_6", Zs = "_svg_ep6xn_15", Vs = "_face_ep6xn_24", Ws = "_
1942
1995
  clickable: js,
1943
1996
  total: Gs,
1944
1997
  totalLabel: Us,
1945
- legend: Ks,
1946
- legendItem: Xs,
1998
+ legend: Xs,
1999
+ legendItem: Ks,
1947
2000
  legendName: Ys,
1948
2001
  legendValue: Qs,
1949
2002
  legendPercent: Js,
@@ -1963,18 +2016,18 @@ function Zl({
1963
2016
  onSliceClick: c,
1964
2017
  className: h,
1965
2018
  "aria-label": m,
1966
- ...d
2019
+ ...u
1967
2020
  }) {
1968
- const [C, $] = Q(null), y = se(), u = e.filter((D) => D.value > 0), b = u.reduce((D, q) => D + q.value, 0), g = r / 2, N = g - 2, I = t ? N * 0.62 : 0;
1969
- let T = 0;
1970
- const X = u.map((D, q) => {
1971
- const V = b > 0 ? D.value / b : 0, K = T;
1972
- T += V;
1973
- const x = ke(g, N, K), k = ke(g, N, T), w = V > 0.5 ? 1 : 0, H = V >= 0.999, i = H ? t ? `M${g},${g - N} A${N},${N} 0 1 1 ${g - 0.01},${g - N} Z M${g},${g - I} A${I},${I} 0 1 0 ${g - 0.01},${g - I} Z` : `M${g},${g - N} A${N},${N} 0 1 1 ${g - 0.01},${g - N} Z` : t ? `M${x.x},${x.y} A${N},${N} 0 ${w} 1 ${k.x},${k.y} L${ke(g, I, T).x},${ke(g, I, T).y} A${I},${I} 0 ${w} 0 ${ke(g, I, K).x},${ke(g, I, K).y} Z` : `M${g},${g} L${x.x},${x.y} A${N},${N} 0 ${w} 1 ${k.x},${k.y} Z`;
1974
- return { slice: D, index: q, d: i, fraction: V, fillRule: H && t ? "evenodd" : void 0 };
1975
- }), G = (D) => e.indexOf(D);
1976
- return /* @__PURE__ */ R("div", { ...d, className: E(oe.root, h), "data-animated": l ? "" : void 0, children: [
1977
- /* @__PURE__ */ R(
2021
+ const [C, x] = Q(null), M = se(), _ = e.filter((D) => D.value > 0), y = _.reduce((D, A) => D + A.value, 0), g = r / 2, L = g - 2, T = t ? L * 0.62 : 0;
2022
+ let q = 0;
2023
+ const X = _.map((D, A) => {
2024
+ const F = y > 0 ? D.value / y : 0, K = q;
2025
+ q += F;
2026
+ const k = ke(g, L, K), z = ke(g, L, q), B = F > 0.5 ? 1 : 0, j = F >= 0.999, p = j ? t ? `M${g},${g - L} A${L},${L} 0 1 1 ${g - 0.01},${g - L} Z M${g},${g - T} A${T},${T} 0 1 0 ${g + 0.01},${g - T} Z` : `M${g},${g - L} A${L},${L} 0 1 1 ${g - 0.01},${g - L} Z` : t ? `M${k.x},${k.y} A${L},${L} 0 ${B} 1 ${z.x},${z.y} L${ke(g, T, q).x},${ke(g, T, q).y} A${T},${T} 0 ${B} 0 ${ke(g, T, K).x},${ke(g, T, K).y} Z` : `M${g},${g} L${k.x},${k.y} A${L},${L} 0 ${B} 1 ${z.x},${z.y} Z`;
2027
+ return { slice: D, index: A, d: p, fraction: F, fillRule: j && t ? "evenodd" : void 0 };
2028
+ }), U = (D) => e.indexOf(D);
2029
+ return /* @__PURE__ */ E("div", { ...u, className: H(oe.root, h), "data-animated": l ? "" : void 0, children: [
2030
+ /* @__PURE__ */ E(
1978
2031
  "svg",
1979
2032
  {
1980
2033
  className: oe.svg,
@@ -1984,35 +2037,35 @@ function Zl({
1984
2037
  role: "img",
1985
2038
  "aria-label": m ?? "Pie chart",
1986
2039
  children: [
1987
- /* @__PURE__ */ R("defs", { children: [
1988
- /* @__PURE__ */ R("radialGradient", { id: `${y}-face`, cx: "32%", cy: "26%", r: "78%", children: [
2040
+ /* @__PURE__ */ E("defs", { children: [
2041
+ /* @__PURE__ */ E("radialGradient", { id: `${M}-face`, cx: "32%", cy: "26%", r: "78%", children: [
1989
2042
  /* @__PURE__ */ n("stop", { offset: "0%", stopColor: "#fff", stopOpacity: "0.22" }),
1990
2043
  /* @__PURE__ */ n("stop", { offset: "55%", stopColor: "#fff", stopOpacity: "0.04" }),
1991
2044
  /* @__PURE__ */ n("stop", { offset: "100%", stopColor: "#000", stopOpacity: "0.28" })
1992
2045
  ] }),
1993
- /* @__PURE__ */ R("radialGradient", { id: `${y}-edge`, cx: "50%", cy: "50%", r: "50%", children: [
2046
+ /* @__PURE__ */ E("radialGradient", { id: `${M}-edge`, cx: "50%", cy: "50%", r: "50%", children: [
1994
2047
  /* @__PURE__ */ n("stop", { offset: "88%", stopColor: "#000", stopOpacity: "0" }),
1995
2048
  /* @__PURE__ */ n("stop", { offset: "100%", stopColor: "#000", stopOpacity: "0.45" })
1996
2049
  ] })
1997
2050
  ] }),
1998
- /* @__PURE__ */ R("g", { className: oe.sweep, children: [
1999
- X.map(({ slice: D, index: q, d: V, fillRule: K }) => /* @__PURE__ */ n(
2051
+ /* @__PURE__ */ E("g", { className: oe.sweep, children: [
2052
+ X.map(({ slice: D, index: A, d: F, fillRule: K }) => /* @__PURE__ */ n(
2000
2053
  "path",
2001
2054
  {
2002
- className: E(oe.slice, c && oe.clickable),
2003
- d: V,
2004
- fill: D.color ?? Xe(G(D)),
2055
+ className: H(oe.slice, c && oe.clickable),
2056
+ d: F,
2057
+ fill: D.color ?? Ke(U(D)),
2005
2058
  fillRule: K,
2006
- "data-dim": C !== null && C !== q ? "" : void 0,
2007
- onPointerEnter: () => $(q),
2008
- onPointerLeave: () => $(null),
2009
- onClick: () => c == null ? void 0 : c(D, G(D)),
2059
+ "data-dim": C !== null && C !== A ? "" : void 0,
2060
+ onPointerEnter: () => x(A),
2061
+ onPointerLeave: () => x(null),
2062
+ onClick: () => c == null ? void 0 : c(D, U(D)),
2010
2063
  children: /* @__PURE__ */ n("title", { children: `${D.label}: ${s(D.value)}` })
2011
2064
  },
2012
- `${D.label}-${q}`
2065
+ `${D.label}-${A}`
2013
2066
  )),
2014
- /* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: N, fill: `url(#${y}-face)` }),
2015
- /* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: N, fill: `url(#${y}-edge)` }),
2067
+ /* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: L, fill: `url(#${M}-face)` }),
2068
+ /* @__PURE__ */ n("circle", { className: oe.face, cx: g, cy: g, r: L, fill: `url(#${M}-edge)` }),
2016
2069
  t && // The wall of the hole, so the middle reads as cut through the
2017
2070
  // disc rather than printed on it.
2018
2071
  /* @__PURE__ */ n(
@@ -2021,7 +2074,7 @@ function Zl({
2021
2074
  className: oe.hole,
2022
2075
  cx: g,
2023
2076
  cy: g,
2024
- r: I,
2077
+ r: T,
2025
2078
  fill: "none",
2026
2079
  stroke: "#000",
2027
2080
  strokeOpacity: "0.45",
@@ -2029,38 +2082,38 @@ function Zl({
2029
2082
  }
2030
2083
  )
2031
2084
  ] }),
2032
- t && /* @__PURE__ */ R(he, { children: [
2033
- /* @__PURE__ */ n("text", { className: oe.total, x: g, y: g - (o ? 6 : 0), textAnchor: "middle", dominantBaseline: "middle", children: s(C !== null ? u[C].value : b) }),
2034
- o && /* @__PURE__ */ n("text", { className: oe.totalLabel, x: g, y: g + 14, textAnchor: "middle", dominantBaseline: "middle", children: C !== null ? u[C].label : o })
2085
+ t && /* @__PURE__ */ E(he, { children: [
2086
+ /* @__PURE__ */ n("text", { className: oe.total, x: g, y: g - (o ? 6 : 0), textAnchor: "middle", dominantBaseline: "middle", children: s(C !== null ? _[C].value : y) }),
2087
+ o && /* @__PURE__ */ n("text", { className: oe.totalLabel, x: g, y: g + 14, textAnchor: "middle", dominantBaseline: "middle", children: C !== null ? _[C].label : o })
2035
2088
  ] })
2036
2089
  ]
2037
2090
  }
2038
2091
  ),
2039
- a && /* @__PURE__ */ n("ul", { className: oe.legend, children: u.map((D, q) => /* @__PURE__ */ R(
2092
+ a && /* @__PURE__ */ n("ul", { className: oe.legend, children: _.map((D, A) => /* @__PURE__ */ E(
2040
2093
  "li",
2041
2094
  {
2042
2095
  className: oe.legendItem,
2043
- "data-dim": C !== null && C !== q ? "" : void 0,
2096
+ "data-dim": C !== null && C !== A ? "" : void 0,
2044
2097
  children: [
2045
2098
  /* @__PURE__ */ n(
2046
2099
  "span",
2047
2100
  {
2048
2101
  className: oe.swatch,
2049
- style: { background: D.color ?? Xe(G(D)) },
2102
+ style: { background: D.color ?? Ke(U(D)) },
2050
2103
  "aria-hidden": "true"
2051
2104
  }
2052
2105
  ),
2053
2106
  /* @__PURE__ */ n("span", { className: oe.legendName, children: D.label }),
2054
- /* @__PURE__ */ R("span", { className: oe.legendValue, children: [
2107
+ /* @__PURE__ */ E("span", { className: oe.legendValue, children: [
2055
2108
  s(D.value),
2056
- /* @__PURE__ */ R("span", { className: oe.legendPercent, children: [
2057
- b > 0 ? Math.round(D.value / b * 100) : 0,
2109
+ /* @__PURE__ */ E("span", { className: oe.legendPercent, children: [
2110
+ y > 0 ? Math.round(D.value / y * 100) : 0,
2058
2111
  "%"
2059
2112
  ] })
2060
2113
  ] })
2061
2114
  ]
2062
2115
  },
2063
- `${D.label}-${q}`
2116
+ `${D.label}-${A}`
2064
2117
  )) })
2065
2118
  ] });
2066
2119
  }
@@ -2086,7 +2139,7 @@ function $t({
2086
2139
  const s = P(null);
2087
2140
  return te(() => {
2088
2141
  s.current && (s.current.indeterminate = t === !0);
2089
- }, [t]), /* @__PURE__ */ R(he, { children: [
2142
+ }, [t]), /* @__PURE__ */ E(he, { children: [
2090
2143
  /* @__PURE__ */ n(
2091
2144
  "input",
2092
2145
  {
@@ -2100,7 +2153,7 @@ function $t({
2100
2153
  onChange: (c) => r(c.currentTarget.checked)
2101
2154
  }
2102
2155
  ),
2103
- /* @__PURE__ */ R("span", { className: re.box, "aria-hidden": "true", children: [
2156
+ /* @__PURE__ */ E("span", { className: re.box, "aria-hidden": "true", children: [
2104
2157
  /* @__PURE__ */ n("svg", { className: re.tick, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ n(
2105
2158
  "path",
2106
2159
  {
@@ -2125,10 +2178,10 @@ function da({
2125
2178
  "aria-label": a,
2126
2179
  children: l
2127
2180
  }) {
2128
- return /* @__PURE__ */ n(wt.Provider, { value: { value: e, onValueChange: t, disabled: o }, children: /* @__PURE__ */ n("div", { role: "group", "aria-label": a, className: E(re.root, r), children: l }) });
2181
+ return /* @__PURE__ */ n(wt.Provider, { value: { value: e, onValueChange: t, disabled: o }, children: /* @__PURE__ */ n("div", { role: "group", "aria-label": a, className: H(re.root, r), children: l }) });
2129
2182
  }
2130
2183
  function ua({ value: e, disabled: t, children: o }) {
2131
- const r = Ie(wt);
2184
+ const r = De(wt);
2132
2185
  if (!r) throw new Error("CheckboxGroup.Item must be inside a CheckboxGroup");
2133
2186
  const a = t || r.disabled, l = r.value.includes(e), s = /* @__PURE__ */ n(
2134
2187
  $t,
@@ -2139,7 +2192,7 @@ function ua({ value: e, disabled: t, children: o }) {
2139
2192
  onToggle: (c) => r.onValueChange(c ? [...r.value, e] : r.value.filter((h) => h !== e))
2140
2193
  }
2141
2194
  );
2142
- return o == null ? /* @__PURE__ */ n("span", { className: re.item, children: s }) : /* @__PURE__ */ R("label", { className: E(re.item, re.selfLabeled), children: [
2195
+ return o == null ? /* @__PURE__ */ n("span", { className: re.item, children: s }) : /* @__PURE__ */ E("label", { className: H(re.item, re.selfLabeled), children: [
2143
2196
  s,
2144
2197
  /* @__PURE__ */ n("span", { className: re.label, children: o })
2145
2198
  ] });
@@ -2164,7 +2217,7 @@ function Wl({
2164
2217
  onToggle: t
2165
2218
  }
2166
2219
  );
2167
- return s == null ? /* @__PURE__ */ n("span", { className: E(re.item, a), children: c }) : /* @__PURE__ */ R("label", { className: E(re.item, re.selfLabeled, a), children: [
2220
+ return s == null ? /* @__PURE__ */ n("span", { className: H(re.item, a), children: c }) : /* @__PURE__ */ E("label", { className: H(re.item, re.selfLabeled, a), children: [
2168
2221
  c,
2169
2222
  /* @__PURE__ */ n("span", { className: re.label, children: s })
2170
2223
  ] });
@@ -2177,14 +2230,14 @@ const fa = "_root_mhh35_15", pa = "_item_mhh35_23", _a = "_selfLabeled_mhh35_32"
2177
2230
  orb: ma,
2178
2231
  burst: ga
2179
2232
  }, yt = Ee(null);
2180
- function Ca({ value: e, onValueChange: t, disabled: o, className: r, children: a }) {
2233
+ function va({ value: e, onValueChange: t, disabled: o, className: r, children: a }) {
2181
2234
  const l = se();
2182
- return /* @__PURE__ */ n(yt.Provider, { value: { value: e, onValueChange: t, disabled: o, name: l }, children: /* @__PURE__ */ n("div", { role: "radiogroup", className: E($e.root, r), children: a }) });
2235
+ return /* @__PURE__ */ n(yt.Provider, { value: { value: e, onValueChange: t, disabled: o, name: l }, children: /* @__PURE__ */ n("div", { role: "radiogroup", className: H($e.root, r), children: a }) });
2183
2236
  }
2184
- function va({ value: e, disabled: t, children: o }) {
2185
- const r = Ie(yt);
2237
+ function Ca({ value: e, disabled: t, children: o }) {
2238
+ const r = De(yt);
2186
2239
  if (!r) throw new Error("RadioGroup.Item must be inside a RadioGroup");
2187
- const a = t || r.disabled, l = /* @__PURE__ */ R(he, { children: [
2240
+ const a = t || r.disabled, l = /* @__PURE__ */ E(he, { children: [
2188
2241
  /* @__PURE__ */ n(
2189
2242
  "input",
2190
2243
  {
@@ -2197,14 +2250,14 @@ function va({ value: e, disabled: t, children: o }) {
2197
2250
  onChange: () => r.onValueChange(e)
2198
2251
  }
2199
2252
  ),
2200
- /* @__PURE__ */ n("span", { className: E($e.orb, "spRadioOrb"), "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: $e.burst }) })
2253
+ /* @__PURE__ */ n("span", { className: H($e.orb, "spRadioOrb"), "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: $e.burst }) })
2201
2254
  ] });
2202
- return o == null ? /* @__PURE__ */ n("span", { className: $e.item, children: l }) : /* @__PURE__ */ R("label", { className: E($e.item, $e.selfLabeled), children: [
2255
+ return o == null ? /* @__PURE__ */ n("span", { className: $e.item, children: l }) : /* @__PURE__ */ E("label", { className: H($e.item, $e.selfLabeled), children: [
2203
2256
  l,
2204
2257
  o
2205
2258
  ] });
2206
2259
  }
2207
- const Pl = Object.assign(Ca, { Item: va }), ba = "_progress_1cre6_16", wa = {
2260
+ const Pl = Object.assign(va, { Item: Ca }), ba = "_progress_1cre6_16", wa = {
2208
2261
  progress: ba
2209
2262
  };
2210
2263
  function Fl({ value: e, max: t = 100, className: o, style: r, ...a }) {
@@ -2217,7 +2270,7 @@ function Fl({ value: e, max: t = 100, className: o, style: r, ...a }) {
2217
2270
  "aria-valuenow": e,
2218
2271
  "aria-valuemin": 0,
2219
2272
  "aria-valuemax": t,
2220
- className: E(wa.progress, o),
2273
+ className: H(wa.progress, o),
2221
2274
  style: r,
2222
2275
  children: /* @__PURE__ */ n("div", { style: { width: `${l}%`, height: "100%" } })
2223
2276
  }
@@ -2241,43 +2294,43 @@ const $a = "_message_ca22y_14", ya = "_info_ca22y_44", xa = "_warning_ca22y_49",
2241
2294
  warning: { role: "status", live: "polite" },
2242
2295
  alert: { role: "alert" }
2243
2296
  }, jl = ae(function({ variant: t = "info", title: o, icon: r, className: a, children: l, ...s }, c) {
2244
- const h = r === void 0 ? Ra[t] : r, { role: m, live: d } = Ea[t];
2245
- return /* @__PURE__ */ R(
2297
+ const h = r === void 0 ? Ra[t] : r, { role: m, live: u } = Ea[t];
2298
+ return /* @__PURE__ */ E(
2246
2299
  "div",
2247
2300
  {
2248
2301
  ...s,
2249
2302
  ref: c,
2250
2303
  role: m,
2251
- "aria-live": d,
2252
- className: E(ze.message, ze[t], a),
2304
+ "aria-live": u,
2305
+ className: H(ze.message, ze[t], a),
2253
2306
  children: [
2254
2307
  h != null && /* @__PURE__ */ n("span", { className: ze.icon, "aria-hidden": "true", children: h }),
2255
- /* @__PURE__ */ R("div", { className: ze.body, children: [
2308
+ /* @__PURE__ */ E("div", { className: ze.body, children: [
2256
2309
  o != null && /* @__PURE__ */ n("p", { className: ze.title, children: o }),
2257
2310
  l != null && /* @__PURE__ */ n("div", { className: ze.text, children: l })
2258
2311
  ] })
2259
2312
  ]
2260
2313
  }
2261
2314
  );
2262
- }), Ia = "_dialog_zbndh_2", Da = "_inner_zbndh_71", Ha = "_size4_zbndh_76", Sa = "_title_zbndh_80", Ta = "_closeX_zbndh_88", Ze = {
2263
- dialog: Ia,
2264
- inner: Da,
2315
+ }), Da = "_dialog_zbndh_2", Ia = "_inner_zbndh_71", Ha = "_size4_zbndh_76", Sa = "_title_zbndh_80", Ta = "_closeX_zbndh_88", Ze = {
2316
+ dialog: Da,
2317
+ inner: Ia,
2265
2318
  size4: Ha,
2266
2319
  title: Sa,
2267
2320
  closeX: Ta
2268
2321
  };
2269
2322
  let Ue = 0;
2270
2323
  const xt = Ee(null), We = () => {
2271
- const e = Ie(xt);
2324
+ const e = De(xt);
2272
2325
  if (!e) throw new Error("Dialog parts must be inside a Dialog");
2273
2326
  return e;
2274
2327
  };
2275
2328
  function Nt(e) {
2276
2329
  return function({ open: o, onOpenChange: r, children: a }) {
2277
- const [l, s] = Q(!1), c = o !== void 0, h = c ? o : l, m = (u) => {
2278
- c || s(u), r == null || r(u);
2279
- }, d = se(), C = se(), [$, y] = Q(!1);
2280
- return /* @__PURE__ */ n(xt.Provider, { value: { open: h, setOpen: m, titleId: d, descId: C, alert: e, hasDesc: $, setHasDesc: y }, children: a });
2330
+ const [l, s] = Q(!1), c = o !== void 0, h = c ? o : l, m = (_) => {
2331
+ c || s(_), r == null || r(_);
2332
+ }, u = se(), C = se(), [x, M] = Q(!1);
2333
+ return /* @__PURE__ */ n(xt.Provider, { value: { open: h, setOpen: m, titleId: u, descId: C, alert: e, hasDesc: x, setHasDesc: M }, children: a });
2281
2334
  };
2282
2335
  }
2283
2336
  const qa = Nt(!1), Mt = (e, t) => {
@@ -2305,8 +2358,8 @@ function at({
2305
2358
  function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, ...l }) {
2306
2359
  const s = We(), c = P(null), h = P(!1), m = P(!1);
2307
2360
  return te(() => {
2308
- const d = c.current;
2309
- d && (s.open && !d.open ? d.showModal() : !s.open && d.open && d.close());
2361
+ const u = c.current;
2362
+ u && (s.open && !u.open ? u.showModal() : !s.open && u.open && u.close());
2310
2363
  }, [s.open]), te(() => {
2311
2364
  if (s.open)
2312
2365
  return Ue += 1, Ue === 1 && (document.body.style.overflow = "hidden"), () => {
@@ -2320,14 +2373,14 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
2320
2373
  role: s.alert ? "alertdialog" : void 0,
2321
2374
  "aria-labelledby": s.titleId,
2322
2375
  "aria-describedby": s.hasDesc ? s.descId : void 0,
2323
- className: E(Ze.dialog, "spDialog", e === "4" && Ze.size4, o),
2376
+ className: H(Ze.dialog, "spDialog", e === "4" && Ze.size4, o),
2324
2377
  style: { ...t ? { maxWidth: t } : null, ...r },
2325
- onKeyDownCapture: (d) => {
2326
- var C, $;
2327
- d.key === "Escape" && ((C = c.current) != null && C.querySelector("dialog[open]") || ($ = c.current) != null && $.querySelector('[role="listbox"]:not([hidden])') && (h.current = !0));
2378
+ onKeyDownCapture: (u) => {
2379
+ var C, x;
2380
+ u.key === "Escape" && ((C = c.current) != null && C.querySelector("dialog[open]") || (x = c.current) != null && x.querySelector('[role="listbox"]:not([hidden])') && (h.current = !0));
2328
2381
  },
2329
- onCancel: (d) => {
2330
- if (d.preventDefault(), h.current) {
2382
+ onCancel: (u) => {
2383
+ if (u.preventDefault(), h.current) {
2331
2384
  h.current = !1;
2332
2385
  return;
2333
2386
  }
@@ -2336,13 +2389,13 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
2336
2389
  onClose: () => {
2337
2390
  s.open && s.setOpen(!1);
2338
2391
  },
2339
- onPointerDown: (d) => {
2340
- m.current = d.target === c.current;
2392
+ onPointerDown: (u) => {
2393
+ m.current = u.target === c.current;
2341
2394
  },
2342
- onClick: (d) => {
2343
- !s.alert && d.target === c.current && m.current && s.setOpen(!1);
2395
+ onClick: (u) => {
2396
+ !s.alert && u.target === c.current && m.current && s.setOpen(!1);
2344
2397
  },
2345
- children: /* @__PURE__ */ R("div", { className: Ze.inner, children: [
2398
+ children: /* @__PURE__ */ E("div", { className: Ze.inner, children: [
2346
2399
  !s.alert && /* @__PURE__ */ n(
2347
2400
  "button",
2348
2401
  {
@@ -2360,7 +2413,7 @@ function kt({ size: e = "3", maxWidth: t, className: o, style: r, children: a, .
2360
2413
  }
2361
2414
  function zt({ className: e, ...t }) {
2362
2415
  const o = We();
2363
- return /* @__PURE__ */ n(sn, { as: "h2", size: "5", ...t, id: o.titleId, className: E(Ze.title, e) });
2416
+ return /* @__PURE__ */ n(sn, { as: "h2", size: "5", ...t, id: o.titleId, className: H(Ze.title, e) });
2364
2417
  }
2365
2418
  function Rt(e) {
2366
2419
  const t = We(), { setHasDesc: o } = t;
@@ -2386,54 +2439,54 @@ const Gl = Object.assign(qa, {
2386
2439
  danger: Wa,
2387
2440
  separator: Pa
2388
2441
  }, Et = Ee(null), Fa = () => {
2389
- const e = Ie(Et);
2442
+ const e = De(Et);
2390
2443
  if (!e) throw new Error("DropdownMenu parts must be inside a DropdownMenu");
2391
2444
  return e;
2392
2445
  };
2393
2446
  function ja({ label: e, align: t = "start", children: o, ...r }) {
2394
- const [a, l] = Q(!1), s = se(), c = P(null), h = P(null), m = P(null), d = P(a);
2395
- d.current = a;
2396
- const C = pe((u) => {
2397
- d.current !== u && (d.current = u, l(u));
2398
- }, []), [$, y] = Q(null);
2447
+ const [a, l] = Q(!1), s = se(), c = P(null), h = P(null), m = P(null), u = P(a);
2448
+ u.current = a;
2449
+ const C = pe((_) => {
2450
+ u.current !== _ && (u.current = _, l(_));
2451
+ }, []), [x, M] = Q(null);
2399
2452
  return ye(() => {
2400
- var b;
2401
- const u = h.current;
2402
- if (u)
2453
+ var y;
2454
+ const _ = h.current;
2455
+ if (_)
2403
2456
  if (a) {
2404
2457
  const g = c.current;
2405
2458
  if (g) {
2406
- const N = g.getBoundingClientRect(), I = t === "end" ? "auto" : N.left, T = t === "end" ? window.innerWidth - N.right : "auto";
2407
- y({ top: N.bottom + 6, left: I, right: T });
2459
+ const L = g.getBoundingClientRect(), T = t === "end" ? "auto" : L.left, q = t === "end" ? window.innerWidth - L.right : "auto";
2460
+ M({ top: L.bottom + 6, left: T, right: q });
2408
2461
  }
2409
- u.showPopover(), (b = u.querySelector('[role="menuitem"]')) == null || b.focus();
2410
- } else u.matches(":popover-open") && u.hidePopover();
2462
+ _.showPopover(), (y = _.querySelector('[role="menuitem"]')) == null || y.focus();
2463
+ } else _.matches(":popover-open") && _.hidePopover();
2411
2464
  }, [a, t]), te(() => {
2412
2465
  if (!a) return;
2413
- const u = () => C(!1);
2414
- return window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
2415
- }, [a]), /* @__PURE__ */ R(Et.Provider, { value: { open: a, setOpen: C, menuId: s }, children: [
2466
+ const _ = () => C(!1);
2467
+ return window.addEventListener("resize", _), () => window.removeEventListener("resize", _);
2468
+ }, [a]), /* @__PURE__ */ E(Et.Provider, { value: { open: a, setOpen: C, menuId: s }, children: [
2416
2469
  /* @__PURE__ */ n(
2417
- Ke,
2470
+ Xe,
2418
2471
  {
2419
2472
  ...r,
2420
2473
  ref: c,
2421
2474
  "aria-haspopup": "menu",
2422
2475
  "aria-expanded": a,
2423
2476
  "aria-controls": s,
2424
- onPointerDown: (u) => {
2425
- var b;
2426
- (b = r.onPointerDown) == null || b.call(r, u), m.current = !d.current;
2477
+ onPointerDown: (_) => {
2478
+ var y;
2479
+ (y = r.onPointerDown) == null || y.call(r, _), m.current = !u.current;
2427
2480
  },
2428
- onKeyDown: (u) => {
2429
- var b;
2430
- (b = r.onKeyDown) == null || b.call(r, u), (u.key === "Enter" || u.key === " ") && (m.current = null);
2481
+ onKeyDown: (_) => {
2482
+ var y;
2483
+ (y = r.onKeyDown) == null || y.call(r, _), (_.key === "Enter" || _.key === " ") && (m.current = null);
2431
2484
  },
2432
- onClick: (u) => {
2485
+ onClick: (_) => {
2433
2486
  var g;
2434
- (g = r.onClick) == null || g.call(r, u);
2435
- const b = m.current ?? !d.current;
2436
- m.current = null, C(b);
2487
+ (g = r.onClick) == null || g.call(r, _);
2488
+ const y = m.current ?? !u.current;
2489
+ m.current = null, C(y);
2437
2490
  },
2438
2491
  children: e
2439
2492
  }
@@ -2446,20 +2499,20 @@ function ja({ label: e, align: t = "start", children: o, ...r }) {
2446
2499
  role: "menu",
2447
2500
  popover: "auto",
2448
2501
  className: Ve.menu,
2449
- style: $ ? {
2450
- top: $.top,
2451
- left: $.left === "auto" ? "auto" : $.left,
2452
- right: $.right === "auto" ? "auto" : $.right
2502
+ style: x ? {
2503
+ top: x.top,
2504
+ left: x.left === "auto" ? "auto" : x.left,
2505
+ right: x.right === "auto" ? "auto" : x.right
2453
2506
  } : void 0,
2454
- onToggle: (u) => {
2455
- u.nativeEvent.newState === "closed" && C(!1);
2507
+ onToggle: (_) => {
2508
+ _.nativeEvent.newState === "closed" && C(!1);
2456
2509
  },
2457
- onKeyDown: (u) => {
2458
- var N, I, T, X, G, D;
2459
- const b = Array.from(
2460
- ((N = h.current) == null ? void 0 : N.querySelectorAll('[role="menuitem"]')) ?? []
2461
- ), g = b.indexOf(document.activeElement);
2462
- u.key === "ArrowDown" ? (u.preventDefault(), (I = b[Math.min(g + 1, b.length - 1)]) == null || I.focus()) : u.key === "ArrowUp" ? (u.preventDefault(), (T = b[Math.max(g - 1, 0)]) == null || T.focus()) : u.key === "Home" ? (u.preventDefault(), (X = b[0]) == null || X.focus()) : u.key === "End" ? (u.preventDefault(), (G = b[b.length - 1]) == null || G.focus()) : u.key === "Escape" && (C(!1), (D = c.current) == null || D.focus());
2510
+ onKeyDown: (_) => {
2511
+ var L, T, q, X, U, D;
2512
+ const y = Array.from(
2513
+ ((L = h.current) == null ? void 0 : L.querySelectorAll('[role="menuitem"]')) ?? []
2514
+ ), g = y.indexOf(document.activeElement);
2515
+ _.key === "ArrowDown" ? (_.preventDefault(), (T = y[Math.min(g + 1, y.length - 1)]) == null || T.focus()) : _.key === "ArrowUp" ? (_.preventDefault(), (q = y[Math.max(g - 1, 0)]) == null || q.focus()) : _.key === "Home" ? (_.preventDefault(), (X = y[0]) == null || X.focus()) : _.key === "End" ? (_.preventDefault(), (U = y[y.length - 1]) == null || U.focus()) : _.key === "Escape" && (C(!1), (D = c.current) == null || D.focus());
2463
2516
  },
2464
2517
  children: o
2465
2518
  }
@@ -2472,50 +2525,50 @@ function Ga({
2472
2525
  return /* @__PURE__ */ n("div", { className: Ve.label, children: e });
2473
2526
  }
2474
2527
  function Ua({ asChild: e, color: t, onSelect: o, children: r }) {
2475
- const a = Fa(), l = E(Ve.item, t === "danger" && Ve.danger), s = () => {
2528
+ const a = Fa(), l = H(Ve.item, t === "danger" && Ve.danger), s = () => {
2476
2529
  a.setOpen(!1), o == null || o();
2477
2530
  };
2478
2531
  if (e && Re(r)) {
2479
2532
  const c = r, {
2480
2533
  className: h,
2481
2534
  onClick: m,
2482
- children: d,
2535
+ children: u,
2483
2536
  role: C,
2484
- tabIndex: $,
2485
- ...y
2486
- } = c.props, u = c.ref;
2537
+ tabIndex: x,
2538
+ ...M
2539
+ } = c.props, _ = c.ref;
2487
2540
  return rt(
2488
2541
  c.type,
2489
2542
  {
2490
2543
  key: c.key,
2491
- ref: u,
2544
+ ref: _,
2492
2545
  role: "menuitem",
2493
2546
  tabIndex: -1,
2494
- ...y,
2495
- className: E(l, h),
2496
- onClick: (b) => {
2497
- m == null || m(b), a.setOpen(!1);
2547
+ ...M,
2548
+ className: H(l, h),
2549
+ onClick: (y) => {
2550
+ m == null || m(y), a.setOpen(!1);
2498
2551
  }
2499
2552
  },
2500
- d
2553
+ u
2501
2554
  );
2502
2555
  }
2503
2556
  return /* @__PURE__ */ n("button", { type: "button", role: "menuitem", tabIndex: -1, className: l, onClick: s, children: r });
2504
2557
  }
2505
- function Ka() {
2558
+ function Xa() {
2506
2559
  return /* @__PURE__ */ n("div", { role: "separator", className: Ve.separator });
2507
2560
  }
2508
- const Kl = Object.assign(ja, { Item: Ua, Separator: Ka, Label: Ga }), Xa = "_list_1b44l_19", Ya = "_trigger_1b44l_28", It = {
2509
- list: Xa,
2561
+ const Xl = Object.assign(ja, { Item: Ua, Separator: Xa, Label: Ga }), Ka = "_list_1b44l_19", Ya = "_trigger_1b44l_28", Dt = {
2562
+ list: Ka,
2510
2563
  trigger: Ya
2511
- }, Dt = Ee(null), Ht = () => {
2512
- const e = Ie(Dt);
2564
+ }, It = Ee(null), Ht = () => {
2565
+ const e = De(It);
2513
2566
  if (!e) throw new Error("Tabs parts must be inside a Tabs");
2514
2567
  return e;
2515
2568
  };
2516
2569
  function Qa({ value: e, onValueChange: t, className: o, children: r }) {
2517
2570
  const a = se();
2518
- return /* @__PURE__ */ n(Dt.Provider, { value: { value: e, onValueChange: t, id: a }, children: /* @__PURE__ */ n("div", { className: o, children: r }) });
2571
+ return /* @__PURE__ */ n(It.Provider, { value: { value: e, onValueChange: t, id: a }, children: /* @__PURE__ */ n("div", { className: o, children: r }) });
2519
2572
  }
2520
2573
  function Ja({
2521
2574
  children: e
@@ -2524,7 +2577,7 @@ function Ja({
2524
2577
  "div",
2525
2578
  {
2526
2579
  role: "tablist",
2527
- className: E(It.list, "spTabsList"),
2580
+ className: H(Dt.list, "spTabsList"),
2528
2581
  onKeyDown: (t) => {
2529
2582
  const o = Array.from(
2530
2583
  t.currentTarget.querySelectorAll('[role="tab"]')
@@ -2566,7 +2619,7 @@ function el({ value: e, className: t, children: o, ...r }) {
2566
2619
  "aria-controls": `${a.id}-panel-${e}`,
2567
2620
  tabIndex: l ? 0 : -1,
2568
2621
  "data-state": l ? "active" : "inactive",
2569
- className: E(It.trigger, "spTabsTrigger", t),
2622
+ className: H(Dt.trigger, "spTabsTrigger", t),
2570
2623
  onClick: () => a.onValueChange(e),
2571
2624
  children: o
2572
2625
  }
@@ -2579,7 +2632,7 @@ function tl({
2579
2632
  const o = Ht();
2580
2633
  return o.value !== e ? null : /* @__PURE__ */ n("div", { role: "tabpanel", id: `${o.id}-panel-${e}`, "aria-labelledby": `${o.id}-tab-${e}`, children: t });
2581
2634
  }
2582
- const Xl = Object.assign(Qa, { List: Ja, Trigger: el, Content: tl }), nl = "_panel_5axce_9", ol = {
2635
+ const Kl = Object.assign(Qa, { List: Ja, Trigger: el, Content: tl }), nl = "_panel_5axce_9", ol = {
2583
2636
  panel: nl
2584
2637
  }, pt = 8, Be = 8, rl = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
2585
2638
  function Yl({
@@ -2594,63 +2647,63 @@ function Yl({
2594
2647
  onClick: h,
2595
2648
  ...m
2596
2649
  }) {
2597
- const [d, C] = Q(a), $ = o !== void 0, y = $ ? o : d, u = se(), b = se(), g = P(null), N = P(null), [I, T] = Q(null), X = P(!1), G = P(!1), D = P(null), q = P(y);
2598
- q.current = y;
2599
- const V = pe(
2600
- (x) => {
2601
- q.current !== x && (q.current = x, $ || C(x), r == null || r(x));
2650
+ const [u, C] = Q(a), x = o !== void 0, M = x ? o : u, _ = se(), y = se(), g = P(null), L = P(null), [T, q] = Q(null), X = P(!1), U = P(!1), D = P(null), A = P(M);
2651
+ A.current = M;
2652
+ const F = pe(
2653
+ (k) => {
2654
+ A.current !== k && (A.current = k, x || C(k), r == null || r(k));
2602
2655
  },
2603
- [$, r]
2656
+ [x, r]
2604
2657
  ), K = pe(() => {
2605
- const x = g.current, k = N.current;
2606
- if (!x || !k) return;
2607
- const w = x.getBoundingClientRect(), H = k.offsetWidth, i = k.offsetHeight, z = w.bottom + pt, A = w.top - i - pt, v = z + i <= window.innerHeight - Be, M = A >= Be, W = l === "bottom" ? v || !M ? z : A : M || !v ? A : z, F = W === z ? "bottom" : "top";
2608
- k.dataset.side = F;
2609
- const U = s === "start" ? w.left : s === "end" ? w.right - H : w.left + w.width / 2 - H / 2, _ = Math.min(
2610
- Math.max(U, Be),
2611
- Math.max(window.innerWidth - H - Be, Be)
2658
+ const k = g.current, z = L.current;
2659
+ if (!k || !z) return;
2660
+ const B = k.getBoundingClientRect(), j = z.offsetWidth, p = z.offsetHeight, I = B.bottom + pt, Z = B.top - p - pt, b = I + p <= window.innerHeight - Be, R = Z >= Be, w = l === "bottom" ? b || !R ? I : Z : R || !b ? Z : I, v = w === I ? "bottom" : "top";
2661
+ z.dataset.side = v;
2662
+ const N = s === "start" ? B.left : s === "end" ? B.right - j : B.left + B.width / 2 - j / 2, d = Math.min(
2663
+ Math.max(N, Be),
2664
+ Math.max(window.innerWidth - j - Be, Be)
2612
2665
  );
2613
- T(
2614
- (L) => L && L.top === W && L.left === _ && L.placed === F ? L : { top: W, left: _, placed: F }
2666
+ q(
2667
+ ($) => $ && $.top === w && $.left === d && $.placed === v ? $ : { top: w, left: d, placed: v }
2615
2668
  );
2616
2669
  }, [l, s]);
2617
2670
  return ye(() => {
2618
- const x = N.current;
2619
- x && (y ? (Qe(x, K), K(), X.current && (X.current = !1, (x.querySelector(rl) ?? x).focus({ preventScroll: !0 }))) : x.matches(":popover-open") && x.hidePopover());
2620
- }, [y, K]), te(() => {
2621
- if (!y) return;
2622
- let x = 0, k = "";
2623
- const w = () => {
2624
- const H = g.current, i = N.current;
2625
- if (H && i) {
2626
- const z = H.getBoundingClientRect(), A = `${z.top}|${z.left}|${z.width}|${z.height}|${i.offsetWidth}|${i.offsetHeight}|${window.innerWidth}|${window.innerHeight}`;
2627
- A !== k && (k = A, K());
2671
+ const k = L.current;
2672
+ k && (M ? (Qe(k, K), K(), X.current && (X.current = !1, (k.querySelector(rl) ?? k).focus({ preventScroll: !0 }))) : k.matches(":popover-open") && k.hidePopover());
2673
+ }, [M, K]), te(() => {
2674
+ if (!M) return;
2675
+ let k = 0, z = "";
2676
+ const B = () => {
2677
+ const j = g.current, p = L.current;
2678
+ if (j && p) {
2679
+ const I = j.getBoundingClientRect(), Z = `${I.top}|${I.left}|${I.width}|${I.height}|${p.offsetWidth}|${p.offsetHeight}|${window.innerWidth}|${window.innerHeight}`;
2680
+ Z !== z && (z = Z, K());
2628
2681
  }
2629
- x = requestAnimationFrame(w);
2682
+ k = requestAnimationFrame(B);
2630
2683
  };
2631
- return x = requestAnimationFrame(w), () => cancelAnimationFrame(x);
2632
- }, [y, K]), /* @__PURE__ */ R(he, { children: [
2684
+ return k = requestAnimationFrame(B), () => cancelAnimationFrame(k);
2685
+ }, [M, K]), /* @__PURE__ */ E(he, { children: [
2633
2686
  /* @__PURE__ */ n(
2634
- Ke,
2687
+ Xe,
2635
2688
  {
2636
2689
  ...m,
2637
2690
  ref: g,
2638
- id: u,
2691
+ id: _,
2639
2692
  "aria-haspopup": "dialog",
2640
- "aria-expanded": y,
2641
- "aria-controls": b,
2642
- onPointerDown: (x) => {
2643
- var k;
2644
- (k = m.onPointerDown) == null || k.call(m, x), D.current = !q.current;
2693
+ "aria-expanded": M,
2694
+ "aria-controls": y,
2695
+ onPointerDown: (k) => {
2696
+ var z;
2697
+ (z = m.onPointerDown) == null || z.call(m, k), D.current = !A.current;
2645
2698
  },
2646
- onKeyDown: (x) => {
2647
- var k;
2648
- (k = m.onKeyDown) == null || k.call(m, x), (x.key === "Enter" || x.key === " ") && (D.current = null);
2699
+ onKeyDown: (k) => {
2700
+ var z;
2701
+ (z = m.onKeyDown) == null || z.call(m, k), (k.key === "Enter" || k.key === " ") && (D.current = null);
2649
2702
  },
2650
- onClick: (x) => {
2651
- h == null || h(x);
2652
- const k = D.current ?? !q.current;
2653
- D.current = null, k && (X.current = !0), V(k);
2703
+ onClick: (k) => {
2704
+ h == null || h(k);
2705
+ const z = D.current ?? !A.current;
2706
+ D.current = null, z && (X.current = !0), F(z);
2654
2707
  },
2655
2708
  children: e
2656
2709
  }
@@ -2658,22 +2711,22 @@ function Yl({
2658
2711
  /* @__PURE__ */ n(
2659
2712
  "div",
2660
2713
  {
2661
- ref: N,
2662
- id: b,
2714
+ ref: L,
2715
+ id: y,
2663
2716
  popover: "auto",
2664
2717
  role: "dialog",
2665
- "aria-labelledby": u,
2718
+ "aria-labelledby": _,
2666
2719
  tabIndex: -1,
2667
- className: E(ol.panel, ue.spacePanel, c),
2720
+ className: H(ol.panel, ue.spacePanel, c),
2668
2721
  "data-animated": m.animated === !1 ? "false" : void 0,
2669
- "data-side": (I == null ? void 0 : I.placed) ?? l,
2670
- style: I ? { top: I.top, left: I.left } : void 0,
2671
- onKeyDown: (x) => {
2672
- x.key === "Escape" && (G.current = !0, x.stopPropagation());
2722
+ "data-side": (T == null ? void 0 : T.placed) ?? l,
2723
+ style: T ? { top: T.top, left: T.left } : void 0,
2724
+ onKeyDown: (k) => {
2725
+ k.key === "Escape" && (U.current = !0, k.stopPropagation());
2673
2726
  },
2674
- onToggle: (x) => {
2675
- var k;
2676
- x.nativeEvent.newState === "closed" && (G.current && (G.current = !1, (k = g.current) == null || k.focus()), V(!1));
2727
+ onToggle: (k) => {
2728
+ var z;
2729
+ k.nativeEvent.newState === "closed" && (U.current && (U.current = !1, (z = g.current) == null || z.focus()), F(!1));
2677
2730
  },
2678
2731
  children: t
2679
2732
  }
@@ -2687,7 +2740,7 @@ export {
2687
2740
  Bl as BarList,
2688
2741
  Rl as BookmarkIcon,
2689
2742
  il as Box,
2690
- Ke as Button,
2743
+ Xe as Button,
2691
2744
  pl as Card,
2692
2745
  El as Carousel,
2693
2746
  Ol as Chart,
@@ -2701,23 +2754,23 @@ export {
2701
2754
  kl as ChevronUpIcon,
2702
2755
  Eo as CrossCircledIcon,
2703
2756
  Gl as Dialog,
2704
- Kl as DropdownMenu,
2757
+ Xl as DropdownMenu,
2705
2758
  bl as EnterFullScreenIcon,
2706
2759
  Ro as ExclamationTriangleIcon,
2707
- vl as ExitFullScreenIcon,
2760
+ Cl as ExitFullScreenIcon,
2708
2761
  cl as Flex,
2709
2762
  dl as Grid,
2710
2763
  sn as Heading,
2711
- Cl as HeartFilledIcon,
2764
+ vl as HeartFilledIcon,
2712
2765
  Ll as HeartIcon,
2713
2766
  Hl as IconToggle,
2714
2767
  zo as InfoCircledIcon,
2715
2768
  ll as Link,
2716
- Dl as Loader,
2769
+ Il as Loader,
2717
2770
  Ml as MagnifyingGlassIcon,
2718
2771
  jl as Message,
2719
2772
  Nl as MinusIcon,
2720
- Il as Pagination,
2773
+ Dl as Pagination,
2721
2774
  gl as Pencil1Icon,
2722
2775
  xl as PersonIcon,
2723
2776
  Zl as PieChart,
@@ -2730,7 +2783,7 @@ export {
2730
2783
  fl as Separator,
2731
2784
  _l as Share2Icon,
2732
2785
  Al as Slider,
2733
- Xl as Tabs,
2786
+ Kl as Tabs,
2734
2787
  Ut as Text,
2735
2788
  Tl as TextArea,
2736
2789
  it as TextField,