@epam/ai-dial-conversation-input 1.2.0-dev.50 → 1.2.0-dev.58

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,40 +1,41 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, RequestStatus as i, ResponseFormat as a, SELECT_LIST_MAX_HEIGHT_PX as o, buildCssVars as s, mergeClasses as c, useIsMobile as l } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as u, Button as d, CloseButton as f, DIAL_ICON_SIZE as p, DIAL_KIT_ICON_STROKE as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, MenuItemMark as b, NeutralButton as x, Popup as S, PopupSize as C, PrimaryButton as w, PrimaryIconButton as T, RadioGroup as E, RadioGroupOrientation as D, Search as O, Skeleton as k, SkeletonVariant as ee, Slider as A, Spinner as te, StaticIconButton as j, Textarea as ne, TextareaResize as M, Tooltip as N } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as re, IconArrowNarrowRight as ie, IconCheck as P, IconChevronDown as F, IconChevronRight as ae, IconFile as oe, IconMicrophone as se, IconPaperclip as ce, IconPlayerStopFilled as I, IconPlaystationSquare as le, IconPlus as ue, IconSettings as de, IconTool as fe, IconX as pe } from "@tabler/icons-react";
4
- import { createElement as me, memo as he, useCallback as L, useEffect as R, useImperativeHandle as ge, useLayoutEffect as _e, useMemo as z, useRef as B, useState as V } from "react";
5
- import { createPortal as H } from "react-dom";
6
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
7
- import { AttachmentTray as ve, MAX_UPLOADS_PER_MINUTE as ye, generateAttachmentId as be, useClipboardPaste as xe } from "@epam/ai-dial-attachment-input";
2
+ import { BASE_ICON_SIZE as u, Button as d, CloseButton as f, DIAL_ICON_SIZE as p, DIAL_KIT_ICON_STROKE as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, MenuItemMark as b, NeutralButton as x, Popup as S, PopupSize as C, PrimaryButton as w, PrimaryIconButton as T, RadioGroup as E, RadioGroupOrientation as D, Search as O, Skeleton as k, SkeletonVariant as ee, Slider as A, Spinner as te, StaticIconButton as j, Textarea as ne, TextareaResize as re, Tooltip as M } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as ie, IconArrowNarrowRight as ae, IconCheck as N, IconChevronDown as P, IconChevronRight as oe, IconFile as se, IconMicrophone as ce, IconPaperclip as le, IconPlayerStopFilled as ue, IconPlaystationSquare as F, IconPlus as de, IconSettings as fe, IconTool as pe, IconX as me } from "@tabler/icons-react";
4
+ import { createElement as he, memo as ge, useCallback as I, useEffect as L, useImperativeHandle as _e, useLayoutEffect as ve, useMemo as R, useRef as z, useState as B } from "react";
5
+ import { createPortal as ye } from "react-dom";
6
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
7
+ import { AttachmentTray as be, MAX_UPLOADS_PER_MINUTE as xe, generateAttachmentId as W, useClipboardPaste as Se } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/constants/public-class-names.ts
9
- var K = {
9
+ var G = {
10
10
  wrapper: "dial-ci-wrapper",
11
11
  actionRow: "dial-ci-action-row",
12
12
  textareaWrap: "dial-ci-textarea-wrap",
13
13
  addCluster: "dial-ci-add-cluster",
14
+ toolsChips: "dial-ci-tools-chips",
14
15
  footerActions: "dial-ci-footer-actions",
15
16
  modelSelectorButton: "dial-ci-model-selector-button",
16
17
  modelMenu: "dial-ci-model-menu",
17
18
  modelMenuSearch: "dial-ci-model-menu-search",
18
19
  modelMenuItem: "dial-ci-model-menu-item",
19
20
  modelMenuItemSelected: "dial-ci-model-menu-item-selected"
20
- }, Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", Ce = (e, t, n) => {
21
- R(() => {
21
+ }, Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", we = (e, t, n) => {
22
+ L(() => {
22
23
  if (!e) return;
23
24
  let n = (e) => {
24
25
  e.key === "Escape" && t();
25
26
  };
26
27
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
27
- }, [e, t]), R(() => {
28
+ }, [e, t]), L(() => {
28
29
  if (e) return document.body.style.overflow = "hidden", () => {
29
30
  document.body.style.overflow = "";
30
31
  };
31
- }, [e]), R(() => {
32
+ }, [e]), L(() => {
32
33
  if (!e || n?.current == null) return;
33
34
  let t = n.current, r = document.activeElement instanceof HTMLElement ? document.activeElement : null;
34
- (t.querySelector(Se) ?? t).focus();
35
+ (t.querySelector(Ce) ?? t).focus();
35
36
  let i = (e) => {
36
37
  if (e.key !== "Tab") return;
37
- let n = Array.from(t.querySelectorAll(Se));
38
+ let n = Array.from(t.querySelectorAll(Ce));
38
39
  if (n.length === 0) {
39
40
  e.preventDefault(), t.focus();
40
41
  return;
@@ -46,27 +47,27 @@ var K = {
46
47
  document.removeEventListener("keydown", i), r?.focus();
47
48
  };
48
49
  }, [e, n]);
49
- }, we = {
50
+ }, Te = {
50
51
  backdrop: "_backdrop_1d50f_9",
51
52
  sheet: "_sheet_1d50f_13",
52
53
  "slide-up": "_slide-up_1d50f_1",
53
54
  title: "_title_1d50f_18",
54
55
  divider: "_divider_1d50f_22"
55
- }, Te = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: l, titleClassName: u = "dial-body-semi-text", className: d, colors: h, children: _ }) => {
56
- let y = B(null);
57
- if (Ce(e, r, y), !e || typeof document > "u") return null;
56
+ }, K = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: l, titleClassName: u = "dial-body-semi-text", className: d, colors: h, children: _ }) => {
57
+ let y = z(null);
58
+ if (we(e, r, y), !e || typeof document > "u") return null;
58
59
  let b = s({
59
60
  "--ci-backdrop": h?.backdrop,
60
61
  "--ci-sheet-bg": h?.sheetBg,
61
62
  "--ci-sheet-text": h?.sheetText,
62
63
  "--ci-sheet-divider": h?.divider
63
64
  });
64
- return H(/* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
65
- className: c(we.backdrop, "fixed inset-0 z-[55]"),
65
+ return ye(/* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("div", {
66
+ className: c(Te.backdrop, "fixed inset-0 z-[55]"),
66
67
  style: b,
67
68
  onPointerDown: r,
68
69
  "aria-hidden": !0
69
- }), /* @__PURE__ */ G("div", {
70
+ }), /* @__PURE__ */ U("div", {
70
71
  ref: y,
71
72
  role: "dialog",
72
73
  "aria-modal": !0,
@@ -76,14 +77,14 @@ var K = {
76
77
  ...b,
77
78
  ...l
78
79
  },
79
- className: c(we.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", d),
80
- children: [t != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
80
+ className: c(Te.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", d),
81
+ children: [t != null && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ U("div", {
81
82
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
82
83
  children: [
83
- i && /* @__PURE__ */ W("div", {
84
+ i && /* @__PURE__ */ H("div", {
84
85
  className: "absolute start-4",
85
- children: /* @__PURE__ */ W(v, {
86
- icon: /* @__PURE__ */ W(re, {
86
+ children: /* @__PURE__ */ H(v, {
87
+ icon: /* @__PURE__ */ H(ie, {
87
88
  size: p.LG,
88
89
  stroke: m,
89
90
  className: "rtl:scale-x-[-1]"
@@ -92,20 +93,20 @@ var K = {
92
93
  onClick: i
93
94
  })
94
95
  }),
95
- /* @__PURE__ */ W("span", {
96
- className: c(we.title, u),
96
+ /* @__PURE__ */ H("span", {
97
+ className: c(Te.title, u),
97
98
  children: t
98
99
  }),
99
- /* @__PURE__ */ W("div", {
100
+ /* @__PURE__ */ H("div", {
100
101
  className: "absolute end-4 m-2",
101
- children: /* @__PURE__ */ W(f, {
102
+ children: /* @__PURE__ */ H(f, {
102
103
  ariaLabel: n,
103
104
  onClose: r,
104
105
  size: g.Standard
105
106
  })
106
107
  })
107
108
  ]
108
- }), /* @__PURE__ */ W("div", { className: c(we.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ W("div", {
109
+ }), /* @__PURE__ */ H("div", { className: c(Te.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ H("div", {
109
110
  className: "overflow-y-auto",
110
111
  children: _
111
112
  })]
@@ -115,18 +116,18 @@ var K = {
115
116
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
116
117
  await Promise.allSettled(i);
117
118
  }, De = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
118
- let [h, g] = V(n), _ = B(h);
119
- R(() => {
119
+ let [h, g] = B(n), _ = z(h);
120
+ L(() => {
120
121
  _.current = h;
121
- }, [h]), R(() => () => {
122
+ }, [h]), L(() => () => {
122
123
  _.current.forEach((e) => {
123
124
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
124
125
  });
125
126
  }, []);
126
- let v = L((e) => e.map((e) => {
127
+ let v = I((e) => e.map((e) => {
127
128
  let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0;
128
129
  return {
129
- id: be(),
130
+ id: W(),
130
131
  name: e.name,
131
132
  contentType: e.type,
132
133
  file: e,
@@ -135,26 +136,26 @@ var K = {
135
136
  previewUrl: a,
136
137
  playUrl: o
137
138
  };
138
- }), []), y = B(a);
139
- R(() => {
139
+ }), []), y = z(a);
140
+ L(() => {
140
141
  y.current = a;
141
142
  }, [a]);
142
- let b = B(!0), x = L((e) => {
143
+ let b = z(!0), x = I((e) => {
143
144
  g((t) => {
144
145
  let n = e(t);
145
146
  return n === t ? t : n;
146
147
  });
147
148
  }, []);
148
- R(() => {
149
+ L(() => {
149
150
  if (b.current) {
150
151
  b.current = !1;
151
152
  return;
152
153
  }
153
154
  y.current?.(h);
154
155
  }, [h]);
155
- let S = L((e) => {
156
+ let S = I((e) => {
156
157
  g(e);
157
- }, []), C = L(async (t) => {
158
+ }, []), C = I(async (t) => {
158
159
  if (r) {
159
160
  x((e) => e.map((e) => e.id === t.id ? {
160
161
  ...e,
@@ -177,7 +178,7 @@ var K = {
177
178
  } : e));
178
179
  }
179
180
  }
180
- }, [r, x]), w = L((e, t = !0) => {
181
+ }, [r, x]), w = I((e, t = !0) => {
181
182
  let n = new Set(_.current.map((e) => e.id)), r = e.filter((e) => !n.has(e.id));
182
183
  if (r.length !== 0) {
183
184
  if (f != null && f > 0 && Number.isFinite(f)) {
@@ -198,7 +199,7 @@ var K = {
198
199
  status: i.Error,
199
200
  errorReason: n
200
201
  } : e));
201
- }), Ee(e, ye, C);
202
+ }), Ee(e, xe, C);
202
203
  }
203
204
  }
204
205
  }, [
@@ -209,20 +210,20 @@ var K = {
209
210
  C,
210
211
  o
211
212
  ]);
212
- R(() => {
213
+ L(() => {
213
214
  s.length !== 0 && (w(v(s)), c?.());
214
215
  }, [
215
216
  w,
216
217
  v,
217
218
  c,
218
219
  s
219
- ]), R(() => {
220
+ ]), L(() => {
220
221
  l.length !== 0 && (w(l, !1), u?.());
221
222
  }, [
222
223
  w,
223
224
  u,
224
225
  l
225
- ]), R(() => {
226
+ ]), L(() => {
226
227
  if (!o) return;
227
228
  let t = !1, n = [], r = _.current.map((r) => {
228
229
  if (r.status === i.Loading) return r;
@@ -249,7 +250,7 @@ var K = {
249
250
  x,
250
251
  C
251
252
  ]);
252
- let T = L((e) => {
253
+ let T = I((e) => {
253
254
  x((t) => {
254
255
  let n = t.find((t) => t.id === e);
255
256
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -261,11 +262,11 @@ var K = {
261
262
  addAttachments: w,
262
263
  resetAttachments: S,
263
264
  handleRemove: T,
264
- handleRetry: L((e) => {
265
+ handleRetry: I((e) => {
265
266
  let t = h.find((t) => t.id === e);
266
267
  t && C(t);
267
268
  }, [h, C]),
268
- handleExpand: L(async (e) => {
269
+ handleExpand: I(async (e) => {
269
270
  let n = h.find((t) => t.id === e);
270
271
  if (!n || n.type !== t.Pasted) return;
271
272
  let r = await n.file.text();
@@ -282,7 +283,7 @@ var K = {
282
283
  let n = e.slice(t.length);
283
284
  return !/\s/.test(n) && !n.includes(t);
284
285
  }, ke = ({ config: e, message: t }) => {
285
- let [n, r] = V(!1), [i, a] = V(!1), o = e != null && Oe(t, e.triggerPrefix) ? t.slice(e.triggerPrefix.length) : "", s = L((n, a, o) => {
286
+ let [n, r] = B(!1), [i, a] = B(!1), o = e != null && Oe(t, e.triggerPrefix) ? t.slice(e.triggerPrefix.length) : "", s = I((n, a, o) => {
286
287
  if (e == null || a || t !== "" || i) return;
287
288
  let s = n === e.triggerPrefix, c = o === "insertFromPaste" && Oe(n, e.triggerPrefix);
288
289
  (s || c) && r(!0);
@@ -291,7 +292,7 @@ var K = {
291
292
  t,
292
293
  i
293
294
  ]);
294
- return R(() => {
295
+ return L(() => {
295
296
  if (e == null) {
296
297
  r(!1), a(!1);
297
298
  return;
@@ -300,23 +301,23 @@ var K = {
300
301
  }, [e, t]), {
301
302
  isMenuOpen: n,
302
303
  query: o,
303
- dismiss: L(() => {
304
+ dismiss: I(() => {
304
305
  r(!1), a(!0);
305
306
  }, []),
306
307
  handleValueChange: s
307
308
  };
308
309
  }, Ae = (e, t) => !e.slice(0, t).includes("\n"), je = (e, t) => !e.slice(t).includes("\n"), Me = (e) => {
309
- let t = B(e);
310
+ let t = z(e);
310
311
  t.current = e;
311
- let n = B(-1), r = B(""), i = L((e, i, a) => {
312
+ let n = z(-1), r = z(""), i = I((e, i, a) => {
312
313
  let o = t.current;
313
314
  return !o || o.length === 0 ? null : e === "up" ? !Ae(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 || !je(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
314
- }, []), a = L(() => {
315
+ }, []), a = I(() => {
315
316
  n.current = -1, r.current = "";
316
- }, []), o = L(() => {
317
+ }, []), o = I(() => {
317
318
  n.current = -1, r.current = "";
318
319
  }, []);
319
- return z(() => ({
320
+ return R(() => ({
320
321
  navigate: i,
321
322
  notifyChange: a,
322
323
  reset: o
@@ -326,8 +327,8 @@ var K = {
326
327
  o
327
328
  ]);
328
329
  }, Ne = ({ messageProp: e, messageRevision: t }) => {
329
- let [n, r] = V(e), i = B(null);
330
- return R(() => {
330
+ let [n, r] = B(e), i = z(null);
331
+ return L(() => {
331
332
  r(e);
332
333
  }, [e, t]), {
333
334
  message: n,
@@ -338,10 +339,10 @@ var K = {
338
339
  let i = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
339
340
  i ? i.call(e, t) : e.value = t, e.setSelectionRange(n, r), e.dispatchEvent(new Event("input", { bubbles: !0 }));
340
341
  }, Fe = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, Ie = ({ insertion: e, textareaRef: t }) => {
341
- let n = e?.revision, r = B(e?.text);
342
+ let n = e?.revision, r = z(e?.text);
342
343
  r.current = e?.text;
343
- let i = B(n), a = B(null);
344
- return R(() => {
344
+ let i = z(n), a = z(null);
345
+ return L(() => {
345
346
  if (n === i.current) return;
346
347
  i.current = n;
347
348
  let e = r.current;
@@ -371,7 +372,7 @@ var K = {
371
372
  "audio/ogg;codecs=opus",
372
373
  "audio/webm"
373
374
  ], Be = 100, Ve = 100, He = .01, Ue = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: r = "Voice input failed" }) => {
374
- let [i, a] = V("idle"), [o, s] = V(null), c = B(null), l = B(null), u = B({
375
+ let [i, a] = B("idle"), [o, s] = B(null), c = z(null), l = z(null), u = z({
375
376
  onAttachAudio: e,
376
377
  onTranscribeAudio: t,
377
378
  onTranscript: n,
@@ -383,7 +384,7 @@ var K = {
383
384
  onTranscript: n,
384
385
  errorLabel: r
385
386
  };
386
- let d = L((e = "dictation") => {
387
+ let d = I((e = "dictation") => {
387
388
  if (l.current) return;
388
389
  let t = { controller: new AbortController() };
389
390
  l.current = t, s(null), a("recording");
@@ -454,10 +455,10 @@ var K = {
454
455
  y(e);
455
456
  }
456
457
  })();
457
- }, []), f = L(() => l.current?.stop?.(), []), p = L(() => {
458
+ }, []), f = I(() => l.current?.stop?.(), []), p = I(() => {
458
459
  l.current?.controller.abort(), l.current = null, s(null), a("idle");
459
460
  }, []);
460
- return R(() => () => {
461
+ return L(() => () => {
461
462
  l.current?.controller.abort(), l.current = null;
462
463
  }, []), {
463
464
  state: i,
@@ -469,10 +470,12 @@ var K = {
469
470
  };
470
471
  }, We = /* @__PURE__ */ function(e) {
471
472
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
472
- }({}), Ge = {
473
+ }({}), Ge = /* @__PURE__ */ function(e) {
474
+ return e.Stacked = "stacked", e.Inline = "inline", e;
475
+ }({}), Ke = {
473
476
  item: "_item_1sr2n_1",
474
477
  itemIcon: "_itemIcon_1sr2n_11"
475
- }, Ke = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: l = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
478
+ }, qe = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: l = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
476
479
  let m = (e) => {
477
480
  e(), r();
478
481
  }, h = s({
@@ -481,7 +484,7 @@ var K = {
481
484
  "--ci-sheet-item-active": p?.itemActiveBg,
482
485
  "--ci-sheet-icon": p?.itemIcon
483
486
  });
484
- return /* @__PURE__ */ W(Te, {
487
+ return /* @__PURE__ */ H(K, {
485
488
  isOpen: e,
486
489
  title: t,
487
490
  closeLabel: n,
@@ -490,23 +493,23 @@ var K = {
490
493
  className: o,
491
494
  titleClassName: l,
492
495
  colors: p?.shell,
493
- children: /* @__PURE__ */ W("ul", {
496
+ children: /* @__PURE__ */ H("ul", {
494
497
  role: "list",
495
498
  className: "flex flex-col",
496
499
  style: h,
497
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ W(d, {
500
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(d, {
498
501
  type: "button",
499
- className: c(Ge.item, "w-full gap-3 px-4 py-[10px] text-start"),
500
- iconBefore: /* @__PURE__ */ W("span", {
501
- className: Ge.itemIcon,
502
+ className: c(Ke.item, "w-full gap-3 px-4 py-[10px] text-start"),
503
+ iconBefore: /* @__PURE__ */ H("span", {
504
+ className: Ke.itemIcon,
502
505
  children: n
503
506
  }),
504
- iconAfter: r ? /* @__PURE__ */ W("span", {
507
+ iconAfter: r ? /* @__PURE__ */ H("span", {
505
508
  className: "ms-auto",
506
509
  children: r
507
510
  }) : null,
508
511
  textClassName: f,
509
- label: /* @__PURE__ */ W("span", {
512
+ label: /* @__PURE__ */ H("span", {
510
513
  className: u,
511
514
  children: t
512
515
  }),
@@ -514,9 +517,9 @@ var K = {
514
517
  }) }, e))
515
518
  })
516
519
  });
517
- }, qe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
518
- let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
519
- R(() => {
520
+ }, Je = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
521
+ let [s, c] = B(t), [l, u] = B(n), [d, f] = B(r), p = z(o);
522
+ L(() => {
520
523
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
521
524
  }, [
522
525
  o,
@@ -533,7 +536,7 @@ var K = {
533
536
  setResponseFormat: c,
534
537
  setSystemPrompt: u,
535
538
  setTemperature: f,
536
- handleSubmit: L(() => {
539
+ handleSubmit: I(() => {
537
540
  if (!m) return;
538
541
  let t = {};
539
542
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -547,17 +550,17 @@ var K = {
547
550
  a
548
551
  ])
549
552
  };
550
- }, Je = { label: "_label_14i7c_1" }, q = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, 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 = [
553
+ }, Ye = { label: "_label_14i7c_1" }, Xe = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, 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 = [
551
554
  "Precise",
552
555
  "Neutral",
553
556
  "Creative"
554
557
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
555
- let S = s({ "--csf-label-text": x?.labelText }), C = c(b, Je.label, "gap-1");
556
- return /* @__PURE__ */ G("div", {
558
+ let S = s({ "--csf-label-text": x?.labelText }), C = c(b, Ye.label, "gap-1");
559
+ return /* @__PURE__ */ U("div", {
557
560
  className: "flex flex-col gap-4 px-6 pb-3",
558
561
  style: S,
559
562
  children: [
560
- e.responseFormat && /* @__PURE__ */ W(E, {
563
+ e.responseFormat && /* @__PURE__ */ H(E, {
561
564
  id: "response-format",
562
565
  labelProps: {
563
566
  label: d,
@@ -576,18 +579,18 @@ var K = {
576
579
  }],
577
580
  onChange: (e) => o(e)
578
581
  }),
579
- e.systemPrompt && /* @__PURE__ */ W(ne, {
582
+ e.systemPrompt && /* @__PURE__ */ H(ne, {
580
583
  value: n,
581
584
  placeholder: g,
582
585
  className: r,
583
- resize: M.Vertical,
586
+ resize: re.Vertical,
584
587
  labelProps: {
585
588
  className: C,
586
589
  label: h
587
590
  },
588
591
  onChange: (e) => l(e ?? "")
589
592
  }),
590
- e.temperature && /* @__PURE__ */ W(A, {
593
+ e.temperature && /* @__PURE__ */ H(A, {
591
594
  labelProps: {
592
595
  label: _,
593
596
  className: C,
@@ -603,8 +606,8 @@ var K = {
603
606
  })
604
607
  ]
605
608
  });
606
- }, Ye = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
607
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = qe({
609
+ }, Ze = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
610
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = Je({
608
611
  isOpen: e,
609
612
  features: o,
610
613
  initialResponseFormat: s,
@@ -613,7 +616,7 @@ var K = {
613
616
  onSave: d,
614
617
  onClose: r
615
618
  });
616
- return /* @__PURE__ */ G(Te, {
619
+ return /* @__PURE__ */ U(K, {
617
620
  isOpen: e,
618
621
  title: f,
619
622
  closeLabel: i,
@@ -621,7 +624,7 @@ var K = {
621
624
  onBack: t,
622
625
  backLabel: n,
623
626
  style: a,
624
- children: [/* @__PURE__ */ W(q, {
627
+ children: [/* @__PURE__ */ H(Xe, {
625
628
  features: o,
626
629
  responseFormat: T,
627
630
  systemPrompt: E,
@@ -638,13 +641,13 @@ var K = {
638
641
  temperatureLabel: y,
639
642
  temperatureLabels: b,
640
643
  temperatureHint: x
641
- }), /* @__PURE__ */ W("div", {
644
+ }), /* @__PURE__ */ H("div", {
642
645
  className: c("px-6 py-4 mobile:pb-8"),
643
- children: /* @__PURE__ */ W(N, {
646
+ children: /* @__PURE__ */ H(M, {
644
647
  tooltip: C,
645
648
  hideTooltip: O || !C,
646
649
  triggerClassName: "w-full",
647
- children: /* @__PURE__ */ W(w, {
650
+ children: /* @__PURE__ */ H(w, {
648
651
  label: S,
649
652
  onClick: te,
650
653
  disabled: !O,
@@ -653,8 +656,8 @@ var K = {
653
656
  })
654
657
  })]
655
658
  });
656
- }, Xe = { modal: "_modal_kl0h0_1" }, Ze = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Xe.modal }) => {
657
- let { responseFormat: b, systemPrompt: x, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: ee } = qe({
659
+ }, q = { modal: "_modal_kl0h0_1" }, Qe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = q.modal }) => {
660
+ let { responseFormat: b, systemPrompt: x, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: ee } = Je({
658
661
  features: e,
659
662
  initialResponseFormat: t,
660
663
  initialSystemPrompt: n,
@@ -662,26 +665,26 @@ var K = {
662
665
  onSave: i,
663
666
  onClose: a
664
667
  });
665
- return /* @__PURE__ */ W(S, {
668
+ return /* @__PURE__ */ H(S, {
666
669
  open: !0,
667
670
  header: o,
668
671
  titleClassName: s,
669
672
  size: C.Sm,
670
673
  onClose: a,
671
674
  className: y,
672
- footer: /* @__PURE__ */ W("div", {
675
+ footer: /* @__PURE__ */ H("div", {
673
676
  className: "flex justify-end px-6 py-4",
674
- children: /* @__PURE__ */ W(N, {
677
+ children: /* @__PURE__ */ H(M, {
675
678
  tooltip: v,
676
679
  hideTooltip: E || !v,
677
- children: /* @__PURE__ */ W(w, {
680
+ children: /* @__PURE__ */ H(w, {
678
681
  label: _,
679
682
  onClick: ee,
680
683
  disabled: !E
681
684
  })
682
685
  })
683
686
  }),
684
- children: /* @__PURE__ */ W(q, {
687
+ children: /* @__PURE__ */ H(Xe, {
685
688
  features: e,
686
689
  responseFormat: b,
687
690
  systemPrompt: x,
@@ -700,10 +703,10 @@ var K = {
700
703
  temperatureHint: g
701
704
  })
702
705
  });
703
- }, Qe = {
706
+ }, $e = {
704
707
  icon: "_icon_1fv6z_1",
705
708
  selectedIcon: "_selectedIcon_1fv6z_5"
706
- }, $e = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: l, onToolToggle: f, itemLabelClassName: p = "dial-small-text", colors: h }) => /* @__PURE__ */ W(Te, {
709
+ }, et = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: l, onToolToggle: f, itemLabelClassName: p = "dial-small-text", colors: h }) => /* @__PURE__ */ H(K, {
707
710
  isOpen: e,
708
711
  title: o,
709
712
  closeLabel: i,
@@ -711,33 +714,33 @@ var K = {
711
714
  onBack: t,
712
715
  backLabel: n,
713
716
  style: a,
714
- children: /* @__PURE__ */ W("ul", {
717
+ children: /* @__PURE__ */ H("ul", {
715
718
  role: "menu",
716
719
  className: "flex flex-col pb-4",
717
720
  style: s({
718
721
  "--tbs-icon-text": h?.iconText,
719
722
  "--tbs-selected-icon-text": h?.selectedIconText
720
723
  }),
721
- children: l.map((e) => /* @__PURE__ */ W("li", {
724
+ children: l.map((e) => /* @__PURE__ */ H("li", {
722
725
  role: "none",
723
- children: /* @__PURE__ */ W(d, {
726
+ children: /* @__PURE__ */ H(d, {
724
727
  type: "button",
725
728
  role: "menuitemcheckbox",
726
729
  "aria-checked": e.isSelected,
727
730
  className: "w-full gap-3 px-4 py-[10px] text-start",
728
- iconBefore: /* @__PURE__ */ W("span", {
729
- className: c("flex items-center", Qe.icon),
731
+ iconBefore: /* @__PURE__ */ H("span", {
732
+ className: c("flex items-center", $e.icon),
730
733
  children: e.icon
731
734
  }),
732
- iconAfter: e.isSelected ? /* @__PURE__ */ W("span", {
733
- className: c("ms-auto", Qe.selectedIcon),
734
- children: /* @__PURE__ */ W(P, {
735
+ iconAfter: e.isSelected ? /* @__PURE__ */ H("span", {
736
+ className: c("ms-auto", $e.selectedIcon),
737
+ children: /* @__PURE__ */ H(N, {
735
738
  size: u,
736
739
  "aria-hidden": !0,
737
740
  stroke: m
738
741
  })
739
742
  }) : null,
740
- label: /* @__PURE__ */ W("span", {
743
+ label: /* @__PURE__ */ H("span", {
741
744
  className: p,
742
745
  children: e.label
743
746
  }),
@@ -745,19 +748,19 @@ var K = {
745
748
  })
746
749
  }, e.id))
747
750
  })
748
- }), et = {
751
+ }), tt = {
749
752
  toolIcon: "_toolIcon_ma5s5_1",
750
753
  chevronIcon: "_chevronIcon_ma5s5_5"
751
- }, tt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: o, menuCloseLabel: d, style: f, listClassName: _ = "w-[240px]", isDisabled: y = !1, chatSettings: x, extraMenuItems: S, toolsMenuItems: C = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, colors: O }) => {
752
- let k = l(), [ee, A] = V(!1), [te, j] = V(!1), [ne, M] = V(!1), [N, re] = V(null), [ie, P] = V(!1), F = z(() => s({
754
+ }, nt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: o, menuCloseLabel: d, style: f, listClassName: _ = "w-[240px]", isDisabled: y = !1, chatSettings: x, extraMenuItems: S, toolsMenuItems: C = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, colors: O }) => {
755
+ let k = l(), [ee, A] = B(!1), [te, j] = B(!1), [ne, re] = B(!1), [M, ie] = B(null), [ae, N] = B(!1), P = R(() => s({
753
756
  "--aab-tool-icon": O?.toolIcon,
754
757
  "--aab-chevron-icon": O?.chevronIcon
755
- }), [O?.toolIcon, O?.chevronIcon]), oe = C.length > 0 && w != null, I = D != null && D.length > 0, le = z(() => C.map((e) => ({
758
+ }), [O?.toolIcon, O?.chevronIcon]), se = C.length > 0 && w != null, ue = D != null && D.length > 0, F = R(() => C.map((e) => ({
756
759
  key: e.id,
757
760
  label: e.label,
758
- icon: /* @__PURE__ */ W("span", {
759
- style: F,
760
- className: c("flex items-center", et.toolIcon),
761
+ icon: /* @__PURE__ */ H("span", {
762
+ style: P,
763
+ className: c("flex items-center", tt.toolIcon),
761
764
  children: e.icon
762
765
  }),
763
766
  selectable: !0,
@@ -767,12 +770,12 @@ var K = {
767
770
  })), [
768
771
  C,
769
772
  w,
770
- F
771
- ]), pe = z(() => [
773
+ P
774
+ ]), me = R(() => [
772
775
  ...e == null ? [] : [{
773
776
  key: "attach",
774
777
  label: r,
775
- icon: /* @__PURE__ */ W(ce, {
778
+ icon: /* @__PURE__ */ H(le, {
776
779
  size: u,
777
780
  "aria-hidden": !0,
778
781
  stroke: m
@@ -780,71 +783,71 @@ var K = {
780
783
  onClick: e
781
784
  }],
782
785
  ...S ?? [],
783
- ...oe ? [{
786
+ ...se ? [{
784
787
  key: "tools",
785
788
  label: T,
786
- icon: /* @__PURE__ */ W(fe, {
789
+ icon: /* @__PURE__ */ H(pe, {
787
790
  size: u,
788
791
  "aria-hidden": !0,
789
792
  stroke: m
790
793
  }),
791
794
  onClick: k ? () => {
792
- M(!0), A(!1);
795
+ re(!0), A(!1);
793
796
  } : () => void 0,
794
- ...k ? { iconAfter: /* @__PURE__ */ W(ae, {
797
+ ...k ? { iconAfter: /* @__PURE__ */ H(oe, {
795
798
  size: u,
796
799
  stroke: m,
797
- style: F,
798
- className: c("rtl:scale-x-[-1]", et.chevronIcon),
800
+ style: P,
801
+ className: c("rtl:scale-x-[-1]", tt.chevronIcon),
799
802
  "aria-hidden": !0
800
- }) } : { children: le }
803
+ }) } : { children: F }
801
804
  }] : [],
802
805
  ...(D ?? []).map((e) => ({
803
806
  key: e.key,
804
807
  label: e.title,
805
808
  icon: e.icon,
806
809
  onClick: k ? () => {
807
- re(e.key), A(!1);
810
+ ie(e.key), A(!1);
808
811
  } : () => void 0,
809
- ...k ? { iconAfter: /* @__PURE__ */ W(ae, {
812
+ ...k ? { iconAfter: /* @__PURE__ */ H(oe, {
810
813
  size: u,
811
814
  stroke: m,
812
- style: F,
813
- className: c("rtl:scale-x-[-1]", et.chevronIcon),
815
+ style: P,
816
+ className: c("rtl:scale-x-[-1]", tt.chevronIcon),
814
817
  "aria-hidden": !0
815
818
  }) } : {
816
819
  children: [{
817
820
  key: `${e.key}-panel`,
818
821
  label: ""
819
822
  }],
820
- renderSubMenu: () => e.renderOverlay(() => P(!1))
823
+ renderSubMenu: () => e.renderOverlay(() => N(!1))
821
824
  }
822
825
  })),
823
826
  ...t == null ? [] : [{
824
827
  key: "record-voice",
825
828
  label: n,
826
- icon: /* @__PURE__ */ W(se, {
829
+ icon: /* @__PURE__ */ H(ce, {
827
830
  size: u,
828
831
  "aria-hidden": !0,
829
832
  stroke: m
830
833
  }),
831
834
  onClick: () => {
832
- A(!1), P(!1), t();
835
+ A(!1), N(!1), t();
833
836
  }
834
837
  }],
835
838
  ...x == null ? [] : [{
836
839
  key: "chat-settings",
837
840
  label: x.menuItemLabel ?? "Chat settings",
838
- icon: /* @__PURE__ */ W(de, {
841
+ icon: /* @__PURE__ */ H(fe, {
839
842
  size: u,
840
843
  "aria-hidden": !0,
841
844
  stroke: m
842
845
  }),
843
- iconAfter: k ? /* @__PURE__ */ W(ae, {
846
+ iconAfter: k ? /* @__PURE__ */ H(oe, {
844
847
  size: u,
845
848
  stroke: m,
846
- style: F,
847
- className: c("rtl:scale-x-[-1]", et.chevronIcon),
849
+ style: P,
850
+ className: c("rtl:scale-x-[-1]", tt.chevronIcon),
848
851
  "aria-hidden": !0
849
852
  }) : null,
850
853
  onClick: () => j(!0)
@@ -857,22 +860,22 @@ var K = {
857
860
  x,
858
861
  S,
859
862
  k,
860
- oe,
863
+ se,
861
864
  T,
862
- le,
865
+ F,
863
866
  D,
864
- F
867
+ P
865
868
  ]);
866
- if (pe.length === 0) return null;
867
- let me = /* @__PURE__ */ W(h, {
869
+ if (me.length === 0) return null;
870
+ let he = /* @__PURE__ */ H(h, {
868
871
  matchReferenceWidth: !1,
869
872
  placement: "bottom-start",
870
873
  listClassName: _,
871
- items: pe,
872
- open: I ? ie : void 0,
873
- onOpenChange: I ? P : void 0,
874
- children: /* @__PURE__ */ W(v, {
875
- icon: /* @__PURE__ */ W(ue, {
874
+ items: me,
875
+ open: ue ? ae : void 0,
876
+ onOpenChange: ue ? N : void 0,
877
+ children: /* @__PURE__ */ H(v, {
878
+ icon: /* @__PURE__ */ H(de, {
876
879
  size: p.LG,
877
880
  "aria-hidden": !0,
878
881
  stroke: m
@@ -882,9 +885,9 @@ var K = {
882
885
  disabled: y
883
886
  })
884
887
  });
885
- return /* @__PURE__ */ W(U, { children: k ? /* @__PURE__ */ G(U, { children: [
886
- /* @__PURE__ */ W(v, {
887
- icon: /* @__PURE__ */ W(ue, {
888
+ return /* @__PURE__ */ H(V, { children: k ? /* @__PURE__ */ U(V, { children: [
889
+ /* @__PURE__ */ H(v, {
890
+ icon: /* @__PURE__ */ H(de, {
888
891
  size: p.LG,
889
892
  "aria-hidden": !0,
890
893
  stroke: m
@@ -895,42 +898,42 @@ var K = {
895
898
  disabled: y,
896
899
  onClick: () => A(!0)
897
900
  }),
898
- /* @__PURE__ */ W(Ke, {
901
+ /* @__PURE__ */ H(qe, {
899
902
  isOpen: ee,
900
903
  title: o,
901
904
  closeLabel: d,
902
905
  onClose: () => A(!1),
903
906
  style: f,
904
- items: pe,
907
+ items: me,
905
908
  className: "pb-4",
906
909
  btnTextClassName: "flex-1"
907
910
  }),
908
- oe && /* @__PURE__ */ W($e, {
911
+ se && /* @__PURE__ */ H(et, {
909
912
  isOpen: ne,
910
913
  onBack: () => {
911
- M(!1), A(!0);
914
+ re(!1), A(!0);
912
915
  },
913
916
  backLabel: E,
914
- onClose: () => M(!1),
917
+ onClose: () => re(!1),
915
918
  closeLabel: d,
916
919
  style: f,
917
920
  title: T,
918
921
  items: C,
919
922
  onToolToggle: w
920
923
  }),
921
- D?.map((e) => /* @__PURE__ */ W(Te, {
922
- isOpen: N === e.key,
924
+ D?.map((e) => /* @__PURE__ */ H(K, {
925
+ isOpen: M === e.key,
923
926
  title: e.title,
924
927
  closeLabel: d,
925
928
  onBack: () => {
926
- re(null), A(!0);
929
+ ie(null), A(!0);
927
930
  },
928
931
  backLabel: e.backLabel ?? "Back",
929
- onClose: () => re(null),
932
+ onClose: () => ie(null),
930
933
  style: f,
931
- children: e.renderOverlay(() => re(null))
934
+ children: e.renderOverlay(() => ie(null))
932
935
  }, e.key)),
933
- x != null && /* @__PURE__ */ W(Ye, {
936
+ x != null && /* @__PURE__ */ H(Ze, {
934
937
  isOpen: te,
935
938
  onBack: () => {
936
939
  j(!1), A(!0);
@@ -957,7 +960,7 @@ var K = {
957
960
  saveLabel: x.saveLabel,
958
961
  saveDisabledTooltip: x.saveDisabledTooltip
959
962
  })
960
- ] }) : /* @__PURE__ */ G(U, { children: [me, x != null && te && /* @__PURE__ */ W(Ze, {
963
+ ] }) : /* @__PURE__ */ U(V, { children: [he, x != null && te && /* @__PURE__ */ H(Qe, {
961
964
  features: x.features,
962
965
  initialResponseFormat: x.responseFormat ?? a.Markdown,
963
966
  initialSystemPrompt: x.systemPrompt,
@@ -977,13 +980,13 @@ var K = {
977
980
  saveLabel: x.saveLabel,
978
981
  saveDisabledTooltip: x.saveDisabledTooltip
979
982
  })] }) });
980
- }, nt = {
983
+ }, rt = {
981
984
  chip: "_chip_ydmd8_1",
982
985
  chipSelected: "_chipSelected_ydmd8_9",
983
986
  chipIcon: "_chipIcon_ydmd8_16",
984
987
  chipText: "_chipText_ydmd8_19",
985
988
  chipClose: "_chipClose_ydmd8_22"
986
- }, rt = (e) => `Remove ${e}`, it = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = rt, typography: a, colors: o }) => e.length === 0 ? null : /* @__PURE__ */ W("div", {
989
+ }, it = (e) => `Remove ${e}`, at = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = it, typography: a, colors: o }) => e.length === 0 ? null : /* @__PURE__ */ H("div", {
987
990
  className: "flex flex-wrap items-center gap-2",
988
991
  style: s({
989
992
  "--ci-chip-bg": o?.chipBg,
@@ -998,27 +1001,27 @@ var K = {
998
1001
  "--ci-chip-close": o?.chipClose,
999
1002
  "--ci-chip-close-hover": o?.chipCloseHover
1000
1003
  }),
1001
- children: e.map((e) => /* @__PURE__ */ G("div", {
1002
- className: c(nt.chip, e.isSelected && nt.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "pe-1 ps-2" : "px-2"),
1003
- children: [/* @__PURE__ */ G("button", {
1004
+ children: e.map((e) => /* @__PURE__ */ U("div", {
1005
+ className: c(rt.chip, e.isSelected && rt.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "pe-1 ps-2" : "px-2"),
1006
+ children: [/* @__PURE__ */ U("button", {
1004
1007
  type: "button",
1005
1008
  onClick: () => t(e.id),
1006
1009
  "aria-pressed": e.isSelected,
1007
1010
  className: "flex min-w-0 items-center gap-1.5",
1008
- children: [/* @__PURE__ */ W("span", {
1009
- className: c(nt.chipIcon, "shrink-0"),
1011
+ children: [/* @__PURE__ */ H("span", {
1012
+ className: c(rt.chipIcon, "shrink-0"),
1010
1013
  "aria-hidden": !0,
1011
1014
  children: e.icon
1012
- }), /* @__PURE__ */ W("span", {
1013
- className: c(nt.chipText, a?.fontClassName || "dial-small-paragraph-text", "truncate"),
1015
+ }), /* @__PURE__ */ H("span", {
1016
+ className: c(rt.chipText, a?.fontClassName || "dial-small-paragraph-text", "truncate"),
1014
1017
  children: e.label
1015
1018
  })]
1016
- }), r && /* @__PURE__ */ W("button", {
1019
+ }), r && /* @__PURE__ */ H("button", {
1017
1020
  type: "button",
1018
1021
  onClick: () => n(e.id),
1019
1022
  "aria-label": i(e.label),
1020
- className: c(nt.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1021
- children: /* @__PURE__ */ W(pe, {
1023
+ className: c(rt.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1024
+ children: /* @__PURE__ */ H(me, {
1022
1025
  size: 12,
1023
1026
  "aria-hidden": !0,
1024
1027
  stroke: m
@@ -1036,34 +1039,34 @@ var K = {
1036
1039
  modelSelectorName: "_modelSelectorName_q1jcl_50",
1037
1040
  modelSelectorVersion: "_modelSelectorVersion_q1jcl_53",
1038
1041
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_q1jcl_62"
1039
- }, at = {
1042
+ }, ot = {
1040
1043
  wrapperError: "_wrapperError_129ri_1",
1041
1044
  waveformCanvas: "_waveformCanvas_129ri_5",
1042
1045
  recordingDot: "_recordingDot_129ri_19",
1043
1046
  "recording-pulse": "_recording-pulse_129ri_1"
1044
- }, ot = 3, st = 4, ct = 200, lt = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1045
- let h = B(null), g = B(new Float32Array(ct)), y = B(0), b = B(0), x = e === Le.Recording, S = e === Le.Error, C = e === Le.Processing, w = L((e) => {
1047
+ }, st = 3, ct = 4, lt = 200, ut = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1048
+ let h = z(null), g = z(new Float32Array(lt)), y = z(0), b = z(0), x = e === Le.Recording, S = e === Le.Error, C = e === Le.Processing, w = I((e) => {
1046
1049
  let t = e.getContext("2d");
1047
1050
  if (!t) return;
1048
1051
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
1049
1052
  let { width: n, height: r } = e;
1050
1053
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
1051
- let i = Math.min(Math.max(1, Math.floor(n / st)), ct - 1), a = y.current, o = b.current;
1054
+ let i = Math.min(Math.max(1, Math.floor(n / ct)), lt - 1), a = y.current, o = b.current;
1052
1055
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
1053
1056
  for (let e = 0; e <= i; e++) {
1054
- let n = ((a - i + e) % ct + ct) % ct, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1055
- t.fillRect(e * st, (r - c) / 2, ot, c);
1057
+ let n = ((a - i + e) % lt + lt) % lt, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1058
+ t.fillRect(e * ct, (r - c) / 2, st, c);
1056
1059
  }
1057
1060
  t.restore();
1058
1061
  }, []);
1059
- R(() => {
1062
+ L(() => {
1060
1063
  if (!x) return;
1061
1064
  let e = h.current;
1062
1065
  if (!e) return;
1063
1066
  g.current.fill(0), y.current = 0, b.current = 0;
1064
1067
  let n, r = () => {
1065
- if (b.current += 1, b.current >= st) {
1066
- b.current -= st;
1068
+ if (b.current += 1, b.current >= ct) {
1069
+ b.current -= ct;
1067
1070
  let e = t.current;
1068
1071
  if (e) {
1069
1072
  let t = new Uint8Array(e.frequencyBinCount);
@@ -1073,7 +1076,7 @@ var K = {
1073
1076
  let r = (t[e] - 128) / 128;
1074
1077
  n += r * r;
1075
1078
  }
1076
- g.current[y.current % ct] = Math.sqrt(n / t.length), y.current++;
1079
+ g.current[y.current % lt] = Math.sqrt(n / t.length), y.current++;
1077
1080
  }
1078
1081
  }
1079
1082
  w(e), n = requestAnimationFrame(r);
@@ -1085,7 +1088,7 @@ var K = {
1085
1088
  x,
1086
1089
  t,
1087
1090
  w
1088
- ]), R(() => {
1091
+ ]), L(() => {
1089
1092
  let e = h.current;
1090
1093
  if (!e) return;
1091
1094
  let t = new ResizeObserver(() => {
@@ -1093,11 +1096,11 @@ var K = {
1093
1096
  });
1094
1097
  return t.observe(e), () => t.disconnect();
1095
1098
  }, [w]);
1096
- let E = /* @__PURE__ */ G("div", {
1099
+ let E = /* @__PURE__ */ U("div", {
1097
1100
  className: "flex flex-shrink-0 items-center justify-end gap-1",
1098
1101
  children: [
1099
- /* @__PURE__ */ W(v, {
1100
- icon: /* @__PURE__ */ W(pe, {
1102
+ /* @__PURE__ */ H(v, {
1103
+ icon: /* @__PURE__ */ H(me, {
1101
1104
  size: p.LG,
1102
1105
  "aria-hidden": !0,
1103
1106
  stroke: m
@@ -1106,8 +1109,8 @@ var K = {
1106
1109
  className: "mobile:min-h-11 mobile:min-w-11",
1107
1110
  onClick: i
1108
1111
  }),
1109
- x && /* @__PURE__ */ W(T, {
1110
- icon: /* @__PURE__ */ W(I, {
1112
+ x && /* @__PURE__ */ H(T, {
1113
+ icon: /* @__PURE__ */ H(ue, {
1111
1114
  size: p.LG,
1112
1115
  "aria-hidden": !0
1113
1116
  }),
@@ -1116,94 +1119,94 @@ var K = {
1116
1119
  "aria-label": o,
1117
1120
  className: "mobile:min-h-11 mobile:min-w-11"
1118
1121
  }),
1119
- C && /* @__PURE__ */ W("span", {
1122
+ C && /* @__PURE__ */ H("span", {
1120
1123
  className: "flex size-[40px] flex-shrink-0 items-center justify-center mobile:min-h-11 mobile:min-w-11",
1121
- children: /* @__PURE__ */ W(te, {
1124
+ children: /* @__PURE__ */ H(te, {
1122
1125
  size: 20,
1123
1126
  ariaLabel: l
1124
1127
  })
1125
1128
  })
1126
1129
  ]
1127
1130
  });
1128
- return /* @__PURE__ */ G("div", {
1131
+ return /* @__PURE__ */ U("div", {
1129
1132
  className: d,
1130
- children: [/* @__PURE__ */ G("div", {
1133
+ children: [/* @__PURE__ */ U("div", {
1131
1134
  style: u,
1132
- className: c("flex w-full min-w-0 flex-col justify-center gap-2", !f && J.wrapper, !f && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md", S && at.wrapperError),
1133
- children: [/* @__PURE__ */ G("div", {
1135
+ className: c("flex w-full min-w-0 flex-col justify-center gap-2", !f && J.wrapper, !f && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md", S && ot.wrapperError),
1136
+ children: [/* @__PURE__ */ U("div", {
1134
1137
  className: "flex min-w-0 flex-1 items-center gap-3",
1135
- children: [x && /* @__PURE__ */ W("span", {
1136
- className: c(at.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1138
+ children: [x && /* @__PURE__ */ H("span", {
1139
+ className: c(ot.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1137
1140
  "aria-hidden": !0
1138
- }), /* @__PURE__ */ W("canvas", {
1141
+ }), /* @__PURE__ */ H("canvas", {
1139
1142
  ref: h,
1140
1143
  height: 26,
1141
1144
  "aria-hidden": !0,
1142
- className: c(at.waveformCanvas, "h-[26px] min-w-0 flex-1")
1145
+ className: c(ot.waveformCanvas, "h-[26px] min-w-0 flex-1")
1143
1146
  })]
1144
- }), /* @__PURE__ */ G("div", {
1147
+ }), /* @__PURE__ */ U("div", {
1145
1148
  className: "flex items-center justify-between gap-2",
1146
- children: [a ?? /* @__PURE__ */ W("span", { "aria-hidden": !0 }), E]
1149
+ children: [a ?? /* @__PURE__ */ H("span", { "aria-hidden": !0 }), E]
1147
1150
  })]
1148
- }), S && n && /* @__PURE__ */ W("div", {
1151
+ }), S && n && /* @__PURE__ */ H("div", {
1149
1152
  role: "alert",
1150
- children: /* @__PURE__ */ W(_, {
1153
+ children: /* @__PURE__ */ H(_, {
1151
1154
  text: n,
1152
1155
  className: "mt-1 px-1"
1153
1156
  })
1154
1157
  })]
1155
1158
  });
1156
- }, ut = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ W(T, {
1159
+ }, dt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ H(T, {
1157
1160
  "aria-label": n,
1158
1161
  onClick: () => e?.(),
1159
1162
  disabled: t,
1160
1163
  tooltipProps: r ? { tooltip: r } : void 0,
1161
- icon: /* @__PURE__ */ W(ie, {
1164
+ icon: /* @__PURE__ */ H(ae, {
1162
1165
  size: p.LG,
1163
1166
  className: "rtl:scale-x-[-1]",
1164
1167
  stroke: m
1165
1168
  })
1166
- }), dt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(j, {
1167
- icon: /* @__PURE__ */ W(le, {
1169
+ }), ft = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ H(j, {
1170
+ icon: /* @__PURE__ */ H(F, {
1168
1171
  size: p.LG,
1169
1172
  stroke: m
1170
1173
  }),
1171
1174
  onClick: () => e?.(),
1172
1175
  "aria-label": t
1173
- }), ft = ({ size: e = 20 }) => /* @__PURE__ */ W(k, {
1176
+ }), pt = ({ size: e = 20 }) => /* @__PURE__ */ H(k, {
1174
1177
  variant: ee.Circular,
1175
1178
  width: e,
1176
1179
  height: e,
1177
1180
  active: !0
1178
- }), pt = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1181
+ }), mt = ({ loadingLabel: e }) => /* @__PURE__ */ U("span", {
1179
1182
  className: "flex min-w-0 flex-1 items-center",
1180
- children: [/* @__PURE__ */ W(k, {
1183
+ children: [/* @__PURE__ */ H(k, {
1181
1184
  variant: ee.Text,
1182
1185
  width: "100%",
1183
1186
  height: 16,
1184
1187
  active: !0
1185
- }), e && /* @__PURE__ */ W("span", {
1188
+ }), e && /* @__PURE__ */ H("span", {
1186
1189
  className: "sr-only",
1187
1190
  children: e
1188
1191
  })]
1189
- }), mt = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1192
+ }), ht = ({ loadingLabel: e }) => /* @__PURE__ */ H("div", {
1190
1193
  role: "status",
1191
1194
  "aria-label": e,
1192
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ G("div", {
1195
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ U("div", {
1193
1196
  className: "flex h-11 items-center gap-3 px-4",
1194
1197
  "aria-hidden": "true",
1195
- children: [/* @__PURE__ */ W(ft, {}), /* @__PURE__ */ W(pt, {})]
1198
+ children: [/* @__PURE__ */ H(pt, {}), /* @__PURE__ */ H(mt, {})]
1196
1199
  }, t))
1197
- }), ht = (e) => e.displayName ?? e.id, Y = (e, t) => {
1200
+ }), gt = (e) => e.displayName ?? e.id, _t = (e, t) => {
1198
1201
  let n = t.trim().toLowerCase();
1199
- return n ? e.filter((e) => ht(e).toLowerCase().includes(n)) : e;
1200
- }, X = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1202
+ return n ? e.filter((e) => gt(e).toLowerCase().includes(n)) : e;
1203
+ }, vt = (e, t, r, i = 18, a) => /* @__PURE__ */ H(n, {
1201
1204
  src: e,
1202
1205
  size: i,
1203
1206
  labels: { tooltip: a },
1204
1207
  initialsName: r
1205
- }), gt = { searchHeader: "_searchHeader_1728o_1" }, _t = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = gt.searchHeader, colors: a }) => {
1206
- let [o, l] = V(""), u = z(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = z(() => d ? /* @__PURE__ */ W(ft, { size: p.LG }) : X(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1208
+ }), yt = { searchHeader: "_searchHeader_1728o_1" }, Y = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = yt.searchHeader, colors: a }) => {
1209
+ let [o, l] = B(""), u = R(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = R(() => d ? /* @__PURE__ */ H(pt, { size: p.LG }) : vt(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1207
1210
  d,
1208
1211
  u,
1209
1212
  f,
@@ -1214,11 +1217,11 @@ var K = {
1214
1217
  selectorAriaLabel: h ? `${r?.ariaLabel ?? "Select model"}: ${h}` : r?.ariaLabel ?? "Select model",
1215
1218
  selectedLabel: h,
1216
1219
  selectedVersion: _,
1217
- menuItems: z(() => {
1220
+ menuItems: R(() => {
1218
1221
  if (d) return Array.from({ length: 7 }, (e, t) => ({
1219
1222
  key: `__loading-${t}`,
1220
- icon: /* @__PURE__ */ W(ft, {}),
1221
- label: /* @__PURE__ */ W(pt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1223
+ icon: /* @__PURE__ */ H(pt, {}),
1224
+ label: /* @__PURE__ */ H(mt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1222
1225
  disabled: !0
1223
1226
  }));
1224
1227
  if (!e || e.length === 0) {
@@ -1229,17 +1232,17 @@ var K = {
1229
1232
  disabled: !0
1230
1233
  }] : [];
1231
1234
  }
1232
- return Y(e, o).map((e) => ({
1235
+ return _t(e, o).map((e) => ({
1233
1236
  key: e.id,
1234
- label: /* @__PURE__ */ W(y, {
1235
- text: ht(e),
1237
+ label: /* @__PURE__ */ H(y, {
1238
+ text: gt(e),
1236
1239
  query: o,
1237
1240
  maxLines: 1
1238
1241
  }),
1239
- icon: X(e.iconUrl, e.type, e.displayName ?? e.id),
1242
+ icon: vt(e.iconUrl, e.type, e.displayName ?? e.id),
1240
1243
  mark: b.Check,
1241
1244
  checked: e.id === t,
1242
- className: c(K.modelMenuItem, e.id === t && K.modelMenuItemSelected),
1245
+ className: c(G.modelMenuItem, e.id === t && G.modelMenuItemSelected),
1243
1246
  onClick: () => n?.(e.id)
1244
1247
  }));
1245
1248
  }, [
@@ -1250,10 +1253,10 @@ var K = {
1250
1253
  r,
1251
1254
  n
1252
1255
  ]),
1253
- menuHeader: z(() => !d && e && e.length > 0 ? /* @__PURE__ */ W("div", {
1256
+ menuHeader: R(() => !d && e && e.length > 0 ? /* @__PURE__ */ H("div", {
1254
1257
  style: s({ "--ms-search-header-bg": a?.searchHeaderBackground }),
1255
- className: c("sticky top-0 z-10 pb-1 pe-2 pt-2", i, K.modelMenuSearch),
1256
- children: /* @__PURE__ */ W(O, {
1258
+ className: c("sticky top-0 z-10 pb-1 pe-2 pt-2", i, G.modelMenuSearch),
1259
+ children: /* @__PURE__ */ H(O, {
1257
1260
  value: o,
1258
1261
  placeholder: r?.searchPlaceholder ?? "Search",
1259
1262
  size: g.Small,
@@ -1272,8 +1275,8 @@ var K = {
1272
1275
  e || l("");
1273
1276
  }
1274
1277
  };
1275
- }, vt = typeof window < "u" ? _e : R;
1276
- function yt(e) {
1278
+ }, bt = typeof window < "u" ? ve : L;
1279
+ function xt(e) {
1277
1280
  if (e !== void 0) switch (typeof e) {
1278
1281
  case "number": return e;
1279
1282
  case "string":
@@ -1281,15 +1284,15 @@ function yt(e) {
1281
1284
  break;
1282
1285
  }
1283
1286
  }
1284
- function bt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1285
- let { styleHeight: s, styleWidth: c } = z(() => ({
1286
- styleHeight: yt(o?.height),
1287
- styleWidth: yt(o?.width)
1288
- }), [o?.height, o?.width]), [l, u] = V({
1287
+ function St({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1288
+ let { styleHeight: s, styleWidth: c } = R(() => ({
1289
+ styleHeight: xt(o?.height),
1290
+ styleWidth: xt(o?.width)
1291
+ }), [o?.height, o?.width]), [l, u] = B({
1289
1292
  height: t,
1290
1293
  width: n
1291
1294
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1292
- return vt(() => {
1295
+ return bt(() => {
1293
1296
  if (i === null || d) return;
1294
1297
  let t = new ResizeObserver((e) => {
1295
1298
  for (let t of e) {
@@ -1309,7 +1312,7 @@ function bt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1309
1312
  i,
1310
1313
  s,
1311
1314
  c
1312
- ]), z(() => ({
1315
+ ]), R(() => ({
1313
1316
  height: s ?? l.height,
1314
1317
  width: c ?? l.width
1315
1318
  }), [
@@ -1318,26 +1321,26 @@ function bt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1318
1321
  c
1319
1322
  ]);
1320
1323
  }
1321
- function xt(e) {
1322
- let t = B(() => {
1324
+ function Ct(e) {
1325
+ let t = z(() => {
1323
1326
  throw Error("Cannot call during render.");
1324
1327
  });
1325
- return vt(() => {
1328
+ return bt(() => {
1326
1329
  t.current = e;
1327
- }, [e]), L((e) => t.current?.(e), [t]);
1330
+ }, [e]), I((e) => t.current?.(e), [t]);
1328
1331
  }
1329
- var Z = null;
1330
- function Q(e = !1) {
1331
- if (Z === null || e) {
1332
+ var wt = null;
1333
+ function Tt(e = !1) {
1334
+ if (wt === null || e) {
1332
1335
  let e = document.createElement("div"), t = e.style;
1333
1336
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1334
1337
  let n = document.createElement("div"), r = n.style;
1335
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? Z = "positive-descending" : (e.scrollLeft = 1, Z = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), Z;
1338
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? wt = "positive-descending" : (e.scrollLeft = 1, wt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), wt;
1336
1339
  }
1337
- return Z;
1340
+ return wt;
1338
1341
  }
1339
- function $({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1340
- if (t === "horizontal" && n) switch (Q()) {
1342
+ function X({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1343
+ if (t === "horizontal" && n) switch (Tt()) {
1341
1344
  case "negative": return -r;
1342
1345
  case "positive-descending":
1343
1346
  if (e) {
@@ -1348,26 +1351,26 @@ function $({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1348
1351
  }
1349
1352
  return r;
1350
1353
  }
1351
- function St(e, t = "Assertion error") {
1354
+ function Z(e, t = "Assertion error") {
1352
1355
  if (!e) throw console.error(t), Error(t);
1353
1356
  }
1354
- function Ct(e, t) {
1357
+ function Q(e, t) {
1355
1358
  if (e === t) return !0;
1356
- if (!!e != !!t || (St(e !== void 0), St(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1359
+ if (!!e != !!t || (Z(e !== void 0), Z(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1357
1360
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1358
1361
  return !0;
1359
1362
  }
1360
- function wt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1363
+ function Et({ cachedBounds: e, itemCount: t, itemSize: n }) {
1361
1364
  if (t === 0) return 0;
1362
1365
  if (typeof n == "number") return t * n;
1363
1366
  {
1364
1367
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1365
- return St(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1368
+ return Z(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1366
1369
  }
1367
1370
  }
1368
- function Tt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1371
+ function Dt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1369
1372
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1370
- let s = wt({
1373
+ let s = Et({
1371
1374
  cachedBounds: t,
1372
1375
  itemCount: r,
1373
1376
  itemSize: i
@@ -1379,7 +1382,7 @@ function Tt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
1379
1382
  default: return a >= u && a <= l ? a : a < u ? u : l;
1380
1383
  }
1381
1384
  }
1382
- function Et({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1385
+ function Ot({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1383
1386
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
1384
1387
  for (; u < a;) {
1385
1388
  let n = e.get(u);
@@ -1398,11 +1401,11 @@ function Et({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
1398
1401
  stopIndexOverscan: l
1399
1402
  };
1400
1403
  }
1401
- function Dt({ itemCount: e, itemProps: t, itemSize: n }) {
1404
+ function kt({ itemCount: e, itemProps: t, itemSize: n }) {
1402
1405
  let r = /* @__PURE__ */ new Map();
1403
1406
  return {
1404
1407
  get(i) {
1405
- for (St(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1408
+ for (Z(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1406
1409
  let e = r.size, a;
1407
1410
  switch (typeof n) {
1408
1411
  case "function":
@@ -1418,14 +1421,14 @@ function Dt({ itemCount: e, itemProps: t, itemSize: n }) {
1418
1421
  });
1419
1422
  else {
1420
1423
  let t = r.get(e - 1);
1421
- St(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1424
+ Z(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1422
1425
  scrollOffset: t.scrollOffset + t.size,
1423
1426
  size: a
1424
1427
  });
1425
1428
  }
1426
1429
  }
1427
1430
  let a = r.get(i);
1428
- return St(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1431
+ return Z(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1429
1432
  },
1430
1433
  set(e, t) {
1431
1434
  r.set(e, t);
@@ -1435,8 +1438,8 @@ function Dt({ itemCount: e, itemProps: t, itemSize: n }) {
1435
1438
  }
1436
1439
  };
1437
1440
  }
1438
- function Ot({ itemCount: e, itemProps: t, itemSize: n }) {
1439
- return z(() => Dt({
1441
+ function At({ itemCount: e, itemProps: t, itemSize: n }) {
1442
+ return R(() => kt({
1440
1443
  itemCount: e,
1441
1444
  itemProps: t,
1442
1445
  itemSize: n
@@ -1446,11 +1449,11 @@ function Ot({ itemCount: e, itemProps: t, itemSize: n }) {
1446
1449
  n
1447
1450
  ]);
1448
1451
  }
1449
- function kt({ containerSize: e, itemSize: t }) {
1452
+ function jt({ containerSize: e, itemSize: t }) {
1450
1453
  let n;
1451
1454
  switch (typeof t) {
1452
1455
  case "string":
1453
- St(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), St(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1456
+ Z(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Z(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1454
1457
  break;
1455
1458
  default:
1456
1459
  n = t;
@@ -1458,21 +1461,21 @@ function kt({ containerSize: e, itemSize: t }) {
1458
1461
  }
1459
1462
  return n;
1460
1463
  }
1461
- function At({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1462
- let { height: u = n, width: d = n } = bt({
1464
+ function Mt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1465
+ let { height: u = n, width: d = n } = St({
1463
1466
  defaultHeight: r === "vertical" ? n : void 0,
1464
1467
  defaultWidth: r === "horizontal" ? n : void 0,
1465
1468
  element: e,
1466
1469
  mode: r === "vertical" ? "only-height" : "only-width",
1467
1470
  style: t
1468
- }), f = B({
1471
+ }), f = z({
1469
1472
  height: 0,
1470
1473
  width: 0
1471
- }), p = r === "vertical" ? u : d, m = kt({
1474
+ }), p = r === "vertical" ? u : d, m = jt({
1472
1475
  containerSize: p,
1473
1476
  itemSize: s
1474
1477
  });
1475
- _e(() => {
1478
+ ve(() => {
1476
1479
  if (typeof c == "function") {
1477
1480
  let e = f.current;
1478
1481
  (e.height !== u || e.width !== d) && (c({
@@ -1485,11 +1488,11 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1485
1488
  c,
1486
1489
  d
1487
1490
  ]);
1488
- let h = Ot({
1491
+ let h = At({
1489
1492
  itemCount: a,
1490
1493
  itemProps: o,
1491
1494
  itemSize: m
1492
- }), g = L((e) => h.get(e), [h]), [_, v] = V(() => Et({
1495
+ }), g = I((e) => h.get(e), [h]), [_, v] = B(() => Ot({
1493
1496
  cachedBounds: h,
1494
1497
  containerScrollOffset: 0,
1495
1498
  containerSize: p,
@@ -1500,7 +1503,7 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1500
1503
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1501
1504
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1502
1505
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1503
- }, C = L(() => wt({
1506
+ }, C = I(() => Et({
1504
1507
  cachedBounds: h,
1505
1508
  itemCount: a,
1506
1509
  itemSize: m
@@ -1508,9 +1511,9 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1508
1511
  h,
1509
1512
  a,
1510
1513
  m
1511
- ]), w = L((t) => Et({
1514
+ ]), w = I((t) => Ot({
1512
1515
  cachedBounds: h,
1513
- containerScrollOffset: $({
1516
+ containerScrollOffset: X({
1514
1517
  containerElement: e,
1515
1518
  direction: r,
1516
1519
  isRtl: i,
@@ -1528,19 +1531,19 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1528
1531
  a,
1529
1532
  l
1530
1533
  ]);
1531
- return vt(() => {
1534
+ return bt(() => {
1532
1535
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1533
1536
  }, [
1534
1537
  e,
1535
1538
  r,
1536
1539
  w
1537
- ]), vt(() => {
1540
+ ]), bt(() => {
1538
1541
  if (!e) return;
1539
1542
  let t = () => {
1540
1543
  v((t) => {
1541
- let { scrollLeft: n, scrollTop: o } = e, s = Et({
1544
+ let { scrollLeft: n, scrollTop: o } = e, s = Ot({
1542
1545
  cachedBounds: h,
1543
- containerScrollOffset: $({
1546
+ containerScrollOffset: X({
1544
1547
  containerElement: e,
1545
1548
  direction: r,
1546
1549
  isRtl: i,
@@ -1550,7 +1553,7 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1550
1553
  itemCount: a,
1551
1554
  overscanCount: l
1552
1555
  });
1553
- return Ct(s, t) ? t : s;
1556
+ return Q(s, t) ? t : s;
1554
1557
  });
1555
1558
  };
1556
1559
  return e.addEventListener("scroll", t), () => {
@@ -1566,8 +1569,8 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1566
1569
  ]), {
1567
1570
  getCellBounds: g,
1568
1571
  getEstimatedSize: C,
1569
- scrollToIndex: xt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1570
- let s = Tt({
1572
+ scrollToIndex: Ct(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1573
+ let s = Dt({
1571
1574
  align: t,
1572
1575
  cachedBounds: h,
1573
1576
  containerScrollOffset: n,
@@ -1577,14 +1580,14 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1577
1580
  itemSize: m
1578
1581
  });
1579
1582
  if (e) {
1580
- if (s = $({
1583
+ if (s = X({
1581
1584
  containerElement: e,
1582
1585
  direction: r,
1583
1586
  isRtl: i,
1584
1587
  scrollOffset: s
1585
1588
  }), typeof e.scrollTo != "function") {
1586
1589
  let e = w(s);
1587
- Ct(_, e) || v(e);
1590
+ Q(_, e) || v(e);
1588
1591
  }
1589
1592
  return s;
1590
1593
  }
@@ -1595,30 +1598,30 @@ function At({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1595
1598
  stopIndexVisible: x
1596
1599
  };
1597
1600
  }
1598
- function jt(e) {
1599
- return z(() => e, Object.values(e));
1601
+ function Nt(e) {
1602
+ return R(() => e, Object.values(e));
1600
1603
  }
1601
- function Mt(e, t) {
1604
+ function Pt(e, t) {
1602
1605
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1603
- return Ct(n, a) && Ct(r, o) && Ct(i, s);
1606
+ return Q(n, a) && Q(r, o) && Q(i, s);
1604
1607
  }
1605
- function Nt(e) {
1608
+ function Ft(e) {
1606
1609
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1607
1610
  }
1608
- var Pt = "data-react-window-index";
1609
- function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1610
- let m = jt(u), h = z(() => he(s, Mt), [s]), [g, _] = V(null), v = Nt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = At({
1611
+ var It = "data-react-window-index";
1612
+ function Lt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1613
+ let m = Nt(u), h = R(() => ge(s, Pt), [s]), [g, _] = B(null), v = Ft(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Mt({
1611
1614
  containerElement: g,
1612
1615
  containerStyle: f,
1613
1616
  defaultContainerSize: n,
1614
1617
  direction: "vertical",
1615
1618
  itemCount: c,
1616
1619
  itemProps: m,
1617
- itemSize: z(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1620
+ itemSize: R(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1618
1621
  onResize: i,
1619
1622
  overscanCount: o
1620
1623
  });
1621
- ge(r, () => ({
1624
+ _e(r, () => ({
1622
1625
  get element() {
1623
1626
  return g;
1624
1627
  },
@@ -1633,12 +1636,12 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1633
1636
  top: r
1634
1637
  });
1635
1638
  }
1636
- }), [g, x]), vt(() => {
1639
+ }), [g, x]), bt(() => {
1637
1640
  if (!g) return;
1638
1641
  let e = Array.from(g.children).filter((e, t) => {
1639
1642
  if (e.hasAttribute("aria-hidden")) return !1;
1640
1643
  let n = `${S + t}`;
1641
- return e.setAttribute(Pt, n), !0;
1644
+ return e.setAttribute(It, n), !0;
1642
1645
  });
1643
1646
  if (v) return l.observeRowElements(e);
1644
1647
  }, [
@@ -1647,7 +1650,7 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1647
1650
  l,
1648
1651
  S,
1649
1652
  w
1650
- ]), R(() => {
1653
+ ]), L(() => {
1651
1654
  S >= 0 && w >= 0 && a && a({
1652
1655
  startIndex: C,
1653
1656
  stopIndex: T
@@ -1662,11 +1665,11 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1662
1665
  w,
1663
1666
  T
1664
1667
  ]);
1665
- let E = z(() => {
1668
+ let E = R(() => {
1666
1669
  let e = [];
1667
1670
  if (c > 0) for (let t = S; t <= w; t++) {
1668
1671
  let n = y(t);
1669
- e.push(/* @__PURE__ */ me(h, {
1672
+ e.push(/* @__PURE__ */ he(h, {
1670
1673
  ...m,
1671
1674
  ariaAttributes: {
1672
1675
  "aria-posinset": t + 1,
@@ -1693,7 +1696,7 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1693
1696
  m,
1694
1697
  S,
1695
1698
  w
1696
- ]), D = /* @__PURE__ */ W("div", {
1699
+ ]), D = /* @__PURE__ */ H("div", {
1697
1700
  "aria-hidden": !0,
1698
1701
  style: {
1699
1702
  height: b(),
@@ -1701,7 +1704,7 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1701
1704
  zIndex: -1
1702
1705
  }
1703
1706
  });
1704
- return me(d, {
1707
+ return he(d, {
1705
1708
  role: "list",
1706
1709
  ...p,
1707
1710
  className: t,
@@ -1715,35 +1718,35 @@ function Ft({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1715
1718
  }
1716
1719
  }, E, e, D);
1717
1720
  }
1718
- var It = {
1721
+ var Rt = {
1719
1722
  divider: "_divider_1tiyp_1",
1720
1723
  item: "_item_1tiyp_5",
1721
1724
  itemIcon: "_itemIcon_1tiyp_15",
1722
1725
  checkIcon: "_checkIcon_1tiyp_19",
1723
1726
  stateLabel: "_stateLabel_1tiyp_23"
1724
- }, Lt = 44, Rt = 8, zt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, onSelect: s }) => {
1725
- let l = r[e], u = X(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1726
- return /* @__PURE__ */ W("div", {
1727
+ }, zt = 44, Bt = 8, Vt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, onSelect: s }) => {
1728
+ let l = r[e], u = vt(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1729
+ return /* @__PURE__ */ H("div", {
1727
1730
  style: t,
1728
1731
  ...n,
1729
- children: /* @__PURE__ */ W(d, {
1732
+ children: /* @__PURE__ */ H(d, {
1730
1733
  type: "button",
1731
1734
  "aria-current": f ? "true" : void 0,
1732
- className: c(It.item, "h-full w-full gap-3 px-4"),
1733
- iconBefore: /* @__PURE__ */ W("span", {
1734
- className: It.itemIcon,
1735
+ className: c(Rt.item, "h-full w-full gap-3 px-4"),
1736
+ iconBefore: /* @__PURE__ */ H("span", {
1737
+ className: Rt.itemIcon,
1735
1738
  children: u
1736
1739
  }),
1737
- label: /* @__PURE__ */ G("span", {
1740
+ label: /* @__PURE__ */ U("span", {
1738
1741
  className: "flex flex-1 items-center justify-between gap-2",
1739
- children: [/* @__PURE__ */ W(y, {
1742
+ children: [/* @__PURE__ */ H(y, {
1740
1743
  text: l.displayName ?? l.id,
1741
1744
  query: o,
1742
1745
  maxLines: 1,
1743
1746
  className: c(a, "min-w-0 flex-1 text-start")
1744
- }), f && /* @__PURE__ */ W(P, {
1747
+ }), f && /* @__PURE__ */ H(N, {
1745
1748
  size: p.SM,
1746
- className: It.checkIcon,
1749
+ className: Rt.checkIcon,
1747
1750
  "aria-hidden": !0,
1748
1751
  stroke: m
1749
1752
  })]
@@ -1751,12 +1754,12 @@ var It = {
1751
1754
  onClick: () => s(l.id)
1752
1755
  })
1753
1756
  });
1754
- }, Bt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1755
- let [v, y] = V("");
1756
- R(() => {
1757
+ }, Ht = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1758
+ let [v, y] = B("");
1759
+ L(() => {
1757
1760
  e || y("");
1758
1761
  }, [e]);
1759
- let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? Y(a, v) : [], w = (e) => {
1762
+ let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? _t(a, v) : [], w = (e) => {
1760
1763
  l(e), i();
1761
1764
  }, T = s({
1762
1765
  "--ci-sheet-divider": _?.divider,
@@ -1766,37 +1769,37 @@ var It = {
1766
1769
  "--ci-sheet-icon": _?.itemIcon,
1767
1770
  "--ci-check-icon": _?.checkIcon
1768
1771
  });
1769
- return /* @__PURE__ */ W(Te, {
1772
+ return /* @__PURE__ */ H(K, {
1770
1773
  isOpen: e,
1771
1774
  title: t,
1772
1775
  closeLabel: n,
1773
1776
  onClose: i,
1774
1777
  style: p,
1775
1778
  titleClassName: m,
1776
- className: c("max-h-[80dvh]", K.modelMenu),
1779
+ className: c("max-h-[80dvh]", G.modelMenu),
1777
1780
  colors: _?.shell,
1778
- children: /* @__PURE__ */ G("div", {
1781
+ children: /* @__PURE__ */ U("div", {
1779
1782
  className: "contents",
1780
1783
  style: T,
1781
- children: [b && !x && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
1784
+ children: [b && !x && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("div", {
1782
1785
  className: "flex-shrink-0 px-4 py-[10px]",
1783
- children: /* @__PURE__ */ W(O, {
1786
+ children: /* @__PURE__ */ H(O, {
1784
1787
  value: v,
1785
1788
  placeholder: r,
1786
1789
  size: g.Standard,
1787
1790
  onChange: (e) => y(e ?? "")
1788
1791
  })
1789
- }), /* @__PURE__ */ W("div", { className: c(It.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(mt, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1792
+ }), /* @__PURE__ */ H("div", { className: c(Rt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ H(ht, { loadingLabel: u }) : S ? /* @__PURE__ */ H("div", {
1790
1793
  role: "list",
1791
- className: c(It.stateLabel, h, "px-4 py-4"),
1794
+ className: c(Rt.stateLabel, h, "px-4 py-4"),
1792
1795
  children: S
1793
- }) : /* @__PURE__ */ W(Ft, {
1796
+ }) : /* @__PURE__ */ H(Lt, {
1794
1797
  role: "list",
1795
1798
  className: "overflow-y-auto",
1796
- style: { height: Math.min(C.length, Rt) * Lt },
1797
- rowComponent: zt,
1799
+ style: { height: Math.min(C.length, Bt) * zt },
1800
+ rowComponent: Vt,
1798
1801
  rowCount: C.length,
1799
- rowHeight: Lt,
1802
+ rowHeight: zt,
1800
1803
  rowProps: {
1801
1804
  items: C,
1802
1805
  selectedDeploymentId: o,
@@ -1807,24 +1810,24 @@ var It = {
1807
1810
  })]
1808
1811
  })
1809
1812
  });
1810
- }, Vt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: f, onPickerOpenChange: g }) => {
1811
- let [_, y] = V(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = _t({
1813
+ }, Ut = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: f, onPickerOpenChange: g }) => {
1814
+ let [_, y] = B(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = Y({
1812
1815
  deployments: e,
1813
1816
  selectedDeploymentId: t,
1814
1817
  onDeploymentChange: n,
1815
1818
  modelSelectorLabels: r
1816
1819
  });
1817
1820
  if (!e) return null;
1818
- let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ W(F, {
1821
+ let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ H(P, {
1819
1822
  size: p.SM,
1820
1823
  className: J.modelSelectorCaret,
1821
1824
  "aria-hidden": !0,
1822
1825
  stroke: m
1823
1826
  });
1824
- if (a) return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(N, {
1827
+ if (a) return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(M, {
1825
1828
  tooltip: S,
1826
- children: /* @__PURE__ */ W(v, {
1827
- icon: /* @__PURE__ */ G("div", {
1829
+ children: /* @__PURE__ */ H(v, {
1830
+ icon: /* @__PURE__ */ U("div", {
1828
1831
  className: "flex items-center gap-1",
1829
1832
  children: [b, O]
1830
1833
  }),
@@ -1832,17 +1835,17 @@ var It = {
1832
1835
  onClick: () => {
1833
1836
  s || y(!0);
1834
1837
  },
1835
- className: c("w-[50px]", J.modelSelectorButton, D, K.modelSelectorButton)
1838
+ className: c("w-[50px]", J.modelSelectorButton, D, G.modelSelectorButton)
1836
1839
  })
1837
- }), u ? /* @__PURE__ */ W(Te, {
1840
+ }), u ? /* @__PURE__ */ H(K, {
1838
1841
  isOpen: _,
1839
1842
  title: r?.ariaLabel ?? "Select model",
1840
1843
  closeLabel: r?.closeLabel ?? "Close",
1841
1844
  onClose: () => y(!1),
1842
1845
  style: l,
1843
- className: K.modelMenu,
1846
+ className: G.modelMenu,
1844
1847
  children: u(() => y(!1))
1845
- }) : /* @__PURE__ */ W(Bt, {
1848
+ }) : /* @__PURE__ */ H(Ht, {
1846
1849
  isOpen: _,
1847
1850
  title: r?.ariaLabel ?? "Select model",
1848
1851
  closeLabel: r?.closeLabel ?? "Close",
@@ -1858,7 +1861,7 @@ var It = {
1858
1861
  })] });
1859
1862
  if (u) {
1860
1863
  let e = C ? `${S} · ${C}` : S;
1861
- return /* @__PURE__ */ W(h, {
1864
+ return /* @__PURE__ */ H(h, {
1862
1865
  placement: "top-end",
1863
1866
  matchReferenceWidth: !1,
1864
1867
  open: d,
@@ -1866,25 +1869,25 @@ var It = {
1866
1869
  trigger: [],
1867
1870
  outsideClosable: !0,
1868
1871
  renderOverlay: () => u(() => g?.(!1)),
1869
- listClassName: c("!w-[368px] !bg-layer-raised", K.modelMenu),
1870
- children: /* @__PURE__ */ W(N, {
1872
+ listClassName: c("!w-[368px] !bg-layer-raised", G.modelMenu),
1873
+ children: /* @__PURE__ */ H(M, {
1871
1874
  tooltip: e,
1872
- children: /* @__PURE__ */ G("button", {
1875
+ children: /* @__PURE__ */ U("button", {
1873
1876
  type: "button",
1874
1877
  "aria-label": x,
1875
1878
  "aria-disabled": s || void 0,
1876
- className: c("flex min-w-0 items-center gap-1.5 rounded-full py-1.5 pe-2 ps-1.5", J.modelSelectorButton, D, s && J.modelSelectorButtonDisabled, K.modelSelectorButton),
1879
+ className: c("flex min-w-0 items-center gap-1.5 rounded-full py-1.5 pe-2 ps-1.5", J.modelSelectorButton, D, s && J.modelSelectorButtonDisabled, G.modelSelectorButton),
1877
1880
  onClick: () => {
1878
1881
  !i && !s && f?.();
1879
1882
  },
1880
1883
  children: [
1881
1884
  b,
1882
- /* @__PURE__ */ G("span", {
1885
+ /* @__PURE__ */ U("span", {
1883
1886
  className: "flex min-w-0 max-w-[180px] items-baseline gap-1",
1884
- children: [/* @__PURE__ */ W("span", {
1887
+ children: [/* @__PURE__ */ H("span", {
1885
1888
  className: c("dial-small-text max-w-[180px] shrink-0 truncate", J.modelSelectorName),
1886
1889
  children: S
1887
- }), C && /* @__PURE__ */ W("span", {
1890
+ }), C && /* @__PURE__ */ H("span", {
1888
1891
  className: c("dial-tiny-text min-w-0 truncate", J.modelSelectorVersion),
1889
1892
  children: C
1890
1893
  })]
@@ -1895,32 +1898,32 @@ var It = {
1895
1898
  })
1896
1899
  });
1897
1900
  }
1898
- return /* @__PURE__ */ W("div", {
1901
+ return /* @__PURE__ */ H("div", {
1899
1902
  className: c(s && D),
1900
1903
  "aria-disabled": s || void 0,
1901
- children: /* @__PURE__ */ W(h, {
1904
+ children: /* @__PURE__ */ H(h, {
1902
1905
  items: w,
1903
1906
  menuHeader: T,
1904
1907
  placement: "bottom-end",
1905
1908
  matchReferenceWidth: !1,
1906
1909
  maxDropdownHeight: o,
1907
- listClassName: c("!w-[240px]", K.modelMenu),
1910
+ listClassName: c("!w-[240px]", G.modelMenu),
1908
1911
  disabled: s,
1909
1912
  onOpenChange: s ? void 0 : E,
1910
- children: /* @__PURE__ */ W(N, {
1913
+ children: /* @__PURE__ */ H(M, {
1911
1914
  tooltip: S,
1912
- children: /* @__PURE__ */ G("button", {
1915
+ children: /* @__PURE__ */ U("button", {
1913
1916
  type: "button",
1914
1917
  "aria-label": x,
1915
1918
  "aria-disabled": s || void 0,
1916
- className: c("flex items-center gap-1 rounded-full p-1.5", J.modelSelectorButton, s && J.modelSelectorButtonDisabled, K.modelSelectorButton),
1919
+ className: c("flex items-center gap-1 rounded-full p-1.5", J.modelSelectorButton, s && J.modelSelectorButtonDisabled, G.modelSelectorButton),
1917
1920
  children: [b, O]
1918
1921
  })
1919
1922
  })
1920
1923
  })
1921
1924
  });
1922
- }, Ht = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: y, attachLabel: b = "Attach file", fileAccept: x, addMenuTitle: S = "Add", menuTitle: C = "Menu", menuCloseLabel: w = "Close", removeLabel: T, retryLabel: E, uploadingLabel: D, sendLabel: O, sendTooltip: k, stopLabel: ee, micLabel: A = "Dictate", recordVoiceLabel: te = "Record voice", stopRecordingLabel: j, discardRecordingLabel: ne, colors: M, typography: N, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: P, pendingAttachments: F = [], onPendingAttachmentsConsumed: ae, pasteTextThreshold: ce = 4e3, maxMessageLength: I = 5e4, deployments: le, selectedDeploymentId: ue, onDeploymentChange: de, modelSelectorLabels: fe, initialAttachments: pe = [], hideAddButton: me = !1, hideAttachFile: he = !1, hideActionBar: ge = !1, renderFooterActions: _e, isInputDisabled: H = !1, isModelSelectorDisabled: ye = !1, isSendDisabled: be = !1, isAudioMessageSupported: Se = !1, isVoiceRecordingSupported: Ce = Se, onTranscribeAudio: we, transcribingLabel: Te, voiceErrorLabel: Ee, sendOnEnter: Oe = We.Enter, prefixAttachments: Ae = [], onRemovePrefixAttachment: je, chatSettings: Pe, toolsMenuItems: Fe, onToolToggle: ze, canRemoveTools: Be = !0, toolsMenuTitle: Ve, toolsBackLabel: He, toolsChipLabels: Ge, menuOverlays: Ke, inlineStartSlot: qe, onInlineStartRemove: Je, commandMenu: q, autoFocus: Ye = !1, messageHistory: Xe, onDialFileSystemClick: Ze, dialFileSystemLabel: Qe, validateAttachment: $e, onAttachmentClick: et, modelPickerOverlay: nt, maximumAttachmentsAmount: rt, onAttachmentsLimitExceeded: at, isAttachmentsEnabled: ot = !0, isTextAttachmentsAllowed: st = !0, usageLimitsSlot: ct, onMessageTooLong: ft }) => {
1923
- let pt = l(), [mt, ht] = V(!1), Y = Me(Xe), X = qe != null, [gt, _t] = V(null), [vt, yt] = V(0), bt = z(() => s({
1925
+ }, Wt = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: y, attachLabel: b = "Attach file", fileAccept: x, addMenuTitle: S = "Add", menuTitle: C = "Menu", menuCloseLabel: w = "Close", removeLabel: T, retryLabel: E, uploadingLabel: D, sendLabel: O, sendTooltip: k, emptyMessageTooltip: ee, stopLabel: A, micLabel: te = "Dictate", recordVoiceLabel: j = "Record voice", stopRecordingLabel: ne, discardRecordingLabel: re, colors: M, typography: ie, className: ae, pendingDropFiles: N = [], onDropFilesConsumed: P, pendingAttachments: oe = [], onPendingAttachmentsConsumed: le, pasteTextThreshold: ue = 4e3, maxMessageLength: F = 5e4, deployments: de, selectedDeploymentId: fe, onDeploymentChange: pe, modelSelectorLabels: me, initialAttachments: he = [], hideAddButton: ge = !1, hideAttachFile: _e = !1, hideActionBar: ve = !1, actionRowLayout: ye = Ge.Stacked, renderFooterActions: xe, isInputDisabled: W = !1, isModelSelectorDisabled: Ce = !1, isSendDisabled: we = !1, isAudioMessageSupported: Te = !1, isVoiceRecordingSupported: K = Te, onTranscribeAudio: Ee, transcribingLabel: Oe, voiceErrorLabel: Ae, sendOnEnter: je = We.Enter, prefixAttachments: Pe = [], onRemovePrefixAttachment: Fe, chatSettings: ze, toolsMenuItems: Be, onToolToggle: Ve, canRemoveTools: He = !0, toolsMenuTitle: Ke, toolsBackLabel: qe, toolsChipLabels: Je, menuOverlays: Ye, inlineStartSlot: Xe, onInlineStartRemove: Ze, commandMenu: q, autoFocus: Qe = !1, messageHistory: $e, onDialFileSystemClick: et, dialFileSystemLabel: tt, validateAttachment: rt, onAttachmentClick: it, modelPickerOverlay: ot, maximumAttachmentsAmount: st, onAttachmentsLimitExceeded: ct, isAttachmentsEnabled: lt = !0, isTextAttachmentsAllowed: pt = !0, usageLimitsSlot: mt, onMessageTooLong: ht }) => {
1926
+ let gt = l(), [_t, vt] = B(!1), yt = Me($e), Y = Xe != null, [bt, xt] = B(null), [St, Ct] = B(0), wt = R(() => s({
1924
1927
  "--ci-bg": M?.background,
1925
1928
  "--ci-text": M?.text,
1926
1929
  "--ci-border": M?.border,
@@ -1935,384 +1938,389 @@ var It = {
1935
1938
  "--ci-voice-error": M?.voiceError,
1936
1939
  "--ci-voice-waveform": M?.voiceWaveform,
1937
1940
  "--ci-voice-accent": M?.voiceAccent,
1938
- "--ci-first-line-indent": X ? `calc(${vt}px + 4px)` : void 0
1941
+ "--ci-first-line-indent": Y ? `calc(${St}px + 4px)` : void 0
1939
1942
  }), [
1940
1943
  M,
1941
- X,
1942
- vt
1943
- ]), xt = z(() => Ze ? [{
1944
+ Y,
1945
+ St
1946
+ ]), Tt = R(() => et ? [{
1944
1947
  key: "dial-fs",
1945
- label: Qe ?? "DIAL file system",
1946
- icon: /* @__PURE__ */ W(oe, {
1948
+ label: tt ?? "DIAL file system",
1949
+ icon: /* @__PURE__ */ H(se, {
1947
1950
  size: u,
1948
1951
  "aria-hidden": !0,
1949
1952
  stroke: m
1950
1953
  }),
1951
- onClick: Ze
1952
- }] : [], [Ze, Qe]), { message: Z, setMessage: Q, textareaRef: $ } = Ne({
1954
+ onClick: et
1955
+ }] : [], [et, tt]), { message: X, setMessage: Z, textareaRef: Q } = Ne({
1953
1956
  messageProp: e,
1954
1957
  messageRevision: t
1955
- }), { handleUndoKeyDown: St } = Ie({
1958
+ }), { handleUndoKeyDown: Et } = Ie({
1956
1959
  insertion: n,
1957
- textareaRef: $
1958
- }), { isMenuOpen: Ct, query: wt, dismiss: Tt, handleValueChange: Et } = ke({
1960
+ textareaRef: Q
1961
+ }), { isMenuOpen: Dt, query: Ot, dismiss: kt, handleValueChange: At } = ke({
1959
1962
  config: q,
1960
- message: Z
1961
- }), Dt = q?.emptyQueryHint != null, Ot = Dt && Ct && wt === "", kt = L((e) => {
1962
- if (q == null || (Tt(), !e?.consumeQuery)) return;
1963
- $.current?.focus();
1964
- let t = `${q.triggerPrefix}${wt}`;
1965
- if (!Z.startsWith(t)) return;
1966
- let n = Z.slice(t.length);
1967
- Q(n), Y.notifyChange(), d?.(n);
1963
+ message: X
1964
+ }), jt = q?.emptyQueryHint != null, Mt = jt && Dt && Ot === "", Nt = I((e) => {
1965
+ if (q == null || (kt(), !e?.consumeQuery)) return;
1966
+ Q.current?.focus();
1967
+ let t = `${q.triggerPrefix}${Ot}`;
1968
+ if (!X.startsWith(t)) return;
1969
+ let n = X.slice(t.length);
1970
+ Z(n), yt.notifyChange(), d?.(n);
1968
1971
  }, [
1969
1972
  q,
1970
- Tt,
1971
- wt,
1973
+ kt,
1974
+ Ot,
1975
+ X,
1972
1976
  Z,
1973
- Q,
1974
- Y,
1977
+ yt,
1975
1978
  d,
1976
- $
1979
+ Q
1977
1980
  ]);
1978
- R(() => {
1979
- if (gt == null) return;
1981
+ L(() => {
1982
+ if (bt == null) return;
1980
1983
  let e = new ResizeObserver((e) => {
1981
1984
  let t = e[0];
1982
- t != null && yt(t.contentRect.width);
1985
+ t != null && Ct(t.contentRect.width);
1983
1986
  });
1984
- return e.observe(gt), () => e.disconnect();
1985
- }, [gt]);
1986
- let { attachments: At, buildAttachments: jt, addAttachments: Mt, resetAttachments: Nt, handleRemove: Pt, handleRetry: Ft, handleExpand: It, hasBlockedAttachments: Lt } = De({
1987
- initialAttachments: pe,
1987
+ return e.observe(bt), () => e.disconnect();
1988
+ }, [bt]);
1989
+ let { attachments: Pt, buildAttachments: Ft, addAttachments: It, resetAttachments: Lt, handleRemove: Rt, handleRetry: zt, handleExpand: Bt, hasBlockedAttachments: Vt } = De({
1990
+ initialAttachments: he,
1988
1991
  onUploadAttachment: i,
1989
1992
  onAttachmentsChange: f,
1990
- validateAttachment: $e,
1991
- pendingDropFiles: ie,
1993
+ validateAttachment: rt,
1994
+ pendingDropFiles: N,
1992
1995
  onDropFilesConsumed: P,
1993
- pendingAttachments: F,
1994
- onPendingAttachmentsConsumed: ae,
1995
- onExpandPastedText: L((e) => {
1996
- Q((t) => t ? `${t}\n${e}` : e);
1997
- }, [Q]),
1998
- maximumAttachmentsAmount: rt,
1999
- baseAttachmentsAmount: Ae.length,
2000
- onAttachmentsLimitExceeded: at
2001
- }), Rt = L((e) => {
2002
- Mt(jt([e]));
2003
- }, [Mt, jt]), zt = B(!1), Bt = B(Z);
2004
- Bt.current = Z;
2005
- let [Ht, Ut] = V({
1996
+ pendingAttachments: oe,
1997
+ onPendingAttachmentsConsumed: le,
1998
+ onExpandPastedText: I((e) => {
1999
+ Z((t) => t ? `${t}\n${e}` : e);
2000
+ }, [Z]),
2001
+ maximumAttachmentsAmount: st,
2002
+ baseAttachmentsAmount: Pe.length,
2003
+ onAttachmentsLimitExceeded: ct
2004
+ }), Ht = I((e) => {
2005
+ It(Ft([e]));
2006
+ }, [It, Ft]), Wt = z(!1), Gt = z(X);
2007
+ Gt.current = X;
2008
+ let [Kt, qt] = B({
2006
2009
  text: "",
2007
2010
  revision: 0
2008
- }), { state: Wt, analyserNodeRef: Gt, errorMessage: Kt, startRecording: qt, stopRecording: Jt, discardRecording: Yt } = Ue({
2009
- onAttachAudio: Rt,
2010
- onTranscribeAudio: we,
2011
- onTranscript: L((e) => {
2011
+ }), { state: Jt, analyserNodeRef: Yt, errorMessage: Xt, startRecording: Zt, stopRecording: Qt, discardRecording: $t } = Ue({
2012
+ onAttachAudio: Ht,
2013
+ onTranscribeAudio: Ee,
2014
+ onTranscript: I((e) => {
2012
2015
  let t = e.trim();
2013
2016
  if (t) {
2014
- let e = Bt.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2015
- Bt.current = n, Q(n), Ut((e) => ({
2017
+ let e = Gt.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2018
+ Gt.current = n, Z(n), qt((e) => ({
2016
2019
  text: t,
2017
2020
  revision: e.revision + 1
2018
- })), Y.notifyChange(), d?.(n);
2021
+ })), yt.notifyChange(), d?.(n);
2019
2022
  }
2020
- zt.current = !0;
2023
+ Wt.current = !0;
2021
2024
  }, [
2022
- Q,
2023
- Y,
2025
+ Z,
2026
+ yt,
2024
2027
  d
2025
2028
  ]),
2026
- errorLabel: Ee
2027
- }), Xt = Wt === Le.Recording || Wt === Le.Processing;
2028
- R(() => {
2029
- (Wt === Le.Error || Wt === Le.Idle && zt.current) && (zt.current = !1, $.current?.focus());
2030
- }, [Wt, $]);
2031
- let Zt = B(null), Qt = B(null), $t = ot && st, { handlePaste: en } = xe(Mt, $t ? ce : Infinity), tn = L((e) => {
2032
- if (!$t) {
2029
+ errorLabel: Ae
2030
+ }), $ = Jt === Le.Recording || Jt === Le.Processing;
2031
+ L(() => {
2032
+ (Jt === Le.Error || Jt === Le.Idle && Wt.current) && (Wt.current = !1, Q.current?.focus());
2033
+ }, [Jt, Q]);
2034
+ let en = z(null), tn = z(null), nn = lt && pt, { handlePaste: rn } = Se(It, nn ? ue : Infinity), an = I((e) => {
2035
+ if (!nn) {
2033
2036
  let t = e.clipboardData.getData("text/plain");
2034
- t.length >= I && ft?.(t.length, I);
2037
+ t.length >= F && ht?.(t.length, F);
2035
2038
  }
2036
- en(e);
2039
+ rn(e);
2037
2040
  }, [
2038
- $t,
2039
- I,
2040
- ft,
2041
- en
2042
- ]), nn = (Z.trim().length > 0 || At.length > 0 || X) && !Lt && !be && !Xt, [rn, an] = V([]);
2043
- R(() => {
2044
- an([]);
2045
- }, [(Fe ?? []).map((e) => e.id).join("|")]);
2046
- let on = z(() => {
2047
- let e = Fe ?? [];
2048
- return Be ? e.filter((e) => e.isSelected || !rn.includes(e.id)) : e;
2041
+ nn,
2042
+ F,
2043
+ ht,
2044
+ rn
2045
+ ]), on = X.trim().length > 0 || Pt.length > 0 || Y, sn = on && !Vt && !we && !$, [cn, ln] = B([]);
2046
+ L(() => {
2047
+ ln([]);
2048
+ }, [(Be ?? []).map((e) => e.id).join("|")]);
2049
+ let un = R(() => {
2050
+ let e = Be ?? [];
2051
+ return He ? e.filter((e) => e.isSelected || !cn.includes(e.id)) : e;
2049
2052
  }, [
2050
- Fe,
2051
- rn,
2052
- Be
2053
- ]), sn = L((e) => {
2054
- an((t) => t.includes(e) ? t : [...t, e]), Fe?.find((t) => t.id === e)?.isSelected && ze?.(e);
2055
- }, [Fe, ze]), cn = le === void 0 || ue != null, ln = Se && !o, un = async () => {
2056
- if (be || Xt) return;
2057
- if (Z.length >= I) {
2058
- ft?.(Z.length, I);
2053
+ Be,
2054
+ cn,
2055
+ He
2056
+ ]), dn = I((e) => {
2057
+ ln((t) => t.includes(e) ? t : [...t, e]), Be?.find((t) => t.id === e)?.isSelected && Ve?.(e);
2058
+ }, [Be, Ve]), fn = de === void 0 || fe != null, pn = Te && !o, mn = async () => {
2059
+ if (we || $) return;
2060
+ if (X.length >= F) {
2061
+ ht?.(X.length, F);
2059
2062
  return;
2060
2063
  }
2061
- let e = Z, t = At;
2062
- Q(""), Y.reset();
2064
+ let e = X, t = Pt;
2065
+ Z(""), yt.reset();
2063
2066
  try {
2064
2067
  await r?.(e, t), t.forEach((e) => {
2065
2068
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
2066
- }), Nt([]);
2069
+ }), Lt([]);
2067
2070
  } catch {
2068
- Q(e), Nt(t);
2071
+ Z(e), Lt(t);
2069
2072
  }
2070
- }, dn = (e) => {
2071
- if (!Xt && !St(e)) {
2072
- if (!e.nativeEvent.isComposing && !H && !o) {
2073
+ }, hn = (e) => {
2074
+ if (!$ && !Et(e)) {
2075
+ if (!e.nativeEvent.isComposing && !W && !o) {
2073
2076
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2074
- let t = e.currentTarget.selectionStart ?? 0, n = Y.navigate(e.key === "ArrowUp" ? "up" : "down", Z, t);
2077
+ let t = e.currentTarget.selectionStart ?? 0, n = yt.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
2075
2078
  if (n !== null) {
2076
- e.preventDefault(), Q(n);
2079
+ e.preventDefault(), Z(n);
2077
2080
  return;
2078
2081
  }
2079
2082
  }
2080
- if (e.key === "Backspace" && X && Je != null && e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0) {
2081
- e.preventDefault(), Je();
2083
+ if (e.key === "Backspace" && Y && Ze != null && e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0) {
2084
+ e.preventDefault(), Ze();
2082
2085
  return;
2083
2086
  }
2084
2087
  }
2085
- e.key === "Enter" && (Oe === We.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && nn && cn && !H && un());
2088
+ e.key === "Enter" && (je === We.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && sn && fn && !W && mn());
2086
2089
  }
2087
- }, fn = (e) => {
2090
+ }, gn = (e) => {
2088
2091
  let t = Array.from(e.target.files ?? []);
2089
2092
  if (t.length === 0) return;
2090
- let n = jt(t);
2091
- e.target.value = "", Mt(n);
2092
- }, pn = /* @__PURE__ */ W("textarea", {
2093
- className: c(J.textarea, X && J.textareaIndented, N?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2094
- ref: $,
2095
- autoFocus: Ye,
2096
- value: Z,
2093
+ let n = Ft(t);
2094
+ e.target.value = "", It(n);
2095
+ }, _n = /* @__PURE__ */ H("textarea", {
2096
+ className: c(J.textarea, Y && J.textareaIndented, ie?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2097
+ ref: Q,
2098
+ autoFocus: Qe,
2099
+ value: X,
2097
2100
  onChange: (e) => {
2098
- Q(e.target.value), Y.notifyChange();
2101
+ Z(e.target.value), yt.notifyChange();
2099
2102
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2100
- Et(e.target.value, t?.isComposing ?? !1, t?.inputType), d?.(e.target.value);
2103
+ At(e.target.value, t?.isComposing ?? !1, t?.inputType), d?.(e.target.value);
2101
2104
  },
2102
- onKeyDown: dn,
2103
- onPaste: tn,
2104
- placeholder: X ? void 0 : g,
2105
+ onKeyDown: hn,
2106
+ onPaste: an,
2107
+ placeholder: Y ? void 0 : g,
2105
2108
  "aria-label": y,
2106
- disabled: H,
2107
- readOnly: Xt,
2109
+ disabled: W,
2110
+ readOnly: $,
2108
2111
  rows: 1
2109
- }), mn = q == null ? pn : /* @__PURE__ */ W(h, {
2112
+ }), vn = q == null ? _n : /* @__PURE__ */ H(h, {
2110
2113
  className: "w-full",
2111
- open: Ct,
2114
+ open: Dt,
2112
2115
  onOpenChange: (e) => {
2113
- e || Tt();
2116
+ e || kt();
2114
2117
  },
2115
2118
  placement: "top-start",
2116
2119
  trigger: [],
2117
2120
  initialFocus: -1,
2118
2121
  matchReferenceWidth: !1,
2119
- outsidePressIgnoreRef: $,
2122
+ outsidePressIgnoreRef: Q,
2120
2123
  renderOverlay: () => {
2121
2124
  let e = q.renderMenu({
2122
- query: wt,
2123
- close: kt
2125
+ query: Ot,
2126
+ close: Nt
2124
2127
  });
2125
- return q.menuLabel == null ? e : /* @__PURE__ */ W("div", {
2128
+ return q.menuLabel == null ? e : /* @__PURE__ */ H("div", {
2126
2129
  role: "group",
2127
2130
  "aria-label": q.menuLabel,
2128
2131
  children: e
2129
2132
  });
2130
2133
  },
2131
- children: pn
2132
- }), hn = X || Dt ? /* @__PURE__ */ G("div", {
2134
+ children: _n
2135
+ }), yn = Y || jt ? /* @__PURE__ */ U("div", {
2133
2136
  className: "relative w-full",
2134
2137
  children: [
2135
- X && /* @__PURE__ */ W("div", {
2136
- ref: _t,
2138
+ Y && /* @__PURE__ */ H("div", {
2139
+ ref: xt,
2137
2140
  className: "absolute start-0 top-0",
2138
- children: qe
2141
+ children: Xe
2139
2142
  }),
2140
- Ot && q != null && /* @__PURE__ */ G("span", {
2141
- className: c(J.commandHint, "pointer-events-none absolute start-[var(--ci-first-line-indent,0px)] top-0", N?.fontClassName || "dial-body-paragraph-text"),
2143
+ Mt && q != null && /* @__PURE__ */ U("span", {
2144
+ className: c(J.commandHint, "pointer-events-none absolute start-[var(--ci-first-line-indent,0px)] top-0", ie?.fontClassName || "dial-body-paragraph-text"),
2142
2145
  "aria-hidden": !0,
2143
- children: [/* @__PURE__ */ W("span", {
2146
+ children: [/* @__PURE__ */ H("span", {
2144
2147
  className: "invisible",
2145
2148
  children: q.triggerPrefix
2146
2149
  }), q.emptyQueryHint]
2147
2150
  }),
2148
- mn
2151
+ vn
2149
2152
  ]
2150
- }) : mn, gn = me ? void 0 : /* @__PURE__ */ W(tt, {
2151
- onAttachClick: he ? void 0 : () => Zt.current?.click(),
2153
+ }) : vn, bn = ge ? void 0 : /* @__PURE__ */ H(nt, {
2154
+ onAttachClick: _e ? void 0 : () => en.current?.click(),
2152
2155
  attachLabel: b,
2153
2156
  addMenuTitle: S,
2154
2157
  menuTitle: C,
2155
2158
  menuCloseLabel: w,
2156
- style: bt,
2157
- isDisabled: H || Xt,
2158
- chatSettings: Pe,
2159
- extraMenuItems: xt,
2160
- onRecordVoice: Ce && ot && !o && !Xt ? () => qt(Re.Attachment) : void 0,
2161
- recordVoiceLabel: te,
2162
- toolsMenuItems: Be ? Fe : void 0,
2163
- onToolToggle: ze,
2164
- toolsMenuTitle: Ve,
2165
- toolsBackLabel: He,
2166
- menuOverlays: Ke
2159
+ style: wt,
2160
+ isDisabled: W || $,
2161
+ chatSettings: ze,
2162
+ extraMenuItems: Tt,
2163
+ onRecordVoice: K && lt && !o && !$ ? () => Zt(Re.Attachment) : void 0,
2164
+ recordVoiceLabel: j,
2165
+ toolsMenuItems: He ? Be : void 0,
2166
+ onToolToggle: Ve,
2167
+ toolsMenuTitle: Ke,
2168
+ toolsBackLabel: qe,
2169
+ menuOverlays: Ye
2170
+ }), xn = ye === Ge.Inline && !gt, Sn = bn && /* @__PURE__ */ H("div", {
2171
+ className: c("flex", G.addCluster),
2172
+ children: bn
2173
+ }), Cn = un.length > 0 && Ve != null && /* @__PURE__ */ H("div", {
2174
+ className: c("min-w-0 flex-1", G.toolsChips),
2175
+ children: /* @__PURE__ */ H(at, {
2176
+ items: un,
2177
+ onToolToggle: Ve,
2178
+ onToolDismiss: dn,
2179
+ canRemove: He,
2180
+ removeLabel: Je?.removeLabel
2181
+ })
2167
2182
  });
2168
- return /* @__PURE__ */ G("div", {
2169
- ref: Qt,
2170
- style: bt,
2171
- className: c(J.wrapper, H && J.wrapperDisabled, H && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", At.length > 6 ? "py-4 ps-4" : "p-4", re, K.wrapper),
2183
+ return /* @__PURE__ */ U("div", {
2184
+ ref: tn,
2185
+ style: wt,
2186
+ className: c(J.wrapper, W && J.wrapperDisabled, W && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Pt.length > 6 ? "py-4 ps-4" : "p-4", ae, G.wrapper),
2172
2187
  children: [
2173
- (Ae.length > 0 || At.length > 0) && /* @__PURE__ */ W(ve, {
2174
- attachments: [...Ae, ...At],
2188
+ (Pe.length > 0 || Pt.length > 0) && /* @__PURE__ */ H(be, {
2189
+ attachments: [...Pe, ...Pt],
2175
2190
  onRemove: (e) => {
2176
- Ae.some((t) => t.id === e) ? je?.(e) : Pt(e);
2191
+ Pe.some((t) => t.id === e) ? Fe?.(e) : Rt(e);
2177
2192
  },
2178
- onRetry: Ft,
2179
- onExpand: It,
2193
+ onRetry: zt,
2194
+ onExpand: Bt,
2180
2195
  labels: {
2181
2196
  removeLabel: T,
2182
2197
  retryLabel: E,
2183
2198
  uploadingLabel: D
2184
2199
  },
2185
- onAttachmentClick: et == null ? void 0 : (e) => {
2186
- let t = [...Ae, ...At].find((t) => t.id === e);
2187
- t != null && et(t);
2200
+ onAttachmentClick: it == null ? void 0 : (e) => {
2201
+ let t = [...Pe, ...Pt].find((t) => t.id === e);
2202
+ t != null && it(t);
2188
2203
  }
2189
2204
  }),
2190
- !me && /* @__PURE__ */ W("input", {
2191
- ref: Zt,
2205
+ !ge && /* @__PURE__ */ H("input", {
2206
+ ref: en,
2192
2207
  type: "file",
2193
2208
  multiple: !0,
2194
2209
  accept: x,
2195
2210
  className: "sr-only",
2196
2211
  "aria-hidden": !0,
2197
2212
  tabIndex: -1,
2198
- onChange: fn
2213
+ onChange: gn
2199
2214
  }),
2200
- Kt && /* @__PURE__ */ W(_, {
2201
- text: Kt,
2215
+ Xt && /* @__PURE__ */ H(_, {
2216
+ text: Xt,
2202
2217
  className: "min-w-0 break-words px-1"
2203
2218
  }),
2204
- Xt && /* @__PURE__ */ W(lt, {
2219
+ $ && /* @__PURE__ */ H(ut, {
2205
2220
  embedded: !0,
2206
- state: Wt,
2207
- analyserNodeRef: Gt,
2208
- errorMessage: Kt,
2209
- onStop: Jt,
2210
- onDiscard: Yt,
2211
- attachButton: gn,
2212
- stopLabel: j,
2213
- discardLabel: ne,
2214
- processingLabel: Te
2221
+ state: Jt,
2222
+ analyserNodeRef: Yt,
2223
+ errorMessage: Xt,
2224
+ onStop: Qt,
2225
+ onDiscard: $t,
2226
+ attachButton: bn,
2227
+ stopLabel: ne,
2228
+ discardLabel: re,
2229
+ processingLabel: Oe
2230
+ }),
2231
+ !$ && ve && yn,
2232
+ !$ && !ve && xn && Cn && /* @__PURE__ */ H("div", {
2233
+ className: "flex",
2234
+ children: Cn
2215
2235
  }),
2216
- !Xt && ge && hn,
2217
- !Xt && !ge && /* @__PURE__ */ G("div", {
2218
- className: c("flex flex-wrap items-center gap-2", K.actionRow),
2236
+ !$ && !ve && /* @__PURE__ */ U("div", {
2237
+ className: c("flex items-center gap-2", xn ? "flex-nowrap" : "flex-wrap", G.actionRow),
2219
2238
  children: [
2220
- /* @__PURE__ */ W("div", {
2221
- className: c("flex w-full min-w-0 items-center self-stretch", K.textareaWrap),
2222
- children: hn
2223
- }),
2224
- gn && /* @__PURE__ */ W("div", {
2225
- className: c("flex", K.addCluster),
2226
- children: gn
2227
- }),
2228
- on.length > 0 && ze != null && /* @__PURE__ */ W("div", {
2229
- className: "min-w-0 flex-1",
2230
- children: /* @__PURE__ */ W(it, {
2231
- items: on,
2232
- onToolToggle: ze,
2233
- onToolDismiss: sn,
2234
- canRemove: Be,
2235
- removeLabel: Ge?.removeLabel
2236
- })
2239
+ xn && Sn,
2240
+ /* @__PURE__ */ H("div", {
2241
+ className: c("flex min-w-0 items-center self-stretch", xn ? "flex-1" : "w-full", G.textareaWrap),
2242
+ children: yn
2237
2243
  }),
2238
- /* @__PURE__ */ W("div", {
2239
- className: c("ms-auto flex flex-shrink-0 items-center gap-2", K.footerActions),
2240
- children: _e ? _e({
2241
- canSend: nn,
2242
- onSend: un
2243
- }) : /* @__PURE__ */ G(U, { children: [
2244
- ct,
2245
- /* @__PURE__ */ W(Vt, {
2246
- deployments: le,
2247
- selectedDeploymentId: ue,
2248
- onDeploymentChange: de,
2249
- modelSelectorLabels: fe,
2244
+ !xn && Sn,
2245
+ !xn && Cn,
2246
+ /* @__PURE__ */ H("div", {
2247
+ className: c("ms-auto flex flex-shrink-0 items-center gap-2", G.footerActions),
2248
+ children: xe ? xe({
2249
+ canSend: sn,
2250
+ onSend: mn
2251
+ }) : /* @__PURE__ */ U(V, { children: [
2252
+ mt,
2253
+ /* @__PURE__ */ H(Ut, {
2254
+ deployments: de,
2255
+ selectedDeploymentId: fe,
2256
+ onDeploymentChange: pe,
2257
+ modelSelectorLabels: me,
2250
2258
  isStreaming: o,
2251
- isMobile: pt,
2252
- isDisabled: ye,
2253
- style: bt,
2254
- modelPickerOverlay: nt,
2255
- isPickerOpen: mt,
2256
- onPickerToggle: () => ht((e) => !e),
2257
- onPickerOpenChange: ht
2259
+ isMobile: gt,
2260
+ isDisabled: Ce,
2261
+ style: wt,
2262
+ modelPickerOverlay: ot,
2263
+ isPickerOpen: _t,
2264
+ onPickerToggle: () => vt((e) => !e),
2265
+ onPickerOpenChange: vt
2258
2266
  }),
2259
- ln && /* @__PURE__ */ W(v, {
2260
- icon: /* @__PURE__ */ W(se, {
2267
+ pn && /* @__PURE__ */ H(v, {
2268
+ icon: /* @__PURE__ */ H(ce, {
2261
2269
  size: p.LG,
2262
2270
  stroke: m,
2263
2271
  "aria-hidden": !0
2264
2272
  }),
2265
- "aria-label": A,
2266
- tooltipProps: { tooltip: A },
2273
+ "aria-label": te,
2274
+ tooltipProps: { tooltip: te },
2267
2275
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2268
- onClick: () => qt(Re.Dictation),
2269
- disabled: H || o
2276
+ onClick: () => Zt(Re.Dictation),
2277
+ disabled: W || o
2270
2278
  }),
2271
- o && a ? /* @__PURE__ */ W(dt, {
2279
+ o && a ? /* @__PURE__ */ H(ft, {
2272
2280
  onStop: a,
2273
- ariaLabel: ee
2274
- }) : !o && /* @__PURE__ */ W(ut, {
2275
- onSend: un,
2276
- isDisabled: !cn || !nn,
2281
+ ariaLabel: A
2282
+ }) : !o && /* @__PURE__ */ H(dt, {
2283
+ onSend: mn,
2284
+ isDisabled: !fn || !sn,
2277
2285
  ariaLabel: O,
2278
- sendTooltip: k
2286
+ sendTooltip: on ? k : ee ?? k
2279
2287
  })
2280
2288
  ] })
2281
2289
  })
2282
2290
  ]
2283
2291
  }),
2284
- /* @__PURE__ */ W("span", {
2292
+ /* @__PURE__ */ H("span", {
2285
2293
  className: "sr-only",
2286
2294
  role: "status",
2287
2295
  "aria-live": "polite",
2288
2296
  "aria-atomic": "true",
2289
- children: /* @__PURE__ */ W("span", { children: Ht.text }, Ht.revision)
2297
+ children: /* @__PURE__ */ H("span", { children: Kt.text }, Kt.revision)
2290
2298
  })
2291
2299
  ]
2292
2300
  });
2293
- }, Ut = {
2301
+ }, Gt = {
2294
2302
  welcome: "_welcome_1icyo_1",
2295
2303
  description: "_description_1icyo_5"
2296
- }, Wt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, styles: i, className: a, inputClassName: o, isInputDisabled: l = !1, ...u }) => {
2304
+ }, Kt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, styles: i, className: a, inputClassName: o, isInputDisabled: l = !1, ...u }) => {
2297
2305
  let { colors: d, typography: f } = i ?? {};
2298
- return /* @__PURE__ */ G("div", {
2306
+ return /* @__PURE__ */ U("div", {
2299
2307
  style: s({
2300
2308
  "--ci-welcome-color": d?.welcomeText,
2301
2309
  "--ci-description-color": d?.descriptionText
2302
2310
  }),
2303
2311
  className: c("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", a),
2304
- children: [n && /* @__PURE__ */ G("div", {
2312
+ children: [n && /* @__PURE__ */ U("div", {
2305
2313
  className: "flex flex-col items-center gap-4 text-center",
2306
- children: [/* @__PURE__ */ W("h1", {
2307
- className: c(Ut.welcome, "m-0", f?.welcomeClassName || "dial-display2-text"),
2314
+ children: [/* @__PURE__ */ H("h1", {
2315
+ className: c(Gt.welcome, "m-0", f?.welcomeClassName || "dial-display2-text"),
2308
2316
  children: n
2309
- }), r && /* @__PURE__ */ W("p", {
2310
- className: c(Ut.description, "m-0 max-w-[540px]", f?.descriptionClassName || "dial-body-paragraph-text"),
2317
+ }), r && /* @__PURE__ */ H("p", {
2318
+ className: c(Gt.description, "m-0 max-w-[540px]", f?.descriptionClassName || "dial-body-paragraph-text"),
2311
2319
  children: r
2312
2320
  })]
2313
- }), /* @__PURE__ */ W("div", {
2321
+ }), /* @__PURE__ */ H("div", {
2314
2322
  className: c("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
2315
- children: /* @__PURE__ */ W(Ht, {
2323
+ children: /* @__PURE__ */ H(Wt, {
2316
2324
  placeholder: t,
2317
2325
  isStreaming: e,
2318
2326
  isInputDisabled: l,
@@ -2323,101 +2331,101 @@ var It = {
2323
2331
  })
2324
2332
  })]
2325
2333
  });
2326
- }, Gt = ({ message: e, inlineStartSlot: t, onInlineStartRemove: n, initialAttachments: r = [], onCancel: a, onSave: o, onUploadAttachment: s, cancelLabel: l = "Cancel", saveLabel: d = "Save & Submit", ariaLabel: f, removeLabel: p, retryLabel: h, uploadingLabel: g, addMenuTitle: _ = "Add", attachLabel: v = "Attach file", menuTitle: y = "Menu", menuCloseLabel: b = "Close", className: S, pendingDropFiles: C, onDropFilesConsumed: T, validateAttachment: E, isAttachmentsEnabled: D, isTextAttachmentsAllowed: O, hideAttachFile: k = !1, fileAccept: ee, maximumAttachmentsAmount: A, onAttachmentsLimitExceeded: te, onDialFileSystemClick: j, dialFileSystemLabel: ne, pendingAttachments: M, onPendingAttachmentsConsumed: N, onAttachmentClick: re, pasteTextThreshold: ie, maxMessageLength: P = 5e4, onMessageTooLong: F }) => {
2327
- let ae = B(null), [se, ce] = V([]);
2328
- R(() => {
2329
- C?.length && (ce(C), T?.());
2334
+ }, qt = ({ message: e, inlineStartSlot: t, onInlineStartRemove: n, initialAttachments: r = [], onCancel: a, onSave: o, onUploadAttachment: s, cancelLabel: l = "Cancel", saveLabel: d = "Save & Submit", ariaLabel: f, removeLabel: p, retryLabel: h, uploadingLabel: g, addMenuTitle: _ = "Add", attachLabel: v = "Attach file", menuTitle: y = "Menu", menuCloseLabel: b = "Close", className: S, pendingDropFiles: C, onDropFilesConsumed: T, validateAttachment: E, isAttachmentsEnabled: D, isTextAttachmentsAllowed: O, hideAttachFile: k = !1, fileAccept: ee, maximumAttachmentsAmount: A, onAttachmentsLimitExceeded: te, onDialFileSystemClick: j, dialFileSystemLabel: ne, pendingAttachments: re, onPendingAttachmentsConsumed: M, onAttachmentClick: ie, pasteTextThreshold: ae, maxMessageLength: N = 5e4, onMessageTooLong: P }) => {
2335
+ let oe = z(null), [ce, le] = B([]);
2336
+ L(() => {
2337
+ C?.length && (le(C), T?.());
2330
2338
  }, [C, T]);
2331
- let [I, le] = V(e ?? ""), [ue, de] = V([]), [fe, pe] = V(r), me = ue.some((e) => e.status === i.Loading || e.status === i.Error), he = (I.trim().length > 0 || ue.length > 0 || fe.length > 0) && !me, ge = (e) => {
2332
- pe((t) => t.filter((t) => t.id !== e));
2333
- }, _e = L((e, t) => {
2334
- o(e, fe, t);
2335
- }, [fe, o]), H = () => {
2336
- if (he) {
2337
- if (I.length >= P) {
2338
- F?.(I.length, P);
2339
+ let [ue, F] = B(e ?? ""), [de, fe] = B([]), [pe, me] = B(r), he = de.some((e) => e.status === i.Loading || e.status === i.Error), ge = (ue.trim().length > 0 || de.length > 0 || pe.length > 0) && !he, _e = (e) => {
2340
+ me((t) => t.filter((t) => t.id !== e));
2341
+ }, ve = I((e, t) => {
2342
+ o(e, pe, t);
2343
+ }, [pe, o]), ye = () => {
2344
+ if (ge) {
2345
+ if (ue.length >= N) {
2346
+ P?.(ue.length, N);
2339
2347
  return;
2340
2348
  }
2341
- _e(I, ue);
2349
+ ve(ue, de);
2342
2350
  }
2343
- }, ve = L(() => ce([]), []), ye = L((e) => {
2351
+ }, be = I(() => le([]), []), xe = I((e) => {
2344
2352
  let t = Array.from(e.target.files ?? []);
2345
- t.length !== 0 && (e.target.value = "", ce(t));
2346
- }, []), be = z(() => j ? [{
2353
+ t.length !== 0 && (e.target.value = "", le(t));
2354
+ }, []), W = R(() => j ? [{
2347
2355
  key: "dial-fs",
2348
2356
  label: ne ?? "DIAL file system",
2349
- icon: /* @__PURE__ */ W(oe, {
2357
+ icon: /* @__PURE__ */ H(se, {
2350
2358
  size: u,
2351
2359
  "aria-hidden": !0,
2352
2360
  stroke: m
2353
2361
  }),
2354
2362
  onClick: j
2355
2363
  }] : [], [j, ne]);
2356
- return /* @__PURE__ */ G("div", {
2364
+ return /* @__PURE__ */ U("div", {
2357
2365
  className: c("flex w-full flex-col gap-2", S),
2358
- children: [/* @__PURE__ */ W(Ht, {
2366
+ children: [/* @__PURE__ */ H(Wt, {
2359
2367
  message: e,
2360
2368
  inlineStartSlot: t,
2361
2369
  onInlineStartRemove: n,
2362
2370
  ariaLabel: f,
2363
2371
  hideActionBar: !0,
2364
- pendingDropFiles: se,
2365
- onDropFilesConsumed: ve,
2366
- onSend: _e,
2372
+ pendingDropFiles: ce,
2373
+ onDropFilesConsumed: be,
2374
+ onSend: ve,
2367
2375
  onUploadAttachment: s,
2368
- onChange: le,
2369
- onAttachmentsChange: de,
2376
+ onChange: F,
2377
+ onAttachmentsChange: fe,
2370
2378
  removeLabel: p,
2371
2379
  retryLabel: h,
2372
2380
  uploadingLabel: g,
2373
2381
  className: "max-w-full",
2374
- prefixAttachments: fe,
2375
- onRemovePrefixAttachment: ge,
2382
+ prefixAttachments: pe,
2383
+ onRemovePrefixAttachment: _e,
2376
2384
  validateAttachment: E,
2377
2385
  isAttachmentsEnabled: D,
2378
2386
  isTextAttachmentsAllowed: O,
2379
2387
  maximumAttachmentsAmount: A,
2380
2388
  onAttachmentsLimitExceeded: te,
2381
- pendingAttachments: M,
2382
- onPendingAttachmentsConsumed: N,
2383
- onAttachmentClick: re,
2384
- pasteTextThreshold: ie,
2385
- maxMessageLength: P,
2386
- onMessageTooLong: F
2387
- }), /* @__PURE__ */ G("div", {
2389
+ pendingAttachments: re,
2390
+ onPendingAttachmentsConsumed: M,
2391
+ onAttachmentClick: ie,
2392
+ pasteTextThreshold: ae,
2393
+ maxMessageLength: N,
2394
+ onMessageTooLong: P
2395
+ }), /* @__PURE__ */ U("div", {
2388
2396
  className: "flex items-center justify-between",
2389
- children: [/* @__PURE__ */ W("div", {
2397
+ children: [/* @__PURE__ */ H("div", {
2390
2398
  className: "flex",
2391
- children: !k && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("input", {
2392
- ref: ae,
2399
+ children: !k && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("input", {
2400
+ ref: oe,
2393
2401
  type: "file",
2394
2402
  multiple: !0,
2395
2403
  accept: ee,
2396
2404
  className: "sr-only",
2397
2405
  "aria-hidden": !0,
2398
2406
  tabIndex: -1,
2399
- onChange: ye
2400
- }), /* @__PURE__ */ W(tt, {
2401
- onAttachClick: () => ae.current?.click(),
2407
+ onChange: xe
2408
+ }), /* @__PURE__ */ H(nt, {
2409
+ onAttachClick: () => oe.current?.click(),
2402
2410
  attachLabel: v,
2403
2411
  addMenuTitle: _,
2404
2412
  menuTitle: y,
2405
2413
  menuCloseLabel: b,
2406
- extraMenuItems: be
2414
+ extraMenuItems: W
2407
2415
  })] })
2408
- }), /* @__PURE__ */ G("div", {
2416
+ }), /* @__PURE__ */ U("div", {
2409
2417
  className: "flex gap-2",
2410
- children: [/* @__PURE__ */ W(x, {
2418
+ children: [/* @__PURE__ */ H(x, {
2411
2419
  label: l,
2412
2420
  onClick: a
2413
- }), /* @__PURE__ */ W(w, {
2421
+ }), /* @__PURE__ */ H(w, {
2414
2422
  label: d,
2415
- onClick: H,
2416
- disabled: !he
2423
+ onClick: ye,
2424
+ disabled: !ge
2417
2425
  })]
2418
2426
  })]
2419
2427
  })]
2420
2428
  });
2421
2429
  };
2422
2430
  //#endregion
2423
- export { Te as BottomSheetShell, K as CONVERSATION_INPUT_CLASS, Ze as ChatSettingsModal, Wt as ConversationInput, Gt as EditMessageInput, Ht as Input, We as SendOnEnter };
2431
+ export { Ge as ActionRowLayout, K as BottomSheetShell, G as CONVERSATION_INPUT_CLASS, Qe as ChatSettingsModal, Kt as ConversationInput, qt as EditMessageInput, Wt as Input, We as SendOnEnter };