@epam/ai-dial-conversation-input 1.3.0-dev.191 → 1.3.0-dev.199

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,8 +1,8 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, MIME_TYPE_EXT_MAP as r, RESIZABLE_TEXTAREA_CLASS_NAME as i, RequestStatus as a, ResponseFormat as o, SELECT_LIST_MAX_HEIGHT_PX as s, buildCssVars as c, mergeClasses as l, normalizeMimeType as u, useIsMobile as d } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as f, BottomSheet as p, Button as m, ButtonVariant as h, CloseButton as g, DIAL_ICON_SIZE as _, DIAL_KIT_ICON_STROKE as v, Dropdown as y, ElementSize as b, ErrorText as x, GhostIconButton as S, Highlight as C, MenuItemMark as w, NeutralButton as T, NeutralIconButton as E, Popup as D, PopupSize as ee, PrimaryButton as O, PrimaryIconButton as k, RadioGroup as A, RadioGroupOrientation as j, Search as M, Skeleton as te, SkeletonVariant as ne, Slider as re, Spinner as ie, Textarea as ae, TextareaResize as N, Tooltip as P } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
4
- import { AttachmentTray as oe, MAX_UPLOADS_PER_MINUTE as se, generateAttachmentId as ce, useClipboardPaste as le } from "@epam/ai-dial-attachment-input";
5
- import { IconAlertCircleFilled as ue, IconAlertTriangleFilled as de, IconArrowNarrowRight as fe, IconCheck as pe, IconChevronDown as me, IconChevronRight as he, IconFile as ge, IconMicrophone as _e, IconPaperclip as ve, IconPlayerStop as ye, IconPlus as be, IconSettings as xe, IconTool as Se, IconX as Ce } from "@tabler/icons-react";
2
+ import { BASE_ICON_SIZE as f, BottomSheet as p, Button as m, ButtonVariant as h, CloseButton as g, DIAL_ICON_SIZE as _, DIAL_KIT_ICON_STROKE as v, Dropdown as y, ElementSize as b, ErrorText as x, GhostIconButton as S, Highlight as C, MenuItemMark as w, NeutralButton as T, NeutralIconButton as E, Popup as D, PopupSize as ee, PrimaryButton as O, PrimaryIconButton as k, RadioGroup as te, RadioGroupOrientation as A, Search as j, Skeleton as ne, SkeletonVariant as re, Slider as ie, Spinner as ae, Textarea as oe, TextareaResize as M, Tooltip as se } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
4
+ import { AttachmentTray as I, MAX_UPLOADS_PER_MINUTE as ce, generateAttachmentId as le, useClipboardPaste as ue } from "@epam/ai-dial-attachment-input";
5
+ import { IconAlertCircleFilled as de, IconAlertTriangleFilled as fe, IconArrowNarrowRight as pe, IconCheck as me, IconChevronDown as he, IconChevronRight as ge, IconFile as _e, IconMicrophone as ve, IconPaperclip as L, IconPlayerStop as ye, IconPlus as be, IconSettings as xe, IconTool as Se, IconX as Ce } from "@tabler/icons-react";
6
6
  import { createElement as we, forwardRef as Te, memo as Ee, useCallback as R, useEffect as z, useId as De, useImperativeHandle as Oe, useLayoutEffect as ke, useMemo as B, useRef as V, useState as H } from "react";
7
7
  //#region src/constants/public-class-names.ts
8
8
  var U = {
@@ -32,7 +32,7 @@ var U = {
32
32
  "--ci-sheet-text": f?.sheetText,
33
33
  "--ci-sheet-divider": f?.divider
34
34
  });
35
- return /* @__PURE__ */ I(p, {
35
+ return /* @__PURE__ */ P(p, {
36
36
  open: e,
37
37
  onClose: r,
38
38
  title: t,
@@ -71,7 +71,7 @@ var U = {
71
71
  let y = R((e) => e.map((e) => {
72
72
  let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), i = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0;
73
73
  return {
74
- id: ce(),
74
+ id: le(),
75
75
  name: e.name,
76
76
  contentType: e.type,
77
77
  file: e,
@@ -139,7 +139,7 @@ var U = {
139
139
  status: a.Error,
140
140
  errorReason: n
141
141
  } : e));
142
- }), G(e, se, w);
142
+ }), G(e, ce, w);
143
143
  }
144
144
  }
145
145
  }, [
@@ -322,11 +322,11 @@ var U = {
322
322
  if (n <= t) return;
323
323
  let r = t;
324
324
  o.filter((e) => e.offset >= t && e.offset <= n).forEach((t) => {
325
- t.offset > r && s.push(/* @__PURE__ */ I("span", {
325
+ t.offset > r && s.push(/* @__PURE__ */ P("span", {
326
326
  "aria-hidden": !0,
327
327
  children: e.slice(r, t.offset)
328
328
  }, `text-${l++}`)), s.push(t.node), r = t.offset;
329
- }), r < n && s.push(/* @__PURE__ */ I("span", {
329
+ }), r < n && s.push(/* @__PURE__ */ P("span", {
330
330
  "aria-hidden": !0,
331
331
  children: e.slice(r, n)
332
332
  }, `text-${l++}`));
@@ -334,10 +334,10 @@ var U = {
334
334
  return a.forEach((t, n) => {
335
335
  if (u(c, t.start), t.start + t.length <= c) return;
336
336
  let a = e.slice(t.start, t.start + t.length);
337
- s.push(t.render ? /* @__PURE__ */ I("span", {
337
+ s.push(t.render ? /* @__PURE__ */ P("span", {
338
338
  className: "pointer-events-auto",
339
339
  children: t.render()
340
- }, `range-${n}`) : /* @__PURE__ */ I("span", {
340
+ }, `range-${n}`) : /* @__PURE__ */ P("span", {
341
341
  "aria-hidden": !0,
342
342
  className: t.isUnsupported ? i : r,
343
343
  children: a
@@ -563,7 +563,7 @@ var U = {
563
563
  "--ci-sheet-item-active": f?.itemActiveBg,
564
564
  "--ci-sheet-icon": f?.itemIcon
565
565
  });
566
- return /* @__PURE__ */ I(W, {
566
+ return /* @__PURE__ */ P(W, {
567
567
  isOpen: e,
568
568
  title: t,
569
569
  closeLabel: n,
@@ -572,23 +572,23 @@ var U = {
572
572
  className: o,
573
573
  titleClassName: s,
574
574
  colors: f?.shell,
575
- children: /* @__PURE__ */ I("ul", {
575
+ children: /* @__PURE__ */ P("ul", {
576
576
  role: "list",
577
577
  className: "flex flex-col",
578
578
  style: h,
579
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(m, {
579
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ P(m, {
580
580
  type: "button",
581
581
  className: l(it.item, "w-full gap-3 px-4 py-[10px] text-start"),
582
- iconBefore: /* @__PURE__ */ I("span", {
582
+ iconBefore: /* @__PURE__ */ P("span", {
583
583
  className: it.itemIcon,
584
584
  children: n
585
585
  }),
586
- iconAfter: r ? /* @__PURE__ */ I("span", {
586
+ iconAfter: r ? /* @__PURE__ */ P("span", {
587
587
  className: "ms-auto",
588
588
  children: r
589
589
  }) : null,
590
590
  textClassName: d,
591
- label: /* @__PURE__ */ I("span", {
591
+ label: /* @__PURE__ */ P("span", {
592
592
  className: u,
593
593
  children: t
594
594
  }),
@@ -635,11 +635,11 @@ var U = {
635
635
  "Creative"
636
636
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
637
637
  let S = c({ "--csf-label-text": x?.labelText }), C = l(b, st.label, "gap-1");
638
- return /* @__PURE__ */ L("div", {
638
+ return /* @__PURE__ */ F("div", {
639
639
  className: "flex flex-col gap-4 px-6 pb-3",
640
640
  style: S,
641
641
  children: [
642
- e.responseFormat && /* @__PURE__ */ I(A, {
642
+ e.responseFormat && /* @__PURE__ */ P(te, {
643
643
  id: "response-format",
644
644
  labelProps: {
645
645
  label: d,
@@ -647,7 +647,7 @@ var U = {
647
647
  caption: f
648
648
  },
649
649
  optionsClassName: "mb-2",
650
- orientation: j.Column,
650
+ orientation: A.Column,
651
651
  value: t ?? o.Markdown,
652
652
  items: [{
653
653
  value: o.Markdown,
@@ -658,18 +658,18 @@ var U = {
658
658
  }],
659
659
  onChange: (e) => a(e)
660
660
  }),
661
- e.systemPrompt && /* @__PURE__ */ I(ae, {
661
+ e.systemPrompt && /* @__PURE__ */ P(oe, {
662
662
  value: n,
663
663
  placeholder: g,
664
664
  className: i,
665
- resize: N.Vertical,
665
+ resize: M.Vertical,
666
666
  labelProps: {
667
667
  className: C,
668
668
  label: h
669
669
  },
670
670
  onChange: (e) => s(e ?? "")
671
671
  }),
672
- e.temperature && /* @__PURE__ */ I(re, {
672
+ e.temperature && /* @__PURE__ */ P(ie, {
673
673
  labelProps: {
674
674
  label: _,
675
675
  className: C,
@@ -687,7 +687,7 @@ var U = {
687
687
  ]
688
688
  });
689
689
  }, lt = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: c, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
690
- let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: ee, setSystemPrompt: k, setTemperature: A, handleSubmit: j } = ot({
690
+ let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: ee, setSystemPrompt: k, setTemperature: te, handleSubmit: A } = ot({
691
691
  isOpen: e,
692
692
  features: o,
693
693
  initialResponseFormat: s,
@@ -696,7 +696,7 @@ var U = {
696
696
  onSave: d,
697
697
  onClose: r
698
698
  });
699
- return /* @__PURE__ */ L(W, {
699
+ return /* @__PURE__ */ F(W, {
700
700
  isOpen: e,
701
701
  title: f,
702
702
  closeLabel: i,
@@ -704,14 +704,14 @@ var U = {
704
704
  onBack: t,
705
705
  backLabel: n,
706
706
  style: a,
707
- children: [/* @__PURE__ */ I(ct, {
707
+ children: [/* @__PURE__ */ P(ct, {
708
708
  features: o,
709
709
  responseFormat: w,
710
710
  systemPrompt: T,
711
711
  temperature: E,
712
712
  onResponseFormatChange: ee,
713
713
  onSystemPromptChange: k,
714
- onTemperatureChange: A,
714
+ onTemperatureChange: te,
715
715
  responseFormatLabel: p,
716
716
  responseFormatHint: m,
717
717
  responseFormatMarkdownLabel: h,
@@ -721,15 +721,15 @@ var U = {
721
721
  temperatureLabel: y,
722
722
  temperatureLabels: b,
723
723
  temperatureHint: x
724
- }), /* @__PURE__ */ I("div", {
724
+ }), /* @__PURE__ */ P("div", {
725
725
  className: l("px-6 py-4 mobile:pb-8"),
726
- children: /* @__PURE__ */ I(P, {
726
+ children: /* @__PURE__ */ P(se, {
727
727
  tooltip: C,
728
728
  hideTooltip: D || !C,
729
729
  triggerClassName: "w-full",
730
- children: /* @__PURE__ */ I(O, {
730
+ children: /* @__PURE__ */ P(O, {
731
731
  label: S,
732
- onClick: j,
732
+ onClick: A,
733
733
  disabled: !D,
734
734
  className: "w-full"
735
735
  })
@@ -745,7 +745,7 @@ var U = {
745
745
  onSave: i,
746
746
  onClose: a
747
747
  });
748
- return /* @__PURE__ */ I(D, {
748
+ return /* @__PURE__ */ P(D, {
749
749
  open: !0,
750
750
  header: o,
751
751
  titleClassName: s,
@@ -762,7 +762,7 @@ var U = {
762
762
  hideTooltip: w
763
763
  } : void 0
764
764
  }],
765
- children: /* @__PURE__ */ I(ct, {
765
+ children: /* @__PURE__ */ P(ct, {
766
766
  features: e,
767
767
  responseFormat: x,
768
768
  systemPrompt: S,
@@ -789,7 +789,7 @@ var U = {
789
789
  "--tbs-icon-text": p?.iconText,
790
790
  "--tbs-selected-icon-text": p?.selectedIconText
791
791
  });
792
- return /* @__PURE__ */ I(W, {
792
+ return /* @__PURE__ */ P(W, {
793
793
  isOpen: e,
794
794
  title: o,
795
795
  closeLabel: i,
@@ -797,30 +797,30 @@ var U = {
797
797
  onBack: t,
798
798
  backLabel: n,
799
799
  style: a,
800
- children: /* @__PURE__ */ I("ul", {
800
+ children: /* @__PURE__ */ P("ul", {
801
801
  role: "menu",
802
802
  className: "flex flex-col pb-4",
803
803
  style: h,
804
- children: s.map((e) => /* @__PURE__ */ I("li", {
804
+ children: s.map((e) => /* @__PURE__ */ P("li", {
805
805
  role: "none",
806
- children: /* @__PURE__ */ I(m, {
806
+ children: /* @__PURE__ */ P(m, {
807
807
  type: "button",
808
808
  role: "menuitemcheckbox",
809
809
  "aria-checked": e.isSelected,
810
810
  className: "w-full gap-3 px-4 py-[10px] text-start",
811
- iconBefore: /* @__PURE__ */ I("span", {
811
+ iconBefore: /* @__PURE__ */ P("span", {
812
812
  className: l("flex items-center", K.icon),
813
813
  children: e.icon
814
814
  }),
815
- iconAfter: e.isSelected ? /* @__PURE__ */ I("span", {
815
+ iconAfter: e.isSelected ? /* @__PURE__ */ P("span", {
816
816
  className: l("ms-auto", K.selectedIcon),
817
- children: /* @__PURE__ */ I(pe, {
817
+ children: /* @__PURE__ */ P(me, {
818
818
  size: f,
819
819
  "aria-hidden": !0,
820
820
  stroke: v
821
821
  })
822
822
  }) : null,
823
- label: /* @__PURE__ */ I("span", {
823
+ label: /* @__PURE__ */ P("span", {
824
824
  className: d,
825
825
  children: e.label
826
826
  }),
@@ -833,14 +833,14 @@ var U = {
833
833
  toolIcon: "_toolIcon_ma5s5_1",
834
834
  chevronIcon: "_chevronIcon_ma5s5_5"
835
835
  }, mt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: h, extraMenuItems: g, toolsMenuItems: x = [], onToolToggle: C, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, getCaretPosition: ee, colors: O }) => {
836
- let k = d(), [A, j] = H(!1), [M, te] = H(!1), [ne, re] = H(!1), [ie, ae] = H(null), [N, P] = H(!1), oe = B(() => c({
836
+ let k = d(), [te, A] = H(!1), [j, ne] = H(!1), [re, ie] = H(!1), [ae, oe] = H(null), [M, se] = H(!1), I = B(() => c({
837
837
  "--aab-tool-icon": O?.toolIcon,
838
838
  "--aab-chevron-icon": O?.chevronIcon
839
- }), [O?.toolIcon, O?.chevronIcon]), se = x.length > 0 && C != null, ce = D != null && D.length > 0, le = B(() => x.map((e) => ({
839
+ }), [O?.toolIcon, O?.chevronIcon]), ce = x.length > 0 && C != null, le = D != null && D.length > 0, ue = B(() => x.map((e) => ({
840
840
  key: e.id,
841
841
  label: e.label,
842
- icon: /* @__PURE__ */ I("span", {
843
- style: oe,
842
+ icon: /* @__PURE__ */ P("span", {
843
+ style: I,
844
844
  className: l("flex items-center", pt.toolIcon),
845
845
  children: e.icon
846
846
  }),
@@ -851,12 +851,12 @@ var U = {
851
851
  })), [
852
852
  x,
853
853
  C,
854
- oe
855
- ]), ue = B(() => [
854
+ I
855
+ ]), de = B(() => [
856
856
  ...e == null ? [] : [{
857
857
  key: "attach",
858
858
  label: r,
859
- icon: /* @__PURE__ */ I(ve, {
859
+ icon: /* @__PURE__ */ P(L, {
860
860
  size: f,
861
861
  "aria-hidden": !0,
862
862
  stroke: v
@@ -864,36 +864,36 @@ var U = {
864
864
  onClick: e
865
865
  }],
866
866
  ...g ?? [],
867
- ...se ? [{
867
+ ...ce ? [{
868
868
  key: "tools",
869
869
  label: T,
870
- icon: /* @__PURE__ */ I(Se, {
870
+ icon: /* @__PURE__ */ P(Se, {
871
871
  size: f,
872
872
  "aria-hidden": !0,
873
873
  stroke: v
874
874
  }),
875
875
  onClick: k ? () => {
876
- re(!0), j(!1);
876
+ ie(!0), A(!1);
877
877
  } : () => void 0,
878
- ...k ? { iconAfter: /* @__PURE__ */ I(he, {
878
+ ...k ? { iconAfter: /* @__PURE__ */ P(ge, {
879
879
  size: f,
880
880
  stroke: v,
881
- style: oe,
881
+ style: I,
882
882
  className: l("rtl:scale-x-[-1]", pt.chevronIcon),
883
883
  "aria-hidden": !0
884
- }) } : { children: le }
884
+ }) } : { children: ue }
885
885
  }] : [],
886
886
  ...(D ?? []).map((e) => ({
887
887
  key: e.key,
888
888
  label: e.title,
889
889
  icon: e.icon,
890
890
  onClick: k ? () => {
891
- ae(e.key), j(!1);
891
+ oe(e.key), A(!1);
892
892
  } : () => void 0,
893
- ...k ? { iconAfter: /* @__PURE__ */ I(he, {
893
+ ...k ? { iconAfter: /* @__PURE__ */ P(ge, {
894
894
  size: f,
895
895
  stroke: v,
896
- style: oe,
896
+ style: I,
897
897
  className: l("rtl:scale-x-[-1]", pt.chevronIcon),
898
898
  "aria-hidden": !0
899
899
  }) } : {
@@ -901,37 +901,37 @@ var U = {
901
901
  key: `${e.key}-panel`,
902
902
  label: ""
903
903
  }],
904
- renderSubMenu: () => e.renderOverlay(() => P(!1), ee?.() ?? 0)
904
+ renderSubMenu: () => e.renderOverlay(() => se(!1), ee?.() ?? 0)
905
905
  }
906
906
  })),
907
907
  ...t == null ? [] : [{
908
908
  key: "record-voice",
909
909
  label: n,
910
- icon: /* @__PURE__ */ I(_e, {
910
+ icon: /* @__PURE__ */ P(ve, {
911
911
  size: f,
912
912
  "aria-hidden": !0,
913
913
  stroke: v
914
914
  }),
915
915
  onClick: () => {
916
- j(!1), P(!1), t();
916
+ A(!1), se(!1), t();
917
917
  }
918
918
  }],
919
919
  ...h == null ? [] : [{
920
920
  key: "chat-settings",
921
921
  label: h.menuItemLabel ?? "Chat settings",
922
- icon: /* @__PURE__ */ I(xe, {
922
+ icon: /* @__PURE__ */ P(xe, {
923
923
  size: f,
924
924
  "aria-hidden": !0,
925
925
  stroke: v
926
926
  }),
927
- iconAfter: k ? /* @__PURE__ */ I(he, {
927
+ iconAfter: k ? /* @__PURE__ */ P(ge, {
928
928
  size: f,
929
929
  stroke: v,
930
- style: oe,
930
+ style: I,
931
931
  className: l("rtl:scale-x-[-1]", pt.chevronIcon),
932
932
  "aria-hidden": !0
933
933
  }) : null,
934
- onClick: () => te(!0)
934
+ onClick: () => ne(!0)
935
935
  }]
936
936
  ], [
937
937
  r,
@@ -941,25 +941,25 @@ var U = {
941
941
  h,
942
942
  g,
943
943
  k,
944
- se,
944
+ ce,
945
945
  T,
946
- le,
946
+ ue,
947
947
  D,
948
948
  ee,
949
- oe
949
+ I
950
950
  ]);
951
- if (ue.length === 0) return null;
952
- let de = /* @__PURE__ */ I(y, {
951
+ if (de.length === 0) return null;
952
+ let fe = /* @__PURE__ */ P(y, {
953
953
  matchReferenceWidth: !1,
954
954
  placement: "bottom-start",
955
955
  listClassName: p,
956
956
  overlayContentClassName: "flex flex-col gap-1",
957
- items: ue,
957
+ items: de,
958
958
  disabled: m,
959
- open: ce ? N : void 0,
960
- onOpenChange: ce ? P : void 0,
961
- children: /* @__PURE__ */ I(S, {
962
- icon: /* @__PURE__ */ I(be, {
959
+ open: le ? M : void 0,
960
+ onOpenChange: le ? se : void 0,
961
+ children: /* @__PURE__ */ P(S, {
962
+ icon: /* @__PURE__ */ P(be, {
963
963
  size: _.LG,
964
964
  "aria-hidden": !0,
965
965
  stroke: v
@@ -969,9 +969,9 @@ var U = {
969
969
  disabled: m
970
970
  })
971
971
  });
972
- return /* @__PURE__ */ I(F, { children: k ? /* @__PURE__ */ L(F, { children: [
973
- /* @__PURE__ */ I(S, {
974
- icon: /* @__PURE__ */ I(be, {
972
+ return /* @__PURE__ */ P(N, { children: k ? /* @__PURE__ */ F(N, { children: [
973
+ /* @__PURE__ */ P(S, {
974
+ icon: /* @__PURE__ */ P(be, {
975
975
  size: _.LG,
976
976
  "aria-hidden": !0,
977
977
  stroke: v
@@ -980,54 +980,54 @@ var U = {
980
980
  size: b.Large,
981
981
  tooltipProps: { tooltip: i },
982
982
  disabled: m,
983
- onClick: () => j(!0)
983
+ onClick: () => A(!0)
984
984
  }),
985
- /* @__PURE__ */ I(at, {
986
- isOpen: A,
985
+ /* @__PURE__ */ P(at, {
986
+ isOpen: te,
987
987
  title: a,
988
988
  closeLabel: s,
989
- onClose: () => j(!1),
989
+ onClose: () => A(!1),
990
990
  style: u,
991
- items: ue,
991
+ items: de,
992
992
  className: "pb-4",
993
993
  btnTextClassName: "flex-1"
994
994
  }),
995
- se && /* @__PURE__ */ I(ft, {
996
- isOpen: ne,
995
+ ce && /* @__PURE__ */ P(ft, {
996
+ isOpen: re,
997
997
  onBack: () => {
998
- re(!1), j(!0);
998
+ ie(!1), A(!0);
999
999
  },
1000
1000
  backLabel: E,
1001
- onClose: () => re(!1),
1001
+ onClose: () => ie(!1),
1002
1002
  closeLabel: s,
1003
1003
  style: u,
1004
1004
  title: T,
1005
1005
  items: x,
1006
1006
  onToolToggle: C
1007
1007
  }),
1008
- D?.map((e) => /* @__PURE__ */ I(W, {
1009
- isOpen: ie === e.key,
1008
+ D?.map((e) => /* @__PURE__ */ P(W, {
1009
+ isOpen: ae === e.key,
1010
1010
  title: e.title,
1011
1011
  closeLabel: s,
1012
1012
  onBack: () => {
1013
- ae(null), j(!0);
1013
+ oe(null), A(!0);
1014
1014
  },
1015
1015
  backLabel: e.backLabel ?? "Back",
1016
- onClose: () => ae(null),
1016
+ onClose: () => oe(null),
1017
1017
  style: u,
1018
- children: /* @__PURE__ */ I("div", {
1018
+ children: /* @__PURE__ */ P("div", {
1019
1019
  role: "menu",
1020
1020
  "aria-label": e.title,
1021
- children: e.renderOverlay(() => ae(null), ee?.() ?? 0)
1021
+ children: e.renderOverlay(() => oe(null), ee?.() ?? 0)
1022
1022
  })
1023
1023
  }, e.key)),
1024
- h != null && /* @__PURE__ */ I(lt, {
1025
- isOpen: M,
1024
+ h != null && /* @__PURE__ */ P(lt, {
1025
+ isOpen: j,
1026
1026
  onBack: () => {
1027
- te(!1), j(!0);
1027
+ ne(!1), A(!0);
1028
1028
  },
1029
1029
  backLabel: h.backLabel ?? "Back",
1030
- onClose: () => te(!1),
1030
+ onClose: () => ne(!1),
1031
1031
  closeLabel: s,
1032
1032
  style: u,
1033
1033
  features: h.features,
@@ -1048,13 +1048,13 @@ var U = {
1048
1048
  saveLabel: h.saveLabel,
1049
1049
  saveDisabledTooltip: h.saveDisabledTooltip
1050
1050
  })
1051
- ] }) : /* @__PURE__ */ L(F, { children: [de, h != null && M && /* @__PURE__ */ I(dt, {
1051
+ ] }) : /* @__PURE__ */ F(N, { children: [fe, h != null && j && /* @__PURE__ */ P(dt, {
1052
1052
  features: h.features,
1053
1053
  initialResponseFormat: h.responseFormat ?? o.Markdown,
1054
1054
  initialSystemPrompt: h.systemPrompt,
1055
1055
  initialTemperature: h.temperature,
1056
1056
  onSave: h.onSave,
1057
- onClose: () => te(!1),
1057
+ onClose: () => ne(!1),
1058
1058
  title: h.title,
1059
1059
  responseFormatLabel: h.responseFormatLabel,
1060
1060
  responseFormatHint: h.responseFormatHint,
@@ -1091,41 +1091,41 @@ var U = {
1091
1091
  "--ci-chip-close": u?.chipClose,
1092
1092
  "--ci-chip-close-hover": u?.chipCloseHover
1093
1093
  });
1094
- return /* @__PURE__ */ I("div", {
1094
+ return /* @__PURE__ */ P("div", {
1095
1095
  className: "flex flex-wrap items-center gap-2",
1096
1096
  style: f,
1097
- children: e.map((e) => /* @__PURE__ */ L("div", {
1097
+ children: e.map((e) => /* @__PURE__ */ F("div", {
1098
1098
  className: l(q.chip, e.isSelected && q.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "ps-2 pe-1" : "px-2"),
1099
- children: [/* @__PURE__ */ L("button", {
1099
+ children: [/* @__PURE__ */ F("button", {
1100
1100
  type: "button",
1101
1101
  onClick: () => t(e.id),
1102
1102
  "aria-pressed": e.isSelected,
1103
1103
  className: "flex min-w-0 items-center gap-1.5",
1104
1104
  children: [
1105
- /* @__PURE__ */ I("span", {
1105
+ /* @__PURE__ */ P("span", {
1106
1106
  className: l(q.chipIcon, "shrink-0"),
1107
1107
  "aria-hidden": !0,
1108
1108
  children: e.icon
1109
1109
  }),
1110
- /* @__PURE__ */ L("span", {
1110
+ /* @__PURE__ */ F("span", {
1111
1111
  className: l(q.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
1112
- children: [e.label, d && /* @__PURE__ */ I("span", {
1112
+ children: [e.label, d && /* @__PURE__ */ P("span", {
1113
1113
  "aria-hidden": !0,
1114
1114
  children: ":"
1115
1115
  })]
1116
1116
  }),
1117
- d && /* @__PURE__ */ I("span", {
1117
+ d && /* @__PURE__ */ P("span", {
1118
1118
  className: l(q.chipState, s?.fontClassName || "dial-small-paragraph-text", "ms-1 shrink-0 tracking-wider uppercase"),
1119
1119
  "aria-hidden": !0,
1120
1120
  children: e.isSelected ? a : o
1121
1121
  })
1122
1122
  ]
1123
- }), r && /* @__PURE__ */ I("button", {
1123
+ }), r && /* @__PURE__ */ P("button", {
1124
1124
  type: "button",
1125
1125
  onClick: () => n(e.id),
1126
1126
  "aria-label": i(e.label),
1127
1127
  className: l(q.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1128
- children: /* @__PURE__ */ I(Ce, {
1128
+ children: /* @__PURE__ */ P(Ce, {
1129
1129
  size: 12,
1130
1130
  "aria-hidden": !0,
1131
1131
  stroke: v
@@ -1202,11 +1202,11 @@ var U = {
1202
1202
  });
1203
1203
  return t.observe(e), () => t.disconnect();
1204
1204
  }, [b]);
1205
- let x = /* @__PURE__ */ L("div", {
1205
+ let x = /* @__PURE__ */ F("div", {
1206
1206
  className: "flex shrink-0 items-center justify-end gap-1",
1207
1207
  children: [
1208
- /* @__PURE__ */ I(E, {
1209
- icon: /* @__PURE__ */ I(Ce, {
1208
+ /* @__PURE__ */ P(E, {
1209
+ icon: /* @__PURE__ */ P(Ce, {
1210
1210
  size: _.LG,
1211
1211
  "aria-hidden": !0,
1212
1212
  stroke: v
@@ -1215,8 +1215,8 @@ var U = {
1215
1215
  className: "mobile:min-h-11 mobile:min-w-11",
1216
1216
  onClick: r
1217
1217
  }),
1218
- g && /* @__PURE__ */ I(k, {
1219
- icon: /* @__PURE__ */ I(pe, {
1218
+ g && /* @__PURE__ */ P(k, {
1219
+ icon: /* @__PURE__ */ P(me, {
1220
1220
  size: _.LG,
1221
1221
  "aria-hidden": !0,
1222
1222
  stroke: v
@@ -1226,82 +1226,82 @@ var U = {
1226
1226
  "aria-label": a,
1227
1227
  className: "mobile:min-h-11 mobile:min-w-11"
1228
1228
  }),
1229
- y && /* @__PURE__ */ I("span", {
1229
+ y && /* @__PURE__ */ P("span", {
1230
1230
  className: "flex size-[40px] shrink-0 items-center justify-center mobile:min-h-11 mobile:min-w-11",
1231
- children: /* @__PURE__ */ I(ie, {
1231
+ children: /* @__PURE__ */ P(ae, {
1232
1232
  size: 20,
1233
1233
  ariaLabel: s
1234
1234
  })
1235
1235
  })
1236
1236
  ]
1237
1237
  });
1238
- return /* @__PURE__ */ I("div", {
1238
+ return /* @__PURE__ */ P("div", {
1239
1239
  className: u,
1240
- children: /* @__PURE__ */ L("div", {
1240
+ children: /* @__PURE__ */ F("div", {
1241
1241
  style: c,
1242
1242
  className: l("flex w-full min-w-0 flex-col justify-center gap-2", !d && J.wrapper, !d && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md"),
1243
- children: [/* @__PURE__ */ L("div", {
1243
+ children: [/* @__PURE__ */ F("div", {
1244
1244
  className: "flex min-w-0 flex-1 items-center gap-3",
1245
- children: [g && /* @__PURE__ */ I("span", {
1245
+ children: [g && /* @__PURE__ */ P("span", {
1246
1246
  className: l(_t.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1247
1247
  "aria-hidden": !0
1248
- }), /* @__PURE__ */ I("canvas", {
1248
+ }), /* @__PURE__ */ P("canvas", {
1249
1249
  ref: f,
1250
1250
  height: 26,
1251
1251
  "aria-hidden": !0,
1252
1252
  className: l(_t.waveformCanvas, "h-[26px] min-w-0 flex-1")
1253
1253
  })]
1254
- }), /* @__PURE__ */ L("div", {
1254
+ }), /* @__PURE__ */ F("div", {
1255
1255
  className: "flex items-center justify-between gap-2",
1256
- children: [i ?? /* @__PURE__ */ I("span", { "aria-hidden": !0 }), x]
1256
+ children: [i ?? /* @__PURE__ */ P("span", { "aria-hidden": !0 }), x]
1257
1257
  })]
1258
1258
  })
1259
1259
  });
1260
- }, St = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ I(k, {
1260
+ }, St = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ P(k, {
1261
1261
  "aria-label": n,
1262
1262
  onClick: () => e?.(),
1263
1263
  disabled: t,
1264
1264
  tooltipProps: r ? { tooltip: r } : void 0,
1265
- icon: /* @__PURE__ */ I(fe, {
1265
+ icon: /* @__PURE__ */ P(pe, {
1266
1266
  size: _.LG,
1267
1267
  className: "rtl:scale-x-[-1]",
1268
1268
  stroke: v
1269
1269
  })
1270
- }), Ct = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ I(E, {
1271
- icon: /* @__PURE__ */ I(ye, {
1270
+ }), Ct = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ P(E, {
1271
+ icon: /* @__PURE__ */ P(ye, {
1272
1272
  size: _.LG,
1273
1273
  stroke: v
1274
1274
  }),
1275
1275
  onClick: () => e?.(),
1276
1276
  "aria-label": t
1277
- }), wt = ({ size: e = 20 }) => /* @__PURE__ */ I(te, {
1278
- variant: ne.Circular,
1277
+ }), wt = ({ size: e = 20 }) => /* @__PURE__ */ P(ne, {
1278
+ variant: re.Circular,
1279
1279
  width: e,
1280
1280
  height: e,
1281
1281
  active: !0
1282
- }), Tt = ({ loadingLabel: e }) => /* @__PURE__ */ L("span", {
1282
+ }), Tt = ({ loadingLabel: e }) => /* @__PURE__ */ F("span", {
1283
1283
  className: "flex min-w-0 flex-1 items-center",
1284
- children: [/* @__PURE__ */ I(te, {
1285
- variant: ne.Text,
1284
+ children: [/* @__PURE__ */ P(ne, {
1285
+ variant: re.Text,
1286
1286
  width: "100%",
1287
1287
  height: 16,
1288
1288
  active: !0
1289
- }), e && /* @__PURE__ */ I("span", {
1289
+ }), e && /* @__PURE__ */ P("span", {
1290
1290
  className: "sr-only",
1291
1291
  children: e
1292
1292
  })]
1293
- }), Et = ({ loadingLabel: e }) => /* @__PURE__ */ I("div", {
1293
+ }), Et = ({ loadingLabel: e }) => /* @__PURE__ */ P("div", {
1294
1294
  role: "status",
1295
1295
  "aria-label": e,
1296
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ L("div", {
1296
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ F("div", {
1297
1297
  className: "flex h-11 items-center gap-3 px-4",
1298
1298
  "aria-hidden": "true",
1299
- children: [/* @__PURE__ */ I(wt, {}), /* @__PURE__ */ I(Tt, {})]
1299
+ children: [/* @__PURE__ */ P(wt, {}), /* @__PURE__ */ P(Tt, {})]
1300
1300
  }, t))
1301
1301
  }), Dt = (e) => e.displayName ?? e.id, Ot = (e, t) => {
1302
1302
  let n = t.trim().toLowerCase();
1303
1303
  return n ? e.filter((e) => Dt(e).toLowerCase().includes(n)) : e;
1304
- }, kt = (e, t, r, i = 18, a) => /* @__PURE__ */ I(n, {
1304
+ }, kt = (e, t, r, i = 18, a) => /* @__PURE__ */ P(n, {
1305
1305
  src: e,
1306
1306
  size: i,
1307
1307
  labels: { tooltip: a },
@@ -1314,7 +1314,7 @@ var U = {
1314
1314
  selectedItemText: "_selectedItemText_1u7db_26",
1315
1315
  checkIcon: "_checkIcon_1u7db_30"
1316
1316
  }, jt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1317
- let [a, o] = H(""), s = B(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = B(() => u ? /* @__PURE__ */ I(wt, { size: _.LG }) : kt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", _.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1317
+ let [a, o] = H(""), s = B(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = B(() => u ? /* @__PURE__ */ P(wt, { size: _.LG }) : kt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", _.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1318
1318
  u,
1319
1319
  s,
1320
1320
  d,
@@ -1322,8 +1322,8 @@ var U = {
1322
1322
  ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", g = B(() => {
1323
1323
  if (u) return Array.from({ length: 7 }, (e, t) => ({
1324
1324
  key: `__loading-${t}`,
1325
- icon: /* @__PURE__ */ I(wt, {}),
1326
- label: /* @__PURE__ */ I(Tt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1325
+ icon: /* @__PURE__ */ P(wt, {}),
1326
+ label: /* @__PURE__ */ P(Tt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1327
1327
  disabled: !0
1328
1328
  }));
1329
1329
  if (!e || e.length === 0) {
@@ -1339,7 +1339,7 @@ var U = {
1339
1339
  let r = e.id === t;
1340
1340
  return {
1341
1341
  key: e.id,
1342
- label: /* @__PURE__ */ I(C, {
1342
+ label: /* @__PURE__ */ P(C, {
1343
1343
  text: Dt(e),
1344
1344
  query: a,
1345
1345
  maxLines: 1
@@ -1374,10 +1374,10 @@ var U = {
1374
1374
  selectedLabel: p,
1375
1375
  selectedVersion: m,
1376
1376
  menuItems: g,
1377
- menuHeader: B(() => !u && e && e.length > 0 ? /* @__PURE__ */ I("div", {
1377
+ menuHeader: B(() => !u && e && e.length > 0 ? /* @__PURE__ */ P("div", {
1378
1378
  style: c({ "--ms-search-header-bg": i?.colors?.searchHeaderBackground }),
1379
1379
  className: l("sticky top-0 z-10 pe-2 pt-2 pb-1", At.searchHeader, i?.searchHeaderClassName, U.modelMenuSearch),
1380
- children: /* @__PURE__ */ I(M, {
1380
+ children: /* @__PURE__ */ P(j, {
1381
1381
  value: a,
1382
1382
  placeholder: r?.searchPlaceholder ?? "Search",
1383
1383
  size: b.Small,
@@ -1814,7 +1814,7 @@ function Jt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1814
1814
  m,
1815
1815
  S,
1816
1816
  w
1817
- ]), D = /* @__PURE__ */ I("div", {
1817
+ ]), D = /* @__PURE__ */ P("div", {
1818
1818
  "aria-hidden": !0,
1819
1819
  style: {
1820
1820
  height: b(),
@@ -1847,25 +1847,25 @@ var Yt = {
1847
1847
  itemSelectedText: "_itemSelectedText_5skzl_41"
1848
1848
  }, Xt = 44, Zt = 8, Qt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, itemClassName: s, selectedItemClassName: c, hasSelectedBackground: u, hasSelectedText: d, onSelect: f }) => {
1849
1849
  let p = r[e], h = kt(p.iconUrl, p.type, p.displayName ?? p.id, _.SM), g = p.id === i;
1850
- return /* @__PURE__ */ I("div", {
1850
+ return /* @__PURE__ */ P("div", {
1851
1851
  style: t,
1852
1852
  ...n,
1853
- children: /* @__PURE__ */ I(m, {
1853
+ children: /* @__PURE__ */ P(m, {
1854
1854
  type: "button",
1855
1855
  "aria-current": g ? "true" : void 0,
1856
1856
  className: l(Yt.item, "h-full w-full gap-3 px-4", g && u && Yt.itemSelectedBackground, g && d && Yt.itemSelectedText, s, g && c, U.modelMenuItem, g && U.modelMenuItemSelected),
1857
- iconBefore: /* @__PURE__ */ I("span", {
1857
+ iconBefore: /* @__PURE__ */ P("span", {
1858
1858
  className: Yt.itemIcon,
1859
1859
  children: h
1860
1860
  }),
1861
- label: /* @__PURE__ */ L("span", {
1861
+ label: /* @__PURE__ */ F("span", {
1862
1862
  className: "flex flex-1 items-center justify-between gap-2",
1863
- children: [/* @__PURE__ */ I(C, {
1863
+ children: [/* @__PURE__ */ P(C, {
1864
1864
  text: p.displayName ?? p.id,
1865
1865
  query: o,
1866
1866
  maxLines: 1,
1867
1867
  className: l(a, "min-w-0 flex-1 text-start")
1868
- }), g && /* @__PURE__ */ I(pe, {
1868
+ }), g && /* @__PURE__ */ P(me, {
1869
1869
  size: _.SM,
1870
1870
  className: Yt.checkIcon,
1871
1871
  "aria-hidden": !0,
@@ -1892,7 +1892,7 @@ var Yt = {
1892
1892
  "--ci-sheet-selected-bg": E?.selectedItemBackground,
1893
1893
  "--ci-sheet-selected-text": E?.selectedItemText
1894
1894
  });
1895
- return /* @__PURE__ */ I(W, {
1895
+ return /* @__PURE__ */ P(W, {
1896
1896
  isOpen: e,
1897
1897
  title: t,
1898
1898
  closeLabel: n,
@@ -1901,23 +1901,23 @@ var Yt = {
1901
1901
  titleClassName: m,
1902
1902
  className: l("max-h-[80dvh]", _?.className, U.modelMenu),
1903
1903
  colors: g?.shell,
1904
- children: /* @__PURE__ */ L("div", {
1904
+ children: /* @__PURE__ */ F("div", {
1905
1905
  className: "contents",
1906
1906
  style: D,
1907
- children: [x && !S && /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
1907
+ children: [x && !S && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("div", {
1908
1908
  style: c({ "--ci-sheet-search-bg": _?.colors?.searchHeaderBackground }),
1909
1909
  className: l("flex-shrink-0 px-4 py-[10px]", Yt.search, _?.searchHeaderClassName, U.modelMenuSearch),
1910
- children: /* @__PURE__ */ I(M, {
1910
+ children: /* @__PURE__ */ P(j, {
1911
1911
  value: v,
1912
1912
  placeholder: r,
1913
1913
  size: b.Standard,
1914
1914
  onChange: (e) => y(e ?? "")
1915
1915
  })
1916
- }), /* @__PURE__ */ I("div", { className: l(Yt.divider, "h-px flex-shrink-0") })] }), S ? /* @__PURE__ */ I(Et, { loadingLabel: u }) : C ? /* @__PURE__ */ I("div", {
1916
+ }), /* @__PURE__ */ P("div", { className: l(Yt.divider, "h-px flex-shrink-0") })] }), S ? /* @__PURE__ */ P(Et, { loadingLabel: u }) : C ? /* @__PURE__ */ P("div", {
1917
1917
  role: "list",
1918
1918
  className: l(Yt.stateLabel, h, "px-4 py-4"),
1919
1919
  children: C
1920
- }) : /* @__PURE__ */ I(Jt, {
1920
+ }) : /* @__PURE__ */ P(Jt, {
1921
1921
  role: "list",
1922
1922
  className: "overflow-y-auto",
1923
1923
  style: { height: Math.min(w.length, Zt) * Xt },
@@ -1947,28 +1947,28 @@ var Yt = {
1947
1947
  styles: i
1948
1948
  });
1949
1949
  if (!e) return null;
1950
- let k = a || c, A = k ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, j = /* @__PURE__ */ I(me, {
1950
+ let k = a || c, te = k ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, A = /* @__PURE__ */ P(he, {
1951
1951
  size: _.SM,
1952
1952
  className: l(J.modelSelectorCaret, U.modelSelectorCaret),
1953
1953
  "aria-hidden": !0,
1954
1954
  stroke: v
1955
- }), M = /* @__PURE__ */ I("span", {
1955
+ }), j = /* @__PURE__ */ P("span", {
1956
1956
  className: l("flex shrink-0 items-center", U.modelSelectorIcon),
1957
1957
  children: x
1958
1958
  });
1959
- if (o) return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(S, {
1959
+ if (o) return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(S, {
1960
1960
  tooltipProps: { tooltip: w },
1961
- icon: /* @__PURE__ */ L("div", {
1961
+ icon: /* @__PURE__ */ F("div", {
1962
1962
  className: "flex items-center gap-1",
1963
- children: [M, j]
1963
+ children: [j, A]
1964
1964
  }),
1965
1965
  "aria-label": C,
1966
1966
  "aria-disabled": k || void 0,
1967
1967
  onClick: () => {
1968
1968
  k || b(!0);
1969
1969
  },
1970
- className: l("w-[50px]", J.modelSelectorButton, A, U.modelSelectorButton)
1971
- }), d ? /* @__PURE__ */ I(W, {
1970
+ className: l("w-[50px]", J.modelSelectorButton, te, U.modelSelectorButton)
1971
+ }), d ? /* @__PURE__ */ P(W, {
1972
1972
  isOpen: g,
1973
1973
  title: r?.ariaLabel ?? "Select model",
1974
1974
  closeLabel: r?.closeLabel ?? "Close",
@@ -1976,7 +1976,7 @@ var Yt = {
1976
1976
  style: u,
1977
1977
  className: l(i?.className, U.modelMenu),
1978
1978
  children: d(() => b(!1))
1979
- }) : /* @__PURE__ */ I($t, {
1979
+ }) : /* @__PURE__ */ P($t, {
1980
1980
  isOpen: g,
1981
1981
  title: r?.ariaLabel ?? "Select model",
1982
1982
  closeLabel: r?.closeLabel ?? "Close",
@@ -1993,7 +1993,7 @@ var Yt = {
1993
1993
  })] });
1994
1994
  if (d) {
1995
1995
  let e = T ? `${w} · ${T}` : w;
1996
- return /* @__PURE__ */ I(y, {
1996
+ return /* @__PURE__ */ P(y, {
1997
1997
  placement: "top-end",
1998
1998
  matchReferenceWidth: !1,
1999
1999
  open: f,
@@ -2002,23 +2002,23 @@ var Yt = {
2002
2002
  outsideClosable: !0,
2003
2003
  renderOverlay: () => d(() => h?.(!1)),
2004
2004
  listClassName: l("!w-[368px] !bg-layer-raised", i?.className, U.modelMenu),
2005
- children: /* @__PURE__ */ I(m, {
2005
+ children: /* @__PURE__ */ P(m, {
2006
2006
  "aria-label": C,
2007
2007
  "aria-disabled": k || void 0,
2008
2008
  tooltipProps: { tooltip: e },
2009
- className: l("h-auto min-w-0 gap-1.5 !rounded-full !border-0 px-0 py-1.5 ps-1.5 pe-2", J.modelSelectorButton, A, k && J.modelSelectorButtonDisabled, U.modelSelectorButton),
2009
+ className: l("h-auto min-w-0 gap-1.5 !rounded-full !border-0 px-0 py-1.5 ps-1.5 pe-2", J.modelSelectorButton, te, k && J.modelSelectorButtonDisabled, U.modelSelectorButton),
2010
2010
  onClick: () => {
2011
2011
  k || p?.();
2012
2012
  },
2013
- iconBefore: M,
2014
- iconAfter: j,
2013
+ iconBefore: j,
2014
+ iconAfter: A,
2015
2015
  textClassName: "min-w-0",
2016
- label: /* @__PURE__ */ L("span", {
2016
+ label: /* @__PURE__ */ F("span", {
2017
2017
  className: "flex max-w-[180px] min-w-0 items-baseline gap-1",
2018
- children: [/* @__PURE__ */ I("span", {
2018
+ children: [/* @__PURE__ */ P("span", {
2019
2019
  className: l("dial-small-text max-w-[180px] shrink-0 truncate", J.modelSelectorName),
2020
2020
  children: w
2021
- }), T && /* @__PURE__ */ I("span", {
2021
+ }), T && /* @__PURE__ */ P("span", {
2022
2022
  className: l("dial-tiny-text min-w-0 truncate", J.modelSelectorVersion),
2023
2023
  children: T
2024
2024
  })]
@@ -2026,10 +2026,10 @@ var Yt = {
2026
2026
  })
2027
2027
  });
2028
2028
  }
2029
- return /* @__PURE__ */ I("div", {
2030
- className: l(A),
2029
+ return /* @__PURE__ */ P("div", {
2030
+ className: l(te),
2031
2031
  "aria-disabled": k || void 0,
2032
- children: /* @__PURE__ */ I(y, {
2032
+ children: /* @__PURE__ */ P(y, {
2033
2033
  items: E,
2034
2034
  menuHeader: D,
2035
2035
  placement: "bottom-end",
@@ -2039,39 +2039,39 @@ var Yt = {
2039
2039
  listStyle: ee,
2040
2040
  disabled: k,
2041
2041
  onOpenChange: k ? void 0 : O,
2042
- children: /* @__PURE__ */ I(m, {
2042
+ children: /* @__PURE__ */ P(m, {
2043
2043
  "aria-label": C,
2044
2044
  "aria-disabled": k || void 0,
2045
2045
  tooltipProps: { tooltip: w },
2046
- iconBefore: M,
2047
- iconAfter: j,
2046
+ iconBefore: j,
2047
+ iconAfter: A,
2048
2048
  className: l("h-auto gap-1 !rounded-full !border-0 p-1.5", J.modelSelectorButton, k && J.modelSelectorButtonDisabled, U.modelSelectorButton)
2049
2049
  })
2050
2050
  })
2051
2051
  });
2052
- }, tn = Te(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: b, addMenuTitle: C = "Add", menuTitle: w = "Menu", menuCloseLabel: T = "Close", removeLabel: E, retryLabel: D, uploadingLabel: ee, expandLabel: O, clickLabel: k, sendLabel: A, sendTooltip: j, emptyMessageTooltip: M, stopLabel: te, micLabel: ne = "Dictate", recordVoiceLabel: re = "Record voice", stopRecordingLabel: ie, discardRecordingLabel: ae, colors: N, typography: P, attachmentTray: se, modelMenu: ce, className: ue, pendingDropFiles: de = [], onDropFilesConsumed: fe, pendingAttachments: pe = [], onPendingAttachmentsConsumed: me, pasteTextThreshold: he = 4e3, maxMessageLength: ve = 5e4, deployments: ye, selectedDeploymentId: be, onDeploymentChange: xe, modelSelectorLabels: Se, initialAttachments: Ce = [], hideAddButton: we = !1, hideAttachFile: Te = !1, hideActionBar: Ee = !1, actionRowLayout: De = rt.Stacked, isInlineActionRowAllowedBelowDesktop: Ae = !1, renderFooterActions: W, isInputDisabled: G = !1, isModelSelectorDisabled: Me = !1, isSendDisabled: Ne = !1, isAudioMessageSupported: Pe = !1, isVoiceRecordingSupported: Fe = Pe, onTranscribeAudio: Re, transcribingLabel: ze, voiceErrorLabel: He, sendOnEnter: Ue = nt.Enter, prefixAttachments: qe = [], onRemovePrefixAttachment: Ze, chatSettings: Qe, toolsMenuItems: $e, onToolToggle: et, canRemoveTools: it = !0, toolsMenuTitle: at, toolsBackLabel: ot, toolsChipLabels: st, menuOverlays: ct, activeMentions: lt, onBackspaceAtCaret: ut, caretPositionOverride: dt, commandMenu: K, autoFocus: ft = !1, messageHistory: pt, onDialFileSystemClick: q, dialFileSystemLabel: ht, validateAttachment: _t, onAttachmentClick: vt, modelPickerOverlay: yt, maximumAttachmentsAmount: bt, onAttachmentsLimitExceeded: wt, isAttachmentsEnabled: Tt = !0, isTextAttachmentsAllowed: Et = !0, usageLimitsSlot: Dt, onMessageTooLong: Ot }, kt) => {
2052
+ }, tn = Te(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: b, addMenuTitle: C = "Add", menuTitle: w = "Menu", menuCloseLabel: T = "Close", removeLabel: E, retryLabel: D, uploadingLabel: ee, expandLabel: O, clickLabel: k, sendLabel: te, sendTooltip: A, emptyMessageTooltip: j, stopLabel: ne, micLabel: re = "Dictate", recordVoiceLabel: ie = "Record voice", stopRecordingLabel: ae, discardRecordingLabel: oe, colors: M, typography: se, attachmentTray: ce, modelMenu: le, className: de, pendingDropFiles: fe = [], onDropFilesConsumed: pe, pendingAttachments: me = [], onPendingAttachmentsConsumed: he, pasteTextThreshold: ge = 4e3, maxMessageLength: L = 5e4, deployments: ye, selectedDeploymentId: be, onDeploymentChange: xe, modelSelectorLabels: Se, initialAttachments: Ce = [], hideAddButton: we = !1, hideAttachFile: Te = !1, hideActionBar: Ee = !1, actionRowLayout: De = rt.Stacked, isInlineActionRowAllowedBelowDesktop: Ae = !1, renderFooterActions: W, isInputDisabled: G = !1, isModelSelectorDisabled: Me = !1, isSendDisabled: Ne = !1, isAudioMessageSupported: Pe = !1, isVoiceRecordingSupported: Fe = Pe, onTranscribeAudio: Re, transcribingLabel: ze, voiceErrorLabel: He, sendOnEnter: Ue = nt.Enter, prefixAttachments: qe = [], onRemovePrefixAttachment: Ze, chatSettings: Qe, toolsMenuItems: $e, onToolToggle: et, canRemoveTools: it = !0, toolsMenuTitle: at, toolsBackLabel: ot, toolsChipLabels: st, menuOverlays: ct, activeMentions: lt, onBackspaceAtCaret: ut, caretPositionOverride: dt, commandMenu: K, autoFocus: ft = !1, messageHistory: pt, onDialFileSystemClick: q, dialFileSystemLabel: ht, validateAttachment: _t, onAttachmentClick: vt, modelPickerOverlay: yt, maximumAttachmentsAmount: bt, onAttachmentsLimitExceeded: wt, isAttachmentsEnabled: Tt = !0, isTextAttachmentsAllowed: Et = !0, usageLimitsSlot: Dt, onMessageTooLong: Ot }, kt) => {
2053
2053
  let At = d(), [jt, Mt] = H(!1), Nt = Be(pt), Pt = lt ?? [], Ft = Pt.length > 0, It = B(() => c({
2054
- "--ci-bg": N?.background,
2055
- "--ci-text": N?.text,
2056
- "--ci-border": N?.border,
2057
- "--ci-border-focus": N?.borderFocus,
2058
- "--ci-placeholder": N?.placeholder,
2059
- "--ci-text-disabled": N?.textDisabled,
2060
- "--ci-model-selector-caret-color": N?.modelSelectorCaret,
2061
- "--ci-model-selector-hover-bg": N?.modelSelectorHoverBg,
2062
- "--ci-model-selector-disabled-color": N?.modelSelectorDisabled,
2063
- "--ci-model-selector-name-color": N?.modelSelectorName,
2064
- "--ci-model-selector-version-color": N?.modelSelectorVersion,
2065
- "--ci-voice-waveform": N?.voiceWaveform,
2066
- "--ci-voice-accent": N?.voiceAccent,
2067
- "--ci-mention-highlight-bg": N?.mentionHighlightBg,
2068
- "--ci-mention-highlight-text": N?.mentionHighlightText,
2069
- "--ci-mention-highlight-unsupported-bg": N?.mentionHighlightUnsupportedBg,
2070
- "--ci-mention-highlight-unsupported-text": N?.mentionHighlightUnsupportedText
2071
- }), [N]), Lt = B(() => q ? [{
2054
+ "--ci-bg": M?.background,
2055
+ "--ci-text": M?.text,
2056
+ "--ci-border": M?.border,
2057
+ "--ci-border-focus": M?.borderFocus,
2058
+ "--ci-placeholder": M?.placeholder,
2059
+ "--ci-text-disabled": M?.textDisabled,
2060
+ "--ci-model-selector-caret-color": M?.modelSelectorCaret,
2061
+ "--ci-model-selector-hover-bg": M?.modelSelectorHoverBg,
2062
+ "--ci-model-selector-disabled-color": M?.modelSelectorDisabled,
2063
+ "--ci-model-selector-name-color": M?.modelSelectorName,
2064
+ "--ci-model-selector-version-color": M?.modelSelectorVersion,
2065
+ "--ci-voice-waveform": M?.voiceWaveform,
2066
+ "--ci-voice-accent": M?.voiceAccent,
2067
+ "--ci-mention-highlight-bg": M?.mentionHighlightBg,
2068
+ "--ci-mention-highlight-text": M?.mentionHighlightText,
2069
+ "--ci-mention-highlight-unsupported-bg": M?.mentionHighlightUnsupportedBg,
2070
+ "--ci-mention-highlight-unsupported-text": M?.mentionHighlightUnsupportedText
2071
+ }), [M]), Lt = B(() => q ? [{
2072
2072
  key: "dial-fs",
2073
2073
  label: ht ?? "DIAL file system",
2074
- icon: /* @__PURE__ */ I(ge, {
2074
+ icon: /* @__PURE__ */ P(_e, {
2075
2075
  size: f,
2076
2076
  "aria-hidden": !0,
2077
2077
  stroke: v
@@ -2151,11 +2151,11 @@ var Yt = {
2151
2151
  onUploadAttachment: a,
2152
2152
  onAttachmentsChange: p,
2153
2153
  validateAttachment: _t,
2154
- pendingDropFiles: de,
2155
- onDropFilesConsumed: fe,
2154
+ pendingDropFiles: fe,
2155
+ onDropFilesConsumed: pe,
2156
2156
  isDropDisabled: G,
2157
- pendingAttachments: pe,
2158
- onPendingAttachmentsConsumed: me,
2157
+ pendingAttachments: me,
2158
+ onPendingAttachmentsConsumed: he,
2159
2159
  onExpandPastedText: R((e) => {
2160
2160
  let t = hn.current, n = t ? `${t}\n${e}` : e;
2161
2161
  hn.current = n, X(n), u?.(n);
@@ -2199,17 +2199,17 @@ var Yt = {
2199
2199
  }
2200
2200
  }
2201
2201
  }, [On, Z]);
2202
- let Pn = V(null), Fn = V(null), In = Tt && Et, { handlePaste: Ln } = le(vn, In ? he : Infinity), Rn = R((e) => {
2202
+ let Pn = V(null), Fn = V(null), In = Tt && Et, { handlePaste: Ln } = ue(vn, In ? ge : Infinity), Rn = R((e) => {
2203
2203
  if (!In) {
2204
2204
  let t = e.clipboardData.getData("text/plain");
2205
- t.length >= ve && Ot?.(t.length, ve);
2205
+ t.length >= L && Ot?.(t.length, L);
2206
2206
  }
2207
2207
  if (Ln(e), e.defaultPrevented) return;
2208
2208
  let t = e.clipboardData.getData("text/plain").replace(/\r\n?/g, "\n");
2209
2209
  t !== "" && K?.onTextPaste?.(t);
2210
2210
  }, [
2211
2211
  In,
2212
- ve,
2212
+ L,
2213
2213
  Ot,
2214
2214
  Ln,
2215
2215
  K
@@ -2228,8 +2228,8 @@ var Yt = {
2228
2228
  Hn((t) => t.includes(e) ? t : [...t, e]), $e?.find((t) => t.id === e)?.isSelected && et?.(e);
2229
2229
  }, [$e, et]), Kn = ye === void 0 || be != null, qn = Pe && !s, Jn = async () => {
2230
2230
  if (Ne || $) return;
2231
- if (Y.length >= ve) {
2232
- Ot?.(Y.length, ve);
2231
+ if (Y.length >= L) {
2232
+ Ot?.(Y.length, L);
2233
2233
  return;
2234
2234
  }
2235
2235
  let e = Y, t = gn;
@@ -2279,14 +2279,14 @@ var Yt = {
2279
2279
  let e = [];
2280
2280
  return sn != null && e.push({
2281
2281
  offset: sn,
2282
- node: /* @__PURE__ */ I("span", {
2282
+ node: /* @__PURE__ */ P("span", {
2283
2283
  ref: cn,
2284
2284
  "aria-hidden": !0,
2285
2285
  className: "inline-block h-lh w-0 align-text-top"
2286
2286
  }, "caret-marker")
2287
2287
  }), on && K != null && rn != null && e.push({
2288
2288
  offset: rn,
2289
- node: /* @__PURE__ */ I("span", {
2289
+ node: /* @__PURE__ */ P("span", {
2290
2290
  className: J.commandHint,
2291
2291
  "aria-hidden": !0,
2292
2292
  "data-mirror-synthetic": !0,
@@ -2310,8 +2310,8 @@ var Yt = {
2310
2310
  sn,
2311
2311
  Y
2312
2312
  ]);
2313
- let ar = /* @__PURE__ */ I("textarea", {
2314
- className: l(J.textarea, er && J.textareaMentionMode, P?.fontClassName || "dial-body-paragraph-text", "relative z-0 [field-sizing:content] max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
2313
+ let ar = /* @__PURE__ */ P("textarea", {
2314
+ className: l(J.textarea, er && J.textareaMentionMode, se?.fontClassName || "dial-body-paragraph-text", "relative z-0 [field-sizing:content] max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
2315
2315
  ref: Z,
2316
2316
  autoFocus: ft,
2317
2317
  value: Y,
@@ -2338,14 +2338,14 @@ var Yt = {
2338
2338
  disabled: G,
2339
2339
  readOnly: $,
2340
2340
  rows: 1
2341
- }), or = /* @__PURE__ */ L(F, { children: [ar, K != null && /* @__PURE__ */ I("div", {
2341
+ }), or = /* @__PURE__ */ F(N, { children: [ar, K != null && /* @__PURE__ */ P("div", {
2342
2342
  "aria-hidden": !0,
2343
- className: l("pointer-events-none absolute", P?.fontClassName || "dial-body-paragraph-text"),
2343
+ className: l("pointer-events-none absolute", se?.fontClassName || "dial-body-paragraph-text"),
2344
2344
  style: {
2345
2345
  left: un?.left ?? 0,
2346
2346
  top: un?.top ?? 0
2347
2347
  },
2348
- children: /* @__PURE__ */ I(y, {
2348
+ children: /* @__PURE__ */ P(y, {
2349
2349
  open: zt,
2350
2350
  onOpenChange: (e) => {
2351
2351
  e || Ht();
@@ -2357,7 +2357,7 @@ var Yt = {
2357
2357
  outsidePressIgnoreRef: Z,
2358
2358
  renderOverlay: () => {
2359
2359
  let e = K.menuLabel != null;
2360
- return /* @__PURE__ */ I("div", {
2360
+ return /* @__PURE__ */ P("div", {
2361
2361
  ref: Kt,
2362
2362
  role: e ? "group" : void 0,
2363
2363
  "aria-label": K.menuLabel,
@@ -2370,18 +2370,18 @@ var Yt = {
2370
2370
  })
2371
2371
  });
2372
2372
  },
2373
- children: /* @__PURE__ */ I("span", {
2373
+ children: /* @__PURE__ */ P("span", {
2374
2374
  "aria-hidden": !0,
2375
2375
  className: "inline-block h-lh w-0"
2376
2376
  })
2377
2377
  })
2378
- })] }), sr = /* @__PURE__ */ L("div", {
2378
+ })] }), sr = /* @__PURE__ */ F("div", {
2379
2379
  ref: ln,
2380
2380
  className: "relative -ms-1 -me-1 w-[calc(100%+8px)]",
2381
- children: [er && /* @__PURE__ */ L("div", {
2381
+ children: [er && /* @__PURE__ */ F("div", {
2382
2382
  ref: tr,
2383
- className: l(J.textarea, P?.fontClassName || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden ps-1 pe-1 [overflow-wrap:anywhere] whitespace-pre-wrap"),
2384
- children: [Ve(Y, Pt, $n, J.mentionHighlight, J.mentionHighlightUnsupported), nr.map((e, t) => /* @__PURE__ */ I("div", {
2383
+ className: l(J.textarea, se?.fontClassName || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden ps-1 pe-1 [overflow-wrap:anywhere] whitespace-pre-wrap"),
2384
+ children: [Ve(Y, Pt, $n, J.mentionHighlight, J.mentionHighlightUnsupported), nr.map((e, t) => /* @__PURE__ */ P("div", {
2385
2385
  "aria-hidden": !0,
2386
2386
  className: "pointer-events-none absolute rounded-sm bg-control-accent-alpha-active",
2387
2387
  style: {
@@ -2392,7 +2392,7 @@ var Yt = {
2392
2392
  }
2393
2393
  }, `selection-${t}`))]
2394
2394
  }), or]
2395
- }), cr = we ? void 0 : /* @__PURE__ */ I(mt, {
2395
+ }), cr = we ? void 0 : /* @__PURE__ */ P(mt, {
2396
2396
  onAttachClick: Te ? void 0 : () => Pn.current?.click(),
2397
2397
  attachLabel: g,
2398
2398
  addMenuTitle: C,
@@ -2403,19 +2403,19 @@ var Yt = {
2403
2403
  chatSettings: Qe,
2404
2404
  extraMenuItems: Lt,
2405
2405
  onRecordVoice: Fe && Tt && !s && !$ ? () => jn(Xe.Attachment) : void 0,
2406
- recordVoiceLabel: re,
2406
+ recordVoiceLabel: ie,
2407
2407
  toolsMenuItems: it ? $e : void 0,
2408
2408
  onToolToggle: et,
2409
2409
  toolsMenuTitle: at,
2410
2410
  toolsBackLabel: ot,
2411
2411
  menuOverlays: ct,
2412
2412
  getCaretPosition: () => Z.current?.selectionStart ?? Y.length
2413
- }), lr = De === rt.Inline && (!At || Ae), ur = cr && /* @__PURE__ */ I("div", {
2413
+ }), lr = De === rt.Inline && (!At || Ae), ur = cr && /* @__PURE__ */ P("div", {
2414
2414
  className: l("flex", U.addCluster),
2415
2415
  children: cr
2416
- }), dr = Wn.length > 0 && et != null && /* @__PURE__ */ I("div", {
2416
+ }), dr = Wn.length > 0 && et != null && /* @__PURE__ */ P("div", {
2417
2417
  className: l("min-w-0 flex-1", U.toolsChips),
2418
- children: /* @__PURE__ */ I(gt, {
2418
+ children: /* @__PURE__ */ P(gt, {
2419
2419
  items: Wn,
2420
2420
  onToolToggle: et,
2421
2421
  onToolDismiss: Gn,
@@ -2425,12 +2425,12 @@ var Yt = {
2425
2425
  stateOffLabel: st?.stateOffLabel
2426
2426
  })
2427
2427
  });
2428
- return /* @__PURE__ */ L("div", {
2428
+ return /* @__PURE__ */ F("div", {
2429
2429
  ref: Fn,
2430
2430
  style: It,
2431
- className: l(J.wrapper, G && J.wrapperDisabled, G && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", ue, U.wrapper),
2431
+ className: l(J.wrapper, G && J.wrapperDisabled, G && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", de, U.wrapper),
2432
2432
  children: [
2433
- (qe.length > 0 || gn.length > 0) && /* @__PURE__ */ I(oe, {
2433
+ (qe.length > 0 || gn.length > 0) && /* @__PURE__ */ P(I, {
2434
2434
  attachments: [...qe, ...gn],
2435
2435
  onRemove: (e) => {
2436
2436
  qe.some((t) => t.id === e) ? Ze?.(e) : bn(e);
@@ -2445,15 +2445,15 @@ var Yt = {
2445
2445
  clickLabel: k
2446
2446
  },
2447
2447
  styles: {
2448
- ...se,
2449
- className: l(gn.length > 6 && "-me-4", se?.className)
2448
+ ...ce,
2449
+ className: l(gn.length > 6 && "-me-4", ce?.className)
2450
2450
  },
2451
2451
  onAttachmentClick: vt == null ? void 0 : (e) => {
2452
2452
  let t = [...qe, ...gn].find((t) => t.id === e);
2453
2453
  t != null && vt(t);
2454
2454
  }
2455
2455
  }),
2456
- !we && /* @__PURE__ */ I("input", {
2456
+ !we && /* @__PURE__ */ P("input", {
2457
2457
  ref: Pn,
2458
2458
  type: "file",
2459
2459
  multiple: !0,
@@ -2463,50 +2463,50 @@ var Yt = {
2463
2463
  tabIndex: -1,
2464
2464
  onChange: Qn
2465
2465
  }),
2466
- An && /* @__PURE__ */ I("div", {
2466
+ An && /* @__PURE__ */ P("div", {
2467
2467
  role: "alert",
2468
2468
  className: "min-w-0 px-1 wrap-break-word",
2469
- children: /* @__PURE__ */ I(x, { text: An })
2469
+ children: /* @__PURE__ */ P(x, { text: An })
2470
2470
  }),
2471
- $ && /* @__PURE__ */ I(xt, {
2471
+ $ && /* @__PURE__ */ P(xt, {
2472
2472
  embedded: !0,
2473
2473
  state: On,
2474
2474
  analyserNodeRef: kn,
2475
2475
  onStop: Mn,
2476
2476
  onDiscard: Nn,
2477
2477
  attachButton: cr,
2478
- stopLabel: ie,
2479
- discardLabel: ae,
2478
+ stopLabel: ae,
2479
+ discardLabel: oe,
2480
2480
  processingLabel: ze
2481
2481
  }),
2482
2482
  !$ && Ee && sr,
2483
- !$ && !Ee && lr && dr && /* @__PURE__ */ I("div", {
2483
+ !$ && !Ee && lr && dr && /* @__PURE__ */ P("div", {
2484
2484
  className: "flex",
2485
2485
  children: dr
2486
2486
  }),
2487
- !$ && !Ee && /* @__PURE__ */ L("div", {
2487
+ !$ && !Ee && /* @__PURE__ */ F("div", {
2488
2488
  className: l("flex items-center gap-2", lr ? "flex-nowrap" : "flex-wrap", U.actionRow),
2489
2489
  children: [
2490
2490
  lr && ur,
2491
- /* @__PURE__ */ I("div", {
2491
+ /* @__PURE__ */ P("div", {
2492
2492
  className: l("flex min-w-0 items-center self-stretch", lr ? "flex-1" : "w-full", U.textareaWrap),
2493
2493
  children: sr
2494
2494
  }),
2495
2495
  !lr && ur,
2496
2496
  !lr && dr,
2497
- /* @__PURE__ */ I("div", {
2497
+ /* @__PURE__ */ P("div", {
2498
2498
  className: l("ms-auto flex flex-shrink-0 items-center gap-2", U.footerActions),
2499
2499
  children: W ? W({
2500
2500
  canSend: Bn,
2501
2501
  onSend: Jn
2502
- }) : /* @__PURE__ */ L(F, { children: [
2502
+ }) : /* @__PURE__ */ F(N, { children: [
2503
2503
  Dt,
2504
- /* @__PURE__ */ I(en, {
2504
+ /* @__PURE__ */ P(en, {
2505
2505
  deployments: ye,
2506
2506
  selectedDeploymentId: be,
2507
2507
  onDeploymentChange: xe,
2508
2508
  modelSelectorLabels: Se,
2509
- menuStyles: ce,
2509
+ menuStyles: le,
2510
2510
  isStreaming: s,
2511
2511
  isMobile: At,
2512
2512
  isDisabled: Me,
@@ -2516,37 +2516,37 @@ var Yt = {
2516
2516
  onPickerToggle: () => Mt((e) => !e),
2517
2517
  onPickerOpenChange: Mt
2518
2518
  }),
2519
- qn && /* @__PURE__ */ I(S, {
2520
- icon: /* @__PURE__ */ I(_e, {
2519
+ qn && /* @__PURE__ */ P(S, {
2520
+ icon: /* @__PURE__ */ P(ve, {
2521
2521
  size: _.LG,
2522
2522
  stroke: v,
2523
2523
  "aria-hidden": !0
2524
2524
  }),
2525
- "aria-label": ne,
2526
- tooltipProps: { tooltip: ne },
2525
+ "aria-label": re,
2526
+ tooltipProps: { tooltip: re },
2527
2527
  className: "size-[40px] shrink-0 mobile:min-h-11 mobile:min-w-11",
2528
2528
  onClick: () => jn(Xe.Dictation),
2529
2529
  disabled: G || s
2530
2530
  }),
2531
- s && o ? /* @__PURE__ */ I(Ct, {
2531
+ s && o ? /* @__PURE__ */ P(Ct, {
2532
2532
  onStop: o,
2533
- ariaLabel: te
2534
- }) : !s && /* @__PURE__ */ I(St, {
2533
+ ariaLabel: ne
2534
+ }) : !s && /* @__PURE__ */ P(St, {
2535
2535
  onSend: Jn,
2536
2536
  isDisabled: !Kn || !Bn,
2537
- ariaLabel: A,
2538
- sendTooltip: zn ? j : M ?? j
2537
+ ariaLabel: te,
2538
+ sendTooltip: zn ? A : j ?? A
2539
2539
  })
2540
2540
  ] })
2541
2541
  })
2542
2542
  ]
2543
2543
  }),
2544
- /* @__PURE__ */ I("span", {
2544
+ /* @__PURE__ */ P("span", {
2545
2545
  className: "sr-only",
2546
2546
  role: "status",
2547
2547
  "aria-live": "polite",
2548
2548
  "aria-atomic": "true",
2549
- children: /* @__PURE__ */ I("span", { children: En.text }, En.revision)
2549
+ children: /* @__PURE__ */ P("span", { children: En.text }, En.revision)
2550
2550
  })
2551
2551
  ]
2552
2552
  });
@@ -2560,30 +2560,30 @@ var nn = {
2560
2560
  "--ci-welcome-color": p?.welcomeText,
2561
2561
  "--ci-description-color": p?.descriptionText
2562
2562
  });
2563
- return /* @__PURE__ */ L("div", {
2563
+ return /* @__PURE__ */ F("div", {
2564
2564
  style: _,
2565
2565
  className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", s),
2566
2566
  children: [
2567
- n && /* @__PURE__ */ L("div", {
2567
+ n && /* @__PURE__ */ F("div", {
2568
2568
  className: "flex flex-col items-center gap-4 text-center",
2569
- children: [/* @__PURE__ */ I("h1", {
2569
+ children: [/* @__PURE__ */ P("h1", {
2570
2570
  className: l(nn.welcome, "m-0", m?.welcomeClassName || "dial-display2-text"),
2571
2571
  children: n
2572
- }), r && /* @__PURE__ */ I("p", {
2572
+ }), r && /* @__PURE__ */ P("p", {
2573
2573
  className: l(nn.description, "m-0 max-w-[540px]", m?.descriptionClassName || "dial-body-paragraph-text"),
2574
2574
  children: r
2575
2575
  })]
2576
2576
  }),
2577
- i != null && /* @__PURE__ */ I("div", {
2577
+ i != null && /* @__PURE__ */ P("div", {
2578
2578
  className: "flex w-full max-w-[700px] flex-col items-center empty:hidden",
2579
2579
  children: i
2580
2580
  }),
2581
- /* @__PURE__ */ L("div", {
2581
+ /* @__PURE__ */ F("div", {
2582
2582
  className: l("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
2583
- children: [a != null && /* @__PURE__ */ I("div", {
2583
+ children: [a != null && /* @__PURE__ */ P("div", {
2584
2584
  className: "mb-2",
2585
2585
  children: a
2586
- }), /* @__PURE__ */ I(tn, {
2586
+ }), /* @__PURE__ */ P(tn, {
2587
2587
  placeholder: t,
2588
2588
  isStreaming: e,
2589
2589
  isInputDisabled: d,
@@ -2597,101 +2597,102 @@ var nn = {
2597
2597
  })
2598
2598
  ]
2599
2599
  });
2600
- }, an = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, initialAttachments: u = [], onCancel: d, onSave: p, onUploadAttachment: m, cancelLabel: h = "Cancel", saveLabel: g = "Save & Submit", ariaLabel: _, removeLabel: y, retryLabel: b, uploadingLabel: x, expandLabel: S, clickLabel: C, addMenuTitle: w = "Add", attachLabel: E = "Attach file", menuTitle: D = "Menu", menuCloseLabel: ee = "Close", className: k, pendingDropFiles: A, onDropFilesConsumed: j, validateAttachment: M, isAttachmentsEnabled: te, isTextAttachmentsAllowed: ne, hideAttachFile: re = !1, fileAccept: ie, maximumAttachmentsAmount: ae, onAttachmentsLimitExceeded: N, onDialFileSystemClick: P, dialFileSystemLabel: F, pendingAttachments: oe, onPendingAttachmentsConsumed: se, onAttachmentClick: ce, pasteTextThreshold: le, maxMessageLength: ue = 5e4, onMessageTooLong: de }) => {
2601
- let fe = V(null), pe = V(null), [me, he] = H([]);
2600
+ }, an = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, sendOnEnter: u, initialAttachments: d = [], onCancel: p, onSave: m, onUploadAttachment: h, cancelLabel: g = "Cancel", saveLabel: _ = "Save & Submit", ariaLabel: y, removeLabel: b, retryLabel: x, uploadingLabel: S, expandLabel: C, clickLabel: w, addMenuTitle: E = "Add", attachLabel: D = "Attach file", menuTitle: ee = "Menu", menuCloseLabel: k = "Close", className: te, pendingDropFiles: A, onDropFilesConsumed: j, validateAttachment: ne, isAttachmentsEnabled: re, isTextAttachmentsAllowed: ie, hideAttachFile: ae = !1, fileAccept: oe, maximumAttachmentsAmount: M, onAttachmentsLimitExceeded: se, onDialFileSystemClick: N, dialFileSystemLabel: I, pendingAttachments: ce, onPendingAttachmentsConsumed: le, onAttachmentClick: ue, pasteTextThreshold: de, maxMessageLength: fe = 5e4, onMessageTooLong: pe }) => {
2601
+ let me = V(null), he = V(null), [ge, ve] = H([]);
2602
2602
  z(() => {
2603
- A?.length && (he(A), j?.());
2603
+ A?.length && (ve(A), j?.());
2604
2604
  }, [A, j]);
2605
- let [_e, ve] = H(e ?? ""), [ye, be] = H([]), [xe, Se] = H(u), Ce = ye.some((e) => e.status === a.Loading || e.status === a.Error), we = (_e.trim().length > 0 || ye.length > 0 || xe.length > 0) && !Ce, Te = (e) => {
2606
- Se((t) => t.filter((t) => t.id !== e));
2607
- }, Ee = R((e, t) => {
2608
- p(e, xe, t);
2609
- }, [xe, p]), De = () => {
2610
- we && (_e.length >= ue ? de?.(_e.length, ue) : Ee(_e, ye));
2611
- }, Oe = R(() => he([]), []), ke = R((e) => {
2612
- ve(e), n?.(e);
2613
- }, [n]), U = R((e) => {
2605
+ let [L, ye] = H(e ?? ""), [be, xe] = H([]), [Se, Ce] = H(d), we = be.some((e) => e.status === a.Loading || e.status === a.Error), Te = (L.trim().length > 0 || be.length > 0 || Se.length > 0) && !we, Ee = (e) => {
2606
+ Ce((t) => t.filter((t) => t.id !== e));
2607
+ }, De = R((e, t) => {
2608
+ m(e, Se, t);
2609
+ }, [Se, m]), Oe = () => {
2610
+ Te && (L.length >= fe ? pe?.(L.length, fe) : De(L, be));
2611
+ }, ke = R(() => ve([]), []), U = R((e) => {
2612
+ ye(e), n?.(e);
2613
+ }, [n]), Ae = R((e) => {
2614
2614
  let t = Array.from(e.target.files ?? []);
2615
- t.length !== 0 && (e.target.value = "", he(t));
2616
- }, []), Ae = B(() => P ? [{
2615
+ t.length !== 0 && (e.target.value = "", ve(t));
2616
+ }, []), W = B(() => N ? [{
2617
2617
  key: "dial-fs",
2618
- label: F ?? "DIAL file system",
2619
- icon: /* @__PURE__ */ I(ge, {
2618
+ label: I ?? "DIAL file system",
2619
+ icon: /* @__PURE__ */ P(_e, {
2620
2620
  size: f,
2621
2621
  "aria-hidden": !0,
2622
2622
  stroke: v
2623
2623
  }),
2624
- onClick: P
2625
- }] : [], [P, F]);
2626
- return /* @__PURE__ */ L("div", {
2627
- className: l("flex w-full flex-col gap-2", k),
2628
- children: [/* @__PURE__ */ I(tn, {
2629
- ref: pe,
2624
+ onClick: N
2625
+ }] : [], [N, I]);
2626
+ return /* @__PURE__ */ F("div", {
2627
+ className: l("flex w-full flex-col gap-2", te),
2628
+ children: [/* @__PURE__ */ P(tn, {
2629
+ ref: he,
2630
2630
  message: e,
2631
2631
  messageRevision: t,
2632
2632
  activeMentions: r,
2633
2633
  onBackspaceAtCaret: i,
2634
2634
  caretPositionOverride: o,
2635
2635
  commandMenu: s,
2636
- ariaLabel: _,
2636
+ ariaLabel: y,
2637
2637
  hideActionBar: !0,
2638
- pendingDropFiles: me,
2639
- onDropFilesConsumed: Oe,
2640
- onSend: Ee,
2641
- onUploadAttachment: m,
2642
- onChange: ke,
2643
- onAttachmentsChange: be,
2644
- removeLabel: y,
2645
- retryLabel: b,
2646
- uploadingLabel: x,
2647
- expandLabel: S,
2648
- clickLabel: C,
2638
+ sendOnEnter: u,
2639
+ pendingDropFiles: ge,
2640
+ onDropFilesConsumed: ke,
2641
+ onSend: De,
2642
+ onUploadAttachment: h,
2643
+ onChange: U,
2644
+ onAttachmentsChange: xe,
2645
+ removeLabel: b,
2646
+ retryLabel: x,
2647
+ uploadingLabel: S,
2648
+ expandLabel: C,
2649
+ clickLabel: w,
2649
2650
  className: "max-w-full",
2650
- prefixAttachments: xe,
2651
- onRemovePrefixAttachment: Te,
2652
- validateAttachment: M,
2653
- isAttachmentsEnabled: te,
2654
- isTextAttachmentsAllowed: ne,
2655
- maximumAttachmentsAmount: ae,
2656
- onAttachmentsLimitExceeded: N,
2657
- pendingAttachments: oe,
2658
- onPendingAttachmentsConsumed: se,
2659
- onAttachmentClick: ce,
2660
- pasteTextThreshold: le,
2661
- maxMessageLength: ue,
2662
- onMessageTooLong: de
2663
- }), /* @__PURE__ */ L("div", {
2651
+ prefixAttachments: Se,
2652
+ onRemovePrefixAttachment: Ee,
2653
+ validateAttachment: ne,
2654
+ isAttachmentsEnabled: re,
2655
+ isTextAttachmentsAllowed: ie,
2656
+ maximumAttachmentsAmount: M,
2657
+ onAttachmentsLimitExceeded: se,
2658
+ pendingAttachments: ce,
2659
+ onPendingAttachmentsConsumed: le,
2660
+ onAttachmentClick: ue,
2661
+ pasteTextThreshold: de,
2662
+ maxMessageLength: fe,
2663
+ onMessageTooLong: pe
2664
+ }), /* @__PURE__ */ F("div", {
2664
2665
  className: "flex items-center justify-between",
2665
- children: [/* @__PURE__ */ L("div", {
2666
+ children: [/* @__PURE__ */ F("div", {
2666
2667
  className: "flex",
2667
- children: [!re && /* @__PURE__ */ I("input", {
2668
- ref: fe,
2668
+ children: [!ae && /* @__PURE__ */ P("input", {
2669
+ ref: me,
2669
2670
  type: "file",
2670
2671
  multiple: !0,
2671
- accept: ie,
2672
+ accept: oe,
2672
2673
  className: "sr-only",
2673
2674
  "aria-hidden": !0,
2674
2675
  tabIndex: -1,
2675
- onChange: U
2676
- }), (!re || (c?.length ?? 0) > 0) && /* @__PURE__ */ I(mt, {
2677
- onAttachClick: re ? void 0 : () => fe.current?.click(),
2678
- attachLabel: E,
2679
- addMenuTitle: w,
2680
- menuTitle: D,
2681
- menuCloseLabel: ee,
2682
- extraMenuItems: Ae,
2676
+ onChange: Ae
2677
+ }), (!ae || (c?.length ?? 0) > 0) && /* @__PURE__ */ P(mt, {
2678
+ onAttachClick: ae ? void 0 : () => me.current?.click(),
2679
+ attachLabel: D,
2680
+ addMenuTitle: E,
2681
+ menuTitle: ee,
2682
+ menuCloseLabel: k,
2683
+ extraMenuItems: W,
2683
2684
  menuOverlays: c,
2684
- getCaretPosition: () => pe.current?.getCaretPosition() ?? 0
2685
+ getCaretPosition: () => he.current?.getCaretPosition() ?? 0
2685
2686
  })]
2686
- }), /* @__PURE__ */ L("div", {
2687
+ }), /* @__PURE__ */ F("div", {
2687
2688
  className: "flex gap-2",
2688
- children: [/* @__PURE__ */ I(T, {
2689
- label: h,
2690
- onClick: d
2691
- }), /* @__PURE__ */ I(O, {
2689
+ children: [/* @__PURE__ */ P(T, {
2692
2690
  label: g,
2693
- onClick: De,
2694
- disabled: !we
2691
+ onClick: p
2692
+ }), /* @__PURE__ */ P(O, {
2693
+ label: _,
2694
+ onClick: Oe,
2695
+ disabled: !Te
2695
2696
  })]
2696
2697
  })]
2697
2698
  })]
@@ -2700,44 +2701,44 @@ var nn = {
2700
2701
  return e.Warning = "warning", e.Reached = "reached", e;
2701
2702
  }({}), sn = {
2702
2703
  [on.Warning]: {
2703
- Icon: de,
2704
+ Icon: fe,
2704
2705
  className: "text-warning"
2705
2706
  },
2706
2707
  [on.Reached]: {
2707
- Icon: ue,
2708
+ Icon: de,
2708
2709
  className: "text-error"
2709
2710
  }
2710
2711
  }, cn = ({ severity: e, limitText: t, reset: n, onClose: r, closeAriaLabel: i = "Close notification", limitTextClassName: a = "dial-small-paragraph-semi-text", resetTextClassName: o = "dial-small-paragraph-text", className: s }) => {
2711
2712
  let { Icon: c, className: u } = sn[e];
2712
- return /* @__PURE__ */ L("div", {
2713
+ return /* @__PURE__ */ F("div", {
2713
2714
  role: "status",
2714
2715
  className: l("relative flex items-center justify-between gap-3 rounded-xl border border-transparent bg-layer-sunken p-3 text-primary", U.usageBanner, s),
2715
- children: [/* @__PURE__ */ L("div", {
2716
+ children: [/* @__PURE__ */ F("div", {
2716
2717
  className: "flex min-w-0 flex-1 items-start gap-3",
2717
- children: [/* @__PURE__ */ I("span", {
2718
+ children: [/* @__PURE__ */ P("span", {
2718
2719
  "aria-hidden": "true",
2719
2720
  className: l("flex shrink-0", u),
2720
- children: /* @__PURE__ */ I(c, { size: 24 })
2721
- }), /* @__PURE__ */ L("div", {
2721
+ children: /* @__PURE__ */ P(c, { size: 24 })
2722
+ }), /* @__PURE__ */ F("div", {
2722
2723
  className: "flex min-w-0 flex-row flex-wrap items-baseline gap-x-1 wrap-break-word text-primary",
2723
- children: [/* @__PURE__ */ I("span", {
2724
+ children: [/* @__PURE__ */ P("span", {
2724
2725
  className: a,
2725
2726
  children: t
2726
- }), n != null && /* @__PURE__ */ L(F, { children: [
2727
+ }), n != null && /* @__PURE__ */ F(N, { children: [
2727
2728
  " ",
2728
- /* @__PURE__ */ I("time", {
2729
+ /* @__PURE__ */ P("time", {
2729
2730
  dateTime: n.isoValue,
2730
2731
  "aria-hidden": n.ariaLabel != null || void 0,
2731
2732
  className: o,
2732
2733
  children: n.label
2733
2734
  }),
2734
- n.ariaLabel != null && /* @__PURE__ */ I("span", {
2735
+ n.ariaLabel != null && /* @__PURE__ */ P("span", {
2735
2736
  className: "sr-only",
2736
2737
  children: n.ariaLabel
2737
2738
  })
2738
2739
  ] })]
2739
2740
  })]
2740
- }), r != null && /* @__PURE__ */ I(g, {
2741
+ }), r != null && /* @__PURE__ */ P(g, {
2741
2742
  className: "shrink-0 self-start",
2742
2743
  ariaLabel: i,
2743
2744
  onClose: () => r()