@epam/ai-dial-conversation-input 1.1.0-dev.372 → 1.1.0-dev.375

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,43 +1,43 @@
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, CloseButton as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialDropdownIcon as p, Dropdown as m, ElementSize as h, ErrorText as g, GhostIconButton as _, Highlight as v, NeutralButton as y, Popup as b, PopupSize as x, PrimaryButton as S, PrimaryIconButton as C, RadioGroup as w, RadioGroupOrientation as T, Search as E, Skeleton as D, SkeletonVariant as O, Slider as k, StaticIconButton as A, Textarea as j, Tooltip as M } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as ee, IconArrowNarrowRight as te, IconCheck as N, IconChevronDown as ne, IconChevronRight as P, IconFile as re, IconMicrophone as ie, IconPaperclip as ae, IconPlayerStopFilled as F, IconPlaystationSquare as I, IconPlus as oe, IconPrompt as se, IconSettings as ce, IconTool as le, IconX as L } from "@tabler/icons-react";
4
- import { createPortal as ue } from "react-dom";
5
- import { createElement as R, memo as de, useCallback as z, useEffect as B, useImperativeHandle as fe, useLayoutEffect as pe, useMemo as V, useRef as H, useState as U } from "react";
6
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
7
- import { AttachmentTray as me, MAX_UPLOADS_PER_MINUTE as he, generateAttachmentId as ge, useClipboardPaste as _e } from "@epam/ai-dial-attachment-input";
2
+ import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialDropdownIcon as p, Dropdown as m, ElementSize as h, ErrorText as g, GhostIconButton as _, Highlight as v, NeutralButton as y, Popup as b, PopupSize as x, PrimaryButton as S, PrimaryIconButton as C, RadioGroup as w, RadioGroupOrientation as T, Search as E, Skeleton as D, SkeletonVariant as O, Slider as ee, StaticIconButton as k, Textarea as te, Tooltip as A } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as ne, IconArrowNarrowRight as re, IconCheck as ie, IconChevronDown as ae, IconChevronRight as oe, IconFile as se, IconMicrophone as ce, IconPaperclip as j, IconPlayerStopFilled as M, IconPlaystationSquare as N, IconPlus as le, IconPrompt as ue, IconSettings as de, IconTool as fe, IconX as P } from "@tabler/icons-react";
4
+ import { createPortal as pe } from "react-dom";
5
+ import { createElement as F, memo as I, useCallback as L, useEffect as R, useImperativeHandle as me, useLayoutEffect as he, 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
+ import { AttachmentTray as ge, MAX_UPLOADS_PER_MINUTE as _e, generateAttachmentId as ve, useClipboardPaste as ye } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
9
- var ve = (e, t) => {
10
- B(() => {
9
+ var be = (e, t) => {
10
+ R(() => {
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]), B(() => {
16
+ }, [e, t]), R(() => {
17
17
  if (e) return document.body.style.overflow = "hidden", () => {
18
18
  document.body.style.overflow = "";
19
19
  };
20
20
  }, [e]);
21
- }, ye = {
21
+ }, xe = {
22
22
  backdrop: "_backdrop_1d50f_9",
23
23
  sheet: "_sheet_1d50f_13",
24
24
  "slide-up": "_slide-up_1d50f_1",
25
25
  title: "_title_1d50f_18",
26
26
  divider: "_divider_1d50f_22"
27
- }, q = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: p = "dial-body-semi-text", className: m, colors: g, children: v }) => {
28
- if (ve(e, r), !e || typeof document > "u") return null;
27
+ }, G = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: p = "dial-body-semi-text", className: m, colors: g, children: v }) => {
28
+ if (be(e, r), !e || typeof document > "u") return null;
29
29
  let y = a({
30
30
  "--ci-backdrop": g?.backdrop,
31
31
  "--ci-sheet-bg": g?.sheetBg,
32
32
  "--ci-sheet-text": g?.sheetText,
33
33
  "--ci-sheet-divider": g?.divider
34
34
  });
35
- return ue(/* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
36
- className: o(ye.backdrop, "fixed inset-0 z-[55]"),
35
+ return pe(/* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
36
+ className: o(xe.backdrop, "fixed inset-0 z-[55]"),
37
37
  style: y,
38
38
  onPointerDown: r,
39
39
  "aria-hidden": !0
40
- }), /* @__PURE__ */ K("div", {
40
+ }), /* @__PURE__ */ W("div", {
41
41
  role: "dialog",
42
42
  "aria-modal": !0,
43
43
  "aria-label": t ?? c,
@@ -45,14 +45,14 @@ var ve = (e, t) => {
45
45
  ...y,
46
46
  ...l
47
47
  },
48
- className: o(ye.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", m),
49
- children: [t != null && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K("div", {
48
+ className: o(xe.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", m),
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__ */ G("div", {
52
+ i && /* @__PURE__ */ U("div", {
53
53
  className: "absolute start-4",
54
- children: /* @__PURE__ */ G(_, {
55
- icon: /* @__PURE__ */ G(ee, {
54
+ children: /* @__PURE__ */ U(_, {
55
+ icon: /* @__PURE__ */ U(ne, {
56
56
  size: d.LG,
57
57
  stroke: f,
58
58
  className: "rtl:scale-x-[-1]"
@@ -61,41 +61,41 @@ var ve = (e, t) => {
61
61
  onClick: i
62
62
  })
63
63
  }),
64
- /* @__PURE__ */ G("span", {
65
- className: o(ye.title, p),
64
+ /* @__PURE__ */ U("span", {
65
+ className: o(xe.title, p),
66
66
  children: t
67
67
  }),
68
- /* @__PURE__ */ G("div", {
68
+ /* @__PURE__ */ U("div", {
69
69
  className: "absolute end-4 m-2",
70
- children: /* @__PURE__ */ G(u, {
70
+ children: /* @__PURE__ */ U(u, {
71
71
  ariaLabel: n,
72
72
  onClose: r,
73
73
  size: h.Standard
74
74
  })
75
75
  })
76
76
  ]
77
- }), /* @__PURE__ */ G("div", { className: o(ye.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ G("div", {
77
+ }), /* @__PURE__ */ U("div", { className: o(xe.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ U("div", {
78
78
  className: "overflow-y-auto",
79
79
  children: v
80
80
  })]
81
81
  })] }), document.body);
82
- }, be = async (e, t, n) => {
82
+ }, Se = async (e, t, n) => {
83
83
  let r = 6e4 / t, i = [];
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
- }, xe = ({ 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] = U(n), _ = H(h);
88
- B(() => {
86
+ }, Ce = ({ 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] = V(n), _ = B(h);
88
+ R(() => {
89
89
  _.current = h;
90
- }, [h]), B(() => () => {
90
+ }, [h]), R(() => () => {
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 = z((e) => e.map((e) => {
95
+ let v = L((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
- id: ge(),
98
+ id: ve(),
99
99
  name: e.name,
100
100
  contentType: e.type,
101
101
  file: e,
@@ -104,26 +104,26 @@ var ve = (e, t) => {
104
104
  previewUrl: a,
105
105
  playUrl: o
106
106
  };
107
- }), []), y = H(a);
108
- B(() => {
107
+ }), []), y = B(a);
108
+ R(() => {
109
109
  y.current = a;
110
110
  }, [a]);
111
- let b = H(!0), x = z((e) => {
111
+ let b = B(!0), x = L((e) => {
112
112
  g((t) => {
113
113
  let n = e(t);
114
114
  return n === t ? t : n;
115
115
  });
116
116
  }, []);
117
- B(() => {
117
+ R(() => {
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 = z((e) => {
124
+ let S = L((e) => {
125
125
  g(e);
126
- }, []), C = z(async (t) => {
126
+ }, []), C = L(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 ve = (e, t) => {
145
145
  } : e));
146
146
  }
147
147
  }
148
- }, [i, x]), w = z((e, t = !0) => {
148
+ }, [i, x]), w = L((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)) {
@@ -166,7 +166,7 @@ var ve = (e, t) => {
166
166
  status: r.Error,
167
167
  errorReason: n
168
168
  } : e));
169
- }), be(e, he, C);
169
+ }), Se(e, _e, C);
170
170
  }
171
171
  }
172
172
  }, [
@@ -177,20 +177,20 @@ var ve = (e, t) => {
177
177
  C,
178
178
  o
179
179
  ]);
180
- B(() => {
180
+ R(() => {
181
181
  s.length !== 0 && (w(v(s)), c?.());
182
182
  }, [
183
183
  w,
184
184
  v,
185
185
  c,
186
186
  s
187
- ]), B(() => {
187
+ ]), R(() => {
188
188
  l.length !== 0 && (w(l, !1), u?.());
189
189
  }, [
190
190
  w,
191
191
  u,
192
192
  l
193
- ]), B(() => {
193
+ ]), R(() => {
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 ve = (e, t) => {
217
217
  x,
218
218
  C
219
219
  ]);
220
- let T = z((e) => {
220
+ let T = L((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 ve = (e, t) => {
229
229
  addAttachments: w,
230
230
  resetAttachments: S,
231
231
  handleRemove: T,
232
- handleRetry: z((e) => {
232
+ handleRetry: L((e) => {
233
233
  let t = h.find((t) => t.id === e);
234
234
  t && C(t);
235
235
  }, [h, C]),
236
- handleExpand: z(async (e) => {
236
+ handleExpand: L(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();
@@ -245,9 +245,9 @@ var ve = (e, t) => {
245
245
  ]),
246
246
  hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
247
247
  };
248
- }, Se = (e, t) => {
249
- let [n, r] = U(e), [i, a] = U(!1), [o, s] = U(0);
250
- return B(() => {
248
+ }, we = (e, t) => {
249
+ let [n, r] = V(e), [i, a] = V(!1), [o, s] = V(0);
250
+ return R(() => {
251
251
  if (e) {
252
252
  r(!0), a(!1), s((e) => e + 1);
253
253
  return;
@@ -263,18 +263,18 @@ var ve = (e, t) => {
263
263
  isExiting: i,
264
264
  instanceKey: o
265
265
  };
266
- }, Ce = (e, t) => !e.slice(0, t).includes("\n"), we = (e, t) => !e.slice(t).includes("\n"), Te = (e) => {
267
- let t = H(e);
266
+ }, Te = (e, t) => !e.slice(0, t).includes("\n"), Ee = (e, t) => !e.slice(t).includes("\n"), De = (e) => {
267
+ let t = B(e);
268
268
  t.current = e;
269
- let n = H(-1), r = H(""), i = z((e, i, a) => {
269
+ let n = B(-1), r = B(""), i = L((e, i, a) => {
270
270
  let o = t.current;
271
- return !o || o.length === 0 ? null : e === "up" ? !Ce(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 || !we(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
- }, []), a = z(() => {
271
+ return !o || o.length === 0 ? null : e === "up" ? !Te(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 || !Ee(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
+ }, []), a = L(() => {
273
273
  n.current = -1, r.current = "";
274
- }, []), o = z(() => {
274
+ }, []), o = L(() => {
275
275
  n.current = -1, r.current = "";
276
276
  }, []);
277
- return V(() => ({
277
+ return z(() => ({
278
278
  navigate: i,
279
279
  notifyChange: a,
280
280
  reset: o
@@ -283,27 +283,27 @@ var ve = (e, t) => {
283
283
  a,
284
284
  o
285
285
  ]);
286
- }, Ee = ({ messageProp: e, messageRevision: t }) => {
287
- let [n, r] = U(e), i = H(null);
288
- return B(() => {
286
+ }, Oe = ({ messageProp: e, messageRevision: t }) => {
287
+ let [n, r] = V(e), i = B(null);
288
+ return R(() => {
289
289
  r(e);
290
290
  }, [e, t]), {
291
291
  message: n,
292
292
  setMessage: r,
293
293
  textareaRef: i
294
294
  };
295
- }, De = /* @__PURE__ */ function(e) {
295
+ }, ke = /* @__PURE__ */ function(e) {
296
296
  return e.Idle = "idle", e.Recording = "recording", e.Error = "error", e;
297
- }({}), Oe = [
297
+ }({}), Ae = [
298
298
  "audio/webm;codecs=opus",
299
299
  "audio/ogg;codecs=opus",
300
300
  "audio/webm"
301
- ], ke = () => Oe.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Ae = ({ onAttachAudio: e }) => {
302
- let [t, n] = U("idle"), [r, i] = U(null), a = H(null), o = H(null), s = H(null), c = H(null), l = H([]), u = H(""), d = H(e);
301
+ ], je = () => Ae.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Me = ({ onAttachAudio: e }) => {
302
+ let [t, n] = V("idle"), [r, i] = V(null), a = B(null), o = B(null), s = B(null), c = B(null), l = B([]), u = B(""), d = B(e);
303
303
  d.current = e;
304
- let f = z(() => {
304
+ let f = L(() => {
305
305
  a.current &&= (a.current.getTracks().forEach((e) => e.stop()), null), o.current &&= (o.current.close(), null), s.current = null, c.current = null;
306
- }, []), p = z(() => {
306
+ }, []), p = L(() => {
307
307
  (async () => {
308
308
  try {
309
309
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
@@ -312,7 +312,7 @@ var ve = (e, t) => {
312
312
  o.current = t;
313
313
  let r = t.createAnalyser();
314
314
  r.fftSize = 256, s.current = r, t.createMediaStreamSource(e).connect(r);
315
- let i = ke();
315
+ let i = je();
316
316
  u.current = i, l.current = [];
317
317
  let d = new MediaRecorder(e, i ? { mimeType: i } : void 0);
318
318
  c.current = d, d.ondataavailable = (e) => {
@@ -322,17 +322,17 @@ var ve = (e, t) => {
322
322
  i(e instanceof Error ? e.message : "Microphone access denied"), n("error");
323
323
  }
324
324
  })();
325
- }, []), m = z(() => {
325
+ }, []), m = L(() => {
326
326
  let e = c.current;
327
327
  !e || e.state !== "recording" || (e.onstop = () => {
328
328
  let e = u.current || "audio/webm", t = new Blob(l.current, { type: e }), r = e.split(";")[0].split("/")[1] ?? "webm", a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -1), o = new File([t], `voice-${a}.${r}`, { type: e });
329
329
  d.current(o), f(), i(null), n("idle");
330
330
  }, e.stop());
331
- }, [f]), h = z(() => {
331
+ }, [f]), h = L(() => {
332
332
  let e = c.current;
333
333
  e && e.state === "recording" && (e.ondataavailable = null, e.onstop = null, e.stop()), f(), i(null), n("idle");
334
334
  }, [f]);
335
- return B(() => () => {
335
+ return R(() => () => {
336
336
  f();
337
337
  }, [f]), {
338
338
  state: t,
@@ -342,12 +342,12 @@ var ve = (e, t) => {
342
342
  stopRecording: m,
343
343
  discardRecording: h
344
344
  };
345
- }, je = /* @__PURE__ */ function(e) {
345
+ }, Ne = /* @__PURE__ */ function(e) {
346
346
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
347
- }({}), Me = {
347
+ }({}), Pe = {
348
348
  item: "_item_1sr2n_1",
349
349
  itemIcon: "_itemIcon_1sr2n_11"
350
- }, Ne = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
350
+ }, Fe = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
351
351
  let m = (e) => {
352
352
  e(), r();
353
353
  }, h = a({
@@ -356,7 +356,7 @@ var ve = (e, t) => {
356
356
  "--ci-sheet-item-active": p?.itemActiveBg,
357
357
  "--ci-sheet-icon": p?.itemIcon
358
358
  });
359
- return /* @__PURE__ */ G(q, {
359
+ return /* @__PURE__ */ U(G, {
360
360
  isOpen: e,
361
361
  title: t,
362
362
  closeLabel: n,
@@ -365,23 +365,23 @@ var ve = (e, t) => {
365
365
  className: c,
366
366
  titleClassName: u,
367
367
  colors: p?.shell,
368
- children: /* @__PURE__ */ G("ul", {
368
+ children: /* @__PURE__ */ U("ul", {
369
369
  role: "list",
370
370
  className: "flex flex-col",
371
371
  style: h,
372
- children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ G(l, {
372
+ children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ U("li", { children: /* @__PURE__ */ U(l, {
373
373
  type: "button",
374
- className: o(Me.item, "w-full gap-3 px-4 py-[10px] text-start"),
375
- iconBefore: /* @__PURE__ */ G("span", {
376
- className: Me.itemIcon,
374
+ className: o(Pe.item, "w-full gap-3 px-4 py-[10px] text-start"),
375
+ iconBefore: /* @__PURE__ */ U("span", {
376
+ className: Pe.itemIcon,
377
377
  children: n
378
378
  }),
379
- iconAfter: r ? /* @__PURE__ */ G("span", {
379
+ iconAfter: r ? /* @__PURE__ */ U("span", {
380
380
  className: "ms-auto",
381
381
  children: r
382
382
  }) : null,
383
383
  textClassName: f,
384
- label: /* @__PURE__ */ G("span", {
384
+ label: /* @__PURE__ */ U("span", {
385
385
  className: d,
386
386
  children: t
387
387
  }),
@@ -389,9 +389,9 @@ var ve = (e, t) => {
389
389
  }) }, e))
390
390
  })
391
391
  });
392
- }, Pe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
393
- let [s, c] = U(t), [l, u] = U(n), [d, f] = U(r), p = H(o);
394
- B(() => {
392
+ }, Ie = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
393
+ let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
394
+ R(() => {
395
395
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
396
396
  }, [
397
397
  o,
@@ -408,7 +408,7 @@ var ve = (e, t) => {
408
408
  setResponseFormat: c,
409
409
  setSystemPrompt: u,
410
410
  setTemperature: f,
411
- handleSubmit: z(() => {
411
+ handleSubmit: L(() => {
412
412
  if (!m) return;
413
413
  let t = {};
414
414
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -422,17 +422,17 @@ var ve = (e, t) => {
422
422
  a
423
423
  ])
424
424
  };
425
- }, Fe = { label: "_label_14i7c_1" }, Ie = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: m = "System prompt", systemPromptTooltip: h = "Enter a prompt", temperatureLabel: g = "Temperature", temperatureLabels: _ = [
425
+ }, Le = { label: "_label_14i7c_1" }, Re = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: m = "System prompt", systemPromptTooltip: h = "Enter a prompt", temperatureLabel: g = "Temperature", temperatureLabels: _ = [
426
426
  "Precise",
427
427
  "Neutral",
428
428
  "Creative"
429
429
  ], temperatureHint: v, labelClassName: y = "!dial-small-semi-text", colors: b }) => {
430
- let x = a({ "--csf-label-text": b?.labelText }), S = o(y, Fe.label, "gap-1");
431
- return /* @__PURE__ */ K("div", {
430
+ let x = a({ "--csf-label-text": b?.labelText }), S = o(y, Le.label, "gap-1");
431
+ return /* @__PURE__ */ W("div", {
432
432
  className: "flex flex-col gap-4 px-6 pb-3",
433
433
  style: x,
434
434
  children: [
435
- e.responseFormat && /* @__PURE__ */ G(w, {
435
+ e.responseFormat && /* @__PURE__ */ U(w, {
436
436
  id: "response-format",
437
437
  labelProps: {
438
438
  label: u,
@@ -451,7 +451,7 @@ var ve = (e, t) => {
451
451
  }],
452
452
  onChange: (e) => s(e)
453
453
  }),
454
- e.systemPrompt && /* @__PURE__ */ G(j, {
454
+ e.systemPrompt && /* @__PURE__ */ U(te, {
455
455
  value: n,
456
456
  placeholder: h,
457
457
  resize: !0,
@@ -461,7 +461,7 @@ var ve = (e, t) => {
461
461
  },
462
462
  onChange: (e) => c(e ?? "")
463
463
  }),
464
- e.temperature && /* @__PURE__ */ G(k, {
464
+ e.temperature && /* @__PURE__ */ U(ee, {
465
465
  labelProps: {
466
466
  label: g,
467
467
  className: S,
@@ -477,8 +477,8 @@ var ve = (e, t) => {
477
477
  })
478
478
  ]
479
479
  });
480
- }, Le = ({ 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 }) => {
481
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: j, handleSubmit: ee } = Pe({
480
+ }, ze = ({ 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 }) => {
481
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: ee, setSystemPrompt: k, setTemperature: te, handleSubmit: ne } = Ie({
482
482
  isOpen: e,
483
483
  features: s,
484
484
  initialResponseFormat: c,
@@ -487,7 +487,7 @@ var ve = (e, t) => {
487
487
  onSave: d,
488
488
  onClose: r
489
489
  });
490
- return /* @__PURE__ */ K(q, {
490
+ return /* @__PURE__ */ W(G, {
491
491
  isOpen: e,
492
492
  title: f,
493
493
  closeLabel: i,
@@ -495,14 +495,14 @@ var ve = (e, t) => {
495
495
  onBack: t,
496
496
  backLabel: n,
497
497
  style: a,
498
- children: [/* @__PURE__ */ G(Ie, {
498
+ children: [/* @__PURE__ */ U(Re, {
499
499
  features: s,
500
500
  responseFormat: T,
501
501
  systemPrompt: E,
502
502
  temperature: D,
503
- onResponseFormatChange: k,
504
- onSystemPromptChange: A,
505
- onTemperatureChange: j,
503
+ onResponseFormatChange: ee,
504
+ onSystemPromptChange: k,
505
+ onTemperatureChange: te,
506
506
  responseFormatLabel: p,
507
507
  responseFormatHint: m,
508
508
  responseFormatMarkdownLabel: h,
@@ -512,23 +512,23 @@ var ve = (e, t) => {
512
512
  temperatureLabel: y,
513
513
  temperatureLabels: b,
514
514
  temperatureHint: x
515
- }), /* @__PURE__ */ G("div", {
515
+ }), /* @__PURE__ */ U("div", {
516
516
  className: o("px-6 py-4 mobile:pb-8"),
517
- children: /* @__PURE__ */ G(M, {
517
+ children: /* @__PURE__ */ U(A, {
518
518
  tooltip: w,
519
519
  hideTooltip: O || !w,
520
520
  triggerClassName: "w-full",
521
- children: /* @__PURE__ */ G(S, {
521
+ children: /* @__PURE__ */ U(S, {
522
522
  label: C,
523
- onClick: ee,
523
+ onClick: ne,
524
524
  disabled: !O,
525
525
  className: "w-full"
526
526
  })
527
527
  })
528
528
  })]
529
529
  });
530
- }, Re = { modal: "_modal_kl0h0_1" }, ze = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Re.modal }) => {
531
- let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Pe({
530
+ }, Be = { modal: "_modal_kl0h0_1" }, Ve = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Be.modal }) => {
531
+ let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: ee, handleSubmit: k } = Ie({
532
532
  features: e,
533
533
  initialResponseFormat: t,
534
534
  initialSystemPrompt: n,
@@ -536,33 +536,33 @@ var ve = (e, t) => {
536
536
  onSave: i,
537
537
  onClose: a
538
538
  });
539
- return /* @__PURE__ */ G(b, {
539
+ return /* @__PURE__ */ U(b, {
540
540
  open: !0,
541
541
  header: o,
542
542
  titleClassName: s,
543
543
  size: x.Sm,
544
544
  onClose: a,
545
545
  className: y,
546
- footer: /* @__PURE__ */ G("div", {
546
+ footer: /* @__PURE__ */ U("div", {
547
547
  className: "flex justify-end px-6 py-4",
548
- children: /* @__PURE__ */ G(M, {
548
+ children: /* @__PURE__ */ U(A, {
549
549
  tooltip: v,
550
550
  hideTooltip: E || !v,
551
- children: /* @__PURE__ */ G(S, {
551
+ children: /* @__PURE__ */ U(S, {
552
552
  label: _,
553
- onClick: A,
553
+ onClick: k,
554
554
  disabled: !E
555
555
  })
556
556
  })
557
557
  }),
558
- children: /* @__PURE__ */ G(Ie, {
558
+ children: /* @__PURE__ */ U(Re, {
559
559
  features: e,
560
560
  responseFormat: C,
561
561
  systemPrompt: w,
562
562
  temperature: T,
563
563
  onResponseFormatChange: D,
564
564
  onSystemPromptChange: O,
565
- onTemperatureChange: k,
565
+ onTemperatureChange: ee,
566
566
  responseFormatLabel: c,
567
567
  responseFormatHint: l,
568
568
  responseFormatMarkdownLabel: u,
@@ -575,11 +575,11 @@ var ve = (e, t) => {
575
575
  })
576
576
  });
577
577
  };
578
- de(ze);
579
- var Be = {
578
+ I(Ve);
579
+ var He = {
580
580
  icon: "_icon_1fv6z_1",
581
581
  selectedIcon: "_selectedIcon_1fv6z_5"
582
- }, Ve = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: p, itemLabelClassName: m = "dial-small-text", colors: h }) => /* @__PURE__ */ G(q, {
582
+ }, Ue = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: p, itemLabelClassName: m = "dial-small-text", colors: h }) => /* @__PURE__ */ U(G, {
583
583
  isOpen: e,
584
584
  title: u,
585
585
  closeLabel: i,
@@ -587,33 +587,33 @@ var Be = {
587
587
  onBack: t,
588
588
  backLabel: n,
589
589
  style: s,
590
- children: /* @__PURE__ */ G("ul", {
590
+ children: /* @__PURE__ */ U("ul", {
591
591
  role: "menu",
592
592
  className: "flex flex-col pb-4",
593
593
  style: a({
594
594
  "--tbs-icon-text": h?.iconText,
595
595
  "--tbs-selected-icon-text": h?.selectedIconText
596
596
  }),
597
- children: d.map((e) => /* @__PURE__ */ G("li", {
597
+ children: d.map((e) => /* @__PURE__ */ U("li", {
598
598
  role: "none",
599
- children: /* @__PURE__ */ G(l, {
599
+ children: /* @__PURE__ */ U(l, {
600
600
  type: "button",
601
601
  role: "menuitemcheckbox",
602
602
  "aria-checked": e.isSelected,
603
603
  className: "w-full gap-3 px-4 py-[10px] text-start",
604
- iconBefore: /* @__PURE__ */ G("span", {
605
- className: o("flex items-center", Be.icon),
604
+ iconBefore: /* @__PURE__ */ U("span", {
605
+ className: o("flex items-center", He.icon),
606
606
  children: e.icon
607
607
  }),
608
- iconAfter: e.isSelected ? /* @__PURE__ */ G("span", {
609
- className: o("ms-auto", Be.selectedIcon),
610
- children: /* @__PURE__ */ G(N, {
608
+ iconAfter: e.isSelected ? /* @__PURE__ */ U("span", {
609
+ className: o("ms-auto", He.selectedIcon),
610
+ children: /* @__PURE__ */ U(ie, {
611
611
  size: c,
612
612
  "aria-hidden": !0,
613
613
  stroke: f
614
614
  })
615
615
  }) : null,
616
- label: /* @__PURE__ */ G("span", {
616
+ label: /* @__PURE__ */ U("span", {
617
617
  className: m,
618
618
  children: e.label
619
619
  }),
@@ -621,12 +621,12 @@ var Be = {
621
621
  })
622
622
  }, e.id))
623
623
  })
624
- }), J = {
624
+ }), We = {
625
625
  selectedToolIcon: "_selectedToolIcon_r268y_1",
626
626
  toolIcon: "_toolIcon_r268y_5",
627
627
  chevronIcon: "_chevronIcon_r268y_9"
628
- }, He = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: p = "w-[240px]", isDisabled: g = !1, chatSettings: v, extraMenuItems: y, toolsMenuItems: b = [], onToolToggle: x, toolsMenuTitle: S = "Tools", toolsBackLabel: C = "Back", promptsMenuOverlay: w, promptsMenuTitle: T = "Prompts", promptsBackLabel: E = "Back", colors: D }) => {
629
- let O = s(), [k, A] = U(!1), [j, M] = U(!1), [ee, te] = U(!1), [ne, re] = U(!1), [ie, F] = U(!1), I = V(() => a({
628
+ }, Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: p = "w-[240px]", isDisabled: g = !1, chatSettings: v, extraMenuItems: y, toolsMenuItems: b = [], onToolToggle: x, toolsMenuTitle: S = "Tools", toolsBackLabel: C = "Back", promptsMenuOverlay: w, promptsMenuTitle: T = "Prompts", promptsBackLabel: E = "Back", colors: D }) => {
629
+ let O = s(), [ee, k] = V(!1), [te, A] = V(!1), [ne, re] = V(!1), [ae, se] = V(!1), [ce, M] = V(!1), N = z(() => a({
630
630
  "--aab-selected-tool-icon": D?.selectedToolIcon,
631
631
  "--aab-tool-icon": D?.toolIcon,
632
632
  "--aab-chevron-icon": D?.chevronIcon
@@ -634,36 +634,36 @@ var Be = {
634
634
  D?.selectedToolIcon,
635
635
  D?.toolIcon,
636
636
  D?.chevronIcon
637
- ]), L = b.length > 0 && x != null, ue = V(() => b.map((e) => ({
637
+ ]), P = b.length > 0 && x != null, pe = z(() => b.map((e) => ({
638
638
  key: e.id,
639
- label: /* @__PURE__ */ K("span", {
639
+ label: /* @__PURE__ */ W("span", {
640
640
  className: "flex flex-1 items-center gap-2",
641
- children: [/* @__PURE__ */ G("span", {
641
+ children: [/* @__PURE__ */ U("span", {
642
642
  className: "flex-1",
643
643
  children: e.label
644
- }), e.isSelected && /* @__PURE__ */ G(N, {
644
+ }), e.isSelected && /* @__PURE__ */ U(ie, {
645
645
  size: c,
646
- style: I,
647
- className: J.selectedToolIcon,
646
+ style: N,
647
+ className: We.selectedToolIcon,
648
648
  "aria-hidden": !0,
649
649
  stroke: f
650
650
  })]
651
651
  }),
652
- icon: /* @__PURE__ */ G("span", {
653
- style: I,
654
- className: o("flex items-center", J.toolIcon),
652
+ icon: /* @__PURE__ */ U("span", {
653
+ style: N,
654
+ className: o("flex items-center", We.toolIcon),
655
655
  children: e.icon
656
656
  }),
657
657
  onClick: () => x?.(e.id)
658
658
  })), [
659
659
  b,
660
660
  x,
661
- I
662
- ]), R = V(() => [
661
+ N
662
+ ]), F = z(() => [
663
663
  ...e == null ? [] : [{
664
664
  key: "attach",
665
665
  label: t,
666
- icon: /* @__PURE__ */ G(ae, {
666
+ icon: /* @__PURE__ */ U(j, {
667
667
  size: c,
668
668
  "aria-hidden": !0,
669
669
  stroke: f
@@ -671,66 +671,66 @@ var Be = {
671
671
  onClick: e
672
672
  }],
673
673
  ...y ?? [],
674
- ...L ? [{
674
+ ...P ? [{
675
675
  key: "tools",
676
676
  label: S,
677
- icon: /* @__PURE__ */ G(le, {
677
+ icon: /* @__PURE__ */ U(fe, {
678
678
  size: c,
679
679
  "aria-hidden": !0,
680
680
  stroke: f
681
681
  }),
682
682
  onClick: O ? () => {
683
- te(!0), A(!1);
683
+ re(!0), k(!1);
684
684
  } : () => void 0,
685
- ...O ? { iconAfter: /* @__PURE__ */ G(P, {
685
+ ...O ? { iconAfter: /* @__PURE__ */ U(oe, {
686
686
  size: c,
687
687
  stroke: f,
688
- style: I,
689
- className: o("rtl:scale-x-[-1]", J.chevronIcon),
688
+ style: N,
689
+ className: o("rtl:scale-x-[-1]", We.chevronIcon),
690
690
  "aria-hidden": !0
691
- }) } : { children: ue }
691
+ }) } : { children: pe }
692
692
  }] : [],
693
693
  ...w == null ? [] : [{
694
694
  key: "prompts",
695
695
  label: T,
696
- icon: /* @__PURE__ */ G(se, {
696
+ icon: /* @__PURE__ */ U(ue, {
697
697
  size: c,
698
698
  "aria-hidden": !0,
699
699
  stroke: f
700
700
  }),
701
701
  onClick: O ? () => {
702
- re(!0), A(!1);
702
+ se(!0), k(!1);
703
703
  } : () => void 0,
704
- ...O ? { iconAfter: /* @__PURE__ */ G(P, {
704
+ ...O ? { iconAfter: /* @__PURE__ */ U(oe, {
705
705
  size: c,
706
706
  stroke: f,
707
- style: I,
708
- className: o("rtl:scale-x-[-1]", J.chevronIcon),
707
+ style: N,
708
+ className: o("rtl:scale-x-[-1]", We.chevronIcon),
709
709
  "aria-hidden": !0
710
710
  }) } : {
711
711
  children: [{
712
712
  key: "prompts-panel",
713
713
  label: ""
714
714
  }],
715
- renderSubMenu: () => w(() => F(!1))
715
+ renderSubMenu: () => w(() => M(!1))
716
716
  }
717
717
  }],
718
718
  ...v == null ? [] : [{
719
719
  key: "chat-settings",
720
720
  label: v.menuItemLabel ?? "Chat settings",
721
- icon: /* @__PURE__ */ G(ce, {
721
+ icon: /* @__PURE__ */ U(de, {
722
722
  size: c,
723
723
  "aria-hidden": !0,
724
724
  stroke: f
725
725
  }),
726
- iconAfter: O ? /* @__PURE__ */ G(P, {
726
+ iconAfter: O ? /* @__PURE__ */ U(oe, {
727
727
  size: c,
728
728
  stroke: f,
729
- style: I,
730
- className: o("rtl:scale-x-[-1]", J.chevronIcon),
729
+ style: N,
730
+ className: o("rtl:scale-x-[-1]", We.chevronIcon),
731
731
  "aria-hidden": !0
732
732
  }) : null,
733
- onClick: () => M(!0)
733
+ onClick: () => A(!0)
734
734
  }]
735
735
  ], [
736
736
  t,
@@ -738,23 +738,23 @@ var Be = {
738
738
  v,
739
739
  y,
740
740
  O,
741
- L,
741
+ P,
742
742
  S,
743
- ue,
743
+ pe,
744
744
  w,
745
745
  T,
746
- I
746
+ N
747
747
  ]);
748
- if (R.length === 0) return null;
749
- let de = /* @__PURE__ */ G(m, {
748
+ if (F.length === 0) return null;
749
+ let I = /* @__PURE__ */ U(m, {
750
750
  matchReferenceWidth: !1,
751
751
  placement: "bottom-start",
752
752
  listClassName: p,
753
- items: R,
754
- open: w == null ? void 0 : ie,
755
- onOpenChange: w == null ? void 0 : F,
756
- children: /* @__PURE__ */ G(_, {
757
- icon: /* @__PURE__ */ G(oe, {
753
+ items: F,
754
+ open: w == null ? void 0 : ce,
755
+ onOpenChange: w == null ? void 0 : M,
756
+ children: /* @__PURE__ */ U(_, {
757
+ icon: /* @__PURE__ */ U(le, {
758
758
  size: d.LG,
759
759
  "aria-hidden": !0,
760
760
  stroke: f
@@ -764,9 +764,9 @@ var Be = {
764
764
  disabled: g
765
765
  })
766
766
  });
767
- return /* @__PURE__ */ G(W, { children: O ? /* @__PURE__ */ K(W, { children: [
768
- /* @__PURE__ */ G(_, {
769
- icon: /* @__PURE__ */ G(oe, {
767
+ return /* @__PURE__ */ U(H, { children: O ? /* @__PURE__ */ W(H, { children: [
768
+ /* @__PURE__ */ U(_, {
769
+ icon: /* @__PURE__ */ U(le, {
770
770
  size: d.LG,
771
771
  "aria-hidden": !0,
772
772
  stroke: f
@@ -775,50 +775,50 @@ var Be = {
775
775
  size: h.Large,
776
776
  tooltipProps: { tooltip: n },
777
777
  disabled: g,
778
- onClick: () => A(!0)
778
+ onClick: () => k(!0)
779
779
  }),
780
- /* @__PURE__ */ G(Ne, {
781
- isOpen: k,
780
+ /* @__PURE__ */ U(Fe, {
781
+ isOpen: ee,
782
782
  title: r,
783
783
  closeLabel: l,
784
- onClose: () => A(!1),
784
+ onClose: () => k(!1),
785
785
  style: u,
786
- items: R,
786
+ items: F,
787
787
  className: "pb-4",
788
788
  btnTextClassName: "flex-1"
789
789
  }),
790
- L && /* @__PURE__ */ G(Ve, {
791
- isOpen: ee,
790
+ P && /* @__PURE__ */ U(Ue, {
791
+ isOpen: ne,
792
792
  onBack: () => {
793
- te(!1), A(!0);
793
+ re(!1), k(!0);
794
794
  },
795
795
  backLabel: C,
796
- onClose: () => te(!1),
796
+ onClose: () => re(!1),
797
797
  closeLabel: l,
798
798
  style: u,
799
799
  title: S,
800
800
  items: b,
801
801
  onToolToggle: x
802
802
  }),
803
- w != null && /* @__PURE__ */ G(q, {
804
- isOpen: ne,
803
+ w != null && /* @__PURE__ */ U(G, {
804
+ isOpen: ae,
805
805
  title: T,
806
806
  closeLabel: l,
807
807
  onBack: () => {
808
- re(!1), A(!0);
808
+ se(!1), k(!0);
809
809
  },
810
810
  backLabel: E,
811
- onClose: () => re(!1),
811
+ onClose: () => se(!1),
812
812
  style: u,
813
- children: w(() => re(!1))
813
+ children: w(() => se(!1))
814
814
  }),
815
- v != null && /* @__PURE__ */ G(Le, {
816
- isOpen: j,
815
+ v != null && /* @__PURE__ */ U(ze, {
816
+ isOpen: te,
817
817
  onBack: () => {
818
- M(!1), A(!0);
818
+ A(!1), k(!0);
819
819
  },
820
820
  backLabel: v.backLabel ?? "Back",
821
- onClose: () => M(!1),
821
+ onClose: () => A(!1),
822
822
  closeLabel: l,
823
823
  style: u,
824
824
  features: v.features,
@@ -839,13 +839,13 @@ var Be = {
839
839
  saveLabel: v.saveLabel,
840
840
  saveDisabledTooltip: v.saveDisabledTooltip
841
841
  })
842
- ] }) : /* @__PURE__ */ K(W, { children: [de, v != null && j && /* @__PURE__ */ G(ze, {
842
+ ] }) : /* @__PURE__ */ W(H, { children: [I, v != null && te && /* @__PURE__ */ U(Ve, {
843
843
  features: v.features,
844
844
  initialResponseFormat: v.responseFormat ?? i.Markdown,
845
845
  initialSystemPrompt: v.systemPrompt,
846
846
  initialTemperature: v.temperature,
847
847
  onSave: v.onSave,
848
- onClose: () => M(!1),
848
+ onClose: () => A(!1),
849
849
  title: v.title,
850
850
  responseFormatLabel: v.responseFormatLabel,
851
851
  responseFormatHint: v.responseFormatHint,
@@ -859,13 +859,13 @@ var Be = {
859
859
  saveLabel: v.saveLabel,
860
860
  saveDisabledTooltip: v.saveDisabledTooltip
861
861
  })] }) });
862
- }, Ue = {
862
+ }, K = {
863
863
  chip: "_chip_ydmd8_1",
864
864
  chipSelected: "_chipSelected_ydmd8_9",
865
865
  chipIcon: "_chipIcon_ydmd8_16",
866
866
  chipText: "_chipText_ydmd8_19",
867
867
  chipClose: "_chipClose_ydmd8_22"
868
- }, We = (e) => `Remove ${e}`, Ge = ({ items: e, onToolToggle: t, onToolDismiss: n, removeLabel: r = We, typography: i, colors: s }) => e.length === 0 ? null : /* @__PURE__ */ G("div", {
868
+ }, Ke = (e) => `Remove ${e}`, qe = ({ items: e, onToolToggle: t, onToolDismiss: n, removeLabel: r = Ke, typography: i, colors: s }) => e.length === 0 ? null : /* @__PURE__ */ U("div", {
869
869
  className: "flex flex-wrap items-center gap-2",
870
870
  style: a({
871
871
  "--ci-chip-bg": s?.chipBg,
@@ -880,68 +880,68 @@ var Be = {
880
880
  "--ci-chip-close": s?.chipClose,
881
881
  "--ci-chip-close-hover": s?.chipCloseHover
882
882
  }),
883
- children: e.map((e) => /* @__PURE__ */ K("div", {
884
- className: o(Ue.chip, e.isSelected && Ue.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 pe-1 ps-2 transition-colors"),
885
- children: [/* @__PURE__ */ K("button", {
883
+ children: e.map((e) => /* @__PURE__ */ W("div", {
884
+ className: o(K.chip, e.isSelected && K.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 pe-1 ps-2 transition-colors"),
885
+ children: [/* @__PURE__ */ W("button", {
886
886
  type: "button",
887
887
  onClick: () => t(e.id),
888
888
  "aria-pressed": e.isSelected,
889
889
  className: "flex min-w-0 items-center gap-1.5",
890
- children: [/* @__PURE__ */ G("span", {
891
- className: o(Ue.chipIcon, "shrink-0"),
890
+ children: [/* @__PURE__ */ U("span", {
891
+ className: o(K.chipIcon, "shrink-0"),
892
892
  "aria-hidden": !0,
893
893
  children: e.icon
894
- }), /* @__PURE__ */ G("span", {
895
- className: o(Ue.chipText, i?.fontClassName || "dial-small-paragraph-text", "truncate"),
894
+ }), /* @__PURE__ */ U("span", {
895
+ className: o(K.chipText, i?.fontClassName || "dial-small-paragraph-text", "truncate"),
896
896
  children: e.label
897
897
  })]
898
- }), /* @__PURE__ */ G("button", {
898
+ }), /* @__PURE__ */ U("button", {
899
899
  type: "button",
900
900
  onClick: () => n(e.id),
901
901
  "aria-label": r(e.label),
902
- className: o(Ue.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
903
- children: /* @__PURE__ */ G(L, {
902
+ className: o(K.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
903
+ children: /* @__PURE__ */ U(P, {
904
904
  size: 12,
905
905
  "aria-hidden": !0,
906
906
  stroke: f
907
907
  })
908
908
  })]
909
909
  }, e.id))
910
- }), Y = {
910
+ }), q = {
911
911
  wrapper: "_wrapper_10e5r_1",
912
912
  wrapperDisabled: "_wrapperDisabled_10e5r_8",
913
913
  textarea: "_textarea_10e5r_13",
914
914
  modelSelectorButton: "_modelSelectorButton_10e5r_24",
915
915
  modelSelectorCaret: "_modelSelectorCaret_10e5r_24",
916
916
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_10e5r_33"
917
- }, Ke = {
917
+ }, Je = {
918
918
  wrapperError: "_wrapperError_129ri_1",
919
919
  waveformCanvas: "_waveformCanvas_129ri_5",
920
920
  recordingDot: "_recordingDot_129ri_19",
921
921
  "recording-pulse": "_recording-pulse_129ri_1"
922
- }, qe = 3, Je = 4, X = 200, Ye = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
923
- let u = H(null), p = H(new Float32Array(X)), m = H(0), h = H(0), v = e === De.Recording, y = e === De.Error, b = z((e) => {
922
+ }, Ye = 3, Xe = 4, J = 200, Ze = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
923
+ let u = B(null), p = B(new Float32Array(J)), m = B(0), h = B(0), v = e === ke.Recording, y = e === ke.Error, b = L((e) => {
924
924
  let t = e.getContext("2d");
925
925
  if (!t) return;
926
926
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
927
927
  let { width: n, height: r } = e;
928
928
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
929
- let i = Math.min(Math.max(1, Math.floor(n / Je)), X - 1), a = m.current, o = h.current;
929
+ let i = Math.min(Math.max(1, Math.floor(n / Xe)), J - 1), a = m.current, o = h.current;
930
930
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
931
931
  for (let e = 0; e <= i; e++) {
932
- let n = ((a - i + e) % X + X) % X, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
933
- t.fillRect(e * Je, (r - c) / 2, qe, c);
932
+ let n = ((a - i + e) % J + J) % J, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
933
+ t.fillRect(e * Xe, (r - c) / 2, Ye, c);
934
934
  }
935
935
  t.restore();
936
936
  }, []);
937
- B(() => {
937
+ R(() => {
938
938
  if (!v) return;
939
939
  let e = u.current;
940
940
  if (!e) return;
941
941
  p.current.fill(0), m.current = 0, h.current = 0;
942
942
  let n, r = () => {
943
- if (h.current += 1, h.current >= Je) {
944
- h.current -= Je;
943
+ if (h.current += 1, h.current >= Xe) {
944
+ h.current -= Xe;
945
945
  let e = t.current;
946
946
  if (e) {
947
947
  let t = new Uint8Array(e.frequencyBinCount);
@@ -951,7 +951,7 @@ var Be = {
951
951
  let r = (t[e] - 128) / 128;
952
952
  n += r * r;
953
953
  }
954
- p.current[m.current % X] = Math.sqrt(n / t.length), m.current++;
954
+ p.current[m.current % J] = Math.sqrt(n / t.length), m.current++;
955
955
  }
956
956
  }
957
957
  b(e), n = requestAnimationFrame(r);
@@ -963,7 +963,7 @@ var Be = {
963
963
  v,
964
964
  t,
965
965
  b
966
- ]), B(() => {
966
+ ]), R(() => {
967
967
  let e = u.current;
968
968
  if (!e) return;
969
969
  let t = new ResizeObserver(() => {
@@ -971,18 +971,18 @@ var Be = {
971
971
  });
972
972
  return t.observe(e), () => t.disconnect();
973
973
  }, [b]);
974
- let x = /* @__PURE__ */ K("div", {
974
+ let x = /* @__PURE__ */ W("div", {
975
975
  className: "flex flex-shrink-0 items-center justify-end gap-1",
976
- children: [/* @__PURE__ */ G(_, {
977
- icon: /* @__PURE__ */ G(L, {
976
+ children: [/* @__PURE__ */ U(_, {
977
+ icon: /* @__PURE__ */ U(P, {
978
978
  size: d.LG,
979
979
  "aria-hidden": !0,
980
980
  stroke: f
981
981
  }),
982
982
  "aria-label": s,
983
983
  onClick: i
984
- }), v && /* @__PURE__ */ G(C, {
985
- icon: /* @__PURE__ */ G(F, {
984
+ }), v && /* @__PURE__ */ U(C, {
985
+ icon: /* @__PURE__ */ U(M, {
986
986
  size: d.LG,
987
987
  "aria-hidden": !0
988
988
  }),
@@ -990,82 +990,82 @@ var Be = {
990
990
  "aria-label": a
991
991
  })]
992
992
  });
993
- return /* @__PURE__ */ K("div", {
993
+ return /* @__PURE__ */ W("div", {
994
994
  className: l,
995
- children: [/* @__PURE__ */ K("div", {
995
+ children: [/* @__PURE__ */ W("div", {
996
996
  style: c,
997
- 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 && Ke.wrapperError),
998
- children: [/* @__PURE__ */ K("div", {
997
+ className: o(q.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 && Je.wrapperError),
998
+ children: [/* @__PURE__ */ W("div", {
999
999
  className: "flex min-w-0 flex-1 items-center gap-3",
1000
- children: [v && /* @__PURE__ */ G("span", {
1001
- className: o(Ke.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1000
+ children: [v && /* @__PURE__ */ U("span", {
1001
+ className: o(Je.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1002
1002
  "aria-hidden": !0
1003
- }), /* @__PURE__ */ G("canvas", {
1003
+ }), /* @__PURE__ */ U("canvas", {
1004
1004
  ref: u,
1005
1005
  height: 32,
1006
- className: o(Ke.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1006
+ className: o(Je.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1007
1007
  })]
1008
1008
  }), x]
1009
- }), y && n && /* @__PURE__ */ G(g, {
1009
+ }), y && n && /* @__PURE__ */ U(g, {
1010
1010
  text: n,
1011
1011
  className: "mt-1 px-1"
1012
1012
  })]
1013
1013
  });
1014
- }, Xe = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ G(C, {
1014
+ }, Qe = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ U(C, {
1015
1015
  "aria-label": n,
1016
1016
  onClick: () => e?.(),
1017
1017
  disabled: t,
1018
1018
  "aria-hidden": r,
1019
- icon: /* @__PURE__ */ G(te, {
1019
+ icon: /* @__PURE__ */ U(re, {
1020
1020
  size: d.LG,
1021
1021
  className: "rtl:scale-x-[-1]",
1022
1022
  stroke: f
1023
1023
  })
1024
- }), Ze = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ G(A, {
1025
- icon: /* @__PURE__ */ G(I, {
1024
+ }), $e = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ U(k, {
1025
+ icon: /* @__PURE__ */ U(N, {
1026
1026
  size: d.LG,
1027
1027
  stroke: f
1028
1028
  }),
1029
1029
  onClick: () => e?.(),
1030
1030
  "aria-label": t
1031
- }), Qe = ({ size: e = 20 }) => /* @__PURE__ */ G(D, {
1031
+ }), et = ({ size: e = 20 }) => /* @__PURE__ */ U(D, {
1032
1032
  variant: O.Circular,
1033
1033
  width: e,
1034
1034
  height: e,
1035
1035
  active: !0
1036
- }), $e = ({ loadingLabel: e }) => /* @__PURE__ */ K("span", {
1036
+ }), tt = ({ loadingLabel: e }) => /* @__PURE__ */ W("span", {
1037
1037
  className: "flex min-w-0 flex-1 items-center",
1038
- children: [/* @__PURE__ */ G(D, {
1038
+ children: [/* @__PURE__ */ U(D, {
1039
1039
  variant: O.Text,
1040
1040
  width: "100%",
1041
1041
  height: 16,
1042
1042
  active: !0
1043
- }), e && /* @__PURE__ */ G("span", {
1043
+ }), e && /* @__PURE__ */ U("span", {
1044
1044
  className: "sr-only",
1045
1045
  children: e
1046
1046
  })]
1047
- }), et = ({ loadingLabel: e }) => /* @__PURE__ */ G("div", {
1047
+ }), nt = ({ loadingLabel: e }) => /* @__PURE__ */ U("div", {
1048
1048
  role: "status",
1049
1049
  "aria-label": e,
1050
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ K("div", {
1050
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ W("div", {
1051
1051
  className: "flex h-11 items-center gap-3 px-4",
1052
1052
  "aria-hidden": "true",
1053
- children: [/* @__PURE__ */ G(Qe, {}), /* @__PURE__ */ G($e, {})]
1053
+ children: [/* @__PURE__ */ U(et, {}), /* @__PURE__ */ U(tt, {})]
1054
1054
  }, t))
1055
- }), Z = (e) => e.displayName ?? e.id, tt = (e, t) => {
1055
+ }), Y = (e) => e.displayName ?? e.id, X = (e, t) => {
1056
1056
  let n = t.trim().toLowerCase();
1057
- return n ? e.filter((e) => Z(e).toLowerCase().includes(n)) : e;
1058
- }, Q = (e, t, r, i = 18, a) => /* @__PURE__ */ G(n, {
1057
+ return n ? e.filter((e) => Y(e).toLowerCase().includes(n)) : e;
1058
+ }, rt = (e, t, r, i = 18, a) => /* @__PURE__ */ U(n, {
1059
1059
  src: e,
1060
1060
  size: i,
1061
1061
  labels: { tooltip: a },
1062
1062
  initialsName: r
1063
- }), nt = {
1063
+ }), Z = {
1064
1064
  searchHeader: "_searchHeader_1tt5t_1",
1065
1065
  selectedItem: "_selectedItem_1tt5t_5",
1066
1066
  selectedItemCheck: "_selectedItemCheck_1tt5t_9"
1067
- }, rt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = nt.searchHeader, selectedItemClassName: s = nt.selectedItem, selectedItemCheckClassName: c = nt.selectedItemCheck, colors: l }) => {
1068
- let [u, p] = U(""), m = V(() => e?.find((e) => e.id === t), [e, t]), g = r?.loading !== void 0, _ = !g && !m && !!t, y = V(() => g ? /* @__PURE__ */ G(Qe, { size: d.LG }) : Q(m?.iconUrl, m?.type, m?.displayName ?? m?.id ?? "", d.LG, _ ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1067
+ }, it = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = Z.searchHeader, selectedItemClassName: s = Z.selectedItem, selectedItemCheckClassName: c = Z.selectedItemCheck, colors: l }) => {
1068
+ let [u, p] = V(""), m = z(() => e?.find((e) => e.id === t), [e, t]), g = r?.loading !== void 0, _ = !g && !m && !!t, y = z(() => g ? /* @__PURE__ */ U(et, { size: d.LG }) : rt(m?.iconUrl, m?.type, m?.displayName ?? m?.id ?? "", d.LG, _ ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1069
1069
  g,
1070
1070
  m,
1071
1071
  _,
@@ -1075,11 +1075,11 @@ var Be = {
1075
1075
  selectorIcon: y,
1076
1076
  selectorAriaLabel: b ? `${r?.ariaLabel ?? "Select model"}: ${b}` : r?.ariaLabel ?? "Select model",
1077
1077
  selectedLabel: b,
1078
- menuItems: V(() => {
1078
+ menuItems: z(() => {
1079
1079
  if (g) return Array.from({ length: 7 }, (e, t) => ({
1080
1080
  key: `__loading-${t}`,
1081
- icon: /* @__PURE__ */ G(Qe, {}),
1082
- label: /* @__PURE__ */ G($e, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1081
+ icon: /* @__PURE__ */ U(et, {}),
1082
+ label: /* @__PURE__ */ U(tt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1083
1083
  disabled: !0
1084
1084
  }));
1085
1085
  if (!e || e.length === 0) {
@@ -1090,25 +1090,25 @@ var Be = {
1090
1090
  disabled: !0
1091
1091
  }] : [];
1092
1092
  }
1093
- return tt(e, u).map((e) => {
1093
+ return X(e, u).map((e) => {
1094
1094
  let r = e.id === t;
1095
1095
  return {
1096
1096
  key: e.id,
1097
- label: /* @__PURE__ */ K("span", {
1097
+ label: /* @__PURE__ */ W("span", {
1098
1098
  className: "flex w-full items-center justify-between gap-2",
1099
1099
  style: a({ "--ms-selected-item-check": l?.selectedItemCheck }),
1100
- children: [/* @__PURE__ */ G(v, {
1101
- text: Z(e),
1100
+ children: [/* @__PURE__ */ U(v, {
1101
+ text: Y(e),
1102
1102
  query: u,
1103
1103
  maxLines: 1
1104
- }), r && /* @__PURE__ */ G(N, {
1104
+ }), r && /* @__PURE__ */ U(ie, {
1105
1105
  size: d.SM,
1106
1106
  stroke: f,
1107
1107
  className: c,
1108
1108
  "aria-hidden": !0
1109
1109
  })]
1110
1110
  }),
1111
- icon: Q(e.iconUrl, e.type, e.displayName ?? e.id),
1111
+ icon: rt(e.iconUrl, e.type, e.displayName ?? e.id),
1112
1112
  onClick: () => n?.(e.id),
1113
1113
  className: r ? s : void 0
1114
1114
  };
@@ -1124,10 +1124,10 @@ var Be = {
1124
1124
  c,
1125
1125
  l?.selectedItemCheck
1126
1126
  ]),
1127
- menuHeader: V(() => !g && e && e.length > 0 ? /* @__PURE__ */ G("div", {
1127
+ menuHeader: z(() => !g && e && e.length > 0 ? /* @__PURE__ */ U("div", {
1128
1128
  style: a({ "--ms-search-header-bg": l?.searchHeaderBackground }),
1129
1129
  className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
1130
- children: /* @__PURE__ */ G(E, {
1130
+ children: /* @__PURE__ */ U(E, {
1131
1131
  value: u,
1132
1132
  placeholder: r?.searchPlaceholder ?? "Search",
1133
1133
  size: h.Small,
@@ -1146,7 +1146,7 @@ var Be = {
1146
1146
  e || p("");
1147
1147
  }
1148
1148
  };
1149
- }, it = typeof window < "u" ? pe : B;
1149
+ }, Q = typeof window < "u" ? he : R;
1150
1150
  function at(e) {
1151
1151
  if (e !== void 0) switch (typeof e) {
1152
1152
  case "number": return e;
@@ -1156,14 +1156,14 @@ function at(e) {
1156
1156
  }
1157
1157
  }
1158
1158
  function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1159
- let { styleHeight: s, styleWidth: c } = V(() => ({
1159
+ let { styleHeight: s, styleWidth: c } = z(() => ({
1160
1160
  styleHeight: at(o?.height),
1161
1161
  styleWidth: at(o?.width)
1162
- }), [o?.height, o?.width]), [l, u] = U({
1162
+ }), [o?.height, o?.width]), [l, u] = V({
1163
1163
  height: t,
1164
1164
  width: n
1165
1165
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1166
- return it(() => {
1166
+ return Q(() => {
1167
1167
  if (i === null || d) return;
1168
1168
  let t = new ResizeObserver((e) => {
1169
1169
  for (let t of e) {
@@ -1183,7 +1183,7 @@ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1183
1183
  i,
1184
1184
  s,
1185
1185
  c
1186
- ]), V(() => ({
1186
+ ]), z(() => ({
1187
1187
  height: s ?? l.height,
1188
1188
  width: c ?? l.width
1189
1189
  }), [
@@ -1193,12 +1193,12 @@ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1193
1193
  ]);
1194
1194
  }
1195
1195
  function st(e) {
1196
- let t = H(() => {
1196
+ let t = B(() => {
1197
1197
  throw Error("Cannot call during render.");
1198
1198
  });
1199
- return it(() => {
1199
+ return Q(() => {
1200
1200
  t.current = e;
1201
- }, [e]), z((e) => t.current?.(e), [t]);
1201
+ }, [e]), L((e) => t.current?.(e), [t]);
1202
1202
  }
1203
1203
  var ct = null;
1204
1204
  function lt(e = !1) {
@@ -1310,7 +1310,7 @@ function ht({ itemCount: e, itemProps: t, itemSize: n }) {
1310
1310
  };
1311
1311
  }
1312
1312
  function gt({ itemCount: e, itemProps: t, itemSize: n }) {
1313
- return V(() => ht({
1313
+ return z(() => ht({
1314
1314
  itemCount: e,
1315
1315
  itemProps: t,
1316
1316
  itemSize: n
@@ -1339,14 +1339,14 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1339
1339
  element: e,
1340
1340
  mode: r === "vertical" ? "only-height" : "only-width",
1341
1341
  style: t
1342
- }), f = H({
1342
+ }), f = B({
1343
1343
  height: 0,
1344
1344
  width: 0
1345
1345
  }), p = r === "vertical" ? u : d, m = _t({
1346
1346
  containerSize: p,
1347
1347
  itemSize: s
1348
1348
  });
1349
- pe(() => {
1349
+ he(() => {
1350
1350
  if (typeof c == "function") {
1351
1351
  let e = f.current;
1352
1352
  (e.height !== u || e.width !== d) && (c({
@@ -1363,7 +1363,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1363
1363
  itemCount: a,
1364
1364
  itemProps: o,
1365
1365
  itemSize: m
1366
- }), g = z((e) => h.get(e), [h]), [_, v] = U(() => mt({
1366
+ }), g = L((e) => h.get(e), [h]), [_, v] = V(() => mt({
1367
1367
  cachedBounds: h,
1368
1368
  containerScrollOffset: 0,
1369
1369
  containerSize: p,
@@ -1374,7 +1374,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1374
1374
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1375
1375
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1376
1376
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1377
- }, C = z(() => ft({
1377
+ }, C = L(() => ft({
1378
1378
  cachedBounds: h,
1379
1379
  itemCount: a,
1380
1380
  itemSize: m
@@ -1382,7 +1382,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1382
1382
  h,
1383
1383
  a,
1384
1384
  m
1385
- ]), w = z((t) => mt({
1385
+ ]), w = L((t) => mt({
1386
1386
  cachedBounds: h,
1387
1387
  containerScrollOffset: ut({
1388
1388
  containerElement: e,
@@ -1402,13 +1402,13 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1402
1402
  a,
1403
1403
  l
1404
1404
  ]);
1405
- return it(() => {
1405
+ return Q(() => {
1406
1406
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1407
1407
  }, [
1408
1408
  e,
1409
1409
  r,
1410
1410
  w
1411
- ]), it(() => {
1411
+ ]), Q(() => {
1412
1412
  if (!e) return;
1413
1413
  let t = () => {
1414
1414
  v((t) => {
@@ -1470,7 +1470,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1470
1470
  };
1471
1471
  }
1472
1472
  function yt(e) {
1473
- return V(() => e, Object.values(e));
1473
+ return z(() => e, Object.values(e));
1474
1474
  }
1475
1475
  function bt(e, t) {
1476
1476
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
@@ -1481,18 +1481,18 @@ function xt(e) {
1481
1481
  }
1482
1482
  var St = "data-react-window-index";
1483
1483
  function Ct({ 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 }) {
1484
- let m = yt(u), h = V(() => de(s, bt), [s]), [g, _] = U(null), v = xt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = vt({
1484
+ let m = yt(u), h = z(() => I(s, bt), [s]), [g, _] = V(null), v = xt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = vt({
1485
1485
  containerElement: g,
1486
1486
  containerStyle: f,
1487
1487
  defaultContainerSize: n,
1488
1488
  direction: "vertical",
1489
1489
  itemCount: c,
1490
1490
  itemProps: m,
1491
- itemSize: V(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1491
+ itemSize: z(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1492
1492
  onResize: i,
1493
1493
  overscanCount: o
1494
1494
  });
1495
- fe(r, () => ({
1495
+ me(r, () => ({
1496
1496
  get element() {
1497
1497
  return g;
1498
1498
  },
@@ -1507,7 +1507,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1507
1507
  top: r
1508
1508
  });
1509
1509
  }
1510
- }), [g, x]), it(() => {
1510
+ }), [g, x]), Q(() => {
1511
1511
  if (!g) return;
1512
1512
  let e = Array.from(g.children).filter((e, t) => {
1513
1513
  if (e.hasAttribute("aria-hidden")) return !1;
@@ -1521,7 +1521,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1521
1521
  l,
1522
1522
  S,
1523
1523
  w
1524
- ]), B(() => {
1524
+ ]), R(() => {
1525
1525
  S >= 0 && w >= 0 && a && a({
1526
1526
  startIndex: C,
1527
1527
  stopIndex: T
@@ -1536,11 +1536,11 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1536
1536
  w,
1537
1537
  T
1538
1538
  ]);
1539
- let E = V(() => {
1539
+ let E = z(() => {
1540
1540
  let e = [];
1541
1541
  if (c > 0) for (let t = S; t <= w; t++) {
1542
1542
  let n = y(t);
1543
- e.push(/* @__PURE__ */ R(h, {
1543
+ e.push(/* @__PURE__ */ F(h, {
1544
1544
  ...m,
1545
1545
  ariaAttributes: {
1546
1546
  "aria-posinset": t + 1,
@@ -1567,7 +1567,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1567
1567
  m,
1568
1568
  S,
1569
1569
  w
1570
- ]), D = /* @__PURE__ */ G("div", {
1570
+ ]), D = /* @__PURE__ */ U("div", {
1571
1571
  "aria-hidden": !0,
1572
1572
  style: {
1573
1573
  height: b(),
@@ -1575,7 +1575,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1575
1575
  zIndex: -1
1576
1576
  }
1577
1577
  });
1578
- return R(d, {
1578
+ return F(d, {
1579
1579
  role: "list",
1580
1580
  ...p,
1581
1581
  className: t,
@@ -1596,25 +1596,25 @@ var wt = {
1596
1596
  checkIcon: "_checkIcon_1tiyp_19",
1597
1597
  stateLabel: "_stateLabel_1tiyp_23"
1598
1598
  }, Tt = 44, Et = 8, Dt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1599
- let u = r[e], p = Q(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), m = u.id === i;
1600
- return /* @__PURE__ */ G("div", {
1599
+ let u = r[e], p = rt(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), m = u.id === i;
1600
+ return /* @__PURE__ */ U("div", {
1601
1601
  style: t,
1602
1602
  ...n,
1603
- children: /* @__PURE__ */ G(l, {
1603
+ children: /* @__PURE__ */ U(l, {
1604
1604
  type: "button",
1605
1605
  className: o(wt.item, "h-full w-full gap-3 px-4"),
1606
- iconBefore: /* @__PURE__ */ G("span", {
1606
+ iconBefore: /* @__PURE__ */ U("span", {
1607
1607
  className: wt.itemIcon,
1608
1608
  children: p
1609
1609
  }),
1610
- label: /* @__PURE__ */ K("span", {
1610
+ label: /* @__PURE__ */ W("span", {
1611
1611
  className: "flex flex-1 items-center justify-between gap-2",
1612
- children: [/* @__PURE__ */ G(v, {
1612
+ children: [/* @__PURE__ */ U(v, {
1613
1613
  text: u.displayName ?? u.id,
1614
1614
  query: s,
1615
1615
  maxLines: 1,
1616
1616
  className: o(a, "min-w-0 flex-1 text-start")
1617
- }), m && /* @__PURE__ */ G(N, {
1617
+ }), m && /* @__PURE__ */ U(ie, {
1618
1618
  size: d.SM,
1619
1619
  className: wt.checkIcon,
1620
1620
  "aria-hidden": !0,
@@ -1625,11 +1625,11 @@ var wt = {
1625
1625
  })
1626
1626
  });
1627
1627
  }, Ot = ({ 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: g = "dial-small-text", colors: _ }) => {
1628
- let [v, y] = U("");
1629
- B(() => {
1628
+ let [v, y] = V("");
1629
+ R(() => {
1630
1630
  e || y("");
1631
1631
  }, [e]);
1632
- let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? tt(s, v) : [], w = (e) => {
1632
+ let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? X(s, v) : [], w = (e) => {
1633
1633
  l(e), i();
1634
1634
  }, T = a({
1635
1635
  "--ci-sheet-divider": _?.divider,
@@ -1639,7 +1639,7 @@ var wt = {
1639
1639
  "--ci-sheet-icon": _?.itemIcon,
1640
1640
  "--ci-check-icon": _?.checkIcon
1641
1641
  });
1642
- return /* @__PURE__ */ G(q, {
1642
+ return /* @__PURE__ */ U(G, {
1643
1643
  isOpen: e,
1644
1644
  title: t,
1645
1645
  closeLabel: n,
@@ -1648,22 +1648,22 @@ var wt = {
1648
1648
  titleClassName: m,
1649
1649
  className: "max-h-[80dvh]",
1650
1650
  colors: _?.shell,
1651
- children: /* @__PURE__ */ K("div", {
1651
+ children: /* @__PURE__ */ W("div", {
1652
1652
  className: "contents",
1653
1653
  style: T,
1654
- children: [b && !x && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
1654
+ children: [b && !x && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
1655
1655
  className: "flex-shrink-0 px-4 py-[10px]",
1656
- children: /* @__PURE__ */ G(E, {
1656
+ children: /* @__PURE__ */ U(E, {
1657
1657
  value: v,
1658
1658
  placeholder: r,
1659
1659
  size: h.Standard,
1660
1660
  onChange: (e) => y(e ?? "")
1661
1661
  })
1662
- }), /* @__PURE__ */ G("div", { className: o(wt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ G(et, { loadingLabel: u }) : S ? /* @__PURE__ */ G("div", {
1662
+ }), /* @__PURE__ */ U("div", { className: o(wt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ U(nt, { loadingLabel: u }) : S ? /* @__PURE__ */ U("div", {
1663
1663
  role: "list",
1664
1664
  className: o(wt.stateLabel, g, "px-4 py-4"),
1665
1665
  children: S
1666
- }) : /* @__PURE__ */ G(Ct, {
1666
+ }) : /* @__PURE__ */ U(Ct, {
1667
1667
  role: "list",
1668
1668
  className: "overflow-y-auto",
1669
1669
  style: { height: Math.min(C.length, Et) * Tt },
@@ -1681,23 +1681,23 @@ var wt = {
1681
1681
  })
1682
1682
  });
1683
1683
  }, kt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle: g, onPickerOpenChange: v }) => {
1684
- let [y, b] = U(!1), { selectorIcon: x, selectorAriaLabel: S, selectedLabel: C, menuItems: w, menuHeader: T, onOpenChange: E } = rt({
1684
+ let [y, b] = V(!1), { selectorIcon: x, selectorAriaLabel: S, selectedLabel: C, menuItems: w, menuHeader: T, onOpenChange: E } = it({
1685
1685
  deployments: e,
1686
1686
  selectedDeploymentId: t,
1687
1687
  onDeploymentChange: n,
1688
1688
  modelSelectorLabels: r
1689
1689
  });
1690
1690
  if (!e) return null;
1691
- let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ G(ne, {
1691
+ let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ U(ae, {
1692
1692
  size: d.SM,
1693
- className: Y.modelSelectorCaret,
1693
+ className: q.modelSelectorCaret,
1694
1694
  "aria-hidden": !0,
1695
1695
  stroke: f
1696
1696
  });
1697
- return a ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(M, {
1697
+ return a ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(A, {
1698
1698
  tooltip: C,
1699
- children: /* @__PURE__ */ G(_, {
1700
- icon: /* @__PURE__ */ K("div", {
1699
+ children: /* @__PURE__ */ U(_, {
1700
+ icon: /* @__PURE__ */ W("div", {
1701
1701
  className: "flex items-center gap-1",
1702
1702
  children: [x, O]
1703
1703
  }),
@@ -1705,16 +1705,16 @@ var wt = {
1705
1705
  onClick: () => {
1706
1706
  s || b(!0);
1707
1707
  },
1708
- className: o("w-[50px]", Y.modelSelectorButton, D)
1708
+ className: o("w-[50px]", q.modelSelectorButton, D)
1709
1709
  })
1710
- }), l ? /* @__PURE__ */ G(q, {
1710
+ }), l ? /* @__PURE__ */ U(G, {
1711
1711
  isOpen: y,
1712
1712
  title: r?.ariaLabel ?? "Select model",
1713
1713
  closeLabel: r?.closeLabel ?? "Close",
1714
1714
  onClose: () => b(!1),
1715
1715
  style: c,
1716
1716
  children: l(() => b(!1))
1717
- }) : /* @__PURE__ */ G(Ot, {
1717
+ }) : /* @__PURE__ */ U(Ot, {
1718
1718
  isOpen: y,
1719
1719
  title: r?.ariaLabel ?? "Select model",
1720
1720
  closeLabel: r?.closeLabel ?? "Close",
@@ -1727,7 +1727,7 @@ var wt = {
1727
1727
  errorLabel: r?.error,
1728
1728
  emptyLabel: r?.empty,
1729
1729
  style: c
1730
- })] }) : l ? /* @__PURE__ */ G(m, {
1730
+ })] }) : l ? /* @__PURE__ */ U(m, {
1731
1731
  placement: "top-end",
1732
1732
  matchReferenceWidth: !1,
1733
1733
  open: u,
@@ -1736,25 +1736,25 @@ var wt = {
1736
1736
  outsideClosable: !0,
1737
1737
  renderOverlay: () => l(() => v?.(!1)),
1738
1738
  listClassName: "!w-[368px] !bg-layer-raised",
1739
- children: /* @__PURE__ */ G(M, {
1739
+ children: /* @__PURE__ */ U(A, {
1740
1740
  tooltip: C,
1741
- children: /* @__PURE__ */ K("button", {
1741
+ children: /* @__PURE__ */ W("button", {
1742
1742
  type: "button",
1743
1743
  "aria-label": S,
1744
1744
  "aria-disabled": s || void 0,
1745
- className: o("flex items-center justify-center gap-1 rounded-full p-2", Y.modelSelectorButton, D, s && Y.modelSelectorButtonDisabled),
1745
+ className: o("flex items-center justify-center gap-1 rounded-full p-2", q.modelSelectorButton, D, s && q.modelSelectorButtonDisabled),
1746
1746
  onClick: () => {
1747
1747
  !i && !s && g?.();
1748
1748
  },
1749
1749
  children: [x, O]
1750
1750
  })
1751
1751
  })
1752
- }) : /* @__PURE__ */ G("div", {
1752
+ }) : /* @__PURE__ */ U("div", {
1753
1753
  className: o(s && D),
1754
1754
  "aria-disabled": s || void 0,
1755
- children: /* @__PURE__ */ G(M, {
1755
+ children: /* @__PURE__ */ U(A, {
1756
1756
  tooltip: C,
1757
- children: /* @__PURE__ */ G(p, {
1757
+ children: /* @__PURE__ */ U(p, {
1758
1758
  icon: x,
1759
1759
  ariaLabel: S,
1760
1760
  items: w,
@@ -1766,12 +1766,12 @@ var wt = {
1766
1766
  size: h.Standard,
1767
1767
  caretIcon: O,
1768
1768
  iconClassName: s ? D : void 0,
1769
- buttonClassName: o("bg-transparent", Y.modelSelectorButton, s && Y.modelSelectorButtonDisabled)
1769
+ buttonClassName: o("bg-transparent", q.modelSelectorButton, s && q.modelSelectorButtonDisabled)
1770
1770
  })
1771
1771
  })
1772
1772
  });
1773
- }, At = 160, jt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: v, addMenuTitle: y = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: C, sendLabel: w, stopLabel: T, micLabel: E = "Record voice message", stopRecordingLabel: D, discardRecordingLabel: O, colors: k, typography: A, className: j, pendingDropFiles: M = [], onDropFilesConsumed: ee, pendingAttachments: te = [], onPendingAttachmentsConsumed: N, pasteTextThreshold: ne = 4e3, maxMessageLength: P = 5e4, deployments: ae, selectedDeploymentId: F, onDeploymentChange: I, modelSelectorLabels: oe, initialAttachments: se = [], hideAddButton: ce = !1, hideAttachFile: le = !1, hideActionBar: L = !1, renderFooterActions: ue, isInputDisabled: R = !1, isModelSelectorDisabled: de = !1, isSendDisabled: fe = !1, isAudioMessageSupported: pe = !1, sendOnEnter: he = je.Enter, prefixAttachments: ge = [], onRemovePrefixAttachment: ve, chatSettings: ye, toolsMenuItems: q, onToolToggle: be, toolsMenuTitle: Ce, toolsBackLabel: we, toolsChipLabels: De, promptsMenuOverlay: Oe, promptsMenuTitle: ke, promptsBackLabel: Me, autoFocus: Ne = !1, messageHistory: Pe, onDialFileSystemClick: Fe, dialFileSystemLabel: Ie, validateAttachment: Le, onAttachmentClick: Re, modelPickerOverlay: ze, maximumAttachmentsAmount: Be, onAttachmentsLimitExceeded: Ve, isAttachmentsEnabled: J = !0, usageLimitsSlot: Ue, onMessageTooLong: We }) => {
1774
- let Ke = s(), [qe, Je] = U(!1), X = Te(Pe), Qe = V(() => a({
1773
+ }, At = 160, jt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: v, addMenuTitle: y = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: C, uploadingLabel: w, sendLabel: T, stopLabel: E, micLabel: D = "Record voice message", stopRecordingLabel: O, discardRecordingLabel: ee, colors: k, typography: te, className: A, pendingDropFiles: ne = [], onDropFilesConsumed: re, pendingAttachments: ie = [], onPendingAttachmentsConsumed: ae, pasteTextThreshold: oe = 4e3, maxMessageLength: j = 5e4, deployments: M, selectedDeploymentId: N, onDeploymentChange: le, modelSelectorLabels: ue, initialAttachments: de = [], hideAddButton: fe = !1, hideAttachFile: P = !1, hideActionBar: pe = !1, renderFooterActions: F, isInputDisabled: I = !1, isModelSelectorDisabled: me = !1, isSendDisabled: he = !1, isAudioMessageSupported: _e = !1, sendOnEnter: ve = Ne.Enter, prefixAttachments: be = [], onRemovePrefixAttachment: xe, chatSettings: G, toolsMenuItems: Se, onToolToggle: Te, toolsMenuTitle: Ee, toolsBackLabel: ke, toolsChipLabels: Ae, promptsMenuOverlay: je, promptsMenuTitle: Pe, promptsBackLabel: Fe, autoFocus: Ie = !1, messageHistory: Le, onDialFileSystemClick: Re, dialFileSystemLabel: ze, validateAttachment: Be, onAttachmentClick: Ve, modelPickerOverlay: He, maximumAttachmentsAmount: Ue, onAttachmentsLimitExceeded: We, isAttachmentsEnabled: K = !0, usageLimitsSlot: Ke, onMessageTooLong: Je }) => {
1774
+ let Ye = s(), [Xe, J] = V(!1), et = De(Le), tt = z(() => a({
1775
1775
  "--ci-bg": k?.background,
1776
1776
  "--ci-text": k?.text,
1777
1777
  "--ci-border": k?.border,
@@ -1784,217 +1784,218 @@ var wt = {
1784
1784
  "--ci-voice-error": k?.voiceError,
1785
1785
  "--ci-voice-waveform": k?.voiceWaveform,
1786
1786
  "--ci-voice-accent": k?.voiceAccent
1787
- }), [k]), $e = V(() => Fe ? [{
1787
+ }), [k]), nt = z(() => Re ? [{
1788
1788
  key: "dial-fs",
1789
- label: Ie ?? "DIAL file system",
1790
- icon: /* @__PURE__ */ G(re, {
1789
+ label: ze ?? "DIAL file system",
1790
+ icon: /* @__PURE__ */ U(se, {
1791
1791
  size: c,
1792
1792
  "aria-hidden": !0,
1793
1793
  stroke: f
1794
1794
  }),
1795
- onClick: Fe
1796
- }] : [], [Fe, Ie]), { message: et, setMessage: Z, textareaRef: tt } = Ee({
1795
+ onClick: Re
1796
+ }] : [], [Re, ze]), { message: Y, setMessage: X, textareaRef: rt } = Oe({
1797
1797
  messageProp: e,
1798
1798
  messageRevision: t
1799
- }), { attachments: Q, buildAttachments: nt, addAttachments: rt, resetAttachments: it, handleRemove: at, handleRetry: ot, handleExpand: st, hasBlockedAttachments: ct } = xe({
1800
- initialAttachments: se,
1799
+ }), { attachments: Z, buildAttachments: it, addAttachments: Q, resetAttachments: at, handleRemove: ot, handleRetry: st, handleExpand: ct, hasBlockedAttachments: lt } = Ce({
1800
+ initialAttachments: de,
1801
1801
  onUploadAttachment: r,
1802
1802
  onAttachmentsChange: p,
1803
- validateAttachment: Le,
1804
- pendingDropFiles: M,
1805
- onDropFilesConsumed: ee,
1806
- pendingAttachments: te,
1807
- onPendingAttachmentsConsumed: N,
1808
- onExpandPastedText: z((e) => {
1809
- Z((t) => t ? `${t}\n${e}` : e);
1810
- }, [Z]),
1811
- maximumAttachmentsAmount: Be,
1812
- baseAttachmentsAmount: ge.length,
1813
- onAttachmentsLimitExceeded: Ve
1814
- }), { state: lt, analyserNodeRef: ut, errorMessage: $, startRecording: dt, stopRecording: ft, discardRecording: pt } = Ae({ onAttachAudio: z((e) => {
1815
- rt(nt([e]));
1816
- }, [rt, nt]) }), mt = H(null), ht = H(null), { handlePaste: gt } = _e(rt, J ? ne : Infinity), _t = z((e) => {
1817
- if (!J) {
1803
+ validateAttachment: Be,
1804
+ pendingDropFiles: ne,
1805
+ onDropFilesConsumed: re,
1806
+ pendingAttachments: ie,
1807
+ onPendingAttachmentsConsumed: ae,
1808
+ onExpandPastedText: L((e) => {
1809
+ X((t) => t ? `${t}\n${e}` : e);
1810
+ }, [X]),
1811
+ maximumAttachmentsAmount: Ue,
1812
+ baseAttachmentsAmount: be.length,
1813
+ onAttachmentsLimitExceeded: We
1814
+ }), { state: ut, analyserNodeRef: $, errorMessage: dt, startRecording: ft, stopRecording: pt, discardRecording: mt } = Me({ onAttachAudio: L((e) => {
1815
+ Q(it([e]));
1816
+ }, [Q, it]) }), ht = B(null), gt = B(null), { handlePaste: _t } = ye(Q, K ? oe : Infinity), vt = L((e) => {
1817
+ if (!K) {
1818
1818
  let t = e.clipboardData.getData("text/plain");
1819
- t.length >= P && We?.(t.length, P);
1819
+ t.length >= j && Je?.(t.length, j);
1820
1820
  }
1821
- gt(e);
1821
+ _t(e);
1822
1822
  }, [
1823
- J,
1824
- P,
1825
- We,
1826
- gt
1827
- ]), vt = et.trim().length > 0 || Q.length > 0, yt = vt && !ct && !fe, { shouldRender: bt, isExiting: xt, instanceKey: St } = Se(!l && vt, At), [Ct, wt] = U([]);
1828
- B(() => {
1829
- wt([]);
1830
- }, [(q ?? []).map((e) => e.id).join("|")]);
1831
- let Tt = V(() => (q ?? []).filter((e) => e.isSelected || !Ct.includes(e.id)), [q, Ct]), Et = z((e) => {
1832
- wt((t) => t.includes(e) ? t : [...t, e]), q?.find((t) => t.id === e)?.isSelected && be?.(e);
1833
- }, [q, be]), Dt = ae === void 0 || F != null, Ot = V(() => pe && !xt && !l, [
1834
- pe,
1835
- xt,
1823
+ K,
1824
+ j,
1825
+ Je,
1826
+ _t
1827
+ ]), yt = Y.trim().length > 0 || Z.length > 0, bt = yt && !lt && !he, { shouldRender: xt, isExiting: St, instanceKey: Ct } = we(!l && yt, At), [wt, Tt] = V([]);
1828
+ R(() => {
1829
+ Tt([]);
1830
+ }, [(Se ?? []).map((e) => e.id).join("|")]);
1831
+ let Et = z(() => (Se ?? []).filter((e) => e.isSelected || !wt.includes(e.id)), [Se, wt]), Dt = L((e) => {
1832
+ Tt((t) => t.includes(e) ? t : [...t, e]), Se?.find((t) => t.id === e)?.isSelected && Te?.(e);
1833
+ }, [Se, Te]), Ot = M === void 0 || N != null, jt = z(() => _e && !St && !l, [
1834
+ _e,
1835
+ St,
1836
1836
  l
1837
- ]), jt = async () => {
1838
- if (fe) return;
1839
- if (et.length >= P) {
1840
- We?.(et.length, P);
1837
+ ]), Mt = async () => {
1838
+ if (he) return;
1839
+ if (Y.length >= j) {
1840
+ Je?.(Y.length, j);
1841
1841
  return;
1842
1842
  }
1843
- let e = et, t = Q;
1844
- Z(""), X.reset();
1843
+ let e = Y, t = Z;
1844
+ X(""), et.reset();
1845
1845
  try {
1846
1846
  await n?.(e, t), t.forEach((e) => {
1847
1847
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
1848
- }), it([]);
1848
+ }), at([]);
1849
1849
  } catch {
1850
- Z(e), it(t);
1850
+ X(e), at(t);
1851
1851
  }
1852
- }, Mt = (e) => {
1853
- if (!e.nativeEvent.isComposing && !R && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1854
- let t = e.currentTarget.selectionStart ?? 0, n = X.navigate(e.key === "ArrowUp" ? "up" : "down", et, t);
1852
+ }, Nt = (e) => {
1853
+ if (!e.nativeEvent.isComposing && !I && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1854
+ let t = e.currentTarget.selectionStart ?? 0, n = et.navigate(e.key === "ArrowUp" ? "up" : "down", Y, t);
1855
1855
  if (n !== null) {
1856
- e.preventDefault(), Z(n);
1856
+ e.preventDefault(), X(n);
1857
1857
  return;
1858
1858
  }
1859
1859
  }
1860
- e.key === "Enter" && (he === je.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && yt && Dt && !R && jt());
1861
- }, Nt = (e) => {
1860
+ e.key === "Enter" && (ve === Ne.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && bt && Ot && !I && Mt());
1861
+ }, Pt = (e) => {
1862
1862
  let t = Array.from(e.target.files ?? []);
1863
1863
  if (t.length === 0) return;
1864
- let n = nt(t);
1865
- e.target.value = "", rt(n);
1864
+ let n = it(t);
1865
+ e.target.value = "", Q(n);
1866
1866
  };
1867
- if (lt !== "idle") return /* @__PURE__ */ G(Ye, {
1868
- state: lt,
1869
- analyserNodeRef: ut,
1870
- errorMessage: $,
1871
- onStop: ft,
1872
- onDiscard: pt,
1873
- stopLabel: D,
1874
- discardLabel: O,
1875
- style: Qe,
1876
- className: j
1867
+ if (ut !== "idle") return /* @__PURE__ */ U(Ze, {
1868
+ state: ut,
1869
+ analyserNodeRef: $,
1870
+ errorMessage: dt,
1871
+ onStop: pt,
1872
+ onDiscard: mt,
1873
+ stopLabel: O,
1874
+ discardLabel: ee,
1875
+ style: tt,
1876
+ className: A
1877
1877
  });
1878
- let Pt = /* @__PURE__ */ G("textarea", {
1879
- className: o(Y.textarea, A?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1880
- ref: tt,
1881
- autoFocus: Ne,
1882
- value: et,
1878
+ let Ft = /* @__PURE__ */ U("textarea", {
1879
+ className: o(q.textarea, te?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1880
+ ref: rt,
1881
+ autoFocus: Ie,
1882
+ value: Y,
1883
1883
  onChange: (e) => {
1884
- Z(e.target.value), X.notifyChange(), u?.(e.target.value);
1884
+ X(e.target.value), et.notifyChange(), u?.(e.target.value);
1885
1885
  },
1886
- onKeyDown: Mt,
1887
- onPaste: _t,
1886
+ onKeyDown: Nt,
1887
+ onPaste: vt,
1888
1888
  placeholder: m,
1889
1889
  "aria-label": h,
1890
- disabled: R,
1890
+ disabled: I,
1891
1891
  rows: 1
1892
1892
  });
1893
- return /* @__PURE__ */ K("div", {
1894
- ref: ht,
1895
- style: Qe,
1896
- className: o(Y.wrapper, R && Y.wrapperDisabled, "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Q.length > 6 ? "py-3 ps-3" : "p-3", j),
1897
- children: [(ge.length > 0 || Q.length > 0) && /* @__PURE__ */ G(me, {
1898
- attachments: [...ge, ...Q],
1893
+ return /* @__PURE__ */ W("div", {
1894
+ ref: gt,
1895
+ style: tt,
1896
+ className: o(q.wrapper, I && q.wrapperDisabled, "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Z.length > 6 ? "py-3 ps-3" : "p-3", A),
1897
+ children: [(be.length > 0 || Z.length > 0) && /* @__PURE__ */ U(ge, {
1898
+ attachments: [...be, ...Z],
1899
1899
  onRemove: (e) => {
1900
- ge.some((t) => t.id === e) ? ve?.(e) : at(e);
1900
+ be.some((t) => t.id === e) ? xe?.(e) : ot(e);
1901
1901
  },
1902
- onRetry: ot,
1903
- onExpand: st,
1902
+ onRetry: st,
1903
+ onExpand: ct,
1904
1904
  labels: {
1905
1905
  removeLabel: S,
1906
- retryLabel: C
1906
+ retryLabel: C,
1907
+ uploadingLabel: w
1907
1908
  },
1908
- onAttachmentClick: Re == null ? void 0 : (e) => {
1909
- let t = [...ge, ...Q].find((t) => t.id === e);
1910
- t != null && Re(t);
1909
+ onAttachmentClick: Ve == null ? void 0 : (e) => {
1910
+ let t = [...be, ...Z].find((t) => t.id === e);
1911
+ t != null && Ve(t);
1911
1912
  }
1912
- }), L ? Pt : /* @__PURE__ */ K("div", {
1913
+ }), pe ? Ft : /* @__PURE__ */ W("div", {
1913
1914
  className: "flex flex-wrap items-center gap-2",
1914
1915
  children: [
1915
- /* @__PURE__ */ G("div", {
1916
+ /* @__PURE__ */ U("div", {
1916
1917
  className: "flex w-full min-w-0 items-center self-stretch",
1917
- children: Pt
1918
+ children: Ft
1918
1919
  }),
1919
- !ce && /* @__PURE__ */ K("div", {
1920
+ !fe && /* @__PURE__ */ W("div", {
1920
1921
  className: "flex",
1921
- children: [/* @__PURE__ */ G("input", {
1922
- ref: mt,
1922
+ children: [/* @__PURE__ */ U("input", {
1923
+ ref: ht,
1923
1924
  type: "file",
1924
1925
  multiple: !0,
1925
1926
  accept: v,
1926
1927
  className: "sr-only",
1927
1928
  "aria-hidden": !0,
1928
1929
  tabIndex: -1,
1929
- onChange: Nt
1930
- }), /* @__PURE__ */ G(He, {
1931
- onAttachClick: le ? void 0 : () => mt.current?.click(),
1930
+ onChange: Pt
1931
+ }), /* @__PURE__ */ U(Ge, {
1932
+ onAttachClick: P ? void 0 : () => ht.current?.click(),
1932
1933
  attachLabel: g,
1933
1934
  addMenuTitle: y,
1934
1935
  menuTitle: b,
1935
1936
  menuCloseLabel: x,
1936
- style: Qe,
1937
- isDisabled: R,
1938
- chatSettings: ye,
1939
- extraMenuItems: $e,
1940
- toolsMenuItems: q,
1941
- onToolToggle: be,
1942
- toolsMenuTitle: Ce,
1943
- toolsBackLabel: we,
1944
- promptsMenuOverlay: Oe,
1945
- promptsMenuTitle: ke,
1946
- promptsBackLabel: Me
1937
+ style: tt,
1938
+ isDisabled: I,
1939
+ chatSettings: G,
1940
+ extraMenuItems: nt,
1941
+ toolsMenuItems: Se,
1942
+ onToolToggle: Te,
1943
+ toolsMenuTitle: Ee,
1944
+ toolsBackLabel: ke,
1945
+ promptsMenuOverlay: je,
1946
+ promptsMenuTitle: Pe,
1947
+ promptsBackLabel: Fe
1947
1948
  })]
1948
1949
  }),
1949
- Tt.length > 0 && be != null && /* @__PURE__ */ G("div", {
1950
+ Et.length > 0 && Te != null && /* @__PURE__ */ U("div", {
1950
1951
  className: "min-w-0 flex-1",
1951
- children: /* @__PURE__ */ G(Ge, {
1952
- items: Tt,
1953
- onToolToggle: be,
1954
- onToolDismiss: Et,
1955
- removeLabel: De?.removeLabel
1952
+ children: /* @__PURE__ */ U(qe, {
1953
+ items: Et,
1954
+ onToolToggle: Te,
1955
+ onToolDismiss: Dt,
1956
+ removeLabel: Ae?.removeLabel
1956
1957
  })
1957
1958
  }),
1958
- /* @__PURE__ */ K("div", {
1959
+ /* @__PURE__ */ W("div", {
1959
1960
  className: "ms-auto flex flex-shrink-0 items-center gap-2",
1960
- children: [ue ? ue({
1961
- canSend: yt,
1962
- onSend: jt
1963
- }) : /* @__PURE__ */ K(W, { children: [
1964
- Ue,
1965
- /* @__PURE__ */ G(kt, {
1966
- deployments: ae,
1967
- selectedDeploymentId: F,
1968
- onDeploymentChange: I,
1969
- modelSelectorLabels: oe,
1961
+ children: [F ? F({
1962
+ canSend: bt,
1963
+ onSend: Mt
1964
+ }) : /* @__PURE__ */ W(H, { children: [
1965
+ Ke,
1966
+ /* @__PURE__ */ U(kt, {
1967
+ deployments: M,
1968
+ selectedDeploymentId: N,
1969
+ onDeploymentChange: le,
1970
+ modelSelectorLabels: ue,
1970
1971
  isStreaming: l,
1971
- isMobile: Ke,
1972
- isDisabled: de,
1973
- style: Qe,
1974
- modelPickerOverlay: ze,
1975
- isPickerOpen: qe,
1976
- onPickerToggle: () => Je((e) => !e),
1977
- onPickerOpenChange: Je
1972
+ isMobile: Ye,
1973
+ isDisabled: me,
1974
+ style: tt,
1975
+ modelPickerOverlay: He,
1976
+ isPickerOpen: Xe,
1977
+ onPickerToggle: () => J((e) => !e),
1978
+ onPickerOpenChange: J
1978
1979
  }),
1979
- l && i ? /* @__PURE__ */ G(Ze, {
1980
+ l && i ? /* @__PURE__ */ U($e, {
1980
1981
  onStop: i,
1981
- ariaLabel: T
1982
- }) : !l && bt && /* @__PURE__ */ G(Xe, {
1983
- onSend: jt,
1984
- isDisabled: !Dt || ct || fe,
1985
- ariaLabel: w,
1986
- isExiting: xt
1987
- }, St)
1988
- ] }), Ot && /* @__PURE__ */ G(_, {
1989
- icon: /* @__PURE__ */ G(ie, {
1982
+ ariaLabel: E
1983
+ }) : !l && xt && /* @__PURE__ */ U(Qe, {
1984
+ onSend: Mt,
1985
+ isDisabled: !Ot || lt || he,
1986
+ ariaLabel: T,
1987
+ isExiting: St
1988
+ }, Ct)
1989
+ ] }), jt && /* @__PURE__ */ U(_, {
1990
+ icon: /* @__PURE__ */ U(ce, {
1990
1991
  size: d.LG,
1991
1992
  stroke: f,
1992
1993
  "aria-hidden": !0
1993
1994
  }),
1994
- "aria-label": E,
1995
+ "aria-label": D,
1995
1996
  className: "size-[40px] flex-shrink-0",
1996
- onClick: dt,
1997
- disabled: R || l
1997
+ onClick: ft,
1998
+ disabled: I || l
1998
1999
  })]
1999
2000
  })
2000
2001
  ]
@@ -2002,15 +2003,15 @@ var wt = {
2002
2003
  });
2003
2004
  }, Mt = { welcome: "_welcome_n2ph8_1" }, Nt = ({ 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 }) => {
2004
2005
  let { colors: u, typography: d } = r ?? {};
2005
- return /* @__PURE__ */ K("div", {
2006
+ return /* @__PURE__ */ W("div", {
2006
2007
  style: a({ "--ci-welcome-color": u?.welcomeText }),
2007
2008
  className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
2008
- children: [n && /* @__PURE__ */ G("h1", {
2009
+ children: [n && /* @__PURE__ */ U("h1", {
2009
2010
  className: o(Mt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
2010
2011
  children: n
2011
- }), /* @__PURE__ */ G("div", {
2012
+ }), /* @__PURE__ */ U("div", {
2012
2013
  className: "relative w-full max-w-[748px]",
2013
- children: /* @__PURE__ */ G(jt, {
2014
+ children: /* @__PURE__ */ U(jt, {
2014
2015
  placeholder: t,
2015
2016
  isStreaming: e,
2016
2017
  isInputDisabled: c,
@@ -2021,97 +2022,98 @@ var wt = {
2021
2022
  })
2022
2023
  })]
2023
2024
  });
2024
- }, Pt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: p, addMenuTitle: m = "Add", attachLabel: h = "Attach file", menuTitle: g = "Menu", menuCloseLabel: _ = "Close", className: v, pendingDropFiles: b, onDropFilesConsumed: x, validateAttachment: C, isAttachmentsEnabled: w, hideAttachFile: T = !1, fileAccept: E, maximumAttachmentsAmount: D, onAttachmentsLimitExceeded: O, onDialFileSystemClick: k, dialFileSystemLabel: A, pendingAttachments: j, onPendingAttachmentsConsumed: M, onAttachmentClick: ee, pasteTextThreshold: te, maxMessageLength: N = 5e4, onMessageTooLong: ne }) => {
2025
- let P = H(null), [ie, ae] = U([]);
2026
- B(() => {
2027
- b?.length && (ae(b), x?.());
2028
- }, [b, x]);
2029
- let [F, I] = U(e ?? ""), [oe, se] = U([]), [ce, le] = U(t), L = oe.some((e) => e.status === r.Loading || e.status === r.Error), ue = (F.trim().length > 0 || oe.length > 0 || ce.length > 0) && !L, R = (e) => {
2030
- le((t) => t.filter((t) => t.id !== e));
2031
- }, de = z((e, t) => {
2032
- i(e, ce, t);
2033
- }, [ce, i]), fe = () => {
2034
- if (ue) {
2035
- if (F.length >= N) {
2036
- ne?.(F.length, N);
2025
+ }, Pt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: p, uploadingLabel: m, addMenuTitle: h = "Add", attachLabel: g = "Attach file", menuTitle: _ = "Menu", menuCloseLabel: v = "Close", className: b, pendingDropFiles: x, onDropFilesConsumed: C, validateAttachment: w, isAttachmentsEnabled: T, hideAttachFile: E = !1, fileAccept: D, maximumAttachmentsAmount: O, onAttachmentsLimitExceeded: ee, onDialFileSystemClick: k, dialFileSystemLabel: te, pendingAttachments: A, onPendingAttachmentsConsumed: ne, onAttachmentClick: re, pasteTextThreshold: ie, maxMessageLength: ae = 5e4, onMessageTooLong: oe }) => {
2026
+ let ce = B(null), [j, M] = V([]);
2027
+ R(() => {
2028
+ x?.length && (M(x), C?.());
2029
+ }, [x, C]);
2030
+ let [N, le] = V(e ?? ""), [ue, de] = V([]), [fe, P] = V(t), pe = ue.some((e) => e.status === r.Loading || e.status === r.Error), F = (N.trim().length > 0 || ue.length > 0 || fe.length > 0) && !pe, I = (e) => {
2031
+ P((t) => t.filter((t) => t.id !== e));
2032
+ }, me = L((e, t) => {
2033
+ i(e, fe, t);
2034
+ }, [fe, i]), he = () => {
2035
+ if (F) {
2036
+ if (N.length >= ae) {
2037
+ oe?.(N.length, ae);
2037
2038
  return;
2038
2039
  }
2039
- de(F, oe);
2040
+ me(N, ue);
2040
2041
  }
2041
- }, pe = z(() => ae([]), []), me = z((e) => {
2042
+ }, ge = L(() => M([]), []), _e = L((e) => {
2042
2043
  let t = Array.from(e.target.files ?? []);
2043
- t.length !== 0 && (e.target.value = "", ae(t));
2044
- }, []), he = V(() => k ? [{
2044
+ t.length !== 0 && (e.target.value = "", M(t));
2045
+ }, []), ve = z(() => k ? [{
2045
2046
  key: "dial-fs",
2046
- label: A ?? "DIAL file system",
2047
- icon: /* @__PURE__ */ G(re, {
2047
+ label: te ?? "DIAL file system",
2048
+ icon: /* @__PURE__ */ U(se, {
2048
2049
  size: c,
2049
2050
  "aria-hidden": !0,
2050
2051
  stroke: f
2051
2052
  }),
2052
2053
  onClick: k
2053
- }] : [], [k, A]);
2054
- return /* @__PURE__ */ K("div", {
2055
- className: o("flex w-full flex-col gap-2", v),
2056
- children: [/* @__PURE__ */ G(jt, {
2054
+ }] : [], [k, te]);
2055
+ return /* @__PURE__ */ W("div", {
2056
+ className: o("flex w-full flex-col gap-2", b),
2057
+ children: [/* @__PURE__ */ U(jt, {
2057
2058
  message: e,
2058
2059
  ariaLabel: u,
2059
2060
  hideActionBar: !0,
2060
- pendingDropFiles: ie,
2061
- onDropFilesConsumed: pe,
2062
- onSend: de,
2061
+ pendingDropFiles: j,
2062
+ onDropFilesConsumed: ge,
2063
+ onSend: me,
2063
2064
  onUploadAttachment: a,
2064
- onChange: I,
2065
- onAttachmentsChange: se,
2065
+ onChange: le,
2066
+ onAttachmentsChange: de,
2066
2067
  removeLabel: d,
2067
2068
  retryLabel: p,
2069
+ uploadingLabel: m,
2068
2070
  className: "max-w-full",
2069
- prefixAttachments: ce,
2070
- onRemovePrefixAttachment: R,
2071
- validateAttachment: C,
2072
- isAttachmentsEnabled: w,
2073
- maximumAttachmentsAmount: D,
2074
- onAttachmentsLimitExceeded: O,
2075
- pendingAttachments: j,
2076
- onPendingAttachmentsConsumed: M,
2077
- onAttachmentClick: ee,
2078
- pasteTextThreshold: te,
2079
- maxMessageLength: N,
2080
- onMessageTooLong: ne
2081
- }), /* @__PURE__ */ K("div", {
2071
+ prefixAttachments: fe,
2072
+ onRemovePrefixAttachment: I,
2073
+ validateAttachment: w,
2074
+ isAttachmentsEnabled: T,
2075
+ maximumAttachmentsAmount: O,
2076
+ onAttachmentsLimitExceeded: ee,
2077
+ pendingAttachments: A,
2078
+ onPendingAttachmentsConsumed: ne,
2079
+ onAttachmentClick: re,
2080
+ pasteTextThreshold: ie,
2081
+ maxMessageLength: ae,
2082
+ onMessageTooLong: oe
2083
+ }), /* @__PURE__ */ W("div", {
2082
2084
  className: "flex items-center justify-between",
2083
- children: [/* @__PURE__ */ G("div", {
2085
+ children: [/* @__PURE__ */ U("div", {
2084
2086
  className: "flex",
2085
- children: !T && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("input", {
2086
- ref: P,
2087
+ children: !E && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("input", {
2088
+ ref: ce,
2087
2089
  type: "file",
2088
2090
  multiple: !0,
2089
- accept: E,
2091
+ accept: D,
2090
2092
  className: "sr-only",
2091
2093
  "aria-hidden": !0,
2092
2094
  tabIndex: -1,
2093
- onChange: me
2094
- }), /* @__PURE__ */ G(He, {
2095
- onAttachClick: () => P.current?.click(),
2096
- attachLabel: h,
2097
- addMenuTitle: m,
2098
- menuTitle: g,
2099
- menuCloseLabel: _,
2100
- extraMenuItems: he
2095
+ onChange: _e
2096
+ }), /* @__PURE__ */ U(Ge, {
2097
+ onAttachClick: () => ce.current?.click(),
2098
+ attachLabel: g,
2099
+ addMenuTitle: h,
2100
+ menuTitle: _,
2101
+ menuCloseLabel: v,
2102
+ extraMenuItems: ve
2101
2103
  })] })
2102
- }), /* @__PURE__ */ K("div", {
2104
+ }), /* @__PURE__ */ W("div", {
2103
2105
  className: "flex gap-2",
2104
- children: [/* @__PURE__ */ G(y, {
2106
+ children: [/* @__PURE__ */ U(y, {
2105
2107
  label: s,
2106
2108
  onClick: n
2107
- }), /* @__PURE__ */ G(S, {
2109
+ }), /* @__PURE__ */ U(S, {
2108
2110
  label: l,
2109
- onClick: fe,
2110
- disabled: !ue
2111
+ onClick: he,
2112
+ disabled: !F
2111
2113
  })]
2112
2114
  })]
2113
2115
  })]
2114
2116
  });
2115
2117
  };
2116
2118
  //#endregion
2117
- export { q as BottomSheetShell, ze as ChatSettingsModal, Nt as ConversationInput, Pt as EditMessageInput, jt as Input, je as SendOnEnter };
2119
+ export { G as BottomSheetShell, Ve as ChatSettingsModal, Nt as ConversationInput, Pt as EditMessageInput, jt as Input, Ne as SendOnEnter };