@donkit-ai/design-system 1.3.16 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import q, { useState as S, useRef as $, useEffect as B, useLayoutEffect as ze, useId as We } from "react";
2
- import { Check as he, X as ne, ChevronDown as xe, Minus as Fe, Plus as Ce, XCircle as ve, AlertTriangle as Ne, CheckCircle as we, Info as ye, ChevronUp as Ue, ChevronsUpDown as Ve, ChevronLeft as Ye, ChevronRight as Be, Copy as qe, Brain as He, Loader as Ke, Paperclip as Ee, Square as Ge, ArrowUp as Xe, Zap as Je, Cpu as $e } from "lucide-react";
1
+ import q, { useState as S, useRef as $, useEffect as B, useLayoutEffect as Ve, useId as Ye } from "react";
2
+ import { Check as he, X as ne, ChevronDown as xe, Minus as qe, Plus as He, XCircle as we, AlertTriangle as ye, CheckCircle as ge, Info as ke, ChevronUp as Ke, ChevronsUpDown as Ge, ChevronLeft as Xe, ChevronRight as Oe, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Te, Square as es, ArrowUp as ss, Zap as ts, Cpu as Re, FileText as rs } from "lucide-react";
3
3
  import me from "react-dom";
4
- const D = {
4
+ const I = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var je = { exports: {} }, de = {};
11
+ var ve = { exports: {} }, de = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -18,22 +18,22 @@ var je = { exports: {} }, de = {};
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
- var Te;
22
- function Ze() {
23
- if (Te) return de;
24
- Te = 1;
21
+ var Se;
22
+ function ns() {
23
+ if (Se) return de;
24
+ Se = 1;
25
25
  var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
26
- function r(o, a, n) {
27
- var i = null;
28
- if (n !== void 0 && (i = "" + n), a.key !== void 0 && (i = "" + a.key), "key" in a) {
26
+ function r(i, a, n) {
27
+ var o = null;
28
+ if (n !== void 0 && (o = "" + n), a.key !== void 0 && (o = "" + a.key), "key" in a) {
29
29
  n = {};
30
30
  for (var l in a)
31
31
  l !== "key" && (n[l] = a[l]);
32
32
  } else n = a;
33
33
  return a = n.ref, {
34
34
  $$typeof: s,
35
- type: o,
36
- key: i,
35
+ type: i,
36
+ key: o,
37
37
  ref: a !== void 0 ? a : null,
38
38
  props: n
39
39
  };
@@ -50,9 +50,9 @@ var ue = {};
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
52
  */
53
- var Re;
54
- function Qe() {
55
- return Re || (Re = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var Ae;
54
+ function as() {
55
+ return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function s(c) {
57
57
  if (c == null) return null;
58
58
  if (typeof c == "function")
@@ -65,7 +65,7 @@ function Qe() {
65
65
  return "Profiler";
66
66
  case E:
67
67
  return "StrictMode";
68
- case I:
68
+ case D:
69
69
  return "Suspense";
70
70
  case v:
71
71
  return "SuspenseList";
@@ -76,16 +76,16 @@ function Qe() {
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 _:
79
+ case b:
80
80
  return "Portal";
81
81
  case k:
82
82
  return c.displayName || "Context";
83
83
  case A:
84
84
  return (c._context.displayName || "Context") + ".Consumer";
85
- case M:
85
+ case O:
86
86
  var N = c.render;
87
87
  return c = c.displayName, c || (c = N.displayName || N.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
88
- case L:
88
+ case M:
89
89
  return N = c.displayName || null, N !== null ? N : s(c.type) || "Memo";
90
90
  case z:
91
91
  N = c._payload, c = c._init;
@@ -108,15 +108,15 @@ function Qe() {
108
108
  }
109
109
  if (N) {
110
110
  N = console;
111
- var P = N.error, W = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
111
+ var P = N.error, F = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
112
112
  return P.call(
113
113
  N,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
- W
115
+ F
116
116
  ), t(c);
117
117
  }
118
118
  }
119
- function o(c) {
119
+ function i(c) {
120
120
  if (c === R) return "<>";
121
121
  if (typeof c == "object" && c !== null && c.$$typeof === z)
122
122
  return "<...>";
@@ -134,7 +134,7 @@ function Qe() {
134
134
  function n() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
- function i(c) {
137
+ function o(c) {
138
138
  if (U.call(c, "key")) {
139
139
  var N = Object.getOwnPropertyDescriptor(c, "key").get;
140
140
  if (N && N.isReactWarning) return !1;
@@ -143,7 +143,7 @@ function Qe() {
143
143
  }
144
144
  function l(c, N) {
145
145
  function P() {
146
- O || (O = !0, console.error(
146
+ L || (L = !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
148
  N
149
149
  ));
@@ -153,23 +153,23 @@ function Qe() {
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function p() {
156
+ function m() {
157
157
  var c = s(this.type);
158
158
  return C[c] || (C[c] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), c = this.props.ref, c !== void 0 ? c : null;
161
161
  }
162
- function u(c, N, P, W, se, ae) {
163
- var F = P.ref;
162
+ function u(c, N, P, F, te, ae) {
163
+ var W = P.ref;
164
164
  return c = {
165
- $$typeof: b,
165
+ $$typeof: x,
166
166
  type: c,
167
167
  key: N,
168
168
  props: P,
169
- _owner: W
170
- }, (F !== void 0 ? F : null) !== null ? Object.defineProperty(c, "ref", {
169
+ _owner: F
170
+ }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(c, "ref", {
171
171
  enumerable: !1,
172
- get: p
172
+ get: m
173
173
  }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -184,7 +184,7 @@ function Qe() {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: se
187
+ value: te
188
188
  }), Object.defineProperty(c, "_debugTask", {
189
189
  configurable: !1,
190
190
  enumerable: !1,
@@ -192,61 +192,61 @@ function Qe() {
192
192
  value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function m(c, N, P, W, se, ae) {
196
- var F = N.children;
197
- if (F !== void 0)
198
- if (W)
199
- if (x(F)) {
200
- for (W = 0; W < F.length; W++)
201
- f(F[W]);
202
- Object.freeze && Object.freeze(F);
195
+ function f(c, N, P, F, te, ae) {
196
+ var W = N.children;
197
+ if (W !== void 0)
198
+ if (F)
199
+ if (_(W)) {
200
+ for (F = 0; F < W.length; F++)
201
+ p(W[F]);
202
+ Object.freeze && Object.freeze(W);
203
203
  } else
204
204
  console.error(
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
- else f(F);
207
+ else p(W);
208
208
  if (U.call(N, "key")) {
209
- F = s(c);
210
- var Q = Object.keys(N).filter(function(be) {
211
- return be !== "key";
209
+ W = s(c);
210
+ var Q = Object.keys(N).filter(function(_e) {
211
+ return _e !== "key";
212
212
  });
213
- W = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", w[F + W] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ F = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", w[W + F] || (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} />
217
217
  React keys must be passed directly to JSX without using spread:
218
218
  let props = %s;
219
219
  <%s key={someKey} {...props} />`,
220
- W,
221
220
  F,
221
+ W,
222
222
  Q,
223
- F
224
- ), w[F + W] = !0);
223
+ W
224
+ ), w[W + F] = !0);
225
225
  }
226
- if (F = null, P !== void 0 && (r(P), F = "" + P), i(N) && (r(N.key), F = "" + N.key), "key" in N) {
226
+ if (W = null, P !== void 0 && (r(P), W = "" + P), o(N) && (r(N.key), W = "" + N.key), "key" in N) {
227
227
  P = {};
228
- for (var oe in N)
229
- oe !== "key" && (P[oe] = N[oe]);
228
+ for (var ie in N)
229
+ ie !== "key" && (P[ie] = N[ie]);
230
230
  } else P = N;
231
- return F && l(
231
+ return W && l(
232
232
  P,
233
233
  typeof c == "function" ? c.displayName || c.name || "Unknown" : c
234
234
  ), u(
235
235
  c,
236
- F,
236
+ W,
237
237
  P,
238
238
  a(),
239
- se,
239
+ te,
240
240
  ae
241
241
  );
242
242
  }
243
- function f(c) {
243
+ function p(c) {
244
244
  h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === z && (c._payload.status === "fulfilled" ? h(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
245
245
  }
246
246
  function h(c) {
247
- return typeof c == "object" && c !== null && c.$$typeof === b;
247
+ return typeof c == "object" && c !== null && c.$$typeof === x;
248
248
  }
249
- var d = q, b = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), k = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), X = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, y = console.createTask ? console.createTask : function() {
249
+ var d = q, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), k = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), X = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, _ = Array.isArray, y = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  d = {
@@ -254,78 +254,78 @@ React keys must be passed directly to JSX without using spread:
254
254
  return c();
255
255
  }
256
256
  };
257
- var O, C = {}, K = d.react_stack_bottom_frame.bind(
257
+ var L, C = {}, K = d.react_stack_bottom_frame.bind(
258
258
  d,
259
259
  n
260
- )(), Z = y(o(n)), w = {};
260
+ )(), Z = y(i(n)), w = {};
261
261
  ue.Fragment = R, ue.jsx = function(c, N, P) {
262
- var W = 1e4 > X.recentlyCreatedOwnerStacks++;
263
- return m(
262
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
263
+ return f(
264
264
  c,
265
265
  N,
266
266
  P,
267
267
  !1,
268
- W ? Error("react-stack-top-frame") : K,
269
- W ? y(o(c)) : Z
268
+ F ? Error("react-stack-top-frame") : K,
269
+ F ? y(i(c)) : Z
270
270
  );
271
271
  }, ue.jsxs = function(c, N, P) {
272
- var W = 1e4 > X.recentlyCreatedOwnerStacks++;
273
- return m(
272
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
273
+ return f(
274
274
  c,
275
275
  N,
276
276
  P,
277
277
  !0,
278
- W ? Error("react-stack-top-frame") : K,
279
- W ? y(o(c)) : Z
278
+ F ? Error("react-stack-top-frame") : K,
279
+ F ? y(i(c)) : Z
280
280
  );
281
281
  };
282
282
  }()), ue;
283
283
  }
284
- process.env.NODE_ENV === "production" ? je.exports = Ze() : je.exports = Qe();
285
- var e = je.exports;
286
- function et({ size: s = "m", color: t = "default", className: r = "", ...o }) {
284
+ process.env.NODE_ENV === "production" ? ve.exports = ns() : ve.exports = as();
285
+ var e = ve.exports;
286
+ function is({ size: s = "m", color: t = "default", className: r = "", ...i }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
290
290
  className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, r].filter(Boolean).join(" "),
291
291
  role: "status",
292
292
  "aria-label": "Loading",
293
- ...o
293
+ ...i
294
294
  }
295
295
  );
296
296
  }
297
- const tt = { xs: 12, s: 14, m: 16, l: 20 };
297
+ const os = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function fe({
299
299
  children: s,
300
300
  variant: t = "primary",
301
301
  size: r = "m",
302
- fullWidth: o = !1,
302
+ fullWidth: i = !1,
303
303
  icon: a,
304
304
  disabled: n = !1,
305
- state: i = "idle",
305
+ state: o = "idle",
306
306
  onClick: l,
307
- type: p = "button",
307
+ type: m = "button",
308
308
  href: u,
309
- "aria-label": m,
310
- ...f
309
+ "aria-label": f,
310
+ ...p
311
311
  }) {
312
- const h = a && !s, d = i === "loading", b = i === "success", _ = i === "error", R = d || b || _, E = r === "xs" ? "s" : "m", g = tt[r] ?? 16, A = d ? /* @__PURE__ */ e.jsx(et, { size: E }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(he, { size: g, strokeWidth: 2.5 }) }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: g, strokeWidth: 2.5 }) }) : null, k = [
312
+ const h = a && !s, d = o === "loading", x = o === "success", b = o === "error", R = d || x || b, E = r === "xs" ? "s" : "m", g = os[r] ?? 16, A = d ? /* @__PURE__ */ e.jsx(is, { size: E }) : x ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(he, { size: g, strokeWidth: 2.5 }) }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: g, strokeWidth: 2.5 }) }) : null, k = [
313
313
  "ds-button",
314
314
  `ds-button--${t}`,
315
315
  `ds-button--${r}`,
316
- o && "ds-button--full",
316
+ i && "ds-button--full",
317
317
  h && "ds-button--icon-only"
318
- ].filter(Boolean).join(" "), M = i !== "idle" ? i : void 0, I = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
318
+ ].filter(Boolean).join(" "), O = o !== "idle" ? o : void 0, D = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
319
319
  R ? A : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
320
320
  s
321
321
  ] });
322
322
  if (u) {
323
- const v = (L) => {
323
+ const v = (M) => {
324
324
  if (n || d) {
325
- L.preventDefault();
325
+ M.preventDefault();
326
326
  return;
327
327
  }
328
- L.metaKey || L.ctrlKey || L.button === 1 || (L.preventDefault(), l == null || l(L));
328
+ M.metaKey || M.ctrlKey || M.button === 1 || (M.preventDefault(), l == null || l(M));
329
329
  };
330
330
  return /* @__PURE__ */ e.jsx(
331
331
  "a",
@@ -333,57 +333,57 @@ function fe({
333
333
  className: k,
334
334
  href: n || d ? void 0 : u,
335
335
  onClick: v,
336
- "aria-label": m,
336
+ "aria-label": f,
337
337
  "aria-disabled": n || d ? "true" : void 0,
338
338
  "aria-busy": d ? "true" : void 0,
339
- "data-state": M,
340
- ...f,
341
- children: I
339
+ "data-state": O,
340
+ ...p,
341
+ children: D
342
342
  }
343
343
  );
344
344
  }
345
345
  return /* @__PURE__ */ e.jsx(
346
346
  "button",
347
347
  {
348
- type: p,
348
+ type: m,
349
349
  className: k,
350
350
  disabled: n,
351
351
  onClick: d ? void 0 : l,
352
- "aria-label": m,
352
+ "aria-label": f,
353
353
  "aria-busy": d ? "true" : void 0,
354
- "data-state": M,
355
- ...f,
356
- children: I
354
+ "data-state": O,
355
+ ...p,
356
+ children: D
357
357
  }
358
358
  );
359
359
  }
360
- function St({
360
+ function Os({
361
361
  label: s,
362
362
  error: t,
363
363
  hint: r,
364
- fullWidth: o = !0,
364
+ fullWidth: i = !0,
365
365
  icon: a,
366
366
  iconRight: n,
367
- onIconRightClick: i,
367
+ onIconRightClick: o,
368
368
  size: l = "m",
369
- disabled: p,
369
+ disabled: m,
370
370
  id: u,
371
- ...m
371
+ ...f
372
372
  }) {
373
- const f = u || `input-${q.useId()}`, h = r ? `${f}-hint` : void 0, d = t ? `${f}-error` : void 0, b = d || h;
374
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
375
- s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: s }),
373
+ const p = u || `input-${q.useId()}`, h = r ? `${p}-hint` : void 0, d = t ? `${p}-error` : void 0, x = d || h;
374
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${i ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
375
+ s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: s }),
376
376
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
377
377
  a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
378
378
  /* @__PURE__ */ e.jsx(
379
379
  "input",
380
380
  {
381
- id: f,
381
+ id: p,
382
382
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
383
- disabled: p,
383
+ disabled: m,
384
384
  "aria-invalid": t ? "true" : "false",
385
- "aria-describedby": b,
386
- ...m
385
+ "aria-describedby": x,
386
+ ...f
387
387
  }
388
388
  ),
389
389
  n && /* @__PURE__ */ e.jsx(
@@ -391,7 +391,7 @@ function St({
391
391
  {
392
392
  type: "button",
393
393
  className: `ds-input-icon-right ds-input-icon-right--${l}`,
394
- onClick: i,
394
+ onClick: o,
395
395
  tabIndex: -1,
396
396
  "aria-label": "Toggle visibility",
397
397
  children: n
@@ -402,114 +402,114 @@ function St({
402
402
  /* @__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: d, className: "ds-input-error", role: "alert", children: t }) }) })
403
403
  ] });
404
404
  }
405
- function At({
405
+ function zs({
406
406
  label: s,
407
407
  error: t,
408
408
  hint: r,
409
- fullWidth: o = !0,
409
+ fullWidth: i = !0,
410
410
  size: a = "m",
411
411
  disabled: n,
412
- id: i,
412
+ id: o,
413
413
  resize: l = !0,
414
- rows: p = 3,
414
+ rows: m = 3,
415
415
  ...u
416
416
  }) {
417
- const m = i || `textarea-${q.useId()}`, f = r ? `${m}-hint` : void 0, h = t ? `${m}-error` : void 0, d = h || f;
418
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
- s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: s }),
417
+ const f = o || `textarea-${q.useId()}`, p = r ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, d = h || p;
418
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${i ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
+ s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: f, children: s }),
420
420
  /* @__PURE__ */ e.jsx(
421
421
  "textarea",
422
422
  {
423
- id: m,
423
+ id: f,
424
424
  className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
425
425
  disabled: n,
426
426
  "aria-invalid": t ? "true" : "false",
427
427
  "aria-describedby": d,
428
- rows: p,
428
+ rows: m,
429
429
  ...u
430
430
  }
431
431
  ),
432
- r && !t && /* @__PURE__ */ e.jsx("span", { id: f, className: "ds-textarea-hint", children: r }),
432
+ r && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: r }),
433
433
  t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
434
434
  ] });
435
435
  }
436
- function It({
436
+ function Fs({
437
437
  label: s,
438
438
  value: t,
439
439
  onChange: r,
440
- options: o = [],
440
+ options: i = [],
441
441
  placeholder: a = "Select option",
442
442
  error: n,
443
- fullWidth: i = !0,
443
+ fullWidth: o = !0,
444
444
  size: l = "m",
445
- disabled: p = !1,
445
+ disabled: m = !1,
446
446
  id: u,
447
- ...m
447
+ ...f
448
448
  }) {
449
- const [f, h] = S(!1), [d, b] = S(!1), [_, R] = S({}), [E, g] = S("down"), [A, k] = S(-1), M = $(null), I = $(null), v = $(null), L = $(null), z = u || `select-${q.useId()}`, Y = `${z}-label`, H = n ? `${z}-error` : void 0, X = 150, U = (w = !1) => {
450
- d || (b(!0), k(-1), L.current = setTimeout(() => {
449
+ const [p, h] = S(!1), [d, x] = S(!1), [b, R] = S({}), [E, g] = S("down"), [A, k] = S(-1), O = $(null), D = $(null), v = $(null), M = $(null), z = u || `select-${q.useId()}`, Y = `${z}-label`, H = n ? `${z}-error` : void 0, X = 150, U = (w = !1) => {
450
+ d || (x(!0), k(-1), M.current = setTimeout(() => {
451
451
  var c;
452
- h(!1), b(!1), w && ((c = v.current) == null || c.focus());
452
+ h(!1), x(!1), w && ((c = v.current) == null || c.focus());
453
453
  }, X));
454
- }, x = (w) => {
455
- clearTimeout(L.current), b(!1);
456
- const c = w !== void 0 ? w : Math.max(o.findIndex((N) => N.value === t), 0);
454
+ }, _ = (w) => {
455
+ clearTimeout(M.current), x(!1);
456
+ const c = w !== void 0 ? w : Math.max(i.findIndex((N) => N.value === t), 0);
457
457
  k(c), h(!0);
458
458
  };
459
- B(() => () => clearTimeout(L.current), []);
459
+ B(() => () => clearTimeout(M.current), []);
460
460
  const y = () => {
461
461
  var ae;
462
- const w = (ae = M.current) == null ? void 0 : ae.getBoundingClientRect();
462
+ const w = (ae = O.current) == null ? void 0 : ae.getBoundingClientRect();
463
463
  if (!w) return;
464
- const c = window.innerHeight, N = c - w.bottom, P = w.top, se = N < 300 && P > N;
465
- g(se ? "up" : "down"), R(
466
- se ? { bottom: c - w.top + 4, left: w.left, width: w.width } : { top: w.bottom + 4, left: w.left, width: w.width }
464
+ const c = window.innerHeight, N = c - w.bottom, P = w.top, te = N < 300 && P > N;
465
+ g(te ? "up" : "down"), R(
466
+ te ? { bottom: c - w.top + 4, left: w.left, width: w.width } : { top: w.bottom + 4, left: w.left, width: w.width }
467
467
  );
468
468
  };
469
469
  B(() => {
470
- if (f)
470
+ if (p)
471
471
  return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
472
472
  window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
473
473
  };
474
- }, [f]), B(() => {
474
+ }, [p]), B(() => {
475
475
  const w = (c) => {
476
- M.current && !M.current.contains(c.target) && I.current && !I.current.contains(c.target) && U();
476
+ O.current && !O.current.contains(c.target) && D.current && !D.current.contains(c.target) && U();
477
477
  };
478
478
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
479
479
  }, [d]), B(() => {
480
480
  var c;
481
- if (!f || A < 0 || !I.current) return;
482
- (c = I.current.querySelectorAll(".ds-select-option")[A]) == null || c.scrollIntoView({ block: "nearest" });
483
- }, [A, f]);
484
- const O = (w) => {
481
+ if (!p || A < 0 || !D.current) return;
482
+ (c = D.current.querySelectorAll(".ds-select-option")[A]) == null || c.scrollIntoView({ block: "nearest" });
483
+ }, [A, p]);
484
+ const L = (w) => {
485
485
  switch (w.key) {
486
486
  case "ArrowDown":
487
- w.preventDefault(), f ? k((c) => Math.min(c + 1, o.length - 1)) : x();
487
+ w.preventDefault(), p ? k((c) => Math.min(c + 1, i.length - 1)) : _();
488
488
  break;
489
489
  case "ArrowUp":
490
- w.preventDefault(), f ? k((c) => Math.max(c - 1, 0)) : x(o.length - 1);
490
+ w.preventDefault(), p ? k((c) => Math.max(c - 1, 0)) : _(i.length - 1);
491
491
  break;
492
492
  case "Home":
493
- f && (w.preventDefault(), k(0));
493
+ p && (w.preventDefault(), k(0));
494
494
  break;
495
495
  case "End":
496
- f && (w.preventDefault(), k(o.length - 1));
496
+ p && (w.preventDefault(), k(i.length - 1));
497
497
  break;
498
498
  case "Enter":
499
499
  case " ":
500
- w.preventDefault(), f ? A >= 0 && (r == null || r(o[A].value), U(!0)) : x();
500
+ w.preventDefault(), p ? A >= 0 && (r == null || r(i[A].value), U(!0)) : _();
501
501
  break;
502
502
  case "Escape":
503
- f && (w.preventDefault(), U(!0));
503
+ p && (w.preventDefault(), U(!0));
504
504
  break;
505
505
  case "Tab":
506
- f && U(!1);
506
+ p && U(!1);
507
507
  break;
508
508
  }
509
- }, C = o.find((w) => w.value === t), K = l === "xs" ? D[1] : l === "small" ? D[2] : D[3], Z = f && /* @__PURE__ */ e.jsx(
509
+ }, C = i.find((w) => w.value === t), K = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], Z = p && /* @__PURE__ */ e.jsx(
510
510
  "div",
511
511
  {
512
- ref: I,
512
+ ref: D,
513
513
  role: "listbox",
514
514
  "aria-labelledby": s ? Y : void 0,
515
515
  tabIndex: -1,
@@ -519,8 +519,8 @@ function It({
519
519
  `ds-select-dropdown--${E}`,
520
520
  d && "ds-select-dropdown--closing"
521
521
  ].filter(Boolean).join(" "),
522
- style: _,
523
- children: o.map((w, c) => /* @__PURE__ */ e.jsx(
522
+ style: b,
523
+ children: i.map((w, c) => /* @__PURE__ */ e.jsx(
524
524
  "button",
525
525
  {
526
526
  id: `${z}-opt-${c}`,
@@ -543,9 +543,9 @@ function It({
543
543
  ))
544
544
  }
545
545
  );
546
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
546
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${o ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
547
547
  s && /* @__PURE__ */ e.jsx("label", { id: Y, className: "ds-select-label", children: s }),
548
- /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
548
+ /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: O, children: /* @__PURE__ */ e.jsxs(
549
549
  "button",
550
550
  {
551
551
  ref: v,
@@ -553,18 +553,18 @@ function It({
553
553
  id: z,
554
554
  role: "combobox",
555
555
  "aria-haspopup": "listbox",
556
- "aria-expanded": f,
557
- "aria-activedescendant": f && A >= 0 ? `${z}-opt-${A}` : void 0,
556
+ "aria-expanded": p,
557
+ "aria-activedescendant": p && A >= 0 ? `${z}-opt-${A}` : void 0,
558
558
  "aria-labelledby": s ? Y : void 0,
559
559
  "aria-invalid": n ? "true" : "false",
560
560
  "aria-describedby": H,
561
561
  className: `ds-select-trigger ds-select-trigger--${l} ${n ? "ds-select-trigger--error" : ""}`,
562
562
  onClick: () => {
563
- p || (f ? U() : x());
563
+ m || (p ? U() : _());
564
564
  },
565
- onKeyDown: O,
566
- disabled: p,
567
- ...m,
565
+ onKeyDown: L,
566
+ disabled: m,
567
+ ...f,
568
568
  children: [
569
569
  /* @__PURE__ */ e.jsx("span", { className: C ? "" : "ds-select-placeholder", children: (C == null ? void 0 : C.label) || a }),
570
570
  /* @__PURE__ */ e.jsx(
@@ -572,7 +572,7 @@ function It({
572
572
  {
573
573
  size: K,
574
574
  strokeWidth: 1.5,
575
- className: `ds-select-icon ${f && E === "down" ? "ds-select-icon--open" : ""} ${f && E === "up" ? "ds-select-icon--up" : ""}`,
575
+ className: `ds-select-icon ${p && E === "down" ? "ds-select-icon--open" : ""} ${p && E === "up" ? "ds-select-icon--up" : ""}`,
576
576
  "aria-hidden": "true"
577
577
  }
578
578
  )
@@ -583,60 +583,60 @@ function It({
583
583
  typeof document < "u" && me.createPortal(Z, document.body)
584
584
  ] });
585
585
  }
586
- function Dt({
586
+ function Ws({
587
587
  label: s,
588
588
  value: t = 0,
589
589
  onChange: r,
590
- min: o = 0,
590
+ min: i = 0,
591
591
  max: a = 100,
592
592
  step: n = 1,
593
- size: i = "m",
593
+ size: o = "m",
594
594
  disabled: l = !1,
595
- hint: p,
595
+ hint: m,
596
596
  error: u,
597
- ...m
597
+ ...f
598
598
  }) {
599
- const f = () => {
599
+ const p = () => {
600
600
  if (l) return;
601
601
  const E = Math.min(Number(t) + n, a);
602
602
  r == null || r(E);
603
603
  }, h = () => {
604
604
  if (l) return;
605
- const E = Math.max(Number(t) - n, o);
605
+ const E = Math.max(Number(t) - n, i);
606
606
  r == null || r(E);
607
607
  }, d = (E) => {
608
608
  if (l) return;
609
609
  const g = E.target.value;
610
610
  if (g === "") {
611
- r == null || r(o);
611
+ r == null || r(i);
612
612
  return;
613
613
  }
614
614
  const A = Number(g);
615
615
  if (!isNaN(A)) {
616
- const k = Math.min(Math.max(A, o), a);
616
+ const k = Math.min(Math.max(A, i), a);
617
617
  r == null || r(k);
618
618
  }
619
- }, b = [
619
+ }, x = [
620
620
  "ds-stepper-wrapper",
621
621
  l && "ds-stepper-wrapper--disabled",
622
622
  u && "ds-stepper-wrapper--error"
623
- ].filter(Boolean).join(" "), _ = [
623
+ ].filter(Boolean).join(" "), b = [
624
624
  "ds-stepper",
625
- `ds-stepper--${i}`,
625
+ `ds-stepper--${o}`,
626
626
  l && "ds-stepper--disabled"
627
- ].filter(Boolean).join(" "), R = i === "xs" ? D[1] : i === "small" ? D[2] : D[3];
628
- return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
627
+ ].filter(Boolean).join(" "), R = o === "xs" ? I[1] : o === "small" ? I[2] : I[3];
628
+ return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
629
629
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
630
- /* @__PURE__ */ e.jsxs("div", { className: _, children: [
630
+ /* @__PURE__ */ e.jsxs("div", { className: b, children: [
631
631
  /* @__PURE__ */ e.jsx(
632
632
  "button",
633
633
  {
634
634
  type: "button",
635
635
  className: "ds-stepper-button ds-stepper-button--minus",
636
636
  onClick: h,
637
- disabled: l || t <= o,
637
+ disabled: l || t <= i,
638
638
  "aria-label": "Decrease",
639
- children: /* @__PURE__ */ e.jsx(Fe, { size: R, strokeWidth: 1.5 })
639
+ children: /* @__PURE__ */ e.jsx(qe, { size: R, strokeWidth: 1.5 })
640
640
  }
641
641
  ),
642
642
  /* @__PURE__ */ e.jsx(
@@ -646,11 +646,11 @@ function Dt({
646
646
  className: "ds-stepper-input",
647
647
  value: t,
648
648
  onChange: d,
649
- min: o,
649
+ min: i,
650
650
  max: a,
651
651
  step: n,
652
652
  disabled: l,
653
- ...m
653
+ ...f
654
654
  }
655
655
  ),
656
656
  /* @__PURE__ */ e.jsx(
@@ -658,62 +658,62 @@ function Dt({
658
658
  {
659
659
  type: "button",
660
660
  className: "ds-stepper-button ds-stepper-button--plus",
661
- onClick: f,
661
+ onClick: p,
662
662
  disabled: l || t >= a,
663
663
  "aria-label": "Increase",
664
- children: /* @__PURE__ */ e.jsx(Ce, { size: R, strokeWidth: 1.5 })
664
+ children: /* @__PURE__ */ e.jsx(He, { size: R, strokeWidth: 1.5 })
665
665
  }
666
666
  )
667
667
  ] }),
668
- p && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: p }),
668
+ m && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: m }),
669
669
  u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
670
670
  ] });
671
671
  }
672
- function st({
672
+ function ls({
673
673
  children: s,
674
674
  padding: t = "m",
675
675
  variant: r = "info",
676
- hover: o = !1,
676
+ hover: i = !1,
677
677
  // deprecated, use variant="interactive"
678
678
  onClick: a,
679
679
  href: n,
680
- disabled: i = !1,
680
+ disabled: o = !1,
681
681
  ...l
682
682
  }) {
683
- const u = (o ? "interactive" : r) === "interactive" || a || n, m = [
683
+ const u = (i ? "interactive" : r) === "interactive" || a || n, f = [
684
684
  "ds-card",
685
685
  `ds-card--${t}`,
686
686
  u && "ds-card--interactive"
687
687
  ].filter(Boolean).join(" ");
688
688
  if (n) {
689
- const d = (b) => {
690
- if (i) {
691
- b.preventDefault();
689
+ const d = (x) => {
690
+ if (o) {
691
+ x.preventDefault();
692
692
  return;
693
693
  }
694
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
694
+ x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), a == null || a(x));
695
695
  };
696
696
  return /* @__PURE__ */ e.jsx(
697
697
  "a",
698
698
  {
699
- className: m,
700
- href: i ? void 0 : n,
699
+ className: f,
700
+ href: o ? void 0 : n,
701
701
  onClick: d,
702
- "aria-disabled": i ? "true" : void 0,
702
+ "aria-disabled": o ? "true" : void 0,
703
703
  ...l,
704
704
  children: s
705
705
  }
706
706
  );
707
707
  }
708
- const f = u && a ? "button" : "div", h = u && a ? {
708
+ const p = u && a ? "button" : "div", h = u && a ? {
709
709
  type: "button",
710
710
  onClick: a,
711
- disabled: i
711
+ disabled: o
712
712
  } : {};
713
713
  return /* @__PURE__ */ e.jsx(
714
- f,
714
+ p,
715
715
  {
716
- className: m,
716
+ className: f,
717
717
  role: u && !a ? "article" : void 0,
718
718
  ...h,
719
719
  ...l,
@@ -721,146 +721,146 @@ function st({
721
721
  }
722
722
  );
723
723
  }
724
- function Bt({ children: s, ...t }) {
724
+ function Cs({ children: s, ...t }) {
725
725
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
726
726
  }
727
- function Pt({ children: s, ...t }) {
727
+ function Us({ children: s, ...t }) {
728
728
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
729
729
  }
730
- function Lt({ children: s, ...t }) {
730
+ function Vs({ children: s, ...t }) {
731
731
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
732
732
  }
733
- function Ot({ children: s, ...t }) {
733
+ function Ys({ children: s, ...t }) {
734
734
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
735
735
  }
736
- function Mt({ children: s, secondary: t = !1, ...r }) {
736
+ function qs({ children: s, secondary: t = !1, ...r }) {
737
737
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
738
738
  }
739
- function rt({ children: s, secondary: t = !1, ...r }) {
739
+ function cs({ children: s, secondary: t = !1, ...r }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...r, children: s });
741
741
  }
742
- function Pe({ children: s, secondary: t = !1, ...r }) {
742
+ function ze({ children: s, secondary: t = !1, ...r }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
744
744
  }
745
745
  function pe({
746
746
  children: s,
747
747
  variant: t = "default",
748
748
  size: r = "m",
749
- role: o,
749
+ role: i,
750
750
  ...a
751
751
  }) {
752
752
  const n = [
753
753
  "ds-badge",
754
754
  `ds-badge--${t}`,
755
755
  `ds-badge--${r}`
756
- ].filter(Boolean).join(" "), i = o || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
757
- return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...a, children: s });
758
- }
759
- const nt = {
760
- info: ye,
761
- success: we,
762
- warning: Ne,
763
- error: ve
756
+ ].filter(Boolean).join(" "), o = i || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
757
+ return /* @__PURE__ */ e.jsx("span", { className: n, role: o, ...a, children: s });
758
+ }
759
+ const ds = {
760
+ info: ke,
761
+ success: ge,
762
+ warning: ye,
763
+ error: we
764
764
  };
765
- function zt({
765
+ function Hs({
766
766
  children: s,
767
767
  variant: t = "info",
768
768
  title: r,
769
- onClose: o,
769
+ onClose: i,
770
770
  role: a,
771
771
  ...n
772
772
  }) {
773
- const i = nt[t], l = a || (t === "error" ? "alert" : "status");
773
+ const o = ds[t], l = a || (t === "error" ? "alert" : "status");
774
774
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${r ? "" : "ds-alert--no-title"}`, role: l, ...n, children: [
775
- i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
775
+ o && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(o, { size: I[3], strokeWidth: 1.5 }) }),
776
776
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
777
777
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
778
778
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
779
779
  ] }),
780
- o && /* @__PURE__ */ e.jsx(
780
+ i && /* @__PURE__ */ e.jsx(
781
781
  "button",
782
782
  {
783
783
  type: "button",
784
784
  className: "ds-alert__close",
785
- onClick: o,
785
+ onClick: i,
786
786
  "aria-label": "Close alert",
787
- children: /* @__PURE__ */ e.jsx(ne, { size: D[3], strokeWidth: 1.5 })
787
+ children: /* @__PURE__ */ e.jsx(ne, { size: I[3], strokeWidth: 1.5 })
788
788
  }
789
789
  )
790
790
  ] });
791
791
  }
792
- const at = 200;
793
- function Wt({
792
+ const us = 200;
793
+ function Ks({
794
794
  children: s,
795
795
  title: t,
796
796
  onClose: r,
797
- size: o = "m",
797
+ size: i = "m",
798
798
  ...a
799
799
  }) {
800
- const n = $(null), i = q.useId(), [l, p] = S(!1), u = () => {
801
- !r || l || (p(!0), setTimeout(() => {
802
- p(!1), r();
803
- }, at));
800
+ const n = $(null), o = q.useId(), [l, m] = S(!1), u = () => {
801
+ !r || l || (m(!0), setTimeout(() => {
802
+ m(!1), r();
803
+ }, us));
804
804
  };
805
805
  B(() => {
806
- const d = (_) => {
807
- _.key === "Escape" && u();
808
- }, b = (_) => {
809
- n.current && !n.current.contains(_.target) && u();
806
+ const d = (b) => {
807
+ b.key === "Escape" && u();
808
+ }, x = (b) => {
809
+ n.current && !n.current.contains(b.target) && u();
810
810
  };
811
- return document.addEventListener("keydown", d), document.addEventListener("mousedown", b), () => {
812
- document.removeEventListener("keydown", d), document.removeEventListener("mousedown", b);
811
+ return document.addEventListener("keydown", d), document.addEventListener("mousedown", x), () => {
812
+ document.removeEventListener("keydown", d), document.removeEventListener("mousedown", x);
813
813
  };
814
814
  }, [r, l]);
815
- const m = q.Children.toArray(s), f = m.find((d) => (d == null ? void 0 : d.type) === Se), h = m.filter((d) => (d == null ? void 0 : d.type) !== Se);
815
+ const f = q.Children.toArray(s), p = f.find((d) => (d == null ? void 0 : d.type) === Ie), h = f.filter((d) => (d == null ? void 0 : d.type) !== Ie);
816
816
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", l && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...a, children: /* @__PURE__ */ e.jsxs(
817
817
  "div",
818
818
  {
819
- className: `ds-modal ds-modal--${o}`,
819
+ className: `ds-modal ds-modal--${i}`,
820
820
  ref: n,
821
821
  role: "dialog",
822
822
  "aria-modal": "true",
823
- "aria-labelledby": t ? i : void 0,
823
+ "aria-labelledby": t ? o : void 0,
824
824
  children: [
825
825
  (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
826
- t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-modal__title", children: t }),
826
+ t && /* @__PURE__ */ e.jsx("h3", { id: o, className: "ds-modal__title", children: t }),
827
827
  r && /* @__PURE__ */ e.jsx(
828
828
  fe,
829
829
  {
830
830
  variant: "ghost",
831
831
  size: "small",
832
- icon: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 }),
832
+ icon: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 }),
833
833
  onClick: u,
834
834
  "aria-label": "Close modal"
835
835
  }
836
836
  )
837
837
  ] }),
838
838
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: h }),
839
- f
839
+ p
840
840
  ]
841
841
  }
842
842
  ) });
843
843
  }
844
- function Se({ children: s }) {
844
+ function Ie({ children: s }) {
845
845
  return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
846
846
  }
847
- function ot({
847
+ function fs({
848
848
  children: s,
849
849
  title: t = "Code",
850
850
  defaultExpanded: r = !1,
851
- expanded: o,
851
+ expanded: i,
852
852
  onToggle: a,
853
853
  padding: n = "s",
854
- className: i = "",
854
+ className: o = "",
855
855
  ...l
856
856
  }) {
857
- const [p, u] = S(r), m = o !== void 0, f = m ? o : p, h = () => {
858
- m ? a == null || a(!o) : u((b) => !b);
857
+ const [m, u] = S(r), f = i !== void 0, p = f ? i : m, h = () => {
858
+ f ? a == null || a(!i) : u((x) => !x);
859
859
  }, d = [
860
860
  "ds-code-accordion",
861
861
  `ds-code-accordion--${n}`,
862
- f && "ds-code-accordion--expanded",
863
- i
862
+ p && "ds-code-accordion--expanded",
863
+ o
864
864
  ].filter(Boolean).join(" ");
865
865
  return /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
866
866
  /* @__PURE__ */ e.jsxs(
@@ -869,15 +869,15 @@ function ot({
869
869
  type: "button",
870
870
  className: "ds-code-accordion__header",
871
871
  onClick: h,
872
- "aria-expanded": f,
872
+ "aria-expanded": p,
873
873
  children: [
874
874
  /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: t }),
875
875
  /* @__PURE__ */ e.jsx(
876
876
  xe,
877
877
  {
878
- size: D[2],
878
+ size: I[2],
879
879
  strokeWidth: 1.5,
880
- className: `ds-code-accordion__icon ${f ? "ds-code-accordion__icon--expanded" : ""}`
880
+ className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
881
881
  }
882
882
  )
883
883
  ]
@@ -886,36 +886,36 @@ function ot({
886
886
  /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre", children: /* @__PURE__ */ e.jsx("code", { children: s }) }) }) })
887
887
  ] });
888
888
  }
889
- function Ft({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
890
- return t ? r ? /* @__PURE__ */ e.jsx(ot, { title: o, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
889
+ function Gs({ children: s, block: t = !1, collapsible: r = !1, title: i = "Code", defaultExpanded: a = !1, ...n }) {
890
+ return t ? r ? /* @__PURE__ */ e.jsx(fs, { title: i, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
891
891
  }
892
- function Ct({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
893
- const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
892
+ function Xs({ href: s, children: t, onClick: r, target: i, rel: a, ...n }) {
893
+ const l = i === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
894
894
  return /* @__PURE__ */ e.jsx(
895
895
  "a",
896
896
  {
897
897
  href: s,
898
898
  className: "ds-link",
899
899
  onClick: r,
900
- target: o,
900
+ target: i,
901
901
  rel: l,
902
902
  ...n,
903
903
  children: t
904
904
  }
905
905
  );
906
906
  }
907
- function Ut({ children: s, size: t = "m", variant: r = "ghost", ...o }) {
908
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: q.Children.map(s, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: t, variant: r }) : a) });
907
+ function Js({ children: s, size: t = "m", variant: r = "ghost", ...i }) {
908
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...i, children: q.Children.map(s, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: t, variant: r }) : a) });
909
909
  }
910
- function Vt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant: a = "ghost", disabled: n = !1, icon: i, href: l, ...p }) {
911
- const u = i && !s, m = [
910
+ function Zs({ children: s, selected: t = !1, onClick: r, size: i = "m", variant: a = "ghost", disabled: n = !1, icon: o, href: l, ...m }) {
911
+ const u = o && !s, f = [
912
912
  "ds-tab",
913
- `ds-tab--${o}`,
913
+ `ds-tab--${i}`,
914
914
  `ds-tab--${a}`,
915
915
  t && "ds-tab--selected",
916
916
  u && "ds-tab--icon-only"
917
- ].filter(Boolean).join(" "), f = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
918
- i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
917
+ ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
918
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: o }),
919
919
  s
920
920
  ] });
921
921
  if (l) {
@@ -932,11 +932,11 @@ function Vt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
932
932
  role: "tab",
933
933
  "aria-current": t ? "page" : void 0,
934
934
  "aria-disabled": n ? "true" : void 0,
935
- className: m,
935
+ className: f,
936
936
  href: n ? void 0 : l,
937
937
  onClick: h,
938
- ...p,
939
- children: f
938
+ ...m,
939
+ children: p
940
940
  }
941
941
  );
942
942
  }
@@ -945,35 +945,35 @@ function Vt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
945
945
  {
946
946
  role: "tab",
947
947
  "aria-selected": t,
948
- className: m,
948
+ className: f,
949
949
  onClick: r,
950
950
  disabled: n,
951
- ...p,
952
- children: f
951
+ ...m,
952
+ children: p
953
953
  }
954
954
  );
955
955
  }
956
- function Yt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
957
- const n = $(null), i = $(null), [l, p] = S(!1), u = $(!1), m = $(null), f = $(null), h = () => {
956
+ function Qs({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1 }) {
957
+ const n = $(null), o = $(null), [l, m] = S(!1), u = $(!1), f = $(null), p = $(null), h = () => {
958
958
  if (!n.current) return;
959
959
  const d = n.current.querySelector(`[data-value="${t}"]`);
960
960
  if (!d) return;
961
- const b = n.current.getBoundingClientRect(), _ = d.getBoundingClientRect(), R = _.left - b.left, E = _.width;
962
- i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = R + "px", i.current.style.width = E + "px", u.current = !1) : (p(!0), requestAnimationFrame(() => {
963
- if (!i.current || !n.current) return;
961
+ const x = n.current.getBoundingClientRect(), b = d.getBoundingClientRect(), R = b.left - x.left, E = b.width;
962
+ o.current ? (o.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", o.current.style.left = R + "px", o.current.style.width = E + "px", u.current = !1) : (m(!0), requestAnimationFrame(() => {
963
+ if (!o.current || !n.current) return;
964
964
  const g = n.current.querySelector(`[data-value="${t}"]`);
965
965
  if (!g) return;
966
966
  const A = n.current.getBoundingClientRect(), k = g.getBoundingClientRect();
967
- i.current.style.transition = "none", i.current.style.left = k.left - A.left + "px", i.current.style.width = k.width + "px";
967
+ o.current.style.transition = "none", o.current.style.left = k.left - A.left + "px", o.current.style.width = k.width + "px";
968
968
  }));
969
969
  };
970
- return f.current = h, ze(() => {
971
- const d = m.current !== t;
972
- m.current = t, u.current = l && d, h();
970
+ return p.current = h, Ve(() => {
971
+ const d = f.current !== t;
972
+ f.current = t, u.current = l && d, h();
973
973
  }), B(() => {
974
974
  if (!n.current) return;
975
975
  const d = new ResizeObserver(() => {
976
- u.current = !1, f.current();
976
+ u.current = !1, p.current();
977
977
  });
978
978
  return d.observe(n.current), () => d.disconnect();
979
979
  }, []), /* @__PURE__ */ e.jsxs(
@@ -981,7 +981,7 @@ function Yt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
981
981
  {
982
982
  className: [
983
983
  "ds-seg",
984
- `ds-seg--${o}`,
984
+ `ds-seg--${i}`,
985
985
  a && "ds-seg--disabled"
986
986
  ].filter(Boolean).join(" "),
987
987
  ref: n,
@@ -990,7 +990,7 @@ function Yt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
990
990
  l && /* @__PURE__ */ e.jsx(
991
991
  "div",
992
992
  {
993
- ref: i,
993
+ ref: o,
994
994
  className: "ds-seg__pill",
995
995
  "aria-hidden": "true"
996
996
  }
@@ -1015,38 +1015,38 @@ function Yt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
1015
1015
  }
1016
1016
  );
1017
1017
  }
1018
- function it({
1018
+ function Fe({
1019
1019
  children: s,
1020
1020
  title: t,
1021
1021
  defaultExpanded: r = !1,
1022
- expanded: o,
1022
+ expanded: i,
1023
1023
  onToggle: a,
1024
1024
  padding: n = "m",
1025
- ...i
1025
+ ...o
1026
1026
  }) {
1027
- const [l, p] = S(r), u = o !== void 0, m = u ? o : l, f = () => {
1028
- u ? a == null || a(!o) : p((d) => !d);
1027
+ const [l, m] = S(r), u = i !== void 0, f = u ? i : l, p = () => {
1028
+ u ? a == null || a(!i) : m((d) => !d);
1029
1029
  }, h = [
1030
1030
  "ds-accordion",
1031
1031
  `ds-accordion--${n}`,
1032
- m && "ds-accordion--expanded"
1032
+ f && "ds-accordion--expanded"
1033
1033
  ].filter(Boolean).join(" ");
1034
- return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
1034
+ return /* @__PURE__ */ e.jsxs("div", { className: h, ...o, children: [
1035
1035
  /* @__PURE__ */ e.jsxs(
1036
1036
  "button",
1037
1037
  {
1038
1038
  type: "button",
1039
1039
  className: "ds-accordion__header",
1040
- onClick: f,
1041
- "aria-expanded": m,
1040
+ onClick: p,
1041
+ "aria-expanded": f,
1042
1042
  children: [
1043
1043
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: t }),
1044
1044
  /* @__PURE__ */ e.jsx(
1045
1045
  xe,
1046
1046
  {
1047
- size: D[2],
1047
+ size: I[2],
1048
1048
  strokeWidth: 1.5,
1049
- className: `ds-accordion__icon ${m ? "ds-accordion__icon--expanded" : ""}`
1049
+ className: `ds-accordion__icon ${f ? "ds-accordion__icon--expanded" : ""}`
1050
1050
  }
1051
1051
  )
1052
1052
  ]
@@ -1056,8 +1056,8 @@ function it({
1056
1056
  ] });
1057
1057
  }
1058
1058
  const re = 8, le = 8;
1059
- function lt(s, t, r) {
1060
- const o = window.innerWidth;
1059
+ function ms(s, t, r) {
1060
+ const i = window.innerWidth;
1061
1061
  let a, n;
1062
1062
  switch (s) {
1063
1063
  case "top":
@@ -1075,22 +1075,22 @@ function lt(s, t, r) {
1075
1075
  default:
1076
1076
  a = t.bottom + re, n = t.left;
1077
1077
  }
1078
- const i = Math.max(le, Math.min(o - r.width - le, n)), l = n - i;
1079
- return { top: a, left: i, arrowOffset: l };
1078
+ const o = Math.max(le, Math.min(i - r.width - le, n)), l = n - o;
1079
+ return { top: a, left: o, arrowOffset: l };
1080
1080
  }
1081
- function ct(s, t, r) {
1082
- const o = window.innerWidth, a = window.innerHeight;
1081
+ function ps(s, t, r) {
1082
+ const i = window.innerWidth, a = window.innerHeight;
1083
1083
  if (s.top >= t + re + le) return "top";
1084
1084
  if (a - s.bottom >= t + re + le) return "bottom";
1085
- if (o - s.right >= r + re + le) return "right";
1085
+ if (i - s.right >= r + re + le) return "right";
1086
1086
  if (s.left >= r + re + le) return "left";
1087
- const n = Math.max(s.top, a - s.bottom, s.left, o - s.right);
1088
- return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === o - s.right ? "right" : "left";
1087
+ const n = Math.max(s.top, a - s.bottom, s.left, i - s.right);
1088
+ return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === i - s.right ? "right" : "left";
1089
1089
  }
1090
- function qt({ children: s, content: t, position: r, ...o }) {
1091
- const [a, n] = S(!1), [i, l] = S({ visibility: "hidden" }), [p, u] = S(r || "top"), m = $(null), f = $(null), h = $(!1), d = () => {
1092
- if (!m.current || !f.current) return;
1093
- const _ = m.current.getBoundingClientRect(), R = f.current.getBoundingClientRect(), E = r || ct(_, R.height, R.width), { top: g, left: A, arrowOffset: k } = lt(E, _, R);
1090
+ function et({ children: s, content: t, position: r, ...i }) {
1091
+ const [a, n] = S(!1), [o, l] = S({ visibility: "hidden" }), [m, u] = S(r || "top"), f = $(null), p = $(null), h = $(!1), d = () => {
1092
+ if (!f.current || !p.current) return;
1093
+ const b = f.current.getBoundingClientRect(), R = p.current.getBoundingClientRect(), E = r || ps(b, R.height, R.width), { top: g, left: A, arrowOffset: k } = ms(E, b, R);
1094
1094
  u(E), l({
1095
1095
  position: "fixed",
1096
1096
  top: g,
@@ -1102,31 +1102,31 @@ function qt({ children: s, content: t, position: r, ...o }) {
1102
1102
  if (B(() => {
1103
1103
  if (!a) return;
1104
1104
  l({ position: "fixed", visibility: "hidden" });
1105
- const _ = requestAnimationFrame(d);
1105
+ const b = requestAnimationFrame(d);
1106
1106
  return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
1107
- cancelAnimationFrame(_), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1107
+ cancelAnimationFrame(b), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1108
1108
  };
1109
1109
  }, [a, r]), B(() => {
1110
1110
  if (!a) return;
1111
- const _ = (R) => {
1112
- m.current && !m.current.contains(R.target) && n(!1);
1111
+ const b = (R) => {
1112
+ f.current && !f.current.contains(R.target) && n(!1);
1113
1113
  };
1114
- return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
1114
+ return document.addEventListener("touchstart", b), () => document.removeEventListener("touchstart", b);
1115
1115
  }, [a]), !t) return s;
1116
- const b = a && /* @__PURE__ */ e.jsx(
1116
+ const x = a && /* @__PURE__ */ e.jsx(
1117
1117
  "div",
1118
1118
  {
1119
- ref: f,
1120
- className: `ds-tooltip ds-tooltip--${p}`,
1119
+ ref: p,
1120
+ className: `ds-tooltip ds-tooltip--${m}`,
1121
1121
  role: "tooltip",
1122
- style: i,
1122
+ style: o,
1123
1123
  children: t
1124
1124
  }
1125
1125
  );
1126
1126
  return /* @__PURE__ */ e.jsxs(
1127
1127
  "div",
1128
1128
  {
1129
- ref: m,
1129
+ ref: f,
1130
1130
  className: "ds-tooltip-wrapper",
1131
1131
  onMouseEnter: () => {
1132
1132
  h.current || n(!0);
@@ -1135,31 +1135,31 @@ function qt({ children: s, content: t, position: r, ...o }) {
1135
1135
  h.current || n(!1);
1136
1136
  },
1137
1137
  onTouchStart: () => {
1138
- h.current = !0, n((_) => !_);
1138
+ h.current = !0, n((b) => !b);
1139
1139
  },
1140
- ...o,
1140
+ ...i,
1141
1141
  children: [
1142
1142
  s,
1143
- typeof document < "u" && me.createPortal(b, document.body)
1143
+ typeof document < "u" && me.createPortal(x, document.body)
1144
1144
  ]
1145
1145
  }
1146
1146
  );
1147
1147
  }
1148
- function Ht({
1148
+ function st({
1149
1149
  checked: s = !1,
1150
1150
  onChange: t,
1151
1151
  size: r = "m",
1152
- disabled: o = !1,
1152
+ disabled: i = !1,
1153
1153
  label: a,
1154
1154
  id: n,
1155
- ...i
1155
+ ...o
1156
1156
  }) {
1157
- const l = n || `toggle-${q.useId()}`, p = [
1157
+ const l = n || `toggle-${q.useId()}`, m = [
1158
1158
  "ds-toggle",
1159
1159
  `ds-toggle--${r}`,
1160
- o && "ds-toggle--disabled"
1160
+ i && "ds-toggle--disabled"
1161
1161
  ].filter(Boolean).join(" ");
1162
- return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: l, children: [
1162
+ return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1163
1163
  /* @__PURE__ */ e.jsx(
1164
1164
  "input",
1165
1165
  {
@@ -1168,29 +1168,29 @@ function Ht({
1168
1168
  className: "ds-toggle__input",
1169
1169
  checked: s,
1170
1170
  onChange: (u) => t == null ? void 0 : t(u.target.checked),
1171
- disabled: o,
1172
- ...i
1171
+ disabled: i,
1172
+ ...o
1173
1173
  }
1174
1174
  ),
1175
1175
  /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
1176
1176
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1177
1177
  ] });
1178
1178
  }
1179
- function Kt({
1179
+ function tt({
1180
1180
  checked: s = !1,
1181
1181
  onChange: t,
1182
1182
  size: r = "m",
1183
- disabled: o = !1,
1183
+ disabled: i = !1,
1184
1184
  label: a,
1185
1185
  id: n,
1186
- ...i
1186
+ ...o
1187
1187
  }) {
1188
- const l = n || `checkbox-${q.useId()}`, p = [
1188
+ const l = n || `checkbox-${q.useId()}`, m = [
1189
1189
  "ds-checkbox",
1190
1190
  `ds-checkbox--${r}`,
1191
- o && "ds-checkbox--disabled"
1191
+ i && "ds-checkbox--disabled"
1192
1192
  ].filter(Boolean).join(" "), u = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
1193
- return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: l, children: [
1193
+ return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1194
1194
  /* @__PURE__ */ e.jsx(
1195
1195
  "input",
1196
1196
  {
@@ -1198,9 +1198,9 @@ function Kt({
1198
1198
  id: l,
1199
1199
  className: "ds-checkbox__input",
1200
1200
  checked: s,
1201
- onChange: (m) => t == null ? void 0 : t(m.target.checked),
1202
- disabled: o,
1203
- ...i
1201
+ onChange: (f) => t == null ? void 0 : t(f.target.checked),
1202
+ disabled: i,
1203
+ ...o
1204
1204
  }
1205
1205
  ),
1206
1206
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ e.jsx(
@@ -1214,23 +1214,23 @@ function Kt({
1214
1214
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1215
1215
  ] });
1216
1216
  }
1217
- function Gt({
1217
+ function rt({
1218
1218
  checked: s = !1,
1219
1219
  onChange: t,
1220
1220
  size: r = "m",
1221
- disabled: o = !1,
1221
+ disabled: i = !1,
1222
1222
  label: a,
1223
1223
  name: n,
1224
- value: i,
1224
+ value: o,
1225
1225
  id: l,
1226
- ...p
1226
+ ...m
1227
1227
  }) {
1228
- const u = l || `radio-${q.useId()}`, m = [
1228
+ const u = l || `radio-${q.useId()}`, f = [
1229
1229
  "ds-radio",
1230
1230
  `ds-radio--${r}`,
1231
- o && "ds-radio--disabled"
1231
+ i && "ds-radio--disabled"
1232
1232
  ].filter(Boolean).join(" ");
1233
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: u, children: [
1233
+ return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: u, children: [
1234
1234
  /* @__PURE__ */ e.jsx(
1235
1235
  "input",
1236
1236
  {
@@ -1238,37 +1238,37 @@ function Gt({
1238
1238
  id: u,
1239
1239
  className: "ds-radio__input",
1240
1240
  checked: s,
1241
- onChange: (f) => t == null ? void 0 : t(f.target.checked),
1242
- disabled: o,
1241
+ onChange: (p) => t == null ? void 0 : t(p.target.checked),
1242
+ disabled: i,
1243
1243
  name: n,
1244
- value: i,
1245
- ...p
1244
+ value: o,
1245
+ ...m
1246
1246
  }
1247
1247
  ),
1248
1248
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1249
1249
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1250
1250
  ] });
1251
1251
  }
1252
- function dt({ width: s, height: t, shape: r = "rect", aspectRatio: o, className: a = "", style: n = {}, ...i }) {
1252
+ function hs({ width: s, height: t, shape: r = "rect", aspectRatio: i, className: a = "", style: n = {}, ...o }) {
1253
1253
  return /* @__PURE__ */ e.jsx(
1254
1254
  "span",
1255
1255
  {
1256
1256
  className: ["ds-skeleton", `ds-skeleton--${r}`, a].filter(Boolean).join(" "),
1257
- style: { width: s, height: t, aspectRatio: o, ...n },
1257
+ style: { width: s, height: t, aspectRatio: i, ...n },
1258
1258
  "aria-hidden": "true",
1259
- ...i
1259
+ ...o
1260
1260
  }
1261
1261
  );
1262
1262
  }
1263
- function ut({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "", style: a = {}, ...n }) {
1263
+ function xs({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "", style: a = {}, ...n }) {
1264
1264
  return /* @__PURE__ */ e.jsx(
1265
1265
  "span",
1266
1266
  {
1267
- className: ["ds-skeleton-text", o].filter(Boolean).join(" "),
1267
+ className: ["ds-skeleton-text", i].filter(Boolean).join(" "),
1268
1268
  style: { gap: r, ...a },
1269
1269
  "aria-hidden": "true",
1270
1270
  ...n,
1271
- children: Array.from({ length: s }, (i, l) => /* @__PURE__ */ e.jsx(
1271
+ children: Array.from({ length: s }, (o, l) => /* @__PURE__ */ e.jsx(
1272
1272
  "span",
1273
1273
  {
1274
1274
  className: "ds-skeleton ds-skeleton--text",
@@ -1279,110 +1279,112 @@ function ut({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "",
1279
1279
  }
1280
1280
  );
1281
1281
  }
1282
- dt.Text = ut;
1283
- function ft(s) {
1282
+ hs.Text = xs;
1283
+ function _s(s) {
1284
1284
  let t = 2166136261;
1285
1285
  for (let r = 0; r < s.length; r++)
1286
1286
  t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
1287
1287
  return t % 360;
1288
1288
  }
1289
- function mt(s) {
1289
+ function js(s) {
1290
1290
  if (!s) return "";
1291
1291
  const t = s.trim().split(/\s+/);
1292
1292
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1293
1293
  }
1294
- function Xt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style: n = {}, ...i }) {
1295
- const l = ft(s ?? ""), [p, u] = S(!1), m = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: mt(s) });
1294
+ function nt({ seed: s, icon: t, src: r, size: i = 32, className: a = "", style: n = {}, ...o }) {
1295
+ const l = _s(s ?? ""), [m, u] = S(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: js(s) });
1296
1296
  return /* @__PURE__ */ e.jsx(
1297
1297
  "div",
1298
1298
  {
1299
1299
  className: ["ds-avatar", a].filter(Boolean).join(" "),
1300
- style: { width: o, height: o, "--ds-avatar-h": l, ...n },
1300
+ style: { width: i, height: i, "--ds-avatar-h": l, ...n },
1301
1301
  "aria-hidden": "true",
1302
- ...i,
1303
- children: r && !p ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => u(!0) }) : m
1302
+ ...o,
1303
+ children: r && !m ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => u(!0) }) : f
1304
1304
  }
1305
1305
  );
1306
1306
  }
1307
- function Jt({
1307
+ function at({
1308
1308
  children: s,
1309
1309
  size: t = "compact",
1310
1310
  stickyTop: r,
1311
- maxHeight: o,
1311
+ maxHeight: i,
1312
1312
  className: a = "",
1313
1313
  style: n = {},
1314
- ...i
1314
+ ...o
1315
1315
  }) {
1316
1316
  const l = {
1317
- ...o ? { maxHeight: o } : {},
1317
+ ...i ? { maxHeight: i } : {},
1318
1318
  ...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
1319
1319
  ...n
1320
1320
  };
1321
1321
  return /* @__PURE__ */ e.jsx(
1322
1322
  "div",
1323
1323
  {
1324
- className: ["ds-table-wrap", o ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1324
+ className: ["ds-table-wrap", i ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1325
1325
  style: l,
1326
1326
  children: /* @__PURE__ */ e.jsx(
1327
1327
  "table",
1328
1328
  {
1329
1329
  className: ["ds-table", `ds-table--${t}`, a].filter(Boolean).join(" "),
1330
- ...i,
1330
+ ...o,
1331
1331
  children: s
1332
1332
  }
1333
1333
  )
1334
1334
  }
1335
1335
  );
1336
1336
  }
1337
- function Zt({ children: s, ...t }) {
1337
+ function it({ children: s, ...t }) {
1338
1338
  return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
1339
1339
  }
1340
- function Qt({ children: s, ...t }) {
1340
+ function ot({ children: s, ...t }) {
1341
1341
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1342
1342
  }
1343
- function es({ children: s, interactive: t, selected: r, subheader: o, className: a = "", onClick: n, ...i }) {
1343
+ function lt({ children: s, interactive: t, selected: r, subheader: i, exiting: a, updated: n, className: o = "", onClick: l, ...m }) {
1344
1344
  return /* @__PURE__ */ e.jsx(
1345
1345
  "tr",
1346
1346
  {
1347
1347
  className: [
1348
1348
  "ds-table-row",
1349
- t || n ? "ds-table-row--interactive" : "",
1349
+ t || l ? "ds-table-row--interactive" : "",
1350
1350
  r ? "ds-table-row--selected" : "",
1351
- o ? "ds-table-row--subheader" : "",
1352
- a
1351
+ i ? "ds-table-row--subheader" : "",
1352
+ a ? "ds-table-row--exiting" : "",
1353
+ n ? "ds-table-row--updated" : "",
1354
+ o
1353
1355
  ].filter(Boolean).join(" "),
1354
- onClick: n,
1355
- ...i,
1356
+ onClick: l,
1357
+ ...m,
1356
1358
  children: s
1357
1359
  }
1358
1360
  );
1359
1361
  }
1360
- function ts({ children: s, colSpan: t = 999, ...r }) {
1362
+ function ct({ children: s, colSpan: t = 999, ...r }) {
1361
1363
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1362
1364
  }
1363
- function ss({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, className: n = "", style: i = {}, ...l }) {
1364
- const p = !!o || r !== void 0, u = r === "asc" ? Ue : r === "desc" ? xe : Ve;
1365
+ function dt({ children: s, align: t = "left", sortDir: r, onSort: i, width: a, className: n = "", style: o = {}, ...l }) {
1366
+ const m = !!i || r !== void 0, u = r === "asc" ? Ke : r === "desc" ? xe : Ge;
1365
1367
  return /* @__PURE__ */ e.jsx(
1366
1368
  "th",
1367
1369
  {
1368
1370
  className: [
1369
1371
  "ds-th",
1370
- p ? "ds-th--sortable" : "",
1372
+ m ? "ds-th--sortable" : "",
1371
1373
  r ? "ds-th--sorted" : "",
1372
1374
  t !== "left" ? `ds-table-cell--${t}` : "",
1373
1375
  n
1374
1376
  ].filter(Boolean).join(" "),
1375
- onClick: o,
1376
- style: { width: a, ...i },
1377
+ onClick: i,
1378
+ style: { width: a, ...o },
1377
1379
  ...l,
1378
- children: p ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1380
+ children: m ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1379
1381
  s,
1380
1382
  /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(u, { size: 11, strokeWidth: 2.5 }) })
1381
1383
  ] }) : s
1382
1384
  }
1383
1385
  );
1384
1386
  }
1385
- function rs({ children: s, align: t = "left", secondary: r, muted: o, truncate: a, nowrap: n, className: i = "", ...l }) {
1387
+ function ut({ children: s, align: t = "left", secondary: r, muted: i, truncate: a, nowrap: n, className: o = "", ...l }) {
1386
1388
  return /* @__PURE__ */ e.jsx(
1387
1389
  "td",
1388
1390
  {
@@ -1390,131 +1392,131 @@ function rs({ children: s, align: t = "left", secondary: r, muted: o, truncate:
1390
1392
  "ds-td",
1391
1393
  t !== "left" ? `ds-table-cell--${t}` : "",
1392
1394
  r ? "ds-table-cell--secondary" : "",
1393
- o ? "ds-table-cell--muted" : "",
1395
+ i ? "ds-table-cell--muted" : "",
1394
1396
  a ? "ds-table-cell--truncate" : "",
1395
1397
  n ? "ds-table-cell--nowrap" : "",
1396
- i
1398
+ o
1397
1399
  ].filter(Boolean).join(" "),
1398
1400
  ...l,
1399
1401
  children: s
1400
1402
  }
1401
1403
  );
1402
1404
  }
1403
- function ns({
1405
+ function ft({
1404
1406
  icon: s,
1405
1407
  title: t,
1406
1408
  description: r,
1407
- action: o,
1409
+ action: i,
1408
1410
  size: a = "m",
1409
1411
  className: n = "",
1410
- ...i
1412
+ ...o
1411
1413
  }) {
1412
1414
  return /* @__PURE__ */ e.jsxs(
1413
1415
  "div",
1414
1416
  {
1415
1417
  className: ["ds-empty-state", `ds-empty-state--${a}`, n].filter(Boolean).join(" "),
1416
- ...i,
1418
+ ...o,
1417
1419
  children: [
1418
1420
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: s }),
1419
1421
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: t }),
1420
1422
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: r }),
1421
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: o })
1423
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: i })
1422
1424
  ]
1423
1425
  }
1424
1426
  );
1425
1427
  }
1426
- function as({
1428
+ function mt({
1427
1429
  label: s,
1428
1430
  hint: t,
1429
1431
  error: r,
1430
- required: o = !1,
1432
+ required: i = !1,
1431
1433
  disabled: a = !1,
1432
1434
  htmlFor: n,
1433
- children: i,
1435
+ children: o,
1434
1436
  className: l = "",
1435
- style: p,
1437
+ style: m,
1436
1438
  ...u
1437
1439
  }) {
1438
- const m = q.useId(), f = n ?? m, h = `${f}-hint`, d = `${f}-error`;
1440
+ const f = q.useId(), p = n ?? f, h = `${p}-hint`, d = `${p}-error`;
1439
1441
  return /* @__PURE__ */ e.jsxs(
1440
1442
  "div",
1441
1443
  {
1442
1444
  className: `ds-field${l ? ` ${l}` : ""}`,
1443
1445
  "data-state": r ? "error" : void 0,
1444
- "data-required": o ? "" : void 0,
1446
+ "data-required": i ? "" : void 0,
1445
1447
  "data-disabled": a ? "" : void 0,
1446
- style: p,
1448
+ style: m,
1447
1449
  ...u,
1448
1450
  children: [
1449
- s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: f, children: s }),
1450
- /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1451
+ s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: s }),
1452
+ /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: o }),
1451
1453
  t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1452
1454
  r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: d, role: "alert", children: r })
1453
1455
  ]
1454
1456
  }
1455
1457
  );
1456
1458
  }
1457
- function os({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, className: n = "", style: i, ...l }) {
1458
- const p = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1459
+ function pt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, className: n = "", style: o, ...l }) {
1460
+ const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1459
1461
  return /* @__PURE__ */ e.jsxs(
1460
1462
  "div",
1461
1463
  {
1462
1464
  className: [
1463
1465
  "ds-stat",
1464
- `ds-stat--${o}`,
1466
+ `ds-stat--${i}`,
1465
1467
  a && "ds-stat--inline",
1466
1468
  n
1467
1469
  ].filter(Boolean).join(" "),
1468
- style: i,
1470
+ style: o,
1469
1471
  ...l,
1470
1472
  children: [
1471
1473
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: s }),
1472
1474
  t != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: t }),
1473
- r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${p}`, children: r })
1475
+ r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: r })
1474
1476
  ]
1475
1477
  }
1476
1478
  );
1477
1479
  }
1478
- function is({
1480
+ function ht({
1479
1481
  children: s,
1480
1482
  separator: t = "/",
1481
1483
  "aria-label": r = "Breadcrumb",
1482
- className: o = "",
1484
+ className: i = "",
1483
1485
  style: a,
1484
1486
  ...n
1485
1487
  }) {
1486
- const i = q.Children.toArray(s).filter(Boolean);
1488
+ const o = q.Children.toArray(s).filter(Boolean);
1487
1489
  return /* @__PURE__ */ e.jsx(
1488
1490
  "nav",
1489
1491
  {
1490
- className: `ds-breadcrumb${o ? ` ${o}` : ""}`,
1492
+ className: `ds-breadcrumb${i ? ` ${i}` : ""}`,
1491
1493
  "aria-label": r,
1492
1494
  style: a,
1493
1495
  ...n,
1494
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, p) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1496
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: o.map((l, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1495
1497
  l,
1496
- p < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1497
- ] }, p)) })
1498
+ m < o.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1499
+ ] }, m)) })
1498
1500
  }
1499
1501
  );
1500
1502
  }
1501
- function ls({
1503
+ function xt({
1502
1504
  page: s,
1503
1505
  total: t,
1504
1506
  onChange: r,
1505
- siblings: o = 1,
1507
+ siblings: i = 1,
1506
1508
  "aria-label": a = "Pagination",
1507
1509
  className: n = "",
1508
- style: i,
1510
+ style: o,
1509
1511
  ...l
1510
1512
  }) {
1511
- const p = pt(s, t, o);
1513
+ const m = bs(s, t, i);
1512
1514
  return /* @__PURE__ */ e.jsxs(
1513
1515
  "nav",
1514
1516
  {
1515
1517
  className: `ds-pagination${n ? ` ${n}` : ""}`,
1516
1518
  "aria-label": a,
1517
- style: i,
1519
+ style: o,
1518
1520
  ...l,
1519
1521
  children: [
1520
1522
  /* @__PURE__ */ e.jsx(
@@ -1524,11 +1526,11 @@ function ls({
1524
1526
  onClick: () => r == null ? void 0 : r(s - 1),
1525
1527
  disabled: s <= 1,
1526
1528
  "aria-label": "Previous page",
1527
- children: /* @__PURE__ */ e.jsx(Ye, { size: 16 })
1529
+ children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1528
1530
  }
1529
1531
  ),
1530
- p.map(
1531
- (u, m) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
1532
+ m.map(
1533
+ (u, f) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${f}`) : /* @__PURE__ */ e.jsx(
1532
1534
  "button",
1533
1535
  {
1534
1536
  className: `ds-pagination-page${u === s ? " ds-pagination-page--current" : ""}`,
@@ -1547,44 +1549,44 @@ function ls({
1547
1549
  onClick: () => r == null ? void 0 : r(s + 1),
1548
1550
  disabled: s >= t,
1549
1551
  "aria-label": "Next page",
1550
- children: /* @__PURE__ */ e.jsx(Be, { size: 16 })
1552
+ children: /* @__PURE__ */ e.jsx(Oe, { size: 16 })
1551
1553
  }
1552
1554
  )
1553
1555
  ]
1554
1556
  }
1555
1557
  );
1556
1558
  }
1557
- function pt(s, t, r) {
1558
- if (t <= 7) return Array.from({ length: t }, (i, l) => l + 1);
1559
- const o = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
1560
- o > 2 && n.push("…");
1561
- for (let i = o; i <= a; i++) n.push(i);
1559
+ function bs(s, t, r) {
1560
+ if (t <= 7) return Array.from({ length: t }, (o, l) => l + 1);
1561
+ const i = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
1562
+ i > 2 && n.push("…");
1563
+ for (let o = i; o <= a; o++) n.push(o);
1562
1564
  return a < t - 1 && n.push("…"), n.push(t), n;
1563
1565
  }
1564
- const ht = 200;
1565
- function cs({
1566
+ const vs = 200;
1567
+ function _t({
1566
1568
  children: s,
1567
1569
  title: t,
1568
1570
  onClose: r,
1569
- side: o = "right",
1571
+ side: i = "right",
1570
1572
  ...a
1571
1573
  }) {
1572
- const n = $(null), i = q.useId(), [l, p] = S(!1), u = () => {
1573
- !r || l || (p(!0), setTimeout(() => {
1574
- p(!1), r();
1575
- }, ht));
1574
+ const n = $(null), o = q.useId(), [l, m] = S(!1), u = () => {
1575
+ !r || l || (m(!0), setTimeout(() => {
1576
+ m(!1), r();
1577
+ }, vs));
1576
1578
  };
1577
1579
  B(() => {
1578
- const d = (_) => {
1579
- _.key === "Escape" && u();
1580
- }, b = (_) => {
1581
- n.current && !n.current.contains(_.target) && u();
1580
+ const d = (b) => {
1581
+ b.key === "Escape" && u();
1582
+ }, x = (b) => {
1583
+ n.current && !n.current.contains(b.target) && u();
1582
1584
  };
1583
- return document.addEventListener("keydown", d), document.addEventListener("mousedown", b), () => {
1584
- document.removeEventListener("keydown", d), document.removeEventListener("mousedown", b);
1585
+ return document.addEventListener("keydown", d), document.addEventListener("mousedown", x), () => {
1586
+ document.removeEventListener("keydown", d), document.removeEventListener("mousedown", x);
1585
1587
  };
1586
1588
  }, [r, l]);
1587
- const m = q.Children.toArray(s), f = m.find((d) => (d == null ? void 0 : d.type) === Ae), h = m.filter((d) => (d == null ? void 0 : d.type) !== Ae);
1589
+ const f = q.Children.toArray(s), p = f.find((d) => (d == null ? void 0 : d.type) === De), h = f.filter((d) => (d == null ? void 0 : d.type) !== De);
1588
1590
  return /* @__PURE__ */ e.jsx(
1589
1591
  "div",
1590
1592
  {
@@ -1594,58 +1596,58 @@ function cs({
1594
1596
  "aside",
1595
1597
  {
1596
1598
  className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
1597
- "data-side": o,
1599
+ "data-side": i,
1598
1600
  ref: n,
1599
1601
  role: "dialog",
1600
1602
  "aria-modal": "true",
1601
- "aria-labelledby": t ? i : void 0,
1603
+ "aria-labelledby": t ? o : void 0,
1602
1604
  children: [
1603
1605
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1604
- t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: t }),
1605
- r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 }) })
1606
+ t && /* @__PURE__ */ e.jsx("h3", { id: o, className: "ds-drawer-title", children: t }),
1607
+ r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 }) })
1606
1608
  ] }),
1607
1609
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: h }),
1608
- f
1610
+ p
1609
1611
  ]
1610
1612
  }
1611
1613
  )
1612
1614
  }
1613
1615
  );
1614
1616
  }
1615
- function Ae({ children: s }) {
1617
+ function De({ children: s }) {
1616
1618
  return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: s });
1617
1619
  }
1618
- const xt = {
1619
- info: ye,
1620
- success: we,
1621
- warning: Ne,
1622
- error: ve
1620
+ const Ns = {
1621
+ info: ke,
1622
+ success: ge,
1623
+ warning: ye,
1624
+ error: we
1623
1625
  };
1624
- function ds({
1626
+ function jt({
1625
1627
  children: s,
1626
1628
  variant: t = "info",
1627
1629
  action: r,
1628
- onAction: o,
1630
+ onAction: i,
1629
1631
  onDismiss: a,
1630
1632
  role: n,
1631
- ...i
1633
+ ...o
1632
1634
  }) {
1633
- const l = xt[t], p = n || (t === "error" ? "alert" : "status");
1635
+ const l = Ns[t], m = n || (t === "error" ? "alert" : "status");
1634
1636
  return /* @__PURE__ */ e.jsxs(
1635
1637
  "div",
1636
1638
  {
1637
1639
  className: `ds-banner ds-banner--${t}`,
1638
- role: p,
1639
- ...i,
1640
+ role: m,
1641
+ ...o,
1640
1642
  children: [
1641
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: D[2], strokeWidth: 1.5 }) }),
1643
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: I[2], strokeWidth: 1.5 }) }),
1642
1644
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
1643
1645
  r && /* @__PURE__ */ e.jsx(
1644
1646
  "button",
1645
1647
  {
1646
1648
  type: "button",
1647
1649
  className: "ds-banner-action",
1648
- onClick: o,
1650
+ onClick: i,
1649
1651
  children: r
1650
1652
  }
1651
1653
  ),
@@ -1656,145 +1658,145 @@ function ds({
1656
1658
  className: "ds-banner-dismiss",
1657
1659
  onClick: a,
1658
1660
  "aria-label": "Dismiss",
1659
- children: /* @__PURE__ */ e.jsx(ne, { size: D[2], strokeWidth: 1.5 })
1661
+ children: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 })
1660
1662
  }
1661
1663
  )
1662
1664
  ]
1663
1665
  }
1664
1666
  );
1665
1667
  }
1666
- function us({
1668
+ function bt({
1667
1669
  trigger: s,
1668
1670
  items: t = [],
1669
1671
  open: r,
1670
- onOpenChange: o,
1672
+ onOpenChange: i,
1671
1673
  align: a = "left",
1672
1674
  className: n = "",
1673
- style: i,
1675
+ style: o,
1674
1676
  ...l
1675
1677
  }) {
1676
- const [p, u] = S(!1), [m, f] = S(!1), h = r !== void 0, d = h ? r : p, b = $(null), _ = $(null), R = $(null), E = $(null), [g, A] = S({}), k = $(null), M = 150, I = () => {
1678
+ const [m, u] = S(!1), [f, p] = S(!1), h = r !== void 0, d = h ? r : m, x = $(null), b = $(null), R = $(null), E = $(null), [g, A] = S({}), k = $(null), O = 150, D = () => {
1677
1679
  if (h)
1678
- o == null || o(!1);
1680
+ i == null || i(!1);
1679
1681
  else {
1680
- if (m) return;
1681
- f(!0), k.current = setTimeout(() => {
1682
- u(!1), f(!1);
1683
- }, M);
1682
+ if (f) return;
1683
+ p(!0), k.current = setTimeout(() => {
1684
+ u(!1), p(!1);
1685
+ }, O);
1684
1686
  }
1685
1687
  }, v = () => {
1686
- const x = !d;
1687
- h ? o == null || o(x) : x ? (clearTimeout(k.current), f(!1), u(!0)) : I();
1688
- }, L = () => {
1689
- d || (h ? o == null || o(!0) : (clearTimeout(k.current), f(!1), u(!0)));
1688
+ const _ = !d;
1689
+ h ? i == null || i(_) : _ ? (clearTimeout(k.current), p(!1), u(!0)) : D();
1690
+ }, M = () => {
1691
+ d || (h ? i == null || i(!0) : (clearTimeout(k.current), p(!1), u(!0)));
1690
1692
  };
1691
1693
  B(() => () => clearTimeout(k.current), []), B(() => {
1692
1694
  if (!d) return;
1693
- const x = () => {
1694
- var O;
1695
- const y = (O = b.current) == null ? void 0 : O.getBoundingClientRect();
1695
+ const _ = () => {
1696
+ var L;
1697
+ const y = (L = x.current) == null ? void 0 : L.getBoundingClientRect();
1696
1698
  y && A(
1697
1699
  a === "right" ? { top: y.bottom + 4, right: window.innerWidth - y.right } : { top: y.bottom + 4, left: y.left }
1698
1700
  );
1699
1701
  };
1700
- return x(), window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
1701
- window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
1702
+ return _(), window.addEventListener("scroll", _, !0), window.addEventListener("resize", _), () => {
1703
+ window.removeEventListener("scroll", _, !0), window.removeEventListener("resize", _);
1702
1704
  };
1703
1705
  }, [d, a]);
1704
1706
  const z = () => {
1705
1707
  var y;
1706
- const x = (y = R.current) == null ? void 0 : y.querySelector(
1708
+ const _ = (y = R.current) == null ? void 0 : y.querySelector(
1707
1709
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1708
1710
  );
1709
- x == null || x.focus();
1711
+ _ == null || _.focus();
1710
1712
  };
1711
1713
  B(() => {
1712
1714
  if (!d) return;
1713
- const x = (O) => {
1715
+ const _ = (L) => {
1714
1716
  var C, K;
1715
- !((C = b.current) != null && C.contains(O.target)) && !((K = _.current) != null && K.contains(O.target)) && I();
1716
- }, y = (O) => {
1717
- O.key === "Escape" && (I(), z());
1717
+ !((C = x.current) != null && C.contains(L.target)) && !((K = b.current) != null && K.contains(L.target)) && D();
1718
+ }, y = (L) => {
1719
+ L.key === "Escape" && (D(), z());
1718
1720
  };
1719
- return document.addEventListener("mousedown", x), document.addEventListener("keydown", y), () => {
1720
- document.removeEventListener("mousedown", x), document.removeEventListener("keydown", y);
1721
+ return document.addEventListener("mousedown", _), document.addEventListener("keydown", y), () => {
1722
+ document.removeEventListener("mousedown", _), document.removeEventListener("keydown", y);
1721
1723
  };
1722
1724
  }, [d]), B(() => {
1723
- if (!d || !E.current || !_.current) return;
1724
- const x = Y(), y = E.current === "last" ? x[x.length - 1] : x[0];
1725
+ if (!d || !E.current || !b.current) return;
1726
+ const _ = Y(), y = E.current === "last" ? _[_.length - 1] : _[0];
1725
1727
  y == null || y.focus(), E.current = null;
1726
1728
  }, [d]);
1727
- const Y = () => _.current ? [..._.current.querySelectorAll(
1729
+ const Y = () => b.current ? [...b.current.querySelectorAll(
1728
1730
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1729
- )] : [], H = (x) => {
1730
- var y, O;
1731
- if (x.key === "ArrowDown")
1732
- x.preventDefault(), d ? (y = Y()[0]) == null || y.focus() : (E.current = "first", L());
1733
- else if (x.key === "ArrowUp")
1734
- if (x.preventDefault(), !d)
1735
- E.current = "last", L();
1731
+ )] : [], H = (_) => {
1732
+ var y, L;
1733
+ if (_.key === "ArrowDown")
1734
+ _.preventDefault(), d ? (y = Y()[0]) == null || y.focus() : (E.current = "first", M());
1735
+ else if (_.key === "ArrowUp")
1736
+ if (_.preventDefault(), !d)
1737
+ E.current = "last", M();
1736
1738
  else {
1737
1739
  const C = Y();
1738
- (O = C[C.length - 1]) == null || O.focus();
1740
+ (L = C[C.length - 1]) == null || L.focus();
1739
1741
  }
1740
- }, X = (x) => {
1742
+ }, X = (_) => {
1741
1743
  var C, K, Z, w;
1742
- const y = Y(), O = y.findIndex((c) => c === document.activeElement);
1743
- switch (x.key) {
1744
+ const y = Y(), L = y.findIndex((c) => c === document.activeElement);
1745
+ switch (_.key) {
1744
1746
  case "ArrowDown":
1745
- x.preventDefault(), (C = y[Math.min(O + 1, y.length - 1)]) == null || C.focus();
1747
+ _.preventDefault(), (C = y[Math.min(L + 1, y.length - 1)]) == null || C.focus();
1746
1748
  break;
1747
1749
  case "ArrowUp":
1748
- x.preventDefault(), O <= 0 ? z() : (K = y[O - 1]) == null || K.focus();
1750
+ _.preventDefault(), L <= 0 ? z() : (K = y[L - 1]) == null || K.focus();
1749
1751
  break;
1750
1752
  case "Home":
1751
- x.preventDefault(), (Z = y[0]) == null || Z.focus();
1753
+ _.preventDefault(), (Z = y[0]) == null || Z.focus();
1752
1754
  break;
1753
1755
  case "End":
1754
- x.preventDefault(), (w = y[y.length - 1]) == null || w.focus();
1756
+ _.preventDefault(), (w = y[y.length - 1]) == null || w.focus();
1755
1757
  break;
1756
1758
  case "Tab":
1757
- I();
1759
+ D();
1758
1760
  break;
1759
1761
  }
1760
1762
  }, U = d && /* @__PURE__ */ e.jsx(
1761
1763
  "div",
1762
1764
  {
1763
- ref: _,
1765
+ ref: b,
1764
1766
  role: "menu",
1765
1767
  className: [
1766
1768
  "ds-dropdown__menu",
1767
1769
  `ds-dropdown__menu--${a}`,
1768
- m && "ds-dropdown__menu--closing"
1770
+ f && "ds-dropdown__menu--closing"
1769
1771
  ].filter(Boolean).join(" "),
1770
1772
  style: g,
1771
1773
  onKeyDown: X,
1772
- children: t.map((x, y) => {
1773
- if (x.separator)
1774
+ children: t.map((_, y) => {
1775
+ if (_.separator)
1774
1776
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
1775
- if (x.type === "section")
1777
+ if (_.type === "section")
1776
1778
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
1777
- x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
1778
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
1779
+ _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
1780
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
1779
1781
  ] }, y);
1780
- const O = !!x.href, C = O ? "a" : "button", K = O ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1782
+ const L = !!_.href, C = L ? "a" : "button", K = L ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
1781
1783
  return /* @__PURE__ */ e.jsxs(
1782
1784
  C,
1783
1785
  {
1784
1786
  role: "menuitem",
1785
1787
  className: [
1786
1788
  "ds-dropdown__item",
1787
- x.danger && "ds-dropdown__item--danger"
1789
+ _.danger && "ds-dropdown__item--danger"
1788
1790
  ].filter(Boolean).join(" "),
1789
1791
  ...K,
1790
1792
  onClick: () => {
1791
1793
  var Z;
1792
- (Z = x.onClick) == null || Z.call(x), I();
1794
+ (Z = _.onClick) == null || Z.call(_), D();
1793
1795
  },
1794
1796
  children: [
1795
- x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
1796
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
1797
- x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
1797
+ _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
1798
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
1799
+ _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
1798
1800
  ]
1799
1801
  },
1800
1802
  y
@@ -1805,9 +1807,9 @@ function us({
1805
1807
  return /* @__PURE__ */ e.jsxs(
1806
1808
  "div",
1807
1809
  {
1808
- ref: b,
1810
+ ref: x,
1809
1811
  className: ["ds-dropdown", n].filter(Boolean).join(" "),
1810
- style: i,
1812
+ style: o,
1811
1813
  ...l,
1812
1814
  children: [
1813
1815
  /* @__PURE__ */ e.jsx(
@@ -1825,15 +1827,15 @@ function us({
1825
1827
  }
1826
1828
  );
1827
1829
  }
1828
- function fs({
1830
+ function vt({
1829
1831
  value: s = 0,
1830
1832
  size: t = "m",
1831
1833
  variant: r = "default",
1832
- showValue: o = !1,
1834
+ showValue: i = !1,
1833
1835
  min: a = 2,
1834
1836
  animate: n = !0
1835
1837
  }) {
1836
- const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), p = r === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : r;
1838
+ const o = Math.min(100, Math.max(0, s)), l = Math.max(a, o), m = r === "auto" ? o >= 70 ? "success" : o >= 50 ? "warning" : "danger" : r;
1837
1839
  return /* @__PURE__ */ e.jsxs(
1838
1840
  "div",
1839
1841
  {
@@ -1843,103 +1845,103 @@ function fs({
1843
1845
  !n && "ds-progress--instant"
1844
1846
  ].filter(Boolean).join(" "),
1845
1847
  role: "progressbar",
1846
- "aria-valuenow": i,
1848
+ "aria-valuenow": o,
1847
1849
  "aria-valuemin": 0,
1848
1850
  "aria-valuemax": 100,
1849
1851
  children: [
1850
1852
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
1851
1853
  "div",
1852
1854
  {
1853
- className: `ds-progress__fill ds-progress__fill--${p}`,
1855
+ className: `ds-progress__fill ds-progress__fill--${m}`,
1854
1856
  style: { width: `${l}%` }
1855
1857
  }
1856
1858
  ) }),
1857
- o && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
1858
- Math.round(i),
1859
+ i && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
1860
+ Math.round(o),
1859
1861
  "%"
1860
1862
  ] })
1861
1863
  ]
1862
1864
  }
1863
1865
  );
1864
1866
  }
1865
- const bt = (s) => 1 - Math.pow(1 - s, 3), jt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1866
- function _t(s, { duration: t = 600 } = {}) {
1867
- const [r, o] = S(s), a = $(s), n = $(null);
1867
+ const ws = (s) => 1 - Math.pow(1 - s, 3), ys = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1868
+ function gs(s, { duration: t = 600 } = {}) {
1869
+ const [r, i] = S(s), a = $(s), n = $(null);
1868
1870
  return B(() => {
1869
- if (jt()) {
1870
- o(s), a.current = s;
1871
+ if (ys()) {
1872
+ i(s), a.current = s;
1871
1873
  return;
1872
1874
  }
1873
- const i = a.current, l = s - i;
1875
+ const o = a.current, l = s - o;
1874
1876
  if (l === 0) return;
1875
- let p = null;
1876
- const u = (m) => {
1877
- p || (p = m);
1878
- const f = Math.min((m - p) / t, 1);
1879
- o(i + l * bt(f)), f < 1 ? n.current = requestAnimationFrame(u) : a.current = s;
1877
+ let m = null;
1878
+ const u = (f) => {
1879
+ m || (m = f);
1880
+ const p = Math.min((f - m) / t, 1);
1881
+ i(o + l * ws(p)), p < 1 ? n.current = requestAnimationFrame(u) : a.current = s;
1880
1882
  };
1881
1883
  return n.current = requestAnimationFrame(u), () => cancelAnimationFrame(n.current);
1882
1884
  }, [s, t]), r;
1883
1885
  }
1884
- function ms({
1886
+ function Nt({
1885
1887
  value: s,
1886
1888
  duration: t = 600,
1887
1889
  decimals: r = 0,
1888
- prefix: o = "",
1890
+ prefix: i = "",
1889
1891
  suffix: a = ""
1890
1892
  }) {
1891
- const i = _t(s, { duration: t }).toFixed(r);
1892
- return `${o}${i}${a}`;
1893
+ const o = gs(s, { duration: t }).toFixed(r);
1894
+ return `${i}${o}${a}`;
1893
1895
  }
1894
- function vt({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1895
- const o = $(null), [a, n] = S(!1);
1896
+ function ks({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1897
+ const i = $(null), [a, n] = S(!1);
1896
1898
  return B(() => {
1897
- const i = o.current;
1898
- if (!i) return;
1899
+ const o = i.current;
1900
+ if (!o) return;
1899
1901
  const l = new IntersectionObserver(
1900
- ([p]) => {
1901
- p.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1902
+ ([m]) => {
1903
+ m.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1902
1904
  },
1903
1905
  { threshold: s, rootMargin: t }
1904
1906
  );
1905
- return l.observe(i), () => l.disconnect();
1906
- }, [s, t, r]), { ref: o, inView: a };
1907
+ return l.observe(o), () => l.disconnect();
1908
+ }, [s, t, r]), { ref: i, inView: a };
1907
1909
  }
1908
- function ps({
1910
+ function wt({
1909
1911
  children: s,
1910
1912
  as: t = "div",
1911
1913
  once: r = !1,
1912
- threshold: o = 0.1,
1914
+ threshold: i = 0.1,
1913
1915
  rootMargin: a = "0px",
1914
1916
  onEnter: n,
1915
- onLeave: i,
1917
+ onLeave: o,
1916
1918
  ...l
1917
1919
  }) {
1918
- const { ref: p, inView: u } = vt({ threshold: o, rootMargin: a, once: r }), m = $(!1);
1920
+ const { ref: m, inView: u } = ks({ threshold: i, rootMargin: a, once: r }), f = $(!1);
1919
1921
  return B(() => {
1920
- u && !m.current && (n == null || n()), !u && m.current && (i == null || i()), m.current = u;
1921
- }, [u]), /* @__PURE__ */ e.jsx(t, { ref: p, ...l, children: typeof s == "function" ? s(u) : s });
1922
- }
1923
- const Ie = {
1924
- default: ye,
1925
- success: we,
1926
- warning: Ne,
1927
- error: ve
1922
+ u && !f.current && (n == null || n()), !u && f.current && (o == null || o()), f.current = u;
1923
+ }, [u]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(u) : s });
1924
+ }
1925
+ const Be = {
1926
+ default: ke,
1927
+ success: ge,
1928
+ warning: ye,
1929
+ error: we
1928
1930
  };
1929
1931
  let ce = [];
1930
- const _e = /* @__PURE__ */ new Set();
1931
- function Le() {
1932
- _e.forEach((s) => s([...ce]));
1932
+ const Ne = /* @__PURE__ */ new Set();
1933
+ function We() {
1934
+ Ne.forEach((s) => s([...ce]));
1933
1935
  }
1934
- function Nt(s) {
1935
- ce = [...ce, s], Le();
1936
+ function Es(s) {
1937
+ ce = [...ce, s], We();
1936
1938
  }
1937
- function wt(s) {
1938
- ce = ce.filter((t) => t.id !== s), Le();
1939
+ function $s(s) {
1940
+ ce = ce.filter((t) => t.id !== s), We();
1939
1941
  }
1940
- function hs() {
1942
+ function yt() {
1941
1943
  const s = (t, r = {}) => {
1942
- Nt({
1944
+ Es({
1943
1945
  id: `${Date.now()}-${Math.random()}`,
1944
1946
  message: t,
1945
1947
  type: "default",
@@ -1949,13 +1951,13 @@ function hs() {
1949
1951
  };
1950
1952
  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 };
1951
1953
  }
1952
- function yt({ data: s, onDismiss: t }) {
1953
- const [r, o] = S(!1), a = $(null);
1954
- B(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
1954
+ function Ts({ data: s, onDismiss: t }) {
1955
+ const [r, i] = S(!1), a = $(null);
1956
+ B(() => (requestAnimationFrame(() => i(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
1955
1957
  function n() {
1956
- o(!1), setTimeout(() => t(s.id), 250);
1958
+ i(!1), setTimeout(() => t(s.id), 250);
1957
1959
  }
1958
- const i = Ie[s.type] ?? Ie.default;
1960
+ const o = Be[s.type] ?? Be.default;
1959
1961
  return /* @__PURE__ */ e.jsxs(
1960
1962
  "div",
1961
1963
  {
@@ -1967,7 +1969,7 @@ function yt({ data: s, onDismiss: t }) {
1967
1969
  role: s.type === "error" ? "alert" : "status",
1968
1970
  "aria-live": "polite",
1969
1971
  children: [
1970
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
1972
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(o, { size: I[3], strokeWidth: 1.5 }) }),
1971
1973
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: s.message }),
1972
1974
  /* @__PURE__ */ e.jsx(
1973
1975
  "button",
@@ -1975,78 +1977,78 @@ function yt({ data: s, onDismiss: t }) {
1975
1977
  className: "ds-toast__close",
1976
1978
  onClick: n,
1977
1979
  "aria-label": "Закрыть",
1978
- children: /* @__PURE__ */ e.jsx(ne, { size: D[3], strokeWidth: 1.5 })
1980
+ children: /* @__PURE__ */ e.jsx(ne, { size: I[3], strokeWidth: 1.5 })
1979
1981
  }
1980
1982
  )
1981
1983
  ]
1982
1984
  }
1983
1985
  );
1984
1986
  }
1985
- function xs({ position: s = "bottom-right" }) {
1987
+ function gt({ position: s = "bottom-right" }) {
1986
1988
  const [t, r] = S(() => [...ce]);
1987
- return B(() => (_e.add(r), () => _e.delete(r)), []), !t.length || typeof document > "u" ? null : me.createPortal(
1988
- /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(yt, { data: o, onDismiss: wt }, o.id)) }),
1989
+ return B(() => (Ne.add(r), () => Ne.delete(r)), []), !t.length || typeof document > "u" ? null : me.createPortal(
1990
+ /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((i) => /* @__PURE__ */ e.jsx(Ts, { data: i, onDismiss: $s }, i.id)) }),
1989
1991
  document.body
1990
1992
  );
1991
1993
  }
1992
- const gt = {
1994
+ const Rs = {
1993
1995
  running: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "info", children: "Running..." }),
1994
1996
  success: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "success", children: "Done" }),
1995
1997
  error: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "error", children: "Error" })
1996
1998
  };
1997
- function bs({
1999
+ function kt({
1998
2000
  label: s,
1999
2001
  status: t = "idle",
2000
2002
  icon: r,
2001
- badge: o,
2003
+ badge: i,
2002
2004
  defaultExpanded: a = !1,
2003
2005
  expanded: n,
2004
- onToggle: i,
2006
+ onToggle: o,
2005
2007
  padding: l = "s",
2006
- children: p,
2008
+ children: m,
2007
2009
  ...u
2008
2010
  }) {
2009
- const f = `tc-body-${We().replace(/:/g, "")}`, [h, d] = S(a), b = n !== void 0, _ = b ? n : h, R = () => {
2010
- b ? i == null || i(!n) : d((E) => !E);
2011
+ const p = `tc-body-${Ye().replace(/:/g, "")}`, [h, d] = S(a), x = n !== void 0, b = x ? n : h, R = () => {
2012
+ x ? o == null || o(!n) : d((E) => !E);
2011
2013
  };
2012
- return /* @__PURE__ */ e.jsxs(st, { padding: l, ...u, children: [
2014
+ return /* @__PURE__ */ e.jsxs(ls, { padding: l, ...u, children: [
2013
2015
  /* @__PURE__ */ e.jsxs(
2014
2016
  "button",
2015
2017
  {
2016
2018
  type: "button",
2017
2019
  className: "ds-tool-card__header",
2018
2020
  onClick: R,
2019
- "aria-expanded": _,
2020
- "aria-controls": f,
2021
+ "aria-expanded": b,
2022
+ "aria-controls": p,
2021
2023
  children: [
2022
2024
  /* @__PURE__ */ e.jsx(
2023
- Be,
2025
+ Oe,
2024
2026
  {
2025
- size: D[1],
2027
+ size: I[1],
2026
2028
  strokeWidth: 1.5,
2027
- className: `ds-tool-card__chevron${_ ? " ds-tool-card__chevron--expanded" : ""}`
2029
+ className: `ds-tool-card__chevron${b ? " ds-tool-card__chevron--expanded" : ""}`
2028
2030
  }
2029
2031
  ),
2030
2032
  r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
2031
2033
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2032
- gt[t],
2033
- o
2034
+ Rs[t],
2035
+ i
2034
2036
  ]
2035
2037
  }
2036
2038
  ),
2037
- _ && /* @__PURE__ */ e.jsx("div", { id: f, className: "ds-tool-card__body", children: p })
2039
+ b && /* @__PURE__ */ e.jsx("div", { id: p, className: "ds-tool-card__body", children: m })
2038
2040
  ] });
2039
2041
  }
2040
- function js({
2042
+ function Et({
2041
2043
  text: s,
2042
2044
  size: t = "xs",
2043
2045
  timeout: r = 2e3,
2044
- "aria-label": o = "Copy to clipboard",
2046
+ "aria-label": i = "Copy to clipboard",
2045
2047
  ...a
2046
2048
  }) {
2047
- const [n, i] = S(!1), l = () => {
2049
+ const [n, o] = S(!1), l = () => {
2048
2050
  navigator.clipboard.writeText(s).then(() => {
2049
- i(!0), setTimeout(() => i(!1), r);
2051
+ o(!0), setTimeout(() => o(!1), r);
2050
2052
  });
2051
2053
  };
2052
2054
  return /* @__PURE__ */ e.jsx(
@@ -2054,51 +2056,51 @@ function js({
2054
2056
  {
2055
2057
  variant: "ghost",
2056
2058
  size: t,
2057
- icon: n ? /* @__PURE__ */ e.jsx(he, { size: D[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(qe, { size: D[1], strokeWidth: 1.5 }),
2058
- "aria-label": o,
2059
+ icon: n ? /* @__PURE__ */ e.jsx(he, { size: I[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Je, { size: I[1], strokeWidth: 1.5 }),
2060
+ "aria-label": i,
2059
2061
  onClick: l,
2060
2062
  ...a
2061
2063
  }
2062
2064
  );
2063
2065
  }
2064
- function _s({ content: s, streaming: t = !1, ...r }) {
2065
- const [o, a] = S(t);
2066
+ function $t({ content: s, streaming: t = !1, ...r }) {
2067
+ const [i, a] = S(t);
2066
2068
  return B(() => {
2067
2069
  a(!!t);
2068
2070
  }, [t]), /* @__PURE__ */ e.jsx(
2069
- it,
2071
+ Fe,
2070
2072
  {
2071
- expanded: o,
2073
+ expanded: i,
2072
2074
  onToggle: a,
2073
2075
  padding: "s",
2074
2076
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2075
- /* @__PURE__ */ e.jsx(He, { size: D[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2076
- /* @__PURE__ */ e.jsx(rt, { secondary: !0, children: "Thinking" })
2077
+ /* @__PURE__ */ e.jsx(Ze, { size: I[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2078
+ /* @__PURE__ */ e.jsx(cs, { secondary: !0, children: "Thinking" })
2077
2079
  ] }),
2078
2080
  ...r,
2079
- children: /* @__PURE__ */ e.jsxs(Pe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2081
+ children: /* @__PURE__ */ e.jsxs(ze, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2080
2082
  s,
2081
2083
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2082
2084
  ] })
2083
2085
  }
2084
2086
  );
2085
2087
  }
2086
- function vs({
2088
+ function Tt({
2087
2089
  count: s,
2088
2090
  current: t = 0,
2089
2091
  done: r = [],
2090
- onChange: o,
2092
+ onChange: i,
2091
2093
  showCounter: a = !0,
2092
2094
  className: n = "",
2093
- "aria-label": i = "Steps",
2095
+ "aria-label": o = "Steps",
2094
2096
  ...l
2095
2097
  }) {
2096
2098
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...l, children: [
2097
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (p, u) => {
2098
- const m = u === t, f = r.includes(u) && !m, h = o && (u <= t || r.includes(u)), d = [
2099
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": o, children: Array.from({ length: s }, (m, u) => {
2100
+ const f = u === t, p = r.includes(u) && !f, h = i && (u <= t || r.includes(u)), d = [
2099
2101
  "ds-step-indicator__dot",
2100
- m && "ds-step-indicator__dot--active",
2101
- f && "ds-step-indicator__dot--done"
2102
+ f && "ds-step-indicator__dot--active",
2103
+ p && "ds-step-indicator__dot--done"
2102
2104
  ].filter(Boolean).join(" ");
2103
2105
  return /* @__PURE__ */ e.jsx(
2104
2106
  "button",
@@ -2106,216 +2108,216 @@ function vs({
2106
2108
  type: "button",
2107
2109
  className: d,
2108
2110
  role: "tab",
2109
- "aria-selected": m,
2111
+ "aria-selected": f,
2110
2112
  "aria-label": `Step ${u + 1}`,
2111
2113
  disabled: !h || u === t,
2112
- onClick: () => o == null ? void 0 : o(u),
2113
- children: f ? /* @__PURE__ */ e.jsx(he, { size: 8, strokeWidth: 3 }) : null
2114
+ onClick: () => i == null ? void 0 : i(u),
2115
+ children: p ? /* @__PURE__ */ e.jsx(he, { size: 8, strokeWidth: 3 }) : null
2114
2116
  },
2115
2117
  u
2116
2118
  );
2117
2119
  }) }),
2118
- a && /* @__PURE__ */ e.jsxs(Pe, { secondary: !0, className: "ds-step-indicator__counter", children: [
2120
+ a && /* @__PURE__ */ e.jsxs(ze, { secondary: !0, className: "ds-step-indicator__counter", children: [
2119
2121
  t + 1,
2120
2122
  " / ",
2121
2123
  s
2122
2124
  ] })
2123
2125
  ] });
2124
2126
  }
2125
- function Ns({
2127
+ function Rt({
2126
2128
  content: s,
2127
2129
  isStreaming: t = !1,
2128
2130
  cursor: r = "line",
2129
- onChunk: o,
2131
+ onChunk: i,
2130
2132
  className: a = "",
2131
2133
  ...n
2132
2134
  }) {
2133
- const i = $(s);
2135
+ const o = $(s);
2134
2136
  return B(() => {
2135
- s !== i.current && (o == null || o(s), i.current = s);
2136
- }, [s, o]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...n, children: [
2137
+ s !== o.current && (i == null || i(s), o.current = s);
2138
+ }, [s, i]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...n, children: [
2137
2139
  s,
2138
2140
  t && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
2139
2141
  ] });
2140
2142
  }
2141
- function ws({
2143
+ function St({
2142
2144
  role: s = "assistant",
2143
2145
  header: t,
2144
2146
  footer: r,
2145
- attachments: o,
2147
+ attachments: i,
2146
2148
  isStreaming: a = !1,
2147
2149
  children: n,
2148
- className: i = "",
2150
+ className: o = "",
2149
2151
  ...l
2150
2152
  }) {
2151
- const p = [
2153
+ const m = [
2152
2154
  "ds-chat-message",
2153
2155
  `ds-chat-message--${s}`,
2154
2156
  a && "ds-chat-message--streaming",
2155
- i
2157
+ o
2156
2158
  ].filter(Boolean).join(" ");
2157
- return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: p, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: n }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: p, ...l, children: [
2158
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2159
+ 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: [
2160
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2159
2161
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: n }),
2160
2162
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2161
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, ...l, children: [
2163
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2162
2164
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2163
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2165
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2164
2166
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: n }),
2165
2167
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2166
2168
  ] });
2167
2169
  }
2168
- function ys(s, { containerRef: t, smartPause: r = !0 } = {}) {
2169
- const o = $(!1), a = $(0);
2170
+ function At(s, { containerRef: t, smartPause: r = !0 } = {}) {
2171
+ const i = $(!1), a = $(0);
2170
2172
  B(() => {
2171
2173
  const n = t == null ? void 0 : t.current;
2172
2174
  if (!n) return;
2173
- const i = () => {
2175
+ const o = () => {
2174
2176
  const l = n.scrollHeight - n.scrollTop - n.clientHeight < 64;
2175
- !l && n.scrollTop < a.current && (o.current = !0), l && (o.current = !1), a.current = n.scrollTop;
2177
+ !l && n.scrollTop < a.current && (i.current = !0), l && (i.current = !1), a.current = n.scrollTop;
2176
2178
  };
2177
- return n.addEventListener("scroll", i, { passive: !0 }), () => n.removeEventListener("scroll", i);
2179
+ return n.addEventListener("scroll", o, { passive: !0 }), () => n.removeEventListener("scroll", o);
2178
2180
  }, [t]), B(() => {
2179
2181
  const n = t == null ? void 0 : t.current;
2180
- n && (r && o.current || (n.scrollTop = n.scrollHeight));
2182
+ n && (r && i.current || (n.scrollTop = n.scrollHeight));
2181
2183
  }, s);
2182
2184
  }
2183
- function kt({
2185
+ function Ss({
2184
2186
  prompts: s,
2185
2187
  enabled: t,
2186
2188
  typingSpeed: r = 38,
2187
- erasingSpeed: o = 18,
2189
+ erasingSpeed: i = 18,
2188
2190
  holdTime: a = 2200,
2189
2191
  betweenTime: n = 380,
2190
- manualPauseMs: i = 5e3
2192
+ manualPauseMs: o = 5e3
2191
2193
  }) {
2192
- const [l, p] = S(0), [u, m] = S(""), f = $("typing"), h = $(0), d = $(0), b = $(null), _ = $(0);
2194
+ const [l, m] = S(0), [u, f] = S(""), p = $("typing"), h = $(0), d = $(0), x = $(null), b = $(0);
2193
2195
  B(() => {
2194
2196
  d.current = l;
2195
2197
  }, [l]), B(() => {
2196
- if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2197
- m(""), h.current = 0, f.current = "typing";
2198
+ if (x.current && (clearTimeout(x.current), x.current = null), !t || s.length === 0) {
2199
+ f(""), h.current = 0, p.current = "typing";
2198
2200
  return;
2199
2201
  }
2200
2202
  const k = () => {
2201
- const M = Date.now();
2202
- if (_.current > M) {
2203
- b.current = setTimeout(k, _.current - M);
2203
+ const O = Date.now();
2204
+ if (b.current > O) {
2205
+ x.current = setTimeout(k, b.current - O);
2204
2206
  return;
2205
2207
  }
2206
- const I = s[d.current % s.length] ?? "";
2207
- f.current === "typing" ? (h.current += 1, m(I.slice(0, h.current)), h.current >= I.length ? (f.current = "holding", b.current = setTimeout(k, a)) : b.current = setTimeout(k, r + Math.random() * 28)) : f.current === "holding" ? (f.current = "erasing", b.current = setTimeout(k, o)) : (h.current = Math.max(0, h.current - 1), m(I.slice(0, h.current)), h.current <= 0 ? (f.current = "typing", d.current = (d.current + 1) % s.length, p(d.current), b.current = setTimeout(k, n)) : b.current = setTimeout(k, o));
2208
+ const D = s[d.current % s.length] ?? "";
2209
+ p.current === "typing" ? (h.current += 1, f(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", x.current = setTimeout(k, a)) : x.current = setTimeout(k, r + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(k, i)) : (h.current = Math.max(0, h.current - 1), f(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", d.current = (d.current + 1) % s.length, m(d.current), x.current = setTimeout(k, n)) : x.current = setTimeout(k, i));
2208
2210
  };
2209
- return b.current = setTimeout(k, 260), () => {
2210
- b.current && clearTimeout(b.current);
2211
+ return x.current = setTimeout(k, 260), () => {
2212
+ x.current && clearTimeout(x.current);
2211
2213
  };
2212
- }, [t, s, r, o, a, n]);
2214
+ }, [t, s, r, i, a, n]);
2213
2215
  const R = (k) => {
2214
2216
  if (s.length === 0) return;
2215
- const M = (k % s.length + s.length) % s.length, I = s[M];
2216
- d.current = M, h.current = I.length, f.current = "holding", _.current = Date.now() + i, p(M), m(I);
2217
+ const O = (k % s.length + s.length) % s.length, D = s[O];
2218
+ d.current = O, h.current = D.length, p.current = "holding", b.current = Date.now() + o, m(O), f(D);
2217
2219
  }, E = () => R(d.current + 1), g = () => R(d.current - 1), A = s[l % s.length] ?? "";
2218
2220
  return { displayed: u, currentPrompt: A, index: l, next: E, prev: g };
2219
2221
  }
2220
- let Et = 0;
2221
- function gs({
2222
+ let As = 0;
2223
+ function It({
2222
2224
  value: s = "",
2223
2225
  onChange: t,
2224
2226
  onSubmit: r,
2225
- onStop: o,
2227
+ onStop: i,
2226
2228
  onKeyDown: a,
2227
2229
  loading: n = !1,
2228
- disabled: i = !1,
2230
+ disabled: o = !1,
2229
2231
  placeholder: l = "Let's get things done...",
2230
- animatedPlaceholders: p,
2232
+ animatedPlaceholders: m,
2231
2233
  attachments: u,
2232
- images: m,
2233
- onAttachFiles: f,
2234
+ images: f,
2235
+ onAttachFiles: p,
2234
2236
  onAttachImages: h,
2235
2237
  onRemoveAttachment: d,
2236
- onRemoveImage: b,
2237
- acceptImage: _,
2238
+ onRemoveImage: x,
2239
+ acceptImage: b,
2238
2240
  acceptFile: R,
2239
2241
  maxImages: E,
2240
2242
  maxImageSize: g,
2241
2243
  leftSlot: A,
2242
2244
  rightSlot: k,
2243
- className: M = "",
2244
- ...I
2245
+ className: O = "",
2246
+ ...D
2245
2247
  }) {
2246
- const v = $(null), L = $(null), z = $(0), [Y, H] = S(!1), [X, U] = S([]), x = (j) => {
2247
- const T = ++Et;
2248
+ const v = $(null), M = $(null), z = $(0), [Y, H] = S(!1), [X, U] = S([]), _ = (j) => {
2249
+ const T = ++As;
2248
2250
  U((V) => [...V, { id: T, msg: j }]), setTimeout(() => U((V) => V.filter((G) => G.id !== T)), 6e3);
2249
- }, y = (j) => U((T) => T.filter((V) => V.id !== j)), O = (j) => j.type.startsWith("image/"), C = () => !0, K = _ ?? O, Z = R ?? C, w = (j) => {
2251
+ }, y = (j) => U((T) => T.filter((V) => V.id !== j)), L = (j) => j.type.startsWith("image/"), C = () => !0, K = b ?? L, Z = R ?? C, w = (j) => {
2250
2252
  const T = [], V = [], G = [], J = [];
2251
- let ee = 0, ie = E != null ? E - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
2252
- for (const te of j)
2253
- K(te) ? g && te.size > g ? G.push(te.name) : ie > 0 ? (T.push(te), ie--) : ee++ : Z(te) ? V.push(te) : J.push(te.name);
2253
+ let ee = 0, oe = E != null ? E - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2254
+ for (const se of j)
2255
+ K(se) ? g && se.size > g ? G.push(se.name) : oe > 0 ? (T.push(se), oe--) : ee++ : Z(se) ? V.push(se) : J.push(se.name);
2254
2256
  return { imageFiles: T, docFiles: V, tooLarge: G, skipped: J, limitExceeded: ee };
2255
2257
  }, c = (j) => {
2256
2258
  const { imageFiles: T, docFiles: V, tooLarge: G, skipped: J, limitExceeded: ee } = w(j);
2257
- G.length && x(`File${G.length > 1 ? "s" : ""} too large${g ? ` (max ${g / 1024 / 1024}MB)` : ""}: ${G.join(", ")}`), J.length && x(`Skipped unsupported file${J.length > 1 ? "s" : ""}: ${J.join(", ")}`), ee && x(`Max ${E} images per message`), h && T.length && h(T);
2258
- const ie = V.concat(h ? [] : T);
2259
- f && ie.length && f(ie);
2259
+ G.length && _(`File${G.length > 1 ? "s" : ""} too large${g ? ` (max ${g / 1024 / 1024}MB)` : ""}: ${G.join(", ")}`), J.length && _(`Skipped unsupported file${J.length > 1 ? "s" : ""}: ${J.join(", ")}`), ee && _(`Max ${E} images per message`), h && T.length && h(T);
2260
+ const oe = V.concat(h ? [] : T);
2261
+ p && oe.length && p(oe);
2260
2262
  };
2261
2263
  B(() => {
2262
- const j = L.current;
2264
+ const j = M.current;
2263
2265
  j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2264
2266
  }, [s]), B(() => {
2265
2267
  const j = (T) => {
2266
2268
  var G, J, ee;
2267
- if (n || i) return;
2269
+ if (n || o) return;
2268
2270
  const V = (G = T.target) == null ? void 0 : G.tagName;
2269
- V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (J = T.target) != null && J.isContentEditable || T.ctrlKey || T.metaKey || T.altKey || T.key.length !== 1 && T.key !== "Backspace" && T.key !== "Delete" || (ee = L.current) == null || ee.focus();
2271
+ V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (J = T.target) != null && J.isContentEditable || T.ctrlKey || T.metaKey || T.altKey || T.key.length !== 1 && T.key !== "Backspace" && T.key !== "Delete" || (ee = M.current) == null || ee.focus();
2270
2272
  };
2271
2273
  return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2272
- }, [n, i]);
2274
+ }, [n, o]);
2273
2275
  const N = (j) => {
2274
2276
  j.preventDefault(), z.current++, j.dataTransfer.types.includes("Files") && H(!0);
2275
2277
  }, P = (j) => {
2276
2278
  j.preventDefault(), z.current--, z.current === 0 && H(!1);
2277
- }, W = (j) => j.preventDefault(), se = (j) => {
2279
+ }, F = (j) => j.preventDefault(), te = (j) => {
2278
2280
  j.preventDefault(), z.current = 0, H(!1);
2279
2281
  const T = Array.from(j.dataTransfer.files);
2280
2282
  T.length && c(T);
2281
2283
  }, ae = (j) => {
2282
2284
  const T = Array.from(j.target.files || []);
2283
2285
  v.current && (v.current.value = ""), T.length && c(T);
2284
- }, F = (j) => {
2285
- var te;
2286
+ }, W = (j) => {
2287
+ var se;
2286
2288
  if (!h) return;
2287
- const T = (te = j.clipboardData) == null ? void 0 : te.items;
2289
+ const T = (se = j.clipboardData) == null ? void 0 : se.items;
2288
2290
  if (!T) return;
2289
2291
  const V = [];
2290
- for (const Me of T) {
2291
- const ke = Me.getAsFile();
2292
- ke && V.push(ke);
2292
+ for (const Ue of T) {
2293
+ const $e = Ue.getAsFile();
2294
+ $e && V.push($e);
2293
2295
  }
2294
2296
  if (V.length === 0) return;
2295
- const { imageFiles: G, tooLarge: J, skipped: ee, limitExceeded: ie } = w(V);
2296
- J.length && x(`File${J.length > 1 ? "s" : ""} too large: ${J.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), ie && x(`Max ${E} images per message`), G.length && (j.preventDefault(), h(G));
2297
- }, Q = !n && !i && !!(p != null && p.length) && s.length === 0, oe = kt({
2298
- prompts: p ?? [],
2297
+ const { imageFiles: G, tooLarge: J, skipped: ee, limitExceeded: oe } = w(V);
2298
+ J.length && _(`File${J.length > 1 ? "s" : ""} too large: ${J.join(", ")}`), ee.length && _(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), oe && _(`Max ${E} images per message`), G.length && (j.preventDefault(), h(G));
2299
+ }, Q = !n && !o && !!(m != null && m.length) && s.length === 0, ie = Ss({
2300
+ prompts: m ?? [],
2299
2301
  enabled: Q
2300
- }), be = (j) => {
2302
+ }), _e = (j) => {
2301
2303
  if (Q) {
2302
2304
  if (j.key === "ArrowDown" || j.key === "ArrowRight") {
2303
- j.preventDefault(), oe.next();
2305
+ j.preventDefault(), ie.next();
2304
2306
  return;
2305
2307
  }
2306
2308
  if (j.key === "ArrowUp" || j.key === "ArrowLeft") {
2307
- j.preventDefault(), oe.prev();
2309
+ j.preventDefault(), ie.prev();
2308
2310
  return;
2309
2311
  }
2310
2312
  if (j.key === "Tab" && !j.shiftKey) {
2311
- j.preventDefault(), t == null || t(oe.currentPrompt);
2313
+ j.preventDefault(), t == null || t(ie.currentPrompt);
2312
2314
  return;
2313
2315
  }
2314
2316
  }
2315
2317
  a == null || a(j);
2316
- }, Oe = (s.trim() || (m == null ? void 0 : m.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, ge = f || h;
2317
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...I, children: [
2318
- ge && /* @__PURE__ */ e.jsx(
2318
+ }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (u == null ? void 0 : u.length) > 0) && !o, Ee = p || h;
2319
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", O].filter(Boolean).join(" "), ...D, children: [
2320
+ Ee && /* @__PURE__ */ e.jsx(
2319
2321
  "input",
2320
2322
  {
2321
2323
  ref: v,
@@ -2332,35 +2334,35 @@ function gs({
2332
2334
  className: ["ds-prompt-input__box", Y && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2333
2335
  onDragEnter: N,
2334
2336
  onDragLeave: P,
2335
- onDragOver: W,
2336
- onDrop: se,
2337
+ onDragOver: F,
2338
+ onDrop: te,
2337
2339
  children: [
2338
2340
  Y && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2339
2341
  /* @__PURE__ */ e.jsx(
2340
2342
  "textarea",
2341
2343
  {
2342
- ref: L,
2344
+ ref: M,
2343
2345
  value: s,
2344
2346
  onChange: (j) => t == null ? void 0 : t(j.target.value),
2345
- onKeyDown: be,
2346
- onPaste: F,
2347
+ onKeyDown: _e,
2348
+ onPaste: W,
2347
2349
  placeholder: Q ? "" : l,
2348
- disabled: n || i,
2350
+ disabled: n || o,
2349
2351
  rows: 1,
2350
2352
  className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2351
2353
  }
2352
2354
  ),
2353
2355
  Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2354
- /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2356
+ /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2355
2357
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2356
2358
  ] }),
2357
- m && m.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: m.map((j, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2359
+ f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((j, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2358
2360
  /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2359
2361
  /* @__PURE__ */ e.jsx(
2360
2362
  "button",
2361
2363
  {
2362
2364
  className: "ds-prompt-input__image-remove",
2363
- onClick: () => b == null ? void 0 : b(T),
2365
+ onClick: () => x == null ? void 0 : x(T),
2364
2366
  "aria-label": "Remove image",
2365
2367
  type: "button",
2366
2368
  children: /* @__PURE__ */ e.jsx(ne, { size: 12, strokeWidth: 2 })
@@ -2376,12 +2378,12 @@ function gs({
2376
2378
  className: "ds-prompt-input__warning-close",
2377
2379
  onClick: () => y(j.id),
2378
2380
  "aria-label": "Dismiss",
2379
- children: /* @__PURE__ */ e.jsx(ne, { size: D[1], strokeWidth: 1.5 })
2381
+ children: /* @__PURE__ */ e.jsx(ne, { size: I[1], strokeWidth: 1.5 })
2380
2382
  }
2381
2383
  )
2382
2384
  ] }, j.id)) }),
2383
2385
  u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((j, T) => /* @__PURE__ */ e.jsx(pe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2384
- j.uploading ? /* @__PURE__ */ e.jsx(Ke, { size: D[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ee, { size: D[1], strokeWidth: 1.5 }),
2386
+ j.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Te, { size: I[1], strokeWidth: 1.5 }),
2385
2387
  j.filename,
2386
2388
  j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2387
2389
  "button",
@@ -2389,17 +2391,17 @@ function gs({
2389
2391
  type: "button",
2390
2392
  className: "ds-prompt-input__remove-btn",
2391
2393
  onClick: () => d == null ? void 0 : d(T),
2392
- children: /* @__PURE__ */ e.jsx(ne, { size: D[1], strokeWidth: 1.5 })
2394
+ children: /* @__PURE__ */ e.jsx(ne, { size: I[1], strokeWidth: 1.5 })
2393
2395
  }
2394
2396
  )
2395
2397
  ] }) }, T)) }),
2396
2398
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2397
- ge && /* @__PURE__ */ e.jsx(
2399
+ Ee && /* @__PURE__ */ e.jsx(
2398
2400
  fe,
2399
2401
  {
2400
2402
  variant: "ghost",
2401
2403
  size: "xs",
2402
- icon: /* @__PURE__ */ e.jsx(Ee, { size: D[2], strokeWidth: 1.5 }),
2404
+ icon: /* @__PURE__ */ e.jsx(Te, { size: I[2], strokeWidth: 1.5 }),
2403
2405
  "aria-label": "Attach files",
2404
2406
  onClick: () => {
2405
2407
  var j;
@@ -2415,8 +2417,8 @@ function gs({
2415
2417
  {
2416
2418
  variant: "primary",
2417
2419
  size: "xs",
2418
- icon: /* @__PURE__ */ e.jsx(Ge, { size: D[2], strokeWidth: 1.5 }),
2419
- onClick: o,
2420
+ icon: /* @__PURE__ */ e.jsx(es, { size: I[2], strokeWidth: 1.5 }),
2421
+ onClick: i,
2420
2422
  "aria-label": "Stop"
2421
2423
  }
2422
2424
  ) : /* @__PURE__ */ e.jsx(
@@ -2424,9 +2426,9 @@ function gs({
2424
2426
  {
2425
2427
  variant: "primary",
2426
2428
  size: "xs",
2427
- icon: /* @__PURE__ */ e.jsx(Xe, { size: D[2], strokeWidth: 1.5 }),
2429
+ icon: /* @__PURE__ */ e.jsx(ss, { size: I[2], strokeWidth: 1.5 }),
2428
2430
  onClick: r,
2429
- disabled: !Oe,
2431
+ disabled: !Ce,
2430
2432
  "aria-label": "Send"
2431
2433
  }
2432
2434
  )
@@ -2436,41 +2438,41 @@ function gs({
2436
2438
  )
2437
2439
  ] });
2438
2440
  }
2439
- const De = { fast: 0, standard: 1, premium: 2 };
2440
- function ks({
2441
+ const Pe = { fast: 0, standard: 1, premium: 2 };
2442
+ function Dt({
2441
2443
  models: s = [],
2442
2444
  value: t,
2443
2445
  onChange: r,
2444
- size: o = "xs",
2446
+ size: i = "xs",
2445
2447
  minTier: a,
2446
2448
  showAutoOption: n = !1,
2447
- groupByTier: i = !0,
2449
+ groupByTier: o = !0,
2448
2450
  className: l = "",
2449
- ...p
2451
+ ...m
2450
2452
  }) {
2451
- const [u, m] = S(!1), f = $(null), h = $(null), [d, b] = S({}), _ = s.filter((v) => !a || v.name === "auto" ? !0 : (De[v.tier] ?? 1) >= (De[a] ?? 1)), R = _.find((v) => v.name === "auto"), E = _.filter((v) => v.name !== "auto"), g = s.find((v) => v.name === t);
2453
+ const [u, f] = S(!1), p = $(null), h = $(null), [d, x] = S({}), b = s.filter((v) => !a || v.name === "auto" ? !0 : (Pe[v.tier] ?? 1) >= (Pe[a] ?? 1)), R = b.find((v) => v.name === "auto"), E = b.filter((v) => v.name !== "auto"), g = s.find((v) => v.name === t);
2452
2454
  B(() => {
2453
2455
  var Y;
2454
2456
  if (!u) return;
2455
- const v = (Y = f.current) == null ? void 0 : Y.getBoundingClientRect();
2456
- v && b({
2457
+ const v = (Y = p.current) == null ? void 0 : Y.getBoundingClientRect();
2458
+ v && x({
2457
2459
  position: "fixed",
2458
2460
  zIndex: "var(--z-dropdown, 500)",
2459
2461
  top: v.bottom + 4,
2460
2462
  right: window.innerWidth - v.right
2461
2463
  });
2462
- const L = (H) => {
2464
+ const M = (H) => {
2463
2465
  var X, U;
2464
- !((X = f.current) != null && X.contains(H.target)) && !((U = h.current) != null && U.contains(H.target)) && m(!1);
2466
+ !((X = p.current) != null && X.contains(H.target)) && !((U = h.current) != null && U.contains(H.target)) && f(!1);
2465
2467
  }, z = (H) => {
2466
- H.key === "Escape" && m(!1);
2468
+ H.key === "Escape" && f(!1);
2467
2469
  };
2468
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", z), () => {
2469
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", z);
2470
+ return document.addEventListener("mousedown", M), document.addEventListener("keydown", z), () => {
2471
+ document.removeEventListener("mousedown", M), document.removeEventListener("keydown", z);
2470
2472
  };
2471
2473
  }, [u]);
2472
2474
  const A = (v) => {
2473
- r == null || r(v), m(!1);
2475
+ r == null || r(v), f(!1);
2474
2476
  }, k = (v) => /* @__PURE__ */ e.jsxs(
2475
2477
  "button",
2476
2478
  {
@@ -2481,19 +2483,19 @@ function ks({
2481
2483
  ].filter(Boolean).join(" "),
2482
2484
  onClick: () => A(v.name),
2483
2485
  children: [
2484
- v.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: v.icon }) : /* @__PURE__ */ e.jsx($e, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2486
+ v.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: v.icon }) : /* @__PURE__ */ e.jsx(Re, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2485
2487
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: v.displayName || v.name }),
2486
2488
  v.tier && /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__tier-badge", "data-tier": v.tier, children: v.tier })
2487
2489
  ]
2488
2490
  },
2489
2491
  v.name
2490
- ), M = () => i ? ["fast", "standard", "premium"].flatMap((v) => {
2491
- const L = E.filter((z) => z.tier === v);
2492
- return L.length ? [
2492
+ ), O = () => o ? ["fast", "standard", "premium"].flatMap((v) => {
2493
+ const M = E.filter((z) => z.tier === v);
2494
+ return M.length ? [
2493
2495
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": v, children: v.charAt(0).toUpperCase() + v.slice(1) }, `lbl-${v}`),
2494
- ...L.map(k)
2496
+ ...M.map(k)
2495
2497
  ] : [];
2496
- }) : E.map(k), I = u && /* @__PURE__ */ e.jsxs("div", { ref: h, className: "ds-model-picker__menu", style: d, children: [
2498
+ }) : E.map(k), D = u && /* @__PURE__ */ e.jsxs("div", { ref: h, className: "ds-model-picker__menu", style: d, children: [
2497
2499
  n && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2498
2500
  /* @__PURE__ */ e.jsxs(
2499
2501
  "button",
@@ -2506,106 +2508,299 @@ function ks({
2506
2508
  ].filter(Boolean).join(" "),
2507
2509
  onClick: () => A("auto"),
2508
2510
  children: [
2509
- /* @__PURE__ */ e.jsx(Je, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2511
+ /* @__PURE__ */ e.jsx(ts, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2510
2512
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2511
2513
  ]
2512
2514
  }
2513
2515
  ),
2514
2516
  E.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2515
2517
  ] }),
2516
- M()
2518
+ O()
2517
2519
  ] });
2518
2520
  return /* @__PURE__ */ e.jsxs(
2519
2521
  "div",
2520
2522
  {
2521
- ref: f,
2523
+ ref: p,
2522
2524
  className: ["ds-model-picker", l].filter(Boolean).join(" "),
2523
- ...p,
2525
+ ...m,
2524
2526
  children: [
2525
2527
  /* @__PURE__ */ e.jsxs(
2526
2528
  "button",
2527
2529
  {
2528
2530
  type: "button",
2529
2531
  className: "ds-model-picker__trigger",
2530
- onClick: () => m((v) => !v),
2532
+ onClick: () => f((v) => !v),
2531
2533
  "aria-haspopup": "listbox",
2532
2534
  "aria-expanded": u,
2533
2535
  children: [
2534
- g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx($e, { size: 12, strokeWidth: 1.5 }),
2536
+ g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx(Re, { size: 12, strokeWidth: 1.5 }),
2535
2537
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (g == null ? void 0 : g.displayName) || (g == null ? void 0 : g.name) || t }),
2536
2538
  (g == null ? void 0 : g.tier) && /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__tier-badge", "data-tier": g.tier, children: g.tier })
2537
2539
  ]
2538
2540
  }
2539
2541
  ),
2540
- typeof document < "u" && me.createPortal(I, document.body)
2542
+ typeof document < "u" && me.createPortal(D, document.body)
2543
+ ]
2544
+ }
2545
+ );
2546
+ }
2547
+ function je(s) {
2548
+ return s != null && s.length ? "p. " + s.join(", ") : null;
2549
+ }
2550
+ function Is(s) {
2551
+ const t = /* @__PURE__ */ new Map();
2552
+ for (const r of s)
2553
+ t.has(r.filename) || t.set(r.filename, { filename: r.filename, url: r.url, items: [] }), t.get(r.filename).items.push(r);
2554
+ return [...t.values()];
2555
+ }
2556
+ function Bt({
2557
+ sources: s = [],
2558
+ layout: t = "list",
2559
+ title: r = "Sources",
2560
+ maxVisible: i = 5,
2561
+ onSourceClick: a
2562
+ }) {
2563
+ const [n, o] = S(!1), l = Is(s), m = l.length > i, u = n ? l : l.slice(0, i), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2564
+ return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2565
+ u.map((h) => {
2566
+ const d = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2567
+ return /* @__PURE__ */ e.jsxs(
2568
+ "div",
2569
+ {
2570
+ className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2571
+ onClick: x ? () => a(h.items[0]) : void 0,
2572
+ children: [
2573
+ /* @__PURE__ */ e.jsx(rs, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2574
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2575
+ d.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: je(d) })
2576
+ ]
2577
+ },
2578
+ h.filename
2579
+ );
2580
+ }),
2581
+ m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2582
+ "+",
2583
+ l.length - i,
2584
+ " more sources"
2585
+ ] })
2586
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2587
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: r }),
2588
+ u.map((h) => {
2589
+ const d = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2590
+ return f ? /* @__PURE__ */ e.jsx(
2591
+ Fe,
2592
+ {
2593
+ title: /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2594
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2595
+ d.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: je(d) })
2596
+ ] }),
2597
+ padding: "s",
2598
+ children: h.items.map((b, R) => /* @__PURE__ */ e.jsx(
2599
+ "div",
2600
+ {
2601
+ className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2602
+ onClick: x ? () => a(b) : void 0,
2603
+ children: b.snippet ?? `p. ${b.page}`
2604
+ },
2605
+ R
2606
+ ))
2607
+ },
2608
+ h.filename
2609
+ ) : /* @__PURE__ */ e.jsxs(
2610
+ "div",
2611
+ {
2612
+ className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
2613
+ onClick: x ? () => a(h.items[0]) : void 0,
2614
+ children: [
2615
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2616
+ d.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: je(d) })
2617
+ ]
2618
+ },
2619
+ h.filename
2620
+ );
2621
+ }),
2622
+ m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2623
+ "+",
2624
+ l.length - i,
2625
+ " more sources"
2626
+ ] })
2627
+ ] });
2628
+ }
2629
+ function Me(s) {
2630
+ return s >= 1e6 ? (s / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : s >= 1e3 ? (s / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(s);
2631
+ }
2632
+ function Pt({
2633
+ used: s,
2634
+ limit: t,
2635
+ size: r = "s",
2636
+ showCount: i = !0,
2637
+ showPercent: a = !1,
2638
+ warningThreshold: n = 0.8,
2639
+ errorThreshold: o = 1
2640
+ }) {
2641
+ const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), u = l >= o ? "error" : l >= n ? "warning" : "normal";
2642
+ return /* @__PURE__ */ e.jsxs(
2643
+ "div",
2644
+ {
2645
+ className: `ds-token-counter ds-token-counter--${r}`,
2646
+ role: "meter",
2647
+ "aria-valuenow": s,
2648
+ "aria-valuemax": t,
2649
+ children: [
2650
+ /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
2651
+ "div",
2652
+ {
2653
+ className: `ds-token-counter__fill ds-token-counter__fill--${u}`,
2654
+ style: { width: `${m}%` }
2655
+ }
2656
+ ) }),
2657
+ (i || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
2658
+ i && /* @__PURE__ */ e.jsxs("span", { children: [
2659
+ Me(s),
2660
+ " / ",
2661
+ Me(t),
2662
+ " tokens"
2663
+ ] }),
2664
+ a && /* @__PURE__ */ e.jsxs("span", { children: [
2665
+ Math.round(l * 100),
2666
+ "%"
2667
+ ] })
2668
+ ] })
2541
2669
  ]
2542
2670
  }
2543
2671
  );
2544
2672
  }
2673
+ const Le = 5;
2674
+ function Ds(s) {
2675
+ return s < 0.34 ? "low" : s < 0.67 ? "medium" : "high";
2676
+ }
2677
+ function Mt({
2678
+ value: s = 0,
2679
+ size: t = "xs",
2680
+ showLabel: r = "none",
2681
+ layout: i = "inline"
2682
+ }) {
2683
+ const a = Math.max(0, Math.min(1, s)), n = Math.round(a * Le), o = Ds(a);
2684
+ return /* @__PURE__ */ e.jsxs("div", { className: [
2685
+ "ds-confidence-bar",
2686
+ `ds-confidence-bar--${t}`,
2687
+ `ds-confidence-bar--${o}`,
2688
+ i === "block" && "ds-confidence-bar--block"
2689
+ ].filter(Boolean).join(" "), children: [
2690
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Le }, (l, m) => /* @__PURE__ */ e.jsx(
2691
+ "div",
2692
+ {
2693
+ className: `ds-confidence-bar__seg${m < n ? " ds-confidence-bar__seg--filled" : ""}`
2694
+ },
2695
+ m
2696
+ )) }),
2697
+ r === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: o })
2698
+ ] });
2699
+ }
2700
+ const Bs = { add: "+", remove: "-", context: " " };
2701
+ function be({ line: s, lineNumbers: t }) {
2702
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${s.type}`, children: [
2703
+ t && s.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: s.lineNo }),
2704
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Bs[s.type] }),
2705
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: s.text })
2706
+ ] });
2707
+ }
2708
+ function Lt({
2709
+ lines: s = [],
2710
+ layout: t = "inline",
2711
+ wordWrap: r = !1,
2712
+ lineNumbers: i = !0,
2713
+ maxHeight: a,
2714
+ title: n
2715
+ }) {
2716
+ const o = [
2717
+ "ds-diff-view",
2718
+ `ds-diff-view--${t}`,
2719
+ r && "ds-diff-view--wrap"
2720
+ ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
2721
+ if (t === "split") {
2722
+ const m = s.filter((f) => f.type === "remove" || f.type === "context"), u = s.filter((f) => f.type === "add" || f.type === "context");
2723
+ return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2724
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2725
+ /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body", style: l, children: [
2726
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: m.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) }),
2727
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: u.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) })
2728
+ ] })
2729
+ ] });
2730
+ }
2731
+ return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2732
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2733
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((m, u) => /* @__PURE__ */ e.jsx(be, { line: m, lineNumbers: i }, u)) })
2734
+ ] });
2735
+ }
2545
2736
  export {
2546
- it as Accordion,
2547
- zt as Alert,
2548
- ms as AnimatedNumber,
2549
- Xt as Avatar,
2737
+ Fe as Accordion,
2738
+ Hs as Alert,
2739
+ Nt as AnimatedNumber,
2740
+ nt as Avatar,
2550
2741
  pe as Badge,
2551
- ds as Banner,
2552
- is as Breadcrumb,
2742
+ jt as Banner,
2743
+ ht as Breadcrumb,
2553
2744
  fe as Button,
2554
- st as Card,
2555
- ws as ChatMessage,
2556
- Kt as Checkbox,
2557
- Ft as Code,
2558
- ot as CodeAccordion,
2559
- js as CopyButton,
2560
- cs as Drawer,
2561
- Ae as DrawerFooter,
2562
- us as Dropdown,
2563
- ns as EmptyState,
2564
- as as FormField,
2565
- Bt as H1,
2566
- Pt as H2,
2567
- Lt as H3,
2568
- Ot as H4,
2569
- ps as InView,
2570
- St as Input,
2571
- Ct as Link,
2572
- Wt as Modal,
2573
- Se as ModalFooter,
2574
- ks as ModelPicker,
2575
- Mt as P1,
2576
- rt as P2,
2577
- Pe as P3,
2578
- ls as Pagination,
2579
- fs as ProgressBar,
2580
- gs as PromptInput,
2581
- Gt as Radio,
2582
- _s as ReasoningBlock,
2583
- Yt as SegmentedControl,
2584
- It as Select,
2585
- dt as Skeleton,
2586
- et as Spinner,
2587
- os as Stat,
2588
- vs as StepIndicator,
2589
- Dt as Stepper,
2590
- Ns as StreamingText,
2591
- Vt as Tab,
2592
- Jt as Table,
2593
- Qt as TableBody,
2594
- Zt as TableHead,
2595
- es as TableRow,
2596
- ts as TableSubheaderRow,
2597
- Ut as Tabs,
2598
- rs as Td,
2599
- At as Textarea,
2600
- ss as Th,
2601
- xs as ToastContainer,
2602
- Ht as Toggle,
2603
- bs as ToolCallCard,
2604
- qt as Tooltip,
2605
- D as iconSizes,
2606
- _t as useAnimatedNumber,
2607
- kt as useAnimatedPlaceholder,
2608
- vt as useInView,
2609
- ys as useStreamScroll,
2610
- hs as useToast
2745
+ ls as Card,
2746
+ St as ChatMessage,
2747
+ tt as Checkbox,
2748
+ Gs as Code,
2749
+ fs as CodeAccordion,
2750
+ Mt as ConfidenceBar,
2751
+ Et as CopyButton,
2752
+ Lt as DiffView,
2753
+ _t as Drawer,
2754
+ De as DrawerFooter,
2755
+ bt as Dropdown,
2756
+ ft as EmptyState,
2757
+ mt as FormField,
2758
+ Cs as H1,
2759
+ Us as H2,
2760
+ Vs as H3,
2761
+ Ys as H4,
2762
+ wt as InView,
2763
+ Os as Input,
2764
+ Xs as Link,
2765
+ Ks as Modal,
2766
+ Ie as ModalFooter,
2767
+ Dt as ModelPicker,
2768
+ qs as P1,
2769
+ cs as P2,
2770
+ ze as P3,
2771
+ xt as Pagination,
2772
+ vt as ProgressBar,
2773
+ It as PromptInput,
2774
+ rt as Radio,
2775
+ $t as ReasoningBlock,
2776
+ Qs as SegmentedControl,
2777
+ Fs as Select,
2778
+ hs as Skeleton,
2779
+ Bt as SourcesPanel,
2780
+ is as Spinner,
2781
+ pt as Stat,
2782
+ Tt as StepIndicator,
2783
+ Ws as Stepper,
2784
+ Rt as StreamingText,
2785
+ Zs as Tab,
2786
+ at as Table,
2787
+ ot as TableBody,
2788
+ it as TableHead,
2789
+ lt as TableRow,
2790
+ ct as TableSubheaderRow,
2791
+ Js as Tabs,
2792
+ ut as Td,
2793
+ zs as Textarea,
2794
+ dt as Th,
2795
+ gt as ToastContainer,
2796
+ st as Toggle,
2797
+ Pt as TokenCounter,
2798
+ kt as ToolCallCard,
2799
+ et as Tooltip,
2800
+ I as iconSizes,
2801
+ gs as useAnimatedNumber,
2802
+ Ss as useAnimatedPlaceholder,
2803
+ ks as useInView,
2804
+ At as useStreamScroll,
2805
+ yt as useToast
2611
2806
  };