@epam/ai-dial-conversation-input 1.4.0-dev.8 → 1.4.0-dev.82

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,11 +1,11 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, MIME_TYPE_EXT_MAP as r, RESIZABLE_TEXTAREA_CLASS_NAME as i, RequestStatus as a, ResponseFormat as o, SELECT_LIST_MAX_HEIGHT_PX as s, buildCssVars as c, mergeClasses as l, normalizeMimeType as u, useIsMobile as d, useIsPhone as f } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as p, BottomSheet as m, Button as h, ButtonVariant as g, CloseButton as _, DIAL_ICON_SIZE as v, DIAL_KIT_ICON_STROKE as y, Dropdown as b, DropdownOverlayRole as x, ElementSize as S, ErrorText as C, GhostIconButton as w, Highlight as T, LiveRegion as E, LiveRegionElement as D, LiveRegionPoliteness as O, MenuItem as k, MenuItemMark as A, NeutralButton as j, NeutralIconButton as M, Notification as N, NotificationType as P, NotificationVariant as ee, Popup as F, PopupSize as I, PrimaryButton as L, PrimaryIconButton as R, RadioGroup as z, RadioGroupOrientation as B, Search as V, Skeleton as te, SkeletonVariant as ne, Slider as re, Spinner as ie, Textarea as ae, TextareaResize as oe, ToggleChip as se, Tooltip as ce } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as le, jsx as H, jsxs as U } from "react/jsx-runtime";
4
- import { AttachmentTray as ue, MAX_UPLOADS_PER_MINUTE as de, generateAttachmentId as fe, useClipboardPaste as pe } from "@epam/ai-dial-attachment-input";
5
- import { IconArrowNarrowRight as me, IconCheck as he, IconChevronDown as ge, IconChevronRight as _e, IconFile as ve, IconMicrophone as ye, IconPaperclip as be, IconPlayerStop as xe, IconPlus as Se, IconSettings as Ce, IconTool as we, IconX as Te } from "@tabler/icons-react";
6
- import { Fragment as Ee, createElement as De, forwardRef as Oe, memo as ke, useCallback as W, useEffect as G, useId as Ae, useImperativeHandle as je, useLayoutEffect as Me, useMemo as K, useRef as q, useState as J, useSyncExternalStore as Ne } from "react";
2
+ import { BASE_ICON_SIZE as p, BottomSheet as m, Button as h, ButtonVariant as g, CloseButton as _, DIAL_ICON_SIZE as v, DIAL_KIT_ICON_STROKE as y, Dropdown as b, DropdownOverlayRole as x, ElementSize as S, ErrorText as C, GhostIconButton as w, Highlight as T, LiveRegion as E, LiveRegionElement as D, LiveRegionPoliteness as O, MenuItem as k, MenuItemMark as A, NeutralButton as j, NeutralIconButton as M, Notification as N, NotificationType as P, NotificationVariant as ee, Popup as F, PopupSize as I, PrimaryButton as L, PrimaryIconButton as R, RadioGroup as z, RadioGroupOrientation as B, Search as te, Skeleton as ne, SkeletonVariant as re, Slider as ie, Spinner as ae, Textarea as oe, TextareaResize as se, ToggleChip as ce, Tooltip as le } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as ue, jsx as V, jsxs as H } from "react/jsx-runtime";
4
+ import { AttachmentTray as de, MAX_UPLOADS_PER_MINUTE as fe, generateAttachmentId as pe, useClipboardPaste as me } from "@epam/ai-dial-attachment-input";
5
+ import { IconArrowNarrowRight as he, IconCheck as ge, IconChevronDown as _e, IconChevronRight as ve, IconFile as ye, IconMicrophone as be, IconPaperclip as xe, IconPlayerStop as Se, IconPlus as Ce, IconSettings as we, IconTool as Te, IconX as Ee } from "@tabler/icons-react";
6
+ import { Fragment as De, createElement as Oe, forwardRef as ke, memo as Ae, useCallback as U, useEffect as W, useId as je, useImperativeHandle as Me, useLayoutEffect as Ne, useMemo as G, useRef as K, useState as q, useSyncExternalStore as Pe } from "react";
7
7
  //#region src/constants/public-class-names.ts
8
- var Y = {
8
+ var J = {
9
9
  wrapper: "dial-ci-wrapper",
10
10
  actionRow: "dial-ci-action-row",
11
11
  textareaWrap: "dial-ci-textarea-wrap",
@@ -20,19 +20,19 @@ var Y = {
20
20
  modelMenuItem: "dial-ci-model-menu-item",
21
21
  modelMenuItemSelected: "dial-ci-model-menu-item-selected",
22
22
  usageBanner: "dial-ci-usage-banner"
23
- }, Pe = {
23
+ }, Fe = {
24
24
  backdrop: "_backdrop_1ym62_8",
25
25
  sheet: "_sheet_1ym62_12",
26
26
  title: "_title_1ym62_16",
27
27
  divider: "_divider_1ym62_20"
28
- }, Fe = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: s, titleClassName: u = "dial-body-semi-text", className: d, colors: f, portalId: p, overlayClassName: h, overlayStyle: g, children: _ }) => {
28
+ }, Ie = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: s, titleClassName: u = "dial-body-semi-text", className: d, colors: f, portalId: p, overlayClassName: h, overlayStyle: g, children: _ }) => {
29
29
  let v = c({
30
30
  "--ci-backdrop": f?.backdrop,
31
31
  "--ci-sheet-bg": f?.sheetBg,
32
32
  "--ci-sheet-text": f?.sheetText,
33
33
  "--ci-sheet-divider": f?.divider
34
34
  });
35
- return /* @__PURE__ */ H(m, {
35
+ return /* @__PURE__ */ V(m, {
36
36
  open: e,
37
37
  onClose: r,
38
38
  title: t,
@@ -48,30 +48,30 @@ var Y = {
48
48
  ...v,
49
49
  ...g
50
50
  },
51
- className: l(Pe.sheet, d),
52
- overlayClassName: l(Pe.backdrop, h),
51
+ className: l(Fe.sheet, d),
52
+ overlayClassName: l(Fe.backdrop, h),
53
53
  portalId: p,
54
- headerClassName: Pe.divider,
55
- titleClassName: l(Pe.title, u),
54
+ headerClassName: Fe.divider,
55
+ titleClassName: l(Fe.title, u),
56
56
  children: _
57
57
  });
58
- }, Ie = async (e, t, n) => {
58
+ }, Le = async (e, t, n) => {
59
59
  let r = 6e4 / t, i = [];
60
60
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
61
61
  await Promise.allSettled(i);
62
- }, Le = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: i, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, isDropDisabled: l = !1, pendingAttachments: u, onPendingAttachmentsConsumed: d, onExpandPastedText: f, maximumAttachmentsAmount: p, baseAttachmentsAmount: m = 0, onAttachmentsLimitExceeded: h }) => {
63
- let [g, _] = J(n), v = q(g);
64
- G(() => {
62
+ }, Re = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: i, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, isDropDisabled: l = !1, pendingAttachments: u, onPendingAttachmentsConsumed: d, onExpandPastedText: f, maximumAttachmentsAmount: p, baseAttachmentsAmount: m = 0, onAttachmentsLimitExceeded: h }) => {
63
+ let [g, _] = q(n), v = K(g);
64
+ W(() => {
65
65
  v.current = g;
66
- }, [g]), G(() => () => {
66
+ }, [g]), W(() => () => {
67
67
  v.current.forEach((e) => {
68
68
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
69
69
  });
70
70
  }, []);
71
- let y = W((e) => e.map((e) => {
71
+ let y = U((e) => e.map((e) => {
72
72
  let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), i = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0, s = t.File;
73
73
  return n ? s = t.Image : r && (s = t.Audio), {
74
- id: fe(),
74
+ id: pe(),
75
75
  name: e.name,
76
76
  contentType: e.type,
77
77
  file: e,
@@ -80,22 +80,22 @@ var Y = {
80
80
  previewUrl: i,
81
81
  playUrl: o
82
82
  };
83
- }), []), b = q(i);
84
- G(() => {
83
+ }), []), b = K(i);
84
+ W(() => {
85
85
  b.current = i;
86
86
  }, [i]);
87
- let x = q(!0), S = W((e) => {
87
+ let x = K(!0), S = U((e) => {
88
88
  _((t) => {
89
89
  let n = e(t);
90
90
  return n === t ? t : n;
91
91
  });
92
92
  }, []);
93
- G(() => {
93
+ W(() => {
94
94
  x.current ? x.current = !1 : b.current?.(g);
95
95
  }, [g]);
96
- let C = W((e) => {
96
+ let C = U((e) => {
97
97
  _(e);
98
- }, []), w = W(async (t) => {
98
+ }, []), w = U(async (t) => {
99
99
  if (r) {
100
100
  S((e) => e.map((e) => e.id === t.id ? {
101
101
  ...e,
@@ -118,7 +118,7 @@ var Y = {
118
118
  } : e));
119
119
  }
120
120
  }
121
- }, [r, S]), T = W((e, t = !0) => {
121
+ }, [r, S]), T = U((e, t = !0) => {
122
122
  let n = new Set(v.current.map((e) => e.id)), r = e.filter((e) => !n.has(e.id));
123
123
  if (r.length !== 0) {
124
124
  if (p != null && p > 0 && Number.isFinite(p)) {
@@ -139,7 +139,7 @@ var Y = {
139
139
  status: a.Error,
140
140
  errorReason: n
141
141
  } : e));
142
- }), Ie(e, de, w);
142
+ }), Le(e, fe, w);
143
143
  }
144
144
  }
145
145
  }, [
@@ -149,8 +149,8 @@ var Y = {
149
149
  S,
150
150
  w,
151
151
  o
152
- ]), E = q(/* @__PURE__ */ new WeakSet());
153
- G(() => {
152
+ ]), E = K(/* @__PURE__ */ new WeakSet());
153
+ W(() => {
154
154
  if (s.length === 0) {
155
155
  E.current = /* @__PURE__ */ new WeakSet();
156
156
  return;
@@ -163,13 +163,13 @@ var Y = {
163
163
  l,
164
164
  c,
165
165
  s
166
- ]), G(() => {
166
+ ]), W(() => {
167
167
  u.length !== 0 && (T(u, !1), d?.());
168
168
  }, [
169
169
  T,
170
170
  d,
171
171
  u
172
- ]), G(() => {
172
+ ]), W(() => {
173
173
  if (!o) return;
174
174
  let t = !1, n = [], r = v.current.map((r) => {
175
175
  if (r.status === a.Loading) return r;
@@ -196,7 +196,7 @@ var Y = {
196
196
  S,
197
197
  w
198
198
  ]);
199
- let D = W((e) => {
199
+ let D = U((e) => {
200
200
  S((t) => {
201
201
  let n = t.find((t) => t.id === e);
202
202
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -208,11 +208,11 @@ var Y = {
208
208
  addAttachments: T,
209
209
  resetAttachments: C,
210
210
  handleRemove: D,
211
- handleRetry: W((e) => {
211
+ handleRetry: U((e) => {
212
212
  let t = g.find((t) => t.id === e);
213
213
  t && w(t);
214
214
  }, [g, w]),
215
- handleExpand: W(async (e) => {
215
+ handleExpand: U(async (e) => {
216
216
  let n = g.find((t) => t.id === e);
217
217
  if (!n || n.type !== t.Pasted) return;
218
218
  let r = await n.file.text();
@@ -224,18 +224,18 @@ var Y = {
224
224
  ]),
225
225
  hasBlockedAttachments: g.some((e) => e.status === a.Loading || e.status === a.Error)
226
226
  };
227
- }, Re = (e, t) => !e.slice(0, t).includes("\n"), ze = (e, t) => !e.slice(t).includes("\n"), Be = (e) => {
228
- let t = q(e);
227
+ }, ze = (e, t) => !e.slice(0, t).includes("\n"), Be = (e, t) => !e.slice(t).includes("\n"), Ve = (e) => {
228
+ let t = K(e);
229
229
  t.current = e;
230
- let n = q(-1), r = q(""), i = W((e, i, a) => {
230
+ let n = K(-1), r = K(""), i = U((e, i, a) => {
231
231
  let o = t.current;
232
- return !o || o.length === 0 ? null : e === "up" ? !Re(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 || !ze(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
233
- }, []), a = W(() => {
232
+ return !o || o.length === 0 ? null : e === "up" ? !ze(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 || !Be(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
233
+ }, []), a = U(() => {
234
234
  n.current = -1, r.current = "";
235
- }, []), o = W(() => {
235
+ }, []), o = U(() => {
236
236
  n.current = -1, r.current = "";
237
237
  }, []);
238
- return K(() => ({
238
+ return G(() => ({
239
239
  navigate: i,
240
240
  notifyChange: a,
241
241
  reset: o
@@ -244,29 +244,29 @@ var Y = {
244
244
  a,
245
245
  o
246
246
  ]);
247
- }, Ve = ({ messageProp: e, messageRevision: t }) => {
248
- let [n, r] = J(e), i = q(null);
249
- return G(() => {
247
+ }, He = ({ messageProp: e, messageRevision: t }) => {
248
+ let [n, r] = q(e), i = K(null);
249
+ return W(() => {
250
250
  r(e);
251
251
  }, [e, t]), {
252
252
  message: n,
253
253
  setMessage: r,
254
254
  textareaRef: i
255
255
  };
256
- }, He = (e, t, n, r = n) => {
256
+ }, Ue = (e, t, n, r = n) => {
257
257
  let i = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
258
258
  i ? i.call(e, t) : e.value = t, e.setSelectionRange(n, r), e.dispatchEvent(new Event("input", { bubbles: !0 }));
259
- }, Ue = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, We = ({ insertion: e, textareaRef: t }) => {
260
- let n = e?.revision, r = q(e?.text);
259
+ }, We = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, Ge = ({ insertion: e, textareaRef: t }) => {
260
+ let n = e?.revision, r = K(e?.text);
261
261
  r.current = e?.text;
262
- let i = q(n), a = q(null), o = q(!1);
263
- return G(() => {
262
+ let i = K(n), a = K(null), o = K(!1);
263
+ return W(() => {
264
264
  document.activeElement === t.current && (o.current = !0);
265
265
  let e = (e) => {
266
266
  e.target === t.current && (o.current = !0);
267
267
  };
268
268
  return document.addEventListener("focusin", e), () => document.removeEventListener("focusin", e);
269
- }, [t]), G(() => {
269
+ }, [t]), W(() => {
270
270
  if (n === i.current) return;
271
271
  i.current = n;
272
272
  let e = r.current;
@@ -276,7 +276,7 @@ var Y = {
276
276
  let { value: r, selectionStart: i, selectionEnd: s } = n, c = !o.current && r.length > 0 && i === 0 && s === 0, l = c ? r.length : i ?? r.length, u = c ? l : s ?? l;
277
277
  if (n.focus(), c && n.setSelectionRange(l, u), a.current = null, typeof document.execCommand == "function" && document.execCommand("insertText", !1, e)) return;
278
278
  let d = `${r.slice(0, l)}${e}${r.slice(u)}`;
279
- He(n, d, l + e.length), a.current = {
279
+ Ue(n, d, l + e.length), a.current = {
280
280
  insertedValue: d,
281
281
  previousValue: r,
282
282
  previousSelectionStart: l,
@@ -286,22 +286,22 @@ var Y = {
286
286
  }, [n, t]), {
287
287
  handleUndoKeyDown: (e) => {
288
288
  let n = a.current, r = t.current;
289
- return n == null || r == null || !Ue(e) || (a.current = null, r.value !== n.insertedValue) ? !1 : (e.preventDefault(), He(r, n.previousValue, n.previousSelectionStart, n.previousSelectionEnd), !0);
289
+ return n == null || r == null || !We(e) || (a.current = null, r.value !== n.insertedValue) ? !1 : (e.preventDefault(), Ue(r, n.previousValue, n.previousSelectionStart, n.previousSelectionEnd), !0);
290
290
  },
291
291
  markCaretPlaced: () => {
292
292
  o.current = !0;
293
293
  }
294
294
  };
295
- }, Ge = /* @__PURE__ */ function(e) {
295
+ }, Ke = /* @__PURE__ */ function(e) {
296
296
  return e.Idle = "idle", e.Recording = "recording", e.Processing = "processing", e.Error = "error", e;
297
- }({}), Ke = /* @__PURE__ */ function(e) {
297
+ }({}), qe = /* @__PURE__ */ function(e) {
298
298
  return e.Dictation = "dictation", e.Attachment = "attachment", e;
299
- }({}), qe = [
299
+ }({}), Je = [
300
300
  "audio/webm;codecs=opus",
301
301
  "audio/ogg;codecs=opus",
302
302
  "audio/webm"
303
- ], Je = 100, Ye = 100, Xe = .01, Ze = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: i = "Voice input failed" }) => {
304
- let [a, o] = J("idle"), [s, c] = J(null), l = q(null), d = q(null), f = q({
303
+ ], Ye = 100, Xe = 100, Ze = .01, Qe = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: i = "Voice input failed" }) => {
304
+ let [a, o] = q("idle"), [s, c] = q(null), l = K(null), d = K(null), f = K({
305
305
  onAttachAudio: e,
306
306
  onTranscribeAudio: t,
307
307
  onTranscript: n,
@@ -313,7 +313,7 @@ var Y = {
313
313
  onTranscript: n,
314
314
  errorLabel: i
315
315
  };
316
- let p = W((e = "dictation") => {
316
+ let p = U((e = "dictation") => {
317
317
  if (d.current) return;
318
318
  let t = { controller: new AbortController() };
319
319
  d.current = t, c(null), o("recording");
@@ -331,7 +331,7 @@ var Y = {
331
331
  n.aborted || (t.controller.abort(), d.current = null, c(e instanceof Error ? e.message : f.current.errorLabel), o("error"));
332
332
  }, S = () => {
333
333
  if (!a || n.aborted) return;
334
- let e = qe.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(a, e ? { mimeType: e } : void 0);
334
+ let e = Je.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(a, e ? { mimeType: e } : void 0);
335
335
  p = t;
336
336
  let s = Date.now(), c = !1, d = !1, S = new Uint8Array(l.current?.fftSize ?? 256), C = async () => {
337
337
  if (!(g || n.aborted)) {
@@ -339,7 +339,7 @@ var Y = {
339
339
  try {
340
340
  let a = t.mimeType || e || "audio/webm", l = new Blob(_, { type: a });
341
341
  _.length = 0, y();
342
- let p = Date.now() - s >= Ye;
342
+ let p = Date.now() - s >= Xe;
343
343
  if (l.size && (!i || p && (!c || d))) {
344
344
  let e = u(a), t = r[e] ?? e.split("/")[1] ?? "webm", s = new File([l], "voice-" + crypto.randomUUID() + "." + t, { type: a });
345
345
  if (i) {
@@ -365,8 +365,8 @@ var Y = {
365
365
  e.getByteTimeDomainData(S), c = !0;
366
366
  let t = 0;
367
367
  for (let e of S) t += ((e - 128) / 128) ** 2;
368
- Math.sqrt(t / S.length) >= Xe && (d = !0, v());
369
- }, Je));
368
+ Math.sqrt(t / S.length) >= Ze && (d = !0, v());
369
+ }, Ye));
370
370
  };
371
371
  t.stop = () => {
372
372
  h || n.aborted || (h = !0, v(), o("processing"), p?.state === "recording" && p.stop());
@@ -384,10 +384,10 @@ var Y = {
384
384
  x(e);
385
385
  }
386
386
  })();
387
- }, []), m = W(() => d.current?.stop?.(), []), h = W(() => {
387
+ }, []), m = U(() => d.current?.stop?.(), []), h = U(() => {
388
388
  d.current?.controller.abort(), d.current = null, c(null), o("idle");
389
389
  }, []);
390
- return G(() => () => {
390
+ return W(() => () => {
391
391
  d.current?.controller.abort(), d.current = null;
392
392
  }, []), {
393
393
  state: a,
@@ -397,18 +397,60 @@ var Y = {
397
397
  stopRecording: m,
398
398
  discardRecording: h
399
399
  };
400
- }, Qe = /* @__PURE__ */ function(e) {
400
+ }, $e = /* @__PURE__ */ function(e) {
401
401
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
402
- }({}), $e = /* @__PURE__ */ function(e) {
402
+ }({}), et = /* @__PURE__ */ function(e) {
403
403
  return e.Stacked = "stacked", e.Inline = "inline", e;
404
- }({}), et = {
404
+ }({}), tt = {
405
+ icon: "_icon_1fv6z_1",
406
+ selectedIcon: "_selectedIcon_1fv6z_5"
407
+ }, nt = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: s, onToolToggle: u, itemLabelClassName: d = "dial-small-text", colors: f }) => {
408
+ let m = c({
409
+ "--tbs-icon-text": f?.iconText,
410
+ "--tbs-selected-icon-text": f?.selectedIconText
411
+ });
412
+ return /* @__PURE__ */ V(Ie, {
413
+ isOpen: e,
414
+ title: o,
415
+ closeLabel: i,
416
+ onClose: r,
417
+ onBack: t,
418
+ backLabel: n,
419
+ style: a,
420
+ children: /* @__PURE__ */ V("div", {
421
+ role: "menu",
422
+ "aria-label": o,
423
+ className: "flex flex-col px-2 pb-4",
424
+ style: m,
425
+ children: s.map((e) => /* @__PURE__ */ V(k, {
426
+ role: "menuitemcheckbox",
427
+ "aria-checked": e.isSelected,
428
+ icon: /* @__PURE__ */ V("span", {
429
+ className: l("flex items-center", tt.icon),
430
+ children: e.icon
431
+ }),
432
+ label: e.label,
433
+ labelClassName: d,
434
+ trailing: e.isSelected ? /* @__PURE__ */ V("span", {
435
+ className: l("flex", tt.selectedIcon),
436
+ children: /* @__PURE__ */ V(ge, {
437
+ size: p,
438
+ "aria-hidden": !0,
439
+ stroke: y
440
+ })
441
+ }) : void 0,
442
+ onClick: () => u(e.id)
443
+ }, e.id))
444
+ })
445
+ });
446
+ }, Y = {
405
447
  chip: "_chip_1lvv5_1",
406
448
  chipSelected: "_chipSelected_1lvv5_9",
407
449
  chipIcon: "_chipIcon_1lvv5_16",
408
450
  chipText: "_chipText_1lvv5_19",
409
451
  chipState: "_chipState_1lvv5_22",
410
452
  chipClose: "_chipClose_1lvv5_25"
411
- }, tt = (e) => `Remove ${e}`, nt = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = tt, stateOnLabel: a, stateOffLabel: o, typography: s, colors: u }) => {
453
+ }, rt = (e) => `Remove ${e}`, it = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = rt, stateOnLabel: a, stateOffLabel: o, typography: s, colors: u }) => {
412
454
  if (e.length === 0) return null;
413
455
  let d = !!(a && o), f = c({
414
456
  "--ci-chip-bg": u?.chipBg,
@@ -424,57 +466,87 @@ var Y = {
424
466
  "--ci-chip-state-text": u?.chipStateText,
425
467
  "--ci-chip-close": u?.chipClose,
426
468
  "--ci-chip-close-hover": u?.chipCloseHover
427
- }), p = (e) => /* @__PURE__ */ H("span", {
428
- className: l(et.chipIcon, "flex shrink-0"),
469
+ }), p = (e) => /* @__PURE__ */ V("span", {
470
+ className: l(Y.chipIcon, "flex shrink-0"),
429
471
  children: e.icon
430
- }), m = (e) => /* @__PURE__ */ U("span", {
431
- className: "flex min-w-0 items-center",
432
- children: [/* @__PURE__ */ U("span", {
433
- className: l(et.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
434
- children: [e.label, d && /* @__PURE__ */ H("span", {
472
+ }), m = (e) => /* @__PURE__ */ H("span", {
473
+ className: "flex min-w-0 items-baseline",
474
+ children: [/* @__PURE__ */ H("span", {
475
+ className: l(Y.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
476
+ children: [e.label, d && /* @__PURE__ */ V("span", {
435
477
  "aria-hidden": !0,
436
478
  children: ":"
437
479
  })]
438
- }), d && /* @__PURE__ */ H("span", {
439
- className: l(et.chipState, s?.stateClassName || "dial-tiny-lead-text", "ms-1 shrink-0"),
480
+ }), d && /* @__PURE__ */ V("span", {
481
+ className: l(Y.chipState, s?.stateClassName || "dial-tiny-lead-text", "ms-1 shrink-0"),
440
482
  "aria-hidden": !0,
441
483
  children: e.isSelected ? a : o
442
484
  })]
443
485
  });
444
- return /* @__PURE__ */ H("div", {
486
+ return /* @__PURE__ */ V("div", {
445
487
  className: "flex flex-wrap items-center gap-2",
446
488
  style: f,
447
- children: e.map((e) => r ? /* @__PURE__ */ U("div", {
448
- className: l(et.chip, e.isSelected && et.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 ps-2 pe-1 transition-colors"),
449
- children: [/* @__PURE__ */ U("button", {
489
+ children: e.map((e) => r ? /* @__PURE__ */ H("div", {
490
+ className: l(Y.chip, e.isSelected && Y.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 ps-2 pe-1 transition-colors"),
491
+ children: [/* @__PURE__ */ H("button", {
450
492
  type: "button",
451
493
  onClick: () => t(e.id),
452
494
  "aria-pressed": e.isSelected,
453
495
  className: "flex min-w-0 items-center gap-1.5",
454
- children: [/* @__PURE__ */ H("span", {
496
+ children: [/* @__PURE__ */ V("span", {
455
497
  className: "flex shrink-0",
456
498
  "aria-hidden": !0,
457
499
  children: p(e)
458
500
  }), m(e)]
459
- }), /* @__PURE__ */ H("button", {
501
+ }), /* @__PURE__ */ V("button", {
460
502
  type: "button",
461
503
  onClick: () => n(e.id),
462
504
  "aria-label": i(e.label),
463
- className: l(et.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
464
- children: /* @__PURE__ */ H(Te, {
505
+ className: l(Y.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
506
+ children: /* @__PURE__ */ V(Ee, {
465
507
  size: 12,
466
508
  "aria-hidden": !0,
467
509
  stroke: y
468
510
  })
469
511
  })]
470
- }, e.id) : /* @__PURE__ */ H(se, {
512
+ }, e.id) : /* @__PURE__ */ V(ce, {
471
513
  icon: p(e),
472
514
  label: m(e),
473
515
  isSelected: e.isSelected,
474
516
  onToggle: () => t(e.id),
475
- className: l(et.chip, e.isSelected && et.chipSelected, "h-auto min-w-0 gap-1.5 border px-2 py-1 transition-colors")
517
+ className: l(Y.chip, e.isSelected && Y.chipSelected, "h-auto min-w-0 gap-1.5 border px-2 py-1 transition-colors")
476
518
  }, e.id))
477
519
  });
520
+ }, at = (e, t) => `Tools: ${e} of ${t} on`, ot = ({ items: e, title: t = "Tools", summaryLabel: n = at, onClick: r, fontClassName: i = "dial-small-paragraph-text", countClassName: a = "dial-tiny-lead-text" }) => {
521
+ if (e.length === 0) return null;
522
+ let o = e.filter((e) => e.isSelected).length, s = o > 0;
523
+ return /* @__PURE__ */ H("button", {
524
+ type: "button",
525
+ onClick: r,
526
+ "aria-haspopup": "dialog",
527
+ "aria-label": n(o, e.length),
528
+ className: l(Y.chip, s && Y.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border px-2 py-1 transition-colors"),
529
+ children: [
530
+ /* @__PURE__ */ V("span", {
531
+ className: l(Y.chipIcon, "flex shrink-0"),
532
+ children: /* @__PURE__ */ V(Te, {
533
+ size: 16,
534
+ "aria-hidden": !0,
535
+ stroke: y
536
+ })
537
+ }),
538
+ /* @__PURE__ */ V("span", {
539
+ className: l(Y.chipText, i, "truncate"),
540
+ "aria-hidden": !0,
541
+ children: t
542
+ }),
543
+ s && /* @__PURE__ */ V("span", {
544
+ className: l(Y.chipState, a, "shrink-0"),
545
+ "aria-hidden": !0,
546
+ children: o
547
+ })
548
+ ]
549
+ });
478
550
  }, X = {
479
551
  wrapper: "_wrapper_13067_2",
480
552
  wrapperDisabled: "_wrapperDisabled_13067_9",
@@ -490,33 +562,33 @@ var Y = {
490
562
  modelSelectorName: "_modelSelectorName_13067_85",
491
563
  modelSelectorVersion: "_modelSelectorVersion_13067_88",
492
564
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_13067_97"
493
- }, rt = {
565
+ }, st = {
494
566
  waveformCanvas: "_waveformCanvas_18zb5_1",
495
567
  recordingDot: "_recordingDot_18zb5_15",
496
568
  "recording-pulse": "_recording-pulse_18zb5_1"
497
- }, it = 3, at = 4, ot = 200, st = ({ state: e, analyserNodeRef: t, onStop: n, onDiscard: r, attachButton: i, stopLabel: a = "Stop recording", discardLabel: o = "Discard recording", processingLabel: s = "Transcribing audio…", style: c, className: u, embedded: d = !1 }) => {
498
- let f = q(null), p = q(new Float32Array(ot)), m = q(0), h = q(0), g = e === Ge.Recording, _ = e === Ge.Processing, b = W((e) => {
569
+ }, ct = 3, lt = 4, ut = 200, dt = ({ state: e, analyserNodeRef: t, onStop: n, onDiscard: r, attachButton: i, stopLabel: a = "Stop recording", discardLabel: o = "Discard recording", processingLabel: s = "Transcribing audio…", style: c, className: u, embedded: d = !1 }) => {
570
+ let f = K(null), p = K(new Float32Array(ut)), m = K(0), h = K(0), g = e === Ke.Recording, _ = e === Ke.Processing, b = U((e) => {
499
571
  let t = e.getContext("2d");
500
572
  if (!t) return;
501
573
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
502
574
  let { width: n, height: r } = e;
503
575
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
504
- let i = Math.min(Math.max(1, Math.floor(n / at)), 199), a = m.current, o = h.current;
576
+ let i = Math.min(Math.max(1, Math.floor(n / lt)), 199), a = m.current, o = h.current;
505
577
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
506
578
  for (let e = 0; e <= i; e++) {
507
- let n = ((a - i + e) % ot + ot) % ot, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
508
- t.fillRect(e * at, (r - c) / 2, it, c);
579
+ let n = ((a - i + e) % ut + ut) % ut, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
580
+ t.fillRect(e * lt, (r - c) / 2, ct, c);
509
581
  }
510
582
  t.restore();
511
583
  }, []);
512
- G(() => {
584
+ W(() => {
513
585
  if (!g) return;
514
586
  let e = f.current;
515
587
  if (!e) return;
516
588
  p.current.fill(0), m.current = 0, h.current = 0;
517
589
  let n, r = () => {
518
- if (h.current += 1, h.current >= at) {
519
- h.current -= at;
590
+ if (h.current += 1, h.current >= lt) {
591
+ h.current -= lt;
520
592
  let e = t.current;
521
593
  if (e) {
522
594
  let t = new Uint8Array(e.frequencyBinCount);
@@ -526,7 +598,7 @@ var Y = {
526
598
  let r = (t[e] - 128) / 128;
527
599
  n += r * r;
528
600
  }
529
- p.current[m.current % ot] = Math.sqrt(n / t.length), m.current++;
601
+ p.current[m.current % ut] = Math.sqrt(n / t.length), m.current++;
530
602
  }
531
603
  }
532
604
  b(e), n = requestAnimationFrame(r);
@@ -538,7 +610,7 @@ var Y = {
538
610
  g,
539
611
  t,
540
612
  b
541
- ]), G(() => {
613
+ ]), W(() => {
542
614
  let e = f.current;
543
615
  if (!e) return;
544
616
  let t = new ResizeObserver(() => {
@@ -546,11 +618,11 @@ var Y = {
546
618
  });
547
619
  return t.observe(e), () => t.disconnect();
548
620
  }, [b]);
549
- let x = /* @__PURE__ */ U("div", {
621
+ let x = /* @__PURE__ */ H("div", {
550
622
  className: "flex shrink-0 items-center justify-end gap-1",
551
623
  children: [
552
- /* @__PURE__ */ H(M, {
553
- icon: /* @__PURE__ */ H(Te, {
624
+ /* @__PURE__ */ V(M, {
625
+ icon: /* @__PURE__ */ V(Ee, {
554
626
  size: v.LG,
555
627
  "aria-hidden": !0,
556
628
  stroke: y
@@ -559,8 +631,8 @@ var Y = {
559
631
  className: "mobile:min-h-11 mobile:min-w-11",
560
632
  onClick: r
561
633
  }),
562
- g && /* @__PURE__ */ H(R, {
563
- icon: /* @__PURE__ */ H(he, {
634
+ g && /* @__PURE__ */ V(R, {
635
+ icon: /* @__PURE__ */ V(ge, {
564
636
  size: v.LG,
565
637
  "aria-hidden": !0,
566
638
  stroke: y
@@ -570,64 +642,64 @@ var Y = {
570
642
  "aria-label": a,
571
643
  className: "mobile:min-h-11 mobile:min-w-11"
572
644
  }),
573
- _ && /* @__PURE__ */ H("span", {
645
+ _ && /* @__PURE__ */ V("span", {
574
646
  className: "flex size-[40px] shrink-0 items-center justify-center mobile:min-h-11 mobile:min-w-11",
575
- children: /* @__PURE__ */ H(ie, {
647
+ children: /* @__PURE__ */ V(ae, {
576
648
  size: 20,
577
649
  ariaLabel: s
578
650
  })
579
651
  })
580
652
  ]
581
653
  });
582
- return /* @__PURE__ */ H("div", {
654
+ return /* @__PURE__ */ V("div", {
583
655
  className: u,
584
- children: /* @__PURE__ */ U("div", {
656
+ children: /* @__PURE__ */ H("div", {
585
657
  style: c,
586
658
  className: l("flex w-full min-w-0 flex-col justify-center gap-2", !d && X.wrapper, !d && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md"),
587
- children: [/* @__PURE__ */ U("div", {
659
+ children: [/* @__PURE__ */ H("div", {
588
660
  className: "flex min-w-0 flex-1 items-center gap-3",
589
- children: [g && /* @__PURE__ */ H("span", {
590
- className: l(rt.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
661
+ children: [g && /* @__PURE__ */ V("span", {
662
+ className: l(st.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
591
663
  "aria-hidden": !0
592
- }), /* @__PURE__ */ H("canvas", {
664
+ }), /* @__PURE__ */ V("canvas", {
593
665
  ref: f,
594
666
  height: 26,
595
667
  "aria-hidden": !0,
596
- className: l(rt.waveformCanvas, "h-[26px] min-w-0 flex-1")
668
+ className: l(st.waveformCanvas, "h-[26px] min-w-0 flex-1")
597
669
  })]
598
- }), /* @__PURE__ */ U("div", {
670
+ }), /* @__PURE__ */ H("div", {
599
671
  className: "flex items-center justify-between gap-2",
600
- children: [i ?? /* @__PURE__ */ H("span", { "aria-hidden": !0 }), x]
672
+ children: [i ?? /* @__PURE__ */ V("span", { "aria-hidden": !0 }), x]
601
673
  })]
602
674
  })
603
675
  });
604
- }, ct = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ H(R, {
676
+ }, ft = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ V(R, {
605
677
  "aria-label": n,
606
678
  onClick: () => e?.(),
607
679
  disabled: t,
608
680
  tooltipProps: r ? { tooltip: r } : void 0,
609
- icon: /* @__PURE__ */ H(me, {
681
+ icon: /* @__PURE__ */ V(he, {
610
682
  size: v.LG,
611
683
  className: "rtl:scale-x-[-1]",
612
684
  stroke: y
613
685
  })
614
- }), lt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ H(M, {
615
- icon: /* @__PURE__ */ H(xe, {
686
+ }), pt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ V(M, {
687
+ icon: /* @__PURE__ */ V(Se, {
616
688
  size: v.LG,
617
689
  stroke: y
618
690
  }),
619
691
  onClick: () => e?.(),
620
692
  "aria-label": t
621
- }), ut = (e, t, n, r, i) => {
693
+ }), mt = (e, t, n, r, i) => {
622
694
  let a = [...t].sort((e, t) => e.start - t.start), o = [...n].sort((e, t) => e.offset - t.offset), s = [], c = 0, l = 0, u = (t, n) => {
623
695
  if (n <= t) return;
624
696
  let r = t;
625
697
  o.filter((e) => e.offset >= t && e.offset <= n).forEach((t) => {
626
- t.offset > r && s.push(/* @__PURE__ */ H("span", {
698
+ t.offset > r && s.push(/* @__PURE__ */ V("span", {
627
699
  "aria-hidden": !0,
628
700
  children: e.slice(r, t.offset)
629
701
  }, `text-${l++}`)), s.push(t.node), r = t.offset;
630
- }), r < n && s.push(/* @__PURE__ */ H("span", {
702
+ }), r < n && s.push(/* @__PURE__ */ V("span", {
631
703
  "aria-hidden": !0,
632
704
  children: e.slice(r, n)
633
705
  }, `text-${l++}`));
@@ -635,16 +707,16 @@ var Y = {
635
707
  return a.forEach((t, n) => {
636
708
  if (u(c, t.start), t.start + t.length <= c) return;
637
709
  let a = e.slice(t.start, t.start + t.length);
638
- s.push(t.render ? /* @__PURE__ */ H("span", {
710
+ s.push(t.render ? /* @__PURE__ */ V("span", {
639
711
  className: "pointer-events-auto",
640
712
  children: t.render()
641
- }, `range-${n}`) : /* @__PURE__ */ H("span", {
713
+ }, `range-${n}`) : /* @__PURE__ */ V("span", {
642
714
  "aria-hidden": !0,
643
715
  className: t.isUnsupported ? i : r,
644
716
  children: a
645
717
  }, `range-${n}`)), c = Math.max(c, t.start + t.length);
646
718
  }), u(c, e.length), s;
647
- }, dt = (e, t) => {
719
+ }, ht = (e, t) => {
648
720
  let n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode: (e) => e.parentElement?.closest("[data-mirror-synthetic]") == null ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT }), r = 0;
649
721
  for (let e = n.nextNode(); e != null; e = n.nextNode()) {
650
722
  let n = e.textContent?.length ?? 0;
@@ -655,24 +727,24 @@ var Y = {
655
727
  r += n;
656
728
  }
657
729
  return null;
658
- }, ft = (e, t, n) => {
659
- let r = dt(e, t), i = dt(e, n);
730
+ }, gt = (e, t, n) => {
731
+ let r = ht(e, t), i = ht(e, n);
660
732
  if (r == null || i == null) return null;
661
733
  let a = document.createRange();
662
734
  return a.setStart(r.node, r.offset), a.setEnd(i.node, i.offset), a;
663
- }, pt = ({ textareaRef: e, message: t, isMirrorActive: n }) => {
664
- let r = q(null), [i, a] = J([]), o = W(() => {
735
+ }, _t = ({ textareaRef: e, message: t, isMirrorActive: n }) => {
736
+ let r = K(null), [i, a] = q([]), o = U(() => {
665
737
  let t = e.current, n = r.current;
666
738
  if (t == null || n == null) return;
667
739
  let i = t.offsetWidth > t.clientWidth;
668
740
  n.style.scrollbarGutter = i ? "stable" : "", n.scrollTop = t.scrollTop;
669
- }, [e]), s = W(() => {
741
+ }, [e]), s = U(() => {
670
742
  let t = e.current, i = r.current, o = t?.selectionStart, s = t?.selectionEnd;
671
743
  if (!n || t == null || i == null || o == null || s == null || o === s) {
672
744
  a((e) => e.length === 0 ? e : []);
673
745
  return;
674
746
  }
675
- let c = ft(i, o, s);
747
+ let c = gt(i, o, s);
676
748
  if (c == null) {
677
749
  a((e) => e.length === 0 ? e : []);
678
750
  return;
@@ -680,14 +752,14 @@ var Y = {
680
752
  let l = i.getBoundingClientRect();
681
753
  a(Array.from(c.getClientRects()).map((e) => new DOMRect(e.left - l.left, e.top - l.top + i.scrollTop, e.width, e.height)));
682
754
  }, [n, e]);
683
- return Me(() => {
755
+ return Ne(() => {
684
756
  n && o(), s();
685
757
  }, [
686
758
  n,
687
759
  o,
688
760
  s,
689
761
  t
690
- ]), G(() => {
762
+ ]), W(() => {
691
763
  if (!n) return;
692
764
  let t = e.current;
693
765
  if (t == null || typeof ResizeObserver > "u") return;
@@ -706,8 +778,8 @@ var Y = {
706
778
  updateSelectionRects: s,
707
779
  syncMirrorToTextarea: o
708
780
  };
709
- }, mt = ({ commandMenu: e, message: t, textareaRef: n, hasActiveMentions: r, markerOffset: i, triggerEnd: a, hasCommandEmptyQueryHint: o }) => {
710
- let s = q(null), c = q(null), [l, u] = J(null), d = W(() => {
781
+ }, vt = ({ commandMenu: e, message: t, textareaRef: n, hasActiveMentions: r, markerOffset: i, triggerEnd: a, hasCommandEmptyQueryHint: o }) => {
782
+ let s = K(null), c = K(null), [l, u] = q(null), d = U(() => {
711
783
  let e = s.current, t = c.current;
712
784
  if (e == null || t == null) {
713
785
  u(null);
@@ -719,7 +791,7 @@ var Y = {
719
791
  top: n.top - r.top
720
792
  });
721
793
  }, []);
722
- G(() => {
794
+ W(() => {
723
795
  if (i == null) return;
724
796
  let e = n.current;
725
797
  if (e == null || typeof ResizeObserver > "u") return;
@@ -730,18 +802,18 @@ var Y = {
730
802
  n,
731
803
  d
732
804
  ]);
733
- let f = K(() => {
805
+ let f = G(() => {
734
806
  let t = [];
735
807
  return i != null && t.push({
736
808
  offset: i,
737
- node: /* @__PURE__ */ H("span", {
809
+ node: /* @__PURE__ */ V("span", {
738
810
  ref: s,
739
811
  "aria-hidden": !0,
740
812
  className: "inline-block h-lh w-0 align-text-top"
741
813
  }, "caret-marker")
742
814
  }), o && e != null && a != null && t.push({
743
815
  offset: a,
744
- node: /* @__PURE__ */ H("span", {
816
+ node: /* @__PURE__ */ V("span", {
745
817
  className: X.commandHint,
746
818
  "aria-hidden": !0,
747
819
  "data-mirror-synthetic": !0,
@@ -753,12 +825,12 @@ var Y = {
753
825
  o,
754
826
  e,
755
827
  a
756
- ]), p = r || f.length > 0, { mirrorRef: m, selectionRects: h, updateSelectionRects: g, syncMirrorToTextarea: _ } = pt({
828
+ ]), p = r || f.length > 0, { mirrorRef: m, selectionRects: h, updateSelectionRects: g, syncMirrorToTextarea: _ } = _t({
757
829
  textareaRef: n,
758
830
  message: t,
759
831
  isMirrorActive: p
760
832
  });
761
- return Me(() => {
833
+ return Ne(() => {
762
834
  d();
763
835
  }, [
764
836
  d,
@@ -776,31 +848,31 @@ var Y = {
776
848
  _(), i != null && d();
777
849
  }
778
850
  };
779
- }, ht = (e, t) => {
851
+ }, yt = (e, t) => {
780
852
  let n = t;
781
853
  for (; n < e.length && !/\s/.test(e[n]);) n++;
782
854
  return n;
783
- }, gt = (e, t) => {
855
+ }, bt = (e, t) => {
784
856
  let n = t;
785
857
  for (; n > 0 && !/\s/.test(e[n - 1]);) n--;
786
858
  return {
787
859
  start: n,
788
- end: ht(e, n)
860
+ end: yt(e, n)
789
861
  };
790
- }, _t = (e, t) => e.startsWith(t) && !e.slice(t.length).includes(t), vt = "[role=\"option\"]:not([aria-disabled=\"true\"])", yt = /* @__PURE__ */ function(e) {
862
+ }, xt = (e, t) => e.startsWith(t) && !e.slice(t.length).includes(t), St = "[role=\"option\"]:not([aria-disabled=\"true\"])", Ct = /* @__PURE__ */ function(e) {
791
863
  return e.Next = "next", e.Previous = "previous", e;
792
- }({}), bt = ({ config: e, message: t }) => {
793
- let [n, r] = J(!1), [i, a] = J(null), [o, s] = J(null), c = q(null);
864
+ }({}), wt = ({ config: e, message: t }) => {
865
+ let [n, r] = q(!1), [i, a] = q(null), [o, s] = q(null), c = K(null);
794
866
  c.current = i;
795
867
  let l = e != null && i != null && i <= t.length ? (() => {
796
- let n = t.slice(i, ht(t, i));
797
- return _t(n, e.triggerPrefix) ? n.slice(e.triggerPrefix.length) : "";
798
- })() : "", u = W((t, n, i) => {
868
+ let n = t.slice(i, yt(t, i));
869
+ return xt(n, e.triggerPrefix) ? n.slice(e.triggerPrefix.length) : "";
870
+ })() : "", u = U((t, n, i) => {
799
871
  if (e == null || i) return;
800
- let { start: c, end: l } = gt(t, n), u = t.slice(c, l);
801
- _t(u, e.triggerPrefix) ? (a(c), u === e.triggerPrefix || o !== c ? (r(!0), s(null)) : r(!1)) : (r(!1), s(null), a(null));
872
+ let { start: c, end: l } = bt(t, n), u = t.slice(c, l);
873
+ xt(u, e.triggerPrefix) ? (a(c), u === e.triggerPrefix || o !== c ? (r(!0), s(null)) : r(!1)) : (r(!1), s(null), a(null));
802
874
  }, [e, o]);
803
- G(() => {
875
+ W(() => {
804
876
  if (e == null) {
805
877
  r(!1), s(null), a(null);
806
878
  return;
@@ -808,25 +880,25 @@ var Y = {
808
880
  let n = c.current;
809
881
  if (n == null) return;
810
882
  let i = Math.min(n, t.length);
811
- _t(t.slice(i, ht(t, i)), e.triggerPrefix) || (r(!1), s(null), a(null));
883
+ xt(t.slice(i, yt(t, i)), e.triggerPrefix) || (r(!1), s(null), a(null));
812
884
  }, [e, t]);
813
- let d = W(() => {
885
+ let d = U(() => {
814
886
  r(!1), s(i);
815
- }, [i]), f = W(() => {
887
+ }, [i]), f = U(() => {
816
888
  r(!1);
817
- }, []), p = W((n) => {
889
+ }, []), p = U((n) => {
818
890
  if (e == null) return;
819
- let { start: i, end: s } = gt(t, n);
820
- _t(t.slice(i, s), e.triggerPrefix) ? (a(i), r(o !== i)) : (a(null), r(!1));
891
+ let { start: i, end: s } = bt(t, n);
892
+ xt(t.slice(i, s), e.triggerPrefix) ? (a(i), r(o !== i)) : (a(null), r(!1));
821
893
  }, [
822
894
  e,
823
895
  t,
824
896
  o
825
- ]), m = Ae(), h = q(null), [g, _] = J(null);
826
- G(() => {
897
+ ]), m = je(), h = K(null), [g, _] = q(null);
898
+ W(() => {
827
899
  _(null);
828
900
  }, [n, l]);
829
- let v = W(() => Array.from(h.current?.querySelectorAll(vt) ?? []), []), y = W((e) => {
901
+ let v = U(() => Array.from(h.current?.querySelectorAll(St) ?? []), []), y = U((e) => {
830
902
  let t = v();
831
903
  if (t.length === 0) {
832
904
  _(null);
@@ -834,7 +906,7 @@ var Y = {
834
906
  }
835
907
  let n = t.findIndex((e) => e.id === g), r = t[e === "next" ? (n + 1) % t.length : (n <= 0 ? t.length : n) - 1];
836
908
  _(r.id), r.scrollIntoView?.({ block: "nearest" });
837
- }, [v, g]), b = W(() => v().find((e) => e.id === g) ?? null, [v, g]);
909
+ }, [v, g]), b = U(() => v().find((e) => e.id === g) ?? null, [v, g]);
838
910
  return {
839
911
  isMenuOpen: n,
840
912
  query: l,
@@ -849,22 +921,22 @@ var Y = {
849
921
  moveActiveOption: y,
850
922
  getActiveOption: b
851
923
  };
852
- }, xt = ({ commandMenu: e, message: t, setMessage: n, textareaRef: r, historyNav: i, onChange: a, caretPositionOverride: o, messageRevision: s, markCaretPlaced: c, sendOnEnter: l }) => {
853
- let { isMenuOpen: u, query: d, activeWordStart: f, dismiss: p, closeOnOutsidePress: m, handleCaretMove: h, handleValueChange: g, listboxId: _, overlayRef: v, activeOptionId: y, moveActiveOption: b, getActiveOption: x } = bt({
924
+ }, Tt = ({ commandMenu: e, message: t, setMessage: n, textareaRef: r, historyNav: i, onChange: a, caretPositionOverride: o, messageRevision: s, markCaretPlaced: c, sendOnEnter: l }) => {
925
+ let { isMenuOpen: u, query: d, activeWordStart: f, dismiss: p, closeOnOutsidePress: m, handleCaretMove: h, handleValueChange: g, listboxId: _, overlayRef: v, activeOptionId: y, moveActiveOption: b, getActiveOption: x } = wt({
854
926
  config: e,
855
927
  message: t
856
- }), S = q(h);
928
+ }), S = K(h);
857
929
  S.current = h;
858
930
  let C = () => {
859
931
  h(r.current?.selectionStart ?? t.length);
860
- }, w = q(!1), T = () => {
932
+ }, w = K(!1), T = () => {
861
933
  w.current ? w.current = !1 : requestAnimationFrame(() => {
862
934
  let e = r.current;
863
935
  S.current(e?.selectionStart ?? e?.value.length ?? 0);
864
936
  });
865
937
  }, E = (e) => {
866
938
  (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End" || e.key === "PageUp" || e.key === "PageDown") && h(e.currentTarget.selectionStart ?? t.length);
867
- }, D = e?.emptyQueryHint != null, O = e != null && f != null ? f + e.triggerPrefix.length : null, k = O != null && t.slice(O).split("\n", 1)[0] !== "", A = D && u && d === "" && O != null && !k, j = e != null && u ? f ?? 0 : null, M = W((o) => {
939
+ }, D = e?.emptyQueryHint != null, O = e != null && f != null ? f + e.triggerPrefix.length : null, k = O != null && t.slice(O).split("\n", 1)[0] !== "", A = D && u && d === "" && O != null && !k, j = e != null && u ? f ?? 0 : null, M = U((o) => {
868
940
  if (e == null || (p(), !o?.consumeQuery) || (o.returnFocus !== !1 && r.current?.focus(), f == null)) return;
869
941
  let s = `${e.triggerPrefix}${d}`, c = f + s.length;
870
942
  if (t.slice(f, c) !== s) return;
@@ -880,11 +952,11 @@ var Y = {
880
952
  i,
881
953
  a,
882
954
  r
883
- ]), N = q(void 0);
884
- G(() => {
955
+ ]), N = K(void 0);
956
+ W(() => {
885
957
  o != null && N.current !== s && (N.current = s, r.current?.setSelectionRange(o, o), c(), h(o));
886
958
  }, [t]);
887
- let P = (e) => l === Qe.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey;
959
+ let P = (e) => l === $e.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey;
888
960
  return {
889
961
  isMenuOpen: u,
890
962
  query: d,
@@ -906,33 +978,32 @@ var Y = {
906
978
  handleCommandMenuKeyDown: (e) => {
907
979
  if (!u || e.nativeEvent.isComposing) return !1;
908
980
  if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), p(), !0;
909
- if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), b(e.key === "ArrowDown" ? yt.Next : yt.Previous), !0;
981
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), b(e.key === "ArrowDown" ? Ct.Next : Ct.Previous), !0;
910
982
  if (e.key !== "Enter" || e.shiftKey) return !1;
911
983
  let t = x();
912
984
  return t == null ? P(e) ? (e.preventDefault(), !0) : !1 : (e.preventDefault(), t.click(), !0);
913
985
  }
914
986
  };
915
- }, St = ({ toolsMenuItems: e, canRemoveTools: t, isPhone: n, onToolToggle: r }) => {
916
- let [i, a] = J([]), o = (e ?? []).map((e) => e.id).join("|");
917
- return G(() => {
918
- a([]);
919
- }, [o]), {
920
- visibleTools: K(() => {
921
- let r = e ?? [];
922
- return n ? [] : t ? r.filter((e) => e.isSelected || !i.includes(e.id)) : r;
987
+ }, Et = ({ toolsMenuItems: e, canRemoveTools: t, onToolToggle: n }) => {
988
+ let [r, i] = q([]), a = (e ?? []).map((e) => e.id).join("|");
989
+ return W(() => {
990
+ i([]);
991
+ }, [a]), {
992
+ visibleTools: G(() => {
993
+ let n = e ?? [];
994
+ return t ? n.filter((e) => e.isSelected || !r.includes(e.id)) : n;
923
995
  }, [
924
996
  e,
925
- i,
926
- t,
927
- n
997
+ r,
998
+ t
928
999
  ]),
929
- handleToolDismiss: W((t) => {
930
- a((e) => e.includes(t) ? e : [...e, t]), e?.find((e) => e.id === t)?.isSelected && r?.(t);
931
- }, [e, r])
1000
+ handleToolDismiss: U((t) => {
1001
+ i((e) => e.includes(t) ? e : [...e, t]), e?.find((e) => e.id === t)?.isSelected && n?.(t);
1002
+ }, [e, n])
932
1003
  };
933
- }, Ct = ({ addAttachments: e, isAttachmentsEnabled: t, isTextAttachmentsAllowed: n, pasteTextThreshold: r, maxMessageLength: i, onMessageTooLong: a, commandMenu: o }) => {
934
- let s = t && n, { handlePaste: c } = pe(e, s ? r : Infinity);
935
- return W((e) => {
1004
+ }, Dt = ({ addAttachments: e, isAttachmentsEnabled: t, isTextAttachmentsAllowed: n, pasteTextThreshold: r, maxMessageLength: i, onMessageTooLong: a, commandMenu: o }) => {
1005
+ let s = t && n, { handlePaste: c } = me(e, s ? r : Infinity);
1006
+ return U((e) => {
936
1007
  if (!s) {
937
1008
  let t = e.clipboardData.getData("text/plain");
938
1009
  t.length >= i && a?.(t.length, i);
@@ -947,7 +1018,7 @@ var Y = {
947
1018
  c,
948
1019
  o
949
1020
  ]);
950
- }, wt = ({ message: e, setMessage: t, attachments: n, resetAttachments: r, historyNav: i, onSend: a, onMessageTooLong: o, maxMessageLength: s, isSendDisabled: c, isVoiceActive: l, isInputDisabled: u, isStreaming: d, canSend: f, hasModelSelected: p, handleUndoKeyDown: m, handleCommandMenuKeyDown: h, isSendGesture: g, onBackspaceAtCaret: _ }) => {
1021
+ }, Ot = ({ message: e, setMessage: t, attachments: n, resetAttachments: r, historyNav: i, onSend: a, onMessageTooLong: o, maxMessageLength: s, isSendDisabled: c, isVoiceActive: l, isInputDisabled: u, isStreaming: d, canSend: f, hasModelSelected: p, handleUndoKeyDown: m, handleCommandMenuKeyDown: h, isSendGesture: g, onBackspaceAtCaret: _ }) => {
951
1022
  let v = async () => {
952
1023
  if (c || l) return;
953
1024
  if (e.length >= s) {
@@ -981,7 +1052,7 @@ var Y = {
981
1052
  if (t != null) {
982
1053
  n.preventDefault();
983
1054
  let r = n.currentTarget;
984
- r.setSelectionRange(t.start, t.start + t.length), typeof document.execCommand == "function" && document.execCommand("delete", !1) || He(r, e.slice(0, t.start) + e.slice(t.start + t.length), t.start);
1055
+ r.setSelectionRange(t.start, t.start + t.length), typeof document.execCommand == "function" && document.execCommand("delete", !1) || Ue(r, e.slice(0, t.start) + e.slice(t.start + t.length), t.start);
985
1056
  return;
986
1057
  }
987
1058
  }
@@ -990,16 +1061,16 @@ var Y = {
990
1061
  }
991
1062
  }
992
1063
  };
993
- }, Tt = ({ addAttachments: e, buildAttachments: t, draftRef: n, setMessage: r, historyNav: i, onChange: a, onTranscribeAudio: o, voiceErrorLabel: s, textareaRef: c, skipFocusMenuEvaluationRef: l }) => {
994
- let u = W((n) => {
1064
+ }, kt = ({ addAttachments: e, buildAttachments: t, draftRef: n, setMessage: r, historyNav: i, onChange: a, onTranscribeAudio: o, voiceErrorLabel: s, textareaRef: c, skipFocusMenuEvaluationRef: l }) => {
1065
+ let u = U((n) => {
995
1066
  e(t([n]));
996
- }, [e, t]), d = q(!1), [f, p] = J({
1067
+ }, [e, t]), d = K(!1), [f, p] = q({
997
1068
  text: "",
998
1069
  revision: 0
999
- }), { state: m, analyserNodeRef: h, errorMessage: g, startRecording: _, stopRecording: v, discardRecording: y } = Ze({
1070
+ }), { state: m, analyserNodeRef: h, errorMessage: g, startRecording: _, stopRecording: v, discardRecording: y } = Qe({
1000
1071
  onAttachAudio: u,
1001
1072
  onTranscribeAudio: o,
1002
- onTranscript: W((e) => {
1073
+ onTranscript: U((e) => {
1003
1074
  let t = e.trim();
1004
1075
  if (t) {
1005
1076
  let e = n.current, o = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
@@ -1016,9 +1087,9 @@ var Y = {
1016
1087
  a
1017
1088
  ]),
1018
1089
  errorLabel: s
1019
- }), b = m === Ge.Recording || m === Ge.Processing;
1020
- return G(() => {
1021
- if (m === Ge.Error || m === Ge.Idle && d.current) {
1090
+ }), b = m === Ke.Recording || m === Ke.Processing;
1091
+ return W(() => {
1092
+ if (m === Ke.Error || m === Ke.Idle && d.current) {
1022
1093
  d.current = !1;
1023
1094
  let e = c.current;
1024
1095
  if (e != null) {
@@ -1041,7 +1112,7 @@ var Y = {
1041
1112
  isVoiceActive: b,
1042
1113
  latestTranscript: f
1043
1114
  };
1044
- }, Et = (e) => c({
1115
+ }, At = (e) => c({
1045
1116
  "--ci-bg": e?.background,
1046
1117
  "--ci-text": e?.text,
1047
1118
  "--ci-border": e?.border,
@@ -1060,10 +1131,10 @@ var Y = {
1060
1131
  "--ci-mention-highlight-unsupported-bg": e?.mentionHighlightUnsupportedBg,
1061
1132
  "--ci-mention-highlight-unsupported-text": e?.mentionHighlightUnsupportedText,
1062
1133
  "--ci-selection-highlight-bg": e?.selectionHighlightBg
1063
- }), Dt = {
1134
+ }), jt = {
1064
1135
  item: "_item_1sr2n_1",
1065
1136
  itemIcon: "_itemIcon_1sr2n_11"
1066
- }, Ot = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: s = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: d = "", colors: f }) => {
1137
+ }, Mt = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: s = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: d = "", colors: f }) => {
1067
1138
  let p = (e) => {
1068
1139
  e(), r();
1069
1140
  }, m = c({
@@ -1072,7 +1143,7 @@ var Y = {
1072
1143
  "--ci-sheet-item-active": f?.itemActiveBg,
1073
1144
  "--ci-sheet-icon": f?.itemIcon
1074
1145
  });
1075
- return /* @__PURE__ */ H(Fe, {
1146
+ return /* @__PURE__ */ V(Ie, {
1076
1147
  isOpen: e,
1077
1148
  title: t,
1078
1149
  closeLabel: n,
@@ -1081,23 +1152,23 @@ var Y = {
1081
1152
  className: o,
1082
1153
  titleClassName: s,
1083
1154
  colors: f?.shell,
1084
- children: /* @__PURE__ */ H("ul", {
1155
+ children: /* @__PURE__ */ V("ul", {
1085
1156
  role: "list",
1086
1157
  className: "flex flex-col",
1087
1158
  style: m,
1088
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(h, {
1159
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ V(h, {
1089
1160
  type: "button",
1090
- className: l(Dt.item, "w-full gap-3 px-4 py-[10px] text-start"),
1091
- iconBefore: /* @__PURE__ */ H("span", {
1092
- className: Dt.itemIcon,
1161
+ className: l(jt.item, "w-full gap-3 px-4 py-[10px] text-start"),
1162
+ iconBefore: /* @__PURE__ */ V("span", {
1163
+ className: jt.itemIcon,
1093
1164
  children: n
1094
1165
  }),
1095
- iconAfter: r ? /* @__PURE__ */ H("span", {
1166
+ iconAfter: r ? /* @__PURE__ */ V("span", {
1096
1167
  className: "ms-auto",
1097
1168
  children: r
1098
1169
  }) : null,
1099
1170
  textClassName: d,
1100
- label: /* @__PURE__ */ H("span", {
1171
+ label: /* @__PURE__ */ V("span", {
1101
1172
  className: u,
1102
1173
  children: t
1103
1174
  }),
@@ -1105,9 +1176,9 @@ var Y = {
1105
1176
  }) }, e))
1106
1177
  })
1107
1178
  });
1108
- }, kt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
1109
- let [s, c] = J(t), [l, u] = J(n), [d, f] = J(r), p = q(o);
1110
- G(() => {
1179
+ }, Nt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
1180
+ let [s, c] = q(t), [l, u] = q(n), [d, f] = q(r), p = K(o);
1181
+ W(() => {
1111
1182
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
1112
1183
  }, [
1113
1184
  o,
@@ -1124,7 +1195,7 @@ var Y = {
1124
1195
  setResponseFormat: c,
1125
1196
  setSystemPrompt: u,
1126
1197
  setTemperature: f,
1127
- handleSubmit: W(() => {
1198
+ handleSubmit: U(() => {
1128
1199
  if (!m) return;
1129
1200
  let t = {};
1130
1201
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -1138,17 +1209,17 @@ var Y = {
1138
1209
  a
1139
1210
  ])
1140
1211
  };
1141
- }, At = { label: "_label_14i7c_1" }, jt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: s, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
1212
+ }, Pt = { label: "_label_14i7c_1" }, Ft = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: s, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
1142
1213
  "Precise",
1143
1214
  "Neutral",
1144
1215
  "Creative"
1145
1216
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
1146
- let S = c({ "--csf-label-text": x?.labelText }), C = l(b, At.label, "gap-1");
1147
- return /* @__PURE__ */ U("div", {
1217
+ let S = c({ "--csf-label-text": x?.labelText }), C = l(b, Pt.label, "gap-1");
1218
+ return /* @__PURE__ */ H("div", {
1148
1219
  className: "flex flex-col gap-4 px-6 pb-3",
1149
1220
  style: S,
1150
1221
  children: [
1151
- e.responseFormat && /* @__PURE__ */ H(z, {
1222
+ e.responseFormat && /* @__PURE__ */ V(z, {
1152
1223
  id: "response-format",
1153
1224
  labelProps: {
1154
1225
  label: d,
@@ -1167,18 +1238,18 @@ var Y = {
1167
1238
  }],
1168
1239
  onChange: (e) => a(e)
1169
1240
  }),
1170
- e.systemPrompt && /* @__PURE__ */ H(ae, {
1241
+ e.systemPrompt && /* @__PURE__ */ V(oe, {
1171
1242
  value: n,
1172
1243
  placeholder: g,
1173
1244
  className: i,
1174
- resize: oe.Vertical,
1245
+ resize: se.Vertical,
1175
1246
  labelProps: {
1176
1247
  className: C,
1177
1248
  label: h
1178
1249
  },
1179
1250
  onChange: (e) => s(e ?? "")
1180
1251
  }),
1181
- e.temperature && /* @__PURE__ */ H(re, {
1252
+ e.temperature && /* @__PURE__ */ V(ie, {
1182
1253
  labelProps: {
1183
1254
  label: _,
1184
1255
  className: C,
@@ -1195,8 +1266,8 @@ var Y = {
1195
1266
  })
1196
1267
  ]
1197
1268
  });
1198
- }, Mt = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: c, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
1199
- let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: O, setSystemPrompt: k, setTemperature: A, handleSubmit: j } = kt({
1269
+ }, It = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: c, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
1270
+ let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: O, setSystemPrompt: k, setTemperature: A, handleSubmit: j } = Nt({
1200
1271
  isOpen: e,
1201
1272
  features: o,
1202
1273
  initialResponseFormat: s,
@@ -1205,7 +1276,7 @@ var Y = {
1205
1276
  onSave: d,
1206
1277
  onClose: r
1207
1278
  });
1208
- return /* @__PURE__ */ U(Fe, {
1279
+ return /* @__PURE__ */ H(Ie, {
1209
1280
  isOpen: e,
1210
1281
  title: f,
1211
1282
  closeLabel: i,
@@ -1213,7 +1284,7 @@ var Y = {
1213
1284
  onBack: t,
1214
1285
  backLabel: n,
1215
1286
  style: a,
1216
- children: [/* @__PURE__ */ H(jt, {
1287
+ children: [/* @__PURE__ */ V(Ft, {
1217
1288
  features: o,
1218
1289
  responseFormat: w,
1219
1290
  systemPrompt: T,
@@ -1230,13 +1301,13 @@ var Y = {
1230
1301
  temperatureLabel: y,
1231
1302
  temperatureLabels: b,
1232
1303
  temperatureHint: x
1233
- }), /* @__PURE__ */ H("div", {
1304
+ }), /* @__PURE__ */ V("div", {
1234
1305
  className: l("px-6 py-4 mobile:pb-8"),
1235
- children: /* @__PURE__ */ H(ce, {
1306
+ children: /* @__PURE__ */ V(le, {
1236
1307
  tooltip: C,
1237
1308
  hideTooltip: D || !C,
1238
1309
  triggerClassName: "w-full",
1239
- children: /* @__PURE__ */ H(L, {
1310
+ children: /* @__PURE__ */ V(L, {
1240
1311
  label: S,
1241
1312
  onClick: j,
1242
1313
  disabled: !D,
@@ -1245,8 +1316,8 @@ var Y = {
1245
1316
  })
1246
1317
  })]
1247
1318
  });
1248
- }, Nt = { modal: "_modal_kl0h0_1" }, Pt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: l, responseFormatHint: u, responseFormatMarkdownLabel: d, responseFormatPlainTextLabel: f, systemPromptLabel: p, systemPromptTooltip: m, temperatureLabel: h, temperatureLabels: _, temperatureHint: v, saveLabel: y = "Apply changes", saveDisabledTooltip: b, backgroundClassName: x = Nt.modal, colors: S }) => {
1249
- let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = kt({
1319
+ }, Lt = { modal: "_modal_kl0h0_1" }, Rt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: l, responseFormatHint: u, responseFormatMarkdownLabel: d, responseFormatPlainTextLabel: f, systemPromptLabel: p, systemPromptTooltip: m, temperatureLabel: h, temperatureLabels: _, temperatureHint: v, saveLabel: y = "Apply changes", saveDisabledTooltip: b, backgroundClassName: x = Lt.modal, colors: S }) => {
1320
+ let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Nt({
1250
1321
  features: e,
1251
1322
  initialResponseFormat: t,
1252
1323
  initialSystemPrompt: n,
@@ -1254,7 +1325,7 @@ var Y = {
1254
1325
  onSave: i,
1255
1326
  onClose: a
1256
1327
  });
1257
- return /* @__PURE__ */ H(F, {
1328
+ return /* @__PURE__ */ V(F, {
1258
1329
  open: !0,
1259
1330
  header: o,
1260
1331
  titleClassName: s,
@@ -1272,7 +1343,7 @@ var Y = {
1272
1343
  hideTooltip: E
1273
1344
  } : void 0
1274
1345
  }],
1275
- children: /* @__PURE__ */ H(jt, {
1346
+ children: /* @__PURE__ */ V(Ft, {
1276
1347
  features: e,
1277
1348
  responseFormat: C,
1278
1349
  systemPrompt: w,
@@ -1292,56 +1363,14 @@ var Y = {
1292
1363
  })
1293
1364
  });
1294
1365
  }, Z = {
1295
- icon: "_icon_1fv6z_1",
1296
- selectedIcon: "_selectedIcon_1fv6z_5"
1297
- }, Ft = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: s, onToolToggle: u, itemLabelClassName: d = "dial-small-text", colors: f }) => {
1298
- let m = c({
1299
- "--tbs-icon-text": f?.iconText,
1300
- "--tbs-selected-icon-text": f?.selectedIconText
1301
- });
1302
- return /* @__PURE__ */ H(Fe, {
1303
- isOpen: e,
1304
- title: o,
1305
- closeLabel: i,
1306
- onClose: r,
1307
- onBack: t,
1308
- backLabel: n,
1309
- style: a,
1310
- children: /* @__PURE__ */ H("div", {
1311
- role: "menu",
1312
- "aria-label": o,
1313
- className: "flex flex-col px-2 pb-4",
1314
- style: m,
1315
- children: s.map((e) => /* @__PURE__ */ H(k, {
1316
- role: "menuitemcheckbox",
1317
- "aria-checked": e.isSelected,
1318
- icon: /* @__PURE__ */ H("span", {
1319
- className: l("flex items-center", Z.icon),
1320
- children: e.icon
1321
- }),
1322
- label: e.label,
1323
- labelClassName: d,
1324
- trailing: e.isSelected ? /* @__PURE__ */ H("span", {
1325
- className: l("flex", Z.selectedIcon),
1326
- children: /* @__PURE__ */ H(he, {
1327
- size: p,
1328
- "aria-hidden": !0,
1329
- stroke: y
1330
- })
1331
- }) : void 0,
1332
- onClick: () => u(e.id)
1333
- }, e.id))
1334
- })
1335
- });
1336
- }, Q = {
1337
1366
  toolIcon: "_toolIcon_ma5s5_1",
1338
1367
  chevronIcon: "_chevronIcon_ma5s5_5"
1339
- }, It = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: m = "w-[240px]", isDisabled: h = !1, chatSettings: g, extraMenuItems: _, toolsMenuItems: x = [], onToolToggle: S, toolsMenuTitle: C = "Tools", toolsBackLabel: T = "Back", menuOverlays: E, getCaretPosition: D, colors: O }) => {
1340
- let k = d(), j = f(), [M, N] = J(!1), P = q(0), [ee, F] = J(!1), [I, L] = J(!1), [R, z] = J(!1), [B, V] = J(null), te = W((e) => {
1341
- e && (P.current = 0), F(e), e || (z(!1), V(null));
1342
- }, []), ne = q(j);
1343
- G(() => {
1344
- ne.current !== j && (ne.current = j, j ? (N(ee && !R && B === null), F(!1)) : (P.current = R || B !== null ? -1 : 0, F(M || R || B !== null), N(!1)));
1368
+ }, zt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: m = "w-[240px]", isDisabled: h = !1, chatSettings: g, extraMenuItems: _, toolsMenuItems: x = [], onToolToggle: S, toolsMenuTitle: C = "Tools", toolsBackLabel: T = "Back", menuOverlays: E, getCaretPosition: D, colors: O }) => {
1369
+ let k = d(), j = f(), [M, N] = q(!1), P = K(0), [ee, F] = q(!1), [I, L] = q(!1), [R, z] = q(!1), [B, te] = q(null), ne = U((e) => {
1370
+ e && (P.current = 0), F(e), e || (z(!1), te(null));
1371
+ }, []), re = K(j);
1372
+ W(() => {
1373
+ re.current !== j && (re.current = j, j ? (N(ee && !R && B === null), F(!1)) : (P.current = R || B !== null ? -1 : 0, F(M || R || B !== null), N(!1)));
1345
1374
  }, [
1346
1375
  j,
1347
1376
  ee,
@@ -1349,15 +1378,15 @@ var Y = {
1349
1378
  R,
1350
1379
  B
1351
1380
  ]);
1352
- let re = K(() => c({
1381
+ let ie = G(() => c({
1353
1382
  "--aab-tool-icon": O?.toolIcon,
1354
1383
  "--aab-chevron-icon": O?.chevronIcon
1355
- }), [O?.toolIcon, O?.chevronIcon]), ie = x.length > 0 && S != null, ae = K(() => x.map((e) => ({
1384
+ }), [O?.toolIcon, O?.chevronIcon]), ae = x.length > 0 && S != null, oe = G(() => x.map((e) => ({
1356
1385
  key: e.id,
1357
1386
  label: e.label,
1358
- icon: /* @__PURE__ */ H("span", {
1359
- style: re,
1360
- className: l("flex items-center", Q.toolIcon),
1387
+ icon: /* @__PURE__ */ V("span", {
1388
+ style: ie,
1389
+ className: l("flex items-center", Z.toolIcon),
1361
1390
  children: e.icon
1362
1391
  }),
1363
1392
  selectable: !0,
@@ -1367,12 +1396,12 @@ var Y = {
1367
1396
  })), [
1368
1397
  x,
1369
1398
  S,
1370
- re
1371
- ]), oe = K(() => [
1399
+ ie
1400
+ ]), se = G(() => [
1372
1401
  ...e == null ? [] : [{
1373
1402
  key: "attach",
1374
1403
  label: r,
1375
- icon: /* @__PURE__ */ H(be, {
1404
+ icon: /* @__PURE__ */ V(xe, {
1376
1405
  size: p,
1377
1406
  "aria-hidden": !0,
1378
1407
  stroke: y
@@ -1380,10 +1409,10 @@ var Y = {
1380
1409
  onClick: e
1381
1410
  }],
1382
1411
  ..._ ?? [],
1383
- ...ie ? [{
1412
+ ...ae ? [{
1384
1413
  key: "tools",
1385
1414
  label: C,
1386
- icon: /* @__PURE__ */ H(we, {
1415
+ icon: /* @__PURE__ */ V(Te, {
1387
1416
  size: p,
1388
1417
  "aria-hidden": !0,
1389
1418
  stroke: y
@@ -1391,17 +1420,17 @@ var Y = {
1391
1420
  onClick: j ? () => {
1392
1421
  z(!0);
1393
1422
  } : () => void 0,
1394
- ...j ? { iconAfter: /* @__PURE__ */ H(_e, {
1423
+ ...j ? { iconAfter: /* @__PURE__ */ V(ve, {
1395
1424
  size: p,
1396
1425
  stroke: y,
1397
- style: re,
1398
- className: l("rtl:scale-x-[-1]", Q.chevronIcon),
1426
+ style: ie,
1427
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1399
1428
  "aria-hidden": !0
1400
1429
  }) } : {
1401
- children: ae,
1430
+ children: oe,
1402
1431
  subMenuOpen: R,
1403
1432
  onSubMenuOpenChange: (e) => {
1404
- z(e), e && V(null);
1433
+ z(e), e && te(null);
1405
1434
  }
1406
1435
  }
1407
1436
  }] : [],
@@ -1410,53 +1439,53 @@ var Y = {
1410
1439
  label: e.title,
1411
1440
  icon: e.icon,
1412
1441
  onClick: j ? () => {
1413
- V(e.key);
1442
+ te(e.key);
1414
1443
  } : () => void 0,
1415
- ...j ? { iconAfter: /* @__PURE__ */ H(_e, {
1444
+ ...j ? { iconAfter: /* @__PURE__ */ V(ve, {
1416
1445
  size: p,
1417
1446
  stroke: y,
1418
- style: re,
1419
- className: l("rtl:scale-x-[-1]", Q.chevronIcon),
1447
+ style: ie,
1448
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1420
1449
  "aria-hidden": !0
1421
1450
  }) } : {
1422
1451
  subMenuOpen: B === e.key,
1423
1452
  onSubMenuOpenChange: (t) => {
1424
- V((n) => t ? e.key : n === e.key ? null : n), t && z(!1);
1453
+ te((n) => t ? e.key : n === e.key ? null : n), t && z(!1);
1425
1454
  },
1426
- renderSubMenu: () => e.renderOverlay(() => te(!1), D?.() ?? 0)
1455
+ renderSubMenu: () => e.renderOverlay(() => ne(!1), D?.() ?? 0)
1427
1456
  }
1428
1457
  })),
1429
1458
  ...t == null ? [] : [{
1430
1459
  key: "record-voice",
1431
1460
  label: n,
1432
- icon: /* @__PURE__ */ H(ye, {
1461
+ icon: /* @__PURE__ */ V(be, {
1433
1462
  size: p,
1434
1463
  "aria-hidden": !0,
1435
1464
  stroke: y
1436
1465
  }),
1437
1466
  onClick: () => {
1438
- te(!1), t();
1467
+ ne(!1), t();
1439
1468
  }
1440
1469
  }],
1441
1470
  ...g == null ? [] : [{
1442
1471
  key: "chat-settings",
1443
1472
  label: g.menuItemLabel ?? "Chat settings",
1444
- icon: /* @__PURE__ */ H(Ce, {
1473
+ icon: /* @__PURE__ */ V(we, {
1445
1474
  size: p,
1446
1475
  "aria-hidden": !0,
1447
1476
  stroke: y
1448
1477
  }),
1449
- iconAfter: k ? /* @__PURE__ */ H(_e, {
1478
+ iconAfter: k ? /* @__PURE__ */ V(ve, {
1450
1479
  size: p,
1451
1480
  stroke: y,
1452
- style: re,
1453
- className: l("rtl:scale-x-[-1]", Q.chevronIcon),
1481
+ style: ie,
1482
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1454
1483
  "aria-hidden": !0
1455
1484
  }) : null,
1456
1485
  onClick: () => L(!0)
1457
1486
  }]
1458
1487
  ], [
1459
- te,
1488
+ ne,
1460
1489
  r,
1461
1490
  e,
1462
1491
  t,
@@ -1465,28 +1494,28 @@ var Y = {
1465
1494
  _,
1466
1495
  k,
1467
1496
  j,
1468
- ie,
1497
+ ae,
1469
1498
  R,
1470
1499
  B,
1471
1500
  C,
1472
- ae,
1501
+ oe,
1473
1502
  E,
1474
1503
  D,
1475
- re
1504
+ ie
1476
1505
  ]);
1477
- if (oe.length === 0) return null;
1478
- let se = /* @__PURE__ */ H(b, {
1506
+ if (se.length === 0) return null;
1507
+ let ce = /* @__PURE__ */ V(b, {
1479
1508
  matchReferenceWidth: !1,
1480
1509
  placement: "bottom-start",
1481
1510
  listClassName: m,
1482
1511
  initialFocus: P.current,
1483
1512
  overlayAriaLabel: i,
1484
- items: oe,
1513
+ items: se,
1485
1514
  disabled: h,
1486
1515
  open: ee,
1487
- onOpenChange: te,
1488
- children: /* @__PURE__ */ H(w, {
1489
- icon: /* @__PURE__ */ H(Se, {
1516
+ onOpenChange: ne,
1517
+ children: /* @__PURE__ */ V(w, {
1518
+ icon: /* @__PURE__ */ V(Ce, {
1490
1519
  size: v.LG,
1491
1520
  "aria-hidden": !0,
1492
1521
  stroke: y
@@ -1497,10 +1526,10 @@ var Y = {
1497
1526
  disabled: h
1498
1527
  })
1499
1528
  });
1500
- return /* @__PURE__ */ U(le, { children: [
1501
- j ? /* @__PURE__ */ U(le, { children: [
1502
- /* @__PURE__ */ H(w, {
1503
- icon: /* @__PURE__ */ H(Se, {
1529
+ return /* @__PURE__ */ H(ue, { children: [
1530
+ j ? /* @__PURE__ */ H(ue, { children: [
1531
+ /* @__PURE__ */ V(w, {
1532
+ icon: /* @__PURE__ */ V(Ce, {
1504
1533
  size: v.LG,
1505
1534
  "aria-hidden": !0,
1506
1535
  stroke: y
@@ -1510,47 +1539,47 @@ var Y = {
1510
1539
  disabled: h,
1511
1540
  onClick: () => N(!0)
1512
1541
  }),
1513
- /* @__PURE__ */ H(Ot, {
1542
+ /* @__PURE__ */ V(Mt, {
1514
1543
  isOpen: M,
1515
1544
  title: a,
1516
1545
  closeLabel: s,
1517
1546
  onClose: () => N(!1),
1518
1547
  style: u,
1519
- items: oe,
1548
+ items: se,
1520
1549
  className: "pb-4",
1521
1550
  btnTextClassName: "flex-1"
1522
1551
  }),
1523
- ie && /* @__PURE__ */ H(Ft, {
1552
+ ae && /* @__PURE__ */ V(nt, {
1524
1553
  isOpen: R,
1525
1554
  onBack: () => {
1526
1555
  z(!1), N(!0);
1527
1556
  },
1528
1557
  backLabel: T,
1529
- onClose: () => te(!1),
1558
+ onClose: () => ne(!1),
1530
1559
  closeLabel: s,
1531
1560
  style: u,
1532
1561
  title: C,
1533
1562
  items: x,
1534
1563
  onToolToggle: S
1535
1564
  }),
1536
- E?.map((e) => /* @__PURE__ */ H(Fe, {
1565
+ E?.map((e) => /* @__PURE__ */ V(Ie, {
1537
1566
  isOpen: B === e.key,
1538
1567
  title: e.title,
1539
1568
  closeLabel: s,
1540
1569
  onBack: () => {
1541
- V(null), N(!0);
1570
+ te(null), N(!0);
1542
1571
  },
1543
1572
  backLabel: e.backLabel ?? "Back",
1544
- onClose: () => te(!1),
1573
+ onClose: () => ne(!1),
1545
1574
  style: u,
1546
- children: /* @__PURE__ */ H("div", {
1575
+ children: /* @__PURE__ */ V("div", {
1547
1576
  role: "menu",
1548
1577
  "aria-label": e.title,
1549
- children: e.renderOverlay(() => te(!1), D?.() ?? 0)
1578
+ children: e.renderOverlay(() => ne(!1), D?.() ?? 0)
1550
1579
  })
1551
1580
  }, e.key))
1552
- ] }) : /* @__PURE__ */ H(le, { children: se }),
1553
- k && g != null && /* @__PURE__ */ H(Mt, {
1581
+ ] }) : /* @__PURE__ */ V(ue, { children: ce }),
1582
+ k && g != null && /* @__PURE__ */ V(It, {
1554
1583
  isOpen: I,
1555
1584
  onBack: () => {
1556
1585
  L(!1), j ? N(!0) : F(!0);
@@ -1577,7 +1606,7 @@ var Y = {
1577
1606
  saveLabel: g.saveLabel,
1578
1607
  saveDisabledTooltip: g.saveDisabledTooltip
1579
1608
  }),
1580
- !k && g != null && I && /* @__PURE__ */ H(Pt, {
1609
+ !k && g != null && I && /* @__PURE__ */ V(Rt, {
1581
1610
  features: g.features,
1582
1611
  initialResponseFormat: g.responseFormat ?? o.Markdown,
1583
1612
  initialSystemPrompt: g.systemPrompt,
@@ -1599,18 +1628,18 @@ var Y = {
1599
1628
  colors: g.modalColors
1600
1629
  })
1601
1630
  ] });
1602
- }, Lt = ({ fileInputRef: e, textareaRef: t, message: n, style: r, hideAttachFile: i, isInputDisabled: a, isStreaming: o, isAttachmentsEnabled: s, isVoiceRecordingSupported: c, isVoiceActive: l, startRecording: u, isPhone: d, canRemoveTools: f, toolsMenuItems: m, onToolToggle: h, chatSettings: g, menuOverlays: _, onDialFileSystemClick: v, dialFileSystemLabel: b, attachLabel: x, addMenuTitle: S, menuTitle: C, menuCloseLabel: w, recordVoiceLabel: T, toolsMenuTitle: E, toolsBackLabel: D }) => {
1603
- let O = K(() => v ? [{
1631
+ }, Bt = ({ fileInputRef: e, textareaRef: t, message: n, style: r, hideAttachFile: i, isInputDisabled: a, isStreaming: o, isAttachmentsEnabled: s, isVoiceRecordingSupported: c, isVoiceActive: l, startRecording: u, isPhone: d, canRemoveTools: f, toolsMenuItems: m, onToolToggle: h, chatSettings: g, menuOverlays: _, onDialFileSystemClick: v, dialFileSystemLabel: b, attachLabel: x, addMenuTitle: S, menuTitle: C, menuCloseLabel: w, recordVoiceLabel: T, toolsMenuTitle: E, toolsBackLabel: D }) => {
1632
+ let O = G(() => v ? [{
1604
1633
  key: "dial-fs",
1605
1634
  label: b ?? "DIAL file system",
1606
- icon: /* @__PURE__ */ H(ve, {
1635
+ icon: /* @__PURE__ */ V(ye, {
1607
1636
  size: p,
1608
1637
  "aria-hidden": !0,
1609
1638
  stroke: y
1610
1639
  }),
1611
1640
  onClick: v
1612
1641
  }] : [], [v, b]);
1613
- return /* @__PURE__ */ H(It, {
1642
+ return /* @__PURE__ */ V(zt, {
1614
1643
  onAttachClick: i ? void 0 : () => e.current?.click(),
1615
1644
  attachLabel: x,
1616
1645
  addMenuTitle: S,
@@ -1620,7 +1649,7 @@ var Y = {
1620
1649
  isDisabled: a || l,
1621
1650
  chatSettings: g,
1622
1651
  extraMenuItems: O,
1623
- onRecordVoice: c && s && !o && !l ? () => u(Ke.Attachment) : void 0,
1652
+ onRecordVoice: c && s && !o && !l ? () => u(qe.Attachment) : void 0,
1624
1653
  recordVoiceLabel: T,
1625
1654
  toolsMenuItems: f || d ? m : void 0,
1626
1655
  onToolToggle: h,
@@ -1629,14 +1658,14 @@ var Y = {
1629
1658
  menuOverlays: _,
1630
1659
  getCaretPosition: () => t.current?.selectionStart ?? n.length
1631
1660
  });
1632
- }, Rt = ({ textarea: e, textareaRef: t, commandMenu: n, caretAnchor: r, fontClassName: i, isMenuOpen: a, query: o, activeWordStart: s, listboxId: c, activeOptionId: u, overlayRef: d, onOutsidePress: f, onClose: p }) => /* @__PURE__ */ U(le, { children: [e, n != null && /* @__PURE__ */ H("div", {
1661
+ }, Vt = ({ textarea: e, textareaRef: t, commandMenu: n, caretAnchor: r, fontClassName: i, isMenuOpen: a, query: o, activeWordStart: s, listboxId: c, activeOptionId: u, overlayRef: d, onOutsidePress: f, onClose: p }) => /* @__PURE__ */ H(ue, { children: [e, n != null && /* @__PURE__ */ V("div", {
1633
1662
  "aria-hidden": !0,
1634
1663
  className: l("pointer-events-none absolute", i || "dial-body-paragraph-text"),
1635
1664
  style: {
1636
1665
  left: r?.left ?? 0,
1637
1666
  top: r?.top ?? 0
1638
1667
  },
1639
- children: /* @__PURE__ */ H(b, {
1668
+ children: /* @__PURE__ */ V(b, {
1640
1669
  open: a,
1641
1670
  onOpenChange: (e) => {
1642
1671
  e || f();
@@ -1649,7 +1678,7 @@ var Y = {
1649
1678
  outsidePressIgnoreRef: t,
1650
1679
  renderOverlay: () => {
1651
1680
  let e = n.menuLabel != null;
1652
- return /* @__PURE__ */ H("div", {
1681
+ return /* @__PURE__ */ V("div", {
1653
1682
  ref: d,
1654
1683
  role: e ? "group" : void 0,
1655
1684
  "aria-label": n.menuLabel,
@@ -1662,18 +1691,18 @@ var Y = {
1662
1691
  })
1663
1692
  });
1664
1693
  },
1665
- children: /* @__PURE__ */ H("span", {
1694
+ children: /* @__PURE__ */ V("span", {
1666
1695
  "aria-hidden": !0,
1667
1696
  className: "inline-block h-lh w-0"
1668
1697
  })
1669
1698
  })
1670
- })] }), zt = ({ areaRef: e, mirrorRef: t, isMirrorActive: n, fontClassName: r, message: i, mentionRanges: a, mirrorInsertions: o, selectionRects: s, children: c }) => /* @__PURE__ */ U("div", {
1699
+ })] }), Ht = ({ areaRef: e, mirrorRef: t, isMirrorActive: n, fontClassName: r, message: i, mentionRanges: a, mirrorInsertions: o, selectionRects: s, children: c }) => /* @__PURE__ */ H("div", {
1671
1700
  ref: e,
1672
1701
  className: "relative -ms-1 -me-1 w-[calc(100%+8px)]",
1673
- children: [n && /* @__PURE__ */ U("div", {
1702
+ children: [n && /* @__PURE__ */ H("div", {
1674
1703
  ref: t,
1675
1704
  className: l(X.textarea, r || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden ps-1 pe-1 wrap-anywhere whitespace-pre-wrap"),
1676
- children: [ut(i, a, o, X.mentionHighlight, X.mentionHighlightUnsupported), s.map((e, t) => /* @__PURE__ */ H("div", {
1705
+ children: [mt(i, a, o, X.mentionHighlight, X.mentionHighlightUnsupported), s.map((e, t) => /* @__PURE__ */ V("div", {
1677
1706
  "aria-hidden": !0,
1678
1707
  className: l("pointer-events-none absolute rounded-sm", X.selectionHighlight),
1679
1708
  style: {
@@ -1684,54 +1713,54 @@ var Y = {
1684
1713
  }
1685
1714
  }, `selection-${t}`))]
1686
1715
  }), c]
1687
- }), Bt = ({ size: e = 20 }) => /* @__PURE__ */ H(te, {
1688
- variant: ne.Circular,
1716
+ }), Q = ({ size: e = 20 }) => /* @__PURE__ */ V(ne, {
1717
+ variant: re.Circular,
1689
1718
  width: e,
1690
1719
  height: e,
1691
1720
  active: !0
1692
- }), Vt = ({ loadingLabel: e }) => /* @__PURE__ */ U("span", {
1721
+ }), Ut = ({ loadingLabel: e }) => /* @__PURE__ */ H("span", {
1693
1722
  className: "flex min-w-0 flex-1 items-center",
1694
- children: [/* @__PURE__ */ H(te, {
1695
- variant: ne.Text,
1723
+ children: [/* @__PURE__ */ V(ne, {
1724
+ variant: re.Text,
1696
1725
  width: "100%",
1697
1726
  height: 16,
1698
1727
  active: !0
1699
- }), e && /* @__PURE__ */ H("span", {
1728
+ }), e && /* @__PURE__ */ V("span", {
1700
1729
  className: "sr-only",
1701
1730
  children: e
1702
1731
  })]
1703
- }), Ht = () => /* @__PURE__ */ H("div", {
1732
+ }), Wt = () => /* @__PURE__ */ V("div", {
1704
1733
  "aria-hidden": "true",
1705
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ U("div", {
1734
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ H("div", {
1706
1735
  className: "flex h-11 items-center gap-3 px-4",
1707
- children: [/* @__PURE__ */ H(Bt, {}), /* @__PURE__ */ H(Vt, {})]
1736
+ children: [/* @__PURE__ */ V(Q, {}), /* @__PURE__ */ V(Ut, {})]
1708
1737
  }, t))
1709
- }), Ut = (e) => e.displayName ?? e.id, Wt = (e, t) => {
1738
+ }), Gt = (e) => e.displayName ?? e.id, Kt = (e, t) => {
1710
1739
  let n = t.trim().toLowerCase();
1711
- return n ? e.filter((e) => Ut(e).toLowerCase().includes(n)) : e;
1712
- }, Gt = (e, t, r, i = 18, a) => /* @__PURE__ */ H(n, {
1740
+ return n ? e.filter((e) => Gt(e).toLowerCase().includes(n)) : e;
1741
+ }, qt = (e, t, r, i = 18, a) => /* @__PURE__ */ V(n, {
1713
1742
  src: e,
1714
1743
  size: i,
1715
1744
  labels: { tooltip: a },
1716
1745
  initialsName: r
1717
- }), Kt = {
1746
+ }), Jt = {
1718
1747
  searchHeader: "_searchHeader_1u7db_1",
1719
1748
  itemText: "_itemText_1u7db_13",
1720
1749
  itemHover: "_itemHover_1u7db_17",
1721
1750
  selectedItemBackground: "_selectedItemBackground_1u7db_22",
1722
1751
  selectedItemText: "_selectedItemText_1u7db_26",
1723
1752
  checkIcon: "_checkIcon_1u7db_30"
1724
- }, qt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1725
- let [a, o] = J(""), s = K(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = K(() => u ? /* @__PURE__ */ H(Bt, { size: v.LG }) : Gt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", v.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1753
+ }, Yt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1754
+ let [a, o] = q(""), s = G(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = G(() => u ? /* @__PURE__ */ V(Q, { size: v.LG }) : qt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", v.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1726
1755
  u,
1727
1756
  s,
1728
1757
  d,
1729
1758
  r?.unavailableTooltip
1730
- ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", g = K(() => {
1759
+ ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", g = G(() => {
1731
1760
  if (u) return Array.from({ length: 7 }, (e, t) => ({
1732
1761
  key: `__loading-${t}`,
1733
- icon: /* @__PURE__ */ H(Bt, {}),
1734
- label: /* @__PURE__ */ H(Vt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1762
+ icon: /* @__PURE__ */ V(Q, {}),
1763
+ label: /* @__PURE__ */ V(Ut, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1735
1764
  disabled: !0
1736
1765
  }));
1737
1766
  if (!e || e.length === 0) {
@@ -1743,19 +1772,19 @@ var Y = {
1743
1772
  }] : [];
1744
1773
  }
1745
1774
  let o = i?.colors;
1746
- return Wt(e, a).map((e) => {
1775
+ return Kt(e, a).map((e) => {
1747
1776
  let r = e.id === t;
1748
1777
  return {
1749
1778
  key: e.id,
1750
- label: /* @__PURE__ */ H(T, {
1751
- text: Ut(e),
1779
+ label: /* @__PURE__ */ V(T, {
1780
+ text: Gt(e),
1752
1781
  query: a,
1753
1782
  maxLines: 1
1754
1783
  }),
1755
- icon: Gt(e.iconUrl, e.type, e.displayName ?? e.id),
1784
+ icon: qt(e.iconUrl, e.type, e.displayName ?? e.id),
1756
1785
  mark: A.Check,
1757
1786
  checked: r,
1758
- className: l(o?.itemText && Kt.itemText, o?.itemHoverBackground && Kt.itemHover, r && o?.selectedItemBackground && Kt.selectedItemBackground, r && o?.selectedItemText && Kt.selectedItemText, r && o?.checkIcon && Kt.checkIcon, i?.itemClassName, r && i?.selectedItemClassName, Y.modelMenuItem, r && Y.modelMenuItemSelected),
1787
+ className: l(o?.itemText && Jt.itemText, o?.itemHoverBackground && Jt.itemHover, r && o?.selectedItemBackground && Jt.selectedItemBackground, r && o?.selectedItemText && Jt.selectedItemText, r && o?.checkIcon && Jt.checkIcon, i?.itemClassName, r && i?.selectedItemClassName, J.modelMenuItem, r && J.modelMenuItemSelected),
1759
1788
  onClick: () => n?.(e.id)
1760
1789
  };
1761
1790
  });
@@ -1769,7 +1798,7 @@ var Y = {
1769
1798
  i?.itemClassName,
1770
1799
  i?.selectedItemClassName,
1771
1800
  i?.colors
1772
- ]), _ = K(() => c({
1801
+ ]), _ = G(() => c({
1773
1802
  "--ms-item-text": i?.colors?.itemText,
1774
1803
  "--ms-item-hover-bg": i?.colors?.itemHoverBackground,
1775
1804
  "--ms-selected-item-bg": i?.colors?.selectedItemBackground,
@@ -1784,10 +1813,10 @@ var Y = {
1784
1813
  selectedLabel: p,
1785
1814
  selectedVersion: m,
1786
1815
  menuItems: g,
1787
- menuHeader: K(() => !u && e && e.length > 0 ? /* @__PURE__ */ H("div", {
1816
+ menuHeader: G(() => !u && e && e.length > 0 ? /* @__PURE__ */ V("div", {
1788
1817
  style: c({ "--ms-search-header-bg": i?.colors?.searchHeaderBackground }),
1789
- className: l("sticky top-0 z-10 pe-2 pt-2 pb-1", Kt.searchHeader, i?.searchHeaderClassName, Y.modelMenuSearch),
1790
- children: /* @__PURE__ */ H(V, {
1818
+ className: l("sticky top-0 z-10 pe-2 pt-2 pb-1", Jt.searchHeader, i?.searchHeaderClassName, J.modelMenuSearch),
1819
+ children: /* @__PURE__ */ V(te, {
1791
1820
  value: a,
1792
1821
  placeholder: r?.searchPlaceholder ?? "Search",
1793
1822
  size: S.Small,
@@ -1807,8 +1836,8 @@ var Y = {
1807
1836
  e || o("");
1808
1837
  }
1809
1838
  };
1810
- }, $ = typeof window < "u" ? Me : G;
1811
- function Jt(e) {
1839
+ }, $ = typeof window < "u" ? Ne : W;
1840
+ function Xt(e) {
1812
1841
  let t = e;
1813
1842
  for (; t;) {
1814
1843
  if (t.dir) return t.dir === "rtl";
@@ -1816,35 +1845,35 @@ function Jt(e) {
1816
1845
  }
1817
1846
  return !1;
1818
1847
  }
1819
- function Yt() {
1848
+ function Zt() {
1820
1849
  return () => {};
1821
1850
  }
1822
- function Xt() {
1823
- return Ne(Yt, () => !1, () => !0);
1851
+ function Qt() {
1852
+ return Pe(Zt, () => !1, () => !0);
1824
1853
  }
1825
- function Zt(e) {
1854
+ function $t(e) {
1826
1855
  return e?.ownerDocument.defaultView ?? window;
1827
1856
  }
1828
- function Qt(e) {
1829
- return Zt(e).ResizeObserver ?? (typeof ResizeObserver < "u" ? ResizeObserver : void 0);
1857
+ function en(e) {
1858
+ return $t(e).ResizeObserver ?? (typeof ResizeObserver < "u" ? ResizeObserver : void 0);
1830
1859
  }
1831
- function $t(e) {
1860
+ function tn(e) {
1832
1861
  if (e !== void 0) switch (typeof e) {
1833
1862
  case "number": return e;
1834
1863
  case "string": if (e.endsWith("px")) return parseFloat(e);
1835
1864
  }
1836
1865
  }
1837
- function en({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1838
- let { styleHeight: s, styleWidth: c } = K(() => ({
1839
- styleHeight: $t(o?.height),
1840
- styleWidth: $t(o?.width)
1841
- }), [o?.height, o?.width]), [l, u] = J({
1866
+ function nn({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1867
+ let { styleHeight: s, styleWidth: c } = G(() => ({
1868
+ styleHeight: tn(o?.height),
1869
+ styleWidth: tn(o?.width)
1870
+ }), [o?.height, o?.width]), [l, u] = q({
1842
1871
  height: t,
1843
1872
  width: n
1844
1873
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1845
1874
  return $(() => {
1846
1875
  if (i === null || d) return;
1847
- let t = Qt(i);
1876
+ let t = en(i);
1848
1877
  if (!t) return;
1849
1878
  let n = new t((e) => {
1850
1879
  for (let t of e) {
@@ -1864,7 +1893,7 @@ function en({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1864
1893
  i,
1865
1894
  s,
1866
1895
  c
1867
- ]), K(() => ({
1896
+ ]), G(() => ({
1868
1897
  height: s ?? l.height,
1869
1898
  width: c ?? l.width
1870
1899
  }), [
@@ -1873,27 +1902,27 @@ function en({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1873
1902
  c
1874
1903
  ]);
1875
1904
  }
1876
- function tn(e) {
1877
- let t = q(() => {
1905
+ function rn(e) {
1906
+ let t = K(() => {
1878
1907
  throw Error("Cannot call an event handler while rendering.");
1879
1908
  });
1880
1909
  return $(() => {
1881
1910
  t.current = e;
1882
- }, [e]), W((...e) => t.current?.(...e), [t]);
1911
+ }, [e]), U((...e) => t.current?.(...e), [t]);
1883
1912
  }
1884
- var nn = /* @__PURE__ */ new WeakMap();
1885
- function rn(e = !1, t = document) {
1886
- let n = nn.get(t);
1913
+ var an = /* @__PURE__ */ new WeakMap();
1914
+ function on(e = !1, t = document) {
1915
+ let n = an.get(t);
1887
1916
  if (n === void 0 || e) {
1888
1917
  let e = t.createElement("div"), r = e.style;
1889
1918
  r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
1890
1919
  let i = t.createElement("div"), a = i.style;
1891
- a.width = "100px", a.height = "100px", e.appendChild(i), t.body.appendChild(e), e.scrollLeft > 0 ? n = "positive-descending" : (e.scrollLeft = 1, n = e.scrollLeft === 0 ? "negative" : "positive-ascending"), t.body.removeChild(e), nn.set(t, n);
1920
+ a.width = "100px", a.height = "100px", e.appendChild(i), t.body.appendChild(e), e.scrollLeft > 0 ? n = "positive-descending" : (e.scrollLeft = 1, n = e.scrollLeft === 0 ? "negative" : "positive-ascending"), t.body.removeChild(e), an.set(t, n);
1892
1921
  }
1893
1922
  return n;
1894
1923
  }
1895
- function an({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1896
- if (t === "horizontal" && n) switch (rn(!1, e?.ownerDocument ?? document)) {
1924
+ function sn({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1925
+ if (t === "horizontal" && n) switch (on(!1, e?.ownerDocument ?? document)) {
1897
1926
  case "negative": return -r;
1898
1927
  case "positive-descending": if (e) {
1899
1928
  let { clientWidth: t, scrollWidth: n } = e;
@@ -1902,8 +1931,8 @@ function an({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1902
1931
  }
1903
1932
  return r;
1904
1933
  }
1905
- function on({ container: e, element: t, onChange: n }) {
1906
- let r = Zt(t), i = Qt(t), a = r.MutationObserver ?? (typeof MutationObserver < "u" ? MutationObserver : void 0), o = i ? new i(n) : void 0, s = (e) => !e.isConnected || (e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0, c = a ? new a((e) => {
1934
+ function cn({ container: e, element: t, onChange: n }) {
1935
+ let r = $t(t), i = en(t), a = r.MutationObserver ?? (typeof MutationObserver < "u" ? MutationObserver : void 0), o = i ? new i(n) : void 0, s = (e) => !e.isConnected || (e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0, c = a ? new a((e) => {
1907
1936
  e.some((e) => Array.from(e.addedNodes).some(s) || e.removedNodes.length > 0 && e.nextSibling !== null && s(e.nextSibling)) && (u(), n());
1908
1937
  }) : void 0, l = /* @__PURE__ */ new Set(), u = () => {
1909
1938
  for (let e of l) o?.unobserve(e);
@@ -1920,33 +1949,33 @@ function on({ container: e, element: t, onChange: n }) {
1920
1949
  o?.disconnect(), c?.disconnect();
1921
1950
  };
1922
1951
  }
1923
- function sn(e) {
1952
+ function ln(e) {
1924
1953
  return e.window === e;
1925
1954
  }
1926
- function cn(e, t) {
1927
- return t === "window" ? e ? Zt(e) : null : t ?? null;
1955
+ function un(e, t) {
1956
+ return t === "window" ? e ? $t(e) : null : t ?? null;
1928
1957
  }
1929
- function ln(e, t) {
1930
- return sn(e) ? t === "vertical" ? e.scrollY : e.scrollX : t === "vertical" ? e.scrollTop : e.scrollLeft;
1958
+ function dn(e, t) {
1959
+ return ln(e) ? t === "vertical" ? e.scrollY : e.scrollX : t === "vertical" ? e.scrollTop : e.scrollLeft;
1931
1960
  }
1932
- function un(e, t) {
1933
- let n = sn(e) ? e.document.scrollingElement ?? e.document.documentElement : e;
1961
+ function fn(e, t) {
1962
+ let n = ln(e) ? e.document.scrollingElement ?? e.document.documentElement : e;
1934
1963
  return t === "vertical" ? n.scrollHeight - n.clientHeight : n.scrollWidth - n.clientWidth;
1935
1964
  }
1936
- function dn(e, t) {
1937
- let { overflowX: n, overflowY: r } = Zt(e).getComputedStyle(e), i = t === "vertical" ? r : n;
1965
+ function pn(e, t) {
1966
+ let { overflowX: n, overflowY: r } = $t(e).getComputedStyle(e), i = t === "vertical" ? r : n;
1938
1967
  return i === "visible" || i === "clip" ? !1 : t === "vertical" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
1939
1968
  }
1940
- function fn({ containerElement: e, direction: t, isRtl: n, scrollTarget: r }) {
1969
+ function mn({ containerElement: e, direction: t, isRtl: n, scrollTarget: r }) {
1941
1970
  let i = t === "vertical", a, o;
1942
- if (sn(r)) {
1971
+ if (ln(r)) {
1943
1972
  let { documentElement: e } = r.document;
1944
1973
  a = 0, o = i ? e.clientHeight : e.clientWidth;
1945
1974
  } else {
1946
1975
  let e = r.getBoundingClientRect();
1947
1976
  a = i ? e.top + r.clientTop : e.left + r.clientLeft, o = i ? r.clientHeight : r.clientWidth;
1948
1977
  }
1949
- let s = a + o, c = e.getBoundingClientRect(), l = i ? c.top + e.clientTop : c.left + e.clientLeft, u = i ? e.clientHeight : e.clientWidth, d = l + u, f = an({
1978
+ let s = a + o, c = e.getBoundingClientRect(), l = i ? c.top + e.clientTop : c.left + e.clientLeft, u = i ? e.clientHeight : e.clientWidth, d = l + u, f = sn({
1950
1979
  containerElement: e,
1951
1980
  direction: t,
1952
1981
  isRtl: n,
@@ -1959,8 +1988,8 @@ function fn({ containerElement: e, direction: t, isRtl: n, scrollTarget: r }) {
1959
1988
  viewportSize: o
1960
1989
  };
1961
1990
  }
1962
- function pn({ direction: e, isRtl: t, scrollTarget: n, viewportSize: r }) {
1963
- let i = sn(n) ? n.document.documentElement : n, a = Zt(i).getComputedStyle(i), o = (e) => {
1991
+ function hn({ direction: e, isRtl: t, scrollTarget: n, viewportSize: r }) {
1992
+ let i = ln(n) ? n.document.documentElement : n, a = $t(i).getComputedStyle(i), o = (e) => {
1964
1993
  let t = parseFloat(e ?? "");
1965
1994
  return !Number.isFinite(t) || t < 0 ? 0 : e.endsWith("px") ? t : e.endsWith("%") ? t * r / 100 : 0;
1966
1995
  };
@@ -1977,26 +2006,26 @@ function pn({ direction: e, isRtl: t, scrollTarget: n, viewportSize: r }) {
1977
2006
  start: s
1978
2007
  };
1979
2008
  }
1980
- function mn(e, t = "Assertion error") {
2009
+ function gn(e, t = "Assertion error") {
1981
2010
  if (!e) throw console.error(t), Error(t);
1982
2011
  }
1983
- function hn(e, t) {
2012
+ function _n(e, t) {
1984
2013
  if (e === t) return !0;
1985
- if (!!e != !!t || (mn(e !== void 0), mn(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
2014
+ if (!!e != !!t || (gn(e !== void 0), gn(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1986
2015
  for (let n in e) if (!Object.hasOwn(t, n) || !Object.is(t[n], e[n])) return !1;
1987
2016
  return !0;
1988
2017
  }
1989
- function gn({ cachedBounds: e, itemCount: t, itemSize: n }) {
2018
+ function vn({ cachedBounds: e, itemCount: t, itemSize: n }) {
1990
2019
  if (t === 0) return 0;
1991
2020
  if (typeof n == "number") return t * n;
1992
2021
  {
1993
2022
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1994
- return mn(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
2023
+ return gn(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1995
2024
  }
1996
2025
  }
1997
- function _n({ align: e, cachedBounds: t, clamp: n = !0, index: r, itemCount: i, itemSize: a, containerScrollOffset: o, containerSize: s }) {
2026
+ function yn({ align: e, cachedBounds: t, clamp: n = !0, index: r, itemCount: i, itemSize: a, containerScrollOffset: o, containerSize: s }) {
1998
2027
  if (r < 0 || r >= i) throw RangeError(`Invalid index specified: ${r}`, { cause: `Index ${r} is not within the range of 0 - ${i - 1}` });
1999
- let c = t.get(r), l = gn({
2028
+ let c = t.get(r), l = vn({
2000
2029
  cachedBounds: t,
2001
2030
  itemCount: i,
2002
2031
  itemSize: a
@@ -2008,7 +2037,7 @@ function _n({ align: e, cachedBounds: t, clamp: n = !0, index: r, itemCount: i,
2008
2037
  default: return p ? o : o < f ? f : d;
2009
2038
  }
2010
2039
  }
2011
- function vn({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
2040
+ function bn({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
2012
2041
  let a = r - 1;
2013
2042
  if (r === 0) return {
2014
2043
  startIndexVisible: 0,
@@ -2042,12 +2071,12 @@ function vn({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
2042
2071
  stopIndexOverscan: Math.min(a, s + i)
2043
2072
  };
2044
2073
  }
2045
- function yn({ itemCount: e, itemProps: t, itemSize: n }) {
2074
+ function xn({ itemCount: e, itemProps: t, itemSize: n }) {
2046
2075
  let r = /* @__PURE__ */ new Map();
2047
2076
  return {
2048
2077
  itemSize: typeof n == "number" ? n : void 0,
2049
2078
  get(i) {
2050
- if (mn(i < e, `Invalid index ${i}`), typeof n == "number") return mn(i >= 0, `Invalid index ${i}`), {
2079
+ if (gn(i < e, `Invalid index ${i}`), typeof n == "number") return gn(i >= 0, `Invalid index ${i}`), {
2051
2080
  size: n,
2052
2081
  scrollOffset: i * n
2053
2082
  };
@@ -2059,14 +2088,14 @@ function yn({ itemCount: e, itemProps: t, itemSize: n }) {
2059
2088
  });
2060
2089
  else {
2061
2090
  let t = r.get(e - 1);
2062
- mn(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
2091
+ gn(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
2063
2092
  scrollOffset: t.scrollOffset + t.size,
2064
2093
  size: a
2065
2094
  });
2066
2095
  }
2067
2096
  }
2068
2097
  let a = r.get(i);
2069
- return mn(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
2098
+ return gn(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
2070
2099
  },
2071
2100
  set(e, t) {
2072
2101
  r.set(e, t);
@@ -2076,8 +2105,8 @@ function yn({ itemCount: e, itemProps: t, itemSize: n }) {
2076
2105
  }
2077
2106
  };
2078
2107
  }
2079
- function bn({ itemCount: e, itemProps: t, itemSize: n }) {
2080
- return K(() => yn({
2108
+ function Sn({ itemCount: e, itemProps: t, itemSize: n }) {
2109
+ return G(() => xn({
2081
2110
  itemCount: e,
2082
2111
  itemProps: t,
2083
2112
  itemSize: n
@@ -2087,27 +2116,27 @@ function bn({ itemCount: e, itemProps: t, itemSize: n }) {
2087
2116
  n
2088
2117
  ]);
2089
2118
  }
2090
- function xn({ containerSize: e, itemSize: t }) {
2119
+ function Cn({ containerSize: e, itemSize: t }) {
2091
2120
  let n;
2092
2121
  switch (typeof t) {
2093
2122
  case "string":
2094
- mn(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), mn(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseFloat(t) / 100;
2123
+ gn(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), gn(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseFloat(t) / 100;
2095
2124
  break;
2096
2125
  default: n = t;
2097
2126
  }
2098
2127
  return typeof n == "number" && !(Number.isFinite(n) && n > 0) && (n = 0), n;
2099
2128
  }
2100
- function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, defaultScrollOffset: r = 0, direction: i, isRtl: a = !1, itemCount: o, itemProps: s, itemSize: c, onResize: l, overscanCount: u, scrollElement: d }) {
2101
- let f = d !== void 0, p = f ? cn(e, d) : e, { height: m = n, width: h = n } = en({
2129
+ function wn({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, defaultScrollOffset: r = 0, direction: i, isRtl: a = !1, itemCount: o, itemProps: s, itemSize: c, onResize: l, overscanCount: u, scrollElement: d }) {
2130
+ let f = d !== void 0, p = f ? un(e, d) : e, { height: m = n, width: h = n } = nn({
2102
2131
  defaultHeight: i === "vertical" ? n : void 0,
2103
2132
  defaultWidth: i === "horizontal" ? n : void 0,
2104
2133
  element: e,
2105
2134
  mode: i === "vertical" ? "only-height" : "only-width",
2106
2135
  style: t
2107
- }), g = q({
2136
+ }), g = K({
2108
2137
  height: 0,
2109
2138
  width: 0
2110
- }), [_, v] = J(n), y = f ? _ : i === "vertical" ? m : h, b = xn({
2139
+ }), [_, v] = q(n), y = f ? _ : i === "vertical" ? m : h, b = Cn({
2111
2140
  containerSize: y,
2112
2141
  itemSize: c
2113
2142
  });
@@ -2124,11 +2153,11 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2124
2153
  l,
2125
2154
  h
2126
2155
  ]);
2127
- let x = bn({
2156
+ let x = Sn({
2128
2157
  itemCount: o,
2129
2158
  itemProps: s,
2130
2159
  itemSize: b
2131
- }), S = Xt(), [C] = J(() => S || f ? 0 : r), w = W((e) => x.get(e), [x]), [T, E] = J(() => vn({
2160
+ }), S = Qt(), [C] = q(() => S || f ? 0 : r), w = U((e) => x.get(e), [x]), [T, E] = q(() => bn({
2132
2161
  cachedBounds: x,
2133
2162
  containerScrollOffset: C,
2134
2163
  containerSize: y,
@@ -2139,7 +2168,7 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2139
2168
  startIndexOverscan: Math.min(o - 1, T.startIndexOverscan),
2140
2169
  stopIndexVisible: Math.min(o - 1, T.stopIndexVisible),
2141
2170
  stopIndexOverscan: Math.min(o - 1, T.stopIndexOverscan)
2142
- }, j = W(() => gn({
2171
+ }, j = U(() => vn({
2143
2172
  cachedBounds: x,
2144
2173
  itemCount: o,
2145
2174
  itemSize: b
@@ -2147,14 +2176,14 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2147
2176
  x,
2148
2177
  o,
2149
2178
  b
2150
- ]), M = W((t) => {
2151
- let n = an({
2179
+ ]), M = U((t) => {
2180
+ let n = sn({
2152
2181
  containerElement: e,
2153
2182
  direction: i,
2154
2183
  isRtl: a,
2155
2184
  scrollOffset: t
2156
2185
  });
2157
- return vn({
2186
+ return bn({
2158
2187
  cachedBounds: x,
2159
2188
  containerScrollOffset: n,
2160
2189
  containerSize: y,
@@ -2169,17 +2198,17 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2169
2198
  a,
2170
2199
  o,
2171
2200
  u
2172
- ]), N = q(!1);
2201
+ ]), N = K(!1);
2173
2202
  $(() => {
2174
2203
  if (!e || o === 0 || f || N.current || (N.current = !0, r <= 0)) return;
2175
- let t = i === "horizontal" && Jt(e);
2176
- if (an({
2204
+ let t = i === "horizontal" && Xt(e);
2205
+ if (sn({
2177
2206
  containerElement: e,
2178
2207
  direction: i,
2179
2208
  isRtl: t,
2180
2209
  scrollOffset: i === "vertical" ? e.scrollTop : e.scrollLeft
2181
2210
  }) !== 0) return;
2182
- let n = an({
2211
+ let n = sn({
2183
2212
  containerElement: e,
2184
2213
  direction: i,
2185
2214
  isRtl: t,
@@ -2191,14 +2220,14 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2191
2220
  }) : i === "vertical" ? e.scrollTop = n : e.scrollLeft = n;
2192
2221
  }, [e, o]), $(() => {
2193
2222
  if (f && e && p) return;
2194
- let t = e && !f ? M(i === "vertical" ? e.scrollTop : e.scrollLeft) : vn({
2223
+ let t = e && !f ? M(i === "vertical" ? e.scrollTop : e.scrollLeft) : bn({
2195
2224
  cachedBounds: x,
2196
2225
  containerScrollOffset: C,
2197
2226
  containerSize: y,
2198
2227
  itemCount: o,
2199
2228
  overscanCount: u
2200
2229
  });
2201
- E((e) => hn(t, e) ? e : t);
2230
+ E((e) => _n(t, e) ? e : t);
2202
2231
  }, [
2203
2232
  x,
2204
2233
  e,
@@ -2214,19 +2243,19 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2214
2243
  if (!e || f) return;
2215
2244
  let t = () => {
2216
2245
  E((t) => {
2217
- let { scrollLeft: n, scrollTop: r } = e, s = an({
2246
+ let { scrollLeft: n, scrollTop: r } = e, s = sn({
2218
2247
  containerElement: e,
2219
2248
  direction: i,
2220
2249
  isRtl: a,
2221
2250
  scrollOffset: i === "vertical" ? r : n
2222
- }), c = vn({
2251
+ }), c = bn({
2223
2252
  cachedBounds: x,
2224
2253
  containerScrollOffset: s,
2225
2254
  containerSize: y,
2226
2255
  itemCount: o,
2227
2256
  overscanCount: u
2228
2257
  });
2229
- return hn(c, t) ? t : c;
2258
+ return _n(c, t) ? t : c;
2230
2259
  });
2231
2260
  };
2232
2261
  return e.addEventListener("scroll", t), () => {
@@ -2242,34 +2271,34 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2242
2271
  o,
2243
2272
  u
2244
2273
  ]);
2245
- let P = tn(() => {
2274
+ let P = rn(() => {
2246
2275
  if (!e || !p) return;
2247
- let { offset: t, size: n, viewportSize: r } = fn({
2276
+ let { offset: t, size: n, viewportSize: r } = mn({
2248
2277
  containerElement: e,
2249
2278
  direction: i,
2250
2279
  isRtl: a,
2251
2280
  scrollTarget: p
2252
2281
  });
2253
2282
  v(r);
2254
- let s = vn({
2283
+ let s = bn({
2255
2284
  cachedBounds: x,
2256
2285
  containerScrollOffset: t,
2257
2286
  containerSize: n,
2258
2287
  itemCount: o,
2259
2288
  overscanCount: u
2260
2289
  });
2261
- E((e) => hn(s, e) ? e : s);
2290
+ E((e) => _n(s, e) ? e : s);
2262
2291
  });
2263
2292
  return $(() => {
2264
2293
  f && P();
2265
2294
  }), $(() => {
2266
2295
  if (!f || !e || !p) return;
2267
- let t = Zt(e), n = () => P();
2296
+ let t = $t(e), n = () => P();
2268
2297
  p.addEventListener("scroll", n, { passive: !0 }), e.addEventListener("scroll", n, { passive: !0 }), t.addEventListener("resize", n);
2269
- let r, i = Qt(e);
2270
- i && !sn(p) && (r = new i(n), r.observe(p));
2271
- let a = on({
2272
- container: sn(p) ? p.document.documentElement : p,
2298
+ let r, i = en(e);
2299
+ i && !ln(p) && (r = new i(n), r.observe(p));
2300
+ let a = cn({
2301
+ container: ln(p) ? p.document.documentElement : p,
2273
2302
  element: e,
2274
2303
  onChange: n
2275
2304
  });
@@ -2284,9 +2313,9 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2284
2313
  ]), {
2285
2314
  getCellBounds: w,
2286
2315
  getEstimatedSize: j,
2287
- getScrollPositionForIndex: tn(({ align: t = "auto", index: n }) => {
2316
+ getScrollPositionForIndex: rn(({ align: t = "auto", index: n }) => {
2288
2317
  let r = ({ clamp: e, containerScrollOffset: r, containerSize: i, padding: a }) => {
2289
- if (a.start === 0 && a.end === 0) return _n({
2318
+ if (a.start === 0 && a.end === 0) return yn({
2290
2319
  align: t,
2291
2320
  cachedBounds: x,
2292
2321
  clamp: e,
@@ -2296,7 +2325,7 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2296
2325
  itemCount: o,
2297
2326
  itemSize: b
2298
2327
  });
2299
- let s = _n({
2328
+ let s = yn({
2300
2329
  align: t,
2301
2330
  cachedBounds: x,
2302
2331
  clamp: !1,
@@ -2308,8 +2337,8 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2308
2337
  }) - a.start;
2309
2338
  return e ? Math.max(0, Math.min(j() - i, s)) : s;
2310
2339
  };
2311
- if (f && e && p && !dn(e, i)) {
2312
- let { viewportOffset: t, viewportSize: n } = fn({
2340
+ if (f && e && p && !pn(e, i)) {
2341
+ let { viewportOffset: t, viewportSize: n } = mn({
2313
2342
  containerElement: e,
2314
2343
  direction: i,
2315
2344
  isRtl: a,
@@ -2318,7 +2347,7 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2318
2347
  clamp: !1,
2319
2348
  containerScrollOffset: t,
2320
2349
  containerSize: n,
2321
- padding: pn({
2350
+ padding: hn({
2322
2351
  direction: i,
2323
2352
  isRtl: a,
2324
2353
  scrollTarget: p,
@@ -2326,20 +2355,20 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2326
2355
  })
2327
2356
  }) - t, s = i === "horizontal" && a ? -o : o;
2328
2357
  return {
2329
- scrollOffset: ln(p, i) + s,
2358
+ scrollOffset: dn(p, i) + s,
2330
2359
  scrollTarget: p
2331
2360
  };
2332
2361
  }
2333
2362
  let s = e ? i === "vertical" ? e.scrollTop : e.scrollLeft : 0, c = f && e ? i === "vertical" ? e.clientHeight : e.clientWidth : y, l = r({
2334
2363
  clamp: !0,
2335
- containerScrollOffset: an({
2364
+ containerScrollOffset: sn({
2336
2365
  containerElement: e,
2337
2366
  direction: i,
2338
2367
  isRtl: a,
2339
2368
  scrollOffset: s
2340
2369
  }),
2341
2370
  containerSize: c,
2342
- padding: e ? pn({
2371
+ padding: e ? hn({
2343
2372
  direction: i,
2344
2373
  isRtl: a,
2345
2374
  scrollTarget: e,
@@ -2350,14 +2379,14 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2350
2379
  }
2351
2380
  });
2352
2381
  if (e && (!f || p)) {
2353
- if (l = an({
2382
+ if (l = sn({
2354
2383
  containerElement: e,
2355
2384
  direction: i,
2356
2385
  isRtl: a,
2357
2386
  scrollOffset: l
2358
2387
  }), !f && typeof e.scrollTo != "function") {
2359
2388
  let e = M(l);
2360
- hn(T, e) || E(e);
2389
+ _n(T, e) || E(e);
2361
2390
  }
2362
2391
  return {
2363
2392
  scrollOffset: l,
@@ -2372,33 +2401,33 @@ function Sn({ containerElement: e, containerStyle: t, defaultContainerSize: n =
2372
2401
  stopIndexVisible: k
2373
2402
  };
2374
2403
  }
2375
- function Cn(e) {
2376
- let [t, n] = J(e);
2377
- return hn(t, e) ? t : (n(e), e);
2404
+ function Tn(e) {
2405
+ let [t, n] = q(e);
2406
+ return _n(t, e) ? t : (n(e), e);
2378
2407
  }
2379
- function wn(e, t) {
2408
+ function En(e, t) {
2380
2409
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
2381
- return hn(n, a) && hn(r, o) && hn(i, s);
2410
+ return _n(n, a) && _n(r, o) && _n(i, s);
2382
2411
  }
2383
- var Tn = "data-react-window-index", En = "data-index";
2384
- function Dn(e) {
2385
- let t = e.getAttribute(Tn) ?? e.getAttribute(En);
2412
+ var Dn = "data-react-window-index", On = "data-index";
2413
+ function kn(e) {
2414
+ let t = e.getAttribute(Dn) ?? e.getAttribute(On);
2386
2415
  return t !== null && /^\d+$/.test(t) ? Number(t) : void 0;
2387
2416
  }
2388
- var On = 1e3, kn = 500;
2389
- function An(e) {
2417
+ var An = 1e3, jn = 500;
2418
+ function Mn(e) {
2390
2419
  return 1 - (1 - e) ** 3;
2391
2420
  }
2392
- function jn({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, itemCount: i, itemElements: a, scrollTarget: o, getScrollPositionForIndex: s }) {
2393
- let c = e === "vertical", l = q(null), u = q(void 0), d = tn(() => {
2421
+ function Nn({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, itemCount: i, itemElements: a, scrollTarget: o, getScrollPositionForIndex: s }) {
2422
+ let c = e === "vertical", l = K(null), u = K(void 0), d = rn(() => {
2394
2423
  l.current = null, u.current !== void 0 && (u.current.view.cancelAnimationFrame(u.current.id), u.current = void 0);
2395
- }), f = tn(() => {
2396
- let e = Zt(t);
2424
+ }), f = rn(() => {
2425
+ let e = $t(t);
2397
2426
  u.current = {
2398
2427
  id: e.requestAnimationFrame(p),
2399
2428
  view: e
2400
2429
  };
2401
- }), p = tn(() => {
2430
+ }), p = rn(() => {
2402
2431
  u.current = void 0;
2403
2432
  let o = l.current;
2404
2433
  if (!o) return;
@@ -2412,27 +2441,27 @@ function jn({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
2412
2441
  index: o.index
2413
2442
  });
2414
2443
  if (m !== void 0) {
2415
- let { scrollOffset: t, scrollTarget: r } = m, s = Math.max(0, Math.min(t, un(r, e)));
2444
+ let { scrollOffset: t, scrollTarget: r } = m, s = Math.max(0, Math.min(t, fn(r, e)));
2416
2445
  o.animation === void 0 && (o.animation = {
2417
- deadline: p + (o.smooth ? kn : 0) + On,
2418
- startOffset: ln(r, e),
2446
+ deadline: p + (o.smooth ? jn : 0) + An,
2447
+ startOffset: dn(r, e),
2419
2448
  startTime: p
2420
2449
  });
2421
- let l = o.smooth ? (p - o.animation.startTime) / kn : 1;
2450
+ let l = o.smooth ? (p - o.animation.startTime) / jn : 1;
2422
2451
  if (l < 1) {
2423
2452
  let { startOffset: e } = o.animation;
2424
2453
  o.stableFrames = 0, r.scrollTo({
2425
2454
  behavior: "instant",
2426
- [c ? "top" : "left"]: e + (s - e) * An(l)
2455
+ [c ? "top" : "left"]: e + (s - e) * Mn(l)
2427
2456
  });
2428
- } else if (Math.abs(s - ln(r, e)) > 1) o.stableFrames = 0, r.scrollTo({
2457
+ } else if (Math.abs(s - dn(r, e)) > 1) o.stableFrames = 0, r.scrollTo({
2429
2458
  behavior: "instant",
2430
2459
  [c ? "top" : "left"]: s
2431
2460
  });
2432
2461
  else {
2433
2462
  let e = a.current;
2434
- if (!(e.some((e) => Dn(e) === o.index) && e.every((e) => {
2435
- let t = Dn(e);
2463
+ if (!(e.some((e) => kn(e) === o.index) && e.every((e) => {
2464
+ let t = kn(e);
2436
2465
  if (t === void 0 || t >= i) return !0;
2437
2466
  let r = c ? e.offsetHeight : e.offsetWidth;
2438
2467
  return Math.abs(n(t).size - r) <= 1;
@@ -2468,13 +2497,13 @@ function jn({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
2468
2497
  d,
2469
2498
  t,
2470
2499
  o
2471
- ]), W(({ align: n = "auto", behavior: i = "auto", index: a }) => {
2500
+ ]), U(({ align: n = "auto", behavior: i = "auto", index: a }) => {
2472
2501
  if (r && n === "smart") {
2473
2502
  let t = s({
2474
2503
  align: "auto",
2475
2504
  index: a
2476
2505
  });
2477
- n = t === void 0 || t.scrollOffset === ln(t.scrollTarget, e) ? "auto" : "center";
2506
+ n = t === void 0 || t.scrollOffset === dn(t.scrollTarget, e) ? "auto" : "center";
2478
2507
  }
2479
2508
  let o = s({
2480
2509
  align: n,
@@ -2506,11 +2535,11 @@ function jn({ direction: e, element: t, getCellBounds: n, isDynamicSize: r, item
2506
2535
  s
2507
2536
  ]);
2508
2537
  }
2509
- function Mn({ callback: e, element: t, enabled: n = !0 }) {
2510
- let r = tn(e);
2511
- G(() => {
2538
+ function Pn({ callback: e, element: t, enabled: n = !0 }) {
2539
+ let r = rn(e);
2540
+ W(() => {
2512
2541
  if (!n || !t) return;
2513
- let e = Zt(t), i = e.requestAnimationFrame(() => {
2542
+ let e = $t(t), i = e.requestAnimationFrame(() => {
2514
2543
  i = e.requestAnimationFrame(r);
2515
2544
  });
2516
2545
  return () => {
@@ -2522,7 +2551,7 @@ function Mn({ callback: e, element: t, enabled: n = !0 }) {
2522
2551
  r
2523
2552
  ]);
2524
2553
  }
2525
- function Nn({ elements: e, isFlowLayout: t, rowCount: n, startIndex: r, stopIndex: i }) {
2554
+ function Fn({ elements: e, isFlowLayout: t, rowCount: n, startIndex: r, stopIndex: i }) {
2526
2555
  if (r < 0 || i < r) return [];
2527
2556
  let a = [], o = /* @__PURE__ */ new Set(), s = !0;
2528
2557
  for (let t of e) {
@@ -2545,20 +2574,20 @@ function Nn({ elements: e, isFlowLayout: t, rowCount: n, startIndex: r, stopInde
2545
2574
  index: r + t
2546
2575
  }));
2547
2576
  }
2548
- function Pn(e) {
2577
+ function In(e) {
2549
2578
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
2550
2579
  }
2551
- var Fn = "data-react-window-sizer";
2552
- function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffset: r = 0, listRef: i, onResize: a, onRowsRendered: o, overscanCount: s = 3, rowComponent: c, rowCount: l, rowHeight: u, rowKey: d, rowProps: f, scrollElement: p, tagName: m = "div", style: h, ...g }) {
2553
- let _ = Cn(f), v = K(() => ke(c, wn), [c]), [y, b] = J(null), x = Pn(u), S = K(() => x ? (e) => u.getRowHeight(e) ?? u.getAverageRowHeight() : u, [x, u]), C = Xt(), [w, T] = J(() => C && x), E = q(u);
2580
+ var Ln = "data-react-window-sizer";
2581
+ function Rn({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffset: r = 0, listRef: i, onResize: a, onRowsRendered: o, overscanCount: s = 3, rowComponent: c, rowCount: l, rowHeight: u, rowKey: d, rowProps: f, scrollElement: p, tagName: m = "div", style: h, ...g }) {
2582
+ let _ = Tn(f), v = G(() => Ae(c, En), [c]), [y, b] = q(null), x = In(u), S = G(() => x ? (e) => u.getRowHeight(e) ?? u.getAverageRowHeight() : u, [x, u]), C = Qt(), [w, T] = q(() => C && x), E = K(u);
2554
2583
  $(() => {
2555
2584
  w && E.current !== u && T(!1);
2556
- }, [w, u]), Mn({
2585
+ }, [w, u]), Pn({
2557
2586
  callback: () => T(!1),
2558
2587
  element: y,
2559
2588
  enabled: w
2560
2589
  });
2561
- let { getCellBounds: D, getEstimatedSize: O, scrollTarget: k, getScrollPositionForIndex: A, startIndexOverscan: j, startIndexVisible: M, stopIndexOverscan: N, stopIndexVisible: P } = Sn({
2590
+ let { getCellBounds: D, getEstimatedSize: O, scrollTarget: k, getScrollPositionForIndex: A, startIndexOverscan: j, startIndexVisible: M, stopIndexOverscan: N, stopIndexVisible: P } = wn({
2562
2591
  containerElement: y,
2563
2592
  containerStyle: h,
2564
2593
  defaultContainerSize: n,
@@ -2570,7 +2599,7 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2570
2599
  onResize: a,
2571
2600
  overscanCount: s,
2572
2601
  scrollElement: p
2573
- }), ee = q([]), F = jn({
2602
+ }), ee = K([]), F = Nn({
2574
2603
  direction: "vertical",
2575
2604
  element: y,
2576
2605
  getCellBounds: D,
@@ -2580,7 +2609,7 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2580
2609
  scrollTarget: k,
2581
2610
  getScrollPositionForIndex: A
2582
2611
  });
2583
- je(i, () => ({
2612
+ Me(i, () => ({
2584
2613
  get element() {
2585
2614
  return y;
2586
2615
  },
@@ -2589,7 +2618,7 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2589
2618
  let I = w && x && j === 0;
2590
2619
  $(() => {
2591
2620
  if (!y) return;
2592
- let e = Array.from(y.children).filter((e) => !e.hasAttribute(Fn)), t = Nn({
2621
+ let e = Array.from(y.children).filter((e) => !e.hasAttribute(Ln)), t = Fn({
2593
2622
  elements: e,
2594
2623
  isFlowLayout: I,
2595
2624
  rowCount: l,
@@ -2597,9 +2626,9 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2597
2626
  stopIndex: N
2598
2627
  }), n = t.map(({ element: e }) => e);
2599
2628
  if (e.forEach((e) => {
2600
- n.includes(e) || e.removeAttribute(Tn);
2629
+ n.includes(e) || e.removeAttribute(Dn);
2601
2630
  }), t.forEach(({ element: e, index: t }) => {
2602
- e.setAttribute(Tn, `${t}`);
2631
+ e.setAttribute(Dn, `${t}`);
2603
2632
  }), ee.current = n, x) return u.observeRowElements(n);
2604
2633
  }, [
2605
2634
  v,
@@ -2612,7 +2641,7 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2612
2641
  _,
2613
2642
  j,
2614
2643
  N
2615
- ]), G(() => {
2644
+ ]), W(() => {
2616
2645
  j >= 0 && N >= 0 && o && o({
2617
2646
  startIndex: M,
2618
2647
  stopIndex: P
@@ -2627,11 +2656,11 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2627
2656
  N,
2628
2657
  P
2629
2658
  ]);
2630
- let L = K(() => {
2659
+ let L = G(() => {
2631
2660
  let e = [];
2632
2661
  if (l > 0) for (let t = j; t <= N; t++) {
2633
2662
  let n = D(t);
2634
- e.push(/* @__PURE__ */ De(v, {
2663
+ e.push(/* @__PURE__ */ Oe(v, {
2635
2664
  ..._,
2636
2665
  ariaAttributes: {
2637
2666
  "aria-posinset": t + 1,
@@ -2660,9 +2689,9 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2660
2689
  _,
2661
2690
  j,
2662
2691
  N
2663
- ]), R = /* @__PURE__ */ H("div", {
2692
+ ]), R = /* @__PURE__ */ V("div", {
2664
2693
  "aria-hidden": !0,
2665
- [Fn]: "",
2694
+ [Ln]: "",
2666
2695
  style: {
2667
2696
  position: I ? "absolute" : void 0,
2668
2697
  top: I ? 0 : void 0,
@@ -2670,8 +2699,8 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2670
2699
  width: "100%",
2671
2700
  zIndex: -1
2672
2701
  }
2673
- }, "sizer"), z = /* @__PURE__ */ H(Ee, { children: e }, "children"), B = /* @__PURE__ */ H(Ee, { children: L }, "rows");
2674
- return De(m, {
2702
+ }, "sizer"), z = /* @__PURE__ */ V(De, { children: e }, "children"), B = /* @__PURE__ */ V(De, { children: L }, "rows");
2703
+ return Oe(m, {
2675
2704
  role: "list",
2676
2705
  ...g,
2677
2706
  className: t,
@@ -2687,7 +2716,7 @@ function In({ children: e, className: t, defaultHeight: n = 0, defaultScrollOffs
2687
2716
  }
2688
2717
  }, ...I ? [z, B] : [B, z], R);
2689
2718
  }
2690
- var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2719
+ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
2691
2720
  search: "_search_5skzl_1",
2692
2721
  divider: "_divider_5skzl_5",
2693
2722
  item: "_item_5skzl_9",
@@ -2696,29 +2725,29 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2696
2725
  stateLabel: "_stateLabel_5skzl_27",
2697
2726
  itemSelectedBackground: "_itemSelectedBackground_5skzl_37",
2698
2727
  itemSelectedText: "_itemSelectedText_5skzl_41"
2699
- }, zn = 44, Bn = 8, Vn = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, itemClassName: s, selectedItemClassName: c, hasSelectedBackground: u, hasSelectedText: d, onSelect: f }) => {
2700
- let p = r[e], m = Gt(p.iconUrl, p.type, p.displayName ?? p.id, v.SM), g = p.id === i;
2701
- return /* @__PURE__ */ H("div", {
2728
+ }, Vn = 44, Hn = 8, Un = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, itemClassName: s, selectedItemClassName: c, hasSelectedBackground: u, hasSelectedText: d, onSelect: f }) => {
2729
+ let p = r[e], m = qt(p.iconUrl, p.type, p.displayName ?? p.id, v.SM), g = p.id === i;
2730
+ return /* @__PURE__ */ V("div", {
2702
2731
  style: t,
2703
2732
  ...n,
2704
- children: /* @__PURE__ */ H(h, {
2733
+ children: /* @__PURE__ */ V(h, {
2705
2734
  type: "button",
2706
2735
  "aria-current": g ? "true" : void 0,
2707
- className: l(Rn.item, "h-full w-full gap-3 px-4", g && u && Rn.itemSelectedBackground, g && d && Rn.itemSelectedText, s, g && c, Y.modelMenuItem, g && Y.modelMenuItemSelected),
2708
- iconBefore: /* @__PURE__ */ H("span", {
2709
- className: Rn.itemIcon,
2736
+ className: l(Bn.item, "h-full w-full gap-3 px-4", g && u && Bn.itemSelectedBackground, g && d && Bn.itemSelectedText, s, g && c, J.modelMenuItem, g && J.modelMenuItemSelected),
2737
+ iconBefore: /* @__PURE__ */ V("span", {
2738
+ className: Bn.itemIcon,
2710
2739
  children: m
2711
2740
  }),
2712
- label: /* @__PURE__ */ U("span", {
2741
+ label: /* @__PURE__ */ H("span", {
2713
2742
  className: "flex flex-1 items-center justify-between gap-2",
2714
- children: [/* @__PURE__ */ H(T, {
2743
+ children: [/* @__PURE__ */ V(T, {
2715
2744
  text: p.displayName ?? p.id,
2716
2745
  query: o,
2717
2746
  maxLines: 1,
2718
2747
  className: l(a, "min-w-0 flex-1 text-start")
2719
- }), g && /* @__PURE__ */ H(he, {
2748
+ }), g && /* @__PURE__ */ V(ge, {
2720
2749
  size: v.SM,
2721
- className: Rn.checkIcon,
2750
+ className: Bn.checkIcon,
2722
2751
  "aria-hidden": !0,
2723
2752
  stroke: y
2724
2753
  })]
@@ -2726,12 +2755,12 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2726
2755
  onClick: () => f(p.id)
2727
2756
  })
2728
2757
  });
2729
- }, Hn = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: s, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g, menuStyles: _, searchQuery: v, onSearchQueryChange: y }) => {
2730
- let [b, x] = J(""), C = v ?? b, w = y ?? x;
2731
- G(() => {
2758
+ }, Wn = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: s, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g, menuStyles: _, searchQuery: v, onSearchQueryChange: y }) => {
2759
+ let [b, x] = q(""), C = v ?? b, w = y ?? x;
2760
+ W(() => {
2732
2761
  e || x("");
2733
2762
  }, [e]);
2734
- let T = a && a.length > 0, D = u !== void 0, O = !T && !D ? d ?? f : void 0, k = T ? Wt(a, C) : [], A = (e) => {
2763
+ let T = a && a.length > 0, D = u !== void 0, O = !T && !D ? d ?? f : void 0, k = T ? Kt(a, C) : [], A = (e) => {
2735
2764
  s(e), i();
2736
2765
  }, j = _?.colors, M = c({
2737
2766
  "--ci-sheet-divider": g?.divider,
@@ -2743,17 +2772,17 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2743
2772
  "--ci-sheet-selected-bg": j?.selectedItemBackground,
2744
2773
  "--ci-sheet-selected-text": j?.selectedItemText
2745
2774
  }), N;
2746
- return N = D ? /* @__PURE__ */ H(Ht, {}) : O ? /* @__PURE__ */ H("div", {
2775
+ return N = D ? /* @__PURE__ */ V(Wt, {}) : O ? /* @__PURE__ */ V("div", {
2747
2776
  role: "list",
2748
- className: l(Rn.stateLabel, h, "px-4 py-4"),
2777
+ className: l(Bn.stateLabel, h, "px-4 py-4"),
2749
2778
  children: O
2750
- }) : /* @__PURE__ */ H(Ln, {
2779
+ }) : /* @__PURE__ */ V(zn, {
2751
2780
  role: "list",
2752
2781
  className: "overflow-y-auto",
2753
- style: { height: Math.min(k.length, Bn) * zn },
2754
- rowComponent: Vn,
2782
+ style: { height: Math.min(k.length, Hn) * Vn },
2783
+ rowComponent: Un,
2755
2784
  rowCount: k.length,
2756
- rowHeight: zn,
2785
+ rowHeight: Vn,
2757
2786
  rowProps: {
2758
2787
  items: k,
2759
2788
  selectedDeploymentId: o,
@@ -2765,41 +2794,41 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2765
2794
  hasSelectedText: !!j?.selectedItemText,
2766
2795
  onSelect: A
2767
2796
  }
2768
- }), /* @__PURE__ */ H(Fe, {
2797
+ }), /* @__PURE__ */ V(Ie, {
2769
2798
  isOpen: e,
2770
2799
  title: t,
2771
2800
  closeLabel: n,
2772
2801
  onClose: i,
2773
2802
  style: p,
2774
2803
  titleClassName: m,
2775
- className: l("max-h-[80dvh]", _?.className, Y.modelMenu),
2804
+ className: l("max-h-[80dvh]", _?.className, J.modelMenu),
2776
2805
  colors: g?.shell,
2777
- children: /* @__PURE__ */ U("div", {
2806
+ children: /* @__PURE__ */ H("div", {
2778
2807
  className: "contents",
2779
2808
  style: M,
2780
2809
  children: [
2781
- /* @__PURE__ */ H(E, {
2810
+ /* @__PURE__ */ V(E, {
2782
2811
  visuallyHidden: !0,
2783
2812
  children: D ? u : null
2784
2813
  }),
2785
- T && !D && /* @__PURE__ */ U(le, { children: [/* @__PURE__ */ H("div", {
2814
+ T && !D && /* @__PURE__ */ H(ue, { children: [/* @__PURE__ */ V("div", {
2786
2815
  style: c({ "--ci-sheet-search-bg": _?.colors?.searchHeaderBackground }),
2787
- className: l("shrink-0 px-4 py-[10px]", Rn.search, _?.searchHeaderClassName, Y.modelMenuSearch),
2788
- children: /* @__PURE__ */ H(V, {
2816
+ className: l("shrink-0 px-4 py-[10px]", Bn.search, _?.searchHeaderClassName, J.modelMenuSearch),
2817
+ children: /* @__PURE__ */ V(te, {
2789
2818
  value: C,
2790
2819
  placeholder: r,
2791
2820
  size: S.Standard,
2792
2821
  onChange: (e) => w(e ?? "")
2793
2822
  })
2794
- }), /* @__PURE__ */ H("div", { className: l(Rn.divider, "h-px shrink-0") })] }),
2823
+ }), /* @__PURE__ */ V("div", { className: l(Bn.divider, "h-px shrink-0") })] }),
2795
2824
  N
2796
2825
  ]
2797
2826
  })
2798
2827
  });
2799
- }, Un = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, menuStyles: i, nameClassName: a = "dial-small-text", versionClassName: o = "dial-tiny-text", isStreaming: u, isMobile: d, isDisabled: f = !1, style: p, modelPickerOverlay: m, isPickerOpen: g, onPickerToggle: _, onPickerOpenChange: S }) => {
2800
- let [C, T] = J(!1), E = g ?? C, D = (e) => {
2828
+ }, Gn = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, menuStyles: i, nameClassName: a = "dial-small-text", versionClassName: o = "dial-tiny-text", isStreaming: u, isMobile: d, isDisabled: f = !1, style: p, modelPickerOverlay: m, isPickerOpen: g, onPickerToggle: _, onPickerOpenChange: S }) => {
2829
+ let [C, T] = q(!1), E = g ?? C, D = (e) => {
2801
2830
  T(e), S?.(e), I(e);
2802
- }, { searchQuery: O, onSearchQueryChange: k, selectorIcon: A, selectorAriaLabel: j, selectedLabel: M, selectedVersion: N, menuItems: P, menuHeader: ee, menuStyle: F, onOpenChange: I } = qt({
2831
+ }, { searchQuery: O, onSearchQueryChange: k, selectorIcon: A, selectorAriaLabel: j, selectedLabel: M, selectedVersion: N, menuItems: P, menuHeader: ee, menuStyle: F, onOpenChange: I } = Yt({
2803
2832
  deployments: e,
2804
2833
  selectedDeploymentId: t,
2805
2834
  onDeploymentChange: n,
@@ -2807,18 +2836,18 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2807
2836
  styles: i
2808
2837
  });
2809
2838
  if (!e) return null;
2810
- let L = u || f, R = L ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, z = /* @__PURE__ */ H(ge, {
2839
+ let L = u || f, R = L ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, z = /* @__PURE__ */ V(_e, {
2811
2840
  size: v.SM,
2812
- className: l(X.modelSelectorCaret, Y.modelSelectorCaret),
2841
+ className: l(X.modelSelectorCaret, J.modelSelectorCaret),
2813
2842
  "aria-hidden": !0,
2814
2843
  stroke: y
2815
- }), B = /* @__PURE__ */ H("span", {
2816
- className: l("flex shrink-0 items-center", Y.modelSelectorIcon),
2844
+ }), B = /* @__PURE__ */ V("span", {
2845
+ className: l("flex shrink-0 items-center", J.modelSelectorIcon),
2817
2846
  children: A
2818
2847
  });
2819
- if (d) return /* @__PURE__ */ U(le, { children: [/* @__PURE__ */ H(w, {
2848
+ if (d) return /* @__PURE__ */ H(ue, { children: [/* @__PURE__ */ V(w, {
2820
2849
  tooltipProps: { tooltip: M },
2821
- icon: /* @__PURE__ */ U("div", {
2850
+ icon: /* @__PURE__ */ H("div", {
2822
2851
  className: "flex items-center gap-1",
2823
2852
  children: [B, z]
2824
2853
  }),
@@ -2827,16 +2856,16 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2827
2856
  onClick: () => {
2828
2857
  L || D(!0);
2829
2858
  },
2830
- className: l("w-[50px]", X.modelSelectorButton, R, Y.modelSelectorButton)
2831
- }), m ? /* @__PURE__ */ H(Fe, {
2859
+ className: l("w-[50px]", X.modelSelectorButton, R, J.modelSelectorButton)
2860
+ }), m ? /* @__PURE__ */ V(Ie, {
2832
2861
  isOpen: E,
2833
2862
  title: r?.ariaLabel ?? "Select model",
2834
2863
  closeLabel: r?.closeLabel ?? "Close",
2835
2864
  onClose: () => D(!1),
2836
2865
  style: p,
2837
- className: l(i?.className, Y.modelMenu),
2866
+ className: l(i?.className, J.modelMenu),
2838
2867
  children: m(() => D(!1))
2839
- }) : /* @__PURE__ */ H(Hn, {
2868
+ }) : /* @__PURE__ */ V(Wn, {
2840
2869
  searchQuery: O,
2841
2870
  onSearchQueryChange: k,
2842
2871
  isOpen: E,
@@ -2855,7 +2884,7 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2855
2884
  })] });
2856
2885
  if (m) {
2857
2886
  let e = N ? `${M} · ${N}` : M;
2858
- return /* @__PURE__ */ H(b, {
2887
+ return /* @__PURE__ */ V(b, {
2859
2888
  placement: "top-end",
2860
2889
  matchReferenceWidth: !1,
2861
2890
  open: E,
@@ -2865,25 +2894,25 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2865
2894
  overlayRole: x.Dialog,
2866
2895
  overlayAriaLabel: r?.ariaLabel ?? "Select model",
2867
2896
  renderOverlay: () => m(() => D(!1)),
2868
- listClassName: l("w-[368px]!", X.modelOverlayPanel, i?.className, Y.modelMenu),
2897
+ listClassName: l("w-[368px]!", X.modelOverlayPanel, i?.className, J.modelMenu),
2869
2898
  listStyle: c({ "--ci-model-overlay-bg": i?.colors?.overlayBackground }),
2870
- children: /* @__PURE__ */ H(h, {
2899
+ children: /* @__PURE__ */ V(h, {
2871
2900
  "aria-label": j,
2872
2901
  "aria-disabled": L || void 0,
2873
2902
  tooltipProps: { tooltip: e },
2874
- className: l("h-auto min-w-0 gap-1.5 rounded-full! border-0! px-0 py-1.5 ps-1.5 pe-2", X.modelSelectorButton, R, L && X.modelSelectorButtonDisabled, Y.modelSelectorButton),
2903
+ className: l("h-auto min-w-0 gap-1.5 rounded-full! border-0! px-0 py-1.5 ps-1.5 pe-2", X.modelSelectorButton, R, L && X.modelSelectorButtonDisabled, J.modelSelectorButton),
2875
2904
  onClick: () => {
2876
2905
  L || (_ ? _() : D(!E));
2877
2906
  },
2878
2907
  iconBefore: B,
2879
2908
  iconAfter: z,
2880
2909
  textClassName: "min-w-0",
2881
- label: /* @__PURE__ */ U("span", {
2910
+ label: /* @__PURE__ */ H("span", {
2882
2911
  className: "flex max-w-[180px] min-w-0 items-baseline gap-1",
2883
- children: [/* @__PURE__ */ H("span", {
2912
+ children: [/* @__PURE__ */ V("span", {
2884
2913
  className: l("max-w-[180px] shrink-0 truncate", a, X.modelSelectorName),
2885
2914
  children: M
2886
- }), N && /* @__PURE__ */ H("span", {
2915
+ }), N && /* @__PURE__ */ V("span", {
2887
2916
  className: l("min-w-0 truncate", o, X.modelSelectorVersion),
2888
2917
  children: N
2889
2918
  })]
@@ -2891,236 +2920,251 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
2891
2920
  })
2892
2921
  });
2893
2922
  }
2894
- return /* @__PURE__ */ H("div", {
2923
+ return /* @__PURE__ */ V("div", {
2895
2924
  className: l(R),
2896
2925
  "aria-disabled": L || void 0,
2897
- children: /* @__PURE__ */ H(b, {
2926
+ children: /* @__PURE__ */ V(b, {
2898
2927
  items: P,
2899
2928
  menuHeader: ee,
2900
2929
  placement: "bottom-end",
2901
2930
  matchReferenceWidth: !1,
2902
2931
  maxDropdownHeight: s,
2903
- listClassName: l("w-[240px]!", i?.className, Y.modelMenu),
2932
+ listClassName: l("w-[240px]!", i?.className, J.modelMenu),
2904
2933
  listStyle: F,
2905
2934
  disabled: L,
2906
2935
  open: E,
2907
2936
  onOpenChange: L ? void 0 : D,
2908
- children: /* @__PURE__ */ H(h, {
2937
+ children: /* @__PURE__ */ V(h, {
2909
2938
  "aria-label": j,
2910
2939
  "aria-disabled": L || void 0,
2911
2940
  tooltipProps: { tooltip: M },
2912
2941
  iconBefore: B,
2913
2942
  iconAfter: z,
2914
- className: l("h-auto gap-1 rounded-full! border-0! p-1.5", X.modelSelectorButton, L && X.modelSelectorButtonDisabled, Y.modelSelectorButton)
2943
+ className: l("h-auto gap-1 rounded-full! border-0! p-1.5", X.modelSelectorButton, L && X.modelSelectorButtonDisabled, J.modelSelectorButton)
2915
2944
  })
2916
2945
  })
2917
2946
  });
2918
- }, Wn = Oe(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: c, onAttachmentsChange: u, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: T, uploadingLabel: k, expandLabel: A, clickLabel: j, sendLabel: M, sendTooltip: N, emptyMessageTooltip: P, stopLabel: ee, micLabel: F = "Dictate", recordVoiceLabel: I = "Record voice", stopRecordingLabel: L, discardRecordingLabel: R, colors: z, typography: B, attachmentTray: V, modelMenu: te, className: ne, pendingDropFiles: re = [], onDropFilesConsumed: ie, pendingAttachments: ae = [], onPendingAttachmentsConsumed: oe, pasteTextThreshold: se = 4e3, maxMessageLength: ce = 5e4, deployments: de, selectedDeploymentId: fe, onDeploymentChange: pe, modelSelectorLabels: me, initialAttachments: he = [], hideAddButton: ge = !1, hideAttachFile: _e = !1, hideActionBar: ve = !1, actionRowLayout: be = $e.Stacked, isInlineActionRowAllowedBelowDesktop: xe = !1, renderFooterActions: Se, isInputDisabled: Ce = !1, isModelSelectorDisabled: we = !1, isSendDisabled: Te = !1, isAudioMessageSupported: Ee = !1, isVoiceRecordingSupported: De = Ee, onTranscribeAudio: Oe, transcribingLabel: ke, voiceErrorLabel: Ae, sendOnEnter: Me = Qe.Enter, prefixAttachments: Ne = [], onRemovePrefixAttachment: Pe, chatSettings: Fe, toolsMenuItems: Ie, onToolToggle: Re, canRemoveTools: ze = !0, toolsMenuTitle: He, toolsBackLabel: Ue, toolsChipLabels: Ge, menuOverlays: qe, activeMentions: Je, onBackspaceAtCaret: Ye, caretPositionOverride: Xe, commandMenu: Ze, autoFocus: et = !1, messageHistory: tt, onDialFileSystemClick: rt, dialFileSystemLabel: it, validateAttachment: at, onAttachmentClick: ot, modelPickerOverlay: ut, onModelPickerOpenChange: dt, maximumAttachmentsAmount: ft, onAttachmentsLimitExceeded: pt, isAttachmentsEnabled: ht = !0, isTextAttachmentsAllowed: gt = !0, usageLimitsSlot: _t, onMessageTooLong: vt }, yt) => {
2919
- let bt = d(), Dt = f(), [Ot, kt] = J(!1), At = (e) => {
2920
- kt(e), dt?.(e);
2921
- }, jt = Be(tt), Mt = Je ?? [], Nt = Mt.length > 0, Pt = K(() => Et(z), [z]), { message: Z, setMessage: Ft, textareaRef: Q } = Ve({
2947
+ }, Kn = ke(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: c, onAttachmentsChange: u, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: T, uploadingLabel: k, expandLabel: A, clickLabel: j, sendLabel: M, sendTooltip: N, emptyMessageTooltip: P, stopLabel: ee, micLabel: F = "Dictate", recordVoiceLabel: I = "Record voice", stopRecordingLabel: L, discardRecordingLabel: R, colors: z, typography: B, attachmentTray: te, modelMenu: ne, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: ae, pendingAttachments: oe = [], onPendingAttachmentsConsumed: se, pasteTextThreshold: ce = 4e3, maxMessageLength: le = 5e4, deployments: fe, selectedDeploymentId: pe, onDeploymentChange: me, modelSelectorLabels: he, initialAttachments: ge = [], hideAddButton: _e = !1, hideAttachFile: ve = !1, hideActionBar: ye = !1, actionRowLayout: xe = et.Stacked, isInlineActionRowAllowedBelowDesktop: Se = !1, isToolChipRowAllowedOnPhone: Ce = !1, renderFooterActions: we, isInputDisabled: Te = !1, isModelSelectorDisabled: Ee = !1, isSendDisabled: De = !1, isAudioMessageSupported: Oe = !1, isVoiceRecordingSupported: ke = Oe, onTranscribeAudio: Ae, transcribingLabel: je, voiceErrorLabel: Ne, sendOnEnter: Pe = $e.Enter, prefixAttachments: Fe = [], onRemovePrefixAttachment: Ie, chatSettings: Le, toolsMenuItems: ze, onToolToggle: Be, canRemoveTools: Ue = !0, toolsMenuTitle: We, toolsBackLabel: Ke, toolsChipLabels: Je, menuOverlays: Ye, activeMentions: Xe, onBackspaceAtCaret: Ze, caretPositionOverride: Qe, commandMenu: tt, autoFocus: Y = !1, messageHistory: rt, onDialFileSystemClick: at, dialFileSystemLabel: st, validateAttachment: ct, onAttachmentClick: lt, modelPickerOverlay: ut, onModelPickerOpenChange: mt, maximumAttachmentsAmount: ht, onAttachmentsLimitExceeded: gt, isAttachmentsEnabled: _t = !0, isTextAttachmentsAllowed: yt = !0, usageLimitsSlot: bt, onMessageTooLong: xt }, St) => {
2948
+ let Ct = d(), wt = f(), jt = wt && !Ce, [Mt, Nt] = q(!1), Pt = (e) => {
2949
+ Nt(e), mt?.(e);
2950
+ }, Ft = Ve(rt), It = Xe ?? [], Lt = It.length > 0, Rt = G(() => At(z), [z]), { message: Z, setMessage: zt, textareaRef: Q } = He({
2922
2951
  messageProp: e,
2923
2952
  messageRevision: t
2924
2953
  });
2925
- G(() => {
2954
+ W(() => {
2926
2955
  let e = Q.current;
2927
2956
  e != null && e.value.length !== 0 && document.activeElement === e && e.setSelectionRange(e.value.length, e.value.length);
2928
- }, [Q]), G(() => {
2957
+ }, [Q]), W(() => {
2929
2958
  n !== void 0 && Q.current?.focus();
2930
- }, [n, Q]), je(yt, () => ({ getCaretPosition: () => Q.current?.selectionStart ?? Z.length }), [Z, Q]);
2931
- let { handleUndoKeyDown: It, markCaretPlaced: Bt } = We({
2959
+ }, [n, Q]), Me(St, () => ({ getCaretPosition: () => Q.current?.selectionStart ?? Z.length }), [Z, Q]);
2960
+ let { handleUndoKeyDown: Ut, markCaretPlaced: Wt } = Ge({
2932
2961
  insertion: r,
2933
2962
  textareaRef: Q
2934
- }), { isMenuOpen: Vt, query: Ht, activeWordStart: Ut, closeOnOutsidePress: Wt, handleValueChange: Gt, commandMenuListboxId: Kt, commandMenuOverlayRef: qt, activeCommandOptionId: $, handleTextareaClick: Jt, handleTextareaFocus: Yt, handleTextareaKeyUp: Xt, skipFocusMenuEvaluationRef: Zt, triggerEnd: Qt, hasCommandEmptyQueryHint: $t, markerOffset: en, handleCloseCommandMenu: tn, isSendGesture: nn, handleCommandMenuKeyDown: rn } = xt({
2935
- commandMenu: Ze,
2963
+ }), { isMenuOpen: Gt, query: Kt, activeWordStart: qt, closeOnOutsidePress: Jt, handleValueChange: Yt, commandMenuListboxId: $, commandMenuOverlayRef: Xt, activeCommandOptionId: Zt, handleTextareaClick: Qt, handleTextareaFocus: $t, handleTextareaKeyUp: en, skipFocusMenuEvaluationRef: tn, triggerEnd: nn, hasCommandEmptyQueryHint: rn, markerOffset: an, handleCloseCommandMenu: on, isSendGesture: sn, handleCommandMenuKeyDown: cn } = Tt({
2964
+ commandMenu: tt,
2936
2965
  message: Z,
2937
- setMessage: Ft,
2966
+ setMessage: zt,
2938
2967
  textareaRef: Q,
2939
- historyNav: jt,
2968
+ historyNav: Ft,
2940
2969
  onChange: c,
2941
- caretPositionOverride: Xe,
2970
+ caretPositionOverride: Qe,
2942
2971
  messageRevision: t,
2943
- markCaretPlaced: Bt,
2944
- sendOnEnter: Me
2945
- }), an = q(Z);
2946
- an.current = Z;
2947
- let { attachments: on, buildAttachments: sn, addAttachments: cn, resetAttachments: ln, handleRemove: un, handleRetry: dn, handleExpand: fn, hasBlockedAttachments: pn } = Le({
2948
- initialAttachments: he,
2972
+ markCaretPlaced: Wt,
2973
+ sendOnEnter: Pe
2974
+ }), ln = K(Z);
2975
+ ln.current = Z;
2976
+ let { attachments: un, buildAttachments: dn, addAttachments: fn, resetAttachments: pn, handleRemove: mn, handleRetry: hn, handleExpand: gn, hasBlockedAttachments: _n } = Re({
2977
+ initialAttachments: ge,
2949
2978
  onUploadAttachment: a,
2950
2979
  onAttachmentsChange: u,
2951
- validateAttachment: at,
2952
- pendingDropFiles: re,
2953
- onDropFilesConsumed: ie,
2954
- isDropDisabled: Ce,
2955
- pendingAttachments: ae,
2956
- onPendingAttachmentsConsumed: oe,
2957
- onExpandPastedText: W((e) => {
2958
- let t = an.current, n = t ? `${t}\n${e}` : e;
2959
- an.current = n, Ft(n), c?.(n);
2960
- }, [Ft, c]),
2961
- maximumAttachmentsAmount: ft,
2962
- baseAttachmentsAmount: Ne.length,
2963
- onAttachmentsLimitExceeded: pt
2964
- }), { voiceState: mn, analyserNodeRef: hn, voiceError: gn, startRecording: _n, stopRecording: vn, discardRecording: yn, isVoiceActive: bn, latestTranscript: xn } = Tt({
2965
- addAttachments: cn,
2966
- buildAttachments: sn,
2967
- draftRef: an,
2968
- setMessage: Ft,
2969
- historyNav: jt,
2980
+ validateAttachment: ct,
2981
+ pendingDropFiles: ie,
2982
+ onDropFilesConsumed: ae,
2983
+ isDropDisabled: Te,
2984
+ pendingAttachments: oe,
2985
+ onPendingAttachmentsConsumed: se,
2986
+ onExpandPastedText: U((e) => {
2987
+ let t = ln.current, n = t ? `${t}\n${e}` : e;
2988
+ ln.current = n, zt(n), c?.(n);
2989
+ }, [zt, c]),
2990
+ maximumAttachmentsAmount: ht,
2991
+ baseAttachmentsAmount: Fe.length,
2992
+ onAttachmentsLimitExceeded: gt
2993
+ }), { voiceState: vn, analyserNodeRef: yn, voiceError: bn, startRecording: xn, stopRecording: Sn, discardRecording: Cn, isVoiceActive: wn, latestTranscript: Tn } = kt({
2994
+ addAttachments: fn,
2995
+ buildAttachments: dn,
2996
+ draftRef: ln,
2997
+ setMessage: zt,
2998
+ historyNav: Ft,
2970
2999
  onChange: c,
2971
- onTranscribeAudio: Oe,
2972
- voiceErrorLabel: Ae,
3000
+ onTranscribeAudio: Ae,
3001
+ voiceErrorLabel: Ne,
2973
3002
  textareaRef: Q,
2974
- skipFocusMenuEvaluationRef: Zt
2975
- }), Sn = q(null), Cn = q(null), wn = Ct({
2976
- addAttachments: cn,
2977
- isAttachmentsEnabled: ht,
2978
- isTextAttachmentsAllowed: gt,
2979
- pasteTextThreshold: se,
2980
- maxMessageLength: ce,
2981
- onMessageTooLong: vt,
2982
- commandMenu: Ze
2983
- }), Tn = Z.trim().length > 0 || on.length > 0, En = Tn && !pn && !Te && !bn, { visibleTools: Dn, handleToolDismiss: On } = St({
2984
- toolsMenuItems: Ie,
2985
- canRemoveTools: ze,
2986
- isPhone: Dt,
2987
- onToolToggle: Re
2988
- }), kn = de === void 0 || fe != null, An = Ee && !s, { handleSend: jn, handleKeyDown: Mn } = wt({
3003
+ skipFocusMenuEvaluationRef: tn
3004
+ }), En = K(null), Dn = K(null), On = Dt({
3005
+ addAttachments: fn,
3006
+ isAttachmentsEnabled: _t,
3007
+ isTextAttachmentsAllowed: yt,
3008
+ pasteTextThreshold: ce,
3009
+ maxMessageLength: le,
3010
+ onMessageTooLong: xt,
3011
+ commandMenu: tt
3012
+ }), kn = Z.trim().length > 0 || un.length > 0, An = kn && !_n && !De && !wn, { visibleTools: jn, handleToolDismiss: Mn } = Et({
3013
+ toolsMenuItems: ze,
3014
+ canRemoveTools: Ue,
3015
+ onToolToggle: Be
3016
+ }), [Nn, Pn] = q(!1), Fn = fe === void 0 || pe != null, In = Oe && !s, { handleSend: Ln, handleKeyDown: Rn } = Ot({
2989
3017
  message: Z,
2990
- setMessage: Ft,
2991
- attachments: on,
2992
- resetAttachments: ln,
2993
- historyNav: jt,
3018
+ setMessage: zt,
3019
+ attachments: un,
3020
+ resetAttachments: pn,
3021
+ historyNav: Ft,
2994
3022
  onSend: i,
2995
- onMessageTooLong: vt,
2996
- maxMessageLength: ce,
2997
- isSendDisabled: Te,
2998
- isVoiceActive: bn,
2999
- isInputDisabled: Ce,
3023
+ onMessageTooLong: xt,
3024
+ maxMessageLength: le,
3025
+ isSendDisabled: De,
3026
+ isVoiceActive: wn,
3027
+ isInputDisabled: Te,
3000
3028
  isStreaming: s,
3001
- canSend: En,
3002
- hasModelSelected: kn,
3003
- handleUndoKeyDown: It,
3004
- handleCommandMenuKeyDown: rn,
3005
- isSendGesture: nn,
3006
- onBackspaceAtCaret: Ye
3007
- }), Nn = (e) => {
3029
+ canSend: An,
3030
+ hasModelSelected: Fn,
3031
+ handleUndoKeyDown: Ut,
3032
+ handleCommandMenuKeyDown: cn,
3033
+ isSendGesture: sn,
3034
+ onBackspaceAtCaret: Ze
3035
+ }), zn = (e) => {
3008
3036
  let t = Array.from(e.target.files ?? []);
3009
3037
  if (t.length === 0) return;
3010
- let n = sn(t);
3011
- e.target.value = "", cn(n);
3012
- }, { textareaAreaRef: Pn, caretAnchor: Fn, mirrorInsertions: In, isMirrorActive: Ln, mirrorRef: Rn, selectionRects: zn, updateSelectionRects: Bn, handleTextareaScroll: Vn } = mt({
3013
- commandMenu: Ze,
3038
+ let n = dn(t);
3039
+ e.target.value = "", fn(n);
3040
+ }, { textareaAreaRef: Bn, caretAnchor: Vn, mirrorInsertions: Hn, isMirrorActive: Un, mirrorRef: Wn, selectionRects: Kn, updateSelectionRects: qn, handleTextareaScroll: Jn } = vt({
3041
+ commandMenu: tt,
3014
3042
  message: Z,
3015
3043
  textareaRef: Q,
3016
- hasActiveMentions: Nt,
3017
- markerOffset: en,
3018
- triggerEnd: Qt,
3019
- hasCommandEmptyQueryHint: $t
3020
- }), Hn = /* @__PURE__ */ H("textarea", {
3021
- className: l(X.textarea, Ln && X.textareaMentionMode, B?.fontClassName || "dial-body-paragraph-text", "relative z-0 field-sizing-content max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
3044
+ hasActiveMentions: Lt,
3045
+ markerOffset: an,
3046
+ triggerEnd: nn,
3047
+ hasCommandEmptyQueryHint: rn
3048
+ }), Yn = /* @__PURE__ */ V("textarea", {
3049
+ className: l(X.textarea, Un && X.textareaMentionMode, B?.fontClassName || "dial-body-paragraph-text", "relative z-0 field-sizing-content max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
3022
3050
  ref: Q,
3023
- autoFocus: et,
3051
+ autoFocus: Y,
3024
3052
  value: Z,
3025
3053
  onChange: (e) => {
3026
- Ft(e.target.value), jt.notifyChange();
3054
+ zt(e.target.value), Ft.notifyChange();
3027
3055
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
3028
- Gt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), c?.(e.target.value);
3056
+ Yt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), c?.(e.target.value);
3029
3057
  },
3030
- onSelect: Bn,
3031
- onScroll: Vn,
3032
- onFocus: Yt,
3033
- onClick: Jt,
3034
- onKeyDown: Mn,
3035
- onKeyUp: Xt,
3036
- onPaste: wn,
3058
+ onSelect: qn,
3059
+ onScroll: Jn,
3060
+ onFocus: $t,
3061
+ onClick: Qt,
3062
+ onKeyDown: Rn,
3063
+ onKeyUp: en,
3064
+ onPaste: On,
3037
3065
  placeholder: p,
3038
3066
  "aria-label": m,
3039
- "aria-autocomplete": Ze == null ? void 0 : "list",
3040
- "aria-controls": Vt ? Kt : void 0,
3041
- "aria-activedescendant": $ ?? void 0,
3042
- "aria-hidden": Nt ? !0 : void 0,
3043
- disabled: Ce,
3044
- readOnly: bn,
3067
+ "aria-autocomplete": tt == null ? void 0 : "list",
3068
+ "aria-controls": Gt ? $ : void 0,
3069
+ "aria-activedescendant": Zt ?? void 0,
3070
+ "aria-hidden": Lt ? !0 : void 0,
3071
+ disabled: Te,
3072
+ readOnly: wn,
3045
3073
  rows: 1
3046
- }), Wn = /* @__PURE__ */ H(zt, {
3047
- areaRef: Pn,
3048
- mirrorRef: Rn,
3049
- isMirrorActive: Ln,
3074
+ }), Xn = /* @__PURE__ */ V(Ht, {
3075
+ areaRef: Bn,
3076
+ mirrorRef: Wn,
3077
+ isMirrorActive: Un,
3050
3078
  fontClassName: B?.fontClassName,
3051
3079
  message: Z,
3052
- mentionRanges: Mt,
3053
- mirrorInsertions: In,
3054
- selectionRects: zn,
3055
- children: /* @__PURE__ */ H(Rt, {
3056
- textarea: Hn,
3080
+ mentionRanges: It,
3081
+ mirrorInsertions: Hn,
3082
+ selectionRects: Kn,
3083
+ children: /* @__PURE__ */ V(Vt, {
3084
+ textarea: Yn,
3057
3085
  textareaRef: Q,
3058
- commandMenu: Ze,
3059
- caretAnchor: Fn,
3086
+ commandMenu: tt,
3087
+ caretAnchor: Vn,
3060
3088
  fontClassName: B?.fontClassName,
3061
- isMenuOpen: Vt,
3062
- query: Ht,
3063
- activeWordStart: Ut,
3064
- listboxId: Kt,
3065
- activeOptionId: $,
3066
- overlayRef: qt,
3067
- onOutsidePress: Wt,
3068
- onClose: tn
3089
+ isMenuOpen: Gt,
3090
+ query: Kt,
3091
+ activeWordStart: qt,
3092
+ listboxId: $,
3093
+ activeOptionId: Zt,
3094
+ overlayRef: Xt,
3095
+ onOutsidePress: Jt,
3096
+ onClose: on
3069
3097
  })
3070
- }), Gn = ge ? void 0 : /* @__PURE__ */ H(Lt, {
3071
- fileInputRef: Sn,
3098
+ }), Zn = _e ? void 0 : /* @__PURE__ */ V(Bt, {
3099
+ fileInputRef: En,
3072
3100
  textareaRef: Q,
3073
3101
  message: Z,
3074
- style: Pt,
3075
- hideAttachFile: _e,
3076
- isInputDisabled: Ce,
3102
+ style: Rt,
3103
+ hideAttachFile: ve,
3104
+ isInputDisabled: Te,
3077
3105
  isStreaming: s,
3078
- isAttachmentsEnabled: ht,
3079
- isVoiceRecordingSupported: De,
3080
- isVoiceActive: bn,
3081
- startRecording: _n,
3082
- isPhone: Dt,
3083
- canRemoveTools: ze,
3084
- toolsMenuItems: Ie,
3085
- onToolToggle: Re,
3086
- chatSettings: Fe,
3087
- menuOverlays: qe,
3088
- onDialFileSystemClick: rt,
3089
- dialFileSystemLabel: it,
3106
+ isAttachmentsEnabled: _t,
3107
+ isVoiceRecordingSupported: ke,
3108
+ isVoiceActive: wn,
3109
+ startRecording: xn,
3110
+ isPhone: jt,
3111
+ canRemoveTools: Ue,
3112
+ toolsMenuItems: ze,
3113
+ onToolToggle: Be,
3114
+ chatSettings: Le,
3115
+ menuOverlays: Ye,
3116
+ onDialFileSystemClick: at,
3117
+ dialFileSystemLabel: st,
3090
3118
  attachLabel: h,
3091
3119
  addMenuTitle: _,
3092
3120
  menuTitle: b,
3093
3121
  menuCloseLabel: x,
3094
3122
  recordVoiceLabel: I,
3095
- toolsMenuTitle: He,
3096
- toolsBackLabel: Ue
3097
- }), Kn = be === $e.Inline && (!bt || xe), qn = Gn && /* @__PURE__ */ H("div", {
3098
- className: l("flex", Y.addCluster),
3099
- children: Gn
3100
- }), Jn = Dn.length > 0 && Re != null && /* @__PURE__ */ H("div", {
3101
- className: l("min-w-0", Kn ? "flex-1" : "max-w-full flex-[1_0_auto]", Y.toolsChips),
3102
- children: /* @__PURE__ */ H(nt, {
3103
- items: Dn,
3104
- onToolToggle: Re,
3105
- onToolDismiss: On,
3106
- canRemove: ze,
3107
- removeLabel: Ge?.removeLabel,
3108
- stateOnLabel: Ge?.stateOnLabel,
3109
- stateOffLabel: Ge?.stateOffLabel
3123
+ toolsMenuTitle: We,
3124
+ toolsBackLabel: Ke
3125
+ }), Qn = xe === et.Inline && (!Ct || Se), $n = Zn && /* @__PURE__ */ V("div", {
3126
+ className: l("flex", J.addCluster),
3127
+ children: Zn
3128
+ }), er = ze ?? [], tr = er.length > 0 && Be != null && /* @__PURE__ */ H("div", {
3129
+ className: l("max-w-full min-w-0 flex-[1_0_auto]", J.toolsChips),
3130
+ children: [/* @__PURE__ */ V(ot, {
3131
+ items: er,
3132
+ title: We,
3133
+ summaryLabel: Je?.summaryLabel,
3134
+ onClick: () => Pn(!0)
3135
+ }), /* @__PURE__ */ V(nt, {
3136
+ isOpen: Nn,
3137
+ onClose: () => Pn(!1),
3138
+ closeLabel: x,
3139
+ style: Rt,
3140
+ title: We,
3141
+ items: er,
3142
+ onToolToggle: Be
3143
+ })]
3144
+ }), nr = jn.length > 0 && Be != null && /* @__PURE__ */ V("div", {
3145
+ className: l("min-w-0", Qn ? "flex-1" : "max-w-full flex-[1_0_auto]", J.toolsChips),
3146
+ children: /* @__PURE__ */ V(it, {
3147
+ items: jn,
3148
+ onToolToggle: Be,
3149
+ onToolDismiss: Mn,
3150
+ canRemove: Ue,
3151
+ removeLabel: Je?.removeLabel,
3152
+ stateOnLabel: Je?.stateOnLabel,
3153
+ stateOffLabel: Je?.stateOffLabel
3110
3154
  })
3111
- });
3112
- return /* @__PURE__ */ U("div", {
3113
- ref: Cn,
3114
- style: Pt,
3115
- className: l(X.wrapper, Ce && X.wrapperDisabled, Ce && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", ne, Y.wrapper),
3155
+ }), rr = jt ? tr : nr;
3156
+ return /* @__PURE__ */ H("div", {
3157
+ ref: Dn,
3158
+ style: Rt,
3159
+ className: l(X.wrapper, Te && X.wrapperDisabled, Te && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", re, J.wrapper),
3116
3160
  children: [
3117
- (Ne.length > 0 || on.length > 0) && /* @__PURE__ */ H(ue, {
3118
- attachments: [...Ne, ...on],
3161
+ (Fe.length > 0 || un.length > 0) && /* @__PURE__ */ V(de, {
3162
+ attachments: [...Fe, ...un],
3119
3163
  onRemove: (e) => {
3120
- Ne.some((t) => t.id === e) ? Pe?.(e) : un(e);
3164
+ Fe.some((t) => t.id === e) ? Ie?.(e) : mn(e);
3121
3165
  },
3122
- onRetry: dn,
3123
- onExpand: fn,
3166
+ onRetry: hn,
3167
+ onExpand: gn,
3124
3168
  labels: {
3125
3169
  removeLabel: S,
3126
3170
  retryLabel: T,
@@ -3129,81 +3173,81 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
3129
3173
  clickLabel: j
3130
3174
  },
3131
3175
  styles: {
3132
- ...V,
3133
- className: l(on.length > 6 && "-me-4", V?.className)
3176
+ ...te,
3177
+ className: l(un.length > 6 && "-me-4", te?.className)
3134
3178
  },
3135
- onAttachmentClick: ot == null ? void 0 : (e) => {
3136
- let t = [...Ne, ...on].find((t) => t.id === e);
3137
- t != null && ot(t);
3179
+ onAttachmentClick: lt == null ? void 0 : (e) => {
3180
+ let t = [...Fe, ...un].find((t) => t.id === e);
3181
+ t != null && lt(t);
3138
3182
  }
3139
3183
  }),
3140
- !ge && /* @__PURE__ */ H("input", {
3141
- ref: Sn,
3184
+ !_e && /* @__PURE__ */ V("input", {
3185
+ ref: En,
3142
3186
  type: "file",
3143
3187
  multiple: !0,
3144
3188
  accept: g,
3145
3189
  className: "sr-only",
3146
3190
  "aria-hidden": !0,
3147
3191
  tabIndex: -1,
3148
- onChange: Nn
3192
+ onChange: zn
3149
3193
  }),
3150
- /* @__PURE__ */ H(E, {
3194
+ /* @__PURE__ */ V(E, {
3151
3195
  politeness: O.Assertive,
3152
3196
  className: "min-w-0 px-1 wrap-break-word",
3153
- children: gn && /* @__PURE__ */ H(C, { text: gn })
3197
+ children: bn && /* @__PURE__ */ V(C, { text: bn })
3154
3198
  }),
3155
- bn && /* @__PURE__ */ H(st, {
3199
+ wn && /* @__PURE__ */ V(dt, {
3156
3200
  embedded: !0,
3157
- state: mn,
3158
- analyserNodeRef: hn,
3159
- onStop: vn,
3160
- onDiscard: yn,
3161
- attachButton: Gn,
3201
+ state: vn,
3202
+ analyserNodeRef: yn,
3203
+ onStop: Sn,
3204
+ onDiscard: Cn,
3205
+ attachButton: Zn,
3162
3206
  stopLabel: L,
3163
3207
  discardLabel: R,
3164
- processingLabel: ke
3208
+ processingLabel: je
3165
3209
  }),
3166
- !bn && ve && Wn,
3167
- !bn && !ve && Kn && Jn && /* @__PURE__ */ H("div", {
3210
+ !wn && ye && Xn,
3211
+ !wn && !ye && Qn && rr && /* @__PURE__ */ V("div", {
3168
3212
  className: "flex",
3169
- children: Jn
3213
+ children: rr
3170
3214
  }),
3171
- !bn && !ve && /* @__PURE__ */ U("div", {
3172
- className: l("flex items-center gap-2", Kn ? "flex-nowrap" : "flex-wrap", Y.actionRow),
3215
+ !wn && !ye && /* @__PURE__ */ H("div", {
3216
+ className: l("flex items-center gap-2", Qn ? "flex-nowrap" : "flex-wrap", J.actionRow),
3173
3217
  children: [
3174
- Kn && qn,
3175
- /* @__PURE__ */ H("div", {
3176
- className: l("flex min-w-0 items-center self-stretch", Kn ? "flex-1" : "w-full", Y.textareaWrap),
3177
- children: Wn
3218
+ Qn && $n,
3219
+ /* @__PURE__ */ V("div", {
3220
+ className: l("flex min-w-0 items-center self-stretch", Qn ? "flex-1" : "w-full", J.textareaWrap),
3221
+ children: Xn
3178
3222
  }),
3179
- !Kn && qn,
3180
- !Kn && Jn,
3181
- /* @__PURE__ */ H("div", {
3182
- className: l("ms-auto flex shrink-0 items-center gap-2", Y.footerActions),
3183
- children: Se ? Se({
3184
- canSend: En,
3185
- onSend: jn
3186
- }) : /* @__PURE__ */ U(le, { children: [
3187
- _t,
3188
- /* @__PURE__ */ H(Un, {
3189
- deployments: de,
3190
- selectedDeploymentId: fe,
3191
- onDeploymentChange: pe,
3192
- modelSelectorLabels: me,
3193
- menuStyles: te,
3223
+ !Qn && $n,
3224
+ !Qn && rr,
3225
+ /* @__PURE__ */ V("div", {
3226
+ className: l("ms-auto flex shrink-0 items-center gap-2", J.footerActions),
3227
+ children: we ? we({
3228
+ canSend: An,
3229
+ onSend: Ln
3230
+ }) : /* @__PURE__ */ H(ue, { children: [
3231
+ bt,
3232
+ /* @__PURE__ */ V(Gn, {
3233
+ deployments: fe,
3234
+ selectedDeploymentId: pe,
3235
+ onDeploymentChange: me,
3236
+ modelSelectorLabels: he,
3237
+ menuStyles: ne,
3194
3238
  nameClassName: B?.modelSelectorNameClassName,
3195
3239
  versionClassName: B?.modelSelectorVersionClassName,
3196
3240
  isStreaming: s,
3197
- isMobile: Dt,
3198
- isDisabled: we,
3199
- style: Pt,
3241
+ isMobile: wt,
3242
+ isDisabled: Ee,
3243
+ style: Rt,
3200
3244
  modelPickerOverlay: ut,
3201
- isPickerOpen: Ot,
3202
- onPickerToggle: () => At(!Ot),
3203
- onPickerOpenChange: At
3245
+ isPickerOpen: Mt,
3246
+ onPickerToggle: () => Pt(!Mt),
3247
+ onPickerOpenChange: Pt
3204
3248
  }),
3205
- An && /* @__PURE__ */ H(w, {
3206
- icon: /* @__PURE__ */ H(ye, {
3249
+ In && /* @__PURE__ */ V(w, {
3250
+ icon: /* @__PURE__ */ V(be, {
3207
3251
  size: v.LG,
3208
3252
  stroke: y,
3209
3253
  "aria-hidden": !0
@@ -3211,64 +3255,64 @@ var Ln = /* @__PURE__ */ Object.assign(In, { displayName: "List" }), Rn = {
3211
3255
  "aria-label": F,
3212
3256
  tooltipProps: { tooltip: F },
3213
3257
  className: "shrink-0",
3214
- onClick: () => _n(Ke.Dictation),
3215
- disabled: Ce || s
3258
+ onClick: () => xn(qe.Dictation),
3259
+ disabled: Te || s
3216
3260
  }),
3217
- s && o ? /* @__PURE__ */ H(lt, {
3261
+ s && o ? /* @__PURE__ */ V(pt, {
3218
3262
  onStop: o,
3219
3263
  ariaLabel: ee
3220
- }) : !s && /* @__PURE__ */ H(ct, {
3221
- onSend: jn,
3222
- isDisabled: !kn || !En,
3264
+ }) : !s && /* @__PURE__ */ V(ft, {
3265
+ onSend: Ln,
3266
+ isDisabled: !Fn || !An,
3223
3267
  ariaLabel: M,
3224
- sendTooltip: Tn ? N : P ?? N
3268
+ sendTooltip: kn ? N : P ?? N
3225
3269
  })
3226
3270
  ] })
3227
3271
  })
3228
3272
  ]
3229
3273
  }),
3230
- /* @__PURE__ */ H(E, {
3274
+ /* @__PURE__ */ V(E, {
3231
3275
  visuallyHidden: !0,
3232
3276
  atomic: !0,
3233
3277
  as: D.Span,
3234
- children: /* @__PURE__ */ H("span", { children: xn.text }, xn.revision)
3278
+ children: /* @__PURE__ */ V("span", { children: Tn.text }, Tn.revision)
3235
3279
  })
3236
3280
  ]
3237
3281
  });
3238
3282
  });
3239
- Wn.displayName = "Input";
3240
- var Gn = {
3283
+ Kn.displayName = "Input";
3284
+ var qn = {
3241
3285
  welcome: "_welcome_1icyo_1",
3242
3286
  description: "_description_1icyo_5"
3243
- }, Kn = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, belowWelcomeSlot: i, aboveInputSlot: a, styles: o, className: s, inputClassName: u, isInputDisabled: d = !1, ...f }) => {
3287
+ }, Jn = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, belowWelcomeSlot: i, aboveInputSlot: a, styles: o, className: s, inputClassName: u, isInputDisabled: d = !1, ...f }) => {
3244
3288
  let { colors: p, typography: m, attachmentTray: h, modelMenu: g } = o ?? {}, _ = c({
3245
3289
  "--ci-welcome-color": p?.welcomeText,
3246
3290
  "--ci-description-color": p?.descriptionText
3247
3291
  });
3248
- return /* @__PURE__ */ U("div", {
3292
+ return /* @__PURE__ */ H("div", {
3249
3293
  style: _,
3250
3294
  className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", s),
3251
3295
  children: [
3252
- n && /* @__PURE__ */ U("div", {
3296
+ n && /* @__PURE__ */ H("div", {
3253
3297
  className: "flex max-w-full flex-col items-center gap-4 text-center",
3254
- children: [/* @__PURE__ */ H("h1", {
3255
- className: l(Gn.welcome, "m-0 max-w-full wrap-anywhere", m?.welcomeClassName || "dial-display2-text"),
3298
+ children: [/* @__PURE__ */ V("h1", {
3299
+ className: l(qn.welcome, "m-0 max-w-full wrap-anywhere", m?.welcomeClassName || "dial-display2-text"),
3256
3300
  children: n
3257
- }), r && /* @__PURE__ */ H("p", {
3258
- className: l(Gn.description, "m-0 max-w-[540px]", m?.descriptionClassName || "dial-body-paragraph-text"),
3301
+ }), r && /* @__PURE__ */ V("p", {
3302
+ className: l(qn.description, "m-0 max-w-[540px]", m?.descriptionClassName || "dial-body-paragraph-text"),
3259
3303
  children: r
3260
3304
  })]
3261
3305
  }),
3262
- i != null && /* @__PURE__ */ H("div", {
3306
+ i != null && /* @__PURE__ */ V("div", {
3263
3307
  className: "flex w-full max-w-[700px] flex-col items-center empty:hidden",
3264
3308
  children: i
3265
3309
  }),
3266
- /* @__PURE__ */ U("div", {
3310
+ /* @__PURE__ */ H("div", {
3267
3311
  className: l("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
3268
- children: [a != null && /* @__PURE__ */ H("div", {
3312
+ children: [a != null && /* @__PURE__ */ V("div", {
3269
3313
  className: "mb-2",
3270
3314
  children: a
3271
- }), /* @__PURE__ */ H(Wn, {
3315
+ }), /* @__PURE__ */ V(Kn, {
3272
3316
  placeholder: t,
3273
3317
  isStreaming: e,
3274
3318
  isInputDisabled: d,
@@ -3282,36 +3326,36 @@ var Gn = {
3282
3326
  })
3283
3327
  ]
3284
3328
  });
3285
- }, qn = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, sendOnEnter: u, initialAttachments: d = [], onCancel: f, onSave: m, onUploadAttachment: h, cancelLabel: g = "Cancel", saveLabel: _ = "Save & Submit", ariaLabel: v, removeLabel: b, retryLabel: x, uploadingLabel: S, expandLabel: C, clickLabel: w, addMenuTitle: T = "Add", attachLabel: E = "Attach file", menuTitle: D = "Menu", menuCloseLabel: O = "Close", className: k, pendingDropFiles: A, onDropFilesConsumed: M, validateAttachment: N, isAttachmentsEnabled: P, isTextAttachmentsAllowed: ee, hideAttachFile: F = !1, fileAccept: I, maximumAttachmentsAmount: R, onAttachmentsLimitExceeded: z, onDialFileSystemClick: B, dialFileSystemLabel: V, pendingAttachments: te, onPendingAttachmentsConsumed: ne, onAttachmentClick: re, pasteTextThreshold: ie, maxMessageLength: ae = 5e4, onMessageTooLong: oe }) => {
3286
- let se = q(null), ce = q(null), [le, ue] = J([]);
3287
- G(() => {
3288
- A?.length && (ue(A), M?.());
3329
+ }, Yn = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, sendOnEnter: u, initialAttachments: d = [], onCancel: f, onSave: m, onUploadAttachment: h, cancelLabel: g = "Cancel", saveLabel: _ = "Save & Submit", ariaLabel: v, removeLabel: b, retryLabel: x, uploadingLabel: S, expandLabel: C, clickLabel: w, addMenuTitle: T = "Add", attachLabel: E = "Attach file", menuTitle: D = "Menu", menuCloseLabel: O = "Close", className: k, pendingDropFiles: A, onDropFilesConsumed: M, validateAttachment: N, isAttachmentsEnabled: P, isTextAttachmentsAllowed: ee, hideAttachFile: F = !1, fileAccept: I, maximumAttachmentsAmount: R, onAttachmentsLimitExceeded: z, onDialFileSystemClick: B, dialFileSystemLabel: te, pendingAttachments: ne, onPendingAttachmentsConsumed: re, onAttachmentClick: ie, pasteTextThreshold: ae, maxMessageLength: oe = 5e4, onMessageTooLong: se }) => {
3330
+ let ce = K(null), le = K(null), [ue, de] = q([]);
3331
+ W(() => {
3332
+ A?.length && (de(A), M?.());
3289
3333
  }, [A, M]);
3290
- let [de, fe] = J(e ?? ""), [pe, me] = J([]), [he, ge] = J(d), _e = pe.some((e) => e.status === a.Loading || e.status === a.Error), ye = (de.trim().length > 0 || pe.length > 0 || he.length > 0) && !_e, be = (e) => {
3291
- ge((t) => t.filter((t) => t.id !== e));
3292
- }, xe = W((e, t) => {
3293
- m(e, he, t);
3294
- }, [he, m]), Se = () => {
3295
- ye && (de.length >= ae ? oe?.(de.length, ae) : xe(de, pe));
3296
- }, Ce = W(() => ue([]), []), we = W((e) => {
3297
- fe(e), n?.(e);
3298
- }, [n]), Te = W((e) => {
3334
+ let [fe, pe] = q(e ?? ""), [me, he] = q([]), [ge, _e] = q(d), ve = me.some((e) => e.status === a.Loading || e.status === a.Error), be = (fe.trim().length > 0 || me.length > 0 || ge.length > 0) && !ve, xe = (e) => {
3335
+ _e((t) => t.filter((t) => t.id !== e));
3336
+ }, Se = U((e, t) => {
3337
+ m(e, ge, t);
3338
+ }, [ge, m]), Ce = () => {
3339
+ be && (fe.length >= oe ? se?.(fe.length, oe) : Se(fe, me));
3340
+ }, we = U(() => de([]), []), Te = U((e) => {
3341
+ pe(e), n?.(e);
3342
+ }, [n]), Ee = U((e) => {
3299
3343
  let t = Array.from(e.target.files ?? []);
3300
- t.length !== 0 && (e.target.value = "", ue(t));
3301
- }, []), Ee = K(() => B ? [{
3344
+ t.length !== 0 && (e.target.value = "", de(t));
3345
+ }, []), De = G(() => B ? [{
3302
3346
  key: "dial-fs",
3303
- label: V ?? "DIAL file system",
3304
- icon: /* @__PURE__ */ H(ve, {
3347
+ label: te ?? "DIAL file system",
3348
+ icon: /* @__PURE__ */ V(ye, {
3305
3349
  size: p,
3306
3350
  "aria-hidden": !0,
3307
3351
  stroke: y
3308
3352
  }),
3309
3353
  onClick: B
3310
- }] : [], [B, V]);
3311
- return /* @__PURE__ */ U("div", {
3354
+ }] : [], [B, te]);
3355
+ return /* @__PURE__ */ H("div", {
3312
3356
  className: l("flex w-full flex-col gap-2", k),
3313
- children: [/* @__PURE__ */ H(Wn, {
3314
- ref: ce,
3357
+ children: [/* @__PURE__ */ V(Kn, {
3358
+ ref: le,
3315
3359
  message: e,
3316
3360
  messageRevision: t,
3317
3361
  activeMentions: r,
@@ -3321,108 +3365,108 @@ var Gn = {
3321
3365
  ariaLabel: v,
3322
3366
  hideActionBar: !0,
3323
3367
  sendOnEnter: u,
3324
- pendingDropFiles: le,
3325
- onDropFilesConsumed: Ce,
3326
- onSend: xe,
3368
+ pendingDropFiles: ue,
3369
+ onDropFilesConsumed: we,
3370
+ onSend: Se,
3327
3371
  onUploadAttachment: h,
3328
- onChange: we,
3329
- onAttachmentsChange: me,
3372
+ onChange: Te,
3373
+ onAttachmentsChange: he,
3330
3374
  removeLabel: b,
3331
3375
  retryLabel: x,
3332
3376
  uploadingLabel: S,
3333
3377
  expandLabel: C,
3334
3378
  clickLabel: w,
3335
3379
  className: "max-w-full",
3336
- prefixAttachments: he,
3337
- onRemovePrefixAttachment: be,
3380
+ prefixAttachments: ge,
3381
+ onRemovePrefixAttachment: xe,
3338
3382
  validateAttachment: N,
3339
3383
  isAttachmentsEnabled: P,
3340
3384
  isTextAttachmentsAllowed: ee,
3341
3385
  maximumAttachmentsAmount: R,
3342
3386
  onAttachmentsLimitExceeded: z,
3343
- pendingAttachments: te,
3344
- onPendingAttachmentsConsumed: ne,
3345
- onAttachmentClick: re,
3346
- pasteTextThreshold: ie,
3347
- maxMessageLength: ae,
3348
- onMessageTooLong: oe
3349
- }), /* @__PURE__ */ U("div", {
3387
+ pendingAttachments: ne,
3388
+ onPendingAttachmentsConsumed: re,
3389
+ onAttachmentClick: ie,
3390
+ pasteTextThreshold: ae,
3391
+ maxMessageLength: oe,
3392
+ onMessageTooLong: se
3393
+ }), /* @__PURE__ */ H("div", {
3350
3394
  className: "flex items-center justify-between",
3351
- children: [/* @__PURE__ */ U("div", {
3395
+ children: [/* @__PURE__ */ H("div", {
3352
3396
  className: "flex",
3353
- children: [!F && /* @__PURE__ */ H("input", {
3354
- ref: se,
3397
+ children: [!F && /* @__PURE__ */ V("input", {
3398
+ ref: ce,
3355
3399
  type: "file",
3356
3400
  multiple: !0,
3357
3401
  accept: I,
3358
3402
  className: "sr-only",
3359
3403
  "aria-hidden": !0,
3360
3404
  tabIndex: -1,
3361
- onChange: Te
3362
- }), (!F || (c?.length ?? 0) > 0) && /* @__PURE__ */ H(It, {
3363
- onAttachClick: F ? void 0 : () => se.current?.click(),
3405
+ onChange: Ee
3406
+ }), (!F || (c?.length ?? 0) > 0) && /* @__PURE__ */ V(zt, {
3407
+ onAttachClick: F ? void 0 : () => ce.current?.click(),
3364
3408
  attachLabel: E,
3365
3409
  addMenuTitle: T,
3366
3410
  menuTitle: D,
3367
3411
  menuCloseLabel: O,
3368
- extraMenuItems: Ee,
3412
+ extraMenuItems: De,
3369
3413
  menuOverlays: c,
3370
- getCaretPosition: () => ce.current?.getCaretPosition() ?? 0
3414
+ getCaretPosition: () => le.current?.getCaretPosition() ?? 0
3371
3415
  })]
3372
- }), /* @__PURE__ */ U("div", {
3416
+ }), /* @__PURE__ */ H("div", {
3373
3417
  className: "flex gap-2",
3374
- children: [/* @__PURE__ */ H(j, {
3418
+ children: [/* @__PURE__ */ V(j, {
3375
3419
  label: g,
3376
3420
  onClick: f
3377
- }), /* @__PURE__ */ H(L, {
3421
+ }), /* @__PURE__ */ V(L, {
3378
3422
  label: _,
3379
- onClick: Se,
3380
- disabled: !ye
3423
+ onClick: Ce,
3424
+ disabled: !be
3381
3425
  })]
3382
3426
  })]
3383
3427
  })]
3384
3428
  });
3385
- }, Jn = /* @__PURE__ */ function(e) {
3429
+ }, Xn = /* @__PURE__ */ function(e) {
3386
3430
  return e.Warning = "warning", e.Reached = "reached", e;
3387
- }({}), Yn = { banner: "_banner_180n6_2" }, Xn = {
3388
- [Jn.Warning]: ee.Warning,
3389
- [Jn.Reached]: ee.Error
3390
- }, Zn = ({ severity: e, limitText: t, reset: n, onClose: r, closeAriaLabel: i = "Close notification", limitTextClassName: a = "dial-small-paragraph-semi-text", resetTextClassName: o = "dial-small-paragraph-text", isLiveRegion: s = !0, className: u, colors: d }) => {
3391
- let f = /* @__PURE__ */ H("span", {
3431
+ }({}), Zn = { banner: "_banner_180n6_2" }, Qn = {
3432
+ [Xn.Warning]: ee.Warning,
3433
+ [Xn.Reached]: ee.Error
3434
+ }, $n = ({ severity: e, limitText: t, reset: n, onClose: r, closeAriaLabel: i = "Close notification", limitTextClassName: a = "dial-small-paragraph-semi-text", resetTextClassName: o = "dial-small-paragraph-text", isLiveRegion: s = !0, className: u, colors: d }) => {
3435
+ let f = /* @__PURE__ */ V("span", {
3392
3436
  className: a,
3393
3437
  children: t
3394
- }), p = n != null && /* @__PURE__ */ U(le, { children: [
3438
+ }), p = n != null && /* @__PURE__ */ H(ue, { children: [
3395
3439
  " ",
3396
- /* @__PURE__ */ H("time", {
3440
+ /* @__PURE__ */ V("time", {
3397
3441
  dateTime: n.isoValue,
3398
3442
  "aria-hidden": n.ariaLabel != null || void 0,
3399
3443
  className: o,
3400
3444
  children: n.label
3401
3445
  }),
3402
- n.ariaLabel != null && /* @__PURE__ */ H("span", {
3446
+ n.ariaLabel != null && /* @__PURE__ */ V("span", {
3403
3447
  className: "sr-only",
3404
3448
  children: n.ariaLabel
3405
3449
  })
3406
3450
  ] });
3407
- return /* @__PURE__ */ H(N, {
3451
+ return /* @__PURE__ */ V(N, {
3408
3452
  role: s ? "status" : "none",
3409
- variant: Xn[e],
3453
+ variant: Qn[e],
3410
3454
  type: P.SectionMessage,
3411
3455
  title: p ? f : void 0,
3412
3456
  message: p || f,
3413
- className: l(Yn.banner, Y.usageBanner, u),
3457
+ className: l(Zn.banner, J.usageBanner, u),
3414
3458
  style: c({ "--ci-usage-banner-bg": d?.background }),
3415
- children: r != null && /* @__PURE__ */ H(_, {
3459
+ children: r != null && /* @__PURE__ */ V(_, {
3416
3460
  className: "shrink-0 self-start",
3417
3461
  ariaLabel: i,
3418
3462
  onClose: () => r()
3419
3463
  })
3420
3464
  });
3421
- }, Qn = (e) => {
3422
- let [t, n] = J({
3465
+ }, er = (e) => {
3466
+ let [t, n] = q({
3423
3467
  text: e?.text,
3424
3468
  revision: e?.revision ?? 0
3425
- }), r = W((e) => {
3469
+ }), r = U((e) => {
3426
3470
  n((t) => ({
3427
3471
  text: e,
3428
3472
  revision: t.revision + 1
@@ -3433,11 +3477,11 @@ var Gn = {
3433
3477
  messageRevision: t.revision,
3434
3478
  seedMessage: r
3435
3479
  };
3436
- }, $n = (e, t) => {
3437
- let n = q(e), r = q(t);
3438
- r.current = t, G(() => {
3480
+ }, tr = (e, t) => {
3481
+ let n = K(e), r = K(t);
3482
+ r.current = t, W(() => {
3439
3483
  e !== n.current && (n.current = e, r.current());
3440
3484
  }, [e]);
3441
3485
  };
3442
3486
  //#endregion
3443
- export { $e as ActionRowLayout, Fe as BottomSheetShell, Y as CONVERSATION_INPUT_CLASS, Pt as ChatSettingsModal, Kn as ConversationInput, qn as EditMessageInput, Wn as Input, Qe as SendOnEnter, Jn as UsageLimitBannerSeverity, Zn as UsageLimitBannerView, Qn as useComposerSeed, $n as useComposerSeedSource };
3487
+ export { et as ActionRowLayout, Ie as BottomSheetShell, J as CONVERSATION_INPUT_CLASS, Rt as ChatSettingsModal, Jn as ConversationInput, Yn as EditMessageInput, Kn as Input, $e as SendOnEnter, Xn as UsageLimitBannerSeverity, $n as UsageLimitBannerView, er as useComposerSeed, tr as useComposerSeedSource };