@epam/ai-dial-conversation-input 1.1.0-dev.112 → 1.1.0-dev.114

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/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RequestStatus as r, ResponseFormat as i, buildCssVars as a, mergeClasses as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as c, Button as l, DIAL_ICON_SIZE as u, DialCloseButton as d, DialDropdown as f, DialDropdownIcon as p, DialErrorText as m, DialInput as h, DialPopup as g, DialRadioGroup as _, DialSearch as v, DialSkeleton as y, DialSkeletonVariant as b, DialSlider as x, DialTag as S, DialTooltip as C, ElementSize as w, GhostIconButton as T, Highlight as E, NeutralButton as D, PopupSize as O, PrimaryButton as k, PrimaryIconButton as A, RadioGroupOrientation as j, StaticIconButton as M } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as N, IconArrowNarrowRight as ee, IconCheck as te, IconChevronDown as P, IconChevronRight as F, IconFile as ne, IconMicrophone as re, IconPaperclip as ie, IconPlayerStopFilled as ae, IconPlaystationSquare as oe, IconPlus as I, IconSettings as se, IconTool as ce, IconX as le } from "@tabler/icons-react";
2
+ import { BASE_ICON_SIZE as c, Button as l, DIAL_ICON_SIZE as u, DialCloseButton as d, DialDropdown as f, DialDropdownIcon as p, DialErrorText as m, DialInput as h, DialPopup as g, DialRadioGroup as _, DialSearch as v, DialSkeleton as y, DialSkeletonVariant as b, DialSlider as x, DialTooltip as S, ElementSize as C, GhostIconButton as w, Highlight as T, NeutralButton as E, PopupSize as D, PrimaryButton as O, PrimaryIconButton as k, RadioGroupOrientation as A, StaticIconButton as j } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as M, IconArrowNarrowRight as N, IconCheck as P, IconChevronDown as ee, IconChevronRight as F, IconFile as te, IconMicrophone as ne, IconPaperclip as re, IconPlayerStopFilled as ie, IconPlaystationSquare as ae, IconPlus as oe, IconSettings as se, IconTool as ce, IconX as le } from "@tabler/icons-react";
4
4
  import { createPortal as ue } from "react-dom";
5
- import { createElement as de, memo as L, useCallback as R, useEffect as z, useImperativeHandle as fe, useLayoutEffect as pe, useMemo as B, useRef as V, useState as H } from "react";
6
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
5
+ import { createElement as de, memo as fe, useCallback as I, useEffect as L, useImperativeHandle as pe, useLayoutEffect as R, useMemo as z, useRef as B, useState as V } from "react";
6
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
7
  import { AttachmentCard as me, AttachmentGroup as he, AttachmentTray as ge, AttachmentTray as _e, FileDndOverlay as ve, MAX_UPLOADS_PER_MINUTE as ye, generateAttachmentId as be, getAttachmentIcon as xe, useClipboardPaste as Se } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
9
9
  var Ce = (e, t) => {
10
- z(() => {
10
+ L(() => {
11
11
  if (!e) return;
12
12
  let n = (e) => {
13
13
  e.key === "Escape" && t();
14
14
  };
15
15
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
16
- }, [e, t]), z(() => {
16
+ }, [e, t]), L(() => {
17
17
  if (e) return document.body.style.overflow = "hidden", () => {
18
18
  document.body.style.overflow = "";
19
19
  };
@@ -24,7 +24,7 @@ var Ce = (e, t) => {
24
24
  "slide-up": "_slide-up_1yh0r_1",
25
25
  title: "_title_1yh0r_18",
26
26
  divider: "_divider_1yh0r_22"
27
- }, K = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: f = "dial-body-semi-text", className: p, colors: m, children: h }) => {
27
+ }, G = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: f = "dial-body-semi-text", className: p, colors: m, children: h }) => {
28
28
  if (Ce(e, r), !e || typeof document > "u") return null;
29
29
  let g = a({
30
30
  "--ci-backdrop": m?.backdrop,
@@ -32,12 +32,12 @@ var Ce = (e, t) => {
32
32
  "--ci-sheet-text": m?.sheetText,
33
33
  "--ci-sheet-divider": m?.divider
34
34
  });
35
- return ue(/* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
35
+ return ue(/* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
36
36
  className: o(we.backdrop, "fixed inset-0 z-[55]"),
37
37
  style: g,
38
38
  onPointerDown: r,
39
39
  "aria-hidden": !0
40
- }), /* @__PURE__ */ G("div", {
40
+ }), /* @__PURE__ */ W("div", {
41
41
  role: "dialog",
42
42
  "aria-modal": !0,
43
43
  "aria-label": t ?? c,
@@ -46,13 +46,13 @@ var Ce = (e, t) => {
46
46
  ...l
47
47
  },
48
48
  className: o(we.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col", p),
49
- children: [t != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
49
+ children: [t != null && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("div", {
50
50
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
51
51
  children: [
52
- i && /* @__PURE__ */ W("div", {
52
+ i && /* @__PURE__ */ U("div", {
53
53
  className: "absolute start-4",
54
- children: /* @__PURE__ */ W(T, {
55
- icon: /* @__PURE__ */ W(N, {
54
+ children: /* @__PURE__ */ U(w, {
55
+ icon: /* @__PURE__ */ U(M, {
56
56
  size: u.LG,
57
57
  stroke: 1.5,
58
58
  className: "rtl:scale-x-[-1]"
@@ -61,20 +61,20 @@ var Ce = (e, t) => {
61
61
  onClick: i
62
62
  })
63
63
  }),
64
- /* @__PURE__ */ W("span", {
64
+ /* @__PURE__ */ U("span", {
65
65
  className: o(we.title, f),
66
66
  children: t
67
67
  }),
68
- /* @__PURE__ */ W("div", {
68
+ /* @__PURE__ */ U("div", {
69
69
  className: "absolute end-4 m-2",
70
- children: /* @__PURE__ */ W(d, {
70
+ children: /* @__PURE__ */ U(d, {
71
71
  ariaLabel: n,
72
72
  size: u.LG,
73
73
  onClose: r
74
74
  })
75
75
  })
76
76
  ]
77
- }), /* @__PURE__ */ W("div", { className: o(we.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ W("div", {
77
+ }), /* @__PURE__ */ U("div", { className: o(we.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ U("div", {
78
78
  className: "overflow-y-auto",
79
79
  children: h
80
80
  })]
@@ -84,15 +84,15 @@ var Ce = (e, t) => {
84
84
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
85
85
  await Promise.allSettled(i);
86
86
  }, Ee = ({ initialAttachments: n, onUploadAttachment: i, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
87
- let [h, g] = H(n), _ = V(h);
88
- z(() => {
87
+ let [h, g] = V(n), _ = B(h);
88
+ L(() => {
89
89
  _.current = h;
90
- }, [h]), z(() => () => {
90
+ }, [h]), L(() => () => {
91
91
  _.current.forEach((e) => {
92
92
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
93
93
  });
94
94
  }, []);
95
- let v = R((e) => e.map((e) => {
95
+ let v = I((e) => e.map((e) => {
96
96
  let n = e.type.startsWith("image/"), i = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = i ? URL.createObjectURL(e) : void 0;
97
97
  return {
98
98
  id: be(),
@@ -104,26 +104,26 @@ var Ce = (e, t) => {
104
104
  previewUrl: a,
105
105
  playUrl: o
106
106
  };
107
- }), []), y = V(a);
108
- z(() => {
107
+ }), []), y = B(a);
108
+ L(() => {
109
109
  y.current = a;
110
110
  }, [a]);
111
- let b = V(!0), x = R((e) => {
111
+ let b = B(!0), x = I((e) => {
112
112
  g((t) => {
113
113
  let n = e(t);
114
114
  return n === t ? t : n;
115
115
  });
116
116
  }, []);
117
- z(() => {
117
+ L(() => {
118
118
  if (b.current) {
119
119
  b.current = !1;
120
120
  return;
121
121
  }
122
122
  y.current?.(h);
123
123
  }, [h]);
124
- let S = R((e) => {
124
+ let S = I((e) => {
125
125
  g(e);
126
- }, []), C = R(async (t) => {
126
+ }, []), C = I(async (t) => {
127
127
  if (i) {
128
128
  x((e) => e.map((e) => e.id === t.id ? {
129
129
  ...e,
@@ -145,7 +145,7 @@ var Ce = (e, t) => {
145
145
  } : e));
146
146
  }
147
147
  }
148
- }, [i, x]), w = R((e, t = !0) => {
148
+ }, [i, x]), w = I((e, t = !0) => {
149
149
  let n = new Set(_.current.map((e) => e.id)), i = e.filter((e) => !n.has(e.id));
150
150
  if (i.length !== 0) {
151
151
  if (f != null && f > 0 && Number.isFinite(f)) {
@@ -177,20 +177,20 @@ var Ce = (e, t) => {
177
177
  C,
178
178
  o
179
179
  ]);
180
- z(() => {
180
+ L(() => {
181
181
  s.length !== 0 && (w(v(s)), c?.());
182
182
  }, [
183
183
  w,
184
184
  v,
185
185
  c,
186
186
  s
187
- ]), z(() => {
187
+ ]), L(() => {
188
188
  l.length !== 0 && (w(l, !1), u?.());
189
189
  }, [
190
190
  w,
191
191
  u,
192
192
  l
193
- ]), z(() => {
193
+ ]), L(() => {
194
194
  if (!o) return;
195
195
  let t = !1, n = [], i = _.current.map((i) => {
196
196
  if (i.status === r.Loading) return i;
@@ -217,7 +217,7 @@ var Ce = (e, t) => {
217
217
  x,
218
218
  C
219
219
  ]);
220
- let T = R((e) => {
220
+ let T = I((e) => {
221
221
  x((t) => {
222
222
  let n = t.find((t) => t.id === e);
223
223
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -229,11 +229,11 @@ var Ce = (e, t) => {
229
229
  addAttachments: w,
230
230
  resetAttachments: S,
231
231
  handleRemove: T,
232
- handleRetry: R((e) => {
232
+ handleRetry: I((e) => {
233
233
  let t = h.find((t) => t.id === e);
234
234
  t && C(t);
235
235
  }, [h, C]),
236
- handleExpand: R(async (e) => {
236
+ handleExpand: I(async (e) => {
237
237
  let n = h.find((t) => t.id === e);
238
238
  if (!n || n.type !== t.Pasted) return;
239
239
  let r = await n.file.text();
@@ -246,8 +246,8 @@ var Ce = (e, t) => {
246
246
  hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
247
247
  };
248
248
  }, De = (e, t) => {
249
- let [n, r] = H(e), [i, a] = H(!1), [o, s] = H(0);
250
- return z(() => {
249
+ let [n, r] = V(e), [i, a] = V(!1), [o, s] = V(0);
250
+ return L(() => {
251
251
  if (e) {
252
252
  r(!0), a(!1), s((e) => e + 1);
253
253
  return;
@@ -264,17 +264,17 @@ var Ce = (e, t) => {
264
264
  instanceKey: o
265
265
  };
266
266
  }, Oe = (e, t) => !e.slice(0, t).includes("\n"), ke = (e, t) => !e.slice(t).includes("\n"), Ae = (e) => {
267
- let t = V(e);
267
+ let t = B(e);
268
268
  t.current = e;
269
- let n = V(-1), r = V(""), i = R((e, i, a) => {
269
+ let n = B(-1), r = B(""), i = I((e, i, a) => {
270
270
  let o = t.current;
271
271
  return !o || o.length === 0 ? null : e === "up" ? !Oe(i, a) || n.current === 0 ? null : (n.current === -1 ? (r.current = i, n.current = o.length - 1) : --n.current, o[n.current]) : n.current === -1 || !ke(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
- }, []), a = R(() => {
272
+ }, []), a = I(() => {
273
273
  n.current = -1, r.current = "";
274
- }, []), o = R(() => {
274
+ }, []), o = I(() => {
275
275
  n.current = -1, r.current = "";
276
276
  }, []);
277
- return B(() => ({
277
+ return z(() => ({
278
278
  navigate: i,
279
279
  notifyChange: a,
280
280
  reset: o
@@ -284,12 +284,12 @@ var Ce = (e, t) => {
284
284
  o
285
285
  ]);
286
286
  }, je = ({ messageProp: e, messageRevision: t }) => {
287
- let [n, r] = H(e), i = V(null), a = V(0), [o, s] = H(!1);
288
- return z(() => {
287
+ let [n, r] = V(e), i = B(null), a = B(0), [o, s] = V(!1);
288
+ return L(() => {
289
289
  r(e);
290
- }, [e, t]), z(() => {
290
+ }, [e, t]), L(() => {
291
291
  i.current && (a.current = i.current.offsetHeight);
292
- }, []), pe(() => {
292
+ }, []), R(() => {
293
293
  if (!i.current || a.current === 0) return;
294
294
  let e = i.current.offsetHeight > a.current;
295
295
  s((t) => e ? !0 : n === "" ? !1 : t);
@@ -306,13 +306,13 @@ var Ce = (e, t) => {
306
306
  "audio/ogg;codecs=opus",
307
307
  "audio/webm"
308
308
  ], Pe = () => Ne.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Fe = ({ onAttachAudio: e }) => {
309
- let [t, n] = H("idle"), [r, i] = H(null), [a, o] = H(0), s = V(null), c = V(null), l = V(null), u = V(null), d = V([]), f = V(""), p = V(null), m = V(e);
309
+ let [t, n] = V("idle"), [r, i] = V(null), [a, o] = V(0), s = B(null), c = B(null), l = B(null), u = B(null), d = B([]), f = B(""), p = B(null), m = B(e);
310
310
  m.current = e;
311
- let h = R(() => {
311
+ let h = I(() => {
312
312
  p.current != null && (clearInterval(p.current), p.current = null);
313
- }, []), g = R(() => {
313
+ }, []), g = I(() => {
314
314
  h(), s.current &&= (s.current.getTracks().forEach((e) => e.stop()), null), c.current &&= (c.current.close(), null), l.current = null, u.current = null;
315
- }, [h]), _ = R(() => {
315
+ }, [h]), _ = I(() => {
316
316
  (async () => {
317
317
  try {
318
318
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
@@ -333,17 +333,17 @@ var Ce = (e, t) => {
333
333
  i(e instanceof Error ? e.message : "Microphone access denied"), n("error");
334
334
  }
335
335
  })();
336
- }, []), v = R(() => {
336
+ }, []), v = I(() => {
337
337
  let e = u.current;
338
338
  !e || e.state !== "recording" || (h(), e.onstop = () => {
339
339
  let e = f.current || "audio/webm", t = new Blob(d.current, { type: e }), r = e.split(";")[0], a = r.split("/")[1] ?? "webm", s = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -1), c = new File([t], `voice-${s}.${a}`, { type: r });
340
340
  m.current(c), g(), o(0), i(null), n("idle");
341
341
  }, e.stop());
342
- }, [h, g]), y = R(() => {
342
+ }, [h, g]), y = I(() => {
343
343
  let e = u.current;
344
344
  e && e.state === "recording" && (e.ondataavailable = null, e.onstop = null, e.stop()), g(), o(0), i(null), n("idle");
345
345
  }, [g]);
346
- return z(() => () => {
346
+ return L(() => () => {
347
347
  g();
348
348
  }, [g]), {
349
349
  state: t,
@@ -368,7 +368,7 @@ var Ce = (e, t) => {
368
368
  "--ci-sheet-item-active": p?.itemActiveBg,
369
369
  "--ci-sheet-icon": p?.itemIcon
370
370
  });
371
- return /* @__PURE__ */ W(K, {
371
+ return /* @__PURE__ */ U(G, {
372
372
  isOpen: e,
373
373
  title: t,
374
374
  closeLabel: n,
@@ -377,23 +377,23 @@ var Ce = (e, t) => {
377
377
  className: c,
378
378
  titleClassName: u,
379
379
  colors: p?.shell,
380
- children: /* @__PURE__ */ W("ul", {
380
+ children: /* @__PURE__ */ U("ul", {
381
381
  role: "list",
382
382
  className: "flex flex-col",
383
383
  style: h,
384
- children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ W(l, {
384
+ children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(l, {
385
385
  type: "button",
386
386
  className: o(Le.item, "w-full gap-3 px-4 py-[10px] text-start"),
387
- iconBefore: /* @__PURE__ */ W("span", {
387
+ iconBefore: /* @__PURE__ */ U("span", {
388
388
  className: Le.itemIcon,
389
389
  children: n
390
390
  }),
391
- iconAfter: r ? /* @__PURE__ */ W("span", {
391
+ iconAfter: r ? /* @__PURE__ */ U("span", {
392
392
  className: "ms-auto",
393
393
  children: r
394
394
  }) : null,
395
395
  textClassName: f,
396
- label: /* @__PURE__ */ W("span", {
396
+ label: /* @__PURE__ */ U("span", {
397
397
  className: d,
398
398
  children: t
399
399
  }),
@@ -402,8 +402,8 @@ var Ce = (e, t) => {
402
402
  })
403
403
  });
404
404
  }, ze = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
405
- let [s, c] = H(t), [l, u] = H(n), [d, f] = H(r), p = V(o);
406
- z(() => {
405
+ let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
406
+ L(() => {
407
407
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
408
408
  }, [
409
409
  o,
@@ -420,7 +420,7 @@ var Ce = (e, t) => {
420
420
  setResponseFormat: c,
421
421
  setSystemPrompt: u,
422
422
  setTemperature: f,
423
- handleSubmit: R(() => {
423
+ handleSubmit: I(() => {
424
424
  if (!m) return;
425
425
  let t = {};
426
426
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -440,15 +440,15 @@ var Ce = (e, t) => {
440
440
  "Creative"
441
441
  ], temperatureHint: b, labelClassName: S = "!dial-small-semi-text", colors: C }) => {
442
442
  let w = a({ "--csf-label-text": C?.labelText }), T = o(S, Be.label, "gap-1");
443
- return /* @__PURE__ */ G("div", {
443
+ return /* @__PURE__ */ W("div", {
444
444
  className: "flex flex-col gap-4 px-6 py-3",
445
445
  style: w,
446
446
  children: [
447
- e.responseFormat && /* @__PURE__ */ W(_, {
447
+ e.responseFormat && /* @__PURE__ */ U(_, {
448
448
  fieldTitle: u,
449
449
  labelClassName: T,
450
450
  elementId: "response-format",
451
- orientation: j.Column,
451
+ orientation: A.Column,
452
452
  activeRadioButton: t ?? i.Markdown,
453
453
  labelDescription: d,
454
454
  radioButtons: [{
@@ -460,7 +460,7 @@ var Ce = (e, t) => {
460
460
  }],
461
461
  onChange: (e) => s(e)
462
462
  }),
463
- e.systemPrompt && /* @__PURE__ */ W(h, {
463
+ e.systemPrompt && /* @__PURE__ */ U(h, {
464
464
  value: n,
465
465
  placeholder: g,
466
466
  labelProps: {
@@ -469,7 +469,7 @@ var Ce = (e, t) => {
469
469
  },
470
470
  onChange: (e) => c(e ?? "")
471
471
  }),
472
- e.temperature && /* @__PURE__ */ W(x, {
472
+ e.temperature && /* @__PURE__ */ U(x, {
473
473
  labelProps: {
474
474
  label: v,
475
475
  className: T,
@@ -484,8 +484,8 @@ var Ce = (e, t) => {
484
484
  })
485
485
  ]
486
486
  });
487
- }, He = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: w }) => {
488
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: A, setSystemPrompt: j, setTemperature: M, handleSubmit: N } = ze({
487
+ }, He = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: C = "Apply changes", saveDisabledTooltip: w }) => {
488
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: k, setResponseFormat: A, setSystemPrompt: j, setTemperature: M, handleSubmit: N } = ze({
489
489
  isOpen: e,
490
490
  features: s,
491
491
  initialResponseFormat: c,
@@ -494,7 +494,7 @@ var Ce = (e, t) => {
494
494
  onSave: d,
495
495
  onClose: r
496
496
  });
497
- return /* @__PURE__ */ G(K, {
497
+ return /* @__PURE__ */ W(G, {
498
498
  isOpen: e,
499
499
  title: f,
500
500
  closeLabel: i,
@@ -502,7 +502,7 @@ var Ce = (e, t) => {
502
502
  onBack: t,
503
503
  backLabel: n,
504
504
  style: a,
505
- children: [/* @__PURE__ */ W(Ve, {
505
+ children: [/* @__PURE__ */ U(Ve, {
506
506
  features: s,
507
507
  responseFormat: T,
508
508
  systemPrompt: E,
@@ -519,23 +519,23 @@ var Ce = (e, t) => {
519
519
  temperatureLabel: y,
520
520
  temperatureLabels: b,
521
521
  temperatureHint: x
522
- }), /* @__PURE__ */ W("div", {
522
+ }), /* @__PURE__ */ U("div", {
523
523
  className: o("px-6 py-4 mobile:pb-8"),
524
- children: /* @__PURE__ */ W(C, {
524
+ children: /* @__PURE__ */ U(S, {
525
525
  tooltip: w,
526
- hideTooltip: O || !w,
526
+ hideTooltip: k || !w,
527
527
  triggerClassName: "w-full",
528
- children: /* @__PURE__ */ W(k, {
529
- label: S,
528
+ children: /* @__PURE__ */ U(O, {
529
+ label: C,
530
530
  onClick: N,
531
- disabled: !O,
531
+ disabled: !k,
532
532
  className: "w-full"
533
533
  })
534
534
  })
535
535
  })]
536
536
  });
537
- }, Ue = { modal: "_modal_14b5s_1" }, We = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: m, temperatureHint: h, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Ue.modal }) => {
538
- let { responseFormat: b, systemPrompt: x, temperature: S, canSubmit: w, setResponseFormat: T, setSystemPrompt: E, setTemperature: D, handleSubmit: A } = ze({
537
+ }, Ue = { modal: "_modal_od073_1" }, We = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: m, temperatureHint: h, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Ue.modal }) => {
538
+ let { responseFormat: b, systemPrompt: x, temperature: C, canSubmit: w, setResponseFormat: T, setSystemPrompt: E, setTemperature: k, handleSubmit: A } = ze({
539
539
  features: e,
540
540
  initialResponseFormat: t,
541
541
  initialSystemPrompt: n,
@@ -543,32 +543,32 @@ var Ce = (e, t) => {
543
543
  onSave: i,
544
544
  onClose: a
545
545
  });
546
- return /* @__PURE__ */ W(g, {
546
+ return /* @__PURE__ */ U(g, {
547
547
  open: !0,
548
548
  header: o,
549
- size: O.Sm,
549
+ size: D.Sm,
550
550
  onClose: a,
551
551
  className: y,
552
- footer: /* @__PURE__ */ W("div", {
552
+ footer: /* @__PURE__ */ U("div", {
553
553
  className: "flex justify-end px-6 py-4",
554
- children: /* @__PURE__ */ W(C, {
554
+ children: /* @__PURE__ */ U(S, {
555
555
  tooltip: v,
556
556
  hideTooltip: w || !v,
557
- children: /* @__PURE__ */ W(k, {
557
+ children: /* @__PURE__ */ U(O, {
558
558
  label: _,
559
559
  onClick: A,
560
560
  disabled: !w
561
561
  })
562
562
  })
563
563
  }),
564
- children: /* @__PURE__ */ W(Ve, {
564
+ children: /* @__PURE__ */ U(Ve, {
565
565
  features: e,
566
566
  responseFormat: b,
567
567
  systemPrompt: x,
568
- temperature: S,
568
+ temperature: C,
569
569
  onResponseFormatChange: T,
570
570
  onSystemPromptChange: E,
571
- onTemperatureChange: D,
571
+ onTemperatureChange: k,
572
572
  responseFormatLabel: s,
573
573
  responseFormatHint: c,
574
574
  responseFormatMarkdownLabel: l,
@@ -581,11 +581,11 @@ var Ce = (e, t) => {
581
581
  })
582
582
  });
583
583
  };
584
- L(We);
584
+ fe(We);
585
585
  var Ge = {
586
586
  icon: "_icon_1oz9i_1",
587
587
  selectedIcon: "_selectedIcon_1oz9i_5"
588
- }, Ke = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: f, colors: p }) => /* @__PURE__ */ W(K, {
588
+ }, Ke = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: f, colors: p }) => /* @__PURE__ */ U(G, {
589
589
  isOpen: e,
590
590
  title: u,
591
591
  closeLabel: i,
@@ -593,32 +593,32 @@ var Ge = {
593
593
  onBack: t,
594
594
  backLabel: n,
595
595
  style: s,
596
- children: /* @__PURE__ */ W("ul", {
596
+ children: /* @__PURE__ */ U("ul", {
597
597
  role: "menu",
598
598
  className: "flex flex-col pb-4",
599
599
  style: a({
600
600
  "--tbs-icon-text": p?.iconText,
601
601
  "--tbs-selected-icon-text": p?.selectedIconText
602
602
  }),
603
- children: d.map((e) => /* @__PURE__ */ W("li", {
603
+ children: d.map((e) => /* @__PURE__ */ U("li", {
604
604
  role: "none",
605
- children: /* @__PURE__ */ W(l, {
605
+ children: /* @__PURE__ */ U(l, {
606
606
  type: "button",
607
607
  role: "menuitemcheckbox",
608
608
  "aria-checked": e.isSelected,
609
609
  className: "w-full gap-3 px-4 py-[10px] text-start",
610
- iconBefore: /* @__PURE__ */ W("span", {
610
+ iconBefore: /* @__PURE__ */ U("span", {
611
611
  className: o("flex items-center", Ge.icon),
612
612
  children: e.icon
613
613
  }),
614
- iconAfter: e.isSelected ? /* @__PURE__ */ W("span", {
614
+ iconAfter: e.isSelected ? /* @__PURE__ */ U("span", {
615
615
  className: o("ms-auto", Ge.selectedIcon),
616
- children: /* @__PURE__ */ W(te, {
616
+ children: /* @__PURE__ */ U(P, {
617
617
  size: c,
618
618
  "aria-hidden": !0
619
619
  })
620
620
  }) : null,
621
- label: /* @__PURE__ */ W("span", {
621
+ label: /* @__PURE__ */ U("span", {
622
622
  className: "dial-small-text",
623
623
  children: e.label
624
624
  }),
@@ -626,12 +626,12 @@ var Ge = {
626
626
  })
627
627
  }, e.id))
628
628
  })
629
- }), qe = {
629
+ }), K = {
630
630
  selectedToolIcon: "_selectedToolIcon_1lz31_1",
631
631
  toolIcon: "_toolIcon_1lz31_5",
632
632
  chevronIcon: "_chevronIcon_1lz31_9"
633
- }, Je = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: d, listClassName: p = "cp-dropdown-overlay !w-[240px]", isDisabled: m = !1, chatSettings: h, extraMenuItems: g, toolsMenuItems: _ = [], onToolToggle: v, toolsMenuTitle: y = "Tools", toolsBackLabel: b = "Back", colors: x }) => {
634
- let S = s(), [C, E] = H(!1), [D, O] = H(!1), [k, A] = H(!1), j = B(() => a({
633
+ }, qe = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: d, listClassName: p = "cp-dropdown-overlay !w-[240px]", isDisabled: m = !1, chatSettings: h, extraMenuItems: g, toolsMenuItems: _ = [], onToolToggle: v, toolsMenuTitle: y = "Tools", toolsBackLabel: b = "Back", colors: x }) => {
634
+ let S = s(), [T, E] = V(!1), [D, O] = V(!1), [k, A] = V(!1), j = z(() => a({
635
635
  "--aab-selected-tool-icon": x?.selectedToolIcon,
636
636
  "--aab-tool-icon": x?.toolIcon,
637
637
  "--aab-chevron-icon": x?.chevronIcon
@@ -639,23 +639,23 @@ var Ge = {
639
639
  x?.selectedToolIcon,
640
640
  x?.toolIcon,
641
641
  x?.chevronIcon
642
- ]), M = _.length > 0 && v != null, N = B(() => _.map((e) => ({
642
+ ]), M = _.length > 0 && v != null, N = z(() => _.map((e) => ({
643
643
  key: e.id,
644
- label: /* @__PURE__ */ G("span", {
644
+ label: /* @__PURE__ */ W("span", {
645
645
  className: "flex flex-1 items-center gap-2",
646
- children: [/* @__PURE__ */ W("span", {
646
+ children: [/* @__PURE__ */ U("span", {
647
647
  className: "flex-1",
648
648
  children: e.label
649
- }), e.isSelected && /* @__PURE__ */ W(te, {
649
+ }), e.isSelected && /* @__PURE__ */ U(P, {
650
650
  size: c,
651
651
  style: j,
652
- className: qe.selectedToolIcon,
652
+ className: K.selectedToolIcon,
653
653
  "aria-hidden": !0
654
654
  })]
655
655
  }),
656
- icon: /* @__PURE__ */ W("span", {
656
+ icon: /* @__PURE__ */ U("span", {
657
657
  style: j,
658
- className: o("flex items-center", qe.toolIcon),
658
+ className: o("flex items-center", K.toolIcon),
659
659
  children: e.icon
660
660
  }),
661
661
  onClick: () => v?.(e.id)
@@ -663,11 +663,11 @@ var Ge = {
663
663
  _,
664
664
  v,
665
665
  j
666
- ]), ee = B(() => [
666
+ ]), ee = z(() => [
667
667
  ...e == null ? [] : [{
668
668
  key: "attach",
669
669
  label: t,
670
- icon: /* @__PURE__ */ W(ie, {
670
+ icon: /* @__PURE__ */ U(re, {
671
671
  size: c,
672
672
  "aria-hidden": !0
673
673
  }),
@@ -677,33 +677,33 @@ var Ge = {
677
677
  ...M ? [{
678
678
  key: "tools",
679
679
  label: y,
680
- icon: /* @__PURE__ */ W(ce, {
680
+ icon: /* @__PURE__ */ U(ce, {
681
681
  size: c,
682
682
  "aria-hidden": !0
683
683
  }),
684
684
  onClick: S ? () => {
685
685
  A(!0), E(!1);
686
686
  } : () => void 0,
687
- ...S ? { iconAfter: /* @__PURE__ */ W(F, {
687
+ ...S ? { iconAfter: /* @__PURE__ */ U(F, {
688
688
  size: c,
689
689
  stroke: 1.5,
690
690
  style: j,
691
- className: o("rtl:scale-x-[-1]", qe.chevronIcon),
691
+ className: o("rtl:scale-x-[-1]", K.chevronIcon),
692
692
  "aria-hidden": !0
693
693
  }) } : { children: N }
694
694
  }] : [],
695
695
  ...h == null ? [] : [{
696
696
  key: "chat-settings",
697
697
  label: h.menuItemLabel ?? "Chat settings",
698
- icon: /* @__PURE__ */ W(se, {
698
+ icon: /* @__PURE__ */ U(se, {
699
699
  size: c,
700
700
  "aria-hidden": !0
701
701
  }),
702
- iconAfter: S ? /* @__PURE__ */ W(F, {
702
+ iconAfter: S ? /* @__PURE__ */ U(F, {
703
703
  size: c,
704
704
  stroke: 1.5,
705
705
  style: j,
706
- className: o("rtl:scale-x-[-1]", qe.chevronIcon),
706
+ className: o("rtl:scale-x-[-1]", K.chevronIcon),
707
707
  "aria-hidden": !0
708
708
  }) : null,
709
709
  onClick: () => O(!0)
@@ -719,20 +719,20 @@ var Ge = {
719
719
  N,
720
720
  j
721
721
  ]);
722
- return ee.length === 0 ? null : /* @__PURE__ */ W(U, { children: S ? /* @__PURE__ */ G(U, { children: [
723
- /* @__PURE__ */ W(T, {
724
- icon: /* @__PURE__ */ W(I, {
722
+ return ee.length === 0 ? null : /* @__PURE__ */ U(H, { children: S ? /* @__PURE__ */ W(H, { children: [
723
+ /* @__PURE__ */ U(w, {
724
+ icon: /* @__PURE__ */ U(oe, {
725
725
  size: u.LG,
726
726
  "aria-hidden": !0
727
727
  }),
728
728
  "aria-label": n,
729
- size: w.Large,
729
+ size: C.Large,
730
730
  tooltipProps: { tooltip: n },
731
731
  disabled: m,
732
732
  onClick: () => E(!0)
733
733
  }),
734
- /* @__PURE__ */ W(Re, {
735
- isOpen: C,
734
+ /* @__PURE__ */ U(Re, {
735
+ isOpen: T,
736
736
  title: r,
737
737
  closeLabel: l,
738
738
  onClose: () => E(!1),
@@ -741,7 +741,7 @@ var Ge = {
741
741
  className: "pb-4",
742
742
  btnTextClassName: "flex-1"
743
743
  }),
744
- M && /* @__PURE__ */ W(Ke, {
744
+ M && /* @__PURE__ */ U(Ke, {
745
745
  isOpen: k,
746
746
  onBack: () => {
747
747
  A(!1), E(!0);
@@ -754,7 +754,7 @@ var Ge = {
754
754
  items: _,
755
755
  onToolToggle: v
756
756
  }),
757
- h != null && /* @__PURE__ */ W(He, {
757
+ h != null && /* @__PURE__ */ U(He, {
758
758
  isOpen: D,
759
759
  onBack: () => {
760
760
  O(!1), E(!0);
@@ -781,13 +781,13 @@ var Ge = {
781
781
  saveLabel: h.saveLabel,
782
782
  saveDisabledTooltip: h.saveDisabledTooltip
783
783
  })
784
- ] }) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(f, {
784
+ ] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(f, {
785
785
  matchReferenceWidth: !1,
786
786
  placement: "bottom-start",
787
787
  listClassName: p,
788
788
  items: ee,
789
- children: /* @__PURE__ */ W(T, {
790
- icon: /* @__PURE__ */ W(I, {
789
+ children: /* @__PURE__ */ U(w, {
790
+ icon: /* @__PURE__ */ U(oe, {
791
791
  size: u.LG,
792
792
  "aria-hidden": !0
793
793
  }),
@@ -795,7 +795,7 @@ var Ge = {
795
795
  tooltipProps: { tooltip: n },
796
796
  disabled: m
797
797
  })
798
- }), h != null && D && /* @__PURE__ */ W(We, {
798
+ }), h != null && D && /* @__PURE__ */ U(We, {
799
799
  features: h.features,
800
800
  initialResponseFormat: h.responseFormat ?? i.Markdown,
801
801
  initialSystemPrompt: h.systemPrompt,
@@ -820,7 +820,7 @@ var Ge = {
820
820
  chipIcon: "_chipIcon_16mrh_6",
821
821
  chipText: "_chipText_16mrh_10",
822
822
  chipClose: "_chipClose_16mrh_14"
823
- }, J = (e) => `${e} tool${e === 1 ? "" : "s"}`, Ye = (e) => `Remove ${e}`, Xe = ({ items: e, onToolToggle: t, isMobile: n, countLabel: r = J, removeLabel: i = Ye, typography: s, colors: l }) => {
823
+ }, J = (e) => `${e} tool${e === 1 ? "" : "s"}`, Je = (e) => `Remove ${e}`, Ye = ({ items: e, onToolToggle: t, isMobile: n, countLabel: r = J, removeLabel: i = Je, typography: s, colors: l }) => {
824
824
  let u = e.filter((e) => e.isSelected);
825
825
  if (u.length === 0) return null;
826
826
  let d = a({
@@ -832,47 +832,47 @@ var Ge = {
832
832
  "--ci-chip-close-hover": l?.chipCloseHover
833
833
  });
834
834
  if (n) {
835
- let e = u.length === 1 ? u[0].icon : /* @__PURE__ */ W(ce, {
835
+ let e = u.length === 1 ? u[0].icon : /* @__PURE__ */ U(ce, {
836
836
  size: c,
837
837
  "aria-hidden": !0
838
838
  });
839
- return /* @__PURE__ */ W("div", {
839
+ return /* @__PURE__ */ U("div", {
840
840
  className: "flex flex-wrap items-center gap-2",
841
841
  style: d,
842
- children: /* @__PURE__ */ G("div", {
842
+ children: /* @__PURE__ */ W("div", {
843
843
  className: o(q.chip, "flex items-center gap-1.5 rounded-full border px-2 py-1"),
844
- children: [/* @__PURE__ */ W("span", {
844
+ children: [/* @__PURE__ */ U("span", {
845
845
  className: q.chipIcon,
846
846
  "aria-hidden": !0,
847
847
  children: e
848
- }), /* @__PURE__ */ W("span", {
848
+ }), /* @__PURE__ */ U("span", {
849
849
  className: o(q.chipText, s?.fontClassName || "dial-small-paragraph-text"),
850
850
  children: r(u.length)
851
851
  })]
852
852
  })
853
853
  });
854
854
  }
855
- return /* @__PURE__ */ W("div", {
855
+ return /* @__PURE__ */ U("div", {
856
856
  className: "flex flex-wrap items-center gap-2",
857
857
  style: d,
858
- children: u.map((e) => /* @__PURE__ */ G("div", {
858
+ children: u.map((e) => /* @__PURE__ */ W("div", {
859
859
  className: o(q.chip, "flex items-center gap-1.5 rounded-full border py-1 pe-1 ps-2"),
860
860
  children: [
861
- /* @__PURE__ */ W("span", {
861
+ /* @__PURE__ */ U("span", {
862
862
  className: q.chipIcon,
863
863
  "aria-hidden": !0,
864
864
  children: e.icon
865
865
  }),
866
- /* @__PURE__ */ W("span", {
866
+ /* @__PURE__ */ U("span", {
867
867
  className: o(q.chipText, s?.fontClassName || "dial-small-paragraph-text"),
868
868
  children: e.label
869
869
  }),
870
- /* @__PURE__ */ W("button", {
870
+ /* @__PURE__ */ U("button", {
871
871
  type: "button",
872
872
  onClick: () => t(e.id),
873
873
  className: o(q.chipClose, "flex items-center rounded p-0.5 transition-colors"),
874
874
  "aria-label": i(e.label),
875
- children: /* @__PURE__ */ W(le, {
875
+ children: /* @__PURE__ */ U(le, {
876
876
  size: 12,
877
877
  "aria-hidden": !0
878
878
  })
@@ -887,36 +887,35 @@ var Ge = {
887
887
  modelSelectorButton: "_modelSelectorButton_4e8i8_24",
888
888
  modelSelectorCaret: "_modelSelectorCaret_4e8i8_24",
889
889
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_4e8i8_33"
890
- }, Ze = {
891
- wrapperError: "_wrapperError_5wiyg_1",
892
- waveformCanvas: "_waveformCanvas_5wiyg_5",
893
- timer: "_timer_5wiyg_9",
894
- stopRecordingIcon: "_stopRecordingIcon_5wiyg_15",
895
- recordingDot: "_recordingDot_5wiyg_29",
896
- "recording-pulse": "_recording-pulse_5wiyg_1"
897
- }, Qe = 3, $e = 4, X = 200, et = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, tt = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: s = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: d, className: f }) => {
898
- let p = V(null), h = V(new Float32Array(X)), g = V(0), _ = V(0), v = e === Me.Recording, y = e === Me.Error, b = R((e) => {
890
+ }, Xe = {
891
+ wrapperError: "_wrapperError_fbvnl_1",
892
+ waveformCanvas: "_waveformCanvas_fbvnl_5",
893
+ timer: "_timer_fbvnl_9",
894
+ recordingDot: "_recordingDot_fbvnl_25",
895
+ "recording-pulse": "_recording-pulse_fbvnl_1"
896
+ }, Ze = 3, X = 4, Z = 200, Qe = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, $e = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: s = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: d, className: f }) => {
897
+ let p = B(null), h = B(new Float32Array(Z)), g = B(0), _ = B(0), v = e === Me.Recording, y = e === Me.Error, b = I((e) => {
899
898
  let t = e.getContext("2d");
900
899
  if (!t) return;
901
900
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
902
901
  let { width: n, height: r } = e;
903
902
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
904
- let i = Math.min(Math.max(1, Math.floor(n / $e)), X - 1), a = g.current, o = _.current;
903
+ let i = Math.min(Math.max(1, Math.floor(n / X)), Z - 1), a = g.current, o = _.current;
905
904
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
906
905
  for (let e = 0; e <= i; e++) {
907
- let n = ((a - i + e) % X + X) % X, o = h.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
908
- t.fillRect(e * $e, (r - c) / 2, Qe, c);
906
+ let n = ((a - i + e) % Z + Z) % Z, o = h.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
907
+ t.fillRect(e * X, (r - c) / 2, Ze, c);
909
908
  }
910
909
  t.restore();
911
910
  }, []);
912
- z(() => {
911
+ L(() => {
913
912
  if (!v) return;
914
913
  let e = p.current;
915
914
  if (!e) return;
916
915
  h.current.fill(0), g.current = 0, _.current = 0;
917
916
  let n, r = () => {
918
- if (_.current += 1, _.current >= $e) {
919
- _.current -= $e;
917
+ if (_.current += 1, _.current >= X) {
918
+ _.current -= X;
920
919
  let e = t.current;
921
920
  if (e) {
922
921
  let t = new Uint8Array(e.frequencyBinCount);
@@ -926,7 +925,7 @@ var Ge = {
926
925
  let r = (t[e] - 128) / 128;
927
926
  n += r * r;
928
927
  }
929
- h.current[g.current % X] = Math.sqrt(n / t.length), g.current++;
928
+ h.current[g.current % Z] = Math.sqrt(n / t.length), g.current++;
930
929
  }
931
930
  }
932
931
  b(e), n = requestAnimationFrame(r);
@@ -938,7 +937,7 @@ var Ge = {
938
937
  v,
939
938
  t,
940
939
  b
941
- ]), z(() => {
940
+ ]), L(() => {
942
941
  let e = p.current;
943
942
  if (!e) return;
944
943
  let t = new ResizeObserver(() => {
@@ -946,157 +945,109 @@ var Ge = {
946
945
  });
947
946
  return t.observe(e), () => t.disconnect();
948
947
  }, [b]);
949
- let x = /* @__PURE__ */ G("div", {
948
+ let x = /* @__PURE__ */ W("div", {
950
949
  className: "flex flex-shrink-0 items-center justify-end gap-1",
951
- children: [/* @__PURE__ */ W(T, {
952
- icon: /* @__PURE__ */ W(le, {
950
+ children: [/* @__PURE__ */ U(w, {
951
+ icon: /* @__PURE__ */ U(le, {
953
952
  size: u.LG,
954
953
  "aria-hidden": !0
955
954
  }),
956
955
  "aria-label": c,
957
956
  onClick: a
958
- }), v && /* @__PURE__ */ W(A, {
959
- icon: /* @__PURE__ */ W(ae, { size: u.LG }),
957
+ }), v && /* @__PURE__ */ U(k, {
958
+ icon: /* @__PURE__ */ U(ie, {
959
+ size: u.LG,
960
+ "aria-hidden": !0
961
+ }),
960
962
  onClick: () => i?.(),
961
963
  "aria-label": s
962
964
  })]
963
965
  });
964
- return /* @__PURE__ */ G("div", {
966
+ return /* @__PURE__ */ W("div", {
965
967
  className: f,
966
- children: [/* @__PURE__ */ G("div", {
968
+ children: [/* @__PURE__ */ W("div", {
967
969
  style: d,
968
- className: o(Y.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", y && Ze.wrapperError),
969
- children: [/* @__PURE__ */ G("div", {
970
+ className: o(Y.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", y && Xe.wrapperError),
971
+ children: [/* @__PURE__ */ W("div", {
970
972
  className: "flex min-w-0 flex-1 items-center gap-3",
971
- children: [v && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
972
- className: o(Ze.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
973
+ children: [v && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
974
+ className: o(Xe.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
973
975
  "aria-hidden": !0
974
- }), /* @__PURE__ */ W("span", {
975
- className: o(Ze.timer, "flex-shrink-0"),
976
+ }), /* @__PURE__ */ U("span", {
977
+ className: o(Xe.timer, "flex-shrink-0"),
976
978
  "aria-label": l,
977
- children: et(n)
978
- })] }), /* @__PURE__ */ W("canvas", {
979
+ children: Qe(n)
980
+ })] }), /* @__PURE__ */ U("canvas", {
979
981
  ref: p,
980
982
  height: 32,
981
- className: o(Ze.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
983
+ className: o(Xe.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
982
984
  })]
983
985
  }), x]
984
- }), y && r && /* @__PURE__ */ W(m, {
986
+ }), y && r && /* @__PURE__ */ U(m, {
985
987
  text: r,
986
988
  className: "mt-1 px-1"
987
989
  })]
988
990
  });
989
- }, nt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ W(A, {
991
+ }, et = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ U(k, {
990
992
  "aria-label": n,
991
993
  onClick: () => e?.(),
992
994
  disabled: t,
993
995
  "aria-hidden": r,
994
- icon: /* @__PURE__ */ W(ee, {
996
+ icon: /* @__PURE__ */ U(N, {
995
997
  size: u.LG,
996
998
  className: "rtl:scale-x-[-1]"
997
999
  })
998
- }), rt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(M, {
999
- icon: /* @__PURE__ */ W(oe, { size: u.LG }),
1000
+ }), tt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ U(j, {
1001
+ icon: /* @__PURE__ */ U(ae, { size: u.LG }),
1000
1002
  onClick: () => e?.(),
1001
1003
  "aria-label": t
1002
- }), it = ({ gradientId: e = "gradient-check-icon" }) => /* @__PURE__ */ G("svg", {
1003
- width: u.SM,
1004
- height: u.SM,
1005
- viewBox: "0 0 24 24",
1006
- fill: "none",
1007
- "aria-hidden": !0,
1008
- children: [/* @__PURE__ */ W("defs", { children: /* @__PURE__ */ G("linearGradient", {
1009
- id: e,
1010
- x1: "0",
1011
- y1: "0",
1012
- x2: "24",
1013
- y2: "24",
1014
- gradientUnits: "userSpaceOnUse",
1015
- children: [/* @__PURE__ */ W("stop", {
1016
- offset: "0%",
1017
- stopColor: "#4b7be6"
1018
- }), /* @__PURE__ */ W("stop", {
1019
- offset: "100%",
1020
- stopColor: "#9355f4"
1021
- })]
1022
- }) }), /* @__PURE__ */ W("path", {
1023
- d: "M5 12l5 5L20 7",
1024
- stroke: `url(#${e})`,
1025
- strokeWidth: "2",
1026
- strokeLinecap: "round",
1027
- strokeLinejoin: "round"
1028
- })]
1029
- }), at = {
1030
- tabContainer: "_tabContainer_153ct_1",
1031
- tabActive: "_tabActive_153ct_13"
1032
- };
1033
- L(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
1034
- let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
1035
- return /* @__PURE__ */ W("div", {
1036
- className: "flex flex-nowrap gap-1",
1037
- role: "tablist",
1038
- children: e.map((e) => {
1039
- let r = t === e.id;
1040
- return /* @__PURE__ */ W("div", {
1041
- role: "tab",
1042
- "aria-selected": r,
1043
- className: "contents",
1044
- children: /* @__PURE__ */ W(S, {
1045
- label: e.label,
1046
- selected: r,
1047
- onClick: () => n(e.id),
1048
- className: o("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, at.tabContainer, r && at.tabActive)
1049
- })
1050
- }, e.id);
1051
- })
1052
- });
1053
- });
1054
- var ot = ({ size: e = 20 }) => /* @__PURE__ */ W(y, {
1004
+ }), nt = ({ size: e = 20 }) => /* @__PURE__ */ U(y, {
1055
1005
  variant: b.Circular,
1056
1006
  width: e,
1057
1007
  height: e,
1058
1008
  active: !0
1059
- }), st = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1009
+ }), rt = ({ loadingLabel: e }) => /* @__PURE__ */ W("span", {
1060
1010
  className: "flex min-w-0 flex-1 items-center",
1061
- children: [/* @__PURE__ */ W(y, {
1011
+ children: [/* @__PURE__ */ U(y, {
1062
1012
  variant: b.Text,
1063
1013
  width: "100%",
1064
1014
  height: 16,
1065
1015
  active: !0
1066
- }), e && /* @__PURE__ */ W("span", {
1016
+ }), e && /* @__PURE__ */ U("span", {
1067
1017
  className: "sr-only",
1068
1018
  children: e
1069
1019
  })]
1070
- }), ct = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1020
+ }), it = ({ loadingLabel: e }) => /* @__PURE__ */ U("div", {
1071
1021
  role: "status",
1072
1022
  "aria-label": e,
1073
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ G("div", {
1023
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ W("div", {
1074
1024
  className: "flex h-11 items-center gap-3 px-4",
1075
1025
  "aria-hidden": "true",
1076
- children: [/* @__PURE__ */ W(ot, {}), /* @__PURE__ */ W(st, {})]
1026
+ children: [/* @__PURE__ */ U(nt, {}), /* @__PURE__ */ U(rt, {})]
1077
1027
  }, t))
1078
- }), lt = (e) => e.displayName ?? e.id, ut = (e, t) => {
1028
+ }), at = (e) => e.displayName ?? e.id, ot = (e, t) => {
1079
1029
  let n = t.trim().toLowerCase();
1080
- return n ? e.filter((e) => lt(e).toLowerCase().includes(n)) : e;
1081
- }, dt = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1030
+ return n ? e.filter((e) => at(e).toLowerCase().includes(n)) : e;
1031
+ }, st = (e, t, r, i = 18, a) => /* @__PURE__ */ U(n, {
1082
1032
  src: e,
1083
1033
  size: i,
1084
1034
  labels: { tooltip: a },
1085
1035
  initialsName: r
1086
- }), ft = {
1087
- searchHeader: "_searchHeader_3587a_1",
1088
- selectedItem: "_selectedItem_3587a_5"
1089
- }, pt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = ft.searchHeader, selectedItemClassName: a = ft.selectedItem }) => {
1090
- let [s, c] = H(""), l = B(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = B(() => d ? /* @__PURE__ */ W(ot, { size: u.LG }) : dt(l?.iconUrl, l?.type, l?.displayName ?? l?.id ?? "", u.LG), [d, l]), p = l?.displayName ?? l?.id;
1036
+ }), ct = {
1037
+ searchHeader: "_searchHeader_ibyso_1",
1038
+ selectedItem: "_selectedItem_ibyso_5",
1039
+ selectedItemCheck: "_selectedItemCheck_ibyso_9"
1040
+ }, lt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = ct.searchHeader, selectedItemClassName: s = ct.selectedItem, selectedItemCheckClassName: c = ct.selectedItemCheck, colors: l }) => {
1041
+ let [d, f] = V(""), p = z(() => e?.find((e) => e.id === t), [e, t]), m = r?.loading !== void 0, h = z(() => m ? /* @__PURE__ */ U(nt, { size: u.LG }) : st(p?.iconUrl, p?.type, p?.displayName ?? p?.id ?? "", u.LG), [m, p]), g = p?.displayName ?? p?.id;
1091
1042
  return {
1092
- selectorIcon: f,
1093
- selectorAriaLabel: p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model",
1094
- selectedLabel: p,
1095
- menuItems: B(() => {
1096
- if (d) return Array.from({ length: 7 }, (e, t) => ({
1043
+ selectorIcon: h,
1044
+ selectorAriaLabel: g ? `${r?.ariaLabel ?? "Select model"}: ${g}` : r?.ariaLabel ?? "Select model",
1045
+ selectedLabel: g,
1046
+ menuItems: z(() => {
1047
+ if (m) return Array.from({ length: 7 }, (e, t) => ({
1097
1048
  key: `__loading-${t}`,
1098
- icon: /* @__PURE__ */ W(ot, {}),
1099
- label: /* @__PURE__ */ W(st, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1049
+ icon: /* @__PURE__ */ U(nt, {}),
1050
+ label: /* @__PURE__ */ U(rt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1100
1051
  disabled: !0
1101
1052
  }));
1102
1053
  if (!e || e.length === 0) {
@@ -1107,54 +1058,64 @@ var ot = ({ size: e = 20 }) => /* @__PURE__ */ W(y, {
1107
1058
  disabled: !0
1108
1059
  }] : [];
1109
1060
  }
1110
- return ut(e, s).map((e) => {
1061
+ return ot(e, d).map((e) => {
1111
1062
  let r = e.id === t;
1112
1063
  return {
1113
1064
  key: e.id,
1114
- label: /* @__PURE__ */ G("span", {
1065
+ label: /* @__PURE__ */ W("span", {
1115
1066
  className: "flex w-full items-center justify-between gap-2",
1116
- children: [/* @__PURE__ */ W(E, {
1117
- text: lt(e),
1118
- query: s,
1067
+ style: a({ "--ms-selected-item-check": l?.selectedItemCheck }),
1068
+ children: [/* @__PURE__ */ U(T, {
1069
+ text: at(e),
1070
+ query: d,
1119
1071
  maxLines: 1
1120
- }), r && /* @__PURE__ */ W(it, { gradientId: "ms-check-grad" })]
1072
+ }), r && /* @__PURE__ */ U(P, {
1073
+ size: u.SM,
1074
+ stroke: 2,
1075
+ className: c,
1076
+ "aria-hidden": !0
1077
+ })]
1121
1078
  }),
1122
- icon: dt(e.iconUrl, e.type, e.displayName ?? e.id),
1079
+ icon: st(e.iconUrl, e.type, e.displayName ?? e.id),
1123
1080
  onClick: () => n?.(e.id),
1124
- className: r ? a : void 0
1081
+ className: r ? s : void 0
1125
1082
  };
1126
1083
  });
1127
1084
  }, [
1128
1085
  e,
1086
+ m,
1129
1087
  d,
1130
- s,
1131
1088
  t,
1132
1089
  r,
1133
1090
  n,
1134
- a
1091
+ s,
1092
+ c,
1093
+ l?.selectedItemCheck
1135
1094
  ]),
1136
- menuHeader: B(() => !d && e && e.length > 0 ? /* @__PURE__ */ W("div", {
1095
+ menuHeader: z(() => !m && e && e.length > 0 ? /* @__PURE__ */ U("div", {
1096
+ style: a({ "--ms-search-header-bg": l?.searchHeaderBackground }),
1137
1097
  className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
1138
- children: /* @__PURE__ */ W(v, {
1139
- value: s,
1098
+ children: /* @__PURE__ */ U(v, {
1099
+ value: d,
1140
1100
  placeholder: r?.searchPlaceholder ?? "Search",
1141
- size: w.Small,
1101
+ size: C.Small,
1142
1102
  wrapperClassName: "border-0",
1143
- onChange: c
1103
+ onChange: f
1144
1104
  })
1145
1105
  }) : void 0, [
1146
1106
  e,
1107
+ m,
1147
1108
  d,
1148
- s,
1149
1109
  r,
1150
- i
1110
+ i,
1111
+ l?.searchHeaderBackground
1151
1112
  ]),
1152
1113
  onOpenChange: (e) => {
1153
- e || c("");
1114
+ e || f("");
1154
1115
  }
1155
1116
  };
1156
- }, mt = typeof window < "u" ? pe : z;
1157
- function ht(e) {
1117
+ }, ut = typeof window < "u" ? R : L;
1118
+ function dt(e) {
1158
1119
  if (e !== void 0) switch (typeof e) {
1159
1120
  case "number": return e;
1160
1121
  case "string":
@@ -1162,15 +1123,15 @@ function ht(e) {
1162
1123
  break;
1163
1124
  }
1164
1125
  }
1165
- function gt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1166
- let { styleHeight: s, styleWidth: c } = B(() => ({
1167
- styleHeight: ht(o?.height),
1168
- styleWidth: ht(o?.width)
1169
- }), [o?.height, o?.width]), [l, u] = H({
1126
+ function ft({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1127
+ let { styleHeight: s, styleWidth: c } = z(() => ({
1128
+ styleHeight: dt(o?.height),
1129
+ styleWidth: dt(o?.width)
1130
+ }), [o?.height, o?.width]), [l, u] = V({
1170
1131
  height: t,
1171
1132
  width: n
1172
1133
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1173
- return mt(() => {
1134
+ return ut(() => {
1174
1135
  if (i === null || d) return;
1175
1136
  let t = new ResizeObserver((e) => {
1176
1137
  for (let t of e) {
@@ -1190,7 +1151,7 @@ function gt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1190
1151
  i,
1191
1152
  s,
1192
1153
  c
1193
- ]), B(() => ({
1154
+ ]), z(() => ({
1194
1155
  height: s ?? l.height,
1195
1156
  width: c ?? l.width
1196
1157
  }), [
@@ -1199,26 +1160,26 @@ function gt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1199
1160
  c
1200
1161
  ]);
1201
1162
  }
1202
- function _t(e) {
1203
- let t = V(() => {
1163
+ function pt(e) {
1164
+ let t = B(() => {
1204
1165
  throw Error("Cannot call during render.");
1205
1166
  });
1206
- return mt(() => {
1167
+ return ut(() => {
1207
1168
  t.current = e;
1208
- }, [e]), R((e) => t.current?.(e), [t]);
1169
+ }, [e]), I((e) => t.current?.(e), [t]);
1209
1170
  }
1210
- var vt = null;
1211
- function yt(e = !1) {
1212
- if (vt === null || e) {
1171
+ var mt = null;
1172
+ function ht(e = !1) {
1173
+ if (mt === null || e) {
1213
1174
  let e = document.createElement("div"), t = e.style;
1214
1175
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1215
1176
  let n = document.createElement("div"), r = n.style;
1216
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? vt = "positive-descending" : (e.scrollLeft = 1, vt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), vt;
1177
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? mt = "positive-descending" : (e.scrollLeft = 1, mt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), mt;
1217
1178
  }
1218
- return vt;
1179
+ return mt;
1219
1180
  }
1220
- function bt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1221
- if (t === "horizontal" && n) switch (yt()) {
1181
+ function gt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1182
+ if (t === "horizontal" && n) switch (ht()) {
1222
1183
  case "negative": return -r;
1223
1184
  case "positive-descending":
1224
1185
  if (e) {
@@ -1229,26 +1190,26 @@ function bt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1229
1190
  }
1230
1191
  return r;
1231
1192
  }
1232
- function Z(e, t = "Assertion error") {
1193
+ function Q(e, t = "Assertion error") {
1233
1194
  if (!e) throw console.error(t), Error(t);
1234
1195
  }
1235
- function Q(e, t) {
1196
+ function _t(e, t) {
1236
1197
  if (e === t) return !0;
1237
- if (!!e != !!t || (Z(e !== void 0), Z(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1198
+ if (!!e != !!t || (Q(e !== void 0), Q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1238
1199
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1239
1200
  return !0;
1240
1201
  }
1241
- function xt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1202
+ function vt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1242
1203
  if (t === 0) return 0;
1243
1204
  if (typeof n == "number") return t * n;
1244
1205
  {
1245
1206
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1246
- return Z(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1207
+ return Q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1247
1208
  }
1248
1209
  }
1249
- function St({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1210
+ function yt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1250
1211
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1251
- let s = xt({
1212
+ let s = vt({
1252
1213
  cachedBounds: t,
1253
1214
  itemCount: r,
1254
1215
  itemSize: i
@@ -1260,7 +1221,7 @@ function St({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
1260
1221
  default: return a >= u && a <= l ? a : a < u ? u : l;
1261
1222
  }
1262
1223
  }
1263
- function $({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1224
+ function bt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1264
1225
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
1265
1226
  for (; u < a;) {
1266
1227
  let n = e.get(u);
@@ -1279,11 +1240,11 @@ function $({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCo
1279
1240
  stopIndexOverscan: l
1280
1241
  };
1281
1242
  }
1282
- function Ct({ itemCount: e, itemProps: t, itemSize: n }) {
1243
+ function xt({ itemCount: e, itemProps: t, itemSize: n }) {
1283
1244
  let r = /* @__PURE__ */ new Map();
1284
1245
  return {
1285
1246
  get(i) {
1286
- for (Z(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1247
+ for (Q(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1287
1248
  let e = r.size, a;
1288
1249
  switch (typeof n) {
1289
1250
  case "function":
@@ -1299,14 +1260,14 @@ function Ct({ itemCount: e, itemProps: t, itemSize: n }) {
1299
1260
  });
1300
1261
  else {
1301
1262
  let t = r.get(e - 1);
1302
- Z(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1263
+ Q(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1303
1264
  scrollOffset: t.scrollOffset + t.size,
1304
1265
  size: a
1305
1266
  });
1306
1267
  }
1307
1268
  }
1308
1269
  let a = r.get(i);
1309
- return Z(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1270
+ return Q(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1310
1271
  },
1311
1272
  set(e, t) {
1312
1273
  r.set(e, t);
@@ -1316,8 +1277,8 @@ function Ct({ itemCount: e, itemProps: t, itemSize: n }) {
1316
1277
  }
1317
1278
  };
1318
1279
  }
1319
- function wt({ itemCount: e, itemProps: t, itemSize: n }) {
1320
- return B(() => Ct({
1280
+ function St({ itemCount: e, itemProps: t, itemSize: n }) {
1281
+ return z(() => xt({
1321
1282
  itemCount: e,
1322
1283
  itemProps: t,
1323
1284
  itemSize: n
@@ -1327,11 +1288,11 @@ function wt({ itemCount: e, itemProps: t, itemSize: n }) {
1327
1288
  n
1328
1289
  ]);
1329
1290
  }
1330
- function Tt({ containerSize: e, itemSize: t }) {
1291
+ function $({ containerSize: e, itemSize: t }) {
1331
1292
  let n;
1332
1293
  switch (typeof t) {
1333
1294
  case "string":
1334
- Z(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Z(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1295
+ Q(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Q(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1335
1296
  break;
1336
1297
  default:
1337
1298
  n = t;
@@ -1339,21 +1300,21 @@ function Tt({ containerSize: e, itemSize: t }) {
1339
1300
  }
1340
1301
  return n;
1341
1302
  }
1342
- function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1343
- let { height: u = n, width: d = n } = gt({
1303
+ function Ct({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1304
+ let { height: u = n, width: d = n } = ft({
1344
1305
  defaultHeight: r === "vertical" ? n : void 0,
1345
1306
  defaultWidth: r === "horizontal" ? n : void 0,
1346
1307
  element: e,
1347
1308
  mode: r === "vertical" ? "only-height" : "only-width",
1348
1309
  style: t
1349
- }), f = V({
1310
+ }), f = B({
1350
1311
  height: 0,
1351
1312
  width: 0
1352
- }), p = r === "vertical" ? u : d, m = Tt({
1313
+ }), p = r === "vertical" ? u : d, m = $({
1353
1314
  containerSize: p,
1354
1315
  itemSize: s
1355
1316
  });
1356
- pe(() => {
1317
+ R(() => {
1357
1318
  if (typeof c == "function") {
1358
1319
  let e = f.current;
1359
1320
  (e.height !== u || e.width !== d) && (c({
@@ -1366,11 +1327,11 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1366
1327
  c,
1367
1328
  d
1368
1329
  ]);
1369
- let h = wt({
1330
+ let h = St({
1370
1331
  itemCount: a,
1371
1332
  itemProps: o,
1372
1333
  itemSize: m
1373
- }), g = R((e) => h.get(e), [h]), [_, v] = H(() => $({
1334
+ }), g = I((e) => h.get(e), [h]), [_, v] = V(() => bt({
1374
1335
  cachedBounds: h,
1375
1336
  containerScrollOffset: 0,
1376
1337
  containerSize: p,
@@ -1381,7 +1342,7 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1381
1342
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1382
1343
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1383
1344
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1384
- }, C = R(() => xt({
1345
+ }, C = I(() => vt({
1385
1346
  cachedBounds: h,
1386
1347
  itemCount: a,
1387
1348
  itemSize: m
@@ -1389,9 +1350,9 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1389
1350
  h,
1390
1351
  a,
1391
1352
  m
1392
- ]), w = R((t) => $({
1353
+ ]), w = I((t) => bt({
1393
1354
  cachedBounds: h,
1394
- containerScrollOffset: bt({
1355
+ containerScrollOffset: gt({
1395
1356
  containerElement: e,
1396
1357
  direction: r,
1397
1358
  isRtl: i,
@@ -1409,19 +1370,19 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1409
1370
  a,
1410
1371
  l
1411
1372
  ]);
1412
- return mt(() => {
1373
+ return ut(() => {
1413
1374
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1414
1375
  }, [
1415
1376
  e,
1416
1377
  r,
1417
1378
  w
1418
- ]), mt(() => {
1379
+ ]), ut(() => {
1419
1380
  if (!e) return;
1420
1381
  let t = () => {
1421
1382
  v((t) => {
1422
- let { scrollLeft: n, scrollTop: o } = e, s = $({
1383
+ let { scrollLeft: n, scrollTop: o } = e, s = bt({
1423
1384
  cachedBounds: h,
1424
- containerScrollOffset: bt({
1385
+ containerScrollOffset: gt({
1425
1386
  containerElement: e,
1426
1387
  direction: r,
1427
1388
  isRtl: i,
@@ -1431,7 +1392,7 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1431
1392
  itemCount: a,
1432
1393
  overscanCount: l
1433
1394
  });
1434
- return Q(s, t) ? t : s;
1395
+ return _t(s, t) ? t : s;
1435
1396
  });
1436
1397
  };
1437
1398
  return e.addEventListener("scroll", t), () => {
@@ -1447,8 +1408,8 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1447
1408
  ]), {
1448
1409
  getCellBounds: g,
1449
1410
  getEstimatedSize: C,
1450
- scrollToIndex: _t(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1451
- let s = St({
1411
+ scrollToIndex: pt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1412
+ let s = yt({
1452
1413
  align: t,
1453
1414
  cachedBounds: h,
1454
1415
  containerScrollOffset: n,
@@ -1458,14 +1419,14 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1458
1419
  itemSize: m
1459
1420
  });
1460
1421
  if (e) {
1461
- if (s = bt({
1422
+ if (s = gt({
1462
1423
  containerElement: e,
1463
1424
  direction: r,
1464
1425
  isRtl: i,
1465
1426
  scrollOffset: s
1466
1427
  }), typeof e.scrollTo != "function") {
1467
1428
  let e = w(s);
1468
- Q(_, e) || v(e);
1429
+ _t(_, e) || v(e);
1469
1430
  }
1470
1431
  return s;
1471
1432
  }
@@ -1476,30 +1437,30 @@ function Et({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1476
1437
  stopIndexVisible: x
1477
1438
  };
1478
1439
  }
1479
- function Dt(e) {
1480
- return B(() => e, Object.values(e));
1440
+ function wt(e) {
1441
+ return z(() => e, Object.values(e));
1481
1442
  }
1482
- function Ot(e, t) {
1443
+ function Tt(e, t) {
1483
1444
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1484
- return Q(n, a) && Q(r, o) && Q(i, s);
1445
+ return _t(n, a) && _t(r, o) && _t(i, s);
1485
1446
  }
1486
- function kt(e) {
1447
+ function Et(e) {
1487
1448
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1488
1449
  }
1489
- var At = "data-react-window-index";
1490
- function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1491
- let m = Dt(u), h = B(() => L(s, Ot), [s]), [g, _] = H(null), v = kt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Et({
1450
+ var Dt = "data-react-window-index";
1451
+ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1452
+ let m = wt(u), h = z(() => fe(s, Tt), [s]), [g, _] = V(null), v = Et(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Ct({
1492
1453
  containerElement: g,
1493
1454
  containerStyle: f,
1494
1455
  defaultContainerSize: n,
1495
1456
  direction: "vertical",
1496
1457
  itemCount: c,
1497
1458
  itemProps: m,
1498
- itemSize: B(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1459
+ itemSize: z(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1499
1460
  onResize: i,
1500
1461
  overscanCount: o
1501
1462
  });
1502
- fe(r, () => ({
1463
+ pe(r, () => ({
1503
1464
  get element() {
1504
1465
  return g;
1505
1466
  },
@@ -1514,12 +1475,12 @@ function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1514
1475
  top: r
1515
1476
  });
1516
1477
  }
1517
- }), [g, x]), mt(() => {
1478
+ }), [g, x]), ut(() => {
1518
1479
  if (!g) return;
1519
1480
  let e = Array.from(g.children).filter((e, t) => {
1520
1481
  if (e.hasAttribute("aria-hidden")) return !1;
1521
1482
  let n = `${S + t}`;
1522
- return e.setAttribute(At, n), !0;
1483
+ return e.setAttribute(Dt, n), !0;
1523
1484
  });
1524
1485
  if (v) return l.observeRowElements(e);
1525
1486
  }, [
@@ -1528,7 +1489,7 @@ function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1528
1489
  l,
1529
1490
  S,
1530
1491
  w
1531
- ]), z(() => {
1492
+ ]), L(() => {
1532
1493
  S >= 0 && w >= 0 && a && a({
1533
1494
  startIndex: C,
1534
1495
  stopIndex: T
@@ -1543,7 +1504,7 @@ function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1543
1504
  w,
1544
1505
  T
1545
1506
  ]);
1546
- let E = B(() => {
1507
+ let E = z(() => {
1547
1508
  let e = [];
1548
1509
  if (c > 0) for (let t = S; t <= w; t++) {
1549
1510
  let n = y(t);
@@ -1574,7 +1535,7 @@ function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1574
1535
  m,
1575
1536
  S,
1576
1537
  w
1577
- ]), D = /* @__PURE__ */ W("div", {
1538
+ ]), D = /* @__PURE__ */ U("div", {
1578
1539
  "aria-hidden": !0,
1579
1540
  style: {
1580
1541
  height: b(),
@@ -1596,46 +1557,46 @@ function jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1596
1557
  }
1597
1558
  }, E, e, D);
1598
1559
  }
1599
- var Mt = {
1560
+ var kt = {
1600
1561
  divider: "_divider_f1dq4_1",
1601
1562
  item: "_item_f1dq4_5",
1602
1563
  itemIcon: "_itemIcon_f1dq4_15",
1603
1564
  checkIcon: "_checkIcon_f1dq4_19",
1604
1565
  stateLabel: "_stateLabel_f1dq4_23"
1605
- }, Nt = 44, Pt = 8, Ft = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1606
- let d = r[e], f = dt(d.iconUrl, d.type, d.displayName ?? d.id, u.SM), p = d.id === i;
1607
- return /* @__PURE__ */ W("div", {
1566
+ }, At = 44, jt = 8, Mt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1567
+ let d = r[e], f = st(d.iconUrl, d.type, d.displayName ?? d.id, u.SM), p = d.id === i;
1568
+ return /* @__PURE__ */ U("div", {
1608
1569
  style: t,
1609
1570
  ...n,
1610
- children: /* @__PURE__ */ W(l, {
1571
+ children: /* @__PURE__ */ U(l, {
1611
1572
  type: "button",
1612
- className: o(Mt.item, "h-full w-full gap-3 px-4"),
1613
- iconBefore: /* @__PURE__ */ W("span", {
1614
- className: Mt.itemIcon,
1573
+ className: o(kt.item, "h-full w-full gap-3 px-4"),
1574
+ iconBefore: /* @__PURE__ */ U("span", {
1575
+ className: kt.itemIcon,
1615
1576
  children: f
1616
1577
  }),
1617
- label: /* @__PURE__ */ G("span", {
1578
+ label: /* @__PURE__ */ W("span", {
1618
1579
  className: "flex flex-1 items-center justify-between gap-2",
1619
- children: [/* @__PURE__ */ W(E, {
1580
+ children: [/* @__PURE__ */ U(T, {
1620
1581
  text: d.displayName ?? d.id,
1621
1582
  query: s,
1622
1583
  maxLines: 1,
1623
1584
  className: o(a, "min-w-0 flex-1 text-start")
1624
- }), p && /* @__PURE__ */ W(te, {
1585
+ }), p && /* @__PURE__ */ U(P, {
1625
1586
  size: u.SM,
1626
- className: Mt.checkIcon,
1587
+ className: kt.checkIcon,
1627
1588
  "aria-hidden": !0
1628
1589
  })]
1629
1590
  }),
1630
1591
  onClick: () => c(d.id)
1631
1592
  })
1632
1593
  });
1633
- }, It = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g }) => {
1634
- let [_, y] = H("");
1635
- z(() => {
1594
+ }, Nt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g }) => {
1595
+ let [_, y] = V("");
1596
+ L(() => {
1636
1597
  e || y("");
1637
1598
  }, [e]);
1638
- let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? ut(s, _) : [], T = (e) => {
1599
+ let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, w = b ? ot(s, _) : [], T = (e) => {
1639
1600
  l(e), i();
1640
1601
  }, E = a({
1641
1602
  "--ci-sheet-divider": g?.divider,
@@ -1645,7 +1606,7 @@ var Mt = {
1645
1606
  "--ci-sheet-icon": g?.itemIcon,
1646
1607
  "--ci-check-icon": g?.checkIcon
1647
1608
  });
1648
- return /* @__PURE__ */ W(K, {
1609
+ return /* @__PURE__ */ U(G, {
1649
1610
  isOpen: e,
1650
1611
  title: t,
1651
1612
  closeLabel: n,
@@ -1654,30 +1615,30 @@ var Mt = {
1654
1615
  titleClassName: m,
1655
1616
  className: "max-h-[80dvh]",
1656
1617
  colors: g?.shell,
1657
- children: /* @__PURE__ */ G("div", {
1618
+ children: /* @__PURE__ */ W("div", {
1658
1619
  className: "contents",
1659
1620
  style: E,
1660
- children: [b && !x && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
1621
+ children: [b && !x && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
1661
1622
  className: "flex-shrink-0 px-4 py-[10px]",
1662
- children: /* @__PURE__ */ W(v, {
1623
+ children: /* @__PURE__ */ U(v, {
1663
1624
  value: _,
1664
1625
  placeholder: r,
1665
- size: w.Standard,
1626
+ size: C.Standard,
1666
1627
  onChange: y
1667
1628
  })
1668
- }), /* @__PURE__ */ W("div", { className: o(Mt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(ct, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1629
+ }), /* @__PURE__ */ U("div", { className: o(kt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ U(it, { loadingLabel: u }) : S ? /* @__PURE__ */ U("div", {
1669
1630
  role: "list",
1670
- className: o(Mt.stateLabel, h, "px-4 py-4"),
1631
+ className: o(kt.stateLabel, h, "px-4 py-4"),
1671
1632
  children: S
1672
- }) : /* @__PURE__ */ W(jt, {
1633
+ }) : /* @__PURE__ */ U(Ot, {
1673
1634
  role: "list",
1674
1635
  className: "overflow-y-auto",
1675
- style: { height: Math.min(C.length, Pt) * Nt },
1676
- rowComponent: Ft,
1677
- rowCount: C.length,
1678
- rowHeight: Nt,
1636
+ style: { height: Math.min(w.length, jt) * At },
1637
+ rowComponent: Mt,
1638
+ rowCount: w.length,
1639
+ rowHeight: At,
1679
1640
  rowProps: {
1680
- items: C,
1641
+ items: w,
1681
1642
  selectedDeploymentId: c,
1682
1643
  labelClassName: h,
1683
1644
  query: _,
@@ -1686,23 +1647,23 @@ var Mt = {
1686
1647
  })]
1687
1648
  })
1688
1649
  });
1689
- }, Lt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: s = !1, isDisabled: c = !1, style: l, modelPickerOverlay: d, isPickerOpen: m, onPickerToggle: h, onPickerOpenChange: g }) => {
1690
- let [_, v] = H(!1), { selectorIcon: y, selectorAriaLabel: b, selectedLabel: x, menuItems: S, menuHeader: E, onOpenChange: D } = pt({
1650
+ }, Pt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: s = !1, isDisabled: c = !1, style: l, modelPickerOverlay: d, isPickerOpen: m, onPickerToggle: h, onPickerOpenChange: g }) => {
1651
+ let [_, v] = V(!1), { selectorIcon: y, selectorAriaLabel: b, selectedLabel: x, menuItems: T, menuHeader: E, onOpenChange: D } = lt({
1691
1652
  deployments: e,
1692
1653
  selectedDeploymentId: t,
1693
1654
  onDeploymentChange: n,
1694
1655
  modelSelectorLabels: r
1695
1656
  });
1696
1657
  if (!e) return null;
1697
- let O = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, k = /* @__PURE__ */ W(P, {
1658
+ let O = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, k = /* @__PURE__ */ U(ee, {
1698
1659
  size: u.SM,
1699
1660
  className: Y.modelSelectorCaret,
1700
1661
  "aria-hidden": !0
1701
1662
  });
1702
- return a ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(C, {
1663
+ return a ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(S, {
1703
1664
  tooltip: x,
1704
- children: /* @__PURE__ */ W(T, {
1705
- icon: /* @__PURE__ */ G("div", {
1665
+ children: /* @__PURE__ */ U(w, {
1666
+ icon: /* @__PURE__ */ W("div", {
1706
1667
  className: "flex items-center gap-1",
1707
1668
  children: [y, k]
1708
1669
  }),
@@ -1712,14 +1673,14 @@ var Mt = {
1712
1673
  },
1713
1674
  className: o(Y.modelSelectorButton, O)
1714
1675
  })
1715
- }), d ? /* @__PURE__ */ W(K, {
1676
+ }), d ? /* @__PURE__ */ U(G, {
1716
1677
  isOpen: _,
1717
1678
  title: r?.ariaLabel ?? "Select model",
1718
1679
  closeLabel: r?.closeLabel ?? "Close",
1719
1680
  onClose: () => v(!1),
1720
1681
  style: l,
1721
1682
  children: d(() => v(!1))
1722
- }) : /* @__PURE__ */ W(It, {
1683
+ }) : /* @__PURE__ */ U(Nt, {
1723
1684
  isOpen: _,
1724
1685
  title: r?.ariaLabel ?? "Select model",
1725
1686
  closeLabel: r?.closeLabel ?? "Close",
@@ -1732,7 +1693,7 @@ var Mt = {
1732
1693
  errorLabel: r?.error,
1733
1694
  emptyLabel: r?.empty,
1734
1695
  style: l
1735
- })] }) : d ? /* @__PURE__ */ W(f, {
1696
+ })] }) : d ? /* @__PURE__ */ U(f, {
1736
1697
  placement: "top-end",
1737
1698
  matchReferenceWidth: !1,
1738
1699
  open: m,
@@ -1741,9 +1702,9 @@ var Mt = {
1741
1702
  outsideClosable: !0,
1742
1703
  renderOverlay: () => d(() => g?.(!1)),
1743
1704
  listClassName: "cp-dropdown-overlay !w-[320px]",
1744
- children: /* @__PURE__ */ W(C, {
1705
+ children: /* @__PURE__ */ U(S, {
1745
1706
  tooltip: x,
1746
- children: /* @__PURE__ */ G("button", {
1707
+ children: /* @__PURE__ */ W("button", {
1747
1708
  type: "button",
1748
1709
  "aria-label": b,
1749
1710
  className: o("flex items-center justify-center gap-1 rounded-full p-2", Y.modelSelectorButton, s || i || c ? O : void 0, (s || c) && Y.modelSelectorButtonDisabled),
@@ -1753,29 +1714,29 @@ var Mt = {
1753
1714
  children: [y, k]
1754
1715
  })
1755
1716
  })
1756
- }) : /* @__PURE__ */ W("div", {
1717
+ }) : /* @__PURE__ */ U("div", {
1757
1718
  className: o(c && O),
1758
1719
  "aria-disabled": c || void 0,
1759
- children: /* @__PURE__ */ W(C, {
1720
+ children: /* @__PURE__ */ U(S, {
1760
1721
  tooltip: x,
1761
- children: /* @__PURE__ */ W(p, {
1722
+ children: /* @__PURE__ */ U(p, {
1762
1723
  icon: y,
1763
1724
  ariaLabel: b,
1764
- items: S,
1725
+ items: T,
1765
1726
  menuHeader: E,
1766
1727
  placement: "bottom-end",
1767
1728
  matchReferenceWidth: !1,
1768
1729
  listClassName: "cp-dropdown-overlay !w-[240px] !max-h-80",
1769
1730
  onOpenChange: c ? void 0 : D,
1770
- size: w.Standard,
1731
+ size: C.Standard,
1771
1732
  caretIcon: k,
1772
1733
  iconClassName: s || c ? O : void 0,
1773
1734
  buttonClassName: o("bg-transparent", Y.modelSelectorButton, (s || c) && O && Y.modelSelectorButtonDisabled)
1774
1735
  })
1775
1736
  })
1776
1737
  });
1777
- }, Rt = 160, zt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: d, onAttachmentsChange: f, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: v = "Menu", menuCloseLabel: y = "Close", removeLabel: b, retryLabel: x, sendLabel: S, stopLabel: C, micLabel: w = "Record voice message", stopRecordingLabel: T, discardRecordingLabel: E, timerAriaLabel: D, colors: O, typography: k, className: A, pendingDropFiles: j = [], onDropFilesConsumed: N, pendingAttachments: ee = [], onPendingAttachmentsConsumed: te, pasteTextThreshold: P = 4e3, deployments: F, selectedDeploymentId: ie, onDeploymentChange: ae, modelSelectorLabels: oe, initialAttachments: I = [], isStacked: se = !1, hideAddButton: ce = !1, hideAttachFile: le = !1, hideActionBar: ue = !1, renderFooterActions: de, isInputDisabled: L = !1, isModelSelectorDisabled: z = !1, isSendDisabled: fe = !1, isAudioMessageSupported: pe = !1, sendOnEnter: me = Ie.Enter, prefixAttachments: he = [], onRemovePrefixAttachment: ge, chatSettings: ve, toolsMenuItems: ye, onToolToggle: be, toolsMenuTitle: xe, toolsBackLabel: Ce, toolsChipLabels: we, autoFocus: K = !1, messageHistory: Te, onDialFileSystemClick: Oe, dialFileSystemLabel: ke, validateAttachment: Me, onAttachmentClick: Ne, modelPickerOverlay: Pe, maximumAttachmentsAmount: Le, onAttachmentsLimitExceeded: Re, isAttachmentsEnabled: ze = !0, usageLimitsSlot: Be, onMessageTooLong: Ve }) => {
1778
- let He = s(), [Ue, We] = H(!1), Ge = Ae(Te), Ke = B(() => a({
1738
+ }, Ft = 160, It = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: d, onAttachmentsChange: f, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: v = "Menu", menuCloseLabel: y = "Close", removeLabel: b, retryLabel: x, sendLabel: S, stopLabel: C, micLabel: w = "Record voice message", stopRecordingLabel: T, discardRecordingLabel: E, timerAriaLabel: D, colors: O, typography: k, className: A, pendingDropFiles: M = [], onDropFilesConsumed: N, pendingAttachments: P = [], onPendingAttachmentsConsumed: ee, pasteTextThreshold: F = 4e3, deployments: re, selectedDeploymentId: ie, onDeploymentChange: ae, modelSelectorLabels: oe, initialAttachments: se = [], isStacked: ce = !1, hideAddButton: le = !1, hideAttachFile: ue = !1, hideActionBar: de = !1, renderFooterActions: fe, isInputDisabled: L = !1, isModelSelectorDisabled: pe = !1, isSendDisabled: R = !1, isAudioMessageSupported: me = !1, sendOnEnter: he = Ie.Enter, prefixAttachments: ge = [], onRemovePrefixAttachment: ve, chatSettings: ye, toolsMenuItems: be, onToolToggle: xe, toolsMenuTitle: Ce, toolsBackLabel: we, toolsChipLabels: G, autoFocus: Te = !1, messageHistory: Oe, onDialFileSystemClick: ke, dialFileSystemLabel: Me, validateAttachment: Ne, onAttachmentClick: Pe, modelPickerOverlay: Le, maximumAttachmentsAmount: Re, onAttachmentsLimitExceeded: ze, isAttachmentsEnabled: Be = !0, usageLimitsSlot: Ve, onMessageTooLong: He }) => {
1739
+ let Ue = s(), [We, Ge] = V(!1), Ke = Ae(Oe), K = z(() => a({
1779
1740
  "--ci-bg": O?.background,
1780
1741
  "--ci-text": O?.text,
1781
1742
  "--ci-border": O?.border,
@@ -1788,133 +1749,133 @@ var Mt = {
1788
1749
  "--ci-voice-error": O?.voiceError,
1789
1750
  "--ci-voice-waveform": O?.voiceWaveform,
1790
1751
  "--ci-voice-accent": O?.voiceAccent
1791
- }), [O]), qe = B(() => Oe ? [{
1752
+ }), [O]), q = z(() => ke ? [{
1792
1753
  key: "dial-fs",
1793
- label: ke ?? "DIAL file system",
1794
- icon: /* @__PURE__ */ W(ne, {
1754
+ label: Me ?? "DIAL file system",
1755
+ icon: /* @__PURE__ */ U(te, {
1795
1756
  size: c,
1796
1757
  "aria-hidden": !0
1797
1758
  }),
1798
- onClick: Oe
1799
- }] : [], [Oe, ke]), { message: q, setMessage: J, textareaRef: Ye, isMultiLine: Ze } = je({
1759
+ onClick: ke
1760
+ }] : [], [ke, Me]), { message: J, setMessage: Je, textareaRef: Xe, isMultiLine: Ze } = je({
1800
1761
  messageProp: e,
1801
1762
  messageRevision: t
1802
- }), { attachments: Qe, buildAttachments: $e, addAttachments: X, resetAttachments: et, handleRemove: it, handleRetry: at, handleExpand: ot, hasBlockedAttachments: st } = Ee({
1803
- initialAttachments: I,
1763
+ }), { attachments: X, buildAttachments: Z, addAttachments: Qe, resetAttachments: nt, handleRemove: rt, handleRetry: it, handleExpand: at, hasBlockedAttachments: ot } = Ee({
1764
+ initialAttachments: se,
1804
1765
  onUploadAttachment: r,
1805
1766
  onAttachmentsChange: f,
1806
- validateAttachment: Me,
1807
- pendingDropFiles: j,
1767
+ validateAttachment: Ne,
1768
+ pendingDropFiles: M,
1808
1769
  onDropFilesConsumed: N,
1809
- pendingAttachments: ee,
1810
- onPendingAttachmentsConsumed: te,
1811
- onExpandPastedText: R((e) => {
1812
- J((t) => t ? `${t}\n${e}` : e);
1813
- }, [J]),
1814
- maximumAttachmentsAmount: Le,
1815
- baseAttachmentsAmount: he.length,
1816
- onAttachmentsLimitExceeded: Re
1817
- }), { state: ct, analyserNodeRef: lt, elapsedSeconds: ut, errorMessage: dt, startRecording: ft, stopRecording: pt, discardRecording: mt } = Fe({ onAttachAudio: R((e) => {
1818
- X($e([e]));
1819
- }, [X, $e]) }), ht = V(null), gt = V(null), { handlePaste: _t } = Se(X, ze ? P : Infinity), vt = R((e) => {
1820
- if (!ze) {
1770
+ pendingAttachments: P,
1771
+ onPendingAttachmentsConsumed: ee,
1772
+ onExpandPastedText: I((e) => {
1773
+ Je((t) => t ? `${t}\n${e}` : e);
1774
+ }, [Je]),
1775
+ maximumAttachmentsAmount: Re,
1776
+ baseAttachmentsAmount: ge.length,
1777
+ onAttachmentsLimitExceeded: ze
1778
+ }), { state: st, analyserNodeRef: ct, elapsedSeconds: lt, errorMessage: ut, startRecording: dt, stopRecording: ft, discardRecording: pt } = Fe({ onAttachAudio: I((e) => {
1779
+ Qe(Z([e]));
1780
+ }, [Qe, Z]) }), mt = B(null), ht = B(null), { handlePaste: gt } = Se(Qe, Be ? F : Infinity), Q = I((e) => {
1781
+ if (!Be) {
1821
1782
  let t = e.clipboardData.getData("text/plain");
1822
- t.length >= P && Ve?.(t.length, P);
1783
+ t.length >= F && He?.(t.length, F);
1823
1784
  }
1824
- _t(e);
1785
+ gt(e);
1825
1786
  }, [
1826
- ze,
1827
- P,
1828
- Ve,
1829
- _t
1830
- ]), yt = q.trim().length > 0 || Qe.length > 0, bt = yt && !st && !fe, { shouldRender: Z, isExiting: Q, instanceKey: xt } = De(!l && yt, Rt), St = (ye?.some((e) => e.isSelected) ?? !1) && be != null, $ = se || q.includes("\n") || Ze || St, Ct = F === void 0 || ie != null, wt = B(() => pe && !Q && !l, [
1831
- pe,
1832
- Q,
1787
+ Be,
1788
+ F,
1789
+ He,
1790
+ gt
1791
+ ]), _t = J.trim().length > 0 || X.length > 0, vt = _t && !ot && !R, { shouldRender: yt, isExiting: bt, instanceKey: xt } = De(!l && _t, Ft), St = (be?.some((e) => e.isSelected) ?? !1) && xe != null, $ = ce || J.includes("\n") || Ze || St, Ct = re === void 0 || ie != null, wt = z(() => me && !bt && !l, [
1792
+ me,
1793
+ bt,
1833
1794
  l
1834
1795
  ]), Tt = async () => {
1835
- if (fe) return;
1836
- if (!ze && q.length >= P) {
1837
- Ve?.(q.length, P);
1796
+ if (R) return;
1797
+ if (!Be && J.length >= F) {
1798
+ He?.(J.length, F);
1838
1799
  return;
1839
1800
  }
1840
- let e = q, t = Qe;
1841
- J(""), Ge.reset();
1801
+ let e = J, t = X;
1802
+ Je(""), Ke.reset();
1842
1803
  try {
1843
1804
  await n?.(e, t), t.forEach((e) => {
1844
1805
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
1845
- }), et([]);
1806
+ }), nt([]);
1846
1807
  } catch {
1847
- J(e), et(t);
1808
+ Je(e), nt(t);
1848
1809
  }
1849
1810
  }, Et = (e) => {
1850
1811
  if (!e.nativeEvent.isComposing && !L && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1851
- let t = e.currentTarget.selectionStart ?? 0, n = Ge.navigate(e.key === "ArrowUp" ? "up" : "down", q, t);
1812
+ let t = e.currentTarget.selectionStart ?? 0, n = Ke.navigate(e.key === "ArrowUp" ? "up" : "down", J, t);
1852
1813
  if (n !== null) {
1853
- e.preventDefault(), J(n);
1814
+ e.preventDefault(), Je(n);
1854
1815
  return;
1855
1816
  }
1856
1817
  }
1857
- e.key === "Enter" && (me === Ie.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && bt && Ct && !L && Tt());
1818
+ e.key === "Enter" && (he === Ie.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && vt && Ct && !L && Tt());
1858
1819
  }, Dt = (e) => {
1859
1820
  let t = Array.from(e.target.files ?? []);
1860
1821
  if (t.length === 0) return;
1861
- let n = $e(t);
1862
- e.target.value = "", X(n);
1822
+ let n = Z(t);
1823
+ e.target.value = "", Qe(n);
1863
1824
  };
1864
- if (ct !== "idle") return /* @__PURE__ */ W(tt, {
1865
- state: ct,
1866
- analyserNodeRef: lt,
1867
- elapsedSeconds: ut,
1868
- errorMessage: dt,
1869
- onStop: pt,
1870
- onDiscard: mt,
1825
+ if (st !== "idle") return /* @__PURE__ */ U($e, {
1826
+ state: st,
1827
+ analyserNodeRef: ct,
1828
+ elapsedSeconds: lt,
1829
+ errorMessage: ut,
1830
+ onStop: ft,
1831
+ onDiscard: pt,
1871
1832
  stopLabel: T,
1872
1833
  discardLabel: E,
1873
1834
  timerLabel: D,
1874
- style: Ke,
1835
+ style: K,
1875
1836
  className: A
1876
1837
  });
1877
- let Ot = /* @__PURE__ */ W("textarea", {
1838
+ let Ot = /* @__PURE__ */ U("textarea", {
1878
1839
  className: o(Y.textarea, k?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1879
- ref: Ye,
1880
- autoFocus: K,
1881
- value: q,
1840
+ ref: Xe,
1841
+ autoFocus: Te,
1842
+ value: J,
1882
1843
  onChange: (e) => {
1883
- J(e.target.value), Ge.notifyChange(), d?.(e.target.value);
1844
+ Je(e.target.value), Ke.notifyChange(), d?.(e.target.value);
1884
1845
  },
1885
1846
  onKeyDown: Et,
1886
- onPaste: vt,
1847
+ onPaste: Q,
1887
1848
  placeholder: p,
1888
1849
  "aria-label": m,
1889
1850
  disabled: L,
1890
1851
  rows: 1
1891
1852
  });
1892
- return /* @__PURE__ */ G("div", {
1893
- ref: gt,
1894
- style: Ke,
1895
- className: o(Y.wrapper, L && Y.wrapperDisabled, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", Qe.length > 6 ? "py-3 ps-3" : "p-3", A),
1896
- children: [(he.length > 0 || Qe.length > 0) && /* @__PURE__ */ W(_e, {
1897
- attachments: [...he, ...Qe],
1853
+ return /* @__PURE__ */ W("div", {
1854
+ ref: ht,
1855
+ style: K,
1856
+ className: o(Y.wrapper, L && Y.wrapperDisabled, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", X.length > 6 ? "py-3 ps-3" : "p-3", A),
1857
+ children: [(ge.length > 0 || X.length > 0) && /* @__PURE__ */ U(_e, {
1858
+ attachments: [...ge, ...X],
1898
1859
  onRemove: (e) => {
1899
- he.some((t) => t.id === e) ? ge?.(e) : it(e);
1860
+ ge.some((t) => t.id === e) ? ve?.(e) : rt(e);
1900
1861
  },
1901
- onRetry: at,
1902
- onExpand: ot,
1862
+ onRetry: it,
1863
+ onExpand: at,
1903
1864
  labels: {
1904
1865
  removeLabel: b,
1905
1866
  retryLabel: x
1906
1867
  },
1907
- onAttachmentClick: Ne == null ? void 0 : (e) => {
1908
- let t = [...he, ...Qe].find((t) => t.id === e);
1909
- t != null && Ne(t);
1868
+ onAttachmentClick: Pe == null ? void 0 : (e) => {
1869
+ let t = [...ge, ...X].find((t) => t.id === e);
1870
+ t != null && Pe(t);
1910
1871
  }
1911
- }), ue ? $ && Ot : /* @__PURE__ */ G("div", {
1872
+ }), de ? $ && Ot : /* @__PURE__ */ W("div", {
1912
1873
  className: o("flex items-center gap-2", $ ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1913
1874
  children: [
1914
- !ce && /* @__PURE__ */ G("div", {
1875
+ !le && /* @__PURE__ */ W("div", {
1915
1876
  className: o("flex", "order-2", !$ && "desktop:order-1"),
1916
- children: [/* @__PURE__ */ W("input", {
1917
- ref: ht,
1877
+ children: [/* @__PURE__ */ U("input", {
1878
+ ref: mt,
1918
1879
  type: "file",
1919
1880
  multiple: !0,
1920
1881
  accept: g,
@@ -1922,92 +1883,92 @@ var Mt = {
1922
1883
  "aria-hidden": !0,
1923
1884
  tabIndex: -1,
1924
1885
  onChange: Dt
1925
- }), /* @__PURE__ */ W(Je, {
1926
- onAttachClick: le ? void 0 : () => ht.current?.click(),
1886
+ }), /* @__PURE__ */ U(qe, {
1887
+ onAttachClick: ue ? void 0 : () => mt.current?.click(),
1927
1888
  attachLabel: h,
1928
1889
  addMenuTitle: _,
1929
1890
  menuTitle: v,
1930
1891
  menuCloseLabel: y,
1931
- style: Ke,
1892
+ style: K,
1932
1893
  isDisabled: L,
1933
- chatSettings: ve,
1934
- extraMenuItems: qe,
1935
- toolsMenuItems: ye,
1936
- onToolToggle: be,
1937
- toolsMenuTitle: xe,
1938
- toolsBackLabel: Ce
1894
+ chatSettings: ye,
1895
+ extraMenuItems: q,
1896
+ toolsMenuItems: be,
1897
+ onToolToggle: xe,
1898
+ toolsMenuTitle: Ce,
1899
+ toolsBackLabel: we
1939
1900
  })]
1940
1901
  }),
1941
- $ && St && /* @__PURE__ */ W("div", {
1902
+ $ && St && /* @__PURE__ */ U("div", {
1942
1903
  className: "order-3 min-w-0 flex-1",
1943
- children: /* @__PURE__ */ W(Xe, {
1944
- items: ye ?? [],
1945
- onToolToggle: be,
1946
- isMobile: He,
1947
- countLabel: we?.countLabel,
1948
- removeLabel: we?.removeLabel
1904
+ children: /* @__PURE__ */ U(Ye, {
1905
+ items: be ?? [],
1906
+ onToolToggle: xe,
1907
+ isMobile: Ue,
1908
+ countLabel: G?.countLabel,
1909
+ removeLabel: G?.removeLabel
1949
1910
  })
1950
1911
  }),
1951
- /* @__PURE__ */ W("div", {
1912
+ /* @__PURE__ */ U("div", {
1952
1913
  className: o("order-1 flex w-full min-w-0 items-center self-stretch", !$ && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1953
1914
  children: Ot
1954
1915
  }),
1955
- /* @__PURE__ */ G("div", {
1916
+ /* @__PURE__ */ W("div", {
1956
1917
  className: o("flex flex-shrink-0 items-center gap-2", $ && St ? "order-4" : "order-3", "ms-auto", !$ && "desktop:ms-0"),
1957
- children: [de ? de({
1958
- canSend: bt,
1918
+ children: [fe ? fe({
1919
+ canSend: vt,
1959
1920
  onSend: Tt
1960
- }) : /* @__PURE__ */ G(U, { children: [
1961
- Be,
1962
- /* @__PURE__ */ W(Lt, {
1963
- deployments: F,
1921
+ }) : /* @__PURE__ */ W(H, { children: [
1922
+ Ve,
1923
+ /* @__PURE__ */ U(Pt, {
1924
+ deployments: re,
1964
1925
  selectedDeploymentId: ie,
1965
1926
  onDeploymentChange: ae,
1966
1927
  modelSelectorLabels: oe,
1967
1928
  isStreaming: l,
1968
- isMobile: He,
1929
+ isMobile: Ue,
1969
1930
  isInputDisabled: L,
1970
- isDisabled: z,
1971
- style: Ke,
1972
- modelPickerOverlay: Pe,
1973
- isPickerOpen: Ue,
1974
- onPickerToggle: () => We((e) => !e),
1975
- onPickerOpenChange: We
1931
+ isDisabled: pe,
1932
+ style: K,
1933
+ modelPickerOverlay: Le,
1934
+ isPickerOpen: We,
1935
+ onPickerToggle: () => Ge((e) => !e),
1936
+ onPickerOpenChange: Ge
1976
1937
  }),
1977
- l && i ? /* @__PURE__ */ W(rt, {
1938
+ l && i ? /* @__PURE__ */ U(tt, {
1978
1939
  onStop: i,
1979
1940
  ariaLabel: C
1980
- }) : !l && Z && /* @__PURE__ */ W(nt, {
1941
+ }) : !l && yt && /* @__PURE__ */ U(et, {
1981
1942
  onSend: Tt,
1982
- isDisabled: !Ct || st || fe,
1943
+ isDisabled: !Ct || ot || R,
1983
1944
  ariaLabel: S,
1984
- isExiting: Q
1945
+ isExiting: bt
1985
1946
  }, xt)
1986
- ] }), wt && /* @__PURE__ */ W(M, {
1987
- icon: /* @__PURE__ */ W(re, {
1947
+ ] }), wt && /* @__PURE__ */ U(j, {
1948
+ icon: /* @__PURE__ */ U(ne, {
1988
1949
  size: u.LG,
1989
1950
  "aria-hidden": !0
1990
1951
  }),
1991
1952
  "aria-label": w,
1992
1953
  className: "size-8 flex-shrink-0",
1993
- onClick: ft,
1954
+ onClick: dt,
1994
1955
  disabled: L || l
1995
1956
  })]
1996
1957
  })
1997
1958
  ]
1998
1959
  })]
1999
1960
  });
2000
- }, Bt = { welcome: "_welcome_n2ph8_1" }, Vt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: s, isInputDisabled: c = !1, ...l }) => {
1961
+ }, Lt = { welcome: "_welcome_n2ph8_1" }, Rt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: s, isInputDisabled: c = !1, ...l }) => {
2001
1962
  let { colors: u, typography: d } = r ?? {};
2002
- return /* @__PURE__ */ G("div", {
1963
+ return /* @__PURE__ */ W("div", {
2003
1964
  style: a({ "--ci-welcome-color": u?.welcomeText }),
2004
1965
  className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
2005
- children: [n && /* @__PURE__ */ W("h1", {
2006
- className: o(Bt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
1966
+ children: [n && /* @__PURE__ */ U("h1", {
1967
+ className: o(Lt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
2007
1968
  children: n
2008
- }), /* @__PURE__ */ W("div", {
1969
+ }), /* @__PURE__ */ U("div", {
2009
1970
  className: "relative w-full max-w-[748px]",
2010
- children: /* @__PURE__ */ W(zt, {
1971
+ children: /* @__PURE__ */ U(It, {
2011
1972
  placeholder: t,
2012
1973
  isStreaming: e,
2013
1974
  isInputDisabled: c,
@@ -2018,53 +1979,53 @@ var Mt = {
2018
1979
  })
2019
1980
  })]
2020
1981
  });
2021
- }, Ht = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: y, validateAttachment: b, isAttachmentsEnabled: x, hideAttachFile: S = !1, fileAccept: C, maximumAttachmentsAmount: w, onAttachmentsLimitExceeded: T, onDialFileSystemClick: E, dialFileSystemLabel: O, pendingAttachments: A, onPendingAttachmentsConsumed: j, onAttachmentClick: M, pasteTextThreshold: N, onMessageTooLong: ee }) => {
2022
- let te = V(null), [P, F] = H([]);
2023
- z(() => {
2024
- v?.length && (F(v), y?.());
1982
+ }, zt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: y, validateAttachment: b, isAttachmentsEnabled: x, hideAttachFile: S = !1, fileAccept: C, maximumAttachmentsAmount: w, onAttachmentsLimitExceeded: T, onDialFileSystemClick: D, dialFileSystemLabel: k, pendingAttachments: A, onPendingAttachmentsConsumed: j, onAttachmentClick: M, pasteTextThreshold: N, onMessageTooLong: P }) => {
1983
+ let ee = B(null), [F, ne] = V([]);
1984
+ L(() => {
1985
+ v?.length && (ne(v), y?.());
2025
1986
  }, [v, y]);
2026
- let [re, ie] = H(e ?? ""), [ae, oe] = H([]), [I, se] = H(t), ce = ae.some((e) => e.status === r.Loading || e.status === r.Error), le = (re.trim().length > 0 || ae.length > 0 || I.length > 0) && !ce, ue = (e) => {
2027
- se((t) => t.filter((t) => t.id !== e));
2028
- }, de = R((e, t) => {
2029
- i(e, I, t);
2030
- }, [I, i]), L = () => {
2031
- if (le) {
1987
+ let [re, ie] = V(e ?? ""), [ae, oe] = V([]), [se, ce] = V(t), le = ae.some((e) => e.status === r.Loading || e.status === r.Error), ue = (re.trim().length > 0 || ae.length > 0 || se.length > 0) && !le, de = (e) => {
1988
+ ce((t) => t.filter((t) => t.id !== e));
1989
+ }, fe = I((e, t) => {
1990
+ i(e, se, t);
1991
+ }, [se, i]), pe = () => {
1992
+ if (ue) {
2032
1993
  if (!x && re.length >= (N ?? 4e3)) {
2033
- ee?.(re.length, N ?? 4e3);
1994
+ P?.(re.length, N ?? 4e3);
2034
1995
  return;
2035
1996
  }
2036
- de(re, ae);
1997
+ fe(re, ae);
2037
1998
  }
2038
- }, fe = R(() => F([]), []), pe = R((e) => {
1999
+ }, R = I(() => ne([]), []), me = I((e) => {
2039
2000
  let t = Array.from(e.target.files ?? []);
2040
- t.length !== 0 && (e.target.value = "", F(t));
2041
- }, []), me = B(() => E ? [{
2001
+ t.length !== 0 && (e.target.value = "", ne(t));
2002
+ }, []), he = z(() => D ? [{
2042
2003
  key: "dial-fs",
2043
- label: O ?? "DIAL file system",
2044
- icon: /* @__PURE__ */ W(ne, {
2004
+ label: k ?? "DIAL file system",
2005
+ icon: /* @__PURE__ */ U(te, {
2045
2006
  size: c,
2046
2007
  "aria-hidden": !0
2047
2008
  }),
2048
- onClick: E
2049
- }] : [], [E, O]);
2050
- return /* @__PURE__ */ G("div", {
2009
+ onClick: D
2010
+ }] : [], [D, k]);
2011
+ return /* @__PURE__ */ W("div", {
2051
2012
  className: o("flex w-full flex-col gap-2", _),
2052
- children: [/* @__PURE__ */ W(zt, {
2013
+ children: [/* @__PURE__ */ U(It, {
2053
2014
  message: e,
2054
2015
  ariaLabel: u,
2055
2016
  isStacked: !0,
2056
2017
  hideActionBar: !0,
2057
- pendingDropFiles: P,
2058
- onDropFilesConsumed: fe,
2059
- onSend: de,
2018
+ pendingDropFiles: F,
2019
+ onDropFilesConsumed: R,
2020
+ onSend: fe,
2060
2021
  onUploadAttachment: a,
2061
2022
  onChange: ie,
2062
2023
  onAttachmentsChange: oe,
2063
2024
  removeLabel: d,
2064
2025
  retryLabel: f,
2065
2026
  className: "max-w-full",
2066
- prefixAttachments: I,
2067
- onRemovePrefixAttachment: ue,
2027
+ prefixAttachments: se,
2028
+ onRemovePrefixAttachment: de,
2068
2029
  validateAttachment: b,
2069
2030
  isAttachmentsEnabled: x,
2070
2031
  maximumAttachmentsAmount: w,
@@ -2073,41 +2034,41 @@ var Mt = {
2073
2034
  onPendingAttachmentsConsumed: j,
2074
2035
  onAttachmentClick: M,
2075
2036
  pasteTextThreshold: N,
2076
- onMessageTooLong: ee
2077
- }), /* @__PURE__ */ G("div", {
2037
+ onMessageTooLong: P
2038
+ }), /* @__PURE__ */ W("div", {
2078
2039
  className: "flex items-center justify-between",
2079
- children: [/* @__PURE__ */ W("div", {
2040
+ children: [/* @__PURE__ */ U("div", {
2080
2041
  className: "flex",
2081
- children: !S && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("input", {
2082
- ref: te,
2042
+ children: !S && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("input", {
2043
+ ref: ee,
2083
2044
  type: "file",
2084
2045
  multiple: !0,
2085
2046
  accept: C,
2086
2047
  className: "sr-only",
2087
2048
  "aria-hidden": !0,
2088
2049
  tabIndex: -1,
2089
- onChange: pe
2090
- }), /* @__PURE__ */ W(Je, {
2091
- onAttachClick: () => te.current?.click(),
2050
+ onChange: me
2051
+ }), /* @__PURE__ */ U(qe, {
2052
+ onAttachClick: () => ee.current?.click(),
2092
2053
  attachLabel: m,
2093
2054
  addMenuTitle: p,
2094
2055
  menuTitle: h,
2095
2056
  menuCloseLabel: g,
2096
- extraMenuItems: me
2057
+ extraMenuItems: he
2097
2058
  })] })
2098
- }), /* @__PURE__ */ G("div", {
2059
+ }), /* @__PURE__ */ W("div", {
2099
2060
  className: "flex gap-2",
2100
- children: [/* @__PURE__ */ W(D, {
2061
+ children: [/* @__PURE__ */ U(E, {
2101
2062
  label: s,
2102
2063
  onClick: n
2103
- }), /* @__PURE__ */ W(k, {
2064
+ }), /* @__PURE__ */ U(O, {
2104
2065
  label: l,
2105
- onClick: L,
2106
- disabled: !le
2066
+ onClick: pe,
2067
+ disabled: !ue
2107
2068
  })]
2108
2069
  })]
2109
2070
  })]
2110
2071
  });
2111
2072
  };
2112
2073
  //#endregion
2113
- export { me as AttachmentCard, he as AttachmentGroup, ge as AttachmentTray, K as BottomSheetShell, We as ChatSettingsModal, Vt as ConversationInput, Ht as EditMessageInput, ve as FileDndOverlay, zt as Input, Ie as SendOnEnter, xe as getAttachmentIcon };
2074
+ export { me as AttachmentCard, he as AttachmentGroup, ge as AttachmentTray, G as BottomSheetShell, We as ChatSettingsModal, Rt as ConversationInput, zt as EditMessageInput, ve as FileDndOverlay, It as Input, Ie as SendOnEnter, xe as getAttachmentIcon };