@donkit-ai/design-system 1.4.50 → 1.4.52

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,14 +1,14 @@
1
- import U, { useState as D, useRef as k, useEffect as B, useLayoutEffect as Ve } from "react";
2
- import { Check as we, X as te, ChevronDown as xe, Minus as Ye, Plus as qe, XCircle as ge, AlertTriangle as ye, CheckCircle as ke, Info as Ee, ChevronUp as He, ChevronsUpDown as Ke, ChevronLeft as Xe, ChevronRight as Ge, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Se, Square as es, ArrowUp as ss, Zap as ts, Cpu as De, FileText as rs, ThumbsUp as ns, ThumbsDown as as } from "lucide-react";
1
+ import U, { useState as I, useRef as T, useEffect as L, useLayoutEffect as Ve } from "react";
2
+ import { Check as we, X as te, ChevronDown as xe, Minus as Ye, Plus as qe, XCircle as ge, AlertTriangle as ye, CheckCircle as ke, Info as Ee, ChevronUp as He, ChevronsUpDown as Ke, ChevronLeft as Xe, ChevronRight as Ge, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Se, Square as es, ArrowUp as ss, Zap as ts, Cpu as De, FileText as ns, ThumbsUp as rs, ThumbsDown as as } from "lucide-react";
3
3
  import pe from "react-dom";
4
- const I = {
4
+ const A = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var _e = { exports: {} }, fe = {};
11
+ var je = { exports: {} }, fe = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -23,22 +23,22 @@ function os() {
23
23
  if (Ie) return fe;
24
24
  Ie = 1;
25
25
  var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
26
- function r(o, a, n) {
26
+ function n(o, a, r) {
27
27
  var i = null;
28
- if (n !== void 0 && (i = "" + n), a.key !== void 0 && (i = "" + a.key), "key" in a) {
29
- n = {};
28
+ if (r !== void 0 && (i = "" + r), a.key !== void 0 && (i = "" + a.key), "key" in a) {
29
+ r = {};
30
30
  for (var l in a)
31
- l !== "key" && (n[l] = a[l]);
32
- } else n = a;
33
- return a = n.ref, {
31
+ l !== "key" && (r[l] = a[l]);
32
+ } else r = a;
33
+ return a = r.ref, {
34
34
  $$typeof: s,
35
35
  type: o,
36
36
  key: i,
37
37
  ref: a !== void 0 ? a : null,
38
- props: n
38
+ props: r
39
39
  };
40
40
  }
41
- return fe.Fragment = t, fe.jsx = r, fe.jsxs = r, fe;
41
+ return fe.Fragment = t, fe.jsx = n, fe.jsxs = n, fe;
42
42
  }
43
43
  var me = {};
44
44
  /**
@@ -59,13 +59,13 @@ function is() {
59
59
  return c.$$typeof === C ? null : c.displayName || c.name || null;
60
60
  if (typeof c == "string") return c;
61
61
  switch (c) {
62
- case R:
62
+ case y:
63
63
  return "Fragment";
64
- case L:
64
+ case R:
65
65
  return "Profiler";
66
- case E:
66
+ case g:
67
67
  return "StrictMode";
68
- case A:
68
+ case B:
69
69
  return "Suspense";
70
70
  case q:
71
71
  return "SuspenseList";
@@ -76,21 +76,21 @@ function is() {
76
76
  switch (typeof c.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
78
  ), c.$$typeof) {
79
- case j:
79
+ case _:
80
80
  return "Portal";
81
- case T:
81
+ case $:
82
82
  return c.displayName || "Context";
83
- case y:
83
+ case N:
84
84
  return (c._context.displayName || "Context") + ".Consumer";
85
- case z:
86
- var w = c.render;
87
- return c = c.displayName, c || (c = w.displayName || w.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
85
+ case P:
86
+ var k = c.render;
87
+ return c = c.displayName, c || (c = k.displayName || k.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
88
88
  case H:
89
- return w = c.displayName || null, w !== null ? w : s(c.type) || "Memo";
89
+ return k = c.displayName || null, k !== null ? k : s(c.type) || "Memo";
90
90
  case F:
91
- w = c._payload, c = c._init;
91
+ k = c._payload, c = c._init;
92
92
  try {
93
- return s(c(w));
93
+ return s(c(k));
94
94
  } catch {
95
95
  }
96
96
  }
@@ -99,30 +99,30 @@ function is() {
99
99
  function t(c) {
100
100
  return "" + c;
101
101
  }
102
- function r(c) {
102
+ function n(c) {
103
103
  try {
104
104
  t(c);
105
- var w = !1;
105
+ var k = !1;
106
106
  } catch {
107
- w = !0;
107
+ k = !0;
108
108
  }
109
- if (w) {
110
- w = console;
111
- var P = w.error, O = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
112
- return P.call(
113
- w,
109
+ if (k) {
110
+ k = console;
111
+ var z = k.error, O = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
112
+ return z.call(
113
+ k,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  O
116
116
  ), t(c);
117
117
  }
118
118
  }
119
119
  function o(c) {
120
- if (c === R) return "<>";
120
+ if (c === y) return "<>";
121
121
  if (typeof c == "object" && c !== null && c.$$typeof === F)
122
122
  return "<...>";
123
123
  try {
124
- var w = s(c);
125
- return w ? "<" + w + ">" : "<...>";
124
+ var k = s(c);
125
+ return k ? "<" + k + ">" : "<...>";
126
126
  } catch {
127
127
  return "<...>";
128
128
  }
@@ -131,25 +131,25 @@ function is() {
131
131
  var c = X.A;
132
132
  return c === null ? null : c.getOwner();
133
133
  }
134
- function n() {
134
+ function r() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(c) {
138
138
  if (V.call(c, "key")) {
139
- var w = Object.getOwnPropertyDescriptor(c, "key").get;
140
- if (w && w.isReactWarning) return !1;
139
+ var k = Object.getOwnPropertyDescriptor(c, "key").get;
140
+ if (k && k.isReactWarning) return !1;
141
141
  }
142
142
  return c.key !== void 0;
143
143
  }
144
- function l(c, w) {
145
- function P() {
146
- $ || ($ = !0, console.error(
144
+ function l(c, k) {
145
+ function z() {
146
+ S || (S = !0, console.error(
147
147
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
148
- w
148
+ k
149
149
  ));
150
150
  }
151
- P.isReactWarning = !0, Object.defineProperty(c, "key", {
152
- get: P,
151
+ z.isReactWarning = !0, Object.defineProperty(c, "key", {
152
+ get: z,
153
153
  configurable: !0
154
154
  });
155
155
  }
@@ -159,13 +159,13 @@ function is() {
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, P, O, re, ae) {
163
- var W = P.ref;
162
+ function d(c, k, z, O, ne, ae) {
163
+ var W = z.ref;
164
164
  return c = {
165
165
  $$typeof: b,
166
166
  type: c,
167
- key: w,
168
- props: P,
167
+ key: k,
168
+ props: z,
169
169
  _owner: O
170
170
  }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(c, "ref", {
171
171
  enumerable: !1,
@@ -184,7 +184,7 @@ function is() {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: re
187
+ value: ne
188
188
  }), Object.defineProperty(c, "_debugTask", {
189
189
  configurable: !1,
190
190
  enumerable: !1,
@@ -192,8 +192,8 @@ function is() {
192
192
  value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function f(c, w, P, O, re, ae) {
196
- var W = w.children;
195
+ function f(c, k, z, O, ne, ae) {
196
+ var W = k.children;
197
197
  if (W !== void 0)
198
198
  if (O)
199
199
  if (x(W)) {
@@ -205,12 +205,12 @@ function is() {
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
207
  else p(W);
208
- if (V.call(w, "key")) {
208
+ if (V.call(k, "key")) {
209
209
  W = s(c);
210
- var Q = Object.keys(w).filter(function(be) {
210
+ var Q = Object.keys(k).filter(function(be) {
211
211
  return be !== "key";
212
212
  });
213
- O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", g[W + O] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", E[W + O] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
@@ -221,22 +221,22 @@ React keys must be passed directly to JSX without using spread:
221
221
  W,
222
222
  Q,
223
223
  W
224
- ), g[W + O] = !0);
224
+ ), E[W + O] = !0);
225
225
  }
226
- if (W = null, P !== void 0 && (r(P), W = "" + P), i(w) && (r(w.key), W = "" + w.key), "key" in w) {
227
- P = {};
228
- for (var oe in w)
229
- oe !== "key" && (P[oe] = w[oe]);
230
- } else P = w;
226
+ if (W = null, z !== void 0 && (n(z), W = "" + z), i(k) && (n(k.key), W = "" + k.key), "key" in k) {
227
+ z = {};
228
+ for (var oe in k)
229
+ oe !== "key" && (z[oe] = k[oe]);
230
+ } else z = k;
231
231
  return W && l(
232
- P,
232
+ z,
233
233
  typeof c == "function" ? c.displayName || c.name || "Unknown" : c
234
234
  ), d(
235
235
  c,
236
236
  W,
237
- P,
237
+ z,
238
238
  a(),
239
- re,
239
+ ne,
240
240
  ae
241
241
  );
242
242
  }
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
246
246
  function h(c) {
247
247
  return typeof c == "object" && c !== null && c.$$typeof === b;
248
248
  }
249
- var u = U, b = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), T = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, x = Array.isArray, N = console.createTask ? console.createTask : function() {
249
+ var u = U, b = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, x = Array.isArray, w = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  u = {
@@ -254,40 +254,40 @@ React keys must be passed directly to JSX without using spread:
254
254
  return c();
255
255
  }
256
256
  };
257
- var $, M = {}, K = u.react_stack_bottom_frame.bind(
257
+ var S, M = {}, K = u.react_stack_bottom_frame.bind(
258
258
  u,
259
- n
260
- )(), G = N(o(n)), g = {};
261
- me.Fragment = R, me.jsx = function(c, w, P) {
259
+ r
260
+ )(), G = w(o(r)), E = {};
261
+ me.Fragment = y, me.jsx = function(c, k, z) {
262
262
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
263
263
  return f(
264
264
  c,
265
- w,
266
- P,
265
+ k,
266
+ z,
267
267
  !1,
268
268
  O ? Error("react-stack-top-frame") : K,
269
- O ? N(o(c)) : G
269
+ O ? w(o(c)) : G
270
270
  );
271
- }, me.jsxs = function(c, w, P) {
271
+ }, me.jsxs = function(c, k, z) {
272
272
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
273
273
  return f(
274
274
  c,
275
- w,
276
- P,
275
+ k,
276
+ z,
277
277
  !0,
278
278
  O ? Error("react-stack-top-frame") : K,
279
- O ? N(o(c)) : G
279
+ O ? w(o(c)) : G
280
280
  );
281
281
  };
282
282
  }()), me;
283
283
  }
284
- process.env.NODE_ENV === "production" ? _e.exports = os() : _e.exports = is();
285
- var e = _e.exports;
286
- function ls({ size: s = "m", color: t = "default", className: r = "", ...o }) {
284
+ process.env.NODE_ENV === "production" ? je.exports = os() : je.exports = is();
285
+ var e = je.exports;
286
+ function ls({ size: s = "m", color: t = "default", className: n = "", ...o }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
290
- className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, r].filter(Boolean).join(" "),
290
+ className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, n].filter(Boolean).join(" "),
291
291
  role: "status",
292
292
  "aria-label": "Loading",
293
293
  ...o
@@ -298,10 +298,10 @@ const cs = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function ce({
299
299
  children: s,
300
300
  variant: t = "primary",
301
- size: r = "m",
301
+ size: n = "m",
302
302
  fullWidth: o = !1,
303
303
  icon: a,
304
- disabled: n = !1,
304
+ disabled: r = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
307
  type: m = "button",
@@ -310,20 +310,20 @@ function ce({
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const u = a && !s, b = i === "loading", j = i === "success", R = i === "error", E = b || j || R, L = r === "xs" ? "s" : "m", y = t === "danger" ? "on-accent" : "default", T = cs[r] ?? 16, z = b ? /* @__PURE__ */ e.jsx(ls, { size: L, color: y }) : j ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(we, { size: T, strokeWidth: 2.5 }) }) : R ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(te, { size: T, strokeWidth: 2.5 }) }) : null, A = [
313
+ const u = a && !s, b = i === "loading", _ = i === "success", y = i === "error", g = b || _ || y, R = n === "xs" ? "s" : "m", N = t === "danger" ? "on-accent" : "default", $ = cs[n] ?? 16, P = b ? /* @__PURE__ */ e.jsx(ls, { size: R, color: N }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(we, { size: $, strokeWidth: 2.5 }) }) : y ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(te, { size: $, strokeWidth: 2.5 }) }) : null, B = [
314
314
  "ds-button",
315
315
  `ds-button--${t}`,
316
- `ds-button--${r}`,
316
+ `ds-button--${n}`,
317
317
  o && "ds-button--full",
318
318
  u && "ds-button--icon-only",
319
319
  p
320
320
  ].filter(Boolean).join(" "), q = i !== "idle" ? i : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- E ? z : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
321
+ g ? P : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
322
322
  s
323
323
  ] });
324
324
  if (d) {
325
325
  const F = (v) => {
326
- if (n || b) {
326
+ if (r || b) {
327
327
  v.preventDefault();
328
328
  return;
329
329
  }
@@ -332,11 +332,11 @@ function ce({
332
332
  return /* @__PURE__ */ e.jsx(
333
333
  "a",
334
334
  {
335
- className: A,
336
- href: n || b ? void 0 : d,
335
+ className: B,
336
+ href: r || b ? void 0 : d,
337
337
  onClick: F,
338
338
  "aria-label": f,
339
- "aria-disabled": n || b ? "true" : void 0,
339
+ "aria-disabled": r || b ? "true" : void 0,
340
340
  "aria-busy": b ? "true" : void 0,
341
341
  "data-state": q,
342
342
  ...h,
@@ -348,8 +348,8 @@ function ce({
348
348
  "button",
349
349
  {
350
350
  type: m,
351
- className: A,
352
- disabled: n,
351
+ className: B,
352
+ disabled: r,
353
353
  onClick: b ? void 0 : l,
354
354
  "aria-label": f,
355
355
  "aria-busy": b ? "true" : void 0,
@@ -362,17 +362,17 @@ function ce({
362
362
  function Vs({
363
363
  label: s,
364
364
  error: t,
365
- hint: r,
365
+ hint: n,
366
366
  fullWidth: o = !0,
367
367
  icon: a,
368
- iconRight: n,
368
+ iconRight: r,
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
371
  disabled: m,
372
372
  id: d,
373
373
  ...f
374
374
  }) {
375
- const p = d || `input-${U.useId()}`, h = r ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, b = u || h;
375
+ const p = d || `input-${U.useId()}`, h = n ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, b = u || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "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: [
@@ -381,14 +381,14 @@ function Vs({
381
381
  "input",
382
382
  {
383
383
  id: p,
384
- className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
384
+ className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
385
385
  disabled: m,
386
386
  "aria-invalid": t ? "true" : "false",
387
387
  "aria-describedby": b,
388
388
  ...f
389
389
  }
390
390
  ),
391
- n && /* @__PURE__ */ e.jsx(
391
+ r && /* @__PURE__ */ e.jsx(
392
392
  "button",
393
393
  {
394
394
  type: "button",
@@ -396,122 +396,122 @@ function Vs({
396
396
  onClick: i,
397
397
  tabIndex: -1,
398
398
  "aria-label": "Toggle visibility",
399
- children: n
399
+ children: r
400
400
  }
401
401
  )
402
402
  ] }),
403
- r && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: r }),
403
+ n && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
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
407
  function Ys({
408
408
  label: s,
409
409
  error: t,
410
- hint: r,
410
+ hint: n,
411
411
  fullWidth: o = !0,
412
412
  size: a = "m",
413
- disabled: n,
413
+ disabled: r,
414
414
  id: i,
415
415
  resize: l = !0,
416
416
  rows: m = 3,
417
417
  ...d
418
418
  }) {
419
- const f = i || `textarea-${U.useId()}`, p = r ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
420
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
+ const f = i || `textarea-${U.useId()}`, p = n ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
420
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: f, children: s }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
425
  id: f,
426
426
  className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
- disabled: n,
427
+ disabled: r,
428
428
  "aria-invalid": t ? "true" : "false",
429
429
  "aria-describedby": u,
430
430
  rows: m,
431
431
  ...d
432
432
  }
433
433
  ),
434
- r && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: r }),
434
+ n && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
435
435
  t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
436
436
  ] });
437
437
  }
438
438
  function qs({
439
439
  label: s,
440
440
  value: t,
441
- onChange: r,
441
+ onChange: n,
442
442
  options: o = [],
443
443
  placeholder: a = "Select option",
444
- error: n,
444
+ error: r,
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
447
  disabled: m = !1,
448
448
  id: d,
449
449
  ...f
450
450
  }) {
451
- const [p, h] = D(!1), [u, b] = D(!1), [j, R] = D({}), [E, L] = D("down"), [y, T] = D(-1), z = k(null), A = k(null), q = k(null), H = k(null), F = d || `select-${U.useId()}`, v = `${F}-label`, C = n ? `${F}-error` : void 0, X = 150, V = (g = !1) => {
452
- u || (b(!0), T(-1), H.current = setTimeout(() => {
451
+ const [p, h] = I(!1), [u, b] = I(!1), [_, y] = I({}), [g, R] = I("down"), [N, $] = I(-1), P = T(null), B = T(null), q = T(null), H = T(null), F = d || `select-${U.useId()}`, v = `${F}-label`, C = r ? `${F}-error` : void 0, X = 150, V = (E = !1) => {
452
+ u || (b(!0), $(-1), H.current = setTimeout(() => {
453
453
  var c;
454
- h(!1), b(!1), g && ((c = q.current) == null || c.focus());
454
+ h(!1), b(!1), E && ((c = q.current) == null || c.focus());
455
455
  }, X));
456
- }, x = (g) => {
456
+ }, x = (E) => {
457
457
  clearTimeout(H.current), b(!1);
458
- const c = g !== void 0 ? g : Math.max(o.findIndex((w) => w.value === t), 0);
459
- T(c), h(!0);
458
+ const c = E !== void 0 ? E : Math.max(o.findIndex((k) => k.value === t), 0);
459
+ $(c), h(!0);
460
460
  };
461
- B(() => () => clearTimeout(H.current), []);
462
- const N = () => {
461
+ L(() => () => clearTimeout(H.current), []);
462
+ const w = () => {
463
463
  var ae;
464
- const g = (ae = z.current) == null ? void 0 : ae.getBoundingClientRect();
465
- if (!g) return;
466
- const c = window.innerHeight, w = c - g.bottom, P = g.top, re = w < 300 && P > w;
467
- L(re ? "up" : "down"), R(
468
- re ? { bottom: c - g.top + 4, left: g.left, width: g.width } : { top: g.bottom + 4, left: g.left, width: g.width }
464
+ const E = (ae = P.current) == null ? void 0 : ae.getBoundingClientRect();
465
+ if (!E) return;
466
+ const c = window.innerHeight, k = c - E.bottom, z = E.top, ne = k < 300 && z > k;
467
+ R(ne ? "up" : "down"), y(
468
+ ne ? { bottom: c - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
469
469
  );
470
470
  };
471
- B(() => {
471
+ L(() => {
472
472
  if (p)
473
- return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
474
- window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
473
+ return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
474
+ window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
475
475
  };
476
- }, [p]), B(() => {
477
- const g = (c) => {
478
- z.current && !z.current.contains(c.target) && A.current && !A.current.contains(c.target) && V();
476
+ }, [p]), L(() => {
477
+ const E = (c) => {
478
+ P.current && !P.current.contains(c.target) && B.current && !B.current.contains(c.target) && V();
479
479
  };
480
- return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
481
- }, [u]), B(() => {
480
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
481
+ }, [u]), L(() => {
482
482
  var c;
483
- if (!p || y < 0 || !A.current) return;
484
- (c = A.current.querySelectorAll(".ds-select-option")[y]) == null || c.scrollIntoView({ block: "nearest" });
485
- }, [y, p]);
486
- const $ = (g) => {
487
- switch (g.key) {
483
+ if (!p || N < 0 || !B.current) return;
484
+ (c = B.current.querySelectorAll(".ds-select-option")[N]) == null || c.scrollIntoView({ block: "nearest" });
485
+ }, [N, p]);
486
+ const S = (E) => {
487
+ switch (E.key) {
488
488
  case "ArrowDown":
489
- g.preventDefault(), p ? T((c) => Math.min(c + 1, o.length - 1)) : x();
489
+ E.preventDefault(), p ? $((c) => Math.min(c + 1, o.length - 1)) : x();
490
490
  break;
491
491
  case "ArrowUp":
492
- g.preventDefault(), p ? T((c) => Math.max(c - 1, 0)) : x(o.length - 1);
492
+ E.preventDefault(), p ? $((c) => Math.max(c - 1, 0)) : x(o.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && (g.preventDefault(), T(0));
495
+ p && (E.preventDefault(), $(0));
496
496
  break;
497
497
  case "End":
498
- p && (g.preventDefault(), T(o.length - 1));
498
+ p && (E.preventDefault(), $(o.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- g.preventDefault(), p ? y >= 0 && (r == null || r(o[y].value), V(!0)) : x();
502
+ E.preventDefault(), p ? N >= 0 && (n == null || n(o[N].value), V(!0)) : x();
503
503
  break;
504
504
  case "Escape":
505
- p && (g.preventDefault(), V(!0));
505
+ p && (E.preventDefault(), V(!0));
506
506
  break;
507
507
  case "Tab":
508
508
  p && V(!1);
509
509
  break;
510
510
  }
511
- }, M = o.find((g) => g.value === t), K = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], G = p && /* @__PURE__ */ e.jsx(
511
+ }, M = o.find((E) => E.value === t), K = l === "xs" ? A[1] : l === "small" ? A[2] : A[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
- ref: A,
514
+ ref: B,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
517
  "aria-labelledby": s ? v : void 0,
@@ -519,36 +519,36 @@ function qs({
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
- `ds-select-dropdown--${E}`,
522
+ `ds-select-dropdown--${g}`,
523
523
  u && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
- style: j,
526
- children: o.map((g, c) => /* @__PURE__ */ e.jsx(
525
+ style: _,
526
+ children: o.map((E, c) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
529
  id: `${F}-opt-${c}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": t === g.value,
533
+ "aria-selected": t === E.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- t === g.value && "ds-select-option--selected",
538
- c === y && "ds-select-option--active"
537
+ t === E.value && "ds-select-option--selected",
538
+ c === N && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- r == null || r(g.value), V(!0);
541
+ n == null || n(E.value), V(!0);
542
542
  },
543
- children: g.label
543
+ children: E.label
544
544
  },
545
- g.value
545
+ E.value
546
546
  ))
547
547
  }
548
548
  );
549
549
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
550
550
  s && /* @__PURE__ */ e.jsx("label", { id: v, className: "ds-select-label", children: s }),
551
- /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: z, children: /* @__PURE__ */ e.jsxs(
551
+ /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: P, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
554
  ref: q,
@@ -557,15 +557,15 @@ function qs({
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && y >= 0 ? `${F}-opt-${y}` : void 0,
560
+ "aria-activedescendant": p && N >= 0 ? `${F}-opt-${N}` : void 0,
561
561
  "aria-labelledby": s ? v : void 0,
562
- "aria-invalid": n ? "true" : "false",
562
+ "aria-invalid": r ? "true" : "false",
563
563
  "aria-describedby": C,
564
- className: `ds-select-trigger ds-select-trigger--${l} ${n ? "ds-select-trigger--error" : ""}`,
564
+ className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
566
  m || (p ? V() : x());
567
567
  },
568
- onKeyDown: $,
568
+ onKeyDown: S,
569
569
  disabled: m,
570
570
  ...f,
571
571
  children: [
@@ -575,24 +575,24 @@ function qs({
575
575
  {
576
576
  size: K,
577
577
  strokeWidth: 1.5,
578
- className: `ds-select-icon ${p && E === "down" ? "ds-select-icon--open" : ""} ${p && E === "up" ? "ds-select-icon--up" : ""}`,
578
+ className: `ds-select-icon ${p && g === "down" ? "ds-select-icon--open" : ""} ${p && g === "up" ? "ds-select-icon--up" : ""}`,
579
579
  "aria-hidden": "true"
580
580
  }
581
581
  )
582
582
  ]
583
583
  }
584
584
  ) }),
585
- n && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: n }),
585
+ r && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: r }),
586
586
  typeof document < "u" && pe.createPortal(G, document.body)
587
587
  ] });
588
588
  }
589
589
  function Hs({
590
590
  label: s,
591
591
  value: t = 0,
592
- onChange: r,
592
+ onChange: n,
593
593
  min: o = 0,
594
594
  max: a = 100,
595
- step: n = 1,
595
+ step: r = 1,
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
598
  hint: m,
@@ -601,36 +601,36 @@ function Hs({
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const E = Math.min(Number(t) + n, a);
605
- r == null || r(E);
604
+ const g = Math.min(Number(t) + r, a);
605
+ n == null || n(g);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const E = Math.max(Number(t) - n, o);
609
- r == null || r(E);
610
- }, u = (E) => {
608
+ const g = Math.max(Number(t) - r, o);
609
+ n == null || n(g);
610
+ }, u = (g) => {
611
611
  if (l) return;
612
- const L = E.target.value;
613
- if (L === "") {
614
- r == null || r(o);
612
+ const R = g.target.value;
613
+ if (R === "") {
614
+ n == null || n(o);
615
615
  return;
616
616
  }
617
- const y = Number(L);
618
- if (!isNaN(y)) {
619
- const T = Math.min(Math.max(y, o), a);
620
- r == null || r(T);
617
+ const N = Number(R);
618
+ if (!isNaN(N)) {
619
+ const $ = Math.min(Math.max(N, o), a);
620
+ n == null || n($);
621
621
  }
622
622
  }, b = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
625
  d && "ds-stepper-wrapper--error"
626
- ].filter(Boolean).join(" "), j = [
626
+ ].filter(Boolean).join(" "), _ = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), R = i === "xs" ? I[1] : i === "small" ? I[2] : I[3];
630
+ ].filter(Boolean).join(" "), y = i === "xs" ? A[1] : i === "small" ? A[2] : A[3];
631
631
  return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
632
632
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
633
- /* @__PURE__ */ e.jsxs("div", { className: j, children: [
633
+ /* @__PURE__ */ e.jsxs("div", { className: _, children: [
634
634
  /* @__PURE__ */ e.jsx(
635
635
  "button",
636
636
  {
@@ -639,7 +639,7 @@ function Hs({
639
639
  onClick: h,
640
640
  disabled: l || t <= o,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(Ye, { size: R, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(Ye, { size: y, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -651,7 +651,7 @@ function Hs({
651
651
  onChange: u,
652
652
  min: o,
653
653
  max: a,
654
- step: n,
654
+ step: r,
655
655
  disabled: l,
656
656
  ...f
657
657
  }
@@ -664,7 +664,7 @@ function Hs({
664
664
  onClick: p,
665
665
  disabled: l || t >= a,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(qe, { size: R, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(qe, { size: y, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
@@ -675,20 +675,20 @@ function Hs({
675
675
  function Ks({
676
676
  children: s,
677
677
  padding: t = "m",
678
- variant: r = "info",
678
+ variant: n = "info",
679
679
  hover: o = !1,
680
680
  // deprecated, use variant="interactive"
681
681
  onClick: a,
682
- href: n,
682
+ href: r,
683
683
  disabled: i = !1,
684
684
  ...l
685
685
  }) {
686
- const d = (o ? "interactive" : r) === "interactive" || a || n, f = [
686
+ const d = (o ? "interactive" : n) === "interactive" || a || r, f = [
687
687
  "ds-card",
688
688
  `ds-card--${t}`,
689
689
  d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
- if (n) {
691
+ if (r) {
692
692
  const u = (b) => {
693
693
  if (i) {
694
694
  b.preventDefault();
@@ -700,7 +700,7 @@ function Ks({
700
700
  "a",
701
701
  {
702
702
  className: f,
703
- href: i ? void 0 : n,
703
+ href: i ? void 0 : r,
704
704
  onClick: u,
705
705
  "aria-disabled": i ? "true" : void 0,
706
706
  ...l,
@@ -736,28 +736,28 @@ function Js({ children: s, ...t }) {
736
736
  function Zs({ children: s, ...t }) {
737
737
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
738
738
  }
739
- function Qs({ children: s, secondary: t = !1, ...r }) {
740
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
739
+ function Qs({ children: s, secondary: t = !1, ...n }) {
740
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...n, children: s });
741
741
  }
742
- function ds({ children: s, secondary: t = !1, ...r }) {
743
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...r, children: s });
742
+ function ds({ children: s, secondary: t = !1, ...n }) {
743
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...n, children: s });
744
744
  }
745
- function Fe({ children: s, secondary: t = !1, ...r }) {
746
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
745
+ function Fe({ children: s, secondary: t = !1, ...n }) {
746
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...n, children: s });
747
747
  }
748
748
  function de({
749
749
  children: s,
750
750
  variant: t = "default",
751
- size: r = "m",
751
+ size: n = "m",
752
752
  role: o,
753
753
  ...a
754
754
  }) {
755
- const n = [
755
+ const r = [
756
756
  "ds-badge",
757
757
  `ds-badge--${t}`,
758
- `ds-badge--${r}`
758
+ `ds-badge--${n}`
759
759
  ].filter(Boolean).join(" "), i = o || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
760
- return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...a, children: s });
760
+ return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...a, children: s });
761
761
  }
762
762
  const us = {
763
763
  info: Ee,
@@ -768,16 +768,16 @@ const us = {
768
768
  function et({
769
769
  children: s,
770
770
  variant: t = "info",
771
- title: r,
771
+ title: n,
772
772
  onClose: o,
773
773
  role: a,
774
- ...n
774
+ ...r
775
775
  }) {
776
776
  const i = us[t], l = a || (t === "error" ? "alert" : "status");
777
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${r ? "" : "ds-alert--no-title"}`, role: l, ...n, children: [
778
- i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: I[3], strokeWidth: 1.5 }) }),
777
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
778
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
779
779
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
780
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
780
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: n }),
781
781
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
782
782
  ] }),
783
783
  o && /* @__PURE__ */ e.jsx(
@@ -787,7 +787,7 @@ function et({
787
787
  className: "ds-alert__close",
788
788
  onClick: o,
789
789
  "aria-label": "Close alert",
790
- children: /* @__PURE__ */ e.jsx(te, { size: I[3], strokeWidth: 1.5 })
790
+ children: /* @__PURE__ */ e.jsx(te, { size: A[3], strokeWidth: 1.5 })
791
791
  }
792
792
  )
793
793
  ] });
@@ -796,28 +796,30 @@ const fs = 200;
796
796
  function st({
797
797
  children: s,
798
798
  title: t,
799
- onClose: r,
799
+ onClose: n,
800
800
  size: o = "m",
801
801
  scrollable: a = !1,
802
- subHeader: n,
802
+ subHeader: r,
803
803
  ...i
804
804
  }) {
805
- const l = k(null), m = U.useId(), [d, f] = D(!1), p = () => {
806
- !r || d || (f(!0), setTimeout(() => {
807
- f(!1), r();
805
+ const l = T(null), m = U.useId(), [d, f] = I(!1), p = () => {
806
+ !n || d || (f(!0), setTimeout(() => {
807
+ f(!1), n();
808
808
  }, fs));
809
809
  };
810
- B(() => {
811
- const j = (E) => {
812
- E.key === "Escape" && p();
813
- }, R = (E) => {
814
- l.current && !l.current.contains(E.target) && !E.target.closest("[data-ds-portal]") && p();
810
+ L(() => {
811
+ const _ = (g) => {
812
+ g.key === "Escape" && p();
813
+ }, y = (g) => {
814
+ var N, $, P;
815
+ const R = (($ = (N = g.composedPath) == null ? void 0 : N.call(g)) == null ? void 0 : $[0]) ?? g.target;
816
+ l.current && !l.current.contains(R) && !((P = R.closest) != null && P.call(R, "[data-ds-portal]")) && p();
815
817
  };
816
- return document.addEventListener("keydown", j), document.addEventListener("mousedown", R), () => {
817
- document.removeEventListener("keydown", j), document.removeEventListener("mousedown", R);
818
+ return document.addEventListener("keydown", _), document.addEventListener("mousedown", y), () => {
819
+ document.removeEventListener("keydown", _), document.removeEventListener("mousedown", y);
818
820
  };
819
- }, [r, d]);
820
- const h = U.Children.toArray(s), u = h.find((j) => (j == null ? void 0 : j.type) === he), b = h.filter((j) => (j == null ? void 0 : j.type) !== he);
821
+ }, [n, d]);
822
+ const h = U.Children.toArray(s), u = h.find((_) => (_ == null ? void 0 : _.type) === he), b = h.filter((_) => (_ == null ? void 0 : _.type) !== he);
821
823
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
822
824
  "div",
823
825
  {
@@ -827,21 +829,20 @@ function st({
827
829
  "aria-modal": "true",
828
830
  "aria-labelledby": t ? m : void 0,
829
831
  children: [
830
- (t || r || n) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
831
- (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header-row", children: [
832
- t && /* @__PURE__ */ e.jsx("h3", { id: m, className: "ds-modal__title", children: t }),
833
- r && /* @__PURE__ */ e.jsx(
834
- ce,
835
- {
836
- variant: "ghost",
837
- size: "small",
838
- icon: /* @__PURE__ */ e.jsx(te, { size: I[2], strokeWidth: 1.5 }),
839
- onClick: p,
840
- "aria-label": "Close modal"
841
- }
842
- )
843
- ] }),
844
- n && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: n })
832
+ n && /* @__PURE__ */ e.jsx(
833
+ ce,
834
+ {
835
+ className: "ds-modal__close",
836
+ variant: "ghost",
837
+ size: "small",
838
+ icon: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }),
839
+ onClick: p,
840
+ "aria-label": "Close modal"
841
+ }
842
+ ),
843
+ (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
844
+ t && /* @__PURE__ */ e.jsx("h3", { id: m, className: "ds-modal__title", children: t }),
845
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
845
846
  ] }),
846
847
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: b }),
847
848
  u
@@ -856,25 +857,27 @@ const ms = 320;
856
857
  function tt({
857
858
  children: s,
858
859
  title: t,
859
- onClose: r,
860
+ onClose: n,
860
861
  subHeader: o,
861
862
  ...a
862
863
  }) {
863
- const n = k(null), i = U.useId(), [l, m] = D(!1), d = () => {
864
- !r || l || (m(!0), setTimeout(() => {
865
- m(!1), r();
864
+ const r = T(null), i = U.useId(), [l, m] = I(!1), d = () => {
865
+ !n || l || (m(!0), setTimeout(() => {
866
+ m(!1), n();
866
867
  }, ms));
867
868
  };
868
- B(() => {
869
- const u = (j) => {
870
- j.key === "Escape" && d();
871
- }, b = (j) => {
872
- n.current && !n.current.contains(j.target) && !j.target.closest("[data-ds-portal]") && d();
869
+ L(() => {
870
+ const u = (_) => {
871
+ _.key === "Escape" && d();
872
+ }, b = (_) => {
873
+ var g, R, N;
874
+ const y = ((R = (g = _.composedPath) == null ? void 0 : g.call(_)) == null ? void 0 : R[0]) ?? _.target;
875
+ r.current && !r.current.contains(y) && !((N = y.closest) != null && N.call(y, "[data-ds-portal]")) && d();
873
876
  };
874
877
  return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
875
878
  document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
876
879
  };
877
- }, [r, l]);
880
+ }, [n, l]);
878
881
  const f = U.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === he), h = f.filter((u) => (u == null ? void 0 : u.type) !== he);
879
882
  return /* @__PURE__ */ e.jsx(
880
883
  "div",
@@ -884,27 +887,26 @@ function tt({
884
887
  children: /* @__PURE__ */ e.jsxs(
885
888
  "div",
886
889
  {
887
- ref: n,
890
+ ref: r,
888
891
  className: ["ds-bottom-sheet", l && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
889
892
  role: "dialog",
890
893
  "aria-modal": "true",
891
894
  "aria-labelledby": t ? i : void 0,
892
895
  children: [
893
896
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__handle", "aria-hidden": "true" }),
894
- (t || r || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
895
- (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header-row", children: [
896
- t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: t }),
897
- r && /* @__PURE__ */ e.jsx(
898
- ce,
899
- {
900
- variant: "ghost",
901
- size: "small",
902
- icon: /* @__PURE__ */ e.jsx(te, { size: I[2], strokeWidth: 1.5 }),
903
- onClick: d,
904
- "aria-label": "Close"
905
- }
906
- )
907
- ] }),
897
+ n && /* @__PURE__ */ e.jsx(
898
+ ce,
899
+ {
900
+ className: "ds-bottom-sheet__close",
901
+ variant: "ghost",
902
+ size: "small",
903
+ icon: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }),
904
+ onClick: d,
905
+ "aria-label": "Close"
906
+ }
907
+ ),
908
+ (t || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
909
+ t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: t }),
908
910
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: o })
909
911
  ] }),
910
912
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: h }),
@@ -918,18 +920,18 @@ function tt({
918
920
  function ps({
919
921
  children: s,
920
922
  title: t = "Code",
921
- defaultExpanded: r = !1,
923
+ defaultExpanded: n = !1,
922
924
  expanded: o,
923
925
  onToggle: a,
924
- padding: n = "s",
926
+ padding: r = "s",
925
927
  className: i = "",
926
928
  ...l
927
929
  }) {
928
- const [m, d] = D(r), f = o !== void 0, p = f ? o : m, h = () => {
930
+ const [m, d] = I(n), f = o !== void 0, p = f ? o : m, h = () => {
929
931
  f ? a == null || a(!o) : d((b) => !b);
930
932
  }, u = [
931
933
  "ds-code-accordion",
932
- `ds-code-accordion--${n}`,
934
+ `ds-code-accordion--${r}`,
933
935
  p && "ds-code-accordion--expanded",
934
936
  i
935
937
  ].filter(Boolean).join(" ");
@@ -946,7 +948,7 @@ function ps({
946
948
  /* @__PURE__ */ e.jsx(
947
949
  xe,
948
950
  {
949
- size: I[2],
951
+ size: A[2],
950
952
  strokeWidth: 1.5,
951
953
  className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
952
954
  }
@@ -957,28 +959,28 @@ function ps({
957
959
  /* @__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: s }) }) }) })
958
960
  ] });
959
961
  }
960
- function rt({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
961
- return t ? r ? /* @__PURE__ */ e.jsx(ps, { title: o, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
962
+ function nt({ children: s, block: t = !1, collapsible: n = !1, title: o = "Code", defaultExpanded: a = !1, ...r }) {
963
+ return t ? n ? /* @__PURE__ */ e.jsx(ps, { title: o, defaultExpanded: a, ...r, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: s });
962
964
  }
963
- function nt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
965
+ function rt({ href: s, children: t, onClick: n, target: o, rel: a, ...r }) {
964
966
  const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
965
967
  return /* @__PURE__ */ e.jsx(
966
968
  "a",
967
969
  {
968
970
  href: s,
969
971
  className: "ds-link",
970
- onClick: r,
972
+ onClick: n,
971
973
  target: o,
972
974
  rel: l,
973
- ...n,
975
+ ...r,
974
976
  children: t
975
977
  }
976
978
  );
977
979
  }
978
- function at({ children: s, size: t = "m", variant: r = "ghost", ...o }) {
979
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: U.Children.map(s, (a) => U.isValidElement(a) ? U.cloneElement(a, { size: t, variant: r }) : a) });
980
+ function at({ children: s, size: t = "m", variant: n = "ghost", ...o }) {
981
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: U.Children.map(s, (a) => U.isValidElement(a) ? U.cloneElement(a, { size: t, variant: n }) : a) });
980
982
  }
981
- function ot({ children: s, selected: t = !1, onClick: r, size: o = "m", variant: a = "ghost", disabled: n = !1, icon: i, href: l, ...m }) {
983
+ function ot({ children: s, selected: t = !1, onClick: n, size: o = "m", variant: a = "ghost", disabled: r = !1, icon: i, href: l, ...m }) {
982
984
  const d = i && !s, f = [
983
985
  "ds-tab",
984
986
  `ds-tab--${o}`,
@@ -991,20 +993,20 @@ function ot({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
991
993
  ] });
992
994
  if (l) {
993
995
  const h = (u) => {
994
- if (n) {
996
+ if (r) {
995
997
  u.preventDefault();
996
998
  return;
997
999
  }
998
- u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), r == null || r(u));
1000
+ u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), n == null || n(u));
999
1001
  };
1000
1002
  return /* @__PURE__ */ e.jsx(
1001
1003
  "a",
1002
1004
  {
1003
1005
  role: "tab",
1004
1006
  "aria-current": t ? "page" : void 0,
1005
- "aria-disabled": n ? "true" : void 0,
1007
+ "aria-disabled": r ? "true" : void 0,
1006
1008
  className: f,
1007
- href: n ? void 0 : l,
1009
+ href: r ? void 0 : l,
1008
1010
  onClick: h,
1009
1011
  ...m,
1010
1012
  children: p
@@ -1017,36 +1019,36 @@ function ot({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
1017
1019
  role: "tab",
1018
1020
  "aria-selected": t,
1019
1021
  className: f,
1020
- onClick: r,
1021
- disabled: n,
1022
+ onClick: n,
1023
+ disabled: r,
1022
1024
  ...m,
1023
1025
  children: p
1024
1026
  }
1025
1027
  );
1026
1028
  }
1027
- function it({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
1028
- const n = k(null), i = k(null), [l, m] = D(!1), d = k(!1), f = k(null), p = k(null), h = () => {
1029
- if (!n.current) return;
1030
- const u = n.current.querySelector(`[data-value="${t}"]`);
1029
+ function it({ options: s, value: t, onChange: n, size: o = "m", disabled: a = !1 }) {
1030
+ const r = T(null), i = T(null), [l, m] = I(!1), d = T(!1), f = T(null), p = T(null), h = () => {
1031
+ if (!r.current) return;
1032
+ const u = r.current.querySelector(`[data-value="${t}"]`);
1031
1033
  if (!u) return;
1032
- const b = n.current.getBoundingClientRect(), j = u.getBoundingClientRect(), R = j.left - b.left, E = j.width;
1033
- i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = R + "px", i.current.style.width = E + "px", d.current = !1) : (m(!0), requestAnimationFrame(() => {
1034
- if (!i.current || !n.current) return;
1035
- const L = n.current.querySelector(`[data-value="${t}"]`);
1036
- if (!L) return;
1037
- const y = n.current.getBoundingClientRect(), T = L.getBoundingClientRect();
1038
- i.current.style.transition = "none", i.current.style.left = T.left - y.left + "px", i.current.style.width = T.width + "px";
1034
+ const b = r.current.getBoundingClientRect(), _ = u.getBoundingClientRect(), y = _.left - b.left, g = _.width;
1035
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = y + "px", i.current.style.width = g + "px", d.current = !1) : (m(!0), requestAnimationFrame(() => {
1036
+ if (!i.current || !r.current) return;
1037
+ const R = r.current.querySelector(`[data-value="${t}"]`);
1038
+ if (!R) return;
1039
+ const N = r.current.getBoundingClientRect(), $ = R.getBoundingClientRect();
1040
+ i.current.style.transition = "none", i.current.style.left = $.left - N.left + "px", i.current.style.width = $.width + "px";
1039
1041
  }));
1040
1042
  };
1041
1043
  return p.current = h, Ve(() => {
1042
1044
  const u = f.current !== t;
1043
1045
  f.current = t, d.current = l && u, h();
1044
- }), B(() => {
1045
- if (!n.current) return;
1046
+ }), L(() => {
1047
+ if (!r.current) return;
1046
1048
  const u = new ResizeObserver(() => {
1047
1049
  d.current = !1, p.current();
1048
1050
  });
1049
- return u.observe(n.current), () => u.disconnect();
1051
+ return u.observe(r.current), () => u.disconnect();
1050
1052
  }, []), /* @__PURE__ */ e.jsxs(
1051
1053
  "div",
1052
1054
  {
@@ -1055,7 +1057,7 @@ function it({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
1055
1057
  `ds-seg--${o}`,
1056
1058
  a && "ds-seg--disabled"
1057
1059
  ].filter(Boolean).join(" "),
1058
- ref: n,
1060
+ ref: r,
1059
1061
  role: "group",
1060
1062
  children: [
1061
1063
  l && /* @__PURE__ */ e.jsx(
@@ -1072,7 +1074,7 @@ function it({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
1072
1074
  type: "button",
1073
1075
  "data-value": u.value,
1074
1076
  className: ["ds-seg__btn", t === u.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1075
- onClick: () => !a && r(u.value),
1077
+ onClick: () => !a && n(u.value),
1076
1078
  "aria-pressed": t === u.value,
1077
1079
  disabled: a,
1078
1080
  children: [
@@ -1089,17 +1091,17 @@ function it({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
1089
1091
  function $e({
1090
1092
  children: s,
1091
1093
  title: t,
1092
- defaultExpanded: r = !1,
1094
+ defaultExpanded: n = !1,
1093
1095
  expanded: o,
1094
1096
  onToggle: a,
1095
- padding: n = "m",
1097
+ padding: r = "m",
1096
1098
  ...i
1097
1099
  }) {
1098
- const [l, m] = D(r), d = o !== void 0, f = d ? o : l, p = () => {
1100
+ const [l, m] = I(n), d = o !== void 0, f = d ? o : l, p = () => {
1099
1101
  d ? a == null || a(!o) : m((u) => !u);
1100
1102
  }, h = [
1101
1103
  "ds-accordion",
1102
- `ds-accordion--${n}`,
1104
+ `ds-accordion--${r}`,
1103
1105
  f && "ds-accordion--expanded"
1104
1106
  ].filter(Boolean).join(" ");
1105
1107
  return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
@@ -1115,7 +1117,7 @@ function $e({
1115
1117
  /* @__PURE__ */ e.jsx(
1116
1118
  xe,
1117
1119
  {
1118
- size: I[2],
1120
+ size: A[2],
1119
1121
  strokeWidth: 1.5,
1120
1122
  className: `ds-accordion__icon ${f ? "ds-accordion__icon--expanded" : ""}`
1121
1123
  }
@@ -1126,63 +1128,63 @@ function $e({
1126
1128
  /* @__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 }) }) })
1127
1129
  ] });
1128
1130
  }
1129
- const ne = 8, le = 8;
1130
- function hs(s, t, r) {
1131
+ const re = 8, le = 8;
1132
+ function hs(s, t, n) {
1131
1133
  const o = window.innerWidth;
1132
- let a, n;
1134
+ let a, r;
1133
1135
  switch (s) {
1134
1136
  case "top":
1135
- a = t.top - r.height - ne, n = t.left + t.width / 2 - r.width / 2;
1137
+ a = t.top - n.height - re, r = t.left + t.width / 2 - n.width / 2;
1136
1138
  break;
1137
1139
  case "bottom":
1138
- a = t.bottom + ne, n = t.left + t.width / 2 - r.width / 2;
1140
+ a = t.bottom + re, r = t.left + t.width / 2 - n.width / 2;
1139
1141
  break;
1140
1142
  case "left":
1141
- a = t.top + t.height / 2 - r.height / 2, n = t.left - r.width - ne;
1143
+ a = t.top + t.height / 2 - n.height / 2, r = t.left - n.width - re;
1142
1144
  break;
1143
1145
  case "right":
1144
- a = t.top + t.height / 2 - r.height / 2, n = t.right + ne;
1146
+ a = t.top + t.height / 2 - n.height / 2, r = t.right + re;
1145
1147
  break;
1146
1148
  default:
1147
- a = t.bottom + ne, n = t.left;
1149
+ a = t.bottom + re, r = t.left;
1148
1150
  }
1149
- const i = Math.max(le, Math.min(o - r.width - le, n)), l = n - i;
1151
+ const i = Math.max(le, Math.min(o - n.width - le, r)), l = r - i;
1150
1152
  return { top: a, left: i, arrowOffset: l };
1151
1153
  }
1152
- function xs(s, t, r) {
1154
+ function xs(s, t, n) {
1153
1155
  const o = window.innerWidth, a = window.innerHeight;
1154
- if (s.top >= t + ne + le) return "top";
1155
- if (a - s.bottom >= t + ne + le) return "bottom";
1156
- if (o - s.right >= r + ne + le) return "right";
1157
- if (s.left >= r + ne + le) return "left";
1158
- const n = Math.max(s.top, a - s.bottom, s.left, o - s.right);
1159
- return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === o - s.right ? "right" : "left";
1160
- }
1161
- function lt({ children: s, content: t, position: r, ...o }) {
1162
- const [a, n] = D(!1), [i, l] = D({ visibility: "hidden" }), [m, d] = D(r || "top"), f = k(null), p = k(null), h = k(!1), u = () => {
1156
+ if (s.top >= t + re + le) return "top";
1157
+ if (a - s.bottom >= t + re + le) return "bottom";
1158
+ if (o - s.right >= n + re + le) return "right";
1159
+ if (s.left >= n + re + le) return "left";
1160
+ const r = Math.max(s.top, a - s.bottom, s.left, o - s.right);
1161
+ return r === s.top ? "top" : r === a - s.bottom ? "bottom" : r === o - s.right ? "right" : "left";
1162
+ }
1163
+ function lt({ children: s, content: t, position: n, ...o }) {
1164
+ const [a, r] = I(!1), [i, l] = I({ visibility: "hidden" }), [m, d] = I(n || "top"), f = T(null), p = T(null), h = T(!1), u = () => {
1163
1165
  if (!f.current || !p.current) return;
1164
- const j = f.current.getBoundingClientRect(), R = p.current.getBoundingClientRect(), E = r || xs(j, R.height, R.width), { top: L, left: y, arrowOffset: T } = hs(E, j, R);
1165
- d(E), l({
1166
+ const _ = f.current.getBoundingClientRect(), y = p.current.getBoundingClientRect(), g = n || xs(_, y.height, y.width), { top: R, left: N, arrowOffset: $ } = hs(g, _, y);
1167
+ d(g), l({
1166
1168
  position: "fixed",
1167
- top: L,
1168
- left: y,
1169
+ top: R,
1170
+ left: N,
1169
1171
  visibility: "visible",
1170
- "--arrow-offset": `${T}px`
1172
+ "--arrow-offset": `${$}px`
1171
1173
  });
1172
1174
  };
1173
- if (B(() => {
1175
+ if (L(() => {
1174
1176
  if (!a) return;
1175
1177
  l({ position: "fixed", visibility: "hidden" });
1176
- const j = requestAnimationFrame(u);
1178
+ const _ = requestAnimationFrame(u);
1177
1179
  return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1178
- cancelAnimationFrame(j), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1180
+ cancelAnimationFrame(_), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1179
1181
  };
1180
- }, [a, r]), B(() => {
1182
+ }, [a, n]), L(() => {
1181
1183
  if (!a) return;
1182
- const j = (R) => {
1183
- f.current && !f.current.contains(R.target) && n(!1);
1184
+ const _ = (y) => {
1185
+ f.current && !f.current.contains(y.target) && r(!1);
1184
1186
  };
1185
- return document.addEventListener("touchstart", j), () => document.removeEventListener("touchstart", j);
1187
+ return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
1186
1188
  }, [a]), !t) return s;
1187
1189
  const b = a && /* @__PURE__ */ e.jsx(
1188
1190
  "div",
@@ -1201,13 +1203,13 @@ function lt({ children: s, content: t, position: r, ...o }) {
1201
1203
  ref: f,
1202
1204
  className: "ds-tooltip-wrapper",
1203
1205
  onMouseEnter: () => {
1204
- h.current || n(!0);
1206
+ h.current || r(!0);
1205
1207
  },
1206
1208
  onMouseLeave: () => {
1207
- h.current || n(!1);
1209
+ h.current || r(!1);
1208
1210
  },
1209
1211
  onTouchStart: () => {
1210
- h.current = !0, n((j) => !j);
1212
+ h.current = !0, r((_) => !_);
1211
1213
  },
1212
1214
  ...o,
1213
1215
  children: [
@@ -1220,15 +1222,15 @@ function lt({ children: s, content: t, position: r, ...o }) {
1220
1222
  function ct({
1221
1223
  checked: s = !1,
1222
1224
  onChange: t,
1223
- size: r = "m",
1225
+ size: n = "m",
1224
1226
  disabled: o = !1,
1225
1227
  label: a,
1226
- id: n,
1228
+ id: r,
1227
1229
  ...i
1228
1230
  }) {
1229
- const l = n || `toggle-${U.useId()}`, m = [
1231
+ const l = r || `toggle-${U.useId()}`, m = [
1230
1232
  "ds-toggle",
1231
- `ds-toggle--${r}`,
1233
+ `ds-toggle--${n}`,
1232
1234
  o && "ds-toggle--disabled"
1233
1235
  ].filter(Boolean).join(" ");
1234
1236
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
@@ -1251,17 +1253,17 @@ function ct({
1251
1253
  function dt({
1252
1254
  checked: s = !1,
1253
1255
  onChange: t,
1254
- size: r = "m",
1256
+ size: n = "m",
1255
1257
  disabled: o = !1,
1256
1258
  label: a,
1257
- id: n,
1259
+ id: r,
1258
1260
  ...i
1259
1261
  }) {
1260
- const l = n || `checkbox-${U.useId()}`, m = [
1262
+ const l = r || `checkbox-${U.useId()}`, m = [
1261
1263
  "ds-checkbox",
1262
- `ds-checkbox--${r}`,
1264
+ `ds-checkbox--${n}`,
1263
1265
  o && "ds-checkbox--disabled"
1264
- ].filter(Boolean).join(" "), d = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
1266
+ ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
1267
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1266
1268
  /* @__PURE__ */ e.jsx(
1267
1269
  "input",
@@ -1289,17 +1291,17 @@ function dt({
1289
1291
  function ut({
1290
1292
  checked: s = !1,
1291
1293
  onChange: t,
1292
- size: r = "m",
1294
+ size: n = "m",
1293
1295
  disabled: o = !1,
1294
1296
  label: a,
1295
- name: n,
1297
+ name: r,
1296
1298
  value: i,
1297
1299
  id: l,
1298
1300
  ...m
1299
1301
  }) {
1300
1302
  const d = l || `radio-${U.useId()}`, f = [
1301
1303
  "ds-radio",
1302
- `ds-radio--${r}`,
1304
+ `ds-radio--${n}`,
1303
1305
  o && "ds-radio--disabled"
1304
1306
  ].filter(Boolean).join(" ");
1305
1307
  return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: d, children: [
@@ -1312,7 +1314,7 @@ function ut({
1312
1314
  checked: s,
1313
1315
  onChange: (p) => t == null ? void 0 : t(p.target.checked),
1314
1316
  disabled: o,
1315
- name: n,
1317
+ name: r,
1316
1318
  value: i,
1317
1319
  ...m
1318
1320
  }
@@ -1321,25 +1323,25 @@ function ut({
1321
1323
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1322
1324
  ] });
1323
1325
  }
1324
- function bs({ width: s, height: t, shape: r = "rect", aspectRatio: o, className: a = "", style: n = {}, ...i }) {
1326
+ function bs({ width: s, height: t, shape: n = "rect", aspectRatio: o, className: a = "", style: r = {}, ...i }) {
1325
1327
  return /* @__PURE__ */ e.jsx(
1326
1328
  "span",
1327
1329
  {
1328
- className: ["ds-skeleton", `ds-skeleton--${r}`, a].filter(Boolean).join(" "),
1329
- style: { width: s, height: t, aspectRatio: o, ...n },
1330
+ className: ["ds-skeleton", `ds-skeleton--${n}`, a].filter(Boolean).join(" "),
1331
+ style: { width: s, height: t, aspectRatio: o, ...r },
1330
1332
  "aria-hidden": "true",
1331
1333
  ...i
1332
1334
  }
1333
1335
  );
1334
1336
  }
1335
- function js({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "", style: a = {}, ...n }) {
1337
+ function _s({ lines: s = 1, lastLineWidth: t = "70%", gap: n, className: o = "", style: a = {}, ...r }) {
1336
1338
  return /* @__PURE__ */ e.jsx(
1337
1339
  "span",
1338
1340
  {
1339
1341
  className: ["ds-skeleton-text", o].filter(Boolean).join(" "),
1340
- style: { gap: r, ...a },
1342
+ style: { gap: n, ...a },
1341
1343
  "aria-hidden": "true",
1342
- ...n,
1344
+ ...r,
1343
1345
  children: Array.from({ length: s }, (i, l) => /* @__PURE__ */ e.jsx(
1344
1346
  "span",
1345
1347
  {
@@ -1351,11 +1353,11 @@ function js({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "",
1351
1353
  }
1352
1354
  );
1353
1355
  }
1354
- bs.Text = js;
1355
- function _s(s) {
1356
+ bs.Text = _s;
1357
+ function js(s) {
1356
1358
  let t = 2166136261;
1357
- for (let r = 0; r < s.length; r++)
1358
- t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
1359
+ for (let n = 0; n < s.length; n++)
1360
+ t ^= s.charCodeAt(n), t = Math.imul(t, 16777619) >>> 0;
1359
1361
  return t % 360;
1360
1362
  }
1361
1363
  function vs(s) {
@@ -1363,32 +1365,32 @@ function vs(s) {
1363
1365
  const t = s.trim().split(/\s+/);
1364
1366
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1365
1367
  }
1366
- function ft({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style: n = {}, ...i }) {
1367
- const l = _s(s ?? ""), [m, d] = D(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: vs(s) });
1368
+ function ft({ seed: s, icon: t, src: n, size: o = 32, className: a = "", style: r = {}, ...i }) {
1369
+ const l = js(s ?? ""), [m, d] = I(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: vs(s) });
1368
1370
  return /* @__PURE__ */ e.jsx(
1369
1371
  "div",
1370
1372
  {
1371
1373
  className: ["ds-avatar", a].filter(Boolean).join(" "),
1372
- style: { width: o, height: o, "--ds-avatar-h": l, ...n },
1374
+ style: { width: o, height: o, "--ds-avatar-h": l, ...r },
1373
1375
  "aria-hidden": "true",
1374
1376
  ...i,
1375
- children: r && !m ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => d(!0) }) : f
1377
+ children: n && !m ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : f
1376
1378
  }
1377
1379
  );
1378
1380
  }
1379
1381
  function mt({
1380
1382
  children: s,
1381
1383
  size: t = "compact",
1382
- stickyTop: r,
1384
+ stickyTop: n,
1383
1385
  maxHeight: o,
1384
1386
  className: a = "",
1385
- style: n = {},
1387
+ style: r = {},
1386
1388
  ...i
1387
1389
  }) {
1388
1390
  const l = {
1389
1391
  ...o ? { maxHeight: o } : {},
1390
- ...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
1391
- ...n
1392
+ ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1393
+ ...r
1392
1394
  };
1393
1395
  return /* @__PURE__ */ e.jsx(
1394
1396
  "div",
@@ -1412,17 +1414,17 @@ function pt({ children: s, ...t }) {
1412
1414
  function ht({ children: s, ...t }) {
1413
1415
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1414
1416
  }
1415
- function xt({ children: s, interactive: t, selected: r, subheader: o, exiting: a, updated: n, className: i = "", onClick: l, ...m }) {
1417
+ function xt({ children: s, interactive: t, selected: n, subheader: o, exiting: a, updated: r, className: i = "", onClick: l, ...m }) {
1416
1418
  return /* @__PURE__ */ e.jsx(
1417
1419
  "tr",
1418
1420
  {
1419
1421
  className: [
1420
1422
  "ds-table-row",
1421
1423
  t || l ? "ds-table-row--interactive" : "",
1422
- r ? "ds-table-row--selected" : "",
1424
+ n ? "ds-table-row--selected" : "",
1423
1425
  o ? "ds-table-row--subheader" : "",
1424
1426
  a ? "ds-table-row--exiting" : "",
1425
- n ? "ds-table-row--updated" : "",
1427
+ r ? "ds-table-row--updated" : "",
1426
1428
  i
1427
1429
  ].filter(Boolean).join(" "),
1428
1430
  onClick: l,
@@ -1431,20 +1433,20 @@ function xt({ children: s, interactive: t, selected: r, subheader: o, exiting: a
1431
1433
  }
1432
1434
  );
1433
1435
  }
1434
- function bt({ children: s, colSpan: t = 999, ...r }) {
1435
- return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1436
+ function bt({ children: s, colSpan: t = 999, ...n }) {
1437
+ return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1436
1438
  }
1437
- function jt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, className: n = "", style: i = {}, ...l }) {
1438
- const m = !!o || r !== void 0, d = r === "asc" ? He : r === "desc" ? xe : Ke;
1439
+ function _t({ children: s, align: t = "left", sortDir: n, onSort: o, width: a, className: r = "", style: i = {}, ...l }) {
1440
+ const m = !!o || n !== void 0, d = n === "asc" ? He : n === "desc" ? xe : Ke;
1439
1441
  return /* @__PURE__ */ e.jsx(
1440
1442
  "th",
1441
1443
  {
1442
1444
  className: [
1443
1445
  "ds-th",
1444
1446
  m ? "ds-th--sortable" : "",
1445
- r ? "ds-th--sorted" : "",
1447
+ n ? "ds-th--sorted" : "",
1446
1448
  t !== "left" ? `ds-table-cell--${t}` : "",
1447
- n
1449
+ r
1448
1450
  ].filter(Boolean).join(" "),
1449
1451
  onClick: o,
1450
1452
  style: { width: a, ...i },
@@ -1456,17 +1458,17 @@ function jt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, c
1456
1458
  }
1457
1459
  );
1458
1460
  }
1459
- function _t({ children: s, align: t = "left", secondary: r, muted: o, truncate: a, nowrap: n, className: i = "", ...l }) {
1461
+ function jt({ children: s, align: t = "left", secondary: n, muted: o, truncate: a, nowrap: r, className: i = "", ...l }) {
1460
1462
  return /* @__PURE__ */ e.jsx(
1461
1463
  "td",
1462
1464
  {
1463
1465
  className: [
1464
1466
  "ds-td",
1465
1467
  t !== "left" ? `ds-table-cell--${t}` : "",
1466
- r ? "ds-table-cell--secondary" : "",
1468
+ n ? "ds-table-cell--secondary" : "",
1467
1469
  o ? "ds-table-cell--muted" : "",
1468
1470
  a ? "ds-table-cell--truncate" : "",
1469
- n ? "ds-table-cell--nowrap" : "",
1471
+ r ? "ds-table-cell--nowrap" : "",
1470
1472
  i
1471
1473
  ].filter(Boolean).join(" "),
1472
1474
  ...l,
@@ -1477,21 +1479,21 @@ function _t({ children: s, align: t = "left", secondary: r, muted: o, truncate:
1477
1479
  function vt({
1478
1480
  icon: s,
1479
1481
  title: t,
1480
- description: r,
1482
+ description: n,
1481
1483
  action: o,
1482
1484
  size: a = "m",
1483
- className: n = "",
1485
+ className: r = "",
1484
1486
  ...i
1485
1487
  }) {
1486
1488
  return /* @__PURE__ */ e.jsxs(
1487
1489
  "div",
1488
1490
  {
1489
- className: ["ds-empty-state", `ds-empty-state--${a}`, n].filter(Boolean).join(" "),
1491
+ className: ["ds-empty-state", `ds-empty-state--${a}`, r].filter(Boolean).join(" "),
1490
1492
  ...i,
1491
1493
  children: [
1492
1494
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: s }),
1493
1495
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: t }),
1494
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: r }),
1496
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
1495
1497
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: o })
1496
1498
  ]
1497
1499
  }
@@ -1500,21 +1502,21 @@ function vt({
1500
1502
  function Nt({
1501
1503
  label: s,
1502
1504
  hint: t,
1503
- error: r,
1505
+ error: n,
1504
1506
  required: o = !1,
1505
1507
  disabled: a = !1,
1506
- htmlFor: n,
1508
+ htmlFor: r,
1507
1509
  children: i,
1508
1510
  className: l = "",
1509
1511
  style: m,
1510
1512
  ...d
1511
1513
  }) {
1512
- const f = U.useId(), p = n ?? f, h = `${p}-hint`, u = `${p}-error`;
1514
+ const f = U.useId(), p = r ?? f, h = `${p}-hint`, u = `${p}-error`;
1513
1515
  return /* @__PURE__ */ e.jsxs(
1514
1516
  "div",
1515
1517
  {
1516
1518
  className: `ds-field${l ? ` ${l}` : ""}`,
1517
- "data-state": r ? "error" : void 0,
1519
+ "data-state": n ? "error" : void 0,
1518
1520
  "data-required": o ? "" : void 0,
1519
1521
  "data-disabled": a ? "" : void 0,
1520
1522
  style: m,
@@ -1522,14 +1524,14 @@ function Nt({
1522
1524
  children: [
1523
1525
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: s }),
1524
1526
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1525
- t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1526
- r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: r })
1527
+ t && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1528
+ n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: n })
1527
1529
  ]
1528
1530
  }
1529
1531
  );
1530
1532
  }
1531
- function wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, className: n = "", style: i, ...l }) {
1532
- const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1533
+ function wt({ label: s, value: t, delta: n, size: o = "m", inline: a = !1, className: r = "", style: i, ...l }) {
1534
+ const m = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1533
1535
  return /* @__PURE__ */ e.jsxs(
1534
1536
  "div",
1535
1537
  {
@@ -1537,14 +1539,14 @@ function wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, class
1537
1539
  "ds-stat",
1538
1540
  `ds-stat--${o}`,
1539
1541
  a && "ds-stat--inline",
1540
- n
1542
+ r
1541
1543
  ].filter(Boolean).join(" "),
1542
1544
  style: i,
1543
1545
  ...l,
1544
1546
  children: [
1545
1547
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: s }),
1546
1548
  t != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: t }),
1547
- r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: r })
1549
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: n })
1548
1550
  ]
1549
1551
  }
1550
1552
  );
@@ -1552,19 +1554,19 @@ function wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, class
1552
1554
  function gt({
1553
1555
  children: s,
1554
1556
  separator: t = "/",
1555
- "aria-label": r = "Breadcrumb",
1557
+ "aria-label": n = "Breadcrumb",
1556
1558
  className: o = "",
1557
1559
  style: a,
1558
- ...n
1560
+ ...r
1559
1561
  }) {
1560
1562
  const i = U.Children.toArray(s).filter(Boolean);
1561
1563
  return /* @__PURE__ */ e.jsx(
1562
1564
  "nav",
1563
1565
  {
1564
1566
  className: `ds-breadcrumb${o ? ` ${o}` : ""}`,
1565
- "aria-label": r,
1567
+ "aria-label": n,
1566
1568
  style: a,
1567
- ...n,
1569
+ ...r,
1568
1570
  children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1569
1571
  l,
1570
1572
  m < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
@@ -1575,10 +1577,10 @@ function gt({
1575
1577
  function yt({
1576
1578
  page: s,
1577
1579
  total: t,
1578
- onChange: r,
1580
+ onChange: n,
1579
1581
  siblings: o = 1,
1580
1582
  "aria-label": a = "Pagination",
1581
- className: n = "",
1583
+ className: r = "",
1582
1584
  style: i,
1583
1585
  ...l
1584
1586
  }) {
@@ -1586,7 +1588,7 @@ function yt({
1586
1588
  return /* @__PURE__ */ e.jsxs(
1587
1589
  "nav",
1588
1590
  {
1589
- className: `ds-pagination${n ? ` ${n}` : ""}`,
1591
+ className: `ds-pagination${r ? ` ${r}` : ""}`,
1590
1592
  "aria-label": a,
1591
1593
  style: i,
1592
1594
  ...l,
@@ -1595,7 +1597,7 @@ function yt({
1595
1597
  "button",
1596
1598
  {
1597
1599
  className: "ds-pagination-arrow",
1598
- onClick: () => r == null ? void 0 : r(s - 1),
1600
+ onClick: () => n == null ? void 0 : n(s - 1),
1599
1601
  disabled: s <= 1,
1600
1602
  "aria-label": "Previous page",
1601
1603
  children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
@@ -1606,7 +1608,7 @@ function yt({
1606
1608
  "button",
1607
1609
  {
1608
1610
  className: `ds-pagination-page${d === s ? " ds-pagination-page--current" : ""}`,
1609
- onClick: () => d !== s && (r == null ? void 0 : r(d)),
1611
+ onClick: () => d !== s && (n == null ? void 0 : n(d)),
1610
1612
  "aria-current": d === s ? "page" : void 0,
1611
1613
  "aria-label": `Page ${d}`,
1612
1614
  children: d
@@ -1618,7 +1620,7 @@ function yt({
1618
1620
  "button",
1619
1621
  {
1620
1622
  className: "ds-pagination-arrow",
1621
- onClick: () => r == null ? void 0 : r(s + 1),
1623
+ onClick: () => n == null ? void 0 : n(s + 1),
1622
1624
  disabled: s >= t,
1623
1625
  "aria-label": "Next page",
1624
1626
  children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
@@ -1628,36 +1630,38 @@ function yt({
1628
1630
  }
1629
1631
  );
1630
1632
  }
1631
- function Ns(s, t, r) {
1633
+ function Ns(s, t, n) {
1632
1634
  if (t <= 7) return Array.from({ length: t }, (i, l) => l + 1);
1633
- const o = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
1634
- o > 2 && n.push("…");
1635
- for (let i = o; i <= a; i++) n.push(i);
1636
- return a < t - 1 && n.push("…"), n.push(t), n;
1635
+ const o = Math.max(2, s - n), a = Math.min(t - 1, s + n), r = [1];
1636
+ o > 2 && r.push("…");
1637
+ for (let i = o; i <= a; i++) r.push(i);
1638
+ return a < t - 1 && r.push("…"), r.push(t), r;
1637
1639
  }
1638
1640
  const ws = 200;
1639
1641
  function kt({
1640
1642
  children: s,
1641
1643
  title: t,
1642
- onClose: r,
1644
+ onClose: n,
1643
1645
  side: o = "right",
1644
1646
  ...a
1645
1647
  }) {
1646
- const n = k(null), i = U.useId(), [l, m] = D(!1), d = () => {
1647
- !r || l || (m(!0), setTimeout(() => {
1648
- m(!1), r();
1648
+ const r = T(null), i = U.useId(), [l, m] = I(!1), d = () => {
1649
+ !n || l || (m(!0), setTimeout(() => {
1650
+ m(!1), n();
1649
1651
  }, ws));
1650
1652
  };
1651
- B(() => {
1652
- const u = (j) => {
1653
- j.key === "Escape" && d();
1654
- }, b = (j) => {
1655
- n.current && !n.current.contains(j.target) && !j.target.closest("[data-ds-portal]") && d();
1653
+ L(() => {
1654
+ const u = (_) => {
1655
+ _.key === "Escape" && d();
1656
+ }, b = (_) => {
1657
+ var g, R, N;
1658
+ const y = ((R = (g = _.composedPath) == null ? void 0 : g.call(_)) == null ? void 0 : R[0]) ?? _.target;
1659
+ r.current && !r.current.contains(y) && !((N = y.closest) != null && N.call(y, "[data-ds-portal]")) && d();
1656
1660
  };
1657
1661
  return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
1658
1662
  document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
1659
1663
  };
1660
- }, [r, l]);
1664
+ }, [n, l]);
1661
1665
  const f = U.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);
1662
1666
  return /* @__PURE__ */ e.jsx(
1663
1667
  "div",
@@ -1669,14 +1673,14 @@ function kt({
1669
1673
  {
1670
1674
  className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
1671
1675
  "data-side": o,
1672
- ref: n,
1676
+ ref: r,
1673
1677
  role: "dialog",
1674
1678
  "aria-modal": "true",
1675
1679
  "aria-labelledby": t ? i : void 0,
1676
1680
  children: [
1677
1681
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1678
1682
  t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: t }),
1679
- r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(te, { size: I[2], strokeWidth: 1.5 }) })
1683
+ n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }) })
1680
1684
  ] }),
1681
1685
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
1682
1686
  p
@@ -1698,13 +1702,13 @@ const gs = {
1698
1702
  function Et({
1699
1703
  children: s,
1700
1704
  variant: t = "info",
1701
- action: r,
1705
+ action: n,
1702
1706
  onAction: o,
1703
1707
  onDismiss: a,
1704
- role: n,
1708
+ role: r,
1705
1709
  ...i
1706
1710
  }) {
1707
- const l = gs[t], m = n || (t === "error" ? "alert" : "status");
1711
+ const l = gs[t], m = r || (t === "error" ? "alert" : "status");
1708
1712
  return /* @__PURE__ */ e.jsxs(
1709
1713
  "div",
1710
1714
  {
@@ -1712,15 +1716,15 @@ function Et({
1712
1716
  role: m,
1713
1717
  ...i,
1714
1718
  children: [
1715
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: I[2], strokeWidth: 1.5 }) }),
1719
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: A[2], strokeWidth: 1.5 }) }),
1716
1720
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
1717
- r && /* @__PURE__ */ e.jsx(
1721
+ n && /* @__PURE__ */ e.jsx(
1718
1722
  "button",
1719
1723
  {
1720
1724
  type: "button",
1721
1725
  className: "ds-banner-action",
1722
1726
  onClick: o,
1723
- children: r
1727
+ children: n
1724
1728
  }
1725
1729
  ),
1726
1730
  a && /* @__PURE__ */ e.jsx(
@@ -1730,7 +1734,7 @@ function Et({
1730
1734
  className: "ds-banner-dismiss",
1731
1735
  onClick: a,
1732
1736
  "aria-label": "Dismiss",
1733
- children: /* @__PURE__ */ e.jsx(te, { size: I[2], strokeWidth: 1.5 })
1737
+ children: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 })
1734
1738
  }
1735
1739
  )
1736
1740
  ]
@@ -1740,103 +1744,103 @@ function Et({
1740
1744
  function $t({
1741
1745
  trigger: s,
1742
1746
  items: t = [],
1743
- open: r,
1747
+ open: n,
1744
1748
  onOpenChange: o,
1745
1749
  align: a = "left",
1746
- className: n = "",
1750
+ className: r = "",
1747
1751
  style: i,
1748
1752
  ...l
1749
1753
  }) {
1750
- const [m, d] = D(!1), [f, p] = D(!1), h = r !== void 0, u = h ? r : m, b = k(null), j = k(null), R = k(null), E = k(null), [L, y] = D({}), T = k(null), z = 150, A = () => {
1754
+ const [m, d] = I(!1), [f, p] = I(!1), h = n !== void 0, u = h ? n : m, b = T(null), _ = T(null), y = T(null), g = T(null), [R, N] = I({}), $ = T(null), P = 150, B = () => {
1751
1755
  if (h)
1752
1756
  o == null || o(!1);
1753
1757
  else {
1754
1758
  if (f) return;
1755
- p(!0), T.current = setTimeout(() => {
1759
+ p(!0), $.current = setTimeout(() => {
1756
1760
  d(!1), p(!1);
1757
- }, z);
1761
+ }, P);
1758
1762
  }
1759
1763
  }, q = () => {
1760
1764
  const x = !u;
1761
- h ? o == null || o(x) : x ? (clearTimeout(T.current), p(!1), d(!0)) : A();
1765
+ h ? o == null || o(x) : x ? (clearTimeout($.current), p(!1), d(!0)) : B();
1762
1766
  }, H = () => {
1763
- u || (h ? o == null || o(!0) : (clearTimeout(T.current), p(!1), d(!0)));
1767
+ u || (h ? o == null || o(!0) : (clearTimeout($.current), p(!1), d(!0)));
1764
1768
  };
1765
- B(() => () => clearTimeout(T.current), []), B(() => {
1769
+ L(() => () => clearTimeout($.current), []), L(() => {
1766
1770
  if (!u) return;
1767
- const x = 300, N = () => {
1771
+ const x = 300, w = () => {
1768
1772
  var G;
1769
- const $ = (G = b.current) == null ? void 0 : G.getBoundingClientRect();
1770
- if (!$) return;
1771
- const M = window.innerHeight - $.bottom, K = M < x + 8 && $.top > M;
1772
- y(
1773
- a === "right" ? K ? { bottom: window.innerHeight - $.top + 4, top: "auto", right: window.innerWidth - $.right } : { top: $.bottom + 4, bottom: "auto", right: window.innerWidth - $.right } : K ? { bottom: window.innerHeight - $.top + 4, top: "auto", left: $.left } : { top: $.bottom + 4, bottom: "auto", left: $.left }
1773
+ const S = (G = b.current) == null ? void 0 : G.getBoundingClientRect();
1774
+ if (!S) return;
1775
+ const M = window.innerHeight - S.bottom, K = M < x + 8 && S.top > M;
1776
+ N(
1777
+ a === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
1774
1778
  );
1775
1779
  };
1776
- return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
1777
- window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
1780
+ return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
1781
+ window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
1778
1782
  };
1779
1783
  }, [u, a]);
1780
1784
  const F = () => {
1781
- var N;
1782
- const x = (N = R.current) == null ? void 0 : N.querySelector(
1785
+ var w;
1786
+ const x = (w = y.current) == null ? void 0 : w.querySelector(
1783
1787
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1784
1788
  );
1785
1789
  x == null || x.focus();
1786
1790
  };
1787
- B(() => {
1791
+ L(() => {
1788
1792
  if (!u) return;
1789
- const x = ($) => {
1793
+ const x = (S) => {
1790
1794
  var M, K;
1791
- !((M = b.current) != null && M.contains($.target)) && !((K = j.current) != null && K.contains($.target)) && A();
1792
- }, N = ($) => {
1793
- $.key === "Escape" && (A(), F());
1795
+ !((M = b.current) != null && M.contains(S.target)) && !((K = _.current) != null && K.contains(S.target)) && B();
1796
+ }, w = (S) => {
1797
+ S.key === "Escape" && (B(), F());
1794
1798
  };
1795
- return document.addEventListener("mousedown", x), document.addEventListener("keydown", N), () => {
1796
- document.removeEventListener("mousedown", x), document.removeEventListener("keydown", N);
1799
+ return document.addEventListener("mousedown", x), document.addEventListener("keydown", w), () => {
1800
+ document.removeEventListener("mousedown", x), document.removeEventListener("keydown", w);
1797
1801
  };
1798
- }, [u]), B(() => {
1799
- if (!u || !E.current || !j.current) return;
1800
- const x = v(), N = E.current === "last" ? x[x.length - 1] : x[0];
1801
- N == null || N.focus(), E.current = null;
1802
+ }, [u]), L(() => {
1803
+ if (!u || !g.current || !_.current) return;
1804
+ const x = v(), w = g.current === "last" ? x[x.length - 1] : x[0];
1805
+ w == null || w.focus(), g.current = null;
1802
1806
  }, [u]);
1803
- const v = () => j.current ? [...j.current.querySelectorAll(
1807
+ const v = () => _.current ? [..._.current.querySelectorAll(
1804
1808
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1805
1809
  )] : [], C = (x) => {
1806
- var N, $;
1810
+ var w, S;
1807
1811
  if (x.key === "ArrowDown")
1808
- x.preventDefault(), u ? (N = v()[0]) == null || N.focus() : (E.current = "first", H());
1812
+ x.preventDefault(), u ? (w = v()[0]) == null || w.focus() : (g.current = "first", H());
1809
1813
  else if (x.key === "ArrowUp")
1810
1814
  if (x.preventDefault(), !u)
1811
- E.current = "last", H();
1815
+ g.current = "last", H();
1812
1816
  else {
1813
1817
  const M = v();
1814
- ($ = M[M.length - 1]) == null || $.focus();
1818
+ (S = M[M.length - 1]) == null || S.focus();
1815
1819
  }
1816
1820
  }, X = (x) => {
1817
- var M, K, G, g;
1818
- const N = v(), $ = N.findIndex((c) => c === document.activeElement);
1821
+ var M, K, G, E;
1822
+ const w = v(), S = w.findIndex((c) => c === document.activeElement);
1819
1823
  switch (x.key) {
1820
1824
  case "ArrowDown":
1821
- x.preventDefault(), (M = N[Math.min($ + 1, N.length - 1)]) == null || M.focus();
1825
+ x.preventDefault(), (M = w[Math.min(S + 1, w.length - 1)]) == null || M.focus();
1822
1826
  break;
1823
1827
  case "ArrowUp":
1824
- x.preventDefault(), $ <= 0 ? F() : (K = N[$ - 1]) == null || K.focus();
1828
+ x.preventDefault(), S <= 0 ? F() : (K = w[S - 1]) == null || K.focus();
1825
1829
  break;
1826
1830
  case "Home":
1827
- x.preventDefault(), (G = N[0]) == null || G.focus();
1831
+ x.preventDefault(), (G = w[0]) == null || G.focus();
1828
1832
  break;
1829
1833
  case "End":
1830
- x.preventDefault(), (g = N[N.length - 1]) == null || g.focus();
1834
+ x.preventDefault(), (E = w[w.length - 1]) == null || E.focus();
1831
1835
  break;
1832
1836
  case "Tab":
1833
- A();
1837
+ B();
1834
1838
  break;
1835
1839
  }
1836
1840
  }, V = u && /* @__PURE__ */ e.jsx(
1837
1841
  "div",
1838
1842
  {
1839
- ref: j,
1843
+ ref: _,
1840
1844
  role: "menu",
1841
1845
  "data-ds-portal": "",
1842
1846
  className: [
@@ -1844,17 +1848,17 @@ function $t({
1844
1848
  `ds-dropdown__menu--${a}`,
1845
1849
  f && "ds-dropdown__menu--closing"
1846
1850
  ].filter(Boolean).join(" "),
1847
- style: L,
1851
+ style: R,
1848
1852
  onKeyDown: X,
1849
- children: t.map((x, N) => {
1853
+ children: t.map((x, w) => {
1850
1854
  if (x.separator)
1851
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, N);
1855
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, w);
1852
1856
  if (x.type === "section")
1853
1857
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
1854
1858
  x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
1855
1859
  /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
1856
- ] }, N);
1857
- const $ = !!x.href, M = $ ? "a" : "button", K = $ ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1860
+ ] }, w);
1861
+ const S = !!x.href, M = S ? "a" : "button", K = S ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1858
1862
  return /* @__PURE__ */ e.jsxs(
1859
1863
  M,
1860
1864
  {
@@ -1866,7 +1870,7 @@ function $t({
1866
1870
  ...K,
1867
1871
  onClick: () => {
1868
1872
  var G;
1869
- (G = x.onClick) == null || G.call(x), A();
1873
+ (G = x.onClick) == null || G.call(x), B();
1870
1874
  },
1871
1875
  children: [
1872
1876
  x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
@@ -1874,7 +1878,7 @@ function $t({
1874
1878
  x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
1875
1879
  ]
1876
1880
  },
1877
- N
1881
+ w
1878
1882
  );
1879
1883
  })
1880
1884
  }
@@ -1883,14 +1887,14 @@ function $t({
1883
1887
  "div",
1884
1888
  {
1885
1889
  ref: b,
1886
- className: ["ds-dropdown", n].filter(Boolean).join(" "),
1890
+ className: ["ds-dropdown", r].filter(Boolean).join(" "),
1887
1891
  style: i,
1888
1892
  ...l,
1889
1893
  children: [
1890
1894
  /* @__PURE__ */ e.jsx(
1891
1895
  "div",
1892
1896
  {
1893
- ref: R,
1897
+ ref: y,
1894
1898
  className: "ds-dropdown__trigger",
1895
1899
  onClick: q,
1896
1900
  onKeyDown: C,
@@ -1905,19 +1909,19 @@ function $t({
1905
1909
  function Tt({
1906
1910
  value: s = 0,
1907
1911
  size: t = "m",
1908
- variant: r = "default",
1912
+ variant: n = "default",
1909
1913
  showValue: o = !1,
1910
1914
  min: a = 2,
1911
- animate: n = !0
1915
+ animate: r = !0
1912
1916
  }) {
1913
- const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), m = r === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : r;
1917
+ const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), m = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
1914
1918
  return /* @__PURE__ */ e.jsxs(
1915
1919
  "div",
1916
1920
  {
1917
1921
  className: [
1918
1922
  "ds-progress",
1919
1923
  `ds-progress--${t}`,
1920
- !n && "ds-progress--instant"
1924
+ !r && "ds-progress--instant"
1921
1925
  ].filter(Boolean).join(" "),
1922
1926
  role: "progressbar",
1923
1927
  "aria-valuenow": i,
@@ -1941,8 +1945,8 @@ function Tt({
1941
1945
  }
1942
1946
  const ys = (s) => 1 - Math.pow(1 - s, 3), ks = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1943
1947
  function Es(s, { duration: t = 600 } = {}) {
1944
- const [r, o] = D(s), a = k(s), n = k(null);
1945
- return B(() => {
1948
+ const [n, o] = I(s), a = T(s), r = T(null);
1949
+ return L(() => {
1946
1950
  if (ks()) {
1947
1951
  o(s), a.current = s;
1948
1952
  return;
@@ -1953,48 +1957,48 @@ function Es(s, { duration: t = 600 } = {}) {
1953
1957
  const d = (f) => {
1954
1958
  m || (m = f);
1955
1959
  const p = Math.min((f - m) / t, 1);
1956
- o(i + l * ys(p)), p < 1 ? n.current = requestAnimationFrame(d) : a.current = s;
1960
+ o(i + l * ys(p)), p < 1 ? r.current = requestAnimationFrame(d) : a.current = s;
1957
1961
  };
1958
- return n.current = requestAnimationFrame(d), () => cancelAnimationFrame(n.current);
1959
- }, [s, t]), r;
1962
+ return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
1963
+ }, [s, t]), n;
1960
1964
  }
1961
1965
  function Rt({
1962
1966
  value: s,
1963
1967
  duration: t = 600,
1964
- decimals: r = 0,
1968
+ decimals: n = 0,
1965
1969
  prefix: o = "",
1966
1970
  suffix: a = ""
1967
1971
  }) {
1968
- const i = Es(s, { duration: t }).toFixed(r);
1972
+ const i = Es(s, { duration: t }).toFixed(n);
1969
1973
  return `${o}${i}${a}`;
1970
1974
  }
1971
- function $s({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1972
- const o = k(null), [a, n] = D(!1);
1973
- return B(() => {
1975
+ function $s({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
1976
+ const o = T(null), [a, r] = I(!1);
1977
+ return L(() => {
1974
1978
  const i = o.current;
1975
1979
  if (!i) return;
1976
1980
  const l = new IntersectionObserver(
1977
1981
  ([m]) => {
1978
- m.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1982
+ m.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
1979
1983
  },
1980
1984
  { threshold: s, rootMargin: t }
1981
1985
  );
1982
1986
  return l.observe(i), () => l.disconnect();
1983
- }, [s, t, r]), { ref: o, inView: a };
1987
+ }, [s, t, n]), { ref: o, inView: a };
1984
1988
  }
1985
1989
  function St({
1986
1990
  children: s,
1987
1991
  as: t = "div",
1988
- once: r = !1,
1992
+ once: n = !1,
1989
1993
  threshold: o = 0.1,
1990
1994
  rootMargin: a = "0px",
1991
- onEnter: n,
1995
+ onEnter: r,
1992
1996
  onLeave: i,
1993
1997
  ...l
1994
1998
  }) {
1995
- const { ref: m, inView: d } = $s({ threshold: o, rootMargin: a, once: r }), f = k(!1);
1996
- return B(() => {
1997
- d && !f.current && (n == null || n()), !d && f.current && (i == null || i()), f.current = d;
1999
+ const { ref: m, inView: d } = $s({ threshold: o, rootMargin: a, once: n }), f = T(!1);
2000
+ return L(() => {
2001
+ d && !f.current && (r == null || r()), !d && f.current && (i == null || i()), f.current = d;
1998
2002
  }, [d]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(d) : s });
1999
2003
  }
2000
2004
  const Le = {
@@ -2015,21 +2019,21 @@ function Rs(s) {
2015
2019
  ue = ue.filter((t) => t.id !== s), We();
2016
2020
  }
2017
2021
  function Dt() {
2018
- const s = (t, r = {}) => {
2022
+ const s = (t, n = {}) => {
2019
2023
  Ts({
2020
2024
  id: `${Date.now()}-${Math.random()}`,
2021
2025
  message: t,
2022
2026
  type: "default",
2023
2027
  duration: 4e3,
2024
- ...r
2028
+ ...n
2025
2029
  });
2026
2030
  };
2027
- return s.success = (t, r) => s(t, { ...r, type: "success" }), s.error = (t, r) => s(t, { ...r, type: "error" }), s.warning = (t, r) => s(t, { ...r, type: "warning" }), { toast: s };
2031
+ return s.success = (t, n) => s(t, { ...n, type: "success" }), s.error = (t, n) => s(t, { ...n, type: "error" }), s.warning = (t, n) => s(t, { ...n, type: "warning" }), { toast: s };
2028
2032
  }
2029
2033
  function Ss({ data: s, onDismiss: t }) {
2030
- const [r, o] = D(!1), a = k(null);
2031
- B(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
2032
- function n() {
2034
+ const [n, o] = I(!1), a = T(null);
2035
+ L(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => r(), s.duration)), () => clearTimeout(a.current)), []);
2036
+ function r() {
2033
2037
  o(!1), setTimeout(() => t(s.id), 250);
2034
2038
  }
2035
2039
  const i = Le[s.type] ?? Le.default;
@@ -2039,20 +2043,20 @@ function Ss({ data: s, onDismiss: t }) {
2039
2043
  className: [
2040
2044
  "ds-toast",
2041
2045
  `ds-toast--${s.type}`,
2042
- r && "ds-toast--visible"
2046
+ n && "ds-toast--visible"
2043
2047
  ].filter(Boolean).join(" "),
2044
2048
  role: s.type === "error" ? "alert" : "status",
2045
2049
  "aria-live": "polite",
2046
2050
  children: [
2047
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: I[3], strokeWidth: 1.5 }) }),
2051
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
2048
2052
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: s.message }),
2049
2053
  /* @__PURE__ */ e.jsx(
2050
2054
  "button",
2051
2055
  {
2052
2056
  className: "ds-toast__close",
2053
- onClick: n,
2057
+ onClick: r,
2054
2058
  "aria-label": "Закрыть",
2055
- children: /* @__PURE__ */ e.jsx(te, { size: I[3], strokeWidth: 1.5 })
2059
+ children: /* @__PURE__ */ e.jsx(te, { size: A[3], strokeWidth: 1.5 })
2056
2060
  }
2057
2061
  )
2058
2062
  ]
@@ -2060,8 +2064,8 @@ function Ss({ data: s, onDismiss: t }) {
2060
2064
  );
2061
2065
  }
2062
2066
  function It({ position: s = "bottom-right" }) {
2063
- const [t, r] = D(() => [...ue]);
2064
- return B(() => (ve.add(r), () => ve.delete(r)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
2067
+ const [t, n] = I(() => [...ue]);
2068
+ return L(() => (ve.add(n), () => ve.delete(n)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
2065
2069
  /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(Ss, { data: o, onDismiss: Rs }, o.id)) }),
2066
2070
  document.body
2067
2071
  );
@@ -2074,17 +2078,17 @@ const Ds = {
2074
2078
  function At({
2075
2079
  label: s,
2076
2080
  status: t = "idle",
2077
- icon: r,
2081
+ icon: n,
2078
2082
  badge: o,
2079
2083
  defaultExpanded: a = !1,
2080
- expanded: n,
2084
+ expanded: r,
2081
2085
  onToggle: i,
2082
2086
  children: l,
2083
2087
  className: m = "",
2084
2088
  ...d
2085
2089
  }) {
2086
2090
  const f = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2087
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
2091
+ n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2088
2092
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2089
2093
  Ds[t],
2090
2094
  o
@@ -2100,7 +2104,7 @@ function At({
2100
2104
  title: p,
2101
2105
  padding: "s",
2102
2106
  defaultExpanded: a,
2103
- expanded: f ? !1 : n,
2107
+ expanded: f ? !1 : r,
2104
2108
  onToggle: f ? void 0 : i,
2105
2109
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2106
2110
  }
@@ -2118,13 +2122,13 @@ function At({
2118
2122
  function Is({
2119
2123
  text: s,
2120
2124
  size: t = "xs",
2121
- timeout: r = 800,
2125
+ timeout: n = 800,
2122
2126
  "aria-label": o = "Copy to clipboard",
2123
2127
  ...a
2124
2128
  }) {
2125
- const [n, i] = D(!1), l = (m) => {
2129
+ const [r, i] = I(!1), l = (m) => {
2126
2130
  m.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2127
- i(!0), setTimeout(() => i(!1), r);
2131
+ i(!0), setTimeout(() => i(!1), n);
2128
2132
  });
2129
2133
  };
2130
2134
  return /* @__PURE__ */ e.jsx(
@@ -2132,17 +2136,17 @@ function Is({
2132
2136
  {
2133
2137
  variant: "ghost",
2134
2138
  size: t,
2135
- state: n ? "success" : "idle",
2136
- icon: /* @__PURE__ */ e.jsx(Je, { size: I[1], strokeWidth: 1.5 }),
2139
+ state: r ? "success" : "idle",
2140
+ icon: /* @__PURE__ */ e.jsx(Je, { size: A[1], strokeWidth: 1.5 }),
2137
2141
  "aria-label": o,
2138
2142
  onClick: l,
2139
2143
  ...a
2140
2144
  }
2141
2145
  );
2142
2146
  }
2143
- function Bt({ content: s, streaming: t = !1, ...r }) {
2144
- const [o, a] = D(t);
2145
- return B(() => {
2147
+ function Bt({ content: s, streaming: t = !1, ...n }) {
2148
+ const [o, a] = I(t);
2149
+ return L(() => {
2146
2150
  a(!!t);
2147
2151
  }, [t]), /* @__PURE__ */ e.jsx(
2148
2152
  $e,
@@ -2151,10 +2155,10 @@ function Bt({ content: s, streaming: t = !1, ...r }) {
2151
2155
  onToggle: a,
2152
2156
  padding: "s",
2153
2157
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2154
- /* @__PURE__ */ e.jsx(Ze, { size: I[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2158
+ /* @__PURE__ */ e.jsx(Ze, { size: A[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2155
2159
  /* @__PURE__ */ e.jsx(ds, { secondary: !0, children: "Thinking" })
2156
2160
  ] }),
2157
- ...r,
2161
+ ...n,
2158
2162
  children: /* @__PURE__ */ e.jsxs(Fe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2159
2163
  s,
2160
2164
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
@@ -2165,16 +2169,16 @@ function Bt({ content: s, streaming: t = !1, ...r }) {
2165
2169
  function Lt({
2166
2170
  count: s,
2167
2171
  current: t = 0,
2168
- done: r = [],
2172
+ done: n = [],
2169
2173
  onChange: o,
2170
2174
  showCounter: a = !0,
2171
- className: n = "",
2175
+ className: r = "",
2172
2176
  "aria-label": i = "Steps",
2173
2177
  ...l
2174
2178
  }) {
2175
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...l, children: [
2179
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
2176
2180
  /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (m, d) => {
2177
- const f = d === t, p = r.includes(d) && !f, h = o && (d <= t || r.includes(d)), u = [
2181
+ const f = d === t, p = n.includes(d) && !f, h = o && (d <= t || n.includes(d)), u = [
2178
2182
  "ds-step-indicator__dot",
2179
2183
  f && "ds-step-indicator__dot--active",
2180
2184
  p && "ds-step-indicator__dot--done"
@@ -2201,29 +2205,29 @@ function Lt({
2201
2205
  ] })
2202
2206
  ] });
2203
2207
  }
2204
- function Mt({
2208
+ function Pt({
2205
2209
  content: s,
2206
2210
  isStreaming: t = !1,
2207
- cursor: r = "line",
2211
+ cursor: n = "line",
2208
2212
  onChunk: o,
2209
2213
  className: a = "",
2210
- ...n
2214
+ ...r
2211
2215
  }) {
2212
- const i = k(s);
2213
- return B(() => {
2216
+ const i = T(s);
2217
+ return L(() => {
2214
2218
  s !== i.current && (o == null || o(s), i.current = s);
2215
- }, [s, o]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...n, children: [
2219
+ }, [s, o]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...r, children: [
2216
2220
  s,
2217
- t && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
2221
+ t && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2218
2222
  ] });
2219
2223
  }
2220
- function Pt({
2224
+ function Mt({
2221
2225
  role: s = "assistant",
2222
2226
  header: t,
2223
- footer: r,
2227
+ footer: n,
2224
2228
  attachments: o,
2225
2229
  isStreaming: a = !1,
2226
- children: n,
2230
+ children: r,
2227
2231
  className: i = "",
2228
2232
  ...l
2229
2233
  }) {
@@ -2233,77 +2237,77 @@ function Pt({
2233
2237
  a && "ds-chat-message--streaming",
2234
2238
  i
2235
2239
  ].filter(Boolean).join(" ");
2236
- return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: n }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2240
+ return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2237
2241
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2238
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: n }),
2239
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2242
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
2243
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2240
2244
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2241
2245
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2242
2246
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2243
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: n }),
2244
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2247
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
2248
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2245
2249
  ] });
2246
2250
  }
2247
- function zt(s, { containerRef: t, smartPause: r = !0 } = {}) {
2248
- const o = k(!1), a = k(0);
2249
- B(() => {
2250
- const n = t == null ? void 0 : t.current;
2251
- if (!n) return;
2251
+ function zt(s, { containerRef: t, smartPause: n = !0 } = {}) {
2252
+ const o = T(!1), a = T(0);
2253
+ L(() => {
2254
+ const r = t == null ? void 0 : t.current;
2255
+ if (!r) return;
2252
2256
  const i = () => {
2253
- const l = n.scrollHeight - n.scrollTop - n.clientHeight < 64;
2254
- !l && n.scrollTop < a.current && (o.current = !0), l && (o.current = !1), a.current = n.scrollTop;
2257
+ const l = r.scrollHeight - r.scrollTop - r.clientHeight < 64;
2258
+ !l && r.scrollTop < a.current && (o.current = !0), l && (o.current = !1), a.current = r.scrollTop;
2255
2259
  };
2256
- return n.addEventListener("scroll", i, { passive: !0 }), () => n.removeEventListener("scroll", i);
2257
- }, [t]), B(() => {
2258
- const n = t == null ? void 0 : t.current;
2259
- n && (r && o.current || (n.scrollTop = n.scrollHeight));
2260
+ return r.addEventListener("scroll", i, { passive: !0 }), () => r.removeEventListener("scroll", i);
2261
+ }, [t]), L(() => {
2262
+ const r = t == null ? void 0 : t.current;
2263
+ r && (n && o.current || (r.scrollTop = r.scrollHeight));
2260
2264
  }, s);
2261
2265
  }
2262
2266
  function As({
2263
2267
  prompts: s,
2264
2268
  enabled: t,
2265
- typingSpeed: r = 38,
2269
+ typingSpeed: n = 38,
2266
2270
  erasingSpeed: o = 18,
2267
2271
  holdTime: a = 2200,
2268
- betweenTime: n = 380,
2272
+ betweenTime: r = 380,
2269
2273
  manualPauseMs: i = 5e3
2270
2274
  }) {
2271
- const [l, m] = D(0), [d, f] = D(""), p = k("typing"), h = k(0), u = k(0), b = k(null), j = k(0);
2272
- B(() => {
2275
+ const [l, m] = I(0), [d, f] = I(""), p = T("typing"), h = T(0), u = T(0), b = T(null), _ = T(0);
2276
+ L(() => {
2273
2277
  u.current = l;
2274
- }, [l]), B(() => {
2278
+ }, [l]), L(() => {
2275
2279
  if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2276
2280
  f(""), h.current = 0, p.current = "typing";
2277
2281
  return;
2278
2282
  }
2279
- const T = () => {
2280
- const z = Date.now();
2281
- if (j.current > z) {
2282
- b.current = setTimeout(T, j.current - z);
2283
+ const $ = () => {
2284
+ const P = Date.now();
2285
+ if (_.current > P) {
2286
+ b.current = setTimeout($, _.current - P);
2283
2287
  return;
2284
2288
  }
2285
- const A = s[u.current % s.length] ?? "";
2286
- p.current === "typing" ? (h.current += 1, f(A.slice(0, h.current)), h.current >= A.length ? (p.current = "holding", b.current = setTimeout(T, a)) : b.current = setTimeout(T, r + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout(T, o)) : (h.current = Math.max(0, h.current - 1), f(A.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), b.current = setTimeout(T, n)) : b.current = setTimeout(T, o));
2289
+ const B = s[u.current % s.length] ?? "";
2290
+ p.current === "typing" ? (h.current += 1, f(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", b.current = setTimeout($, a)) : b.current = setTimeout($, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout($, o)) : (h.current = Math.max(0, h.current - 1), f(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), b.current = setTimeout($, r)) : b.current = setTimeout($, o));
2287
2291
  };
2288
- return b.current = setTimeout(T, 260), () => {
2292
+ return b.current = setTimeout($, 260), () => {
2289
2293
  b.current && clearTimeout(b.current);
2290
2294
  };
2291
- }, [t, s, r, o, a, n]);
2292
- const R = (T) => {
2295
+ }, [t, s, n, o, a, r]);
2296
+ const y = ($) => {
2293
2297
  if (s.length === 0) return;
2294
- const z = (T % s.length + s.length) % s.length, A = s[z];
2295
- u.current = z, h.current = A.length, p.current = "holding", j.current = Date.now() + i, m(z), f(A);
2296
- }, E = () => R(u.current + 1), L = () => R(u.current - 1), y = s[l % s.length] ?? "";
2297
- return { displayed: d, currentPrompt: y, index: l, next: E, prev: L };
2298
+ const P = ($ % s.length + s.length) % s.length, B = s[P];
2299
+ u.current = P, h.current = B.length, p.current = "holding", _.current = Date.now() + i, m(P), f(B);
2300
+ }, g = () => y(u.current + 1), R = () => y(u.current - 1), N = s[l % s.length] ?? "";
2301
+ return { displayed: d, currentPrompt: N, index: l, next: g, prev: R };
2298
2302
  }
2299
2303
  let Bs = 0;
2300
2304
  function Ot({
2301
2305
  value: s = "",
2302
2306
  onChange: t,
2303
- onSubmit: r,
2307
+ onSubmit: n,
2304
2308
  onStop: o,
2305
2309
  onKeyDown: a,
2306
- loading: n = !1,
2310
+ loading: r = !1,
2307
2311
  disabled: i = !1,
2308
2312
  placeholder: l = "Let's get things done...",
2309
2313
  animatedPlaceholders: m,
@@ -2313,87 +2317,87 @@ function Ot({
2313
2317
  onAttachImages: h,
2314
2318
  onRemoveAttachment: u,
2315
2319
  onRemoveImage: b,
2316
- acceptImage: j,
2317
- acceptFile: R,
2318
- maxImages: E,
2319
- maxImageSize: L,
2320
- leftSlot: y,
2321
- rightSlot: T,
2322
- className: z = "",
2323
- ...A
2320
+ acceptImage: _,
2321
+ acceptFile: y,
2322
+ maxImages: g,
2323
+ maxImageSize: R,
2324
+ leftSlot: N,
2325
+ rightSlot: $,
2326
+ className: P = "",
2327
+ ...B
2324
2328
  }) {
2325
- const q = k(null), H = k(null), F = k(0), [v, C] = D(!1), [X, V] = D([]), x = (_) => {
2326
- const S = ++Bs;
2327
- V((Y) => [...Y, { id: S, msg: _ }]), setTimeout(() => V((Y) => Y.filter((J) => J.id !== S)), 6e3);
2328
- }, N = (_) => V((S) => S.filter((Y) => Y.id !== _)), $ = (_) => _.type.startsWith("image/"), M = () => !0, K = j ?? $, G = R ?? M, g = (_) => {
2329
- const S = [], Y = [], J = [], Z = [];
2330
- let ee = 0, ie = E != null ? E - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2331
- for (const se of _)
2332
- K(se) ? L && se.size > L ? J.push(se.name) : ie > 0 ? (S.push(se), ie--) : ee++ : G(se) ? Y.push(se) : Z.push(se.name);
2333
- return { imageFiles: S, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee };
2334
- }, c = (_) => {
2335
- const { imageFiles: S, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee } = g(_);
2336
- J.length && x(`File${J.length > 1 ? "s" : ""} too large${L ? ` (max ${L / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && x(`Max ${E} images per message`), h && S.length && h(S);
2337
- const ie = Y.concat(h ? [] : S);
2329
+ const q = T(null), H = T(null), F = T(0), [v, C] = I(!1), [X, V] = I([]), x = (j) => {
2330
+ const D = ++Bs;
2331
+ V((Y) => [...Y, { id: D, msg: j }]), setTimeout(() => V((Y) => Y.filter((J) => J.id !== D)), 6e3);
2332
+ }, w = (j) => V((D) => D.filter((Y) => Y.id !== j)), S = (j) => j.type.startsWith("image/"), M = () => !0, K = _ ?? S, G = y ?? M, E = (j) => {
2333
+ const D = [], Y = [], J = [], Z = [];
2334
+ let ee = 0, ie = g != null ? g - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2335
+ for (const se of j)
2336
+ K(se) ? R && se.size > R ? J.push(se.name) : ie > 0 ? (D.push(se), ie--) : ee++ : G(se) ? Y.push(se) : Z.push(se.name);
2337
+ return { imageFiles: D, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee };
2338
+ }, c = (j) => {
2339
+ const { imageFiles: D, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee } = E(j);
2340
+ J.length && x(`File${J.length > 1 ? "s" : ""} too large${R ? ` (max ${R / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && x(`Max ${g} images per message`), h && D.length && h(D);
2341
+ const ie = Y.concat(h ? [] : D);
2338
2342
  p && ie.length && p(ie);
2339
2343
  };
2340
- B(() => {
2341
- const _ = H.current;
2342
- _ && (_.style.height = "auto", _.style.height = `${Math.min(_.scrollHeight, 200)}px`);
2343
- }, [s]), B(() => {
2344
- const _ = (S) => {
2344
+ L(() => {
2345
+ const j = H.current;
2346
+ j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2347
+ }, [s]), L(() => {
2348
+ const j = (D) => {
2345
2349
  var J, Z, ee;
2346
- if (n || i) return;
2347
- const Y = (J = S.target) == null ? void 0 : J.tagName;
2348
- Y === "INPUT" || Y === "TEXTAREA" || Y === "SELECT" || (Z = S.target) != null && Z.isContentEditable || S.ctrlKey || S.metaKey || S.altKey || S.key.length !== 1 && S.key !== "Backspace" && S.key !== "Delete" || (ee = H.current) == null || ee.focus();
2350
+ if (r || i) return;
2351
+ const Y = (J = D.target) == null ? void 0 : J.tagName;
2352
+ Y === "INPUT" || Y === "TEXTAREA" || Y === "SELECT" || (Z = D.target) != null && Z.isContentEditable || D.ctrlKey || D.metaKey || D.altKey || D.key.length !== 1 && D.key !== "Backspace" && D.key !== "Delete" || (ee = H.current) == null || ee.focus();
2349
2353
  };
2350
- return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
2351
- }, [n, i]);
2352
- const w = (_) => {
2353
- _.preventDefault(), F.current++, _.dataTransfer.types.includes("Files") && C(!0);
2354
- }, P = (_) => {
2355
- _.preventDefault(), F.current--, F.current === 0 && C(!1);
2356
- }, O = (_) => _.preventDefault(), re = (_) => {
2357
- _.preventDefault(), F.current = 0, C(!1);
2358
- const S = Array.from(_.dataTransfer.files);
2359
- S.length && c(S);
2360
- }, ae = (_) => {
2361
- const S = Array.from(_.target.files || []);
2362
- q.current && (q.current.value = ""), S.length && c(S);
2363
- }, W = (_) => {
2354
+ return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2355
+ }, [r, i]);
2356
+ const k = (j) => {
2357
+ j.preventDefault(), F.current++, j.dataTransfer.types.includes("Files") && C(!0);
2358
+ }, z = (j) => {
2359
+ j.preventDefault(), F.current--, F.current === 0 && C(!1);
2360
+ }, O = (j) => j.preventDefault(), ne = (j) => {
2361
+ j.preventDefault(), F.current = 0, C(!1);
2362
+ const D = Array.from(j.dataTransfer.files);
2363
+ D.length && c(D);
2364
+ }, ae = (j) => {
2365
+ const D = Array.from(j.target.files || []);
2366
+ q.current && (q.current.value = ""), D.length && c(D);
2367
+ }, W = (j) => {
2364
2368
  var se;
2365
2369
  if (!h) return;
2366
- const S = (se = _.clipboardData) == null ? void 0 : se.items;
2367
- if (!S) return;
2370
+ const D = (se = j.clipboardData) == null ? void 0 : se.items;
2371
+ if (!D) return;
2368
2372
  const Y = [];
2369
- for (const Ue of S) {
2373
+ for (const Ue of D) {
2370
2374
  const Re = Ue.getAsFile();
2371
2375
  Re && Y.push(Re);
2372
2376
  }
2373
2377
  if (Y.length === 0) return;
2374
- const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: ie } = g(Y);
2375
- Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), ie && x(`Max ${E} images per message`), J.length && (_.preventDefault(), h(J));
2376
- }, Q = !n && !i && !!(m != null && m.length) && s.length === 0, oe = As({
2378
+ const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: ie } = E(Y);
2379
+ Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), ie && x(`Max ${g} images per message`), J.length && (j.preventDefault(), h(J));
2380
+ }, Q = !r && !i && !!(m != null && m.length) && s.length === 0, oe = As({
2377
2381
  prompts: m ?? [],
2378
2382
  enabled: Q
2379
- }), be = (_) => {
2383
+ }), be = (j) => {
2380
2384
  if (Q) {
2381
- if (_.key === "ArrowDown" || _.key === "ArrowRight") {
2382
- _.preventDefault(), oe.next();
2385
+ if (j.key === "ArrowDown" || j.key === "ArrowRight") {
2386
+ j.preventDefault(), oe.next();
2383
2387
  return;
2384
2388
  }
2385
- if (_.key === "ArrowUp" || _.key === "ArrowLeft") {
2386
- _.preventDefault(), oe.prev();
2389
+ if (j.key === "ArrowUp" || j.key === "ArrowLeft") {
2390
+ j.preventDefault(), oe.prev();
2387
2391
  return;
2388
2392
  }
2389
- if (_.key === "Tab" && !_.shiftKey) {
2390
- _.preventDefault(), t == null || t(oe.currentPrompt);
2393
+ if (j.key === "Tab" && !j.shiftKey) {
2394
+ j.preventDefault(), t == null || t(oe.currentPrompt);
2391
2395
  return;
2392
2396
  }
2393
2397
  }
2394
- a == null || a(_);
2398
+ a == null || a(j);
2395
2399
  }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Te = p || h;
2396
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", z].filter(Boolean).join(" "), ...A, children: [
2400
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", P].filter(Boolean).join(" "), ...B, children: [
2397
2401
  Te && /* @__PURE__ */ e.jsx(
2398
2402
  "input",
2399
2403
  {
@@ -2409,10 +2413,10 @@ function Ot({
2409
2413
  "div",
2410
2414
  {
2411
2415
  className: ["ds-prompt-input__box", v && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2412
- onDragEnter: w,
2413
- onDragLeave: P,
2416
+ onDragEnter: k,
2417
+ onDragLeave: z,
2414
2418
  onDragOver: O,
2415
- onDrop: re,
2419
+ onDrop: ne,
2416
2420
  children: [
2417
2421
  v && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2418
2422
  /* @__PURE__ */ e.jsx(
@@ -2420,11 +2424,11 @@ function Ot({
2420
2424
  {
2421
2425
  ref: H,
2422
2426
  value: s,
2423
- onChange: (_) => t == null ? void 0 : t(_.target.value),
2427
+ onChange: (j) => t == null ? void 0 : t(j.target.value),
2424
2428
  onKeyDown: be,
2425
2429
  onPaste: W,
2426
2430
  placeholder: Q ? "" : l,
2427
- disabled: n || i,
2431
+ disabled: r || i,
2428
2432
  rows: 1,
2429
2433
  className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2430
2434
  }
@@ -2433,68 +2437,68 @@ function Ot({
2433
2437
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2434
2438
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2435
2439
  ] }),
2436
- f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((_, S) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2437
- /* @__PURE__ */ e.jsx("img", { src: _.preview, alt: "" }),
2440
+ f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((j, D) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2441
+ /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2438
2442
  /* @__PURE__ */ e.jsx(
2439
2443
  "button",
2440
2444
  {
2441
2445
  className: "ds-prompt-input__image-remove",
2442
- onClick: () => b == null ? void 0 : b(S),
2446
+ onClick: () => b == null ? void 0 : b(D),
2443
2447
  "aria-label": "Remove image",
2444
2448
  type: "button",
2445
2449
  children: /* @__PURE__ */ e.jsx(te, { size: 12, strokeWidth: 2 })
2446
2450
  }
2447
2451
  )
2448
- ] }, S)) }),
2449
- X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((_) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2450
- /* @__PURE__ */ e.jsx("span", { children: _.msg }),
2452
+ ] }, D)) }),
2453
+ X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((j) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2454
+ /* @__PURE__ */ e.jsx("span", { children: j.msg }),
2451
2455
  /* @__PURE__ */ e.jsx(
2452
2456
  "button",
2453
2457
  {
2454
2458
  type: "button",
2455
2459
  className: "ds-prompt-input__warning-close",
2456
- onClick: () => N(_.id),
2460
+ onClick: () => w(j.id),
2457
2461
  "aria-label": "Dismiss",
2458
- children: /* @__PURE__ */ e.jsx(te, { size: I[1], strokeWidth: 1.5 })
2462
+ children: /* @__PURE__ */ e.jsx(te, { size: A[1], strokeWidth: 1.5 })
2459
2463
  }
2460
2464
  )
2461
- ] }, _.id)) }),
2462
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((_, S) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2463
- _.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Se, { size: I[1], strokeWidth: 1.5 }),
2464
- _.filename,
2465
- _.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2465
+ ] }, j.id)) }),
2466
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((j, D) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2467
+ j.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: A[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Se, { size: A[1], strokeWidth: 1.5 }),
2468
+ j.filename,
2469
+ j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2466
2470
  "button",
2467
2471
  {
2468
2472
  type: "button",
2469
2473
  className: "ds-prompt-input__remove-btn",
2470
- onClick: () => u == null ? void 0 : u(S),
2471
- children: /* @__PURE__ */ e.jsx(te, { size: I[1], strokeWidth: 1.5 })
2474
+ onClick: () => u == null ? void 0 : u(D),
2475
+ children: /* @__PURE__ */ e.jsx(te, { size: A[1], strokeWidth: 1.5 })
2472
2476
  }
2473
2477
  )
2474
- ] }) }, S)) }),
2478
+ ] }) }, D)) }),
2475
2479
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2476
2480
  Te && /* @__PURE__ */ e.jsx(
2477
2481
  ce,
2478
2482
  {
2479
2483
  variant: "ghost",
2480
2484
  size: "xs",
2481
- icon: /* @__PURE__ */ e.jsx(Se, { size: I[2], strokeWidth: 1.5 }),
2485
+ icon: /* @__PURE__ */ e.jsx(Se, { size: A[2], strokeWidth: 1.5 }),
2482
2486
  "aria-label": "Attach files",
2483
2487
  onClick: () => {
2484
- var _;
2485
- return (_ = q.current) == null ? void 0 : _.click();
2488
+ var j;
2489
+ return (j = q.current) == null ? void 0 : j.click();
2486
2490
  }
2487
2491
  }
2488
2492
  ),
2489
- y,
2490
- T,
2493
+ N,
2494
+ $,
2491
2495
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2492
- n ? /* @__PURE__ */ e.jsx(
2496
+ r ? /* @__PURE__ */ e.jsx(
2493
2497
  ce,
2494
2498
  {
2495
2499
  variant: "primary",
2496
2500
  size: "xs",
2497
- icon: /* @__PURE__ */ e.jsx(es, { size: I[2], strokeWidth: 1.5 }),
2501
+ icon: /* @__PURE__ */ e.jsx(es, { size: A[2], strokeWidth: 1.5 }),
2498
2502
  onClick: o,
2499
2503
  "aria-label": "Stop"
2500
2504
  }
@@ -2503,8 +2507,8 @@ function Ot({
2503
2507
  {
2504
2508
  variant: "primary",
2505
2509
  size: "xs",
2506
- icon: /* @__PURE__ */ e.jsx(ss, { size: I[2], strokeWidth: 1.5 }),
2507
- onClick: r,
2510
+ icon: /* @__PURE__ */ e.jsx(ss, { size: A[2], strokeWidth: 1.5 }),
2511
+ onClick: n,
2508
2512
  disabled: !Ce,
2509
2513
  "aria-label": "Send"
2510
2514
  }
@@ -2515,37 +2519,37 @@ function Ot({
2515
2519
  )
2516
2520
  ] });
2517
2521
  }
2518
- const Me = { fast: 0, standard: 1, premium: 2 }, Pe = { fast: "data-5", standard: "data-3", premium: "data-6" };
2522
+ const Pe = { fast: 0, standard: 1, premium: 2 }, Me = { fast: "data-5", standard: "data-3", premium: "data-6" };
2519
2523
  function Ft({
2520
2524
  models: s = [],
2521
2525
  value: t,
2522
- onChange: r,
2526
+ onChange: n,
2523
2527
  size: o = "xs",
2524
2528
  minTier: a,
2525
- showAutoOption: n = !1,
2529
+ showAutoOption: r = !1,
2526
2530
  groupByTier: i = !0,
2527
2531
  className: l = "",
2528
2532
  ...m
2529
2533
  }) {
2530
- const [d, f] = D(!1), p = k(null), h = k(null), u = k(null), [b, j] = D({}), R = s.filter((v) => !a || v.name === "auto" ? !0 : (Me[v.tier] ?? 1) >= (Me[a] ?? 1)), E = R.find((v) => v.name === "auto"), L = R.filter((v) => v.name !== "auto"), y = s.find((v) => v.name === t), z = new Set(L.map((v) => v.tier).filter(Boolean)).size > 1;
2531
- B(() => {
2534
+ const [d, f] = I(!1), p = T(null), h = T(null), u = T(null), [b, _] = I({}), y = s.filter((v) => !a || v.name === "auto" ? !0 : (Pe[v.tier] ?? 1) >= (Pe[a] ?? 1)), g = y.find((v) => v.name === "auto"), R = y.filter((v) => v.name !== "auto"), N = s.find((v) => v.name === t), P = new Set(R.map((v) => v.tier).filter(Boolean)).size > 1;
2535
+ L(() => {
2532
2536
  if (!d) return;
2533
2537
  const v = 320, C = () => {
2534
2538
  var M;
2535
2539
  const x = (M = h.current) == null ? void 0 : M.getBoundingClientRect();
2536
2540
  if (!x) return;
2537
- const N = window.innerHeight - x.bottom, $ = N < v + 8 && x.top > N;
2538
- j({
2541
+ const w = window.innerHeight - x.bottom, S = w < v + 8 && x.top > w;
2542
+ _({
2539
2543
  position: "fixed",
2540
2544
  zIndex: "var(--z-dropdown, 500)",
2541
2545
  left: x.left,
2542
- ...$ ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
2546
+ ...S ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
2543
2547
  });
2544
2548
  };
2545
2549
  C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
2546
2550
  const X = (x) => {
2547
- var N, $;
2548
- !((N = p.current) != null && N.contains(x.target)) && !(($ = u.current) != null && $.contains(x.target)) && f(!1);
2551
+ var w, S;
2552
+ !((w = p.current) != null && w.contains(x.target)) && !((S = u.current) != null && S.contains(x.target)) && f(!1);
2549
2553
  }, V = (x) => {
2550
2554
  x.key === "Escape" && f(!1);
2551
2555
  };
@@ -2553,8 +2557,8 @@ function Ft({
2553
2557
  window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", V);
2554
2558
  };
2555
2559
  }, [d]);
2556
- const A = (v) => {
2557
- r == null || r(v), f(!1);
2560
+ const B = (v) => {
2561
+ n == null || n(v), f(!1);
2558
2562
  }, q = (v) => /* @__PURE__ */ e.jsxs(
2559
2563
  "button",
2560
2564
  {
@@ -2563,22 +2567,22 @@ function Ft({
2563
2567
  "ds-model-picker__item",
2564
2568
  v.name === t && "ds-model-picker__item--active"
2565
2569
  ].filter(Boolean).join(" "),
2566
- onClick: () => A(v.name),
2570
+ onClick: () => B(v.name),
2567
2571
  children: [
2568
2572
  v.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: v.icon }) : /* @__PURE__ */ e.jsx(De, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2569
2573
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: v.displayName || v.name }),
2570
- z && v.tier && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Pe[v.tier] || "default", children: v.tier })
2574
+ P && v.tier && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Me[v.tier] || "default", children: v.tier })
2571
2575
  ]
2572
2576
  },
2573
2577
  v.name
2574
- ), H = () => !i || !z ? L.map(q) : ["fast", "standard", "premium"].flatMap((v) => {
2575
- const C = L.filter((X) => X.tier === v);
2578
+ ), H = () => !i || !P ? R.map(q) : ["fast", "standard", "premium"].flatMap((v) => {
2579
+ const C = R.filter((X) => X.tier === v);
2576
2580
  return C.length ? [
2577
2581
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": v, children: v.charAt(0).toUpperCase() + v.slice(1) }, `lbl-${v}`),
2578
2582
  ...C.map(q)
2579
2583
  ] : [];
2580
2584
  }), F = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: b, children: [
2581
- n && E && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2585
+ r && g && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2582
2586
  /* @__PURE__ */ e.jsxs(
2583
2587
  "button",
2584
2588
  {
@@ -2588,14 +2592,14 @@ function Ft({
2588
2592
  "ds-model-picker__item--auto",
2589
2593
  t === "auto" && "ds-model-picker__item--active"
2590
2594
  ].filter(Boolean).join(" "),
2591
- onClick: () => A("auto"),
2595
+ onClick: () => B("auto"),
2592
2596
  children: [
2593
2597
  /* @__PURE__ */ e.jsx(ts, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2594
2598
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2595
2599
  ]
2596
2600
  }
2597
2601
  ),
2598
- L.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2602
+ R.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2599
2603
  ] }),
2600
2604
  H()
2601
2605
  ] });
@@ -2616,9 +2620,9 @@ function Ft({
2616
2620
  "aria-haspopup": "listbox",
2617
2621
  "aria-expanded": d,
2618
2622
  children: [
2619
- y != null && y.icon ? /* @__PURE__ */ e.jsx("span", { children: y.icon }) : /* @__PURE__ */ e.jsx(De, { size: 12, strokeWidth: 1.5 }),
2620
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (y == null ? void 0 : y.displayName) || (y == null ? void 0 : y.name) || t }),
2621
- z && (y == null ? void 0 : y.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Pe[y.tier] || "default", children: y.tier })
2623
+ N != null && N.icon ? /* @__PURE__ */ e.jsx("span", { children: N.icon }) : /* @__PURE__ */ e.jsx(De, { size: 12, strokeWidth: 1.5 }),
2624
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (N == null ? void 0 : N.displayName) || (N == null ? void 0 : N.name) || t }),
2625
+ P && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Me[N.tier] || "default", children: N.tier })
2622
2626
  ]
2623
2627
  }
2624
2628
  ),
@@ -2634,30 +2638,30 @@ const Ls = ({ filename: s, pages: t }) => /* @__PURE__ */ e.jsxs("span", { style
2634
2638
  function Ne(s) {
2635
2639
  return s != null && s.length ? "p. " + s.join(", ") : null;
2636
2640
  }
2637
- function Ms(s) {
2641
+ function Ps(s) {
2638
2642
  const t = /* @__PURE__ */ new Map();
2639
- for (const r of s)
2640
- t.has(r.filename) || t.set(r.filename, { filename: r.filename, url: r.url, items: [] }), t.get(r.filename).items.push(r);
2643
+ for (const n of s)
2644
+ t.has(n.filename) || t.set(n.filename, { filename: n.filename, url: n.url, items: [] }), t.get(n.filename).items.push(n);
2641
2645
  return [...t.values()];
2642
2646
  }
2643
2647
  function Wt({
2644
2648
  sources: s = [],
2645
2649
  layout: t = "list",
2646
- title: r = "Sources",
2650
+ title: n = "Sources",
2647
2651
  maxVisible: o = 5,
2648
2652
  onSourceClick: a
2649
2653
  }) {
2650
- const [n, i] = D(!1), l = Ms(s), m = l.length > o, d = n ? l : l.slice(0, o), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2654
+ const [r, i] = I(!1), l = Ps(s), m = l.length > o, d = r ? l : l.slice(0, o), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2651
2655
  return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2652
2656
  d.map((h) => {
2653
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2657
+ const u = h.items.map((_) => _.page).filter(Boolean), b = !!a;
2654
2658
  return /* @__PURE__ */ e.jsxs(
2655
2659
  "div",
2656
2660
  {
2657
2661
  className: `ds-sources-panel__compact-row${b ? " ds-sources-panel__compact-row--clickable" : ""}`,
2658
2662
  onClick: b ? () => a(h.items[0]) : void 0,
2659
2663
  children: [
2660
- /* @__PURE__ */ e.jsx(rs, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2664
+ /* @__PURE__ */ e.jsx(ns, { size: A[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2661
2665
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2662
2666
  u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(u) })
2663
2667
  ]
@@ -2665,28 +2669,28 @@ function Wt({
2665
2669
  h.filename
2666
2670
  );
2667
2671
  }),
2668
- m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2672
+ m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2669
2673
  "+",
2670
2674
  l.length - o,
2671
2675
  " more sources"
2672
2676
  ] })
2673
2677
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2674
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: r }),
2678
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2675
2679
  d.map((h) => {
2676
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2680
+ const u = h.items.map((_) => _.page).filter(Boolean), b = !!a;
2677
2681
  return f ? /* @__PURE__ */ e.jsx(
2678
2682
  $e,
2679
2683
  {
2680
2684
  title: /* @__PURE__ */ e.jsx(Ls, { filename: h.filename, pages: u }),
2681
2685
  padding: "s",
2682
- children: h.items.map((j, R) => /* @__PURE__ */ e.jsx(
2686
+ children: h.items.map((_, y) => /* @__PURE__ */ e.jsx(
2683
2687
  "div",
2684
2688
  {
2685
2689
  className: `ds-sources-panel__snippet${b ? " ds-sources-panel__snippet--clickable" : ""}`,
2686
- onClick: b ? () => a(j) : void 0,
2687
- children: j.snippet ?? `p. ${j.page}`
2690
+ onClick: b ? () => a(_) : void 0,
2691
+ children: _.snippet ?? `p. ${_.page}`
2688
2692
  },
2689
- R
2693
+ y
2690
2694
  ))
2691
2695
  },
2692
2696
  h.filename
@@ -2703,7 +2707,7 @@ function Wt({
2703
2707
  h.filename
2704
2708
  );
2705
2709
  }),
2706
- m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2710
+ m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2707
2711
  "+",
2708
2712
  l.length - o,
2709
2713
  " more sources"
@@ -2716,17 +2720,17 @@ function ze(s) {
2716
2720
  function Ct({
2717
2721
  used: s,
2718
2722
  limit: t,
2719
- size: r = "s",
2723
+ size: n = "s",
2720
2724
  showCount: o = !0,
2721
2725
  showPercent: a = !1,
2722
- warningThreshold: n = 0.8,
2726
+ warningThreshold: r = 0.8,
2723
2727
  errorThreshold: i = 1
2724
2728
  }) {
2725
- const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= i ? "error" : l >= n ? "warning" : "normal";
2729
+ const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= i ? "error" : l >= r ? "warning" : "normal";
2726
2730
  return /* @__PURE__ */ e.jsxs(
2727
2731
  "div",
2728
2732
  {
2729
- className: `ds-token-counter ds-token-counter--${r}`,
2733
+ className: `ds-token-counter ds-token-counter--${n}`,
2730
2734
  role: "meter",
2731
2735
  "aria-valuenow": s,
2732
2736
  "aria-valuemax": t,
@@ -2755,16 +2759,16 @@ function Ct({
2755
2759
  );
2756
2760
  }
2757
2761
  const Oe = 5;
2758
- function Ps(s) {
2762
+ function Ms(s) {
2759
2763
  return s < 0.34 ? "low" : s < 0.67 ? "medium" : "high";
2760
2764
  }
2761
2765
  function Ut({
2762
2766
  value: s = 0,
2763
2767
  size: t = "xs",
2764
- showLabel: r = "none",
2768
+ showLabel: n = "none",
2765
2769
  layout: o = "inline"
2766
2770
  }) {
2767
- const a = Math.max(0, Math.min(1, s)), n = Math.round(a * Oe), i = Ps(a);
2771
+ const a = Math.max(0, Math.min(1, s)), r = Math.round(a * Oe), i = Ms(a);
2768
2772
  return /* @__PURE__ */ e.jsxs("div", { className: [
2769
2773
  "ds-confidence-bar",
2770
2774
  `ds-confidence-bar--${t}`,
@@ -2774,15 +2778,15 @@ function Ut({
2774
2778
  /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Oe }, (l, m) => /* @__PURE__ */ e.jsx(
2775
2779
  "div",
2776
2780
  {
2777
- className: `ds-confidence-bar__seg${m < n ? " ds-confidence-bar__seg--filled" : ""}`
2781
+ className: `ds-confidence-bar__seg${m < r ? " ds-confidence-bar__seg--filled" : ""}`
2778
2782
  },
2779
2783
  m
2780
2784
  )) }),
2781
- r === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
2785
+ n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
2782
2786
  ] });
2783
2787
  }
2784
2788
  const zs = { add: "+", remove: "-", context: " " };
2785
- function je({ line: s, lineNumbers: t }) {
2789
+ function _e({ line: s, lineNumbers: t }) {
2786
2790
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${s.type}`, children: [
2787
2791
  t && s.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: s.lineNo }),
2788
2792
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: zs[s.type] }),
@@ -2792,50 +2796,50 @@ function je({ line: s, lineNumbers: t }) {
2792
2796
  function Vt({
2793
2797
  lines: s = [],
2794
2798
  layout: t = "inline",
2795
- wordWrap: r = !1,
2799
+ wordWrap: n = !1,
2796
2800
  lineNumbers: o = !0,
2797
2801
  maxHeight: a,
2798
- title: n
2802
+ title: r
2799
2803
  }) {
2800
2804
  const i = [
2801
2805
  "ds-diff-view",
2802
2806
  `ds-diff-view--${t}`,
2803
- r && "ds-diff-view--wrap"
2807
+ n && "ds-diff-view--wrap"
2804
2808
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
2805
2809
  if (t === "split") {
2806
2810
  const m = s.filter((f) => f.type === "remove" || f.type === "context"), d = s.filter((f) => f.type === "add" || f.type === "context");
2807
2811
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2808
- n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2812
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2809
2813
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
2810
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: m.map((f, p) => /* @__PURE__ */ e.jsx(je, { line: f, lineNumbers: o }, p)) }),
2811
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((f, p) => /* @__PURE__ */ e.jsx(je, { line: f, lineNumbers: o }, p)) })
2814
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: m.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: o }, p)) }),
2815
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: o }, p)) })
2812
2816
  ] })
2813
2817
  ] });
2814
2818
  }
2815
2819
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2816
- n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2817
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(je, { line: m, lineNumbers: o }, d)) })
2820
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2821
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(_e, { line: m, lineNumbers: o }, d)) })
2818
2822
  ] });
2819
2823
  }
2820
2824
  function Os({
2821
2825
  value: s = "idle",
2822
2826
  onLike: t,
2823
- onDislike: r,
2827
+ onDislike: n,
2824
2828
  className: o = "",
2825
2829
  ...a
2826
2830
  }) {
2827
- const n = s !== "idle";
2831
+ const r = s !== "idle";
2828
2832
  return /* @__PURE__ */ e.jsxs(
2829
2833
  "div",
2830
2834
  {
2831
2835
  className: [
2832
2836
  "ds-message-feedback",
2833
- n && "ds-message-feedback--voted",
2837
+ r && "ds-message-feedback--voted",
2834
2838
  o
2835
2839
  ].filter(Boolean).join(" "),
2836
2840
  ...a,
2837
2841
  children: [
2838
- (!n || s === "liked") && /* @__PURE__ */ e.jsx(
2842
+ (!r || s === "liked") && /* @__PURE__ */ e.jsx(
2839
2843
  "button",
2840
2844
  {
2841
2845
  className: [
@@ -2843,34 +2847,34 @@ function Os({
2843
2847
  s === "liked" && "ds-message-feedback__btn--liked"
2844
2848
  ].filter(Boolean).join(" "),
2845
2849
  onClick: t,
2846
- disabled: n,
2850
+ disabled: r,
2847
2851
  "aria-label": "Like",
2848
2852
  "aria-pressed": s === "liked",
2849
2853
  children: /* @__PURE__ */ e.jsx(
2850
- ns,
2854
+ rs,
2851
2855
  {
2852
- size: I[1],
2856
+ size: A[1],
2853
2857
  strokeWidth: 1.5,
2854
2858
  fill: s === "liked" ? "currentColor" : "none"
2855
2859
  }
2856
2860
  )
2857
2861
  }
2858
2862
  ),
2859
- (!n || s === "disliked") && /* @__PURE__ */ e.jsx(
2863
+ (!r || s === "disliked") && /* @__PURE__ */ e.jsx(
2860
2864
  "button",
2861
2865
  {
2862
2866
  className: [
2863
2867
  "ds-message-feedback__btn",
2864
2868
  s === "disliked" && "ds-message-feedback__btn--disliked"
2865
2869
  ].filter(Boolean).join(" "),
2866
- onClick: r,
2867
- disabled: n,
2870
+ onClick: n,
2871
+ disabled: r,
2868
2872
  "aria-label": "Dislike",
2869
2873
  "aria-pressed": s === "disliked",
2870
2874
  children: /* @__PURE__ */ e.jsx(
2871
2875
  as,
2872
2876
  {
2873
- size: I[1],
2877
+ size: A[1],
2874
2878
  strokeWidth: 1.5,
2875
2879
  fill: s === "disliked" ? "currentColor" : "none"
2876
2880
  }
@@ -2884,23 +2888,23 @@ function Os({
2884
2888
  function Fs(s) {
2885
2889
  const t = s instanceof Date ? s : new Date(s);
2886
2890
  if (isNaN(t)) return null;
2887
- const r = /* @__PURE__ */ new Date(), o = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(r.getFullYear(), r.getMonth(), r.getDate()), n = new Date(a - 864e5);
2891
+ const n = /* @__PURE__ */ new Date(), o = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(a - 864e5);
2888
2892
  if (t >= a) return o;
2889
- if (t >= n) return `Yesterday ${o}`;
2893
+ if (t >= r) return `Yesterday ${o}`;
2890
2894
  const i = t.getDate(), l = t.toLocaleString([], { month: "short" });
2891
2895
  return `${i} ${l} ${o}`;
2892
2896
  }
2893
2897
  function Yt({
2894
2898
  role: s = "assistant",
2895
2899
  text: t,
2896
- timestamp: r,
2900
+ timestamp: n,
2897
2901
  feedbackValue: o = "idle",
2898
2902
  onLike: a,
2899
- onDislike: n,
2903
+ onDislike: r,
2900
2904
  className: i = "",
2901
2905
  ...l
2902
2906
  }) {
2903
- const m = s === "assistant" && (a || n), d = !!t, f = r ? Fs(r) : null;
2907
+ const m = s === "assistant" && (a || r), d = !!t, f = n ? Fs(n) : null;
2904
2908
  return !m && !d && !f ? null : /* @__PURE__ */ e.jsxs(
2905
2909
  "div",
2906
2910
  {
@@ -2908,21 +2912,21 @@ function Yt({
2908
2912
  ...l,
2909
2913
  children: [
2910
2914
  s === "user" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f }),
2911
- m && /* @__PURE__ */ e.jsx(Os, { className: "ds-message-action", value: o, onLike: a, onDislike: n }),
2915
+ m && /* @__PURE__ */ e.jsx(Os, { className: "ds-message-action", value: o, onLike: a, onDislike: r }),
2912
2916
  d && /* @__PURE__ */ e.jsx(Is, { className: "ds-message-action", text: t }),
2913
2917
  s === "assistant" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f })
2914
2918
  ]
2915
2919
  }
2916
2920
  );
2917
2921
  }
2918
- function qt({ label: s, className: t = "", ...r }) {
2919
- return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", t].filter(Boolean).join(" "), ...r, children: [
2922
+ function qt({ label: s, className: t = "", ...n }) {
2923
+ return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", t].filter(Boolean).join(" "), ...n, children: [
2920
2924
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
2921
2925
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: s })
2922
2926
  ] });
2923
2927
  }
2924
- function Ht({ variant: s = "light", glow: t, mask: r = !0, style: o, ...a }) {
2925
- const n = s === "dark", i = t ?? n, l = n ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", m = n ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
2928
+ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
2929
+ const r = s === "dark", i = t ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", m = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
2926
2930
  return /* @__PURE__ */ e.jsx(
2927
2931
  "div",
2928
2932
  {
@@ -2952,7 +2956,7 @@ function Ht({ variant: s = "light", glow: t, mask: r = !0, style: o, ...a }) {
2952
2956
  ].join(", "),
2953
2957
  backgroundSize: "80px 80px, 80px 80px, 16px 16px, 16px 16px",
2954
2958
  backgroundPosition: "-1px -1px, -1px -1px, -1px -1px, -1px -1px",
2955
- ...r && {
2959
+ ...n && {
2956
2960
  WebkitMaskImage: "radial-gradient(ellipse at center, #000 30%, transparent 85%)",
2957
2961
  maskImage: "radial-gradient(ellipse at center, #000 30%, transparent 85%)"
2958
2962
  }
@@ -2962,13 +2966,13 @@ function Ht({ variant: s = "light", glow: t, mask: r = !0, style: o, ...a }) {
2962
2966
  }
2963
2967
  );
2964
2968
  }
2965
- function Kt({ children: s, axis: t = "y", style: r, className: o = "", ...a }) {
2966
- const n = t === "x" ? { overflowX: "auto", overflowY: "hidden" } : t === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
2969
+ function Kt({ children: s, axis: t = "y", style: n, className: o = "", ...a }) {
2970
+ const r = t === "x" ? { overflowX: "auto", overflowY: "hidden" } : t === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
2967
2971
  return /* @__PURE__ */ e.jsx(
2968
2972
  "div",
2969
2973
  {
2970
2974
  className: `ds-scrollable ${o}`,
2971
- style: { ...n, ...r },
2975
+ style: { ...r, ...n },
2972
2976
  ...a,
2973
2977
  children: s
2974
2978
  }
@@ -2985,9 +2989,9 @@ export {
2985
2989
  gt as Breadcrumb,
2986
2990
  ce as Button,
2987
2991
  Ks as Card,
2988
- Pt as ChatMessage,
2992
+ Mt as ChatMessage,
2989
2993
  dt as Checkbox,
2990
- rt as Code,
2994
+ nt as Code,
2991
2995
  ps as CodeAccordion,
2992
2996
  Ut as ConfidenceBar,
2993
2997
  Is as CopyButton,
@@ -3004,7 +3008,7 @@ export {
3004
3008
  Zs as H4,
3005
3009
  St as InView,
3006
3010
  Vs as Input,
3007
- nt as Link,
3011
+ rt as Link,
3008
3012
  Os as MessageFeedback,
3009
3013
  Yt as MessageFooter,
3010
3014
  st as Modal,
@@ -3027,7 +3031,7 @@ export {
3027
3031
  wt as Stat,
3028
3032
  Lt as StepIndicator,
3029
3033
  Hs as Stepper,
3030
- Mt as StreamingText,
3034
+ Pt as StreamingText,
3031
3035
  ot as Tab,
3032
3036
  mt as Table,
3033
3037
  ht as TableBody,
@@ -3035,9 +3039,9 @@ export {
3035
3039
  xt as TableRow,
3036
3040
  bt as TableSubheaderRow,
3037
3041
  at as Tabs,
3038
- _t as Td,
3042
+ jt as Td,
3039
3043
  Ys as Textarea,
3040
- jt as Th,
3044
+ _t as Th,
3041
3045
  qt as ThinkingDot,
3042
3046
  It as ToastContainer,
3043
3047
  ct as Toggle,
@@ -3045,7 +3049,7 @@ export {
3045
3049
  At as ToolCallBubble,
3046
3050
  At as ToolCallCard,
3047
3051
  lt as Tooltip,
3048
- I as iconSizes,
3052
+ A as iconSizes,
3049
3053
  Es as useAnimatedNumber,
3050
3054
  As as useAnimatedPlaceholder,
3051
3055
  $s as useInView,