@donkit-ai/design-system 1.4.64 → 1.4.65

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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import Y, { useState as I, useRef as T, useEffect as D, useLayoutEffect as Ze, useContext as je, forwardRef as Qe, createContext as et, useCallback as $e } from "react";
1
+ import Y, { useState as I, useRef as T, useEffect as D, useLayoutEffect as Ze, useCallback as je, useContext as Ne, forwardRef as Qe, createContext as et } from "react";
2
2
  import { Check as Te, X as ee, ChevronDown as ve, Minus as tt, Plus as st, XCircle as Re, AlertTriangle as Se, CheckCircle as Ae, Info as Ie, ChevronUp as nt, ChevronsUpDown as rt, ChevronLeft as at, ChevronRight as ot, Copy as it, Brain as lt, Loader as ct, Paperclip as Me, Square as dt, ArrowUp as ut, Zap as ft, Cpu as ze, FileText as mt, ThumbsUp as pt, ThumbsDown as ht } from "lucide-react";
3
3
  import pe from "react-dom";
4
4
  const P = {
@@ -8,7 +8,7 @@ const P = {
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var ye = { exports: {} }, he = {};
11
+ var ke = { exports: {} }, he = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -23,19 +23,19 @@ function xt() {
23
23
  if (Ce) return he;
24
24
  Ce = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
- function n(a, o, r) {
26
+ function n(r, o, a) {
27
27
  var i = null;
28
- if (r !== void 0 && (i = "" + r), o.key !== void 0 && (i = "" + o.key), "key" in o) {
29
- r = {};
28
+ if (a !== void 0 && (i = "" + a), o.key !== void 0 && (i = "" + o.key), "key" in o) {
29
+ a = {};
30
30
  for (var l in o)
31
- l !== "key" && (r[l] = o[l]);
32
- } else r = o;
33
- return o = r.ref, {
31
+ l !== "key" && (a[l] = o[l]);
32
+ } else a = o;
33
+ return o = a.ref, {
34
34
  $$typeof: t,
35
- type: a,
35
+ type: r,
36
36
  key: i,
37
37
  ref: o !== void 0 ? o : null,
38
- props: r
38
+ props: a
39
39
  };
40
40
  }
41
41
  return he.Fragment = s, he.jsx = n, he.jsxs = n, he;
@@ -116,7 +116,7 @@ function vt() {
116
116
  ), s(f);
117
117
  }
118
118
  }
119
- function a(f) {
119
+ function r(f) {
120
120
  if (f === j) return "<>";
121
121
  if (typeof f == "object" && f !== null && f.$$typeof === V)
122
122
  return "<...>";
@@ -131,7 +131,7 @@ function vt() {
131
131
  var f = G.A;
132
132
  return f === null ? null : f.getOwner();
133
133
  }
134
- function r() {
134
+ function a() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(f) {
@@ -153,13 +153,13 @@ function vt() {
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function d() {
156
+ function c() {
157
157
  var f = t(this.type);
158
158
  return R[f] || (R[f] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), f = this.props.ref, f !== void 0 ? f : null;
161
161
  }
162
- function c(f, $, z, W, ne, oe) {
162
+ function d(f, $, z, W, ne, oe) {
163
163
  var q = z.ref;
164
164
  return f = {
165
165
  $$typeof: x,
@@ -169,7 +169,7 @@ function vt() {
169
169
  _owner: W
170
170
  }, (q !== void 0 ? q : null) !== null ? Object.defineProperty(f, "ref", {
171
171
  enumerable: !1,
172
- get: d
172
+ get: c
173
173
  }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -207,8 +207,8 @@ function vt() {
207
207
  else p(q);
208
208
  if (F.call($, "key")) {
209
209
  q = t(f);
210
- var Q = Object.keys($).filter(function(Ne) {
211
- return Ne !== "key";
210
+ var Q = Object.keys($).filter(function(we) {
211
+ return we !== "key";
212
212
  });
213
213
  W = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", k[q + W] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
231
231
  return q && l(
232
232
  z,
233
233
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
234
- ), c(
234
+ ), d(
235
235
  f,
236
236
  q,
237
237
  z,
@@ -256,8 +256,8 @@ React keys must be passed directly to JSX without using spread:
256
256
  };
257
257
  var y, R = {}, O = u.react_stack_bottom_frame.bind(
258
258
  u,
259
- r
260
- )(), H = _(a(r)), k = {};
259
+ a
260
+ )(), H = _(r(a)), k = {};
261
261
  xe.Fragment = j, xe.jsx = function(f, $, z) {
262
262
  var W = 1e4 > G.recentlyCreatedOwnerStacks++;
263
263
  return m(
@@ -266,7 +266,7 @@ React keys must be passed directly to JSX without using spread:
266
266
  z,
267
267
  !1,
268
268
  W ? Error("react-stack-top-frame") : O,
269
- W ? _(a(f)) : H
269
+ W ? _(r(f)) : H
270
270
  );
271
271
  }, xe.jsxs = function(f, $, z) {
272
272
  var W = 1e4 > G.recentlyCreatedOwnerStacks++;
@@ -276,21 +276,21 @@ React keys must be passed directly to JSX without using spread:
276
276
  z,
277
277
  !0,
278
278
  W ? Error("react-stack-top-frame") : O,
279
- W ? _(a(f)) : H
279
+ W ? _(r(f)) : H
280
280
  );
281
281
  };
282
282
  }()), xe;
283
283
  }
284
- process.env.NODE_ENV === "production" ? ye.exports = xt() : ye.exports = vt();
285
- var e = ye.exports;
286
- function _t({ size: t = "m", color: s = "default", className: n = "", ...a }) {
284
+ process.env.NODE_ENV === "production" ? ke.exports = xt() : ke.exports = vt();
285
+ var e = ke.exports;
286
+ function _t({ size: t = "m", color: s = "default", className: n = "", ...r }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
290
290
  className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${s}`, n].filter(Boolean).join(" "),
291
291
  role: "status",
292
292
  "aria-label": "Loading",
293
- ...a
293
+ ...r
294
294
  }
295
295
  );
296
296
  }
@@ -299,13 +299,13 @@ function ae({
299
299
  children: t,
300
300
  variant: s = "primary",
301
301
  size: n = "m",
302
- fullWidth: a = !1,
302
+ fullWidth: r = !1,
303
303
  icon: o,
304
- disabled: r = !1,
304
+ disabled: a = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
- type: d = "button",
308
- href: c,
307
+ type: c = "button",
308
+ href: d,
309
309
  "aria-label": m,
310
310
  className: p = "",
311
311
  ...h
@@ -314,16 +314,16 @@ function ae({
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
317
- a && "ds-button--full",
317
+ r && "ds-button--full",
318
318
  u && "ds-button--icon-only",
319
319
  p
320
320
  ].filter(Boolean).join(" "), U = i !== "idle" ? i : void 0, K = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
321
  E ? L : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
322
322
  t
323
323
  ] });
324
- if (c) {
324
+ if (d) {
325
325
  const V = (w) => {
326
- if (r || x) {
326
+ if (a || x) {
327
327
  w.preventDefault();
328
328
  return;
329
329
  }
@@ -333,10 +333,10 @@ function ae({
333
333
  "a",
334
334
  {
335
335
  className: C,
336
- href: r || x ? void 0 : c,
336
+ href: a || x ? void 0 : d,
337
337
  onClick: V,
338
338
  "aria-label": m,
339
- "aria-disabled": r || x ? "true" : void 0,
339
+ "aria-disabled": a || x ? "true" : void 0,
340
340
  "aria-busy": x ? "true" : void 0,
341
341
  "data-state": U,
342
342
  ...h,
@@ -347,9 +347,9 @@ function ae({
347
347
  return /* @__PURE__ */ e.jsx(
348
348
  "button",
349
349
  {
350
- type: d,
350
+ type: c,
351
351
  className: C,
352
- disabled: r,
352
+ disabled: a,
353
353
  onClick: x ? void 0 : l,
354
354
  "aria-label": m,
355
355
  "aria-busy": x ? "true" : void 0,
@@ -363,17 +363,17 @@ function is({
363
363
  label: t,
364
364
  error: s,
365
365
  hint: n,
366
- fullWidth: a = !0,
366
+ fullWidth: r = !0,
367
367
  icon: o,
368
- iconRight: r,
368
+ iconRight: a,
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
- disabled: d,
372
- id: c,
371
+ disabled: c,
372
+ id: d,
373
373
  ...m
374
374
  }) {
375
- const p = c || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, u = s ? `${p}-error` : void 0, x = u || h;
376
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${d ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
375
+ const p = d || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, u = s ? `${p}-error` : void 0, x = u || h;
376
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
379
379
  o && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: o }),
@@ -381,14 +381,14 @@ function is({
381
381
  "input",
382
382
  {
383
383
  id: p,
384
- className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
- disabled: d,
384
+ className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
+ disabled: c,
386
386
  "aria-invalid": s ? "true" : "false",
387
387
  "aria-describedby": x,
388
388
  ...m
389
389
  }
390
390
  ),
391
- r && /* @__PURE__ */ e.jsx(
391
+ a && /* @__PURE__ */ e.jsx(
392
392
  "button",
393
393
  {
394
394
  type: "button",
@@ -396,7 +396,7 @@ function is({
396
396
  onClick: i,
397
397
  tabIndex: -1,
398
398
  "aria-label": "Toggle visibility",
399
- children: r
399
+ children: a
400
400
  }
401
401
  )
402
402
  ] }),
@@ -408,27 +408,27 @@ function ls({
408
408
  label: t,
409
409
  error: s,
410
410
  hint: n,
411
- fullWidth: a = !0,
411
+ fullWidth: r = !0,
412
412
  size: o = "m",
413
- disabled: r,
413
+ disabled: a,
414
414
  id: i,
415
415
  resize: l = !0,
416
- rows: d = 3,
417
- ...c
416
+ rows: c = 3,
417
+ ...d
418
418
  }) {
419
419
  const m = i || `textarea-${Y.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0, u = h || p;
420
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
420
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: t }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
425
  id: m,
426
426
  className: `ds-textarea ds-textarea--${o} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
- disabled: r,
427
+ disabled: a,
428
428
  "aria-invalid": s ? "true" : "false",
429
429
  "aria-describedby": u,
430
- rows: d,
431
- ...c
430
+ rows: c,
431
+ ...d
432
432
  }
433
433
  ),
434
434
  n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
@@ -439,23 +439,23 @@ function cs({
439
439
  label: t,
440
440
  value: s,
441
441
  onChange: n,
442
- options: a = [],
442
+ options: r = [],
443
443
  placeholder: o = "Select option",
444
- error: r,
444
+ error: a,
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
- disabled: d = !1,
448
- id: c,
447
+ disabled: c = !1,
448
+ id: d,
449
449
  ...m
450
450
  }) {
451
- const [p, h] = I(!1), [u, x] = I(!1), [v, j] = I({}), [E, g] = I("down"), [b, S] = I(-1), L = T(null), C = T(null), U = T(null), K = T(null), V = c || `select-${Y.useId()}`, w = `${V}-label`, M = r ? `${V}-error` : void 0, G = 150, F = (k = !1) => {
451
+ const [p, h] = I(!1), [u, x] = I(!1), [v, j] = I({}), [E, g] = I("down"), [b, S] = I(-1), L = T(null), C = T(null), U = T(null), K = T(null), V = d || `select-${Y.useId()}`, w = `${V}-label`, M = a ? `${V}-error` : void 0, G = 150, F = (k = !1) => {
452
452
  u || (x(!0), S(-1), K.current = setTimeout(() => {
453
453
  var f;
454
454
  h(!1), x(!1), k && ((f = U.current) == null || f.focus());
455
455
  }, G));
456
456
  }, A = (k) => {
457
457
  clearTimeout(K.current), x(!1);
458
- const f = k !== void 0 ? k : Math.max(a.findIndex(($) => $.value === s), 0);
458
+ const f = k !== void 0 ? k : Math.max(r.findIndex(($) => $.value === s), 0);
459
459
  S(f), h(!0);
460
460
  };
461
461
  D(() => () => clearTimeout(K.current), []);
@@ -486,20 +486,20 @@ function cs({
486
486
  const y = (k) => {
487
487
  switch (k.key) {
488
488
  case "ArrowDown":
489
- k.preventDefault(), p ? S((f) => Math.min(f + 1, a.length - 1)) : A();
489
+ k.preventDefault(), p ? S((f) => Math.min(f + 1, r.length - 1)) : A();
490
490
  break;
491
491
  case "ArrowUp":
492
- k.preventDefault(), p ? S((f) => Math.max(f - 1, 0)) : A(a.length - 1);
492
+ k.preventDefault(), p ? S((f) => Math.max(f - 1, 0)) : A(r.length - 1);
493
493
  break;
494
494
  case "Home":
495
495
  p && (k.preventDefault(), S(0));
496
496
  break;
497
497
  case "End":
498
- p && (k.preventDefault(), S(a.length - 1));
498
+ p && (k.preventDefault(), S(r.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- k.preventDefault(), p ? b >= 0 && (n == null || n(a[b].value), F(!0)) : A();
502
+ k.preventDefault(), p ? b >= 0 && (n == null || n(r[b].value), F(!0)) : A();
503
503
  break;
504
504
  case "Escape":
505
505
  p && (k.preventDefault(), F(!0));
@@ -508,7 +508,7 @@ function cs({
508
508
  p && F(!1);
509
509
  break;
510
510
  }
511
- }, R = a.find((k) => k.value === s), O = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], H = p && /* @__PURE__ */ e.jsx(
511
+ }, R = r.find((k) => k.value === s), O = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], H = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
514
  ref: C,
@@ -523,7 +523,7 @@ function cs({
523
523
  u && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
525
  style: v,
526
- children: a.map((k, f) => /* @__PURE__ */ e.jsx(
526
+ children: r.map((k, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
529
  id: `${V}-opt-${f}`,
@@ -546,7 +546,7 @@ function cs({
546
546
  ))
547
547
  }
548
548
  );
549
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${d ? "ds-select-wrapper--disabled" : ""}`, children: [
549
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
550
550
  t && /* @__PURE__ */ e.jsx("label", { id: w, className: "ds-select-label", children: t }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: L, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
@@ -559,14 +559,14 @@ function cs({
559
559
  "aria-expanded": p,
560
560
  "aria-activedescendant": p && b >= 0 ? `${V}-opt-${b}` : void 0,
561
561
  "aria-labelledby": t ? w : void 0,
562
- "aria-invalid": r ? "true" : "false",
562
+ "aria-invalid": a ? "true" : "false",
563
563
  "aria-describedby": M,
564
- className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
564
+ className: `ds-select-trigger ds-select-trigger--${l} ${a ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- d || (p ? F() : A());
566
+ c || (p ? F() : A());
567
567
  },
568
568
  onKeyDown: y,
569
- disabled: d,
569
+ disabled: c,
570
570
  ...m,
571
571
  children: [
572
572
  /* @__PURE__ */ e.jsx("span", { className: R ? "" : "ds-select-placeholder", children: (R == null ? void 0 : R.label) || o }),
@@ -582,7 +582,7 @@ function cs({
582
582
  ]
583
583
  }
584
584
  ) }),
585
- r && /* @__PURE__ */ e.jsx("span", { id: M, className: "ds-select-error", role: "alert", children: r }),
585
+ a && /* @__PURE__ */ e.jsx("span", { id: M, className: "ds-select-error", role: "alert", children: a }),
586
586
  typeof document < "u" && pe.createPortal(H, document.body)
587
587
  ] });
588
588
  }
@@ -590,39 +590,39 @@ function ds({
590
590
  label: t,
591
591
  value: s = 0,
592
592
  onChange: n,
593
- min: a = 0,
593
+ min: r = 0,
594
594
  max: o = 100,
595
- step: r = 1,
595
+ step: a = 1,
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
- hint: d,
599
- error: c,
598
+ hint: c,
599
+ error: d,
600
600
  ...m
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const E = Math.min(Number(s) + r, o);
604
+ const E = Math.min(Number(s) + a, o);
605
605
  n == null || n(E);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const E = Math.max(Number(s) - r, a);
608
+ const E = Math.max(Number(s) - a, r);
609
609
  n == null || n(E);
610
610
  }, u = (E) => {
611
611
  if (l) return;
612
612
  const g = E.target.value;
613
613
  if (g === "") {
614
- n == null || n(a);
614
+ n == null || n(r);
615
615
  return;
616
616
  }
617
617
  const b = Number(g);
618
618
  if (!isNaN(b)) {
619
- const S = Math.min(Math.max(b, a), o);
619
+ const S = Math.min(Math.max(b, r), o);
620
620
  n == null || n(S);
621
621
  }
622
622
  }, x = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
- c && "ds-stepper-wrapper--error"
625
+ d && "ds-stepper-wrapper--error"
626
626
  ].filter(Boolean).join(" "), v = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
@@ -637,7 +637,7 @@ function ds({
637
637
  type: "button",
638
638
  className: "ds-stepper-button ds-stepper-button--minus",
639
639
  onClick: h,
640
- disabled: l || s <= a,
640
+ disabled: l || s <= r,
641
641
  "aria-label": "Decrease",
642
642
  children: /* @__PURE__ */ e.jsx(tt, { size: j, strokeWidth: 1.5 })
643
643
  }
@@ -649,9 +649,9 @@ function ds({
649
649
  className: "ds-stepper-input",
650
650
  value: s,
651
651
  onChange: u,
652
- min: a,
652
+ min: r,
653
653
  max: o,
654
- step: r,
654
+ step: a,
655
655
  disabled: l,
656
656
  ...m
657
657
  }
@@ -668,27 +668,27 @@ function ds({
668
668
  }
669
669
  )
670
670
  ] }),
671
- d && !c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: d }),
672
- c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: c })
671
+ c && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
672
+ d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
673
673
  ] });
674
674
  }
675
675
  function us({
676
676
  children: t,
677
677
  padding: s = "m",
678
678
  variant: n = "info",
679
- hover: a = !1,
679
+ hover: r = !1,
680
680
  // deprecated, use variant="interactive"
681
681
  onClick: o,
682
- href: r,
682
+ href: a,
683
683
  disabled: i = !1,
684
684
  ...l
685
685
  }) {
686
- const c = (a ? "interactive" : n) === "interactive" || o || r, m = [
686
+ const d = (r ? "interactive" : n) === "interactive" || o || a, m = [
687
687
  "ds-card",
688
688
  `ds-card--${s}`,
689
- c && "ds-card--interactive"
689
+ d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
- if (r) {
691
+ if (a) {
692
692
  const u = (x) => {
693
693
  if (i) {
694
694
  x.preventDefault();
@@ -700,7 +700,7 @@ function us({
700
700
  "a",
701
701
  {
702
702
  className: m,
703
- href: i ? void 0 : r,
703
+ href: i ? void 0 : a,
704
704
  onClick: u,
705
705
  "aria-disabled": i ? "true" : void 0,
706
706
  ...l,
@@ -708,7 +708,7 @@ function us({
708
708
  }
709
709
  );
710
710
  }
711
- const p = c && o ? "button" : "div", h = c && o ? {
711
+ const p = d && o ? "button" : "div", h = d && o ? {
712
712
  type: "button",
713
713
  onClick: o,
714
714
  disabled: i
@@ -717,7 +717,7 @@ function us({
717
717
  p,
718
718
  {
719
719
  className: m,
720
- role: c && !o ? "article" : void 0,
720
+ role: d && !o ? "article" : void 0,
721
721
  ...h,
722
722
  ...l,
723
723
  children: t
@@ -749,15 +749,15 @@ function de({
749
749
  children: t,
750
750
  variant: s = "default",
751
751
  size: n = "m",
752
- role: a,
752
+ role: r,
753
753
  ...o
754
754
  }) {
755
- const r = [
755
+ const a = [
756
756
  "ds-badge",
757
757
  `ds-badge--${s}`,
758
758
  `ds-badge--${n}`
759
- ].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
760
- return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...o, children: t });
759
+ ].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
760
+ return /* @__PURE__ */ e.jsx("span", { className: a, role: i, ...o, children: t });
761
761
  }
762
762
  const Nt = {
763
763
  info: Ie,
@@ -767,16 +767,16 @@ const Nt = {
767
767
  }, vs = Y.forwardRef(function({
768
768
  children: s,
769
769
  variant: n = "info",
770
- title: a,
770
+ title: r,
771
771
  onClose: o,
772
- role: r,
772
+ role: a,
773
773
  ...i
774
774
  }, l) {
775
- const d = Nt[n], c = r || (n === "error" ? "alert" : "status");
776
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${a ? "" : "ds-alert--no-title"}`, role: c, ...i, children: [
777
- d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: P[3], strokeWidth: 1.5 }) }),
775
+ const c = Nt[n], d = a || (n === "error" ? "alert" : "status");
776
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: d, ...i, children: [
777
+ c && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(c, { size: P[3], strokeWidth: 1.5 }) }),
778
778
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
779
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: a }),
779
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
780
780
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
781
781
  ] }),
782
782
  o && /* @__PURE__ */ e.jsx(
@@ -795,13 +795,13 @@ function _s({
795
795
  children: t,
796
796
  title: s,
797
797
  onClose: n,
798
- size: a = "m",
798
+ size: r = "m",
799
799
  scrollable: o = !1,
800
- subHeader: r,
800
+ subHeader: a,
801
801
  ...i
802
802
  }) {
803
- const l = T(null), d = Y.useId(), [c, m] = I(!1), p = () => {
804
- !n || c || (m(!0), setTimeout(() => {
803
+ const l = T(null), c = Y.useId(), [d, m] = I(!1), p = () => {
804
+ !n || d || (m(!0), setTimeout(() => {
805
805
  m(!1), n();
806
806
  }, wt));
807
807
  };
@@ -816,16 +816,16 @@ function _s({
816
816
  return document.addEventListener("keydown", v), document.addEventListener("mousedown", j), () => {
817
817
  document.removeEventListener("keydown", v), document.removeEventListener("mousedown", j);
818
818
  };
819
- }, [n, c]);
819
+ }, [n, d]);
820
820
  const h = Y.Children.toArray(t), u = h.find((v) => (v == null ? void 0 : v.type) === fe), x = h.filter((v) => (v == null ? void 0 : v.type) !== fe);
821
- return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", c && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
821
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
822
822
  "div",
823
823
  {
824
- className: [`ds-modal ds-modal--${a}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
824
+ className: [`ds-modal ds-modal--${r}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
825
825
  ref: l,
826
826
  role: "dialog",
827
827
  "aria-modal": "true",
828
- "aria-labelledby": s ? d : void 0,
828
+ "aria-labelledby": s ? c : void 0,
829
829
  children: [
830
830
  n && /* @__PURE__ */ e.jsx(
831
831
  ae,
@@ -838,9 +838,9 @@ function _s({
838
838
  "aria-label": "Close modal"
839
839
  }
840
840
  ),
841
- (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
842
- s && /* @__PURE__ */ e.jsx("h3", { id: d, className: "ds-modal__title", children: s }),
843
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
841
+ (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
842
+ s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-modal__title", children: s }),
843
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: a })
844
844
  ] }),
845
845
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
846
846
  u
@@ -856,21 +856,21 @@ function bs({
856
856
  children: t,
857
857
  title: s,
858
858
  onClose: n,
859
- subHeader: a,
859
+ subHeader: r,
860
860
  ...o
861
861
  }) {
862
- const r = T(null), i = Y.useId(), [l, d] = I(!1), c = () => {
863
- !n || l || (d(!0), setTimeout(() => {
864
- d(!1), n();
862
+ const a = T(null), i = Y.useId(), [l, c] = I(!1), d = () => {
863
+ !n || l || (c(!0), setTimeout(() => {
864
+ c(!1), n();
865
865
  }, gt));
866
866
  };
867
867
  D(() => {
868
868
  const u = (v) => {
869
- v.key === "Escape" && c();
869
+ v.key === "Escape" && d();
870
870
  }, x = (v) => {
871
871
  var E, g, b;
872
872
  const j = ((g = (E = v.composedPath) == null ? void 0 : E.call(v)) == null ? void 0 : g[0]) ?? v.target;
873
- r.current && !r.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && c();
873
+ a.current && !a.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && d();
874
874
  };
875
875
  return document.addEventListener("keydown", u), document.addEventListener("mousedown", x), () => {
876
876
  document.removeEventListener("keydown", u), document.removeEventListener("mousedown", x);
@@ -885,7 +885,7 @@ function bs({
885
885
  children: /* @__PURE__ */ e.jsxs(
886
886
  "div",
887
887
  {
888
- ref: r,
888
+ ref: a,
889
889
  className: ["ds-bottom-sheet", l && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
890
890
  role: "dialog",
891
891
  "aria-modal": "true",
@@ -899,13 +899,13 @@ function bs({
899
899
  variant: "ghost",
900
900
  size: "small",
901
901
  icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
902
- onClick: c,
902
+ onClick: d,
903
903
  "aria-label": "Close"
904
904
  }
905
905
  ),
906
- (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
906
+ (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
907
907
  s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: s }),
908
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: a })
908
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
909
909
  ] }),
910
910
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: h }),
911
911
  p
@@ -919,17 +919,17 @@ function yt({
919
919
  children: t,
920
920
  title: s = "Code",
921
921
  defaultExpanded: n = !1,
922
- expanded: a,
922
+ expanded: r,
923
923
  onToggle: o,
924
- padding: r = "s",
924
+ padding: a = "s",
925
925
  className: i = "",
926
926
  ...l
927
927
  }) {
928
- const [d, c] = I(n), m = a !== void 0, p = m ? a : d, h = () => {
929
- m ? o == null || o(!a) : c((x) => !x);
928
+ const [c, d] = I(n), m = r !== void 0, p = m ? r : c, h = () => {
929
+ m ? o == null || o(!r) : d((x) => !x);
930
930
  }, u = [
931
931
  "ds-code-accordion",
932
- `ds-code-accordion--${r}`,
932
+ `ds-code-accordion--${a}`,
933
933
  p && "ds-code-accordion--expanded",
934
934
  i
935
935
  ].filter(Boolean).join(" ");
@@ -957,41 +957,41 @@ function yt({
957
957
  /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
958
958
  ] });
959
959
  }
960
- function js({ children: t, block: s = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
961
- return s ? n ? /* @__PURE__ */ e.jsx(yt, { title: a, defaultExpanded: o, ...r, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: t });
960
+ function js({ children: t, block: s = !1, collapsible: n = !1, title: r = "Code", defaultExpanded: o = !1, ...a }) {
961
+ return s ? n ? /* @__PURE__ */ e.jsx(yt, { title: r, defaultExpanded: o, ...a, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...a, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...a, children: t });
962
962
  }
963
- function Ns({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
964
- const l = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
963
+ function Ns({ href: t, children: s, onClick: n, target: r, rel: o, ...a }) {
964
+ const l = r === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
965
965
  return /* @__PURE__ */ e.jsx(
966
966
  "a",
967
967
  {
968
968
  href: t,
969
969
  className: "ds-link",
970
970
  onClick: n,
971
- target: a,
971
+ target: r,
972
972
  rel: l,
973
- ...r,
973
+ ...a,
974
974
  children: s
975
975
  }
976
976
  );
977
977
  }
978
- function ws({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
979
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: Y.Children.map(t, (o) => Y.isValidElement(o) ? Y.cloneElement(o, { size: s, variant: n }) : o) });
978
+ function ws({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: Y.Children.map(t, (o) => Y.isValidElement(o) ? Y.cloneElement(o, { size: s, variant: n }) : o) });
980
980
  }
981
- function gs({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...d }) {
982
- const c = i && !t, m = [
981
+ function gs({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: o = "ghost", disabled: a = !1, icon: i, href: l, ...c }) {
982
+ const d = i && !t, m = [
983
983
  "ds-tab",
984
- `ds-tab--${a}`,
984
+ `ds-tab--${r}`,
985
985
  `ds-tab--${o}`,
986
986
  s && "ds-tab--selected",
987
- c && "ds-tab--icon-only"
987
+ d && "ds-tab--icon-only"
988
988
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
989
989
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
990
990
  t
991
991
  ] });
992
992
  if (l) {
993
993
  const h = (u) => {
994
- if (r) {
994
+ if (a) {
995
995
  u.preventDefault();
996
996
  return;
997
997
  }
@@ -1002,11 +1002,11 @@ function gs({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
1002
1002
  {
1003
1003
  role: "tab",
1004
1004
  "aria-current": s ? "page" : void 0,
1005
- "aria-disabled": r ? "true" : void 0,
1005
+ "aria-disabled": a ? "true" : void 0,
1006
1006
  className: m,
1007
- href: r ? void 0 : l,
1007
+ href: a ? void 0 : l,
1008
1008
  onClick: h,
1009
- ...d,
1009
+ ...c,
1010
1010
  children: p
1011
1011
  }
1012
1012
  );
@@ -1018,44 +1018,44 @@ function gs({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
1018
1018
  "aria-selected": s,
1019
1019
  className: m,
1020
1020
  onClick: n,
1021
- disabled: r,
1022
- ...d,
1021
+ disabled: a,
1022
+ ...c,
1023
1023
  children: p
1024
1024
  }
1025
1025
  );
1026
1026
  }
1027
- function ys({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1 }) {
1028
- const r = T(null), i = T(null), [l, d] = I(!1), c = T(!1), m = T(null), p = T(null), h = () => {
1029
- if (!r.current) return;
1030
- const u = r.current.querySelector(`[data-value="${s}"]`);
1027
+ function ys({ options: t, value: s, onChange: n, size: r = "m", disabled: o = !1 }) {
1028
+ const a = T(null), i = T(null), [l, c] = I(!1), d = T(!1), m = T(null), p = T(null), h = () => {
1029
+ if (!a.current) return;
1030
+ const u = a.current.querySelector(`[data-value="${s}"]`);
1031
1031
  if (!u) return;
1032
- const x = r.current.getBoundingClientRect(), v = u.getBoundingClientRect(), j = v.left - x.left, E = v.width;
1033
- i.current ? (i.current.style.transition = c.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = j + "px", i.current.style.width = E + "px", c.current = !1) : (d(!0), requestAnimationFrame(() => {
1034
- if (!i.current || !r.current) return;
1035
- const g = r.current.querySelector(`[data-value="${s}"]`);
1032
+ const x = a.current.getBoundingClientRect(), v = u.getBoundingClientRect(), j = v.left - x.left, E = v.width;
1033
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = j + "px", i.current.style.width = E + "px", d.current = !1) : (c(!0), requestAnimationFrame(() => {
1034
+ if (!i.current || !a.current) return;
1035
+ const g = a.current.querySelector(`[data-value="${s}"]`);
1036
1036
  if (!g) return;
1037
- const b = r.current.getBoundingClientRect(), S = g.getBoundingClientRect();
1037
+ const b = a.current.getBoundingClientRect(), S = g.getBoundingClientRect();
1038
1038
  i.current.style.transition = "none", i.current.style.left = S.left - b.left + "px", i.current.style.width = S.width + "px";
1039
1039
  }));
1040
1040
  };
1041
1041
  return p.current = h, Ze(() => {
1042
1042
  const u = m.current !== s;
1043
- m.current = s, c.current = l && u, h();
1043
+ m.current = s, d.current = l && u, h();
1044
1044
  }), D(() => {
1045
- if (!r.current) return;
1045
+ if (!a.current) return;
1046
1046
  const u = new ResizeObserver(() => {
1047
- c.current = !1, p.current();
1047
+ d.current = !1, p.current();
1048
1048
  });
1049
- return u.observe(r.current), () => u.disconnect();
1049
+ return u.observe(a.current), () => u.disconnect();
1050
1050
  }, []), /* @__PURE__ */ e.jsxs(
1051
1051
  "div",
1052
1052
  {
1053
1053
  className: [
1054
1054
  "ds-seg",
1055
- `ds-seg--${a}`,
1055
+ `ds-seg--${r}`,
1056
1056
  o && "ds-seg--disabled"
1057
1057
  ].filter(Boolean).join(" "),
1058
- ref: r,
1058
+ ref: a,
1059
1059
  role: "group",
1060
1060
  children: [
1061
1061
  l && /* @__PURE__ */ e.jsx(
@@ -1090,16 +1090,16 @@ function Be({
1090
1090
  children: t,
1091
1091
  title: s,
1092
1092
  defaultExpanded: n = !1,
1093
- expanded: a,
1093
+ expanded: r,
1094
1094
  onToggle: o,
1095
- padding: r = "m",
1095
+ padding: a = "m",
1096
1096
  ...i
1097
1097
  }) {
1098
- const [l, d] = I(n), c = a !== void 0, m = c ? a : l, p = () => {
1099
- c ? o == null || o(!a) : d((u) => !u);
1098
+ const [l, c] = I(n), d = r !== void 0, m = d ? r : l, p = () => {
1099
+ d ? o == null || o(!r) : c((u) => !u);
1100
1100
  }, h = [
1101
1101
  "ds-accordion",
1102
- `ds-accordion--${r}`,
1102
+ `ds-accordion--${a}`,
1103
1103
  m && "ds-accordion--expanded"
1104
1104
  ].filter(Boolean).join(" ");
1105
1105
  return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
@@ -1128,41 +1128,41 @@ function Be({
1128
1128
  }
1129
1129
  const re = 8, ue = 8;
1130
1130
  function kt(t, s, n) {
1131
- const a = window.innerWidth;
1132
- let o, r;
1131
+ const r = window.innerWidth;
1132
+ let o, a;
1133
1133
  switch (t) {
1134
1134
  case "top":
1135
- o = s.top - n.height - re, r = s.left + s.width / 2 - n.width / 2;
1135
+ o = s.top - n.height - re, a = s.left + s.width / 2 - n.width / 2;
1136
1136
  break;
1137
1137
  case "bottom":
1138
- o = s.bottom + re, r = s.left + s.width / 2 - n.width / 2;
1138
+ o = s.bottom + re, a = s.left + s.width / 2 - n.width / 2;
1139
1139
  break;
1140
1140
  case "left":
1141
- o = s.top + s.height / 2 - n.height / 2, r = s.left - n.width - re;
1141
+ o = s.top + s.height / 2 - n.height / 2, a = s.left - n.width - re;
1142
1142
  break;
1143
1143
  case "right":
1144
- o = s.top + s.height / 2 - n.height / 2, r = s.right + re;
1144
+ o = s.top + s.height / 2 - n.height / 2, a = s.right + re;
1145
1145
  break;
1146
1146
  default:
1147
- o = s.bottom + re, r = s.left;
1147
+ o = s.bottom + re, a = s.left;
1148
1148
  }
1149
- const i = Math.max(ue, Math.min(a - n.width - ue, r)), l = r - i;
1149
+ const i = Math.max(ue, Math.min(r - n.width - ue, a)), l = a - i;
1150
1150
  return { top: o, left: i, arrowOffset: l };
1151
1151
  }
1152
1152
  function Et(t, s, n) {
1153
- const a = window.innerWidth, o = window.innerHeight;
1153
+ const r = window.innerWidth, o = window.innerHeight;
1154
1154
  if (t.top >= s + re + ue) return "top";
1155
1155
  if (o - t.bottom >= s + re + ue) return "bottom";
1156
- if (a - t.right >= n + re + ue) return "right";
1156
+ if (r - t.right >= n + re + ue) return "right";
1157
1157
  if (t.left >= n + re + ue) return "left";
1158
- const r = Math.max(t.top, o - t.bottom, t.left, a - t.right);
1159
- return r === t.top ? "top" : r === o - t.bottom ? "bottom" : r === a - t.right ? "right" : "left";
1158
+ const a = Math.max(t.top, o - t.bottom, t.left, r - t.right);
1159
+ return a === t.top ? "top" : a === o - t.bottom ? "bottom" : a === r - t.right ? "right" : "left";
1160
1160
  }
1161
- function De({ children: t, content: s, position: n, ...a }) {
1162
- const [o, r] = I(!1), [i, l] = I({ visibility: "hidden" }), [d, c] = I(n || "top"), m = T(null), p = T(null), h = T(!1), u = () => {
1161
+ function De({ children: t, content: s, position: n, ...r }) {
1162
+ const [o, a] = I(!1), [i, l] = I({ visibility: "hidden" }), [c, d] = I(n || "top"), m = T(null), p = T(null), h = T(!1), u = () => {
1163
1163
  if (!m.current || !p.current) return;
1164
1164
  const v = m.current.getBoundingClientRect(), j = p.current.getBoundingClientRect(), E = n || Et(v, j.height, j.width), { top: g, left: b, arrowOffset: S } = kt(E, v, j);
1165
- c(E), l({
1165
+ d(E), l({
1166
1166
  position: "fixed",
1167
1167
  top: g,
1168
1168
  left: b,
@@ -1180,7 +1180,7 @@ function De({ children: t, content: s, position: n, ...a }) {
1180
1180
  }, [o, n]), D(() => {
1181
1181
  if (!o) return;
1182
1182
  const v = (j) => {
1183
- m.current && !m.current.contains(j.target) && r(!1);
1183
+ m.current && !m.current.contains(j.target) && a(!1);
1184
1184
  };
1185
1185
  return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
1186
1186
  }, [o]), !s) return t;
@@ -1189,7 +1189,7 @@ function De({ children: t, content: s, position: n, ...a }) {
1189
1189
  {
1190
1190
  ref: p,
1191
1191
  "data-ds-portal": "",
1192
- className: `ds-tooltip ds-tooltip--${d}`,
1192
+ className: `ds-tooltip ds-tooltip--${c}`,
1193
1193
  role: "tooltip",
1194
1194
  style: i,
1195
1195
  children: s
@@ -1201,15 +1201,15 @@ function De({ children: t, content: s, position: n, ...a }) {
1201
1201
  ref: m,
1202
1202
  className: "ds-tooltip-wrapper",
1203
1203
  onMouseEnter: () => {
1204
- h.current || r(!0);
1204
+ h.current || a(!0);
1205
1205
  },
1206
1206
  onMouseLeave: () => {
1207
- h.current || r(!1);
1207
+ h.current || a(!1);
1208
1208
  },
1209
1209
  onTouchStart: () => {
1210
- h.current = !0, r((v) => !v);
1210
+ h.current = !0, a((v) => !v);
1211
1211
  },
1212
- ...a,
1212
+ ...r,
1213
1213
  children: [
1214
1214
  t,
1215
1215
  typeof document < "u" && pe.createPortal(x, document.body)
@@ -1221,17 +1221,17 @@ function ks({
1221
1221
  checked: t = !1,
1222
1222
  onChange: s,
1223
1223
  size: n = "m",
1224
- disabled: a = !1,
1224
+ disabled: r = !1,
1225
1225
  label: o,
1226
- id: r,
1226
+ id: a,
1227
1227
  ...i
1228
1228
  }) {
1229
- const l = r || `toggle-${Y.useId()}`, d = [
1229
+ const l = a || `toggle-${Y.useId()}`, c = [
1230
1230
  "ds-toggle",
1231
1231
  `ds-toggle--${n}`,
1232
- a && "ds-toggle--disabled"
1232
+ r && "ds-toggle--disabled"
1233
1233
  ].filter(Boolean).join(" ");
1234
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1234
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1235
1235
  /* @__PURE__ */ e.jsx(
1236
1236
  "input",
1237
1237
  {
@@ -1239,8 +1239,8 @@ function ks({
1239
1239
  id: l,
1240
1240
  className: "ds-toggle__input",
1241
1241
  checked: t,
1242
- onChange: (c) => s == null ? void 0 : s(c.target.checked),
1243
- disabled: a,
1242
+ onChange: (d) => s == null ? void 0 : s(d.target.checked),
1243
+ disabled: r,
1244
1244
  ...i
1245
1245
  }
1246
1246
  ),
@@ -1252,17 +1252,17 @@ function Es({
1252
1252
  checked: t = !1,
1253
1253
  onChange: s,
1254
1254
  size: n = "m",
1255
- disabled: a = !1,
1255
+ disabled: r = !1,
1256
1256
  label: o,
1257
- id: r,
1257
+ id: a,
1258
1258
  ...i
1259
1259
  }) {
1260
- const l = r || `checkbox-${Y.useId()}`, d = [
1260
+ const l = a || `checkbox-${Y.useId()}`, c = [
1261
1261
  "ds-checkbox",
1262
1262
  `ds-checkbox--${n}`,
1263
- a && "ds-checkbox--disabled"
1264
- ].filter(Boolean).join(" "), c = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1263
+ r && "ds-checkbox--disabled"
1264
+ ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1266
1266
  /* @__PURE__ */ e.jsx(
1267
1267
  "input",
1268
1268
  {
@@ -1271,14 +1271,14 @@ function Es({
1271
1271
  className: "ds-checkbox__input",
1272
1272
  checked: t,
1273
1273
  onChange: (m) => s == null ? void 0 : s(m.target.checked),
1274
- disabled: a,
1274
+ disabled: r,
1275
1275
  ...i
1276
1276
  }
1277
1277
  ),
1278
1278
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1279
1279
  Te,
1280
1280
  {
1281
- size: c,
1281
+ size: d,
1282
1282
  strokeWidth: 2.5,
1283
1283
  className: "ds-checkbox__icon"
1284
1284
  }
@@ -1290,56 +1290,56 @@ function $s({
1290
1290
  checked: t = !1,
1291
1291
  onChange: s,
1292
1292
  size: n = "m",
1293
- disabled: a = !1,
1293
+ disabled: r = !1,
1294
1294
  label: o,
1295
- name: r,
1295
+ name: a,
1296
1296
  value: i,
1297
1297
  id: l,
1298
- ...d
1298
+ ...c
1299
1299
  }) {
1300
- const c = l || `radio-${Y.useId()}`, m = [
1300
+ const d = l || `radio-${Y.useId()}`, m = [
1301
1301
  "ds-radio",
1302
1302
  `ds-radio--${n}`,
1303
- a && "ds-radio--disabled"
1303
+ r && "ds-radio--disabled"
1304
1304
  ].filter(Boolean).join(" ");
1305
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: c, children: [
1305
+ return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: d, children: [
1306
1306
  /* @__PURE__ */ e.jsx(
1307
1307
  "input",
1308
1308
  {
1309
1309
  type: "radio",
1310
- id: c,
1310
+ id: d,
1311
1311
  className: "ds-radio__input",
1312
1312
  checked: t,
1313
1313
  onChange: (p) => s == null ? void 0 : s(p.target.checked),
1314
- disabled: a,
1315
- name: r,
1314
+ disabled: r,
1315
+ name: a,
1316
1316
  value: i,
1317
- ...d
1317
+ ...c
1318
1318
  }
1319
1319
  ),
1320
1320
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1321
1321
  o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
1322
1322
  ] });
1323
1323
  }
1324
- function $t({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
1324
+ function $t({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: o = "", style: a = {}, ...i }) {
1325
1325
  return /* @__PURE__ */ e.jsx(
1326
1326
  "span",
1327
1327
  {
1328
1328
  className: ["ds-skeleton", `ds-skeleton--${n}`, o].filter(Boolean).join(" "),
1329
- style: { width: t, height: s, aspectRatio: a, ...r },
1329
+ style: { width: t, height: s, aspectRatio: r, ...a },
1330
1330
  "aria-hidden": "true",
1331
1331
  ...i
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
1335
+ function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: o = {}, ...a }) {
1336
1336
  return /* @__PURE__ */ e.jsx(
1337
1337
  "span",
1338
1338
  {
1339
- className: ["ds-skeleton-text", a].filter(Boolean).join(" "),
1339
+ className: ["ds-skeleton-text", r].filter(Boolean).join(" "),
1340
1340
  style: { gap: n, ...o },
1341
1341
  "aria-hidden": "true",
1342
- ...r,
1342
+ ...a,
1343
1343
  children: Array.from({ length: t }, (i, l) => /* @__PURE__ */ e.jsx(
1344
1344
  "span",
1345
1345
  {
@@ -1363,16 +1363,16 @@ function St(t) {
1363
1363
  const s = t.trim().split(/\s+/);
1364
1364
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1365
1365
  }
1366
- function Ts({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
1367
- const l = Rt(t ?? ""), [d, c] = I(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: St(t) });
1366
+ function Ts({ seed: t, icon: s, src: n, size: r = 32, className: o = "", style: a = {}, ...i }) {
1367
+ const l = Rt(t ?? ""), [c, d] = I(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: St(t) });
1368
1368
  return /* @__PURE__ */ e.jsx(
1369
1369
  "div",
1370
1370
  {
1371
1371
  className: ["ds-avatar", o].filter(Boolean).join(" "),
1372
- style: { width: a, height: a, "--ds-avatar-h": l, ...r },
1372
+ style: { width: r, height: r, "--ds-avatar-h": l, ...a },
1373
1373
  "aria-hidden": "true",
1374
1374
  ...i,
1375
- children: n && !d ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => c(!0) }) : m
1375
+ children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : m
1376
1376
  }
1377
1377
  );
1378
1378
  }
@@ -1380,20 +1380,20 @@ function Rs({
1380
1380
  children: t,
1381
1381
  size: s = "compact",
1382
1382
  stickyTop: n,
1383
- maxHeight: a,
1383
+ maxHeight: r,
1384
1384
  className: o = "",
1385
- style: r = {},
1385
+ style: a = {},
1386
1386
  ...i
1387
1387
  }) {
1388
1388
  const l = {
1389
- ...a ? { maxHeight: a } : {},
1389
+ ...r ? { maxHeight: r } : {},
1390
1390
  ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1391
- ...r
1391
+ ...a
1392
1392
  };
1393
1393
  return /* @__PURE__ */ e.jsx(
1394
1394
  "div",
1395
1395
  {
1396
- className: ["ds-table-wrap", "ds-scrollable", a ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1396
+ className: ["ds-table-wrap", "ds-scrollable", r ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1397
1397
  style: l,
1398
1398
  children: /* @__PURE__ */ e.jsx(
1399
1399
  "table",
@@ -1412,7 +1412,7 @@ function Ss({ children: t, ...s }) {
1412
1412
  function As({ children: t, ...s }) {
1413
1413
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1414
1414
  }
1415
- function Is({ children: t, interactive: s, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...d }) {
1415
+ function Is({ children: t, interactive: s, selected: n, subheader: r, exiting: o, updated: a, className: i = "", onClick: l, ...c }) {
1416
1416
  return /* @__PURE__ */ e.jsx(
1417
1417
  "tr",
1418
1418
  {
@@ -1420,13 +1420,13 @@ function Is({ children: t, interactive: s, selected: n, subheader: a, exiting: o
1420
1420
  "ds-table-row",
1421
1421
  s || l ? "ds-table-row--interactive" : "",
1422
1422
  n ? "ds-table-row--selected" : "",
1423
- a ? "ds-table-row--subheader" : "",
1423
+ r ? "ds-table-row--subheader" : "",
1424
1424
  o ? "ds-table-row--exiting" : "",
1425
- r ? "ds-table-row--updated" : "",
1425
+ a ? "ds-table-row--updated" : "",
1426
1426
  i
1427
1427
  ].filter(Boolean).join(" "),
1428
1428
  onClick: l,
1429
- ...d,
1429
+ ...c,
1430
1430
  children: t
1431
1431
  }
1432
1432
  );
@@ -1434,29 +1434,29 @@ function Is({ children: t, interactive: s, selected: n, subheader: a, exiting: o
1434
1434
  function Bs({ children: t, colSpan: s = 999, ...n }) {
1435
1435
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1436
1436
  }
1437
- function Ds({ children: t, align: s = "left", sortDir: n, onSort: a, width: o, className: r = "", style: i = {}, ...l }) {
1438
- const d = !!a || n !== void 0, c = n === "asc" ? nt : n === "desc" ? ve : rt;
1437
+ function Ds({ children: t, align: s = "left", sortDir: n, onSort: r, width: o, className: a = "", style: i = {}, ...l }) {
1438
+ const c = !!r || n !== void 0, d = n === "asc" ? nt : n === "desc" ? ve : rt;
1439
1439
  return /* @__PURE__ */ e.jsx(
1440
1440
  "th",
1441
1441
  {
1442
1442
  className: [
1443
1443
  "ds-th",
1444
- d ? "ds-th--sortable" : "",
1444
+ c ? "ds-th--sortable" : "",
1445
1445
  n ? "ds-th--sorted" : "",
1446
1446
  s !== "left" ? `ds-table-cell--${s}` : "",
1447
- r
1447
+ a
1448
1448
  ].filter(Boolean).join(" "),
1449
- onClick: a,
1449
+ onClick: r,
1450
1450
  style: { width: o, ...i },
1451
1451
  ...l,
1452
- children: d ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1452
+ children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1453
1453
  t,
1454
- /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(c, { size: 11, strokeWidth: 2.5 }) })
1454
+ /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
1455
1455
  ] }) : t
1456
1456
  }
1457
1457
  );
1458
1458
  }
1459
- function Ls({ children: t, align: s = "left", secondary: n, muted: a, truncate: o, nowrap: r, className: i = "", ...l }) {
1459
+ function Ls({ children: t, align: s = "left", secondary: n, muted: r, truncate: o, nowrap: a, className: i = "", ...l }) {
1460
1460
  return /* @__PURE__ */ e.jsx(
1461
1461
  "td",
1462
1462
  {
@@ -1464,9 +1464,9 @@ function Ls({ children: t, align: s = "left", secondary: n, muted: a, truncate:
1464
1464
  "ds-td",
1465
1465
  s !== "left" ? `ds-table-cell--${s}` : "",
1466
1466
  n ? "ds-table-cell--secondary" : "",
1467
- a ? "ds-table-cell--muted" : "",
1467
+ r ? "ds-table-cell--muted" : "",
1468
1468
  o ? "ds-table-cell--truncate" : "",
1469
- r ? "ds-table-cell--nowrap" : "",
1469
+ a ? "ds-table-cell--nowrap" : "",
1470
1470
  i
1471
1471
  ].filter(Boolean).join(" "),
1472
1472
  ...l,
@@ -1478,21 +1478,21 @@ function Ps({
1478
1478
  icon: t,
1479
1479
  title: s,
1480
1480
  description: n,
1481
- action: a,
1481
+ action: r,
1482
1482
  size: o = "m",
1483
- className: r = "",
1483
+ className: a = "",
1484
1484
  ...i
1485
1485
  }) {
1486
1486
  return /* @__PURE__ */ e.jsxs(
1487
1487
  "div",
1488
1488
  {
1489
- className: ["ds-empty-state", `ds-empty-state--${o}`, r].filter(Boolean).join(" "),
1489
+ className: ["ds-empty-state", `ds-empty-state--${o}`, a].filter(Boolean).join(" "),
1490
1490
  ...i,
1491
1491
  children: [
1492
1492
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: t }),
1493
1493
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: s }),
1494
1494
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
1495
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: a })
1495
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: r })
1496
1496
  ]
1497
1497
  }
1498
1498
  );
@@ -1501,24 +1501,24 @@ function Ms({
1501
1501
  label: t,
1502
1502
  hint: s,
1503
1503
  error: n,
1504
- required: a = !1,
1504
+ required: r = !1,
1505
1505
  disabled: o = !1,
1506
- htmlFor: r,
1506
+ htmlFor: a,
1507
1507
  children: i,
1508
1508
  className: l = "",
1509
- style: d,
1510
- ...c
1509
+ style: c,
1510
+ ...d
1511
1511
  }) {
1512
- const m = Y.useId(), p = r ?? m, h = `${p}-hint`, u = `${p}-error`;
1512
+ const m = Y.useId(), p = a ?? m, h = `${p}-hint`, u = `${p}-error`;
1513
1513
  return /* @__PURE__ */ e.jsxs(
1514
1514
  "div",
1515
1515
  {
1516
1516
  className: `ds-field${l ? ` ${l}` : ""}`,
1517
1517
  "data-state": n ? "error" : void 0,
1518
- "data-required": a ? "" : void 0,
1518
+ "data-required": r ? "" : void 0,
1519
1519
  "data-disabled": o ? "" : void 0,
1520
- style: d,
1521
- ...c,
1520
+ style: c,
1521
+ ...d,
1522
1522
  children: [
1523
1523
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
1524
1524
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
@@ -1528,23 +1528,23 @@ function Ms({
1528
1528
  }
1529
1529
  );
1530
1530
  }
1531
- function zs({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
1532
- const d = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1531
+ function zs({ label: t, value: s, delta: n, size: r = "m", inline: o = !1, className: a = "", style: i, ...l }) {
1532
+ const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1533
1533
  return /* @__PURE__ */ e.jsxs(
1534
1534
  "div",
1535
1535
  {
1536
1536
  className: [
1537
1537
  "ds-stat",
1538
- `ds-stat--${a}`,
1538
+ `ds-stat--${r}`,
1539
1539
  o && "ds-stat--inline",
1540
- r
1540
+ a
1541
1541
  ].filter(Boolean).join(" "),
1542
1542
  style: i,
1543
1543
  ...l,
1544
1544
  children: [
1545
1545
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: t }),
1546
1546
  s != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: s }),
1547
- n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${d}`, children: n })
1547
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${c}`, children: n })
1548
1548
  ]
1549
1549
  }
1550
1550
  );
@@ -1553,22 +1553,22 @@ function Cs({
1553
1553
  children: t,
1554
1554
  separator: s = "/",
1555
1555
  "aria-label": n = "Breadcrumb",
1556
- className: a = "",
1556
+ className: r = "",
1557
1557
  style: o,
1558
- ...r
1558
+ ...a
1559
1559
  }) {
1560
1560
  const i = Y.Children.toArray(t).filter(Boolean);
1561
1561
  return /* @__PURE__ */ e.jsx(
1562
1562
  "nav",
1563
1563
  {
1564
- className: `ds-breadcrumb${a ? ` ${a}` : ""}`,
1564
+ className: `ds-breadcrumb${r ? ` ${r}` : ""}`,
1565
1565
  "aria-label": n,
1566
1566
  style: o,
1567
- ...r,
1568
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, d) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1567
+ ...a,
1568
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, c) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1569
1569
  l,
1570
- d < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
- ] }, d)) })
1570
+ c < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
+ ] }, c)) })
1572
1572
  }
1573
1573
  );
1574
1574
  }
@@ -1576,17 +1576,17 @@ function Os({
1576
1576
  page: t,
1577
1577
  total: s,
1578
1578
  onChange: n,
1579
- siblings: a = 1,
1579
+ siblings: r = 1,
1580
1580
  "aria-label": o = "Pagination",
1581
- className: r = "",
1581
+ className: a = "",
1582
1582
  style: i,
1583
1583
  ...l
1584
1584
  }) {
1585
- const d = At(t, s, a);
1585
+ const c = At(t, s, r);
1586
1586
  return /* @__PURE__ */ e.jsxs(
1587
1587
  "nav",
1588
1588
  {
1589
- className: `ds-pagination${r ? ` ${r}` : ""}`,
1589
+ className: `ds-pagination${a ? ` ${a}` : ""}`,
1590
1590
  "aria-label": o,
1591
1591
  style: i,
1592
1592
  ...l,
@@ -1601,17 +1601,17 @@ function Os({
1601
1601
  children: /* @__PURE__ */ e.jsx(at, { size: 16 })
1602
1602
  }
1603
1603
  ),
1604
- d.map(
1605
- (c, m) => c === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
1604
+ c.map(
1605
+ (d, m) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
1606
1606
  "button",
1607
1607
  {
1608
- className: `ds-pagination-page${c === t ? " ds-pagination-page--current" : ""}`,
1609
- onClick: () => c !== t && (n == null ? void 0 : n(c)),
1610
- "aria-current": c === t ? "page" : void 0,
1611
- "aria-label": `Page ${c}`,
1612
- children: c
1608
+ className: `ds-pagination-page${d === t ? " ds-pagination-page--current" : ""}`,
1609
+ onClick: () => d !== t && (n == null ? void 0 : n(d)),
1610
+ "aria-current": d === t ? "page" : void 0,
1611
+ "aria-label": `Page ${d}`,
1612
+ children: d
1613
1613
  },
1614
- c
1614
+ d
1615
1615
  )
1616
1616
  ),
1617
1617
  /* @__PURE__ */ e.jsx(
@@ -1630,31 +1630,31 @@ function Os({
1630
1630
  }
1631
1631
  function At(t, s, n) {
1632
1632
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1633
- const a = Math.max(2, t - n), o = Math.min(s - 1, t + n), r = [1];
1634
- a > 2 && r.push("…");
1635
- for (let i = a; i <= o; i++) r.push(i);
1636
- return o < s - 1 && r.push("…"), r.push(s), r;
1633
+ const r = Math.max(2, t - n), o = Math.min(s - 1, t + n), a = [1];
1634
+ r > 2 && a.push("…");
1635
+ for (let i = r; i <= o; i++) a.push(i);
1636
+ return o < s - 1 && a.push("…"), a.push(s), a;
1637
1637
  }
1638
1638
  const It = 200;
1639
1639
  function Fs({
1640
1640
  children: t,
1641
1641
  title: s,
1642
1642
  onClose: n,
1643
- side: a = "right",
1643
+ side: r = "right",
1644
1644
  ...o
1645
1645
  }) {
1646
- const r = T(null), i = Y.useId(), [l, d] = I(!1), c = () => {
1647
- !n || l || (d(!0), setTimeout(() => {
1648
- d(!1), n();
1646
+ const a = T(null), i = Y.useId(), [l, c] = I(!1), d = () => {
1647
+ !n || l || (c(!0), setTimeout(() => {
1648
+ c(!1), n();
1649
1649
  }, It));
1650
1650
  };
1651
1651
  D(() => {
1652
1652
  const u = (v) => {
1653
- v.key === "Escape" && c();
1653
+ v.key === "Escape" && d();
1654
1654
  }, x = (v) => {
1655
1655
  var E, g, b;
1656
1656
  const j = ((g = (E = v.composedPath) == null ? void 0 : E.call(v)) == null ? void 0 : g[0]) ?? v.target;
1657
- r.current && !r.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && c();
1657
+ a.current && !a.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && d();
1658
1658
  };
1659
1659
  return document.addEventListener("keydown", u), document.addEventListener("mousedown", x), () => {
1660
1660
  document.removeEventListener("keydown", u), document.removeEventListener("mousedown", x);
@@ -1670,15 +1670,15 @@ function Fs({
1670
1670
  "aside",
1671
1671
  {
1672
1672
  className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
1673
- "data-side": a,
1674
- ref: r,
1673
+ "data-side": r,
1674
+ ref: a,
1675
1675
  role: "dialog",
1676
1676
  "aria-modal": "true",
1677
1677
  "aria-labelledby": s ? i : void 0,
1678
1678
  children: [
1679
1679
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1680
1680
  s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: s }),
1681
- n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: c, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }) })
1681
+ n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }) })
1682
1682
  ] }),
1683
1683
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
1684
1684
  p
@@ -1696,21 +1696,21 @@ function Ws({
1696
1696
  children: t,
1697
1697
  title: s,
1698
1698
  onClose: n,
1699
- subHeader: a,
1699
+ subHeader: r,
1700
1700
  ...o
1701
1701
  }) {
1702
- const r = T(null), i = Y.useId(), [l, d] = I(!1), c = () => {
1703
- !n || l || (d(!0), setTimeout(() => {
1704
- d(!1), n();
1702
+ const a = T(null), i = Y.useId(), [l, c] = I(!1), d = () => {
1703
+ !n || l || (c(!0), setTimeout(() => {
1704
+ c(!1), n();
1705
1705
  }, Bt));
1706
1706
  };
1707
1707
  D(() => {
1708
1708
  const u = (v) => {
1709
- v.key === "Escape" && c();
1709
+ v.key === "Escape" && d();
1710
1710
  }, x = (v) => {
1711
1711
  var E, g, b;
1712
1712
  const j = ((g = (E = v.composedPath) == null ? void 0 : E.call(v)) == null ? void 0 : g[0]) ?? v.target;
1713
- r.current && !r.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && c();
1713
+ a.current && !a.current.contains(j) && !((b = j.closest) != null && b.call(j, "[data-ds-portal]")) && d();
1714
1714
  };
1715
1715
  return document.addEventListener("keydown", u), document.addEventListener("mousedown", x), () => {
1716
1716
  document.removeEventListener("keydown", u), document.removeEventListener("mousedown", x);
@@ -1725,7 +1725,7 @@ function Ws({
1725
1725
  children: /* @__PURE__ */ e.jsxs(
1726
1726
  "div",
1727
1727
  {
1728
- ref: r,
1728
+ ref: a,
1729
1729
  className: ["ds-side-page", l && "ds-side-page--closing"].filter(Boolean).join(" "),
1730
1730
  role: "dialog",
1731
1731
  "aria-modal": "true",
@@ -1738,13 +1738,13 @@ function Ws({
1738
1738
  variant: "ghost",
1739
1739
  size: "small",
1740
1740
  icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
1741
- onClick: c,
1741
+ onClick: d,
1742
1742
  "aria-label": "Close"
1743
1743
  }
1744
1744
  ),
1745
- (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1745
+ (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1746
1746
  s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-side-page__title", children: s }),
1747
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: a })
1747
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
1748
1748
  ] }),
1749
1749
  /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: h }),
1750
1750
  p
@@ -1762,46 +1762,49 @@ function Us({
1762
1762
  children: t,
1763
1763
  collapsed: s = !1,
1764
1764
  side: n = "left",
1765
- className: a = "",
1766
- ...o
1765
+ onExpand: r,
1766
+ className: o = "",
1767
+ ...a
1767
1768
  }) {
1768
- const r = [
1769
+ const i = [
1769
1770
  "ds-nav-rail",
1770
1771
  s && "ds-nav-rail--collapsed",
1771
1772
  `ds-nav-rail--${n}`,
1772
- a
1773
- ].filter(Boolean).join(" ");
1774
- return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: t }) });
1773
+ o
1774
+ ].filter(Boolean).join(" "), l = je((c) => {
1775
+ !s || !r || c.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]') || r();
1776
+ }, [s, r]);
1777
+ return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: i, onClick: l, ...a, children: t }) });
1775
1778
  }
1776
1779
  function Vs({
1777
1780
  icon: t,
1778
1781
  label: s,
1779
1782
  selected: n = !1,
1780
- disabled: a = !1,
1783
+ disabled: r = !1,
1781
1784
  href: o,
1782
- onClick: r,
1785
+ onClick: a,
1783
1786
  count: i,
1784
1787
  updated: l = !1,
1785
- open: d = !1,
1786
- onboarding: c = !1,
1788
+ open: c = !1,
1789
+ onboarding: d = !1,
1787
1790
  className: m = "",
1788
1791
  ...p
1789
1792
  }) {
1790
- const { collapsed: h, side: u } = je(_e), j = {
1793
+ const { collapsed: h, side: u } = Ne(_e), j = {
1791
1794
  className: [
1792
1795
  "ds-nav-rail__item",
1793
1796
  m
1794
1797
  ].filter(Boolean).join(" "),
1795
- onClick: a ? void 0 : r,
1798
+ onClick: r ? void 0 : a,
1796
1799
  "aria-current": n ? "page" : void 0,
1797
- "aria-disabled": a ? "true" : void 0,
1800
+ "aria-disabled": r ? "true" : void 0,
1798
1801
  "aria-label": h ? s : void 0,
1799
- tabIndex: a ? -1 : void 0,
1802
+ tabIndex: r ? -1 : void 0,
1800
1803
  ...{
1801
1804
  "data-selected": n || void 0,
1802
- "data-disabled": a || void 0,
1803
- "data-open": d || void 0,
1804
- "data-onboarding": c || void 0
1805
+ "data-disabled": r || void 0,
1806
+ "data-open": c || void 0,
1807
+ "data-onboarding": d || void 0
1805
1808
  },
1806
1809
  ...p
1807
1810
  }, E = i != null, g = u === "left" ? "right" : "left", b = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -1810,7 +1813,7 @@ function Vs({
1810
1813
  !h && l && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1811
1814
  !h && E && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1812
1815
  h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1813
- ] }), S = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...j, children: b }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: b });
1816
+ ] }), S = o ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : o, ...j, children: b }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: b });
1814
1817
  return h ? /* @__PURE__ */ e.jsx(De, { content: s, position: g, children: S }) : S;
1815
1818
  }
1816
1819
  function Ys({ children: t, className: s = "", ...n }) {
@@ -1825,15 +1828,15 @@ function Hs({ children: t, className: s = "", ...n }) {
1825
1828
  function Ks({ className: t = "", ...s }) {
1826
1829
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
1827
1830
  }
1828
- function Gs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: a = "", ...o }) {
1829
- const { collapsed: r } = je(_e), [i, l] = I(n);
1830
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", a].filter(Boolean).join(" "), ...o, children: [
1831
- !r && /* @__PURE__ */ e.jsxs(
1831
+ function Gs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...o }) {
1832
+ const { collapsed: a } = Ne(_e), [i, l] = I(n);
1833
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...o, children: [
1834
+ !a && /* @__PURE__ */ e.jsxs(
1832
1835
  "button",
1833
1836
  {
1834
1837
  type: "button",
1835
1838
  className: ["ds-nav-rail__recents-toggle", !i && "ds-nav-rail__recents-toggle--closed"].filter(Boolean).join(" "),
1836
- onClick: () => l((d) => !d),
1839
+ onClick: () => l((c) => !c),
1837
1840
  "aria-expanded": i,
1838
1841
  children: [
1839
1842
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: s }),
@@ -1841,57 +1844,57 @@ function Gs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1841
1844
  ]
1842
1845
  }
1843
1846
  ),
1844
- (i || r) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
1847
+ (i || a) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
1845
1848
  ] });
1846
1849
  }
1847
1850
  const Xs = Qe(function({
1848
1851
  as: s = "button",
1849
1852
  avatar: n,
1850
- label: a,
1853
+ label: r,
1851
1854
  className: o = "",
1852
- ...r
1855
+ ...a
1853
1856
  }, i) {
1854
- const { collapsed: l, side: d } = je(_e), c = d === "left" ? "right" : "left", m = [
1857
+ const { collapsed: l, side: c } = Ne(_e), d = c === "left" ? "right" : "left", m = [
1855
1858
  "ds-nav-rail__item",
1856
1859
  "ds-nav-rail__agent",
1857
1860
  o
1858
1861
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1859
1862
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
1860
- !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: a })
1863
+ !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: r })
1861
1864
  ] }), h = /* @__PURE__ */ e.jsx(
1862
1865
  s,
1863
1866
  {
1864
1867
  ref: i,
1865
1868
  className: m,
1866
- "aria-label": l ? a : void 0,
1869
+ "aria-label": l ? r : void 0,
1867
1870
  ...s === "button" ? { type: "button" } : {},
1868
- ...r,
1871
+ ...a,
1869
1872
  children: p
1870
1873
  }
1871
1874
  );
1872
- return l ? /* @__PURE__ */ e.jsx(De, { content: a, position: c, children: h }) : h;
1875
+ return l ? /* @__PURE__ */ e.jsx(De, { content: r, position: d, children: h }) : h;
1873
1876
  });
1874
- function Js({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o, onClick: r, className: i = "", ...l }) {
1875
- const { collapsed: d, side: c } = je(_e), h = {
1877
+ function Js({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: o, onClick: a, className: i = "", ...l }) {
1878
+ const { collapsed: c, side: d } = Ne(_e), h = {
1876
1879
  className: [
1877
1880
  "ds-nav-rail__item",
1878
1881
  "ds-nav-rail__agent",
1879
1882
  i
1880
1883
  ].filter(Boolean).join(" "),
1881
- onClick: a ? void 0 : r,
1884
+ onClick: r ? void 0 : a,
1882
1885
  "aria-current": n ? "page" : void 0,
1883
- "aria-disabled": a ? "true" : void 0,
1884
- tabIndex: a ? -1 : void 0,
1886
+ "aria-disabled": r ? "true" : void 0,
1887
+ tabIndex: r ? -1 : void 0,
1885
1888
  ...{
1886
1889
  "data-selected": n || void 0,
1887
- "data-disabled": a || void 0
1890
+ "data-disabled": r || void 0
1888
1891
  },
1889
1892
  ...l
1890
1893
  }, u = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1891
1894
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1892
- !d && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1893
- ] }), x = c === "left" ? "right" : "left", v = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: u }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: u });
1894
- return d ? /* @__PURE__ */ e.jsx(De, { content: s, position: x, children: v }) : v;
1895
+ !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1896
+ ] }), x = d === "left" ? "right" : "left", v = o ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : o, ...h, children: u }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: u });
1897
+ return c ? /* @__PURE__ */ e.jsx(De, { content: s, position: x, children: v }) : v;
1895
1898
  }
1896
1899
  const Dt = {
1897
1900
  info: Ie,
@@ -1903,17 +1906,17 @@ function Zs({
1903
1906
  children: t,
1904
1907
  variant: s = "info",
1905
1908
  action: n,
1906
- onAction: a,
1909
+ onAction: r,
1907
1910
  onDismiss: o,
1908
- role: r,
1911
+ role: a,
1909
1912
  ...i
1910
1913
  }) {
1911
- const l = Dt[s], d = r || (s === "error" ? "alert" : "status");
1914
+ const l = Dt[s], c = a || (s === "error" ? "alert" : "status");
1912
1915
  return /* @__PURE__ */ e.jsxs(
1913
1916
  "div",
1914
1917
  {
1915
1918
  className: `ds-banner ds-banner--${s}`,
1916
- role: d,
1919
+ role: c,
1917
1920
  ...i,
1918
1921
  children: [
1919
1922
  l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: P[2], strokeWidth: 1.5 }) }),
@@ -1923,7 +1926,7 @@ function Zs({
1923
1926
  {
1924
1927
  type: "button",
1925
1928
  className: "ds-banner-action",
1926
- onClick: a,
1929
+ onClick: r,
1927
1930
  children: n
1928
1931
  }
1929
1932
  ),
@@ -1945,16 +1948,16 @@ function Qs({
1945
1948
  trigger: t,
1946
1949
  items: s = [],
1947
1950
  open: n,
1948
- onOpenChange: a,
1951
+ onOpenChange: r,
1949
1952
  align: o = "left",
1950
- fullWidth: r = !1,
1953
+ fullWidth: a = !1,
1951
1954
  className: i = "",
1952
1955
  style: l,
1953
- ...d
1956
+ ...c
1954
1957
  }) {
1955
- const [c, m] = I(!1), [p, h] = I(!1), u = n !== void 0, x = u ? n : c, v = T(null), j = T(null), E = T(null), g = T(null), [b, S] = I({}), L = T(null), C = 150, U = () => {
1958
+ const [d, m] = I(!1), [p, h] = I(!1), u = n !== void 0, x = u ? n : d, v = T(null), j = T(null), E = T(null), g = T(null), [b, S] = I({}), L = T(null), C = 150, U = () => {
1956
1959
  if (u)
1957
- a == null || a(!1);
1960
+ r == null || r(!1);
1958
1961
  else {
1959
1962
  if (p) return;
1960
1963
  h(!0), L.current = setTimeout(() => {
@@ -1963,9 +1966,9 @@ function Qs({
1963
1966
  }
1964
1967
  }, K = () => {
1965
1968
  const _ = !x;
1966
- u ? a == null || a(_) : _ ? (clearTimeout(L.current), h(!1), m(!0)) : U();
1969
+ u ? r == null || r(_) : _ ? (clearTimeout(L.current), h(!1), m(!0)) : U();
1967
1970
  }, V = () => {
1968
- x || (u ? a == null || a(!0) : (clearTimeout(L.current), h(!1), m(!0)));
1971
+ x || (u ? r == null || r(!0) : (clearTimeout(L.current), h(!1), m(!0)));
1969
1972
  };
1970
1973
  D(() => () => clearTimeout(L.current), []), D(() => {
1971
1974
  if (!x) return;
@@ -2088,9 +2091,9 @@ function Qs({
2088
2091
  "div",
2089
2092
  {
2090
2093
  ref: v,
2091
- className: ["ds-dropdown", r && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2094
+ className: ["ds-dropdown", a && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2092
2095
  style: l,
2093
- ...d,
2096
+ ...c,
2094
2097
  children: [
2095
2098
  /* @__PURE__ */ e.jsx(
2096
2099
  "div",
@@ -2111,18 +2114,18 @@ function en({
2111
2114
  value: t = 0,
2112
2115
  size: s = "m",
2113
2116
  variant: n = "default",
2114
- showValue: a = !1,
2117
+ showValue: r = !1,
2115
2118
  min: o = 2,
2116
- animate: r = !0
2119
+ animate: a = !0
2117
2120
  }) {
2118
- const i = Math.min(100, Math.max(0, t)), l = Math.max(o, i), d = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2121
+ const i = Math.min(100, Math.max(0, t)), l = Math.max(o, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2119
2122
  return /* @__PURE__ */ e.jsxs(
2120
2123
  "div",
2121
2124
  {
2122
2125
  className: [
2123
2126
  "ds-progress",
2124
2127
  `ds-progress--${s}`,
2125
- !r && "ds-progress--instant"
2128
+ !a && "ds-progress--instant"
2126
2129
  ].filter(Boolean).join(" "),
2127
2130
  role: "progressbar",
2128
2131
  "aria-valuenow": i,
@@ -2132,11 +2135,11 @@ function en({
2132
2135
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
2133
2136
  "div",
2134
2137
  {
2135
- className: `ds-progress__fill ds-progress__fill--${d}`,
2138
+ className: `ds-progress__fill ds-progress__fill--${c}`,
2136
2139
  style: { width: `${l}%` }
2137
2140
  }
2138
2141
  ) }),
2139
- a && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
2142
+ r && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
2140
2143
  Math.round(i),
2141
2144
  "%"
2142
2145
  ] })
@@ -2146,61 +2149,61 @@ function en({
2146
2149
  }
2147
2150
  const Lt = (t) => 1 - Math.pow(1 - t, 3), Pt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2148
2151
  function Mt(t, { duration: s = 600 } = {}) {
2149
- const [n, a] = I(t), o = T(t), r = T(null);
2152
+ const [n, r] = I(t), o = T(t), a = T(null);
2150
2153
  return D(() => {
2151
2154
  if (Pt()) {
2152
- a(t), o.current = t;
2155
+ r(t), o.current = t;
2153
2156
  return;
2154
2157
  }
2155
2158
  const i = o.current, l = t - i;
2156
2159
  if (l === 0) return;
2157
- let d = null;
2158
- const c = (m) => {
2159
- d || (d = m);
2160
- const p = Math.min((m - d) / s, 1);
2161
- a(i + l * Lt(p)), p < 1 ? r.current = requestAnimationFrame(c) : o.current = t;
2160
+ let c = null;
2161
+ const d = (m) => {
2162
+ c || (c = m);
2163
+ const p = Math.min((m - c) / s, 1);
2164
+ r(i + l * Lt(p)), p < 1 ? a.current = requestAnimationFrame(d) : o.current = t;
2162
2165
  };
2163
- return r.current = requestAnimationFrame(c), () => cancelAnimationFrame(r.current);
2166
+ return a.current = requestAnimationFrame(d), () => cancelAnimationFrame(a.current);
2164
2167
  }, [t, s]), n;
2165
2168
  }
2166
2169
  function tn({
2167
2170
  value: t,
2168
2171
  duration: s = 600,
2169
2172
  decimals: n = 0,
2170
- prefix: a = "",
2173
+ prefix: r = "",
2171
2174
  suffix: o = ""
2172
2175
  }) {
2173
2176
  const i = Mt(t, { duration: s }).toFixed(n);
2174
- return `${a}${i}${o}`;
2177
+ return `${r}${i}${o}`;
2175
2178
  }
2176
2179
  function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2177
- const a = T(null), [o, r] = I(!1);
2180
+ const r = T(null), [o, a] = I(!1);
2178
2181
  return D(() => {
2179
- const i = a.current;
2182
+ const i = r.current;
2180
2183
  if (!i) return;
2181
2184
  const l = new IntersectionObserver(
2182
- ([d]) => {
2183
- d.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
2185
+ ([c]) => {
2186
+ c.isIntersecting ? (a(!0), n && l.disconnect()) : n || a(!1);
2184
2187
  },
2185
2188
  { threshold: t, rootMargin: s }
2186
2189
  );
2187
2190
  return l.observe(i), () => l.disconnect();
2188
- }, [t, s, n]), { ref: a, inView: o };
2191
+ }, [t, s, n]), { ref: r, inView: o };
2189
2192
  }
2190
2193
  function sn({
2191
2194
  children: t,
2192
2195
  as: s = "div",
2193
2196
  once: n = !1,
2194
- threshold: a = 0.1,
2197
+ threshold: r = 0.1,
2195
2198
  rootMargin: o = "0px",
2196
- onEnter: r,
2199
+ onEnter: a,
2197
2200
  onLeave: i,
2198
2201
  ...l
2199
2202
  }) {
2200
- const { ref: d, inView: c } = zt({ threshold: a, rootMargin: o, once: n }), m = T(!1);
2203
+ const { ref: c, inView: d } = zt({ threshold: r, rootMargin: o, once: n }), m = T(!1);
2201
2204
  return D(() => {
2202
- c && !m.current && (r == null || r()), !c && m.current && (i == null || i()), m.current = c;
2203
- }, [c]), /* @__PURE__ */ e.jsx(s, { ref: d, ...l, children: typeof t == "function" ? t(c) : t });
2205
+ d && !m.current && (a == null || a()), !d && m.current && (i == null || i()), m.current = d;
2206
+ }, [d]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(d) : t });
2204
2207
  }
2205
2208
  const Ue = {
2206
2209
  default: Ie,
@@ -2209,9 +2212,9 @@ const Ue = {
2209
2212
  error: Re
2210
2213
  };
2211
2214
  let me = [];
2212
- const ke = /* @__PURE__ */ new Set();
2215
+ const Ee = /* @__PURE__ */ new Set();
2213
2216
  function Ge() {
2214
- ke.forEach((t) => t([...me]));
2217
+ Ee.forEach((t) => t([...me]));
2215
2218
  }
2216
2219
  function Ct(t) {
2217
2220
  me = [...me, t], Ge();
@@ -2232,10 +2235,10 @@ function nn() {
2232
2235
  return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
2233
2236
  }
2234
2237
  function Ft({ data: t, onDismiss: s }) {
2235
- const [n, a] = I(!1), o = T(null);
2236
- D(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
2237
- function r() {
2238
- a(!1), setTimeout(() => s(t.id), 250);
2238
+ const [n, r] = I(!1), o = T(null);
2239
+ D(() => (requestAnimationFrame(() => r(!0)), t.duration > 0 && (o.current = setTimeout(() => a(), t.duration)), () => clearTimeout(o.current)), []);
2240
+ function a() {
2241
+ r(!1), setTimeout(() => s(t.id), 250);
2239
2242
  }
2240
2243
  const i = Ue[t.type] ?? Ue.default;
2241
2244
  return /* @__PURE__ */ e.jsxs(
@@ -2255,7 +2258,7 @@ function Ft({ data: t, onDismiss: s }) {
2255
2258
  "button",
2256
2259
  {
2257
2260
  className: "ds-toast__close",
2258
- onClick: r,
2261
+ onClick: a,
2259
2262
  "aria-label": "Закрыть",
2260
2263
  children: /* @__PURE__ */ e.jsx(ee, { size: P[3], strokeWidth: 1.5 })
2261
2264
  }
@@ -2266,8 +2269,8 @@ function Ft({ data: t, onDismiss: s }) {
2266
2269
  }
2267
2270
  function rn({ position: t = "bottom-right" }) {
2268
2271
  const [s, n] = I(() => [...me]);
2269
- return D(() => (ke.add(n), () => ke.delete(n)), []), !s.length || typeof document > "u" ? null : pe.createPortal(
2270
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(Ft, { data: a, onDismiss: Ot }, a.id)) }),
2272
+ return D(() => (Ee.add(n), () => Ee.delete(n)), []), !s.length || typeof document > "u" ? null : pe.createPortal(
2273
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Ft, { data: r, onDismiss: Ot }, r.id)) }),
2271
2274
  document.body
2272
2275
  );
2273
2276
  }
@@ -2280,32 +2283,32 @@ function an({
2280
2283
  label: t,
2281
2284
  status: s = "idle",
2282
2285
  icon: n,
2283
- badge: a,
2286
+ badge: r,
2284
2287
  defaultExpanded: o = !1,
2285
- expanded: r,
2288
+ expanded: a,
2286
2289
  onToggle: i,
2287
2290
  children: l,
2288
- className: d = "",
2289
- ...c
2291
+ className: c = "",
2292
+ ...d
2290
2293
  }) {
2291
2294
  const m = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2292
2295
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2293
2296
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2294
2297
  Wt[s],
2295
- a
2298
+ r
2296
2299
  ] });
2297
2300
  return l ? /* @__PURE__ */ e.jsx(
2298
2301
  "div",
2299
2302
  {
2300
- className: ["ds-tool-card", m && "ds-tool-card--running", d].filter(Boolean).join(" "),
2301
- ...c,
2303
+ className: ["ds-tool-card", m && "ds-tool-card--running", c].filter(Boolean).join(" "),
2304
+ ...d,
2302
2305
  children: /* @__PURE__ */ e.jsx(
2303
2306
  Be,
2304
2307
  {
2305
2308
  title: p,
2306
2309
  padding: "s",
2307
2310
  defaultExpanded: o,
2308
- expanded: m ? !1 : r,
2311
+ expanded: m ? !1 : a,
2309
2312
  onToggle: m ? void 0 : i,
2310
2313
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2311
2314
  }
@@ -2314,8 +2317,8 @@ function an({
2314
2317
  ) : /* @__PURE__ */ e.jsx(
2315
2318
  "div",
2316
2319
  {
2317
- className: ["ds-tool-card", "ds-tool-card--bubble", d].filter(Boolean).join(" "),
2318
- ...c,
2320
+ className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
2321
+ ...d,
2319
2322
  children: p
2320
2323
  }
2321
2324
  );
@@ -2324,11 +2327,11 @@ function Ut({
2324
2327
  text: t,
2325
2328
  size: s = "xs",
2326
2329
  timeout: n = 800,
2327
- "aria-label": a = "Copy to clipboard",
2330
+ "aria-label": r = "Copy to clipboard",
2328
2331
  ...o
2329
2332
  }) {
2330
- const [r, i] = I(!1), l = (d) => {
2331
- d.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2333
+ const [a, i] = I(!1), l = (c) => {
2334
+ c.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2332
2335
  i(!0), setTimeout(() => i(!1), n);
2333
2336
  });
2334
2337
  };
@@ -2337,22 +2340,22 @@ function Ut({
2337
2340
  {
2338
2341
  variant: "ghost",
2339
2342
  size: s,
2340
- state: r ? "success" : "idle",
2343
+ state: a ? "success" : "idle",
2341
2344
  icon: /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5 }),
2342
- "aria-label": a,
2345
+ "aria-label": r,
2343
2346
  onClick: l,
2344
2347
  ...o
2345
2348
  }
2346
2349
  );
2347
2350
  }
2348
2351
  function on({ content: t, streaming: s = !1, ...n }) {
2349
- const [a, o] = I(s);
2352
+ const [r, o] = I(s);
2350
2353
  return D(() => {
2351
2354
  o(!!s);
2352
2355
  }, [s]), /* @__PURE__ */ e.jsx(
2353
2356
  Be,
2354
2357
  {
2355
- expanded: a,
2358
+ expanded: r,
2356
2359
  onToggle: o,
2357
2360
  padding: "s",
2358
2361
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
@@ -2371,15 +2374,15 @@ function ln({
2371
2374
  count: t,
2372
2375
  current: s = 0,
2373
2376
  done: n = [],
2374
- onChange: a,
2377
+ onChange: r,
2375
2378
  showCounter: o = !0,
2376
- className: r = "",
2379
+ className: a = "",
2377
2380
  "aria-label": i = "Steps",
2378
2381
  ...l
2379
2382
  }) {
2380
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
2381
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (d, c) => {
2382
- const m = c === s, p = n.includes(c) && !m, h = a && (c <= s || n.includes(c)), u = [
2383
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", a].filter(Boolean).join(" "), ...l, children: [
2384
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, d) => {
2385
+ const m = d === s, p = n.includes(d) && !m, h = r && (d <= s || n.includes(d)), u = [
2383
2386
  "ds-step-indicator__dot",
2384
2387
  m && "ds-step-indicator__dot--active",
2385
2388
  p && "ds-step-indicator__dot--done"
@@ -2391,12 +2394,12 @@ function ln({
2391
2394
  className: u,
2392
2395
  role: "tab",
2393
2396
  "aria-selected": m,
2394
- "aria-label": `Step ${c + 1}`,
2395
- disabled: !h || c === s,
2396
- onClick: () => a == null ? void 0 : a(c),
2397
+ "aria-label": `Step ${d + 1}`,
2398
+ disabled: !h || d === s,
2399
+ onClick: () => r == null ? void 0 : r(d),
2397
2400
  children: p ? /* @__PURE__ */ e.jsx(Te, { size: 8, strokeWidth: 3 }) : null
2398
2401
  },
2399
- c
2402
+ d
2400
2403
  );
2401
2404
  }) }),
2402
2405
  o && /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, className: "ds-step-indicator__counter", children: [
@@ -2410,14 +2413,14 @@ function cn({
2410
2413
  content: t,
2411
2414
  isStreaming: s = !1,
2412
2415
  cursor: n = "line",
2413
- onChunk: a,
2416
+ onChunk: r,
2414
2417
  className: o = "",
2415
- ...r
2418
+ ...a
2416
2419
  }) {
2417
2420
  const i = T(t);
2418
2421
  return D(() => {
2419
- t !== i.current && (a == null || a(t), i.current = t);
2420
- }, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...r, children: [
2422
+ t !== i.current && (r == null || r(t), i.current = t);
2423
+ }, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...a, children: [
2421
2424
  t,
2422
2425
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2423
2426
  ] });
@@ -2426,54 +2429,54 @@ function dn({
2426
2429
  role: t = "assistant",
2427
2430
  header: s,
2428
2431
  footer: n,
2429
- attachments: a,
2432
+ attachments: r,
2430
2433
  isStreaming: o = !1,
2431
- children: r,
2434
+ children: a,
2432
2435
  className: i = "",
2433
2436
  ...l
2434
2437
  }) {
2435
- const d = [
2438
+ const c = [
2436
2439
  "ds-chat-message",
2437
2440
  `ds-chat-message--${t}`,
2438
2441
  o && "ds-chat-message--streaming",
2439
2442
  i
2440
2443
  ].filter(Boolean).join(" ");
2441
- return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: d, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2442
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2443
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
2444
+ return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: c, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: a }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2445
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2446
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: a }),
2444
2447
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2445
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2448
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2446
2449
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
2447
- a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2448
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
2450
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2451
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: a }),
2449
2452
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2450
2453
  ] });
2451
2454
  }
2452
2455
  function un(t, { containerRef: s, smartPause: n = !0 } = {}) {
2453
- const a = T(!1), o = T(0);
2456
+ const r = T(!1), o = T(0);
2454
2457
  D(() => {
2455
- const r = s == null ? void 0 : s.current;
2456
- if (!r) return;
2458
+ const a = s == null ? void 0 : s.current;
2459
+ if (!a) return;
2457
2460
  const i = () => {
2458
- const l = r.scrollHeight - r.scrollTop - r.clientHeight < 64;
2459
- !l && r.scrollTop < o.current && (a.current = !0), l && (a.current = !1), o.current = r.scrollTop;
2461
+ const l = a.scrollHeight - a.scrollTop - a.clientHeight < 64;
2462
+ !l && a.scrollTop < o.current && (r.current = !0), l && (r.current = !1), o.current = a.scrollTop;
2460
2463
  };
2461
- return r.addEventListener("scroll", i, { passive: !0 }), () => r.removeEventListener("scroll", i);
2464
+ return a.addEventListener("scroll", i, { passive: !0 }), () => a.removeEventListener("scroll", i);
2462
2465
  }, [s]), D(() => {
2463
- const r = s == null ? void 0 : s.current;
2464
- r && (n && a.current || (r.scrollTop = r.scrollHeight));
2466
+ const a = s == null ? void 0 : s.current;
2467
+ a && (n && r.current || (a.scrollTop = a.scrollHeight));
2465
2468
  }, t);
2466
2469
  }
2467
2470
  function Vt({
2468
2471
  prompts: t,
2469
2472
  enabled: s,
2470
2473
  typingSpeed: n = 38,
2471
- erasingSpeed: a = 18,
2474
+ erasingSpeed: r = 18,
2472
2475
  holdTime: o = 2200,
2473
- betweenTime: r = 380,
2476
+ betweenTime: a = 380,
2474
2477
  manualPauseMs: i = 5e3
2475
2478
  }) {
2476
- const [l, d] = I(0), [c, m] = I(""), p = T("typing"), h = T(0), u = T(0), x = T(null), v = T(0);
2479
+ const [l, c] = I(0), [d, m] = I(""), p = T("typing"), h = T(0), u = T(0), x = T(null), v = T(0);
2477
2480
  D(() => {
2478
2481
  u.current = l;
2479
2482
  }, [l]), D(() => {
@@ -2488,31 +2491,31 @@ function Vt({
2488
2491
  return;
2489
2492
  }
2490
2493
  const C = t[u.current % t.length] ?? "";
2491
- p.current === "typing" ? (h.current += 1, m(C.slice(0, h.current)), h.current >= C.length ? (p.current = "holding", x.current = setTimeout(S, o)) : x.current = setTimeout(S, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(S, a)) : (h.current = Math.max(0, h.current - 1), m(C.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % t.length, d(u.current), x.current = setTimeout(S, r)) : x.current = setTimeout(S, a));
2494
+ p.current === "typing" ? (h.current += 1, m(C.slice(0, h.current)), h.current >= C.length ? (p.current = "holding", x.current = setTimeout(S, o)) : x.current = setTimeout(S, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(S, r)) : (h.current = Math.max(0, h.current - 1), m(C.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % t.length, c(u.current), x.current = setTimeout(S, a)) : x.current = setTimeout(S, r));
2492
2495
  };
2493
2496
  return x.current = setTimeout(S, 260), () => {
2494
2497
  x.current && clearTimeout(x.current);
2495
2498
  };
2496
- }, [s, t, n, a, o, r]);
2499
+ }, [s, t, n, r, o, a]);
2497
2500
  const j = (S) => {
2498
2501
  if (t.length === 0) return;
2499
2502
  const L = (S % t.length + t.length) % t.length, C = t[L];
2500
- u.current = L, h.current = C.length, p.current = "holding", v.current = Date.now() + i, d(L), m(C);
2503
+ u.current = L, h.current = C.length, p.current = "holding", v.current = Date.now() + i, c(L), m(C);
2501
2504
  }, E = () => j(u.current + 1), g = () => j(u.current - 1), b = t[l % t.length] ?? "";
2502
- return { displayed: c, currentPrompt: b, index: l, next: E, prev: g };
2505
+ return { displayed: d, currentPrompt: b, index: l, next: E, prev: g };
2503
2506
  }
2504
2507
  let Yt = 0;
2505
2508
  function fn({
2506
2509
  value: t = "",
2507
2510
  onChange: s,
2508
2511
  onSubmit: n,
2509
- onStop: a,
2512
+ onStop: r,
2510
2513
  onKeyDown: o,
2511
- loading: r = !1,
2514
+ loading: a = !1,
2512
2515
  disabled: i = !1,
2513
2516
  placeholder: l = "Let's get things done...",
2514
- animatedPlaceholders: d,
2515
- attachments: c,
2517
+ animatedPlaceholders: c,
2518
+ attachments: d,
2516
2519
  images: m,
2517
2520
  onAttachFiles: p,
2518
2521
  onAttachImages: h,
@@ -2548,12 +2551,12 @@ function fn({
2548
2551
  }, [t]), D(() => {
2549
2552
  const N = (B) => {
2550
2553
  var J, Z, te;
2551
- if (r || i) return;
2554
+ if (a || i) return;
2552
2555
  const X = (J = B.target) == null ? void 0 : J.tagName;
2553
2556
  X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = B.target) != null && Z.isContentEditable || B.ctrlKey || B.metaKey || B.altKey || B.key.length !== 1 && B.key !== "Backspace" && B.key !== "Delete" || (te = K.current) == null || te.focus();
2554
2557
  };
2555
2558
  return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2556
- }, [r, i]);
2559
+ }, [a, i]);
2557
2560
  const $ = (N) => {
2558
2561
  N.preventDefault(), V.current++, N.dataTransfer.types.includes("Files") && M(!0);
2559
2562
  }, z = (N) => {
@@ -2578,10 +2581,10 @@ function fn({
2578
2581
  if (X.length === 0) return;
2579
2582
  const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ce } = k(X);
2580
2583
  Z.length && A(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && A(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ce && A(`Max ${E} images per message`), J.length && (N.preventDefault(), h(J));
2581
- }, Q = !r && !i && !!(d != null && d.length) && t.length === 0, ie = Vt({
2582
- prompts: d ?? [],
2584
+ }, Q = !a && !i && !!(c != null && c.length) && t.length === 0, ie = Vt({
2585
+ prompts: c ?? [],
2583
2586
  enabled: Q
2584
- }), Ne = (N) => {
2587
+ }), we = (N) => {
2585
2588
  if (Q) {
2586
2589
  if (N.key === "ArrowDown" || N.key === "ArrowRight") {
2587
2590
  N.preventDefault(), ie.next();
@@ -2597,7 +2600,7 @@ function fn({
2597
2600
  }
2598
2601
  }
2599
2602
  o == null || o(N);
2600
- }, Xe = (t.trim() || (m == null ? void 0 : m.length) > 0 || (c == null ? void 0 : c.length) > 0) && !i, Le = p || h;
2603
+ }, Xe = (t.trim() || (m == null ? void 0 : m.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Le = p || h;
2601
2604
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", L].filter(Boolean).join(" "), ...C, children: [
2602
2605
  Le && /* @__PURE__ */ e.jsx(
2603
2606
  "input",
@@ -2626,10 +2629,10 @@ function fn({
2626
2629
  ref: K,
2627
2630
  value: t,
2628
2631
  onChange: (N) => s == null ? void 0 : s(N.target.value),
2629
- onKeyDown: Ne,
2632
+ onKeyDown: we,
2630
2633
  onPaste: q,
2631
2634
  placeholder: Q ? "" : l,
2632
- disabled: r || i,
2635
+ disabled: a || i,
2633
2636
  rows: 1,
2634
2637
  className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2635
2638
  }
@@ -2664,7 +2667,7 @@ function fn({
2664
2667
  }
2665
2668
  )
2666
2669
  ] }, N.id)) }),
2667
- c && c.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: c.map((N, B) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2670
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((N, B) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2668
2671
  N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Me, { size: P[1], strokeWidth: 1.5 }),
2669
2672
  N.filename,
2670
2673
  N.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
@@ -2694,13 +2697,13 @@ function fn({
2694
2697
  b,
2695
2698
  S,
2696
2699
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2697
- r ? /* @__PURE__ */ e.jsx(
2700
+ a ? /* @__PURE__ */ e.jsx(
2698
2701
  ae,
2699
2702
  {
2700
2703
  variant: "primary",
2701
2704
  size: "xs",
2702
2705
  icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
2703
- onClick: a,
2706
+ onClick: r,
2704
2707
  "aria-label": "Stop"
2705
2708
  }
2706
2709
  ) : /* @__PURE__ */ e.jsx(
@@ -2725,16 +2728,16 @@ function mn({
2725
2728
  models: t = [],
2726
2729
  value: s,
2727
2730
  onChange: n,
2728
- size: a = "xs",
2731
+ size: r = "xs",
2729
2732
  minTier: o,
2730
- showAutoOption: r = !1,
2733
+ showAutoOption: a = !1,
2731
2734
  groupByTier: i = !0,
2732
2735
  className: l = "",
2733
- ...d
2736
+ ...c
2734
2737
  }) {
2735
- const [c, m] = I(!1), p = T(null), h = T(null), u = T(null), [x, v] = I({}), j = t.filter((w) => !o || w.name === "auto" ? !0 : (Ve[w.tier] ?? 1) >= (Ve[o] ?? 1)), E = j.find((w) => w.name === "auto"), g = j.filter((w) => w.name !== "auto"), b = t.find((w) => w.name === s), L = new Set(g.map((w) => w.tier).filter(Boolean)).size > 1;
2738
+ const [d, m] = I(!1), p = T(null), h = T(null), u = T(null), [x, v] = I({}), j = t.filter((w) => !o || w.name === "auto" ? !0 : (Ve[w.tier] ?? 1) >= (Ve[o] ?? 1)), E = j.find((w) => w.name === "auto"), g = j.filter((w) => w.name !== "auto"), b = t.find((w) => w.name === s), L = new Set(g.map((w) => w.tier).filter(Boolean)).size > 1;
2736
2739
  D(() => {
2737
- if (!c) return;
2740
+ if (!d) return;
2738
2741
  const w = 320, M = () => {
2739
2742
  var R;
2740
2743
  const A = (R = h.current) == null ? void 0 : R.getBoundingClientRect();
@@ -2757,7 +2760,7 @@ function mn({
2757
2760
  return document.addEventListener("mousedown", G), document.addEventListener("keydown", F), () => {
2758
2761
  window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("mousedown", G), document.removeEventListener("keydown", F);
2759
2762
  };
2760
- }, [c]);
2763
+ }, [d]);
2761
2764
  const C = (w) => {
2762
2765
  n == null || n(w), m(!1);
2763
2766
  }, U = (w) => /* @__PURE__ */ e.jsxs(
@@ -2782,8 +2785,8 @@ function mn({
2782
2785
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": w, children: w.charAt(0).toUpperCase() + w.slice(1) }, `lbl-${w}`),
2783
2786
  ...M.map(U)
2784
2787
  ] : [];
2785
- }), V = c && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2786
- r && E && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2788
+ }), V = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2789
+ a && E && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2787
2790
  /* @__PURE__ */ e.jsxs(
2788
2791
  "button",
2789
2792
  {
@@ -2809,7 +2812,7 @@ function mn({
2809
2812
  {
2810
2813
  ref: p,
2811
2814
  className: ["ds-model-picker", l].filter(Boolean).join(" "),
2812
- ...d,
2815
+ ...c,
2813
2816
  children: [
2814
2817
  /* @__PURE__ */ e.jsxs(
2815
2818
  "button",
@@ -2819,7 +2822,7 @@ function mn({
2819
2822
  className: "ds-model-picker__trigger",
2820
2823
  onClick: () => m((w) => !w),
2821
2824
  "aria-haspopup": "listbox",
2822
- "aria-expanded": c,
2825
+ "aria-expanded": d,
2823
2826
  children: [
2824
2827
  b != null && b.icon ? /* @__PURE__ */ e.jsx("span", { children: b.icon }) : /* @__PURE__ */ e.jsx(ze, { size: 12, strokeWidth: 1.5 }),
2825
2828
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (b == null ? void 0 : b.displayName) || (b == null ? void 0 : b.name) || s }),
@@ -2834,9 +2837,9 @@ function mn({
2834
2837
  }
2835
2838
  const qt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2836
2839
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
2837
- s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(s) })
2840
+ s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: $e(s) })
2838
2841
  ] });
2839
- function Ee(t) {
2842
+ function $e(t) {
2840
2843
  return t != null && t.length ? "p. " + t.join(", ") : null;
2841
2844
  }
2842
2845
  function Ht(t) {
@@ -2849,12 +2852,12 @@ function pn({
2849
2852
  sources: t = [],
2850
2853
  layout: s = "list",
2851
2854
  title: n = "Sources",
2852
- maxVisible: a = 5,
2855
+ maxVisible: r = 5,
2853
2856
  onSourceClick: o
2854
2857
  }) {
2855
- const [r, i] = I(!1), l = Ht(t), d = l.length > a, c = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2858
+ const [a, i] = I(!1), l = Ht(t), c = l.length > r, d = a ? l : l.slice(0, r), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2856
2859
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2857
- c.map((h) => {
2860
+ d.map((h) => {
2858
2861
  const u = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2859
2862
  return /* @__PURE__ */ e.jsxs(
2860
2863
  "div",
@@ -2864,20 +2867,20 @@ function pn({
2864
2867
  children: [
2865
2868
  /* @__PURE__ */ e.jsx(mt, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2866
2869
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2867
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(u) })
2870
+ u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: $e(u) })
2868
2871
  ]
2869
2872
  },
2870
2873
  h.filename
2871
2874
  );
2872
2875
  }),
2873
- d && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2876
+ c && !a && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2874
2877
  "+",
2875
- l.length - a,
2878
+ l.length - r,
2876
2879
  " more sources"
2877
2880
  ] })
2878
2881
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2879
2882
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2880
- c.map((h) => {
2883
+ d.map((h) => {
2881
2884
  const u = h.items.map((v) => v.page).filter(Boolean), x = !!o;
2882
2885
  return m ? /* @__PURE__ */ e.jsx(
2883
2886
  Be,
@@ -2902,15 +2905,15 @@ function pn({
2902
2905
  onClick: x ? () => o(h.items[0]) : void 0,
2903
2906
  children: [
2904
2907
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2905
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(u) })
2908
+ u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: $e(u) })
2906
2909
  ]
2907
2910
  },
2908
2911
  h.filename
2909
2912
  );
2910
2913
  }),
2911
- d && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2914
+ c && !a && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2912
2915
  "+",
2913
- l.length - a,
2916
+ l.length - r,
2914
2917
  " more sources"
2915
2918
  ] })
2916
2919
  ] });
@@ -2922,12 +2925,12 @@ function hn({
2922
2925
  used: t,
2923
2926
  limit: s,
2924
2927
  size: n = "s",
2925
- showCount: a = !0,
2928
+ showCount: r = !0,
2926
2929
  showPercent: o = !1,
2927
- warningThreshold: r = 0.8,
2930
+ warningThreshold: a = 0.8,
2928
2931
  errorThreshold: i = 1
2929
2932
  }) {
2930
- const l = s > 0 ? t / s : 0, d = Math.min(l * 100, 100), c = l >= i ? "error" : l >= r ? "warning" : "normal";
2933
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), d = l >= i ? "error" : l >= a ? "warning" : "normal";
2931
2934
  return /* @__PURE__ */ e.jsxs(
2932
2935
  "div",
2933
2936
  {
@@ -2939,12 +2942,12 @@ function hn({
2939
2942
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
2940
2943
  "div",
2941
2944
  {
2942
- className: `ds-token-counter__fill ds-token-counter__fill--${c}`,
2943
- style: { width: `${d}%` }
2945
+ className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
2946
+ style: { width: `${c}%` }
2944
2947
  }
2945
2948
  ) }),
2946
- (a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${c}`, children: [
2947
- a && /* @__PURE__ */ e.jsxs("span", { children: [
2949
+ (r || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
2950
+ r && /* @__PURE__ */ e.jsxs("span", { children: [
2948
2951
  qe(t),
2949
2952
  " / ",
2950
2953
  qe(s)
@@ -2966,27 +2969,27 @@ function xn({
2966
2969
  value: t = 0,
2967
2970
  size: s = "xs",
2968
2971
  showLabel: n = "none",
2969
- layout: a = "inline"
2972
+ layout: r = "inline"
2970
2973
  }) {
2971
- const o = Math.max(0, Math.min(1, t)), r = Math.round(o * He), i = Kt(o);
2974
+ const o = Math.max(0, Math.min(1, t)), a = Math.round(o * He), i = Kt(o);
2972
2975
  return /* @__PURE__ */ e.jsxs("div", { className: [
2973
2976
  "ds-confidence-bar",
2974
2977
  `ds-confidence-bar--${s}`,
2975
2978
  `ds-confidence-bar--${i}`,
2976
- a === "block" && "ds-confidence-bar--block"
2979
+ r === "block" && "ds-confidence-bar--block"
2977
2980
  ].filter(Boolean).join(" "), children: [
2978
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: He }, (l, d) => /* @__PURE__ */ e.jsx(
2981
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: He }, (l, c) => /* @__PURE__ */ e.jsx(
2979
2982
  "div",
2980
2983
  {
2981
- className: `ds-confidence-bar__seg${d < r ? " ds-confidence-bar__seg--filled" : ""}`
2984
+ className: `ds-confidence-bar__seg${c < a ? " ds-confidence-bar__seg--filled" : ""}`
2982
2985
  },
2983
- d
2986
+ c
2984
2987
  )) }),
2985
2988
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
2986
2989
  ] });
2987
2990
  }
2988
2991
  const Gt = { add: "+", remove: "-", context: " " };
2989
- function we({ line: t, lineNumbers: s }) {
2992
+ function ge({ line: t, lineNumbers: s }) {
2990
2993
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
2991
2994
  s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
2992
2995
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Gt[t.type] }),
@@ -2997,9 +3000,9 @@ function vn({
2997
3000
  lines: t = [],
2998
3001
  layout: s = "inline",
2999
3002
  wordWrap: n = !1,
3000
- lineNumbers: a = !0,
3003
+ lineNumbers: r = !0,
3001
3004
  maxHeight: o,
3002
- title: r
3005
+ title: a
3003
3006
  }) {
3004
3007
  const i = [
3005
3008
  "ds-diff-view",
@@ -3007,39 +3010,39 @@ function vn({
3007
3010
  n && "ds-diff-view--wrap"
3008
3011
  ].filter(Boolean).join(" "), l = o ? { maxHeight: o, overflowY: "auto" } : void 0;
3009
3012
  if (s === "split") {
3010
- const d = t.filter((m) => m.type === "remove" || m.type === "context"), c = t.filter((m) => m.type === "add" || m.type === "context");
3013
+ const c = t.filter((m) => m.type === "remove" || m.type === "context"), d = t.filter((m) => m.type === "add" || m.type === "context");
3011
3014
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3012
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
3015
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: a }),
3013
3016
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3014
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((m, p) => /* @__PURE__ */ e.jsx(we, { line: m, lineNumbers: a }, p)) }),
3015
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((m, p) => /* @__PURE__ */ e.jsx(we, { line: m, lineNumbers: a }, p)) })
3017
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: r }, p)) }),
3018
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: r }, p)) })
3016
3019
  ] })
3017
3020
  ] });
3018
3021
  }
3019
3022
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3020
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
3021
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((d, c) => /* @__PURE__ */ e.jsx(we, { line: d, lineNumbers: a }, c)) })
3023
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: a }),
3024
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, d) => /* @__PURE__ */ e.jsx(ge, { line: c, lineNumbers: r }, d)) })
3022
3025
  ] });
3023
3026
  }
3024
3027
  function Xt({
3025
3028
  value: t = "idle",
3026
3029
  onLike: s,
3027
3030
  onDislike: n,
3028
- className: a = "",
3031
+ className: r = "",
3029
3032
  ...o
3030
3033
  }) {
3031
- const r = t !== "idle";
3034
+ const a = t !== "idle";
3032
3035
  return /* @__PURE__ */ e.jsxs(
3033
3036
  "div",
3034
3037
  {
3035
3038
  className: [
3036
3039
  "ds-message-feedback",
3037
- r && "ds-message-feedback--voted",
3038
- a
3040
+ a && "ds-message-feedback--voted",
3041
+ r
3039
3042
  ].filter(Boolean).join(" "),
3040
3043
  ...o,
3041
3044
  children: [
3042
- (!r || t === "liked") && /* @__PURE__ */ e.jsx(
3045
+ (!a || t === "liked") && /* @__PURE__ */ e.jsx(
3043
3046
  "button",
3044
3047
  {
3045
3048
  className: [
@@ -3047,7 +3050,7 @@ function Xt({
3047
3050
  t === "liked" && "ds-message-feedback__btn--liked"
3048
3051
  ].filter(Boolean).join(" "),
3049
3052
  onClick: s,
3050
- disabled: r,
3053
+ disabled: a,
3051
3054
  "aria-label": "Like",
3052
3055
  "aria-pressed": t === "liked",
3053
3056
  children: /* @__PURE__ */ e.jsx(
@@ -3060,7 +3063,7 @@ function Xt({
3060
3063
  )
3061
3064
  }
3062
3065
  ),
3063
- (!r || t === "disliked") && /* @__PURE__ */ e.jsx(
3066
+ (!a || t === "disliked") && /* @__PURE__ */ e.jsx(
3064
3067
  "button",
3065
3068
  {
3066
3069
  className: [
@@ -3068,7 +3071,7 @@ function Xt({
3068
3071
  t === "disliked" && "ds-message-feedback__btn--disliked"
3069
3072
  ].filter(Boolean).join(" "),
3070
3073
  onClick: n,
3071
- disabled: r,
3074
+ disabled: a,
3072
3075
  "aria-label": "Dislike",
3073
3076
  "aria-pressed": t === "disliked",
3074
3077
  children: /* @__PURE__ */ e.jsx(
@@ -3088,32 +3091,32 @@ function Xt({
3088
3091
  function Jt(t) {
3089
3092
  const s = t instanceof Date ? t : new Date(t);
3090
3093
  if (isNaN(s)) return null;
3091
- const n = /* @__PURE__ */ new Date(), a = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(o - 864e5);
3092
- if (s >= o) return a;
3093
- if (s >= r) return `Yesterday ${a}`;
3094
+ const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), a = new Date(o - 864e5);
3095
+ if (s >= o) return r;
3096
+ if (s >= a) return `Yesterday ${r}`;
3094
3097
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3095
- return `${i} ${l} ${a}`;
3098
+ return `${i} ${l} ${r}`;
3096
3099
  }
3097
3100
  function _n({
3098
3101
  role: t = "assistant",
3099
3102
  text: s,
3100
3103
  timestamp: n,
3101
- feedbackValue: a = "idle",
3104
+ feedbackValue: r = "idle",
3102
3105
  onLike: o,
3103
- onDislike: r,
3106
+ onDislike: a,
3104
3107
  className: i = "",
3105
3108
  ...l
3106
3109
  }) {
3107
- const d = t === "assistant" && (o || r), c = !!s, m = n ? Jt(n) : null;
3108
- return !d && !c && !m ? null : /* @__PURE__ */ e.jsxs(
3110
+ const c = t === "assistant" && (o || a), d = !!s, m = n ? Jt(n) : null;
3111
+ return !c && !d && !m ? null : /* @__PURE__ */ e.jsxs(
3109
3112
  "div",
3110
3113
  {
3111
3114
  className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
3112
3115
  ...l,
3113
3116
  children: [
3114
3117
  t === "user" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m }),
3115
- d && /* @__PURE__ */ e.jsx(Xt, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
3116
- c && /* @__PURE__ */ e.jsx(Ut, { className: "ds-message-action", text: s }),
3118
+ c && /* @__PURE__ */ e.jsx(Xt, { className: "ds-message-action", value: r, onLike: o, onDislike: a }),
3119
+ d && /* @__PURE__ */ e.jsx(Ut, { className: "ds-message-action", text: s }),
3117
3120
  t === "assistant" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m })
3118
3121
  ]
3119
3122
  }
@@ -3125,8 +3128,8 @@ function bn({ label: t, className: s = "", ...n }) {
3125
3128
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3126
3129
  ] });
3127
3130
  }
3128
- function jn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3129
- const r = t === "dark", i = s ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", d = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3131
+ function jn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...o }) {
3132
+ const a = t === "dark", i = s ?? a, l = a ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = a ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3130
3133
  return /* @__PURE__ */ e.jsx(
3131
3134
  "div",
3132
3135
  {
@@ -3139,7 +3142,7 @@ function jn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3139
3142
  ...i && {
3140
3143
  background: "radial-gradient(ellipse 1000px 500px at 50% 30%, rgba(234,100,100,0.18), transparent 70%)"
3141
3144
  },
3142
- ...a
3145
+ ...r
3143
3146
  },
3144
3147
  ...o,
3145
3148
  children: /* @__PURE__ */ e.jsx(
@@ -3151,8 +3154,8 @@ function jn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3151
3154
  backgroundImage: [
3152
3155
  `linear-gradient(${l} 1px, transparent 1px)`,
3153
3156
  `linear-gradient(90deg, ${l} 1px, transparent 1px)`,
3154
- `linear-gradient(${d} 1px, transparent 1px)`,
3155
- `linear-gradient(90deg, ${d} 1px, transparent 1px)`
3157
+ `linear-gradient(${c} 1px, transparent 1px)`,
3158
+ `linear-gradient(90deg, ${c} 1px, transparent 1px)`
3156
3159
  ].join(", "),
3157
3160
  backgroundSize: "80px 80px, 80px 80px, 16px 16px, 16px 16px",
3158
3161
  backgroundPosition: "-1px -1px, -1px -1px, -1px -1px, -1px -1px",
@@ -3166,61 +3169,61 @@ function jn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
3166
3169
  }
3167
3170
  );
3168
3171
  }
3169
- function Nn({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
3170
- const r = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3172
+ function Nn({ children: t, axis: s = "y", style: n, className: r = "", ...o }) {
3173
+ const a = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3171
3174
  return /* @__PURE__ */ e.jsx(
3172
3175
  "div",
3173
3176
  {
3174
- className: `ds-scrollable ${a}`,
3175
- style: { ...r, ...n },
3177
+ className: `ds-scrollable ${r}`,
3178
+ style: { ...a, ...n },
3176
3179
  ...o,
3177
3180
  children: t
3178
3181
  }
3179
3182
  );
3180
3183
  }
3181
- const ge = 280, Zt = 22, Qt = 14, le = 8, be = 6, es = 200;
3184
+ const ye = 280, Zt = 22, Qt = 14, le = 8, be = 6, es = 200;
3182
3185
  function ts(t) {
3183
3186
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3184
3187
  }
3185
- function ss(t, s, n, a) {
3186
- const o = window.innerWidth, r = window.innerHeight;
3187
- if (r - t.bottom >= s + a + le) return "bottom";
3188
- if (t.top >= s + a + le) return "top";
3189
- if (o - t.right >= n + a + le) return "right";
3190
- if (t.left >= n + a + le) return "left";
3191
- const i = Math.max(t.top, r - t.bottom, o - t.right, t.left);
3192
- return i === r - t.bottom ? "bottom" : i === t.top ? "top" : i === o - t.right ? "right" : "left";
3193
- }
3194
- function ns(t, s, n, a, o) {
3195
- const r = window.innerWidth, i = window.innerHeight;
3196
- let l, d;
3188
+ function ss(t, s, n, r) {
3189
+ const o = window.innerWidth, a = window.innerHeight;
3190
+ if (a - t.bottom >= s + r + le) return "bottom";
3191
+ if (t.top >= s + r + le) return "top";
3192
+ if (o - t.right >= n + r + le) return "right";
3193
+ if (t.left >= n + r + le) return "left";
3194
+ const i = Math.max(t.top, a - t.bottom, o - t.right, t.left);
3195
+ return i === a - t.bottom ? "bottom" : i === t.top ? "top" : i === o - t.right ? "right" : "left";
3196
+ }
3197
+ function ns(t, s, n, r, o) {
3198
+ const a = window.innerWidth, i = window.innerHeight;
3199
+ let l, c;
3197
3200
  switch (t) {
3198
3201
  case "top":
3199
- l = s.top - n - o, d = s.left + s.width / 2 - a / 2;
3202
+ l = s.top - n - o, c = s.left + s.width / 2 - r / 2;
3200
3203
  break;
3201
3204
  case "bottom":
3202
- l = s.bottom + o, d = s.left + s.width / 2 - a / 2;
3205
+ l = s.bottom + o, c = s.left + s.width / 2 - r / 2;
3203
3206
  break;
3204
3207
  case "left":
3205
- l = s.top + s.height / 2 - n / 2, d = s.left - a - o;
3208
+ l = s.top + s.height / 2 - n / 2, c = s.left - r - o;
3206
3209
  break;
3207
3210
  default:
3208
- l = s.top + s.height / 2 - n / 2, d = s.right + o;
3211
+ l = s.top + s.height / 2 - n / 2, c = s.right + o;
3209
3212
  }
3210
- const c = Math.max(le, Math.min(r - a - le, d));
3211
- return { top: Math.max(le, Math.min(i - n - le, l)), left: c, arrowOffset: d - c };
3213
+ const d = Math.max(le, Math.min(a - r - le, c));
3214
+ return { top: Math.max(le, Math.min(i - n - le, l)), left: d, arrowOffset: c - d };
3212
3215
  }
3213
3216
  function wn({
3214
3217
  steps: t,
3215
3218
  currentStep: s,
3216
3219
  onNext: n,
3217
- onBack: a,
3220
+ onBack: r,
3218
3221
  onSkip: o,
3219
- onFinish: r,
3222
+ onFinish: a,
3220
3223
  overlay: i = !0,
3221
3224
  ring: l = !0,
3222
- labelNext: d = "Next",
3223
- labelBack: c = "Back",
3225
+ labelNext: c = "Next",
3226
+ labelBack: d = "Back",
3224
3227
  labelSkip: m = "Skip tour",
3225
3228
  labelFinish: p = "Done",
3226
3229
  statePrimary: h = "idle",
@@ -3228,17 +3231,17 @@ function wn({
3228
3231
  }) {
3229
3232
  const x = T(null), v = T(t), j = T(s), E = T(l);
3230
3233
  v.current = t, j.current = s, E.current = l;
3231
- const [g, b] = I(!1), [S, L] = I({ position: "fixed", visibility: "hidden", width: ge }), [C, U] = I("bottom"), [K, V] = I(null), w = T(!1), M = t[s], G = s === t.length - 1, F = $e(() => {
3234
+ const [g, b] = I(!1), [S, L] = I({ position: "fixed", visibility: "hidden", width: ye }), [C, U] = I("bottom"), [K, V] = I(null), w = T(!1), M = t[s], G = s === t.length - 1, F = je(() => {
3232
3235
  const A = v.current[j.current];
3233
3236
  if (!A || !x.current) return;
3234
3237
  const _ = ts(A.target);
3235
3238
  if (!_) return;
3236
- const y = _.getBoundingClientRect(), O = x.current.getBoundingClientRect().height || 160, H = ge, k = E.current ? Zt : Qt, f = A.position || ss(y, O, H, k), { top: $, left: z, arrowOffset: W } = ns(f, y, O, H, k);
3239
+ const y = _.getBoundingClientRect(), O = x.current.getBoundingClientRect().height || 160, H = ye, k = E.current ? Zt : Qt, f = A.position || ss(y, O, H, k), { top: $, left: z, arrowOffset: W } = ns(f, y, O, H, k);
3237
3240
  U(f), L({
3238
3241
  position: "fixed",
3239
3242
  top: $,
3240
3243
  left: z,
3241
- width: ge,
3244
+ width: ye,
3242
3245
  visibility: "visible",
3243
3246
  "--arrow-offset": `${W}px`
3244
3247
  }), V({
@@ -3335,8 +3338,8 @@ function wn({
3335
3338
  t.length
3336
3339
  ] }),
3337
3340
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3338
- s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: u, onClick: a, children: c }),
3339
- /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: G ? r : n, children: G ? p : d })
3341
+ s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: u, onClick: r, children: d }),
3342
+ /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: G ? a : n, children: G ? p : c })
3340
3343
  ] })
3341
3344
  ] })
3342
3345
  ]
@@ -3347,30 +3350,30 @@ function wn({
3347
3350
  );
3348
3351
  }
3349
3352
  function gn(t, s = {}) {
3350
- const { storageKey: n } = s, [a, o] = I(0), [r, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", d = $e(() => {
3353
+ const { storageKey: n } = s, [r, o] = I(0), [a, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = je(() => {
3351
3354
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3352
3355
  }, [n]);
3353
3356
  return {
3354
- currentStep: a,
3355
- isActive: r,
3357
+ currentStep: r,
3358
+ isActive: a,
3356
3359
  start: () => {
3357
3360
  l() || (o(0), i(!0));
3358
3361
  },
3359
- next: () => o((c) => Math.min(c + 1, t.length - 1)),
3360
- back: () => o((c) => Math.max(c - 1, 0)),
3361
- skip: d,
3362
- finish: d
3362
+ next: () => o((d) => Math.min(d + 1, t.length - 1)),
3363
+ back: () => o((d) => Math.max(d - 1, 0)),
3364
+ skip: c,
3365
+ finish: c
3363
3366
  };
3364
3367
  }
3365
3368
  function yn() {
3366
- const t = T(null), s = $e(() => {
3369
+ const t = T(null), s = je(() => {
3367
3370
  const n = t.current;
3368
3371
  if (!n) return;
3369
3372
  n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
3370
- const a = () => {
3371
- n.classList.remove("ds-shake"), n.removeEventListener("animationend", a);
3373
+ const r = () => {
3374
+ n.classList.remove("ds-shake"), n.removeEventListener("animationend", r);
3372
3375
  };
3373
- n.addEventListener("animationend", a);
3376
+ n.addEventListener("animationend", r);
3374
3377
  }, []);
3375
3378
  return { ref: t, shake: s };
3376
3379
  }