@abyss-project/commons-front-core 18.1.4 → 19.0.0

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/catalog/specs/markdown-editor.spec.ts +13 -0
  3. package/dist/{CookieConsentSettings-D97TY138.js → CookieConsentSettings-C22e74pq.js} +1 -1
  4. package/dist/{Surface-CN1zQYLJ.js → Surface-54j_wWRk.js} +2 -2
  5. package/dist/{Tabs-CxD9y18t.js → Tabs-D8h_6Ehv.js} +672 -665
  6. package/dist/components/data/DataTable/DataTableDesktop.d.ts +1 -1
  7. package/dist/components/data/DataTable/data-table.types.d.ts +5 -0
  8. package/dist/components/data/FacetPanel/FacetPanel.d.ts +3 -0
  9. package/dist/components/inputs/SegmentedControl/SegmentedControl.d.ts +8 -2
  10. package/dist/cookie-consent.js +2 -2
  11. package/dist/{design-theme-GGVSCauN.js → design-theme-F3TviTyp.js} +1 -1
  12. package/dist/{editors-CJ_6PXoL.js → editors-BvzrUh0u.js} +30836 -30826
  13. package/dist/editors.js +1 -1
  14. package/dist/hooks/use-rich-intl.hook.d.ts +8 -16
  15. package/dist/{index-BcsTtdwQ.js → index-BAcL0gZM.js} +4 -4
  16. package/dist/{index-ByRUmH_4.js → index-BCKWga5S.js} +3 -3
  17. package/dist/{index-BQFouU9U.js → index-BZthWcJ5.js} +2 -2
  18. package/dist/{index-B6QYagVk.js → index-BlvA6Lxv.js} +2 -2
  19. package/dist/{index-Drwqi2Fr.js → index-BnIrh2JM.js} +2 -2
  20. package/dist/{index-p3G-JM7E.js → index-CP9wCW4Z.js} +3 -3
  21. package/dist/{index-4MsOXuOU.js → index-CXSxZiqU.js} +2 -2
  22. package/dist/{index-7M2xC_9h.js → index-CeuzZh-h.js} +2 -2
  23. package/dist/{index-Dtfo8fKg.js → index-ChFskeZj.js} +4 -4
  24. package/dist/{index-CXUHmTse.js → index-Co1Gxp6L.js} +2 -2
  25. package/dist/{index-Cl1UafyM.js → index-Cxvpt5Rk.js} +2 -2
  26. package/dist/{index-5HFSSrP-.js → index-CzBp_cay.js} +1 -1
  27. package/dist/{index-Berc0QsZ.js → index-DArDCeHJ.js} +4 -4
  28. package/dist/{index-BbbyRlLu.js → index-DXzb3gco.js} +2 -2
  29. package/dist/{index-BQLAeM_n.js → index-DhSyqz6f.js} +2 -2
  30. package/dist/{index-Dh1lFi8d.js → index-DhYE_E7U.js} +2 -2
  31. package/dist/{index-Bbc0SjAt.js → index-DkqoRb8_.js} +2 -2
  32. package/dist/{index-8o9jiKS2.js → index-DlREX3RV.js} +2 -2
  33. package/dist/{index-VLxkKEWK.js → index-DyR6n35f.js} +3 -3
  34. package/dist/{index-5BCfqxIs.js → index-VOYH3T8l.js} +2 -2
  35. package/dist/{index-DQgpUR1S.js → index-qfXRn5GL.js} +3 -3
  36. package/dist/index.js +4304 -4252
  37. package/dist/latex-DMur4Nmq.js +4 -0
  38. package/dist/legacy/components/Chips/index.d.ts +0 -2
  39. package/dist/legacy.js +1235 -1258
  40. package/package.json +5 -5
  41. package/dist/legacy/components/Chips/ApplicationWebhookTypeChip/ApplicationWebhookTypeChip.component.d.ts +0 -7
  42. package/dist/legacy/components/Chips/ApplicationWebhookTypeChip/index.d.ts +0 -1
  43. package/dist/legacy/components/Chips/WebhookTypeChip/WebhookTypeChip.component.d.ts +0 -7
  44. package/dist/legacy/components/Chips/WebhookTypeChip/index.d.ts +0 -1
  45. package/test-results/catalog/.last-run.json +0 -4
@@ -1,4 +1,4 @@
1
- import { jsxs as x, jsx as i, Fragment as J } from "react/jsx-runtime";
1
+ import { jsxs as C, jsx as i, Fragment as J } from "react/jsx-runtime";
2
2
  import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as X, useCallback as Q, useEffect as V, createContext as ze, useContext as Ae, useLayoutEffect as Le } from "react";
3
3
  import le from "@mui/material/FormControl";
4
4
  import se from "@mui/material/FormHelperText";
@@ -8,7 +8,7 @@ import hn from "@mui/material/Select";
8
8
  import { styled as l, useTheme as bn, getContrastRatio as ke } from "@mui/material/styles";
9
9
  import { visuallyHidden as fe } from "@mui/utils";
10
10
  import { useIntl as P } from "react-intl";
11
- import { a as A, p as o, h as D, d as Z, D as K, g as yn, t as De, s as de, i as oe, j as te, c as Pe, e as He, k as vn, B as wn } from "./Surface-CN1zQYLJ.js";
11
+ import { a as A, p as o, h as D, d as Z, D as K, g as yn, t as De, s as de, i as oe, j as te, c as Pe, e as He, k as vn, B as wn } from "./Surface-54j_wWRk.js";
12
12
  import { i as xn, b as Cn, r as kn, u as Sn, A as In, E as Fn } from "./index-C27b790L.js";
13
13
  import Y from "@mui/material/Button";
14
14
  import { byteSizeIEC as Wn } from "@abyss-project/main";
@@ -55,21 +55,21 @@ const Yn = l(Gn)(({ theme: e }) => ({
55
55
  }));
56
56
  function Ve({
57
57
  label: e,
58
- help: n,
59
- error: t,
58
+ help: t,
59
+ error: n,
60
60
  required: r = !1,
61
- children: s
61
+ children: a
62
62
  }) {
63
- const d = N(), a = s.props.id ?? d, c = `${a}-label`, g = n !== void 0 ? `${a}-help` : void 0, C = t != null && t !== !1 && t !== "", y = C && t !== !0, u = y ? `${a}-error` : void 0, h = [s.props["aria-describedby"], g, u].filter((p) => p !== void 0 && p !== "").join(" ") || void 0, m = mn(s, {
64
- id: a,
65
- "aria-describedby": h,
66
- ...Kn(s, ["Select"]) && { labelId: c }
63
+ const u = N(), s = a.props.id ?? u, d = `${s}-label`, g = t !== void 0 ? `${s}-help` : void 0, h = n != null && n !== !1 && n !== "", b = h && n !== !0, m = b ? `${s}-error` : void 0, f = [a.props["aria-describedby"], g, m].filter((c) => c !== void 0 && c !== "").join(" ") || void 0, w = mn(a, {
64
+ id: s,
65
+ "aria-describedby": f,
66
+ ...Kn(a, ["Select"]) && { labelId: d }
67
67
  });
68
- return /* @__PURE__ */ x(le, { fullWidth: !0, error: C, required: r, children: [
69
- /* @__PURE__ */ i(Yn, { id: c, htmlFor: a, children: e }),
70
- m,
71
- n !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: n }),
72
- y && /* @__PURE__ */ i(se, { id: u, children: t })
68
+ return /* @__PURE__ */ C(le, { fullWidth: !0, error: h, required: r, children: [
69
+ /* @__PURE__ */ i(Yn, { id: d, htmlFor: s, children: e }),
70
+ w,
71
+ t !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: t }),
72
+ b && /* @__PURE__ */ i(se, { id: m, children: n })
73
73
  ] });
74
74
  }
75
75
  var je = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e))(je || {});
@@ -94,8 +94,8 @@ const Ge = {
94
94
  danger: Ln
95
95
  }, Zn = l("div", {
96
96
  shouldForwardProp: (e) => e !== "severity"
97
- })(({ theme: e, severity: n }) => {
98
- const { tokens: t, space: r, radii: s, fonts: d, typeScale: a } = e.design, { solid: c, soft: g } = Ge[n];
97
+ })(({ theme: e, severity: t }) => {
98
+ const { tokens: n, space: r, radii: a, fonts: u, typeScale: s } = e.design, { solid: d, soft: g } = Ge[t];
99
99
  return {
100
100
  display: "flex",
101
101
  alignItems: "flex-start",
@@ -103,23 +103,23 @@ const Ge = {
103
103
  minWidth: 0,
104
104
  boxSizing: "border-box",
105
105
  padding: `${o(r[3])} ${o(r[3])} ${o(r[3])} ${o(r[4])}`,
106
- backgroundColor: t[g],
107
- border: D(t[c]),
108
- borderRadius: o(s.md),
109
- color: t["text.primary"],
110
- fontFamily: d.sans,
111
- fontSize: o(a.body)
106
+ backgroundColor: n[g],
107
+ border: D(n[d]),
108
+ borderRadius: o(a.md),
109
+ color: n["text.primary"],
110
+ fontFamily: u.sans,
111
+ fontSize: o(s.body)
112
112
  };
113
113
  }), Jn = l("span", {
114
114
  shouldForwardProp: (e) => e !== "severity"
115
- })(({ theme: e, severity: n }) => {
116
- const { tokens: t, space: r } = e.design;
115
+ })(({ theme: e, severity: t }) => {
116
+ const { tokens: n, space: r } = e.design;
117
117
  return {
118
118
  display: "inline-flex",
119
119
  flex: "none",
120
120
  // Centered on the first line of text.
121
121
  paddingTop: o(r[1] / 2),
122
- color: t[Ge[n].solid],
122
+ color: n[Ge[t].solid],
123
123
  "& svg": {
124
124
  width: o(r[4] + r[1]),
125
125
  height: o(r[4] + r[1])
@@ -164,35 +164,35 @@ const Ge = {
164
164
  }), it = l(ae)(({ theme: e }) => yn(e));
165
165
  function st({
166
166
  severity: e,
167
- title: n,
168
- children: t,
167
+ title: t,
168
+ children: n,
169
169
  action: r,
170
- onClose: s,
171
- icon: d
170
+ onClose: a,
171
+ icon: u
172
172
  }) {
173
- const a = P(), c = N(), g = Qn[e];
174
- return /* @__PURE__ */ x(
173
+ const s = P(), d = N(), g = Qn[e];
174
+ return /* @__PURE__ */ C(
175
175
  Zn,
176
176
  {
177
177
  severity: e,
178
178
  role: e === "danger" ? "alert" : "status",
179
- "aria-labelledby": n !== void 0 ? c : void 0,
179
+ "aria-labelledby": t !== void 0 ? d : void 0,
180
180
  "data-severity": e,
181
181
  children: [
182
- /* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: d ?? /* @__PURE__ */ i(g, {}) }),
183
- /* @__PURE__ */ x(et, { children: [
184
- /* @__PURE__ */ x(nt, { children: [
185
- n !== void 0 && /* @__PURE__ */ i(ot, { id: c, children: n }),
186
- /* @__PURE__ */ i(tt, { children: t })
182
+ /* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: u ?? /* @__PURE__ */ i(g, {}) }),
183
+ /* @__PURE__ */ C(et, { children: [
184
+ /* @__PURE__ */ C(nt, { children: [
185
+ t !== void 0 && /* @__PURE__ */ i(ot, { id: d, children: t }),
186
+ /* @__PURE__ */ i(tt, { children: n })
187
187
  ] }),
188
188
  r !== void 0 && /* @__PURE__ */ i(rt, { children: r })
189
189
  ] }),
190
- s !== void 0 && /* @__PURE__ */ i(
190
+ a !== void 0 && /* @__PURE__ */ i(
191
191
  it,
192
192
  {
193
193
  size: "small",
194
- "aria-label": a.formatMessage({ id: "ds.states.callout.close" }),
195
- onClick: s,
194
+ "aria-label": s.formatMessage({ id: "ds.states.callout.close" }),
195
+ onClick: a,
196
196
  children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 })
197
197
  }
198
198
  )
@@ -200,49 +200,49 @@ function st({
200
200
  }
201
201
  );
202
202
  }
203
- const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet <= n) && xn(e, t), Ue = (e, n, t) => [
203
+ const U = (e) => e.id ?? e.name, qe = (e, t, n) => (t === void 0 || e.sizeOctet <= t) && xn(e, n), Ue = (e, t, n) => [
204
204
  ...(e.childFile ?? []).filter(
205
- (r) => qe(r, n, t)
205
+ (r) => qe(r, t, n)
206
206
  ),
207
207
  ...(e.childFolder ?? []).flatMap(
208
- (r) => Ue(r, n, t)
208
+ (r) => Ue(r, t, n)
209
209
  )
210
210
  ], ue = l("div", {
211
211
  shouldForwardProp: (e) => e !== "selected"
212
- })(({ theme: e, selected: n }) => {
213
- const { tokens: t, space: r, radii: s, densityValues: d, density: a, typeScale: c } = e.design;
212
+ })(({ theme: e, selected: t }) => {
213
+ const { tokens: n, space: r, radii: a, densityValues: u, density: s, typeScale: d } = e.design;
214
214
  return {
215
215
  display: "flex",
216
216
  alignItems: "center",
217
217
  gap: o(r[1]),
218
- minHeight: o(d[a].control),
219
- borderRadius: o(s.md),
220
- backgroundColor: n ? de(t.accent) : "transparent",
221
- fontSize: o(c.body),
222
- color: t["text.primary"],
218
+ minHeight: o(u[s].control),
219
+ borderRadius: o(a.md),
220
+ backgroundColor: t ? de(n.accent) : "transparent",
221
+ fontSize: o(d.body),
222
+ color: n["text.primary"],
223
223
  ...De(e)
224
224
  };
225
225
  }), Ke = (e) => {
226
- const { tokens: n, space: t, radii: r, fonts: s } = e.design;
226
+ const { tokens: t, space: n, radii: r, fonts: a } = e.design;
227
227
  return {
228
228
  flex: "1 1 auto",
229
229
  minWidth: 0,
230
230
  display: "flex",
231
231
  alignItems: "center",
232
- gap: o(t[2]),
232
+ gap: o(n[2]),
233
233
  alignSelf: "stretch",
234
234
  margin: 0,
235
- padding: `0 ${o(t[2])}`,
235
+ padding: `0 ${o(n[2])}`,
236
236
  border: "none",
237
237
  borderRadius: o(r.md),
238
238
  background: "none",
239
239
  color: "inherit",
240
240
  font: "inherit",
241
- fontFamily: s.sans,
241
+ fontFamily: a.sans,
242
242
  textAlign: "left",
243
243
  cursor: "pointer",
244
244
  transition: oe(e, ["background-color"]),
245
- "&:hover": { backgroundColor: n["bg.hover"] },
245
+ "&:hover": { backgroundColor: t["bg.hover"] },
246
246
  "&:focus-visible": te(e)
247
247
  };
248
248
  }, Xe = l("button")(({ theme: e }) => Ke(e)), at = l("label")(({ theme: e }) => Ke(e)), Ye = l("span", {
@@ -255,28 +255,28 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
255
255
  whiteSpace: "nowrap",
256
256
  fontWeight: e ? A.medium : A.regular
257
257
  })), Qe = l("span")(({ theme: e }) => {
258
- const { tokens: n, space: t, radii: r } = e.design;
258
+ const { tokens: t, space: n, radii: r } = e.design;
259
259
  return {
260
260
  display: "inline-flex",
261
261
  flex: "none",
262
262
  alignItems: "center",
263
263
  justifyContent: "center",
264
- width: o(t[5]),
265
- height: o(t[5]),
264
+ width: o(n[5]),
265
+ height: o(n[5]),
266
266
  overflow: "hidden",
267
267
  borderRadius: o(r.sm),
268
- color: n["text.muted"],
269
- "& svg": { width: o(t[5]), height: o(t[5]) },
268
+ color: t["text.muted"],
269
+ "& svg": { width: o(n[5]), height: o(n[5]) },
270
270
  "& img": { width: "100%", height: "100%", objectFit: "cover" }
271
271
  };
272
272
  }), lt = l(_n, {
273
273
  shouldForwardProp: (e) => e !== "open"
274
- })(({ theme: e, open: n }) => ({
274
+ })(({ theme: e, open: t }) => ({
275
275
  flex: "none",
276
276
  width: o(e.design.space[4]),
277
277
  height: o(e.design.space[4]),
278
278
  color: e.design.tokens["text.muted"],
279
- transform: n ? "rotate(90deg)" : "none",
279
+ transform: t ? "rotate(90deg)" : "none",
280
280
  transition: oe(e, ["transform"])
281
281
  })), Ze = l(Pn)(({ theme: e }) => ({
282
282
  [Z.down(K.Tablet)]: {
@@ -293,23 +293,23 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
293
293
  })), Me = l("li")({ listStyle: "none" });
294
294
  function Je({
295
295
  folders: e,
296
- files: n,
297
- context: t
296
+ files: t,
297
+ context: n
298
298
  }) {
299
- return /* @__PURE__ */ x(J, { children: [
300
- e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(pt, { folder: r, context: t }) }, r.id ?? r.name)),
301
- n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ut, { file: r, context: t }) }, U(r)))
299
+ return /* @__PURE__ */ C(J, { children: [
300
+ e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(pt, { folder: r, context: n }) }, r.id ?? r.name)),
301
+ t.filter((r) => qe(r, n.maxSize, n.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ut, { file: r, context: n }) }, U(r)))
302
302
  ] });
303
303
  }
304
304
  function ct({
305
305
  file: e,
306
- getFileThumbnailUrl: n
306
+ getFileThumbnailUrl: t
307
307
  }) {
308
- const [t, r] = F(!1), s = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !t ? n(e.thumbnailPublicAccessId) : null;
309
- return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s !== null ? /* @__PURE__ */ i(
308
+ const [n, r] = F(!1), a = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !n ? t(e.thumbnailPublicAccessId) : null;
309
+ return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: a !== null ? /* @__PURE__ */ i(
310
310
  "img",
311
311
  {
312
- src: s,
312
+ src: a,
313
313
  alt: "",
314
314
  draggable: !1,
315
315
  onError: () => r(!0)
@@ -318,77 +318,77 @@ function ct({
318
318
  }
319
319
  function ut({
320
320
  file: e,
321
- context: n
321
+ context: t
322
322
  }) {
323
- const t = N(), r = n.selectedIds.has(U(e)), s = () => r ? n.unselect([e]) : n.select([e]), d = /* @__PURE__ */ x(J, { children: [
323
+ const n = N(), r = t.selectedIds.has(U(e)), a = () => r ? t.unselect([e]) : t.select([e]), u = /* @__PURE__ */ C(J, { children: [
324
324
  /* @__PURE__ */ i(
325
325
  ct,
326
326
  {
327
327
  file: e,
328
- getFileThumbnailUrl: n.getFileThumbnailUrl
328
+ getFileThumbnailUrl: t.getFileThumbnailUrl
329
329
  }
330
330
  ),
331
331
  /* @__PURE__ */ i(Ye, { strong: r, title: e.name, children: e.name })
332
332
  ] });
333
- return n.multiple ? /* @__PURE__ */ x(ue, { selected: r, children: [
333
+ return t.multiple ? /* @__PURE__ */ C(ue, { selected: r, children: [
334
334
  /* @__PURE__ */ i(
335
335
  Ze,
336
336
  {
337
- id: t,
337
+ id: n,
338
338
  size: "small",
339
339
  checked: r,
340
- onChange: s
340
+ onChange: a
341
341
  }
342
342
  ),
343
- /* @__PURE__ */ i(at, { htmlFor: t, children: d })
344
- ] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Xe, { type: "button", "aria-pressed": r, onClick: s, children: d }) });
343
+ /* @__PURE__ */ i(at, { htmlFor: n, children: u })
344
+ ] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Xe, { type: "button", "aria-pressed": r, onClick: a, children: u }) });
345
345
  }
346
346
  function pt({
347
347
  folder: e,
348
- context: n
348
+ context: t
349
349
  }) {
350
- const t = P(), r = N(), [s, d] = F(!1), a = Ue(e, n.maxSize, n.accept), c = a.filter(
351
- (C) => n.selectedIds.has(U(C))
352
- ).length, g = a.length > 0 && c === a.length;
353
- return /* @__PURE__ */ x(J, { children: [
354
- /* @__PURE__ */ x(ue, { selected: g, children: [
355
- n.multiple && /* @__PURE__ */ i(
350
+ const n = P(), r = N(), [a, u] = F(!1), s = Ue(e, t.maxSize, t.accept), d = s.filter(
351
+ (h) => t.selectedIds.has(U(h))
352
+ ).length, g = s.length > 0 && d === s.length;
353
+ return /* @__PURE__ */ C(J, { children: [
354
+ /* @__PURE__ */ C(ue, { selected: g, children: [
355
+ t.multiple && /* @__PURE__ */ i(
356
356
  Ze,
357
357
  {
358
358
  size: "small",
359
359
  checked: g,
360
- indeterminate: c > 0 && !g,
361
- disabled: a.length === 0,
362
- onChange: () => g ? n.unselect(a) : n.select(a),
360
+ indeterminate: d > 0 && !g,
361
+ disabled: s.length === 0,
362
+ onChange: () => g ? t.unselect(s) : t.select(s),
363
363
  inputProps: {
364
- "aria-label": t.formatMessage(
364
+ "aria-label": n.formatMessage(
365
365
  { id: "ds.business.cloud-import.select-folder" },
366
366
  { name: e.name }
367
367
  )
368
368
  }
369
369
  }
370
370
  ),
371
- /* @__PURE__ */ x(
371
+ /* @__PURE__ */ C(
372
372
  Xe,
373
373
  {
374
374
  type: "button",
375
- "aria-expanded": s,
376
- "aria-controls": s ? r : void 0,
377
- onClick: () => d(!s),
375
+ "aria-expanded": a,
376
+ "aria-controls": a ? r : void 0,
377
+ onClick: () => u(!a),
378
378
  children: [
379
- /* @__PURE__ */ i(lt, { open: s, "aria-hidden": !0 }),
380
- /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
379
+ /* @__PURE__ */ i(lt, { open: a, "aria-hidden": !0 }),
380
+ /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: a ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
381
381
  /* @__PURE__ */ i(Ye, { strong: g, title: e.name, children: e.name })
382
382
  ]
383
383
  }
384
384
  )
385
385
  ] }),
386
- s && /* @__PURE__ */ i(dt, { id: r, children: /* @__PURE__ */ i(
386
+ a && /* @__PURE__ */ i(dt, { id: r, children: /* @__PURE__ */ i(
387
387
  Je,
388
388
  {
389
389
  folders: e.childFolder ?? [],
390
390
  files: e.childFile ?? [],
391
- context: n
391
+ context: t
392
392
  }
393
393
  ) })
394
394
  ] });
@@ -416,46 +416,46 @@ const Oe = "shared", Te = {
416
416
  fontSize: o(e.design.typeScale.small),
417
417
  color: e.design.tokens["text.muted"]
418
418
  })), ht = l("ul")(({ theme: e }) => {
419
- const { tokens: n, space: t, radii: r } = e.design;
419
+ const { tokens: t, space: n, radii: r } = e.design;
420
420
  return {
421
421
  margin: 0,
422
- padding: o(t[1]),
422
+ padding: o(n[1]),
423
423
  listStyle: "none",
424
- minHeight: o(t[10] * 3),
425
- border: D(n["border.subtle"]),
424
+ minHeight: o(n[10] * 3),
425
+ border: D(t["border.subtle"]),
426
426
  borderRadius: o(r.md)
427
427
  };
428
428
  }), ne = l("div")(({ theme: e }) => {
429
- const { tokens: n, space: t, typeScale: r } = e.design;
429
+ const { tokens: t, space: n, typeScale: r } = e.design;
430
430
  return {
431
431
  display: "flex",
432
432
  flexDirection: "column",
433
433
  alignItems: "center",
434
434
  justifyContent: "center",
435
- gap: o(t[3]),
436
- minHeight: o(t[10] * 3),
437
- padding: o(t[5]),
435
+ gap: o(n[3]),
436
+ minHeight: o(n[10] * 3),
437
+ padding: o(n[5]),
438
438
  textAlign: "center",
439
439
  fontSize: o(r.body),
440
- color: n["text.secondary"],
440
+ color: t["text.secondary"],
441
441
  "& > svg": {
442
- width: o(t[7]),
443
- height: o(t[7]),
444
- color: n["text.muted"]
442
+ width: o(n[7]),
443
+ height: o(n[7]),
444
+ color: t["text.muted"]
445
445
  }
446
446
  };
447
447
  }), bt = l("span")(({ theme: e }) => {
448
- const { tokens: n, space: t, radii: r } = e.design;
448
+ const { tokens: t, space: n, radii: r } = e.design;
449
449
  return {
450
450
  display: "inline-flex",
451
451
  alignItems: "center",
452
452
  justifyContent: "center",
453
- width: o(t[9] + t[2]),
454
- height: o(t[9] + t[2]),
453
+ width: o(n[9] + n[2]),
454
+ height: o(n[9] + n[2]),
455
455
  borderRadius: o(r.lg),
456
- backgroundColor: de(n["status.warning"]),
457
- color: n["status.warning"],
458
- "& svg": { width: o(t[6]), height: o(t[6]) }
456
+ backgroundColor: de(t["status.warning"]),
457
+ color: t["status.warning"],
458
+ "& svg": { width: o(n[6]), height: o(n[6]) }
459
459
  };
460
460
  }), yt = l("p")(({ theme: e }) => ({
461
461
  margin: 0,
@@ -489,89 +489,89 @@ const Oe = "shared", Te = {
489
489
  // A narrow screen wraps it: the scope and the organization tell same-named Spaces apart.
490
490
  overflowWrap: "anywhere"
491
491
  })), en = l("span")(({ theme: e }) => {
492
- const { tokens: n, space: t, radii: r } = e.design;
492
+ const { tokens: t, space: n, radii: r } = e.design;
493
493
  return {
494
494
  display: "inline-flex",
495
495
  flex: "none",
496
496
  alignItems: "center",
497
497
  justifyContent: "center",
498
- minWidth: o(t[5]),
499
- height: o(t[5]),
498
+ minWidth: o(n[5]),
499
+ height: o(n[5]),
500
500
  borderRadius: o(r.sm),
501
- color: n["accent.text"],
502
- "& > svg": { width: o(t[4]), height: o(t[4]) }
501
+ color: t["accent.text"],
502
+ "& > svg": { width: o(n[4]), height: o(n[4]) }
503
503
  };
504
504
  }), Ft = l(en)(({ theme: e }) => ({
505
505
  marginRight: o(e.design.space[2])
506
506
  })), Wt = l("li")({ listStyle: "none" }), Mt = l("div")(({ theme: e }) => {
507
- const { space: n, tokens: t, typeScale: r } = e.design;
507
+ const { space: t, tokens: n, typeScale: r } = e.design;
508
508
  return {
509
- padding: `${o(n[2])} ${o(n[3])} ${o(n[1])}`,
509
+ padding: `${o(t[2])} ${o(t[3])} ${o(t[1])}`,
510
510
  fontSize: o(r.caption),
511
511
  fontWeight: A.semibold,
512
512
  letterSpacing: "0.05em",
513
513
  textTransform: "uppercase",
514
- color: t["text.muted"]
514
+ color: n["text.muted"]
515
515
  };
516
516
  }), Ot = l("ul")({ margin: 0, padding: 0 });
517
517
  function Tt({
518
518
  cloudPicker: e,
519
- onImport: n,
520
- multiple: t = !1,
519
+ onImport: t,
520
+ multiple: n = !1,
521
521
  maxSize: r,
522
- accept: s
522
+ accept: a
523
523
  }) {
524
524
  const {
525
- abyssCloudUrl: d,
526
- getFileThumbnailUrl: a,
527
- getSpaceDisplay: c,
525
+ abyssCloudUrl: u,
526
+ getFileThumbnailUrl: s,
527
+ getSpaceDisplay: d,
528
528
  clouds: g,
529
- cloudShares: C,
530
- isLoading: y,
531
- hasError: u,
532
- refresh: h,
533
- onCreateCloud: m,
534
- fetchCloudRepository: p
535
- } = e, f = P(), [b, v] = F(null), [W, M] = F(null), [O, S] = F(
529
+ cloudShares: h,
530
+ isLoading: b,
531
+ hasError: m,
532
+ refresh: f,
533
+ onCreateCloud: w,
534
+ fetchCloudRepository: c
535
+ } = e, p = P(), [y, v] = F(null), [W, M] = F(null), [O, S] = F(
536
536
  "loading"
537
537
  /* Loading */
538
538
  ), [T, z] = F([]), [R, ee] = F(!1), [re, _] = F(!1), j = ge(() => {
539
- const w = [], I = /* @__PURE__ */ new Map(), k = f.formatMessage({
539
+ const x = [], I = /* @__PURE__ */ new Map(), k = p.formatMessage({
540
540
  id: "ds.business.cloud-import.section-organization"
541
541
  });
542
542
  for (const E of g ?? []) {
543
543
  if (!E.organizationId) {
544
- w.push(E);
544
+ x.push(E);
545
545
  continue;
546
546
  }
547
- const $ = c == null ? void 0 : c(E), B = I.get(E.organizationId) ?? {
547
+ const $ = d == null ? void 0 : d(E), B = I.get(E.organizationId) ?? {
548
548
  name: ($ == null ? void 0 : $.organizationName) ?? k,
549
549
  items: []
550
550
  };
551
551
  B.items.push(E), I.set(E.organizationId, B);
552
552
  }
553
- if (c)
553
+ if (d)
554
554
  for (const E of I.values())
555
555
  E.items.sort(($, B) => {
556
- const L = Te[c($).scope ?? "personal"], xe = Te[c(B).scope ?? "personal"];
557
- return L !== xe ? L - xe : c($).label.localeCompare(c(B).label);
556
+ const L = Te[d($).scope ?? "personal"], xe = Te[d(B).scope ?? "personal"];
557
+ return L !== xe ? L - xe : d($).label.localeCompare(d(B).label);
558
558
  });
559
559
  const H = (E, $) => (B) => {
560
- const L = c == null ? void 0 : c(B);
560
+ const L = d == null ? void 0 : d(B);
561
561
  return {
562
562
  space: B,
563
563
  sectionKey: E,
564
564
  sectionLabel: $,
565
- label: (L == null ? void 0 : L.label) ?? kn(B, f),
565
+ label: (L == null ? void 0 : L.label) ?? kn(B, p),
566
566
  subtitle: L == null ? void 0 : L.subtitle,
567
567
  avatar: L == null ? void 0 : L.avatar
568
568
  };
569
569
  };
570
570
  return [
571
- ...w.map(
571
+ ...x.map(
572
572
  H(
573
573
  "personal",
574
- f.formatMessage({
574
+ p.formatMessage({
575
575
  id: "ds.business.cloud-import.section-personal"
576
576
  })
577
577
  )
@@ -579,25 +579,25 @@ function Tt({
579
579
  ...[...I].flatMap(
580
580
  ([E, $]) => $.items.map(H(`org:${E}`, $.name))
581
581
  ),
582
- ...(C ?? []).map(
582
+ ...(h ?? []).map(
583
583
  H(
584
584
  Oe,
585
- f.formatMessage({ id: "ds.business.cloud-import.section-shared" })
585
+ p.formatMessage({ id: "ds.business.cloud-import.section-shared" })
586
586
  )
587
587
  )
588
588
  ];
589
- }, [g, C, c, f]), G = j.find((w) => w.space.id === (b == null ? void 0 : b.id)) ?? null, ce = X(0), he = X(p);
590
- he.current = p;
591
- const ie = Q(async (w) => {
589
+ }, [g, h, d, p]), G = j.find((x) => x.space.id === (y == null ? void 0 : y.id)) ?? null, ce = X(0), he = X(c);
590
+ he.current = c;
591
+ const ie = Q(async (x) => {
592
592
  const I = ++ce.current;
593
593
  S(
594
594
  "loading"
595
595
  /* Loading */
596
596
  ), z([]);
597
597
  try {
598
- if (w.id === void 0)
598
+ if (x.id === void 0)
599
599
  throw new Error("A Space without an id has no tree");
600
- const k = await he.current(w.id);
600
+ const k = await he.current(x.id);
601
601
  I === ce.current && (M(k), S(
602
602
  "ready"
603
603
  /* Ready */
@@ -608,71 +608,71 @@ function Tt({
608
608
  /* Failed */
609
609
  );
610
610
  }
611
- }, []), dn = X(h);
611
+ }, []), dn = X(f);
612
612
  V(() => {
613
613
  dn.current();
614
614
  }, []), V(() => {
615
- if (b && j.some((k) => k.space.id === b.id))
615
+ if (y && j.some((k) => k.space.id === y.id))
616
616
  return;
617
- const w = j.map((k) => k.space), I = w.find(
617
+ const x = j.map((k) => k.space), I = x.find(
618
618
  (k) => !!k.userId && !k.organizationId && !k.projectId
619
619
  );
620
- v(I ?? w[0] ?? null);
621
- }, [j, b]), V(() => {
622
- b && ie(b);
623
- }, [b, ie]);
620
+ v(I ?? x[0] ?? null);
621
+ }, [j, y]), V(() => {
622
+ y && ie(y);
623
+ }, [y, ie]);
624
624
  const cn = async () => {
625
- if (_(!1), !await h()) {
625
+ if (_(!1), !await f()) {
626
626
  _(!0);
627
627
  return;
628
628
  }
629
- b && await ie(b);
629
+ y && await ie(y);
630
630
  }, un = async () => {
631
631
  ee(!0);
632
632
  try {
633
- await m();
633
+ await w();
634
634
  } finally {
635
635
  ee(!1);
636
636
  }
637
637
  }, pn = {
638
- multiple: t,
638
+ multiple: n,
639
639
  maxSize: r,
640
- accept: s,
640
+ accept: a,
641
641
  selectedIds: new Set(T.map(U)),
642
- getFileThumbnailUrl: a,
643
- select: (w) => z((I) => {
644
- if (!t)
645
- return w.slice(0, 1);
642
+ getFileThumbnailUrl: s,
643
+ select: (x) => z((I) => {
644
+ if (!n)
645
+ return x.slice(0, 1);
646
646
  const k = new Set(I.map(U));
647
647
  return [
648
648
  ...I,
649
- ...w.filter((H) => !k.has(U(H)))
649
+ ...x.filter((H) => !k.has(U(H)))
650
650
  ];
651
651
  }),
652
- unselect: (w) => {
653
- const I = new Set(w.map(U));
652
+ unselect: (x) => {
653
+ const I = new Set(x.map(U));
654
654
  z(
655
655
  (k) => k.filter((H) => !I.has(U(H)))
656
656
  );
657
657
  }
658
- }, gn = g !== null && C !== null, be = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
658
+ }, gn = g !== null && h !== null, be = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
659
659
  Ie,
660
660
  {
661
661
  size: 32,
662
- "aria-label": f.formatMessage({
662
+ "aria-label": p.formatMessage({
663
663
  id: "ds.business.cloud-import.loading"
664
664
  })
665
665
  }
666
666
  ) });
667
- if (!gn && (y || !u))
667
+ if (!gn && (b || !m))
668
668
  return be;
669
669
  if (j.length === 0)
670
- return /* @__PURE__ */ x(ne, { children: [
670
+ return /* @__PURE__ */ C(ne, { children: [
671
671
  /* @__PURE__ */ i(bt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
672
- /* @__PURE__ */ i(yt, { children: f.formatMessage({
672
+ /* @__PURE__ */ i(yt, { children: p.formatMessage({
673
673
  id: "ds.business.cloud-import.create-error.title"
674
674
  }) }),
675
- /* @__PURE__ */ i(vt, { children: f.formatMessage({
675
+ /* @__PURE__ */ i(vt, { children: p.formatMessage({
676
676
  id: "ds.business.cloud-import.create-error.description"
677
677
  }) }),
678
678
  /* @__PURE__ */ i(
@@ -680,9 +680,9 @@ function Tt({
680
680
  {
681
681
  variant: "contained",
682
682
  startIcon: /* @__PURE__ */ i(We, { "aria-hidden": !0 }),
683
- loading: R || y,
683
+ loading: R || b,
684
684
  onClick: () => void un(),
685
- children: f.formatMessage({
685
+ children: p.formatMessage({
686
686
  id: "ds.business.cloud-import.create-error.create-button"
687
687
  })
688
688
  }
@@ -691,24 +691,24 @@ function Tt({
691
691
  if (G === null)
692
692
  return be;
693
693
  const fn = Cn(
694
- d,
694
+ u,
695
695
  G.space,
696
696
  G.sectionKey === Oe
697
- ), ye = f.formatMessage({
697
+ ), ye = p.formatMessage({
698
698
  id: "ds.business.cloud-import.refresh"
699
- }), ve = f.formatMessage({
699
+ }), ve = p.formatMessage({
700
700
  id: "ds.business.cloud-import.open-in-cloud"
701
- }), we = (w) => w.avatar ?? /* @__PURE__ */ i(We, {});
702
- return /* @__PURE__ */ x(gt, { children: [
701
+ }), we = (x) => x.avatar ?? /* @__PURE__ */ i(We, {});
702
+ return /* @__PURE__ */ C(gt, { children: [
703
703
  re && /* @__PURE__ */ i(
704
704
  st,
705
705
  {
706
706
  severity: je.Danger,
707
707
  onClose: () => _(!1),
708
- children: f.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
708
+ children: p.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
709
709
  }
710
710
  ),
711
- /* @__PURE__ */ x(ft, { children: [
711
+ /* @__PURE__ */ C(ft, { children: [
712
712
  /* @__PURE__ */ i(
713
713
  On,
714
714
  {
@@ -716,42 +716,42 @@ function Tt({
716
716
  disableClearable: !0,
717
717
  options: j,
718
718
  value: G,
719
- groupBy: (w) => w.sectionLabel,
720
- getOptionLabel: (w) => w.label,
721
- isOptionEqualToValue: (w, I) => w.space.id === I.space.id,
722
- onChange: (w, I) => v(I.space),
723
- filterOptions: (w, { inputValue: I }) => {
719
+ groupBy: (x) => x.sectionLabel,
720
+ getOptionLabel: (x) => x.label,
721
+ isOptionEqualToValue: (x, I) => x.space.id === I.space.id,
722
+ onChange: (x, I) => v(I.space),
723
+ filterOptions: (x, { inputValue: I }) => {
724
724
  const k = I.trim().toLowerCase();
725
- return k === "" || k === G.label.toLowerCase() ? w : w.filter(
725
+ return k === "" || k === G.label.toLowerCase() ? x : x.filter(
726
726
  (H) => [H.label, H.subtitle ?? ""].some(
727
727
  (E) => E.toLowerCase().includes(k)
728
728
  )
729
729
  );
730
730
  },
731
- renderGroup: (w) => /* @__PURE__ */ x(Wt, { children: [
732
- /* @__PURE__ */ i(Mt, { children: w.group }),
733
- /* @__PURE__ */ i(Ot, { children: w.children })
734
- ] }, w.key),
735
- renderOption: ({ key: w, ...I }, k) => /* @__PURE__ */ x(Ct, { ...I, children: [
731
+ renderGroup: (x) => /* @__PURE__ */ C(Wt, { children: [
732
+ /* @__PURE__ */ i(Mt, { children: x.group }),
733
+ /* @__PURE__ */ i(Ot, { children: x.children })
734
+ ] }, x.key),
735
+ renderOption: ({ key: x, ...I }, k) => /* @__PURE__ */ C(Ct, { ...I, children: [
736
736
  /* @__PURE__ */ i(en, { "aria-hidden": !0, children: we(k) }),
737
- /* @__PURE__ */ x(kt, { children: [
737
+ /* @__PURE__ */ C(kt, { children: [
738
738
  /* @__PURE__ */ i(St, { children: k.label }),
739
739
  k.subtitle !== void 0 && /* @__PURE__ */ i(It, { children: k.subtitle })
740
740
  ] })
741
- ] }, w),
742
- renderInput: (w) => /* @__PURE__ */ i(
741
+ ] }, x),
742
+ renderInput: (x) => /* @__PURE__ */ i(
743
743
  Ve,
744
744
  {
745
- label: f.formatMessage({
745
+ label: p.formatMessage({
746
746
  id: "ds.business.cloud-import.space-label"
747
747
  }),
748
748
  children: /* @__PURE__ */ i(
749
749
  me,
750
750
  {
751
- ...w.InputProps,
752
- id: w.id,
751
+ ...x.InputProps,
752
+ id: x.id,
753
753
  fullWidth: !0,
754
- inputProps: w.inputProps,
754
+ inputProps: x.inputProps,
755
755
  startAdornment: /* @__PURE__ */ i(Ft, { "aria-hidden": !0, children: we(G) })
756
756
  }
757
757
  )
@@ -763,7 +763,7 @@ function Tt({
763
763
  ae,
764
764
  {
765
765
  "aria-label": ye,
766
- disabled: O === "loading" || y,
766
+ disabled: O === "loading" || b,
767
767
  onClick: () => void cn(),
768
768
  children: /* @__PURE__ */ i(zn, { "aria-hidden": !0 })
769
769
  }
@@ -780,34 +780,34 @@ function Tt({
780
780
  }
781
781
  ) })
782
782
  ] }),
783
- /* @__PURE__ */ i(mt, { children: f.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
783
+ /* @__PURE__ */ i(mt, { children: p.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
784
784
  O === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
785
785
  Ie,
786
786
  {
787
787
  size: 24,
788
- "aria-label": f.formatMessage({
788
+ "aria-label": p.formatMessage({
789
789
  id: "ds.business.cloud-import.tree-loading"
790
790
  })
791
791
  }
792
792
  ) }),
793
- O === "failed" && /* @__PURE__ */ x(ne, { role: "alert", children: [
794
- f.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
793
+ O === "failed" && /* @__PURE__ */ C(ne, { role: "alert", children: [
794
+ p.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
795
795
  /* @__PURE__ */ i(
796
796
  Y,
797
797
  {
798
798
  variant: "outlined",
799
799
  onClick: () => void ie(G.space),
800
- children: f.formatMessage({ id: "ds.business.cloud-import.retry" })
800
+ children: p.formatMessage({ id: "ds.business.cloud-import.retry" })
801
801
  }
802
802
  )
803
803
  ] }),
804
- O === "ready" && W !== null && (W.folders.length === 0 && W.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
804
+ O === "ready" && W !== null && (W.folders.length === 0 && W.files.length === 0 ? /* @__PURE__ */ C(ne, { children: [
805
805
  /* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
806
- f.formatMessage({ id: "ds.business.cloud-import.empty-space" })
806
+ p.formatMessage({ id: "ds.business.cloud-import.empty-space" })
807
807
  ] }) : /* @__PURE__ */ i(
808
808
  ht,
809
809
  {
810
- "aria-label": f.formatMessage({
810
+ "aria-label": p.formatMessage({
811
811
  id: "ds.business.cloud-import.tree-label"
812
812
  }),
813
813
  children: /* @__PURE__ */ i(
@@ -820,8 +820,8 @@ function Tt({
820
820
  )
821
821
  }
822
822
  )),
823
- /* @__PURE__ */ x(wt, { children: [
824
- /* @__PURE__ */ i(xt, { role: "status", children: f.formatMessage(
823
+ /* @__PURE__ */ C(wt, { children: [
824
+ /* @__PURE__ */ i(xt, { role: "status", children: p.formatMessage(
825
825
  { id: "ds.business.cloud-import.selected" },
826
826
  { count: T.length }
827
827
  ) }),
@@ -831,8 +831,8 @@ function Tt({
831
831
  variant: "contained",
832
832
  startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
833
833
  disabled: T.length === 0,
834
- onClick: () => n(G.space, T),
835
- children: f.formatMessage({ id: "ds.business.cloud-import.import" })
834
+ onClick: () => t(G.space, T),
835
+ children: p.formatMessage({ id: "ds.business.cloud-import.import" })
836
836
  }
837
837
  )
838
838
  ] })
@@ -840,30 +840,30 @@ function Tt({
840
840
  }
841
841
  function Rt({
842
842
  open: e,
843
- onClose: n,
844
- onImport: t,
843
+ onClose: t,
844
+ onImport: n,
845
845
  cloudPicker: r,
846
- multiple: s,
847
- maxSize: d,
848
- accept: a
846
+ multiple: a,
847
+ maxSize: u,
848
+ accept: s
849
849
  }) {
850
- const c = P();
850
+ const d = P();
851
851
  return /* @__PURE__ */ i(
852
852
  Pe,
853
853
  {
854
854
  open: e,
855
- onClose: n,
855
+ onClose: t,
856
856
  size: He.Medium,
857
- title: c.formatMessage({ id: "ds.business.cloud-import.title" }),
857
+ title: d.formatMessage({ id: "ds.business.cloud-import.title" }),
858
858
  children: e && /* @__PURE__ */ i(
859
859
  Tt,
860
860
  {
861
861
  cloudPicker: r,
862
- multiple: s,
863
- maxSize: d,
864
- accept: a,
865
- onImport: (g, C) => {
866
- t(g, C), n();
862
+ multiple: a,
863
+ maxSize: u,
864
+ accept: s,
865
+ onImport: (g, h) => {
866
+ n(g, h), t();
867
867
  }
868
868
  }
869
869
  )
@@ -898,12 +898,12 @@ const Et = ze(
898
898
  minWidth: 0
899
899
  })), $t = l("i", {
900
900
  shouldForwardProp: (e) => e !== "token"
901
- })(({ theme: e, token: n }) => ({
901
+ })(({ theme: e, token: t }) => ({
902
902
  flex: "none",
903
903
  width: o(e.design.space[2]),
904
904
  height: o(e.design.space[2]),
905
905
  borderRadius: o(e.design.radii.sm / 2),
906
- backgroundColor: e.design.tokens[n]
906
+ backgroundColor: e.design.tokens[t]
907
907
  })), Dt = l("span")({
908
908
  display: "flex",
909
909
  flexDirection: "column",
@@ -921,47 +921,47 @@ const Et = ze(
921
921
  }));
922
922
  function xr({
923
923
  label: e,
924
- options: n,
925
- value: t,
924
+ options: t,
925
+ value: n,
926
926
  onChange: r,
927
- multiple: s = !1,
928
- disabled: d,
929
- error: a,
930
- size: c
927
+ multiple: a = !1,
928
+ disabled: u,
929
+ error: s,
930
+ size: d
931
931
  }) {
932
- const g = P(), C = Ae(Et), y = (c ?? C) === nn.Compact, u = y ? zt : le, h = N(), m = `${h}-label`, p = `${h}-helper`, f = new Map(n.map((v) => [v.value, v]));
933
- return /* @__PURE__ */ x(u, { fullWidth: !y, disabled: d, error: !!a, children: [
932
+ const g = P(), h = Ae(Et), b = (d ?? h) === nn.Compact, m = b ? zt : le, f = N(), w = `${f}-label`, c = `${f}-helper`, p = new Map(t.map((v) => [v.value, v]));
933
+ return /* @__PURE__ */ C(m, { fullWidth: !b, disabled: u, error: !!s, children: [
934
934
  /* @__PURE__ */ i(
935
935
  At,
936
936
  {
937
- id: m,
937
+ id: w,
938
938
  shrink: !0,
939
- style: y ? fe : void 0,
939
+ style: b ? fe : void 0,
940
940
  children: e
941
941
  }
942
942
  ),
943
- /* @__PURE__ */ x(
943
+ /* @__PURE__ */ C(
944
944
  hn,
945
945
  {
946
- labelId: m,
947
- multiple: s,
948
- value: t,
946
+ labelId: w,
947
+ multiple: a,
948
+ value: n,
949
949
  displayEmpty: !0,
950
950
  renderValue: (v) => {
951
951
  const W = Array.isArray(v) ? v : [v];
952
- return y && W.length === 0 ? /* @__PURE__ */ i(Ht, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: W.map((M) => {
952
+ return b && W.length === 0 ? /* @__PURE__ */ i(Ht, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: W.map((M) => {
953
953
  var O;
954
- return ((O = f.get(M)) == null ? void 0 : O.label) ?? M;
954
+ return ((O = p.get(M)) == null ? void 0 : O.label) ?? M;
955
955
  }).join(", ") });
956
956
  },
957
- "aria-describedby": a ? p : void 0,
957
+ "aria-describedby": s ? c : void 0,
958
958
  onChange: (v) => r(v.target.value),
959
959
  children: [
960
- n.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
961
- n.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ x(Lt, { children: [
960
+ t.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
961
+ t.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ C(Lt, { children: [
962
962
  v.tone && /* @__PURE__ */ i($t, { token: v.tone }),
963
963
  v.icon,
964
- /* @__PURE__ */ x(Dt, { children: [
964
+ /* @__PURE__ */ C(Dt, { children: [
965
965
  /* @__PURE__ */ i(pe, { children: v.label }),
966
966
  v.description && /* @__PURE__ */ i(Pt, { children: v.description })
967
967
  ] })
@@ -969,7 +969,7 @@ function xr({
969
969
  ]
970
970
  }
971
971
  ),
972
- a && /* @__PURE__ */ i(se, { id: p, children: a })
972
+ s && /* @__PURE__ */ i(se, { id: c, children: s })
973
973
  ] });
974
974
  }
975
975
  const Nt = l("div")(({ theme: e }) => ({
@@ -983,8 +983,8 @@ const Nt = l("div")(({ theme: e }) => ({
983
983
  color: e.design.tokens["text.secondary"]
984
984
  })), Bt = l("div", {
985
985
  shouldForwardProp: (e) => e !== "active"
986
- })(({ theme: e, active: n }) => {
987
- const { tokens: t, space: r, radii: s } = e.design;
986
+ })(({ theme: e, active: t }) => {
987
+ const { tokens: n, space: r, radii: a } = e.design;
988
988
  return {
989
989
  display: "flex",
990
990
  flexDirection: "column",
@@ -994,27 +994,27 @@ const Nt = l("div")(({ theme: e }) => ({
994
994
  minHeight: o(r[10] * 3),
995
995
  padding: `${o(r[6])} ${o(r[4])}`,
996
996
  boxSizing: "border-box",
997
- border: `1px dashed ${n ? t.accent : t["border.control"]}`,
998
- borderRadius: o(s.md),
999
- backgroundColor: n ? de(t.accent) : t["bg.raised"],
1000
- color: t["text.secondary"],
997
+ border: `1px dashed ${t ? n.accent : n["border.control"]}`,
998
+ borderRadius: o(a.md),
999
+ backgroundColor: t ? de(n.accent) : n["bg.raised"],
1000
+ color: n["text.secondary"],
1001
1001
  textAlign: "center",
1002
1002
  cursor: "pointer",
1003
1003
  transition: oe(e, ["border-color", "background-color"]),
1004
- "&:hover": { borderColor: t.accent }
1004
+ "&:hover": { borderColor: n.accent }
1005
1005
  };
1006
1006
  }), Vt = l("span")(({ theme: e }) => {
1007
- const { tokens: n, space: t } = e.design;
1007
+ const { tokens: t, space: n } = e.design;
1008
1008
  return {
1009
1009
  display: "inline-flex",
1010
1010
  alignItems: "center",
1011
1011
  justifyContent: "center",
1012
- width: o(t[9]),
1013
- height: o(t[9]),
1012
+ width: o(n[9]),
1013
+ height: o(n[9]),
1014
1014
  borderRadius: "50%",
1015
- backgroundColor: de(n.accent),
1016
- color: n["accent.text"],
1017
- "& svg": { width: o(t[5]), height: o(t[5]) }
1015
+ backgroundColor: de(t.accent),
1016
+ color: t["accent.text"],
1017
+ "& svg": { width: o(n[5]), height: o(n[5]) }
1018
1018
  };
1019
1019
  }), jt = l("span")(({ theme: e }) => ({
1020
1020
  fontSize: o(e.design.typeScale.body),
@@ -1036,64 +1036,64 @@ const Nt = l("div")(({ theme: e }) => ({
1036
1036
  width: o(e.design.space[4]),
1037
1037
  height: o(e.design.space[4])
1038
1038
  })), Xt = (e) => {
1039
- const { value: n, unit: t } = Wn(e);
1040
- return `${n} ${t}`;
1039
+ const { value: t, unit: n } = Wn(e);
1040
+ return `${t} ${n}`;
1041
1041
  };
1042
1042
  function Cr({
1043
1043
  onDrop: e,
1044
- multiple: n = !0,
1045
- accept: t,
1044
+ multiple: t = !0,
1045
+ accept: n,
1046
1046
  maxSize: r,
1047
- caption: s,
1048
- title: d,
1049
- cloudImport: a,
1050
- children: c
1047
+ caption: a,
1048
+ title: u,
1049
+ cloudImport: s,
1050
+ children: d
1051
1051
  }) {
1052
- const g = P(), C = N(), y = N(), [u, h] = F(null), [m, p] = F(!1), f = r === void 0 ? null : Xt(r), b = s ?? (f === null ? null : g.formatMessage(
1052
+ const g = P(), h = N(), b = N(), [m, f] = F(null), [w, c] = F(!1), p = r === void 0 ? null : Xt(r), y = a ?? (p === null ? null : g.formatMessage(
1053
1053
  { id: "ds.inputs.drop-zone.max-size" },
1054
- { size: f, multiple: String(n) }
1054
+ { size: p, multiple: String(t) }
1055
1055
  )), v = (z, R) => {
1056
1056
  const ee = r === void 0 ? [] : z.filter((_) => _.size > r), re = z.filter((_) => !ee.includes(_));
1057
1057
  R.some(
1058
1058
  (_) => _.errors.some((j) => j.code === Fn.TooManyFiles)
1059
- ) ? h(
1059
+ ) ? f(
1060
1060
  "too-many"
1061
1061
  /* TooMany */
1062
- ) : R.length > 0 ? h(
1062
+ ) : R.length > 0 ? f(
1063
1063
  "rejected-type"
1064
1064
  /* Rejected */
1065
- ) : ee.length > 0 ? h(
1065
+ ) : ee.length > 0 ? f(
1066
1066
  z.length === 1 ? "too-big" : "some-too-big"
1067
1067
  /* SomeTooBig */
1068
- ) : h(null), re.length > 0 && e(re);
1068
+ ) : f(null), re.length > 0 && e(re);
1069
1069
  }, { getRootProps: W, getInputProps: M, isDragActive: O, open: S } = Sn({
1070
1070
  onDrop: v,
1071
- multiple: n,
1072
- accept: t,
1071
+ multiple: t,
1072
+ accept: n,
1073
1073
  // The zone itself is not a control: the button inside is, for the keyboard and screen readers.
1074
1074
  noClick: !0,
1075
1075
  noKeyboard: !0
1076
1076
  }), T = g.formatMessage(
1077
1077
  { id: "ds.inputs.drop-zone.browse" },
1078
- { multiple: String(n) }
1078
+ { multiple: String(t) }
1079
1079
  );
1080
- return /* @__PURE__ */ x(
1080
+ return /* @__PURE__ */ C(
1081
1081
  Nt,
1082
1082
  {
1083
1083
  role: "group",
1084
- "aria-labelledby": d !== void 0 ? C : void 0,
1085
- "aria-describedby": b !== null ? y : void 0,
1084
+ "aria-labelledby": u !== void 0 ? h : void 0,
1085
+ "aria-describedby": y !== null ? b : void 0,
1086
1086
  children: [
1087
- d !== void 0 && /* @__PURE__ */ i(_t, { id: C, children: d }),
1088
- /* @__PURE__ */ x(Bt, { ...W({ onClick: S }), active: O, children: [
1087
+ u !== void 0 && /* @__PURE__ */ i(_t, { id: h, children: u }),
1088
+ /* @__PURE__ */ C(Bt, { ...W({ onClick: S }), active: O, children: [
1089
1089
  /* @__PURE__ */ i("input", { ...M({ "aria-hidden": !0 }) }),
1090
- c ?? /* @__PURE__ */ x(J, { children: [
1090
+ d ?? /* @__PURE__ */ C(J, { children: [
1091
1091
  /* @__PURE__ */ i(Vt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Mn, {}) }),
1092
1092
  /* @__PURE__ */ i(jt, { children: g.formatMessage(
1093
1093
  {
1094
1094
  id: O ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
1095
1095
  },
1096
- { multiple: String(n) }
1096
+ { multiple: String(t) }
1097
1097
  ) })
1098
1098
  ] }),
1099
1099
  /* @__PURE__ */ i(
@@ -1107,32 +1107,32 @@ function Cr({
1107
1107
  }
1108
1108
  )
1109
1109
  ] }),
1110
- (a !== void 0 || b !== null) && /* @__PURE__ */ x(Gt, { children: [
1111
- a !== void 0 && /* @__PURE__ */ i(
1110
+ (s !== void 0 || y !== null) && /* @__PURE__ */ C(Gt, { children: [
1111
+ s !== void 0 && /* @__PURE__ */ i(
1112
1112
  Y,
1113
1113
  {
1114
1114
  variant: "text",
1115
1115
  startIcon: /* @__PURE__ */ i(Kt, { src: In, alt: "" }),
1116
- onClick: () => p(!0),
1116
+ onClick: () => c(!0),
1117
1117
  children: g.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
1118
1118
  }
1119
1119
  ),
1120
- b !== null && /* @__PURE__ */ i(qt, { id: y, children: b })
1120
+ y !== null && /* @__PURE__ */ i(qt, { id: b, children: y })
1121
1121
  ] }),
1122
- u !== null && /* @__PURE__ */ i(Ut, { role: "alert", children: g.formatMessage(
1123
- { id: `ds.inputs.drop-zone.${u}` },
1124
- { size: f ?? "" }
1122
+ m !== null && /* @__PURE__ */ i(Ut, { role: "alert", children: g.formatMessage(
1123
+ { id: `ds.inputs.drop-zone.${m}` },
1124
+ { size: p ?? "" }
1125
1125
  ) }),
1126
- a !== void 0 && /* @__PURE__ */ i(
1126
+ s !== void 0 && /* @__PURE__ */ i(
1127
1127
  Rt,
1128
1128
  {
1129
- open: m,
1130
- onClose: () => p(!1),
1131
- onImport: a.onImport,
1132
- cloudPicker: a,
1133
- multiple: n,
1129
+ open: w,
1130
+ onClose: () => c(!1),
1131
+ onImport: s.onImport,
1132
+ cloudPicker: s,
1133
+ multiple: t,
1134
1134
  maxSize: r,
1135
- accept: t === void 0 ? void 0 : Object.entries(t).flatMap(([z, R]) => [
1135
+ accept: n === void 0 ? void 0 : Object.entries(n).flatMap(([z, R]) => [
1136
1136
  z,
1137
1137
  ...R
1138
1138
  ])
@@ -1142,50 +1142,66 @@ function Cr({
1142
1142
  }
1143
1143
  );
1144
1144
  }
1145
- var Yt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Yt || {});
1146
- const Qt = l("form")(({ theme: e }) => ({
1145
+ const Yt = 1, Qt = (e, t) => t === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, Zt = (e, t, n) => {
1146
+ const [r, a] = F(!1), u = Q(() => {
1147
+ const s = e.current;
1148
+ s !== null && a(Qt(s, t) > Yt);
1149
+ }, [e, t]);
1150
+ return Le(u, [u, n]), V(() => {
1151
+ const s = e.current;
1152
+ if (s === null)
1153
+ return;
1154
+ s.addEventListener("scroll", u, { passive: !0 });
1155
+ const d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
1156
+ return d !== null && (d.observe(s), Array.from(s.children).forEach((g) => d.observe(g))), () => {
1157
+ s.removeEventListener("scroll", u), d == null || d.disconnect();
1158
+ };
1159
+ }, [e, u, n]), r;
1160
+ };
1161
+ var Jt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Jt || {});
1162
+ const eo = l("form")(({ theme: e }) => ({
1147
1163
  display: "flex",
1148
1164
  flexDirection: "column",
1149
1165
  gap: o(e.design.space[4]),
1150
1166
  color: e.design.tokens["text.secondary"],
1151
1167
  overflowWrap: "anywhere"
1152
- })), Zt = (e, n) => {
1153
- const { paper: t } = e.design.tokens, r = e.design.tokens["paper.on"];
1154
- return ke(n, t) >= ke(n, r) ? t : r;
1155
- }, Jt = {
1168
+ })), no = (e, t) => {
1169
+ const { paper: n } = e.design.tokens, r = e.design.tokens["paper.on"];
1170
+ return ke(t, n) >= ke(t, r) ? n : r;
1171
+ }, to = {
1156
1172
  default: "primary",
1157
1173
  danger: "error",
1158
1174
  warning: "warning"
1159
1175
  };
1160
- function eo({
1176
+ function oo({
1161
1177
  open: e,
1162
- title: n,
1163
- body: t,
1178
+ title: t,
1179
+ body: n,
1164
1180
  confirmLabel: r,
1165
- tone: s = "default",
1166
- confirmationText: d,
1167
- onConfirm: a,
1168
- onCancel: c
1181
+ tone: a = "default",
1182
+ confirmationText: u,
1183
+ onConfirm: s,
1184
+ onCancel: d
1169
1185
  }) {
1170
- const g = P(), C = bn(), y = N(), [u, h] = F(""), [m, p] = F(!1), [f, b] = F(!1), [v, W] = F(e);
1171
- e !== v && (W(e), e && (h(""), b(!1)));
1172
- const M = !m && (d === void 0 || u === d), O = s !== "default", S = () => {
1173
- m || c();
1186
+ const g = P(), h = bn(), b = N(), [m, f] = F(""), [w, c] = F(!1), [p, y] = F(!1), [v, W] = F(e);
1187
+ e !== v && (W(e), e && (f(""), y(!1)));
1188
+ const M = !w && (u === void 0 || m === u), O = a !== "default", S = () => {
1189
+ w || d();
1174
1190
  }, T = () => {
1175
1191
  if (!M)
1176
1192
  return;
1177
- b(!1);
1193
+ y(!1);
1178
1194
  let R;
1179
1195
  try {
1180
- R = a();
1196
+ R = s();
1181
1197
  } catch {
1182
- b(!0);
1198
+ y(!0);
1183
1199
  return;
1184
1200
  }
1185
- R instanceof Promise && (p(!0), R.then(
1186
- () => p(!1),
1201
+ R instanceof Promise && (c(!0), R.then(
1202
+ () => c(!1),
1187
1203
  () => {
1188
- p(!1), b(!0);
1204
+ c(!1), y(!0);
1189
1205
  }
1190
1206
  ));
1191
1207
  }, z = (R) => {
@@ -1197,14 +1213,14 @@ function eo({
1197
1213
  open: e,
1198
1214
  onClose: S,
1199
1215
  size: He.Small,
1200
- title: n,
1201
- actions: /* @__PURE__ */ x(J, { children: [
1216
+ title: t,
1217
+ actions: /* @__PURE__ */ C(J, { children: [
1202
1218
  /* @__PURE__ */ i(
1203
1219
  Y,
1204
1220
  {
1205
1221
  variant: "outlined",
1206
- disabled: m,
1207
- autoFocus: d === void 0 && O,
1222
+ disabled: w,
1223
+ autoFocus: u === void 0 && O,
1208
1224
  onClick: S,
1209
1225
  children: g.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
1210
1226
  }
@@ -1213,17 +1229,17 @@ function eo({
1213
1229
  Y,
1214
1230
  {
1215
1231
  type: "submit",
1216
- form: y,
1232
+ form: b,
1217
1233
  variant: "contained",
1218
- color: Jt[s],
1234
+ color: to[a],
1219
1235
  disabled: !M,
1220
- loading: m,
1221
- autoFocus: d === void 0 && !O,
1222
- sx: s === "warning" ? {
1236
+ loading: w,
1237
+ autoFocus: u === void 0 && !O,
1238
+ sx: a === "warning" ? {
1223
1239
  "&:not(.Mui-disabled)": {
1224
- color: Zt(
1225
- C,
1226
- C.design.tokens["status.warning"]
1240
+ color: no(
1241
+ h,
1242
+ h.design.tokens["status.warning"]
1227
1243
  )
1228
1244
  }
1229
1245
  } : void 0,
@@ -1231,59 +1247,59 @@ function eo({
1231
1247
  }
1232
1248
  )
1233
1249
  ] }),
1234
- children: /* @__PURE__ */ x(Qt, { id: y, onSubmit: z, noValidate: !0, children: [
1235
- /* @__PURE__ */ i("div", { children: t }),
1236
- d !== void 0 && /* @__PURE__ */ i(
1250
+ children: /* @__PURE__ */ C(eo, { id: b, onSubmit: z, noValidate: !0, children: [
1251
+ /* @__PURE__ */ i("div", { children: n }),
1252
+ u !== void 0 && /* @__PURE__ */ i(
1237
1253
  Vn,
1238
1254
  {
1239
1255
  label: g.formatMessage(
1240
1256
  { id: "ds.layers.confirm-dialog.type-to-confirm" },
1241
- { text: d }
1257
+ { text: u }
1242
1258
  ),
1243
- value: u,
1244
- onChange: (R) => h(R.target.value),
1245
- disabled: m,
1259
+ value: m,
1260
+ onChange: (R) => f(R.target.value),
1261
+ disabled: w,
1246
1262
  autoFocus: !0,
1247
1263
  autoComplete: "off",
1248
1264
  fullWidth: !0
1249
1265
  }
1250
1266
  ),
1251
- f && /* @__PURE__ */ i(Bn, { severity: "error", children: g.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
1267
+ p && /* @__PURE__ */ i(Bn, { severity: "error", children: g.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
1252
1268
  ] })
1253
1269
  }
1254
1270
  );
1255
1271
  }
1256
1272
  const tn = ze(null);
1257
1273
  function kr({ children: e }) {
1258
- const [n, t] = F([]), [r, s] = F(null), d = X(0), a = X([]);
1259
- a.current = n;
1260
- const c = n.length > 0 ? n[0] : null;
1261
- c !== null && c !== r && s(c), V(
1274
+ const [t, n] = F([]), [r, a] = F(null), u = X(0), s = X([]);
1275
+ s.current = t;
1276
+ const d = t.length > 0 ? t[0] : null;
1277
+ d !== null && d !== r && a(d), V(
1262
1278
  () => () => {
1263
- a.current.forEach((u) => u.resolve(!1));
1279
+ s.current.forEach((m) => m.resolve(!1));
1264
1280
  },
1265
1281
  []
1266
1282
  );
1267
1283
  const g = Q(
1268
- (u) => new Promise((h) => {
1269
- d.current += 1;
1270
- const m = { id: d.current, options: u, resolve: h };
1271
- t((p) => [...p, m]);
1284
+ (m) => new Promise((f) => {
1285
+ u.current += 1;
1286
+ const w = { id: u.current, options: m, resolve: f };
1287
+ n((c) => [...c, w]);
1272
1288
  }),
1273
1289
  []
1274
- ), C = (u) => {
1275
- c !== null && (c.resolve(u), t((h) => h.filter((m) => m !== c)));
1276
- }, y = ge(() => ({ confirm: g }), [g]);
1277
- return /* @__PURE__ */ x(tn.Provider, { value: y, children: [
1290
+ ), h = (m) => {
1291
+ d !== null && (d.resolve(m), n((f) => f.filter((w) => w !== d)));
1292
+ }, b = ge(() => ({ confirm: g }), [g]);
1293
+ return /* @__PURE__ */ C(tn.Provider, { value: b, children: [
1278
1294
  e,
1279
1295
  r !== null && // A new key per request: each one starts from an empty confirmation field.
1280
1296
  /* @__PURE__ */ i(
1281
- eo,
1297
+ oo,
1282
1298
  {
1283
- open: c === r,
1299
+ open: d === r,
1284
1300
  ...r.options,
1285
- onConfirm: () => C(!0),
1286
- onCancel: () => C(!1)
1301
+ onConfirm: () => h(!0),
1302
+ onCancel: () => h(!1)
1287
1303
  },
1288
1304
  r.id
1289
1305
  )
@@ -1297,19 +1313,19 @@ function Sr() {
1297
1313
  );
1298
1314
  return e;
1299
1315
  }
1300
- var no = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(no || {});
1301
- const to = 320, oo = l("div")(({ theme: e }) => {
1302
- const { tokens: n, space: t } = e.design;
1316
+ var ro = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(ro || {});
1317
+ const io = 320, so = l("div")(({ theme: e }) => {
1318
+ const { tokens: t, space: n } = e.design;
1303
1319
  return {
1304
1320
  flex: "none",
1305
1321
  display: "flex",
1306
1322
  alignItems: "center",
1307
1323
  justifyContent: "space-between",
1308
- gap: o(t[3]),
1309
- padding: `${o(t[2])} ${o(t[2])} ${o(t[2])} ${o(t[4])}`,
1310
- borderBottom: D(n["border.subtle"])
1324
+ gap: o(n[3]),
1325
+ padding: `${o(n[2])} ${o(n[2])} ${o(n[2])} ${o(n[4])}`,
1326
+ borderBottom: D(t["border.subtle"])
1311
1327
  };
1312
- }), ro = l("h2")(({ theme: e }) => ({
1328
+ }), ao = l("h2")(({ theme: e }) => ({
1313
1329
  margin: 0,
1314
1330
  minWidth: 0,
1315
1331
  color: e.design.tokens["text.primary"],
@@ -1321,147 +1337,147 @@ const to = 320, oo = l("div")(({ theme: e }) => {
1321
1337
  flexDirection: "column",
1322
1338
  gap: o(e.design.space[3]),
1323
1339
  fontSize: o(e.design.typeScale.body)
1324
- })), io = l(on)(({ theme: e }) => ({
1340
+ })), lo = l(on)(({ theme: e }) => ({
1325
1341
  padding: o(e.design.space[4])
1326
1342
  }));
1327
1343
  function Ir({
1328
1344
  anchorEl: e,
1329
- open: n,
1330
- onClose: t,
1345
+ open: t,
1346
+ onClose: n,
1331
1347
  title: r,
1332
- placement: s = "bottom-start",
1333
- width: d = to,
1334
- children: a
1348
+ placement: a = "bottom-start",
1349
+ width: u = io,
1350
+ children: s
1335
1351
  }) {
1336
- const c = P(), g = N(), C = vn() === K.Mobile, y = c.formatMessage({
1352
+ const d = P(), g = N(), h = vn() === K.Mobile, b = d.formatMessage({
1337
1353
  id: "ds.layers.anchored-panel.close"
1338
- }), u = n && e !== null;
1339
- if (C)
1354
+ }), m = t && e !== null;
1355
+ if (h)
1340
1356
  return /* @__PURE__ */ i(
1341
1357
  wn,
1342
1358
  {
1343
- open: u,
1344
- onClose: t,
1359
+ open: m,
1360
+ onClose: n,
1345
1361
  title: r,
1346
- closeLabel: y,
1347
- children: /* @__PURE__ */ i(on, { children: a })
1362
+ closeLabel: b,
1363
+ children: /* @__PURE__ */ i(on, { children: s })
1348
1364
  }
1349
1365
  );
1350
- const h = s === "bottom-end" ? "right" : "left";
1351
- return /* @__PURE__ */ x(
1366
+ const f = a === "bottom-end" ? "right" : "left";
1367
+ return /* @__PURE__ */ C(
1352
1368
  jn,
1353
1369
  {
1354
1370
  anchorEl: e,
1355
- open: u,
1356
- onClose: () => t(),
1357
- anchorOrigin: { vertical: "bottom", horizontal: h },
1358
- transformOrigin: { vertical: "top", horizontal: h },
1371
+ open: m,
1372
+ onClose: () => n(),
1373
+ anchorOrigin: { vertical: "bottom", horizontal: f },
1374
+ transformOrigin: { vertical: "top", horizontal: f },
1359
1375
  slotProps: {
1360
1376
  paper: {
1361
1377
  role: "dialog",
1362
1378
  "aria-modal": !0,
1363
1379
  "aria-labelledby": g,
1364
- sx: (m) => ({
1365
- width: o(d),
1366
- maxWidth: `calc(100vw - ${o(m.design.space[4] * 2)})`,
1367
- marginTop: o(m.design.space[1]),
1368
- color: m.design.tokens["text.primary"],
1369
- fontFamily: m.design.fonts.sans
1380
+ sx: (w) => ({
1381
+ width: o(u),
1382
+ maxWidth: `calc(100vw - ${o(w.design.space[4] * 2)})`,
1383
+ marginTop: o(w.design.space[1]),
1384
+ color: w.design.tokens["text.primary"],
1385
+ fontFamily: w.design.fonts.sans
1370
1386
  })
1371
1387
  }
1372
1388
  },
1373
1389
  children: [
1374
- /* @__PURE__ */ x(oo, { children: [
1375
- /* @__PURE__ */ i(ro, { id: g, children: r }),
1376
- /* @__PURE__ */ i(ae, { "aria-label": y, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
1390
+ /* @__PURE__ */ C(so, { children: [
1391
+ /* @__PURE__ */ i(ao, { id: g, children: r }),
1392
+ /* @__PURE__ */ i(ae, { "aria-label": b, onClick: n, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
1377
1393
  ] }),
1378
- /* @__PURE__ */ i(io, { children: a })
1394
+ /* @__PURE__ */ i(lo, { children: s })
1379
1395
  ]
1380
1396
  }
1381
1397
  );
1382
1398
  }
1383
- const so = [32, 160, 8239, 8201].map(
1399
+ const co = [32, 160, 8239, 8201].map(
1384
1400
  (e) => String.fromCharCode(e)
1385
- ), ao = (e) => {
1386
- var t, r;
1387
- const n = new Intl.NumberFormat(e).formatToParts(11111.1);
1401
+ ), uo = (e) => {
1402
+ var n, r;
1403
+ const t = new Intl.NumberFormat(e).formatToParts(11111.1);
1388
1404
  return {
1389
- group: ((t = n.find((s) => s.type === "group")) == null ? void 0 : t.value) ?? " ",
1390
- decimal: ((r = n.find((s) => s.type === "decimal")) == null ? void 0 : r.value) ?? "."
1405
+ group: ((n = t.find((a) => a.type === "group")) == null ? void 0 : n.value) ?? " ",
1406
+ decimal: ((r = t.find((a) => a.type === "decimal")) == null ? void 0 : r.value) ?? "."
1391
1407
  };
1392
- }, Re = (e, n) => {
1393
- const r = [n.group, ...so].reduce(
1394
- (d, a) => d.split(a).join(""),
1408
+ }, Re = (e, t) => {
1409
+ const r = [t.group, ...co].reduce(
1410
+ (u, s) => u.split(s).join(""),
1395
1411
  e.trim()
1396
1412
  ).replace(",", ".");
1397
1413
  if (r === "" || !/^-?\d*\.?\d+$|^-?\d+\.$/.test(r))
1398
1414
  return null;
1399
- const s = Number.parseFloat(r);
1400
- return Number.isFinite(s) ? s : null;
1401
- }, lo = l("div", {
1415
+ const a = Number.parseFloat(r);
1416
+ return Number.isFinite(a) ? a : null;
1417
+ }, po = l("div", {
1402
1418
  shouldForwardProp: (e) => e !== "labelHidden"
1403
1419
  })(({ labelHidden: e }) => ({
1404
1420
  ...e && { [`& .${qn.root}`]: fe }
1405
1421
  }));
1406
1422
  function Fr({
1407
1423
  label: e,
1408
- value: n,
1409
- onChange: t,
1424
+ value: t,
1425
+ onChange: n,
1410
1426
  decimals: r = 0,
1411
- min: s = 0,
1412
- max: d,
1413
- hideLabel: a = !1,
1414
- ariaLabel: c,
1427
+ min: a = 0,
1428
+ max: u,
1429
+ hideLabel: s = !1,
1430
+ ariaLabel: d,
1415
1431
  help: g,
1416
- error: C,
1417
- testId: y,
1418
- disabled: u,
1419
- adornment: h
1432
+ error: h,
1433
+ testId: b,
1434
+ disabled: m,
1435
+ adornment: f
1420
1436
  }) {
1421
- const m = P(), p = ge(
1422
- () => ao(m.locale),
1423
- [m.locale]
1424
- ), f = Q(
1425
- (S) => S === null ? "" : m.formatNumber(S, {
1437
+ const w = P(), c = ge(
1438
+ () => uo(w.locale),
1439
+ [w.locale]
1440
+ ), p = Q(
1441
+ (S) => S === null ? "" : w.formatNumber(S, {
1426
1442
  minimumFractionDigits: r,
1427
1443
  maximumFractionDigits: r
1428
1444
  }),
1429
- [m, r]
1430
- ), [b, v] = F(!1), [W, M] = F(() => f(n));
1445
+ [w, r]
1446
+ ), [y, v] = F(!1), [W, M] = F(() => p(t));
1431
1447
  return V(() => {
1432
- b || M(f(n));
1433
- }, [n, b, f]), /* @__PURE__ */ i(lo, { labelHidden: a, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: C, children: /* @__PURE__ */ i(
1448
+ y || M(p(t));
1449
+ }, [t, y, p]), /* @__PURE__ */ i(po, { labelHidden: s, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: h, children: /* @__PURE__ */ i(
1434
1450
  me,
1435
1451
  {
1436
- disabled: u,
1452
+ disabled: m,
1437
1453
  value: W,
1438
1454
  inputProps: {
1439
1455
  inputMode: "decimal",
1440
- "aria-label": c,
1441
- "data-testid": y
1456
+ "aria-label": d,
1457
+ "data-testid": b
1442
1458
  },
1443
1459
  onFocus: () => {
1444
- v(!0), n !== null && M(String(n).replace(".", p.decimal));
1460
+ v(!0), t !== null && M(String(t).replace(".", c.decimal));
1445
1461
  },
1446
1462
  onChange: (S) => {
1447
1463
  M(S.target.value);
1448
- const T = Re(S.target.value, p);
1449
- T !== null ? t(T) : S.target.value === "" && t(null);
1464
+ const T = Re(S.target.value, c);
1465
+ T !== null ? n(T) : S.target.value === "" && n(null);
1450
1466
  },
1451
1467
  onBlur: () => {
1452
1468
  v(!1);
1453
- let S = Re(W, p);
1469
+ let S = Re(W, c);
1454
1470
  if (S !== null) {
1455
- const T = Math.max(S, s);
1471
+ const T = Math.max(S, a);
1456
1472
  S = Number.parseFloat(
1457
- (d === void 0 ? T : Math.min(T, d)).toFixed(
1473
+ (u === void 0 ? T : Math.min(T, u)).toFixed(
1458
1474
  r
1459
1475
  )
1460
1476
  );
1461
1477
  }
1462
- t(S), M(f(S));
1478
+ n(S), M(p(S));
1463
1479
  },
1464
- endAdornment: h ? /* @__PURE__ */ i(Un, { position: "end", children: h }) : void 0
1480
+ endAdornment: f ? /* @__PURE__ */ i(Un, { position: "end", children: f }) : void 0
1465
1481
  }
1466
1482
  ) }) });
1467
1483
  }
@@ -1491,29 +1507,29 @@ const Wr = { l: 0.72, c: 0.12 }, Mr = [
1491
1507
  "#37bda2",
1492
1508
  "#18b9c9",
1493
1509
  "#4eb0e5"
1494
- ], Or = "#767676", Tr = rn[6], Rr = "#111a2f", Er = "#5674be", co = /^#?([0-9a-f]{6})$/i, q = (e) => {
1495
- const n = co.exec(e.trim());
1496
- return n ? `#${n[1].toLowerCase()}` : null;
1497
- }, uo = l("div")(({ theme: e }) => ({
1510
+ ], Or = "#767676", Tr = rn[6], Rr = "#111a2f", Er = "#5674be", go = /^#?([0-9a-f]{6})$/i, q = (e) => {
1511
+ const t = go.exec(e.trim());
1512
+ return t ? `#${t[1].toLowerCase()}` : null;
1513
+ }, fo = l("div")(({ theme: e }) => ({
1498
1514
  display: "flex",
1499
1515
  alignItems: "center",
1500
1516
  gap: o(e.design.space[3])
1501
- })), po = l("span")(({ theme: e }) => ({
1517
+ })), mo = l("span")(({ theme: e }) => ({
1502
1518
  flex: "none",
1503
1519
  width: o(e.design.densityValues[e.design.density].control),
1504
1520
  height: o(e.design.densityValues[e.design.density].control),
1505
1521
  borderRadius: o(e.design.radii.md),
1506
1522
  border: D(e.design.tokens["border.control"])
1507
- })), go = l("div")(({ theme: e }) => ({
1523
+ })), ho = l("div")(({ theme: e }) => ({
1508
1524
  display: "flex",
1509
1525
  flexWrap: "wrap",
1510
1526
  gap: o(e.design.space[2]),
1511
1527
  marginTop: o(e.design.space[2])
1512
- })), fo = l(Be)(({ theme: e }) => {
1513
- const { densityValues: n, density: t, space: r } = e.design, s = n[t].control - r[2];
1528
+ })), bo = l(Be)(({ theme: e }) => {
1529
+ const { densityValues: t, density: n, space: r } = e.design, a = t[n].control - r[2];
1514
1530
  return {
1515
- width: o(s),
1516
- height: o(s),
1531
+ width: o(a),
1532
+ height: o(a),
1517
1533
  borderRadius: o(e.design.radii.sm),
1518
1534
  border: D(e.design.tokens["border.control"]),
1519
1535
  // The chosen swatch carries the ring of the design system (`focus.ring` is the accent).
@@ -1527,105 +1543,115 @@ const Wr = { l: 0.72, c: 0.12 }, Mr = [
1527
1543
  });
1528
1544
  function zr({
1529
1545
  label: e,
1530
- value: n,
1531
- onChange: t,
1546
+ value: t,
1547
+ onChange: n,
1532
1548
  swatches: r = rn
1533
1549
  }) {
1534
- const s = P(), d = N(), [a, c] = F(n), g = a !== "" && q(a) === null;
1550
+ const a = P(), u = N(), [s, d] = F(t), g = s !== "" && q(s) === null;
1535
1551
  V(() => {
1536
- c(
1537
- (u) => q(u) === q(n) ? u : n
1552
+ d(
1553
+ (m) => q(m) === q(t) ? m : t
1538
1554
  );
1539
- }, [n]);
1540
- const C = (u) => {
1541
- c(u);
1542
- const h = q(u);
1543
- h !== null && h !== q(n) && t(h);
1544
- }, y = q(n);
1545
- return /* @__PURE__ */ x(le, { fullWidth: !0, error: g, children: [
1546
- /* @__PURE__ */ i($e, { htmlFor: `${d}-hex`, children: e }),
1547
- /* @__PURE__ */ x(uo, { children: [
1555
+ }, [t]);
1556
+ const h = (m) => {
1557
+ d(m);
1558
+ const f = q(m);
1559
+ f !== null && f !== q(t) && n(f);
1560
+ }, b = q(t);
1561
+ return /* @__PURE__ */ C(le, { fullWidth: !0, error: g, children: [
1562
+ /* @__PURE__ */ i($e, { htmlFor: `${u}-hex`, children: e }),
1563
+ /* @__PURE__ */ C(fo, { children: [
1548
1564
  /* @__PURE__ */ i(
1549
- po,
1565
+ mo,
1550
1566
  {
1551
1567
  "aria-hidden": "true",
1552
- style: { backgroundColor: y ?? void 0 }
1568
+ style: { backgroundColor: b ?? void 0 }
1553
1569
  }
1554
1570
  ),
1555
1571
  /* @__PURE__ */ i(
1556
1572
  me,
1557
1573
  {
1558
- id: `${d}-hex`,
1574
+ id: `${u}-hex`,
1559
1575
  fullWidth: !0,
1560
- value: a,
1576
+ value: s,
1561
1577
  error: g,
1562
1578
  inputProps: {
1563
- "aria-describedby": g ? `${d}-error` : void 0,
1579
+ "aria-describedby": g ? `${u}-error` : void 0,
1564
1580
  spellCheck: !1,
1565
1581
  autoComplete: "off"
1566
1582
  },
1567
- onChange: (u) => C(u.target.value)
1583
+ onChange: (m) => h(m.target.value)
1568
1584
  }
1569
1585
  )
1570
1586
  ] }),
1571
- g && /* @__PURE__ */ i(se, { id: `${d}-error`, children: s.formatMessage({ id: "ds.inputs.color.invalid" }) }),
1587
+ g && /* @__PURE__ */ i(se, { id: `${u}-error`, children: a.formatMessage({ id: "ds.inputs.color.invalid" }) }),
1572
1588
  /* @__PURE__ */ i(
1573
- go,
1589
+ ho,
1574
1590
  {
1575
1591
  role: "group",
1576
- "aria-label": s.formatMessage({ id: "ds.inputs.color.swatches" }),
1577
- children: r.map((u) => /* @__PURE__ */ i(
1578
- fo,
1592
+ "aria-label": a.formatMessage({ id: "ds.inputs.color.swatches" }),
1593
+ children: r.map((m) => /* @__PURE__ */ i(
1594
+ bo,
1579
1595
  {
1580
- "aria-pressed": q(u) === y,
1581
- "aria-label": u,
1582
- style: { backgroundColor: u },
1583
- onClick: () => t(q(u) ?? u)
1596
+ "aria-pressed": q(m) === b,
1597
+ "aria-label": m,
1598
+ style: { backgroundColor: m },
1599
+ onClick: () => n(q(m) ?? m)
1584
1600
  },
1585
- u
1601
+ m
1586
1602
  ))
1587
1603
  }
1588
1604
  )
1589
1605
  ] });
1590
1606
  }
1591
- const mo = 6, ho = l("div", {
1592
- shouldForwardProp: (e) => e !== "edges"
1593
- })(({ theme: e, edges: n }) => {
1594
- const { tokens: t, radii: r, space: s } = e.design, d = o(s[1] * mo), a = t["text.primary"], c = n.start ? `transparent, ${a} ${d}` : a, g = n.end ? `${a} calc(100% - ${d}), transparent` : a;
1607
+ const yo = 6, vo = l("div", {
1608
+ shouldForwardProp: (e) => e !== "edges" && e !== "wrapped"
1609
+ })(({ theme: e, edges: t, wrapped: n }) => {
1610
+ const { tokens: r, radii: a, space: u } = e.design, s = o(u[1] * yo), d = r["text.primary"], g = t.start ? `transparent, ${d} ${s}` : d, h = t.end ? `${d} calc(100% - ${s}), transparent` : d, b = {
1611
+ flexWrap: "wrap",
1612
+ rowGap: o(u[1]),
1613
+ columnGap: o(u[1]),
1614
+ overflowX: "visible",
1615
+ maskImage: "none",
1616
+ border: "none",
1617
+ backgroundColor: "transparent"
1618
+ };
1595
1619
  return {
1596
- maskImage: n.start || n.end ? `linear-gradient(to right, ${c}, ${g})` : "none",
1620
+ maskImage: t.start || t.end ? `linear-gradient(to right, ${g}, ${h})` : "none",
1597
1621
  display: "inline-flex",
1598
1622
  maxWidth: "100%",
1599
1623
  minWidth: 0,
1600
- border: D(t["border.subtle"]),
1601
- borderRadius: o(r.md),
1624
+ border: D(r["border.subtle"]),
1625
+ borderRadius: o(a.md),
1602
1626
  overflowX: "auto",
1603
1627
  overflowY: "hidden",
1604
- backgroundColor: t["bg.surface"],
1628
+ backgroundColor: r["bg.surface"],
1605
1629
  // Below 768 px each segment keeps a 44 px target: the band wraps onto more rows rather than
1606
1630
  // hiding segments behind a sideways scroll. A rule between neighbours would then start the
1607
1631
  // second row with a stray line and leave the rows unsplit: the band loses its border and each
1608
1632
  // segment draws its own, apart by a gap in both directions.
1609
- [Z.down(K.Tablet)]: {
1610
- flexWrap: "wrap",
1611
- rowGap: o(s[1]),
1612
- columnGap: o(s[1]),
1613
- overflowX: "visible",
1614
- maskImage: "none",
1615
- border: "none",
1616
- backgroundColor: "transparent"
1617
- }
1633
+ [Z.down(K.Tablet)]: b,
1634
+ ...n && b
1635
+ };
1636
+ }), wo = l(Be, {
1637
+ shouldForwardProp: (e) => e !== "wrapped"
1638
+ })(({ theme: e, wrapped: t }) => {
1639
+ const { tokens: n, space: r, typeScale: a, fonts: u, densityValues: s, radii: d } = e.design, g = {
1640
+ minWidth: o(s.touchTarget),
1641
+ minHeight: o(s.touchTarget),
1642
+ border: D(n["border.subtle"]),
1643
+ borderRadius: o(d.md),
1644
+ backgroundColor: n["bg.surface"],
1645
+ '&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
1618
1646
  };
1619
- }), bo = l(Be)(({ theme: e }) => {
1620
- const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: d, radii: a } = e.design;
1621
1647
  return {
1622
1648
  flex: "none",
1623
- gap: o(t[2]),
1624
- minHeight: o(d[e.design.density].control),
1625
- paddingLeft: o(t[3]),
1626
- paddingRight: o(t[3]),
1627
- fontFamily: s.sans,
1628
- fontSize: o(r.body),
1649
+ gap: o(r[2]),
1650
+ minHeight: o(s[e.design.density].control),
1651
+ paddingLeft: o(r[3]),
1652
+ paddingRight: o(r[3]),
1653
+ fontFamily: u.sans,
1654
+ fontSize: o(a.body),
1629
1655
  whiteSpace: "nowrap",
1630
1656
  color: n["text.secondary"],
1631
1657
  transition: oe(e, ["background-color", "color"]),
@@ -1639,147 +1665,128 @@ const mo = 6, ho = l("div", {
1639
1665
  "&.Mui-focusVisible": { ...te(e), outlineOffset: "-2px" },
1640
1666
  // A short label (« 1 h », « 7 j ») would leave a segment narrower than a finger. Each segment
1641
1667
  // is its own bordered tile once the band wraps.
1642
- [Z.down(K.Tablet)]: {
1643
- minWidth: o(d.touchTarget),
1644
- minHeight: o(d.touchTarget),
1645
- border: D(n["border.subtle"]),
1646
- borderRadius: o(a.md),
1647
- backgroundColor: n["bg.surface"],
1648
- '&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
1649
- }
1668
+ [Z.down(K.Tablet)]: g,
1669
+ ...t && g
1650
1670
  };
1651
- }), yo = l("span")(({ theme: e }) => ({
1671
+ }), xo = l("span")(({ theme: e }) => ({
1652
1672
  display: "inline-flex",
1653
1673
  flex: "none",
1654
1674
  "& svg": {
1655
1675
  width: o(e.design.space[4]),
1656
1676
  height: o(e.design.space[4])
1657
1677
  }
1658
- })), vo = l("span")(fe), wo = l("span")(({ theme: e }) => ({
1678
+ })), Co = l("span")(fe), ko = l("span")(({ theme: e }) => ({
1659
1679
  fontFamily: e.design.fonts.mono,
1660
1680
  fontSize: o(e.design.typeScale.caption),
1661
1681
  color: e.design.tokens["text.muted"]
1662
1682
  }));
1663
1683
  function Ar({
1664
1684
  options: e,
1665
- value: n,
1666
- onChange: t,
1685
+ value: t,
1686
+ onChange: n,
1667
1687
  ariaLabel: r,
1668
- testId: s
1688
+ testId: a,
1689
+ wrap: u = !1
1669
1690
  }) {
1670
- const d = X(null), [a, c] = F({ start: !1, end: !1 }), g = Q(() => {
1671
- const u = d.current;
1672
- if (!u)
1691
+ const s = X(null), [d, g] = F({ start: !1, end: !1 }), h = Q(() => {
1692
+ const f = s.current;
1693
+ if (!f)
1673
1694
  return;
1674
- const h = u.scrollLeft > 0, m = u.scrollLeft + u.clientWidth < u.scrollWidth - 1;
1675
- c(
1676
- (p) => p.start === h && p.end === m ? p : { start: h, end: m }
1695
+ const w = f.scrollLeft > 0, c = f.scrollLeft + f.clientWidth < f.scrollWidth - 1;
1696
+ g(
1697
+ (p) => p.start === w && p.end === c ? p : { start: w, end: c }
1677
1698
  );
1678
1699
  }, []);
1679
- V(() => (g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g)), [g, e]);
1680
- const C = (u) => {
1681
- var p, f;
1682
- const h = e.findIndex((b) => b.value === n);
1683
- let m;
1684
- switch (u.key) {
1700
+ V(() => (h(), window.addEventListener("resize", h), () => window.removeEventListener("resize", h)), [h, e]);
1701
+ const b = (f) => {
1702
+ var p, y;
1703
+ const w = e.findIndex((v) => v.value === t);
1704
+ let c;
1705
+ switch (f.key) {
1685
1706
  case "ArrowRight":
1686
1707
  case "ArrowDown":
1687
- m = (h + 1) % e.length;
1708
+ c = (w + 1) % e.length;
1688
1709
  break;
1689
1710
  case "ArrowLeft":
1690
1711
  case "ArrowUp":
1691
- m = (h - 1 + e.length) % e.length;
1712
+ c = (w - 1 + e.length) % e.length;
1692
1713
  break;
1693
1714
  case "Home":
1694
- m = 0;
1715
+ c = 0;
1695
1716
  break;
1696
1717
  case "End":
1697
- m = e.length - 1;
1718
+ c = e.length - 1;
1698
1719
  break;
1699
1720
  default:
1700
1721
  return;
1701
1722
  }
1702
- u.preventDefault(), t(e[m].value), (f = (p = d.current) == null ? void 0 : p.querySelectorAll('[role="radio"]')[m]) == null || f.focus();
1703
- }, y = Math.max(
1704
- e.findIndex((u) => u.value === n),
1723
+ f.preventDefault(), n(e[c].value), (y = (p = s.current) == null ? void 0 : p.querySelectorAll('[role="radio"]')[c]) == null || y.focus();
1724
+ }, m = Math.max(
1725
+ e.findIndex((f) => f.value === t),
1705
1726
  0
1706
1727
  );
1707
1728
  return /* @__PURE__ */ i(
1708
- ho,
1729
+ vo,
1709
1730
  {
1710
- ref: d,
1731
+ ref: s,
1711
1732
  role: "radiogroup",
1712
1733
  "aria-label": r,
1713
- "data-testid": s,
1714
- edges: a,
1715
- onKeyDown: C,
1716
- onScroll: g,
1717
- children: e.map((u, h) => {
1718
- const m = u.value === n;
1719
- return /* @__PURE__ */ x(
1720
- bo,
1734
+ "data-testid": a,
1735
+ edges: d,
1736
+ wrapped: u,
1737
+ onKeyDown: b,
1738
+ onScroll: h,
1739
+ children: e.map((f, w) => {
1740
+ const c = f.value === t;
1741
+ return /* @__PURE__ */ C(
1742
+ wo,
1721
1743
  {
1744
+ wrapped: u,
1722
1745
  role: "radio",
1723
- "aria-checked": m,
1724
- "aria-label": u.ariaLabel,
1725
- lang: u.lang,
1726
- "data-testid": u.testId,
1727
- tabIndex: h === y ? 0 : -1,
1728
- onClick: () => t(u.value),
1746
+ "aria-checked": c,
1747
+ "aria-label": f.ariaLabel,
1748
+ lang: f.lang,
1749
+ "data-testid": f.testId,
1750
+ tabIndex: w === m ? 0 : -1,
1751
+ onClick: () => n(f.value),
1729
1752
  children: [
1730
- u.icon !== void 0 && /* @__PURE__ */ i(yo, { "aria-hidden": !0, children: u.icon }),
1731
- u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(vo, { children: u.label }) : u.label,
1732
- u.count !== void 0 && /* @__PURE__ */ i(wo, { children: u.count })
1753
+ f.icon !== void 0 && /* @__PURE__ */ i(xo, { "aria-hidden": !0, children: f.icon }),
1754
+ f.icon !== void 0 && f.iconOnly ? /* @__PURE__ */ i(Co, { children: f.label }) : f.label,
1755
+ f.count !== void 0 && /* @__PURE__ */ i(ko, { children: f.count })
1733
1756
  ]
1734
1757
  },
1735
- u.value
1758
+ f.value
1736
1759
  );
1737
1760
  })
1738
1761
  }
1739
1762
  );
1740
1763
  }
1741
- const xo = 1, Co = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, ko = (e, n, t) => {
1742
- const [r, s] = F(!1), d = Q(() => {
1743
- const a = e.current;
1744
- a !== null && s(Co(a, n) > xo);
1745
- }, [e, n]);
1746
- return Le(d, [d, t]), V(() => {
1747
- const a = e.current;
1748
- if (a === null)
1749
- return;
1750
- a.addEventListener("scroll", d, { passive: !0 });
1751
- const c = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
1752
- return c !== null && (c.observe(a), Array.from(a.children).forEach((g) => c.observe(g))), () => {
1753
- a.removeEventListener("scroll", d), c == null || c.disconnect();
1754
- };
1755
- }, [e, d, t]), r;
1756
- };
1757
1764
  var So = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(So || {});
1758
1765
  const Io = 2, Fo = /* @__PURE__ */ new Set(["Enter", " "]), Wo = l("div", {
1759
1766
  shouldForwardProp: (e) => e !== "variant"
1760
- })(({ theme: e, variant: n }) => ({
1767
+ })(({ theme: e, variant: t }) => ({
1761
1768
  minWidth: 0,
1762
- ...n === "primary" && {
1769
+ ...t === "primary" && {
1763
1770
  borderBottom: D(e.design.tokens["border.subtle"])
1764
1771
  }
1765
1772
  })), sn = 32, Mo = l("div", {
1766
1773
  shouldForwardProp: (e) => e !== "variant" && e !== "fade"
1767
- })(({ theme: e, variant: n, fade: t }) => {
1768
- const s = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
1774
+ })(({ theme: e, variant: t, fade: n }) => {
1775
+ const a = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
1769
1776
  sn
1770
1777
  )}), transparent)`;
1771
1778
  return {
1772
1779
  position: "relative",
1773
1780
  display: "flex",
1774
- gap: o(e.design.space[n === "primary" ? 1 : 2]),
1781
+ gap: o(e.design.space[t === "primary" ? 1 : 2]),
1775
1782
  overflowX: "auto",
1776
1783
  overflowY: "hidden",
1777
1784
  scrollbarWidth: "none",
1778
1785
  "&::-webkit-scrollbar": { display: "none" },
1779
- ...t && { maskImage: s, WebkitMaskImage: s }
1786
+ ...n && { maskImage: a, WebkitMaskImage: a }
1780
1787
  };
1781
- }), an = (e, n) => {
1782
- const { tokens: t, space: r, radii: s, typeScale: d, fonts: a, densityValues: c, density: g } = e.design, C = {
1788
+ }), an = (e, t) => {
1789
+ const { tokens: n, space: r, radii: a, typeScale: u, fonts: s, densityValues: d, density: g } = e.design, h = {
1783
1790
  position: "relative",
1784
1791
  display: "inline-flex",
1785
1792
  alignItems: "center",
@@ -1790,28 +1797,28 @@ const Io = 2, Fo = /* @__PURE__ */ new Set(["Enter", " "]), Wo = l("div", {
1790
1797
  border: 0,
1791
1798
  backgroundColor: "transparent",
1792
1799
  cursor: "pointer",
1793
- fontFamily: a.sans,
1800
+ fontFamily: s.sans,
1794
1801
  whiteSpace: "nowrap",
1795
1802
  textDecoration: "none",
1796
- color: t["text.secondary"],
1803
+ color: n["text.secondary"],
1797
1804
  transition: oe(e, ["color", "background-color"]),
1798
- "&:hover": { color: t["text.primary"] },
1805
+ "&:hover": { color: n["text.primary"] },
1799
1806
  '&[aria-selected="true"]': {
1800
- color: t["text.primary"],
1807
+ color: n["text.primary"],
1801
1808
  fontWeight: A.medium
1802
1809
  },
1803
1810
  // Inside the scrolling row, an outer ring would be clipped: it is drawn inside the tab.
1804
1811
  "&:focus-visible": { ...te(e), outlineOffset: "-2px" }
1805
- }, y = {
1812
+ }, b = {
1806
1813
  [Z.down(K.Tablet)]: {
1807
- minHeight: o(c.touchTarget)
1814
+ minHeight: o(d.touchTarget)
1808
1815
  }
1809
1816
  };
1810
- return n === "primary" ? {
1811
- ...C,
1812
- minHeight: o(c[g].control + r[2]),
1817
+ return t === "primary" ? {
1818
+ ...h,
1819
+ minHeight: o(d[g].control + r[2]),
1813
1820
  padding: `0 ${o(r[3])}`,
1814
- fontSize: o(d.body),
1821
+ fontSize: o(u.body),
1815
1822
  '&[aria-selected="true"]::after': {
1816
1823
  content: '""',
1817
1824
  position: "absolute",
@@ -1819,134 +1826,134 @@ const Io = 2, Fo = /* @__PURE__ */ new Set(["Enter", " "]), Wo = l("div", {
1819
1826
  right: 0,
1820
1827
  bottom: 0,
1821
1828
  height: o(Io),
1822
- backgroundColor: t.accent
1829
+ backgroundColor: n.accent
1823
1830
  },
1824
- ...y
1831
+ ...b
1825
1832
  } : {
1826
- ...C,
1827
- minHeight: o(c.compact.control),
1833
+ ...h,
1834
+ minHeight: o(d.compact.control),
1828
1835
  padding: `0 ${o(r[3])}`,
1829
- borderRadius: o(s.md),
1830
- fontSize: o(d.small),
1836
+ borderRadius: o(a.md),
1837
+ fontSize: o(u.small),
1831
1838
  "&:hover": {
1832
- color: t["text.primary"],
1833
- backgroundColor: t["bg.hover"]
1839
+ color: n["text.primary"],
1840
+ backgroundColor: n["bg.hover"]
1834
1841
  },
1835
1842
  '&[aria-selected="true"]': {
1836
- color: t["text.primary"],
1843
+ color: n["text.primary"],
1837
1844
  fontWeight: A.medium,
1838
- backgroundColor: t["bg.raised"]
1845
+ backgroundColor: n["bg.raised"]
1839
1846
  },
1840
- ...y
1847
+ ...b
1841
1848
  };
1842
- }, ln = (e) => e !== "variant", Oo = l(Xn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), To = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Ro = l("span")(({ theme: e }) => {
1843
- const { tokens: n, space: t, radii: r, fonts: s, typeScale: d } = e.design;
1849
+ }, ln = (e) => e !== "variant", Oo = l(Xn, { shouldForwardProp: ln })(({ theme: e, variant: t }) => an(e, t)), To = l("button", { shouldForwardProp: ln })(({ theme: e, variant: t }) => an(e, t)), Ro = l("span")(({ theme: e }) => {
1850
+ const { tokens: t, space: n, radii: r, fonts: a, typeScale: u } = e.design;
1844
1851
  return {
1845
1852
  display: "inline-flex",
1846
1853
  alignItems: "center",
1847
- padding: `0 ${o(t[1])}`,
1854
+ padding: `0 ${o(n[1])}`,
1848
1855
  borderRadius: o(r.sm),
1849
- border: D(n["border.subtle"]),
1850
- fontFamily: s.mono,
1851
- fontSize: o(d.caption),
1856
+ border: D(t["border.subtle"]),
1857
+ fontFamily: a.mono,
1858
+ fontSize: o(u.caption),
1852
1859
  fontWeight: A.regular,
1853
1860
  lineHeight: 1.6,
1854
- color: n["text.muted"]
1861
+ color: t["text.muted"]
1855
1862
  };
1856
- }), Ee = (e, n) => {
1857
- const t = n.offsetLeft, r = t + n.offsetWidth + sn;
1858
- t < e.scrollLeft ? e.scrollLeft = t : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
1863
+ }), Ee = (e, t) => {
1864
+ const n = t.offsetLeft, r = n + t.offsetWidth + sn;
1865
+ n < e.scrollLeft ? e.scrollLeft = n : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
1859
1866
  };
1860
1867
  function Lr({
1861
1868
  items: e,
1862
- value: n,
1863
- onChange: t,
1869
+ value: t,
1870
+ onChange: n,
1864
1871
  variant: r,
1865
- "aria-label": s
1872
+ "aria-label": a
1866
1873
  }) {
1867
- const d = P(), a = X(null), c = e.filter((p) => p.hidden !== !0), g = ko(a, "horizontal", c.length), C = Q(
1874
+ const u = P(), s = X(null), d = e.filter((c) => c.hidden !== !0), g = Zt(s, "horizontal", d.length), h = Q(
1868
1875
  () => {
1869
- var p;
1876
+ var c;
1870
1877
  return Array.from(
1871
- ((p = a.current) == null ? void 0 : p.querySelectorAll('[role="tab"]')) ?? []
1878
+ ((c = s.current) == null ? void 0 : c.querySelectorAll('[role="tab"]')) ?? []
1872
1879
  );
1873
1880
  },
1874
1881
  []
1875
- ), y = Q(() => {
1876
- const p = a.current, f = p == null ? void 0 : p.querySelector('[aria-selected="true"]');
1877
- p && f && Ee(p, f);
1882
+ ), b = Q(() => {
1883
+ const c = s.current, p = c == null ? void 0 : c.querySelector('[aria-selected="true"]');
1884
+ c && p && Ee(c, p);
1878
1885
  }, []);
1879
- Le(y, [y, n]);
1880
- const u = c.map((p) => p.value).join("|");
1886
+ Le(b, [b, t]);
1887
+ const m = d.map((c) => c.value).join("|");
1881
1888
  V(() => {
1882
- const p = a.current;
1883
- if (p === null || typeof ResizeObserver > "u")
1889
+ const c = s.current;
1890
+ if (c === null || typeof ResizeObserver > "u")
1884
1891
  return;
1885
- const f = new ResizeObserver(y);
1886
- return f.observe(p), Array.from(p.children).forEach((b) => f.observe(b)), () => f.disconnect();
1887
- }, [y, u]);
1888
- const h = (p) => {
1889
- const f = C(), b = f.findIndex((W) => W === document.activeElement);
1890
- if (b < 0)
1892
+ const p = new ResizeObserver(b);
1893
+ return p.observe(c), Array.from(c.children).forEach((y) => p.observe(y)), () => p.disconnect();
1894
+ }, [b, m]);
1895
+ const f = (c) => {
1896
+ const p = h(), y = p.findIndex((W) => W === document.activeElement);
1897
+ if (y < 0)
1891
1898
  return;
1892
- if (Fo.has(p.key)) {
1893
- p.key === " " && f[b] instanceof HTMLAnchorElement && (p.preventDefault(), f[b].click());
1899
+ if (Fo.has(c.key)) {
1900
+ c.key === " " && p[y] instanceof HTMLAnchorElement && (c.preventDefault(), p[y].click());
1894
1901
  return;
1895
1902
  }
1896
1903
  let v;
1897
- switch (p.key) {
1904
+ switch (c.key) {
1898
1905
  case "ArrowRight":
1899
- v = (b + 1) % f.length;
1906
+ v = (y + 1) % p.length;
1900
1907
  break;
1901
1908
  case "ArrowLeft":
1902
- v = (b - 1 + f.length) % f.length;
1909
+ v = (y - 1 + p.length) % p.length;
1903
1910
  break;
1904
1911
  case "Home":
1905
1912
  v = 0;
1906
1913
  break;
1907
1914
  case "End":
1908
- v = f.length - 1;
1915
+ v = p.length - 1;
1909
1916
  break;
1910
1917
  default:
1911
1918
  return;
1912
1919
  }
1913
- p.preventDefault(), f[v].focus(), a.current && Ee(a.current, f[v]);
1914
- }, m = Math.max(
1915
- c.findIndex((p) => p.value === n),
1920
+ c.preventDefault(), p[v].focus(), s.current && Ee(s.current, p[v]);
1921
+ }, w = Math.max(
1922
+ d.findIndex((c) => c.value === t),
1916
1923
  0
1917
1924
  );
1918
1925
  return /* @__PURE__ */ i(Wo, { variant: r, children: /* @__PURE__ */ i(
1919
1926
  Mo,
1920
1927
  {
1921
- ref: a,
1928
+ ref: s,
1922
1929
  role: "tablist",
1923
- "aria-label": s,
1930
+ "aria-label": a,
1924
1931
  variant: r,
1925
1932
  fade: g,
1926
1933
  "data-overflowing": g || void 0,
1927
- onKeyDown: h,
1928
- children: c.map((p, f) => {
1929
- const b = p.value === n, v = /* @__PURE__ */ x(J, { children: [
1930
- p.label,
1931
- p.badge !== void 0 && /* @__PURE__ */ i(Ro, { children: typeof p.badge == "number" ? d.formatNumber(p.badge) : p.badge })
1934
+ onKeyDown: f,
1935
+ children: d.map((c, p) => {
1936
+ const y = c.value === t, v = /* @__PURE__ */ C(J, { children: [
1937
+ c.label,
1938
+ c.badge !== void 0 && /* @__PURE__ */ i(Ro, { children: typeof c.badge == "number" ? u.formatNumber(c.badge) : c.badge })
1932
1939
  ] }), W = {
1933
1940
  role: "tab",
1934
- "aria-selected": b,
1935
- tabIndex: f === m ? 0 : -1,
1936
- "data-testid": p.testId,
1941
+ "aria-selected": y,
1942
+ tabIndex: p === w ? 0 : -1,
1943
+ "data-testid": c.testId,
1937
1944
  variant: r,
1938
- onClick: () => t == null ? void 0 : t(p.value)
1945
+ onClick: () => n == null ? void 0 : n(c.value)
1939
1946
  };
1940
- return p.to !== void 0 ? /* @__PURE__ */ i(
1947
+ return c.to !== void 0 ? /* @__PURE__ */ i(
1941
1948
  Oo,
1942
1949
  {
1943
- to: p.to,
1944
- "aria-current": b ? "page" : void 0,
1950
+ to: c.to,
1951
+ "aria-current": y ? "page" : void 0,
1945
1952
  ...W,
1946
1953
  children: v
1947
1954
  },
1948
- p.value
1949
- ) : /* @__PURE__ */ i(To, { type: "button", ...W, children: v }, p.value);
1955
+ c.value
1956
+ ) : /* @__PURE__ */ i(To, { type: "button", ...W, children: v }, c.value);
1950
1957
  })
1951
1958
  }
1952
1959
  ) });
@@ -1964,12 +1971,12 @@ export {
1964
1971
  je as a,
1965
1972
  Et as b,
1966
1973
  nn as c,
1967
- Yt as d,
1968
- eo as e,
1969
- ko as f,
1974
+ Sr as d,
1975
+ Jt as e,
1976
+ oo as f,
1970
1977
  Tt as g,
1971
1978
  zr as h,
1972
- no as i,
1979
+ ro as i,
1973
1980
  kr as j,
1974
1981
  Lr as k,
1975
1982
  Wr as l,
@@ -1980,5 +1987,5 @@ export {
1980
1987
  Tr as q,
1981
1988
  Rr as r,
1982
1989
  Er as s,
1983
- Sr as u
1990
+ Zt as u
1984
1991
  };