@marimo-team/islands 0.23.14-dev11 → 0.23.14-dev14

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.
@@ -6,13 +6,13 @@ import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button
6
6
  import { t as require_react } from "./react-DA-nE2FX.js";
7
7
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
8
8
  import { r as toast } from "./copy-COam1EG7.js";
9
- import { Bn as CircleX, C as AccordionContent, D as ChatBubbleIcon, Dn as Trash2, En as Wrench, Et as createVariableInfoElement, Fn as FileText, G as cellErrorsAtom, Gt as dataSourceConnectionsAtom, Jt as getRequestClient, Kt as getTableType, Ln as ExternalLink, Lt as jotaiJsonStorage, Mn as LoaderCircle, Mt as generateUUID, P as base64ToDataURL, Pn as Info, Qt as singleFacet, Rt as variablesAtom, S as Accordion, T as AccordionTrigger, V as renderHTML, Wt as allTablesAtom, X as notebookAtom, _ as Boosts, b as AIContextProvider, bn as Anchor2, c as Popover, cn as CellOutputId, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, kt as moveToEndOfEditor, n as Spinner, r as MarkdownRenderer, rn as ZodLocalStorage, t as toPng, u as PopoverContent, v as Sections, vn as atomWithStorage, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yt as displayCellName, zt as PluralWord } from "./html-to-image-MqcD07Bw.js";
9
+ import { $t as singleFacet, Bt as PluralWord, C as AccordionContent, D as ChatBubbleIcon, Dn as Wrench, Et as createVariableInfoElement, Fn as Info, G as cellErrorsAtom, Gt as allTablesAtom, In as FileText, Kt as dataSourceConnectionsAtom, Lt as jotaiJsonStorage, Mt as generateUUID, Nn as LoaderCircle, On as Trash2, P as base64ToDataURL, Rn as ExternalLink, Rt as variablesAtom, S as Accordion, T as AccordionTrigger, V as renderHTML, Vn as CircleX, X as notebookAtom, Yt as getRequestClient, _ as Boosts, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, in as ZodLocalStorage, kt as moveToEndOfEditor, ln as CellOutputId, n as Spinner, qt as getTableType, r as MarkdownRenderer, t as toPng, u as PopoverContent, v as Sections, w as AccordionItem, x as AIContextRegistry, xn as Anchor2, y as contextToXml, yn as atomWithStorage, yt as displayCellName } from "./html-to-image-DcTkcjmm.js";
10
10
  import "./chunk-5FQGJX7Z-BbqSm5gU.js";
11
11
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
12
12
  import { C as logNever, I as X, R as ChevronDown, t as Strings } from "./strings-Dq_j3Rxw.js";
13
13
  import { C as DropdownMenuTrigger, a as NumberField, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, r as Input } from "./input-BSdZp5Ng.js";
14
14
  import { p as isUrl, v as CircleQuestionMark } from "./toDate-D1Z7ZXWh.js";
15
- import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-Dt3icftd.js";
15
+ import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-2FbS8KgW.js";
16
16
  import "./react-dom-BTJzcVJ9.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
18
18
  import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-CijjQh4u.js";
@@ -6517,18 +6517,18 @@ const ReasoningAccordion = (e18) => {
6517
6517
  if (!h && !y) return null;
6518
6518
  let S = y ? "reasoning" : b, C;
6519
6519
  m[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), m[0] = C) : C = m[0];
6520
- let T = y ? "Thinking" : "View reasoning", E = h.length > 0 && ` (${h.length} chars)`, D;
6521
- m[1] !== T || m[2] !== E ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6520
+ let w = y ? "Thinking" : "View reasoning", E = h.length > 0 && ` (${h.length} chars)`, D;
6521
+ m[1] !== w || m[2] !== E ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6522
6522
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
6523
6523
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6524
6524
  className: "flex items-center gap-2",
6525
6525
  children: [
6526
6526
  C,
6527
- T,
6527
+ w,
6528
6528
  E
6529
6529
  ]
6530
6530
  })
6531
- }), m[1] = T, m[2] = E, m[3] = D) : D = m[3];
6531
+ }), m[1] = w, m[2] = E, m[3] = D) : D = m[3];
6532
6532
  let O;
6533
6533
  m[4] === h ? O = m[5] : (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6534
6534
  className: "pb-2 px-2",
@@ -6649,53 +6649,53 @@ const ToolApprovalCard = (e18) => {
6649
6649
  };
6650
6650
  var import_compiler_runtime$5 = require_compiler_runtime();
6651
6651
  const ToolErrorCard = (e18) => {
6652
- let m = (0, import_compiler_runtime$5.c)(28), { toolName: h, input: g, errorText: v, isLive: y, className: b } = e18, [x, S] = import_react.useState(y), w = import_react.useRef(y), T, E;
6653
- m[0] === y ? (T = m[1], E = m[2]) : (T = () => {
6654
- w.current && !y && S(false), w.current = y;
6655
- }, E = [y], m[0] = y, m[1] = T, m[2] = E), import_react.useEffect(T, E);
6652
+ let m = (0, import_compiler_runtime$5.c)(28), { toolName: h, input: g, errorText: v, isLive: y, className: b } = e18, [x, S] = import_react.useState(y), C = import_react.useRef(y), w, T;
6653
+ m[0] === y ? (w = m[1], T = m[2]) : (w = () => {
6654
+ C.current && !y && S(false), C.current = y;
6655
+ }, T = [y], m[0] = y, m[1] = w, m[2] = T), import_react.useEffect(w, T);
6656
+ let E;
6657
+ m[3] === b ? E = m[4] : (E = cn("rounded-md border border-(--red-6) bg-(--red-2)", b), m[3] = b, m[4] = E);
6656
6658
  let D;
6657
- m[3] === b ? D = m[4] : (D = cn("rounded-md border border-(--red-6) bg-(--red-2)", b), m[3] = b, m[4] = D);
6659
+ m[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => S(_temp$2), m[5] = D) : D = m[5];
6658
6660
  let O;
6659
- m[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = () => S(_temp$2), m[5] = O) : O = m[5];
6661
+ m[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleX, { className: "h-3.5 w-3.5 shrink-0" }), m[6] = O) : O = m[6];
6660
6662
  let k;
6661
- m[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleX, { className: "h-3.5 w-3.5 shrink-0" }), m[6] = k) : k = m[6];
6662
- let A;
6663
- m[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6663
+ m[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6664
6664
  className: "font-semibold",
6665
6665
  children: "Failed:"
6666
- }), m[7] = A) : A = m[7];
6666
+ }), m[7] = k) : k = m[7];
6667
+ let A;
6668
+ m[8] === h ? A = m[9] : (A = formatToolName(h), m[8] = h, m[9] = A);
6667
6669
  let j;
6668
- m[8] === h ? j = m[9] : (j = formatToolName(h), m[8] = h, m[9] = j);
6669
- let M;
6670
- m[10] === j ? M = m[11] : (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6670
+ m[10] === A ? j = m[11] : (j = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6671
6671
  className: "flex-1 text-left",
6672
6672
  children: [
6673
- A,
6673
+ k,
6674
6674
  " ",
6675
6675
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6676
6676
  className: "font-mono",
6677
- children: j
6677
+ children: A
6678
6678
  })
6679
6679
  ]
6680
- }), m[10] = j, m[11] = M);
6681
- let N = x && "rotate-180", P;
6682
- m[12] === N ? P = m[13] : (P = cn("h-3.5 w-3.5 shrink-0 transition-transform", N), m[12] = N, m[13] = P);
6680
+ }), m[10] = A, m[11] = j);
6681
+ let M = x && "rotate-180", N;
6682
+ m[12] === M ? N = m[13] : (N = cn("h-3.5 w-3.5 shrink-0 transition-transform", M), m[12] = M, m[13] = N);
6683
+ let P;
6684
+ m[14] === N ? P = m[15] : (P = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: N }), m[14] = N, m[15] = P);
6683
6685
  let F;
6684
- m[14] === P ? F = m[15] : (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: P }), m[14] = P, m[15] = F);
6685
- let I;
6686
- m[16] !== x || m[17] !== F || m[18] !== M ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
6686
+ m[16] !== x || m[17] !== P || m[18] !== j ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
6687
6687
  type: "button",
6688
- onClick: O,
6688
+ onClick: D,
6689
6689
  className: "w-full flex items-center gap-2 px-3 py-2 text-xs text-(--red-11) hover:bg-(--red-3) rounded-md transition-colors",
6690
6690
  "aria-expanded": x,
6691
6691
  children: [
6692
- k,
6693
- M,
6694
- F
6692
+ O,
6693
+ j,
6694
+ P
6695
6695
  ]
6696
- }), m[16] = x, m[17] = F, m[18] = M, m[19] = I) : I = m[19];
6697
- let L;
6698
- m[20] !== v || m[21] !== g || m[22] !== x ? (L = x && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6696
+ }), m[16] = x, m[17] = P, m[18] = j, m[19] = F) : F = m[19];
6697
+ let I;
6698
+ m[20] !== v || m[21] !== g || m[22] !== x ? (I = x && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6699
6699
  className: "px-3 pb-3 space-y-3 border-t border-(--red-6)/40 pt-3",
6700
6700
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: g }), v && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6701
6701
  className: "text-xs font-semibold text-(--red-11) mb-1",
@@ -6704,12 +6704,12 @@ const ToolErrorCard = (e18) => {
6704
6704
  className: "bg-(--red-2) border border-(--red-6) rounded p-2 text-xs text-(--red-11) leading-relaxed overflow-auto scrollbar-thin max-h-64 whitespace-pre-wrap",
6705
6705
  children: v
6706
6706
  })] })]
6707
- }), m[20] = v, m[21] = g, m[22] = x, m[23] = L) : L = m[23];
6708
- let R;
6709
- return m[24] !== I || m[25] !== L || m[26] !== D ? (R = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6710
- className: D,
6711
- children: [I, L]
6712
- }), m[24] = I, m[25] = L, m[26] = D, m[27] = R) : R = m[27], R;
6707
+ }), m[20] = v, m[21] = g, m[22] = x, m[23] = I) : I = m[23];
6708
+ let L;
6709
+ return m[24] !== F || m[25] !== I || m[26] !== E ? (L = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6710
+ className: E,
6711
+ children: [F, I]
6712
+ }), m[24] = F, m[25] = I, m[26] = E, m[27] = L) : L = m[27], L;
6713
6713
  };
6714
6714
  function _temp$2(e18) {
6715
6715
  return !e18;
@@ -6854,9 +6854,9 @@ function getTriggerToneClass(e18) {
6854
6854
  }
6855
6855
  }
6856
6856
  const ToolHistoryRow = (e18) => {
6857
- let m = (0, import_compiler_runtime$3.c)(34), { toolName: h, state: g, input: v, result: y, approval: b, index: x, className: S, isActive: C } = e18, T = x === void 0 ? 0 : x, E = C === void 0 ? true : C, D;
6857
+ let m = (0, import_compiler_runtime$3.c)(34), { toolName: h, state: g, input: v, result: y, approval: b, index: x, className: S, isActive: C } = e18, w = x === void 0 ? 0 : x, E = C === void 0 ? true : C, D;
6858
6858
  m[0] !== E || m[1] !== g ? (D = !E && PENDING_STATES.has(g), m[0] = E, m[1] = g, m[2] = D) : D = m[2];
6859
- let O = D, k = `tool-${T}`, A;
6859
+ let O = D, k = `tool-${w}`, A;
6860
6860
  m[3] === S ? A = m[4] : (A = cn("w-full", S), m[3] = S, m[4] = A);
6861
6861
  let j;
6862
6862
  m[5] !== O || m[6] !== g ? (j = cn("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline", O ? "text-muted-foreground" : getTriggerToneClass(g)), m[5] = O, m[6] = g, m[7] = j) : j = m[7];
@@ -7612,22 +7612,22 @@ function routeIncomingChatChunk(e18, m) {
7612
7612
  }
7613
7613
  const Chatbot = (e18) => {
7614
7614
  var _a;
7615
- let [m, g] = (0, import_react.useState)(""), [b, x] = (0, import_react.useState)(e18.config), [S, C] = (0, import_react.useState)(e18.config), [w, T] = (0, import_react.useState)(void 0), D = (0, import_react.useRef)(null), O = (0, import_react.useRef)(null), k = (0, import_react.useRef)(null), A = (0, import_react.useRef)(null);
7615
+ let [m, g] = (0, import_react.useState)(""), [b, x] = (0, import_react.useState)(e18.config), [S, C] = (0, import_react.useState)(e18.config), [w, T] = (0, import_react.useState)(void 0), E = (0, import_react.useRef)(null), D = (0, import_react.useRef)(null), O = (0, import_react.useRef)(null), k = (0, import_react.useRef)(null);
7616
7616
  Object.keys(e18.config).some((m2) => e18.config[m2] !== S[m2]) && (x(e18.config), C(e18.config));
7617
- let j = (0, import_react.useRef)(b);
7618
- j.current = b;
7619
- let M = (0, import_react.useRef)(null), N = (0, import_react.useRef)(null), { data: P } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), F = e18.value.length > 0 ? e18.value : P, { messages: I, sendMessage: R, setMessages: z, status: B, stop: V, error: H, regenerate: U, clearError: W, addToolApprovalResponse: G } = useChat({
7617
+ let A = (0, import_react.useRef)(b);
7618
+ A.current = b;
7619
+ let j = (0, import_react.useRef)(null), M = (0, import_react.useRef)(null), { data: N } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), P = e18.value.length > 0 ? e18.value : N, { messages: I, sendMessage: R, setMessages: z, status: B, stop: V, error: H, regenerate: U, clearError: W, addToolApprovalResponse: G } = useChat({
7620
7620
  sendAutomaticallyWhen: ({ messages: e19 }) => hasPendingToolCalls(e19),
7621
7621
  transport: new DefaultChatTransport({ fetch: async (m2, g2) => {
7622
7622
  var _a2;
7623
7623
  if (g2 === void 0) return fetch(m2);
7624
7624
  let _ = JSON.parse(g2.body), v = g2.signal, y = {
7625
- max_tokens: j.current.max_tokens,
7626
- temperature: j.current.temperature,
7627
- top_p: j.current.top_p,
7628
- top_k: j.current.top_k,
7629
- frequency_penalty: j.current.frequency_penalty,
7630
- presence_penalty: j.current.presence_penalty
7625
+ max_tokens: A.current.max_tokens,
7626
+ temperature: A.current.temperature,
7627
+ top_p: A.current.top_p,
7628
+ top_k: A.current.top_k,
7629
+ frequency_penalty: A.current.frequency_penalty,
7630
+ presence_penalty: A.current.presence_penalty
7631
7631
  };
7632
7632
  try {
7633
7633
  let m3 = _.messages.map((e19) => {
@@ -7638,14 +7638,14 @@ const Chatbot = (e18) => {
7638
7638
  };
7639
7639
  }), g3 = generateUUID(), b2 = new ReadableStream({
7640
7640
  start(m4) {
7641
- M.current = m4, N.current = g3;
7641
+ j.current = m4, M.current = g3;
7642
7642
  let _2 = () => {
7643
7643
  try {
7644
7644
  m4.close();
7645
7645
  } catch (e19) {
7646
7646
  Logger.debug("Controller may already be closed", { error: e19 });
7647
7647
  }
7648
- M.current = null, N.current = null, e18.cancel_prompt({ request_id: g3 }).catch((e19) => {
7648
+ j.current = null, M.current = null, e18.cancel_prompt({ request_id: g3 }).catch((e19) => {
7649
7649
  Logger.debug("cancel_prompt failed", { error: e19 });
7650
7650
  });
7651
7651
  };
@@ -7654,7 +7654,7 @@ const Chatbot = (e18) => {
7654
7654
  };
7655
7655
  },
7656
7656
  cancel() {
7657
- M.current = null, N.current = null;
7657
+ j.current = null, M.current = null;
7658
7658
  }
7659
7659
  });
7660
7660
  return e18.send_prompt({
@@ -7663,7 +7663,7 @@ const Chatbot = (e18) => {
7663
7663
  config: y
7664
7664
  }).catch((e19) => {
7665
7665
  var _a3;
7666
- (_a3 = M.current) == null ? void 0 : _a3.error(e19), M.current = null, N.current = null;
7666
+ (_a3 = j.current) == null ? void 0 : _a3.error(e19), j.current = null, M.current = null;
7667
7667
  }), createUIMessageStreamResponse({ stream: b2 });
7668
7668
  } catch (e19) {
7669
7669
  if (e19 instanceof Error && e19.name === "AbortError") return new Response("Aborted", { status: 499 });
@@ -7671,9 +7671,9 @@ const Chatbot = (e18) => {
7671
7671
  return new Response(m3, { status: 400 });
7672
7672
  }
7673
7673
  } }),
7674
- messages: F,
7674
+ messages: P,
7675
7675
  onFinish: (m2) => {
7676
- T(void 0), D.current && (D.current.value = ""), Logger.debug("Finished streaming message:", m2), e18.setValue(m2.messages);
7676
+ T(void 0), E.current && (E.current.value = ""), Logger.debug("Finished streaming message:", m2), e18.setValue(m2.messages);
7677
7677
  },
7678
7678
  onError: (e19) => {
7679
7679
  Logger.error("An error occurred:", e19);
@@ -7682,8 +7682,8 @@ const Chatbot = (e18) => {
7682
7682
  useEventListener(e18.host, MarimoIncomingMessageEvent.TYPE, (e19) => {
7683
7683
  let m2 = ChatMessageIncomingSchema.safeParse(e19.detail.message);
7684
7684
  m2.success && routeIncomingChatChunk(m2.data, {
7685
- controllerRef: M,
7686
- activeRequestIdRef: N
7685
+ controllerRef: j,
7686
+ activeRequestIdRef: M
7687
7687
  });
7688
7688
  });
7689
7689
  let K = B === "submitted" || B === "streaming", q = (m2) => {
@@ -7702,12 +7702,12 @@ const Chatbot = (e18) => {
7702
7702
  }, Z = e18.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
7703
7703
  (0, import_react.useEffect)(() => {
7704
7704
  var _a2;
7705
- (_a2 = A.current) == null ? void 0 : _a2.scrollTo({
7706
- top: A.current.scrollHeight,
7705
+ (_a2 = k.current) == null ? void 0 : _a2.scrollTo({
7706
+ top: k.current.scrollHeight,
7707
7707
  behavior: "smooth"
7708
7708
  });
7709
- }, [I.length, A]);
7710
- let Q = (_a = k.current) == null ? void 0 : _a.view, $ = () => {
7709
+ }, [I.length, k]);
7710
+ let Q = (_a = O.current) == null ? void 0 : _a.view, $ = () => {
7711
7711
  if (Q) {
7712
7712
  let e19 = Q.state.doc.length;
7713
7713
  Q.dispatch({ changes: {
@@ -7736,7 +7736,7 @@ const Chatbot = (e18) => {
7736
7736
  }),
7737
7737
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7738
7738
  className: "grow overflow-y-auto gap-4 pt-8 pb-4 px-2 flex flex-col",
7739
- ref: A,
7739
+ ref: k,
7740
7740
  children: [
7741
7741
  I.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7742
7742
  className: "flex flex-col items-center justify-center h-full text-muted-foreground text-center p-4",
@@ -7808,7 +7808,7 @@ const Chatbot = (e18) => {
7808
7808
  }, ...g2 ?? []]
7809
7809
  }), $();
7810
7810
  },
7811
- ref: O,
7811
+ ref: D,
7812
7812
  inert: e18.disabled || void 0,
7813
7813
  className: cn("flex w-full border-t border-(--slate-6) px-2 py-1 items-center", e18.disabled && "opacity-50 cursor-not-allowed"),
7814
7814
  children: [
@@ -7828,12 +7828,12 @@ const Chatbot = (e18) => {
7828
7828
  className: "rounded-sm mr-2",
7829
7829
  placeholder: Z,
7830
7830
  value: m,
7831
- inputRef: k,
7831
+ inputRef: O,
7832
7832
  maxHeight: e18.maxHeight ? `${e18.maxHeight / 2}px` : void 0,
7833
7833
  onChange: g,
7834
7834
  onSubmit: (e19, m2) => {
7835
7835
  var _a2;
7836
- m2.trim() && ((_a2 = O.current) == null ? void 0 : _a2.requestSubmit());
7836
+ m2.trim() && ((_a2 = D.current) == null ? void 0 : _a2.requestSubmit());
7837
7837
  },
7838
7838
  onClose: () => {
7839
7839
  },
@@ -7854,7 +7854,7 @@ const Chatbot = (e18) => {
7854
7854
  variant: "text",
7855
7855
  size: "sm",
7856
7856
  onClick: () => {
7857
- T(void 0), D.current && (D.current.value = "");
7857
+ T(void 0), E.current && (E.current.value = "");
7858
7858
  },
7859
7859
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { className: "size-3" })
7860
7860
  }),
@@ -7864,12 +7864,12 @@ const Chatbot = (e18) => {
7864
7864
  size: "sm",
7865
7865
  onClick: () => {
7866
7866
  var _a2;
7867
- return (_a2 = D.current) == null ? void 0 : _a2.click();
7867
+ return (_a2 = E.current) == null ? void 0 : _a2.click();
7868
7868
  },
7869
7869
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Paperclip, { className: "h-4" })
7870
7870
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
7871
7871
  type: "file",
7872
- ref: D,
7872
+ ref: E,
7873
7873
  className: "hidden",
7874
7874
  multiple: true,
7875
7875
  accept: Array.isArray(e18.allowAttachments) ? e18.allowAttachments.join(",") : void 0,
@@ -8035,23 +8035,23 @@ var configDescriptions = {
8035
8035
  })
8036
8036
  })
8037
8037
  }), m[2] = w) : w = m[2];
8038
- let E;
8038
+ let T;
8039
8039
  if (m[3] !== C || m[4] !== h) {
8040
8040
  let e19;
8041
8041
  m[6] === C ? e19 = m[7] : (e19 = (e20, m2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, {
8042
8042
  onSelect: () => C(e20),
8043
8043
  className: "whitespace-normal text-left",
8044
8044
  children: e20
8045
- }, m2), m[6] = C, m[7] = e19), E = h.map(e19), m[3] = C, m[4] = h, m[5] = E;
8046
- } else E = m[5];
8045
+ }, m2), m[6] = C, m[7] = e19), T = h.map(e19), m[3] = C, m[4] = h, m[5] = T;
8046
+ } else T = m[5];
8047
8047
  let D;
8048
- m[8] === E ? D = m[9] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [w, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
8048
+ m[8] === T ? D = m[9] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [w, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
8049
8049
  side: "right",
8050
8050
  align: "end",
8051
8051
  onCloseAutoFocus: _temp,
8052
8052
  className: "w-64 max-h-96 overflow-y-auto",
8053
- children: E
8054
- })] }) }), m[8] = E, m[9] = D);
8053
+ children: T
8054
+ })] }) }), m[8] = T, m[9] = D);
8055
8055
  let O;
8056
8056
  m[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = () => v(false), m[10] = O) : O = m[10];
8057
8057
  let k;