@donkit-ai/design-system 1.4.9 → 1.4.12

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,5 +1,5 @@
1
1
  import K, { useState as A, useRef as E, useEffect as M, useLayoutEffect as Ve } from "react";
2
- import { Check as Ne, X as ne, ChevronDown as he, Minus as Ye, Plus as He, XCircle as we, AlertTriangle as ge, CheckCircle as ye, Info as ke, ChevronUp as qe, ChevronsUpDown as Ke, ChevronLeft as Ge, ChevronRight as Xe, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Re, Square as es, ArrowUp as ss, Zap as ts, Cpu as Se, FileText as rs, ThumbsUp as ns, ThumbsDown as as } from "lucide-react";
2
+ import { Check as Ne, X as ne, ChevronDown as he, Minus as Ye, Plus as He, XCircle as we, AlertTriangle as ge, CheckCircle as ye, Info as ke, ChevronUp as qe, ChevronsUpDown as Ke, ChevronLeft as Xe, ChevronRight as Ge, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Re, Square as es, ArrowUp as ss, Zap as ts, Cpu as Se, FileText as rs, ThumbsUp as ns, ThumbsDown as as } from "lucide-react";
3
3
  import pe from "react-dom";
4
4
  const I = {
5
5
  1: 16,
@@ -8,7 +8,7 @@ const I = {
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var _e = { exports: {} }, ue = {};
11
+ var be = { exports: {} }, ue = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -128,7 +128,7 @@ function os() {
128
128
  }
129
129
  }
130
130
  function a() {
131
- var c = G.A;
131
+ var c = X.A;
132
132
  return c === null ? null : c.getOwner();
133
133
  }
134
134
  function n() {
@@ -159,10 +159,10 @@ function os() {
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
  )), c = this.props.ref, c !== void 0 ? c : null;
161
161
  }
162
- function d(c, w, z, F, te, ie) {
162
+ function d(c, w, z, F, te, ae) {
163
163
  var W = z.ref;
164
164
  return c = {
165
- $$typeof: b,
165
+ $$typeof: _,
166
166
  type: c,
167
167
  key: w,
168
168
  props: z,
@@ -189,10 +189,10 @@ function os() {
189
189
  configurable: !1,
190
190
  enumerable: !1,
191
191
  writable: !0,
192
- value: ie
192
+ value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function f(c, w, z, F, te, ie) {
195
+ function f(c, w, z, F, te, ae) {
196
196
  var W = w.children;
197
197
  if (W !== void 0)
198
198
  if (F)
@@ -225,8 +225,8 @@ React keys must be passed directly to JSX without using spread:
225
225
  }
226
226
  if (W = null, z !== void 0 && (r(z), W = "" + z), o(w) && (r(w.key), W = "" + w.key), "key" in w) {
227
227
  z = {};
228
- for (var oe in w)
229
- oe !== "key" && (z[oe] = w[oe]);
228
+ for (var ie in w)
229
+ ie !== "key" && (z[ie] = w[ie]);
230
230
  } else z = w;
231
231
  return W && l(
232
232
  z,
@@ -237,16 +237,16 @@ React keys must be passed directly to JSX without using spread:
237
237
  z,
238
238
  a(),
239
239
  te,
240
- ie
240
+ ae
241
241
  );
242
242
  }
243
243
  function p(c) {
244
244
  h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === P && (c._payload.status === "fulfilled" ? h(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
245
245
  }
246
246
  function h(c) {
247
- return typeof c == "object" && c !== null && c.$$typeof === b;
247
+ return typeof c == "object" && c !== null && c.$$typeof === _;
248
248
  }
249
- var u = K, b = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), G = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, v = console.createTask ? console.createTask : function() {
249
+ var u = K, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  u = {
@@ -257,32 +257,32 @@ React keys must be passed directly to JSX without using spread:
257
257
  var k, L = {}, H = u.react_stack_bottom_frame.bind(
258
258
  u,
259
259
  n
260
- )(), X = v(i(n)), g = {};
260
+ )(), G = v(i(n)), g = {};
261
261
  fe.Fragment = S, fe.jsx = function(c, w, z) {
262
- var F = 1e4 > G.recentlyCreatedOwnerStacks++;
262
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
263
263
  return f(
264
264
  c,
265
265
  w,
266
266
  z,
267
267
  !1,
268
268
  F ? Error("react-stack-top-frame") : H,
269
- F ? v(i(c)) : X
269
+ F ? v(i(c)) : G
270
270
  );
271
271
  }, fe.jsxs = function(c, w, z) {
272
- var F = 1e4 > G.recentlyCreatedOwnerStacks++;
272
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
273
273
  return f(
274
274
  c,
275
275
  w,
276
276
  z,
277
277
  !0,
278
278
  F ? Error("react-stack-top-frame") : H,
279
- F ? v(i(c)) : X
279
+ F ? v(i(c)) : G
280
280
  );
281
281
  };
282
282
  }()), fe;
283
283
  }
284
- process.env.NODE_ENV === "production" ? _e.exports = is() : _e.exports = os();
285
- var e = _e.exports;
284
+ process.env.NODE_ENV === "production" ? be.exports = is() : be.exports = os();
285
+ var e = be.exports;
286
286
  function ls({ size: s = "m", color: t = "default", className: r = "", ...i }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
@@ -310,7 +310,7 @@ function me({
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const u = a && !s, b = o === "loading", j = o === "success", S = o === "error", R = b || j || S, B = r === "xs" ? "s" : "m", y = cs[r] ?? 16, $ = b ? /* @__PURE__ */ e.jsx(ls, { size: B }) : j ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: y, strokeWidth: 2.5 }) }) : S ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: y, strokeWidth: 2.5 }) }) : null, O = [
313
+ const u = a && !s, _ = o === "loading", j = o === "success", S = o === "error", R = _ || j || S, B = r === "xs" ? "s" : "m", y = cs[r] ?? 16, $ = _ ? /* @__PURE__ */ e.jsx(ls, { size: B }) : j ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: y, strokeWidth: 2.5 }) }) : S ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: y, strokeWidth: 2.5 }) }) : null, O = [
314
314
  "ds-button",
315
315
  `ds-button--${t}`,
316
316
  `ds-button--${r}`,
@@ -323,7 +323,7 @@ function me({
323
323
  ] });
324
324
  if (d) {
325
325
  const q = (P) => {
326
- if (n || b) {
326
+ if (n || _) {
327
327
  P.preventDefault();
328
328
  return;
329
329
  }
@@ -333,11 +333,11 @@ function me({
333
333
  "a",
334
334
  {
335
335
  className: O,
336
- href: n || b ? void 0 : d,
336
+ href: n || _ ? void 0 : d,
337
337
  onClick: q,
338
338
  "aria-label": f,
339
- "aria-disabled": n || b ? "true" : void 0,
340
- "aria-busy": b ? "true" : void 0,
339
+ "aria-disabled": n || _ ? "true" : void 0,
340
+ "aria-busy": _ ? "true" : void 0,
341
341
  "data-state": D,
342
342
  ...h,
343
343
  children: Y
@@ -350,16 +350,16 @@ function me({
350
350
  type: m,
351
351
  className: O,
352
352
  disabled: n,
353
- onClick: b ? void 0 : l,
353
+ onClick: _ ? void 0 : l,
354
354
  "aria-label": f,
355
- "aria-busy": b ? "true" : void 0,
355
+ "aria-busy": _ ? "true" : void 0,
356
356
  "data-state": D,
357
357
  ...h,
358
358
  children: Y
359
359
  }
360
360
  );
361
361
  }
362
- function Vs({
362
+ function Us({
363
363
  label: s,
364
364
  error: t,
365
365
  hint: r,
@@ -372,7 +372,7 @@ function Vs({
372
372
  id: d,
373
373
  ...f
374
374
  }) {
375
- const p = d || `input-${K.useId()}`, h = r ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, b = u || h;
375
+ const p = d || `input-${K.useId()}`, h = r ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, _ = u || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${i ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: s }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -384,7 +384,7 @@ function Vs({
384
384
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
385
385
  disabled: m,
386
386
  "aria-invalid": t ? "true" : "false",
387
- "aria-describedby": b,
387
+ "aria-describedby": _,
388
388
  ...f
389
389
  }
390
390
  ),
@@ -404,7 +404,7 @@ function Vs({
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: u, className: "ds-input-error", role: "alert", children: t }) }) })
405
405
  ] });
406
406
  }
407
- function Ys({
407
+ function Vs({
408
408
  label: s,
409
409
  error: t,
410
410
  hint: r,
@@ -435,7 +435,7 @@ function Ys({
435
435
  t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
436
436
  ] });
437
437
  }
438
- function Hs({
438
+ function Ys({
439
439
  label: s,
440
440
  value: t,
441
441
  onChange: r,
@@ -448,20 +448,20 @@ function Hs({
448
448
  id: d,
449
449
  ...f
450
450
  }) {
451
- const [p, h] = A(!1), [u, b] = A(!1), [j, S] = A({}), [R, B] = A("down"), [y, $] = A(-1), O = E(null), D = E(null), Y = E(null), q = E(null), P = d || `select-${K.useId()}`, N = `${P}-label`, C = n ? `${P}-error` : void 0, G = 150, U = (g = !1) => {
452
- u || (b(!0), $(-1), q.current = setTimeout(() => {
451
+ const [p, h] = A(!1), [u, _] = A(!1), [j, S] = A({}), [R, B] = A("down"), [y, $] = A(-1), O = E(null), D = E(null), Y = E(null), q = E(null), P = d || `select-${K.useId()}`, N = `${P}-label`, C = n ? `${P}-error` : void 0, X = 150, U = (g = !1) => {
452
+ u || (_(!0), $(-1), q.current = setTimeout(() => {
453
453
  var c;
454
- h(!1), b(!1), g && ((c = Y.current) == null || c.focus());
455
- }, G));
454
+ h(!1), _(!1), g && ((c = Y.current) == null || c.focus());
455
+ }, X));
456
456
  }, x = (g) => {
457
- clearTimeout(q.current), b(!1);
457
+ clearTimeout(q.current), _(!1);
458
458
  const c = g !== void 0 ? g : Math.max(i.findIndex((w) => w.value === t), 0);
459
459
  $(c), h(!0);
460
460
  };
461
461
  M(() => () => clearTimeout(q.current), []);
462
462
  const v = () => {
463
- var ie;
464
- const g = (ie = O.current) == null ? void 0 : ie.getBoundingClientRect();
463
+ var ae;
464
+ const g = (ae = O.current) == null ? void 0 : ae.getBoundingClientRect();
465
465
  if (!g) return;
466
466
  const c = window.innerHeight, w = c - g.bottom, z = g.top, te = w < 300 && z > w;
467
467
  B(te ? "up" : "down"), S(
@@ -508,7 +508,7 @@ function Hs({
508
508
  p && U(!1);
509
509
  break;
510
510
  }
511
- }, L = i.find((g) => g.value === t), H = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], X = p && /* @__PURE__ */ e.jsx(
511
+ }, L = i.find((g) => g.value === t), H = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
514
  ref: D,
@@ -582,10 +582,10 @@ function Hs({
582
582
  }
583
583
  ) }),
584
584
  n && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: n }),
585
- typeof document < "u" && pe.createPortal(X, document.body)
585
+ typeof document < "u" && pe.createPortal(G, document.body)
586
586
  ] });
587
587
  }
588
- function qs({
588
+ function Hs({
589
589
  label: s,
590
590
  value: t = 0,
591
591
  onChange: r,
@@ -618,7 +618,7 @@ function qs({
618
618
  const $ = Math.min(Math.max(y, i), a);
619
619
  r == null || r($);
620
620
  }
621
- }, b = [
621
+ }, _ = [
622
622
  "ds-stepper-wrapper",
623
623
  l && "ds-stepper-wrapper--disabled",
624
624
  d && "ds-stepper-wrapper--error"
@@ -627,7 +627,7 @@ function qs({
627
627
  `ds-stepper--${o}`,
628
628
  l && "ds-stepper--disabled"
629
629
  ].filter(Boolean).join(" "), S = o === "xs" ? I[1] : o === "small" ? I[2] : I[3];
630
- return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
630
+ return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
631
631
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
632
632
  /* @__PURE__ */ e.jsxs("div", { className: j, children: [
633
633
  /* @__PURE__ */ e.jsx(
@@ -671,7 +671,7 @@ function qs({
671
671
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
672
672
  ] });
673
673
  }
674
- function Ks({
674
+ function qs({
675
675
  children: s,
676
676
  padding: t = "m",
677
677
  variant: r = "info",
@@ -688,12 +688,12 @@ function Ks({
688
688
  d && "ds-card--interactive"
689
689
  ].filter(Boolean).join(" ");
690
690
  if (n) {
691
- const u = (b) => {
691
+ const u = (_) => {
692
692
  if (o) {
693
- b.preventDefault();
693
+ _.preventDefault();
694
694
  return;
695
695
  }
696
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
696
+ _.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), a == null || a(_));
697
697
  };
698
698
  return /* @__PURE__ */ e.jsx(
699
699
  "a",
@@ -723,19 +723,19 @@ function Ks({
723
723
  }
724
724
  );
725
725
  }
726
- function Gs({ children: s, ...t }) {
726
+ function Ks({ children: s, ...t }) {
727
727
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
728
728
  }
729
729
  function Xs({ children: s, ...t }) {
730
730
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
731
731
  }
732
- function Js({ children: s, ...t }) {
732
+ function Gs({ children: s, ...t }) {
733
733
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
734
734
  }
735
- function Zs({ children: s, ...t }) {
735
+ function Js({ children: s, ...t }) {
736
736
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
737
737
  }
738
- function Qs({ children: s, secondary: t = !1, ...r }) {
738
+ function Zs({ children: s, secondary: t = !1, ...r }) {
739
739
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
740
740
  }
741
741
  function ds({ children: s, secondary: t = !1, ...r }) {
@@ -744,7 +744,7 @@ function ds({ children: s, secondary: t = !1, ...r }) {
744
744
  function Fe({ children: s, secondary: t = !1, ...r }) {
745
745
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
746
746
  }
747
- function ae({
747
+ function ce({
748
748
  children: s,
749
749
  variant: t = "default",
750
750
  size: r = "m",
@@ -764,7 +764,7 @@ const us = {
764
764
  warning: ge,
765
765
  error: we
766
766
  };
767
- function et({
767
+ function Qs({
768
768
  children: s,
769
769
  variant: t = "info",
770
770
  title: r,
@@ -792,7 +792,7 @@ function et({
792
792
  ] });
793
793
  }
794
794
  const fs = 200;
795
- function st({
795
+ function et({
796
796
  children: s,
797
797
  title: t,
798
798
  onClose: r,
@@ -807,11 +807,11 @@ function st({
807
807
  M(() => {
808
808
  const u = (j) => {
809
809
  j.key === "Escape" && d();
810
- }, b = (j) => {
810
+ }, _ = (j) => {
811
811
  n.current && !n.current.contains(j.target) && d();
812
812
  };
813
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
814
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
813
+ return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
814
+ document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
815
815
  };
816
816
  }, [r, l]);
817
817
  const f = K.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === Ie), h = f.filter((u) => (u == null ? void 0 : u.type) !== Ie);
@@ -857,7 +857,7 @@ function ms({
857
857
  ...l
858
858
  }) {
859
859
  const [m, d] = A(r), f = i !== void 0, p = f ? i : m, h = () => {
860
- f ? a == null || a(!i) : d((b) => !b);
860
+ f ? a == null || a(!i) : d((_) => !_);
861
861
  }, u = [
862
862
  "ds-code-accordion",
863
863
  `ds-code-accordion--${n}`,
@@ -888,10 +888,10 @@ function ms({
888
888
  /* @__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", children: /* @__PURE__ */ e.jsx("code", { children: s }) }) }) })
889
889
  ] });
890
890
  }
891
- function tt({ children: s, block: t = !1, collapsible: r = !1, title: i = "Code", defaultExpanded: a = !1, ...n }) {
891
+ function st({ children: s, block: t = !1, collapsible: r = !1, title: i = "Code", defaultExpanded: a = !1, ...n }) {
892
892
  return t ? r ? /* @__PURE__ */ e.jsx(ms, { title: i, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
893
893
  }
894
- function rt({ href: s, children: t, onClick: r, target: i, rel: a, ...n }) {
894
+ function tt({ href: s, children: t, onClick: r, target: i, rel: a, ...n }) {
895
895
  const l = i === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
896
896
  return /* @__PURE__ */ e.jsx(
897
897
  "a",
@@ -906,10 +906,10 @@ function rt({ href: s, children: t, onClick: r, target: i, rel: a, ...n }) {
906
906
  }
907
907
  );
908
908
  }
909
- function nt({ children: s, size: t = "m", variant: r = "ghost", ...i }) {
909
+ function rt({ children: s, size: t = "m", variant: r = "ghost", ...i }) {
910
910
  return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...i, children: K.Children.map(s, (a) => K.isValidElement(a) ? K.cloneElement(a, { size: t, variant: r }) : a) });
911
911
  }
912
- function at({ children: s, selected: t = !1, onClick: r, size: i = "m", variant: a = "ghost", disabled: n = !1, icon: o, href: l, ...m }) {
912
+ function nt({ children: s, selected: t = !1, onClick: r, size: i = "m", variant: a = "ghost", disabled: n = !1, icon: o, href: l, ...m }) {
913
913
  const d = o && !s, f = [
914
914
  "ds-tab",
915
915
  `ds-tab--${i}`,
@@ -955,12 +955,12 @@ function at({ children: s, selected: t = !1, onClick: r, size: i = "m", variant:
955
955
  }
956
956
  );
957
957
  }
958
- function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1 }) {
958
+ function at({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1 }) {
959
959
  const n = E(null), o = E(null), [l, m] = A(!1), d = E(!1), f = E(null), p = E(null), h = () => {
960
960
  if (!n.current) return;
961
961
  const u = n.current.querySelector(`[data-value="${t}"]`);
962
962
  if (!u) return;
963
- const b = n.current.getBoundingClientRect(), j = u.getBoundingClientRect(), S = j.left - b.left, R = j.width;
963
+ const _ = n.current.getBoundingClientRect(), j = u.getBoundingClientRect(), S = j.left - _.left, R = j.width;
964
964
  o.current ? (o.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", o.current.style.left = S + "px", o.current.style.width = R + "px", d.current = !1) : (m(!0), requestAnimationFrame(() => {
965
965
  if (!o.current || !n.current) return;
966
966
  const B = n.current.querySelector(`[data-value="${t}"]`);
@@ -1057,7 +1057,7 @@ function Ee({
1057
1057
  /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: s }) }) })
1058
1058
  ] });
1059
1059
  }
1060
- const re = 8, ce = 8;
1060
+ const re = 8, le = 8;
1061
1061
  function ps(s, t, r) {
1062
1062
  const i = window.innerWidth;
1063
1063
  let a, n;
@@ -1077,19 +1077,19 @@ function ps(s, t, r) {
1077
1077
  default:
1078
1078
  a = t.bottom + re, n = t.left;
1079
1079
  }
1080
- const o = Math.max(ce, Math.min(i - r.width - ce, n)), l = n - o;
1080
+ const o = Math.max(le, Math.min(i - r.width - le, n)), l = n - o;
1081
1081
  return { top: a, left: o, arrowOffset: l };
1082
1082
  }
1083
1083
  function hs(s, t, r) {
1084
1084
  const i = window.innerWidth, a = window.innerHeight;
1085
- if (s.top >= t + re + ce) return "top";
1086
- if (a - s.bottom >= t + re + ce) return "bottom";
1087
- if (i - s.right >= r + re + ce) return "right";
1088
- if (s.left >= r + re + ce) return "left";
1085
+ if (s.top >= t + re + le) return "top";
1086
+ if (a - s.bottom >= t + re + le) return "bottom";
1087
+ if (i - s.right >= r + re + le) return "right";
1088
+ if (s.left >= r + re + le) return "left";
1089
1089
  const n = Math.max(s.top, a - s.bottom, s.left, i - s.right);
1090
1090
  return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === i - s.right ? "right" : "left";
1091
1091
  }
1092
- function ot({ children: s, content: t, position: r, ...i }) {
1092
+ function it({ children: s, content: t, position: r, ...i }) {
1093
1093
  const [a, n] = A(!1), [o, l] = A({ visibility: "hidden" }), [m, d] = A(r || "top"), f = E(null), p = E(null), h = E(!1), u = () => {
1094
1094
  if (!f.current || !p.current) return;
1095
1095
  const j = f.current.getBoundingClientRect(), S = p.current.getBoundingClientRect(), R = r || hs(j, S.height, S.width), { top: B, left: y, arrowOffset: $ } = ps(R, j, S);
@@ -1115,7 +1115,7 @@ function ot({ children: s, content: t, position: r, ...i }) {
1115
1115
  };
1116
1116
  return document.addEventListener("touchstart", j), () => document.removeEventListener("touchstart", j);
1117
1117
  }, [a]), !t) return s;
1118
- const b = a && /* @__PURE__ */ e.jsx(
1118
+ const _ = a && /* @__PURE__ */ e.jsx(
1119
1119
  "div",
1120
1120
  {
1121
1121
  ref: p,
@@ -1142,12 +1142,12 @@ function ot({ children: s, content: t, position: r, ...i }) {
1142
1142
  ...i,
1143
1143
  children: [
1144
1144
  s,
1145
- typeof document < "u" && pe.createPortal(b, document.body)
1145
+ typeof document < "u" && pe.createPortal(_, document.body)
1146
1146
  ]
1147
1147
  }
1148
1148
  );
1149
1149
  }
1150
- function lt({
1150
+ function ot({
1151
1151
  checked: s = !1,
1152
1152
  onChange: t,
1153
1153
  size: r = "m",
@@ -1178,7 +1178,7 @@ function lt({
1178
1178
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1179
1179
  ] });
1180
1180
  }
1181
- function ct({
1181
+ function lt({
1182
1182
  checked: s = !1,
1183
1183
  onChange: t,
1184
1184
  size: r = "m",
@@ -1216,7 +1216,7 @@ function ct({
1216
1216
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1217
1217
  ] });
1218
1218
  }
1219
- function dt({
1219
+ function ct({
1220
1220
  checked: s = !1,
1221
1221
  onChange: t,
1222
1222
  size: r = "m",
@@ -1262,7 +1262,7 @@ function xs({ width: s, height: t, shape: r = "rect", aspectRatio: i, className:
1262
1262
  }
1263
1263
  );
1264
1264
  }
1265
- function bs({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "", style: a = {}, ...n }) {
1265
+ function _s({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "", style: a = {}, ...n }) {
1266
1266
  return /* @__PURE__ */ e.jsx(
1267
1267
  "span",
1268
1268
  {
@@ -1281,8 +1281,8 @@ function bs({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "",
1281
1281
  }
1282
1282
  );
1283
1283
  }
1284
- xs.Text = bs;
1285
- function _s(s) {
1284
+ xs.Text = _s;
1285
+ function bs(s) {
1286
1286
  let t = 2166136261;
1287
1287
  for (let r = 0; r < s.length; r++)
1288
1288
  t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
@@ -1293,8 +1293,8 @@ function js(s) {
1293
1293
  const t = s.trim().split(/\s+/);
1294
1294
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1295
1295
  }
1296
- function ut({ seed: s, icon: t, src: r, size: i = 32, className: a = "", style: n = {}, ...o }) {
1297
- const l = _s(s ?? ""), [m, d] = A(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: js(s) });
1296
+ function dt({ seed: s, icon: t, src: r, size: i = 32, className: a = "", style: n = {}, ...o }) {
1297
+ const l = bs(s ?? ""), [m, d] = A(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: js(s) });
1298
1298
  return /* @__PURE__ */ e.jsx(
1299
1299
  "div",
1300
1300
  {
@@ -1306,7 +1306,7 @@ function ut({ seed: s, icon: t, src: r, size: i = 32, className: a = "", style:
1306
1306
  }
1307
1307
  );
1308
1308
  }
1309
- function ft({
1309
+ function ut({
1310
1310
  children: s,
1311
1311
  size: t = "compact",
1312
1312
  stickyTop: r,
@@ -1336,13 +1336,13 @@ function ft({
1336
1336
  }
1337
1337
  );
1338
1338
  }
1339
- function mt({ children: s, ...t }) {
1339
+ function ft({ children: s, ...t }) {
1340
1340
  return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
1341
1341
  }
1342
- function pt({ children: s, ...t }) {
1342
+ function mt({ children: s, ...t }) {
1343
1343
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1344
1344
  }
1345
- function ht({ children: s, interactive: t, selected: r, subheader: i, exiting: a, updated: n, className: o = "", onClick: l, ...m }) {
1345
+ function pt({ children: s, interactive: t, selected: r, subheader: i, exiting: a, updated: n, className: o = "", onClick: l, ...m }) {
1346
1346
  return /* @__PURE__ */ e.jsx(
1347
1347
  "tr",
1348
1348
  {
@@ -1361,10 +1361,10 @@ function ht({ children: s, interactive: t, selected: r, subheader: i, exiting: a
1361
1361
  }
1362
1362
  );
1363
1363
  }
1364
- function xt({ children: s, colSpan: t = 999, ...r }) {
1364
+ function ht({ children: s, colSpan: t = 999, ...r }) {
1365
1365
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1366
1366
  }
1367
- function bt({ children: s, align: t = "left", sortDir: r, onSort: i, width: a, className: n = "", style: o = {}, ...l }) {
1367
+ function xt({ children: s, align: t = "left", sortDir: r, onSort: i, width: a, className: n = "", style: o = {}, ...l }) {
1368
1368
  const m = !!i || r !== void 0, d = r === "asc" ? qe : r === "desc" ? he : Ke;
1369
1369
  return /* @__PURE__ */ e.jsx(
1370
1370
  "th",
@@ -1404,7 +1404,7 @@ function _t({ children: s, align: t = "left", secondary: r, muted: i, truncate:
1404
1404
  }
1405
1405
  );
1406
1406
  }
1407
- function jt({
1407
+ function bt({
1408
1408
  icon: s,
1409
1409
  title: t,
1410
1410
  description: r,
@@ -1427,7 +1427,7 @@ function jt({
1427
1427
  }
1428
1428
  );
1429
1429
  }
1430
- function vt({
1430
+ function jt({
1431
1431
  label: s,
1432
1432
  hint: t,
1433
1433
  error: r,
@@ -1458,7 +1458,7 @@ function vt({
1458
1458
  }
1459
1459
  );
1460
1460
  }
1461
- function Nt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, className: n = "", style: o, ...l }) {
1461
+ function vt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, className: n = "", style: o, ...l }) {
1462
1462
  const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1463
1463
  return /* @__PURE__ */ e.jsxs(
1464
1464
  "div",
@@ -1479,7 +1479,7 @@ function Nt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, class
1479
1479
  }
1480
1480
  );
1481
1481
  }
1482
- function wt({
1482
+ function Nt({
1483
1483
  children: s,
1484
1484
  separator: t = "/",
1485
1485
  "aria-label": r = "Breadcrumb",
@@ -1502,7 +1502,7 @@ function wt({
1502
1502
  }
1503
1503
  );
1504
1504
  }
1505
- function gt({
1505
+ function wt({
1506
1506
  page: s,
1507
1507
  total: t,
1508
1508
  onChange: r,
@@ -1528,7 +1528,7 @@ function gt({
1528
1528
  onClick: () => r == null ? void 0 : r(s - 1),
1529
1529
  disabled: s <= 1,
1530
1530
  "aria-label": "Previous page",
1531
- children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
1531
+ children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1532
1532
  }
1533
1533
  ),
1534
1534
  m.map(
@@ -1551,7 +1551,7 @@ function gt({
1551
1551
  onClick: () => r == null ? void 0 : r(s + 1),
1552
1552
  disabled: s >= t,
1553
1553
  "aria-label": "Next page",
1554
- children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1554
+ children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
1555
1555
  }
1556
1556
  )
1557
1557
  ]
@@ -1566,7 +1566,7 @@ function vs(s, t, r) {
1566
1566
  return a < t - 1 && n.push("…"), n.push(t), n;
1567
1567
  }
1568
1568
  const Ns = 200;
1569
- function yt({
1569
+ function gt({
1570
1570
  children: s,
1571
1571
  title: t,
1572
1572
  onClose: r,
@@ -1581,11 +1581,11 @@ function yt({
1581
1581
  M(() => {
1582
1582
  const u = (j) => {
1583
1583
  j.key === "Escape" && d();
1584
- }, b = (j) => {
1584
+ }, _ = (j) => {
1585
1585
  n.current && !n.current.contains(j.target) && d();
1586
1586
  };
1587
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
1588
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
1587
+ return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
1588
+ document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
1589
1589
  };
1590
1590
  }, [r, l]);
1591
1591
  const f = K.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === Be), h = f.filter((u) => (u == null ? void 0 : u.type) !== Be);
@@ -1625,7 +1625,7 @@ const ws = {
1625
1625
  warning: ge,
1626
1626
  error: we
1627
1627
  };
1628
- function kt({
1628
+ function yt({
1629
1629
  children: s,
1630
1630
  variant: t = "info",
1631
1631
  action: r,
@@ -1667,7 +1667,7 @@ function kt({
1667
1667
  }
1668
1668
  );
1669
1669
  }
1670
- function Et({
1670
+ function kt({
1671
1671
  trigger: s,
1672
1672
  items: t = [],
1673
1673
  open: r,
@@ -1677,7 +1677,7 @@ function Et({
1677
1677
  style: o,
1678
1678
  ...l
1679
1679
  }) {
1680
- const [m, d] = A(!1), [f, p] = A(!1), h = r !== void 0, u = h ? r : m, b = E(null), j = E(null), S = E(null), R = E(null), [B, y] = A({}), $ = E(null), O = 150, D = () => {
1680
+ const [m, d] = A(!1), [f, p] = A(!1), h = r !== void 0, u = h ? r : m, _ = E(null), j = E(null), S = E(null), R = E(null), [B, y] = A({}), $ = E(null), O = 150, D = () => {
1681
1681
  if (h)
1682
1682
  i == null || i(!1);
1683
1683
  else {
@@ -1695,8 +1695,8 @@ function Et({
1695
1695
  M(() => () => clearTimeout($.current), []), M(() => {
1696
1696
  if (!u) return;
1697
1697
  const x = 300, v = () => {
1698
- var X;
1699
- const k = (X = b.current) == null ? void 0 : X.getBoundingClientRect();
1698
+ var G;
1699
+ const k = (G = _.current) == null ? void 0 : G.getBoundingClientRect();
1700
1700
  if (!k) return;
1701
1701
  const L = window.innerHeight - k.bottom, H = L < x + 8 && k.top > L;
1702
1702
  y(
@@ -1718,7 +1718,7 @@ function Et({
1718
1718
  if (!u) return;
1719
1719
  const x = (k) => {
1720
1720
  var L, H;
1721
- !((L = b.current) != null && L.contains(k.target)) && !((H = j.current) != null && H.contains(k.target)) && D();
1721
+ !((L = _.current) != null && L.contains(k.target)) && !((H = j.current) != null && H.contains(k.target)) && D();
1722
1722
  }, v = (k) => {
1723
1723
  k.key === "Escape" && (D(), P());
1724
1724
  };
@@ -1743,8 +1743,8 @@ function Et({
1743
1743
  const L = N();
1744
1744
  (k = L[L.length - 1]) == null || k.focus();
1745
1745
  }
1746
- }, G = (x) => {
1747
- var L, H, X, g;
1746
+ }, X = (x) => {
1747
+ var L, H, G, g;
1748
1748
  const v = N(), k = v.findIndex((c) => c === document.activeElement);
1749
1749
  switch (x.key) {
1750
1750
  case "ArrowDown":
@@ -1754,7 +1754,7 @@ function Et({
1754
1754
  x.preventDefault(), k <= 0 ? P() : (H = v[k - 1]) == null || H.focus();
1755
1755
  break;
1756
1756
  case "Home":
1757
- x.preventDefault(), (X = v[0]) == null || X.focus();
1757
+ x.preventDefault(), (G = v[0]) == null || G.focus();
1758
1758
  break;
1759
1759
  case "End":
1760
1760
  x.preventDefault(), (g = v[v.length - 1]) == null || g.focus();
@@ -1774,7 +1774,7 @@ function Et({
1774
1774
  f && "ds-dropdown__menu--closing"
1775
1775
  ].filter(Boolean).join(" "),
1776
1776
  style: B,
1777
- onKeyDown: G,
1777
+ onKeyDown: X,
1778
1778
  children: t.map((x, v) => {
1779
1779
  if (x.separator)
1780
1780
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, v);
@@ -1794,8 +1794,8 @@ function Et({
1794
1794
  ].filter(Boolean).join(" "),
1795
1795
  ...H,
1796
1796
  onClick: () => {
1797
- var X;
1798
- (X = x.onClick) == null || X.call(x), D();
1797
+ var G;
1798
+ (G = x.onClick) == null || G.call(x), D();
1799
1799
  },
1800
1800
  children: [
1801
1801
  x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
@@ -1811,7 +1811,7 @@ function Et({
1811
1811
  return /* @__PURE__ */ e.jsxs(
1812
1812
  "div",
1813
1813
  {
1814
- ref: b,
1814
+ ref: _,
1815
1815
  className: ["ds-dropdown", n].filter(Boolean).join(" "),
1816
1816
  style: o,
1817
1817
  ...l,
@@ -1831,7 +1831,7 @@ function Et({
1831
1831
  }
1832
1832
  );
1833
1833
  }
1834
- function $t({
1834
+ function Et({
1835
1835
  value: s = 0,
1836
1836
  size: t = "m",
1837
1837
  variant: r = "default",
@@ -1887,7 +1887,7 @@ function ks(s, { duration: t = 600 } = {}) {
1887
1887
  return n.current = requestAnimationFrame(d), () => cancelAnimationFrame(n.current);
1888
1888
  }, [s, t]), r;
1889
1889
  }
1890
- function Tt({
1890
+ function $t({
1891
1891
  value: s,
1892
1892
  duration: t = 600,
1893
1893
  decimals: r = 0,
@@ -1911,7 +1911,7 @@ function Es({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1911
1911
  return l.observe(o), () => l.disconnect();
1912
1912
  }, [s, t, r]), { ref: i, inView: a };
1913
1913
  }
1914
- function Rt({
1914
+ function Tt({
1915
1915
  children: s,
1916
1916
  as: t = "div",
1917
1917
  once: r = !1,
@@ -1943,7 +1943,7 @@ function $s(s) {
1943
1943
  function Ts(s) {
1944
1944
  de = de.filter((t) => t.id !== s), We();
1945
1945
  }
1946
- function St() {
1946
+ function Rt() {
1947
1947
  const s = (t, r = {}) => {
1948
1948
  $s({
1949
1949
  id: `${Date.now()}-${Math.random()}`,
@@ -1988,7 +1988,7 @@ function Rs({ data: s, onDismiss: t }) {
1988
1988
  }
1989
1989
  );
1990
1990
  }
1991
- function At({ position: s = "bottom-right" }) {
1991
+ function St({ position: s = "bottom-right" }) {
1992
1992
  const [t, r] = A(() => [...de]);
1993
1993
  return M(() => (je.add(r), () => je.delete(r)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
1994
1994
  /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((i) => /* @__PURE__ */ e.jsx(Rs, { data: i, onDismiss: Ts }, i.id)) }),
@@ -1996,11 +1996,11 @@ function At({ position: s = "bottom-right" }) {
1996
1996
  );
1997
1997
  }
1998
1998
  const Ss = {
1999
- running: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "info", children: "Running..." }),
2000
- success: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "success", children: "Done" }),
2001
- error: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "error", children: "Error" })
1999
+ running: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "info", children: "Running..." }),
2000
+ success: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "success", children: "Done" }),
2001
+ error: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "error", children: "Error" })
2002
2002
  };
2003
- function Dt({
2003
+ function At({
2004
2004
  label: s,
2005
2005
  status: t = "idle",
2006
2006
  icon: r,
@@ -2012,29 +2012,36 @@ function Dt({
2012
2012
  className: m = "",
2013
2013
  ...d
2014
2014
  }) {
2015
- const f = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2015
+ const f = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2016
2016
  r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
2017
2017
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2018
2018
  Ss[t],
2019
2019
  i
2020
2020
  ] });
2021
- return /* @__PURE__ */ e.jsx(
2021
+ return l ? /* @__PURE__ */ e.jsx(
2022
2022
  "div",
2023
2023
  {
2024
- className: ["ds-tool-card", m].filter(Boolean).join(" "),
2024
+ className: ["ds-tool-card", f && "ds-tool-card--running", m].filter(Boolean).join(" "),
2025
2025
  ...d,
2026
2026
  children: /* @__PURE__ */ e.jsx(
2027
2027
  Ee,
2028
2028
  {
2029
- title: f,
2029
+ title: p,
2030
2030
  padding: "s",
2031
2031
  defaultExpanded: a,
2032
- expanded: n,
2033
- onToggle: o,
2032
+ expanded: f ? !1 : n,
2033
+ onToggle: f ? void 0 : o,
2034
2034
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2035
2035
  }
2036
2036
  )
2037
2037
  }
2038
+ ) : /* @__PURE__ */ e.jsx(
2039
+ "div",
2040
+ {
2041
+ className: ["ds-tool-card", "ds-tool-card--bubble", m].filter(Boolean).join(" "),
2042
+ ...d,
2043
+ children: p
2044
+ }
2038
2045
  );
2039
2046
  }
2040
2047
  function As({
@@ -2044,8 +2051,8 @@ function As({
2044
2051
  "aria-label": i = "Copy to clipboard",
2045
2052
  ...a
2046
2053
  }) {
2047
- const [n, o] = A(!1), l = () => {
2048
- navigator.clipboard.writeText(s).then(() => {
2054
+ const [n, o] = A(!1), l = (m) => {
2055
+ m.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2049
2056
  o(!0), setTimeout(() => o(!1), r);
2050
2057
  });
2051
2058
  };
@@ -2062,7 +2069,7 @@ function As({
2062
2069
  }
2063
2070
  );
2064
2071
  }
2065
- function It({ content: s, streaming: t = !1, ...r }) {
2072
+ function Dt({ content: s, streaming: t = !1, ...r }) {
2066
2073
  const [i, a] = A(t);
2067
2074
  return M(() => {
2068
2075
  a(!!t);
@@ -2084,7 +2091,7 @@ function It({ content: s, streaming: t = !1, ...r }) {
2084
2091
  }
2085
2092
  );
2086
2093
  }
2087
- function Bt({
2094
+ function It({
2088
2095
  count: s,
2089
2096
  current: t = 0,
2090
2097
  done: r = [],
@@ -2123,7 +2130,7 @@ function Bt({
2123
2130
  ] })
2124
2131
  ] });
2125
2132
  }
2126
- function Mt({
2133
+ function Bt({
2127
2134
  content: s,
2128
2135
  isStreaming: t = !1,
2129
2136
  cursor: r = "line",
@@ -2139,7 +2146,7 @@ function Mt({
2139
2146
  t && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
2140
2147
  ] });
2141
2148
  }
2142
- function Pt({
2149
+ function Mt({
2143
2150
  role: s = "assistant",
2144
2151
  header: t,
2145
2152
  footer: r,
@@ -2166,7 +2173,7 @@ function Pt({
2166
2173
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2167
2174
  ] });
2168
2175
  }
2169
- function Lt(s, { containerRef: t, smartPause: r = !0 } = {}) {
2176
+ function Pt(s, { containerRef: t, smartPause: r = !0 } = {}) {
2170
2177
  const i = E(!1), a = E(0);
2171
2178
  M(() => {
2172
2179
  const n = t == null ? void 0 : t.current;
@@ -2190,25 +2197,25 @@ function Ds({
2190
2197
  betweenTime: n = 380,
2191
2198
  manualPauseMs: o = 5e3
2192
2199
  }) {
2193
- const [l, m] = A(0), [d, f] = A(""), p = E("typing"), h = E(0), u = E(0), b = E(null), j = E(0);
2200
+ const [l, m] = A(0), [d, f] = A(""), p = E("typing"), h = E(0), u = E(0), _ = E(null), j = E(0);
2194
2201
  M(() => {
2195
2202
  u.current = l;
2196
2203
  }, [l]), M(() => {
2197
- if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2204
+ if (_.current && (clearTimeout(_.current), _.current = null), !t || s.length === 0) {
2198
2205
  f(""), h.current = 0, p.current = "typing";
2199
2206
  return;
2200
2207
  }
2201
2208
  const $ = () => {
2202
2209
  const O = Date.now();
2203
2210
  if (j.current > O) {
2204
- b.current = setTimeout($, j.current - O);
2211
+ _.current = setTimeout($, j.current - O);
2205
2212
  return;
2206
2213
  }
2207
2214
  const D = s[u.current % s.length] ?? "";
2208
- p.current === "typing" ? (h.current += 1, f(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", b.current = setTimeout($, a)) : b.current = setTimeout($, r + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout($, i)) : (h.current = Math.max(0, h.current - 1), f(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), b.current = setTimeout($, n)) : b.current = setTimeout($, i));
2215
+ p.current === "typing" ? (h.current += 1, f(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", _.current = setTimeout($, a)) : _.current = setTimeout($, r + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", _.current = setTimeout($, i)) : (h.current = Math.max(0, h.current - 1), f(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), _.current = setTimeout($, n)) : _.current = setTimeout($, i));
2209
2216
  };
2210
- return b.current = setTimeout($, 260), () => {
2211
- b.current && clearTimeout(b.current);
2217
+ return _.current = setTimeout($, 260), () => {
2218
+ _.current && clearTimeout(_.current);
2212
2219
  };
2213
2220
  }, [t, s, r, i, a, n]);
2214
2221
  const S = ($) => {
@@ -2219,7 +2226,7 @@ function Ds({
2219
2226
  return { displayed: d, currentPrompt: y, index: l, next: R, prev: B };
2220
2227
  }
2221
2228
  let Is = 0;
2222
- function zt({
2229
+ function Lt({
2223
2230
  value: s = "",
2224
2231
  onChange: t,
2225
2232
  onSubmit: r,
@@ -2234,7 +2241,7 @@ function zt({
2234
2241
  onAttachFiles: p,
2235
2242
  onAttachImages: h,
2236
2243
  onRemoveAttachment: u,
2237
- onRemoveImage: b,
2244
+ onRemoveImage: _,
2238
2245
  acceptImage: j,
2239
2246
  acceptFile: S,
2240
2247
  maxImages: R,
@@ -2244,48 +2251,48 @@ function zt({
2244
2251
  className: O = "",
2245
2252
  ...D
2246
2253
  }) {
2247
- const Y = E(null), q = E(null), P = E(0), [N, C] = A(!1), [G, U] = A([]), x = (_) => {
2254
+ const Y = E(null), q = E(null), P = E(0), [N, C] = A(!1), [X, U] = A([]), x = (b) => {
2248
2255
  const T = ++Is;
2249
- U((V) => [...V, { id: T, msg: _ }]), setTimeout(() => U((V) => V.filter((J) => J.id !== T)), 6e3);
2250
- }, v = (_) => U((T) => T.filter((V) => V.id !== _)), k = (_) => _.type.startsWith("image/"), L = () => !0, H = j ?? k, X = S ?? L, g = (_) => {
2256
+ U((V) => [...V, { id: T, msg: b }]), setTimeout(() => U((V) => V.filter((J) => J.id !== T)), 6e3);
2257
+ }, v = (b) => U((T) => T.filter((V) => V.id !== b)), k = (b) => b.type.startsWith("image/"), L = () => !0, H = j ?? k, G = S ?? L, g = (b) => {
2251
2258
  const T = [], V = [], J = [], Z = [];
2252
- let ee = 0, le = R != null ? R - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2253
- for (const se of _)
2254
- H(se) ? B && se.size > B ? J.push(se.name) : le > 0 ? (T.push(se), le--) : ee++ : X(se) ? V.push(se) : Z.push(se.name);
2259
+ let ee = 0, oe = R != null ? R - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2260
+ for (const se of b)
2261
+ H(se) ? B && se.size > B ? J.push(se.name) : oe > 0 ? (T.push(se), oe--) : ee++ : G(se) ? V.push(se) : Z.push(se.name);
2255
2262
  return { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee };
2256
- }, c = (_) => {
2257
- const { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(_);
2263
+ }, c = (b) => {
2264
+ const { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(b);
2258
2265
  J.length && x(`File${J.length > 1 ? "s" : ""} too large${B ? ` (max ${B / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && x(`Max ${R} images per message`), h && T.length && h(T);
2259
- const le = V.concat(h ? [] : T);
2260
- p && le.length && p(le);
2266
+ const oe = V.concat(h ? [] : T);
2267
+ p && oe.length && p(oe);
2261
2268
  };
2262
2269
  M(() => {
2263
- const _ = q.current;
2264
- _ && (_.style.height = "auto", _.style.height = `${Math.min(_.scrollHeight, 200)}px`);
2270
+ const b = q.current;
2271
+ b && (b.style.height = "auto", b.style.height = `${Math.min(b.scrollHeight, 200)}px`);
2265
2272
  }, [s]), M(() => {
2266
- const _ = (T) => {
2273
+ const b = (T) => {
2267
2274
  var J, Z, ee;
2268
2275
  if (n || o) return;
2269
2276
  const V = (J = T.target) == null ? void 0 : J.tagName;
2270
2277
  V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (Z = T.target) != null && Z.isContentEditable || T.ctrlKey || T.metaKey || T.altKey || T.key.length !== 1 && T.key !== "Backspace" && T.key !== "Delete" || (ee = q.current) == null || ee.focus();
2271
2278
  };
2272
- return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
2279
+ return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
2273
2280
  }, [n, o]);
2274
- const w = (_) => {
2275
- _.preventDefault(), P.current++, _.dataTransfer.types.includes("Files") && C(!0);
2276
- }, z = (_) => {
2277
- _.preventDefault(), P.current--, P.current === 0 && C(!1);
2278
- }, F = (_) => _.preventDefault(), te = (_) => {
2279
- _.preventDefault(), P.current = 0, C(!1);
2280
- const T = Array.from(_.dataTransfer.files);
2281
+ const w = (b) => {
2282
+ b.preventDefault(), P.current++, b.dataTransfer.types.includes("Files") && C(!0);
2283
+ }, z = (b) => {
2284
+ b.preventDefault(), P.current--, P.current === 0 && C(!1);
2285
+ }, F = (b) => b.preventDefault(), te = (b) => {
2286
+ b.preventDefault(), P.current = 0, C(!1);
2287
+ const T = Array.from(b.dataTransfer.files);
2281
2288
  T.length && c(T);
2282
- }, ie = (_) => {
2283
- const T = Array.from(_.target.files || []);
2289
+ }, ae = (b) => {
2290
+ const T = Array.from(b.target.files || []);
2284
2291
  Y.current && (Y.current.value = ""), T.length && c(T);
2285
- }, W = (_) => {
2292
+ }, W = (b) => {
2286
2293
  var se;
2287
2294
  if (!h) return;
2288
- const T = (se = _.clipboardData) == null ? void 0 : se.items;
2295
+ const T = (se = b.clipboardData) == null ? void 0 : se.items;
2289
2296
  if (!T) return;
2290
2297
  const V = [];
2291
2298
  for (const Ue of T) {
@@ -2293,27 +2300,27 @@ function zt({
2293
2300
  Te && V.push(Te);
2294
2301
  }
2295
2302
  if (V.length === 0) return;
2296
- const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: le } = g(V);
2297
- Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), le && x(`Max ${R} images per message`), J.length && (_.preventDefault(), h(J));
2298
- }, Q = !n && !o && !!(m != null && m.length) && s.length === 0, oe = Ds({
2303
+ const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: oe } = g(V);
2304
+ Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), oe && x(`Max ${R} images per message`), J.length && (b.preventDefault(), h(J));
2305
+ }, Q = !n && !o && !!(m != null && m.length) && s.length === 0, ie = Ds({
2299
2306
  prompts: m ?? [],
2300
2307
  enabled: Q
2301
- }), xe = (_) => {
2308
+ }), xe = (b) => {
2302
2309
  if (Q) {
2303
- if (_.key === "ArrowDown" || _.key === "ArrowRight") {
2304
- _.preventDefault(), oe.next();
2310
+ if (b.key === "ArrowDown" || b.key === "ArrowRight") {
2311
+ b.preventDefault(), ie.next();
2305
2312
  return;
2306
2313
  }
2307
- if (_.key === "ArrowUp" || _.key === "ArrowLeft") {
2308
- _.preventDefault(), oe.prev();
2314
+ if (b.key === "ArrowUp" || b.key === "ArrowLeft") {
2315
+ b.preventDefault(), ie.prev();
2309
2316
  return;
2310
2317
  }
2311
- if (_.key === "Tab" && !_.shiftKey) {
2312
- _.preventDefault(), t == null || t(oe.currentPrompt);
2318
+ if (b.key === "Tab" && !b.shiftKey) {
2319
+ b.preventDefault(), t == null || t(ie.currentPrompt);
2313
2320
  return;
2314
2321
  }
2315
2322
  }
2316
- a == null || a(_);
2323
+ a == null || a(b);
2317
2324
  }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (d == null ? void 0 : d.length) > 0) && !o, $e = p || h;
2318
2325
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", O].filter(Boolean).join(" "), ...D, children: [
2319
2326
  $e && /* @__PURE__ */ e.jsx(
@@ -2324,7 +2331,7 @@ function zt({
2324
2331
  multiple: !0,
2325
2332
  accept: "*/*",
2326
2333
  className: "ds-prompt-input__file-input",
2327
- onChange: ie
2334
+ onChange: ae
2328
2335
  }
2329
2336
  ),
2330
2337
  /* @__PURE__ */ e.jsxs(
@@ -2342,7 +2349,7 @@ function zt({
2342
2349
  {
2343
2350
  ref: q,
2344
2351
  value: s,
2345
- onChange: (_) => t == null ? void 0 : t(_.target.value),
2352
+ onChange: (b) => t == null ? void 0 : t(b.target.value),
2346
2353
  onKeyDown: xe,
2347
2354
  onPaste: W,
2348
2355
  placeholder: Q ? "" : l,
@@ -2352,39 +2359,39 @@ function zt({
2352
2359
  }
2353
2360
  ),
2354
2361
  Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2355
- /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2362
+ /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2356
2363
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2357
2364
  ] }),
2358
- f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((_, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2359
- /* @__PURE__ */ e.jsx("img", { src: _.preview, alt: "" }),
2365
+ f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((b, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2366
+ /* @__PURE__ */ e.jsx("img", { src: b.preview, alt: "" }),
2360
2367
  /* @__PURE__ */ e.jsx(
2361
2368
  "button",
2362
2369
  {
2363
2370
  className: "ds-prompt-input__image-remove",
2364
- onClick: () => b == null ? void 0 : b(T),
2371
+ onClick: () => _ == null ? void 0 : _(T),
2365
2372
  "aria-label": "Remove image",
2366
2373
  type: "button",
2367
2374
  children: /* @__PURE__ */ e.jsx(ne, { size: 12, strokeWidth: 2 })
2368
2375
  }
2369
2376
  )
2370
2377
  ] }, T)) }),
2371
- G.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: G.map((_) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2372
- /* @__PURE__ */ e.jsx("span", { children: _.msg }),
2378
+ X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((b) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2379
+ /* @__PURE__ */ e.jsx("span", { children: b.msg }),
2373
2380
  /* @__PURE__ */ e.jsx(
2374
2381
  "button",
2375
2382
  {
2376
2383
  type: "button",
2377
2384
  className: "ds-prompt-input__warning-close",
2378
- onClick: () => v(_.id),
2385
+ onClick: () => v(b.id),
2379
2386
  "aria-label": "Dismiss",
2380
2387
  children: /* @__PURE__ */ e.jsx(ne, { size: I[1], strokeWidth: 1.5 })
2381
2388
  }
2382
2389
  )
2383
- ] }, _.id)) }),
2384
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((_, T) => /* @__PURE__ */ e.jsx(ae, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2385
- _.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Re, { size: I[1], strokeWidth: 1.5 }),
2386
- _.filename,
2387
- _.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2390
+ ] }, b.id)) }),
2391
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((b, T) => /* @__PURE__ */ e.jsx(ce, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2392
+ b.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Re, { size: I[1], strokeWidth: 1.5 }),
2393
+ b.filename,
2394
+ b.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2388
2395
  "button",
2389
2396
  {
2390
2397
  type: "button",
@@ -2403,8 +2410,8 @@ function zt({
2403
2410
  icon: /* @__PURE__ */ e.jsx(Re, { size: I[2], strokeWidth: 1.5 }),
2404
2411
  "aria-label": "Attach files",
2405
2412
  onClick: () => {
2406
- var _;
2407
- return (_ = Y.current) == null ? void 0 : _.click();
2413
+ var b;
2414
+ return (b = Y.current) == null ? void 0 : b.click();
2408
2415
  }
2409
2416
  }
2410
2417
  ),
@@ -2438,7 +2445,7 @@ function zt({
2438
2445
  ] });
2439
2446
  }
2440
2447
  const Pe = { fast: 0, standard: 1, premium: 2 }, Le = { fast: "data-5", standard: "data-3", premium: "data-6" };
2441
- function Ot({
2448
+ function zt({
2442
2449
  models: s = [],
2443
2450
  value: t,
2444
2451
  onChange: r,
@@ -2449,7 +2456,7 @@ function Ot({
2449
2456
  className: l = "",
2450
2457
  ...m
2451
2458
  }) {
2452
- const [d, f] = A(!1), p = E(null), h = E(null), u = E(null), [b, j] = A({}), S = s.filter((N) => !a || N.name === "auto" ? !0 : (Pe[N.tier] ?? 1) >= (Pe[a] ?? 1)), R = S.find((N) => N.name === "auto"), B = S.filter((N) => N.name !== "auto"), y = s.find((N) => N.name === t), O = new Set(B.map((N) => N.tier).filter(Boolean)).size > 1;
2459
+ const [d, f] = A(!1), p = E(null), h = E(null), u = E(null), [_, j] = A({}), S = s.filter((N) => !a || N.name === "auto" ? !0 : (Pe[N.tier] ?? 1) >= (Pe[a] ?? 1)), R = S.find((N) => N.name === "auto"), B = S.filter((N) => N.name !== "auto"), y = s.find((N) => N.name === t), O = new Set(B.map((N) => N.tier).filter(Boolean)).size > 1;
2453
2460
  M(() => {
2454
2461
  if (!d) return;
2455
2462
  const N = 320, C = () => {
@@ -2465,14 +2472,14 @@ function Ot({
2465
2472
  });
2466
2473
  };
2467
2474
  C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
2468
- const G = (x) => {
2475
+ const X = (x) => {
2469
2476
  var v, k;
2470
2477
  !((v = p.current) != null && v.contains(x.target)) && !((k = u.current) != null && k.contains(x.target)) && f(!1);
2471
2478
  }, U = (x) => {
2472
2479
  x.key === "Escape" && f(!1);
2473
2480
  };
2474
- return document.addEventListener("mousedown", G), document.addEventListener("keydown", U), () => {
2475
- window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", G), document.removeEventListener("keydown", U);
2481
+ return document.addEventListener("mousedown", X), document.addEventListener("keydown", U), () => {
2482
+ window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", U);
2476
2483
  };
2477
2484
  }, [d]);
2478
2485
  const D = (N) => {
@@ -2489,17 +2496,17 @@ function Ot({
2489
2496
  children: [
2490
2497
  N.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: N.icon }) : /* @__PURE__ */ e.jsx(Se, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2491
2498
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: N.displayName || N.name }),
2492
- O && N.tier && /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: Le[N.tier] || "default", children: N.tier })
2499
+ O && N.tier && /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: Le[N.tier] || "default", children: N.tier })
2493
2500
  ]
2494
2501
  },
2495
2502
  N.name
2496
2503
  ), q = () => !o || !O ? B.map(Y) : ["fast", "standard", "premium"].flatMap((N) => {
2497
- const C = B.filter((G) => G.tier === N);
2504
+ const C = B.filter((X) => X.tier === N);
2498
2505
  return C.length ? [
2499
2506
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": N, children: N.charAt(0).toUpperCase() + N.slice(1) }, `lbl-${N}`),
2500
2507
  ...C.map(Y)
2501
2508
  ] : [];
2502
- }), P = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu", style: b, children: [
2509
+ }), P = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu", style: _, children: [
2503
2510
  n && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2504
2511
  /* @__PURE__ */ e.jsxs(
2505
2512
  "button",
@@ -2540,7 +2547,7 @@ function Ot({
2540
2547
  children: [
2541
2548
  y != null && y.icon ? /* @__PURE__ */ e.jsx("span", { children: y.icon }) : /* @__PURE__ */ e.jsx(Se, { size: 12, strokeWidth: 1.5 }),
2542
2549
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (y == null ? void 0 : y.displayName) || (y == null ? void 0 : y.name) || t }),
2543
- O && (y == null ? void 0 : y.tier) && /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: Le[y.tier] || "default", children: y.tier })
2550
+ O && (y == null ? void 0 : y.tier) && /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: Le[y.tier] || "default", children: y.tier })
2544
2551
  ]
2545
2552
  }
2546
2553
  ),
@@ -2562,7 +2569,7 @@ function Ms(s) {
2562
2569
  t.has(r.filename) || t.set(r.filename, { filename: r.filename, url: r.url, items: [] }), t.get(r.filename).items.push(r);
2563
2570
  return [...t.values()];
2564
2571
  }
2565
- function Ft({
2572
+ function Ot({
2566
2573
  sources: s = [],
2567
2574
  layout: t = "list",
2568
2575
  title: r = "Sources",
@@ -2572,12 +2579,12 @@ function Ft({
2572
2579
  const [n, o] = A(!1), l = Ms(s), m = l.length > i, d = n ? l : l.slice(0, i), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2573
2580
  return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2574
2581
  d.map((h) => {
2575
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2582
+ const u = h.items.map((j) => j.page).filter(Boolean), _ = !!a;
2576
2583
  return /* @__PURE__ */ e.jsxs(
2577
2584
  "div",
2578
2585
  {
2579
- className: `ds-sources-panel__compact-row${b ? " ds-sources-panel__compact-row--clickable" : ""}`,
2580
- onClick: b ? () => a(h.items[0]) : void 0,
2586
+ className: `ds-sources-panel__compact-row${_ ? " ds-sources-panel__compact-row--clickable" : ""}`,
2587
+ onClick: _ ? () => a(h.items[0]) : void 0,
2581
2588
  children: [
2582
2589
  /* @__PURE__ */ e.jsx(rs, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2583
2590
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
@@ -2595,7 +2602,7 @@ function Ft({
2595
2602
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2596
2603
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: r }),
2597
2604
  d.map((h) => {
2598
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2605
+ const u = h.items.map((j) => j.page).filter(Boolean), _ = !!a;
2599
2606
  return f ? /* @__PURE__ */ e.jsx(
2600
2607
  Ee,
2601
2608
  {
@@ -2604,8 +2611,8 @@ function Ft({
2604
2611
  children: h.items.map((j, S) => /* @__PURE__ */ e.jsx(
2605
2612
  "div",
2606
2613
  {
2607
- className: `ds-sources-panel__snippet${b ? " ds-sources-panel__snippet--clickable" : ""}`,
2608
- onClick: b ? () => a(j) : void 0,
2614
+ className: `ds-sources-panel__snippet${_ ? " ds-sources-panel__snippet--clickable" : ""}`,
2615
+ onClick: _ ? () => a(j) : void 0,
2609
2616
  children: j.snippet ?? `p. ${j.page}`
2610
2617
  },
2611
2618
  S
@@ -2615,8 +2622,8 @@ function Ft({
2615
2622
  ) : /* @__PURE__ */ e.jsxs(
2616
2623
  "div",
2617
2624
  {
2618
- className: `ds-sources-panel__row${b ? " ds-sources-panel__row--clickable" : ""}`,
2619
- onClick: b ? () => a(h.items[0]) : void 0,
2625
+ className: `ds-sources-panel__row${_ ? " ds-sources-panel__row--clickable" : ""}`,
2626
+ onClick: _ ? () => a(h.items[0]) : void 0,
2620
2627
  children: [
2621
2628
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2622
2629
  u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(u) })
@@ -2635,7 +2642,7 @@ function Ft({
2635
2642
  function ze(s) {
2636
2643
  return s >= 1e6 ? (s / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : s >= 1e3 ? (s / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(s);
2637
2644
  }
2638
- function Wt({
2645
+ function Ft({
2639
2646
  used: s,
2640
2647
  limit: t,
2641
2648
  size: r = "s",
@@ -2680,7 +2687,7 @@ const Oe = 5;
2680
2687
  function Ps(s) {
2681
2688
  return s < 0.34 ? "low" : s < 0.67 ? "medium" : "high";
2682
2689
  }
2683
- function Ct({
2690
+ function Wt({
2684
2691
  value: s = 0,
2685
2692
  size: t = "xs",
2686
2693
  showLabel: r = "none",
@@ -2704,14 +2711,14 @@ function Ct({
2704
2711
  ] });
2705
2712
  }
2706
2713
  const Ls = { add: "+", remove: "-", context: " " };
2707
- function be({ line: s, lineNumbers: t }) {
2714
+ function _e({ line: s, lineNumbers: t }) {
2708
2715
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${s.type}`, children: [
2709
2716
  t && s.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: s.lineNo }),
2710
2717
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Ls[s.type] }),
2711
2718
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: s.text })
2712
2719
  ] });
2713
2720
  }
2714
- function Ut({
2721
+ function Ct({
2715
2722
  lines: s = [],
2716
2723
  layout: t = "inline",
2717
2724
  wordWrap: r = !1,
@@ -2729,44 +2736,17 @@ function Ut({
2729
2736
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2730
2737
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2731
2738
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body", style: l, children: [
2732
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: m.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) }),
2733
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: d.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) })
2739
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: m.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: i }, p)) }),
2740
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: d.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: i }, p)) })
2734
2741
  ] })
2735
2742
  ] });
2736
2743
  }
2737
2744
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2738
2745
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2739
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(be, { line: m, lineNumbers: i }, d)) })
2746
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(_e, { line: m, lineNumbers: i }, d)) })
2740
2747
  ] });
2741
2748
  }
2742
- const zs = {
2743
- running: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "info", children: "Running…" }),
2744
- success: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "success", children: "Done" }),
2745
- error: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "error", children: "Error" })
2746
- };
2747
- function Vt({
2748
- label: s,
2749
- status: t = "idle",
2750
- icon: r,
2751
- badge: i,
2752
- className: a = "",
2753
- ...n
2754
- }) {
2755
- return /* @__PURE__ */ e.jsxs(
2756
- "div",
2757
- {
2758
- className: ["ds-tool-bubble", a].filter(Boolean).join(" "),
2759
- ...n,
2760
- children: [
2761
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-bubble__icon", children: r }),
2762
- /* @__PURE__ */ e.jsx("span", { className: "ds-tool-bubble__label", children: s }),
2763
- zs[t],
2764
- i
2765
- ]
2766
- }
2767
- );
2768
- }
2769
- function Os({
2749
+ function zs({
2770
2750
  value: s = "idle",
2771
2751
  onLike: t,
2772
2752
  onDislike: r,
@@ -2830,7 +2810,7 @@ function Os({
2830
2810
  }
2831
2811
  );
2832
2812
  }
2833
- function Fs(s) {
2813
+ function Os(s) {
2834
2814
  const t = s instanceof Date ? s : new Date(s);
2835
2815
  if (isNaN(t)) return null;
2836
2816
  const r = /* @__PURE__ */ new Date(), i = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(r.getFullYear(), r.getMonth(), r.getDate()), n = new Date(a - 864e5);
@@ -2839,7 +2819,7 @@ function Fs(s) {
2839
2819
  const o = t.getDate(), l = t.toLocaleString([], { month: "short" });
2840
2820
  return `${o} ${l} ${i}`;
2841
2821
  }
2842
- function Yt({
2822
+ function Ut({
2843
2823
  role: s = "assistant",
2844
2824
  text: t,
2845
2825
  timestamp: r,
@@ -2849,7 +2829,7 @@ function Yt({
2849
2829
  className: o = "",
2850
2830
  ...l
2851
2831
  }) {
2852
- const m = s === "assistant" && (a || n), d = !!t, f = r ? Fs(r) : null;
2832
+ const m = s === "assistant" && (a || n), d = !!t, f = r ? Os(r) : null;
2853
2833
  return !m && !d && !f ? null : /* @__PURE__ */ e.jsxs(
2854
2834
  "div",
2855
2835
  {
@@ -2857,7 +2837,7 @@ function Yt({
2857
2837
  ...l,
2858
2838
  children: [
2859
2839
  s === "user" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f }),
2860
- m && /* @__PURE__ */ e.jsx(Os, { className: "ds-message-action", value: i, onLike: a, onDislike: n }),
2840
+ m && /* @__PURE__ */ e.jsx(zs, { className: "ds-message-action", value: i, onLike: a, onDislike: n }),
2861
2841
  d && /* @__PURE__ */ e.jsx(As, { className: "ds-message-action", text: t }),
2862
2842
  s === "assistant" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f })
2863
2843
  ]
@@ -2866,75 +2846,75 @@ function Yt({
2866
2846
  }
2867
2847
  export {
2868
2848
  Ee as Accordion,
2869
- et as Alert,
2870
- Tt as AnimatedNumber,
2871
- ut as Avatar,
2872
- ae as Badge,
2873
- kt as Banner,
2874
- wt as Breadcrumb,
2849
+ Qs as Alert,
2850
+ $t as AnimatedNumber,
2851
+ dt as Avatar,
2852
+ ce as Badge,
2853
+ yt as Banner,
2854
+ Nt as Breadcrumb,
2875
2855
  me as Button,
2876
- Ks as Card,
2877
- Pt as ChatMessage,
2878
- ct as Checkbox,
2879
- tt as Code,
2856
+ qs as Card,
2857
+ Mt as ChatMessage,
2858
+ lt as Checkbox,
2859
+ st as Code,
2880
2860
  ms as CodeAccordion,
2881
- Ct as ConfidenceBar,
2861
+ Wt as ConfidenceBar,
2882
2862
  As as CopyButton,
2883
- Ut as DiffView,
2884
- yt as Drawer,
2863
+ Ct as DiffView,
2864
+ gt as Drawer,
2885
2865
  Be as DrawerFooter,
2886
- Et as Dropdown,
2887
- jt as EmptyState,
2888
- vt as FormField,
2889
- Gs as H1,
2866
+ kt as Dropdown,
2867
+ bt as EmptyState,
2868
+ jt as FormField,
2869
+ Ks as H1,
2890
2870
  Xs as H2,
2891
- Js as H3,
2892
- Zs as H4,
2893
- Rt as InView,
2894
- Vs as Input,
2895
- rt as Link,
2896
- Os as MessageFeedback,
2897
- Yt as MessageFooter,
2898
- st as Modal,
2871
+ Gs as H3,
2872
+ Js as H4,
2873
+ Tt as InView,
2874
+ Us as Input,
2875
+ tt as Link,
2876
+ zs as MessageFeedback,
2877
+ Ut as MessageFooter,
2878
+ et as Modal,
2899
2879
  Ie as ModalFooter,
2900
- Ot as ModelPicker,
2901
- Qs as P1,
2880
+ zt as ModelPicker,
2881
+ Zs as P1,
2902
2882
  ds as P2,
2903
2883
  Fe as P3,
2904
- gt as Pagination,
2905
- $t as ProgressBar,
2906
- zt as PromptInput,
2907
- dt as Radio,
2908
- It as ReasoningBlock,
2909
- it as SegmentedControl,
2910
- Hs as Select,
2884
+ wt as Pagination,
2885
+ Et as ProgressBar,
2886
+ Lt as PromptInput,
2887
+ ct as Radio,
2888
+ Dt as ReasoningBlock,
2889
+ at as SegmentedControl,
2890
+ Ys as Select,
2911
2891
  xs as Skeleton,
2912
- Ft as SourcesPanel,
2892
+ Ot as SourcesPanel,
2913
2893
  ls as Spinner,
2914
- Nt as Stat,
2915
- Bt as StepIndicator,
2916
- qs as Stepper,
2917
- Mt as StreamingText,
2918
- at as Tab,
2919
- ft as Table,
2920
- pt as TableBody,
2921
- mt as TableHead,
2922
- ht as TableRow,
2923
- xt as TableSubheaderRow,
2924
- nt as Tabs,
2894
+ vt as Stat,
2895
+ It as StepIndicator,
2896
+ Hs as Stepper,
2897
+ Bt as StreamingText,
2898
+ nt as Tab,
2899
+ ut as Table,
2900
+ mt as TableBody,
2901
+ ft as TableHead,
2902
+ pt as TableRow,
2903
+ ht as TableSubheaderRow,
2904
+ rt as Tabs,
2925
2905
  _t as Td,
2926
- Ys as Textarea,
2927
- bt as Th,
2928
- At as ToastContainer,
2929
- lt as Toggle,
2930
- Wt as TokenCounter,
2931
- Vt as ToolCallBubble,
2932
- Dt as ToolCallCard,
2933
- ot as Tooltip,
2906
+ Vs as Textarea,
2907
+ xt as Th,
2908
+ St as ToastContainer,
2909
+ ot as Toggle,
2910
+ Ft as TokenCounter,
2911
+ At as ToolCallBubble,
2912
+ At as ToolCallCard,
2913
+ it as Tooltip,
2934
2914
  I as iconSizes,
2935
2915
  ks as useAnimatedNumber,
2936
2916
  Ds as useAnimatedPlaceholder,
2937
2917
  Es as useInView,
2938
- Lt as useStreamScroll,
2939
- St as useToast
2918
+ Pt as useStreamScroll,
2919
+ Rt as useToast
2940
2920
  };